PageSourceSearch

https://www.nebelung.de/theme/fc6be77f01289e2dacedb59fa252fa79/js/…web-cms-elements.offcanvas.plugin.bd12dc.js

js nebelung.de collected 2026-10-02 10:57:40 UTC 11,094 bytes, 8 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5437],{156:t=>{var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==s},s="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?o(Array.isArray(t)?[]:{},t,e):t}function r(t,e,s){return t.concat(e).map(function(t){return i(t,s)})}function n(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function a(t,e){try{return e in t}catch(t){return!1}}function o(t,s,l){(l=l||{}).arrayMerge=l.arrayMerge||r,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=i;var c,u,h=Array.isArray(s);return h!==Array.isArray(t)?i(s,l):h?l.arrayMerge(t,s,l):(u={},(c=l).isMergeableObject(t)&&n(t).forEach(function(e){u[e]=i(t[e],c)}),n(s).forEach(function(e){(!a(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(a(t,e)&&c.isMergeableObject(s[e])?u[e]=(function(t,e){if(!e.customMerge)return o;var s=e.customMerge(t);return"function"==typeof s?s:o})(e,c)(t[e],s[e],c):u[e]=i(s[e],c))}),u)}o.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,s){return o(t,s,e)},{})},t.exports=o},437:(t,e,s)=>{s.r(e),s.d(e,{default:()=>h});var i=s(308);let r="js-offcanvas-singleton";class n{constructor(){this.$emitter=new i.A}open(t,e,s,i,r,n,a){this._removeExistingOffCanvas();let o=this._createOffCanvas(s,n,a,i);this.setContent(t,r),this._openOffcanvas(o,e)}setContent(t,e){let s=this.getOffCanvas();s[0]&&(s[0].innerHTML=t,this._registerEvents(e),this._setAriaAttrs())}setAdditionalClassName(t){this.getOffCanvas()[0].classList.add(t)}getOffCanvas(){return document.querySelectorAll(`.${r}`)}close(t){let e=this.getOffCanvas();e.forEach(t=>{bootstrap.Offcanvas.getInstance(t).hide()}),setTimeout(()=>{this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:e})},t)}goBackInHistory(){window.history.back()}exists(){return this.getOffCanvas().length>0}_openOffcanvas(t,e){window.focusHandler.saveFocusState("offcanvas"),n.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof e&&e()}_registerEvents(t){let e=this.getOffCanvas();e.forEach(s=>{let i=()=>{setTimeout(()=>{s.remove(),window.focusHandler.resumeFocusState("offcanvas"),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:e})},t),s.removeEventListener("hide.bs.offcanvas",i)};s.addEventListener("hide.bs.offcanvas",i)}),window.addEventListener("popstate",this.close.bind(this,t),{once:!0}),document.querySelectorAll(".js-offcanvas-close").forEach(e=>e.addEventListener("click",this.close.bind(this,t)))}_setAriaAttrs(){let t=this.getOffCanvas()[0],e="off-canvas-headline",s=t.querySelector(`[data-id="${e}"]`);s&&!t.hasAttribute("aria-labelledby")&&(s.setAttribute("id",e),t.setAttribute("aria-labelledby",e))}_removeExistingOffCanvas(){return n.bsOffcanvas=null,this.getOffCanvas().forEach(t=>t.remove())}_getPositionClass(t){return"left"===t?"offcanvas-start":"right"===t?"offcanvas-end":`offcanvas-${t}`}_createOffCanvas(t,e,s,i){let a=document.createElement("div");if(a.classList.add("offcanvas",r),a.classList.add(this._getPositionClass(t)),a.setAttribute("tabindex","-1"),!0===e&&a.classList.add("is-fullwidth"),s){let t=typeof s;if("string"===t)a.classList.add(s);else if(Array.isArray(s))s.forEach(t=>{a.classList.add(t)});else throw Error(`The type "${t}" is not supported. Please pass an array or a string.`)}return document.body.appendChild(a),n.bsOffcanvas=new bootstrap.Offcanvas(a,{backdrop:!1!==i||"static"}),a}}let a=Object.freeze(new n);class o{static open(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",i=!(arguments.length>3)||void 0===arguments[3]||arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,n=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";a.open(t,e,s,i,r,n,o)}static setContent(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:350;a.setContent(t,e,s)}static setAdditionalClassName(t){a.setAdditionalClassName(t)}static close(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;a.close(t)}static exists(){return a.exists()}static getOffCanvas(){return a.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}var l=s(220),c=s(707);class u{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!u.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!1===u.hasAttribute(t,e))throw Error(`The required property "${e}" does not exist!`);
1if("function"!=typeof t.getAttribute){if(s)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=e.replace(/^data(|-)/,""),r=c.A.toLowerCamelCase(i,"-");if(!u.isNode(t)){if(s)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(s)throw Error("This node doesn't support the dataset attribute!");return}let n=t.dataset[r];if(void 0===n){if(s)throw Error(`The required data attribute "${e}" does not exist on ${t}!`);return n}return c.A.parsePrimitive(n)}static querySelector(t,e){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!u.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelector(e)||!1;if(s&&!1===i)throw Error(`The required element "${e}" does not exist in parent node!`);return i}static querySelectorAll(t,e){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!u.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelectorAll(e);if(0===i.length&&(i=!1),s&&!1===i)throw Error(`At least one item of "${e}" must exist in parent node!`);return i}static getFocusableElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,e=`
2            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),
3            select:not([tabindex^="-"]):not([disabled]),
4            textarea:not([tabindex^="-"]):not([disabled]),
5            button:not([tabindex^="-"]):not([disabled]),
6            a[href]:not([tabindex^="-"]):not([disabled]),
7            [tabindex]:not([tabindex^="-"]):not([disabled])
8        `;return t.querySelectorAll(e)}static getFirstFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(t)[0]}static getLastFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=this.getFocusableElements(t);return e[e.length-1]}}class h extends l.A{init(){this._registerEventListeners()}_registerEventListeners(){this.el.addEventListener("click",this._onClickOffCanvas.bind(this))}_onClickOffCanvas(t){t.preventDefault();let e=this.el.getAttribute("data-rhweb-off-canvas");if(!e)throw Error('No "data-rhweb-off-canvas" attribute found on the trigger element.');let s=u.querySelector(document,`.${e}`,!1);if(!s)throw Error(`No DOM element found for the selector: .${e}`);o.open(s.innerHTML,()=>{},"end",!0,o.REMOVE_OFF_CANVAS_DELAY(),!1,"offcanvas-custom"),this.$emitter.publish("onClickRHWebOffCanvas")}}},308:(t,e,s)=>{s.d(e,{A:()=>i});class i{constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(t,{detail:e,cancelable:s});return this.el.dispatchEvent(i),i}subscribe(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,r=t.split("."),n=s.scope?e.bind(s.scope):e;if(s.once&&!0===s.once){let e=n;n=function(s){i.unsubscribe(t),e(s)}}return this.el.addEventListener(r[0],n),this.listeners.push({splitEventName:r,opts:s,cb:n}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,s)=>([...s.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(s.splitEventName[0],s.cb):t.push(s),t),[]),!0}reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}}},707:(t,e,s)=>{s.d(e,{A:()=>i});class i{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let s=i.toUpperCamelCase(t,e);return i.lcFirst(s)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>i.ucFirst(t.toLowerCase())).join(""):i.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}},220:(t,e,s)=>{s.d(e,{A:()=>
8o});var i=s(156),r=s.n(i),n=s(707),a=s(308);class o{constructor(t,e={},s=!1){if(!(t instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${s}".`);return}this.el=t,this.$emitter=new a.A(this.el),this._pluginName=this._getPluginName(s),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=[this.constructor.options,this.options,t];return e.push(this._getConfigFromDataAttribute()),e.push(this._getOptionsFromDataAttribute()),r().all(e.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_getConfigFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=n.A.toDashCase(this._pluginName),s=this.el.getAttribute(`data-${e}-config`);return s?window.PluginConfigManager.get(this._pluginName,s):t}_getOptionsFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=n.A.toDashCase(this._pluginName),s=this.el.getAttribute(`data-${e}-options`);if(s)try{return JSON.parse(s)}catch(t){console.error(`The data attribute "data-${e}-options" could not be parsed to json: ${t.message}`)}return t}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),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.