diff --git a/Bootstrap.Admin/Views/Account/Login.cshtml b/Bootstrap.Admin/Views/Account/Login.cshtml index 4b5fd5d3..0340606b 100644 --- a/Bootstrap.Admin/Views/Account/Login.cshtml +++ b/Bootstrap.Admin/Views/Account/Login.cshtml @@ -7,12 +7,12 @@ - + - + @@ -28,13 +28,13 @@ - + - + diff --git a/Bootstrap.Admin/Views/Shared/_Admin.cshtml b/Bootstrap.Admin/Views/Shared/_Admin.cshtml index 13a535f6..4b02218c 100644 --- a/Bootstrap.Admin/Views/Shared/_Admin.cshtml +++ b/Bootstrap.Admin/Views/Shared/_Admin.cshtml @@ -1,17 +1,17 @@ -@{ +@{ Layout = "_Bootstrap"; } @section css { - + - + @RenderSection("css", false) @@ -22,7 +22,7 @@ - + @@ -30,7 +30,7 @@ - + diff --git a/Bootstrap.Admin/libman.json b/Bootstrap.Admin/libman.json index 4bf53eed..96ec1f62 100644 --- a/Bootstrap.Admin/libman.json +++ b/Bootstrap.Admin/libman.json @@ -105,14 +105,13 @@ }, { "provider": "cdnjs", - "library": "bootstrap-sweetalert@1.0.1", - "destination": "wwwroot/lib/bootstrap-sweetalert/", + "library": "limonte-sweetalert2@7.33.1", + "destination": "wwwroot/lib/sweetalert/", "files": [ - "sweetalert.min.js", - "sweetalert.css", - "sweetalert.js", - "sweetalert.min.css", - "sweetalert.min.css.map" + "sweetalert2.js", + "sweetalert2.min.js", + "sweetalert2.css", + "sweetalert2.min.css" ] }, { diff --git a/Bootstrap.Admin/wwwroot/css/theme.css b/Bootstrap.Admin/wwwroot/css/theme.css index 93e0cdbd..34653c98 100644 --- a/Bootstrap.Admin/wwwroot/css/theme.css +++ b/Bootstrap.Admin/wwwroot/css/theme.css @@ -512,15 +512,13 @@ input.pending { display: inline-block; } -.sweet-alert h2 { - margin-top: 32px; +.swal2-popup .swal2-title { margin-bottom: 16px; font-size: 1.5rem; } -.sweet-alert .sa-button-container .btn-lg { - padding: 0.375rem 1.5rem; - font-size: 1rem; +.swal2-popup .swal2-styled { + padding: 0.4em 1em; } .refreshIcon { diff --git a/Bootstrap.Admin/wwwroot/lib/bootstrap-sweetalert/sweetalert.css b/Bootstrap.Admin/wwwroot/lib/bootstrap-sweetalert/sweetalert.css deleted file mode 100644 index c6d21f66..00000000 --- a/Bootstrap.Admin/wwwroot/lib/bootstrap-sweetalert/sweetalert.css +++ /dev/null @@ -1,686 +0,0 @@ -@keyframes showSweetAlert { - 0% { - transform: scale(0.7); - } - 45% { - transform: scale(1.05); - } - 80% { - transform: scale(0.95); - } - 100% { - transform: scale(1); - } -} -@keyframes hideSweetAlert { - 0% { - transform: scale(1); - } - 100% { - transform: scale(0.5); - } -} -@keyframes slideFromTop { - 0% { - top: 0%; - } - 100% { - top: 50%; - } -} -@keyframes slideToTop { - 0% { - top: 50%; - } - 100% { - top: 0%; - } -} -@keyframes slideFromBottom { - 0% { - top: 70%; - } - 100% { - top: 50%; - } -} -@keyframes slideToBottom { - 0% { - top: 50%; - } - 100% { - top: 70%; - } -} -.showSweetAlert { - animation: showSweetAlert 0.3s; -} -.showSweetAlert[data-animation=none] { - animation: none; -} -.showSweetAlert[data-animation=slide-from-top] { - animation: slideFromTop 0.3s; -} -.showSweetAlert[data-animation=slide-from-bottom] { - animation: slideFromBottom 0.3s; -} -.hideSweetAlert { - animation: hideSweetAlert 0.3s; -} -.hideSweetAlert[data-animation=none] { - animation: none; -} -.hideSweetAlert[data-animation=slide-from-top] { - animation: slideToTop 0.3s; -} -.hideSweetAlert[data-animation=slide-from-bottom] { - animation: slideToBottom 0.3s; -} -@keyframes animateSuccessTip { - 0% { - width: 0; - left: 1px; - top: 19px; - } - 54% { - width: 0; - left: 1px; - top: 19px; - } - 70% { - width: 50px; - left: -8px; - top: 37px; - } - 84% { - width: 17px; - left: 21px; - top: 48px; - } - 100% { - width: 25px; - left: 14px; - top: 45px; - } -} -@keyframes animateSuccessLong { - 0% { - width: 0; - right: 46px; - top: 54px; - } - 65% { - width: 0; - right: 46px; - top: 54px; - } - 84% { - width: 55px; - right: 0px; - top: 35px; - } - 100% { - width: 47px; - right: 8px; - top: 38px; - } -} -@keyframes rotatePlaceholder { - 0% { - transform: rotate(-45deg); - } - 5% { - transform: rotate(-45deg); - } - 12% { - transform: rotate(-405deg); - } - 100% { - transform: rotate(-405deg); - } -} -.animateSuccessTip { - animation: animateSuccessTip 0.75s; -} -.animateSuccessLong { - animation: animateSuccessLong 0.75s; -} -.sa-icon.sa-success.animate::after { - animation: rotatePlaceholder 4.25s ease-in; -} -@keyframes animateErrorIcon { - 0% { - transform: rotateX(100deg); - opacity: 0; - } - 100% { - transform: rotateX(0deg); - opacity: 1; - } -} -.animateErrorIcon { - animation: animateErrorIcon 0.5s; -} -@keyframes animateXMark { - 0% { - transform: scale(0.4); - margin-top: 26px; - opacity: 0; - } - 50% { - transform: scale(0.4); - margin-top: 26px; - opacity: 0; - } - 80% { - transform: scale(1.15); - margin-top: -6px; - } - 100% { - transform: scale(1); - margin-top: 0; - opacity: 1; - } -} -.animateXMark { - animation: animateXMark 0.5s; -} -@keyframes pulseWarning { - 0% { - border-color: #F8D486; - } - 100% { - border-color: #F8BB86; - } -} -.pulseWarning { - animation: pulseWarning 0.75s infinite alternate; -} -@keyframes pulseWarningIns { - 0% { - background-color: #F8D486; - } - 100% { - background-color: #F8BB86; - } -} -.pulseWarningIns { - animation: pulseWarningIns 0.75s infinite alternate; -} -@keyframes rotate-loading { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } -} -body.stop-scrolling { - height: 100%; - overflow: hidden; -} -.sweet-overlay { - background-color: rgba(0, 0, 0, 0.4); - position: fixed; - left: 0; - right: 0; - top: 0; - bottom: 0; - display: none; - z-index: 1040; -} -.sweet-alert { - background-color: #ffffff; - width: 478px; - padding: 17px; - border-radius: 5px; - text-align: center; - position: fixed; - left: 50%; - top: 50%; - margin-left: -256px; - margin-top: -200px; - overflow: hidden; - display: none; - z-index: 2000; -} -@media all and (max-width: 767px) { - .sweet-alert { - width: auto; - margin-left: 0; - margin-right: 0; - left: 15px; - right: 15px; - } -} -.sweet-alert .form-group { - display: none; -} -.sweet-alert .form-group .sa-input-error { - display: none; -} -.sweet-alert.show-input .form-group { - display: block; -} -.sweet-alert .sa-confirm-button-container { - display: inline-block; - position: relative; -} -.sweet-alert .la-ball-fall { - position: absolute; - left: 50%; - top: 50%; - margin-left: -27px; - margin-top: -9px; - opacity: 0; - visibility: hidden; -} -.sweet-alert button[disabled] { - opacity: .6; - cursor: default; -} -.sweet-alert button.confirm[disabled] { - color: transparent; -} -.sweet-alert button.confirm[disabled] ~ .la-ball-fall { - opacity: 1; - visibility: visible; - transition-delay: 0s; -} -.sweet-alert .sa-icon { - width: 80px; - height: 80px; - border: 4px solid gray; - border-radius: 50%; - margin: 20px auto; - position: relative; - box-sizing: content-box; -} -.sweet-alert .sa-icon.sa-error { - border-color: #d43f3a; -} -.sweet-alert .sa-icon.sa-error .sa-x-mark { - position: relative; - display: block; -} -.sweet-alert .sa-icon.sa-error .sa-line { - position: absolute; - height: 5px; - width: 47px; - background-color: #d9534f; - display: block; - top: 37px; - border-radius: 2px; -} -.sweet-alert .sa-icon.sa-error .sa-line.sa-left { - transform: rotate(45deg); - left: 17px; -} -.sweet-alert .sa-icon.sa-error .sa-line.sa-right { - transform: rotate(-45deg); - right: 16px; -} -.sweet-alert .sa-icon.sa-warning { - border-color: #eea236; -} -.sweet-alert .sa-icon.sa-warning .sa-body { - position: absolute; - width: 5px; - height: 47px; - left: 50%; - top: 10px; - border-radius: 2px; - margin-left: -2px; - background-color: #f0ad4e; -} -.sweet-alert .sa-icon.sa-warning .sa-dot { - position: absolute; - width: 7px; - height: 7px; - border-radius: 50%; - margin-left: -3px; - left: 50%; - bottom: 10px; - background-color: #f0ad4e; -} -.sweet-alert .sa-icon.sa-info { - border-color: #46b8da; -} -.sweet-alert .sa-icon.sa-info::before { - content: ""; - position: absolute; - width: 5px; - height: 29px; - left: 50%; - bottom: 17px; - border-radius: 2px; - margin-left: -2px; - background-color: #5bc0de; -} -.sweet-alert .sa-icon.sa-info::after { - content: ""; - position: absolute; - width: 7px; - height: 7px; - border-radius: 50%; - margin-left: -3px; - top: 19px; - background-color: #5bc0de; -} -.sweet-alert .sa-icon.sa-success { - border-color: #4cae4c; -} -.sweet-alert .sa-icon.sa-success::before, -.sweet-alert .sa-icon.sa-success::after { - content: ''; - border-radius: 50%; - position: absolute; - width: 60px; - height: 120px; - background: #ffffff; - transform: rotate(45deg); -} -.sweet-alert .sa-icon.sa-success::before { - border-radius: 120px 0 0 120px; - top: -7px; - left: -33px; - transform: rotate(-45deg); - transform-origin: 60px 60px; -} -.sweet-alert .sa-icon.sa-success::after { - border-radius: 0 120px 120px 0; - top: -11px; - left: 30px; - transform: rotate(-45deg); - transform-origin: 0px 60px; -} -.sweet-alert .sa-icon.sa-success .sa-placeholder { - width: 80px; - height: 80px; - border: 4px solid rgba(92, 184, 92, 0.2); - border-radius: 50%; - box-sizing: content-box; - position: absolute; - left: -4px; - top: -4px; - z-index: 2; -} -.sweet-alert .sa-icon.sa-success .sa-fix { - width: 5px; - height: 90px; - background-color: #ffffff; - position: absolute; - left: 28px; - top: 8px; - z-index: 1; - transform: rotate(-45deg); -} -.sweet-alert .sa-icon.sa-success .sa-line { - height: 5px; - background-color: #5cb85c; - display: block; - border-radius: 2px; - position: absolute; - z-index: 2; -} -.sweet-alert .sa-icon.sa-success .sa-line.sa-tip { - width: 25px; - left: 14px; - top: 46px; - transform: rotate(45deg); -} -.sweet-alert .sa-icon.sa-success .sa-line.sa-long { - width: 47px; - right: 8px; - top: 38px; - transform: rotate(-45deg); -} -.sweet-alert .sa-icon.sa-custom { - background-size: contain; - border-radius: 0; - border: none; - background-position: center center; - background-repeat: no-repeat; -} -.sweet-alert .btn-default:focus { - border-color: #cccccc; - outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(204, 204, 204, 0.6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(204, 204, 204, 0.6); -} -.sweet-alert .btn-success:focus { - border-color: #4cae4c; - outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(76, 174, 76, 0.6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(76, 174, 76, 0.6); -} -.sweet-alert .btn-info:focus { - border-color: #46b8da; - outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(70, 184, 218, 0.6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(70, 184, 218, 0.6); -} -.sweet-alert .btn-danger:focus { - border-color: #d43f3a; - outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(212, 63, 58, 0.6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(212, 63, 58, 0.6); -} -.sweet-alert .btn-warning:focus { - border-color: #eea236; - outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(238, 162, 54, 0.6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(238, 162, 54, 0.6); -} -.sweet-alert button::-moz-focus-inner { - border: 0; -} -/*! - * Load Awesome v1.1.0 (http://github.danielcardoso.net/load-awesome/) - * Copyright 2015 Daniel Cardoso <@DanielCardoso> - * Licensed under MIT - */ -.la-ball-fall, -.la-ball-fall > div { - position: relative; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.la-ball-fall { - display: block; - font-size: 0; - color: #fff; -} -.la-ball-fall.la-dark { - color: #333; -} -.la-ball-fall > div { - display: inline-block; - float: none; - background-color: currentColor; - border: 0 solid currentColor; -} -.la-ball-fall { - width: 54px; - height: 18px; -} -.la-ball-fall > div { - width: 10px; - height: 10px; - margin: 4px; - border-radius: 100%; - opacity: 0; - -webkit-animation: ball-fall 1s ease-in-out infinite; - -moz-animation: ball-fall 1s ease-in-out infinite; - -o-animation: ball-fall 1s ease-in-out infinite; - animation: ball-fall 1s ease-in-out infinite; -} -.la-ball-fall > div:nth-child(1) { - -webkit-animation-delay: -200ms; - -moz-animation-delay: -200ms; - -o-animation-delay: -200ms; - animation-delay: -200ms; -} -.la-ball-fall > div:nth-child(2) { - -webkit-animation-delay: -100ms; - -moz-animation-delay: -100ms; - -o-animation-delay: -100ms; - animation-delay: -100ms; -} -.la-ball-fall > div:nth-child(3) { - -webkit-animation-delay: 0ms; - -moz-animation-delay: 0ms; - -o-animation-delay: 0ms; - animation-delay: 0ms; -} -.la-ball-fall.la-sm { - width: 26px; - height: 8px; -} -.la-ball-fall.la-sm > div { - width: 4px; - height: 4px; - margin: 2px; -} -.la-ball-fall.la-2x { - width: 108px; - height: 36px; -} -.la-ball-fall.la-2x > div { - width: 20px; - height: 20px; - margin: 8px; -} -.la-ball-fall.la-3x { - width: 162px; - height: 54px; -} -.la-ball-fall.la-3x > div { - width: 30px; - height: 30px; - margin: 12px; -} -/* - * Animation - */ -@-webkit-keyframes ball-fall { - 0% { - opacity: 0; - -webkit-transform: translateY(-145%); - transform: translateY(-145%); - } - 10% { - opacity: .5; - } - 20% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } - 80% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } - 90% { - opacity: .5; - } - 100% { - opacity: 0; - -webkit-transform: translateY(145%); - transform: translateY(145%); - } -} -@-moz-keyframes ball-fall { - 0% { - opacity: 0; - -moz-transform: translateY(-145%); - transform: translateY(-145%); - } - 10% { - opacity: .5; - } - 20% { - opacity: 1; - -moz-transform: translateY(0); - transform: translateY(0); - } - 80% { - opacity: 1; - -moz-transform: translateY(0); - transform: translateY(0); - } - 90% { - opacity: .5; - } - 100% { - opacity: 0; - -moz-transform: translateY(145%); - transform: translateY(145%); - } -} -@-o-keyframes ball-fall { - 0% { - opacity: 0; - -o-transform: translateY(-145%); - transform: translateY(-145%); - } - 10% { - opacity: .5; - } - 20% { - opacity: 1; - -o-transform: translateY(0); - transform: translateY(0); - } - 80% { - opacity: 1; - -o-transform: translateY(0); - transform: translateY(0); - } - 90% { - opacity: .5; - } - 100% { - opacity: 0; - -o-transform: translateY(145%); - transform: translateY(145%); - } -} -@keyframes ball-fall { - 0% { - opacity: 0; - -webkit-transform: translateY(-145%); - -moz-transform: translateY(-145%); - -o-transform: translateY(-145%); - transform: translateY(-145%); - } - 10% { - opacity: .5; - } - 20% { - opacity: 1; - -webkit-transform: translateY(0); - -moz-transform: translateY(0); - -o-transform: translateY(0); - transform: translateY(0); - } - 80% { - opacity: 1; - -webkit-transform: translateY(0); - -moz-transform: translateY(0); - -o-transform: translateY(0); - transform: translateY(0); - } - 90% { - opacity: .5; - } - 100% { - opacity: 0; - -webkit-transform: translateY(145%); - -moz-transform: translateY(145%); - -o-transform: translateY(145%); - transform: translateY(145%); - } -} diff --git a/Bootstrap.Admin/wwwroot/lib/bootstrap-sweetalert/sweetalert.js b/Bootstrap.Admin/wwwroot/lib/bootstrap-sweetalert/sweetalert.js deleted file mode 100644 index d9dc2a31..00000000 --- a/Bootstrap.Admin/wwwroot/lib/bootstrap-sweetalert/sweetalert.js +++ /dev/null @@ -1,1196 +0,0 @@ -;(function(window, document, undefined) { -"use strict"; - -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0) { - newClass = newClass.replace(' ' + className + ' ', ' '); - } - elem.className = newClass.replace(/^\s+|\s+$/g, ''); - } -}; - -var escapeHtml = function escapeHtml(str) { - var div = document.createElement('div'); - div.appendChild(document.createTextNode(str)); - return div.innerHTML; -}; - -var _show = function _show(elem) { - elem.style.opacity = ''; - elem.style.display = 'block'; -}; - -var show = function show(elems) { - if (elems && !elems.length) { - return _show(elems); - } - for (var i = 0; i < elems.length; ++i) { - _show(elems[i]); - } -}; - -var _hide = function _hide(elem) { - elem.style.opacity = ''; - elem.style.display = 'none'; -}; - -var hide = function hide(elems) { - if (elems && !elems.length) { - return _hide(elems); - } - for (var i = 0; i < elems.length; ++i) { - _hide(elems[i]); - } -}; - -var isDescendant = function isDescendant(parent, child) { - var node = child.parentNode; - while (node !== null) { - if (node === parent) { - return true; - } - node = node.parentNode; - } - return false; -}; - -var getTopMargin = function getTopMargin(elem) { - elem.style.left = '-9999px'; - elem.style.display = 'block'; - - var height = elem.clientHeight, - padding; - if (typeof getComputedStyle !== "undefined") { - // IE 8 - padding = parseInt(getComputedStyle(elem).getPropertyValue('padding-top'), 10); - } else { - padding = parseInt(elem.currentStyle.padding); - } - - elem.style.left = ''; - elem.style.display = 'none'; - return '-' + parseInt((height + padding) / 2) + 'px'; -}; - -var fadeIn = function fadeIn(elem, interval) { - if (+elem.style.opacity < 1) { - interval = interval || 16; - elem.style.opacity = 0; - elem.style.display = 'block'; - var last = +new Date(); - var tick = function tick() { - elem.style.opacity = +elem.style.opacity + (new Date() - last) / 100; - last = +new Date(); - - if (+elem.style.opacity < 1) { - setTimeout(tick, interval); - } - }; - tick(); - } - elem.style.display = 'block'; //fallback IE8 -}; - -var fadeOut = function fadeOut(elem, interval) { - interval = interval || 16; - elem.style.opacity = 1; - var last = +new Date(); - var tick = function tick() { - elem.style.opacity = +elem.style.opacity - (new Date() - last) / 100; - last = +new Date(); - - if (+elem.style.opacity > 0) { - setTimeout(tick, interval); - } else { - elem.style.display = 'none'; - } - }; - tick(); -}; - -var fireClick = function fireClick(node) { - // Taken from http://www.nonobtrusive.com/2011/11/29/programatically-fire-crossbrowser-click-event-with-javascript/ - // Then fixed for today's Chrome browser. - if (typeof MouseEvent === 'function') { - // Up-to-date approach - var mevt = new MouseEvent('click', { - view: window, - bubbles: false, - cancelable: true - }); - node.dispatchEvent(mevt); - } else if (document.createEvent) { - // Fallback - var evt = document.createEvent('MouseEvents'); - evt.initEvent('click', false, false); - node.dispatchEvent(evt); - } else if (document.createEventObject) { - node.fireEvent('onclick'); - } else if (typeof node.onclick === 'function') { - node.onclick(); - } -}; - -var stopEventPropagation = function stopEventPropagation(e) { - // In particular, make sure the space bar doesn't scroll the main window. - if (typeof e.stopPropagation === 'function') { - e.stopPropagation(); - e.preventDefault(); - } else if (window.event && window.event.hasOwnProperty('cancelBubble')) { - window.event.cancelBubble = true; - } -}; - -exports.hasClass = hasClass; -exports.addClass = addClass; -exports.removeClass = removeClass; -exports.escapeHtml = escapeHtml; -exports._show = _show; -exports.show = show; -exports._hide = _hide; -exports.hide = hide; -exports.isDescendant = isDescendant; -exports.getTopMargin = getTopMargin; -exports.fadeIn = fadeIn; -exports.fadeOut = fadeOut; -exports.fireClick = fireClick; -exports.stopEventPropagation = stopEventPropagation; - -},{}],4:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _handleDom = require('./handle-dom'); - -var _handleSwalDom = require('./handle-swal-dom'); - -var handleKeyDown = function handleKeyDown(event, params, modal) { - var e = event || window.event; - var keyCode = e.keyCode || e.which; - - var $okButton = modal.querySelector('button.confirm'); - var $cancelButton = modal.querySelector('button.cancel'); - var $modalButtons = modal.querySelectorAll('button[tabindex]'); - - if ([9, 13, 32, 27].indexOf(keyCode) === -1) { - // Don't do work on keys we don't care about. - return; - } - - var $targetElement = e.target || e.srcElement; - - var btnIndex = -1; // Find the button - note, this is a nodelist, not an array. - for (var i = 0; i < $modalButtons.length; i++) { - if ($targetElement === $modalButtons[i]) { - btnIndex = i; - break; - } - } - - if (keyCode === 9) { - // TAB - if (btnIndex === -1) { - // No button focused. Jump to the confirm button. - $targetElement = $okButton; - } else { - // Cycle to the next button - if (btnIndex === $modalButtons.length - 1) { - $targetElement = $modalButtons[0]; - } else { - $targetElement = $modalButtons[btnIndex + 1]; - } - } - - (0, _handleDom.stopEventPropagation)(e); - $targetElement.focus(); - - if (params.confirmButtonColor) { - (0, _handleSwalDom.setFocusStyle)($targetElement, params.confirmButtonColor); - } - } else { - if (keyCode === 13) { - if ($targetElement.tagName === 'INPUT') { - $targetElement = $okButton; - $okButton.focus(); - } - - if (btnIndex === -1) { - // ENTER/SPACE clicked outside of a button. - $targetElement = $okButton; - } else { - // Do nothing - let the browser handle it. - $targetElement = undefined; - } - } else if (keyCode === 27 && params.allowEscapeKey === true) { - $targetElement = $cancelButton; - (0, _handleDom.fireClick)($targetElement, e); - } else { - // Fallback - let the browser handle it. - $targetElement = undefined; - } - } -}; - -exports.default = handleKeyDown; - -},{"./handle-dom":3,"./handle-swal-dom":5}],5:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.fixVerticalPosition = exports.resetInputError = exports.resetInput = exports.openModal = exports.getInput = exports.getOverlay = exports.getModal = exports.sweetAlertInitialize = undefined; - -var _handleDom = require('./handle-dom'); - -var _defaultParams = require('./default-params'); - -var _defaultParams2 = _interopRequireDefault(_defaultParams); - -var _injectedHtml = require('./injected-html'); - -var _injectedHtml2 = _interopRequireDefault(_injectedHtml); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var modalClass = '.sweet-alert'; -var overlayClass = '.sweet-overlay'; - -/* - * Add modal + overlay to DOM - */ - - -var sweetAlertInitialize = function sweetAlertInitialize() { - var sweetWrap = document.createElement('div'); - sweetWrap.innerHTML = _injectedHtml2.default; - - // Append elements to body - while (sweetWrap.firstChild) { - document.body.appendChild(sweetWrap.firstChild); - } -}; - -/* - * Get DOM element of modal - */ -var getModal = function getModal() { - var $modal = document.querySelector(modalClass); - - if (!$modal) { - sweetAlertInitialize(); - $modal = getModal(); - } - - return $modal; -}; - -/* - * Get DOM element of input (in modal) - */ -var getInput = function getInput() { - var $modal = getModal(); - if ($modal) { - return $modal.querySelector('input'); - } -}; - -/* - * Get DOM element of overlay - */ -var getOverlay = function getOverlay() { - return document.querySelector(overlayClass); -}; - -/* - * Animation when opening modal - */ -var openModal = function openModal(callback) { - var $modal = getModal(); - (0, _handleDom.fadeIn)(getOverlay(), 10); - (0, _handleDom.show)($modal); - (0, _handleDom.addClass)($modal, 'showSweetAlert'); - (0, _handleDom.removeClass)($modal, 'hideSweetAlert'); - - window.previousActiveElement = document.activeElement; - var $okButton = $modal.querySelector('button.confirm'); - $okButton.focus(); - - setTimeout(function () { - (0, _handleDom.addClass)($modal, 'visible'); - }, 500); - - var timer = $modal.getAttribute('data-timer'); - - if (timer !== 'null' && timer !== '') { - var timerCallback = callback; - $modal.timeout = setTimeout(function () { - var doneFunctionExists = (timerCallback || null) && $modal.getAttribute('data-has-done-function') === 'true'; - if (doneFunctionExists) { - timerCallback(null); - } else { - sweetAlert.close(); - } - }, timer); - } -}; - -/* - * Reset the styling of the input - * (for example if errors have been shown) - */ -var resetInput = function resetInput() { - var $modal = getModal(); - var $input = getInput(); - - (0, _handleDom.removeClass)($modal, 'show-input'); - $input.value = _defaultParams2.default.inputValue; - $input.setAttribute('type', _defaultParams2.default.inputType); - $input.setAttribute('placeholder', _defaultParams2.default.inputPlaceholder); - - resetInputError(); -}; - -var resetInputError = function resetInputError(event) { - // If press enter => ignore - if (event && event.keyCode === 13) { - return false; - } - - var $modal = getModal(); - - var $errorIcon = $modal.querySelector('.sa-input-error'); - (0, _handleDom.removeClass)($errorIcon, 'show'); - - var $errorContainer = $modal.querySelector('.form-group'); - (0, _handleDom.removeClass)($errorContainer, 'has-error'); -}; - -/* - * Set "margin-top"-property on modal based on its computed height - */ -var fixVerticalPosition = function fixVerticalPosition() { - var $modal = getModal(); - $modal.style.marginTop = (0, _handleDom.getTopMargin)(getModal()); -}; - -exports.sweetAlertInitialize = sweetAlertInitialize; -exports.getModal = getModal; -exports.getOverlay = getOverlay; -exports.getInput = getInput; -exports.openModal = openModal; -exports.resetInput = resetInput; -exports.resetInputError = resetInputError; -exports.fixVerticalPosition = fixVerticalPosition; - -},{"./default-params":1,"./handle-dom":3,"./injected-html":6}],6:[function(require,module,exports){ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var injectedHTML = - -// Dark overlay -"
" + - -// Modal -"
" + - -// Error icon -"
\n \n \n \n \n
" + - -// Warning icon -"
\n \n \n
" + - -// Info icon -"
" + - -// Success icon -"
\n \n \n\n
\n
\n
" + "
" + - -// Title, text and input -"

Title

\n

Text

\n
\n \n \n Not valid\n \n
" + - -// Cancel and confirm buttons -"
\n \n
\n " + - -// Loading animation -"
\n
\n
\n
\n
\n
\n
" + - -// End of modal -"
"; - -exports.default = injectedHTML; - -},{}],7:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; - -var _utils = require('./utils'); - -var _handleSwalDom = require('./handle-swal-dom'); - -var _handleDom = require('./handle-dom'); - -var alertTypes = ['error', 'warning', 'info', 'success', 'input', 'prompt']; - -/* - * Set type, text and actions on modal - */ -var setParameters = function setParameters(params) { - var modal = (0, _handleSwalDom.getModal)(); - - var $title = modal.querySelector('h2'); - var $text = modal.querySelector('p'); - var $cancelBtn = modal.querySelector('button.cancel'); - var $confirmBtn = modal.querySelector('button.confirm'); - - /* - * Title - */ - $title.innerHTML = params.html ? params.title : (0, _handleDom.escapeHtml)(params.title).split('\n').join('
'); - - /* - * Text - */ - $text.innerHTML = params.html ? params.text : (0, _handleDom.escapeHtml)(params.text || '').split('\n').join('
'); - if (params.text) (0, _handleDom.show)($text); - - /* - * Custom class - */ - if (params.customClass) { - (0, _handleDom.addClass)(modal, params.customClass); - modal.setAttribute('data-custom-class', params.customClass); - } else { - // Find previously set classes and remove them - var customClass = modal.getAttribute('data-custom-class'); - (0, _handleDom.removeClass)(modal, customClass); - modal.setAttribute('data-custom-class', ''); - } - - /* - * Icon - */ - (0, _handleDom.hide)(modal.querySelectorAll('.sa-icon')); - - if (params.type && !(0, _utils.isIE8)()) { - var _ret = function () { - - var validType = false; - - for (var i = 0; i < alertTypes.length; i++) { - if (params.type === alertTypes[i]) { - validType = true; - break; - } - } - - if (!validType) { - logStr('Unknown alert type: ' + params.type); - return { - v: false - }; - } - - var typesWithIcons = ['success', 'error', 'warning', 'info']; - var $icon = void 0; - - if (typesWithIcons.indexOf(params.type) !== -1) { - $icon = modal.querySelector('.sa-icon.' + 'sa-' + params.type); - (0, _handleDom.show)($icon); - } - - var $input = (0, _handleSwalDom.getInput)(); - - // Animate icon - switch (params.type) { - - case 'success': - (0, _handleDom.addClass)($icon, 'animate'); - (0, _handleDom.addClass)($icon.querySelector('.sa-tip'), 'animateSuccessTip'); - (0, _handleDom.addClass)($icon.querySelector('.sa-long'), 'animateSuccessLong'); - break; - - case 'error': - (0, _handleDom.addClass)($icon, 'animateErrorIcon'); - (0, _handleDom.addClass)($icon.querySelector('.sa-x-mark'), 'animateXMark'); - break; - - case 'warning': - (0, _handleDom.addClass)($icon, 'pulseWarning'); - (0, _handleDom.addClass)($icon.querySelector('.sa-body'), 'pulseWarningIns'); - (0, _handleDom.addClass)($icon.querySelector('.sa-dot'), 'pulseWarningIns'); - break; - - case 'input': - case 'prompt': - $input.setAttribute('type', params.inputType); - $input.value = params.inputValue; - $input.setAttribute('placeholder', params.inputPlaceholder); - (0, _handleDom.addClass)(modal, 'show-input'); - setTimeout(function () { - $input.focus(); - $input.addEventListener('keyup', swal.resetInputError); - }, 400); - break; - } - }(); - - if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; - } - - /* - * Custom image - */ - if (params.imageUrl) { - var $customIcon = modal.querySelector('.sa-icon.sa-custom'); - - $customIcon.style.backgroundImage = 'url(' + params.imageUrl + ')'; - (0, _handleDom.show)($customIcon); - - var _imgWidth = 80; - var _imgHeight = 80; - - if (params.imageSize) { - var dimensions = params.imageSize.toString().split('x'); - var imgWidth = dimensions[0]; - var imgHeight = dimensions[1]; - - if (!imgWidth || !imgHeight) { - logStr('Parameter imageSize expects value with format WIDTHxHEIGHT, got ' + params.imageSize); - } else { - _imgWidth = imgWidth; - _imgHeight = imgHeight; - } - } - - $customIcon.setAttribute('style', $customIcon.getAttribute('style') + 'width:' + _imgWidth + 'px; height:' + _imgHeight + 'px'); - } - - /* - * Show cancel button? - */ - modal.setAttribute('data-has-cancel-button', params.showCancelButton); - if (params.showCancelButton) { - $cancelBtn.style.display = 'inline-block'; - } else { - (0, _handleDom.hide)($cancelBtn); - } - - /* - * Show confirm button? - */ - modal.setAttribute('data-has-confirm-button', params.showConfirmButton); - if (params.showConfirmButton) { - $confirmBtn.style.display = 'inline-block'; - } else { - (0, _handleDom.hide)($confirmBtn); - } - - /* - * Custom text on cancel/confirm buttons - */ - if (params.cancelButtonText) { - $cancelBtn.innerHTML = (0, _handleDom.escapeHtml)(params.cancelButtonText); - } - if (params.confirmButtonText) { - $confirmBtn.innerHTML = (0, _handleDom.escapeHtml)(params.confirmButtonText); - } - - /* - * Reset confirm buttons to default class (Ugly fix) - */ - $confirmBtn.className = 'confirm btn btn-lg'; - - /* - * Attach selected class to the sweet alert modal - */ - (0, _handleDom.addClass)(modal, params.containerClass); - - /* - * Set confirm button to selected class - */ - (0, _handleDom.addClass)($confirmBtn, params.confirmButtonClass); - - /* - * Set cancel button to selected class - */ - (0, _handleDom.addClass)($cancelBtn, params.cancelButtonClass); - - /* - * Set title to selected class - */ - (0, _handleDom.addClass)($title, params.titleClass); - - /* - * Set text to selected class - */ - (0, _handleDom.addClass)($text, params.textClass); - - /* - * Allow outside click - */ - modal.setAttribute('data-allow-outside-click', params.allowOutsideClick); - - /* - * Callback function - */ - var hasDoneFunction = params.doneFunction ? true : false; - modal.setAttribute('data-has-done-function', hasDoneFunction); - - /* - * Animation - */ - if (!params.animation) { - modal.setAttribute('data-animation', 'none'); - } else if (typeof params.animation === 'string') { - modal.setAttribute('data-animation', params.animation); // Custom animation - } else { - modal.setAttribute('data-animation', 'pop'); - } - - /* - * Timer - */ - modal.setAttribute('data-timer', params.timer); -}; - -exports.default = setParameters; - -},{"./handle-dom":3,"./handle-swal-dom":5,"./utils":8}],8:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -/* - * Allow user to pass their own params - */ -var extend = function extend(a, b) { - for (var key in b) { - if (b.hasOwnProperty(key)) { - a[key] = b[key]; - } - } - return a; -}; - -/* - * Check if the user is using Internet Explorer 8 (for fallbacks) - */ -var isIE8 = function isIE8() { - return window.attachEvent && !window.addEventListener; -}; - -/* - * IE compatible logging for developers - */ -var logStr = function logStr(string) { - if (window.console) { - // IE... - window.console.log('SweetAlert: ' + string); - } -}; - -exports.extend = extend; -exports.isIE8 = isIE8; -exports.logStr = logStr; - -},{}],9:[function(require,module,exports){ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; // SweetAlert -// 2014-2015 (c) - Tristan Edwards -// github.com/t4t5/sweetalert - -/* - * jQuery-like functions for manipulating the DOM - */ - - -/* - * Handy utilities - */ - - -/* - * Handle sweetAlert's DOM elements - */ - - -// Handle button events and keyboard events - - -// Default values - - -var _handleDom = require('./modules/handle-dom'); - -var _utils = require('./modules/utils'); - -var _handleSwalDom = require('./modules/handle-swal-dom'); - -var _handleClick = require('./modules/handle-click'); - -var _handleKey = require('./modules/handle-key'); - -var _handleKey2 = _interopRequireDefault(_handleKey); - -var _defaultParams = require('./modules/default-params'); - -var _defaultParams2 = _interopRequireDefault(_defaultParams); - -var _setParams = require('./modules/set-params'); - -var _setParams2 = _interopRequireDefault(_setParams); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/* - * Remember state in cases where opening and handling a modal will fiddle with it. - * (We also use window.previousActiveElement as a global variable) - */ -var previousWindowKeyDown; -var lastFocusedButton; - -/* - * Global sweetAlert function - * (this is what the user calls) - */ -var sweetAlert, _swal; - -exports.default = sweetAlert = _swal = function swal() { - var customizations = arguments[0]; - - (0, _handleDom.addClass)(document.body, 'stop-scrolling'); - (0, _handleSwalDom.resetInput)(); - - /* - * Use argument if defined or default value from params object otherwise. - * Supports the case where a default value is boolean true and should be - * overridden by a corresponding explicit argument which is boolean false. - */ - function argumentOrDefault(key) { - var args = customizations; - return args[key] === undefined ? _defaultParams2.default[key] : args[key]; - } - - if (customizations === undefined) { - (0, _utils.logStr)('SweetAlert expects at least 1 attribute!'); - return false; - } - - var params = (0, _utils.extend)({}, _defaultParams2.default); - - switch (typeof customizations === 'undefined' ? 'undefined' : _typeof(customizations)) { - - // Ex: swal("Hello", "Just testing", "info"); - case 'string': - params.title = customizations; - params.text = arguments[1] || ''; - params.type = arguments[2] || ''; - break; - - // Ex: swal({ title:"Hello", text: "Just testing", type: "info" }); - case 'object': - if (customizations.title === undefined) { - (0, _utils.logStr)('Missing "title" argument!'); - return false; - } - - params.title = customizations.title; - - for (var customName in _defaultParams2.default) { - params[customName] = argumentOrDefault(customName); - } - - // Show "Confirm" instead of "OK" if cancel button is visible - params.confirmButtonText = params.showCancelButton ? 'Confirm' : _defaultParams2.default.confirmButtonText; - params.confirmButtonText = argumentOrDefault('confirmButtonText'); - - // Callback function when clicking on "OK"/"Cancel" - params.doneFunction = arguments[1] || null; - - break; - - default: - (0, _utils.logStr)('Unexpected type of argument! Expected "string" or "object", got ' + (typeof customizations === 'undefined' ? 'undefined' : _typeof(customizations))); - return false; - - } - - (0, _setParams2.default)(params); - (0, _handleSwalDom.fixVerticalPosition)(); - (0, _handleSwalDom.openModal)(arguments[1]); - - // Modal interactions - var modal = (0, _handleSwalDom.getModal)(); - - /* - * Make sure all modal buttons respond to all events - */ - var $buttons = modal.querySelectorAll('button'); - var buttonEvents = ['onclick']; - var onButtonEvent = function onButtonEvent(e) { - return (0, _handleClick.handleButton)(e, params, modal); - }; - - for (var btnIndex = 0; btnIndex < $buttons.length; btnIndex++) { - for (var evtIndex = 0; evtIndex < buttonEvents.length; evtIndex++) { - var btnEvt = buttonEvents[evtIndex]; - $buttons[btnIndex][btnEvt] = onButtonEvent; - } - } - - // Clicking outside the modal dismisses it (if allowed by user) - (0, _handleSwalDom.getOverlay)().onclick = onButtonEvent; - - previousWindowKeyDown = window.onkeydown; - - var onKeyEvent = function onKeyEvent(e) { - return (0, _handleKey2.default)(e, params, modal); - }; - window.onkeydown = onKeyEvent; - - window.onfocus = function () { - // When the user has focused away and focused back from the whole window. - setTimeout(function () { - // Put in a timeout to jump out of the event sequence. - // Calling focus() in the event sequence confuses things. - if (lastFocusedButton !== undefined) { - lastFocusedButton.focus(); - lastFocusedButton = undefined; - } - }, 0); - }; - - // Show alert with enabled buttons always - _swal.enableButtons(); -}; - -/* - * Set default params for each popup - * @param {Object} userParams - */ - - -sweetAlert.setDefaults = _swal.setDefaults = function (userParams) { - if (!userParams) { - throw new Error('userParams is required'); - } - if ((typeof userParams === 'undefined' ? 'undefined' : _typeof(userParams)) !== 'object') { - throw new Error('userParams has to be a object'); - } - - (0, _utils.extend)(_defaultParams2.default, userParams); -}; - -/* - * Animation when closing modal - */ -sweetAlert.close = _swal.close = function () { - var modal = (0, _handleSwalDom.getModal)(); - - (0, _handleDom.fadeOut)((0, _handleSwalDom.getOverlay)(), 5); - (0, _handleDom.fadeOut)(modal, 5); - (0, _handleDom.removeClass)(modal, 'showSweetAlert'); - (0, _handleDom.addClass)(modal, 'hideSweetAlert'); - (0, _handleDom.removeClass)(modal, 'visible'); - - /* - * Reset icon animations - */ - var $successIcon = modal.querySelector('.sa-icon.sa-success'); - (0, _handleDom.removeClass)($successIcon, 'animate'); - (0, _handleDom.removeClass)($successIcon.querySelector('.sa-tip'), 'animateSuccessTip'); - (0, _handleDom.removeClass)($successIcon.querySelector('.sa-long'), 'animateSuccessLong'); - - var $errorIcon = modal.querySelector('.sa-icon.sa-error'); - (0, _handleDom.removeClass)($errorIcon, 'animateErrorIcon'); - (0, _handleDom.removeClass)($errorIcon.querySelector('.sa-x-mark'), 'animateXMark'); - - var $warningIcon = modal.querySelector('.sa-icon.sa-warning'); - (0, _handleDom.removeClass)($warningIcon, 'pulseWarning'); - (0, _handleDom.removeClass)($warningIcon.querySelector('.sa-body'), 'pulseWarningIns'); - (0, _handleDom.removeClass)($warningIcon.querySelector('.sa-dot'), 'pulseWarningIns'); - - // Reset custom class (delay so that UI changes aren't visible) - setTimeout(function () { - var customClass = modal.getAttribute('data-custom-class'); - (0, _handleDom.removeClass)(modal, customClass); - }, 300); - - // Make page scrollable again - (0, _handleDom.removeClass)(document.body, 'stop-scrolling'); - - // Reset the page to its previous state - window.onkeydown = previousWindowKeyDown; - if (window.previousActiveElement) { - window.previousActiveElement.focus(); - } - lastFocusedButton = undefined; - clearTimeout(modal.timeout); - - return true; -}; - -/* - * Validation of the input field is done by user - * If something is wrong => call showInputError with errorMessage - */ -sweetAlert.showInputError = _swal.showInputError = function (errorMessage) { - var modal = (0, _handleSwalDom.getModal)(); - - var $errorIcon = modal.querySelector('.sa-input-error'); - (0, _handleDom.addClass)($errorIcon, 'show'); - - var $errorContainer = modal.querySelector('.form-group'); - (0, _handleDom.addClass)($errorContainer, 'has-error'); - - $errorContainer.querySelector('.sa-help-text').innerHTML = errorMessage; - - setTimeout(function () { - sweetAlert.enableButtons(); - }, 1); - - modal.querySelector('input').focus(); -}; - -/* - * Reset input error DOM elements - */ -sweetAlert.resetInputError = _swal.resetInputError = function (event) { - // If press enter => ignore - if (event && event.keyCode === 13) { - return false; - } - - var $modal = (0, _handleSwalDom.getModal)(); - - var $errorIcon = $modal.querySelector('.sa-input-error'); - (0, _handleDom.removeClass)($errorIcon, 'show'); - - var $errorContainer = $modal.querySelector('.form-group'); - (0, _handleDom.removeClass)($errorContainer, 'has-error'); -}; - -/* - * Disable confirm and cancel buttons - */ -sweetAlert.disableButtons = _swal.disableButtons = function (event) { - var modal = (0, _handleSwalDom.getModal)(); - var $confirmButton = modal.querySelector('button.confirm'); - var $cancelButton = modal.querySelector('button.cancel'); - $confirmButton.disabled = true; - $cancelButton.disabled = true; -}; - -/* - * Enable confirm and cancel buttons - */ -sweetAlert.enableButtons = _swal.enableButtons = function (event) { - var modal = (0, _handleSwalDom.getModal)(); - var $confirmButton = modal.querySelector('button.confirm'); - var $cancelButton = modal.querySelector('button.cancel'); - $confirmButton.disabled = false; - $cancelButton.disabled = false; -}; - -if (typeof window !== 'undefined') { - // The 'handle-click' module requires - // that 'sweetAlert' was set as global. - window.sweetAlert = window.swal = sweetAlert; -} else { - (0, _utils.logStr)('SweetAlert is a frontend module!'); -} - -},{"./modules/default-params":1,"./modules/handle-click":2,"./modules/handle-dom":3,"./modules/handle-key":4,"./modules/handle-swal-dom":5,"./modules/set-params":7,"./modules/utils":8}]},{},[9]); - -/* - * Use SweetAlert with RequireJS - */ - -if (typeof define === 'function' && define.amd) { - define(function () { - return sweetAlert; - }); -} else if (typeof module !== 'undefined' && module.exports) { - module.exports = sweetAlert; -} - -})(window, document); \ No newline at end of file diff --git a/Bootstrap.Admin/wwwroot/lib/bootstrap-sweetalert/sweetalert.min.css b/Bootstrap.Admin/wwwroot/lib/bootstrap-sweetalert/sweetalert.min.css deleted file mode 100644 index 62ea7238..00000000 --- a/Bootstrap.Admin/wwwroot/lib/bootstrap-sweetalert/sweetalert.min.css +++ /dev/null @@ -1 +0,0 @@ -.sweet-alert,.sweet-overlay{position:fixed;display:none}.sweet-alert,.sweet-alert .form-group,.sweet-alert .form-group .sa-input-error{display:none}@keyframes showSweetAlert{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes hideSweetAlert{0%{transform:scale(1)}100%{transform:scale(.5)}}@keyframes slideFromTop{0%{top:0}100%{top:50%}}@keyframes slideToTop{0%{top:50%}100%{top:0}}@keyframes slideFromBottom{0%{top:70%}100%{top:50%}}@keyframes slideToBottom{0%{top:50%}100%{top:70%}}.showSweetAlert{animation:showSweetAlert .3s}.showSweetAlert[data-animation=none]{animation:none}.showSweetAlert[data-animation=slide-from-top]{animation:slideFromTop .3s}.showSweetAlert[data-animation=slide-from-bottom]{animation:slideFromBottom .3s}.hideSweetAlert{animation:hideSweetAlert .3s}.hideSweetAlert[data-animation=none]{animation:none}.hideSweetAlert[data-animation=slide-from-top]{animation:slideToTop .3s}.hideSweetAlert[data-animation=slide-from-bottom]{animation:slideToBottom .3s}@keyframes animateSuccessTip{0%,54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}100%{width:25px;left:14px;top:45px}}@keyframes animateSuccessLong{0%,65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}100%{width:47px;right:8px;top:38px}}@keyframes rotatePlaceholder{0%,5%{transform:rotate(-45deg)}100%,12%{transform:rotate(-405deg)}}.animateSuccessTip{animation:animateSuccessTip .75s}.animateSuccessLong{animation:animateSuccessLong .75s}.sa-icon.sa-success.animate::after{animation:rotatePlaceholder 4.25s ease-in}@keyframes animateErrorIcon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}.animateErrorIcon{animation:animateErrorIcon .5s}@keyframes animateXMark{0%,50%{transform:scale(.4);margin-top:26px;opacity:0}80%{transform:scale(1.15);margin-top:-6px}100%{transform:scale(1);margin-top:0;opacity:1}}.animateXMark{animation:animateXMark .5s}@keyframes pulseWarning{0%{border-color:#F8D486}100%{border-color:#F8BB86}}.pulseWarning{animation:pulseWarning .75s infinite alternate}@keyframes pulseWarningIns{0%{background-color:#F8D486}100%{background-color:#F8BB86}}.pulseWarningIns{animation:pulseWarningIns .75s infinite alternate}@keyframes rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.stop-scrolling{height:100%;overflow:hidden}.sweet-overlay{background-color:rgba(0,0,0,.4);left:0;right:0;top:0;bottom:0;z-index:1040}.sweet-alert{background-color:#fff;width:478px;padding:17px;border-radius:5px;text-align:center;left:50%;top:50%;margin-left:-256px;margin-top:-200px;overflow:hidden;z-index:2000}@media all and (max-width:767px){.sweet-alert{width:auto;margin-left:0;margin-right:0;left:15px;right:15px}}.sweet-alert.show-input .form-group{display:block}.sweet-alert .sa-confirm-button-container{display:inline-block;position:relative}.sweet-alert .la-ball-fall{position:absolute;left:50%;top:50%;margin-left:-27px;margin-top:-9px;opacity:0;visibility:hidden}.sweet-alert button[disabled]{opacity:.6;cursor:default}.sweet-alert button.confirm[disabled]{color:transparent}.sweet-alert button.confirm[disabled]~.la-ball-fall{opacity:1;visibility:visible;transition-delay:0s}.sweet-alert .sa-icon{width:80px;height:80px;border:4px solid gray;border-radius:50%;margin:20px auto;position:relative;box-sizing:content-box}.sweet-alert .sa-icon.sa-error{border-color:#d43f3a}.sweet-alert .sa-icon.sa-error .sa-x-mark{position:relative;display:block}.sweet-alert .sa-icon.sa-error .sa-line{position:absolute;height:5px;width:47px;background-color:#d9534f;display:block;top:37px;border-radius:2px}.sweet-alert .sa-icon.sa-error .sa-line.sa-left{transform:rotate(45deg);left:17px}.sweet-alert .sa-icon.sa-error .sa-line.sa-right{transform:rotate(-45deg);right:16px}.sweet-alert .sa-icon.sa-warning{border-color:#eea236}.sweet-alert .sa-icon.sa-warning .sa-body{position:absolute;width:5px;height:47px;left:50%;top:10px;border-radius:2px;margin-left:-2px;background-color:#f0ad4e}.sweet-alert .sa-icon.sa-warning .sa-dot{position:absolute;width:7px;height:7px;border-radius:50%;margin-left:-3px;left:50%;bottom:10px;background-color:#f0ad4e}.sweet-alert .sa-icon.sa-info::after,.sweet-alert .sa-icon.sa-info::before{content:"";background-color:#5bc0de;position:absolute}.sweet-alert .sa-icon.sa-info{border-color:#46b8da}.sweet-alert .sa-icon.sa-info::before{width:5px;height:29px;left:50%;bottom:17px;border-radius:2px;margin-left:-2px}.sweet-alert .sa-icon.sa-info::after{width:7px;height:7px;border-radius:50%;margin-left:-3px;top:19px}.sweet-alert .sa-icon.sa-success{border-color:#4cae4c}.sweet-alert .sa-icon.sa-success::after,.sweet-alert .sa-icon.sa-success::before{content:'';position:absolute;width:60px;height:120px;background:#fff}.sweet-alert .sa-icon.sa-success::before{border-radius:120px 0 0 120px;top:-7px;left:-33px;transform:rotate(-45deg);transform-origin:60px 60px}.sweet-alert .sa-icon.sa-success::after{border-radius:0 120px 120px 0;top:-11px;left:30px;transform:rotate(-45deg);transform-origin:0 60px}.sweet-alert .sa-icon.sa-success .sa-placeholder{width:80px;height:80px;border:4px solid rgba(92,184,92,.2);border-radius:50%;box-sizing:content-box;position:absolute;left:-4px;top:-4px;z-index:2}.sweet-alert .sa-icon.sa-success .sa-fix{width:5px;height:90px;background-color:#fff;position:absolute;left:28px;top:8px;z-index:1;transform:rotate(-45deg)}.sweet-alert .sa-icon.sa-success .sa-line{height:5px;background-color:#5cb85c;display:block;border-radius:2px;position:absolute;z-index:2}.sweet-alert .sa-icon.sa-success .sa-line.sa-tip{width:25px;left:14px;top:46px;transform:rotate(45deg)}.sweet-alert .sa-icon.sa-success .sa-line.sa-long{width:47px;right:8px;top:38px;transform:rotate(-45deg)}.sweet-alert .sa-icon.sa-custom{background-size:contain;border-radius:0;border:none;background-position:center center;background-repeat:no-repeat}.sweet-alert .btn-default:focus{border-color:#ccc;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(204,204,204,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(204,204,204,.6)}.sweet-alert .btn-success:focus{border-color:#4cae4c;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(76,174,76,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(76,174,76,.6)}.sweet-alert .btn-info:focus{border-color:#46b8da;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(70,184,218,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(70,184,218,.6)}.sweet-alert .btn-danger:focus{border-color:#d43f3a;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(212,63,58,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(212,63,58,.6)}.sweet-alert .btn-warning:focus{border-color:#eea236;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(238,162,54,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(238,162,54,.6)}.sweet-alert button::-moz-focus-inner{border:0}.la-ball-fall,.la-ball-fall>div{position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.la-ball-fall{display:block;font-size:0;color:#fff;width:54px;height:18px}.la-ball-fall.la-dark{color:#333}.la-ball-fall>div{display:inline-block;float:none;background-color:currentColor;border:0 solid currentColor;width:10px;height:10px;margin:4px;border-radius:100%;opacity:0;-webkit-animation:ball-fall 1s ease-in-out infinite;-moz-animation:ball-fall 1s ease-in-out infinite;-o-animation:ball-fall 1s ease-in-out infinite;animation:ball-fall 1s ease-in-out infinite}.la-ball-fall>div:nth-child(1){-webkit-animation-delay:-.2s;-moz-animation-delay:-.2s;-o-animation-delay:-.2s;animation-delay:-.2s}.la-ball-fall>div:nth-child(2){-webkit-animation-delay:-.1s;-moz-animation-delay:-.1s;-o-animation-delay:-.1s;animation-delay:-.1s}.la-ball-fall>div:nth-child(3){-webkit-animation-delay:0s;-moz-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s}.la-ball-fall.la-sm{width:26px;height:8px}.la-ball-fall.la-sm>div{width:4px;height:4px;margin:2px}.la-ball-fall.la-2x{width:108px;height:36px}.la-ball-fall.la-2x>div{width:20px;height:20px;margin:8px}.la-ball-fall.la-3x{width:162px;height:54px}.la-ball-fall.la-3x>div{width:30px;height:30px;margin:12px}@-webkit-keyframes ball-fall{0%{opacity:0;-webkit-transform:translateY(-145%);transform:translateY(-145%)}10%,90%{opacity:.5}20%,80%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(145%);transform:translateY(145%)}}@-moz-keyframes ball-fall{0%{opacity:0;-moz-transform:translateY(-145%);transform:translateY(-145%)}10%,90%{opacity:.5}20%,80%{opacity:1;-moz-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(145%);transform:translateY(145%)}}@-o-keyframes ball-fall{0%{opacity:0;-o-transform:translateY(-145%);transform:translateY(-145%)}10%,90%{opacity:.5}20%,80%{opacity:1;-o-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-o-transform:translateY(145%);transform:translateY(145%)}}@keyframes ball-fall{0%{opacity:0;-webkit-transform:translateY(-145%);-moz-transform:translateY(-145%);-o-transform:translateY(-145%);transform:translateY(-145%)}10%,90%{opacity:.5}20%,80%{opacity:1;-webkit-transform:translateY(0);-moz-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(145%);-moz-transform:translateY(145%);-o-transform:translateY(145%);transform:translateY(145%)}}/*# sourceMappingURL=sweetalert.min.css.map */ \ No newline at end of file diff --git a/Bootstrap.Admin/wwwroot/lib/bootstrap-sweetalert/sweetalert.min.css.map b/Bootstrap.Admin/wwwroot/lib/bootstrap-sweetalert/sweetalert.min.css.map deleted file mode 100644 index 77f4f51d..00000000 --- a/Bootstrap.Admin/wwwroot/lib/bootstrap-sweetalert/sweetalert.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["sweetalert.css"],"names":[],"mappings":"AAuOA,aAVA,eAgBE,SAAU,MAmBV,QAAS,KAzBX,aAwBA,yBAGA,yCAFE,QAAS,KAhQX,0BACE,GACE,UAAW,UAEb,IACE,UAAW,YAEb,IACE,UAAW,WAEb,KACE,UAAW,UAGf,0BACE,GACE,UAAW,SAEb,KACE,UAAW,WAGf,wBACE,GACE,IAAK,EAEP,KACE,IAAK,KAGT,sBACE,GACE,IAAK,IAEP,KACE,IAAK,GAGT,2BACE,GACE,IAAK,IAEP,KACE,IAAK,KAGT,yBACE,GACE,IAAK,IAEP,KACE,IAAK,KAGT,gBACE,UAAW,eAAe,IAE5B,qCACE,UAAW,KAEb,+CACE,UAAW,aAAa,IAE1B,kDACE,UAAW,gBAAgB,IAE7B,gBACE,UAAW,eAAe,IAE5B,qCACE,UAAW,KAEb,+CACE,UAAW,WAAW,IAExB,kDACE,UAAW,cAAc,IAE3B,6BACE,GAKA,IAJE,MAAO,EACP,KAAM,IACN,IAAK,KAOP,IACE,MAAO,KACP,KAAM,KACN,IAAK,KAEP,IACE,MAAO,KACP,KAAM,KACN,IAAK,KAEP,KACE,MAAO,KACP,KAAM,KACN,IAAK,MAGT,8BACE,GAKA,IAJE,MAAO,EACP,MAAO,KACP,IAAK,KAOP,IACE,MAAO,KACP,MAAO,EACP,IAAK,KAEP,KACE,MAAO,KACP,MAAO,IACP,IAAK,MAGT,6BACE,GAGA,GAFE,UAAW,eAQb,KAHA,IACE,UAAW,iBAMf,mBACE,UAAW,kBAAkB,KAE/B,oBACE,UAAW,mBAAmB,KAEhC,mCACE,UAAW,kBAAkB,MAAM,QAErC,4BACE,GACE,UAAW,gBACX,QAAS,EAEX,KACE,UAAW,WACX,QAAS,GAGb,kBACE,UAAW,iBAAiB,IAE9B,wBACE,GAKA,IAJE,UAAW,UACX,WAAY,KACZ,QAAS,EAOX,IACE,UAAW,YACX,WAAY,KAEd,KACE,UAAW,SACX,WAAY,EACZ,QAAS,GAGb,cACE,UAAW,aAAa,IAE1B,wBACE,GACE,aAAc,QAEhB,KACE,aAAc,SAGlB,cACE,UAAW,aAAa,KAAM,SAAS,UAEzC,2BACE,GACE,iBAAkB,QAEpB,KACE,iBAAkB,SAGtB,iBACE,UAAW,gBAAgB,KAAM,SAAS,UAE5C,0BACE,GACE,UAAW,UAEb,KACE,UAAW,gBAGf,oBACE,OAAQ,KACR,SAAU,OAEZ,eACE,iBAAkB,eAElB,KAAM,EACN,MAAO,EACP,IAAK,EACL,OAAQ,EAER,QAAS,KAEX,aACE,iBAAkB,KAClB,MAAO,MACP,QAAS,KACT,cAAe,IACf,WAAY,OAEZ,KAAM,IACN,IAAK,IACL,YAAa,OACb,WAAY,OACZ,SAAU,OAEV,QAAS,KAEX,iCACE,aACE,MAAO,KACP,YAAa,EACb,aAAc,EACd,KAAM,KACN,MAAO,MASX,oCACE,QAAS,MAEX,0CACE,QAAS,aACT,SAAU,SAEZ,2BACE,SAAU,SACV,KAAM,IACN,IAAK,IACL,YAAa,MACb,WAAY,KACZ,QAAS,EACT,WAAY,OAEd,8BACE,QAAS,GACT,OAAQ,QAEV,sCACE,MAAO,YAET,oDACE,QAAS,EACT,WAAY,QACZ,iBAAkB,GAEpB,sBACE,MAAO,KACP,OAAQ,KACR,OAAQ,IAAI,MAAM,KAClB,cAAe,IACf,OAAQ,KAAK,KACb,SAAU,SACV,WAAY,YAEd,+BACE,aAAc,QAEhB,0CACE,SAAU,SACV,QAAS,MAEX,wCACE,SAAU,SACV,OAAQ,IACR,MAAO,KACP,iBAAkB,QAClB,QAAS,MACT,IAAK,KACL,cAAe,IAEjB,gDACE,UAAW,cACX,KAAM,KAER,iDACE,UAAW,eACX,MAAO,KAET,iCACE,aAAc,QAEhB,0CACE,SAAU,SACV,MAAO,IACP,OAAQ,KACR,KAAM,IACN,IAAK,KACL,cAAe,IACf,YAAa,KACb,iBAAkB,QAEpB,yCACE,SAAU,SACV,MAAO,IACP,OAAQ,IACR,cAAe,IACf,YAAa,KACb,KAAM,IACN,OAAQ,KACR,iBAAkB,QAgBpB,qCAXA,sCAYE,QAAS,GAOT,iBAAkB,QAuDlB,SAAU,SA7EZ,8BACE,aAAc,QAEhB,sCAGE,MAAO,IACP,OAAQ,KACR,KAAM,IACN,OAAQ,KACR,cAAe,IACf,YAAa,KAGf,qCAGE,MAAO,IACP,OAAQ,IACR,cAAe,IACf,YAAa,KACb,IAAK,KAGP,iCACE,aAAc,QAGhB,wCADA,yCAEE,QAAS,GAET,SAAU,SACV,MAAO,KACP,OAAQ,MACR,WAAY,KAGd,yCACE,cAAe,MAAM,EAAE,EAAE,MACzB,IAAK,KACL,KAAM,MACN,UAAW,eACX,iBAAkB,KAAK,KAEzB,wCACE,cAAe,EAAE,MAAM,MAAM,EAC7B,IAAK,MACL,KAAM,KACN,UAAW,eACX,iBAAkB,EAAI,KAExB,iDACE,MAAO,KACP,OAAQ,KACR,OAAQ,IAAI,MAAM,mBAClB,cAAe,IACf,WAAY,YACZ,SAAU,SACV,KAAM,KACN,IAAK,KACL,QAAS,EAEX,yCACE,MAAO,IACP,OAAQ,KACR,iBAAkB,KAClB,SAAU,SACV,KAAM,KACN,IAAK,IACL,QAAS,EACT,UAAW,eAEb,0CACE,OAAQ,IACR,iBAAkB,QAClB,QAAS,MACT,cAAe,IACf,SAAU,SACV,QAAS,EAEX,iDACE,MAAO,KACP,KAAM,KACN,IAAK,KACL,UAAW,cAEb,kDACE,MAAO,KACP,MAAO,IACP,IAAK,KACL,UAAW,eAEb,gCACE,gBAAiB,QACjB,cAAe,EACf,YACA,oBAAqB,OAAO,OAC5B,kBAAmB,UAErB,gCACE,aAAc,KACd,QAAS,EACT,mBAAoB,MAAM,EAAE,IAAI,IAAI,iBAAkB,EAAE,EAAE,IAAI,qBAC9D,WAAY,MAAM,EAAE,IAAI,IAAI,iBAAkB,EAAE,EAAE,IAAI,qBAExD,gCACE,aAAc,QACd,QAAS,EACT,mBAAoB,MAAM,EAAE,IAAI,IAAI,iBAAkB,EAAE,EAAE,IAAI,mBAC9D,WAAY,MAAM,EAAE,IAAI,IAAI,iBAAkB,EAAE,EAAE,IAAI,mBAExD,6BACE,aAAc,QACd,QAAS,EACT,mBAAoB,MAAM,EAAE,IAAI,IAAI,iBAAkB,EAAE,EAAE,IAAI,oBAC9D,WAAY,MAAM,EAAE,IAAI,IAAI,iBAAkB,EAAE,EAAE,IAAI,oBAExD,+BACE,aAAc,QACd,QAAS,EACT,mBAAoB,MAAM,EAAE,IAAI,IAAI,iBAAkB,EAAE,EAAE,IAAI,mBAC9D,WAAY,MAAM,EAAE,IAAI,IAAI,iBAAkB,EAAE,EAAE,IAAI,mBAExD,gCACE,aAAc,QACd,QAAS,EACT,mBAAoB,MAAM,EAAE,IAAI,IAAI,iBAAkB,EAAE,EAAE,IAAI,oBAC9D,WAAY,MAAM,EAAE,IAAI,IAAI,iBAAkB,EAAE,EAAE,IAAI,oBAExD,sCACE,OAAQ,EAOV,cACA,kBACE,SAAU,SACV,mBAAoB,WACpB,gBAAiB,WACjB,WAAY,WAEd,cACE,QAAS,MACT,UAAW,EACX,MAAO,KAYP,MAAO,KACP,OAAQ,KAXV,sBACE,MAAO,KAET,kBACE,QAAS,aACT,MAAO,KACP,iBAAkB,aAClB,OAAQ,EAAE,MAAM,aAOhB,MAAO,KACP,OAAQ,KACR,OAAQ,IACR,cAAe,KACf,QAAS,EACT,kBAAmB,UAAU,GAAG,YAAY,SAC5C,eAAgB,UAAU,GAAG,YAAY,SACzC,aAAc,UAAU,GAAG,YAAY,SACvC,UAAW,UAAU,GAAG,YAAY,SAEtC,+BACE,wBAAyB,KACzB,qBAAsB,KACtB,mBAAoB,KACpB,gBAAiB,KAEnB,+BACE,wBAAyB,KACzB,qBAAsB,KACtB,mBAAoB,KACpB,gBAAiB,KAEnB,+BACE,wBAAyB,GACzB,qBAAsB,GACtB,mBAAoB,GACpB,gBAAiB,GAEnB,oBACE,MAAO,KACP,OAAQ,IAEV,wBACE,MAAO,IACP,OAAQ,IACR,OAAQ,IAEV,oBACE,MAAO,MACP,OAAQ,KAEV,wBACE,MAAO,KACP,OAAQ,KACR,OAAQ,IAEV,oBACE,MAAO,MACP,OAAQ,KAEV,wBACE,MAAO,KACP,OAAQ,KACR,OAAQ,KAKV,6BACE,GACE,QAAS,EACT,kBAAmB,kBACnB,UAAW,kBAEb,IAaA,IAZE,QAAS,GAEX,IAKA,IAJE,QAAS,EACT,kBAAmB,cACnB,UAAW,cAUb,KACE,QAAS,EACT,kBAAmB,iBACnB,UAAW,kBAGf,0BACE,GACE,QAAS,EACT,eAAgB,kBAChB,UAAW,kBAEb,IAaA,IAZE,QAAS,GAEX,IAKA,IAJE,QAAS,EACT,eAAgB,cAChB,UAAW,cAUb,KACE,QAAS,EACT,eAAgB,iBAChB,UAAW,kBAGf,wBACE,GACE,QAAS,EACT,aAAc,kBACd,UAAW,kBAEb,IAaA,IAZE,QAAS,GAEX,IAKA,IAJE,QAAS,EACT,aAAc,cACd,UAAW,cAUb,KACE,QAAS,EACT,aAAc,iBACd,UAAW,kBAGf,qBACE,GACE,QAAS,EACT,kBAAmB,kBACnB,eAAgB,kBAChB,aAAc,kBACd,UAAW,kBAEb,IAiBA,IAhBE,QAAS,GAEX,IAOA,IANE,QAAS,EACT,kBAAmB,cACnB,eAAgB,cAChB,aAAc,cACd,UAAW,cAYb,KACE,QAAS,EACT,kBAAmB,iBACnB,eAAgB,iBAChB,aAAc,iBACd,UAAW"} \ No newline at end of file diff --git a/Bootstrap.Admin/wwwroot/lib/bootstrap-sweetalert/sweetalert.min.js b/Bootstrap.Admin/wwwroot/lib/bootstrap-sweetalert/sweetalert.min.js deleted file mode 100644 index 53960d65..00000000 --- a/Bootstrap.Admin/wwwroot/lib/bootstrap-sweetalert/sweetalert.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(a,b,c){"use strict";!function d(a,b,c){function e(g,h){if(!b[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=b[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,d,a,b,c)}return b[g].exports}for(var f="function"==typeof require&&require,g=0;g=0;)c=c.replace(" "+b+" "," ");a.className=c.replace(/^\s+|\s+$/g,"")}},i=function(a){var c=b.createElement("div");return c.appendChild(b.createTextNode(a)),c.innerHTML},j=function(a){a.style.opacity="",a.style.display="block"},k=function(a){if(a&&!a.length)return j(a);for(var b=0;b0?setTimeout(e,b):a.style.display="none"};d()},r=function(c){if("function"==typeof MouseEvent){var d=new MouseEvent("click",{view:a,bubbles:!1,cancelable:!0});c.dispatchEvent(d)}else if(b.createEvent){var e=b.createEvent("MouseEvents");e.initEvent("click",!1,!1),c.dispatchEvent(e)}else b.createEventObject?c.fireEvent("onclick"):"function"==typeof c.onclick&&c.onclick()},s=function(b){"function"==typeof b.stopPropagation?(b.stopPropagation(),b.preventDefault()):a.event&&a.event.hasOwnProperty("cancelBubble")&&(a.event.cancelBubble=!0)};e.hasClass=f,e.addClass=g,e.removeClass=h,e.escapeHtml=i,e._show=j,e.show=k,e._hide=l,e.hide=m,e.isDescendant=n,e.getTopMargin=o,e.fadeIn=p,e.fadeOut=q,e.fireClick=r,e.stopEventPropagation=s},{}],4:[function(b,d,e){Object.defineProperty(e,"__esModule",{value:!0});var f=b("./handle-dom"),g=b("./handle-swal-dom"),h=function(b,d,e){var h=b||a.event,i=h.keyCode||h.which,j=e.querySelector("button.confirm"),k=e.querySelector("button.cancel"),l=e.querySelectorAll("button[tabindex]");if(-1!==[9,13,32,27].indexOf(i)){for(var m=h.target||h.srcElement,n=-1,o=0;o"),i.innerHTML=a.html?a.text:(0,g.escapeHtml)(a.text||"").split("\n").join("
"),a.text&&(0,g.show)(i),a.customClass)(0,g.addClass)(b,a.customClass),b.setAttribute("data-custom-class",a.customClass);else{var l=b.getAttribute("data-custom-class");(0,g.removeClass)(b,l),b.setAttribute("data-custom-class","")}if((0,g.hide)(b.querySelectorAll(".sa-icon")),a.type&&!(0,e.isIE8)()){var m=function(){for(var c=!1,d=0;d { + if (result.value) { + $.logData.push({ + url: options.url, + data: arrselections.map(function (element, index) { + return formatData($.extend({}, element)); + }) }); - }, 100); + setTimeout(function () { + var idField = findIdField(options.bootstrapTable); + var iDs = arrselections.map(function (element, index) { return element[idField]; }); + $.bc({ + url: options.url, data: iDs, method: 'delete', title: options.delTitle, + callback: function (result) { + if (result) $(options.bootstrapTable).bootstrapTable('refresh'); + handlerCallback.call(that, null, element, { oper: 'del', success: result }); + } + }); + }, 100); + } }); } } @@ -233,31 +237,23 @@ }); text = "本删除项含有级联子项目
您确定要删除 " + row.Name + " 以及子项目吗?"; } - swal({ - html: true, - title: "删除数据", - text: text, - type: "warning", - showCancelButton: true, - cancelButtonClass: 'btn-secondary', - confirmButtonText: "我要删除", - confirmButtonClass: "btn-danger ml-2", - cancelButtonText: "取消" - }, function () { - $.logData.push({ url: op.url, data: data }); - setTimeout(function () { - var idField = findIdField(op.table); - var iDs = data.map(function (element, index) { - return element[idField]; - }); - $.bc({ - url: op.url, data: iDs, method: 'delete', title: '删除数据', - callback: function (result) { - if (result) $(op.table).bootstrapTable('refresh'); - handlerCallback.call(op.src, null, e, { oper: 'del', success: result }); - } - }); - }, 100); + swal($.extend({}, swalDeleteOptions, { html: text })).then((result) => { + if (result.value) { + $.logData.push({ url: op.url, data: data }); + setTimeout(function () { + var idField = findIdField(op.table); + var iDs = data.map(function (element, index) { + return element[idField]; + }); + $.bc({ + url: op.url, data: iDs, method: 'delete', title: '删除数据', + callback: function (result) { + if (result) $(op.table).bootstrapTable('refresh'); + handlerCallback.call(op.src, null, e, { oper: 'del', success: result }); + } + }); + }, 100); + } }); } }; diff --git a/Bootstrap.Admin/wwwroot/lib/sweetalert/sweetalert2.css b/Bootstrap.Admin/wwwroot/lib/sweetalert/sweetalert2.css new file mode 100644 index 00000000..7b0392fc --- /dev/null +++ b/Bootstrap.Admin/wwwroot/lib/sweetalert/sweetalert2.css @@ -0,0 +1,1154 @@ +@-webkit-keyframes swal2-show { + 0% { + -webkit-transform: scale(0.7); + transform: scale(0.7); } + 45% { + -webkit-transform: scale(1.05); + transform: scale(1.05); } + 80% { + -webkit-transform: scale(0.95); + transform: scale(0.95); } + 100% { + -webkit-transform: scale(1); + transform: scale(1); } } + +@keyframes swal2-show { + 0% { + -webkit-transform: scale(0.7); + transform: scale(0.7); } + 45% { + -webkit-transform: scale(1.05); + transform: scale(1.05); } + 80% { + -webkit-transform: scale(0.95); + transform: scale(0.95); } + 100% { + -webkit-transform: scale(1); + transform: scale(1); } } + +@-webkit-keyframes swal2-hide { + 0% { + -webkit-transform: scale(1); + transform: scale(1); + opacity: 1; } + 100% { + -webkit-transform: scale(0.5); + transform: scale(0.5); + opacity: 0; } } + +@keyframes swal2-hide { + 0% { + -webkit-transform: scale(1); + transform: scale(1); + opacity: 1; } + 100% { + -webkit-transform: scale(0.5); + transform: scale(0.5); + opacity: 0; } } + +@-webkit-keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: .0625em; + width: 0; } + 54% { + top: 1.0625em; + left: .125em; + width: 0; } + 70% { + top: 2.1875em; + left: -.375em; + width: 3.125em; } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; } + 100% { + top: 2.8125em; + left: .875em; + width: 1.5625em; } } + +@keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: .0625em; + width: 0; } + 54% { + top: 1.0625em; + left: .125em; + width: 0; } + 70% { + top: 2.1875em; + left: -.375em; + width: 3.125em; } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; } + 100% { + top: 2.8125em; + left: .875em; + width: 1.5625em; } } + +@-webkit-keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; } + 100% { + top: 2.375em; + right: .5em; + width: 2.9375em; } } + +@keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; } + 100% { + top: 2.375em; + right: .5em; + width: 2.9375em; } } + +@-webkit-keyframes swal2-rotate-success-circular-line { + 0% { + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); } + 5% { + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); } + 12% { + -webkit-transform: rotate(-405deg); + transform: rotate(-405deg); } + 100% { + -webkit-transform: rotate(-405deg); + transform: rotate(-405deg); } } + +@keyframes swal2-rotate-success-circular-line { + 0% { + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); } + 5% { + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); } + 12% { + -webkit-transform: rotate(-405deg); + transform: rotate(-405deg); } + 100% { + -webkit-transform: rotate(-405deg); + transform: rotate(-405deg); } } + +@-webkit-keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + -webkit-transform: scale(0.4); + transform: scale(0.4); + opacity: 0; } + 50% { + margin-top: 1.625em; + -webkit-transform: scale(0.4); + transform: scale(0.4); + opacity: 0; } + 80% { + margin-top: -.375em; + -webkit-transform: scale(1.15); + transform: scale(1.15); } + 100% { + margin-top: 0; + -webkit-transform: scale(1); + transform: scale(1); + opacity: 1; } } + +@keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + -webkit-transform: scale(0.4); + transform: scale(0.4); + opacity: 0; } + 50% { + margin-top: 1.625em; + -webkit-transform: scale(0.4); + transform: scale(0.4); + opacity: 0; } + 80% { + margin-top: -.375em; + -webkit-transform: scale(1.15); + transform: scale(1.15); } + 100% { + margin-top: 0; + -webkit-transform: scale(1); + transform: scale(1); + opacity: 1; } } + +@-webkit-keyframes swal2-animate-error-icon { + 0% { + -webkit-transform: rotateX(100deg); + transform: rotateX(100deg); + opacity: 0; } + 100% { + -webkit-transform: rotateX(0deg); + transform: rotateX(0deg); + opacity: 1; } } + +@keyframes swal2-animate-error-icon { + 0% { + -webkit-transform: rotateX(100deg); + transform: rotateX(100deg); + opacity: 0; } + 100% { + -webkit-transform: rotateX(0deg); + transform: rotateX(0deg); + opacity: 1; } } + +body.swal2-toast-shown .swal2-container { + background-color: transparent; } + body.swal2-toast-shown .swal2-container.swal2-shown { + background-color: transparent; } + body.swal2-toast-shown .swal2-container.swal2-top { + top: 0; + right: auto; + bottom: auto; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); } + body.swal2-toast-shown .swal2-container.swal2-top-end, body.swal2-toast-shown .swal2-container.swal2-top-right { + top: 0; + right: 0; + bottom: auto; + left: auto; } + body.swal2-toast-shown .swal2-container.swal2-top-start, body.swal2-toast-shown .swal2-container.swal2-top-left { + top: 0; + right: auto; + bottom: auto; + left: 0; } + body.swal2-toast-shown .swal2-container.swal2-center-start, body.swal2-toast-shown .swal2-container.swal2-center-left { + top: 50%; + right: auto; + bottom: auto; + left: 0; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); } + body.swal2-toast-shown .swal2-container.swal2-center { + top: 50%; + right: auto; + bottom: auto; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); } + body.swal2-toast-shown .swal2-container.swal2-center-end, body.swal2-toast-shown .swal2-container.swal2-center-right { + top: 50%; + right: 0; + bottom: auto; + left: auto; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); } + body.swal2-toast-shown .swal2-container.swal2-bottom-start, body.swal2-toast-shown .swal2-container.swal2-bottom-left { + top: auto; + right: auto; + bottom: 0; + left: 0; } + body.swal2-toast-shown .swal2-container.swal2-bottom { + top: auto; + right: auto; + bottom: 0; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); } + body.swal2-toast-shown .swal2-container.swal2-bottom-end, body.swal2-toast-shown .swal2-container.swal2-bottom-right { + top: auto; + right: 0; + bottom: 0; + left: auto; } + +body.swal2-toast-column .swal2-toast { + flex-direction: column; + align-items: stretch; } + body.swal2-toast-column .swal2-toast .swal2-actions { + flex: 1; + align-self: stretch; + height: 2.2em; + margin-top: .3125em; } + body.swal2-toast-column .swal2-toast .swal2-loading { + justify-content: center; } + body.swal2-toast-column .swal2-toast .swal2-input { + height: 2em; + margin: .3125em auto; + font-size: 1em; } + body.swal2-toast-column .swal2-toast .swal2-validation-message { + font-size: 1em; } + +.swal2-popup.swal2-toast { + flex-direction: row; + align-items: center; + width: auto; + padding: 0.625em; + box-shadow: 0 0 0.625em #d9d9d9; + overflow-y: hidden; } + .swal2-popup.swal2-toast .swal2-header { + flex-direction: row; } + .swal2-popup.swal2-toast .swal2-title { + flex-grow: 1; + justify-content: flex-start; + margin: 0 .6em; + font-size: 1em; } + .swal2-popup.swal2-toast .swal2-footer { + margin: 0.5em 0 0; + padding: 0.5em 0 0; + font-size: 0.8em; } + .swal2-popup.swal2-toast .swal2-close { + position: initial; + width: 0.8em; + height: 0.8em; + line-height: 0.8; } + .swal2-popup.swal2-toast .swal2-content { + justify-content: flex-start; + font-size: 1em; } + .swal2-popup.swal2-toast .swal2-icon { + width: 2em; + min-width: 2em; + height: 2em; + margin: 0; } + .swal2-popup.swal2-toast .swal2-icon-text { + font-size: 2em; + font-weight: bold; + line-height: 1em; } + .swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring { + width: 2em; + height: 2em; } + .swal2-popup.swal2-toast .swal2-icon.swal2-error [class^='swal2-x-mark-line'] { + top: .875em; + width: 1.375em; } + .swal2-popup.swal2-toast .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='left'] { + left: .3125em; } + .swal2-popup.swal2-toast .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='right'] { + right: .3125em; } + .swal2-popup.swal2-toast .swal2-actions { + height: auto; + margin: 0 .3125em; } + .swal2-popup.swal2-toast .swal2-styled { + margin: 0 .3125em; + padding: .3125em .625em; + font-size: 1em; } + .swal2-popup.swal2-toast .swal2-styled:focus { + box-shadow: 0 0 0 0.0625em #fff, 0 0 0 0.125em rgba(50, 100, 150, 0.4); } + .swal2-popup.swal2-toast .swal2-success { + border-color: #a5dc86; } + .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-circular-line'] { + position: absolute; + width: 2em; + height: 2.8125em; + -webkit-transform: rotate(45deg); + transform: rotate(45deg); + border-radius: 50%; } + .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-circular-line'][class$='left'] { + top: -.25em; + left: -.9375em; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + -webkit-transform-origin: 2em 2em; + transform-origin: 2em 2em; + border-radius: 4em 0 0 4em; } + .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-circular-line'][class$='right'] { + top: -.25em; + left: .9375em; + -webkit-transform-origin: 0 2em; + transform-origin: 0 2em; + border-radius: 0 4em 4em 0; } + .swal2-popup.swal2-toast .swal2-success .swal2-success-ring { + width: 2em; + height: 2em; } + .swal2-popup.swal2-toast .swal2-success .swal2-success-fix { + top: 0; + left: .4375em; + width: .4375em; + height: 2.6875em; } + .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-line'] { + height: .3125em; } + .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-line'][class$='tip'] { + top: 1.125em; + left: .1875em; + width: .75em; } + .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-line'][class$='long'] { + top: .9375em; + right: .1875em; + width: 1.375em; } + .swal2-popup.swal2-toast.swal2-show { + -webkit-animation: showSweetToast .5s; + animation: showSweetToast .5s; } + .swal2-popup.swal2-toast.swal2-hide { + -webkit-animation: hideSweetToast .2s forwards; + animation: hideSweetToast .2s forwards; } + .swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-tip { + -webkit-animation: animate-toast-success-tip .75s; + animation: animate-toast-success-tip .75s; } + .swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-long { + -webkit-animation: animate-toast-success-long .75s; + animation: animate-toast-success-long .75s; } + +@-webkit-keyframes showSweetToast { + 0% { + -webkit-transform: translateY(-0.625em) rotateZ(2deg); + transform: translateY(-0.625em) rotateZ(2deg); + opacity: 0; } + 33% { + -webkit-transform: translateY(0) rotateZ(-2deg); + transform: translateY(0) rotateZ(-2deg); + opacity: .5; } + 66% { + -webkit-transform: translateY(0.3125em) rotateZ(2deg); + transform: translateY(0.3125em) rotateZ(2deg); + opacity: .7; } + 100% { + -webkit-transform: translateY(0) rotateZ(0); + transform: translateY(0) rotateZ(0); + opacity: 1; } } + +@keyframes showSweetToast { + 0% { + -webkit-transform: translateY(-0.625em) rotateZ(2deg); + transform: translateY(-0.625em) rotateZ(2deg); + opacity: 0; } + 33% { + -webkit-transform: translateY(0) rotateZ(-2deg); + transform: translateY(0) rotateZ(-2deg); + opacity: .5; } + 66% { + -webkit-transform: translateY(0.3125em) rotateZ(2deg); + transform: translateY(0.3125em) rotateZ(2deg); + opacity: .7; } + 100% { + -webkit-transform: translateY(0) rotateZ(0); + transform: translateY(0) rotateZ(0); + opacity: 1; } } + +@-webkit-keyframes hideSweetToast { + 0% { + opacity: 1; } + 33% { + opacity: .5; } + 100% { + -webkit-transform: rotateZ(1deg); + transform: rotateZ(1deg); + opacity: 0; } } + +@keyframes hideSweetToast { + 0% { + opacity: 1; } + 33% { + opacity: .5; } + 100% { + -webkit-transform: rotateZ(1deg); + transform: rotateZ(1deg); + opacity: 0; } } + +@-webkit-keyframes animate-toast-success-tip { + 0% { + top: .5625em; + left: .0625em; + width: 0; } + 54% { + top: .125em; + left: .125em; + width: 0; } + 70% { + top: .625em; + left: -.25em; + width: 1.625em; } + 84% { + top: 1.0625em; + left: .75em; + width: .5em; } + 100% { + top: 1.125em; + left: .1875em; + width: .75em; } } + +@keyframes animate-toast-success-tip { + 0% { + top: .5625em; + left: .0625em; + width: 0; } + 54% { + top: .125em; + left: .125em; + width: 0; } + 70% { + top: .625em; + left: -.25em; + width: 1.625em; } + 84% { + top: 1.0625em; + left: .75em; + width: .5em; } + 100% { + top: 1.125em; + left: .1875em; + width: .75em; } } + +@-webkit-keyframes animate-toast-success-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; } + 65% { + top: 1.25em; + right: .9375em; + width: 0; } + 84% { + top: .9375em; + right: 0; + width: 1.125em; } + 100% { + top: .9375em; + right: .1875em; + width: 1.375em; } } + +@keyframes animate-toast-success-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; } + 65% { + top: 1.25em; + right: .9375em; + width: 0; } + 84% { + top: .9375em; + right: 0; + width: 1.125em; } + 100% { + top: .9375em; + right: .1875em; + width: 1.375em; } } + +body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow: hidden; } + +body.swal2-height-auto { + height: auto !important; } + +body.swal2-no-backdrop .swal2-shown { + top: auto; + right: auto; + bottom: auto; + left: auto; + background-color: transparent; } + body.swal2-no-backdrop .swal2-shown > .swal2-modal { + box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); } + body.swal2-no-backdrop .swal2-shown.swal2-top { + top: 0; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); } + body.swal2-no-backdrop .swal2-shown.swal2-top-start, body.swal2-no-backdrop .swal2-shown.swal2-top-left { + top: 0; + left: 0; } + body.swal2-no-backdrop .swal2-shown.swal2-top-end, body.swal2-no-backdrop .swal2-shown.swal2-top-right { + top: 0; + right: 0; } + body.swal2-no-backdrop .swal2-shown.swal2-center { + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); } + body.swal2-no-backdrop .swal2-shown.swal2-center-start, body.swal2-no-backdrop .swal2-shown.swal2-center-left { + top: 50%; + left: 0; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); } + body.swal2-no-backdrop .swal2-shown.swal2-center-end, body.swal2-no-backdrop .swal2-shown.swal2-center-right { + top: 50%; + right: 0; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); } + body.swal2-no-backdrop .swal2-shown.swal2-bottom { + bottom: 0; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); } + body.swal2-no-backdrop .swal2-shown.swal2-bottom-start, body.swal2-no-backdrop .swal2-shown.swal2-bottom-left { + bottom: 0; + left: 0; } + body.swal2-no-backdrop .swal2-shown.swal2-bottom-end, body.swal2-no-backdrop .swal2-shown.swal2-bottom-right { + right: 0; + bottom: 0; } + +.swal2-container { + display: flex; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + flex-direction: row; + align-items: center; + justify-content: center; + padding: 10px; + background-color: transparent; + z-index: 1060; + overflow-x: hidden; + -webkit-overflow-scrolling: touch; } + .swal2-container.swal2-top { + align-items: flex-start; } + .swal2-container.swal2-top-start, .swal2-container.swal2-top-left { + align-items: flex-start; + justify-content: flex-start; } + .swal2-container.swal2-top-end, .swal2-container.swal2-top-right { + align-items: flex-start; + justify-content: flex-end; } + .swal2-container.swal2-center { + align-items: center; } + .swal2-container.swal2-center-start, .swal2-container.swal2-center-left { + align-items: center; + justify-content: flex-start; } + .swal2-container.swal2-center-end, .swal2-container.swal2-center-right { + align-items: center; + justify-content: flex-end; } + .swal2-container.swal2-bottom { + align-items: flex-end; } + .swal2-container.swal2-bottom-start, .swal2-container.swal2-bottom-left { + align-items: flex-end; + justify-content: flex-start; } + .swal2-container.swal2-bottom-end, .swal2-container.swal2-bottom-right { + align-items: flex-end; + justify-content: flex-end; } + .swal2-container.swal2-grow-fullscreen > .swal2-modal { + display: flex !important; + flex: 1; + align-self: stretch; + justify-content: center; } + .swal2-container.swal2-grow-row > .swal2-modal { + display: flex !important; + flex: 1; + align-content: center; + justify-content: center; } + .swal2-container.swal2-grow-column { + flex: 1; + flex-direction: column; } + .swal2-container.swal2-grow-column.swal2-top, .swal2-container.swal2-grow-column.swal2-center, .swal2-container.swal2-grow-column.swal2-bottom { + align-items: center; } + .swal2-container.swal2-grow-column.swal2-top-start, .swal2-container.swal2-grow-column.swal2-center-start, .swal2-container.swal2-grow-column.swal2-bottom-start, .swal2-container.swal2-grow-column.swal2-top-left, .swal2-container.swal2-grow-column.swal2-center-left, .swal2-container.swal2-grow-column.swal2-bottom-left { + align-items: flex-start; } + .swal2-container.swal2-grow-column.swal2-top-end, .swal2-container.swal2-grow-column.swal2-center-end, .swal2-container.swal2-grow-column.swal2-bottom-end, .swal2-container.swal2-grow-column.swal2-top-right, .swal2-container.swal2-grow-column.swal2-center-right, .swal2-container.swal2-grow-column.swal2-bottom-right { + align-items: flex-end; } + .swal2-container.swal2-grow-column > .swal2-modal { + display: flex !important; + flex: 1; + align-content: center; + justify-content: center; } + .swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen) > .swal2-modal { + margin: auto; } + @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .swal2-container .swal2-modal { + margin: 0 !important; } } + .swal2-container.swal2-fade { + transition: background-color .1s; } + .swal2-container.swal2-shown { + background-color: rgba(0, 0, 0, 0.4); } + +.swal2-popup { + display: none; + position: relative; + flex-direction: column; + justify-content: center; + width: 32em; + max-width: 100%; + padding: 1.25em; + border-radius: 0.3125em; + background: #fff; + font-family: inherit; + font-size: 1rem; + box-sizing: border-box; } + .swal2-popup:focus { + outline: none; } + .swal2-popup.swal2-loading { + overflow-y: hidden; } + .swal2-popup .swal2-header { + display: flex; + flex-direction: column; + align-items: center; } + .swal2-popup .swal2-title { + display: block; + position: relative; + max-width: 100%; + margin: 0 0 0.4em; + padding: 0; + color: #595959; + font-size: 1.875em; + font-weight: 600; + text-align: center; + text-transform: none; + word-wrap: break-word; } + .swal2-popup .swal2-actions { + flex-wrap: wrap; + align-items: center; + justify-content: center; + margin: 1.25em auto 0; + z-index: 1; } + .swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled[disabled] { + opacity: .4; } + .swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled:hover { + background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)); } + .swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled:active { + background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)); } + .swal2-popup .swal2-actions.swal2-loading .swal2-styled.swal2-confirm { + width: 2.5em; + height: 2.5em; + margin: .46875em; + padding: 0; + border: .25em solid transparent; + border-radius: 100%; + border-color: transparent; + background-color: transparent !important; + color: transparent; + cursor: default; + box-sizing: border-box; + -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } + .swal2-popup .swal2-actions.swal2-loading .swal2-styled.swal2-cancel { + margin-right: 30px; + margin-left: 30px; } + .swal2-popup .swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after { + display: inline-block; + width: 15px; + height: 15px; + margin-left: 5px; + border: 3px solid #999999; + border-radius: 50%; + border-right-color: transparent; + box-shadow: 1px 1px 1px #fff; + content: ''; + -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + animation: swal2-rotate-loading 1.5s linear 0s infinite normal; } + .swal2-popup .swal2-styled { + margin: .3125em; + padding: .625em 2em; + font-weight: 500; + box-shadow: none; } + .swal2-popup .swal2-styled:not([disabled]) { + cursor: pointer; } + .swal2-popup .swal2-styled.swal2-confirm { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #3085d6; + color: #fff; + font-size: 1.0625em; } + .swal2-popup .swal2-styled.swal2-cancel { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #aaa; + color: #fff; + font-size: 1.0625em; } + .swal2-popup .swal2-styled:focus { + outline: none; + box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(50, 100, 150, 0.4); } + .swal2-popup .swal2-styled::-moz-focus-inner { + border: 0; } + .swal2-popup .swal2-footer { + justify-content: center; + margin: 1.25em 0 0; + padding: 1em 0 0; + border-top: 1px solid #eee; + color: #545454; + font-size: 1em; } + .swal2-popup .swal2-image { + max-width: 100%; + margin: 1.25em auto; } + .swal2-popup .swal2-close { + position: absolute; + top: 0; + right: 0; + justify-content: center; + width: 1.2em; + height: 1.2em; + padding: 0; + transition: color 0.1s ease-out; + border: none; + border-radius: 0; + outline: initial; + background: transparent; + color: #cccccc; + font-family: serif; + font-size: 2.5em; + line-height: 1.2; + cursor: pointer; + overflow: hidden; } + .swal2-popup .swal2-close:hover { + -webkit-transform: none; + transform: none; + color: #f27474; } + .swal2-popup > .swal2-input, + .swal2-popup > .swal2-file, + .swal2-popup > .swal2-textarea, + .swal2-popup > .swal2-select, + .swal2-popup > .swal2-radio, + .swal2-popup > .swal2-checkbox { + display: none; } + .swal2-popup .swal2-content { + justify-content: center; + margin: 0; + padding: 0; + color: #545454; + font-size: 1.125em; + font-weight: 300; + line-height: normal; + z-index: 1; + word-wrap: break-word; } + .swal2-popup #swal2-content { + text-align: center; } + .swal2-popup .swal2-input, + .swal2-popup .swal2-file, + .swal2-popup .swal2-textarea, + .swal2-popup .swal2-select, + .swal2-popup .swal2-radio, + .swal2-popup .swal2-checkbox { + margin: 1em auto; } + .swal2-popup .swal2-input, + .swal2-popup .swal2-file, + .swal2-popup .swal2-textarea { + width: 100%; + transition: border-color .3s, box-shadow .3s; + border: 1px solid #d9d9d9; + border-radius: 0.1875em; + font-size: 1.125em; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06); + box-sizing: border-box; } + .swal2-popup .swal2-input.swal2-inputerror, + .swal2-popup .swal2-file.swal2-inputerror, + .swal2-popup .swal2-textarea.swal2-inputerror { + border-color: #f27474 !important; + box-shadow: 0 0 2px #f27474 !important; } + .swal2-popup .swal2-input:focus, + .swal2-popup .swal2-file:focus, + .swal2-popup .swal2-textarea:focus { + border: 1px solid #b4dbed; + outline: none; + box-shadow: 0 0 3px #c4e6f5; } + .swal2-popup .swal2-input::-webkit-input-placeholder, + .swal2-popup .swal2-file::-webkit-input-placeholder, + .swal2-popup .swal2-textarea::-webkit-input-placeholder { + color: #cccccc; } + .swal2-popup .swal2-input:-ms-input-placeholder, + .swal2-popup .swal2-file:-ms-input-placeholder, + .swal2-popup .swal2-textarea:-ms-input-placeholder { + color: #cccccc; } + .swal2-popup .swal2-input::-ms-input-placeholder, + .swal2-popup .swal2-file::-ms-input-placeholder, + .swal2-popup .swal2-textarea::-ms-input-placeholder { + color: #cccccc; } + .swal2-popup .swal2-input::placeholder, + .swal2-popup .swal2-file::placeholder, + .swal2-popup .swal2-textarea::placeholder { + color: #cccccc; } + .swal2-popup .swal2-range input { + width: 80%; } + .swal2-popup .swal2-range output { + width: 20%; + font-weight: 600; + text-align: center; } + .swal2-popup .swal2-range input, + .swal2-popup .swal2-range output { + height: 2.625em; + margin: 1em auto; + padding: 0; + font-size: 1.125em; + line-height: 2.625em; } + .swal2-popup .swal2-input { + height: 2.625em; + padding: 0 0.75em; } + .swal2-popup .swal2-input[type='number'] { + max-width: 10em; } + .swal2-popup .swal2-file { + font-size: 1.125em; } + .swal2-popup .swal2-textarea { + height: 6.75em; + padding: 0.75em; } + .swal2-popup .swal2-select { + min-width: 50%; + max-width: 100%; + padding: .375em .625em; + color: #545454; + font-size: 1.125em; } + .swal2-popup .swal2-radio, + .swal2-popup .swal2-checkbox { + align-items: center; + justify-content: center; } + .swal2-popup .swal2-radio label, + .swal2-popup .swal2-checkbox label { + margin: 0 .6em; + font-size: 1.125em; } + .swal2-popup .swal2-radio input, + .swal2-popup .swal2-checkbox input { + margin: 0 .4em; } + .swal2-popup .swal2-validation-message { + display: none; + align-items: center; + justify-content: center; + padding: 0.625em; + background: #f0f0f0; + color: #666666; + font-size: 1em; + font-weight: 300; + overflow: hidden; } + .swal2-popup .swal2-validation-message::before { + display: inline-block; + width: 1.5em; + min-width: 1.5em; + height: 1.5em; + margin: 0 .625em; + border-radius: 50%; + background-color: #f27474; + color: #fff; + font-weight: 600; + line-height: 1.5em; + text-align: center; + content: '!'; + zoom: normal; } + +@supports (-ms-accelerator: true) { + .swal2-range input { + width: 100% !important; } + .swal2-range output { + display: none; } } + +@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .swal2-range input { + width: 100% !important; } + .swal2-range output { + display: none; } } + +@-moz-document url-prefix() { + .swal2-close:focus { + outline: 2px solid rgba(50, 100, 150, 0.4); } } + +.swal2-icon { + position: relative; + justify-content: center; + width: 5em; + height: 5em; + margin: 1.25em auto 1.875em; + border: .25em solid transparent; + border-radius: 50%; + line-height: 5em; + cursor: default; + box-sizing: content-box; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + zoom: normal; } + .swal2-icon-text { + font-size: 3.75em; } + .swal2-icon.swal2-error { + border-color: #f27474; } + .swal2-icon.swal2-error .swal2-x-mark { + position: relative; + flex-grow: 1; } + .swal2-icon.swal2-error [class^='swal2-x-mark-line'] { + display: block; + position: absolute; + top: 2.3125em; + width: 2.9375em; + height: .3125em; + border-radius: .125em; + background-color: #f27474; } + .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='left'] { + left: 1.0625em; + -webkit-transform: rotate(45deg); + transform: rotate(45deg); } + .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='right'] { + right: 1em; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); } + .swal2-icon.swal2-warning { + border-color: #facea8; + color: #f8bb86; } + .swal2-icon.swal2-info { + border-color: #9de0f6; + color: #3fc3ee; } + .swal2-icon.swal2-question { + border-color: #c9dae1; + color: #87adbd; } + .swal2-icon.swal2-success { + border-color: #a5dc86; } + .swal2-icon.swal2-success [class^='swal2-success-circular-line'] { + position: absolute; + width: 3.75em; + height: 7.5em; + -webkit-transform: rotate(45deg); + transform: rotate(45deg); + border-radius: 50%; } + .swal2-icon.swal2-success [class^='swal2-success-circular-line'][class$='left'] { + top: -.4375em; + left: -2.0635em; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + -webkit-transform-origin: 3.75em 3.75em; + transform-origin: 3.75em 3.75em; + border-radius: 7.5em 0 0 7.5em; } + .swal2-icon.swal2-success [class^='swal2-success-circular-line'][class$='right'] { + top: -.6875em; + left: 1.875em; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + -webkit-transform-origin: 0 3.75em; + transform-origin: 0 3.75em; + border-radius: 0 7.5em 7.5em 0; } + .swal2-icon.swal2-success .swal2-success-ring { + position: absolute; + top: -.25em; + left: -.25em; + width: 100%; + height: 100%; + border: 0.25em solid rgba(165, 220, 134, 0.3); + border-radius: 50%; + z-index: 2; + box-sizing: content-box; } + .swal2-icon.swal2-success .swal2-success-fix { + position: absolute; + top: .5em; + left: 1.625em; + width: .4375em; + height: 5.625em; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + z-index: 1; } + .swal2-icon.swal2-success [class^='swal2-success-line'] { + display: block; + position: absolute; + height: .3125em; + border-radius: .125em; + background-color: #a5dc86; + z-index: 2; } + .swal2-icon.swal2-success [class^='swal2-success-line'][class$='tip'] { + top: 2.875em; + left: .875em; + width: 1.5625em; + -webkit-transform: rotate(45deg); + transform: rotate(45deg); } + .swal2-icon.swal2-success [class^='swal2-success-line'][class$='long'] { + top: 2.375em; + right: .5em; + width: 2.9375em; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); } + +.swal2-progresssteps { + align-items: center; + margin: 0 0 1.25em; + padding: 0; + font-weight: 600; } + .swal2-progresssteps li { + display: inline-block; + position: relative; } + .swal2-progresssteps .swal2-progresscircle { + width: 2em; + height: 2em; + border-radius: 2em; + background: #3085d6; + color: #fff; + line-height: 2em; + text-align: center; + z-index: 20; } + .swal2-progresssteps .swal2-progresscircle:first-child { + margin-left: 0; } + .swal2-progresssteps .swal2-progresscircle:last-child { + margin-right: 0; } + .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep { + background: #3085d6; } + .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep ~ .swal2-progresscircle { + background: #add8e6; } + .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep ~ .swal2-progressline { + background: #add8e6; } + .swal2-progresssteps .swal2-progressline { + width: 2.5em; + height: .4em; + margin: 0 -1px; + background: #3085d6; + z-index: 10; } + +[class^='swal2'] { + -webkit-tap-highlight-color: transparent; } + +.swal2-show { + -webkit-animation: swal2-show 0.3s; + animation: swal2-show 0.3s; } + .swal2-show.swal2-noanimation { + -webkit-animation: none; + animation: none; } + +.swal2-hide { + -webkit-animation: swal2-hide 0.15s forwards; + animation: swal2-hide 0.15s forwards; } + .swal2-hide.swal2-noanimation { + -webkit-animation: none; + animation: none; } + +.swal2-rtl .swal2-close { + right: auto; + left: 0; } + +.swal2-animate-success-icon .swal2-success-line-tip { + -webkit-animation: swal2-animate-success-line-tip 0.75s; + animation: swal2-animate-success-line-tip 0.75s; } + +.swal2-animate-success-icon .swal2-success-line-long { + -webkit-animation: swal2-animate-success-line-long 0.75s; + animation: swal2-animate-success-line-long 0.75s; } + +.swal2-animate-success-icon .swal2-success-circular-line-right { + -webkit-animation: swal2-rotate-success-circular-line 4.25s ease-in; + animation: swal2-rotate-success-circular-line 4.25s ease-in; } + +.swal2-animate-error-icon { + -webkit-animation: swal2-animate-error-icon 0.5s; + animation: swal2-animate-error-icon 0.5s; } + .swal2-animate-error-icon .swal2-x-mark { + -webkit-animation: swal2-animate-error-x-mark 0.5s; + animation: swal2-animate-error-x-mark 0.5s; } + +@-webkit-keyframes swal2-rotate-loading { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); } } + +@keyframes swal2-rotate-loading { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); } } + +@media print { + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow-y: scroll !important; } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) > [aria-hidden='true'] { + display: none; } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container { + position: initial !important; } } diff --git a/Bootstrap.Admin/wwwroot/lib/sweetalert/sweetalert2.js b/Bootstrap.Admin/wwwroot/lib/sweetalert/sweetalert2.js new file mode 100644 index 00000000..f2b031fe --- /dev/null +++ b/Bootstrap.Admin/wwwroot/lib/sweetalert/sweetalert2.js @@ -0,0 +1,2748 @@ +/*! +* sweetalert2 v7.33.1 +* Released under the MIT License. +*/ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.Sweetalert2 = factory()); +}(this, (function () { 'use strict'; + +function _typeof(obj) { + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); +} + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} + +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); +} + +function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); + return true; + } catch (e) { + return false; + } +} + +function _construct(Parent, args, Class) { + if (isNativeReflectConstruct()) { + _construct = Reflect.construct; + } else { + _construct = function _construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + if (Class) _setPrototypeOf(instance, Class.prototype); + return instance; + }; + } + + return _construct.apply(null, arguments); +} + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +function _possibleConstructorReturn(self, call) { + if (call && (typeof call === "object" || typeof call === "function")) { + return call; + } + + return _assertThisInitialized(self); +} + +function _superPropBase(object, property) { + while (!Object.prototype.hasOwnProperty.call(object, property)) { + object = _getPrototypeOf(object); + if (object === null) break; + } + + return object; +} + +function _get(target, property, receiver) { + if (typeof Reflect !== "undefined" && Reflect.get) { + _get = Reflect.get; + } else { + _get = function _get(target, property, receiver) { + var base = _superPropBase(target, property); + + if (!base) return; + var desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.get) { + return desc.get.call(receiver); + } + + return desc.value; + }; + } + + return _get(target, property, receiver || target); +} + +var consolePrefix = 'SweetAlert2:'; +/** + * Filter the unique values into a new array + * @param arr + */ + +var uniqueArray = function uniqueArray(arr) { + var result = []; + + for (var i = 0; i < arr.length; i++) { + if (result.indexOf(arr[i]) === -1) { + result.push(arr[i]); + } + } + + return result; +}; +/** + * Convert NodeList to Array + * @param nodeList + */ + +var toArray = function toArray(nodeList) { + return Array.prototype.slice.call(nodeList); +}; +/** + * Converts `inputOptions` into an array of `[value, label]`s + * @param inputOptions + */ + +var formatInputOptions = function formatInputOptions(inputOptions) { + var result = []; + + if (typeof Map !== 'undefined' && inputOptions instanceof Map) { + inputOptions.forEach(function (value, key) { + result.push([key, value]); + }); + } else { + Object.keys(inputOptions).forEach(function (key) { + result.push([key, inputOptions[key]]); + }); + } + + return result; +}; +/** + * Standardise console warnings + * @param message + */ + +var warn = function warn(message) { + console.warn("".concat(consolePrefix, " ").concat(message)); +}; +/** + * Standardise console errors + * @param message + */ + +var error = function error(message) { + console.error("".concat(consolePrefix, " ").concat(message)); +}; +/** + * Private global state for `warnOnce` + * @type {Array} + * @private + */ + +var previousWarnOnceMessages = []; +/** + * Show a console warning, but only if it hasn't already been shown + * @param message + */ + +var warnOnce = function warnOnce(message) { + if (!(previousWarnOnceMessages.indexOf(message) !== -1)) { + previousWarnOnceMessages.push(message); + warn(message); + } +}; +/** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * @param arg + */ + +var callIfFunction = function callIfFunction(arg) { + return typeof arg === 'function' ? arg() : arg; +}; +var isPromise = function isPromise(arg) { + return arg && Promise.resolve(arg) === arg; +}; + +var DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'overlay', + close: 'close', + esc: 'esc', + timer: 'timer' +}); + +var argsToParams = function argsToParams(args) { + var params = {}; + + switch (_typeof(args[0])) { + case 'object': + _extends(params, args[0]); + + break; + + default: + ['title', 'html', 'type'].forEach(function (name, index) { + switch (_typeof(args[index])) { + case 'string': + params[name] = args[index]; + break; + + case 'undefined': + break; + + default: + error("Unexpected type of ".concat(name, "! Expected \"string\", got ").concat(_typeof(args[index]))); + } + }); + } + + return params; +}; + +/** + * Adapt a legacy inputValidator for use with expectRejections=false + */ +var adaptInputValidator = function adaptInputValidator(legacyValidator) { + return function adaptedInputValidator(inputValue, extraParams) { + return legacyValidator.call(this, inputValue, extraParams).then(function () { + return undefined; + }, function (validationMessage) { + return validationMessage; + }); + }; +}; + +var swalPrefix = 'swal2-'; +var prefix = function prefix(items) { + var result = {}; + + for (var i in items) { + result[items[i]] = swalPrefix + items[i]; + } + + return result; +}; +var swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'toast', 'toast-shown', 'toast-column', 'fade', 'show', 'hide', 'noanimation', 'close', 'title', 'header', 'content', 'actions', 'confirm', 'cancel', 'footer', 'icon', 'icon-text', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'validation-message', 'progresssteps', 'activeprogressstep', 'progresscircle', 'progressline', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl']); +var iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); + +var states = { + previousBodyPadding: null +}; +var hasClass = function hasClass(elem, className) { + return elem.classList.contains(className); +}; +var focusInput = function focusInput(input) { + input.focus(); // place cursor at end of text in text input + + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + var val = input.value; + input.value = ''; + input.value = val; + } +}; + +var addOrRemoveClass = function addOrRemoveClass(target, classList, add) { + if (!target || !classList) { + return; + } + + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + + classList.forEach(function (className) { + if (target.forEach) { + target.forEach(function (elem) { + add ? elem.classList.add(className) : elem.classList.remove(className); + }); + } else { + add ? target.classList.add(className) : target.classList.remove(className); + } + }); +}; + +var addClass = function addClass(target, classList) { + addOrRemoveClass(target, classList, true); +}; +var removeClass = function removeClass(target, classList) { + addOrRemoveClass(target, classList, false); +}; +var getChildByClass = function getChildByClass(elem, className) { + for (var i = 0; i < elem.childNodes.length; i++) { + if (hasClass(elem.childNodes[i], className)) { + return elem.childNodes[i]; + } + } +}; +var show = function show(elem) { + elem.style.opacity = ''; + elem.style.display = elem.id === swalClasses.content ? 'block' : 'flex'; +}; +var hide = function hide(elem) { + elem.style.opacity = ''; + elem.style.display = 'none'; +}; // borrowed from jquery $(elem).is(':visible') implementation + +var isVisible = function isVisible(elem) { + return elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length); +}; +var contains = function contains(haystack, needle) { + if (typeof haystack.contains === 'function') { + return haystack.contains(needle); + } +}; + +var getContainer = function getContainer() { + return document.body.querySelector('.' + swalClasses.container); +}; + +var elementByClass = function elementByClass(className) { + var container = getContainer(); + return container ? container.querySelector('.' + className) : null; +}; + +var getPopup = function getPopup() { + return elementByClass(swalClasses.popup); +}; +var getIcons = function getIcons() { + var popup = getPopup(); + return toArray(popup.querySelectorAll('.' + swalClasses.icon)); +}; +var getTitle = function getTitle() { + return elementByClass(swalClasses.title); +}; +var getContent = function getContent() { + return elementByClass(swalClasses.content); +}; +var getImage = function getImage() { + return elementByClass(swalClasses.image); +}; +var getProgressSteps = function getProgressSteps() { + return elementByClass(swalClasses.progresssteps); +}; +var getValidationMessage = function getValidationMessage() { + return elementByClass(swalClasses['validation-message']); +}; +var getConfirmButton = function getConfirmButton() { + return elementByClass(swalClasses.confirm); +}; +var getCancelButton = function getCancelButton() { + return elementByClass(swalClasses.cancel); +}; +/* @deprecated */ + +/* istanbul ignore next */ + +var getButtonsWrapper = function getButtonsWrapper() { + warnOnce("swal.getButtonsWrapper() is deprecated and will be removed in the next major release, use swal.getActions() instead"); + return elementByClass(swalClasses.actions); +}; +var getActions = function getActions() { + return elementByClass(swalClasses.actions); +}; +var getFooter = function getFooter() { + return elementByClass(swalClasses.footer); +}; +var getCloseButton = function getCloseButton() { + return elementByClass(swalClasses.close); +}; +var getFocusableElements = function getFocusableElements() { + var focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex + .sort(function (a, b) { + a = parseInt(a.getAttribute('tabindex')); + b = parseInt(b.getAttribute('tabindex')); + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } + + return 0; + }); // https://github.com/jkup/focusable/blob/master/index.js + + var otherFocusableElements = toArray(getPopup().querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable], audio[controls], video[controls]')).filter(function (el) { + return el.getAttribute('tabindex') !== '-1'; + }); + return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(function (el) { + return isVisible(el); + }); +}; +var isModal = function isModal() { + return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']); +}; +var isToast = function isToast() { + return document.body.classList.contains(swalClasses['toast-shown']); +}; +var isLoading = function isLoading() { + return getPopup().hasAttribute('data-loading'); +}; + +// Detect Node env +var isNodeEnv = function isNodeEnv() { + return typeof window === 'undefined' || typeof document === 'undefined'; +}; + +var sweetHTML = "\n
\n
\n
    \n
    \n \n
    \n
    \n ?\n
    \n
    \n !\n
    \n
    \n i\n
    \n
    \n
    \n \n
    \n
    \n
    \n \n

    \n \n
    \n
    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n").replace(/(^|\n)\s*/g, ''); +/* + * Add modal + backdrop to DOM + */ + +var init = function init(params) { + // Clean up the old popup if it exists + var c = getContainer(); + + if (c) { + c.parentNode.removeChild(c); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + } + /* istanbul ignore if */ + + + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + + var container = document.createElement('div'); + container.className = swalClasses.container; + container.innerHTML = sweetHTML; + var targetElement = typeof params.target === 'string' ? document.querySelector(params.target) : params.target; + targetElement.appendChild(container); + var popup = getPopup(); + var content = getContent(); + var input = getChildByClass(content, swalClasses.input); + var file = getChildByClass(content, swalClasses.file); + var range = content.querySelector(".".concat(swalClasses.range, " input")); + var rangeOutput = content.querySelector(".".concat(swalClasses.range, " output")); + var select = getChildByClass(content, swalClasses.select); + var checkbox = content.querySelector(".".concat(swalClasses.checkbox, " input")); + var textarea = getChildByClass(content, swalClasses.textarea); // a11y + + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } // RTL + + + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } + + var oldInputVal; // IE11 workaround, see #1109 for details + + var resetValidationMessage = function resetValidationMessage(e) { + if (Swal.isVisible() && oldInputVal !== e.target.value) { + Swal.resetValidationMessage(); + } + + oldInputVal = e.target.value; + }; + + input.oninput = resetValidationMessage; + file.onchange = resetValidationMessage; + select.onchange = resetValidationMessage; + checkbox.onchange = resetValidationMessage; + textarea.oninput = resetValidationMessage; + + range.oninput = function (e) { + resetValidationMessage(e); + rangeOutput.value = range.value; + }; + + range.onchange = function (e) { + resetValidationMessage(e); + range.nextSibling.value = range.value; + }; + + return popup; +}; + +var parseHtmlToContainer = function parseHtmlToContainer(param, target) { + if (!param) { + return hide(target); + } // DOM element + + + if (param instanceof HTMLElement) { + target.appendChild(param); // JQuery element(s) + } else if (_typeof(param) === 'object') { + target.innerHTML = ''; + + if (0 in param) { + for (var i = 0; i in param; i++) { + target.appendChild(param[i].cloneNode(true)); + } + } else { + target.appendChild(param.cloneNode(true)); + } + } else if (param) { + target.innerHTML = param; + } + + show(target); +}; + +var animationEndEvent = function () { + // Prevent run in Node env + + /* istanbul ignore if */ + if (isNodeEnv()) { + return false; + } + + var testEl = document.createElement('div'); + var transEndEventNames = { + 'WebkitAnimation': 'webkitAnimationEnd', + 'OAnimation': 'oAnimationEnd oanimationend', + 'animation': 'animationend' + }; + + for (var i in transEndEventNames) { + if (transEndEventNames.hasOwnProperty(i) && typeof testEl.style[i] !== 'undefined') { + return transEndEventNames[i]; + } + } + + return false; +}(); + +// Measure width of scrollbar +// https://github.com/twbs/bootstrap/blob/master/js/modal.js#L279-L286 +var measureScrollbar = function measureScrollbar() { + var supportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints; + + if (supportsTouch) { + return 0; + } + + var scrollDiv = document.createElement('div'); + scrollDiv.style.width = '50px'; + scrollDiv.style.height = '50px'; + scrollDiv.style.overflow = 'scroll'; + document.body.appendChild(scrollDiv); + var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; +}; + +var renderActions = function renderActions(params) { + var actions = getActions(); + var confirmButton = getConfirmButton(); + var cancelButton = getCancelButton(); // Actions (buttons) wrapper + + if (!params.showConfirmButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } // Cancel button + + + if (params.showCancelButton) { + cancelButton.style.display = 'inline-block'; + } else { + hide(cancelButton); + } // Confirm button + + + if (params.showConfirmButton) { + confirmButton.style.removeProperty('display'); + } else { + hide(confirmButton); + } // Edit text on confirm and cancel buttons + + + confirmButton.innerHTML = params.confirmButtonText; + cancelButton.innerHTML = params.cancelButtonText; // ARIA labels for confirm and cancel buttons + + confirmButton.setAttribute('aria-label', params.confirmButtonAriaLabel); + cancelButton.setAttribute('aria-label', params.cancelButtonAriaLabel); // Add buttons custom classes + + confirmButton.className = swalClasses.confirm; + addClass(confirmButton, params.confirmButtonClass); + cancelButton.className = swalClasses.cancel; + addClass(cancelButton, params.cancelButtonClass); // Buttons styling + + if (params.buttonsStyling) { + addClass([confirmButton, cancelButton], swalClasses.styled); // Buttons background colors + + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + } + + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + } // Loading state + + + var confirmButtonBackgroundColor = window.getComputedStyle(confirmButton).getPropertyValue('background-color'); + confirmButton.style.borderLeftColor = confirmButtonBackgroundColor; + confirmButton.style.borderRightColor = confirmButtonBackgroundColor; + } else { + removeClass([confirmButton, cancelButton], swalClasses.styled); + confirmButton.style.backgroundColor = confirmButton.style.borderLeftColor = confirmButton.style.borderRightColor = ''; + cancelButton.style.backgroundColor = cancelButton.style.borderLeftColor = cancelButton.style.borderRightColor = ''; + } +}; + +var renderContent = function renderContent(params) { + var content = getContent().querySelector('#' + swalClasses.content); // Content as HTML + + if (params.html) { + parseHtmlToContainer(params.html, content); // Content as plain text + } else if (params.text) { + content.textContent = params.text; + show(content); + } else { + hide(content); + } +}; + +var renderIcon = function renderIcon(params) { + var icons = getIcons(); + + for (var i = 0; i < icons.length; i++) { + hide(icons[i]); + } + + if (params.type) { + if (Object.keys(iconTypes).indexOf(params.type) !== -1) { + var icon = Swal.getPopup().querySelector(".".concat(swalClasses.icon, ".").concat(iconTypes[params.type])); + show(icon); // Animate icon + + if (params.animation) { + addClass(icon, "swal2-animate-".concat(params.type, "-icon")); + } + } else { + error("Unknown type! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.type, "\"")); + } + } +}; + +var renderImage = function renderImage(params) { + var image = getImage(); + + if (params.imageUrl) { + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt); + show(image); + + if (params.imageWidth) { + image.setAttribute('width', params.imageWidth); + } else { + image.removeAttribute('width'); + } + + if (params.imageHeight) { + image.setAttribute('height', params.imageHeight); + } else { + image.removeAttribute('height'); + } + + image.className = swalClasses.image; + + if (params.imageClass) { + addClass(image, params.imageClass); + } + } else { + hide(image); + } +}; + +var renderProgressSteps = function renderProgressSteps(params) { + var progressStepsContainer = getProgressSteps(); + var currentProgressStep = parseInt(params.currentProgressStep === null ? Swal.getQueueStep() : params.currentProgressStep, 10); + + if (params.progressSteps && params.progressSteps.length) { + show(progressStepsContainer); + progressStepsContainer.innerHTML = ''; + + if (currentProgressStep >= params.progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + + params.progressSteps.forEach(function (step, index) { + var circle = document.createElement('li'); + addClass(circle, swalClasses.progresscircle); + circle.innerHTML = step; + + if (index === currentProgressStep) { + addClass(circle, swalClasses.activeprogressstep); + } + + progressStepsContainer.appendChild(circle); + + if (index !== params.progressSteps.length - 1) { + var line = document.createElement('li'); + addClass(line, swalClasses.progressline); + + if (params.progressStepsDistance) { + line.style.width = params.progressStepsDistance; + } + + progressStepsContainer.appendChild(line); + } + }); + } else { + hide(progressStepsContainer); + } +}; + +var renderTitle = function renderTitle(params) { + var title = getTitle(); + + if (params.titleText) { + title.innerText = params.titleText; + } else if (params.title) { + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('
    '); + } + + parseHtmlToContainer(params.title, title); + } +}; + +var fixScrollbar = function fixScrollbar() { + // for queues, do not do this more than once + if (states.previousBodyPadding !== null) { + return; + } // if the body has overflow + + + if (document.body.scrollHeight > window.innerHeight) { + // add padding so the content doesn't shift after removal of scrollbar + states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = states.previousBodyPadding + measureScrollbar() + 'px'; + } +}; +var undoScrollbar = function undoScrollbar() { + if (states.previousBodyPadding !== null) { + document.body.style.paddingRight = states.previousBodyPadding; + states.previousBodyPadding = null; + } +}; + +/* istanbul ignore next */ + +var iOSfix = function iOSfix() { + var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; + + if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + var offset = document.body.scrollTop; + document.body.style.top = offset * -1 + 'px'; + addClass(document.body, swalClasses.iosfix); + } +}; +/* istanbul ignore next */ + +var undoIOSfix = function undoIOSfix() { + if (hasClass(document.body, swalClasses.iosfix)) { + var offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } +}; + +var isIE11 = function isIE11() { + return !!window.MSInputMethodContext && !!document.documentMode; +}; // Fix IE11 centering sweetalert2/issues/933 + +/* istanbul ignore next */ + + +var fixVerticalPositionIE = function fixVerticalPositionIE() { + var container = getContainer(); + var popup = getPopup(); + container.style.removeProperty('align-items'); + + if (popup.offsetTop < 0) { + container.style.alignItems = 'flex-start'; + } +}; +/* istanbul ignore next */ + + +var IEfix = function IEfix() { + if (typeof window !== 'undefined' && isIE11()) { + fixVerticalPositionIE(); + window.addEventListener('resize', fixVerticalPositionIE); + } +}; +/* istanbul ignore next */ + +var undoIEfix = function undoIEfix() { + if (typeof window !== 'undefined' && isIE11()) { + window.removeEventListener('resize', fixVerticalPositionIE); + } +}; + +// Adding aria-hidden="true" to elements outside of the active modal dialog ensures that +// elements not within the active modal dialog will not be surfaced if a user opens a screen +// reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + +var setAriaHidden = function setAriaHidden() { + var bodyChildren = toArray(document.body.children); + bodyChildren.forEach(function (el) { + if (el === getContainer() || contains(el, getContainer())) { + return; + } + + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + } + + el.setAttribute('aria-hidden', 'true'); + }); +}; +var unsetAriaHidden = function unsetAriaHidden() { + var bodyChildren = toArray(document.body.children); + bodyChildren.forEach(function (el) { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); +}; + +var RESTORE_FOCUS_TIMEOUT = 100; + +var globalState = {}; +var restoreActiveElement = function restoreActiveElement() { + return new Promise(function (resolve) { + var x = window.scrollX; + var y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(function () { + if (globalState.previousActiveElement && globalState.previousActiveElement.focus) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + if (typeof x !== 'undefined' && typeof y !== 'undefined') { + // IE doesn't have scrollX/scrollY support + window.scrollTo(x, y); + } + }); +}; + +/* + * Global function to close sweetAlert + */ + +var close = function close(onClose, onAfterClose) { + var container = getContainer(); + var popup = getPopup(); + + if (!popup) { + return; + } + + if (onClose !== null && typeof onClose === 'function') { + onClose(popup); + } + + removeClass(popup, swalClasses.show); + addClass(popup, swalClasses.hide); + + var removePopupAndResetState = function removePopupAndResetState() { + if (!isToast()) { + restoreActiveElement().then(function () { + return triggerOnAfterClose(onAfterClose); + }); + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } else { + triggerOnAfterClose(onAfterClose); + } + + if (container.parentNode) { + container.parentNode.removeChild(container); + } + + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['toast-column']]); + + if (isModal()) { + undoScrollbar(); + undoIOSfix(); + undoIEfix(); + unsetAriaHidden(); + } + }; // If animation is supported, animate + + + if (animationEndEvent && !hasClass(popup, swalClasses.noanimation)) { + popup.addEventListener(animationEndEvent, function swalCloseEventFinished() { + popup.removeEventListener(animationEndEvent, swalCloseEventFinished); + + if (hasClass(popup, swalClasses.hide)) { + removePopupAndResetState(); + } + }); + } else { + // Otherwise, remove immediately + removePopupAndResetState(); + } +}; + +var triggerOnAfterClose = function triggerOnAfterClose(onAfterClose) { + if (onAfterClose !== null && typeof onAfterClose === 'function') { + setTimeout(function () { + onAfterClose(); + }); + } +}; + +/* + * Global function to determine if swal2 popup is shown + */ + +var isVisible$1 = function isVisible() { + return !!getPopup(); +}; +/* + * Global function to click 'Confirm' button + */ + +var clickConfirm = function clickConfirm() { + return getConfirmButton().click(); +}; +/* + * Global function to click 'Cancel' button + */ + +var clickCancel = function clickCancel() { + return getCancelButton().click(); +}; + +function fire() { + var Swal = this; + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _construct(Swal, args); +} + +/** + * Extends a Swal class making it able to be instantiated without the `new` keyword (and thus without `Swal.fire`) + * @param ParentSwal + * @returns {NoNewKeywordSwal} + */ +function withNoNewKeyword(ParentSwal) { + var NoNewKeywordSwal = function NoNewKeywordSwal() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + if (!(this instanceof NoNewKeywordSwal)) { + return _construct(NoNewKeywordSwal, args); + } + + Object.getPrototypeOf(NoNewKeywordSwal).apply(this, args); + }; + + NoNewKeywordSwal.prototype = _extends(Object.create(ParentSwal.prototype), { + constructor: NoNewKeywordSwal + }); + + if (typeof Object.setPrototypeOf === 'function') { + Object.setPrototypeOf(NoNewKeywordSwal, ParentSwal); + } else { + // Android 4.4 + + /* istanbul ignore next */ + // eslint-disable-next-line + NoNewKeywordSwal.__proto__ = ParentSwal; + } + + return NoNewKeywordSwal; +} + +var defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + type: null, + toast: false, + customClass: '', + customContainerClass: '', + target: 'body', + backdrop: true, + animation: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showCancelButton: false, + preConfirm: null, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: null, + confirmButtonClass: null, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: null, + cancelButtonClass: null, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusCancel: false, + showCloseButton: false, + closeButtonAriaLabel: 'Close this dialog', + showLoaderOnConfirm: false, + imageUrl: null, + imageWidth: null, + imageHeight: null, + imageAlt: '', + imageClass: null, + timer: null, + width: null, + padding: null, + background: null, + input: null, + inputPlaceholder: '', + inputValue: '', + inputOptions: {}, + inputAutoTrim: true, + inputClass: null, + inputAttributes: {}, + inputValidator: null, + validationMessage: null, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: null, + progressStepsDistance: null, + onBeforeOpen: null, + onAfterClose: null, + onOpen: null, + onClose: null, + useRejections: false, + expectRejections: false +}; +var deprecatedParams = ['useRejections', 'expectRejections', 'extraParams']; +var toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusCancel', 'heightAuto', 'keydownListenerCapture']; +/** + * Is valid parameter + * @param {String} paramName + */ + +var isValidParameter = function isValidParameter(paramName) { + return defaultParams.hasOwnProperty(paramName) || paramName === 'extraParams'; +}; +/** + * Is deprecated parameter + * @param {String} paramName + */ + +var isDeprecatedParameter = function isDeprecatedParameter(paramName) { + return deprecatedParams.indexOf(paramName) !== -1; +}; +/** + * Show relevant warnings for given params + * + * @param params + */ + +var showWarningsForParams = function showWarningsForParams(params) { + for (var param in params) { + if (!isValidParameter(param)) { + warn("Unknown parameter \"".concat(param, "\"")); + } + + if (params.toast && toastIncompatibleParams.indexOf(param) !== -1) { + warn("The parameter \"".concat(param, "\" is incompatible with toasts")); + } + + if (isDeprecatedParameter(param)) { + warnOnce("The parameter \"".concat(param, "\" is deprecated and will be removed in the next major release.")); + } + } +}; + +var deprecationWarning = "\"setDefaults\" & \"resetDefaults\" methods are deprecated in favor of \"mixin\" method and will be removed in the next major release. For new projects, use \"mixin\". For past projects already using \"setDefaults\", support will be provided through an additional package."; +var defaults = {}; +function withGlobalDefaults(ParentSwal) { + var SwalWithGlobalDefaults = + /*#__PURE__*/ + function (_ParentSwal) { + _inherits(SwalWithGlobalDefaults, _ParentSwal); + + function SwalWithGlobalDefaults() { + _classCallCheck(this, SwalWithGlobalDefaults); + + return _possibleConstructorReturn(this, _getPrototypeOf(SwalWithGlobalDefaults).apply(this, arguments)); + } + + _createClass(SwalWithGlobalDefaults, [{ + key: "_main", + value: function _main(params) { + return _get(_getPrototypeOf(SwalWithGlobalDefaults.prototype), "_main", this).call(this, _extends({}, defaults, params)); + } + }], [{ + key: "setDefaults", + value: function setDefaults(params) { + warnOnce(deprecationWarning); + + if (!params || _typeof(params) !== 'object') { + throw new TypeError('SweetAlert2: The argument for setDefaults() is required and has to be a object'); + } + + showWarningsForParams(params); // assign valid params from `params` to `defaults` + + Object.keys(params).forEach(function (param) { + if (ParentSwal.isValidParameter(param)) { + defaults[param] = params[param]; + } + }); + } + }, { + key: "resetDefaults", + value: function resetDefaults() { + warnOnce(deprecationWarning); + defaults = {}; + } + }]); + + return SwalWithGlobalDefaults; + }(ParentSwal); // Set default params if `window._swalDefaults` is an object + + + if (typeof window !== 'undefined' && _typeof(window._swalDefaults) === 'object') { + SwalWithGlobalDefaults.setDefaults(window._swalDefaults); + } + + return SwalWithGlobalDefaults; +} + +/** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param mixinParams + */ + +function mixin(mixinParams) { + return withNoNewKeyword( + /*#__PURE__*/ + function (_this) { + _inherits(MixinSwal, _this); + + function MixinSwal() { + _classCallCheck(this, MixinSwal); + + return _possibleConstructorReturn(this, _getPrototypeOf(MixinSwal).apply(this, arguments)); + } + + _createClass(MixinSwal, [{ + key: "_main", + value: function _main(params) { + return _get(_getPrototypeOf(MixinSwal.prototype), "_main", this).call(this, _extends({}, mixinParams, params)); + } + }]); + + return MixinSwal; + }(this)); +} + +// private global state for the queue feature +var currentSteps = []; +/* + * Global function for chaining sweetAlert popups + */ + +var queue = function queue(steps) { + var swal = this; + currentSteps = steps; + + var resetQueue = function resetQueue() { + currentSteps = []; + document.body.removeAttribute('data-swal2-queue-step'); + }; + + var queueResult = []; + return new Promise(function (resolve) { + (function step(i, callback) { + if (i < currentSteps.length) { + document.body.setAttribute('data-swal2-queue-step', i); + swal(currentSteps[i]).then(function (result) { + if (typeof result.value !== 'undefined') { + queueResult.push(result.value); + step(i + 1, callback); + } else { + resetQueue(); + resolve({ + dismiss: result.dismiss + }); + } + }); + } else { + resetQueue(); + resolve({ + value: queueResult + }); + } + })(0); + }); +}; +/* + * Global function for getting the index of current popup in queue + */ + +var getQueueStep = function getQueueStep() { + return document.body.getAttribute('data-swal2-queue-step'); +}; +/* + * Global function for inserting a popup to the queue + */ + +var insertQueueStep = function insertQueueStep(step, index) { + if (index && index < currentSteps.length) { + return currentSteps.splice(index, 0, step); + } + + return currentSteps.push(step); +}; +/* + * Global function for deleting a popup from the queue + */ + +var deleteQueueStep = function deleteQueueStep(index) { + if (typeof currentSteps[index] !== 'undefined') { + currentSteps.splice(index, 1); + } +}; + +/** + * Show spinner instead of Confirm button and disable Cancel button + */ + +var showLoading = function showLoading() { + var popup = getPopup(); + + if (!popup) { + Swal(''); + } + + popup = getPopup(); + var actions = getActions(); + var confirmButton = getConfirmButton(); + var cancelButton = getCancelButton(); + show(actions); + show(confirmButton); + addClass([popup, actions], swalClasses.loading); + confirmButton.disabled = true; + cancelButton.disabled = true; + popup.setAttribute('data-loading', true); + popup.setAttribute('aria-busy', true); + popup.focus(); +}; + +/** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + */ + +var getTimerLeft = function getTimerLeft() { + return globalState.timeout && globalState.timeout.getTimerLeft(); +}; +/** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + +var stopTimer = function stopTimer() { + return globalState.timeout && globalState.timeout.stop(); +}; +/** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + +var resumeTimer = function resumeTimer() { + return globalState.timeout && globalState.timeout.start(); +}; +/** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + +var toggleTimer = function toggleTimer() { + var timer = globalState.timeout; + return timer && (timer.running ? timer.stop() : timer.start()); +}; +/** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + */ + +var increaseTimer = function increaseTimer(n) { + return globalState.timeout && globalState.timeout.increase(n); +}; +/** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + */ + +var isTimerRunning = function isTimerRunning() { + return globalState.timeout && globalState.timeout.isRunning(); +}; + + + +var staticMethods = Object.freeze({ + isValidParameter: isValidParameter, + isDeprecatedParameter: isDeprecatedParameter, + argsToParams: argsToParams, + adaptInputValidator: adaptInputValidator, + close: close, + closePopup: close, + closeModal: close, + closeToast: close, + isVisible: isVisible$1, + clickConfirm: clickConfirm, + clickCancel: clickCancel, + getContainer: getContainer, + getPopup: getPopup, + getTitle: getTitle, + getContent: getContent, + getImage: getImage, + getIcons: getIcons, + getCloseButton: getCloseButton, + getButtonsWrapper: getButtonsWrapper, + getActions: getActions, + getConfirmButton: getConfirmButton, + getCancelButton: getCancelButton, + getFooter: getFooter, + getFocusableElements: getFocusableElements, + getValidationMessage: getValidationMessage, + isLoading: isLoading, + fire: fire, + mixin: mixin, + queue: queue, + getQueueStep: getQueueStep, + insertQueueStep: insertQueueStep, + deleteQueueStep: deleteQueueStep, + showLoading: showLoading, + enableLoading: showLoading, + getTimerLeft: getTimerLeft, + stopTimer: stopTimer, + resumeTimer: resumeTimer, + toggleTimer: toggleTimer, + increaseTimer: increaseTimer, + isTimerRunning: isTimerRunning +}); + +// https://github.com/Riim/symbol-polyfill/blob/master/index.js + +/* istanbul ignore next */ +var _Symbol = typeof Symbol === 'function' ? Symbol : function () { + var idCounter = 0; + + function _Symbol(key) { + return '__' + key + '_' + Math.floor(Math.random() * 1e9) + '_' + ++idCounter + '__'; + } + + _Symbol.iterator = _Symbol('Symbol.iterator'); + return _Symbol; +}(); + +// WeakMap polyfill, needed for Android 4.4 +// Related issue: https://github.com/sweetalert2/sweetalert2/issues/1071 +// http://webreflection.blogspot.fi/2015/04/a-weakmap-polyfill-in-20-lines-of-code.html +/* istanbul ignore next */ + +var WeakMap$1 = typeof WeakMap === 'function' ? WeakMap : function (s, dP, hOP) { + function WeakMap() { + dP(this, s, { + value: _Symbol('WeakMap') + }); + } + + WeakMap.prototype = { + 'delete': function del(o) { + delete o[this[s]]; + }, + get: function get(o) { + return o[this[s]]; + }, + has: function has(o) { + return hOP.call(o, this[s]); + }, + set: function set(o, v) { + dP(o, this[s], { + configurable: true, + value: v + }); + } + }; + return WeakMap; +}(_Symbol('WeakMap'), Object.defineProperty, {}.hasOwnProperty); + +/** + * This module containts `WeakMap`s for each effectively-"private property" that a `swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ +var privateProps = { + promise: new WeakMap$1(), + innerParams: new WeakMap$1(), + domCache: new WeakMap$1() +}; + +/** + * Enables buttons and hide loader. + */ + +function hideLoading() { + var innerParams = privateProps.innerParams.get(this); + var domCache = privateProps.domCache.get(this); + + if (!innerParams.showConfirmButton) { + hide(domCache.confirmButton); + + if (!innerParams.showCancelButton) { + hide(domCache.actions); + } + } + + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.cancelButton.disabled = false; +} + +function getInput(inputType) { + var innerParams = privateProps.innerParams.get(this); + var domCache = privateProps.domCache.get(this); + inputType = inputType || innerParams.input; + + if (!inputType) { + return null; + } + + switch (inputType) { + case 'select': + case 'textarea': + case 'file': + return getChildByClass(domCache.content, swalClasses[inputType]); + + case 'checkbox': + return domCache.popup.querySelector(".".concat(swalClasses.checkbox, " input")); + + case 'radio': + return domCache.popup.querySelector(".".concat(swalClasses.radio, " input:checked")) || domCache.popup.querySelector(".".concat(swalClasses.radio, " input:first-child")); + + case 'range': + return domCache.popup.querySelector(".".concat(swalClasses.range, " input")); + + default: + return getChildByClass(domCache.content, swalClasses.input); + } +} + +function enableButtons() { + var domCache = privateProps.domCache.get(this); + domCache.confirmButton.disabled = false; + domCache.cancelButton.disabled = false; +} +function disableButtons() { + var domCache = privateProps.domCache.get(this); + domCache.confirmButton.disabled = true; + domCache.cancelButton.disabled = true; +} +function enableConfirmButton() { + var domCache = privateProps.domCache.get(this); + domCache.confirmButton.disabled = false; +} +function disableConfirmButton() { + var domCache = privateProps.domCache.get(this); + domCache.confirmButton.disabled = true; +} +function enableInput() { + var input = this.getInput(); + + if (!input) { + return false; + } + + if (input.type === 'radio') { + var radiosContainer = input.parentNode.parentNode; + var radios = radiosContainer.querySelectorAll('input'); + + for (var i = 0; i < radios.length; i++) { + radios[i].disabled = false; + } + } else { + input.disabled = false; + } +} +function disableInput() { + var input = this.getInput(); + + if (!input) { + return false; + } + + if (input && input.type === 'radio') { + var radiosContainer = input.parentNode.parentNode; + var radios = radiosContainer.querySelectorAll('input'); + + for (var i = 0; i < radios.length; i++) { + radios[i].disabled = true; + } + } else { + input.disabled = true; + } +} + +function showValidationMessage(error$$1) { + var domCache = privateProps.domCache.get(this); + domCache.validationMessage.innerHTML = error$$1; + var popupComputedStyle = window.getComputedStyle(domCache.popup); + domCache.validationMessage.style.marginLeft = "-".concat(popupComputedStyle.getPropertyValue('padding-left')); + domCache.validationMessage.style.marginRight = "-".concat(popupComputedStyle.getPropertyValue('padding-right')); + show(domCache.validationMessage); + var input = this.getInput(); + + if (input) { + input.setAttribute('aria-invalid', true); + input.setAttribute('aria-describedBy', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } +} // Hide block with validation message + +function resetValidationMessage() { + var domCache = privateProps.domCache.get(this); + + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + + var input = this.getInput(); + + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedBy'); + removeClass(input, swalClasses.inputerror); + } +} // @deprecated + +/* istanbul ignore next */ + +function resetValidationError() { + warnOnce("Swal.resetValidationError() is deprecated and will be removed in the next major release, use Swal.resetValidationMessage() instead"); + resetValidationMessage.bind(this)(); +} // @deprecated + +/* istanbul ignore next */ + +function showValidationError(error$$1) { + warnOnce("Swal.showValidationError() is deprecated and will be removed in the next major release, use Swal.showValidationMessage() instead"); + showValidationMessage.bind(this)(error$$1); +} + +function getProgressSteps$1() { + var innerParams = privateProps.innerParams.get(this); + return innerParams.progressSteps; +} +function setProgressSteps(progressSteps) { + var innerParams = privateProps.innerParams.get(this); + + var updatedParams = _extends({}, innerParams, { + progressSteps: progressSteps + }); + + privateProps.innerParams.set(this, updatedParams); + renderProgressSteps(updatedParams); +} +function showProgressSteps() { + var domCache = privateProps.domCache.get(this); + show(domCache.progressSteps); +} +function hideProgressSteps() { + var domCache = privateProps.domCache.get(this); + hide(domCache.progressSteps); +} + +var Timer = function Timer(callback, delay) { + _classCallCheck(this, Timer); + + var id, + started, + remaining = delay; + this.running = false; + + this.start = function () { + if (!this.running) { + this.running = true; + started = new Date(); + id = setTimeout(callback, remaining); + } + + return remaining; + }; + + this.stop = function () { + if (this.running) { + this.running = false; + clearTimeout(id); + remaining -= new Date() - started; + } + + return remaining; + }; + + this.increase = function (n) { + var running = this.running; + + if (running) { + this.stop(); + } + + remaining += n; + + if (running) { + this.start(); + } + + return remaining; + }; + + this.getTimerLeft = function () { + if (this.running) { + this.stop(); + this.start(); + } + + return remaining; + }; + + this.isRunning = function () { + return this.running; + }; + + this.start(); +}; + +var defaultInputValidators = { + email: function email(string, extraParams) { + return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.reject(extraParams && extraParams.validationMessage ? extraParams.validationMessage : 'Invalid email address'); + }, + url: function url(string, extraParams) { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)$/.test(string) ? Promise.resolve() : Promise.reject(extraParams && extraParams.validationMessage ? extraParams.validationMessage : 'Invalid URL'); + } +}; + +/** + * Set type, text and actions on popup + * + * @param params + * @returns {boolean} + */ + +function setParameters(params) { + // Use default `inputValidator` for supported input types if not provided + if (!params.inputValidator) { + Object.keys(defaultInputValidators).forEach(function (key) { + if (params.input === key) { + params.inputValidator = params.expectRejections ? defaultInputValidators[key] : Swal.adaptInputValidator(defaultInputValidators[key]); + } + }); + } // params.extraParams is @deprecated + + + if (params.validationMessage) { + if (_typeof(params.extraParams) !== 'object') { + params.extraParams = {}; + } + + params.extraParams.validationMessage = params.validationMessage; + } // Determine if the custom target element is valid + + + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } // Animation + + + if (typeof params.animation === 'function') { + params.animation = params.animation.call(); + } + + var popup; + var oldPopup = getPopup(); + var targetElement = typeof params.target === 'string' ? document.querySelector(params.target) : params.target; // If the model target has changed, refresh the popup + + if (oldPopup && targetElement && oldPopup.parentNode !== targetElement.parentNode) { + popup = init(params); + } else { + popup = oldPopup || init(params); + } // Set popup width + + + if (params.width) { + popup.style.width = typeof params.width === 'number' ? params.width + 'px' : params.width; + } // Set popup padding + + + if (params.padding) { + popup.style.padding = typeof params.padding === 'number' ? params.padding + 'px' : params.padding; + } // Set popup background + + + if (params.background) { + popup.style.background = params.background; + } + + var popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + var successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + + for (var i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } + + var container = getContainer(); + var closeButton = getCloseButton(); + var footer = getFooter(); // Title + + renderTitle(params); // Content + + renderContent(params); // Backdrop + + if (typeof params.backdrop === 'string') { + getContainer().style.background = params.backdrop; + } else if (!params.backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } + + if (!params.backdrop && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } // Position + + + if (params.position in swalClasses) { + addClass(container, swalClasses[params.position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } // Grow + + + if (params.grow && typeof params.grow === 'string') { + var growClass = 'grow-' + params.grow; + + if (growClass in swalClasses) { + addClass(container, swalClasses[growClass]); + } + } // Close button + + + if (params.showCloseButton) { + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + show(closeButton); + } else { + hide(closeButton); + } // Default Class + + + popup.className = swalClasses.popup; + + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } // Custom Class + + + if (params.customClass) { + addClass(popup, params.customClass); + } + + if (params.customContainerClass) { + addClass(container, params.customContainerClass); + } // Progress steps + + + renderProgressSteps(params); // Icon + + renderIcon(params); // Image + + renderImage(params); // Actions (buttons) + + renderActions(params); // Footer + + parseHtmlToContainer(params.footer, footer); // CSS animation + + if (params.animation === true) { + removeClass(popup, swalClasses.noanimation); + } else { + addClass(popup, swalClasses.noanimation); + } // showLoaderOnConfirm && preConfirm + + + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } +} + +/** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param {Array} params + */ + +var openPopup = function openPopup(params) { + var container = getContainer(); + var popup = getPopup(); + + if (params.onBeforeOpen !== null && typeof params.onBeforeOpen === 'function') { + params.onBeforeOpen(popup); + } + + if (params.animation) { + addClass(popup, swalClasses.show); + addClass(container, swalClasses.fade); + removeClass(popup, swalClasses.hide); + } else { + removeClass(popup, swalClasses.fade); + } + + show(popup); // scrolling is 'hidden' until animation is done, after that 'auto' + + container.style.overflowY = 'hidden'; + + if (animationEndEvent && !hasClass(popup, swalClasses.noanimation)) { + popup.addEventListener(animationEndEvent, function swalCloseEventFinished() { + popup.removeEventListener(animationEndEvent, swalCloseEventFinished); + container.style.overflowY = 'auto'; + }); + } else { + container.style.overflowY = 'auto'; + } + + addClass([document.documentElement, document.body, container], swalClasses.shown); + + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } + + if (isModal()) { + fixScrollbar(); + iOSfix(); + IEfix(); + setAriaHidden(); // sweetalert2/issues/1247 + + setTimeout(function () { + container.scrollTop = 0; + }); + } + + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + + if (params.onOpen !== null && typeof params.onOpen === 'function') { + setTimeout(function () { + params.onOpen(popup); + }); + } +}; + +function _main(userParams) { + var _this = this; + + showWarningsForParams(userParams); + + var innerParams = _extends({}, defaultParams, userParams); + + setParameters(innerParams); + Object.freeze(innerParams); + privateProps.innerParams.set(this, innerParams); // clear the previous timer + + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } // clear the restore focus timeout + + + clearTimeout(globalState.restoreFocusTimeout); + var domCache = { + popup: getPopup(), + container: getContainer(), + content: getContent(), + actions: getActions(), + confirmButton: getConfirmButton(), + cancelButton: getCancelButton(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(this, domCache); + var constructor = this.constructor; + return new Promise(function (resolve, reject) { + // functions to handle all resolving/rejecting/settling + var succeedWith = function succeedWith(value) { + constructor.closePopup(innerParams.onClose, innerParams.onAfterClose); // TODO: make closePopup an *instance* method + + if (innerParams.useRejections) { + resolve(value); + } else { + resolve({ + value: value + }); + } + }; + + var dismissWith = function dismissWith(dismiss) { + constructor.closePopup(innerParams.onClose, innerParams.onAfterClose); + + if (innerParams.useRejections) { + reject(dismiss); + } else { + resolve({ + dismiss: dismiss + }); + } + }; + + var errorWith = function errorWith(error$$1) { + constructor.closePopup(innerParams.onClose, innerParams.onAfterClose); + reject(error$$1); + }; // Close on timer + + + if (innerParams.timer) { + globalState.timeout = new Timer(function () { + dismissWith('timer'); + delete globalState.timeout; + }, innerParams.timer); + } // Get the value of the popup input + + + var getInputValue = function getInputValue() { + var input = _this.getInput(); + + if (!input) { + return null; + } + + switch (innerParams.input) { + case 'checkbox': + return input.checked ? 1 : 0; + + case 'radio': + return input.checked ? input.value : null; + + case 'file': + return input.files.length ? input.files[0] : null; + + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } + }; // input autofocus + + + if (innerParams.input) { + setTimeout(function () { + var input = _this.getInput(); + + if (input) { + focusInput(input); + } + }, 0); + } + + var confirm = function confirm(value) { + if (innerParams.showLoaderOnConfirm) { + constructor.showLoading(); // TODO: make showLoading an *instance* method + } + + if (innerParams.preConfirm) { + _this.resetValidationMessage(); + + var preConfirmPromise = Promise.resolve().then(function () { + return innerParams.preConfirm(value, innerParams.extraParams); + }); + + if (innerParams.expectRejections) { + preConfirmPromise.then(function (preConfirmValue) { + return succeedWith(preConfirmValue || value); + }, function (validationMessage) { + _this.hideLoading(); + + if (validationMessage) { + _this.showValidationMessage(validationMessage); + } + }); + } else { + preConfirmPromise.then(function (preConfirmValue) { + if (isVisible(domCache.validationMessage) || preConfirmValue === false) { + _this.hideLoading(); + } else { + succeedWith(preConfirmValue || value); + } + }, function (error$$1) { + return errorWith(error$$1); + }); + } + } else { + succeedWith(value); + } + }; // Mouse interactions + + + var onButtonEvent = function onButtonEvent(e) { + var target = e.target; + var confirmButton = domCache.confirmButton, + cancelButton = domCache.cancelButton; + var targetedConfirm = confirmButton && (confirmButton === target || confirmButton.contains(target)); + var targetedCancel = cancelButton && (cancelButton === target || cancelButton.contains(target)); + + switch (e.type) { + case 'click': + // Clicked 'confirm' + if (targetedConfirm && constructor.isVisible()) { + _this.disableButtons(); + + if (innerParams.input) { + var inputValue = getInputValue(); + + if (innerParams.inputValidator) { + _this.disableInput(); + + var validationPromise = Promise.resolve().then(function () { + return innerParams.inputValidator(inputValue, innerParams.extraParams); + }); + + if (innerParams.expectRejections) { + validationPromise.then(function () { + _this.enableButtons(); + + _this.enableInput(); + + confirm(inputValue); + }, function (validationMessage) { + _this.enableButtons(); + + _this.enableInput(); + + if (validationMessage) { + _this.showValidationMessage(validationMessage); + } + }); + } else { + validationPromise.then(function (validationMessage) { + _this.enableButtons(); + + _this.enableInput(); + + if (validationMessage) { + _this.showValidationMessage(validationMessage); + } else { + confirm(inputValue); + } + }, function (error$$1) { + return errorWith(error$$1); + }); + } + } else if (!_this.getInput().checkValidity()) { + _this.enableButtons(); + + _this.showValidationMessage(innerParams.validationMessage); + } else { + confirm(inputValue); + } + } else { + confirm(true); + } // Clicked 'cancel' + + } else if (targetedCancel && constructor.isVisible()) { + _this.disableButtons(); + + dismissWith(constructor.DismissReason.cancel); + } + + break; + + default: + } + }; + + var buttons = domCache.popup.querySelectorAll('button'); + + for (var i = 0; i < buttons.length; i++) { + buttons[i].onclick = onButtonEvent; + buttons[i].onmouseover = onButtonEvent; + buttons[i].onmouseout = onButtonEvent; + buttons[i].onmousedown = onButtonEvent; + } // Closing popup by close button + + + domCache.closeButton.onclick = function () { + dismissWith(constructor.DismissReason.close); + }; + + if (innerParams.toast) { + // Closing popup by internal click + domCache.popup.onclick = function () { + if (innerParams.showConfirmButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.input) { + return; + } + + dismissWith(constructor.DismissReason.close); + }; + } else { + var ignoreOutsideClick = false; // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + + domCache.popup.onmousedown = function () { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; // Ignore click events that had mousedown on the container but mouseup on the popup + + + domCache.container.onmousedown = function () { + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup + + if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; + + domCache.container.onclick = function (e) { + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + + if (e.target !== domCache.container) { + return; + } + + if (callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(constructor.DismissReason.backdrop); + } + }; + } // Reverse buttons (Confirm on the right side) + + + if (innerParams.reverseButtons) { + domCache.confirmButton.parentNode.insertBefore(domCache.cancelButton, domCache.confirmButton); + } else { + domCache.confirmButton.parentNode.insertBefore(domCache.confirmButton, domCache.cancelButton); + } // Focus handling + + + var setFocus = function setFocus(index, increment) { + var focusableElements = getFocusableElements(innerParams.focusCancel); // search for visible elements and select the next possible match + + for (var _i = 0; _i < focusableElements.length; _i++) { + index = index + increment; // rollover to first item + + if (index === focusableElements.length) { + index = 0; // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + + return focusableElements[index].focus(); + } // no visible focusable elements, focus the popup + + + domCache.popup.focus(); + }; + + var keydownHandler = function keydownHandler(e, innerParams) { + if (innerParams.stopKeydownPropagation) { + e.stopPropagation(); + } + + var arrowKeys = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Left', 'Right', 'Up', 'Down' // IE11 + ]; + + if (e.key === 'Enter' && !e.isComposing) { + if (e.target && _this.getInput() && e.target.outerHTML === _this.getInput().outerHTML) { + if (['textarea', 'file'].indexOf(innerParams.input) !== -1) { + return; // do not submit + } + + constructor.clickConfirm(); + e.preventDefault(); + } // TAB + + } else if (e.key === 'Tab') { + var targetElement = e.target; + var focusableElements = getFocusableElements(innerParams.focusCancel); + var btnIndex = -1; + + for (var _i2 = 0; _i2 < focusableElements.length; _i2++) { + if (targetElement === focusableElements[_i2]) { + btnIndex = _i2; + break; + } + } + + if (!e.shiftKey) { + // Cycle to the next button + setFocus(btnIndex, 1); + } else { + // Cycle to the prev button + setFocus(btnIndex, -1); + } + + e.stopPropagation(); + e.preventDefault(); // ARROWS - switch focus between buttons + } else if (arrowKeys.indexOf(e.key) !== -1) { + // focus Cancel button if Confirm button is currently focused + if (document.activeElement === domCache.confirmButton && isVisible(domCache.cancelButton)) { + domCache.cancelButton.focus(); // and vice versa + } else if (document.activeElement === domCache.cancelButton && isVisible(domCache.confirmButton)) { + domCache.confirmButton.focus(); + } // ESC + + } else if ((e.key === 'Escape' || e.key === 'Esc') && callIfFunction(innerParams.allowEscapeKey) === true) { + e.preventDefault(); + dismissWith(constructor.DismissReason.esc); + } + }; + + if (globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + if (!innerParams.toast) { + globalState.keydownHandler = function (e) { + return keydownHandler(e, innerParams); + }; + + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : domCache.popup; + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } + + _this.enableButtons(); + + _this.hideLoading(); + + _this.resetValidationMessage(); + + if (innerParams.toast && (innerParams.input || innerParams.footer || innerParams.showCloseButton)) { + addClass(document.body, swalClasses['toast-column']); + } else { + removeClass(document.body, swalClasses['toast-column']); + } // inputs + + + var inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + + var setInputPlaceholder = function setInputPlaceholder(input) { + if (!input.placeholder || innerParams.inputPlaceholder) { + input.placeholder = innerParams.inputPlaceholder; + } + }; + + var input; + + for (var _i3 = 0; _i3 < inputTypes.length; _i3++) { + var inputClass = swalClasses[inputTypes[_i3]]; + var inputContainer = getChildByClass(domCache.content, inputClass); + input = _this.getInput(inputTypes[_i3]); // set attributes + + if (input) { + for (var j in input.attributes) { + if (input.attributes.hasOwnProperty(j)) { + var attrName = input.attributes[j].name; + + if (attrName !== 'type' && attrName !== 'value') { + input.removeAttribute(attrName); + } + } + } + + for (var attr in innerParams.inputAttributes) { + // Do not set a placeholder for + // it'll crash Edge, #1298 + if (inputTypes[_i3] === 'range' && attr === 'placeholder') { + continue; + } + + input.setAttribute(attr, innerParams.inputAttributes[attr]); + } + } // set class + + + inputContainer.className = inputClass; + + if (innerParams.inputClass) { + addClass(inputContainer, innerParams.inputClass); + } + + hide(inputContainer); + } + + var populateInputOptions; + + switch (innerParams.input) { + case 'text': + case 'email': + case 'password': + case 'number': + case 'tel': + case 'url': + { + input = getChildByClass(domCache.content, swalClasses.input); + + if (typeof innerParams.inputValue === 'string' || typeof innerParams.inputValue === 'number') { + input.value = innerParams.inputValue; + } else if (!isPromise(innerParams.inputValue)) { + warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(_typeof(innerParams.inputValue), "\"")); + } + + setInputPlaceholder(input); + input.type = innerParams.input; + show(input); + break; + } + + case 'file': + { + input = getChildByClass(domCache.content, swalClasses.file); + setInputPlaceholder(input); + input.type = innerParams.input; + show(input); + break; + } + + case 'range': + { + var range = getChildByClass(domCache.content, swalClasses.range); + var rangeInput = range.querySelector('input'); + var rangeOutput = range.querySelector('output'); + rangeInput.value = innerParams.inputValue; + rangeInput.type = innerParams.input; + rangeOutput.value = innerParams.inputValue; + show(range); + break; + } + + case 'select': + { + var select = getChildByClass(domCache.content, swalClasses.select); + select.innerHTML = ''; + + if (innerParams.inputPlaceholder) { + var placeholder = document.createElement('option'); + placeholder.innerHTML = innerParams.inputPlaceholder; + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + + populateInputOptions = function populateInputOptions(inputOptions) { + inputOptions.forEach(function (inputOption) { + var optionValue = inputOption[0]; + var optionLabel = inputOption[1]; + var option = document.createElement('option'); + option.value = optionValue; + option.innerHTML = optionLabel; + + if (innerParams.inputValue.toString() === optionValue.toString()) { + option.selected = true; + } + + select.appendChild(option); + }); + show(select); + select.focus(); + }; + + break; + } + + case 'radio': + { + var radio = getChildByClass(domCache.content, swalClasses.radio); + radio.innerHTML = ''; + + populateInputOptions = function populateInputOptions(inputOptions) { + inputOptions.forEach(function (inputOption) { + var radioValue = inputOption[0]; + var radioLabel = inputOption[1]; + var radioInput = document.createElement('input'); + var radioLabelElement = document.createElement('label'); + radioInput.type = 'radio'; + radioInput.name = swalClasses.radio; + radioInput.value = radioValue; + + if (innerParams.inputValue.toString() === radioValue.toString()) { + radioInput.checked = true; + } + + var label = document.createElement('span'); + label.innerHTML = radioLabel; + label.className = swalClasses.label; + radioLabelElement.appendChild(radioInput); + radioLabelElement.appendChild(label); + radio.appendChild(radioLabelElement); + }); + show(radio); + var radios = radio.querySelectorAll('input'); + + if (radios.length) { + radios[0].focus(); + } + }; + + break; + } + + case 'checkbox': + { + var checkbox = getChildByClass(domCache.content, swalClasses.checkbox); + + var checkboxInput = _this.getInput('checkbox'); + + checkboxInput.type = 'checkbox'; + checkboxInput.value = 1; + checkboxInput.id = swalClasses.checkbox; + checkboxInput.checked = Boolean(innerParams.inputValue); + var label = checkbox.querySelector('span'); + label.innerHTML = innerParams.inputPlaceholder; + show(checkbox); + break; + } + + case 'textarea': + { + var textarea = getChildByClass(domCache.content, swalClasses.textarea); + textarea.value = innerParams.inputValue; + setInputPlaceholder(textarea); + show(textarea); + break; + } + + case null: + { + break; + } + + default: + error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(innerParams.input, "\"")); + break; + } + + if (innerParams.input === 'select' || innerParams.input === 'radio') { + var processInputOptions = function processInputOptions(inputOptions) { + return populateInputOptions(formatInputOptions(inputOptions)); + }; + + if (isPromise(innerParams.inputOptions)) { + constructor.showLoading(); + innerParams.inputOptions.then(function (inputOptions) { + _this.hideLoading(); + + processInputOptions(inputOptions); + }); + } else if (_typeof(innerParams.inputOptions) === 'object') { + processInputOptions(innerParams.inputOptions); + } else { + error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(_typeof(innerParams.inputOptions))); + } + } else if (['text', 'email', 'number', 'tel', 'textarea'].indexOf(innerParams.input) !== -1 && isPromise(innerParams.inputValue)) { + constructor.showLoading(); + hide(input); + innerParams.inputValue.then(function (inputValue) { + input.value = innerParams.input === 'number' ? parseFloat(inputValue) || 0 : inputValue + ''; + show(input); + input.focus(); + + _this.hideLoading(); + }).catch(function (err) { + error('Error in inputValue promise: ' + err); + input.value = ''; + show(input); + input.focus(); + + _this.hideLoading(); + }); + } + + openPopup(innerParams); + + if (!innerParams.toast) { + if (!callIfFunction(innerParams.allowEnterKey)) { + if (document.activeElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } + } else if (innerParams.focusCancel && isVisible(domCache.cancelButton)) { + domCache.cancelButton.focus(); + } else if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) { + domCache.confirmButton.focus(); + } else { + setFocus(-1, 1); + } + } // fix scroll + + + domCache.container.scrollTop = 0; + }); +} + + + +var instanceMethods = Object.freeze({ + hideLoading: hideLoading, + disableLoading: hideLoading, + getInput: getInput, + enableButtons: enableButtons, + disableButtons: disableButtons, + enableConfirmButton: enableConfirmButton, + disableConfirmButton: disableConfirmButton, + enableInput: enableInput, + disableInput: disableInput, + showValidationMessage: showValidationMessage, + resetValidationMessage: resetValidationMessage, + resetValidationError: resetValidationError, + showValidationError: showValidationError, + getProgressSteps: getProgressSteps$1, + setProgressSteps: setProgressSteps, + showProgressSteps: showProgressSteps, + hideProgressSteps: hideProgressSteps, + _main: _main +}); + +var currentInstance; // SweetAlert constructor + +function SweetAlert() { + // Prevent run in Node env + + /* istanbul ignore if */ + if (typeof window === 'undefined') { + return; + } // Check for the existence of Promise + + /* istanbul ignore if */ + + + if (typeof Promise === 'undefined') { + error('This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)'); + } + + currentInstance = this; + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var outerParams = Object.freeze(this.constructor.argsToParams(args)); + Object.defineProperties(this, { + params: { + value: outerParams, + writable: false, + enumerable: true + } + }); + + var promise = this._main(this.params); + + privateProps.promise.set(this, promise); +} // `catch` cannot be the name of a module export, so we define our thenable methods here instead + + +SweetAlert.prototype.then = function (onFulfilled, onRejected) { + var promise = privateProps.promise.get(this); + return promise.then(onFulfilled, onRejected); +}; + +SweetAlert.prototype.catch = function (onRejected) { + var promise = privateProps.promise.get(this); + return promise.catch(onRejected); +}; + +SweetAlert.prototype.finally = function (onFinally) { + var promise = privateProps.promise.get(this); + return promise.finally(onFinally); +}; // Assign instance methods from src/instanceMethods/*.js to prototype + + +_extends(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor + + +_extends(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility + + +Object.keys(instanceMethods).forEach(function (key) { + SweetAlert[key] = function () { + if (currentInstance) { + var _currentInstance; + + return (_currentInstance = currentInstance)[key].apply(_currentInstance, arguments); + } + }; +}); +SweetAlert.DismissReason = DismissReason; +/* istanbul ignore next */ + +SweetAlert.noop = function () {}; + +var Swal = withNoNewKeyword(withGlobalDefaults(SweetAlert)); +Swal.default = Swal; + +return Swal; + +}))); +if (typeof window !== 'undefined' && window.Sweetalert2){ window.Sweetalert2.version = '7.33.1'; window.swal = window.sweetAlert = window.Swal = window.SweetAlert = window.Sweetalert2} diff --git a/Bootstrap.Admin/wwwroot/lib/sweetalert/sweetalert2.min.css b/Bootstrap.Admin/wwwroot/lib/sweetalert/sweetalert2.min.css new file mode 100644 index 00000000..2efe5028 --- /dev/null +++ b/Bootstrap.Admin/wwwroot/lib/sweetalert/sweetalert2.min.css @@ -0,0 +1 @@ +@-webkit-keyframes swal2-show{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes swal2-show{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.875em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.875em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}100%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}100%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}50%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}80%{margin-top:-.375em;-webkit-transform:scale(1.15);transform:scale(1.15)}100%{margin-top:0;-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}50%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}80%{margin-top:-.375em;-webkit-transform:scale(1.15);transform:scale(1.15)}100%{margin-top:0;-webkit-transform:scale(1);transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}body.swal2-toast-shown .swal2-container{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-shown{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}body.swal2-toast-column .swal2-toast{flex-direction:column;align-items:stretch}body.swal2-toast-column .swal2-toast .swal2-actions{flex:1;align-self:stretch;height:2.2em;margin-top:.3125em}body.swal2-toast-column .swal2-toast .swal2-loading{justify-content:center}body.swal2-toast-column .swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}body.swal2-toast-column .swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast{flex-direction:row;align-items:center;width:auto;padding:.625em;box-shadow:0 0 .625em #d9d9d9;overflow-y:hidden}.swal2-popup.swal2-toast .swal2-header{flex-direction:row}.swal2-popup.swal2-toast .swal2-title{flex-grow:1;justify-content:flex-start;margin:0 .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{position:initial;width:.8em;height:.8em;line-height:.8}.swal2-popup.swal2-toast .swal2-content{justify-content:flex-start;font-size:1em}.swal2-popup.swal2-toast .swal2-icon{width:2em;min-width:2em;height:2em;margin:0}.swal2-popup.swal2-toast .swal2-icon-text{font-size:2em;font-weight:700;line-height:1em}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{height:auto;margin:0 .3125em}.swal2-popup.swal2-toast .swal2-styled{margin:0 .3125em;padding:.3125em .625em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 .0625em #fff,0 0 0 .125em rgba(50,100,150,.4)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:2em;height:2.8125em;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.25em;left:-.9375em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:2em 2em;transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;-webkit-transform-origin:0 2em;transform-origin:0 2em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:showSweetToast .5s;animation:showSweetToast .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:hideSweetToast .2s forwards;animation:hideSweetToast .2s forwards}.swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-tip{-webkit-animation:animate-toast-success-tip .75s;animation:animate-toast-success-tip .75s}.swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-long{-webkit-animation:animate-toast-success-long .75s;animation:animate-toast-success-long .75s}@-webkit-keyframes showSweetToast{0%{-webkit-transform:translateY(-.625em) rotateZ(2deg);transform:translateY(-.625em) rotateZ(2deg);opacity:0}33%{-webkit-transform:translateY(0) rotateZ(-2deg);transform:translateY(0) rotateZ(-2deg);opacity:.5}66%{-webkit-transform:translateY(.3125em) rotateZ(2deg);transform:translateY(.3125em) rotateZ(2deg);opacity:.7}100%{-webkit-transform:translateY(0) rotateZ(0);transform:translateY(0) rotateZ(0);opacity:1}}@keyframes showSweetToast{0%{-webkit-transform:translateY(-.625em) rotateZ(2deg);transform:translateY(-.625em) rotateZ(2deg);opacity:0}33%{-webkit-transform:translateY(0) rotateZ(-2deg);transform:translateY(0) rotateZ(-2deg);opacity:.5}66%{-webkit-transform:translateY(.3125em) rotateZ(2deg);transform:translateY(.3125em) rotateZ(2deg);opacity:.7}100%{-webkit-transform:translateY(0) rotateZ(0);transform:translateY(0) rotateZ(0);opacity:1}}@-webkit-keyframes hideSweetToast{0%{opacity:1}33%{opacity:.5}100%{-webkit-transform:rotateZ(1deg);transform:rotateZ(1deg);opacity:0}}@keyframes hideSweetToast{0%{opacity:1}33%{opacity:.5}100%{-webkit-transform:rotateZ(1deg);transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes animate-toast-success-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes animate-toast-success-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes animate-toast-success-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes animate-toast-success-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-shown{top:auto;right:auto;bottom:auto;left:auto;background-color:transparent}body.swal2-no-backdrop .swal2-shown>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-shown.swal2-top{top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-top-left,body.swal2-no-backdrop .swal2-shown.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-shown.swal2-top-end,body.swal2-no-backdrop .swal2-shown.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-shown.swal2-center{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-shown.swal2-center-left,body.swal2-no-backdrop .swal2-shown.swal2-center-start{top:50%;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-center-end,body.swal2-no-backdrop .swal2-shown.swal2-center-right{top:50%;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-bottom{bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-no-backdrop .swal2-shown.swal2-bottom-left,body.swal2-no-backdrop .swal2-shown.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-shown.swal2-bottom-end,body.swal2-no-backdrop .swal2-shown.swal2-bottom-right{right:0;bottom:0}.swal2-container{display:flex;position:fixed;top:0;right:0;bottom:0;left:0;flex-direction:row;align-items:center;justify-content:center;padding:10px;background-color:transparent;z-index:1060;overflow-x:hidden;-webkit-overflow-scrolling:touch}.swal2-container.swal2-top{align-items:flex-start}.swal2-container.swal2-top-left,.swal2-container.swal2-top-start{align-items:flex-start;justify-content:flex-start}.swal2-container.swal2-top-end,.swal2-container.swal2-top-right{align-items:flex-start;justify-content:flex-end}.swal2-container.swal2-center{align-items:center}.swal2-container.swal2-center-left,.swal2-container.swal2-center-start{align-items:center;justify-content:flex-start}.swal2-container.swal2-center-end,.swal2-container.swal2-center-right{align-items:center;justify-content:flex-end}.swal2-container.swal2-bottom{align-items:flex-end}.swal2-container.swal2-bottom-left,.swal2-container.swal2-bottom-start{align-items:flex-end;justify-content:flex-start}.swal2-container.swal2-bottom-end,.swal2-container.swal2-bottom-right{align-items:flex-end;justify-content:flex-end}.swal2-container.swal2-grow-fullscreen>.swal2-modal{display:flex!important;flex:1;align-self:stretch;justify-content:center}.swal2-container.swal2-grow-row>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-grow-column{flex:1;flex-direction:column}.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top{align-items:center}.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start{align-items:flex-start}.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right{align-items:flex-end}.swal2-container.swal2-grow-column>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen)>.swal2-modal{margin:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-container .swal2-modal{margin:0!important}}.swal2-container.swal2-fade{transition:background-color .1s}.swal2-container.swal2-shown{background-color:rgba(0,0,0,.4)}.swal2-popup{display:none;position:relative;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border-radius:.3125em;background:#fff;font-family:inherit;font-size:1rem;box-sizing:border-box}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-popup .swal2-header{display:flex;flex-direction:column;align-items:center}.swal2-popup .swal2-title{display:block;position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-popup .swal2-actions{flex-wrap:wrap;align-items:center;justify-content:center;margin:1.25em auto 0;z-index:1}.swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-popup .swal2-actions.swal2-loading .swal2-styled.swal2-confirm{width:2.5em;height:2.5em;margin:.46875em;padding:0;border:.25em solid transparent;border-radius:100%;border-color:transparent;background-color:transparent!important;color:transparent;cursor:default;box-sizing:border-box;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-popup .swal2-actions.swal2-loading .swal2-styled.swal2-cancel{margin-right:30px;margin-left:30px}.swal2-popup .swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after{display:inline-block;width:15px;height:15px;margin-left:5px;border:3px solid #999;border-radius:50%;border-right-color:transparent;box-shadow:1px 1px 1px #fff;content:'';-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal}.swal2-popup .swal2-styled{margin:.3125em;padding:.625em 2em;font-weight:500;box-shadow:none}.swal2-popup .swal2-styled:not([disabled]){cursor:pointer}.swal2-popup .swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#3085d6;color:#fff;font-size:1.0625em}.swal2-popup .swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#aaa;color:#fff;font-size:1.0625em}.swal2-popup .swal2-styled:focus{outline:0;box-shadow:0 0 0 2px #fff,0 0 0 4px rgba(50,100,150,.4)}.swal2-popup .swal2-styled::-moz-focus-inner{border:0}.swal2-popup .swal2-footer{justify-content:center;margin:1.25em 0 0;padding:1em 0 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-popup .swal2-image{max-width:100%;margin:1.25em auto}.swal2-popup .swal2-close{position:absolute;top:0;right:0;justify-content:center;width:1.2em;height:1.2em;padding:0;transition:color .1s ease-out;border:none;border-radius:0;outline:initial;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer;overflow:hidden}.swal2-popup .swal2-close:hover{-webkit-transform:none;transform:none;color:#f27474}.swal2-popup>.swal2-checkbox,.swal2-popup>.swal2-file,.swal2-popup>.swal2-input,.swal2-popup>.swal2-radio,.swal2-popup>.swal2-select,.swal2-popup>.swal2-textarea{display:none}.swal2-popup .swal2-content{justify-content:center;margin:0;padding:0;color:#545454;font-size:1.125em;font-weight:300;line-height:normal;z-index:1;word-wrap:break-word}.swal2-popup #swal2-content{text-align:center}.swal2-popup .swal2-checkbox,.swal2-popup .swal2-file,.swal2-popup .swal2-input,.swal2-popup .swal2-radio,.swal2-popup .swal2-select,.swal2-popup .swal2-textarea{margin:1em auto}.swal2-popup .swal2-file,.swal2-popup .swal2-input,.swal2-popup .swal2-textarea{width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;font-size:1.125em;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);box-sizing:border-box}.swal2-popup .swal2-file.swal2-inputerror,.swal2-popup .swal2-input.swal2-inputerror,.swal2-popup .swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-popup .swal2-file:focus,.swal2-popup .swal2-input:focus,.swal2-popup .swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 3px #c4e6f5}.swal2-popup .swal2-file::-webkit-input-placeholder,.swal2-popup .swal2-input::-webkit-input-placeholder,.swal2-popup .swal2-textarea::-webkit-input-placeholder{color:#ccc}.swal2-popup .swal2-file:-ms-input-placeholder,.swal2-popup .swal2-input:-ms-input-placeholder,.swal2-popup .swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-popup .swal2-file::-ms-input-placeholder,.swal2-popup .swal2-input::-ms-input-placeholder,.swal2-popup .swal2-textarea::-ms-input-placeholder{color:#ccc}.swal2-popup .swal2-file::placeholder,.swal2-popup .swal2-input::placeholder,.swal2-popup .swal2-textarea::placeholder{color:#ccc}.swal2-popup .swal2-range input{width:80%}.swal2-popup .swal2-range output{width:20%;font-weight:600;text-align:center}.swal2-popup .swal2-range input,.swal2-popup .swal2-range output{height:2.625em;margin:1em auto;padding:0;font-size:1.125em;line-height:2.625em}.swal2-popup .swal2-input{height:2.625em;padding:0 .75em}.swal2-popup .swal2-input[type=number]{max-width:10em}.swal2-popup .swal2-file{font-size:1.125em}.swal2-popup .swal2-textarea{height:6.75em;padding:.75em}.swal2-popup .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;color:#545454;font-size:1.125em}.swal2-popup .swal2-checkbox,.swal2-popup .swal2-radio{align-items:center;justify-content:center}.swal2-popup .swal2-checkbox label,.swal2-popup .swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-popup .swal2-checkbox input,.swal2-popup .swal2-radio input{margin:0 .4em}.swal2-popup .swal2-validation-message{display:none;align-items:center;justify-content:center;padding:.625em;background:#f0f0f0;color:#666;font-size:1em;font-weight:300;overflow:hidden}.swal2-popup .swal2-validation-message::before{display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center;content:'!';zoom:normal}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@-moz-document url-prefix(){.swal2-close:focus{outline:2px solid rgba(50,100,150,.4)}}.swal2-icon{position:relative;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;line-height:5em;cursor:default;box-sizing:content-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;zoom:normal}.swal2-icon-text{font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:3.75em 3.75em;transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 3.75em;transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;top:-.25em;left:-.25em;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%;z-index:2;box-sizing:content-box}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;top:.5em;left:1.625em;width:.4375em;height:5.625em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);z-index:1}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;height:.3125em;border-radius:.125em;background-color:#a5dc86;z-index:2}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.875em;width:1.5625em;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-progresssteps{align-items:center;margin:0 0 1.25em;padding:0;font-weight:600}.swal2-progresssteps li{display:inline-block;position:relative}.swal2-progresssteps .swal2-progresscircle{width:2em;height:2em;border-radius:2em;background:#3085d6;color:#fff;line-height:2em;text-align:center;z-index:20}.swal2-progresssteps .swal2-progresscircle:first-child{margin-left:0}.swal2-progresssteps .swal2-progresscircle:last-child{margin-right:0}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep{background:#3085d6}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep~.swal2-progresscircle{background:#add8e6}.swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep~.swal2-progressline{background:#add8e6}.swal2-progresssteps .swal2-progressline{width:2.5em;height:.4em;margin:0 -1px;background:#3085d6;z-index:10}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-show.swal2-noanimation{-webkit-animation:none;animation:none}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-hide.swal2-noanimation{-webkit-animation:none;animation:none}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-animate-success-icon .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-animate-success-icon .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-animate-success-icon .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-animate-error-icon{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-animate-error-icon .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}@-webkit-keyframes swal2-rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:initial!important}} \ No newline at end of file diff --git a/Bootstrap.Admin/wwwroot/lib/sweetalert/sweetalert2.min.js b/Bootstrap.Admin/wwwroot/lib/sweetalert/sweetalert2.min.js new file mode 100644 index 00000000..d0112efa --- /dev/null +++ b/Bootstrap.Admin/wwwroot/lib/sweetalert/sweetalert2.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Sweetalert2=t()}(this,function(){"use strict";function q(e){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n\n
    \n
      \n
      \n \n
      \n
      \n ?\n
      \n
      \n !\n
      \n
      \n i\n
      \n
      \n
      \n \n
      \n
      \n
      \n \n

      \n \n
      \n
      \n
      \n \n \n
      \n \n \n
      \n \n
      \n \n \n
      \n
      \n
      \n \n \n
      \n
      \n
      \n \n').replace(/(^|\n)\s*/g,""),X=function(e){var t=w();if(t&&(t.parentNode.removeChild(t),W([document.documentElement,document.body],[_["no-backdrop"],_["toast-shown"],_["has-column"]])),!j()){var n=document.createElement("div");n.className=_.container,n.innerHTML=V;var o="string"==typeof e.target?document.querySelector(e.target):e.target;o.appendChild(n);var i,r=k(),a=B(),s=U(a,_.input),c=U(a,_.file),u=a.querySelector(".".concat(_.range," input")),l=a.querySelector(".".concat(_.range," output")),d=U(a,_.select),p=a.querySelector(".".concat(_.checkbox," input")),f=U(a,_.textarea);r.setAttribute("role",e.toast?"alert":"dialog"),r.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||r.setAttribute("aria-modal","true"),"rtl"===window.getComputedStyle(o).direction&&z(w(),_.rtl);var m=function(e){De.isVisible()&&i!==e.target.value&&De.resetValidationMessage(),i=e.target.value};return s.oninput=m,c.onchange=m,d.onchange=m,p.onchange=m,f.oninput=m,u.oninput=function(e){m(e),l.value=u.value},u.onchange=function(e){m(e),u.nextSibling.value=u.value},r}I("SweetAlert2 requires document to initialize")},G=function(e,t){if(!e)return F(t);if(e instanceof HTMLElement)t.appendChild(e);else if("object"===q(e))if(t.innerHTML="",0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0));else e&&(t.innerHTML=e);K(t)},ee=function(){if(j())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var n in t)if(t.hasOwnProperty(n)&&void 0!==e.style[n])return t[n];return!1}(),te=function(e){var t=Q(),n=L(),o=O();if(e.showConfirmButton||e.showCancelButton?K(t):F(t),e.showCancelButton?o.style.display="inline-block":F(o),e.showConfirmButton?n.style.removeProperty("display"):F(n),n.innerHTML=e.confirmButtonText,o.innerHTML=e.cancelButtonText,n.setAttribute("aria-label",e.confirmButtonAriaLabel),o.setAttribute("aria-label",e.cancelButtonAriaLabel),n.className=_.confirm,z(n,e.confirmButtonClass),o.className=_.cancel,z(o,e.cancelButtonClass),e.buttonsStyling){z([n,o],_.styled),e.confirmButtonColor&&(n.style.backgroundColor=e.confirmButtonColor),e.cancelButtonColor&&(o.style.backgroundColor=e.cancelButtonColor);var i=window.getComputedStyle(n).getPropertyValue("background-color");n.style.borderLeftColor=i,n.style.borderRightColor=i}else W([n,o],_.styled),n.style.backgroundColor=n.style.borderLeftColor=n.style.borderRightColor="",o.style.backgroundColor=o.style.borderLeftColor=o.style.borderRightColor=""},ne=function(e){var t=B().querySelector("#"+_.content);e.html?G(e.html,t):e.text?(t.textContent=e.text,K(t)):F(t)},oe=function(e){for(var t=x(),n=0;n=i.progressSteps.length&&R("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),i.progressSteps.forEach(function(e,t){var n=document.createElement("li");if(z(n,_.progresscircle),n.innerHTML=e,t===a&&z(n,_.activeprogressstep),r.appendChild(n),t!==i.progressSteps.length-1){var o=document.createElement("li");z(o,_.progressline),i.progressStepsDistance&&(o.style.width=i.progressStepsDistance),r.appendChild(o)}})):F(r)},ae=function(e){var t=A();e.titleText?t.innerText=e.titleText:e.title&&("string"==typeof e.title&&(e.title=e.title.split("\n").join("
      ")),G(e.title,t))},se=function(){null===b.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(b.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=b.previousBodyPadding+function(){if("ontouchstart"in window||navigator.msMaxTouchPoints)return 0;var e=document.createElement("div");e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}()+"px")},ce=function(){return!!window.MSInputMethodContext&&!!document.documentMode},ue=function(){var e=w(),t=k();e.style.removeProperty("align-items"),t.offsetTop<0&&(e.style.alignItems="flex-start")},le={},de=function(e,t){var n=w(),o=k();if(o){null!==e&&"function"==typeof e&&e(o),W(o,_.show),z(o,_.hide);var i=function(){M()?pe(t):(new Promise(function(e){var t=window.scrollX,n=window.scrollY;le.restoreFocusTimeout=setTimeout(function(){le.previousActiveElement&&le.previousActiveElement.focus?(le.previousActiveElement.focus(),le.previousActiveElement=null):document.body&&document.body.focus(),e()},100),void 0!==t&&void 0!==n&&window.scrollTo(t,n)}).then(function(){return pe(t)}),le.keydownTarget.removeEventListener("keydown",le.keydownHandler,{capture:le.keydownListenerCapture}),le.keydownHandlerAdded=!1),n.parentNode&&n.parentNode.removeChild(n),W([document.documentElement,document.body],[_.shown,_["height-auto"],_["no-backdrop"],_["toast-shown"],_["toast-column"]]),T()&&(null!==b.previousBodyPadding&&(document.body.style.paddingRight=b.previousBodyPadding,b.previousBodyPadding=null),function(){if(v(document.body,_.iosfix)){var e=parseInt(document.body.style.top,10);W(document.body,_.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}}(),"undefined"!=typeof window&&ce()&&window.removeEventListener("resize",ue),f(document.body.children).forEach(function(e){e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))};ee&&!v(o,_.noanimation)?o.addEventListener(ee,function e(){o.removeEventListener(ee,e),v(o,_.hide)&&i()}):i()}},pe=function(e){null!==e&&"function"==typeof e&&setTimeout(function(){e()})};function fe(e){var t=function e(){for(var t=arguments.length,n=new Array(t),o=0;o