PageSourceSearch

https://www.orchideen.de/js/glider/glider.min.js

js orchideen.de collected 2026-10-10 00:43:20 UTC 10,869 bytes, 15 lines download raw bytes

1/* @preserve
2    _____ __ _     __                _
3   / ___// /(_)___/ /___  ____      (_)___
4  / (_ // // // _  // -_)/ __/_    / /(_-<
5  \___//_//_/ \_,_/ \__//_/  (_)__/ //___/
6                              |___/
7  Version: 1.7.4
8  Author: Nick Piscitelli (pickykneee)
9  Website: https://nickpiscitelli.com
10  Documentation: http://nickpiscitelli.github.io/Glider.js
11  License: MIT License
12  Release Date: October 25th, 2018
13
14*/
15!function(e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():e()}(function(){"use strict";var e="undefined"!=typeof window?window:this,t=e.Glider=function(r,o){var i,l,s=this;if(!(s instanceof t))return new t(r,o);if(r._glider)return r._glider;if(s.ele=r,s.ele.classList.add("glider"),s.ele.hasAttribute("role")||s.ele.setAttribute("role","region"),s.ele.hasAttribute("aria-roledescription")||s.ele.setAttribute("aria-roledescription","carousel"),s.ele.hasAttribute("tabindex")||s.ele.setAttribute("tabindex","0"),s.ele._glider=s,s.opt=Object.assign({},{slidesToScroll:1,slidesToShow:1,resizeLock:!0,duration:.5,easing:function(e,t,r,o,i){return o*(t/=i)*t+r}},o),s.animate_id=s.page=s.slide=0,s.arrows={},t._uid=(t._uid||0)+1,s._uid=t._uid,s._opt=s.opt,s.opt.skipTrack)s.track=s.ele.children[0];else for(s.track=document.createElement("div"),s.ele.appendChild(s.track);1!==s.ele.children.length;)s.track.appendChild(s.ele.children[0]);s.track.classList.add("glider-track"),s.init(),s.resize=s.init.bind(s,!0),s.scrollHandler=(l=!1,function(t){i=t,l||(l=!0,e.requestAnimationFrame(function(){l=!1,s.updateControls(i)}))}),s.keydownHandler=function(e){if(e.target===s.ele)switch(e.key){case"ArrowLeft":e.preventDefault(),s.scrollItem("prev");break;case"ArrowRight":e.preventDefault(),s.scrollItem("next");break;case"Home":e.preventDefault(),s.scrollItem(0);break;case"End":e.preventDefault(),s.scrollItem(s.slides.length-1)}},s.event(s.ele,"add",{scroll:s.scrollHandler},{passive:!0}),s.event(s.ele,"add",{keydown:s.keydownHandler}),s.event(e,"add",{resize:s.resize})},r=t.prototype;return r.init=function(e,t){var r,o=this,i=0;o.slides=o.track.children,Array.prototype.forEach.call(o.slides,function(e,t){e.classList.add("glider-slide"),e.setAttribute("data-gslide",t),e.id||(e.id="glider-"+o._uid+"-slide-"+t),e.hasAttribute("role")||e.setAttribute("role","tabpanel"),e.hasAttribute("aria-roledescription")||e.setAttribute("aria-roledescription","slide"),e.hasAttribute("aria-label")||e.setAttribute("aria-label",t+1+" / "+o.slides.length)}),o.containerWidth=o.ele.clientWidth;var l=o.settingsBreakpoint();if(t||(t=l),"auto"===o.opt.slidesToShow||void 0!==o.opt._autoSlide){var s=o.containerWidth/o.opt.itemWidth;o.opt._autoSlide=o.opt.slidesToShow=o.opt.exactWidth?s:Math.max(1,Math.floor(s))}"auto"===o.opt.slidesToScroll&&(o.opt.slidesToScroll=Math.floor(o.opt.slidesToShow)),o.itemWidth=o.opt.exactWidth?o.opt.itemWidth:o.containerWidth/o.opt.slidesToShow,Array.prototype.forEach.call(o.slides,function(e){e.style.height="auto",e.style.width=o.itemWidth+"px"}),r=o.itemWidth*o.slides.length,Array.prototype.forEach.call(o.slides,function(e){e.offsetHeight>i&&(i=e.offsetHeight)}),o.track.style.width=r+"px",o.trackWidth=r,o.isDrag=!1,o.preventClick=!1,o.move=!1,o.opt.resizeLock&&o.scrollTo(o.slide*o.itemWidth,0),(l||t)&&(o.bindArrows(),o.buildDots(),o.bindDrag()),o.updateControls(),o.emit(e?"refresh":"loaded")},r.bindDrag=function(){var e=this;if(e.mouse=e.mouse||e.handleMouse.bind(e),!e.dragEvents){var t=function(){e.mouseDown=void 0,e.ele.classList.remove("drag"),e.isDrag&&(e.preventClick=!0),e.isDrag=!1},r=function(){e.move=!0};e.dragEvents={mouseup:t,mouseleave:t,mousedown:function(t){e.mouseDown=t.clientX,e.ele.classList.add("drag"),e.move=!1,setTimeout(r,300)},touchstart:function(t){e.ele.classList.add("drag"),e.move=!1,setTimeout(r,300)},touchend:t,touchcancel:t,mousemove:e.mouse,click:function(t){e.preventClick&&e.move&&(t.preventDefault(),t.stopPropagation()),e.preventClick=!1,e.move=!1}}}e.ele.classList.toggle("draggable",!0===e.opt.draggable),e.event(e.ele,"remove",e.dragEvents),e.opt.draggable&&e.event(e.ele,"add",e.dragEvents)},r.buildDots=function(){var e=this;
15if(e.opt.dots){if("string"==typeof e.opt.dots?e.dots=document.querySelector(e.opt.dots):e.dots=e.opt.dots,e.dots){e.dots.innerHTML="",e.dots.setAttribute("role","tablist"),e.dots.classList.add("glider-dots");for(var t=0;t<Math.ceil(e.slides.length/e.opt.slidesToShow);++t){var r=document.createElement("button");r.dataset.index=t,r.setAttribute("aria-label","Page "+(t+1)),r.setAttribute("role","tab"),r.className="glider-dot "+(t?"":"active");var o=Math.round(t*e.containerWidth/e.itemWidth),i=e.slides[o];i&&i.id&&r.setAttribute("aria-controls",i.id),e.event(r,"add",{click:e.scrollItem.bind(e,t,!0)}),e.dots.appendChild(r)}}}else e.dots&&(e.dots.innerHTML="")},r.bindArrows=function(){var e=this;e._arrowFuncs=e._arrowFuncs||{},e.opt.arrows?["prev","next"].forEach(function(t){var r=e.opt.arrows[t];if(r&&("string"==typeof r&&(r=document.querySelector(r)),r)){var o=e._arrowFuncs[t]||e.scrollItem.bind(e,t);e._arrowFuncs[t]=o,e.event(r,"remove",{click:o}),e.event(r,"add",{click:o}),r.hasAttribute("aria-label")||r.setAttribute("aria-label","prev"===t?"Previous slide":"Next slide"),e.arrows[t]=r}}):Object.keys(e.arrows).forEach(function(t){var r=e.arrows[t],o=e._arrowFuncs[t];o&&e.event(r,"remove",{click:o})})},r.toggleArrow=function(e,t){e&&(e.classList.toggle("disabled",t),e.setAttribute("aria-disabled",t?"true":"false"),"disabled"in e&&(e.disabled=t),t?e.setAttribute("tabindex","-1"):e.removeAttribute("tabindex"))},r.updateControls=function(e){var t=this;e&&!t.opt.scrollPropagate&&e.stopPropagation();var r=t.containerWidth>=t.trackWidth;if(!t.opt.rewind){var o=t.ele.scrollLeft<=0||r,i=t.ele.scrollLeft+t.containerWidth>=Math.floor(t.trackWidth)||r;t.toggleArrow(t.arrows.prev,o),t.toggleArrow(t.arrows.next,i)}t.slide=Math.round(t.ele.scrollLeft/t.itemWidth),t.page=Math.round(t.ele.scrollLeft/t.containerWidth);var l=t.slide+Math.floor(Math.floor(t.opt.slidesToShow)/2),s=Math.floor(t.opt.slidesToShow)%2?0:l+1;1===Math.floor(t.opt.slidesToShow)&&(s=0),t.ele.scrollLeft+t.containerWidth>=Math.floor(t.trackWidth)&&(t.page=t.dots?t.dots.children.length-1:Math.max(0,Math.ceil(t.slides.length/t.opt.slidesToShow)-1)),Array.prototype.forEach.call(t.slides,function(e,r){var o=e.classList,i=o.contains("visible"),a=t.ele.scrollLeft,n=t.ele.scrollLeft+t.containerWidth,d=t.itemWidth*r,c=d+t.itemWidth;Array.prototype.forEach.call(o,function(e){/^left|right/.test(e)&&o.remove(e)}),o.toggle("active",t.slide===r),l===r||s&&s===r?o.add("center"):(o.remove("center"),o.add([r<l?"left":"right",Math.abs(r-(r<l?l:s||l))].join("-")));var u=Math.ceil(d)>=Math.floor(a)&&Math.floor(c)<=Math.ceil(n);o.toggle("visible",u),e.setAttribute("aria-hidden",u?"false":"true"),u!==i&&t.emit("slide-"+(u?"visible":"hidden"),{slide:r})}),t.dots&&Array.prototype.forEach.call(t.dots.children,function(e,r){e.classList.toggle("active",t.page===r)}),e&&t.opt.scrollLock&&(clearTimeout(t.scrollLock),t.scrollLock=setTimeout(function(){clearTimeout(t.scrollLock),Math.abs(t.ele.scrollLeft/t.itemWidth-t.slide)>.02&&(t.mouseDown||t.trackWidth>t.containerWidth+t.ele.scrollLeft&&t.scrollItem(t.getCurrentSlide()))},t.opt.scrollLockDelay||250))},r.getCurrentSlide=function(){var e=this;return e.round(e.ele.scrollLeft/e.itemWidth)},r.scrollItem=function(e,t,r){r&&r.preventDefault();var o=this,i=e;++o.animate_id;var l,s=o.slide;if(!0===t)l=(e=Math.round(e*o.containerWidth/o.itemWidth))*o.itemWidth;else{if("string"==typeof e){var a="prev"===e;if(e=o.opt.slidesToScroll%1||o.opt.slidesToShow%1?o.getCurrentSlide():o.slide,a?e-=o.opt.slidesToScroll:e+=o.opt.slidesToScroll,o.opt.rewind){var n=o.ele.scrollLeft;e=a&&!n?o.slides.length:!a&&n+o.containerWidth>=Math.floor(o.trackWidth)?0:e}}e=Math.max(Math.min(e,o.slides.length-1),0),o.slide=e,l=o.itemWidth*e}return o.emit("scroll-item",{prevSlide:s,slide:e}),o.scrollTo(l,o.opt.duration*Math.abs(o.ele.scrollLeft-l),function(){o.updateControls(),o.emit("animated",{value:i,type:"string"==typeof i?"arrow":t?"dot":"slide"})}),!1},r.settingsBreakpoint=function(){var t=this,r=t._opt.responsive;if(r){r=r.slice().sort(function(e,t){return t.breakpoint-e.breakpoint});for(var o=0;o<r.length;++o){var i=r[o];if(e.innerWidth>=i.breakpoint)return t.breakpoint!==i.breakpoint&&(t.opt=Object.assign({},t._opt,i.settings),t.breakpoint=i.breakpoint,!0)}}var l=0!==t.breakpoint;return t.opt=Object.assign({},t._opt),t.breakpoint=0,l},r.scrollTo=function(t,r,o){var i=this;if(e.matchMedia&&e.matchMedia("(prefers-reduced-motion: reduce)").matches)return i.ele.scrollLeft=t,void(o&&o.call(i));var l=e.performance.now(),s=i.animate_id,a=function(){var n=e.performance.now()-l;i.ele.scrollLeft=i.ele.scrollLeft+(t-i.ele.scrollLeft)*i.opt.easing(0,n,0,1,r),n<r&&s===i.animate_id?e.requestAnimationFrame(a):(i.ele.scrollLeft=t,o&&o.call(i))};e.requestAnimationFrame(a)},r.removeItem=function(e){var t=this;t.slides.length&&(t.track.removeChild(t.slides[e]),t.refresh(!0),t.emit("remove"))},r.addItem=function(e){var t=this;t.track.appendChild(e),t.refresh(!0),t.emit("add")},r.handleMouse=function(e){var t=this;t.mouseDown&&(e.preventDefault(),t.isDrag=!0,t.ele.scrollLeft+=(t.mouseDown-e.clientX)*(t.opt.dragVelocity||3.3),t.mouseDown=e.clientX)},r.round=function(e){var t=1/(this.opt.slidesToScroll%1||1);return Math.round(e*t)/t},r.refresh=function(e){this.init(!0,e)},r.setOption=function(e,t){var r=this;r.breakpoint&&!t?r._opt.responsive.forEach(function(t){t.breakpoint===r.breakpoint&&(t.settings=Object.assign({},t.settings,e))}):r._opt=Object.assign({},r._opt,e),r.breakpoint=0,r.settingsBreakpoint(),r.refresh(!0)},r.destroy=function(){var t=this;t.scrollHandler&&t.event(t.ele,"remove",{scroll:t.scrollHandler},{passive:!0}),t.keydownHandler&&t.event(t.ele,"remove",{keydown:t.keydownHandler}),t.dragEvents&&t.event(t.ele,"remove",t.dragEvents),Object.keys(t.arrows).forEac
15h(function(e){var r=t.arrows[e],o=t._arrowFuncs&&t._arrowFuncs[e];r&&o&&t.event(r,"remove",{click:o})}),t.arrows={},t._arrowFuncs={};var r=t.ele.cloneNode(!0),o=function(e){e.removeAttribute("style"),Array.prototype.forEach.call(e.classList,function(t){/^glider/.test(t)&&e.classList.remove(t)})};t.opt.skipTrack||(r.children[0].outerHTML=r.children[0].innerHTML),o(r),Array.prototype.forEach.call(r.getElementsByTagName("*"),o),t.ele.parentNode.replaceChild(r,t.ele),t.event(e,"remove",{resize:t.resize}),t.emit("destroy")},r.emit=function(t,r){var o=this,i=!1!==o.opt.eventBubble&&!o.opt.eventPropagate,l=new e.CustomEvent("glider-"+t,{bubbles:i,detail:r});o.ele.dispatchEvent(l)},r.event=function(e,t,r,o){var i="add"===t;Object.keys(r).forEach(function(t){i?o?e.addEventListener(t,r[t],o):e.addEventListener(t,r[t]):o?e.removeEventListener(t,r[t],o):e.removeEventListener(t,r[t])})},t});

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.