1var thoitiet = document.getElementById("thoitiet"); 2if(thoitiet != null){ 3let weather = { 4 apiKey: "062d92a2646152d39eb7845a608226cb", // Nháºp key lấy từ openweathermap.org 5 fetchWeather: function (city) { 6 fetch( 7 "https://api.openweathermap.org/data/2.5/weather?q=" + city + "&lang=" + langtiet + "&units=metric&appid=" + 8 this.apiKey 9 ) 10 .then((response) => { 11 if (!response.ok) { 12 throw new Error(nodiadiem); 13 } 14 return response.json(); 15 }) 16 .then((data) => this.displayWeather(data)); 17 }, 18 displayWeather: function (data) { 19 const { name } = data; 20 const { icon, description } = data.weather[0]; 21 const { temp, temp_min, temp_max, humidity, pressure } = data.main; 22 const { speed } = data.wind; 23 const { country } = data.sys; 24 document.querySelector(".city").innerText = name + " , " + country; 25 document.querySelector(".maytroi").src = weatherimg + icon + ".png"; 26 document.querySelector(".description").innerText = description; 27 document.querySelector(".temp").innerText = temp + "°C"; 28 document.querySelector(".temp-min").innerHTML = "<span><i class='fa-sharp fa-solid fa-arrow-down'></i> " + temp_min + "°C</span>"; 29 document.querySelector(".temp-max").innerHTML = "<span><i class='fa-regular fa-arrow-up'></i> " + temp_max + "°C</span>"; 30 document.querySelector(".humidity").innerHTML = 31 "<span>" + doam + "</span><b>" + humidity + "%</b>"; 32 document.querySelector(".wind").innerHTML = 33 "<span>" + sucgio + "</span><b>" + speed + " km/h</b>"; 34 document.querySelector(".pressure").innerHTML = 35 "<span>" + apsuat + "</span><b>" + pressure + " hPa</b>"; 36 document.querySelector(".weather").classList.remove("loading"); 37 document.querySelector(".thoitiet").style.backgroundImage = "url('" + weatherbg + icon + ".png')"; 38 }, 39 search: function () { 40 this.fetchWeather(document.querySelector(".search-bar").value); 41 }, 42}; 43 44document.querySelector(".searchtiet button").addEventListener("click", function () { 45 weather.search(); 46}); 47 48document 49 .querySelector(".search-bar") 50 .addEventListener("keyup", function (event) { 51 if (event.key == "Enter") { 52 weather.search(); 53 } 54 }); 55weather.fetchWeather(diadiem); 56} 57// time 58window.onload = setInterval(clock,1000); 59function clock(){ 60var days = document.getElementById("days"); 61var dates = document.getElementById("dates"); 62var times = document.getElementById("times"); 63if (days != null && dates != null && times != null){ 64var d = new Date(); 65var date = d.getDate(); 66var month = d.getMonth(); 67var montharr = varthang; 68month=montharr[month]; 69var year = d.getFullYear(); 70var day = d.getDay(); 71var dayarr = varthu; 72day=dayarr[day]; 73var hour =d.getHours(); 74var min = d.getMinutes(); 75var sec = d.getSeconds(); 76days.innerHTML=day; 77dates.innerHTML=date+" "+month+" "+year; 78times.innerHTML=hour+":"+min+":"+sec; 79} 80} 81// bitcoin 82var b1a = document.getElementById("bitcoin"); 83var b2a = document.getElementById("ethereum"); 84var b3a = document.getElementById("tether"); 85var b4a = document.getElementById("dogecoin"); 86var b5a = document.getElementById("solana"); 87var liveprice = { 88 "async": true, 89 "scroosDomain": true, 90 "url": "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin%2Cethereum%2Ctether%2Cdogecoin%2Csolana&vs_currencies=usd", 91 92 "method": "GET", 93 "headers": {} 94} 95if(b1a != null){ 96jQuery.ajax(liveprice).done(function (response){ 97 b1a.innerHTML = response.bitcoin.usd; 98 b2a.innerHTML = response.ethereum.usd; 99 b3a.innerHTML = response.tether.usd; 100 b4a.innerHTML = response.dogecoin.usd; 101 b5a.innerHTML = response.solana.usd; 102}) 103} 104// Am lich 105var am = document.getElementById("amlich-calendar"); 106if(am != null){ 107! function(n) { 108 function t(n, t, a, r, e) { 109 this.day = n, this.month = t, this.year = a, this.leap = r, this.jd = e 110 } 111 112 function a(n) { 113 return Math.floor(n) 114 } 115 116 function r(n, t, r) { 117 var e = a((14 - t) / 12), 118 s = r + 4800 - e, 119 i = t + 12 * e - 3, 120 h = n + a((153 * i + 2) / 5) + 365 * s + a(s / 4) - a(s / 100) + a(s / 400) - 32045; 121 return h 122 } 123 124 function e(n, a) { 125 var e, s, h, d, l, o, c, u, g, m = new Array; 126 for (e = new Array(29, 30), s = new Array(12), h = a >> 17, d = 15 & a, l = e[a >> 16 & 1], o = r(1, 1, n), c = o + h, u = a >> 4, i = 0; i < 12; i++) s[12 - i - 1] = e[1 & u], u >>= 1; 127 if (0 == d) 128 for (g = 1; 12 >= g; g++) m.push(new t(1, g, n, 0, c)), c += s[g - 1];
129 else { 130 for (g = 1; d >= g; g++) m.push(new t(1, g, n, 0, c)), c += s[g - 1]; 131 for (m.push(new t(1, d, n, 1, c)), c += l, g = d + 1; 12 >= g; g++) m.push(new t(1, g, n, 0, c)), c += s[g - 1] 132 } 133 return m 134 } 135 136 function h(n) { 137 var t; 138 return t = 1300 > n ? x[n - 1200] : 1400 > n ? B[n - 1300] : 1500 > n ? S[n - 1400] : 1600 > n ? P[n - 1500] : 1700 > n ? Q[n - 1600] : 1800 > n ? q[n - 1700] : 1900 > n ? Y[n - 1800] : 2e3 > n ? F[n - 1900] : 2100 > n ? K[n - 2e3] : W[n - 2100], e(n, t) 139 } 140 141 function d(n, a) { 142 if (n > _ || $ > n || a[0].jd > n) return new t(0, 0, 0, 0, n); 143 for (var r = a.length - 1; n < a[r].jd;) r--; 144 var e = n - a[r].jd; 145 return ret = new t(a[r].day + e, a[r].month, a[r].year, a[r].leap, n), ret 146 } 147 148 function l(n, t, a) { 149 var e, s; 150 return e = h(a), s = r(n, t, a), s < e[0].jd && (e = h(a - 1)), d(s, e) 151 } 152 153 function o(n, t) { 154 var a, e, s, i, l, o, c, u, g; 155 if (12 > n ? (o = n + 1, c = t) : (o = 1, c = t + 1), i = r(1, n, t), l = r(1, o, c), a = h(t), s = a[0].jd, u = new Array, i >= s) 156 for (g = i; l > g; g++) u.push(d(g, a)); 157 else if (s > i && s > l) 158 for (a = h(t - 1), g = i; l > g; g++) u.push(d(g, a)); 159 else if (s > i && l >= s) { 160 for (e = h(t - 1), g = i; s > g; g++) u.push(d(g, e)); 161 for (g = s; l > g; g++) u.push(d(g, a)) 162 } 163 return u 164 } 165 166 function c(n) { 167 if (0 == n.day) return ""; 168 var t = g(n), 169 a = "Ngà y " + t[0] + ", tháng " + t[1] + ", nÄm " + t[2]; 170 return a 171 } 172 173 function u(n) { 174 return X[(n + 6) % 10] + " " + z[(n + 8) % 12] 175 } 176 177 function g(n) { 178 var t, a, r; 179 return t = X[(n.jd + 9) % 10] + " " + z[(n.jd + 1) % 12], a = X[(12 * n.year + n.month + 3) % 10] + " " + z[(n.month + 1) % 12], 1 == n.leap && (a += " (N)"), r = u(n.year), new Array(t, a, r) 180 } 181 182 function m(n, t, a, r) { 183 var e, s = E[(n.jd + 1) % 7]; 184 return e = s + " " + t + "/" + a + "/" + r, e += " (", e = e + "Ngà y " + n.day + " tháng " + n.month, 1 == n.leap && (e += " nhuáºn"), e 185 } 186 187 function y() { 188 var n = m(an, tn.getDate(), tn.getMonth() + 1, tn.getFullYear()); 189 return n += " nÄm " + u(an.year) + ")" 190 } 191 192 function p(n, t, a) { 193 return n = null == n ? an.day : n, t = null == t ? an.month : t, a = null == a ? an.year : a, t > 4 || t >= 4 && n >= 15 ? a + 544 : a + 544 - 1 194 } 195 196 function f(n) { 197 for (var t = (n + 1) % 12, a = J[t % 6], r = "", e = 0, s = 0; 12 > s; s++) "1" == a.charAt(s) && (r += z[s], r += " (" + (2 * s + 23) % 24 + "-" + (2 * s + 1) % 24 + ")", e++ < 5 && (r += ", "), 3 == e && (r += "\n")); 198 return r 199 } 200 201 function v(n) { 202 var t, r, e, s, i, h, d, l, o; 203 return t = (n - 2451545) / 36525, r = t * t, e = nn / 180, s = 357.5291 + 35999.0503 * t - 1559e-7 * r - 4.8e-7 * t * r, i = 280.46645 + 36000.76983 * t + 3032e-7 * r, h = (1.9146 - .004817 * t - 14e-6 * r) * Math.sin(e * s), h = h + (.019993 - 101e-6 * t) * Math.sin(2 * e * s) + 29e-5 * Math.sin(3 * e * s), l = i + h, o = 125.04 - 1934.136 * t, d = l - .00569 - .00478 * Math.sin(o * e), d *= e, d -= 2 * nn * a(d / (2 * nn)) 204 } 205 206 function T(n, t) { 207 return a(v(n - .5 - t / 24) / nn * 12) 208 } 209 210 function N(n) { 211 return X[2 * (n - 1) % 10] 212 } 213 214 function b(n, t) { 215 var a = ""; 216 return a += M(n, t) 217 } 218 219 function w(n) { 220 var t = "NÄm " + u(n) + " " + n, 221 a = ""; 222 a += '<table align="center">\n', a += "<tbody>\n", a += "<tr>\n", a += ' <td colspan="3" class="amlich-tennam" onClick="showYearSelect();">' + t + "</td>\n", a += "</tr>\n"; 223 for (var r = 1; 12 >= r; r++) r % 3 == 1 && (a += "<tr>\n"), a += "<td>\n", a += M(r, n), a += "</td>\n", r % 3 == 0 && (a += "</tr>\n"); 224 return a += "</tbody>\n", a += "</table>\n" 225 } 226 227 function M(n, t) { 228 var a, r, e, s, i = o(n, t); 229 if (0 == i.length) return !1; 230 var h = i[0], 231 d = (h.jd + 1) % 7, 232 l = (u(h.year), ""); 233 for (l += '<table class="amlich" border="0" cellpadding="0" cellspacing="0" width="' + k.tableWidth + '">\n', l += "<tbody>\n", l += D(n, t), a = 0; 6 > a; a++) { 234 for (l += "<tr>\n", r = 0; 7 > r; r++) e = 7 * a + r, d > e || e >= d + i.length ? (l += '<td class="ngaythang">\n', l += ' <div class="cn"> </div>\n', l += ' <div class="am"> </div>\n', l += "</td>\n") : (s = e - d + 1, h = i[e - d], l += I(h, s, n, t)); 235 l += "</tr>\n" 236 } 237 return l += "</tbody>\n", l += "</table>\n" 238 } 239 240 function j(n, t) { 241 var a = n > 1 ? n - 1 : 12, 242 r = n > 1 ? t : t - 1; 243 return '<a class="prev-month" data-yy="' + r + '" data-mm="' + a + '" href="#"> ‹ </a>' 244 } 245 246 function A(n, t) { 247 var a = 12 > n ? n + 1 : 1, 248 r = 12 > n ? t : t + 1; 249 return '<a class="next-month" data-yy="' + r + '" data-mm="' + a + '" href="#"> › </a>' 250 } 251 252 function C(n, t) { 253 return '<a class="prev-year" data-yy="' + (t - 1) + '" data-mm="' + n + '" href="#">‹‹</a>' 254 } 255 256 function L(n, t) { 257 return '<a class="next-year" data-yy="' + (t + 1) + '" data-mm="' + n + '" href="#">››</a>' 258 } 259 260 function D(n, t) { 261 var a = "", 262 r = n + "/" + t; 263 switch (k.type) { 264 case "month": 265 a += "<tr>\n", a += ' <td colspan="2" class="navi-l">
265' + C(n, t) + " " + j(n, t) + "</td>\n", a += ' <td colspan="3" class="tenthang">' + r + "</td>\n", a += ' <td colspan="2" class="navi-r">' + A(n, t) + " " + L(n, t) + "</td></tr>\n", a += "</tr>\n"; 266 break; 267 case "year": 268 a += "<tr>\n", a += ' <td colspan="7" class="tenthang">' + r + "</td>\n", a += "</tr>\n"; 269 break; 270 case "calendar": 271 var e = g(an), 272 s = G(tn.getDate(), tn.getMonth() + 1, an.day, an.month); 273 a += "<tr>\n", a += ' <td colspan="7">\n', a += ' <table class="calendar" border="0" cellpadding="4" cellspacing="0" width="100%">\n', a += " <tbody>\n", a += " <tr>\n", a += ' <td colspan="2" class="calendar-month">Tháng ' + (tn.getMonth() + 1) + " NÄm " + tn.getFullYear() + "</td>\n", a += " </tr>\n", a += " <tr>\n", a += ' <td colspan="2" class="calendar-day">\n', a += ' <span class="day-num">' + tn.getDate() + "</span><br>\n", a += ' <span class="day-tuan">' + E[(an.jd + 1) % 7] + "</span>\n", a += " </td>\n", a += " </tr>\n", a += " <tr>\n", a += ' <td width="50%" class="calendar-b-left" valign="top">\n', a += ' <span class="lunar-month-name">Tháng ' + R[an.month - 1] + "</span><br>\n", a += ' <span class="lunar-day-num">' + an.day + "</span><br>\n", a += ' <span class="lunar-year-name"><strong>' + e[2] + "</strong></span>\n", a += " </td>\n", a += ' <td width="50%" class="calendar-b-right" valign="top">\n', a += " <span>Ngà y <strong>" + e[0] + "</strong></span><br>\n", a += " <span>Tháng <strong>" + e[1] + "</strong></span><br>\n", a += " <span>Giá» Äầu <strong>" + (N(an.jd) + " " + z[0]) + "</strong></span><br>\n", a += " <span>Tiết <strong>" + O[T(an.jd + 1, 7)] + "</strong></span><br>\n", a += " <span>PL: <strong>" + p() + "</strong></span>\n", a += " </td>\n", a += " </tr>\n", a += ' <tr class="calendar-holiday">' + ("" != s ? '<td colspan="2">' + s + "</td>" : "") + "</tr>\n", a += " <tr>\n", a += ' <td colspan="2" class="calendar-hoangdao">Giá» hoà ng Äạo: ' + f(an.jd) + "</td>\n", a += " </tr>\n", a += " </tbody>\n", a += " </table>\n", a += " </td>\n", a += "</tr>\n", a += "<tr>\n", a += ' <td colspan="2" class="navi-l">' + C(n, t) + " " + j(n, t) + "</td>\n", a += ' <td colspan="3" class="tenthang">' + r + "</td>\n", a += ' <td colspan="2" class="navi-r">' + A(n, t) + " " + L(n, t) + "</td></tr>\n", a += "</tr>\n" 274 } 275 a += "<tr>\n"; 276 for (var i = 0; 6 >= i; i++) a += ' <td class="ngaytuan">' + U[i] + "</td>\n"; 277 return a += "</tr>\n" 278 } 279 280 function H(t, a) { 281 var r = ""; 282 return n.each(Z.solar, function(n, e) { 283 return e.d == t && e.m == a ? (r = e.i + " (" + e.d + "/" + e.m + " DL)", !1) : void 0 284 }), r 285 } 286 287 function V(t, a) { 288 var r = ""; 289 return n.each(Z.lunar, function(n, e) { 290 return e.d == t && e.m == a ? (r = e.i + " (" + e.d + "/" + e.m + " ÃL)", !1) : void 0 291 }), r 292 } 293 294 function G(n, t, a, r) { 295 var e = V(a, r), 296 s = ""; 297 return "" != e && (s = e), e = H(n, t), "" != e && (s = "" == s ? e : s + ", " + e), s 298 } 299 300 function I(n, t, a, r) { 301 var e, s, i, h, e = "ngaythang", 302 s = "t2t6", 303 i = "am", 304 d = "", 305 l = "", 306 o = (n.jd + 1) % 7; 307 0 == o ? (s = "cn", h = "red") : 6 == o && (s = "t7", h = "green"), t == tn.getDate() && a == tn.getMonth() + 1 && r == tn.getFullYear() && (e = "homnay"), l = V(n.day, n.month), "" != l && (e = "leam", d = l), l = H(t, a), "" != l && (e = "leduong", d = "" == d ? l : d + ", " + l), d = "" == d ? c(n) : d, 1 == n.day && 1 == n.month && (e = "tet"), 1 == n.leap && (i = "am2"); 308 var u = n.day; 309 (1 == t || 1 == u) && (u = n.day + "/" + n.month + (1 == n.leap ? "<sup>N</sup>" : "")); 310 var g = "", 311 m = n.day + "," + n.month + "," + n.year + "," + n.leap; 312 return m += "," + n.jd + "," + t + "," + a + "," + r, g += '<td class="' + e + '"', g += null != n ? ' title="' + d + '" data-args="' + m + '"' : "", g += ">\n", g += ' <div class="' + s + '">' + t + "</div>\n", g += ' <div class="' + i + '">' + u + "</div>\n", g += "</td>\n" 313 } 314 var k = {}, 315 x = new Array(2256290, 4625872, 3361244, 5786032, 4367536, 2796216, 5270096, 3847488, 2407236, 297654, 3446192, 2118514, 4606320, 3040505, 5526704, 4090448, 2714711, 5003968, 3582816, 145518, 4756192, 3197308, 5687648, 4248736, 2808488, 5158224, 3823264, 2403765, 4990416, 215342, 2020018, 4499792, 3069145, 5419680, 3978576, 2643799, 5131680, 3581360, 2250100, 296235, 3385660, 5663024, 4221600, 2796968, 5286736, 3820384, 2403044, 4892016, 3560048, 128294, 4384048, 3042490, 5527200, 3955536, 2706134, 5130976, 3712224, 2151636, 4641376, 200019, 5682464, 4109984, 2840233, 5264752, 3951056, 2466229, 4891824, 3451472, 2026065, 273234, 2930090, 5417824, 4101552, 2640758, 5130608, 3695792, 2274483, 4614736, 3173179, 353708, 4238176, 2829016, 5261792, 3843280, 2413749, 4764240, 3323168, 1897762, 4371872, 182622, 5412272, 4082096, 2663798, 5022896, 3582544, 2144852, 4615488, 3059052, 5548896, 4232048), 316 B = new Array(2967992, 5261680, 3826864, 2387109, 4774480, 33e5, 1889985, 4368096, 3052283, 338222, 3983712, 2544983, 5035168, 3462480, 2184531, 4609696, 3188432, 1746385, 4231856, 174683, 5286224, 3715744, 2339493, 4762960, 3427744, 1887137, 4367728, 3035897, 5526128, 247443, 2517815, 5008032, 3582800, 2119507, 4606816, 3188348, 5677792, 4116832, 2681192, 322890, 3725984, 2252453, 4740816, 3427040, 2065874, 4367056, 2937210, 5417552, 3978528, 150900, 4894112, 3560912, 2249651, 4605360, 3187376, 1811121, 4237904, 2667865, 5139232, 232150, 2446181, 4756336, 3425648, 2008435, 4477616, 2910826, 5298512, 3955360, 2599623, 305774, 3560160, 2149091, 4629856, 3068603, 5558944, 4117840, 2775769, 5133984, 3712720, 148829, 4870832, 3320016, 1893714, 4371104, 2930026, 5287248, 3952032, 2533286, 5023088, 222491, 2204020, 4613424, 3238556, 5528224, 4107088, 2763737, 5253984, 3711856, 2380517, 4772192), 317 S = new Array(3335344, 1864995, 4250272, 2972491, 5396176, 3943136, 2532311, 5022416, 3592528, 126357, 4502816, 3061404, 5549472, 4085200, 2827705, 5260720, 3842736, 2271925, 4761936, 207698, 1895073, 4238176, 2905532, 5393264, 4081008, 2511735, 5001904, 3565904, 2189652, 279978, 3058524, 5547744, 4213472, 2663912, 5154144, 3723936, 2288294, 4642128, 3298976, 12
3171178, 4363728, 2902779, 5392816, 3974352, 2544343, 4895392, 3454288, 2121044, 4599200, 190811, 1774961, 4213168, 2794745, 5137584, 3697296, 2272934, 4746064, 3287904, 1878754, 272695, 3098987, 5294432, 3859664, 2517799, 4905632, 3431120, 2111187, 4597472, 3183328, 101677, 4114768, 2675929, 5158048, 3585680, 2315686, 4740528, 3417552, 1877426, 4362928, 182935, 5400912, 3830944, 2405800, 4893536, 3560368, 2108276, 4597104, 3166896, 1757873, 255637, 2648793, 5135008, 3713872, 2248405, 4737760, 3318640, 2049251, 4248224, 2873675, 5289296), 318 P = new Array(3954336, 2398119, 4888016, 3558112, 2140596, 4498640, 3068496, 1682081, 4109648, 165229, 5123488, 3708336, 2378613, 4737392, 3318960, 1881268, 4352656, 2796892, 5266256, 246454, 2528744, 4887280, 3557744, 2124132, 4510880, 2943580, 5428880, 4085456, 2829146, 320110, 3707616, 2280150, 4770128, 3200160, 1766562, 4240784, 2905820, 5264816, 3941840, 158011, 5018288, 3451216, 2077013, 4484256, 3059024, 1649505, 4082608, 2762233, 5252464, 230699, 2271910, 4647248, 3304096, 1751715, 4238160, 2902907, 5393120, 3843440, 2511575, 306470, 3463504, 1989973, 4478624, 3053264, 1725906, 4082400, 2663674, 5154e3, 3723856, 134505, 4633936, 3290528, 1878946, 4232624, 2967996, 5392752, 3974320, 2405048, 4876880, 214740, 2075476, 4467616, 3052400, 3035890, 5523824, 3957993, 6345888, 4909648, 3619494, 370029, 4598624, 3245539, 5673696, 4114811, 6596944, 5166240, 3725992, 6075728, 4740784, 3419556), 319 Q = new Array(5809616, 4362960, 2937522, 5417296, 3978457, 6318752, 4894032, 3561302, 6048672, 281179, 3229043, 5657264, 4303179, 6482256, 5139104, 3714472, 6200144, 4737888, 3320548, 363087, 4477536, 2871906, 5297488, 4020890, 6444704, 4888272, 3623382, 6048224, 4629712, 191821, 5558864, 4117819, 66e5, 5027232, 3773864, 6198704, 4868528, 3320180, 5809328, 273061, 2943569, 5270848, 3845563, 6433632, 5018480, 3558134, 6048112, 4613296, 3175587, 339365, 4090715, 6575824, 5253856, 3707879, 6197984, 4770144, 3395925, 5690528, 4250192, 185173, 5396128, 3843834, 6432208, 5018320, 3582646, 5941584, 4502688, 3062436, 5549392, 259418, 6572960, 5154224, 3887736, 6181552, 4745520, 3306837, 5794464, 4238160, 2906962, 337078, 4040042, 6333680, 5001824, 3467878, 5952816, 4479648, 3061411, 5543632, 4213472, 167069, 5154e3, 3723992, 6206032, 4633888, 3265861, 5680544, 4363728, 2905522, 5392816, 3974393), 320 q = new Array(6464688, 5024336, 3650647, 6056768, 4631968, 3169124, 5673840, 4344176, 2935153, 329291, 3828392, 6216272, 4872864, 3321541, 5809888, 4494064, 3166946, 5425504, 4052122, 404810, 5035344, 3562327, 6051488, 4630224, 3315156, 5673680, 4237660, 2806960, 5288608, 232282, 6204752, 4869536, 3451812, 5809520, 4477616, 3060339, 5531952, 3959483, 6449824, 314037, 3754839, 6048608, 4629872, 3298020, 5689696, 4122940, 6608160, 5167776, 3889961, 386413, 4868832, 3450325, 5939920, 4378960, 2943570, 5420320, 3987115, 6335904, 5002704, 230587, 6178224, 4629168, 3199668, 5679696, 4306220, 6581024, 5156192, 3823081, 6329200, 304215, 3450229, 5919408, 4483664, 2972242, 5397152, 4041547, 6465248, 5018336, 3589862, 379478, 4641952, 3074725, 5559632, 4216480, 2807201, 5154256, 3887833, 6312624, 4893008, 208213, 5812896, 4371792, 3042642, 5393824, 4040139, 6464880, 5132720, 3582327, 6055216, 4614800), 321 Y = new Array(3193507, 5679952, 4336544, 2927457, 5415792, 3953128, 6345056, 4908208, 3631398, 5823136, 4479824, 3217106, 5647072, 4104928, 2679506, 5163344, 3724630, 6075680, 4634256, 3300772, 5789136, 4335056, 2926003, 5415600, 4040887, 6334800, 4895904, 3519141, 5942608, 4478384, 3156852, 5645680, 4215545, 6574768, 5138768, 3698006, 6183584, 4631376, 3299028, 5786336, 4367728, 2966867, 5296800, 3926183, 6346064, 4872864, 3452325, 5936592, 4606688, 3058356, 5547216, 4117176, 6599312, 5027152, 3692375, 6172064, 4756944, 3296629, 5786032, 4367536, 2991283, 5270160, 3845528, 6318928, 4991840, 3511141, 5935984, 4606320, 3172708, 5432480, 3992170, 6478480, 5135056, 3746518, 6171360, 4756192, 3328725, 5687632, 4248736, 2872483, 5289616, 3823527, 6313392, 4990416, 3577269, 5935792, 4499792, 3070292, 5551264, 3978576, 2648914, 5133744, 3811190, 6169968, 4739760, 3320485, 5695824, 4221600, 2800291, 5286736), 322 F = new Array(3951576, 6441696, 5023088, 3691733, 6083168, 4512080, 3233108, 5658272, 4233936, 2774482, 5262048, 3843510, 6333648, 4772432, 3396181, 5813568, 4380320, 2928034, 5412272, 4147575, 6572400, 5022896, 3585205, 6056528, 4615488, 3124052, 5647200, 4232560, 2904818, 5261680, 3827046, 6214816, 4778576, 3369621, 5790416, 4467552, 3114723, 5411552, 4049111, 6474064, 5035168, 3528870, 5944656, 4609696, 3253684, 5645776, 4231888, 2806450, 5286224, 3716439, 6188192, 4765008, 3494741, 5787040, 4367792, 3097971, 5526192, 3975592, 6351184, 5008032, 3583654, 5942096, 4606816, 3189476, 5678448, 4215392, 2683491, 5167424, 3726151, 6084256, 4757200, 3427797, 5917392, 4367568, 2938036, 5419600, 3986776, 6337856, 4896160, 3626406, 6067632, 4606384, 3189108, 5678256, 4237904, 2730578, 5139744, 3779911, 6204256, 4756336, 3427061, 5917040, 4482224, 2913443, 5302864, 4024920, 6444704, 4893392, 3577557, 6066912), 323 K = new Array(4639072, 3070292, 5559456, 4119120, 2782546, 5133984, 3712935, 6202832, 4887216, 3320501, 5810512, 4371616, 2931364, 5287248, 3954137, 6441888, 5023152, 3625334, 6050416, 4614448, 3176756, 5532320, 4107600, 2775890, 5262176, 3712742, 6202592, 4772448, 3336805, 5690656, 4250272, 2971299, 53961
32376, 3951355, 6441424, 5022928, 3657910, 5943888, 4502816, 3071269, 5551520, 4085200, 2774450, 5261744, 3843447, 6202544, 4762192, 3387989, 5795104, 4238688, 2968419, 5395312, 4082152, 6343024, 5002416, 3631270, 5954128, 4479648, 3122852, 5548752, 4215520, 2675427, 5163344, 3724631, 6214816, 4643152, 3300693, 5789344, 4368080, 2905556, 5395120, 3975608, 6465840, 4895888, 3454630, 5942608, 4609440, 3058532, 5547376, 4215472, 2797939, 5138736, 3697463, 6187680, 4762960, 3353301, 5778272, 4367728, 3035876, 5296480, 3860824, 6346016, 4905616, 3496614, 5920464, 4598496, 3189204, 5546704, 4116816, 2681170), 324 W = new Array(5158176, 3725095, 6204832, 4871600, 3550645, 5916080, 4498096, 3060404, 5548368, 3978585, 6449952, 5025104, 3692390, 6050672, 4736368, 3302772, 5788336, 4221264, 2783571, 5266080, 3910311, 6203088, 4868832, 3515109, 5940560, 4379296, 3007140, 5428560, 4086459, 6444704, 5019344, 3754422, 6179504, 4630736, 3200181, 5681808, 4240720, 2780498, 5262752, 3904871, 6329712, 4868528, 3451253, 5924016, 4483728, 2931348, 5401424, 4074336, 2665313, 5018992, 3689190, 6082912, 4646048, 3075365, 5560976, 4217680, 2897619, 5253856, 3838935, 6329040, 4901200, 3331414, 5813408, 4372112, 3038612, 5395888, 4072954, 6563248, 5149360, 3582646, 6056272, 4617376, 3256997, 5549392, 4216224, 2796403, 5383536, 3822455, 6312624, 4876624, 3435862, 5790368, 4369232, 3036884, 5524192, 3974512, 2647250, 5034592, 3599014, 5952848, 4610720, 3190181, 5674448, 4213456, 2795955, 5285072, 3855031, 6206032, 4764992, 3396950), 325 X = ["Giáp", "Ất", "BÃnh", "Äinh", "Máºu", "Ká»·", "Canh", "Tân", "Nhâm", "Quý"], 326 z = ["Tý", "Sá»u", "Dần", "Mẹo", "Thìn", "Tỵ", "Ngá»", "Mùi", "Thân", "Dáºu", "Tuất", "Hợi"], 327 E = ["Chá»§ Nháºt", "Thứ Hai", "Thứ Ba", "Thứ Tư", "Thứ NÄm", "Thứ Sáu", "Thứ Bảy"], 328 J = ["110100101100", "001101001011", "110011010010", "101100110100", "001011001101", "010010110011"], 329 O = ["Xuân phân", "Thanh minh", "Cá»c vÅ©", "Láºp hạ", "Tiá»u mãn", "Mang chá»§ng", "Hạ chÃ", "Tiá»u thá»", "Äại thá»", "Láºp thu", "Xá» thá»", "Bạch lá»", "Thu phân", "Hà n lá»", "Sương giáng", "Láºp Äông", "Tiá»u tuyết", "Äại tuyết", "Äông chÃ", "Tiá»u hà n", "Äại hà n", "Láºp xuân", "VÅ© thá»§y", "Kinh tráºp"], 330 R = ["Má»t", "Hai", "Ba", "Bá»n", "NÄm", "Sáu", "Bảy", "Tám", "ChÃn", "Mưá»i", "Mưá»i má»t", "Mưá»i hai"], 331 U = ["CN", "T2", "T3", "T4", "T5", "T6", "T7"], 332 Z = { 333 solar: [{ 334 d: 1, 335 m: 1, 336 i: "Tết Dương lá»ch" 337 }, { 338 d: 9, 339 m: 1, 340 i: "Ngà y Há»c sinh - Sinh viên Viá»t Nam" 341 }, { 342 d: 3, 343 m: 2, 344 i: "Ngà y thà nh láºp Äảng Cá»ng sản Viá»t Nam" 345 }, { 346 d: 27, 347 m: 2, 348 i: "Ngà y Thầy thuá»c Viá»t Nam" 349 }, { 350 d: 8, 351 m: 3, 352 i: "Ngà y Quá»c tế Phụ nữ" 353 }, { 354 d: 8, 355 m: 3, 356 i: "Ngà y thà nh láºp Äoà n Thanh niên Cá»ng sản Há» Chà Minh" 357 }, { 358 d: 26, 359 m: 3, 360 i: "Ngà y thà nh láºp Äoà n Thanh niên Cá»ng sản Há» Chà Minh" 361 }, { 362 d: 21, 363 m: 4, 364 i: "Ngà y Sách Viá»t Nam" 365 }, { 366 d: 30, 367 m: 4, 368 i: "Ngà y Thá»ng nhất Äất nưá»c" 369 }, { 370 d: 1, 371 m: 5, 372 i: "Ngà y Quá»c tế Lao Äá»ng" 373 }, { 374 d: 15, 375 m: 5,
376 i: "Ngà y thà nh láºp Äá»i Thiếu niên Tiá»n phong Há» Chà Minh" 377 }, { 378 d: 19, 379 m: 5, 380 i: "Ngà y sinh cá»§a Chá»§ tá»ch Há» Chà Minh" 381 }, { 382 d: 1, 383 m: 6, 384 i: "Ngà y Quá»c tế Thiếu nhi" 385 }, { 386 d: 5, 387 m: 6, 388 i: "Ngà y Bác Há» ra Äi tìm ÄÆ°á»ng cứu nưá»c" 389 }, { 390 d: 27, 391 m: 7, 392 i: "Ngà y Thương binh Liá»t sÄ©" 393 }, { 394 d: 19, 395 m: 8, 396 i: "Ngà y Cách mạng tháng Tám thà nh công" 397 }, { 398 d: 2, 399 m: 9, 400 i: "Ngà y Quá»c khánh" 401 }, { 402 d: 13, 403 m: 10, 404 i: "Ngà y Doanh nhân Viá»t Nam" 405 }, { 406 d: 20, 407 m: 10, 408 i: "Ngà y thà nh láºp Há»i Phụ nữ Viá»t Nam" 409 }, { 410 d: 20, 411 m: 11, 412 i: "Ngà y Nhà giáo Viá»t Nam" 413 }, { 414 d: 22, 415 m: 12, 416 i: "Ngà y thà nh láºp Quân Äá»i Nhân dân Viá»t Nam" 417 }, { 418 d: 24, 419 m: 12, 420 i: "Ngà y Lá» Giáng Sinh" 421 }], 422 lunar: [{ 423 d: 1, 424 m: 1, 425 i: "Tết Nguyên Äán" 426 }, { 427 d: 15, 428 m: 1, 429 i: "Tết Nguyên tiêu" 430 }, { 431 d: 3, 432 m: 3, 433 i: "Tết Hà n thá»±c" 434 }, { 435 d: 10, 436 m: 3, 437 i: "Giá» Tá» Hùng Vương" 438 }, { 439 d: 15, 440 m: 4, 441 i: "Lá» Pháºt Äản" 442 }, { 443 d: 5, 444 m: 5, 445 i: "Tết Äoan ngá»" 446 }, { 447 d: 15, 448 m: 7, 449 i: "Vu Lan" 450 }, { 451 d: 15, 452 m: 8, 453 i: "Tết Trung thu" 454 }, { 455 d: 23, 456 m: 12, 457 i: "Ãng Táo chầu trá»i" 458 }] 459 }, 460 $ = r(31, 1, 1200), 461 _ = r(31, 12, 2199), 462 nn = Math.PI, 463 tn = new Date, 464 an = l(tn.getDate(), tn.getMonth() + 1, tn.getFullYear()), 465 rn = tn.getMonth() + 1, 466 en = tn.getFullYear(); 467 n.fn.amLich = function(a) { 468 k = n.extend({ 469 type: "month", 470 tableWidth: "500px" 471 }, a); 472 var r = this; 473 switch (r.on("click", "td.ngaythang, td.homnay, td.tet, td.leam, td.leduong", function(a) { 474 a.preventDefault(); 475 var e = n(this).attr("data-args"); 476 if (void 0 === e) return !1; 477 var i = e.split(","), 478 h = parseInt(i[0]), 479 d = parseInt(i[1]), 480 l = parseInt(i[2]), 481 o = parseInt(i[3]), 482 c = parseInt(i[4]), 483 u = parseInt(i[5]), 484 y = parseInt(i[6]), 485 v = parseInt(i[7]), 486 b = new t(h, d, l, o, c), 487 w = g(b), 488 M = G(u, y, h, d); 489 switch (s = "", k.type) { 490 case "year": 491 case "month": 492 s += "â " + m(b, u, y, v) + " âm lá»ch)\n", s += "â Ngà y " + w[0] + ", tháng " + w[1] + ", nÄm " + w[2] + "\n", s += "â Giá» Äầu ngà y " + (N(c) + " " + z[0]) + "\n", s += "â Tiết " + O[T(c + 1, 7)] + "\n", s += "â Giá» hoà ng Äạo: " + f(c) + "\n", s += "â PL: " + p(h, d, l) + "\n", s += "" != M ? "â " + M : "", alert(s); 493 break; 494 case "calendar": 495 r.find(".calendar .calendar-month").html("Tháng " + y + " NÄm " + v), r.find(".calendar .calendar-day .day-num").html(u), r.find(".calendar .calendar-day .day-tuan").html(E[(c + 1) % 7]), r.find(".calendar .lunar-d
495ay-num").html(h), r.find(".calendar .lunar-month-name").html("Tháng " + R[d - 1] + (1 == o ? " (N)" : "")), r.find(".calendar .lunar-year-name").html("<strong>" + w[2] + "</strong>"), r.find(".calendar .calendar-holiday").html("" != M ? '<td colspan="2">' + M + "</td>" : ""), r.find(".calendar .calendar-hoangdao").html("Giá» hoà ng Äạo: " + f(c)), s += "<span>Ngà y <strong>" + w[0] + "</strong></span><br>\n", s += "<span>Tháng <strong>" + w[1] + "</strong></span><br>\n", s += "<span>Giá» Äầu <strong>" + (N(c) + " " + z[0]) + "</strong></span><br>\n", s += "<span>Tiết <strong>" + O[T(c + 1, 7)] + "</strong></span><br>", s += "<span>PL: <strong>" + p(h, d, l) + "</strong></span>\n", r.find(".calendar .calendar-b-right").html(s) 496 } 497 }), r.on("click", "a.prev-year, a.prev-month, a.next-month, a.next-year", function(t) { 498 t.preventDefault(); 499 var a = n(this).data("yy"), 500 e = n(this).data("mm"); 501 return r.html(b(e, a)) 502 }), r.on("click", "td.ngaytuan", function(n) { 503 n.preventDefault() 504 }), k.type) { 505 case "month": 506 return r.html(b(rn, en)); 507 case "year": 508 return r.html(w(en)); 509 case "calendar": 510 return r.html(b(rn, en)); 511 case "text": 512 return r.html(y()) 513 } 514 } 515}(jQuery); 516} 517 518// -------------------------------------------------------------------- tinh khoan vay 519var loan = document.getElementById("so_tien_vay_direction"); 520if(loan != null){ 521! function(t, e) { 522 "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e((t = "undefined" != typeof globalThis ? globalThis : t || self).noUiSlider = {}) 523}(this, (function(t) { 524 "use strict"; 525 526 function e(t) { 527 return "object" == typeof t && "function" == typeof t.to 528 } 529 530 function r(t) { 531 t.parentElement.removeChild(t) 532 } 533 534 function n(t) { 535 return null != t 536 } 537 538 function i(t) { 539 t.preventDefault() 540 } 541 542 function o(t) { 543 return "number" == typeof t && !isNaN(t) && isFinite(t) 544 } 545 546 function s(t, e, r) { 547 0 < r && (c(t, e), setTimeout((function() { 548 p(t, e) 549 }), r)) 550 } 551 552 function a(t) { 553 return Math.max(Math.min(t, 100), 0) 554 } 555 556 function l(t) { 557 return Array.isArray(t) ? t : [t] 558 } 559 560 function u(t) { 561 return 1 < (t = (t = String(t)).split(".")).length ? t[1].length : 0 562 } 563 564 function c(t, e) { 565 t.classList && !/\s/.test(e) ? t.classList.add(e) : t.className += " " + e 566 } 567 568 function p(t, e) { 569 t.classList && !/\s/.test(e) ? t.classList.remove(e) : t.className = t.className.replace(new RegExp("(^|\\b)" + e.split(" ").join("|") + "(\\b|$)", "gi"), " ") 570 } 571 572 function f(t) { 573 var e = void 0 !== window.pageXOffset, 574 r = "CSS1Compat" === (t.compatMode || ""); 575 return { 576 x: e ? window.pageXOffset : (r ? t.documentElement : t.body).scrollLeft, 577 y: e ? window.pageYOffset : (r ? t.documentElement : t.body).scrollTop 578 } 579 } 580 581 function d(t, e) { 582 return 100 / (e - t) 583 } 584 585 function h(t, e, r) { 586 return 100 * e / (t[r + 1] - t[r]) 587 } 588 589 function m(t, e) { 590 for (var r = 1; t >= e[r];) r += 1; 591 return r 592 } 593 t.PipsMode = void 0, (W = t.PipsMode || (t.PipsMode = {})).Range = "range", W.Steps = "steps", W.Positions = "positions", W.Count = "count", W.Values = "values", t.PipsType = void 0, (W = t.PipsType || (t.PipsType = {}))[W.None = -1] = "None", W[W.NoValue = 0] = "NoValue", W[W.LargeValue = 1] = "LargeValue", W[W.SmallValue = 2] = "SmallValue"; 594 var b = (g.prototype.getDistance = function(t) { 595 for (var e = [], r = 0; r < this.xNumSteps.length - 1; r++) e[r] = h(this.xVal, t, r); 596 return e 597 }, g.prototype.getAbsoluteDistance = function(t, e, r) { 598 var n = 0; 599 if (t < this.xPct[this.xPct.length - 1]) 600 for (; t > this.xPct[n + 1];) n++; 601 else t === this.xPct[this.xPct.length - 1] && (n = this.xPct.length - 2); 602 r || t !== this.xPct[n + 1] || n++; 603 for (var i, o = 1, s = (e = null === e ? [] : e)[n], a = 0, l = 0, u = 0, c = r ? (t - this.xPct[n]) / (this.xPct[n + 1] - this.xPct[n]) : (this.xPct[n + 1] - t) / (this.xPct[n + 1] - this.xPct[n]); 0 < s;) i = this.xPct[n + 1 + u] - this.xPct[n + u], 100 < e[n + u] * o + 100 - 100 * c ? (a = i * c, o = (s - 100 * c) / e[n + u], c = 1) : (a = e[n + u] * i / 100 * o, o = 0), r ? (l -= a, 1 <= this.xPct.length + u && u--) : (l += a, 1 <= this.xPct.length - u && u++), s = e[n + u] * o; 604 return t + l 605 }, g.prototype.toStepping = function(t) { 606 return function(t, e, r) { 607 if (r >= t.slice(-1)[0]) return 100; 608 var n = t[(o = m(r, t)) - 1], 609 i = t[o], 610 o = (t = e[o - 1], e[o]); 611 return t + h(i = [n, i], i[0] < 0 ? r + Math.abs(i[0]) : r - i[0], 0) / d(t, o) 612 }(this.xVal, this.xPct, t) 613 }, g.prototype.fromStepping = function(t) { 614 return function(t, e, r) { 615 if (100 <= r) return t.slice(-1)[0]; 616 var n, i = t[(n = m(r, e)) - 1], 617 o = t[n]; 618 return (r - (t = e[n - 1])) * d(t, n = e[n]) * ((o = [i, o])[1] - o[0]) / 100 + o[0] 619 }(this.xVal, this.xPct, t) 620 }, g.prototype.getStep = function(t) { 621 return function(t, e, r, n) { 622 if (100 === n) return n; 623 var i = m(n, t), 624 o = t[i - 1], 625 s = t[i]; 626 return r ? (s - o) / 2 < n - o ? s : o : e[i - 1] ? t[i - 1] + (t = n
vendor: 11,225 bytes, lines 626-899
626- t[i - 1], i = e[i - 1], Math.round(t / i) * i) : n 627 }(this.xPct, this.xSteps, this.snap, t) 628 }, g.prototype.getDefaultStep = function(t, e, r) { 629 var n = m(t, this.xPct); 630 return (100 === t || e && t === this.xPct[n - 1]) && (n = Math.max(n - 1, 1)), (this.xVal[n] - this.xVal[n - 1]) / r 631 }, g.prototype.getNearbySteps = function(t) { 632 return t = m(t, this.xPct), { 633 stepBefore: { 634 startValue: this.xVal[t - 2], 635 step: this.xNumSteps[t - 2], 636 highestStep: this.xHighestCompleteStep[t - 2] 637 }, 638 thisStep: { 639 startValue: this.xVal[t - 1], 640 step: this.xNumSteps[t - 1], 641 highestStep: this.xHighestCompleteStep[t - 1] 642 }, 643 stepAfter: { 644 startValue: this.xVal[t], 645 step: this.xNumSteps[t], 646 highestStep: this.xHighestCompleteStep[t] 647 } 648 } 649 }, g.prototype.countStepDecimals = function() { 650 var t = this.xNumSteps.map(u); 651 return Math.max.apply(null, t) 652 }, g.prototype.hasNoSize = function() { 653 return this.xVal[0] === this.xVal[this.xVal.length - 1] 654 }, g.prototype.convert = function(t) { 655 return this.getStep(this.toStepping(t)) 656 }, g.prototype.handleEntryPoint = function(t, e) { 657 if (!o(t = "min" === t ? 0 : "max" === t ? 100 : parseFloat(t)) || !o(e[0])) throw new Error("noUiSlider: 'range' value isn't numeric."); 658 this.xPct.push(t), this.xVal.push(e[0]), e = Number(e[1]), t ? this.xSteps.push(!isNaN(e) && e) : isNaN(e) || (this.xSteps[0] = e), this.xHighestCompleteStep.push(0) 659 }, g.prototype.handleStepPoint = function(t, e) { 660 e && (this.xVal[t] !== this.xVal[t + 1] ? (this.xSteps[t] = h([this.xVal[t], this.xVal[t + 1]], e, 0) / d(this.xPct[t], this.xPct[t + 1]), e = (this.xVal[t + 1] - this.xVal[t]) / this.xNumSteps[t], e = Math.ceil(Number(e.toFixed(3)) - 1), e = this.xVal[t] + this.xNumSteps[t] * e, this.xHighestCompleteStep[t] = e) : this.xSteps[t] = this.xHighestCompleteStep[t] = this.xVal[t]) 661 }, g); 662 663 function g(t, e, r) { 664 var n; 665 this.xPct = [], this.xVal = [], this.xSteps = [], this.xNumSteps = [], this.xHighestCompleteStep = [], this.xSteps = [r || !1], this.xNumSteps = [!1], this.snap = e; 666 var i = []; 667 for (Object.keys(t).forEach((function(e) { 668 i.push([l(t[e]), e]) 669 })), i.sort((function(t, e) { 670 return t[0][0] - e[0][0] 671 })), n = 0; n < i.length; n++) this.handleEntryPoint(i[n][1], i[n][0]); 672 for (this.xNumSteps = this.xSteps.slice(0), n = 0; n < this.xNumSteps.length; n++) this.handleStepPoint(n, this.xNumSteps[n]) 673 } 674 var x = { 675 to: function(t) { 676 return void 0 === t ? "" : t.toFixed(2) 677 }, 678 from: Number 679 }, 680 v = { 681 target: "target", 682 base: "base", 683 origin: "origin", 684 handle: "handle", 685 handleLower: "handle-lower", 686 handleUpper: "handle-upper", 687 touchArea: "touch-area", 688 horizontal: "horizontal", 689 vertical: "vertical", 690 background: "background", 691 connect: "connect", 692 connects: "connects", 693 ltr: "ltr", 694 rtl: "rtl", 695 textDirectionLtr: "txt-dir-ltr", 696 textDirectionRtl: "txt-dir-rtl", 697 draggable: "draggable", 698 drag: "state-drag", 699 tap: "state-tap", 700 active: "active", 701 tooltip: "tooltip", 702 pips: "pips", 703 pipsHorizontal: "pips-horizontal", 704 pipsVertical: "pips-vertical", 705 marker: "marker", 706 markerHorizontal: "marker-horizontal", 707 markerVertical: "marker-vertical", 708 markerNormal: "marker-normal", 709 markerLarge: "marker-large", 710 markerSub: "marker-sub", 711 value: "value", 712 valueHorizontal: "value-horizontal", 713 valueVertical: "value-vertical", 714 valueNormal: "value-normal", 715 valueLarge: "value-large", 716 valueSub: "value-sub" 717 }, 718 y = ".__tooltips", 719 S = ".__aria"; 720 721 function w(t, e) { 722 if (!o(e)) throw new Error("noUiSlider: 'step' is not numeric."); 723 t.singleStep = e 724 } 725 726 function _(t, e) { 727 if (!o(e)) throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric."); 728 t.keyboardPageMultiplier = e 729 } 730 731 function E(t, e) { 732 if (!o(e)) throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric."); 733 t.keyboardMultiplier = e 734 } 735 736 function P(t, e) { 737 if (!o(e)) throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric."); 738 t.keyboardDefaultStep = e 739 } 740 741 function N(t, e) { 742 if ("object" != typeof e || Array.isArray(e)) throw new Error("noUiSlider: 'range' is not an object."); 743 if (void 0 === e.min || void 0 === e.max) throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'."); 744 t.spectrum = new b(e, t.snap || !1, t.singleStep) 745 } 746 747 function C(t, e) { 748 if (e = l(e), !Array.isArray(e) || !e.length) throw new Error("noUiSlider: 'start' option is incorrect."); 749 t.handles = e.length, t.start = e 750 } 751 752 function k(t, e) { 753 if ("boolean" != typeof e) throw new Error("noUiSlider: 'snap' option must be a boolean."); 754 t.snap = e 755 } 756 757 function V(t, e) { 758 if ("boolean" != typeof e) throw new Error("noUiSlider: 'animate' option must be a boolean."); 759 t.animate = e 760 } 761 762 function M(t, e) { 763 if ("number" != typeof e) throw new Error("noUiSlider: 'animationDuration' option must be a number."); 764 t.animationDuration = e 765 } 766 767 function U(t, e) { 768 var r, n = [!1]; 769 if ("lower" === e ? e = [!0, !1] : "upper" === e && (e = [!1, !0]), !0 === e || !1 === e) { 770 for (r = 1; r < t.handles; r++) n.push(e); 771 n.push(!1) 772 } else { 773 if (!Array.isArray(e) || !e.length || e.length !== t.handles + 1) throw new Error("noUiSlider: 'connect' option doesn't match handle count."); 774 n = e 775 } 776 t.connect = n 777 } 778 779 function A(t, e) { 780 switch (e) { 781 case "horizontal": 782 t.ort = 0; 783 break; 784 case "vertical": 785 t.ort = 1; 786 break; 787 default: 788 throw new Error("noUiSlider: 'orientation' option is invalid.") 789 } 790 } 791 792 function D(t, e) { 793 if (!o(e)) throw new Error("noUiSlider: 'margin' option must be numeric."); 794 0 !== e && (t.margin = t.spectrum.getDistance(e)) 795 } 796 797 function $(t, e) { 798 if (!o(e)) throw new Error("noUiSlider: 'limit' option must be numeric."); 799 if (t.limit = t.spectrum.getDistance(e), !t.limit || t.handles < 2) throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.") 800 } 801 802 function O(t, e) { 803 var r; 804 if (!o(e) && !Array.isArray(e)) throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers."); 805 if (Array.isArray(e) && 2 !== e.length && !o(e[0]) && !o(e[1])) throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers."); 806 if (0 !== e) { 807 for (Array.isArray(e) || (e = [e, e]), t.padding = [t.spectrum.getDistance(e[0]), t.spectrum.getDistance(e[1])], r = 0; r < t.spectrum.xNumSteps.length - 1; r++) 808 if (t.padding[0][r] < 0 || t.padding[1][r] < 0) throw new Error("noUiSlider: 'padding' option must be a positive number(s)."); 809 var n = e[0] + e[1]; 810 e = t.spectrum.xVal[0]; 811 if (1 < n / (t.spectrum.xVal[t.spectrum.xVal.length - 1] - e)) throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.") 812 } 813 } 814 815 function T(t, e) { 816 switch (e) { 817 case "ltr": 818 t.dir = 0; 819 break; 820 case "rtl": 821 t.dir = 1; 822 break; 823 default: 824 throw new Error("noUiSlider: 'direction' option was not recognized.") 825 } 826 } 827 828 function L(t, e) { 829 if ("string" != typeof e) throw new Error("noUiSlider: 'behaviour' must be a string containing options."); 830 var r = 0 <= e.indexOf("tap"), 831 n = 0 <= e.indexOf("drag"), 832 i = 0 <= e.indexOf("fixed"), 833 o = 0 <= e.indexOf("snap"), 834 s = 0 <= e.indexOf("hover"), 835 a = 0 <= e.indexOf("unconstrained"), 836 l = 0 <= e.indexOf("drag-all"); 837 e = 0 <= e.indexOf("smooth-steps"); 838 if (i) { 839 if (2 !== t.handles) throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles"); 840 D(t, t.start[1] - t.start[0]) 841 } 842 if (a && (t.margin || t.limit)) throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit"); 843 t.events = { 844 tap: r || o, 845 drag: n, 846 dragAll: l, 847 smoothSteps: e, 848 fixed: i, 849 snap: o, 850 hover: s, 851 unconstrained: a 852 } 853 } 854 855 function j(t, r) { 856 if (!1 !== r) 857 if (!0 === r || e(r)) { 858 t.tooltips = []; 859 for (var n = 0; n < t.handles; n++) t.tooltips.push(r) 860 } else { 861 if ((r = l(r)).length !== t.handles) throw new Error("noUiSlider: must pass a formatter for all handles."); 862 r.forEach((function(t) { 863 if ("boolean" != typeof t && !e(t)) throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.") 864 })), t.tooltips = r 865 } 866 } 867 868 function F(t, e) { 869 if (e.length !== t.handles) throw new Error("noUiSlider: must pass a attributes for all handles."); 870 t.handleAttributes = e 871 } 872 873 function z(t, r) { 874 if (!e(r)) throw new Error("noUiSlider: 'ariaFormat' requires 'to' method."); 875 t.ariaFormat = r 876 } 877 878 function H(t, r) { 879 if (!e(n = r) || "function" != typeof n.from) throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods."); 880 var n; 881 t.format = r 882 } 883 884 function R(t, e) { 885 if ("boolean" != typeof e) throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean."); 886 t.keyboardSupport = e 887 } 888 889 function I(t, e) { 890 t.documentElement = e 891 } 892 893 function B(t, e) { 894 if ("string" != typeof e && !1 !== e) throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`."); 895 t.cssPrefix = e 896 } 897 898 function q(t, e) { 899 if ("object" != typeof e) throw new Error("noUiSlider: 'cssClasse
vendor: 5,635 bytes, lines 899-1080
899s' must be an object."); 900 "string" == typeof t.cssPrefix ? (t.cssClasses = {}, Object.keys(e).forEach((function(r) { 901 t.cssClasses[r] = t.cssPrefix + e[r] 902 }))) : t.cssClasses = e 903 } 904 905 function X(t) { 906 var e = { 907 margin: null, 908 limit: null, 909 padding: null, 910 animate: !0, 911 animationDuration: 300, 912 ariaFormat: x, 913 format: x 914 }, 915 r = { 916 step: { 917 r: !1, 918 t: w 919 }, 920 keyboardPageMultiplier: { 921 r: !1, 922 t: _ 923 }, 924 keyboardMultiplier: { 925 r: !1, 926 t: E 927 }, 928 keyboardDefaultStep: { 929 r: !1, 930 t: P 931 }, 932 start: { 933 r: !0, 934 t: C 935 }, 936 connect: { 937 r: !0, 938 t: U 939 }, 940 direction: { 941 r: !0, 942 t: T 943 }, 944 snap: { 945 r: !1, 946 t: k 947 }, 948 animate: { 949 r: !1, 950 t: V 951 }, 952 animationDuration: { 953 r: !1, 954 t: M 955 }, 956 range: { 957 r: !0, 958 t: N 959 }, 960 orientation: { 961 r: !1, 962 t: A 963 }, 964 margin: { 965 r: !1, 966 t: D 967 }, 968 limit: { 969 r: !1, 970 t: $ 971 }, 972 padding: { 973 r: !1, 974 t: O 975 }, 976 behaviour: { 977 r: !0, 978 t: L 979 }, 980 ariaFormat: { 981 r: !1, 982 t: z 983 }, 984 format: { 985 r: !1, 986 t: H 987 }, 988 tooltips: { 989 r: !1, 990 t: j 991 }, 992 keyboardSupport: { 993 r: !0, 994 t: R 995 }, 996 documentElement: { 997 r: !1, 998 t: I 999 }, 1000 cssPrefix: { 1001 r: !0, 1002 t: B 1003 }, 1004 cssClasses: { 1005 r: !0, 1006 t: q 1007 }, 1008 handleAttributes: { 1009 r: !1, 1010 t: F 1011 } 1012 }, 1013 i = { 1014 connect: !1, 1015 direction: "ltr", 1016 behaviour: "tap", 1017 orientation: "horizontal", 1018 keyboardSupport: !0, 1019 cssPrefix: "noUi-", 1020 cssClasses: v, 1021 keyboardPageMultiplier: 5, 1022 keyboardMultiplier: 1, 1023 keyboardDefaultStep: 10 1024 }; 1025 t.format && !t.ariaFormat && (t.ariaFormat = t.format), Object.keys(r).forEach((function(o) { 1026 if (n(t[o]) || void 0 !== i[o]) r[o].t(e, (n(t[o]) ? t : i)[o]); 1027 else if (r[o].r) throw new Error("noUiSlider: '" + o + "' is required.") 1028 })), e.pips = t.pips; 1029 var o = void 0 !== (s = document.createElement("div")).style.msTransform, 1030 s = void 0 !== s.style.transform; 1031 return e.transformRule = s ? "transform" : o ? "msTransform" : "webkitTransform", e.style = [ 1032 ["left", "top"], 1033 ["right", "bottom"] 1034 ][e.dir][e.ort], e 1035 } 1036 1037 function Y(e, o, u) { 1038 var d, h, m, b, g, x, v = window.navigator.pointerEnabled ? { 1039 start: "pointerdown", 1040 move: "pointermove", 1041 end: "pointerup" 1042 } : window.navigator.msPointerEnabled ? { 1043 start: "MSPointerDown", 1044 move: "MSPointerMove", 1045 end: "MSPointerUp" 1046 } : { 1047 start: "mousedown touchstart", 1048 move: "mousemove touchmove", 1049 end: "mouseup touchend" 1050 }, 1051 w = window.CSS && CSS.supports && CSS.supports("touch-action", "none") && function() { 1052 var t = !1; 1053 try { 1054 var e = Object.defineProperty({}, "passive", { 1055 get: function() { 1056 t = !0 1057 } 1058 }); 1059 window.addEventListener("test", null, e) 1060 } catch (t) {} 1061 return t 1062 }(), 1063 _ = e, 1064 E = o.spectrum, 1065 P = [], 1066 N = [], 1067 C = [], 1068 k = 0, 1069 V = {}, 1070 M = e.ownerDocument, 1071 U = o.documentElement || M.documentElement, 1072 A = M.body, 1073 D = "rtl" === M.dir || 1 === o.ort ? 0 : 100; 1074 1075 function $(t, e) { 1076 var r = M.createElement("div"); 1077 return e && c(r, e), t.appendChild(r), r 1078 } 1079 1080 function O(t, e) {
1081 t = $(t, o.cssClasses.origin); 1082 var r, n = $(t, o.cssClasses.handle); 1083 return $(n, o.cssClasses.touchArea), n.setAttribute("data-handle", String(e)), o.keyboardSupport && (n.setAttribute("tabindex", "0"), n.addEventListener("keydown", (function(t) { 1084 return function(t, e) { 1085 if (j() || F(e)) return !1; 1086 var r = ["Left", "Right"], 1087 n = ["Down", "Up"], 1088 i = ["PageDown", "PageUp"], 1089 s = ["Home", "End"]; 1090 o.dir && !o.ort ? r.reverse() : o.ort && !o.dir && (n.reverse(), i.reverse()); 1091 var a = t.key.replace("Arrow", ""), 1092 l = a === i[0], 1093 u = a === i[1]; 1094 i = a === n[0] || a === r[0] || l, n = a === n[1] || a === r[1] || u, r = a === s[0], s = a === s[1]; 1095 if (!(i || n || r || s)) return !0; 1096 if (t.preventDefault(), n || i) { 1097 var c = i ? 0 : 1; 1098 if (null === (c = ft(e)[c])) return !1; 1099 !1 === c && (c = E.getDefaultStep(N[e], i, o.keyboardDefaultStep)), c *= u || l ? o.keyboardPageMultiplier : o.keyboardMultiplier, c = Math.max(c, 1e-7), c *= i ? -1 : 1, c = P[e] + c 1100 } else c = s ? o.spectrum.xVal[o.spectrum.xVal.length - 1] : o.spectrum.xVal[0]; 1101 return at(e, E.toStepping(c), !0, !0), et("slide", e), et("update", e), et("change", e), et("set", e), !1 1102 }(t, e) 1103 }))), void 0 !== o.handleAttributes && (r = o.handleAttributes[e], Object.keys(r).forEach((function(t) { 1104 n.setAttribute(t, r[t]) 1105 }))), n.setAttribute("role", "slider"), n.setAttribute("aria-orientation", o.ort ? "vertical" : "horizontal"), 0 === e ? c(n, o.cssClasses.handleLower) : e === o.handles - 1 && c(n, o.cssClasses.handleUpper), t 1106 } 1107 1108 function T(t, e) { 1109 return !!e && $(t, o.cssClasses.connect) 1110 } 1111 1112 function L(t, e) { 1113 return !(!o.tooltips || !o.tooltips[e]) && $(t.firstChild, o.cssClasses.tooltip) 1114 } 1115 1116 function j() { 1117 return _.hasAttribute("disabled") 1118 } 1119 1120 function F(t) { 1121 return h[t].hasAttribute("disabled") 1122 } 1123 1124 function z() { 1125 g && (tt("update" + y), g.forEach((function(t) { 1126 t && r(t) 1127 })), g = null) 1128 } 1129 1130 function H() { 1131 z(), g = h.map(L), Z("update" + y, (function(t, e, r) { 1132 g && o.tooltips && !1 !== g[e] && (t = t[e], !0 !== o.tooltips[e] && (t = o.tooltips[e].to(r[e])), g[e].innerHTML = t) 1133 })) 1134 } 1135 1136 function R(t, e) { 1137 return t.map((function(t) { 1138 return E.fromStepping(e ? E.getStep(t) : t) 1139 })) 1140 } 1141 1142 function I() { 1143 b && (r(b), b = null) 1144 } 1145 1146 function B(e) { 1147 I(); 1148 var r = function(e) { 1149 var r = function(e) { 1150 if (e.mode === t.PipsMode.Range || e.mode === t.PipsMode.Steps) return E.xVal; 1151 if (e.mode !== t.PipsMode.Count) return e.mode === t.PipsMode.Positions ? R(e.values, e.stepped) : e.mode === t.PipsMode.Values ? e.stepped ? e.values.map((function(t) { 1152 return E.fromStepping(E.getStep(E.toStepping(t))) 1153 })) : e.values : []; 1154 if (e.values < 2) throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'."); 1155 for (var r = e.values - 1, n = 100 / r, i = []; r--;) i[r] = r * n; 1156 return i.push(100), R(i, e.stepped) 1157 }(e), 1158 n = {}, 1159 i = E.xVal[0], 1160 o = E.xVal[E.xVal.length - 1], 1161 s = !1, 1162 a = !1, 1163 l = 0; 1164 return (r = r.slice().sort((function(t, e) { 1165 return t - e 1166 })).filter((function(t) { 1167 return !this[t] && (this[t] = !0) 1168 }), {}))[0] !== i && (r.unshift(i), s = !0), r[r.length - 1] !== o && (r.push(o), a = !0), r.forEach((function(i, o) { 1169 var u, c, p, f, d, h, m, b, g = r[o + 1], 1170 x = e.mode === t.PipsMode.Steps, 1171 v = (v = x ? E.xNumSteps[o] : v) || g - i; 1172 for (void 0 === g && (g = i), v = Math.max(v, 1e-7), u = i; u <= g; u = Number((u + v).toFixed(7))) { 1173 for (h = (f = (p = E.toStepping(u)) - l) / (e.density || 1), b = f / (m = Math.round(h)), c = 1; c <= m; c += 1) n[(d = l + c * b).toFixed(5)] = [E.fromStepping(d), 0]; 1174 h = -1 < r.indexOf(u) ? t.PipsType.LargeValue : x ? t.PipsType.SmallValue : t.PipsType.NoValue, !o && s && u !== g && (h = 0), u === g && a || (n[p.toFixed(5)] = [u, h]), l = p 1175 } 1176 })), n 1177 }(e), 1178 n = e.filter; 1179 e = e.format || { 1180 to: function(t) { 1181 return String(Math.round(t)) 1182 } 1183 }; 1184 return b = _.appendChild(function(e, r, n) { 1185 var i, s = M.createElement("div"), 1186 a = ((i = {}
1186)[t.PipsType.None] = "", i[t.PipsType.NoValue] = o.cssClasses.valueNormal, i[t.PipsType.LargeValue] = o.cssClasses.valueLarge, i[t.PipsType.SmallValue] = o.cssClasses.valueSub, i), 1187 l = ((i = {})[t.PipsType.None] = "", i[t.PipsType.NoValue] = o.cssClasses.markerNormal, i[t.PipsType.LargeValue] = o.cssClasses.markerLarge, i[t.PipsType.SmallValue] = o.cssClasses.markerSub, i), 1188 u = [o.cssClasses.valueHorizontal, o.cssClasses.valueVertical], 1189 p = [o.cssClasses.markerHorizontal, o.cssClasses.markerVertical]; 1190 1191 function f(t, e) { 1192 var r = e === o.cssClasses.value; 1193 return e + " " + (r ? u : p)[o.ort] + " " + (r ? a : l)[t] 1194 } 1195 return c(s, o.cssClasses.pips), c(s, 0 === o.ort ? o.cssClasses.pipsHorizontal : o.cssClasses.pipsVertical), Object.keys(e).forEach((function(i) { 1196 var a, l, u; 1197 l = e[a = i][0], u = e[i][1], (u = r ? r(l, u) : u) !== t.PipsType.None && ((i = $(s, !1)).className = f(u, o.cssClasses.marker), i.style[o.style] = a + "%", u > t.PipsType.NoValue && ((i = $(s, !1)).className = f(u, o.cssClasses.value), i.setAttribute("data-value", String(l)), i.style[o.style] = a + "%", i.innerHTML = String(n.to(l)))) 1198 })), s 1199 }(r, n, e)) 1200 } 1201 1202 function q() { 1203 var t = d.getBoundingClientRect(), 1204 e = "offset" + ["Width", "Height"][o.ort]; 1205 return 0 === o.ort ? t.width || d[e] : t.height || d[e] 1206 } 1207 1208 function Y(t, e, r, n) { 1209 function i(i) { 1210 var s, a = function(t, e, r) { 1211 var n = 0 === t.type.indexOf("touch"), 1212 i = 0 === t.type.indexOf("mouse"), 1213 o = 0 === t.type.indexOf("pointer"), 1214 s = 0, 1215 a = 0; 1216 if (0 === t.type.indexOf("MSPointer") && (o = !0), "mousedown" === t.type && !t.buttons && !t.touches) return !1; 1217 if (n) { 1218 var l = function(e) { 1219 return (e = e.target) === r || r.contains(e) || t.composed && t.composedPath().shift() === r 1220 }; 1221 if ("touchstart" === t.type) { 1222 if (1 < (n = Array.prototype.filter.call(t.touches, l)).length) return !1; 1223 s = n[0].pageX, a = n[0].pageY 1224 } else { 1225 if (!(l = Array.prototype.find.call(t.changedTouches, l))) return !1; 1226 s = l.pageX, a = l.pageY 1227 } 1228 } 1229 return e = e || f(M), (i || o) && (s = t.clientX + e.x, a = t.clientY + e.y), t.pageOffset = e, t.points = [s, a], t.cursor = i || o, t 1230 }(i, n.pageOffset, n.target || e); 1231 return !!a && !(j() && !n.doNotReject) && (s = _, i = o.cssClasses.tap, !((s.classList ? s.classList.contains(i) : new RegExp("\\b" + i + "\\b").test(s.className)) && !n.doNotReject) && !(t === v.start && void 0 !== a.buttons && 1 < a.buttons) && (!n.hover || !a.buttons) && (w || a.preventDefault(), a.calcPoint = a.points[o.ort], void r(a, n))) 1232 } 1233 var s = []; 1234 return t.split(" ").forEach((function(t) { 1235 e.addEventListener(t, i, !!w && { 1236 passive: !0 1237 }), s.push([t, i]) 1238 })), s 1239 } 1240 1241 function Q(t) { 1242 var e, r, n = a(n = 100 * (t - (n = d, e = o.ort, r = n.getBoundingClientRect(), n = (t = n.ownerDocument).documentElement, t = f(t), /webkit.*Chrome.*Mobile/i.test(navigator.userAgent) && (t.x = 0), e ? r.top + t.y - n.clientTop : r.left + t.x - n.clientLeft)) / q()); 1243 return o.dir ? 100 - n : n 1244 } 1245 1246 function W(t, e) { 1247 "mouseout" === t.type && "HTML" === t.target.nodeName && null === t.relatedTarget && J(t, e) 1248 } 1249 1250 function G(t, e) { 1251 if (-1 === navigator.appVersion.indexOf("MSIE 9") && 0 === t.buttons && 0 !== e.buttonsProperty) return J(t, e); 1252 it(0 < (t = (o.dir ? -1 : 1) * (t.calcPoint - e.startCalcPoint)), 100 * t / e.baseSize, e.locations, e.handleNumbers, e.connect) 1253 } 1254 1255 function J(t, e) {
1256 e.handle && (p(e.handle, o.cssClasses.active), --k), e.listeners.forEach((function(t) { 1257 U.removeEventListener(t[0], t[1]) 1258 })), 0 === k && (p(_, o.cssClasses.drag), st(), t.cursor && (A.style.cursor = "", A.removeEventListener("selectstart", i))), o.events.smoothSteps && (e.handleNumbers.forEach((function(t) { 1259 at(t, N[t], !0, !0, !1, !1) 1260 })), e.handleNumbers.forEach((function(t) { 1261 et("update", t) 1262 }))), e.handleNumbers.forEach((function(t) { 1263 et("change", t), et("set", t), et("end", t) 1264 })) 1265 } 1266 1267 function K(t, e) { 1268 var r, n, s, a; 1269 e.handleNumbers.some(F) || (1 === e.handleNumbers.length && (a = h[e.handleNumbers[0]].children[0], k += 1, c(a, o.cssClasses.active)), t.stopPropagation(), n = Y(v.move, U, G, { 1270 target: t.target, 1271 handle: a, 1272 connect: e.connect, 1273 listeners: r = [], 1274 startCalcPoint: t.calcPoint, 1275 baseSize: q(), 1276 pageOffset: t.pageOffset, 1277 handleNumbers: e.handleNumbers, 1278 buttonsProperty: t.buttons, 1279 locations: N.slice() 1280 }), s = Y(v.end, U, J, { 1281 target: t.target, 1282 handle: a, 1283 listeners: r, 1284 doNotReject: !0, 1285 handleNumbers: e.handleNumbers 1286 }), a = Y("mouseout", U, W, { 1287 target: t.target, 1288 handle: a, 1289 listeners: r, 1290 doNotReject: !0, 1291 handleNumbers: e.handleNumbers 1292 }), r.push.apply(r, n.concat(s, a)), t.cursor && (A.style.cursor = getComputedStyle(t.target).cursor, 1 < h.length && c(_, o.cssClasses.drag), A.addEventListener("selectstart", i, !1)), e.handleNumbers.forEach((function(t) { 1293 et("start", t) 1294 }))) 1295 } 1296 1297 function Z(t, e) { 1298 V[t] = V[t] || [], V[t].push(e), "update" === t.split(".")[0] && h.forEach((function(t, e) { 1299 et("update", e) 1300 })) 1301 } 1302 1303 function tt(t) { 1304 var e = t && t.split(".")[0], 1305 r = e ? t.substring(e.length) : t; 1306 Object.keys(V).forEach((function(t) { 1307 var n = t.split(".")[0], 1308 i = t.substring(n.length); 1309 e && e !== n || r && r !== i || ((n = i) !== S && n !== y || r === i) && delete V[t] 1310 })) 1311 } 1312 1313 function et(t, e, r) { 1314 Object.keys(V).forEach((function(n) { 1315 var i = n.split(".")[0]; 1316 t === i && V[n].forEach((function(t) { 1317 t.call(dt, P.map(o.format.to), e, P.slice(), r || !1, N.slice(), dt) 1318 })) 1319 })) 1320 } 1321 1322 function rt(t, e, r, n, i, s, l) { 1323 var u; 1324 return 1 < h.length && !o.events.unconstrained && (n && 0 < e && (u = E.getAbsoluteDistance(t[e - 1], o.margin, !1), r = Math.max(r, u)), i && e < h.length - 1 && (u = E.getAbsoluteDistance(t[e + 1], o.margin, !0), r = Math.min(r, u))), 1 < h.length && o.limit && (n && 0 < e && (u = E.getAbsoluteDistance(t[e - 1], o.limit, !1), r = Math.min(r, u)), i && e < h.length - 1 && (u = E.getAbsoluteDistance(t[e + 1], o.limit, !0), r = Math.max(r, u))), o.padding && (0 === e && (u = E.getAbsoluteDistance(0, o.padding[0], !1), r = Math.max(r, u)), e === h.length - 1 && (u = E.getAbsoluteDistance(100, o.padding[1], !0), r = Math.min(r, u))), !((r = a(r = l ? r : E.getStep(r))) === t[e] && !s) && r 1325 } 1326 1327 function nt(t, e) { 1328 var r = o.ort; 1329 return (r ? e : t) + ", " + (r ? t : e) 1330 } 1331 1332 function it(t, e, r, n, i) { 1333 var s = r.slice(), 1334 a = n[0], 1335 l = o.events.smoothSteps, 1336 u = [!t, t], 1337 c = [t, !t]; 1338 n = n.slice(), t && n.reverse(), 1 < n.length ? n.forEac
1338h((function(t, r) { 1339 !1 === (r = rt(s, t, s[t] + e, u[r], c[r], !1, l)) ? e = 0 : (e = r - s[t], s[t] = r) 1340 })) : u = c = [!0]; 1341 var p = !1; 1342 n.forEach((function(t, n) { 1343 p = at(t, r[t] + e, u[n], c[n], !1, l) || p 1344 })), p && (n.forEach((function(t) { 1345 et("update", t), et("slide", t) 1346 })), null != i && et("drag", a)) 1347 } 1348 1349 function ot(t, e) { 1350 return o.dir ? 100 - t - e : t 1351 } 1352 1353 function st() { 1354 C.forEach((function(t) { 1355 var e = 50 < N[t] ? -1 : 1; 1356 e = 3 + (h.length + e * t); 1357 h[t].style.zIndex = String(e) 1358 })) 1359 } 1360 1361 function at(t, e, r, n, i, s) { 1362 return !1 !== (e = i ? e : rt(N, t, e, r, n, !1, s)) && (N[t] = e, P[t] = E.fromStepping(e), e = "translate(" + nt(ot(e, 0) - D + "%", "0") + ")", h[t].style[o.transformRule] = e, lt(t), lt(t + 1), !0) 1363 } 1364 1365 function lt(t) { 1366 var e, r; 1367 m[t] && (r = 100, e = "translate(" + nt(ot(e = (e = 0) !== t ? N[t - 1] : e, r = (r = t !== m.length - 1 ? N[t] : r) - e) + "%", "0") + ")", r = "scale(" + nt(r / 100, "1") + ")", m[t].style[o.transformRule] = e + " " + r) 1368 } 1369 1370 function ut(t, e) { 1371 return null === t || !1 === t || void 0 === t ? N[e] : ("number" == typeof t && (t = String(t)), !1 === (t = !1 !== (t = o.format.from(t)) ? E.toStepping(t) : t) || isNaN(t) ? N[e] : t) 1372 } 1373 1374 function ct(t, e, r) { 1375 var n = l(t); 1376 t = void 0 === N[0]; 1377 e = void 0 === e || e, o.animate && !t && s(_, o.cssClasses.tap, o.animationDuration), C.forEach((function(t) { 1378 at(t, ut(n[t], t), !0, !1, r) 1379 })); 1380 var i, a = 1 === C.length ? 0 : 1; 1381 for (t && E.hasNoSize() && (r = !0, N[0] = 0, 1 < C.length && (i = 100 / (C.length - 1), C.forEach((function(t) { 1382 N[t] = t * i 1383 })))); a < C.length; ++a) C.forEach((function(t) { 1384 at(t, N[t], !0, !0, r) 1385 })); 1386 st(), C.forEach((function(t) { 1387 et("update", t), null !== n[t] && e && et("set", t) 1388 })) 1389 } 1390 1391 function pt(t) { 1392 return (t = void 0 !== t && t) ? 1 === P.length ? P[0] : P.slice(0) : 1 === (t = P.map(o.format.to)).length ? t[0] : t 1393 } 1394 1395 function ft(t) { 1396 var e = N[t], 1397 r = E.getNearbySteps(e), 1398 n = P[t], 1399 i = r.thisStep.step; 1400 t = null; 1401 return o.snap ? [n - r.stepBefore.startValue || null, r.stepAfter.startValue - n || null] : (!1 !== i && n + i > r.stepAfter.startValue && (i = r.stepAfter.startValue - n), t = n > r.thisStep.startValue ? r.thisStep.step : !1 !== r.stepBefore.step && n - r.stepBefore.highestStep, 100 === e ? i = null : 0 === e && (t = null), e = E.countStepDecimals(), null !== i && !1 !== i && (i = Number(i.toFixed(e))), [t = null !== t && !1 !== t ? Number(t.toFixed(e)) : t, i]) 1402 } 1403 c(e = _, o.cssClasses.target), 0 === o.dir ? c(e, o.cssClasses.ltr) : c(e, o.cssClasses.rtl), 0 === o.ort ? c(e, o.cssClasses.horizontal) : c(e, o.cssClasses.vertical), c(e, "rtl" === getComputedStyle(e).direction ? o.cssClasses.textDirectionRtl : o.cssClasses.textDirectionLtr), d = $(e, o.cssClasses.base), 1404 function(t, e) { 1405 var r = $(e, o.cssClasses.connects); 1406 h = [], (m = []).push(T(r, t[0])); 1407 for (var n = 0; n < o.handles; n++) h.push(O(e, n)), C[n] = n, m.push(T(r, t[n + 1])) 1408 }(o.connect, d), (x = o.events).fixed || h.forEach((function(t, e) { 1409 Y(v.start, t.children[0], K, { 1410 handleNumbers: [e] 1411 }) 1412 })), x.tap && Y(v.start, d, (function(t) { 1413 t.stopPropagation(); 1414 var e, r, n, i = Q(t.calcPoint), 1415 a = (e = i, n = !(r = 100), h.forEach((function(t, i) { 1416 var o, s; 1417 F(i) || (o = N[i], ((s = Math.abs(o - e)) < r || s <= r && o < e || 100 === s && 100 === r) && (n = i, r = s)) 1418 })), n);
1419 !1 !== a && (o.events.snap || s(_, o.cssClasses.tap, o.animationDuration), at(a, i, !0, !0), st(), et("slide", a, !0), et("update", a, !0), o.events.snap ? K(t, { 1420 handleNumbers: [a] 1421 }) : (et("change", a, !0), et("set", a, !0))) 1422 }), {}), x.hover && Y(v.move, d, (function(t) { 1423 t = Q(t.calcPoint), t = E.getStep(t); 1424 var e = E.fromStepping(t); 1425 Object.keys(V).forEach((function(t) { 1426 "hover" === t.split(".")[0] && V[t].forEach((function(t) { 1427 t.call(dt, e) 1428 })) 1429 })) 1430 }), { 1431 hover: !0 1432 }), x.drag && m.forEach((function(t, e) { 1433 var r, n, i, s, a; 1434 !1 !== t && 0 !== e && e !== m.length - 1 && (r = h[e - 1], n = h[e], i = [t], s = [r, n], a = [e - 1, e], c(t, o.cssClasses.draggable), x.fixed && (i.push(r.children[0]), i.push(n.children[0])), x.dragAll && (s = h, a = C), i.forEach((function(e) { 1435 Y(v.start, e, K, { 1436 handles: s, 1437 handleNumbers: a, 1438 connect: t 1439 }) 1440 }))) 1441 })), ct(o.start), o.pips && B(o.pips), o.tooltips && H(), tt("update" + S), Z("update" + S, (function(t, e, r, n, i) { 1442 C.forEach((function(t) { 1443 var e = h[t], 1444 n = rt(N, t, 0, !0, !0, !0), 1445 s = rt(N, t, 100, !0, !0, !0), 1446 a = i[t]; 1447 t = String(o.ariaFormat.to(r[t])), n = E.fromStepping(n).toFixed(1), s = E.fromStepping(s).toFixed(1), a = E.fromStepping(a).toFixed(1); 1448 e.children[0].setAttribute("aria-valuemin", n), e.children[0].setAttribute("aria-valuemax", s), e.children[0].setAttribute("aria-valuenow", a), e.children[0].setAttribute("aria-valuetext", t) 1449 })) 1450 })); 1451 var dt = { 1452 destroy: function() {
1453 for (tt(S), tt(y), Object.keys(o.cssClasses).forEach((function(t) { 1454 p(_, o.cssClasses[t]) 1455 })); _.firstChild;) _.removeChild(_.firstChild); 1456 delete _.noUiSlider 1457 }, 1458 steps: function() { 1459 return C.map(ft) 1460 }, 1461 on: Z, 1462 off: tt, 1463 get: pt, 1464 set: ct, 1465 setHandle: function(t, e, r, n) { 1466 if (!(0 <= (t = Number(t)) && t < C.length)) throw new Error("noUiSlider: invalid handle number, got: " + t); 1467 at(t, ut(e, t), !0, !0, n), et("update", t), r && et("set", t) 1468 }, 1469 reset: function(t) { 1470 ct(o.start, t) 1471 }, 1472 __moveHandles: function(t, e, r) { 1473 it(t, e, N, r) 1474 }, 1475 options: u, 1476 updateOptions: function(t, e) { 1477 var r = pt(), 1478 i = ["margin", "limit", "padding", "range", "animate", "snap", "step", "format", "pips", "tooltips"]; 1479 i.forEach((function(e) { 1480 void 0 !== t[e] && (u[e] = t[e]) 1481 })); 1482 var s = X(u); 1483 i.forEach((function(e) { 1484 void 0 !== t[e] && (o[e] = s[e]) 1485 })), E = s.spectrum, o.margin = s.margin, o.limit = s.limit, o.padding = s.padding, o.pips ? B(o.pips) : I(), (o.tooltips ? H : z)(), N = [], ct(n(t.start) ? t.start : r, e) 1486 }, 1487 target: _, 1488 removePips: I, 1489 removeTooltips: z, 1490 getPositions: function() { 1491 return N.slice() 1492 }, 1493 getTooltips: function() { 1494 return g 1495 }, 1496 getOrigins: function() { 1497 return h 1498 }, 1499 pips: B 1500 }; 1501 return dt 1502 } 1503 1504 function Q(t, e) { 1505 if (!t || !t.nodeName) throw new Error("noUiSlider: create requires a single element, got: " + t); 1506 if (t.noUiSlider) throw new Error("noUiSlider: Slider was already initialized."); 1507 return e = Y(t, X(e), e), t.noUiSlider = e 1508 } 1509 var W = { 1510 __spectrum: b, 1511 cssClasses: v, 1512 create: Q 1513 }; 1514 t.create = Q, t.cssClasses = v, t.default = W, Object.defineProperty(t, "__esModule", { 1515 value: !0 1516 }) 1517})), 1518function(t) { 1519 t.fn.simpleMoneyFormat = function() { 1520 function e(e, r, n) { 1521 for (var i = "", o = n.split(""), s = [], a = 0, l = "", u = o.length - 1; u >= 0; u--) l += o[u], 3 == ++a && (s.push(l), a = 0, l = ""); 1522 a > 0 && s.push(l); 1523 for (u = s.length - 1; u >= 0; u--) { 1524 for (var c = s[u].split(""), p = c.length - 1; p >= 0; p--) i += c[p]; 1525 u > 0 && (i += ",") 1526 } 1527 "input" == r ? t(e).val(i) : t(e).empty().text(i) 1528 } 1529 this.each((function(r, n) { 1530 var i = null, 1531 o = null; 1532 t(n).is("input") || t(n).is("textarea") ? (o = t(n).val().replace(/,/g, ""), i = "input") : (o = t(n).text().replace(/,/g, ""), i = "other"), t(n).on("paste keyup", (function() { 1533 o = t(n).val().replace(/,/g, ""), e(n, i, o) 1534 })), e(n, i, o) 1535 })) 1536 } 1537}(jQuery); 1538var _0xe43b = ["so_tien_vay_direction", "getElementById", "tap-drag", "count", "lower", "create", "ky_han_vay_direction", "lai_suat_direction", ".vdh_modal", "querySelector", ".vdh_close_button", "show-modal", "toggle", "classList", "target", "click", "addEventListener", "submit", "#vdh_form", "preventDefault", "get", "noUiSlider", "Sá» tiá»n vay & kỳ hạn & lãi suất phải > 0", "", '<tr align="center">\r\n\t\t\t\t\t\t<td class="vdh_number_month">', '</td>\r\n\t\t\t\t\t\t<td class="money">', "</td>\r\n\t\t\t\t\t</tr>", "html", ".ket_qua1", '\r\n\t\t\t\t<td colspan="2">Tá»ng trả góp:</td>\r\n\t\t\t\t<td class="money">', '</td>\r\n\t\t\t\t<td class="money">', '</td>\r\n\t\t\t\t<td class="money highlight">', "</td>\r\n\t\t\t", "#tab1 .vdh_bang_tra_gop tfoot tr", ".ket_qua2", '\r\n\t\t\t\t<td>Tá»ng:</td>\r\n\t\t\t\t<td class="money">', "#tab2 .vdh_bang_tra_gop tfoot tr", "simpleMoneyFormat", ".money", "on", "ready", "vdh_tabcontent", "getElementsByClassName", "length", "dis
1538play", "style", "none", "tablinks", "className", " active", "replace", "log", "block", "currentTarget"]; 1539 1540function openTab(t, e) { 1541 var r, n, i; 1542 for (n = document[_0xe43b[42]](_0xe43b[41]), r = 0; r < n[_0xe43b[43]]; r++) n[r][_0xe43b[45]][_0xe43b[44]] = _0xe43b[46]; 1543 for (i = document[_0xe43b[42]](_0xe43b[47]), r = 0; r < i[_0xe43b[43]]; r++) i[r][_0xe43b[48]] = i[r][_0xe43b[48]][_0xe43b[50]](_0xe43b[49], _0xe43b[23]); 1544 console[_0xe43b[51]](e), document[_0xe43b[1]](e)[_0xe43b[45]][_0xe43b[44]] = _0xe43b[52], t[_0xe43b[53]][_0xe43b[48]] += _0xe43b[49] 1545} 1546jQuery(document)[_0xe43b[40]]((function(t) { 1547 var e = document[_0xe43b[1]](_0xe43b[0]); 1548 noUiSlider[_0xe43b[5]](e, { 1549 start: 500, 1550 step: 10, 1551 keyboardSupport: !0, 1552 keyboardDefaultStep: 5, 1553 behaviour: _0xe43b[2], 1554 tooltips: !0, 1555 format: wNumb({ 1556 decimals: 0 1557 }), 1558 range: { 1559 min: 0, 1560 max: 4e3 1561 }, 1562 pips: { 1563 mode: _0xe43b[3], 1564 stepped: !0, 1565 density: 5, 1566 values: 6 1567 }, 1568 connect: _0xe43b[4] 1569 }); 1570 var r = document[_0xe43b[1]](_0xe43b[6]); 1571 noUiSlider[_0xe43b[5]](r, { 1572 start: 24, 1573 step: 1, 1574 keyboardSupport: !0, 1575 keyboardDefaultStep: 1, 1576 behaviour: _0xe43b[2], 1577 tooltips: !0, 1578 format: wNumb({ 1579 decimals: 0 1580 }), 1581 range: { 1582 min: 0, 1583 max: 120 1584 }, 1585 pips: { 1586 mode: _0xe43b[3], 1587 stepped: !0, 1588 density: 1, 1589 values: 11 1590 }, 1591 connect: _0xe43b[4] 1592 }); 1593 var n = document[_0xe43b[1]](_0xe43b[7]); 1594 noUiSlider[_0xe43b[5]](n, { 1595 start: 10, 1596 step: .1, 1597 keyboardSupport: !0, 1598 keyboardDefaultStep: .1, 1599 behaviour: _0xe43b[2], 1600 tooltips: !0, 1601 format: wNumb({ 1602 decimals: 1 1603 }), 1604 range: { 1605 min: 0, 1606 max: 20 1607 }, 1608 pips: { 1609 mode: _0xe43b[3], 1610 stepped: !0, 1611 density: 5, 1612 values: 5 1613 }, 1614 connect: _0xe43b[4] 1615 }); 1616 const i = document[_0xe43b[9]](_0xe43b[8]); 1617 1618 function o() { 1619 i[_0xe43b[13]][_0xe43b[12]](_0xe43b[11]) 1620 } 1621 document[_0xe43b[9]](_0xe43b[10])[_0xe43b[16]](_0xe43b[15], o), window[_0xe43b[16]](_0xe43b[15], (function(t) { 1622 t[_0xe43b[14]] === i && o() 1623 })), t(document)[_0xe43b[39]](_0xe43b[17], _0xe43b[18], (function(i) { 1624 i[_0xe43b[19]](); 1625 var s = parseFloat(e[_0xe43b[21]][_0xe43b[20]]()), 1626 a = parseFloat(r[_0xe43b[21]][_0xe43b[20]]()), 1627 l = parseFloat(n[_0xe43b[21]][_0xe43b[20]]()); 1628 if (!(s > 0 && a > 0 && l > 0)) return alert(_0xe43b[22]); 1629 s = parseInt(1e6 * s); 1630 for (var u, c = 0, p = `${_0xe43b[23]}`, f = 1; f <= a; f++) { 1631 if (1 == f) var d = s, 1632 h = parseInt(s / a), 1633 m = parseInt(s * l / 100 / a), 1634 b = parseInt(h + m); 1635 else d = s - h * (f - 1), h = parseInt(s / a), m = parseInt(d * l / 100 / a), b = parseInt(h + m); 1636 p += `${_0xe43b[24]}${f}${_0xe43b[25]}${d}${_0xe43b[25]}${h}${_0xe43b[25]}${m}${_0xe43b[25]}${b}${_0xe43b[26]}`, c += m 1637 } 1638 u = s + c, t(_0xe43b[28])[_0xe43b[27]](p), t(_0xe43b[33])[_0xe43b[27]](`${_0xe43b[29]}${s}${_0xe43b[30]}${c}${_0xe43b[31]}${u}${_0xe43b[32]}`); 1639 var g = `${_0xe43b[23]}`, 1640 x = parseInt(s * (a / 12) * (l / 100)), 1641 v = parseInt(s + x), 1642 y = parseInt(s / a), 1643 S = parseInt(x / a), 1644 w = parseInt(v / a); 1645 for (f = 1; f <= a; f++) g += `${_0xe43b[24]}${f}${_0xe43b[25]}${y}${_0xe43b[25]}${S}${_0xe43b[25]}${w}${_0xe43b[26]}`; 1646 t(_0xe43b[34])[_0xe43b[27]](g), t(_0xe43b[36])[_0xe43b[27]](`${_0xe43b[35]}${s}${_0xe43b[30]}${x}${_0xe43b[31]}${v}${_0xe43b[32]}`), t(_0xe43b[38])[_0xe43b[37]](), o() 1647 })) 1648 })), 1649 function(t) { 1650 "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? module.exports = t() : window.wNumb = t() 1651 }((function() { 1652 "use strict"; 1653 var t = ["decimals", "thousand", "mark", "prefix", "suffix", "encoder", "decoder", "negativeBefore", "negative", "edit", "undo"]; 1654 1655 function e(t) { 1656 return t.split("").reverse().join("") 1657 } 1658 1659 function r(t, e) { 1660 return t.substring(0, e.length) === e 1661 } 1662 1663 function n(t, e, r) { 1664 if ((t[e] || t[r]) && t[e] === t[r]) throw new Error(e) 1665 } 1666 1667 function i(t) { 1668 return "number" == typeof t && isFinite(t) 1669 } 1670 1671 function o(t, r, n, o, s, a, l, u, c, p, f, d) { 1672 var h, m, b, g = d, 1673 x = "", 1674 v = ""; 1675 return a && (d = a(d)), !!i(d) && (!1 !== t && 0 === parseFloat(d.toFixed(t)) && (d = 0), d < 0 && (h = !0, d = Math.abs(d)), !1 !== t && (d = function(t, e) { 1676 return t = t.toString().split("e"), (+((t = (t = Math.round(+(t[0] + "e" + (t[1] ? +t[1] + e : e)))).toString().split("e"))[0] + "e" + (t[1] ? t[1] - e : -e))).toFixed(e) 1677 }(d, t)), -1 !== (d = d.toString()).indexOf(".") ? (b = (m = d.split("."))[0], n && (x = n + m[1])
vendor: 3,131 bytes, lines 1677-1721
1677) : b = d, r && (b = e((b = e(b).match(/.{1,3}/g)).join(e(r)))), h && u && (v += u), o && (v += o), h && c && (v += c), v += b, v += x, s && (v += s), p && (v = p(v, g)), v) 1678 } 1679 1680 function s(t, e, n, o, s, a, l, u, c, p, f, d) { 1681 var h, m = ""; 1682 return f && (d = f(d)), !(!d || "string" != typeof d) && (u && r(d, u) && (d = d.replace(u, ""), h = !0), o && r(d, o) && (d = d.replace(o, "")), c && r(d, c) && (d = d.replace(c, ""), h = !0), s && function(t, e) { 1683 return t.slice(-1 * e.length) === e 1684 }(d, s) && (d = d.slice(0, -1 * s.length)), e && (d = d.split(e).join("")), n && (d = d.replace(n, ".")), h && (m += "-"), "" !== (m = (m += d).replace(/[^0-9\.\-.]/g, "")) && (m = Number(m), l && (m = l(m)), !!i(m) && m)) 1685 } 1686 1687 function a(e, r, n) { 1688 var i, o = []; 1689 for (i = 0; i < t.length; i += 1) o.push(e[t[i]]); 1690 return o.push(n), r.apply("", o) 1691 } 1692 return function e(r) { 1693 if (!(this instanceof e)) return new e(r); 1694 "object" == typeof r && (r = function(e) { 1695 var r, i, o, s = {}; 1696 for (void 0 === e.suffix && (e.suffix = e.postfix), r = 0; r < t.length; r += 1) 1697 if (void 0 === (o = e[i = t[r]])) "negative" !== i || s.negativeBefore ? "mark" === i && "." !== s.thousand ? s[i] = "." : s[i] = !1 : s[i] = "-"; 1698 else if ("decimals" === i) { 1699 if (!(0 <= o && o < 8)) throw new Error(i); 1700 s[i] = o 1701 } else if ("encoder" === i || "decoder" === i || "edit" === i || "undo" === i) { 1702 if ("function" != typeof o) throw new Error(i); 1703 s[i] = o 1704 } else { 1705 if ("string" != typeof o) throw new Error(i); 1706 s[i] = o 1707 } 1708 return n(s, "mark", "thousand"), n(s, "prefix", "negative"), n(s, "prefix", "negativeBefore"), s 1709 }(r), this.to = function(t) { 1710 return a(r, o, t) 1711 }, this.from = function(t) { 1712 return a(r, s, t) 1713 }) 1714 } 1715 })); 1716} 1717 1718// bo chuyen doi tien te 1719var wconvert = document.getElementById("wconvert"); 1720if(wconvert != null){ 1721let country_list={AED:"AE",AFN:"AF",XCD:"AG",ALL:"AL",AMD:"AM",ANG:"AN",AOA:"AO",AQD:"AQ",ARS:"AR",AUD:"AU",AZN:"AZ",BAM:"BA",BBD:"BB",BDT:"BD",XOF:"BE",BGN:"BG",BHD:"BH",BIF:"BI",BMD:"BM",BND:"BN",BOB:"BO",BRL:"BR",BSD:"BS",NOK:"BV",BWP:"BW",BYR:"BY",BZD:"BZ",CAD:"CA",CDF:"CD",XAF:"CF",CHF:"CH",CLP:"CL",CNY:"CN",COP:"CO",CRC:"CR",CUP:"CU",CVE:"CV",CYP:"CY",CZK:"CZ",DJF:"DJ",DKK:"DK",DOP:"DO",DZD:"DZ",ECS:"EC",EEK:"EE",EGP:"EG",ETB:"ET",EUR:"FR",FJD:"FJ",FKP:"FK",GBP:"GB",GEL:"GE",GGP:"GG",GHS:"GH",GIP:"GI",GMD:"GM",GNF:"GN",GTQ:"GT",GYD:"GY",HKD:"HK",HNL:"HN",HRK:"HR",HTG:"HT",HUF:"HU",IDR:"ID",ILS:"IL",INR:"IN",IQD:"IQ",IRR:"IR",ISK:"IS",JMD:"JM",JOD:"JO",JPY:"JP",KES:"KE",KGS:"KG",KHR:"KH",KMF:"KM",KPW:"KP",KRW:"KR",KWD:"KW",KYD:"KY",KZT:"KZ",LAK:"LA",LBP:"LB",LKR:"LK",LRD:"LR",LSL:"LS",
1721LTL:"LT",LVL:"LV",LYD:"LY",MAD:"MA",MDL:"MD",MGA:"MG",MKD:"MK",MMK:"MM",MNT:"MN",MOP:"MO",MRO:"MR",MTL:"MT",MUR:"MU",MVR:"MV",MWK:"MW",MXN:"MX",MYR:"MY",MZN:"MZ",NAD:"NA",XPF:"NC",NGN:"NG",NIO:"NI",NPR:"NP",NZD:"NZ",OMR:"OM",PAB:"PA",PEN:"PE",PGK:"PG",PHP:"PH",PKR:"PK",PLN:"PL",PYG:"PY",QAR:"QA",RON:"RO",RSD:"RS",RUB:"RU",RWF:"RW",SAR:"SA",SBD:"SB",SCR:"SC",SDG:"SD",SEK:"SE",SGD:"SG",SKK:"SK",SLL:"SL",SOS:"SO",SRD:"SR",STD:"ST",SVC:"SV",SYP:"SY",SZL:"SZ",THB:"TH",TJS:"TJ",TMT:"TM",TND:"TN",TOP:"wto",TRY:"TR",TTD:"TT",TWD:"TW",TZS:"TZ",UAH:"UA",UGX:"UG",USD:"US",UYU:"UY",UZS:"UZ",VEF:"VE",VND:"VN",VUV:"VU",YER:"YE",ZAR:"ZA",ZMK:"ZM",ZWD:"ZW"};const dropList=document.querySelectorAll(".wform select"),fromCurrency=document.querySelector(".wbox select"),toCurrency=document.querySelector(".wto select"),getButton=document.querySelector(".wform button");for(let e=0;e<dropList.length;e++){for(let t in country_list){let n=`<option value="${t}" ${0==e?"USD"==t?"selected":"":"VND"==t?"selected":""}>${t}</option>`;dropList[e].insertAdjacentHTML("beforeend",n)}dropList[e].addEventListener("change",(e=>{loadFlag(e.target)}))}function loadFlag(e){for(let t in country_list)if(t==e.value){e.parentElement.querySelector("img").src=`https://flagcdn.com/48x36/${country_list[t].toLowerCase()}.png`}}window.addEventListener("load",(()=>{getExchangeRate()})),getButton.addEventListener("click",(e=>{e.preventDefault(),getExchangeRate()}));const exchangeIcon=document.querySelector(".wform .wicon");function getExchangeRate(){const e=document.querySelector(".wform input"),t=document.querySelector("form .exchange-rate");let n=e.value;""!=n&&"0"!=n||(e.value="1",n=1),t.innerText=wxuatketqua;let r=`https://v6.exchangerate-api.com/v6/${wapikey}/latest/${fromCurrency.value}`;fetch(r).then((e=>e.json())).then((e=>{let r=e.conversion_rates[toCurrency.value],o=(n*r).toFixed(2);t.innerText=`${n} ${fromCurrency.value} = ${o} ${toCurrency.value}`})).catch((()=>{t.innerText=wnoketqua}))}exchangeIcon.addEventListener("click",(()=>{let e=fromCurrency.value;fromCurrency.value=toCurrency.value,toCurrency.value=e,loadFlag(fromCurrency),loadFlag(toCurrency),getExchangeRate()})); 1722} 1723// Line load trang 1724jQuery(document).ready(function($){ 1725 $(window).scroll(function(){ 1726 var windowTop = $(window).scrollTop(), 1727 documentHeight = $(document).height(), 1728 windowHeight = $(window).height(); 1729 var scroll = (windowTop / (documentHeight - windowHeight))*100; 1730 $('.scroll-load').css("width", (scroll + '%')); 1731 }); 1732 }); 1733// display none sau 20s popup post 1734var popupsets = document.getElementById("popup-post"); 1735if(popupsets != null){ 1736setTimeout(function(){hide(popupsets);}, 10000); 1737function hide(element){ 1738 element.style.display="none"; 1739} 1740// keo xuong 100px la an popup 1741var prevScrollpos = window.pageYOffset; 1742var initialPos = 100; // khoảng cách tÃnh từ vá» trà ban Äầu 1743 1744window.onscroll = function() { 1745 var currentScrollPos = window.pageYOffset; 1746 if (prevScrollpos > currentScrollPos || currentScrollPos <= initialPos) { 1747 popupsets.style.visibility = 'visible'; 1748 } else { 1749 popupsets.style.visibility = 'hidden'; 1750 } 1751 prevScrollpos = currentScrollPos; 1752}; 1753} 1754// ajax tim kiem 1755jQuery(function($){ 1756$("input#otimkiem").keyup(function() { 1757if ($(this).val().length > 2) { 1758$("#fox-ajax-get").show(); 1759} else { 1760$("#fox-ajax-get").hide(); 1761} 1762}); 1763}); 1764// check pass manh yeu 1765var checkidpass = document.getElementById("pwd1"); 1766if(checkidpass != null){ 1767 const checkpass = document.querySelector(".checkpass"); 1768 const input = document.querySelector("#pwd1"); 1769 const weak = document.querySelector(".weak"); 1770 const medium = document.querySelector(".medium"); 1771 const strong = document.querySelector(".strong"); 1772 const textcheck = document.querySelector(".textcheck"); 1773 const nutxempas = document.querySelector(".nutxempas"); 1774 let regExpWeak = /[a-z]/; 1775 let regExpMedium = /\d+/; 1776 let regExpStrong = /.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/; 1777 function checktrigger(){ 1778 if(input.value != ""){ 1779 checkpass.style.display = "block"; 1780 checkpass.style.display = "flex"; 1781 if(input.value.length <= 3 && (input.value.match(regExpWeak) || input.value.match(regExpMedium) || input.value.match(regExpStrong)))no=1; 1782 if(input.value.length >= 6 && ((input.value.match(regExpWeak) && input.value.match(regExpMedium)) || (input.value.match(regExpMedium) && input.value.match(regExpStrong)) || (input.value.match(regExpWeak) && input.value.match(regExpStrong))))no=2; 1783 if(input.value.length >= 6 && input.value.match(regExpWeak) && input.value.match(regExpMedium) && input.value.match(regExpStrong))no=3; 1784 if(no != null && no==1){ 1785 weak.classList.add("active"); 1786 textcheck.style.display = "block"; 1787 textcheck.textContent = passcheckno; 1788 textcheck.classList.add("weak"); 1789 } 1790 if(no != null && no==2){ 1791 medium.classList.add("active"); 1792 textcheck.textContent = passcheckok; 1793 textcheck.classList.add("medium"); 1794 }else{ 1795 medium.classList.remove("active"); 1796 textcheck.classList.remove("medium"); 1797 } 1798 if(no != null && no==3){ 1799 weak.classList.add("active"); 1800 medium.classList.add("active"); 1801 strong.classList.add("active"); 1802 textcheck.textContent = passcheckgood; 1803 textcheck.classList.add("strong"); 1804 }else{ 1805 strong.classList.remove("active"); 1806 textcheck.classList.remove("strong"); 1807 } 1808 nutxempas.style.display = "block"; 1809 nutxempas.onclick = function(){ 1810 if(input.type == "password"){ 1811 input.type = "textcheck"; 1812 nutxempas.textContent = passshow; 1813 nutxempas.style.color = "#23ad5c"; 1814 }else{ 1815 input.type = "password"; 1816 nutxempas.textContent = passhidden; 1817 nutxempas.style.color = "#000"; 1818 } 1819 } 1820 }else{ 1821 checkpass.style.display = "none"; 1822 textcheck.style.display = "none"; 1823 nutxempas.style.display = "none"; 1824 } 1825 } 1826} 1827// auto size 1828jQuery(document).ready(function($){ 1829autosize(); 1830function autosize(){ 1831 var text = $('#comment'); 1832 1833 text.each(function(){ 1834 $(this).attr('rows',1); 1835 resize($(this)); 1836 });
1837 1838 text.on('input', function(){ 1839 resize($(this)); 1840 }); 1841 1842 function resize ($text) { 1843 $text.css('height', 'auto'); 1844 $text.css('height', $text[0].scrollHeight+'px'); 1845 } 1846} 1847}); 1848// widget calenda 1849var calenda = document.getElementById("date-wrapper"); 1850if(calenda != null){ 1851const daysTag = document.querySelector(".date-days"), 1852currentDate = document.querySelector(".current-date"), 1853prevNextIcon = document.querySelectorAll(".date-bieutuong span"); 1854let date = new Date(), 1855currYear = date.getFullYear(), 1856currMonth = date.getMonth(); 1857const renderCalendar = () => { 1858 let firstDayofMonth = new Date(currYear, currMonth, 1).getDay(), 1859 lastDateofMonth = new Date(currYear, currMonth + 1, 0).getDate(), 1860 lastDayofMonth = new Date(currYear, currMonth, lastDateofMonth).getDay(), 1861 lastDateofLastMonth = new Date(currYear, currMonth, 0).getDate(); 1862 let liTag = ""; 1863 for (let i = firstDayofMonth; i > 0; i--) { 1864 liTag += `<li class="inactive">${lastDateofLastMonth - i + 1}</li>`; 1865 } 1866 for (let i = 1; i <= lastDateofMonth; i++) { 1867 let isToday = i === date.getDate() && currMonth === new Date().getMonth() 1868 && currYear === new Date().getFullYear() ? "active" : ""; 1869 liTag += `<li class="${isToday}">${i}</li>`; 1870 } 1871 for (let i = lastDayofMonth; i < 6; i++) { 1872 liTag += `<li class="inactive">${i - lastDayofMonth + 1}</li>` 1873 } 1874 currentDate.innerText = `${datevarthang[currMonth]} ${currYear}`; 1875 daysTag.innerHTML = liTag; 1876} 1877renderCalendar(); 1878 1879prevNextIcon.forEach(icon => { 1880 icon.addEventListener("click", () => { 1881 currMonth = icon.id === "date-prev" ? currMonth - 1 : currMonth + 1; 1882 if(currMonth < 0 || currMonth > 11) { 1883 date = new Date(currYear, currMonth); 1884 currYear = date.getFullYear(); 1885 currMonth = date.getMonth(); 1886 } else { 1887 date = new Date(); 1888 } 1889 renderCalendar(); 1890 }); 1891}); 1892} 1893// menu khi click chuot phai ################################### 1894var conMenu = document.getElementById("contextMenu"); 1895if(conMenu != null){ 1896// open new tab cho link 1897var tabcont = document.getElementById("contextMenu-new"); 1898if(tabcont != null){ 1899let selectedLink = null; 1900function showOpenNewTabButton(x, y) { 1901 const openNewTabItem = document.getElementById('openNewTabItem'); 1902 const opencopyItem = document.getElementById('opencopyItem'); 1903 if (selectedLink) { 1904 openNewTabItem.style.display = 'block'; 1905 opencopyItem.style.display = 'block'; 1906 openNewTabItem.innerHTML = `<button onclick="openNewTab()"><i class="fa-regular fa-plus"></i> Má» tab má»i</button>`; 1907 opencopyItem.innerHTML = `<button onclick="copyLink()"><i class="fa-regular fa-copy"></i> Sao chép link</button>`; 1908 openNewTabItem.style.top = `${y}px`; 1909 openNewTabItem.style.left = `${x}px`; 1910 } else { 1911 openNewTabItem.style.display = 'none'; 1912 opencopyItem.style.display = 'none'; 1913 } 1914} 1915function openNewTab() { 1916 window.open(selectedLink, '_blank'); 1917} 1918function copyLink() { 1919 const linkTextArea = document.createElement('textarea'); 1920 linkTextArea.value = selectedLink; 1921 document.body.appendChild(linkTextArea); 1922 linkTextArea.select(); 1923 document.execCommand('copy'); 1924 document.body.removeChild(linkTextArea); 1925 console.log('Copy:', selectedLink); 1926} 1927document.addEventListener('contextmenu', (event) => { 1928 const target = event.target; 1929 if (target.tagName === 'A' || target.closest('a')) { 1930 selectedLink = target.tagName === 'A' ? target.href : target.closest('a').href; 1931 } else if (target.tagName === 'BUTTON' || target.closest('button')) { 1932 const buttonElement = target.tagName === 'BUTTON' ? target : target.closest('button'); 1933 const onclickAttribute = buttonElement.getAttribute('onclick'); 1934 if (onclickAttribute) { 1935 const urlMatch = onclickAttribute.match(/location.href=['"](.*?)['"]/); 1936 if (urlMatch && urlMatch[1]) { 1937 selectedLink = urlMatch[1]; 1938 } 1939 } 1940 } else { 1941 selectedLink = null; 1942 } 1943 showOpenNewTabButton(event.clientX, event.clientY); 1944}); 1945document.addEventListener('click', () => { 1946 selectedLink = null; 1947 showOpenNewTabButton(0, 0); 1948}); 1949} 1950// sao chep van ban 1951var copycont = document.getElementById("contextMenu-copy"); 1952if(copycont != null){ 1953function copySelectedText() { 1954 const selectedText = window.getSelection().toString(); 1955 if (selectedText) { 1956 const dummyTextArea = document.createElement('textarea'); 1957 dummyTextArea.value = selectedText; 1958 document.body.appendChild(dummyTextArea); 1959 dummyTextArea.select(); 1960 document.execCommand('copy'); 1961 document.body.removeChild(dummyTextArea); 1962 console.log('Copy:', selectedText); 1963 } 1964} 1965const copycontent = document.getElementById('copycontent'); 1966document.addEventListener('selectionchange', () => { 1967 const selectedText = window.getSelection().toString(); 1968 if (selectedText) { 1969 copycontent.style.display = 'block'; 1970 } else { 1971 copycontent.style.display = 'none'; 1972 } 1973}); 1974} 1975// chuc nang chinh menu chuot phai 1976document.addEventListener('contextmenu', (event) => { 1977 event.preventDefault(); 1978 const contextMenu = document.getElementById('contextMenu'); 1979 const mouseX = event.clientX + window.pageXOffset; 1980 const mouseY = event.clientY + window.pageYOffset; 1981 const pageWidth = document.body.scrollWidth; 1982 const pageHeight = document.body.scrollHeight; 1983 const menuWidth = contextMenu.offsetWidth; 1984 const menuHeight = contextMenu.offsetHeight; 1985 let adjustedX = mouseX; 1986 let adjustedY = mouseY; 1987 if (mouseX + menuWidth > pageWidth) { 1988 adjustedX = pageWidth - menuWidth; 1989 } 1990 if (mouseY + menuHeight > pageHeight) { 1991 adjustedY = pageHeight - menuHeight; 1992 } 1993 contextMenu.style.display = 'block'; 1994 contextMenu.style.top = `${adjustedY}px`; 1995 contextMenu.style.left = `${adjustedX}px`; 1996}); 1997document.addEventListener('click', () => { 1998 const contextMenu = document.getElementById('contextMenu'); 1999 contextMenu.style.display = 'none'; 2000}); 2001}
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.