1!(function (e) { 2 e(["jquery"], function (e) { 3 return (function () { 4 function t(e, t, n) { 5 return g({ 6 type: O.error, 7 iconClass: m().iconClasses.error, 8 message: e, 9 optionsOverride: n, 10 title: t, 11 }); 12 } 13 function n(t, n) { 14 return ( 15 t || (t = m()), 16 (v = e("#" + t.containerId)), 17 v.length ? v : (n && (v = d(t)), v) 18 ); 19 } 20 function o(e, t, n) { 21 return g({ 22 type: O.info, 23 iconClass: m().iconClasses.info, 24 message: e, 25 optionsOverride: n, 26 title: t, 27 }); 28 } 29 function s(e) { 30 C = e; 31 } 32 function i(e, t, n) { 33 return g({ 34 type: O.success, 35 iconClass: m().iconClasses.success, 36 message: e, 37 optionsOverride: n, 38 title: t, 39 }); 40 } 41 function a(e, t, n) { 42 return g({ 43 type: O.warning, 44 iconClass: m().iconClasses.warning, 45 message: e, 46 optionsOverride: n, 47 title: t, 48 }); 49 } 50 function r(e, t) { 51 var o = m();
52 v || n(o), u(e, o, t) || l(o); 53 } 54 function c(t) { 55 var o = m(); 56 return ( 57 v || n(o), 58 t && 0 === e(":focus", t).length 59 ? void h(t) 60 : void (v.children().length && v.remove()) 61 ); 62 } 63 function l(t) { 64 for (var n = v.children(), o = n.length - 1; o >= 0; o--) u(e(n[o]), t); 65 } 66 function u(t, n, o) { 67 var s = !(!o || !o.force) && o.force; 68 return ( 69 !(!t || (!s && 0 !== e(":focus", t).length)) && 70 (t[n.hideMethod]({ 71 duration: n.hideDuration, 72 easing: n.hideEasing, 73 complete: function () { 74 h(t); 75 }, 76 }), 77 !0) 78 ); 79 } 80 function d(t) { 81 return ( 82 (v = e("<div/>").attr("id", t.containerId).addClass(t.positionClass)), 83 v.appendTo(e(t.target)), 84 v 85 ); 86 } 87 function p() { 88 return { 89 tapToDismiss: !0, 90 toastClass: "toast", 91 containerId: "toast-container", 92 debug: !1, 93 showMethod: "fadeIn", 94 showDuration: 200, 95 showEasing: "swing", 96 onShown: void 0, 97 hideMethod: "fadeOut", 98 hideDuration: 1e3, 99 hideEasing: "swing", 100 onHidden: void 0, 101 closeMethod: !1, 102 closeDuration: !1, 103 closeEasing: !1, 104 closeOnHover: !0, 105 extendedTimeOut: 1e3, 106 iconClasses: { 107 error: "toast-error", 108 info: "toast-info", 109 success: "toast-success", 110 warning: "toast-warning", 111 }, 112 iconClass: "toast-info", 113 positionClass: "toast-top-right", 114 timeOut: 5e3, 115 titleClass: "toast-title", 116 messageClass: "toast-message", 117 escapeHtml: !1, 118 target: "body", 119 closeHtml: '<button type="button">×</button>', 120 closeClass: "toast-close-button", 121 newestOnTop: !0, 122 preventDuplicates: !1, 123 progressBar: !1, 124 progressClass: "toast-progress", 125 rtl: !1, 126 }; 127 } 128 function f(e) { 129 C && C(e); 130 } 131 function g(t) { 132 function o(e) { 133 return ( 134 null == e && (e = ""), 135 e 136 .replace(/&/g, "&") 137 .replace(/"/g, """) 138 .replace(/'/g, "'") 139 .replace(/</g, "<") 140 .replace(/>/g, ">") 141 ); 142 } 143 function s() { 144 c(), u(), d(), p(), g(), C(), l(), i(); 145 } 146 function i() { 147 var e = ""; 148 switch (t.iconClass) { 149 case "toast-success": 150 case "toast-info": 151 e = "polite"; 152 break; 153 default: 154 e = "assertive"; 155 } 156 I.attr("aria-live", e); 157 } 158 function a() { 159 E.closeOnHover && I.hover(H, D), 160 !E.onclick && E.tapToDismiss && I.click(b), 161 E.closeButton && 162 j && 163 j.click(function (e) { 164 e.stopPropagation 165 ? e.stopPropagation() 166 : void 0 !== e.cancelBubble && 167 e.cancelBubble !== !0 && 168 (e.cancelBubble = !0), 169 E.onCloseClick && E.onCloseClick(e), 170 b(!0); 171 }), 172 E.onclick && 173 I.click(function (e) { 174 E.onclick(e), b(); 175 }); 176 } 177 function r() { 178 I.hide(), 179 I[E.showMethod]({ 180 duration: E.showDuration, 181 easing: E.showEasing, 182 complete: E.onShown, 183 }), 184 E.timeOut > 0 && 185 ((k = setTimeout(b, E.timeOut)), 186 (F.maxHideTime = parseFloat(E.timeOut)), 187 (F.hideEta = new Date().getTime() + F.maxHideTime), 188 E.progressBar && (F.intervalId = setInterval(x, 10))); 189 } 190 function c() { 191 t.iconClass && I.addClass(E.toastClass).addClass(y); 192 } 193 function l() { 194 E.newestOnTop ? v.prepend(I) : v.append(I); 195 } 196 function u() { 197 if (t.title) { 198 var e = t.title;
199 E.escapeHtml && (e = o(t.title)), 200 M.append(e).addClass(E.titleClass), 201 I.append(M); 202 } 203 } 204 function d() { 205 if (t.message) { 206 var e = t.message; 207 E.escapeHtml && (e = o(t.message)), 208 B.append(e).addClass(E.messageClass), 209 I.append(B); 210 } 211 } 212 function p() { 213 E.closeButton && 214 (j.addClass(E.closeClass).attr("role", "button"), I.prepend(j)); 215 } 216 function g() { 217 E.progressBar && (q.addClass(E.progressClass), I.prepend(q)); 218 } 219 function C() { 220 E.rtl && I.addClass("rtl"); 221 } 222 function O(e, t) { 223 if (e.preventDuplicates) { 224 if (t.message === w) return !0; 225 w = t.message; 226 } 227 return !1; 228 } 229 function b(t) { 230 var n = t && E.closeMethod !== !1 ? E.closeMethod : E.hideMethod, 231 o = t && E.closeDuration !== !1 ? E.closeDuration : E.hideDuration, 232 s = t && E.closeEasing !== !1 ? E.closeEasing : E.hideEasing; 233 if (!e(":focus", I).length || t) 234 return ( 235 clearTimeout(F.intervalId), 236 I[n]({ 237 duration: o, 238 easing: s, 239 complete: function () { 240 h(I), 241 clearTimeout(k), 242 E.onHidden && "hidden" !== P.state && E.onHidden(), 243 (P.state = "hidden"), 244 (P.endTime = new Date()), 245 f(P); 246 }, 247 }) 248 ); 249 } 250 function D() { 251 (E.timeOut > 0 || E.extendedTimeOut > 0) && 252 ((k = setTimeout(b, E.extendedTimeOut)), 253 (F.maxHideTime = parseFloat(E.extendedTimeOut)), 254 (F.hideEta = new Date().getTime() + F.maxHideTime)); 255 } 256 function H() { 257 clearTimeout(k), 258 (F.hideEta = 0), 259 I.stop(!0, !0)[E.showMethod]({ 260 duration: E.showDuration, 261 easing: E.showEasing, 262 }); 263 } 264 function x() { 265 var e = ((F.hideEta - new Date().getTime()) / F.maxHideTime) * 100; 266 q.width(e + "%"); 267 } 268 var E = m(), 269 y = t.iconClass || E.iconClass; 270 if ( 271 ("undefined" != typeof t.optionsOverride && 272 ((E = e.extend(E, t.optionsOverride)), 273 (y = t.optionsOverride.iconClass || y)), 274 !O(E, t)) 275 ) { 276 T++, (v = n(E, !0)); 277 var k = null, 278 I = e("<div/>"), 279 M = e("<div/>"), 280 B = e("<div/>"), 281 q = e("<div/>"), 282 j = e(E.closeHtml), 283 F = { intervalId: null, hideEta: null, maxHideTime: null }, 284 P = { 285 toastId: T, 286 state: "visible", 287 startTime: new Date(), 288 options: E, 289 map: t, 290 }; 291 return s(), r(), a(), f(P), E.debug && console && console.log(P), I; 292 } 293 } 294 function m() { 295 return e.extend({}, p(), b.options); 296 } 297 function h(e) { 298 v || (v = n()), 299 e.is(":visible") || 300 (e.remove(), 301 (e = null), 302 0 === v.children().length && (v.remove(), (w = void 0))); 303 } 304 var v, 305 C, 306 w, 307 T = 0, 308 O = { 309 error: "error", 310 info: "info", 311 success: "success", 312 warning: "warning", 313 }, 314 b = { 315 clear: r, 316 remove: c, 317 error: t, 318 getContainer: n, 319 info: o, 320 options: {}, 321 subscribe: s, 322 success: i, 323 version: "2.1.4", 324 warning: a, 325 }; 326 return b; 327 })(); 328 }); 329})( 330 "function" == typeof define && define.amd 331 ? define 332 : function (e, t) { 333 "undefined" != typeof module && module.exports 334 ? (module.exports = t(require("jquery"))) 335 : (window.toastr = t(window.jQuery)); 336 } 337); 338//# sourceMappingURL=toastr.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.