customizable-toast-notification 3.12.2 → 3.12.3
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/CHANGELOG.md +7 -0
- package/README.md +7 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +148 -1
- package/dist/index.esm.mjs +3 -3
- 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 +4 -3
- package/postinstall.js +0 -31
package/dist/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Customizable Toast Notifications
|
|
3
|
-
* Build: 2026-09-
|
|
4
|
-
* Cache-Buster:
|
|
3
|
+
* Build: 2026-09-29 18:26:03
|
|
4
|
+
* Cache-Buster: 1790706363973
|
|
5
5
|
* Author: Priyanshu Patel
|
|
6
6
|
* Email: priyanshu.alt191@gmail.com
|
|
7
7
|
* License: Apache-2.0
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Supports flexible positioning, theming, icons, animations, and timing options
|
|
13
13
|
* out of the box — with CTA support and zero dependencies.
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).customizableToast={})}(this,function(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,t,n,r,o,a,i){try{var s=e[a](i),
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).customizableToast={})}(this,function(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,t,n,r,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function r(e){return function(){var t=this,r=arguments;return new Promise(function(o,a){var i=e.apply(t,r);function s(e){n(i,o,a,s,l,"next",e)}function l(e){n(i,o,a,s,l,"throw",e)}s(void 0)})}}function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=d(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}function a(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){a(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function l(){
|
|
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 e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return l(c,"_invoke",function(n,r,o){var a,s,u,l=0,c=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,s=0,u=e,d.n=n,i}};function p(n,r){for(s=n,u=r,t=0;!f&&l&&!o&&t<c.length;t++){var o,a=c[t],p=d.p,h=a[2];n>3?(o=h===r)&&(u=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&p<a[1])?(s=0,d.v=r,d.n=a[1]):p<h&&(o=n<3||a[0]>r||r>h)&&(a[4]=n,a[5]=r,d.n=h,s=0))}if(o||n>1)return i;throw f=!0,r}return function(o,c,h){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,h),s=c,u=h;(t=s<2?e:u)||!f;){a||(s?s<3?(s>1&&(d.n=-1),p(s,u)):d.n=u:d.v=u);try{if(l=2,a){if(s||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),s=1);a=e}else if((t=(f=d.n<0)?u:n.call(r,d))!==i)break}catch(t){a=e,s=1,u=t}finally{l=1}}return{value:t,done:f}}}(n,o,a),!0),c}var i={};function s(){}function c(){}function f(){}t=Object.getPrototypeOf;var d=[][r]?t(t([][r]())):(l(t={},r,function(){return this}),t),p=f.prototype=s.prototype=Object.create(d);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return c.prototype=f,l(p,"constructor",f),l(f,"constructor",c),c.displayName="GeneratorFunction",l(f,o,"GeneratorFunction"),l(p),l(p,o,"Generator"),l(p,r,function(){return this}),l(p,"toString",function(){return"[object Generator]"}),(u=function(){return{w:a,m:h}})()}function l(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}l=function(e,t,n,r){function a(t,n){l(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},l(e,t,n,r)}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw o}}return s}}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,n){if(e){if("string"==typeof e)return t(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}function d(e){var t=Date.now().toString(36),n=Math.floor(1048575*Math.random()).toString(36);return"".concat(e,"-").concat(t,"-").concat(n)}function p(e,t){return h.apply(this,arguments)}function h(){return(h=r(u().m(function e(t,n){var r;return u().w(function(e){for(;;)switch(e.n){case 0:if(t&&n){e.n=1;break}throw new Error("tagName and prefix are required");case 1:return(r=document.createElement(t)).id=d(n),e.a(2,r)}},e)}))).apply(this,arguments)}function m(e){return y.apply(this,arguments)}function y(){return(y=r(u().m(function e(t){var n;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t){e.n=1;break}return e.a(2,!0);case 1:if(e.p=1,null==t||null===(n=t.parentNode)||void 0===n||!n.id.includes("toast-container-")){e.n=2;break}return t.parentNode.removeChild(t),e.a(2,!0);case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:if(e.p=4,!t.remove){e.n=5;break}return t.remove(),e.a(2,!0);case 5:e.n=7;break;case 6:e.p=6,e.v;case 7:return e.p=7,Object.assign(t.style,{display:"none",opacity:"0",pointerEvents:"none",position:"absolute",left:"-9999px"}),e.a(2,!0);case 8:return e.p=8,e.v,e.a(2,!1)}},e,null,[[7,8],[4,6],[1,3]])}))).apply(this,arguments)}function g(e){return v.apply(this,arguments)}function v(){return(v=r(u().m(function e(t){var n,r;return u().w(function(e){for(;;)switch(e.n){case 0:if(!("number"==typeof t&&t>0)){e.n=1;break}return e.a(2,t);case 1:if("string"!=typeof t){e.n=3;break}if(!t.endsWith("s")||t.endsWith("ms")){e.n=2;break}return n=1e3*parseFloat(t),e.a(2,n>0?n:500);case 2:return r=parseFloat(t),e.a(2,r>0?r:500);case 3:return e.a(2,500)}},e)}))).apply(this,arguments)}var b=new class{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;this.maxSize=e,this.map=new Map}get(e){if(this.map.has(e)){var t=this.map.get(e);return this.map.delete(e),this.map.set(e,t),t}}set(e,t){if(this.map.has(e))this.map.delete(e);else if(this.map.size>=this.maxSize){var n=this.map.keys().next().value;this.map.delete(n)}this.map.set(e,t)}}(200),w={};function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!e)return"snow";var n,r,o,a="".concat(e,"|").concat(t),i=b.get(a);if(i)return i;if(w[null==e?void 0:e.toLowerCase()]){var s=w[e.toLowerCase()];return b.set(a,s),s}try{var u=function(e){var t=null==e?void 0:e.match(/^#([0-9a-f]{3,8})$/i);if(t){var n=t[1];return 3===n.length&&(n=n.split("").map(e=>e+e).join("")),{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16)}}var r=null==e?void 0:e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)/i);if(r)return{r:Number(r[1]),g:Number(r[2]),b:Number(r[3])};var o=null==e?void 0:e.match(/hsla?\(\s*([\d.]+)(?:deg)?\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*[\d.]+)?\)/i);if(o){var a=Number(o[1])/360,i=Number(o[2])/100,s=Number(o[3])/100;if(0===i){var u=Math.round(255*s);return{r:u,g:u,b:u}}var l=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e),c=s<.5?s*(1+i):s+i-s*i,f=2*s-c;return{r:Math.round(255*l(f,c,a+1/3)),g:Math.round(255*l(f,c,a)),b:Math.round(255*l(f,c,a-1/3))}}return null}(function(e){var t,n=null==e?void 0:e.match(/^var\((--[\w-]+)(?:\s*,\s*(.+))?\)$/i);if(!n)return e;try{if("undefined"!=typeof document&&"function"==typeof getComputedStyle){var r=getComputedStyle(document.documentElement).getPropertyValue(n[1]).trim();if(r)return r}}catch(e){}return(null===(t=n[2])||void 0===t?void 0:t.trim())||e}(e));if(!u)throw new Error("Unknown color");n=u.r,r=u.g,o=u.b}catch(e){n=r=o=128}n=Math.round(n*t+255*(1-t)),r=Math.round(r*t+255*(1-t)),o=Math.round(o*t+255*(1-t));var l=(e,t,n)=>{var r=[e,t,n].map(e=>(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4));return.2126*r[0]+.7152*r[1]+.0722*r[2]},f=(e,t)=>{var n=l(...e),r=l(...t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},d=((e,t,n)=>{e/=255,t/=255,n/=255;var r,o,a=Math.max(e,t,n),i=Math.min(e,t,n),s=(a+i)/2;if(a===i)r=o=0;else{var u=a-i;switch(o=s>.5?u/(2-a-i):u/(a+i),a){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return[360*r,o,s]})(n,r,o),p=c(d,3),h=p[0],m=p[1],y=p[2],g=((e,t,n)=>{var r,o,a;if(e/=360,0===t)r=o=a=n;else{var i=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e),s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;r=i(u,s,e+1/3),o=i(u,s,e),a=i(u,s,e-1/3)}return[Math.round(255*r),Math.round(255*o),Math.round(255*a)]})(h,m,y<.5?Math.min(y+.5,1):Math.max(y-.5,0)),v=c(g,3),k=v[0],x=v[1],C=v[2];if(f([n,r,o],[k,x,C])<4.5){var E=c(f([n,r,o],[0,0,0])>=f([n,r,o],[255,255,255])?[0,0,0]:[255,255,255],3);k=E[0],x=E[1],C=E[2]}var S=((e,t,n)=>"#".concat(e.toString(16).padStart(2,"0")).concat(t.toString(16).padStart(2,"0")).concat(n.toString(16).padStart(2,"0")))(k,x,C);return b.set(a,S),S}Object.entries({aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}).forEach(e=>{var t=c(e,2),n=t[0],r=c(t[1],3),o=r[0],a=r[1],i=r[2],s=e=>{var t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)},u=.2126*s(o)+.7152*s(a)+.0722*s(i),l=(u+.05)/.05,f=1.05/(u+.05);w[n.toLowerCase()]=l>=f?"#000000":"#ffffff"});var x=new Set(["DIV","SPAN","P","BR","STRONG","B","EM","I","U","SMALL","UL","OL","LI","A","IMG","PRE","CODE","MARK"]),C=new Set(["href","src","alt","title","class","target","rel"]);function E(e){if(!e||"string"!=typeof e)return"";var t=e.replace(/<\/?(script|iframe|object|embed|link|meta|style|form|input|button)[^>]*>/gi,"");t=(t=t.replace(/\s(on\w+)\s*=\s*(['"])[\s\S]*?\2/gi,"")).replace(/(href|src)\s*=\s*(['"])\s*javascript:[^'"]*\2/gi,"$1=$2#$2");var n=document.createElement("div");function r(e){if(e.nodeType===Node.TEXT_NODE)return document.createTextNode(e.nodeValue);if(e.nodeType!==Node.ELEMENT_NODE)return null;var t=e.tagName.toUpperCase();if(!x.has(t)){var n=document.createDocumentFragment();return Array.from(e.childNodes).forEach(e=>{var t=r(e);t&&n.appendChild(t)}),n}var o=document.createElement(e.tagName);return Array.from(e.attributes||[]).forEach(t=>{var n=t.name.toLowerCase(),r=t.value;C.has(n)&&("href"!==n&&"src"!==n||!/^\s*javascript:/i.test(r))&&("src"!==n||/^\s*(https?:|data:image\/)/i.test(r))&&("target"===n&&"_blank"===r&&o.setAttribute("rel",(e.getAttribute("rel")||"")+" noopener noreferrer"),o.setAttribute(n,r))}),Array.from(e.childNodes).forEach(e=>{var t=r(e);t&&o.appendChild(t)}),o}n.innerHTML=t;var o=document.createDocumentFragment();Array.from(n.childNodes).forEach(e=>{var t=r(e);t&&o.appendChild(t)});var a=document.createElement("div");return a.appendChild(o),a.innerHTML}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return"";try{if(!t.forceFallback&&function(){try{if("undefined"!=typeof window&&window.DOMPurify)return!0}catch(e){}return!1}()){var n=window.DOMPurify.sanitize(e,{ALLOWED_TAGS:Array.from(x),ALLOWED_ATTR:Array.from(C),ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|ftp|tel|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i}),r=document.createElement("div");return r.innerHTML=n,r.querySelectorAll('a[target="_blank"]').forEach(e=>{var t=(e.getAttribute("rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),e.setAttribute("rel",t.join(" "))}),r.innerHTML}}catch(e){}return E(e)}function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.size||14,n=e.color||"currentColor",r=e.text||"",o=document.createElement("span");o.className="toast-loader",o.style.display="inline-flex",o.style.alignItems="center",o.style.gap="8px";var a="http://www.w3.org/2000/svg",i=document.createElementNS(a,"svg");i.setAttribute("width",String(t)),i.setAttribute("height",String(t)),i.setAttribute("viewBox","0 0 50 50"),i.setAttribute("aria-hidden","true");var s=document.createElementNS(a,"circle");if(s.setAttribute("cx","25"),s.setAttribute("cy","25"),s.setAttribute("r","20"),s.setAttribute("fill","none"),s.setAttribute("stroke",n),s.setAttribute("stroke-width","4"),s.setAttribute("stroke-linecap","round"),s.style.opacity="0.85",s.style.strokeDasharray="90",s.style.strokeDashoffset="60",s.style.transformOrigin="center",s.style.animation="toast-spinner 1s linear infinite",i.appendChild(s),o.appendChild(i),r){var u=document.createElement("span");u.style.fontSize="13px",u.textContent=r,o.appendChild(u)}if(!document.getElementById("toast-spinner-styles")){var l=document.createElement("style");l.id="toast-spinner-styles",l.innerHTML="@keyframes toast-spinner { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }",document.head.appendChild(l)}return o}function A(e,t,n){var o=null==t?void 0:t.cta;if(o){var a=s({},o);a.label||(a.label="CTA Label Missing!");var i=!!a.href&&"link"===a.variant,l=document.createElement(i?"a":"button");i?(l.href=a.href,a.target&&(l.target=a.target),l.rel=a.rel||("_blank"===a.target?"noopener noreferrer":"")):l.type="button",l.setAttribute("aria-label",a.ariaLabel||a.label),Object.assign(l.style,{marginLeft:"10px",padding:"6px 10px",borderRadius:"6px",fontSize:"12px",fontWeight:"600",lineHeight:"1",border:"1px solid rgba(255,255,255,0.35)",color:t.textColor||"#fff",background:"rgba(255,255,255,0.15)",cursor:"pointer",whiteSpace:"nowrap",flexShrink:"0"}),l.textContent=a.label;var c=function(){var t=r(u().m(function t(r){var o;return u().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==(o=a.onClick(r))||!o.then){t.n=1;break}return t.n=1,o;case 1:return t.p=1,!1!==a.autoClose&&n(e),t.f(1);case 2:return t.a(2)}},t,null,[[0,,1,2]])}));return function(e){return t.apply(this,arguments)}}();l.addEventListener("click",c),l._cleanup=()=>l.removeEventListener("click",c),e.appendChild(l)}}function O(e,t,n){var r=document.createElement("button");r.setAttribute("aria-label","Close notification"),r.setAttribute("title","Close"),r.textContent="×",Object.assign(r.style,{background:"none",border:"none",color:t.textColor||"white",fontSize:"18px",marginLeft:"10px",cursor:"pointer"});var o=()=>n(e);r.addEventListener("click",o),e._cleanupCloseButton=()=>{r.removeEventListener("click",o)},e.appendChild(r)}function L(e,t){var n=document.createElement("div"),r=t.borderRadius||0,o=parseInt(r,10),a=o?"12px":"0",i=o?12:0,s=Math.max(o-10,i),u=o?"calc(100% - ".concat(s,"px)"):"100%",l=parseInt(t.progressHeight,10)||4;Object.assign(n.style,{position:"absolute",left:"".concat(a),height:"".concat(l,"px"),background:t.progressColor||"rgba(255, 255, 255, 0.3)",width:"".concat(u),transition:"width ".concat(t.duration||1800,"ms linear"),["top"===t.progressPosition?"top":"bottom"]:"0",borderRadius:"".concat(l/2,"px")}),e.appendChild(n),"function"==typeof n.animate?e._progressAnimation=n.animate([{width:u},{width:"0%"}],{duration:Number(t.duration)||1800,easing:"linear",fill:"forwards",delay:50}):(n.style.transition="width ".concat(t.duration||1800,"ms linear"),setTimeout(()=>{n.offsetWidth,n.style.width="0%"},50))}function M(e){setTimeout(()=>{requestAnimationFrame(()=>{e.style.opacity="1",e.style.transform="translateY(0)"})},50)}function j(e,t,n){return I.apply(this,arguments)}function I(){return(I=r(u().m(function e(t,n,r){var o,a,i,s,l,c,f,d,p,h;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,g(null==n?void 0:n.animationDuration);case 1:if(i=e.v,t.className="toast toast-".concat(null!==(o=null==n?void 0:n.type)&&void 0!==o?o:"info"),Object.assign(t.style,{background:null==n?void 0:n.backgroundColor,padding:"12px 16px",marginBottom:"10px",borderRadius:null==n?void 0:n.borderRadius,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"space-between",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",minWidth:"250px",maxWidth:null==n?void 0:n.maxWidth,opacity:"0",position:"relative",cursor:"default",boxSizing:"border-box",userSelect:"text",transition:"opacity ".concat(null==n?void 0:n.animationDuration," ").concat(null==n?void 0:n.animationEasing,", transform ").concat(null==n?void 0:n.animationDuration," ").concat(null==n?void 0:n.animationEasing),transform:"translateY(20px)",zIndex:"9999"}),t.setAttribute("role","alert"),t.setAttribute("aria-live","polite"),t.tabIndex=0,t._animationDuration=i,s=document.createElement("span"),null!=n&&n.wrapText?Object.assign(s.style,{display:"block",whiteSpace:"normal"}):Object.assign(s.style,{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"3",whiteSpace:"nowrap"}),Object.assign(s.style,{flex:"1",padding:null==n?void 0:n.fontPadding,fontFamily:null==n?void 0:n.fontFamily,fontSize:null==n?void 0:n.fontSize,fontWeight:null==n?void 0:n.fontWeight,lineHeight:null==n?void 0:n.fontLineHeight,color:null==n?void 0:n.textColor,userSelect:"text",wordBreak:"break-word",overflow:"hidden",textOverflow:"ellipsis"}),l=!!n.allowHtml,c=null!==(a=n.message)&&void 0!==a?a:"",(n.loader||n.showLoader)&&(f=T(n.loader||{}),s.appendChild(f),(d=document.createElement("span")).style.display="inline-block",d.style.width="8px",s.appendChild(d)),l&&"string"==typeof c&&c.trim().length>0)try{for(p=S(c),(h=document.createElement("div")).innerHTML=p;h.firstChild;)s.appendChild(h.firstChild)}catch(e){console.warn("HTML message sanitization failed, falling back to text:",e),s.textContent=c}else s.textContent=String(c);s.setAttribute("aria-label","Toast Notification Center"),s.setAttribute("title","string"==typeof c?c.replace(/<[^>]+>/g,""):String(c)),t.appendChild(s),null!=n&&n.cta&&0!==Object.keys(n.cta).length&&A(t,n,r),null!=n&&n.showCloseButton&&O(t,n,r),null!=n&&n.showProgressBar&&L(t,n),M(t);case 2:return e.a(2)}},e)}))).apply(this,arguments)}function P(e,t){return D.apply(this,arguments)}function D(){return(D=r(u().m(function e(t,n){var r,o,a,i,s;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:for(e.p=0,r=document.createElement("div"),Object.assign(r.style,{background:"#333",color:"white",padding:"10px 15px",position:"fixed",top:"20px",right:"20px",zIndex:"99999",borderRadius:"3px",maxWidth:"250px",wordWrap:"break-word",boxShadow:"0 2px 10px rgba(0,0,0,0.3)",cursor:"pointer"}),o=document.createElement("div"),(a=document.createElement("span")).style.display="inline-block",t.allowHtml?a.innerHTML=S(String(t.message||"Emergency Toast Showing!")):a.textContent=String(t.message||"Emergency Toast Creation Showing!"),o.appendChild(a),(i=document.createElement("span")).style.cssText="float: right; margin-left: 10px; font-weight: bold;",i.textContent="×",o.appendChild(i);r.firstChild;)r.removeChild(r.firstChild);return r.appendChild(o),i.onclick=()=>{r.remove(),n(r)},document.body.appendChild(r),setTimeout(()=>{r.remove(),n(r)},null==t?void 0:t.duration),e.a(2,r);case 1:return e.p=1,s=e.v,console.error("Emergency toast creation failed:",s),setTimeout(()=>{alert((null==t?void 0:t.message)||"Emergency Toast Creation Showing!"),n(null)},100),e.a(2,null)}},e,null,[[0,1]])}))).apply(this,arguments)}function N(e,t){return z.apply(this,arguments)}function z(){return(z=r(u().m(function e(t,n){var r,o;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(document.querySelector('[id^="toast-container-"]')){e.n=1;break}return e.a(2,null);case 1:return e.p=2,e.n=3,p("div","toast");case 3:return r=e.v,e.n=4,j(r,t,n);case 4:return e.a(2,r);case 5:return e.p=5,o=e.v,console.warn("toast creation failed with error showing fallback one: ",o),e.n=6,P(t,n);case 6:return r=e.v,e.a(2,r)}},e,null,[[2,5]])}))).apply(this,arguments)}var B=new Map,_=new Map;function W(e){return"toast-container-".concat(function(e){return String(e).toLowerCase().trim().replace(/\bbelow\b/g,"bottom").replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"-").replace(/-{2,}/g,"-")}(e))}function H(e,t){return R.apply(this,arguments)}function R(){return R=r(u().m(function e(t,n){var o,a,i;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(o=W(t.position),!_.has(o)){e.n=1;break}return e.a(2,_.get(o));case 1:return a=r(u().m(function e(){var r,a,i,s;return u().w(function(e){for(;;)switch(e.n){case 0:if(null==(r=B.get(o))||!r.isConnected){e.n=1;break}return e.a(2,r);case 1:if((a=document.getElementById(o))&&!a.isConnected&&document.body.appendChild(a),a){e.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 n){e.n=2;break}return e.n=2,n(a,t);case 2:document.body.appendChild(a),e.n=4;break;case 3:if(a.style.position=a.style.position||"fixed",a.style.zIndex=a.style.zIndex||"9999","function"!=typeof n){e.n=4;break}return e.n=4,n(a,t);case 4:if((i=document.querySelectorAll("#".concat(o))).length>1)for(s=1;s<i.length;s++)try{i[s].remove()}catch(e){}return B.set(o,a),e.a(2,a)}},e)}))(),_.set(o,a),e.p=2,e.n=3,a;case 3:return i=e.v,e.a(2,i);case 4:return e.p=4,_.delete(W(t.position)),e.f(4);case 5:return e.a(2)}},e,null,[[2,,4,5]])})),R.apply(this,arguments)}function q(e,t){return F.apply(this,arguments)}function F(){return(F=r(u().m(function e(t,n){var r;return u().w(function(e){for(;;)switch(e.n){case 0:if(t&&n.position){e.n=1;break}throw new Error("Invalid container or position!");case 1:if(G(t),r=U(n.position),!$(t,n,r)){e.n=2;break}return e.a(2);case 2:if(!X(t,r)){e.n=3;break}return e.a(2);case 3:Y(t,r);case 4:return e.a(2)}},e)}))).apply(this,arguments)}function G(e){e.style.top="auto",e.style.bottom="auto",e.style.left="auto",e.style.right="auto",e.style.transform="none"}function U(e){var t=e.toLowerCase().trim();return{hasTop:t.includes("top"),hasBottom:t.includes("bottom")||t.includes("below"),hasLeft:t.includes("left"),hasRight:t.includes("right"),hasCenter:t.includes("center"),hasFullWidth:t.includes("top-full-width")||t.includes("bottom-full-width")||t.includes("fullwidth")}}function $(e,t,n){return!!n.hasFullWidth&&(n.hasTop?(t.maxWidth="100vw",e.style.top="10px",e.style.left="10px",e.style.right="10px",!0):!!n.hasBottom&&(t.maxWidth="100vw",e.style.bottom="10px",e.style.left="10px",e.style.right="10px",!0))}function X(e,t){return!!t.hasCenter&&(!t.hasTop||t.hasLeft||t.hasRight?!t.hasBottom||t.hasLeft||t.hasRight?!t.hasLeft||t.hasTop||t.hasBottom?!t.hasRight||t.hasTop||t.hasBottom?!(t.hasLeft||t.hasRight||t.hasTop||t.hasBottom)&&(e.style.top="50%",e.style.left="50%",e.style.transform="translate(-50%, -50%)",!0):(e.style.right="10px",e.style.top="50%",e.style.transform="translateY(-50%)",!0):(e.style.left="10px",e.style.top="50%",e.style.transform="translateY(-50%)",!0):(e.style.bottom="10px",e.style.left="50%",e.style.transform="translateX(-50%)",!0):(e.style.top="10px",e.style.left="50%",e.style.transform="translateX(-50%)",!0))}function Y(e,t){t.hasBottom?e.style.bottom="10px":t.hasTop&&(e.style.top="10px"),t.hasRight?e.style.right="10px":t.hasLeft?e.style.left="10px":(t.hasBottom||t.hasTop||(e.style.bottom="10px"),e.style.left="50%",e.style.transform="translateX(-50%)")}class V{constructor(e,t){this.callback=e,this.delay=t,this.remaining=t,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 K=new Map,J=new Map,Q=[],Z=0;function ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=String(e.type).trim().toLowerCase(),n=function(e){for(var t=5381,n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n);return t>>>0}(String(e.message||"")).toString(16),r=String(e.position).trim().toLowerCase();return"".concat(t,"|").concat(n,"|").concat(r)}function te(){return ne.apply(this,arguments)}function ne(){return ne=r(u().m(function e(){var t,n,o,a,i,s,l=arguments;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t=l.length>0&&void 0!==l[0]?l[0]:{},e.p=1,n=ee(t),!K.has(n)){e.n=5;break}if(o=K.get(n)){e.n=2;break}throw new Error("Active toast with key ".concat(n," not found"));case 2:return o.count++,o.timer.clear(),o.timer=le(o.toast,t),e.n=3,ce(o);case 3:return e.n=4,we(o);case 4:return e.a(2,n);case 5:if(!J.has(n)){e.n=7;break}if(a=J.get(n)){e.n=6;break}throw new Error("Pending toast with key ".concat(n," not found"));case 6:return a.count++,e.a(2,n);case 7:return i={options:t,count:1,rafId:0},J.set(n,i),i.rafId=requestAnimationFrame(r(u().m(function e(){var t,r;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t=J.get(n)){e.n=1;break}return e.a(2);case 1:if(J.delete(n),!(Z>=3)){e.n=3;break}return Q.push({options:t.options,key:n,count:t.count}),e.n=2,ye();case 2:return e.a(2);case 3:return e.p=3,e.n=4,re(t.options,n,t.count);case 4:e.n=6;break;case 5:e.p=5,r=e.v,console.error("showToast failed:",r);case 6:return e.a(2)}},e,null,[[3,5]])}))),e.a(2,n);case 8:e.p=8,s=e.v,console.error("showToast failed:",s);case 9:return e.a(2)}},e,null,[[1,8]])})),ne.apply(this,arguments)}function re(e,t,n){return oe.apply(this,arguments)}function oe(){return(oe=r(u().m(function e(t,n,r){var o,a,i,s,l,c,f,d,p;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,t&&"object"==typeof t){e.n=1;break}throw new TypeError("options must be an object");case 1:return Z++,e.n=2,H(t,q);case 2:if(o=e.v){e.n=3;break}throw new Error("Failed to create toast container");case 3:return e.n=4,N(t,de);case 4:if(a=e.v){e.n=5;break}throw new Error("Toast element creation failed");case 5:if(i=document.createElement("div"),Object.assign(i.style,{position:"relative",display:"inline-block",overflow:"visible",marginBottom:"10px",zIndex:"0",width:"100%"}),s=document.createElement("div"),Object.assign(s.style,{position:"relative",overflow:"hidden",zIndex:"1"}),s.appendChild(a),i.appendChild(s),o.id.includes("toast-container-")&&o.appendChild(i),l=!1!==t.pauseOnHover&&(!0===t.pauseOnHover||!!t.cta),c={outer:i,toast:a,count:Math.max(1,Math.floor(null!=r?r:0)),timeout:null,pauseOnHover:l},K.set(n,c),a._key=n,!(c.count>1)){e.n=6;break}return e.n=6,we(c);case 6:return c.timer=le(a,t),e.n=7,ce(c);case 7:e.n=10;break;case 8:return e.p=8,d=e.v,console.error("Something went wrong: ",d),Z=Math.max(0,Z-1),f=document.querySelector('[id^="toast-container-"]')||document.body,p=f,e.n=9,P(t,de);case 9:p.appendChild.call(p,e.v);case 10:return e.a(2)}},e,null,[[0,8]])}))).apply(this,arguments)}function ae(){return(ae=r(u().m(function e(){var t,n,r,o,a,i,s;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,0!==K.size){e.n=1;break}return e.a(2);case 1:if(t=null,document.querySelectorAll('[id^="toast-container-"]').forEach(e=>{var n=Array.from(e.children||[]);if(0!==n.length){var r=n.at(-1);r&&(t=r.querySelector('[id^="toast-"]')||r)}}),t||(n=Array.from(K.entries())).length>0&&(r=n.at(-1),o=c(r,2),a=o[1],t=a.toast||a.outer&&a.outer.querySelector('[id^="toast-"]')),t){e.n=2;break}return e.a(2);case 2:return i=t._key?t:t.querySelector('[id^="toast-"]')||t,e.n=3,de(i);case 3:e.n=5;break;case 4:e.p=4,s=e.v,console.error("dismissMostRecent failed:",s);case 5:return e.a(2)}},e,null,[[0,4]])}))).apply(this,arguments)}function ie(){return(ie=r(u().m(function e(){var t,n,r,a,i,s,l;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:e.p=0,t=Array.from(K.values()).map(e=>e.toast).filter(Boolean),Q.length=0,J.clear(),n=o(t),e.p=1,n.s();case 2:if((r=n.n()).done){e.n=7;break}return a=r.value,e.p=3,e.n=4,de(a);case 4:e.n=6;break;case 5:e.p=5,i=e.v,console.warn("closeAllToasts: failed to close one toast:",i);case 6:e.n=2;break;case 7:e.n=9;break;case 8:e.p=8,s=e.v,n.e(s);case 9:return e.p=9,n.f(),e.f(9);case 10:e.n=12;break;case 11:e.p=11,l=e.v,console.error("closeAllToasts failed:",l);case 12:return e.a(2)}},e,null,[[3,5],[1,8,9,10],[0,11]])}))).apply(this,arguments)}var se=function(){return ae.apply(this,arguments)},ue=function(){return ie.apply(this,arguments)};function le(e,t){var n,o=Number(null!==(n=t.duration)&&void 0!==n?n:1800)+5,a=new V(r(u().m(function t(){return u().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,de(e);case 1:return t.a(2,t.v)}},t)})),o);return a.start(),a}function ce(e){return fe.apply(this,arguments)}function fe(){return(fe=r(u().m(function e(t){var n,r,o,a,i,s,l;return u().w(function(e){for(;;)switch(e.n){case 0:if(t.pauseOnHover&&t.outer&&t.timer){e.n=1;break}return e.a(2);case 1:n=t.outer,r=t.timer,o=t.toast,a=()=>{var e;r.pause(),null==o||null===(e=o._progressAnimation)||void 0===e||e.pause()},i=()=>{var e;r.resume(),null==o||null===(e=o._progressAnimation)||void 0===e||e.play()},s=e=>{var t;e.target.matches("[tabindex], div, span, button, a")&&(r.pause(),null==o||null===(t=o._progressAnimation)||void 0===t||t.pause())},l=e=>{var t;n.contains(e.relatedTarget)||(r.resume(),null==o||null===(t=o._progressAnimation)||void 0===t||t.play())},n.addEventListener("mouseenter",a),n.addEventListener("mouseleave",i),n.addEventListener("focusin",s),n.addEventListener("focusout",l),n._pauseCleanup=()=>{n.removeEventListener("mouseenter",a),n.removeEventListener("mouseleave",i),n.removeEventListener("focusin",s),n.removeEventListener("focusout",l)};case 2:return e.a(2)}},e)}))).apply(this,arguments)}function de(e){return pe.apply(this,arguments)}function pe(){return(pe=r(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:if(null!=t&&t._key){e.n=1;break}return e.a(2);case 1:return e.a(2,he(t._key))}},e)}))).apply(this,arguments)}function he(e){return me.apply(this,arguments)}function me(){return(me=r(u().m(function e(t){var n,r,o,a,i,s,l,c;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,t){e.n=1;break}return e.a(2);case 1:if(!(a=J.get(t))){e.n=2;break}return cancelAnimationFrame(a.rafId),J.delete(t),e.a(2);case 2:if(-1===(i=Q.findIndex(e=>e.key===t))){e.n=3;break}return Q.splice(i,1),e.a(2);case 3:if(s=K.get(t)){e.n=4;break}return e.a(2);case 4:return null===(n=s.timer)||void 0===n||n.clear(),null===(r=s.outer)||void 0===r||null===(o=r._pauseCleanup)||void 0===o||o.call(r),K.delete(t),Z=Math.max(0,Z-1),(l=s.outer.querySelector(".toast-count-badge"))&&l.remove(),e.n=5,ve(s.outer);case 5:return e.n=6,ye();case 6:e.n=8;break;case 7:e.p=7,c=e.v,console.error("Closing Toast failed!: ",c);case 8:return e.a(2)}},e,null,[[0,7]])}))).apply(this,arguments)}function ye(){return ge.apply(this,arguments)}function ge(){return(ge=r(u().m(function e(){var t,n;return u().w(function(e){for(;;)switch(e.n){case 0:if(!(Z<3&&Q.length)){e.n=3;break}if(t=Q.shift(),!K.has(t.key)){e.n=2;break}return(n=K.get(t.key)).count+=t.count,e.n=1,we(n);case 1:return e.a(3,0);case 2:re(t.options,t.key,t.count),e.n=0;break;case 3:return e.a(2)}},e)}))).apply(this,arguments)}function ve(e){return be.apply(this,arguments)}function be(){return(be=r(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:if(t){e.n=1;break}return e.a(2,Promise.resolve());case 1:return e.a(2,new Promise(e=>{var n=!1,r=()=>{n||(n=!0,m(t),e())},o=t.firstElementChild||t;if(!o)return e();var a=e=>{try{if(e.target!==o)return;o.removeEventListener("transitionend",a,!0),r()}catch(e){console.error("removeWithTransition error:",e)}};try{o.addEventListener("transitionend",a,!0)}catch(e){console.error("removeWithTransition error:",e)}setTimeout(()=>{try{o.removeEventListener("transitionend",a,!0),r()}catch(e){console.error("removeWithTransition error:",e)}},700)}))}},e)}))).apply(this,arguments)}function we(e){return ke.apply(this,arguments)}function ke(){return(ke=r(u().m(function e(t){var n,r,o,a;return u().w(function(e){for(;;)switch(e.n){case 0:if(n=t.outer,r=t.count,n&&n instanceof HTMLElement){e.n=1;break}throw new Error("updateBadge: outer must be a valid HTMLElement");case 1:if(!(r<2)){e.n=2;break}return(o=n.querySelector(".toast-count-badge"))&&o.remove(),e.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(e){console.error("updateBadge animation error:",e)}case 3:return e.a(2)}},e)}))).apply(this,arguments)}var xe={success:"#28a745",error:"#dc3545",warning:"#ffc107",info:"#17a2b8"},Ce={success:"Operation completed successfully!",error:"Something went wrong!",warning:"Warning message!",info:"Information message!"},Ee=[],Se=!1;function Te(){return Ae.apply(this,arguments)}function Ae(){return(Ae=r(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:if(!Se){e.n=1;break}return e.a(2);case 1:"undefined"!=typeof window&&"undefined"!=typeof document&&("complete"===document.readyState||"interactive"===document.readyState?(Se=!0,Ee.forEach(e=>setTimeout(()=>Oe(e),200)),Ee.length=0):document.addEventListener("DOMContentLoaded",()=>{Se=!0,Ee.forEach(e=>setTimeout(()=>Oe(e),200)),Ee.length=0},{once:!0}));case 2:return e.a(2)}},e)}))).apply(this,arguments)}function Oe(){return Le.apply(this,arguments)}function Le(){return Le=r(u().m(function e(){var t,n,r,o,a=arguments;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.p=1,e.n=2,Pe(t);case 2:return n=e.v,e.n=3,je(n);case 3:return e.n=4,te(n);case 4:return e.a(2,e.v);case 5:return e.p=5,o=e.v,console.error("CreateToast failed:",o),r="string"==typeof(null==t?void 0:t.message)&&null!==(null==t?void 0:t.message)?"".concat(t.message.substring(0,200)," toast creation failed!"):"Toast creation failed!",alert(r),e.a(2,null)}},e,null,[[1,5]])})),Le.apply(this,arguments)}function Me(){return Me=r(u().m(function e(){var t,n=arguments;return u().w(function(e){for(;;)switch(e.n){case 0:if(t=n.length>0&&void 0!==n[0]?n[0]:{},"undefined"!=typeof window&&"undefined"!=typeof document){e.n=1;break}return console.warn("ToastNotification: running in non-browser environment, no DOM available."),e.a(2,null);case 1:return e.n=2,Te();case 2:if(Se){e.n=3;break}return Ee.push(t),e.a(2,null);case 3:return e.n=4,Oe(t);case 4:return e.a(2,e.v)}},e)})),Me.apply(this,arguments)}function je(e){return Ie.apply(this,arguments)}function Ie(){return(Ie=r(u().m(function e(t){var n;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,H(t,q);case 1:return e.a(2,e.v);case 2:return e.p=2,n=e.v,console.error("Failed to create toast container:",n),e.a(2,document.body)}},e,null,[[0,2]])}))).apply(this,arguments)}function Pe(e){return De.apply(this,arguments)}function De(){return(De=r(u().m(function e(t){var n,r,o,a,i,l,c,f;return u().w(function(e){for(;;)if(0===e.n){o=null==t||null===(n=t.position)||void 0===n||null===(n=n.toLowerCase())||void 0===n?void 0:n.trim(),a=null!=o&&o.includes("top-full-width")||null!=o&&o.includes("bottom-full-width")?"100vw":"400px",(i=s(s({},{allowHtml:!1,sanitizeHtml:!0,pauseOnHover:void 0,duration:2500,position:"bottom-right",type:"info",borderRadius:"50px",backgroundColor:void 0,textColor:void 0,showCloseButton:!0,animationDuration:"0.4s",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:a}),"object"!=typeof t||Array.isArray(t)?{}:t)).message=null!==(r=null==t?void 0:t.message)&&void 0!==r?r:i.message;try{i.backgroundColor||(i.backgroundColor=null!==(l=null===(c=xe)||void 0===c?void 0:c[i.type])&&void 0!==l?l:window.matchMedia("(prefers-color-scheme: dark)").matches?"#f5f5f5":"#111111")}catch(e){console.warn("Background color resolution failed:",e)}try{i.message=i.message||(null===(f=Ce)||void 0===f?void 0:f[i.type])||"No Message Provided!"}catch(e){console.warn("Default message resolution failed:",e)}try{!i.textColor&&i.backgroundColor&&(i.textColor=k(i.backgroundColor))}catch(e){console.warn("Text color resolution failed:",e)}try{!i.progressColor&&i.backgroundColor&&(i.progressColor=i.textColor||k(i.backgroundColor))}catch(e){console.warn("Progress bar color resolution failed:",e)}return"string"!=typeof i.message&&(i.message="No Message Provided!"),e.a(2,i)}},e)}))).apply(this,arguments)}function Ne(e){try{e&&"object"==typeof e&&!Array.isArray(e)&&(xe=s(s({},xe),e))}catch(e){console.error("setDefaultColors failed:",e)}}function ze(e){try{e&&"object"==typeof e&&!Array.isArray(e)&&(Ce=s(s({},Ce),e))}catch(e){console.error("setDefaultMessages failed:",e)}}var Be=!1,_e=null;function We(e){return He.apply(this,arguments)}function He(){return(He=r(u().m(function e(t){var n;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!Be||!_e){e.n=4;break}return e.p=1,e.n=2,_e;case 2:e.n=4;break;case 3:e.p=3,n=e.v,console.warn("Previous close operation failed (continuing anyway):",n);case 4:return e.a(2,t())}},e,null,[[1,3]])}))).apply(this,arguments)}var Re=function(){return Me.apply(this,arguments)};function qe(){return Fe.apply(this,arguments)}function Fe(){return Fe=r(u().m(function e(){var t,n,r=arguments;return u().w(function(e){for(;;)switch(e.n){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.n=1,We(()=>Re(t));case 1:return n=e.v,e.a(2,{dismiss:()=>n?he(n):Promise.resolve()})}},e)})),Fe.apply(this,arguments)}var Ge=function(){var e=r(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return Be=!0,_e=r(u().m(function e(){return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,se();case 1:return e.p=1,Be=!1,_e=null,e.f(1);case 2:return e.a(2)}},e,null,[[0,,1,2]])}))(),e.n=1,_e;case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),Ue=function(){var e=r(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return Be=!0,_e=r(u().m(function e(){return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,ue();case 1:return e.p=1,Be=!1,_e=null,e.f(1);case 2:return e.a(2)}},e,null,[[0,,1,2]])}))(),e.n=1,_e;case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();function $e(e){return Xe.apply(this,arguments)}function Xe(){return Xe=r(u().m(function e(t){var n,r,o,a,i,l,c,f,d,p,h,m,y=arguments;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return o=y.length>2&&void 0!==y[2]?y[2]:{},a=null!==(n=(r=y.length>1&&void 0!==y[1]?y[1]:{}).loading)&&void 0!==n?n:"Loading...",e.n=1,qe(s(s({},o),{},{type:"info",message:a,duration:864e5,showProgressBar:!1}));case 1:return i=e.v,l="function"==typeof t?t():t,e.p=2,e.n=3,l;case 3:return f=e.v,e.n=4,i.dismiss();case 4:return d="function"==typeof r.success?r.success(f):null!==(c=r.success)&&void 0!==c?c:"Done!",e.n=5,qe(s(s({},o),{},{type:"success",message:d}));case 5:return e.a(2,f);case 6:return e.p=6,m=e.v,e.n=7,i.dismiss();case 7:return h="function"==typeof r.error?r.error(m):null!==(p=r.error)&&void 0!==p?p:"Something went wrong.",e.n=8,qe(s(s({},o),{},{type:"error",message:h}));case 8:throw m;case 9:return e.a(2)}},e,null,[[2,6]])})),Xe.apply(this,arguments)}if("undefined"!=typeof window&&"undefined"!=typeof document){window.addEventListener("keydown",e=>{"Escape"!==e.key&&"Esc"!==e.key||r(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return Be=!0,_e=r(u().m(function e(){return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,se();case 1:return e.p=1,Be=!1,_e=null,e.f(1);case 2:return e.a(2)}},e,null,[[0,,1,2]])}))(),e.n=1,_e;case 1:return e.a(2)}},e)}))()},{passive:!0})}try{"undefined"!=typeof window&&(window.customizableToast={createToast:qe,setDefaultColors:Ne,setDefaultMessages:ze,noop:Ue,dismiss:Ge,toastPromise:$e})}catch(e){console.error("Global assignment failed:",e)}e.createToast=qe,e.dismiss=Ge,e.noop=Ue,e.setDefaultColors=Ne,e.setDefaultMessages=ze,e.toastPromise=$e});
|
|
17
|
+
var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return u(c,"_invoke",function(n,r,o){var a,s,l,u=0,c=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,s=0,l=e,f.n=n,i}};function p(n,r){for(s=n,l=r,t=0;!d&&u&&!o&&t<c.length;t++){var o,a=c[t],p=f.p,h=a[2];n>3?(o=h===r)&&(l=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&p<a[1])?(s=0,f.v=r,f.n=a[1]):p<h&&(o=n<3||a[0]>r||r>h)&&(a[4]=n,a[5]=r,f.n=h,s=0))}if(o||n>1)return i;throw d=!0,r}return function(o,c,h){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,h),s=c,l=h;(t=s<2?e:l)||!d;){a||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(u=2,a){if(s||(o="next"),t=a[o]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);a=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==i)break}catch(t){a=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,o,a),!0),c}var i={};function s(){}function c(){}function d(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(u(t={},r,function(){return this}),t),p=d.prototype=s.prototype=Object.create(f);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,u(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return c.prototype=d,u(p,"constructor",d),u(d,"constructor",c),c.displayName="GeneratorFunction",u(d,o,"GeneratorFunction"),u(p),u(p,o,"Generator"),u(p,r,function(){return this}),u(p,"toString",function(){return"[object Generator]"}),(l=function(){return{w:a,m:h}})()}function u(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}u=function(e,t,n,r){function a(t,n){u(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},u(e,t,n,r)}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,n){if(e){if("string"==typeof e)return t(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}function f(e){var t=Date.now().toString(36),n=Math.floor(1048575*Math.random()).toString(36);return"".concat(e,"-").concat(t,"-").concat(n)}function p(e,t){return h.apply(this,arguments)}function h(){return(h=r(l().m(function e(t,n){var r;return l().w(function(e){for(;;)switch(e.n){case 0:if(t&&n){e.n=1;break}throw new Error("tagName and prefix are required");case 1:return(r=document.createElement(t)).id=f(n),e.a(2,r)}},e)}))).apply(this,arguments)}function m(e){return y.apply(this,arguments)}function y(){return(y=r(l().m(function e(t){var n;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t){e.n=1;break}return e.a(2,!0);case 1:if(e.p=1,null==t||null===(n=t.parentNode)||void 0===n||!n.id.includes("toast-container-")){e.n=2;break}return t.parentNode.removeChild(t),e.a(2,!0);case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:if(e.p=4,!t.remove){e.n=5;break}return t.remove(),e.a(2,!0);case 5:e.n=7;break;case 6:e.p=6,e.v;case 7:return e.p=7,Object.assign(t.style,{display:"none",opacity:"0",pointerEvents:"none",position:"absolute",left:"-9999px"}),e.a(2,!0);case 8:return e.p=8,e.v,e.a(2,!1)}},e,null,[[7,8],[4,6],[1,3]])}))).apply(this,arguments)}function g(e){return v.apply(this,arguments)}function v(){return(v=r(l().m(function e(t){var n,r;return l().w(function(e){for(;;)switch(e.n){case 0:if(!("number"==typeof t&&t>0)){e.n=1;break}return e.a(2,t);case 1:if("string"!=typeof t){e.n=3;break}if(!t.endsWith("s")||t.endsWith("ms")){e.n=2;break}return n=1e3*parseFloat(t),e.a(2,n>0?n:500);case 2:return r=parseFloat(t),e.a(2,r>0?r:500);case 3:return e.a(2,500)}},e)}))).apply(this,arguments)}var b=new class{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;this.maxSize=e,this.map=new Map}get(e){if(this.map.has(e)){var t=this.map.get(e);return this.map.delete(e),this.map.set(e,t),t}}set(e,t){if(this.map.has(e))this.map.delete(e);else if(this.map.size>=this.maxSize){var n=this.map.keys().next().value;this.map.delete(n)}this.map.set(e,t)}}(200),w={};function k(e){if(!e)return"snow";var t,n,r,o=String(e),a=b.get(o);if(a)return a;if(w[null==e?void 0:e.toLowerCase()]){var i=w[e.toLowerCase()];return b.set(o,i),i}try{var s=function(e){var t=null==e?void 0:e.match(/^#([0-9a-f]{3,8})$/i);if(t){var n=t[1];return 3===n.length&&(n=n.split("").map(e=>e+e).join("")),{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16)}}var r=null==e?void 0:e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)/i);if(r)return{r:Number(r[1]),g:Number(r[2]),b:Number(r[3])};var o=null==e?void 0:e.match(/hsla?\(\s*([\d.]+)(?:deg)?\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*[\d.]+)?\)/i);if(o){var a=Number(o[1])/360,i=Number(o[2])/100,s=Number(o[3])/100;if(0===i){var l=Math.round(255*s);return{r:l,g:l,b:l}}var u=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e),c=s<.5?s*(1+i):s+i-s*i,d=2*s-c;return{r:Math.round(255*u(d,c,a+1/3)),g:Math.round(255*u(d,c,a)),b:Math.round(255*u(d,c,a-1/3))}}return null}(function(e){var t,n=null==e?void 0:e.match(/^var\((--[\w-]+)(?:\s*,\s*(.+))?\)$/i);if(!n)return e;try{if("undefined"!=typeof document&&"function"==typeof getComputedStyle){var r=getComputedStyle(document.documentElement).getPropertyValue(n[1]).trim();if(r)return r}}catch(e){}return(null===(t=n[2])||void 0===t?void 0:t.trim())||e}(e));if(!s)throw new Error("Unknown color");t=s.r,n=s.g,r=s.b}catch(e){t=n=r=128}var l=(e,t,n)=>{var r=[e,t,n].map(e=>(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4));return.2126*r[0]+.7152*r[1]+.0722*r[2]},u=(e,t)=>{var n=l(...e),r=l(...t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},d=((e,t,n)=>{e/=255,t/=255,n/=255;var r,o,a=Math.max(e,t,n),i=Math.min(e,t,n),s=(a+i)/2;if(a===i)r=o=0;else{var l=a-i;switch(o=s>.5?l/(2-a-i):l/(a+i),a){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return[360*r,o,s]})(t,n,r),f=c(d,3),p=f[0],h=f[1],m=f[2],y=((e,t,n)=>{var r,o,a;if(e/=360,0===t)r=o=a=n;else{var i=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e),s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=i(l,s,e+1/3),o=i(l,s,e),a=i(l,s,e-1/3)}return[Math.round(255*r),Math.round(255*o),Math.round(255*a)]})(p,h,m<.5?Math.min(m+.5,1):Math.max(m-.5,0)),g=c(y,3),v=g[0],k=g[1],x=g[2];if(u([t,n,r],[v,k,x])<4.5){var C=c(u([t,n,r],[0,0,0])>=u([t,n,r],[255,255,255])?[0,0,0]:[255,255,255],3);v=C[0],k=C[1],x=C[2]}var E=((e,t,n)=>"#".concat(e.toString(16).padStart(2,"0")).concat(t.toString(16).padStart(2,"0")).concat(n.toString(16).padStart(2,"0")))(v,k,x);return b.set(o,E),E}Object.entries({aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}).forEach(e=>{var t=c(e,2),n=t[0],r=c(t[1],3),o=r[0],a=r[1],i=r[2],s=e=>{var t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)},l=.2126*s(o)+.7152*s(a)+.0722*s(i),u=(l+.05)/.05,d=1.05/(l+.05);w[n.toLowerCase()]=u>=d?"#000000":"#ffffff"});var x=new Set(["DIV","SPAN","P","BR","STRONG","B","EM","I","U","SMALL","UL","OL","LI","A","IMG","PRE","CODE","MARK"]),C=new Set(["href","src","alt","title","class","target","rel"]);function E(e){if(!e||"string"!=typeof e)return"";var t=e.replace(/<\/?(script|iframe|object|embed|link|meta|style|form|input|button|svg|math|img|video|audio|details|dialog|applet|embed|frame|frameset|textarea|select|option|optgroup|fieldset|legend|datalist|output|progress|meter|keygen|canvas|map|area|base|basefont|bgsound|blink|center|dir|font|frame|frameset|hgroup|isindex|listing|marquee|multicol|nextid|noembed|noframes|plaintext|rb|rtc|spacer|strike|tt|xmp)[^>]*>/gi,"");t=(t=t.replace(/\s(on\w+)\s*=\s*(['"])[\s\S]*?\2/gi,"")).replace(/(href|src)\s*=\s*(['"])\s*javascript:[^'"]*\2/gi,"$1=$2#$2");var n=document.createElement("div");function r(e){if(e.nodeType===Node.TEXT_NODE)return document.createTextNode(e.nodeValue);if(e.nodeType!==Node.ELEMENT_NODE)return null;var t=e.tagName.toUpperCase();if(!x.has(t)){var n=document.createDocumentFragment();return Array.from(e.childNodes).forEach(e=>{var t=r(e);t&&n.appendChild(t)}),n}var o=document.createElement(e.tagName);return Array.from(e.attributes||[]).forEach(t=>{var n=t.name.toLowerCase(),r=t.value;C.has(n)&&("href"!==n&&"src"!==n||!/^\s*javascript:/i.test(r))&&("src"!==n||/^\s*(https?:|data:image\/)/i.test(r))&&("target"===n&&"_blank"===r&&o.setAttribute("rel",(e.getAttribute("rel")||"")+" noopener noreferrer"),o.setAttribute(n,r))}),Array.from(e.childNodes).forEach(e=>{var t=r(e);t&&o.appendChild(t)}),o}n.innerHTML=t;var o=document.createDocumentFragment();Array.from(n.childNodes).forEach(e=>{var t=r(e);t&&o.appendChild(t)});var a=document.createElement("div");return a.appendChild(o),a.innerHTML}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return"";try{if(!t.forceFallback&&function(){try{if("undefined"!=typeof window&&window.DOMPurify)return!0}catch(e){}return!1}()){var n=window.DOMPurify.sanitize(e,{ALLOWED_TAGS:Array.from(x),ALLOWED_ATTR:Array.from(C),ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|ftp|tel|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i}),r=document.createElement("div");return r.innerHTML=n,r.querySelectorAll('a[target="_blank"]').forEach(e=>{var t=(e.getAttribute("rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),e.setAttribute("rel",t.join(" "))}),r.innerHTML}}catch(e){}return E(e)}function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.size||14,n=e.color||"currentColor",r=e.text||"",o=document.createElement("span");o.className="toast-loader",o.style.display="inline-flex",o.style.alignItems="center",o.style.gap="8px";var a="http://www.w3.org/2000/svg",i=document.createElementNS(a,"svg");i.setAttribute("width",String(t)),i.setAttribute("height",String(t)),i.setAttribute("viewBox","0 0 50 50"),i.setAttribute("aria-hidden","true");var s=document.createElementNS(a,"circle");if(s.setAttribute("cx","25"),s.setAttribute("cy","25"),s.setAttribute("r","20"),s.setAttribute("fill","none"),s.setAttribute("stroke",n),s.setAttribute("stroke-width","4"),s.setAttribute("stroke-linecap","round"),s.style.opacity="0.85",s.style.strokeDasharray="90",s.style.strokeDashoffset="60",s.style.transformOrigin="center",s.style.animation="toast-spinner 1s linear infinite",i.appendChild(s),o.appendChild(i),r){var l=document.createElement("span");l.style.fontSize="13px",l.textContent=r,o.appendChild(l)}if(!T._stylesInjected&&(T._stylesInjected=!0,!document.getElementById("toast-spinner-styles"))){var u=document.createElement("style");u.id="toast-spinner-styles",u.innerHTML="@keyframes toast-spinner { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }",document.head.appendChild(u)}return o}function A(e,t,n){var o=null==t?void 0:t.cta;if(o){var a=s({},o);a.label||(a.label="CTA Label Missing!");var i=!!a.href&&"link"===a.variant,u=document.createElement(i?"a":"button");i?(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:t.textColor||"#fff",background:"rgba(255,255,255,0.15)",cursor:"pointer",whiteSpace:"nowrap",flexShrink:"0"}),u.textContent=a.label;var c=function(){var t=r(l().m(function t(r){var o;return l().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==(o=a.onClick(r))||!o.then){t.n=1;break}return t.n=1,o;case 1:return t.p=1,!1!==a.autoClose&&n(e),t.f(1);case 2:return t.a(2)}},t,null,[[0,,1,2]])}));return function(e){return t.apply(this,arguments)}}();u.addEventListener("click",c),u._cleanup=()=>u.removeEventListener("click",c),e.appendChild(u)}}function O(e,t,n){var r=document.createElement("button");r.setAttribute("aria-label","Close notification"),r.setAttribute("title","Close"),r.textContent="×",Object.assign(r.style,{background:"none",border:"none",color:t.textColor||"white",fontSize:"18px",marginLeft:"10px",cursor:"pointer"});var o=()=>n(e);r.addEventListener("click",o),e._cleanupCloseButton=()=>{r.removeEventListener("click",o)},e.appendChild(r)}function j(e,t){var n,r=document.createElement("div"),o=t.borderRadius||0,a=parseInt(o,10),i=a?"12px":"0",s=a?12:0,l=Math.max(a-10,s),u=a?"calc(100% - ".concat(l,"px)"):"100%",c=parseInt(t.progressHeight,10)||4,d=Number(null!==(n=t.duration)&&void 0!==n?n:1800)+5;Object.assign(r.style,{position:"absolute",left:"".concat(i),height:"".concat(c,"px"),background:t.progressColor||"rgba(255, 255, 255, 0.3)",width:"".concat(u),transition:"width ".concat(d,"ms linear"),["top"===t.progressPosition?"top":"bottom"]:"0",borderRadius:"".concat(c/2,"px")}),e.appendChild(r),"function"==typeof r.animate?e._progressAnimation=r.animate([{width:u},{width:"0%"}],{duration:d,easing:"linear",fill:"forwards",delay:50}):(r.style.transition="width ".concat(d,"ms linear"),setTimeout(()=>{r.offsetWidth,r.style.width="0%"},50))}function L(e){setTimeout(()=>{requestAnimationFrame(()=>{e.style.opacity="1",e.style.transform="translateY(0)"})},50)}function M(e,t,n){return I.apply(this,arguments)}function I(){return(I=r(l().m(function e(t,n,r){var o,a,i,s,u,c,d,f,p,h,m;return l().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,g(null==n?void 0:n.animationDuration);case 1:if(i=e.v,s="".concat(i,"ms"),t.className="toast toast-".concat(null!==(o=null==n?void 0:n.type)&&void 0!==o?o:"info"),Object.assign(t.style,{background:null==n?void 0:n.backgroundColor,padding:"12px 16px",marginBottom:"10px",borderRadius:null==n?void 0:n.borderRadius,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"space-between",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",minWidth:"250px",maxWidth:null==n?void 0:n.maxWidth,opacity:"0",position:"relative",cursor:"default",boxSizing:"border-box",userSelect:"text",transition:"opacity ".concat(s," ").concat(null==n?void 0:n.animationEasing,", transform ").concat(s," ").concat(null==n?void 0:n.animationEasing),transform:"translateY(20px)",zIndex:"9999"}),t.setAttribute("role","alert"),t.setAttribute("aria-live","polite"),t.tabIndex=0,t._animationDuration=i,u=document.createElement("span"),null!=n&&n.wrapText?Object.assign(u.style,{display:"block",whiteSpace:"normal"}):Object.assign(u.style,{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"3",whiteSpace:"nowrap"}),Object.assign(u.style,{flex:"1",padding:null==n?void 0:n.fontPadding,fontFamily:null==n?void 0:n.fontFamily,fontSize:null==n?void 0:n.fontSize,fontWeight:null==n?void 0:n.fontWeight,lineHeight:null==n?void 0:n.fontLineHeight,color:null==n?void 0:n.textColor,userSelect:"text",wordBreak:"break-word",overflow:"hidden",textOverflow:"ellipsis"}),c=!!n.allowHtml,d=null!==(a=n.message)&&void 0!==a?a:"",(n.loader||n.showLoader)&&(f=T(n.loader||{}),u.appendChild(f),(p=document.createElement("span")).style.display="inline-block",p.style.width="8px",u.appendChild(p)),c&&"string"==typeof d&&d.trim().length>0)try{for(h=S(d),(m=document.createElement("div")).innerHTML=h;m.firstChild;)u.appendChild(m.firstChild)}catch(e){console.warn("HTML message sanitization failed, falling back to text:",e),u.textContent=d}else u.textContent=String(d);u.setAttribute("aria-label","Toast Notification Center"),u.setAttribute("title","string"==typeof d?d.replace(/<[^>]+>/g,""):String(d)),t.appendChild(u),null!=n&&n.cta&&0!==Object.keys(n.cta).length&&A(t,n,r),null!=n&&n.showCloseButton&&O(t,n,r),null!=n&&n.showProgressBar&&j(t,n),L(t);case 2:return e.a(2)}},e)}))).apply(this,arguments)}function P(e,t){return D.apply(this,arguments)}function D(){return(D=r(l().m(function e(t,n){var r,o,a,i,s;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:for(e.p=0,r=document.createElement("div"),Object.assign(r.style,{background:"#333",color:"white",padding:"10px 15px",position:"fixed",top:"20px",right:"20px",zIndex:"99999",borderRadius:"3px",maxWidth:"250px",wordWrap:"break-word",boxShadow:"0 2px 10px rgba(0,0,0,0.3)",cursor:"pointer"}),o=document.createElement("div"),(a=document.createElement("span")).style.display="inline-block",t.allowHtml?a.innerHTML=S(String(t.message||"Emergency Toast Showing!")):a.textContent=String(t.message||"Emergency Toast Creation Showing!"),o.appendChild(a),(i=document.createElement("span")).style.cssText="float: right; margin-left: 10px; font-weight: bold;",i.textContent="×",o.appendChild(i);r.firstChild;)r.removeChild(r.firstChild);return r.appendChild(o),i.onclick=()=>{r.remove(),n(r)},document.body.appendChild(r),setTimeout(()=>{r.remove(),n(r)},null==t?void 0:t.duration),e.a(2,r);case 1:return e.p=1,s=e.v,console.error("Emergency toast creation failed:",s),setTimeout(()=>{alert((null==t?void 0:t.message)||"Emergency Toast Creation Showing!"),n(null)},100),e.a(2,null)}},e,null,[[0,1]])}))).apply(this,arguments)}function N(e,t){return _.apply(this,arguments)}function _(){return(_=r(l().m(function e(t,n){var r,o;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(document.querySelector('[id^="toast-container-"]')){e.n=1;break}return e.a(2,null);case 1:return e.p=2,e.n=3,p("div","toast");case 3:return r=e.v,e.n=4,M(r,t,n);case 4:return e.a(2,r);case 5:return e.p=5,o=e.v,console.warn("toast creation failed with error showing fallback one: ",o),e.n=6,P(t,n);case 6:return r=e.v,e.a(2,r)}},e,null,[[2,5]])}))).apply(this,arguments)}var W=new Map,z=new Map;function B(e){return"toast-container-".concat(function(e){return String(e).toLowerCase().trim().replace(/\bbelow\b/g,"bottom").replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"-").replace(/-{2,}/g,"-")}(e))}function H(e,t){return q.apply(this,arguments)}function q(){return q=r(l().m(function e(t,n){var o,a,i;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(o=B(t.position),!z.has(o)){e.n=1;break}return e.a(2,z.get(o));case 1:return a=r(l().m(function e(){var r,a,i,s;return l().w(function(e){for(;;)switch(e.n){case 0:if(null==(r=W.get(o))||!r.isConnected){e.n=1;break}return e.a(2,r);case 1:if(r&&!r.isConnected&&W.delete(o),(a=document.getElementById(o))&&!a.isConnected&&document.body.appendChild(a),a){e.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 n){e.n=2;break}return e.n=2,n(a,t);case 2:document.body.appendChild(a),e.n=4;break;case 3:if(a.style.position=a.style.position||"fixed",a.style.zIndex=a.style.zIndex||"9999","function"!=typeof n){e.n=4;break}return e.n=4,n(a,t);case 4:if((i=document.querySelectorAll("#".concat(o))).length>1)for(s=1;s<i.length;s++)try{i[s].remove()}catch(e){}return W.set(o,a),e.a(2,a)}},e)}))(),z.set(o,a),e.p=2,e.n=3,a;case 3:return i=e.v,e.a(2,i);case 4:return e.p=4,z.delete(o),e.f(4);case 5:return e.a(2)}},e,null,[[2,,4,5]])})),q.apply(this,arguments)}function R(e,t){return F.apply(this,arguments)}function F(){return(F=r(l().m(function e(t,n){var r;return l().w(function(e){for(;;)switch(e.n){case 0:if(t&&n.position){e.n=1;break}throw new Error("Invalid container or position!");case 1:if(G(t),r=U(n.position),!$(t,n,r)){e.n=2;break}return e.a(2);case 2:if(!X(t,r)){e.n=3;break}return e.a(2);case 3:Y(t,r);case 4:return e.a(2)}},e)}))).apply(this,arguments)}function G(e){e.style.top="auto",e.style.bottom="auto",e.style.left="auto",e.style.right="auto",e.style.transform="none"}function U(e){var t=e.toLowerCase().trim(),n="top-full-width"===t||"bottom-full-width"===t||"fullwidth"===t;return{hasTop:t.startsWith("top")||"center"!==t&&t.includes("top"),hasBottom:t.startsWith("bottom")||t.includes("below"),hasLeft:t.startsWith("left"),hasRight:t.startsWith("right"),hasCenter:"center"===t||t.includes("center")&&!t.includes("left")&&!t.includes("right")&&!t.includes("top")&&!t.includes("bottom"),hasFullWidth:n}}function $(e,t,n){return!!n.hasFullWidth&&(n.hasTop?(t.maxWidth="100vw",e.style.top="10px",e.style.left="10px",e.style.right="10px",!0):!!n.hasBottom&&(t.maxWidth="100vw",e.style.bottom="10px",e.style.left="10px",e.style.right="10px",!0))}function X(e,t){return!!t.hasCenter&&(!t.hasTop||t.hasLeft||t.hasRight?!t.hasBottom||t.hasLeft||t.hasRight?!t.hasLeft||t.hasTop||t.hasBottom?!t.hasRight||t.hasTop||t.hasBottom?!(t.hasLeft||t.hasRight||t.hasTop||t.hasBottom)&&(e.style.top="50%",e.style.left="50%",e.style.transform="translate(-50%, -50%)",!0):(e.style.right="10px",e.style.top="50%",e.style.transform="translateY(-50%)",!0):(e.style.left="10px",e.style.top="50%",e.style.transform="translateY(-50%)",!0):(e.style.bottom="10px",e.style.left="50%",e.style.transform="translateX(-50%)",!0):(e.style.top="10px",e.style.left="50%",e.style.transform="translateX(-50%)",!0))}function Y(e,t){t.hasBottom?e.style.bottom="10px":t.hasTop?e.style.top="10px":e.style.bottom="10px",t.hasRight?e.style.right="10px":t.hasLeft?e.style.left="10px":(e.style.left="50%",e.style.transform="translateX(-50%)")}class V{constructor(e,t){this.callback=e,this.delay=t,this.remaining=t,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 K=new Map,J=new Map,Q=[],Z=0;function ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=String(e.type).trim().toLowerCase(),n=function(e){for(var t=5381,n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n);return t>>>0}(String(e.message||"")).toString(16),r=String(e.position).trim().toLowerCase();return"".concat(t,"|").concat(n,"|").concat(r)}function te(){return ne.apply(this,arguments)}function ne(){return ne=r(l().m(function e(){var t,n,o,a,i,s,u=arguments;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t=u.length>0&&void 0!==u[0]?u[0]:{},e.p=1,n=ee(t),!K.has(n)){e.n=5;break}if(o=K.get(n)){e.n=2;break}throw new Error("Active toast with key ".concat(n," not found"));case 2:return o.count++,o.timer.clear(),o.timer=ue(o.toast,t),e.n=3,ce(o);case 3:return e.n=4,we(o);case 4:return e.a(2,n);case 5:if(!J.has(n)){e.n=7;break}if(a=J.get(n)){e.n=6;break}throw new Error("Pending toast with key ".concat(n," not found"));case 6:return a.count++,e.a(2,n);case 7:return i={options:t,count:1,rafId:0},J.set(n,i),i.rafId=requestAnimationFrame(r(l().m(function e(){var t,r;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t=J.get(n)){e.n=1;break}return e.a(2);case 1:if(J.delete(n),!(Z>=3)){e.n=3;break}return Q.push({options:t.options,key:n,count:t.count}),e.n=2,ye();case 2:return e.a(2);case 3:return e.p=3,e.n=4,re(t.options,n,t.count);case 4:e.n=6;break;case 5:e.p=5,r=e.v,console.error("showToast failed:",r);case 6:return e.a(2)}},e,null,[[3,5]])}))),e.a(2,n);case 8:e.p=8,s=e.v,console.error("showToast failed:",s);case 9:return e.a(2)}},e,null,[[1,8]])})),ne.apply(this,arguments)}function re(e,t,n){return oe.apply(this,arguments)}function oe(){return(oe=r(l().m(function e(t,n,r){var o,a,i,s,u,c,d,f,p;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,t&&"object"==typeof t){e.n=1;break}throw new TypeError("options must be an object");case 1:return Z++,e.n=2,H(t,R);case 2:if(o=e.v){e.n=3;break}throw new Error("Failed to create toast container");case 3:return e.n=4,N(t,fe);case 4:if(a=e.v){e.n=5;break}throw new Error("Toast element creation failed");case 5:if(i=document.createElement("div"),Object.assign(i.style,{position:"relative",display:"inline-block",overflow:"visible",marginBottom:"10px",zIndex:"0",width:"100%"}),s=document.createElement("div"),Object.assign(s.style,{position:"relative",overflow:"hidden",zIndex:"1"}),s.appendChild(a),i.appendChild(s),o.id.includes("toast-container-")&&o.appendChild(i),u=!1!==t.pauseOnHover&&(!0===t.pauseOnHover||!!t.cta),c={outer:i,toast:a,count:Math.max(1,Math.floor(null!=r?r:0)),timeout:null,pauseOnHover:u},K.set(n,c),a._key=n,!(c.count>1)){e.n=6;break}return e.n=6,we(c);case 6:return c.timer=ue(a,t),e.n=7,ce(c);case 7:e.n=10;break;case 8:return e.p=8,f=e.v,console.error("Something went wrong: ",f),Z=Math.max(0,Z-1),d=document.querySelector('[id^="toast-container-"]')||document.body,p=d,e.n=9,P(t,fe);case 9:p.appendChild.call(p,e.v);case 10:return e.a(2)}},e,null,[[0,8]])}))).apply(this,arguments)}function ae(){return(ae=r(l().m(function e(){var t,n,r,o,a,i,s;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,0!==K.size){e.n=1;break}return e.a(2);case 1:if(t=null,document.querySelectorAll('[id^="toast-container-"]').forEach(e=>{var n=Array.from(e.children||[]);if(0!==n.length){var r=n.at(-1);r&&(t=r.querySelector('[id^="toast-"]')||r)}}),t||(n=Array.from(K.entries())).length>0&&(r=n.at(-1),o=c(r,2),a=o[1],t=a.toast||a.outer&&a.outer.querySelector('[id^="toast-"]')),t){e.n=2;break}return e.a(2);case 2:return i=t._key?t:t.querySelector('[id^="toast-"]')||t,e.n=3,fe(i);case 3:e.n=5;break;case 4:e.p=4,s=e.v,console.error("dismissMostRecent failed:",s);case 5:return e.a(2)}},e,null,[[0,4]])}))).apply(this,arguments)}function ie(){return(ie=r(l().m(function e(){var t,n,r,a,i,s,u;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:e.p=0,t=Array.from(K.values()).map(e=>e.toast).filter(Boolean),Q.length=0,J.clear(),n=o(t),e.p=1,n.s();case 2:if((r=n.n()).done){e.n=7;break}return a=r.value,e.p=3,e.n=4,fe(a);case 4:e.n=6;break;case 5:e.p=5,i=e.v,console.warn("closeAllToasts: failed to close one toast:",i);case 6:e.n=2;break;case 7:e.n=9;break;case 8:e.p=8,s=e.v,n.e(s);case 9:return e.p=9,n.f(),e.f(9);case 10:e.n=12;break;case 11:e.p=11,u=e.v,console.error("closeAllToasts failed:",u);case 12:return e.a(2)}},e,null,[[3,5],[1,8,9,10],[0,11]])}))).apply(this,arguments)}var se=function(){return ae.apply(this,arguments)},le=function(){return ie.apply(this,arguments)};function ue(e,t){var n,o=Number(null!==(n=t.duration)&&void 0!==n?n:1800)+5,a=new V(r(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,fe(e);case 1:return t.a(2,t.v)}},t)})),o);return a.start(),a}function ce(e){return de.apply(this,arguments)}function de(){return(de=r(l().m(function e(t){var n,r,o,a,i,s,u;return l().w(function(e){for(;;)switch(e.n){case 0:if(t.pauseOnHover&&t.outer&&t.timer){e.n=1;break}return e.a(2);case 1:n=t.outer,r=t.timer,o=t.toast,a=()=>{var e;r.pause(),null==o||null===(e=o._progressAnimation)||void 0===e||e.pause()},i=()=>{var e;r.resume(),null==o||null===(e=o._progressAnimation)||void 0===e||e.play()},s=e=>{var t;e.target.matches("[tabindex], div, span, button, a")&&(r.pause(),null==o||null===(t=o._progressAnimation)||void 0===t||t.pause())},u=e=>{var t;n.contains(e.relatedTarget)||(r.resume(),null==o||null===(t=o._progressAnimation)||void 0===t||t.play())},n.addEventListener("mouseenter",a),n.addEventListener("mouseleave",i),n.addEventListener("focusin",s),n.addEventListener("focusout",u),n._pauseCleanup=()=>{n.removeEventListener("mouseenter",a),n.removeEventListener("mouseleave",i),n.removeEventListener("focusin",s),n.removeEventListener("focusout",u)};case 2:return e.a(2)}},e)}))).apply(this,arguments)}function fe(e){return pe.apply(this,arguments)}function pe(){return(pe=r(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(null!=t&&t._key){e.n=1;break}return e.a(2);case 1:return e.a(2,he(t._key))}},e)}))).apply(this,arguments)}function he(e){return me.apply(this,arguments)}function me(){return(me=r(l().m(function e(t){var n,r,o,a,i,s,u,c,d,f,p,h,m,y,g,v,b,w;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,t){e.n=1;break}return e.a(2);case 1:if(!(h=J.get(t))){e.n=2;break}return cancelAnimationFrame(h.rafId),J.delete(t),e.a(2);case 2:if(-1===(m=Q.findIndex(e=>e.key===t))){e.n=3;break}return Q.splice(m,1),e.a(2);case 3:if(y=K.get(t)){e.n=4;break}return e.a(2);case 4:return null===(n=y.timer)||void 0===n||n.clear(),null===(r=y.outer)||void 0===r||null===(o=r._pauseCleanup)||void 0===o||o.call(r),null===(a=y.toast)||void 0===a||null===(i=a._cleanupCloseButton)||void 0===i||i.call(a),null===(s=y.toast)||void 0===s||null===(u=s._cleanup)||void 0===u||u.call(s),null==(g=null===(c=y.toast)||void 0===c?void 0:c.querySelector("button, a"))||null===(d=g._cleanup)||void 0===d||d.call(g),K.delete(t),Z=Math.max(0,Z-1),(v=y.outer.querySelector(".toast-count-badge"))&&v.remove(),b=null!==(f=null===(p=y.toast)||void 0===p?void 0:p._animationDuration)&&void 0!==f?f:400,e.n=5,ve(y.outer,b);case 5:return e.n=6,ye();case 6:e.n=8;break;case 7:e.p=7,w=e.v,console.error("Closing Toast failed!: ",w);case 8:return e.a(2)}},e,null,[[0,7]])}))).apply(this,arguments)}function ye(){return ge.apply(this,arguments)}function ge(){return(ge=r(l().m(function e(){var t,n;return l().w(function(e){for(;;)switch(e.n){case 0:if(!(Z<3&&Q.length)){e.n=3;break}if(t=Q.shift(),!K.has(t.key)){e.n=2;break}return(n=K.get(t.key)).count+=t.count,e.n=1,we(n);case 1:return e.a(3,0);case 2:re(t.options,t.key,t.count),e.n=0;break;case 3:return e.a(2)}},e)}))).apply(this,arguments)}function ve(e){return be.apply(this,arguments)}function be(){return be=r(l().m(function e(t){var n,r=arguments;return l().w(function(e){for(;;)switch(e.n){case 0:if(n=r.length>1&&void 0!==r[1]?r[1]:400,t){e.n=1;break}return e.a(2,Promise.resolve());case 1:return e.a(2,new Promise(e=>{var r=!1,o=()=>{r||(r=!0,m(t),e())},a=t.firstElementChild||t;if(!a)return e();var i=e=>{try{if(e.target!==a)return;a.removeEventListener("transitionend",i,!0),o()}catch(e){console.error("removeWithTransition error:",e)}};try{a.addEventListener("transitionend",i,!0)}catch(e){console.error("removeWithTransition error:",e)}setTimeout(()=>{try{a.removeEventListener("transitionend",i,!0),o()}catch(e){console.error("removeWithTransition error:",e)}},n+300)}))}},e)})),be.apply(this,arguments)}function we(e){return ke.apply(this,arguments)}function ke(){return(ke=r(l().m(function e(t){var n,r,o,a;return l().w(function(e){for(;;)switch(e.n){case 0:if(n=t.outer,r=t.count,n&&n instanceof HTMLElement){e.n=1;break}throw new Error("updateBadge: outer must be a valid HTMLElement");case 1:if(!(r<2)){e.n=2;break}return(o=n.querySelector(".toast-count-badge"))&&o.remove(),e.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(e){console.error("updateBadge animation error:",e)}case 3:return e.a(2)}},e)}))).apply(this,arguments)}var xe={success:"#28a745",error:"#dc3545",warning:"#ffc107",info:"#17a2b8"},Ce={success:"Operation completed successfully!",error:"Something went wrong!",warning:"Warning message!",info:"Information message!"},Ee=[],Se=!1;function Te(){return Ae.apply(this,arguments)}function Ae(){return(Ae=r(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:if(!Se){e.n=1;break}return e.a(2);case 1:"undefined"!=typeof window&&"undefined"!=typeof document&&("complete"===document.readyState||"interactive"===document.readyState?(Se=!0,Ee.forEach(e=>setTimeout(()=>Oe(e),200)),Ee.length=0):document.addEventListener("DOMContentLoaded",()=>{Se=!0,Ee.forEach(e=>setTimeout(()=>Oe(e),200)),Ee.length=0},{once:!0}));case 2:return e.a(2)}},e)}))).apply(this,arguments)}function Oe(){return je.apply(this,arguments)}function je(){return je=r(l().m(function e(){var t,n,r,o,a=arguments;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.p=1,e.n=2,Pe(t);case 2:return n=e.v,e.n=3,Me(n);case 3:return e.n=4,te(n);case 4:return e.a(2,e.v);case 5:return e.p=5,o=e.v,console.error("CreateToast failed:",o),r="string"==typeof(null==t?void 0:t.message)&&null!==(null==t?void 0:t.message)?"".concat(t.message.substring(0,200)," toast creation failed!"):"Toast creation failed!",alert(r),e.a(2,null)}},e,null,[[1,5]])})),je.apply(this,arguments)}function Le(){return Le=r(l().m(function e(){var t,n=arguments;return l().w(function(e){for(;;)switch(e.n){case 0:if(t=n.length>0&&void 0!==n[0]?n[0]:{},"undefined"!=typeof window&&"undefined"!=typeof document){e.n=1;break}return console.warn("ToastNotification: running in non-browser environment, no DOM available."),e.a(2,null);case 1:return e.n=2,Te();case 2:if(Se){e.n=3;break}return Ee.push(t),e.a(2,null);case 3:return e.n=4,Oe(t);case 4:return e.a(2,e.v)}},e)})),Le.apply(this,arguments)}function Me(e){return Ie.apply(this,arguments)}function Ie(){return(Ie=r(l().m(function e(t){var n;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,H(t,R);case 1:return e.a(2,e.v);case 2:return e.p=2,n=e.v,console.error("Failed to create toast container:",n),e.a(2,document.body)}},e,null,[[0,2]])}))).apply(this,arguments)}function Pe(e){return De.apply(this,arguments)}function De(){return(De=r(l().m(function e(t){var n,r,o,a,i,u,c,d;return l().w(function(e){for(;;)if(0===e.n){o=null==t||null===(n=t.position)||void 0===n||null===(n=n.toLowerCase())||void 0===n?void 0:n.trim(),a=null!=o&&o.includes("top-full-width")||null!=o&&o.includes("bottom-full-width")?"100vw":"400px",(i=s(s({},{allowHtml:!1,sanitizeHtml:!0,pauseOnHover:void 0,duration:2500,position:"bottom-right",type:"info",borderRadius:"50px",backgroundColor:void 0,textColor:void 0,showCloseButton:!0,animationDuration:"0.4s",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:a}),"object"!=typeof t||Array.isArray(t)?{}:t)).message=null!==(r=null==t?void 0:t.message)&&void 0!==r?r:i.message;try{i.backgroundColor||(i.backgroundColor=null!==(u=null===(c=xe)||void 0===c?void 0:c[i.type])&&void 0!==u?u:window.matchMedia("(prefers-color-scheme: dark)").matches?"#f5f5f5":"#111111")}catch(e){console.warn("Background color resolution failed:",e)}try{i.message=i.message||(null===(d=Ce)||void 0===d?void 0:d[i.type])||"No Message Provided!"}catch(e){console.warn("Default message resolution failed:",e)}try{!i.textColor&&i.backgroundColor&&(i.textColor=k(i.backgroundColor))}catch(e){console.warn("Text color resolution failed:",e)}try{!i.progressColor&&i.backgroundColor&&(i.progressColor=i.textColor||k(i.backgroundColor))}catch(e){console.warn("Progress bar color resolution failed:",e)}return"string"!=typeof i.message&&(i.message="No Message Provided!"),e.a(2,i)}},e)}))).apply(this,arguments)}function Ne(e){try{if(e&&"object"==typeof e&&!Array.isArray(e)){for(var t=["success","error","warning","info"],n={},r=0,o=Object.entries(e);r<o.length;r++){var a=c(o[r],2),i=a[0],l=a[1];t.includes(i)&&"string"==typeof l&&l.trim()&&(n[i]=l.trim())}Object.keys(n).length>0&&(xe=s(s({},xe),n))}}catch(e){console.error("setDefaultColors failed:",e)}}function _e(e){try{if(e&&"object"==typeof e&&!Array.isArray(e)){for(var t=["success","error","warning","info"],n={},r=0,o=Object.entries(e);r<o.length;r++){var a=c(o[r],2),i=a[0],l=a[1];t.includes(i)&&"string"==typeof l&&l.trim()&&(n[i]=l.trim())}Object.keys(n).length>0&&(Ce=s(s({},Ce),n))}}catch(e){console.error("setDefaultMessages failed:",e)}}var We=!1,ze=null;function Be(e){return He.apply(this,arguments)}function He(){return(He=r(l().m(function e(t){var n;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!We||!ze){e.n=4;break}return e.p=1,e.n=2,ze;case 2:e.n=4;break;case 3:e.p=3,n=e.v,console.warn("Previous close operation failed (continuing anyway):",n);case 4:return e.a(2,t())}},e,null,[[1,3]])}))).apply(this,arguments)}var qe=function(){return Le.apply(this,arguments)};function Re(){return Fe.apply(this,arguments)}function Fe(){return Fe=r(l().m(function e(){var t,n,r=arguments;return l().w(function(e){for(;;)switch(e.n){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.n=1,Be(()=>qe(t));case 1:return n=e.v,e.a(2,{dismiss:()=>n?he(n):Promise.resolve()})}},e)})),Fe.apply(this,arguments)}var Ge=function(){var e=r(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:return We=!0,ze=r(l().m(function e(){return l().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,se();case 1:return e.p=1,We=!1,ze=null,e.f(1);case 2:return e.a(2)}},e,null,[[0,,1,2]])}))(),e.n=1,ze;case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),Ue=function(){var e=r(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:return We=!0,ze=r(l().m(function e(){return l().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,le();case 1:return e.p=1,We=!1,ze=null,e.f(1);case 2:return e.a(2)}},e,null,[[0,,1,2]])}))(),e.n=1,ze;case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();function $e(e){return Xe.apply(this,arguments)}function Xe(){return Xe=r(l().m(function e(t){var n,r,o,a,i,u,c,d,f,p,h,m,y=arguments;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:return o=y.length>2&&void 0!==y[2]?y[2]:{},a=null!==(n=(r=y.length>1&&void 0!==y[1]?y[1]:{}).loading)&&void 0!==n?n:"Loading...",e.n=1,Re(s(s({},o),{},{type:"info",message:a,duration:864e5,showProgressBar:!1,pauseOnHover:!1}));case 1:return i=e.v,u="function"==typeof t?t():t,e.p=2,e.n=3,u;case 3:return d=e.v,e.n=4,i.dismiss();case 4:return f="function"==typeof r.success?r.success(d):null!==(c=r.success)&&void 0!==c?c:"Done!",e.n=5,Re(s(s({},o),{},{type:"success",message:f}));case 5:return e.a(2,d);case 6:return e.p=6,m=e.v,e.n=7,i.dismiss();case 7:return h="function"==typeof r.error?r.error(m):null!==(p=r.error)&&void 0!==p?p:"Something went wrong.",e.n=8,Re(s(s({},o),{},{type:"error",message:h}));case 8:throw m;case 9:return e.a(2)}},e,null,[[2,6]])})),Xe.apply(this,arguments)}if("undefined"!=typeof window&&"undefined"!=typeof document){window.addEventListener("keydown",e=>{"Escape"!==e.key&&"Esc"!==e.key||r(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,We=!0,ze=r(l().m(function e(){return l().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,se();case 1:return e.p=1,We=!1,ze=null,e.f(1);case 2:return e.a(2)}},e,null,[[0,,1,2]])}))(),e.n=1,ze;case 1:e.n=3;break;case 2:e.p=2,t=e.v,console.error("Escape key dismiss failed:",t),We=!1,ze=null;case 3:return e.a(2)}},e,null,[[0,2]])}))()},{passive:!0})}try{"undefined"!=typeof window&&(window.customizableToast={createToast:Re,setDefaultColors:Ne,setDefaultMessages:_e,noop:Ue,dismiss:Ge,toastPromise:$e})}catch(e){console.error("Global assignment failed:",e)}e.createToast=Re,e.dismiss=Ge,e.noop=Ue,e.setDefaultColors=Ne,e.setDefaultMessages=_e,e.toastPromise=$e});
|
|
18
18
|
//# sourceMappingURL=index.umd.js.map
|