PageSourceSearch

https://www.igus.sg/r05/staticContent/r17/igus.checkout-1.35.js

js igus.sg collected 2026-10-07 03:59:39 UTC 72,108 bytes, 1 lines download raw bytes

1var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),Validation,H,MMA;$(document).ready(function(){window.self==window.top&&setInterval(function(){fetch(localRoot+"frameparts/alive")},6e5)}),function(n){var t,i;(function(n){n.red="bg-signal-danger";n.yellow="bg-signal-state";n.green="bg-signal-success";n.blue="bg-signal-info"})(t=n.alertColorMode||(n.alertColorMode={}));i=function(){function i(){}return i.showError=function(n,r,u){console.log(u);i.showAlert("Error","Error connecting the server. ("+n+")",t.red)},i.showAlert=function(i,r,u){n.Utils.cancelAutoHide();var f=$("#MsgAlert");f.removeClass(t.red);f.removeClass(t.yellow);f.removeClass(t.green);f.removeClass(t.blue);f.addClass(u);$("#MsgAlert .alert-heading").html(i);$("#MsgAlert span").html(r);$("#MsgAlert").css("opacity",100);$("#MsgAlert").removeClass("hidden")},i.hideAlertAnim=function(){this.autoHideTimer=setTimeout(function(){$("#MsgAlert .alert-heading").html("");$("#MsgAlert span").html("");$("#MsgAlert").animate({opacity:"0"},500,function(){$("#MsgAlert").addClass("hidden")})},3e3)},i.hideAlert=function(){$("#MsgAlert .alert-heading").html("");$("#MsgAlert span").html("");$("#MsgAlert").addClass("hidden")},i.cancelAutoHide=function(){clearTimeout(this.autoHideTimer)},i.showBusyState=function(){document.body.style.cursor="wait";$("#blockinglayer").show()},i.hideBusyState=function(){document.body.style.cursor="default";$("#blockinglayer").hide()},i}();n.Utils=i}(MMA||(MMA={})),function(n){var i=function(){function n(n,t){this.control=n;this.validator=t}return Object.defineProperty(n.prototype,"$",{get:function(){return this.control},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},set:function(n){this.setValue(n)},enumerable:!1,configurable:!0}),n.prototype.getValue=function(){if(!this.control)return null;switch(this.control.attr("type")){case"checkbox":return this.control.is(":checked");default:return this.control.val()}},n.prototype.setValue=function(n){if(!this.control)return null;switch(this.control.attr("type")){case"checkbox":this.control.prop("checked",!!n);break;default:this.control.val(n)}},n.prototype.enable=function(){this.control&&this.control.removeAttr("disabled")},n.prototype.disable=function(){this.control&&this.control.attr("disabled","disabled")},n.prototype.validate=function(){return!this.validator||!this.control?null:this.validator.validate(this.value)},n}(),t;n.JQueryFormControl=i;t=function(){function n(n){this.controlsArray=[];this.controls=n;this.controlsArray=H.objPropertiesAsArray(n)}return n.prototype.disable=function(){for(var n in this.controls)this.controls.hasOwnProperty(n)&&this.controls[n].disable()},n.prototype.enable=function(){for(var n in this.controls)this.controls.hasOwnProperty(n)&&this.controls[n].enable()},n.prototype.getValue=function(){var t={};for(var n in this.controls)this.controls.hasOwnProperty(n)&&(t[n]=this.controls[n].value);return t},n.prototype.validate=function(){var t={},n,i;for(n in this.controls)this.controls.hasOwnProperty(n)&&(i=this.controls[n].validate(),i&&(t[n]=i));return Object.keys(t).length>0?t:null},n.prototype.addClassToControls=function(n){this.controlsArray.forEach(function(t){t.$.addClass(n)})},n.prototype.removeClassFromControls=function(n){this.controlsArray.forEach(function(t){t.$.removeClass(n)})},n.prototype.addClassToFaultyFormControls=function(n,t){var i,r;for(i in n)n.hasOwnProperty(i)&&(r=this.controls[i],r&&r.$.addClass(t))},n}();n.FormGroup=t}(MMA||(MMA={})),function(n){function e(n,t){return n&&n.length<t?!1:!0}function o(n,t){return n&&n.length>t?!1:!0}function s(n){return n===null||n===""?!0:!!n.match(r)}function h(n){return n===null||n===""?!0:n?!!n.match(u):void 0}function c(n){return n===null||n===""?!0:n?!!n.match(f):void 0}function l(n){return H.isNothingOrEmpty(n)===!1}function a(n){var t=!!n.match(/[A-Z]+/),i=!!n.match(/[a-z]+/),r=!!n.match(/[0-9]+/);return t&&i&&r}function v(n,t){var i,r,u,f,e,o;return t?(i=$(t),r=!0,i.length>0&&(u=i.attr("isFirstOptionSelectable"),f=parseInt(u)?!0:!1,f||(e=t+" option:eq(0)",o=$(e).val(),i.val()===o&&(r=!1))),r):!0}function y(n,t){var r,i,u;if(n===null||n==="")return!0;r=!0;
1try{if(typeof n!="string"||H.isNothingOrEmpty(n))return!1;i=null;u=typeof t=="string"?t.toUpperCase():"";switch(u){case"DE":i=/^[0-9]{5}$/;break;case"AT":i=/^[1-9][0-9]{3}$/;break;case"PT":i=/^[0-9]{4}-[0-9]{3}$/;break;case"BR":i=/^[0-9]{5}-[0-9]{3}$/;break;case"LU":case"BE":i=/^[0-9]{4}$/;break;case"NL":i=/^[0-9]{4}\s?[A-Za-z]{2}$/;break;case"VN":case"IN":i=/^[0-9]{6}$/;break;case"SE":i=/^[0-9]{3}\s[0-9]{2}$/;break;default:i=/^.{1,50}$/}i!=null&&(r=i.test(n))}catch(f){r=!0}return r}function p(n,t){var r,i,u;if(n===null||n==="")return!0;r=!0;try{if(typeof n!="string"||H.isNothingOrEmpty(n))return!1;i=null;u=typeof t=="string"?t.toUpperCase():"";switch(u){case"IT":i=/^IT[0-9]{11}$/;break;case"FI":i=/^FI[0-9]{8}$/;break;case"BR":return i=/^[0-9]{3}\.[0-9]{3}\.[0-9]{3}-[0-9]{2}$/,r=i.test(n),r||(i=/^[0-9]{2}\.[0-9]{3}\.[0-9]{3}\/[0-9]{4}-[0-9]{2}$/,r=i.test(n)),r;default:i=/^.{1,50}$/}i!=null&&(r=i.test(n))}catch(f){r=!0}return r}var t=function(){function n(n){this.keys=n}return n.prototype.hasKey=function(n){return this.keys.some(function(t){return t===n})},n}(),i,r,u,f,w;n.ValidationResult=t;i=function(){function n(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.validatorFuncs=[];this.add.apply(this,t)}return n.prototype.validate=function(){for(var u,i,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return u=this.validatorFuncs.filter(function(n){return!n.func.apply(n,r)}),i=u.map(function(n){return n.key}),i.length>0?new t(i):null},n.prototype.add=function(){for(var t=this,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];i.forEach(function(n){if(t.validatorFuncs.some(function(t){return t.key===n.key}))throw new Error("validatorFunc with key"+n.key+" already exists");else t.validatorFuncs.push(n)})},n.prototype.remove=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.validatorFuncs=this.validatorFuncs.filter(function(n){t.some(function(t){return typeof t=="string"?t===n.key:t===n})})},n.prototype.clear=function(){this.validatorFuncs=[]},n}();n.Validator=i;n.validateMinChar=e;n.validateMaxChar=o;r=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;n.validateEmailFormat=s;u=/^[0-9]+$/;n.validateNumberFormat=h;f=/^(?:(?:\(?(?:00|\+)([1-4]\d\d|[1-9]\d?)\)?)?[\-\.\ \\\/]?)?((?:\(?\d{1,}\)?[\-\.\ \\\/]?){0,})(?:[\-\.\ \\\/]?(?:#|ext\.?|extension|x)[\-\.\ \\\/]?(\d+))?$/;n.validatePhoneNumberFormat=c;n.validateRequired=l;n.validatePwFormat=a;n.validateDropDownNoFirstOptionSelected=v;n.validateZipcode=y;n.validateVatNo=p,function(t){function r(i){var r=function(t){return n.validateMinChar(t,i)};return{key:t.Keys.min,func:r}}function u(i){var r=function(t){return n.validateMaxChar(t,i)};return{key:t.Keys.max,func:r}}function f(){return{key:t.Keys.emailFormat,func:function(t){return n.validateEmailFormat(t)}}}function e(){return{key:t.Keys.numberFormat,func:function(t){return n.validateNumberFormat(t)}}}function o(){return{key:t.Keys.phoneNumberFormat,func:function(t){return n.validatePhoneNumberFormat(t)}}}function s(){return{func:function(t){return n.validateRequired(t)},key:t.Keys.required}}function h(){return{func:function(t){return n.validatePwFormat(t)},key:t.Keys.pwFormat}}function c(i){var r=function(t){return n.validateZipcode(t,i)};return{key:t.Keys.wrongzip,func:r}}function l(i){var r=function(t){return n.validateVatNo(t,i)};return{key:t.Keys.vatNoFormat,func:r}}function a(i){var r=function(t){return n.validateDropDownNoFirstOptionSelected(t,i)};return{key:t.Keys.noFirstOptionSelected,func:r}}function v(){return{key:t.Keys.ignore,func:function(){return!0}}}var i;(function(n){n.ignore="ignore";n.max="max";n.min="min";n.emailFormat="emailFormat";n.numberFormat="numberFormat";n.phoneNumberFormat="phoneNumberFormat";n.pw="pw";n.required="required";n.pwFormat="pwFormat";n.noFirstOptionSelected="noFirstOptionSelected";n.wrongzip="wrongzip";n.vatNoFormat="vatNoFormat"})(i=t.Keys||(t.Keys={}));t.min=r;t.max=u;t.emailFormat=f;t.numberFormat=e;t.phoneNumberFormat=o;t.required=s;t.pwFormat=h;t.zipcodeFormat=c;t.vatNoFormat=l;t.noFirstOptionSelectedFormat=a;t.ignore=v}(w=n.ValidatorsFns||(n.ValidatorsFns={}))}(Validation||(Validation={})),function(n){function t(n){var t=[];for(var i in n)n.hasOwnProperty(i)&&t.push(n[i]);return t}function i(n){return typeof n=="string"&&n.trim()===""||n===null||n===undefined}n.objPropertiesAsArray=t;n.isNothingOrEmpty=i}(H||(H={}));var VORNAME_ID="firstname",NACHNAME_ID="lastname",EMAIL_ID="email",PW_ID="password",DSGVO_ID="dsgvo_input",ERROR_DIV_CLASS="invalid-feedback",MMA;(function(n){var t=function(){function t(){var n=this;this.prefix="mmaCheckoutRegister_";this.reso=[];this.PW_FORMAT_ERROR_KEY="pwFormat";this.formSubmitTried=!1;window.onload=function(){$(n.id("formSubmit")).click(function(){return n.formSubmit()});n.SHOW_PW_TOGGLE_BTN.click(function(){return n.togglePasswordVisibility()});n.initForm()}}return Object.defineProperty(t.prototype,"SHOW_PW_TOGGLE_BTN",{get:function(){return $(this.id("showPassword"))}
1,enumerable:!1,configurable:!0}),t.prototype.id=function(n){return"#"+this.prefix+n},t.prototype.initForm=function(){var t=this,r=new Validation.Validator(Validation.ValidatorsFns.emailFormat(),Validation.ValidatorsFns.required()),u=new Validation.Validator({key:this.PW_FORMAT_ERROR_KEY,func:this.validatePwFormat},Validation.ValidatorsFns.required(),Validation.ValidatorsFns.min(8),Validation.ValidatorsFns.max(255)),i=new Validation.Validator(Validation.ValidatorsFns.max(50),Validation.ValidatorsFns.required());this.form=new n.FormGroup({firstname:new n.JQueryFormControl($(this.id(VORNAME_ID)),i),lastname:new n.JQueryFormControl($(this.id(NACHNAME_ID)),i),email:new n.JQueryFormControl($(this.id(EMAIL_ID)),r),password:new n.JQueryFormControl($(this.id(PW_ID)),u)});this.initErrorSpans();this.form.controls[EMAIL_ID].$.bind("input",function(){return t.validateControlIfSubmitWasTried(EMAIL_ID)});this.form.controls[VORNAME_ID].$.bind("input",function(){return t.validateControlIfSubmitWasTried(VORNAME_ID)});this.form.controls[PW_ID].$.bind("input",function(){return t.validateControlIfSubmitWasTried(PW_ID)});this.form.controls[NACHNAME_ID].$.bind("input",function(){return t.validateControlIfSubmitWasTried(NACHNAME_ID)})},t.prototype.initErrorSpans=function(){this.errorDivs={};var n=Validation.ValidatorsFns.Keys;this.errorDivs[VORNAME_ID]={};this.errorDivs[VORNAME_ID][n.max]=$(this.id(VORNAME_ID+"-error-max"));this.errorDivs[VORNAME_ID][n.required]=$(this.id(VORNAME_ID+"-error-required"));this.errorDivs[NACHNAME_ID]={};this.errorDivs[NACHNAME_ID][n.max]=$(this.id(NACHNAME_ID+"-error-max"));this.errorDivs[NACHNAME_ID][n.required]=$(this.id(NACHNAME_ID+"-error-required"));this.errorDivs[PW_ID]={};this.errorDivs[PW_ID][n.max]=$(this.id(PW_ID+"-error-max"));this.errorDivs[PW_ID][n.required]=$(this.id(PW_ID+"-error-required"));this.errorDivs[PW_ID][n.min]=$(this.id(PW_ID+"-error-min"));this.errorDivs[PW_ID][this.PW_FORMAT_ERROR_KEY]=$(this.id(PW_ID+"-error-format"));this.errorDivs[EMAIL_ID]={};this.errorDivs[EMAIL_ID][n.required]=$(this.id(EMAIL_ID+"-error-required"));this.errorDivs[EMAIL_ID][n.emailFormat]=$(this.id(EMAIL_ID+"-error-format"))},t.prototype.formSubmit=function(){this.formSubmitTried=!0;this.resetFormErrors();var n=this.form.validate();n?this.setFormErrors(n):$(this.id(DSGVO_ID)).is(":checked")?this.sendRegisterAjax():this.missingDsgvoAlert()},t.prototype.togglePasswordVisibility=function(){var n=document.getElementById(this.prefix+PW_ID);n.type==="text"?(n.type="password",$(".fa-eye").removeClass("fa-eye").addClass("fa-eye-slash")):(n.type="text",$(".fa-eye-slash").removeClass("fa-eye-slash").addClass("fa-eye"));this.form.controls[PW_ID].control.focusout()},t.prototype.navigateToNextCartStep=function(){document.location.href=this.nextStepUrl},t.prototype.sendRegisterAjax=function(){var t=this,i=this.form.controls.email.value,r=this.form.controls.firstname.value,u=this.form.controls.lastname.value,f=JSON.stringify({Email:i,Firstname:r,Lastname:u,Password:this.form.controls.password.value});return this.form.disable(),$.ajax({type:"POST",url:this.registerUrl,data:f,contentType:"application/json; charset=utf-8",dataType:"json",async:!0,success:function(n,f){if(f=="success"){var e=Number(n);e>0?t.quickRegister(e,i,r,u):t.registrationFail(n)}else t.registrationFail(n)},error:function(i,r){n.Utils.showError(i.status,i.responseText,r);t.form.enable()}})},t.prototype.quickRegister=function(t,i,r,u){var f=this;$.ajax({type:"POST",url:this.accountBaseUrl+"/success",data:JSON.stringify({Id:t,Email:i,Firstname:r,Name:u}),contentType:"application/json; charset=utf-8",async:!0,success:function(){f.navigateToNextCartStep()},error:function(t,i){n.Utils.showError(t.status,t.responseText,i)}})},t.prototype.registrationFail=function(){n.Utils.showAlert(this.reso.Error,this.reso.AlertRegisterError,n.alertColorMode.red);this.form.enable()},t.prototype.missingDsgvoAlert=function(){n.Utils.showAlert(this.reso.Error,this.reso.DsgvoErrorMessage,n.alertColorMode.red)},t.prototype.setFormErrors=function(n){var t,i;this.hideAllErrorDivs();for(t in n)n.hasOwnProperty(t)&&(i=n[t],n[t]&&this.setErrorStateForControl(t,i))},t.prototype.resetFormErrors=function(){this.hideAllErrorDivs()},t.prototype.hideAllErrorDivs=function(){$("."+ERROR_DIV_CLASS).hide()},t.prototype.validateControlIfSubmitWasTried=function(n){var t,i;this.formSubmitTried&&(t=this.form.controls[n],t)&&(this.removeControlsErrorState(n),i=t.validate(),i)&&this.setErrorStateForControl(n,i)},t.prototype.removeControlsErrorState=function(n){var t=this.errorDivs[n],i=this.form.controls[n];i&&H.objPropertiesAsArray(t).forEach(function(n){return n.hide()})},t.prototype.setErrorStateForControl=function(n,t){var i=this,r=this.form.controls[n];r&&t.keys.forEach(function(t){var r=i.errorDivs[n][t];r&&r.show()})},t.prototype.validatePwFormat=function(n){if(!n)return!0;var t=!!n.match(/[A-Z]+/),i=!!n.match(/[a-z]+/),r=!!n.match(/[0-9]+/);return t&&i&&r},t}();n.AccountController=t})(MMA||(MMA={})),function(n){var t=function(){function t(n,t,i,r,u,f){this.prefix="mmaCheckoutAddress";this.orderInfoUrl="";this.allInputNames=["Email","Name","FirstName","Company","Street","Zip","State","City","Country","Phone","TaxId"];this.usedInputNames=[];this.validators=[];this.formSubmitTried=!1;this.mainController=n;this.target=t;this.editMode=i?!0:!1;this.showDropDownForState=r?!0:!1;this.websiteCulture=u;this.priceCountry=f}return t.prototype.init=function(n){this.orderInfoUrl=n;this.selectedCountryCode=$(this.getId("Country")).val();$(this.getId("Country")).val(this.selectedCountryCode)},t.prototype.initEvents=function(){var n=this,t;this.editMode?(this.lastCountryCode=this.getSelectedCountryCode(),this.initValidations(),this.initErrorSpans(),this.allInputNames.forEac
1h(function(t,i){var r=n.form.controls[n.allInputNames[i]];if(typeof r!="undefined")switch(r.control[0].localName){case"input":r.$.bind("input",function(){return n.validateControlIfSubmitWasTried(t)});break;case"select":r.$.bind("change",function(){return n.validateControlIfSubmitWasTried(t)})}}),this.target=="Delivery"&&$(this.getId("HideAddressCheckBox")).click(function(){return n.changeDeliveryAddressViewMode()}),this.target=="Invoice"&&(this.checkInvoicePayment(),$(this.getId("Company")).bind("input",function(){return n.checkInvoicePayment()}))):(this.target=="Invoice"&&this.checkInvoicePayment(),t=this.getId("Change"),$(t).click(function(){return n.changeAddressEditMode()}))},t.prototype.checkInvoicePayment=function(){var n=this,t=$(this.getId("Company")).val(),i=t.length>0;(this.priceCountry.toUpperCase()=="DE"||this.priceCountry.toUpperCase()=="CH")&&$("input[name='paymentOption']").each(function(t,r){$(r).attr("id")=="NInvoice"&&(i?$(r).removeAttr("disabled"):($(r).is(":checked")&&($(r).removeAttr("checked"),n.mainController.alertMissingCompanyName()),$(r).attr("disabled","disabled")))})},t.prototype.initErrorSpans=function(){this.errorDivs={};var n=Validation.ValidatorsFns.Keys;this.errorDivs.Email={};this.errorDivs.Email[n.max]=$(this.getId("Email")+"-error-max");this.errorDivs.Email[n.required]=$(this.getId("Email")+"-error-required");this.errorDivs.Email[n.emailFormat]=$(this.getId("Email")+"-error-format");this.errorDivs.Name={};this.errorDivs.Name[n.max]=$(this.getId("Name")+"-error-max");this.errorDivs.Name[n.required]=$(this.getId("Name")+"-error-required");this.errorDivs.FirstName={};this.errorDivs.FirstName[n.max]=$(this.getId("FirstName")+"-error-max");this.errorDivs.FirstName[n.required]=$(this.getId("FirstName")+"-error-required");this.errorDivs.Company={};this.errorDivs.Company[n.max]=$(this.getId("Company")+"-error-max");this.errorDivs.Company[n.required]=$(this.getId("Company")+"-error-required");this.errorDivs.Company.wrong=$(this.getId("Company")+"-error-wrong");this.errorDivs.Street={};this.errorDivs.Street[n.max]=$(this.getId("Street")+"-error-max");this.errorDivs.Street[n.required]=$(this.getId("Street")+"-error-required");this.errorDivs.Street.wrong=$(this.getId("Street")+"-error-wrong");this.errorDivs.Zip={};this.errorDivs.Zip[n.min]=$(this.getId("Zip")+"-error-min");this.errorDivs.Zip[n.max]=$(this.getId("Zip")+"-error-max");this.errorDivs.Zip[n.required]=$(this.getId("Zip")+"-error-required");this.errorDivs.Zip[n.numberFormat]=$(this.getId("Zip")+"-error-numberFormat");this.errorDivs.Zip[n.wrongzip]=$(this.getId("Zip")+"-error-wrongzip");this.errorDivs.Zip.wrong=$(this.getId("Zip")+"-error-wrong");this.errorDivs.City={};this.errorDivs.City[n.max]=$(this.getId("City")+"-error-max");this.errorDivs.City[n.required]=$(this.getId("City")+"-error-required");this.errorDivs.City.wrong=$(this.getId("City")+"-error-wrong");this.errorDivs.State={};this.errorDivs.State[n.max]=$(this.getId("State")+"-error-max");this.errorDivs.State[n.required]=$(this.getId("State")+"-error-required");this.errorDivs.State[n.noFirstOptionSelected]=$(this.getId("State")+"-error-required");this.errorDivs.Country={};this.errorDivs.Country[n.noFirstOptionSelected]=$(this.getId("Country")+"-error-required");this.errorDivs.Phone={};this.errorDivs.Phone[n.max]=$(this.getId("Phone")+"-error-max");this.errorDivs.Phone[n.required]=$(this.getId("Phone")+"-error-required");this.errorDivs.Phone[n.phoneNumberFormat]=$(this.getId("Phone")+"-error-phoneNumberFormat");this.errorDivs.TaxId={};this.errorDivs.TaxId[n.max]=$(this.getId("TaxId")+"-error-max");this.errorDivs.TaxId[n.required]=$(this.getId("TaxId")+"-error-required");this.errorDivs.TaxId[n.vatNoFormat]=$(this.getId("TaxId")+"-error-vatNoFormat")},t.prototype.changeDeliveryAddressViewMode=function(){var n=$(this.getId("HideAddressBody"));n.toggleClass("hidden")},t.prototype.initValidations=function(){var t=this,i,u,r;this.allInputNames.forEach(function(n){var e=t.getId(n),u=$(e),f;if(u.length>0){t.usedInputNames.push(n);var r=parseInt(u.attr("max")),o=parseInt(u.attr("mmaRequired"))?!0:!1,i=void 0;switch(n){case"Country":i=t.getValidatorsForDropDownElements("Country");break;case"Email":i=new Validation.Validator(Validation.ValidatorsFns.emailFormat());break;case"Zip":f=t.getSelectedCountryCode();i=new Validation.Validator(Validation.ValidatorsFns.zipcodeFormat(f));break;case"State":t.showDropDownForState&&(i=t.getValidatorsForDropDownElements("State"));break;case"Phone":i=new Validation.Validator(Validation.ValidatorsFns.phoneNumberFormat());break;case"TaxId":t.websiteCulture==="IT-it"?(i=new Validation.Validator(Validation.ValidatorsFns.vatNoFormat("IT")),r=0):t.websiteCulture==="FI-en"?(i=new Validation.Validator(Validation.ValidatorsFns.vatNoFormat("FI")),r=0):t.websiteCulture==="BR-pt"&&(i=new Validation.Validator(Validation.ValidatorsFns.vatNoFormat("BR")),r=0)}o&&(i=t.addValidator(i,Validation.ValidatorsFns.required()));r>0&&(i=t.addValidator(i,Validation.ValidatorsFns.max(r)));i&&t.validators.push(i)}});i={};
1this.usedInputNames.forEach(function(f,e){u=$(t.getId(f));r=new n.JQueryFormControl(u,t.validators[e]);switch(f){case"Email":i.Email=r;break;case"Name":i.Name=r;break;case"FirstName":i.FirstName=r;break;case"Company":i.Company=r;break;case"Street":i.Street=r;break;case"Zip":i.Zip=r;break;case"State":i.State=r;break;case"City":i.City=r;break;case"Country":i.Country=r;break;case"Phone":i.Phone=r;break;case"TaxId":i.TaxId=r}});this.form=new n.FormGroup(i)},t.prototype.addValidator=function(n,t){return n||(n=new Validation.Validator),n.add(t),n},t.prototype.validateControlIfSubmitWasTried=function(n){var t,i;this.formSubmitTried&&(t=this.form.controls[n],t)&&(this.removeControlsErrorState(n),i=t.validate(),i)&&this.setErrorStateForControl(n,i)},t.prototype.getValidatorsForDropDownElements=function(n){if(this.hasToCheckFirstOptionSelectable(n)){var t=this.getId(n);return new Validation.Validator(Validation.ValidatorsFns.noFirstOptionSelectedFormat(t))}return new Validation.Validator(Validation.ValidatorsFns.ignore())},t.prototype.hasToCheckFirstOptionSelectable=function(n){var t=!1,f=this.getId(n),i=$(f),r,u;return i.length>0&&(r=i.attr("isFirstOptionSelectable"),u=parseInt(r)?!0:!1,t=!u),t},t.prototype.removeControlsErrorState=function(n){var t=this.errorDivs[n],i=this.form.controls[n];i&&H.objPropertiesAsArray(t).forEach(function(n){return n.hide()})},t.prototype.setErrorStateForControl=function(n,t){var i=this,r=this.form.controls[n];r&&t.keys.forEach(function(t){if(i.errorDivs[n]){var r=i.errorDivs[n][t];r&&r.show()}})},t.prototype.setFormErrors=function(n){var t,i;for(t in n)n.hasOwnProperty(t)&&(i=n[t],n[t]&&this.setErrorStateForControl(t,i))},t.prototype.getId=function(n){return"#"+this.prefix+this.target+n},t.prototype.checkIfStateElementHasToChange=function(t){var f=this,i=this.getSelectedCountryCode(),r,u,e;this.lastCountryCode!=i&&(this.initValidations(),this.initErrorSpans(),this.validateControlIfSubmitWasTried("Zip"));this.lastCountryCode=i;r=!1;u=!1;i==="US"||i==="MX"||i==="CA"||i==="ES"?(r=!0,u=!0):this.showDropDownForState&&(u=!0);e=this.orderInfoUrl+"/"+this.target+"StateElementChange";u&&(this.target==="Invoice"?(t.InvoiceShowDropDownState=r,t.InvoiceState=""):(t.DeliveryShowDropDownState=r,t.DeliveryState=""),$.ajax({type:"POST",url:e,contentType:"application/json; charset=utf-8",data:JSON.stringify(t),async:!1,success:function(n){document.body.style.cursor="default";$("#divAddress"+f.target).html(n);f.showDropDownForState=r;f.initEvents()},error:function(t,i){document.body.style.cursor="default";n.Utils.showError(t.status,t.responseText,i)}}))},t.prototype.changeAddressEditMode=function(){var t=this;$.ajax({type:"POST",url:this.orderInfoUrl+"/"+this.target+"EditModeChange",contentType:"application/json; charset=utf-8",async:!1,success:function(n){t.editMode=!t.editMode;document.body.style.cursor="default";$("#divAddress"+t.target).html(n);t.initEvents()},error:function(t,i){document.body.style.cursor="default";n.Utils.showError(t.status,t.responseText,i)}})},t.prototype.getGermanZip=function(){var n=$(this.form.controls.Country.control),t=$("#"+n.attr("id")).val();return t=="DE"?(n=$(this.form.controls.Zip.control),n.val()):null},t.prototype.hasFormControl=function(n){var t=$(this.getId(n));return t.length>0?!0:!1},t.prototype.getData=function(n,t){if(t.noEditModeNoNewValues=!n,this.editMode){var i=void 0,r=void 0;t.Email=$(this.getId("Email")).val();t.Name=$(this.getId("Name")).val();t.FirstName=$(this.getId("FirstName")).val();t.Company=$(this.getId("Company")).val();t.Street=$(this.getId("Street")).val();t.Zip=$(this.getId("Zip")).val();this.showDropDownForState?(i=$(this.getId("State")),r=i.attr("isFirstOptionSelectable"),t.State=i[0].selectedIndex===0&&r==="0"?"":i.val(),t.StateCode=this.getSelectedStateCode()):(t.State=$(this.getId("State")).val(),t.StateCode="");t.City=$(this.getId("City")).val();t.CountryCode=this.getSelectedCountryCode();t.Phone=$(this.getId("Phone")).val()}return t},t.prototype.getSelectedCountryCode=function(){return $(this.getId("Country")).val()},t.prototype.getSelectedStateCode=function(){return $(this.getId("State")+" option:selected").attr("data-statecode")},t}(),r=function(t){function i(n,i,r,u,f){return t.call(this,n,"Invoice",i,r,u,f)||this}return __extends(i,t),i.prototype.init=function(n){t.prototype.init.call(this,n);this.initEvents()},i.prototype.initEvents=function(){var n=this;t.prototype.initEvents.call(this);this.editMode&&$(this.getId("Country")).change(function(){return n.checkIfStateElementHasToChange()})},i.prototype.getData=function(i){var r=new n.AddressInvoiceData;return r=t.prototype.getData.call(this,i,r),r.TaxId=$(this.getId("TaxId")).val(),r},i.prototype.checkIfStateElementHasToChange=function(){var i=this.getData(!0),r=i.mapToPlainObject(new n.AddressDataAjaxTransfer);t.prototype.checkIfStateElementHasToChange.call(this,r)},i}(t),i;n.AddressInvoiceController=r;i=function(t){function i(n,i,r,u,f){return t.call(this,n,"Delivery",i,r,u,f)||this}return __extends(i,t),i.prototype.init=function(n){t.prototype.init.call(this,n);this.initEvents()},i.prototype.initEvents=function(){var n=this;t.prototype.initEvents.call(this);this.editMode&&$(this.getId("Country")).change(function(){return n.checkIfStateElementHasToChange()})},i.prototype.getData=function(i){var r=new n.AddressDeliveryData;return i?this.isDeviantAddressToInvoice()?(r=t.prototype.getData.call(this,i,r),r.DeviantToInvoice=!0):(r.noEditMode
1NoNewValues=!1,r.DeviantToInvoice=!1):r.noEditModeNoNewValues=!0,r},i.prototype.isDeviantAddressToInvoice=function(){return $(this.getId("HideAddressCheckBox")).prop("checked")},i.prototype.checkDeviantAddressCheckState=function(){var n=$(this.getId("HideAddressCheckBox"));this.isDeviantAddressToInvoice()&&$(this.getId("HideAddressBody")).hasClass("hidden")&&(n.prop("checked",!1),n.click());this.isDeviantAddressToInvoice()===!1&&$(this.getId("HideAddressBody")).hasClass("hidden")===!1&&n.prop("checked",!0)},i.prototype.checkIfStateElementHasToChange=function(){var i=this.getData(!0),r=i.mapToPlainObject(new n.AddressDataAjaxTransfer);t.prototype.checkIfStateElementHasToChange.call(this,r)},i}(t);n.AddressDeliveryController=i}(MMA||(MMA={})),function(n){var t=function(){function t(t){t===void 0&&(t=0);var i=this;this.reso=[];this.showOfferDisabled=!1;this.isOfferRequestType=!1;this.orderinfoUrl="";this.checkoutBaseUrl="";this.nextPaymentUrl="";this.nextConfirmUrl="";this.confirmStatus=n.SmartPayStatus.undefined;this.isOrder=!1;this.dataLayer=[];window.onload=function(){i.initEventHandler();switch(i.confirmStatus){case n.SmartPayStatus.canceled:$("#PopupSmartPayFailedConfirm-title").html(i.reso.Hint);$("#PopupSmartPayFailedConfirm-text").html(i.reso.MsgSmartPayCanceled);$("#PopupSmartPayFailedConfirm").show();break;case n.SmartPayStatus.failed:$("#PopupSmartPayFailedConfirm-title").html(i.reso.Error);$("#PopupSmartPayFailedConfirm-text").html(i.reso.MsgSmartPayFailed);$("#PopupSmartPayFailedConfirm").show()}t===1?n.Utils.showAlert(i.reso.Hint,i.reso.AlertWrongDeliveryCountry,n.alertColorMode.blue):t===2?n.Utils.showAlert(i.reso.Hint,i.reso.AlertNoShippingCost,n.alertColorMode.blue):t===3&&n.Utils.showAlert(i.reso.Hint,"Your order has been changed to an inquiry.",n.alertColorMode.blue);i.showOfferDisabled&&n.Utils.showAlert(i.reso.Hint,i.reso.OfferDisableMessage,n.alertColorMode.blue)}}return t.prototype.closePopup=function(n){n.preventDefault();var t=$(n.currentTarget).attr("data-popup-id");$("#"+t).hide()},t.prototype.initEventHandler=function(){var n=this;$("#BtnNextStep").click(function(){return n.checkOptionsAndSubmit()});$("a[data-btn-type=close]").click(function(t){return n.closePopup(t)});$("#BtnChangeOrderType").click(function(){document.location.href=n.checkoutBaseUrl+"/inquirecart?mode="+(n.isOfferRequestType?"offer":"inquiry")});$("#BtnChangePaymentMethod").click(function(){document.location.href=n.orderinfoUrl})},t.prototype.checkOptionsAndSubmit=function(){var r=this,t=!1,i="",u=$("#AgbOption");if(u.length>0&&$("#AgbOption").prop("checked")==!1&&(i+=this.reso.AgbErrorMessage+"\r\n",t=!0),$("#DsgvoOption").prop("checked")==!1&&(i+=this.reso.DsgvoErrorMessage+"\r\n",t=!0),t){n.Utils.showAlert(this.reso.Error,i.replace("\r\n","<br>"),n.alertColorMode.red);return}document.body.style.cursor="wait";$("#blockinglayer").show();clearTimeout(this.timerNum);this.timerNum=setTimeout(function(){return r.sendData()},10)},t.prototype.sendData=function(){var t=this,i=$("#NewsletterOption").prop("checked"),r=$("#CallbackCcPayOption").prop("checked");this.dataLayer!=null&&(i&&this.dataLayer.push({event:"trackEvent",eventCategory:"Service",eventAction:"Subscription|Button",eventLabel:"General Newsletter"}),this.isOrder?this.dataLayer.push({event:"trackEvent",eventCategory:"Enhanced E-Commerce",eventAction:"Purchase",eventLabel:"Order"}):this.dataLayer.push({event:"trackEvent",eventCategory:"Enhanced E-Commerce",eventAction:"Purchase",eventLabel:"Inquiry"}));$.ajax({type:"POST",url:this.checkoutBaseUrl+"/save",data:JSON.stringify({chkNewsletter:i,chkCallbackCcPay:r}),contentType:"application/json; charset=utf-8",success:function(i){document.body.style.cursor="default";switch(i.Status){case n.CheckOutStatus.NextStepConfirm:case n.CheckOutStatus.NextStepPayment:window.sessionStorage&&(sessionStorage.removeItem("checkout_PositionCount"),sessionStorage.removeItem("checkout_DeliveryStateHintShown"));document.location.href=i.NextUrl;break;default:$("#blockinglayer").hide();n.Utils.showAlert(t.reso.Error,t.reso.OrderError,n.alertColorMode.red)}},error:function(t,i){document.body.style.cursor="default";$("#blockinglayer").hide();n.Utils.showError(t.status,t.responseText,i)}})},t}();n.CheckoutController=t}(MMA||(MMA={})),function(n){var t=function(){function t(){var t=this;this.auth=!1;this.reso=[];this.myigusPage="";this.myigusAjaxUrl="";this.confirmUrl="";this.confirmStatus=n.SmartPayStatus.undefined;window.onload=function(){t.initEventHandler();switch(t.confirmStatus){case n.SmartPayStatus.success:n.Utils.showAlert(t.reso.Hint,t.reso.MsgSmartPaySuccess,n.alertColorMode.green);break;case n.SmartPayStatus.failed:n.Utils.showAlert(t.reso.Error,t.reso.MsgSmartPayFailed,n.alertColorMode.red)}}}return t.prototype.register=function(){document.location.href=this.myigusPage+"?page=register"},t.prototype.saveData=function(){var t=this;document.body.style.cursor="wait";try{$.get(this.myigusAjaxUrl+"authstate",function(n){t.auth=n=="1";clearTimeout(t.timerNum);t.timerNum=setTimeout(function(){return t.saveMyigusData()},10)}).fail(function(){document.body.style.cursor="default"})}catch(i){document.body.style.cursor="default";n.Utils.showError(0,i,"error")}},t.prototype.saveMyigusData=function(){var t=this;$.ajax({type:"POST",url:this.confirmUrl+"/savedata",data:JSON.stringify({authState:this.auth}),contentType:"application/json; charset=utf-8",async:!0,success:function(i,r,u){document.body.style.cursor="default";u.status==200&&r=="success"&&i?n.Utils.showAlert(t.reso.Hint,t.reso.MsgSaveDataSuccess,n.alertColorMode.green):((u.status!=200||r!="success")&&console.log(i,r,u),n.Utils.showAlert(t.reso.Error,t.reso.AlertSaveDataFailed,n.alertColorMode.red))},error:function(t,i){document.body.style.cursor="default";n.Utils.showError(t.status,t.responseText,i)}})},t.prototype.initEventHandler=function(){var n=this;$("#BtnSaveData").click(function(){return n.saveData()});$("#BtnRegisterNew").click(function(){return n.register()})},t}();n.ConfirmController=t}(MMA||(MMA={})),function(n){var i=function(){function i(){var n=this;this.reso=[];this.prefix="";this.nextCartUrl="";this.loginUrl="";this.localeFormat="de-DE";window.onload=function(){$("#PopupLastCartConfirm a.btn-close").click(function(){return n.navigateToNextCartStep()});$(n.id("formSubmit")).click(function(){return n.formSubmit()});$(n.id("email")).click(function(){return n.resetFormErrors()});$(n.id("password")).click(function(){return n.resetFormErrors()});$(n.id("email")).keyup(function(t){return n.checkEnter(t)});$(n.id("password")).keyup(function(t){return n.checkEnter(t)});n.passwordToggleBtn.click(function(t){return n.togglePasswordVisibility(t)});n.initForm()}}return Object.defineProperty(i.prototype,"passwordToggleBtn",{get:function(){return $(this.id("togglePwdView"))}
1,enumerable:!1,configurable:!0}),i.prototype.id=function(n){return"#"+this.prefix+n},i.prototype.checkEnter=function(n){var t=n.keyCode?n.keyCode:n.which;t==13&&this.formSubmit()},i.prototype.initForm=function(){var t=new Validation.Validator(Validation.ValidatorsFns.required(),Validation.ValidatorsFns.max(255)),i=new Validation.Validator(Validation.ValidatorsFns.required(),Validation.ValidatorsFns.min(6),Validation.ValidatorsFns.max(255));this.form=new n.FormGroup({email:new n.JQueryFormControl($(this.id(EMAIL_ID)),t),pw:new n.JQueryFormControl($(this.id(PW_ID)),i)})},i.prototype.formSubmit=function(){this.resetFormErrors();var n=this.form.validate();n?this.setFormErrors(n):this.sendLoginAjax()},i.prototype.togglePasswordVisibility=function(n){var t=$(n.currentTarget).siblings("input"),i=t.attr("type");i=="password"?(t.attr("type","text"),$(".fa-eye-slash").removeClass("fa-eye-slash").addClass("fa-eye")):(t.attr("type","password"),$(".fa-eye").removeClass("fa-eye").addClass("fa-eye-slash"))},i.prototype.sendLoginAjax=function(){var i=this,r=new t;r.Username=this.form.controls.email.value;r.Password=this.form.controls.pw.value;this.form.disable();$.ajax({type:"POST",url:this.loginUrl,data:JSON.stringify(r),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){return i.loginSuccess(n)},error:function(t,r){i.clearForm();n.Utils.showError(t.status,t.responseText,r);i.form.enable()}})},i.prototype.loginSuccess=function(n){var u=this,t,i,r;n.status>0?n.lastSession==null?this.navigateToNextCartStep():(t=new Date(n.lastSession),i=t.toLocaleDateString(this.localeFormat),clearTimeout(this.timerNum),this.timerNum=setTimeout(function(){return u.showLastSessionHint(i)},10)):n.status<0?n.status==-2?n.domain&&n.domain.length>0?(r=$("<textarea />").html(this.reso.AccountMigratedNewDomain).text(),this.loginFail(r.replace("{0}",n.domain))):this.loginFail(this.reso.AccountMigrated):this.loginFail(this.reso.AccountLocked):this.loginFail(this.reso.LoginError)},i.prototype.showLastSessionHint=function(n){$("#LastDate").html(n);$("#PopupLastCartConfirm").show()},i.prototype.loginFail=function(n){this.clearForm();this.showError(n);this.form.enable()},i.prototype.navigateToNextCartStep=function(){document.location.href=this.nextCartUrl},i.prototype.setFormErrors=function(n){n.email&&n.email.hasKey("required")||n.pw&&n.pw.hasKey("required")?this.showError(this.reso.LoginError):(n.email||n.pw)&&(this.clearForm(),this.showError(this.reso.LoginError))},i.prototype.clearForm=function(){this.form.controls.email.value="";this.form.controls.pw.value=""},i.prototype.showError=function(n){$("#LoginError span").html(n);$("#LoginError").show()},i.prototype.resetFormErrors=function(){$("#LoginError").hide()},i}(),t;n.LoginController=i;t=function(){function n(){}return n}();n.LoginValue=t}(MMA||(MMA={})),function(n){var t=function(){function t(t,i,r,u){var f=this;this.formSubmitTried=!1;this.furtherInformationInputNames=["VatId","ShippingAccountNumberVS1","ShippingAccountNumberVS2","InformationCustomerNumberEnergyChains","InformationCustomerNumberPlainBearing","InformationOrderNumber","InformationEoriNumber","InformationSupplierNumber","InformationCommissionNumber","InformationPurpose","InformationRemark"];this.doZipCheck=!0;this.prefix="mmaCheckoutOrderInfo";this.reso=[];this.dataLayer=[];this.isoCurrency="";this.orderInfoUrl="";this.checkoutUrl="";this.showInitMessage=!1;this.smartPayValid=!0;this.priceCountry=u;this.addressInvoiceController=new n.AddressInvoiceController(this,t[0],i[0],r,u);this.addressDeliveryController=new n.AddressDeliveryController(this,t[1],i[1],r,u);window.onload=function(){$("input[name='VS1']").change(function(){f.initDeliveryOptions();f.initValidationFurtherInformation()});$("input[name='VS2']").change(function(){f.initDeliveryOptions();f.initValidationFurtherInformation()});$(f.id("formSubmit")).click(function(){return f.onNextClick()});f.init();$("a[data-btn-type=close]").click(function(n){return f.closePopup(n)});$("#"+f.prefix+"SkipVatIdValidation").removeAttr("checked");f.showInitMessage&&f.deliveryOptionChanged()}}return t.prototype.id=function(n){return"#"+this.prefix+n},t.prototype.closePopup=function(n){var t=$(n.currentTarget).attr("data-popup-id");$("#"+t).hide()},t.prototype.continueNext=function(){this.doZipCheck=!1;$("#ZipCodeConfirm").hide();this.onNextClick()},t.prototype.deleteTaxExempt=function(t){var i=this;t.preventDefault();$.ajax({type:"POST",url:this.orderInfoUrl+"/deletetaxexempt",contentType:"application/json; charset=utf-8",async:!1,success:function(t,r){r=="success"&&t==="1"?($("#TaxExemptCurrentFile").hide(),$("#TaxExemptUpload").show()):n.Utils.showAlert(i.reso.Error,"Unable to delete file",n.alertColorMode.red)},error:function(){n.Utils.showAlert(i.reso.Error,"Unable to delete file",n.alertColorMode.red)}})},t.prototype.initDeliveryOptions=function(){var t=this.smartPayValid,n,i;$(this.id("_deliveryOptionsVS1")).length>0&&(n=$("input[name='VS1']:checked"),n.length>0&&(this.updateAccountNumber("VS1",n),i=Number(n.attr("data-price"))<0,t=t&&!i));$(this.id("_deliveryOptionsVS2")).length>0&&(n=$("input[name='VS2']:checked"),n.length>0&&(this.updateAccountNumber("VS2",n),i=Number(n.attr("data-price"))<0,t=t&&!i));$("input[name='paymentOption']").each(function(n,i){$(i).attr("id").substring(0,1)=="O"&&(t?$(i).removeAttr("disabled"):($(i).is(":checked")&&($(i).removeAttr("checked"),$(".optionTab").hide(),$("#intro").show()),$(i).attr("disabled","disabled")))})},t.prototype.updateAccountNumber=function(n,t){var r=t.attr("data-has-accountnumber")==="1",i;r?(i=t.attr("data-label-accountnumber"),$(this.id("_accountLabel"+n)).html(i),$(this.id("_accountInput"+n)).show()):$(this.id("_accountInput"+n)).hide()},t.prototype.init=function(){this.addressInvoiceController.init(this.orderInfoUrl);this.addressDeliveryController.init(this.orderInfoUrl);this.addressDeliveryController.checkDeviantAddressCheckState();this.initDeliveryOptions();this.initValidationFurtherInformation()},t.prototype.onNextClick=function(){var s=this,r,u,o=[],h=[],f,t,i,c,l,e,a;this.showZipPopup=!1;this.formSubmitTried=!0;this.resetFormErrors();f=this.form.validate();this.addressInvoiceController.editMode&&(this.addressInvoiceController.formSubmitTried=!0,t=this.addressInvoiceController.form.validate(),t&&t.Zip||(r=this.addressInvoiceController.getGermanZip(),this.doZipCheck&&r&&r.length>0&&o.push(r)));c=this.addressDeliveryController.isDeviantAddressToInvoice();this.addressDeliveryController.editMode&&(this.addressDeliveryController.formSubmitTried=!0,c&&(i=this.addressDeliveryController.form.validate(),i&&i.Zip||(u=this.addressDeliveryController.getGermanZip(),this.doZipCheck&&u&&u.length>0&&o.push(u))));l=f||t||i;o.length>
10&&$.ajax({type:"POST",url:this.orderInfoUrl+"/validatezip",data:JSON.stringify(o),contentType:"application/json; charset=utf-8",dataType:"json",async:!1,success:function(n,f){f=="success"&&n.forEach(function(n){r&&n==r&&(h.push(n),t=s.addValidationResult(t));u&&n==u&&(h.push(n),i=s.addValidationResult(i))})},error:function(t,i){n.Utils.showError(t.status,t.responseText,i);s.enableForms()}});f||t||i?(e=void 0,f&&(this.setFormErrors(f),e="#divAdditionalData"),c&&i&&(this.addressDeliveryController.setFormErrors(i),e="#divAddressDelivery"),t&&(this.addressInvoiceController.setFormErrors(t),e="#divAddressInvoice"),!l&&this.showZipPopup?($("#WrongZipCodes").html(h.join(", ")),$("#ZipCodeConfirm").show()):(a=$(e).offset().top,$("html, body").animate({scrollTop:a},"slow"))):(this.disableForms(),this.submitOrderInfoData())},t.prototype.addValidationResult=function(n){var u=!1,i={},t,r;if(n)for(t in n)n.hasOwnProperty(t)&&(t=="Zip"&&(r=n[t],r.keys.push("wrongzip"),n[t]=new Validation.ValidationResult(r.keys),u=!0),i[t]=n[t]);return u||(i.Zip=new Validation.ValidationResult(["wrongzip"]),this.showZipPopup=!0),i},t.prototype.getData=function(){var r,f,i,u,t=new n.OrderInfoData;return t.VatId=$("#"+this.prefix+"VatId").val(),t.InvoiceConfirmationCalculateSalesTaxCauseWrongVatId=$("#"+this.prefix+"SkipVatIdValidation").is(":checked"),t.InformationCustomerNumberEnergyChains=$("#"+this.prefix+"InformationCustomerNumberEnergyChains").val(),t.InformationCustomerNumberPlainBearing=$("#"+this.prefix+"InformationCustomerNumberPlainBearing").val(),t.InformationOrderNumber=$("#"+this.prefix+"InformationOrderNumber").val(),t.InformationEoriNumber=$("#"+this.prefix+"InformationEoriNumber").val(),t.InformationSupplierNumber=$("#"+this.prefix+"InformationSupplierNumber").val(),t.InformationCommissionNumber=$("#"+this.prefix+"InformationCommissionNumber").val(),r=$("#"+this.prefix+"InformationPurpose"),r.length>0&&(f=r.attr("isFirstOptionSelectable"),t.InformationPurpose=r[0].selectedIndex===0&&f==="0"?"":$(this.id("InformationPurpose")+" option:selected").attr("data-purpose")),t.InformationRemark=$("#"+this.prefix+"InformationRemark").val(),t.addressInvoiceData=this.addressInvoiceController.getData(this.addressInvoiceController.editMode),t.addressDeliveryData=this.addressDeliveryController.getData(this.addressDeliveryController.editMode),t.PaymentMethod=$("input[name='paymentOption']:checked").val(),$("input[name='tax-exempt']").length>0&&(t.TaxExempt=$("input[name='tax-exempt']:checked").val()==="yes"?!0:!1,t.TaxExempt&&(t.TaxExemptFile=$("input[name='uploaded_files[]']").val())),i=$("input[name='VS1']:checked"),u=i.attr("data-has-accountnumber")==="1",t.ShippingMethodA=i.val(),u&&(t.ShippingAccountNumberA=$("#"+this.prefix+"ShippingAccountNumberVS1").val()),i=$("input[name='VS2']:checked"),u=i.attr("data-has-accountnumber")==="1",t.ShippingMethodB=i.val(),u&&(t.ShippingAccountNumberB=$("#"+this.prefix+"ShippingAccountNumberVS2").val()),t},t.prototype.submitOrderInfoData=function(){var i=this,r=this.getData(),u=r.mapToPlainObject(this.doZipCheck),t=r.PaymentMethod;return t&&t!=null||(t="unkown"),this.dataLayer.push({event:"checkoutOption",ecommerce:{currencyCode:this.isoCurrency,checkout_option:{actionField:{step:3,option:t}}}}),$.ajax({type:"POST",url:this.orderInfoUrl+"/nextcheckout",data:JSON.stringify(u),contentType:"application/json; charset=utf-8",dataType:"json",async:!1,success:function(n){n.GotoCheckout?i.gotoCheckout(n):i.showServerValidationErrors(n)},error:function(t,r){n.Utils.showError(t.status,t.responseText,r);i.enableForms()}})},t.prototype.showServerValidationErrors=function(t){var i,u,r;t.FormValuesVerified?t.VatIdVerified===!1?(i=this.reso.AlertWrongVatId,i+=this.reso.AlertWrongVatIdAdditionalText,n.Utils.showAlert(this.reso.Error,i,n.alertColorMode.red),$("#divSkipVatIdValidationCheckbox").show(),this.setErrorStateForControl("VatId",new Validation.ValidationResult(["wrong"]))):t.UStIdValid?(t.DeliveryOptionsChanged&&(r=$('<form action="'+this.orderInfoUrl+'" method="post"><input type="text" name="initMessage" value="true" /><\/form>'),$("body").append(r),r.submit()),t.MissingPaymentOption&&n.Utils.showAlert(this.reso.Error,this.reso.AlertMissingPaymentMethod,n.alertColorMode.red)):this.addressInvoiceController.hasFormControl("TaxId")&&(this.addressInvoiceController.setErrorStateForControl("TaxId",new Validation.ValidationResult(["vatNoFormat"])),u=$("#divAddressInvoice").offset().top,$("html, body").animate({scrollTop:u},"slow")):(this.serverValidationFailed(),this.enableForms());this.enableForms()},t.prototype.gotoCheckout=function(n){var t,i;n.ChangedToRequestMode?(t=0,t=n.UnsupportedDeliveryCountry?1:n.ShippingOnRequest?2:3,i=$('<form action="'+this.checkoutUrl+'" method="post"><input type="text" name="initMessageNum" value="'+t+'" /><\/form>'),$("body").append(i),i.submit()):document.location.href=this.checkoutUrl},t.prototype.alertMissingCompanyName=function(){n.Utils.showAlert(this.reso.Hint,this.reso.AlertMissingCompanyName,n.alertColorMode.blue)},t.prototype.deliveryOptionChanged=function(){n.Utils.showAlert(this.reso.Error,this.reso.AlertMissingShippingMethod,n.alertColorMode.red)},t.prototype.serverValidationFailed=function(){n.Utils.showAlert("Error","Verification error on the server",n.alertColorMode.red)},t.prototype.enableForms=function(){this.addressInvoiceController.editMode&&this.addressInvoiceController.form.enable();this.addressDeliveryController.editMode&&this.addressDeliveryController.form.enable()},t.prototype.disableForms=function(){this.addressInvoiceController.editMode&&this.addressInvoiceController.form.disable();this.addressDeliveryController.editMode&&this.addressDeliveryController.form.disable()},t.prototype.initValidationFurtherInformation=function(){var t=this,i=[],r;
1this.furtherInformationInputNames.forEach(function(n){var u=$(t.id(n)),o=parseInt(u.attr("max")),f=parseInt(u.attr("mmaRequired"))?!0:!1,r,e;n=="InformationPurpose"&&(r=t.getValidatorsForDropDownElements("InformationPurpose"));$(t.id("_deliveryOptionsVS1")).length>0&&u.attr("id")==t.prefix+"ShippingAccountNumberVS1"&&(e=$("input[name='VS1']:checked"),f=e.attr("data-has-accountnumber")==="1",f&&(r=t.addValidator(r,Validation.ValidatorsFns.numberFormat())));$(t.id("_deliveryOptionsVS2")).length>0&&u.attr("id")==t.prefix+"ShippingAccountNumberVS2"&&(e=$("input[name='VS2']:checked"),f=e.attr("data-has-accountnumber")==="1",f&&(r=t.addValidator(r,Validation.ValidatorsFns.numberFormat())));f?(r=t.addValidator(r,Validation.ValidatorsFns.required()),u.parent().parent().children(".input-heading").addClass("required")):u.parent().parent().children(".input-heading").removeClass("required");o>0&&(r=t.addValidator(r,Validation.ValidatorsFns.max(o)));r?i.push(r):i.push(t.addValidator(r,Validation.ValidatorsFns.ignore()))});this.form=new n.FormGroup({VatId:new n.JQueryFormControl($(this.id(this.furtherInformationInputNames[0])),i[0]),ShippingAccountNumberVS1:new n.JQueryFormControl($(this.id(this.furtherInformationInputNames[1])),i[1]),ShippingAccountNumberVS2:new n.JQueryFormControl($(this.id(this.furtherInformationInputNames[2])),i[2]),InformationCustomerNumberEnergyChains:new n.JQueryFormControl($(this.id(this.furtherInformationInputNames[3])),i[3]),InformationCustomerNumberPlainBearing:new n.JQueryFormControl($(this.id(this.furtherInformationInputNames[4])),i[4]),InformationOrderNumber:new n.JQueryFormControl($(this.id(this.furtherInformationInputNames[5])),i[5]),InformationEoriNumber:new n.JQueryFormControl($(this.id(this.furtherInformationInputNames[6])),i[6]),InformationSupplierNumber:new n.JQueryFormControl($(this.id(this.furtherInformationInputNames[7])),i[7]),InformationCommissionNumber:new n.JQueryFormControl($(this.id(this.furtherInformationInputNames[8])),i[8]),InformationPurpose:new n.JQueryFormControl($(this.id(this.furtherInformationInputNames[9])),i[9]),InformationRemark:new n.JQueryFormControl($(this.id(this.furtherInformationInputNames[10])),i[10])});this.initErrorMessages();this.furtherInformationInputNames.forEach(function(n,i){t.form.controls[t.furtherInformationInputNames[i]].$.bind("input",function(){return t.validateControlIfSubmitWasTried(t.furtherInformationInputNames[i])})});r=!1;$("#divAdditionalData div.input-heading").each(function(n,t){$(t).hasClass("required")&&(r=!0)});r?$("#divAdditionalDataOptionalTitle").hide():$("#divAdditionalDataOptionalTitle").show()},t.prototype.addValidator=function(n,t){return n||(n=new Validation.Validator),n.add(t),n},t.prototype.getValidatorsForDropDownElements=function(n){if(this.hasToCheckFirstOptionSelectable(n)){var t="#"+this.prefix+n;return new Validation.Validator(Validation.ValidatorsFns.noFirstOptionSelectedFormat(t))}return new Validation.Validator(Validation.ValidatorsFns.ignore())},t.prototype.hasToCheckFirstOptionSelectable=function(n){var t=!1,f="#"+this.prefix+n,i=$(f),r,u;return i.length>0&&(r=i.attr("isFirstOptionSelectable"),u=parseInt(r)?!0:!1,t=!u),t},t.prototype.initErrorMessages=function(){var n=this,t;this.errorDivs={};t=Validation.ValidatorsFns.Keys;this.furtherInformationInputNames.forEach(function(i,r){n.errorDivs[n.furtherInformationInputNames[r]]={};n.furtherInformationInputNames[r]=="InformationPurpose"?n.errorDivs[n.furtherInformationInputNames[r]][t.noFirstOptionSelected]=$(n.id(n.furtherInformationInputNames[r]+"-error-required")):(n.errorDivs[n.furtherInformationInputNames[r]][t.max]=$(n.id(n.furtherInformationInputNames[r]+"-error-max")),n.errorDivs[n.furtherInformationInputNames[r]][t.required]=$(n.id(n.furtherInformationInputNames[r]+"-error-required")));(n.furtherInformationInputNames[r]=="ShippingAccountNumberVS1"||n.furtherInformationInputNames[r]=="ShippingAccountNumberVS2")&&(n.errorDivs[n.furtherInformationInputNames[r]][t.numberFormat]=$(n.id(n.furtherInformationInputNames[r]+"-error-numberFormat")));n.furtherInformationInputNames[r]=="VatId"&&(n.errorDivs[n.furtherInformationInputNames[r]].wrong=$(n.id(n.furtherInformationInputNames[r]+"-error-wrong")))})},t.prototype.validateControlIfSubmitWasTried=function(n){var t,i;this.formSubmitTried&&(t=this.form.controls[n],t)&&(this.removeControlsErrorState(n),i=t.validate(),i)&&this.setErrorStateForControl(n,i)},t.prototype.removeControlsErrorState=function(n){var t=this.errorDivs[n],i=this.form.controls[n];i&&H.objPropertiesAsArray(t).forEach(function(n){return n.hide()})},t.prototype.setErrorStateForControl=function(n,t){var i=this,r=this.form.controls[n];r&&t.keys.forEach(function(t){var r=i.errorDivs[n][t];r&&r.show()})},t.prototype.setFormErrors=function(n){var t,i;for(t in n)n.hasOwnProperty(t)&&(i=n[t],n[t]&&this.setErrorStateForControl(t,i))},t.prototype.resetFormErrors=function(){$("."+ERROR_DIV_CLASS).hide()},t}();n.OrderInfoController=t}(MMA||(MMA={})),function(n){var t="/LoginRequest",i="/LoginOffer",r="/LoginOrder",u=function(){function u(){var t=this;this.nextRequestStepDisabled=!1;this.nextOrderStepDisabled=!1;this.shippingMethodA=null;this.shippingMethodB=null;this.shippingOnRequestA=!1;this.shippingOnRequestB=!1;this.auth=!1;this.focusField="";this.isoCurrency="";this.showWrongCountryPopup=!1;this.hasPaymentOptions=!0;this.cartBaseUrl="";this.myigusUrl="";this.dataLayer=[];this.reso=[];this.updateZipCodeCallback=function(n){$("#PopupZipHint").hide();$("#BtnNextOrderStep").popover("dispose");$("#CartGrid").html(n);t.initGridEventHandler()};this.updateZipCodeCallback2=function(n){$("#BtnNextOrderStep").popover("dispose");$("#CartGrid").html(n);t.initGridEventHandler()};this.getItemCommentCallback=function(n){$("#comment").val(n);$("#PopupComment").show()};this.shareCartCallback=function(n,i,r){if(n===null){$('#PopupShareCartFailed a[data-btn-type="close"]').on("click",function(){document.location.href=document.location.href});$("#PopupShareCartFailed-message").html(r);$("#PopupShareCartFailed").show()}else{var u="https://"+document.location.hostname+document.location.pathname+"?ci="+n;$("#shoppingCartLink").val(u);$("#PopupShareCart-message").hide();$("#PopupShareCart").show();i&&$("#PopupShareCart-message").show();$("#shoppingCartLink").select();$("#BtnCopyShareLink").on("click",function(){t.copyShareLinkToClipboard()});$("#shoppingCartLink").on("click",function(){var n=document.getElementById("shoppingCartLink");n.select();n.setSelectionRange(0,n.value.length)})}};this.loadCartCallback=function(n){$("#BtnNextOrderStep").popover("dispose");$("#CartGrid").html(n);t.initGridEventHandler();refreshWakoPosAnzahl()};
1this.saveCartCallback=function(i,r){i?n.Utils.showAlert(t.reso.Hint,r,n.alertColorMode.green):n.Utils.showAlert(t.reso.Error,r,n.alertColorMode.red)};this.sendCartCallback=function(i){i?n.Utils.showAlert(t.reso.MsgBoxSalesforceTitle,t.reso.MsgBoxSalesforceSuccessText,n.alertColorMode.green):n.Utils.showAlert(t.reso.MsgBoxSalesforceTitle,t.reso.MsgBoxSalesforceErrorText,n.alertColorMode.red)}}return u.prototype.closePopup=function(n){n.preventDefault();var t=$(n.currentTarget).attr("data-popup-id");$("#"+t).hide()},u.prototype.updateZipCode=function(){var t=this,i=$("#zipCode").val();n.Utils.showBusyState();clearTimeout(this.timerNum);this.timerNum=setTimeout(function(){return t.updateZipCodeRequest(i)},10)},u.prototype.updateZipCode2=function(t){var i=this;n.Utils.showBusyState();clearTimeout(this.timerNum);this.timerNum=setTimeout(function(){return i.updateZipCodeRequest2(t)},10)},u.prototype.changeInput=function(t,i){var r=this;(t==8||t>=46)&&(n.Utils.showBusyState(),this.focusField=i.attr("id"),clearTimeout(this.timerNum),this.timerNum=setTimeout(function(){return r.updateItems()},1e3))},u.prototype.changeShipmentOption=function(t,i){var r=this;n.Utils.showBusyState();this.focusField=null;clearTimeout(this.timerNum);this.timerNum=setTimeout(function(){return r.updateShipment(t,i)},10)},u.prototype.deleteItem=function(t){var i=this;n.Utils.showBusyState();this.focusField=null;clearTimeout(this.timerNum);this.timerNum=setTimeout(function(){return i.removeItem(t)},10)},u.prototype.editComment=function(n,t){var i=this;this.wakoSessionId=t;this.commentItemId=n;clearTimeout(this.timerNum);this.timerNum=setTimeout(function(){return i.getItemComment(n,t)},10)},u.prototype.updateComment=function(){var n=$("#comment").val(),t=this.commentItemId,i=this.wakoSessionId;this.updateItemComment(t,i,n);$("#comment").val("");$("#PopupComment").hide()},u.prototype.loadCart=function(){var t=this;n.Utils.showBusyState();$(window).scrollTop(0);clearTimeout(this.timerNum);this.timerNum=setTimeout(function(){return t.loadShoppingCart()},10);$("#PopupLoadCartConfirm").hide()},u.prototype.saveCart=function(){var t=this;document.body.style.cursor="wait";try{$.get(this.myigusUrl+"authstate",function(n){t.auth=n=="1";clearTimeout(t.timerNum);t.timerNum=setTimeout(function(){return t.saveShoppingCart(t.auth)},10)}).fail(function(){document.body.style.cursor="default"})}catch(i){document.body.style.cursor="default";n.Utils.showError(0,i,"error")}},u.prototype.sendCart=function(){var t=this;n.Utils.showBusyState();clearTimeout(this.timerNum);this.timerNum=setTimeout(function(){return t.sendShoppingCart()},10)},u.prototype.showZipPopup=function(n){$("#zipCode").val(n);$("#PopupZipHint").show()},u.prototype.showZipCodeCalculationLayer=function(n){$("#BtnNextOrderStep").popover("dispose");var t=n.split("-")[n.split("-").length-1],i=$("#customer-zipCode-"+t).val();$("#zipCode-"+t).val(i)},u.prototype.autoOpenZipCodeCalculationLayer=function(){var n=this;$("[data-calc-shipping-costs-mandatory='1']").each(function(t,i){var u=$(i).find("a[data-calc-shipping-costs-button]").attr("data-calc-shipping-costs-button"),f=$("#zipCode-"+u).val(),r;f.trim().length==0&&(r=$(i).find("span[data-close-calc-shipping-costs]").attr("data-calc-shipping-costs-target"),n.showZipCodeCalculationLayer(r,!1))})},u.prototype.navigateToNextCartStep=function(n,t,i){this.pushCheckoutEvent(t);this.showWrongCountryPopup?this.showPopupWrongCountry(i):($(n).css("cursor","wait"),setTimeout(function(){document.location.href=i},500))},u.prototype.initEventHandler=function(){var t=this,i=this;document.addEventListener("keydown",function(t){t.ctrlKey&&t.altKey&&t.shiftKey&&t.key==="D"&&($("#CartGrid input:text:enabled").each(function(n,t){document.getElementById(t.id).blur()}),$("#_appendCartDebug").length>0?$("#_appendCartDebug").remove():(n.Utils.showBusyState(),setTimeout(function(){return i.showCartDebug()},10)))});$("#BtnUpdateZipCode").click(function(){return t.updateZipCode()});$("#BtnUpdateComment").click(function(){return t.updateComment()});$("#BtnLoadCart").click(function(){return t.loadCart()});$("a[data-btn-type=close]").click(function(n){return t.closePopup(n)});this.initGridEventHandler()},u.prototype.showCartDebug=function(){var i=this,t=this.cartBaseUrl;$.ajax({type:"GET",url:t+"/cartDebug",contentType:"application/json; charset=utf-8",success:function(t){n.Utils.hideBusyState();$("#CartGrid").append(t);var i=document.getElementById("_appendCartDebug");i.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},error:function(){n.Utils.hideBusyState()}})},u.prototype.initGridEventHandler=function(){var t=this;igus.igus114Cart2023ItemTotal.init();igus.igusToggle.init(".toggle");n.Utils.hideAlert();this.showDeliveryStateHint()&&(n.Utils.showAlert(this.reso.Hint,this.reso.ToolTipTextDeliveryStateChanged,n.alertColorMode.blue),window.sessionStorage&&(sessionStorage.setItem("checkout_PositionCount",this.getDeliveryChangedCount().toString()),sessionStorage.setItem("checkout_DeliveryStateHintShown","yes")));$("input[id^=Quantity_]").keyup(function(n){return t.changeInput(n.which?n.which:n.keyCode,$(n.currentTarget))});$("input[id^=Length_]").keyup(function(n){return t.changeInput(n.which?n.which:n.keyCode,$(n.currentTarget))});$("input[id^=deliveryOption]").change(function(n){var i=$(n.currentTarget).attr("name"),r=$(n.currentTarget).attr("id");t.changeShipmentOption(i,r)});
1$("#BtnLoadCartConfirm").click(function(n){n.preventDefault();$("#PopupLoadCartConfirm").show()});$("#BtnSaveCart").click(function(n){n.preventDefault();t.saveCart()});$("#BtnSendCart").click(function(n){n.preventDefault();t.sendCart()});$("#BtnShareCart").hasClass("btn--disabled")||$("#BtnShareCart").click(function(n){n.preventDefault();t.dataLayer.push({event:"trackEvent",eventCategory:"Enhanced E-Commerce",eventAction:"ShareShoppingBasket|Button",eventValue:$("#ShoppingCartEuroCentSum").val()});t.shareShoppingCart()});$("a[id^=BtnDelete_]").click(function(n){n.preventDefault();$(n.currentTarget).css("cursor","wait");var i=Number($(n.currentTarget).attr("data-item-id"));t.deleteItem(i)});$("a[id^=BtnZipCode_]").click(function(n){n.preventDefault();var i=$(n.currentTarget).attr("data-zipcode");t.showZipPopup(i)});$("a[id^=BtnComment_]").click(function(n){n.preventDefault();var i=Number($(n.currentTarget).attr("data-item-id")),r=Number($(n.currentTarget).attr("data-ws-id"));t.editComment(i,r)});$("a[data-open-calc-shipping-costs]").click(function(n){n.preventDefault();var i=$(n.currentTarget).attr("data-calc-shipping-costs-target");t.showZipCodeCalculationLayer(i,!0)});$("a[data-calc-shipping-costs-button]").click(function(n){var u,r,i;n.preventDefault();u=$(n.currentTarget).attr("data-calc-shipping-costs-button");r=$("#zipCode-"+u).val();r.trim().length==0?(i=$(n.currentTarget)[0].previousSibling,$(i).addClass("invalid"),$(i).find("input").val(""),$(i).find("input").focus()):t.updateZipCode2(r)});this.readSelectedDeliveryOption();this.getNextStepStatus();this.setNextRequestClickEvent("BtnNextRequestStep");this.setNextOrderStepStatus()},u.prototype.showPopupWrongCountry=function(n){$("#PopupWrongCountry").show();$("#BtnNextCheckout").unbind("click");$("#BtnNextCheckout").click(function(t){$(t.currentTarget).css("cursor","wait");t.preventDefault();document.location.href=n});$("#BtnViewAllLocations").unbind("click");$("#BtnViewAllLocations").click(function(n){n.preventDefault();$("#PopupWrongCountry").hide();$("#selectDomainPopup").show()})},u.prototype.updateItems=function(){var t=new n.CartRequestData;t.Mode=0;t.Positions=[];this.addPositions(t);this.readSelectedDeliveryOption();this.addDeliveryOptions(t);this.updateShoppingCart(t)},u.prototype.removeItem=function(t){var i=new n.CartRequestData,r;i.Mode=1;i.Positions=[];r=new n.CartPositionValue;r.Id=Number(t);r.Quantity="0";i.Positions.push(r);this.readSelectedDeliveryOption();this.addDeliveryOptions(i);this.updateShoppingCart(i)},u.prototype.updateShipment=function(t,i){var r=new n.CartRequestData,u;r.Mode=0;r.Positions=[];$("div[data-cart-item-total-id='itemtotal-"+t+"']").find("li[data-shipping-option-id^=deliveryOption]").removeClass("selected");u=$("li[data-shipping-option-id='"+i+"'");u.addClass("selected");this.readSelectedDeliveryOption();this.addDeliveryOptions(r);this.updateShoppingCart(r)},u.prototype.updateZipCodeRequest=function(t){var i=this,r=this.cartBaseUrl;$.ajax({type:"POST",url:r+"/updatezip",data:JSON.stringify({zipCode:t}),contentType:"application/json; charset=utf-8",async:!0,success:function(t){n.Utils.hideBusyState();i.updateZipCodeCallback(t)},error:function(t,i){n.Utils.hideBusyState();n.Utils.showError(t.status,t.responseText,i)}})},u.prototype.updateZipCodeRequest2=function(t){var i=this,r=this.cartBaseUrl;$.ajax({type:"POST",url:r+"/updatezip",data:JSON.stringify({zipCode:t}),contentType:"application/json; charset=utf-8",async:!0,success:function(t){n.Utils.hideBusyState();i.updateZipCodeCallback2(t)},error:function(t,i){n.Utils.hideBusyState();n.Utils.showError(t.status,t.responseText,i)}})},u.prototype.updateItemComment=function(t,i,r){var u=this.cartBaseUrl;$.ajax({type:"POST",url:u+"/updatecomment/"+t,data:JSON.stringify({wsid:i,comment:r}),contentType:"application/json; charset=utf-8",async:!1,success:function(){},error:function(t,i){n.Utils.showError(t.status,t.responseText,i)}})},u.prototype.getItemComment=function(t,i){var r=this,u=this.cartBaseUrl;$.ajax({type:"POST",url:u+"/getcomment/"+t,data:JSON.stringify({wsid:i}),contentType:"application/json; charset=utf-8",async:!1,success:function(n){r.getItemCommentCallback(n)},error:function(t,i){n.Utils.showError(t.status,t.responseText,i)}})},u.prototype.updateShoppingCart=function(t){var i=this,r=this.cartBaseUrl;$.ajax({type:"POST",url:r+"/update",data:JSON.stringify(t),contentType:"application/json; charset=utf-8",success:function(t){n.Utils.hideBusyState();i.updateCartCallback(t)},error:function(t,i){n.Utils.hideBusyState();n.Utils.showError(t.status,t.responseText,i)}})},u.prototype.shareShoppingCart=function(){var t=this,i=this.cartBaseUrl;$.ajax({type:"POST",url:i+"/share",data:null,contentType:"application/json; charset=utf-8",async:!1,success:function(n){return t.shareCartCallback(n.sharedKey,n.hasSpecialOffer,n.errorText)},error:function(t,i){n.Utils.showError(t.status,t.responseText,i)}})},u.prototype.loadShoppingCart=function(){var t=this,i=this.cartBaseUrl;$.ajax({type:"POST",url:i+"/loadcart",contentType:"application/json; charset=utf-8",success:function(i){n.Utils.hideBusyState();t.loadCartCallback(i)},error:function(t,i){n.Utils.hideBusyState();n.Utils.showError(t.status,t.responseText,i)}})},u.prototype.saveShoppingCart=function(t){var i=this,r=this.cartBaseUrl;$.ajax({type:"POST",url:r+"/savecart",data:JSON.stringify({authState:t}),contentType:"application/json; charset=utf-8",async:!1,success:function(t){n.Utils.hideBusyState();i.saveCartCallback(t.success,t.message)},error:function(t,i){n.Utils.hideBusyState();n.Utils.showError(t.status,t.responseText,i)}})},u.prototype.sendShoppingCart=function(){var t=this,i=this.cartBaseUrl;$.ajax({type:"POST",url:i+"/sendcart",contentType:"application/json; charset=utf-8",success:function(i){n.Utils.hideBusyState();t.sendCartCallback(i=="1")},error:function(t,i){n.Utils.hideBusyState();n.Utils.showError(t.status,t.responseText,i)}})},u.prototype.updateCartCallback=function(n){if($("#BtnNextOrderStep").popover("dispose"),$("#CartGrid").html(n),this.initGridEventHandler(),refreshWakoPosAnzahl(),this.focusField&&this.focusField.length>0){var t=$("#"+this.focusField),i=t.val();t.focus();t.val("");t.val(i)}},u.prototype.showDeliveryStateHint=function(){var i,n,t;return window.sessionStorage&&(i=sessionStorage.getItem("checkout_DeliveryStateHintShown"),i=="yes")?(n=this.getDeliveryChangedCount(),t=sessionStorage.getItem("checkout_PositionCount"),t!=null&&Number(t)<n)?(sessionStorage.removeItem("checkout_DeliveryStateHintShown"),!0):(sessionStorage.setItem("checkout_PositionCount",n.toString()),!1):this.getDeliveryChangedCount()>0}
1,u.prototype.addPositions=function(t){$("[id^=BasketTile_]").each(function(){var f=$(this),r=f.attr("data-item-id"),e=$("#Quantity_"+r).val(),u=null,i;typeof $("#Length_"+r)!="undefined"&&(u=$("#Length_"+r).val());i=new n.CartPositionValue;i.Id=Number(r);i.Quantity=e;i.Length=u;t.Positions.push(i)})},u.prototype.addDeliveryOptions=function(n){this.shippingMethodA&&typeof this.shippingMethodA!="undefined"&&(n.ShippingMethodA=this.shippingMethodA);this.shippingMethodB&&typeof this.shippingMethodB!="undefined"&&(n.ShippingMethodB=this.shippingMethodB)},u.prototype.readSelectedDeliveryOption=function(){var n=this;this.shippingMethodA=null;this.shippingMethodB=null;this.shippingOnRequestA=!1;this.shippingOnRequestB=!1;$("[id^=DeliveryOptions_]").each(function(t,i){var u=$(i).attr("data-shipping-point"),f=$(i).find("input[name="+u+"]:checked"),r=f.val();typeof r!="undefined"&&u=="VS1"&&(n.shippingMethodA=r,n.shippingOnRequestA=f.attr("data-price")=="-1");typeof r!="undefined"&&u=="VS2"&&(n.shippingMethodB=r,n.shippingOnRequestB=f.attr("data-price")=="-1")})},u.prototype.getNextStepStatus=function(){this.nextRequestStepDisabled=$("#BtnNextRequestStep").hasClass("btn--disabled");this.nextOrderStepDisabled=$("#BtnNextOrderStep").hasClass("btn--disabled")},u.prototype.setNextRequestClickEvent=function(n){var r=this;$("#"+n).click(function(n){if(n.preventDefault(),!r.nextRequestStepDisabled){var u=$("#IsOfferRequestType").val(),f=u=="1"?r.cartBaseUrl+i:r.cartBaseUrl+t;r.navigateToNextCartStep(n.currentTarget,1,f)}})},u.prototype.setNextOrderStepStatus=function(){var t=this,n;this.nextOrderStepDisabled?$("#DisabledMode").val()==="1"?this.showOrderButtonPopover(this.reso.ToolTipHeadWrongInput,this.reso.ToolTipTextWrongInput,!1):$("#DisabledMode").val()==="2"?this.showOrderButtonPopover(this.reso.ToolTipHeadMissingPrice,this.reso.ToolTipTextMissingPrice,!0):(n=$("#BtnNextOrderStep"),n.click(function(n){n.preventDefault()})):this.shippingOnRequestA===!0||this.shippingOnRequestB===!0?this.showOrderButtonPopover(this.reso.ToolTipHeadShippingOnRequest,this.reso.ToolTipTextShippingOnRequest,!0):this.hasPaymentOptions===!1?this.showOrderButtonPopover(this.reso.ToolTipHeadMissingPaymentOptions,this.reso.ToolTipTextMissingPaymentOptions,!0):(n=$("#BtnNextOrderStep"),n.removeClass("btn--disabled"),n.removeClass("disabled"),n.click(function(n){n.preventDefault();t.navigateToNextCartStep(n.currentTarget,2,t.cartBaseUrl+r)}),$("#BtnNextRequestStepClone").off("click"),n.popover("dispose"))},u.prototype.showOrderButtonPopover=function(n,t,i){var e=this,r=$("#BtnNextOrderStep"),u="",f;if(i){f=$("#BtnNextRequestStep").clone(!0,!1).removeClass("btn--secondary").addClass("btn--primary").attr("id","BtnNextRequestStepClone");u=f[0].outerHTML;r.on("shown.bs.popover",function(){e.setNextRequestClickEvent("BtnNextRequestStepClone")})}r.addClass("btn--disabled");r.addClass("disabled");r.popover({trigger:"manual",placement:"top",content:'<a id="NextOrderStepPopoverClose" href="#" class="close">×<\/a><h6>'+n+"<\/h6><p>"+t+"<\/p>"+u,html:!0,container:"body"});r.off("click");r.click(function(n){n.preventDefault();$("#BtnNextOrderStep").popover("toggle")});$("#BtnNextOrderStep").on("shown.bs.popover",function(){$(".popover").addClass("bg-signal-info");$("#NextOrderStepPopoverClose").css("color","white");$("#NextOrderStepPopoverClose").css("opacity","1");$("#NextOrderStepPopoverClose").css("text-shadow","none");$("#NextOrderStepPopoverClose").on("click",function(n){n.preventDefault();$("#BtnNextOrderStep").popover("toggle")})});$("#BtnNextOrderStep").popover("toggle")},u.prototype.getPositionCount=function(){var n=0;return $("div[name$='quantity-input'] div input").each(function(t,i){n+=Number($(i).val())}),n},u.prototype.getDeliveryChangedCount=function(){return $("#CartGrid").find(".deliveryStateAdjusted").length},u.prototype.copyShareLinkToClipboard=function(){var i=$("#shoppingCartLink").val(),t;i&&i.length>0&&(t=document.getElementById("shoppingCartLink"),t.focus(),t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("copy"),n.Utils.showAlert("",this.reso.CopyCartLinkToClipboardSuccessful,n.alertColorMode.green),n.Utils.hideAlertAnim())},u.prototype.pushCheckoutEvent=function(n){try{this.dataLayer.push({event:"checkoutOption",ecommerce:{currencyCode:this.isoCurrency,checkout_option:{actionField:{step:1,option:n==2?"Bestellung":"Anfrage"}}}})}catch(t){}},u}();n.ShoppingCartController=u}(MMA||(MMA={})),function(n){var i,t;
1(function(n){n[n.Undefined=0]="Undefined";n[n.MissingOrderType=1]="MissingOrderType";n[n.FailedWithException=2]="FailedWithException";n[n.FailedPaymentDataNotValid=3]="FailedPaymentDataNotValid";n[n.SaveOrderFailed=4]="SaveOrderFailed";n[n.GetOrderFailed=5]="GetOrderFailed";n[n.OfferDisabledAlert=6]="OfferDisabledAlert";n[n.NextStepPayment=7]="NextStepPayment";n[n.NextStepConfirm=8]="NextStepConfirm";n[n.OnlinePaymentNotAllowed=9]="OnlinePaymentNotAllowed"})(i=n.CheckOutStatus||(n.CheckOutStatus={}));t=function(){function n(){}return n}();n.CheckOutResultData=t}(MMA||(MMA={})),function(n){var f=function(){function n(){}return n.prototype.mapToPlainObject=function(n){var t=new i;return t=this.addressInvoiceData.mapToPlainObject(t),t=this.addressDeliveryData.mapToPlainObject(t),t.TaxExempt=this.TaxExempt,t.TaxExemptFile=this.TaxExemptFile,t.InvoiceVatId=this.VatId,t.InvoiceConfirmationCalculateSalesTaxCauseWrongVatId=this.InvoiceConfirmationCalculateSalesTaxCauseWrongVatId,t.PaymentMethod=this.PaymentMethod,t.ShippingMethodA=this.ShippingMethodA,t.ShippingMethodB=this.ShippingMethodB,t.ShippingAccountNumberA=this.ShippingAccountNumberA,t.ShippingAccountNumberB=this.ShippingAccountNumberB,t.InformationCustomerNumberEnergyChains=this.InformationCustomerNumberEnergyChains,t.InformationCustomerNumberPlainBearing=this.InformationCustomerNumberPlainBearing,t.InformationOrderNumber=this.InformationOrderNumber,t.InformationEoriNumber=this.InformationEoriNumber,t.InformationSupplierNumber=this.InformationSupplierNumber,t.InformationCommissionNumber=this.InformationCommissionNumber,t.InformationPurpose=this.InformationPurpose,t.InformationRemark=this.InformationRemark,t.DoZipCheck=n,t},n}(),t,r,u,i;n.OrderInfoData=f;t=function(){function n(){}return n}();n.AddressDataBase=t;r=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.mapToPlainObject=function(n){return n.InvoiceNoEditModeNoNewValues=this.noEditModeNoNewValues,n.InvoiceEmail=this.Email,n.InvoiceFirstName=this.FirstName,n.InvoiceName=this.Name,n.InvoiceCompany=this.Company,n.InvoiceStreet=this.Street,n.InvoiceZip=this.Zip,n.InvoiceCity=this.City,n.InvoiceCountryCode=this.CountryCode,n.InvoiceState=this.State,n.InvoiceStateCode=this.StateCode,n.InvoicePhone=this.Phone,n.InvoiceTaxId=this.TaxId,n},t}(t);n.AddressInvoiceData=r;u=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.mapToPlainObject=function(n){return n.DeliveryDeviantToInvoice=this.DeviantToInvoice,n.DeliveryNoEditModeNoNewValues=this.noEditModeNoNewValues,n.DeliveryEmail=this.Email,n.DeliveryFirstName=this.FirstName,n.DeliveryName=this.Name,n.DeliveryCompany=this.Company,n.DeliveryStreet=this.Street,n.DeliveryZip=this.Zip,n.DeliveryCity=this.City,n.DeliveryCountryCode=this.CountryCode,n.DeliveryState=this.State,n.DeliveryStateCode=this.StateCode,n.DeliveryPhone=this.Phone,n},t}(t);n.AddressDeliveryData=u;i=function(){function n(){}return n}();n.AddressDataAjaxTransfer=i}(MMA||(MMA={})),function(n){var t=function(){function n(){}return n}();n.OrderInfoResultData=t}(MMA||(MMA={})),function(n){var i=function(){function n(){}return n}(),t;n.CartRequestData=i;t=function(){function n(){}return n}();n.CartPositionValue=t}(MMA||(MMA={})),function(n){var t=function(){function n(){}return n.undefined=0,n.success=1,n.failed=2,n.canceled=3,n}();n.SmartPayStatus=t}(MMA||(MMA={}));

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.