2 lines
126 KiB
JavaScript
2 lines
126 KiB
JavaScript
/*! For license information please see license.bundle.js.LICENSE.txt */
|
|
(()=>{var e={595:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(143);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),l=new q(n||[]);return i(a,"_invoke",{value:L(e,r,l)}),a}function y(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",g="executing",h="completed",m={};function b(){}function k(){}function S(){}var P={};f(P,u,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(D([])));E&&E!==r&&n.call(E,u)&&(P=E);var A=S.prototype=b.prototype=Object.create(P);function C(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(a,i,l,u){var c=y(e[a],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==o(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,l,u)}),(function(e){r("throw",e,l,u)})):t.resolve(f).then((function(e){s.value=e,l(s)}),(function(e){return r("throw",e,l,u)}))}u(c.arg)}var a;i(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,r,n){var o=p;return function(a,i){if(o===g)throw Error("Generator is already running");if(o===h){if("throw"===a)throw i;return{value:e,done:!0}}for(n.method=a,n.arg=i;;){var l=n.delegate;if(l){var u=j(l,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var c=y(t,r,n);if("normal"===c.type){if(o=n.done?h:v,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=h,n.method="throw",n.arg=c.arg)}}}function j(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,j(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=y(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function q(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function D(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(o(t)+" is not iterable")}return k.prototype=S,i(A,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:k,configurable:!0}),k.displayName=f(S,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,s,"GeneratorFunction")),e.prototype=Object.create(A),e},t.awrap=function(e){return{__await:e}},C(O.prototype),f(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new O(d(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},C(A),f(A,s,"Generator"),f(A,u,(function(){return this})),f(A,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=D,q.prototype={constructor:q,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return l.type="throw",l.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function i(e,t,r,n,o,a,i){try{var l=e[a](i),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))}}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function c(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,r=[{key:"getCsrfToken",value:function(){return document.querySelector(idCSRFToken).getAttribute("content")}},{key:"request",value:(f=l(a().mark((function t(r){var n,o,i,l,u,c,s=arguments;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:"GET",o=s.length>2&&void 0!==s[2]?s[2]:null,i=s.length>3&&void 0!==s[3]?s[3]:null,l=e.getUrlFromHash(r,i),u={method:n,headers:{"Content-Type":"application/json","X-CSRFToken":e.getCsrfToken()}},!o||"POST"!==n&&"PUT"!==n&&"PATCH"!==n||(u.body=JSON.stringify(o)),console.log("API request:",n,l,o),t.prev=7,t.next=10,fetch(l,u);case 10:if((c=t.sent).ok){t.next=13;break}throw new Error("HTTP error! status: ".concat(c.status));case 13:return t.next=15,c.json();case 15:return t.abrupt("return",t.sent);case 18:throw t.prev=18,t.t0=t.catch(7),console.error("API request failed:",t.t0),t.t0;case 22:case"end":return t.stop()}}),t,null,[[7,18]])}))),function(e){return f.apply(this,arguments)})},{key:"getUrlFromHash",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null==e&&(e=hashPageHome),console.log("getUrlFromHash:"),console.log("base url: "+_pathHost+"\nhash: "+e+"\nparams: "+t);var r=_pathHost+e;return t&&(r+="?"+new URLSearchParams(t).toString()),console.log("url: "+r),r}},{key:"goToUrl",value:function(e){window.location.href=e}},{key:"goToHash",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.getUrlFromHash(t,r);e.goToUrl(n)}},{key:"loginUser",value:(s=l(a().mark((function t(){var r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r={})[keyCallback]=n.A.getHashPageCurrent(),t.next=4,e.request(hashPageUserLogin,"POST",r);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)}))),function(){return s.apply(this,arguments)})},{key:"getCategories",value:(c=l(a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.request(hashGetStoreProductCategory);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),function(){return c.apply(this,arguments)})},{key:"getCategoriesByFilters",value:(i=l(a().mark((function t(r){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.goToHash(hashPageStoreProductCategories,r);case 1:case"end":return t.stop()}}),t)}))),function(e){return i.apply(this,arguments)})},{key:"saveCategories",value:(o=l(a().mark((function t(r,o,i){var l;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(l={})[flagFormFilters]=n.A.convertForm2JSON(o),l[flagCategory]=r,l[flagComment]=i,t.next=6,e.request(hashSaveStoreProductCategory,"POST",l);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)}))),function(e,t,r){return o.apply(this,arguments)})}],r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o,i,c,s,f}()},143:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(900);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}var l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,o=[{key:"setElementValueCurrent",value:function(e,t){e.setAttribute(attrValueCurrent,t),"checkbox"===e.type?e.checked=t:"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName?e.value=t:e.textContent=t}},{key:"setElementValuePrevious",value:function(e,t){e.setAttribute(attrValuePrevious,t)}},{key:"getCellFromElement",value:function(e){return e.closest("td")}},{key:"getRowFromElement",value:function(e){return e.closest("tr")}},{key:"convertForm2JSON",value:function(t){var r={};if(n.A.isEmpty(t))return console.log("empty form element"),r;var o,a,i,l=t.querySelectorAll("."+flagContainerInput+"."+flagFilter);console.log("containersFilter: "+l);for(var u=0;u<l.length;u++)a=(o=l[u]).querySelector("label").getAttribute("for"),i=o.querySelector("#".concat(a)),r[a]=e.getElementValueCurrent(i);return r}},{key:"loadPageBody",value:function(e){document.querySelector(idPageBody).innerHTML=e}},{key:"getHashPageCurrent",value:function(){var e=document.body.dataset.page;return console.log("hashPageCurrent: "+e),e}},{key:"isElementDirty",value:function(t){t.setAttribute(attrValueCurrent,e.getElementValueCurrent(t));var r=t.getAttribute(attrValuePrevious)!=t.getAttribute(attrValueCurrent);return e.handleDirtyElement(t,r),r}},{key:"handleDirtyElement",value:function(e,t){t?e.classList.add(flagDirty):e.classList.remove(flagDirty)}},{key:"getElementValueCurrent",value:function(e){var t="";return n.A.isEmpty(e)||(t="checkbox"===e.type?e.checked:"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName?e.value:e.textContent),n.A.isEmpty(t)&&(t=""),t}},{key:"isTableElementDirty",value:function(t){var r=e.isElementDirty(t),n=e.getCellFromElement(t);r?n.classList.add(flagDirty):n.classList.remove(flagDirty)}}],(r=[{key:"scrollToElement",value:function(e,t){e.scrollTop(e.scrollTop()+(t.offset().top-e.offset().top))}},{key:"isElementInContainer",value:function(e,t){"function"==typeof jQuery&&(e instanceof jQuery&&(e=e[0]),t instanceof jQuery&&(t=t[0]));var r=e.getBoundingClientRect(),n=t.getBoundingClientRect();return r.top<=n.top&&r.left<=n.left&&n.top+n.height<=r.top+r.height&&n.left+n.width<=r.left+r.width}},{key:"alertError",value:function(e,t){alert(e+"\n"+t)}}])&&a(t.prototype,r),o&&a(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o}()},782:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.d(t,{A:()=>i});var i=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"initialiseEventHandler",value:function(e,t,r){document.querySelectorAll(e).forEach((function(e){e.classList.contains(t)||(e.classList.add(t),r(e))}))}}],null&&o(e.prototype,null),t&&o(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},322:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.d(t,{A:()=>i});var i=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"getLocalStorage",value:function(e){return JSON.parse(localStorage.getItem(e))}},{key:"setLocalStorage",value:function(e,t){localStorage.setItem(e,JSON.stringify(t))}}],null&&o(e.prototype,null),t&&o(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},900:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.d(t,{A:()=>i});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,r=[{key:"isEmpty",value:function(e){var t=!0;if(null!==e&&"null"!==e&&void 0!==e&&"undefined"!==e)if(null==e.length)t=!1;else if("function"==typeof e)t=!1;else{var r="string"==typeof e;if(r&&(e=e.trim()),e.length>0)if(r)t=!1;else if("string"!=typeof e[0])t=!1;else for(var n=0;n<e.length;n++)if(""!=e[n]){t=!1;break}}return t}},{key:"isValidNumber",value:function(t,r){return!e.isEmpty(t)&&!isNaN(t)&&(!r||parseFloat(t)>0)}},{key:"getDataContentType",value:function(t){var r=null,n="";return e.isEmpty(t)||("string"==typeof t?(r=t,n="application/x-www-form-urlencoded; charset=UTF-8"):(r=JSON.stringify(t),n="application/json; charset=UTF-8")),{Data:r,ContentType:n}}},{key:"arrayContainsItem",value:function(t,r){var n=!1;if(!e.isEmpty(t)&&!e.isEmpty(r))if(t[0]instanceof jQuery){for(var o=0;o<t.length;o++)if(document.querySelectorAll(t[o]).is(r)){n=!0;break}}else if(t[0]instanceof Date){for(var a=0;a<t.length;a++)if(t[a].getTime()===r.getTime()){n=!0;break}}else for(var i=0;i<t.length;i++)if(t[i]==r){n=!0;break}return n}},{key:"dictHasKey",value:function(e,t){return t in e}},{key:"areEqualDicts",value:function(e,t){var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var o=0,a=r;o<a.length;o++){var i=a[o];if(e[i]!==t[i])return!1}return!0}},{key:"imageExists",value:function(e,t){var r=new Image;r.onload=function(){t(!0)},r.onerror=function(){t(!1)},r.src=e}},{key:"validateImageUrl",value:function(t,r){e.imageExists(r,(function(e){e&&document.querySelectorAll("#"+t).css({"background-image":"url("+url+")","background-size":"35px 35px"})}))}}],null&&o(t.prototype,null),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}()},255:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BasePage:()=>m});var n=r(782),o=r(322),a=r(595),i=r(143);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var a=t&&t.prototype instanceof b?t:b,i=Object.create(a.prototype),l=new q(n||[]);return o(i,"_invoke",{value:L(e,r,l)}),i}function y(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",g="executing",h="completed",m={};function b(){}function k(){}function S(){}var P={};f(P,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(D([])));E&&E!==r&&n.call(E,i)&&(P=E);var A=S.prototype=b.prototype=Object.create(P);function C(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,a,i,u){var c=y(e[o],e,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,u)}),(function(e){r("throw",e,i,u)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,r,n){var o=p;return function(a,i){if(o===g)throw Error("Generator is already running");if(o===h){if("throw"===a)throw i;return{value:e,done:!0}}for(n.method=a,n.arg=i;;){var l=n.delegate;if(l){var u=j(l,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var c=y(t,r,n);if("normal"===c.type){if(o=n.done?h:v,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=h,n.method="throw",n.arg=c.arg)}}}function j(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,j(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=y(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function q(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function D(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(l(t)+" is not iterable")}return k.prototype=S,o(A,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:k,configurable:!0}),k.displayName=f(S,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,s,"GeneratorFunction")),e.prototype=Object.create(A),e},t.awrap=function(e){return{__await:e}},C(O.prototype),f(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new O(d(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},C(A),f(A,s,"Generator"),f(A,i,(function(){return this})),f(A,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=D,q.prototype={constructor:q,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return l.type="throw",l.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function c(e,t,r,n,o,a,i){try{var l=e[a](i),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){c(a,n,o,i,l,"next",e)}function l(e){c(a,n,o,i,l,"throw",e)}i(void 0)}))}}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function d(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}var y=r(655),p=new(function(){return e=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pages={},this.pages[hashPageHome]={name:"PageHome",pathModule:"./core/home.js"},this.pages[hashPageContact]={name:"PageContact",pathModule:"./core/contact.js"},this.pages[hashPageServices]={name:"PageServices",pathModule:"./core/services.js"},this.pages[hashPageAdminHome]={name:"PageAdminHome",pathModule:"./core/admin_home.js"},this.pages[hashPageAccessibilityStatement]={name:"PageAccessibilityStatement",pathModule:"./legal/accessibility_statement.js"},this.pages[hashPageLicense]={name:"PageLicense",pathModule:"./legal/license.js"},this.pages[hashPageStoreProductCategories]={name:"PageStoreProductCategories",pathModule:"./store/product_categories.js"},this.pages[hashPageStoreProductPermutations]={name:"PageStoreProductPermutations",pathModule:"./store/product_permutations.js"},this.pages[hashPageStoreProducts]={name:"PageStoreProducts",pathModule:"./store/products.js"},this.routes={},this.routes[hashPageHome]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageHome,e)},this.routes[hashPageContact]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageContact,e)},this.routes[hashPageServices]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageServices,e)},this.routes[hashPageAdminHome]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageAdminHome,e)},this.routes[hashPageAccessibilityStatement]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageAccessibilityStatement,e)},this.routes[hashPageLicense]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageLicense,e)},this.routes[hashPageStoreProductCategories]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageStoreProductCategories,e)},this.routes[hashPageStoreProductPermutations]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageStoreProductPermutations,e)},this.routes[hashPageStoreProducts]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageStoreProducts,e)},this.initialize()},t=[{key:"loadPage",value:(l=s(u().mark((function e(t){var r,n,o=arguments;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]&&o[1],console.log("loadPage: "+t),e.next=4,this.getClassPageFromHash(t);case 4:n=e.sent,console.log("PageClass: ",n),this.currentPage=new n,console.log("this.currentPage: ",this.currentPage),this.currentPage.initialize(r);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"getClassPageFromHash",value:(o=s(u().mark((function e(t){var r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.pages[t],console.log("pageJson: ",r),e.prev=2,e.next=5,y(r.pathModule);case 5:return n=e.sent,console.log("module: ",n),e.abrupt("return",n[r.name]);case 10:throw e.prev=10,e.t0=e.catch(2),console.error("Page not found:",t),e.t0;case 14:case"end":return e.stop()}}),e,this,[[2,10]])}))),function(e){return o.apply(this,arguments)})},{key:"initialize",value:function(){window.addEventListener("popstate",this.handlePopState.bind(this))}},{key:"handlePopState",value:function(e){this.loadPageCurrent()}},{key:"loadPageCurrent",value:function(){var e=i.A.getHashPageCurrent();this.loadPage(e)}},{key:"navigateToHash",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.beforeLeave();var n=a.A.getUrlFromHash(e,r);history.pushState(t,"",n),a.A.goToUrl(n,t)}},{key:"beforeLeave",value:(n=s(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getClassPageFromHash(i.A.getHashPageCurrent());case 2:(new(0,e.sent)).leave();case 5:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})}],r=[{key:"loadPageBodyFromResponse",value:function(e){console.log(e.data),i.A.loadPageBody(e.data)}}],t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,n,o,l}());function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function h(e){var t=function(e){if("object"!=v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}var m=function(){function e(){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.title=titlePageCurrent,this.constructor===e)throw new Error("Cannot instantiate abstract class");if(!this.constructor.hash)throw new Error("Class ".concat(this.constructor.name," must have a static hash attribute."))}return t=e,r=[{key:"initialize",value:function(){throw new Error("Method 'initialize()' must be implemented.")}},{key:"sharedInitialize",value:function(){this.logInitialisation(),this.hookupCommonElements()}},{key:"logInitialisation",value:function(){console.log("Initializing "+this.title+" page")}},{key:"hookupCommonElements",value:function(){this.hookupNavigation(),this.hookupImagesLogo()}},{key:"hookupNavigation",value:function(){console.log("hooking up navigation");var e=document.querySelector(idOverlayHamburger).querySelectorAll("div."+flagRow).length;console.log("count nav options: ",e),n.A.initialiseEventHandler(idButtonHamburger,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation();var t=document.querySelector(idOverlayHamburger);t.classList.contains(flagCollapsed)?(t.classList.remove(flagCollapsed),t.classList.add(flagExpanded)):(t.classList.remove(flagExpanded),t.classList.add(flagCollapsed))}))})),this.hookupButtonNavHome(),this.hookupButtonNavServices(),this.hookupButtonNavContact(),this.hookupButtonNavUserAccount(),this.hookupButtonNavUserLogout(),this.hookupButtonNavUserLogin(),this.hookupButtonNavStoreHome(),this.hookupButtonNavStoreProductPermutations(),this.hookupButtonNavStoreStockItems(),this.hookupButtonNavAdminHome()}},{key:"hookupButtonNavHome",value:function(){n.A.initialiseEventHandler("."+flagNavHome,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),p.navigateToHash(hashPageHome)}))}))}},{key:"hookupButtonNavServices",value:function(){n.A.initialiseEventHandler("."+flagNavServices,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),console.log("going to services page"),p.navigateToHash(hashPageServices)}))}))}},{key:"hookupButtonNavContact",value:function(){n.A.initialiseEventHandler("."+flagNavContact,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),p.navigateToHash(hashPageContact)}))}))}},{key:"hookupButtonNavUserAccount",value:function(){n.A.initialiseEventHandler("."+flagNavUserAccount,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),p.navigateToHash(hashPageUserAccount)}))}))}},{key:"hookupButtonNavUserLogout",value:function(){n.A.initialiseEventHandler("."+flagNavUserLogout,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),p.navigateToHash(hashPageUserLogout)}))}))}},{key:"hookupButtonNavUserLogin",value:function(){n.A.initialiseEventHandler("."+flagNavUserLogin,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),a.A.loginUser().then((function(e){e.Success?window.app.router.navigateToUrl(e[keyCallback],null,!1):i.A.alertError("Error",e.Message)}))}))}))}},{key:"hookupButtonNavStoreHome",value:function(){n.A.initialiseEventHandler("."+flagNavStoreHome,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),p.navigateToHash(hashPageStoreHome)}))}))}},{key:"hookupButtonNavStoreProductCategories",value:function(){n.A.initialiseEventHandler("."+flagNavStoreProductCategories,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),p.navigateToHash(hashPageStoreProductCategories)}))}))}},{key:"hookupButtonNavStoreProducts",value:function(){n.A.initialiseEventHandler("."+flagNavStoreProducts,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),p.navigateToHash(hashPageStoreProducts)}))}))}},{key:"hookupButtonNavStoreProductPermutations",value:function(){n.A.initialiseEventHandler("."+flagNavStoreProductPermutations,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),p.navigateToHash(hashPageStoreProductPermutations)}))}))}},{key:"hookupButtonNavStoreProductPrices",value:function(){n.A.initialiseEventHandler("."+flagNavStoreProductPrices,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),p.navigateToHash(hashPageStoreProductPrices)}))}))}},{key:"hookupButtonNavStoreProductVariations",value:function(){n.A.initialiseEventHandler("."+flagNavStoreProductVariations,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),p.navigateToHash(hashPageStoreProductVariations)}))}))}},{key:"hookupButtonNavStoreStockItems",value:function(){n.A.initialiseEventHandler("."+flagNavStoreStockItems,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),p.navigateToHash(hashPageStoreStockItems)}))}))}},{key:"hookupButtonNavAdminHome",value:function(){n.A.initialiseEventHandler("."+flagNavAdminHome,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),p.navigateToHash(hashPageAdminHome)}))}))}},{key:"hookupImagesLogo",value:function(){var e="img."+flagImageLogo;n.A.initialiseEventHandler(e,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),p.navigateToHash(hashPageHome)}))}))}},{key:"hookupOverlayFromId",value:function(e){n.A.initialiseEventHandler(e,flagInitialised,(function(e){e.querySelector("button."+flagClose).addEventListener("click",(function(t){t.stopPropagation(),e.css("display","none")}))}))}},{key:"hookupButtonSave",value:function(){n.A.initialiseEventHandler("form."+flagFilter+" button."+flagSave,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),showOverlayConfirm()})),e.classList.add(flagCollapsed)}))}},{key:"hookupVideos",value:function(){n.A.initialiseEventHandler("video",flagInitialised,(function(e){e.addEventListener("mouseover",videoPlay(e)),e.addEventListener("mouseout",videoPause(e))}))}},{key:"leave",value:function(){if(console.log("Leaving "+this.title+" page"),this.constructor===e)throw new Error("Must implement leave() method.")}},{key:"setLocalStoragePage",value:function(e){o.A.setLocalStorage(this.constructor.hash,e)}},{key:"getLocalStoragePage",value:function(){return o.A.getLocalStorage(this.constructor.hash)}},{key:"toggleShowButtonsSaveCancel",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;null==t&&(t=document.querySelector("form."+flagFilter+" button."+flagSave)),null==r&&(r=document.querySelector("form."+flagFilter+" button."+flagCancel)),e?(r.classList.remove(flagCollapsed),t.classList.remove(flagCollapsed)):(r.classList.add(flagCollapsed),t.classList.add(flagCollapsed))}}],l=[{key:"isDirtyFilter",value:function(e){var t=i.A.isElementDirty(e);return t&&document.querySelectorAll(idTableMain+" tbody tr").remove(),t}}],r&&g(t.prototype,r),l&&g(t,l),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,l}()},992:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TableBasePage:()=>v});var n=r(782),o=r(900),a=r(255),i=r(143);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function c(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}function s(e,t,r){return t=y(t),function(e,t){if(t&&("object"==l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,r||[],y(e).constructor):t.apply(e,r))}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},d.apply(null,arguments)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var v=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=s(this,t)).cursorYInitial=null,e.rowInitial=null,e.placeholder=null,e.dragSrcEl=null,e.dragSrcRow=null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r=t,a=[{key:"initialize",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.constructor===t)throw new Error("Must implement initialize() method.");if(r){var n=this.getLocalStoragePage()[flagFormFilters],a=this.getFormFilters(),l=i.A.convertForm2JSON(a);o.A.areEqualDicts(n,l)}else this.sharedInitialize(),this.hookupFilters(),this.hookupButtonsAddSaveCancel(),this.hookupTableMain(),hookupOverlayConfirm((function(){e.leave(),e.saveRecordsTableDirty()}))}},{key:"hookupFilters",value:function(){if(this.constructor===t)throw new Error("Subclass of TableBasePage must implement method hookupFilters().");this.hookupButtonApplyFilters()}},{key:"hookupFilterActive",value:function(){n.A.initialiseEventHandler(idFormFilters+"."+flagActive,flagInitialised,(function(e){e.addEventListener("change",(function(r){t.isDirtyFilter(e)}))}))}},{key:"hookupButtonApplyFilters",value:function(){var e=this;n.A.initialiseEventHandler(idButtonApplyFilters,flagInitialised,(function(t){t.addEventListener("click",(function(t){t.stopPropagation(),e.getAndLoadFilteredTableContent()}))}))}},{key:"getAndLoadFilteredTableContent",value:function(){var e=this.getFormFilters(),t=i.A.convertForm2JSON(e);this.callFilterTableContent(t).catch((function(e){return console.error("Error:",e)}))}},{key:"getFormFilters",value:function(){return document.querySelector(idFormFilters)}},{key:"callbackLoadTableContent",value:function(e){this.getTableMain().querySelector("tbody").querySelectorAll("tr").forEach((function(e){e.remove()}));var t=e.data[flagRows];!o.A.isEmpty(t)&&t.every((function(e){return e.hasOwnProperty("display_order")}))&&(t=t.sort((function(e,t){return e.display_order-t.display_order}))),t.forEach(this.loadRowTable.bind(this)),this.hookupTableMain()}},{key:"getTableMain",value:function(){return document.querySelector(idTableMain)}},{key:"loadRowTable",value:function(e){throw new Error("Subclass of TableBasePage must implement method loadRowTable().")}},{key:"hookupButtonsAddSaveCancel",value:function(){this.hookupButtonSave(),this.hookupButtonCancel(),this.hookupButtonAddRowTable()}},{key:"saveRecordsTableDirty",value:function(){var e=this,t=this.getTableRecords(!0);if(0!=t.length){var r=this.getFormFilters(),n=i.A.getElementValueCurrent(document.querySelector(idTextareaConfirm));this.callSaveTableContent(t,r,n).then((function(t){t[flagStatus]==flagSuccess?(console.log("Data received:",t),e.callbackLoadTableContent(t),console.log("Records saved!")):showOverlayError(t[flagMessage])})).catch((function(e){return console.error("Error:",e)}))}else showOverlayError("No records to save")}},{key:"getTableRecords",value:function(){var e,t=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.getTableMain(),o=[];return n.querySelectorAll("tbody tr").forEach((function(n){r&&!n.classList.contains(flagDirty)||(e=t.getJsonRow(n),o.push(e))})),o}},{key:"getJsonRow",value:function(e){throw new Error("Subclass of TableBasePage must implement method getJsonRow().")}},{key:"hookupButtonCancel",value:function(){n.A.initialiseEventHandler(idFormFilters+" button."+flagCancel,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),getAndLoadFilteredTableContent()})),e.classList.add(flagCollapsed)}))}},{key:"hookupButtonAddRowTable",value:function(){var e=this;n.A.initialiseEventHandler(idFormFilters+" button."+flagAdd,flagInitialised,(function(t){t.addEventListener("click",(function(t){t.stopPropagation();var r=document.querySelector(idTableMain+" tbody"),n=_rowBlank.cloneNode(!0);n.classList.remove(flagInitialised),n.querySelectorAll("."+flagInitialised).forEach((function(e){e.classList.remove(flagInitialised)}));var o=parseInt(r.querySelector("tr:last-child").querySelector("td."+flagDisplayOrder+" ."+flagSlider).getAttribute(attrValueCurrent))+1;r.appendChild(n);var a=r.querySelector("tr:last-child").querySelector("td."+flagDisplayOrder+" ."+flagSlider);a&&(a.setAttribute(attrValueCurrent,o),a.setAttribute(attrValuePrevious,o)),e.hookupTableMain()}))}))}},{key:"hookupTableMain",value:function(){if(this.constructor===t)throw new Error("Must implement hookupTableMain() method.");null==_rowBlank&&this.cacheRowBlank()}},{key:"cacheRowBlank",value:function(){var e=idTableMain+" tbody tr."+flagRowNew,t=document.querySelector(e);console.log("row blank temp: ",t),_rowBlank=t.cloneNode(!0),document.querySelectorAll(e).forEach((function(e){e.remove()}))}},{key:"hookupSlidersDisplayOrderTable",value:function(){var e=this,t=idTableMain+" tbody tr td."+flagDisplayOrder+" input."+flagSlider+"."+flagDisplayOrder;n.A.initialiseEventHandler(t,flagInitialised,(function(t){t.addEventListener("change",(function(r){console.log("slider change event"),e.handleChangeElementCellTable(t)}))}))}},{key:"hookupTextareasCodeTable",value:function(){var e=this,t=idTableMain+" tbody tr td."+flagCode+" textarea";n.A.initialiseEventHandler(t,flagInitialised,(function(t){t.addEventListener("change",(function(r){console.log("textarea change event"),e.handleChangeElementCellTable(t)}))}))}},{key:"handleChangeElementCellTable",value:function(e){var t=i.A.getRowFromElement(e),r=i.A.getCellFromElement(e);console.log("td: ",r);var n=this.isDirtyRow(t),o=e.classList.contains(flagDirty),a=i.A.isElementDirty(e);if(console.log("isDirtyElement: ",a),console.log("wasDirtyElement: ",o),a!=o){i.A.handleDirtyElement(r,a);var l=this.isDirtyRow(t);if(console.log("isNowDirtyRow: ",l),console.log("wasDirtyRow: ",n),l!=n){i.A.handleDirtyElement(t,l);var u=this.getTableRecords(!0),c=u.length>0;console.log("dirty records:",u),console.log("existsDirtyRecord:",c),this.toggleShowButtonsSaveCancel(c)}}}},{key:"isDirtyRow",value:function(e){throw new Error("Subclass of TableBasePage must implement method isDirtyRow().")}},{key:"toggleShowButtonsSaveCancel",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;null==t&&(t=document.querySelector(idFormFilters+" button."+flagSave)),null==r&&(r=document.querySelector(idFormFilters+" button."+flagCancel)),e?(r.classList.remove(flagCollapsed),t.classList.remove(flagCollapsed)):(r.classList.add(flagCollapsed),t.classList.add(flagCollapsed))}},{key:"handleChangeSelectCellTable",value:function(e){var t=i.A.getRowFromElement(e),r=i.A.getCellFromElement(e);console.log("td: ",r);var n=this.isDirtyRow(t),o=e.classList.contains(flagDirty),a=i.A.isElementDirty(e);if(console.log("isDirtyElement: ",a),console.log("wasDirtyElement: ",o),a!=o){i.A.handleDirtyElement(r,a);var l=e.options[e.selectedIndex];r.setAttribute(attrIdAccessLevel,l.value),r.setAttribute(flagAccessLevelRequired,l.textcontent);var u=this.isDirtyRow(t);if(console.log("isNowDirtyRow: ",u),console.log("wasDirtyRow: ",n),u!=n){i.A.handleDirtyElement(t,u);var c=this.getTableRecords(!0),s=c.length>0;console.log("dirty records:",c),console.log("existsDirtyRecord:",s),this.toggleShowButtonsSaveCancel(s)}}}},{key:"hookupTextareasNameTable",value:function(){var e=this,t=idTableMain+" tbody tr td."+flagName+" textarea";n.A.initialiseEventHandler(t,flagInitialised,(function(t){t.addEventListener("change",(function(r){console.log("textarea change event"),e.handleChangeElementCellTable(t)}))}))}},{key:"hookupTextareasDescriptionTable",value:function(){var e=this,t=idTableMain+" tbody tr td."+flagDescription+" textarea";n.A.initialiseEventHandler(t,flagInitialised,(function(t){t.addEventListener("change",(function(r){console.log("textarea change event"),e.handleChangeElementCellTable(t)}))}))}},{key:"hookupInputsActiveTable",value:function(){var e=this,t=idTableMain+" tbody tr td."+flagActive+' input[type="checkbox"]';n.A.initialiseEventHandler(t,flagInitialised,(function(t){t.addEventListener("change",(function(r){console.log("input change event"),e.handleChangeElementCellTable(t)}))}))}},{key:"hookupTdsAccessLevel",value:function(){var e=this;n.A.initialiseEventHandler(idTableMain+" tbody td."+flagAccessLevel,flagInitialised,(function(t){t.addEventListener("click",(function(t){e.handleClickTdAccessLevel(t)}))}))}},{key:"handleClickTdAccessLevel",value:function(e){console.log("tdAccessLevel clicked"),e.stopPropagation();var t=i.A.getCellFromElement(e.target);console.log("tdAccessLevel: ",t);var r=i.A.getRowFromElement(t),n=t.querySelector("div."+flagAccessLevel).getAttribute(attrIdAccessLevel),o=document.createElement("select");o.classList.add(flagAccessLevel),o.setAttribute(attrValueCurrent,n),o.setAttribute(attrValuePrevious,n),optionsAccessLevel.forEach((function(e){var t=document.createElement("option");t.value=e.value,t.textContent=e.text,e.value==n&&(t.selected=!0),o.appendChild(t)}));var a=t.cloneNode(!0);a.innerHTML="",a.appendChild(o),r.replaceChild(a,t),this.hookupDdlsAccessLevelTable()}},{key:"hookupDdlsAccessLevelTable",value:function(){var e=this;n.A.initialiseEventHandler(idTableMain+" tbody select."+flagAccessLevel,flagInitialised,(function(t){t.addEventListener("change",(function(r){r.stopPropagation(),e.handleChangeDdlAccessLevelTable(t)}))}))}},{key:"handleChangeDdlAccessLevelTable",value:function(e){var t=i.A.getRowFromElement(e),r=i.A.getCellFromElement(e);console.log("td: ",r);var n=this.isDirtyRow(t),o=e.classList.contains(flagDirty),a=i.A.isElementDirty(e);if(console.log("isDirtyElement: ",a),console.log("wasDirtyElement: ",o),a!=o){i.A.handleDirtyElement(r,a);var l=e.options[e.selectedIndex];r.setAttribute(attrIdAccessLevel,l.value),r.setAttribute(flagAccessLevelRequired,l.textcontent);var u=this.isDirtyRow(t);if(console.log("isNowDirtyRow: ",u),console.log("wasDirtyRow: ",n),u!=n){i.A.handleDirtyElement(t,u);var c=this.getTableRecords(!0),s=c.length>0;console.log("dirty records:",c),console.log("existsDirtyRecord:",s),this.toggleShowButtonsSaveCancel(s)}}}},{key:"leave",value:function(){if(this.constructor===t)throw new Error("Must implement leave() method.");var e,r,n;(e=t,r=this,"function"==typeof(n=d(y(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([]);var o=this.getFormFilters(),a={};a[flagFormFilters]=i.A.convertForm2JSON(o),this.setLocalStoragePage(a),_rowBlank=null}}],l=[{key:"isDirtyFilter",value:function(e){var t=i.A.isElementDirty(e);if(t){var r=document.querySelector(idTableMain+" tbody");r.querySelectorAll("tr").remove(),r.appendChild(document.createElement('<div>Press "Apply Filters" to refresh the table.</div>'))}return t}}],a&&u(r.prototype,a),l&&u(r,l),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a,l}(a.BasePage)},623:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PageAdminHome:()=>v});var n=r(782);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function i(e,t,r){return t=c(t),function(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,r||[],c(e).constructor):t.apply(e,r))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},u.apply(null,arguments)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function f(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}var d,y,p,v=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(t,e),r=t,o=[{key:"initialize",value:function(){this.sharedInitialize(),this.hookupAdminStore()}},{key:"hookupAdminStore",value:function(){this.hookupButtonNavStoreProductCategories(),this.hookupButtonNavStoreProducts(),this.hookupButtonNavStoreProductPermutations(),this.hookupButtonNavStoreProductPrices(),this.hookupButtonNavStoreStockItems(),this.hookupButtonNavStoreProductVariations(),this.hookupButtonNavAdminStoreStripeProducts(),this.hookupButtonNavAdminStoreStripePrices()}},{key:"hookupButtonNavAdminStoreStripeProducts",value:function(){n.A.initialiseEventHandler("."+flagNavAdminStoreStripeProducts,flagInitialised,(function(e){e.addEventListener("click",(function(e){router.navigateToHash(hashPageAdminStoreStripeProducts)}))}))}},{key:"hookupButtonNavAdminStoreStripePrices",value:function(){n.A.initialiseEventHandler("."+flagNavAdminStoreStripePrices,flagInitialised,(function(e){e.addEventListener("click",(function(e){router.navigateToHash(hashPageAdminStoreStripePrices)}))}))}},{key:"leave",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=u(c(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([])}}],o&&a(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(r(255).BasePage);d=v,y="hash",p=hashPageAdminHome,(y=f(y))in d?Object.defineProperty(d,y,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[y]=p},722:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function a(e,t,r){return t=l(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(t,r||[],l(e).constructor):t.apply(e,r))}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function c(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.r(t),r.d(t,{PageContact:()=>y});var s,f,d,y=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(t,e),r=t,(n=[{key:"initialize",value:function(){this.sharedInitialize()}}])&&o(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(r(255).BasePage);s=y,f="hash",d=hashPageContact,(f=c(f))in s?Object.defineProperty(s,f,{value:d,enumerable:!0,configurable:!0,writable:!0}):s[f]=d},835:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function a(e,t,r){return t=u(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(t,r||[],u(e).constructor):t.apply(e,r))}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},l.apply(null,arguments)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function s(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.r(t),r.d(t,{PageHome:()=>p});var f,d,y,p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,n=[{key:"initialize",value:function(){this.sharedInitialize(),this.hookupButtonNavContact()}},{key:"leave",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=l(u(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([])}}],n&&o(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(r(255).BasePage);f=p,d="hash",y=hashPageHome,(d=s(d))in f?Object.defineProperty(f,d,{value:y,enumerable:!0,configurable:!0,writable:!0}):f[d]=y},312:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function a(e,t,r){return t=u(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(t,r||[],u(e).constructor):t.apply(e,r))}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},l.apply(null,arguments)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function s(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.r(t),r.d(t,{PageServices:()=>p});var f,d,y,p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,n=[{key:"initialize",value:function(){this.sharedInitialize()}},{key:"leave",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=l(u(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([])}}],n&&o(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(r(255).BasePage);f=p,d="hash",y=hashPageServices,(d=s(d))in f?Object.defineProperty(f,d,{value:y,enumerable:!0,configurable:!0,writable:!0}):f[d]=y},916:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function a(e,t,r){return t=u(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(t,r||[],u(e).constructor):t.apply(e,r))}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},l.apply(null,arguments)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function s(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.r(t),r.d(t,{PageAccessibilityStatement:()=>p});var f,d,y,p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,n=[{key:"initialize",value:function(){this.sharedInitialize()}},{key:"leave",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=l(u(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([])}}],n&&o(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(r(255).BasePage);f=p,d="hash",y=hashPageAccessibilityStatement,(d=s(d))in f?Object.defineProperty(f,d,{value:y,enumerable:!0,configurable:!0,writable:!0}):f[d]=y},765:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function a(e,t,r){return t=u(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(t,r||[],u(e).constructor):t.apply(e,r))}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},l.apply(null,arguments)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function s(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.r(t),r.d(t,{PageLicense:()=>p});var f,d,y,p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,n=[{key:"initialize",value:function(){this.sharedInitialize()}},{key:"leave",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=l(u(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([])}}],n&&o(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(r(255).BasePage);f=p,d="hash",y=hashPageLicense,(d=s(d))in f?Object.defineProperty(f,d,{value:y,enumerable:!0,configurable:!0,writable:!0}):f[d]=y},173:(e,t,r)=>{"use strict";r.r(t),r.d(t,{StoreMixinPage:()=>s});var n=r(782),o=r(322),a=r(900),i=r(143);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function c(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}var s=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},(t=[{key:"initialize",value:function(e){console.log("hookup store start for ",i.A.getHashPageCurrent()),this.hookupFiltersStore(),this.hookupLocalStorageStore(),this.hookupBasket(),this.hookupButtonsAdd2Basket()}},{key:"hookupFiltersStore",value:function(){hookupFilterCurrency(),hookupFilterDeliveryRegion(),hookupFilterIsIncludedVAT()}},{key:"hookupFilterCurrency",value:function(){for(var e,t,r,a=document.querySelectorAll(idCurrency)[0],i=0;i<a.options.length;i++)t=(r=(e=document.querySelectorAll(a.options[i])).text()).indexOf("-"),e.attr(attrTextExpanded,r),e.attr(attrTextCollapsed,r.substring(0,t-1)),e.classList.add(flagCollapsed);handleSelectCollapse(a),n.A.initialiseEventHandler(a,flagInitialised,(function(){(a=document.querySelectorAll(a)).addEventListener("focus",(function(){handleSelectExpand(a)})),a.addEventListener("blur",(function(){handleSelectCollapse(a)})),a.addEventListener("change",(function(){var e=a.val();console.log("selected currency: ",e);var t=o.A.getLocalStorage(keyBasket);t[keyIdCurrency]=e,o.A.setLocalStorage(keyBasket,t);var r={};r[keyBasket]=t,ajaxJSONData("update currency",mapHashToController(hashPageCurrent),r,loadPageBody,!1)}))}))}},{key:"hookupFilterDeliveryRegion",value:function(){for(var e,t,r,a=document.querySelectorAll(idRegionDelivery)[0],i=0;i<a.options.length;i++)t=(r=(e=document.querySelectorAll(a.options[i])).text()).indexOf("-"),e.attr(attrTextExpanded,r),e.attr(attrTextCollapsed,r.substring(0,t-1)),e.classList.add(flagCollapsed);handleSelectCollapse(a),n.A.initialiseEventHandler(a,flagInitialised,(function(){(a=document.querySelectorAll(a)).addEventListener("focus",(function(){console.log("dropdown region focused"),handleSelectExpand(a)})),a.addEventListener("blur",(function(){console.log("dropdown region blurred"),handleSelectCollapse(a)})),a.addEventListener("change",(function(){handleSelectCollapse(a);var e=a.val();console.log("selected region: ",e);var t=o.A.getLocalStorage(keyBasket);t[keyIdRegionDelivery]=e,o.A.setLocalStorage(keyBasket,t);var r={};r[keyIdRegionDelivery]=e,ajaxJSONData("update region",mapHashToController(hashStoreSetRegion),r,null,!1)}))}))}},{key:"hookupFilterIsIncludedVAT",value:function(){var e=document.querySelectorAll(idFormIsIncludedVAT),t=document.querySelectorAll(e.querySelector('input[type="checkbox"]')[0]);n.A.initialiseEventHandler(t,flagInitialised,(function(){e=document.querySelectorAll(idFormIsIncludedVAT),t.addEventListener("change",(function(t){ajaxData={},ajaxData[keyForm]=convertForm2JSON(e),console.log("sending data to include VAT controller: "),console.log(ajaxData),ajaxJSONData("set include VAT",mapHashToController(hashStoreSetIsIncludedVAT),ajaxData,(function(){window.location.reload()}),!1)})),console.log("form is included VAT initialised")}))}},{key:"hookupLocalStorageStore",value:function(){var e,t=!0;try{e=o.A.getLocalStorage(keyBasket),console.log("basket found: "),console.log(e),t=a.A.isEmpty(e)}catch(e){}t&&((e={})[keyItems]=[],e[keyIsIncludedVAT]=!0,e[keyIdCurrency]=1,e[keyIdRegionDelivery]=1,o.A.setLocalStorage(keyBasket,e),console.log("new local basket created"));var r={};r[keyBasket]=e,console.log("ajax:"+r),ajaxJSONData(keyBasket,mapHashToController(hashStoreBasketLoad),r,loadBasket,!1)}},{key:"hookupBasket",value:function(){this.toggleShowButtonCheckout(),this.hookupButtonCheckout(),this.hookupBasketItemPlusAndMinusButtons(),this.hookupBasketAddInputs(),this.hookupBasketEditInputs(),this.hookupDeleteBasketItemButtons()}},{key:"toggleShowButtonCheckout",value:function(){console.log("toggling checkout button");var e=document.querySelectorAll(idButtonCheckout),t=document.querySelectorAll(idLabelBasketEmpty);0==o.A.getLocalStorage(keyBasket).items.length?(e.style.display="none",t.style.display=""):(e.style.display="",t.style.display="none")}},{key:"hookupButtonCheckout",value:function(){console.log("hooking up checkout button");var e=document.querySelectorAll(idButtonCheckout);n.A.initialiseEventHandler(e,flagInitialised,(function(){e.addEventListener("click",(function(){goToPage(hashPageStoreBasket)}))}))}},{key:"hookupBasketItemPlusAndMinusButtons",value:function(){document.querySelectorAll("div.btn-increment["+attrFormType+"="+typeFormBasketAdd+"]").each((function(){var e=this;n.A.initialiseEventHandler(e,flagInitialised,(function(){e.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var r=document.querySelectorAll(getFormProductSelector(typeFormBasketAdd,e)).querySelector('input[type="number"]'),n=parseInt(getElementCurrentValue(r));isNaN(n)&&(n=1),n+=1,r.val(n)}))}))})),document.querySelectorAll("div.btn-decrement["+attrFormType+"="+typeFormBasketAdd+"]").each((function(){var e=this;n.A.initialiseEventHandler(e,flagInitialised,(function(){e.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var r=document.querySelectorAll(getFormProductSelector(typeFormBasketAdd,e)).querySelector('input[type="number"]'),n=parseInt(getElementCurrentValue(r));isNaN(n)&&(n=1),n=Math.max(1,n-1),r.val(n)}))}))})),document.querySelectorAll("div.btn-increment["+attrFormType+"="+typeFormBasketEdit+"]").each((function(){var e=this;n.A.initialiseEventHandler(e,flagInitialised,(function(){e.addEventListener("click",(function(t){t.stopPropagation();var r=document.querySelectorAll(getFormProductSelector(typeFormBasketEdit,e)).querySelector('input[type="number"]'),n=parseInt(getElementCurrentValue(r));isNaN(n)&&(n=1),n+=1,r.val(n),r.trigger("change")}))}))})),document.querySelectorAll("div.btn-decrement["+attrFormType+"="+typeFormBasketEdit+"]").each((function(){var e=this;n.A.initialiseEventHandler(e,flagInitialised,(function(){e.addEventListener("click",(function(t){t.stopPropagation();var r=document.querySelectorAll(getFormProductSelector(typeFormBasketEdit,e)).querySelector('input[type="number"]'),n=parseInt(getElementCurrentValue(r));isNaN(n)&&(n=1),n=Math.max(1,n-1),r.val(n),r.trigger("change")}))}))}))}},{key:"hookupBasketAddInputs",value:function(){document.querySelectorAll("form["+attrFormType+"="+typeFormBasketAdd+"]").each((function(){var e=this.querySelector('input[type="number"]');n.A.initialiseEventHandler(e,flagInitialised,(function(){e.addEventListener("change",(function(e){e.preventDefault(),e.stopPropagation()})),e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation()}))}))}))}},{key:"hookupBasketEditInputs",value:function(){document.querySelectorAll("form["+attrFormType+"="+typeFormBasketEdit+"]").each((function(){var e=this,t=e.querySelector('input[type="number"]');n.A.initialiseEventHandler(t,flagInitialised,(function(){t.addEventListener("change",(function(r){r.preventDefault(),r.stopPropagation(),d={},d[keyBasket]=o.A.getLocalStorage(keyBasket),d[keyIdProduct]=e.attr(attrIdProduct),d[keyIdPermutation]=e.attr(attrIdPermutation),d[keyForm]=convertForm2JSON(e),d[keyForm][keyQuantity]=t.val(),console.log("sending data to basket edit controller: "),console.log(d),ajaxJSONData("basket update",mapHashToController(hashStoreBasketEdit),d,loadBasket,!1)}))}))}))}},{key:"hookupDeleteBasketItemButtons",value:function(){console.log("hooking up basket item delete buttons"),document.querySelectorAll("form["+attrFormType+"="+typeFormBasketEdit+"]").each((function(){var e=this,t=e.querySelector("a."+flagBasketItemDelete);n.A.initialiseEventHandler(t,flagInitialised,(function(){t.addEventListener("click",(function(t){t.stopPropagation(),ajaxData={},ajaxData[keyBasket]=o.A.getLocalStorage(keyBasket),ajaxData[keyIdProduct]=e.attr(attrIdProduct),ajaxData[keyIdPermutation]=e.attr(attrIdPermutation),console.log("sending data to basket delete controller: "),console.log(ajaxData),ajaxJSONData("basket update",mapHashToController(hashStoreBasketDelete),ajaxData,loadBasket,!1)}))}))}))}},{key:"hookupButtonsAdd2Basket",value:function(){document.querySelectorAll("form["+attrFormType+'="'+typeFormBasketAdd+'"]').each((function(){var e=this;n.A.initialiseEventHandler(e,flagInitialised,(function(){e.submit((function(t){t.preventDefault(),console.log("adding to basket for product ID: ",e.attr(attrIdProduct)),ajaxData={},ajaxData[keyIdProduct]=e.attr(attrIdProduct),ajaxData[keyIdPermutation]=e.attr(attrIdPermutation),basket=o.A.getLocalStorage(keyBasket),ajaxData[keyBasket]=basket,console.log("basket before add: ",basket),ajaxData[keyForm]=convertForm2JSON(e),console.log("ajax data:"),console.log(ajaxData),ajaxJSONData("add2Basket",mapHashToController(hashStoreBasketAdd),ajaxData,loadBasket,!1)})),console.log("basket add method added for product ID: ",e.attr(attrIdProduct))}))}))}},{key:"loadBasket",value:function(e){var t=document.querySelectorAll(idBasketContainer);console.log("ajax:"),console.log(e.data);var r=e.data[keyBasket];o.A.setLocalStorage(keyBasket,r),items=r.items,t.innerHTML=e.data.html_block,hookupBasket()}},{key:"getFormProductSelector",value:function(e,t){return idPermutation=t.attr(attrIdPermutation),console.log("idPermutation: ",idPermutation),hasPermutation=!a.A.isEmpty(idPermutation),console.log("has permutation: ",hasPermutation),selectorIdPermutation=hasPermutation?"["+attrIdPermutation+"="+idPermutation+"]":"","form["+attrFormType+'="'+e+'"]['+attrIdProduct+"="+t.attr(attrIdProduct)+"]"+selectorIdPermutation}},{key:"getCurrencySelected",value:function(){var e=document.querySelectorAll(idSelectorCurrency).val();return console.log("selected currency: ",e),e}},{key:"addMetadataBasketToJSON",value:function(e){return e[keyIdCurrency]=o.A.getLocalStorage(keyIdCurrency),e[keyIdRegionDelivery]=o.A.getLocalStorage(keyIdRegionDelivery),e[keyIsIncludedVAT]=o.A.getLocalStorage(keyIsIncludedVAT),e}},{key:"hookupStoreCardsProduct",value:function(){n.A.initialiseEventHandler(".card.subcard",flagInitialised,(function(e){console.log("initialising product card: ",e),e.addEventListener("click",(function(t){if("submit"!=t.target.id){console.log("product click: "+e.attr(attrIdProduct)),console.log("permutation click: "+e.attr(attrIdPermutation));var r={};r[keyIdProduct]=e.attr(attrIdProduct),r[keyIdPermutation]=e.attr(attrIdPermutation),goToPage(hashPageStoreProduct,r)}})),console.log("click method added for product ID: "+e.attr(attrIdProduct)+", permutation ID: ",e.attr(attrIdPermutation))}))}},{key:"leave",value:function(){var e=getPageLocalStorage(hashPageCurrent);hashPageCurrent=pageHashNext,clearPageLocalStorage(hashPageCurrent),setupPageLocalStorage(hashPageCurrent);var t=getPageLocalStorage(hashPageCurrent);t[keyBasket]=keyBasket in e?e[keyBasket]:{items:[]},setPageLocalStorage(hashPageCurrent,t)}}])&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},538:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PageStoreBasket:()=>g});var n=r(782),o=r(322);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function l(e,t,r){return t=s(t),function(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=s(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},c.apply(null,arguments)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function d(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}var y,p,v,g=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),l(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(t,e),r=t,a=[{key:"initialize",value:function(){this.sharedInitialize(),this.hookupStoreCardsInfo(),this.hookupOverlaysStoreBasketInfo(),this.hookupButtonCheckoutSession()}},{key:"hookupStoreCardsInfo",value:function(){document.querySelectorAll(idContainerInfoDelivery).addEventListener("click",(function(e){console.log("delivery modal display method"),document.querySelectorAll(idOverlayInfoDelivery).css("display","block")})),document.querySelectorAll(idContainerInfoBilling).addEventListener("click",(function(e){console.log("billing modal display method"),document.querySelectorAll(idOverlayInfoBilling).css("display","block")}))}},{key:"hookupOverlaysStoreBasketInfo",value:function(){var e,t;e=document.querySelectorAll(idOverlayInfoDelivery),t=e.querySelector("form"),hookupOverlay(e),n.A.initialiseEventHandler(t,flagInitialised,(function(){t.submit((function(e){t=document.querySelectorAll(t),e.preventDefault(),console.log("delivery submit method"),ajaxData={},ajaxData[keyInfoType]=keyInfoDelivery,ajaxData=convertFormBilling2JSON(ajaxData,idOverlayInfoDelivery),ajaxJSONData("info delivery",mapHashToController(hashStoreBasketInfo),ajaxData,loadInfoAddress,!1)}))})),e=document.querySelectorAll(idOverlayInfoBilling),t=e.querySelector("form"),hookupOverlay(e),n.A.initialiseEventHandler(t,flagInitialised,(function(){t.submit((function(e){e.preventDefault(),console.log("billing submit method"),ajaxData={},ajaxData[keyInfoType]=keyInfoBilling,ajaxData=convertFormBilling2JSON(ajaxData,idOverlayInfoBilling),ajaxJSONData("info billing",mapHashToController(hashStoreBasketInfo),ajaxData,loadInfoAddress,!1)}))}));var r=[keyNameFull,keyPhoneNumber,keyPostcode,keyAddress1,keyCity,keyCounty];for(var o in r)t.querySelector("#"+r[o]).removeAttr("required")}},{key:"loadInfoAddress",value:function(e){console.log("ajax:"),console.log(e.data);var t=e.data[keyInfoType],r=e.data[t];if(o.A.setLocalStorage(t,r),t==keyInfoBilling){var n=document.querySelectorAll(idContainerInfoBilling);r[keyInfoIdentical]?n.querySelector("div").innerHTML="Same as delivery address":n.querySelector("div").innerHTML="<strong>"+r[keyNameFull]+"</strong> at <strong>"+r[keyPostcode]+"</strong>",document.querySelectorAll(idOverlayInfoBilling).css("display","none"),document.querySelectorAll(idOverlayInfoBilling).querySelector("form").classList.add(flagSubmitted)}else document.querySelectorAll(idContainerInfoDelivery).querySelector("div").innerHTML="<strong>"+r[keyNameFull]+"</strong> at <strong>"+r[keyPostcode]+"</strong>",document.querySelectorAll(idOverlayInfoDelivery).css("display","none"),document.querySelectorAll(idOverlayInfoDelivery).querySelector("form").classList.add(flagSubmitted)}},{key:"convertFormBilling2JSON",value:function(e,t){var r;r=document.querySelectorAll(t).querySelector("form"),r=document.querySelectorAll(idOverlayInfoDelivery).querySelector("form"),console.log("converting billing form to json\nform ID: "+r.id),e[keyForm]=convertForm2JSON(r);var n=[keyNameFull,keyPhoneNumber,keyPostcode,keyAddress1,keyAddress2,keyCity,keyCounty];for(var o in console.log("ajaxData:"),console.log(e),e[keyForm][keyInfoIdentical]=getElementCurrentValue(r.querySelector("#"+keyInfoIdentical)),n)t==idOverlayInfoBilling&&e[keyForm][keyInfoIdentical]?e[keyForm][n[o]]=getElementCurrentValue((void 0).querySelector("#"+n[o])):e[keyForm][n[o]]=getElementCurrentValue(r.querySelector("#"+n[o]));return console.log("ajaxData:"),console.log(e),e}},{key:"hookupButtonCheckoutSession",value:function(){var e=document.querySelectorAll(idButtonCheckout);e.classList.remove(flagInitialised),n.A.initialiseEventHandler(idButtonCheckout,flagInitialised,(function(){e.removeEventListener("click"),e.addEventListener("click",(function(e){var t=o.A.getLocalStorage(keyBasket),r={};r[keyBasket]=t,r=convertFormBilling2JSON(r,idOverlayInfoDelivery),(r=convertFormBilling2JSON(r,idOverlayInfoBilling))[key_code_currency]=getCurrencySelected(),ajaxJSONData("checkout session",mapHashToController(hashPageStoreCheckout),r,handleResponseCheckout,!1)}))}))}},{key:"handleResponseCheckout",value:function(e){window.location.href=e.data[keyUrlCheckout]}},{key:"hookupButtonFormBillingCopy",value:function(){n.A.initialiseEventHandler(idButtonFormBillingCopy,flagInitialised,(function(){document.querySelectorAll(idButtonFormBillingCopy).addEventListener("click",(function(e){var t=[keyNameFull,keyPhoneNumber,keyPostcode,keyAddress1,keyAddress2,keyCity,keyCounty],r=document.querySelectorAll(idOverlayInfoBilling).querySelector("form"),n=document.querySelectorAll(idOverlayInfoDelivery).querySelector("form");for(var o in t)r.querySelector("#"+t[o]).value=getElementCurrentValue(n.querySelector("#"+t[o]))}))}))}},{key:"leave",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=c(s(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([])}}],a&&i(r.prototype,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a}(r(255).BasePage);y=g,p="hash",v=hashPageStoreBasket,(p=d(p))in y?Object.defineProperty(y,p,{value:v,enumerable:!0,configurable:!0,writable:!0}):y[p]=v},771:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function a(e,t,r){return t=u(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(t,r||[],u(e).constructor):t.apply(e,r))}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},l.apply(null,arguments)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function s(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.r(t),r.d(t,{PageStoreHome:()=>p});var f,d,y,p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,n=[{key:"initialize",value:function(){this.sharedInitialize(),this.hookupFiltersStore(),this.hookupStoreHome()}},{key:"leave",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=l(u(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([])}}],n&&o(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(r(255).BasePage);f=p,d="hash",y=hashPageStoreHome,(d=s(d))in f?Object.defineProperty(f,d,{value:y,enumerable:!0,configurable:!0,writable:!0}):f[d]=y},380:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PageStoreProductCategories:()=>h});var n=r(782),o=r(992),a=r(595),i=r(143);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function c(e,t,r){return t=y(t),function(e,t){if(t&&("object"==l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,s()?Reflect.construct(t,r||[],y(e).constructor):t.apply(e,r))}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function f(e,t,r,n){var o=d(y(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},d.apply(null,arguments)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function v(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}var h=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),v(e=c(this,t),"callFilterTableContent",a.A.getCategoriesByFilters),v(e,"callSaveTableContent",a.A.saveCategories),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r=t,(o=[{key:"initialize",value:function(){f(t,"initialize",this,3)([])}},{key:"hookupFilters",value:function(){f(t,"hookupFilters",this,3)([]),this.hookupFilterIsNotEmpty(),this.hookupFilterActive()}},{key:"hookupFilterIsNotEmpty",value:function(){n.A.initialiseEventHandler("."+flagIsNotEmpty,flagInitialised,(function(e){e.addEventListener("change",(function(r){t.isDirtyFilter(e)}))}))}},{key:"loadRowTable",value:function(e){if(null!=e){var t=_rowBlank.cloneNode(!0);t.classList.remove(flagRowNew),t.classList.remove(flagInitialised),t.querySelectorAll("."+flagInitialised).forEach((function(e){e.classList.remove(flagInitialised)})),console.log("applying data row: ",e);var r=t.querySelector("td."+flagDisplayOrder+" ."+flagSlider),n=t.querySelector("td."+flagCode+" textarea"),o=t.querySelector("td."+flagName+" textarea"),a=t.querySelector("td."+flagDescription+" textarea"),l=t.querySelector("td."+flagAccessLevel),u=l.querySelector("div."+flagAccessLevel),c=t.querySelector("td."+flagActive+' input[type="checkbox"]');r.setAttribute(attrValueCurrent,e[flagDisplayOrder]),i.A.setElementValuePrevious(r,e[flagDisplayOrder]),i.A.setElementValueCurrent(n,e[flagCode]),i.A.setElementValuePrevious(n,e[flagCode]),i.A.setElementValueCurrent(o,e[flagName]),i.A.setElementValuePrevious(o,e[flagName]),i.A.setElementValueCurrent(a,e[flagDescription]),i.A.setElementValuePrevious(a,e[flagDescription]),l.setAttribute(attrIdAccessLevel,e[attrIdAccessLevel]),l.setAttribute(flagAccessLevelRequired,e[flagAccessLevelRequired]),u.setAttribute(attrIdAccessLevel,e[attrIdAccessLevel]),i.A.setElementValueCurrent(u,e[attrIdAccessLevel]),i.A.setElementValuePrevious(u,e[attrIdAccessLevel]),u.textContent=e[flagAccessLevelRequired],i.A.setElementValueCurrent(c,e[flagActive]),i.A.setElementValuePrevious(c,e[flagActive]),t.setAttribute(e[flagKeyPrimary],e[e[flagKeyPrimary]]),this.getTableMain().querySelector("tbody").appendChild(t)}}},{key:"getJsonRow",value:function(e){if(null!=e){var t=e.querySelector("td."+flagDisplayOrder+" ."+flagSlider),r=e.querySelector("td."+flagCode+" textarea"),n=e.querySelector("td."+flagName+" textarea"),o=e.querySelector("td."+flagDescription+" textarea"),a=e.querySelector("td."+flagAccessLevel),l=e.querySelector("td."+flagActive+' input[type="checkbox"]'),u={};return u[attrIdCategory]=e.getAttribute(attrIdCategory),u[flagCode]=i.A.getElementValueCurrent(r),u[flagName]=i.A.getElementValueCurrent(n),u[flagDescription]=i.A.getElementValueCurrent(o),u[flagAccessLevelRequired]=a.getAttribute(flagAccessLevelRequired),u[attrIdAccessLevel]=a.getAttribute(attrIdAccessLevel),u[flagActive]=i.A.getElementValueCurrent(l),u[flagDisplayOrder]=t.getAttribute(attrValueCurrent),u}}},{key:"hookupTableMain",value:function(){f(t,"hookupTableMain",this,3)([]),this.hookupSlidersDisplayOrderTable(),this.hookupTextareasCodeTable(),this.hookupTextareasNameTable(),this.hookupTextareasDescriptionTable(),this.hookupTdsAccessLevel(),this.hookupInputsActiveTable()}},{key:"isDirtyRow",value:function(e){if(null==e)return!1;console.log("Product Category isDirtyRow"),console.log("row: ",e);var t=e.querySelector("td."+flagDisplayOrder),r=e.querySelector("td."+flagCode+" textarea"),n=e.querySelector("td."+flagName+" textarea"),o=e.querySelector("td."+flagDescription+" textarea"),a=e.querySelector("td."+flagAccessLevel),l=e.querySelector("td."+flagActive+' input[type="checkbox"]'),u=t.classList.contains(flagDirty)||r.classList.contains(flagDirty)||n.classList.contains(flagDirty)||o.classList.contains(flagDirty)||a.classList.contains(flagDirty)||l.classList.contains(flagDirty);return i.A.handleDirtyElement(e,u),u}},{key:"leave",value:function(){f(t,"leave",this,3)([])}},{key:"getFiltersDefaults",value:function(){return filters={},filters.flagIsNotEmpty=!0,filters.flagActive=!0,filters}}])&&u(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(o.TableBasePage);v(h,"hash",hashPageStoreProductCategories)},17:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PageStoreProductPermutations:()=>v});var n=r(782),o=r(255),a=r(900);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function u(e,t,r){return t=f(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function s(){return s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},s.apply(null,arguments)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function y(e,t,r){return(t=p(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}var v=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),u(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),r=t,o=[{key:"initialize",value:function(){this.sharedInitialize(),hookupFilters(),hookupButtonsSaveCancel(),hookupTableMain(),hookupOverlayConfirm(savePermutations)}},{key:"hookupFilters",value:function(){n.A.initialiseEventHandler(idFilterCategory,flagInitialised,(function(e){console.log("hooking up filter category"),e.addEventListener("change",(function(e){loadPermutations()})),console.log("hooked up filter category")})),n.A.initialiseEventHandler(idFilterProduct,flagInitialised,(function(e){listProducts.forEach((function(t){t[attrIdCategory]==getElementCurrentValue(document.querySelectorAll(idFilterCategory))&&e.appendChild(document.createElement("<option>",t))})),e.addEventListener("change",(function(e){loadPermutations()}))})),n.A.initialiseEventHandler(idFilterIsOutOfStock,flagInitialised,(function(e){e.addEventListener("change",(function(e){loadPermutations()}))})),n.A.initialiseEventHandler(idFilterQuantityMin,flagInitialised,(function(e){e.addEventListener("change",(function(e){loadPermutations()}))})),n.A.initialiseEventHandler(idFilterQuantityMax,flagInitialised,(function(e){e.addEventListener("change",(function(e){loadPermutations()}))}))}},{key:"loadPermutations",value:function(){var e=document.querySelectorAll(idFormFiltersPermutations),t={};t[keyForm]=convertForm2JSON(e),t.csrf_token=t[keyForm].csrf_token,console.log("ajaxData:"),console.log(t),ajaxJSONData("permutations",mapHashToController(hashPageStorePermutationsPost),t,callbackLoadPermutations,!1,{"X-CSRFToken":t.csrf_token})}},{key:"callbackLoadPermutations",value:function(e){console.log("ajax:"),console.log(e.data);var t,r,n,o=document.querySelectorAll(idTableMain);(t=o.querySelector("tbody")).querySelector("tr").remove(),e.data.forEach((function(e){r=_rowBlank.cloneNode(!0),(r=document.querySelectorAll(r)).classList.remove(flagRowNew),console.log("applying data row: ",e),r.querySelector("td."+flagCategory+" select").value=e[attrIdCategory],n=r.querySelector("td."+flagProduct+" select"),listProducts.forEach((function(t){t[attrIdCategory]==e[attrIdCategory]&&n.appendChild(document.createElement("<option>",t))})),n.value=e[attrIdProduct],r.querySelector("td."+flagVariations+" textarea").value=e[flagVariations],r.querySelector("td."+flagQuantityStock+" input").value=e[flagQuantityStock],r.querySelector("td."+flagQuantityMin+" input").value=e[flagQuantityMin],r.querySelector("td."+flagQuantityMax+" input").value=e[flagQuantityMax],r.querySelector("td."+flagCostLocalVATIncl).innerHTML=e[flagCostLocalVATIncl],r.attr(attrIdCategory,e[flagCategory]),r.attr(attrIdProduct,e[flagProduct]),r.attr(attrIdPermutation,e[attrIdPermutation]),t.appendChild(r)}))}},{key:"hookupButtonsSaveCancel",value:function(){n.A.initialiseEventHandler(idButtonSave,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),showOverlayConfirm()}))})),n.A.initialiseEventHandler(idButtonCancel,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),loadPermutations()}))})),n.A.initialiseEventHandler(idButtonCancel,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation();var t=document.querySelectorAll(idTableMain),r=_rowBlank.cloneNode(!0);(r=document.querySelectorAll(r)).classList.remove(flagRowNew),r.querySelector("td."+flagCategory+" select");var n=getElementCurrentValue(document.querySelectorAll(idFilterCategory));n=0==n?idCategoryDefault:n;var o=r.querySelector("td."+flagProduct+" select");productsByCategory[n].forEach((function(e){o.appendChild(document.createElement("<option>",e))})),t.querySelector("tbody").appendChild(r)}))}))}},{key:"savePermutations",value:function(){var e=getPermutations(!0);if(0!=e.length){var t={};t[keyPermutations]=e,t[keyForm]=convertForm2JSON(elForm),t.csrf_token=t[keyForm].csrf_token,t.comment=document.querySelectorAll(idTextareaConfirm).value,console.log("ajaxData:"),console.log(t),ajaxJSONData("permutations",mapHashToController(hashPageStorePermutationsPost),t,callbackLoadPermutations,!1,{})}else showOverlayError("No permutations to save")}},{key:"getPermutations",value:function(e){var t,r,n,o,a,i,l,u=document.querySelectorAll(idTableMain),c=[];return u.querySelector("tbody tr").each((function(u,s){s=document.querySelectorAll(s),e&&!s.classList.contains(flagDirty)||(r=s.querySelector("td."+flagCategory+" select"),n=s.querySelector("td."+flagProduct+" select"),o=s.querySelector("td."+flagVariations+" textarea"),a=s.querySelector("td."+flagQuantityStock+" input"),i=s.querySelector("td."+flagQuantityMin+" input"),l=s.querySelector("td."+flagQuantityMax+" input"),(t={})[attrIdCategory]=r.attr(attrValueCurrent),t[attrIdProduct]=n.attr(attrValueCurrent),t[attrIdPermutation]=s.attr(attrIdPermutation),t[flagVariations]=o.attr(attrValueCurrent),t[flagQuantityStock]=a.attr(attrValueCurrent),t[flagQuantityMin]=i.attr(attrValueCurrent),t[flagQuantityMax]=l.attr(attrValueCurrent),c.push(t))})),c}},{key:"hookupTableMain",value:function(){n.A.initialiseEventHandler(idTableMain,flagInitialised,(function(e){e.querySelectorAll("td."+flagCategory+" select").addEventListener("change",(function(e){handleChangeInputPermutations(this),ddlCategory=this,row=getRowFromElement(ddlCategory),ddlProduct=row.querySelector("td."+flagProduct+" select"),ddlProduct.querySelector("option").remove(),ddlProduct.appendChild(document.createElement("<option>",{value:"",text:"Select Product"})),listProducts.forEach((function(e){e[attrIdCategory]==getElementCurrentValue(ddlCategory)&&ddlProduct.appendChild(document.createElement("<option>",e))})),handleChangeInputPermutations(ddlProduct)})),e.querySelectorAll("change","td."+flagProduct+" select,td."+flagQuantityStock+" input,td."+flagQuantityMin+" input,td."+flagQuantityMax+" input").addEventListener("change",(function(e){handleChangeInputPermutations(this)})),e.querySelectorAll("click","td."+flagVariations+" textarea").addEventListener("change",(function(e){e.stopPropagation(),handleClickPermutationsInputVariations(this)})),e.querySelectorAll("click","td."+flagDetail+" button").addEventListener("change",(function(e){e.stopPropagation(),console.log("not implemented error: detail clicked")})),e.querySelectorAll("click","td."+flagVariations+" button."+flagAdd).addEventListener("change",(function(e){e.stopPropagation(),handleClickPermutationsVariationsButtonAdd(this)}))}));var e=table.querySelector("tr."+flagRowNew);console.log("row blank temp: ",e),_rowBlank=e.cloneNode(!0),table.querySelectorAll("tr."+flagRowNew).forEach((function(e){e.remove()}))}},{key:"handleChangeInputPermutations",value:function(e){console.log("handleChangeInputPermutations"),console.log("element value:",e.value);var t=getRowFromElement(e),r=document.querySelector(idFormFiltersPermutations),n=r.querySelector(idButtonCancel),o=r.querySelector(idButtonSave),i=isElementDirty(e);if(objJQuery.classList.contains(flagVariations)?e.setAttribute(attrValueCurrent,getProductVariationsText(e)):e.setAttribute(attrValueCurrent,getElementCurrentValue(e)),i!=isElementDirty(e)){isRowDirty(t);var l=getPermutations(!0);a.A.isEmpty(l)?(n.classList.add(flagCollapsed),o.classList.add(flagCollapsed)):(n.classList.remove(flagCollapsed),o.classList.remove(flagCollapsed))}}},{key:"isElementDirty",value:function(e){var t=e.attr(attrValuePrevious)!=e.attr(attrValueCurrent),r=getCellFromElement(e);return t?(e.classList.add(flagDirty),r.classList.add(flagDirty)):(e.classList.remove(flagDirty),r.classList.remove(flagDirty)),t}},{key:"isRowDirty",value:function(e){var t=e.querySelector("td."+flagCategory+" select"),r=e.querySelector("td."+flagProduct+" select"),n=e.querySelector("td."+flagVariations+" textarea"),o=e.querySelector("td."+flagQuantityStock+" input"),a=e.querySelector("td."+flagQuantityMin+" input"),i=e.querySelector("td."+flagQuantityMax+" input"),l=t.classList.contains(flagDirty)||r.classList.contains(flagDirty)||n.classList.contains(flagDirty)||o.classList.contains(flagDirty)||a.classList.contains(flagDirty)||i.classList.contains(flagDirty);return l?e.classList.add(flagDirty):e.classList.remove(flagDirty),l}},{key:"getProductVariationsText",value:function(e){return e=document.querySelectorAll(e),dictVariations[e.attr(attrIdVariation)].map((function(e,t){return e[keyNameVariationType]+": "+e[keyNameVariation]})).join(",\n")}},{key:"getElementProductVariations",value:function(e){var t=(e=document.querySelectorAll(e)).attr(attrValueCurrent),r=[];return a.A.isEmpty(t)||(t=t.split(",")).forEach((function(e){var t=e.split(":");2==t.length&&r.push(y(y({},attrIdVariationType,t[0].trim()),attrIdVariation,t[1].trim()))})),r}},{key:"handleClickPermutationsInputVariations",value:function(e){var t,r,n,o,a,i,l,u,c,s,f,d;e=document.querySelectorAll(e);var y=getElementProductVariations(e),p=document.createElement("<table>"),v=document.createElement("<thead>");n=document.createElement("<tr>");var g=document.createElement("<th>",{text:"Type"}),h=document.createElement("<th>",{text:"Name"}),m=document.createElement("<button>",{class:flagAdd,text:"+"}),b=document.createElement("<th>");b.appendChild(m),n.appendChild(g),n.appendChild(h),n.appendChild(b),v.appendChild(n),p.appendChild(v);var k=document.createElement("<tbody>");console.log("variations:",y),y.forEach((function(e,y){r=dictVariations[e[attrIdVariationType]],t=dictVariations[e[attrIdVariation]],o=document.createElement("<td>",{class:attrIdVariationType}),(i={class:attrIdVariationType,value:e[attrIdVariationType]})[attrValueCurrent]=t[attrIdVariationType],i[attrValuePrevious]=t[attrIdVariationType],a=document.createElement("<select>",i),listVariationTypes.forEach((function(e){dictVariationTypes[e],a.appendChild(document.createElement("<option>",{value:r[attrIdVariationType],text:r[keyNameVariationType],selected:e==r[attrIdVariationType]}))})),l=document.createElement("<td>",{class:attrIdVariation}),(c={class:attrIdVariation,value:e[attrIdVariation]})[attrValueCurrent]=t[attrIdVariation],c[attrValuePrevious]=t[attrIdVariation],u=document.createElement("<select>",c),listVariations.forEach((function(e){d=dictVariations[e],console.log("id_variation: ",e),console.log("tmpJsonVariation: ",d),u.appendChild(document.createElement("<option>",{value:d[attrIdVariation],text:d[keyNameVariation],selected:e==t[attrIdVariation]}))})),s=document.createElement("<td>",{class:flagDelete}),f=document.createElement("<button>",{class:flagDelete,text:"x"}),n=document.createElement("<tr>"),o.appendChild(a),n.appendChild(o),l.appendChild(u),n.appendChild(l),s.appendChild(f),n.appendChild(s),k.appendChild(n)})),p.appendChild(k);var S=e.parentElement;S.innerHTML="",S.appendChild(p),console.log("tblVariations: ",p)}},{key:"handleClickPermutationsVariationsButtonAdd",value:function(e){e=document.querySelectorAll(e);var t=getRowFromElement(e).querySelector("td."+flagVariations+" textarea"),r=t.value;r=a.A.isEmpty(r)?"":r+"\n",r+="Type: Variation\n",t.value=r,handleChangeInputPermutations(t),console.log("error: not implemented")}},{key:"leave",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=s(f(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([])}}],o&&l(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(o.BasePage);y(v,"hash",hashPageStoreProductPermutations)},631:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PageStoreProductCategories:()=>w,PageStoreStockItems:()=>P});var n=r(782),o=r(900),a=r(255),i=r(992),l=r(595),u=r(143);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function s(e,t,r,n){var o=f(h(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},f.apply(null,arguments)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,S(n.key),n)}}function p(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,r){return t=h(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,g()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(g=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function k(e,t,r){return(t=S(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}var P=function(e){function t(){return d(this,t),v(this,t)}return m(t,e),p(t,[{key:"initialize",value:function(){this.sharedInitialize(),this.hookupFilters(),this.hookupButtonsSaveCancel(),hookupTableMain(),hookupOverlayConfirm(savePermutations)}},{key:"hookupFilters",value:function(){var e=document.querySelectorAll(idFilterCategory);n.A.initialiseEventHandler(e,flagInitialised,(function(){console.log("hooking up filter category"),(e=document.querySelectorAll(e)).addEventListener("change",(function(e){loadPermutations()})),console.log("hooked up filter category")}));var t=document.querySelectorAll(idFilterProduct);n.A.initialiseEventHandler(t,flagInitialised,(function(){listProducts.forEach((function(e){e[attrIdCategory]==getElementCurrentValue(document.querySelectorAll(idFilterCategory))&&t.appendChild(document.createElement("<option>",e))})),t.addEventListener("change",(function(e){loadPermutations()}))}));var r=document.querySelectorAll(idFilterIsOutOfStock);n.A.initialiseEventHandler(r,flagInitialised,(function(){r.addEventListener("change",(function(e){loadPermutations()}))}));var o=document.querySelectorAll(idFilterQuantityMin);n.A.initialiseEventHandler(o,flagInitialised,(function(){o.addEventListener("change",(function(e){loadPermutations()}))}));var a=document.querySelectorAll(idFilterQuantityMax);n.A.initialiseEventHandler(a,flagInitialised,(function(){a.addEventListener("change",(function(e){loadPermutations()}))}))}},{key:"loadPermutations",value:function(){var e=document.querySelectorAll(idFormFiltersPermutations),t={};t[keyForm]=convertForm2JSON(e),t.csrf_token=t[keyForm].csrf_token,console.log("ajaxData:"),console.log(t),ajaxJSONData("permutations",mapHashToController(hashPageStorePermutationsPost),t,callbackLoadPermutations,!1,{"X-CSRFToken":t.csrf_token})}},{key:"callbackLoadPermutations",value:function(e){console.log("ajax:"),console.log(e.data);var t,r,n,o=document.querySelectorAll(idTableMain);(t=o.querySelector("tbody")).querySelector("tr").remove(),$.each(e.data,(function(e,o){r=_rowBlank.cloneNode(!0),(r=document.querySelectorAll(r)).classList.remove(flagRowNew),console.log("applying data row: ",o),r.querySelector("td."+flagCategory+" select").val(o[attrIdCategory]),n=r.querySelector("td."+flagProduct+" select"),listProducts.forEach((function(e){e[attrIdCategory]==o[attrIdCategory]&&n.appendChild(document.createElement("<option>",e))})),n.val(o[attrIdProduct]),r.querySelector("td."+flagVariations+" textarea").value=o[flagVariations],r.querySelector("td."+flagQuantityStock+" input").value=o[flagQuantityStock],r.querySelector("td."+flagQuantityMin+" input").value=o[flagQuantityMin],r.querySelector("td."+flagQuantityMax+" input").value=o[flagQuantityMax],r.querySelector("td."+flagCostLocal).innerHTML=o[flagCostLocal],r.attr(attrIdCategory,o[flagCategory]),r.attr(attrIdProduct,o[flagProduct]),r.attr(attrIdPermutation,o[attrIdPermutation]),t.appendChild(r)}))}},{key:"hookupButtonsSaveCancel",value:function(){var e=document.querySelectorAll(idButtonSave),t=document.querySelectorAll(idButtonCancel),r=document.querySelectorAll(idButtonAdd);e.addEventListener("click",(function(e){e.stopPropagation(),showOverlayConfirm()})),e.classList.add(flagCollapsed),t.addEventListener("click",(function(e){e.stopPropagation(),loadPermutations()})),t.classList.add(flagCollapsed),r.addEventListener("click",(function(e){e.stopPropagation();var t=document.querySelectorAll(idTableMain),r=_rowBlank.cloneNode(!0);(r=document.querySelectorAll(r)).classList.remove(flagRowNew),t.querySelector("tbody").appendChild(r)}))}},{key:"savePermutations",value:function(){var e=getPermutations(!0);if(0!=e.length){var t={};t[keyPermutations]=e,t[keyForm]=convertForm2JSON(elForm),t.csrf_token=t[keyForm].csrf_token,t.comment=document.querySelector(idTextareaConfirm).value,console.log("ajaxData:"),console.log(t),ajaxJSONData("permutations",mapHashToController(hashPageStorePermutationsPost),t,callbackLoadPermutations,!1,{})}else showOverlayError("No permutations to save")}},{key:"getPermutations",value:function(e){var t,r,n,o,a,i,l,u=document.querySelectorAll(idTableMain),c=[];return u.querySelector("tbody tr").each((function(u,s){s=document.querySelectorAll(s),e&&!s.classList.contains(flagDirty)||(r=s.querySelector("td."+flagCategory+" select"),n=s.querySelector("td."+flagProduct+" select"),o=s.querySelector("td."+flagVariations+" textarea"),a=s.querySelector("td."+flagQuantityStock+" input"),i=s.querySelector("td."+flagQuantityMin+" input"),l=s.querySelector("td."+flagQuantityMax+" input"),(t={})[attrIdCategory]=r.attr(attrValueCurrent),t[attrIdProduct]=n.attr(attrValueCurrent),t[attrIdPermutation]=s.attr(attrIdPermutation),t[flagVariations]=o.attr(attrValueCurrent),t[flagQuantityStock]=a.attr(attrValueCurrent),t[flagQuantityMin]=i.attr(attrValueCurrent),t[flagQuantityMax]=l.attr(attrValueCurrent),c.push(t))})),c}},{key:"hookupTableMain",value:function(){var e,t,r,o,a,i,l=document.querySelectorAll(idTableMain),u=l.querySelector("tr."+flagRowNew);console.log("row blank temp: ",u),_rowBlank=u.cloneNode(!0),l.querySelector("tr."+flagRowNew).remove(),l.querySelector("tbody tr").each((function(l,u){console.log("hooking up row ",l),u=document.querySelectorAll(u),e=u.querySelector("td."+flagCategory+" select"),t=u.querySelector("td."+flagProduct+" select"),r=u.querySelector("td."+flagVariations+" textarea"),o=u.querySelector("td."+flagQuantityStock+" input"),a=u.querySelector("td."+flagQuantityMin+" input"),i=u.querySelector("td."+flagQuantityMax+" input"),n.A.initialiseEventHandler(e,flagInitialised,(function(){e.addEventListener("change",(function(){handleChangeInputPermutations(this),e=this,u=getRowFromElement(e),(t=u.querySelector("td."+flagProduct+" select")).querySelector("option").remove(),t.appendChild(document.createElement("<option>",{value:"",text:"Select Product"})),listProducts.forEach((function(r){r[attrIdCategory]==getElementCurrentValue(e)&&t.appendChild(document.createElement("<option>",r))})),handleChangeInputPermutations(t)}))})),n.A.initialiseEventHandler(t,flagInitialised,(function(){t.addEventListener("change",(function(){handleChangeInputPermutations(this)}))})),n.A.initialiseEventHandler(r,flagInitialised,(function(){r.addEventListener("change",(function(){handleChangeInputPermutations(this)}))})),n.A.initialiseEventHandler(o,flagInitialised,(function(){o.addEventListener("change",(function(){handleChangeInputPermutations(this)}))})),n.A.initialiseEventHandler(a,flagInitialised,(function(){a.addEventListener("change",(function(){handleChangeInputPermutations(this)}))})),n.A.initialiseEventHandler(i,flagInitialised,(function(){i.addEventListener("change",(function(){handleChangeInputPermutations(this)}))}))}))}},{key:"handleChangeInputPermutations",value:function(e){console.log(e.value);var t=document.querySelectorAll(e);t.value=e.value;var r=getRowFromElement(t),n=document.querySelectorAll(idButtonCancel),a=document.querySelectorAll(idButtonSave),i=isElementDirty(t);if(t.classList.contains(flagVariations)?t.attr(attrValueCurrent,getVariationsCurrentValue(t)):t.attr(attrValueCurrent,getElementCurrentValue(t)),i!=isElementDirty(t)){isRowDirty(r);var l=getPermutations(!0);o.A.isEmpty(l)?(n.classList.add(flagCollapsed),a.classList.add(flagCollapsed)):(n.classList.remove(flagCollapsed),a.classList.remove(flagCollapsed))}}},{key:"isRowDirty",value:function(e){var t=e.querySelector("td."+flagCategory+" select"),r=e.querySelector("td."+flagProduct+" select"),n=e.querySelector("td."+flagVariations+" textarea"),o=e.querySelector("td."+flagQuantityStock+" input"),a=e.querySelector("td."+flagQuantityMin+" input"),i=e.querySelector("td."+flagQuantityMax+" input"),l=t.classList.contains(flagDirty)||r.classList.contains(flagDirty)||n.classList.contains(flagDirty)||o.classList.contains(flagDirty)||a.classList.contains(flagDirty)||i.classList.contains(flagDirty);return l?e.classList.add(flagDirty):e.classList.remove(flagDirty),l}},{key:"getVariationsCurrentValue",value:function(e){var t=(e.value||null).split("\n");return(t=(t=t.map((function(e){return e.trim()}))).filter((function(e){return e.length>0}))).join(",")}}])}(a.BasePage);k(P,"hash",hashPageStoreStockItems);var w=function(e){function t(){var e;return d(this,t),k(e=v(this,t),"callFilterTableContent",l.A.getCategoriesByFilters),e}return m(t,e),p(t,[{key:"initialize",value:function(){s(t,"initialize",this,3)([])}},{key:"hookupFilters",value:function(){s(t,"hookupFilters",this,3)([]),this.hookupFilterIsNotEmpty(),this.hookupFilterActive()}},{key:"hookupFilterIsNotEmpty",value:function(){n.A.initialiseEventHandler("."+flagIsNotEmpty,flagInitialised,(function(e){e.addEventListener("change",(function(r){t.isDirtyFilter(e)}))}))}},{key:"loadRowTable",value:function(e){if(null!=e){var t=_rowBlank.cloneNode(!0);t.classList.remove(flagRowNew),t.classList.remove(flagInitialised),t.querySelectorAll("."+flagInitialised).forEach((function(e){e.classList.remove(flagInitialised)})),console.log("applying data row: ",e);var r=t.querySelector("td."+flagDisplayOrder+" ."+flagSlider),n=t.querySelector("td."+flagCode+" textarea"),o=t.querySelector("td."+flagName+" textarea"),a=t.querySelector("td."+flagDescription+" textarea"),i=t.querySelector("td."+flagAccessLevel),l=i.querySelector("div."+flagAccessLevel),c=t.querySelector("td."+flagActive+' input[type="checkbox"]');r.setAttribute(attrValueCurrent,e[flagDisplayOrder]),u.A.setElementValuePrevious(r,e[flagDisplayOrder]),u.A.setElementValueCurrent(n,e[flagCode]),u.A.setElementValuePrevious(n,e[flagCode]),u.A.setElementValueCurrent(o,e[flagName]),u.A.setElementValuePrevious(o,e[flagName]),u.A.setElementValueCurrent(a,e[flagDescription]),u.A.setElementValuePrevious(a,e[flagDescription]),i.setAttribute(attrIdAccessLevel,e[attrIdAccessLevel]),i.setAttribute(flagAccessLevelRequired,e[flagAccessLevelRequired]),l.setAttribute(attrIdAccessLevel,e[attrIdAccessLevel]),u.A.setElementValueCurrent(l,e[attrIdAccessLevel]),u.A.setElementValuePrevious(l,e[attrIdAccessLevel]),l.textContent=e[flagAccessLevelRequired],u.A.setElementValueCurrent(c,e[flagActive]),u.A.setElementValuePrevious(c,e[flagActive]),t.setAttribute(e[flagKeyPrimary],e[e[flagKeyPrimary]]),this.getTableMain().querySelector("tbody").appendChild(t)}}},{key:"getJsonRow",value:function(e){if(null!=e){var t=e.querySelector("td."+flagDisplayOrder+" ."+flagSlider),r=e.querySelector("td."+flagCode+" textarea"),n=e.querySelector("td."+flagName+" textarea"),o=e.querySelector("td."+flagDescription+" textarea"),a=e.querySelector("td."+flagAccessLevel),i=e.querySelector("td."+flagActive+' input[type="checkbox"]'),l={};return l[attrIdCategory]=e.getAttribute(attrIdCategory),l[flagCode]=u.A.getElementValueCurrent(r),l[flagName]=u.A.getElementValueCurrent(n),l[flagDescription]=u.A.getElementValueCurrent(o),l[flagAccessLevelRequired]=a.getAttribute(flagAccessLevelRequired),l[attrIdAccessLevel]=a.getAttribute(attrIdAccessLevel),l[flagActive]=u.A.getElementValueCurrent(i),l[flagDisplayOrder]=t.getAttribute(attrValueCurrent),l}}},{key:"hookupTableMain",value:function(){s(t,"hookupTableMain",this,3)([]),this.hookupSlidersDisplayOrderTable(),this.hookupTextareasCodeTable(),this.hookupTextareasNameTable(),this.hookupTextareasDescriptionTable(),this.hookupTdsAccessLevel(),this.hookupInputsActiveTable()}},{key:"isRowDirty",value:function(e){if(null!=e){var t=e.querySelector("td."+flagCategory+" select"),r=e.querySelector("td."+flagProduct+" select"),n=e.querySelector("td."+flagVariations+" textarea"),o=e.querySelector("td."+flagQuantityStock+" input"),a=e.querySelector("td."+flagQuantityMin+" input"),i=e.querySelector("td."+flagQuantityMax+" input"),l=t.classList.contains(flagDirty)||r.classList.contains(flagDirty)||n.classList.contains(flagDirty)||o.classList.contains(flagDirty)||a.classList.contains(flagDirty)||i.classList.contains(flagDirty);return l?e.classList.add(flagDirty):e.classList.remove(flagDirty),l}}},{key:"leave",value:function(){s(t,"leave",this,3)([])}},{key:"getFiltersDefaults",value:function(){return filters={},filters.flagIsNotEmpty=!0,filters.flagActive=!0,filters}}])}(i.TableBasePage);k(w,"hash",hashPageStoreProductCategories)},695:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function a(e,t,r){return t=u(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(t,r||[],u(e).constructor):t.apply(e,r))}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},l.apply(null,arguments)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function s(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.r(t),r.d(t,{PageUser:()=>p});var f,d,y,p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,n=[{key:"initialize",value:function(){this.sharedInitialize(),this.hookupButtonNavContact()}},{key:"leave",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=l(u(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([])}}],n&&o(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(r(255).BasePage);f=p,d="hash",y=hashPageUser,(d=s(d))in f?Object.defineProperty(f,d,{value:y,enumerable:!0,configurable:!0,writable:!0}):f[d]=y},4:()=>{},711:()=>{},655:(e,t,r)=>{var n={"./base.js":255,"./base_table.js":992,"./core/admin_home.js":623,"./core/contact.js":722,"./core/home.js":835,"./core/services.js":312,"./legal/accessibility_statement.js":916,"./legal/license.js":765,"./store/base.js":173,"./store/basket.js":538,"./store/home.js":771,"./store/product_categories.js":380,"./store/product_permutations.js":17,"./store/stock_items.js":631,"./user/user.js":695};function o(e){var t=a(e);return r(t)}function a(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}o.keys=function(){return Object.keys(n)},o.resolve=a,e.exports=o,o.id=655}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(765),r(711),r(4)})(); |