PageSourceSearch

https://www.stiftung-buehl.ch/_assets/52902f9eb8c8a2918aa39680b874dbb1/JavaScript/functions.js?1750240398

js stiftung-buehl.ch collected 2026-10-07 18:11:45 UTC 16,179 bytes, 397 lines download raw bytes

1! function(t) {
2    var e = {};
3
4    function n(i) {
5        if (e[i]) return e[i].exports;
6        var o = e[i] = {
7            i: i,
8            l: !1,
9            exports: {}
10        };
11        return t[i].call(o.exports, o, o.exports, n), o.l = !0, o.exports
12    }
13    n.m = t, n.c = e, n.d = function(t, e, i) {
14        n.o(t, e) || Object.defineProperty(t, e, {
15            enumerable: !0,
16            get: i
17        })
18    }, n.r = function(t) {
19        "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
20            value: "Module"
21        }), Object.defineProperty(t, "__esModule", {
22            value: !0
23        })
24    }, n.t = function(t, e) {
25        if (1 & e && (t = n(t)), 8 & e) return t;
26        if (4 & e && "object" == typeof t && t && t.__esModule) return t;
27        var i = Object.create(null);
28        if (n.r(i), Object.defineProperty(i, "default", {
29            enumerable: !0,
30            value: t
31        }), 2 & e && "string" != typeof t)
32            for (var o in t) n.d(i, o, function(e) {
33                return t[e]
34            }.bind(null, o));
35        return i
36    }, n.n = function(t) {
37        var e = t && t.__esModule ? function() {
38            return t.default
39        } : function() {
40            return t
41        };
42        return n.d(e, "a", e), e
43    }, n.o = function(t, e) {
44        return Object.prototype.hasOwnProperty.call(t, e)
45    }, n.p = "", n(n.s = 0)
46}([function(t, e, n) {
47    "use strict";
48    n.r(e);
49    var i = function() {
50            function t(t) {
51                var e = this;
52                this.listener = function(t) {
53                    (t.matches ? e.matchFns : e.unmatchFns).forEac
53h((function(t) {
54                        t()
55                    }))
56                }, this.toggler = window.matchMedia(t), this.toggler.addListener(this.listener), this.matchFns = [], this.unmatchFns = []
57            }
58            return t.prototype.add = function(t, e) {
59                this.matchFns.push(t), this.unmatchFns.push(e), (this.toggler.matches ? t : e)()
60            }, t
61        }(),
62        o = function(t) {
63            const toWrapper = document.getElementById('ax-dynamic-menu');
64            toWrapper.click();
65            return Array.prototype.slice.call(t)
66        },
67        s = function(t, e) {
68            return o((e || document).querySelectorAll(t))
69        },
70        r = ("ontouchstart" in window || navigator.msMaxTouchPoints, navigator.userAgent.indexOf("MSIE") > -1 || navigator.appVersion.indexOf("Trident/") > -1),
71        a = "mm-spn",
72        c = function() {
73            function t(t, e, n, i, o) {
74                this.node = t, this.title = e, this.slidingSubmenus = i, this.selectedClass = n, this.node.classList.add(a), r && (this.slidingSubmenus = !1), this.node.classList.add(a + "--" + o), this.node.classList.add(a + "--" + (this.slidingSubmenus ? "navbar" : "vertical")), this._setSelectedl(), this._initAnchors()
75            }
76            return Object.defineProperty(t.prototype, "prefix", {
77                get: function() {
78                    return a
79                },
80                enumerable: !1,
81                configurable: !0
82            }), t.prototype.openPanel = function(t) {
83                var e = t.parentElement;
84                if (this.slidingSubmenus) {
85                    var n = t.dataset.mmSpnTitle;
86                    e === this.node ? this.node.classList.add(a + "--main") : (this.node.classList.remove(a + "--main"), n || o(e.children).forEach((function(t) {
87                        t.matches("a, span") && (n = t.textContent)
88                    }))), n || (n = this.title), this.node.dataset.mmSpnTitle = n, s(".mm-spn--open", this.node).forEach((function(t) {
89                        t.classList.remove(a + "--open"), t.classList.remove(a + "--parent")
90                    })), t.classList.add(a + "--open"), t.classList.remove(a + "--parent");
91                    for (var i = t.parentElement.closest("ul"); i;) i.classList.add(a + "--open"), i.classList.add(a + "--parent"), i = i.parentElement.closest("ul")
92                } else {
93                    var r = t.matches(".mm-spn--open");
94                    s(".mm-spn--open", this.node).forEach((function(t) {
95                        t.classList.remove(a + "--open")
96                    })), t.classList[r ? "remove" : "add"](a + "--open");
97                    for (var c = t.parentElement.closest("ul"); c;) c.classList.add(a + "--open"), c = c.parentElement.closest("ul")
98                }
99            }, t.prototype._setSelectedl = function() {
100                var t = s("." + this.selectedClass, this.node),
101                    e = t[t.length - 1],
102                    n = null;
103                e && (n = e.closest("ul")), n || (n = this.node.querySelector("ul")), this.openPanel(n)
104            }, t.prototype._initAnchors = function() {
105                var t = this;
106                this.node.addEventListener("click", (function(e) {
107                    var n = e.target,
108                        i = !1;
109                    (i = (i = (i = i || function(t) {
110                        return !!t.matches("a")
111                    }(n)) || function(e) {
112                        var n;
113                        return !!(n = e.closest("span") ? e.parentElement : !!e.closest("li") && e) && (o(n.children).forEach((function(e) {
114                            e.matches("ul") && t.openPanel(e)
115                        })), !0)
116                    }(n)) || function(e) {
117                        var n = s(".mm-spn--open", e),
118                            i = n[n.length - 1];
119                        if (i) {
120                            var o = i.parentElement.closest("ul");
121                            if (o) return t.openPanel(o), !0
122                        }
123                        return !1
124                    }(n)) && e.stopImmediatePropagation()
125                }))
126            }, t
127        }(),
128        d = function() {
129            function t(t, e) {
130                var n = this;
131                void 0 === t && (t = null), this.wrapper = document.createElement("div"), this.wrapper.classList.add("mm-ocd"), this.wrapper.classList.add("mm-ocd--" + e), this.content = document.createElement("div"), this.content.classList.add("mm-ocd__content"), this.wrapper.append(this.content), this.backdrop = document.createElement("div"), this.backdrop.classList.add("mm-ocd__backdrop"), this.wrapper.append(this.backdrop),  document.getElementById('ax-dynamic-menu').append(this.wrapper), t && this.content.append(t);
132                var i = function(t) {
133                    n.close(), t.stopImmediatePropagation()
134                };
135                this.backdrop.addEventListener("touchstart", i, {
136                    passive: !0
137                }), this.backdrop.addEventListener("mousedown", i, {
138                    passive: !0
139                })
140            }
141            return Object.defineProperty(t.prototype, "prefix", {
142                get: function() {
143                    return "mm-ocd"
144                },
145                enumerable: !1,
146                configurable: !0
147            }), t.prototype.open = function() {
148                this.wrapper.classList.add("mm-ocd--open"),  document.getElementById('ax-dynamic-menu').classList.add("mm-ocd-opened")
149            }, t.prototype.close = function() {
150                this.wrapper.classList.remove("mm-ocd--open"),  document.getElementById('ax-dynamic-menu').classList.remove("mm-ocd-opened")
151            }, t
152        }(),
153        u = function() {
154            function t(t, e) {
155                void 0 === e && (e = "all"), this.menu = t, this.toggler = new i(e)
156            }
157            return t.prototype.navigation = function(t) {
158                var e = this;
159                if (!this.navigator) {
160                    var n = (t = t || {}).title,
161                        i = void 0 === n ? "Menu" : n,
162                        o = t.selectedClass,
163                        s = void 0 === o ? "Selected" : o,
164                        r = t.slidingSubmenus,
165                        a = void 0 === r || r,
166                        d = t.theme,
167                        u = void 0 === d ? "light" : d;
168                    this.navigator = new c(this.menu, i, s, a, u), this.toggler.add((function() {
169                        return e.menu.classList.add(e.navigator.prefix)
170                    }), (function() {
171                        return e.menu.classList.remove(e.navigator.prefix)
172                    }))
173                }
174                return this.navigator
175            }, t.prototype.offcanvas = function(t) {
176                var e = this;
177                if (!this.drawer) {
178                    var n = (t = t || {}).position,
179                        i = void 0 === n ? "left" : n;
180                    this.drawer = new d(null, i);
181                    var o = document.createComment("original menu location");
182                    this.menu.after(o), this.toggler.add((function() {
183                        e.drawer.content.append(e.menu)
184                    }), (function() {
185                        e.drawer.close(), o.after(e.menu)
186                    }))
187                }
188                return this.drawer
189            }, t
190        }();
191    e.default = u;
192    window.MmenuLight = u
193}]);
194
195
196$(document).ready(function() {
197    const menu = new MmenuLight(
198        document.querySelector( "#ax-main-menu" )
199    );
200
201    const navigator = menu.navigation({
202        // options
203        title: "Startseite"
204    });
205
206    const drawer = menu.offcanvas({
207        // options
208        mediaQuery: "all",
209        "offCanvas": false
210    });
211
212    const menuImgMobile = $('#ax-dynamic-menu').attr('data-mobile-img');
213    const menuImgDesk = $('#ax-dynamic-menu').attr('data-desk-img');
214
215    $('.ax-menu-sizes>li').click(function () {
216        $(this).parent('ul').children('li').removeClass('ax-active');
217        $(this).addClass('ax-active');
218    });
219
220    $('.ax-menu-btn').click(function () {
221        $('.ax-main-header').toggleClass('nav-opened');
222        navigator.openPanel(
223            document.querySelector( "#ax-dynamic-menu" )
224        );
225        if ($('.ax-main-header').hasClass('nav-opened')){
226            drawer.open();
227            $(".ax-nav-control .ax-nav-back").css ("visibility", "hidden");
228            $('body').css('overflow', 'hidden');
229            $(".ax-breadcrumb").addClass('ax-on-top');
230        }else{
231            drawer.close();
232            $(".ax-nav-control .ax-nav-back").css ("visibility", "hidden");
233            $('body').css('overflow', 'auto');
234            $(".ax-breadcrumb").removeClass('ax-on-top');
235        }
236    });
237
238    $('#ax-dynamic-menu ul ul').each(function(){
239        $(this).parent().addClass('has-children');
240    });
241
242    $(".ax-nav-back").click(function () {
243        $(".mm-spn.mm-spn--navbar").trigger("click");
244        if ($("#ax-dynamic-menu #ax-main-menu").hasClass('mm-spn--main')){
245            $(".ax-nav-control .ax-nav-back").css ("visibility", "hidden");
246        }else {
247            $(".ax-nav-control .ax-nav-back").css("visibility", "visible");
248        }
249    });
250
251  $('.ax-nav-secondary > ul > li.ax-active > a').each(function(){
252    $('#ax-nav-secondary ul').remove();
253    $(this).next('ul').clone().appendTo($('#ax-nav-secondary'));
254    $('#ax-nav-secondary').removeClass('ax-hide');
255    $('.ax-nav-secondary').addClass('ax-hide');
256  });
257
258    $('.ax-nav-secondary > ul > li > span').click(function () {
259        $('#ax-nav-secondary ul').remove();
260        $(this).next('ul').clone().appendTo($('#ax-nav-secondary'));
261        $('#ax-nav-secondary').removeClass('ax-hide');
262        $('.ax-nav-secondary').addClass('ax-hide');
263    });
264
265    $('#ax-secondary-home').click(function () {
266        $('#ax-nav-secondary').addClass('ax-hide');
267        $('.ax-nav-secondary').removeClass('ax-hide');
268    });
269
270    $("#ax-dynamic-menu").click(function () {
271        if ($("#ax-dynamic-menu #ax-main-menu").hasClass('mm-spn--main')){
272            $(".ax-nav-control .ax-nav-back").css ("visibility", "hidden");
273        }else {
274            $(".ax-nav-control .ax-nav-back").css("visibility", "visible");
275        }
276        if (!$(this).hasClass("mm-spn--open")){
277            $(".ax-nav-control .ax-nav-back").css ("visibility", "hidden");
278        }
279
280
281        setTimeout(() => {
282            let lengthEl = $('.mm-spn--open').length-1;
283            $('#ax-main-menu ul').removeClass('first-active first-inactive');
284
285            const activeItems = $('.mm-spn--open');
286            if (lengthEl < 4) {
287                activeItems.eq(1).addClass('first-active');
288            }else{
289                activeItems.eq(lengthEl-3).addClass('first-inactive');
290                activeItems.eq(lengthEl-2).addClass('first-active');
291            }
292            if (window.innerWidth > 1199){
293                if (lengthEl <= 1){
294                    $('#ax-dynamic-menu .mm-ocd__content').addClass('bg-image').css("background-image", 'url("' + menuImgDesk + '")');
295                }else{
296                    $('#ax-dynamic-menu .mm-ocd__content').removeClass('bg-image').css('background-image', 'url("' + menuImgMobile + '")');
297                }
298            }else{
299                if (lengthEl <= 1){
300                    $('#ax-dynamic-menu .mm-ocd__content').removeClass('bg-image').css('background-image', 'url("' + menuImgMobile + '")');
301                }
302            }
303
304            $('#ax-dynamic-menu .is-active').removeClass('is-active');
305            $('#ax-dynamic-menu .mm-spn--open').parent('li').addClass('is-active');
306        }, 200);
307    });
308
309    if ($('.ax-image-slider').length>0){
310        $('.ax-image-slider').slick({
311            // slidesToShow: 3,
312            variableWidth: true,
313            slidesToScroll: 1,
314            autoplay: true,
315            infinite: false,
316            autoplaySpeed: 2000,
317            responsive: [
318                {
319                    breakpoint: 800,
320                    settings: {
321                        // slidesToShow: 2,
322                    }
323                },
324                {
325                    breakpoint: 480,
326                    settings: {
327                        // variableWidth: false,
328                        // slidesToShow: 1,
329                    }
330                }
331            ]
332        });
333    }
334
335    var fullWidthSliderImage = $('.ax-full-image-slider');
336    if (fullWidthSliderImage.length > 0){
337        fullWidthSliderImage.slick({
338            slidesToShow: 1,
339            arrows: false,
340            variableWidth: false,
341            slidesToScroll: 1,
342            autoplay: true,
343            infinite: true,
344            autoplaySpeed: 3000,
345            speed: 1000,
346        });
347
348        $('.slidernavi .right-trigg').click(function(e) {
349            fullWidthSliderImage.slick('slickNext');
350        });
351        
352        $('.slidernavi .left-trigg').click(function(e) {
353            fullWidthSliderImage.slick('slickPrev');
354        });
355    }    
356
357    $('.ax-accordion .toggle').click(function(e) {
358        e.preventDefault();
359        let $this = $(this);
360        if ($this.next().hasClass('show')) {
361            $this.removeClass('ax-open')
362            $this.next().slideUp(350);
363            $this.next().removeClass('show');
364        } else {
365            $this.toggleClass('ax-open')
366            $this.next().slideToggle(350);
367            $this.next().toggleClass('show');
368        }
369    });
370
371    $('.ax-on-search').click(function () {
372        $('#ax-search').addClass('ax-active');
373    })
374    $('.ax-search-btn').click(function (e) {
375      e.preventDefault();
376      $('#ax-search').addClass('ax-active');
377    })
378
379    $(".ax-close-search").click(function () {
380        $('#ax-search').removeClass('ax-active');
381    })
382
383    $('.ce-table tbody td').each(function () {
384        let index = $(this).index();
385        $(this).attr('data-head', $(this).closest('.ce-table').find('th').eq(index).text());
386        $(this).find('img').parent('td').addClass('has-img');
387    });
388
389    $("#ax-main-menu").css("display", "block");
390
391    if (window.location.hash == '#c2740' ) {
392      $([document.documentElement, document.body]).animate({
393        scrollTop: $("#c2740").offset().top
394      }, 2000);
395    };
396
397});

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.