19 | `);
20 | }
21 |
22 | }
23 |
24 | $('#reset-btn').click(() => {
25 | console.log('reset btn is clicked');
26 |
27 | $.ajax({
28 | type: 'GET',
29 | url: '/db/reset',
30 | error: function (xhr) {
31 | console.log('Oops, something went wrong.');
32 | },
33 | success: function (res) {
34 | console.log(res);
35 |
36 | addScoreTable(res);
37 |
38 | }
39 | });
40 |
41 | })
42 |
43 | function searchName(name) {
44 | $.ajax({
45 | type: 'POST',
46 | url: '/db/search',
47 | data: {
48 | name
49 | },
50 | error: function (xhr) {
51 | console.log('Oops, something went wrong.');
52 | },
53 | success: function (res) {
54 | console.log(res);
55 |
56 | addScoreTable(res);
57 |
58 | }
59 | });
60 |
61 | }
62 |
63 | $('#search-btn').click(() => {
64 | console.log('search btn is clicked, name is ' + $('#search-name').val());
65 |
66 | searchName($('#search-name').val());
67 |
68 | })
69 |
70 | $('#search-name').keypress((event) => {
71 | if (event.keyCode == 13) {
72 | searchName($('#search-name').val());
73 | }
74 | })
75 |
76 | $('#search-name').on('keyup blur', function () {
77 | console.log($(this).val());
78 |
79 | $('#search-sql').val("SELECT rowid AS id, class, name, score FROM score WHERE class = 'A' and name = '" + $(this).val() + "'");
80 | })
81 |
82 | $('#game-start').click(() => {
83 | $('#game-start').addClass('active');
84 | })
--------------------------------------------------------------------------------
/public/js/core/popper.min.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) Federico Zivolo 2017
3 | Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
4 | */
5 | (function(e, t) {
6 | 'object' == typeof exports && 'undefined' != typeof module ? module.exports = t() : 'function' == typeof define && define.amd ? define(t) : e.Popper = t()
7 | })(this, function() {
8 | 'use strict';
9 |
10 | function e(e) {
11 | return e && '[object Function]' === {}.toString.call(e)
12 | }
13 |
14 | function t(e, t) {
15 | if (1 !== e.nodeType) return [];
16 | var o = window.getComputedStyle(e, null);
17 | return t ? o[t] : o
18 | }
19 |
20 | function o(e) {
21 | return 'HTML' === e.nodeName ? e : e.parentNode || e.host
22 | }
23 |
24 | function n(e) {
25 | if (!e || -1 !== ['HTML', 'BODY', '#document'].indexOf(e.nodeName)) return window.document.body;
26 | var i = t(e),
27 | r = i.overflow,
28 | p = i.overflowX,
29 | s = i.overflowY;
30 | return /(auto|scroll)/.test(r + s + p) ? e : n(o(e))
31 | }
32 |
33 | function r(e) {
34 | var o = e && e.offsetParent,
35 | i = o && o.nodeName;
36 | return i && 'BODY' !== i && 'HTML' !== i ? -1 !== ['TD', 'TABLE'].indexOf(o.nodeName) && 'static' === t(o, 'position') ? r(o) : o : window.document.documentElement
37 | }
38 |
39 | function p(e) {
40 | var t = e.nodeName;
41 | return 'BODY' !== t && ('HTML' === t || r(e.firstElementChild) === e)
42 | }
43 |
44 | function s(e) {
45 | return null === e.parentNode ? e : s(e.parentNode)
46 | }
47 |
48 | function d(e, t) {
49 | if (!e || !e.nodeType || !t || !t.nodeType) return window.document.documentElement;
50 | var o = e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING,
51 | i = o ? e : t,
52 | n = o ? t : e,
53 | a = document.createRange();
54 | a.setStart(i, 0), a.setEnd(n, 0);
55 | var f = a.commonAncestorContainer;
56 | if (e !== f && t !== f || i.contains(n)) return p(f) ? f : r(f);
57 | var l = s(e);
58 | return l.host ? d(l.host, t) : d(e, s(t).host)
59 | }
60 |
61 | function a(e) {
62 | var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 'top',
63 | o = 'top' === t ? 'scrollTop' : 'scrollLeft',
64 | i = e.nodeName;
65 | if ('BODY' === i || 'HTML' === i) {
66 | var n = window.document.documentElement,
67 | r = window.document.scrollingElement || n;
68 | return r[o]
69 | }
70 | return e[o]
71 | }
72 |
73 | function f(e, t) {
74 | var o = 2 < arguments.length && void 0 !== arguments[2] && arguments[2],
75 | i = a(t, 'top'),
76 | n = a(t, 'left'),
77 | r = o ? -1 : 1;
78 | return e.top += i * r, e.bottom += i * r, e.left += n * r, e.right += n * r, e
79 | }
80 |
81 | function l(e, t) {
82 | var o = 'x' === t ? 'Left' : 'Top',
83 | i = 'Left' == o ? 'Right' : 'Bottom';
84 | return +e['border' + o + 'Width'].split('px')[0] + +e['border' + i + 'Width'].split('px')[0]
85 | }
86 |
87 | function m(e, t, o, i) {
88 | return _(t['offset' + e], o['client' + e], o['offset' + e], ie() ? o['offset' + e] + i['margin' + ('Height' === e ? 'Top' : 'Left')] + i['margin' + ('Height' === e ? 'Bottom' : 'Right')] : 0)
89 | }
90 |
91 | function h() {
92 | var e = window.document.body,
93 | t = window.document.documentElement,
94 | o = ie() && window.getComputedStyle(t);
95 | return {
96 | height: m('Height', e, t, o),
97 | width: m('Width', e, t, o)
98 | }
99 | }
100 |
101 | function c(e) {
102 | return se({}, e, {
103 | right: e.left + e.width,
104 | bottom: e.top + e.height
105 | })
106 | }
107 |
108 | function g(e) {
109 | var o = {};
110 | if (ie()) try {
111 | o = e.getBoundingClientRect();
112 | var i = a(e, 'top'),
113 | n = a(e, 'left');
114 | o.top += i, o.left += n, o.bottom += i, o.right += n
115 | } catch (e) {} else o = e.getBoundingClientRect();
116 | var r = {
117 | left: o.left,
118 | top: o.top,
119 | width: o.right - o.left,
120 | height: o.bottom - o.top
121 | },
122 | p = 'HTML' === e.nodeName ? h() : {},
123 | s = p.width || e.clientWidth || r.right - r.left,
124 | d = p.height || e.clientHeight || r.bottom - r.top,
125 | f = e.offsetWidth - s,
126 | m = e.offsetHeight - d;
127 | if (f || m) {
128 | var g = t(e);
129 | f -= l(g, 'x'), m -= l(g, 'y'), r.width -= f, r.height -= m
130 | }
131 | return c(r)
132 | }
133 |
134 | function u(e, o) {
135 | var i = ie(),
136 | r = 'HTML' === o.nodeName,
137 | p = g(e),
138 | s = g(o),
139 | d = n(e),
140 | a = t(o),
141 | l = +a.borderTopWidth.split('px')[0],
142 | m = +a.borderLeftWidth.split('px')[0],
143 | h = c({
144 | top: p.top - s.top - l,
145 | left: p.left - s.left - m,
146 | width: p.width,
147 | height: p.height
148 | });
149 | if (h.marginTop = 0, h.marginLeft = 0, !i && r) {
150 | var u = +a.marginTop.split('px')[0],
151 | b = +a.marginLeft.split('px')[0];
152 | h.top -= l - u, h.bottom -= l - u, h.left -= m - b, h.right -= m - b, h.marginTop = u, h.marginLeft = b
153 | }
154 | return (i ? o.contains(d) : o === d && 'BODY' !== d.nodeName) && (h = f(h, o)), h
155 | }
156 |
157 | function b(e) {
158 | var t = window.document.documentElement,
159 | o = u(e, t),
160 | i = _(t.clientWidth, window.innerWidth || 0),
161 | n = _(t.clientHeight, window.innerHeight || 0),
162 | r = a(t),
163 | p = a(t, 'left'),
164 | s = {
165 | top: r - o.top + o.marginTop,
166 | left: p - o.left + o.marginLeft,
167 | width: i,
168 | height: n
169 | };
170 | return c(s)
171 | }
172 |
173 | function y(e) {
174 | var i = e.nodeName;
175 | return 'BODY' === i || 'HTML' === i ? !1 : 'fixed' === t(e, 'position') || y(o(e))
176 | }
177 |
178 | function w(e, t, i, r) {
179 | var p = {
180 | top: 0,
181 | left: 0
182 | },
183 | s = d(e, t);
184 | if ('viewport' === r) p = b(s);
185 | else {
186 | var a;
187 | 'scrollParent' === r ? (a = n(o(e)), 'BODY' === a.nodeName && (a = window.document.documentElement)) : 'window' === r ? a = window.document.documentElement : a = r;
188 | var f = u(a, s);
189 | if ('HTML' === a.nodeName && !y(s)) {
190 | var l = h(),
191 | m = l.height,
192 | c = l.width;
193 | p.top += f.top - f.marginTop, p.bottom = m + f.top, p.left += f.left - f.marginLeft, p.right = c + f.left
194 | } else p = f
195 | }
196 | return p.left += i, p.top += i, p.right -= i, p.bottom -= i, p
197 | }
198 |
199 | function v(e) {
200 | var t = e.width,
201 | o = e.height;
202 | return t * o
203 | }
204 |
205 | function E(e, t, o, i, n) {
206 | var r = 5 < arguments.length && void 0 !== arguments[5] ? arguments[5] : 0;
207 | if (-1 === e.indexOf('auto')) return e;
208 | var p = w(o, i, r, n),
209 | s = {
210 | top: {
211 | width: p.width,
212 | height: t.top - p.top
213 | },
214 | right: {
215 | width: p.right - t.right,
216 | height: p.height
217 | },
218 | bottom: {
219 | width: p.width,
220 | height: p.bottom - t.bottom
221 | },
222 | left: {
223 | width: t.left - p.left,
224 | height: p.height
225 | }
226 | },
227 | d = Object.keys(s).map(function(e) {
228 | return se({
229 | key: e
230 | }, s[e], {
231 | area: v(s[e])
232 | })
233 | }).sort(function(e, t) {
234 | return t.area - e.area
235 | }),
236 | a = d.filter(function(e) {
237 | var t = e.width,
238 | i = e.height;
239 | return t >= o.clientWidth && i >= o.clientHeight
240 | }),
241 | f = 0 < a.length ? a[0].key : d[0].key,
242 | l = e.split('-')[1];
243 | return f + (l ? '-' + l : '')
244 | }
245 |
246 | function x(e, t, o) {
247 | var i = d(t, o);
248 | return u(o, i)
249 | }
250 |
251 | function O(e) {
252 | var t = window.getComputedStyle(e),
253 | o = parseFloat(t.marginTop) + parseFloat(t.marginBottom),
254 | i = parseFloat(t.marginLeft) + parseFloat(t.marginRight),
255 | n = {
256 | width: e.offsetWidth + i,
257 | height: e.offsetHeight + o
258 | };
259 | return n
260 | }
261 |
262 | function L(e) {
263 | var t = {
264 | left: 'right',
265 | right: 'left',
266 | bottom: 'top',
267 | top: 'bottom'
268 | };
269 | return e.replace(/left|right|bottom|top/g, function(e) {
270 | return t[e]
271 | })
272 | }
273 |
274 | function S(e, t, o) {
275 | o = o.split('-')[0];
276 | var i = O(e),
277 | n = {
278 | width: i.width,
279 | height: i.height
280 | },
281 | r = -1 !== ['right', 'left'].indexOf(o),
282 | p = r ? 'top' : 'left',
283 | s = r ? 'left' : 'top',
284 | d = r ? 'height' : 'width',
285 | a = r ? 'width' : 'height';
286 | return n[p] = t[p] + t[d] / 2 - i[d] / 2, n[s] = o === s ? t[s] - i[a] : t[L(s)], n
287 | }
288 |
289 | function T(e, t) {
290 | return Array.prototype.find ? e.find(t) : e.filter(t)[0]
291 | }
292 |
293 | function C(e, t, o) {
294 | if (Array.prototype.findIndex) return e.findIndex(function(e) {
295 | return e[t] === o
296 | });
297 | var i = T(e, function(e) {
298 | return e[t] === o
299 | });
300 | return e.indexOf(i)
301 | }
302 |
303 | function N(t, o, i) {
304 | var n = void 0 === i ? t : t.slice(0, C(t, 'name', i));
305 | return n.forEach(function(t) {
306 | t.function && console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
307 | var i = t.function || t.fn;
308 | t.enabled && e(i) && (o.offsets.popper = c(o.offsets.popper), o.offsets.reference = c(o.offsets.reference), o = i(o, t))
309 | }), o
310 | }
311 |
312 | function k() {
313 | if (!this.state.isDestroyed) {
314 | var e = {
315 | instance: this,
316 | styles: {},
317 | attributes: {},
318 | flipped: !1,
319 | offsets: {}
320 | };
321 | e.offsets.reference = x(this.state, this.popper, this.reference), e.placement = E(this.options.placement, e.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding), e.originalPlacement = e.placement, e.offsets.popper = S(this.popper, e.offsets.reference, e.placement), e.offsets.popper.position = 'absolute', e = N(this.modifiers, e), this.state.isCreated ? this.options.onUpdate(e) : (this.state.isCreated = !0, this.options.onCreate(e))
322 | }
323 | }
324 |
325 | function W(e, t) {
326 | return e.some(function(e) {
327 | var o = e.name,
328 | i = e.enabled;
329 | return i && o === t
330 | })
331 | }
332 |
333 | function B(e) {
334 | for (var t = [!1, 'ms', 'Webkit', 'Moz', 'O'], o = e.charAt(0).toUpperCase() + e.slice(1), n = 0; n < t.length - 1; n++) {
335 | var i = t[n],
336 | r = i ? '' + i + o : e;
337 | if ('undefined' != typeof window.document.body.style[r]) return r
338 | }
339 | return null
340 | }
341 |
342 | function D() {
343 | return this.state.isDestroyed = !0, W(this.modifiers, 'applyStyle') && (this.popper.removeAttribute('x-placement'), this.popper.style.left = '', this.popper.style.position = '', this.popper.style.top = '', this.popper.style[B('transform')] = ''), this.disableEventListeners(), this.options.removeOnDestroy && this.popper.parentNode.removeChild(this.popper), this
344 | }
345 |
346 | function H(e, t, o, i) {
347 | var r = 'BODY' === e.nodeName,
348 | p = r ? window : e;
349 | p.addEventListener(t, o, {
350 | passive: !0
351 | }), r || H(n(p.parentNode), t, o, i), i.push(p)
352 | }
353 |
354 | function P(e, t, o, i) {
355 | o.updateBound = i, window.addEventListener('resize', o.updateBound, {
356 | passive: !0
357 | });
358 | var r = n(e);
359 | return H(r, 'scroll', o.updateBound, o.scrollParents), o.scrollElement = r, o.eventsEnabled = !0, o
360 | }
361 |
362 | function A() {
363 | this.state.eventsEnabled || (this.state = P(this.reference, this.options, this.state, this.scheduleUpdate))
364 | }
365 |
366 | function M(e, t) {
367 | return window.removeEventListener('resize', t.updateBound), t.scrollParents.forEach(function(e) {
368 | e.removeEventListener('scroll', t.updateBound)
369 | }), t.updateBound = null, t.scrollParents = [], t.scrollElement = null, t.eventsEnabled = !1, t
370 | }
371 |
372 | function I() {
373 | this.state.eventsEnabled && (window.cancelAnimationFrame(this.scheduleUpdate), this.state = M(this.reference, this.state))
374 | }
375 |
376 | function R(e) {
377 | return '' !== e && !isNaN(parseFloat(e)) && isFinite(e)
378 | }
379 |
380 | function U(e, t) {
381 | Object.keys(t).forEach(function(o) {
382 | var i = ''; - 1 !== ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(o) && R(t[o]) && (i = 'px'), e.style[o] = t[o] + i
383 | })
384 | }
385 |
386 | function Y(e, t) {
387 | Object.keys(t).forEach(function(o) {
388 | var i = t[o];
389 | !1 === i ? e.removeAttribute(o) : e.setAttribute(o, t[o])
390 | })
391 | }
392 |
393 | function F(e, t, o) {
394 | var i = T(e, function(e) {
395 | var o = e.name;
396 | return o === t
397 | }),
398 | n = !!i && e.some(function(e) {
399 | return e.name === o && e.enabled && e.order < i.order
400 | });
401 | if (!n) {
402 | var r = '`' + t + '`';
403 | console.warn('`' + o + '`' + ' modifier is required by ' + r + ' modifier in order to work, be sure to include it before ' + r + '!')
404 | }
405 | return n
406 | }
407 |
408 | function j(e) {
409 | return 'end' === e ? 'start' : 'start' === e ? 'end' : e
410 | }
411 |
412 | function K(e) {
413 | var t = 1 < arguments.length && void 0 !== arguments[1] && arguments[1],
414 | o = ae.indexOf(e),
415 | i = ae.slice(o + 1).concat(ae.slice(0, o));
416 | return t ? i.reverse() : i
417 | }
418 |
419 | function q(e, t, o, i) {
420 | var n = e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),
421 | r = +n[1],
422 | p = n[2];
423 | if (!r) return e;
424 | if (0 === p.indexOf('%')) {
425 | var s;
426 | switch (p) {
427 | case '%p':
428 | s = o;
429 | break;
430 | case '%':
431 | case '%r':
432 | default:
433 | s = i;
434 | }
435 | var d = c(s);
436 | return d[t] / 100 * r
437 | }
438 | if ('vh' === p || 'vw' === p) {
439 | var a;
440 | return a = 'vh' === p ? _(document.documentElement.clientHeight, window.innerHeight || 0) : _(document.documentElement.clientWidth, window.innerWidth || 0), a / 100 * r
441 | }
442 | return r
443 | }
444 |
445 | function G(e, t, o, i) {
446 | var n = [0, 0],
447 | r = -1 !== ['right', 'left'].indexOf(i),
448 | p = e.split(/(\+|\-)/).map(function(e) {
449 | return e.trim()
450 | }),
451 | s = p.indexOf(T(p, function(e) {
452 | return -1 !== e.search(/,|\s/)
453 | }));
454 | p[s] && -1 === p[s].indexOf(',') && console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
455 | var d = /\s*,\s*|\s+/,
456 | a = -1 === s ? [p] : [p.slice(0, s).concat([p[s].split(d)[0]]), [p[s].split(d)[1]].concat(p.slice(s + 1))];
457 | return a = a.map(function(e, i) {
458 | var n = (1 === i ? !r : r) ? 'height' : 'width',
459 | p = !1;
460 | return e.reduce(function(e, t) {
461 | return '' === e[e.length - 1] && -1 !== ['+', '-'].indexOf(t) ? (e[e.length - 1] = t, p = !0, e) : p ? (e[e.length - 1] += t, p = !1, e) : e.concat(t)
462 | }, []).map(function(e) {
463 | return q(e, n, t, o)
464 | })
465 | }), a.forEach(function(e, t) {
466 | e.forEach(function(o, i) {
467 | R(o) && (n[t] += o * ('-' === e[i - 1] ? -1 : 1))
468 | })
469 | }), n
470 | }
471 | for (var z = Math.min, V = Math.floor, _ = Math.max, X = ['native code', '[object MutationObserverConstructor]'], Q = function(e) {
472 | return X.some(function(t) {
473 | return -1 < (e || '').toString().indexOf(t)
474 | })
475 | }, J = 'undefined' != typeof window, Z = ['Edge', 'Trident', 'Firefox'], $ = 0, ee = 0; ee < Z.length; ee += 1)
476 | if (J && 0 <= navigator.userAgent.indexOf(Z[ee])) {
477 | $ = 1;
478 | break
479 | }
480 | var i, te = J && Q(window.MutationObserver),
481 | oe = te ? function(e) {
482 | var t = !1,
483 | o = 0,
484 | i = document.createElement('span'),
485 | n = new MutationObserver(function() {
486 | e(), t = !1
487 | });
488 | return n.observe(i, {
489 | attributes: !0
490 | }),
491 | function() {
492 | t || (t = !0, i.setAttribute('x-index', o), ++o)
493 | }
494 | } : function(e) {
495 | var t = !1;
496 | return function() {
497 | t || (t = !0, setTimeout(function() {
498 | t = !1, e()
499 | }, $))
500 | }
501 | },
502 | ie = function() {
503 | return void 0 == i && (i = -1 !== navigator.appVersion.indexOf('MSIE 10')), i
504 | },
505 | ne = function(e, t) {
506 | if (!(e instanceof t)) throw new TypeError('Cannot call a class as a function')
507 | },
508 | re = function() {
509 | function e(e, t) {
510 | for (var o, n = 0; n < t.length; n++) o = t[n], o.enumerable = o.enumerable || !1, o.configurable = !0, 'value' in o && (o.writable = !0), Object.defineProperty(e, o.key, o)
511 | }
512 | return function(t, o, i) {
513 | return o && e(t.prototype, o), i && e(t, i), t
514 | }
515 | }(),
516 | pe = function(e, t, o) {
517 | return t in e ? Object.defineProperty(e, t, {
518 | value: o,
519 | enumerable: !0,
520 | configurable: !0,
521 | writable: !0
522 | }) : e[t] = o, e
523 | },
524 | se = Object.assign || function(e) {
525 | for (var t, o = 1; o < arguments.length; o++)
526 | for (var i in t = arguments[o], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
527 | return e
528 | },
529 | de = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'],
530 | ae = de.slice(3),
531 | fe = {
532 | FLIP: 'flip',
533 | CLOCKWISE: 'clockwise',
534 | COUNTERCLOCKWISE: 'counterclockwise'
535 | },
536 | le = function() {
537 | function t(o, i) {
538 | var n = this,
539 | r = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {};
540 | ne(this, t), this.scheduleUpdate = function() {
541 | return requestAnimationFrame(n.update)
542 | }, this.update = oe(this.update.bind(this)), this.options = se({}, t.Defaults, r), this.state = {
543 | isDestroyed: !1,
544 | isCreated: !1,
545 | scrollParents: []
546 | }, this.reference = o.jquery ? o[0] : o, this.popper = i.jquery ? i[0] : i, this.options.modifiers = {}, Object.keys(se({}, t.Defaults.modifiers, r.modifiers)).forEach(function(e) {
547 | n.options.modifiers[e] = se({}, t.Defaults.modifiers[e] || {}, r.modifiers ? r.modifiers[e] : {})
548 | }), this.modifiers = Object.keys(this.options.modifiers).map(function(e) {
549 | return se({
550 | name: e
551 | }, n.options.modifiers[e])
552 | }).sort(function(e, t) {
553 | return e.order - t.order
554 | }), this.modifiers.forEach(function(t) {
555 | t.enabled && e(t.onLoad) && t.onLoad(n.reference, n.popper, n.options, t, n.state)
556 | }), this.update();
557 | var p = this.options.eventsEnabled;
558 | p && this.enableEventListeners(), this.state.eventsEnabled = p
559 | }
560 | return re(t, [{
561 | key: 'update',
562 | value: function() {
563 | return k.call(this)
564 | }
565 | }, {
566 | key: 'destroy',
567 | value: function() {
568 | return D.call(this)
569 | }
570 | }, {
571 | key: 'enableEventListeners',
572 | value: function() {
573 | return A.call(this)
574 | }
575 | }, {
576 | key: 'disableEventListeners',
577 | value: function() {
578 | return I.call(this)
579 | }
580 | }]), t
581 | }();
582 | return le.Utils = ('undefined' == typeof window ? global : window).PopperUtils, le.placements = de, le.Defaults = {
583 | placement: 'bottom',
584 | eventsEnabled: !0,
585 | removeOnDestroy: !1,
586 | onCreate: function() {},
587 | onUpdate: function() {},
588 | modifiers: {
589 | shift: {
590 | order: 100,
591 | enabled: !0,
592 | fn: function(e) {
593 | var t = e.placement,
594 | o = t.split('-')[0],
595 | i = t.split('-')[1];
596 | if (i) {
597 | var n = e.offsets,
598 | r = n.reference,
599 | p = n.popper,
600 | s = -1 !== ['bottom', 'top'].indexOf(o),
601 | d = s ? 'left' : 'top',
602 | a = s ? 'width' : 'height',
603 | f = {
604 | start: pe({}, d, r[d]),
605 | end: pe({}, d, r[d] + r[a] - p[a])
606 | };
607 | e.offsets.popper = se({}, p, f[i])
608 | }
609 | return e
610 | }
611 | },
612 | offset: {
613 | order: 200,
614 | enabled: !0,
615 | fn: function(e, t) {
616 | var o, i = t.offset,
617 | n = e.placement,
618 | r = e.offsets,
619 | p = r.popper,
620 | s = r.reference,
621 | d = n.split('-')[0];
622 | return o = R(+i) ? [+i, 0] : G(i, p, s, d), 'left' === d ? (p.top += o[0], p.left -= o[1]) : 'right' === d ? (p.top += o[0], p.left += o[1]) : 'top' === d ? (p.left += o[0], p.top -= o[1]) : 'bottom' === d && (p.left += o[0], p.top += o[1]), e.popper = p, e
623 | },
624 | offset: 0
625 | },
626 | preventOverflow: {
627 | order: 300,
628 | enabled: !0,
629 | fn: function(e, t) {
630 | var o = t.boundariesElement || r(e.instance.popper);
631 | e.instance.reference === o && (o = r(o));
632 | var i = w(e.instance.popper, e.instance.reference, t.padding, o);
633 | t.boundaries = i;
634 | var n = t.priority,
635 | p = e.offsets.popper,
636 | s = {
637 | primary: function(e) {
638 | var o = p[e];
639 | return p[e] < i[e] && !t.escapeWithReference && (o = _(p[e], i[e])), pe({}, e, o)
640 | },
641 | secondary: function(e) {
642 | var o = 'right' === e ? 'left' : 'top',
643 | n = p[o];
644 | return p[e] > i[e] && !t.escapeWithReference && (n = z(p[o], i[e] - ('right' === e ? p.width : p.height))), pe({}, o, n)
645 | }
646 | };
647 | return n.forEach(function(e) {
648 | var t = -1 === ['left', 'top'].indexOf(e) ? 'secondary' : 'primary';
649 | p = se({}, p, s[t](e))
650 | }), e.offsets.popper = p, e
651 | },
652 | priority: ['left', 'right', 'top', 'bottom'],
653 | padding: 5,
654 | boundariesElement: 'scrollParent'
655 | },
656 | keepTogether: {
657 | order: 400,
658 | enabled: !0,
659 | fn: function(e) {
660 | var t = e.offsets,
661 | o = t.popper,
662 | i = t.reference,
663 | n = e.placement.split('-')[0],
664 | r = V,
665 | p = -1 !== ['top', 'bottom'].indexOf(n),
666 | s = p ? 'right' : 'bottom',
667 | d = p ? 'left' : 'top',
668 | a = p ? 'width' : 'height';
669 | return o[s] < r(i[d]) && (e.offsets.popper[d] = r(i[d]) - o[a]), o[d] > r(i[s]) && (e.offsets.popper[d] = r(i[s])), e
670 | }
671 | },
672 | arrow: {
673 | order: 500,
674 | enabled: !0,
675 | fn: function(e, t) {
676 | if (!F(e.instance.modifiers, 'arrow', 'keepTogether')) return e;
677 | var o = t.element;
678 | if ('string' == typeof o) {
679 | if (o = e.instance.popper.querySelector(o), !o) return e;
680 | } else if (!e.instance.popper.contains(o)) return console.warn('WARNING: `arrow.element` must be child of its popper element!'), e;
681 | var i = e.placement.split('-')[0],
682 | n = e.offsets,
683 | r = n.popper,
684 | p = n.reference,
685 | s = -1 !== ['left', 'right'].indexOf(i),
686 | d = s ? 'height' : 'width',
687 | a = s ? 'top' : 'left',
688 | f = s ? 'left' : 'top',
689 | l = s ? 'bottom' : 'right',
690 | m = O(o)[d];
691 | p[l] - m < r[a] && (e.offsets.popper[a] -= r[a] - (p[l] - m)), p[a] + m > r[l] && (e.offsets.popper[a] += p[a] + m - r[l]);
692 | var h = p[a] + p[d] / 2 - m / 2,
693 | g = h - c(e.offsets.popper)[a];
694 | return g = _(z(r[d] - m, g), 0), e.arrowElement = o, e.offsets.arrow = {}, e.offsets.arrow[a] = Math.round(g), e.offsets.arrow[f] = '', e
695 | },
696 | element: '[x-arrow]'
697 | },
698 | flip: {
699 | order: 600,
700 | enabled: !0,
701 | fn: function(e, t) {
702 | if (W(e.instance.modifiers, 'inner')) return e;
703 | if (e.flipped && e.placement === e.originalPlacement) return e;
704 | var o = w(e.instance.popper, e.instance.reference, t.padding, t.boundariesElement),
705 | i = e.placement.split('-')[0],
706 | n = L(i),
707 | r = e.placement.split('-')[1] || '',
708 | p = [];
709 | switch (t.behavior) {
710 | case fe.FLIP:
711 | p = [i, n];
712 | break;
713 | case fe.CLOCKWISE:
714 | p = K(i);
715 | break;
716 | case fe.COUNTERCLOCKWISE:
717 | p = K(i, !0);
718 | break;
719 | default:
720 | p = t.behavior;
721 | }
722 | return p.forEach(function(s, d) {
723 | if (i !== s || p.length === d + 1) return e;
724 | i = e.placement.split('-')[0], n = L(i);
725 | var a = e.offsets.popper,
726 | f = e.offsets.reference,
727 | l = V,
728 | m = 'left' === i && l(a.right) > l(f.left) || 'right' === i && l(a.left) < l(f.right) || 'top' === i && l(a.bottom) > l(f.top) || 'bottom' === i && l(a.top) < l(f.bottom),
729 | h = l(a.left) < l(o.left),
730 | c = l(a.right) > l(o.right),
731 | g = l(a.top) < l(o.top),
732 | u = l(a.bottom) > l(o.bottom),
733 | b = 'left' === i && h || 'right' === i && c || 'top' === i && g || 'bottom' === i && u,
734 | y = -1 !== ['top', 'bottom'].indexOf(i),
735 | w = !!t.flipVariations && (y && 'start' === r && h || y && 'end' === r && c || !y && 'start' === r && g || !y && 'end' === r && u);
736 | (m || b || w) && (e.flipped = !0, (m || b) && (i = p[d + 1]), w && (r = j(r)), e.placement = i + (r ? '-' + r : ''), e.offsets.popper = se({}, e.offsets.popper, S(e.instance.popper, e.offsets.reference, e.placement)), e = N(e.instance.modifiers, e, 'flip'))
737 | }), e
738 | },
739 | behavior: 'flip',
740 | padding: 5,
741 | boundariesElement: 'viewport'
742 | },
743 | inner: {
744 | order: 700,
745 | enabled: !1,
746 | fn: function(e) {
747 | var t = e.placement,
748 | o = t.split('-')[0],
749 | i = e.offsets,
750 | n = i.popper,
751 | r = i.reference,
752 | p = -1 !== ['left', 'right'].indexOf(o),
753 | s = -1 === ['top', 'left'].indexOf(o);
754 | return n[p ? 'left' : 'top'] = r[t] - (s ? n[p ? 'width' : 'height'] : 0), e.placement = L(t), e.offsets.popper = c(n), e
755 | }
756 | },
757 | hide: {
758 | order: 800,
759 | enabled: !0,
760 | fn: function(e) {
761 | if (!F(e.instance.modifiers, 'hide', 'preventOverflow')) return e;
762 | var t = e.offsets.reference,
763 | o = T(e.instance.modifiers, function(e) {
764 | return 'preventOverflow' === e.name
765 | }).boundaries;
766 | if (t.bottom < o.top || t.left > o.right || t.top > o.bottom || t.right < o.left) {
767 | if (!0 === e.hide) return e;
768 | e.hide = !0, e.attributes['x-out-of-boundaries'] = ''
769 | } else {
770 | if (!1 === e.hide) return e;
771 | e.hide = !1, e.attributes['x-out-of-boundaries'] = !1
772 | }
773 | return e
774 | }
775 | },
776 | computeStyle: {
777 | order: 850,
778 | enabled: !0,
779 | fn: function(e, t) {
780 | var o = t.x,
781 | i = t.y,
782 | n = e.offsets.popper,
783 | p = T(e.instance.modifiers, function(e) {
784 | return 'applyStyle' === e.name
785 | }).gpuAcceleration;
786 | void 0 !== p && console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
787 | var s, d, a = void 0 === p ? t.gpuAcceleration : p,
788 | f = r(e.instance.popper),
789 | l = g(f),
790 | m = {
791 | position: n.position
792 | },
793 | h = {
794 | left: V(n.left),
795 | top: V(n.top),
796 | bottom: V(n.bottom),
797 | right: V(n.right)
798 | },
799 | c = 'bottom' === o ? 'top' : 'bottom',
800 | u = 'right' === i ? 'left' : 'right',
801 | b = B('transform');
802 | if (d = 'bottom' == c ? -l.height + h.bottom : h.top, s = 'right' == u ? -l.width + h.right : h.left, a && b) m[b] = 'translate3d(' + s + 'px, ' + d + 'px, 0)', m[c] = 0, m[u] = 0, m.willChange = 'transform';
803 | else {
804 | var y = 'bottom' == c ? -1 : 1,
805 | w = 'right' == u ? -1 : 1;
806 | m[c] = d * y, m[u] = s * w, m.willChange = c + ', ' + u
807 | }
808 | var v = {
809 | "x-placement": e.placement
810 | };
811 | return e.attributes = se({}, v, e.attributes), e.styles = se({}, m, e.styles), e
812 | },
813 | gpuAcceleration: !0,
814 | x: 'bottom',
815 | y: 'right'
816 | },
817 | applyStyle: {
818 | order: 900,
819 | enabled: !0,
820 | fn: function(e) {
821 | return U(e.instance.popper, e.styles), Y(e.instance.popper, e.attributes), e.offsets.arrow && U(e.arrowElement, e.offsets.arrow), e
822 | },
823 | onLoad: function(e, t, o, i, n) {
824 | var r = x(n, t, e),
825 | p = E(o.placement, r, t, e, o.modifiers.flip.boundariesElement, o.modifiers.flip.padding);
826 | return t.setAttribute('x-placement', p), U(t, {
827 | position: 'absolute'
828 | }), o
829 | },
830 | gpuAcceleration: void 0
831 | }
832 | }
833 | }, le
834 | });
835 |
--------------------------------------------------------------------------------
/public/js/material-dashboard.js:
--------------------------------------------------------------------------------
1 | /*!
2 |
3 | =========================================================
4 | * Material Dashboard Dark Edition - v2.1.0
5 | =========================================================
6 |
7 | * Product Page: https://www.creative-tim.com/product/material-dashboard-dark
8 | * Copyright 2019 Creative Tim (http://www.creative-tim.com)
9 |
10 | * Coded by www.creative-tim.com
11 |
12 | =========================================================
13 |
14 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
15 |
16 | */
17 |
18 | (function() {
19 | isWindows = navigator.platform.indexOf('Win') > -1 ? true : false;
20 |
21 | if (isWindows) {
22 | // if we are on windows OS we activate the perfectScrollbar function
23 | $('.sidebar .sidebar-wrapper, .main-panel').perfectScrollbar();
24 |
25 | $('html').addClass('perfect-scrollbar-on');
26 | } else {
27 | $('html').addClass('perfect-scrollbar-off');
28 | }
29 | })();
30 |
31 |
32 | var breakCards = true;
33 |
34 | var searchVisible = 0;
35 | var transparent = true;
36 |
37 | var transparentDemo = true;
38 | var fixedTop = false;
39 |
40 | var mobile_menu_visible = 0,
41 | mobile_menu_initialized = false,
42 | toggle_initialized = false,
43 | bootstrap_nav_initialized = false;
44 |
45 | var seq = 0,
46 | delays = 80,
47 | durations = 500;
48 | var seq2 = 0,
49 | delays2 = 80,
50 | durations2 = 500;
51 |
52 | $(document).ready(function() {
53 |
54 | $('body').bootstrapMaterialDesign();
55 |
56 | $sidebar = $('.sidebar');
57 |
58 | md.initSidebarsCheck();
59 |
60 | window_width = $(window).width();
61 |
62 | // check if there is an image set for the sidebar's background
63 | md.checkSidebarImage();
64 |
65 | // Activate bootstrap-select
66 | if ($(".selectpicker").length != 0) {
67 | $(".selectpicker").selectpicker();
68 | }
69 |
70 | // Activate the tooltips
71 | $('[rel="tooltip"]').tooltip();
72 |
73 | $('.form-control').on("focus", function() {
74 | $(this).parent('.input-group').addClass("input-group-focus");
75 | }).on("blur", function() {
76 | $(this).parent(".input-group").removeClass("input-group-focus");
77 | });
78 |
79 | // remove class has-error for checkbox validation
80 | $('input[type="checkbox"][required="true"], input[type="radio"][required="true"]').on('click', function() {
81 | if ($(this).hasClass('error')) {
82 | $(this).closest('div').removeClass('has-error');
83 | }
84 | });
85 |
86 | });
87 |
88 | $(document).on('click', '.navbar-toggler', function() {
89 | $toggle = $(this);
90 |
91 | if (mobile_menu_visible == 1) {
92 | $('html').removeClass('nav-open');
93 |
94 | $('.close-layer').remove();
95 | setTimeout(function() {
96 | $toggle.removeClass('toggled');
97 | }, 400);
98 |
99 | mobile_menu_visible = 0;
100 | } else {
101 | setTimeout(function() {
102 | $toggle.addClass('toggled');
103 | }, 430);
104 |
105 | var $layer = $('');
106 |
107 | if ($('body').find('.main-panel').length != 0) {
108 | $layer.appendTo(".main-panel");
109 |
110 | } else if (($('body').hasClass('off-canvas-sidebar'))) {
111 | $layer.appendTo(".wrapper-full-page");
112 | }
113 |
114 | setTimeout(function() {
115 | $layer.addClass('visible');
116 | }, 100);
117 |
118 | $layer.click(function() {
119 | $('html').removeClass('nav-open');
120 | mobile_menu_visible = 0;
121 |
122 | $layer.removeClass('visible');
123 |
124 | setTimeout(function() {
125 | $layer.remove();
126 | $toggle.removeClass('toggled');
127 |
128 | }, 400);
129 | });
130 |
131 | $('html').addClass('nav-open');
132 | mobile_menu_visible = 1;
133 |
134 | }
135 |
136 | });
137 |
138 | // activate collapse right menu when the windows is resized
139 | $(window).resize(function() {
140 | md.initSidebarsCheck();
141 |
142 | // reset the seq for charts drawing animations
143 | seq = seq2 = 0;
144 |
145 | setTimeout(function() {
146 | md.initDashboardPageCharts();
147 | }, 500);
148 | });
149 |
150 |
151 |
152 | md = {
153 | misc: {
154 | navbar_menu_visible: 0,
155 | active_collapse: true,
156 | disabled_collapse_init: 0
157 | },
158 |
159 | checkSidebarImage: function() {
160 | $sidebar = $('.sidebar');
161 | image_src = $sidebar.data('image');
162 |
163 | if (image_src !== undefined) {
164 | sidebar_container = '';
165 | $sidebar.append(sidebar_container);
166 | }
167 | },
168 |
169 | initSidebarsCheck: function() {
170 | if ($(window).width() <= 991) {
171 | if ($sidebar.length != 0) {
172 | md.initRightMenu();
173 | }
174 | }
175 | },
176 |
177 | initDashboardPageCharts: function() {
178 |
179 | if ($('#dailySalesChart').length != 0 || $('#completedTasksChart').length != 0 || $('#websiteViewsChart').length != 0) {
180 | /* ----------========== Daily Sales Chart initialization ==========---------- */
181 |
182 | dataDailySalesChart = {
183 | labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S'],
184 | series: [
185 | [12, 17, 7, 17, 23, 18, 38]
186 | ]
187 | };
188 |
189 | optionsDailySalesChart = {
190 | lineSmooth: Chartist.Interpolation.cardinal({
191 | tension: 0
192 | }),
193 | low: 0,
194 | high: 50, // creative tim: we recommend you to set the high sa the biggest value + something for a better look
195 | chartPadding: {
196 | top: 0,
197 | right: 0,
198 | bottom: 0,
199 | left: 0
200 | },
201 | }
202 |
203 | var dailySalesChart = new Chartist.Line('#dailySalesChart', dataDailySalesChart, optionsDailySalesChart);
204 |
205 | md.startAnimationForLineChart(dailySalesChart);
206 |
207 |
208 | /* ----------========== Completed Tasks Chart initialization ==========---------- */
209 |
210 | dataCompletedTasksChart = {
211 | labels: ['12p', '3p', '6p', '9p', '12p', '3a', '6a', '9a'],
212 | series: [
213 | [230, 750, 450, 300, 280, 240, 200, 190]
214 | ]
215 | };
216 |
217 | optionsCompletedTasksChart = {
218 | lineSmooth: Chartist.Interpolation.cardinal({
219 | tension: 0
220 | }),
221 | low: 0,
222 | high: 1000, // creative tim: we recommend you to set the high sa the biggest value + something for a better look
223 | chartPadding: {
224 | top: 0,
225 | right: 0,
226 | bottom: 0,
227 | left: 0
228 | }
229 | }
230 |
231 | var completedTasksChart = new Chartist.Line('#completedTasksChart', dataCompletedTasksChart, optionsCompletedTasksChart);
232 |
233 | // start animation for the Completed Tasks Chart - Line Chart
234 | md.startAnimationForLineChart(completedTasksChart);
235 |
236 |
237 | /* ----------========== Emails Subscription Chart initialization ==========---------- */
238 |
239 | var dataWebsiteViewsChart = {
240 | labels: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
241 | series: [
242 | [542, 443, 320, 780, 553, 453, 326, 434, 568, 610, 756, 895]
243 |
244 | ]
245 | };
246 | var optionsWebsiteViewsChart = {
247 | axisX: {
248 | showGrid: false
249 | },
250 | low: 0,
251 | high: 1000,
252 | chartPadding: {
253 | top: 0,
254 | right: 5,
255 | bottom: 0,
256 | left: 0
257 | }
258 | };
259 | var responsiveOptions = [
260 | ['screen and (max-width: 640px)', {
261 | seriesBarDistance: 5,
262 | axisX: {
263 | labelInterpolationFnc: function(value) {
264 | return value[0];
265 | }
266 | }
267 | }]
268 | ];
269 | var websiteViewsChart = Chartist.Bar('#websiteViewsChart', dataWebsiteViewsChart, optionsWebsiteViewsChart, responsiveOptions);
270 |
271 | //start animation for the Emails Subscription Chart
272 | md.startAnimationForBarChart(websiteViewsChart);
273 | }
274 | },
275 |
276 | showNotification: function(from, align) {
277 | type = ['', 'info', 'danger', 'success', 'warning', 'primary'];
278 |
279 | color = Math.floor((Math.random() * 5) + 1);
280 |
281 | $.notify({
282 | icon: "add_alert",
283 | message: "Welcome to Material Dashboard - a beautiful freebie for every web developer."
284 |
285 | }, {
286 | type: type[color],
287 | timer: 3000,
288 | placement: {
289 | from: from,
290 | align: align
291 | }
292 | });
293 | },
294 |
295 | checkScrollForTransparentNavbar: debounce(function() {
296 | if ($(document).scrollTop() > 260) {
297 | if (transparent) {
298 | transparent = false;
299 | $('.navbar-color-on-scroll').removeClass('navbar-transparent');
300 | }
301 | } else {
302 | if (!transparent) {
303 | transparent = true;
304 | $('.navbar-color-on-scroll').addClass('navbar-transparent');
305 | }
306 | }
307 | }, 17),
308 |
309 | initRightMenu: debounce(function() {
310 |
311 | $sidebar_wrapper = $('.sidebar-wrapper');
312 |
313 | if (!mobile_menu_initialized) {
314 | console.log('intra');
315 | $navbar = $('nav').find('.navbar-collapse').children('.navbar-nav');
316 |
317 | mobile_menu_content = '';
318 |
319 | nav_content = $navbar.html();
320 |
321 | nav_content = '
' + nav_content + '
';
322 |
323 | navbar_form = $('nav').find('.navbar-form').length != 0 ? $('nav').find('.navbar-form')[0].outerHTML : null;
324 |
325 | $sidebar_nav = $sidebar_wrapper.find(' > .nav');
326 |
327 | // insert the navbar form before the sidebar list
328 | $nav_content = $(nav_content);
329 | $navbar_form = $(navbar_form);
330 | $nav_content.insertBefore($sidebar_nav);
331 | $navbar_form.insertBefore($nav_content);
332 |
333 | $(".sidebar-wrapper .dropdown .dropdown-menu > li > a").click(function(event) {
334 | event.stopPropagation();
335 |
336 | });
337 |
338 | // simulate resize so all the charts/maps will be redrawn
339 | window.dispatchEvent(new Event('resize'));
340 |
341 | mobile_menu_initialized = true;
342 | } else {
343 | if ($(window).width() > 991) {
344 | // reset all the additions that we made for the sidebar wrapper only if the screen is bigger than 991px
345 | $sidebar_wrapper.find('.navbar-form').remove();
346 | $sidebar_wrapper.find('.nav-mobile-menu').remove();
347 |
348 | mobile_menu_initialized = false;
349 | }
350 | }
351 | }, 200),
352 |
353 | startAnimationForLineChart: function(chart) {
354 | chart.on('draw', function(data) {
355 | if ((data.type === 'line' || data.type === 'area') && window.matchMedia("(min-width: 900px)").matches) {
356 | data.element.animate({
357 | d: {
358 | begin: 600,
359 | dur: 700,
360 | from: data.path.clone().scale(1, 0).translate(0, data.chartRect.height()).stringify(),
361 | to: data.path.clone().stringify(),
362 | easing: Chartist.Svg.Easing.easeOutQuint
363 | }
364 | });
365 | } else if (data.type === 'point') {
366 | seq++;
367 | data.element.animate({
368 | opacity: {
369 | begin: seq * delays,
370 | dur: durations,
371 | from: 0,
372 | to: 1,
373 | easing: 'ease'
374 | }
375 | });
376 | }
377 |
378 | });
379 |
380 | seq = 0;
381 |
382 | },
383 | startAnimationForBarChart: function(chart) {
384 | chart.on('draw', function(data) {
385 | if (data.type === 'bar' && window.matchMedia("(min-width: 900px)").matches) {
386 | seq2++;
387 | data.element.animate({
388 | opacity: {
389 | begin: seq2 * delays2,
390 | dur: durations2,
391 | from: 0,
392 | to: 1,
393 | easing: 'ease'
394 | }
395 | });
396 | }
397 |
398 | });
399 |
400 | seq2 = 0;
401 |
402 | }
403 | }
404 |
405 | // Returns a function, that, as long as it continues to be invoked, will not
406 | // be triggered. The function will be called after it stops being called for
407 | // N milliseconds. If `immediate` is passed, trigger the function on the
408 | // leading edge, instead of the trailing.
409 |
410 | function debounce(func, wait, immediate) {
411 | var timeout;
412 | return function() {
413 | var context = this,
414 | args = arguments;
415 | clearTimeout(timeout);
416 | timeout = setTimeout(function() {
417 | timeout = null;
418 | if (!immediate) func.apply(context, args);
419 | }, wait);
420 | if (immediate && !timeout) func.apply(context, args);
421 | };
422 | };
--------------------------------------------------------------------------------
/public/js/material-dashboard.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["_site_dashboard_free/assets/js/dashboard-free.js"],"names":["isWindows","navigator","platform","indexOf","$","perfectScrollbar","addClass","breakCards","searchVisible","transparent","transparentDemo","fixedTop","mobile_menu_visible","mobile_menu_initialized","toggle_initialized","bootstrap_nav_initialized","seq","delays","durations","seq2","delays2","durations2","debounce","func","wait","immediate","timeout","context","this","args","arguments","clearTimeout","setTimeout","apply","document","ready","bootstrapMaterialDesign","$sidebar","md","initSidebarsCheck","window_width","window","width","checkSidebarImage","length","selectpicker","tooltip","on","parent","removeClass","hasClass","closest","$toggle","remove","$layer","find","appendTo","click","resize","initDashboardPageCharts","misc","navbar_menu_visible","active_collapse","disabled_collapse_init","image_src","data","undefined","sidebar_container","append","initRightMenu","dataDailySalesChart","labels","series","optionsDailySalesChart","lineSmooth","Chartist","Interpolation","cardinal","tension","low","high","chartPadding","top","right","bottom","left","dailySalesChart","Line","startAnimationForLineChart","dataCompletedTasksChart","optionsCompletedTasksChart","completedTasksChart","websiteViewsChart","Bar","axisX","showGrid","seriesBarDistance","labelInterpolationFnc","value","startAnimationForBarChart","showNotification","from","align","type","color","Math","floor","random","notify","icon","message","timer","placement","checkScrollForTransparentNavbar","scrollTop","$sidebar_wrapper","console","log","$navbar","children","mobile_menu_content","nav_content","html","navbar_form","outerHTML","$sidebar_nav","$nav_content","$navbar_form","insertBefore","event","stopPropagation","dispatchEvent","Event","chart","matchMedia","matches","element","animate","opacity","begin","dur","to","easing","d","path","clone","scale","translate","chartRect","height","stringify","Svg","Easing","easeOutQuint"],"mappings":"AAkBIA,WAAiD,EAArCC,UAAUC,SAASC,QAAQ,OAEnCH,WAEDI,EAAE,0CAA0CC,mBAE5CD,EAAE,QAAQE,SAAS,yBAEnBF,EAAE,QAAQE,SAAS,yBAK1B,IAAIC,YAAa,EAEbC,cAAgB,EAChBC,aAAc,EAEdC,iBAAkB,EAClBC,UAAW,EAEXC,oBAAsB,EACtBC,yBAA0B,EAC1BC,oBAAqB,EACrBC,2BAA4B,EAE5BC,IAAM,EACNC,OAAS,GACTC,UAAY,IACZC,KAAO,EACPC,QAAU,GACVC,WAAa,IAwWjB,SAASC,SAASC,EAAMC,EAAMC,GAC7B,IAAIC,EACJ,OAAO,WACN,IAAIC,EAAUC,KAAMC,EAAOC,UAC3BC,aAAaL,GACbA,EAAUM,WAAW,WACpBN,EAA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,OAEtBD,YAAc,8CAAgDA,YAAc,QAE5EE,YAAsD,GAAxCvH,EAAE,OAAOmD,KAAK,gBAAgBX,OAAcxC,EAAE,OAAOmD,KAAK,gBAAgB,GAAGqE,UAAY,KAEvGC,aAAeV,iBAAiB5D,KAAK,WAGrCuE,aAAe1H,EAAEqH,aACjBM,aAAe3H,EAAEuH,aACjBG,aAAaE,aAAaH,cAC1BE,aAAaC,aAAaF,cAE1B1H,EAAE,sDAAsDqD,MAAM,SAASwE,GACnEA,EAAMC,oBAKVzF,OAAO0F,cAAc,IAAIC,MAAM,WAE/BvH,yBAA0B,IAU/B,KAEH2E,2BAA4B,SAAS6C,GACjCA,EAAMtF,GAAG,OAAQ,SAASkB,GACJ,SAAdA,EAAKsC,MAAiC,SAAdtC,EAAKsC,OAAqB9D,OAAO6F,WAAW,sBAAsBC,QAUvE,UAAdtE,EAAKsC,OACZvF,MACAiD,EAAKuE,QAAQC,QAAQ,CACjBC,QAAS,CACLC,MAAO3H,IAAMC,OACb2H,IAAK1H,UACLmF,KAAM,EACNwC,GAAI,EACJC,OAAQ,WAjBhB7E,EAAKuE,QAAQC,QAAQ,CACjBM,EAAG,CACCJ,MAAO,IACPC,IAAK,IACLvC,KAAMpC,EAAK+E,KAAKC,QAAQC,MAAM,EAAG,GAAGC,UAAU,EAAGlF,EAAKmF,UAAUC,UAAUC,YAC1ET,GAAI5E,EAAK+E,KAAKC,QAAQK,YACtBR,OAAQnE,SAAS4E,IAAIC,OAAOC,kBAkB1CzI,IAAM,GAGVmF,0BAA2B,SAASkC,GAChCA,EAAMtF,GAAG,OAAQ,SAASkB,GACN,QAAdA,EAAKsC,MAAmB9D,OAAO6F,WAAW,sBAAsBC,UAChEpH,OACA8C,EAAKuE,QAAQC,QAAQ,CACjBC,QAAS,CACLC,MAAOxH,KAAOC,QACdwH,IAAKvH,WACLgF,KAAM,EACNwC,GAAI,EACJC,OAAQ,aAOtB3H,KAAO"}
--------------------------------------------------------------------------------
/public/js/material-dashboard.min.js:
--------------------------------------------------------------------------------
1 | isWindows=-1');0!=$("body").find(".main-panel").length?e.appendTo(".main-panel"):$("body").hasClass("off-canvas-sidebar")&&e.appendTo(".wrapper-full-page"),setTimeout(function(){e.addClass("visible")},100),e.click(function(){$("html").removeClass("nav-open"),mobile_menu_visible=0,e.removeClass("visible"),setTimeout(function(){e.remove(),$toggle.removeClass("toggled")},400)}),$("html").addClass("nav-open"),mobile_menu_visible=1}}),$(window).resize(function(){md.initSidebarsCheck(),seq=seq2=0,setTimeout(function(){md.initDashboardPageCharts()},500)}),md={misc:{navbar_menu_visible:0,active_collapse:!0,disabled_collapse_init:0},checkSidebarImage:function(){$sidebar=$(".sidebar"),image_src=$sidebar.data("image"),void 0!==image_src&&(sidebar_container='',$sidebar.append(sidebar_container))},initSidebarsCheck:function(){$(window).width()<=991&&0!=$sidebar.length&&md.initRightMenu()},initDashboardPageCharts:function(){if(0!=$("#dailySalesChart").length||0!=$("#completedTasksChart").length||0!=$("#websiteViewsChart").length){dataDailySalesChart={labels:["M","T","W","T","F","S","S"],series:[[12,17,7,17,23,18,38]]},optionsDailySalesChart={lineSmooth:Chartist.Interpolation.cardinal({tension:0}),low:0,high:50,chartPadding:{top:0,right:0,bottom:0,left:0}};var e=new Chartist.Line("#dailySalesChart",dataDailySalesChart,optionsDailySalesChart);md.startAnimationForLineChart(e),dataCompletedTasksChart={labels:["12p","3p","6p","9p","12p","3a","6a","9a"],series:[[230,750,450,300,280,240,200,190]]},optionsCompletedTasksChart={lineSmooth:Chartist.Interpolation.cardinal({tension:0}),low:0,high:1e3,chartPadding:{top:0,right:0,bottom:0,left:0}};var a=new Chartist.Line("#completedTasksChart",dataCompletedTasksChart,optionsCompletedTasksChart);md.startAnimationForLineChart(a);var n=Chartist.Bar("#websiteViewsChart",{labels:["J","F","M","A","M","J","J","A","S","O","N","D"],series:[[542,443,320,780,553,453,326,434,568,610,756,895]]},{axisX:{showGrid:!1},low:0,high:1e3,chartPadding:{top:0,right:5,bottom:0,left:0}},[["screen and (max-width: 640px)",{seriesBarDistance:5,axisX:{labelInterpolationFnc:function(e){return e[0]}}}]]);md.startAnimationForBarChart(n)}},showNotification:function(e,a){type=["","info","danger","success","warning","primary"],color=Math.floor(5*Math.random()+1),$.notify({icon:"add_alert",message:"Welcome to Material Dashboard - a beautiful freebie for every web developer."},{type:type[color],timer:3e3,placement:{from:e,align:a}})},checkScrollForTransparentNavbar:debounce(function(){260<$(document).scrollTop()?transparent&&(transparent=!1,$(".navbar-color-on-scroll").removeClass("navbar-transparent")):transparent||(transparent=!0,$(".navbar-color-on-scroll").addClass("navbar-transparent"))},17),initRightMenu:debounce(function(){$sidebar_wrapper=$(".sidebar-wrapper"),mobile_menu_initialized?991<$(window).width()&&($sidebar_wrapper.find(".navbar-form").remove(),$sidebar_wrapper.find(".nav-mobile-menu").remove(),mobile_menu_initialized=!1):(console.log("intra"),$navbar=$("nav").find(".navbar-collapse").children(".navbar-nav"),mobile_menu_content="",nav_content=$navbar.html(),nav_content='
'+nav_content+"
",navbar_form=0!=$("nav").find(".navbar-form").length?$("nav").find(".navbar-form")[0].outerHTML:null,$sidebar_nav=$sidebar_wrapper.find(" > .nav"),$nav_content=$(nav_content),$navbar_form=$(navbar_form),$nav_content.insertBefore($sidebar_nav),$navbar_form.insertBefore($nav_content),$(".sidebar-wrapper .dropdown .dropdown-menu > li > a").click(function(e){e.stopPropagation()}),window.dispatchEvent(new Event("resize")),mobile_menu_initialized=!0)},200),startAnimationForLineChart:function(e){e.on("draw",function(e){"line"!==e.type&&"area"!==e.type||!window.matchMedia("(min-width: 900px)").matches?"point"===e.type&&(seq++,e.element.animate({opacity:{begin:seq*delays,dur:durations,from:0,to:1,easing:"ease"}})):e.element.animate({d:{begin:600,dur:700,from:e.path.clone().scale(1,0).translate(0,e.chartRect.height()).stringify(),to:e.path.clone().stringify(),easing:Chartist.Svg.Easing.easeOutQuint}})}),seq=0},startAnimationForBarChart:function(e){e.on("draw",function(e){"bar"===e.type&&window.matchMedia("(min-width: 900px)").matches&&(seq2++,e.element.animate({opacity:{begin:seq2*delays2,dur:durations2,from:0,to:1,easing:"ease"}}))}),seq2=0}};
2 | //# sourceMappingURL=_site_dashboard_free/assets/js/dashboard-free.js.map
--------------------------------------------------------------------------------
/public/js/plugins/bootstrap-notify.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 |
4 |
5 | Creative Tim Modifications
6 |
7 | Lines: 236 was changed from top: 5px to top: 50% and we added margin-top: -9px. In this way the close button will be aligned vertically
8 | Line:219 - modified when the icon is set, we add the class "alert-with-icon", so there will be enough space for the icon.
9 | Lines: 179/222 - class() was changed to html() so we can add the Material Design Icons
10 |
11 |
12 |
13 | */
14 |
15 |
16 | /*
17 | * Project: Bootstrap Notify = v3.1.5
18 | * Description: Turns standard Bootstrap alerts into "Growl-like" notifications.
19 | * Author: Mouse0270 aka Robert McIntosh
20 | * License: MIT License
21 | * Website: https://github.com/mouse0270/bootstrap-growl
22 | */
23 |
24 | /* global define:false, require: false, jQuery:false */
25 |
26 | (function(factory) {
27 | if (typeof define === 'function' && define.amd) {
28 | // AMD. Register as an anonymous module.
29 | define(['jquery'], factory);
30 | } else if (typeof exports === 'object') {
31 | // Node/CommonJS
32 | factory(require('jquery'));
33 | } else {
34 | // Browser globals
35 | factory(jQuery);
36 | }
37 | }(function($) {
38 | // Create the defaults once
39 | var defaults = {
40 | element: 'body',
41 | position: null,
42 | type: "info",
43 | allow_dismiss: true,
44 | allow_duplicates: true,
45 | newest_on_top: false,
46 | showProgressbar: false,
47 | placement: {
48 | from: "top",
49 | align: "right"
50 | },
51 | offset: 20,
52 | spacing: 10,
53 | z_index: 1031,
54 | delay: 5000,
55 | timer: 1000,
56 | url_target: '_blank',
57 | mouse_over: null,
58 | animate: {
59 | enter: 'animated fadeInDown',
60 | exit: 'animated fadeOutUp'
61 | },
62 | onShow: null,
63 | onShown: null,
64 | onClose: null,
65 | onClosed: null,
66 | icon_type: 'class',
67 | template: '
{1}{2}
'
68 | };
69 |
70 | String.format = function() {
71 | var str = arguments[0];
72 | for (var i = 1; i < arguments.length; i++) {
73 | str = str.replace(RegExp("\\{" + (i - 1) + "\\}", "gm"), arguments[i]);
74 | }
75 | return str;
76 | };
77 |
78 | function isDuplicateNotification(notification) {
79 | var isDupe = false;
80 |
81 | $('[data-notify="container"]').each(function(i, el) {
82 | var $el = $(el);
83 | var title = $el.find('[data-notify="title"]').text().trim();
84 | var message = $el.find('[data-notify="message"]').html().trim();
85 |
86 | // The input string might be different than the actual parsed HTML string!
87 | // ( vs for example)
88 | // So we have to force-parse this as HTML here!
89 | var isSameTitle = title === $("
" + notification.settings.content.title + "
").html().trim();
90 | var isSameMsg = message === $("