vendor: 22,488 bytes, lines 1-401
1/*! version : 4.17.47 2 ========================================================= 3 bootstrap-datetimejs 4 https://github.com/Eonasdan/bootstrap-datetimepicker 5 Copyright (c) 2015 Jonathan Peterson 6 ========================================================= 7 */ 8/* 9 The MIT License (MIT) 10 11 Copyright (c) 2015 Jonathan Peterson 12 13 Permission is hereby granted, free of charge, to any person obtaining a copy 14 of this software and associated documentation files (the "Software"), to deal 15 in the Software without restriction, including without limitation the rights 16 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 copies of the Software, and to permit persons to whom the Software is 18 furnished to do so, subject to the following conditions: 19 20 The above copyright notice and this permission notice shall be included in 21 all copies or substantial portions of the Software. 22 23 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 29 THE SOFTWARE. 30 */ 31/*global define:false */ 32/*global exports:false */ 33/*global require:false */ 34/*global jQuery:false */ 35/*global moment:false */ 36 37/* 38 39 40 Creative Tim Modifications 41 42 We added class btn-primary for custom styling button. 43 44 45*/ 46 47! function(e) { 48 "use strict"; 49 if ("function" == typeof define && define.amd) define(["jquery", "moment"], e); 50 else if ("object" == typeof exports) module.exports = e(require("jquery"), require("moment")); 51 else { 52 if ("undefined" == typeof jQuery) throw "bootstrap-datetimepicker requires jQuery to be loaded first"; 53 if ("undefined" == typeof moment) throw "bootstrap-datetimepicker requires Moment.js to be loaded first"; 54 e(jQuery, moment) 55 } 56}(function(e, t) { 57 "use strict"; 58 if (!t) throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first"); 59 var n = function(n, a) { 60 var r, i, o, s, d, l, p, c = {}, 61 u = !0, 62 f = !1, 63 h = !1, 64 m = 0, 65 y = [{ 66 clsName: "days", 67 navFnc: "M", 68 navStep: 1 69 }, { 70 clsName: "months", 71 navFnc: "y", 72 navStep: 1 73 }, { 74 clsName: "years", 75 navFnc: "y", 76 navStep: 10 77 }, { 78 clsName: "decades", 79 navFnc: "y", 80 navStep: 100 81 }], 82 b = ["days", "months", "years", "decades"], 83 g = ["top", "bottom", "auto"], 84 w = ["left", "right", "auto"], 85 v = ["default", "top", "bottom"], 86 k = { 87 up: 38, 88 38: "up", 89 down: 40, 90 40: "down", 91 left: 37, 92 37: "left", 93 right: 39, 94 39: "right", 95 tab: 9, 96 9: "tab", 97 escape: 27, 98 27: "escape", 99 enter: 13, 100 13: "enter", 101 pageUp: 33, 102 33: "pageUp", 103 pageDown: 34, 104 34: "pageDown", 105 shift: 16, 106 16: "shift", 107 control: 17, 108 17: "control", 109 space: 32, 110 32: "space", 111 t: 84, 112 84: "t", 113 delete: 46, 114 46: "delete" 115 }, 116 D = {}, 117 C = function() { 118 return void 0 !== t.tz && void 0 !== a.timeZone && null !== a.timeZone && "" !== a.timeZone 119 }, 120 x = function(e) { 121 var n; 122 return n = void 0 === e || null === e ? t() : t.isDate(e) || t.isMoment(e) ? t(e) : C() ? t.tz(e, l, a.useStrict, a.timeZone) : t(e, l, a.useStrict), C() && n.tz(a.timeZone), n 123 }, 124 T = function(e) { 125 if ("string" != typeof e || e.length > 1) throw new TypeError("isEnabled expects a single character string parameter"); 126 switch (e) { 127 case "y": 128 return -1 !== d.indexOf("Y"); 129 case "M": 130 return -1 !== d.indexOf("M"); 131 case "d": 132 return -1 !== d.toLowerCase().indexOf("d"); 133 case "h": 134 case "H": 135 return -1 !== d.toLowerCase().indexOf("h"); 136 case "m": 137 return -1 !== d.indexOf("m"); 138 case "s": 139 return -1 !== d.indexOf("s"); 140 default: 141 return !1 142 } 143 }, 144 M = function() { 145 return T("h") || T("m") || T("s") 146 }, 147 S = function() { 148 return T("y") || T("M") || T("d") 149 }, 150 O = function() { 151 var t = e("<thead>").append(e("<tr>").append(e("<th>").addClass("prev").attr("data-action", "previous").append(e("<span>").addClass(a.icons.previous))).append(e("<th>").addClass("picker-switch").attr("data-action", "pickerSwitch").attr("colspan", a.calendarWeeks ? "6" : "5")).append(e("<th>").addClass("next").attr("data-action", "next").append(e("<span>").addClass(a.icons.next)))), 152 n = e("<tbody>").append(e("<tr>").append(e("<td>").attr("colspan", a.calendarWeeks ? "8" : "7"))); 153 return [e("<div>").addClass("datepicker-days").append(e("<table>").addClass("table-condensed").append(t).append(e("<tbody>"))), e("<div>").addClass("datepicker-months").append(e("<table>").addClass("table-condensed").append(t.clone()).append(n.clone())), e("<div>").addClass("datepicker-years").append(e("<table>").addClass("table-condensed").append(t.clone()).append(n.clone())), e("<div>").addClass("datepicker-decades").append(e("<table>").addClass("table-condensed").append(t.clone()).append(n.clone()))] 154 }, 155 P = function() { 156 var t = e("<tr>"), 157 n = e("<tr>"), 158 r = e("<tr>"); 159 return T("h") && (t.append(e("<td>").append(e("<a>").attr({ 160 href: "#", 161 tabindex: "-1", 162 title: a.tooltips.incrementHour 163 }).addClass("btn").attr("data-action", "incrementHours").append(e("<span>").addClass(a.icons.up)))), n.append(e("<td>").append(e("<span>").addClass("timepicker-hour").attr({ 164 "data-time-component": "hours", 165 title: a.tooltips.pickHour 166 }).attr("data-action", "showHours"))), r.append(e("<td>").append(e("<a>").attr({ 167 href: "#", 168 tabindex: "-1", 169 title: a.tooltips.decrementHour 170 }).addClass("btn").attr("data-action", "decrementHours").append(e("<span>").addClass(a.icons.down))))), T("m") && (T("h") && (t.append(e("<td>").addClass("separator")), n.append(e("<td>").addClass("separator").html(":")), r.append(e("<td>").addClass("separator"))), t.append(e("<td>").append(e("<a>").attr({ 171 href: "#", 172 tabindex: "-1", 173 title: a.tooltips.incrementMinute 174 }).addClass("btn").attr("data-action", "incrementMinutes").append(e("<span>").addClass(a.icons.up)))), n.append(e("<td>").append(e("<span>").addClass("timepicker-minute").attr({ 175 "data-time-component": "minutes", 176 title: a.tooltips.pickMinute 177 }).attr("data-action", "showMinutes"))), r.append(e("<td>").append(e("<a>").attr({ 178 href: "#", 179 tabindex: "-1", 180 title: a.tooltips.decrementMinute 181 }).addClass("btn").attr("data-action", "decrementMinutes").append(e("<span>").addClass(a.icons.down))))), T("s") && (T("m") && (t.append(e("<td>").addClass("separator")), n.append(e("<td>").addClass("separator").html(":")), r.append(e("<td>").addClass("separator"))), t.append(e("<td>").append(e("<a>").attr({ 182 href: "#", 183 tabindex: "-1", 184 title: a.tooltips.incrementSecond 185 }).addClass("btn btn-link").attr("data-action", "incrementSeconds").append(e("<span>").addClass(a.icons.up)))), n.append(e("<td>").append(e("<span>").addClass("timepicker-second").attr({ 186 "data-time-component": "seconds", 187 title: a.tooltips.pickSecond 188 }).attr("data-action", "showSeconds"))), r.append(e("<td>").append(e("<a>").attr({ 189 href: "#", 190 tabindex: "-1", 191 title: a.tooltips.decrementSecond 192 }).addClass("btn btn-link").attr("data-action", "decrementSeconds").append(e("<span>").addClass(a.icons.down))))), s || (t.append(e("<td>").addClass("separator")), n.append(e("<td>").append(e("<button>").addClass("btn btn-primary").attr({ 193 "data-action": "togglePeriod", 194 tabindex: "-1", 195 title: a.tooltips.togglePeriod 196 }))), r.append(e("<td>").addClass("separator"))), e("<div>").addClass("timepicker-picker").append(e("<table>").addClass("table-condensed").append([t, n, r])) 197 }, 198 E = function() { 199 var t = e("<div>").addClass("timepicker-hours").append(e("<table>").addClass("table-condensed")), 200 n = e("<div>").addClass("timepicker-minutes").append(e("<table>").addClass("table-condensed")), 201 a = e("<div>").addClass("timepicker-seconds").append(e("<table>").addClass("table-condensed")), 202 r = [P()]; 203 return T("h") && r.push(t), T("m") && r.push(n), T("s") && r.push(a), r 204 }, 205 H = function() { 206 var t = []; 207 return a.showTodayButton && t.push(e("<td>").append(e("<a>").attr({ 208 "data-action": "today", 209 title: a.tooltips.today 210 }).append(e("<span>").addClass(a.icons.today)))), !a.sideBySide && S() && M() && t.push(e("<td>").append(e("<a>").attr({ 211 "data-action": "togglePicker", 212 title: a.tooltips.selectTime 213 }).append(e("<span>").addClass(a.icons.time)))), a.showClear && t.push(e("<td>").append(e("<a>").attr({ 214 "data-action": "clear", 215 title: a.tooltips.clear 216 }).append(e("<span>").addClass(a.icons.clear)))), a.showClose && t.push(e("<td>").append(e("<a>").attr({ 217 "data-action": "close", 218 title: a.tooltips.close 219 }).append(e("<span>").addClass(a.icons.close)))), e("<table>").addClass("table-condensed").append(e("<tbody>").append(e("<tr>").append(t))) 220 }, 221 I = function() { 222 var t = e("<div>").addClass("bootstrap-datetimepicker-widget dropdown-menu"), 223 n = e("<div>").addClass("datepicker").append(O()), 224 r = e("<div>").addClass("timepicker").append(E()), 225 i = e("<ul>").addClass("list-unstyled"), 226 o = e("<li>").addClass("picker-switch" + (a.collapse ? " accordion-toggle" : "")).append(H()); 227 return a.inline && t.removeClass("dropdown-menu"), s && t.addClass("usetwentyfour"), T("s") && !s && t.addClass("wider"), a.sideBySide && S() && M() ? (t.addClass("timepicker-sbs"), "top" === a.toolbarPlacement && t.append(o), t.append(e("<div>").addClass("row").append(n.addClass("col-md-6")).append(r.addClass("col-md-6"))), "bottom" === a.toolbarPlacement && t.append(o), t) : ("top" === a.toolbarPlacement && i.append(o), S() && i.append(e("<li>").addClass(a.collapse && M() ? "collapse show" : "").append(n)), "default" === a.toolbarPlacement && i.append(o), M() && i.append(e("<li>").addClass(a.collapse && S() ? "collapse" : "").append(r)), "bottom" === a.toolbarPlacement && i.append(o), t.append(i)) 228 }, 229 Y = function() { 230 var t, r = (f || n).position(), 231 i = (f || n).offset(), 232 o = a.widgetPositioning.vertical, 233 s = a.widgetPositioning.horizontal; 234 if (a.widgetParent) t = a.widgetParent.append(h); 235 else if (n.is("input")) t = n.after(h).parent(); 236 else { 237 if (a.inline) return void(t = n.append(h)); 238 t = n, n.children().first().after(h) 239 } 240 if ("auto" === o && (o = i.top + 1.5 * h.height() >= e(window).height() + e(window).scrollTop() && h.height() + n.outerHeight() < i.top ? "top" : "bottom"), "auto" === s && (s = t.width() < i.left + h.outerWidth() / 2 && i.left + h.outerWidth() > e(window).width() ? "right" : "left"), "top" === o ? h.addClass("top").removeClass("bottom") : h.addClass("bottom").removeClass("top"), "right" === s ? h.addClass("pull-right") : h.removeClass("pull-right"), "static" === t.css("position") && (t = t.parents().filter(function() { 241 return "static" !== e(this).css("position") 242 }).first()), 0 === t.length) throw new Error("datetimepicker component should be placed within a non-static positioned container"); 243 h.css({ 244 top: "top" === o ? "auto" : r.top + n.outerHeight(), 245 bottom: "top" === o ? t.outerHeight() - (t === n ? 0 : r.top) : "auto", 246 left: "left" === s ? t === n ? 0 : r.left : "auto", 247 right: "left" === s ? "auto" : t.outerWidth() - n.outerWidth() - (t === n ? 0 : r.left) 248 }), setTimeout(function() { 249 h.addClass("open") 250 }, 180) 251 }, 252 q = function(e) { 253 "dp.change" === e.type && (e.date && e.date.isSame(e.oldDate) || !e.date && !e.oldDate) || n.trigger(e) 254 }, 255 B = function(e) { 256 "y" === e && (e = "YYYY"), q({ 257 type: "dp.update", 258 change: e, 259 viewDate: i.clone() 260 }) 261 }, 262 j = function(e) { 263 h && (e && (p = Math.max(m, Math.min(3, p + e))), h.find(".datepicker > div").hide().filter(".datepicker-" + y[p].clsName).show()) 264 }, 265 A = function() { 266 var t = e("<tr>"), 267 n = i.clone().startOf("w").startOf("d"); 268 for (!0 === a.calendarWeeks && t.append(e("<th>").addClass("cw").text("#")); n.isBefore(i.clone().endOf("w"));) t.append(e("<th>").addClass("dow").text(n.format("dd"))), n.add(1, "d"); 269 h.find(".datepicker-days thead").append(t) 270 }, 271 F = function(e) { 272 return !0 === a.disabledDates[e.format("YYYY-MM-DD")] 273 }, 274 L = function(e) { 275 return !0 === a.enabledDates[e.format("YYYY-MM-DD")] 276 }, 277 W = function(e) { 278 return !0 === a.disabledHours[e.format("H")] 279 }, 280 z = function(e) { 281 return !0 === a.enabledHours[e.format("H")] 282 }, 283 N = function(t, n) { 284 if (!t.isValid()) return !1; 285 if (a.disabledDates && "d" === n && F(t)) return !1; 286 if (a.enabledDates && "d" === n && !L(t)) return !1; 287 if (a.minDate && t.isBefore(a.minDate, n)) return !1; 288 if (a.maxDate && t.isAfter(a.maxDate, n)) return !1; 289 if (a.daysOfWeekDisabled && "d" === n && -1 !== a.daysOfWeekDisabled.indexOf(t.day())) return !1; 290 if (a.disabledHours && ("h" === n || "m" === n || "s" === n) && W(t)) return !1; 291 if (a.enabledHours && ("h" === n || "m" === n || "s" === n) && !z(t)) return !1; 292 if (a.disabledTimeIntervals && ("h" === n || "m" === n || "s" === n)) { 293 var r = !1; 294 if (e.each(a.disabledTimeIntervals, function() { 295 if (t.isBetween(this[0], this[1])) return r = !0, !1 296 }), r) return !1 297 } 298 return !0 299 }, 300 V = function() { 301 for (var t = [], n = i.clone().startOf("y").startOf("d"); n.isSame(i, "y");) t.push(e("<span>").attr("data-action", "selectMonth").addClass("month").text(n.format("MMM"))), n.add(1, "M"); 302 h.find(".datepicker-months td").empty().append(t) 303 }, 304 Z = function() { 305 var t = h.find(".datepicker-months"), 306 n = t.find("th"), 307 o = t.find("tbody").find("span"); 308 n.eq(0).find("span").attr("title", a.tooltips.prevYear), n.eq(1).attr("title", a.tooltips.selectYear), n.eq(2).find("span").attr("title", a.tooltips.nextYear), t.find(".disabled").removeClass("disabled"), N(i.clone().subtract(1, "y"), "y") || n.eq(0).addClass("disabled"), n.eq(1).text(i.year()), N(i.clone().add(1, "y"), "y") || n.eq(2).addClass("disabled"), o.removeClass("active"), r.isSame(i, "y") && !u && o.eq(r.month()).addClass("active"), o.each(function(t) { 309 N(i.clone().month(t), "M") || e(this).addClass("disabled") 310 }) 311 }, 312 R = function() { 313 var e = h.find(".datepicker-years"), 314 t = e.find("th"), 315 n = i.clone().subtract(5, "y"), 316 o = i.clone().add(6, "y"), 317 s = ""; 318 for (t.eq(0).find("span").attr("title", a.tooltips.prevDecade), t.eq(1).attr("title", a.tooltips.selectDecade), t.eq(2).find("span").attr("title", a.tooltips.nextDecade), e.find(".disabled").removeClass("disabled"), a.minDate && a.minDate.isAfter(n, "y") && t.eq(0).addClass("disabled"), t.eq(1).text(n.year() + "-" + o.year()), a.maxDate && a.maxDate.isBefore(o, "y") && t.eq(2).addClass("disabled"); !n.isAfter(o, "y");) s += '<span data-action="selectYear" class="year' + (n.isSame(r, "y") && !u ? " active" : "") + (N(n, "y") ? "" : " disabled") + '">' + n.year() + "</span>", n.add(1, "y"); 319 e.find("td").html(s) 320 }, 321 Q = function() { 322 var e, n = h.find(".datepicker-decades"), 323 o = n.find("th"), 324 s = t({ 325 y: i.year() - i.year() % 100 - 1 326 }), 327 d = s.clone().add(100, "y"), 328 l = s.clone(), 329 p = !1, 330 c = !1, 331 u = ""; 332 for (o.eq(0).find("span").attr("title", a.tooltips.prevCentury), o.eq(2).find("span").attr("title", a.tooltips.nextCentury), n.find(".disabled").removeClass("disabled"), (s.isSame(t({ 333 y: 1900 334 })) || a.minDate && a.minDate.isAfter(s, "y")) && o.eq(0).addClass("disabled"), o.eq(1).text(s.year() + "-" + d.year()), (s.isSame(t({ 335 y: 2e3 336 })) || a.maxDate && a.maxDate.isBefore(d, "y")) && o.eq(2).addClass("disabled"); !s.isAfter(d, "y");) e = s.year() + 12, p = a.minDate && a.minDate.isAfter(s, "y") && a.minDate.year() <= e, c = a.maxDate && a.maxDate.isAfter(s, "y") && a.maxDate.year() <= e, u += '<span data-action="selectDecade" class="decade' + (r.isAfter(s) && r.year() <= e ? " active" : "") + (N(s, "y") || p || c ? "" : " disabled") + '" data-selection="' + (s.year() + 6) + '">' + (s.year() + 1) + " - " + (s.year() + 12) + "</span>", s.add(12, "y"); 337 u += "<span></span><span></span><span></span>", n.find("td").html(u), o.eq(1).text(l.year() + 1 + "-" + s.year()) 338 }, 339 U = function() { 340 var t, n, o, s = h.find(".datepicker-days"), 341 d = s.find("th"), 342 l = [], 343 p = []; 344 if (S()) { 345 for (d.eq(0).find("span").attr("title", a.tooltips.prevMonth), d.eq(1).attr("title", a.tooltips.selectMonth), d.eq(2).find("span").attr("title", a.tooltips.nextMonth), s.find(".disabled").removeClass("disabled"), d.eq(1).text(i.format(a.dayViewHeaderFormat)), N(i.clone().subtract(1, "M"), "M") || d.eq(0).addClass("disabled"), N(i.clone().add(1, "M"), "M") || d.eq(2).addClass("disabled"), t = i.clone().startOf("M").startOf("w").startOf("d"), o = 0; o < 42; o++) 0 === t.weekday() && (n = e("<tr>"), a.calendarWeeks && n.append('<td class="cw">' + t.week() + "</td>"), l.push(n)), p = ["day"], t.isBefore(i, "M") && p.push("old"), t.isAfter(i, "M") && p.push("new"), t.isSame(r, "d") && !u && p.push("active"), N(t, "d") || p.push("disabled"), t.isSame(x(), "d") && p.push("today"), 0 !== t.day() && 6 !== t.day() || p.push("weekend"), q({ 346 type: "dp.classify", 347 date: t, 348 classNames: p 349 }), n.append('<td data-action="selectDay" data-day="' + t.format("L") + '" class="' + p.join(" ") + '"><div>' + t.date() + "</div></td>"), t.add(1, "d"); 350 s.find("tbody").empty().append(l), Z(), R(), Q() 351 } 352 }, 353 G = function() { 354 var t = h.find(".timepicker-hours table"), 355 n = i.clone().startOf("d"), 356 a = [], 357 r = e("<tr>"); 358 for (i.hour() > 11 && !s && n.hour(12); n.isSame(i, "d") && (s || i.hour() < 12 && n.hour() < 12 || i.hour() > 11);) n.hour() % 4 == 0 && (r = e("<tr>"), a.push(r)), r.append('<td data-action="selectHour" class="hour' + (N(n, "h") ? "" : " disabled") + '"><div>' + n.format(s ? "HH" : "hh") + "</div></td>"), n.add(1, "h"); 359 t.empty().append(a) 360 }, 361 J = function() { 362 for (var t = h.find(".timepicker-minutes table"), n = i.clone().startOf("h"), r = [], o = e("<tr>"), s = 1 === a.stepping ? 5 : a.stepping; i.isSame(n, "h");) n.minute() % (4 * s) == 0 && (o = e("<tr>"), r.push(o)), o.append('<td data-action="selectMinute" class="minute' + (N(n, "m") ? "" : " disabled") + '"><div>' + n.format("mm") + "</div></td>"), n.add(s, "m"); 363 t.empty().append(r) 364 }, 365 K = function() { 366 for (var t = h.find(".timepicker-seconds table"), n = i.clone().startOf("m"), a = [], r = e("<tr>"); i.isSame(n, "m");) n.second() % 20 == 0 && (r = e("<tr>"), a.push(r)), r.append('<td data-action="selectSecond" class="second' + (N(n, "s") ? "" : " disabled") + '"><div>' + n.format("ss") + "</div></td>"), n.add(5, "s"); 367 t.empty().append(a) 368 }, 369 X = function() { 370 var e, t, n = h.find(".timepicker span[data-time-component]"); 371 s || (e = h.find(".timepicker [data-action=togglePeriod]"), t = r.clone().add(r.hours() >= 12 ? -12 : 12, "h"), e.text(r.format("A")), N(t, "h") ? e.removeClass("disabled") : e.addClass("disabled")), n.filter("[data-time-component=hours]").text(r.format(s ? "HH" : "hh")), n.filter("[data-time-component=minutes]").text(r.format("mm")), n.filter("[data-time-component=seconds]").text(r.format("ss")), G(), J(), K() 372 }, 373 $ = function() { 374 h && (U(), X()) 375 }, 376 _ = function(e) { 377 var t = u ? null : r; 378 if (!e) return u = !0, o.val(""), n.data("date", ""), q({ 379 type: "dp.change", 380 date: !1, 381 oldDate: t 382 }), void $(); 383 if (e = e.clone().locale(a.locale), C() && e.tz(a.timeZone), 1 !== a.stepping) 384 for (e.minutes(Math.round(e.minutes() / a.stepping) * a.stepping).seconds(0); a.minDate && e.isBefore(a.minDate);) e.add(a.stepping, "minutes"); 385 N(e) ? (i = (r = e).clone(), o.val(r.format(d)), n.data("date", r.format(d)), u = !1, $(), q({ 386 type: "dp.change", 387 date: r.clone(), 388 oldDate: t 389 })) : (a.keepInvalid ? q({ 390 type: "dp.change", 391 date: e, 392 oldDate: t 393 }) : o.val(u ? "" : r.format(d)), q({ 394 type: "dp.error", 395 date: e, 396 oldDate: t 397 })) 398 }, 399 ee = function() { 400 var t = !1; 401 return h ? (h.find(".collapse").each(function() {
402 var n = e(this).data("collapse"); 403 return !n || !n.transitioning || (t = !0, !1) 404 }), t ? c : (f && f.hasClass("btn") && f.toggleClass("active"), e(window).off("resize", Y), h.off("click", "[data-action]"), h.off("mousedown", !1), h.removeClass("open"), void setTimeout(function() { 405 return h.remove(), h.hide(), h = !1, q({ 406 type: "dp.hide", 407 date: r.clone() 408 }), o.blur(), p = 0, i = r.clone(), c 409 }, 400))) : c 410 }, 411 te = function() { 412 _(null) 413 }, 414 ne = function(e) { 415 return void 0 === a.parseInputDate ? (!t.isMoment(e) || e instanceof Date) && (e = x(e)) : e = a.parseInputDate(e), e 416 }, 417 ae = { 418 next: function() { 419 var e = y[p].navFnc; 420 i.add(y[p].navStep, e), U(), B(e) 421 }, 422 previous: function() { 423 var e = y[p].navFnc; 424 i.subtract(y[p].navStep, e), U(), B(e) 425 }, 426 pickerSwitch: function() { 427 j(1) 428 }, 429 selectMonth: function(t) { 430 var n = e(t.target).closest("tbody").find("span").index(e(t.target)); 431 i.month(n), p === m ? (_(r.clone().year(i.year()).month(i.month())), a.inline || ee()) : (j(-1), U()), B("M") 432 }, 433 selectYear: function(t) { 434 var n = parseInt(e(t.target).text(), 10) || 0; 435 i.year(n), p === m ? (_(r.clone().year(i.year())), a.inline || ee()) : (j(-1), U()), B("YYYY") 436 }, 437 selectDecade: function(t) { 438 var n = parseInt(e(t.target).data("selection"), 10) || 0; 439 i.year(n), p === m ? (_(r.clone().year(i.year())), a.inline || ee()) : (j(-1), U()), B("YYYY") 440 }, 441 selectDay: function(t) { 442 var n = i.clone(); 443 e(t.target).is(".old") && n.subtract(1, "M"), e(t.target).is(".new") && n.add(1, "M"), _(n.date(parseInt(e(t.target).text(), 10))), M() || a.keepOpen || a.inline || ee() 444 }, 445 incrementHours: function() { 446 var e = r.clone().add(1, "h"); 447 N(e, "h") && _(e) 448 }, 449 incrementMinutes: function() { 450 var e = r.clone().add(a.stepping, "m"); 451 N(e, "m") && _(e) 452 }, 453 incrementSeconds: function() { 454 var e = r.clone().add(1, "s"); 455 N(e, "s") && _(e) 456 }, 457 decrementHours: function() { 458 var e = r.clone().subtract(1, "h"); 459 N(e, "h") && _(e) 460 }, 461 decrementMinutes: function() { 462 var e = r.clone().subtract(a.stepping, "m"); 463 N(e, "m") && _(e) 464 }, 465 decrementSeconds: function() { 466 var e = r.clone().subtract(1, "s"); 467 N(e, "s") && _(e) 468 }, 469 togglePeriod: function() { 470 _(r.clone().add(r.hours() >= 12 ? -12 : 12, "h")) 471 }, 472 togglePicker: function(t) { 473 var n, r = e(t.target), 474 i = r.closest("ul"), 475 o = i.find(".show"), 476 s = i.find(".collapse:not(.show)"); 477 if (o && o.length) { 478 if ((n = o.data("collapse")) && n.transitioning) return; 479 o.collapse ? (o.collapse("hide"), s.collapse("show")) : (o.removeClass("show"), s.addClass("show")), r.is("span") ? r.toggleClass(a.icons.time + " " + a.icons.date) : r.find("span").toggleClass(a.icons.time + " " + a.icons.date) 480 } 481 }, 482 showPicker: function() { 483 h.find(".timepicker > div:not(.timepicker-picker)").hide(), h.find(".timepicker .timepicker-picker").show() 484 }, 485 showHours: function() { 486 h.find(".timepicker .timepicker-picker").hide(), h.find(".timepicker .timepicker-hours").show() 487 }, 488 showMinutes: function() { 489 h.find(".timepicker .timepicker-picker").hide(), h.find(".timepicker .timepicker-minutes").show() 490 }, 491 showSeconds: function() { 492 h.find(".timepicker .timepicker-picker").hide(), h.find(".timepicker .timepicker-seconds").show() 493 }, 494 selectHour: function(t) { 495 var n = parseInt(e(t.target).text(), 10); 496 s || (r.hours() >= 12 ? 12 !== n && (n += 12) : 12 === n && (n = 0)), _(r.clone().hours(n)), ae.showPicker.call(c) 497 }, 498 selectMinute: function(t) { 499 _(r.clone().minutes(parseInt(e(t.target).text(), 10))), ae.showPicker.call(c) 500 }, 501 selectSecond: function(t) { 502 _(r.clone().seconds(parseInt(e(t.target).text(), 10))), ae.showPicker.call(c) 503 }, 504 clear: te, 505 today: function() { 506 var e = x(); 507 N(e, "d") && _(e) 508 }, 509 close: ee 510 }, 511 re = function(t) { 512 return !e(t.currentTarget).is(".disabled") && (ae[e(t.currentTarget).data("action")].apply(c, arguments), !1) 513 }, 514 ie = function() { 515 var t, n = { 516 year: function(e) { 517 return e.month(0).date(1).hours(0).seconds(0).minutes(0) 518 }, 519 month: function(e) { 520 return e.date(1).hours(0).seconds(0).minutes(0) 521 }, 522 day: function(e) { 523 return e.hours(0).seconds(0).minutes(0) 524 }, 525 hour: function(e) { 526 return e.seconds(0).minutes(0) 527 }, 528 minute: function(e) { 529 return e.seconds(0) 530 } 531 }; 532 return o.prop("disabled") || !a.ignoreReadonly && o.prop("readonly") || h ? c : (void 0 !== o.val() && 0 !== o.val().trim().length ? _(ne(o.val().trim())) : u && a.useCurrent && (a.inline || o.is("input") && 0 === o.val().trim().length) && (t = x(), "string" == typeof a.useCurrent && (t = n[a.useCurrent](t)), _(t)), h = I(), A(), V(), h.find(".timepicker-hours").hide(), h.find(".timepicker-minutes").hide(), h.find(".timepicker-seconds").hide(), $(), j(), e(window).on("resize", Y), h.on("click", "[data-action]", re), h.on("mousedown", !1), f && f.hasClass("btn") && f.toggleClass("active"), Y(), h.show(), a.focusOnShow && !o.is(":focus") && o.focus(), q({ 533 type: "dp.show" 534 }), c) 535 }, 536 oe = function() { 537 return h ? ee() : ie() 538 }, 539 se = function(e) { 540 var t, n, r, i, o = null, 541 s = [], 542 d = {}, 543 l = e.which; 544 D[l] = "p"; 545 for (t in D) D.hasOwnProperty(t) && "p" === D[t] && (s.push(t), parseInt(t, 10) !== l && (d[t] = !0)); 546 for (t in a.keyBinds) 547 if (a.keyBinds.hasOwnProperty(t) && "function" == typeof a.keyBinds[t] && (r = t.split(" ")).length === s.length && k[l] === r[r.length - 1]) { 548 for (i = !0, n = r.length - 2; n >= 0; n--) 549 if (!(k[r[n]] in d)) { 550 i = !1; 551 break 552 } 553 if (i) { 554 o = a.keyBinds[t]; 555 break 556 } 557 } 558 o && (o.call(c, h), e.stopPropagation(), e.preventDefault()) 559 }, 560 de = function(e) {
vendor: 23,895 bytes, lines 561-1011
561 D[e.which] = "r", e.stopPropagation(), e.preventDefault() 562 }, 563 le = function(t) { 564 var n = e(t.target).val().trim(), 565 a = n ? ne(n) : null; 566 return _(a), t.stopImmediatePropagation(), !1 567 }, 568 pe = function() { 569 o.off({ 570 change: le, 571 blur: blur, 572 keydown: se, 573 keyup: de, 574 focus: a.allowInputToggle ? ee : "" 575 }), n.is("input") ? o.off({ 576 focus: ie 577 }) : f && (f.off("click", oe), f.off("mousedown", !1)) 578 }, 579 ce = function(t) { 580 var n = {}; 581 return e.each(t, function() { 582 var e = ne(this); 583 e.isValid() && (n[e.format("YYYY-MM-DD")] = !0) 584 }), !!Object.keys(n).length && n 585 }, 586 ue = function(t) { 587 var n = {}; 588 return e.each(t, function() { 589 n[this] = !0 590 }), !!Object.keys(n).length && n 591 }, 592 fe = function() { 593 var e = a.format || "L LT"; 594 d = e.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function(e) { 595 return (r.localeData().longDateFormat(e) || e).replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function(e) { 596 return r.localeData().longDateFormat(e) || e 597 }) 598 }), (l = a.extraFormats ? a.extraFormats.slice() : []).indexOf(e) < 0 && l.indexOf(d) < 0 && l.push(d), s = d.toLowerCase().indexOf("a") < 1 && d.replace(/\[.*?\]/g, "").indexOf("h") < 1, T("y") && (m = 2), T("M") && (m = 1), T("d") && (m = 0), p = Math.max(m, p), u || _(r) 599 }; 600 if (c.destroy = function() { 601 ee(), pe(), n.removeData("DateTimePicker"), n.removeData("date") 602 }, c.toggle = oe, c.show = ie, c.hide = ee, c.disable = function() { 603 return ee(), f && f.hasClass("btn") && f.addClass("disabled"), o.prop("disabled", !0), c 604 }, c.enable = function() { 605 return f && f.hasClass("btn") && f.removeClass("disabled"), o.prop("disabled", !1), c 606 }, c.ignoreReadonly = function(e) { 607 if (0 === arguments.length) return a.ignoreReadonly; 608 if ("boolean" != typeof e) throw new TypeError("ignoreReadonly () expects a boolean parameter"); 609 return a.ignoreReadonly = e, c 610 }, c.options = function(t) { 611 if (0 === arguments.length) return e.extend(!0, {}, a); 612 if (!(t instanceof Object)) throw new TypeError("options() options parameter should be an object"); 613 return e.extend(!0, a, t), e.each(a, function(e, t) { 614 if (void 0 === c[e]) throw new TypeError("option " + e + " is not recognized!"); 615 c[e](t) 616 }), c 617 }, c.date = function(e) { 618 if (0 === arguments.length) return u ? null : r.clone(); 619 if (!(null === e || "string" == typeof e || t.isMoment(e) || e instanceof Date)) throw new TypeError("date() parameter must be one of [null, string, moment or Date]"); 620 return _(null === e ? null : ne(e)), c 621 }, c.format = function(e) { 622 if (0 === arguments.length) return a.format; 623 if ("string" != typeof e && ("boolean" != typeof e || !1 !== e)) throw new TypeError("format() expects a string or boolean:false parameter " + e); 624 return a.format = e, d && fe(), c 625 }, c.timeZone = function(e) { 626 if (0 === arguments.length) return a.timeZone; 627 if ("string" != typeof e) throw new TypeError("newZone() expects a string parameter"); 628 return a.timeZone = e, c 629 }, c.dayViewHeaderFormat = function(e) { 630 if (0 === arguments.length) return a.dayViewHeaderFormat; 631 if ("string" != typeof e) throw new TypeError("dayViewHeaderFormat() expects a string parameter"); 632 return a.dayViewHeaderFormat = e, c 633 }, c.extraFormats = function(e) { 634 if (0 === arguments.length) return a.extraFormats; 635 if (!1 !== e && !(e instanceof Array)) throw new TypeError("extraFormats() expects an array or false parameter"); 636 return a.extraFormats = e, l && fe(), c 637 }, c.disabledDates = function(t) { 638 if (0 === arguments.length) return a.disabledDates ? e.extend({}, a.disabledDates) : a.disabledDates; 639 if (!t) return a.disabledDates = !1, $(), c; 640 if (!(t instanceof Array)) throw new TypeError("disabledDates() expects an array parameter"); 641 return a.disabledDates = ce(t), a.enabledDates = !1, $(), c 642 }, c.enabledDates = function(t) { 643 if (0 === arguments.length) return a.enabledDates ? e.extend({}, a.enabledDates) : a.enabledDates; 644 if (!t) return a.enabledDates = !1, $(), c; 645 if (!(t instanceof Array)) throw new TypeError("enabledDates() expects an array parameter"); 646 return a.enabledDates = ce(t), a.disabledDates = !1, $(), c 647 }, c.daysOfWeekDisabled = function(e) { 648 if (0 === arguments.length) return a.daysOfWeekDisabled.splice(0); 649 if ("boolean" == typeof e && !e) return a.daysOfWeekDisabled = !1, $(), c; 650 if (!(e instanceof Array)) throw new TypeError("daysOfWeekDisabled() expects an array parameter"); 651 if (a.daysOfWeekDisabled = e.reduce(function(e, t) { 652 return (t = parseInt(t, 10)) > 6 || t < 0 || isNaN(t) ? e : (-1 === e.indexOf(t) && e.push(t), e) 653 }, []).sort(), a.useCurrent && !a.keepInvalid) { 654 for (var t = 0; !N(r, "d");) { 655 if (r.add(1, "d"), 31 === t) throw "Tried 31 times to find a valid date"; 656 t++ 657 } 658 _(r) 659 } 660 return $(), c 661 }, c.maxDate = function(e) { 662 if (0 === arguments.length) return a.maxDate ? a.maxDate.clone() : a.maxDate; 663 if ("boolean" == typeof e && !1 === e) return a.maxDate = !1, $(), c; 664 "string" == typeof e && ("now" !== e && "moment" !== e || (e = x())); 665 var t = ne(e); 666 if (!t.isValid()) throw new TypeError("maxDate() Could not parse date parameter: " + e); 667 if (a.minDate && t.isBefore(a.minDate)) throw new TypeError("maxDate() date parameter is before options.minDate: " + t.format(d)); 668 return a.maxDate = t, a.useCurrent && !a.keepInvalid && r.isAfter(e) && _(a.maxDate), i.isAfter(t) && (i = t.clone().subtract(a.stepping, "m")), $(), c 669 }, c.minDate = function(e) { 670 if (0 === arguments.length) return a.minDate ? a.minDate.clone() : a.minDate; 671 if ("boolean" == typeof e && !1 === e) return a.minDate = !1, $(), c; 672 "string" == typeof e && ("now" !== e && "moment" !== e || (e = x())); 673 var t = ne(e); 674 if (!t.isValid()) throw new TypeError("minDate() Could not parse date parameter: " + e); 675 if (a.maxDate && t.isAfter(a.maxDate)) throw new TypeError("minDate() date parameter is after options.maxDate: " + t.format(d)); 676 return a.minDate = t, a.useCurrent && !a.keepInvalid && r.isBefore(e) && _(a.minDate), i.isBefore(t) && (i = t.clone().add(a.stepping, "m")), $(), c 677 }, c.defaultDate = function(e) { 678 if (0 === arguments.length) return a.defaultDate ? a.defaultDate.clone() : a.defaultDate; 679 if (!e) return a.defaultDate = !1, c; 680 "string" == typeof e && (e = "now" === e || "moment" === e ? x() : x(e)); 681 var t = ne(e); 682 if (!t.isValid()) throw new TypeError("defaultDate() Could not parse date parameter: " + e); 683 if (!N(t)) throw new TypeError("defaultDate() date passed is invalid according to component setup validations"); 684 return a.defaultDate = t, (a.defaultDate && a.inline || "" === o.val().trim()) && _(a.defaultDate), c 685 }, c.locale = function(e) { 686 if (0 === arguments.length) return a.locale; 687 if (!t.localeData(e)) throw new TypeError("locale() locale " + e + " is not loaded from moment locales!"); 688 return a.locale = e, r.locale(a.locale), i.locale(a.locale), d && fe(), h && (ee(), ie()), c 689 }, c.stepping = function(e) { 690 return 0 === arguments.length ? a.stepping : (e = parseInt(e, 10), (isNaN(e) || e < 1) && (e = 1), a.stepping = e, c) 691 }, c.useCurrent = function(e) { 692 var t = ["year", "month", "day", "hour", "minute"]; 693 if (0 === arguments.length) return a.useCurrent; 694 if ("boolean" != typeof e && "string" != typeof e) throw new TypeError("useCurrent() expects a boolean or string parameter"); 695 if ("string" == typeof e && -1 === t.indexOf(e.toLowerCase())) throw new TypeError("useCurrent() expects a string parameter of " + t.join(", ")); 696 return a.useCurrent = e, c 697 }, c.collapse = function(e) { 698 if (0 === arguments.length) return a.collapse; 699 if ("boolean" != typeof e) throw new TypeError("collapse() expects a boolean parameter"); 700 return a.collapse === e ? c : (a.collapse = e, h && (ee(), ie()), c) 701 }, c.icons = function(t) { 702 if (0 === arguments.length) return e.extend({}, a.icons); 703 if (!(t instanceof Object)) throw new TypeError("icons() expects parameter to be an Object"); 704 return e.extend(a.icons, t), h && (ee(), ie()), c 705 }, c.tooltips = function(t) { 706 if (0 === arguments.length) return e.extend({}, a.tooltips); 707 if (!(t instanceof Object)) throw new TypeError("tooltips() expects parameter to be an Object"); 708 return e.extend(a.tooltips, t), h && (ee(), ie()), c 709 }, c.useStrict = function(e) { 710 if (0 === arguments.length) return a.useStrict; 711 if ("boolean" != typeof e) throw new TypeError("useStrict() expects a boolean parameter"); 712 return a.useStrict = e, c 713 }, c.sideBySide = function(e) { 714 if (0 === arguments.length) return a.sideBySide; 715 if ("boolean" != typeof e) throw new TypeError("sideBySide() expects a boolean parameter"); 716 return a.sideBySide = e, h && (ee(), ie()), c 717 }, c.viewMode = function(e) { 718 if (0 === arguments.length) return a.viewMode; 719 if ("string" != typeof e) throw new TypeError("viewMode() expects a string parameter"); 720 if (-1 === b.indexOf(e)) throw new TypeError("viewMode() parameter must be one of (" + b.join(", ") + ") value"); 721 return a.viewMode = e, p = Math.max(b.indexOf(e), m), j(), c 722 }, c.toolbarPlacement = function(e) { 723 if (0 === arguments.length) return a.toolbarPlacement; 724 if ("string" != typeof e) throw new TypeError("toolbarPlacement() expects a string parameter"); 725 if (-1 === v.indexOf(e)) throw new TypeError("toolbarPlacement() parameter must be one of (" + v.join(", ") + ") value"); 726 return a.toolbarPlacement = e, h && (ee(), ie()), c 727 }, c.widgetPositioning = function(t) { 728 if (0 === arguments.length) return e.extend({}, a.widgetPositioning); 729 if ("[object Object]" !== {}.toString.call(t)) throw new TypeError("widgetPositioning() expects an object variable"); 730 if (t.horizontal) { 731 if ("string" != typeof t.horizontal) throw new TypeError("widgetPositioning() horizontal variable must be a string"); 732 if (t.horizontal = t.horizontal.toLowerCase(), -1 === w.indexOf(t.horizontal)) throw new TypeError("widgetPositioning() expects horizontal parameter to be one of (" + w.join(", ") + ")"); 733 a.widgetPositioning.horizontal = t.horizontal 734 } 735 if (t.vertical) { 736 if ("string" != typeof t.vertical) throw new TypeError("widgetPositioning() vertical variable must be a string"); 737 if (t.vertical = t.vertical.toLowerCase(), -1 === g.indexOf(t.vertical)) throw new TypeError("widgetPositioning() expects vertical parameter to be one of (" + g.join(", ") + ")"); 738 a.widgetPositioning.vertical = t.vertical 739 } 740 return $(), c 741 }, c.calendarWeeks = function(e) { 742 if (0 === arguments.length) return a.calendarWeeks; 743 if ("boolean" != typeof e) throw new TypeError("calendarWeeks() expects parameter to be a boolean value"); 744 return a.calendarWeeks = e, $(), c 745 }, c.showTodayButton = function(e) { 746 if (0 === arguments.length) return a.showTodayButton; 747 if ("boolean" != typeof e) throw new TypeError("showTodayButton() expects a boolean parameter"); 748 return a.showTodayButton = e, h && (ee(), ie()), c 749 }, c.showClear = function(e) { 750 if (0 === arguments.length) return a.showClear; 751 if ("boolean" != typeof e) throw new TypeError("showClear() expects a boolean parameter"); 752 return a.showClear = e, h && (ee(), ie()), c 753 }, c.widgetParent = function(t) { 754 if (0 === arguments.length) return a.widgetParent; 755 if ("string" == typeof t && (t = e(t)), null !== t && "string" != typeof t && !(t instanceof e)) throw new TypeError("widgetParent() expects a string or a jQuery object parameter"); 756 return a.widgetParent = t, h && (ee(), ie()), c 757 }, c.keepOpen = function(e) { 758 if (0 === arguments.length) return a.keepOpen; 759 if ("boolean" != typeof e) throw new TypeError("keepOpen() expects a boolean parameter"); 760 return a.keepOpen = e, c 761 }, c.focusOnShow = function(e) { 762 if (0 === arguments.length) return a.focusOnShow; 763 if ("boolean" != typeof e) throw new TypeError("focusOnShow() expects a boolean parameter"); 764 return a.focusOnShow = e, c 765 }, c.inline = function(e) { 766 if (0 === arguments.length) return a.inline; 767 if ("boolean" != typeof e) throw new TypeError("inline() expects a boolean parameter"); 768 return a.inline = e, c 769 }, c.clear = function() { 770 return te(), c 771 }, c.keyBinds = function(e) { 772 return 0 === arguments.length ? a.keyBinds : (a.keyBinds = e, c) 773 }, c.getMoment = function(e) { 774 return x(e) 775 }, c.debug = function(e) { 776 if ("boolean" != typeof e) throw new TypeError("debug() expects a boolean parameter"); 777 return a.debug = e, c 778 }, c.allowInputToggle = function(e) { 779 if (0 === arguments.length) return a.allowInputToggle; 780 if ("boolean" != typeof e) throw new TypeError("allowInputToggle() expects a boolean parameter"); 781 return a.allowInputToggle = e, c 782 }, c.showClose = function(e) { 783 if (0 === arguments.length) return a.showClose; 784 if ("boolean" != typeof e) throw new TypeError("showClose() expects a boolean parameter"); 785 return a.showClose = e, c 786 }, c.keepInvalid = function(e) { 787 if (0 === arguments.length) return a.keepInvalid; 788 if ("boolean" != typeof e) throw new TypeError("keepInvalid() expects a boolean parameter"); 789 return a.keepInvalid = e, c 790 }, c.datepickerInput = function(e) { 791 if (0 === arguments.length) return a.datepickerInput; 792 if ("string" != typeof e) throw new TypeError("datepickerInput() expects a string parameter"); 793 return a.datepickerInput = e, c 794 }, c.parseInputDate = function(e) { 795 if (0 === arguments.length) return a.parseInputDate; 796 if ("function" != typeof e) throw new TypeError("parseInputDate() sholud be as function"); 797 return a.parseInputDate = e, c 798 }, c.disabledTimeIntervals = function(t) { 799 if (0 === arguments.length) return a.disabledTimeIntervals ? e.extend({}, a.disabledTimeIntervals) : a.disabledTimeIntervals; 800 if (!t) return a.disabledTimeIntervals = !1, $(), c; 801 if (!(t instanceof Array)) throw new TypeError("disabledTimeIntervals() expects an array parameter"); 802 return a.disabledTimeIntervals = t, $(), c 803 }, c.disabledHours = function(t) { 804 if (0 === arguments.length) return a.disabledHours ? e.extend({}, a.disabledHours) : a.disabledHours; 805 if (!t) return a.disabledHours = !1, $(), c; 806 if (!(t instanceof Array)) throw new TypeError("disabledHours() expects an array parameter"); 807 if (a.disabledHours = ue(t), a.enabledHours = !1, a.useCurrent && !a.keepInvalid) { 808 for (var n = 0; !N(r, "h");) { 809 if (r.add(1, "h"), 24 === n) throw "Tried 24 times to find a valid date"; 810 n++ 811 } 812 _(r) 813 } 814 return $(), c 815 }, c.enabledHours = function(t) { 816 if (0 === arguments.length) return a.enabledHours ? e.extend({}, a.enabledHours) : a.enabledHours; 817 if (!t) return a.enabledHours = !1, $(), c; 818 if (!(t instanceof Array)) throw new TypeError("enabledHours() expects an array parameter"); 819 if (a.enabledHours = ue(t), a.disabledHours = !1, a.useCurrent && !a.keepInvalid) { 820 for (var n = 0; !N(r, "h");) { 821 if (r.add(1, "h"), 24 === n) throw "Tried 24 times to find a valid date"; 822 n++ 823 } 824 _(r) 825 } 826 return $(), c 827 }, c.viewDate = function(e) { 828 if (0 === arguments.length) return i.clone(); 829 if (!e) return i = r.clone(), c; 830 if (!("string" == typeof e || t.isMoment(e) || e instanceof Date)) throw new TypeError("viewDate() parameter must be one of [string, moment or Date]"); 831 return i = ne(e), B(), c 832 }, n.is("input")) o = n; 833 else if (0 === (o = n.find(a.datepickerInput)).length) o = n.find("input"); 834 else if (!o.is("input")) throw new Error('CSS class "' + a.datepickerInput + '" cannot be applied to non input element'); 835 if (n.hasClass("input-group") && (f = 0 === n.find(".datepickerbutton").length ? n.find(".input-group-addon") : n.find(".datepickerbutton")), !a.inline && !o.is("input")) throw new Error("Could not initialize DateTimePicker without an input element"); 836 return r = x(), i = r.clone(), e.extend(!0, a, function() { 837 var t, r = {}; 838 return (t = n.is("input") || a.inline ? n.data() : n.find("input").data()).dateOptions && t.dateOptions instanceof Object && (r = e.extend(!0, r, t.dateOptions)), e.each(a, function(e) { 839 var n = "date" + e.charAt(0).toUpperCase() + e.slice(1); 840 void 0 !== t[n] && (r[e] = t[n]) 841 }), r 842 }()), c.options(a), fe(), o.on({ 843 change: le, 844 blur: a.debug ? "" : ee, 845 keydown: se, 846 keyup: de, 847 focus: a.allowInputToggle ? ie : "" 848 }), n.is("input") ? o.on({ 849 focus: ie 850 }) : f && (f.on("click", oe), f.on("mousedown", !1)), o.prop("disabled") && c.disable(), o.is("input") && 0 !== o.val().trim().length ? _(ne(o.val().trim())) : a.defaultDate && void 0 === o.attr("placeholder") && _(a.defaultDate), a.inline && ie(), c 851 }; 852 return e.fn.datetimepicker = function(t) { 853 t = t || {}; 854 var a, r = Array.prototype.slice.call(arguments, 1), 855 i = !0, 856 o = ["destroy", "hide", "show", "toggle"]; 857 if ("object" == typeof t) return this.each(function() { 858 var a, r = e(this); 859 r.data("DateTimePicker") || (a = e.extend(!0, {}, e.fn.datetimepicker.defaults, t), r.data("DateTimePicker", n(r, a))) 860 }); 861 if ("string" == typeof t) return this.each(function() { 862 var n = e(this).data("DateTimePicker"); 863 if (!n) throw new Error('bootstrap-datetimepicker("' + t + '") method was called on an element that is not using DateTimePicker'); 864 a = n[t].apply(n, r), i = a === n 865 }), i || e.inArray(t, o) > -1 ? this : a; 866 throw new TypeError("Invalid arguments for DateTimePicker: " + t) 867 }, e.fn.datetimepicker.defaults = { 868 timeZone: "", 869 format: !1, 870 dayViewHeaderFormat: "MMMM YYYY", 871 extraFormats: !1, 872 stepping: 1, 873 minDate: !1, 874 maxDate: !1, 875 useCurrent: !0, 876 collapse: !0, 877 locale: t.locale(), 878 defaultDate: !1, 879 disabledDates: !1, 880 enabledDates: !1, 881 icons: { 882 time: "glyphicon glyphicon-time", 883 date: "glyphicon glyphicon-calendar", 884 up: "glyphicon glyphicon-chevron-up", 885 down: "glyphicon glyphicon-chevron-down", 886 previous: "glyphicon glyphicon-chevron-left", 887 next: "glyphicon glyphicon-chevron-right", 888 today: "glyphicon glyphicon-screenshot", 889 clear: "glyphicon glyphicon-trash", 890 close: "glyphicon glyphicon-remove" 891 }, 892 tooltips: { 893 today: "Go to today", 894 clear: "Clear selection", 895 close: "Close the picker", 896 selectMonth: "Select Month", 897 prevMonth: "Previous Month", 898 nextMonth: "Next Month", 899 selectYear: "Select Year", 900 prevYear: "Previous Year", 901 nextYear: "Next Year", 902 selectDecade: "Select Decade", 903 prevDecade: "Previous Decade", 904 nextDecade: "Next Decade", 905 prevCentury: "Previous Century", 906 nextCentury: "Next Century", 907 pickHour: "Pick Hour", 908 incrementHour: "Increment Hour", 909 decrementHour: "Decrement Hour", 910 pickMinute: "Pick Minute", 911 incrementMinute: "Increment Minute", 912 decrementMinute: "Decrement Minute", 913 pickSecond: "Pick Second", 914 incrementSecond: "Increment Second", 915 decrementSecond: "Decrement Second", 916 togglePeriod: "Toggle Period", 917 selectTime: "Select Time" 918 }, 919 useStrict: !1, 920 sideBySide: !1, 921 daysOfWeekDisabled: !1, 922 calendarWeeks: !1, 923 viewMode: "days", 924 toolbarPlacement: "default", 925 showTodayButton: !1, 926 showClear: !1, 927 showClose: !1, 928 widgetPositioning: { 929 horizontal: "auto", 930 vertical: "auto" 931 }, 932 widgetParent: null, 933 ignoreReadonly: !1, 934 keepOpen: !1, 935 focusOnShow: !0, 936 inline: !1, 937 keepInvalid: !1, 938 datepickerInput: ".datepickerinput", 939 keyBinds: { 940 up: function(e) { 941 if (e) { 942 var t = this.date() || this.getMoment(); 943 e.find(".datepicker").is(":visible") ? this.date(t.clone().subtract(7, "d")) : this.date(t.clone().add(this.stepping(), "m")) 944 } 945 }, 946 down: function(e) { 947 if (e) { 948 var t = this.date() || this.getMoment(); 949 e.find(".datepicker").is(":visible") ? this.date(t.clone().add(7, "d")) : this.date(t.clone().subtract(this.stepping(), "m")) 950 } else this.show() 951 }, 952 "control up": function(e) { 953 if (e) { 954 var t = this.date() || this.getMoment(); 955 e.find(".datepicker").is(":visible") ? this.date(t.clone().subtract(1, "y")) : this.date(t.clone().add(1, "h")) 956 } 957 }, 958 "control down": function(e) { 959 if (e) { 960 var t = this.date() || this.getMoment(); 961 e.find(".datepicker").is(":visible") ? this.date(t.clone().add(1, "y")) : this.date(t.clone().subtract(1, "h")) 962 } 963 }, 964 left: function(e) { 965 if (e) { 966 var t = this.date() || this.getMoment(); 967 e.find(".datepicker").is(":visible") && this.date(t.clone().subtract(1, "d")) 968 } 969 }, 970 right: function(e) { 971 if (e) { 972 var t = this.date() || this.getMoment(); 973 e.find(".datepicker").is(":visible") && this.date(t.clone().add(1, "d")) 974 } 975 }, 976 pageUp: function(e) { 977 if (e) { 978 var t = this.date() || this.getMoment(); 979 e.find(".datepicker").is(":visible") && this.date(t.clone().subtract(1, "M")) 980 } 981 }, 982 pageDown: function(e) { 983 if (e) { 984 var t = this.date() || this.getMoment(); 985 e.find(".datepicker").is(":visible") && this.date(t.clone().add(1, "M")) 986 } 987 }, 988 enter: function() { 989 this.hide() 990 }, 991 escape: function() { 992 this.hide() 993 }, 994 "control space": function(e) { 995 e && e.find(".timepicker").is(":visible") && e.find('.btn[data-action="togglePeriod"]').click() 996 }, 997 t: function() { 998 this.date(this.getMoment()) 999 }, 1000 delete: function() { 1001 this.clear() 1002 } 1003 }, 1004 debug: !1, 1005 allowInputToggle: !1, 1006 disabledTimeIntervals: !1, 1007 disabledHours: !1, 1008 enabledHours: !1, 1009 viewDate: !1 1010 }, e.fn.datetimepicker 1011});
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.