toastify-pro 1.6.0 → 1.7.0

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.
@@ -15,6 +15,7 @@
15
15
  * - Responsive design for mobile devices
16
16
  * - Framework agnostic (works with React, Vue, Angular, etc.)
17
17
  * - Confirmation dialogs with customizable buttons and callbacks
18
+ * - Input prompts with validation and async support
18
19
  * - Confirmation overlay with blur effect for focus
19
20
  * - Center position support for enhanced focus
20
21
  * - Independent positioning for confirmations
@@ -22,10 +23,11 @@
22
23
  * - Pause on hover functionality
23
24
  * - Queue management (maxToasts, newestOnTop)
24
25
  * - Full accessibility support (ARIA, keyboard navigation, reduced motion)
25
- * - Focus management for confirmation dialogs
26
+ * - Focus management for confirmation and input dialogs
27
+ * - Improved dismiss handling (no hover interference)
26
28
  *
27
- * @version 1.6.0
29
+ * @version 1.7.0
28
30
  * @author ToastifyPro Team
29
31
  * @license MIT
30
- */let t=null;class n{constructor(t={}){"object"==typeof t&&null!==t||(console.warn("ToastifyPro: Invalid options parameter. Using defaults."),t={}),this.defaultOptions={position:t.position||"bottom-center",timeout:t.timeout||3e3,allowClose:!1!==t.allowClose,maxLength:t.maxLength||100,primaryColor:t.primaryColor||null,secondaryColor:t.secondaryColor||null,pauseOnHover:!1!==t.pauseOnHover,maxToasts:t.maxToasts||0,newestOnTop:!1!==t.newestOnTop,ariaLive:t.ariaLive||"polite"},this.activeToasts=[];if(["top-left","top-right","bottom-left","bottom-right","top-center","bottom-center","center"].includes(this.defaultOptions.position)||(console.warn(`ToastifyPro: Invalid position "${this.defaultOptions.position}". Using "bottom-center".`),this.defaultOptions.position="bottom-center"),"undefined"==typeof document)throw new Error("ToastifyPro: This library requires a DOM environment (browser).");const n=document.querySelector(`.toastify-pro-container.${this.defaultOptions.position}`);if(n)this.container=n;else try{this.container=document.createElement("div"),this.container.className=`toastify-pro-container ${this.defaultOptions.position}`,document.body.appendChild(this.container)}catch(t){throw new Error("ToastifyPro: Failed to create container element. DOM may not be ready.")}this.injectStyles(),this.setupKeyboardNavigation()}setupKeyboardNavigation(){window._toastifyProKeyboardSetup||(window._toastifyProKeyboardSetup=!0,document.addEventListener("keydown",n=>{if("Escape"===n.key){if(t&&t.element){return void(t.element.querySelector(".toast-btn-confirm.loading")||t.close())}document.querySelectorAll(".toastify-pro-container").forEach(t=>{const n=t.querySelectorAll(".toastify-pro:not(.confirmation)");if(n.length>0){const t=n[n.length-1];t&&t._toastInstance&&t._toastInstance.removeToast(t)}})}}))}getIconSVG(t){"string"!=typeof t&&(console.warn("ToastifyPro: Invalid icon type. Using default info icon."),t="info");const n={success:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" fill="currentColor"/>\n </svg>',error:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z" fill="currentColor"/>\n </svg>',info:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" fill="currentColor"/>\n </svg>',warning:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" fill="currentColor"/>\n </svg>',dark:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" fill="currentColor"/>\n </svg>',light:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9 11H7v6h2v-6zm4 0h-2v6h2v-6zm4 0h-2v6h2v-6zm2.5-9H19V1h-2v1H7V1H5v1H4.5C3.11 2 2 3.11 2 4.5v14C2 19.89 3.11 21 4.5 21h15c1.39 0 2.5-1.11 2.5-2.5v-14C22 3.11 20.89 2 19.5 2zm0 16h-15v-11h15v11z" fill="currentColor"/>\n </svg>'};return n[t]||n.info}injectStyles(){if(!document.getElementById("toastify-pro-styles"))try{const t=document.createElement("style");t.id="toastify-pro-styles",t.textContent="\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');\n \n .toastify-pro-container {\n position: fixed;\n z-index: 9999;\n display: flex;\n flex-direction: column;\n gap: 16px;\n pointer-events: none;\n }\n .toastify-pro-container.top-left { top: 50px; left: 24px; align-items: flex-start; }\n .toastify-pro-container.top-right { top: 50px; right: 24px; align-items: flex-end; }\n .toastify-pro-container.bottom-left { bottom: 50px; left: 24px; align-items: flex-start; }\n .toastify-pro-container.bottom-right { bottom: 50px; right: 24px; align-items: flex-end; }\n .toastify-pro-container.top-center { top: 50px; left: 50%; transform: translateX(-50%); }\n .toastify-pro-container.bottom-center { bottom: 50px; left: 50%; transform: translateX(-50%); }\n .toastify-pro-container.center { top: 50%; left: 50%; transform: translate(-50%, -50%); }\n\n .toastify-pro {\n min-width: 280px;\n max-width: 400px;\n padding: 20px 24px;\n border-radius: 16px;\n font-size: 15px;\n font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n font-weight: 500;\n color: white;\n opacity: 0;\n transform: scale(0.3);\n transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);\n pointer-events: auto;\n position: relative;\n display: flex;\n align-items: center;\n gap: 16px;\n backdrop-filter: blur(20px);\n border: 1px solid rgba(255, 255, 255, 0.1);\n box-shadow: \n 0 20px 25px -5px rgba(0, 0, 0, 0.1),\n 0 10px 10px -5px rgba(0, 0, 0, 0.04),\n 0 0 0 1px rgba(255, 255, 255, 0.05);\n overflow: hidden;\n }\n \n .toastify-pro::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 3px;\n background: linear-gradient(90deg, \n rgba(255, 255, 255, 0.8) 0%,\n rgba(255, 255, 255, 0.4) 50%,\n rgba(255, 255, 255, 0.8) 100%);\n animation: shimmer 2s infinite;\n transition: opacity 0.8s ease;\n }\n \n .toastify-pro::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: 0;\n height: 3px;\n background: rgba(255, 255, 255, 0.6);\n animation: progress var(--duration, 5s) linear;\n border-radius: 0 0 16px 16px;\n }\n \n @keyframes airdropPop {\n 0% { \n opacity: 0;\n transform: scale(0.3) rotateY(-20deg); \n }\n 30% { \n opacity: 0.8;\n transform: scale(1.1) rotateY(10deg); \n }\n 60% { \n opacity: 1;\n transform: scale(0.98) rotateY(-3deg); \n }\n 100% { \n opacity: 1;\n transform: scale(1) rotateY(0deg); \n }\n }\n \n @keyframes carSwipeBottom {\n 0% { \n opacity: 1;\n transform: scale(1) translateY(0); \n }\n 15% { \n opacity: 1;\n transform: scale(1.02) translateY(-8px); \n }\n 100% { \n opacity: 0;\n transform: scale(0.8) translateY(200px); \n }\n }\n \n @keyframes carSwipeTop {\n 0% { \n opacity: 1;\n transform: scale(1) translateY(0); \n }\n 15% { \n opacity: 1;\n transform: scale(1.02) translateY(8px); \n }\n 100% { \n opacity: 0;\n transform: scale(0.8) translateY(-200px); \n }\n }\n \n @keyframes carSwipeLeft {\n 0% { \n opacity: 1;\n transform: scale(1) translateX(0); \n }\n 15% { \n opacity: 1;\n transform: scale(1.02) translateX(8px); \n }\n 100% { \n opacity: 0;\n transform: scale(0.8) translateX(-300px); \n }\n }\n \n @keyframes carSwipeRight {\n 0% { \n opacity: 1;\n transform: scale(1) translateX(0); \n }\n 15% { \n opacity: 1;\n transform: scale(1.02) translateX(-8px); \n }\n 100% { \n opacity: 0;\n transform: scale(0.8) translateX(300px); \n }\n }\n \n @keyframes carSwipeCenter {\n 0% { \n opacity: 1;\n transform: scale(1) translateY(0); \n }\n 15% { \n opacity: 1;\n transform: scale(1.02) translateY(-5px); \n }\n 100% { \n opacity: 0;\n transform: scale(0.6) translateY(150px); \n }\n }\n \n @keyframes progress {\n 0% { width: 100%; }\n 100% { width: 0%; }\n }\n \n @keyframes shimmer {\n 0% { transform: translateX(-100%); }\n 100% { transform: translateX(100%); }\n }\n \n @keyframes shake {\n 0%, 100% { transform: translate(0, 0); }\n 10%, 30%, 50%, 70%, 90% { transform: translate(-10px, 0); }\n 20%, 40%, 60%, 80% { transform: translate(10px, 0); }\n }\n \n @keyframes shakeCenter {\n 0%, 100% { transform: scale(1) translateX(0); }\n 10%, 30%, 50%, 70%, 90% { transform: scale(1) translateX(-10px); }\n 20%, 40%, 60%, 80% { transform: scale(1) translateX(10px); }\n }\n \n .toastify-pro.shake {\n animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) !important;\n }\n \n .toastify-pro-container.center .toastify-pro.shake {\n animation: shakeCenter 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) !important;\n }\n \n .toastify-pro.show { \n opacity: 1; \n transform: scale(1);\n animation: airdropPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);\n }\n \n .toastify-pro.success { \n background: linear-gradient(135deg, \n rgba(34, 197, 94, 0.9) 0%,\n rgba(21, 128, 61, 0.9) 100%);\n border-color: rgba(34, 197, 94, 0.3);\n }\n \n .toastify-pro.error { \n background: linear-gradient(135deg, \n rgba(239, 68, 68, 0.9) 0%,\n rgba(185, 28, 28, 0.9) 100%);\n border-color: rgba(239, 68, 68, 0.3);\n }\n \n .toastify-pro.info { \n background: linear-gradient(135deg, \n rgba(59, 130, 246, 0.9) 0%,\n rgba(29, 78, 216, 0.9) 100%);\n border-color: rgba(59, 130, 246, 0.3);\n }\n \n .toastify-pro.warning { \n background: linear-gradient(135deg, \n rgba(245, 158, 11, 0.9) 0%,\n rgba(217, 119, 6, 0.9) 100%);\n border-color: rgba(245, 158, 11, 0.3);\n }\n \n .toastify-pro.dark { \n background: linear-gradient(135deg, \n rgba(15, 23, 42, 0.95) 0%,\n rgba(30, 41, 59, 0.95) 100%);\n border-color: rgba(148, 163, 184, 0.2);\n }\n \n .toastify-pro.light { \n background: linear-gradient(135deg, \n rgba(255, 255, 255, 0.95) 0%,\n rgba(248, 250, 252, 0.95) 100%);\n color: #1e293b;\n border-color: rgba(226, 232, 240, 0.8);\n box-shadow: \n 0 20px 25px -5px rgba(0, 0, 0, 0.08),\n 0 10px 10px -5px rgba(0, 0, 0, 0.03);\n }\n \n .toastify-pro.light::before {\n background: linear-gradient(90deg, \n rgba(30, 41, 59, 0.8) 0%,\n rgba(30, 41, 59, 0.4) 50%,\n rgba(30, 41, 59, 0.8) 100%);\n }\n \n .toastify-pro.light::after {\n background: rgba(30, 41, 59, 0.6);\n }\n\n .toastify-pro .toast-icon {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.2);\n backdrop-filter: blur(10px);\n animation: iconPulse 2s infinite;\n }\n \n @keyframes iconPulse {\n 0%, 100% { transform: scale(1); }\n 50% { transform: scale(1.05); }\n }\n \n @keyframes iconBounce {\n 0% { transform: scale(0.2) rotate(-15deg); }\n 40% { transform: scale(1.2) rotate(8deg); }\n 70% { transform: scale(0.95) rotate(-3deg); }\n 100% { transform: scale(1) rotate(0deg); }\n }\n \n @keyframes iconCarExit {\n 0% { \n transform: scale(1) rotate(0deg); \n opacity: 1;\n }\n 20% { \n transform: scale(1.1) rotate(-10deg); \n opacity: 0.9;\n }\n 100% { \n transform: scale(0.3) rotate(180deg); \n opacity: 0;\n }\n }\n \n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n .toastify-pro .toast-icon svg {\n width: 18px;\n height: 18px;\n color: inherit;\n filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));\n }\n\n .toastify-pro.light .toast-icon {\n background: rgba(15, 23, 42, 0.1);\n }\n\n .toastify-pro .toast-content {\n flex: 1;\n line-height: 1.5;\n font-weight: 500;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n }\n\n .toastify-pro .toast-message {\n font-size: 15px;\n font-weight: 500;\n margin-bottom: 0;\n }\n\n .toastify-pro .toast-description {\n font-size: 13px;\n font-weight: 400;\n opacity: 0.85;\n margin-top: 4px;\n line-height: 1.4;\n }\n\n .toastify-pro .close-btn {\n cursor: pointer;\n font-size: 20px;\n color: inherit;\n opacity: 0.7;\n padding: 8px;\n border-radius: 50%;\n transition: all 0.2s ease;\n flex-shrink: 0;\n width: 32px;\n border: none;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(255, 255, 255, 0.1);\n backdrop-filter: blur(10px);\n font-weight: 300;\n line-height: 1;\n }\n \n .toastify-pro .close-btn:hover { \n opacity: 1; \n background: rgba(255, 255, 255, 0.2);\n transform: scale(1.1);\n }\n \n .toastify-pro.light .close-btn {\n background: rgba(15, 23, 42, 0.08);\n }\n \n .toastify-pro.light .close-btn:hover { \n background: rgba(15, 23, 42, 0.15);\n }\n \n @media (max-width: 640px) {\n .toastify-pro {\n min-width: 260px;\n max-width: calc(100vw - 48px);\n margin: 0 8px;\n }\n \n .toastify-pro-container.top-left,\n .toastify-pro-container.bottom-left { left: 16px; }\n .toastify-pro-container.top-right,\n .toastify-pro-container.bottom-right { right: 16px; }\n }\n\n /* Confirmation Toast Styles - Enhanced Modern Design */\n .toastify-pro.confirmation {\n min-width: 380px;\n max-width: 500px;\n padding: 32px 28px 28px;\n flex-direction: column;\n align-items: stretch;\n gap: 24px;\n position: relative;\n backdrop-filter: blur(24px) saturate(180%);\n box-shadow: \n 0 24px 48px -12px rgba(0, 0, 0, 0.25),\n 0 12px 24px -8px rgba(0, 0, 0, 0.15),\n 0 0 0 1px rgba(255, 255, 255, 0.08),\n inset 0 1px 0 0 rgba(255, 255, 255, 0.1);\n border: 1.5px solid rgba(255, 255, 255, 0.15);\n border-radius: 20px;\n }\n\n /* Hide progress bar for confirmation toasts */\n .toastify-pro.confirmation::after {\n display: none;\n }\n\n /* Shimmer effect for confirmation toasts */\n .toastify-pro.confirmation::before {\n opacity: 0.5;\n }\n\n /* Close button for confirmation dialogs */\n .toastify-pro.confirmation .conf-close-btn {\n position: absolute;\n top: 14px;\n right: 14px;\n cursor: pointer;\n font-size: 20px;\n color: inherit;\n opacity: 0.5;\n padding: 6px;\n border-radius: 8px;\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(255, 255, 255, 0.08);\n backdrop-filter: blur(10px);\n font-weight: 300;\n line-height: 1;\n border: 1px solid rgba(255, 255, 255, 0.12);\n }\n \n .toastify-pro.confirmation .conf-close-btn:hover { \n opacity: 0.9; \n background: rgba(255, 255, 255, 0.15);\n transform: scale(1.1) rotate(90deg);\n border-color: rgba(255, 255, 255, 0.25);\n }\n \n .toastify-pro.confirmation.light .conf-close-btn {\n background: rgba(15, 23, 42, 0.06);\n border-color: rgba(15, 23, 42, 0.12);\n opacity: 0.6;\n }\n \n .toastify-pro.confirmation.light .conf-close-btn:hover { \n background: rgba(15, 23, 42, 0.12);\n border-color: rgba(15, 23, 42, 0.2);\n opacity: 1;\n }\n\n /* Icon styling for confirmation */\n .toastify-pro.confirmation .toast-icon {\n width: 56px;\n height: 56px;\n margin: 0 auto 8px;\n background: rgba(255, 255, 255, 0.15);\n backdrop-filter: blur(12px);\n border: 2px solid rgba(255, 255, 255, 0.2);\n box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);\n }\n\n .toastify-pro.confirmation .toast-icon svg {\n width: 28px;\n height: 28px;\n }\n\n .toastify-pro.confirmation.light .toast-icon {\n background: rgba(15, 23, 42, 0.08);\n border-color: rgba(15, 23, 42, 0.15);\n }\n\n .toastify-pro.confirmation .toast-content {\n text-align: center;\n margin-bottom: 4px;\n }\n\n .toastify-pro.confirmation .toast-message {\n font-weight: 700;\n font-size: 20px;\n margin-bottom: 8px;\n letter-spacing: -0.02em;\n line-height: 1.3;\n }\n\n .toastify-pro.confirmation .toast-description {\n font-size: 15px;\n opacity: 0.85;\n margin-top: 8px;\n line-height: 1.5;\n font-weight: 400;\n }\n\n /* Fix text visibility for dark/light variants */\n .toastify-pro.confirmation.dark .toast-message,\n .toastify-pro.confirmation.dark .toast-description {\n color: white;\n }\n\n .toastify-pro.confirmation.light .toast-message,\n .toastify-pro.confirmation.light .toast-description {\n color: #1e293b;\n }\n\n .toast-actions {\n display: flex;\n gap: 14px;\n margin-top: 4px;\n }\n\n .toast-btn {\n flex: 1;\n padding: 14px 20px;\n border: none;\n border-radius: 12px;\n font-weight: 600;\n font-size: 15px;\n cursor: pointer;\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n backdrop-filter: blur(10px);\n position: relative;\n overflow: hidden;\n letter-spacing: 0.01em;\n }\n\n .toast-btn::after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: 0;\n height: 0;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.3);\n transform: translate(-50%, -50%);\n transition: width 0.6s, height 0.6s;\n }\n\n .toast-btn:hover::after {\n width: 300px;\n height: 300px;\n }\n\n .toast-btn:hover {\n transform: translateY(-2px);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);\n }\n\n .toast-btn:active {\n transform: translateY(0);\n transition: all 0.1s;\n }\n\n .toast-btn-cancel {\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.9);\n border: 1.5px solid rgba(255, 255, 255, 0.25);\n font-weight: 600;\n }\n\n .toast-btn-cancel:hover {\n background: rgba(255, 255, 255, 0.15);\n color: white;\n border-color: rgba(255, 255, 255, 0.35);\n }\n \n .toast-btn-cancel:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n }\n\n .toast-btn-confirm {\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n font-weight: 700;\n border: 2px solid rgba(255, 255, 255, 0.4);\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);\n position: relative;\n overflow: hidden;\n background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));\n }\n\n .toast-btn-confirm::before {\n content: '';\n position: absolute;\n top: 0;\n left: -100%;\n width: 100%;\n height: 100%;\n background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);\n transition: left 0.6s;\n }\n\n .toast-btn-confirm:hover::before {\n left: 100%;\n }\n\n .toast-btn-confirm:hover {\n background: linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(30, 41, 59, 1));\n border-color: rgba(255, 255, 255, 0.5);\n box-shadow: 0 8px 28px rgba(15, 23, 42, 0.5);\n }\n \n .toast-btn-confirm.loading {\n opacity: 0.7;\n cursor: not-allowed;\n pointer-events: none;\n }\n \n .toast-btn-confirm .btn-spinner {\n display: none;\n align-items: center;\n justify-content: center;\n margin-left: 8px;\n }\n \n .toast-btn-confirm .btn-spinner svg {\n width: 25px;\n height: 25px;\n animation: spin 1s linear infinite;\n color: currentColor;\n }\n \n .toast-btn-confirm.loading .btn-spinner {\n display: inline-flex;\n }\n \n .toast-btn-confirm.loading .btn-text {\n opacity: 0.7;\n }\n\n .toastify-pro.light .toast-btn-cancel {\n background: rgba(15, 23, 42, 0.08);\n color: rgba(15, 23, 42, 0.85);\n border-color: rgba(15, 23, 42, 0.2);\n }\n\n .toastify-pro.light .toast-btn-cancel:hover {\n background: rgba(15, 23, 42, 0.12);\n color: rgba(15, 23, 42, 1);\n border-color: rgba(15, 23, 42, 0.3);\n }\n\n /* Enhanced light theme confirm buttons */\n .toastify-pro.light .toast-btn-confirm {\n border-color: rgba(15, 23, 42, 0.35);\n background: linear-gradient(135deg, #1e293b 0%, #334155 100%);\n color: white;\n }\n\n .toastify-pro.light .toast-btn-confirm:hover {\n background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);\n border-color: rgba(15, 23, 42, 0.5);\n box-shadow: 0 8px 28px rgba(15, 23, 42, 0.3);\n }\n\n @media (max-width: 640px) {\n .toastify-pro.confirmation {\n min-width: 280px;\n max-width: calc(100vw - 32px);\n }\n }\n \n /* Custom toast type */\n .toastify-pro.custom {\n border-color: rgba(255, 255, 255, 0.2);\n }\n \n .toastify-pro.custom.light-text {\n color: #1e293b;\n }\n \n .toastify-pro.custom.light-text .toast-icon {\n background: rgba(15, 23, 42, 0.1);\n }\n \n .toastify-pro.custom.light-text .close-btn {\n background: rgba(15, 23, 42, 0.08);\n }\n \n .toastify-pro.custom.light-text .close-btn:hover {\n background: rgba(15, 23, 42, 0.15);\n }\n \n .toastify-pro.custom.light-text::before {\n background: linear-gradient(90deg, \n rgba(30, 41, 59, 0.8) 0%,\n rgba(30, 41, 59, 0.4) 50%,\n rgba(30, 41, 59, 0.8) 100%);\n }\n \n .toastify-pro.custom.light-text::after {\n background: rgba(30, 41, 59, 0.6);\n }\n \n /* Confirmation Overlay */\n .toastify-pro-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n z-index: 9998;\n opacity: 0;\n transition: opacity 0.3s ease;\n pointer-events: auto;\n }\n \n .toastify-pro-overlay.show {\n opacity: 1;\n }\n \n /* Action Button Styles */\n .toastify-pro .toast-action {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 12px;\n margin-top: 8px;\n border: none;\n border-radius: 8px;\n font-weight: 600;\n font-size: 13px;\n cursor: pointer;\n transition: all 0.2s ease;\n background: rgba(255, 255, 255, 0.2);\n color: inherit;\n backdrop-filter: blur(10px);\n }\n \n .toastify-pro .toast-action:hover {\n background: rgba(255, 255, 255, 0.3);\n transform: translateY(-1px);\n }\n \n .toastify-pro .toast-action:active {\n transform: translateY(0);\n }\n \n .toastify-pro.light .toast-action {\n background: rgba(15, 23, 42, 0.1);\n }\n \n .toastify-pro.light .toast-action:hover {\n background: rgba(15, 23, 42, 0.15);\n }\n \n /* Paused state - pause progress bar */\n .toastify-pro.paused::after {\n animation-play-state: paused;\n }\n \n /* Focus styles for accessibility */\n .toastify-pro .close-btn:focus,\n .toastify-pro .toast-action:focus,\n .toast-btn:focus {\n outline: 1px solid rgba(255, 255, 255, 0.8);\n }\n \n .toastify-pro.light .close-btn:focus,\n .toastify-pro.light .toast-action:focus {\n outline-color: 1px solid rgba(15, 23, 42, 0.5);\n }\n \n /* Screen reader only class */\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n \n /* Reduced motion support */\n @media (prefers-reduced-motion: reduce) {\n .toastify-pro {\n transition: opacity 0.3s ease;\n transform: none !important;\n }\n \n .toastify-pro.show {\n animation: none !important;\n opacity: 1;\n transform: none !important;\n }\n \n .toastify-pro .toast-icon {\n animation: none !important;\n }\n \n .toastify-pro::before {\n animation: none !important;\n }\n \n .toastify-pro::after {\n animation: progress var(--duration, 5s) linear !important;\n }\n \n .toastify-pro-overlay {\n transition: opacity 0.2s ease;\n }\n \n .toast-btn::after {\n display: none;\n }\n \n .toast-btn:hover {\n transform: none;\n }\n \n .toastify-pro.confirmation .conf-close-btn:hover {\n transform: scale(1.05);\n }\n \n .btn-spinner svg {\n animation: spin 1.5s linear infinite !important;\n }\n }\n ",document.head.appendChild(t)}catch(t){console.error("ToastifyPro: Failed to inject styles:",t)}}show(t,n="dark",o={}){if("string"!=typeof t&&(console.warn("ToastifyPro: Message must be a string. Converting to string."),t=String(t)),!t.trim())return void console.warn("ToastifyPro: Empty message provided.");["success","error","info","warning","dark","light"].includes(n)||(console.warn(`ToastifyPro: Invalid type "${n}". Using "dark".`),n="dark"),"object"==typeof o&&null!==o||(console.warn("ToastifyPro: Invalid options parameter. Using defaults."),o={});const e={...this.defaultOptions,...o};try{if(e.maxToasts>0&&this.activeToasts.length>=e.maxToasts){const t=this.activeToasts.length-e.maxToasts+1;for(let n=0;n<t;n++){const t=this.activeToasts.shift();t&&t.element&&this.removeToast(t.element)}}const o=document.createElement("div");o.className=`toastify-pro ${n}`,o._toastInstance=this;const r="error"===n||"warning"===n?"assertive":e.ariaLive||"polite";o.setAttribute("role","error"===n?"alert":"status"),o.setAttribute("aria-live",r),o.setAttribute("aria-atomic","true"),e.timeout>0&&o.style.setProperty("--duration",`${e.timeout}ms`);const i=document.createElement("div");i.className="toast-icon",i.setAttribute("aria-hidden","true"),i.innerHTML=this.getIconSVG(n),o.appendChild(i);const a=document.createElement("div");a.className="toast-content";const s=document.createElement("div");if(s.className="toast-message",s.textContent=t.substring(0,e.maxLength),a.appendChild(s),e.description&&"string"==typeof e.description){const t=document.createElement("div");t.className="toast-description",t.textContent=e.description.substring(0,2*e.maxLength),a.appendChild(t)}if(e.action&&"object"==typeof e.action){const t=document.createElement("button");t.className="toast-action",t.textContent=e.action.label||"Action",t.setAttribute("type","button"),"function"==typeof e.action.onClick&&(t.onclick=t=>{t.stopPropagation(),e.action.onClick({close:()=>this.removeToast(o),event:t})}),a.appendChild(t)}if(o.appendChild(a),e.allowClose){const t=document.createElement("button");t.className="close-btn",t.innerHTML="&times;",t.setAttribute("type","button"),t.setAttribute("aria-label","Close notification"),t.onclick=()=>this.removeToast(o),o.appendChild(t)}e.newestOnTop&&this.container.firstChild?this.container.insertBefore(o,this.container.firstChild):this.container.appendChild(o);const c={element:o,timeout:null,remainingTime:e.timeout,startTime:null,isPaused:!1};return this.activeToasts.push(c),setTimeout(()=>{o.classList.add("show");const t=o.querySelector(".toast-icon");t&&(t.style.animation="iconBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275)")},10),e.pauseOnHover&&e.timeout>0&&(o.addEventListener("mouseenter",()=>{c.timeout&&(clearTimeout(c.timeout),c.isPaused=!0,c.remainingTime-=Date.now()-c.startTime,o.classList.add("paused"))}),o.addEventListener("mouseleave",()=>{if(c.isPaused&&c.remainingTime>0){c.isPaused=!1,c.startTime=Date.now(),o.classList.remove("paused"),o.style.setProperty("--duration",`${c.remainingTime}ms`);o.querySelector("::after");o.style.animation="none",o.offsetHeight,o.style.animation="",c.timeout=setTimeout(()=>this.removeToast(o),c.remainingTime)}})),e.timeout>0&&(c.startTime=Date.now(),c.timeout=setTimeout(()=>this.removeToast(o),e.timeout)),{element:o,dismiss:()=>this.removeToast(o),update:(t,n)=>this.updateToast(o,t,n)}}catch(t){console.error("ToastifyPro: Failed to create toast:",t)}}updateToast(t,n,o={}){if(!t||!t.parentNode)return;const e=t.querySelector(".toast-message"),r=t.querySelector(".toast-description");if(n&&e&&(e.textContent=n),o.description&&r)r.textContent=o.description;else if(o.description){const n=document.createElement("div");n.className="toast-description",n.textContent=o.description,t.querySelector(".toast-content")?.appendChild(n)}if(o.type){const n=["success","error","info","warning","dark","light"];if(n.includes(o.type)){n.forEach(n=>t.classList.remove(n)),t.classList.add(o.type);const e=t.querySelector(".toast-icon");e&&(e.innerHTML=this.getIconSVG(o.type))}}}removeToast(t){if(t&&t.parentNode)try{const n=this.activeToasts.findIndex(n=>n.element===t);if(n>-1){const t=this.activeToasts[n];t.timeout&&clearTimeout(t.timeout),this.activeToasts.splice(n,1)}const o=t.parentNode.className.split(" ")[1];let e="carSwipeBottom";o.includes("bottom")?e="carSwipeBottom":o.includes("top")?e="carSwipeTop":o.includes("left")?e="carSwipeLeft":o.includes("right")?e="carSwipeRight":o.includes("center")&&(e="carSwipeCenter"),t.style.animation=`${e} 0.4s cubic-bezier(0.4, 0.0, 1, 1) forwards`;const r=t.querySelector(".toast-icon");r&&(r.style.animation="iconCarExit 0.4s cubic-bezier(0.4, 0.0, 1, 1) forwards"),setTimeout(()=>{t.parentNode&&t.remove()},400)}catch(n){console.error("ToastifyPro: Error removing toast:",n),t.parentNode&&t.remove()}else console.warn("ToastifyPro: Invalid toast element for removal.")}dismissAll(t=null){[...this.activeToasts].forEach(n=>{n.element&&(t?n.element.classList.contains(t)&&this.removeToast(n.element):this.removeToast(n.element))})}getActiveCount(){return this.activeToasts.length}success(t,n){"string"==typeof n&&(n={description:n}),this.show(t,"success",n)}error(t,n){"string"==typeof n&&(n={description:n}),this.show(t,"error",n)}info(t,n){"string"==typeof n&&(n={description:n}),this.show(t,"info",n)}warning(t,n){"string"==typeof n&&(n={description:n}),this.show(t,"warning",n)}dark(t,n){"string"==typeof n&&(n={description:n}),this.show(t,"dark",n)}light(t,n){"string"==typeof n&&(n={description:n}),this.show(t,"light",n)}custom(t,n){"string"==typeof n&&(n={description:n});const o=(n=n||{}).primaryColor||this.defaultOptions.primaryColor,e=n.secondaryColor||this.defaultOptions.secondaryColor;if(!o)return this.success(t,n);const r=t=>{if(!t)return!1;const n=t.replace("#","");return(299*parseInt(n.substr(0,2),16)+587*parseInt(n.substr(2,2),16)+114*parseInt(n.substr(4,2),16))/1e3>155},i=(t,n)=>{const o=t.replace("#",""),e=parseInt(o.substr(0,2),16),r=parseInt(o.substr(2,2),16),i=parseInt(o.substr(4,2),16),a=t=>{const o=Math.round(t+n/100*(n>0?255-t:t));return Math.max(0,Math.min(255,o))};return`#${a(e).toString(16).padStart(2,"0")}${a(r).toString(16).padStart(2,"0")}${a(i).toString(16).padStart(2,"0")}`};let a,s=o;if(e)a=e;else{a=i(o,r(o)?-25:25)}const c=r(o),l={...n,customGradient:`linear-gradient(135deg, ${s} 0%, ${a} 100%)`,customTextLight:c};this.showCustom(t,l)}showCustom(t,n={}){if("string"!=typeof t&&(t=String(t)),!t.trim())return void console.warn("ToastifyPro: Empty message provided.");const o={...this.defaultOptions,...n};try{const n=document.createElement("div");n.className="toastify-pro custom"+(o.customTextLight?" light-text":""),n._toastInstance=this,n.setAttribute("role","status"),n.setAttribute("aria-live",o.ariaLive||"polite"),n.setAttribute("aria-atomic","true"),o.customGradient&&(n.style.background=o.customGradient),o.timeout>0&&n.style.setProperty("--duration",`${o.timeout}ms`);const e=document.createElement("div");e.className="toast-icon",e.setAttribute("aria-hidden","true"),e.innerHTML=this.getIconSVG("success"),n.appendChild(e);const r=document.createElement("div");r.className="toast-content";const i=document.createElement("div");if(i.className="toast-message",i.textContent=t.substring(0,o.maxLength),r.appendChild(i),o.description&&"string"==typeof o.description){const t=document.createElement("div");t.className="toast-description",t.textContent=o.description.substring(0,2*o.maxLength),r.appendChild(t)}if(n.appendChild(r),o.allowClose){const t=document.createElement("button");t.className="close-btn",t.innerHTML="&times;",t.setAttribute("type","button"),t.setAttribute("aria-label","Close notification"),t.onclick=()=>this.removeToast(n),n.appendChild(t)}o.newestOnTop&&this.container.firstChild?this.container.insertBefore(n,this.container.firstChild):this.container.appendChild(n);const a={element:n,timeout:null,remainingTime:o.timeout,startTime:null,isPaused:!1};return this.activeToasts.push(a),o.pauseOnHover&&o.timeout>0&&(n.addEventListener("mouseenter",()=>{a.timeout&&(clearTimeout(a.timeout),a.isPaused=!0,a.remainingTime-=Date.now()-a.startTime,n.classList.add("paused"))}),n.addEventListener("mouseleave",()=>{a.isPaused&&a.remainingTime>0&&(a.isPaused=!1,a.startTime=Date.now(),n.classList.remove("paused"),n.style.setProperty("--duration",`${a.remainingTime}ms`),a.timeout=setTimeout(()=>this.removeToast(n),a.remainingTime))})),setTimeout(()=>{n.classList.add("show");const t=n.querySelector(".toast-icon");t&&(t.style.animation="iconBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275)")},10),o.timeout>0&&(a.startTime=Date.now(),a.timeout=setTimeout(()=>this.removeToast(n),o.timeout)),{element:n,dismiss:()=>this.removeToast(n),update:(t,o)=>this.updateToast(n,t,o)}}catch(t){console.error("ToastifyPro: Failed to create custom toast:",t)}}conf(n,o,e){if(t&&t.element&&t.element.parentNode){const n=t.element;return n.classList.remove("shake"),n.offsetWidth,n.classList.add("shake"),setTimeout(()=>{n&&n.parentNode&&n.classList.remove("shake")},600),t}let r="",i={},a=null;"function"!=typeof o||e?"string"==typeof o&&"function"==typeof e?(r=o,a=e):"object"==typeof o&&null!==o?(i=o,r=i.description||"",i.onConfirm||i.onCancel?a=null:"function"==typeof e&&(a=e)):"string"==typeof o&&"object"==typeof e&&(r=o,i=e||{},a=null):a=o;const s={timeout:0,allowClose:!1,confirmText:i.confirmText||"Confirm",cancelText:i.cancelText||"Cancel",theme:i.theme||i.color||"dark",position:i.position||"center",primaryColor:i.primaryColor||null,secondaryColor:i.secondaryColor||null,loading:i.loading||!1,...i};"light"===s.theme||"white"===s.theme?s.theme="light":s.theme="dark";const c=t=>{if(!t)return!1;const n=t.replace("#","");return(299*parseInt(n.substr(0,2),16)+587*parseInt(n.substr(2,2),16)+114*parseInt(n.substr(4,2),16))/1e3>155};let l="light"===s.theme?"#1e293b":"white";s.primaryColor&&(l=c(s.primaryColor)?"#1e293b":"white");["top-left","top-right","bottom-left","bottom-right","top-center","bottom-center","center"].includes(s.position)||(console.warn(`ToastifyPro: Invalid confirmation position "${s.position}". Using default position.`),s.position=this.defaultOptions.position);let p=document.querySelector(`.toastify-pro-container.${s.position}`);if(!p)try{p=document.createElement("div"),p.className=`toastify-pro-container ${s.position}`,document.body.appendChild(p)}catch(t){console.warn("ToastifyPro: Failed to create confirmation container. Using default container."),p=this.container}let d=null,m=null,f=null,g=!1,u=!1,h=null,b=null;const y=t=>{u=!0,g=t,d&&(t?(d.classList.add("loading"),d.disabled=!0):(d.classList.remove("loading"),d.disabled=!1)),m&&(m.disabled=t,m.style.opacity=t?"0.5":"1",m.style.cursor=t?"not-allowed":"pointer"),f&&(f.style.opacity=t?"0.3":"0.5",f.style.cursor=t?"not-allowed":"pointer",f.style.pointerEvents=t?"none":"auto")},x=()=>{h&&h.parentNode&&(t=null,b&&b.parentNode&&(b.classList.remove("show"),setTimeout(()=>{b&&b.parentNode&&b.remove(),b=null},300)),this.removeToast(h))},w=async t=>{if(t)if(i.onConfirm&&"function"==typeof i.onConfirm)try{const t=i.onConfirm({setLoading:y,close:x});t&&"function"==typeof t.then?(u||y(!0),await t,h&&h.parentNode&&(y(!1),x())):u||x()}catch(t){console.error("ToastifyPro: Error in onConfirm callback:",t),y(!1),x()}else if(a&&"function"==typeof a)try{const t=a(!0,{setLoading:y,close:x});t&&"function"==typeof t.then?(u||y(!0),await t,h&&h.parentNode&&(y(!1),x())):u||x()}catch(t){console.error("ToastifyPro: Error in confirmation callback:",t),y(!1),x()}else x();else{if(g)return;if(i.onCancel&&"function"==typeof i.onCancel)try{i.onCancel()}catch(t){console.error("ToastifyPro: Error in onCancel callback:",t)}if(a&&"function"==typeof a)try{a(!1)}catch(t){console.error("ToastifyPro: Error in confirmation callback:",t)}x()}};try{b=document.createElement("div"),b.className="toastify-pro-overlay",document.body.appendChild(b),setTimeout(()=>{b.classList.add("show")},10);const o=document.createElement("div");if(o.className=`toastify-pro confirmation ${s.theme}`,h=o,s.primaryColor){const t=s.primaryColor,n=s.secondaryColor;o.style.background=n?`linear-gradient(135deg, ${t} 0%, ${n} 100%)`:t,o.style.color=l;const e=c(t)?"0.2":"0.15";o.style.borderColor=`rgba(255, 255, 255, ${e})`}const e=document.createElement("button");e.className="conf-close-btn",e.innerHTML="&times;",e.setAttribute("type","button"),e.setAttribute("aria-label","Cancel confirmation"),e.onclick=()=>{g||w(!1)},s.primaryColor&&(e.style.color=l),f=e,o.appendChild(e);const i=document.createElement("div");i.className="toast-icon",i.setAttribute("aria-hidden","true"),i.innerHTML=this.getIconSVG("info"),s.primaryColor&&(i.style.color=l),o.appendChild(i);const a=document.createElement("div");a.className="toast-content";const u=document.createElement("div");u.className="toast-message",u.textContent=n.substring(0,this.defaultOptions.maxLength),s.primaryColor&&(u.style.color=l),a.appendChild(u);let v=null;r&&(v=document.createElement("div"),v.className="toast-description",v.textContent=r.substring(0,2*this.defaultOptions.maxLength),s.primaryColor&&(v.style.color=l),a.appendChild(v)),o.appendChild(a);const C=document.createElement("div");C.className="toast-actions";const k=document.createElement("button");if(k.className="toast-btn toast-btn-cancel",k.setAttribute("type","button"),k.textContent=s.cancelText,k.onclick=()=>{g||w(!1)},m=k,s.primaryColor){const t=c(s.primaryColor);k.style.background=t?"rgba(15, 23, 42, 0.08)":"rgba(255, 255, 255, 0.1)",k.style.color=l,k.style.borderColor=t?"rgba(15, 23, 42, 0.2)":"rgba(255, 255, 255, 0.25)"}const T=document.createElement("button");T.className="toast-btn toast-btn-confirm",T.setAttribute("type","button");const L=document.createElement("span");L.className="btn-text",L.textContent=s.confirmText,T.appendChild(L);const E=document.createElement("span");if(E.className="btn-spinner",E.innerHTML='\n <svg width="25" height="25" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.5 2.9375V5.5625M9.5 13.4375V16.0625M2.9375 9.5H5.5625M13.4375 9.5H16.0625" stroke="currentColor" stroke-width="1.875" stroke-linecap="round" />\n <path d="M4.86011 4.85961L6.71627 6.71577M12.2847 12.2842L14.1409 14.1404M4.86011 14.1404L6.71627 12.2842M12.2847 6.71577L14.1409 4.85961" stroke="currentColor" stroke-width="1.875" stroke-linecap="round" />\n </svg>\n ',T.appendChild(E),T.onclick=()=>{g||w(!0)},d=T,s.primaryColor){const t=s.primaryColor,n=s.secondaryColor,o=c(t);T.style.background=n?`linear-gradient(135deg, ${t} 0%, ${n} 100%)`:t,T.style.color=o?"#1e293b":"white",T.style.borderColor=o?"rgba(15, 23, 42, 0.3)":"rgba(255, 255, 255, 0.4)"}C.appendChild(k),C.appendChild(T),o.appendChild(C),p.appendChild(o);const S={element:o,setLoading:y,close:x};t=S,s.loading&&y(!0),o.setAttribute("role","alertdialog"),o.setAttribute("aria-modal","true"),o.setAttribute("aria-labelledby","toast-conf-title"),r&&o.setAttribute("aria-describedby","toast-conf-desc"),u.id="toast-conf-title",r&&v&&(v.id="toast-conf-desc");const N=document.activeElement,P=[k,T,e].filter(Boolean);let z=0;const I=t=>{"Tab"===t.key&&h&&h.parentNode&&(t.preventDefault(),z=t.shiftKey?(z-1+P.length)%P.length:(z+1)%P.length,P[z]?.focus())};document.addEventListener("keydown",I);const M=x,A=()=>{document.removeEventListener("keydown",I),N&&"function"==typeof N.focus&&setTimeout(()=>N.focus(),100),M()};return S.close=A,setTimeout(()=>{o.classList.add("show");const t=o.querySelector(".toast-icon");t&&(t.style.animation="iconBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275)"),setTimeout(()=>{T.focus()},100)},10),S}catch(t){console.error("ToastifyPro: Failed to create confirmation toast:",t)}}confirm(t,n,o){return this.conf(t,n,o)}}"undefined"!=typeof module&&module.exports&&(module.exports=n),"undefined"!=typeof exports&&(exports.ToastifyPro=n,exports.default=n),"function"==typeof define&&define.amd&&define(function(){return n}),"undefined"!=typeof window&&(window.ToastifyPro=n)});
32
+ */let t=null;class n{constructor(t={}){"object"==typeof t&&null!==t||(console.warn("ToastifyPro: Invalid options parameter. Using defaults."),t={}),this.defaultOptions={position:t.position||"bottom-center",timeout:t.timeout||3e3,allowClose:!1!==t.allowClose,maxLength:t.maxLength||100,primaryColor:t.primaryColor||null,secondaryColor:t.secondaryColor||null,pauseOnHover:!1!==t.pauseOnHover,maxToasts:t.maxToasts||0,newestOnTop:!1!==t.newestOnTop,ariaLive:t.ariaLive||"polite"},this.activeToasts=[];if(["top-left","top-right","bottom-left","bottom-right","top-center","bottom-center","center"].includes(this.defaultOptions.position)||(console.warn(`ToastifyPro: Invalid position "${this.defaultOptions.position}". Using "bottom-center".`),this.defaultOptions.position="bottom-center"),"undefined"==typeof document)throw new Error("ToastifyPro: This library requires a DOM environment (browser).");const n=document.querySelector(`.toastify-pro-container.${this.defaultOptions.position}`);if(n)this.container=n;else try{this.container=document.createElement("div"),this.container.className=`toastify-pro-container ${this.defaultOptions.position}`,document.body.appendChild(this.container)}catch(t){throw new Error("ToastifyPro: Failed to create container element. DOM may not be ready.")}this.injectStyles(),this.setupKeyboardNavigation()}setupKeyboardNavigation(){window._toastifyProKeyboardSetup||(window._toastifyProKeyboardSetup=!0,document.addEventListener("keydown",n=>{if("Escape"===n.key){if(t&&t.element){return void(t.element.querySelector(".toast-btn-confirm.loading")||t.close())}document.querySelectorAll(".toastify-pro-container").forEach(t=>{const n=t.querySelectorAll(".toastify-pro:not(.confirmation)");if(n.length>0){const t=n[n.length-1];t&&t._toastInstance&&t._toastInstance.removeToast(t)}})}}))}getIconSVG(t){"string"!=typeof t&&(console.warn("ToastifyPro: Invalid icon type. Using default info icon."),t="info");const n={success:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" fill="currentColor"/>\n </svg>',error:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z" fill="currentColor"/>\n </svg>',info:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" fill="currentColor"/>\n </svg>',warning:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" fill="currentColor"/>\n </svg>',dark:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" fill="currentColor"/>\n </svg>',light:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9 11H7v6h2v-6zm4 0h-2v6h2v-6zm4 0h-2v6h2v-6zm2.5-9H19V1h-2v1H7V1H5v1H4.5C3.11 2 2 3.11 2 4.5v14C2 19.89 3.11 21 4.5 21h15c1.39 0 2.5-1.11 2.5-2.5v-14C22 3.11 20.89 2 19.5 2zm0 16h-15v-11h15v11z" fill="currentColor"/>\n </svg>'};return n[t]||n.info}injectStyles(){if(!document.getElementById("toastify-pro-styles"))try{const t=document.createElement("style");t.id="toastify-pro-styles",t.textContent="\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');\n \n .toastify-pro-container {\n position: fixed;\n z-index: 9999;\n display: flex;\n flex-direction: column;\n gap: 16px;\n pointer-events: none;\n }\n .toastify-pro-container.top-left { top: 50px; left: 24px; align-items: flex-start; }\n .toastify-pro-container.top-right { top: 50px; right: 24px; align-items: flex-end; }\n .toastify-pro-container.bottom-left { bottom: 50px; left: 24px; align-items: flex-start; }\n .toastify-pro-container.bottom-right { bottom: 50px; right: 24px; align-items: flex-end; }\n .toastify-pro-container.top-center { top: 50px; left: 50%; transform: translateX(-50%); }\n .toastify-pro-container.bottom-center { bottom: 50px; left: 50%; transform: translateX(-50%); }\n .toastify-pro-container.center { top: 50%; left: 50%; transform: translate(-50%, -50%); }\n\n .toastify-pro {\n min-width: 280px;\n max-width: 400px;\n padding: 20px 24px;\n border-radius: 16px;\n font-size: 15px;\n font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n font-weight: 500;\n color: white;\n opacity: 0;\n transform: scale(0.3);\n transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);\n pointer-events: auto;\n position: relative;\n display: flex;\n align-items: center;\n gap: 16px;\n backdrop-filter: blur(20px);\n border: 1px solid rgba(255, 255, 255, 0.1);\n box-shadow: \n 0 20px 25px -5px rgba(0, 0, 0, 0.1),\n 0 10px 10px -5px rgba(0, 0, 0, 0.04),\n 0 0 0 1px rgba(255, 255, 255, 0.05);\n overflow: hidden;\n }\n \n .toastify-pro::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 3px;\n background: linear-gradient(90deg, \n rgba(255, 255, 255, 0.8) 0%,\n rgba(255, 255, 255, 0.4) 50%,\n rgba(255, 255, 255, 0.8) 100%);\n animation: shimmer 2s infinite;\n transition: opacity 0.8s ease;\n }\n \n .toastify-pro::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: 0;\n height: 3px;\n background: rgba(255, 255, 255, 0.6);\n animation: progress var(--duration, 5s) linear;\n border-radius: 0 0 16px 16px;\n }\n \n @keyframes airdropPop {\n 0% { \n opacity: 0;\n transform: scale(0.5) rotateY(-15deg) translateY(20px); \n }\n 50% { \n opacity: 0.95;\n transform: scale(1.03) rotateY(5deg) translateY(-3px); \n }\n 75% { \n opacity: 1;\n transform: scale(0.99) rotateY(-1deg) translateY(1px); \n }\n 100% { \n opacity: 1;\n transform: scale(1) rotateY(0deg) translateY(0); \n }\n }\n \n @keyframes carSwipeBottom {\n 0% { \n opacity: 1;\n transform: scale(1) translateY(0); \n }\n 12% { \n opacity: 1;\n transform: scale(1.015) translateY(-6px); \n }\n 100% { \n opacity: 0;\n transform: scale(0.85) translateY(150px); \n }\n }\n \n @keyframes carSwipeTop {\n 0% { \n opacity: 1;\n transform: scale(1) translateY(0); \n }\n 12% { \n opacity: 1;\n transform: scale(1.015) translateY(6px); \n }\n 100% { \n opacity: 0;\n transform: scale(0.85) translateY(-150px); \n }\n }\n \n @keyframes carSwipeLeft {\n 0% { \n opacity: 1;\n transform: scale(1) translateX(0); \n }\n 12% { \n opacity: 1;\n transform: scale(1.015) translateX(6px); \n }\n 100% { \n opacity: 0;\n transform: scale(0.85) translateX(-250px); \n }\n }\n \n @keyframes carSwipeRight {\n 0% { \n opacity: 1;\n transform: scale(1) translateX(0); \n }\n 12% { \n opacity: 1;\n transform: scale(1.015) translateX(-6px); \n }\n 100% { \n opacity: 0;\n transform: scale(0.85) translateX(250px); \n }\n }\n \n @keyframes carSwipeCenter {\n 0% { \n opacity: 1;\n transform: scale(1) translateY(0); \n }\n 12% { \n opacity: 1;\n transform: scale(1.015) translateY(-4px); \n }\n 100% { \n opacity: 0;\n transform: scale(0.7) translateY(120px); \n }\n }\n \n @keyframes progress {\n 0% { width: 100%; }\n 100% { width: 0%; }\n }\n \n @keyframes shimmer {\n 0% { transform: translateX(-100%); }\n 100% { transform: translateX(100%); }\n }\n \n @keyframes shake {\n 0%, 100% { transform: translate(0, 0); }\n 10%, 30%, 50%, 70%, 90% { transform: translate(-10px, 0); }\n 20%, 40%, 60%, 80% { transform: translate(10px, 0); }\n }\n \n @keyframes shakeCenter {\n 0%, 100% { transform: scale(1) translateX(0); }\n 10%, 30%, 50%, 70%, 90% { transform: scale(1) translateX(-10px); }\n 20%, 40%, 60%, 80% { transform: scale(1) translateX(10px); }\n }\n \n .toastify-pro.shake {\n animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) !important;\n }\n \n .toastify-pro-container.center .toastify-pro.shake {\n animation: shakeCenter 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) !important;\n }\n \n .toastify-pro.show { \n opacity: 1; \n transform: scale(1);\n animation: airdropPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);\n }\n \n .toastify-pro.success { \n background: linear-gradient(135deg, \n rgba(34, 197, 94, 0.9) 0%,\n rgba(21, 128, 61, 0.9) 100%);\n border-color: rgba(34, 197, 94, 0.3);\n }\n \n .toastify-pro.error { \n background: linear-gradient(135deg, \n rgba(239, 68, 68, 0.9) 0%,\n rgba(185, 28, 28, 0.9) 100%);\n border-color: rgba(239, 68, 68, 0.3);\n }\n \n .toastify-pro.info { \n background: linear-gradient(135deg, \n rgba(59, 130, 246, 0.9) 0%,\n rgba(29, 78, 216, 0.9) 100%);\n border-color: rgba(59, 130, 246, 0.3);\n }\n \n .toastify-pro.warning { \n background: linear-gradient(135deg, \n rgba(245, 158, 11, 0.9) 0%,\n rgba(217, 119, 6, 0.9) 100%);\n border-color: rgba(245, 158, 11, 0.3);\n }\n \n .toastify-pro.dark { \n background: linear-gradient(135deg, \n rgba(15, 23, 42, 0.95) 0%,\n rgba(30, 41, 59, 0.95) 100%);\n border-color: rgba(148, 163, 184, 0.2);\n }\n \n .toastify-pro.light { \n background: linear-gradient(135deg, \n rgba(255, 255, 255, 0.95) 0%,\n rgba(248, 250, 252, 0.95) 100%);\n color: #1e293b;\n border-color: rgba(226, 232, 240, 0.8);\n box-shadow: \n 0 20px 25px -5px rgba(0, 0, 0, 0.08),\n 0 10px 10px -5px rgba(0, 0, 0, 0.03);\n }\n \n .toastify-pro.light::before {\n background: linear-gradient(90deg, \n rgba(30, 41, 59, 0.8) 0%,\n rgba(30, 41, 59, 0.4) 50%,\n rgba(30, 41, 59, 0.8) 100%);\n }\n \n .toastify-pro.light::after {\n background: rgba(30, 41, 59, 0.6);\n }\n\n .toastify-pro .toast-icon {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.2);\n backdrop-filter: blur(10px);\n animation: iconPulse 2s infinite;\n }\n \n @keyframes iconPulse {\n 0%, 100% { transform: scale(1); }\n 50% { transform: scale(1.05); }\n }\n \n @keyframes iconBounce {\n 0% { transform: scale(0.3) rotate(-10deg); opacity: 0; }\n 50% { transform: scale(1.1) rotate(5deg); opacity: 1; }\n 70% { transform: scale(0.97) rotate(-2deg); }\n 100% { transform: scale(1) rotate(0deg); }\n }\n \n @keyframes iconCarExit {\n 0% { \n transform: scale(1) rotate(0deg); \n opacity: 1;\n }\n 25% { \n transform: scale(1.08) rotate(-8deg); \n opacity: 0.85;\n }\n 100% { \n transform: scale(0.4) rotate(120deg); \n opacity: 0;\n }\n }\n \n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n \n @keyframes spinFast {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n .toastify-pro .toast-icon svg {\n width: 18px;\n height: 18px;\n color: inherit;\n filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));\n }\n\n .toastify-pro.light .toast-icon {\n background: rgba(15, 23, 42, 0.1);\n }\n\n .toastify-pro .toast-content {\n flex: 1;\n line-height: 1.5;\n font-weight: 500;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n }\n\n .toastify-pro .toast-message {\n font-size: 15px;\n font-weight: 500;\n margin-bottom: 0;\n }\n\n .toastify-pro .toast-description {\n font-size: 13px;\n font-weight: 400;\n opacity: 0.85;\n margin-top: 4px;\n line-height: 1.4;\n }\n\n .toastify-pro .close-btn {\n cursor: pointer;\n font-size: 20px;\n color: inherit;\n opacity: 0.7;\n padding: 8px;\n border-radius: 50%;\n transition: all 0.2s ease;\n flex-shrink: 0;\n width: 32px;\n border: none;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(255, 255, 255, 0.1);\n backdrop-filter: blur(10px);\n font-weight: 300;\n line-height: 1;\n }\n \n .toastify-pro .close-btn:hover { \n opacity: 1; \n background: rgba(255, 255, 255, 0.2);\n transform: scale(1.1);\n }\n \n .toastify-pro.light .close-btn {\n background: rgba(15, 23, 42, 0.08);\n }\n \n .toastify-pro.light .close-btn:hover { \n background: rgba(15, 23, 42, 0.15);\n }\n \n @media (max-width: 640px) {\n .toastify-pro {\n min-width: 260px;\n max-width: calc(100vw - 48px);\n margin: 0 8px;\n }\n \n .toastify-pro-container.top-left,\n .toastify-pro-container.bottom-left { left: 16px; }\n .toastify-pro-container.top-right,\n .toastify-pro-container.bottom-right { right: 16px; }\n }\n\n /* Confirmation Toast Styles - Enhanced Modern Design */\n .toastify-pro.confirmation {\n min-width: 380px;\n max-width: 500px;\n padding: 32px 28px 28px;\n flex-direction: column;\n align-items: stretch;\n gap: 24px;\n position: relative;\n backdrop-filter: blur(24px) saturate(180%);\n box-shadow: \n 0 24px 48px -12px rgba(0, 0, 0, 0.25),\n 0 12px 24px -8px rgba(0, 0, 0, 0.15),\n 0 0 0 1px rgba(255, 255, 255, 0.08),\n inset 0 1px 0 0 rgba(255, 255, 255, 0.1);\n border: 1.5px solid rgba(255, 255, 255, 0.15);\n border-radius: 20px;\n }\n\n /* Hide progress bar for confirmation toasts */\n .toastify-pro.confirmation::after {\n display: none;\n }\n\n /* Shimmer effect for confirmation toasts */\n .toastify-pro.confirmation::before {\n opacity: 0.5;\n }\n\n /* Close button for confirmation dialogs */\n .toastify-pro.confirmation .conf-close-btn {\n position: absolute;\n top: 14px;\n right: 14px;\n cursor: pointer;\n font-size: 20px;\n color: inherit;\n opacity: 0.5;\n padding: 6px;\n border-radius: 8px;\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(255, 255, 255, 0.08);\n backdrop-filter: blur(10px);\n font-weight: 300;\n line-height: 1;\n border: 1px solid rgba(255, 255, 255, 0.12);\n }\n \n .toastify-pro.confirmation .conf-close-btn:hover { \n opacity: 0.9; \n background: rgba(255, 255, 255, 0.15);\n transform: scale(1.1) rotate(90deg);\n border-color: rgba(255, 255, 255, 0.25);\n }\n \n .toastify-pro.confirmation.light .conf-close-btn {\n background: rgba(15, 23, 42, 0.06);\n border-color: rgba(15, 23, 42, 0.12);\n opacity: 0.6;\n }\n \n .toastify-pro.confirmation.light .conf-close-btn:hover { \n background: rgba(15, 23, 42, 0.12);\n border-color: rgba(15, 23, 42, 0.2);\n opacity: 1;\n }\n\n /* Icon styling for confirmation */\n .toastify-pro.confirmation .toast-icon {\n width: 56px;\n height: 56px;\n margin: 0 auto 8px;\n background: rgba(255, 255, 255, 0.15);\n backdrop-filter: blur(12px);\n border: 2px solid rgba(255, 255, 255, 0.2);\n box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);\n }\n\n .toastify-pro.confirmation .toast-icon svg {\n width: 28px;\n height: 28px;\n }\n\n .toastify-pro.confirmation.light .toast-icon {\n background: rgba(15, 23, 42, 0.08);\n border-color: rgba(15, 23, 42, 0.15);\n }\n\n .toastify-pro.confirmation .toast-content {\n text-align: center;\n margin-bottom: 4px;\n }\n\n .toastify-pro.confirmation .toast-message {\n font-weight: 700;\n font-size: 20px;\n margin-bottom: 8px;\n letter-spacing: -0.02em;\n line-height: 1.3;\n }\n\n .toastify-pro.confirmation .toast-description {\n font-size: 15px;\n opacity: 0.85;\n margin-top: 8px;\n line-height: 1.5;\n font-weight: 400;\n }\n\n /* Fix text visibility for dark/light variants */\n .toastify-pro.confirmation.dark .toast-message,\n .toastify-pro.confirmation.dark .toast-description {\n color: white;\n }\n\n .toastify-pro.confirmation.light .toast-message,\n .toastify-pro.confirmation.light .toast-description {\n color: #1e293b;\n }\n\n .toast-actions {\n display: flex;\n gap: 14px;\n margin-top: 4px;\n }\n\n .toast-btn {\n flex: 1;\n padding: 14px 20px;\n border: none;\n border-radius: 12px;\n font-weight: 600;\n font-size: 15px;\n cursor: pointer;\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n backdrop-filter: blur(10px);\n position: relative;\n overflow: hidden;\n letter-spacing: 0.01em;\n }\n\n .toast-btn::after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n width: 0;\n height: 0;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.3);\n transform: translate(-50%, -50%);\n transition: width 0.6s, height 0.6s;\n }\n\n .toast-btn:hover::after {\n width: 300px;\n height: 300px;\n }\n\n .toast-btn:hover {\n transform: translateY(-2px);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);\n }\n\n .toast-btn:active {\n transform: translateY(0);\n transition: all 0.1s;\n }\n\n .toast-btn-cancel {\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.9);\n border: 1.5px solid rgba(255, 255, 255, 0.25);\n font-weight: 600;\n }\n\n .toast-btn-cancel:hover {\n background: rgba(255, 255, 255, 0.15);\n color: white;\n border-color: rgba(255, 255, 255, 0.35);\n }\n \n .toast-btn-cancel:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n }\n\n .toast-btn-confirm {\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n font-weight: 700;\n border: 2px solid rgba(255, 255, 255, 0.4);\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);\n position: relative;\n overflow: hidden;\n background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));\n }\n\n .toast-btn-confirm::before {\n content: '';\n position: absolute;\n top: 0;\n left: -100%;\n width: 100%;\n height: 100%;\n background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);\n transition: left 0.6s;\n }\n\n .toast-btn-confirm:hover::before {\n left: 100%;\n }\n\n .toast-btn-confirm:hover {\n background: linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(30, 41, 59, 1));\n border-color: rgba(255, 255, 255, 0.5);\n box-shadow: 0 8px 28px rgba(15, 23, 42, 0.5);\n }\n \n .toast-btn-confirm.loading {\n opacity: 0.7;\n cursor: not-allowed;\n pointer-events: none;\n }\n \n .toast-btn-confirm .btn-spinner {\n display: none;\n align-items: center;\n justify-content: center;\n margin-left: 8px;\n }\n \n .toast-btn-confirm .btn-spinner svg {\n width: 25px;\n height: 25px;\n animation: spinFast 0.5s linear infinite;\n color: currentColor;\n }\n \n .toast-btn-confirm.loading .btn-spinner {\n display: inline-flex;\n }\n \n .toast-btn-confirm.loading .btn-text {\n opacity: 0.7;\n }\n\n .toastify-pro.light .toast-btn-cancel {\n background: rgba(15, 23, 42, 0.08);\n color: rgba(15, 23, 42, 0.85);\n border-color: rgba(15, 23, 42, 0.2);\n }\n\n .toastify-pro.light .toast-btn-cancel:hover {\n background: rgba(15, 23, 42, 0.12);\n color: rgba(15, 23, 42, 1);\n border-color: rgba(15, 23, 42, 0.3);\n }\n\n /* Enhanced light theme confirm buttons */\n .toastify-pro.light .toast-btn-confirm {\n border-color: rgba(15, 23, 42, 0.35);\n background: linear-gradient(135deg, #1e293b 0%, #334155 100%);\n color: white;\n }\n\n .toastify-pro.light .toast-btn-confirm:hover {\n background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);\n border-color: rgba(15, 23, 42, 0.5);\n box-shadow: 0 8px 28px rgba(15, 23, 42, 0.3);\n }\n\n @media (max-width: 640px) {\n .toastify-pro.confirmation {\n min-width: 280px;\n max-width: calc(100vw - 32px);\n }\n }\n \n /* Custom toast type */\n .toastify-pro.custom {\n border-color: rgba(255, 255, 255, 0.2);\n }\n \n .toastify-pro.custom.light-text {\n color: #1e293b;\n }\n \n .toastify-pro.custom.light-text .toast-icon {\n background: rgba(15, 23, 42, 0.1);\n }\n \n .toastify-pro.custom.light-text .close-btn {\n background: rgba(15, 23, 42, 0.08);\n }\n \n .toastify-pro.custom.light-text .close-btn:hover {\n background: rgba(15, 23, 42, 0.15);\n }\n \n .toastify-pro.custom.light-text::before {\n background: linear-gradient(90deg, \n rgba(30, 41, 59, 0.8) 0%,\n rgba(30, 41, 59, 0.4) 50%,\n rgba(30, 41, 59, 0.8) 100%);\n }\n \n .toastify-pro.custom.light-text::after {\n background: rgba(30, 41, 59, 0.6);\n }\n \n /* Confirmation Overlay */\n .toastify-pro-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n z-index: 9998;\n opacity: 0;\n transition: opacity 0.3s ease;\n pointer-events: auto;\n }\n \n .toastify-pro-overlay.show {\n opacity: 1;\n }\n \n /* Action Button Styles */\n .toastify-pro .toast-action {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 12px;\n margin-top: 8px;\n border: none;\n border-radius: 8px;\n font-weight: 600;\n font-size: 13px;\n cursor: pointer;\n transition: all 0.2s ease;\n background: rgba(255, 255, 255, 0.2);\n color: inherit;\n backdrop-filter: blur(10px);\n }\n \n .toastify-pro .toast-action:hover {\n background: rgba(255, 255, 255, 0.3);\n transform: translateY(-1px);\n }\n \n .toastify-pro .toast-action:active {\n transform: translateY(0);\n }\n \n .toastify-pro.light .toast-action {\n background: rgba(15, 23, 42, 0.1);\n }\n \n .toastify-pro.light .toast-action:hover {\n background: rgba(15, 23, 42, 0.15);\n }\n \n /* Paused state - pause progress bar */\n .toastify-pro.paused::after {\n animation-play-state: paused;\n }\n \n /* Progress restart - used after hover to restart progress bar only */\n .toastify-pro.progress-restart::after {\n animation: none;\n }\n \n /* Focus styles for accessibility */\n .toastify-pro .close-btn:focus,\n .toastify-pro .toast-action:focus,\n .toast-btn:focus {\n outline: 1px solid rgba(255, 255, 255, 0.8);\n }\n \n .toastify-pro.light .close-btn:focus,\n .toastify-pro.light .toast-action:focus {\n outline-color: 1px solid rgba(15, 23, 42, 0.5);\n }\n \n /* Screen reader only class */\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n \n /* ===== INPUT TOAST STYLES ===== */\n .toastify-pro.input-toast {\n min-width: 340px;\n max-width: 450px;\n padding: 24px 24px 20px;\n flex-direction: column;\n align-items: stretch;\n gap: 16px;\n }\n \n .toastify-pro.input-toast .toast-input-wrapper {\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n }\n \n .toastify-pro.input-toast .toast-input-header {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n }\n \n .toastify-pro.input-toast .toast-input {\n width: 100%;\n padding: 12px 16px;\n border: 1.5px solid rgba(255, 255, 255, 0.2);\n border-radius: 12px;\n background: rgba(255, 255, 255, 0.08);\n backdrop-filter: blur(12px);\n color: inherit;\n font-family: inherit;\n font-size: 14px;\n font-weight: 450;\n outline: none;\n transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n }\n \n .toastify-pro.input-toast .toast-input::placeholder {\n color: rgba(255, 255, 255, 0.5);\n font-weight: 400;\n }\n \n .toastify-pro.input-toast .toast-input:focus {\n border-color: rgba(255, 255, 255, 0.45);\n background: rgba(255, 255, 255, 0.12);\n box-shadow: \n inset 0 1px 2px rgba(0, 0, 0, 0.1),\n 0 0 0 3px rgba(255, 255, 255, 0.08);\n }\n \n .toastify-pro.input-toast .toast-input:hover:not(:focus) {\n border-color: rgba(255, 255, 255, 0.3);\n background: rgba(255, 255, 255, 0.1);\n }\n \n .toastify-pro.input-toast.light .toast-input {\n border-color: rgba(15, 23, 42, 0.15);\n background: rgba(15, 23, 42, 0.04);\n box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);\n }\n \n .toastify-pro.input-toast.light .toast-input::placeholder {\n color: rgba(15, 23, 42, 0.45);\n }\n \n .toastify-pro.input-toast.light .toast-input:focus {\n border-color: rgba(15, 23, 42, 0.35);\n background: rgba(15, 23, 42, 0.06);\n box-shadow: \n inset 0 1px 2px rgba(15, 23, 42, 0.06),\n 0 0 0 3px rgba(15, 23, 42, 0.06);\n }\n \n .toastify-pro.input-toast.light .toast-input:hover:not(:focus) {\n border-color: rgba(15, 23, 42, 0.25);\n background: rgba(15, 23, 42, 0.06);\n }\n \n .toastify-pro.input-toast .toast-input-actions {\n display: flex;\n gap: 10px;\n justify-content: flex-end;\n }\n \n .toastify-pro.input-toast .input-btn {\n padding: 10px 20px;\n border-radius: 10px;\n font-size: 14px;\n font-weight: 550;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n border: 1.5px solid transparent;\n position: relative;\n overflow: hidden;\n }\n \n .toastify-pro.input-toast .input-btn-cancel {\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.9);\n border-color: rgba(255, 255, 255, 0.2);\n }\n \n .toastify-pro.input-toast .input-btn-cancel:hover {\n background: rgba(255, 255, 255, 0.18);\n border-color: rgba(255, 255, 255, 0.3);\n }\n \n .toastify-pro.input-toast .input-btn-submit {\n background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);\n color: #1e293b;\n border-color: rgba(255, 255, 255, 0.4);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);\n }\n \n .toastify-pro.input-toast .input-btn-submit:hover {\n background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.95) 100%);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);\n transform: translateY(-1px);\n }\n \n .toastify-pro.input-toast .input-btn-submit:active {\n transform: translateY(0);\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);\n }\n \n .toastify-pro.input-toast.light .input-btn-cancel {\n background: rgba(15, 23, 42, 0.06);\n color: rgba(15, 23, 42, 0.85);\n border-color: rgba(15, 23, 42, 0.15);\n }\n \n .toastify-pro.input-toast.light .input-btn-cancel:hover {\n background: rgba(15, 23, 42, 0.1);\n border-color: rgba(15, 23, 42, 0.25);\n }\n \n .toastify-pro.input-toast.light .input-btn-submit {\n background: linear-gradient(135deg, #1e293b 0%, #334155 100%);\n color: white;\n border-color: rgba(15, 23, 42, 0.3);\n }\n \n .toastify-pro.input-toast.light .input-btn-submit:hover {\n background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);\n box-shadow: 0 4px 16px rgba(15, 23, 42, 0.25);\n }\n \n /* Input toast loading state */\n .toastify-pro.input-toast .input-btn-submit.loading {\n opacity: 0.7;\n cursor: not-allowed;\n pointer-events: none;\n }\n \n .toastify-pro.input-toast .input-btn-submit .btn-spinner {\n display: none;\n align-items: center;\n justify-content: center;\n margin-left: 6px;\n }\n \n .toastify-pro.input-toast .input-btn-submit .btn-spinner svg {\n width: 16px;\n height: 16px;\n animation: spinFast 0.5s linear infinite;\n }\n \n .toastify-pro.input-toast .input-btn-submit.loading .btn-spinner {\n display: inline-flex;\n }\n \n .toastify-pro.input-toast .input-btn-submit.loading .btn-text {\n opacity: 0.7;\n }\n \n /* Input validation error state */\n .toastify-pro.input-toast .toast-input.error {\n border-color: rgba(239, 68, 68, 0.6);\n background: rgba(239, 68, 68, 0.08);\n animation: inputShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);\n }\n \n .toastify-pro.input-toast .toast-input-error {\n color: #f87171;\n font-size: 12px;\n font-weight: 450;\n margin-top: -8px;\n opacity: 0;\n transform: translateY(-4px);\n transition: all 0.2s ease;\n }\n \n .toastify-pro.input-toast .toast-input-error.visible {\n opacity: 1;\n transform: translateY(0);\n }\n \n .toastify-pro.input-toast.light .toast-input.error {\n border-color: rgba(239, 68, 68, 0.5);\n background: rgba(239, 68, 68, 0.06);\n }\n \n .toastify-pro.input-toast.light .toast-input-error {\n color: #dc2626;\n }\n \n @keyframes inputShake {\n 0%, 100% { transform: translateX(0); }\n 20%, 60% { transform: translateX(-6px); }\n 40%, 80% { transform: translateX(6px); }\n }\n \n /* Hide progress bar for input toasts */\n .toastify-pro.input-toast::after {\n display: none;\n }\n \n @media (max-width: 640px) {\n .toastify-pro.input-toast {\n min-width: 280px;\n max-width: calc(100vw - 32px);\n }\n \n .toastify-pro.input-toast .toast-input-actions {\n flex-direction: column;\n }\n \n .toastify-pro.input-toast .input-btn {\n width: 100%;\n }\n }\n \n /* Reduced motion support */\n @media (prefers-reduced-motion: reduce) {\n .toastify-pro {\n transition: opacity 0.3s ease;\n transform: none !important;\n }\n \n .toastify-pro.show {\n animation: none !important;\n opacity: 1;\n transform: none !important;\n }\n \n .toastify-pro .toast-icon {\n animation: none !important;\n }\n \n .toastify-pro::before {\n animation: none !important;\n }\n \n .toastify-pro::after {\n animation: progress var(--duration, 5s) linear !important;\n }\n \n .toastify-pro-overlay {\n transition: opacity 0.2s ease;\n }\n \n .toast-btn::after {\n display: none;\n }\n \n .toast-btn:hover {\n transform: none;\n }\n \n .toastify-pro.confirmation .conf-close-btn:hover {\n transform: scale(1.05);\n }\n \n .btn-spinner svg {\n animation: spinFast 0.5s linear infinite !important;\n }\n }\n ",document.head.appendChild(t)}catch(t){console.error("ToastifyPro: Failed to inject styles:",t)}}show(t,n="dark",e={}){if("string"!=typeof t&&(console.warn("ToastifyPro: Message must be a string. Converting to string."),t=String(t)),!t.trim())return void console.warn("ToastifyPro: Empty message provided.");["success","error","info","warning","dark","light"].includes(n)||(console.warn(`ToastifyPro: Invalid type "${n}". Using "dark".`),n="dark"),"object"==typeof e&&null!==e||(console.warn("ToastifyPro: Invalid options parameter. Using defaults."),e={});const o={...this.defaultOptions,...e};try{if(o.maxToasts>0&&this.activeToasts.length>=o.maxToasts){const t=this.activeToasts.length-o.maxToasts+1;for(let n=0;n<t;n++){const t=this.activeToasts.shift();t&&t.element&&this.removeToast(t.element)}}const e=document.createElement("div");e.className=`toastify-pro ${n}`,e._toastInstance=this;const r="error"===n||"warning"===n?"assertive":o.ariaLive||"polite";e.setAttribute("role","error"===n?"alert":"status"),e.setAttribute("aria-live",r),e.setAttribute("aria-atomic","true"),o.timeout>0&&e.style.setProperty("--duration",`${o.timeout}ms`);const a=document.createElement("div");a.className="toast-icon",a.setAttribute("aria-hidden","true"),a.innerHTML=this.getIconSVG(n),e.appendChild(a);const i=document.createElement("div");i.className="toast-content";const s=document.createElement("div");if(s.className="toast-message",s.textContent=t.substring(0,o.maxLength),i.appendChild(s),o.description&&"string"==typeof o.description){const t=document.createElement("div");t.className="toast-description",t.textContent=o.description.substring(0,2*o.maxLength),i.appendChild(t)}if(o.action&&"object"==typeof o.action){const t=document.createElement("button");t.className="toast-action",t.textContent=o.action.label||"Action",t.setAttribute("type","button"),"function"==typeof o.action.onClick&&(t.onclick=t=>{t.stopPropagation(),o.action.onClick({close:()=>this.removeToast(e),event:t})}),i.appendChild(t)}if(e.appendChild(i),o.allowClose){const t=document.createElement("button");t.className="close-btn",t.innerHTML="&times;",t.setAttribute("type","button"),t.setAttribute("aria-label","Close notification"),t.onclick=()=>this.removeToast(e),e.appendChild(t)}o.newestOnTop&&this.container.firstChild?this.container.insertBefore(e,this.container.firstChild):this.container.appendChild(e);const l={element:e,timeout:null,remainingTime:o.timeout,startTime:null,isPaused:!1,isRemoving:!1};return this.activeToasts.push(l),setTimeout(()=>{e.classList.add("show");const t=e.querySelector(".toast-icon");t&&(t.style.animation="iconBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275)")},10),o.pauseOnHover&&o.timeout>0&&(e.addEventListener("mouseenter",()=>{l.isRemoving||l.timeout&&(clearTimeout(l.timeout),l.isPaused=!0,l.remainingTime-=Date.now()-l.startTime,e.classList.add("paused"))}),e.addEventListener("mouseleave",()=>{l.isRemoving||l.isPaused&&l.remainingTime>0&&(l.isPaused=!1,l.startTime=Date.now(),e.classList.remove("paused"),e.style.setProperty("--duration",`${l.remainingTime}ms`),e.classList.add("progress-restart"),e.offsetHeight,e.classList.remove("progress-restart"),l.timeout=setTimeout(()=>this.removeToast(e),l.remainingTime))})),o.timeout>0&&(l.startTime=Date.now(),l.timeout=setTimeout(()=>this.removeToast(e),o.timeout)),{element:e,dismiss:()=>this.removeToast(e),update:(t,n)=>this.updateToast(e,t,n)}}catch(t){console.error("ToastifyPro: Failed to create toast:",t)}}updateToast(t,n,e={}){if(!t||!t.parentNode)return;const o=t.querySelector(".toast-message"),r=t.querySelector(".toast-description");if(n&&o&&(o.textContent=n),e.description&&r)r.textContent=e.description;else if(e.description){const n=document.createElement("div");n.className="toast-description",n.textContent=e.description,t.querySelector(".toast-content")?.appendChild(n)}if(e.type){const n=["success","error","info","warning","dark","light"];if(n.includes(e.type)){n.forEach(n=>t.classList.remove(n)),t.classList.add(e.type);const o=t.querySelector(".toast-icon");o&&(o.innerHTML=this.getIconSVG(e.type))}}}removeToast(t){if(t&&t.parentNode)try{const n=this.activeToasts.findIndex(n=>n.element===t);if(n>-1){const t=this.activeToasts[n];t.isRemoving=!0,t.timeout&&clearTimeout(t.timeout),this.activeToasts.splice(n,1)}if("true"===t.dataset.removing)return;t.dataset.removing="true",t.style.pointerEvents="none";const e=t.parentNode.className.split(" ")[1];let o="carSwipeBottom";e.includes("bottom")?o="carSwipeBottom":e.includes("top")?o="carSwipeTop":e.includes("left")?o="carSwipeLeft":e.includes("right")?o="carSwipeRight":e.includes("center")&&(o="carSwipeCenter"),t.style.animation=`${o} 0.35s cubic-bezier(0.55, 0.0, 0.85, 0.36) forwards`;const r=t.querySelector(".toast-icon");r&&(r.style.animation="iconCarExit 0.35s cubic-bezier(0.55, 0.0, 0.85, 0.36) forwards"),setTimeout(()=>{t.parentNode&&t.remove()},350)}catch(n){console.error("ToastifyPro: Error removing toast:",n),t.parentNode&&t.remove()}else console.warn("ToastifyPro: Invalid toast element for removal.")}dismissAll(t=null){[...this.activeToasts].forEach(n=>{n.element&&(t?n.element.classList.contains(t)&&this.removeToast(n.element):this.removeToast(n.element))})}getActiveCount(){return this.activeToasts.length}success(t,n){"string"==typeof n&&(n={description:n}),this.show(t,"success",n)}error(t,n){"string"==typeof n&&(n={description:n}),this.show(t,"error",n)}info(t,n){"string"==typeof n&&(n={description:n}),this.show(t,"info",n)}warning(t,n){"string"==typeof n&&(n={description:n}),this.show(t,"warning",n)}dark(t,n){"string"==typeof n&&(n={description:n}),this.show(t,"dark",n)}light(t,n){"string"==typeof n&&(n={description:n}),this.show(t,"light",n)}custom(t,n){"string"==typeof n&&(n={description:n});const e=(n=n||{}).primaryColor||this.defaultOptions.primaryColor,o=n.secondaryColor||this.defaultOptions.secondaryColor;if(!e)return this.success(t,n);const r=t=>{if(!t)return!1;const n=t.replace("#","");return(299*parseInt(n.substr(0,2),16)+587*parseInt(n.substr(2,2),16)+114*parseInt(n.substr(4,2),16))/1e3>155},a=(t,n)=>{const e=t.replace("#",""),o=parseInt(e.substr(0,2),16),r=parseInt(e.substr(2,2),16),a=parseInt(e.substr(4,2),16),i=t=>{const e=Math.round(t+n/100*(n>0?255-t:t));return Math.max(0,Math.min(255,e))};return`#${i(o).toString(16).padStart(2,"0")}${i(r).toString(16).padStart(2,"0")}${i(a).toString(16).padStart(2,"0")}`};let i,s=e;if(o)i=o;else{i=a(e,r(e)?-25:25)}const l=r(e),c={...n,customGradient:`linear-gradient(135deg, ${s} 0%, ${i} 100%)`,customTextLight:l};this.showCustom(t,c)}showCustom(t,n={}){if("string"!=typeof t&&(t=String(t)),!t.trim())return void console.warn("ToastifyPro: Empty message provided.");const e={...this.defaultOptions,...n};try{const n=document.createElement("div");n.className="toastify-pro custom"+(e.customTextLight?" light-text":""),n._toastInstance=this,n.setAttribute("role","status"),n.setAttribute("aria-live",e.ariaLive||"polite"),n.setAttribute("aria-atomic","true"),e.customGradient&&(n.style.background=e.customGradient),e.timeout>0&&n.style.setProperty("--duration",`${e.timeout}ms`);const o=document.createElement("div");o.className="toast-icon",o.setAttribute("aria-hidden","true"),o.innerHTML=this.getIconSVG("success"),n.appendChild(o);const r=document.createElement("div");r.className="toast-content";const a=document.createElement("div");if(a.className="toast-message",a.textContent=t.substring(0,e.maxLength),r.appendChild(a),e.description&&"string"==typeof e.description){const t=document.createElement("div");t.className="toast-description",t.textContent=e.description.substring(0,2*e.maxLength),r.appendChild(t)}if(n.appendChild(r),e.allowClose){const t=document.createElement("button");t.className="close-btn",t.innerHTML="&times;",t.setAttribute("type","button"),t.setAttribute("aria-label","Close notification"),t.onclick=()=>this.removeToast(n),n.appendChild(t)}e.newestOnTop&&this.container.firstChild?this.container.insertBefore(n,this.container.firstChild):this.container.appendChild(n);const i={element:n,timeout:null,remainingTime:e.timeout,startTime:null,isPaused:!1};return this.activeToasts.push(i),e.pauseOnHover&&e.timeout>0&&(n.addEventListener("mouseenter",()=>{i.timeout&&(clearTimeout(i.timeout),i.isPaused=!0,i.remainingTime-=Date.now()-i.startTime,n.classList.add("paused"))}),n.addEventListener("mouseleave",()=>{i.isPaused&&i.remainingTime>0&&(i.isPaused=!1,i.startTime=Date.now(),n.classList.remove("paused"),n.style.setProperty("--duration",`${i.remainingTime}ms`),i.timeout=setTimeout(()=>this.removeToast(n),i.remainingTime))})),setTimeout(()=>{n.classList.add("show");const t=n.querySelector(".toast-icon");t&&(t.style.animation="iconBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275)")},10),e.timeout>0&&(i.startTime=Date.now(),i.timeout=setTimeout(()=>this.removeToast(n),e.timeout)),{element:n,dismiss:()=>this.removeToast(n),update:(t,e)=>this.updateToast(n,t,e)}}catch(t){console.error("ToastifyPro: Failed to create custom toast:",t)}}conf(n,e,o){if(t&&t.element&&t.element.parentNode){const n=t.element;return n.classList.remove("shake"),n.offsetWidth,n.classList.add("shake"),setTimeout(()=>{n&&n.parentNode&&n.classList.remove("shake")},600),t}let r="",a={},i=null;"function"!=typeof e||o?"string"==typeof e&&"function"==typeof o?(r=e,i=o):"object"==typeof e&&null!==e?(a=e,r=a.description||"",a.onConfirm||a.onCancel?i=null:"function"==typeof o&&(i=o)):"string"==typeof e&&"object"==typeof o&&(r=e,a=o||{},i=null):i=e;const s={timeout:0,allowClose:!1,confirmText:a.confirmText||"Confirm",cancelText:a.cancelText||"Cancel",theme:a.theme||a.color||"dark",position:a.position||"center",primaryColor:a.primaryColor||null,secondaryColor:a.secondaryColor||null,loading:a.loading||!1,...a};"light"===s.theme||"white"===s.theme?s.theme="light":s.theme="dark";const l=t=>{if(!t)return!1;const n=t.replace("#","");return(299*parseInt(n.substr(0,2),16)+587*parseInt(n.substr(2,2),16)+114*parseInt(n.substr(4,2),16))/1e3>155};let c="light"===s.theme?"#1e293b":"white";s.primaryColor&&(c=l(s.primaryColor)?"#1e293b":"white");["top-left","top-right","bottom-left","bottom-right","top-center","bottom-center","center"].includes(s.position)||(console.warn(`ToastifyPro: Invalid confirmation position "${s.position}". Using default position.`),s.position=this.defaultOptions.position);let p=document.querySelector(`.toastify-pro-container.${s.position}`);if(!p)try{p=document.createElement("div"),p.className=`toastify-pro-container ${s.position}`,document.body.appendChild(p)}catch(t){console.warn("ToastifyPro: Failed to create confirmation container. Using default container."),p=this.container}let d=null,u=null,m=null,f=!1,g=!1,b=null,h=null;const y=t=>{g=!0,f=t,d&&(t?(d.classList.add("loading"),d.disabled=!0):(d.classList.remove("loading"),d.disabled=!1)),u&&(u.disabled=t,u.style.opacity=t?"0.5":"1",u.style.cursor=t?"not-allowed":"pointer"),m&&(m.style.opacity=t?"0.3":"0.5",m.style.cursor=t?"not-allowed":"pointer",m.style.pointerEvents=t?"none":"auto")},x=()=>{b&&b.parentNode&&(t=null,h&&h.parentNode&&(h.classList.remove("show"),setTimeout(()=>{h&&h.parentNode&&h.remove(),h=null},300)),this.removeToast(b))},v=async t=>{if(t)if(a.onConfirm&&"function"==typeof a.onConfirm)try{const t=a.onConfirm({setLoading:y,close:x});t&&"function"==typeof t.then?(g||y(!0),await t,b&&b.parentNode&&(y(!1),x())):g||x()}catch(t){console.error("ToastifyPro: Error in onConfirm callback:",t),y(!1),x()}else if(i&&"function"==typeof i)try{const t=i(!0,{setLoading:y,close:x});t&&"function"==typeof t.then?(g||y(!0),await t,b&&b.parentNode&&(y(!1),x())):g||x()}catch(t){console.error("ToastifyPro: Error in confirmation callback:",t),y(!1),x()}else x();else{if(f)return;if(a.onCancel&&"function"==typeof a.onCancel)try{a.onCancel()}catch(t){console.error("ToastifyPro: Error in onCancel callback:",t)}if(i&&"function"==typeof i)try{i(!1)}catch(t){console.error("ToastifyPro: Error in confirmation callback:",t)}x()}};try{h=document.createElement("div"),h.className="toastify-pro-overlay",document.body.appendChild(h),setTimeout(()=>{h.classList.add("show")},10);const e=document.createElement("div");if(e.className=`toastify-pro confirmation ${s.theme}`,b=e,s.primaryColor){const t=s.primaryColor,n=s.secondaryColor;e.style.background=n?`linear-gradient(135deg, ${t} 0%, ${n} 100%)`:t,e.style.color=c;const o=l(t)?"0.2":"0.15";e.style.borderColor=`rgba(255, 255, 255, ${o})`}const o=document.createElement("button");o.className="conf-close-btn",o.innerHTML="&times;",o.setAttribute("type","button"),o.setAttribute("aria-label","Cancel confirmation"),o.onclick=()=>{f||v(!1)},s.primaryColor&&(o.style.color=c),m=o,e.appendChild(o);const a=document.createElement("div");a.className="toast-icon",a.setAttribute("aria-hidden","true"),a.innerHTML=this.getIconSVG("info"),s.primaryColor&&(a.style.color=c),e.appendChild(a);const i=document.createElement("div");i.className="toast-content";const g=document.createElement("div");g.className="toast-message",g.textContent=n.substring(0,this.defaultOptions.maxLength),s.primaryColor&&(g.style.color=c),i.appendChild(g);let w=null;r&&(w=document.createElement("div"),w.className="toast-description",w.textContent=r.substring(0,2*this.defaultOptions.maxLength),s.primaryColor&&(w.style.color=c),i.appendChild(w)),e.appendChild(i);const C=document.createElement("div");C.className="toast-actions";const k=document.createElement("button");if(k.className="toast-btn toast-btn-cancel",k.setAttribute("type","button"),k.textContent=s.cancelText,k.onclick=()=>{f||v(!1)},u=k,s.primaryColor){const t=l(s.primaryColor);k.style.background=t?"rgba(15, 23, 42, 0.08)":"rgba(255, 255, 255, 0.1)",k.style.color=c,k.style.borderColor=t?"rgba(15, 23, 42, 0.2)":"rgba(255, 255, 255, 0.25)"}const T=document.createElement("button");T.className="toast-btn toast-btn-confirm",T.setAttribute("type","button");const L=document.createElement("span");L.className="btn-text",L.textContent=s.confirmText,T.appendChild(L);const E=document.createElement("span");if(E.className="btn-spinner",E.innerHTML='\n <svg width="25" height="25" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.5 2.9375V5.5625M9.5 13.4375V16.0625M2.9375 9.5H5.5625M13.4375 9.5H16.0625" stroke="currentColor" stroke-width="1.875" stroke-linecap="round" />\n <path d="M4.86011 4.85961L6.71627 6.71577M12.2847 12.2842L14.1409 14.1404M4.86011 14.1404L6.71627 12.2842M12.2847 6.71577L14.1409 4.85961" stroke="currentColor" stroke-width="1.875" stroke-linecap="round" />\n </svg>\n ',T.appendChild(E),T.onclick=()=>{f||v(!0)},d=T,s.primaryColor){const t=s.primaryColor,n=s.secondaryColor,e=l(t);T.style.background=n?`linear-gradient(135deg, ${t} 0%, ${n} 100%)`:t,T.style.color=e?"#1e293b":"white",T.style.borderColor=e?"rgba(15, 23, 42, 0.3)":"rgba(255, 255, 255, 0.4)"}C.appendChild(k),C.appendChild(T),e.appendChild(C),p.appendChild(e);const N={element:e,setLoading:y,close:x};t=N,s.loading&&y(!0),e.setAttribute("role","alertdialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-labelledby","toast-conf-title"),r&&e.setAttribute("aria-describedby","toast-conf-desc"),g.id="toast-conf-title",r&&w&&(w.id="toast-conf-desc");const S=document.activeElement,P=[k,T,o].filter(Boolean);let z=0;const M=t=>{"Tab"===t.key&&b&&b.parentNode&&(t.preventDefault(),z=t.shiftKey?(z-1+P.length)%P.length:(z+1)%P.length,P[z]?.focus())};document.addEventListener("keydown",M);const I=x,A=()=>{document.removeEventListener("keydown",M),S&&"function"==typeof S.focus&&setTimeout(()=>S.focus(),100),I()};return N.close=A,setTimeout(()=>{e.classList.add("show");const t=e.querySelector(".toast-icon");t&&(t.style.animation="iconBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275)"),setTimeout(()=>{T.focus()},100)},10),N}catch(t){console.error("ToastifyPro: Failed to create confirmation toast:",t)}}confirm(t,n,e){return this.conf(t,n,e)}input(t,n,e){try{let o="",r={},a=null;"string"==typeof n?(o=n,"function"==typeof e?a=e:"object"==typeof e&&(r=e||{},a=r.onSubmit||null)):"function"==typeof n?a=n:"object"==typeof n&&(r=n||{},o=r.description||"",a=r.onSubmit||null);const i={placeholder:r.placeholder||"Enter your response...",submitText:r.submitText||"Submit",cancelText:r.cancelText||"Cancel",defaultValue:r.defaultValue||"",required:!1!==r.required,type:r.type||"text",validate:r.validate||null,onCancel:r.onCancel||null,theme:r.theme||"dark",position:r.position||this.defaultOptions.position,overlay:!1!==r.overlay,primaryColor:r.primaryColor||null,secondaryColor:r.secondaryColor||null};let s;["text","email","number","password","url","tel"].includes(i.type)||(i.type="text");const l=i.position.replace(" ","-"),c=document.querySelector(`.toastify-pro-container.${l}`);c?s=c:(s=document.createElement("div"),s.className=`toastify-pro-container ${l}`,document.body.appendChild(s));let p=null;i.overlay&&(p=document.createElement("div"),p.className="toastify-pro-overlay",document.body.appendChild(p),setTimeout(()=>p.classList.add("visible"),10));const d=document.createElement("div");d.className=`toastify-pro input-toast ${i.theme}`,d.setAttribute("role","dialog"),d.setAttribute("aria-modal","true"),d.setAttribute("aria-labelledby","toast-input-title");let u=!1,m=!1,f=null,g=null,b=null,h=null;const y=t=>{if(!t)return!1;const n=t.replace("#","");if(3===n.length){return(299*parseInt(n[0]+n[0],16)+587*parseInt(n[1]+n[1],16)+114*parseInt(n[2]+n[2],16))/1e3>128}return(299*parseInt(n.substr(0,2),16)+587*parseInt(n.substr(2,2),16)+114*parseInt(n.substr(4,2),16))/1e3>128};let x="light"===i.theme?"#1e293b":"white";if(i.primaryColor){const t=i.primaryColor,n=i.secondaryColor;d.style.background=n?`linear-gradient(135deg, ${t} 0%, ${n} 100%)`:`linear-gradient(135deg, ${t} 0%, ${t}dd 100%)`,x=y(t)?"#1e293b":"white",d.style.color=x;const e=y(t)?"0.2":"0.15";d.style.borderColor=`rgba(255, 255, 255, ${e})`}const v=t=>{u=t,g&&(t?g.classList.add("loading"):g.classList.remove("loading")),b&&(b.disabled=t,b.style.opacity=t?"0.5":"1",b.style.cursor=t?"not-allowed":"pointer"),f&&(f.disabled=t,f.style.opacity=t?"0.6":"1")},w=()=>{if(m)return;m=!0,p&&(p.classList.remove("visible"),setTimeout(()=>p.remove(),300)),d.style.pointerEvents="none",d.style.animation="carSwipeCenter 0.35s cubic-bezier(0.55, 0.0, 0.85, 0.36) forwards";const t=d.querySelector(".toast-icon");t&&(t.style.animation="iconCarExit 0.35s cubic-bezier(0.55, 0.0, 0.85, 0.36) forwards"),setTimeout(()=>{d.parentNode&&d.remove()},350),N&&"function"==typeof N.focus&&setTimeout(()=>N.focus(),100),document.removeEventListener("keydown",S)},C=t=>{if(i.required&&!t.trim())return"This field is required";if(t.trim())if("email"===i.type){if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t))return"Please enter a valid email address"}else if("url"===i.type)try{new URL(t)}catch{return"Please enter a valid URL"}else if("number"===i.type&&isNaN(Number(t)))return"Please enter a valid number";if(i.validate){const n=i.validate(t);if(!0!==n&&n)return n}return null},k=t=>{h&&(h.textContent=t,h.classList.add("visible"),f.classList.add("error"))},T=()=>{h&&(h.classList.remove("visible"),f.classList.remove("error"))},L=async()=>{if(u||m)return;const t=f.value,n=C(t);if(n)return k(n),void f.focus();if(T(),a){const n=a(t,{setLoading:v,close:w,setValue:t=>f.value=t});if(n&&"function"==typeof n.then){v(!0);try{await n,m||w()}catch(t){v(!1),t&&"string"==typeof t?k(t):t&&t.message&&k(t.message)}}else u||w()}else w()},E=()=>{u||m||(i.onCancel&&i.onCancel(),w())},N=document.activeElement,S=t=>{m||("Escape"!==t.key||u?"Enter"!==t.key||t.target!==f||u||(t.preventDefault(),L()):E())};document.addEventListener("keydown",S);const P=document.createElement("div");P.className="toast-input-header";const z=document.createElement("div");z.className="toast-icon",z.setAttribute("aria-hidden","true"),z.innerHTML='<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M11 4H4C3.46957 4 2.96086 4.21071 2.58579 4.58579C2.21071 4.96086 2 5.46957 2 6V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V13" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M18.5 2.50001C18.8978 2.10219 19.4374 1.87869 20 1.87869C20.5626 1.87869 21.1022 2.10219 21.5 2.50001C21.8978 2.89784 22.1213 3.43739 22.1213 4.00001C22.1213 4.56262 21.8978 5.10219 21.5 5.50001L12 15L8 16L9 12L18.5 2.50001Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>',i.primaryColor&&(z.style.color=x),P.appendChild(z);const M=document.createElement("div");M.className="toast-content";const I=document.createElement("div");if(I.className="toast-message",I.id="toast-input-title",I.textContent=t.substring(0,this.defaultOptions.maxLength),i.primaryColor&&(I.style.color=x),M.appendChild(I),o){const t=document.createElement("div");t.className="toast-description",t.id="toast-input-desc",t.textContent=o.substring(0,2*this.defaultOptions.maxLength),i.primaryColor&&(t.style.color=x),M.appendChild(t),d.setAttribute("aria-describedby","toast-input-desc")}P.appendChild(M);const A=document.createElement("div");if(A.className="toast-input-wrapper",A.appendChild(P),f=document.createElement("input"),f.className="toast-input",f.type=i.type,f.placeholder=i.placeholder,f.value=i.defaultValue,f.setAttribute("aria-label",t),i.primaryColor){const t=y(i.primaryColor);f.style.borderColor=t?"rgba(15, 23, 42, 0.2)":"rgba(255, 255, 255, 0.2)",f.style.background=t?"rgba(15, 23, 42, 0.06)":"rgba(255, 255, 255, 0.08)",f.style.color=x}f.addEventListener("input",()=>{h&&h.classList.contains("visible")&&T()}),A.appendChild(f),h=document.createElement("div"),h.className="toast-input-error",h.setAttribute("role","alert"),A.appendChild(h);const $=document.createElement("div");if($.className="toast-input-actions",b=document.createElement("button"),b.className="input-btn input-btn-cancel",b.type="button",b.textContent=i.cancelText,b.onclick=E,i.primaryColor){const t=y(i.primaryColor);b.style.background=t?"rgba(15, 23, 42, 0.08)":"rgba(255, 255, 255, 0.1)",b.style.color=x,b.style.borderColor=t?"rgba(15, 23, 42, 0.2)":"rgba(255, 255, 255, 0.2)"}g=document.createElement("button"),g.className="input-btn input-btn-submit",g.type="button";const H=document.createElement("span");H.className="btn-text",H.textContent=i.submitText,g.appendChild(H);const O=document.createElement("span");if(O.className="btn-spinner",O.innerHTML='<svg width="16" height="16" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.5 2.9375V5.5625M9.5 13.4375V16.0625M2.9375 9.5H5.5625M13.4375 9.5H16.0625" stroke="currentColor" stroke-width="1.875" stroke-linecap="round" />\n <path d="M4.86011 4.85961L6.71627 6.71577M12.2847 12.2842L14.1409 14.1404M4.86011 14.1404L6.71627 12.2842M12.2847 6.71577L14.1409 4.85961" stroke="currentColor" stroke-width="1.875" stroke-linecap="round" />\n </svg>',g.appendChild(O),g.onclick=L,i.primaryColor){const t=y(i.primaryColor);g.style.background=t?"linear-gradient(135deg, #1e293b 0%, #334155 100%)":"linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%)",g.style.color=t?"white":"#1e293b",g.style.borderColor=t?"rgba(15, 23, 42, 0.3)":"rgba(255, 255, 255, 0.4)"}return $.appendChild(b),$.appendChild(g),A.appendChild($),d.appendChild(A),s.appendChild(d),setTimeout(()=>{d.classList.add("show");const t=d.querySelector(".toast-icon");t&&(t.style.animation="iconBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275)"),setTimeout(()=>{f.focus(),i.defaultValue&&f.select()},150)},10),{element:d,close:w,setLoading:v,getValue:()=>f.value,setValue:t=>{f.value=t},setError:k,clearError:T}}catch(t){console.error("ToastifyPro: Failed to create input toast:",t)}}prompt(t,n,e){return this.input(t,n,e)}}"undefined"!=typeof module&&module.exports&&(module.exports=n),"undefined"!=typeof exports&&(exports.ToastifyPro=n,exports.default=n),"function"==typeof define&&define.amd&&define(function(){return n}),"undefined"!=typeof window&&(window.ToastifyPro=n)});
31
33
  //# sourceMappingURL=toastify-pro.umd.min.js.map