PageSourceSearch

https://www.energiedirect.at/theme/ba4dacd70df239dc99852063e36894c…/gesagt-getan-theme.FormPlugin.c5b872.js

js energiedirect.at collected 2026-10-05 11:41:08 UTC 15,813 bytes, 1 lines download raw bytes

1(self.webpackChunk=self.webpackChunk||[]).push([[593],{156(e){"use strict";var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l(Array.isArray(e)?[]:{},e,t):e}function n(e,t,r){return e.concat(t).map(function(e){return i(e,r)})}function o(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function a(e,t){try{return t in e}catch(e){return!1}}function l(e,r,s){(s=s||{}).arrayMerge=s.arrayMerge||n,s.isMergeableObject=s.isMergeableObject||t,s.cloneUnlessOtherwiseSpecified=i;var u,c,m=Array.isArray(r);return m!==Array.isArray(e)?i(r,s):m?s.arrayMerge(e,r,s):(c={},(u=s).isMergeableObject(e)&&o(e).forEach(function(t){c[t]=i(e[t],u)}),o(r).forEach(function(t){(!a(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(a(e,t)&&u.isMergeableObject(r[t])?c[t]=(function(e,t){if(!t.customMerge)return l;var r=t.customMerge(e);return"function"==typeof r?r:l})(t,u)(e[t],r[t],u):c[t]=i(r[t],u))}),c)}l.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,r){return l(e,r,t)},{})},e.exports=l},308(e,t,r){"use strict";r.d(t,{A:()=>i});class i{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(e,{detail:t,cancelable:r});return this.el.dispatchEvent(i),i}subscribe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,n=e.split("."),o=r.scope?t.bind(r.scope):t;if(r.once&&!0===r.once){let t=o;o=function(r){i.unsubscribe(e),t(r)}}return this.el.addEventListener(n[0],o),this.listeners.push({splitEventName:n,opts:r,cb:o}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,r)=>([...r.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(r.splitEventName[0],r.cb):e.push(r),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}}},335(e,t,r){"use strict";r.d(t,{A:()=>l});var i=r(156),n=r.n(i);class o{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 r=o.toUpperCamelCase(e,t);return o.lcFirst(r)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>o.ucFirst(e.toLowerCase())).join(""):o.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}var a=r(308);class l{constructor(e,t={},r=!1){if(!(e instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${r}".`);return}this.el=e,this.$emitter=new a.A(this.el),this._pluginName=this._getPluginName(r),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=[this.constructor.options,this.options,e];return t.push(this._getConfigFromDataAttribute()),t.push(this._getOptionsFromDataAttribute()),n().all(t.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_getConfigFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=o.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${t}-config`);return r?window.PluginConfigManager.get(this._pluginName,r):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=o.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${t}-options`);if(r)try{return JSON.parse(r)}catch(e){console.error(`The data attribute "data-${t}-options" could not be parsed to json: ${e.message}`)}return e}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}}},593(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>a});var i=r(335),n=r(871),o=r.n(n);class a extends i.A{init(){this.initFormGroupActiveStates(),this.initShowPasswordButtons(),this.initDifferingBillingAddresses(),this.initPowerBuyInviteForm(),this.initCheckoutRegisterForm(),this.initAboDataCalculator()}initPowerBuyInviteForm(){let e=document.querySelector("#openPowerBuyInvite"),t=document.querySelector(".powerbuy__invite-form");e&&t&&e.addEventListener("click",()=>{e.style.display="none",t.style.display="block"})}initCheckoutRegisterForm(){let e=document.querySelector(".is-act-checkoutregisterpage.is-ctl-register");if(e){let t=e.querySelector("#toggleGuestRegisterForm"),r=e.querySelector("#toggleRegisterForm"),i=e.querySelector(".checkout-main");[r,t].forEach(t=>{t.addEventListener("click",()=>{e.classList.add("-register-open"),i.scrollIntoView({behavior:"smooth",block:"start"})})}),r.addEventListener("click",()=>{this.toggleGuestRegistration(!1)}),t.addEventListener("click",()=>{this.toggleGuestRegistration(!0)})}}toggleGuestRegistration(e){let t=document.querySelector("#personalGuest"),r=document.querySelector("span.js-form-field-toggle-guest-mode");if(t&&r){t.checked=e;let i=r.querySelector("input");e?(i.removeAttribute("required"),i.setAttribute("disabled","disabled"),r.classList.add("d-none")):(i.setAttribute("required","required"),i.removeAttribute("disabled"),r.classList.remove("d-none"))}}initFormGroupActiveStates(){[...document.querySelectorAll(".form__content .form-group .form-label, .register-form .form-group .form-label, .account-address-form .form-group .form-label")].forEac
1h(e=>{let t=e.closest(".form-group"),r=t.querySelector("input, textarea, select");r.addEventListener("focus",()=>{t.classList.add("active")}),r.addEventListener("blur",()=>{t.classList.remove("active")})})}initShowPasswordButtons(){[...document.querySelectorAll(".show-password-button")].forEach(e=>{e.addEventListener("click",()=>{let t=e.closest(".form-group").querySelector("input");t&&("password"===t.type?t.type="text":t.type="password")})})}initDifferingBillingAddresses(){[...document.querySelectorAll('input[name="deliveryBillingDifferent"]')].forEach(e=>{e.addEventListener("change",()=>{let t=e.checked,r=e.closest("form").querySelector(".form-section--billing-different"),i=r.querySelectorAll(".required-if-active");t?(r.classList.add("open"),[...i].forEach(e=>{e.setAttribute("required","required")})):(r.classList.remove("open"),[...i].forEach(e=>{e.removeAttribute("required")}))})})}initAboDataCalculator(){let e=document.querySelector("#calculateAboData");e&&(o().register("locale","de",{delimiters:{thousands:".",decimal:","},currency:{symbol:"€"}}),o().locale("de"),e.addEventListener("click",()=>{let e=document.querySelector("[name=orderedAmount]").value,t=document.querySelector("[name=pricePer100Liter]").value,r=document.querySelector("[name=annualNeed]").value,i=document.querySelector("[name=months]").value;e&&t&&r&&i&&this.calculateAboData(e,t,r,i)}))}calculateAboData(e,t,r,i){var n=e/100*t+39,o=.4*n,a=Math.max(50,(r/100*t+39)/i-o/i),l=Math.max(50,a+o/i);this.renderAboData(39,n,o,a,l)}renderAboData(e,t,r,i,n){document.querySelector(".abfuellpauschaleResult").innerHTML=this.formatAboDataNumber(e),document.querySelector(".totalResult").innerHTML=this.formatAboDataNumber(t),document.querySelector(".downpaymentResult").innerHTML=this.formatAboDataNumber(r),document.querySelector(".newInstallmentResult").innerHTML=this.formatAboDataNumber(i),document.querySelector(".installmentDownpaymentResult").innerHTML=this.formatAboDataNumber(n),document.querySelector(".aboCalculatorData").style.display="block"}formatAboDataNumber(e){return"€ "+o()(Math.round(e)).format("0,0.00")}}},871(e,t,r){var i,n;void 0!==(n="function"==typeof(i=function(){var e,t,r={},i={},n={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},o={currentLocale:n.currentLocale,zeroFormat:n.zeroFormat,nullFormat:n.nullFormat,defaultFormat:n.defaultFormat,scalePercentBy100:n.scalePercentBy100};function a(e,t){this._input=e,this._value=t}return(e=function(i){var n,l,s,u;if(e.isNumeral(i))n=i.value();else if(0===i||void 0===i)n=0;else if(null===i||t.isNaN(i))n=null;else if("string"==typeof i){if(o.zeroFormat&&i===o.zeroFormat)n=0;else if(o.nullFormat&&i===o.nullFormat||!i.replace(/[^0-9]+/g,"").length)n=null;else{for(l in r)if((u="function"==typeof r[l].regexps.unformat?r[l].regexps.unformat():r[l].regexps.unformat)&&i.match(u)){s=r[l].unformat;break}n=(s=s||e._.stringToNumber)(i)}}else n=Number(i)||null;return new a(i,n)}
1).version="2.0.6",e.isNumeral=function(e){return e instanceof a},e._=t={numberToFormat:function(t,r,n){var o,a,l,s,u,c,m,d=i[e.options.currentLocale],h=!1,f=!1,p=0,g="",b="",y=!1;if(a=Math.abs(t=t||0),e._.includes(r,"(")?(h=!0,r=r.replace(/[\(|\)]/g,"")):(e._.includes(r,"+")||e._.includes(r,"-"))&&(u=e._.includes(r,"+")?r.indexOf("+"):t<0?r.indexOf("-"):-1,r=r.replace(/[\+|\-]/g,"")),e._.includes(r,"a")&&(o=!!(o=r.match(/a(k|m|b|t)?/))&&o[1],e._.includes(r," a")&&(g=" "),r=r.replace(RegExp(g+"a[kmbt]?"),""),a>=1e12&&!o||"t"===o?(g+=d.abbreviations.trillion,t/=1e12):a<1e12&&a>=1e9&&!o||"b"===o?(g+=d.abbreviations.billion,t/=1e9):a<1e9&&a>=1e6&&!o||"m"===o?(g+=d.abbreviations.million,t/=1e6):(a<1e6&&a>=1e3&&!o||"k"===o)&&(g+=d.abbreviations.thousand,t/=1e3)),e._.includes(r,"[.]")&&(f=!0,r=r.replace("[.]",".")),l=t.toString().split(".")[0],s=r.split(".")[1],c=r.indexOf(","),p=(r.split(".")[0].split(",")[0].match(/0/g)||[]).length,s?(e._.includes(s,"[")?(s=(s=s.replace("]","")).split("["),b=e._.toFixed(t,s[0].length+s[1].length,n,s[1].length)):b=e._.toFixed(t,s.length,n),l=b.split(".")[0],b=e._.includes(b,".")?d.delimiters.decimal+b.split(".")[1]:"",f&&0===Number(b.slice(1))&&(b="")):l=e._.toFixed(t,0,n),g&&!o&&Number(l)>=1e3&&g!==d.abbreviations.trillion)switch(l=String(Number(l)/1e3),g){case d.abbreviations.thousand:g=d.abbreviations.million;break;case d.abbreviations.million:g=d.abbreviations.billion;break;case d.abbreviations.billion:g=d.abbreviations.trillion}if(e._.includes(l,"-")&&(l=l.slice(1),y=!0),l.length<p)for(var v=p-l.length;v>0;v--)l="0"+l;return c>-1&&(l=l.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+d.delimiters.thousands)),0===r.indexOf(".")&&(l=""),m=l+b+(g||""),h?m=(h&&y?"(":"")+m+(h&&y?")":""):u>=0?m=0===u?(y?"-":"+")+m:m+(y?"-":"+"):y&&(m="-"+m),m},stringToNumber:function(e){var t,r,n,a=i[o.currentLocale],l=e,s={thousand:3,million:6,billion:9,trillion:12};if(o.zeroFormat&&e===o.zeroFormat)r=0;else if(o.nullFormat&&e===o.nullFormat||!e.replace(/[^0-9]+/g,"").length)r=null;else{for(t in r=1,"."!==a.delimiters.decimal&&(e=e.replace(/\./g,"").replace(a.delimiters.decimal,".")),s)if(n=RegExp("[^a-zA-Z]"+a.abbreviations[t]+"(?:\\)|(\\"+a.currency.symbol+")?(?:\\))?)?$"),l.match(n)){r*=Math.pow(10,s[t]);break}r*=((e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1)*Number(e=e.replace(/[^0-9\.]+/g,""))}return r},isNaN:function(e){return"number"==typeof e&&isNaN(e)},includes:function(e,t){return -1!==e.indexOf(t)},insert:function(e,t,r){return e.slice(0,r)+t+e.slice(r)},reduce:function(e,t){if(this===null)throw TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw TypeError(t+" is not a function");var r,i=Object(e),n=i.length>>>0,o=0;if(3==arguments.length)r=arguments[2];else{for(;o<n&&!(o in i);)o++;if(o>=n)throw TypeError("Reduce of empty array with no initial value");r=i[o++]}for(;o<n;o++)o in i&&(r=t(r,i[o],o,i));return r},multiplier:function(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)},correctionFactor:function(){var e=Array.prototype.slice.call(arguments);return e.reduce(function(e,r){var i=t.multiplier(r);return e>i?e:i},1)},toFixed:function(e,t,r,i){var n,o,a,l,s=e.toString().split("."),u=t-(i||0);return a=Math.pow(10,n=2===s.length?Math.min(Math.max(s[1].length,u),t):u),l=(r(e+"e+"+n)/a).toFixed(n),i>t-n&&(o=RegExp("\\.?0{1,"+(i-(t-n))+"}$"),l=l.replace(o,"")),l}},e.options=o,e.formats=r,e.locales=i,e.locale=function(e){return e&&(o.currentLocale=e.toLowerCase()),o.currentLocale},e.localeData=function(e){if(!e)return i[o.currentLocale];if(!i[e=e.toLowerCase()])throw Error("Unknown locale : "+e);return i[e]},e.reset=function(){for(var e in n)o[e]=n[e]},e.zeroFormat=function(e){o.zeroFormat="string"==typeof e?e:null},e.nullFormat=function(e){o.nullFormat="string"==typeof e?e:null},e.defaultFormat=function(e){o.defaultFormat="string"==typeof e?e:"0.0"},e.register=function(e,t,r){if(t=t.toLowerCase(),this[e+"s"][t])throw TypeError(t+" "+e+" already registered.");return this[e+"s"][t]=r,r},e.validate=function(t,r){var i,n,o,a,l,s,u,c;if("string"!=typeof t&&(t+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",t)),(t=t.trim()).match(/^\d+$/))return!0;
1if(""===t)return!1;try{u=e.localeData(r)}catch(t){u=e.localeData(e.locale())}return o=u.currency.symbol,l=u.abbreviations,i=u.delimiters.decimal,n="."===u.delimiters.thousands?"\\.":u.delimiters.thousands,(null===(c=t.match(/^[^\d]+/))||(t=t.substr(1),c[0]===o))&&(null===(c=t.match(/[^\d]+$/))||(t=t.slice(0,-1),c[0]===l.thousand||c[0]===l.million||c[0]===l.billion||c[0]===l.trillion))&&(s=RegExp(n+"{2}"),!t.match(/[^\d.,]/g)&&!((a=t.split(i)).length>2)&&(a.length<2?!!a[0].match(/^\d+.*\d$/)&&!a[0].match(s):1===a[0].length?!!a[0].match(/^\d+$/)&&!a[0].match(s)&&!!a[1].match(/^\d+$/):!!a[0].match(/^\d+.*\d$/)&&!a[0].match(s)&&!!a[1].match(/^\d+$/)))},e.fn=a.prototype={clone:function(){return e(this)},format:function(t,i){var n,a,l,s=this._value,u=t||o.defaultFormat;if(i=i||Math.round,0===s&&null!==o.zeroFormat)a=o.zeroFormat;else if(null===s&&null!==o.nullFormat)a=o.nullFormat;else{for(n in r)if(u.match(r[n].regexps.format)){l=r[n].format;break}a=(l=l||e._.numberToFormat)(s,u,i)}return a},value:function(){return this._value},input:function(){return this._input},set:function(e){return this._value=Number(e),this},add:function(e){var r=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([this._value,e],function(e,t,i,n){return e+Math.round(r*t)},0)/r,this},subtract:function(e){var r=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([e],function(e,t,i,n){return e-Math.round(r*t)},Math.round(this._value*r))/r,this},multiply:function(e){return this._value=t.reduce([this._value,e],function(e,r,i,n){var o=t.correctionFactor(e,r);return Math.round(e*o)*Math.round(r*o)/Math.round(o*o)},1),this},divide:function(e){return this._value=t.reduce([this._value,e],function(e,r,i,n){var o=t.correctionFactor(e,r);return Math.round(e*o)/Math.round(r*o)}),this},difference:function(t){return Math.abs(e(this._value).subtract(t).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),e})?i.call(t,r,t,e):i)&&(e.exports=n)}}]);

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.