// All rights reserved by Omnisend Ltd. Look, but don't touch. // https://www.omnisend.com/ // v4.0.1 if("undefined"==typeof window.OMNISEND_LAUNCHER_LOADED){window.OMNISEND_LAUNCHER_LOADED=!0;try{window._omnisend=function(e){"use strict";return e.config={snippetVersion:"4.0.1",snippetHost:"https://omnisnippet1.com/",appHost:"https://app.omnisend.com/",pickerAPIHost:"https://app.omnisend.com/",customEventsHost:"https://api.omnisend.com/",wtAPIHost:"https://wt.omnisendlink.com/",pnHost:"https://pn.soundestlink.com/",allowedOrigins:["https://app.omnisend.com"]},e}(window._omnisend||{}),function(){"use strict";if(null===document.getElementById("omnisend-dynamic-container")){var e=document.createElement("div");e.id="omnisend-dynamic-container",e.style.overflow="hidden",e.style.height="0px",document.body.appendChild(e)}}(),window.soundestInShop=window.soundestInShop||{},window.SOUNDEST=window.SOUNDEST||{},window.SOUNDEST.external=window.SOUNDEST.external||{},window.SOUNDEST_EVENTS=window.SOUNDEST_EVENTS||[],window.soundest=window.soundest||[],window._omnisend=window._omnisend||{},window.omnisend=window.omnisend||[],function(e,n,t){"use strict";var i;for(i in n)n.hasOwnProperty(i)&&(e[i]=n[i],t[i]=n[i]);for(i in e)e.hasOwnProperty(i)&&(n[i]=e[i],t[i]=e[i])}(window.soundestInShop,window.SOUNDEST,window._omnisend),window._omnisend=function(e){"use strict";return e.globalVersion="2",e}(window._omnisend||{}),function(e,n){!function(t,i){"object"==typeof e&&e&&"string"!=typeof e.nodeName?i(e):"function"==typeof n&&n.amd?n(["exports"],i):(t.Mustache={},i(t.Mustache))}(this,function(e){function n(e){return"function"==typeof e}function t(e){return h(e)?"array":typeof e}function i(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function o(e,n){return null!=e&&"object"==typeof e&&n in e}function r(e,n){return w.call(e,n)}function s(e){return!r(g,e)}function c(e){return String(e).replace(/[&<>"'`=\/]/g,function(e){return y[e]})}function a(n,t){function o(){if(g&&!y)for(;w.length;)delete m[w.pop()];else w=[];g=!1,y=!1}function r(e){if("string"==typeof e&&(e=e.split(v,2)),!h(e)||2!==e.length)throw new Error("Invalid tags: "+e);c=new RegExp(i(e[0])+"\\s*"),a=new RegExp("\\s*"+i(e[1])),l=new RegExp("\\s*"+i("}"+e[1]))}if(!n)return[];var c,a,l,f=[],m=[],w=[],g=!1,y=!1;r(t||e.tags);for(var k,_,E,T,C,j,O=new p(n);!O.eos();){if(k=O.pos,E=O.scanUntil(c))for(var P=0,N=E.length;N>P;++P)T=E.charAt(P),s(T)?w.push(m.length):y=!0,m.push(["text",T,k,k+1]),k+=1,"\n"===T&&o();if(!O.scan(c))break;if(g=!0,_=O.scan(b)||"name",O.scan(D),"="===_?(E=O.scanUntil(S),O.scan(S),O.scanUntil(a)):"{"===_?(E=O.scanUntil(l),O.scan(I),O.scanUntil(a),_="&"):E=O.scanUntil(a),!O.scan(a))throw new Error("Unclosed tag at "+O.pos);if(C=[_,E,k,O.pos],m.push(C),"#"===_||"^"===_)f.push(C);else if("/"===_){if(j=f.pop(),!j)throw new Error('Unopened section "'+E+'" at '+k);if(j[1]!==E)throw new Error('Unclosed section "'+j[1]+'" at '+k)}else"name"===_||"{"===_||"&"===_?y=!0:"="===_&&r(E)}if(j=f.pop())throw new Error('Unclosed section "'+j[1]+'" at '+O.pos);return d(u(m))}function u(e){for(var n,t,i=[],o=0,r=e.length;r>o;++o)n=e[o],n&&("text"===n[0]&&t&&"text"===t[0]?(t[1]+=n[1],t[3]=n[3]):(i.push(n),t=n));return i}function d(e){for(var n,t,i=[],o=i,r=[],s=0,c=e.length;c>s;++s)switch(n=e[s],n[0]){case"#":case"^":o.push(n),r.push(n),o=n[4]=[];break;case"/":t=r.pop(),t[5]=n[2],o=r.length>0?r[r.length-1][4]:i;break;default:o.push(n)}return i}function p(e){this.string=e,this.tail=e,this.pos=0}function l(e,n){this.view=e,this.cache={".":this.view},this.parent=n}function f(){this.cache={}}var m=Object.prototype.toString,h=Array.isArray||function(e){return"[object Array]"===m.call(e)},w=RegExp.prototype.test,g=/\S/,y={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="},D=/\s*/,v=/\s+/,S=/\s*=/,I=/\s*\}/,b=/#|\^|\/|>|\{|&|=|!/;p.prototype.eos=function(){return""===this.tail},p.prototype.scan=function(e){var n=this.tail.match(e);if(!n||0!==n.index)return"";var t=n[0];return this.tail=this.tail.substring(t.length),this.pos+=t.length,t},p.prototype.scanUntil=function(e){var n,t=this.tail.search(e);switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n},l.prototype.push=function(e){return new l(e,this)},l.prototype.lookup=function(e){var t,i=this.cache;if(i.hasOwnProperty(e))t=i[e];else{for(var r,s,c=this,a=!1;c;){if(e.indexOf(".")>0)for(t=c.view,r=e.split("."),s=0;null!=t&&sa;++a)s=void 0,o=e[a],r=o[0],"#"===r?s=this.renderSection(o,n,t,i):"^"===r?s=this.renderInverted(o,n,t,i):">"===r?s=this.renderPartial(o,n,t,i):"&"===r?s=this.unescapedValue(o,n):"name"===r?s=this.escapedValue(o,n):"text"===r&&(s=this.rawValue(o)),void 0!==s&&(c+=s);return c},f.prototype.renderSection=function(e,t,i,o){function r(e){return s.render(e,t,i)}var s=this,c="",a=t.lookup(e[1]);if(a){if(h(a))for(var u=0,d=a.length;d>u;++u)c+=this.renderTokens(e[4],t.push(a[u]),i,o);else if("object"==typeof a||"string"==typeof a||"number"==typeof a)c+=this.renderTokens(e[4],t.push(a),i,o);else if(n(a)){if("string"!=typeof o)throw new Error("Cannot use higher-order sections without the original template");a=a.call(t.view,o.slice(e[3],e[5]),r),null!=a&&(c+=a)}else c+=this.renderTokens(e[4],t,i,o);return c}},f.prototype.renderInverted=function(e,n,t,i){var o=n.lookup(e[1]);return!o||h(o)&&0===o.length?this.renderTokens(e[4],n,t,i):void 0},f.prototype.renderPartial=function(e,t,i){if(i){var o=n(i)?i(e[1]):i[e[1]];return null!=o?this.renderTokens(this.parse(o),t,i,o):void 0}},f.prototype.unescapedValue=function(e,n){var t=n.lookup(e[1]);return null!=t?t:void 0},f.prototype.escapedValue=function(n,t){var i=t.lookup(n[1]);return null!=i?e.escape(i):void 0},f.prototype.rawValue=function(e){return e[1]},e.name="mustache.js",e.version="2.2.1",e.tags=["{{","}}"];var k=new f;e.clearCache=function(){return k.clearCache()},e.parse=function(e,n){return k.parse(e,n)},e.render=function(e,n,i){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+t(e)+'" was given as the first argument for mustache#render(template, view, partials)');return k.render(e,n,i)},e.to_html=function(t,i,o,r){var s=e.render(t,i,o);return n(r)?void r(s):s},e.escape=c,e.Scanner=p,e.Context=l,e.Writer=f})}.apply(window._omnisend),window._omnisend=function(e){"use strict";e.utils={};var n=/^[0-9a-fA-F]{24}$/,t=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return e.utils.isDefined=function(e){return void 0!==e},e.utils.isObjectEmpty=function(e){for(var n in e)if(e.hasOwnProperty(n))return!1;return!0},e.utils.isNull=function(e){return null===e},e.utils.isArray=function(e){var n={};return"[object Array]"===n.toString.call(e)},e.utils.isInteger=function(e){var n={};return"[object Number]"===n.toString.call(e)&&Math.floor(e)===e},e.utils.isFloat=function(e){var n={};return"[object Number]"===n.toString.call(e)&&Math.floor(e)!==e},e.utils.isHTMLCollection=function(e){var n={};return"[object HTMLCollection]"===n.toString.call(e)},e.utils.isValidUrl=function(e){var n=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:[/?#]\S*)?$/i;return n.test(e)},e.utils.isNodeList=function(e){var n={};return"[object NodeList]"===n.toString.call(e)},e.utils.isFunction=function(e){var n={};return"[object Function]"===n.toString.call(e)},e.utils.isString=function(e){var n={};return"[object String]"===n.toString.call(e)},e.utils.isObject=function(e){var n=typeof e;return"function"===n||"object"===n&&!!e},e.utils.inArray=function(e,n){return-1!==e.indexOf(n)},e.utils.forEach=function(n,t){var i,o;if(e.utils.isArray(n)||e.utils.isHTMLCollection(n)||e.utils.isNodeList(n))for(i=0;i-1||n.search("h")>-1){var i=e.getHours();n.search("hh")>-1&&(n=n.replace(/(^|[^\\])hh+/g,"$1"+t(i))),n.search("h")>-1&&(n=n.replace(/(^|[^\\])h/g,"$1"+i))}if(n.search("mm")>-1||n.search("m")>-1){var o=e.getMinutes();n.search("mm")>-1&&(n=n.replace(/(^|[^\\])mm+/g,"$1"+t(o))),n.search("m")>-1&&(n=n.replace(/(^|[^\\])m/g,"$1"+o))}if(n.search("ss")>-1||n.search("s")>-1){var r=e.getSeconds();n.search("ss")>-1&&(n=n.replace(/(^|[^\\])ss+/g,"$1"+t(r))),n.search("s")>-1&&(n=n.replace(/(^|[^\\])s/g,"$1"+r))}if(n.search("SSS")>-1){var s=e.getMilliseconds();n=n.replace(/(^|[^\\])SSS/g,"$1"+t(s,3))}return n},e.utils.base64UrlToUint8Array=function(e){for(var n="=".repeat((4-e.length%4)%4),t=(e+n).replace(/\-/g,"+").replace(/_/g,"/"),i=atob(t),o=new Uint8Array(i.length),r=0;rt&&(clearInterval(r),i(!1)),e()&&(clearInterval(r),i(!0))},n)})},e}(window._omnisend),window._omnisend=function(e,n){"use strict";return e.params={},e.params.getJSON=function(e){var t,i={};if(n.isDefined(e)||(e=window.location.href),t=e.split("#"),n.isDefined(t[1]))try{i=n.jsonParse(decodeURIComponent(t[1]))}catch(o){}return i},e.params.getQuery=function(e){var t,i={};return n.isDefined(e)||(e=window.location.href),t=e.split("#"),n.isDefined(t[0])&&(t=t[0].split("?"),n.isDefined(t[1])?(t=t[1].split("&"),n.forEach(t,function(e){t=e.split("="),n.isDefined(t[0])&&n.isDefined(t[1])&&(i[t[0]]=decodeURIComponent(t[1]))})):(t=t[0].split("&"),n.forEach(t,function(e){t=e.split("="),n.isDefined(t[0])&&n.isDefined(t[1])&&(i[t[0]]=decodeURIComponent(t[1]))}))),i},e}(window._omnisend,window._omnisend.utils),window._omnisend=function(e,n){"use strict";function t(e,t,i){var o=this;return o.elements=[],n.isNull(e)?n.isNull(t)||n.isNull(i)?n.isNull(i)||n.forEach(document.querySelectorAll(i),function(e){o.elements.push(e)}):n.forEach(t.elements,function(e){n.forEach(e.querySelectorAll(i),function(e){o.elements.push(e)})}):o.elements.push(e),o}return t.prototype.first=function(){var e=this;return new t(e.elements[0],null,null)},t.prototype.clone=function(e){var n=this;return new t(n.elements[0].cloneNode(e),null,null)},t.prototype.parent=function(){var e=this;return new t(e.elements[0].parentNode,null,null)},t.prototype.val=function(e){var t=this,i=null;return n.isDefined(e)?n.isDefined(t.elements[0])&&(t.elements[0].value=e):n.isDefined(t.elements[0])&&(i=t.elements[0].value),i},t.prototype.find=function(e){var n=this;return new t(null,n,e)},t.prototype.html=function(e){var t=this;return n.forEach(t.elements,function(n){n.innerHTML=e}),t},t.prototype.size=function(){var e=this;return e.elements.length},t.prototype.attr=function(e,t){var i=this,o=null;return n.isDefined(t)?n.forEach(i.elements,function(n){n.setAttribute(e,t)}):n.isDefined(i.elements[0])&&(o=i.elements[0].getAttribute(e)),o},t.prototype.removeAttr=function(e){var t=this;return n.forEach(t.elements,function(n){n.removeAttribute(e)}),t},t.prototype.prop=function(e,t){var i=this,o=null;return n.isDefined(t)?n.forEach(i.elements,function(n){n[e]=t}):n.isDefined(i.elements[0])&&(o=i.elements[0][e]),o},t.prototype.empty=function(){var e=this;return n.forEach(e.elements,function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}),e},t.prototype.submit=function(){var e=this;n.isDefined(e.elements[0])&&e.elements[0].submit()},t.prototype.reset=function(){var e=this;n.isDefined(e.elements[0])&&e.elements[0].reset()},t.prototype.height=function(){var e=this,t=0;return n.isDefined(e.elements[0])&&(t=e.elements[0].offsetHeight),t},t.prototype.width=function(){var e=this,t=0;return n.isDefined(e.elements[0])&&(t=e.elements[0].clientWidth),t},t.prototype.offsetWidth=function(){var e=this,t=0;return n.isDefined(e.elements[0])&&(t=e.elements[0].offsetWidth),t},t.prototype.prependTo=function(e){var i=this,o=[],r=[];return e instanceof t?o=e.elements:n.isString(e)&&(o=new t(null,null,e).elements),r=i.elements,n.forEach(r,function(e){n.forEach(o,function(n){n.insertBefore(e,n.firstChild)})}),i},t.prototype.appendTo=function(e){var i=this,o=[],r=[];return e instanceof t?o=e.elements:n.isString(e)&&(o=new t(null,null,e).elements),r=i.elements,n.forEach(r,function(e){n.forEach(o,function(n){n.appendChild(e)})}),i},t.prototype.appendAfter=function(e){var i=this,o=[],r=[];return e instanceof t?o=e.elements:n.isString(e)&&(o=new t(null,null,e).elements),r=i.elements,n.forEach(r,function(e){n.forEach(o,function(n){n.parentNode.insertBefore(e,n.nextSibling)})}),i},t.prototype.addClass=function(e){var t=this;return n.forEach(t.elements,function(t){n.isDefined(t.classList)?t.classList.add(e):t.className+=" "+e}),t},t.prototype.removeClass=function(e){var t=this;return n.forEach(t.elements,function(t){n.isDefined(t.classList)?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}),t},t.prototype.hasClass=function(e){var t=this,i=!1;return n.isDefined(t.elements[0])&&(i=n.isDefined(t.elements[0].classList)?t.elements[0].classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.elements[0].className)),i},t.prototype.closest=function(e){var i=this,o=new t(null,null,null);if(n.isDefined(i.elements[0])){for(var r=i.elements[0],s=new t(r,null,null);!s.hasClass(e)&&r;)r=r.parentNode,s=new t(r,null,null);s.hasClass(e)&&(o=s)}return o},t.prototype.visible=function(){var e=this,t=[];return n.isArray(e.elements)&&n.forEach(e.elements,function(e){e.offsetWidth&&e.offsetHeight&&e.getClientRects().length&&t.push(e)}),e.elements=t,e},t.prototype.css=function(e){var t=this;return n.forEach(t.elements,function(t){n.isString(e)?t.styleSheet?t.styleSheet.cssText=e:(t.innerHTML="",t.appendChild(document.createTextNode(e))):n.forEach(e,function(e,n){t.style[n]=e})}),t},t.prototype.setStyle=function(e,t,i){var o=this;return n.forEach(o.elements,function(n){n.style.setProperty(e,t,i)}),o},t.prototype.show=function(){var e=this;return n.forEach(e.elements,function(e){e.style.display="block"}),e},t.prototype.softShow=function(){var e=this;return n.forEach(e.elements,function(e){e.style.height="auto",e.style.opacity="1",e.style.position="initial",e.style.zIndex="initial"}),e},t.prototype.hide=function(){var e=this;return n.forEach(e.elements,function(e){e.style.display="none"}),e},t.prototype.softHide=function(){var e=this;return n.forEach(e.elements,function(e){e.style.height="0",e.style.opacity="0",e.style.position="absolute",e.style.zIndex="-1"}),e},t.prototype.each=function(e){var i=this;return n.forEach(i.elements,function(n,o){e(new t(n,null,null),o,i)}),i},t.prototype.on=function(e,t){var i=this;return n.forEach(i.elements,function(i){n.isDefined(i.addEventListener)?i.addEventListener(e,t,!1):i.attachEvent("on"+e,function(){t.call(i)})}),i},t.prototype.done=function(e){var t=this;return n.isFunction(e)&&n.forEach(t.elements,function(n){n.addEventListener?n.addEventListener("load",e):n.onreadystatechange=function(){n.elementreadyState in{loaded:1,complete:1}&&(n.onreadystatechange=null,e())}}),t},t.prototype.error=function(e){var t=this;return n.isFunction(e)&&n.forEach(t.elements,function(n){n.addEventListener&&n.addEventListener("error",e)}),t},n.isDefined(e.dom)||(e.dom={},e.dom.find=function(e){return new t(null,null,e)},e.dom.findElement=function(e){return new t(e,null,null)},e.dom.create=function(e,i){var o=document.createElement(e);return n.isDefined(i)&&n.forEach(i,function(e,n){o.setAttribute(n,e)}),new t(o,null,null)},e.dom.window=new t(window,null,null),e.dom.document=new t(document,null,null),e.dom.getOffsetX=function(){var e=n.isDefined(window.pageXOffset),t="CSS1Compat"===(document.compatMode||"");return e?window.pageXOffset:t?document.documentElement.scrollLeft:document.body.scrollLeft},e.dom.getOffsetY=function(){var e=n.isDefined(window.pageYOffset),t="CSS1Compat"===(document.compatMode||"");return e?window.pageYOffset:t?document.documentElement.scrollTop:document.body.scrollTop},e.dom.getWidth=function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},e.dom.getHeight=function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},e.dom.getScrollPercent=function(){var e=document.documentElement,n=document.body,t="scrollTop",i="scrollHeight",o=(e[t]||n[t])/((e[i]||n[i])-e.clientHeight)*100;return isNaN(o)&&(o=0),o},e.dom.onReady=function(e){"loading"!==document.readyState?e():document.addEventListener?document.addEventListener("DOMContentLoaded",e):document.attachEvent("onreadystatechange",function(){"loading"!==document.readyState&&e()})},e.dom.onLeave=function(n){e.dom.window.on("mouseout",function(e){var t=e?e:window.event,i=t.relatedTarget||t.toElement;i&&"HTML"!==i.nodeName||n()})},e.dom.onLeaveTop=function(n){e.dom.window.on("mouseout",function(e){var t=e?e:window.event;t.y<=0&&n()})},e.dom.injectScript=function(n,t,i){e.dom.create("script",{type:"text/javascript",async:!0,src:n}).error(i).done(t).appendTo("head")},e.dom.injectLink=function(n,t,i){e.dom.create("link",{rel:"stylesheet",type:"text/css",href:n}).error(i).done(t).appendTo("head")},e.dom.removeElement=function(e){var i=[];e instanceof t?i=e.elements:n.isString(e)&&(i=new t(null,null,e).elements),n.forEach(i,function(e){e.parentNode.removeChild(e)})}),e}(window._omnisend,window._omnisend.utils),window._omnisend=function(e,n){"use strict";if(!n.isDefined(e.getID)){var t=[],i=/-|:|T/gi,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";e.getID=function(e){var r,s="",c={excludeTime:!1,excludeHash:!1,hashLength:49,delimiter:"-",isReverse:!1};n.extend(c,e);do{if(s="",c.excludeTime===!1&&(s+=(new Date).toISOString().replace(i,"").slice(0,14)),c.excludeTime===!1&&c.excludeHash===!1&&(s+=c.delimiter),c.excludeHash===!1)for(r=1;r<=c.hashLength;r+=1)s+=o.charAt(Math.floor(Math.random()*o.length));if(c.isReverse===!0){if(s="",c.excludeHash===!1)for(r=1;r<=c.hashLength;r+=1)s+=o.charAt(Math.floor(Math.random()*o.length));c.excludeTime===!1&&c.excludeHash===!1&&(s+=c.delimiter),c.excludeTime===!1&&(s+=(new Date).toISOString().replace(i,"").slice(0,14))}}while(n.inArray(t,s));return t.push(s),s}}return e}(window._omnisend,window._omnisend.utils),window._omnisend=function(e,n){"use strict";if(!n.isDefined(e.cookies)){e.cookies={};var t=location.hostname.replace(/^www\./i,"");e.cookies.SECOND=1e3,e.cookies.MINUTE=6e4,e.cookies.HOUR=36e5,e.cookies.DAY=864e5,e.cookies.set=function(i,o,r){var s=i+"="+o+"; path=/; domain=."+t;if(/mybigcommerce.com/.test(location.hostname)&&n.isDefined(e.shopID)&&(s=i+"-"+e.shopID+"="+o+"; path=/; domain=.mybigcommerce.com"),n.isDefined(r)){var c=new Date,a=new Date;a.setTime(c.getTime()+r),s+="; expires="+a.toUTCString()}document.cookie=s},e.cookies.get=function(t){var i,o,r,s=document.cookie.split(";");for(/mybigcommerce.com/.test(location.hostname)&&n.isDefined(e.shopID)&&(t=t+"-"+e.shopID),r=0;ro&&(t.isDefined(e.external)&&t.isDefined(e.external[n[0]])&&t.isDefined(e.external[n[0]][n[1]])?e.external[n[0]][n[1]](n[2]):setTimeout(function(){i(n,o+1)},1e3)))}return t.isDefined(e.events)||(e.events={},t.forEach(n,function(e){i(e)}),n.push=function(e){i(e)}),e}(window._omnisend,window.SOUNDEST_EVENTS,window._omnisend.utils),window._omnisend=function(e,n,t,i){"use strict";if(!t.isDefined(e.api)){e.api={};var o=[],r=[],s=function(e){t.forEach(r,function(n){n(e)})};e.api.registerCallback=function(e){t.isFunction(e)&&(r.push(e),t.forEach(o,function(n){e(n)}))},e.api.getSettings=function(e){var n=null;return t.isDefined(e)?t.forEach(o,function(i){t.isDefined(i[0])&&t.isDefined(i[1])&&i[0]===e?n=i[1]:t.isDefined(i[0])&&i[0]===e&&(n=!0)}):(n={},t.forEach(o,function(e){t.isDefined(e[0])&&t.isDefined(e[1])?n[e[0]]=e[1]:t.isDefined(e[0])&&(n[e[0]]=!0)})),n},n.push=function(e){s(e),o[o.length]=e},i.push=function(e){s(e),o[o.length]=e},i.identifyContact=function(n){n.email||n.phone||n.externalID?(e.accountID&&(n.brandID=e.accountID),n.shopType=e.shopType,fetch(e.config.wtAPIHost+"REST/inShop/v1/identifyContact?"+new URLSearchParams(Object.assign({},n,{responseType:"json"}))).then(function(n){200===n.status&&n.json().then(function(n){n&&n.data&&n.data.contactID&&e.initContact(n.data.contactID)})})):console.error("Email or phone is required to identify contact")};var c=function(){t.isDefined(n)&&t.isDefined(n.length)&&t.forEach(n,function(e){t.isArray(e)&&o.push(e)}),t.isDefined(i)&&t.isDefined(i.length)&&t.forEach(i,function(e){t.isArray(e)&&o.push(e)})};c()}return e}(window._omnisend,window.soundest,window._omnisend.utils,window.omnisend),window._omnisend=function(e,n){"use strict";function t(e){return e&&(e.ID||e.email)}var i=3,o="track",r=["$productViewed","$pageViewed","viewed product"],s=function(n,o){var r=function(e){e.status<400||(console.log(e),0!==i&&setTimeout(function(){i-=1,s(n,o)},3e3))},c={};if(c.eventName=n,o){var a=e&&e.cookies&&e.cookies.get("omnisendContactID")&&{ID:e.cookies.get("omnisendContactID")},u=e&&e.brandSettings&&e.brandSettings.brandID;c.contact=o.contact||a,c.properties=o.properties,c.brandID=o.brandID||u,c.origin=o.origin,c.eventVersion=o.eventVersion,c.eventTimestamp=o.eventTimestamp instanceof Date?o.eventTimestamp.toISOString():void 0}t(c.contact)&&fetch(e.config.customEventsHost+"track",{method:"POST",body:e.utils.jsonStringify(c)})["catch"](r)},c=function(e){if(Array.isArray(e)){var t=e[0],i=e[1],c=e[2];n.isDefined(t)&&t===o&&n.isDefined(i)&&!r.includes(i)&&s(i,c)}};return n.isFetchAPISupported()&&e.api.registerCallback(c),e}(window._omnisend,window._omnisend.utils),window._omnisend=function(e,n){"use strict";e.log=e.log||{},e.log.logs=e.log.logs||[],e.debugConsole=e.debugConsole||{};var t=[],i=function(e){n.forEach(t,function(n){n(e)})},o=function(){var n=!1,t=e.params.getQuery();return(e.cookies.get("omnisendDebugConsole")&&"closed"!==e.cookies.get("omnisendDebugConsole")||t.omnisendDebugConsole)&&(n=!0),n};return e.log={info:function(t,o,r,s){var c=new Date,a={type:"info",info:!0,name:t,feature:r,time:n.formatTime(c,"hh:mm:ss.SSS")};o||s&&s.length?a.isExtendable=!0:a.isExtendable=!1,s&&(a.errors=s),o&&(a.data=JSON.stringify(o)),n.isArray(e.log.logs)||(e.log.logs=[]),e.log.logs.push(a),i(a)},warn:function(t,o,r,s){var c=new Date,a={type:"warn",warn:!0,name:t,feature:r,time:n.formatTime(c,"hh:mm:ss.SSS")};o||s&&s.length?a.isExtendable=!0:a.isExtendable=!1,s&&(a.errors=s),o&&(a.data=JSON.stringify(o)),n.isArray(e.log.logs)||(e.log.logs=[]),e.log.logs.push(a),i(a)},error:function(t,o,r,s,c){var a=new Date,u={type:"error",error:!0,name:t,feature:r,time:n.formatTime(a,"hh:mm:ss.SSS")};o||s&&s.length?u.isExtendable=!0:u.isExtendable=!1,s&&(u.errors=s),c&&(u.docLink=e.helpers.apiLinks[r][c]),o&&(u.data=JSON.stringify(o)),n.isArray(e.log.logs)||(e.log.logs=[]), e.log.logs.push(u),i(u)}},e.log.getErrors=function(t,i){var o=[];return n.forEach(e.helpers.dataStructures[t],function(e,t){!i[t]&&e.isRequired?o.push({isRequired:!0,fieldID:t,items:[t]}):i[t]&&n.getVariableType(i[t])!==e.type?o.push({isType:!0,fieldID:t,fieldDataType:e.type,defaultType:n.getVariableType(i[t]),items:[t,e.type,n.getVariableType(i[t])]}):e.isUrl&&!n.isValidUrl(i[t])&&o.push({isNotValidUrl:!0,fieldID:t,items:[t]})}),o},e.log.isDataValid=function(n,t){var i=!0;return e.log.getErrors(n,t).length>0&&(i=!1),i},e.log.listen=function(e){n.isFunction(e)&&t.push(e)},e.api.registerCallback(function(t){n.isArray(e.log.logs)||(e.log.logs=[]),n.isArray(t)&&n.isDefined(t[0])&&"track"===t[0]&&n.isDefined(t[1])&&"$productViewed"===t[1]&&(e.log.isDataValid("productViewed",t[2])?(e.log.info("Event 'productViewed' was tracked successfully.",t[2],"webTracking"),e.log.info("Product is set for Product Picker.",t[2],"productPicker")):o()?(e.log.error("Event 'productViewed' was not tracked ",t[2],"webTracking",e.log.getErrors("productViewed",t[2]),"jsapi"),e.log.error("Product data was not set!",t[2],"productPicker",e.log.getErrors("productViewed",t[2]),"snippet")):e.psst.error("Psst! There are some issues with your Omnisend integration. Open our Debug Console and resolve them:"))}),e.sendLog=function(t){n.isFetchAPISupported()&&fetch(e.config.wtAPIHost+"REST/inShop/v1/log",{method:"POST",body:e.utils.jsonStringify(t)})["catch"](function(e){console.log(e)})},e}(window._omnisend,window._omnisend.utils),window._omnisend=function(e,n){"use strict";return e.loadForm=function(){n.injectScript(e.config.snippetHost+"forms/main.js?v="+e.version,function(){},function(){})},e}(window._omnisend,window._omnisend.dom),window._omnisend=function(e,n,t){"use strict";return e.loadProductPicker=function(){e.activeComponents=e.activeComponents||[];var i={},o=e.params.getJSON(),r=e.params.getQuery();t.isDefined(o.inShopID)?(i.inShopID=o.inShopID,t.isDefined(o.type)&&(i.type=o.type)):t.isDefined(o.pickerID)?(i.inShopID=o.pickerID,t.isDefined(o.pickerShopType)&&(i.type=o.pickerShopType),t.isDefined(o.pickerVersion)&&(i.version=o.pickerVersion)):t.isDefined(r.pickerID)&&(i.inShopID=r.pickerID,t.isDefined(r.pickerShopType)&&(i.type=r.pickerShopType),t.isDefined(r.pickerVersion)&&!isNaN(parseInt(r.pickerVersion))&&(i.version=parseInt(r.pickerVersion)));var s=void 0!==e.cookies.getVariable("product-picker","inShopID"),c=void 0!==i.inShopID;(s||c)&&((!s&&c||c&&e.cookies.getVariable("product-picker","inShopID")!==i.inShopID)&&(e.cookies.clearVariable("product-picker","products"),e.cookies.clearVariable("product-picker","type"),e.cookies.setVariable("product-picker","inShopID",i.inShopID),e.cookies.setVariable("product-picker","locale","en"),t.isDefined(i.type)&&e.cookies.setVariable("product-picker","type",i.type),t.isDefined(i.version)&&e.cookies.setVariable("product-picker","version",i.version)),e.activeComponents.push("picker"),n.injectScript(e.config.snippetHost+"inShop/product-picker.js?v="+e.version,function(){},function(){}))},e}(window._omnisend,window._omnisend.dom,window._omnisend.utils),window._omnisend=function(e,n){"use strict";function t(){try{var n=JSON.parse(e.cookies.get("omnisendShopifyCart")||"{}"),t=JSON.parse(localStorage.getItem("omnisendShopifyCart")||"{}"),i=Object.keys(n).length,o=Object.keys(t).length;return i!==o&&e.sendLog({"function":"cart-event.js: getOmnisendShopifyCart() cookie & localStorage carts not equal",brandID:e&&e.brandSettings&&e.brandSettings.brandID,cookieCartLength:i,localStorageCartLength:o,isCookieCartLonger:i>o}),n}catch(r){return e.sendLog({"function":"cart-event.js: getOmnisendShopifyCart() - error",brandID:e&&e.brandSettings&&e.brandSettings.brandID,error:r}),{}}}function i(n){var t={};n&&n.items&&n.items.forEach(function(e){t[e.id]=e.quantity}),e.cookies.set("omnisendShopifyCart",JSON.stringify(t));try{localStorage.setItem("omnisendShopifyCart",JSON.stringify(t))}catch(i){e.sendLog({"function":"cart-event.js: setOmnisendShopifyCart()",brandID:e&&e.brandSettings&&e.brandSettings.brandID,error:i})}}function o(e,n){if(!e||!e.items)return[];var t=[];return e.items.forEach(function(e){var i=n[e.id]||0;e.quantity>i&&t.push(Object.assign({},e,{quantity:e.quantity-i}))}),t}function r(e,n,t,i){window.omnisend.push(["track","added product to cart",{brandID:e,contact:{ID:n},properties:t,origin:"shopify",eventTimestamp:i}])}function s(s){return s||(s=new Date),"shopify"===e.shopType?n.isFetchAPISupported()?void(e.cookies&&window.Shopify&&window.Shopify.routes&&window.Shopify.routes.root&&fetch(window.Shopify.routes.root+"cart.js").then(function(e){return e.json()}).then(function(n){var c=t(),a=o(n,c),u=e.brandSettings.brandID,d=e.cookies.get("omnisendContactID");d&&a.forEach(function(e){r(u,d,{raw:n,added_item:e},s)}),i(n)})):void console.log("fetch is not supported"):void 0}function c(){var e=!1,n=document.querySelectorAll("form[action*='/cart/add'] button[type='submit']");n.forEach(function(n){n.addEventListener("click",function(){var n=new Date;setTimeout(function(){e||(s(n),e=!0)},1e3)})})}return c(),e.initShopifyCartEvents=s,e}(window._omnisend,window._omnisend.utils),window._omnisend=function(e,n){"use strict";function t(){var n=e.cookies.get("cart");return n?decodeURIComponent(n).split("?")[0]:""}return e.processShopifyCartContact=function(i){if("shopify"===e.shopType){if(!n.isFetchAPISupported())return void console.log("fetch is not supported");if(e.cookies&&e.brandSettings&&e.brandSettings.brandID){var o=e.cookies.get("omnisendContactID");if(o){var r=t();if(r){var s=e.cookies.get("_shopify_y");fetch(e.config.appHost+"shopify/"+e.brandSettings.brandID+"/carts/contacts",{method:"POST",body:JSON.stringify({brandID:e.brandSettings.brandID,contactID:o,cartToken:r,shopifyClientID:s}),keepalive:i.keepalive})}}}}},window.addEventListener("beforeunload",function(){e.processShopifyCartContact({keepalive:!0})}),e}(window._omnisend,window._omnisend.utils),window._omnisend=function(e,n,t){"use strict";return e.identifyShopifyCustomer=function(){if("shopify"===e.shopType){var i,o=__st.a,r=__st.cid;if(null!==o)try{n.isString(e.cookies.get("omnisendContactID"))&&(i=e.cookies.get("omnisendContactID")),!i&&Shopify&&Shopify.checkout&&Shopify.checkout.email&&t.identifyContact?t.identifyContact({email:Shopify.checkout.email,shopID:o}):!i&&r&&t.identifyContact&&t.identifyContact({externalID:r,shopID:o})}catch(s){console.error(s)}}},e}(window._omnisend,window._omnisend.utils,window.omnisend),window._omnisend=function(e,n){"use strict";function t(e,n){return n.split(".").reduce(function(e,n){return e?e[n]:void 0},e)}function i(){var e=document.querySelector("meta[property='og:title']");return e&&e.getAttribute("content")}function o(){return t(__st,"rid")||t(ShopifyAnalytics,"meta.page.resourceId")}function r(){return t(__st,"p")||t(ShopifyAnalytics,"meta.page.pageType")}function s(n){e.push(["track","$pageViewed",n])}function c(){var e=r();switch(e){case"product":if("2"===n.globalVersion)return;s({pageType:"product",productID:o(),productTitle:i()});break;case"collection":s({pageType:"category",categoryID:o(),categoryTitle:i()});break;default:s()}}return n.initShopifyViewedPageEvents=c,n}(window.omnisend,window._omnisend),window._omnisend=function(e){"use strict";function n(e,n){if(e[f]){if(e[f].src)return e[f].src;if("string"==typeof e[f])return e[f]}if(n[f]){if(n[f].src)return n[f].src;if("string"==typeof n[f])return n[f]}var t=(n.images||[]).sort(function(e,n){return e.position-n.position}),i=t[0]||"";return i.src?i.src:i}function t(e){return e&&e.startsWith("//")?"https:"+e:e}function i(e,i){e||(e={}),e.prices||(e.prices={}),e.images||(e.images=[]);var o=(e.variants||[]).find(function(e){return String(e.id)===i})||{},r="available"in o?o.available:e.available;return{id:String(e.id),currency:Shopify.currency.active,price:"number"==typeof o.price?o.price:e.price,oldPrice:"number"==typeof o[l]?o[l]:e[l],title:o.name||e.title,description:e.description,imageUrl:t(n(o,e)),url:location.href,status:r?"inStock":"outOfStock",variantId:String(i),productTitle:e.title,productImageUrl:t(n({},e)),productUrl:window.location.origin+window.location.pathname}}function o(e,n){return n||(n={}),fetch(e+"?"+new URLSearchParams(n).toString(),{headers:{accept:"application/json"}}).then(function(e){return e.json().then(function(n){return{data:n,status:e.status}})})}function r(e){return d?Promise.resolve(d):o(Shopify.routes.root+"products/"+e+".js").then(function(e){return d=e.data&&e.data})}function s(){var e=new URLSearchParams(location.search),n=e.get("variant");return n||window.ShopifyAnalytics&&window.ShopifyAnalytics.meta&&window.ShopifyAnalytics.meta.selectedVariantId||""}function c(){var e=s();if(p!==e){p=e;var n=location.pathname.split("/").filter(function(e){return e.trim()}).at(-1);r(n).then(function(n){if(n&&n.id){var t=i(n,e);window.omnisend.push(["track","viewed product",{properties:{product:t}}])}})}}function a(){return"product"===(window.ShopifyAnalytics&&window.ShopifyAnalytics.meta&&window.ShopifyAnalytics.meta.page&&window.ShopifyAnalytics.meta.page.pageType)}function u(){a()&&setInterval(function(){c()},1e3)}var d=null,p=null,l="compare_at_price",f="featured_image";return e.initShopifyViewedProductEvents=u,e}(window._omnisend),window._omnisend=function(e){"use strict";return e.initShopify=function(){"shopify"===e.shopType&&(e.identifyShopifyCustomer&&e.identifyShopifyCustomer(),e.initShopifyCartEvents&&e.initShopifyCartEvents(),e.processShopifyCartContact&&e.processShopifyCartContact({keepalive:!1}),e.initShopifyViewedPageEvents(),e.initShopifyViewedProductEvents())},e}(window._omnisend),window._omnisend=function(e,n){"use strict";return e.loadPushNotifications=function(t){"serviceWorker"in navigator&&"PushManager"in window&&e.localStorage.isSupported()&&t.pushNotifications&&t.pushNotifications.enabled&&(e.pushNotifications=t.pushNotifications,n.injectScript(e.config.snippetHost+"inShop/push-notifications.js?v="+e.version,function(){},function(){}))},e}(window._omnisend,window._omnisend.dom),function(e,n){"use strict";function t(e){return e&&"track"===e[0]&&"$productViewed"===e[1]}var i,o=new Promise(function(e){i=e});if(n.woocommercePatchPush=function(){i(n.brandSettings&&n.brandSettings.brandData&&"woocommerce"===n.brandSettings.brandData.platformName)},e.push){var r=e.push;e.push=function(e){o.then(function(n){n&&t(e)||r(e)})}}}(window.omnisend,window._omnisend),window._omnisend=function(e){"use strict";function n(){var e=document.getElementsByName("variation_id")[0];if(e){var n=e.getAttribute("value");return"0"===n?"":n||""}return""}function t(e){return e=e?e.trim():"",e?e.startsWith("http")?e:location.origin+e:""}function i(e,n,i){var o="currency_code",r="regular_price",s="is_in_stock",c="short_description";e||(e={}),e.prices||(e.prices={}),e.images||(e.images=[]);var a=i.find(function(e){return String(e.id)===n})||{},u=a.prices||e.prices||{},d=a.images||e.images||[],p=a.permalink||e.permalink,l=s in a?a[s]:e[s],f=e.categories||[];return{id:String(e.id),currency:u[o],price:parseInt(u.price),oldPrice:u.price!==u[r]?parseInt(u[r]):null,title:e.name,description:e[c],imageUrl:t(d[0]&&d[0].src||""),url:p,status:l?"inStock":"outOfStock",categories:f.map(function(e){return{id:String(e.id),title:e.name}}),variantId:n}}function o(e,n){return n||(n={}),fetch(e+"?"+new URLSearchParams(n).toString(),{headers:{accept:"application/json"}}).then(function(e){return e.json().then(function(n){return{data:n,status:e.status}})})}function r(e){return f?Promise.resolve(f):e.length?o("/wp-json/wc/store/v1/products/"+e[0]).then(function(n){return n&&404===n.status?r(e.slice(1)):f=n.data}):Promise.resolve({})}function s(e){return m?Promise.resolve(m):o("/wp-json/wc/store/v1/products",{type:"variation",parent:e}).then(function(e){return m=e.data})}function c(){var e=n();if(l!==e){l=e;var t=location.pathname.split("/").filter(function(e){return e.trim()}).at(-1),o=window[p]&&window[p].productID,c=[o,t].filter(function(e){return!!e});r(c).then(function(n){n&&n.id&&s(n.id).then(function(t){var o=i(n,e,t);window.omnisend.push(["track","viewed product",{properties:{product:o}}])})})}}function a(){return!!window[d]}function u(){e.utils.waitFor(a,1e3,5e3).then(function(e){e&&setInterval(function(){c()},1e3)})}var d="wc_single_product_params",p="omnisend_product",l=null,f=null,m=null;return e.initWoocommerceViewedProductEvents=u,e}(window._omnisend),window._omnisend=function(e){"use strict";return e.initWoocommerce=function(){e.woocommercePatchPush(),e.initWoocommerceViewedProductEvents()},e}(window._omnisend),window._omnisend=function(e,n){"use strict";e.activeComponents=e.activeComponents||[],e.brandSettings=e.brandSettings||{},e.defaultCallback=function(){};var t=function(t){e.brandSettings=t,e.brandSettings.pushNotifications&&e.brandSettings.pushNotifications.enabled&&n.isFunction(e.loadPushNotifications)&&e.loadPushNotifications(e.brandSettings),e.loadForm(),n.isDefined(e.brandSettings)&&n.isDefined(e.brandSettings.brandID)&&(e.initShopify&&e.initShopify(),e.initBigcommerce&&e.initBigcommerce(),e.initWoocommerce&&e.initWoocommerce())};return e.getSettings=function(n){fetch(e.config.wtAPIHost+"REST/inShop/v1/getSettings?"+new URLSearchParams(Object.assign({},n,{responseType:"json"}))).then(function(e){200===e.status&&e.json().then(function(e){e&&e.data&&t(e.data)})})},e.setBrandSettings=function(){var n={shopHostname:e.shopHostname,shopType:e.shopType};e.shopID&&(n.shopID=e.shopID),e.accountID&&(n.brandID=e.accountID),e.getSettings(n)},e.loadServices=function(){var t=e.params.getQuery();n.isDefined(t.omnisendDebugConsole)&&"1"===t.omnisendDebugConsole?(e.loadDebugConsole(),"closed"===e.cookies.get("omnisendDebugConsole")&&e.cookies.set("omnisendDebugConsole","maximized")):n.isDefined(e.cookies.get("omnisendDebugConsole"))&&"closed"!==e.cookies.get("omnisendDebugConsole")&&e.loadDebugConsole(),e.setBrandSettings(t),e.loadProductPicker()},function(){n.isDefined(e.api.getSettings("accountID"))&&!n.isNull(e.api.getSettings("accountID"))?(e.accountID=e.api.getSettings("accountID"),e.loadServices()):n.isDefined(e.productID)||n.isDefined(e.shopType)&&"api"===e.shopType?e.loadServices():n.isDefined(e.shopType)&&"shopify"===e.shopType&&n.isDefined(__st)&&n.isDefined(__st.a)&&e.loadServices(),n.isDefined(e.accountID)&&n.isDefined(e.shopType)&&"wix"===e.shopType&&e.loadServices()}(),e}(window._omnisend,window._omnisend.utils),window._omnisend=function(e,n){"use strict";var t={},i=null,o=3,r="omnisendContactID",s="omnisendSessionID",c=function(){return n.isDefined(e.productID)&&n.isString(e.productID)&&""!==e.productID?e.productID:e.product&&e.product.productID?e.product.productID:null},a=function(e){return n.isDefined(e.url)&&n.isDefined(e.sessionID)&&n.isDefined(e.contactID)?!0:!1},u=function(n){e.productData={productID:n.properties.product.id,variantID:n.properties.product.variantId,status:n.properties.product.status,currency:n.properties.product.currency,description:n.properties.product.description,imageUrl:n.properties.product.imageUrl,price:n.properties.product.price,oldPrice:n.properties.product.oldPrice,title:n.properties.product.title,url:n.properties.product.url};var t=new CustomEvent("omnisend-viewed-product",{detail:e.productData});document.dispatchEvent(t)},d=function(){var t={};n.isDefined(e.brandID)&&n.isObjectId(e.brandID)&&(t.brandID=e.brandID),n.isDefined(e.accountID)&&n.isObjectId(e.accountID)&&(t.brandID=e.accountID),n.isDefined(e.shopType)&&(t.shopType=e.shopType),n.isDefined(e.shopID)&&(t.shopID=e.shopID.toString()),n.isDefined(e.shopHostname)&&(t.shopHostname=e.shopHostname);var i=/(\d+)\/orders\/([a-f0-9]{32})/,o=/(\d+)\/checkouts\/([a-f0-9]{32})/;if(n.isDefined(window.location.href)&&-1===window.location.href.indexOf("file:///")&&!i.test(window.location.href)&&!o.test(window.location.href)){t.url=window.location.href;var c=e.params.getQuery(window.location.href);Object.keys(c).length>0&&(n.isDefined(c.utm_campaign)&&(t.utmCampaign=c.utm_campaign),n.isDefined(c.utm_medium)&&(t.utmMedium=c.utm_medium),n.isDefined(c.utm_source)&&(t.utmSource=c.utm_source))}return n.isDefined(document.title)&&(t.title=document.title),n.isDefined(e.cookies.get(s))&&(t.sessionID=e.cookies.get(s)),n.isString(e.cookies.get("omnisendAttributionID"))&&(t.attributionID=e.cookies.get("omnisendAttributionID")),n.isDefined(e.cookies.get(r))&&(t.contactID=e.cookies.get(r),n.isDefined(e.contactIdentified)&&e.contactIdentified&&(t.contactIdentified=!0)),t},p=function(e){var i=Object.assign({},t,e),o=d();return o.type="pageview",n.isDefined(i.productID)&&(o.productID=i.productID),n.isDefined(i.productTitle)&&(o.productTitle=i.productTitle),n.isDefined(i.pageType)&&(o.pageType=i.pageType),n.isDefined(i.categoryID)&&(o.categoryID=i.categoryID),n.isDefined(i.categoryTitle)&&(o.categoryTitle=i.categoryTitle),o},l=function(n){e.request.pixel({url:e.config.wtAPIHost+"REST/webTracking/v1/event",data:n},function(){},function(){0!==o&&setTimeout(function(){o-=1,a(n)&&l(n)},3e3)})};if(n.isDefined(e.shopType))switch(e.shopType){case"shopify":case"bigcommerce":break;default:i=c(),null!==i&&(t.productID=i,t.pageType="product")}return"2"===e.globalVersion?e.api.registerCallback(function(i){if(n.isArray(i)&&n.isDefined(i[0])&&"track"===i[0]){if(n.isDefined(i[1])&&"$pageViewed"===i[1]){var o=p(i[2]);a(o)&&l(o)}n.isDefined(i[1])&&"$productViewed"===i[1]&&e.log.isDataValid("productViewed",i[2])&&(t.pageType="product",t.productID=i[2].$productID,t.productTitle=i[2].$title,u({properties:{product:{id:i[2].$productID,variantId:i[2].$variantID,title:i[2].$title,price:i[2].$price,oldPrice:i[2].$oldPrice,currency:i[2].$currency,imageUrl:i[2].$imageUrl,url:i[2].$productUrl}}}),a(p())&&l(p()))}}):a(p())&&l(p()),e}(window._omnisend,window._omnisend.utils),window._omnisend=function(e,n){"use strict";var t=2,i="omnisendSessionID",o="omnisendContactID",r=function(e){var n=e&&e.properties.page&&e.properties.page&&e.properties.page.url,t=e&&e.properties&&e.properties.userInfo&&e.properties.userInfo.sessionID,i=e&&e.contactID,o=e&&e.properties&&e.properties.product&&e.properties.product.id;return n&&t&&i&&o},s=function(n){e.productData={productID:n.properties.product.id,variantID:n.properties.product.variantId,status:n.properties.product.status,currency:n.properties.product.currency,description:n.properties.product.description,imageUrl:n.properties.product.imageUrl,price:n.properties.product.price,oldPrice:n.properties.product.oldPrice,title:n.properties.product.title,url:n.properties.product.url,productTitle:n.properties.product.productTitle,productImageUrl:n.properties.product.productImageUrl,productUrl:n.properties.product.productUrl};var t=new CustomEvent("omnisend-viewed-product",{detail:e.productData});document.dispatchEvent(t)};e.getProductInfo=function(){return e.productData};var c=function(){var t={};if(n.isDefined(window.location.href)){var i=e.params.getQuery(window.location.href);Object.keys(i).length>0&&(n.isDefined(i.utm_campaign)&&(t.campaign=i.utm_campaign),n.isDefined(i.utm_medium)&&(t.medium=i.utm_medium),n.isDefined(i.utm_source)&&(t.source=i.utm_source))}return t},a=function(){var t={};return n.isDefined(e.shopType)&&(t.shopType=e.shopType),n.isDefined(e.shopID)&&(t.shopID=e.shopID.toString()),n.isDefined(e.shopHostname)&&(t.shopHostname=e.shopHostname),t},u=function(){var e={};return e.title=document.title,e.url=window.location.href,e},d=function(){var t={};return n.isDefined(e.brandID)&&n.isObjectId(e.brandID)&&(t.brandID=e.brandID),n.isDefined(e.accountID)&&n.isObjectId(e.accountID)&&(t.brandID=e.accountID),t.brandID||(t.brandID=e&&e.brandSettings&&e.brandSettings.brandID),e.cookies.get(o)&&(t.contactID=e.cookies.get(o)),t},p=function(n){fetch(e.config.wtAPIHost+"REST/webTracking/v2/event",{method:"POST",body:e.utils.jsonStringify(n)}).then(function(e){if(e.status>400)throw new Error("HTTP error, status = "+e.status)})["catch"](function(){0!==t?setTimeout(function(){t-=1,p(n)},3e3):r(n)&&window.omnisend.push(["track","$productViewed",{$productID:n.properties.product.id,$title:n.properties.product.title}])})};return e.api.registerCallback(function(t){if(n.isArray(t)&&"track"===t[0]&&"viewed product"===t[1]){var o=e.cookies.get(i),l=null,f=null,m={userInfo:{sessionID:o},utm:c(),page:u()};t[2]&&t[2].properties&&t[2].properties.product&&(m.product=t[2].properties.product,l=t[2].eventVersion,f=t[2].origin);var h=d(),w={eventName:t[1],brandID:h.brandID,contactID:h.contactID,shopInfo:a(),properties:m,eventVersion:l,origin:f};if(l&&l.length>0){var g=Math.round(100*w.properties.product.price),y=Math.round(100*w.properties.product.oldPrice);w.properties.product.price=g,w.properties.product.oldPrice=y}s(w),r(w)&&p(w)}}),e}(window._omnisend,window._omnisend.utils,window._omnisend.dom)}catch(ignore){}}