Version Description
- Fix: Latest supported WP version is not reflected on wordpress.org plugin repo
- Enh: Show confirmation popup if user tries to send another support request within an hour
Download this release
Release Info
Developer | ReneHermi |
Plugin | WP Staging – DB & File Duplicator & Migration |
Version | 2.8.0 |
Comparing to | |
See all releases |
Code changes from version 2.7.9 to 2.8.0
- Backend/Administrator.php +5 -2
- Backend/public/css/wpstg-admin.css +4 -0
- Backend/public/js/wpstg-admin.js +32 -8
- Backend/public/vendor/sweetalert2/LICENSE +22 -0
- Backend/public/vendor/sweetalert2/sweetalert2.all.js +3160 -0
- Backend/public/vendor/sweetalert2/sweetalert2.all.min.js +2 -0
- Backend/public/vendor/sweetalert2/wordpress-admin.css +1371 -0
- Backend/public/vendor/sweetalert2/wordpress-admin.min.css +1 -0
- Core/Utils/Report.php +0 -84
- Core/WPStaging.php +16 -16
- Framework/Interfaces/TransientInterface.php +31 -0
- Framework/Mails/Report/Report.php +122 -0
- Framework/Mails/Report/ReportSubmitTransient.php +37 -0
- Framework/Traits/BooleanTransientTrait.php +34 -0
- Frontend/LoginNotice.php +15 -12
- readme.txt +11 -6
- uninstall.php +5 -1
- vendor_wpstg/autoload/src.php +4 -1
- wp-staging.php +2 -2
Backend/Administrator.php
CHANGED
@@ -24,11 +24,11 @@ use WPStaging\Backend\Modules\Views\Tabs\Tabs;
|
|
24 |
use WPStaging\Backend\Notices\Notices;
|
25 |
use WPStaging\Backend\Notices\DisabledCacheNotice;
|
26 |
use WPStaging\Backend\Modules\Views\Forms\Settings as FormSettings;
|
27 |
-
use WPStaging\Core\Utils\Report;
|
28 |
use WPStaging\Backend\Activation;
|
29 |
use WPStaging\Backend\Feedback;
|
30 |
use WPStaging\Backend\Pro\Modules\Jobs\Processing;
|
31 |
use WPStaging\Pro\Database\CompareExternalDatabase;
|
|
|
32 |
use WPStaging\Framework\Security\Nonce;
|
33 |
|
34 |
/**
|
@@ -1042,8 +1042,11 @@ class Administrator
|
|
1042 |
$terms = ( bool )$args['wpstg_terms'];
|
1043 |
}
|
1044 |
|
|
|
|
|
|
|
1045 |
$report = new Report();
|
1046 |
-
$errors = $report->send($email, $message, $terms, $syslog, $provider);
|
1047 |
|
1048 |
echo json_encode(['errors' => $errors]);
|
1049 |
exit;
|
24 |
use WPStaging\Backend\Notices\Notices;
|
25 |
use WPStaging\Backend\Notices\DisabledCacheNotice;
|
26 |
use WPStaging\Backend\Modules\Views\Forms\Settings as FormSettings;
|
|
|
27 |
use WPStaging\Backend\Activation;
|
28 |
use WPStaging\Backend\Feedback;
|
29 |
use WPStaging\Backend\Pro\Modules\Jobs\Processing;
|
30 |
use WPStaging\Pro\Database\CompareExternalDatabase;
|
31 |
+
use WPStaging\Framework\Mails\Report\Report;
|
32 |
use WPStaging\Framework\Security\Nonce;
|
33 |
|
34 |
/**
|
1042 |
$terms = ( bool )$args['wpstg_terms'];
|
1043 |
}
|
1044 |
|
1045 |
+
// Set forceSend
|
1046 |
+
$forceSend = isset($_POST['wpstg_force_send']) && $_POST['wpstg_force_send'] !== "false";
|
1047 |
+
|
1048 |
$report = new Report();
|
1049 |
+
$errors = $report->send($email, $message, $terms, $syslog, $provider, $forceSend);
|
1050 |
|
1051 |
echo json_encode(['errors' => $errors]);
|
1052 |
exit;
|
Backend/public/css/wpstg-admin.css
CHANGED
@@ -1926,4 +1926,8 @@ span.wpstg--drag-or-upload {
|
|
1926 |
#wpstg-progress-files:not(.wpstg-pro),
|
1927 |
#wpstg-progress-finishing {
|
1928 |
background-color: #378cc9;
|
|
|
|
|
|
|
|
|
1929 |
}
|
1926 |
#wpstg-progress-files:not(.wpstg-pro),
|
1927 |
#wpstg-progress-finishing {
|
1928 |
background-color: #378cc9;
|
1929 |
+
}
|
1930 |
+
|
1931 |
+
.wpstg-issue-resubmit-confirmation.swal2-container {
|
1932 |
+
z-index: 10500;
|
1933 |
}
|
Backend/public/js/wpstg-admin.js
CHANGED
@@ -2973,17 +2973,15 @@ jQuery(document).ready(function ($) {
|
|
2973 |
$('.wpstg-report-issue-form').removeClass('wpstg-report-show');
|
2974 |
});
|
2975 |
|
2976 |
-
|
2977 |
-
var
|
2978 |
-
|
2979 |
-
var spinner = self.next();
|
2980 |
var email = $('.wpstg-report-email').val();
|
2981 |
var hosting_provider = $('.wpstg-report-hosting-provider').val();
|
2982 |
var message = $('.wpstg-report-description').val();
|
2983 |
var syslog = $('.wpstg-report-syslog').is(':checked');
|
2984 |
var terms = $('.wpstg-report-terms').is(':checked');
|
2985 |
|
2986 |
-
|
2987 |
spinner.css('visibility', 'visible');
|
2988 |
|
2989 |
$.ajax({
|
@@ -2999,10 +2997,11 @@ jQuery(document).ready(function ($) {
|
|
2999 |
'wpstg_provider': hosting_provider,
|
3000 |
'wpstg_message': message,
|
3001 |
'wpstg_syslog': +syslog,
|
3002 |
-
'wpstg_terms': +terms
|
|
|
3003 |
},
|
3004 |
}).done(function (data) {
|
3005 |
-
|
3006 |
spinner.css('visibility', 'hidden');
|
3007 |
|
3008 |
if (data.errors.length > 0) {
|
@@ -3010,7 +3009,28 @@ jQuery(document).ready(function ($) {
|
|
3010 |
|
3011 |
var errorMessage = $('<div />').addClass('wpstg-message wpstg-error-message');
|
3012 |
$.each(data.errors, function (key, value) {
|
3013 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3014 |
});
|
3015 |
|
3016 |
$('.wpstg-report-issue-form').prepend(errorMessage);
|
@@ -3027,7 +3047,11 @@ jQuery(document).ready(function ($) {
|
|
3027 |
}, 2000);
|
3028 |
}
|
3029 |
});
|
|
|
3030 |
|
|
|
|
|
|
|
3031 |
e.preventDefault();
|
3032 |
});
|
3033 |
|
2973 |
$('.wpstg-report-issue-form').removeClass('wpstg-report-show');
|
2974 |
});
|
2975 |
|
2976 |
+
function sendIssueReport(button, forceSend = 'false') {
|
2977 |
+
var spinner = button.next();
|
|
|
|
|
2978 |
var email = $('.wpstg-report-email').val();
|
2979 |
var hosting_provider = $('.wpstg-report-hosting-provider').val();
|
2980 |
var message = $('.wpstg-report-description').val();
|
2981 |
var syslog = $('.wpstg-report-syslog').is(':checked');
|
2982 |
var terms = $('.wpstg-report-terms').is(':checked');
|
2983 |
|
2984 |
+
button.attr('disabled', true);
|
2985 |
spinner.css('visibility', 'visible');
|
2986 |
|
2987 |
$.ajax({
|
2997 |
'wpstg_provider': hosting_provider,
|
2998 |
'wpstg_message': message,
|
2999 |
'wpstg_syslog': +syslog,
|
3000 |
+
'wpstg_terms': +terms,
|
3001 |
+
'wpstg_force_send': forceSend
|
3002 |
},
|
3003 |
}).done(function (data) {
|
3004 |
+
button.attr('disabled', false);
|
3005 |
spinner.css('visibility', 'hidden');
|
3006 |
|
3007 |
if (data.errors.length > 0) {
|
3009 |
|
3010 |
var errorMessage = $('<div />').addClass('wpstg-message wpstg-error-message');
|
3011 |
$.each(data.errors, function (key, value) {
|
3012 |
+
if (value.status === 'already_submitted') {
|
3013 |
+
errorMessage = '';
|
3014 |
+
Swal.fire({
|
3015 |
+
title: '',
|
3016 |
+
customClass: {
|
3017 |
+
container: 'wpstg-issue-resubmit-confirmation'
|
3018 |
+
},
|
3019 |
+
icon: 'warning',
|
3020 |
+
html: value.message,
|
3021 |
+
showCloseButton: true,
|
3022 |
+
showCancelButton: true,
|
3023 |
+
focusConfirm: false,
|
3024 |
+
confirmButtonText: 'Yes',
|
3025 |
+
cancelButtonText: 'No'
|
3026 |
+
}).then((result) => {
|
3027 |
+
if (result.isConfirmed) {
|
3028 |
+
sendIssueReport(button, 'true');
|
3029 |
+
}
|
3030 |
+
})
|
3031 |
+
} else {
|
3032 |
+
errorMessage.append('<p>' + value + '</p>');
|
3033 |
+
}
|
3034 |
});
|
3035 |
|
3036 |
$('.wpstg-report-issue-form').prepend(errorMessage);
|
3047 |
}, 2000);
|
3048 |
}
|
3049 |
});
|
3050 |
+
}
|
3051 |
|
3052 |
+
$('#wpstg-report-submit').click(function (e) {
|
3053 |
+
var self = $(this);
|
3054 |
+
sendIssueReport(self, 'false');
|
3055 |
e.preventDefault();
|
3056 |
});
|
3057 |
|
Backend/public/vendor/sweetalert2/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The MIT License (MIT)
|
2 |
+
|
3 |
+
Copyright (c) 2014 Tristan Edwards & Limon Monte
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
+
of this software and associated documentation files (the "Software"), to deal
|
7 |
+
in the Software without restriction, including without limitation the rights
|
8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
+
|
12 |
+
The above copyright notice and this permission notice shall be included in all
|
13 |
+
copies or substantial portions of the Software.
|
14 |
+
|
15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
+
SOFTWARE.
|
22 |
+
|
Backend/public/vendor/sweetalert2/sweetalert2.all.js
ADDED
@@ -0,0 +1,3160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* sweetalert2 v9.14.0
|
3 |
+
* Released under the MIT License.
|
4 |
+
*/
|
5 |
+
(function (global, factory) {
|
6 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
7 |
+
typeof define === 'function' && define.amd ? define(factory) :
|
8 |
+
(global = global || self, global.Sweetalert2 = factory());
|
9 |
+
}(this, function () { 'use strict';
|
10 |
+
|
11 |
+
function _typeof(obj) {
|
12 |
+
"@babel/helpers - typeof";
|
13 |
+
|
14 |
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
15 |
+
_typeof = function (obj) {
|
16 |
+
return typeof obj;
|
17 |
+
};
|
18 |
+
} else {
|
19 |
+
_typeof = function (obj) {
|
20 |
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
21 |
+
};
|
22 |
+
}
|
23 |
+
|
24 |
+
return _typeof(obj);
|
25 |
+
}
|
26 |
+
|
27 |
+
function _classCallCheck(instance, Constructor) {
|
28 |
+
if (!(instance instanceof Constructor)) {
|
29 |
+
throw new TypeError("Cannot call a class as a function");
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
function _defineProperties(target, props) {
|
34 |
+
for (var i = 0; i < props.length; i++) {
|
35 |
+
var descriptor = props[i];
|
36 |
+
descriptor.enumerable = descriptor.enumerable || false;
|
37 |
+
descriptor.configurable = true;
|
38 |
+
if ("value" in descriptor) descriptor.writable = true;
|
39 |
+
Object.defineProperty(target, descriptor.key, descriptor);
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
function _createClass(Constructor, protoProps, staticProps) {
|
44 |
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
45 |
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
46 |
+
return Constructor;
|
47 |
+
}
|
48 |
+
|
49 |
+
function _extends() {
|
50 |
+
_extends = Object.assign || function (target) {
|
51 |
+
for (var i = 1; i < arguments.length; i++) {
|
52 |
+
var source = arguments[i];
|
53 |
+
|
54 |
+
for (var key in source) {
|
55 |
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
56 |
+
target[key] = source[key];
|
57 |
+
}
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
return target;
|
62 |
+
};
|
63 |
+
|
64 |
+
return _extends.apply(this, arguments);
|
65 |
+
}
|
66 |
+
|
67 |
+
function _inherits(subClass, superClass) {
|
68 |
+
if (typeof superClass !== "function" && superClass !== null) {
|
69 |
+
throw new TypeError("Super expression must either be null or a function");
|
70 |
+
}
|
71 |
+
|
72 |
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
73 |
+
constructor: {
|
74 |
+
value: subClass,
|
75 |
+
writable: true,
|
76 |
+
configurable: true
|
77 |
+
}
|
78 |
+
});
|
79 |
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
80 |
+
}
|
81 |
+
|
82 |
+
function _getPrototypeOf(o) {
|
83 |
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
84 |
+
return o.__proto__ || Object.getPrototypeOf(o);
|
85 |
+
};
|
86 |
+
return _getPrototypeOf(o);
|
87 |
+
}
|
88 |
+
|
89 |
+
function _setPrototypeOf(o, p) {
|
90 |
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
91 |
+
o.__proto__ = p;
|
92 |
+
return o;
|
93 |
+
};
|
94 |
+
|
95 |
+
return _setPrototypeOf(o, p);
|
96 |
+
}
|
97 |
+
|
98 |
+
function _isNativeReflectConstruct() {
|
99 |
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
100 |
+
if (Reflect.construct.sham) return false;
|
101 |
+
if (typeof Proxy === "function") return true;
|
102 |
+
|
103 |
+
try {
|
104 |
+
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
|
105 |
+
return true;
|
106 |
+
} catch (e) {
|
107 |
+
return false;
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
function _construct(Parent, args, Class) {
|
112 |
+
if (_isNativeReflectConstruct()) {
|
113 |
+
_construct = Reflect.construct;
|
114 |
+
} else {
|
115 |
+
_construct = function _construct(Parent, args, Class) {
|
116 |
+
var a = [null];
|
117 |
+
a.push.apply(a, args);
|
118 |
+
var Constructor = Function.bind.apply(Parent, a);
|
119 |
+
var instance = new Constructor();
|
120 |
+
if (Class) _setPrototypeOf(instance, Class.prototype);
|
121 |
+
return instance;
|
122 |
+
};
|
123 |
+
}
|
124 |
+
|
125 |
+
return _construct.apply(null, arguments);
|
126 |
+
}
|
127 |
+
|
128 |
+
function _assertThisInitialized(self) {
|
129 |
+
if (self === void 0) {
|
130 |
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
131 |
+
}
|
132 |
+
|
133 |
+
return self;
|
134 |
+
}
|
135 |
+
|
136 |
+
function _possibleConstructorReturn(self, call) {
|
137 |
+
if (call && (typeof call === "object" || typeof call === "function")) {
|
138 |
+
return call;
|
139 |
+
}
|
140 |
+
|
141 |
+
return _assertThisInitialized(self);
|
142 |
+
}
|
143 |
+
|
144 |
+
function _createSuper(Derived) {
|
145 |
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
146 |
+
|
147 |
+
return function () {
|
148 |
+
var Super = _getPrototypeOf(Derived),
|
149 |
+
result;
|
150 |
+
|
151 |
+
if (hasNativeReflectConstruct) {
|
152 |
+
var NewTarget = _getPrototypeOf(this).constructor;
|
153 |
+
|
154 |
+
result = Reflect.construct(Super, arguments, NewTarget);
|
155 |
+
} else {
|
156 |
+
result = Super.apply(this, arguments);
|
157 |
+
}
|
158 |
+
|
159 |
+
return _possibleConstructorReturn(this, result);
|
160 |
+
};
|
161 |
+
}
|
162 |
+
|
163 |
+
function _superPropBase(object, property) {
|
164 |
+
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
165 |
+
object = _getPrototypeOf(object);
|
166 |
+
if (object === null) break;
|
167 |
+
}
|
168 |
+
|
169 |
+
return object;
|
170 |
+
}
|
171 |
+
|
172 |
+
function _get(target, property, receiver) {
|
173 |
+
if (typeof Reflect !== "undefined" && Reflect.get) {
|
174 |
+
_get = Reflect.get;
|
175 |
+
} else {
|
176 |
+
_get = function _get(target, property, receiver) {
|
177 |
+
var base = _superPropBase(target, property);
|
178 |
+
|
179 |
+
if (!base) return;
|
180 |
+
var desc = Object.getOwnPropertyDescriptor(base, property);
|
181 |
+
|
182 |
+
if (desc.get) {
|
183 |
+
return desc.get.call(receiver);
|
184 |
+
}
|
185 |
+
|
186 |
+
return desc.value;
|
187 |
+
};
|
188 |
+
}
|
189 |
+
|
190 |
+
return _get(target, property, receiver || target);
|
191 |
+
}
|
192 |
+
|
193 |
+
var consolePrefix = 'SweetAlert2:';
|
194 |
+
/**
|
195 |
+
* Filter the unique values into a new array
|
196 |
+
* @param arr
|
197 |
+
*/
|
198 |
+
|
199 |
+
var uniqueArray = function uniqueArray(arr) {
|
200 |
+
var result = [];
|
201 |
+
|
202 |
+
for (var i = 0; i < arr.length; i++) {
|
203 |
+
if (result.indexOf(arr[i]) === -1) {
|
204 |
+
result.push(arr[i]);
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
+
return result;
|
209 |
+
};
|
210 |
+
/**
|
211 |
+
* Capitalize the first letter of a string
|
212 |
+
* @param str
|
213 |
+
*/
|
214 |
+
|
215 |
+
var capitalizeFirstLetter = function capitalizeFirstLetter(str) {
|
216 |
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
217 |
+
};
|
218 |
+
/**
|
219 |
+
* Returns the array ob object values (Object.values isn't supported in IE11)
|
220 |
+
* @param obj
|
221 |
+
*/
|
222 |
+
|
223 |
+
var objectValues = function objectValues(obj) {
|
224 |
+
return Object.keys(obj).map(function (key) {
|
225 |
+
return obj[key];
|
226 |
+
});
|
227 |
+
};
|
228 |
+
/**
|
229 |
+
* Convert NodeList to Array
|
230 |
+
* @param nodeList
|
231 |
+
*/
|
232 |
+
|
233 |
+
var toArray = function toArray(nodeList) {
|
234 |
+
return Array.prototype.slice.call(nodeList);
|
235 |
+
};
|
236 |
+
/**
|
237 |
+
* Standardise console warnings
|
238 |
+
* @param message
|
239 |
+
*/
|
240 |
+
|
241 |
+
var warn = function warn(message) {
|
242 |
+
console.warn("".concat(consolePrefix, " ").concat(message));
|
243 |
+
};
|
244 |
+
/**
|
245 |
+
* Standardise console errors
|
246 |
+
* @param message
|
247 |
+
*/
|
248 |
+
|
249 |
+
var error = function error(message) {
|
250 |
+
console.error("".concat(consolePrefix, " ").concat(message));
|
251 |
+
};
|
252 |
+
/**
|
253 |
+
* Private global state for `warnOnce`
|
254 |
+
* @type {Array}
|
255 |
+
* @private
|
256 |
+
*/
|
257 |
+
|
258 |
+
var previousWarnOnceMessages = [];
|
259 |
+
/**
|
260 |
+
* Show a console warning, but only if it hasn't already been shown
|
261 |
+
* @param message
|
262 |
+
*/
|
263 |
+
|
264 |
+
var warnOnce = function warnOnce(message) {
|
265 |
+
if (!(previousWarnOnceMessages.indexOf(message) !== -1)) {
|
266 |
+
previousWarnOnceMessages.push(message);
|
267 |
+
warn(message);
|
268 |
+
}
|
269 |
+
};
|
270 |
+
/**
|
271 |
+
* Show a one-time console warning about deprecated params/methods
|
272 |
+
*/
|
273 |
+
|
274 |
+
var warnAboutDepreation = function warnAboutDepreation(deprecatedParam, useInstead) {
|
275 |
+
warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead."));
|
276 |
+
};
|
277 |
+
/**
|
278 |
+
* If `arg` is a function, call it (with no arguments or context) and return the result.
|
279 |
+
* Otherwise, just pass the value through
|
280 |
+
* @param arg
|
281 |
+
*/
|
282 |
+
|
283 |
+
var callIfFunction = function callIfFunction(arg) {
|
284 |
+
return typeof arg === 'function' ? arg() : arg;
|
285 |
+
};
|
286 |
+
var isPromise = function isPromise(arg) {
|
287 |
+
return arg && Promise.resolve(arg) === arg;
|
288 |
+
};
|
289 |
+
|
290 |
+
var DismissReason = Object.freeze({
|
291 |
+
cancel: 'cancel',
|
292 |
+
backdrop: 'backdrop',
|
293 |
+
close: 'close',
|
294 |
+
esc: 'esc',
|
295 |
+
timer: 'timer'
|
296 |
+
});
|
297 |
+
|
298 |
+
var isJqueryElement = function isJqueryElement(elem) {
|
299 |
+
return _typeof(elem) === 'object' && elem.jquery;
|
300 |
+
};
|
301 |
+
|
302 |
+
var isElement = function isElement(elem) {
|
303 |
+
return elem instanceof Element || isJqueryElement(elem);
|
304 |
+
};
|
305 |
+
|
306 |
+
var argsToParams = function argsToParams(args) {
|
307 |
+
var params = {};
|
308 |
+
|
309 |
+
if (_typeof(args[0]) === 'object' && !isElement(args[0])) {
|
310 |
+
_extends(params, args[0]);
|
311 |
+
} else {
|
312 |
+
['title', 'html', 'icon'].forEach(function (name, index) {
|
313 |
+
var arg = args[index];
|
314 |
+
|
315 |
+
if (typeof arg === 'string' || isElement(arg)) {
|
316 |
+
params[name] = arg;
|
317 |
+
} else if (arg !== undefined) {
|
318 |
+
error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(_typeof(arg)));
|
319 |
+
}
|
320 |
+
});
|
321 |
+
}
|
322 |
+
|
323 |
+
return params;
|
324 |
+
};
|
325 |
+
|
326 |
+
var swalPrefix = 'swal2-';
|
327 |
+
var prefix = function prefix(items) {
|
328 |
+
var result = {};
|
329 |
+
|
330 |
+
for (var i in items) {
|
331 |
+
result[items[i]] = swalPrefix + items[i];
|
332 |
+
}
|
333 |
+
|
334 |
+
return result;
|
335 |
+
};
|
336 |
+
var swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'toast-column', 'show', 'hide', 'close', 'title', 'header', 'content', 'html-container', 'actions', 'confirm', 'cancel', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', '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', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']);
|
337 |
+
var iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);
|
338 |
+
|
339 |
+
var getContainer = function getContainer() {
|
340 |
+
return document.body.querySelector(".".concat(swalClasses.container));
|
341 |
+
};
|
342 |
+
var elementBySelector = function elementBySelector(selectorString) {
|
343 |
+
var container = getContainer();
|
344 |
+
return container ? container.querySelector(selectorString) : null;
|
345 |
+
};
|
346 |
+
|
347 |
+
var elementByClass = function elementByClass(className) {
|
348 |
+
return elementBySelector(".".concat(className));
|
349 |
+
};
|
350 |
+
|
351 |
+
var getPopup = function getPopup() {
|
352 |
+
return elementByClass(swalClasses.popup);
|
353 |
+
};
|
354 |
+
var getIcons = function getIcons() {
|
355 |
+
var popup = getPopup();
|
356 |
+
return toArray(popup.querySelectorAll(".".concat(swalClasses.icon)));
|
357 |
+
};
|
358 |
+
var getIcon = function getIcon() {
|
359 |
+
var visibleIcon = getIcons().filter(function (icon) {
|
360 |
+
return isVisible(icon);
|
361 |
+
});
|
362 |
+
return visibleIcon.length ? visibleIcon[0] : null;
|
363 |
+
};
|
364 |
+
var getTitle = function getTitle() {
|
365 |
+
return elementByClass(swalClasses.title);
|
366 |
+
};
|
367 |
+
var getContent = function getContent() {
|
368 |
+
return elementByClass(swalClasses.content);
|
369 |
+
};
|
370 |
+
var getHtmlContainer = function getHtmlContainer() {
|
371 |
+
return elementByClass(swalClasses['html-container']);
|
372 |
+
};
|
373 |
+
var getImage = function getImage() {
|
374 |
+
return elementByClass(swalClasses.image);
|
375 |
+
};
|
376 |
+
var getProgressSteps = function getProgressSteps() {
|
377 |
+
return elementByClass(swalClasses['progress-steps']);
|
378 |
+
};
|
379 |
+
var getValidationMessage = function getValidationMessage() {
|
380 |
+
return elementByClass(swalClasses['validation-message']);
|
381 |
+
};
|
382 |
+
var getConfirmButton = function getConfirmButton() {
|
383 |
+
return elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm));
|
384 |
+
};
|
385 |
+
var getCancelButton = function getCancelButton() {
|
386 |
+
return elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel));
|
387 |
+
};
|
388 |
+
var getActions = function getActions() {
|
389 |
+
return elementByClass(swalClasses.actions);
|
390 |
+
};
|
391 |
+
var getHeader = function getHeader() {
|
392 |
+
return elementByClass(swalClasses.header);
|
393 |
+
};
|
394 |
+
var getFooter = function getFooter() {
|
395 |
+
return elementByClass(swalClasses.footer);
|
396 |
+
};
|
397 |
+
var getTimerProgressBar = function getTimerProgressBar() {
|
398 |
+
return elementByClass(swalClasses['timer-progress-bar']);
|
399 |
+
};
|
400 |
+
var getCloseButton = function getCloseButton() {
|
401 |
+
return elementByClass(swalClasses.close);
|
402 |
+
}; // https://github.com/jkup/focusable/blob/master/index.js
|
403 |
+
|
404 |
+
var focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n";
|
405 |
+
var getFocusableElements = function getFocusableElements() {
|
406 |
+
var focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex
|
407 |
+
.sort(function (a, b) {
|
408 |
+
a = parseInt(a.getAttribute('tabindex'));
|
409 |
+
b = parseInt(b.getAttribute('tabindex'));
|
410 |
+
|
411 |
+
if (a > b) {
|
412 |
+
return 1;
|
413 |
+
} else if (a < b) {
|
414 |
+
return -1;
|
415 |
+
}
|
416 |
+
|
417 |
+
return 0;
|
418 |
+
});
|
419 |
+
var otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(function (el) {
|
420 |
+
return el.getAttribute('tabindex') !== '-1';
|
421 |
+
});
|
422 |
+
return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(function (el) {
|
423 |
+
return isVisible(el);
|
424 |
+
});
|
425 |
+
};
|
426 |
+
var isModal = function isModal() {
|
427 |
+
return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']);
|
428 |
+
};
|
429 |
+
var isToast = function isToast() {
|
430 |
+
return document.body.classList.contains(swalClasses['toast-shown']);
|
431 |
+
};
|
432 |
+
var isLoading = function isLoading() {
|
433 |
+
return getPopup().hasAttribute('data-loading');
|
434 |
+
};
|
435 |
+
|
436 |
+
var states = {
|
437 |
+
previousBodyPadding: null
|
438 |
+
};
|
439 |
+
var setInnerHtml = function setInnerHtml(elem, html) {
|
440 |
+
// #1926
|
441 |
+
elem.textContent = '';
|
442 |
+
|
443 |
+
if (html) {
|
444 |
+
var parser = new DOMParser();
|
445 |
+
var parsed = parser.parseFromString(html, "text/html");
|
446 |
+
toArray(parsed.querySelector('head').childNodes).forEach(function (child) {
|
447 |
+
elem.appendChild(child);
|
448 |
+
});
|
449 |
+
toArray(parsed.querySelector('body').childNodes).forEach(function (child) {
|
450 |
+
elem.appendChild(child);
|
451 |
+
});
|
452 |
+
}
|
453 |
+
};
|
454 |
+
var hasClass = function hasClass(elem, className) {
|
455 |
+
if (!className) {
|
456 |
+
return false;
|
457 |
+
}
|
458 |
+
|
459 |
+
var classList = className.split(/\s+/);
|
460 |
+
|
461 |
+
for (var i = 0; i < classList.length; i++) {
|
462 |
+
if (!elem.classList.contains(classList[i])) {
|
463 |
+
return false;
|
464 |
+
}
|
465 |
+
}
|
466 |
+
|
467 |
+
return true;
|
468 |
+
};
|
469 |
+
|
470 |
+
var removeCustomClasses = function removeCustomClasses(elem, params) {
|
471 |
+
toArray(elem.classList).forEach(function (className) {
|
472 |
+
if (!(objectValues(swalClasses).indexOf(className) !== -1) && !(objectValues(iconTypes).indexOf(className) !== -1) && !(objectValues(params.showClass).indexOf(className) !== -1)) {
|
473 |
+
elem.classList.remove(className);
|
474 |
+
}
|
475 |
+
});
|
476 |
+
};
|
477 |
+
|
478 |
+
var applyCustomClass = function applyCustomClass(elem, params, className) {
|
479 |
+
removeCustomClasses(elem, params);
|
480 |
+
|
481 |
+
if (params.customClass && params.customClass[className]) {
|
482 |
+
if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) {
|
483 |
+
return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(_typeof(params.customClass[className]), "\""));
|
484 |
+
}
|
485 |
+
|
486 |
+
addClass(elem, params.customClass[className]);
|
487 |
+
}
|
488 |
+
};
|
489 |
+
function getInput(content, inputType) {
|
490 |
+
if (!inputType) {
|
491 |
+
return null;
|
492 |
+
}
|
493 |
+
|
494 |
+
switch (inputType) {
|
495 |
+
case 'select':
|
496 |
+
case 'textarea':
|
497 |
+
case 'file':
|
498 |
+
return getChildByClass(content, swalClasses[inputType]);
|
499 |
+
|
500 |
+
case 'checkbox':
|
501 |
+
return content.querySelector(".".concat(swalClasses.checkbox, " input"));
|
502 |
+
|
503 |
+
case 'radio':
|
504 |
+
return content.querySelector(".".concat(swalClasses.radio, " input:checked")) || content.querySelector(".".concat(swalClasses.radio, " input:first-child"));
|
505 |
+
|
506 |
+
case 'range':
|
507 |
+
return content.querySelector(".".concat(swalClasses.range, " input"));
|
508 |
+
|
509 |
+
default:
|
510 |
+
return getChildByClass(content, swalClasses.input);
|
511 |
+
}
|
512 |
+
}
|
513 |
+
var focusInput = function focusInput(input) {
|
514 |
+
input.focus(); // place cursor at end of text in text input
|
515 |
+
|
516 |
+
if (input.type !== 'file') {
|
517 |
+
// http://stackoverflow.com/a/2345915
|
518 |
+
var val = input.value;
|
519 |
+
input.value = '';
|
520 |
+
input.value = val;
|
521 |
+
}
|
522 |
+
};
|
523 |
+
var toggleClass = function toggleClass(target, classList, condition) {
|
524 |
+
if (!target || !classList) {
|
525 |
+
return;
|
526 |
+
}
|
527 |
+
|
528 |
+
if (typeof classList === 'string') {
|
529 |
+
classList = classList.split(/\s+/).filter(Boolean);
|
530 |
+
}
|
531 |
+
|
532 |
+
classList.forEach(function (className) {
|
533 |
+
if (target.forEach) {
|
534 |
+
target.forEach(function (elem) {
|
535 |
+
condition ? elem.classList.add(className) : elem.classList.remove(className);
|
536 |
+
});
|
537 |
+
} else {
|
538 |
+
condition ? target.classList.add(className) : target.classList.remove(className);
|
539 |
+
}
|
540 |
+
});
|
541 |
+
};
|
542 |
+
var addClass = function addClass(target, classList) {
|
543 |
+
toggleClass(target, classList, true);
|
544 |
+
};
|
545 |
+
var removeClass = function removeClass(target, classList) {
|
546 |
+
toggleClass(target, classList, false);
|
547 |
+
};
|
548 |
+
var getChildByClass = function getChildByClass(elem, className) {
|
549 |
+
for (var i = 0; i < elem.childNodes.length; i++) {
|
550 |
+
if (hasClass(elem.childNodes[i], className)) {
|
551 |
+
return elem.childNodes[i];
|
552 |
+
}
|
553 |
+
}
|
554 |
+
};
|
555 |
+
var applyNumericalStyle = function applyNumericalStyle(elem, property, value) {
|
556 |
+
if (value || parseInt(value) === 0) {
|
557 |
+
elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value;
|
558 |
+
} else {
|
559 |
+
elem.style.removeProperty(property);
|
560 |
+
}
|
561 |
+
};
|
562 |
+
var show = function show(elem) {
|
563 |
+
var display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex';
|
564 |
+
elem.style.opacity = '';
|
565 |
+
elem.style.display = display;
|
566 |
+
};
|
567 |
+
var hide = function hide(elem) {
|
568 |
+
elem.style.opacity = '';
|
569 |
+
elem.style.display = 'none';
|
570 |
+
};
|
571 |
+
var toggle = function toggle(elem, condition, display) {
|
572 |
+
condition ? show(elem, display) : hide(elem);
|
573 |
+
}; // borrowed from jquery $(elem).is(':visible') implementation
|
574 |
+
|
575 |
+
var isVisible = function isVisible(elem) {
|
576 |
+
return !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length));
|
577 |
+
};
|
578 |
+
/* istanbul ignore next */
|
579 |
+
|
580 |
+
var isScrollable = function isScrollable(elem) {
|
581 |
+
return !!(elem.scrollHeight > elem.clientHeight);
|
582 |
+
}; // borrowed from https://stackoverflow.com/a/46352119
|
583 |
+
|
584 |
+
var hasCssAnimation = function hasCssAnimation(elem) {
|
585 |
+
var style = window.getComputedStyle(elem);
|
586 |
+
var animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0');
|
587 |
+
var transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0');
|
588 |
+
return animDuration > 0 || transDuration > 0;
|
589 |
+
};
|
590 |
+
var contains = function contains(haystack, needle) {
|
591 |
+
if (typeof haystack.contains === 'function') {
|
592 |
+
return haystack.contains(needle);
|
593 |
+
}
|
594 |
+
};
|
595 |
+
var animateTimerProgressBar = function animateTimerProgressBar(timer) {
|
596 |
+
var reset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
597 |
+
var timerProgressBar = getTimerProgressBar();
|
598 |
+
|
599 |
+
if (isVisible(timerProgressBar)) {
|
600 |
+
if (reset) {
|
601 |
+
timerProgressBar.style.transition = 'none';
|
602 |
+
timerProgressBar.style.width = '100%';
|
603 |
+
}
|
604 |
+
|
605 |
+
setTimeout(function () {
|
606 |
+
timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear");
|
607 |
+
timerProgressBar.style.width = '0%';
|
608 |
+
}, 10);
|
609 |
+
}
|
610 |
+
};
|
611 |
+
var stopTimerProgressBar = function stopTimerProgressBar() {
|
612 |
+
var timerProgressBar = getTimerProgressBar();
|
613 |
+
var timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width);
|
614 |
+
timerProgressBar.style.removeProperty('transition');
|
615 |
+
timerProgressBar.style.width = '100%';
|
616 |
+
var timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width);
|
617 |
+
var timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100);
|
618 |
+
timerProgressBar.style.removeProperty('transition');
|
619 |
+
timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%");
|
620 |
+
};
|
621 |
+
|
622 |
+
// Detect Node env
|
623 |
+
var isNodeEnv = function isNodeEnv() {
|
624 |
+
return typeof window === 'undefined' || typeof document === 'undefined';
|
625 |
+
};
|
626 |
+
|
627 |
+
var sweetHTML = "\n <div aria-labelledby=\"".concat(swalClasses.title, "\" aria-describedby=\"").concat(swalClasses.content, "\" class=\"").concat(swalClasses.popup, "\" tabindex=\"-1\">\n <div class=\"").concat(swalClasses.header, "\">\n <ul class=\"").concat(swalClasses['progress-steps'], "\"></ul>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.error, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.question, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.warning, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.info, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.success, "\"></div>\n <img class=\"").concat(swalClasses.image, "\" />\n <h2 class=\"").concat(swalClasses.title, "\" id=\"").concat(swalClasses.title, "\"></h2>\n <button type=\"button\" class=\"").concat(swalClasses.close, "\"></button>\n </div>\n <div class=\"").concat(swalClasses.content, "\">\n <div id=\"").concat(swalClasses.content, "\" class=\"").concat(swalClasses['html-container'], "\"></div>\n <input class=\"").concat(swalClasses.input, "\" />\n <input type=\"file\" class=\"").concat(swalClasses.file, "\" />\n <div class=\"").concat(swalClasses.range, "\">\n <input type=\"range\" />\n <output></output>\n </div>\n <select class=\"").concat(swalClasses.select, "\"></select>\n <div class=\"").concat(swalClasses.radio, "\"></div>\n <label for=\"").concat(swalClasses.checkbox, "\" class=\"").concat(swalClasses.checkbox, "\">\n <input type=\"checkbox\" />\n <span class=\"").concat(swalClasses.label, "\"></span>\n </label>\n <textarea class=\"").concat(swalClasses.textarea, "\"></textarea>\n <div class=\"").concat(swalClasses['validation-message'], "\" id=\"").concat(swalClasses['validation-message'], "\"></div>\n </div>\n <div class=\"").concat(swalClasses.actions, "\">\n <button type=\"button\" class=\"").concat(swalClasses.confirm, "\">OK</button>\n <button type=\"button\" class=\"").concat(swalClasses.cancel, "\">Cancel</button>\n </div>\n <div class=\"").concat(swalClasses.footer, "\"></div>\n <div class=\"").concat(swalClasses['timer-progress-bar-container'], "\">\n <div class=\"").concat(swalClasses['timer-progress-bar'], "\"></div>\n </div>\n </div>\n").replace(/(^|\n)\s*/g, '');
|
628 |
+
|
629 |
+
var resetOldContainer = function resetOldContainer() {
|
630 |
+
var oldContainer = getContainer();
|
631 |
+
|
632 |
+
if (!oldContainer) {
|
633 |
+
return false;
|
634 |
+
}
|
635 |
+
|
636 |
+
oldContainer.parentNode.removeChild(oldContainer);
|
637 |
+
removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]);
|
638 |
+
return true;
|
639 |
+
};
|
640 |
+
|
641 |
+
var oldInputVal; // IE11 workaround, see #1109 for details
|
642 |
+
|
643 |
+
var resetValidationMessage = function resetValidationMessage(e) {
|
644 |
+
if (Swal.isVisible() && oldInputVal !== e.target.value) {
|
645 |
+
Swal.resetValidationMessage();
|
646 |
+
}
|
647 |
+
|
648 |
+
oldInputVal = e.target.value;
|
649 |
+
};
|
650 |
+
|
651 |
+
var addInputChangeListeners = function addInputChangeListeners() {
|
652 |
+
var content = getContent();
|
653 |
+
var input = getChildByClass(content, swalClasses.input);
|
654 |
+
var file = getChildByClass(content, swalClasses.file);
|
655 |
+
var range = content.querySelector(".".concat(swalClasses.range, " input"));
|
656 |
+
var rangeOutput = content.querySelector(".".concat(swalClasses.range, " output"));
|
657 |
+
var select = getChildByClass(content, swalClasses.select);
|
658 |
+
var checkbox = content.querySelector(".".concat(swalClasses.checkbox, " input"));
|
659 |
+
var textarea = getChildByClass(content, swalClasses.textarea);
|
660 |
+
input.oninput = resetValidationMessage;
|
661 |
+
file.onchange = resetValidationMessage;
|
662 |
+
select.onchange = resetValidationMessage;
|
663 |
+
checkbox.onchange = resetValidationMessage;
|
664 |
+
textarea.oninput = resetValidationMessage;
|
665 |
+
|
666 |
+
range.oninput = function (e) {
|
667 |
+
resetValidationMessage(e);
|
668 |
+
rangeOutput.value = range.value;
|
669 |
+
};
|
670 |
+
|
671 |
+
range.onchange = function (e) {
|
672 |
+
resetValidationMessage(e);
|
673 |
+
range.nextSibling.value = range.value;
|
674 |
+
};
|
675 |
+
};
|
676 |
+
|
677 |
+
var getTarget = function getTarget(target) {
|
678 |
+
return typeof target === 'string' ? document.querySelector(target) : target;
|
679 |
+
};
|
680 |
+
|
681 |
+
var setupAccessibility = function setupAccessibility(params) {
|
682 |
+
var popup = getPopup();
|
683 |
+
popup.setAttribute('role', params.toast ? 'alert' : 'dialog');
|
684 |
+
popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive');
|
685 |
+
|
686 |
+
if (!params.toast) {
|
687 |
+
popup.setAttribute('aria-modal', 'true');
|
688 |
+
}
|
689 |
+
};
|
690 |
+
|
691 |
+
var setupRTL = function setupRTL(targetElement) {
|
692 |
+
if (window.getComputedStyle(targetElement).direction === 'rtl') {
|
693 |
+
addClass(getContainer(), swalClasses.rtl);
|
694 |
+
}
|
695 |
+
};
|
696 |
+
/*
|
697 |
+
* Add modal + backdrop to DOM
|
698 |
+
*/
|
699 |
+
|
700 |
+
|
701 |
+
var init = function init(params) {
|
702 |
+
// Clean up the old popup container if it exists
|
703 |
+
var oldContainerExisted = resetOldContainer();
|
704 |
+
/* istanbul ignore if */
|
705 |
+
|
706 |
+
if (isNodeEnv()) {
|
707 |
+
error('SweetAlert2 requires document to initialize');
|
708 |
+
return;
|
709 |
+
}
|
710 |
+
|
711 |
+
var container = document.createElement('div');
|
712 |
+
container.className = swalClasses.container;
|
713 |
+
|
714 |
+
if (oldContainerExisted) {
|
715 |
+
addClass(container, swalClasses['no-transition']);
|
716 |
+
}
|
717 |
+
|
718 |
+
setInnerHtml(container, sweetHTML);
|
719 |
+
var targetElement = getTarget(params.target);
|
720 |
+
targetElement.appendChild(container);
|
721 |
+
setupAccessibility(params);
|
722 |
+
setupRTL(targetElement);
|
723 |
+
addInputChangeListeners();
|
724 |
+
};
|
725 |
+
|
726 |
+
var parseHtmlToContainer = function parseHtmlToContainer(param, target) {
|
727 |
+
// DOM element
|
728 |
+
if (param instanceof HTMLElement) {
|
729 |
+
target.appendChild(param); // Object
|
730 |
+
} else if (_typeof(param) === 'object') {
|
731 |
+
handleObject(param, target); // Plain string
|
732 |
+
} else if (param) {
|
733 |
+
setInnerHtml(target, param);
|
734 |
+
}
|
735 |
+
};
|
736 |
+
|
737 |
+
var handleObject = function handleObject(param, target) {
|
738 |
+
// JQuery element(s)
|
739 |
+
if (param.jquery) {
|
740 |
+
handleJqueryElem(target, param); // For other objects use their string representation
|
741 |
+
} else {
|
742 |
+
setInnerHtml(target, param.toString());
|
743 |
+
}
|
744 |
+
};
|
745 |
+
|
746 |
+
var handleJqueryElem = function handleJqueryElem(target, elem) {
|
747 |
+
target.textContent = '';
|
748 |
+
|
749 |
+
if (0 in elem) {
|
750 |
+
for (var i = 0; (i in elem); i++) {
|
751 |
+
target.appendChild(elem[i].cloneNode(true));
|
752 |
+
}
|
753 |
+
} else {
|
754 |
+
target.appendChild(elem.cloneNode(true));
|
755 |
+
}
|
756 |
+
};
|
757 |
+
|
758 |
+
var animationEndEvent = function () {
|
759 |
+
// Prevent run in Node env
|
760 |
+
|
761 |
+
/* istanbul ignore if */
|
762 |
+
if (isNodeEnv()) {
|
763 |
+
return false;
|
764 |
+
}
|
765 |
+
|
766 |
+
var testEl = document.createElement('div');
|
767 |
+
var transEndEventNames = {
|
768 |
+
WebkitAnimation: 'webkitAnimationEnd',
|
769 |
+
OAnimation: 'oAnimationEnd oanimationend',
|
770 |
+
animation: 'animationend'
|
771 |
+
};
|
772 |
+
|
773 |
+
for (var i in transEndEventNames) {
|
774 |
+
if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') {
|
775 |
+
return transEndEventNames[i];
|
776 |
+
}
|
777 |
+
}
|
778 |
+
|
779 |
+
return false;
|
780 |
+
}();
|
781 |
+
|
782 |
+
// https://github.com/twbs/bootstrap/blob/master/js/src/modal.js
|
783 |
+
|
784 |
+
var measureScrollbar = function measureScrollbar() {
|
785 |
+
var scrollDiv = document.createElement('div');
|
786 |
+
scrollDiv.className = swalClasses['scrollbar-measure'];
|
787 |
+
document.body.appendChild(scrollDiv);
|
788 |
+
var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
|
789 |
+
document.body.removeChild(scrollDiv);
|
790 |
+
return scrollbarWidth;
|
791 |
+
};
|
792 |
+
|
793 |
+
var renderActions = function renderActions(instance, params) {
|
794 |
+
var actions = getActions();
|
795 |
+
var confirmButton = getConfirmButton();
|
796 |
+
var cancelButton = getCancelButton(); // Actions (buttons) wrapper
|
797 |
+
|
798 |
+
if (!params.showConfirmButton && !params.showCancelButton) {
|
799 |
+
hide(actions);
|
800 |
+
} // Custom class
|
801 |
+
|
802 |
+
|
803 |
+
applyCustomClass(actions, params, 'actions'); // Render confirm button
|
804 |
+
|
805 |
+
renderButton(confirmButton, 'confirm', params); // render Cancel Button
|
806 |
+
|
807 |
+
renderButton(cancelButton, 'cancel', params);
|
808 |
+
|
809 |
+
if (params.buttonsStyling) {
|
810 |
+
handleButtonsStyling(confirmButton, cancelButton, params);
|
811 |
+
} else {
|
812 |
+
removeClass([confirmButton, cancelButton], swalClasses.styled);
|
813 |
+
confirmButton.style.backgroundColor = confirmButton.style.borderLeftColor = confirmButton.style.borderRightColor = '';
|
814 |
+
cancelButton.style.backgroundColor = cancelButton.style.borderLeftColor = cancelButton.style.borderRightColor = '';
|
815 |
+
}
|
816 |
+
|
817 |
+
if (params.reverseButtons) {
|
818 |
+
confirmButton.parentNode.insertBefore(cancelButton, confirmButton);
|
819 |
+
}
|
820 |
+
};
|
821 |
+
|
822 |
+
function handleButtonsStyling(confirmButton, cancelButton, params) {
|
823 |
+
addClass([confirmButton, cancelButton], swalClasses.styled); // Buttons background colors
|
824 |
+
|
825 |
+
if (params.confirmButtonColor) {
|
826 |
+
confirmButton.style.backgroundColor = params.confirmButtonColor;
|
827 |
+
}
|
828 |
+
|
829 |
+
if (params.cancelButtonColor) {
|
830 |
+
cancelButton.style.backgroundColor = params.cancelButtonColor;
|
831 |
+
} // Loading state
|
832 |
+
|
833 |
+
|
834 |
+
if (!isLoading()) {
|
835 |
+
var confirmButtonBackgroundColor = window.getComputedStyle(confirmButton).getPropertyValue('background-color');
|
836 |
+
confirmButton.style.borderLeftColor = confirmButtonBackgroundColor;
|
837 |
+
confirmButton.style.borderRightColor = confirmButtonBackgroundColor;
|
838 |
+
}
|
839 |
+
}
|
840 |
+
|
841 |
+
function renderButton(button, buttonType, params) {
|
842 |
+
toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block');
|
843 |
+
setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text
|
844 |
+
|
845 |
+
button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label
|
846 |
+
// Add buttons custom classes
|
847 |
+
|
848 |
+
button.className = swalClasses[buttonType];
|
849 |
+
applyCustomClass(button, params, "".concat(buttonType, "Button"));
|
850 |
+
addClass(button, params["".concat(buttonType, "ButtonClass")]);
|
851 |
+
}
|
852 |
+
|
853 |
+
function handleBackdropParam(container, backdrop) {
|
854 |
+
if (typeof backdrop === 'string') {
|
855 |
+
container.style.background = backdrop;
|
856 |
+
} else if (!backdrop) {
|
857 |
+
addClass([document.documentElement, document.body], swalClasses['no-backdrop']);
|
858 |
+
}
|
859 |
+
}
|
860 |
+
|
861 |
+
function handlePositionParam(container, position) {
|
862 |
+
if (position in swalClasses) {
|
863 |
+
addClass(container, swalClasses[position]);
|
864 |
+
} else {
|
865 |
+
warn('The "position" parameter is not valid, defaulting to "center"');
|
866 |
+
addClass(container, swalClasses.center);
|
867 |
+
}
|
868 |
+
}
|
869 |
+
|
870 |
+
function handleGrowParam(container, grow) {
|
871 |
+
if (grow && typeof grow === 'string') {
|
872 |
+
var growClass = "grow-".concat(grow);
|
873 |
+
|
874 |
+
if (growClass in swalClasses) {
|
875 |
+
addClass(container, swalClasses[growClass]);
|
876 |
+
}
|
877 |
+
}
|
878 |
+
}
|
879 |
+
|
880 |
+
var renderContainer = function renderContainer(instance, params) {
|
881 |
+
var container = getContainer();
|
882 |
+
|
883 |
+
if (!container) {
|
884 |
+
return;
|
885 |
+
}
|
886 |
+
|
887 |
+
handleBackdropParam(container, params.backdrop);
|
888 |
+
|
889 |
+
if (!params.backdrop && params.allowOutsideClick) {
|
890 |
+
warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');
|
891 |
+
}
|
892 |
+
|
893 |
+
handlePositionParam(container, params.position);
|
894 |
+
handleGrowParam(container, params.grow); // Custom class
|
895 |
+
|
896 |
+
applyCustomClass(container, params, 'container'); // Set queue step attribute for getQueueStep() method
|
897 |
+
|
898 |
+
var queueStep = document.body.getAttribute('data-swal2-queue-step');
|
899 |
+
|
900 |
+
if (queueStep) {
|
901 |
+
container.setAttribute('data-queue-step', queueStep);
|
902 |
+
document.body.removeAttribute('data-swal2-queue-step');
|
903 |
+
}
|
904 |
+
};
|
905 |
+
|
906 |
+
/**
|
907 |
+
* This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has.
|
908 |
+
* For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')`
|
909 |
+
* This is the approach that Babel will probably take to implement private methods/fields
|
910 |
+
* https://github.com/tc39/proposal-private-methods
|
911 |
+
* https://github.com/babel/babel/pull/7555
|
912 |
+
* Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*
|
913 |
+
* then we can use that language feature.
|
914 |
+
*/
|
915 |
+
var privateProps = {
|
916 |
+
promise: new WeakMap(),
|
917 |
+
innerParams: new WeakMap(),
|
918 |
+
domCache: new WeakMap()
|
919 |
+
};
|
920 |
+
|
921 |
+
var inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];
|
922 |
+
var renderInput = function renderInput(instance, params) {
|
923 |
+
var content = getContent();
|
924 |
+
var innerParams = privateProps.innerParams.get(instance);
|
925 |
+
var rerender = !innerParams || params.input !== innerParams.input;
|
926 |
+
inputTypes.forEach(function (inputType) {
|
927 |
+
var inputClass = swalClasses[inputType];
|
928 |
+
var inputContainer = getChildByClass(content, inputClass); // set attributes
|
929 |
+
|
930 |
+
setAttributes(inputType, params.inputAttributes); // set class
|
931 |
+
|
932 |
+
inputContainer.className = inputClass;
|
933 |
+
|
934 |
+
if (rerender) {
|
935 |
+
hide(inputContainer);
|
936 |
+
}
|
937 |
+
});
|
938 |
+
|
939 |
+
if (params.input) {
|
940 |
+
if (rerender) {
|
941 |
+
showInput(params);
|
942 |
+
} // set custom class
|
943 |
+
|
944 |
+
|
945 |
+
setCustomClass(params);
|
946 |
+
}
|
947 |
+
};
|
948 |
+
|
949 |
+
var showInput = function showInput(params) {
|
950 |
+
if (!renderInputType[params.input]) {
|
951 |
+
return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\""));
|
952 |
+
}
|
953 |
+
|
954 |
+
var inputContainer = getInputContainer(params.input);
|
955 |
+
var input = renderInputType[params.input](inputContainer, params);
|
956 |
+
show(input); // input autofocus
|
957 |
+
|
958 |
+
setTimeout(function () {
|
959 |
+
focusInput(input);
|
960 |
+
});
|
961 |
+
};
|
962 |
+
|
963 |
+
var removeAttributes = function removeAttributes(input) {
|
964 |
+
for (var i = 0; i < input.attributes.length; i++) {
|
965 |
+
var attrName = input.attributes[i].name;
|
966 |
+
|
967 |
+
if (!(['type', 'value', 'style'].indexOf(attrName) !== -1)) {
|
968 |
+
input.removeAttribute(attrName);
|
969 |
+
}
|
970 |
+
}
|
971 |
+
};
|
972 |
+
|
973 |
+
var setAttributes = function setAttributes(inputType, inputAttributes) {
|
974 |
+
var input = getInput(getContent(), inputType);
|
975 |
+
|
976 |
+
if (!input) {
|
977 |
+
return;
|
978 |
+
}
|
979 |
+
|
980 |
+
removeAttributes(input);
|
981 |
+
|
982 |
+
for (var attr in inputAttributes) {
|
983 |
+
// Do not set a placeholder for <input type="range">
|
984 |
+
// it'll crash Edge, #1298
|
985 |
+
if (inputType === 'range' && attr === 'placeholder') {
|
986 |
+
continue;
|
987 |
+
}
|
988 |
+
|
989 |
+
input.setAttribute(attr, inputAttributes[attr]);
|
990 |
+
}
|
991 |
+
};
|
992 |
+
|
993 |
+
var setCustomClass = function setCustomClass(params) {
|
994 |
+
var inputContainer = getInputContainer(params.input);
|
995 |
+
|
996 |
+
if (params.customClass) {
|
997 |
+
addClass(inputContainer, params.customClass.input);
|
998 |
+
}
|
999 |
+
};
|
1000 |
+
|
1001 |
+
var setInputPlaceholder = function setInputPlaceholder(input, params) {
|
1002 |
+
if (!input.placeholder || params.inputPlaceholder) {
|
1003 |
+
input.placeholder = params.inputPlaceholder;
|
1004 |
+
}
|
1005 |
+
};
|
1006 |
+
|
1007 |
+
var getInputContainer = function getInputContainer(inputType) {
|
1008 |
+
var inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input;
|
1009 |
+
return getChildByClass(getContent(), inputClass);
|
1010 |
+
};
|
1011 |
+
|
1012 |
+
var renderInputType = {};
|
1013 |
+
|
1014 |
+
renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = function (input, params) {
|
1015 |
+
if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') {
|
1016 |
+
input.value = params.inputValue;
|
1017 |
+
} else if (!isPromise(params.inputValue)) {
|
1018 |
+
warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(_typeof(params.inputValue), "\""));
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
setInputPlaceholder(input, params);
|
1022 |
+
input.type = params.input;
|
1023 |
+
return input;
|
1024 |
+
};
|
1025 |
+
|
1026 |
+
renderInputType.file = function (input, params) {
|
1027 |
+
setInputPlaceholder(input, params);
|
1028 |
+
return input;
|
1029 |
+
};
|
1030 |
+
|
1031 |
+
renderInputType.range = function (range, params) {
|
1032 |
+
var rangeInput = range.querySelector('input');
|
1033 |
+
var rangeOutput = range.querySelector('output');
|
1034 |
+
rangeInput.value = params.inputValue;
|
1035 |
+
rangeInput.type = params.input;
|
1036 |
+
rangeOutput.value = params.inputValue;
|
1037 |
+
return range;
|
1038 |
+
};
|
1039 |
+
|
1040 |
+
renderInputType.select = function (select, params) {
|
1041 |
+
select.textContent = '';
|
1042 |
+
|
1043 |
+
if (params.inputPlaceholder) {
|
1044 |
+
var placeholder = document.createElement('option');
|
1045 |
+
setInnerHtml(placeholder, params.inputPlaceholder);
|
1046 |
+
placeholder.value = '';
|
1047 |
+
placeholder.disabled = true;
|
1048 |
+
placeholder.selected = true;
|
1049 |
+
select.appendChild(placeholder);
|
1050 |
+
}
|
1051 |
+
|
1052 |
+
return select;
|
1053 |
+
};
|
1054 |
+
|
1055 |
+
renderInputType.radio = function (radio) {
|
1056 |
+
radio.textContent = '';
|
1057 |
+
return radio;
|
1058 |
+
};
|
1059 |
+
|
1060 |
+
renderInputType.checkbox = function (checkboxContainer, params) {
|
1061 |
+
var checkbox = getInput(getContent(), 'checkbox');
|
1062 |
+
checkbox.value = 1;
|
1063 |
+
checkbox.id = swalClasses.checkbox;
|
1064 |
+
checkbox.checked = Boolean(params.inputValue);
|
1065 |
+
var label = checkboxContainer.querySelector('span');
|
1066 |
+
setInnerHtml(label, params.inputPlaceholder);
|
1067 |
+
return checkboxContainer;
|
1068 |
+
};
|
1069 |
+
|
1070 |
+
renderInputType.textarea = function (textarea, params) {
|
1071 |
+
textarea.value = params.inputValue;
|
1072 |
+
setInputPlaceholder(textarea, params);
|
1073 |
+
|
1074 |
+
if ('MutationObserver' in window) {
|
1075 |
+
// #1699
|
1076 |
+
var initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width);
|
1077 |
+
var popupPadding = parseInt(window.getComputedStyle(getPopup()).paddingLeft) + parseInt(window.getComputedStyle(getPopup()).paddingRight);
|
1078 |
+
|
1079 |
+
var outputsize = function outputsize() {
|
1080 |
+
var contentWidth = textarea.offsetWidth + popupPadding;
|
1081 |
+
|
1082 |
+
if (contentWidth > initialPopupWidth) {
|
1083 |
+
getPopup().style.width = "".concat(contentWidth, "px");
|
1084 |
+
} else {
|
1085 |
+
getPopup().style.width = null;
|
1086 |
+
}
|
1087 |
+
};
|
1088 |
+
|
1089 |
+
new MutationObserver(outputsize).observe(textarea, {
|
1090 |
+
attributes: true,
|
1091 |
+
attributeFilter: ['style']
|
1092 |
+
});
|
1093 |
+
}
|
1094 |
+
|
1095 |
+
return textarea;
|
1096 |
+
};
|
1097 |
+
|
1098 |
+
var renderContent = function renderContent(instance, params) {
|
1099 |
+
var content = getContent().querySelector("#".concat(swalClasses.content)); // Content as HTML
|
1100 |
+
|
1101 |
+
if (params.html) {
|
1102 |
+
parseHtmlToContainer(params.html, content);
|
1103 |
+
show(content, 'block'); // Content as plain text
|
1104 |
+
} else if (params.text) {
|
1105 |
+
content.textContent = params.text;
|
1106 |
+
show(content, 'block'); // No content
|
1107 |
+
} else {
|
1108 |
+
hide(content);
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
renderInput(instance, params); // Custom class
|
1112 |
+
|
1113 |
+
applyCustomClass(getContent(), params, 'content');
|
1114 |
+
};
|
1115 |
+
|
1116 |
+
var renderFooter = function renderFooter(instance, params) {
|
1117 |
+
var footer = getFooter();
|
1118 |
+
toggle(footer, params.footer);
|
1119 |
+
|
1120 |
+
if (params.footer) {
|
1121 |
+
parseHtmlToContainer(params.footer, footer);
|
1122 |
+
} // Custom class
|
1123 |
+
|
1124 |
+
|
1125 |
+
applyCustomClass(footer, params, 'footer');
|
1126 |
+
};
|
1127 |
+
|
1128 |
+
var renderCloseButton = function renderCloseButton(instance, params) {
|
1129 |
+
var closeButton = getCloseButton();
|
1130 |
+
setInnerHtml(closeButton, params.closeButtonHtml); // Custom class
|
1131 |
+
|
1132 |
+
applyCustomClass(closeButton, params, 'closeButton');
|
1133 |
+
toggle(closeButton, params.showCloseButton);
|
1134 |
+
closeButton.setAttribute('aria-label', params.closeButtonAriaLabel);
|
1135 |
+
};
|
1136 |
+
|
1137 |
+
var renderIcon = function renderIcon(instance, params) {
|
1138 |
+
var innerParams = privateProps.innerParams.get(instance); // if the give icon already rendered, apply the custom class without re-rendering the icon
|
1139 |
+
|
1140 |
+
if (innerParams && params.icon === innerParams.icon && getIcon()) {
|
1141 |
+
applyCustomClass(getIcon(), params, 'icon');
|
1142 |
+
return;
|
1143 |
+
}
|
1144 |
+
|
1145 |
+
hideAllIcons();
|
1146 |
+
|
1147 |
+
if (!params.icon) {
|
1148 |
+
return;
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
if (Object.keys(iconTypes).indexOf(params.icon) !== -1) {
|
1152 |
+
var icon = elementBySelector(".".concat(swalClasses.icon, ".").concat(iconTypes[params.icon]));
|
1153 |
+
show(icon); // Custom or default content
|
1154 |
+
|
1155 |
+
setContent(icon, params);
|
1156 |
+
adjustSuccessIconBackgoundColor(); // Custom class
|
1157 |
+
|
1158 |
+
applyCustomClass(icon, params, 'icon'); // Animate icon
|
1159 |
+
|
1160 |
+
addClass(icon, params.showClass.icon);
|
1161 |
+
} else {
|
1162 |
+
error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\""));
|
1163 |
+
}
|
1164 |
+
};
|
1165 |
+
|
1166 |
+
var hideAllIcons = function hideAllIcons() {
|
1167 |
+
var icons = getIcons();
|
1168 |
+
|
1169 |
+
for (var i = 0; i < icons.length; i++) {
|
1170 |
+
hide(icons[i]);
|
1171 |
+
}
|
1172 |
+
}; // Adjust success icon background color to match the popup background color
|
1173 |
+
|
1174 |
+
|
1175 |
+
var adjustSuccessIconBackgoundColor = function adjustSuccessIconBackgoundColor() {
|
1176 |
+
var popup = getPopup();
|
1177 |
+
var popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');
|
1178 |
+
var successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');
|
1179 |
+
|
1180 |
+
for (var i = 0; i < successIconParts.length; i++) {
|
1181 |
+
successIconParts[i].style.backgroundColor = popupBackgroundColor;
|
1182 |
+
}
|
1183 |
+
};
|
1184 |
+
|
1185 |
+
var setContent = function setContent(icon, params) {
|
1186 |
+
icon.textContent = '';
|
1187 |
+
|
1188 |
+
if (params.iconHtml) {
|
1189 |
+
setInnerHtml(icon, iconContent(params.iconHtml));
|
1190 |
+
} else if (params.icon === 'success') {
|
1191 |
+
setInnerHtml(icon, "\n <div class=\"swal2-success-circular-line-left\"></div>\n <span class=\"swal2-success-line-tip\"></span> <span class=\"swal2-success-line-long\"></span>\n <div class=\"swal2-success-ring\"></div> <div class=\"swal2-success-fix\"></div>\n <div class=\"swal2-success-circular-line-right\"></div>\n ");
|
1192 |
+
} else if (params.icon === 'error') {
|
1193 |
+
setInnerHtml(icon, "\n <span class=\"swal2-x-mark\">\n <span class=\"swal2-x-mark-line-left\"></span>\n <span class=\"swal2-x-mark-line-right\"></span>\n </span>\n ");
|
1194 |
+
} else {
|
1195 |
+
var defaultIconHtml = {
|
1196 |
+
question: '?',
|
1197 |
+
warning: '!',
|
1198 |
+
info: 'i'
|
1199 |
+
};
|
1200 |
+
setInnerHtml(icon, iconContent(defaultIconHtml[params.icon]));
|
1201 |
+
}
|
1202 |
+
};
|
1203 |
+
|
1204 |
+
var iconContent = function iconContent(content) {
|
1205 |
+
return "<div class=\"".concat(swalClasses['icon-content'], "\">").concat(content, "</div>");
|
1206 |
+
};
|
1207 |
+
|
1208 |
+
var renderImage = function renderImage(instance, params) {
|
1209 |
+
var image = getImage();
|
1210 |
+
|
1211 |
+
if (!params.imageUrl) {
|
1212 |
+
return hide(image);
|
1213 |
+
}
|
1214 |
+
|
1215 |
+
show(image, ''); // Src, alt
|
1216 |
+
|
1217 |
+
image.setAttribute('src', params.imageUrl);
|
1218 |
+
image.setAttribute('alt', params.imageAlt); // Width, height
|
1219 |
+
|
1220 |
+
applyNumericalStyle(image, 'width', params.imageWidth);
|
1221 |
+
applyNumericalStyle(image, 'height', params.imageHeight); // Class
|
1222 |
+
|
1223 |
+
image.className = swalClasses.image;
|
1224 |
+
applyCustomClass(image, params, 'image');
|
1225 |
+
};
|
1226 |
+
|
1227 |
+
var currentSteps = [];
|
1228 |
+
/*
|
1229 |
+
* Global function for chaining sweetAlert popups
|
1230 |
+
*/
|
1231 |
+
|
1232 |
+
var queue = function queue(steps) {
|
1233 |
+
var Swal = this;
|
1234 |
+
currentSteps = steps;
|
1235 |
+
|
1236 |
+
var resetAndResolve = function resetAndResolve(resolve, value) {
|
1237 |
+
currentSteps = [];
|
1238 |
+
resolve(value);
|
1239 |
+
};
|
1240 |
+
|
1241 |
+
var queueResult = [];
|
1242 |
+
return new Promise(function (resolve) {
|
1243 |
+
(function step(i, callback) {
|
1244 |
+
if (i < currentSteps.length) {
|
1245 |
+
document.body.setAttribute('data-swal2-queue-step', i);
|
1246 |
+
Swal.fire(currentSteps[i]).then(function (result) {
|
1247 |
+
if (typeof result.value !== 'undefined') {
|
1248 |
+
queueResult.push(result.value);
|
1249 |
+
step(i + 1, callback);
|
1250 |
+
} else {
|
1251 |
+
resetAndResolve(resolve, {
|
1252 |
+
dismiss: result.dismiss
|
1253 |
+
});
|
1254 |
+
}
|
1255 |
+
});
|
1256 |
+
} else {
|
1257 |
+
resetAndResolve(resolve, {
|
1258 |
+
value: queueResult
|
1259 |
+
});
|
1260 |
+
}
|
1261 |
+
})(0);
|
1262 |
+
});
|
1263 |
+
};
|
1264 |
+
/*
|
1265 |
+
* Global function for getting the index of current popup in queue
|
1266 |
+
*/
|
1267 |
+
|
1268 |
+
var getQueueStep = function getQueueStep() {
|
1269 |
+
return getContainer() && getContainer().getAttribute('data-queue-step');
|
1270 |
+
};
|
1271 |
+
/*
|
1272 |
+
* Global function for inserting a popup to the queue
|
1273 |
+
*/
|
1274 |
+
|
1275 |
+
var insertQueueStep = function insertQueueStep(step, index) {
|
1276 |
+
if (index && index < currentSteps.length) {
|
1277 |
+
return currentSteps.splice(index, 0, step);
|
1278 |
+
}
|
1279 |
+
|
1280 |
+
return currentSteps.push(step);
|
1281 |
+
};
|
1282 |
+
/*
|
1283 |
+
* Global function for deleting a popup from the queue
|
1284 |
+
*/
|
1285 |
+
|
1286 |
+
var deleteQueueStep = function deleteQueueStep(index) {
|
1287 |
+
if (typeof currentSteps[index] !== 'undefined') {
|
1288 |
+
currentSteps.splice(index, 1);
|
1289 |
+
}
|
1290 |
+
};
|
1291 |
+
|
1292 |
+
var createStepElement = function createStepElement(step) {
|
1293 |
+
var stepEl = document.createElement('li');
|
1294 |
+
addClass(stepEl, swalClasses['progress-step']);
|
1295 |
+
setInnerHtml(stepEl, step);
|
1296 |
+
return stepEl;
|
1297 |
+
};
|
1298 |
+
|
1299 |
+
var createLineElement = function createLineElement(params) {
|
1300 |
+
var lineEl = document.createElement('li');
|
1301 |
+
addClass(lineEl, swalClasses['progress-step-line']);
|
1302 |
+
|
1303 |
+
if (params.progressStepsDistance) {
|
1304 |
+
lineEl.style.width = params.progressStepsDistance;
|
1305 |
+
}
|
1306 |
+
|
1307 |
+
return lineEl;
|
1308 |
+
};
|
1309 |
+
|
1310 |
+
var renderProgressSteps = function renderProgressSteps(instance, params) {
|
1311 |
+
var progressStepsContainer = getProgressSteps();
|
1312 |
+
|
1313 |
+
if (!params.progressSteps || params.progressSteps.length === 0) {
|
1314 |
+
return hide(progressStepsContainer);
|
1315 |
+
}
|
1316 |
+
|
1317 |
+
show(progressStepsContainer);
|
1318 |
+
progressStepsContainer.textContent = '';
|
1319 |
+
var currentProgressStep = parseInt(params.currentProgressStep === undefined ? getQueueStep() : params.currentProgressStep);
|
1320 |
+
|
1321 |
+
if (currentProgressStep >= params.progressSteps.length) {
|
1322 |
+
warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)');
|
1323 |
+
}
|
1324 |
+
|
1325 |
+
params.progressSteps.forEach(function (step, index) {
|
1326 |
+
var stepEl = createStepElement(step);
|
1327 |
+
progressStepsContainer.appendChild(stepEl);
|
1328 |
+
|
1329 |
+
if (index === currentProgressStep) {
|
1330 |
+
addClass(stepEl, swalClasses['active-progress-step']);
|
1331 |
+
}
|
1332 |
+
|
1333 |
+
if (index !== params.progressSteps.length - 1) {
|
1334 |
+
var lineEl = createLineElement(step);
|
1335 |
+
progressStepsContainer.appendChild(lineEl);
|
1336 |
+
}
|
1337 |
+
});
|
1338 |
+
};
|
1339 |
+
|
1340 |
+
var renderTitle = function renderTitle(instance, params) {
|
1341 |
+
var title = getTitle();
|
1342 |
+
toggle(title, params.title || params.titleText);
|
1343 |
+
|
1344 |
+
if (params.title) {
|
1345 |
+
parseHtmlToContainer(params.title, title);
|
1346 |
+
}
|
1347 |
+
|
1348 |
+
if (params.titleText) {
|
1349 |
+
title.innerText = params.titleText;
|
1350 |
+
} // Custom class
|
1351 |
+
|
1352 |
+
|
1353 |
+
applyCustomClass(title, params, 'title');
|
1354 |
+
};
|
1355 |
+
|
1356 |
+
var renderHeader = function renderHeader(instance, params) {
|
1357 |
+
var header = getHeader(); // Custom class
|
1358 |
+
|
1359 |
+
applyCustomClass(header, params, 'header'); // Progress steps
|
1360 |
+
|
1361 |
+
renderProgressSteps(instance, params); // Icon
|
1362 |
+
|
1363 |
+
renderIcon(instance, params); // Image
|
1364 |
+
|
1365 |
+
renderImage(instance, params); // Title
|
1366 |
+
|
1367 |
+
renderTitle(instance, params); // Close button
|
1368 |
+
|
1369 |
+
renderCloseButton(instance, params);
|
1370 |
+
};
|
1371 |
+
|
1372 |
+
var renderPopup = function renderPopup(instance, params) {
|
1373 |
+
var popup = getPopup(); // Width
|
1374 |
+
|
1375 |
+
applyNumericalStyle(popup, 'width', params.width); // Padding
|
1376 |
+
|
1377 |
+
applyNumericalStyle(popup, 'padding', params.padding); // Background
|
1378 |
+
|
1379 |
+
if (params.background) {
|
1380 |
+
popup.style.background = params.background;
|
1381 |
+
} // Classes
|
1382 |
+
|
1383 |
+
|
1384 |
+
addClasses(popup, params);
|
1385 |
+
};
|
1386 |
+
|
1387 |
+
var addClasses = function addClasses(popup, params) {
|
1388 |
+
// Default Class + showClass when updating Swal.update({})
|
1389 |
+
popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : '');
|
1390 |
+
|
1391 |
+
if (params.toast) {
|
1392 |
+
addClass([document.documentElement, document.body], swalClasses['toast-shown']);
|
1393 |
+
addClass(popup, swalClasses.toast);
|
1394 |
+
} else {
|
1395 |
+
addClass(popup, swalClasses.modal);
|
1396 |
+
} // Custom class
|
1397 |
+
|
1398 |
+
|
1399 |
+
applyCustomClass(popup, params, 'popup');
|
1400 |
+
|
1401 |
+
if (typeof params.customClass === 'string') {
|
1402 |
+
addClass(popup, params.customClass);
|
1403 |
+
} // Icon class (#1842)
|
1404 |
+
|
1405 |
+
|
1406 |
+
if (params.icon) {
|
1407 |
+
addClass(popup, swalClasses["icon-".concat(params.icon)]);
|
1408 |
+
}
|
1409 |
+
};
|
1410 |
+
|
1411 |
+
var render = function render(instance, params) {
|
1412 |
+
renderPopup(instance, params);
|
1413 |
+
renderContainer(instance, params);
|
1414 |
+
renderHeader(instance, params);
|
1415 |
+
renderContent(instance, params);
|
1416 |
+
renderActions(instance, params);
|
1417 |
+
renderFooter(instance, params);
|
1418 |
+
|
1419 |
+
if (typeof params.onRender === 'function') {
|
1420 |
+
params.onRender(getPopup());
|
1421 |
+
}
|
1422 |
+
};
|
1423 |
+
|
1424 |
+
/*
|
1425 |
+
* Global function to determine if SweetAlert2 popup is shown
|
1426 |
+
*/
|
1427 |
+
|
1428 |
+
var isVisible$1 = function isVisible$$1() {
|
1429 |
+
return isVisible(getPopup());
|
1430 |
+
};
|
1431 |
+
/*
|
1432 |
+
* Global function to click 'Confirm' button
|
1433 |
+
*/
|
1434 |
+
|
1435 |
+
var clickConfirm = function clickConfirm() {
|
1436 |
+
return getConfirmButton() && getConfirmButton().click();
|
1437 |
+
};
|
1438 |
+
/*
|
1439 |
+
* Global function to click 'Cancel' button
|
1440 |
+
*/
|
1441 |
+
|
1442 |
+
var clickCancel = function clickCancel() {
|
1443 |
+
return getCancelButton() && getCancelButton().click();
|
1444 |
+
};
|
1445 |
+
|
1446 |
+
function fire() {
|
1447 |
+
var Swal = this;
|
1448 |
+
|
1449 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
1450 |
+
args[_key] = arguments[_key];
|
1451 |
+
}
|
1452 |
+
|
1453 |
+
return _construct(Swal, args);
|
1454 |
+
}
|
1455 |
+
|
1456 |
+
/**
|
1457 |
+
* Returns an extended version of `Swal` containing `params` as defaults.
|
1458 |
+
* Useful for reusing Swal configuration.
|
1459 |
+
*
|
1460 |
+
* For example:
|
1461 |
+
*
|
1462 |
+
* Before:
|
1463 |
+
* const textPromptOptions = { input: 'text', showCancelButton: true }
|
1464 |
+
* const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' })
|
1465 |
+
* const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' })
|
1466 |
+
*
|
1467 |
+
* After:
|
1468 |
+
* const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true })
|
1469 |
+
* const {value: firstName} = await TextPrompt('What is your first name?')
|
1470 |
+
* const {value: lastName} = await TextPrompt('What is your last name?')
|
1471 |
+
*
|
1472 |
+
* @param mixinParams
|
1473 |
+
*/
|
1474 |
+
function mixin(mixinParams) {
|
1475 |
+
var MixinSwal = /*#__PURE__*/function (_this) {
|
1476 |
+
_inherits(MixinSwal, _this);
|
1477 |
+
|
1478 |
+
var _super = _createSuper(MixinSwal);
|
1479 |
+
|
1480 |
+
function MixinSwal() {
|
1481 |
+
_classCallCheck(this, MixinSwal);
|
1482 |
+
|
1483 |
+
return _super.apply(this, arguments);
|
1484 |
+
}
|
1485 |
+
|
1486 |
+
_createClass(MixinSwal, [{
|
1487 |
+
key: "_main",
|
1488 |
+
value: function _main(params) {
|
1489 |
+
return _get(_getPrototypeOf(MixinSwal.prototype), "_main", this).call(this, _extends({}, mixinParams, params));
|
1490 |
+
}
|
1491 |
+
}]);
|
1492 |
+
|
1493 |
+
return MixinSwal;
|
1494 |
+
}(this);
|
1495 |
+
|
1496 |
+
return MixinSwal;
|
1497 |
+
}
|
1498 |
+
|
1499 |
+
/**
|
1500 |
+
* Show spinner instead of Confirm button
|
1501 |
+
*/
|
1502 |
+
|
1503 |
+
var showLoading = function showLoading() {
|
1504 |
+
var popup = getPopup();
|
1505 |
+
|
1506 |
+
if (!popup) {
|
1507 |
+
Swal.fire();
|
1508 |
+
}
|
1509 |
+
|
1510 |
+
popup = getPopup();
|
1511 |
+
var actions = getActions();
|
1512 |
+
var confirmButton = getConfirmButton();
|
1513 |
+
show(actions);
|
1514 |
+
show(confirmButton, 'inline-block');
|
1515 |
+
addClass([popup, actions], swalClasses.loading);
|
1516 |
+
confirmButton.disabled = true;
|
1517 |
+
popup.setAttribute('data-loading', true);
|
1518 |
+
popup.setAttribute('aria-busy', true);
|
1519 |
+
popup.focus();
|
1520 |
+
};
|
1521 |
+
|
1522 |
+
var RESTORE_FOCUS_TIMEOUT = 100;
|
1523 |
+
|
1524 |
+
var globalState = {};
|
1525 |
+
|
1526 |
+
var focusPreviousActiveElement = function focusPreviousActiveElement() {
|
1527 |
+
if (globalState.previousActiveElement && globalState.previousActiveElement.focus) {
|
1528 |
+
globalState.previousActiveElement.focus();
|
1529 |
+
globalState.previousActiveElement = null;
|
1530 |
+
} else if (document.body) {
|
1531 |
+
document.body.focus();
|
1532 |
+
}
|
1533 |
+
}; // Restore previous active (focused) element
|
1534 |
+
|
1535 |
+
|
1536 |
+
var restoreActiveElement = function restoreActiveElement() {
|
1537 |
+
return new Promise(function (resolve) {
|
1538 |
+
var x = window.scrollX;
|
1539 |
+
var y = window.scrollY;
|
1540 |
+
globalState.restoreFocusTimeout = setTimeout(function () {
|
1541 |
+
focusPreviousActiveElement();
|
1542 |
+
resolve();
|
1543 |
+
}, RESTORE_FOCUS_TIMEOUT); // issues/900
|
1544 |
+
|
1545 |
+
/* istanbul ignore if */
|
1546 |
+
|
1547 |
+
if (typeof x !== 'undefined' && typeof y !== 'undefined') {
|
1548 |
+
// IE doesn't have scrollX/scrollY support
|
1549 |
+
window.scrollTo(x, y);
|
1550 |
+
}
|
1551 |
+
});
|
1552 |
+
};
|
1553 |
+
|
1554 |
+
/**
|
1555 |
+
* If `timer` parameter is set, returns number of milliseconds of timer remained.
|
1556 |
+
* Otherwise, returns undefined.
|
1557 |
+
*/
|
1558 |
+
|
1559 |
+
var getTimerLeft = function getTimerLeft() {
|
1560 |
+
return globalState.timeout && globalState.timeout.getTimerLeft();
|
1561 |
+
};
|
1562 |
+
/**
|
1563 |
+
* Stop timer. Returns number of milliseconds of timer remained.
|
1564 |
+
* If `timer` parameter isn't set, returns undefined.
|
1565 |
+
*/
|
1566 |
+
|
1567 |
+
var stopTimer = function stopTimer() {
|
1568 |
+
if (globalState.timeout) {
|
1569 |
+
stopTimerProgressBar();
|
1570 |
+
return globalState.timeout.stop();
|
1571 |
+
}
|
1572 |
+
};
|
1573 |
+
/**
|
1574 |
+
* Resume timer. Returns number of milliseconds of timer remained.
|
1575 |
+
* If `timer` parameter isn't set, returns undefined.
|
1576 |
+
*/
|
1577 |
+
|
1578 |
+
var resumeTimer = function resumeTimer() {
|
1579 |
+
if (globalState.timeout) {
|
1580 |
+
var remaining = globalState.timeout.start();
|
1581 |
+
animateTimerProgressBar(remaining);
|
1582 |
+
return remaining;
|
1583 |
+
}
|
1584 |
+
};
|
1585 |
+
/**
|
1586 |
+
* Resume timer. Returns number of milliseconds of timer remained.
|
1587 |
+
* If `timer` parameter isn't set, returns undefined.
|
1588 |
+
*/
|
1589 |
+
|
1590 |
+
var toggleTimer = function toggleTimer() {
|
1591 |
+
var timer = globalState.timeout;
|
1592 |
+
return timer && (timer.running ? stopTimer() : resumeTimer());
|
1593 |
+
};
|
1594 |
+
/**
|
1595 |
+
* Increase timer. Returns number of milliseconds of an updated timer.
|
1596 |
+
* If `timer` parameter isn't set, returns undefined.
|
1597 |
+
*/
|
1598 |
+
|
1599 |
+
var increaseTimer = function increaseTimer(n) {
|
1600 |
+
if (globalState.timeout) {
|
1601 |
+
var remaining = globalState.timeout.increase(n);
|
1602 |
+
animateTimerProgressBar(remaining, true);
|
1603 |
+
return remaining;
|
1604 |
+
}
|
1605 |
+
};
|
1606 |
+
/**
|
1607 |
+
* Check if timer is running. Returns true if timer is running
|
1608 |
+
* or false if timer is paused or stopped.
|
1609 |
+
* If `timer` parameter isn't set, returns undefined
|
1610 |
+
*/
|
1611 |
+
|
1612 |
+
var isTimerRunning = function isTimerRunning() {
|
1613 |
+
return globalState.timeout && globalState.timeout.isRunning();
|
1614 |
+
};
|
1615 |
+
|
1616 |
+
var defaultParams = {
|
1617 |
+
title: '',
|
1618 |
+
titleText: '',
|
1619 |
+
text: '',
|
1620 |
+
html: '',
|
1621 |
+
footer: '',
|
1622 |
+
icon: undefined,
|
1623 |
+
iconHtml: undefined,
|
1624 |
+
toast: false,
|
1625 |
+
animation: true,
|
1626 |
+
showClass: {
|
1627 |
+
popup: 'swal2-show',
|
1628 |
+
backdrop: 'swal2-backdrop-show',
|
1629 |
+
icon: 'swal2-icon-show'
|
1630 |
+
},
|
1631 |
+
hideClass: {
|
1632 |
+
popup: 'swal2-hide',
|
1633 |
+
backdrop: 'swal2-backdrop-hide',
|
1634 |
+
icon: 'swal2-icon-hide'
|
1635 |
+
},
|
1636 |
+
customClass: undefined,
|
1637 |
+
target: 'body',
|
1638 |
+
backdrop: true,
|
1639 |
+
heightAuto: true,
|
1640 |
+
allowOutsideClick: true,
|
1641 |
+
allowEscapeKey: true,
|
1642 |
+
allowEnterKey: true,
|
1643 |
+
stopKeydownPropagation: true,
|
1644 |
+
keydownListenerCapture: false,
|
1645 |
+
showConfirmButton: true,
|
1646 |
+
showCancelButton: false,
|
1647 |
+
preConfirm: undefined,
|
1648 |
+
confirmButtonText: 'OK',
|
1649 |
+
confirmButtonAriaLabel: '',
|
1650 |
+
confirmButtonColor: undefined,
|
1651 |
+
cancelButtonText: 'Cancel',
|
1652 |
+
cancelButtonAriaLabel: '',
|
1653 |
+
cancelButtonColor: undefined,
|
1654 |
+
buttonsStyling: true,
|
1655 |
+
reverseButtons: false,
|
1656 |
+
focusConfirm: true,
|
1657 |
+
focusCancel: false,
|
1658 |
+
showCloseButton: false,
|
1659 |
+
closeButtonHtml: '×',
|
1660 |
+
closeButtonAriaLabel: 'Close this dialog',
|
1661 |
+
showLoaderOnConfirm: false,
|
1662 |
+
imageUrl: undefined,
|
1663 |
+
imageWidth: undefined,
|
1664 |
+
imageHeight: undefined,
|
1665 |
+
imageAlt: '',
|
1666 |
+
timer: undefined,
|
1667 |
+
timerProgressBar: false,
|
1668 |
+
width: undefined,
|
1669 |
+
padding: undefined,
|
1670 |
+
background: undefined,
|
1671 |
+
input: undefined,
|
1672 |
+
inputPlaceholder: '',
|
1673 |
+
inputValue: '',
|
1674 |
+
inputOptions: {},
|
1675 |
+
inputAutoTrim: true,
|
1676 |
+
inputAttributes: {},
|
1677 |
+
inputValidator: undefined,
|
1678 |
+
validationMessage: undefined,
|
1679 |
+
grow: false,
|
1680 |
+
position: 'center',
|
1681 |
+
progressSteps: [],
|
1682 |
+
currentProgressStep: undefined,
|
1683 |
+
progressStepsDistance: undefined,
|
1684 |
+
onBeforeOpen: undefined,
|
1685 |
+
onOpen: undefined,
|
1686 |
+
onRender: undefined,
|
1687 |
+
onClose: undefined,
|
1688 |
+
onAfterClose: undefined,
|
1689 |
+
onDestroy: undefined,
|
1690 |
+
scrollbarPadding: true
|
1691 |
+
};
|
1692 |
+
var updatableParams = ['title', 'titleText', 'text', 'html', 'footer', 'icon', 'hideClass', 'customClass', 'allowOutsideClick', 'allowEscapeKey', 'showConfirmButton', 'showCancelButton', 'confirmButtonText', 'confirmButtonAriaLabel', 'confirmButtonColor', 'cancelButtonText', 'cancelButtonAriaLabel', 'cancelButtonColor', 'buttonsStyling', 'reverseButtons', 'imageUrl', 'imageWidth', 'imageHeight', 'imageAlt', 'progressSteps', 'currentProgressStep', 'onClose', 'onAfterClose', 'onDestroy'];
|
1693 |
+
var deprecatedParams = {
|
1694 |
+
animation: 'showClass" and "hideClass'
|
1695 |
+
};
|
1696 |
+
var toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusCancel', 'heightAuto', 'keydownListenerCapture'];
|
1697 |
+
/**
|
1698 |
+
* Is valid parameter
|
1699 |
+
* @param {String} paramName
|
1700 |
+
*/
|
1701 |
+
|
1702 |
+
var isValidParameter = function isValidParameter(paramName) {
|
1703 |
+
return Object.prototype.hasOwnProperty.call(defaultParams, paramName);
|
1704 |
+
};
|
1705 |
+
/**
|
1706 |
+
* Is valid parameter for Swal.update() method
|
1707 |
+
* @param {String} paramName
|
1708 |
+
*/
|
1709 |
+
|
1710 |
+
var isUpdatableParameter = function isUpdatableParameter(paramName) {
|
1711 |
+
return updatableParams.indexOf(paramName) !== -1;
|
1712 |
+
};
|
1713 |
+
/**
|
1714 |
+
* Is deprecated parameter
|
1715 |
+
* @param {String} paramName
|
1716 |
+
*/
|
1717 |
+
|
1718 |
+
var isDeprecatedParameter = function isDeprecatedParameter(paramName) {
|
1719 |
+
return deprecatedParams[paramName];
|
1720 |
+
};
|
1721 |
+
|
1722 |
+
var checkIfParamIsValid = function checkIfParamIsValid(param) {
|
1723 |
+
if (!isValidParameter(param)) {
|
1724 |
+
warn("Unknown parameter \"".concat(param, "\""));
|
1725 |
+
}
|
1726 |
+
};
|
1727 |
+
|
1728 |
+
var checkIfToastParamIsValid = function checkIfToastParamIsValid(param) {
|
1729 |
+
if (toastIncompatibleParams.indexOf(param) !== -1) {
|
1730 |
+
warn("The parameter \"".concat(param, "\" is incompatible with toasts"));
|
1731 |
+
}
|
1732 |
+
};
|
1733 |
+
|
1734 |
+
var checkIfParamIsDeprecated = function checkIfParamIsDeprecated(param) {
|
1735 |
+
if (isDeprecatedParameter(param)) {
|
1736 |
+
warnAboutDepreation(param, isDeprecatedParameter(param));
|
1737 |
+
}
|
1738 |
+
};
|
1739 |
+
/**
|
1740 |
+
* Show relevant warnings for given params
|
1741 |
+
*
|
1742 |
+
* @param params
|
1743 |
+
*/
|
1744 |
+
|
1745 |
+
|
1746 |
+
var showWarningsForParams = function showWarningsForParams(params) {
|
1747 |
+
for (var param in params) {
|
1748 |
+
checkIfParamIsValid(param);
|
1749 |
+
|
1750 |
+
if (params.toast) {
|
1751 |
+
checkIfToastParamIsValid(param);
|
1752 |
+
}
|
1753 |
+
|
1754 |
+
checkIfParamIsDeprecated(param);
|
1755 |
+
}
|
1756 |
+
};
|
1757 |
+
|
1758 |
+
|
1759 |
+
|
1760 |
+
var staticMethods = /*#__PURE__*/Object.freeze({
|
1761 |
+
isValidParameter: isValidParameter,
|
1762 |
+
isUpdatableParameter: isUpdatableParameter,
|
1763 |
+
isDeprecatedParameter: isDeprecatedParameter,
|
1764 |
+
argsToParams: argsToParams,
|
1765 |
+
isVisible: isVisible$1,
|
1766 |
+
clickConfirm: clickConfirm,
|
1767 |
+
clickCancel: clickCancel,
|
1768 |
+
getContainer: getContainer,
|
1769 |
+
getPopup: getPopup,
|
1770 |
+
getTitle: getTitle,
|
1771 |
+
getContent: getContent,
|
1772 |
+
getHtmlContainer: getHtmlContainer,
|
1773 |
+
getImage: getImage,
|
1774 |
+
getIcon: getIcon,
|
1775 |
+
getIcons: getIcons,
|
1776 |
+
getCloseButton: getCloseButton,
|
1777 |
+
getActions: getActions,
|
1778 |
+
getConfirmButton: getConfirmButton,
|
1779 |
+
getCancelButton: getCancelButton,
|
1780 |
+
getHeader: getHeader,
|
1781 |
+
getFooter: getFooter,
|
1782 |
+
getTimerProgressBar: getTimerProgressBar,
|
1783 |
+
getFocusableElements: getFocusableElements,
|
1784 |
+
getValidationMessage: getValidationMessage,
|
1785 |
+
isLoading: isLoading,
|
1786 |
+
fire: fire,
|
1787 |
+
mixin: mixin,
|
1788 |
+
queue: queue,
|
1789 |
+
getQueueStep: getQueueStep,
|
1790 |
+
insertQueueStep: insertQueueStep,
|
1791 |
+
deleteQueueStep: deleteQueueStep,
|
1792 |
+
showLoading: showLoading,
|
1793 |
+
enableLoading: showLoading,
|
1794 |
+
getTimerLeft: getTimerLeft,
|
1795 |
+
stopTimer: stopTimer,
|
1796 |
+
resumeTimer: resumeTimer,
|
1797 |
+
toggleTimer: toggleTimer,
|
1798 |
+
increaseTimer: increaseTimer,
|
1799 |
+
isTimerRunning: isTimerRunning
|
1800 |
+
});
|
1801 |
+
|
1802 |
+
/**
|
1803 |
+
* Enables buttons and hide loader.
|
1804 |
+
*/
|
1805 |
+
|
1806 |
+
function hideLoading() {
|
1807 |
+
// do nothing if popup is closed
|
1808 |
+
var innerParams = privateProps.innerParams.get(this);
|
1809 |
+
|
1810 |
+
if (!innerParams) {
|
1811 |
+
return;
|
1812 |
+
}
|
1813 |
+
|
1814 |
+
var domCache = privateProps.domCache.get(this);
|
1815 |
+
|
1816 |
+
if (!innerParams.showConfirmButton) {
|
1817 |
+
hide(domCache.confirmButton);
|
1818 |
+
|
1819 |
+
if (!innerParams.showCancelButton) {
|
1820 |
+
hide(domCache.actions);
|
1821 |
+
}
|
1822 |
+
}
|
1823 |
+
|
1824 |
+
removeClass([domCache.popup, domCache.actions], swalClasses.loading);
|
1825 |
+
domCache.popup.removeAttribute('aria-busy');
|
1826 |
+
domCache.popup.removeAttribute('data-loading');
|
1827 |
+
domCache.confirmButton.disabled = false;
|
1828 |
+
domCache.cancelButton.disabled = false;
|
1829 |
+
}
|
1830 |
+
|
1831 |
+
function getInput$1(instance) {
|
1832 |
+
var innerParams = privateProps.innerParams.get(instance || this);
|
1833 |
+
var domCache = privateProps.domCache.get(instance || this);
|
1834 |
+
|
1835 |
+
if (!domCache) {
|
1836 |
+
return null;
|
1837 |
+
}
|
1838 |
+
|
1839 |
+
return getInput(domCache.content, innerParams.input);
|
1840 |
+
}
|
1841 |
+
|
1842 |
+
var fixScrollbar = function fixScrollbar() {
|
1843 |
+
// for queues, do not do this more than once
|
1844 |
+
if (states.previousBodyPadding !== null) {
|
1845 |
+
return;
|
1846 |
+
} // if the body has overflow
|
1847 |
+
|
1848 |
+
|
1849 |
+
if (document.body.scrollHeight > window.innerHeight) {
|
1850 |
+
// add padding so the content doesn't shift after removal of scrollbar
|
1851 |
+
states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'));
|
1852 |
+
document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px");
|
1853 |
+
}
|
1854 |
+
};
|
1855 |
+
var undoScrollbar = function undoScrollbar() {
|
1856 |
+
if (states.previousBodyPadding !== null) {
|
1857 |
+
document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px");
|
1858 |
+
states.previousBodyPadding = null;
|
1859 |
+
}
|
1860 |
+
};
|
1861 |
+
|
1862 |
+
/* istanbul ignore file */
|
1863 |
+
|
1864 |
+
var iOSfix = function iOSfix() {
|
1865 |
+
var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1;
|
1866 |
+
|
1867 |
+
if (iOS && !hasClass(document.body, swalClasses.iosfix)) {
|
1868 |
+
var offset = document.body.scrollTop;
|
1869 |
+
document.body.style.top = "".concat(offset * -1, "px");
|
1870 |
+
addClass(document.body, swalClasses.iosfix);
|
1871 |
+
lockBodyScroll();
|
1872 |
+
}
|
1873 |
+
};
|
1874 |
+
|
1875 |
+
var lockBodyScroll = function lockBodyScroll() {
|
1876 |
+
// #1246
|
1877 |
+
var container = getContainer();
|
1878 |
+
var preventTouchMove;
|
1879 |
+
|
1880 |
+
container.ontouchstart = function (e) {
|
1881 |
+
preventTouchMove = shouldPreventTouchMove(e.target);
|
1882 |
+
};
|
1883 |
+
|
1884 |
+
container.ontouchmove = function (e) {
|
1885 |
+
if (preventTouchMove) {
|
1886 |
+
e.preventDefault();
|
1887 |
+
e.stopPropagation();
|
1888 |
+
}
|
1889 |
+
};
|
1890 |
+
};
|
1891 |
+
|
1892 |
+
var shouldPreventTouchMove = function shouldPreventTouchMove(target) {
|
1893 |
+
var container = getContainer();
|
1894 |
+
|
1895 |
+
if (target === container) {
|
1896 |
+
return true;
|
1897 |
+
}
|
1898 |
+
|
1899 |
+
if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603
|
1900 |
+
!(isScrollable(getContent()) && // #1944
|
1901 |
+
getContent().contains(target))) {
|
1902 |
+
return true;
|
1903 |
+
}
|
1904 |
+
|
1905 |
+
return false;
|
1906 |
+
};
|
1907 |
+
|
1908 |
+
var undoIOSfix = function undoIOSfix() {
|
1909 |
+
if (hasClass(document.body, swalClasses.iosfix)) {
|
1910 |
+
var offset = parseInt(document.body.style.top, 10);
|
1911 |
+
removeClass(document.body, swalClasses.iosfix);
|
1912 |
+
document.body.style.top = '';
|
1913 |
+
document.body.scrollTop = offset * -1;
|
1914 |
+
}
|
1915 |
+
};
|
1916 |
+
|
1917 |
+
/* istanbul ignore file */
|
1918 |
+
|
1919 |
+
var isIE11 = function isIE11() {
|
1920 |
+
return !!window.MSInputMethodContext && !!document.documentMode;
|
1921 |
+
}; // Fix IE11 centering sweetalert2/issues/933
|
1922 |
+
|
1923 |
+
|
1924 |
+
var fixVerticalPositionIE = function fixVerticalPositionIE() {
|
1925 |
+
var container = getContainer();
|
1926 |
+
var popup = getPopup();
|
1927 |
+
container.style.removeProperty('align-items');
|
1928 |
+
|
1929 |
+
if (popup.offsetTop < 0) {
|
1930 |
+
container.style.alignItems = 'flex-start';
|
1931 |
+
}
|
1932 |
+
};
|
1933 |
+
|
1934 |
+
var IEfix = function IEfix() {
|
1935 |
+
if (typeof window !== 'undefined' && isIE11()) {
|
1936 |
+
fixVerticalPositionIE();
|
1937 |
+
window.addEventListener('resize', fixVerticalPositionIE);
|
1938 |
+
}
|
1939 |
+
};
|
1940 |
+
var undoIEfix = function undoIEfix() {
|
1941 |
+
if (typeof window !== 'undefined' && isIE11()) {
|
1942 |
+
window.removeEventListener('resize', fixVerticalPositionIE);
|
1943 |
+
}
|
1944 |
+
};
|
1945 |
+
|
1946 |
+
// Adding aria-hidden="true" to elements outside of the active modal dialog ensures that
|
1947 |
+
// elements not within the active modal dialog will not be surfaced if a user opens a screen
|
1948 |
+
// reader’s list of elements (headings, form controls, landmarks, etc.) in the document.
|
1949 |
+
|
1950 |
+
var setAriaHidden = function setAriaHidden() {
|
1951 |
+
var bodyChildren = toArray(document.body.children);
|
1952 |
+
bodyChildren.forEach(function (el) {
|
1953 |
+
if (el === getContainer() || contains(el, getContainer())) {
|
1954 |
+
return;
|
1955 |
+
}
|
1956 |
+
|
1957 |
+
if (el.hasAttribute('aria-hidden')) {
|
1958 |
+
el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden'));
|
1959 |
+
}
|
1960 |
+
|
1961 |
+
el.setAttribute('aria-hidden', 'true');
|
1962 |
+
});
|
1963 |
+
};
|
1964 |
+
var unsetAriaHidden = function unsetAriaHidden() {
|
1965 |
+
var bodyChildren = toArray(document.body.children);
|
1966 |
+
bodyChildren.forEach(function (el) {
|
1967 |
+
if (el.hasAttribute('data-previous-aria-hidden')) {
|
1968 |
+
el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden'));
|
1969 |
+
el.removeAttribute('data-previous-aria-hidden');
|
1970 |
+
} else {
|
1971 |
+
el.removeAttribute('aria-hidden');
|
1972 |
+
}
|
1973 |
+
});
|
1974 |
+
};
|
1975 |
+
|
1976 |
+
/**
|
1977 |
+
* This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has.
|
1978 |
+
* For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')`
|
1979 |
+
* This is the approach that Babel will probably take to implement private methods/fields
|
1980 |
+
* https://github.com/tc39/proposal-private-methods
|
1981 |
+
* https://github.com/babel/babel/pull/7555
|
1982 |
+
* Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*
|
1983 |
+
* then we can use that language feature.
|
1984 |
+
*/
|
1985 |
+
var privateMethods = {
|
1986 |
+
swalPromiseResolve: new WeakMap()
|
1987 |
+
};
|
1988 |
+
|
1989 |
+
/*
|
1990 |
+
* Instance method to close sweetAlert
|
1991 |
+
*/
|
1992 |
+
|
1993 |
+
function removePopupAndResetState(instance, container, isToast$$1, onAfterClose) {
|
1994 |
+
if (isToast$$1) {
|
1995 |
+
triggerOnAfterCloseAndDispose(instance, onAfterClose);
|
1996 |
+
} else {
|
1997 |
+
restoreActiveElement().then(function () {
|
1998 |
+
return triggerOnAfterCloseAndDispose(instance, onAfterClose);
|
1999 |
+
});
|
2000 |
+
globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {
|
2001 |
+
capture: globalState.keydownListenerCapture
|
2002 |
+
});
|
2003 |
+
globalState.keydownHandlerAdded = false;
|
2004 |
+
}
|
2005 |
+
|
2006 |
+
if (container.parentNode && !document.body.getAttribute('data-swal2-queue-step')) {
|
2007 |
+
container.parentNode.removeChild(container);
|
2008 |
+
}
|
2009 |
+
|
2010 |
+
if (isModal()) {
|
2011 |
+
undoScrollbar();
|
2012 |
+
undoIOSfix();
|
2013 |
+
undoIEfix();
|
2014 |
+
unsetAriaHidden();
|
2015 |
+
}
|
2016 |
+
|
2017 |
+
removeBodyClasses();
|
2018 |
+
}
|
2019 |
+
|
2020 |
+
function removeBodyClasses() {
|
2021 |
+
removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['toast-column']]);
|
2022 |
+
}
|
2023 |
+
|
2024 |
+
function close(resolveValue) {
|
2025 |
+
var popup = getPopup();
|
2026 |
+
|
2027 |
+
if (!popup) {
|
2028 |
+
return;
|
2029 |
+
}
|
2030 |
+
|
2031 |
+
var innerParams = privateProps.innerParams.get(this);
|
2032 |
+
|
2033 |
+
if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) {
|
2034 |
+
return;
|
2035 |
+
}
|
2036 |
+
|
2037 |
+
var swalPromiseResolve = privateMethods.swalPromiseResolve.get(this);
|
2038 |
+
removeClass(popup, innerParams.showClass.popup);
|
2039 |
+
addClass(popup, innerParams.hideClass.popup);
|
2040 |
+
var backdrop = getContainer();
|
2041 |
+
removeClass(backdrop, innerParams.showClass.backdrop);
|
2042 |
+
addClass(backdrop, innerParams.hideClass.backdrop);
|
2043 |
+
handlePopupAnimation(this, popup, innerParams);
|
2044 |
+
|
2045 |
+
if (typeof resolveValue !== 'undefined') {
|
2046 |
+
resolveValue.isDismissed = typeof resolveValue.dismiss !== 'undefined';
|
2047 |
+
resolveValue.isConfirmed = typeof resolveValue.dismiss === 'undefined';
|
2048 |
+
} else {
|
2049 |
+
resolveValue = {
|
2050 |
+
isDismissed: true,
|
2051 |
+
isConfirmed: false
|
2052 |
+
};
|
2053 |
+
} // Resolve Swal promise
|
2054 |
+
|
2055 |
+
|
2056 |
+
swalPromiseResolve(resolveValue || {});
|
2057 |
+
}
|
2058 |
+
|
2059 |
+
var handlePopupAnimation = function handlePopupAnimation(instance, popup, innerParams) {
|
2060 |
+
var container = getContainer(); // If animation is supported, animate
|
2061 |
+
|
2062 |
+
var animationIsSupported = animationEndEvent && hasCssAnimation(popup);
|
2063 |
+
var onClose = innerParams.onClose,
|
2064 |
+
onAfterClose = innerParams.onAfterClose;
|
2065 |
+
|
2066 |
+
if (onClose !== null && typeof onClose === 'function') {
|
2067 |
+
onClose(popup);
|
2068 |
+
}
|
2069 |
+
|
2070 |
+
if (animationIsSupported) {
|
2071 |
+
animatePopup(instance, popup, container, onAfterClose);
|
2072 |
+
} else {
|
2073 |
+
// Otherwise, remove immediately
|
2074 |
+
removePopupAndResetState(instance, container, isToast(), onAfterClose);
|
2075 |
+
}
|
2076 |
+
};
|
2077 |
+
|
2078 |
+
var animatePopup = function animatePopup(instance, popup, container, onAfterClose) {
|
2079 |
+
globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, isToast(), onAfterClose);
|
2080 |
+
popup.addEventListener(animationEndEvent, function (e) {
|
2081 |
+
if (e.target === popup) {
|
2082 |
+
globalState.swalCloseEventFinishedCallback();
|
2083 |
+
delete globalState.swalCloseEventFinishedCallback;
|
2084 |
+
}
|
2085 |
+
});
|
2086 |
+
};
|
2087 |
+
|
2088 |
+
var triggerOnAfterCloseAndDispose = function triggerOnAfterCloseAndDispose(instance, onAfterClose) {
|
2089 |
+
setTimeout(function () {
|
2090 |
+
if (typeof onAfterClose === 'function') {
|
2091 |
+
onAfterClose();
|
2092 |
+
}
|
2093 |
+
|
2094 |
+
instance._destroy();
|
2095 |
+
});
|
2096 |
+
};
|
2097 |
+
|
2098 |
+
function setButtonsDisabled(instance, buttons, disabled) {
|
2099 |
+
var domCache = privateProps.domCache.get(instance);
|
2100 |
+
buttons.forEach(function (button) {
|
2101 |
+
domCache[button].disabled = disabled;
|
2102 |
+
});
|
2103 |
+
}
|
2104 |
+
|
2105 |
+
function setInputDisabled(input, disabled) {
|
2106 |
+
if (!input) {
|
2107 |
+
return false;
|
2108 |
+
}
|
2109 |
+
|
2110 |
+
if (input.type === 'radio') {
|
2111 |
+
var radiosContainer = input.parentNode.parentNode;
|
2112 |
+
var radios = radiosContainer.querySelectorAll('input');
|
2113 |
+
|
2114 |
+
for (var i = 0; i < radios.length; i++) {
|
2115 |
+
radios[i].disabled = disabled;
|
2116 |
+
}
|
2117 |
+
} else {
|
2118 |
+
input.disabled = disabled;
|
2119 |
+
}
|
2120 |
+
}
|
2121 |
+
|
2122 |
+
function enableButtons() {
|
2123 |
+
setButtonsDisabled(this, ['confirmButton', 'cancelButton'], false);
|
2124 |
+
}
|
2125 |
+
function disableButtons() {
|
2126 |
+
setButtonsDisabled(this, ['confirmButton', 'cancelButton'], true);
|
2127 |
+
}
|
2128 |
+
function enableInput() {
|
2129 |
+
return setInputDisabled(this.getInput(), false);
|
2130 |
+
}
|
2131 |
+
function disableInput() {
|
2132 |
+
return setInputDisabled(this.getInput(), true);
|
2133 |
+
}
|
2134 |
+
|
2135 |
+
function showValidationMessage(error) {
|
2136 |
+
var domCache = privateProps.domCache.get(this);
|
2137 |
+
setInnerHtml(domCache.validationMessage, error);
|
2138 |
+
var popupComputedStyle = window.getComputedStyle(domCache.popup);
|
2139 |
+
domCache.validationMessage.style.marginLeft = "-".concat(popupComputedStyle.getPropertyValue('padding-left'));
|
2140 |
+
domCache.validationMessage.style.marginRight = "-".concat(popupComputedStyle.getPropertyValue('padding-right'));
|
2141 |
+
show(domCache.validationMessage);
|
2142 |
+
var input = this.getInput();
|
2143 |
+
|
2144 |
+
if (input) {
|
2145 |
+
input.setAttribute('aria-invalid', true);
|
2146 |
+
input.setAttribute('aria-describedBy', swalClasses['validation-message']);
|
2147 |
+
focusInput(input);
|
2148 |
+
addClass(input, swalClasses.inputerror);
|
2149 |
+
}
|
2150 |
+
} // Hide block with validation message
|
2151 |
+
|
2152 |
+
function resetValidationMessage$1() {
|
2153 |
+
var domCache = privateProps.domCache.get(this);
|
2154 |
+
|
2155 |
+
if (domCache.validationMessage) {
|
2156 |
+
hide(domCache.validationMessage);
|
2157 |
+
}
|
2158 |
+
|
2159 |
+
var input = this.getInput();
|
2160 |
+
|
2161 |
+
if (input) {
|
2162 |
+
input.removeAttribute('aria-invalid');
|
2163 |
+
input.removeAttribute('aria-describedBy');
|
2164 |
+
removeClass(input, swalClasses.inputerror);
|
2165 |
+
}
|
2166 |
+
}
|
2167 |
+
|
2168 |
+
function getProgressSteps$1() {
|
2169 |
+
var domCache = privateProps.domCache.get(this);
|
2170 |
+
return domCache.progressSteps;
|
2171 |
+
}
|
2172 |
+
|
2173 |
+
var Timer = /*#__PURE__*/function () {
|
2174 |
+
function Timer(callback, delay) {
|
2175 |
+
_classCallCheck(this, Timer);
|
2176 |
+
|
2177 |
+
this.callback = callback;
|
2178 |
+
this.remaining = delay;
|
2179 |
+
this.running = false;
|
2180 |
+
this.start();
|
2181 |
+
}
|
2182 |
+
|
2183 |
+
_createClass(Timer, [{
|
2184 |
+
key: "start",
|
2185 |
+
value: function start() {
|
2186 |
+
if (!this.running) {
|
2187 |
+
this.running = true;
|
2188 |
+
this.started = new Date();
|
2189 |
+
this.id = setTimeout(this.callback, this.remaining);
|
2190 |
+
}
|
2191 |
+
|
2192 |
+
return this.remaining;
|
2193 |
+
}
|
2194 |
+
}, {
|
2195 |
+
key: "stop",
|
2196 |
+
value: function stop() {
|
2197 |
+
if (this.running) {
|
2198 |
+
this.running = false;
|
2199 |
+
clearTimeout(this.id);
|
2200 |
+
this.remaining -= new Date() - this.started;
|
2201 |
+
}
|
2202 |
+
|
2203 |
+
return this.remaining;
|
2204 |
+
}
|
2205 |
+
}, {
|
2206 |
+
key: "increase",
|
2207 |
+
value: function increase(n) {
|
2208 |
+
var running = this.running;
|
2209 |
+
|
2210 |
+
if (running) {
|
2211 |
+
this.stop();
|
2212 |
+
}
|
2213 |
+
|
2214 |
+
this.remaining += n;
|
2215 |
+
|
2216 |
+
if (running) {
|
2217 |
+
this.start();
|
2218 |
+
}
|
2219 |
+
|
2220 |
+
return this.remaining;
|
2221 |
+
}
|
2222 |
+
}, {
|
2223 |
+
key: "getTimerLeft",
|
2224 |
+
value: function getTimerLeft() {
|
2225 |
+
if (this.running) {
|
2226 |
+
this.stop();
|
2227 |
+
this.start();
|
2228 |
+
}
|
2229 |
+
|
2230 |
+
return this.remaining;
|
2231 |
+
}
|
2232 |
+
}, {
|
2233 |
+
key: "isRunning",
|
2234 |
+
value: function isRunning() {
|
2235 |
+
return this.running;
|
2236 |
+
}
|
2237 |
+
}]);
|
2238 |
+
|
2239 |
+
return Timer;
|
2240 |
+
}();
|
2241 |
+
|
2242 |
+
var defaultInputValidators = {
|
2243 |
+
email: function email(string, validationMessage) {
|
2244 |
+
return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address');
|
2245 |
+
},
|
2246 |
+
url: function url(string, validationMessage) {
|
2247 |
+
// taken from https://stackoverflow.com/a/3809435 with a small change from #1306
|
2248 |
+
return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL');
|
2249 |
+
}
|
2250 |
+
};
|
2251 |
+
|
2252 |
+
function setDefaultInputValidators(params) {
|
2253 |
+
// Use default `inputValidator` for supported input types if not provided
|
2254 |
+
if (!params.inputValidator) {
|
2255 |
+
Object.keys(defaultInputValidators).forEach(function (key) {
|
2256 |
+
if (params.input === key) {
|
2257 |
+
params.inputValidator = defaultInputValidators[key];
|
2258 |
+
}
|
2259 |
+
});
|
2260 |
+
}
|
2261 |
+
}
|
2262 |
+
|
2263 |
+
function validateCustomTargetElement(params) {
|
2264 |
+
// Determine if the custom target element is valid
|
2265 |
+
if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) {
|
2266 |
+
warn('Target parameter is not valid, defaulting to "body"');
|
2267 |
+
params.target = 'body';
|
2268 |
+
}
|
2269 |
+
}
|
2270 |
+
/**
|
2271 |
+
* Set type, text and actions on popup
|
2272 |
+
*
|
2273 |
+
* @param params
|
2274 |
+
* @returns {boolean}
|
2275 |
+
*/
|
2276 |
+
|
2277 |
+
|
2278 |
+
function setParameters(params) {
|
2279 |
+
setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm
|
2280 |
+
|
2281 |
+
if (params.showLoaderOnConfirm && !params.preConfirm) {
|
2282 |
+
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');
|
2283 |
+
} // params.animation will be actually used in renderPopup.js
|
2284 |
+
// but in case when params.animation is a function, we need to call that function
|
2285 |
+
// before popup (re)initialization, so it'll be possible to check Swal.isVisible()
|
2286 |
+
// inside the params.animation function
|
2287 |
+
|
2288 |
+
|
2289 |
+
params.animation = callIfFunction(params.animation);
|
2290 |
+
validateCustomTargetElement(params); // Replace newlines with <br> in title
|
2291 |
+
|
2292 |
+
if (typeof params.title === 'string') {
|
2293 |
+
params.title = params.title.split('\n').join('<br />');
|
2294 |
+
}
|
2295 |
+
|
2296 |
+
init(params);
|
2297 |
+
}
|
2298 |
+
|
2299 |
+
/**
|
2300 |
+
* Open popup, add necessary classes and styles, fix scrollbar
|
2301 |
+
*
|
2302 |
+
* @param {Array} params
|
2303 |
+
*/
|
2304 |
+
|
2305 |
+
var openPopup = function openPopup(params) {
|
2306 |
+
var container = getContainer();
|
2307 |
+
var popup = getPopup();
|
2308 |
+
|
2309 |
+
if (typeof params.onBeforeOpen === 'function') {
|
2310 |
+
params.onBeforeOpen(popup);
|
2311 |
+
}
|
2312 |
+
|
2313 |
+
addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto'
|
2314 |
+
|
2315 |
+
setScrollingVisibility(container, popup);
|
2316 |
+
|
2317 |
+
if (isModal()) {
|
2318 |
+
fixScrollContainer(container, params.scrollbarPadding);
|
2319 |
+
}
|
2320 |
+
|
2321 |
+
if (!isToast() && !globalState.previousActiveElement) {
|
2322 |
+
globalState.previousActiveElement = document.activeElement;
|
2323 |
+
}
|
2324 |
+
|
2325 |
+
if (typeof params.onOpen === 'function') {
|
2326 |
+
setTimeout(function () {
|
2327 |
+
return params.onOpen(popup);
|
2328 |
+
});
|
2329 |
+
}
|
2330 |
+
|
2331 |
+
removeClass(container, swalClasses['no-transition']);
|
2332 |
+
};
|
2333 |
+
|
2334 |
+
function swalOpenAnimationFinished(event) {
|
2335 |
+
var popup = getPopup();
|
2336 |
+
|
2337 |
+
if (event.target !== popup) {
|
2338 |
+
return;
|
2339 |
+
}
|
2340 |
+
|
2341 |
+
var container = getContainer();
|
2342 |
+
popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished);
|
2343 |
+
container.style.overflowY = 'auto';
|
2344 |
+
}
|
2345 |
+
|
2346 |
+
var setScrollingVisibility = function setScrollingVisibility(container, popup) {
|
2347 |
+
if (animationEndEvent && hasCssAnimation(popup)) {
|
2348 |
+
container.style.overflowY = 'hidden';
|
2349 |
+
popup.addEventListener(animationEndEvent, swalOpenAnimationFinished);
|
2350 |
+
} else {
|
2351 |
+
container.style.overflowY = 'auto';
|
2352 |
+
}
|
2353 |
+
};
|
2354 |
+
|
2355 |
+
var fixScrollContainer = function fixScrollContainer(container, scrollbarPadding) {
|
2356 |
+
iOSfix();
|
2357 |
+
IEfix();
|
2358 |
+
setAriaHidden();
|
2359 |
+
|
2360 |
+
if (scrollbarPadding) {
|
2361 |
+
fixScrollbar();
|
2362 |
+
} // sweetalert2/issues/1247
|
2363 |
+
|
2364 |
+
|
2365 |
+
setTimeout(function () {
|
2366 |
+
container.scrollTop = 0;
|
2367 |
+
});
|
2368 |
+
};
|
2369 |
+
|
2370 |
+
var addClasses$1 = function addClasses(container, popup, params) {
|
2371 |
+
addClass(container, params.showClass.backdrop);
|
2372 |
+
show(popup); // Animate popup right after showing it
|
2373 |
+
|
2374 |
+
addClass(popup, params.showClass.popup);
|
2375 |
+
addClass([document.documentElement, document.body], swalClasses.shown);
|
2376 |
+
|
2377 |
+
if (params.heightAuto && params.backdrop && !params.toast) {
|
2378 |
+
addClass([document.documentElement, document.body], swalClasses['height-auto']);
|
2379 |
+
}
|
2380 |
+
};
|
2381 |
+
|
2382 |
+
var handleInputOptionsAndValue = function handleInputOptionsAndValue(instance, params) {
|
2383 |
+
if (params.input === 'select' || params.input === 'radio') {
|
2384 |
+
handleInputOptions(instance, params);
|
2385 |
+
} else if (['text', 'email', 'number', 'tel', 'textarea'].indexOf(params.input) !== -1 && isPromise(params.inputValue)) {
|
2386 |
+
handleInputValue(instance, params);
|
2387 |
+
}
|
2388 |
+
};
|
2389 |
+
var getInputValue = function getInputValue(instance, innerParams) {
|
2390 |
+
var input = instance.getInput();
|
2391 |
+
|
2392 |
+
if (!input) {
|
2393 |
+
return null;
|
2394 |
+
}
|
2395 |
+
|
2396 |
+
switch (innerParams.input) {
|
2397 |
+
case 'checkbox':
|
2398 |
+
return getCheckboxValue(input);
|
2399 |
+
|
2400 |
+
case 'radio':
|
2401 |
+
return getRadioValue(input);
|
2402 |
+
|
2403 |
+
case 'file':
|
2404 |
+
return getFileValue(input);
|
2405 |
+
|
2406 |
+
default:
|
2407 |
+
return innerParams.inputAutoTrim ? input.value.trim() : input.value;
|
2408 |
+
}
|
2409 |
+
};
|
2410 |
+
|
2411 |
+
var getCheckboxValue = function getCheckboxValue(input) {
|
2412 |
+
return input.checked ? 1 : 0;
|
2413 |
+
};
|
2414 |
+
|
2415 |
+
var getRadioValue = function getRadioValue(input) {
|
2416 |
+
return input.checked ? input.value : null;
|
2417 |
+
};
|
2418 |
+
|
2419 |
+
var getFileValue = function getFileValue(input) {
|
2420 |
+
return input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null;
|
2421 |
+
};
|
2422 |
+
|
2423 |
+
var handleInputOptions = function handleInputOptions(instance, params) {
|
2424 |
+
var content = getContent();
|
2425 |
+
|
2426 |
+
var processInputOptions = function processInputOptions(inputOptions) {
|
2427 |
+
return populateInputOptions[params.input](content, formatInputOptions(inputOptions), params);
|
2428 |
+
};
|
2429 |
+
|
2430 |
+
if (isPromise(params.inputOptions)) {
|
2431 |
+
showLoading();
|
2432 |
+
params.inputOptions.then(function (inputOptions) {
|
2433 |
+
instance.hideLoading();
|
2434 |
+
processInputOptions(inputOptions);
|
2435 |
+
});
|
2436 |
+
} else if (_typeof(params.inputOptions) === 'object') {
|
2437 |
+
processInputOptions(params.inputOptions);
|
2438 |
+
} else {
|
2439 |
+
error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(_typeof(params.inputOptions)));
|
2440 |
+
}
|
2441 |
+
};
|
2442 |
+
|
2443 |
+
var handleInputValue = function handleInputValue(instance, params) {
|
2444 |
+
var input = instance.getInput();
|
2445 |
+
hide(input);
|
2446 |
+
params.inputValue.then(function (inputValue) {
|
2447 |
+
input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue);
|
2448 |
+
show(input);
|
2449 |
+
input.focus();
|
2450 |
+
instance.hideLoading();
|
2451 |
+
})["catch"](function (err) {
|
2452 |
+
error("Error in inputValue promise: ".concat(err));
|
2453 |
+
input.value = '';
|
2454 |
+
show(input);
|
2455 |
+
input.focus();
|
2456 |
+
instance.hideLoading();
|
2457 |
+
});
|
2458 |
+
};
|
2459 |
+
|
2460 |
+
var populateInputOptions = {
|
2461 |
+
select: function select(content, inputOptions, params) {
|
2462 |
+
var select = getChildByClass(content, swalClasses.select);
|
2463 |
+
|
2464 |
+
var renderOption = function renderOption(parent, optionLabel, optionValue) {
|
2465 |
+
var option = document.createElement('option');
|
2466 |
+
option.value = optionValue;
|
2467 |
+
setInnerHtml(option, optionLabel);
|
2468 |
+
|
2469 |
+
if (params.inputValue.toString() === optionValue.toString()) {
|
2470 |
+
option.selected = true;
|
2471 |
+
}
|
2472 |
+
|
2473 |
+
parent.appendChild(option);
|
2474 |
+
};
|
2475 |
+
|
2476 |
+
inputOptions.forEach(function (inputOption) {
|
2477 |
+
var optionValue = inputOption[0];
|
2478 |
+
var optionLabel = inputOption[1]; // <optgroup> spec:
|
2479 |
+
// https://www.w3.org/TR/html401/interact/forms.html#h-17.6
|
2480 |
+
// "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..."
|
2481 |
+
// check whether this is a <optgroup>
|
2482 |
+
|
2483 |
+
if (Array.isArray(optionLabel)) {
|
2484 |
+
// if it is an array, then it is an <optgroup>
|
2485 |
+
var optgroup = document.createElement('optgroup');
|
2486 |
+
optgroup.label = optionValue;
|
2487 |
+
optgroup.disabled = false; // not configurable for now
|
2488 |
+
|
2489 |
+
select.appendChild(optgroup);
|
2490 |
+
optionLabel.forEach(function (o) {
|
2491 |
+
return renderOption(optgroup, o[1], o[0]);
|
2492 |
+
});
|
2493 |
+
} else {
|
2494 |
+
// case of <option>
|
2495 |
+
renderOption(select, optionLabel, optionValue);
|
2496 |
+
}
|
2497 |
+
});
|
2498 |
+
select.focus();
|
2499 |
+
},
|
2500 |
+
radio: function radio(content, inputOptions, params) {
|
2501 |
+
var radio = getChildByClass(content, swalClasses.radio);
|
2502 |
+
inputOptions.forEach(function (inputOption) {
|
2503 |
+
var radioValue = inputOption[0];
|
2504 |
+
var radioLabel = inputOption[1];
|
2505 |
+
var radioInput = document.createElement('input');
|
2506 |
+
var radioLabelElement = document.createElement('label');
|
2507 |
+
radioInput.type = 'radio';
|
2508 |
+
radioInput.name = swalClasses.radio;
|
2509 |
+
radioInput.value = radioValue;
|
2510 |
+
|
2511 |
+
if (params.inputValue.toString() === radioValue.toString()) {
|
2512 |
+
radioInput.checked = true;
|
2513 |
+
}
|
2514 |
+
|
2515 |
+
var label = document.createElement('span');
|
2516 |
+
setInnerHtml(label, radioLabel);
|
2517 |
+
label.className = swalClasses.label;
|
2518 |
+
radioLabelElement.appendChild(radioInput);
|
2519 |
+
radioLabelElement.appendChild(label);
|
2520 |
+
radio.appendChild(radioLabelElement);
|
2521 |
+
});
|
2522 |
+
var radios = radio.querySelectorAll('input');
|
2523 |
+
|
2524 |
+
if (radios.length) {
|
2525 |
+
radios[0].focus();
|
2526 |
+
}
|
2527 |
+
}
|
2528 |
+
};
|
2529 |
+
/**
|
2530 |
+
* Converts `inputOptions` into an array of `[value, label]`s
|
2531 |
+
* @param inputOptions
|
2532 |
+
*/
|
2533 |
+
|
2534 |
+
var formatInputOptions = function formatInputOptions(inputOptions) {
|
2535 |
+
var result = [];
|
2536 |
+
|
2537 |
+
if (typeof Map !== 'undefined' && inputOptions instanceof Map) {
|
2538 |
+
inputOptions.forEach(function (value, key) {
|
2539 |
+
var valueFormatted = value;
|
2540 |
+
|
2541 |
+
if (_typeof(valueFormatted) === 'object') {
|
2542 |
+
// case of <optgroup>
|
2543 |
+
valueFormatted = formatInputOptions(valueFormatted);
|
2544 |
+
}
|
2545 |
+
|
2546 |
+
result.push([key, valueFormatted]);
|
2547 |
+
});
|
2548 |
+
} else {
|
2549 |
+
Object.keys(inputOptions).forEach(function (key) {
|
2550 |
+
var valueFormatted = inputOptions[key];
|
2551 |
+
|
2552 |
+
if (_typeof(valueFormatted) === 'object') {
|
2553 |
+
// case of <optgroup>
|
2554 |
+
valueFormatted = formatInputOptions(valueFormatted);
|
2555 |
+
}
|
2556 |
+
|
2557 |
+
result.push([key, valueFormatted]);
|
2558 |
+
});
|
2559 |
+
}
|
2560 |
+
|
2561 |
+
return result;
|
2562 |
+
};
|
2563 |
+
|
2564 |
+
var handleConfirmButtonClick = function handleConfirmButtonClick(instance, innerParams) {
|
2565 |
+
instance.disableButtons();
|
2566 |
+
|
2567 |
+
if (innerParams.input) {
|
2568 |
+
handleConfirmWithInput(instance, innerParams);
|
2569 |
+
} else {
|
2570 |
+
confirm(instance, innerParams, true);
|
2571 |
+
}
|
2572 |
+
};
|
2573 |
+
var handleCancelButtonClick = function handleCancelButtonClick(instance, dismissWith) {
|
2574 |
+
instance.disableButtons();
|
2575 |
+
dismissWith(DismissReason.cancel);
|
2576 |
+
};
|
2577 |
+
|
2578 |
+
var handleConfirmWithInput = function handleConfirmWithInput(instance, innerParams) {
|
2579 |
+
var inputValue = getInputValue(instance, innerParams);
|
2580 |
+
|
2581 |
+
if (innerParams.inputValidator) {
|
2582 |
+
instance.disableInput();
|
2583 |
+
var validationPromise = Promise.resolve().then(function () {
|
2584 |
+
return innerParams.inputValidator(inputValue, innerParams.validationMessage);
|
2585 |
+
});
|
2586 |
+
validationPromise.then(function (validationMessage) {
|
2587 |
+
instance.enableButtons();
|
2588 |
+
instance.enableInput();
|
2589 |
+
|
2590 |
+
if (validationMessage) {
|
2591 |
+
instance.showValidationMessage(validationMessage);
|
2592 |
+
} else {
|
2593 |
+
confirm(instance, innerParams, inputValue);
|
2594 |
+
}
|
2595 |
+
});
|
2596 |
+
} else if (!instance.getInput().checkValidity()) {
|
2597 |
+
instance.enableButtons();
|
2598 |
+
instance.showValidationMessage(innerParams.validationMessage);
|
2599 |
+
} else {
|
2600 |
+
confirm(instance, innerParams, inputValue);
|
2601 |
+
}
|
2602 |
+
};
|
2603 |
+
|
2604 |
+
var succeedWith = function succeedWith(instance, value) {
|
2605 |
+
instance.closePopup({
|
2606 |
+
value: value
|
2607 |
+
});
|
2608 |
+
};
|
2609 |
+
|
2610 |
+
var confirm = function confirm(instance, innerParams, value) {
|
2611 |
+
if (innerParams.showLoaderOnConfirm) {
|
2612 |
+
showLoading(); // TODO: make showLoading an *instance* method
|
2613 |
+
}
|
2614 |
+
|
2615 |
+
if (innerParams.preConfirm) {
|
2616 |
+
instance.resetValidationMessage();
|
2617 |
+
var preConfirmPromise = Promise.resolve().then(function () {
|
2618 |
+
return innerParams.preConfirm(value, innerParams.validationMessage);
|
2619 |
+
});
|
2620 |
+
preConfirmPromise.then(function (preConfirmValue) {
|
2621 |
+
if (isVisible(getValidationMessage()) || preConfirmValue === false) {
|
2622 |
+
instance.hideLoading();
|
2623 |
+
} else {
|
2624 |
+
succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue);
|
2625 |
+
}
|
2626 |
+
});
|
2627 |
+
} else {
|
2628 |
+
succeedWith(instance, value);
|
2629 |
+
}
|
2630 |
+
};
|
2631 |
+
|
2632 |
+
var addKeydownHandler = function addKeydownHandler(instance, globalState, innerParams, dismissWith) {
|
2633 |
+
if (globalState.keydownTarget && globalState.keydownHandlerAdded) {
|
2634 |
+
globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {
|
2635 |
+
capture: globalState.keydownListenerCapture
|
2636 |
+
});
|
2637 |
+
globalState.keydownHandlerAdded = false;
|
2638 |
+
}
|
2639 |
+
|
2640 |
+
if (!innerParams.toast) {
|
2641 |
+
globalState.keydownHandler = function (e) {
|
2642 |
+
return keydownHandler(instance, e, dismissWith);
|
2643 |
+
};
|
2644 |
+
|
2645 |
+
globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup();
|
2646 |
+
globalState.keydownListenerCapture = innerParams.keydownListenerCapture;
|
2647 |
+
globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, {
|
2648 |
+
capture: globalState.keydownListenerCapture
|
2649 |
+
});
|
2650 |
+
globalState.keydownHandlerAdded = true;
|
2651 |
+
}
|
2652 |
+
}; // Focus handling
|
2653 |
+
|
2654 |
+
var setFocus = function setFocus(innerParams, index, increment) {
|
2655 |
+
var focusableElements = getFocusableElements(); // search for visible elements and select the next possible match
|
2656 |
+
|
2657 |
+
for (var i = 0; i < focusableElements.length; i++) {
|
2658 |
+
index = index + increment; // rollover to first item
|
2659 |
+
|
2660 |
+
if (index === focusableElements.length) {
|
2661 |
+
index = 0; // go to last item
|
2662 |
+
} else if (index === -1) {
|
2663 |
+
index = focusableElements.length - 1;
|
2664 |
+
}
|
2665 |
+
|
2666 |
+
return focusableElements[index].focus();
|
2667 |
+
} // no visible focusable elements, focus the popup
|
2668 |
+
|
2669 |
+
|
2670 |
+
getPopup().focus();
|
2671 |
+
};
|
2672 |
+
var arrowKeys = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Left', 'Right', 'Up', 'Down' // IE11
|
2673 |
+
];
|
2674 |
+
var escKeys = ['Escape', 'Esc' // IE11
|
2675 |
+
];
|
2676 |
+
|
2677 |
+
var keydownHandler = function keydownHandler(instance, e, dismissWith) {
|
2678 |
+
var innerParams = privateProps.innerParams.get(instance);
|
2679 |
+
|
2680 |
+
if (innerParams.stopKeydownPropagation) {
|
2681 |
+
e.stopPropagation();
|
2682 |
+
} // ENTER
|
2683 |
+
|
2684 |
+
|
2685 |
+
if (e.key === 'Enter') {
|
2686 |
+
handleEnter(instance, e, innerParams); // TAB
|
2687 |
+
} else if (e.key === 'Tab') {
|
2688 |
+
handleTab(e, innerParams); // ARROWS - switch focus between buttons
|
2689 |
+
} else if (arrowKeys.indexOf(e.key) !== -1) {
|
2690 |
+
handleArrows(); // ESC
|
2691 |
+
} else if (escKeys.indexOf(e.key) !== -1) {
|
2692 |
+
handleEsc(e, innerParams, dismissWith);
|
2693 |
+
}
|
2694 |
+
};
|
2695 |
+
|
2696 |
+
var handleEnter = function handleEnter(instance, e, innerParams) {
|
2697 |
+
// #720 #721
|
2698 |
+
if (e.isComposing) {
|
2699 |
+
return;
|
2700 |
+
}
|
2701 |
+
|
2702 |
+
if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) {
|
2703 |
+
if (['textarea', 'file'].indexOf(innerParams.input) !== -1) {
|
2704 |
+
return; // do not submit
|
2705 |
+
}
|
2706 |
+
|
2707 |
+
clickConfirm();
|
2708 |
+
e.preventDefault();
|
2709 |
+
}
|
2710 |
+
};
|
2711 |
+
|
2712 |
+
var handleTab = function handleTab(e, innerParams) {
|
2713 |
+
var targetElement = e.target;
|
2714 |
+
var focusableElements = getFocusableElements();
|
2715 |
+
var btnIndex = -1;
|
2716 |
+
|
2717 |
+
for (var i = 0; i < focusableElements.length; i++) {
|
2718 |
+
if (targetElement === focusableElements[i]) {
|
2719 |
+
btnIndex = i;
|
2720 |
+
break;
|
2721 |
+
}
|
2722 |
+
}
|
2723 |
+
|
2724 |
+
if (!e.shiftKey) {
|
2725 |
+
// Cycle to the next button
|
2726 |
+
setFocus(innerParams, btnIndex, 1);
|
2727 |
+
} else {
|
2728 |
+
// Cycle to the prev button
|
2729 |
+
setFocus(innerParams, btnIndex, -1);
|
2730 |
+
}
|
2731 |
+
|
2732 |
+
e.stopPropagation();
|
2733 |
+
e.preventDefault();
|
2734 |
+
};
|
2735 |
+
|
2736 |
+
var handleArrows = function handleArrows() {
|
2737 |
+
var confirmButton = getConfirmButton();
|
2738 |
+
var cancelButton = getCancelButton(); // focus Cancel button if Confirm button is currently focused
|
2739 |
+
|
2740 |
+
if (document.activeElement === confirmButton && isVisible(cancelButton)) {
|
2741 |
+
cancelButton.focus(); // and vice versa
|
2742 |
+
} else if (document.activeElement === cancelButton && isVisible(confirmButton)) {
|
2743 |
+
confirmButton.focus();
|
2744 |
+
}
|
2745 |
+
};
|
2746 |
+
|
2747 |
+
var handleEsc = function handleEsc(e, innerParams, dismissWith) {
|
2748 |
+
if (callIfFunction(innerParams.allowEscapeKey)) {
|
2749 |
+
e.preventDefault();
|
2750 |
+
dismissWith(DismissReason.esc);
|
2751 |
+
}
|
2752 |
+
};
|
2753 |
+
|
2754 |
+
var handlePopupClick = function handlePopupClick(instance, domCache, dismissWith) {
|
2755 |
+
var innerParams = privateProps.innerParams.get(instance);
|
2756 |
+
|
2757 |
+
if (innerParams.toast) {
|
2758 |
+
handleToastClick(instance, domCache, dismissWith);
|
2759 |
+
} else {
|
2760 |
+
// Ignore click events that had mousedown on the popup but mouseup on the container
|
2761 |
+
// This can happen when the user drags a slider
|
2762 |
+
handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup
|
2763 |
+
|
2764 |
+
handleContainerMousedown(domCache);
|
2765 |
+
handleModalClick(instance, domCache, dismissWith);
|
2766 |
+
}
|
2767 |
+
};
|
2768 |
+
|
2769 |
+
var handleToastClick = function handleToastClick(instance, domCache, dismissWith) {
|
2770 |
+
// Closing toast by internal click
|
2771 |
+
domCache.popup.onclick = function () {
|
2772 |
+
var innerParams = privateProps.innerParams.get(instance);
|
2773 |
+
|
2774 |
+
if (innerParams.showConfirmButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.input) {
|
2775 |
+
return;
|
2776 |
+
}
|
2777 |
+
|
2778 |
+
dismissWith(DismissReason.close);
|
2779 |
+
};
|
2780 |
+
};
|
2781 |
+
|
2782 |
+
var ignoreOutsideClick = false;
|
2783 |
+
|
2784 |
+
var handleModalMousedown = function handleModalMousedown(domCache) {
|
2785 |
+
domCache.popup.onmousedown = function () {
|
2786 |
+
domCache.container.onmouseup = function (e) {
|
2787 |
+
domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't
|
2788 |
+
// have any other direct children aside of the popup
|
2789 |
+
|
2790 |
+
if (e.target === domCache.container) {
|
2791 |
+
ignoreOutsideClick = true;
|
2792 |
+
}
|
2793 |
+
};
|
2794 |
+
};
|
2795 |
+
};
|
2796 |
+
|
2797 |
+
var handleContainerMousedown = function handleContainerMousedown(domCache) {
|
2798 |
+
domCache.container.onmousedown = function () {
|
2799 |
+
domCache.popup.onmouseup = function (e) {
|
2800 |
+
domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup
|
2801 |
+
|
2802 |
+
if (e.target === domCache.popup || domCache.popup.contains(e.target)) {
|
2803 |
+
ignoreOutsideClick = true;
|
2804 |
+
}
|
2805 |
+
};
|
2806 |
+
};
|
2807 |
+
};
|
2808 |
+
|
2809 |
+
var handleModalClick = function handleModalClick(instance, domCache, dismissWith) {
|
2810 |
+
domCache.container.onclick = function (e) {
|
2811 |
+
var innerParams = privateProps.innerParams.get(instance);
|
2812 |
+
|
2813 |
+
if (ignoreOutsideClick) {
|
2814 |
+
ignoreOutsideClick = false;
|
2815 |
+
return;
|
2816 |
+
}
|
2817 |
+
|
2818 |
+
if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) {
|
2819 |
+
dismissWith(DismissReason.backdrop);
|
2820 |
+
}
|
2821 |
+
};
|
2822 |
+
};
|
2823 |
+
|
2824 |
+
function _main(userParams) {
|
2825 |
+
showWarningsForParams(userParams);
|
2826 |
+
|
2827 |
+
if (globalState.currentInstance) {
|
2828 |
+
globalState.currentInstance._destroy();
|
2829 |
+
}
|
2830 |
+
|
2831 |
+
globalState.currentInstance = this;
|
2832 |
+
var innerParams = prepareParams(userParams);
|
2833 |
+
setParameters(innerParams);
|
2834 |
+
Object.freeze(innerParams); // clear the previous timer
|
2835 |
+
|
2836 |
+
if (globalState.timeout) {
|
2837 |
+
globalState.timeout.stop();
|
2838 |
+
delete globalState.timeout;
|
2839 |
+
} // clear the restore focus timeout
|
2840 |
+
|
2841 |
+
|
2842 |
+
clearTimeout(globalState.restoreFocusTimeout);
|
2843 |
+
var domCache = populateDomCache(this);
|
2844 |
+
render(this, innerParams);
|
2845 |
+
privateProps.innerParams.set(this, innerParams);
|
2846 |
+
return swalPromise(this, domCache, innerParams);
|
2847 |
+
}
|
2848 |
+
|
2849 |
+
var prepareParams = function prepareParams(userParams) {
|
2850 |
+
var showClass = _extends({}, defaultParams.showClass, userParams.showClass);
|
2851 |
+
|
2852 |
+
var hideClass = _extends({}, defaultParams.hideClass, userParams.hideClass);
|
2853 |
+
|
2854 |
+
var params = _extends({}, defaultParams, userParams);
|
2855 |
+
|
2856 |
+
params.showClass = showClass;
|
2857 |
+
params.hideClass = hideClass; // @deprecated
|
2858 |
+
|
2859 |
+
if (userParams.animation === false) {
|
2860 |
+
params.showClass = {
|
2861 |
+
popup: 'swal2-noanimation',
|
2862 |
+
backdrop: 'swal2-noanimation'
|
2863 |
+
};
|
2864 |
+
params.hideClass = {};
|
2865 |
+
}
|
2866 |
+
|
2867 |
+
return params;
|
2868 |
+
};
|
2869 |
+
|
2870 |
+
var swalPromise = function swalPromise(instance, domCache, innerParams) {
|
2871 |
+
return new Promise(function (resolve) {
|
2872 |
+
// functions to handle all closings/dismissals
|
2873 |
+
var dismissWith = function dismissWith(dismiss) {
|
2874 |
+
instance.closePopup({
|
2875 |
+
dismiss: dismiss
|
2876 |
+
});
|
2877 |
+
};
|
2878 |
+
|
2879 |
+
privateMethods.swalPromiseResolve.set(instance, resolve);
|
2880 |
+
|
2881 |
+
domCache.confirmButton.onclick = function () {
|
2882 |
+
return handleConfirmButtonClick(instance, innerParams);
|
2883 |
+
};
|
2884 |
+
|
2885 |
+
domCache.cancelButton.onclick = function () {
|
2886 |
+
return handleCancelButtonClick(instance, dismissWith);
|
2887 |
+
};
|
2888 |
+
|
2889 |
+
domCache.closeButton.onclick = function () {
|
2890 |
+
return dismissWith(DismissReason.close);
|
2891 |
+
};
|
2892 |
+
|
2893 |
+
handlePopupClick(instance, domCache, dismissWith);
|
2894 |
+
addKeydownHandler(instance, globalState, innerParams, dismissWith);
|
2895 |
+
|
2896 |
+
if (innerParams.toast && (innerParams.input || innerParams.footer || innerParams.showCloseButton)) {
|
2897 |
+
addClass(document.body, swalClasses['toast-column']);
|
2898 |
+
} else {
|
2899 |
+
removeClass(document.body, swalClasses['toast-column']);
|
2900 |
+
}
|
2901 |
+
|
2902 |
+
handleInputOptionsAndValue(instance, innerParams);
|
2903 |
+
openPopup(innerParams);
|
2904 |
+
setupTimer(globalState, innerParams, dismissWith);
|
2905 |
+
initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946)
|
2906 |
+
|
2907 |
+
setTimeout(function () {
|
2908 |
+
domCache.container.scrollTop = 0;
|
2909 |
+
});
|
2910 |
+
});
|
2911 |
+
};
|
2912 |
+
|
2913 |
+
var populateDomCache = function populateDomCache(instance) {
|
2914 |
+
var domCache = {
|
2915 |
+
popup: getPopup(),
|
2916 |
+
container: getContainer(),
|
2917 |
+
content: getContent(),
|
2918 |
+
actions: getActions(),
|
2919 |
+
confirmButton: getConfirmButton(),
|
2920 |
+
cancelButton: getCancelButton(),
|
2921 |
+
closeButton: getCloseButton(),
|
2922 |
+
validationMessage: getValidationMessage(),
|
2923 |
+
progressSteps: getProgressSteps()
|
2924 |
+
};
|
2925 |
+
privateProps.domCache.set(instance, domCache);
|
2926 |
+
return domCache;
|
2927 |
+
};
|
2928 |
+
|
2929 |
+
var setupTimer = function setupTimer(globalState$$1, innerParams, dismissWith) {
|
2930 |
+
var timerProgressBar = getTimerProgressBar();
|
2931 |
+
hide(timerProgressBar);
|
2932 |
+
|
2933 |
+
if (innerParams.timer) {
|
2934 |
+
globalState$$1.timeout = new Timer(function () {
|
2935 |
+
dismissWith('timer');
|
2936 |
+
delete globalState$$1.timeout;
|
2937 |
+
}, innerParams.timer);
|
2938 |
+
|
2939 |
+
if (innerParams.timerProgressBar) {
|
2940 |
+
show(timerProgressBar);
|
2941 |
+
setTimeout(function () {
|
2942 |
+
if (globalState$$1.timeout.running) {
|
2943 |
+
// timer can be already stopped at this point
|
2944 |
+
animateTimerProgressBar(innerParams.timer);
|
2945 |
+
}
|
2946 |
+
});
|
2947 |
+
}
|
2948 |
+
}
|
2949 |
+
};
|
2950 |
+
|
2951 |
+
var initFocus = function initFocus(domCache, innerParams) {
|
2952 |
+
if (innerParams.toast) {
|
2953 |
+
return;
|
2954 |
+
}
|
2955 |
+
|
2956 |
+
if (!callIfFunction(innerParams.allowEnterKey)) {
|
2957 |
+
return blurActiveElement();
|
2958 |
+
}
|
2959 |
+
|
2960 |
+
if (innerParams.focusCancel && isVisible(domCache.cancelButton)) {
|
2961 |
+
return domCache.cancelButton.focus();
|
2962 |
+
}
|
2963 |
+
|
2964 |
+
if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) {
|
2965 |
+
return domCache.confirmButton.focus();
|
2966 |
+
}
|
2967 |
+
|
2968 |
+
setFocus(innerParams, -1, 1);
|
2969 |
+
};
|
2970 |
+
|
2971 |
+
var blurActiveElement = function blurActiveElement() {
|
2972 |
+
if (document.activeElement && typeof document.activeElement.blur === 'function') {
|
2973 |
+
document.activeElement.blur();
|
2974 |
+
}
|
2975 |
+
};
|
2976 |
+
|
2977 |
+
/**
|
2978 |
+
* Updates popup parameters.
|
2979 |
+
*/
|
2980 |
+
|
2981 |
+
function update(params) {
|
2982 |
+
var popup = getPopup();
|
2983 |
+
var innerParams = privateProps.innerParams.get(this);
|
2984 |
+
|
2985 |
+
if (!popup || hasClass(popup, innerParams.hideClass.popup)) {
|
2986 |
+
return warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");
|
2987 |
+
}
|
2988 |
+
|
2989 |
+
var validUpdatableParams = {}; // assign valid params from `params` to `defaults`
|
2990 |
+
|
2991 |
+
Object.keys(params).forEach(function (param) {
|
2992 |
+
if (Swal.isUpdatableParameter(param)) {
|
2993 |
+
validUpdatableParams[param] = params[param];
|
2994 |
+
} else {
|
2995 |
+
warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js"));
|
2996 |
+
}
|
2997 |
+
});
|
2998 |
+
|
2999 |
+
var updatedParams = _extends({}, innerParams, validUpdatableParams);
|
3000 |
+
|
3001 |
+
render(this, updatedParams);
|
3002 |
+
privateProps.innerParams.set(this, updatedParams);
|
3003 |
+
Object.defineProperties(this, {
|
3004 |
+
params: {
|
3005 |
+
value: _extends({}, this.params, params),
|
3006 |
+
writable: false,
|
3007 |
+
enumerable: true
|
3008 |
+
}
|
3009 |
+
});
|
3010 |
+
}
|
3011 |
+
|
3012 |
+
function _destroy() {
|
3013 |
+
var domCache = privateProps.domCache.get(this);
|
3014 |
+
var innerParams = privateProps.innerParams.get(this);
|
3015 |
+
|
3016 |
+
if (!innerParams) {
|
3017 |
+
return; // This instance has already been destroyed
|
3018 |
+
} // Check if there is another Swal closing
|
3019 |
+
|
3020 |
+
|
3021 |
+
if (domCache.popup && globalState.swalCloseEventFinishedCallback) {
|
3022 |
+
globalState.swalCloseEventFinishedCallback();
|
3023 |
+
delete globalState.swalCloseEventFinishedCallback;
|
3024 |
+
} // Check if there is a swal disposal defer timer
|
3025 |
+
|
3026 |
+
|
3027 |
+
if (globalState.deferDisposalTimer) {
|
3028 |
+
clearTimeout(globalState.deferDisposalTimer);
|
3029 |
+
delete globalState.deferDisposalTimer;
|
3030 |
+
}
|
3031 |
+
|
3032 |
+
if (typeof innerParams.onDestroy === 'function') {
|
3033 |
+
innerParams.onDestroy();
|
3034 |
+
}
|
3035 |
+
|
3036 |
+
disposeSwal(this);
|
3037 |
+
}
|
3038 |
+
|
3039 |
+
var disposeSwal = function disposeSwal(instance) {
|
3040 |
+
// Unset this.params so GC will dispose it (#1569)
|
3041 |
+
delete instance.params; // Unset globalState props so GC will dispose globalState (#1569)
|
3042 |
+
|
3043 |
+
delete globalState.keydownHandler;
|
3044 |
+
delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569)
|
3045 |
+
|
3046 |
+
unsetWeakMaps(privateProps);
|
3047 |
+
unsetWeakMaps(privateMethods);
|
3048 |
+
};
|
3049 |
+
|
3050 |
+
var unsetWeakMaps = function unsetWeakMaps(obj) {
|
3051 |
+
for (var i in obj) {
|
3052 |
+
obj[i] = new WeakMap();
|
3053 |
+
}
|
3054 |
+
};
|
3055 |
+
|
3056 |
+
|
3057 |
+
|
3058 |
+
var instanceMethods = /*#__PURE__*/Object.freeze({
|
3059 |
+
hideLoading: hideLoading,
|
3060 |
+
disableLoading: hideLoading,
|
3061 |
+
getInput: getInput$1,
|
3062 |
+
close: close,
|
3063 |
+
closePopup: close,
|
3064 |
+
closeModal: close,
|
3065 |
+
closeToast: close,
|
3066 |
+
enableButtons: enableButtons,
|
3067 |
+
disableButtons: disableButtons,
|
3068 |
+
enableInput: enableInput,
|
3069 |
+
disableInput: disableInput,
|
3070 |
+
showValidationMessage: showValidationMessage,
|
3071 |
+
resetValidationMessage: resetValidationMessage$1,
|
3072 |
+
getProgressSteps: getProgressSteps$1,
|
3073 |
+
_main: _main,
|
3074 |
+
update: update,
|
3075 |
+
_destroy: _destroy
|
3076 |
+
});
|
3077 |
+
|
3078 |
+
var currentInstance;
|
3079 |
+
|
3080 |
+
var SweetAlert = /*#__PURE__*/function () {
|
3081 |
+
function SweetAlert() {
|
3082 |
+
_classCallCheck(this, SweetAlert);
|
3083 |
+
|
3084 |
+
// Prevent run in Node env
|
3085 |
+
if (typeof window === 'undefined') {
|
3086 |
+
return;
|
3087 |
+
} // Check for the existence of Promise
|
3088 |
+
|
3089 |
+
|
3090 |
+
if (typeof Promise === 'undefined') {
|
3091 |
+
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)');
|
3092 |
+
}
|
3093 |
+
|
3094 |
+
currentInstance = this;
|
3095 |
+
|
3096 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
3097 |
+
args[_key] = arguments[_key];
|
3098 |
+
}
|
3099 |
+
|
3100 |
+
var outerParams = Object.freeze(this.constructor.argsToParams(args));
|
3101 |
+
Object.defineProperties(this, {
|
3102 |
+
params: {
|
3103 |
+
value: outerParams,
|
3104 |
+
writable: false,
|
3105 |
+
enumerable: true,
|
3106 |
+
configurable: true
|
3107 |
+
}
|
3108 |
+
});
|
3109 |
+
|
3110 |
+
var promise = this._main(this.params);
|
3111 |
+
|
3112 |
+
privateProps.promise.set(this, promise);
|
3113 |
+
} // `catch` cannot be the name of a module export, so we define our thenable methods here instead
|
3114 |
+
|
3115 |
+
|
3116 |
+
_createClass(SweetAlert, [{
|
3117 |
+
key: "then",
|
3118 |
+
value: function then(onFulfilled) {
|
3119 |
+
var promise = privateProps.promise.get(this);
|
3120 |
+
return promise.then(onFulfilled);
|
3121 |
+
}
|
3122 |
+
}, {
|
3123 |
+
key: "finally",
|
3124 |
+
value: function _finally(onFinally) {
|
3125 |
+
var promise = privateProps.promise.get(this);
|
3126 |
+
return promise["finally"](onFinally);
|
3127 |
+
}
|
3128 |
+
}]);
|
3129 |
+
|
3130 |
+
return SweetAlert;
|
3131 |
+
}(); // Assign instance methods from src/instanceMethods/*.js to prototype
|
3132 |
+
|
3133 |
+
|
3134 |
+
_extends(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor
|
3135 |
+
|
3136 |
+
|
3137 |
+
_extends(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility
|
3138 |
+
|
3139 |
+
|
3140 |
+
Object.keys(instanceMethods).forEach(function (key) {
|
3141 |
+
SweetAlert[key] = function () {
|
3142 |
+
if (currentInstance) {
|
3143 |
+
var _currentInstance;
|
3144 |
+
|
3145 |
+
return (_currentInstance = currentInstance)[key].apply(_currentInstance, arguments);
|
3146 |
+
}
|
3147 |
+
};
|
3148 |
+
});
|
3149 |
+
SweetAlert.DismissReason = DismissReason;
|
3150 |
+
SweetAlert.version = '9.14.0';
|
3151 |
+
|
3152 |
+
var Swal = SweetAlert;
|
3153 |
+
Swal["default"] = Swal;
|
3154 |
+
|
3155 |
+
return Swal;
|
3156 |
+
|
3157 |
+
}));
|
3158 |
+
if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2}
|
3159 |
+
|
3160 |
+
"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{flex-direction:row;align-items:center;width:auto;padding:.625em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9}.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:static;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 .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{font-size:.25em}}.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{flex-basis:auto!important;width:auto;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 1px #fff,0 0 0 3px 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:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);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;transform-origin:0 1.5em;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-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:flex;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;flex-direction:row;align-items:center;justify-content:center;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.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-bottom-end>:first-child,.swal2-container.swal2-bottom-left>:first-child,.swal2-container.swal2-bottom-right>:first-child,.swal2-container.swal2-bottom-start>:first-child,.swal2-container.swal2-bottom>:first-child{margin-top:auto}.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.swal2-no-transition{transition:none!important}.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-popup{display:none;position:relative;box-sizing:border-box;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border:none;border-radius:.3125em;background:#fff;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-header{display:flex;flex-direction:column;align-items:center}.swal2-title{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-actions{display:flex;z-index:1;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;margin:1.25em auto 0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-actions.swal2-loading .swal2-styled.swal2-confirm{box-sizing:border-box;width:2.5em;height:2.5em;margin:.46875em;padding:0;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border:.25em solid transparent;border-radius:100%;border-color:transparent;background-color:transparent!important;color:transparent!important;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-actions.swal2-loading .swal2-styled.swal2-cancel{margin-right:30px;margin-left:30px}.swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after{content:\"\";display:inline-block;width:15px;height:15px;margin-left:5px;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border:3px solid #999;border-radius:50%;border-right-color:transparent;box-shadow:1px 1px 1px #fff}.swal2-styled{margin:.3125em;padding:.625em 2em;box-shadow:none;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#3085d6;color:#fff;font-size:1.0625em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#aaa;color:#fff;font-size:1.0625em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(50,100,150,.4)}.swal2-styled::-moz-focus-inner{border:0}.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-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;height:.25em;overflow:hidden;border-bottom-right-radius:.3125em;border-bottom-left-radius:.3125em}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:1.25em auto}.swal2-close{position:absolute;z-index:2;top:0;right:0;align-items:center;justify-content:center;width:1.2em;height:1.2em;padding:0;overflow:hidden;transition:color .1s ease-out;border:none;border-radius:0;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close::-moz-focus-inner{border:0}.swal2-content{z-index:1;justify-content:center;margin:0;padding:0;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em auto}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 3px #c4e6f5}.swal2-file::-webkit-input-placeholder,.swal2-input::-webkit-input-placeholder,.swal2-textarea::-webkit-input-placeholder{color:#ccc}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::-ms-input-placeholder,.swal2-input::-ms-input-placeholder,.swal2-textarea::-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em auto;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{margin:0 .4em}.swal2-validation-message{display:none;align-items:center;justify-content:center;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";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}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;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;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.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;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);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;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .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-progress-steps{align-items:center;margin:0 0 1.25em;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;width:2em;height:2em;border-radius:2em;background:#3085d6;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#3085d6}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;width:2.5em;height:.4em;margin:0 -1px;background:#3085d6}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@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)}}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-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 swal2-toast-animate-success-line-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 swal2-toast-animate-success-line-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 swal2-toast-animate-success-line-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}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{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:.8125em;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:.8125em;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%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}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-container{top:auto;right:auto;bottom:auto;left:auto;max-width:calc(100% - .625em * 2);background-color:transparent!important}body.swal2-no-backdrop .swal2-container>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-container.swal2-top{top:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-top-left,body.swal2-no-backdrop .swal2-container.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-top-end,body.swal2-no-backdrop .swal2-container.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-container.swal2-center{top:50%;left:50%;transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-left,body.swal2-no-backdrop .swal2-container.swal2-center-start{top:50%;left:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-end,body.swal2-no-backdrop .swal2-container.swal2-center-right{top:50%;right:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom{bottom:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom-left,body.swal2-no-backdrop .swal2-container.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-bottom-end,body.swal2-no-backdrop .swal2-container.swal2-bottom-right{right:0;bottom:0}@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:static!important}}body.swal2-toast-shown .swal2-container{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left: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;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left: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;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%;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}");
|
Backend/public/vendor/sweetalert2/sweetalert2.all.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sweetalert2=e()}(this,function(){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function c(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function i(t,e,n){return(i=d()?Reflect.construct:function(t,e,n){var o=[null];o.push.apply(o,e);var i=new(Function.bind.apply(t,o));return n&&l(i,n.prototype),i}).apply(null,arguments)}function p(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t,e,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var o=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function m(e){return Object.keys(e).map(function(t){return e[t]})}function h(t){return Array.prototype.slice.call(t)}function g(t,e){var n;n='"'.concat(t,'" is deprecated and will be removed in the next major release. Please use "').concat(e,'" instead.'),-1===_.indexOf(n)&&(_.push(n),N(n))}function v(t){return t&&Promise.resolve(t)===t}function b(t){return t instanceof Element||"object"===r(e=t)&&e.jquery;var e}function t(t){var e={};for(var n in t)e[t[n]]="swal2-"+t[n];return e}function y(t){var e=Y();return e?e.querySelector(t):null}function e(t){return y(".".concat(t))}function n(){var t=Z();return h(t.querySelectorAll(".".concat(W.icon)))}function w(){var t=n().filter(function(t){return ht(t)});return t.length?t[0]:null}function C(){return e(W.title)}function k(){return e(W.content)}function x(){return e(W.image)}function P(){return e(W["progress-steps"])}function A(){return e(W["validation-message"])}function E(){return y(".".concat(W.actions," .").concat(W.confirm))}function B(){return y(".".concat(W.actions," .").concat(W.cancel))}function S(){return e(W.actions)}function O(){return e(W.header)}function T(){return e(W.footer)}function L(){return e(W["timer-progress-bar"])}function j(){return e(W.close)}function q(){var t=h(Z().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(t,e){return t=parseInt(t.getAttribute("tabindex")),(e=parseInt(e.getAttribute("tabindex")))<t?1:t<e?-1:0}),e=h(Z().querySelectorAll('\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n')).filter(function(t){return"-1"!==t.getAttribute("tabindex")});return function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(t.concat(e)).filter(function(t){return ht(t)})}function I(){return!Q()&&!document.body.classList.contains(W["no-backdrop"])}function M(){return Z().hasAttribute("data-loading")}function V(e,t){var n;e.textContent="",t&&(n=(new DOMParser).parseFromString(t,"text/html"),h(n.querySelector("head").childNodes).forEach(function(t){e.appendChild(t)}),h(n.querySelector("body").childNodes).forEach(function(t){e.appendChild(t)}))}function R(t,e){if(e){for(var n=e.split(/\s+/),o=0;o<n.length;o++)if(!t.classList.contains(n[o]))return;return 1}}function H(t,e,n){var o,i;if(i=e,h((o=t).classList).forEach(function(t){-1===m(W).indexOf(t)&&-1===m(K).indexOf(t)&&-1===m(i.showClass).indexOf(t)&&o.classList.remove(t)}),e.customClass&&e.customClass[n]){if("string"!=typeof e.customClass[n]&&!e.customClass[n].forEach)return N("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(r(e.customClass[n]),'"'));pt(t,e.customClass[n])}}var D="SweetAlert2:",N=function(t){console.warn("".concat(D," ").concat(t))},U=function(t){console.error("".concat(D," ").concat(t))},_=[],F=function(t){return"function"==typeof t?t():t},z=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),W=t(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","toast-column","show","hide","close","title","header","content","html-container","actions","confirm","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","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","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),K=t(["success","warning","info","question","error"]),Y=function(){return document.body.querySelector(".".concat(W.container))},Z=function(){return e(W.popup)},Q=function(){return document.body.classList.contains(W["toast-shown"])},$={previousBodyPadding:null};function J(t,e){if(!e)return null;switch(e){case"select":case"textarea":case"file":return mt(t,W[e]);case"checkbox":return t.querySelector(".".concat(W.checkbox," input"));case"radio":return t.querySelector(".".concat(W.radio," input:checked"))||t.querySelector(".".concat(W.radio," input:first-child"));case"range":return t.querySelector(".".concat(W.range," input"));default:return mt(t,W.input)}}function X(t){var e;t.focus(),"file"!==t.type&&(e=t.value,t.value="",t.value=e)}function G(t,e,n){t&&e&&("string"==typeof e&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(function(e){t.forEach?t.forEach(function(t){n?t.classList.add(e):t.classList.remove(e)}):n?t.classList.add(e):t.classList.remove(e)}))}function tt(t,e,n){n||0===parseInt(n)?t.style[e]="number"==typeof n?"".concat(n,"px"):n:t.style.removeProperty(e)}function et(t,e){var n=1<arguments.length&&void 0!==e?e:"flex";t.style.opacity="",t.style.display=n}function nt(t){t.style.opacity="",t.style.display="none"}function ot(t,e,n){e?et(t,n):nt(t)}function it(t){return!!(t.scrollHeight>t.clientHeight)}function rt(t){var e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return 0<n||0<o}function at(t,e){var n=1<arguments.length&&void 0!==e&&e,o=L();ht(o)&&(n&&(o.style.transition="none",o.style.width="100%"),setTimeout(function(){o.style.transition="width ".concat(t/1e3,"s linear"),o.style.width="0%"},10))}function ct(){return"undefined"==typeof window||"undefined"==typeof document}function st(t){rn.isVisible()&&dt!==t.target.value&&rn.resetValidationMessage(),dt=t.target.value}function ut(t,e){t instanceof HTMLElement?e.appendChild(t):"object"===r(t)?bt(t,e):t&&V(e,t)}function lt(t,e){var n=S(),o=E(),i=B();e.showConfirmButton||e.showCancelButton||nt(n),H(n,e,"actions"),Ct(o,"confirm",e),Ct(i,"cancel",e),e.buttonsStyling?function(t,e,n){pt([t,e],W.styled),n.confirmButtonColor&&(t.style.backgroundColor=n.confirmButtonColor);n.cancelButtonColor&&(e.style.backgroundColor=n.cancelButtonColor);{var o;M()||(o=window.getComputedStyle(t).getPropertyValue("background-color"),t.style.borderLeftColor=o,t.style.borderRightColor=o)}}(o,i,e):(ft([o,i],W.styled),o.style.backgroundColor=o.style.borderLeftColor=o.style.borderRightColor="",i.style.backgroundColor=i.style.borderLeftColor=i.style.borderRightColor=""),e.reverseButtons&&o.parentNode.insertBefore(i,o)}var dt,pt=function(t,e){G(t,e,!0)},ft=function(t,e){G(t,e,!1)},mt=function(t,e){for(var n=0;n<t.childNodes.length;n++)if(R(t.childNodes[n],e))return t.childNodes[n]},ht=function(t){return!(!t||!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))},gt='\n <div aria-labelledby="'.concat(W.title,'" aria-describedby="').concat(W.content,'" class="').concat(W.popup,'" tabindex="-1">\n <div class="').concat(W.header,'">\n <ul class="').concat(W["progress-steps"],'"></ul>\n <div class="').concat(W.icon," ").concat(K.error,'"></div>\n <div class="').concat(W.icon," ").concat(K.question,'"></div>\n <div class="').concat(W.icon," ").concat(K.warning,'"></div>\n <div class="').concat(W.icon," ").concat(K.info,'"></div>\n <div class="').concat(W.icon," ").concat(K.success,'"></div>\n <img class="').concat(W.image,'" />\n <h2 class="').concat(W.title,'" id="').concat(W.title,'"></h2>\n <button type="button" class="').concat(W.close,'"></button>\n </div>\n <div class="').concat(W.content,'">\n <div id="').concat(W.content,'" class="').concat(W["html-container"],'"></div>\n <input class="').concat(W.input,'" />\n <input type="file" class="').concat(W.file,'" />\n <div class="').concat(W.range,'">\n <input type="range" />\n <output></output>\n </div>\n <select class="').concat(W.select,'"></select>\n <div class="').concat(W.radio,'"></div>\n <label for="').concat(W.checkbox,'" class="').concat(W.checkbox,'">\n <input type="checkbox" />\n <span class="').concat(W.label,'"></span>\n </label>\n <textarea class="').concat(W.textarea,'"></textarea>\n <div class="').concat(W["validation-message"],'" id="').concat(W["validation-message"],'"></div>\n </div>\n <div class="').concat(W.actions,'">\n <button type="button" class="').concat(W.confirm,'">OK</button>\n <button type="button" class="').concat(W.cancel,'">Cancel</button>\n </div>\n <div class="').concat(W.footer,'"></div>\n <div class="').concat(W["timer-progress-bar-container"],'">\n <div class="').concat(W["timer-progress-bar"],'"></div>\n </div>\n </div>\n').replace(/(^|\n)\s*/g,""),vt=function(t){var e,n,o,i,r,a,c,s,u,l,d,p,f,m,h,g=!!(e=Y())&&(e.parentNode.removeChild(e),ft([document.documentElement,document.body],[W["no-backdrop"],W["toast-shown"],W["has-column"]]),!0);ct()?U("SweetAlert2 requires document to initialize"):((n=document.createElement("div")).className=W.container,g&&pt(n,W["no-transition"]),V(n,gt),(o="string"==typeof(i=t.target)?document.querySelector(i):i).appendChild(n),r=t,(a=Z()).setAttribute("role",r.toast?"alert":"dialog"),a.setAttribute("aria-live",r.toast?"polite":"assertive"),r.toast||a.setAttribute("aria-modal","true"),c=o,"rtl"===window.getComputedStyle(c).direction&&pt(Y(),W.rtl),s=k(),u=mt(s,W.input),l=mt(s,W.file),d=s.querySelector(".".concat(W.range," input")),p=s.querySelector(".".concat(W.range," output")),f=mt(s,W.select),m=s.querySelector(".".concat(W.checkbox," input")),h=mt(s,W.textarea),u.oninput=st,l.onchange=st,f.onchange=st,m.onchange=st,h.oninput=st,d.oninput=function(t){st(t),p.value=d.value},d.onchange=function(t){st(t),d.nextSibling.value=d.value})},bt=function(t,e){t.jquery?yt(e,t):V(e,t.toString())},yt=function(t,e){if(t.textContent="",0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},wt=function(){if(ct())return!1;var t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&void 0!==t.style[n])return e[n];return!1}();function Ct(t,e,n){var o;ot(t,n["show".concat((o=e).charAt(0).toUpperCase()+o.slice(1),"Button")],"inline-block"),V(t,n["".concat(e,"ButtonText")]),t.setAttribute("aria-label",n["".concat(e,"ButtonAriaLabel")]),t.className=W[e],H(t,n,"".concat(e,"Button")),pt(t,n["".concat(e,"ButtonClass")])}function kt(t,e){var n,o,i,r,a,c,s,u,l=Y();l&&(n=l,"string"==typeof(o=e.backdrop)?n.style.background=o:o||pt([document.documentElement,document.body],W["no-backdrop"]),!e.backdrop&&e.allowOutsideClick&&N('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),i=l,(r=e.position)in W?pt(i,W[r]):(N('The "position" parameter is not valid, defaulting to "center"'),pt(i,W.center)),a=l,!(c=e.grow)||"string"!=typeof c||(s="grow-".concat(c))in W&&pt(a,W[s]),H(l,e,"container"),(u=document.body.getAttribute("data-swal2-queue-step"))&&(l.setAttribute("data-queue-step",u),document.body.removeAttribute("data-swal2-queue-step")))}function xt(t,e){t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)}var Pt={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},At=["input","file","range","select","radio","checkbox","textarea"],Et=function(t){if(!Tt[t.input])return U('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));var e=Ot(t.input),n=Tt[t.input](e,t);et(n),setTimeout(function(){X(n)})},Bt=function(t,e){var n=J(k(),t);if(n)for(var o in!function(t){for(var e=0;e<t.attributes.length;e++){var n=t.attributes[e].name;-1===["type","value","style"].indexOf(n)&&t.removeAttribute(n)}}(n),e)"range"===t&&"placeholder"===o||n.setAttribute(o,e[o])},St=function(t){var e=Ot(t.input);t.customClass&&pt(e,t.customClass.input)},Ot=function(t){var e=W[t]?W[t]:W.input;return mt(k(),e)},Tt={};Tt.text=Tt.email=Tt.password=Tt.number=Tt.tel=Tt.url=function(t,e){return"string"==typeof e.inputValue||"number"==typeof e.inputValue?t.value=e.inputValue:v(e.inputValue)||N('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(r(e.inputValue),'"')),xt(t,e),t.type=e.input,t},Tt.file=function(t,e){return xt(t,e),t},Tt.range=function(t,e){var n=t.querySelector("input"),o=t.querySelector("output");return n.value=e.inputValue,n.type=e.input,o.value=e.inputValue,t},Tt.select=function(t,e){var n;return t.textContent="",e.inputPlaceholder&&(n=document.createElement("option"),V(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)),t},Tt.radio=function(t){return t.textContent="",t},Tt.checkbox=function(t,e){var n=J(k(),"checkbox");n.value=1,n.id=W.checkbox,n.checked=Boolean(e.inputValue);var o=t.querySelector("span");return V(o,e.inputPlaceholder),t},Tt.textarea=function(e,t){var n,o;return e.value=t.inputValue,xt(e,t),"MutationObserver"in window&&(n=parseInt(window.getComputedStyle(Z()).width),o=parseInt(window.getComputedStyle(Z()).paddingLeft)+parseInt(window.getComputedStyle(Z()).paddingRight),new MutationObserver(function(){var t=e.offsetWidth+o;Z().style.width=n<t?"".concat(t,"px"):null}).observe(e,{attributes:!0,attributeFilter:["style"]})),e};function Lt(t,e){var n,o,i,r,a,c=k().querySelector("#".concat(W.content));e.html?(ut(e.html,c),et(c,"block")):e.text?(c.textContent=e.text,et(c,"block")):nt(c),n=t,o=e,i=k(),r=Pt.innerParams.get(n),a=!r||o.input!==r.input,At.forEach(function(t){var e=W[t],n=mt(i,e);Bt(t,o.inputAttributes),n.className=e,a&&nt(n)}),o.input&&(a&&Et(o),St(o)),H(k(),e,"content")}function jt(){return Y()&&Y().getAttribute("data-queue-step")}function qt(t,s){var u=P();if(!s.progressSteps||0===s.progressSteps.length)return nt(u),0;et(u),u.textContent="";var l=parseInt(void 0===s.currentProgressStep?jt():s.currentProgressStep);l>=s.progressSteps.length&&N("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),s.progressSteps.forEach(function(t,e){var n,o,i,r,a,c=(n=t,o=document.createElement("li"),pt(o,W["progress-step"]),V(o,n),o);u.appendChild(c),e===l&&pt(c,W["active-progress-step"]),e!==s.progressSteps.length-1&&(r=t,a=document.createElement("li"),pt(a,W["progress-step-line"]),r.progressStepsDistance&&(a.style.width=r.progressStepsDistance),i=a,u.appendChild(i))})}function It(t,e){var n,o,i,r,a,c,s,u,l=O();H(l,e,"header"),qt(0,e),n=t,o=e,(r=Pt.innerParams.get(n))&&o.icon===r.icon&&w()?H(w(),o,"icon"):(Rt(),o.icon&&(-1!==Object.keys(K).indexOf(o.icon)?(i=y(".".concat(W.icon,".").concat(K[o.icon])),et(i),Dt(i,o),Ht(),H(i,o,"icon"),pt(i,o.showClass.icon)):U('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(o.icon,'"')))),function(t){var e=x();if(!t.imageUrl)return nt(e);et(e,""),e.setAttribute("src",t.imageUrl),e.setAttribute("alt",t.imageAlt),tt(e,"width",t.imageWidth),tt(e,"height",t.imageHeight),e.className=W.image,H(e,t,"image")}(e),a=e,c=C(),ot(c,a.title||a.titleText),a.title&&ut(a.title,c),a.titleText&&(c.innerText=a.titleText),H(c,a,"title"),s=e,u=j(),V(u,s.closeButtonHtml),H(u,s,"closeButton"),ot(u,s.showCloseButton),u.setAttribute("aria-label",s.closeButtonAriaLabel)}function Mt(t,e){var n,o,i,r;n=e,o=Z(),tt(o,"width",n.width),tt(o,"padding",n.padding),n.background&&(o.style.background=n.background),_t(o,n),kt(0,e),It(t,e),Lt(t,e),lt(0,e),i=e,r=T(),ot(r,i.footer),i.footer&&ut(i.footer,r),H(r,i,"footer"),"function"==typeof e.onRender&&e.onRender(Z())}function Vt(){return E()&&E().click()}var Rt=function(){for(var t=n(),e=0;e<t.length;e++)nt(t[e])},Ht=function(){for(var t=Z(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),o=0;o<n.length;o++)n[o].style.backgroundColor=e},Dt=function(t,e){t.textContent="",e.iconHtml?V(t,Nt(e.iconHtml)):"success"===e.icon?V(t,'\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n '):"error"===e.icon?V(t,'\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n '):V(t,Nt({question:"?",warning:"!",info:"i"}[e.icon]))},Nt=function(t){return'<div class="'.concat(W["icon-content"],'">').concat(t,"</div>")},Ut=[],_t=function(t,e){t.className="".concat(W.popup," ").concat(ht(t)?e.showClass.popup:""),e.toast?(pt([document.documentElement,document.body],W["toast-shown"]),pt(t,W.toast)):pt(t,W.modal),H(t,e,"popup"),"string"==typeof e.customClass&&pt(t,e.customClass),e.icon&&pt(t,W["icon-".concat(e.icon)])};function Ft(){var t=Z();t||rn.fire(),t=Z();var e=S(),n=E();et(e),et(n,"inline-block"),pt([t,e],W.loading),n.disabled=!0,t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()}function zt(){return new Promise(function(t){var e=window.scrollX,n=window.scrollY;$t.restoreFocusTimeout=setTimeout(function(){$t.previousActiveElement&&$t.previousActiveElement.focus?($t.previousActiveElement.focus(),$t.previousActiveElement=null):document.body&&document.body.focus(),t()},100),void 0!==e&&void 0!==n&&window.scrollTo(e,n)})}function Wt(){if($t.timeout)return function(){var t=L(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";var n=parseInt(window.getComputedStyle(t).width),o=parseInt(e/n*100);t.style.removeProperty("transition"),t.style.width="".concat(o,"%")}(),$t.timeout.stop()}function Kt(){if($t.timeout){var t=$t.timeout.start();return at(t),t}}function Yt(t){return Object.prototype.hasOwnProperty.call(Jt,t)}function Zt(t){return Gt[t]}function Qt(t){for(var e in t)Yt(i=e)||N('Unknown parameter "'.concat(i,'"')),t.toast&&(o=e,-1!==te.indexOf(o)&&N('The parameter "'.concat(o,'" is incompatible with toasts'))),Zt(n=e)&&g(n,Zt(n));var n,o,i}var $t={},Jt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconHtml:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:void 0,target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showCancelButton:!1,preConfirm:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,onBeforeOpen:void 0,onOpen:void 0,onRender:void 0,onClose:void 0,onAfterClose:void 0,onDestroy:void 0,scrollbarPadding:!0},Xt=["title","titleText","text","html","footer","icon","hideClass","customClass","allowOutsideClick","allowEscapeKey","showConfirmButton","showCancelButton","confirmButtonText","confirmButtonAriaLabel","confirmButtonColor","cancelButtonText","cancelButtonAriaLabel","cancelButtonColor","buttonsStyling","reverseButtons","imageUrl","imageWidth","imageHeight","imageAlt","progressSteps","currentProgressStep","onClose","onAfterClose","onDestroy"],Gt={animation:'showClass" and "hideClass'},te=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusCancel","heightAuto","keydownListenerCapture"],ee=Object.freeze({isValidParameter:Yt,isUpdatableParameter:function(t){return-1!==Xt.indexOf(t)},isDeprecatedParameter:Zt,argsToParams:function(o){var i={};return"object"!==r(o[0])||b(o[0])?["title","html","icon"].forEach(function(t,e){var n=o[e];"string"==typeof n||b(n)?i[t]=n:void 0!==n&&U("Unexpected type of ".concat(t,'! Expected "string" or "Element", got ').concat(r(n)))}):s(i,o[0]),i},isVisible:function(){return ht(Z())},clickConfirm:Vt,clickCancel:function(){return B()&&B().click()},getContainer:Y,getPopup:Z,getTitle:C,getContent:k,getHtmlContainer:function(){return e(W["html-container"])},getImage:x,getIcon:w,getIcons:n,getCloseButton:j,getActions:S,getConfirmButton:E,getCancelButton:B,getHeader:O,getFooter:T,getTimerProgressBar:L,getFocusableElements:q,getValidationMessage:A,isLoading:M,fire:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i(this,e)},mixin:function(r){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(i,t);var n,o,e=(n=i,o=d(),function(){var t,e=u(n);return p(this,o?(t=u(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))});function i(){return a(this,i),e.apply(this,arguments)}return c(i,[{key:"_main",value:function(t){return f(u(i.prototype),"_main",this).call(this,s({},r,t))}}]),i}(this)},queue:function(t){var r=this;Ut=t;function a(t,e){Ut=[],t(e)}var c=[];return new Promise(function(i){!function e(n,o){n<Ut.length?(document.body.setAttribute("data-swal2-queue-step",n),r.fire(Ut[n]).then(function(t){void 0!==t.value?(c.push(t.value),e(n+1,o)):a(i,{dismiss:t.dismiss})})):a(i,{value:c})}(0)})},getQueueStep:jt,insertQueueStep:function(t,e){return e&&e<Ut.length?Ut.splice(e,0,t):Ut.push(t)},deleteQueueStep:function(t){void 0!==Ut[t]&&Ut.splice(t,1)},showLoading:Ft,enableLoading:Ft,getTimerLeft:function(){return $t.timeout&&$t.timeout.getTimerLeft()},stopTimer:Wt,resumeTimer:Kt,toggleTimer:function(){var t=$t.timeout;return t&&(t.running?Wt:Kt)()},increaseTimer:function(t){if($t.timeout){var e=$t.timeout.increase(t);return at(e,!0),e}},isTimerRunning:function(){return $t.timeout&&$t.timeout.isRunning()}});function ne(){var t,e=Pt.innerParams.get(this);e&&(t=Pt.domCache.get(this),e.showConfirmButton||(nt(t.confirmButton),e.showCancelButton||nt(t.actions)),ft([t.popup,t.actions],W.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.cancelButton.disabled=!1)}function oe(){null===$.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&($.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat($.previousBodyPadding+function(){var t=document.createElement("div");t.className=W["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px"))}function ie(){return!!window.MSInputMethodContext&&!!document.documentMode}function re(){var t=Y(),e=Z();t.style.removeProperty("align-items"),e.offsetTop<0&&(t.style.alignItems="flex-start")}var ae=function(){var e,t=Y();t.ontouchstart=function(t){e=ce(t.target)},t.ontouchmove=function(t){e&&(t.preventDefault(),t.stopPropagation())}},ce=function(t){var e=Y();return t===e||!(it(e)||"INPUT"===t.tagName||it(k())&&k().contains(t))},se={swalPromiseResolve:new WeakMap};function ue(t,e,n,o){var i;n?pe(t,o):(zt().then(function(){return pe(t,o)}),$t.keydownTarget.removeEventListener("keydown",$t.keydownHandler,{capture:$t.keydownListenerCapture}),$t.keydownHandlerAdded=!1),e.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&e.parentNode.removeChild(e),I()&&(null!==$.previousBodyPadding&&(document.body.style.paddingRight="".concat($.previousBodyPadding,"px"),$.previousBodyPadding=null),R(document.body,W.iosfix)&&(i=parseInt(document.body.style.top,10),ft(document.body,W.iosfix),document.body.style.top="",document.body.scrollTop=-1*i),"undefined"!=typeof window&&ie()&&window.removeEventListener("resize",re),h(document.body.children).forEach(function(t){t.hasAttribute("data-previous-aria-hidden")?(t.setAttribute("aria-hidden",t.getAttribute("data-previous-aria-hidden")),t.removeAttribute("data-previous-aria-hidden")):t.removeAttribute("aria-hidden")})),ft([document.documentElement,document.body],[W.shown,W["height-auto"],W["no-backdrop"],W["toast-shown"],W["toast-column"]])}function le(t){var e,n,o,i=Z();i&&(e=Pt.innerParams.get(this))&&!R(i,e.hideClass.popup)&&(n=se.swalPromiseResolve.get(this),ft(i,e.showClass.popup),pt(i,e.hideClass.popup),o=Y(),ft(o,e.showClass.backdrop),pt(o,e.hideClass.backdrop),function(t,e,n){var o=Y(),i=wt&&rt(e),r=n.onClose,a=n.onAfterClose;if(r!==null&&typeof r==="function"){r(e)}if(i){de(t,e,o,a)}else{ue(t,o,Q(),a)}}(this,i,e),void 0!==t?(t.isDismissed=void 0!==t.dismiss,t.isConfirmed=void 0===t.dismiss):t={isDismissed:!0,isConfirmed:!1},n(t||{}))}var de=function(t,e,n,o){$t.swalCloseEventFinishedCallback=ue.bind(null,t,n,Q(),o),e.addEventListener(wt,function(t){t.target===e&&($t.swalCloseEventFinishedCallback(),delete $t.swalCloseEventFinishedCallback)})},pe=function(t,e){setTimeout(function(){"function"==typeof e&&e(),t._destroy()})};function fe(t,e,n){var o=Pt.domCache.get(t);e.forEach(function(t){o[t].disabled=n})}function me(t,e){if(!t)return!1;if("radio"===t.type)for(var n=t.parentNode.parentNode.querySelectorAll("input"),o=0;o<n.length;o++)n[o].disabled=e;else t.disabled=e}var he=function(){function n(t,e){a(this,n),this.callback=t,this.remaining=e,this.running=!1,this.start()}return c(n,[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date-this.started),this.remaining}},{key:"increase",value:function(t){var e=this.running;return e&&this.stop(),this.remaining+=t,e&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}]),n}(),ge={email:function(t,e){return/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address")},url:function(t,e){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")}};function ve(t){var e,n;(e=t).inputValidator||Object.keys(ge).forEach(function(t){e.input===t&&(e.inputValidator=ge[t])}),t.showLoaderOnConfirm&&!t.preConfirm&&N("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),t.animation=F(t.animation),(n=t).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(N('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof t.title&&(t.title=t.title.split("\n").join("<br />")),vt(t)}function be(t){var e=Y(),n=Z();"function"==typeof t.onBeforeOpen&&t.onBeforeOpen(n),Oe(e,n,t),Be(e,n),I()&&Se(e,t.scrollbarPadding),Q()||$t.previousActiveElement||($t.previousActiveElement=document.activeElement),"function"==typeof t.onOpen&&setTimeout(function(){return t.onOpen(n)}),ft(e,W["no-transition"])}function ye(t){var e,n=Z();t.target===n&&(e=Y(),n.removeEventListener(wt,ye),e.style.overflowY="auto")}function we(t,e){"select"===e.input||"radio"===e.input?qe(t,e):-1!==["text","email","number","tel","textarea"].indexOf(e.input)&&v(e.inputValue)&&Ie(t,e)}function Ce(t,e){t.disableButtons(),e.input?Re(t,e):He(t,e,!0)}function ke(t,e){t.disableButtons(),e(z.cancel)}function xe(t,e){t.closePopup({value:e})}function Pe(e,t,n,o){t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1),n.toast||(t.keydownHandler=function(t){return Ue(e,t,o)},t.keydownTarget=n.keydownListenerCapture?window:Z(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)}function Ae(t,e,n){var o=q(),i=0;if(i<o.length)return(e+=n)===o.length?e=0:-1===e&&(e=o.length-1),o[e].focus();Z().focus()}function Ee(t,e,n){Pt.innerParams.get(t).toast?Ke(t,e,n):(Ze(e),Qe(e),$e(t,e,n))}var Be=function(t,e){wt&&rt(e)?(t.style.overflowY="hidden",e.addEventListener(wt,ye)):t.style.overflowY="auto"},Se=function(t,e){var n;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints)&&!R(document.body,W.iosfix)&&(n=document.body.scrollTop,document.body.style.top="".concat(-1*n,"px"),pt(document.body,W.iosfix),ae()),"undefined"!=typeof window&&ie()&&(re(),window.addEventListener("resize",re)),h(document.body.children).forEach(function(t){t===Y()||function(t,e){if("function"==typeof t.contains)return t.contains(e)}(t,Y())||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))}),e&&oe(),setTimeout(function(){t.scrollTop=0})},Oe=function(t,e,n){pt(t,n.showClass.backdrop),et(e),pt(e,n.showClass.popup),pt([document.documentElement,document.body],W.shown),n.heightAuto&&n.backdrop&&!n.toast&&pt([document.documentElement,document.body],W["height-auto"])},Te=function(t){return t.checked?1:0},Le=function(t){return t.checked?t.value:null},je=function(t){return t.files.length?null!==t.getAttribute("multiple")?t.files:t.files[0]:null},qe=function(e,n){function o(t){return Me[n.input](i,Ve(t),n)}var i=k();v(n.inputOptions)?(Ft(),n.inputOptions.then(function(t){e.hideLoading(),o(t)})):"object"===r(n.inputOptions)?o(n.inputOptions):U("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(r(n.inputOptions)))},Ie=function(e,n){var o=e.getInput();nt(o),n.inputValue.then(function(t){o.value="number"===n.input?parseFloat(t)||0:"".concat(t),et(o),o.focus(),e.hideLoading()}).catch(function(t){U("Error in inputValue promise: ".concat(t)),o.value="",et(o),o.focus(),e.hideLoading()})},Me={select:function(t,e,i){function r(t,e,n){var o=document.createElement("option");o.value=n,V(o,e),i.inputValue.toString()===n.toString()&&(o.selected=!0),t.appendChild(o)}var a=mt(t,W.select);e.forEach(function(t){var e,n=t[0],o=t[1];Array.isArray(o)?((e=document.createElement("optgroup")).label=n,e.disabled=!1,a.appendChild(e),o.forEach(function(t){return r(e,t[1],t[0])})):r(a,o,n)}),a.focus()},radio:function(t,e,a){var c=mt(t,W.radio);e.forEach(function(t){var e=t[0],n=t[1],o=document.createElement("input"),i=document.createElement("label");o.type="radio",o.name=W.radio,o.value=e,a.inputValue.toString()===e.toString()&&(o.checked=!0);var r=document.createElement("span");V(r,n),r.className=W.label,i.appendChild(o),i.appendChild(r),c.appendChild(i)});var n=c.querySelectorAll("input");n.length&&n[0].focus()}},Ve=function o(n){var i=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach(function(t,e){var n=t;"object"===r(n)&&(n=o(n)),i.push([e,n])}):Object.keys(n).forEach(function(t){var e=n[t];"object"===r(e)&&(e=o(e)),i.push([t,e])}),i},Re=function(e,n){var o=function(t,e){var n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return Te(n);case"radio":return Le(n);case"file":return je(n);default:return e.inputAutoTrim?n.value.trim():n.value}}(e,n);n.inputValidator?(e.disableInput(),Promise.resolve().then(function(){return n.inputValidator(o,n.validationMessage)}).then(function(t){e.enableButtons(),e.enableInput(),t?e.showValidationMessage(t):He(e,n,o)})):e.getInput().checkValidity()?He(e,n,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},He=function(e,t,n){t.showLoaderOnConfirm&&Ft(),t.preConfirm?(e.resetValidationMessage(),Promise.resolve().then(function(){return t.preConfirm(n,t.validationMessage)}).then(function(t){ht(A())||!1===t?e.hideLoading():xe(e,void 0===t?n:t)})):xe(e,n)},De=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Left","Right","Up","Down"],Ne=["Escape","Esc"],Ue=function(t,e,n){var o=Pt.innerParams.get(t);o.stopKeydownPropagation&&e.stopPropagation(),"Enter"===e.key?_e(t,e,o):"Tab"===e.key?Fe(e,o):-1!==De.indexOf(e.key)?ze():-1!==Ne.indexOf(e.key)&&We(e,o,n)},_e=function(t,e,n){if(!e.isComposing&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(-1!==["textarea","file"].indexOf(n.input))return;Vt(),e.preventDefault()}},Fe=function(t){for(var e=t.target,n=q(),o=-1,i=0;i<n.length;i++)if(e===n[i]){o=i;break}t.shiftKey?Ae(0,o,-1):Ae(0,o,1),t.stopPropagation(),t.preventDefault()},ze=function(){var t=E(),e=B();document.activeElement===t&&ht(e)?e.focus():document.activeElement===e&&ht(t)&&t.focus()},We=function(t,e,n){F(e.allowEscapeKey)&&(t.preventDefault(),n(z.esc))},Ke=function(e,t,n){t.popup.onclick=function(){var t=Pt.innerParams.get(e);t.showConfirmButton||t.showCancelButton||t.showCloseButton||t.input||n(z.close)}},Ye=!1,Ze=function(e){e.popup.onmousedown=function(){e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(Ye=!0)}}},Qe=function(e){e.container.onmousedown=function(){e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,t.target!==e.popup&&!e.popup.contains(t.target)||(Ye=!0)}}},$e=function(n,o,i){o.container.onclick=function(t){var e=Pt.innerParams.get(n);Ye?Ye=!1:t.target===o.container&&F(e.allowOutsideClick)&&i(z.backdrop)}};var Je=function(t,e,n){var o=L();nt(o),e.timer&&(t.timeout=new he(function(){n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(et(o),setTimeout(function(){t.timeout.running&&at(e.timer)})))},Xe=function(t,e){if(!e.toast)return F(e.allowEnterKey)?e.focusCancel&&ht(t.cancelButton)?t.cancelButton.focus():e.focusConfirm&&ht(t.confirmButton)?t.confirmButton.focus():void Ae(0,-1,1):Ge()},Ge=function(){document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};var tn,en=function(t){for(var e in t)t[e]=new WeakMap},nn=Object.freeze({hideLoading:ne,disableLoading:ne,getInput:function(t){var e=Pt.innerParams.get(t||this),n=Pt.domCache.get(t||this);return n?J(n.content,e.input):null},close:le,closePopup:le,closeModal:le,closeToast:le,enableButtons:function(){fe(this,["confirmButton","cancelButton"],!1)},disableButtons:function(){fe(this,["confirmButton","cancelButton"],!0)},enableInput:function(){return me(this.getInput(),!1)},disableInput:function(){return me(this.getInput(),!0)},showValidationMessage:function(t){var e=Pt.domCache.get(this);V(e.validationMessage,t);var n=window.getComputedStyle(e.popup);e.validationMessage.style.marginLeft="-".concat(n.getPropertyValue("padding-left")),e.validationMessage.style.marginRight="-".concat(n.getPropertyValue("padding-right")),et(e.validationMessage);var o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedBy",W["validation-message"]),X(o),pt(o,W.inputerror))},resetValidationMessage:function(){var t=Pt.domCache.get(this);t.validationMessage&&nt(t.validationMessage);var e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedBy"),ft(e,W.inputerror))},getProgressSteps:function(){return Pt.domCache.get(this).progressSteps},_main:function(t){Qt(t),$t.currentInstance&&$t.currentInstance._destroy(),$t.currentInstance=this;var e=function(t){var e=s({},Jt.showClass,t.showClass),n=s({},Jt.hideClass,t.hideClass),o=s({},Jt,t);if(o.showClass=e,o.hideClass=n,t.animation===false){o.showClass={popup:"swal2-noanimation",backdrop:"swal2-noanimation"};o.hideClass={}}return o}(t);ve(e),Object.freeze(e),$t.timeout&&($t.timeout.stop(),delete $t.timeout),clearTimeout($t.restoreFocusTimeout);var n=function(t){var e={popup:Z(),container:Y(),content:k(),actions:S(),confirmButton:E(),cancelButton:B(),closeButton:j(),validationMessage:A(),progressSteps:P()};return Pt.domCache.set(t,e),e}(this);return Mt(this,e),Pt.innerParams.set(this,e),function(n,o,i){return new Promise(function(t){var e=function t(e){n.closePopup({dismiss:e})};se.swalPromiseResolve.set(n,t);o.confirmButton.onclick=function(){return Ce(n,i)};o.cancelButton.onclick=function(){return ke(n,e)};o.closeButton.onclick=function(){return e(z.close)};Ee(n,o,e);Pe(n,$t,i,e);if(i.toast&&(i.input||i.footer||i.showCloseButton)){pt(document.body,W["toast-column"])}else{ft(document.body,W["toast-column"])}we(n,i);be(i);Je($t,i,e);Xe(o,i);setTimeout(function(){o.container.scrollTop=0})})}(this,n,e)},update:function(e){var t=Z(),n=Pt.innerParams.get(this);if(!t||R(t,n.hideClass.popup))return N("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");var o={};Object.keys(e).forEach(function(t){rn.isUpdatableParameter(t)?o[t]=e[t]:N('Invalid parameter to update: "'.concat(t,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js'))});var i=s({},n,o);Mt(this,i),Pt.innerParams.set(this,i),Object.defineProperties(this,{params:{value:s({},this.params,e),writable:!1,enumerable:!0}})},_destroy:function(){var t=Pt.domCache.get(this),e=Pt.innerParams.get(this);e&&(t.popup&&$t.swalCloseEventFinishedCallback&&($t.swalCloseEventFinishedCallback(),delete $t.swalCloseEventFinishedCallback),$t.deferDisposalTimer&&(clearTimeout($t.deferDisposalTimer),delete $t.deferDisposalTimer),"function"==typeof e.onDestroy&&e.onDestroy(),delete this.params,delete $t.keydownHandler,delete $t.keydownTarget,en(Pt),en(se))}}),on=function(){function r(){if(a(this,r),"undefined"!=typeof window){"undefined"==typeof Promise&&U("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)"),tn=this;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var o=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0,configurable:!0}});var i=this._main(this.params);Pt.promise.set(this,i)}}return c(r,[{key:"then",value:function(t){return Pt.promise.get(this).then(t)}},{key:"finally",value:function(t){return Pt.promise.get(this).finally(t)}}]),r}();s(on.prototype,nn),s(on,ee),Object.keys(nn).forEach(function(t){on[t]=function(){if(tn)return tn[t].apply(tn,arguments)}}),on.DismissReason=z,on.version="9.14.0";var rn=on;return rn.default=rn}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2);
|
2 |
+
"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{flex-direction:row;align-items:center;width:auto;padding:.625em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9}.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:static;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 .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{font-size:.25em}}.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{flex-basis:auto!important;width:auto;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 1px #fff,0 0 0 3px 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:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);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;transform-origin:0 1.5em;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-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:flex;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;flex-direction:row;align-items:center;justify-content:center;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.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-bottom-end>:first-child,.swal2-container.swal2-bottom-left>:first-child,.swal2-container.swal2-bottom-right>:first-child,.swal2-container.swal2-bottom-start>:first-child,.swal2-container.swal2-bottom>:first-child{margin-top:auto}.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.swal2-no-transition{transition:none!important}.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-popup{display:none;position:relative;box-sizing:border-box;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border:none;border-radius:.3125em;background:#fff;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-header{display:flex;flex-direction:column;align-items:center}.swal2-title{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-actions{display:flex;z-index:1;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;margin:1.25em auto 0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-actions.swal2-loading .swal2-styled.swal2-confirm{box-sizing:border-box;width:2.5em;height:2.5em;margin:.46875em;padding:0;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border:.25em solid transparent;border-radius:100%;border-color:transparent;background-color:transparent!important;color:transparent!important;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-actions.swal2-loading .swal2-styled.swal2-cancel{margin-right:30px;margin-left:30px}.swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after{content:\"\";display:inline-block;width:15px;height:15px;margin-left:5px;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border:3px solid #999;border-radius:50%;border-right-color:transparent;box-shadow:1px 1px 1px #fff}.swal2-styled{margin:.3125em;padding:.625em 2em;box-shadow:none;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#3085d6;color:#fff;font-size:1.0625em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#aaa;color:#fff;font-size:1.0625em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(50,100,150,.4)}.swal2-styled::-moz-focus-inner{border:0}.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-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;height:.25em;overflow:hidden;border-bottom-right-radius:.3125em;border-bottom-left-radius:.3125em}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:1.25em auto}.swal2-close{position:absolute;z-index:2;top:0;right:0;align-items:center;justify-content:center;width:1.2em;height:1.2em;padding:0;overflow:hidden;transition:color .1s ease-out;border:none;border-radius:0;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close::-moz-focus-inner{border:0}.swal2-content{z-index:1;justify-content:center;margin:0;padding:0;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em auto}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 3px #c4e6f5}.swal2-file::-webkit-input-placeholder,.swal2-input::-webkit-input-placeholder,.swal2-textarea::-webkit-input-placeholder{color:#ccc}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::-ms-input-placeholder,.swal2-input::-ms-input-placeholder,.swal2-textarea::-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em auto;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{margin:0 .4em}.swal2-validation-message{display:none;align-items:center;justify-content:center;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";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}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;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;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.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;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);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;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .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-progress-steps{align-items:center;margin:0 0 1.25em;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;width:2em;height:2em;border-radius:2em;background:#3085d6;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#3085d6}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;width:2.5em;height:.4em;margin:0 -1px;background:#3085d6}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@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)}}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-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 swal2-toast-animate-success-line-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 swal2-toast-animate-success-line-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 swal2-toast-animate-success-line-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}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{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:.8125em;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:.8125em;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%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}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-container{top:auto;right:auto;bottom:auto;left:auto;max-width:calc(100% - .625em * 2);background-color:transparent!important}body.swal2-no-backdrop .swal2-container>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-container.swal2-top{top:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-top-left,body.swal2-no-backdrop .swal2-container.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-top-end,body.swal2-no-backdrop .swal2-container.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-container.swal2-center{top:50%;left:50%;transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-left,body.swal2-no-backdrop .swal2-container.swal2-center-start{top:50%;left:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-end,body.swal2-no-backdrop .swal2-container.swal2-center-right{top:50%;right:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom{bottom:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom-left,body.swal2-no-backdrop .swal2-container.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-bottom-end,body.swal2-no-backdrop .swal2-container.swal2-bottom-right{right:0;bottom:0}@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:static!important}}body.swal2-toast-shown .swal2-container{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left: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;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left: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;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%;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}");
|
Backend/public/vendor/sweetalert2/wordpress-admin.css
ADDED
@@ -0,0 +1,1371 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.swal2-popup.swal2-toast {
|
2 |
+
flex-direction: row;
|
3 |
+
align-items: center;
|
4 |
+
width: auto;
|
5 |
+
padding: 0.625em;
|
6 |
+
overflow-y: hidden;
|
7 |
+
background: #fff;
|
8 |
+
box-shadow: 0 0 0.625em #d9d9d9;
|
9 |
+
}
|
10 |
+
.swal2-popup.swal2-toast .swal2-header {
|
11 |
+
flex-direction: row;
|
12 |
+
}
|
13 |
+
.swal2-popup.swal2-toast .swal2-title {
|
14 |
+
flex-grow: 1;
|
15 |
+
justify-content: flex-start;
|
16 |
+
margin: 0 0.6em;
|
17 |
+
font-size: 1em;
|
18 |
+
}
|
19 |
+
.swal2-popup.swal2-toast .swal2-footer {
|
20 |
+
margin: 0.5em 0 0;
|
21 |
+
padding: 0.5em 0 0;
|
22 |
+
font-size: 0.8em;
|
23 |
+
}
|
24 |
+
.swal2-popup.swal2-toast .swal2-close {
|
25 |
+
position: static;
|
26 |
+
width: 0.8em;
|
27 |
+
height: 0.8em;
|
28 |
+
line-height: 0.8;
|
29 |
+
}
|
30 |
+
.swal2-popup.swal2-toast .swal2-content {
|
31 |
+
justify-content: flex-start;
|
32 |
+
font-size: 1em;
|
33 |
+
}
|
34 |
+
.swal2-popup.swal2-toast .swal2-icon {
|
35 |
+
width: 2em;
|
36 |
+
min-width: 2em;
|
37 |
+
height: 2em;
|
38 |
+
margin: 0;
|
39 |
+
}
|
40 |
+
.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content {
|
41 |
+
display: flex;
|
42 |
+
align-items: center;
|
43 |
+
font-size: 1.8em;
|
44 |
+
font-weight: bold;
|
45 |
+
}
|
46 |
+
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
47 |
+
.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content {
|
48 |
+
font-size: 0.25em;
|
49 |
+
}
|
50 |
+
}
|
51 |
+
.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring {
|
52 |
+
width: 2em;
|
53 |
+
height: 2em;
|
54 |
+
}
|
55 |
+
.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line] {
|
56 |
+
top: 0.875em;
|
57 |
+
width: 1.375em;
|
58 |
+
}
|
59 |
+
.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] {
|
60 |
+
left: 0.3125em;
|
61 |
+
}
|
62 |
+
.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] {
|
63 |
+
right: 0.3125em;
|
64 |
+
}
|
65 |
+
.swal2-popup.swal2-toast .swal2-actions {
|
66 |
+
flex-basis: auto !important;
|
67 |
+
width: auto;
|
68 |
+
height: auto;
|
69 |
+
margin: 0 0.3125em;
|
70 |
+
}
|
71 |
+
.swal2-popup.swal2-toast .swal2-styled {
|
72 |
+
margin: 0 0.3125em;
|
73 |
+
padding: 0.3125em 0.625em;
|
74 |
+
font-size: 1em;
|
75 |
+
}
|
76 |
+
.swal2-popup.swal2-toast .swal2-styled:focus {
|
77 |
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(50, 100, 150, 0.4);
|
78 |
+
}
|
79 |
+
.swal2-popup.swal2-toast .swal2-success {
|
80 |
+
border-color: #a5dc86;
|
81 |
+
}
|
82 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line] {
|
83 |
+
position: absolute;
|
84 |
+
width: 1.6em;
|
85 |
+
height: 3em;
|
86 |
+
transform: rotate(45deg);
|
87 |
+
border-radius: 50%;
|
88 |
+
}
|
89 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left] {
|
90 |
+
top: -0.8em;
|
91 |
+
left: -0.5em;
|
92 |
+
transform: rotate(-45deg);
|
93 |
+
transform-origin: 2em 2em;
|
94 |
+
border-radius: 4em 0 0 4em;
|
95 |
+
}
|
96 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right] {
|
97 |
+
top: -0.25em;
|
98 |
+
left: 0.9375em;
|
99 |
+
transform-origin: 0 1.5em;
|
100 |
+
border-radius: 0 4em 4em 0;
|
101 |
+
}
|
102 |
+
.swal2-popup.swal2-toast .swal2-success .swal2-success-ring {
|
103 |
+
width: 2em;
|
104 |
+
height: 2em;
|
105 |
+
}
|
106 |
+
.swal2-popup.swal2-toast .swal2-success .swal2-success-fix {
|
107 |
+
top: 0;
|
108 |
+
left: 0.4375em;
|
109 |
+
width: 0.4375em;
|
110 |
+
height: 2.6875em;
|
111 |
+
}
|
112 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line] {
|
113 |
+
height: 0.3125em;
|
114 |
+
}
|
115 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip] {
|
116 |
+
top: 1.125em;
|
117 |
+
left: 0.1875em;
|
118 |
+
width: 0.75em;
|
119 |
+
}
|
120 |
+
.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long] {
|
121 |
+
top: 0.9375em;
|
122 |
+
right: 0.1875em;
|
123 |
+
width: 1.375em;
|
124 |
+
}
|
125 |
+
.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip {
|
126 |
+
-webkit-animation: swal2-toast-animate-success-line-tip 0.75s;
|
127 |
+
animation: swal2-toast-animate-success-line-tip 0.75s;
|
128 |
+
}
|
129 |
+
.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long {
|
130 |
+
-webkit-animation: swal2-toast-animate-success-line-long 0.75s;
|
131 |
+
animation: swal2-toast-animate-success-line-long 0.75s;
|
132 |
+
}
|
133 |
+
.swal2-popup.swal2-toast.swal2-show {
|
134 |
+
-webkit-animation: swal2-toast-show 0.5s;
|
135 |
+
animation: swal2-toast-show 0.5s;
|
136 |
+
}
|
137 |
+
.swal2-popup.swal2-toast.swal2-hide {
|
138 |
+
-webkit-animation: swal2-toast-hide 0.1s forwards;
|
139 |
+
animation: swal2-toast-hide 0.1s forwards;
|
140 |
+
}
|
141 |
+
|
142 |
+
.swal2-container {
|
143 |
+
display: flex;
|
144 |
+
position: fixed;
|
145 |
+
z-index: 1060;
|
146 |
+
top: 0;
|
147 |
+
right: 0;
|
148 |
+
bottom: 0;
|
149 |
+
left: 0;
|
150 |
+
flex-direction: row;
|
151 |
+
align-items: center;
|
152 |
+
justify-content: center;
|
153 |
+
padding: 0.625em;
|
154 |
+
overflow-x: hidden;
|
155 |
+
transition: background-color 0.1s;
|
156 |
+
-webkit-overflow-scrolling: touch;
|
157 |
+
}
|
158 |
+
.swal2-container.swal2-backdrop-show, .swal2-container.swal2-noanimation {
|
159 |
+
background: rgba(0, 0, 0, 0.4);
|
160 |
+
}
|
161 |
+
.swal2-container.swal2-backdrop-hide {
|
162 |
+
background: transparent !important;
|
163 |
+
}
|
164 |
+
.swal2-container.swal2-top {
|
165 |
+
align-items: flex-start;
|
166 |
+
}
|
167 |
+
.swal2-container.swal2-top-start, .swal2-container.swal2-top-left {
|
168 |
+
align-items: flex-start;
|
169 |
+
justify-content: flex-start;
|
170 |
+
}
|
171 |
+
.swal2-container.swal2-top-end, .swal2-container.swal2-top-right {
|
172 |
+
align-items: flex-start;
|
173 |
+
justify-content: flex-end;
|
174 |
+
}
|
175 |
+
.swal2-container.swal2-center {
|
176 |
+
align-items: center;
|
177 |
+
}
|
178 |
+
.swal2-container.swal2-center-start, .swal2-container.swal2-center-left {
|
179 |
+
align-items: center;
|
180 |
+
justify-content: flex-start;
|
181 |
+
}
|
182 |
+
.swal2-container.swal2-center-end, .swal2-container.swal2-center-right {
|
183 |
+
align-items: center;
|
184 |
+
justify-content: flex-end;
|
185 |
+
}
|
186 |
+
.swal2-container.swal2-bottom {
|
187 |
+
align-items: flex-end;
|
188 |
+
}
|
189 |
+
.swal2-container.swal2-bottom-start, .swal2-container.swal2-bottom-left {
|
190 |
+
align-items: flex-end;
|
191 |
+
justify-content: flex-start;
|
192 |
+
}
|
193 |
+
.swal2-container.swal2-bottom-end, .swal2-container.swal2-bottom-right {
|
194 |
+
align-items: flex-end;
|
195 |
+
justify-content: flex-end;
|
196 |
+
}
|
197 |
+
.swal2-container.swal2-bottom > :first-child, .swal2-container.swal2-bottom-start > :first-child, .swal2-container.swal2-bottom-left > :first-child, .swal2-container.swal2-bottom-end > :first-child, .swal2-container.swal2-bottom-right > :first-child {
|
198 |
+
margin-top: auto;
|
199 |
+
}
|
200 |
+
.swal2-container.swal2-grow-fullscreen > .swal2-modal {
|
201 |
+
display: flex !important;
|
202 |
+
flex: 1;
|
203 |
+
align-self: stretch;
|
204 |
+
justify-content: center;
|
205 |
+
}
|
206 |
+
.swal2-container.swal2-grow-row > .swal2-modal {
|
207 |
+
display: flex !important;
|
208 |
+
flex: 1;
|
209 |
+
align-content: center;
|
210 |
+
justify-content: center;
|
211 |
+
}
|
212 |
+
.swal2-container.swal2-grow-column {
|
213 |
+
flex: 1;
|
214 |
+
flex-direction: column;
|
215 |
+
}
|
216 |
+
.swal2-container.swal2-grow-column.swal2-top, .swal2-container.swal2-grow-column.swal2-center, .swal2-container.swal2-grow-column.swal2-bottom {
|
217 |
+
align-items: center;
|
218 |
+
}
|
219 |
+
.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 {
|
220 |
+
align-items: flex-start;
|
221 |
+
}
|
222 |
+
.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 {
|
223 |
+
align-items: flex-end;
|
224 |
+
}
|
225 |
+
.swal2-container.swal2-grow-column > .swal2-modal {
|
226 |
+
display: flex !important;
|
227 |
+
flex: 1;
|
228 |
+
align-content: center;
|
229 |
+
justify-content: center;
|
230 |
+
}
|
231 |
+
.swal2-container.swal2-no-transition {
|
232 |
+
transition: none !important;
|
233 |
+
}
|
234 |
+
.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 {
|
235 |
+
margin: auto;
|
236 |
+
}
|
237 |
+
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
238 |
+
.swal2-container .swal2-modal {
|
239 |
+
margin: 0 !important;
|
240 |
+
}
|
241 |
+
}
|
242 |
+
|
243 |
+
.swal2-popup {
|
244 |
+
display: none;
|
245 |
+
position: relative;
|
246 |
+
box-sizing: border-box;
|
247 |
+
flex-direction: column;
|
248 |
+
justify-content: center;
|
249 |
+
width: 32em;
|
250 |
+
max-width: 100%;
|
251 |
+
padding: 1.25em;
|
252 |
+
border: none;
|
253 |
+
border-radius: 0.3125em;
|
254 |
+
background: #fff;
|
255 |
+
font-family: inherit;
|
256 |
+
font-size: 1rem;
|
257 |
+
}
|
258 |
+
.swal2-popup:focus {
|
259 |
+
outline: none;
|
260 |
+
}
|
261 |
+
.swal2-popup.swal2-loading {
|
262 |
+
overflow-y: hidden;
|
263 |
+
}
|
264 |
+
|
265 |
+
.swal2-header {
|
266 |
+
display: flex;
|
267 |
+
flex-direction: column;
|
268 |
+
align-items: center;
|
269 |
+
}
|
270 |
+
|
271 |
+
.swal2-title {
|
272 |
+
position: relative;
|
273 |
+
max-width: 100%;
|
274 |
+
margin: 0 0 0.4em;
|
275 |
+
padding: 0;
|
276 |
+
color: #595959;
|
277 |
+
font-size: 1.875em;
|
278 |
+
font-weight: 600;
|
279 |
+
text-align: center;
|
280 |
+
text-transform: none;
|
281 |
+
word-wrap: break-word;
|
282 |
+
}
|
283 |
+
|
284 |
+
.swal2-actions {
|
285 |
+
display: flex;
|
286 |
+
z-index: 1;
|
287 |
+
flex-wrap: wrap;
|
288 |
+
align-items: center;
|
289 |
+
justify-content: center;
|
290 |
+
width: 100%;
|
291 |
+
margin: 1.25em auto 0;
|
292 |
+
}
|
293 |
+
.swal2-actions:not(.swal2-loading) .swal2-styled[disabled] {
|
294 |
+
opacity: 0.4;
|
295 |
+
}
|
296 |
+
.swal2-actions:not(.swal2-loading) .swal2-styled:hover {
|
297 |
+
background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
|
298 |
+
}
|
299 |
+
.swal2-actions:not(.swal2-loading) .swal2-styled:active {
|
300 |
+
background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
|
301 |
+
}
|
302 |
+
.swal2-actions.swal2-loading .swal2-styled.swal2-confirm {
|
303 |
+
box-sizing: border-box;
|
304 |
+
width: 2.5em;
|
305 |
+
height: 2.5em;
|
306 |
+
margin: 0.46875em;
|
307 |
+
padding: 0;
|
308 |
+
-webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal;
|
309 |
+
animation: swal2-rotate-loading 1.5s linear 0s infinite normal;
|
310 |
+
border: 0.25em solid transparent;
|
311 |
+
border-radius: 100%;
|
312 |
+
border-color: transparent;
|
313 |
+
background-color: transparent !important;
|
314 |
+
color: transparent !important;
|
315 |
+
cursor: default;
|
316 |
+
-webkit-user-select: none;
|
317 |
+
-moz-user-select: none;
|
318 |
+
-ms-user-select: none;
|
319 |
+
user-select: none;
|
320 |
+
}
|
321 |
+
.swal2-actions.swal2-loading .swal2-styled.swal2-cancel {
|
322 |
+
margin-right: 30px;
|
323 |
+
margin-left: 30px;
|
324 |
+
}
|
325 |
+
.swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after {
|
326 |
+
content: "";
|
327 |
+
display: inline-block;
|
328 |
+
width: 15px;
|
329 |
+
height: 15px;
|
330 |
+
margin-left: 5px;
|
331 |
+
-webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal;
|
332 |
+
animation: swal2-rotate-loading 1.5s linear 0s infinite normal;
|
333 |
+
border: 3px solid #999999;
|
334 |
+
border-radius: 50%;
|
335 |
+
border-right-color: transparent;
|
336 |
+
box-shadow: 1px 1px 1px #fff;
|
337 |
+
}
|
338 |
+
|
339 |
+
.swal2-styled {
|
340 |
+
margin: 0.3125em;
|
341 |
+
padding: 0.625em 2em;
|
342 |
+
box-shadow: none;
|
343 |
+
font-weight: 500;
|
344 |
+
}
|
345 |
+
.swal2-styled:not([disabled]) {
|
346 |
+
cursor: pointer;
|
347 |
+
}
|
348 |
+
.swal2-styled.swal2-confirm {
|
349 |
+
border: 0;
|
350 |
+
border-radius: 0.25em;
|
351 |
+
background: initial;
|
352 |
+
background-color: #3085d6;
|
353 |
+
color: #fff;
|
354 |
+
font-size: 1.0625em;
|
355 |
+
}
|
356 |
+
.swal2-styled.swal2-cancel {
|
357 |
+
border: 0;
|
358 |
+
border-radius: 0.25em;
|
359 |
+
background: initial;
|
360 |
+
background-color: #aaa;
|
361 |
+
color: #fff;
|
362 |
+
font-size: 1.0625em;
|
363 |
+
}
|
364 |
+
.swal2-styled:focus {
|
365 |
+
outline: none;
|
366 |
+
box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(50, 100, 150, 0.4);
|
367 |
+
}
|
368 |
+
.swal2-styled::-moz-focus-inner {
|
369 |
+
border: 0;
|
370 |
+
}
|
371 |
+
|
372 |
+
.swal2-footer {
|
373 |
+
justify-content: center;
|
374 |
+
margin: 1.25em 0 0;
|
375 |
+
padding: 1em 0 0;
|
376 |
+
border-top: 1px solid #eee;
|
377 |
+
color: #545454;
|
378 |
+
font-size: 1em;
|
379 |
+
}
|
380 |
+
|
381 |
+
.swal2-timer-progress-bar-container {
|
382 |
+
position: absolute;
|
383 |
+
right: 0;
|
384 |
+
bottom: 0;
|
385 |
+
left: 0;
|
386 |
+
height: 0.25em;
|
387 |
+
overflow: hidden;
|
388 |
+
border-bottom-right-radius: 0.3125em;
|
389 |
+
border-bottom-left-radius: 0.3125em;
|
390 |
+
}
|
391 |
+
|
392 |
+
.swal2-timer-progress-bar {
|
393 |
+
width: 100%;
|
394 |
+
height: 0.25em;
|
395 |
+
background: rgba(0, 0, 0, 0.2);
|
396 |
+
}
|
397 |
+
|
398 |
+
.swal2-image {
|
399 |
+
max-width: 100%;
|
400 |
+
margin: 1.25em auto;
|
401 |
+
}
|
402 |
+
|
403 |
+
.swal2-close {
|
404 |
+
position: absolute;
|
405 |
+
z-index: 2;
|
406 |
+
top: 0;
|
407 |
+
right: 0;
|
408 |
+
align-items: center;
|
409 |
+
justify-content: center;
|
410 |
+
width: 1.2em;
|
411 |
+
height: 1.2em;
|
412 |
+
padding: 0;
|
413 |
+
overflow: hidden;
|
414 |
+
transition: color 0.1s ease-out;
|
415 |
+
border: none;
|
416 |
+
border-radius: 0;
|
417 |
+
background: transparent;
|
418 |
+
color: #cccccc;
|
419 |
+
font-family: serif;
|
420 |
+
font-size: 2.5em;
|
421 |
+
line-height: 1.2;
|
422 |
+
cursor: pointer;
|
423 |
+
}
|
424 |
+
.swal2-close:hover {
|
425 |
+
transform: none;
|
426 |
+
background: transparent;
|
427 |
+
color: #f27474;
|
428 |
+
}
|
429 |
+
.swal2-close::-moz-focus-inner {
|
430 |
+
border: 0;
|
431 |
+
}
|
432 |
+
|
433 |
+
.swal2-content {
|
434 |
+
z-index: 1;
|
435 |
+
justify-content: center;
|
436 |
+
margin: 0;
|
437 |
+
padding: 0;
|
438 |
+
color: #545454;
|
439 |
+
font-size: 1em;
|
440 |
+
font-weight: normal;
|
441 |
+
line-height: normal;
|
442 |
+
text-align: center;
|
443 |
+
word-wrap: break-word;
|
444 |
+
}
|
445 |
+
|
446 |
+
.swal2-input,
|
447 |
+
.swal2-file,
|
448 |
+
.swal2-textarea,
|
449 |
+
.swal2-select,
|
450 |
+
.swal2-radio,
|
451 |
+
.swal2-checkbox {
|
452 |
+
margin: 1em auto;
|
453 |
+
}
|
454 |
+
|
455 |
+
.swal2-input,
|
456 |
+
.swal2-file,
|
457 |
+
.swal2-textarea {
|
458 |
+
box-sizing: border-box;
|
459 |
+
width: 100%;
|
460 |
+
transition: border-color 0.3s, box-shadow 0.3s;
|
461 |
+
border: 1px solid #d9d9d9;
|
462 |
+
border-radius: 0.1875em;
|
463 |
+
background: inherit;
|
464 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06);
|
465 |
+
color: inherit;
|
466 |
+
font-size: 1.125em;
|
467 |
+
}
|
468 |
+
.swal2-input.swal2-inputerror,
|
469 |
+
.swal2-file.swal2-inputerror,
|
470 |
+
.swal2-textarea.swal2-inputerror {
|
471 |
+
border-color: #f27474 !important;
|
472 |
+
box-shadow: 0 0 2px #f27474 !important;
|
473 |
+
}
|
474 |
+
.swal2-input:focus,
|
475 |
+
.swal2-file:focus,
|
476 |
+
.swal2-textarea:focus {
|
477 |
+
border: 1px solid #b4dbed;
|
478 |
+
outline: none;
|
479 |
+
box-shadow: 0 0 3px #c4e6f5;
|
480 |
+
}
|
481 |
+
.swal2-input::-webkit-input-placeholder, .swal2-file::-webkit-input-placeholder, .swal2-textarea::-webkit-input-placeholder {
|
482 |
+
color: #cccccc;
|
483 |
+
}
|
484 |
+
.swal2-input::-moz-placeholder, .swal2-file::-moz-placeholder, .swal2-textarea::-moz-placeholder {
|
485 |
+
color: #cccccc;
|
486 |
+
}
|
487 |
+
.swal2-input:-ms-input-placeholder, .swal2-file:-ms-input-placeholder, .swal2-textarea:-ms-input-placeholder {
|
488 |
+
color: #cccccc;
|
489 |
+
}
|
490 |
+
.swal2-input::-ms-input-placeholder, .swal2-file::-ms-input-placeholder, .swal2-textarea::-ms-input-placeholder {
|
491 |
+
color: #cccccc;
|
492 |
+
}
|
493 |
+
.swal2-input::placeholder,
|
494 |
+
.swal2-file::placeholder,
|
495 |
+
.swal2-textarea::placeholder {
|
496 |
+
color: #cccccc;
|
497 |
+
}
|
498 |
+
|
499 |
+
.swal2-range {
|
500 |
+
margin: 1em auto;
|
501 |
+
background: #fff;
|
502 |
+
}
|
503 |
+
.swal2-range input {
|
504 |
+
width: 80%;
|
505 |
+
}
|
506 |
+
.swal2-range output {
|
507 |
+
width: 20%;
|
508 |
+
color: inherit;
|
509 |
+
font-weight: 600;
|
510 |
+
text-align: center;
|
511 |
+
}
|
512 |
+
.swal2-range input,
|
513 |
+
.swal2-range output {
|
514 |
+
height: 2.625em;
|
515 |
+
padding: 0;
|
516 |
+
font-size: 1.125em;
|
517 |
+
line-height: 2.625em;
|
518 |
+
}
|
519 |
+
|
520 |
+
.swal2-input {
|
521 |
+
height: 2.625em;
|
522 |
+
padding: 0 0.75em;
|
523 |
+
}
|
524 |
+
.swal2-input[type=number] {
|
525 |
+
max-width: 10em;
|
526 |
+
}
|
527 |
+
|
528 |
+
.swal2-file {
|
529 |
+
background: inherit;
|
530 |
+
font-size: 1.125em;
|
531 |
+
}
|
532 |
+
|
533 |
+
.swal2-textarea {
|
534 |
+
height: 6.75em;
|
535 |
+
padding: 0.75em;
|
536 |
+
}
|
537 |
+
|
538 |
+
.swal2-select {
|
539 |
+
min-width: 50%;
|
540 |
+
max-width: 100%;
|
541 |
+
padding: 0.375em 0.625em;
|
542 |
+
background: inherit;
|
543 |
+
color: inherit;
|
544 |
+
font-size: 1.125em;
|
545 |
+
}
|
546 |
+
|
547 |
+
.swal2-radio,
|
548 |
+
.swal2-checkbox {
|
549 |
+
align-items: center;
|
550 |
+
justify-content: center;
|
551 |
+
background: #fff;
|
552 |
+
color: inherit;
|
553 |
+
}
|
554 |
+
.swal2-radio label,
|
555 |
+
.swal2-checkbox label {
|
556 |
+
margin: 0 0.6em;
|
557 |
+
font-size: 1.125em;
|
558 |
+
}
|
559 |
+
.swal2-radio input,
|
560 |
+
.swal2-checkbox input {
|
561 |
+
margin: 0 0.4em;
|
562 |
+
}
|
563 |
+
|
564 |
+
.swal2-validation-message {
|
565 |
+
display: none;
|
566 |
+
align-items: center;
|
567 |
+
justify-content: center;
|
568 |
+
padding: 0.625em;
|
569 |
+
overflow: hidden;
|
570 |
+
background: #f0f0f0;
|
571 |
+
color: #666666;
|
572 |
+
font-size: 1em;
|
573 |
+
font-weight: 300;
|
574 |
+
}
|
575 |
+
.swal2-validation-message::before {
|
576 |
+
content: "!";
|
577 |
+
display: inline-block;
|
578 |
+
width: 1.5em;
|
579 |
+
min-width: 1.5em;
|
580 |
+
height: 1.5em;
|
581 |
+
margin: 0 0.625em;
|
582 |
+
border-radius: 50%;
|
583 |
+
background-color: #f27474;
|
584 |
+
color: #fff;
|
585 |
+
font-weight: 600;
|
586 |
+
line-height: 1.5em;
|
587 |
+
text-align: center;
|
588 |
+
}
|
589 |
+
|
590 |
+
.swal2-icon {
|
591 |
+
position: relative;
|
592 |
+
box-sizing: content-box;
|
593 |
+
justify-content: center;
|
594 |
+
width: 5em;
|
595 |
+
height: 5em;
|
596 |
+
margin: 1.25em auto 1.875em;
|
597 |
+
border: 0.25em solid transparent;
|
598 |
+
border-radius: 50%;
|
599 |
+
font-family: inherit;
|
600 |
+
line-height: 5em;
|
601 |
+
cursor: default;
|
602 |
+
-webkit-user-select: none;
|
603 |
+
-moz-user-select: none;
|
604 |
+
-ms-user-select: none;
|
605 |
+
user-select: none;
|
606 |
+
}
|
607 |
+
.swal2-icon .swal2-icon-content {
|
608 |
+
display: flex;
|
609 |
+
align-items: center;
|
610 |
+
font-size: 3.75em;
|
611 |
+
}
|
612 |
+
.swal2-icon.swal2-error {
|
613 |
+
border-color: #f27474;
|
614 |
+
color: #f27474;
|
615 |
+
}
|
616 |
+
.swal2-icon.swal2-error .swal2-x-mark {
|
617 |
+
position: relative;
|
618 |
+
flex-grow: 1;
|
619 |
+
}
|
620 |
+
.swal2-icon.swal2-error [class^=swal2-x-mark-line] {
|
621 |
+
display: block;
|
622 |
+
position: absolute;
|
623 |
+
top: 2.3125em;
|
624 |
+
width: 2.9375em;
|
625 |
+
height: 0.3125em;
|
626 |
+
border-radius: 0.125em;
|
627 |
+
background-color: #f27474;
|
628 |
+
}
|
629 |
+
.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] {
|
630 |
+
left: 1.0625em;
|
631 |
+
transform: rotate(45deg);
|
632 |
+
}
|
633 |
+
.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] {
|
634 |
+
right: 1em;
|
635 |
+
transform: rotate(-45deg);
|
636 |
+
}
|
637 |
+
.swal2-icon.swal2-error.swal2-icon-show {
|
638 |
+
-webkit-animation: swal2-animate-error-icon 0.5s;
|
639 |
+
animation: swal2-animate-error-icon 0.5s;
|
640 |
+
}
|
641 |
+
.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark {
|
642 |
+
-webkit-animation: swal2-animate-error-x-mark 0.5s;
|
643 |
+
animation: swal2-animate-error-x-mark 0.5s;
|
644 |
+
}
|
645 |
+
.swal2-icon.swal2-warning {
|
646 |
+
border-color: #facea8;
|
647 |
+
color: #f8bb86;
|
648 |
+
}
|
649 |
+
.swal2-icon.swal2-info {
|
650 |
+
border-color: #9de0f6;
|
651 |
+
color: #3fc3ee;
|
652 |
+
}
|
653 |
+
.swal2-icon.swal2-question {
|
654 |
+
border-color: #c9dae1;
|
655 |
+
color: #87adbd;
|
656 |
+
}
|
657 |
+
.swal2-icon.swal2-success {
|
658 |
+
border-color: #a5dc86;
|
659 |
+
color: #a5dc86;
|
660 |
+
}
|
661 |
+
.swal2-icon.swal2-success [class^=swal2-success-circular-line] {
|
662 |
+
position: absolute;
|
663 |
+
width: 3.75em;
|
664 |
+
height: 7.5em;
|
665 |
+
transform: rotate(45deg);
|
666 |
+
border-radius: 50%;
|
667 |
+
}
|
668 |
+
.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left] {
|
669 |
+
top: -0.4375em;
|
670 |
+
left: -2.0635em;
|
671 |
+
transform: rotate(-45deg);
|
672 |
+
transform-origin: 3.75em 3.75em;
|
673 |
+
border-radius: 7.5em 0 0 7.5em;
|
674 |
+
}
|
675 |
+
.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right] {
|
676 |
+
top: -0.6875em;
|
677 |
+
left: 1.875em;
|
678 |
+
transform: rotate(-45deg);
|
679 |
+
transform-origin: 0 3.75em;
|
680 |
+
border-radius: 0 7.5em 7.5em 0;
|
681 |
+
}
|
682 |
+
.swal2-icon.swal2-success .swal2-success-ring {
|
683 |
+
position: absolute;
|
684 |
+
z-index: 2;
|
685 |
+
top: -0.25em;
|
686 |
+
left: -0.25em;
|
687 |
+
box-sizing: content-box;
|
688 |
+
width: 100%;
|
689 |
+
height: 100%;
|
690 |
+
border: 0.25em solid rgba(165, 220, 134, 0.3);
|
691 |
+
border-radius: 50%;
|
692 |
+
}
|
693 |
+
.swal2-icon.swal2-success .swal2-success-fix {
|
694 |
+
position: absolute;
|
695 |
+
z-index: 1;
|
696 |
+
top: 0.5em;
|
697 |
+
left: 1.625em;
|
698 |
+
width: 0.4375em;
|
699 |
+
height: 5.625em;
|
700 |
+
transform: rotate(-45deg);
|
701 |
+
}
|
702 |
+
.swal2-icon.swal2-success [class^=swal2-success-line] {
|
703 |
+
display: block;
|
704 |
+
position: absolute;
|
705 |
+
z-index: 2;
|
706 |
+
height: 0.3125em;
|
707 |
+
border-radius: 0.125em;
|
708 |
+
background-color: #a5dc86;
|
709 |
+
}
|
710 |
+
.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip] {
|
711 |
+
top: 2.875em;
|
712 |
+
left: 0.8125em;
|
713 |
+
width: 1.5625em;
|
714 |
+
transform: rotate(45deg);
|
715 |
+
}
|
716 |
+
.swal2-icon.swal2-success [class^=swal2-success-line][class$=long] {
|
717 |
+
top: 2.375em;
|
718 |
+
right: 0.5em;
|
719 |
+
width: 2.9375em;
|
720 |
+
transform: rotate(-45deg);
|
721 |
+
}
|
722 |
+
.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip {
|
723 |
+
-webkit-animation: swal2-animate-success-line-tip 0.75s;
|
724 |
+
animation: swal2-animate-success-line-tip 0.75s;
|
725 |
+
}
|
726 |
+
.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long {
|
727 |
+
-webkit-animation: swal2-animate-success-line-long 0.75s;
|
728 |
+
animation: swal2-animate-success-line-long 0.75s;
|
729 |
+
}
|
730 |
+
.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right {
|
731 |
+
-webkit-animation: swal2-rotate-success-circular-line 4.25s ease-in;
|
732 |
+
animation: swal2-rotate-success-circular-line 4.25s ease-in;
|
733 |
+
}
|
734 |
+
|
735 |
+
.swal2-progress-steps {
|
736 |
+
align-items: center;
|
737 |
+
margin: 0 0 1.25em;
|
738 |
+
padding: 0;
|
739 |
+
background: inherit;
|
740 |
+
font-weight: 600;
|
741 |
+
}
|
742 |
+
.swal2-progress-steps li {
|
743 |
+
display: inline-block;
|
744 |
+
position: relative;
|
745 |
+
}
|
746 |
+
.swal2-progress-steps .swal2-progress-step {
|
747 |
+
z-index: 20;
|
748 |
+
width: 2em;
|
749 |
+
height: 2em;
|
750 |
+
border-radius: 2em;
|
751 |
+
background: #3085d6;
|
752 |
+
color: #fff;
|
753 |
+
line-height: 2em;
|
754 |
+
text-align: center;
|
755 |
+
}
|
756 |
+
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step {
|
757 |
+
background: #3085d6;
|
758 |
+
}
|
759 |
+
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step {
|
760 |
+
background: #add8e6;
|
761 |
+
color: #fff;
|
762 |
+
}
|
763 |
+
.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step-line {
|
764 |
+
background: #add8e6;
|
765 |
+
}
|
766 |
+
.swal2-progress-steps .swal2-progress-step-line {
|
767 |
+
z-index: 10;
|
768 |
+
width: 2.5em;
|
769 |
+
height: 0.4em;
|
770 |
+
margin: 0 -1px;
|
771 |
+
background: #3085d6;
|
772 |
+
}
|
773 |
+
|
774 |
+
[class^=swal2] {
|
775 |
+
-webkit-tap-highlight-color: transparent;
|
776 |
+
}
|
777 |
+
|
778 |
+
.swal2-show {
|
779 |
+
-webkit-animation: swal2-show 0.3s;
|
780 |
+
animation: swal2-show 0.3s;
|
781 |
+
}
|
782 |
+
|
783 |
+
.swal2-hide {
|
784 |
+
-webkit-animation: swal2-hide 0.15s forwards;
|
785 |
+
animation: swal2-hide 0.15s forwards;
|
786 |
+
}
|
787 |
+
|
788 |
+
.swal2-noanimation {
|
789 |
+
transition: none;
|
790 |
+
}
|
791 |
+
|
792 |
+
.swal2-scrollbar-measure {
|
793 |
+
position: absolute;
|
794 |
+
top: -9999px;
|
795 |
+
width: 50px;
|
796 |
+
height: 50px;
|
797 |
+
overflow: scroll;
|
798 |
+
}
|
799 |
+
|
800 |
+
.swal2-rtl .swal2-close {
|
801 |
+
right: auto;
|
802 |
+
left: 0;
|
803 |
+
}
|
804 |
+
.swal2-rtl .swal2-timer-progress-bar {
|
805 |
+
right: 0;
|
806 |
+
left: auto;
|
807 |
+
}
|
808 |
+
|
809 |
+
@supports (-ms-accelerator: true) {
|
810 |
+
.swal2-range input {
|
811 |
+
width: 100% !important;
|
812 |
+
}
|
813 |
+
.swal2-range output {
|
814 |
+
display: none;
|
815 |
+
}
|
816 |
+
}
|
817 |
+
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
818 |
+
.swal2-range input {
|
819 |
+
width: 100% !important;
|
820 |
+
}
|
821 |
+
.swal2-range output {
|
822 |
+
display: none;
|
823 |
+
}
|
824 |
+
}
|
825 |
+
@-moz-document url-prefix() {
|
826 |
+
.swal2-close:focus {
|
827 |
+
outline: 2px solid rgba(50, 100, 150, 0.4);
|
828 |
+
}
|
829 |
+
}
|
830 |
+
@-webkit-keyframes swal2-toast-show {
|
831 |
+
0% {
|
832 |
+
transform: translateY(-0.625em) rotateZ(2deg);
|
833 |
+
}
|
834 |
+
33% {
|
835 |
+
transform: translateY(0) rotateZ(-2deg);
|
836 |
+
}
|
837 |
+
66% {
|
838 |
+
transform: translateY(0.3125em) rotateZ(2deg);
|
839 |
+
}
|
840 |
+
100% {
|
841 |
+
transform: translateY(0) rotateZ(0deg);
|
842 |
+
}
|
843 |
+
}
|
844 |
+
@keyframes swal2-toast-show {
|
845 |
+
0% {
|
846 |
+
transform: translateY(-0.625em) rotateZ(2deg);
|
847 |
+
}
|
848 |
+
33% {
|
849 |
+
transform: translateY(0) rotateZ(-2deg);
|
850 |
+
}
|
851 |
+
66% {
|
852 |
+
transform: translateY(0.3125em) rotateZ(2deg);
|
853 |
+
}
|
854 |
+
100% {
|
855 |
+
transform: translateY(0) rotateZ(0deg);
|
856 |
+
}
|
857 |
+
}
|
858 |
+
@-webkit-keyframes swal2-toast-hide {
|
859 |
+
100% {
|
860 |
+
transform: rotateZ(1deg);
|
861 |
+
opacity: 0;
|
862 |
+
}
|
863 |
+
}
|
864 |
+
@keyframes swal2-toast-hide {
|
865 |
+
100% {
|
866 |
+
transform: rotateZ(1deg);
|
867 |
+
opacity: 0;
|
868 |
+
}
|
869 |
+
}
|
870 |
+
@-webkit-keyframes swal2-toast-animate-success-line-tip {
|
871 |
+
0% {
|
872 |
+
top: 0.5625em;
|
873 |
+
left: 0.0625em;
|
874 |
+
width: 0;
|
875 |
+
}
|
876 |
+
54% {
|
877 |
+
top: 0.125em;
|
878 |
+
left: 0.125em;
|
879 |
+
width: 0;
|
880 |
+
}
|
881 |
+
70% {
|
882 |
+
top: 0.625em;
|
883 |
+
left: -0.25em;
|
884 |
+
width: 1.625em;
|
885 |
+
}
|
886 |
+
84% {
|
887 |
+
top: 1.0625em;
|
888 |
+
left: 0.75em;
|
889 |
+
width: 0.5em;
|
890 |
+
}
|
891 |
+
100% {
|
892 |
+
top: 1.125em;
|
893 |
+
left: 0.1875em;
|
894 |
+
width: 0.75em;
|
895 |
+
}
|
896 |
+
}
|
897 |
+
@keyframes swal2-toast-animate-success-line-tip {
|
898 |
+
0% {
|
899 |
+
top: 0.5625em;
|
900 |
+
left: 0.0625em;
|
901 |
+
width: 0;
|
902 |
+
}
|
903 |
+
54% {
|
904 |
+
top: 0.125em;
|
905 |
+
left: 0.125em;
|
906 |
+
width: 0;
|
907 |
+
}
|
908 |
+
70% {
|
909 |
+
top: 0.625em;
|
910 |
+
left: -0.25em;
|
911 |
+
width: 1.625em;
|
912 |
+
}
|
913 |
+
84% {
|
914 |
+
top: 1.0625em;
|
915 |
+
left: 0.75em;
|
916 |
+
width: 0.5em;
|
917 |
+
}
|
918 |
+
100% {
|
919 |
+
top: 1.125em;
|
920 |
+
left: 0.1875em;
|
921 |
+
width: 0.75em;
|
922 |
+
}
|
923 |
+
}
|
924 |
+
@-webkit-keyframes swal2-toast-animate-success-line-long {
|
925 |
+
0% {
|
926 |
+
top: 1.625em;
|
927 |
+
right: 1.375em;
|
928 |
+
width: 0;
|
929 |
+
}
|
930 |
+
65% {
|
931 |
+
top: 1.25em;
|
932 |
+
right: 0.9375em;
|
933 |
+
width: 0;
|
934 |
+
}
|
935 |
+
84% {
|
936 |
+
top: 0.9375em;
|
937 |
+
right: 0;
|
938 |
+
width: 1.125em;
|
939 |
+
}
|
940 |
+
100% {
|
941 |
+
top: 0.9375em;
|
942 |
+
right: 0.1875em;
|
943 |
+
width: 1.375em;
|
944 |
+
}
|
945 |
+
}
|
946 |
+
@keyframes swal2-toast-animate-success-line-long {
|
947 |
+
0% {
|
948 |
+
top: 1.625em;
|
949 |
+
right: 1.375em;
|
950 |
+
width: 0;
|
951 |
+
}
|
952 |
+
65% {
|
953 |
+
top: 1.25em;
|
954 |
+
right: 0.9375em;
|
955 |
+
width: 0;
|
956 |
+
}
|
957 |
+
84% {
|
958 |
+
top: 0.9375em;
|
959 |
+
right: 0;
|
960 |
+
width: 1.125em;
|
961 |
+
}
|
962 |
+
100% {
|
963 |
+
top: 0.9375em;
|
964 |
+
right: 0.1875em;
|
965 |
+
width: 1.375em;
|
966 |
+
}
|
967 |
+
}
|
968 |
+
@-webkit-keyframes swal2-show {
|
969 |
+
0% {
|
970 |
+
transform: scale(0.7);
|
971 |
+
}
|
972 |
+
45% {
|
973 |
+
transform: scale(1.05);
|
974 |
+
}
|
975 |
+
80% {
|
976 |
+
transform: scale(0.95);
|
977 |
+
}
|
978 |
+
100% {
|
979 |
+
transform: scale(1);
|
980 |
+
}
|
981 |
+
}
|
982 |
+
@keyframes swal2-show {
|
983 |
+
0% {
|
984 |
+
transform: scale(0.7);
|
985 |
+
}
|
986 |
+
45% {
|
987 |
+
transform: scale(1.05);
|
988 |
+
}
|
989 |
+
80% {
|
990 |
+
transform: scale(0.95);
|
991 |
+
}
|
992 |
+
100% {
|
993 |
+
transform: scale(1);
|
994 |
+
}
|
995 |
+
}
|
996 |
+
@-webkit-keyframes swal2-hide {
|
997 |
+
0% {
|
998 |
+
transform: scale(1);
|
999 |
+
opacity: 1;
|
1000 |
+
}
|
1001 |
+
100% {
|
1002 |
+
transform: scale(0.5);
|
1003 |
+
opacity: 0;
|
1004 |
+
}
|
1005 |
+
}
|
1006 |
+
@keyframes swal2-hide {
|
1007 |
+
0% {
|
1008 |
+
transform: scale(1);
|
1009 |
+
opacity: 1;
|
1010 |
+
}
|
1011 |
+
100% {
|
1012 |
+
transform: scale(0.5);
|
1013 |
+
opacity: 0;
|
1014 |
+
}
|
1015 |
+
}
|
1016 |
+
@-webkit-keyframes swal2-animate-success-line-tip {
|
1017 |
+
0% {
|
1018 |
+
top: 1.1875em;
|
1019 |
+
left: 0.0625em;
|
1020 |
+
width: 0;
|
1021 |
+
}
|
1022 |
+
54% {
|
1023 |
+
top: 1.0625em;
|
1024 |
+
left: 0.125em;
|
1025 |
+
width: 0;
|
1026 |
+
}
|
1027 |
+
70% {
|
1028 |
+
top: 2.1875em;
|
1029 |
+
left: -0.375em;
|
1030 |
+
width: 3.125em;
|
1031 |
+
}
|
1032 |
+
84% {
|
1033 |
+
top: 3em;
|
1034 |
+
left: 1.3125em;
|
1035 |
+
width: 1.0625em;
|
1036 |
+
}
|
1037 |
+
100% {
|
1038 |
+
top: 2.8125em;
|
1039 |
+
left: 0.8125em;
|
1040 |
+
width: 1.5625em;
|
1041 |
+
}
|
1042 |
+
}
|
1043 |
+
@keyframes swal2-animate-success-line-tip {
|
1044 |
+
0% {
|
1045 |
+
top: 1.1875em;
|
1046 |
+
left: 0.0625em;
|
1047 |
+
width: 0;
|
1048 |
+
}
|
1049 |
+
54% {
|
1050 |
+
top: 1.0625em;
|
1051 |
+
left: 0.125em;
|
1052 |
+
width: 0;
|
1053 |
+
}
|
1054 |
+
70% {
|
1055 |
+
top: 2.1875em;
|
1056 |
+
left: -0.375em;
|
1057 |
+
width: 3.125em;
|
1058 |
+
}
|
1059 |
+
84% {
|
1060 |
+
top: 3em;
|
1061 |
+
left: 1.3125em;
|
1062 |
+
width: 1.0625em;
|
1063 |
+
}
|
1064 |
+
100% {
|
1065 |
+
top: 2.8125em;
|
1066 |
+
left: 0.8125em;
|
1067 |
+
width: 1.5625em;
|
1068 |
+
}
|
1069 |
+
}
|
1070 |
+
@-webkit-keyframes swal2-animate-success-line-long {
|
1071 |
+
0% {
|
1072 |
+
top: 3.375em;
|
1073 |
+
right: 2.875em;
|
1074 |
+
width: 0;
|
1075 |
+
}
|
1076 |
+
65% {
|
1077 |
+
top: 3.375em;
|
1078 |
+
right: 2.875em;
|
1079 |
+
width: 0;
|
1080 |
+
}
|
1081 |
+
84% {
|
1082 |
+
top: 2.1875em;
|
1083 |
+
right: 0;
|
1084 |
+
width: 3.4375em;
|
1085 |
+
}
|
1086 |
+
100% {
|
1087 |
+
top: 2.375em;
|
1088 |
+
right: 0.5em;
|
1089 |
+
width: 2.9375em;
|
1090 |
+
}
|
1091 |
+
}
|
1092 |
+
@keyframes swal2-animate-success-line-long {
|
1093 |
+
0% {
|
1094 |
+
top: 3.375em;
|
1095 |
+
right: 2.875em;
|
1096 |
+
width: 0;
|
1097 |
+
}
|
1098 |
+
65% {
|
1099 |
+
top: 3.375em;
|
1100 |
+
right: 2.875em;
|
1101 |
+
width: 0;
|
1102 |
+
}
|
1103 |
+
84% {
|
1104 |
+
top: 2.1875em;
|
1105 |
+
right: 0;
|
1106 |
+
width: 3.4375em;
|
1107 |
+
}
|
1108 |
+
100% {
|
1109 |
+
top: 2.375em;
|
1110 |
+
right: 0.5em;
|
1111 |
+
width: 2.9375em;
|
1112 |
+
}
|
1113 |
+
}
|
1114 |
+
@-webkit-keyframes swal2-rotate-success-circular-line {
|
1115 |
+
0% {
|
1116 |
+
transform: rotate(-45deg);
|
1117 |
+
}
|
1118 |
+
5% {
|
1119 |
+
transform: rotate(-45deg);
|
1120 |
+
}
|
1121 |
+
12% {
|
1122 |
+
transform: rotate(-405deg);
|
1123 |
+
}
|
1124 |
+
100% {
|
1125 |
+
transform: rotate(-405deg);
|
1126 |
+
}
|
1127 |
+
}
|
1128 |
+
@keyframes swal2-rotate-success-circular-line {
|
1129 |
+
0% {
|
1130 |
+
transform: rotate(-45deg);
|
1131 |
+
}
|
1132 |
+
5% {
|
1133 |
+
transform: rotate(-45deg);
|
1134 |
+
}
|
1135 |
+
12% {
|
1136 |
+
transform: rotate(-405deg);
|
1137 |
+
}
|
1138 |
+
100% {
|
1139 |
+
transform: rotate(-405deg);
|
1140 |
+
}
|
1141 |
+
}
|
1142 |
+
@-webkit-keyframes swal2-animate-error-x-mark {
|
1143 |
+
0% {
|
1144 |
+
margin-top: 1.625em;
|
1145 |
+
transform: scale(0.4);
|
1146 |
+
opacity: 0;
|
1147 |
+
}
|
1148 |
+
50% {
|
1149 |
+
margin-top: 1.625em;
|
1150 |
+
transform: scale(0.4);
|
1151 |
+
opacity: 0;
|
1152 |
+
}
|
1153 |
+
80% {
|
1154 |
+
margin-top: -0.375em;
|
1155 |
+
transform: scale(1.15);
|
1156 |
+
}
|
1157 |
+
100% {
|
1158 |
+
margin-top: 0;
|
1159 |
+
transform: scale(1);
|
1160 |
+
opacity: 1;
|
1161 |
+
}
|
1162 |
+
}
|
1163 |
+
@keyframes swal2-animate-error-x-mark {
|
1164 |
+
0% {
|
1165 |
+
margin-top: 1.625em;
|
1166 |
+
transform: scale(0.4);
|
1167 |
+
opacity: 0;
|
1168 |
+
}
|
1169 |
+
50% {
|
1170 |
+
margin-top: 1.625em;
|
1171 |
+
transform: scale(0.4);
|
1172 |
+
opacity: 0;
|
1173 |
+
}
|
1174 |
+
80% {
|
1175 |
+
margin-top: -0.375em;
|
1176 |
+
transform: scale(1.15);
|
1177 |
+
}
|
1178 |
+
100% {
|
1179 |
+
margin-top: 0;
|
1180 |
+
transform: scale(1);
|
1181 |
+
opacity: 1;
|
1182 |
+
}
|
1183 |
+
}
|
1184 |
+
@-webkit-keyframes swal2-animate-error-icon {
|
1185 |
+
0% {
|
1186 |
+
transform: rotateX(100deg);
|
1187 |
+
opacity: 0;
|
1188 |
+
}
|
1189 |
+
100% {
|
1190 |
+
transform: rotateX(0deg);
|
1191 |
+
opacity: 1;
|
1192 |
+
}
|
1193 |
+
}
|
1194 |
+
@keyframes swal2-animate-error-icon {
|
1195 |
+
0% {
|
1196 |
+
transform: rotateX(100deg);
|
1197 |
+
opacity: 0;
|
1198 |
+
}
|
1199 |
+
100% {
|
1200 |
+
transform: rotateX(0deg);
|
1201 |
+
opacity: 1;
|
1202 |
+
}
|
1203 |
+
}
|
1204 |
+
@-webkit-keyframes swal2-rotate-loading {
|
1205 |
+
0% {
|
1206 |
+
transform: rotate(0deg);
|
1207 |
+
}
|
1208 |
+
100% {
|
1209 |
+
transform: rotate(360deg);
|
1210 |
+
}
|
1211 |
+
}
|
1212 |
+
@keyframes swal2-rotate-loading {
|
1213 |
+
0% {
|
1214 |
+
transform: rotate(0deg);
|
1215 |
+
}
|
1216 |
+
100% {
|
1217 |
+
transform: rotate(360deg);
|
1218 |
+
}
|
1219 |
+
}
|
1220 |
+
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
|
1221 |
+
overflow: hidden;
|
1222 |
+
}
|
1223 |
+
body.swal2-height-auto {
|
1224 |
+
height: auto !important;
|
1225 |
+
}
|
1226 |
+
body.swal2-no-backdrop .swal2-container {
|
1227 |
+
top: auto;
|
1228 |
+
right: auto;
|
1229 |
+
bottom: auto;
|
1230 |
+
left: auto;
|
1231 |
+
max-width: calc(100% - 0.625em * 2);
|
1232 |
+
background-color: transparent !important;
|
1233 |
+
}
|
1234 |
+
body.swal2-no-backdrop .swal2-container > .swal2-modal {
|
1235 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
|
1236 |
+
}
|
1237 |
+
body.swal2-no-backdrop .swal2-container.swal2-top {
|
1238 |
+
top: 0;
|
1239 |
+
left: 50%;
|
1240 |
+
transform: translateX(-50%);
|
1241 |
+
}
|
1242 |
+
body.swal2-no-backdrop .swal2-container.swal2-top-start, body.swal2-no-backdrop .swal2-container.swal2-top-left {
|
1243 |
+
top: 0;
|
1244 |
+
left: 0;
|
1245 |
+
}
|
1246 |
+
body.swal2-no-backdrop .swal2-container.swal2-top-end, body.swal2-no-backdrop .swal2-container.swal2-top-right {
|
1247 |
+
top: 0;
|
1248 |
+
right: 0;
|
1249 |
+
}
|
1250 |
+
body.swal2-no-backdrop .swal2-container.swal2-center {
|
1251 |
+
top: 50%;
|
1252 |
+
left: 50%;
|
1253 |
+
transform: translate(-50%, -50%);
|
1254 |
+
}
|
1255 |
+
body.swal2-no-backdrop .swal2-container.swal2-center-start, body.swal2-no-backdrop .swal2-container.swal2-center-left {
|
1256 |
+
top: 50%;
|
1257 |
+
left: 0;
|
1258 |
+
transform: translateY(-50%);
|
1259 |
+
}
|
1260 |
+
body.swal2-no-backdrop .swal2-container.swal2-center-end, body.swal2-no-backdrop .swal2-container.swal2-center-right {
|
1261 |
+
top: 50%;
|
1262 |
+
right: 0;
|
1263 |
+
transform: translateY(-50%);
|
1264 |
+
}
|
1265 |
+
body.swal2-no-backdrop .swal2-container.swal2-bottom {
|
1266 |
+
bottom: 0;
|
1267 |
+
left: 50%;
|
1268 |
+
transform: translateX(-50%);
|
1269 |
+
}
|
1270 |
+
body.swal2-no-backdrop .swal2-container.swal2-bottom-start, body.swal2-no-backdrop .swal2-container.swal2-bottom-left {
|
1271 |
+
bottom: 0;
|
1272 |
+
left: 0;
|
1273 |
+
}
|
1274 |
+
body.swal2-no-backdrop .swal2-container.swal2-bottom-end, body.swal2-no-backdrop .swal2-container.swal2-bottom-right {
|
1275 |
+
right: 0;
|
1276 |
+
bottom: 0;
|
1277 |
+
}
|
1278 |
+
@media print {
|
1279 |
+
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
|
1280 |
+
overflow-y: scroll !important;
|
1281 |
+
}
|
1282 |
+
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) > [aria-hidden=true] {
|
1283 |
+
display: none;
|
1284 |
+
}
|
1285 |
+
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container {
|
1286 |
+
position: static !important;
|
1287 |
+
}
|
1288 |
+
}
|
1289 |
+
body.swal2-toast-shown .swal2-container {
|
1290 |
+
background-color: transparent;
|
1291 |
+
}
|
1292 |
+
body.swal2-toast-shown .swal2-container.swal2-top {
|
1293 |
+
top: 0;
|
1294 |
+
right: auto;
|
1295 |
+
bottom: auto;
|
1296 |
+
left: 50%;
|
1297 |
+
transform: translateX(-50%);
|
1298 |
+
}
|
1299 |
+
body.swal2-toast-shown .swal2-container.swal2-top-end, body.swal2-toast-shown .swal2-container.swal2-top-right {
|
1300 |
+
top: 0;
|
1301 |
+
right: 0;
|
1302 |
+
bottom: auto;
|
1303 |
+
left: auto;
|
1304 |
+
}
|
1305 |
+
body.swal2-toast-shown .swal2-container.swal2-top-start, body.swal2-toast-shown .swal2-container.swal2-top-left {
|
1306 |
+
top: 0;
|
1307 |
+
right: auto;
|
1308 |
+
bottom: auto;
|
1309 |
+
left: 0;
|
1310 |
+
}
|
1311 |
+
body.swal2-toast-shown .swal2-container.swal2-center-start, body.swal2-toast-shown .swal2-container.swal2-center-left {
|
1312 |
+
top: 50%;
|
1313 |
+
right: auto;
|
1314 |
+
bottom: auto;
|
1315 |
+
left: 0;
|
1316 |
+
transform: translateY(-50%);
|
1317 |
+
}
|
1318 |
+
body.swal2-toast-shown .swal2-container.swal2-center {
|
1319 |
+
top: 50%;
|
1320 |
+
right: auto;
|
1321 |
+
bottom: auto;
|
1322 |
+
left: 50%;
|
1323 |
+
transform: translate(-50%, -50%);
|
1324 |
+
}
|
1325 |
+
body.swal2-toast-shown .swal2-container.swal2-center-end, body.swal2-toast-shown .swal2-container.swal2-center-right {
|
1326 |
+
top: 50%;
|
1327 |
+
right: 0;
|
1328 |
+
bottom: auto;
|
1329 |
+
left: auto;
|
1330 |
+
transform: translateY(-50%);
|
1331 |
+
}
|
1332 |
+
body.swal2-toast-shown .swal2-container.swal2-bottom-start, body.swal2-toast-shown .swal2-container.swal2-bottom-left {
|
1333 |
+
top: auto;
|
1334 |
+
right: auto;
|
1335 |
+
bottom: 0;
|
1336 |
+
left: 0;
|
1337 |
+
}
|
1338 |
+
body.swal2-toast-shown .swal2-container.swal2-bottom {
|
1339 |
+
top: auto;
|
1340 |
+
right: auto;
|
1341 |
+
bottom: 0;
|
1342 |
+
left: 50%;
|
1343 |
+
transform: translateX(-50%);
|
1344 |
+
}
|
1345 |
+
body.swal2-toast-shown .swal2-container.swal2-bottom-end, body.swal2-toast-shown .swal2-container.swal2-bottom-right {
|
1346 |
+
top: auto;
|
1347 |
+
right: 0;
|
1348 |
+
bottom: 0;
|
1349 |
+
left: auto;
|
1350 |
+
}
|
1351 |
+
body.swal2-toast-column .swal2-toast {
|
1352 |
+
flex-direction: column;
|
1353 |
+
align-items: stretch;
|
1354 |
+
}
|
1355 |
+
body.swal2-toast-column .swal2-toast .swal2-actions {
|
1356 |
+
flex: 1;
|
1357 |
+
align-self: stretch;
|
1358 |
+
height: 2.2em;
|
1359 |
+
margin-top: 0.3125em;
|
1360 |
+
}
|
1361 |
+
body.swal2-toast-column .swal2-toast .swal2-loading {
|
1362 |
+
justify-content: center;
|
1363 |
+
}
|
1364 |
+
body.swal2-toast-column .swal2-toast .swal2-input {
|
1365 |
+
height: 2em;
|
1366 |
+
margin: 0.3125em auto;
|
1367 |
+
font-size: 1em;
|
1368 |
+
}
|
1369 |
+
body.swal2-toast-column .swal2-toast .swal2-validation-message {
|
1370 |
+
font-size: 1em;
|
1371 |
+
}
|
Backend/public/vendor/sweetalert2/wordpress-admin.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.swal2-popup.swal2-toast{flex-direction:row;align-items:center;width:auto;padding:.625em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9}.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:static;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 .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{font-size:.25em}}.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{flex-basis:auto!important;width:auto;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 1px #fff,0 0 0 3px 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:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);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;transform-origin:0 1.5em;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-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:flex;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;flex-direction:row;align-items:center;justify-content:center;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.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-bottom-end>:first-child,.swal2-container.swal2-bottom-left>:first-child,.swal2-container.swal2-bottom-right>:first-child,.swal2-container.swal2-bottom-start>:first-child,.swal2-container.swal2-bottom>:first-child{margin-top:auto}.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.swal2-no-transition{transition:none!important}.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-popup{display:none;position:relative;box-sizing:border-box;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border:none;border-radius:.3125em;background:#fff;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-header{display:flex;flex-direction:column;align-items:center}.swal2-title{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-actions{display:flex;z-index:1;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;margin:1.25em auto 0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-actions.swal2-loading .swal2-styled.swal2-confirm{box-sizing:border-box;width:2.5em;height:2.5em;margin:.46875em;padding:0;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border:.25em solid transparent;border-radius:100%;border-color:transparent;background-color:transparent!important;color:transparent!important;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-actions.swal2-loading .swal2-styled.swal2-cancel{margin-right:30px;margin-left:30px}.swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after{content:"";display:inline-block;width:15px;height:15px;margin-left:5px;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border:3px solid #999;border-radius:50%;border-right-color:transparent;box-shadow:1px 1px 1px #fff}.swal2-styled{margin:.3125em;padding:.625em 2em;box-shadow:none;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#3085d6;color:#fff;font-size:1.0625em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#aaa;color:#fff;font-size:1.0625em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(50,100,150,.4)}.swal2-styled::-moz-focus-inner{border:0}.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-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;height:.25em;overflow:hidden;border-bottom-right-radius:.3125em;border-bottom-left-radius:.3125em}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:1.25em auto}.swal2-close{position:absolute;z-index:2;top:0;right:0;align-items:center;justify-content:center;width:1.2em;height:1.2em;padding:0;overflow:hidden;transition:color .1s ease-out;border:none;border-radius:0;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close::-moz-focus-inner{border:0}.swal2-content{z-index:1;justify-content:center;margin:0;padding:0;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em auto}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 3px #c4e6f5}.swal2-file::-webkit-input-placeholder,.swal2-input::-webkit-input-placeholder,.swal2-textarea::-webkit-input-placeholder{color:#ccc}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::-ms-input-placeholder,.swal2-input::-ms-input-placeholder,.swal2-textarea::-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em auto;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{margin:0 .4em}.swal2-validation-message{display:none;align-items:center;justify-content:center;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";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}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;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;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.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;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);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;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .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-progress-steps{align-items:center;margin:0 0 1.25em;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;width:2em;height:2em;border-radius:2em;background:#3085d6;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#3085d6}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;width:2.5em;height:.4em;margin:0 -1px;background:#3085d6}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@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)}}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-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 swal2-toast-animate-success-line-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 swal2-toast-animate-success-line-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 swal2-toast-animate-success-line-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}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{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:.8125em;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:.8125em;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%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}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-container{top:auto;right:auto;bottom:auto;left:auto;max-width:calc(100% - .625em * 2);background-color:transparent!important}body.swal2-no-backdrop .swal2-container>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-container.swal2-top{top:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-top-left,body.swal2-no-backdrop .swal2-container.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-top-end,body.swal2-no-backdrop .swal2-container.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-container.swal2-center{top:50%;left:50%;transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-left,body.swal2-no-backdrop .swal2-container.swal2-center-start{top:50%;left:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-end,body.swal2-no-backdrop .swal2-container.swal2-center-right{top:50%;right:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom{bottom:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom-left,body.swal2-no-backdrop .swal2-container.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-bottom-end,body.swal2-no-backdrop .swal2-container.swal2-bottom-right{right:0;bottom:0}@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:static!important}}body.swal2-toast-shown .swal2-container{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left: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;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left: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;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%;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}
|
Core/Utils/Report.php
DELETED
@@ -1,84 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace WPStaging\Core\Utils;
|
4 |
-
|
5 |
-
use WPStaging\Backend\Modules\SystemInfo;
|
6 |
-
|
7 |
-
class Report
|
8 |
-
{
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Send customer issue report
|
12 |
-
*
|
13 |
-
* @param string $email User e-mail
|
14 |
-
* @param string $message User message
|
15 |
-
* @param integer $terms User accept terms
|
16 |
-
*
|
17 |
-
* @return array
|
18 |
-
*/
|
19 |
-
public function send($email, $message, $terms, $syslog, $provider = null)
|
20 |
-
{
|
21 |
-
$errors = [];
|
22 |
-
$attachments = [];
|
23 |
-
$maxFileSize = 512 * 1024;
|
24 |
-
$message .= "\n\n'Hosting provider: " . $provider;
|
25 |
-
|
26 |
-
if ( ! empty($syslog)) {
|
27 |
-
$message .= "\n\n'" . $this->getSyslog();
|
28 |
-
|
29 |
-
$debugLogFile = WP_CONTENT_DIR . '/debug.log';
|
30 |
-
if (filesize($debugLogFile) && $maxFileSize > filesize($debugLogFile)) {
|
31 |
-
$attachments[] = $debugLogFile;
|
32 |
-
}
|
33 |
-
}
|
34 |
-
|
35 |
-
if ( ! filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
36 |
-
$errors[] = __('Email address is not valid.', 'wp-staging');
|
37 |
-
} elseif (empty($message)) {
|
38 |
-
$errors[] = __('Please enter your issue.', 'wp-staging');
|
39 |
-
} elseif (empty($terms)) {
|
40 |
-
$errors[] = __('Please accept our privacy policy.', 'wp-staging');
|
41 |
-
} else {
|
42 |
-
|
43 |
-
if ($this->sendMail($email, $message, $attachments) === false) {
|
44 |
-
$errors[] = 'Can not send report. <br>Please send us a mail to<br>support@wp-staging.com';
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
-
return $errors;
|
49 |
-
}
|
50 |
-
|
51 |
-
private function getSyslog()
|
52 |
-
{
|
53 |
-
|
54 |
-
$syslog = new SystemInfo();
|
55 |
-
|
56 |
-
return $syslog->get();
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* send feedback via email
|
61 |
-
*
|
62 |
-
* @return boolean
|
63 |
-
*/
|
64 |
-
private function sendMail($from, $text, $attachments)
|
65 |
-
{
|
66 |
-
|
67 |
-
$headers = [];
|
68 |
-
|
69 |
-
$headers[] = "From: $from";
|
70 |
-
$headers[] = "Reply-To: $from";
|
71 |
-
|
72 |
-
$subject = 'Report Issue!';
|
73 |
-
|
74 |
-
$success = wp_mail('support@wp-staging.com', $subject, $text, $headers, $attachments);
|
75 |
-
|
76 |
-
if ($success) {
|
77 |
-
return true;
|
78 |
-
} else {
|
79 |
-
return false;
|
80 |
-
}
|
81 |
-
die();
|
82 |
-
}
|
83 |
-
|
84 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Core/WPStaging.php
CHANGED
@@ -203,27 +203,27 @@ final class WPStaging {
|
|
203 |
"wpstg-admin-script", $this->backend_url . "js/wpstg-admin.js", ["jquery"], self::getVersion(), false
|
204 |
);
|
205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
// Load admin js pro files
|
207 |
if(defined('WPSTGPRO_VERSION')) {
|
208 |
wp_enqueue_script(
|
209 |
"wpstg-admin-pro-script", $this->url . "Backend/Pro/public/js/wpstg-admin-pro.js", ["jquery"], self::getVersion(), false
|
210 |
);
|
211 |
-
|
212 |
-
// Sweet Alert
|
213 |
-
wp_enqueue_script(
|
214 |
-
'wpstg-admin-pro-sweetalerts',
|
215 |
-
$this->url . 'Backend/Pro/public/vendor/sweetalert2/sweetalert2.all.min.js',
|
216 |
-
[],
|
217 |
-
self::getVersion(),
|
218 |
-
true
|
219 |
-
);
|
220 |
-
|
221 |
-
wp_enqueue_style(
|
222 |
-
'wpstg-admin-pro-sweetalerts',
|
223 |
-
$this->url . 'Backend/Pro/public/vendor/sweetalert2/wordpress-admin.min.css',
|
224 |
-
[],
|
225 |
-
self::getVersion()
|
226 |
-
);
|
227 |
}
|
228 |
|
229 |
// Load admin css files
|
203 |
"wpstg-admin-script", $this->backend_url . "js/wpstg-admin.js", ["jquery"], self::getVersion(), false
|
204 |
);
|
205 |
|
206 |
+
// Sweet Alert
|
207 |
+
wp_enqueue_script(
|
208 |
+
'wpstg-admin-sweetalerts',
|
209 |
+
$this->url . 'Backend/public/vendor/sweetalert2/sweetalert2.all.min.js',
|
210 |
+
[],
|
211 |
+
self::getVersion(),
|
212 |
+
true
|
213 |
+
);
|
214 |
+
|
215 |
+
wp_enqueue_style(
|
216 |
+
'wpstg-admin-sweetalerts',
|
217 |
+
$this->url . 'Backend/public/vendor/sweetalert2/wordpress-admin.min.css',
|
218 |
+
[],
|
219 |
+
self::getVersion()
|
220 |
+
);
|
221 |
+
|
222 |
// Load admin js pro files
|
223 |
if(defined('WPSTGPRO_VERSION')) {
|
224 |
wp_enqueue_script(
|
225 |
"wpstg-admin-pro-script", $this->url . "Backend/Pro/public/js/wpstg-admin-pro.js", ["jquery"], self::getVersion(), false
|
226 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
}
|
228 |
|
229 |
// Load admin css files
|
Framework/Interfaces/TransientInterface.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPStaging\Framework\Interfaces;
|
4 |
+
|
5 |
+
interface TransientInterface
|
6 |
+
{
|
7 |
+
/**
|
8 |
+
* @return string
|
9 |
+
*/
|
10 |
+
public function getTransientName();
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @return int expiry time
|
14 |
+
*/
|
15 |
+
public function getExpiryTime();
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Set the initial transient with some value
|
19 |
+
*/
|
20 |
+
public function setTransient();
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @return bool
|
24 |
+
*/
|
25 |
+
public function getTransient();
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Delete the transient
|
29 |
+
*/
|
30 |
+
public function deleteTransient();
|
31 |
+
}
|
Framework/Mails/Report/Report.php
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPStaging\Framework\Mails\Report;
|
4 |
+
|
5 |
+
use WPStaging\Backend\Modules\SystemInfo;
|
6 |
+
|
7 |
+
class Report
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* WP Staging Support Email
|
11 |
+
*
|
12 |
+
* @var string
|
13 |
+
*/
|
14 |
+
const WPSTG_SUPPORT_EMAIL = "support@wp-staging.com";
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Email Subject for Issue Email
|
18 |
+
*
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
const EMAIL_SUBJECT = "Report Issue!";
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Send customer issue report
|
25 |
+
*
|
26 |
+
* @param string $email User e-mail
|
27 |
+
* @param string $message User message
|
28 |
+
* @param integer $terms User accept terms
|
29 |
+
* @param boolean $syslog User selected syslog
|
30 |
+
* @param string $provider User site provider
|
31 |
+
* @param boolean $forceSend force send mail even if already sent
|
32 |
+
*
|
33 |
+
* @return array
|
34 |
+
*/
|
35 |
+
public function send($email, $message, $terms, $syslog, $provider = null, $forceSend = false)
|
36 |
+
{
|
37 |
+
$errors = [];
|
38 |
+
|
39 |
+
if (empty($email)) {
|
40 |
+
$errors[] = __('Please enter your email.', 'wp-staging');
|
41 |
+
} elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
42 |
+
$errors[] = __('Email address is not valid.', 'wp-staging');
|
43 |
+
}
|
44 |
+
|
45 |
+
if (empty($message)) {
|
46 |
+
$errors[] = __('Please enter your issue.', 'wp-staging');
|
47 |
+
}
|
48 |
+
|
49 |
+
if (empty($terms)) {
|
50 |
+
$errors[] = __('Please accept our privacy policy.', 'wp-staging');
|
51 |
+
}
|
52 |
+
|
53 |
+
if (count($errors) !== 0) {
|
54 |
+
return $errors;
|
55 |
+
}
|
56 |
+
|
57 |
+
$attachments = [];
|
58 |
+
$maxFileSize = 512 * 1024;
|
59 |
+
if ($provider) {
|
60 |
+
$message .= "\n\n'Hosting provider: " . $provider;
|
61 |
+
}
|
62 |
+
|
63 |
+
if (!empty($syslog)) {
|
64 |
+
$message .= "\n\n'" . $this->getSyslog();
|
65 |
+
$debugLogFile = WP_CONTENT_DIR . '/debug.log';
|
66 |
+
if (filesize($debugLogFile) && $maxFileSize > filesize($debugLogFile)) {
|
67 |
+
$attachments[] = $debugLogFile;
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
$transient = new ReportSubmitTransient();
|
72 |
+
if ($transient->getTransient() && !$forceSend) {
|
73 |
+
// to show alert using js
|
74 |
+
$errors[] = [
|
75 |
+
"status" => 'already_submitted',
|
76 |
+
"message" => __("You've already submitted a ticket.<br/>" .
|
77 |
+
"Do you really want to send another one?", 'wp-staging')
|
78 |
+
];
|
79 |
+
return $errors;
|
80 |
+
}
|
81 |
+
|
82 |
+
if ($this->sendMail($email, $message, $attachments) === false) {
|
83 |
+
$errors[] = __('Can not send mail. <br>Please write us a mail to<br>support@wp-staging.com', 'wp-staging');
|
84 |
+
return $errors;
|
85 |
+
}
|
86 |
+
|
87 |
+
$transient->setTransient();
|
88 |
+
return $errors;
|
89 |
+
}
|
90 |
+
|
91 |
+
private function getSyslog()
|
92 |
+
{
|
93 |
+
$syslog = new SystemInfo();
|
94 |
+
|
95 |
+
return $syslog->get();
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* send feedback via email
|
100 |
+
*
|
101 |
+
* @param $from
|
102 |
+
* @param $text
|
103 |
+
* @param $attachments
|
104 |
+
* @return boolean
|
105 |
+
*/
|
106 |
+
private function sendMail($from, $text, $attachments)
|
107 |
+
{
|
108 |
+
$headers = [];
|
109 |
+
|
110 |
+
$headers[] = "From: $from";
|
111 |
+
$headers[] = "Reply-To: $from";
|
112 |
+
|
113 |
+
$success = wp_mail(self::WPSTG_SUPPORT_EMAIL, self::EMAIL_SUBJECT, $text, $headers, $attachments);
|
114 |
+
|
115 |
+
if ($success) {
|
116 |
+
return true;
|
117 |
+
}
|
118 |
+
|
119 |
+
return false;
|
120 |
+
}
|
121 |
+
|
122 |
+
}
|
Framework/Mails/Report/ReportSubmitTransient.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPStaging\Framework\Mails\Report;
|
4 |
+
|
5 |
+
use WPStaging\Framework\Interfaces\TransientInterface;
|
6 |
+
use WPStaging\Framework\Traits\BooleanTransientTrait;
|
7 |
+
|
8 |
+
class ReportSubmitTransient implements TransientInterface
|
9 |
+
{
|
10 |
+
use BooleanTransientTrait;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* The transient name on which we store/fetch/delete issue report submitted.
|
14 |
+
*/
|
15 |
+
const TRANSIENT_NAME = 'wpstg_issue_report_submitted';
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Set expiry time to 3600 seconds = 1 hour
|
19 |
+
*/
|
20 |
+
const EXPIRY_TIME_IN_SEC = 3600;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @return string
|
24 |
+
*/
|
25 |
+
public function getTransientName()
|
26 |
+
{
|
27 |
+
return self::TRANSIENT_NAME;
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @return int expiry time in seconds
|
32 |
+
*/
|
33 |
+
public function getExpiryTime()
|
34 |
+
{
|
35 |
+
return self::EXPIRY_TIME_IN_SEC;
|
36 |
+
}
|
37 |
+
}
|
Framework/Traits/BooleanTransientTrait.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPStaging\Framework\Traits;
|
4 |
+
|
5 |
+
trait BooleanTransientTrait
|
6 |
+
{
|
7 |
+
abstract function getTransientName();
|
8 |
+
|
9 |
+
abstract function getExpiryTime();
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Set the initial transient to value to true
|
13 |
+
*/
|
14 |
+
public function setTransient()
|
15 |
+
{
|
16 |
+
set_transient($this->getTransientName(), true, $this->getExpiryTime());
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @return bool
|
21 |
+
*/
|
22 |
+
public function getTransient()
|
23 |
+
{
|
24 |
+
return get_transient($this->getTransientName());
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Delete the transient
|
29 |
+
*/
|
30 |
+
public function deleteTransient()
|
31 |
+
{
|
32 |
+
delete_transient($this->getTransientName());
|
33 |
+
}
|
34 |
+
}
|
Frontend/LoginNotice.php
CHANGED
@@ -2,15 +2,21 @@
|
|
2 |
|
3 |
namespace WPStaging\Frontend;
|
4 |
|
|
|
|
|
|
|
5 |
/**
|
6 |
* Class LoginNotice
|
7 |
*
|
8 |
* This class is used to show notice on staging login form one time or with a maximum of 300sec
|
9 |
*
|
10 |
* @package WPStaging\Frontend
|
|
|
11 |
*/
|
12 |
-
class LoginNotice
|
13 |
{
|
|
|
|
|
14 |
/**
|
15 |
* The transient option_name that is used for showing notice on login form on staging site.
|
16 |
*/
|
@@ -22,22 +28,19 @@ class LoginNotice
|
|
22 |
const TIME_IN_SEC = 300;
|
23 |
|
24 |
/**
|
25 |
-
*
|
26 |
*/
|
27 |
-
public function
|
28 |
{
|
29 |
-
|
30 |
}
|
31 |
|
32 |
-
/**
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
}
|
37 |
-
|
38 |
-
public function deleteTransient()
|
39 |
{
|
40 |
-
|
41 |
}
|
42 |
|
43 |
/**
|
2 |
|
3 |
namespace WPStaging\Frontend;
|
4 |
|
5 |
+
use WPStaging\Framework\Interfaces\TransientInterface;
|
6 |
+
use WPStaging\Framework\Traits\BooleanTransientTrait;
|
7 |
+
|
8 |
/**
|
9 |
* Class LoginNotice
|
10 |
*
|
11 |
* This class is used to show notice on staging login form one time or with a maximum of 300sec
|
12 |
*
|
13 |
* @package WPStaging\Frontend
|
14 |
+
* @todo can be DRY using new Transient interface and trait
|
15 |
*/
|
16 |
+
class LoginNotice implements TransientInterface
|
17 |
{
|
18 |
+
use BooleanTransientTrait;
|
19 |
+
|
20 |
/**
|
21 |
* The transient option_name that is used for showing notice on login form on staging site.
|
22 |
*/
|
28 |
const TIME_IN_SEC = 300;
|
29 |
|
30 |
/**
|
31 |
+
* @return string
|
32 |
*/
|
33 |
+
public function getTransientName()
|
34 |
{
|
35 |
+
return self::NOTICE_TRANSIENT_NAME;
|
36 |
}
|
37 |
|
38 |
+
/**
|
39 |
+
* @return int expiry time in seconds
|
40 |
+
*/
|
41 |
+
public function getExpiryTime()
|
|
|
|
|
|
|
42 |
{
|
43 |
+
return self::TIME_IN_SEC;
|
44 |
}
|
45 |
|
46 |
/**
|
readme.txt
CHANGED
@@ -6,10 +6,10 @@ Contributors: ReneHermi, WP-Staging
|
|
6 |
Donate link: https://wordpress.org/plugins/wp-staging
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
-
Tags: backup, staging, duplication,
|
10 |
Requires at least: 3.6+
|
11 |
-
Tested up to: 5.
|
12 |
-
Stable tag: 2.
|
13 |
Requires PHP: 5.5
|
14 |
|
15 |
A duplicator plugin - clone/move, duplicate & migrate websites to staging, backup and development sites that only authorized users can access.
|
@@ -155,6 +155,10 @@ https://wp-staging.com
|
|
155 |
|
156 |
== Changelog ==
|
157 |
|
|
|
|
|
|
|
|
|
158 |
= 2.7.9 =
|
159 |
* New: Compatible up to WordPress 5.6
|
160 |
* Fix: Uninstall function can throw fatal error
|
@@ -302,10 +306,11 @@ Full changelog: [https://wp-staging.com/wp-staging-changelog](https://wp-staging
|
|
302 |
* Fix: Uninstall function can throw fatal error
|
303 |
* Fix: Do not write sensitive information into debug.log if debug mode is active
|
304 |
* Fix: Update notification shown even if there is no more recent version
|
|
|
|
|
|
|
|
|
305 |
* Dev: Memory exhausted during tests
|
306 |
* Dev: Prefix composer vendor libraries with PHP-Scoper
|
307 |
* Dev: Add more unit and webdriver tests to improve QA
|
308 |
-
* Enh: Change authentication to a combination of nonces and access tokens
|
309 |
-
* Enh: Improve tests performance
|
310 |
-
* Enh: Add tests for database export and restore
|
311 |
|
6 |
Donate link: https://wordpress.org/plugins/wp-staging
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
+
Tags: clone, backup, staging, duplication, migration
|
10 |
Requires at least: 3.6+
|
11 |
+
Tested up to: 5.6
|
12 |
+
Stable tag: 2.8.0
|
13 |
Requires PHP: 5.5
|
14 |
|
15 |
A duplicator plugin - clone/move, duplicate & migrate websites to staging, backup and development sites that only authorized users can access.
|
155 |
|
156 |
== Changelog ==
|
157 |
|
158 |
+
= 2.8.0 =
|
159 |
+
* Fix: Latest supported WP version is not reflected on wordpress.org plugin repo
|
160 |
+
* Enh: Show confirmation popup if user tries to send another support request within an hour
|
161 |
+
|
162 |
= 2.7.9 =
|
163 |
* New: Compatible up to WordPress 5.6
|
164 |
* Fix: Uninstall function can throw fatal error
|
306 |
* Fix: Uninstall function can throw fatal error
|
307 |
* Fix: Do not write sensitive information into debug.log if debug mode is active
|
308 |
* Fix: Update notification shown even if there is no more recent version
|
309 |
+
* Enh: Change authentication to a combination of nonces and access tokens
|
310 |
+
* Enh: Show confirmation popup if user tries to send another support request within an hour
|
311 |
+
* Dev: Improve tests performance
|
312 |
+
* Dev: Add tests for database export and restore
|
313 |
* Dev: Memory exhausted during tests
|
314 |
* Dev: Prefix composer vendor libraries with PHP-Scoper
|
315 |
* Dev: Add more unit and webdriver tests to improve QA
|
|
|
|
|
|
|
316 |
|
uninstall.php
CHANGED
@@ -32,7 +32,7 @@ class uninstall
|
|
32 |
$options = json_decode(json_encode(get_option("wpstg_settings", [])));
|
33 |
|
34 |
if (isset($options->unInstallOnDelete) && $options->unInstallOnDelete === '1') {
|
35 |
-
//
|
36 |
delete_option("wpstg_version_upgraded_from");
|
37 |
delete_option("wpstg_version");
|
38 |
delete_option("wpstgpro_version_upgraded_from");
|
@@ -43,6 +43,7 @@ class uninstall
|
|
43 |
delete_option("wpstg_settings");
|
44 |
delete_option("wpstg_rmpermalinks_executed");
|
45 |
delete_option("wpstg_activation_redirect");
|
|
|
46 |
|
47 |
|
48 |
/* Do not delete these fields without actually deleting the staging site
|
@@ -67,6 +68,9 @@ class uninstall
|
|
67 |
// Delete events
|
68 |
wp_clear_scheduled_hook('wpstg_weekly_event');
|
69 |
|
|
|
|
|
|
|
70 |
}
|
71 |
}
|
72 |
|
32 |
$options = json_decode(json_encode(get_option("wpstg_settings", [])));
|
33 |
|
34 |
if (isset($options->unInstallOnDelete) && $options->unInstallOnDelete === '1') {
|
35 |
+
// Options
|
36 |
delete_option("wpstg_version_upgraded_from");
|
37 |
delete_option("wpstg_version");
|
38 |
delete_option("wpstgpro_version_upgraded_from");
|
43 |
delete_option("wpstg_settings");
|
44 |
delete_option("wpstg_rmpermalinks_executed");
|
45 |
delete_option("wpstg_activation_redirect");
|
46 |
+
delete_option("wpstg_emails_disabled");
|
47 |
|
48 |
|
49 |
/* Do not delete these fields without actually deleting the staging site
|
68 |
// Delete events
|
69 |
wp_clear_scheduled_hook('wpstg_weekly_event');
|
70 |
|
71 |
+
// Transients
|
72 |
+
delete_transient("wpstg_issue_report_submitted");
|
73 |
+
|
74 |
}
|
75 |
}
|
76 |
|
vendor_wpstg/autoload/src.php
CHANGED
@@ -110,7 +110,6 @@ return array(
|
|
110 |
'WPStaging\\Core\\Utils\\Multisite' => $baseDir . '/Core/Utils/Multisite.php',
|
111 |
'WPStaging\\Core\\Utils\\MySQL' => $baseDir . '/Core/Utils/MySQL.php',
|
112 |
'WPStaging\\Core\\Utils\\MySQLi' => $baseDir . '/Core/Utils/MySQLi.php',
|
113 |
-
'WPStaging\\Core\\Utils\\Report' => $baseDir . '/Core/Utils/Report.php',
|
114 |
'WPStaging\\Core\\Utils\\RobotsTxt' => $baseDir . '/Core/Utils/RobotsTxt.php',
|
115 |
'WPStaging\\Core\\Utils\\Strings' => $baseDir . '/Core/Utils/Strings.php',
|
116 |
'WPStaging\\Core\\WPStaging' => $baseDir . '/Core/WPStaging.php',
|
@@ -184,6 +183,9 @@ return array(
|
|
184 |
'WPStaging\\Framework\\Filesystem\\WpUploadsFolderSymlinker' => $baseDir . '/Framework/Filesystem/WpUploadsFolderSymlinker.php',
|
185 |
'WPStaging\\Framework\\Interfaces\\ArrayableInterface' => $baseDir . '/Framework/Interfaces/ArrayableInterface.php',
|
186 |
'WPStaging\\Framework\\Interfaces\\HydrateableInterface' => $baseDir . '/Framework/Interfaces/HydrateableInterface.php',
|
|
|
|
|
|
|
187 |
'WPStaging\\Framework\\Permalinks\\PermalinksPurge' => $baseDir . '/Framework/Permalinks/PermalinksPurge.php',
|
188 |
'WPStaging\\Framework\\Queue\\FinishedQueueException' => $baseDir . '/Framework/Queue/FinishedQueueException.php',
|
189 |
'WPStaging\\Framework\\Queue\\Queue' => $baseDir . '/Framework/Queue/Queue.php',
|
@@ -202,6 +204,7 @@ return array(
|
|
202 |
'WPStaging\\Framework\\TemplateEngine\\TemplateEngineException' => $baseDir . '/Framework/TemplateEngine/TemplateEngineException.php',
|
203 |
'WPStaging\\Framework\\TemplateEngine\\TemplateEngineInterface' => $baseDir . '/Framework/TemplateEngine/TemplateEngineInterface.php',
|
204 |
'WPStaging\\Framework\\Traits\\ArrayableTrait' => $baseDir . '/Framework/Traits/ArrayableTrait.php',
|
|
|
205 |
'WPStaging\\Framework\\Traits\\HydrateTrait' => $baseDir . '/Framework/Traits/HydrateTrait.php',
|
206 |
'WPStaging\\Framework\\Traits\\MaintenanceTrait' => $baseDir . '/Framework/Traits/MaintenanceTrait.php',
|
207 |
'WPStaging\\Framework\\Traits\\RequestNotationTrait' => $baseDir . '/Framework/Traits/RequestNotationTrait.php',
|
110 |
'WPStaging\\Core\\Utils\\Multisite' => $baseDir . '/Core/Utils/Multisite.php',
|
111 |
'WPStaging\\Core\\Utils\\MySQL' => $baseDir . '/Core/Utils/MySQL.php',
|
112 |
'WPStaging\\Core\\Utils\\MySQLi' => $baseDir . '/Core/Utils/MySQLi.php',
|
|
|
113 |
'WPStaging\\Core\\Utils\\RobotsTxt' => $baseDir . '/Core/Utils/RobotsTxt.php',
|
114 |
'WPStaging\\Core\\Utils\\Strings' => $baseDir . '/Core/Utils/Strings.php',
|
115 |
'WPStaging\\Core\\WPStaging' => $baseDir . '/Core/WPStaging.php',
|
183 |
'WPStaging\\Framework\\Filesystem\\WpUploadsFolderSymlinker' => $baseDir . '/Framework/Filesystem/WpUploadsFolderSymlinker.php',
|
184 |
'WPStaging\\Framework\\Interfaces\\ArrayableInterface' => $baseDir . '/Framework/Interfaces/ArrayableInterface.php',
|
185 |
'WPStaging\\Framework\\Interfaces\\HydrateableInterface' => $baseDir . '/Framework/Interfaces/HydrateableInterface.php',
|
186 |
+
'WPStaging\\Framework\\Interfaces\\TransientInterface' => $baseDir . '/Framework/Interfaces/TransientInterface.php',
|
187 |
+
'WPStaging\\Framework\\Mails\\Report\\Report' => $baseDir . '/Framework/Mails/Report/Report.php',
|
188 |
+
'WPStaging\\Framework\\Mails\\Report\\ReportSubmitTransient' => $baseDir . '/Framework/Mails/Report/ReportSubmitTransient.php',
|
189 |
'WPStaging\\Framework\\Permalinks\\PermalinksPurge' => $baseDir . '/Framework/Permalinks/PermalinksPurge.php',
|
190 |
'WPStaging\\Framework\\Queue\\FinishedQueueException' => $baseDir . '/Framework/Queue/FinishedQueueException.php',
|
191 |
'WPStaging\\Framework\\Queue\\Queue' => $baseDir . '/Framework/Queue/Queue.php',
|
204 |
'WPStaging\\Framework\\TemplateEngine\\TemplateEngineException' => $baseDir . '/Framework/TemplateEngine/TemplateEngineException.php',
|
205 |
'WPStaging\\Framework\\TemplateEngine\\TemplateEngineInterface' => $baseDir . '/Framework/TemplateEngine/TemplateEngineInterface.php',
|
206 |
'WPStaging\\Framework\\Traits\\ArrayableTrait' => $baseDir . '/Framework/Traits/ArrayableTrait.php',
|
207 |
+
'WPStaging\\Framework\\Traits\\BooleanTransientTrait' => $baseDir . '/Framework/Traits/BooleanTransientTrait.php',
|
208 |
'WPStaging\\Framework\\Traits\\HydrateTrait' => $baseDir . '/Framework/Traits/HydrateTrait.php',
|
209 |
'WPStaging\\Framework\\Traits\\MaintenanceTrait' => $baseDir . '/Framework/Traits/MaintenanceTrait.php',
|
210 |
'WPStaging\\Framework\\Traits\\RequestNotationTrait' => $baseDir . '/Framework/Traits/RequestNotationTrait.php',
|
wp-staging.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* Author: WP-STAGING
|
8 |
* Author URI: https://wp-staging.com
|
9 |
* Contributors: ReneHermi
|
10 |
-
* Version: 2.
|
11 |
* Text Domain: wp-staging
|
12 |
* Domain Path: /languages/
|
13 |
*
|
@@ -53,7 +53,7 @@ if (!class_exists(WpstgFreeBootstrap::class)) {
|
|
53 |
|
54 |
// WP STAGING version number
|
55 |
if (!defined('WPSTG_VERSION')) {
|
56 |
-
define('WPSTG_VERSION', '2.
|
57 |
}
|
58 |
|
59 |
// Compatible up to WordPress Version
|
7 |
* Author: WP-STAGING
|
8 |
* Author URI: https://wp-staging.com
|
9 |
* Contributors: ReneHermi
|
10 |
+
* Version: 2.8.0
|
11 |
* Text Domain: wp-staging
|
12 |
* Domain Path: /languages/
|
13 |
*
|
53 |
|
54 |
// WP STAGING version number
|
55 |
if (!defined('WPSTG_VERSION')) {
|
56 |
+
define('WPSTG_VERSION', '2.8.0');
|
57 |
}
|
58 |
|
59 |
// Compatible up to WordPress Version
|