-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsweetalert2.all.js
1957 lines (1719 loc) · 100 KB
/
sweetalert2.all.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*!
* sweetalert2 v7.12.15
* Released under the MIT License.
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.Sweetalert2 = factory());
}(this, (function () { 'use strict';
var styles = "@-webkit-keyframes swal2-show {\n 0% {\n -webkit-transform: scale(0.7);\n transform: scale(0.7); }\n 45% {\n -webkit-transform: scale(1.05);\n transform: scale(1.05); }\n 80% {\n -webkit-transform: scale(0.95);\n transform: scale(0.95); }\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1); } }\n\n@keyframes swal2-show {\n 0% {\n -webkit-transform: scale(0.7);\n transform: scale(0.7); }\n 45% {\n -webkit-transform: scale(1.05);\n transform: scale(1.05); }\n 80% {\n -webkit-transform: scale(0.95);\n transform: scale(0.95); }\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1); } }\n\n@-webkit-keyframes swal2-hide {\n 0% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1; }\n 100% {\n -webkit-transform: scale(0.5);\n transform: scale(0.5);\n opacity: 0; } }\n\n@keyframes swal2-hide {\n 0% {\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1; }\n 100% {\n -webkit-transform: scale(0.5);\n transform: scale(0.5);\n opacity: 0; } }\n\n@-webkit-keyframes swal2-animate-success-line-tip {\n 0% {\n top: 19px;\n left: 1px;\n width: 0; }\n 54% {\n top: 17px;\n left: 2px;\n width: 0; }\n 70% {\n top: 35px;\n left: -6px;\n width: 50px; }\n 84% {\n top: 48px;\n left: 21px;\n width: 17px; }\n 100% {\n top: 45px;\n left: 14px;\n width: 25px; } }\n\n@keyframes swal2-animate-success-line-tip {\n 0% {\n top: 19px;\n left: 1px;\n width: 0; }\n 54% {\n top: 17px;\n left: 2px;\n width: 0; }\n 70% {\n top: 35px;\n left: -6px;\n width: 50px; }\n 84% {\n top: 48px;\n left: 21px;\n width: 17px; }\n 100% {\n top: 45px;\n left: 14px;\n width: 25px; } }\n\n@-webkit-keyframes swal2-animate-success-line-long {\n 0% {\n top: 54px;\n right: 46px;\n width: 0; }\n 65% {\n top: 54px;\n right: 46px;\n width: 0; }\n 84% {\n top: 35px;\n right: 0;\n width: 55px; }\n 100% {\n top: 38px;\n right: 8px;\n width: 47px; } }\n\n@keyframes swal2-animate-success-line-long {\n 0% {\n top: 54px;\n right: 46px;\n width: 0; }\n 65% {\n top: 54px;\n right: 46px;\n width: 0; }\n 84% {\n top: 35px;\n right: 0;\n width: 55px; }\n 100% {\n top: 38px;\n right: 8px;\n width: 47px; } }\n\n@-webkit-keyframes swal2-rotate-success-circular-line {\n 0% {\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg); }\n 5% {\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg); }\n 12% {\n -webkit-transform: rotate(-405deg);\n transform: rotate(-405deg); }\n 100% {\n -webkit-transform: rotate(-405deg);\n transform: rotate(-405deg); } }\n\n@keyframes swal2-rotate-success-circular-line {\n 0% {\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg); }\n 5% {\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg); }\n 12% {\n -webkit-transform: rotate(-405deg);\n transform: rotate(-405deg); }\n 100% {\n -webkit-transform: rotate(-405deg);\n transform: rotate(-405deg); } }\n\n@-webkit-keyframes swal2-animate-error-x-mark {\n 0% {\n margin-top: 26px;\n -webkit-transform: scale(0.4);\n transform: scale(0.4);\n opacity: 0; }\n 50% {\n margin-top: 26px;\n -webkit-transform: scale(0.4);\n transform: scale(0.4);\n opacity: 0; }\n 80% {\n margin-top: -6px;\n -webkit-transform: scale(1.15);\n transform: scale(1.15); }\n 100% {\n margin-top: 0;\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1; } }\n\n@keyframes swal2-animate-error-x-mark {\n 0% {\n margin-top: 26px;\n -webkit-transform: scale(0.4);\n transform: scale(0.4);\n opacity: 0; }\n 50% {\n margin-top: 26px;\n -webkit-transform: scale(0.4);\n transform: scale(0.4);\n opacity: 0; }\n 80% {\n margin-top: -6px;\n -webkit-transform: scale(1.15);\n transform: scale(1.15); }\n 100% {\n margin-top: 0;\n -webkit-transform: scale(1);\n transform: scale(1);\n opacity: 1; } }\n\n@-webkit-keyframes swal2-animate-error-icon {\n 0% {\n -webkit-transform: rotateX(100deg);\n transform: rotateX(100deg);\n opacity: 0; }\n 100% {\n -webkit-transform: rotateX(0deg);\n transform: rotateX(0deg);\n opacity: 1; } }\n\n@keyframes swal2-animate-error-icon {\n 0% {\n -webkit-transform: rotateX(100deg);\n transform: rotateX(100deg);\n opacity: 0; }\n 100% {\n -webkit-transform: rotateX(0deg);\n transform: rotateX(0deg);\n opacity: 1; } }\n\nbody.swal2-toast-shown.swal2-has-input > .swal2-container > .swal2-toast {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: stretch;\n -ms-flex-align: stretch;\n align-items: stretch; }\n body.swal2-toast-shown.swal2-has-input > .swal2-container > .swal2-toast .swal2-actions {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n -ms-flex-item-align: stretch;\n align-self: stretch;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n height: 2.2em; }\n body.swal2-toast-shown.swal2-has-input > .swal2-container > .swal2-toast .swal2-loading {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center; }\n body.swal2-toast-shown.swal2-has-input > .swal2-container > .swal2-toast .swal2-input {\n height: 2em;\n margin: .3125em auto;\n font-size: 1em; }\n body.swal2-toast-shown.swal2-has-input > .swal2-container > .swal2-toast .swal2-validationerror {\n font-size: 1em; }\n\nbody.swal2-toast-shown > .swal2-container {\n position: fixed;\n background-color: transparent; }\n body.swal2-toast-shown > .swal2-container.swal2-shown {\n background-color: transparent; }\n body.swal2-toast-shown > .swal2-container.swal2-top {\n top: 0;\n right: auto;\n bottom: auto;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%); }\n body.swal2-toast-shown > .swal2-container.swal2-top-end, body.swal2-toast-shown > .swal2-container.swal2-top-right {\n top: 0;\n right: 0;\n bottom: auto;\n left: auto; }\n body.swal2-toast-shown > .swal2-container.swal2-top-start, body.swal2-toast-shown > .swal2-container.swal2-top-left {\n top: 0;\n right: auto;\n bottom: auto;\n left: 0; }\n body.swal2-toast-shown > .swal2-container.swal2-center-start, body.swal2-toast-shown > .swal2-container.swal2-center-left {\n top: 50%;\n right: auto;\n bottom: auto;\n left: 0;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%); }\n body.swal2-toast-shown > .swal2-container.swal2-center {\n top: 50%;\n right: auto;\n bottom: auto;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%); }\n body.swal2-toast-shown > .swal2-container.swal2-center-end, body.swal2-toast-shown > .swal2-container.swal2-center-right {\n top: 50%;\n right: 0;\n bottom: auto;\n left: auto;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%); }\n body.swal2-toast-shown > .swal2-container.swal2-bottom-start, body.swal2-toast-shown > .swal2-container.swal2-bottom-left {\n top: auto;\n right: auto;\n bottom: 0;\n left: 0; }\n body.swal2-toast-shown > .swal2-container.swal2-bottom {\n top: auto;\n right: auto;\n bottom: 0;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%); }\n body.swal2-toast-shown > .swal2-container.swal2-bottom-end, body.swal2-toast-shown > .swal2-container.swal2-bottom-right {\n top: auto;\n right: 0;\n bottom: 0;\n left: auto; }\n\n.swal2-popup.swal2-toast {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n width: auto;\n padding: 0.625em;\n -webkit-box-shadow: 0 0 10px #d9d9d9;\n box-shadow: 0 0 10px #d9d9d9;\n overflow-y: hidden; }\n .swal2-popup.swal2-toast .swal2-header {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row; }\n .swal2-popup.swal2-toast .swal2-title {\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n margin: 0 .6em;\n font-size: 1em; }\n .swal2-popup.swal2-toast .swal2-close {\n position: initial; }\n .swal2-popup.swal2-toast .swal2-content {\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n font-size: 1em; }\n .swal2-popup.swal2-toast .swal2-icon {\n width: 32px;\n min-width: 32px;\n height: 32px;\n margin: 0; }\n .swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring {\n width: 32px;\n height: 32px; }\n .swal2-popup.swal2-toast .swal2-icon.swal2-info, .swal2-popup.swal2-toast .swal2-icon.swal2-warning, .swal2-popup.swal2-toast .swal2-icon.swal2-question {\n font-size: 26px;\n line-height: 32px; }\n .swal2-popup.swal2-toast .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {\n top: 14px;\n width: 22px; }\n .swal2-popup.swal2-toast .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='left'] {\n left: 5px; }\n .swal2-popup.swal2-toast .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='right'] {\n right: 5px; }\n .swal2-popup.swal2-toast .swal2-actions {\n height: auto;\n margin: 0 .3125em; }\n .swal2-popup.swal2-toast .swal2-styled {\n margin: 0 .3125em;\n padding: .3125em .625em;\n font-size: 1em; }\n .swal2-popup.swal2-toast .swal2-styled:focus {\n -webkit-box-shadow: 0 0 0 1px #fff, 0 0 0 2px rgba(50, 100, 150, 0.4);\n box-shadow: 0 0 0 1px #fff, 0 0 0 2px rgba(50, 100, 150, 0.4); }\n .swal2-popup.swal2-toast .swal2-success {\n border-color: #a5dc86; }\n .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-circular-line'] {\n position: absolute;\n width: 32px;\n height: 45px;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n border-radius: 50%; }\n .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-circular-line'][class$='left'] {\n top: -4px;\n left: -15px;\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg);\n -webkit-transform-origin: 32px 32px;\n transform-origin: 32px 32px;\n border-radius: 64px 0 0 64px; }\n .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-circular-line'][class$='right'] {\n top: -4px;\n left: 15px;\n -webkit-transform-origin: 0 32px;\n transform-origin: 0 32px;\n border-radius: 0 64px 64px 0; }\n .swal2-popup.swal2-toast .swal2-success .swal2-success-ring {\n width: 32px;\n height: 32px; }\n .swal2-popup.swal2-toast .swal2-success .swal2-success-fix {\n top: 0;\n left: 7px;\n width: 7px;\n height: 43px; }\n .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-line'] {\n height: 5px; }\n .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-line'][class$='tip'] {\n top: 18px;\n left: 3px;\n width: 12px; }\n .swal2-popup.swal2-toast .swal2-success [class^='swal2-success-line'][class$='long'] {\n top: 15px;\n right: 3px;\n width: 22px; }\n .swal2-popup.swal2-toast.swal2-show {\n -webkit-animation: showSweetToast .5s;\n animation: showSweetToast .5s; }\n .swal2-popup.swal2-toast.swal2-hide {\n -webkit-animation: hideSweetToast .2s forwards;\n animation: hideSweetToast .2s forwards; }\n .swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-tip {\n -webkit-animation: animate-toast-success-tip .75s;\n animation: animate-toast-success-tip .75s; }\n .swal2-popup.swal2-toast .swal2-animate-success-icon .swal2-success-line-long {\n -webkit-animation: animate-toast-success-long .75s;\n animation: animate-toast-success-long .75s; }\n\n@-webkit-keyframes showSweetToast {\n 0% {\n -webkit-transform: translateY(-10px) rotateZ(2deg);\n transform: translateY(-10px) rotateZ(2deg);\n opacity: 0; }\n 33% {\n -webkit-transform: translateY(0) rotateZ(-2deg);\n transform: translateY(0) rotateZ(-2deg);\n opacity: .5; }\n 66% {\n -webkit-transform: translateY(5px) rotateZ(2deg);\n transform: translateY(5px) rotateZ(2deg);\n opacity: .7; }\n 100% {\n -webkit-transform: translateY(0) rotateZ(0);\n transform: translateY(0) rotateZ(0);\n opacity: 1; } }\n\n@keyframes showSweetToast {\n 0% {\n -webkit-transform: translateY(-10px) rotateZ(2deg);\n transform: translateY(-10px) rotateZ(2deg);\n opacity: 0; }\n 33% {\n -webkit-transform: translateY(0) rotateZ(-2deg);\n transform: translateY(0) rotateZ(-2deg);\n opacity: .5; }\n 66% {\n -webkit-transform: translateY(5px) rotateZ(2deg);\n transform: translateY(5px) rotateZ(2deg);\n opacity: .7; }\n 100% {\n -webkit-transform: translateY(0) rotateZ(0);\n transform: translateY(0) rotateZ(0);\n opacity: 1; } }\n\n@-webkit-keyframes hideSweetToast {\n 0% {\n opacity: 1; }\n 33% {\n opacity: .5; }\n 100% {\n -webkit-transform: rotateZ(1deg);\n transform: rotateZ(1deg);\n opacity: 0; } }\n\n@keyframes hideSweetToast {\n 0% {\n opacity: 1; }\n 33% {\n opacity: .5; }\n 100% {\n -webkit-transform: rotateZ(1deg);\n transform: rotateZ(1deg);\n opacity: 0; } }\n\n@-webkit-keyframes animate-toast-success-tip {\n 0% {\n top: 9px;\n left: 1px;\n width: 0; }\n 54% {\n top: 2px;\n left: 2px;\n width: 0; }\n 70% {\n top: 10px;\n left: -4px;\n width: 26px; }\n 84% {\n top: 17px;\n left: 12px;\n width: 8px; }\n 100% {\n top: 18px;\n left: 3px;\n width: 12px; } }\n\n@keyframes animate-toast-success-tip {\n 0% {\n top: 9px;\n left: 1px;\n width: 0; }\n 54% {\n top: 2px;\n left: 2px;\n width: 0; }\n 70% {\n top: 10px;\n left: -4px;\n width: 26px; }\n 84% {\n top: 17px;\n left: 12px;\n width: 8px; }\n 100% {\n top: 18px;\n left: 3px;\n width: 12px; } }\n\n@-webkit-keyframes animate-toast-success-long {\n 0% {\n top: 26px;\n right: 22px;\n width: 0; }\n 65% {\n top: 20px;\n right: 15px;\n width: 0; }\n 84% {\n top: 15px;\n right: 0;\n width: 18px; }\n 100% {\n top: 15px;\n right: 3px;\n width: 22px; } }\n\n@keyframes animate-toast-success-long {\n 0% {\n top: 26px;\n right: 22px;\n width: 0; }\n 65% {\n top: 20px;\n right: 15px;\n width: 0; }\n 84% {\n top: 15px;\n right: 0;\n width: 18px; }\n 100% {\n top: 15px;\n right: 3px;\n width: 22px; } }\n\nhtml.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown),\nbody.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {\n height: auto;\n overflow-y: hidden; }\n\nbody.swal2-no-backdrop .swal2-shown {\n top: auto;\n right: auto;\n bottom: auto;\n left: auto;\n background-color: transparent; }\n body.swal2-no-backdrop .swal2-shown > .swal2-modal {\n -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); }\n body.swal2-no-backdrop .swal2-shown.swal2-top {\n top: 0;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%); }\n body.swal2-no-backdrop .swal2-shown.swal2-top-start, body.swal2-no-backdrop .swal2-shown.swal2-top-left {\n top: 0;\n left: 0; }\n body.swal2-no-backdrop .swal2-shown.swal2-top-end, body.swal2-no-backdrop .swal2-shown.swal2-top-right {\n top: 0;\n right: 0; }\n body.swal2-no-backdrop .swal2-shown.swal2-center {\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%); }\n body.swal2-no-backdrop .swal2-shown.swal2-center-start, body.swal2-no-backdrop .swal2-shown.swal2-center-left {\n top: 50%;\n left: 0;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%); }\n body.swal2-no-backdrop .swal2-shown.swal2-center-end, body.swal2-no-backdrop .swal2-shown.swal2-center-right {\n top: 50%;\n right: 0;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%); }\n body.swal2-no-backdrop .swal2-shown.swal2-bottom {\n bottom: 0;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%); }\n body.swal2-no-backdrop .swal2-shown.swal2-bottom-start, body.swal2-no-backdrop .swal2-shown.swal2-bottom-left {\n bottom: 0;\n left: 0; }\n body.swal2-no-backdrop .swal2-shown.swal2-bottom-end, body.swal2-no-backdrop .swal2-shown.swal2-bottom-right {\n right: 0;\n bottom: 0; }\n\n.swal2-container {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n padding: 10px;\n background-color: transparent;\n z-index: 1060;\n overflow-x: hidden;\n -webkit-overflow-scrolling: touch; }\n .swal2-container.swal2-top {\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start; }\n .swal2-container.swal2-top-start, .swal2-container.swal2-top-left {\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start; }\n .swal2-container.swal2-top-end, .swal2-container.swal2-top-right {\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end; }\n .swal2-container.swal2-center {\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center; }\n .swal2-container.swal2-center-start, .swal2-container.swal2-center-left {\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start; }\n .swal2-container.swal2-center-end, .swal2-container.swal2-center-right {\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end; }\n .swal2-container.swal2-bottom {\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end; }\n .swal2-container.swal2-bottom-start, .swal2-container.swal2-bottom-left {\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start; }\n .swal2-container.swal2-bottom-end, .swal2-container.swal2-bottom-right {\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end; }\n .swal2-container.swal2-grow-fullscreen > .swal2-modal {\n display: -webkit-box !important;\n display: -ms-flexbox !important;\n display: flex !important;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n -ms-flex-item-align: stretch;\n align-self: stretch;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center; }\n .swal2-container.swal2-grow-row > .swal2-modal {\n display: -webkit-box !important;\n display: -ms-flexbox !important;\n display: flex !important;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n -ms-flex-line-pack: center;\n align-content: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center; }\n .swal2-container.swal2-grow-column {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column; }\n .swal2-container.swal2-grow-column.swal2-top, .swal2-container.swal2-grow-column.swal2-center, .swal2-container.swal2-grow-column.swal2-bottom {\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center; }\n .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 {\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start; }\n .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 {\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end; }\n .swal2-container.swal2-grow-column > .swal2-modal {\n display: -webkit-box !important;\n display: -ms-flexbox !important;\n display: flex !important;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n -ms-flex-line-pack: center;\n align-content: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center; }\n .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) > .swal2-modal {\n margin: auto; }\n @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n .swal2-container .swal2-modal {\n margin: 0 !important; } }\n .swal2-container.swal2-fade {\n -webkit-transition: background-color .1s;\n transition: background-color .1s; }\n .swal2-container.swal2-shown {\n background-color: rgba(0, 0, 0, 0.4); }\n\n.swal2-popup {\n display: none;\n position: relative;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n width: 32em;\n max-width: 100%;\n padding: 1.25em;\n border-radius: 0.3125em;\n background: #fff;\n font-family: inherit;\n font-size: 1rem;\n -webkit-box-sizing: border-box;\n box-sizing: border-box; }\n .swal2-popup:focus {\n outline: none; }\n .swal2-popup.swal2-loading {\n overflow-y: hidden; }\n .swal2-popup .swal2-header {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center; }\n .swal2-popup .swal2-title {\n display: block;\n position: relative;\n max-width: 100%;\n margin: 0 0 0.4em;\n padding: 0;\n color: #595959;\n font-size: 1.875em;\n font-weight: 600;\n text-align: center;\n text-transform: none;\n word-wrap: break-word; }\n .swal2-popup .swal2-actions {\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin: 1.25em auto 0; }\n .swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled[disabled] {\n opacity: .4; }\n .swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled:hover {\n background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.1)), to(rgba(0, 0, 0, 0.1)));\n background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)); }\n .swal2-popup .swal2-actions:not(.swal2-loading) .swal2-styled:active {\n background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.2)), to(rgba(0, 0, 0, 0.2)));\n background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)); }\n .swal2-popup .swal2-actions.swal2-loading .swal2-styled.swal2-confirm {\n width: 2.5em;\n height: 2.5em;\n margin: .46875em;\n padding: 0;\n border: .25em solid transparent;\n border-radius: 100%;\n border-color: transparent;\n background-color: transparent !important;\n color: transparent;\n cursor: default;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal;\n animation: swal2-rotate-loading 1.5s linear 0s infinite normal;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n .swal2-popup .swal2-actions.swal2-loading .swal2-styled.swal2-cancel {\n margin-right: 30px;\n margin-left: 30px; }\n .swal2-popup .swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after {\n display: inline-block;\n width: 15px;\n height: 15px;\n margin-left: 5px;\n border: 3px solid #999999;\n border-radius: 50%;\n border-right-color: transparent;\n -webkit-box-shadow: 1px 1px 1px #fff;\n box-shadow: 1px 1px 1px #fff;\n content: '';\n -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal;\n animation: swal2-rotate-loading 1.5s linear 0s infinite normal; }\n .swal2-popup .swal2-styled {\n margin: 0 .3125em;\n padding: .625em 2em;\n font-weight: 500;\n -webkit-box-shadow: none;\n box-shadow: none; }\n .swal2-popup .swal2-styled:not([disabled]) {\n cursor: pointer; }\n .swal2-popup .swal2-styled.swal2-confirm {\n border: 0;\n border-radius: 0.25em;\n background-color: #3085d6;\n color: #fff;\n font-size: 1.0625em; }\n .swal2-popup .swal2-styled.swal2-cancel {\n border: 0;\n border-radius: 0.25em;\n background-color: #aaa;\n color: #fff;\n font-size: 1.0625em; }\n .swal2-popup .swal2-styled:focus {\n outline: none;\n -webkit-box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(50, 100, 150, 0.4);\n box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(50, 100, 150, 0.4); }\n .swal2-popup .swal2-styled::-moz-focus-inner {\n border: 0; }\n .swal2-popup .swal2-footer {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin: 1.25em 0 0;\n padding-top: 1em;\n border-top: 1px solid #eee;\n color: #545454;\n font-size: 1em; }\n .swal2-popup .swal2-image {\n max-width: 100%;\n margin: 1.25em auto; }\n .swal2-popup .swal2-close {\n position: absolute;\n top: 0;\n right: 0;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n width: 1.2em;\n min-width: 1.2em;\n height: 1.2em;\n margin: 0;\n padding: 0;\n -webkit-transition: color 0.1s ease-out;\n transition: color 0.1s ease-out;\n border: none;\n border-radius: 0;\n background: transparent;\n color: #cccccc;\n font-family: serif;\n font-size: calc(2.5em - 0.25em);\n line-height: 1.2em;\n cursor: pointer; }\n .swal2-popup .swal2-close:hover {\n -webkit-transform: none;\n transform: none;\n color: #f27474; }\n .swal2-popup > .swal2-input,\n .swal2-popup > .swal2-file,\n .swal2-popup > .swal2-textarea,\n .swal2-popup > .swal2-select,\n .swal2-popup > .swal2-radio,\n .swal2-popup > .swal2-checkbox {\n display: none; }\n .swal2-popup .swal2-content {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin: 0;\n padding: 0;\n color: #545454;\n font-size: 1.125em;\n font-weight: 300;\n line-height: normal;\n word-wrap: break-word; }\n .swal2-popup #swal2-content {\n text-align: center; }\n .swal2-popup .swal2-input,\n .swal2-popup .swal2-file,\n .swal2-popup .swal2-textarea,\n .swal2-popup .swal2-select,\n .swal2-popup .swal2-radio,\n .swal2-popup .swal2-checkbox {\n margin: 1em auto; }\n .swal2-popup .swal2-input,\n .swal2-popup .swal2-file,\n .swal2-popup .swal2-textarea {\n width: 100%;\n -webkit-transition: border-color .3s, -webkit-box-shadow .3s;\n transition: border-color .3s, -webkit-box-shadow .3s;\n transition: border-color .3s, box-shadow .3s;\n transition: border-color .3s, box-shadow .3s, -webkit-box-shadow .3s;\n border: 1px solid #d9d9d9;\n border-radius: 0.1875em;\n font-size: 1.125em;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06);\n -webkit-box-sizing: border-box;\n box-sizing: border-box; }\n .swal2-popup .swal2-input.swal2-inputerror,\n .swal2-popup .swal2-file.swal2-inputerror,\n .swal2-popup .swal2-textarea.swal2-inputerror {\n border-color: #f27474 !important;\n -webkit-box-shadow: 0 0 2px #f27474 !important;\n box-shadow: 0 0 2px #f27474 !important; }\n .swal2-popup .swal2-input:focus,\n .swal2-popup .swal2-file:focus,\n .swal2-popup .swal2-textarea:focus {\n border: 1px solid #b4dbed;\n outline: none;\n -webkit-box-shadow: 0 0 3px #c4e6f5;\n box-shadow: 0 0 3px #c4e6f5; }\n .swal2-popup .swal2-input::-webkit-input-placeholder,\n .swal2-popup .swal2-file::-webkit-input-placeholder,\n .swal2-popup .swal2-textarea::-webkit-input-placeholder {\n color: #cccccc; }\n .swal2-popup .swal2-input:-ms-input-placeholder,\n .swal2-popup .swal2-file:-ms-input-placeholder,\n .swal2-popup .swal2-textarea:-ms-input-placeholder {\n color: #cccccc; }\n .swal2-popup .swal2-input::-ms-input-placeholder,\n .swal2-popup .swal2-file::-ms-input-placeholder,\n .swal2-popup .swal2-textarea::-ms-input-placeholder {\n color: #cccccc; }\n .swal2-popup .swal2-input::placeholder,\n .swal2-popup .swal2-file::placeholder,\n .swal2-popup .swal2-textarea::placeholder {\n color: #cccccc; }\n .swal2-popup .swal2-range input {\n width: 80%; }\n .swal2-popup .swal2-range output {\n width: 20%;\n font-weight: 600;\n text-align: center; }\n .swal2-popup .swal2-range input,\n .swal2-popup .swal2-range output {\n height: 2.625em;\n margin: 1em auto;\n padding: 0;\n font-size: 1.125em;\n line-height: 2.625em; }\n .swal2-popup .swal2-input {\n height: 2.625em;\n padding: 0.75em; }\n .swal2-popup .swal2-input[type='number'] {\n max-width: 10em; }\n .swal2-popup .swal2-file {\n font-size: 1.125em; }\n .swal2-popup .swal2-textarea {\n height: 6.75em;\n padding: 0.75em; }\n .swal2-popup .swal2-select {\n min-width: 50%;\n max-width: 100%;\n padding: .375em .625em;\n color: #545454;\n font-size: 1.125em; }\n .swal2-popup .swal2-radio,\n .swal2-popup .swal2-checkbox {\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center; }\n .swal2-popup .swal2-radio label,\n .swal2-popup .swal2-checkbox label {\n margin: 0 .6em;\n font-size: 1.125em; }\n .swal2-popup .swal2-radio input,\n .swal2-popup .swal2-checkbox input {\n margin: 0 .4em; }\n .swal2-popup .swal2-validationerror {\n display: none;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n padding: 0.625em;\n background: #f0f0f0;\n color: #666666;\n font-size: 1em;\n font-weight: 300;\n overflow: hidden; }\n .swal2-popup .swal2-validationerror::before {\n display: inline-block;\n width: 1.5em;\n height: 1.5em;\n margin: 0 .625em;\n border-radius: 50%;\n background-color: #f27474;\n color: #fff;\n font-weight: 600;\n line-height: 1.5em;\n text-align: center;\n content: '!';\n zoom: normal; }\n\n@supports (-ms-accelerator: true) {\n .swal2-range input {\n width: 100% !important; }\n .swal2-range output {\n display: none; } }\n\n@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n .swal2-range input {\n width: 100% !important; }\n .swal2-range output {\n display: none; } }\n\n.swal2-icon {\n position: relative;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n width: 80px;\n height: 80px;\n margin: 1.25em auto 1.875em;\n border: 4px solid transparent;\n border-radius: 50%;\n line-height: 80px;\n cursor: default;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n zoom: normal; }\n .swal2-icon.swal2-error {\n border-color: #f27474; }\n .swal2-icon.swal2-error .swal2-x-mark {\n position: relative;\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1; }\n .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {\n display: block;\n position: absolute;\n top: 37px;\n width: 47px;\n height: 5px;\n border-radius: 2px;\n background-color: #f27474; }\n .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='left'] {\n left: 17px;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg); }\n .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='right'] {\n right: 16px;\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg); }\n .swal2-icon.swal2-warning, .swal2-icon.swal2-info, .swal2-icon.swal2-question {\n margin: .333333em auto .5em;\n font-family: inherit;\n font-size: 3.75em; }\n .swal2-icon.swal2-warning {\n border-color: #facea8;\n color: #f8bb86; }\n .swal2-icon.swal2-info {\n border-color: #9de0f6;\n color: #3fc3ee; }\n .swal2-icon.swal2-question {\n border-color: #c9dae1;\n color: #87adbd; }\n .swal2-icon.swal2-success {\n border-color: #a5dc86; }\n .swal2-icon.swal2-success [class^='swal2-success-circular-line'] {\n position: absolute;\n width: 60px;\n height: 120px;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n border-radius: 50%; }\n .swal2-icon.swal2-success [class^='swal2-success-circular-line'][class$='left'] {\n top: -7px;\n left: -33px;\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg);\n -webkit-transform-origin: 60px 60px;\n transform-origin: 60px 60px;\n border-radius: 120px 0 0 120px; }\n .swal2-icon.swal2-success [class^='swal2-success-circular-line'][class$='right'] {\n top: -11px;\n left: 30px;\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg);\n -webkit-transform-origin: 0 60px;\n transform-origin: 0 60px;\n border-radius: 0 120px 120px 0; }\n .swal2-icon.swal2-success .swal2-success-ring {\n position: absolute;\n top: -4px;\n left: -4px;\n width: 80px;\n height: 80px;\n border: 4px solid rgba(165, 220, 134, 0.3);\n border-radius: 50%;\n z-index: 2;\n -webkit-box-sizing: content-box;\n box-sizing: content-box; }\n .swal2-icon.swal2-success .swal2-success-fix {\n position: absolute;\n top: 8px;\n left: 26px;\n width: 7px;\n height: 90px;\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg);\n z-index: 1; }\n .swal2-icon.swal2-success [class^='swal2-success-line'] {\n display: block;\n position: absolute;\n height: 5px;\n border-radius: 2px;\n background-color: #a5dc86;\n z-index: 2; }\n .swal2-icon.swal2-success [class^='swal2-success-line'][class$='tip'] {\n top: 46px;\n left: 14px;\n width: 25px;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg); }\n .swal2-icon.swal2-success [class^='swal2-success-line'][class$='long'] {\n top: 38px;\n right: 8px;\n width: 47px;\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg); }\n\n.swal2-progresssteps {\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n margin: 0 0 1.25em;\n padding: 0;\n font-weight: 600; }\n .swal2-progresssteps li {\n display: inline-block;\n position: relative; }\n .swal2-progresssteps .swal2-progresscircle {\n width: 2em;\n height: 2em;\n border-radius: 2em;\n background: #3085d6;\n color: #fff;\n line-height: 2em;\n text-align: center;\n z-index: 20; }\n .swal2-progresssteps .swal2-progresscircle:first-child {\n margin-left: 0; }\n .swal2-progresssteps .swal2-progresscircle:last-child {\n margin-right: 0; }\n .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep {\n background: #3085d6; }\n .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep ~ .swal2-progresscircle {\n background: #add8e6; }\n .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep ~ .swal2-progressline {\n background: #add8e6; }\n .swal2-progresssteps .swal2-progressline {\n width: 2.5em;\n height: .4em;\n margin: 0 -1px;\n background: #3085d6;\n z-index: 10; }\n\n[class^='swal2'] {\n -webkit-tap-highlight-color: transparent; }\n\n.swal2-show {\n -webkit-animation: swal2-show 0.3s;\n animation: swal2-show 0.3s; }\n .swal2-show.swal2-noanimation {\n -webkit-animation: none;\n animation: none; }\n\n.swal2-hide {\n -webkit-animation: swal2-hide 0.15s forwards;\n animation: swal2-hide 0.15s forwards; }\n .swal2-hide.swal2-noanimation {\n -webkit-animation: none;\n animation: none; }\n\n[dir='rtl'] .swal2-close {\n right: auto;\n left: 0; }\n\n.swal2-animate-success-icon .swal2-success-line-tip {\n -webkit-animation: swal2-animate-success-line-tip 0.75s;\n animation: swal2-animate-success-line-tip 0.75s; }\n\n.swal2-animate-success-icon .swal2-success-line-long {\n -webkit-animation: swal2-animate-success-line-long 0.75s;\n animation: swal2-animate-success-line-long 0.75s; }\n\n.swal2-animate-success-icon .swal2-success-circular-line-right {\n -webkit-animation: swal2-rotate-success-circular-line 4.25s ease-in;\n animation: swal2-rotate-success-circular-line 4.25s ease-in; }\n\n.swal2-animate-error-icon {\n -webkit-animation: swal2-animate-error-icon 0.5s;\n animation: swal2-animate-error-icon 0.5s; }\n .swal2-animate-error-icon .swal2-x-mark {\n -webkit-animation: swal2-animate-error-x-mark 0.5s;\n animation: swal2-animate-error-x-mark 0.5s; }\n\n@-webkit-keyframes swal2-rotate-loading {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes swal2-rotate-loading {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n";
var defaultParams = {
title: '',
titleText: '',
text: '',
html: '',
footer: '',
type: null,
toast: false,
customClass: '',
target: 'body',
backdrop: true,
animation: true,
allowOutsideClick: true,
allowEscapeKey: true,
allowEnterKey: true,
showConfirmButton: true,
showCancelButton: false,
preConfirm: null,
confirmButtonText: 'OK',
confirmButtonAriaLabel: '',
confirmButtonColor: null,
confirmButtonClass: null,
cancelButtonText: 'Cancel',
cancelButtonAriaLabel: '',
cancelButtonColor: null,
cancelButtonClass: null,
buttonsStyling: true,
reverseButtons: false,
focusConfirm: true,
focusCancel: false,
showCloseButton: false,
closeButtonAriaLabel: 'Close this dialog',
showLoaderOnConfirm: false,
imageUrl: null,
imageWidth: null,
imageHeight: null,
imageAlt: '',
imageClass: null,
timer: null,
width: null,
padding: null,
background: null,
input: null,
inputPlaceholder: '',
inputValue: '',
inputOptions: {},
inputAutoTrim: true,
inputClass: null,
inputAttributes: {},
inputValidator: null,
grow: false,
position: 'center',
progressSteps: [],
currentProgressStep: null,
progressStepsDistance: null,
onBeforeOpen: null,
onOpen: null,
onClose: null,
useRejections: false,
expectRejections: false
};
var deprecatedParams = ['useRejections', 'expectRejections'];
var swalPrefix = 'swal2-';
var prefix = function prefix(items) {
var result = {};
for (var i in items) {
result[items[i]] = swalPrefix + items[i];
}
return result;
};
var swalClasses = prefix(['container', 'shown', 'iosfix', 'popup', 'modal', 'no-backdrop', 'toast', 'toast-shown', 'fade', 'show', 'hide', 'noanimation', 'close', 'title', 'header', 'content', 'actions', 'confirm', 'cancel', 'footer', 'icon', 'image', 'input', 'has-input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea', 'inputerror', 'validationerror', 'progresssteps', 'activeprogressstep', 'progresscircle', 'progressline', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen']);
var iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);
var consolePrefix = 'SweetAlert2:';
/**
* Filter the unique values into a new array
* @param arr
*/
var uniqueArray = function uniqueArray(arr) {
var result = [];
for (var i = 0; i < arr.length; i++) {
if (result.indexOf(arr[i]) === -1) {
result.push(arr[i]);
}
}
return result;
};
/**
* Converts `inputOptions` into an array of `[value, label]`s
* @param inputOptions
*/
var formatInputOptions = function formatInputOptions(inputOptions) {
var result = [];
if (inputOptions instanceof Map) {
inputOptions.forEach(function (value, key) {
result.push([key, value]);
});
} else {
Object.keys(inputOptions).forEach(function (key) {
result.push([key, inputOptions[key]]);
});
}
return result;
};
/**
* Standardise console warnings
* @param message
*/
var warn = function warn(message) {
console.warn(consolePrefix + ' ' + message);
};
/**
* Standardise console errors
* @param message
*/
var error = function error(message) {
console.error(consolePrefix + ' ' + message);
};
/**
* Private global state for `warnOnce`
* @type {Array}
* @private
*/
var previousWarnOnceMessages = [];
/**
* Show a console warning, but only if it hasn't already been shown
* @param message
*/
var warnOnce = function warnOnce(message) {
if (!(previousWarnOnceMessages.indexOf(message) !== -1)) {
previousWarnOnceMessages.push(message);
warn(message);
}
};
/**
* If `arg` is a function, call it (with no arguments or context) and return the result.
* Otherwise, just pass the value through
* @param arg
*/
var callIfFunction = function callIfFunction(arg) {
return typeof arg === 'function' ? arg() : arg;
};
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
var slicedToArray = function () {
function sliceIterator(arr, i) {
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"]) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
return function (arr, i) {
if (Array.isArray(arr)) {
return arr;
} else if (Symbol.iterator in Object(arr)) {
return sliceIterator(arr, i);
} else {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
};
}();
var popupParams = _extends({}, defaultParams);
var queue = [];
var previousWindowKeyDown = void 0,
windowOnkeydownOverridden = void 0;
/**
* Show relevant warnings for given params
*
* @param params
*/
var showWarningsForParams = function showWarningsForParams(params) {
for (var param in params) {
if (!sweetAlert.isValidParameter(param)) {
warn('Unknown parameter "' + param + '"');
}
if (sweetAlert.isDeprecatedParameter(param)) {
warnOnce('The parameter "' + param + '" is deprecated and will be removed in the next major release.');
}
}
};
/**
* Set type, text and actions on popup
*
* @param params
* @returns {boolean}
*/
var setParameters = function setParameters(params) {
// Determine if the custom target element is valid
if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) {
warn('Target parameter is not valid, defaulting to "body"');
params.target = 'body';
}
var popup = void 0;
var oldPopup = getPopup();
var targetElement = typeof params.target === 'string' ? document.querySelector(params.target) : params.target;
// If the model target has changed, refresh the popup
if (oldPopup && targetElement && oldPopup.parentNode !== targetElement.parentNode) {
popup = init(params);
} else {
popup = oldPopup || init(params);
}
// Set popup width
if (params.width) {
popup.style.width = typeof params.width === 'number' ? params.width + 'px' : params.width;
}
// Set popup padding
if (params.padding) {
popup.style.padding = typeof params.padding === 'number' ? params.padding + 'px' : params.padding;
}
// Set popup background
if (params.background) {
popup.style.background = params.background;
}
var popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');
var successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');
for (var i = 0; i < successIconParts.length; i++) {
successIconParts[i].style.backgroundColor = popupBackgroundColor;
}
var container = getContainer();
var title = getTitle();
var content = getContent().querySelector('#' + swalClasses.content);
var actions = getActions();
var confirmButton = getConfirmButton();
var cancelButton = getCancelButton();
var closeButton = getCloseButton();
var footer = getFooter();
// Title
if (params.titleText) {
title.innerText = params.titleText;
} else if (params.title) {
title.innerHTML = params.title.split('\n').join('<br />');
}
if (typeof params.backdrop === 'string') {
getContainer().style.background = params.backdrop;
} else if (!params.backdrop) {
addClass([document.documentElement, document.body], swalClasses['no-backdrop']);
}
// Content as HTML
if (params.html) {
parseHtmlToContainer(params.html, content);
// Content as plain text
} else if (params.text) {
content.textContent = params.text;
show(content);
} else {
hide(content);
}
// Position
if (params.position in swalClasses) {
addClass(container, swalClasses[params.position]);
} else {
warn('The "position" parameter is not valid, defaulting to "center"');
addClass(container, swalClasses.center);
}
// Grow
if (params.grow && typeof params.grow === 'string') {
var growClass = 'grow-' + params.grow;
if (growClass in swalClasses) {
addClass(container, swalClasses[growClass]);
}
}
// Animation
if (typeof params.animation === 'function') {
params.animation = params.animation.call();
}
// Close button
if (params.showCloseButton) {
closeButton.setAttribute('aria-label', params.closeButtonAriaLabel);
show(closeButton);
} else {
hide(closeButton);
}
// Default Class
popup.className = swalClasses.popup;
if (params.toast) {
addClass([document.documentElement, document.body], swalClasses['toast-shown']);
addClass(popup, swalClasses.toast);
} else {
addClass(popup, swalClasses.modal);
}
// Custom Class
if (params.customClass) {
addClass(popup, params.customClass);
}
// Progress steps
var progressStepsContainer = getProgressSteps();
var currentProgressStep = parseInt(params.currentProgressStep === null ? sweetAlert.getQueueStep() : params.currentProgressStep, 10);
if (params.progressSteps && params.progressSteps.length) {
show(progressStepsContainer);
empty(progressStepsContainer);
if (currentProgressStep >= params.progressSteps.length) {
warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)');
}
params.progressSteps.forEach(function (step, index) {
var circle = document.createElement('li');
addClass(circle, swalClasses.progresscircle);
circle.innerHTML = step;
if (index === currentProgressStep) {
addClass(circle, swalClasses.activeprogressstep);
}
progressStepsContainer.appendChild(circle);
if (index !== params.progressSteps.length - 1) {
var line = document.createElement('li');
addClass(line, swalClasses.progressline);
if (params.progressStepsDistance) {
line.style.width = params.progressStepsDistance;
}
progressStepsContainer.appendChild(line);
}
});
} else {
hide(progressStepsContainer);
}
// Icon
var icons = getIcons();
for (var _i = 0; _i < icons.length; _i++) {
hide(icons[_i]);
}
if (params.type) {
var validType = false;
for (var iconType in iconTypes) {
if (params.type === iconType) {
validType = true;
break;
}
}
if (!validType) {
error('Unknown alert type: ' + params.type);
return false;
}
var icon = popup.querySelector('.' + swalClasses.icon + '.' + iconTypes[params.type]);
show(icon);
// Animate icon
if (params.animation) {
addClass(icon, 'swal2-animate-' + params.type + '-icon');
}
}
// Custom image
var image = getImage();
if (params.imageUrl) {
image.setAttribute('src', params.imageUrl);
image.setAttribute('alt', params.imageAlt);
show(image);
if (params.imageWidth) {
image.setAttribute('width', params.imageWidth);
} else {
image.removeAttribute('width');
}
if (params.imageHeight) {
image.setAttribute('height', params.imageHeight);
} else {
image.removeAttribute('height');
}
image.className = swalClasses.image;
if (params.imageClass) {
addClass(image, params.imageClass);
}
} else {
hide(image);
}
// Cancel button
if (params.showCancelButton) {
cancelButton.style.display = 'inline-block';
} else {
hide(cancelButton);
}
// Confirm button
if (params.showConfirmButton) {
removeStyleProperty(confirmButton, 'display');
} else {
hide(confirmButton);
}
// Actions (buttons) wrapper
if (!params.showConfirmButton && !params.showCancelButton) {
hide(actions);
} else {
show(actions);
}
// Edit text on confirm and cancel buttons
confirmButton.innerHTML = params.confirmButtonText;
cancelButton.innerHTML = params.cancelButtonText;
// ARIA labels for confirm and cancel buttons
confirmButton.setAttribute('aria-label', params.confirmButtonAriaLabel);
cancelButton.setAttribute('aria-label', params.cancelButtonAriaLabel);
// Add buttons custom classes
confirmButton.className = swalClasses.confirm;
addClass(confirmButton, params.confirmButtonClass);
cancelButton.className = swalClasses.cancel;
addClass(cancelButton, params.cancelButtonClass);
// Buttons styling
if (params.buttonsStyling) {
addClass([confirmButton, cancelButton], swalClasses.styled);
// Buttons background colors
if (params.confirmButtonColor) {
confirmButton.style.backgroundColor = params.confirmButtonColor;
}
if (params.cancelButtonColor) {
cancelButton.style.backgroundColor = params.cancelButtonColor;
}
// Loading state
var confirmButtonBackgroundColor = window.getComputedStyle(confirmButton).getPropertyValue('background-color');
confirmButton.style.borderLeftColor = confirmButtonBackgroundColor;
confirmButton.style.borderRightColor = confirmButtonBackgroundColor;
} else {
removeClass([confirmButton, cancelButton], swalClasses.styled);
confirmButton.style.backgroundColor = confirmButton.style.borderLeftColor = confirmButton.style.borderRightColor = '';
cancelButton.style.backgroundColor = cancelButton.style.borderLeftColor = cancelButton.style.borderRightColor = '';
}
// Footer
parseHtmlToContainer(params.footer, footer);
// CSS animation
if (params.animation === true) {
removeClass(popup, swalClasses.noanimation);
} else {
addClass(popup, swalClasses.noanimation);
}
// showLoaderOnConfirm && preConfirm
if (params.showLoaderOnConfirm && !params.preConfirm) {
warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request');
}
};
/**
* Animations
*
* @param animation
* @param onBeforeOpen
* @param onComplete
*/
var openPopup = function openPopup(animation, onBeforeOpen, onComplete) {
var container = getContainer();
var popup = getPopup();
if (onBeforeOpen !== null && typeof onBeforeOpen === 'function') {
onBeforeOpen(popup);
}
if (animation) {
addClass(popup, swalClasses.show);
addClass(container, swalClasses.fade);
removeClass(popup, swalClasses.hide);
} else {
removeClass(popup, swalClasses.fade);
}
show(popup);
// scrolling is 'hidden' until animation is done, after that 'auto'
container.style.overflowY = 'hidden';
if (animationEndEvent && !hasClass(popup, swalClasses.noanimation)) {
popup.addEventListener(animationEndEvent, function swalCloseEventFinished() {
popup.removeEventListener(animationEndEvent, swalCloseEventFinished);
container.style.overflowY = 'auto';
});
} else {
container.style.overflowY = 'auto';
}
addClass([document.documentElement, document.body, container], swalClasses.shown);
if (isModal()) {
fixScrollbar();
iOSfix();
}
states.previousActiveElement = document.activeElement;
if (onComplete !== null && typeof onComplete === 'function') {
setTimeout(function () {
onComplete(popup);
});
}
};
var fixScrollbar = function fixScrollbar() {
// for queues, do not do this more than once
if (states.previousBodyPadding !== null) {
return;
}
// if the body has overflow
if (document.body.scrollHeight > window.innerHeight) {
// add padding so the content doesn't shift after removal of scrollbar
states.previousBodyPadding = document.body.style.paddingRight;
document.body.style.paddingRight = measureScrollbar() + 'px';
}
};
var undoScrollbar = function undoScrollbar() {
if (states.previousBodyPadding !== null) {
document.body.style.paddingRight = states.previousBodyPadding;
states.previousBodyPadding = null;
}
};
// Fix iOS scrolling http://stackoverflow.com/q/39626302/1331425
var iOSfix = function iOSfix() {
var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
if (iOS && !hasClass(document.body, swalClasses.iosfix)) {
var offset = document.body.scrollTop;
document.body.style.top = offset * -1 + 'px';
addClass(document.body, swalClasses.iosfix);
}
};
var undoIOSfix = function undoIOSfix() {
if (hasClass(document.body, swalClasses.iosfix)) {
var offset = parseInt(document.body.style.top, 10);
removeClass(document.body, swalClasses.iosfix);
document.body.style.top = '';
document.body.scrollTop = offset * -1;
}
};
// SweetAlert entry point
var sweetAlert = function sweetAlert() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
// Prevent run in Node env
if (typeof window === 'undefined') {
return;
}
// Check for the existence of Promise
if (typeof Promise === 'undefined') {
error('This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)');
}
if (typeof args[0] === 'undefined') {
error('SweetAlert2 expects at least 1 attribute!');
return false;
}
var params = _extends({}, popupParams);
switch (_typeof(args[0])) {
case 'string':
params.title = args[0];
params.html = args[1];
params.type = args[2];
break;
case 'object':
showWarningsForParams(args[0]);
_extends(params, args[0]);
params.extraParams = args[0].extraParams;
if (params.input === 'email' && params.inputValidator === null) {
var inputValidator = function inputValidator(email) {
return new Promise(function (resolve, reject) {
var emailRegex = /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/;
if (emailRegex.test(email)) {
resolve();
} else {
reject('Invalid email address');
}
});
};
params.inputValidator = params.expectRejections ? inputValidator : sweetAlert.adaptInputValidator(inputValidator);
}
if (params.input === 'url' && params.inputValidator === null) {
var _inputValidator = function _inputValidator(url) {
return new Promise(function (resolve, reject) {
// taken from https://stackoverflow.com/a/3809435/1331425
var urlRegex = /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)$/;
if (urlRegex.test(url)) {
resolve();
} else {
reject('Invalid URL');
}
});
};
params.inputValidator = params.expectRejections ? _inputValidator : sweetAlert.adaptInputValidator(_inputValidator);
}
break;
default:
error('Unexpected type of argument! Expected "string" or "object", got ' + _typeof(args[0]));
return false;
}
setParameters(params);
var container = getContainer();
var popup = getPopup();
return new Promise(function (resolve, reject) {
// functions to handle all resolving/rejecting/settling
var succeedWith = function succeedWith(value) {
sweetAlert.closePopup(params.onClose);
if (params.useRejections) {
resolve(value);
} else {
resolve({ value: value });
}
};
var dismissWith = function dismissWith(dismiss) {
sweetAlert.closePopup(params.onClose);
if (params.useRejections) {
reject(dismiss);
} else {
resolve({ dismiss: dismiss });
}
};
var errorWith = function errorWith(error$$1) {
sweetAlert.closePopup(params.onClose);
reject(error$$1);
};
// Close on timer
if (params.timer) {
popup.timeout = setTimeout(function () {
return dismissWith('timer');
}, params.timer);
}
// Get input element by specified type or, if type isn't specified, by params.input
var getInput = function getInput(inputType) {
inputType = inputType || params.input;
if (!inputType) {
return null;
}
switch (inputType) {
case 'select':
case 'textarea':
case 'file':
return getChildByClass(content, swalClasses[inputType]);
case 'checkbox':
return popup.querySelector('.' + swalClasses.checkbox + ' input');
case 'radio':
return popup.querySelector('.' + swalClasses.radio + ' input:checked') || popup.querySelector('.' + swalClasses.radio + ' input:first-child');
case 'range':
return popup.querySelector('.' + swalClasses.range + ' input');
default:
return getChildByClass(content, swalClasses.input);
}
};
// Get the value of the popup input
var getInputValue = function getInputValue() {
var input = getInput();
if (!input) {
return null;
}
switch (params.input) {
case 'checkbox':
return input.checked ? 1 : 0;
case 'radio':
return input.checked ? input.value : null;
case 'file':
return input.files.length ? input.files[0] : null;
default:
return params.inputAutoTrim ? input.value.trim() : input.value;
}
};
// input autofocus
if (params.input) {
setTimeout(function () {
var input = getInput();
if (input) {
focusInput(input);
}
}, 0);
}
var confirm = function confirm(value) {
if (params.showLoaderOnConfirm) {
sweetAlert.showLoading();
}
if (params.preConfirm) {
sweetAlert.resetValidationError();
var preConfirmPromise = Promise.resolve().then(function () {
return params.preConfirm(value, params.extraParams);
});
if (params.expectRejections) {
preConfirmPromise.then(function (preConfirmValue) {
return succeedWith(preConfirmValue || value);
}, function (validationError) {
sweetAlert.hideLoading();
if (validationError) {
sweetAlert.showValidationError(validationError);
}
});
} else {
preConfirmPromise.then(function (preConfirmValue) {
if (isVisible(getValidationError()) || preConfirmValue === false) {
sweetAlert.hideLoading();
} else {
succeedWith(preConfirmValue || value);
}
}, function (error$$1) {
return errorWith(error$$1);
});
}
} else {
succeedWith(value);
}
};
// Mouse interactions
var onButtonEvent = function onButtonEvent(event) {
var e = event || window.event;
var target = e.target || e.srcElement;
var confirmButton = getConfirmButton();
var cancelButton = getCancelButton();
var targetedConfirm = confirmButton && (confirmButton === target || confirmButton.contains(target));
var targetedCancel = cancelButton && (cancelButton === target || cancelButton.contains(target));
switch (e.type) {
case 'click':
// Clicked 'confirm'
if (targetedConfirm && sweetAlert.isVisible()) {
sweetAlert.disableButtons();
if (params.input) {
var inputValue = getInputValue();
if (params.inputValidator) {
sweetAlert.disableInput();
var validationPromise = Promise.resolve().then(function () {
return params.inputValidator(inputValue, params.extraParams);
});
if (params.expectRejections) {
validationPromise.then(function () {
sweetAlert.enableButtons();
sweetAlert.enableInput();
confirm(inputValue);
}, function (validationError) {
sweetAlert.enableButtons();
sweetAlert.enableInput();
if (validationError) {
sweetAlert.showValidationError(validationError);
}
});
} else {
validationPromise.then(function (validationError) {
sweetAlert.enableButtons();
sweetAlert.enableInput();
if (validationError) {
sweetAlert.showValidationError(validationError);
} else {
confirm(inputValue);
}
}, function (error$$1) {
return errorWith(error$$1);
});
}
} else {
confirm(inputValue);
}
} else {
confirm(true);
}
// Clicked 'cancel'
} else if (targetedCancel && sweetAlert.isVisible()) {
sweetAlert.disableButtons();
dismissWith(sweetAlert.DismissReason.cancel);
}
break;
default:
}
};
var buttons = popup.querySelectorAll('button');
for (var i = 0; i < buttons.length; i++) {
buttons[i].onclick = onButtonEvent;
buttons[i].onmouseover = onButtonEvent;
buttons[i].onmouseout = onButtonEvent;
buttons[i].onmousedown = onButtonEvent;
}
// Closing popup by close button
getCloseButton().onclick = function () {
dismissWith(sweetAlert.DismissReason.close);
};
if (params.toast) {
// Closing popup by backdrop click
popup.onclick = function (e) {
if (e.target !== popup || params.showConfirmButton || params.showCancelButton) {
return;
}
if (params.allowOutsideClick) {
sweetAlert.closePopup(params.onClose);
dismissWith(sweetAlert.DismissReason.backdrop);
}
};
} else {
var ignoreOutsideClick = false;
// Ignore click events that had mousedown on the popup but mouseup on the container
// This can happen when the user drags a slider
popup.onmousedown = function () {
container.onmouseup = function (e) {
container.onmouseup = undefined;
// We only check if the mouseup target is the container because usually it doesn't
// have any other direct children aside of the popup
if (e.target === container) {
ignoreOutsideClick = true;
}
};
};
// Ignore click events that had mousedown on the container but mouseup on the popup
container.onmousedown = function () {
popup.onmouseup = function (e) {
popup.onmouseup = undefined;
// We also need to check if the mouseup target is a child of the popup
if (e.target === popup || popup.contains(e.target)) {
ignoreOutsideClick = true;
}
};
};
container.onclick = function (e) {
if (ignoreOutsideClick) {
ignoreOutsideClick = false;
return;
}
if (e.target !== container) {
return;
}
if (callIfFunction(params.allowOutsideClick)) {
dismissWith(sweetAlert.DismissReason.backdrop);
}
};
}
var content = getContent();
var actions = getActions();
var confirmButton = getConfirmButton();
var cancelButton = getCancelButton();
// Reverse buttons (Confirm on the right side)
if (params.reverseButtons) {
confirmButton.parentNode.insertBefore(cancelButton, confirmButton);
} else {
confirmButton.parentNode.insertBefore(confirmButton, cancelButton);
}
// Focus handling
var setFocus = function setFocus(index, increment) {
var focusableElements = getFocusableElements(params.focusCancel);
// search for visible elements and select the next possible match
for (var _i2 = 0; _i2 < focusableElements.length; _i2++) {
index = index + increment;
// rollover to first item
if (index === focusableElements.length) {
index = 0;
// go to last item
} else if (index === -1) {
index = focusableElements.length - 1;
}
// determine if element is visible
var el = focusableElements[index];
if (isVisible(el)) {
return el.focus();
}
}
};
var handleKeyDown = function handleKeyDown(event) {
var e = event || window.event;
var arrowKeys = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Left', 'Right', 'Up', 'Down' // IE11
];
if (e.key === 'Enter' && !e.isComposing) {
if (e.target === getInput()) {
if (['textarea', 'file'].indexOf(params.input) !== -1) {
return; // do not submit
}
sweetAlert.clickConfirm();
e.preventDefault();
}
// TAB
} else if (e.key === 'Tab') {
var targetElement = e.target || e.srcElement;
var focusableElements = getFocusableElements(params.focusCancel);
var btnIndex = -1; // Find the button - note, this is a nodelist, not an array.
for (var _i3 = 0; _i3 < focusableElements.length; _i3++) {
if (targetElement === focusableElements[_i3]) {
btnIndex = _i3;
break;
}
}
if (!e.shiftKey) {
// Cycle to the next button
setFocus(btnIndex, 1);
} else {