1! function (e) { 2 var t = {}; 3 4 function n(i) { 5 if (t[i]) return t[i].exports; 6 var s = t[i] = { 7 i: i, 8 l: !1, 9 exports: {} 10 }; 11 return e[i].call(s.exports, s, s.exports, n), s.l = !0, s.exports 12 } 13 n.m = e, n.c = t, n.d = function (e, t, i) { 14 n.o(e, t) || Object.defineProperty(e, t, { 15 enumerable: !0, 16 get: i 17 }) 18 }, n.r = function (e) { 19 "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { 20 value: "Module" 21 }), Object.defineProperty(e, "__esModule", { 22 value: !0 23 }) 24 }, n.t = function (e, t) { 25 if (1 & t && (e = n(e)), 8 & t) return e; 26 if (4 & t && "object" == typeof e && e && e.__esModule) return e; 27 var i = Object.create(null); 28 if (n.r(i), Object.defineProperty(i, "default", { 29 enumerable: !0, 30 value: e 31 }), 2 & t && "string" != typeof e) 32 for (var s in e) n.d(i, s, function (t) { 33 return e[t] 34 }.bind(null, s)); 35 return i 36 }, n.n = function (e) { 37 var t = e && e.__esModule ? function () { 38 return e.default 39 } : function () { 40 return e 41 }; 42 return n.d(t, "a", t), t 43 }, n.o = function (e, t) { 44 return Object.prototype.hasOwnProperty.call(e, t) 45 }, n.p = "", n(n.s = 0) 46}([function (e, t, n) { 47 "use strict"; 48 n.r(t); 49 var i = { 50 hooks: {}, 51 extensions: [], 52 wrappers: [], 53 navbar: { 54 add: !0, 55 sticky: !0, 56 title: "", 57 titleLink: "parent" 58 }, 59 onClick: { 60 close: null, 61 preventDefault: null, 62 setSelected: !0 63 }, 64 slidingSubmenus: !0 65 }, 66 s = { 67 classNames: { 68 inset: "Inset", 69 nolistview: "NoListview", 70 nopanel: "NoPanel", 71 panel: "Panel", 72 selected: "Selected", 73 vertical: "Vertical" 74 }, 75 language: null, 76 openingInterval: 25, 77 panelNodetype: ["ul", "ol", "div"], 78 transitionDuration: 400 79 }; 80 81 function a(e, t) { 82 for (var n in "object" != o(e) && (e = {}), "object" != o(t) && (t = {}), t) t.hasOwnProperty(n) && (void 0 === 83 e[n] ? e[n] = t[n] : "object" == o(e[n]) && a(e[n], t[n])); 84 return e 85 } 86 87 function o(e) { 88 return {}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase() 89 } 90 91 function r(e, t, n) { 92 if ("function" == typeof t) { 93 var i = t.call(e); 94 if (void 0 !== i) return i 95 } 96 return null !== t && "function" != typeof t && void 0 !== t || void 0 === n ? t : n 97 } 98 99 function c(e, t, n) { 100 var i = !1, 101 s = function (n) { 102 void 0 !== n && n.target !== e || (i || (e.removeEventListener("transitionend", s), e.removeEventListener( 103 "webkitTransitionEnd", s), t.call(e)), i = !0) 104 }; 105 e.addEventListener("transitionend", s), e.addEventListener("webkitTransitionEnd", s), setTimeout(s, 1.1 * n) 106 } 107 108 function l() { 109 return "mm-" + m++ 110 } 111 var m = 0; 112 113 function d(e) { 114 return "mm-" == e.slice(0, 3) ? e.slice(3) : e 115 } 116 var p = {}; 117 118 function u(e, t) { 119 void 0 === p[t] && (p[t] = {}), a(p[t], e) 120 } 121 var f = { 122 Menu: "Ù ÙÙ" 123 }, 124 h = { 125 Menu: "Menü" 126 }, 127 v = { 128 Menu: "ÐенÑ" 129 }; 130 131 function b(e) { 132 var t = e.split("."), 133 n = document.createElement(t.shift()); 134 return t.forEach((function (e) { 135 n.classList.add(e) 136 })), n 137 } 138 139 function g(e, t) { 140 return Array.prototype.slice.call(e.querySelectorAll(t)) 141 } 142 143 function _(e, t) { 144 var n = Array.prototype.slice.call(e.children); 145 return t ? n.filter((function (e) { 146 return e.matches(t) 147 })) : n 148 } 149 150 function y(e, t) { 151 for (var n = [], i = e.parentElement; i;) n.push(i), i = i.parentElement; 152 return t ? n.filter((function (e) { 153 return e.matches(t) 154 })) : n 155 } 156 157 function w(e) { 158 return e.filter((function (e) { 159 return !e.matches(".mm-hidden") 160 })) 161 } 162 163 function L(e) { 164 var t = []; 165 return w(e).forEach((function (e) { 166 t.push.apply(t, _(e, "a.mm-listitem__text")) 167 })), t.filter((function (e) { 168 return !e.matches(".mm-btn_next") 169 })) 170 } 171 172 function E(e, t, n) { 173 e.matches("." + t) && (e.classList.remove(t), e.classList.add(n)) 174 } 175 var x = {}; 176 177 function P(e, t, n) { 178 "number" == typeof e && (e = "(min-width: " + e + "px)"), x[e] = x[e] || [], x[e].push({ 179 yes: t, 180 no: n 181 }) 182 } 183 184 function k(e, t) { 185 for (var n = t.matches ? "yes" : "no", i = 0; i < x[e].length; i++) x[e][i][n]() 186 } 187 u({ 188 Menu: "" 189 }, "nl"), u(f, "fa"), u(h, "de"), u(v, "ru"); 190 var S = function () { 191 function e(t, n, i) { 192 return this.opts = a(n, e.options), this.conf = a(i, e.configs), this._api = ["bind", "initPanel", 193 "initListview", "openPanel", "closePanel", "closeAllPanels", "setSelected" 194 ], this.node = {}, this.vars = {}, this.hook = {}, this.clck = [], this.node.menu = "string" == typeof t ? 195 document.querySelector(t) : t, "function" == typeof this._deprecatedWarnings && this._deprecatedWarnings(), 196 this._initWrappers(), this._initAddons(), this._initExtensions(), this._initHooks(), this._initAPI(), 197 this._initMenu(), this._initPanels(), this._initOpened(), this._initAnchors(), 198 function () { 199 var e = function (e) { 200 var t = window.matchMedia(e); 201 k(e, t), t.onchange = function (n) { 202 k(e, t) 203 } 204 }; 205 for (var t in x) e(t) 206 }(), this 207 } 208 return e.prototype.openPanel = function (e, t) { 209 var n = this; 210 if (this.trigger("openPanel:before", [e]), e && (e.matches(".mm-panel") || (e = e.closest(".mm-panel")), 211 e)) { 212 if ("boolean" != typeof t && (t = !0), e.parentElement.matches(".mm-listitem_vertical")) { 213 y(e, ".mm-listitem_vertical").forEach((function (e) { 214 e.classList.add("mm-listitem_opened"), _(e, ".mm-panel").forEach((function (e) { 215 e.classList.remove("mm-hidden") 216 })) 217 })); 218 var i = y(e, ".mm-panel").filter((function (e) { 219 return !e.parentElement.matches(".mm-listitem_vertical") 220 })); 221 this.trigger("openPanel:start", [e]), i.length && this.openPanel
221(i[0]), this.trigger( 222 "openPanel:finish", [e]) 223 } else { 224 if (e.matches(".mm-panel_opened")) return; 225 var s = _(this.node.pnls, ".mm-panel"), 226 a = _(this.node.pnls, ".mm-panel_opened")[0]; 227 s.filter((function (t) { 228 return t !== e 229 })).forEach((function (e) { 230 e.classList.remove("mm-panel_opened-parent") 231 })); 232 for (var o = e.mmParent; o;)(o = o.closest(".mm-panel")) && (o.parentElement.matches( 233 ".mm-listitem_vertical") || o.classList.add("mm-panel_opened-parent"), o = o.mmParent); 234 s.forEach((function (e) { 235 e.classList.remove("mm-panel_highest") 236 })), s.filter((function (e) { 237 return e !== a 238 })).filter((function (t) { 239 return t !== e 240 })).forEach((function (e) { 241 e.classList.add("mm-hidden") 242 })), e.classList.remove("mm-hidden"); 243 var r = function () { 244 a && a.classList.remove("mm-panel_opened"), e.classList.add("mm-panel_opened"), e.matches( 245 ".mm-panel_opened-parent") ? (a && a.classList.add("mm-panel_highest"), e.classList.remove( 246 "mm-panel_opened-parent")) : (a && a.classList.add("mm-panel_opened-parent"), e.classList.add( 247 "mm-panel_highest")), n.trigger("openPanel:start", [e]) 248 }, 249 l = function () { 250 a && (a.classList.remove("mm-panel_highest"), a.classList.add("mm-hidden")), e.classList.remove( 251 "mm-panel_highest"), n.trigger("openPanel:finish", [e]) 252 }; 253 t && !e.matches(".mm-panel_noanimation") ? setTimeout((function () { 254 c(e, (function () { 255 l() 256 }), n.conf.transitionDuration), r() 257 }), this.conf.openingInterval) : (r(), l()) 258 } 259 this.trigger("openPanel:after", [e]) 260 } 261 }, e.prototype.closePanel = function (e) { 262 this.trigger("closePanel:before", [e]); 263 var t = e.parentElement; 264 t.matches(".mm-listitem_vertical") && (t.classList.remove("mm-listitem_opened"), e.classList.add( 265 "mm-hidden"), this.trigger("closePanel", [e])), this.trigger("closePanel:after", [e]) 266 }, e.prototype.closeAllPanels = function (e) { 267 this.trigger("closeAllPanels:before"), this.node.pnls.querySelectorAll(".mm-listitem").forEach((function ( 268 e) { 269 e.classList.remove("mm-listitem_selected"), e.classList.remove("mm-listitem_opened") 270 })); 271 var t = _(this.node.pnls, ".mm-panel"), 272 n = e || t[0]; 273 _(this.node.pnls, ".mm-panel").forEach((function (e) { 274 e !== n && (e.classList.remove("mm-panel_opened"), e.classList.remove("mm-panel_opened-parent"), 275 e.classList.remove("mm-panel_highest"), e.classList.add("mm-hidden")) 276 })), this.openPanel(n, !1), this.trigger("closeAllPanels:after") 277 }, e.prototype.togglePanel = function (e) { 278 var t = e.parentElement; 279 t.matches(".mm-listitem_vertical") && this[t.matches(".mm-listitem_opened") ? "closePanel" : "openPanel"] 280 (e) 281 }, e.prototype.setSelected = function (e) { 282 this.trigger("setSelected:before", [e]), g(this.node.menu, ".mm-listitem_selected").forEach((function (e) { 283 e.classList.remove("mm-listitem_selected") 284 })), e.classList.add("mm-listitem_selected"), this.trigger("setSelected:after", [e]) 285 }, e.prototype.bind = function (e, t) { 286 this.hook[e] = this.hook[e] || [], this.hook[e].push(t) 287 }, e.prototype.trigger = function (e, t) { 288 if (this.hook[e]) 289 for (var n = 0, i = this.hook[e].length; n < i; n++) this.hook[e][n].apply(this, t) 290 }, e.prototype._initAPI = function () { 291 var e = this, 292 t = this; 293 this.API = {}, this._api.forEach((function (n) { 294 e.API[n] = function () { 295 var e = t[n].apply(t, arguments); 296 return void 0 === e ? t.API : e 297 } 298 }
298)), this.node.menu.mmApi = this.API 299 }, e.prototype._initHooks = function () { 300 for (var e in this.opts.hooks) this.bind(e, this.opts.hooks[e]) 301 }, e.prototype._initWrappers = function () { 302 this.trigger("initWrappers:before"); 303 for (var t = 0; t < this.opts.wrappers.length; t++) { 304 var n = e.wrappers[this.opts.wrappers[t]]; 305 "function" == typeof n && n.call(this) 306 } 307 this.trigger("initWrappers:after") 308 }, e.prototype._initAddons = function () { 309 for (var t in this.trigger("initAddons:before"), e.addons) e.addons[t].call(this); 310 this.trigger("initAddons:after") 311 }, e.prototype._initExtensions = function () { 312 var e = this; 313 this.trigger("initExtensions:before"), "array" == o(this.opts.extensions) && (this.opts.extensions = { 314 all: this.opts.extensions 315 }), Object.keys(this.opts.extensions).forEach((function (t) { 316 var n = e.opts.extensions[t].map((function (e) { 317 return "mm-menu_" + e 318 })); 319 n.length && P(t, (function () {
320 n.forEach((function (t) { 321 e.node.menu.classList.add(t) 322 })) 323 }), (function () { 324 n.forEach((function (t) { 325 e.node.menu.classList.remove(t) 326 })) 327 })) 328 })), this.trigger("initExtensions:after") 329 }, e.prototype._initMenu = function () { 330 var e = this; 331 this.trigger("initMenu:before"), this.node.wrpr = this.node.wrpr || this.node.menu.parentElement, this.node 332 .wrpr.classList.add("mm-wrapper"), this.node.menu.id = this.node.menu.id || l(); 333 var t = b("div.mm-panels"); 334 _(this.node.menu).forEach((function (n) { 335 e.conf.panelNodetype.indexOf(n.nodeName.toLowerCase()) > -1 && t.append(n) 336 })), this.node.menu.append(t), this.node.pnls = t, this.node.menu.classList.add("mm-menu"), this.trigger( 337 "initMenu:after") 338 }, e.prototype._initPanels = function () { 339 var e = this; 340 this.trigger("initPanels:before"), this.clck.push((function (t, n) { 341 if (n.inMenu) { 342 var i = t.getAttribute("href"); 343 if (i && i.length > 1 && "#" == i.slice(0, 1)) try { 344 var s = g(e.node.menu, i)[0]; 345 if (s && s.matches(".mm-panel")) return t.parentElement.matches(".mm-listitem_vertical") ? 346 e.togglePanel(s) : e.openPanel(s), !0 347 } catch (e) {} 348 } 349 })), _(this.node.pnls).forEach((function (t) { 350 e.initPanel(t) 351 })), this.trigger("initPanels:after") 352 }, e.prototype.initPanel = function (e) { 353 var t = this, 354 n = this.conf.panelNodetype.join(", "); 355 if (e.matches(n) && (e.matches(".mm-panel") || (e = this._initPanel(e)), e)) { 356 var i = []; 357 i.push.apply(i, _(e, "." + this.conf.classNames.panel)), _(e, ".mm-listview").forEach((function (e) { 358 _(e, ".mm-listitem").forEach((function (e) { 359 i.push.apply(i, _(e, n)) 360 })) 361 })), i.forEach((function (e) { 362 t.initPanel(e) 363 })) 364 } 365 }, e.prototype._initPanel = function (e) { 366 var t = this; 367 if (this.trigger("initPanel:before", [e]), E(e, this.conf.classNames.panel, "mm-panel"), E(e, this.conf.classNames 368 .nopanel, "mm-nopanel"), E(e, this.conf.classNames.inset, "mm-listview_inset"), e.matches( 369 ".mm-listview_inset") && e.classList.add("mm-nopanel"), e.matches(".mm-nopanel")) return null; 370 var n = e.id || l(), 371 i = e.matches("." + this.conf.classNames.vertical) || !this.opts.slidingSubmenus; 372 if (e.classList.remove(this.conf.classNames.vertical), e.matches("ul, ol")) { 373 e.removeAttribute("id"); 374 var s = b("div"); 375 e.before(s), s.append(e), e = s 376 } 377 e.id = n, e.classList.add("mm-panel"), e.classList.add("mm-hidden"); 378 var a = [e.parentElement].filter((function (e) { 379 return e.matches("li") 380 }))[0]; 381 if (i ? a && a.classList.add("mm-listitem_vertical") : this.node.pnls.append(e), a && (a.mmChild = e, e.mmParent = 382 a, a && a.matches(".mm-listitem") && !_(a, ".mm-btn").length)) { 383 var o = _(a, ".mm-listitem__text")[0]; 384 if (o) { 385 var r = b("a.mm-btn.mm-btn_next.mm-listitem__btn"); 386 r.setAttribute("href", "#" + e.id), o.matches("span") ? (r.classList.add("mm-listitem__text"), r.innerHTML = 387 o.innerHTML, a.insertBefore(r, o.nextElementSibling), o.remove()) : a.insertBefore(r, _(a, 388 ".mm-panel")[0]) 389 } 390 } 391 return this._initNavbar(e), _(e, "ul, ol").forEach((function (e) { 392 t.initListview(e) 393 })), this.trigger("initPanel:after", [e]), e 394 }, e.prototype._initNavbar = function (e) { 395 if (this.trigger("initNavbar:before", [e]), !_(e, ".mm-navbar").length) { 396 var t = null, 397 n = null; 398 if (e.getAttribute("data-mm-parent") ? n = g(this.node.pnls, e.getAttribute("data-mm-parent"))[0] : (t = 399 e.mmParent) && (n = t.closest(".mm-panel")), !t || !t.matches(".mm-listitem_vertical")) { 400 var i = b("div.mm-navbar"); 401 if (this.opts.navbar.add ? this.opts.navbar.sticky && i.classList.add("mm-navbar_sticky") : i.classList 402 .add("mm-hidden"), n) { 403 var s = b("a.mm-btn.mm-btn_prev.mm-navbar__btn"); 404 s.setAttribute("href", "#" + n.id), i.append(s) 405 } 406 var a = null; 407 t ? a = _(t, ".mm-listitem__text")[0] : n && (a = g(n, 'a[href="#' + e.id + '"]')[0]); 408 var o = b("p.mm-navbar__title"), 409 r = b("span"); 410 switch (o.append(r), r.innerHTML = e.getAttribute("data-mm-title") || (a ? a.textContent : "") || 411 this.i18n(this.opts.navbar.title) || this.i18n(""), this.opts.navbar.titleLink) { 412 case "anchor": 413 a && o.setAttribute("href", a.getAttribute("href")); 414 break; 415 case "parent": 416 n && o.setAttribute("href", "#" + n.id) 417 } 418 i.append(o), e.prepend(i), this.trigger("initNavbar:after", [e]) 419 } 420 } 421 }, e.prototype.initListview = function (e) { 422 var t = this; 423 this.trigger("initListview:before", [e]), E(e, this.conf.classNames.nolistview, "mm-nolistview"), e.matches( 424 ".mm-nolistview") || (e.classList.add("mm-listview"), _(e).forEach((function (e) { 425 e.classList.add("mm-listitem"), E(e, t.conf.classNames.selected, "mm-listitem_selected"), _(e,
426 "a, span").forEach((function (e) { 427 e.matches(".mm-btn") || e.classList.add("mm-listitem__text") 428 })) 429 }))), this.trigger("initListview:after", [e]) 430 }, e.prototype._initOpened = function () { 431 this.trigger("initOpened:before"); 432 var e = this.node.pnls.querySelectorAll(".mm-listitem_selected"), 433 t = null; 434 e.forEach((function (e) { 435 t = e, e.classList.remove("mm-listitem_selected") 436 })), t && t.classList.add("mm-listitem_selected"); 437 var n = t ? t.closest(".mm-panel") : _(this.node.pnls, ".mm-panel")[0]; 438 this.openPanel(n, !1), this.trigger("initOpened:after") 439 }, e.prototype._initAnchors = function () { 440 var e = this; 441 this.trigger("initAnchors:before"), document.addEventListener("click", (function (t) { 442 var n = t.target.closest("a[href]"); 443 if (n) { 444 for (var i = { 445 inMenu: n.closest(".mm-menu") === e.node.menu, 446 inListview: n.matches(".mm-listitem > a"), 447 toExternal: n.matches('[rel="external"]') || n.matches('[target="_blank"]') 448 }, s = { 449 close: null, 450 setSelected: null, 451 preventDefault: "#" == n.getAttribute("href").slice(0, 1) 452 }, c = 0; c < e.clck.length; c++) { 453 var l = e.clck[c].call(e, n, i); 454 if (l) { 455 if ("boolean" == typeof l) return void t.preventDefault(); 456 "object" == o(l) && (s = a(l, s)) 457 } 458 } 459 i.inMenu && i.inListview && !i.toExternal && (r(n, e.opts.onClick.setSelected, s.setSelected) && 460 e.setSelected(n.parentElement), r(n, e.opts.onClick.preventDefault, s.preventDefault) && t.preventDefault(), 461 r(n, e.opts.onClick.close, s.close) && e.opts.offCanvas && "function" == typeof e.close && 462 e.close()) 463 } 464 }), !0), this.trigger("initAnchors:after") 465 }, e.prototype.i18n = function (e) { 466 return function (e, t) { 467 return "string" == typeof t && void 0 !== p[t] && p[t][e] || e 468 }(e, this.conf.language) 469 }, e.version = "8.5.1", e.options = i, e.configs = s, e.addons = {}, e.wrappers = {}, e.node = {}, e.vars = {}, 470 e 471 }(), 472 M = { 473 blockUI: !0, 474 moveBackground: !0 475 }; 476 var A = { 477 clone: !1, 478 menu: { 479 insertMethod: "prepend", 480 insertSelector: "body" 481 }, 482 page: { 483 nodetype: "div", 484 selector: null, 485 noSelector: [] 486 } 487 }; 488 489 function T(e) { 490 return e ? e.charAt(0).toUpperCase() + e.slice(1) : "" 491 } 492 493 function C(e, t, n) { 494 var i = t.split("."); 495 e[t = "mmEvent" + T(i[0]) + T(i[1])] = e[t] || [], e[t].push(n), e.addEventListener(i[0], n) 496 } 497 498 function N(e, t) { 499 var n = t.split("."); 500 t = "mmEvent" + T(n[0]) + T(n[1]), (e[t] || []).forEach((function (t) { 501 e.removeEventListener(n[0], t) 502 })) 503 } 504 S.options.offCanvas = M, S.configs.offCanvas = A; 505 S.prototype.open = function () { 506 var e = this; 507 this.trigger("open:before"), this.vars.opened || (this._openSetup(), setTimeout((function () { 508 e._openStart() 509 }), this.conf.openingInterval), this.trigger("open:after")) 510 }, S.prototype._openSetup = function () { 511 var e = this, 512 t = this.opts.offCanvas; 513 this.closeAllOthers(), S.node.page.mmStyle = S.node.page.getAttribute("style") || "", 514 function (e, t, n) { 515 var i = t.split("."); 516 (e[t = "mmEvent" + T(i[0]) + T(i[1])] || []).forEach((function (e) { 517 e(n || {}) 518 })) 519 }(window, "resize.page", { 520 force: !0 521 }); 522 var n = ["mm-wrapper_opened"]; 523 t.blockUI && n.push("mm-wrapper_blocking"), "modal" == t.blockUI && n.push("mm-wrapper_modal"), t.moveBackground && 524 n.push("mm-wrapper_background"), n.forEach((function (t) { 525 e.node.wrpr.classList.add(t) 526 })), setTimeout((function () { 527 e.vars.opened = !0 528 }), this.conf.openingInterval), this.node.menu.classList.add("mm-menu_opened") 529 }, S.prototype._openStart = function () { 530 var e = this; 531 c(S.node.page, (function () { 532 e.trigger("open:finish") 533 }), this.conf.transitionDuration), this.trigger("open:start"), this.node.wrpr.classList.add( 534 "mm-wrapper_opening") 535 }, S.prototype.close = function () { 536 var e = this; 537 this.trigger("close:before"), this.vars.opened && (c(S.node.page, (function () { 538 e.node.menu.classList.remove("mm-menu_opened"); 539 ["mm-wrapper_opened", "mm-wrapper_blocking", "mm-wrapper_modal", "mm-wrapper_background"].forEach(( 540 function (t) { 541 e.node.wrpr.classList.remove(t) 542 })), S.node.page.setAttribute("style", S.node.page.mmStyle), e.vars.opened = !1, e.trigger( 543 "close:finish") 544 }), this.conf.transitionDuration), this.trigger("close:start"), this.node.wrpr.classList.remove( 545 "mm-wrapper_opening"), this.trigger("close:after")) 546 }, S.prototype.closeAllOthers = function () { 547 var e = this; 548 g(document.body, ".mm-menu_offcanvas").forEach((function (t) { 549 if (t !== e.node.menu) { 550 var n = t.mmApi; 551 n && n.close && n.close() 552 } 553 })) 554 }, S.prototype.setPage = function (e) { 555 this.trigger("setPage:before", [e]); 556 var t = this.conf.offCanvas; 557 if (!e) { 558 var n = "string" == typeof t.page.selector ? g(document.body, t.page.selector) : _(document.body, t.page.nodetype); 559 if (n = n.filter((function (e) { 560 return !e.matches(".mm-menu, .mm-wrapper__blocker") 561 })), t.page.noSelector.length && (n = n.filter((function (e) { 562 return !e.matches(t.page.noSelector.join(", ")) 563 }))), n.length > 1) { 564 var i = b("div");
565 n[0].before(i), n.forEach((function (e) { 566 i.append(e) 567 })), n = [i] 568 } 569 e = n[0] 570 } 571 e.classList.add("mm-page"), e.classList.add("mm-slideout"), e.id = e.id || l(), S.node.page = e, this.trigger( 572 "setPage:after", [e]) 573 }; 574 var H = function () { 575 var e = this; 576 N(document.body, "keydown.tabguard"), C(document.body, "keydown.tabguard", (function (t) { 577 9 == t.keyCode && e.node.wrpr.matches(".mm-wrapper_opened") && t.preventDefault() 578 })) 579 }, 580 j = function () { 581 var e = this; 582 this.trigger("initBlocker:before"); 583 var t = this.opts.offCanvas, 584 n = this.conf.offCanvas; 585 if (t.blockUI) { 586 if (!S.node.blck) { 587 var i = b("div.mm-wrapper__blocker.mm-slideout"); 588 i.innerHTML = "<a></a>", document.querySelector(n.menu.insertSelector).append(i), S.node.blck = i 589 } 590 var s = function (t) { 591 t.preventDefault(), t.stopPropagation(), e.node.wrpr.matches(".mm-wrapper_modal") || e.close() 592 }; 593 S.node.blck.addEventListener("mousedown", s), S.node.blck.addEventListener("touchstart", s), S.node.blck.addEventListener( 594 "touchmove", s), this.trigger("initBlocker:after") 595 } 596 }, 597 D = { 598 aria: !0, 599 text: !0 600 }; 601 var O = { 602 text: { 603 closeMenu: "Close menu", 604 closeSubmenu: "Close submenu", 605 openSubmenu: "Open submenu", 606 toggleSubmenu: "Toggle submenu" 607 } 608 }, 609 I = { 610 "Close menu": "بست٠٠ÙÙ", 611 "Close submenu": "Ø¨Ø³ØªÙ Ø²ÛØ±Ù ÙÙ", 612 "Open submenu": "Ø¨Ø§Ø²Ú©Ø±Ø¯Ù Ø²ÛØ±Ù ÙÙ", 613 "Toggle submenu": "سÙÛÛÚ Ø²ÛØ±Ù ÙÙ" 614 }, 615 q = { 616 "Close menu": "Menü schlieÃen", 617 "Close submenu": "Untermenü schlieÃen", 618 "Open submenu": "Untermenü öffnen", 619 "Toggle submenu": "Untermenü wechseln" 620 }, 621 B = { 622 "Close menu": "ÐакÑÑÑÑ Ð¼ÐµÐ½Ñ", 623 "Close submenu": "ÐакÑÑÑÑ Ð¿Ð¾Ð´Ð¼ÐµÐ½Ñ", 624 "Open submenu": "ÐÑкÑÑÑÑ Ð¿Ð¾Ð´Ð¼ÐµÐ½Ñ", 625 "Toggle submenu": "ÐеÑеклÑÑиÑÑ Ð¿Ð¾Ð´Ð¼ÐµÐ½Ñ" 626 }; 627 u({ 628 "Close menu": "Menu sluiten", 629 "Close submenu": "Submenu sluiten", 630 "Open submenu": "Submenu openen", 631 "Toggle submenu": "Submenu wisselen" 632 }, "nl"), u(I, "fa"), u(q, "de"), u(B, "ru"), S.options.screenReader = D, S.configs.screenReader = O; 633 var z; 634 z = function (e, t, n) { 635 e[t] = n, n ? e.setAttribute(t, n.toString()) : e.removeAttribute(t) 636 }, S.sr_aria = function (e, t, n) { 637 z(e, "aria-" + t, n) 638 }, S.sr_role = function (e, t) { 639 z(e, "role", t) 640 }, S.sr_text = function (e) { 641 return '<span class="mm-sronly">' + e + "</span>" 642 }; 643 var R = { 644 fix: !0 645 }; 646 var U = "ontouchstart" in window || !!navigator.msMaxTouchPoints || !1; 647 S.options.scrollBugFix = R; 648 var W = { 649 height: "default" 650 }; 651 S.options.autoHeight = W; 652 var Y = { 653 close: !1, 654 open: !1 655 }; 656 S.options.backButton = Y; 657 var F = { 658 add: !1, 659 visible: { 660 min: 1, 661 max: 3 662 } 663 }; 664 S.options.columns = F; 665 var X = { 666 add: !1, 667 addTo: "panels", 668 count: !1 669 }; 670 S.options.counters = X, S.configs.classNames.counters = { 671 counter: "Counter" 672 }; 673 var V = { 674 add: !1, 675 addTo: "panels" 676 }; 677 S.options.dividers = V, S.configs.classNames.divider = "Divider"; 678 var Z = { 679 open: !1, 680 node: null 681 }; 682 var G = "ontouchstart" in window || !!navigator.msMaxTouchPoints || !1, 683 K = { 684 top: 0, 685 right: 0, 686 bottom: 0, 687 left: 0 688 }, 689 Q = { 690 start: 15, 691 swipe: 15 692 }, 693 J = { 694 x: ["Right", "Left"], 695 y: ["Down", "Up"] 696 }, 697 $ = 0, 698 ee = 1, 699 te = 2, 700 ne = function (e, t) { 701 return "string" == typeof e && "%" == e.slice(-1) && (e = t * ((e = parseInt(e.slice(0, -1), 10)) / 100)), e 702 }, 703 ie = function () { 704 function e(e, t, n) { 705 this.surface = e, this.area = a(t, K), this.treshold = a(n, Q), this.surface.mmHasDragEvents || (this.surface 706 .addEventListener(G ? "touchstart" : "mousedown", this.start.bind(this)), this.surface.addEventListener( 707 G ? "touchend" : "mouseup", this.stop.bind(this)), this.surface.addEventListener(G ? "touchleave" : 708 "mouseleave", this.stop.bind(this)), this.surface.addEventListener(G ? "touchmove" : "mousemove", 709 this.move.bind(this))), this.surface.mmHasDragEvents = !0 710 } 711 return e.prototype.start = function (e) { 712 this.currentPosition = { 713 x: e.touches ? e.touches[0].pageX : e.pageX || 0, 714 y: e.touches ? e.touches[0].pageY : e.pageY || 0 715 }; 716 var t = this.surface.clientWidth, 717 n = this.surface.clientHeight, 718 i = ne(this.area.top, n); 719 if (!("number" == typeof i && this.currentPosition.y < i)) { 720 var s = ne(this.area.right, t); 721 if (!("number" == typeof s && (s = t - s, this.currentPosition.x > s))) { 722 var a = ne(this.area.bottom, n); 723 if (!("number" == typeof a && (a = n - a, this.currentPosition.y > a))) { 724 var o = ne(this.area.left, t); 725 "number" == typeof o && this.currentPosition.x < o || (this.startPosition = { 726 x: this.currentPosition.x, 727 y: this.currentPosition.y 728 }, this.state = ee) 729 } 730 } 731 } 732 }, e.prototype.stop = function (e) { 733 if (this.state == te) { 734 var t = this._dragDirection(), 735 n = this._eventDetail(t); 736 if (this._dispatchEvents("drag*End", n), Math.abs(this.movement[this.axis]) > this.treshold.swipe) { 737 var i = this._swipeDirection(); 738 n.direction = i, this._dispatchEvents("swipe*", n) 739 } 740 } 741 this.state = $ 742 }, e.prototype.move = function (e) { 743 switch (this.state) { 744 case ee: 745 case te: 746 var t = { 747 x: e.changedTouches ? e.touches[0].pageX : e.pageX || 0, 748 y: e.changedTouches ? e.touches[0].pageY : e.pageY || 0 749 }; 750 this.movement = { 751 x: t.x - this.currentPosition.x, 752 y: t.y - this.currentPosition.y 753 }, this.distance = { 754 x: t.x - this.startPosition.x, 755 y: t.y - this.startPosition.y 756 }, this.currentPosition = { 757 x: t.x, 758 y: t.y 759 }, this.axis = Math.abs(this.distance.x) > Math.abs(this.distance.y) ? "x" : "y"; 760 var n = this._dragDirection(), 761 i = this._eventDetail(n); 762 this.state == ee && Math.abs(this.distance[this.axis]) > this.treshold.start && (this._dispatchEvents( 763 "drag*Start", i), this.state = te), this.state == te && this._dispatchEvents("drag*Move", i) 764 } 765 }, e.prototype._eventDetail = function (e) { 766 var t = this.distance.x, 767 n = this.distance.y; 768 return "x" == this.axis && (t -= t > 0 ? this.treshold.start : 0 - this.treshold.start), "y" == this.axis && 769 (n -= n > 0 ? this.treshold.start : 0 - this.treshold.start), { 770 axis: this.axis, 771 direction: e, 772 movementX: this.movement.x, 773 movementY: this.movement.y, 774 distanceX: t, 775 distanceY: n 776 } 777 }, e.prototype._dispatchEvents = function (e, t) { 778 var n = new CustomEvent(e.replace("*", ""), { 779 detail: t 780 });
781 this.surface.dispatchEvent(n); 782 var i = new CustomEvent(e.replace("*", this.axis.toUpperCase()), { 783 detail: t 784 }); 785 this.surface.dispatchEvent(i); 786 var s = new CustomEvent(e.replace("*", t.direction), { 787 detail: t 788 }); 789 this.surface.dispatchEvent(s) 790 }, e.prototype._dragDirection = function () { 791 return J[this.axis][this.distance[this.axis] > 0 ? 0 : 1] 792 }, e.prototype._swipeDirection = function () { 793 return J[this.axis][this.movement[this.axis] > 0 ? 0 : 1] 794 }, e 795 }(), 796 se = null, 797 ae = null, 798 oe = 0, 799 re = function (e) { 800 var t = this, 801 n = {}, 802 i = !1, 803 s = function () { 804 var e = Object.keys(t.opts.extensions); 805 e.length ? (P(e.join(", "), (function () {}), (function () { 806 n = ce(n, [], t.node.menu) 807 })), e.forEach((function (e) { 808 P(e, (function () { 809 n = ce(n, t.opts.extensions[e], t.node.menu) 810 }), (function () {})) 811 }))) : n = ce(n, [], t.node.menu) 812 }; 813 ae && (N(ae, "dragStart"), N(ae, "dragMove"), N(ae, "dragEnd")), se = new ie(ae = e), s(), s = function () {}, 814 ae && (C(ae, "dragStart", (function (e) { 815 e.detail.direction == n.direction && (i = !0, t.node.wrpr.classList.add("mm-wrapper_dragging"), t._openSetup(), 816 t.trigger("open:start"), oe = t.node.menu["x" == n.axis ? "clientWidth" : "clientHeight"]) 817 })), C(ae, "dragMove", (function (e) { 818 if (e.detail.axis == n.axis && i) { 819 var t = e.detail["distance" + n.axis.toUpperCase()]; 820 switch (n.position) { 821 case "right": 822 case "bottom": 823 t = Math.min(Math.max(t, -oe), 0); 824 break; 825 default: 826 t = Math.max(Math.min(t, oe), 0) 827 } 828 if ("front" == n.zposition) switch (n.position) { 829 case "right": 830 case "bottom": 831 t += oe; 832 break; 833 default: 834 t -= oe 835 } 836 n.slideOutNodes.forEach((function (e) { 837 e.style.transform = "translate" + n.axis.toUpperCase() + "(" + t + "px)" 838 })) 839 } 840 })), C(ae, "dragEnd", (function (e) { 841 if (e.detail.axis == n.axis && i) { 842 i = !1, t.node.wrpr.classList.remove("mm-wrapper_dragging"), n.slideOutNodes.forEach((function (e) { 843 e.style.transform = "" 844 })); 845 var s = Math.abs(e.detail["distance" + n.axis.toUpperCase()]) >= .75 * oe; 846 if (!s) { 847 var a = e.detail["movement" + n.axis.toUpperCase()]; 848 switch (n.position) { 849 case "right": 850 case "bottom": 851 s = a <= 0; 852 break; 853 default: 854 s = a >= 0 855 } 856 } 857 s ? t._openStart() : t.close() 858 } 859 }))) 860 }, 861 ce = function (e, t, n) { 862 switch (e.position = "left", e.zposition = "back", ["right", "top", "bottom"].forEach((function (n) { 863 t.indexOf("position-" + n) > -1 && (e.position = n) 864 })), ["front", "top", "bottom"].forEach((function (n) { 865 t.indexOf("position-" + n) > -1 && (e.zposition = "front") 866 })), se.area = { 867 top: "bottom" == e.position ? "75%" : 0, 868 right: "left" == e.position ? "75%" : 0, 869 bottom: "top" == e.position ? "75%" : 0, 870 left: "right" == e.position ? "75%" : 0 871 }, e.position) { 872 case "top": 873 case "bottom": 874 e.axis = "y"; 875 break; 876 default: 877 e.axis = "x" 878 } 879 switch (e.position) { 880 case "top": 881 e.direction = "Down"; 882 break; 883 case "right": 884 e.direction = "Left"; 885 break; 886 case "bottom": 887 e.direction = "Up"; 888 break; 889 default: 890 e.direction = "Right" 891 } 892 switch (e.zposition) { 893 case "front": 894 e.slideOutNodes = [n]; 895 break; 896 default: 897 e.slideOutNodes = g(document.body, ".mm-slideout") 898 } 899 return e 900 }; 901 S.options.drag = Z; 902 var le = { 903 drop: !1, 904 fitViewport: !0, 905 event: "click", 906 position: {}, 907 tip: !0 908 }; 909 var me = { 910 offset: { 911 button: { 912 x: -5, 913 y: 5 914 }, 915 viewport: { 916 x: 20, 917 y: 20 918 } 919 }, 920 height: { 921 max: 880 922 }, 923 width: { 924 max: 440 925 } 926 }; 927 S.options.dropdown = le, S.configs.dropdown = me; 928 var de = { 929 insertMethod: "append", 930 insertSelector: "body" 931 }; 932 S.configs.fixedElements = de, S.configs.classNames.fixedElements = { 933 fixed: "Fixed" 934 }; 935 var pe = { 936 use: !1, 937 top: [], 938 bottom: [], 939 position: "left", 940 type: "default" 941 }; 942 S.options.iconbar = pe; 943 var ue = { 944 add: !1, 945 blockPanel: !0, 946 hideDivider: !1, 947 hideNavbar: !0, 948 visible: 3 949 }; 950 S.options.iconPanels = ue; 951 var fe = { 952 enable: !1, 953 enhance: !1 954 }; 955 S.options.keyboardNavigation = fe; 956 var he = function (e) { 957 var t = this; 958 N(document.body, "keydown.tabguard"), N(document.body, "focusin.tabguard"), C(document.body, 959 "focusin.tabguard", (function (e) { 960 if (t.node.wrpr.matches(".mm-wrapper_opened")) { 961 var n = e.target; 962 if (n.matches(".mm-tabend")) { 963 var i = void 0; 964 n.parentElement.matches(".mm-menu") && S.node.blck && (i = S.node.blck), n.parentElement.matches( 965 ".mm-wrapper__blocker") && (i = g(document.body, ".mm-menu_offcanvas.mm-menu_opened")[0]), i || 966 (i = n.parentElement), i && _(i, ".mm-tabstart")[0].focus() 967 } 968 } 969 })), N(document.body, "keydown.navigate"), C(document.body, "keydown.navigate", (function (t) { 970 var n = t.target, 971 i = n.closest(".mm-menu"); 972 if (i) { 973 i.mmApi; 974 if (!n.matches("input, textarea")) switch (t.keyCode) { 975 case 13: 976 (n.matches(".mm-toggle") || n.matches(".mm-check")) && n.dispatchEvent(new Event("click")); 977 break; 978 case 32: 979 case 37: 980 case 38: 981 case 39: 982 case 40: 983 t.preventDefault() 984 } 985 if (e) 986 if (n.matches("input")) switch (t.keyCode) { 987 case 27: 988 n.value = "" 989 } else { 990 var s = i.mmApi; 991 switch (t.keyCode) { 992 case 8: 993 var a = g(i, ".mm-panel_opened")[0].mmParent;
994 a && s.openPanel(a.closest(".mm-panel")); 995 break; 996 case 27: 997 i.matches(".mm-menu_offcanvas") && s.close() 998 } 999 } 1000 } 1001 })) 1002 }, 1003 ve = { 1004 load: !1 1005 }; 1006 S.options.lazySubmenus = ve; 1007 var be = []; 1008 var ge = { 1009 breadcrumbs: { 1010 separator: "/", 1011 removeFirst: !1 1012 } 1013 }; 1014 1015 function _e() { 1016 var e = this, 1017 t = this.opts.navbars; 1018 if (void 0 !== t) { 1019 t instanceof Array || (t = [t]); 1020 var n = {}; 1021 t.length && (t.forEach((function (t) { 1022 if (!(t = function (e) { 1023 return "boolean" == typeof e && e && (e = {}), "object" != typeof e && (e = {}), void 0 === e 1024 .content && (e.content = ["prev", "title"]), e.content instanceof Array || (e.content = [e.content]), 1025 void 0 === e.use && (e.use = !0), "boolean" == typeof e.use && e.use && (e.use = !0), e 1026 }(t)).use) return !1; 1027 var i = b("div.mm-navbar"), 1028 s = t.position; 1029 "bottom" !== s && (s = "top"), n[s] || (n[s] = b("div.mm-navbars_" + s)), n[s].append(i); 1030 for (var a = 0, o = t.content.length; a < o; a++) { 1031 var r, c = t.content[a]; 1032 if ("string" == typeof c) 1033 if ("function" == typeof (r = _e.navbarContents[c])) r.call(e, i); 1034 else { 1035 var l = b("span"); 1036 l.innerHTML = c; 1037 var m = _(l); 1038 1 == m.length && (l = m[0]), i.append(l) 1039 } 1040 else i.append(c) 1041 } 1042 "string" == typeof t.type && ("function" == typeof (r = _e.navbarTypes[t.type]) && r.call(e, i)); 1043 "boolean" != typeof t.use && P(t.use, (function () { 1044 i.classList.remove("mm-hidden"), S.sr_aria(i, "hidden", !1) 1045 }), (function () { 1046 i.classList.add("mm-hidden"), S.sr_aria(i, "hidden", !0) 1047 })) 1048 })), this.bind("initMenu:after", (function () { 1049 for (var t in n) e.node.menu["bottom" == t ? "append" : "prepend"](n[t]) 1050 }))) 1051 } 1052 } 1053 S.options.navbars = be, S.configs.navbars = ge, S.configs.classNames.navbars = { 1054 panelPrev: "Prev", 1055 panelTitle: "Title" 1056 }, _e.navbarContents = { 1057 breadcrumbs: function (e) { 1058 var t = this, 1059 n = b("div.mm-navbar__breadcrumbs"); 1060 e.append(n), this.bind("initNavbar:after", (function (e) { 1061 if (!e.querySelector(".mm-navbar__breadcrumbs")) { 1062 _(e, ".mm-navbar")[0].classList.add("mm-hidden"); 1063 for (var n = [], i = b("span.mm-navbar__breadcrumbs"), s = e, a = !0; s;) { 1064 if (!(s = s.closest(".mm-panel")).parentElement.matches(".mm-listitem_vertical")) { 1065 var o = g(s, ".mm-navbar__title span")[0]; 1066 if (o) { 1067 var r = o.textContent; 1068 r.length && n.unshift(a ? "<span>" + r + "</span>" : '' + r + 1069 "") 1070 } 1071 a = !1 1072 } 1073 s = s.mmParent 1074 } 1075 t.conf.navbars.breadcrumbs.removeFirst && n.shift(), i.innerHTML = n.join( 1076 '<span class="mm-separator">' + t.conf.navbars.breadcrumbs.separator + "</span>"), _(e, 1077 ".mm-navbar")[0].append(i) 1078 } 1079 })), this.bind("openPanel:start", (function (e) { 1080 var t = e.querySelector(".mm-navbar__breadcrumbs"); 1081 n.innerHTML = t ? t.innerHTML : "" 1082 })), this.bind("initNavbar:after:sr-aria", (function (e) { 1083 g(e, ".mm-breadcrumbs a").forEach((function (e) { 1084 S.sr_aria(e, "owns", e.getAttribute("href").slice(1)) 1085 })) 1086 })) 1087 }, 1088 close: function (e) { 1089 var t = this, 1090 n = b("a.mm-btn.mm-btn_close.mm-navbar__btn"); 1091 e.append(n), this.bind("setPage:after", (function (e) { 1092 n.setAttribute("href", "#" + e.id) 1093 })), this.bind("setPage:after:sr-text", (function () { 1094 n.innerHTML = S.sr_text(t.i18n(t.conf.screenReader.text.closeMenu)), S.sr_aria(n, "owns", n.getAttribute( 1095 "href").slice(1)) 1096 })) 1097 }, 1098 prev: function (e) { 1099 var t, n, i, s = this, 1100 a = b("a.mm-btn.mm-btn_prev.mm-navbar__btn"); 1101 e.append(a), this.bind("initNavbar:after", (function (e) { 1102 _(e, ".mm-navbar")[0].classList.add("mm-hidden") 1103 })), this.bind("openPanel:start", (function (e) { 1104 e.parentElement.matches(".mm-listitem_vertical") || ((t = e.querySelector("." + s.conf.classNames 1105 .navbars.panelPrev)) || (t = e.querySelector(".mm-navbar__btn.mm-btn_prev")), n = t ? t.getAttribute( 1106 "href") : "", i = t ? t.innerHTML : "", n ? a.setAttribute("href", n) : a.removeAttribute( 1107 "href"), a.classList[n || i ? "remove" : "add"]("mm-hidden"), a.innerHTML = i) 1108 })), this.bind("initNavbar:after:sr-aria", (function (e) { 1109 S.sr_aria(e.querySelector(".mm-navbar"), "hidden", !0) 1110 })), this.bind("openPanel:start:sr-aria", (function (e) { 1111 S.sr_aria(a, "hidden", a.matches(".mm-hidden")), S.sr_aria(a, "owns", (a.getAttribute("href") || 1112 "").slice(1)) 1113 })) 1114 }, 1115 searchfield: function (e) { 1116 "object" != o(this.opts.searchfield) && (this.opts.searchfield = {}); 1117 var t = b("div.mm-navbar__searchfield"); 1118 e.append(t), this.opts.searchfield.add = !0, this.opts.searchfield.addTo = [t] 1119 }, 1120 title: function (e) { 1121 var t, n, i, s, a = this, 1122 o = b("p.mm-navbar__title"), 1123 r = b("span"); 1124 o.append(r), e.append(o), this.bind("openPanel:start", (function (e) { 1125 e.parentElement.matches(".mm-listitem_vertical") || ((i = e.querySelector("." + a.conf.classNames 1126 .navbars.panelTitle)) || (i = e.querySelector(".mm-navbar__title span")), (t = i && i.closest( 1127 "p") ? i.closest("p").getAttribute("") : "") ? o.setAttribute("", t) : o.removeAttribute( 1128 ""), n = i ? i.innerHTML : "", r.innerHTML = n) 1129 })), this.bind("openPanel:start:sr-aria", (function (e) { 1130 if (a.opts.screenReader.text) { 1131 if (!s) _(a.node.menu, ".mm-navbars_top, .mm-navbars_bottom").forEach((function (e) { 1132 var t = e.querySelector(".mm-btn_prev"); 1133 t && (s = t) 1134 })); 1135 if (s) { 1136 var t = !0; 1137 "parent" == a.opts.navbar.titleLink && (t = !s.matches(".mm-hidden")), S.sr_aria(o, "hidden", 1138 t) 1139 } 1140 } 1141 })) 1142 } 1143 }, _e.navbarTypes = { 1144 tabs: function (e) { 1145 var t = this; 1146 e.classList.add("mm-navbar_tabs"), e.parentElement.classList.add("mm-navbars_has-tabs"); 1147 var n = _(e, "a"); 1148 e.addEventListener("click", (function (e) { 1149 var n = e.target; 1150 if (n.matches("a")) 1151 if (n.matches(".mm-navbar__tab_selected")) e.stopImmediatePropagation(); 1152 else try {
1153 t.openPanel(t.node.menu.querySelector(n.getAttribute("href")), !1), e.stopImmediatePropagation() 1154 } catch (e) {} 1155 })), this.bind("openPanel:start", (function e(t) { 1156 n.forEach((function (e) { 1157 e.classList.remove("mm-navbar__tab_selected") 1158 })); 1159 var i = n.filter((function (e) { 1160 return e.matches('[href="#' + t.id + '"]') 1161 }))[0]; 1162 if (i) i.classList.add("mm-navbar__tab_selected"); 1163 else { 1164 var s = t.mmParent; 1165 s && e.call(this, s.closest(".mm-panel")) 1166 } 1167 })) 1168 } 1169 }; 1170 var ye = { 1171 scroll: !1, 1172 update: !1 1173 }; 1174 var we = { 1175 scrollOffset: 0, 1176 updateOffset: 50 1177 }; 1178 S.options.pageScroll = ye, S.configs.pageScroll = we; 1179 var Le = { 1180 add: !1, 1181 addTo: "panels", 1182 cancel: !1, 1183 noResults: "No results found.", 1184 placeholder: "Search", 1185 panel: { 1186 add: !1, 1187 dividers: !0, 1188 fx: "none", 1189 id: null, 1190 splash: null, 1191 title: "Search" 1192 }, 1193 search: !0, 1194 showTextItems: !1, 1195 showSubPanels: !0 1196 }; 1197 var Ee = { 1198 clear: !1, 1199 form: !1, 1200 input: !1, 1201 submit: !1 1202 }, 1203 xe = { 1204 Search: "جستجÙ", 1205 "No results found.": "ÙØªÛجÙâØ§Û ÛØ§Ùت ÙØ´Ø¯.", 1206 cancel: "Ø§ÙØµØ±Ø§Ù" 1207 }, 1208 Pe = { 1209 Search: "Suche", 1210 "No results found.": "Keine Ergebnisse gefunden.", 1211 cancel: "beenden" 1212 }, 1213 ke = { 1214 Search: "ÐайÑи", 1215 "No results found.": "ÐиÑего не найдено.", 1216 cancel: "оÑмениÑÑ" 1217 }; 1218 u({ 1219 Search: "Zoeken", 1220 "No results found.": "Geen resultaten gevonden.", 1221 cancel: "annuleren" 1222 }, "nl"), u(xe, "fa"), u(Pe, "de"), u(ke, "ru"), S.options.searchfield = Le, S.configs.searchfield = Ee; 1223 var Se = function () { 1224 var e = this.opts.searchfield, 1225 t = (this.conf.searchfield, _(this.node.pnls, ".mm-panel_search")[0]); 1226 if (t) return t; 1227 t = b("div.mm-panel.mm-panel_search.mm-hidden"), e.panel.id && (t.id = e.panel.id), e.panel.title && t.setAttribute( 1228 "data-mm-title", e.panel.title); 1229 var n = b("ul"); 1230 switch (t.append(n), this.node.pnls.append(t), this.initListview(n), this._initNavbar(t), e.panel.fx) { 1231 case !1: 1232 break; 1233 case "none": 1234 t.classList.add("mm-panel_noanimation"); 1235 break; 1236 default: 1237 t.classList.add("mm-panel_fx-" + e.panel.fx) 1238 } 1239 if (e.panel.splash) { 1240 var i = b("div.mm-panel__content"); 1241 i.innerHTML = e.panel.splash, t.append(i) 1242 } 1243 return t.classList.add("mm-panel"), t.classList.add("mm-hidden"), this.node.pnls.append(t), t 1244 }, 1245 Me = function (e) { 1246 var t = this.opts.searchfield, 1247 n = this.conf.searchfield; 1248 if (e.parentElement.matches(".mm-listitem_vertical")) return null; 1249 if (a = g(e, ".mm-searchfield")[0]) return a; 1250 1251 function i(e, t) { 1252 if (t) 1253 for (var n in t) e.setAttribute(n, t[n]) 1254 } 1255 var s, a = b((n.form ? "form" : "div") + ".mm-searchfield"), 1256 o = b("div.mm-searchfield__input"), 1257 r = b("input"); 1258 (r.type = "text", r.autocomplete = "off", r.placeholder = this.i18n(t.placeholder), o.append(r), a.append(o), 1259 e.prepend(a), i(r, n.input), n.clear) && ((s = b("a.mm-btn.mm-btn_close.mm-searchfield__btn")).setAttribute( 1260 "href", "#"), o.append(s)); 1261 (i(a, n.form), n.form && n.submit && !n.clear) && ((s = b("a.mm-btn.mm-btn_next.mm-searchfield__btn")).setAttribute( 1262 "href", "#"), o.append(s)); 1263 t.cancel && ((s = b("a.mm-searchfield__cancel")).setAttribute("href", "#"), s.textContent = this.i18n( 1264 "cancel"), a.append(s)); 1265 return a 1266 }, 1267 Ae = function (e) { 1268 var t = this, 1269 n = this.opts.searchfield, 1270 i = (this.conf.searchfield, {}); 1271 e.closest(".mm-panel_search") ? (i.panels = g(this.node.pnls, ".mm-panel"), i.noresults = [e.closest( 1272 ".mm-panel")]) : e.closest(".mm-panel") ? (i.panels = [e.closest(".mm-panel")], i.noresults = i.panels) : 1273 (i.panels = g(this.node.pnls, ".mm-panel"), i.noresults = [this.node.menu]), i.panels = i.panels.filter(( 1274 function (e) { 1275 return !e.parentElement.matches(".mm-listitem_vertical") 1276 })), i.panels = i.panels.filter((function (e) { 1277 return !e.matches(".mm-panel_search") 1278 }
1278)), i.listitems = [], i.dividers = [], i.panels.forEach((function (e) { 1279 var t, n; 1280 (t = i.listitems).push.apply(t, g(e, ".mm-listitem")), (n = i.dividers).push.apply(n, g(e, 1281 ".mm-divider")) 1282 })); 1283 var s = _(this.node.pnls, ".mm-panel_search")[0], 1284 a = g(e, "input")[0], 1285 o = g(e, ".mm-searchfield__cancel")[0]; 1286 a.mmSearchfield = i, n.panel.add && n.panel.splash && (N(a, "focus.splash"), C(a, "focus.splash", (function ( 1287 e) { 1288 t.openPanel(s) 1289 }))), n.cancel && (N(a, "focus.cancel"), C(a, "focus.cancel", (function (e) { 1290 o.classList.add("mm-searchfield__cancel-active") 1291 })), N(o, "click.splash"), C(o, "click.splash", (function (e) { 1292 if (e.preventDefault(), o.classList.remove("mm-searchfield__cancel-active"), s.matches( 1293 ".mm-panel_opened")) { 1294 var n = _(t.node.pnls, ".mm-panel_opened-parent"); 1295 n.length && t.openPanel(n[n.length - 1]) 1296 } 1297 }))), n.panel.add && "panel" == n.addTo && this.bind("openPanel:finish", (function (e) { 1298 e === s && a.focus() 1299 })), N(a, "input.search"), C(a, "input.search", (function (e) { 1300 switch (e.keyCode) { 1301 case 9: 1302 case 16: 1303 case 17: 1304 case 18: 1305 case 37: 1306 case 38: 1307 case 39: 1308 case 40: 1309 break; 1310 default: 1311 t.search(a) 1312 } 1313 })), this.search(a) 1314 }, 1315 Te = function (e) { 1316 if (e) { 1317 var t = this.opts.searchfield; 1318 this.conf.searchfield; 1319 if (e.closest(".mm-panel") || (e = _(this.node.pnls, ".mm-panel")[0]), !_(e, ".mm-panel__noresultsmsg").length) { 1320 var n = b("div.mm-panel__noresultsmsg.mm-hidden"); 1321 n.innerHTML = this.i18n(t.noResults), e.append(n) 1322 } 1323 } 1324 }; 1325 S.prototype.search = function (e, t) { 1326 var n, i = this, 1327 s = this.opts.searchfield; 1328 this.conf.searchfield; 1329 t = (t = t || "" + e.value).toLowerCase().trim(); 1330 var a = e.mmSearchfield, 1331 o = g(e.closest(".mm-searchfield"), ".mm-btn"), 1332 r = _(this.node.pnls, ".mm-panel_search")[0], 1333 c = a.panels, 1334 l = a.noresults, 1335 m = a.listitems, 1336 d = a.dividers; 1337 if (m.forEach((function (e) { 1338 e.classList.remove("mm-listitem_nosubitems"), e.classList.remove("mm-listitem_onlysubitems"), e.classList 1339 .remove("mm-hidden") 1340 })), r && (_(r, ".mm-listview")[0].innerHTML = ""), c.forEach((function (e) { 1341 e.scrollTop = 0 1342 })), t.length) { 1343 d.forEach((function (e) { 1344 e.classList.add("mm-hidden") 1345 })), m.forEach((function (e) { 1346 var n, i = _(e, ".mm-listitem__text")[0], 1347 a = !1; 1348 i && (n = i, Array.prototype.slice.call(n.childNodes).filter((function (e) { 1349 return 3 == e.nodeType 1350 })).map((function (e) { 1351 return e.textContent 1352 })).join(" ")).toLowerCase().indexOf(t) > -1 && (i.matches(".mm-listitem__btn") ? s.showSubPanels && 1353 (a = !0) : i.matches("a") ? a = !0 : s.showTextItems && (a = !0)), a || e.classList.add( 1354 "mm-hidden") 1355 })); 1356 var p = m.filter((function (e) { 1357 return !e.matches(".mm-hidden") 1358 })).length; 1359 if (s.panel.add) { 1360 var u = []; 1361 c.forEach((function (e) { 1362 var t = w(g(e, ".mm-listitem")); 1363 if ((t = t.filter((function (e) { 1364 return !e.matches(".mm-hidden") 1365 }))).length) { 1366 if (s.panel.dividers) { 1367 var n = b("li.mm-divider"), 1368 i = g(e, ".mm-navbar__title")[0]; 1369 i && (n.innerHTML = i.innerHTML, u.push(n)) 1370 } 1371 t.forEach((function (e) { 1372 u.push(e.cloneNode(!0)) 1373 })) 1374 } 1375 })), u.forEach((function (e) { 1376 e.querySelectorAll(".mm-toggle, .mm-check").forEach((function (e) { 1377 e.remove() 1378 })) 1379 })), (n = _(r, ".mm-listview")[0]).append.apply(n, u), this.openPanel
1379(r) 1380 } else s.showSubPanels && c.forEach((function (e) { 1381 w(g(e, ".mm-listitem")).forEach((function (e) { 1382 var t = e.mmChild; 1383 t && g(t, ".mm-listitem").forEach((function (e) { 1384 e.classList.remove("mm-hidden") 1385 })) 1386 })) 1387 })), c.slice().reverse().forEach((function (t, n) { 1388 var s = t.mmParent; 1389 s && (w(g(t, ".mm-listitem")).length ? (s.matches(".mm-hidden") && s.classList.remove("mm-hidden"), 1390 s.classList.add("mm-listitem_onlysubitems")) : e.closest(".mm-panel") || ((t.matches( 1391 ".mm-panel_opened") || t.matches(".mm-panel_opened-parent")) && setTimeout((function () { 1392 i.openPanel(s.closest(".mm-panel")) 1393 }), (n + 1) * (1.5 * i.conf.openingInterval)), s.classList.add("mm-listitem_nosubitems"))) 1394 })), c.forEach((function (e) { 1395 w(g(e, ".mm-listitem")).forEach((function (e) { 1396 var t = function (e, t) { 1397 for (var n = [], i = e.previousElementSibling; i;) t && !i.matches(t) || n.push(i), i = 1398 i.previousElementSibling; 1399 return n 1400 }(e, ".mm-divider")[0]; 1401 t && t.classList.remove("mm-hidden") 1402 })) 1403 })); 1404 o.forEach((function (e) { 1405 return e.classList.remove("mm-hidden") 1406 })), l.forEach((function (e) { 1407 g(e, ".mm-panel__noresultsmsg").forEach((function (e) { 1408 return e.classList[p ? "add" : "remove"]("mm-hidden") 1409 })) 1410 })), s.panel.add && (s.panel.splash && g(r, ".mm-panel__content").forEach((function (e) { 1411 return e.classList.add("mm-hidden") 1412 })), m.forEach((function (e) { 1413 return e.classList.remove("mm-hidden") 1414 })), d.forEach((function (e) { 1415 return e.classList.remove("mm-hidden") 1416 }))) 1417 } else if (m.forEach((function (e) { 1418 return e.classList.remove("mm-hidden") 1419 })), d.forEach((function (e) { 1420 return e.classList.remove("mm-hidden") 1421 })), o.forEach((function (e) { 1422 return e.classList.add("mm-hidden") 1423 })), l.forEach((function (e) { 1424 g(e, ".mm-panel__noresultsmsg").forEach((function (e) { 1425 return e.classList.add("mm-hidden") 1426 })) 1427 })), s.panel.add) 1428 if (s.panel.splash) g(r, ".mm-panel__content").forEach((function (e) { 1429 return e.classList.remove("mm-hidden") 1430 })); 1431 else if (!e.closest(".mm-panel_search")) { 1432 var f = _(this.node.pnls, ".mm-panel_opened-parent"); 1433 this.openPanel(f.slice(-1)[0]) 1434 } 1435 this.trigger("updateListview") 1436 }; 1437 var Ce = { 1438 add: !1, 1439 addTo: "panels" 1440 }; 1441 S.options.sectionIndexer = Ce; 1442 var Ne = { 1443 current: !0, 1444 hover: !1, 1445 parent: !1 1446 }; 1447 S.options.setSelected = Ne; 1448 var He = { 1449 collapsed: { 1450 use: !1, 1451 blockMenu: !0, 1452 hideDivider: !1, 1453 hideNavbar: !0 1454 }, 1455 expanded: { 1456 use: !1, 1457 initial: "open" 1458 } 1459 }; 1460 S.options.sidebar = He; 1461 S.configs.classNames.toggles = { 1462 toggle: "Toggle", 1463 check: "Check" 1464 }; 1465 /*! 1466 * mmenu.js 1467 * mmenujs.com 1468 * 1469 * Copyright (c) Fred Heusschen 1470 * frebsite.nl 1471 * 1472 * License: CC-BY-NC-4.0 1473 * http://creativecommons.org/licenses/by-nc/4.0/ 1474 */ 1475 S.addons = { 1476 offcanvas: function () { 1477 var e = this; 1478 if (this.opts.offCanvas) { 1479 var t = function (e) { 1480 return "object" != typeof e && (e = {}), e 1481 }(this.opts.offCanvas); 1482 this.opts.offCanvas = a(t, S.options.offCanvas); 1483 var n = this.conf.offCanvas; 1484 this._api.push("open", "close", "setPage"), this.vars.opened = !1, this.bind("initMenu:before", ( 1485 function () { 1486 n.clone && (e.node.menu = e.node.menu.cloneNode(!0), e.node.menu.id && (e.node.menu.id = "mm-" + 1487 e.node.menu.id), g(e.node.menu, "[id]").forEach((function (e) { 1488 e.id = "mm-" + e.id 1489 }))), e.node.wrpr = document.body, document.querySelector(n.menu.insertSelector)[n.menu.insertMethod] 1490 (e.node.menu) 1491 })), this.bind("initMenu:after", (function () { 1492 j.call(e), e.setPage(S.node.page), H.call(e), e.node.menu.classList.add("mm-menu_offcanvas"); 1493 var t = window.location.hash; 1494 if (t) { 1495 var n = d(e.node.menu.id); 1496 n && n == t.slice(1) && setTimeout((function () { 1497 e.open() 1498 }), 1e3) 1499 } 1500 })), this.bind("setPage:after", (function (e) { 1501 S.node.blck && _(S.node.blck, "a").forEach((function (t) { 1502 t.setAttribute("href", "#" + e.id) 1503 })) 1504 })), this.bind("open:start:sr-aria", (function () { 1505 S.sr_aria(e.node.menu, "hidden", !1) 1506 })), this.bind("close:finish:sr-aria", (function () { 1507 S.sr_aria(e.node.menu, "hidden", !0) 1508 })), this.bind("initMenu:after:sr-aria", (function () { 1509 S.sr_aria(e.node.menu, "hidden", !0) 1510 })), this.bind("initBlocker:after:sr-text", (function () { 1511 _(S.node.blck, "a").forEach((function (t) { 1512 t.innerHTML = S.sr_text(e.i18n(e.conf.screenReader.text.closeMenu)) 1513 })) 1514 })), this.clck.push((function (t, n) { 1515 var i = d(e.node.menu.id); 1516 if (i && t.matches('[href="#' + i + '"]')) { 1517 if (n.inMenu) return e.open(), !0; 1518 var s = t.closest(".mm-menu"); 1519 if (s) { 1520 var a = s.mmApi; 1521 if (a && a.close) return a.close(), c(s, (function () { 1522 e.open() 1523 }), e.conf.transitionDuration), !0 1524 } 1525 return e.open(), !0 1526 }
1527 if ((i = S.node.page.id) && t.matches('[href="#' + i + '"]')) return e.close(), !0 1528 })) 1529 } 1530 }, 1531 screenReader: function () { 1532 var e = this, 1533 t = function (e) { 1534 return "boolean" == typeof e && (e = { 1535 aria: e, 1536 text: e 1537 }), "object" != typeof e && (e = {}), e 1538 }(this.opts.screenReader); 1539 this.opts.screenReader = a(t, S.options.screenReader); 1540 var n = this.conf.screenReader; 1541 t.aria && (this.bind("initAddons:after", (function () { 1542 e.bind("initMenu:after", (function () { 1543 this.trigger("initMenu:after:sr-aria", [].slice.call(arguments)) 1544 })), e.bind("initNavbar:after", (function () { 1545 this.trigger("initNavbar:after:sr-aria", [].slice.call(arguments)) 1546 })), e.bind("openPanel:start", (function () { 1547 this.trigger("openPanel:start:sr-aria", [].slice.call(arguments)) 1548 })), e.bind("close:start", (function () { 1549 this.trigger("close:start:sr-aria", [].slice.call(arguments)) 1550 })), e.bind("close:finish", (function () { 1551 this.trigger("close:finish:sr-aria", [].slice.call(arguments)) 1552 })), e.bind("open:start", (function () { 1553 this.trigger("open:start:sr-aria", [].slice.call(arguments)) 1554 })), e.bind("initOpened:after", (function () { 1555 this.trigger("initOpened:after:sr-aria", [].slice.call(arguments)) 1556 })) 1557 })), this.bind("updateListview", (function () { 1558 e.node.pnls.querySelectorAll(".mm-listitem").forEach((function (e) { 1559 S.sr_aria(e, "hidden", e.matches(".mm-hidden")) 1560 })) 1561 })), this.bind("openPanel:start", (function (t) { 1562 var n = g(e.node.pnls, ".mm-panel").filter((function (e) { 1563 return e !== t 1564 })).filter((function (e) { 1565 return !e.parentElement.matches(".mm-panel") 1566 })), 1567 i = [t]; 1568 g(t, ".mm-listitem_vertical .mm-listitem_opened").forEach((function (e) { 1569 i.push.apply(i, _(e, ".mm-panel")) 1570 }
1570)), n.forEach((function (e) { 1571 S.sr_aria(e, "hidden", !0) 1572 })), i.forEach((function (e) { 1573 S.sr_aria(e, "hidden", !1) 1574 })) 1575 })), this.bind("closePanel", (function (e) { 1576 S.sr_aria(e, "hidden", !0) 1577 })), this.bind("initPanel:after", (function (e) { 1578 g(e, ".mm-btn").forEach((function (e) { 1579 S.sr_aria(e, "haspopup", !0); 1580 var t = e.getAttribute("href"); 1581 t && S.sr_aria(e, "owns", t.replace("#", "")) 1582 })) 1583 })), this.bind("initNavbar:after", (function (e) { 1584 var t = _(e, ".mm-navbar")[0], 1585 n = t.matches(".mm-hidden"); 1586 S.sr_aria(t, "hidden", n) 1587 })), t.text && "parent" == this.opts.navbar.titleLink && this.bind("initNavbar:after", (function (e) { 1588 var t = _(e, ".mm-navbar")[0], 1589 n = !!t.querySelector(".mm-btn_prev"); 1590 S.sr_aria(g(t, ".mm-navbar__title")[0], "hidden", n) 1591 }))), t.text && (this.bind("initAddons:after", (function () { 1592 e.bind("setPage:after", (function () { 1593 this.trigger("setPage:after:sr-text", [].slice.call(arguments)) 1594 })), e.bind("initBlocker:after", (function () { 1595 this.trigger("initBlocker:after:sr-text", [].slice.call(arguments)) 1596 })) 1597 })), this.bind("initNavbar:after", (function (t) { 1598 var i = _(t, ".mm-navbar")[0]; 1599 if (i) { 1600 var s = _(i, ".mm-btn_prev")[0]; 1601 s && (s.innerHTML = S.sr_text(e.i18n(n.text.closeSubmenu))) 1602 } 1603 })), this.bind("initListview:after", (function (t) { 1604 var i = t.closest(".mm-panel").mmParent; 1605 if (i) { 1606 var s = _(i, ".mm-btn_next")[0]; 1607 if (s) { 1608 var a = e.i18n(n.text[s.parentElement.matches(".mm-listitem_vertical") ? "toggleSubmenu" : 1609 "openSubmenu"]); 1610 s.innerHTML += S.sr_text(a) 1611 } 1612 } 1613 }))) 1614 }, 1615 scrollBugFix: function () { 1616 var e = this; 1617 if (U && this.opts.offCanvas && this.opts.offCanvas.blockUI) { 1618 var t = function (e) { 1619 return "boolean" == typeof e && (e = { 1620 fix: e 1621 }), "object" != typeof e && (e = {}), e 1622 }(this.opts.scrollBugFix); 1623 if (this.opts.scrollBugFix = a(t, S.options.scrollBugFix), t.fix) { 1624 var n, i, s = (n = this.node.menu, i = "", n.addEventListener("touchmove", (function (e) { 1625 i = "", e.movementY > 0 ? i = "down" : e.movementY < 0 && (i = "up") 1626 })), { 1627 get: function () { 1628 return i 1629 } 1630 }); 1631 this.node.menu.addEventListener("scroll", o, { 1632 passive: !1 1633 }), this.node.menu.addEventListener("touchmove", (function (e) { 1634 var t = e.target.closest(".mm-panel"); 1635 t ? t.scrollHeight === t.offsetHeight ? o(e) : (0 == t.scrollTop && "down" == s.get() || t.scrollHeight == 1636 t.scrollTop + t.offsetHeight && "up" == s.get()) && o(e) : o(e) 1637 }), { 1638 passive: !1 1639 }), this.bind("open:start", (function () { 1640 var t = _(e.node.pnls, ".mm-panel_opened")[0]; 1641 t && (t.scrollTop = 0) 1642 })), window.addEventListener("orientationchange", (function (t) { 1643 var n = _(e.node.pnls, ".mm-panel_opened")[0]; 1644 n && (n.scrollTop = 0, n.style["-webkit-overflow-scrolling"] = "auto", n.style[ 1645 "-webkit-overflow-scrolling"] = "touch") 1646 })) 1647 } 1648 } 1649 1650 function o(e) { 1651 e.preventDefault(), e.stopPropagation() 1652 } 1653 }, 1654 autoHeight: function () { 1655 var e = this, 1656 t = function (e) { 1657 return "boolean" == typeof e && e && (e = { 1658 height: "auto" 1659 }), "string" == typeof e && (e = { 1660 height: e 1661 }), "object" != typeof e && (e = {}), e 1662 }(this.opts.autoHeight); 1663 if (this.opts.autoHeight = a(t, S.options.autoHeight), "auto" == t.height || "highest" == t.height) { 1664 var n, i = (n = function (e) { 1665 return e.parentElement.matches(".mm-listitem_vertical") && (e = y(e, ".mm-panel").filter(( 1666 function (e) { 1667 return !e.parentElement.matches(".mm-listitem_vertical") 1668 }))[0]), e 1669 }, function () { 1670 if (!e.opts.offCanvas || e.vars.opened) { 1671 var i, s, a = 0,
1672 o = e.node.menu.offsetHeight - e.node.pnls.offsetHeight; 1673 e.node.menu.classList.add("mm-menu_autoheight-measuring"), "auto" == t.height ? ((s = _(e.node.pnls, 1674 ".mm-panel_opened")[0]) && (s = n(s)), s || (s = _(e.node.pnls, ".mm-panel")[0]), a = s.scrollHeight) : 1675 "highest" == t.height && (i = 0, _(e.node.pnls, ".mm-panel").forEach((function (e) { 1676 e = n(e), i = Math.max(i, e.scrollHeight) 1677 })), a = i), e.node.menu.style.height = a + o + "px", e.node.menu.classList.remove( 1678 "mm-menu_autoheight-measuring") 1679 } 1680 }); 1681 this.bind("initMenu:after", (function () { 1682 e.node.menu.classList.add("mm-menu_autoheight") 1683 })), this.opts.offCanvas && this.bind("open:start", i), "highest" == t.height && this.bind( 1684 "initPanels:after", i), "auto" == t.height && (this.bind("updateListview", i), this.bind( 1685 "openPanel:start", i)) 1686 } 1687 }, 1688 backButton: function () { 1689 var e = this; 1690 if (this.opts.offCanvas) { 1691 var t = function (e) { 1692 return "boolean" == typeof e && (e = { 1693 close: e 1694 }), "object" != typeof e && (e = {}), e 1695 }(this.opts.backButton); 1696 this.opts.backButton = a(t, S.options.backButton); 1697 var n = "#" + this.node.menu.id; 1698 if (t.close) { 1699 var i = [], 1700 s = function () { 1701 i = [n], _(e.node.pnls, ".mm-panel_opened, .mm-panel_opened-parent").forEach((function (e) { 1702 i.push("#" + e.id) 1703 })) 1704 }; 1705 this.bind("open:finish", (function () { 1706 history.pushState(null, document.title, n) 1707 })), this.bind("open:finish", s), this.bind("openPanel:finish", s), this.bind("close:finish", ( 1708 function () { 1709 i = [], history.back(), history.pushState(null, document.title, location.pathname + location.search) 1710 })), window.addEventListener("popstate", (function (t) { 1711 if (e.vars.opened && i.length) { 1712 var s = (i = i.slice(0, -1))[i.length - 1]; 1713 s == n ? e.close() : (e.openPanel(e.node.menu.querySelector(s)), history.pushState(null, 1714 document.title, n)) 1715 } 1716 })) 1717 } 1718 t.open && window.addEventListener("popstate", (function (t) { 1719 e.vars.opened || location.hash != n || e.open() 1720 })) 1721 } 1722 }, 1723 columns: function () { 1724 var e = this, 1725 t = function (e) { 1726 return "boolean" == typeof e && (e = { 1727 add: e 1728 }), "number" == typeof e && (e = { 1729 add: !0, 1730 visible: e 1731 }), "object" != typeof e && (e = {}), "number" == typeof e.visible && (e.visible = { 1732 min: e.visible, 1733 max: e.visible 1734 }), e 1735 }(this.opts.columns); 1736 if (this.opts.columns = a(t, S.options.columns), t.add) { 1737 t.visible.min = Math.max(1, Math.min(6, t.visible.min)), t.visible.max = Math.max(t.visible.min, Math.min( 1738 6, t.visible.max)); 1739 for (var n = [], i = [], s = ["mm-panel_opened", "mm-panel_opened-parent", "mm-panel_highest"], o = 0; o <= 1740 t.visible.max; o++) n.push("mm-menu_columns-" + o), i.push("mm-panel_columns-" + o); 1741 s.push.apply(s, i), this.bind("openPanel:before", (function (t) { 1742 var n; 1743 if (t && (n = t.mmParent), n && (n = n.closest(".mm-panel"))) { 1744 var i = n.className; 1745 if (i.length && (i = i.split("mm-panel_columns-")[1])) 1746 for (var a = parseInt(i.split(" ")[0], 10) + 1; a > 0;) { 1747 if (!(t = _(e.node.pnls, ".mm-panel_columns-" + a)[0])) { 1748 a = -1; 1749 break 1750 } 1751 a++, t.classList.add("mm-hidden"), s.forEach((function (e) { 1752 t.classList.remove(e) 1753 })) 1754 } 1755 } 1756 })), this.bind("openPanel:start", (function (s) { 1757 var a = _(e.node.pnls, ".mm-panel_opened-parent").length; 1758 s.matches(".mm-panel_opened-parent") || a++, a = Math.min(t.visible.max, Math.max(t.visible.min,
1759 a)), n.forEach((function (t) { 1760 e.node.menu.classList.remove(t) 1761 })), e.node.menu.classList.add("mm-menu_columns-" + a); 1762 var o = []; 1763 _(e.node.pnls, ".mm-panel").forEach((function (e) { 1764 i.forEach((function (t) { 1765 e.classList.remove(t) 1766 })), e.matches(".mm-panel_opened-parent") && o.push(e) 1767 })), o.push(s), o.slice(-t.visible.max).forEach((function (e, t) { 1768 e.classList.add("mm-panel_columns-" + t) 1769 })) 1770 })) 1771 } 1772 }, 1773 counters: function () { 1774 var e = this, 1775 t = function (e) { 1776 return "boolean" == typeof e && (e = { 1777 add: e, 1778 addTo: "panels", 1779 count: e 1780 }), "object" != typeof e && (e = {}), "panels" == e.addTo && (e.addTo = ".mm-listview"), e 1781 }(this.opts.counters); 1782 if (this.opts.counters = a(t, S.options.counters), this.bind("initListview:after", (function (t) { 1783 var n = e.conf.classNames.counters.counter; 1784 g(t, "." + n).forEach((function (e) { 1785 E(e, n, "mm-counter") 1786 })) 1787 })), t.add && this.bind("initListview:after", (function (e) { 1788 if (e.matches(t.addTo)) { 1789 var n = e.closest(".mm-panel").mmParent; 1790 if (n && !g(n, ".mm-counter").length) { 1791 var i = _(n, ".mm-btn")[0]; 1792 i && i.prepend(b("span.mm-counter")) 1793 } 1794 } 1795 })), t.count) { 1796 var n = function (t) { 1797 (t ? [t.closest(".mm-panel")] : _(e.node.pnls, ".mm-panel")).forEac
1797h((function (e) { 1798 var t = e.mmParent; 1799 if (t) { 1800 var n = g(t, ".mm-counter")[0]; 1801 if (n) { 1802 var i = []; 1803 _(e, ".mm-listview").forEach((function (e) { 1804 i.push.apply(i, _(e)) 1805 })), n.innerHTML = w(i).length.toString() 1806 } 1807 } 1808 })) 1809 }; 1810 this.bind("initListview:after", n), this.bind("updateListview", n) 1811 } 1812 }, 1813 dividers: function () { 1814 var e = this, 1815 t = function (e) { 1816 return "boolean" == typeof e && (e = { 1817 add: e 1818 }), "object" != typeof e && (e = {}), "panels" == e.addTo && (e.addTo = ".mm-listview"), e 1819 }(this.opts.dividers); 1820 this.opts.dividers = a(t, S.options.dividers), this.bind("initListview:after", (function (t) { 1821 _(t).forEach((function (t) { 1822 E(t, e.conf.classNames.divider, "mm-divider"), t.matches(".mm-divider") && t.classList.remove( 1823 "mm-listitem") 1824 })) 1825 })), t.add && this.bind("initListview:after", (function (e) { 1826 if (e.matches(t.addTo)) { 1827 g(e, ".mm-divider").forEach((function (e) { 1828 e.remove() 1829 })); 1830 var n = ""; 1831 w(_(e)).forEach((function (t) { 1832 var i = _(t, ".mm-listitem__text")[0].textContent.trim().toLowerCase()[0]; 1833 if (i.length && i != n) { 1834 n = i; 1835 var s = b("li.mm-divider"); 1836 s.textContent = i, e.insertBefore(s, t) 1837 } 1838 })) 1839 } 1840 })) 1841 }, 1842 drag: function () { 1843 var e = this; 1844 if (this.opts.offCanvas) { 1845 var t = function (e) { 1846 return "boolean" == typeof e && (e = { 1847 open: e 1848 }), "object" != typeof e && (e = {}), e 1849 }(this.opts.drag); 1850 this.opts.drag = a(t, S.options.drag), t.open && this.bind("setPage:after", (function (n) { 1851 re.call(e, t.node || n) 1852 })) 1853 } 1854 }, 1855 dropdown: function () { 1856 var e = this; 1857 if (this.opts.offCanvas) { 1858 var t = function (e) { 1859 return "boolean" == typeof e && e && (e = { 1860 drop: e 1861 }), "object" != typeof e && (e = {}), "string" == typeof e.position && (e.position = { of : e.position 1862 }), e 1863 }(this.opts.dropdown); 1864 this.opts.dropdown = a(t, S.options.dropdown); 1865 var n = this.conf.dropdown; 1866 if (t.drop) { 1867 var i; 1868 this.bind("initMenu:after", (function () { 1869 if (e.node.menu.classList.add("mm-menu_dropdown"), "string" != typeof t.position.of) { 1870 var n = d(e.node.menu.id); 1871 n && (t.position.of = '[href="#' + n + '"]') 1872 } 1873 if ("string" == typeof t.position.of) { 1874 i = g(document.body, t.position.of)[0]; 1875 var s = t.event.split(" "); 1876 1 == s.length && (s[1] = s[0]), "hover" == s[0] && i.addEventListener("mouseenter", ( 1877 function () { 1878 e.open() 1879 }), { 1880 passive: !0 1881 }), "hover" == s[1] && e.node.menu.addEventListener("mouseleave", (function () { 1882 e.close() 1883 }), { 1884 passive: !0 1885 }) 1886 } 1887 })), this.bind("open:start", (function () { 1888 e.node.menu.mmStyle = e.node.menu.getAttribute("style"), e.node.wrpr.classList.add( 1889 "mm-wrapper_dropdown") 1890 })), this.bind("close:finish", (function () { 1891 e.node.menu.setAttribute("style", e.node.menu.mmStyle), e.node.wrpr.classList.remove( 1892 "mm-wrapper_dropdown") 1893 })); 1894 var s = function (e, s) { 1895 var a, o, r, c = s[0], 1896 l = s[1], 1897 m = "x" == e ? "offsetWidth" : "offsetHeight", 1898 d = "x" == e ? "left" : "top", 1899 p = "x" == e ? "right" : "bottom", 1900 u = "x" == e ? "width" : "height",
1901 f = "x" == e ? "innerWidth" : "innerHeight", 1902 h = "x" == e ? "maxWidth" : "maxHeight", 1903 v = null, 1904 b = (a = d, i.getBoundingClientRect()[a] + document.body["left" === a ? "scrollLeft" : 1905 "scrollTop"]), 1906 g = b + i[m], 1907 _ = window[f], 1908 y = n.offset.button[e] + n.offset.viewport[e]; 1909 if (t.position[e]) switch (t.position[e]) { 1910 case "left": 1911 case "bottom": 1912 v = "after"; 1913 break; 1914 case "right": 1915 case "top": 1916 v = "before" 1917 } 1918 return null === v && (v = b + (g - b) / 2 < _ / 2 ? "after" : "before"), "after" == v ? (r = _ - 1919 ((o = "x" == e ? b : g) + y), c[d] = o + n.offset.button[e] + "px", c[p] = "auto", t.tip && l 1920 .push("mm-menu_tip-" + ("x" == e ? "left" : "top"))) : (r = (o = "x" == e ? g : b) - y, c[p] = 1921 "calc( 100% - " + (o - n.offset.button[e]) + "px )", c[d] = "auto", t.tip && l.push( 1922 "mm-menu_tip-" + ("x" == e ? "right" : "bottom"))), t.fitViewport && (c[h] = Math.min(n[u].max, 1923 r) + "px"), [c, l] 1924 }; 1925 this.bind("open:start", o), window.addEventListener("resize", (function (t) { 1926 o.call(e) 1927 }), { 1928 passive: !0 1929 }), this.opts.offCanvas.blockUI || window.addEventListener("scroll", (function (t) { 1930 o.call(e) 1931 }), { 1932 passive: !0 1933 }) 1934 } 1935 } 1936 1937 function o() { 1938 var e = this; 1939 if (this.vars.opened) { 1940 this.node.menu.setAttribute("style", this.node.menu.mmStyle); 1941 var n = [{}, 1942 [] 1943 ]; 1944 for (var i in n = s.call(this, "y", n), (n = s.call(this, "x", n))[0]) this.node.menu.style[i] = n[0] 1945 [i]; 1946 if (t.tip) { 1947 ["mm-menu_tip-left", "mm-menu_tip-right", "mm-menu_tip-top", "mm-menu_tip-bottom"].forEach(( 1948 function (t) { 1949 e.node.menu.classList.remove(t) 1950 })), n[1].forEach((function (t) { 1951 e.node.menu.classList.add(t) 1952 })) 1953 } 1954 } 1955 } 1956 }, 1957 fixedElements: function () { 1958 var e = this; 1959 if (this.opts.offCanvas) { 1960 var t, n, i = this.conf.fixedElements; 1961 this.bind("setPage:after", (function (s) { 1962 t = e.conf.classNames.fixedElements.fixed, n = g(document, i.insertSelector)[0], g(s, "." + t).forEach( 1963 (function (e) { 1964 E(e, t, "mm-slideout"), n[i.insertMethod](e) 1965 })) 1966 })) 1967 } 1968 }, 1969 iconbar: function () { 1970 var e, t = this, 1971 n = function (e) { 1972 return "array" == o(e) && (e = { 1973 use: !0, 1974 top: e 1975 }), "object" != o(e) && (e = {}), void 0 === e.use && (e.use = !0), "boolean" == typeof e.use && e.use && 1976 (e.use = !0), e 1977 }(this.opts.iconbar); 1978 if ((this.opts.iconbar = a(n, S.options.iconbar), n.use) && (["top", "bottom"].forEach((function (t, i) { 1979 var s = n[t]; 1980 "array" != o(s) && (s = [s]); 1981 for (var a = b("div.mm-iconbar__" + t), r = 0, c = s.length; r < c; r++) "string" == typeof s[r] ? 1982 a.innerHTML += s[r] : a.append(s[r]); 1983 a.children.length && (e || (e = b("div.mm-iconbar")), e.append(a)) 1984 })), e)) { 1985 this.bind("initMenu:after", (function () { 1986 t.node.menu.prepend(e) 1987 })); 1988 var i = "mm-menu_iconbar-" + n.position, 1989 s = function () { 1990 t.node.menu.classList.add(i), S.sr_aria(e, "hidden", !1) 1991 }; 1992 if ("boolean" == typeof n.use ? this.bind("initMenu:after", s) : P(n.use, s, (function () { 1993 t.node.menu.classList.remove(i), S.sr_aria(e, "hidden", !0) 1994 })), "tabs" == n.type) { 1995 e.classList.add("mm-iconbar_tabs"), e.addEventListener("click", (function (e) { 1996 var n = e.target; 1997 if (n.matches("a")) 1998 if (n.matches(".mm-iconbar__tab_selected")) e.stopImmediatePropagation(); 1999 else try { 2000 var i = t.node.menu.querySelector(n.getAttribute("href"))[0]; 2001 i && i.matches(".mm-panel") && (e.preventDefault(), e.stopImmediatePropagation(), t.openPanel
2001( 2002 i, !1)) 2003 } catch (e) {} 2004 })); 2005 var r = function (t) { 2006 g(e, "a").forEach((function (e) { 2007 e.classList.remove("mm-iconbar__tab_selected") 2008 })); 2009 var n = g(e, '[href="#' + t.id + '"]')[0]; 2010 if (n) n.classList.add("mm-iconbar__tab_selected"); 2011 else { 2012 var i = t.mmParent; 2013 i && r(i.closest(".mm-panel")) 2014 } 2015 }; 2016 this.bind("openPanel:start", r) 2017 } 2018 } 2019 }, 2020 iconPanels: function () { 2021 var e = this, 2022 t = function (e) { 2023 return "boolean" == typeof e && (e = { 2024 add: e 2025 }), "number" != typeof e && "string" != typeof e || (e = { 2026 add: !0, 2027 visible: e 2028 }), "object" != typeof e && (e = {}), e 2029 }(this.opts.iconPanels); 2030 this.opts.iconPanels = a(t, S.options.iconPanels); 2031 var n = !1; 2032 if ("first" == t.visible && (n = !0, t.visible = 1), t.visible = Math.min(3, Math.max(1, t.visible)), t.visible++, 2033 t.add) { 2034 this.bind("initMenu:after", (function () { 2035 var n = ["mm-menu_iconpanel"]; 2036 t.hideNavbar && n.push("mm-menu_hidenavbar"), t.hideDivider && n.push("mm-menu_hidedivider"), n 2037 .forEach((function (t) { 2038 e.node.menu.classList.add(t) 2039 })) 2040 })); 2041 var i = []; 2042 if (!n) 2043 for (var s = 0; s <= t.visible; s++) i.push("mm-panel_iconpanel-" + s); 2044 this.bind("openPanel:start", (function (s) { 2045 var a = _(e.node.pnls, ".mm-panel"); 2046 if (!(s = s || a[0]).parentElement.matches(".mm-listitem_vertical")) 2047 if (n) a.forEach((function (e, t) { 2048 e.classList[0 == t ? "add" : "remove"]("mm-panel_iconpanel-first") 2049 })); 2050 else { 2051 a.forEach((function (e) { 2052 i.forEach((function (t) { 2053 e.classList.remove(t) 2054 })) 2055 })), a = a.filter((function (e) { 2056 return e.matches(".mm-panel_opened-parent") 2057 })); 2058 var o = !1; 2059 a.forEach((function (e) { 2060 s === e && (o = !0) 2061 })), o || a.push(s), a.forEach((function (e) { 2062 e.classList.remove("mm-hidden") 2063 })), (a = a.slice(-t.visible)).forEach((function (e, t) { 2064 e.classList.add("mm-panel_iconpanel-" + t) 2065 })) 2066 } 2067 })), this.bind("initPanel:after", (function (e) { 2068 if (t.blockPanel && !e.parentElement.matches(".mm-listitem_vertical") && !_(e, 2069 ".mm-panel__blocker")[0]) { 2070 var n = b("a.mm-panel__blocker"); 2071 n.setAttribute("href", "#" + e.closest(".mm-panel").id), e.prepend(n) 2072 } 2073 })) 2074 } 2075 }, 2076 keyboardNavigation: function () { 2077 var e = this; 2078 if (!U) { 2079 var t = function (e) { 2080 return "boolean" != typeof e && "string" != typeof e || (e = { 2081 enable: e 2082 }), "object" != typeof e && (e = {}), e 2083 }(this.opts.keyboardNavigation); 2084 if (this.opts.keyboardNavigation = a(t, S.options.keyboardNavigation), t.enable) { 2085 var n = b("button.mm-tabstart.mm-sronly"), 2086 i = b("button.mm-tabend.mm-sronly"), 2087 s = b("button.mm-tabend.mm-sronly"); 2088 this.bind("initMenu:after", (function () { 2089 t.enhance && e.node.menu.classList.add("mm-menu_keyboardfocus"), he.call(e, t.enhance) 2090 })), this.bind("initOpened:before", (function () { 2091 e.node.menu.prepend(n), e.node.menu.append(i), _(e.node.menu, 2092 ".mm-navbars-top, .mm-navbars-bottom").forEach((function (e) { 2093 e.querySelectorAll(".mm-navbar__title").forEach((function (e) { 2094 e.setAttribute("tabindex", "-1") 2095 })) 2096 })) 2097 })), this.bind("initBlocker:after", (function () { 2098 S.node.blck.append(s), _(S.node.blck, "a")[0].classList.add("mm-tabstart") 2099 })); 2100 var o = "input, select, textarea, button, label, a[href]", 2101 r = function (n) { 2102 n = n || _(e.node.pnls, ".mm-panel_opened")[0]; 2103 var i = null, 2104 s = document.activeElement.closest(".mm-navbar"); 2105 if (!s || s.closest(".mm-menu") != e.node.menu) { 2106 if ("default" == t.enable && ((i = g(n, ".mm-listview a[href]:not(.mm-hidden)")[0]) || (i = g(n, 2107 o + ":not(.mm-hidden)")[0]), !i)) { 2108 var a = []; 2109 _(e.node.menu, ".mm-navbars_top, .mm-navbars_bottom").forEach((function (e) { 2110 a.push.apply(a, g(e, o + ":not(.mm-hidden)")) 2111 })), i = a[0] 2112 } 2113 i || (i = _(e.node.menu, ".mm-tabstart")[0]), i && i.focus() 2114 } 2115 }; 2116 this.bind("open:finish", r), this.bind("openPanel:finish", r), this.bind("initOpened:after:sr-aria", 2117 (function () {
2118 [e.node.menu, S.node.blck].forEach((function (e) { 2119 _(e, ".mm-tabstart, .mm-tabend").forEach((function (e) { 2120 S.sr_aria(e, "hidden", !0), S.sr_role(e, "presentation") 2121 })) 2122 })) 2123 })) 2124 } 2125 } 2126 }, 2127 lazySubmenus: function () { 2128 var e = this, 2129 t = function (e) { 2130 return "boolean" == typeof e && (e = { 2131 load: e 2132 }), "object" != typeof e && (e = {}), e 2133 }(this.opts.lazySubmenus); 2134 this.opts.lazySubmenus = a(t, S.options.lazySubmenus), t.load && (this.bind("initMenu:after", (function () { 2135 var t = []; 2136 g(e.node.pnls, "li").forEach((function (n) { 2137 t.push.apply(t, _(n, e.conf.panelNodetype.join(", "))) 2138 })), t.filter((function (e) { 2139 return !e.matches(".mm-listview_inset") 2140 })).filter((function (e) { 2141 return !e.matches(".mm-nolistview") 2142 })).filter((function (e) { 2143 return !e.matches(".mm-nopanel") 2144 })).forEach((function (e) { 2145 ["mm-panel_lazysubmenu", "mm-nolistview", "mm-nopanel"].forEach((function (t) { 2146 e.classList.add(t) 2147 })) 2148 })) 2149 })), this.bind("initPanels:before", (function () {
2150 _(e.node.pnls, e.conf.panelNodetype.join(", ")).forEach((function (e) { 2151 var t = ".mm-panel_lazysubmenu", 2152 n = g(e, t); 2153 e.matches(t) && n.unshift(e), n.filter((function (e) { 2154 return !e.matches(".mm-panel_lazysubmenu .mm-panel_lazysubmenu") 2155 })).forEach((function (e) { 2156 ["mm-panel_lazysubmenu", "mm-nolistview", "mm-nopanel"].forEach((function (t) { 2157 e.classList.remove(t) 2158 })) 2159 })) 2160 })) 2161 })), this.bind("initOpened:before", (function () { 2162 var t = []; 2163 g(e.node.pnls, "." + e.conf.classNames.selected).forEach((function (e) { 2164 t.push.apply(t, y(e, ".mm-panel_lazysubmenu")) 2165 })), t.length && (t.forEach((function (e) { 2166 ["mm-panel_lazysubmenu", "mm-nolistview", "mm-nopanel"].forEach((function (t) { 2167 e.classList.remove(t) 2168 })) 2169 })), e.initPanel(t[t.length - 1])) 2170 })), this.bind("openPanel:before", (function (t) { 2171 var n = ".mm-panel_lazysubmenu", 2172 i = g(t, n); 2173 t.matches(n) && i.unshift(t), (i = i.filter((function (e) { 2174 return !e.matches(".mm-panel_lazysubmenu .mm-panel_lazysubmenu") 2175 }))).forEach((function (t) { 2176 e.initPanel(t) 2177 })) 2178 }))) 2179 }, 2180 navbars: _e, 2181 pageScroll: function () { 2182 var e = this, 2183 t = function (e) { 2184 return "boolean" == typeof e && (e = { 2185 scroll: e 2186 }), "object" != typeof e && (e = {}), e 2187 }(this.opts.pageScroll); 2188 this.opts.pageScroll = a(t, S.options.pageScroll); 2189 var n, i = this.conf.pageScroll; 2190 2191 function s() { 2192 n && window.scrollTo({ 2193 top: n.getBoundingClientRect().top + document.scrollingElement.scrollTop - i.scrollOffset, 2194 behavior: "smooth" 2195 }), n = null 2196 } 2197 2198 function o(e) { 2199 try { 2200 return "#" != e && "#" == e.slice(0, 1) ? S.node.page.querySelector(e) : null 2201 } catch (e) { 2202 return null 2203 } 2204 } 2205 if (t.scroll && this.bind("close:finish", (function () { 2206 s() 2207 })), this.opts.offCanvas && t.scroll && this.clck.push((function (t, i) { 2208 if (n = null, i.inMenu) { 2209 var a = t.getAttribute("href"); 2210 if (n = o(a)) return e.node.menu.matches(".mm-menu_sidebar-expanded") && e.node.wrpr.matches( 2211 ".mm-wrapper_sidebar-expanded") ? void s() : { 2212 close: !0 2213 } 2214 } 2215 })), t.update) { 2216 var r = []; 2217 this.bind("initListview:after", (function (e) { 2218 L(_(e, ".mm-listitem")).forEach((function (e) { 2219 var t = o(e.getAttribute("href")); 2220 t && r.unshift(t) 2221 })) 2222 })); 2223 var c = -1; 2224 window.addEventListener("scroll", (function (t) { 2225 for (var n = window.scrollY, s = 0; s < r.length; s++) 2226 if (r[s].offsetTop < n + i.updateOffset) { 2227 if (c !== s) { 2228 c = s; 2229 var a = L(g(_(e.node.pnls, ".mm-panel_opened")[0], ".mm-listitem")); 2230 (a = a.filter((function (e) { 2231 return e.matches('[href="#' + r[s].id + '"]') 2232 }))).length && e.setSelected(a[0].parentElement) 2233 } 2234 break 2235 } 2236 })) 2237 } 2238 }, 2239 searchfield: function () { 2240 var e = this, 2241 t = function (e) { 2242 return "boolean" == typeof e && (e = { 2243 add: e 2244 }), "object" != typeof e && (e = {}), "boolean" == typeof e.panel && (e.panel = { 2245 add: e.panel 2246 }), "object" != typeof e.panel && (e.panel = {}), "panel" == e.addTo && (e.panel.add = !0), e.panel 2247 .add && (e.showSubPanels = !1, e.panel.splash && (e.cancel = !0)), e 2248 }(this.opts.searchfield); 2249 this.opts.searchfield = a(t, S.options.searchfield); 2250 this.conf.searchfield; 2251 t.add && (this.bind("close:start", (function () { 2252 g(e.node.menu, ".mm-searchfield").forEach((function (e) { 2253 e.blur() 2254 })) 2255 })), this.bind("initPanel:after", (function (n) { 2256 var i = null; 2257 t.panel.add && (i = Se.call(e)); 2258 var s = null; 2259 switch (t.addTo) { 2260 case "panels": 2261 s = [n]; 2262 break; 2263 case "panel": 2264 s = [i]; 2265 break; 2266 default: 2267 "string" == typeof t.addTo ? s = g(e.node.menu, t.addTo) : "array" == o(t.addTo) && (s = t.addTo) 2268 }
2269 s.forEach((function (n) { 2270 n = Me.call(e, n), t.search && n && Ae.call(e, n) 2271 })), t.noResults && Te.call(e, t.panel.add ? i : n) 2272 })), this.clck.push((function (t, n) { 2273 if (n.inMenu && t.matches(".mm-searchfield__btn")) { 2274 if (t.matches(".mm-btn_close")) { 2275 var i = g(s = t.closest(".mm-searchfield"), "input")[0]; 2276 return i.value = "", e.search(i), !0 2277 } 2278 var s; 2279 if (t.matches(".mm-btn_next")) return (s = t.closest("form")) && s.submit(), !0 2280 } 2281 }))) 2282 }, 2283 sectionIndexer: function () { 2284 var e = this, 2285 t = function (e) { 2286 return "boolean" == typeof e && (e = { 2287 add: e 2288 }), "object" != typeof e && (e = {}), e 2289 }(this.opts.sectionIndexer); 2290 this.opts.sectionIndexer = a(t, S.options.sectionIndexer), t.add && this.bind("initPanels:after", ( 2291 function () { 2292 if (!e.node.indx) { 2293 var t = ""; 2294 "abcdefghijklmnopqrstuvwxyz".split("").forEach((function (e) { 2295 t += '<a href="#">' + e + "</a>" 2296 })); 2297 var n = b("div.mm-sectionindexer"); 2298 n.innerHTML = t, e.node.pnls.prepend(n), e.node.indx = n, e.node.indx.addEventListener("click", 2299 (function (e) { 2300 e.target.matches("a") && e.preventDefault() 2301 })); 2302 var i = function (t) { 2303 if (t.target.matches("a")) { 2304 var n = t.target.textContent, 2305 i = _(e.node.pnls, ".mm-panel_opened")[0], 2306 s = -1, 2307 a = i.scrollTop; 2308 i.scrollTop = 0, g(i, ".mm-divider").filter((function (e) { 2309 return !e.matches(".mm-hidden") 2310 })).forEach((function (e) { 2311 s < 0 && n == e.textContent.trim().slice(0, 1).toLowerCase() && (s = e.offsetTop) 2312 })), i.scrollTop = s > -1 ? s : a 2313 } 2314 }; 2315 U ? (e.node.indx.addEventListener("touchstart", i), e.node.indx.addEventListener("touchmove", i)) : 2316 e.node.indx.addEventListener("mouseover", i) 2317 } 2318 e.bind("openPanel:start", (function (t) { 2319 var n = g(t, ".mm-divider").filter((function (e) { 2320 return !e.matches(".mm-hidden") 2321 })).length; 2322 e.node.indx.classList[n ? "add" : "remove"]("mm-sectionindexer_active") 2323 })) 2324 })) 2325 }, 2326 setSelected: function () { 2327 var e = this, 2328 t = function (e) { 2329 return "boolean" == typeof e && (e = { 2330 hover: e, 2331 parent: e 2332 }), "object" != typeof e && (e = {}), e 2333 }(this.opts.setSelected); 2334 if (this.opts.setSelected = a(t, S.options.setSelected), "detect" == t.current) { 2335 var n = function (t) { 2336 t = t.split("?")[0].split("#")[0]; 2337 var i = e.node.menu.querySelector('a[href="' + t + '"], a[href="' + t + '/"]'); 2338 if (i) e.setSelected(i.parentElement); 2339 else { 2340 var s = t.split("/").slice(0, -1); 2341 s.length && n(s.join("/")) 2342 } 2343 }; 2344 this.bind("initMenu:after", (function () { 2345 n.call(e, window.location.href) 2346 })) 2347 } else t.current || this.bind("initListview:after", (function (e) { 2348 _(e, ".mm-listitem_selected").forEach((function (e) { 2349 e.classList.remove("mm-listitem_selected") 2350 })) 2351 })); 2352 t.hover && this.bind("initMenu:after", (function () { 2353 e.node.menu.classList.add("mm-menu_selected-hover") 2354 })), t.parent && (this.bind("openPanel:finish", (function (t) { 2355 g(e.node.pnls, ".mm-listitem_selected-parent").forEach((function (e) { 2356 e.classList.remove("mm-listitem_selected-parent") 2357 })); 2358 for (var n = t.mmParent; n;) n.matches(".mm-listitem_vertical") || n.classList.add( 2359 "mm-listitem_selected-parent"), n = (n = n.closest(".mm-panel")).mmParent 2360 })), this.bind("initMenu:after", (function () { 2361 e.node.menu.classList.add("mm-menu_selected-parent") 2362 }))) 2363 }, 2364 sidebar: function () { 2365 var e = this; 2366 if (this.opts.offCanvas) { 2367 var t = function (e) { 2368 return ("string" == typeof e || "boolean" == typeof e && e || "number" == typeof e) && (e = { 2369 expanded: e 2370 }), "object" != typeof e && (e = {}), "boolean" == typeof e.collapsed && e.collapsed && (e.collapsed = { 2371 use: !0 2372 }), "string" != typeof e.collapsed && "number" != typeof e.collapsed || (e.collapsed = { 2373 use: e.collapsed 2374 }), "object" != typeof e.collapsed && (e.collapsed = {}), "boolean" == typeof e.expanded && e.expanded && 2375 (e.expanded = { 2376 use: !0 2377 }), "string" != typeof e.expanded && "number" != typeof e.expanded || (e.expanded = { 2378 use: e.expanded 2379 }), "object" != typeof e.expanded && (e.expanded = {}), e 2380 }(this.opts.sidebar); 2381 if (this.opts.sidebar = a(t, S.options.sidebar), t.collapsed.use) { 2382 this.bind("initMenu:after", (function () { 2383 if (e.node.menu.classList.add("mm-menu_sidebar-collapsed"), t.collapsed.blockMenu && e.opts.offCanvas && 2384 !_(e.node.menu, ".mm-menu__blocker")[0]) { 2385 var n = b("a.mm-menu__blocker"); 2386 n.setAttribute("href", "#" + e.node.menu.id), e.node.menu.prepend(n) 2387 } 2388 t.collapsed.hideNavbar && e.node.menu.classList.add("mm-menu_hidenavbar"), t.collapsed.hideDivider &&
2389 e.node.menu.classList.add("mm-menu_hidedivider") 2390 })); 2391 var n = function () { 2392 e.node.wrpr.classList.add("mm-wrapper_sidebar-collapsed") 2393 }, 2394 i = function () { 2395 e.node.wrpr.classList.remove("mm-wrapper_sidebar-collapsed") 2396 }; 2397 "boolean" == typeof t.collapsed.use ? this.bind("initMenu:after", n) : P(t.collapsed.use, n, i) 2398 } 2399 if (t.expanded.use) { 2400 this.bind("initMenu:after", (function () { 2401 e.node.menu.classList.add("mm-menu_sidebar-expanded") 2402 })); 2403 n = function () { 2404 e.node.wrpr.classList.add("mm-wrapper_sidebar-expanded"), e.node.wrpr.matches( 2405 ".mm-wrapper_sidebar-closed") || e.open() 2406 }, i = function () { 2407 e.node.wrpr.classList.remove("mm-wrapper_sidebar-expanded"), e.close() 2408 }; 2409 "boolean" == typeof t.expanded.use ? this.bind("initMenu:after", n) : P(t.expanded.use, n, i), this.bind( 2410 "close:start", (function () { 2411 e.node.wrpr.matches(".mm-wrapper_sidebar-expanded") && (e.node.wrpr.classList.add( 2412 "mm-wrapper_sidebar-closed"), "remember" == t.expanded.initial && window.localStorage.setItem( 2413 "mmenuExpandedState", "closed")) 2414 })), this.bind("open:start", (function () { 2415 e.node.wrpr.matches(".mm-wrapper_sidebar-expanded") && (e.node.wrpr.classList.remove( 2416 "mm-wrapper_sidebar-closed"), "remember" == t.expanded.initial && window.localStorage.setItem( 2417 "mmenuExpandedState", "open")) 2418 })); 2419 var s = t.expanded.initial; 2420 if ("remember" == t.expanded.initial) { 2421 var o = window.localStorage.getItem("mmenuExpandedState"); 2422 switch (o) { 2423 case "open": 2424 case "closed": 2425 s = o 2426 } 2427 } 2428 "closed" == s && this.bind("initMenu:after", (function () { 2429 e.node.wrpr.classList.add("mm-wrapper_sidebar-closed") 2430 })), this.clck.push((function (n, i) { 2431 if (i.inMenu && i.inListview && e.node.wrpr.matches(".mm-wrapper_sidebar-expanded")) return { 2432 close: "closed" == t.expanded.initial 2433 } 2434 })) 2435 } 2436 } 2437 }, 2438 toggles: function () { 2439 var e = this; 2440 this.bind("initPanel:after", (function (t) { 2441 g(t, "input").forEach((function (t) { 2442 E(t, e.conf.classNames.toggles.toggle, "mm-toggle"), E(t, e.conf.classNames.toggles.check, 2443 "mm-check") 2444 })) 2445 })) 2446 } 2447 }, S.wrappers = { 2448 angular: function () { 2449 this.opts.onClick = { 2450 close: !0, 2451 preventDefault: !1, 2452 setSelected: !0 2453 } 2454 }, 2455 bootstrap: function () { 2456 var e = this; 2457 if (this.node.menu.matches(".navbar-collapse")) { 2458 this.conf.offCanvas && (this.conf.offCanvas.clone = !1); 2459 var t = b("nav"), 2460 n = b("div"); 2461 t.append(n), _(this.node.menu).forEach((function (t) { 2462 switch (!0) { 2463 case t.matches(".navbar-nav"): 2464 n.append(function (e) { 2465 var t = b("ul"); 2466 return g(e, ".nav-item").forEach((function (e) { 2467 var n = b("li"); 2468 if (e.matches(".active") && n.classList.add("Selected"), !e.matches(".nav-link")) { 2469 var i = _(e, ".dropdown-menu")[0]; 2470 i && n.append(o(i)), e = _(e, ".nav-link")[0] 2471 } 2472 n.prepend(a(e)), t.append(n) 2473 })), t 2474 }(t)); 2475 break; 2476 case t.matches(".dropdown-menu"): 2477 n.append(o(t)); 2478 break; 2479 case t.matches(".form-inline"): 2480 e.conf.searchfield.form = { 2481 action: t.getAttribute("action") || null, 2482 method: t.getAttribute("method") || null 2483 }, e.conf.searchfield.input = { 2484 name: t.querySelector("input").getAttribute("name") || null 2485 }, e.conf.searchfield.clear = !1, e.conf.searchfield.submit = !0; 2486 break; 2487 default: 2488 n.append(t.cloneNode(!0)) 2489 } 2490 })), this.bind("initMenu:before", (function () { 2491 document.body.prepend(t), e.node.menu = t 2492 })); 2493 var i = this.node.menu.parentElement; 2494 if (i) { 2495 var s = i.querySelector(".navbar-toggler"); 2496 s && (s.removeAttribute("data-target"), s.removeAttribute("aria-controls"), s.outerHTML = s.outerHTML, 2497 (s = i.querySelector(".navbar-toggler")).addEventListener("click", (function (t) { 2498 t.preventDefault(), t.stopImmediatePropagation(), e[e.vars.opened ? "close" : "open"]() 2499 }))) 2500 } 2501 } 2502 2503 function a(e) { 2504 for (var t = b(e.matches("a") ? "a" : "span"), n = ["href", "title", "target"], i = 0; i < n.length; i++) 2505 void 0 !== e.getAttribute(n[i]) && t.setAttribute(n[i], e.getAttribute(n[i])); 2506 return t.innerHTML = e.innerHTML, g(t, ".sr-only").forEach((function (e) { 2507 e.remove() 2508 })), t 2509 } 2510 2511 function o(e) { 2512 var t = b("ul"); 2513 return _(e).forEach((function (e) { 2514 var n = b("li"); 2515 e.matches(".dropdown-divider") ? n.classList.add("Divider") : e.matches(".dropdown-item") && n.append( 2516 a(e)), t.append(n) 2517 })), t 2518 } 2519 }, 2520 olark: function () { 2521 this.conf.offCanvas.page.noSelector.push("#olark") 2522 }, 2523 turbolinks: function () { 2524 var e; 2525 document.addEventListener("turbolinks:before-visit", (function (t) { 2526 e = document.querySelector(".mm-wrapper").className.split(" ").filter((function (e) { 2527 return /mm-/.test(e) 2528 })) 2529 })), document.addEventListener("turbolinks:load", (function (t) { 2530 void 0 !== e && (document.querySelector(".mm-wrapper").className = e) 2531 })) 2532 }, 2533 wordpress: function () { 2534 this.conf.classNames.selected = "current-menu-item"; 2535 var e = document.getElementById("wpadminbar");
2536 e && (e.style.position = "fixed", e.classList.add("mm-slideout")) 2537 } 2538 }; 2539 var je; 2540 t.default = S; 2541 window && (window.Mmenu = S), (je = window.jQuery || window.Zepto || null) && (je.fn.mmenu = function (e, t) { 2542 var n = je(); 2543 return this.each((function (i, s) { 2544 if (!s.mmApi) { 2545 var a = new S(s, e, t), 2546 o = je(a.node.menu); 2547 o.data("mmenu", a.API), n = n.add(o) 2548 } 2549 })), n 2550 }) 2551}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.