PageSourceSearch

https://www.bwp-zeitschrift.de/dienst/publikationen/build/JavaScript/63.js

js bwp-zeitschrift.de collected 2026-10-02 04:39:41 UTC 84,685 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[63],{38170:function(t,e){e.A={}},66648:function(t,e,n){n(52675),n(89463),n(2259),n(45700),n(28706),n(2008),n(50113),n(23418),n(74423),n(23792),n(34782),n(89572),n(62010),n(36033),n(2892),n(40875),n(10287),n(26099),n(3362),n(60825),n(27495),n(38781),n(21699),n(47764),n(73772),n(23500),n(62953);var r=n(98709);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=u(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function u(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function s(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var c=r&&r.prototype instanceof u?r:u,s=Object.create(c.prototype);return l(s,"_invoke",function(n,r,i){var o,u,c,s=0,l=i||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,u=0,c=t,p.n=n,a}};function h(n,r){for(u=n,c=r,e=0;!f&&s&&!i&&e<l.length;e++){var i,o=l[e],h=p.p,d=o[2];n>3?(i=d===r)&&(c=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<d&&(i=n<3||o[0]>r||r>d)&&(o[4]=n,o[5]=r,p.n=d,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,l,d){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,d),u=l,c=d;(e=u<2?t:c)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,c)):p.n=c:p.v=c);try{if(s=2,o){if(u||(i="next"),e=o[i]){if(!(e=e.call(o,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=o.return)&&e.call(o),u<2&&(c=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(e){o=t,u=1,c=e}finally{s=1}}return{value:e,done:f}}}(n,i,o),!0),s}var a={};function u(){}function c(){}function f(){}e=Object.getPrototypeOf;var p=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),h=f.prototype=u.prototype=Object.create(p);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,l(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=f,l(h,"constructor",f),l(f,"constructor",c),c.displayName="GeneratorFunction",l(f,i,"GeneratorFunction"),l(h),l(h,i,"Generator"),l(h,r,function(){return this}),l(h,"toString",function(){return"[object Generator]"}),(s=function(){return{w:o,m:d}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function p(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}
1(t,"string");return"symbol"==i(e)?e:e+""}function h(t,e,n){return e=b(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,y()?Reflect.construct(e,n||[],b(t).constructor):e.apply(t,n))}function d(t){var e="function"==typeof Map?new Map:void 0;return d=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(y())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&v(i,n.prototype),i}(t,arguments,b(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),v(n,t)},d(t)}function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(y=function(){return!!t})()}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}var m=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,u)}c((r=r.apply(t,e||[])).next())})},_=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=h(this,e))._optionNodes=new WeakMap,t._listener=[],t._initTemplates(),t._initInputParameters(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(e,t),n=e,u=[{key:"_errorOnMissingParameter",value:function(t){console.error("attribute ".concat(t," is required"))}}],(i=[{key:"optionsVisible",get:function(){return!!this._optionsListNode&&"none"!==this._optionsListNode.style.display},set:function(t){this._optionsListNode&&(this._optionsListNode.style.display=t?"":"none")}},{key:"_searchValue",get:function(){var t;return null===(t=this._inputElement)||void 0===t?void 0:t.value}},{key:"selectedValue",set:function(t){var e=this._selectedValue;e!==t&&(this._selectedValue=t,this._hasChanged("selectedValue",e,t))}},{key:"apiSrc",get:function(){return this._apiSrc},set:function(t){var e=this._apiSrc;e!==t&&(this._apiSrc=t,this._hasChanged("apiSrc",e,t))}},{key:"attributeChangedCallback",value:function(t,n,r){if(n!==r){var i=e.inputParams.find(function(e){return e.attribute===t});i&&(this[i.property]=i.type(r))}}},{key:"connectedCallback",value:function(){return m(this,void 0,void 0,s().m(function t(){var e=this;return s().w(function(t){for(;;)switch(t.n){case 0:null!==this._inputTemplate&&(this._inputElement=this._inputTemplate.cloneNode(!0),null!==this._inputElement&&(this.append(this._inputElement),this._inputElement.addEventListener("input",this._onInputChanged.bind(this)),this._inputElement.addEventListener("keyup",this._onInputKeyUp.bind(this)),this._inputElement.addEventListener("focus",this._onFocus.bind(this)),this._registerEventListener(document.body,"click",function(t){return e._onClickDocument(t.target)}),this._registerEventListener(document.body,"contextmenu",function(t){return e._onClickDocument(t.target)})));case 1:return t.a(2)}},t,this)}))}},{key:"disconnectedCallback",value:function(){this._listener.filter(function(t){return t.node===document.body}
1).forEach(function(t){return t.node.removeEventListener(t.type,t.fn)})}},{key:"clearInput",value:function(){this._inputElement.value=""}},{key:"_onInputChanged",value:function(){var t=this;!/^\d+/.test(this._inputElement.value)&&3>this._inputElement.value.length||(this._inputTimer&&clearTimeout(this._inputTimer),this._inputTimer=window.setTimeout(function(){return m(t,void 0,void 0,s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:return this._options=null,t.n=1,this._buildOptionList();case 1:return t.a(2)}},t,this)}))},450))}},{key:"_onFocus",value:function(){this._optionsListNode&&Boolean(this._inputElement.value)&&0<this._optionsListNode.childNodes.length&&(this.optionsVisible=!0)}},{key:"_onInputKeyUp",value:function(t){"Enter"===t.key&&Boolean(this._selectedValue)&&this.dispatchEvent(new CustomEvent("bibb.api-autocomplete.enter",{detail:this._selectedValue}))}},{key:"_initInputParameters",value:function(){var t,n=a(e.inputParams);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.required&&!this.hasAttribute(r.attribute)&&e._errorOnMissingParameter(r.attribute),this[r.property]=r.type(this.getAttribute(r.attribute))}}catch(t){n.e(t)}finally{n.f()}}},{key:"_initTemplates",value:function(){this.children.namedItem("input")||console.error(new Error("template for input is missing")),this._inputTemplate=this.children.namedItem("input").content.firstElementChild,this.children.namedItem("option")||console.error(new Error("template for option is missing")),this._optionTemplate=this.children.namedItem("option").content.firstElementChild,this.innerHTML=""}},{key:"_fetchOptions",value:function(t){return m(this,void 0,void 0,s().m(function e(){var n;return s().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,fetch("".concat(this.apiSrc).concat(this.apiSrc.includes("?")?"&":"?","q=").concat(t),{method:"GET",mode:"same-origin",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer"});case 1:if(n=e.v,2==Math.floor(n.status)/100){e.n=2;break}return console.error(new Error("API Response was ".concat(n.status,". Some error occurred."))),e.a(2);case 2:return e.a(2,n.json())}},e,this)}))}},{key:"_buildOptionList",value:function(){return m(this,void 0,void 0,s().m(function t(){var e,n,i,u,c,l,f,p,h;return s().w(function(t){for(;;)switch(t.n){case 0:return this._optionsListNode||(this._optionsListNode=document.createElement("ul"),this._optionsListNode.classList.add("bibb-api-autocomplete__option-list")),this._optionsListNode.innerHTML="",t.n=1,this._getOptions();case 1:e=t.v,n=a(e);try{for(n.s();!(i=n.n()).done;)u=i.value,(c=document.createElement("li")).classList.add("bibb-api-autocomplete__option-list_item"),u.id===this._selectedValue&&c.classList.add("bibb-selected"),this._registerEventListener(c,"click",this._onItemSelected.bind(this,u)),l=r.F.replacePlaceholders(this._optionTemplate,u),c.append.apply(c,o(l)),this._optionNodes.set(u,c),this._optionsListNode.append(c)}catch(t){n.e(t)}finally{n.f()}this.optionsVisible=!0,0===e.length&&((f=document.createElement("li")).classList.add("bibb-api-autocomplete__option-list_item"),p={id:"",text:"Keine Treffer gefunden."},h=r.F.replacePlaceholders(this._optionTemplate,p),f.append.apply(f,o(h)),this._optionNodes.set(p,f),this._optionsListNode.append(f)),this._inputElement.after(this._optionsListNode);case 2:return t.a(2)}},t,this)}))}},{key:"_onItemSelected",value:function(t){this._inputElement.value=t.text,this.selectedValue=t.id,this.optionsVisible=!1,this._inputElement.focus()}},{key:"_hasChanged",value:function(t,e,n){"selectedValue"===t&&(this.dispatchEvent(new CustomEvent("bibb.api-autocomplete.select",{detail:n})),this._flagOptionNodeAsSelected(e,n).then()),this._setParameter(t)}},{key:"_setParameter",value:function(t){var n=e.inputParams.find(function(e){return e.property===t});if(n){var r=this[n.property];this.hasAttribute(n.attribute)&&this.getAttribute(n.attribute)===r||this.setAttribute(n.attribute,r)}}},{key:"_flagOptionNodeAsSelected",value:function(t,e){return m(this,void 0,void 0,s().m(function n(){var r,i;return s().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,this._getOptions();case 1:return r=n.v.find(function(e){return e.id===t}),n.n=2,this._getOptions();case 2:if(i=n.v.find(function(t){return t.id===e}),r&&i){n.n=3;break}return n.a(2);case 3:if(this._optionNodes.has(r)&&this._optionNodes.has(i)){n.n=4;break}return n.a(2);case 4:this._optionNodes.get(r).classList.remove("bibb-selected"),this._optionNodes.get(i).classList.add("bibb-selected");case 5:return n.a(2)}},n,this)}))}},{key:"_getOptions",value:function(){return m(this,void 0,void 0,s().m(function t(){var e,n,r,i;return s().w(function(t){for(;;)switch(t.n){case 0:if(!this._options){t.n=1;break}return t.a(2,this._options);case 1:if(this._searchValue){t.n=2;break}return t.a(2,[]);case 2:return t.n=3,this._fetchOptions(this._searchValue);case 3:if(r=e=t.v,n=null===r){t.n=4;break}n=void 0===e;case 4:if(!n){t.n=5;break}i=void 0,t.n=6;break;case 5:i=e.results;case 6:return this._options=i,t.a(2,this._options)}},t,this)}))}},{key:"_onClickDocument",value:function(t){![this._optionsListNode,this._inputElement].includes(t)&&this.optionsVisible&&(this.optionsVisible=!1)}},{key:"_registerEventListener",value:function(t,e,n){t.addEventListener(e,n),this._listener.push({node:t,type:e,fn:n})}}
vendor: 5,598 bytes, line 1
1])&&f(n.prototype,i),u&&f(n,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i,u}(d(HTMLElement));_.inputParams=[{property:"apiSrc",attribute:"api-src",type:String,required:!0},{property:"selectedValue",attribute:"selected-value",type:String,required:!1}];n(48598),n(60739),n(5506),n(25440),n(42762),n(11392);function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function w(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return S(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function k(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var c=r&&r.prototype instanceof u?r:u,s=Object.create(c.prototype);return O(s,"_invoke",function(n,r,i){var o,u,c,s=0,l=i||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,u=0,c=t,p.n=n,a}};function h(n,r){for(u=n,c=r,e=0;!f&&s&&!i&&e<l.length;e++){var i,o=l[e],h=p.p,d=o[2];n>3?(i=d===r)&&(c=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<d&&(i=n<3||o[0]>r||r>d)&&(o[4]=n,o[5]=r,p.n=d,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,l,d){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,d),u=l,c=d;(e=u<2?t:c)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,c)):p.n=c:p.v=c);try{if(s=2,o){if(u||(i="next"),e=o[i]){if(!(e=e.call(o,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=o.return)&&e.call(o),u<2&&(c=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(e){o=t,u=1,c=e}finally{s=1}}return{value:e,done:f}}}(n,i,o),!0),s}var a={};function u(){}function c(){}function s(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(O(e={},r,function(){return this}),e),f=s.prototype=u.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,O(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=s,O(f,"constructor",s),O(s,"constructor",c),c.displayName="GeneratorFunction",O(s,i,"GeneratorFunction"),O(f),O(f,i,"Generator"),O(f,r,function(){return this}),O(f,"toString",function(){return"[object Generator]"}),(k=function(){return{w:o,m:p}})()}function O(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}O=function(t,e,n,r){function o(e,n){O(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},O(t,e,n,r)}function E(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,L(r.key),r)}}function L(t){var e=function(t,e){if("object"!=g(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==g(e)?e:e+""}function j(t,e,n){return e=T(e),function(t,e){if(e&&("object"==g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,C()?Reflect.construct(e,n||[],T(t).constructor):e.apply(t,n))}function P(t){var e="function"==typeof Map?new Map:void 0;return P=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(C())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&A(i,n.prototype),i}(t,arguments,T(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),A(n,t)},P(t)}function C(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(C=function(){return!!t})()}function A(t,e){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},A(t,e)}function T(t){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},T(t)}
1var I,M=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,u)}c((r=r.apply(t,e||[])).next())})},N=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=j(this,e))._voeMode=!1,t._label="unknown label",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&A(t,e)}(e,t),n=e,o=[{key:"_errorOnMissingParameter",value:function(t){console.error("attribute ".concat(t," is required"))}}],(i=[{key:"connectedCallback",value:function(){this._initInputParameters()}},{key:"value",set:function(t){var e=this;if(t){t!=this._value&&(t.startsWith("_")?(this._label="loading label...",this._queryBackendForLabel(t).then(function(t){e._label=t,e._render()})):this._label=t);var n=this._value;this._value=t,this._hasChanged("selectedValue",n,t)}}},{key:"_queryBackendForLabel",value:function(t){return M(this,void 0,void 0,k().m(function e(){var n,r,i,o,a;return k().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,fetch("".concat(this.apiSrc,"?value=").concat(encodeURIComponent(t)),{mode:"same-origin",method:"GET",redirect:"follow"});case 1:if(2==~~((r=e.v).status/100)){e.n=2;break}return e.a(2,t);case 2:return e.n=3,r.json();case 3:if(o=n=e.v.label,!(i=null!==o)){e.n=4;break}i=void 0!==n;case 4:if(!i){e.n=5;break}a=n,e.n=6;break;case 5:a=t;case 6:return e.a(2,a)}},e,this)}))}},{key:"closeBtn",get:function(){var t=this;return this._closeBtn||(this._voeMode?this._closeBtn=r.F.createNode({tag:"button",attr:[["class","selected__close btn btn-primary btn-icon"],["type","button"]],children:[e.closeButtonIconTemplate.content.firstElementChild.cloneNode(!0)],events:[{name:"click",fn:function(){return t.dispatchEvent(new CustomEvent("bibb.pill.remove",{bubbles:!0,cancelable:!0,detail:t._value}))}}]}):this._closeBtn=r.F.createNode({tag:"i",attr:[["class","bibb-pill-remove fi flaticon-cancel"],["tabIndex","0"]],events:[{name:"click",fn:function(){return t.dispatchEvent(new CustomEvent("bibb.pill.remove",{bubbles:!0,cancelable:!0,detail:t._value}))}},{name:"keyup",fn:function(e){"Enter"!==e.key||t.dispatchEvent(new CustomEvent("bibb.pill.remove",{bubbles:!0,cancelable:!0,detail:t._value}))}}]})),this._closeBtn}},{key:"voeMode",get:function(){return this._voeMode},set:function(t){var e=this._voeMode;e!=t&&(this._voeMode=t,this._hasChanged("voeMode",e,t))}},{key:"_initInputParameters",value:function(){var t,n=w(e.inputParams);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.required&&!this.hasAttribute(r.attribute)&&e._errorOnMissingParameter(r.attribute),this[r.property]=r.type(this.getAttribute(r.attribute))}}catch(t){n.e(t)}finally{n.f()}this._render()}},{key:"_hasChanged",value:function(t,e,n){e!==n&&this._setParameter(t)}},{key:"_setParameter",value:function(t){var n=e.inputParams.find(function(e){return e.property===t});if(n){var r=this[n.property];this.hasAttribute(n.attribute)&&this.getAttribute(n.attribute)===r||this.setAttribute(n.attribute,r)}}},{key:"_render",value:function(){this.classList.add(this._voeMode?"selected__wrapper":"bibb-pill"),this.innerHTML=this._voeMode?'<span class="selected__label">'.concat(this._label,"</span>"):'<span class="bibb-pill-label">'.concat(this._label,"</span>"),this.appendChild(this.closeBtn)}},{key:"apiSrc",get:function(){return this._apiSrc},set:function(t){var e=this._apiSrc;e!==t&&(this._apiSrc=t,this._hasChanged("apiSrc",e,t))}}])&&E(n.prototype,i),o&&E(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i,o}(P(HTMLElement));N.inputParams=[{property:"apiSrc",attribute:"api-src",type:String,required:!0},{property:"value",attribute:"value",type:String,required:!0},{property:"voeMode",attribute:"voe-mode",type:Boolean,required:!1}],N.closeButtonIconTemplate=((I=document.createElement("template")).innerHTML='<svg aria-labelledby="closeBtn" xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 17 17">\n                <title id="closeBtn">Entfernen</title>\n                <path fill-rule="evenodd" d="M16.6892426,0.311014057 C16.2748994,-0.103671352 15.6099753,-0.103671352 15.195241,0.311014057 L8.49995112,7.00551465 L1.8051501,0.311014057 C1.39031804,-0.103671352 0.725491718,-0.103671352 0.311050725,0.311014057 C-0.103683575,0.725406195 -0.103683575,1.39015414 0.311050725,1.80493731 L7.00634058,8.49894911 L0.311050725,15.1934497 C-0.103683575,15.6081351 -0.103683575,16.2729808 0.311050725,16.6872752 C0.514213826,16.8908054 0.788063607,17 1.05428744,17 C1.3201202,17 1.59387221,16.8984304 1.79713308,16.6872752 L8.49232517,9.99287236 L15.187615,16.6872752 C15.3907781,16.8908054 15.6646279,17 15.9303629,17 C16.2042127,17 16.4704365,16.8984304 16.6735996,16.6872752 C17.0883339,16.2729808 17.0883339,15.6081351 16.6735996,15.1934497 L9.99405049,8.49894911 L16.6892426,1.80493731 C17.1035858,1.39015414 17.1035858,0.725406195 16.6892426,0.311014057"></path>\n            </svg>',I);n(31415);function B(t){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(t)}function F(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return x(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function R(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,q(r.key),r)}}function q(t){var e=function(t,e){if("object"!=B(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=B(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}
1(t,"string");return"symbol"==B(e)?e:e+""}var V=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return e=t,r=[{key:"debounce",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,r=0;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(r),r=window.setTimeout(function(){t.apply(e,o)},n)}}},{key:"debounceAsync",value:function(e,n){var r=new Set,i=new Set,o=t.debounce(function(t){e.apply(void 0,F(t)).then(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];r.forEach(function(t){return t.apply(void 0,e)}),r.clear()}).catch(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];i.forEach(function(t){return t.apply(void 0,e)}),i.clear()})},n);return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new Promise(function(t,n){r.add(t),i.add(n),o(e)})}}}],(n=null)&&R(e.prototype,n),r&&R(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r}();function D(t){return function(t){if(Array.isArray(t))return K(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||$(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=!0,s=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){s=!0,i=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return u}}(t,e)||$(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(t){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H(t)}function U(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=$(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function $(t,e){if(t){if("string"==typeof t)return K(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(t,e):void 0}}function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function z(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var c=r&&r.prototype instanceof u?r:u,s=Object.create(c.prototype);return J(s,"_invoke",function(n,r,i){var o,u,c,s=0,l=i||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,u=0,c=t,p.n=n,a}};function h(n,r){for(u=n,c=r,e=0;!f&&s&&!i&&e<l.length;e++){var i,o=l[e],h=p.p,d=o[2];n>3?(i=d===r)&&(c=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<d&&(i=n<3||o[0]>r||r>d)&&(o[4]=n,o[5]=r,p.n=d,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,l,d){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,d),u=l,c=d;(e=u<2?t:c)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,c)):p.n=c:p.v=c);try{if(s=2,o){if(u||(i="next"),e=o[i]){if(!(e=e.call(o,c)))throw TypeError("iterator result is not an object");
1if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=o.return)&&e.call(o),u<2&&(c=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(e){o=t,u=1,c=e}finally{s=1}}return{value:e,done:f}}}(n,i,o),!0),s}var a={};function u(){}function c(){}function s(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(J(e={},r,function(){return this}),e),f=s.prototype=u.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,J(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=s,J(f,"constructor",s),J(s,"constructor",c),c.displayName="GeneratorFunction",J(s,i,"GeneratorFunction"),J(f),J(f,i,"Generator"),J(f,r,function(){return this}),J(f,"toString",function(){return"[object Generator]"}),(z=function(){return{w:o,m:p}})()}function J(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}J=function(t,e,n,r){function o(e,n){J(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},J(t,e,n,r)}function W(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Q(r.key),r)}}function Q(t){var e=function(t,e){if("object"!=H(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=H(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==H(e)?e:e+""}function X(t,e,n){return e=et(e),function(t,e){if(e&&("object"==H(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Z()?Reflect.construct(e,n||[],et(t).constructor):e.apply(t,n))}function Y(t){var e="function"==typeof Map?new Map:void 0;return Y=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(Z())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&tt(i,n.prototype),i}(t,arguments,et(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),tt(n,t)},Y(t)}function Z(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Z=function(){return!!t})()}function tt(t,e){return tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tt(t,e)}function et(t){return et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},et(t)}var nt=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,u)}c((r=r.apply(t,e||[])).next())})},rt=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=X(this,e))._values=[],t._abortController=new AbortController,t._queryRunning=!1,t._optionsValueMap=new Map,t._hoveredOption=null,t._preSelectedOption=null,t._hiddenFormInput=null,t._pills=new Map,t._mousePositionAtDataList=!1,t._searchButton=null,t._searchContainer=null,t._voeMode=!1,r.F.isCustomElementDefined("bibb-pill")||customElements.define("bibb-pill",N),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tt(t,e)}(e,t),n=e,o=[{key:"_errorOnMissingParameter",value:function(t){console.error("attribute ".concat(t," is required"))}}],(i=[{key:"preSelectedOption",set:function(t){if(this._preSelectedOption&&this._preSelectedOption.classList.remove("preselected"),this._preSelectedOption=t,this._preSelectedOption&&this._preSelectedOption.classList.add("preselected"),this._preSelectedOption){var e=this._preSelectedOption.getBoundingClientRect(),n=this.dataListElement.getBoundingClientRect(),r=this.dataListElement.scrollTop,i=Math.round(e.top-n.top);if(i>=n.height||0>i){var o=i-n.height-r,a=0<o?r+o:r+i;this.dataListElement.scrollTo(0,a)}}}},{key:"hoveredOption",set:function(t){this._hoveredOption&&this._hoveredOption.classList.remove("hover"),this._hoveredOption=t,this._hoveredOption&&this._hoveredOption.classList.add("hover")}},{key:"hiddenFormInput",get:function(){return this._hiddenFormInput||(this._hiddenFormInput=r.F.createNode({tag:"input",attr:[["type","hidden"],["id","search_result_freeTextSearch"],["name",this.name],["value",this._values.join(" ")]]})),this._hiddenFormInput}},{key:"inputElement",get:function(){var t=this;if(!this._inputElement){var e=[["id","app_search_search_term"],["class","bibb-api-suggestion__input search__input c-form__input c-form__input-text"],["placeholder",this._placeholder],["autocomplete","off"]];this._additionalStyle&&e.push(["style",this._additionalStyle]),this._inputElement=r.F.createNode({tag:"input",attr:e,events:[{name:"focus",fn:function(){t.classList.contains("focused")||t.classList.add("focused"),t.dataListElement.classList.contains("hidden")&&t.dataListElement.classList.remove("hidden"),t.dataListElement.classList.contains("d-none")&&t.dataListElement.classList.remove("d-none")}},{name:"blur",fn:function(){t.classList.contains("focused")&&t.classList.remove("focused"),t._voeMode?t._mousePositionAtDataList||t.dataListElement.classList.contains("d-none")||(t.dataListElement.classList.add("d-none"),t.preSelectedOption=null):t._mousePositionAtDataList||t.dataListElement.classList.contains("hidden")||(t.dataListElement.classList.add("hidden"),t.preSelectedOption=null)}},{name:"keydown",fn:function(e){if("Enter"===e.key)return 1>t.inputElement.value.length||(e.preventDefault(),e.stopPropagation(),!1)}},{name:"keyup",fn:function(e){return nt(t,void 0,void 0,z().m(function t(){var n=this;return z().w(function(t){for(;;)switch(t.n){case 0:if("Enter"!==e.key){t.n=2;break}if(!(1>this.inputElement.value.length)){t.n=1;break}return t.a(2,!0);case 1:return e.preventDefault(),e.stopPropagation(),this._preSelectedOption?(this._addValue(this._optionsValueMap.get(this._preSelectedOption)),this._hoveredOption=null):this._addValue(this.inputElement.value),this.inputElement.value="",this._resetDataList(),this._focusInput(),t.a(2,!1);case 2:if("Escape"!==e.key){t.n=3;break}return this._resetDataList(),t.a(2);
1case 3:if(!["ArrowDown","ArrowUp"].includes(e.key)){t.n=4;break}return this._preSelectNextOption(e.key),t.a(2);case 4:if(!(3>this.inputElement.value.length)){t.n=5;break}return this.dataListElement.classList.add(this._voeMode?"d-none":"hidden"),t.a(2);case 5:return this._asyncFn||(this._asyncFn=V.debounceAsync(function(t){return nt(n,void 0,void 0,z().m(function e(){return z().w(function(e){for(;;)if(0===e.n)return this._asyncFn=null,e.a(2,this._buildDataList(t))},e,this)}))},250)),t.n=6,this._asyncFn(this.inputElement.value);case 6:return t.a(2)}},t,this)}))}}]})}return this._inputElement}},{key:"dataListElement",get:function(){var t=this;return this._dataListElement||(this._dataListElement=r.F.createNode({tag:this._voeMode?"ul":"datalist",attr:[["id","suggestions"],["class",this._voeMode?"search__autocomplete d-none":"bibb-api-suggestion__datalist hidden"]],events:[{name:"click",fn:this._onChooseOption.bind(this)},{name:"mouseenter",fn:function(){return t._mousePositionAtDataList=!0}},{name:"mouseleave",fn:function(){t.hoveredOption=null,t._mousePositionAtDataList=!1}}]})),this._dataListElement}},{key:"connectedCallback",value:function(){this._initInputParameters(),this.classList.add(this._voeMode?"search__container--left":"bibb-api-suggestion"),this._searchButton.addEventListener("click",this._onClickSearchButton.bind(this))}},{key:"apiSrc",get:function(){return this._apiSrc},set:function(t){var e=this._apiSrc;e!==t&&(this._apiSrc=t,this._hasChanged("apiSrc",e,t))}},{key:"values",get:function(){return this._values.join(" ").trim()},set:function(t){if("string"==typeof t){var e=document.createElement("div");e.appendChild(document.createTextNode(t)),t=e.innerHTML;var n=this._values,r=this._values=t.split(" ").filter(function(t){return Boolean(t)});0!==n.join("|").localeCompare(r.join("|"))&&this._hasChanged("values",n,r)}}},{key:"name",get:function(){return this._name},set:function(t){var e=this._name;e!==t&&(this._name=t,this._hasChanged("name",e,t))}},{key:"additionalStyle",get:function(){return this._name},set:function(t){var e=this._additionalStyle;e!==t&&(this._additionalStyle=t,this._hasChanged("additionalStyle",e,t))}},{key:"searchButtonId",get:function(){return this._searchButtonId},set:function(t){var e=this._searchButtonId;e!==t&&(this._searchButtonId=t,this._hasChanged("searchButtonId",e,t))}},{key:"searchContainerId",get:function(){return this._searchContainerId},set:function(t){var e=this._searchContainerId;e!=t&&(this._searchContainerId=t,this._hasChanged("searchContainerId",e,t))}},{key:"voeMode",get:function(){return this._voeMode},set:function(t){this._voeMode!=t&&(this._voeMode=t)}},{key:"placeholder",get:function(){return this._placeholder},set:function(t){var e=this._placeholder;e!==t&&(this._placeholder=t,0<this._pills.size&&(t=""),this._hasChanged("placeholder",e,t))}},{key:"clearPlaceholder",value:function(){this._hasChanged("placeholder",this._placeholder,"")}},{key:"setPlaceholder",value:function(){this._hasChanged("placeholder",this._placeholder,this._placeholder)}},{key:"_initInputParameters",value:function(){var t,n=U(e.inputParams);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.required&&!this.hasAttribute(r.attribute)&&e._errorOnMissingParameter(r.attribute),this[r.property]=r.type(this.getAttribute(r.attribute))}}catch(t){n.e(t)}finally{n.f()}}},{key:"_hasChanged",value:function(t,e,n){switch(t){case"values":this.hiddenFormInput.value=this._values.join(" "),this.dispatchEvent(new CustomEvent("bibb.api.suggestion",{detail:n})),this.setSearchButtonState(0<this._values.length);break;case"name":this.hiddenFormInput.name=this.name;break;case"placeholder":this.inputElement.placeholder=n;break;case"additionalStyle":this.inputElement.style.cssText+=" ".concat(n);break;case"searchButtonId":this._searchButton=document.getElementById(this._searchButtonId);break;case"searchContainerId":this._searchContainer=document.getElementById(this._searchContainerId)}this._setParameter(t),this._render()}},{key:"_setParameter",value:function(t){var n=e.inputParams.find(function(e){return e.property===t});if(n){var r=this[n.property];this.hasAttribute(n.attribute)&&this.getAttribute(n.attribute)===r||((Array.isArray(r)||"object"===H(r))&&(r=JSON.stringify(r)),this.setAttribute(n.attribute,null!=r?r:""))}}},{key:"_render",value:function(){this.innerHTML="";var t,e=U(this._values);try{for(e.s();!(t=e.n()).done;){var n=t.value,i=r.F.createNode({tag:"bibb-pill",attr:[["value",n.toString()],["api-src",this.apiSrc.replace("suggest","pill")],["voe-mode",this._voeMode?"1":""]],events:[{name:"bibb.pill.remove",fn:this._onClickPillRemove.bind(this)}]});this._pills.set(n,i),this.appendChild(i)}}catch(t){e.e(t)}finally{e.f()}this.appendChild(this.inputElement),this._voeMode?this._searchContainer.appendChild(this.dataListElement):this.appendChild(this.dataListElement),this.appendChild(this.hiddenFormInput)}},{key:"_buildDataList",value:function(t){return nt(this,void 0,void 0,z().m(function e(){var n,r,i,o,a,u,c,s,l,f,p;return z().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._queryBackendForSuggestions(t);case 1:n=e.v,this._resetDataList(),1>Object.entries(n).length?this.dataListElement.classList.add(this._voeMode?"d-none":"hidden"):this.dataListElement.classList.remove(this._voeMode?"d-none":"hidden"),r=0,i=Object.entries(n);case 2:if(!(r<i.length)){e.n=7;break}if(o=G(i[r],2),a=o[0],u=o[1],!this._values.includes(a)){e.n=3;break}return e.a(3,6);case 3:p=u.type,e.n="isbn"===p?4:5;break;case 4:c=U(u.titles);try{for(c.s();!(s=c.n()).done;)l=s.value,this._appendOptionToDataList(a,"".concat(l," (").concat(a,")"),t)}catch(t){c.e(t)}
1finally{c.f()}return e.a(3,6);case 5:return f=a,u.hasOwnProperty("label")&&(f=u.label),this._appendOptionToDataList(a,f,t),e.a(3,6);case 6:r++,e.n=2;break;case 7:return e.a(2)}},e,this)}))}},{key:"_queryBackendForSuggestions",value:function(t){return nt(this,void 0,void 0,z().m(function e(){var n,r,i,o,a;return z().w(function(e){for(;;)switch(e.n){case 0:return this._queryRunning&&(this._abortController.abort(),this._queryRunning=!1),this._queryRunning=!0,e.n=1,fetch("".concat(this.apiSrc,"?searchKey=").concat(encodeURIComponent(t)),{signal:this._abortController.signal,mode:"same-origin",method:"GET",redirect:"follow"});case 1:if(r=e.v,this._queryRunning=!1,2==~~(r.status/100)){e.n=2;break}return e.a(2,{});case 2:return e.n=3,r.json();case 3:if(o=n=e.v.results,!(i=null!==o)){e.n=4;break}i=void 0!==n;case 4:if(!i){e.n=5;break}a=n,e.n=6;break;case 5:a={};case 6:return e.a(2,a)}},e,this)}))}},{key:"_appendOptionToDataList",value:function(t,e,n){var i=this,o=[["value",t],["class",this._voeMode?"voe-suggestion-option":"bibb-api-suggestion__option"]],a=r.F.createNode({tag:this._voeMode?"li":"div",attr:o,children:this._buildOptionLabel(e,n),events:[{name:"mouseenter",fn:function(t){return i.hoveredOption=t.currentTarget}}]});this._optionsValueMap.set(a,t),this.dataListElement.appendChild(a)}},{key:"_buildOptionLabel",value:function(t,e){var n=t.indexOf(e),i=t.substring(0,n),o=t.substring(n,n+e.length),a=t.substring(n+e.length);if(this._voeMode){var u=document.createElement("button");return u.setAttribute("data-value",e),u.setAttribute("type","button"),u.innerHTML=[i,"<strong>".concat(o,"</strong>"),a].filter(function(t){return Boolean(t)}).join(""),[u]}return[i,r.F.createNode({tag:"span",attr:[["class","bibb-api-suggestion__option-bold"]],children:[o]}),a].filter(function(t){return Boolean(t)})}},{key:"_onChooseOption",value:function(t){if(this._hoveredOption=null,this._voeMode){var e=t.target.closest(".voe-suggestion-option");if(!e||!this._optionsValueMap.has(e))return;var n=this._optionsValueMap.get(e);this._addValue(n)}else{var r=t.target.closest(".bibb-api-suggestion__option");if(!r||!this._optionsValueMap.has(r))return;var i=this._optionsValueMap.get(r);this._addValue(i)}this.inputElement.value="",this._resetDataList(),this._focusInput()}},{key:"_addValue",value:function(t){this._values.includes(t)||(this.values="".concat(this._values.join(" ")," ").concat(t),this.clearPlaceholder())}},{key:"_removeValue",value:function(t){if(this._values.includes(t)){var e=this._values.indexOf(t);if(-1<e){this.values=[].concat(D(this._values.slice(0,e)),D(this._values.slice(e+1))).join(" ");var n=this._pills.get(t);this._pills.delete(t),0==this._pills.size&&this.setPlaceholder(),r.F.destroyNode(n)}}}},{key:"_preSelectNextOption",value:function(t){var e=Array.from(this.dataListElement.children);if(this._preSelectedOption){var n=e.indexOf(this._preSelectedOption);if("ArrowDown"===t){var r=n+1;e.length>r&&(this.preSelectedOption=e[r])}else if("ArrowUp"===t){var i=n-1;0<=i&&(this.preSelectedOption=e[i]),0>i&&(this.preSelectedOption=null)}}else{var o=e[0];o&&(this.preSelectedOption=o)}}},{key:"_resetDataList",value:function(){r.F.clear(this.dataListElement),this._hoveredOption=null,this._preSelectedOption=null,this._optionsValueMap.clear()}},{key:"_onClickPillRemove",value:function(t){var e=t.detail;this._removeValue(e),this._focusInput()}},{key:"_focusInput",value:function(){this.inputElement.focus()}},{key:"setSearchButtonState",value:function(t){null!=this._searchButton&&(this._searchButton.disabled=!1)}},{key:"_onClickSearchButton",value:function(){if("btnSearch"===this._searchButtonId){if(1>this.inputElement.value.length)return;this._addValue(this.inputElement.value),this.inputElement.value=""}}}])&&W(n.prototype,i),o&&W(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i,o}(Y(HTMLElement));function it(t){return it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},it(t)}function ot(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];
1if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return at(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?at(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function at(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function ut(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ct(r.key),r)}}function ct(t){var e=function(t,e){if("object"!=it(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=it(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==it(e)?e:e+""}function st(t,e,n){return e=ht(e),function(t,e){if(e&&("object"==it(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ft()?Reflect.construct(e,n||[],ht(t).constructor):e.apply(t,n))}function lt(t){var e="function"==typeof Map?new Map:void 0;return lt=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(ft())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&pt(i,n.prototype),i}(t,arguments,ht(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),pt(n,t)},lt(t)}function ft(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ft=function(){return!!t})()}function pt(t,e){return pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pt(t,e)}function ht(t){return ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ht(t)}rt.inputParams=[{property:"voeMode",attribute:"voe-mode",type:Boolean,required:!1},{property:"searchContainerId",attribute:"search-container-id",type:String,required:!1},{property:"apiSrc",attribute:"api-src",type:String,required:!0},{property:"values",attribute:"values",type:String,required:!1},{property:"name",attribute:"name",type:String,required:!0},{property:"placeholder",attribute:"placeholder",type:String,required:!0},{property:"additionalStyle",attribute:"additional-style",type:String,required:!1},{property:"searchButtonId",attribute:"search-button-id",type:String,required:!1}];var dt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),st(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pt(t,e)}(e,t),n=e,o=[{key:"_errorOnMissingParameter",value:function(t){console.error("attribute ".concat(t," is required"))}}],(i=[{key:"modalTitle",get:function(){return this._modalTitle},set:function(t){this._modalTitle=t,this._setAttributeByProperty("modalTitle",t)}},{key:"confirmBtnLabel",get:function(){return this._confirmBtnLabel},set:function(t){this._confirmBtnLabel=t,this._setAttributeByProperty("confirmBtnLabel",t)}},{key:"cancelBtnLabel",get:function(){return this._cancelBtnLabel},set:function(t){this._cancelBtnLabel=t,this._setAttributeByProperty("cancelBtnLabel",t)}},{key:"connectedCallback",value:function(){this._initInputParameters(),this._initTemplates(this.modalTitle,this.cancelBtnLabel,this.confirmBtnLabel)}},{key:"show",value:function(t,e,n){this._payload=n,this._confirmFn=t,this._cancelFn=e,this.children.item(0).style.display="block"}},{key:"_initInputParameters",value:function(){var t,n=ot(e.inputParams);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.required&&!this.hasAttribute(r.attribute)&&e._errorOnMissingParameter(r.attribute),this[r.property]=r.type(this.getAttribute(r.attribute))}}catch(t){n.e(t)}finally{n.f()}}},{key:"_onClickConfirm",value:function(){this.dispatchEvent(new CustomEvent("bibb.confirmation-modal.confirm",{detail:this._payload,bubbles:!0})),this._confirmFn&&this._confirmFn(this._payload),r.F.destroyNode(this)}},{key:"_onClickCancel",value:function(){this.dispatchEvent(new CustomEvent("bibb.confirmation-modal.cancel",{detail:this._payload,bubbles:!0})),this._cancelFn&&this._cancelFn(),r.F.destroyNode(this)}},{key:"_initTemplates",value:function(t,e,n){var i=r.F.createNode,o=n?i({tag:"button",attr:[["class","btn btn-warning"]],children:[n],events:[{name:"click",fn:this._onClickConfirm.bind(this),parameters:null}]}):null,a=i({tag:"button",attr:[["type","button"],["class","btn btn-secondary"]],children:[e],events:[{name:"click",fn:this._onClickCancel.bind(this),parameters:null}]});this.append(i({tag:"div",attr:[["id","modal-confirmation"],["tabindex","-1"],["role","dialog"],["aria-labelledby",""],["class","modal fade show"],["style","display: none;"],["aria-modal","true"]],children:[i({tag:"div",attr:[["role","document"],["class","modal-dialog modal-xl modal-dialog-centered"]],children:[i({tag:"div",attr:[["class","modal-content"]],children:[i({tag:"div",attr:[["class","modal-body text-center"]],children:[i({tag:"div",attr:[["class","modal__content-icon"]],children:[i({tag:"i",attr:[["class","fi flaticon-warning text-warning"]]})]}),i({tag:"h1",attr:[["class","text-warning"]],children:[t]}),a,o].filter(function(t){return Boolean(t)})})]})]})]}))}},{key:"_setAttributeByProperty",value:function(t,n){var r=e.inputParams.find(function(e){return e.property===t});r&&this.setAttribute(r.attribute,n)}}
1])&&ut(n.prototype,i),o&&ut(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i,o}(lt(HTMLElement));function yt(t){return yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yt(t)}function vt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return bt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function bt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function mt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,_t(r.key),r)}}function _t(t){var e=function(t,e){if("object"!=yt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=yt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==yt(e)?e:e+""}function gt(t,e,n){return e=Ot(e),function(t,e){if(e&&("object"==yt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,St()?Reflect.construct(e,n||[],Ot(t).constructor):e.apply(t,n))}function wt(t){var e="function"==typeof Map?new Map:void 0;return wt=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(St())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&kt(i,n.prototype),i}(t,arguments,Ot(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),kt(n,t)},wt(t)}function St(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(St=function(){return!!t})()}function kt(t,e){return kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},kt(t,e)}function Ot(t){return Ot=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ot(t)}dt.inputParams=[{property:"modalTitle",attribute:"modal-title",type:String,required:!1},{property:"confirmBtnLabel",attribute:"confirm-btn-label",type:String,required:!1},{property:"cancelBtnLabel",attribute:"cancel-btn-label",type:String,required:!0}];var Et=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=gt(this,e,arguments)).openLayers=[],t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kt(t,e)}(e,t),n=e,i=[{key:"connectedCallback",value:function(){var t=this;this.setAttribute("id","main-navigation-layer"),this.setAttribute("class","fr-main-navigation__layer-container"),document.body.addEventListener("open-navigation-layer",function(e){for(var n,r,i=null===(n=null==e?void 0:e.detail)||void 0===n?void 0:n.pid,o=0;o<t.openLayers.length;o++)if(t.openLayers[o].pid===i)return void t._goToLayer(i);var a=null===(r=null==e?void 0:e.detail)||void 0===r?void 0:r.closeExisting;t._openLayer(i,a)}),document.body.addEventListener("close-navigation",function(e){t._closeAllLayers()}),new MutationObserver(function(e,n){var r,i=vt(e);try{for(i.s();!(r=i.n()).done;)"childList"===r.value.type&&setTimeout(function(){if(0<t.children.length){var e=t.children[t.children.length-1];e.classList.contains("to-be-removed")||e.classList.add("fr-main-navigation__layer--active"),t._updateHeight()}},50)}catch(t){i.e(t)}finally{i.f()}t._updateNavButtons(),t._updateHeight(),t._updateBurger()}).observe(this,{attributes:!1,childList:!0,subtree:!1}),this._updateHeight(),this._updateBurger()}},{key:"_openLayer",value:function(t,e){var n=this,r=this.getAttribute("url")||"/navigationManager_bibb.json.php?pid=$pid";fetch(r.replace("$pid",t)).then(function(t){return t.json()}).then(function(t){if("error"!==(null==t?void 0:t.status)){e&&(n.openLayers=[null==t?void 0:t.data],n._goToLayer(null)),n.openLayers.push(null==t?void 0:t.data);var r=n._renderNavigationLayer(n.openLayers,!0);n.appendChild(r);var i=r.previousElementSibling;i&&i.classList.contains("fr-main-navigation__layer--active")&&(r.style.minHeight="".concat(i.offsetHeight,"px"))}else console.error("error during retrieving navigation data: ".concat(null==t?void 0:t.error))}).catch(function(t){return console.error(t)})}},{key:"_goToLayer",value:function(t){for(var e=this,n=-1,r=0;r<this.openLayers.length;r++)if(this.openLayers[r].pid===t){n=r;break}this.openLayers=this.openLayers.slice(0,n+1);for(var i=function(){var t=e.children[o];o===n&&(t.classList.add("fr-main-navigation__layer--active"),t.classList.remove("fr-main-navigation__layer--trail")),o>n&&(t.classList.remove("fr-main-navigation__layer--active"),t.classList.remove("fr-main-navigation__layer--trail"),setTimeout(function(){t.parentElement.removeChild(t)},500))},o=0;o<this.children.length;o++)i()}},{key:"_closeAllLayers",value:function(){for(this.openLayers=[];1<this.children.length;){var t=this.children[0];t.parentElement.removeChild(t)}if(0<this.children.length){var e=this.children[0];e.classList.remove("fr-main-navigation__layer--active"),e.classList.remove("fr-main-navigation__layer--trail"),e.classList.add("to-be-removed"),setTimeout(function(){e.parentElement.removeChild(e)},500)}this._updateBurger()}},{key:"_updateBurger",value:function(){var t=document.getElementsByClassName("js-main-nav-burger")[0];0<this.openLayers.length?t.classList.add("is-active"):t.classList.remove("is-active")}},{key:"_updateHeight",value:function(){for(var t=0,e=0;e<this.children.length;e++){var n=this.children[e];t=Math.max(t,n.offsetHeight)}this.style.height="".concat(t,"px")}},{key:"_updateNavButtons",value:function(){for(var t=document.getElementsByClassName("fr-main-navigation__bar-link"),e=0;e<t.length;e++){var n=t[e];n.hasAttribute("data-pid")&&(0<this.openLayers.length&&n.getAttribute("data-pid")===this.openLayers[0].pid?n.classList.add("fr-main-navigation__bar-link--trail"):n.classList.remove("fr-main-navigation__bar-link--trail"))}}},{key:"_renderBreadcrumbs",value:function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("width","17"),e.setAttribute("height","17"),e.setAttribute("viewBox","0 0 17 17"),e.innerHTML='<path fill="#ffffff" fill-rule="evenodd" d="M16.6892426,0.311014057 C16.2748994,-0.103671352 15.6099753,-0.103671352 15.195241,0.311014057 L8.49995112,7.00551465 L1.8051501,0.311014057 C1.39031804,-0.103671352 0.725491718,-0.103671352 0.311050725,0.311014057 C-0.103683575,0.725406195 -0.103683575,1.39015414 0.311050725,1.80493731 L7.00634058,8.49894911 L0.311050725,15.1934497 C-0.103683575,15.6081351 -0.103683575,16.2729808 0.311050725,16.6872752 C0.514213826,16.8908054 0.788063607,17 1.05428744,17 C1.3201202,17 1.59387221,16.8984304 1.79713308,16.6872752 L8.49232517,9.99287236 L15.187615,16.6872752 C15.3907781,16.8908054 15.6646279,17 15.9303629,17 C16.2042127,17 16.4704365,16.8984304 16.6735996,16.6872752 C17.0883339,16.2729808 17.0883339,15.6081351 16.6735996,15.1934497 L9.99405049,8.49894911 L16.6892426,1.80493731 C17.1035858,1.39015414 17.1035858,0.725406195 16.6892426,0.311014057"></path>';var n=this;return r.F.createNode({tag:"div",attr:[["class","fr-main-navigation__breadcrumbs"]],children:[r.F.createNode({tag:"div",attr:[["class","container"]],children:[r.F.createNode({tag:"div",attr:[["class","fr-main-navigation__breadcrumbs-inside"]],children:[r.F.createNode({tag:"a",attr:[["class","js-main-navigation-close fr-main-navigation__layer-close"],["tabindex","0"]],events:[{name:"click",fn:this._closeAllLayers.bind(this)},{name:"keyup",fn:function(t){t.preventDefault(),"Enter"===t.key&&n._closeAllLayers()}}],children:[e]}),r.F.createNode({tag:"ul",attr:[["class","fr-main-navigation__breadcrumb-list"]],children:t})]})]})]})}},{key:"_renderBreadcrumbItem",value:function(t,e){var n=this,i=document.createElementNS("http://www.w3.org/2000/svg","svg");return i.setAttribute("width","15"),i.setAttribute("height","12"),i.setAttribute("viewbox","0 0 15 12"),i.innerHTML='<defs>\n  <path id="a" d="M5.364.17L.188 4.882a.545.545 0 0 0 0 .823l5.176 4.712a.684.684 0 0 0 .905 0l.603-.549a.545.545 0 0 0 0-.822L2.771 5.294l4.103-3.752A.546.546 0 0 0 6.872.72L6.27.17A.673.673 0 0 0 5.816 0a.677.677 0 0 0-.452.17z"></path>\n</defs>\n<g fill="none" fill-rule="evenodd">\n  <use fill="#ffffff" xlink:href="#a"></use>\n  <path fill="#FEFEFE" d="M14.999 7.016C14.993 5.352 13.814 4 12.365 4h-4.86A.505.505 0 0 0 7 4.505v.947c0 .279.226.505.505.505h4.86c.32 0 .678.459.678 1.072v4.466c0 .278.226.505.505.505h.947a.505.505 0 0 0 .505-.505V7.016h-.001z"></path>\n</g>',r.F.createNode({tag:"li",attr:[["class","fr-main-navigation__breadcrumb-item"]],children:[r.F.createNode({tag:"a",attr:[["href","#"],["class","js-breadcrumb-link fr-main-navigation__breadcrumb-link"],["data-pid",e],["tabindex","0"]],events:[{name:"click",fn:function(){n._goToLayer(e)}}],children:[i,r.F.createNode({tag:"span",children:[t]})]})]})}},{key:"_renderLinks",value:function(t,e,n){var i="fr-main-navigation__layer-subitems--columns-low";return 4<n.length&&(i="fr-main-navigation__layer-subitems--columns-high"),8<n.length&&(i="fr-main-navigation__layer-subitems--columns-max"),r.F.createNode({tag:"div",attr:[["class","fr-main-navigation__layer-subitems fr-main-navigation__layer-subitems--with-act-page"]],children:[r.F.createNode({tag:"div",attr:[["class","container"],["style","height: auto;"]],children:[r.F.createNode({tag:"div",attr:[["class","fr-main-navigation__layer-actpage"]],children:[r.F.createNode({tag:"a",attr:[["href",e],["class","fr-main-navigation__layer-actpage-link"],["tabindex","0"]],children:[t]})]}),r.F.createNode({tag:"ul",attr:[["class","fr-main-navigation__layer-subitems-list ".concat(i)]],children:n})]})]})}},{key:"_renderLinkItem",value:function(t,e,n,i,o){var a=[r.F.createNode({tag:"a",attr:[["class","fr-main-navigation__layer-link".concat(i?" fr-main-navigation__layer-link--withsubitems":"")],["href",n],["tabindex",o?"0":"-1"]],children:[t]})];if(i){var u=document.createElementNS("http://www.w3.org/2000/svg","svg");u.setAttribute("width","18"),u.setAttribute("height","27"),u.setAttribute("viewBox","0 0 18 27"),u.innerHTML='<path fill="#ffffff" fill-rule="evenodd" d="M0.474025332,12.4504163 L13.5834986,0.434505572 C14.2155324,-0.144835191 15.2408166,-0.144835191 15.8728504,0.434505572 L17.4020079,1.83617634 C18.0333671,2.41489881 18.0340417,3.35223135 17.404706,3.93219041 L7.01493411,13.4996599 L17.4040315,23.0677478 C18.0340417,23.6477068 18.0326926,24.5850394 17.4013334,25.1638237 L15.8721759,26.5654944 C15.2401421,27.1448352 14.2148578,27.1448352 13.5828241,26.5654944 L0.474025332,14.5489036 C-0.158008444,13.9695628 -0.158008444,13.0297571 0.474025332,12.4504163" transform="matrix(-1 0 0 1 17.876 0)"></path>',a.push(r.F.createNode({tag:"a",attr:[["class","fr-main-navigation__layer-link-subitems js-main-nav-item"],["href","#"],["data-pid",e],["tabindex",o?"0":"-1"],["title","Unterseiten von ".concat(t)]],events:[{name:"click",fn:function(){var t=new CustomEvent("open-navigation-layer",{detail:{pid:e}});document.body.dispatchEvent(t)}}],children:[u]}))}return r.F.createNode({tag:"li",attr:[["class","fr-main-navigation__layer-linkitem".concat(i?" fr-main-navigation__layer-linkitem--withsubitems":"")]],children:a})}},{key:"_renderNavigationLayer",value:function(t,e){for(var n=this,i=[],o=0;o<t.length-1;o++)i.push(this._renderBreadcrumbItem(t[o].label,t[o].pid));var a=[],u=t[t.length-1];
1return u.subItems.forEach(function(t,r){a.push(n._renderLinkItem(t.label,t.pid,t.url,t.hasSubItems,e))}),r.F.createNode({tag:"div",attr:[["id","js-main-navigation-layer-".concat(u.pid)],["class","fr-main-navigation__layer fr-main-navigation__layer-level-".concat(u.level," js-main-navigation-layer")]],children:[this._renderBreadcrumbs(i),this._renderLinks(u.label,u.url,a)]})}}],i&&mt(n.prototype,i),o&&mt(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i,o}(wt(HTMLElement)),Lt=n(10246);function jt(t){return jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jt(t)}function Pt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Ct(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ct(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function Ct(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function At(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var c=r&&r.prototype instanceof u?r:u,s=Object.create(c.prototype);return Tt(s,"_invoke",function(n,r,i){var o,u,c,s=0,l=i||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,u=0,c=t,p.n=n,a}};function h(n,r){for(u=n,c=r,e=0;!f&&s&&!i&&e<l.length;e++){var i,o=l[e],h=p.p,d=o[2];n>3?(i=d===r)&&(c=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(u=0,p.v=r,p.n=o[1]):h<d&&(i=n<3||o[0]>r||r>d)&&(o[4]=n,o[5]=r,p.n=d,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,l,d){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,d),u=l,c=d;(e=u<2?t:c)||!f;){o||(u?u<3?(u>1&&(p.n=-1),h(u,c)):p.n=c:p.v=c);try{if(s=2,o){if(u||(i="next"),e=o[i]){if(!(e=e.call(o,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=o.return)&&e.call(o),u<2&&(c=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(e){o=t,u=1,c=e}finally{s=1}}return{value:e,done:f}}}(n,i,o),!0),s}var a={};function u(){}function c(){}function s(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(Tt(e={},r,function(){return this}),e),f=s.prototype=u.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,Tt(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=s,Tt(f,"constructor",s),Tt(s,"constructor",c),c.displayName="GeneratorFunction",Tt(s,i,"GeneratorFunction"),Tt(f),Tt(f,i,"Generator"),Tt(f,r,function(){return this}),Tt(f,"toString",function(){return"[object Generator]"}),(At=function(){return{w:o,m:p}})()}function Tt(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}Tt=function(t,e,n,r){function o(e,n){Tt(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},Tt(t,e,n,r)}function It(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Mt(r.key),r)}}function Mt(t){var e=function(t,e){if("object"!=jt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=jt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}
1(t,"string");return"symbol"==jt(e)?e:e+""}function Nt(t,e,n){return e=Rt(e),function(t,e){if(e&&("object"==jt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ft()?Reflect.construct(e,n||[],Rt(t).constructor):e.apply(t,n))}function Bt(t){var e="function"==typeof Map?new Map:void 0;return Bt=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(Ft())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&xt(i,n.prototype),i}(t,arguments,Rt(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),xt(n,t)},Bt(t)}function Ft(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ft=function(){return!!t})()}function xt(t,e){return xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xt(t,e)}function Rt(t){return Rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rt(t)}var qt=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,u)}c((r=r.apply(t,e||[])).next())})},Vt=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Nt(this,e))._fetchAbortController=new AbortController,t._listeners=[],t._itemElements=[],t._initInputParameters(),t._initTemplates(),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xt(t,e)}(e,t),n=e,i=[{key:"items",set:function(t){this._items=t,t&&this.dispatchEvent(new CustomEvent("bibb.sortable-stack.number_of_items_changed",{detail:this._items.length,bubbles:!0}))}},{key:"_dragTargets",get:function(){var t=this;return this._draggingElement?this._itemElements.filter(function(e){return e.node!==t._draggingElement}):[]}},{key:"apiSrc",get:function(){return this._apiSrc},set:function(t){this._apiSrc!==t&&(this._apiSrc=t)}},{key:"total",get:function(){var t,e;return null!==(e=null===(t=this._items)||void 0===t?void 0:t.length)&&void 0!==e?e:0}},{key:"connectedCallback",value:function(){return qt(this,void 0,void 0,At().m(function t(){return At().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._reBuildItemStack();case 1:return t.a(2)}},t,this)}))}},{key:"addItem",value:function(t){var e=this;this._addToRemote(t).then(function(t){t&&(e.items=null,e._reBuildItemStack().then())})}},{key:"removeItem",value:function(t){var e=this;this._removeAtRemote(t).then(function(t){t&&(e.items=null,e._reBuildItemStack().then())})}},{key:"_addToRemote",value:function(t){return qt(this,void 0,void 0,At().m(function e(){var n,r;return At().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,fetch(this.apiSrc,{method:"POST",mode:"same-origin",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",signal:this._fetchAbortController.signal,body:JSON.stringify(t)});case 1:if(n=e.v,!(r=2===Math.floor(n.status/100))){e.n=3;break}return e.n=2,n.json();case 2:r=e.v.success;case 3:return e.a(2,r)}},e,this)}))}},{key:"_removeAtRemote",value:function(t){return qt(this,void 0,void 0,At().m(function e(){var n,r;return At().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,fetch(this.apiSrc,{method:"UNLINK",mode:"same-origin",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",signal:this._fetchAbortController.signal,body:JSON.stringify(t)});case 1:if(n=e.v,!(r=2===Math.floor(n.status/100))){e.n=3;break}return e.n=2,n.json();case 2:r=e.v.success;case 3:return e.a(2,r)}},e,this)}))}},{key:"_getItems",value:function(){return qt(this,arguments,void 0,function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return At().m(function n(){var r,i;return At().w(function(n){for(;;)switch(n.n){case 0:if(t._items&&!e){n.n=5;break}return n.n=1,fetch(t.apiSrc,{mode:"same-origin",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",signal:t._fetchAbortController.signal});case 1:if(r=n.v,2===Math.floor(r.status/100)){n.n=2;break}i=[],n.n=4;break;case 2:return n.n=3,r.json();case 3:i=n.v.results;case 4:t.items=i;case 5:return n.a(2,t._items)}},n)})()})}},{key:"_changeItemOrder",value:function(t){return qt(this,void 0,void 0,At().m(function e(){var n,r;return At().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,fetch(this.apiSrc,{method:"PATCH",mode:"same-origin",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",signal:this._fetchAbortController.signal,body:JSON.stringify(t)});case 1:if(n=e.v,!(r=2===Math.floor(n.status/100))){e.n=3;break}return e.n=2,n.json();case 2:r=e.v.success;case 3:return e.a(2,r)}},e,this)}))}},{key:"_initInputParameters",value:function(){var t,n=Pt(e.inputParams);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.required&&!this.hasAttribute(r.attribute)&&e._errorOnMissingParameter(r.attribute),this[r.property]=r.type(this.getAttribute(r.attribute))}}catch(t){n.e(t)}finally{n.f()}}},{key:"_initTemplates",value:function(){this._itemTemplate=r.F.getTemplate(this,"item"),this._stackContainer=r.F.getTemplate(this,"container"),this._clearAll(),this.append(this._stackContainer)}},{key:"_reBuildItemStack",value:function(){return qt(this,arguments,void 0,function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return At().m(function n(){var r;return At().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,t._getItems(e);case 1:r=n.v,t._clear(),r.forEach(function(e,n){var r=t._buildItem(e,n+1);t._itemElements.push({node:r,item:e}),t._stackContainer.append(r)}),Lt.Ay.create(t._stackContainer,{animation:150,ghostClass:"blue-background-class",onEnd:t._onDragEnd.bind(t)});case 2:return n.a(2)}},n)})()})}},{key:"_onDragEnd",value:function(t){return qt(this,void 0,void 0,At().m(function e(){var n;return At().w(function(e){for(;;)switch(e.n){case 0:return n=this._itemElements.find(function(e){return e.no
1de===t.item}),e.n=1,this._changeItemOrder({id:n.item.id,sorting:t.newIndex+1});case 1:return e.n=2,this._reBuildItemStack(!0);case 2:return e.a(2)}},e,this)}))}},{key:"_clear",value:function(){this._itemElements=[],r.F.clear(this._stackContainer)}},{key:"_clearAll",value:function(){r.F.clear(this)}},{key:"_buildItem",value:function(t,e){return t.rank=e,r.F.replacePlaceholders(this._itemTemplate,t)[0]}}],o=[{key:"_errorOnMissingParameter",value:function(t){console.error("attribute ".concat(t," is required"))}}],i&&It(n.prototype,i),o&&It(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i,o}(Bt(HTMLElement));Vt.inputParams=[{property:"apiSrc",attribute:"api-src",type:String,required:!0},{property:"maxItems",attribute:"max-items",type:Number,required:!0}],customElements.define("bibb-api-autocomplete",_),customElements.define("bibb-sortable-stack",Vt),customElements.define("bibb-confirmation-modal",dt),customElements.define("bibb-api-suggestion",rt),customElements.define("main-navigation-layer",Et)},98709:function(t,e,n){n.d(e,{F:function(){return f}});n(52675),n(89463),n(2259),n(45700),n(28706),n(2008),n(23418),n(23792),n(34782),n(54554),n(89572),n(62010),n(36033),n(2892),n(5506),n(26099),n(84864),n(27495),n(38781),n(47764),n(25440),n(23500),n(62953);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=!0,s=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){s=!0,i=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return u}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=u(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function u(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,l(r.key),r)}}function l(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}var f=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return e=t,u=[{key:"replacePlaceholders",value:function(e,n){var r=e.outerHTML;
1t.collectPlaceholders(n).forEach(function(t,e){var n=new RegExp("%".concat(e,"%"),"ug");r=r.replace(n,t)});var i=document.createElement("div");return i.innerHTML=r,Array.from(i.childNodes)}},{key:"getTemplate",value:function(t,e){return t.children.namedItem(e)||console.error(new Error('template for "'.concat(e,'" is missing'))),t.children.namedItem(e).content.firstElementChild}},{key:"clear",value:function(e){for(;e.hasChildNodes();)t.destroyNode(e.lastChild)}},{key:"createNode",value:function(e){var n=document.createElement(e.tag);if(Array.isArray(e.attr)){var r,u=a(e.attr);try{for(u.s();!(r=u.n()).done;){var c=o(r.value,2),s=c[0],l=c[1];n.setAttribute(s,l)}}catch(t){u.e(t)}finally{u.f()}}if(Array.isArray(e.children)&&n.append.apply(n,i(e.children)),Array.isArray(e.events)){var f,p=a(e.events);try{for(p.s();!(f=p.n()).done;){var h=f.value,d=h.fn,y=h.name;t.listeners.push({node:n,fn:d,event:y}),n.addEventListener(h.name,d)}}catch(t){p.e(t)}finally{p.f()}}return n}},{key:"destroyNode",value:function(e){t.listeners.filter(function(t){return t.node===e}).forEach(function(e,n){e.node.removeEventListener(e.event,e.fn),t.listeners.splice(n)}),e.parentNode&&e.parentNode.removeChild(e)}},{key:"collectPlaceholders",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=new Map,a=n;return 0<a.length&&(a+="."),Array.from(Object.entries(t)).forEach(function(t){var n=o(t,2),u=n[0],c=n[1];null==c?i.set("".concat(a).concat(u),""):"object"===r(c)?e.collectPlaceholders(c,u).forEach(function(t,e){i.set("".concat(a).concat(e),t.toString())}):i.set("".concat(a).concat(u),c.toString())}),i}},{key:"isCustomElementDefined",value:function(t){return"function"==typeof customElements.get(t)}}],(n=null)&&s(e.prototype,n),u&&s(e,u),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,u}();f.listeners=[]}}]);

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.