butter-toast
Version:
Smooth toast notifications for react apps
1 lines • 74.9 kB
JavaScript
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"),require("react-dom"));else if("function"==typeof define&&define.amd)define(["react","react-dom"],t);else{var r="object"==typeof exports?t(require("react"),require("react-dom")):t(e.React,e.ReactDOM);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(function(){return 0}.constructor("return this")(),function(e,t){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=35)}([function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(t,r){t.exports=e},function(e,t,r){"use strict";r.d(t,"e",function(){return n}),r.d(t,"a",function(){return o}),r.d(t,"c",function(){return a}),r.d(t,"d",function(){return i}),r.d(t,"b",function(){return s}),r.d(t,"f",function(){return d});var n="POS_TOP",o="POS_BOTTOM",a="POS_LEFT",i="POS_RIGHT",s="POS_CENTER",c={right:0},u={left:0},l={left:"50%"},f={position:"fixed",zIndex:99999};function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(null===e)return{};var r=e.vertical,n=e.horizontal;return Object.assign({},f,r===o?{bottom:"".concat(t,"px")}:{top:"".concat(t,"px")},n===s?l:{},n===a?u:{},n===i?c:{})}},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){e.exports=r(22)()},function(e,t,r){"use strict";r.d(t,"l",function(){return n}),r.d(t,"m",function(){return o}),r.d(t,"i",function(){return a}),r.d(t,"a",function(){return i}),r.d(t,"b",function(){return s}),r.d(t,"c",function(){return c}),r.d(t,"j",function(){return u}),r.d(t,"k",function(){return l}),r.d(t,"d",function(){return f}),r.d(t,"e",function(){return d}),r.d(t,"f",function(){return p}),r.d(t,"g",function(){return h}),r.d(t,"h",function(){return m}),r.d(t,"n",function(){return g});var n="#E53935",o="#D32F2F",a="#3949AB",i="#1E88E5",s="#1565C0",c="#43A047",u="#EF6C00",l="#FFAB40",f="#F5F5F5",d="#E0E0E0",p="#9E9E9E",h="#757575",m="#424242",g="#ffffff"},function(e,t,r){"use strict";function n(e){var t="".concat(Date.now()).slice(-8),r="".concat(Math.random()).slice(2),n=t+r;return e?"".concat(e,"_").concat(n):t+r}var o=r(17),a=r.n(o),i=r(1),s=r.n(i),c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s.a.isValidElement(e)?s.a.cloneElement(e,t):"function"==typeof e?e(t):null===e||["undefined","boolean"].includes(a()(e))?null:e};r.d(t,"a",function(){return n}),r.d(t,"b",function(){return c})},function(e,t,r){var n=r(3);e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(t){n(e,t,r[t])})}return e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t,r){var n=r(17),o=r(0);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?o(e):t}},function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(t)}e.exports=r},function(e,t,r){var n=r(21);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}},function(e,t,r){var n=r(24);e.exports=function(e,t){if(null==e)return{};var r,o,a=n(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}},function(e,r){e.exports=t},function(e,t,r){"use strict";(function(e){var n=r(25),o=r.n(n),a=r(29),i=r.n(a),s=r(1),c=r.n(s),u=r(30),l=r(20),f=r(26),d=(r(4),r(14),r(34)),p=function(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r},h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},g=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},v=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},w=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},k=function(e){return"object"===(void 0===e?"undefined":h(e))&&e.constructor===Object},C=Object.freeze([]),x=Object.freeze({});function O(e){return"function"==typeof e}function S(e){return e.displayName||e.name||"Component"}function E(e){return e&&"string"==typeof e.styledComponentId}var j=void 0!==e&&e.env.SC_ATTR||"data-styled",A="undefined"!=typeof window&&"HTMLElement"in window,I="boolean"==typeof SC_DISABLE_SPEEDY&&SC_DISABLE_SPEEDY||!1;var T=function(e){function t(r){m(this,t);for(var n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];var i=w(this,e.call(this,"An error occurred. See https://github.com/styled-components/styled-components/blob/master/src/utils/errors.md#"+r+" for more information. "+(o?"Additional arguments: "+o.join(", "):"")));return w(i)}return y(t,e),t}(Error),P=/^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm,R=function(e){var t=""+(e||""),r=[];return t.replace(P,function(e,t,n){return r.push({componentId:t,matchIndex:n}),e}),r.map(function(e,n){var o=e.componentId,a=e.matchIndex,i=r[n+1];return{componentId:o,cssFromDOM:i?t.slice(a,i.matchIndex):t.slice(a)}})},N=/^\s*\/\/.*$/gm,M=new o.a({global:!1,cascade:!0,keyframe:!1,prefix:!1,compress:!1,semicolon:!0}),_=new o.a({global:!1,cascade:!0,keyframe:!1,prefix:!0,compress:!1,semicolon:!1}),$=[],F=function(e){if(-2===e){var t=$;return $=[],t}},H=i()(function(e){$.push(e)}),L=void 0,z=void 0,D=void 0,B=function(e,t,r){return t>0&&-1!==r.slice(0,t).indexOf(z)&&r.slice(t-z.length,t)!==z?"."+L:e};_.use([function(e,t,r){2===e&&r.length&&r[0].lastIndexOf(z)>0&&(r[0]=r[0].replace(D,B))},H,F]),M.use([H,F]);function q(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&",o=e.join("").replace(N,""),a=t&&r?r+" "+t+" { "+o+" }":o;return L=n,z=t,D=new RegExp("\\"+z+"\\b","g"),_(r||!t?"":t,a)}var G=function(){return r.nc},U=function(e,t,r){r&&((e[t]||(e[t]=Object.create(null)))[r]=!0)},W=function(e,t){e[t]=Object.create(null)},Y=function(e){return function(t,r){return void 0!==e[t]&&e[t][r]}},V=function(e){var t="";for(var r in e)t+=Object.keys(e[r]).join(" ")+" ";return t.trim()},X=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets.length,r=0;r<t;r+=1){var n=document.styleSheets[r];if(n.ownerNode===e)return n}throw new T(10)},K=function(e,t,r){if(!t)return!1;var n=e.cssRules.length;try{e.insertRule(t,r<=n?r:n)}catch(e){return!1}return!0},Z=function(e){return"\n/* sc-component-id: "+e+" */\n"},J=function(e,t){for(var r=0,n=0;n<=t;n+=1)r+=e[n];return r},Q=function(e,t){return function(r){var n=G();return"<style "+[n&&'nonce="'+n+'"',j+'="'+V(t)+'"','data-styled-version="4.1.3"',r].filter(Boolean).join(" ")+">"+e()+"</style>"}},ee=function(e,t){return function(){var r,n=((r={})[j]=V(t),r["data-styled-version"]="4.1.3",r),o=G();return o&&(n.nonce=o),c.a.createElement("style",b({},n,{dangerouslySetInnerHTML:{__html:e()}}))}},te=function(e){return function(){return Object.keys(e)}},re=function(e){return document.createTextNode(Z(e))},ne=function e(t,r){var n=void 0===t?Object.create(null):t,o=void 0===r?Object.create(null):r,a=function(e){var t=o[e];return void 0!==t?t:o[e]=[""]},i=function(){var e="";for(var t in o){var r=o[t][0];r&&(e+=Z(t)+r)}return e};return{clone:function(){var t=function(e){var t=Object.create(null);for(var r in e)t[r]=b({},e[r]);return t}(n),r=Object.create(null);for(var a in o)r[a]=[o[a][0]];return e(t,r)},css:i,getIds:te(o),hasNameForId:Y(n),insertMarker:a,insertRules:function(e,t,r){a(e)[0]+=t.join(" "),U(n,e,r)},removeRules:function(e){var t=o[e];void 0!==t&&(t[0]="",W(n,e))},sealed:!1,styleTag:null,toElement:ee(i,n),toHTML:Q(i,n)}},oe=function(e,t,r,n,o){if(A&&!r){var a=function(e,t,r){var n=document.createElement("style");n.setAttribute(j,""),n.setAttribute("data-styled-version","4.1.3");var o=G();if(o&&n.setAttribute("nonce",o),n.appendChild(document.createTextNode("")),e&&!t)e.appendChild(n);else{if(!t||!e||!t.parentNode)throw new T(6);t.parentNode.insertBefore(n,r?t:t.nextSibling)}return n}(e,t,n);return I?function(e,t){var r=Object.create(null),n=Object.create(null),o=void 0!==t,a=!1,i=function(t){var o=n[t];return void 0!==o?o:(n[t]=re(t),e.appendChild(n[t]),r[t]=Object.create(null),n[t])},s=function(){var e="";for(var t in n)e+=n[t].data;return e};return{clone:function(){throw new T(5)},css:s,getIds:te(n),hasNameForId:Y(r),insertMarker:i,insertRules:function(e,n,s){for(var c=i(e),u=[],l=n.length,f=0;f<l;f+=1){var d=n[f],p=o;if(p&&-1!==d.indexOf("@import"))u.push(d);else{p=!1;var h=f===l-1?"":" ";c.appendData(""+d+h)}}U(r,e,s),o&&u.length>0&&(a=!0,t().insertRules(e+"-import",u))},removeRules:function(i){var s=n[i];if(void 0!==s){var c=re(i);e.replaceChild(c,s),n[i]=c,W(r,i),o&&a&&t().removeRules(i+"-import")}},sealed:!1,styleTag:e,toElement:ee(s,r),toHTML:Q(s,r)}}(a,o):function(e,t){var r=Object.create(null),n=Object.create(null),o=[],a=void 0!==t,i=!1,s=function(e){var t=n[e];return void 0!==t?t:(n[e]=o.length,o.push(0),W(r,e),n[e])},c=function(){var t=X(e).cssRules,r="";for(var a in n){r+=Z(a);for(var i=n[a],s=J(o,i),c=s-o[i];c<s;c+=1){var u=t[c];void 0!==u&&(r+=u.cssText)}}return r};return{clone:function(){throw new T(5)},css:c,getIds:te(n),hasNameForId:Y(r),insertMarker:s,insertRules:function(n,c,u){for(var l=s(n),f=X(e),d=J(o,l),p=0,h=[],m=c.length,g=0;g<m;g+=1){var b=c[g],y=a;y&&-1!==b.indexOf("@import")?h.push(b):K(f,b,d+p)&&(y=!1,p+=1)}a&&h.length>0&&(i=!0,t().insertRules(n+"-import",h)),o[l]+=p,U(r,n,u)},removeRules:function(s){var c=n[s];if(void 0!==c){var u=o[c];!function(e,t,r){for(var n=t-r,o=t;o>n;o-=1)e.deleteRule(o)}(X(e),J(o,c)-1,u),o[c]=0,W(r,s),a&&i&&t().removeRules(s+"-import")}},sealed:!1,styleTag:e,toElement:ee(c,r),toHTML:Q(c,r)}}(a,o)}return ne()},ae=/\s+/,ie=void 0;ie=A?I?40:1e3:-1;var se=0,ce=void 0,ue=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A?document.head:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];m(this,e),this.getImportRuleTag=function(){var e=t.importRuleTag;if(void 0!==e)return e;var r=t.tags[0];return t.importRuleTag=oe(t.target,r?r.styleTag:null,t.forceServer,!0)},se+=1,this.id=se,this.forceServer=n,this.target=n?null:r,this.tagMap={},this.deferred={},this.rehydratedNames={},this.ignoreRehydratedNames={},this.tags=[],this.capacity=1,this.clones=[]}return e.prototype.rehydrate=function(){if(!A||this.forceServer)return this;var e=[],t=[],r=!1,n=document.querySelectorAll("style["+j+'][data-styled-version="4.1.3"]'),o=n.length;if(!o)return this;for(var a=0;a<o;a+=1){var i=n[a];r||(r=!!i.getAttribute("data-styled-streamed"));for(var s,c=(i.getAttribute(j)||"").trim().split(ae),u=c.length,l=0;l<u;l+=1)s=c[l],this.rehydratedNames[s]=!0;t.push.apply(t,R(i.textContent)),e.push(i)}var f=t.length;if(!f)return this;var d=this.makeTag(null);!function(e,t,r){for(var n=0,o=r.length;n<o;n+=1){var a=r[n],i=a.componentId,s=a.cssFromDOM,c=M("",s);e.insertRules(i,c)}for(var u=0,l=t.length;u<l;u+=1){var f=t[u];f.parentNode&&f.parentNode.removeChild(f)}}(d,e,t),this.capacity=Math.max(1,ie-f),this.tags.push(d);for(var p=0;p<f;p+=1)this.tagMap[t[p].componentId]=d;return this},e.reset=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];ce=new e(void 0,t).rehydrate()},e.prototype.clone=function(){var t=new e(this.target,this.forceServer);return this.clones.push(t),t.tags=this.tags.map(function(e){for(var r=e.getIds(),n=e.clone(),o=0;o<r.length;o+=1)t.tagMap[r[o]]=n;return n}),t.rehydratedNames=b({},this.rehydratedNames),t.deferred=b({},this.deferred),t},e.prototype.sealAllTags=function(){this.capacity=1,this.tags.forEach(function(e){e.sealed=!0})},e.prototype.makeTag=function(e){var t=e?e.styleTag:null;return oe(this.target,t,this.forceServer,!1,this.getImportRuleTag)},e.prototype.getTagForId=function(e){var t=this.tagMap[e];if(void 0!==t&&!t.sealed)return t;var r=this.tags[this.tags.length-1];return this.capacity-=1,0===this.capacity&&(this.capacity=ie,r=this.makeTag(r),this.tags.push(r)),this.tagMap[e]=r},e.prototype.hasId=function(e){return void 0!==this.tagMap[e]},e.prototype.hasNameForId=function(e,t){if(void 0===this.ignoreRehydratedNames[e]&&this.rehydratedNames[t])return!0;var r=this.tagMap[e];return void 0!==r&&r.hasNameForId(e,t)},e.prototype.deferredInject=function(e,t){if(void 0===this.tagMap[e]){for(var r=this.clones,n=0;n<r.length;n+=1)r[n].deferredInject(e,t);this.getTagForId(e).insertMarker(e),this.deferred[e]=t}},e.prototype.inject=function(e,t,r){for(var n=this.clones,o=0;o<n.length;o+=1)n[o].inject(e,t,r);var a=this.getTagForId(e);if(void 0!==this.deferred[e]){var i=this.deferred[e].concat(t);a.insertRules(e,i,r),this.deferred[e]=void 0}else a.insertRules(e,t,r)},e.prototype.remove=function(e){var t=this.tagMap[e];if(void 0!==t){for(var r=this.clones,n=0;n<r.length;n+=1)r[n].remove(e);t.removeRules(e),this.ignoreRehydratedNames[e]=!0,this.deferred[e]=void 0}},e.prototype.toHTML=function(){return this.tags.map(function(e){return e.toHTML()}).join("")},e.prototype.toReactElements=function(){var e=this.id;return this.tags.map(function(t,r){var n="sc-"+e+"-"+r;return Object(s.cloneElement)(t.toElement(),{key:n})})},g(e,null,[{key:"master",get:function(){return ce||(ce=(new e).rehydrate())}},{key:"instance",get:function(){return e.master}}]),e}(),le=function(){function e(t,r){var n=this;m(this,e),this.inject=function(e){e.hasNameForId(n.id,n.name)||e.inject(n.id,n.rules,n.name)},this.toString=function(){throw new T(12,String(n.name))},this.name=t,this.rules=r,this.id="sc-keyframes-"+t}return e.prototype.getName=function(){return this.name},e}(),fe=/([A-Z])/g,de=/^ms-/;var pe=function(e){return null==e||!1===e||""===e},he=function e(t,r){var n=Object.keys(t).filter(function(e){return!pe(t[e])}).map(function(r){return k(t[r])?e(t[r],r):r.replace(fe,"-$1").toLowerCase().replace(de,"-ms-")+": "+(n=r,null==(o=t[r])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||n in u.a?String(o).trim():o+"px")+";";var n,o}).join(" ");return r?r+" {\n "+n+"\n}":n};function me(e,t,r){if(Array.isArray(e)){for(var n,o=[],a=0,i=e.length;a<i;a+=1)null!==(n=me(e[a],t,r))&&(Array.isArray(n)?o.push.apply(o,n):o.push(n));return o}if(pe(e))return null;if(E(e))return"."+e.styledComponentId;if(O(e)){if(t){var s=!1;try{Object(l.isElement)(new e(t))&&(s=!0)}catch(e){}if(s)throw new T(13,S(e));return me(e(t),t,r)}return e}return e instanceof le?r?(e.inject(r),e.getName()):e:k(e)?he(e):e.toString()}function ge(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return O(e)||k(e)?me(p(C,[e].concat(r))):me(p(e,r))}function be(e){for(var t,r=0|e.length,n=0|r,o=0;r>=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+((1540483477*(n>>>16)&65535)<<16)}return((n=1540483477*(65535&(n^=n>>>13))+((1540483477*(n>>>16)&65535)<<16))^n>>>15)>>>0}var ye=52,ve=function(e){return String.fromCharCode(e+(e>25?39:97))};function we(e){var t="",r=void 0;for(r=e;r>ye;r=Math.floor(r/ye))t=ve(r%ye)+t;return ve(r%ye)+t}function ke(e,t){for(var r=0;r<e.length;r+=1){var n=e[r];if(Array.isArray(n)&&!ke(n,t))return!1;if(O(n)&&!E(n))return!1}return!t.some(function(e){return O(e)||function(e){for(var t in e)if(O(e[t]))return!0;return!1}(e)})}var Ce,xe=!1,Oe=function(e){return we(be(e))},Se=function(){function e(t,r,n){m(this,e),this.rules=t,this.isStatic=!xe&&ke(t,r),this.componentId=n,ue.master.hasId(n)||ue.master.deferredInject(n,[])}return e.prototype.generateAndInjectStyles=function(e,t){var r=this.isStatic,n=this.componentId,o=this.lastClassName;if(A&&r&&"string"==typeof o&&t.hasNameForId(n,o))return o;var a=me(this.rules,e,t),i=Oe(this.componentId+a.join(""));return t.hasNameForId(n,i)||t.inject(this.componentId,q(a,"."+i,void 0,n),i),this.lastClassName=i,i},e.generateName=function(e){return Oe(e)},e}(),Ee=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x,n=!!r&&e.theme===r.theme;return e.theme&&!n?e.theme:t||r.theme},je=/[[\].#*$><+~=|^:(),"'`-]+/g,Ae=/(^-|-$)/g;function Ie(e){return e.replace(je,"-").replace(Ae,"")}function Te(e){return"string"==typeof e&&!0}var Pe={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},Re={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ne=((Ce={})[l.ForwardRef]={$$typeof:!0,render:!0},Ce),Me=Object.defineProperty,_e=Object.getOwnPropertyNames,$e=Object.getOwnPropertySymbols,Fe=void 0===$e?function(){return[]}:$e,He=Object.getOwnPropertyDescriptor,Le=Object.getPrototypeOf,ze=Object.prototype,De=Array.prototype;function Be(e,t,r){if("string"!=typeof t){var n=Le(t);n&&n!==ze&&Be(e,n,r);for(var o=De.concat(_e(t),Fe(t)),a=Ne[e.$$typeof]||Pe,i=Ne[t.$$typeof]||Pe,s=o.length,c=void 0,u=void 0;s--;)if(u=o[s],!(Re[u]||r&&r[u]||i&&i[u]||a&&a[u])&&(c=He(t,u)))try{Me(e,u,c)}catch(e){}return e}return e}var qe=Object(s.createContext)(),Ge=qe.Consumer,Ue=(function(e){function t(r){m(this,t);var n=w(this,e.call(this,r));return n.getContext=Object(f.a)(n.getContext.bind(n)),n.renderInner=n.renderInner.bind(n),n}y(t,e),t.prototype.render=function(){return this.props.children?c.a.createElement(qe.Consumer,null,this.renderInner):null},t.prototype.renderInner=function(e){var t=this.getContext(this.props.theme,e);return c.a.createElement(qe.Provider,{value:t},c.a.Children.only(this.props.children))},t.prototype.getTheme=function(e,t){if(O(e))return e(t);if(null===e||Array.isArray(e)||"object"!==(void 0===e?"undefined":h(e)))throw new T(8);return b({},t,e)},t.prototype.getContext=function(e,t){return this.getTheme(e,t)}}(s.Component),function(){function e(){m(this,e),this.masterSheet=ue.master,this.instance=this.masterSheet.clone(),this.sealed=!1}e.prototype.seal=function(){if(!this.sealed){var e=this.masterSheet.clones.indexOf(this.instance);this.masterSheet.clones.splice(e,1),this.sealed=!0}},e.prototype.collectStyles=function(e){if(this.sealed)throw new T(2);return c.a.createElement(Ye,{sheet:this.instance},e)},e.prototype.getStyleTags=function(){return this.seal(),this.instance.toHTML()},e.prototype.getStyleElement=function(){return this.seal(),this.instance.toReactElements()},e.prototype.interleaveWithNodeStream=function(e){throw new T(3)}}(),Object(s.createContext)()),We=Ue.Consumer,Ye=function(e){function t(r){m(this,t);var n=w(this,e.call(this,r));return n.getContext=Object(f.a)(n.getContext),n}return y(t,e),t.prototype.getContext=function(e,t){if(e)return e;if(t)return new ue(t);throw new T(4)},t.prototype.render=function(){var e=this.props,t=e.children,r=e.sheet,n=e.target;return c.a.createElement(Ue.Provider,{value:this.getContext(r,n)},t)},t}(s.Component),Ve=(new Set,{});var Xe=function(e){function t(){m(this,t);var r=w(this,e.call(this));return r.attrs={},r.renderOuter=r.renderOuter.bind(r),r.renderInner=r.renderInner.bind(r),r}return y(t,e),t.prototype.render=function(){return c.a.createElement(We,null,this.renderOuter)},t.prototype.renderOuter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ue.master;return this.styleSheet=e,this.props.forwardedComponent.componentStyle.isStatic?this.renderInner():c.a.createElement(Ge,null,this.renderInner)},t.prototype.renderInner=function(e){var t=this.props.forwardedComponent,r=t.componentStyle,n=t.defaultProps,o=(t.displayName,t.foldedComponentIds),a=t.styledComponentId,i=t.target,c=void 0;c=r.isStatic?this.generateAndInjectStyles(x,this.props):void 0!==e?this.generateAndInjectStyles(Ee(this.props,e,n),this.props):this.generateAndInjectStyles(this.props.theme||x,this.props);var u=this.props.as||this.attrs.as||i,l=Te(u),f={},p=b({},this.attrs,this.props),h=void 0;for(h in p)"forwardedComponent"!==h&&"as"!==h&&("forwardedRef"===h?f.ref=p[h]:l&&!Object(d.a)(h)||(f[h]=p[h]));return this.props.style&&this.attrs.style&&(f.style=b({},this.attrs.style,this.props.style)),f.className=Array.prototype.concat(o,this.props.className,a,this.attrs.className,c).filter(Boolean).join(" "),Object(s.createElement)(u,f)},t.prototype.buildExecutionContext=function(e,t,r){var n=this,o=b({},t,{theme:e});return r.length?(this.attrs={},r.forEach(function(e){var t,r=e,a=!1,i=void 0,s=void 0;for(s in O(r)&&(r=r(o),a=!0),r)i=r[s],a||!O(i)||(t=i)&&t.prototype&&t.prototype.isReactComponent||E(i)||(i=i(o)),n.attrs[s]=i,o[s]=i}),o):o},t.prototype.generateAndInjectStyles=function(e,t){var r=t.forwardedComponent,n=r.attrs,o=r.componentStyle;r.warnTooManyClasses;return o.isStatic&&!n.length?o.generateAndInjectStyles(x,this.styleSheet):o.generateAndInjectStyles(this.buildExecutionContext(e,t,n),this.styleSheet)},t}(s.Component);function Ke(e,t,r){var n=E(e),o=!Te(e),a=t.displayName,i=void 0===a?function(e){return Te(e)?"styled."+e:"Styled("+S(e)+")"}(e):a,s=t.componentId,u=void 0===s?function(e,t,r){var n="string"!=typeof t?"sc":Ie(t),o=(Ve[n]||0)+1;Ve[n]=o;var a=n+"-"+e.generateName(n+o);return r?r+"-"+a:a}(Se,t.displayName,t.parentComponentId):s,l=t.ParentComponent,f=void 0===l?Xe:l,d=t.attrs,p=void 0===d?C:d,h=t.displayName&&t.componentId?Ie(t.displayName)+"-"+t.componentId:t.componentId||u,m=n&&e.attrs?Array.prototype.concat(e.attrs,p).filter(Boolean):p,g=new Se(n?e.componentStyle.rules.concat(r):r,m,h),y=c.a.forwardRef(function(e,t){return c.a.createElement(f,b({},e,{forwardedComponent:y,forwardedRef:t}))});return y.attrs=m,y.componentStyle=g,y.displayName=i,y.foldedComponentIds=n?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):C,y.styledComponentId=h,y.target=n?e.target:e,y.withComponent=function(e){var n=t.componentId,o=v(t,["componentId"]),a=n&&n+"-"+(Te(e)?e:Ie(S(e)));return Ke(e,b({},o,{attrs:m,componentId:a,ParentComponent:f}),r)},y.toString=function(){return"."+y.styledComponentId},o&&Be(y,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,styledComponentId:!0,target:!0,withComponent:!0}),y}var Ze=function(e){return function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x;if(!Object(l.isValidElementType)(r))throw new T(1,String(r));var o=function(){return t(r,n,ge.apply(void 0,arguments))};return o.withConfig=function(o){return e(t,r,b({},n,o))},o.attrs=function(o){return e(t,r,b({},n,{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}))},o}(Ke,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){Ze[e]=Ze(e)});!function(){function e(t,r){m(this,e),this.rules=t,this.componentId=r,this.isStatic=ke(t,C),ue.master.hasId(r)||ue.master.deferredInject(r,[])}e.prototype.createStyles=function(e,t){var r=q(me(this.rules,e,t),"");t.inject(this.componentId,r)},e.prototype.removeStyles=function(e){var t=this.componentId;e.hasId(t)&&e.remove(t)},e.prototype.renderStyles=function(e,t){this.removeStyles(t),this.createStyles(e,t)}}();A&&(window.scCGSHMRCache={});t.a=Ze}).call(this,r(28))},function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,"a",function(){return O}),r.d(t,"b",function(){return N});function o(e){return Math.round(255*e)}function a(e,t,r){return o(e)+","+o(t)+","+o(r)}function i(e,t,r,n){if(void 0===n&&(n=a),0===t)return n(r,r,r);var o=e%360/60,i=(1-Math.abs(2*r-1))*t,s=i*(1-Math.abs(o%2-1)),c=0,u=0,l=0;o>=0&&o<1?(c=i,u=s):o>=1&&o<2?(c=s,u=i):o>=2&&o<3?(u=i,l=s):o>=3&&o<4?(u=s,l=i):o>=4&&o<5?(c=s,l=i):o>=5&&o<6&&(c=i,l=s);var f=r-i/2;return n(c+f,u+f,l+f)}var s={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var c=/^#[a-fA-F0-9]{6}$/,u=/^#[a-fA-F0-9]{8}$/,l=/^#[a-fA-F0-9]{3}$/,f=/^#[a-fA-F0-9]{4}$/,d=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,p=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/,h=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/,m=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/;function g(e){if("string"!=typeof e)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return s[t]?"#"+s[t]:e}(e);if(t.match(c))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(u)){var r=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:r}}if(t.match(l))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(f)){var n=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:n}}var o=d.exec(t);if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10)};var a=p.exec(t);if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10),alpha:parseFloat(""+a[4])};var g=h.exec(t);if(g){var b="rgb("+i(parseInt(""+g[1],10),parseInt(""+g[2],10)/100,parseInt(""+g[3],10)/100)+")",y=d.exec(b);if(!y)throw new Error("Couldn't generate valid rgb string from "+t+", it returned "+b+".");return{red:parseInt(""+y[1],10),green:parseInt(""+y[2],10),blue:parseInt(""+y[3],10)}}var v=m.exec(t);if(v){var w="rgb("+i(parseInt(""+v[1],10),parseInt(""+v[2],10)/100,parseInt(""+v[3],10)/100)+")",k=d.exec(w);if(!k)throw new Error("Couldn't generate valid rgb string from "+t+", it returned "+w+".");return{red:parseInt(""+k[1],10),green:parseInt(""+k[2],10),blue:parseInt(""+k[3],10),alpha:parseFloat(""+v[4])}}throw new Error("Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.")}function b(e){return function(e){var t,r=e.red/255,n=e.green/255,o=e.blue/255,a=Math.max(r,n,o),i=Math.min(r,n,o),s=(a+i)/2;if(a===i)return void 0!==e.alpha?{hue:0,saturation:0,lightness:s,alpha:e.alpha}:{hue:0,saturation:0,lightness:s};var c=a-i,u=s>.5?c/(2-a-i):c/(a+i);switch(a){case r:t=(n-o)/c+(n<o?6:0);break;case n:t=(o-r)/c+2;break;default:t=(r-n)/c+4}return t*=60,void 0!==e.alpha?{hue:t,saturation:u,lightness:s,alpha:e.alpha}:{hue:t,saturation:u,lightness:s}}(g(e))}var y=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function v(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function w(e){return v(Math.round(255*e))}function k(e,t,r){return y("#"+w(e)+w(t)+w(r))}function C(e,t,r){return i(e,t,r,k)}function x(e,t,r){if("number"==typeof e&&"number"==typeof t&&"number"==typeof r)return y("#"+v(e)+v(t)+v(r));if("object"==typeof e&&void 0===t&&void 0===r)return y("#"+v(e.red)+v(e.green)+v(e.blue));throw new Error("Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).")}function O(e,t,r,n){if("string"==typeof e&&"number"==typeof t){var o=g(e);return"rgba("+o.red+","+o.green+","+o.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof r&&"number"==typeof n)return n>=1?x(e,t,r):"rgba("+e+","+t+","+r+","+n+")";if("object"==typeof e&&void 0===t&&void 0===r&&void 0===n)return e.alpha>=1?x(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new Error("Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).")}var S=function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&("number"!=typeof e.alpha||void 0===e.alpha)},E=function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"==typeof e.alpha},j=function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&("number"!=typeof e.alpha||void 0===e.alpha)},A=function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha},I="Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.";function T(e){if("object"!=typeof e)throw new Error(I);if(E(e))return O(e);if(S(e))return x(e);if(A(e))return function(e,t,r,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof r&&"number"==typeof n)return n>=1?C(e,t,r):"rgba("+i(e,t,r)+","+n+")";if("object"==typeof e&&void 0===t&&void 0===r&&void 0===n)return e.alpha>=1?C(e.hue,e.saturation,e.lightness):"rgba("+i(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new Error("Passed invalid arguments to hsla, please pass multiple numbers e.g. hsl(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).")}(e);if(j(e))return function(e,t,r){if("number"==typeof e&&"number"==typeof t&&"number"==typeof r)return C(e,t,r);if("object"==typeof e&&void 0===t&&void 0===r)return C(e.hue,e.saturation,e.lightness);throw new Error("Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).")}(e);throw new Error(I)}function P(e){return function e(t,r,n){return function(){var o=n.concat(Array.prototype.slice.call(arguments));return o.length>=r?t.apply(this,o):e(t,r,o)}}(e,e.length,[])}function R(e,t){return T(n({},b(t),{saturation:parseFloat(e)}))}var N=P(R)},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(t){return"function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(t)}e.exports=n},function(e,t,r){"use strict";r.d(t,"a",function(){return i});var n=r(15),o=r(2),a=r(5),i=n.a.div.withConfig({displayName:"sharedStyles__Base",componentId:"sc-1k4k4c0-0"})([".bt-toast &{font-family:Arial,Helvetica,sans-serif;display:flex;font-size:11px;line-height:14px;position:relative;box-sizing:border-box;box-shadow:0 3px 15px ",";transition:box-shadow .3s;overflow:hidden;z-index:1;> span{flex:1;padding:10px ","px 10px ","px;}.btn-dismiss{z-index:3;}&:hover{box-shadow:0 3px 20px ",";}@keyframes showIcon{"," 60%{transform:opacity:1;}100%{transform:translateY(0);opacity:1;}}.bt-icon{top:0;bottom:0;left:0;width:50px;display:flex;flex-direction:column;justify-content:center;align-items:center;position:absolute;animation:showIcon .4s ease 0s forwards;}}"],a.e,function(e){return e.dismissible?"45":"10"},function(e){return e.hasIcon?"50":"10"},a.f,function(e){var t=e.trayPosition,r=(void 0===t?{}:t).vertical===o.a?"":"-";return"0% { transform: translateY(".concat(r,"100%); opacity: 0;}")})},function(e,t,r){"use strict";r.r(t);var n=r(7),o=r.n(n),a=r(8),i=r.n(a),s=r(9),c=r.n(s),u=r(10),l=r.n(u),f=r(11),d=r.n(f),p=r(12),h=r.n(p),m=r(0),g=r.n(m),b=r(3),y=r.n(b),v=r(1),w=r.n(v),k=r(14),C=r.n(k),x=r(4),O=r.n(x),S=r(6),E=r(2),j=r(13),A=r.n(j),I={position:"relative",padding:0,margin:0,listStyleType:"none"},T=function(e){var t=e.shown,r=e.removed,n={opacity:0,transition:"opacity .5s"};return t&&Object.assign(n,{opacity:1,transform:"scale(1)"}),r&&Object.assign(n,{transform:"scale(.9)",transition:"opacity .3s, transform .3s"}),n},P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.sticky||e.timeout===1/0},R=function(e,t){var r="number"==typeof e?e:t;return r<200?200+r:r},N=function(e){function t(){var e,r;i()(this,t);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return r=l()(this,(e=d()(t)).call.apply(e,[this].concat(o))),y()(g()(g()(r)),"state",{shown:!1}),y()(g()(g()(r)),"createRef",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{addEventListener:function(){return null}};r.toastRef=e}),y()(g()(g()(r)),"open",function(){return r.setState({isOpen:!0},r.toastDidOpen)}),y()(g()(g()(r)),"startTimeout",function(){var e=r.props.toast;if(!P(e)){var t=R(r.remaining,e.timeout);r.clearTimeout(),r.timeout=setTimeout(r.close,t),r.ends=Date.now()+t,r.remaining=void 0}}),y()(g()(g()(r)),"clearTimeout",function(){P(r.props.toast)||(r.remaining=r.calcRemaining(),clearTimeout(r.timeout))}),y()(g()(g()(r)),"calcRemaining",function(){return r.ends-Date.now()}),y()(g()(g()(r)),"close",function(){if(!r.state.removed){var e=r.toastRef;r.clearTimeout();r.setState({shown:!1,removed:!0},function(){e.addEventListener("transitionend",function t(n){n.target===e&&(e.removeEventListener(n.type,t),r.setState({isOpen:!1},r.props.remove))})})}}),r}return h()(t,e),c()(t,[{key:"componentDidMount",value:function(){setTimeout(this.open)}},{key:"componentWillUnmount",value:function(){this.clearTimeout()}},{key:"toastDidOpen",value:function(){var e=this,t=this.toastRef,r=this.props,n=r.setHeight,o=r.toast;setTimeout(function(){e.setState({shown:!0},function(){n(o.id,t.clientHeight),e.startTimeout()})})}},{key:"render",value:function(){var e=this,t=this.props,r=t.dismiss,n=t.toast,a=t.pauseOnHover,i=t.position,s=A()(t,["dismiss","toast","pauseOnHover","position"]),c=this.state,u=c.shown,l=c.removed;return w.a.createElement("div",{ref:this.createRef,onMouseEnter:function(){return a&&e.clearTimeout()},onMouseLeave:function(){return a&&e.startTimeout()},style:T({shown:u,removed:l}),className:this.className},Object(S.b)(n.content,o()({toastId:n.id,dismiss:this.dismiss,onClick:n.onClick?function(e){return n.onClick(e,n,r)}:void 0,calcRemaining:this.calcRemaining,trayPosition:i},s)))}},{key:"className",get:function(){var e=this;return["shown","removed"].reduce(function(t,r){return e.state[r]?"".concat(t," ").concat(r):t},"bt-toast")}},{key:"dismiss",get:function(){var e=this.props,t=e.toast,r=e.dismiss;return"function"==typeof t.dismiss?function(e){return t.dismiss(e,t,r)}:r}}]),t}(v.Component),M=N;N.defaultProps={pauseOnHover:!0,toast:{}};var _=function(e){function t(e){var r;return i()(this,t),r=l()(this,d()(t).call(this,e)),y()(g()(g()(r)),"state",{toasts:[]}),y()(g()(g()(r)),"id",Object(S.a)("tray")),y()(g()(g()(r)),"toasts",{}),y()(g()(g()(r)),"createToastRef",function(e,t){e&&(t?r.toasts[e]=t:delete r.toasts[e])}),y()(g()(g()(r)),"push",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.props.timeout;r.setState(function(r){var n=Object.assign({},r);return n.toasts=[o()({timeout:t},e)].concat(n.toasts),n})}),y()(g()(g()(r)),"remove",function(e){r.setState(function(t){var r=Object.assign({},t);return r.toasts=r.toasts.filter(function(t){return t.id!==e}),r})}),y()(g()(g()(r)),"dismiss",function(e){r.toasts[e]&&r.toasts[e].close&&r.toasts[e].close()}),y()(g()(g()(r)),"dismissAll",function(){for(var e in r.toasts)r.dismiss(e)}),y()(g()(g()(r)),"setHeight",function(e,t){r.setState(function(r){var n=Object.assign({},r),o=n.toasts.findIndex(function(t){return t.id===e});return n.toasts[o].height=t,n})}),r.onButterToast=r.onButterToast.bind(g()(g()(r))),r}return h()(t,e),c()(t,[{key:"componentDidMount",value:function(){window.addEventListener($,this.onButterToast)}},{key:"componentWillUnmount",value:function(){window.removeEventListener($,this.onButterToast)}},{key:"onButterToast",value:function(){var e=this,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).detail,r=t.namespace,n=t.dismissBy,o=A()(t,["namespace","dismissBy"]);if(!r||r===this.props.namespace)return n?void("all"===n?this.dismissAll():this.dismiss(n)):setTimeout(function(){return e.push(o)})}},{key:"render",value:function(){var e=this,t=this.state.toasts,r=this.props,n=r.position,o=r.spacing,a=0;return w.a.createElement("ul",{style:I},t.map(function(t,r){if(!t)return null;var i,s=t.height||0;i=a,a+=s+o,n&&n.vertical===E.a&&(i=-i-s);var c=function(e){var t,r=e.position,n=void 0===r?{vertical:E.e,horizontal:E.b}:r,o=e.spacing,a=e.offset,i=e.height,s=e.index,c={position:"absolute",transition:"transform .3s",transitionDelay:"".concat(.02*(void 0===s?0:s),"s")};switch(t=0!==a||i||n.vertical!==E.e?"translateY(".concat(a,"px)"):"translateY(-100%)",n.horizontal){case E.d:c.right="".concat(o,"px"),c.transform=t;break;case E.b:c.transform="translateX(-50%) ".concat(t);break;default:c.left="".concat(o,"px"),c.transform=t}return c}({offset:i,spacing:o,position:n,height:t.height,index:r});return w.a.createElement("li",{key:t.id,style:c},w.a.createElement(M,{dismiss:function(){return e.dismiss(t.id)},remove:function(){return e.remove(t.id)},setHeight:e.setHeight,position:n,ref:function(r){return e.createToastRef(t.id,r)},toast:t}))}))}}]),t}(v.Component);r.d(t,"CUSTOM_EVENT_NAME",function(){return $}),r.d(t,"POS_TOP",function(){return E.e}),r.d(t,"POS_BOTTOM",function(){return E.a}),r.d(t,"POS_LEFT",function(){return E.c}),r.d(t,"POS_RIGHT",function(){return E.d}),r.d(t,"POS_CENTER",function(){return E.b});var $="ButterToast";function F(e){var t,r=Object.assign({namespace:""},e);"function"==typeof window.CustomEvent?t=new CustomEvent($,{detail:r}):(t=document.createEvent("CustomEvent")).initCustomEvent($,!1,!1,r),window.dispatchEvent(t)}var H=function(e){function t(){var e,r;i()(this,t);for(var n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];return r=l()(this,(e=d()(t)).call.apply(e,[this].concat(a))),y()(g()(g()(r)),"raise",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(S.a)();return r.tray.push(o()({id:t},e)),t}),y()(g()(g()(r)),"dismiss",function(e){return r.tray.push(e)}),y()(g()(g()(r)),"dismissAll",function(){return r.tray.dismissAll()}),y()(g()(g()(r)),"createTrayRef",function(e){window._btTrays=window._btTrays||{},e&&(r.id=e.id,r.tray=e,window._btTrays[e.id]=e)}),r}return h()(t,e),c()(t,[{key:"componentDidMount",value:function(){if(!this.props.renderInContext){var e=this.props,t=e.position,r=e.timeout,n=e.spacing,o=e.namespace,a=e.style,i=Object(E.f)(t,n);this.root=document.createElement("aside"),this.root.setAttribute("class",this.className),Object.assign(this.root.style,i,a),document.body.appendChild(this.root),C.a.render(w.a.createElement(_,{ref:this.createTrayRef,namespace:o,spacing:n,timeout:r,position:t}),this.root)}}},{key:"componentWillUnmount",value:function(){this.root&&(delete window._btTrays[this.id],C.a.unmountComponentAtNode(this.root),this.root.parentNode.removeChild(this.root),delete this.root)}},{key:"render",value:function(){var e=this.props,t=e.renderInContext,r=e.timeout,n=e.spacing,o=e.namespace,a=e.position,i=e.style;return t?w.a.createElement("aside",{className:this.className,style:i},w.a.createElement(_,{ref:this.createTrayRef,position:a,namespace:o,spacing:n,timeout:r})):null}},{key:"className",get:function(){var e=this.props;return[e.className,e.namespace,"butter-toast"].filter(Boolean).join(" ")}}],[{key:"raise",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(S.a)();return F(o()({id:t},e)),t}},{key:"dismiss",value:function(e){F({dismissBy:e})}},{key:"dismissAll",value:function(e){F({dismissBy:"all"})}}]),t}(v.Component);H.propTypes={renderInContext:O.a.bool,className:O.a.string,namespace:O.a.string,position:O.a.shape({vertical:O.a.oneOf([E.e,E.a]),horizontal:O.a.oneOf([E.c,E.d,E.b])}),timout:O.a.number,spacing:O.a.number},H.defaultProps={className:"",namespace:"",position:{vertical:E.e,horizontal:E.d},timeout:6e3,spacing:10};t.default=H},function(e,t,r){"use strict";e.exports=r(36)},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(t,n)}e.exports=r},function(e,t,r){"use strict";var n=r(23);function o(){}e.exports=function(){function e(e,t,r,o,a,i){if(i!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return r.checkPropTypes=o,r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}},function(e,t,r){e.exports=function e(t){"use strict";var r=/^\0+/g,n=/[\0\r\f]/g,o=/: */g,a=/zoo|gra/,i=/([,: ])(transform)/g,s=/,+\s*(?![^(]*[)])/g,c=/ +\s*(?![^(]*[)])/g,u=/ *[\0] */g,l=/,\r+?/g,f=/([\t\r\n ])*\f?&/g,d=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,p=/\W+/g,h=/@(k\w+)\s*(\S*)\s*/,m=/::(place)/g,g=/:(read-only)/g,b=/\s+(?=[{\];=:>])/g,y=/([[}=:>])\s+/g,v=/(\{[^{]+?);(?=\})/g,w=/\s{2,}/g,k=/([^\(])(:+) */g,C=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,O=/([\s\S]*?);/g,S=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,j=/stretch|:\s*\w+\-(?:conte|avail)/,A=/([^-])(image-set\()/,I="-webkit-",T="-moz-",P="-ms-",R=59,N=125,M=123,_=40,$=41,F=91,H=93,L=10,z=13,D=9,B=64,q=32,G=38,U=45,W=95,Y=42,V=44,X=58,K=39,Z=34,J=47,Q=62,ee=43,te=126,re=0,ne=12,oe=11,ae=107,ie=109,se=115,ce=112,ue=111,le=105,fe=99,de=100,pe=112,he=1,me=1,ge=0,be=1,ye=1,ve=1,we=0,ke=0,Ce=0,xe=[],Oe=[],Se=0,Ee=null,je=-2,Ae=-1,Ie=0,Te=1,Pe=2,Re=3,Ne=0,Me=1,_e="",$e="",Fe="";function He(e,t,o,a,i){for(var s,c,l=0,f=0,d=0,p=0,b=0,y=0,v=0,w=0,C=0,O=0,S=0,E=0,j=0,A=0,W=0,we=0,Oe=0,Ee=0,je=0,Ae=o.length,ze=Ae-1,We="",Ye="",Ve="",Xe="",Ke="",Ze="";W<Ae;){if(v=o.charCodeAt(W),W===ze&&f+p+d+l!==0&&(0!==f&&(v=f===J?L:J),p=d=l=0,Ae++,ze++),f+p+d+l===0){if(W===ze&&(we>0&&(Ye=Ye.replace(n,"")),Ye.trim().length>0)){switch(v){case q:case D:case R:case z:case L:break;default:Ye+=o.charAt(W)}v=R}if(1===Oe)switch(v){case M:case N:case R:case Z:case K:case _:case $:case V:Oe=0;case D:case z:case L:case q:break;default:for(Oe=0,je=W,b=v,W--,v=R;je<Ae;)switch(o.charCodeAt(je++)){case L:case z:case R:++W,v=b,je=Ae;break;case X:we>0&&(++W,v=b);case M:je=Ae}}switch(v){case M:for(b=(Ye=Ye.trim()).charCodeAt(0),S=1,je=++W;W<Ae;){switch(v=o.charCodeAt(W)){case M:S++;break;case N:S--;break;case J:switch(y=o.charCodeAt(W+1)){case Y:case J:W=Ue(y,W,ze,o)}break;case F:v++;case _:v++;case Z:case K:for(;W++<ze&&o.charCodeAt(W)!==v;);}if(0===S)break;W++}switch(Ve=o.substring(je,W),b===re&&(b=(Ye=Ye.replace(r,"").trim()).charCodeAt(0)),b){case B:switch(we>0&&(Ye=Ye.replace(n,"")),y=Ye.charCodeAt(1)){case de:case ie:case se:case U:s=t;break;default:s=xe}if(je=(Ve=He(t,s,Ve,y,i+1)).length,Ce>0&&0===je&&(je=Ye.length),Se>0&&(s=Le(xe,Ye,Ee),c=Ge(Re,Ve,s,t,me,he,je,y,i,a),Ye=s.join(""),void 0!==c&&0===(je=(Ve=c.trim()).length)&&(y=0,Ve="")),je>0)switch(y){case se:Ye=Ye.replace(x,qe);case de:case ie:case U:Ve=Ye+"{"+Ve+"}";break;case ae:Ve=(Ye=Ye.replace(h,"$1 $2"+(Me>0?_e:"")))+"{"+Ve+"}",Ve=1===ye||2===ye&&Be("@"+Ve,3)?"@"+I+Ve+"@"+Ve:"@"+Ve;break;default:Ve=Ye+Ve,a===pe&&(Xe+=Ve,Ve="")}else Ve="";break;default:Ve=He(t,Le(t,Ye,Ee),Ve,a,i+1)}Ke+=Ve,E=0,Oe=0,A=0,we=0,Ee=0,j=0,Ye="",Ve="",v=o.charCodeAt(++W);break;case N:case R:if((je=(Ye=(we>0?Ye.replace(n,""):Ye).trim()).length)>1)switch(0===A&&((b=Ye.charCodeAt(0))===U||b>96&&b<123)&&(je