!function(){"use strict";var e={1693:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CustomerEventsObserver=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(n(7385).EcommerceIntegration);t.CustomerEventsObserver=i},7385:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EcommerceIntegration=t.ANALYTICS_ADDED_PAYMENT=t.ANALYTICS_PERFORMED_SEARCH=t.ANALYTICS_STARTED_ORDER=t.ANALYTICS_COMPLETED_ORDER=t.ANALYTICS_ADDED_PRODUCT=t.ANALYTICS_VIEWED_PRODUCT_CATEGORY=t.ANALYTICS_VIEWED_PRODUCT=t.ANALYTICS_PAGE_VIEW=t.ANALYTICS_GENERIC_EVENT=void 0;var i=n(997),a=n(542),c=n(6997),s=n(1102),u=n(372),d=n(1930),p={viewedProduct:/^[ _]?viewed[ _]?product[ _]?$/i,viewedProductCategory:/^[ _]?viewed[ _]?product[ _]?category[ _]?$/i,viewedProductVariant:/^[ _]?viewed[ _]?product[ _]?variant[ _]?$/i,addedProduct:/^[ _]?added[ _]?product[ _]?$/i,completedOrder:/^[ _]?completed[ _]?order[ _]?$/i,startedOrder:/^[ _]?started[ _]?order[ _]?$/i,performedSearch:/^[ _]?performed[ _]?search[ _]?$/i,addedPayment:/^[ _]?added[ _]?payment[ _]?$/i};t.ANALYTICS_GENERIC_EVENT="genericEvent",t.ANALYTICS_PAGE_VIEW="pageView",t.ANALYTICS_VIEWED_PRODUCT="viewedProduct",t.ANALYTICS_VIEWED_PRODUCT_CATEGORY="viewedProductCategory",t.ANALYTICS_ADDED_PRODUCT="addedProduct",t.ANALYTICS_COMPLETED_ORDER="completedOrder",t.ANALYTICS_STARTED_ORDER="startedOrder",t.ANALYTICS_PERFORMED_SEARCH="performedSearch",t.ANALYTICS_ADDED_PAYMENT="addedPayment";var l=function(e){function t(t,n,r){var o=e.call(this,t,n)||this;return o.shopId=void 0,o.checkoutToken=void 0,o.visitToken=void 0,o.uniqueToken=void 0,o.appName=void 0,o.wrapTrack(),r&&(o.shopId=r.shopId,o.appName=r.appName,o.checkoutToken=r.checkoutToken,o.visitToken=r.visitToken,o.uniqueToken=r.uniqToken),o}return o(t,e),t.prototype.ensureTrackingConsent=function(e,t){c.privacyApiMethods.userCanBeTracked()?e():(document.addEventListener(a.TrackingConsentEvents.TRACKING_ACCEPTED,e),t())},t.prototype.wrapTrack=function(){var e=this.track;this.track=function(t){var n=t.event,r=!1;for(var o in p){var i=p[o];if(this[o]&&i.test(n)){this[o].apply(this,[t]),r=!0;break}}r||e.apply(this,Array.prototype.slice.call(arguments))}},t.prototype.addMonorailBatchEvent=function(e){if(this.appName&&this.appName in d.appNameToEcommerceEventSchemaId){var t=this.getEcommercePixelIds();i.addBatchEvent({schemaId:e.schemaId?e.schemaId:d.appNameToEcommerceEventSchemaId[this.appName],payload:s.objectAssignFilterUndefined({shop_id:this.shopId,partner_name:this.getEcommerceMetricsTag(),event_name:e.eventName,unique_token:this.uniqueToken,visit_token:this.visitToken,integration_id:this.getIntegrationId()},{pixel_id:t&&t.length>0?t[0]:void 0,event_properties:e.eventProperties,checkout_token:this.checkoutToken,event_id:e.eventId})}),e.eventName in d.ecommerceEventNameSchemaId&&i.addBatchEvent({schemaId:d.ecommerceEventNameSchemaId[e.eventName],payload:{shop_id:this.shopId,partner_name:this.getEcommerceMetricsTag()}})}},t}(u.Integration);t.EcommerceIntegration=l},372:function(e,t){var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.length)return n.substr(t.length)}},793:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TrackingConsentEvents=void 0,(t.TrackingConsentEvents||(t.TrackingConsentEvents={})).TRACKING_ACCEPTED="trackingConsentAccepted"},5291:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TrackingRegulations=void 0,(n=t.TrackingRegulations||(t.TrackingRegulations={})).GDPR="GDPR",n.CCPA="CCPA",n.NO_VALUE=""},542:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.TrackingRegulations=t.TrackingConsentEvents=void 0;var r=n(793);Object.defineProperty(t,"TrackingConsentEvents",{enumerable:!0,get:function(){return r.TrackingConsentEvents}});var o=n(5291);Object.defineProperty(t,"TrackingRegulations",{enumerable:!0,get:function(){return o.TrackingRegulations}})},5089:function(e,t,n){var r=n(9426),o=n(2308);try{var i=window.analytics.config;if(i){o.setGlobalSerializedAppConfig(JSON.stringify(i));var a=window.analytics,c=window.trekkie=new r.Tricorder([],i,(function(){window.analytics=c,window._visit={tag:function(){},multitrackToken:function(){return c.trekkie.defaultAttributes.uniqToken}},c.user=function(){return{traits:function(){return{uniqToken:c.trekkie.defaultAttributes.uniqToken}}}},r.replayAnalyticsQueue(c,a)}))}}catch(e){o.internalError(e)}},8831:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0;--t){var n=Math.floor(Math.random()*t),r=e[n];e[n]=e[t-1],e[t-1]=r}}(t),t.length>1&&0===t[0].indexOf("event=")){var r=t[0];t[0]=t[1],t[1]=r}return t.join("&")}},t.setGlobalSerializedAppConfig=function(e){r=e},t.internalError=function(e,n){var a={name:e.name,line:e.lineNumber||e.line,script:e.fileName||e.sourceURL||e.script,stack:e.stackTrace||e.stack||e.description,message:e.message,url:o.href(),context:void 0!==n?n:null,appConfig:r||null};i.emitError("internalError",t.requestImpl.queryString(a))}},7668:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.hexTime=t.buildToken=t.FirstSeenManager=t.UniqueIdManager=t.firstSeenKey=t.longTermKey=t.deprecatedLongTermKey=t.shortTermKey=t.deprecatedShortTermKey=void 0;var r=n(7e3),o=n(6997),i=n(2971);t.deprecatedShortTermKey="_s",t.shortTermKey="_shopify_s",t.deprecatedLongTermKey="_y",t.longTermKey="_shopify_y",t.firstSeenKey="_shopify_fs";var a="xxxx-4xxx-xxxx-xxxxxxxxxxxx",c=function(){function e(e){this.isServerSideCookieWritingEnabled=e}return e.prototype.fetchOrSet=function(e,t,n,r){if(!o.enabled())return"00000000-0000-0000-4000-000000000000";var a=o.read(n)||o.read(t),c=!r;a||(a=u(),c=!0,r&&i.emitMetric("serverSideCookieNotSet_"+n,1)),c&&(o.write(t,a,e),o.write(n,a,e));var s=o.read(n)||o.read(t);return void 0===s?"00000000-0000-0000-5000-000000000000":s},e.prototype.shortTerm=function(){return this.fetchOrSet(!1,t.deprecatedShortTermKey,t.shortTermKey,!1)},e.prototype.longTerm=function(){return this.fetchOrSet(!0,t.deprecatedLongTermKey,t.longTermKey,this.isServerSideCookieWritingEnabled)},e}();t.UniqueIdManager=c;var s=function(){function e(){}return e.prototype.fetchOrSet=function(e){var t=o.read(e)||(new Date).toJSON();return o.write(e,t,!0),t},e.prototype.firstSeen=function(){return this.fetchOrSet(t.firstSeenKey)},e}();function u(){var e="";try{var t=r.virtualWindow().crypto(),n=new Uint16Array(31);t.getRandomValues(n);var o=0;e=a.replace(/[x]/g,(function(e){for(var t=[],r=1;r>>0}catch(t){e=(new Date).getTime()>>>0}try{t=performance.now()>>>0}catch(e){t=0}var n=Math.abs(e+t).toString(16).toLowerCase();return"00000000".substr(0,8-n.length)+n}t.FirstSeenManager=s,t.buildToken=u,t.hexTime=d},1102:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.generateShopifyDValue=t.objectAssignFilterUndefined=void 0,t.objectAssignFilterUndefined=function(e,t){for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e},t.generateShopifyDValue=function(){return(new Date).toJSON()}},9426:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.replayAnalyticsQueue=t.Tricorder=void 0;var r=n(8831),o=n(2308),i=n(1503),a=n(725),c=n(997),s=n(793),u=n(6997),d=n(7668),p=n(1693),l=n(1930),v=/^https?:\/\//,f=function(){function e(e,t,n){var r=this;this.integrations=[];var o=t.Trekkie.isPixelGateEnabled;this.logAssetContext(t),o&&this.hasLoadFeatureScript()&&window.Shopify&&window.Shopify.loadFeatures?window.Shopify.loadFeatures([{name:"consent-tracking-api",version:"0.1"}],(function(o){if(o)throw new Error(o);r.initialize(e,t,n)})):this.initialize(e,t,n)}return e.prototype.logAssetContext=function(e){var t,n,r,o;c.addBatchEvent({schemaId:l.trekkieAssetContextSchemaId,payload:{build_id:"9f320156b58d74db598714aa83b6a5fbab4d4efb",page_url:window.location.href,app_name:null===(t=e.Trekkie)||void 0===t?void 0:t.appName,shop_id:null===(r=null===(n=e.Trekkie)||void 0===n?void 0:n.defaultAttributes)||void 0===r?void 0:r.shopId,monorail_region:(null===(o=e.Trekkie)||void 0===o?void 0:o.monorailRegion)||"not_set"}})},e.prototype.hasLoadFeatureScript=function(){var e=document.querySelectorAll('[data-source-attribution="shopify.loadfeatures"]');return Boolean(e.length)},e.prototype.initialize=function(e,t,n){var o=this;this.trekkie=new r.Trekkie(t.Trekkie,(function(){setTimeout((function(){o.loadIntegrations(e,t,o.trekkie,n)}),0)})),this.integrations[0]!==this.trekkie&&this.integrations.unshift(this.trekkie)},e.prototype.loadIntegrations=function(e,t,n,r){for(var i=this.waitFor(e.length,(function(){try{r(),c.flushBatchEvents()}catch(e){o.internalError(e)}})),a=0,s=e;a0?e:e+a.search();var t=a.href(),n=t.indexOf("#");return-1===n?t:t.slice(0,n)},e}();t.Tricorder=f,t.replayAnalyticsQueue=function(e,t){for(var n=0,r=t;n