/*! For license information please see bundle.js.LICENSE.txt */ (()=>{var __webpack_modules__={179:(e,t,o)=>{var n=o(25).F;o(671),o(247),function(){var e=n.build();for(var t in e)e.hasOwnProperty(t)&&void 0===n[t]&&(n[t]=e[t])}()},196:(e,t,o)=>{var n=o(25).F;n.getCookie=function(e){var t=new RegExp("(^|;)[ ]*"+e+"=([^;]*)").exec(n.documentAlias.cookie);return t?n.decodeWrapper(t[2]):0},n.setCookie=function(e,t,o,i,a,r){var s;o&&(s=new Date).setTime(s.getTime()+o),n.documentAlias.cookie=e+"="+n.encodeWrapper(t)+(o?";expires="+s.toGMTString():"")+";path="+(i||"/")+(a?";domain="+a:"")+(r?";secure":"")}},930:(e,t,o)=>{var n=o(25).F;n.isDefined=function(e){return void 0!==e},n.isNotNull=function(e){return null!==e},n.isFunction=function(e){return"function"==typeof e},n.isArray="isArray"in Array?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n.isEmptyArray=function(e){return n.isArray(e)&&e.length<1},n.isObject=function(e){return"object"==typeof e},n.isJson=function(e){return n.isDefined(e)&&n.isNotNull(e)&&e.constructor==={}.constructor},n.isNonEmptyJson=function(e){return n.isJson(e)&&e!=={}},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isNonEmptyString=function(e){return n.isString(e)&&""!==e},n.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},n.encodeUtf8=function(e){return n.decodeUrl(n.encodeWrapper(e))},n.fixupTitle=function(e){if(!n.isString(e)){e=e.text||"";var t=n.documentAlias.getElementsByTagName("title");t&&n.isDefined(t[0])&&(e=t[0].text)}return e},n.getHostName=function(e){var t=new RegExp("^(?:(?:https?|ftp):)/*(?:[^@]+@)?([^:/#]+)").exec(e);return t?t[1]:e},n.hasSessionStorage=function(){try{return!!n.windowAlias.sessionStorage}catch(e){return!0}},n.hasLocalStorage=function(){try{return!!n.windowAlias.localStorage}catch(e){return!0}},n.toTimestamp=function(e,t){return t?e/1:Math.floor(e/1e3)},n.toDatestamp=function(e){return Math.floor(e/864e5)},n.fixupUrl=function(e,t,o){var i,a,r,s,c;return"translate.googleusercontent.com"===e?(""===o&&(o=t),i=t,a="u",r=new RegExp("^(?:https?|ftp)(?::/*(?:[^?]+)[?])([^#]+)").exec(i),s=new RegExp("(?:^|&)"+a+"=([^&]*)"),t=(c=r?s.exec(r[1]):0)?n.decodeWrapper(c[1]):"",e=n.getHostName(t)):"cc.bingj.com"!==e&&"webcache.googleusercontent.com"!==e&&"74.6."!==e.slice(0,5)||(t=n.documentAlias.links[0].href,e=n.getHostName(t)),[e,t,o]},n.fixupDomain=function(e){var t=e.length;return"."===e.charAt(--t)&&(e=e.slice(0,t)),"*."===e.slice(0,2)&&(e=e.slice(1)),e},n.getReferrer=function(){var e="";try{e=n.windowAlias.top.document.referrer}catch(t){if(n.windowAlias.parent)try{e=n.windowAlias.parent.document.referrer}catch(t){e=""}}return""===e&&(e=n.documentAlias.referrer),e},n.addEventListener=function(e,t,o,n){return e.addEventListener?(e.addEventListener(t,o,n),!0):e.attachEvent?e.attachEvent("on"+t,o):void(e["on"+t]=o)},n.getCookie=function(e){var t=new RegExp("(^|;)[ ]*"+e+"=([^;]*)").exec(n.documentAlias.cookie);return t?n.decodeWrapper(t[2]):0},n.setCookie=function(e,t,o,i,a,r){var s;o&&(s=new Date).setTime(s.getTime()+o),n.documentAlias.cookie=e+"="+n.encodeWrapper(t)+(o?";expires="+s.toGMTString():"")+";path="+(i||"/")+(a?";domain="+a:"")+(r?";secure":"")},n.executePluginMethod=function(e,t){var o,i,a="";for(o in n.plugins)Object.prototype.hasOwnProperty.call(n.plugins,o)&&(i=n.plugins[o][e],n.isFunction(i)&&(a+=i(t)));return a}},25:e=>{var t,o=(t=window,{version:"js-0.13.4",expireDateTime:null,plugins:{},hasLoaded:!1,registeredOnLoadHandlers:[],documentAlias:document,windowAlias:t,navigatorAlias:navigator,screenAlias:screen,encodeWrapper:t.encodeURIComponent,decodeWrapper:t.decodeURIComponent,decodeUrl:unescape,asyncTracker:null,_yaq:[]});e.exports.F=o},376:(e,t,o)=>{var n=o(25).F;n.base64encode=function(e){if(!e)return e;if("function"==typeof window.btoa)return btoa(e);var t,o,n,i,a,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=0,c=0,l="",d=[];do{t=(a=e.charCodeAt(s++)<<16|e.charCodeAt(s++)<<8|e.charCodeAt(s++))>>18&63,o=a>>12&63,n=a>>6&63,i=63&a,d[c++]=r.charAt(t)+r.charAt(o)+r.charAt(n)+r.charAt(i)}while(s>4,o=(15&n)<<4|(i=a.indexOf(e.charAt(l++)))>>2,s=(3&i)<<6|(c=a.indexOf(e.charAt(l++))),r+=String.fromCharCode(t),64!=i&&(r+=String.fromCharCode(o)),64!=c&&(r+=String.fromCharCode(s)),t=o=s="",n=i=c=""}while(l{var JSON2=JSON2||{};(function(){"use strict";function isArray(e){return"isArray"in Array?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function f(e){return e<10?"0"+e:e}function objectToJSON(e,t){var o=Object.prototype.toString.apply(e);return"[object Date]"===o?isFinite(e.valueOf())?e.getUTCFullYear()+"-"+f(e.getUTCMonth()+1)+"-"+f(e.getUTCDate())+"T"+f(e.getUTCHours())+":"+f(e.getUTCMinutes())+":"+f(e.getUTCSeconds())+"Z":null:"[object String]"===o||"[object Number]"===o||"[object Boolean]"===o?e.valueOf():isArray(e)||"function"!=typeof e.toJSON?e:e.toJSON(t)}var cx=new RegExp("[\0­؀-؄܏឴឵‌-‏\u2028- ⁠-\ufeff￰-￿]","g"),pattern='\\\\\\"\0--Ÿ­؀-؄܏឴឵‌-‏\u2028- ⁠-\ufeff￰-￿]',escapable=new RegExp("["+pattern,"g"),gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,(function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function str(e,t){var o,n,i,a,r,s=gap,c=t[e];switch(c&&"object"==typeof c&&(c=objectToJSON(c,e)),"function"==typeof rep&&(c=rep.call(t,e,c)),typeof c){case"string":return quote(c);case"number":return isFinite(c)?String(c):"null";case"boolean":case"null":return String(c);case"object":if(!c)return"null";if(gap+=indent,r=[],isArray(c)){for(a=c.length,o=0;o0?i+",1,s":e+",0");return new o.TimeZone(o.olson.timezones[r])};return{determine_timezone:function(){return"undefined"!=typeof console&&console.log("jstz.determine_timezone() is deprecated and will be removed in an upcoming version. Please use jstz.determine() instead."),i()},determine:i,date_is_dst:function(o){return(o.getMonth()>5?n():t())-e(o)!=0}}}()).TimeZone=function(e){"use strict";var t=null;return t=e,void 0!==o.olson.ambiguity_list[t]&&function(){for(var e=o.olson.ambiguity_list[t],n=e.length,i=0,a=e[0];i{o(25).F.murmurhash3_32_gc=function(e,t){var o,n,i,a,r,s,c,l;for(o=3&e.length,n=e.length-o,i=t,r=3432918353,s=461845907,l=0;l>>16)*r&65535)<<16)&4294967295)<<15|c>>>17))*s+(((c>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(c=0,o){case 3:c^=(255&e.charCodeAt(l+2))<<16;case 2:c^=(255&e.charCodeAt(l+1))<<8;case 1:i^=c=(65535&(c=(c=(65535&(c^=255&e.charCodeAt(l)))*r+(((c>>>16)*r&65535)<<16)&4294967295)<<15|c>>>17))*s+(((c>>>16)*s&65535)<<16)&4294967295}return i^=e.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}},613:(e,t,o)=>{var n=o(25).F;n.sha1=function(e){var t,o,i,a,r,s,c,l,d,u,f=function(e,t){return e<>>32-t},g=function(e){var t,o="";for(t=7;t>=0;t--)o+=(e>>>4*t&15).toString(16);return o},p=[],m=1732584193,w=4023233417,v=2562383102,h=271733878,A=3285377520,k=[];for(u=(e=n.encodeUtf8(e)).length,o=0;o>>29),k.push(u<<3&4294967295),t=0;t{var n=o(25).F;n.build=function(){"use strict";function e(){var e,t,o;for(e=0;e{var SnowPlow=__webpack_require__(25).F;__webpack_require__(930),__webpack_require__(613);var JSON2=__webpack_require__(392).V,jstz=__webpack_require__(750).jstz;__webpack_require__(376),__webpack_require__(812),SnowPlow.Tracker=function Tracker(argmap){var registeredHooks={},locationArray=setLocationArray(),domainAlias=SnowPlow.fixupDomain(locationArray.domain),locationHrefAlias=locationArray.locationHrefAlias,configReferrerUrl=locationArray.configReferrerUrl,configRequestMethod="GET",configPlatform="web",configCollectorUrl=constructCollectorUrl(argmap),configTrackerSiteId="",configCustomUrl,configTitle=SnowPlow.documentAlias.title,configDownloadExtensions="7z|aac|ar[cj]|as[fx]|avi|bin|csv|deb|dmg|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|ms[ip]|od[bfgpst]|og[gv]|pdf|phps|png|ppt|qtm?|ra[mr]?|rpm|sea|sit|tar|t?bz2?|tgz|torrent|txt|wav|wm[av]|wpd||xls|xml|z|zip",configHostsAlias=[domainAlias],configIgnoreClasses=[],configDownloadClasses=[],configLinkClasses=[],configTrackerPause=500,configMinimumVisitTime,configHeartBeatTimer,configDiscardHashTag,configCookieNamePrefix="_sp_",configCookieDomain,configCookiePath,configDoNotTrack,configCountPreRendered,configVisitorCookieTimeout=63072e6,configSessionCookieTimeout=18e5,configReferralCookieTimeout=15768e6,configEncodeBase64=!0,documentCharset=SnowPlow.documentAlias.characterSet||SnowPlow.documentAlias.charset,browserLanguage=SnowPlow.navigatorAlias.userLanguage||SnowPlow.navigatorAlias.language,browserFeatures=detectBrowserFeatures(),timezone=detectTimezone(),fingerprint=generateFingerprint(),linkTrackingInstalled=!1,activityTrackingInstalled=!1,lastActivityTime,minXOffset,maxXOffset,minYOffset,maxYOffset,lastButton,lastTarget,hash=SnowPlow.sha1,domainHash,domainUserId,businessUserId,pixelCookieName,configPixelCookieTimeout,ecommerceTransaction=ecommerceTransactionTemplate();function constructCollectorUrl(e){return void 0===e?null:"cf"in e?collectorUrlFromCfDist(e.cf):"url"in e?asCollectorUrl(e.url):void 0}function ecommerceTransactionTemplate(){return{transaction:{},items:[]}}function purify(e){var t;return configDiscardHashTag?(t=new RegExp("#.*"),e.replace(t,"")):e}function getProtocolScheme(e){var t=new RegExp("^([a-z]+):").exec(e);return t?t[1]:null}function resolveRelativeReference(e,t){var o;return getProtocolScheme(t)?t:"/"===t.slice(0,1)?getProtocolScheme(e)+"://"+SnowPlow.getHostName(e)+t:((o=(e=purify(e)).indexOf("?"))>=0&&(e=e.slice(0,o)),(o=e.lastIndexOf("/"))!==e.length-1&&(e=e.slice(0,o+1)),e+t)}function isSiteHostName(e){var t,o,n;for(t=0;t0&&e.slice(n)===o)return!0}}return!1}function getImage(e){if(SnowPlow.isString(configCollectorUrl)){if(null===configCollectorUrl)throw"No SnowPlow collector configured, cannot track";setImage(configCollectorUrl+e)}else if(SnowPlow.isArray(configCollectorUrl))for(var t=0;tmaxXOffset&&(maxXOffset=t);var o=e[1];omaxYOffset&&(maxYOffset=o)}function setDomainUserIdCookie(e,t,o,n,i){SnowPlow.setCookie(getCookieName("id"),e+"."+t+"."+o+"."+n+"."+i,configVisitorCookieTimeout,configCookiePath,configCookieDomain)}function loadDomainUserIdCookie(){var e,t=new Date,o=Math.round(t.getTime()/1e3),n=getCookieValue("id");return n?(e=n.split(".")).unshift("0"):(domainUserId||(domainUserId=hash((SnowPlow.navigatorAlias.userAgent||"")+(SnowPlow.navigatorAlias.platform||"")+JSON2.stringify(browserFeatures)+o).slice(0,16)),e=["1",domainUserId,o,0,o,""]),e}function getTimestamp(){return(new Date).getTime()}function getRequest(e,t){var o,n,i,a,r,s,c,l=new Date,d=Math.round(l.getTime()/1e3),u=getCookieName("id"),f=getCookieName("ses"),g=loadDomainUserIdCookie(),p=getCookieValue("ses"),m=SnowPlow.getCookie(pixelCookieName),w=configCustomUrl||setLocationArray().locationHrefAlias;if(configDoNotTrack)return SnowPlow.setCookie(u,"",-1,configCookiePath,configCookieDomain),SnowPlow.setCookie(f,"",-1,configCookiePath,configCookieDomain),"";for(o in g[0],n=g[1],a=g[2],i=g[3],r=g[4],s=g[5],p||(i++,s=r),e.addRaw("dtm",getTimestamp()),!configDoNotTrack&&m&&e.addRaw("pv3",m),e.addRaw("tid",String(Math.random()).slice(2,8)),e.addRaw("vp",detectViewport()),e.addRaw("ds",detectDocumentSize()),e.addRaw("vid",i),e.addRaw("duid",n),e.add("p",configPlatform),e.add("tv",SnowPlow.version),e.add("fp",fingerprint),e.add("aid",configTrackerSiteId),e.add("lang",browserLanguage),e.add("cs",documentCharset),e.add("tz",timezone),e.add("uid",businessUserId),setLocationArray().configReferrerUrl.length&&e.add("refr",purify(setLocationArray().configReferrerUrl)),browserFeatures)Object.prototype.hasOwnProperty.call(browserFeatures,o)&&(c="res"===o||"cd"===o||"cookie"===o?"":"f_",e.addRaw(c+o,browserFeatures[o]));e.add("url",purify(w));var v=e.build();return setDomainUserIdCookie(n,a,i,d,s),SnowPlow.setCookie(f,"*",configSessionCookieTimeout,configCookiePath,configCookieDomain),v+=SnowPlow.executePluginMethod(t)}function setLocationArray(){var e=SnowPlow.fixupUrl(SnowPlow.documentAlias.domain,SnowPlow.windowAlias.location.href,SnowPlow.getReferrer());return{domain:e[0],locationHrefAlias:e[1],configReferrerUrl:e[2]}}function collectorUrlFromCfDist(e){return asCollectorUrl(e+".cloudfront.net")}function asCollectorUrl(e){if(SnowPlow.isString(e))return("https:"==SnowPlow.documentAlias.location.protocol?"https":"http")+"://"+e+"/i";if(SnowPlow.isArray(e)){for(var t=[],o=0;o0?"&":"?";t+=i+e+"="+(n?SnowPlow.encodeWrapper(o):o)}},n=function(e){var t=new RegExp("\\$(.[^\\$]+)$").exec(e);if(t)return t[1]},i=function(e,t){switch(t){case"tms":return SnowPlow.toTimestamp(e,!0);case"ts":return SnowPlow.toTimestamp(e,!1);case"dt":return SnowPlow.toDatestamp(e);default:return e}},a=function e(t){var o={};for(var a in t){var r=a,s=t[a];t.hasOwnProperty(r)&&(SnowPlow.isDate(s)&&(type=n(r),type||(type="tms",r+="$"+type),s=i(s,type)),SnowPlow.isJson(s)&&(s=e(s))),o[r]=s}return o},r=function(e,t){o(e,t,!0)},s=function(e,t){o(e,t,!1)};return{add:r,addRaw:s,addJson:function(t,o,n){if(SnowPlow.isNonEmptyJson(n)){var i=a(n),c=JSON2.stringify(i);e?s(t,SnowPlow.base64urlencode(c)):r(o,c)}},build:function(){return t}}}function logPageView(e,t,o,n,i,a,r,s){var c=SnowPlow.fixupTitle(e||configTitle),l=requestStringBuilder(configEncodeBase64);l.add("e","pv"),l.add("page",c),l.add("se_ca",o),l.add("se_ac",n),l.add("se_la",i),l.add("se_pr",a),l.add("se_psk",r),l.add("se_va",s),l.addJson("cx","co",t),sendRequest(getRequest(l,"pageView"),configTrackerPause);var d=new Date;configMinimumVisitTime&&configHeartBeatTimer&&!activityTrackingInstalled&&(activityTrackingInstalled=!0,resetMaxScrolls(),SnowPlow.addEventListener(SnowPlow.documentAlias,"click",activityHandler),SnowPlow.addEventListener(SnowPlow.documentAlias,"mouseup",activityHandler),SnowPlow.addEventListener(SnowPlow.documentAlias,"mousedown",activityHandler),SnowPlow.addEventListener(SnowPlow.documentAlias,"mousemove",activityHandler),SnowPlow.addEventListener(SnowPlow.documentAlias,"mousewheel",activityHandler),SnowPlow.addEventListener(SnowPlow.windowAlias,"DOMMouseScroll",activityHandler),SnowPlow.addEventListener(SnowPlow.windowAlias,"scroll",scrollHandler),SnowPlow.addEventListener(SnowPlow.documentAlias,"keypress",activityHandler),SnowPlow.addEventListener(SnowPlow.documentAlias,"keydown",activityHandler),SnowPlow.addEventListener(SnowPlow.documentAlias,"keyup",activityHandler),SnowPlow.addEventListener(SnowPlow.windowAlias,"resize",activityHandler),SnowPlow.addEventListener(SnowPlow.windowAlias,"focus",activityHandler),SnowPlow.addEventListener(SnowPlow.windowAlias,"blur",activityHandler),lastActivityTime=d.getTime(),setInterval((function(){var e=new Date;lastActivityTime+configHeartBeatTimer>e.getTime()&&configMinimumVisitTime{"use strict";__webpack_require__(196),__webpack_require__(179);const e={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let t;const o=new Uint8Array(16);function n(){if(!t&&(t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!t))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(o)}const i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));function a(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}const r=function(t,o,i){if(e.randomUUID&&!o&&!t)return e.randomUUID();const r=(t=t||{}).random||(t.rng||n)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,o){i=i||0;for(let e=0;e<16;++e)o[i+e]=r[e];return o}return a(r)};var s=__webpack_require__(25);const c={};var l;!function(e){e.FIRST_PARTY="firstParty",e.THIRD_PARTY="thirdParty"}(l||(l={}));const d=["p.yotpo.com"],u=[l.FIRST_PARTY,l.THIRD_PARTY],f=(e,t,o)=>{const n=e.filter((e=>e.name.includes(o)));if(n.length>0)return n.reduce(((e,o)=>o.startTime<=t&&o.startTime>e.startTime?o:e),n[0])},g=(e,t,o,n)=>{if(!o)return;const i=o.filter((o=>o.name===`yotpo:${e}:${t}`));if(i.length>0){const e=window.performance.now();let t;return n&&(t=i.find((e=>"detail"in e&&e.detail===n))),t||(t=i.reduce(((t,o)=>o.startTime<=e&&o.startTime>t.startTime?o:t),i[0])),Math.round(t.startTime)}};function p(e,t,o){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const m={};class w{constructor(e){let{guid:t,category:o,defaultContext:n,widgetUuid:i,preventEvents:a}=e;p(this,"defaultContext",{}),p(this,"loaded",!1),p(this,"widgetLoaded",!1),this.storeId=t,this.category=o,this.widgetUuid=i,this.preventEvents=a,this.defaultContext=n,this.baseEventContext={session_id:i||r(),sequence:0},this.yotpoAnalytics=this.createYotpoAnalytics(this.storeId)}compareReadonlySettings(e){return Object.keys(e).every((t=>e[t]===this[t]))}async trackWidgetLoaded(e,t,o){if(this.widgetLoaded)return!1;const n=await this.trackEvent("loaded",e,t,o,(e=>this.createLoadedEventContext(e)));return this.widgetLoaded=!0,n}async trackWidgetEvent(e,t,o,n){return this.trackEvent(e,t,o,n).catch((()=>Promise.resolve(!1)))}async trackEvent(e,t,o,n,i){if(this.preventEvents)return Promise.resolve(!1);const a=i?i(n):n;return this.trackInternal(this.createEvent(e,t,o,a))}async getDomainUserId(){if(!this.yotpoAnalytics)return Promise.resolve(null);const e=this.yotpoAnalytics.getDomainUserId();return Promise.resolve(e)}async getHashFunction(){if(!this.yotpoAnalytics)return Promise.resolve((()=>""));const e=this.yotpoAnalytics.getHashFunction();return Promise.resolve(e)}async trackInternal(e){return this.yotpoAnalytics?(this.yotpoAnalytics.trackEvent(e.category,e.action,e.label,e.property,e.context),Promise.resolve(!0)):Promise.resolve(!1)}createYotpoAnalytics(e){const t={reporting_end_points:d,supportedCookies:u},o={getAnalyticsVersion:()=>"onsite_v3",getUserSetting:e=>t[e],getAppKey:()=>e};return this.pixelId=(e=>{const t={};return document.cookie.split(";").forEach((e=>{const[o,n]=e.split("=");t[o.trim()]=n})),t[e]||""})("yotpo_pixel"),new c.Analytics(o)}createLoadedEventContext(e){return{...e||{},duration:this.getWidgetDurationStats()}}createEvent(e,t,o,n){return{category:this.category,action:e,label:t,property:o,context:{...this.defaultContext,...n||{},session_id:this.baseEventContext.session_id,sequence:(this.baseEventContext.sequence++).toString(),pixel_id:this.pixelId}}}getWidgetDurationStats(){const e=this.category,t=this.widgetUuid;if("undefined"!=typeof window&&window.performance){const i=window.performance.now(),a=null===(o=window)||void 0===o||null===(o=o.performance)||void 0===o||null===(n=o.getEntries)||void 0===n?void 0:n.call(o),r=null==a?void 0:a.filter((e=>"mark"===e.entryType&&e.name.startsWith("yotpo"))),s=(e=>g("loader","loaded",e))(r),c=(e=>g("initializer","loaded",e))(r),l=g(e,"loaded",r),d=g(e,"start",r,t),u=g(e,"end",r,t)||i,p=(e=>{var t;if(e){const t=e.find((e=>"navigation"===e.entryType));if(t)return t}return null===(t=window)||void 0===t||null===(t=t.performance)||void 0===t?void 0:t.timing})(a),m=(e=>{if(e){const t="startTime"in e?e.startTime:e.navigationStart;return Math.round(e.domContentLoadedEventStart-t)}})(p),w=(e=>{if(e&&e.loadEventEnd){const t="startTime"in e?e.startTime:e.navigationStart;return Math.round(e.loadEventEnd-t)}})(p),v=((e,t)=>{const o=null==t?void 0:t.filter((e=>"resource"===e.entryType&&"script"===e.initiatorType));if(o&&o.length>0){var n,i;const t=f(o,e,"cdn-widgetsrepository.yotpo.com/v1/loader");let a=f(o,e,"cdn-widget-assets.yotpo.com/widgets-initializer");a||(a=f(o,e,"cdn-widgetsrepository.yotpo.com/widget-assets/widgets-initializer"));const r=f(o,e,"cdn-widgetsrepository.yotpo.com/widget-assets/yotpo-pixel");return{loader_script_start:null==t?void 0:t.startTime,loader_script_duration:null!=t&&t.duration?Math.round(t.duration):void 0,initializer_script_start:null===(n=a)||void 0===n?void 0:n.startTime,initializer_script_duration:null!==(i=a)&&void 0!==i&&i.duration?Math.round(a.duration):void 0,analytics_script_start:null==r?void 0:r.startTime,analytics_script_duration:null!=r&&r.duration?Math.round(r.duration):void 0}}})(i,a),h=c?Math.round(u-c):void 0,A=d?Math.round(u-d):void 0,k=m?Math.round(u-m):void 0,y=s?Math.round(u-s):void 0;return{time_from_page_start:Math.round(u),time_from_init_start:h,time_from_initializer_mark:h,time_from_loader_mark:y,time_from_widget_mark:A,time_from_dom_loaded:k,initializer_load_time:c,widget_load_time:l,loader_load_time:s,dom_loaded_time:m,page_load_duration:w,loader_script_start:null==v?void 0:v.loader_script_start,loader_script_duration:null==v?void 0:v.loader_script_duration,initializer_script_start:null==v?void 0:v.initializer_script_start,initializer_script_duration:null==v?void 0:v.initializer_script_duration,analytics_script_start:null==v?void 0:v.analytics_script_start,analytics_script_duration:null==v?void 0:v.analytics_script_duration}}var o,n}}var v=function(){c.getCookie=s.F.getCookie,c.setCookie=s.F.setCookie,c.getDomainUserId=s.F.asyncTracker.getDomainUserId;var e=s.F._yaq,t="yotpo_pixel",o=9e7;function n(o){this._controller=o,this.pageSku=o.pageSku;var n=o.getAnalyticsVersion(),i=o.getUserSetting("reporting_end_points");this.featureTestingGroups=null,this._controller.getTestingGroupsForAnalytics&&(this.featureTestingGroups=this._controller.getTestingGroupsForAnalytics()),i?l.apply(this,[i,n]):a.apply(this,[n]),this.trackedObjects={};var s=o.getUserSetting("cookie_path");s&&e.push(["setCookiePath",s.settings.sub_path]);const d=this._controller.getUserSetting("supportedCookies");d&&d.includes("firstParty")&&0===c.getCookie(t)&&e.push(["setPixelCookie",r()])}function i(t,o,n,i,a,r,s,c){e.push(["trackStructEvent",t,o,n,i,a,r,c,s])}function a(n){e.push(["setCollectorCf","YOTPO_ANALYTICS_CF_ID"]),e.push(["enableActivityTracking",10,10]),e.push(["setAppId",n]),e.push(["setPixelCookieName",t]),e.push(["setConfigPixelCookieTimeout",o])}function l(n,i){e.push(["setCollectorUrl",n]),e.push(["enableActivityTracking",10,10]),e.push(["setAppId",i]),e.push(["setPixelCookieName",t]),e.push(["setConfigPixelCookieTimeout",o])}return n.prototype.trackEvent=function(e,t,o,n,a){1==this._firstEvent&&(this.trackPageView(this),this._firstEvent=!1),i.apply(this,[e,t,o,n,this.pageSku,this._controller.getAppKey(),this.featureTestingGroups,a])},n.prototype.trackUniqueEvent=function(e,t,o,n,i){var a=e+t+(n||"")+(JSON.stringify(i)||"");this.trackedObjects[a]||(this.trackEvent(e,t,o,n,i),this.trackedObjects[a]=!0)},n.prototype.trackReview=function(e,t,o,n){var i=e.getAttribute("data-review-id");(function(e){return"0"==e})(i)||this.trackUniqueEvent(t,o,"review",i,n)},n.prototype.trackPageView=function(){e.push(["trackPageView",null,null,null,null,null,null,this.pageSku,this._controller.getAppKey()])},n.prototype.trackConversion=function(t,o,n,i){e.push(["trackConversion",t,o,n,i])},n.prototype.getYaq=function(){return e},n.prototype.getDomainUserId=function(){return s.F.asyncTracker.getDomainUserId()},n.prototype.getHashFunction=function(){return s.F.sha1},n}();c.Analytics=v,window.Yotpo?(window.Yotpo.Analytics=window.Yotpo.Analytics||c.Analytics,window.Yotpo.getCookie=window.Yotpo.getCookie||c.getCookie,window.Yotpo.setCookie=window.Yotpo.setCookie||c.setCookie):window.Yotpo=c,window.yotpoWidgetsContainer=window.yotpoWidgetsContainer||{},window.yotpoWidgetsContainer.Analytics=v,window.yotpoWidgetsContainer.AnalyticsTools={WidgetsAnalyticsFactory:e=>{var t;const o=(e=>{const{guid:t,category:o}=e;return`${t}_${o}`})(e);return m[o]?(null!==(t=m[o])&&void 0!==t&&t.compareReadonlySettings(e)&&console.error("Another instance of Analytics for this type off widget already exists with different parameters. Existing instance is returned"),m[o]):(m[o]=new w(e),m[o])}},window.yotpoWidgetsContainer.GetAnalyticsId=s.F.asyncTracker.getDomainUserId})()})();