Your IP : 216.73.216.85


Current Path : /home/smartconb/www/armencom33/media/com_eventgallery/dist/
Upload File :
Current File : /home/smartconb/www/armencom33/media/com_eventgallery/dist/eventgallery-checkout-change-debug.js

/*! For license information please see eventgallery-checkout-change-debug.js.LICENSE.txt */
(function(){var __webpack_modules__={"./common/js/Helpers.js":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";function removeElement(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}function mergeObjects(e,t){if(null===t||null===e)return e;for(var n in t)e[n]=t[n];return e}function getElementWidth(e){return e?parseFloat(getComputedStyle(e,null).width.replace("px","")):0}function getElementHeight(e){return e?parseFloat(getComputedStyle(e,null).height.replace("px","")):0}function calcBorderWidth(e,t){for(var n=0,r=0;r<e.length;r++)for(var o=getComputedStyle(e[r],null),c=0;c<t.length;c++){var i=parseFloat(o[t[c]]);isNaN(i)||(n+=i)}return n}function addUrlHashParameter(e,t,n){var r=removeUrlHashParameter(e,t).split("#"),o=r[0],c=r.length>1?r[1].split("&"):[];return c.push(encodeURIComponent(t)+"="+encodeURIComponent(n)),c.length>0?o+"#"+c.join("&"):o}function getUrlHashParameterValue(e,t){var n,r=e.split("#"),o=r.length>1?r[1].split("&"):[];if(o.length>0)for(var c=encodeURIComponent(t)+"=",i=0;i<o.length;i++)0===o[i].indexOf(c,0)&&(n=o[i].replace(c,""));return n}function removeUrlHashParameter(e,t){var n=e.split("#"),r=n[0],o=n.length>1?n[1].split("&"):[];if(o.length>0){for(var c=encodeURIComponent(t)+"=",i=[],l=0;l<o.length;l++)0===o[l].indexOf(c,0)||i.push(o[l]);o=i}return o.length>0?r+"#"+o.join("&"):r}function addUrlParameter(e,t,n){var r,o=removeUrlParameter(e,t).split("#"),c=o[0].split("?");return r=1===c.length?c[0]+"?"+encodeURIComponent(t)+"="+encodeURIComponent(n):c.join("?")+"&"+encodeURIComponent(t)+"="+encodeURIComponent(n),o.length>1?r+"#"+o[1]:r}function removeUrlParameter(e,t){var n,r=e.split("#"),o=r[0].split("?");if(o.length>1){for(var c=encodeURIComponent(t)+"=",i=o[1].split("&"),l=0;l<i.length;l++)0===i[l].indexOf(c,0)&&i.splice(l,1);n=i.length>0?o[0]+"?"+i.join("&"):o[0]}else n=o[0];return r.length>1?n+"#"+r[1]:n}function setCSSStyle(e,t,n){for(var r=0;r<e.length;r++)e[r].style[t]=n}function getOuterHeight(e){var t=e.offsetHeight,n=getComputedStyle(e);return t+(parseInt(n.marginTop)+parseInt(n.marginBottom))}function getParents(e){var t=[];if(null===e)return t;for(;null!=e.parentElement;){var n=e.parentElement;t.push(n),e=n}return t}function getParent(e,t){for(var n=getParents(e),r=0;r<n.length;r++)if(n[r].matches(t))return n[r];return null}function insertAndExecute(htmlElement,newContent){htmlElement.innerHTML=newContent;for(var scripts=Array.prototype.slice.call(htmlElement.getElementsByTagName("script")),i=0;i<scripts.length;i++)if(""!==scripts[i].src){var tag=document.createElement("script");tag.src=scripts[i].src,document.getElementsByTagName("head")[0].appendChild(tag)}else try{eval(scripts[i].innerHTML)}catch(e){console.error(e)}}function forEach(e,t){if(!e)return 0;for(var n=0;n<e.length;n++)t(e[n],n);return e.length}__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{addUrlHashParameter:function(){return addUrlHashParameter},addUrlParameter:function(){return addUrlParameter},calcBorderWidth:function(){return calcBorderWidth},forEach:function(){return forEach},getElementHeight:function(){return getElementHeight},getElementWidth:function(){return getElementWidth},getOuterHeight:function(){return getOuterHeight},getParent:function(){return getParent},getParents:function(){return getParents},getUrlHashParameterValue:function(){return getUrlHashParameterValue},insertAndExecute:function(){return insertAndExecute},mergeObjects:function(){return mergeObjects},removeElement:function(){return removeElement},removeUrlHashParameter:function(){return removeUrlHashParameter},removeUrlParameter:function(){return removeUrlParameter},serializeForm:function(){return serializeForm},setCSSStyle:function(){return setCSSStyle}});var serializeForm=function(e){for(var t=[],n=e.querySelectorAll("input,select,textarea"),r=0;r<n.length;r++){var o=n[r];if(o.name&&!o.disabled&&"file"!==o.type&&"reset"!==o.type&&"submit"!==o.type&&"button"!==o.type)if("select-multiple"===o.type)for(var c=0;c<o.options.length;c++)o.options[c].selected&&t.push(encodeURIComponent(o.name)+"="+encodeURIComponent(o.options[c].value));else("checkbox"!==o.type&&"radio"!==o.type||o.checked)&&t.push(encodeURIComponent(o.name)+"="+encodeURIComponent(o.value))}return t.join("&")}},"./frontend/js/checkout/chance_method.js":function(e,t,n){"use strict";n.r(t);var r=n("./frontend/js/Polyfill.ts"),o=n("./common/js/Helpers.js");function c(){for(var e=document.querySelectorAll("input[name=paymentid]"),t=0;t<e.length;t++){var n=e[t],c=(0,o.getParent)(n,".payment-container").querySelector(".payment-body");n.checked?(document.dispatchEvent(r.default.createNewEvent("eventgallery.payment.selected",{field:n})),c&&(c.style.display="block")):(document.dispatchEvent(r.default.createNewEvent("eventgallery.payment.unselected",{field:n})),c&&(c.style.display="none"))}}function i(){for(var e=document.querySelectorAll("input[name=shippingid]"),t=0;t<e.length;t++){var n=e[t],r=(0,o.getParent)(n,".shipping-container").querySelector(".shipping-body");n.checked?r&&(r.style.display="block"):r&&(r.style.display="none")}}document.addEventListener("DOMContentLoaded",(function(){for(var e=document.querySelectorAll("input[name=paymentid]"),t=0;t<e.length;t++)e[t].addEventListener("click",(function(e){c()}));c();for(var n=document.querySelectorAll("input[name=shippingid]"),r=0;r<n.length;r++)n[r].addEventListener("click",(function(e){i()}));i()}))},"./frontend/js/checkout/change_address.js":function(e,t,n){"use strict";n.r(t);var r=n("./common/js/Helpers.js");document.addEventListener("DOMContentLoaded",(function(){var e,t;function n(){var e=document.querySelectorAll(".eventgallery-checkout-address input");(0,r.forEach)(e,(function(e){e.isRequired=!!e.getAttribute("required"),e.isDisabled=!!e.getAttribute("disabled")}))}function o(){(0,r.forEach)(document.querySelectorAll(".shipping-address"),(function(e){e.setAttribute("disabled","disabled")})),(0,r.forEach)(document.querySelectorAll(".shipping-address-fieldset .is-required"),(function(e){e.classList.remove("required")})),document.querySelector(".shipping-address-fieldset").style.display="none",n()}function c(){(0,r.forEach)(document.querySelectorAll(".shipping-address"),(function(e){e.removeAttribute("disabled")})),(0,r.forEach)(document.querySelectorAll(".shipping-address-fieldset .is-required"),(function(e){e.classList.add("required")})),document.querySelector(".shipping-address-fieldset").style.display="block",n()}function i(){document.querySelector("#shiptodifferentaddress-false").getAttribute("checked")?o():c()}function l(e){(0,r.forEach)(document.querySelectorAll(e+" .eg-is-required"),(function(e){e.classList.remove("required")})),(0,r.forEach)(document.querySelectorAll(e+" .eg-is-required"),(function(e){e.removeAttribute("required")})),(0,r.forEach)(document.querySelectorAll(e+" input"),(function(e){e.setAttribute("disabled","disabled")})),(0,r.forEach)(document.querySelectorAll(e+" textarea"),(function(e){e.setAttribute("disabled","disabled")})),i(),(0,r.forEach)(document.querySelectorAll(e),(function(e){e.style.display="none"}))}function u(e){(0,r.forEach)(document.querySelectorAll(e+" .eg-is-required"),(function(e){e.classList.add("required")})),(0,r.forEach)(document.querySelectorAll(e+" .eg-is-required"),(function(e){e.setAttribute("required","required")})),(0,r.forEach)(document.querySelectorAll(e+" input"),(function(e){e.removeAttribute("disabled")})),(0,r.forEach)(document.querySelectorAll(e+" textarea"),(function(e){e.removeAttribute("disabled")})),i(),(0,r.forEach)(document.querySelectorAll(e),(function(e){e.style.display="block"}))}function a(e){"false"===e.dataset.needsAddressData?(l(".eventgallery-checkout-form-with-address"),u(".eventgallery-checkout-form-without-address")):(l(".eventgallery-checkout-form-without-address"),u(".eventgallery-checkout-form-with-address")),n()}null===(e=document.getElementById("shiptodifferentaddress-false"))||void 0===e||e.addEventListener("click",(function(e){return o()})),null===(t=document.getElementById("shiptodifferentaddress-true"))||void 0===t||t.addEventListener("click",(function(e){return c()})),(0,r.forEach)(document.querySelectorAll("input[name=shippingid]"),(function(e){e.addEventListener("click",(function(){a(e)}))})),(0,r.forEach)(document.querySelectorAll("[required]"),(function(e){e.classList.add("eg-is-required")})),i();var d=document.querySelectorAll("input[name=shippingid][checked=checked]");if(d.length>0)a(d[0]);else{var s=document.querySelectorAll("input[name=shippingid]");s.length>0?s[0].click():(l(".eventgallery-checkout-form-with-address"),l(".eventgallery-checkout-form-without-address"))}}))},"./frontend/js/checkout/change_country.js":function(){document.addEventListener("checkout-address-country-changed",(function(e){!function(e){var t=e.target,n=t.id,r=t.options[t.selectedIndex].value,o=n.replace("_country","_state"),c=document.getElementById(o);if(c){for(var i=c.querySelectorAll("optgroup"),l=0;l<i.length;l++){var u=i[l];u.id===o+"_"+r||u.id===o+"_nocountry"?u.style.display="block":u.style.display="none"}"none"===c.options[c.selectedIndex].parentElement.style.display&&(c.selectedIndex=0)}}(e)}))},"./frontend/js/checkout/index.js":function(e,t,n){n("./frontend/js/checkout/chance_method.js"),n("./frontend/js/checkout/change_address.js"),n("./frontend/js/checkout/change_country.js")},"./frontend/js/Polyfill.ts":function(e,t,n){"use strict";n.r(t);var r=function(){function e(){}return e.removeHtmlElementNode=function(e){null!==e.parentNode&&e.parentNode.removeChild(e)},e.createNewEvent=function(e,t){var n=null;return"function"==typeof CustomEvent?n=new CustomEvent(e,{detail:t}):((n=document.createEvent("Event")).initEvent(e,!0,!0),n.detail=t),n},e}();t.default=r}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__("./frontend/js/checkout/index.js")})();
//# sourceMappingURL=eventgallery-checkout-change-debug.js.map