PageSourceSearch

https://www.honnens.de/shop/theme/6e0e1c8ad57ad017a8f3f7e520de3240…/biloba-open-ai.js?1791200079

js honnens.de collected 2026-10-06 03:08:51 UTC 21,476 bytes, 1 lines download raw bytes

1(()=>{"use strict";var t={857: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)?a(Array.isArray(t)?[]:{},t,e):t}function n(t,e,s){return t.concat(e).map(function(t){return i(t,s)})}function r(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function o(t,e){try{return e in t}catch(t){return!1}}function a(t,s,l){(l=l||{}).arrayMerge=l.arrayMerge||n,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=i;var d,u,c=Array.isArray(s);return c!==Array.isArray(t)?i(s,l):c?l.arrayMerge(t,s,l):(u={},(d=l).isMergeableObject(t)&&r(t).forEach(function(e){u[e]=i(t[e],d)}),r(s).forEach(function(e){(!o(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(o(t,e)&&d.isMergeableObject(s[e])?u[e]=(function(t,e){if(!e.customMerge)return a;var s=e.customMerge(t);return"function"==typeof s?s:a})(e,d)(t[e],s[e],d):u[e]=i(s[e],d))}),u)}a.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,s){return a(t,s,e)},{})},t.exports=a}},e={};function s(i){var n=e[i];if(void 0!==n)return n.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,s),r.exports}(()=>{s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e}})(),(()=>{s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})}})(),(()=>{s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)})(),(()=>{var t=s(857),e=s.n(t);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()}}}class n{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!n.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===n.hasAttribute(t,e))throw Error('The required property "'.concat(e,'" does not exist!'));if("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],r=e.replace(/^data(|-)/,""),o=i.toLowerCamelCase(r,"-");if(!n.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 a=t.dataset[o];if(void 0===a){if(s)throw Error('The required data attribute "'.concat(e,'" does not exist on ').concat(t,"!"));return a}return i.parsePrimitive(a)}static querySelector(t,e){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!n.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 "'.concat(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&&!n.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 "'.concat(e,'" must exist in parent node!'));return i}}class r{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,n=t.split("."),r=s.scope?e.bind(s.scope):e;if(s.once&&!0===s.once){let e=r;r=function(s){i.unsubscribe(t),e(s)}}return this.el.addEventListener(n[0],r),this.listeners.push({splitEventName:n,opts:s,cb:r}),!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}
1reset(){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}constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}}class o{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let s=i.toDashCase(this._pluginName),r=n.getDataAttribute(this.el,"data-".concat(s,"-config"),!1),o=n.getAttribute(this.el,"data-".concat(s,"-options"),!1),a=[this.constructor.options,this.options,t];r&&a.push(window.PluginConfigManager.get(this._pluginName,r));try{o&&a.push(JSON.parse(o))}catch(t){throw console.error(this.el),Error('The data attribute "data-'.concat(s,'-options" could not be parsed to json: ').concat(t.message))}return e().all(a.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>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}constructor(t,e={},s=!1){if(!n.isNode(t))throw Error("There is no valid element given.");this.el=t,this.$emitter=new r(this.el),this._pluginName=this._getPluginName(s),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}}class a{static iterate(t,e){if(t instanceof Map||Array.isArray(t))return t.forEach(e);if(t instanceof FormData){for(var s of t.entries())e(s[1],s[0]);return}if(t instanceof NodeList)return t.forEach(e);if(t instanceof HTMLCollection)return Array.from(t).forEach(e);if(t instanceof Object)return Object.keys(t).forEach(s=>{e(t[s],s)});throw Error("The element type ".concat(typeof t," is not iterable!"))}}let l="biloba-open-ai-dsgvo-consent",d="bilobaOpenAiAssistantDismissed",u={a:["href","rel"],img:["src","alt","width","height"],ul:[],ol:[],li:[],strong:[],em:[],b:[],i:[],br:[],p:[],span:[]};window.PluginManager.register("BilobaOpenAi",class extends o{init(){this._inputField=n.querySelector(this.el,"#question-input",!1),this._messages=n.querySelector(this.el,".messages",!1),this._submitButton=n.querySelector(this.el,"#send-button",!1),this._refreshButton=n.querySelector(this.el,"#refresh-button",!1),this._closeButton=n.querySelector(this.el,"#close-button",!1),this._optionButtons=n.querySelectorAll(this.el,".options button",!1),this._openButton=n.querySelector(this.el,"#open-button",!1),this._dsgvoAcceptButton=n.querySelector(this.el,"#dsgvo-accept-button",!1),this._dsgvoDeclineButton=n.querySelector(this.el,"#dsgvo-decline-button",!1),this._dsgvoActive="true"===this.el.getAttribute("data-biloba-assistant-frontend-dsgvo-active"),this._dsgvoConsented=!this._dsgvoActive||"accepted"===this._getCookie(l),this._dismissButton=n.querySelector(this.el,"#dismiss-button",!1),this._dismissMode=this.el.getAttribute("data-biloba-assistant-frontend-dismiss-mode")||"off",this._visibility=this.el.getAttribute("data-biloba-assistant-frontend-visibility")||"all",this._restoreDismissedState(),this.threadId=sessionStorage.getItem("bilobaOpenAiAssistantFrontendThreadId");let t=sessionStorage.getItem("bilobaOpenAiAssistantFrontendLastMessage");this.threadId&&t&&(new Date().getTime()-t>864e5?(sessionStorage.removeItem("bilobaOpenAiAssistantFrontendThreadId"),sessionStorage.removeItem("bilobaOpenAiAssistantFrontendLastMessage"),this.threadId=""):this.el.setAttribute("data-biloba-assistant-frontend-thread-id",this.threadId)),this._registerEvents(),this._shouldAutoOpen()&&this._openChat(!0)}_isDesktopViewport(){return window.matchMedia("(min-width: 768px)").matches}_isHiddenForViewport(){let t=this._isDesktopViewport();return"desktop"===this._visibility&&!t||"mobile"===this._visibility&&t}_isDismissed(){return this.el.classList.contains("chat-dismissed")}_restoreDismissedState(){"session"===this._dismissMode&&"true"===sessionStorage.getItem(d)&&this.el.classList.add("chat-dismissed")}_shouldAutoOpen(){let t="true"===this.el.getAttribute("data-biloba-assistant-frontend-open-on-load"),e="true"===localStorage.getItem("bilobaOpenAiAssistantManuallyClosed"),s=this._dsgvoActive&&"declined"===this._getCookie(l);return t&&!e&&this._isDesktopViewport()&&!s&&!this._isHiddenForViewport()&&!this._isDismissed()}_dismissWidget(t){t.preventDefault(),t.stopPropagation(),this.el.classList.remove("open","chat-opened-manually"),this.el.classList.add("chat-dismissed"),"session"===this._dismissMode&&sessionStorage.setItem(d,"true")}_registerEvents(){let t=this;t.uniqueBind(t.el,"focusin",t=>t.stopPropagation()),t._inputField?t.uniqueBind(t._inputField,"keypress",t._inputChange.bind(t)):console.info("Input field not found"),t._submitButton?t.uniqueBind(t._submitButton,"click",t.sendChat.bind(t)):console.info("Submit button not found"),t._refreshButton?t.uniqueBind(t._refreshButton,"click",t._refreshChat.bind(t)):console.info("Refresh button not found"),t._optionButtons&&a.iterate(t._optionButtons,e=>{t.uniqueBind(e,"click",t._optionClick.bind(t))}),t._closeButton?t.uniqueBind(t._closeButton,"click",t._closeChat.bind(t)):console.info("Close button not found"),t._openButton?t.uniqueBind(t._openButton,"click",()=>{t._openChat(!1)}):console.info("Open button not found"),t._dismissButton&&t.uniqueBind(t._dismissButton,"click",t._dismissWidget.bind(t)),t._dsgvoAcceptButton&&t.uniqueBind(t._dsgvoAcceptButton,"click",t._acceptDsgvoConsent.bind(t)),t._dsgvoDeclineButton&&t.uniqueBind(t._dsgvoDeclineButton,"click",t._declineDsgvoConsent.bind(t))}_openChat(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this;if(t||(localStorage.removeItem("bilobaOpenAiAssistantManuallyClosed"),e.el.classList.add("chat-opened-manually")),e.el.classList.add("open"),e._dsgvoActive&&!e._dsgvoConsented){e._showDsgvoConsentOverlay();return}let s=!1;if(e.el.classList.contains("history-loaded")&&(s=!0),e.threadId&&!1==s){e.el.classList.add("history-loaded");let t=n.querySelector(e.el,".typing-indicator",!1);t.style.display="flex";let s=e.el.getAttribute("data-biloba-assistant-frontend-shop-url"),i=e.el.getAttribute("data-biloba-assistant-frontend-shop-id"),r=e.el.getAttribute("data-biloba-assistant-frontend-assistant-id"),o={source:{shopId:i,url:window.location.origin},assistantId:r,threadId:e.threadId};fetch(s+"/shopware6-frontend/assistant-frontend/loadThread",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)}).then(t=>t.json()).then(s=>{200==s.status?s.messages&&(t.style.display="none",s.messages.forEac
1h(t=>{let s=document.createElement("li");t.value?(s.classList.add("assistant"),s.innerHTML=e._sanitizeHtml(t.value)):(s.classList.add("user"),s.textContent=t),e._messages.appendChild(s)}),e._scrollToBottom()):(console.error(s),t.style.display="none")}).catch(e=>{console.error("Error:",e),t.style.display="none"})}}_closeChat(){this.el.classList.remove("open","chat-opened-manually"),localStorage.setItem("bilobaOpenAiAssistantManuallyClosed","true")}_inputChange(t){"Enter"===t.key&&this.sendChat()}sendChat(){if(this._dsgvoActive&&!this._dsgvoConsented)return;let t=this._inputField.value;if(""!==t.trim()){let e=this.el.getAttribute("data-biloba-assistant-frontend-shop-url"),s=this.el.getAttribute("data-biloba-assistant-frontend-shop-id"),i=this.el.getAttribute("data-biloba-assistant-frontend-assistant-id"),r=this.el.getAttribute("data-biloba-assistant-frontend-thread-id"),o=e+"/shopware6-frontend/assistant-frontend/chat",a={"Content-Type":"application/json"},l={source:{shopId:s,url:window.location.origin},assistantId:i,threadId:r,message:t,streaming:!0},d=this.el.getAttribute("data-biloba-assistant-frontend-product-id");d&&(l.productId=d),this._updateButtons();let u=document.createElement("li");u.classList.add("user"),u.textContent=t,this._messages.appendChild(u),this._inputField.value="";let c=n.querySelector(this.el,".typing-indicator",!1);c.style.display="flex",this._scrollToBottom(),"undefined"!=typeof EventSource?this._sendChatWithStreaming(o,a,l,c):(l.streaming=!1,this._sendChatWithoutStreaming(o,a,l,c))}}_sendChatWithStreaming(t,e,s,i){let n=this;fetch(t,{method:"POST",headers:e,body:JSON.stringify(s)}).then(t=>{if(401===t.status)throw Error("AUTHENTICATION_FAILED");let e=t.body.getReader(),s=new TextDecoder,r="",o="",a=null,l=!1,d=null,u=0;function c(){a&&(a.innerHTML=n._parseMarkdown(o))}return e.read().then(function t(h){let{done:p,value:g}=h;if(p){c(),i.style.display="none",n._scrollToBottom(),n._updateButtons(!0);return}let b=(r+=s.decode(g,{stream:!0})).split("\n");for(let t of(r=b.pop(),b)){if(""===(t=t.trim())||!t.startsWith("data: "))continue;let e=t.substring(6);if("[DONE]"===e){c(),i.style.display="none",n._scrollToBottom(),n._updateButtons(!0);return}try{let t=JSON.parse(e);if("thread.created"===t.type&&t.threadId)n.el.setAttribute("data-biloba-assistant-frontend-thread-id",t.threadId),sessionStorage.setItem("bilobaOpenAiAssistantFrontendThreadId",t.threadId),sessionStorage.setItem("bilobaOpenAiAssistantFrontendLastMessage",new Date().getTime());else if("response.output_text.delta"===t.type&&t.delta)l||(l=!0,i.style.display="none",(a=document.createElement("li")).classList.add("assistant"),n._messages.appendChild(a)),void 0!==t.output_index&&t.output_index!==d&&(d=t.output_index,o="",a&&(a.innerHTML="")),function(t){o+=t;let e=Date.now();e-u<60||(u=e,a.innerHTML=n._parseMarkdown(o))}(t.delta),n._scrollToBottom();else if("response.completed"===t.type){if(i.style.display="none",t.response&&t.response.output&&t.response.output.length>0){let e=null;for(let s=t.response.output.length-1;s>=0;s--){let i=t.response.output[s];if("message"===i.type&&i.content&&i.content[0]&&i.content[0].text){e=i.content[0].text;break}}e&&(a||((a=document.createElement("li")).classList.add("assistant"),n._messages.appendChild(a)),a.innerHTML=n._parseMarkdown(e))}else a&&(a.innerHTML=n._parseMarkdown(o));n._scrollToBottom(),n._updateButtons(!0);return}else if("error"===t.type)throw Error(t.error||"Streaming error occurred")}catch(e){console.error("Error parsing SSE event:",e,"Line:",t)}}return e.read().then(t)})}).catch(t=>{console.error("Streaming error:",t),i.style.display="none";let e=document.createElement("li");e.classList.add("assistant"),"AUTHENTICATION_FAILED"===t.message?e.textContent="The chat assistant could not authenticate with the backend. Please contact support.":e.textContent="A general error occurred. Please try again.",n._messages.appendChild(e),n._updateButtons(!0)})}_sendChatWithoutStreaming(t,e,s,i){let n=this;fetch(t,{method:"POST",headers:e,body:JSON.stringify(s)}).then(t=>{if(401===t.status)throw Error("AUTHENTICATION_FAILED");return t.json()}).then(t=>{if(i.style.display="none",200==t.status){t.threadId&&(n.el.setAttribute("data-biloba-assistant-frontend-thread-id",t.threadId),sessionStorage.setItem("bilobaOpenAiAssistantFrontendThreadId",t.threadId),sessionStorage.setItem("bilobaOpenAiAssistantFrontendLastMessage",new Date().getTime()));let e=document.createElement("li");e.classList.add("assistant"),e.innerHTML=n._sanitizeHtml(t.message.value),n._messages.appendChild(e),n._scrollToBottom(),n._updateButtons(!0)}else console.log(t),n._updateButtons(!0)}).catch(t=>{console.error("Error:",t);let e=document.createElement("li");e.classList.add("assistant"),"AUTHENTICATION_FAILED"===t.message?e.textContent="The chat assistant could not authenticate with the backend. Please contact support.":e.textContent="A general error occurred. Please try again.",n._messages.appendChild(e),n._updateButtons(!0),i.style.display="none"})}_updateButtons(t){t?(this._inputField.disabled=!1,this._inputField.classList.remove("disabled"),this._submitButton.disabled=!1,this._submitButton.classList.remove("disabled"),this._refreshButton.classList.remove("disabled"),this._closeButton.classList.remove("disabled")):(this._inputField.disabled=!0,this._inputField.classList.add("disabled"),this._submitButton.disabled=!0,this._submitButton.classList.add("disabled"),this._refreshButton.classList.add("disabled"),this._closeButton.classList.add("disabled"))}_scrollToBottom(){let t=n.querySelector(this.el,".chat-body",!1);t.scrollTop=t.scrollHeight}_refreshChat(){this._refreshButton.classList.contains("disabled")||(this.el.setAttribute("data-biloba-assistant-frontend-thread-id",""),this._messages.innerHTML="",sessionStorage.removeItem("bilobaOpenAiAssistantFrontendThreadId"),sessionStorage.removeItem("bilobaOpenAiAssistantFrontendLastMessage"))}uniqueBind(t,e,s){var i=t.getAttribute("id");i||(i="_"+Math.random().toString(36).substring(2,11),t.setAttribute("id",i)),this.listeners=this.listeners||{},this.listeners[i]=this.listeners[i]||{},this.listeners[i][e]&&t.removeEventListener(e,this.listeners[i][e]),this.listeners[i][e]=s,t.addEventListener(e,s)}_optionClick(t){if(this._dsgvoActive&&!this._dsgvoConsented)return;let e=t.target.getAttribute("data-option");e&&(this._inputField.value=e,this.sendChat())}_showDsgvoConsentOverlay(){this.el.classList.add("needs-consent")}_hideDsgvoConsentOverlay(){this.el.classList.remove("needs-consent")}_acceptDsgvoConsent(){this._dsgvoConsented=!0,this._setCookie(l,"accepted",365),this._hideDsgvoConsentOverlay(),this._openChat(!1)}_declineDsgvoConsent(){this._setCookie(l,"declined",0),this._hideDsgvoConsentOverlay(),this._closeChat()}_getCookie(t){let e=document.cookie.match(RegExp("(?:^|; )"+t.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1")+"=([^;]*)"));return e?decodeURIComponent(e[1]):null}_setCookie(t,e,s){let i=encodeURIComponent(t)+"="+encodeURIComponent(e)+"; path=/; SameSite=Lax; Secure";if(s>0){let t=new Date;t.setTime(t.getTime()+864e5*s),i+="; expires="+t.toUTCString()}document.cookie=i}_parseMarkdown(t){if(!t)return"";let e=t;return/<[a-z][\s\S]*>/i.test(e)||(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;
1")),e=(e=(e=(e=(e=e.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>")).replace(/__(.*?)__/g,"<strong>$1</strong>")).replace(RegExp("\\*(?!\\s)(.*?)(?<!\\s)\\*","g"),"<em>$1</em>")).replace(RegExp("(?<!\\w)_(?!\\s)(.*?)(?<!\\s)_(?!\\w)","g"),"<em>$1</em>")).replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2">$1</a>'),/<[ou]l[^>]*>|<li[^>]*>/i.test(t)||(e=this._renderLists(e)),e=(e=(e=(e=(e=(e=e.replace(/\n\n/g,"<br><br>")).replace(RegExp("(?<!>)\\n(?!<)","g"),"<br>")).replace(/<br>(<\/?[ou]l>)/g,"$1")).replace(/(<\/?[ou]l>)<br>/g,"$1")).replace(/<\/ol>\s*<ol>/g,"")).replace(/<\/ul>\s*<ul>/g,""),this._sanitizeHtml(e)}_renderLists(t){let e=t.split("\n"),s=[],i=[],n=t=>{for(;i.length>t;)s.push("</li>"),s.push("</"+i.pop().type+">")};return e.forEach(t=>{let e=t.match(/^(\s*)(\d+\.|[-*])\s+(.*)$/);if(!e){if(/^\s*$/.test(t)&&i.length>0)return;n(0),s.push(t);return}let r=e[1].replace(/\t/g,"    ").length,o=/^\d/.test(e[2])?"ol":"ul",a=e[3];if(0===i.length||r>i[i.length-1].indent)i.push({type:o,indent:r}),s.push("<"+o+">");else{for(;i.length>1&&r<i[i.length-1].indent;)s.push("</li>"),s.push("</"+i.pop().type+">");s.push("</li>"),i[i.length-1].type!==o&&(s.push("</"+i.pop().type+">"),i.push({type:o,indent:r}),s.push("<"+o+">"))}s.push("<li>"+a)}),n(0),s.join("\n")}_sanitizeHtml(t){if(!t)return"";let e=document.createElement("template");e.innerHTML=t;let s=t=>{Array.from(t.children).forEach(e=>{s(e);let i=e.tagName.toLowerCase();if(!Object.prototype.hasOwnProperty.call(u,i)){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e);return}Array.from(e.attributes).forEach(t=>{let s=t.name.toLowerCase();if(!u[i].includes(s)){e.removeAttribute(t.name);return}"a"===i&&"href"===s&&e.setAttribute("href",this._rewriteShopLink(t.value)),("href"===s||"src"===s)&&!this._isSafeUrl(e.getAttribute(s),"img"===i)&&e.removeAttribute(t.name)}),"a"===i&&e.removeAttribute("target")})};return s(e.content),e.innerHTML}_rewriteShopLink(t){if(!t)return t;let e=null,s=t.match(/(?:^|\/)((?:detail|navigation|landingpage)\/[0-9a-f]{32})/i);if(s)e=s[1];else{let s=t.match(/^\/?(blog\/[^\s"'?#]+)/i);s&&(e=s[1])}if(!e)return t;let i=this.el.getAttribute("data-biloba-storefront-url")||this.el.getAttribute("data-biloba-storefront-absolute-url")||window.location.origin;return(i=i.replace(/\/+$/,""))+"/"+e}_isSafeUrl(t,e){let s=(t||"").replace(/[\u0000-\u001F\u007F]/g,"").replace(/\\/g,"/").trim();if(""===s||/^\/\//.test(s))return!1;if(/^(\/|\.\/|\.\.\/|#|\?)/.test(s))return!0;let i=s.match(/^([a-z][a-z0-9+.-]*):/i);if(!i)return!0;let n=i[1].toLowerCase();return e?"http"===n||"https"===n:"http"===n||"https"===n||"mailto"===n}},"[data-biloba-assistant-frontend]")})()})();

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.