2
a(["jquery"], function (a) {
7
iconClass: v().iconClasses.error,
16
(b = a("#" + c.containerId)),
17
b.length ? b : (d && (b = r(c)), b)
23
iconClass: v().iconClasses.info,
35
iconClass: v().iconClasses.success,
44
iconClass: v().iconClasses.warning,
52
b || i(d), q(a, d, c) || p(d);
58
c && 0 === a(":focus", c).length
60
: void (b.children().length && b.remove())
64
for (var d = b.children(), e = d.length - 1; e >= 0; e--) q(a(d[e]), c);
67
var e = !(!d || !d.force) && d.force;
69
!(!b || (!e && 0 !== a(":focus", b).length)) &&
71
duration: c.hideDuration,
73
complete: function () {
83
.attr("id", c.containerId)
84
.addClass("toast-container")
85
.addClass(c.positionClass)),
86
b.appendTo(a(c.target)),
94
containerId: "toast-container",
100
hideMethod: "fadeOut",
108
extendedTimeOut: 1e3,
110
error: "toast-error",
112
success: "toast-success",
113
warning: "toast-warning",
115
iconClass: "toast-info",
116
positionClass: "toast-top-right",
118
titleClass: "toast-title",
119
messageClass: "toast-message",
122
closeHtml: '<button type="button">×</button>',
123
closeClass: "toast-close-button",
125
preventDuplicates: !1,
127
progressClass: "toast-progress",
137
null == a && (a = ""),
139
.replace(/&/g, "&")
140
.replace(/"/g, """)
141
.replace(/'/g, "'")
142
.replace(/</g, "<")
143
.replace(/>/g, ">")
147
y(), A(), B(), C(), D(), E(), z(), s();
151
switch (c.iconClass) {
152
case "toast-success":
159
j.attr("aria-live", a);
162
e.closeOnHover && j.hover(I, H),
163
!e.onclick && e.tapToDismiss && j.click(G),
166
n.click(function (a) {
168
? a.stopPropagation()
169
: void 0 !== a.cancelBubble &&
170
a.cancelBubble !== !0 &&
171
(a.cancelBubble = !0),
172
e.onCloseClick && e.onCloseClick(a),
176
j.click(function (a) {
183
duration: e.showDuration,
184
easing: e.showEasing,
188
((h = setTimeout(G, e.timeOut)),
189
(o.maxHideTime = parseFloat(e.timeOut)),
190
(o.hideEta = new Date().getTime() + o.maxHideTime),
191
e.progressBar && (o.intervalId = setInterval(J, 10)));
194
c.iconClass && j.addClass(e.toastClass).addClass(f);
197
e.newestOnTop ? b.prepend(j) : b.append(j);
202
e.escapeHtml && (a = q(c.title)),
203
k.append(a).addClass(e.titleClass),
210
e.escapeHtml && (a = q(c.message)),
211
l.append(a).addClass(e.messageClass),
217
(n.addClass(e.closeClass).attr("role", "button"), j.prepend(n));
220
e.progressBar && (m.addClass(e.progressClass), j.prepend(m));
223
e.rtl && j.addClass("rtl");
226
if (a.preventDuplicates) {
227
if (b.message === g) return !0;
233
var c = b && e.closeMethod !== !1 ? e.closeMethod : e.hideMethod,
234
d = b && e.closeDuration !== !1 ? e.closeDuration : e.hideDuration,
235
f = b && e.closeEasing !== !1 ? e.closeEasing : e.hideEasing;
236
if (!a(":focus", j).length || b)
238
clearTimeout(o.intervalId),
242
complete: function () {
245
e.onHidden && "hidden" !== p.state && e.onHidden(),
246
(p.state = "hidden"),
247
(p.endTime = new Date()),
254
(e.timeOut > 0 || e.extendedTimeOut > 0) &&
255
((h = setTimeout(G, e.extendedTimeOut)),
256
(o.maxHideTime = parseFloat(e.extendedTimeOut)),
257
(o.hideEta = new Date().getTime() + o.maxHideTime));
262
j.stop(!0, !0)[e.showMethod]({
263
duration: e.showDuration,
264
easing: e.showEasing,
268
var a = ((o.hideEta - new Date().getTime()) / o.maxHideTime) * 100;
272
f = c.iconClass || e.iconClass;
274
("undefined" != typeof c.optionsOverride &&
275
((e = a.extend(e, c.optionsOverride)),
276
(f = c.optionsOverride.iconClass || f)),
286
o = { intervalId: null, hideEta: null, maxHideTime: null },
290
startTime: new Date(),
294
return r(), x(), u(), t(p), e.debug && console && console.log(p), j;
298
return a.extend({}, s(), f.options);
305
0 === b.children().length && (b.remove(), (g = void 0)));
334
$("#ts-success").on("click", function () {
335
toastr.success("Have fun storming the castle!", "Miracle Max Says");
339
$("#ts-info").on("click", function () {
340
toastr.info("We do have the Kapua suite available.", "Turtle Bay Resort");
344
$("#ts-warning").on("click", function () {
346
"My name is Inigo Montoya. You killed my father, prepare to die!"
351
$("#ts-error").on("click", function () {
353
"I do not think that word means what you think it means.",
359
$("#pos-top-left").on("click", function () {
361
"I do not think that word means what you think it means.",
363
{ positionClass: "toastr toast-top-left", containerId: "toast-top-left" }
368
$("#pos-top-center").on("click", function () {
370
"I do not think that word means what you think it means.",
373
positionClass: "toastr toast-top-center",
374
containerId: "toast-top-center",
380
$("#pos-top-right").on("click", function () {
382
"I do not think that word means what you think it means.",
385
positionClass: "toastr toast-top-right",
386
containerId: "toast-top-right",
392
$("#pos-top-full").on("click", function () {
394
"I do not think that word means what you think it means.",
397
positionClass: "toastr toast-top-full-width",
398
containerId: "toast-top-full-width",
404
$("#pos-bottom-left").on("click", function () {
406
"I do not think that word means what you think it means.",
409
positionClass: "toastr toast-bottom-left",
410
containerId: "toast-bottom-left",
416
$("#pos-bottom-center").on("click", function () {
418
"I do not think that word means what you think it means.",
421
positionClass: "toastr toast-bottom-center",
422
containerId: "toast-bottom-center",
428
$("#pos-bottom-right").on("click", function () {
430
"I do not think that word means what you think it means.",
433
positionClass: "toastr toast-bottom-right",
434
containerId: "toast-bottom-right",
440
$("#pos-bottom-full").on("click", function () {
442
"I do not think that word means what you think it means.",
443
"Bottom Full Width!",
445
positionClass: "toastr toast-bottom-full-width",
446
containerId: "toast-bottom-full-width",
452
$("#text-notification").on("click", function () {
453
toastr.info("Have fun storming the castle!", "Miracle Max Says");
457
$("#close-button").on("click", function () {
458
toastr.success("Have fun storming the castle!", "With Close Button", {
464
$("#progress-bar").on("click", function () {
465
toastr.warning("Have fun storming the castle!", "Progress Bar", {
471
$("#clear-toast-btn").on("click", function () {
473
'Clear itself?<br /><br /><button type="button" class="btn btn-secondary clear">Yes</button>',
479
$("#slide-toast").on("click", function () {
481
"I do not think that word means what you think it means.",
482
"Slide Down / Slide Up!",
483
{ showMethod: "slideDown", hideMethod: "slideUp", timeOut: 2000 }
488
$("#fade-toast").on("click", function () {
490
"I do not think that word means what you think it means.",
491
"Slide Down / Slide Up!",
492
{ showMethod: "fadeIn", hideMethod: "fadeOut", timeOut: 2000 }
496
"function" == typeof define && define.amd
499
"undefined" != typeof module && module.exports
500
? (module.exports = b(require("jquery")))
501
: (window.toastr = b(window.jQuery));