PageSourceSearch

https://www.confemen.org/wp-content/themes/confemen/js/mmenu.js?ver=1699233472

js confemen.org collected 2026-10-02 04:30:24 UTC 148,304 bytes, 2,685 lines download raw bytes

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

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.