customizable-toast-notification 3.9.3 → 3.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.mjs +4 -4
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/index.cjs +0 -16
- package/dist/index.cjs.map +0 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Customizable Toast Notifications 3.9.
|
|
3
|
-
* Build: 2025-09-
|
|
4
|
-
* Cache-Buster:
|
|
2
|
+
* Customizable Toast Notifications 3.9.4
|
|
3
|
+
* Build: 2025-09-24 04:35:21
|
|
4
|
+
* Cache-Buster: 1758688521619
|
|
5
5
|
* Author: Priyanshu Patel
|
|
6
6
|
* Email: [priyanshu.alt191@gmail.com](mailto:priyanshu.alt191@gmail.com)
|
|
7
7
|
* License: Apache-2.0
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
*/
|
|
15
15
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).customizableToast={})}(this,function(t){"use strict";function e(t,e,n,r,o,a,i){try{var s=t[a](i),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function n(t){return function(){var n=this,r=arguments;return new Promise(function(o,a){var i=t.apply(n,r);function s(t){e(i,o,a,s,u,"next",t)}function u(t){e(i,o,a,s,u,"throw",t)}s(void 0)})}}function r(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){r(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function i(){
|
|
16
16
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
17
|
-
var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var i=r&&r.prototype instanceof c?r:c,l=Object.create(i.prototype);return s(l,"_invoke",function(n,r,o){var a,i,s,c=0,l=o||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return a=e,i=0,s=t,p.n=n,u}};function d(n,r){for(i=n,s=r,e=0;!f&&c&&!o&&e<l.length;e++){var o,a=l[e],d=p.p,h=a[2];n>3?(o=h===r)&&(s=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=t):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,p.v=r,p.n=a[1]):d<h&&(o=n<3||a[0]>r||r>h)&&(a[4]=n,a[5]=r,p.n=h,i=0))}if(o||n>1)return u;throw f=!0,r}return function(o,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),i=l,s=h;(e=i<2?t:s)||!f;){a||(i?i<3?(i>1&&(p.n=-1),d(i,s)):p.n=s:p.v=s);try{if(c=2,a){if(i||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,i<2&&(i=0)}else 1===i&&(e=a.return)&&e.call(a),i<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=t}else if((e=(f=p.n<0)?s:n.call(r,p))!==u)break}catch(e){a=t,i=1,s=e}finally{c=1}}return{value:e,done:f}}}(n,o,a),!0),l}var u={};function c(){}function l(){}function f(){}e=Object.getPrototypeOf;var p=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),d=f.prototype=c.prototype=Object.create(p);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,s(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return l.prototype=f,s(d,"constructor",f),s(f,"constructor",l),l.displayName="GeneratorFunction",s(f,o,"GeneratorFunction"),s(d),s(d,o,"Generator"),s(d,r,function(){return this}),s(d,"toString",function(){return"[object Generator]"}),(i=function(){return{w:a,m:h}})()}function s(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}s=function(t,e,n,r){function a(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},s(t,e,n,r)}function u(t){return c.apply(this,arguments)}function c(){return(c=n(i().m(function t(e){return i().w(function(t){for(;;)if(0===t.n)return t.a(2,"".concat(e,"-").concat(Date.now(),"-").concat(Math.floor(1e5*Math.random())))},t)}))).apply(this,arguments)}function l(t,e){return f.apply(this,arguments)}function f(){return(f=n(i().m(function t(e,n){var r,o,a;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,e&&n){t.n=1;break}throw new Error("tagName and prefix is required");case 1:return r=document.createElement(e),t.n=2,u(n);case 2:return r.id=t.v,t.a(2,r);case 3:return t.p=3,t.v,t.p=4,o="div",a=document.createElement(o),t.n=5,u("fallback");case 5:return a.id=t.v,a.setAttribute("data-original-tag",o),t.a(2,a);case 6:t.p=6,t.v;case 7:return t.a(2)}},t,null,[[4,6],[0,3]])}))).apply(this,arguments)}function p(t){return d.apply(this,arguments)}function d(){return(d=n(i().m(function t(e){var n;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e){t.n=1;break}return t.a(2,!0);case 1:if(t.p=1,null==e||null===(n=e.parentNode)||void 0===n||!n.id.includes("toast-container-")){t.n=2;break}return e.parentNode.removeChild(e),t.a(2,!0);case 2:case 5:t.n=9;break;case 3:if(t.p=3,t.v,t.p=4,!e.remove){t.n=5;break}return e.remove(),t.a(2,!0);case 6:return t.p=6,t.v,t.p=7,e.style.display="none",e.style.opacity="0",e.style.pointerEvents="none",e.style.position="absolute",e.style.left="-9999px",t.a(2,!0);case 8:return t.p=8,t.v,t.a(2,!1);case 9:return t.a(2,!0)}},t,null,[[7,8],[4,6],[1,3]])}))).apply(this,arguments)}function h(t){return m.apply(this,arguments)}function m(){return(m=n(i().m(function t(e){var n,r;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,!("number"==typeof e&&e>0)){t.n=1;break}return t.a(2,e);case 1:if("string"!=typeof e){t.n=3;break}if(!e.endsWith("s")||e.endsWith("ms")){t.n=2;break}return n=1e3*parseFloat(e),t.a(2,n>0?n:500);case 2:return r=parseFloat(e),t.a(2,r>0?r:500);case 3:t.n=5;break;case 4:t.p=4,t.v;case 5:return t.a(2,500)}},t,null,[[0,4]])}))).apply(this,arguments)}function y(t){try{return(null==t?void 0:t.offsetWidth)||0}catch(t){return 0}}function b(t,e){return g.apply(this,arguments)}function g(){return(g=n(i().m(function t(e,n){var r;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e){t.n=1;break}return t.a(2,"snow");case 1:if(t.p=1,"transparent"!==e){t.n=2;break}return t.a(2,"snow");case 2:return t.n=3,O(e,{underlyingColor:e||"#ffffff",threshold:n||4.5});case 3:return r=t.v,t.a(2,r);case 4:return t.p=4,t.v,t.a(2,"snow")}},t,null,[[1,4]])}))).apply(this,arguments)}function v(t){return("0"+t.toString(16)).slice(-2)}function w(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(e=document)||void 0===e?void 0:e.documentElement;if("string"!=typeof t||!t.trim())return null;var r=t.trim();if(r.startsWith("var(")&&"undefined"!=typeof window&&n){var o=r.slice(4,-1).trim(),a=getComputedStyle(n).getPropertyValue(o).trim();return a?w(a,n):null}if("undefined"!=typeof document)try{var i=document.createElement("canvas").getContext("2d");i.fillStyle="#000",i.fillStyle=r;var s=i.fillStyle,u=s.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)$/i);if(u)return{r:+u[1],g:+u[2],b:+u[3],a:void 0!==u[4]?+u[4]:1};if(s.startsWith("#"))return k(s)}catch(t){}if(/^#[0-9a-fA-F]{3,8}$/.test(r))return k(r);return{black:{r:0,g:0,b:0,a:1},white:{r:255,g:255,b:255,a:1},transparent:{r:0,g:0,b:0,a:0}}[r.toLowerCase()]||null}function k(t){var e=t.replace(/^#/,"");return 3!==e.length&&4!==e.length||(e=e.split("").map(t=>t+t).join("")),6===e.length?{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:1}:8===e.length?{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:parseInt(e.slice(6,8),16)/255}:null}function x(t,e){if(void 0===t.a||t.a>=1)return{r:t.r,g:t.g,b:t.b};e||(e={r:255,g:255,b:255});var n=t.a;return{r:Math.round(t.r*n+e.r*(1-n)),g:Math.round(t.g*n+e.g*(1-n)),b:Math.round(t.b*n+e.b*(1-n))}}function C(t){return(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function E(t){return.2126*C(t.r)+.7152*C(t.g)+.0722*C(t.b)}function T(t,e){return(Math.max(t,e)+.05)/(Math.min(t,e)+.05)}function S(t){var e,n,r=function(t){return t<=.0031308?Math.round(12.92*t*255):Math.round(255*(1.055*Math.pow(t,1/2.4)-.055))}(t=Math.min(1,Math.max(0,t)));return e=r,n=r,"#"+v(r)+v(e)+v(n)}function O(t){return j.apply(this,arguments)}function j(){return j=n(i().m(function t(e){var n,r,o,a,s,u,c,l,f,p,d,h,m,y,b=arguments;return i().w(function(t){for(;;)switch(t.n){case 0:if(r=(n=b.length>1&&void 0!==b[1]?b[1]:{}).threshold||4.5,o=w(e,n.resolveVarElement)){t.n=1;break}return t.a(2,{color:"#000000",contrast:21,meetsAA:!0,blackContrast:21,whiteContrast:1,used:"black"});case 1:if(void 0!==o.a&&o.a<1?((s=n.underlyingColor)?(u="string"==typeof s?w(s,n.resolveVarElement):s,s=u?{r:u.r,g:u.g,b:u.b}:{r:255,g:255,b:255}):s={r:255,g:255,b:255},a=x(o,s)):a={r:o.r,g:o.g,b:o.b},c=E(a),l=T(c,1),f=T(c,0),!(l>=r||f>=r)){t.n=3;break}if(!(l>=f)){t.n=2;break}return t.a(2,{color:"#ffffff",contrast:l,meetsAA:l>=r,blackContrast:f,whiteContrast:l,used:"white"});case 2:return t.a(2,{color:"#000000",contrast:f,meetsAA:f>=r,blackContrast:f,whiteContrast:l,used:"black"});case 3:return p=l>f?r*(c+.05)-.05:(c+.05)/r-.05,p=Math.min(1,Math.max(0,p)),d=S(p),h={r:parseInt(d.slice(1,3),16),g:parseInt(d.slice(3,5),16),b:parseInt(d.slice(5,7),16)},m=E(h),y=T(c,m),t.a(2,{color:d,contrast:y,meetsAA:y>=r,blackContrast:f,whiteContrast:l,used:"generated"})}},t)})),j.apply(this,arguments)}function I(t,e,n){return P.apply(this,arguments)}function P(){return(P=n(i().m(function t(e,n,r){var o;return i().w(function(t){for(;;)switch(t.n){case 0:(o=document.createElement("button")).setAttribute("aria-label","Close notification"),o.setAttribute("title","Close"),o.textContent="×",Object.assign(o.style,{background:"none",border:"none",color:n.textColor,fontSize:"18px",marginLeft:"10px",cursor:"pointer"}),o.onclick=()=>r(e),e.appendChild(o),e._cleanupCloseButton=()=>{o.onclick=null};case 1:return t.a(2)}},t)}))).apply(this,arguments)}function L(t,e){return M.apply(this,arguments)}function M(){return(M=n(i().m(function t(e,n){var r;return i().w(function(t){for(;;)switch(t.n){case 0:r=document.createElement("div"),Object.assign(r.style,{position:"absolute",left:"0",height:n.progressHeight||"4px",background:n.progressColor||"rgba(255, 255, 255, 0.3)",width:"100%",transition:"width ".concat(n.duration||1800,"ms linear"),["top"===n.progressPosition?"top":"bottom"]:"0"}),e.appendChild(r),setTimeout(()=>{y(r),r.style.width="0%"},100);case 1:return t.a(2)}},t)}))).apply(this,arguments)}function A(t){return B.apply(this,arguments)}function B(){return(B=n(i().m(function t(e){return i().w(function(t){for(;;)switch(t.n){case 0:setTimeout(()=>{requestAnimationFrame(()=>{e.style.opacity="1",e.style.transform="translateY(0)"})},50);case 1:return t.a(2)}},t)}))).apply(this,arguments)}function D(t,e,n){return W.apply(this,arguments)}function W(){return(W=n(i().m(function t(e,n,r){var o,a;return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(n.animationDuration);case 1:return o=t.v,Object.assign(e.style,{background:n.backgroundColor,padding:"12px 20px",marginBottom:"10px",borderRadius:n.borderRadius,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"space-between",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",minWidth:"250px",maxWidth:n.maxWidth,opacity:"0",position:"relative",transition:"opacity ".concat(n.animationDuration," ").concat(n.animationEasing,", transform ").concat(n.animationDuration," ").concat(n.animationEasing),transform:"translateY(20px)",zIndex:"9999"}),e._animationDuration=o,(a=document.createElement("span")).style.position=n.fontPosition,a.style.display="inline-block",a.style.flex="1",a.style.padding=n.fontPadding,a.style.borderRadius=n.fontBorderRadius,a.style.background=n.fontBackgroundColor,a.style.fontFamily=n.fontFamily,a.style.fontSize=n.fontSize,a.style.fontWeight=n.fontWeight,a.style.lineHeight=n.fontLineHeight,a.style.color=n.textColor,a.style.userSelect="text",a.style.wordBreak="break-word",a.style.direction=n.fontDirection,a.style.webkitLineClamp="3",a.style.webkitBoxOrient="vertical",a.style.whiteSpace=n.wrapText?"normal":"nowrap",a.style.display="block",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.style.lineClamp="3",a.style.boxOrient="vertical",a.style.display="-webkit-box",a.textContent=n.message,a.setAttribute("aria-label","Toast Notification Center"),a.setAttribute("title",n.message),e.appendChild(a),t.n=2,_(e,n,r);case 2:if(!n.showCloseButton){t.n=3;break}return t.n=3,I(e,n,r);case 3:if(!n.showProgressBar){t.n=4;break}return t.n=4,L(e,n);case 4:return t.n=5,A(e);case 5:return t.a(2)}},t)}))).apply(this,arguments)}function z(t,e){return R.apply(this,arguments)}function R(){return(R=n(i().m(function t(e,n){var r;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,(r=document.createElement("div")).id="emergency-".concat(Date.now()),r.innerHTML='\n <div style="\n background: #333 !important;\n color: white !important;\n padding: 10px 15px !important;\n position: fixed !important;\n top: 20px !important;\n right: 20px !important;\n z-index: 99999 !important;\n border-radius: 3px !important;\n max-width: 250px !important;\n word-wrap: break-word !important;\n font-family: Arial, sans-serif !important;\n font-size: 14px !important;\n box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;\n cursor: pointer !important;\n " onclick="this.parentNode.removeChild(this)">\n '.concat(e.message||"Emergency Toast Creation Showing!",'\n <span style="float: right; margin-left: 10px; font-weight: bold;">×</span>\n </div>\n '),r._animationDuration=500,r._isEmergencyToast=!0,setTimeout(()=>{try{r.parentNode&&r.parentNode.removeChild(r),n(r)}catch(t){}},e.duration||1800),t.a(2,r);case 1:return t.p=1,t.v,setTimeout(()=>{try{alert(e.message||"Toast Creation Failed!"),n(null)}catch(t){n(null)}},100),t.a(2,null)}},t,null,[[0,1]])}))).apply(this,arguments)}function _(t,e,n){return F.apply(this,arguments)}function F(){return F=n(i().m(function t(e,r,o){var a,s,u;return i().w(function(t){for(;;)switch(t.n){case 0:if((a=null==r?void 0:r.cta)&&a.label){t.n=1;break}return t.a(2);case 1:s=!!a.href&&"link"===a.variant,u=document.createElement(s?"a":"button"),s?(u.href=a.href,a.target&&(u.target=a.target),u.rel=a.rel||("_blank"===a.target?"noopener noreferrer":"")):u.type="button",u.setAttribute("aria-label",a.ariaLabel||a.label),Object.assign(u.style,{marginLeft:"10px",padding:"6px 10px",borderRadius:"6px",fontSize:"12px",fontWeight:"600",lineHeight:"1",border:"1px solid rgba(255,255,255,0.35)",color:r.textColor||"#fff",background:"rgba(255,255,255,0.15)",cursor:"pointer",whiteSpace:"nowrap",flexShrink:"0"}),u.textContent=a.label,u.addEventListener("click",function(){var t=n(i().m(function t(n){var r;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,"function"!=typeof a.onClick){t.n=1;break}if(null==(r=a.onClick(n))||!r.then){t.n=1;break}return t.n=1,r;case 1:return t.p=1,!1!==a.autoClose&&o(e),t.f(1);case 2:return t.a(2)}},t,null,[[0,,1,2]])}));return function(e){return t.apply(this,arguments)}}()),e.appendChild(u);case 2:return t.a(2)}},t)})),F.apply(this,arguments)}function H(t,e){return N.apply(this,arguments)}function N(){return(N=n(i().m(function t(e,n){var r;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(document.querySelector('[id^="toast-container-"]')){t.n=1;break}return t.a(2,null);case 1:return t.p=2,t.n=3,l("div","toast");case 3:return r=t.v,t.n=4,D(r,e,n);case 4:case 6:return t.a(2,r);case 5:return t.p=5,t.v,t.n=6,z(e,n)}},t,null,[[2,5]])}))).apply(this,arguments)}var q=new Map,G=new Map;function Y(){return"toast-container-".concat(function(){return String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"bottom-right").toLowerCase().trim().replace(/\bbelow\b/g,"bottom").replace(/\s+/g,"-").replace(/[^a-z0-9\-]/g,"-").replace(/\-+/g,"-")}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"bottom-right"))}function U(){return V.apply(this,arguments)}function V(){return V=n(i().m(function t(){var e,r,o,a,s,u=arguments;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(r=u.length>1?u[1]:void 0,o=Y((e=u.length>0&&void 0!==u[0]?u[0]:{}).position),!G.has(o)){t.n=1;break}return t.a(2,G.get(o));case 1:return a=n(i().m(function t(){var n,a,s,u;return i().w(function(t){for(;;)switch(t.n){case 0:if(!(n=q.get(o))||!n.isConnected){t.n=1;break}return t.a(2,n);case 1:if((a=document.getElementById(o))&&!a.isConnected&&document.body.appendChild(a),a){t.n=3;break}if((a=document.createElement("div")).id=o,a.setAttribute("role","status"),a.setAttribute("aria-atomic","true"),a.style.position="fixed",a.style.zIndex="9999",a.style.inset="auto 10px 10px auto",a.style.display="flex",a.style.justifyContent="space-between",a.style.alignItems="center",a.style.flexDirection="column",a.style.overflow="hidden","function"!=typeof r){t.n=2;break}return t.n=2,r(a,e);case 2:document.body.appendChild(a),t.n=4;break;case 3:if(a.style.position=a.style.position||"fixed",a.style.zIndex=a.style.zIndex||"9999","function"!=typeof r){t.n=4;break}return t.n=4,r(a,e);case 4:if((s=document.querySelectorAll("#".concat(o))).length>1)for(u=1;u<s.length;u++)try{s[u].remove()}catch(t){}return q.set(o,a),t.a(2,a)}},t)}))(),G.set(o,a),t.p=2,t.n=3,a;case 3:return s=t.v,t.a(2,s);case 4:return t.p=4,G.delete(Y(e.position)),t.f(4);case 5:return t.a(2)}},t,null,[[2,,4,5]])})),V.apply(this,arguments)}function X(t,e){return $.apply(this,arguments)}function $(){return($=n(i().m(function t(e,n){var r;return i().w(function(t){for(;;)switch(t.n){case 0:if(e&&n.position){t.n=1;break}throw new Error("Invalid container or position!");case 1:if(J(e),r=K(n.position),!Q(e,n,r)){t.n=2;break}return t.a(2);case 2:if(!Z(e,r)){t.n=3;break}return t.a(2);case 3:tt(e,r);case 4:return t.a(2)}},t)}))).apply(this,arguments)}function J(t){t.style.top="auto",t.style.bottom="auto",t.style.left="auto",t.style.right="auto",t.style.transform="none"}function K(t){var e=t.toLowerCase().trim();return{hasTop:e.includes("top"),hasBottom:e.includes("bottom")||e.includes("below"),hasLeft:e.includes("left"),hasRight:e.includes("right"),hasCenter:e.includes("center"),hasFullWidth:e.includes("top-full-width")||e.includes("bottom-full-width")||e.includes("fullwidth")}}function Q(t,e,n){return!!n.hasFullWidth&&(e.maxWidth="100vw",n.hasTop?(t.style.top="10px",t.style.left="10px",t.style.right="10px",!0):!!n.hasBottom&&(t.style.bottom="10px",t.style.left="10px",t.style.right="10px",!0))}function Z(t,e){return!!e.hasCenter&&(!e.hasTop||e.hasLeft||e.hasRight?!e.hasBottom||e.hasLeft||e.hasRight?!e.hasLeft||e.hasTop||e.hasBottom?!e.hasRight||e.hasTop||e.hasBottom?!(e.hasLeft||e.hasRight||e.hasTop||e.hasBottom)&&(t.style.top="50%",t.style.left="50%",t.style.transform="translate(-50%, -50%)",!0):(t.style.right="10px",t.style.top="50%",t.style.transform="translateY(-50%)",!0):(t.style.left="10px",t.style.top="50%",t.style.transform="translateY(-50%)",!0):(t.style.bottom="10px",t.style.left="50%",t.style.transform="translateX(-50%)",!0):(t.style.top="10px",t.style.left="50%",t.style.transform="translateX(-50%)",!0))}function tt(t,e){e.hasBottom?t.style.bottom="10px":e.hasTop&&(t.style.top="10px"),e.hasRight?t.style.right="10px":e.hasLeft?t.style.left="10px":(t.style.bottom="10px",t.style.left="50%",t.style.transform="translateX(-50%)")}class et{constructor(t,e){this.callback=t,this.delay=e,this.remaining=e,this.startTime=null,this.timeoutId=null,this.isPaused=!1,this.isCompleted=!1}start(){return this.isCompleted||this.timeoutId||(this.startTime=Date.now(),this.timeoutId=setTimeout(()=>{this.isCompleted=!0,this.timeoutId=null,this.callback()},this.remaining)),this}pause(){return this.isPaused||!this.timeoutId||this.isCompleted||(clearTimeout(this.timeoutId),this.timeoutId=null,this.remaining-=Date.now()-this.startTime,this.remaining=Math.max(0,this.remaining),this.isPaused=!0),this}resume(){return!this.isPaused||this.isCompleted||(this.isPaused=!1,this.start()),this}clear(){return this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.isCompleted=!0,this}getRemainingTime(){return this.isCompleted?0:this.isPaused?this.remaining:this.timeoutId?Math.max(0,this.remaining-(Date.now()-this.startTime)):this.delay}}var nt=new Map,rt=new Map,ot=[],at=0;function it(t){for(var e=5381,n=0;n<t.length;n++)e=(e<<5)+e+t.charCodeAt(n);return e>>>0}function st(t){var e=t.type,n=void 0===e?options.type:e,r=t.message,o=void 0===r?options.message||"":r,a=t.position,i=void 0===a?options.position:a;return[String(n).trim().toLowerCase(),it(String(o)).toString(16),String(i).trim().toLowerCase()].join("|")}function ut(){return ct.apply(this,arguments)}function ct(){return ct=n(i().m(function t(){var e,r,o,a,s,u=arguments;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:{},t.p=1,r=st(e),!nt.has(r)){t.n=5;break}if(o=nt.get(r)){t.n=2;break}throw new Error("Active toast with key ".concat(r," not found"));case 2:return o.count++,o.timer.clear(),o.timer=pt(o.toast,e),t.n=3,dt(o);case 3:return t.n=4,kt(o);case 4:return t.a(2);case 5:if(!rt.has(r)){t.n=7;break}if(a=rt.get(r)){t.n=6;break}throw new Error("Pending toast with key ".concat(r," not found"));case 6:return a.count++,t.a(2);case 7:s={options:e,count:1,rafId:0},rt.set(r,s),s.rafId=requestAnimationFrame(n(i().m(function t(){var e;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=rt.get(r)){t.n=1;break}return t.a(2);case 1:if(rt.delete(r),!(at>=3)){t.n=3;break}return ot.push({options:e.options,key:r,count:e.count}),t.n=2,bt();case 2:return t.a(2);case 3:return t.p=3,t.n=4,lt(e.options,r,e.count);case 4:t.n=6;break;case 5:t.p=5,t.v;case 6:return t.a(2)}},t,null,[[3,5]])}))),t.n=9;break;case 8:t.p=8,t.v;case 9:return t.a(2)}},t,null,[[1,8]])})),ct.apply(this,arguments)}function lt(t,e,n){return ft.apply(this,arguments)}function ft(){return(ft=n(i().m(function t(e,n,r){var o,a,s,u,c,l,f,p;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,e&&"object"==typeof e){t.n=1;break}throw new TypeError("options must be an object");case 1:return at++,t.n=2,U(e,X);case 2:if(o=t.v){t.n=3;break}throw new Error("Failed to create toast container");case 3:return t.n=4,H(e,mt);case 4:if(a=t.v){t.n=5;break}throw new Error("Toast element creation failed");case 5:if(s=document.createElement("div"),Object.assign(s.style,{position:"relative",display:"inline-block",overflow:"visible",marginBottom:"10px",zIndex:"0",width:"100%"}),u=document.createElement("div"),Object.assign(u.style,{position:"relative",overflow:"hidden",borderRadius:e.borderRadius||"8px",zIndex:"1"}),u.appendChild(a),s.appendChild(u),o.id.includes("toast-container-")&&o.appendChild(s),c=!1!==e.pauseOnHover&&(!0===e.pauseOnHover||!!e.cta),l={outer:s,toast:a,count:Math.max(1,0|r),timeout:null,pauseOnHover:c},nt.set(n,l),a._key=n,!(l.count>1)){t.n=6;break}return t.n=6,kt(l);case 6:return l.timer=pt(a,e),t.n=7,dt(l);case 7:t.n=10;break;case 8:return t.p=8,t.v,at=Math.max(0,at-1),f=document.querySelector('[id^="toast-container-"]')||document.body,p=f,t.n=9,z(e,mt);case 9:p.appendChild.call(p,t.v);case 10:return t.a(2)}},t,null,[[0,8]])}))).apply(this,arguments)}function pt(t,e){var r=(e.duration||1800)+10,o=new et(n(i().m(function e(){return i().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,mt(t);case 1:return e.a(2,e.v)}},e)})),r);return o.start(),o}function dt(t){return ht.apply(this,arguments)}function ht(){return(ht=n(i().m(function t(e){var n,r,o,a,s,u;return i().w(function(t){for(;;)switch(t.n){case 0:if(e.pauseOnHover&&e.outer&&e.timer){t.n=1;break}return t.a(2);case 1:n=e.outer,r=e.timer,o=()=>{r.pause()},a=()=>{r.resume()},s=t=>{t.target.matches("button, a, [tabindex]")&&r.pause()},u=t=>{n.contains(t.relatedTarget)||r.resume()},n.addEventListener("mouseenter",o),n.addEventListener("mouseleave",a),n.addEventListener("focusin",s),n.addEventListener("focusout",u),n._pauseCleanup=()=>{n.removeEventListener("mouseenter",o),n.removeEventListener("mouseleave",a),n.removeEventListener("focusin",s),n.removeEventListener("focusout",u)};case 2:return t.a(2)}},t)}))).apply(this,arguments)}function mt(t){return yt.apply(this,arguments)}function yt(){return(yt=n(i().m(function t(e){var n,r,o,a,s;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,null!=e&&e._key){t.n=1;break}return t.a(2);case 1:if(a=nt.get(e._key)){t.n=2;break}return t.a(2);case 2:return null===(n=a.timer)||void 0===n||n.clear(),null===(r=a.outer)||void 0===r||null===(o=r._pauseCleanup)||void 0===o||o.call(r),nt.delete(e._key),at=Math.max(0,at-1),(s=a.outer.querySelector(".toast-count-badge"))&&s.remove(),t.n=3,vt(a.outer);case 3:return t.n=4,bt();case 4:t.n=6;break;case 5:t.p=5,t.v;case 6:return t.a(2)}},t,null,[[0,5]])}))).apply(this,arguments)}function bt(){return gt.apply(this,arguments)}function gt(){return(gt=n(i().m(function t(){var e,n;return i().w(function(t){for(;;)switch(t.n){case 0:if(!(at<3&&ot.length)){t.n=3;break}if(e=ot.shift(),!nt.has(e.key)){t.n=2;break}return(n=nt.get(e.key)).count+=e.count,t.n=1,kt(n);case 1:return t.a(3,0);case 2:lt(e.options,e.key,e.count),t.n=0;break;case 3:return t.a(2)}},t)}))).apply(this,arguments)}function vt(t){return wt.apply(this,arguments)}function wt(){return(wt=n(i().m(function t(e){return i().w(function(t){for(;;)switch(t.n){case 0:if(e){t.n=1;break}return t.a(2,Promise.resolve());case 1:return t.a(2,new Promise(t=>{var n=!1,r=()=>{n||(n=!0,p(e),t())},o=e.firstElementChild||e;if(!o)return Promise.resolve();var a=t=>{try{if(t.target!==o)return;o.removeEventListener("transitionend",a,!0),r()}catch(t){}};try{o.addEventListener("transitionend",a,!0)}catch(t){}setTimeout(()=>{try{o.removeEventListener("transitionend",a,!0),r()}catch(t){}},700)}))}},t)}))).apply(this,arguments)}function kt(t){return xt.apply(this,arguments)}function xt(){return(xt=n(i().m(function t(e){var n,r,o,a;return i().w(function(t){for(;;)switch(t.n){case 0:if(n=e.outer,r=e.count,n&&!(!n instanceof HTMLElement)){t.n=1;break}throw new Error("updateBadge: outer must be a valid HTMLElement");case 1:if(!(r<2)){t.n=2;break}return(o=n.querySelector(".toast-count-badge"))&&o.remove(),t.a(2);case 2:(a=n.querySelector(".toast-count-badge"))||((a=document.createElement("span")).className="toast-count-badge",a.setAttribute("aria-label","".concat(r," identical notifications")),Object.assign(a.style,{position:"absolute",top:"6px",right:"6px",backgroundColor:"#f44336",color:"#fff",borderRadius:"50%",minWidth:"20px",height:"20px",fontSize:"12px",fontWeight:"600",display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #fff",boxShadow:"0 2px 6px rgba(0,0,0,0.3)",zIndex:"2",pointerEvents:"none",transition:"transform 150ms ease"}),n.appendChild(a)),a.textContent=r>99?"99+":String(r);try{a.style.transform="scale(1.2)",setTimeout(()=>a.style.transform="scale(1)",150)}catch(t){}case 3:return t.a(2)}},t)}))).apply(this,arguments)}var Ct={success:"#28a745",error:"#dc3545",warning:"#ffc107",info:"#17a2b8"},Et={success:"Operation completed successfully!",error:"Something went wrong!",warning:"Warning message!",info:"Information message!"},Tt=[],St=!1;function Ot(){return jt.apply(this,arguments)}function jt(){return(jt=n(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:if(!St){t.n=1;break}return t.a(2);case 1:"undefined"!=typeof window&&"undefined"!=typeof document&&("complete"===document.readyState||"interactive"===document.readyState?(St=!0,Tt.forEach(t=>setTimeout(()=>It(t),2e3)),Tt.length=0):document.addEventListener("DOMContentLoaded",()=>{St=!0,Tt.forEach(t=>setTimeout(()=>It(t),2e3)),Tt.length=0},{once:!0}));case 2:return t.a(2)}},t)}))).apply(this,arguments)}function It(){return Pt.apply(this,arguments)}function Pt(){return Pt=n(i().m(function t(){var e,n,r,o,a=arguments;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:{},t.p=1,t.n=2,Wt(e);case 2:return n=t.v,t.n=3,Bt(n);case 3:return t.n=4,ut(n);case 4:t.n=6;break;case 5:t.p=5,t.v,o="string"==typeof(null==e?void 0:e.message)&&null!==(null==e?void 0:e.message)?"".concat(null==e||null===(r=e.message)||void 0===r?void 0:r.substring(0,200)," toast creation failed!"):"Toast creation failed!",alert(o);case 6:return t.a(2)}},t,null,[[1,5]])})),Pt.apply(this,arguments)}var Lt=!1;function Mt(){return At.apply(this,arguments)}function At(){return At=n(i().m(function t(){var e,n,r=arguments;return i().w(function(t){for(;;)switch(t.n){case 0:if(e=r.length>0&&void 0!==r[0]?r[0]:{},"undefined"!=typeof window&&"undefined"!=typeof document){t.n=1;break}return t.a(2);case 1:return t.n=2,Ot();case 2:if(St){t.n=3;break}return Tt.push(e),t.a(2);case 3:if(Lt){t.n=5;break}return Lt=!0,n=setTimeout,t.n=4,It(e);case 4:n(t.v,2e3),t.n=6;break;case 5:return t.n=6,It(e);case 6:return t.a(2)}},t)})),At.apply(this,arguments)}function Bt(t){return Dt.apply(this,arguments)}function Dt(){return(Dt=n(i().m(function t(e){var n;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,U(e,X);case 1:return n=t.v,t.a(2,n);case 2:return t.p=2,t.v,t.a(2,document.body)}},t,null,[[0,2]])}))).apply(this,arguments)}function Wt(t){return zt.apply(this,arguments)}function zt(){return(zt=n(i().m(function t(e){var n,r,o,s,u,c,l,f,p,d;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(o=null==e||null===(n=e.position)||void 0===n||null===(n=n.toLowerCase())||void 0===n?void 0:n.trim(),s=null!=o&&o.includes("top-full-width")||null!=o&&o.includes("bottom-full-width")?"100vw":"400px",(u=a(a({},{pauseOnHover:void 0,duration:1800,position:"bottom-right",type:"info",borderRadius:"50px",backgroundColor:void 0,textColor:void 0,showCloseButton:!0,animationDuration:"0.4s",animationType:"fade",animationEasing:"ease",showProgressBar:!0,progressColor:void 0,progressHeight:"4px",progressPosition:"bottom",fontPosition:"relative",fontPadding:void 0,fontBorderRadius:void 0,fontBackgroundColor:void 0,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontSize:"14px",fontWeight:"400",fontLineHeight:"1.4",fontDirection:"auto",wrapText:"normal",maxWidth:s}),"object"!=typeof e||Array.isArray(e)?{}:e)).message=null!==(r=null==e?void 0:e.message)&&void 0!==r?r:u.message,t.p=1,u.backgroundColor||(u.backgroundColor=null!==(l=null===(f=Ct)||void 0===f?void 0:f[u.type])&&void 0!==l?l:window.matchMedia("(prefers-color-scheme: dark)").matches?"#f5f5f5":"#111111"),u.message=u.message||(null===(c=Et)||void 0===c?void 0:c[u.type])||"No Message Provided!",u.textColor||!u.backgroundColor){t.n=3;break}return t.n=2,b(u.backgroundColor);case 2:p=t.v,u.textColor=null==p?void 0:p.color;case 3:if(u.progressColor||!u.backgroundColor){t.n=6;break}if(!u.textColor){t.n=4;break}u.progressColor=u.textColor,t.n=6;break;case 4:return t.n=5,b(u.backgroundColor);case 5:d=t.v,u.progressColor=null==d?void 0:d.color;case 6:t.n=8;break;case 7:t.p=7,t.v;case 8:return"string"!=typeof u.message&&(u.message="No Message Provided!"),t.a(2,u)}},t,null,[[1,7]])}))).apply(this,arguments)}function Rt(t){try{t&&"object"==typeof t&&!Array.isArray(t)&&(Ct=a(a({},Ct),t))}catch(t){}}function _t(t){try{t&&"object"==typeof t&&!Array.isArray(t)&&(Et=a(a({},Et),t))}catch(t){}}var Ft=function(){var t=n(i().m(function t(e){var n;return i().w(function(t){for(;;)switch(t.n){case 0:try{n="all"===e?'[id^="toast-container-"][role="status"]':'[id^="toast-"]:not([id*="container"])',("all"===e?document.querySelectorAll(n):[document.querySelector(n)].filter(Boolean)).forEach(t=>{if("function"==typeof(null==t?void 0:t.remove))t.remove();else if(t)throw new TypeError("Element exists but remove() is not a function")})}catch(t){}case 1:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}();try{"undefined"!=typeof window&&(window.customizableToast={createToast:Mt,setDefaultColors:Rt,setDefaultMessages:_t,noop:Ft})}catch(t){}t.createToast=Mt,t.noop=Ft,t.setDefaultColors=Rt,t.setDefaultMessages=_t});
|
|
17
|
+
var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var i=r&&r.prototype instanceof c?r:c,l=Object.create(i.prototype);return s(l,"_invoke",function(n,r,o){var a,i,s,c=0,l=o||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return a=e,i=0,s=t,p.n=n,u}};function d(n,r){for(i=n,s=r,e=0;!f&&c&&!o&&e<l.length;e++){var o,a=l[e],d=p.p,h=a[2];n>3?(o=h===r)&&(s=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=t):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,p.v=r,p.n=a[1]):d<h&&(o=n<3||a[0]>r||r>h)&&(a[4]=n,a[5]=r,p.n=h,i=0))}if(o||n>1)return u;throw f=!0,r}return function(o,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),i=l,s=h;(e=i<2?t:s)||!f;){a||(i?i<3?(i>1&&(p.n=-1),d(i,s)):p.n=s:p.v=s);try{if(c=2,a){if(i||(o="next"),e=a[o]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,i<2&&(i=0)}else 1===i&&(e=a.return)&&e.call(a),i<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=t}else if((e=(f=p.n<0)?s:n.call(r,p))!==u)break}catch(e){a=t,i=1,s=e}finally{c=1}}return{value:e,done:f}}}(n,o,a),!0),l}var u={};function c(){}function l(){}function f(){}e=Object.getPrototypeOf;var p=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),d=f.prototype=c.prototype=Object.create(p);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,s(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return l.prototype=f,s(d,"constructor",f),s(f,"constructor",l),l.displayName="GeneratorFunction",s(f,o,"GeneratorFunction"),s(d),s(d,o,"Generator"),s(d,r,function(){return this}),s(d,"toString",function(){return"[object Generator]"}),(i=function(){return{w:a,m:h}})()}function s(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}s=function(t,e,n,r){function a(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},s(t,e,n,r)}function u(t){return c.apply(this,arguments)}function c(){return(c=n(i().m(function t(e){return i().w(function(t){for(;;)if(0===t.n)return t.a(2,"".concat(e,"-").concat(Date.now(),"-").concat(Math.floor(1e5*Math.random())))},t)}))).apply(this,arguments)}function l(t,e){return f.apply(this,arguments)}function f(){return(f=n(i().m(function t(e,n){var r,o,a;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,e&&n){t.n=1;break}throw new Error("tagName and prefix is required");case 1:return r=document.createElement(e),t.n=2,u(n);case 2:return r.id=t.v,t.a(2,r);case 3:return t.p=3,t.v,t.p=4,o="div",a=document.createElement(o),t.n=5,u("fallback");case 5:return a.id=t.v,a.setAttribute("data-original-tag",o),t.a(2,a);case 6:t.p=6,t.v;case 7:return t.a(2)}},t,null,[[4,6],[0,3]])}))).apply(this,arguments)}function p(t){return d.apply(this,arguments)}function d(){return(d=n(i().m(function t(e){var n;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e){t.n=1;break}return t.a(2,!0);case 1:if(t.p=1,null==e||null===(n=e.parentNode)||void 0===n||!n.id.includes("toast-container-")){t.n=2;break}return e.parentNode.removeChild(e),t.a(2,!0);case 2:case 5:t.n=9;break;case 3:if(t.p=3,t.v,t.p=4,!e.remove){t.n=5;break}return e.remove(),t.a(2,!0);case 6:return t.p=6,t.v,t.p=7,e.style.display="none",e.style.opacity="0",e.style.pointerEvents="none",e.style.position="absolute",e.style.left="-9999px",t.a(2,!0);case 8:return t.p=8,t.v,t.a(2,!1);case 9:return t.a(2,!0)}},t,null,[[7,8],[4,6],[1,3]])}))).apply(this,arguments)}function h(t){return m.apply(this,arguments)}function m(){return(m=n(i().m(function t(e){var n,r;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,!("number"==typeof e&&e>0)){t.n=1;break}return t.a(2,e);case 1:if("string"!=typeof e){t.n=3;break}if(!e.endsWith("s")||e.endsWith("ms")){t.n=2;break}return n=1e3*parseFloat(e),t.a(2,n>0?n:500);case 2:return r=parseFloat(e),t.a(2,r>0?r:500);case 3:t.n=5;break;case 4:t.p=4,t.v;case 5:return t.a(2,500)}},t,null,[[0,4]])}))).apply(this,arguments)}function y(t){try{return(null==t?void 0:t.offsetWidth)||0}catch(t){return 0}}function b(t,e){return g.apply(this,arguments)}function g(){return(g=n(i().m(function t(e,n){var r;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e){t.n=1;break}return t.a(2,"snow");case 1:if(t.p=1,"transparent"!==e){t.n=2;break}return t.a(2,"snow");case 2:return t.n=3,O(e,{underlyingColor:e||"#ffffff",threshold:n||4.5});case 3:return r=t.v,t.a(2,r);case 4:return t.p=4,t.v,t.a(2,"snow")}},t,null,[[1,4]])}))).apply(this,arguments)}function v(t){return("0"+t.toString(16)).slice(-2)}function w(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(e=document)||void 0===e?void 0:e.documentElement;if("string"!=typeof t||!t.trim())return null;var r=t.trim();if(r.startsWith("var(")&&"undefined"!=typeof window&&n){var o=r.slice(4,-1).trim(),a=getComputedStyle(n).getPropertyValue(o).trim();return a?w(a,n):null}if("undefined"!=typeof document)try{var i=document.createElement("canvas").getContext("2d");i.fillStyle="#000",i.fillStyle=r;var s=i.fillStyle,u=s.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)$/i);if(u)return{r:+u[1],g:+u[2],b:+u[3],a:void 0!==u[4]?+u[4]:1};if(s.startsWith("#"))return k(s)}catch(t){}if(/^#[0-9a-fA-F]{3,8}$/.test(r))return k(r);return{black:{r:0,g:0,b:0,a:1},white:{r:255,g:255,b:255,a:1},transparent:{r:0,g:0,b:0,a:0}}[r.toLowerCase()]||null}function k(t){var e=t.replace(/^#/,"");return 3!==e.length&&4!==e.length||(e=e.split("").map(t=>t+t).join("")),6===e.length?{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:1}:8===e.length?{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:parseInt(e.slice(6,8),16)/255}:null}function x(t,e){if(void 0===t.a||t.a>=1)return{r:t.r,g:t.g,b:t.b};e||(e={r:255,g:255,b:255});var n=t.a;return{r:Math.round(t.r*n+e.r*(1-n)),g:Math.round(t.g*n+e.g*(1-n)),b:Math.round(t.b*n+e.b*(1-n))}}function C(t){return(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function E(t){return.2126*C(t.r)+.7152*C(t.g)+.0722*C(t.b)}function T(t,e){return(Math.max(t,e)+.05)/(Math.min(t,e)+.05)}function S(t){var e,n,r=function(t){return t<=.0031308?Math.round(12.92*t*255):Math.round(255*(1.055*Math.pow(t,1/2.4)-.055))}(t=Math.min(1,Math.max(0,t)));return e=r,n=r,"#"+v(r)+v(e)+v(n)}function O(t){return j.apply(this,arguments)}function j(){return j=n(i().m(function t(e){var n,r,o,a,s,u,c,l,f,p,d,h,m,y,b=arguments;return i().w(function(t){for(;;)switch(t.n){case 0:if(r=(n=b.length>1&&void 0!==b[1]?b[1]:{}).threshold||4.5,o=w(e,n.resolveVarElement)){t.n=1;break}return t.a(2,{color:"#000000",contrast:21,meetsAA:!0,blackContrast:21,whiteContrast:1,used:"black"});case 1:if(void 0!==o.a&&o.a<1?((s=n.underlyingColor)?(u="string"==typeof s?w(s,n.resolveVarElement):s,s=u?{r:u.r,g:u.g,b:u.b}:{r:255,g:255,b:255}):s={r:255,g:255,b:255},a=x(o,s)):a={r:o.r,g:o.g,b:o.b},c=E(a),l=T(c,1),f=T(c,0),!(l>=r||f>=r)){t.n=3;break}if(!(l>=f)){t.n=2;break}return t.a(2,{color:"#ffffff",contrast:l,meetsAA:l>=r,blackContrast:f,whiteContrast:l,used:"white"});case 2:return t.a(2,{color:"#000000",contrast:f,meetsAA:f>=r,blackContrast:f,whiteContrast:l,used:"black"});case 3:return p=l>f?r*(c+.05)-.05:(c+.05)/r-.05,p=Math.min(1,Math.max(0,p)),d=S(p),h={r:parseInt(d.slice(1,3),16),g:parseInt(d.slice(3,5),16),b:parseInt(d.slice(5,7),16)},m=E(h),y=T(c,m),t.a(2,{color:d,contrast:y,meetsAA:y>=r,blackContrast:f,whiteContrast:l,used:"generated"})}},t)})),j.apply(this,arguments)}function I(t,e,n){return P.apply(this,arguments)}function P(){return(P=n(i().m(function t(e,n,r){var o;return i().w(function(t){for(;;)switch(t.n){case 0:(o=document.createElement("button")).setAttribute("aria-label","Close notification"),o.setAttribute("title","Close"),o.textContent="×",Object.assign(o.style,{background:"none",border:"none",color:n.textColor,fontSize:"18px",marginLeft:"10px",cursor:"pointer"}),o.onclick=()=>r(e),e.appendChild(o),e._cleanupCloseButton=()=>{o.onclick=null};case 1:return t.a(2)}},t)}))).apply(this,arguments)}function L(t,e){return M.apply(this,arguments)}function M(){return(M=n(i().m(function t(e,n){var r;return i().w(function(t){for(;;)switch(t.n){case 0:r=document.createElement("div"),Object.assign(r.style,{position:"absolute",left:"0",height:n.progressHeight||"4px",background:n.progressColor||"rgba(255, 255, 255, 0.3)",width:"100%",transition:"width ".concat(n.duration||1800,"ms linear"),["top"===n.progressPosition?"top":"bottom"]:"0"}),e.appendChild(r),setTimeout(()=>{y(r),r.style.width="0%"},100);case 1:return t.a(2)}},t)}))).apply(this,arguments)}function A(t){return B.apply(this,arguments)}function B(){return(B=n(i().m(function t(e){return i().w(function(t){for(;;)switch(t.n){case 0:setTimeout(()=>{requestAnimationFrame(()=>{e.style.opacity="1",e.style.transform="translateY(0)"})},50);case 1:return t.a(2)}},t)}))).apply(this,arguments)}function D(t,e,n){return W.apply(this,arguments)}function W(){return(W=n(i().m(function t(e,n,r){var o,a;return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(n.animationDuration);case 1:return o=t.v,Object.assign(e.style,{background:n.backgroundColor,padding:"12px 20px",marginBottom:"10px",borderRadius:n.borderRadius,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"space-between",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",minWidth:"250px",maxWidth:n.maxWidth,opacity:"0",position:"relative",transition:"opacity ".concat(n.animationDuration," ").concat(n.animationEasing,", transform ").concat(n.animationDuration," ").concat(n.animationEasing),transform:"translateY(20px)",zIndex:"9999"}),e._animationDuration=o,(a=document.createElement("span")).style.position=n.fontPosition,a.style.display="inline-block",a.style.flex="1",a.style.padding=n.fontPadding,a.style.borderRadius=n.fontBorderRadius,a.style.background=n.fontBackgroundColor,a.style.fontFamily=n.fontFamily,a.style.fontSize=n.fontSize,a.style.fontWeight=n.fontWeight,a.style.lineHeight=n.fontLineHeight,a.style.color=n.textColor,a.style.userSelect="text",a.style.wordBreak="break-word",a.style.direction=n.fontDirection,a.style.webkitLineClamp="3",a.style.webkitBoxOrient="vertical",a.style.whiteSpace=n.wrapText?"normal":"nowrap",a.style.display="block",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.style.lineClamp="3",a.style.boxOrient="vertical",a.style.display="-webkit-box",a.textContent=n.message,a.setAttribute("aria-label","Toast Notification Center"),a.setAttribute("title",n.message),e.appendChild(a),t.n=2,_(e,n,r);case 2:if(!n.showCloseButton){t.n=3;break}return t.n=3,I(e,n,r);case 3:if(!n.showProgressBar){t.n=4;break}return t.n=4,L(e,n);case 4:return t.n=5,A(e);case 5:return t.a(2)}},t)}))).apply(this,arguments)}function z(t,e){return R.apply(this,arguments)}function R(){return(R=n(i().m(function t(e,n){var r;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,(r=document.createElement("div")).id="emergency-".concat(Date.now()),r.innerHTML='\n <div style="\n background: #333 !important;\n color: white !important;\n padding: 10px 15px !important;\n position: fixed !important;\n top: 20px !important;\n right: 20px !important;\n z-index: 99999 !important;\n border-radius: 3px !important;\n max-width: 250px !important;\n word-wrap: break-word !important;\n font-family: Arial, sans-serif !important;\n font-size: 14px !important;\n box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;\n cursor: pointer !important;\n " onclick="this.parentNode.removeChild(this)">\n '.concat(e.message||"Emergency Toast Creation Showing!",'\n <span style="float: right; margin-left: 10px; font-weight: bold;">×</span>\n </div>\n '),r._animationDuration=500,r._isEmergencyToast=!0,setTimeout(()=>{try{r.parentNode&&r.parentNode.removeChild(r),n(r)}catch(t){}},e.duration||1800),t.a(2,r);case 1:return t.p=1,t.v,setTimeout(()=>{try{alert(e.message||"Toast Creation Failed!"),n(null)}catch(t){n(null)}},100),t.a(2,null)}},t,null,[[0,1]])}))).apply(this,arguments)}function _(t,e,n){return F.apply(this,arguments)}function F(){return F=n(i().m(function t(e,r,o){var a,s,u;return i().w(function(t){for(;;)switch(t.n){case 0:if((a=null==r?void 0:r.cta)&&a.label){t.n=1;break}return t.a(2);case 1:s=!!a.href&&"link"===a.variant,u=document.createElement(s?"a":"button"),s?(u.href=a.href,a.target&&(u.target=a.target),u.rel=a.rel||("_blank"===a.target?"noopener noreferrer":"")):u.type="button",u.setAttribute("aria-label",a.ariaLabel||a.label),Object.assign(u.style,{marginLeft:"10px",padding:"6px 10px",borderRadius:"6px",fontSize:"12px",fontWeight:"600",lineHeight:"1",border:"1px solid rgba(255,255,255,0.35)",color:r.textColor||"#fff",background:"rgba(255,255,255,0.15)",cursor:"pointer",whiteSpace:"nowrap",flexShrink:"0"}),u.textContent=a.label,u.addEventListener("click",function(){var t=n(i().m(function t(n){var r;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,"function"!=typeof a.onClick){t.n=1;break}if(null==(r=a.onClick(n))||!r.then){t.n=1;break}return t.n=1,r;case 1:return t.p=1,!1!==a.autoClose&&o(e),t.f(1);case 2:return t.a(2)}},t,null,[[0,,1,2]])}));return function(e){return t.apply(this,arguments)}}()),e.appendChild(u);case 2:return t.a(2)}},t)})),F.apply(this,arguments)}function H(t,e){return N.apply(this,arguments)}function N(){return(N=n(i().m(function t(e,n){var r;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(document.querySelector('[id^="toast-container-"]')){t.n=1;break}return t.a(2,null);case 1:return t.p=2,t.n=3,l("div","toast");case 3:return r=t.v,t.n=4,D(r,e,n);case 4:case 6:return t.a(2,r);case 5:return t.p=5,t.v,t.n=6,z(e,n)}},t,null,[[2,5]])}))).apply(this,arguments)}var q=new Map,G=new Map;function Y(){return"toast-container-".concat(function(){return String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"bottom-right").toLowerCase().trim().replace(/\bbelow\b/g,"bottom").replace(/\s+/g,"-").replace(/[^a-z0-9\-]/g,"-").replace(/\-+/g,"-")}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"bottom-right"))}function U(){return V.apply(this,arguments)}function V(){return V=n(i().m(function t(){var e,r,o,a,s,u=arguments;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(r=u.length>1?u[1]:void 0,o=Y((e=u.length>0&&void 0!==u[0]?u[0]:{}).position),!G.has(o)){t.n=1;break}return t.a(2,G.get(o));case 1:return a=n(i().m(function t(){var n,a,s,u;return i().w(function(t){for(;;)switch(t.n){case 0:if(!(n=q.get(o))||!n.isConnected){t.n=1;break}return t.a(2,n);case 1:if((a=document.getElementById(o))&&!a.isConnected&&document.body.appendChild(a),a){t.n=3;break}if((a=document.createElement("div")).id=o,a.setAttribute("role","status"),a.setAttribute("aria-atomic","true"),a.style.position="fixed",a.style.zIndex="9999",a.style.inset="auto 10px 10px auto",a.style.display="flex",a.style.justifyContent="space-between",a.style.alignItems="center",a.style.flexDirection="column",a.style.overflow="hidden","function"!=typeof r){t.n=2;break}return t.n=2,r(a,e);case 2:document.body.appendChild(a),t.n=4;break;case 3:if(a.style.position=a.style.position||"fixed",a.style.zIndex=a.style.zIndex||"9999","function"!=typeof r){t.n=4;break}return t.n=4,r(a,e);case 4:if((s=document.querySelectorAll("#".concat(o))).length>1)for(u=1;u<s.length;u++)try{s[u].remove()}catch(t){}return q.set(o,a),t.a(2,a)}},t)}))(),G.set(o,a),t.p=2,t.n=3,a;case 3:return s=t.v,t.a(2,s);case 4:return t.p=4,G.delete(Y(e.position)),t.f(4);case 5:return t.a(2)}},t,null,[[2,,4,5]])})),V.apply(this,arguments)}function X(t,e){return $.apply(this,arguments)}function $(){return($=n(i().m(function t(e,n){var r;return i().w(function(t){for(;;)switch(t.n){case 0:if(e&&n.position){t.n=1;break}throw new Error("Invalid container or position!");case 1:if(J(e),r=K(n.position),!Q(e,n,r)){t.n=2;break}return t.a(2);case 2:if(!Z(e,r)){t.n=3;break}return t.a(2);case 3:tt(e,r);case 4:return t.a(2)}},t)}))).apply(this,arguments)}function J(t){t.style.top="auto",t.style.bottom="auto",t.style.left="auto",t.style.right="auto",t.style.transform="none"}function K(t){var e=t.toLowerCase().trim();return{hasTop:e.includes("top"),hasBottom:e.includes("bottom")||e.includes("below"),hasLeft:e.includes("left"),hasRight:e.includes("right"),hasCenter:e.includes("center"),hasFullWidth:e.includes("top-full-width")||e.includes("bottom-full-width")||e.includes("fullwidth")}}function Q(t,e,n){return!!n.hasFullWidth&&(e.maxWidth="100vw",n.hasTop?(t.style.top="10px",t.style.left="10px",t.style.right="10px",!0):!!n.hasBottom&&(t.style.bottom="10px",t.style.left="10px",t.style.right="10px",!0))}function Z(t,e){return!!e.hasCenter&&(!e.hasTop||e.hasLeft||e.hasRight?!e.hasBottom||e.hasLeft||e.hasRight?!e.hasLeft||e.hasTop||e.hasBottom?!e.hasRight||e.hasTop||e.hasBottom?!(e.hasLeft||e.hasRight||e.hasTop||e.hasBottom)&&(t.style.top="50%",t.style.left="50%",t.style.transform="translate(-50%, -50%)",!0):(t.style.right="10px",t.style.top="50%",t.style.transform="translateY(-50%)",!0):(t.style.left="10px",t.style.top="50%",t.style.transform="translateY(-50%)",!0):(t.style.bottom="10px",t.style.left="50%",t.style.transform="translateX(-50%)",!0):(t.style.top="10px",t.style.left="50%",t.style.transform="translateX(-50%)",!0))}function tt(t,e){e.hasBottom?t.style.bottom="10px":e.hasTop&&(t.style.top="10px"),e.hasRight?t.style.right="10px":e.hasLeft?t.style.left="10px":(t.style.bottom="10px",t.style.left="50%",t.style.transform="translateX(-50%)")}class et{constructor(t,e){this.callback=t,this.delay=e,this.remaining=e,this.startTime=null,this.timeoutId=null,this.isPaused=!1,this.isCompleted=!1}start(){return this.isCompleted||this.timeoutId||(this.startTime=Date.now(),this.timeoutId=setTimeout(()=>{this.isCompleted=!0,this.timeoutId=null,this.callback()},this.remaining)),this}pause(){return this.isPaused||!this.timeoutId||this.isCompleted||(clearTimeout(this.timeoutId),this.timeoutId=null,this.remaining-=Date.now()-this.startTime,this.remaining=Math.max(0,this.remaining),this.isPaused=!0),this}resume(){return!this.isPaused||this.isCompleted||(this.isPaused=!1,this.start()),this}clear(){return this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.isCompleted=!0,this}getRemainingTime(){return this.isCompleted?0:this.isPaused?this.remaining:this.timeoutId?Math.max(0,this.remaining-(Date.now()-this.startTime)):this.delay}}var nt=new Map,rt=new Map,ot=[],at=0;function it(t){for(var e=5381,n=0;n<t.length;n++)e=(e<<5)+e+t.charCodeAt(n);return e>>>0}function st(t){var e=t.type,n=void 0===e?options.type:e,r=t.message,o=void 0===r?options.message||"":r,a=t.position,i=void 0===a?options.position:a;return[String(n).trim().toLowerCase(),it(String(o)).toString(16),String(i).trim().toLowerCase()].join("|")}function ut(){return ct.apply(this,arguments)}function ct(){return ct=n(i().m(function t(){var e,r,o,a,s,u=arguments;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:{},t.p=1,r=st(e),!nt.has(r)){t.n=5;break}if(o=nt.get(r)){t.n=2;break}throw new Error("Active toast with key ".concat(r," not found"));case 2:return o.count++,o.timer.clear(),o.timer=pt(o.toast,e),t.n=3,dt(o);case 3:return t.n=4,kt(o);case 4:return t.a(2);case 5:if(!rt.has(r)){t.n=7;break}if(a=rt.get(r)){t.n=6;break}throw new Error("Pending toast with key ".concat(r," not found"));case 6:return a.count++,t.a(2);case 7:s={options:e,count:1,rafId:0},rt.set(r,s),s.rafId=requestAnimationFrame(n(i().m(function t(){var e;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=rt.get(r)){t.n=1;break}return t.a(2);case 1:if(rt.delete(r),!(at>=3)){t.n=3;break}return ot.push({options:e.options,key:r,count:e.count}),t.n=2,bt();case 2:return t.a(2);case 3:return t.p=3,t.n=4,lt(e.options,r,e.count);case 4:t.n=6;break;case 5:t.p=5,t.v;case 6:return t.a(2)}},t,null,[[3,5]])}))),t.n=9;break;case 8:t.p=8,t.v;case 9:return t.a(2)}},t,null,[[1,8]])})),ct.apply(this,arguments)}function lt(t,e,n){return ft.apply(this,arguments)}function ft(){return(ft=n(i().m(function t(e,n,r){var o,a,s,u,c,l,f,p;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,e&&"object"==typeof e){t.n=1;break}throw new TypeError("options must be an object");case 1:return at++,t.n=2,U(e,X);case 2:if(o=t.v){t.n=3;break}throw new Error("Failed to create toast container");case 3:return t.n=4,H(e,mt);case 4:if(a=t.v){t.n=5;break}throw new Error("Toast element creation failed");case 5:if(s=document.createElement("div"),Object.assign(s.style,{position:"relative",display:"inline-block",overflow:"visible",marginBottom:"10px",zIndex:"0",width:"100%"}),u=document.createElement("div"),Object.assign(u.style,{position:"relative",overflow:"hidden",borderRadius:e.borderRadius||"8px",zIndex:"1"}),u.appendChild(a),s.appendChild(u),o.id.includes("toast-container-")&&o.appendChild(s),c=!1!==e.pauseOnHover&&(!0===e.pauseOnHover||!!e.cta),l={outer:s,toast:a,count:Math.max(1,0|r),timeout:null,pauseOnHover:c},nt.set(n,l),a._key=n,!(l.count>1)){t.n=6;break}return t.n=6,kt(l);case 6:return l.timer=pt(a,e),t.n=7,dt(l);case 7:t.n=10;break;case 8:return t.p=8,t.v,at=Math.max(0,at-1),f=document.querySelector('[id^="toast-container-"]')||document.body,p=f,t.n=9,z(e,mt);case 9:p.appendChild.call(p,t.v);case 10:return t.a(2)}},t,null,[[0,8]])}))).apply(this,arguments)}function pt(t,e){var r=(e.duration||1800)+10,o=new et(n(i().m(function e(){return i().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,mt(t);case 1:return e.a(2,e.v)}},e)})),r);return o.start(),o}function dt(t){return ht.apply(this,arguments)}function ht(){return(ht=n(i().m(function t(e){var n,r,o,a,s,u;return i().w(function(t){for(;;)switch(t.n){case 0:if(e.pauseOnHover&&e.outer&&e.timer){t.n=1;break}return t.a(2);case 1:n=e.outer,r=e.timer,o=()=>{r.pause()},a=()=>{r.resume()},s=t=>{t.target.matches("button, a, [tabindex]")&&r.pause()},u=t=>{n.contains(t.relatedTarget)||r.resume()},n.addEventListener("mouseenter",o),n.addEventListener("mouseleave",a),n.addEventListener("focusin",s),n.addEventListener("focusout",u),n._pauseCleanup=()=>{n.removeEventListener("mouseenter",o),n.removeEventListener("mouseleave",a),n.removeEventListener("focusin",s),n.removeEventListener("focusout",u)};case 2:return t.a(2)}},t)}))).apply(this,arguments)}function mt(t){return yt.apply(this,arguments)}function yt(){return(yt=n(i().m(function t(e){var n,r,o,a,s;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,null!=e&&e._key){t.n=1;break}return t.a(2);case 1:if(a=nt.get(e._key)){t.n=2;break}return t.a(2);case 2:return null===(n=a.timer)||void 0===n||n.clear(),null===(r=a.outer)||void 0===r||null===(o=r._pauseCleanup)||void 0===o||o.call(r),nt.delete(e._key),at=Math.max(0,at-1),(s=a.outer.querySelector(".toast-count-badge"))&&s.remove(),t.n=3,vt(a.outer);case 3:return t.n=4,bt();case 4:t.n=6;break;case 5:t.p=5,t.v;case 6:return t.a(2)}},t,null,[[0,5]])}))).apply(this,arguments)}function bt(){return gt.apply(this,arguments)}function gt(){return(gt=n(i().m(function t(){var e,n;return i().w(function(t){for(;;)switch(t.n){case 0:if(!(at<3&&ot.length)){t.n=3;break}if(e=ot.shift(),!nt.has(e.key)){t.n=2;break}return(n=nt.get(e.key)).count+=e.count,t.n=1,kt(n);case 1:return t.a(3,0);case 2:lt(e.options,e.key,e.count),t.n=0;break;case 3:return t.a(2)}},t)}))).apply(this,arguments)}function vt(t){return wt.apply(this,arguments)}function wt(){return(wt=n(i().m(function t(e){return i().w(function(t){for(;;)switch(t.n){case 0:if(e){t.n=1;break}return t.a(2,Promise.resolve());case 1:return t.a(2,new Promise(t=>{var n=!1,r=()=>{n||(n=!0,p(e),t())},o=e.firstElementChild||e;if(!o)return Promise.resolve();var a=t=>{try{if(t.target!==o)return;o.removeEventListener("transitionend",a,!0),r()}catch(t){}};try{o.addEventListener("transitionend",a,!0)}catch(t){}setTimeout(()=>{try{o.removeEventListener("transitionend",a,!0),r()}catch(t){}},700)}))}},t)}))).apply(this,arguments)}function kt(t){return xt.apply(this,arguments)}function xt(){return(xt=n(i().m(function t(e){var n,r,o,a;return i().w(function(t){for(;;)switch(t.n){case 0:if(n=e.outer,r=e.count,n&&!(!n instanceof HTMLElement)){t.n=1;break}throw new Error("updateBadge: outer must be a valid HTMLElement");case 1:if(!(r<2)){t.n=2;break}return(o=n.querySelector(".toast-count-badge"))&&o.remove(),t.a(2);case 2:(a=n.querySelector(".toast-count-badge"))||((a=document.createElement("span")).className="toast-count-badge",a.setAttribute("aria-label","".concat(r," identical notifications")),Object.assign(a.style,{position:"absolute",top:"6px",right:"6px",backgroundColor:"#f44336",color:"#fff",borderRadius:"50%",minWidth:"20px",height:"20px",fontSize:"12px",fontWeight:"600",display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #fff",boxShadow:"0 2px 6px rgba(0,0,0,0.3)",zIndex:"2",pointerEvents:"none",transition:"transform 150ms ease"}),n.appendChild(a)),a.textContent=r>99?"99+":String(r);try{a.style.transform="scale(1.2)",setTimeout(()=>a.style.transform="scale(1)",150)}catch(t){}case 3:return t.a(2)}},t)}))).apply(this,arguments)}var Ct={success:"#28a745",error:"#dc3545",warning:"#ffc107",info:"#17a2b8"},Et={success:"Operation completed successfully!",error:"Something went wrong!",warning:"Warning message!",info:"Information message!"},Tt=[],St=!1;function Ot(){return jt.apply(this,arguments)}function jt(){return(jt=n(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:if(!St){t.n=1;break}return t.a(2);case 1:"undefined"!=typeof window&&"undefined"!=typeof document&&("complete"===document.readyState||"interactive"===document.readyState?(St=!0,Tt.forEach(t=>setTimeout(()=>It(t),2e3)),Tt.length=0):document.addEventListener("DOMContentLoaded",()=>{St=!0,Tt.forEach(t=>setTimeout(()=>It(t),2e3)),Tt.length=0},{once:!0}));case 2:return t.a(2)}},t)}))).apply(this,arguments)}function It(){return Pt.apply(this,arguments)}function Pt(){return Pt=n(i().m(function t(){var e,n,r,o,a=arguments;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:{},t.p=1,t.n=2,Wt(e);case 2:return n=t.v,t.n=3,Bt(n);case 3:return t.n=4,ut(n);case 4:t.n=6;break;case 5:t.p=5,t.v,o="string"==typeof(null==e?void 0:e.message)&&null!==(null==e?void 0:e.message)?"".concat(null==e||null===(r=e.message)||void 0===r?void 0:r.substring(0,200)," toast creation failed!"):"Toast creation failed!",alert(o);case 6:return t.a(2)}},t,null,[[1,5]])})),Pt.apply(this,arguments)}var Lt=!1;function Mt(){return At.apply(this,arguments)}function At(){return At=n(i().m(function t(){var e,n,r=arguments;return i().w(function(t){for(;;)switch(t.n){case 0:if(e=r.length>0&&void 0!==r[0]?r[0]:{},"undefined"!=typeof window&&"undefined"!=typeof document){t.n=1;break}return t.a(2);case 1:return t.n=2,Ot();case 2:if(St){t.n=3;break}return Tt.push(e),t.a(2);case 3:if(Lt){t.n=5;break}return Lt=!0,n=setTimeout,t.n=4,It(e);case 4:n(t.v,2e3),t.n=6;break;case 5:return t.n=6,It(e);case 6:return t.a(2)}},t)})),At.apply(this,arguments)}function Bt(t){return Dt.apply(this,arguments)}function Dt(){return(Dt=n(i().m(function t(e){var n;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,U(e,X);case 1:return n=t.v,t.a(2,n);case 2:return t.p=2,t.v,t.a(2,document.body)}},t,null,[[0,2]])}))).apply(this,arguments)}function Wt(t){return zt.apply(this,arguments)}function zt(){return(zt=n(i().m(function t(e){var n,r,o,s,u,c,l,f,p,d;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(o=null==e||null===(n=e.position)||void 0===n||null===(n=n.toLowerCase())||void 0===n?void 0:n.trim(),s=null!=o&&o.includes("top-full-width")||null!=o&&o.includes("bottom-full-width")?"100vw":"400px",(u=a(a({},{pauseOnHover:void 0,duration:1800,position:"bottom-right",type:"info",borderRadius:"50px",backgroundColor:void 0,textColor:void 0,showCloseButton:!0,animationDuration:"0.4s",animationType:"fade",animationEasing:"ease",showProgressBar:!0,progressColor:void 0,progressHeight:"4px",progressPosition:"bottom",fontPosition:"relative",fontPadding:void 0,fontBorderRadius:void 0,fontBackgroundColor:void 0,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontSize:"14px",fontWeight:"400",fontLineHeight:"1.4",fontDirection:"auto",wrapText:"normal",maxWidth:s}),"object"!=typeof e||Array.isArray(e)?{}:e)).message=null!==(r=null==e?void 0:e.message)&&void 0!==r?r:u.message,t.p=1,u.backgroundColor||(u.backgroundColor=null!==(l=null===(f=Ct)||void 0===f?void 0:f[u.type])&&void 0!==l?l:window.matchMedia("(prefers-color-scheme: dark)").matches?"#f5f5f5":"#111111"),u.message=u.message||(null===(c=Et)||void 0===c?void 0:c[u.type])||"No Message Provided!",u.textColor||!u.backgroundColor){t.n=3;break}return t.n=2,b(u.backgroundColor);case 2:p=t.v,u.textColor=null==p?void 0:p.color;case 3:if(u.progressColor||!u.backgroundColor){t.n=6;break}if(!u.textColor){t.n=4;break}u.progressColor=u.textColor,t.n=6;break;case 4:return t.n=5,b(u.backgroundColor);case 5:d=t.v,u.progressColor=null==d?void 0:d.color;case 6:t.n=8;break;case 7:t.p=7,t.v;case 8:return"string"!=typeof u.message&&(u.message="No Message Provided!"),t.a(2,u)}},t,null,[[1,7]])}))).apply(this,arguments)}function Rt(t){try{t&&"object"==typeof t&&!Array.isArray(t)&&(Ct=a(a({},Ct),t))}catch(t){}}function _t(t){try{t&&"object"==typeof t&&!Array.isArray(t)&&(Et=a(a({},Et),t))}catch(t){}}var Ft=function(){var t=n(i().m(function t(){var e;return i().w(function(t){for(;;)switch(t.n){case 0:return e=document.querySelector('[id^="toast-"]:not([id*="container"])'),t.n=1,mt(e);case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();try{"undefined"!=typeof window&&(window.customizableToast={createToast:Mt,setDefaultColors:Rt,setDefaultMessages:_t,noop:Ft})}catch(t){}t.createToast=Mt,t.noop=Ft,t.setDefaultColors=Rt,t.setDefaultMessages=_t});
|
|
18
18
|
//# sourceMappingURL=index.umd.js.map
|