PageSourceSearch

https://www.heckertsolar.com/theme/5ec786ea68a6dc72dfaa5a822a63b85…-seminar-form.seminar-form.plugin.7d38bc.js

js heckertsolar.com collected 2026-10-05 06:08:46 UTC 11,294 bytes, 8 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[61632],{632:(e,t,s)=>{s.r(t),s.d(t,{default:()=>l});var i=s(707);class r{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!r.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!1===r.hasAttribute(e,t))throw Error(`The required property "${t}" does not exist!`);if("function"!=typeof e.getAttribute){if(s)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=t.replace(/^data(|-)/,""),o=i.A.toLowerCamelCase(n,"-");if(!r.isNode(e)){if(s)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(s)throw Error("This node doesn't support the dataset attribute!");return}let l=e.dataset[o];if(void 0===l){if(s)throw Error(`The required data attribute "${t}" does not exist on ${e}!`);return l}return i.A.parsePrimitive(l)}static querySelector(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!r.isNode(e))throw Error("The parent node is not a valid HTML Node!");let i=e.querySelector(t)||!1;if(s&&!1===i)throw Error(`The required element "${t}" does not exist in parent node!`);return i}static querySelectorAll(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!r.isNode(e))throw Error("The parent node is not a valid HTML Node!");let i=e.querySelectorAll(t);if(0===i.length&&(i=!1),s&&!1===i)throw Error(`At least one item of "${t}" must exist in parent node!`);return i}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=`
2            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),
3            select:not([tabindex^="-"]):not([disabled]),
4            textarea:not([tabindex^="-"]):not([disabled]),
5            button:not([tabindex^="-"]):not([disabled]),
6            a[href]:not([tabindex^="-"]):not([disabled]),
7            [tabindex]:not([tabindex^="-"]):not([disabled])
8        `;return e.querySelectorAll(t)}static getFirstFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(e)[0]}static getLastFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=this.getFocusableElements(e);return t[t.length-1]}}class n{constructor(){this._request=null,this._errorHandlingInternal=!1}get(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",i=this._createPreparedRequest("GET",e,s);return this._sendRequest(i,null,t)}post(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let r=this._createPreparedRequest("POST",e,i);return this._sendRequest(r,t,s)}delete(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let r=this._createPreparedRequest("DELETE",e,i);return this._sendRequest(r,t,s)}patch(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let r=this._createPreparedRequest("PATCH",e,i);return this._sendRequest(r,t,s)}abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn(`the request to ${e.responseURL} was aborted`)}),e.addEventListener("error",()=>{console.warn(`the request to ${e.responseURL} failed with status ${e.status}`)}),e.addEventListener("timeout",()=>{console.warn(`the request to ${e.responseURL} timed out`)})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,s){return this._registerOnLoaded(e,s),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,s){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),s&&this._request.setRequestHeader("Content-type",s),this._request}}let{PluginBaseClass:o}=window;class l extends o{static #e=this.options={declarationOfConsentSelector:"#datenschutz",formSelector:".seminar-form",submitButtonSelector:".submit-button",hiddenSubmitSelector:".submit--hidden",submitResponseContainerSelector:".submit-response-container",uploadFileInputContainerSelector:"#upload-file-input-container",fileInputSubmitButtonSelector:".file-input-submit-button",uploadFileInputSelector:".upload-file-input",selectedFilesContainerSelector:".selected-files-container",responseMessageTemplateSelector:".response-message-template .message-template",alertSendingMessageSelector:"#alert_sending_message",selectDropdownSelector:".wbn-dropdown-container",confirmAlertCls:"confirm-alert",confirmMessageCls:"confirm-message",alertSuccessCls:"alert-success",alertInfoCls:"alert-info",alertWarningCls:"alert-warning",alertErrorCls:"alert-error",validationCheckCls:"was-validated",errorContainerSelector:".cms-element-wbn-seminar-form-error",contentType:"application/x-www-form-urlencoded",selectedFiles:[]};init(){let e=this.options;if(this.form=this.el.querySelector(e.formSelector),this.submitButton=this.el.querySelector(e.submitButtonSelector),this.fileInputSubmitButton=this.el.querySelector(e.fileInputSubmitButtonSelector),this._hiddenSubmit=this.el.querySelector(this.options.hiddenSubmitSelector),this.submitResponseContainer=this.el.querySelector(e.submitResponseContainerSelector),this.uploadFileInputContainer=this.el.querySelector(e.uploadFileInputContainerSelector),this.uploadFileInput=this.el.querySelector(e.uploadFileInputSelector),this.selectedFilesContainer=this.el.querySelector(e.selectedFilesContainerSelector),this.declarationOfConsentCheckbox=this.el.querySelector(e.declarationOfConsentSelector),this.selectDropdownContainer=this.el.querySelector(e.selectDropdownSelector),this._client=new n,!this.form){console.error("Form not found",this.form);return}new URLSearchParams(window.location.search).has("showError")&&this._initOnError(),document.querySelector(e.selectDropdownSelector)&&(this._selectDropdownPluginInstance=window.PluginManager.getPluginInstanceFromElement(this.selectDropdownContainer,"WbnSelectDropdownPlugin")),this._registerEvents()}_initOnError(){this.showError(),this.scrollToSelf()}_registerEvents(){this.el.addEventListener("submit",this._handleSubmit.bind(this)),this.submitButton&&(this.submitButton.addEventListener("submit",this._handleSubmit.bind(this)),this.submitButton.addEventListener("click",this._handleSubmit.bind(this))),this.fileInputSubmitButton&&this.fileInputSubmitButton.addEventListener("click",this._handleFileInputButtonSubmit.bind(this)),this.uploadFileInput&&this.uploadFileInput.addEventListener("change",this._handleFileInputChanged.bind(this))}_handleSubmit(e){e.preventDefault(),this.form.checkValidity()?this._submitForm(
8):this._showValidation()}_showValidation(){this._hiddenSubmit.click()}declarationOfConsentIsConfirmed(){return this.opts,!!this.declarationOfConsentCheckbox.checked}_submitForm(){this.$emitter.publish("beforeSubmit"),this.showFormTransfer(),this.sendAjaxFormSubmit()}_handleFileInputButtonSubmit(e){this.$emitter.publish("beforeFileInputSubmit"),e.preventDefault(),this.uploadFileInput.click()}_handleFileInputChanged(e){this.$emitter.publish("afterFileInputchanged");let t=this.uploadFileInput.files;this.updateSelectedFiles(t)&&this.showSelectedFiles()}updateSelectedFiles(e){let t=this.options;for(let s of(t.selectedFiles=[],e))t.selectedFiles.push(s.name);return!0}showSelectedFiles(){let e=this.options;if(0<e.selectedFiles.length){let t="";e.selectedFiles.forEach(e=>{t+="<li>"+e+"</li>"}),""!==t&&(t="<ul>"+t+"</ul>"),this.selectedFilesContainer.innerHTML=t}}sendAjaxFormSubmit(){let{_client:e,el:t,options:s}=this,i=new FormData(this.form);if(this.uploadFileInputContainer){new FormData;let e=this.uploadFileInputContainer.querySelector('input[type="file"]').files,t=e.length;if(0<t)for(let s=0;s<t;s++)i.append("files[]",e[s])}e.post(this.form.action,i,this._handleResponse.bind(this),s.contentType)}_handleResponse(e){let t=JSON.parse(e);if(this.$emitter.publish("onFormResponse",t),0<t.length){let e=!0,s="";for(let i=0;i<t.length;i+=1)("danger"===t[i].type||"info"===t[i].type)&&(e=!1),s+=t[i].alert;this.hideError(),e&&this._formReset(),this._createResponse(e,s)}else this._onErrorResponse()}_formReset(){this.form.reset(),this.selectedFiles=[],this.updateSelectedFiles(this.selectedFiles),this.selectedFilesContainer&&(this.selectedFilesContainer.innerHTML=""),this.submitButton.removeAttribute("disabled"),this.form.classList.remove(this.options.validationCheckCls),this._selectDropdownPluginInstance&&(this._selectDropdownPluginInstance.resetSelectedOptions(),this._selectDropdownPluginInstance._updateSelectedOptionsOutput())}_onErrorResponse(){let e=window.location,t=new URLSearchParams(e.search);t.set("showError","1"),e.search=t}showError(){let e=r.querySelector(this.el,this.options.errorContainerSelector);e&&e.classList.remove("d-none")}hideError(){let e=new URL(window.location);e.searchParams.delete("showError"),window.history.pushState({},"",e);let t=r.querySelector(this.el,this.options.errorContainerSelector);t&&t.classList.add("d-none")}showFormTransfer(){let e=this.options,t=this.el.querySelector(e.alertSendingMessageSelector).value;this._createResponse(!1,t),this.submitButton.setAttribute("disabled",!0)}_createResponse(e,t){let s=this.options;if(e)this._confirmationText&&(t=this._confirmationText),this.submitResponseContainer.innerHTML='<div class="'+s.confirmMessageCls+`">${t}</div>`;else{let e=this.el.querySelector("."+s.confirmAlertCls);e&&e.remove();let i={msg:t,alertCls:s.alertInfoCls},r=this.getResponseMessageTemplate(i);this.submitResponseContainer.insertAdjacentHTML("beforeend",r)}this.submitResponseContainer.scrollIntoView({behavior:"smooth",block:"end"})}getResponseMessageTemplate(e){let t=this.options,s="",i="";return i=void 0===e.msg?"...":e.msg,s=void 0===e.alertCls?t.alertSuccessCls:e.alertCls,'<div class="'+(void 0===e.messageCls?t.confirmMessageCls:e.messageCls)+' message-template"><div class="alert '+s+' alert-has-icon" role="alert"><span class="icon icon-checkmark-circle" aria-hidden="true"></span><div class="alert-content-container"><div class="alert-content">'+i}scrollToSelf(){this.el.scrollIntoView({})}}},707:(e,t,s)=>{s.d(t,{A:()=>i});class i{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let s=i.toUpperCamelCase(e,t);return i.lcFirst(s)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>i.ucFirst(e.toLowerCase())).join(""):i.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}}}]);

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.