PageSourceSearch

https://vnbuy.vn/Scripts/js/ui.datepicker.lunar.min.js

js vnbuy.vn collected 2026-10-10 00:31:02 UTC 43,372 bytes, 1 lines download raw bytes

1!function ($) { $.extend($.ui, { datepickerlunar: { version: "1.7.2" } }); var PROP_NAME = "datepickerlunar"; function DatepickerLunar() { this.debug = !1, this._curInst = null, this._keyEvent = !1, this._disabledInputs = [], this._datepickerShowing = !1, this._inDialog = !1, this._mainDivId = "ui-datepicker-div", this._inlineClass = "ui-datepicker-inline", this._appendClass = "ui-datepicker-append", this._triggerClass = "ui-datepicker-trigger", this._dialogClass = "ui-datepicker-dialog", this._disableClass = "ui-datepicker-disabled", this._unselectableClass = "ui-datepicker-unselectable", this._currentClass = "ui-datepicker-current-day", this._dayOverClass = "ui-datepicker-days-cell-over", this.regional = [], this.regional["vi-VN"] = { closeText: "Thoát", prevText: "", nextText: "", currentText: "Hôm nay", monthNames: ["Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12"], monthNamesShort: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], dayNames: ["Chủ nhật", "Thứ 2", "Thứ 3", "Thứ 4", "Thứ 5", "Thứ 6", "Thứ 7"], dayNamesShort: ["Chủ nhật", "Thứ 2", "Thứ 3", "Thứ 4", "Thứ 5", "Thứ 6", "Thứ 7"], dayNamesMin: ["CN", "T2", "T3", "T4", "T5", "T6", "T7"], dateFormat: "dd/mm/yy", firstDay: 1, isRTL: !1 }, this._defaults = { showOn: "focus", showAnim: "show", showOptions: {}, defaultDate: null, appendText: "", buttonText: "...", buttonImage: "", buttonImageOnly: !1, hideIfNoPrevNext: !1, navigationAsDateFormat: !1, gotoCurrent: !1, changeMonth: !1, changeYear: !1, showMonthAfterYear: !1, yearRange: "-10:+10", showOtherMonths: !1, calculateWeek: this.iso8601Week, shortYearCutoff: "+10", minDate: null, maxDate: null, duration: "normal", beforeShowDay: null, beforeShow: null, onSelect: null, onChangeMonthYear: null, onClose: null, numberOfMonths: 1, showCurrentAtPos: 0, stepMonths: 1, stepBigMonths: 12, altField: "", altFormat: "", constrainInput: !0, showButtonPanel: !1 }, $.extend(this._defaults, this.regional["vi-VN"]), this.dpDiv = $('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>') } $.extend(DatepickerLunar.prototype, { markerClassName: "hasDatepicker", log: function () { this.debug && console.log.apply("", arguments) }, setDefaults: function (t) { return extendRemove(this._defaults, t || {}), this }, _attachDatepicker: function (target, settings) { var inlineSettings = null; for (var attrName in this._defaults) { var attrValue = target.getAttribute("date:" + attrName); if (attrValue) { inlineSettings = inlineSettings || {}; try { inlineSettings[attrName] = eval(attrValue) } catch (t) { inlineSettings[attrName] = attrValue } } } var nodeName = target.nodeName.toLowerCase(), inline = "div" == nodeName || "span" == nodeName; target.id || (target.id = "dp" + ++this.uuid); var inst = this._newInst($(target), inline); inst.settings = $.extend({}, settings || {}, inlineSettings || {}), "input" == nodeName ? this._connectDatepicker(target, inst) : inline && this._inlineDatepicker(target, inst) }, _newInst: function (t, e) { return { id: t[0].id.replace(/([:\[\]\.])/g, "\\\\$1"), input: t, selectedDay: 0, selectedMonth: 0, selectedYear: 0, drawMonth: 0, drawYear: 0, inline: e, dpDiv: e ? $('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>') : this.dpDiv } }, _connectDatepicker: function (t, e) { var a = $(t); if (e.append = $([]), e.trigger = $([]), !a.hasClass(this.markerClassName)) { var i = this._get(e, "appendText"), n = this._get(e, "isRTL"); i && (e.append = $('<span class="' + this._appendClass + '">' + i + "</span>"), a[n ? "before" : "after"](e.append)); var r = this._get(e, "showOn"); if ("focus" != r && "both" != r || a.focus(this._showDatepicker), "button" == r || "both" == r) { var s = this._get(e, "buttonText"), l = this._get(e, "buttonImage"); e.trigger = $(this._get(e, "buttonImageOnly") ? $("<img/>").addClass(this._triggerClass).attr({ src: l, alt: s, title: s }) : $('<button type="button"></button>').addClass(this._triggerClass).html("" == l ? s : $("<img/>").attr({ src: l, alt: s, title: s }))), a[n ? "before" : "after"](e.trigger), e.trigger.click(function () { return $.datepickerlunar._datepickerShowing && $.datepickerlunar._lastInput == t ? $.datepickerlunar._hideDatepicker() : $.datepickerlunar._showDatepicker(t), !1 }) } a.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker", function (t, a, i) { e.settings[a] = i }).bind("getData.datepicker", function (t, a) { return this._get(e, a) }), $.data(t, PROP_NAME, e) } }, _inlineDatepicker: function (t, e) { var a = $(t); a.hasClass(this.markerClassName) || (a.addClass(this.markerClassName).append(e.dpDiv).bind("setData.datepicker", function (t, a, i) { e.settings[a] = i }).bind("getData.datepicker", function (t, a) { return this._get(e, a) }), $.data(t, PROP_NAME, e), this._setDate(e, this._getDefaultDate(e)), this._updateDatepicker(e), this._updateAlternate(e)) }, _dialogDatepicker: function (t, e, a, i, n) { var r = this._dialogInst; if (!r) { var s = "dp" + ++this.uuid; this._dialogInput = $('<input type="text" id="' + s + '" size="1" style="position: absolute; top: -100px;"/>'), this._dialogInput.keydown(this._doKeyDown), $("body").append(this._dialogInput), (r = this._dialogInst = this._newInst(this._dialogInput, !1)).settings = {}, $.data(this._dialogInput[0], PROP_NAME, r) } if (extendRemove(r.settings, i || {}
1), this._dialogInput.val(e), this._pos = n ? n.length ? n : [n.pageX, n.pageY] : null, !this._pos) { var l = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, o = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight, d = document.documentElement.scrollLeft || document.body.scrollLeft, u = document.documentElement.scrollTop || document.body.scrollTop; this._pos = [l / 2 - 100 + d, o / 2 - 150 + u] } return this._dialogInput.css("left", this._pos[0] + "px").css("top", this._pos[1] + "px"), r.settings.onSelect = a, this._inDialog = !0, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(this._dialogInput[0]), $.blockUI && $.blockUI(this.dpDiv), $.data(this._dialogInput[0], PROP_NAME, r), this }, _destroyDatepicker: function (t) { var e = $(t), a = $.data(t, PROP_NAME); if (e.hasClass(this.markerClassName)) { var i = t.nodeName.toLowerCase(); $.removeData(t, PROP_NAME), "input" == i ? (a.append.remove(), a.trigger.remove(), e.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress)) : "div" != i && "span" != i || e.removeClass(this.markerClassName).empty() } }, _enableDatepicker: function (t) { var e = $(t), a = $.data(t, PROP_NAME); if (e.hasClass(this.markerClassName)) { var i = t.nodeName.toLowerCase(); if ("input" == i) t.disabled = !1, a.trigger.filter("button").each(function () { this.disabled = !1 }).end().filter("img").css({ opacity: "1.0", cursor: "" }); else if ("div" == i || "span" == i) e.children("." + this._inlineClass).children().removeClass("ui-state-disabled"); this._disabledInputs = $.map(this._disabledInputs, function (e) { return e == t ? null : e }) } }, _disableDatepicker: function (t) { var e = $(t), a = $.data(t, PROP_NAME); if (e.hasClass(this.markerClassName)) { var i = t.nodeName.toLowerCase(); if ("input" == i) t.disabled = !0, a.trigger.filter("button").each(function () { this.disabled = !0 }).end().filter("img").css({ opacity: "0.5", cursor: "default" }); else if ("div" == i || "span" == i) e.children("." + this._inlineClass).children().addClass("ui-state-disabled"); this._disabledInputs = $.map(this._disabledInputs, function (e) { return e == t ? null : e }), this._disabledInputs[this._disabledInputs.length] = t } }, _isDisabledDatepicker: function (t) { if (!t) return !1; for (var e = 0; e < this._disabledInputs.length; e++)if (this._disabledInputs[e] == t) return !0; return !1 }, _getInst: function (t) { try { return $.data(t, PROP_NAME) } catch (t) { throw "Missing instance data for this datepicker" } }, _optionDatepicker: function (t, e, a) { var i = this._getInst(t); if (2 == arguments.length && "string" == typeof e) return "defaults" == e ? $.extend({}, $.datepickerlunar._defaults) : i ? "all" == e ? $.extend({}, i.settings) : this._get(i, e) : null; var n = e || {}; if ("string" == typeof e && ((n = {})[e] = a), i) { this._curInst == i && this._hideDatepicker(null); var r = this._getDateDatepicker(t); extendRemove(i.settings, n), this._setDateDatepicker(t, r), this._updateDatepicker(i) } }, _changeDatepicker: function (t, e, a) { this._optionDatepicker(t, e, a) }, _refreshDatepicker: function (t) { var e = this._getInst(t); e && this._updateDatepicker(e) }, _setDateDatepicker: function (t, e, a) { var i = this._getInst(t); i && (this._setDate(i, e, a), this._updateDatepicker(i), this._updateAlternate(i)) }, _getDateDatepicker: function (t) { var e = this._getInst(t); return e && !e.inline && this._setDateFromField(e), e ? this._getDate(e) : null }, _doKeyDown: function (t) { var e = $.datepickerlunar._getInst(t.target), a = !0, i = e.dpDiv.is(".ui-datepicker-rtl"); if (e._keyEvent = !0, $.datepickerlunar._datepickerShowing) switch (t.keyCode) { case 9: $.datepickerlunar._hideDatepicker(null, ""); break; case 13: var n = $("td." + $.datepickerlunar._dayOverClass + ", td." + $.datepickerlunar._currentClass, e.dpDiv); return n[0] ? $.datepickerlunar._selectDay(t.target, e.selectedMonth, e.selectedYear, n[0]) : $.datepickerlunar._hideDatepicker(null, $.datepickerlunar._get(e, "duration")), !1; case 27: $.datepickerlunar._hideDatepicker(null, $.datepickerlunar._get(e, "duration")); break; case 33: $.datepickerlunar._adjustDate(t.target, t.ctrlKey ? -$.datepickerlunar._get(e, "stepBigMonths") : -$.datepickerlunar._get(e, "stepMonths"), "M"); break; case 34: $.datepickerlunar._adjustDate(t.target, t.ctrlKey ? +$.datepickerlunar._get(e, "stepBigMonths") : +$.datepickerlunar._get(e, "stepMonths"), "M"); break; case 35: (t.ctrlKey || t.metaKey) && $.datepickerlunar._clearDate(t.target), a = t.ctrlKey || t.metaKey; break; case 36: (t.ctrlKey || t.metaKey) && $.datepickerlunar._gotoToday(t.target), a = t.ctrlKey || t.metaKey; break; case 37: (t.ctrlKey || t.metaKey) && $.datepickerlunar._adjustDate(t.target, i ? 1 : -1, "D"), a = t.ctrlKey || t.metaKey, t.originalEvent.altKey && $.datepickerlunar._adjustDate(t.target, t.ctrlKey ? -$.datepickerlunar._get(e, "stepBigMonths") : -$.datepickerlunar._get(e, "stepMonths"), "M"); break; case 38: (t.ctrlKey || t.metaKey) && $.datepickerlunar._adjustDate(t.target, -7, "D"), a = t.ctrlKey || t.metaKey; break; case 39: (t.ctrlKey || t.metaKey) && $.datepickerlunar._adjustDate(t.target, i ? -1 : 1, "D"), a = t.ctrlKey || t.metaKey, t.originalEvent.altKey && $.datepickerlunar._adjustDate(t.target, t.ctrlKey ? +$.datepickerlunar._get(e, "stepBigMonths") : +$.datepickerlunar._get(e, "stepMonths"), "M"); break; case 40: (t.ctrlKey || t.metaKey) && $.datepickerlunar._adjustDate(t.target, 7, "D"), a = t.ctrlKey || t.metaKey; break; default: a = !1 } else 36 == t.keyCode && t.ctrlKey ? $.datepickerlunar._showDatepicker(this) : a = !1; a && (t.preventDefault(), t.stopPropagation()) }, _doKeyPress: function (t) { var e = $.datepickerlunar._getInst(t.target); if ($.datepickerlunar._get(e, "constrainInput")) { var a = $.datepickerlunar._possibleChars($.datepickerlunar._get(e, "dateFormat")), i = String.fromCharCode(null == t.charCode ? t.keyCode : t.charCode); return t.ctrlKey || i < " " || !a || a.indexOf(i) > -1 } }, _showDatepicker: function (t) { if ("input" != (t = t.target || t).nodeName.toLowerCase() && (t = $("input", t.parentNode)[0]), !$.datepickerlunar._isDisabledDatepicker(t) && $.datepickerlunar._lastInput != t) { var e = $.datepickerlunar._getInst(t), a = $.datepickerlunar._get(e, "beforeShow"); extendRemove(e.settings, a ? a.apply(t, [t, e]) : {}), $.datepickerlunar._hideDatepicker(null, ""), $.datepickerlunar._lastInput = t, $.datepickerlunar._setDateFromField(e), $.datepickerlunar._inDialog && (t.value = ""), $.datepickerlunar._pos || ($.datepickerlunar._pos = $.datepickerlunar._findPos(t), $.datepickerlunar._pos[1] += t.offsetHeight); var i = !1; $(t).parents().each(function () { return !(i |= "fixed" == $(this).css("position")) }), i && $.browser.opera && ($.datepickerlunar._pos[0] -= document.documentElement.scrollLeft, $.datepickerlunar._pos[1] -= document.documentElement.scrollTop); var n = { left: $.datepickerlunar._pos[0], top: $.datepickerlunar._pos[1] }; if ($.datepickerlunar._pos = null, e.rangeStart = null, e.dpDiv.css({ position: "absolute", display: "block", top: "-1000px" }), $.datepickerlunar._updateDatepicker(e), n = $.datepickerlunar._checkOffset(e, n, i), e.dpDiv.css({ position: $.datepickerlunar._inDialog && $.blockUI ? "static" : i ? "f
1ixed" : "absolute", display: "none", left: n.left + "px", top: n.top + "px" }), !e.inline) { var r = $.datepickerlunar._get(e, "showAnim") || "show", s = $.datepickerlunar._get(e, "duration"), l = function () { $.datepickerlunar._datepickerShowing = !0 }; $.effects && $.effects[r] ? e.dpDiv.show(r, $.datepickerlunar._get(e, "showOptions"), s, l) : e.dpDiv[r](s, l), "" == s && l(), "hidden" != e.input[0].type && e.input[0].focus(), $.datepickerlunar._curInst = e } } }, _updateDatepicker: function (t) { var e = { width: t.dpDiv.width() + 4, height: t.dpDiv.height() + 4 }, a = this; t.dpDiv.empty().append(this._generateHTML(t)).find("iframe.ui-datepicker-cover").css({ width: e.width, height: e.height }).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout", function () { $(this).removeClass("ui-state-hover"), -1 != this.className.indexOf("ui-datepicker-prev") && $(this).removeClass("ui-datepicker-prev-hover"), -1 != this.className.indexOf("ui-datepicker-next") && $(this).removeClass("ui-datepicker-next-hover") }).bind("mouseover", function () { a._isDisabledDatepicker(t.inline ? t.dpDiv.parent()[0] : t.input[0]) || ($(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), $(this).addClass("ui-state-hover"), -1 != this.className.indexOf("ui-datepicker-prev") && $(this).addClass("ui-datepicker-prev-hover"), -1 != this.className.indexOf("ui-datepicker-next") && $(this).addClass("ui-datepicker-next-hover")) }).end().find("." + this._dayOverClass + " a").trigger("mouseover").end(); var i = this._getNumberOfMonths(t), n = i[1]; n > 1 ? t.dpDiv.addClass("ui-datepicker-multi-" + n).css("width", 17 * n + "em") : t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""), t.dpDiv[(1 != i[0] || 1 != i[1] ? "add" : "remove") + "Class"]("ui-datepicker-multi"), t.dpDiv[(this._get(t, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"), t.input && "hidden" != t.input[0].type && t == $.datepickerlunar._curInst && $(t.input[0]).focus() }, _checkOffset: function (t, e, a) { var i = t.dpDiv.outerWidth(), n = t.dpDiv.outerHeight(), r = t.input ? t.input.outerWidth() : 0, s = t.input ? t.input.outerHeight() : 0, l = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) + $(document).scrollLeft(), o = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) + $(document).scrollTop(); return e.left -= this._get(t, "isRTL") ? i - r : 0, e.left -= a && e.left == t.input.offset().left ? $(document).scrollLeft() : 0, e.top -= a && e.top == t.input.offset().top + s ? $(document).scrollTop() : 0, e.left -= e.left + i > l && l > i ? Math.abs(e.left + i - l) : 0, e.top -= e.top + n > o && o > n ? Math.abs(e.top + n - o) : 0, e }, _findPos: function (t) { for (; t && ("hidden" == t.type || 1 != t.nodeType);)t = t.nextSibling; var e = $(t).offset(); return [e.left, e.top] }, _hideDatepicker: function (t, e) { var a = this._curInst; if (a && (!t || a == $.data(t, PROP_NAME))) { if (a.stayOpen && this._selectDate("#" + a.id, this._formatDate(a, a.currentDay, a.currentMonth, a.currentYear)), a.stayOpen = !1, this._datepickerShowing) { e = null != e ? e : this._get(a, "duration"); var i = this._get(a, "showAnim"), n = function () { $.datepickerlunar._tidyDialog(a) }; "" != e && $.effects && $.effects[i] ? a.dpDiv.hide(i, $.datepickerlunar._get(a, "showOptions"), e, n) : a.dpDiv["" == e ? "hide" : "slideDown" == i ? "slideUp" : "fadeIn" == i ? "fadeOut" : "hide"](e, n), "" == e && this._tidyDialog(a); var r = this._get(a, "onClose"); r && r.apply(a.input ? a.input[0] : null, [a.input ? a.input.val() : "", a]), this._datepickerShowing = !1, this._lastInput = null, this._inDialog && (this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" }), $.blockUI && ($.unblockUI(), $("body").append(this.dpDiv))), this._inDialog = !1 } this._curInst = null } }, _tidyDialog: function (t) { t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar") }, _checkExternalClick: function (t) { if ($.datepickerlunar._curInst) { var e = $(t.target); 0 != e.parents("#" + $.datepickerlunar._mainDivId).length || e.hasClass($.datepickerlunar.markerClassName) || e.hasClass($.datepickerlunar._triggerClass) || !$.datepickerlunar._datepickerShowing || $.datepickerlunar._inDialog && $.blockUI || $.datepickerlunar._hideDatepicker(null, "") } }, _adjustDate: function (t, e, a) { var i = $(t), n = this._getInst(i[0]); this._isDisabledDatepicker(i[0]) || (this._adjustInstDate(n, e + ("M" == a ? this._get(n, "showCurrentAtPos") : 0), a), this._updateDatepicker(n)) }, _gotoToday: function (t) { var e = $(t), a = this._getInst(e[0]); if (this._get(a, "gotoCurrent") && a.currentDay) a.selectedDay = a.currentDay, a.drawMonth = a.selectedMonth = a.currentMonth, a.drawYear = a.selectedYear = a.currentYear; else { var i = new Date; a.selectedDay = i.getDate(), a.drawMonth = a.selectedMonth = i.getMonth(), a.drawYear = a.selectedYear = i.getFullYear() } this._notifyChange(a), this._adjustDate(e) }, _selectMonthYear: function (t, e, a) { var i = $(t), n = this._getInst(i[0]); n._selectingMonthYear = !1, n["selected" + ("M" == a ? "Month" : "Year")] = n["draw" + ("M" == a ? "Month" : "Year")] = parseInt(e.options[e.selectedIndex].value, 10), this._notifyChange(n), this._adjustDate(i) }, _clickMonthYear: function (t) { var e = $(t), a = this._getInst(e[0]); a.input && a._selectingMonthYear && !$.browser.msie && a.input[0].focus(), a._selectingMonthYear = !a._selectingMonthYear }, _selectDay: function (t, e, a, i) { var n = $(t); if (!$(i).hasClass(this._unselectableClass) && !this._isDisabledDatepicker(n[0])) { var r = this._getInst(n[0]); r.selectedDay = r.currentDay = $("a > span.ui-datepicker-day", i).html(), r.selectedMonth = r.currentMonth = e, r.selectedYear = r.currentYear = a, r.stayOpen && (r.endDay = r.endMonth = r.endYear = null), this._selectDate(t, this._formatDate(r, r.currentDay, r.currentMonth, r.currentYear)), r.stayOpen && (r.rangeStart = this._daylightSavingAdjust(new Date(r.currentYear, r.currentMonth, r.currentDay)), this._updateDatepicker(r)) } }, _clearDate: function (t) { var e = $(t), a = this._getInst(e[0]); a.stayOpen = !1, a.endDay = a.endMonth = a.endYear = a.rangeStart = null, this._selectDate(e, "") }, _selectDate: function (t, e) { var a = $(t), i = this._getInst(a[0]); e = null != e ? e : this._formatDate(i), i.input && i.input.val(e), this._updateAlternate(i); var n = this._get(i, "onSelect"); n ? n.apply(i.input ? i.input[0] : null, [e, i]) : i.input && i.input.trigger("change"), i.inline ? this._updateDatepicker(i) : i.stayOpen || (this._hideDatepicker(null, this._get(i, "duration")), this._lastInput = i.input[0], "object" != typeof i.input[0] && i.input[0].focus(), this._lastInput = null) }, _updateAlternate: function (t) { var e = this._get(t, "altField"); if (e) { var a = this._get(t, "altFormat") || this._get(t, "dateFormat"), i = this._getDate(t); dateStr = this.formatDate(a, i, this._getFormatConfig(t)), $(e).each(function () { $(this).val(dateStr) }) } }, noWeekends: function (t) { var e = t.getDay(); return [e > 0 && e < 6, ""] }, iso8601Week: function (t) { var e = new Date(t.getFullYear(), t.getMonth(), t.getDate()), a = new Date(e.getFullYear(), 0, 4), i = a.getDay() || 7; return a.setDate(a.getDate() + 1 - i), i < 4 && e < a ? (e.setDate(e.getDate() - 3), $.datepickerlunar.iso8601Week(e)) : e > new Date(e.getFullYear(), 11, 28) && (i = new Date(e.getFullYear() + 1, 0, 4).getDay() || 7) > 4 && (e.getDay() || 7) < i - 3 ? 1 : Math.floor((e - a) / 864e5 / 7) + 1 }, parseDate: function (t, e, a) { if (null == t || null == e) throw "Invalid arguments"; if ("" == (e = "object" == typeof e ? e.toString() : e + "")) return null; for (var i = (a ? a.shortYearCutoff : null) || this._defaults.shortYearCutoff, n = (a ? a.dayNamesShort : null) || this._defaults.dayNamesShort, r = (a ? a.dayNames : null) || this._defaults.dayNames, s = (a ? a.monthNamesShort : null) || this._defaults.monthNamesShort, l = (a ? a.monthNames : null) || this._defaults.monthNames, o = -1, d = -1, u = -1, h = -1, c = !1, p = function (e) { var a = y + 1 < t.length && t.charAt(y + 1) == e; return a && y++, a }, g = function (t) { p(t); for (var a = "@" == t ? 14 : "y" == t ? 4 : "o" == t ? 3 : 2, i = a, n = 0; i > 0 && D < e.length && e.charAt(D) >= "0" && e.charAt(D) <= "9";)n = 10 * n + parseInt(e.charAt(D++), 10), i--; if (i == a) throw "Missing number at position " + D; return n }, _ = function (t, a, i) { for (var n = p(t) ? i : a, r = 0, s = 0; s < n.length; s++)r = Math.max(r, n[s].length); for (var l = "", o = D; r > 0 && D < e.length;) { l += e.charAt(D++); for (var d = 0; d < n.length; d++)if (l == n[d]) return d + 1; r-- } throw "Unknown name at position " + o }, f = function () { if (e.charAt(D) != t.charAt(y)) throw "Unexpected literal at position " + D; D++ }, D = 0, y = 0; y < t.length; y++)if (c) "'" != t.charAt(y) || p("'") ? f() : c = !1; else switch (t.charAt(y)) { case "d": u = g("d"); break; case "D": _("D", n, r); break; case "o": h = g("o"); break; case "m": d = g("m"); break; case "M": d = _("M", s, l); break; case "y": o = g("y"); break; case "@": o = (m = new Date(g("@"))).getFullYear(), d = m.getMonth() + 1, u = m.getDate(); break;
1 case "'": p("'") ? f() : c = !0; break; default: f() }if (-1 == o ? o = (new Date).getFullYear() : o < 100 && (o += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (o <= i ? 0 : -100)), h > -1) for (d = 1, u = h; ;) { var k = this._getDaysInMonth(o, d - 1); if (u <= k) break; d++, u -= k } var m; if ((m = this._daylightSavingAdjust(new Date(o, d - 1, u))).getFullYear() != o || m.getMonth() + 1 != d || m.getDate() != u) throw "Invalid date"; return m }, ATOM: "yy-mm-dd", COOKIE: "D, dd M yy", ISO_8601: "yy-mm-dd", RFC_822: "D, d M y", RFC_850: "DD, dd-M-y", RFC_1036: "D, d M y", RFC_1123: "D, d M yy", RFC_2822: "D, d M yy", RSS: "D, d M y", TIMESTAMP: "@", W3C: "yy-mm-dd", formatDate: function (t, e, a) { if (!e) return ""; var i = (a ? a.dayNamesShort : null) || this._defaults.dayNamesShort, n = (a ? a.dayNames : null) || this._defaults.dayNames, r = (a ? a.monthNamesShort : null) || this._defaults.monthNamesShort, s = (a ? a.monthNames : null) || this._defaults.monthNames, l = function (e) { var a = c + 1 < t.length && t.charAt(c + 1) == e; return a && c++, a }, o = function (t, e, a) { var i = "" + e; if (l(t)) for (; i.length < a;)i = "0" + i; return i }, d = function (t, e, a, i) { return l(t) ? i[e] : a[e] }, u = "", h = !1; if (e) for (var c = 0; c < t.length; c++)if (h) "'" != t.charAt(c) || l("'") ? u += t.charAt(c) : h = !1; else switch (t.charAt(c)) { case "d": u += o("d", e.getDate(), 2); break; case "D": u += d("D", e.getDay(), i, n); break; case "o": for (var p = e.getDate(), g = e.getMonth() - 1; g >= 0; g--)p += this._getDaysInMonth(e.getFullYear(), g); u += o("o", p, 3); break; case "m": u += o("m", e.getMonth() + 1, 2); break; case "M": u += d("M", e.getMonth(), r, s); break; case "y": u += l("y") ? e.getFullYear() : (e.getYear() % 100 < 10 ? "0" : "") + e.getYear() % 100; break; case "@": u += e.getTime(); break; case "'": l("'") ? u += "'" : h = !0; break; default: u += t.charAt(c) }return u }, _possibleChars: function (t) { for (var e = "", a = !1, i = 0; i < t.length; i++)if (a) "'" != t.charAt(i) || lookAhead("'") ? e += t.charAt(i) : a = !1; else switch (t.charAt(i)) { case "d": case "m": case "y": case "@": e += "0123456789"; break; case "D": case "M": return null; case "'": lookAhead("'") ? e += "'" : a = !0; break; default: e += t.charAt(i) }return e }, _get: function (t, e) { return void 0 !== t.settings[e] ? t.settings[e] : this._defaults[e] }, _setDateFromField: function (t) { var e = this._get(t, "dateFormat"), a = t.input ? t.input.val() : null; t.endDay = t.endMonth = t.endYear = null; var i = defaultDate = this._getDefaultDate(t), n = this._getFormatConfig(t); try { i = this.parseDate(e, a, n) || defaultDate } catch (t) { this.log(t), i = defaultDate } t.selectedDay = i.getDate(), t.drawMonth = t.selectedMonth = i.getMonth(), t.drawYear = t.selectedYear = i.getFullYear(), t.currentDay = a ? i.getDate() : 0, t.currentMonth = a ? i.getMonth() : 0, t.currentYear = a ? i.getFullYear() : 0, this._adjustInstDate(t) }, _getDefaultDate: function (t) { var e = this._determineDate(this._get(t, "defaultDate"), new Date), a = this._getMinMaxDate(t, "min", !0), i = this._getMinMaxDate(t, "max"); return e = a && e < a ? a : e, e = i && e > i ? i : e }, _determineDate: function (t, e) { return (t = (t = null == t ? e : "string" == typeof t ? function (t, e) { for (var a = new Date, i = a.getFullYear(), n = a.getMonth(), r = a.getDate(), s = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, l = s.exec(t); l;) { switch (l[2] || "d") { case "d": case "D": r += parseInt(l[1], 10); break; case "w": case "W": r += 7 * parseInt(l[1], 10); break; case "m": case "M": n += parseInt(l[1], 10), r = Math.min(r, e(i, n)); break; case "y": case "Y": i += parseInt(l[1], 10), r = Math.min(r, e(i, n)) }l = s.exec(t) } return new Date(i, n, r) }(t, this._getDaysInMonth) : "number" == typeof t ? isNaN(t) ? e : function (t) { var e = new Date; return e.setDate(e.getDate() + t), e }(t) : t) && "Invalid Date" == t.toString() ? e : t) && (t.setHours(0), t.setMinutes(0), t.setSeconds(0), t.setMilliseconds(0)), this._daylightSavingAdjust(t) }, _daylightSavingAdjust: function (t) { return t ? (t.setHours(t.getHours() > 12 ? t.getHours() + 2 : 0), t) : null }, _setDate: function (t, e, a) { var i = !e, n = t.selectedMonth, r = t.selectedYear; e = this._determineDate(e, new Date), t.selectedDay = t.currentDay = e.getDate(), t.drawMonth = t.selectedMonth = t.currentMonth = e.getMonth(), t.drawYear = t.selectedYear = t.currentYear = e.getFullYear(), n == t.selectedMonth && r == t.selectedYear || this._notifyChange(t), this._adjustInstDate(t), t.input && t.input.val(i ? "" : this._formatDate(t)) }, _getDate: function (t) { return !t.currentYear || t.input && "" == t.input.val() ? null : this._daylightSavingAdjust(new Date(t.currentYear, t.currentMonth, t.currentDay)) }, _generateHTML: function (t) { var e = new Date; e = this._daylightSavingAdjust(new Date(e.getFullYear(), e.getMonth(), e.getDate())); var a = this._get(t, "isRTL"), i = this._get(t, "showButtonPanel"), n = this._get(t, "hideIfNoPrevNext"), r = this._get(t, "navigationAsDateFormat"), s = this._getNumberOfMonths(t), l = this._get(t, "showCurrentAtPos"), o = this._get(t, "stepMonths"), d = (this._get(t, "stepBigMonths"), 1 != s[0] || 1 != s[1]), u = this._daylightSavingAdjust(t.currentDay ? new Date(t.currentYear, t.currentMonth, t.currentDay) : new Date(9999, 9, 9)), h = this._getMinMaxDate(t, "min", !0), c = this._getMinMaxDate(t, "max"), p = t.drawMonth - l, g = t.drawYear; if (p < 0 && (p += 12, g--), c) { var _ = this._daylightSavingAdjust(new Date(c.getFullYear(), c.getMonth() - s[1] + 1, c.getDate())); for (_ = h && _ < h ? h : _; this._daylightSavingAdjust(new Date(g, p, 1)) > _;)--p < 0 && (p = 11, g--) } t.drawMonth = p, t.drawYear = g; var f = this._get(t, "prevText"); f = r ? this.formatDate(f, this._daylightSavingAdjust(new Date(g, p - o, 1)), this._getFormatConfig(t)) : f; var D = this._canAdjustMonth(t, -1, g, p) ? '<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepickerlunar._adjustDate(\'#' + t.id + "', -" + o + ", 'M');\" title=\"" + f + '"><span class="ui-icon ui-icon-circle-triangle-' + (a ? "e" : "w") + '">' + f + "</span></a>" : n ? "" : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="' + f + '"><span class="ui-icon ui-icon-circle-triangle-' + (a ? "e" : "w") + '">' + f + "</span></a>", y = this._get(t, "nextText"); y = r ? this.formatDate(y, this._daylightSavingAdjust(new Date(g, p + o, 1)), this._getFormatConfig(t)) : y; var k = this._canAdjustMonth(t, 1, g, p) ? '<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepickerlunar._adjustDate(\'#' + t.id + "', +" + o + ", 'M');\" title=\"" + y + '"><span class="ui-icon ui-icon-circle-triangle-' + (a ? "w" : "e") + '">' + y + "</span></a>" : n ? "" : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="' + y + '"><span class="ui-icon ui-icon-circle-triangle-' + (a ? "w" : "e") + '">' + y + "</span></a>", m = this._get(t, "currentText"), v = this._get(t, "gotoCurrent") && t.currentDay ? u : e; m = r ? this.formatDate(m, v, this._getFormatConfig(t)) : m; var M = t.inline ? "" : '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepickerlunar._hideDatepicker();">' + this._get(t, "closeText") + "</button>", $ = i ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (a ? M : "") + (this._isInRange(t, v) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepickerlunar._gotoToday(\'#' + t.id + "');\">" + m + "</button>" : "") + (a ? "" : M) + "</div>" : "", b = parseInt(this._get(t, "firstDay"), 10); b = isNaN(b) ? 0 : b;
1 for (var w = this._get(t, "dayNames"), C = (this._get(t, "dayNamesShort"), this._get(t, "dayNamesMin")), I = this._get(t, "monthNames"), Y = this._get(t, "monthNamesShort"), N = this._get(t, "beforeShowDay"), T = this._get(t, "showOtherMonths"), S = (this._get(t, "calculateWeek") || this.iso8601Week, t.endDay ? this._daylightSavingAdjust(new Date(t.endYear, t.endMonth, t.endDay)) : u), x = this._getDefaultDate(t), A = "", F = 0; F < s[0]; F++) { for (var j = "", O = 0; O < s[1]; O++) { var P = this._daylightSavingAdjust(new Date(g, p, t.selectedDay)), K = " ui-corner-all", R = ""; if (d) { switch (R += '<div class="ui-datepicker-group ui-datepicker-group-', O) { case 0: R += "first", K = " ui-corner-" + (a ? "right" : "left"); break; case s[1] - 1: R += "last", K = " ui-corner-" + (a ? "left" : "right"); break; default: R += "middle", K = "" }R += '">' } R += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + K + '">' + (/all|left/.test(K) && 0 == F ? a ? k : D : "") + (/all|right/.test(K) && 0 == F ? a ? D : k : "") + this._generateMonthYearHeader(t, p, g, h, c, P, F > 0 || O > 0, I, Y) + '</div><table class="ui-datepicker-calendar"><thead><tr>'; for (var L = "", E = 0; E < 7; E++) { var H = (E + b) % 7; L += "<th" + ((E + b + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : "") + '><span title="' + w[H] + '">' + C[H] + "</span></th>" } R += L + "</tr></thead><tbody>"; var W = this._getDaysInMonth(g, p); g == t.selectedYear && p == t.selectedMonth && (t.selectedDay = Math.min(t.selectedDay, W)); for (var Q = (this._getFirstDayOfMonth(g, p) - b + 7) % 7, U = d ? 6 : Math.ceil((Q + W) / 7), B = this._daylightSavingAdjust(new Date(g, p, 1 - Q)), V = 0; V < U; V++) { R += "<tr>"; var z = ""; for (E = 0; E < 7; E++) { var X = N ? N.apply(t.input ? t.input[0] : null, [B]) : [!0, ""], q = B.getMonth() != p, G = q || !X[0] || h && B < h || c && B > c; z += '<td class="' + ((E + b + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (q ? " ui-datepicker-other-month" : "") + (B.getTime() == P.getTime() && p == t.selectedMonth && t._keyEvent || x.getTime() == B.getTime() && x.getTime() == P.getTime() ? " " + this._dayOverClass : "") + (G ? " " + this._unselectableClass + " ui-state-disabled" : "") + (q && !T ? "" : " " + X[1] + (B.getTime() >= u.getTime() && B.getTime() <= S.getTime() ? " " + this._currentClass : "") + (B.getTime() == e.getTime() ? " ui-datepicker-today" : "")) + '"' + (q && !T || !X[2] ? "" : ' title="' + X[2] + '"') + (G ? "" : " onclick=\"DP_jQuery.datepickerlunar._selectDay('#" + t.id + "'," + p + "," + g + ', this);return false;"') + ">" + (q ? T ? B.getDate() : "&#xa0;" : G ? '<a class="ui-state-default"><span class="ui-datepicker-day">' + this.dDay(B) + "</span>" + this.cDay(B) + "</a>" : '<a class="ui-state-default' + (B.getTime() == e.getTime() ? " ui-state-highlight" : "") + (B.getTime() >= u.getTime() && B.getTime() <= S.getTime() ? " ui-state-active" : "") + '" href="#"><span class="ui-datepicker-day">' + this.dDay(B) + "</span>" + this.cDay(B) + "</a>") + "</td>", B.setDate(B.getDate() + 1), B = this._daylightSavingAdjust(B) } R += z + "</tr>" } ++p > 11 && (p = 0, g++), j += R += "</tbody></table>" + (d ? "</div>" + (s[0] > 0 && O == s[1] - 1 ? '<div class="ui-datepicker-row-break"></div>' : "") : "") } A += j } return A += $, t._keyEvent = !1, A }, _generateMonthYearHeader: function (t, e, a, i, n, r, s, l, o) { i = t.rangeStart && i && r < i ? r : i; var d = this._get(t, "changeMonth"), u = this._get(t, "changeYear"), h = this._get(t, "showMonthAfterYear"), c = '<div class="ui-datepicker-title">', p = ""; if (s || !d) p += '<span class="ui-datepicker-month">' + l[e] + "</span>/"; else { var g = i && i.getFullYear() == a, _ = n && n.getFullYear() == a; p += '<select class="ui-datepicker-month" onchange="DP_jQuery.datepickerlunar._selectMonthYear(\'#' + t.id + "', this, 'M');\" onclick=\"DP_jQuery.datepickerlunar._clickMonthYear('#" + t.id + "');\">"; for (var f = 0; f < 12; f++)(!g || f >= i.getMonth()) && (!_ || f <= n.getMonth()) && (p += '<option value="' + f + '"' + (f == e ? ' selected="selected"' : "") + ">
1" + l[f] + "</option>"); p += "</select>" } if (h || (c += p + (!(s || d || u) || d && u ? "" : "&#xa0;")), s || !u) c += '<span class="ui-datepicker-year">' + a + "</span>&#xa0;"; else { var D = this._get(t, "yearRange").split(":"), y = 0, k = 0; for (2 != D.length ? (y = a - 10, k = a + 10) : "+" == D[0].charAt(0) || "-" == D[0].charAt(0) ? (y = a + parseInt(D[0], 10), k = a + parseInt(D[1], 10)) : (y = parseInt(D[0], 10), k = parseInt(D[1], 10)), y = i ? Math.max(y, i.getFullYear()) : y, k = n ? Math.min(k, n.getFullYear()) : k, c += '<select class="ui-datepicker-year" onchange="DP_jQuery.datepickerlunar._selectMonthYear(\'#' + t.id + "', this, 'Y');\" onclick=\"DP_jQuery.datepickerlunar._clickMonthYear('#" + t.id + "');\">"; y <= k; y++)c += '<option value="' + y + '"' + (y == a ? ' selected="selected"' : "") + ">" + y + "</option>"; c += "</select>" } return h && (c += p), c += "</div>" }, _adjustInstDate: function (t, e, a) { var i = t.drawYear + ("Y" == a ? e : 0), n = t.drawMonth + ("M" == a ? e : 0), r = Math.min(t.selectedDay, this._getDaysInMonth(i, n)) + ("D" == a ? e : 0), s = this._daylightSavingAdjust(new Date(i, n, r)), l = this._getMinMaxDate(t, "min", !0), o = this._getMinMaxDate(t, "max"); s = l && s < l ? l : s, s = o && s > o ? o : s, t.selectedDay = s.getDate(), t.drawMonth = t.selectedMonth = s.getMonth(), t.drawYear = t.selectedYear = s.getFullYear(), "M" != a && "Y" != a || this._notifyChange(t) }, _notifyChange: function (t) { var e = this._get(t, "onChangeMonthYear"); e && e.apply(t.input ? t.input[0] : null, [t.selectedYear, t.selectedMonth + 1, t]) }, _getNumberOfMonths: function (t) { var e = this._get(t, "numberOfMonths"); return null == e ? [1, 1] : "number" == typeof e ? [1, e] : e }, _getMinMaxDate: function (t, e, a) { var i = this._determineDate(this._get(t, e + "Date"), null); return a && t.rangeStart && (!i || t.rangeStart > i) ? t.rangeStart : i }, _getDaysInMonth: function (t, e) { return 32 - new Date(t, e, 32).getDate() }, _getFirstDayOfMonth: function (t, e) { return new Date(t, e, 1).getDay() }, _canAdjustMonth: function (t, e, a, i) { var n = this._getNumberOfMonths(t), r = this._daylightSavingAdjust(new Date(a, i + (e < 0 ? e : n[1]), 1)); return e < 0 && r.setDate(this._getDaysInMonth(r.getFullYear(), r.getMonth())), this._isInRange(t, r) }, _isInRange: function (t, e) { var a = t.rangeStart ? this._daylightSavingAdjust(new Date(t.selectedYear, t.selectedMonth, t.selectedDay)) : null, i = (a = a && t.rangeStart < a ? t.rangeStart : a) || this._getMinMaxDate(t, "min"), n = this._getMinMaxDate(t, "max"); return (!i || e >= i) && (!n || e <= n) }, _getFormatConfig: function (t) { var e = this._get(t, "shortYearCutoff"); return { shortYearCutoff: e = "string" != typeof e ? e : (new Date).getFullYear() % 100 + parseInt(e, 10), dayNamesShort: this._get(t, "dayNamesShort"), dayNames: this._get(t, "dayNames"), monthNamesShort: this._get(t, "monthNamesShort"), monthNames: this._get(t, "monthNames") } }, _formatDate: function (t, e, a, i) { e || (t.currentDay = t.selectedDay, t.currentMonth = t.selectedMonth, t.currentYear = t.selectedYear); var n = e ? "object" == typeof e ? e : this._daylightSavingAdjust(new Date(i, a, e)) : this._daylightSavingAdjust(new Date(t.currentYear, t.currentMonth, t.currentDay)); return this.formatDate(this._get(t, "dateFormat"), n, this._getFormatConfig(t)) }, cDay: function (t) { var e, a = new Lunar; if (a.create(t), 1 == a.day) e = "1/" + this._defaults.monthNamesShort[a.month - 1]; else switch (a.day) { case 10: e = "10"; break; case 20: e = "20"; break; case 30: e = "30"; break; default: e = a.nStr2[Math.floor(a.day / 10)], e += a.nStr1[a.day % 10] }for (i in a.lFtv) if (a.lFtv[i].match(/^(\d{2})(.{2})([\s\*])(.+)$/) && a.month == Number(RegExp.$1) && a.day == Number(RegExp.$2)) { e = '<font style=" color:red;display:block;" title="' + a.noteLFtv[i] + '">' + RegExp.$4 + "</font>"; break } return '<span class="ui-datepicker-lunar">' + e + "</span>" }, dDay: function (t) { for (var e in sFtv) { if (sFtv[e].match(/^(\d{2})(.{2})$/)) if (t.getMonth() + 1 == Number(RegExp.$2) && t.getDate() == Number(RegExp.$1)) return '<font style=" color:red;display:block;" title="' + notesFtv[e] + '">' + t.getDate() + "</font>" } return t.getDate() }, lunarDay: function (t) { var e = new Lunar; if (e.create(t), 1 == e.day) "1/" + this._defaults.monthNamesShort[e.month - 1]; else switch (e.day) { case 10: "10"; break; case 20: "20"; break; case 30: "30"; break; default: e.nStr2[Math.floor(e.day / 10)], e.nStr1[e.day % 10] }return "<span>ngày " + e.day + "/" + e.month + ", " + e.year + "</span>" } }); var sFtv = [], notesFtv = []; function Lunar() { this.dayCyl, this.monCyl, this.year, this.month, this.day, this.yearCyl, this.isLeap, this.monthDays, this.lunarInfo = new Array(19416, 19168, 42352, 21717, 53856, 55632, 91476, 22176, 39632, 21970, 19168, 42422, 42192, 53840, 119381, 46400, 54944, 44450, 38320, 84343, 18800, 42160, 46261, 27216, 27968, 109396, 11104, 38256, 21234, 18800, 25958, 54432, 59984, 28309, 23248, 11104, 100067, 37600, 116951, 51536, 54432, 120998, 46416, 22176, 10
17956, 9680, 37584, 53938, 43344, 46423, 27808, 46416, 86869, 19872, 42448, 83315, 21200, 43432, 59728, 27296, 44710, 43856, 19296, 43748, 42352, 21088, 62051, 55632, 23383, 22176, 38608, 19925, 19152, 42192, 54484, 53840, 54616, 46400, 46496, 103846, 38320, 18864, 43380, 42160, 45690, 27216, 27968, 44870, 43872, 38256, 19189, 18800, 25776, 29859, 59984, 27480, 21952, 43872, 38613, 37600, 51552, 55636, 54432, 55888, 30034, 22176, 43959, 9680, 37584, 51893, 43344, 46240, 47780, 44368, 21977, 19360, 42416, 86390, 21104, 26928, 31028, 27296, 44368, 23378, 19296, 42726, 42208, 53856, 60005, 54560, 55968, 22179, 22224, 19195, 18896, 42192, 118966, 45648, 46368, 56613, 46496, 21968, 21938, 18864, 42359, 42160, 43600, 111189, 27936, 44384), this.sTermInfo = [0, 21208, 42467, 63836, 85337, 107014, 128867, 150921, 173149, 195551, 218072, 240693, 263343, 285989, 308563, 331033, 353350, 375494, 397447, 419210, 440795, 462224, 483532, 504758], this.nStr1 = ["Ngày", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"], this.nStr2 = ["", "1", "2", "3", " "], this.sFtv = ["0101 1"], this.lFtv = ["0101 1/1", "0815 15"], this.noteLFtv = ["Tết Nguyên Đán", "Tết Trung Thu"] } function extendRemove(t, e) { for (var a in $.extend(t, e), e) null != e[a] && null != e[a] || (t[a] = e[a]); return t } function isArray(t) { return t && ($.browser.safari && "object" == typeof t && t.length || t.constructor && t.constructor.toString().match(/\Array\(\)/)) } $.extend(Lunar.prototype, { create: function (t) { var e, a, i = 0, n = Math.floor((t.getTime() + 22064256e5) / 864e5); for (this.dayCyl = n + 40, this.monCyl = 14, e = 1900; e < 2050 && n > 0; e++)n -= i = this._lYearDays(e), this.monCyl += 12; for (n < 0 && (n += i, e--, this.monCyl -= 12), this.year = e, this.yearCyl = e - 1864, a = this._leapMonth(e), this.isLeap = !1, e = 1; e < 13 && n > 0; e++)a > 0 && e == a + 1 && 0 == this.isLeap ? (--e, this.isLeap = !0, i = this._leapDays(this.year)) : i = this._monthDays(this.year, e), 1 == this.isLeap && e == a + 1 && (this.isLeap = !1), n -= i, 0 == this.isLeap && this.monCyl++; 0 == n && a > 0 && e == a + 1 && (this.isLeap ? this.isLeap = !1 : (this.isLeap = !0, --e, --this.monCyl)), n < 0 && (n += i, --e, --this.monCyl), this.month = e, this.day = n + 1, this.monthDays = this._monthDays(this.year, this.month) }, _lYearDays: function (t) { var e, a = 348; for (e = 32768; e > 8; e >>= 1)a += this.lunarInfo[t - 1900] & e ? 1 : 0; return a + this._leapDays(t) }, _leapDays: function (t) { return this._leapMonth(t) ? 65536 & this.lunarInfo[t - 1900] ? 30 : 29 : 0 }, _leapMonth: function (t) { return 15 & this.lunarInfo[t - 1900] }, _monthDays: function (t, e) { return this.lunarInfo[t - 1900] & 65536 >> e ? 30 : 29 }, _sTerm: function (t, e) { return new Date(31556925974.7 * (t - 1900) + 6e4 * this.sTermInfo[e] - 22085493e5).getUTCDate() } }), $.fn.datepickerlunar = function (t) { $.datepickerlunar.initialized || ($(document).mousedown($.datepickerlunar._checkExternalClick).find("body").append($.datepickerlunar.dpDiv), $.datepickerlunar.initialized = !0); var e = Array.prototype.slice.call(arguments, 1); return "string" != typeof t || "isDisabled" != t && "getDate" != t ? "option" == t && 2 == arguments.length && "string" == typeof arguments[1] ? $.datepickerlunar["_" + t + "Datepicker"].apply($.datepickerlunar, [this[0]].concat(e)) : this.each(function () { "string" == typeof t ? $.datepickerlunar["_" + t + "Datepicker"].apply($.datepickerlunar, [this].concat(e)) : $.datepickerlunar._attachDatepicker(this, t) }) : $.datepickerlunar["_" + t + "Datepicker"].apply($.datepickerlunar, [this[0]].concat(e)) }, $.datepickerlunar = new DatepickerLunar, $.datepickerlunar.initialized = !1, $.datepickerlunar.uuid = (new Date).getTime(), $.datepickerlunar.version = "1.1", window.DP_jQuery = $ }(jQuery);

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.