├── .gitignore ├── README.md ├── app.js ├── package-lock.json ├── package.json ├── public ├── css │ └── material-dashboard.css ├── img │ ├── apple-icon.png │ ├── cover.jpg │ ├── demo.png │ ├── faces │ │ ├── avatar.jpg │ │ ├── card-profile1-square.jpg │ │ ├── card-profile2-square.jpg │ │ └── marc.jpg │ ├── favicon.png │ ├── mask.png │ ├── new_logo.png │ ├── sidebar-1.jpg │ ├── sidebar-2.jpg │ ├── sidebar-3.jpg │ └── sidebar-4.jpg └── js │ ├── control.js │ ├── core │ ├── bootstrap-material-design.min.js │ ├── jquery.min.js │ └── popper.min.js │ ├── material-dashboard.js │ ├── material-dashboard.js.map │ ├── material-dashboard.min.js │ └── plugins │ ├── bootstrap-notify.js │ ├── chartist.min.js │ └── perfect-scrollbar.jquery.min.js ├── routes ├── db.js ├── db_.js └── index.js ├── score.db └── views ├── gameRule.ejs ├── gameStart.ejs ├── layout.ejs └── solutions.ejs /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SQLi-playground 2 | 3 | [![GitHub stars](https://img.shields.io/github/stars/JalinWu/SQLi-playground)](https://github.com/JalinWu/SQLi-playground/stargazers) ![GitHub All Releases](https://img.shields.io/github/downloads/JalinWu/SQLi-playground/total) 4 | 5 | It's a teaching material for practicing SQL injection, which is based on Node.js and SQLite. Have fun and enjoy it. 6 | 7 | ## Screenshots 8 | 9 | ![image](https://raw.githubusercontent.com/JalinWu/SQLi-playground/master/public/img/demo.png) 10 | 11 | ## Usage 12 | 13 | ```sh 14 | $ npm install 15 | ``` 16 | 17 | ```sh 18 | # Run with Nodemon 19 | $ npm run dev 20 | 21 | # Visit http://localhost:3000 22 | ``` -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | const expressLayouts = require('express-ejs-layouts'); 3 | var bodyParser = require('body-parser'); 4 | 5 | var app = express(); 6 | 7 | // 解析application/json 8 | app.use(bodyParser.json()); 9 | 10 | // 解析application/x-www-form-urlencoded,從網頁表單送來的資料 11 | app.use(bodyParser.urlencoded({extended: true})); 12 | 13 | // EJS 14 | app.use(expressLayouts); 15 | app.set('view engine', 'ejs'); 16 | app.use(express.static(__dirname + '/public')); 17 | 18 | // Routes 19 | app.use('/', require('./routes/index.js')); 20 | app.use('/db', require('./routes/db.js')); 21 | 22 | var PORT = 3000; 23 | app.listen(PORT, function () { 24 | console.log(`Server started on port ${PORT}`); 25 | }); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sqli-playground", 3 | "version": "1.0.0", 4 | "description": "It's a teaching material", 5 | "main": "app.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "dev": "nodemon app.js" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/JalinWu/SQLi-playground.git" 13 | }, 14 | "author": "", 15 | "license": "ISC", 16 | "bugs": { 17 | "url": "https://github.com/JalinWu/SQLi-playground/issues" 18 | }, 19 | "homepage": "https://github.com/JalinWu/SQLi-playground#readme", 20 | "dependencies": { 21 | "body-parser": "^1.19.0", 22 | "ejs": "^3.1.3", 23 | "express": "^4.17.1", 24 | "express-ejs-layouts": "^2.5.0", 25 | "sqlite3": "^5.0.0" 26 | }, 27 | "devDependencies": { 28 | "nodemon": "^2.0.4" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /public/img/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JalinWu/SQLi-playground/2de916be8dfa7053b56559edb0995982e533a382/public/img/apple-icon.png -------------------------------------------------------------------------------- /public/img/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JalinWu/SQLi-playground/2de916be8dfa7053b56559edb0995982e533a382/public/img/cover.jpg -------------------------------------------------------------------------------- /public/img/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JalinWu/SQLi-playground/2de916be8dfa7053b56559edb0995982e533a382/public/img/demo.png -------------------------------------------------------------------------------- /public/img/faces/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JalinWu/SQLi-playground/2de916be8dfa7053b56559edb0995982e533a382/public/img/faces/avatar.jpg -------------------------------------------------------------------------------- /public/img/faces/card-profile1-square.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JalinWu/SQLi-playground/2de916be8dfa7053b56559edb0995982e533a382/public/img/faces/card-profile1-square.jpg -------------------------------------------------------------------------------- /public/img/faces/card-profile2-square.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JalinWu/SQLi-playground/2de916be8dfa7053b56559edb0995982e533a382/public/img/faces/card-profile2-square.jpg -------------------------------------------------------------------------------- /public/img/faces/marc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JalinWu/SQLi-playground/2de916be8dfa7053b56559edb0995982e533a382/public/img/faces/marc.jpg -------------------------------------------------------------------------------- /public/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JalinWu/SQLi-playground/2de916be8dfa7053b56559edb0995982e533a382/public/img/favicon.png -------------------------------------------------------------------------------- /public/img/mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JalinWu/SQLi-playground/2de916be8dfa7053b56559edb0995982e533a382/public/img/mask.png -------------------------------------------------------------------------------- /public/img/new_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JalinWu/SQLi-playground/2de916be8dfa7053b56559edb0995982e533a382/public/img/new_logo.png -------------------------------------------------------------------------------- /public/img/sidebar-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JalinWu/SQLi-playground/2de916be8dfa7053b56559edb0995982e533a382/public/img/sidebar-1.jpg -------------------------------------------------------------------------------- /public/img/sidebar-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JalinWu/SQLi-playground/2de916be8dfa7053b56559edb0995982e533a382/public/img/sidebar-2.jpg -------------------------------------------------------------------------------- /public/img/sidebar-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JalinWu/SQLi-playground/2de916be8dfa7053b56559edb0995982e533a382/public/img/sidebar-3.jpg -------------------------------------------------------------------------------- /public/img/sidebar-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JalinWu/SQLi-playground/2de916be8dfa7053b56559edb0995982e533a382/public/img/sidebar-4.jpg -------------------------------------------------------------------------------- /public/js/control.js: -------------------------------------------------------------------------------- 1 | function addScoreTable(res) { 2 | $('#score-tbody').empty(); 3 | for (var i = 0; i < res.length; i++) { 4 | $('#score-tbody').append(` 5 | 6 | 7 | ${res[i].id} 8 | 9 | 10 | ${res[i].class} 11 | 12 | 13 | ${res[i].name} 14 | 15 | 16 | ${res[i].score} 17 | 18 | 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 = '');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='