PageSourceSearch

https://www.grossenhain.de/assets/handorgel/js/handorgel.min.js?v=1.0.0.1

js grossenhain.de collected 2026-10-02 04:09:10 UTC 13,078 bytes, 2 lines download raw bytes

1/** handorgel v1.0.0, @license MIT */
2!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).handorgel=t()}(this,function(){"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(s=i.key,void 0,"symbol"==typeof(o=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(s,"string"))?o:String(o)),i)}var s,o}function n(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return o(e)}function r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,s=i(e);if(t){var o=i(this).constructor;n=Reflect.construct(s,arguments,o)}else n=s.apply(this,arguments);return a(this,n)}}var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var h,d=(function(e){var t,n;t="undefined"!=typeof window?window:l,n=function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},i=n[e]=n[e]||[];return-1==i.indexOf(t)&&i.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{};return(n[e]=n[e]||{})[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var i=n.indexOf(t);return-1!=i&&n.splice(i,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var i=this._onceEvents&&this._onceEvents[e],s=0;s<n.length;s++){var o=n[s];i&&i[o]&&(this.off(e,o),delete i[o]),o.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e},e.exports?e.exports=n():t.EvEmitter=n()}(h={exports:{}},h.exports),h.exports),c={},u={button:{"aria-controls":function(){return this.id+"-content"},"aria-expanded":function(){return this.expanded?"true":"false"},"aria-disabled":function(){return this.disabled?"true":"false"}},content:{role:function(){return"region"},"aria-labelledby":function(){return this.id+"-header"}}},f=40,p=38,v=33,b=34,g=35,y=36,_=function(){function t(n,i,s){e(this,t),i.handorgelFold||(this.handorgel=n,this.header=i,this.button=i.firstElementChild,this.content=s,this.header.handorgelFold=this,this.content.handorgelFold=this,c[this.handorgel.id]||(c[this.handorgel.id]=0),this.id="".concat(this.handorgel.id,"-fold").concat(++c[this.handorgel.id]),this.header.setAttribute("id",this.id+"-header"),this.content.setAttribute("id",this.id+"-content"),this.focused=!1,this.expanded=!1,this.disabled=!1,this._listeners={},this._bindEvents(),this._initAria(),this._initialOpen(),this._initialFocus())}return n(t,[{key:"open",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.expanded)if(this.handorgel.emitEvent("fold:open",[this]),this.expanded=!0,this.handorgel.options.collapsible||this.disable(),this._updateAria("button","aria-expanded"),this.header.classList.add(this.handorgel.options.headerOpenClass),this.content.classList.add(this.handorgel.options.contentOpenClass),e){var t=this.content.firstElementChild.offsetHeight;this.content.style.height="".concat(t,"px")}else this._opened()}},{key:"close",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.expanded)if(this.handorgel.emitEvent("fold:close",[this]),this.expanded=!1,this.handorgel.options.collapsible||this.enable(),this._updateAria("button","aria-expanded"),this.header.classList.remove(this.handorgel.options.headerOpenedClass),this.content.classList.remove(this.handorgel.options.contentOpenedClass),t){var n=this.content.firstElementChild.offsetHeight;this.content.style.height="".concat(n,"px"),window.requestAnimationFrame(function(){window.requestAnimationFrame(function(){e.content.style.height="0px"})})}else this._closed()}},{key:"disable",value:function(){this.disabled=!0,this._updateAria("button","aria-disabled"),this.header.classList.add(this.handorgel.options.headerDisabledClass),this.content.classList.add(this.handorgel.options.contentDisabledClass)}},{key:"enable",value:function(){this.disabled=!1,this._updateAria("button","aria-disabled"),this.header.classList.remove(this.handorgel.options.headerDisabledClass),this.content.classList.remove(this.handorgel.options.contentDisabledClass)}},{key:"focus",value:function(){this.button.focus()}},{key:"blur",value:function(){this.button.blur()}},{key:"toggle",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.expanded?this.close(e):this.open(e)}},{key:"destroy",value:function(){this._unbindEvents(),this._cleanAria(),this.header.classList.remove(this.handorgel.options.headerOpenClass),this.header.classList.remove(this.handorgel.options.headerOpenedClass),this.header.classList.remove(this.handorgel.options.headerFocusClass),this.content.classList.remove(this.handorgel.options.contentOpenClass),this.content.classList.remove(this.handorgel.options.contentOpenedClass),this.content.classList.remove(this.handorgel.options.contentFocusClass),this.content.style.height="0px",this.header.handorgelFold=null,this.content.handorgelFold=null,this.header.removeAttribute("id"),this.content.removeAttribute("id"),this.handorgel=null}},{key:"_opened",value:function(){this.content.style.height="auto",this.header.classList.add(this.handorgel.options.headerOpenedClass),this.content.classList.add(this.handorgel.options.contentOpenedClass),this.handorgel.emitEvent("fold:opened",[this])}},{key:"_closed",value:function(){this.header.classList.remove(this.handorgel.options.headerOpenClass),this.content.classList.remove(this.handorgel.options.contentOpenClass),this.handorgel.emitEvent("fold:closed",[this])}},{key:"_initialOpen",value:function(){var e=this;null===this.header.getAttribute(this.handorgel.options.initialOpenAttribute)&&null===this.content.getAttribute(this.handorgel.options.initialOpenAttribute)||(this.handorgel.options.initialOpenTransition?window.setTimeout(function(){e.open()},this.handorgel.options.initialOpenTransitionDelay):this.open(!1))}},{key:"_initialFocus",value:function(){null!==this.button.getAttribute("autofocus")&&this._handleFocus()}},{key:"_initAria",value:function(){this._updateAria("button"),this._updateAria("content")}},{key:"_cleanAria",value:function(){this._updateAria("button",null,!0),this._updateAria("content",null,!0)}},{key:"_updateAria",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.handorgel.options.ariaEnabled)if(t){var i=u[e][t].call(this);this[e].setAttribute(t,i)}else for(var s in u[e])if(u[e].hasOwnProperty(s))if(n)this[e].removeAttribute(s);else{var o=u[e][s].call(this);this[e].setAttribute(s,o)}}},{key:"_handleContentTransitionEnd",value:function(e){e.target===e.currentTarget&&"height"===e.propertyName&&(this.expanded?this._opened():this._closed())}},{key:"_handleFocus",value:function(){this.focused=!0,this.header.classList.add(this.handorgel.options.headerFocusClass),this.content.classList.add(this.handorgel.options.contentFocusClass),this.handorgel.emitEvent("fold:focus",[this])}},{key:"_handleBlur",value:function(){this.focused=!1,this.header.classList.remove(this.handorgel.options.headerFocusClass),this.content.classList.remove(this.handorgel.options.contentFocusClass),this.handorgel.emitEvent("fold:blur",[this])}},{key:"_handleButtonClick",value:function(e){this.focus(),this.disabled||this.toggle()}},{key:"_handleButtonKeydown",value:function(e){if(this.handorgel.options.keyboardInteraction){var t=null;switch(e.which){case f:t="next";break;case p:t="prev";break;case y:t="first";break;case g:t="last";break;case b:e.ctrlKey&&(t="next");break;case v:e.ctrlKey&&(t="prev")}t&&(e.preventDefault(),this.handorgel.focus(t))}}},{key:"_handleContentKeydown",value:function(e){if(this.handorgel.options.keyboardInteraction&&e.ctrlKey){var t=null;switch(e.which){case b:t="next";break;case v:t="prev"}t&&(e.preventDefault(),this.handorgel.focus(t))}}},{key:"_bindEvents",value:function(){for(var e in this._listeners={bFocus:["focus",this.button,this._handleFocus.bind(this)],bBlur:["blur",this.button,this._handleBlur.bind(this)],bClick:["click",this.button,this._handleButtonClick.bind(this)],bKeydown:["keydown",this.button,this._handleButtonKeydown.bind(this)],cKeydown:["keydown",this.content,this._handleContentKeydown.bind(this)],cTransition:["transitionend",this.content,this._handleContentTransitionEnd.bind(this)]},this._listeners)if(this._listeners.hasOwnProperty(e)){var t=this._listeners[e];t[1].addEventListener(t[0],t[2])}}},{key:"_unbindEvents",value:function(){for(var e in this._listeners)if(this._listeners.hasOwnProperty(e)){var t=this._listeners[e];t[1].removeEventListener(t[0],t[2])}}}]),t}(),m=0,O=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(l,d);var i=r(l);function l(t){var n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,l),n=i.call(this),t.handorgel?a(n):(n.element=t,n.element.handorgel=o(n),n.id="handorgel".concat(++m),n.element.setAttribute("id",n.id),n.folds=[],n.options=Object.assign({},l.defaultOptions,s),n._listeners={},n._bindEvents(),n._initAria(),n.update(),n)}return n(l,[{key:"update",value:function(){this.folds=[];for(var e="string"==typeof this.options.headerElements?this.element.querySelectorAll(this.options.headerElements):this.options.headerElements,t="string"==typeof this.options.contentElements?this.element.querySelectorAll(this.options.contentElements):this.options.contentElements,n=0;n<e.length;n+=1){var i=e[n].handorgelFold;!i&&e[n]&&t[n]&&(i=new _(this,e[n],t[n])),i&&this.folds.push(i)}}},{key:"focus",value:function(e){for(var t=this.folds.length,n=null,i=0;i<t&&null===n;i++)this.folds[i].focused&&(n=i);if("prev"!==e&&"next"!==e||null!==n||(e="prev"===e?"last":"first"),"prev"===e&&0===n){if(!this.options.carouselFocus)return;e="last"}if("next"===e&&n===t-1){if(!this.options.carouselFocus)return;e="first"}switch(e){case"prev":this.folds[--n].focus();break;case"next":this.folds[++n].focus();break;case"last":this.folds[t-1].focus();break;case"first":default:this.folds[0].focus()}}},{key:"destroy",value:function(){this.emitEvent("destroy"),this.element.removeAttribute("id"),this.folds.forEach(function(e){e.destroy()}),this._unbindEvents(),this._cleanAria(),this.element.handorgel=null,this.emitEvent("destroyed")}},{key:"_handleFoldOpen",value:function(e){this.options.multiSelectable||this.folds.forEach(function(t){e!==t&&t.close()})}},{key:"_initAria",value:function(){this.options.ariaEnabled&&this.options.multiSelectable&&this.element.setAttribute("aria-multiselectable","true")}},{key:"_cleanAria",value:function(){this.element.removeAttribute("aria-multiselectable")}},{key:"_bindEvents",value:function(){this._listeners.foldOpen=this._handleFoldOpen.bind(this),this.on("fold:open",this._listeners.foldOpen)}},{key:"_unbindEvents",value:function(){this.off("fold:open",this._listeners.foldOpen)}}]),l}();return O.defaultOptions={keyboardInteraction:!0,multiSelectable:!0,ariaEnabled:!0,collapsible:!0,carouselFocus:!0,initialOpenAttribute:"data-open",initialOpenTransition:!0,initialOpenTransitionDelay:200,headerElements:".handorgel__header",contentElements:".handorgel__content",headerOpenClass:"handorgel__header--open",contentOpenClass:"handorgel__content--open",headerOpenedClass:"handorgel__header--opened",contentOpenedClass:"handorgel__content--opened",headerDisabledClass:"handorgel__header--disabled",contentDisabledClass:"handorgel__content--disabled",headerFocusClass:"handorgel__header--focus",contentFocusClass:"handorgel__content--focus"},O});

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.