@adv-re/segment-wrapper 5.0.0-beta.0 → 5.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -59,7 +59,7 @@ interface IntegrationsObject {
59
59
  'Adobe Analytics'?: boolean | {
60
60
  marketingCloudVisitorId?: string;
61
61
  };
62
- 'Google Analytics 4'?: boolean;
62
+ 'Google Analytics 4 Web'?: boolean;
63
63
  Personas?: boolean;
64
64
  Webhooks?: boolean;
65
65
  Webhook?: boolean;
package/dist/index.d.ts CHANGED
@@ -59,7 +59,7 @@ interface IntegrationsObject {
59
59
  'Adobe Analytics'?: boolean | {
60
60
  marketingCloudVisitorId?: string;
61
61
  };
62
- 'Google Analytics 4'?: boolean;
62
+ 'Google Analytics 4 Web'?: boolean;
63
63
  Personas?: boolean;
64
64
  Webhooks?: boolean;
65
65
  Webhook?: boolean;
package/dist/index.js CHANGED
@@ -1706,17 +1706,17 @@ var trackTcf = ({ gdprPrivacy }) => {
1706
1706
  CMP_TRACK_EVENT,
1707
1707
  {
1708
1708
  ...TCF_TRACK_PROPERTIES,
1709
- ...getConfig("tcfTrackDefaultProperties") || {}
1710
- },
1711
- {
1709
+ ...getConfig("tcfTrackDefaultProperties") || {},
1712
1710
  // Consent Mode properties for Segment → GA4 mapping (v5)
1713
- // These are mapped in Segment Dashboard from context.google_consents.* to GA4 Consent Mode
1711
+ // These are sent as event properties and mapped in Segment GA4 Device Mode to GA4 Consent Mode
1714
1712
  google_consents: {
1715
1713
  analytics_storage: isAnalyticsAccepted ? "granted" : "denied",
1716
1714
  ad_storage: isAdvertisingAccepted ? "granted" : "denied",
1717
1715
  ad_user_data: isAdvertisingAccepted ? "granted" : "denied",
1718
1716
  ad_personalization: isAdvertisingAccepted ? "granted" : "denied"
1719
- },
1717
+ }
1718
+ },
1719
+ {
1720
1720
  // Keep gdpr_privacy in context for compatibility with other integrations
1721
1721
  gdpr_privacy: gdprPrivacy.analytics,
1722
1722
  gdpr_privacy_advertising: gdprPrivacy.advertising
@@ -1730,6 +1730,9 @@ var getGdprPrivacyValue = () => {
1730
1730
  gdprState.addListener((gdprPrivacyValue2) => resolve(gdprPrivacyValue2));
1731
1731
  });
1732
1732
  };
1733
+ var getGdprPrivacyValueSync = () => {
1734
+ return gdprState.get();
1735
+ };
1733
1736
  var checkAnalyticsGdprIsAccepted = (gdprPrivacyValue) => {
1734
1737
  return gdprPrivacyValue?.analytics === USER_GDPR.ACCEPTED;
1735
1738
  };
@@ -1792,11 +1795,7 @@ function initTcfTracking() {
1792
1795
  analytics: analyticsStateKey,
1793
1796
  advertising: advertisingStateKey
1794
1797
  };
1795
- const MIGRATION_DIDOMI_SEGMENT_WRAPPER_FLAG = "didomi-migration";
1796
- const isDidomiMigration = isClient && window.sessionStorage.getItem(MIGRATION_DIDOMI_SEGMENT_WRAPPER_FLAG);
1797
- return !isDidomiMigration && trackTcf({
1798
- gdprPrivacy
1799
- });
1798
+ trackTcf({ gdprPrivacy });
1800
1799
  }
1801
1800
  }
1802
1801
  });
@@ -1915,7 +1914,7 @@ var getTrackIntegrations = async ({
1915
1914
  return {
1916
1915
  ...restOfIntegrations,
1917
1916
  "Adobe Analytics": marketingCloudVisitorId ? { marketingCloudVisitorId } : true,
1918
- "Google Analytics 4": true
1917
+ "Google Analytics 4 Web": true
1919
1918
  };
1920
1919
  };
1921
1920
  var getRestOfIntegrations = ({
@@ -1977,7 +1976,7 @@ var decorateContextWithNeededData = async ({
1977
1976
  ...context,
1978
1977
  ...!isGdprAccepted && { ip: "0.0.0.0" },
1979
1978
  ...getExternalIds({ context, xandrId }),
1980
- clientVersion: `segment-wrapper@${"5.0.0-beta.0"}`,
1979
+ clientVersion: `segment-wrapper@${"5.0.0-beta.2"}`,
1981
1980
  gdpr_privacy: gdprPrivacyValueAnalytics,
1982
1981
  gdpr_privacy_advertising: gdprPrivacyValueAdvertising,
1983
1982
  integrations: {
@@ -2212,6 +2211,26 @@ var campaignContext = ({ payload, next }) => {
2212
2211
  next(payload);
2213
2212
  };
2214
2213
 
2214
+ // src/middlewares/source/consentMode.ts
2215
+ var consentMode = ({ payload, next }) => {
2216
+ const gdprPrivacyValue = getGdprPrivacyValueSync();
2217
+ if (gdprPrivacyValue) {
2218
+ const { analytics, advertising } = gdprPrivacyValue;
2219
+ const isAnalyticsAccepted = analytics === USER_GDPR.ACCEPTED;
2220
+ const isAdvertisingAccepted = advertising === USER_GDPR.ACCEPTED;
2221
+ payload.obj.properties = {
2222
+ ...payload.obj.properties,
2223
+ google_consents: {
2224
+ analytics_storage: isAnalyticsAccepted ? "granted" : "denied",
2225
+ ad_storage: isAdvertisingAccepted ? "granted" : "denied",
2226
+ ad_user_data: isAdvertisingAccepted ? "granted" : "denied",
2227
+ ad_personalization: isAdvertisingAccepted ? "granted" : "denied"
2228
+ }
2229
+ };
2230
+ }
2231
+ next(payload);
2232
+ };
2233
+
2215
2234
  // src/middlewares/source/defaultContextProperties.ts
2216
2235
  var DEFAULT_CONTEXT = { platform: "web" };
2217
2236
  var defaultContextProperties = ({ payload, next }) => {
@@ -2498,6 +2517,7 @@ var addMiddlewares = () => {
2498
2517
  const experimentalPageDataMiddleware = getConfig("experimentalPageDataMiddleware");
2499
2518
  window.analytics.addSourceMiddleware?.(userTraits);
2500
2519
  window.analytics.addSourceMiddleware?.(defaultContextProperties);
2520
+ window.analytics.addSourceMiddleware?.(consentMode);
2501
2521
  window.analytics.addSourceMiddleware?.(campaignContext);
2502
2522
  window.analytics.addSourceMiddleware?.(userScreenInfo);
2503
2523
  window.analytics.addSourceMiddleware?.(pageReferrer);
package/dist/index.mjs CHANGED
@@ -158,17 +158,17 @@ var trackTcf = ({ gdprPrivacy }) => {
158
158
  CMP_TRACK_EVENT,
159
159
  {
160
160
  ...TCF_TRACK_PROPERTIES,
161
- ...getConfig("tcfTrackDefaultProperties") || {}
162
- },
163
- {
161
+ ...getConfig("tcfTrackDefaultProperties") || {},
164
162
  // Consent Mode properties for Segment → GA4 mapping (v5)
165
- // These are mapped in Segment Dashboard from context.google_consents.* to GA4 Consent Mode
163
+ // These are sent as event properties and mapped in Segment GA4 Device Mode to GA4 Consent Mode
166
164
  google_consents: {
167
165
  analytics_storage: isAnalyticsAccepted ? "granted" : "denied",
168
166
  ad_storage: isAdvertisingAccepted ? "granted" : "denied",
169
167
  ad_user_data: isAdvertisingAccepted ? "granted" : "denied",
170
168
  ad_personalization: isAdvertisingAccepted ? "granted" : "denied"
171
- },
169
+ }
170
+ },
171
+ {
172
172
  // Keep gdpr_privacy in context for compatibility with other integrations
173
173
  gdpr_privacy: gdprPrivacy.analytics,
174
174
  gdpr_privacy_advertising: gdprPrivacy.advertising
@@ -182,6 +182,9 @@ var getGdprPrivacyValue = () => {
182
182
  gdprState.addListener((gdprPrivacyValue2) => resolve(gdprPrivacyValue2));
183
183
  });
184
184
  };
185
+ var getGdprPrivacyValueSync = () => {
186
+ return gdprState.get();
187
+ };
185
188
  var checkAnalyticsGdprIsAccepted = (gdprPrivacyValue) => {
186
189
  return gdprPrivacyValue?.analytics === USER_GDPR.ACCEPTED;
187
190
  };
@@ -244,11 +247,7 @@ function initTcfTracking() {
244
247
  analytics: analyticsStateKey,
245
248
  advertising: advertisingStateKey
246
249
  };
247
- const MIGRATION_DIDOMI_SEGMENT_WRAPPER_FLAG = "didomi-migration";
248
- const isDidomiMigration = isClient && window.sessionStorage.getItem(MIGRATION_DIDOMI_SEGMENT_WRAPPER_FLAG);
249
- return !isDidomiMigration && trackTcf({
250
- gdprPrivacy
251
- });
250
+ trackTcf({ gdprPrivacy });
252
251
  }
253
252
  }
254
253
  });
@@ -367,7 +366,7 @@ var getTrackIntegrations = async ({
367
366
  return {
368
367
  ...restOfIntegrations,
369
368
  "Adobe Analytics": marketingCloudVisitorId ? { marketingCloudVisitorId } : true,
370
- "Google Analytics 4": true
369
+ "Google Analytics 4 Web": true
371
370
  };
372
371
  };
373
372
  var getRestOfIntegrations = ({
@@ -429,7 +428,7 @@ var decorateContextWithNeededData = async ({
429
428
  ...context,
430
429
  ...!isGdprAccepted && { ip: "0.0.0.0" },
431
430
  ...getExternalIds({ context, xandrId }),
432
- clientVersion: `segment-wrapper@${"5.0.0-beta.0"}`,
431
+ clientVersion: `segment-wrapper@${"5.0.0-beta.2"}`,
433
432
  gdpr_privacy: gdprPrivacyValueAnalytics,
434
433
  gdpr_privacy_advertising: gdprPrivacyValueAdvertising,
435
434
  integrations: {
@@ -664,6 +663,26 @@ var campaignContext = ({ payload, next }) => {
664
663
  next(payload);
665
664
  };
666
665
 
666
+ // src/middlewares/source/consentMode.ts
667
+ var consentMode = ({ payload, next }) => {
668
+ const gdprPrivacyValue = getGdprPrivacyValueSync();
669
+ if (gdprPrivacyValue) {
670
+ const { analytics, advertising } = gdprPrivacyValue;
671
+ const isAnalyticsAccepted = analytics === USER_GDPR.ACCEPTED;
672
+ const isAdvertisingAccepted = advertising === USER_GDPR.ACCEPTED;
673
+ payload.obj.properties = {
674
+ ...payload.obj.properties,
675
+ google_consents: {
676
+ analytics_storage: isAnalyticsAccepted ? "granted" : "denied",
677
+ ad_storage: isAdvertisingAccepted ? "granted" : "denied",
678
+ ad_user_data: isAdvertisingAccepted ? "granted" : "denied",
679
+ ad_personalization: isAdvertisingAccepted ? "granted" : "denied"
680
+ }
681
+ };
682
+ }
683
+ next(payload);
684
+ };
685
+
667
686
  // src/middlewares/source/defaultContextProperties.ts
668
687
  var DEFAULT_CONTEXT = { platform: "web" };
669
688
  var defaultContextProperties = ({ payload, next }) => {
@@ -950,6 +969,7 @@ var addMiddlewares = () => {
950
969
  const experimentalPageDataMiddleware = getConfig("experimentalPageDataMiddleware");
951
970
  window.analytics.addSourceMiddleware?.(userTraits);
952
971
  window.analytics.addSourceMiddleware?.(defaultContextProperties);
972
+ window.analytics.addSourceMiddleware?.(consentMode);
953
973
  window.analytics.addSourceMiddleware?.(campaignContext);
954
974
  window.analytics.addSourceMiddleware?.(userScreenInfo);
955
975
  window.analytics.addSourceMiddleware?.(pageReferrer);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adv-re/segment-wrapper",
3
- "version": "5.0.0-beta.0",
3
+ "version": "5.0.0-beta.2",
4
4
  "description": "Modern TypeScript abstraction layer on top of the Segment library",
5
5
  "sideEffects": [
6
6
  "./src/utils/patchAnalytics.ts",
package/umd/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var ni=Object.create;var Ot=Object.defineProperty;var ii=Object.getOwnPropertyDescriptor;var ri=Object.getOwnPropertyNames;var oi=Object.getPrototypeOf,ai=Object.prototype.hasOwnProperty;var si=(c,l)=>()=>(l||c((l={exports:{}}).exports,l),l.exports);var ci=(c,l,p,_)=>{if(l&&typeof l=="object"||typeof l=="function")for(let y of ri(l))!ai.call(c,y)&&y!==p&&Ot(c,y,{get:()=>l[y],enumerable:!(_=ii(l,y))||_.enumerable});return c};var ui=(c,l,p)=>(p=c!=null?ni(oi(c)):{},ci(l||!c||!c.__esModule?Ot(p,"default",{value:c,enumerable:!0}):p,c));var wt=si(()=>{"use strict";var ar=(function(){"use strict";function c(t){"@babel/helpers - typeof";return(c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function l(t,r,o){return r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function p(){return{callbacks:{},add:function(t,r){this.callbacks[t]=this.callbacks[t]||[];var o=this.callbacks[t].push(r)-1,i=this;return function(){i.callbacks[t].splice(o,1)}},execute:function(t,r){if(this.callbacks[t]){r=r===void 0?[]:r,r=r instanceof Array?r:[r];try{for(;this.callbacks[t].length;){var o=this.callbacks[t].shift();typeof o=="function"?o.apply(null,r):o instanceof Array&&o[1].apply(o[0],r)}delete this.callbacks[t]}catch{}}},executeAll:function(t,r){(r||t&&!N.isObjectEmpty(t))&&Object.keys(this.callbacks).forEach(function(o){var i=t[o]!==void 0?t[o]:"";this.execute(o,i)},this)},hasCallbacks:function(){return!!Object.keys(this.callbacks).length}}}function _(t,r,o){var i=t?.[r];return i===void 0?o:i}function y(t){for(var r=/^\d+$/,o=0,i=t.length;o<i;o++)if(!r.test(t[o]))return!1;return!0}function P(t,r){for(;t.length<r.length;)t.push("0");for(;r.length<t.length;)r.push("0")}function U(t,r){for(var o=0;o<t.length;o++){var i=parseInt(t[o],10),s=parseInt(r[o],10);if(i>s)return 1;if(s>i)return-1}return 0}function L(t,r){if(t===r)return 0;var o=t.toString().split("."),i=r.toString().split(".");return y(o.concat(i))?(P(o,i),U(o,i)):NaN}function ce(t){return t===Object(t)&&Object.keys(t).length===0}function Ce(t){return typeof t=="function"||t instanceof Array&&t.length}function Ae(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0};this.log=Be("log",t,r),this.warn=Be("warn",t,r),this.error=Be("error",t,r)}function Ge(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.isEnabled,o=t.cookieName,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.cookies;return r&&o&&s?{remove:function(){s.remove(o)},get:function(){var d=s.get(o),f={};try{f=JSON.parse(d)}catch{f={}}return f},set:function(d,f){f=f||{},s.set(o,JSON.stringify(d),{domain:f.optInCookieDomain||"",cookieLifetime:f.optInStorageExpiry||3419e4,expires:!0})}}:{get:Ee,set:Ee,remove:Ee}}function me(t){this.name=this.constructor.name,this.message=t,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}function De(){function t(O,x){var J=We(O);return J.length?J.every(function(fe){return!!x[fe]}):Un(x)}function r(){ne(z),H(de.COMPLETE),G(A.status,A.permissions),e.set(A.permissions,{optInCookieDomain:I,optInStorageExpiry:h}),w.execute(Dt)}function o(O){return function(x,J){if(!Ye(x))throw new Error("[OptIn] Invalid category(-ies). Please use the `OptIn.Categories` enum.");return H(de.CHANGED),Object.assign(z,St(We(x),O)),J||r(),A}}var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=i.doesOptInApply,d=i.previousPermissions,f=i.preOptInApprovals,C=i.isOptInStorageEnabled,I=i.optInCookieDomain,h=i.optInStorageExpiry,m=i.isIabContext,T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=T.cookies,v=Bn(d);At(v,"Invalid `previousPermissions`!"),At(f,"Invalid `preOptInApprovals`!");var e=Ge({isEnabled:!!C,cookieName:"adobeujs-optin"},{cookies:M}),A=this,G=Ln(A),w=It(),j=yt(v),Y=yt(f),X=e.get(),$={},F=(function(O,x){return Ke(O)||x&&Ke(x)?de.COMPLETE:de.PENDING})(j,X),te=(function(O,x,J){var fe=St(Pe,!s);return s?Object.assign({},fe,O,x,J):fe})(Y,j,X),z=Gn(te),H=function(O){return F=O},ne=function(O){return te=O};A.deny=o(!1),A.approve=o(!0),A.denyAll=A.deny.bind(A,Pe),A.approveAll=A.approve.bind(A,Pe),A.isApproved=function(O){return t(O,A.permissions)},A.isPreApproved=function(O){return t(O,Y)},A.fetchPermissions=function(O){var x=arguments.length>1&&arguments[1]!==void 0&&arguments[1],J=x?A.on(de.COMPLETE,O):Ee;return!s||s&&A.isComplete||f?O(A.permissions):x||w.add(Dt,function(){return O(A.permissions)}),J},A.complete=function(){A.status===de.CHANGED&&r()},A.registerPlugin=function(O){if(!O||!O.name||typeof O.onRegister!="function")throw new Error(Xn);$[O.name]||($[O.name]=O,O.onRegister.call(O,A))},A.execute=Kn($),Object.defineProperties(A,{permissions:{get:function(){return te}},status:{get:function(){return F}},Categories:{get:function(){return _e}},doesOptInApply:{get:function(){return!!s}},isPending:{get:function(){return A.status===de.PENDING}},isComplete:{get:function(){return A.status===de.COMPLETE}},__plugins:{get:function(){return Object.keys($)}},isIabContext:{get:function(){return m}}})}function ot(t,r){function o(){s=null,t.call(t,new me("The call took longer than you wanted!"))}function i(){s&&(clearTimeout(s),t.apply(t,arguments))}if(r===void 0)return t;var s=setTimeout(o,r);return i}function at(){if(window.__cmp)return window.__cmp;var t=window;if(t===window.top)return void Re.error("__cmp not found");for(var r;!r;){t=t.parent;try{t.frames.__cmpLocator&&(r=t)}catch{}if(t===window.top)break}if(!r)return void Re.error("__cmp not found");var o={};return window.__cmp=function(i,s,d){var f=Math.random()+"",C={__cmpCall:{command:i,parameter:s,callId:f}};o[f]=d,r.postMessage(C,"*")},window.addEventListener("message",function(i){var s=i.data;if(typeof s=="string")try{s=JSON.parse(i.data)}catch{}if(s.__cmpReturn){var d=s.__cmpReturn;o[d.callId]&&(o[d.callId](d.returnValue,d.success),delete o[d.callId])}},!1),window.__cmp}function un(){var t=this;t.name="iabPlugin",t.version="0.0.1";var r=It(),o={allConsentData:null},i=function(I){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return o[I]=h};t.fetchConsentData=function(I){var h=I.callback,m=I.timeout,T=ot(h,m);s({callback:T})},t.isApproved=function(I){var h=I.callback,m=I.category,T=I.timeout;if(o.allConsentData)return h(null,C(m,o.allConsentData.vendorConsents,o.allConsentData.purposeConsents));var M=ot(function(v){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=e.vendorConsents,G=e.purposeConsents;h(v,C(m,A,G))},T);s({category:m,callback:M})},t.onRegister=function(I){var h=Object.keys(He),m=function(T){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=M.purposeConsents,e=M.gdprApplies,A=M.vendorConsents;!T&&e&&A&&v&&(h.forEach(function(G){var w=C(G,A,v);I[w?"approve":"deny"](G,!0)}),I.complete())};t.fetchConsentData({callback:m})};var s=function(I){var h=I.callback;if(o.allConsentData)return h(null,o.allConsentData);r.add("FETCH_CONSENT_DATA",h);var m={};f(function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=T.purposeConsents,v=T.gdprApplies,e=T.vendorConsents;arguments.length>1&&arguments[1]&&(m={purposeConsents:M,gdprApplies:v,vendorConsents:e},i("allConsentData",m)),d(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};arguments.length>1&&arguments[1]&&(m.consentString=A.consentData,i("allConsentData",m)),r.execute("FETCH_CONSENT_DATA",[null,o.allConsentData])})})},d=function(I){var h=at();h&&h("getConsentData",null,I)},f=function(I){var h=Yn(He),m=at();m&&m("getVendorConsents",h,I)},C=function(I){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},T=!!h[He[I]];return T&&(function(){return Nn[I].every(function(M){return m[M]})})()}}var k=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};Object.assign=Object.assign||function(t){for(var r,o,i=1;i<arguments.length;++i){o=arguments[i];for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t};var Oe,ke,ln={HANDSHAKE:"HANDSHAKE",GETSTATE:"GETSTATE",PARENTSTATE:"PARENTSTATE"},dn={MCMID:"MCMID",MCAID:"MCAID",MCAAMB:"MCAAMB",MCAAMLH:"MCAAMLH",MCOPTOUT:"MCOPTOUT",CUSTOMERIDS:"CUSTOMERIDS"},fn={MCMID:"getMarketingCloudVisitorID",MCAID:"getAnalyticsVisitorID",MCAAMB:"getAudienceManagerBlob",MCAAMLH:"getAudienceManagerLocationHint",MCOPTOUT:"isOptedOut",ALLFIELDS:"getVisitorValues"},gn={CUSTOMERIDS:"getCustomerIDs"},pn={MCMID:"getMarketingCloudVisitorID",MCAAMB:"getAudienceManagerBlob",MCAAMLH:"getAudienceManagerLocationHint",MCOPTOUT:"isOptedOut",MCAID:"getAnalyticsVisitorID",CUSTOMERIDS:"getCustomerIDs",ALLFIELDS:"getVisitorValues"},mn={MC:"MCMID",A:"MCAID",AAM:"MCAAMB"},_n={MCMID:"MCMID",MCOPTOUT:"MCOPTOUT",MCAID:"MCAID",MCAAMLH:"MCAAMLH",MCAAMB:"MCAAMB"},hn={UNKNOWN:0,AUTHENTICATED:1,LOGGED_OUT:2},Cn={GLOBAL:"global"},Z={MESSAGES:ln,STATE_KEYS_MAP:dn,ASYNC_API_MAP:fn,SYNC_API_MAP:gn,ALL_APIS:pn,FIELDGROUP_TO_FIELD:mn,FIELDS:_n,AUTH_STATE:hn,OPT_OUT:Cn},st=Z.STATE_KEYS_MAP,In=function(t){function r(){}function o(i,s){var d=this;return function(){var f=t(0,i),C={};return C[i]=f,d.setStateAndPublish(C),s(f),f}}this.getMarketingCloudVisitorID=function(i){i=i||r;var s=this.findField(st.MCMID,i),d=o.call(this,st.MCMID,i);return s!==void 0?s:d()},this.getVisitorValues=function(i){this.getMarketingCloudVisitorID(function(s){i({MCMID:s})})}},Sn=Z.MESSAGES,ct=Z.ASYNC_API_MAP,ut=Z.SYNC_API_MAP,yn=function(){function t(){}function r(s,d){var f=this;return function(){return f.callbackRegistry.add(s,d),f.messageParent(Sn.GETSTATE),""}}function o(s){this[ct[s]]=function(d){d=d||t;var f=this.findField(s,d),C=r.call(this,s,d);return f!==void 0?f:C()}}function i(s){this[ut[s]]=function(){return this.findField(s,t)||{}}}Object.keys(ct).forEach(o,this),Object.keys(ut).forEach(i,this)},lt=Z.ASYNC_API_MAP,vn=function(){Object.keys(lt).forEach(function(t){this[lt[t]]=function(r){this.callbackRegistry.add(t,r)}},this)},N=(function(t,r){return r={exports:{}},t(r,r.exports),r.exports})(function(t,r){r.isObjectEmpty=function(i){return i===Object(i)&&Object.keys(i).length===0},r.isValueEmpty=function(i){return i===""||r.isObjectEmpty(i)};var o=function(){var i=navigator.appName,s=navigator.userAgent;return i==="Microsoft Internet Explorer"||s.indexOf("MSIE ")>=0||s.indexOf("Trident/")>=0&&s.indexOf("Windows NT 6")>=0};r.getIeVersion=function(){return document.documentMode?document.documentMode:o()?7:null},r.encodeAndBuildRequest=function(i,s){return i.map(encodeURIComponent).join(s)},r.isObject=function(i){return i!==null&&c(i)==="object"&&Array.isArray(i)===!1},r.defineGlobalNamespace=function(){return window.adobe=r.isObject(window.adobe)?window.adobe:{},window.adobe},r.pluck=function(i,s){return s.reduce(function(d,f){return i[f]&&(d[f]=i[f]),d},Object.create(null))},r.parseOptOut=function(i,s,d){s||(s=d,i.d_optout&&i.d_optout instanceof Array&&(s=i.d_optout.join(",")));var f=parseInt(i.d_ottl,10);return isNaN(f)&&(f=7200),{optOut:s,d_ottl:f}},r.normalizeBoolean=function(i){var s=i;return i==="true"?s=!0:i==="false"&&(s=!1),s}}),An=(N.isObjectEmpty,N.isValueEmpty,N.getIeVersion,N.encodeAndBuildRequest,N.isObject,N.defineGlobalNamespace,N.pluck,N.parseOptOut,N.normalizeBoolean,p),Dn=Z.MESSAGES,En={0:"prefix",1:"orgID",2:"state"},dt=function(t,r){this.parse=function(o){try{var i={};return o.data.split("|").forEach(function(s,d){s!==void 0&&(i[En[d]]=d!==2?s:JSON.parse(s))}),i}catch{}},this.isInvalid=function(o){var i=this.parse(o);if(!i||Object.keys(i).length<2)return!0;var s=t!==i.orgID,d=!r||o.origin!==r,f=Object.keys(Dn).indexOf(i.prefix)===-1;return s||d||f},this.send=function(o,i,s){var d=i+"|"+t;s&&s===Object(s)&&(d+="|"+JSON.stringify(s));try{o.postMessage(d,r)}catch{}}},ft=Z.MESSAGES,Tn=function(t,r,o,i){function s(w){Object.assign(v,w)}function d(w){Object.assign(v.state,w),Object.assign(v.state.ALLFIELDS,w),v.callbackRegistry.executeAll(v.state)}function f(w){if(!G.isInvalid(w)){A=!1;var j=G.parse(w);v.setStateAndPublish(j.state)}}function C(w){!A&&e&&(A=!0,G.send(i,w))}function I(){s(new In(o._generateID)),v.getMarketingCloudVisitorID(),v.callbackRegistry.executeAll(v.state,!0),k.removeEventListener("message",h)}function h(w){if(!G.isInvalid(w)){var j=G.parse(w);A=!1,k.clearTimeout(v._handshakeTimeout),k.removeEventListener("message",h),s(new yn(v)),k.addEventListener("message",f),v.setStateAndPublish(j.state),v.callbackRegistry.hasCallbacks()&&C(ft.GETSTATE)}}function m(){e&&postMessage?(k.addEventListener("message",h),C(ft.HANDSHAKE),v._handshakeTimeout=setTimeout(I,250)):I()}function T(){k.s_c_in||(k.s_c_il=[],k.s_c_in=0),v._c="Visitor",v._il=k.s_c_il,v._in=k.s_c_in,v._il[v._in]=v,k.s_c_in++}function M(){function w(j){j.indexOf("_")!==0&&typeof o[j]=="function"&&(v[j]=function(){})}Object.keys(o).forEach(w),v.getSupplementalDataID=o.getSupplementalDataID,v.isAllowed=function(){return!0}}var v=this,e=r.whitelistParentDomain;v.state={ALLFIELDS:{}},v.version=o.version,v.marketingCloudOrgID=t,v.cookieDomain=o.cookieDomain||"",v._instanceType="child";var A=!1,G=new dt(t,e);v.callbackRegistry=An(),v.init=function(){T(),M(),s(new vn(v)),m()},v.findField=function(w,j){if(v.state[w]!==void 0)return j(v.state[w]),v.state[w]},v.messageParent=C,v.setStateAndPublish=d},we=Z.MESSAGES,gt=Z.ALL_APIS,bn=Z.ASYNC_API_MAP,Mn=Z.FIELDGROUP_TO_FIELD,On=function(t,r){function o(){var h={};return Object.keys(gt).forEach(function(m){var T=gt[m],M=t[T]();N.isValueEmpty(M)||(h[m]=M)}),h}function i(){var h=[];return t._loading&&Object.keys(t._loading).forEach(function(m){if(t._loading[m]){var T=Mn[m];h.push(T)}}),h.length?h:null}function s(h){return function m(T){var M=i();if(M){var v=bn[M[0]];t[v](m,!0)}else h()}}function d(h,m){var T=o();r.send(h,m,T)}function f(h){I(h),d(h,we.HANDSHAKE)}function C(h){s(function(){d(h,we.PARENTSTATE)})()}function I(h){function m(M){T.call(t,M),r.send(h,we.PARENTSTATE,{CUSTOMERIDS:t.getCustomerIDs()})}var T=t.setCustomerIDs;t.setCustomerIDs=m}return function(h){r.isInvalid(h)||(r.parse(h).prefix===we.HANDSHAKE?f:C)(h.source)}},kn=function(t,r){function o(f){return function(C){i[f]=C,s++,s===d&&r(i)}}var i={},s=0,d=Object.keys(t).length;Object.keys(t).forEach(function(f){var C=t[f];if(C.fn){var I=C.args||[];I.unshift(o(f)),C.fn.apply(C.context||null,I)}})},Ie={get:function(t){t=encodeURIComponent(t);var r=(";"+document.cookie).split(" ").join(";"),o=r.indexOf(";"+t+"="),i=o<0?o:r.indexOf(";",o+1);return o<0?"":decodeURIComponent(r.substring(o+2+t.length,i<0?r.length:i))},set:function(t,r,o){var i=_(o,"cookieLifetime"),s=_(o,"expires"),d=_(o,"domain"),f=_(o,"secure"),C=f?"Secure":"";if(s&&i!=="SESSION"&&i!=="NONE"){var I=r!==""?parseInt(i||0,10):-60;if(I)s=new Date,s.setTime(s.getTime()+1e3*I);else if(s===1){s=new Date;var h=s.getYear();s.setYear(h+2+(h<1900?1900:0))}}else s=0;return t&&i!=="NONE"?(document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(r)+"; path=/;"+(s?" expires="+s.toGMTString()+";":"")+(d?" domain="+d+";":"")+C,this.get(t)===r):0},remove:function(t,r){var o=_(r,"domain");o=o?" domain="+o+";":"",document.cookie=encodeURIComponent(t)+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"+o}},pt=function(t){var r;!t&&k.location&&(t=k.location.hostname),r=t;var o,i=r.split(".");for(o=i.length-2;o>=0;o--)if(r=i.slice(o).join("."),Ie.set("test","cookie",{domain:r}))return Ie.remove("test",{domain:r}),r;return""},mt={compare:L,isLessThan:function(t,r){return L(t,r)<0},areVersionsDifferent:function(t,r){return L(t,r)!==0},isGreaterThan:function(t,r){return L(t,r)>0},isEqual:function(t,r){return L(t,r)===0}},_t=!!k.postMessage,je={postMessage:function(t,r,o){var i=1;r&&(_t?o.postMessage(t,r.replace(/([^:]+:\/\/[^\/]+).*/,"$1")):r&&(o.location=r.replace(/#.*$/,"")+"#"+ +new Date+i+++"&"+t))},receiveMessage:function(t,r){var o;try{_t&&(t&&(o=function(i){if(typeof r=="string"&&i.origin!==r||Object.prototype.toString.call(r)==="[object Function]"&&r(i.origin)===!1)return!1;t(i)}),k.addEventListener?k[t?"addEventListener":"removeEventListener"]("message",o):k[t?"attachEvent":"detachEvent"]("onmessage",o))}catch{}}},wn=function(t){var r,o,i="0123456789",s="",d="",f=8,C=10,I=10;if(t==1){for(i+="ABCDEF",r=0;16>r;r++)o=Math.floor(Math.random()*f),s+=i.substring(o,o+1),o=Math.floor(Math.random()*f),d+=i.substring(o,o+1),f=16;return s+"-"+d}for(r=0;19>r;r++)o=Math.floor(Math.random()*C),s+=i.substring(o,o+1),r===0&&o==9?C=3:((r==1||r==2)&&C!=10&&2>o||2<r)&&(C=10),o=Math.floor(Math.random()*I),d+=i.substring(o,o+1),r===0&&o==9?I=3:((r==1||r==2)&&I!=10&&2>o||2<r)&&(I=10);return s+d},Pn=function(t,r){return{corsMetadata:(function(){var o="none",i=!0;return typeof XMLHttpRequest<"u"&&XMLHttpRequest===Object(XMLHttpRequest)&&("withCredentials"in new XMLHttpRequest?o="XMLHttpRequest":typeof XDomainRequest<"u"&&XDomainRequest===Object(XDomainRequest)&&(i=!1),Object.prototype.toString.call(k.HTMLElement).indexOf("Constructor")>0&&(i=!1)),{corsType:o,corsCookiesEnabled:i}})(),getCORSInstance:function(){return this.corsMetadata.corsType==="none"?null:new k[this.corsMetadata.corsType]},fireCORS:function(o,i,s){function d(I){var h;try{if((h=JSON.parse(I))!==Object(h))return void f.handleCORSError(o,null,"Response is not JSON")}catch(v){return void f.handleCORSError(o,v,"Error parsing response as JSON")}try{for(var m=o.callback,T=k,M=0;M<m.length;M++)T=T[m[M]];T(h)}catch(v){f.handleCORSError(o,v,"Error forming callback function")}}var f=this;i&&(o.loadErrorHandler=i);try{var C=this.getCORSInstance();C.open("get",o.corsUrl+"&ts="+new Date().getTime(),!0),this.corsMetadata.corsType==="XMLHttpRequest"&&(C.withCredentials=!0,C.timeout=t.loadTimeout,C.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),C.onreadystatechange=function(){this.readyState===4&&this.status===200&&d(this.responseText)}),C.onerror=function(I){f.handleCORSError(o,I,"onerror")},C.ontimeout=function(I){f.handleCORSError(o,I,"ontimeout")},C.send(),t._log.requests.push(o.corsUrl)}catch(I){this.handleCORSError(o,I,"try-catch")}},handleCORSError:function(o,i,s){t.CORSErrors.push({corsData:o,error:i,description:s}),o.loadErrorHandler&&(s==="ontimeout"?o.loadErrorHandler(!0):o.loadErrorHandler(!1))}}},K={POST_MESSAGE_ENABLED:!!k.postMessage,DAYS_BETWEEN_SYNC_ID_CALLS:1,MILLIS_PER_DAY:864e5,ADOBE_MC:"adobe_mc",ADOBE_MC_SDID:"adobe_mc_sdid",VALID_VISITOR_ID_REGEX:/^[0-9a-fA-F\-]+$/,ADOBE_MC_TTL_IN_MIN:5,VERSION_REGEX:/vVersion\|((\d+\.)?(\d+\.)?(\*|\d+))(?=$|\|)/,FIRST_PARTY_SERVER_COOKIE:"s_ecid"},Rn=function(t,r){var o=k.document;return{THROTTLE_START:3e4,MAX_SYNCS_LENGTH:649,throttleTimerSet:!1,id:null,onPagePixels:[],iframeHost:null,getIframeHost:function(i){if(typeof i=="string"){var s=i.split("/");return s[0]+"//"+s[2]}},subdomain:null,url:null,getUrl:function(){var i,s="http://fast.",d="?d_nsid="+t.idSyncContainerID+"#"+encodeURIComponent(o.location.origin);return this.subdomain||(this.subdomain="nosubdomainreturned"),t.loadSSL&&(s=t.idSyncSSLUseAkamai?"https://fast.":"https://"),i=s+this.subdomain+".demdex.net/dest5.html"+d,this.iframeHost=this.getIframeHost(i),this.id="destination_publishing_iframe_"+this.subdomain+"_"+t.idSyncContainerID,i},checkDPIframeSrc:function(){var i="?d_nsid="+t.idSyncContainerID+"#"+encodeURIComponent(o.location.href);typeof t.dpIframeSrc=="string"&&t.dpIframeSrc.length&&(this.id="destination_publishing_iframe_"+(t._subdomain||this.subdomain||new Date().getTime())+"_"+t.idSyncContainerID,this.iframeHost=this.getIframeHost(t.dpIframeSrc),this.url=t.dpIframeSrc+i)},idCallNotProcesssed:null,doAttachIframe:!1,startedAttachingIframe:!1,iframeHasLoaded:null,iframeIdChanged:null,newIframeCreated:null,originalIframeHasLoadedAlready:null,iframeLoadedCallbacks:[],regionChanged:!1,timesRegionChanged:0,sendingMessages:!1,messages:[],messagesPosted:[],messagesReceived:[],messageSendingInterval:K.POST_MESSAGE_ENABLED?null:100,onPageDestinationsFired:[],jsonForComparison:[],jsonDuplicates:[],jsonWaiting:[],jsonProcessed:[],canSetThirdPartyCookies:!0,receivedThirdPartyCookiesNotification:!1,readyToAttachIframePreliminary:function(){return!(t.idSyncDisableSyncs||t.disableIdSyncs||t.idSyncDisable3rdPartySyncing||t.disableThirdPartyCookies||t.disableThirdPartyCalls)},readyToAttachIframe:function(){return this.readyToAttachIframePreliminary()&&(this.doAttachIframe||t._doAttachIframe)&&(this.subdomain&&this.subdomain!=="nosubdomainreturned"||t._subdomain)&&this.url&&!this.startedAttachingIframe},attachIframe:function(){function i(){f=o.createElement("iframe"),f.sandbox="allow-scripts allow-same-origin",f.title="Adobe ID Syncing iFrame",f.id=d.id,f.name=d.id+"_name",f.style.cssText="display: none; width: 0; height: 0;",f.src=d.url,d.newIframeCreated=!0,s(),o.body.appendChild(f)}function s(C){f.addEventListener("load",function(){f.className="aamIframeLoaded",d.iframeHasLoaded=!0,d.fireIframeLoadedCallbacks(C),d.requestToProcess()})}this.startedAttachingIframe=!0;var d=this,f=o.getElementById(this.id);f?f.nodeName!=="IFRAME"?(this.id+="_2",this.iframeIdChanged=!0,i()):(this.newIframeCreated=!1,f.className!=="aamIframeLoaded"?(this.originalIframeHasLoadedAlready=!1,s("The destination publishing iframe already exists from a different library, but hadn't loaded yet.")):(this.originalIframeHasLoadedAlready=!0,this.iframeHasLoaded=!0,this.iframe=f,this.fireIframeLoadedCallbacks("The destination publishing iframe already exists from a different library, and had loaded alresady."),this.requestToProcess())):i(),this.iframe=f},fireIframeLoadedCallbacks:function(i){this.iframeLoadedCallbacks.forEach(function(s){typeof s=="function"&&s({message:i||"The destination publishing iframe was attached and loaded successfully."})}),this.iframeLoadedCallbacks=[]},requestToProcess:function(i){function s(){f.jsonForComparison.push(i),f.jsonWaiting.push(i),f.processSyncOnPage(i)}var d,f=this;if(i===Object(i)&&i.ibs)if(d=JSON.stringify(i.ibs||[]),this.jsonForComparison.length){var C,I,h,m=!1;for(C=0,I=this.jsonForComparison.length;C<I;C++)if(h=this.jsonForComparison[C],d===JSON.stringify(h.ibs||[])){m=!0;break}m?this.jsonDuplicates.push(i):s()}else s();if((this.receivedThirdPartyCookiesNotification||!K.POST_MESSAGE_ENABLED||this.iframeHasLoaded)&&this.jsonWaiting.length){var T=this.jsonWaiting.shift();this.process(T),this.requestToProcess()}t.idSyncDisableSyncs||t.disableIdSyncs||!this.iframeHasLoaded||!this.messages.length||this.sendingMessages||(this.throttleTimerSet||(this.throttleTimerSet=!0,setTimeout(function(){f.messageSendingInterval=K.POST_MESSAGE_ENABLED?null:150},this.THROTTLE_START)),this.sendingMessages=!0,this.sendMessages())},getRegionAndCheckIfChanged:function(i,s){var d=t._getField("MCAAMLH"),f=i.d_region||i.dcs_region;return d?f&&(t._setFieldExpire("MCAAMLH",s),t._setField("MCAAMLH",f),parseInt(d,10)!==f&&(this.regionChanged=!0,this.timesRegionChanged++,t._setField("MCSYNCSOP",""),t._setField("MCSYNCS",""),d=f)):(d=f)&&(t._setFieldExpire("MCAAMLH",s),t._setField("MCAAMLH",d)),d||(d=""),d},processSyncOnPage:function(i){var s,d,f,C;if((s=i.ibs)&&s instanceof Array&&(d=s.length))for(f=0;f<d;f++)C=s[f],C.syncOnPage&&this.checkFirstPartyCookie(C,"","syncOnPage")},process:function(i){var s,d,f,C,I,h=encodeURIComponent,m=!1;if((s=i.ibs)&&s instanceof Array&&(d=s.length))for(m=!0,f=0;f<d;f++)C=s[f],I=[h("ibs"),h(C.id||""),h(C.tag||""),N.encodeAndBuildRequest(C.url||[],","),h(C.ttl||""),"","",C.fireURLSync?"true":"false"],C.syncOnPage||(this.canSetThirdPartyCookies?this.addMessage(I.join("|")):C.fireURLSync&&this.checkFirstPartyCookie(C,I.join("|")));m&&this.jsonProcessed.push(i)},checkFirstPartyCookie:function(i,s,d){var f=d==="syncOnPage",C=f?"MCSYNCSOP":"MCSYNCS";t._readVisitor();var I,h,m=t._getField(C),T=!1,M=!1,v=Math.ceil(new Date().getTime()/K.MILLIS_PER_DAY);m?(I=m.split("*"),h=this.pruneSyncData(I,i.id,v),T=h.dataPresent,M=h.dataValid,T&&M||this.fireSync(f,i,s,I,C,v)):(I=[],this.fireSync(f,i,s,I,C,v))},pruneSyncData:function(i,s,d){var f,C,I,h=!1,m=!1;for(C=0;C<i.length;C++)f=i[C],I=parseInt(f.split("-")[1],10),f.match("^"+s+"-")?(h=!0,d<I?m=!0:(i.splice(C,1),C--)):d>=I&&(i.splice(C,1),C--);return{dataPresent:h,dataValid:m}},manageSyncsSize:function(i){if(i.join("*").length>this.MAX_SYNCS_LENGTH)for(i.sort(function(s,d){return parseInt(s.split("-")[1],10)-parseInt(d.split("-")[1],10)});i.join("*").length>this.MAX_SYNCS_LENGTH;)i.shift()},fireSync:function(i,s,d,f,C,I){var h=this;if(i){if(s.tag==="img"){var m,T,M,v,e=s.url,A=t.loadSSL?"https:":"http:";for(m=0,T=e.length;m<T;m++){M=e[m],v=/^\/\//.test(M);var G=new Image;G.addEventListener("load",(function(w,j,Y,X){return function(){h.onPagePixels[w]=null,t._readVisitor();var $,F=t._getField(C),te=[];if(F){$=F.split("*");var z,H,ne;for(z=0,H=$.length;z<H;z++)ne=$[z],ne.match("^"+j.id+"-")||te.push(ne)}h.setSyncTrackingData(te,j,Y,X)}})(this.onPagePixels.length,s,C,I)),G.src=(v?A:"")+M,this.onPagePixels.push(G)}}}else this.addMessage(d),this.setSyncTrackingData(f,s,C,I)},addMessage:function(i){var s=encodeURIComponent,d=s(t._enableErrorReporting?"---destpub-debug---":"---destpub---");this.messages.push((K.POST_MESSAGE_ENABLED?"":d)+i)},setSyncTrackingData:function(i,s,d,f){i.push(s.id+"-"+(f+Math.ceil(s.ttl/60/24))),this.manageSyncsSize(i),t._setField(d,i.join("*"))},sendMessages:function(){var i,s=this,d="",f=encodeURIComponent;this.regionChanged&&(d=f("---destpub-clear-dextp---"),this.regionChanged=!1),this.messages.length?K.POST_MESSAGE_ENABLED?(i=d+f("---destpub-combined---")+this.messages.join("%01"),this.postMessage(i),this.messages=[],this.sendingMessages=!1):(i=this.messages.shift(),this.postMessage(d+i),setTimeout(function(){s.sendMessages()},this.messageSendingInterval)):this.sendingMessages=!1},postMessage:function(i){je.postMessage(i,this.url,this.iframe.contentWindow),this.messagesPosted.push(i)},receiveMessage:function(i){var s,d=/^---destpub-to-parent---/;typeof i=="string"&&d.test(i)&&(s=i.replace(d,"").split("|"),s[0]==="canSetThirdPartyCookies"&&(this.canSetThirdPartyCookies=s[1]==="true",this.receivedThirdPartyCookiesNotification=!0,this.requestToProcess()),this.messagesReceived.push(i))},processIDCallData:function(i){(this.url==null||i.subdomain&&this.subdomain==="nosubdomainreturned")&&(typeof t._subdomain=="string"&&t._subdomain.length?this.subdomain=t._subdomain:this.subdomain=i.subdomain||"",this.url=this.getUrl()),i.ibs instanceof Array&&i.ibs.length&&(this.doAttachIframe=!0),this.readyToAttachIframe()&&(t.idSyncAttachIframeOnWindowLoad?(r.windowLoaded||o.readyState==="complete"||o.readyState==="loaded")&&this.attachIframe():this.attachIframeASAP()),typeof t.idSyncIDCallResult=="function"?t.idSyncIDCallResult(i):this.requestToProcess(i),typeof t.idSyncAfterIDCallResult=="function"&&t.idSyncAfterIDCallResult(i)},canMakeSyncIDCall:function(i,s){return t._forceSyncIDCall||!i||s-i>K.DAYS_BETWEEN_SYNC_ID_CALLS},attachIframeASAP:function(){function i(){s.startedAttachingIframe||(o.body?s.attachIframe():setTimeout(i,30))}var s=this;i()}}},ht={audienceManagerServer:{},audienceManagerServerSecure:{},cookieDomain:{},cookieLifetime:{},cookieName:{},doesOptInApply:{},disableThirdPartyCalls:{},discardTrackingServerECID:{},idSyncAfterIDCallResult:{},idSyncAttachIframeOnWindowLoad:{},idSyncContainerID:{},idSyncDisable3rdPartySyncing:{},disableThirdPartyCookies:{},idSyncDisableSyncs:{},disableIdSyncs:{},idSyncIDCallResult:{},idSyncSSLUseAkamai:{},isCoopSafe:{},isIabContext:{},isOptInStorageEnabled:{},loadSSL:{},loadTimeout:{},marketingCloudServer:{},marketingCloudServerSecure:{},optInCookieDomain:{},optInStorageExpiry:{},overwriteCrossDomainMCIDAndAID:{},preOptInApprovals:{},previousPermissions:{},resetBeforeVersion:{},sdidParamExpiry:{},serverState:{},sessionCookieName:{},secureCookie:{},takeTimeoutMetrics:{},trackingServer:{},trackingServerSecure:{},whitelistIframeDomains:{},whitelistParentDomain:{}},Ct={getConfigNames:function(){return Object.keys(ht)},getConfigs:function(){return ht},normalizeConfig:function(t){return typeof t!="function"?t:t()}},Ln=function(t){var r={};return t.on=function(o,i,s){if(!i||typeof i!="function")throw new Error("[ON] Callback should be a function.");r.hasOwnProperty(o)||(r[o]=[]);var d=r[o].push({callback:i,context:s})-1;return function(){r[o].splice(d,1),r[o].length||delete r[o]}},t.off=function(o,i){r.hasOwnProperty(o)&&(r[o]=r[o].filter(function(s){if(s.callback!==i)return s}))},t.publish=function(o){if(r.hasOwnProperty(o)){var i=[].slice.call(arguments,1);r[o].slice(0).forEach(function(s){s.callback.apply(s.context,i)})}},t.publish},de={PENDING:"pending",CHANGED:"changed",COMPLETE:"complete"},_e={AAM:"aam",ADCLOUD:"adcloud",ANALYTICS:"aa",CAMPAIGN:"campaign",ECID:"ecid",LIVEFYRE:"livefyre",TARGET:"target",MEDIA_ANALYTICS:"mediaaa"},He=(Oe={},l(Oe,_e.AAM,565),l(Oe,_e.ECID,565),Oe),Nn=(ke={},l(ke,_e.AAM,[1,2,5]),l(ke,_e.ECID,[1,2,5]),ke),Pe=(function(t){return Object.keys(t).map(function(r){return t[r]})})(_e),It=function(){var t={};return t.callbacks=Object.create(null),t.add=function(r,o){if(!Ce(o))throw new Error("[callbackRegistryFactory] Make sure callback is a function or an array of functions.");t.callbacks[r]=t.callbacks[r]||[];var i=t.callbacks[r].push(o)-1;return function(){t.callbacks[r].splice(i,1)}},t.execute=function(r,o){if(t.callbacks[r]){o=o===void 0?[]:o,o=o instanceof Array?o:[o];try{for(;t.callbacks[r].length;){var i=t.callbacks[r].shift();typeof i=="function"?i.apply(null,o):i instanceof Array&&i[1].apply(i[0],o)}delete t.callbacks[r]}catch{}}},t.executeAll=function(r,o){(o||r&&!ce(r))&&Object.keys(t.callbacks).forEach(function(i){var s=r[i]!==void 0?r[i]:"";t.execute(i,s)},t)},t.hasCallbacks=function(){return!!Object.keys(t.callbacks).length},t},xn=function(){},Vn=function(t){var r=window,o=r.console;return!!o&&typeof o[t]=="function"},Be=function(t,r,o){return o()?function(){if(Vn(t)){for(var i=arguments.length,s=new Array(i),d=0;d<i;d++)s[d]=arguments[d];console[t].apply(console,[r].concat(s))}}:xn},Fn=Ae,Re=new Fn("[ADOBE OPT-IN]"),Le=function(t,r){return c(t)===r},We=function(t,r){return t instanceof Array?t:Le(t,"string")?[t]:r||[]},Un=function(t){var r=Object.keys(t);return!!r.length&&r.every(function(o){return t[o]===!0})},Ye=function(t){return!(!t||jn(t))&&We(t).every(function(r){return Pe.indexOf(r)>-1})},St=function(t,r){return t.reduce(function(o,i){return o[i]=r,o},{})},Gn=function(t){return JSON.parse(JSON.stringify(t))},jn=function(t){return Object.prototype.toString.call(t)==="[object Array]"&&!t.length},yt=function(t){if(vt(t))return t;try{return JSON.parse(t)}catch{return{}}},Ke=function(t){return t===void 0||(vt(t)?Ye(Object.keys(t)):Hn(t))},Hn=function(t){try{var r=JSON.parse(t);return!!t&&Le(t,"string")&&Ye(Object.keys(r))}catch{return!1}},vt=function(t){return t!==null&&Le(t,"object")&&Array.isArray(t)===!1},Ee=function(){},Bn=function(t){return Le(t,"function")?t():t},At=function(t,r){Ke(t)||Re.error("".concat(r))},Wn=function(t){return Object.keys(t).map(function(r){return t[r]})},Yn=function(t){return Wn(t).filter(function(r,o,i){return i.indexOf(r)===o})},Kn=function(t){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=r.command,i=r.params,s=i===void 0?{}:i,d=r.callback,f=d===void 0?Ee:d;if(!o||o.indexOf(".")===-1)throw new Error("[OptIn.execute] Please provide a valid command.");try{var C=o.split("."),I=t[C[0]],h=C[1];if(!I||typeof I[h]!="function")throw new Error("Make sure the plugin and API name exist.");var m=Object.assign(s,{callback:f});I[h].call(I,m)}catch(T){Re.error("[execute] Something went wrong: "+T.message)}}};me.prototype=Object.create(Error.prototype),me.prototype.constructor=me;var Dt="fetchPermissions",Xn="[OptIn#registerPlugin] Plugin is invalid.";De.Categories=_e,De.TimeoutError=me;var Xe=Object.freeze({OptIn:De,IabPlugin:un}),qn=function(t,r){t.publishDestinations=function(o){var i=arguments[1],s=arguments[2];try{s=typeof s=="function"?s:o.callback}catch{s=function(){}}var d=r;if(!d.readyToAttachIframePreliminary())return void s({error:"The destination publishing iframe is disabled in the Visitor library."});if(typeof o=="string"){if(!o.length)return void s({error:"subdomain is not a populated string."});if(!(i instanceof Array&&i.length))return void s({error:"messages is not a populated array."});var f=!1;if(i.forEach(function(m){typeof m=="string"&&m.length&&(d.addMessage(m),f=!0)}),!f)return void s({error:"None of the messages are populated strings."})}else{if(!N.isObject(o))return void s({error:"Invalid parameters passed."});var C=o;if(typeof(o=C.subdomain)!="string"||!o.length)return void s({error:"config.subdomain is not a populated string."});var I=C.urlDestinations;if(!(I instanceof Array&&I.length))return void s({error:"config.urlDestinations is not a populated array."});var h=[];I.forEach(function(m){N.isObject(m)&&(m.hideReferrer?m.message&&d.addMessage(m.message):h.push(m))}),(function m(){h.length&&setTimeout(function(){var T=new Image,M=h.shift();T.src=M.url,d.onPageDestinationsFired.push(M),m()},100)})()}d.iframe?(s({message:"The destination publishing iframe is already attached and loaded."}),d.requestToProcess()):!t.subdomain&&t._getField("MCMID")?(d.subdomain=o,d.doAttachIframe=!0,d.url=d.getUrl(),d.readyToAttachIframe()?(d.iframeLoadedCallbacks.push(function(m){s({message:"Attempted to attach and load the destination publishing iframe through this API call. Result: "+(m.message||"no result")})}),d.attachIframe()):s({error:"Encountered a problem in attempting to attach and load the destination publishing iframe through this API call."})):d.iframeLoadedCallbacks.push(function(m){s({message:"Attempted to attach and load the destination publishing iframe through normal Visitor API processing. Result: "+(m.message||"no result")})})}},$n=function t(r){function o(te,z){return te>>>z|te<<32-z}for(var i,s,d=Math.pow,f=d(2,32),C="",I=[],h=8*r.length,m=t.h=t.h||[],T=t.k=t.k||[],M=T.length,v={},e=2;M<64;e++)if(!v[e]){for(i=0;i<313;i+=e)v[i]=e;m[M]=d(e,.5)*f|0,T[M++]=d(e,1/3)*f|0}for(r+="\x80";r.length%64-56;)r+="\0";for(i=0;i<r.length;i++){if((s=r.charCodeAt(i))>>8)return;I[i>>2]|=s<<(3-i)%4*8}for(I[I.length]=h/f|0,I[I.length]=h,s=0;s<I.length;){var A=I.slice(s,s+=16),G=m;for(m=m.slice(0,8),i=0;i<64;i++){var w=A[i-15],j=A[i-2],Y=m[0],X=m[4],$=m[7]+(o(X,6)^o(X,11)^o(X,25))+(X&m[5]^~X&m[6])+T[i]+(A[i]=i<16?A[i]:A[i-16]+(o(w,7)^o(w,18)^w>>>3)+A[i-7]+(o(j,17)^o(j,19)^j>>>10)|0);m=[$+((o(Y,2)^o(Y,13)^o(Y,22))+(Y&m[1]^Y&m[2]^m[1]&m[2]))|0].concat(m),m[4]=m[4]+$|0}for(i=0;i<8;i++)m[i]=m[i]+G[i]|0}for(i=0;i<8;i++)for(s=3;s+1;s--){var F=m[i]>>8*s&255;C+=(F<16?0:"")+F.toString(16)}return C},Et=function(t,r){return r!=="SHA-256"&&r!=="SHA256"&&r!=="sha256"&&r!=="sha-256"||(t=$n(t)),t},Tt=function(t){return String(t).trim().toLowerCase()},zn=Xe.OptIn;N.defineGlobalNamespace(),window.adobe.OptInCategories=zn.Categories;var qe=function(t,r,o){function i(n){var a=n;return function(u){var g=u||Y.location.href;try{var S=e._extractParamFromUri(g,a);if(S)return B.parsePipeDelimetedKeyValues(S)}catch{}}}function s(n){function a(u,g,S){u&&u.match(K.VALID_VISITOR_ID_REGEX)&&(S===F&&(j=!0),g(u))}a(n[F],e.setMarketingCloudVisitorID,F),e._setFieldExpire(O,-1),a(n[H],e.setAnalyticsVisitorID)}function d(n){n=n||{},e._supplementalDataIDCurrent=n.supplementalDataIDCurrent||"",e._supplementalDataIDCurrentConsumed=n.supplementalDataIDCurrentConsumed||{},e._supplementalDataIDLast=n.supplementalDataIDLast||"",e._supplementalDataIDLastConsumed=n.supplementalDataIDLastConsumed||{}}function f(n){function a(S,D,E){return E=E&&(E+="|"),E+=S+"="+encodeURIComponent(D)}function u(S,D){var E=D[0],R=D[1];return R!=null&&R!==x&&(S=a(E,R,S)),S}var g=n.reduce(u,"");return(function(S){var D=B.getTimestampInSeconds();return S=S&&(S+="|"),S+="TS="+D})(g)}function C(n){var a=n.minutesToLive,u="";return(e.idSyncDisableSyncs||e.disableIdSyncs)&&(u=u||"Error: id syncs have been disabled"),typeof n.dpid=="string"&&n.dpid.length||(u=u||"Error: config.dpid is empty"),typeof n.url=="string"&&n.url.length||(u=u||"Error: config.url is empty"),a===void 0?a=20160:(a=parseInt(a,10),(isNaN(a)||a<=0)&&(u=u||"Error: config.minutesToLive needs to be a positive number")),{error:u,ttl:a}}function I(){return!!e.configs.doesOptInApply&&!(A.optIn.isComplete&&h())}function h(){return e.configs.doesOptInApply&&e.configs.isIabContext?A.optIn.isApproved(A.optIn.Categories.ECID)&&w:A.optIn.isApproved(A.optIn.Categories.ECID)}function m(){[["getMarketingCloudVisitorID"],["setCustomerIDs",void 0],["getAnalyticsVisitorID"],["getAudienceManagerLocationHint"],["getLocationHint"],["getAudienceManagerBlob"]].forEach(function(n){var a=n[0],u=n.length===2?n[1]:"",g=e[a];e[a]=function(S){return h()&&e.isAllowed()?g.apply(e,arguments):(typeof S=="function"&&e._callCallback(S,[u]),u)}})}function T(n,a){if(w=!0,n)throw new Error("[IAB plugin] : "+n);a.gdprApplies&&(G=a.consentString),e.init(),v()}function M(){A.optIn.isComplete&&(A.optIn.isApproved(A.optIn.Categories.ECID)?e.configs.isIabContext?A.optIn.execute({command:"iabPlugin.fetchConsentData",callback:T}):(e.init(),v()):(m(),v()))}function v(){A.optIn.off("complete",M)}if(!o||o.split("").reverse().join("")!==t)throw new Error("Please use `Visitor.getInstance` to instantiate Visitor.");var e=this,A=window.adobe,G="",w=!1,j=!1;e.version="4.6.0";var Y=k,X=Y.Visitor;X.version=e.version,X.AuthState=Z.AUTH_STATE,X.OptOut=Z.OPT_OUT,Y.s_c_in||(Y.s_c_il=[],Y.s_c_in=0),e._c="Visitor",e._il=Y.s_c_il,e._in=Y.s_c_in,e._il[e._in]=e,Y.s_c_in++,e._instanceType="regular",e._log={requests:[]},e.marketingCloudOrgID=t,e.cookieName="AMCV_"+t,e.sessionCookieName="AMCVS_"+t,e.cookieDomain=pt(),e.loadSSL=!0,e.loadTimeout=3e4,e.CORSErrors=[],e.marketingCloudServer=e.audienceManagerServer="dpm.demdex.net",e.sdidParamExpiry=30;var $=null,F="MCMID",te="MCIDTS",z="A",H="MCAID",ne="AAM",O="MCAAMB",x="NONE",J=function(n){return!Object.prototype[n]},fe=Pn(e);e.FIELDS=Z.FIELDS,e.cookieRead=function(n){return Ie.get(n)},e.cookieWrite=function(n,a,u){var g=e.cookieLifetime?(""+e.cookieLifetime).toUpperCase():"",S=!1;return e.configs&&e.configs.secureCookie&&location.protocol==="https:"&&(S=!0),Ie.set(n,""+a,{expires:u,domain:e.cookieDomain,cookieLifetime:g,secure:S})},e.resetState=function(n){n?e._mergeServerState(n):d()},e._isAllowedDone=!1,e._isAllowedFlag=!1,e.isAllowed=function(){return e._isAllowedDone||(e._isAllowedDone=!0,(e.cookieRead(e.cookieName)||e.cookieWrite(e.cookieName,"T",1))&&(e._isAllowedFlag=!0)),e.cookieRead(e.cookieName)==="T"&&e._helpers.removeCookie(e.cookieName),e._isAllowedFlag},e.setMarketingCloudVisitorID=function(n){e._setMarketingCloudFields(n)},e._use1stPartyMarketingCloudServer=!1,e.getMarketingCloudVisitorID=function(n,a){e.marketingCloudServer&&e.marketingCloudServer.indexOf(".demdex.net")<0&&(e._use1stPartyMarketingCloudServer=!0);var u=e._getAudienceManagerURLData("_setMarketingCloudFields"),g=u.url;return e._getRemoteField(F,g,n,a,u)};var ei=function(n,a){var u={};e.getMarketingCloudVisitorID(function(){a.forEach(function(g){u[g]=e._getField(g,!0)}),a.indexOf("MCOPTOUT")!==-1?e.isOptedOut(function(g){u.MCOPTOUT=g,n(u)},null,!0):n(u)},!0)};e.getVisitorValues=function(n,a){var u={MCMID:{fn:e.getMarketingCloudVisitorID,args:[!0],context:e},MCOPTOUT:{fn:e.isOptedOut,args:[void 0,!0],context:e},MCAID:{fn:e.getAnalyticsVisitorID,args:[!0],context:e},MCAAMLH:{fn:e.getAudienceManagerLocationHint,args:[!0],context:e},MCAAMB:{fn:e.getAudienceManagerBlob,args:[!0],context:e}},g=a&&a.length?N.pluck(u,a):u;a&&a.indexOf("MCAID")===-1?ei(n,a):kn(g,n)},e._currentCustomerIDs={},e._customerIDsHashChanged=!1,e._newCustomerIDsHash="",e.setCustomerIDs=function(n,a){function u(){e._customerIDsHashChanged=!1}if(!e.isOptedOut()&&n){if(!N.isObject(n)||N.isObjectEmpty(n))return!1;e._readVisitor();var g,S,D;for(g in n)if(J(g)&&(S=n[g],a=S.hasOwnProperty("hashType")?S.hashType:a,S))if(c(S)==="object"){var E={};if(S.id){if(a){if(!(D=Et(Tt(S.id),a)))return;S.id=D,E.hashType=a}E.id=S.id}S.authState!=null&&(E.authState=S.authState),e._currentCustomerIDs[g]=E}else if(a){if(!(D=Et(Tt(S),a)))return;e._currentCustomerIDs[g]={id:D,hashType:a}}else e._currentCustomerIDs[g]={id:S};var R=e.getCustomerIDs(),b=e._getField("MCCIDH"),q="";b||(b=0);for(g in R)J(g)&&(S=R[g],q+=(q?"|":"")+g+"|"+(S.id?S.id:"")+(S.authState?S.authState:""));e._newCustomerIDsHash=String(e._hash(q)),e._newCustomerIDsHash!==b&&(e._customerIDsHashChanged=!0,e._mapCustomerIDs(u))}},e.getCustomerIDs=function(){e._readVisitor();var n,a,u={};for(n in e._currentCustomerIDs)J(n)&&(a=e._currentCustomerIDs[n],a.id&&(u[n]||(u[n]={}),u[n].id=a.id,a.authState!=null?u[n].authState=a.authState:u[n].authState=X.AuthState.UNKNOWN,a.hashType&&(u[n].hashType=a.hashType)));return u},e.setAnalyticsVisitorID=function(n){e._setAnalyticsFields(n)},e.getAnalyticsVisitorID=function(n,a,u){if(!B.isTrackingServerPopulated()&&!u)return e._callCallback(n,[""]),"";var g="";if(u||(g=e.getMarketingCloudVisitorID(function(ae){e.getAnalyticsVisitorID(n,!0)})),g||u){var S=u?e.marketingCloudServer:e.trackingServer,D="";e.loadSSL&&(u?e.marketingCloudServerSecure&&(S=e.marketingCloudServerSecure):e.trackingServerSecure&&(S=e.trackingServerSecure));var E={};if(S){var R="http"+(e.loadSSL?"s":"")+"://"+S+"/id",b="d_visid_ver="+e.version+"&mcorgid="+encodeURIComponent(e.marketingCloudOrgID)+(g?"&mid="+encodeURIComponent(g):"")+(e.idSyncDisable3rdPartySyncing||e.disableThirdPartyCookies?"&d_coppa=true":""),q=["s_c_il",e._in,"_set"+(u?"MarketingCloud":"Analytics")+"Fields"];D=R+"?"+b+"&callback=s_c_il%5B"+e._in+"%5D._set"+(u?"MarketingCloud":"Analytics")+"Fields",E.corsUrl=R+"?"+b,E.callback=q}return E.url=D,e._getRemoteField(u?F:H,D,n,a,E)}return""},e.getAudienceManagerLocationHint=function(n,a){if(e.getMarketingCloudVisitorID(function(D){e.getAudienceManagerLocationHint(n,!0)})){var u=e._getField(H);if(!u&&B.isTrackingServerPopulated()&&(u=e.getAnalyticsVisitorID(function(D){e.getAudienceManagerLocationHint(n,!0)})),u||!B.isTrackingServerPopulated()){var g=e._getAudienceManagerURLData(),S=g.url;return e._getRemoteField("MCAAMLH",S,n,a,g)}}return""},e.getLocationHint=e.getAudienceManagerLocationHint,e.getAudienceManagerBlob=function(n,a){if(e.getMarketingCloudVisitorID(function(D){e.getAudienceManagerBlob(n,!0)})){var u=e._getField(H);if(!u&&B.isTrackingServerPopulated()&&(u=e.getAnalyticsVisitorID(function(D){e.getAudienceManagerBlob(n,!0)})),u||!B.isTrackingServerPopulated()){var g=e._getAudienceManagerURLData(),S=g.url;return e._customerIDsHashChanged&&e._setFieldExpire(O,-1),e._getRemoteField(O,S,n,a,g)}}return""},e._supplementalDataIDCurrent="",e._supplementalDataIDCurrentConsumed={},e._supplementalDataIDLast="",e._supplementalDataIDLastConsumed={},e.getSupplementalDataID=function(n,a){e._supplementalDataIDCurrent||a||(e._supplementalDataIDCurrent=e._generateID(1));var u=e._supplementalDataIDCurrent;return e._supplementalDataIDLast&&!e._supplementalDataIDLastConsumed[n]?(u=e._supplementalDataIDLast,e._supplementalDataIDLastConsumed[n]=!0):u&&(e._supplementalDataIDCurrentConsumed[n]&&(e._supplementalDataIDLast=e._supplementalDataIDCurrent,e._supplementalDataIDLastConsumed=e._supplementalDataIDCurrentConsumed,e._supplementalDataIDCurrent=u=a?"":e._generateID(1),e._supplementalDataIDCurrentConsumed={}),u&&(e._supplementalDataIDCurrentConsumed[n]=!0)),u};var Ne=!1;e._liberatedOptOut=null,e.getOptOut=function(n,a){var u=e._getAudienceManagerURLData("_setMarketingCloudFields"),g=u.url;if(h())return e._getRemoteField("MCOPTOUT",g,n,a,u);if(e._registerCallback("liberatedOptOut",n),e._liberatedOptOut!==null)return e._callAllCallbacks("liberatedOptOut",[e._liberatedOptOut]),Ne=!1,e._liberatedOptOut;if(Ne)return null;Ne=!0;var S="liberatedGetOptOut";return u.corsUrl=u.corsUrl.replace(/dpm\.demdex\.net\/id\?/,"dpm.demdex.net/optOutStatus?"),u.callback=[S],k[S]=function(D){if(D===Object(D)){var E,R,b=N.parseOptOut(D,E,x);E=b.optOut,R=1e3*b.d_ottl,e._liberatedOptOut=E,setTimeout(function(){e._liberatedOptOut=null},R)}e._callAllCallbacks("liberatedOptOut",[E]),Ne=!1},fe.fireCORS(u),null},e.isOptedOut=function(n,a,u){a||(a=X.OptOut.GLOBAL);var g=e.getOptOut(function(S){var D=S===X.OptOut.GLOBAL||S.indexOf(a)>=0;e._callCallback(n,[D])},u);return g?g===X.OptOut.GLOBAL||g.indexOf(a)>=0:null},e._fields=null,e._fieldsExpired=null,e._hash=function(n){var a,u,g=0;if(n)for(a=0;a<n.length;a++)u=n.charCodeAt(a),g=(g<<5)-g+u,g&=g;return g},e._generateID=wn,e._generateLocalMID=function(){var n=e._generateID(0);return oe.isClientSideMarketingCloudVisitorID=!0,n},e._callbackList=null,e._callCallback=function(n,a){try{typeof n=="function"?n.apply(Y,a):n[1].apply(n[0],a)}catch{}},e._registerCallback=function(n,a){a&&(e._callbackList==null&&(e._callbackList={}),e._callbackList[n]==null&&(e._callbackList[n]=[]),e._callbackList[n].push(a))},e._callAllCallbacks=function(n,a){if(e._callbackList!=null){var u=e._callbackList[n];if(u)for(;u.length>0;)e._callCallback(u.shift(),a)}},e._addQuerystringParam=function(n,a,u,g){var S=encodeURIComponent(a)+"="+encodeURIComponent(u),D=B.parseHash(n),E=B.hashlessUrl(n);if(E.indexOf("?")===-1)return E+"?"+S+D;var R=E.split("?"),b=R[0]+"?",q=R[1];return b+B.addQueryParamAtLocation(q,S,g)+D},e._extractParamFromUri=function(n,a){var u=new RegExp("[\\?&#]"+a+"=([^&#]*)"),g=u.exec(n);if(g&&g.length)return decodeURIComponent(g[1])},e._parseAdobeMcFromUrl=i(K.ADOBE_MC),e._parseAdobeMcSdidFromUrl=i(K.ADOBE_MC_SDID),e._attemptToPopulateSdidFromUrl=function(n){var a=e._parseAdobeMcSdidFromUrl(n),u=1e9;a&&a.TS&&(u=B.getTimestampInSeconds()-a.TS),a&&a.SDID&&a.MCORGID===t&&u<e.sdidParamExpiry&&(e._supplementalDataIDCurrent=a.SDID,e._supplementalDataIDCurrentConsumed.SDID_URL_PARAM=!0)},e._attemptToPopulateIdsFromUrl=function(){var n=e._parseAdobeMcFromUrl();if(n&&n.TS){var a=B.getTimestampInSeconds(),u=a-n.TS;if(Math.floor(u/60)>K.ADOBE_MC_TTL_IN_MIN||n.MCORGID!==t)return;s(n)}},e._mergeServerState=function(n){if(n)try{if(n=(function(u){return B.isObject(u)?u:JSON.parse(u)})(n),n[e.marketingCloudOrgID]){var a=n[e.marketingCloudOrgID];(function(u){B.isObject(u)&&e.setCustomerIDs(u)})(a.customerIDs),d(a.sdid)}}catch{throw new Error("`serverState` has an invalid format.")}},e._timeout=null,e._loadData=function(n,a,u,g){a=e._addQuerystringParam(a,"d_fieldgroup",n,1),g.url=e._addQuerystringParam(g.url,"d_fieldgroup",n,1),g.corsUrl=e._addQuerystringParam(g.corsUrl,"d_fieldgroup",n,1),oe.fieldGroupObj[n]=!0,g===Object(g)&&g.corsUrl&&fe.corsMetadata.corsType==="XMLHttpRequest"&&fe.fireCORS(g,u,n)},e._clearTimeout=function(n){e._timeout!=null&&e._timeout[n]&&(clearTimeout(e._timeout[n]),e._timeout[n]=0)},e._settingsDigest=0,e._getSettingsDigest=function(){if(!e._settingsDigest){var n=e.version;e.audienceManagerServer&&(n+="|"+e.audienceManagerServer),e.audienceManagerServerSecure&&(n+="|"+e.audienceManagerServerSecure),e._settingsDigest=e._hash(n)}return e._settingsDigest},e._readVisitorDone=!1,e._readVisitor=function(){if(!e._readVisitorDone){e._readVisitorDone=!0;var n,a,u,g,S,D,E=e._getSettingsDigest(),R=!1,b=e.cookieRead(e.cookieName),q=new Date;if(b||j||e.discardTrackingServerECID||(b=e.cookieRead(K.FIRST_PARTY_SERVER_COOKIE)),e._fields==null&&(e._fields={}),b&&b!=="T")for(b=b.split("|"),b[0].match(/^[\-0-9]+$/)&&(parseInt(b[0],10)!==E&&(R=!0),b.shift()),b.length%2==1&&b.pop(),n=0;n<b.length;n+=2)a=b[n].split("-"),u=a[0],g=b[n+1],a.length>1?(S=parseInt(a[1],10),D=a[1].indexOf("s")>0):(S=0,D=!1),R&&(u==="MCCIDH"&&(g=""),S>0&&(S=q.getTime()/1e3-60)),u&&g&&(e._setField(u,g,1),S>0&&(e._fields["expire"+u]=S+(D?"s":""),(q.getTime()>=1e3*S||D&&!e.cookieRead(e.sessionCookieName))&&(e._fieldsExpired||(e._fieldsExpired={}),e._fieldsExpired[u]=!0)));!e._getField(H)&&B.isTrackingServerPopulated()&&(b=e.cookieRead("s_vi"))&&(b=b.split("|"),b.length>1&&b[0].indexOf("v1")>=0&&(g=b[1],n=g.indexOf("["),n>=0&&(g=g.substring(0,n)),g&&g.match(K.VALID_VISITOR_ID_REGEX)&&e._setField(H,g)))}},e._appendVersionTo=function(n){var a="vVersion|"+e.version,u=n?e._getCookieVersion(n):null;return u?mt.areVersionsDifferent(u,e.version)&&(n=n.replace(K.VERSION_REGEX,a)):n+=(n?"|":"")+a,n},e._writeVisitor=function(){var n,a,u=e._getSettingsDigest();for(n in e._fields)J(n)&&e._fields[n]&&n.substring(0,6)!=="expire"&&(a=e._fields[n],u+=(u?"|":"")+n+(e._fields["expire"+n]?"-"+e._fields["expire"+n]:"")+"|"+a);u=e._appendVersionTo(u),e.cookieWrite(e.cookieName,u,1)},e._getField=function(n,a){return e._fields==null||!a&&e._fieldsExpired&&e._fieldsExpired[n]?null:e._fields[n]},e._setField=function(n,a,u){e._fields==null&&(e._fields={}),e._fields[n]=a,u||e._writeVisitor()},e._getFieldList=function(n,a){var u=e._getField(n,a);return u?u.split("*"):null},e._setFieldList=function(n,a,u){e._setField(n,a?a.join("*"):"",u)},e._getFieldMap=function(n,a){var u=e._getFieldList(n,a);if(u){var g,S={};for(g=0;g<u.length;g+=2)S[u[g]]=u[g+1];return S}return null},e._setFieldMap=function(n,a,u){var g,S=null;if(a){S=[];for(g in a)J(g)&&(S.push(g),S.push(a[g]))}e._setFieldList(n,S,u)},e._setFieldExpire=function(n,a,u){var g=new Date;g.setTime(g.getTime()+1e3*a),e._fields==null&&(e._fields={}),e._fields["expire"+n]=Math.floor(g.getTime()/1e3)+(u?"s":""),a<0?(e._fieldsExpired||(e._fieldsExpired={}),e._fieldsExpired[n]=!0):e._fieldsExpired&&(e._fieldsExpired[n]=!1),u&&(e.cookieRead(e.sessionCookieName)||e.cookieWrite(e.sessionCookieName,"1"))},e._findVisitorID=function(n){return n&&(c(n)==="object"&&(n=n.d_mid?n.d_mid:n.visitorID?n.visitorID:n.id?n.id:n.uuid?n.uuid:""+n),n&&(n=n.toUpperCase())==="NOTARGET"&&(n=x),n&&(n===x||n.match(K.VALID_VISITOR_ID_REGEX))||(n="")),n},e._setFields=function(n,a){if(e._clearTimeout(n),e._loading!=null&&(e._loading[n]=!1),oe.fieldGroupObj[n]&&oe.setState(n,!1),n==="MC"){oe.isClientSideMarketingCloudVisitorID!==!0&&(oe.isClientSideMarketingCloudVisitorID=!1);var u=e._getField(F);if(!u||e.overwriteCrossDomainMCIDAndAID){if(!(u=c(a)==="object"&&a.mid?a.mid:e._findVisitorID(a))){if(e._use1stPartyMarketingCloudServer&&!e.tried1stPartyMarketingCloudServer)return e.tried1stPartyMarketingCloudServer=!0,void e.getAnalyticsVisitorID(null,!1,!0);u=e._generateLocalMID()}e._setField(F,u)}u&&u!==x||(u=""),c(a)==="object"&&((a.d_region||a.dcs_region||a.d_blob||a.blob)&&e._setFields(ne,a),e._use1stPartyMarketingCloudServer&&a.mid&&e._setFields(z,{id:a.id})),e._callAllCallbacks(F,[u])}if(n===ne&&c(a)==="object"){var g=604800;a.id_sync_ttl!=null&&a.id_sync_ttl&&(g=parseInt(a.id_sync_ttl,10));var S=ie.getRegionAndCheckIfChanged(a,g);e._callAllCallbacks("MCAAMLH",[S]);var D=e._getField(O);(a.d_blob||a.blob)&&(D=a.d_blob,D||(D=a.blob),e._setFieldExpire(O,g),e._setField(O,D)),D||(D=""),e._callAllCallbacks(O,[D]),!a.error_msg&&e._newCustomerIDsHash&&e._setField("MCCIDH",e._newCustomerIDsHash)}if(n===z){var E=e._getField(H);E&&!e.overwriteCrossDomainMCIDAndAID||(E=e._findVisitorID(a),E?E!==x&&e._setFieldExpire(O,-1):E=x,e._setField(H,E)),E&&E!==x||(E=""),e._callAllCallbacks(H,[E])}if(e.idSyncDisableSyncs||e.disableIdSyncs)ie.idCallNotProcesssed=!0;else{ie.idCallNotProcesssed=!1;var R={};R.ibs=a.ibs,R.subdomain=a.subdomain,ie.processIDCallData(R)}if(a===Object(a)){var b,q;h()&&e.isAllowed()&&(b=e._getField("MCOPTOUT"));var ae=N.parseOptOut(a,b,x);b=ae.optOut,q=ae.d_ottl,e._setFieldExpire("MCOPTOUT",q,!0),e._setField("MCOPTOUT",b),e._callAllCallbacks("MCOPTOUT",[b])}},e._loading=null,e._getRemoteField=function(n,a,u,g,S){var D,E="",R=B.isFirstPartyAnalyticsVisitorIDCall(n),b={MCAAMLH:!0,MCAAMB:!0};if(h()&&e.isAllowed())if(e._readVisitor(),E=e._getField(n,b[n]===!0),(function(){return(!E||e._fieldsExpired&&e._fieldsExpired[n])&&(!e.disableThirdPartyCalls||R)})()){if(n===F||n==="MCOPTOUT"?D="MC":n==="MCAAMLH"||n===O?D=ne:n===H&&(D=z),D)return!a||e._loading!=null&&e._loading[D]||(e._loading==null&&(e._loading={}),e._loading[D]=!0,e._loadData(D,a,function(q){if(!e._getField(n)){q&&oe.setState(D,!0);var ae="";n===F?ae=e._generateLocalMID():D===ne&&(ae={error_msg:"timeout"}),e._setFields(D,ae)}},S)),e._registerCallback(n,u),E||(a||e._setFields(D,{id:x}),"")}else E||(n===F?(e._registerCallback(n,u),E=e._generateLocalMID(),e.setMarketingCloudVisitorID(E)):n===H?(e._registerCallback(n,u),E="",e.setAnalyticsVisitorID(E)):(E="",g=!0));return n!==F&&n!==H||E!==x||(E="",g=!0),u&&g&&e._callCallback(u,[E]),E},e._setMarketingCloudFields=function(n){e._readVisitor(),e._setFields("MC",n)},e._mapCustomerIDs=function(n){e.getAudienceManagerBlob(n,!0)},e._setAnalyticsFields=function(n){e._readVisitor(),e._setFields(z,n)},e._setAudienceManagerFields=function(n){e._readVisitor(),e._setFields(ne,n)},e._getAudienceManagerURLData=function(n){var a=e.audienceManagerServer,u="",g=e._getField(F),S=e._getField(O,!0),D=e._getField(H),E=D&&D!==x?"&d_cid_ic=AVID%01"+encodeURIComponent(D):"";if(e.loadSSL&&e.audienceManagerServerSecure&&(a=e.audienceManagerServerSecure),a){var R,b,q=e.getCustomerIDs();if(q)for(R in q)J(R)&&(b=q[R],E+="&d_cid_ic="+encodeURIComponent(R)+"%01"+encodeURIComponent(b.id?b.id:"")+(b.authState?"%01"+b.authState:""));n||(n="_setAudienceManagerFields");var ae="http"+(e.loadSSL?"s":"")+"://"+a+"/id",Mt="d_visid_ver="+e.version+(G&&ae.indexOf("demdex.net")!==-1?"&gdpr=1&gdpr_force=1&gdpr_consent="+G:"")+"&d_rtbd=json&d_ver=2"+(!g&&e._use1stPartyMarketingCloudServer?"&d_verify=1":"")+"&d_orgid="+encodeURIComponent(e.marketingCloudOrgID)+"&d_nsid="+(e.idSyncContainerID||0)+(g?"&d_mid="+encodeURIComponent(g):"")+(e.idSyncDisable3rdPartySyncing||e.disableThirdPartyCookies?"&d_coppa=true":"")+($===!0?"&d_coop_safe=1":$===!1?"&d_coop_unsafe=1":"")+(S?"&d_blob="+encodeURIComponent(S):"")+E,ti=["s_c_il",e._in,n];return u=ae+"?"+Mt+"&d_cb=s_c_il%5B"+e._in+"%5D."+n,{url:u,corsUrl:ae+"?"+Mt,callback:ti}}return{url:u}},e.appendVisitorIDsTo=function(n){try{var a=[[F,e._getField(F)],[H,e._getField(H)],["MCORGID",e.marketingCloudOrgID]];return e._addQuerystringParam(n,K.ADOBE_MC,f(a))}catch{return n}},e.appendSupplementalDataIDTo=function(n,a){if(!(a=a||e.getSupplementalDataID(B.generateRandomString(),!0)))return n;try{var u=f([["SDID",a],["MCORGID",e.marketingCloudOrgID]]);return e._addQuerystringParam(n,K.ADOBE_MC_SDID,u)}catch{return n}};var B={parseHash:function(n){var a=n.indexOf("#");return a>0?n.substr(a):""},hashlessUrl:function(n){var a=n.indexOf("#");return a>0?n.substr(0,a):n},addQueryParamAtLocation:function(n,a,u){var g=n.split("&");return u=u??g.length,g.splice(u,0,a),g.join("&")},isFirstPartyAnalyticsVisitorIDCall:function(n,a,u){if(n!==H)return!1;var g;return a||(a=e.trackingServer),u||(u=e.trackingServerSecure),!(typeof(g=e.loadSSL?u:a)!="string"||!g.length)&&g.indexOf("2o7.net")<0&&g.indexOf("omtrdc.net")<0},isObject:function(n){return!!(n&&n===Object(n))},removeCookie:function(n){Ie.remove(n,{domain:e.cookieDomain})},isTrackingServerPopulated:function(){return!!e.trackingServer||!!e.trackingServerSecure},getTimestampInSeconds:function(){return Math.round(new Date().getTime()/1e3)},parsePipeDelimetedKeyValues:function(n){return n.split("|").reduce(function(a,u){var g=u.split("=");return a[g[0]]=decodeURIComponent(g[1]),a},{})},generateRandomString:function(n){n=n||5;for(var a="",u="abcdefghijklmnopqrstuvwxyz0123456789";n--;)a+=u[Math.floor(Math.random()*u.length)];return a},normalizeBoolean:function(n){return n==="true"||n!=="false"&&n},parseBoolean:function(n){return n==="true"||n!=="false"&&null},replaceMethodsWithFunction:function(n,a){for(var u in n)n.hasOwnProperty(u)&&typeof n[u]=="function"&&(n[u]=a);return n}};e._helpers=B;var ie=Rn(e,X);e._destinationPublishing=ie,e.timeoutMetricsLog=[];var oe={isClientSideMarketingCloudVisitorID:null,MCIDCallTimedOut:null,AnalyticsIDCallTimedOut:null,AAMIDCallTimedOut:null,fieldGroupObj:{},setState:function(n,a){switch(n){case"MC":a===!1?this.MCIDCallTimedOut!==!0&&(this.MCIDCallTimedOut=!1):this.MCIDCallTimedOut=a;break;case z:a===!1?this.AnalyticsIDCallTimedOut!==!0&&(this.AnalyticsIDCallTimedOut=!1):this.AnalyticsIDCallTimedOut=a;break;case ne:a===!1?this.AAMIDCallTimedOut!==!0&&(this.AAMIDCallTimedOut=!1):this.AAMIDCallTimedOut=a}}};e.isClientSideMarketingCloudVisitorID=function(){return oe.isClientSideMarketingCloudVisitorID},e.MCIDCallTimedOut=function(){return oe.MCIDCallTimedOut},e.AnalyticsIDCallTimedOut=function(){return oe.AnalyticsIDCallTimedOut},e.AAMIDCallTimedOut=function(){return oe.AAMIDCallTimedOut},e.idSyncGetOnPageSyncInfo=function(){return e._readVisitor(),e._getField("MCSYNCSOP")},e.idSyncByURL=function(n){if(!e.isOptedOut()){var a=C(n||{});if(a.error)return a.error;var u,g,S=n.url,D=encodeURIComponent,E=ie;return S=S.replace(/^https:/,"").replace(/^http:/,""),u=N.encodeAndBuildRequest(["",n.dpid,n.dpuuid||""],","),g=["ibs",D(n.dpid),"img",D(S),a.ttl,"",u],E.addMessage(g.join("|")),E.requestToProcess(),"Successfully queued"}},e.idSyncByDataSource=function(n){if(!e.isOptedOut())return n===Object(n)&&typeof n.dpuuid=="string"&&n.dpuuid.length?(n.url="//dpm.demdex.net/ibs:dpid="+n.dpid+"&dpuuid="+n.dpuuid,e.idSyncByURL(n)):"Error: config or config.dpuuid is empty"},qn(e,ie),e._getCookieVersion=function(n){n=n||e.cookieRead(e.cookieName);var a=K.VERSION_REGEX.exec(n);return a&&a.length>1?a[1]:null},e._resetAmcvCookie=function(n){var a=e._getCookieVersion();a&&!mt.isLessThan(a,n)||B.removeCookie(e.cookieName)},e.setAsCoopSafe=function(){$=!0},e.setAsCoopUnsafe=function(){$=!1},(function(){if(e.configs=Object.create(null),B.isObject(r))for(var n in r)J(n)&&(e[n]=r[n],e.configs[n]=r[n])})(),m();var bt;e.init=function(){I()&&(A.optIn.fetchPermissions(M,!0),!A.optIn.isApproved(A.optIn.Categories.ECID))||bt||(bt=!0,(function(){if(B.isObject(r)){e.idSyncContainerID=e.idSyncContainerID||0,$=typeof e.isCoopSafe=="boolean"?e.isCoopSafe:B.parseBoolean(e.isCoopSafe),e.resetBeforeVersion&&e._resetAmcvCookie(e.resetBeforeVersion),e._attemptToPopulateIdsFromUrl(),e._attemptToPopulateSdidFromUrl(),e._readVisitor();var n=e._getField(te),a=Math.ceil(new Date().getTime()/K.MILLIS_PER_DAY);e.idSyncDisableSyncs||e.disableIdSyncs||!ie.canMakeSyncIDCall(n,a)||(e._setFieldExpire(O,-1),e._setField(te,a)),e.getMarketingCloudVisitorID(),e.getAudienceManagerLocationHint(),e.getAudienceManagerBlob(),e._mergeServerState(e.serverState)}else e._attemptToPopulateIdsFromUrl(),e._attemptToPopulateSdidFromUrl()})(),(function(){if(!e.idSyncDisableSyncs&&!e.disableIdSyncs){ie.checkDPIframeSrc();var n=function(){var a=ie;a.readyToAttachIframe()&&a.attachIframe()};Y.addEventListener("load",function(){X.windowLoaded=!0,n()});try{je.receiveMessage(function(a){ie.receiveMessage(a.data)},ie.iframeHost)}catch{}}})(),(function(){e.whitelistIframeDomains&&K.POST_MESSAGE_ENABLED&&(e.whitelistIframeDomains=e.whitelistIframeDomains instanceof Array?e.whitelistIframeDomains:[e.whitelistIframeDomains],e.whitelistIframeDomains.forEach(function(n){var a=new dt(t,n),u=On(e,a);je.receiveMessage(u,n)}))})())}};qe.config=Ct,k.Visitor=qe;var Se=qe,Jn=function(t){if(N.isObject(t))return Object.keys(t).filter(function(r){return t[r]!==""}).reduce(function(r,o){var i=Ct.normalizeConfig(t[o]),s=N.normalizeBoolean(i);return r[o]=s,r},Object.create(null))},Qn=Xe.OptIn,Zn=Xe.IabPlugin;return Se.getInstance=function(t,r){if(!t)throw new Error("Visitor requires Adobe Marketing Cloud Org ID.");t.indexOf("@")<0&&(t+="@AdobeOrg");var o=(function(){var h=k.s_c_il;if(h)for(var m=0;m<h.length;m++){var T=h[m];if(T&&T._c==="Visitor"&&T.marketingCloudOrgID===t)return T}})();if(o)return o;var i=Jn(r);(function(h){k.adobe.optIn=k.adobe.optIn||(function(){var m=N.pluck(h,["doesOptInApply","previousPermissions","preOptInApprovals","isOptInStorageEnabled","optInStorageExpiry","isIabContext"]),T=h.optInCookieDomain||h.cookieDomain;T=T||pt(),T=T===window.location.hostname?"":T,m.optInCookieDomain=T;var M=new Qn(m,{cookies:Ie});if(m.isIabContext&&m.doesOptInApply){var v=new Zn(window.__cmp);M.registerPlugin(v)}return M})()})(i||{});var s=t,d=s.split("").reverse().join(""),f=new Se(t,null,d);N.isObject(i)&&i.cookieDomain&&(f.cookieDomain=i.cookieDomain),(function(){k.s_c_il.splice(--k.s_c_in,1)})();var C=N.getIeVersion();if(typeof C=="number"&&C<10)return f._helpers.replaceMethodsWithFunction(f,function(){});var I=(function(){try{return k.self!==k.parent}catch{return!0}})()&&!(function(h){return h.cookieWrite("TEST_AMCV_COOKIE","T",1),h.cookieRead("TEST_AMCV_COOKIE")==="T"&&(h._helpers.removeCookie("TEST_AMCV_COOKIE"),!0)})(f)&&k.parent?new Tn(t,i,f,k.parent):new Se(t,i,d);return f=null,I.init(),I},(function(){function t(){Se.windowLoaded=!0}k.addEventListener?k.addEventListener("load",t):k.attachEvent&&k.attachEvent("onload",t),Se.codeLoadEnd=new Date().getTime()})(),Se})()});var ye="__mpi",ee=typeof window<"u",kt=()=>ee?window:void 0;function W(c){let p=kt()?.[ye]?.segmentWrapper||{};return c?p[c]:p}var ge=(c,l)=>{let p=kt();if(!p){console.warn("[segment-wrapper] Cannot set config in non-browser environment");return}p[ye]=p[ye]||{},p[ye].segmentWrapper=p[ye].segmentWrapper||{},p[ye].segmentWrapper[c]=l};var Te,$e=()=>({ADOBE_ORG_ID:window.__SEGMENT_WRAPPER?.ADOBE_ORG_ID,DEFAULT_DEMDEX_VERSION:window.__SEGMENT_WRAPPER?.DEFAULT_DEMDEX_VERSION??"3.3.0",TIME_BETWEEN_RETRIES:window.__SEGMENT_WRAPPER?.TIME_BETWEEN_RETRIES??15,TIMES_TO_RETRY:window.__SEGMENT_WRAPPER?.TIMES_TO_RETRY??80,SERVERS:{trackingServer:window.__SEGMENT_WRAPPER?.TRACKING_SERVER,trackingServerSecure:window.__SEGMENT_WRAPPER?.TRACKING_SERVER}}),Pt=()=>{let c=$e();if(window.Visitor&&c.ADOBE_ORG_ID)return window.Visitor.getInstance(c.ADOBE_ORG_ID,c.SERVERS)},li=c=>c?.getMarketingCloudVisitorID(),Rt=()=>{let c=Pt(),l=$e(),p=c?.version??l.DEFAULT_DEMDEX_VERSION,{trackingServer:_}=l.SERVERS;return Promise.resolve({trackingServer:_,version:p})},Lt=()=>{if(Te)return Promise.resolve(Te);let c=$e();return new Promise(l=>{function p(_){if(_===0)return l("");let y=Pt();Te=li(y),Te?l(Te):window.setTimeout(()=>p(--_),c.TIME_BETWEEN_RETRIES)}p(c.TIMES_TO_RETRY)})},di=async()=>(await Promise.resolve().then(()=>ui(wt())),Lt()),xe=async()=>{let c=W("getCustomAdobeVisitorId");return typeof c=="function"?c():W("importAdobeVisitorId")===!0?di():Lt()};var fi="borosTcf",gi=2,pi={channel:"GDPR"},Nt={analytics:[1,8,10],advertising:[3]},ze={LOADED:"tcloaded",USER_ACTION_COMPLETE:"useractioncomplete"},mi="CMP Submitted",se={ACCEPTED:"accepted",DECLINED:"declined",UNKNOWN:"unknown"},ue={listeners:[],value:void 0,addListener:c=>ue.listeners.push(c),get:()=>ue.value,set:c=>{let{analytics:l,advertising:p}=c||{};ue.value={analytics:l,advertising:p},ue.listeners.forEach(_=>_(c)),ue.listeners=[]}};function _i(c){if(!ee)return null;let p=new RegExp(c+"=([^;]+)").exec(document.cookie);return p!==null?unescape(p[1]):null}var hi=()=>{if(W("initialized"))return!1;let c=!!window.__tcfapi;return c||console.warn("[tcfTracking] window.__tcfapi is not available on client and TCF won't be tracked."),c},Ci=c=>Nt.analytics.every(l=>c[`${l}`]),Ii=c=>Nt.advertising.every(l=>c[`${l}`]),Si=({gdprPrivacy:c})=>{let l=c.analytics===se.ACCEPTED,p=c.advertising===se.ACCEPTED;return Ve.track(mi,{...pi,...W("tcfTrackDefaultProperties")||{}},{google_consents:{analytics_storage:l?"granted":"denied",ad_storage:p?"granted":"denied",ad_user_data:p?"granted":"denied",ad_personalization:p?"granted":"denied"},gdpr_privacy:c.analytics,gdpr_privacy_advertising:c.advertising})},ve=()=>{let c=ue.get();return c!==void 0?Promise.resolve(c):new Promise(l=>{ue.addListener(p=>l(p))})},he=c=>c?.analytics===se.ACCEPTED,xt=c=>{let l=Ci(c),p=Ii(c),_=l?se.ACCEPTED:se.DECLINED,y=p?se.ACCEPTED:se.DECLINED;return ue.set({analytics:_,advertising:y}),{analytics:_,advertising:y}},Vt=()=>{let c=_i(fi);if(c)try{let{purpose:l}=JSON.parse(window.atob(c)),{consents:p}=l;return p}catch(l){console.error(l);return}},yi=()=>{let c=Vt();c&&xt(c)},vi=()=>{let c=Vt();ge("isFirstVisit",!c)};function Je(){if(ee){if(yi(),vi(),!hi()){ue.get()?.analytics===void 0&&ue.set({analytics:se.UNKNOWN,advertising:se.UNKNOWN});return}ge("initialized",!0),window.__tcfapi?.("addEventListener",gi,({eventStatus:c,purpose:l},p)=>{if(!p)return Promise.resolve();if(c===ze.USER_ACTION_COMPLETE||c===ze.LOADED){let{consents:_}=l,y=xt(_);if(c===ze.USER_ACTION_COMPLETE){let{analytics:P,advertising:U}=y,L={analytics:P,advertising:U};return!(ee&&window.sessionStorage.getItem("didomi-migration"))&&Si({gdprPrivacy:L})}}})}}function Ft(c){if(typeof document>"u")return null;let p=new RegExp(`${c}=([^;]+)`).exec(document.cookie);return p!==null?unescape(p[1]):null}function Ut(c,l,p={}){if(typeof document>"u"||typeof window>"u")return;let{maxAge:_=31536e3,path:y="/",reduceDomain:P=!0,sameSite:U="Lax"}=p,L=P?jt():window.location.hostname,ce=[`${c}=${l}`,`domain=${L}`,`path=${y}`,`max-age=${_}`,`SameSite=${U}`].join(";");document.cookie=ce}function Gt(c,l={}){if(typeof document>"u"||typeof window>"u")return;let{path:p="/",reduceDomain:_=!0}=l,y=_?jt():window.location.hostname;document.cookie=`${c}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=${p}; domain=${y}`}var jt=c=>{let l=c!==void 0?c:typeof window<"u"?window.location.hostname:"",p=".",_=l.split(p).reverse();if(_.length===1)return _[0];let y=[];for(let P of _)if(y.push(P),P.length>3)break;return`${p}${y.reverse().join(p)}`};var Ai="https://secure.adnxs.com/getuidj?consent=1",Qe="adit-xandr-id",Di=0;function Ei(){return ee?window.fetch(Ai,{credentials:"include"}).then(c=>c.json()).then(c=>c?.uid).catch(()=>null):Promise.resolve(null)}function Ht({gdprPrivacyValueAdvertising:c}){if(!ee)return null;if(c!==se.ACCEPTED)return Gt(Qe),null;let l=y=>y!==null&&Number(y)>Di,p=Ft(Qe),_=l(p);return _||Ei().then(y=>{typeof y=="string"&&Ut(Qe,y)}),ge("xandrId",p),_?p:null}var Ti={platform:"web"},bi={All:!1},Mi={All:!0},Oi=c=>{let l=W("userIdPrefix");return l&&(typeof c=="number"||typeof c=="string"&&!c.startsWith(l))?`${l}${c}`:c},Ze=()=>({...Ti,...W("defaultProperties")}),ki=async({gdprPrivacyValue:c,event:l})=>{let p=he(c),_;try{p&&(_=await xe())}catch(P){console.error(P)}return{...wi({isGdprAccepted:p,event:l}),"Adobe Analytics":_?{marketingCloudVisitorId:_}:!0,"Google Analytics 4":!0}},wi=({isGdprAccepted:c,event:l})=>l==="CMP Submitted"?Mi:c?{}:bi,Pi=({context:c,xandrId:l})=>{let p=W("sendXandrId")!==!1,_=l&&parseInt(l)!==0;if(!p||!_)return{};let L=[...Array.isArray(c?.externalIds)?c.externalIds:[],{collection:"users",encoding:"none",id:l,type:"xandr_id"}];return{externalIds:L.filter(({id:Ce,type:Ae},Ge)=>Ge===L.findIndex(({id:me,type:De})=>Ce===me&&Ae===De))}},et=async({event:c="",context:l={}})=>{let p=await ve(),{analytics:_,advertising:y}=p||{},P=he(p),[U,L]=await Promise.all([ki({gdprPrivacyValue:p,event:c}),Ht({gdprPrivacyValueAdvertising:y})]);return P||(l.integrations={...l.integrations??{},Personas:!1,Webhooks:!0,Webhook:!0}),{...l,...!P&&{ip:"0.0.0.0"},...Pi({context:l,xandrId:L}),clientVersion:"segment-wrapper@5.0.0-beta.0",gdpr_privacy:_,gdpr_privacy_advertising:y,integrations:{...l.integrations,...U}}},Bt=(c,l,p={},_)=>new Promise(y=>{(async()=>{let U=await et({context:p,event:c}),L={...Ze(),...l},ce=async(...Ce)=>{_&&_(...Ce);let[Ae]=await Promise.all([ve()]);he(Ae),y()};window.analytics.track(c,L,{...U,context:{integrations:{...U.integrations}}},ce)})()}),Ri=async(c,l,p,_)=>{let y=await ve(),P=Oi(c);return window.analytics.identify(P,he(y)?l:{},p,_)},Li=(c,l,p={},_)=>(p.isPageTrack=!0,Bt(c??"",l,p,_)),Ni=()=>Promise.resolve(window.analytics.reset()),Ve={page:Li,identify:Ri,track:Bt,reset:Ni};var Yt="__mpi_patch";function Wt(){let{track:c}=window.analytics;window.analytics.track=(...l)=>{let[p,_,y,P]=l,U={...Ze(),..._};return et({context:y,event:p}).then(L=>{c.call(window.analytics,p,U,L,P)}),window.analytics},window.analytics[Yt]=!0}ee&&(window.analytics?window.analytics[Yt]||(window.analytics.initialized?Wt():window.analytics.ready(Wt)):console.warn("[segment-wrapper] Segment Analytics is not loaded so patch is not applied."));var tt={spaReferrer:"",referrer:""},Fe={getDocumentReferrer:()=>document.referrer,getActualLocation:()=>{let{origin:c,pathname:l}=window.location;return`${c}${l}`},getActualQueryString:()=>{let{search:c}=window.location;return c}},Kt=({isPageTrack:c=!1}={})=>{let{referrer:l,spaReferrer:p}=tt;return(c?l:p)||Fe.getDocumentReferrer()},xi=()=>{tt.spaReferrer=Kt({isPageTrack:!0}),tt.referrer=Fe.getActualLocation()},Xt=({payload:c,next:l})=>{let{obj:{context:p}}=c,{isPageTrack:_}=p,y=Kt({isPageTrack:_});c.obj.context={...p,page:{...p.page,referrer:y}},_&&xi(),l(c)};var be={QUERY:"stc",SPLIT_SYMBOL:"-",CAMPAIGN_SPLIT_SYMBOL:":"},Vi="utm_campaign",Fi="utm_medium",Ui="utm_source",Gi="utm_content",ji="utm_id",Hi="utm_term",Bi={aff:"affiliate",dis:"display",em:"email",met:"paid-metasearch",sem:"paid-search",rt:"display",sm:"social-media",sp:"paid-social",pn:"push-notification",cs:"cross-sites"},Wi="na",Yi={medium:null,source:null,campaign:null},Ki={STC:"stc",UTM:"utm"},qt=({needsTransformation:c=!0}={})=>{let{medium:l,source:p,campaign:_,content:y,term:P}=Xi();if(!l||!p||!_)return null;let[U,L]=_.split(be.CAMPAIGN_SPLIT_SYMBOL);if(!U&&!L)return null;let ce=typeof y<"u"&&y!==Wi;return{campaign:{medium:c&&Bi[l]||l,...typeof L<"u"&&{id:U},name:L??U,source:p,...ce&&{content:y},...typeof P<"u"&&{term:P}}}};function Xi(){let c=Fe.getActualQueryString(),l=new URLSearchParams(c);return W("trackingTagsType")===Ki.UTM?qi(l):$t(l)}function $t(c){if(!zt(c))return Yi;let l=c.get(be.QUERY),[p,_,y,P,U]=l?.split(be.SPLIT_SYMBOL)||[];return{medium:p,source:_,campaign:y,content:P,term:U}}function zt(c){return c.has(be.QUERY)}function qi(c){let l=c.get(ji),p=c.get(Vi),_=c.get(Fi),y=c.get(Ui),P=c.get(Gi),U=c.get(Hi),L=l?`${l}${be.CAMPAIGN_SPLIT_SYMBOL}${p}`:p;return(!_||!y||!L)&&zt(c)?$t(c):{campaign:L,medium:_,source:y,content:P??void 0,term:U??void 0}}var Jt=({payload:c,next:l})=>{let p=qt();c.obj.context={...c.obj.context,...p},l(c)};var $i={platform:"web"},Qt=({payload:c,next:l})=>{let p=W("defaultContext")||{};c.obj.context={...$i,...p,...c.obj.context},l(c)};var zi=()=>{let c=null;return({payload:l,next:p})=>{try{let{obj:_}=l,{event:y,type:P}=_;if(P!=="track"){p(l);return}if(typeof y=="string"&&y.endsWith("Viewed")){let{page_name:U,page_type:L}=_.properties||{};c={name:U,type:L},p(l);return}if(!c){p(l);return}p({...l,obj:{..._,properties:{..._.properties,page_name_origin:c.name,page_type:_.properties?.page_type||c.type}}})}catch(_){console.error(_),p(l)}}},Zt=zi();var en=({payload:c,next:l})=>{c.obj.context={...c.obj.context,screen:{height:window.innerHeight,width:window.innerWidth,density:window.devicePixelRatio}},l(c)};var Ji=c=>{let l=W("isUserTraitsEnabled"),p=window.analytics.user?.(),_=he(c),y=p?.id();return{anonymousId:p?.anonymousId(),...y&&{userId:y},..._&&l&&p?.traits()||{}}},tn=async({payload:c,next:l})=>{let p=await ve(),_;try{_=Ji(p)}catch(y){console.error(y)}c.obj.context={...c.obj.context,traits:{...c.obj.context.traits||{},..._}},l(c)};for(nn=[],Ue=0;Ue<64;)nn[Ue]=0|4294967296*Math.sin(++Ue%Math.PI);var nn,Ue;for(re=18,Me=[],nt=[];re>1;re--)for(V=re;V<320;)Me[V+=re]=1;var V,re,Me,nt;function Q(c,l){return 4294967296*Math.pow(c,1/l)|0}for(V=0;V<64;)Me[++re]||(nt[V]=Q(re,2),Me[V++]=Q(re,3));function le(c,l){return c>>>l|c<<-l}function rn(c){var l=nt.slice(re=V=0,8),p=[],_=unescape(encodeURI(c))+"\x80",y=_.length;for(p[c=--y/4+2|15]=8*y;~y;)p[y>>2]|=_.charCodeAt(y)<<8*~y--;for(y=[];re<c;re+=16){for(Q=l.slice();V<64;Q.unshift(_+(le(_=Q[0],2)^le(_,13)^le(_,22))+(_&Q[1]^Q[1]&Q[2]^Q[2]&_)))Q[3]+=_=0|(y[V]=V<16?~~p[V+re]:(le(_=y[V-2],17)^le(_,19)^_>>>10)+y[V-7]+(le(_=y[V-15],7)^le(_,18)^_>>>3)+y[V-16])+Q.pop()+(le(_=Q[4],6)^le(_,11)^le(_,25))+(_&Q[5]^~_&Q[6])+Me[V++];for(V=8;V;)l[--V]+=Q[V]}for(_="";V<64;)_+=(l[V>>3]>>4*(7-V++)&15).toString(16);return _}var Qi=/\.|\+.*$/g;function Zi(c){if(typeof c!="string")return"";let p=c.toLowerCase().split(/@/);if(p.length!==2)return"";let[_,y]=p;return`${_.replace(Qi,"")}@${y}`}function on(c){let l=Zi(c);return l?rn(l):""}var er="USER_DATA_READY",tr=()=>W("universalId"),nr=()=>{let c=tr();if(c)return it(),c;let l=W("userEmail");if(l)return c=on(l),ir(c),it(),c;it()},an=()=>{if(!ee)return;let c=nr(),l=W("userEmail");if(typeof window<"u"&&typeof window.dispatchEvent=="function"){let p=new CustomEvent(er,{detail:{universalId:c,userEmail:l}});window.dispatchEvent(p)}return{universalId:c,userEmail:l}},it=()=>{ge("universalIdInitialized",!0)},ir=c=>{ge("universalId",c)};var sn=()=>{if(typeof window>"u")return;let c=window,l=c.analytics;if(!l){console.warn("[segment-wrapper] Analytics is not available");return}let p=c.__SEGMENT_WRAPPER?.SEGMENT_ID_USER_WITHOUT_CONSENTS??"anonymous_user";l.user?.()?.anonymousId()===p&&"setAnonymousId"in l&&typeof l.setAnonymousId=="function"&&l.setAnonymousId(null)};Je();try{an()}catch(c){console.error("[segment-wrapper] UniversalID could not be initialized",c)}var cn=()=>{let c=W("experimentalPageDataMiddleware");window.analytics.addSourceMiddleware?.(tn),window.analytics.addSourceMiddleware?.(Qt),window.analytics.addSourceMiddleware?.(Jt),window.analytics.addSourceMiddleware?.(en),window.analytics.addSourceMiddleware?.(Xt),c&&window.analytics.addSourceMiddleware?.(Zt)};ee&&window.analytics&&(window.analytics.ready(sn),window.analytics.addSourceMiddleware?cn():window.analytics.ready(cn));var rt=Ve;var pe=window;pe.sui=pe.sui||{};pe.sui.analytics=pe.sui.analytics||rt;pe.sui.analytics.getAdobeVisitorData=pe.sui.analytics.getAdobeVisitorData||Rt;pe.sui.analytics.getAdobeMCVisitorID=pe.sui.analytics.getAdobeMCVisitorID||xe;var go=rt;})();
1
+ "use strict";(()=>{var ri=Object.create;var Ot=Object.defineProperty;var oi=Object.getOwnPropertyDescriptor;var ai=Object.getOwnPropertyNames;var si=Object.getPrototypeOf,ci=Object.prototype.hasOwnProperty;var ui=(s,d)=>()=>(d||s((d={exports:{}}).exports,d),d.exports);var di=(s,d,p,_)=>{if(d&&typeof d=="object"||typeof d=="function")for(let S of ai(d))!ci.call(s,S)&&S!==p&&Ot(s,S,{get:()=>d[S],enumerable:!(_=oi(d,S))||_.enumerable});return s};var li=(s,d,p)=>(p=s!=null?ri(si(s)):{},di(d||!s||!s.__esModule?Ot(p,"default",{value:s,enumerable:!0}):p,s));var wt=ui(()=>{"use strict";var cr=(function(){"use strict";function s(t){"@babel/helpers - typeof";return(s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function d(t,r,o){return r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function p(){return{callbacks:{},add:function(t,r){this.callbacks[t]=this.callbacks[t]||[];var o=this.callbacks[t].push(r)-1,i=this;return function(){i.callbacks[t].splice(o,1)}},execute:function(t,r){if(this.callbacks[t]){r=r===void 0?[]:r,r=r instanceof Array?r:[r];try{for(;this.callbacks[t].length;){var o=this.callbacks[t].shift();typeof o=="function"?o.apply(null,r):o instanceof Array&&o[1].apply(o[0],r)}delete this.callbacks[t]}catch{}}},executeAll:function(t,r){(r||t&&!N.isObjectEmpty(t))&&Object.keys(this.callbacks).forEach(function(o){var i=t[o]!==void 0?t[o]:"";this.execute(o,i)},this)},hasCallbacks:function(){return!!Object.keys(this.callbacks).length}}}function _(t,r,o){var i=t?.[r];return i===void 0?o:i}function S(t){for(var r=/^\d+$/,o=0,i=t.length;o<i;o++)if(!r.test(t[o]))return!1;return!0}function P(t,r){for(;t.length<r.length;)t.push("0");for(;r.length<t.length;)r.push("0")}function L(t,r){for(var o=0;o<t.length;o++){var i=parseInt(t[o],10),c=parseInt(r[o],10);if(i>c)return 1;if(c>i)return-1}return 0}function x(t,r){if(t===r)return 0;var o=t.toString().split("."),i=r.toString().split(".");return S(o.concat(i))?(P(o,i),L(o,i)):NaN}function de(t){return t===Object(t)&&Object.keys(t).length===0}function ve(t){return typeof t=="function"||t instanceof Array&&t.length}function Ae(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0};this.log=Be("log",t,r),this.warn=Be("warn",t,r),this.error=Be("error",t,r)}function je(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.isEnabled,o=t.cookieName,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=i.cookies;return r&&o&&c?{remove:function(){c.remove(o)},get:function(){var l=c.get(o),f={};try{f=JSON.parse(l)}catch{f={}}return f},set:function(l,f){f=f||{},c.set(o,JSON.stringify(l),{domain:f.optInCookieDomain||"",cookieLifetime:f.optInStorageExpiry||3419e4,expires:!0})}}:{get:Ee,set:Ee,remove:Ee}}function me(t){this.name=this.constructor.name,this.message=t,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}function De(){function t(O,V){var J=We(O);return J.length?J.every(function(fe){return!!V[fe]}):Gn(V)}function r(){ie(z),H(le.COMPLETE),j(A.status,A.permissions),e.set(A.permissions,{optInCookieDomain:I,optInStorageExpiry:C}),w.execute(Dt)}function o(O){return function(V,J){if(!Ye(V))throw new Error("[OptIn] Invalid category(-ies). Please use the `OptIn.Categories` enum.");return H(le.CHANGED),Object.assign(z,yt(We(V),O)),J||r(),A}}var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=i.doesOptInApply,l=i.previousPermissions,f=i.preOptInApprovals,h=i.isOptInStorageEnabled,I=i.optInCookieDomain,C=i.optInStorageExpiry,m=i.isIabContext,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=b.cookies,v=Yn(l);At(v,"Invalid `previousPermissions`!"),At(f,"Invalid `preOptInApprovals`!");var e=je({isEnabled:!!h,cookieName:"adobeujs-optin"},{cookies:M}),A=this,j=Nn(A),w=It(),G=St(v),Y=St(f),X=e.get(),$={},U=(function(O,V){return Ke(O)||V&&Ke(V)?le.COMPLETE:le.PENDING})(G,X),ne=(function(O,V,J){var fe=yt(Pe,!c);return c?Object.assign({},fe,O,V,J):fe})(Y,G,X),z=Hn(ne),H=function(O){return U=O},ie=function(O){return ne=O};A.deny=o(!1),A.approve=o(!0),A.denyAll=A.deny.bind(A,Pe),A.approveAll=A.approve.bind(A,Pe),A.isApproved=function(O){return t(O,A.permissions)},A.isPreApproved=function(O){return t(O,Y)},A.fetchPermissions=function(O){var V=arguments.length>1&&arguments[1]!==void 0&&arguments[1],J=V?A.on(le.COMPLETE,O):Ee;return!c||c&&A.isComplete||f?O(A.permissions):V||w.add(Dt,function(){return O(A.permissions)}),J},A.complete=function(){A.status===le.CHANGED&&r()},A.registerPlugin=function(O){if(!O||!O.name||typeof O.onRegister!="function")throw new Error($n);$[O.name]||($[O.name]=O,O.onRegister.call(O,A))},A.execute=qn($),Object.defineProperties(A,{permissions:{get:function(){return ne}},status:{get:function(){return U}},Categories:{get:function(){return _e}},doesOptInApply:{get:function(){return!!c}},isPending:{get:function(){return A.status===le.PENDING}},isComplete:{get:function(){return A.status===le.COMPLETE}},__plugins:{get:function(){return Object.keys($)}},isIabContext:{get:function(){return m}}})}function ot(t,r){function o(){c=null,t.call(t,new me("The call took longer than you wanted!"))}function i(){c&&(clearTimeout(c),t.apply(t,arguments))}if(r===void 0)return t;var c=setTimeout(o,r);return i}function at(){if(window.__cmp)return window.__cmp;var t=window;if(t===window.top)return void Re.error("__cmp not found");for(var r;!r;){t=t.parent;try{t.frames.__cmpLocator&&(r=t)}catch{}if(t===window.top)break}if(!r)return void Re.error("__cmp not found");var o={};return window.__cmp=function(i,c,l){var f=Math.random()+"",h={__cmpCall:{command:i,parameter:c,callId:f}};o[f]=l,r.postMessage(h,"*")},window.addEventListener("message",function(i){var c=i.data;if(typeof c=="string")try{c=JSON.parse(i.data)}catch{}if(c.__cmpReturn){var l=c.__cmpReturn;o[l.callId]&&(o[l.callId](l.returnValue,l.success),delete o[l.callId])}},!1),window.__cmp}function ln(){var t=this;t.name="iabPlugin",t.version="0.0.1";var r=It(),o={allConsentData:null},i=function(I){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return o[I]=C};t.fetchConsentData=function(I){var C=I.callback,m=I.timeout,b=ot(C,m);c({callback:b})},t.isApproved=function(I){var C=I.callback,m=I.category,b=I.timeout;if(o.allConsentData)return C(null,h(m,o.allConsentData.vendorConsents,o.allConsentData.purposeConsents));var M=ot(function(v){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=e.vendorConsents,j=e.purposeConsents;C(v,h(m,A,j))},b);c({category:m,callback:M})},t.onRegister=function(I){var C=Object.keys(He),m=function(b){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=M.purposeConsents,e=M.gdprApplies,A=M.vendorConsents;!b&&e&&A&&v&&(C.forEach(function(j){var w=h(j,A,v);I[w?"approve":"deny"](j,!0)}),I.complete())};t.fetchConsentData({callback:m})};var c=function(I){var C=I.callback;if(o.allConsentData)return C(null,o.allConsentData);r.add("FETCH_CONSENT_DATA",C);var m={};f(function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=b.purposeConsents,v=b.gdprApplies,e=b.vendorConsents;arguments.length>1&&arguments[1]&&(m={purposeConsents:M,gdprApplies:v,vendorConsents:e},i("allConsentData",m)),l(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};arguments.length>1&&arguments[1]&&(m.consentString=A.consentData,i("allConsentData",m)),r.execute("FETCH_CONSENT_DATA",[null,o.allConsentData])})})},l=function(I){var C=at();C&&C("getConsentData",null,I)},f=function(I){var C=Xn(He),m=at();m&&m("getVendorConsents",C,I)},h=function(I){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},b=!!C[He[I]];return b&&(function(){return Vn[I].every(function(M){return m[M]})})()}}var k=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};Object.assign=Object.assign||function(t){for(var r,o,i=1;i<arguments.length;++i){o=arguments[i];for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t};var Oe,ke,fn={HANDSHAKE:"HANDSHAKE",GETSTATE:"GETSTATE",PARENTSTATE:"PARENTSTATE"},gn={MCMID:"MCMID",MCAID:"MCAID",MCAAMB:"MCAAMB",MCAAMLH:"MCAAMLH",MCOPTOUT:"MCOPTOUT",CUSTOMERIDS:"CUSTOMERIDS"},pn={MCMID:"getMarketingCloudVisitorID",MCAID:"getAnalyticsVisitorID",MCAAMB:"getAudienceManagerBlob",MCAAMLH:"getAudienceManagerLocationHint",MCOPTOUT:"isOptedOut",ALLFIELDS:"getVisitorValues"},mn={CUSTOMERIDS:"getCustomerIDs"},_n={MCMID:"getMarketingCloudVisitorID",MCAAMB:"getAudienceManagerBlob",MCAAMLH:"getAudienceManagerLocationHint",MCOPTOUT:"isOptedOut",MCAID:"getAnalyticsVisitorID",CUSTOMERIDS:"getCustomerIDs",ALLFIELDS:"getVisitorValues"},Cn={MC:"MCMID",A:"MCAID",AAM:"MCAAMB"},hn={MCMID:"MCMID",MCOPTOUT:"MCOPTOUT",MCAID:"MCAID",MCAAMLH:"MCAAMLH",MCAAMB:"MCAAMB"},In={UNKNOWN:0,AUTHENTICATED:1,LOGGED_OUT:2},yn={GLOBAL:"global"},Z={MESSAGES:fn,STATE_KEYS_MAP:gn,ASYNC_API_MAP:pn,SYNC_API_MAP:mn,ALL_APIS:_n,FIELDGROUP_TO_FIELD:Cn,FIELDS:hn,AUTH_STATE:In,OPT_OUT:yn},st=Z.STATE_KEYS_MAP,Sn=function(t){function r(){}function o(i,c){var l=this;return function(){var f=t(0,i),h={};return h[i]=f,l.setStateAndPublish(h),c(f),f}}this.getMarketingCloudVisitorID=function(i){i=i||r;var c=this.findField(st.MCMID,i),l=o.call(this,st.MCMID,i);return c!==void 0?c:l()},this.getVisitorValues=function(i){this.getMarketingCloudVisitorID(function(c){i({MCMID:c})})}},vn=Z.MESSAGES,ct=Z.ASYNC_API_MAP,ut=Z.SYNC_API_MAP,An=function(){function t(){}function r(c,l){var f=this;return function(){return f.callbackRegistry.add(c,l),f.messageParent(vn.GETSTATE),""}}function o(c){this[ct[c]]=function(l){l=l||t;var f=this.findField(c,l),h=r.call(this,c,l);return f!==void 0?f:h()}}function i(c){this[ut[c]]=function(){return this.findField(c,t)||{}}}Object.keys(ct).forEach(o,this),Object.keys(ut).forEach(i,this)},dt=Z.ASYNC_API_MAP,Dn=function(){Object.keys(dt).forEach(function(t){this[dt[t]]=function(r){this.callbackRegistry.add(t,r)}},this)},N=(function(t,r){return r={exports:{}},t(r,r.exports),r.exports})(function(t,r){r.isObjectEmpty=function(i){return i===Object(i)&&Object.keys(i).length===0},r.isValueEmpty=function(i){return i===""||r.isObjectEmpty(i)};var o=function(){var i=navigator.appName,c=navigator.userAgent;return i==="Microsoft Internet Explorer"||c.indexOf("MSIE ")>=0||c.indexOf("Trident/")>=0&&c.indexOf("Windows NT 6")>=0};r.getIeVersion=function(){return document.documentMode?document.documentMode:o()?7:null},r.encodeAndBuildRequest=function(i,c){return i.map(encodeURIComponent).join(c)},r.isObject=function(i){return i!==null&&s(i)==="object"&&Array.isArray(i)===!1},r.defineGlobalNamespace=function(){return window.adobe=r.isObject(window.adobe)?window.adobe:{},window.adobe},r.pluck=function(i,c){return c.reduce(function(l,f){return i[f]&&(l[f]=i[f]),l},Object.create(null))},r.parseOptOut=function(i,c,l){c||(c=l,i.d_optout&&i.d_optout instanceof Array&&(c=i.d_optout.join(",")));var f=parseInt(i.d_ottl,10);return isNaN(f)&&(f=7200),{optOut:c,d_ottl:f}},r.normalizeBoolean=function(i){var c=i;return i==="true"?c=!0:i==="false"&&(c=!1),c}}),En=(N.isObjectEmpty,N.isValueEmpty,N.getIeVersion,N.encodeAndBuildRequest,N.isObject,N.defineGlobalNamespace,N.pluck,N.parseOptOut,N.normalizeBoolean,p),bn=Z.MESSAGES,Tn={0:"prefix",1:"orgID",2:"state"},lt=function(t,r){this.parse=function(o){try{var i={};return o.data.split("|").forEach(function(c,l){c!==void 0&&(i[Tn[l]]=l!==2?c:JSON.parse(c))}),i}catch{}},this.isInvalid=function(o){var i=this.parse(o);if(!i||Object.keys(i).length<2)return!0;var c=t!==i.orgID,l=!r||o.origin!==r,f=Object.keys(bn).indexOf(i.prefix)===-1;return c||l||f},this.send=function(o,i,c){var l=i+"|"+t;c&&c===Object(c)&&(l+="|"+JSON.stringify(c));try{o.postMessage(l,r)}catch{}}},ft=Z.MESSAGES,Mn=function(t,r,o,i){function c(w){Object.assign(v,w)}function l(w){Object.assign(v.state,w),Object.assign(v.state.ALLFIELDS,w),v.callbackRegistry.executeAll(v.state)}function f(w){if(!j.isInvalid(w)){A=!1;var G=j.parse(w);v.setStateAndPublish(G.state)}}function h(w){!A&&e&&(A=!0,j.send(i,w))}function I(){c(new Sn(o._generateID)),v.getMarketingCloudVisitorID(),v.callbackRegistry.executeAll(v.state,!0),k.removeEventListener("message",C)}function C(w){if(!j.isInvalid(w)){var G=j.parse(w);A=!1,k.clearTimeout(v._handshakeTimeout),k.removeEventListener("message",C),c(new An(v)),k.addEventListener("message",f),v.setStateAndPublish(G.state),v.callbackRegistry.hasCallbacks()&&h(ft.GETSTATE)}}function m(){e&&postMessage?(k.addEventListener("message",C),h(ft.HANDSHAKE),v._handshakeTimeout=setTimeout(I,250)):I()}function b(){k.s_c_in||(k.s_c_il=[],k.s_c_in=0),v._c="Visitor",v._il=k.s_c_il,v._in=k.s_c_in,v._il[v._in]=v,k.s_c_in++}function M(){function w(G){G.indexOf("_")!==0&&typeof o[G]=="function"&&(v[G]=function(){})}Object.keys(o).forEach(w),v.getSupplementalDataID=o.getSupplementalDataID,v.isAllowed=function(){return!0}}var v=this,e=r.whitelistParentDomain;v.state={ALLFIELDS:{}},v.version=o.version,v.marketingCloudOrgID=t,v.cookieDomain=o.cookieDomain||"",v._instanceType="child";var A=!1,j=new lt(t,e);v.callbackRegistry=En(),v.init=function(){b(),M(),c(new Dn(v)),m()},v.findField=function(w,G){if(v.state[w]!==void 0)return G(v.state[w]),v.state[w]},v.messageParent=h,v.setStateAndPublish=l},we=Z.MESSAGES,gt=Z.ALL_APIS,On=Z.ASYNC_API_MAP,kn=Z.FIELDGROUP_TO_FIELD,wn=function(t,r){function o(){var C={};return Object.keys(gt).forEach(function(m){var b=gt[m],M=t[b]();N.isValueEmpty(M)||(C[m]=M)}),C}function i(){var C=[];return t._loading&&Object.keys(t._loading).forEach(function(m){if(t._loading[m]){var b=kn[m];C.push(b)}}),C.length?C:null}function c(C){return function m(b){var M=i();if(M){var v=On[M[0]];t[v](m,!0)}else C()}}function l(C,m){var b=o();r.send(C,m,b)}function f(C){I(C),l(C,we.HANDSHAKE)}function h(C){c(function(){l(C,we.PARENTSTATE)})()}function I(C){function m(M){b.call(t,M),r.send(C,we.PARENTSTATE,{CUSTOMERIDS:t.getCustomerIDs()})}var b=t.setCustomerIDs;t.setCustomerIDs=m}return function(C){r.isInvalid(C)||(r.parse(C).prefix===we.HANDSHAKE?f:h)(C.source)}},Pn=function(t,r){function o(f){return function(h){i[f]=h,c++,c===l&&r(i)}}var i={},c=0,l=Object.keys(t).length;Object.keys(t).forEach(function(f){var h=t[f];if(h.fn){var I=h.args||[];I.unshift(o(f)),h.fn.apply(h.context||null,I)}})},he={get:function(t){t=encodeURIComponent(t);var r=(";"+document.cookie).split(" ").join(";"),o=r.indexOf(";"+t+"="),i=o<0?o:r.indexOf(";",o+1);return o<0?"":decodeURIComponent(r.substring(o+2+t.length,i<0?r.length:i))},set:function(t,r,o){var i=_(o,"cookieLifetime"),c=_(o,"expires"),l=_(o,"domain"),f=_(o,"secure"),h=f?"Secure":"";if(c&&i!=="SESSION"&&i!=="NONE"){var I=r!==""?parseInt(i||0,10):-60;if(I)c=new Date,c.setTime(c.getTime()+1e3*I);else if(c===1){c=new Date;var C=c.getYear();c.setYear(C+2+(C<1900?1900:0))}}else c=0;return t&&i!=="NONE"?(document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(r)+"; path=/;"+(c?" expires="+c.toGMTString()+";":"")+(l?" domain="+l+";":"")+h,this.get(t)===r):0},remove:function(t,r){var o=_(r,"domain");o=o?" domain="+o+";":"",document.cookie=encodeURIComponent(t)+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"+o}},pt=function(t){var r;!t&&k.location&&(t=k.location.hostname),r=t;var o,i=r.split(".");for(o=i.length-2;o>=0;o--)if(r=i.slice(o).join("."),he.set("test","cookie",{domain:r}))return he.remove("test",{domain:r}),r;return""},mt={compare:x,isLessThan:function(t,r){return x(t,r)<0},areVersionsDifferent:function(t,r){return x(t,r)!==0},isGreaterThan:function(t,r){return x(t,r)>0},isEqual:function(t,r){return x(t,r)===0}},_t=!!k.postMessage,Ge={postMessage:function(t,r,o){var i=1;r&&(_t?o.postMessage(t,r.replace(/([^:]+:\/\/[^\/]+).*/,"$1")):r&&(o.location=r.replace(/#.*$/,"")+"#"+ +new Date+i+++"&"+t))},receiveMessage:function(t,r){var o;try{_t&&(t&&(o=function(i){if(typeof r=="string"&&i.origin!==r||Object.prototype.toString.call(r)==="[object Function]"&&r(i.origin)===!1)return!1;t(i)}),k.addEventListener?k[t?"addEventListener":"removeEventListener"]("message",o):k[t?"attachEvent":"detachEvent"]("onmessage",o))}catch{}}},Rn=function(t){var r,o,i="0123456789",c="",l="",f=8,h=10,I=10;if(t==1){for(i+="ABCDEF",r=0;16>r;r++)o=Math.floor(Math.random()*f),c+=i.substring(o,o+1),o=Math.floor(Math.random()*f),l+=i.substring(o,o+1),f=16;return c+"-"+l}for(r=0;19>r;r++)o=Math.floor(Math.random()*h),c+=i.substring(o,o+1),r===0&&o==9?h=3:((r==1||r==2)&&h!=10&&2>o||2<r)&&(h=10),o=Math.floor(Math.random()*I),l+=i.substring(o,o+1),r===0&&o==9?I=3:((r==1||r==2)&&I!=10&&2>o||2<r)&&(I=10);return c+l},Ln=function(t,r){return{corsMetadata:(function(){var o="none",i=!0;return typeof XMLHttpRequest<"u"&&XMLHttpRequest===Object(XMLHttpRequest)&&("withCredentials"in new XMLHttpRequest?o="XMLHttpRequest":typeof XDomainRequest<"u"&&XDomainRequest===Object(XDomainRequest)&&(i=!1),Object.prototype.toString.call(k.HTMLElement).indexOf("Constructor")>0&&(i=!1)),{corsType:o,corsCookiesEnabled:i}})(),getCORSInstance:function(){return this.corsMetadata.corsType==="none"?null:new k[this.corsMetadata.corsType]},fireCORS:function(o,i,c){function l(I){var C;try{if((C=JSON.parse(I))!==Object(C))return void f.handleCORSError(o,null,"Response is not JSON")}catch(v){return void f.handleCORSError(o,v,"Error parsing response as JSON")}try{for(var m=o.callback,b=k,M=0;M<m.length;M++)b=b[m[M]];b(C)}catch(v){f.handleCORSError(o,v,"Error forming callback function")}}var f=this;i&&(o.loadErrorHandler=i);try{var h=this.getCORSInstance();h.open("get",o.corsUrl+"&ts="+new Date().getTime(),!0),this.corsMetadata.corsType==="XMLHttpRequest"&&(h.withCredentials=!0,h.timeout=t.loadTimeout,h.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),h.onreadystatechange=function(){this.readyState===4&&this.status===200&&l(this.responseText)}),h.onerror=function(I){f.handleCORSError(o,I,"onerror")},h.ontimeout=function(I){f.handleCORSError(o,I,"ontimeout")},h.send(),t._log.requests.push(o.corsUrl)}catch(I){this.handleCORSError(o,I,"try-catch")}},handleCORSError:function(o,i,c){t.CORSErrors.push({corsData:o,error:i,description:c}),o.loadErrorHandler&&(c==="ontimeout"?o.loadErrorHandler(!0):o.loadErrorHandler(!1))}}},K={POST_MESSAGE_ENABLED:!!k.postMessage,DAYS_BETWEEN_SYNC_ID_CALLS:1,MILLIS_PER_DAY:864e5,ADOBE_MC:"adobe_mc",ADOBE_MC_SDID:"adobe_mc_sdid",VALID_VISITOR_ID_REGEX:/^[0-9a-fA-F\-]+$/,ADOBE_MC_TTL_IN_MIN:5,VERSION_REGEX:/vVersion\|((\d+\.)?(\d+\.)?(\*|\d+))(?=$|\|)/,FIRST_PARTY_SERVER_COOKIE:"s_ecid"},xn=function(t,r){var o=k.document;return{THROTTLE_START:3e4,MAX_SYNCS_LENGTH:649,throttleTimerSet:!1,id:null,onPagePixels:[],iframeHost:null,getIframeHost:function(i){if(typeof i=="string"){var c=i.split("/");return c[0]+"//"+c[2]}},subdomain:null,url:null,getUrl:function(){var i,c="http://fast.",l="?d_nsid="+t.idSyncContainerID+"#"+encodeURIComponent(o.location.origin);return this.subdomain||(this.subdomain="nosubdomainreturned"),t.loadSSL&&(c=t.idSyncSSLUseAkamai?"https://fast.":"https://"),i=c+this.subdomain+".demdex.net/dest5.html"+l,this.iframeHost=this.getIframeHost(i),this.id="destination_publishing_iframe_"+this.subdomain+"_"+t.idSyncContainerID,i},checkDPIframeSrc:function(){var i="?d_nsid="+t.idSyncContainerID+"#"+encodeURIComponent(o.location.href);typeof t.dpIframeSrc=="string"&&t.dpIframeSrc.length&&(this.id="destination_publishing_iframe_"+(t._subdomain||this.subdomain||new Date().getTime())+"_"+t.idSyncContainerID,this.iframeHost=this.getIframeHost(t.dpIframeSrc),this.url=t.dpIframeSrc+i)},idCallNotProcesssed:null,doAttachIframe:!1,startedAttachingIframe:!1,iframeHasLoaded:null,iframeIdChanged:null,newIframeCreated:null,originalIframeHasLoadedAlready:null,iframeLoadedCallbacks:[],regionChanged:!1,timesRegionChanged:0,sendingMessages:!1,messages:[],messagesPosted:[],messagesReceived:[],messageSendingInterval:K.POST_MESSAGE_ENABLED?null:100,onPageDestinationsFired:[],jsonForComparison:[],jsonDuplicates:[],jsonWaiting:[],jsonProcessed:[],canSetThirdPartyCookies:!0,receivedThirdPartyCookiesNotification:!1,readyToAttachIframePreliminary:function(){return!(t.idSyncDisableSyncs||t.disableIdSyncs||t.idSyncDisable3rdPartySyncing||t.disableThirdPartyCookies||t.disableThirdPartyCalls)},readyToAttachIframe:function(){return this.readyToAttachIframePreliminary()&&(this.doAttachIframe||t._doAttachIframe)&&(this.subdomain&&this.subdomain!=="nosubdomainreturned"||t._subdomain)&&this.url&&!this.startedAttachingIframe},attachIframe:function(){function i(){f=o.createElement("iframe"),f.sandbox="allow-scripts allow-same-origin",f.title="Adobe ID Syncing iFrame",f.id=l.id,f.name=l.id+"_name",f.style.cssText="display: none; width: 0; height: 0;",f.src=l.url,l.newIframeCreated=!0,c(),o.body.appendChild(f)}function c(h){f.addEventListener("load",function(){f.className="aamIframeLoaded",l.iframeHasLoaded=!0,l.fireIframeLoadedCallbacks(h),l.requestToProcess()})}this.startedAttachingIframe=!0;var l=this,f=o.getElementById(this.id);f?f.nodeName!=="IFRAME"?(this.id+="_2",this.iframeIdChanged=!0,i()):(this.newIframeCreated=!1,f.className!=="aamIframeLoaded"?(this.originalIframeHasLoadedAlready=!1,c("The destination publishing iframe already exists from a different library, but hadn't loaded yet.")):(this.originalIframeHasLoadedAlready=!0,this.iframeHasLoaded=!0,this.iframe=f,this.fireIframeLoadedCallbacks("The destination publishing iframe already exists from a different library, and had loaded alresady."),this.requestToProcess())):i(),this.iframe=f},fireIframeLoadedCallbacks:function(i){this.iframeLoadedCallbacks.forEach(function(c){typeof c=="function"&&c({message:i||"The destination publishing iframe was attached and loaded successfully."})}),this.iframeLoadedCallbacks=[]},requestToProcess:function(i){function c(){f.jsonForComparison.push(i),f.jsonWaiting.push(i),f.processSyncOnPage(i)}var l,f=this;if(i===Object(i)&&i.ibs)if(l=JSON.stringify(i.ibs||[]),this.jsonForComparison.length){var h,I,C,m=!1;for(h=0,I=this.jsonForComparison.length;h<I;h++)if(C=this.jsonForComparison[h],l===JSON.stringify(C.ibs||[])){m=!0;break}m?this.jsonDuplicates.push(i):c()}else c();if((this.receivedThirdPartyCookiesNotification||!K.POST_MESSAGE_ENABLED||this.iframeHasLoaded)&&this.jsonWaiting.length){var b=this.jsonWaiting.shift();this.process(b),this.requestToProcess()}t.idSyncDisableSyncs||t.disableIdSyncs||!this.iframeHasLoaded||!this.messages.length||this.sendingMessages||(this.throttleTimerSet||(this.throttleTimerSet=!0,setTimeout(function(){f.messageSendingInterval=K.POST_MESSAGE_ENABLED?null:150},this.THROTTLE_START)),this.sendingMessages=!0,this.sendMessages())},getRegionAndCheckIfChanged:function(i,c){var l=t._getField("MCAAMLH"),f=i.d_region||i.dcs_region;return l?f&&(t._setFieldExpire("MCAAMLH",c),t._setField("MCAAMLH",f),parseInt(l,10)!==f&&(this.regionChanged=!0,this.timesRegionChanged++,t._setField("MCSYNCSOP",""),t._setField("MCSYNCS",""),l=f)):(l=f)&&(t._setFieldExpire("MCAAMLH",c),t._setField("MCAAMLH",l)),l||(l=""),l},processSyncOnPage:function(i){var c,l,f,h;if((c=i.ibs)&&c instanceof Array&&(l=c.length))for(f=0;f<l;f++)h=c[f],h.syncOnPage&&this.checkFirstPartyCookie(h,"","syncOnPage")},process:function(i){var c,l,f,h,I,C=encodeURIComponent,m=!1;if((c=i.ibs)&&c instanceof Array&&(l=c.length))for(m=!0,f=0;f<l;f++)h=c[f],I=[C("ibs"),C(h.id||""),C(h.tag||""),N.encodeAndBuildRequest(h.url||[],","),C(h.ttl||""),"","",h.fireURLSync?"true":"false"],h.syncOnPage||(this.canSetThirdPartyCookies?this.addMessage(I.join("|")):h.fireURLSync&&this.checkFirstPartyCookie(h,I.join("|")));m&&this.jsonProcessed.push(i)},checkFirstPartyCookie:function(i,c,l){var f=l==="syncOnPage",h=f?"MCSYNCSOP":"MCSYNCS";t._readVisitor();var I,C,m=t._getField(h),b=!1,M=!1,v=Math.ceil(new Date().getTime()/K.MILLIS_PER_DAY);m?(I=m.split("*"),C=this.pruneSyncData(I,i.id,v),b=C.dataPresent,M=C.dataValid,b&&M||this.fireSync(f,i,c,I,h,v)):(I=[],this.fireSync(f,i,c,I,h,v))},pruneSyncData:function(i,c,l){var f,h,I,C=!1,m=!1;for(h=0;h<i.length;h++)f=i[h],I=parseInt(f.split("-")[1],10),f.match("^"+c+"-")?(C=!0,l<I?m=!0:(i.splice(h,1),h--)):l>=I&&(i.splice(h,1),h--);return{dataPresent:C,dataValid:m}},manageSyncsSize:function(i){if(i.join("*").length>this.MAX_SYNCS_LENGTH)for(i.sort(function(c,l){return parseInt(c.split("-")[1],10)-parseInt(l.split("-")[1],10)});i.join("*").length>this.MAX_SYNCS_LENGTH;)i.shift()},fireSync:function(i,c,l,f,h,I){var C=this;if(i){if(c.tag==="img"){var m,b,M,v,e=c.url,A=t.loadSSL?"https:":"http:";for(m=0,b=e.length;m<b;m++){M=e[m],v=/^\/\//.test(M);var j=new Image;j.addEventListener("load",(function(w,G,Y,X){return function(){C.onPagePixels[w]=null,t._readVisitor();var $,U=t._getField(h),ne=[];if(U){$=U.split("*");var z,H,ie;for(z=0,H=$.length;z<H;z++)ie=$[z],ie.match("^"+G.id+"-")||ne.push(ie)}C.setSyncTrackingData(ne,G,Y,X)}})(this.onPagePixels.length,c,h,I)),j.src=(v?A:"")+M,this.onPagePixels.push(j)}}}else this.addMessage(l),this.setSyncTrackingData(f,c,h,I)},addMessage:function(i){var c=encodeURIComponent,l=c(t._enableErrorReporting?"---destpub-debug---":"---destpub---");this.messages.push((K.POST_MESSAGE_ENABLED?"":l)+i)},setSyncTrackingData:function(i,c,l,f){i.push(c.id+"-"+(f+Math.ceil(c.ttl/60/24))),this.manageSyncsSize(i),t._setField(l,i.join("*"))},sendMessages:function(){var i,c=this,l="",f=encodeURIComponent;this.regionChanged&&(l=f("---destpub-clear-dextp---"),this.regionChanged=!1),this.messages.length?K.POST_MESSAGE_ENABLED?(i=l+f("---destpub-combined---")+this.messages.join("%01"),this.postMessage(i),this.messages=[],this.sendingMessages=!1):(i=this.messages.shift(),this.postMessage(l+i),setTimeout(function(){c.sendMessages()},this.messageSendingInterval)):this.sendingMessages=!1},postMessage:function(i){Ge.postMessage(i,this.url,this.iframe.contentWindow),this.messagesPosted.push(i)},receiveMessage:function(i){var c,l=/^---destpub-to-parent---/;typeof i=="string"&&l.test(i)&&(c=i.replace(l,"").split("|"),c[0]==="canSetThirdPartyCookies"&&(this.canSetThirdPartyCookies=c[1]==="true",this.receivedThirdPartyCookiesNotification=!0,this.requestToProcess()),this.messagesReceived.push(i))},processIDCallData:function(i){(this.url==null||i.subdomain&&this.subdomain==="nosubdomainreturned")&&(typeof t._subdomain=="string"&&t._subdomain.length?this.subdomain=t._subdomain:this.subdomain=i.subdomain||"",this.url=this.getUrl()),i.ibs instanceof Array&&i.ibs.length&&(this.doAttachIframe=!0),this.readyToAttachIframe()&&(t.idSyncAttachIframeOnWindowLoad?(r.windowLoaded||o.readyState==="complete"||o.readyState==="loaded")&&this.attachIframe():this.attachIframeASAP()),typeof t.idSyncIDCallResult=="function"?t.idSyncIDCallResult(i):this.requestToProcess(i),typeof t.idSyncAfterIDCallResult=="function"&&t.idSyncAfterIDCallResult(i)},canMakeSyncIDCall:function(i,c){return t._forceSyncIDCall||!i||c-i>K.DAYS_BETWEEN_SYNC_ID_CALLS},attachIframeASAP:function(){function i(){c.startedAttachingIframe||(o.body?c.attachIframe():setTimeout(i,30))}var c=this;i()}}},Ct={audienceManagerServer:{},audienceManagerServerSecure:{},cookieDomain:{},cookieLifetime:{},cookieName:{},doesOptInApply:{},disableThirdPartyCalls:{},discardTrackingServerECID:{},idSyncAfterIDCallResult:{},idSyncAttachIframeOnWindowLoad:{},idSyncContainerID:{},idSyncDisable3rdPartySyncing:{},disableThirdPartyCookies:{},idSyncDisableSyncs:{},disableIdSyncs:{},idSyncIDCallResult:{},idSyncSSLUseAkamai:{},isCoopSafe:{},isIabContext:{},isOptInStorageEnabled:{},loadSSL:{},loadTimeout:{},marketingCloudServer:{},marketingCloudServerSecure:{},optInCookieDomain:{},optInStorageExpiry:{},overwriteCrossDomainMCIDAndAID:{},preOptInApprovals:{},previousPermissions:{},resetBeforeVersion:{},sdidParamExpiry:{},serverState:{},sessionCookieName:{},secureCookie:{},takeTimeoutMetrics:{},trackingServer:{},trackingServerSecure:{},whitelistIframeDomains:{},whitelistParentDomain:{}},ht={getConfigNames:function(){return Object.keys(Ct)},getConfigs:function(){return Ct},normalizeConfig:function(t){return typeof t!="function"?t:t()}},Nn=function(t){var r={};return t.on=function(o,i,c){if(!i||typeof i!="function")throw new Error("[ON] Callback should be a function.");r.hasOwnProperty(o)||(r[o]=[]);var l=r[o].push({callback:i,context:c})-1;return function(){r[o].splice(l,1),r[o].length||delete r[o]}},t.off=function(o,i){r.hasOwnProperty(o)&&(r[o]=r[o].filter(function(c){if(c.callback!==i)return c}))},t.publish=function(o){if(r.hasOwnProperty(o)){var i=[].slice.call(arguments,1);r[o].slice(0).forEach(function(c){c.callback.apply(c.context,i)})}},t.publish},le={PENDING:"pending",CHANGED:"changed",COMPLETE:"complete"},_e={AAM:"aam",ADCLOUD:"adcloud",ANALYTICS:"aa",CAMPAIGN:"campaign",ECID:"ecid",LIVEFYRE:"livefyre",TARGET:"target",MEDIA_ANALYTICS:"mediaaa"},He=(Oe={},d(Oe,_e.AAM,565),d(Oe,_e.ECID,565),Oe),Vn=(ke={},d(ke,_e.AAM,[1,2,5]),d(ke,_e.ECID,[1,2,5]),ke),Pe=(function(t){return Object.keys(t).map(function(r){return t[r]})})(_e),It=function(){var t={};return t.callbacks=Object.create(null),t.add=function(r,o){if(!ve(o))throw new Error("[callbackRegistryFactory] Make sure callback is a function or an array of functions.");t.callbacks[r]=t.callbacks[r]||[];var i=t.callbacks[r].push(o)-1;return function(){t.callbacks[r].splice(i,1)}},t.execute=function(r,o){if(t.callbacks[r]){o=o===void 0?[]:o,o=o instanceof Array?o:[o];try{for(;t.callbacks[r].length;){var i=t.callbacks[r].shift();typeof i=="function"?i.apply(null,o):i instanceof Array&&i[1].apply(i[0],o)}delete t.callbacks[r]}catch{}}},t.executeAll=function(r,o){(o||r&&!de(r))&&Object.keys(t.callbacks).forEach(function(i){var c=r[i]!==void 0?r[i]:"";t.execute(i,c)},t)},t.hasCallbacks=function(){return!!Object.keys(t.callbacks).length},t},Fn=function(){},Un=function(t){var r=window,o=r.console;return!!o&&typeof o[t]=="function"},Be=function(t,r,o){return o()?function(){if(Un(t)){for(var i=arguments.length,c=new Array(i),l=0;l<i;l++)c[l]=arguments[l];console[t].apply(console,[r].concat(c))}}:Fn},jn=Ae,Re=new jn("[ADOBE OPT-IN]"),Le=function(t,r){return s(t)===r},We=function(t,r){return t instanceof Array?t:Le(t,"string")?[t]:r||[]},Gn=function(t){var r=Object.keys(t);return!!r.length&&r.every(function(o){return t[o]===!0})},Ye=function(t){return!(!t||Bn(t))&&We(t).every(function(r){return Pe.indexOf(r)>-1})},yt=function(t,r){return t.reduce(function(o,i){return o[i]=r,o},{})},Hn=function(t){return JSON.parse(JSON.stringify(t))},Bn=function(t){return Object.prototype.toString.call(t)==="[object Array]"&&!t.length},St=function(t){if(vt(t))return t;try{return JSON.parse(t)}catch{return{}}},Ke=function(t){return t===void 0||(vt(t)?Ye(Object.keys(t)):Wn(t))},Wn=function(t){try{var r=JSON.parse(t);return!!t&&Le(t,"string")&&Ye(Object.keys(r))}catch{return!1}},vt=function(t){return t!==null&&Le(t,"object")&&Array.isArray(t)===!1},Ee=function(){},Yn=function(t){return Le(t,"function")?t():t},At=function(t,r){Ke(t)||Re.error("".concat(r))},Kn=function(t){return Object.keys(t).map(function(r){return t[r]})},Xn=function(t){return Kn(t).filter(function(r,o,i){return i.indexOf(r)===o})},qn=function(t){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=r.command,i=r.params,c=i===void 0?{}:i,l=r.callback,f=l===void 0?Ee:l;if(!o||o.indexOf(".")===-1)throw new Error("[OptIn.execute] Please provide a valid command.");try{var h=o.split("."),I=t[h[0]],C=h[1];if(!I||typeof I[C]!="function")throw new Error("Make sure the plugin and API name exist.");var m=Object.assign(c,{callback:f});I[C].call(I,m)}catch(b){Re.error("[execute] Something went wrong: "+b.message)}}};me.prototype=Object.create(Error.prototype),me.prototype.constructor=me;var Dt="fetchPermissions",$n="[OptIn#registerPlugin] Plugin is invalid.";De.Categories=_e,De.TimeoutError=me;var Xe=Object.freeze({OptIn:De,IabPlugin:ln}),zn=function(t,r){t.publishDestinations=function(o){var i=arguments[1],c=arguments[2];try{c=typeof c=="function"?c:o.callback}catch{c=function(){}}var l=r;if(!l.readyToAttachIframePreliminary())return void c({error:"The destination publishing iframe is disabled in the Visitor library."});if(typeof o=="string"){if(!o.length)return void c({error:"subdomain is not a populated string."});if(!(i instanceof Array&&i.length))return void c({error:"messages is not a populated array."});var f=!1;if(i.forEach(function(m){typeof m=="string"&&m.length&&(l.addMessage(m),f=!0)}),!f)return void c({error:"None of the messages are populated strings."})}else{if(!N.isObject(o))return void c({error:"Invalid parameters passed."});var h=o;if(typeof(o=h.subdomain)!="string"||!o.length)return void c({error:"config.subdomain is not a populated string."});var I=h.urlDestinations;if(!(I instanceof Array&&I.length))return void c({error:"config.urlDestinations is not a populated array."});var C=[];I.forEach(function(m){N.isObject(m)&&(m.hideReferrer?m.message&&l.addMessage(m.message):C.push(m))}),(function m(){C.length&&setTimeout(function(){var b=new Image,M=C.shift();b.src=M.url,l.onPageDestinationsFired.push(M),m()},100)})()}l.iframe?(c({message:"The destination publishing iframe is already attached and loaded."}),l.requestToProcess()):!t.subdomain&&t._getField("MCMID")?(l.subdomain=o,l.doAttachIframe=!0,l.url=l.getUrl(),l.readyToAttachIframe()?(l.iframeLoadedCallbacks.push(function(m){c({message:"Attempted to attach and load the destination publishing iframe through this API call. Result: "+(m.message||"no result")})}),l.attachIframe()):c({error:"Encountered a problem in attempting to attach and load the destination publishing iframe through this API call."})):l.iframeLoadedCallbacks.push(function(m){c({message:"Attempted to attach and load the destination publishing iframe through normal Visitor API processing. Result: "+(m.message||"no result")})})}},Jn=function t(r){function o(ne,z){return ne>>>z|ne<<32-z}for(var i,c,l=Math.pow,f=l(2,32),h="",I=[],C=8*r.length,m=t.h=t.h||[],b=t.k=t.k||[],M=b.length,v={},e=2;M<64;e++)if(!v[e]){for(i=0;i<313;i+=e)v[i]=e;m[M]=l(e,.5)*f|0,b[M++]=l(e,1/3)*f|0}for(r+="\x80";r.length%64-56;)r+="\0";for(i=0;i<r.length;i++){if((c=r.charCodeAt(i))>>8)return;I[i>>2]|=c<<(3-i)%4*8}for(I[I.length]=C/f|0,I[I.length]=C,c=0;c<I.length;){var A=I.slice(c,c+=16),j=m;for(m=m.slice(0,8),i=0;i<64;i++){var w=A[i-15],G=A[i-2],Y=m[0],X=m[4],$=m[7]+(o(X,6)^o(X,11)^o(X,25))+(X&m[5]^~X&m[6])+b[i]+(A[i]=i<16?A[i]:A[i-16]+(o(w,7)^o(w,18)^w>>>3)+A[i-7]+(o(G,17)^o(G,19)^G>>>10)|0);m=[$+((o(Y,2)^o(Y,13)^o(Y,22))+(Y&m[1]^Y&m[2]^m[1]&m[2]))|0].concat(m),m[4]=m[4]+$|0}for(i=0;i<8;i++)m[i]=m[i]+j[i]|0}for(i=0;i<8;i++)for(c=3;c+1;c--){var U=m[i]>>8*c&255;h+=(U<16?0:"")+U.toString(16)}return h},Et=function(t,r){return r!=="SHA-256"&&r!=="SHA256"&&r!=="sha256"&&r!=="sha-256"||(t=Jn(t)),t},bt=function(t){return String(t).trim().toLowerCase()},Qn=Xe.OptIn;N.defineGlobalNamespace(),window.adobe.OptInCategories=Qn.Categories;var qe=function(t,r,o){function i(n){var a=n;return function(u){var g=u||Y.location.href;try{var y=e._extractParamFromUri(g,a);if(y)return B.parsePipeDelimetedKeyValues(y)}catch{}}}function c(n){function a(u,g,y){u&&u.match(K.VALID_VISITOR_ID_REGEX)&&(y===U&&(G=!0),g(u))}a(n[U],e.setMarketingCloudVisitorID,U),e._setFieldExpire(O,-1),a(n[H],e.setAnalyticsVisitorID)}function l(n){n=n||{},e._supplementalDataIDCurrent=n.supplementalDataIDCurrent||"",e._supplementalDataIDCurrentConsumed=n.supplementalDataIDCurrentConsumed||{},e._supplementalDataIDLast=n.supplementalDataIDLast||"",e._supplementalDataIDLastConsumed=n.supplementalDataIDLastConsumed||{}}function f(n){function a(y,D,E){return E=E&&(E+="|"),E+=y+"="+encodeURIComponent(D)}function u(y,D){var E=D[0],R=D[1];return R!=null&&R!==V&&(y=a(E,R,y)),y}var g=n.reduce(u,"");return(function(y){var D=B.getTimestampInSeconds();return y=y&&(y+="|"),y+="TS="+D})(g)}function h(n){var a=n.minutesToLive,u="";return(e.idSyncDisableSyncs||e.disableIdSyncs)&&(u=u||"Error: id syncs have been disabled"),typeof n.dpid=="string"&&n.dpid.length||(u=u||"Error: config.dpid is empty"),typeof n.url=="string"&&n.url.length||(u=u||"Error: config.url is empty"),a===void 0?a=20160:(a=parseInt(a,10),(isNaN(a)||a<=0)&&(u=u||"Error: config.minutesToLive needs to be a positive number")),{error:u,ttl:a}}function I(){return!!e.configs.doesOptInApply&&!(A.optIn.isComplete&&C())}function C(){return e.configs.doesOptInApply&&e.configs.isIabContext?A.optIn.isApproved(A.optIn.Categories.ECID)&&w:A.optIn.isApproved(A.optIn.Categories.ECID)}function m(){[["getMarketingCloudVisitorID"],["setCustomerIDs",void 0],["getAnalyticsVisitorID"],["getAudienceManagerLocationHint"],["getLocationHint"],["getAudienceManagerBlob"]].forEach(function(n){var a=n[0],u=n.length===2?n[1]:"",g=e[a];e[a]=function(y){return C()&&e.isAllowed()?g.apply(e,arguments):(typeof y=="function"&&e._callCallback(y,[u]),u)}})}function b(n,a){if(w=!0,n)throw new Error("[IAB plugin] : "+n);a.gdprApplies&&(j=a.consentString),e.init(),v()}function M(){A.optIn.isComplete&&(A.optIn.isApproved(A.optIn.Categories.ECID)?e.configs.isIabContext?A.optIn.execute({command:"iabPlugin.fetchConsentData",callback:b}):(e.init(),v()):(m(),v()))}function v(){A.optIn.off("complete",M)}if(!o||o.split("").reverse().join("")!==t)throw new Error("Please use `Visitor.getInstance` to instantiate Visitor.");var e=this,A=window.adobe,j="",w=!1,G=!1;e.version="4.6.0";var Y=k,X=Y.Visitor;X.version=e.version,X.AuthState=Z.AUTH_STATE,X.OptOut=Z.OPT_OUT,Y.s_c_in||(Y.s_c_il=[],Y.s_c_in=0),e._c="Visitor",e._il=Y.s_c_il,e._in=Y.s_c_in,e._il[e._in]=e,Y.s_c_in++,e._instanceType="regular",e._log={requests:[]},e.marketingCloudOrgID=t,e.cookieName="AMCV_"+t,e.sessionCookieName="AMCVS_"+t,e.cookieDomain=pt(),e.loadSSL=!0,e.loadTimeout=3e4,e.CORSErrors=[],e.marketingCloudServer=e.audienceManagerServer="dpm.demdex.net",e.sdidParamExpiry=30;var $=null,U="MCMID",ne="MCIDTS",z="A",H="MCAID",ie="AAM",O="MCAAMB",V="NONE",J=function(n){return!Object.prototype[n]},fe=Ln(e);e.FIELDS=Z.FIELDS,e.cookieRead=function(n){return he.get(n)},e.cookieWrite=function(n,a,u){var g=e.cookieLifetime?(""+e.cookieLifetime).toUpperCase():"",y=!1;return e.configs&&e.configs.secureCookie&&location.protocol==="https:"&&(y=!0),he.set(n,""+a,{expires:u,domain:e.cookieDomain,cookieLifetime:g,secure:y})},e.resetState=function(n){n?e._mergeServerState(n):l()},e._isAllowedDone=!1,e._isAllowedFlag=!1,e.isAllowed=function(){return e._isAllowedDone||(e._isAllowedDone=!0,(e.cookieRead(e.cookieName)||e.cookieWrite(e.cookieName,"T",1))&&(e._isAllowedFlag=!0)),e.cookieRead(e.cookieName)==="T"&&e._helpers.removeCookie(e.cookieName),e._isAllowedFlag},e.setMarketingCloudVisitorID=function(n){e._setMarketingCloudFields(n)},e._use1stPartyMarketingCloudServer=!1,e.getMarketingCloudVisitorID=function(n,a){e.marketingCloudServer&&e.marketingCloudServer.indexOf(".demdex.net")<0&&(e._use1stPartyMarketingCloudServer=!0);var u=e._getAudienceManagerURLData("_setMarketingCloudFields"),g=u.url;return e._getRemoteField(U,g,n,a,u)};var ni=function(n,a){var u={};e.getMarketingCloudVisitorID(function(){a.forEach(function(g){u[g]=e._getField(g,!0)}),a.indexOf("MCOPTOUT")!==-1?e.isOptedOut(function(g){u.MCOPTOUT=g,n(u)},null,!0):n(u)},!0)};e.getVisitorValues=function(n,a){var u={MCMID:{fn:e.getMarketingCloudVisitorID,args:[!0],context:e},MCOPTOUT:{fn:e.isOptedOut,args:[void 0,!0],context:e},MCAID:{fn:e.getAnalyticsVisitorID,args:[!0],context:e},MCAAMLH:{fn:e.getAudienceManagerLocationHint,args:[!0],context:e},MCAAMB:{fn:e.getAudienceManagerBlob,args:[!0],context:e}},g=a&&a.length?N.pluck(u,a):u;a&&a.indexOf("MCAID")===-1?ni(n,a):Pn(g,n)},e._currentCustomerIDs={},e._customerIDsHashChanged=!1,e._newCustomerIDsHash="",e.setCustomerIDs=function(n,a){function u(){e._customerIDsHashChanged=!1}if(!e.isOptedOut()&&n){if(!N.isObject(n)||N.isObjectEmpty(n))return!1;e._readVisitor();var g,y,D;for(g in n)if(J(g)&&(y=n[g],a=y.hasOwnProperty("hashType")?y.hashType:a,y))if(s(y)==="object"){var E={};if(y.id){if(a){if(!(D=Et(bt(y.id),a)))return;y.id=D,E.hashType=a}E.id=y.id}y.authState!=null&&(E.authState=y.authState),e._currentCustomerIDs[g]=E}else if(a){if(!(D=Et(bt(y),a)))return;e._currentCustomerIDs[g]={id:D,hashType:a}}else e._currentCustomerIDs[g]={id:y};var R=e.getCustomerIDs(),T=e._getField("MCCIDH"),q="";T||(T=0);for(g in R)J(g)&&(y=R[g],q+=(q?"|":"")+g+"|"+(y.id?y.id:"")+(y.authState?y.authState:""));e._newCustomerIDsHash=String(e._hash(q)),e._newCustomerIDsHash!==T&&(e._customerIDsHashChanged=!0,e._mapCustomerIDs(u))}},e.getCustomerIDs=function(){e._readVisitor();var n,a,u={};for(n in e._currentCustomerIDs)J(n)&&(a=e._currentCustomerIDs[n],a.id&&(u[n]||(u[n]={}),u[n].id=a.id,a.authState!=null?u[n].authState=a.authState:u[n].authState=X.AuthState.UNKNOWN,a.hashType&&(u[n].hashType=a.hashType)));return u},e.setAnalyticsVisitorID=function(n){e._setAnalyticsFields(n)},e.getAnalyticsVisitorID=function(n,a,u){if(!B.isTrackingServerPopulated()&&!u)return e._callCallback(n,[""]),"";var g="";if(u||(g=e.getMarketingCloudVisitorID(function(se){e.getAnalyticsVisitorID(n,!0)})),g||u){var y=u?e.marketingCloudServer:e.trackingServer,D="";e.loadSSL&&(u?e.marketingCloudServerSecure&&(y=e.marketingCloudServerSecure):e.trackingServerSecure&&(y=e.trackingServerSecure));var E={};if(y){var R="http"+(e.loadSSL?"s":"")+"://"+y+"/id",T="d_visid_ver="+e.version+"&mcorgid="+encodeURIComponent(e.marketingCloudOrgID)+(g?"&mid="+encodeURIComponent(g):"")+(e.idSyncDisable3rdPartySyncing||e.disableThirdPartyCookies?"&d_coppa=true":""),q=["s_c_il",e._in,"_set"+(u?"MarketingCloud":"Analytics")+"Fields"];D=R+"?"+T+"&callback=s_c_il%5B"+e._in+"%5D._set"+(u?"MarketingCloud":"Analytics")+"Fields",E.corsUrl=R+"?"+T,E.callback=q}return E.url=D,e._getRemoteField(u?U:H,D,n,a,E)}return""},e.getAudienceManagerLocationHint=function(n,a){if(e.getMarketingCloudVisitorID(function(D){e.getAudienceManagerLocationHint(n,!0)})){var u=e._getField(H);if(!u&&B.isTrackingServerPopulated()&&(u=e.getAnalyticsVisitorID(function(D){e.getAudienceManagerLocationHint(n,!0)})),u||!B.isTrackingServerPopulated()){var g=e._getAudienceManagerURLData(),y=g.url;return e._getRemoteField("MCAAMLH",y,n,a,g)}}return""},e.getLocationHint=e.getAudienceManagerLocationHint,e.getAudienceManagerBlob=function(n,a){if(e.getMarketingCloudVisitorID(function(D){e.getAudienceManagerBlob(n,!0)})){var u=e._getField(H);if(!u&&B.isTrackingServerPopulated()&&(u=e.getAnalyticsVisitorID(function(D){e.getAudienceManagerBlob(n,!0)})),u||!B.isTrackingServerPopulated()){var g=e._getAudienceManagerURLData(),y=g.url;return e._customerIDsHashChanged&&e._setFieldExpire(O,-1),e._getRemoteField(O,y,n,a,g)}}return""},e._supplementalDataIDCurrent="",e._supplementalDataIDCurrentConsumed={},e._supplementalDataIDLast="",e._supplementalDataIDLastConsumed={},e.getSupplementalDataID=function(n,a){e._supplementalDataIDCurrent||a||(e._supplementalDataIDCurrent=e._generateID(1));var u=e._supplementalDataIDCurrent;return e._supplementalDataIDLast&&!e._supplementalDataIDLastConsumed[n]?(u=e._supplementalDataIDLast,e._supplementalDataIDLastConsumed[n]=!0):u&&(e._supplementalDataIDCurrentConsumed[n]&&(e._supplementalDataIDLast=e._supplementalDataIDCurrent,e._supplementalDataIDLastConsumed=e._supplementalDataIDCurrentConsumed,e._supplementalDataIDCurrent=u=a?"":e._generateID(1),e._supplementalDataIDCurrentConsumed={}),u&&(e._supplementalDataIDCurrentConsumed[n]=!0)),u};var xe=!1;e._liberatedOptOut=null,e.getOptOut=function(n,a){var u=e._getAudienceManagerURLData("_setMarketingCloudFields"),g=u.url;if(C())return e._getRemoteField("MCOPTOUT",g,n,a,u);if(e._registerCallback("liberatedOptOut",n),e._liberatedOptOut!==null)return e._callAllCallbacks("liberatedOptOut",[e._liberatedOptOut]),xe=!1,e._liberatedOptOut;if(xe)return null;xe=!0;var y="liberatedGetOptOut";return u.corsUrl=u.corsUrl.replace(/dpm\.demdex\.net\/id\?/,"dpm.demdex.net/optOutStatus?"),u.callback=[y],k[y]=function(D){if(D===Object(D)){var E,R,T=N.parseOptOut(D,E,V);E=T.optOut,R=1e3*T.d_ottl,e._liberatedOptOut=E,setTimeout(function(){e._liberatedOptOut=null},R)}e._callAllCallbacks("liberatedOptOut",[E]),xe=!1},fe.fireCORS(u),null},e.isOptedOut=function(n,a,u){a||(a=X.OptOut.GLOBAL);var g=e.getOptOut(function(y){var D=y===X.OptOut.GLOBAL||y.indexOf(a)>=0;e._callCallback(n,[D])},u);return g?g===X.OptOut.GLOBAL||g.indexOf(a)>=0:null},e._fields=null,e._fieldsExpired=null,e._hash=function(n){var a,u,g=0;if(n)for(a=0;a<n.length;a++)u=n.charCodeAt(a),g=(g<<5)-g+u,g&=g;return g},e._generateID=Rn,e._generateLocalMID=function(){var n=e._generateID(0);return ae.isClientSideMarketingCloudVisitorID=!0,n},e._callbackList=null,e._callCallback=function(n,a){try{typeof n=="function"?n.apply(Y,a):n[1].apply(n[0],a)}catch{}},e._registerCallback=function(n,a){a&&(e._callbackList==null&&(e._callbackList={}),e._callbackList[n]==null&&(e._callbackList[n]=[]),e._callbackList[n].push(a))},e._callAllCallbacks=function(n,a){if(e._callbackList!=null){var u=e._callbackList[n];if(u)for(;u.length>0;)e._callCallback(u.shift(),a)}},e._addQuerystringParam=function(n,a,u,g){var y=encodeURIComponent(a)+"="+encodeURIComponent(u),D=B.parseHash(n),E=B.hashlessUrl(n);if(E.indexOf("?")===-1)return E+"?"+y+D;var R=E.split("?"),T=R[0]+"?",q=R[1];return T+B.addQueryParamAtLocation(q,y,g)+D},e._extractParamFromUri=function(n,a){var u=new RegExp("[\\?&#]"+a+"=([^&#]*)"),g=u.exec(n);if(g&&g.length)return decodeURIComponent(g[1])},e._parseAdobeMcFromUrl=i(K.ADOBE_MC),e._parseAdobeMcSdidFromUrl=i(K.ADOBE_MC_SDID),e._attemptToPopulateSdidFromUrl=function(n){var a=e._parseAdobeMcSdidFromUrl(n),u=1e9;a&&a.TS&&(u=B.getTimestampInSeconds()-a.TS),a&&a.SDID&&a.MCORGID===t&&u<e.sdidParamExpiry&&(e._supplementalDataIDCurrent=a.SDID,e._supplementalDataIDCurrentConsumed.SDID_URL_PARAM=!0)},e._attemptToPopulateIdsFromUrl=function(){var n=e._parseAdobeMcFromUrl();if(n&&n.TS){var a=B.getTimestampInSeconds(),u=a-n.TS;if(Math.floor(u/60)>K.ADOBE_MC_TTL_IN_MIN||n.MCORGID!==t)return;c(n)}},e._mergeServerState=function(n){if(n)try{if(n=(function(u){return B.isObject(u)?u:JSON.parse(u)})(n),n[e.marketingCloudOrgID]){var a=n[e.marketingCloudOrgID];(function(u){B.isObject(u)&&e.setCustomerIDs(u)})(a.customerIDs),l(a.sdid)}}catch{throw new Error("`serverState` has an invalid format.")}},e._timeout=null,e._loadData=function(n,a,u,g){a=e._addQuerystringParam(a,"d_fieldgroup",n,1),g.url=e._addQuerystringParam(g.url,"d_fieldgroup",n,1),g.corsUrl=e._addQuerystringParam(g.corsUrl,"d_fieldgroup",n,1),ae.fieldGroupObj[n]=!0,g===Object(g)&&g.corsUrl&&fe.corsMetadata.corsType==="XMLHttpRequest"&&fe.fireCORS(g,u,n)},e._clearTimeout=function(n){e._timeout!=null&&e._timeout[n]&&(clearTimeout(e._timeout[n]),e._timeout[n]=0)},e._settingsDigest=0,e._getSettingsDigest=function(){if(!e._settingsDigest){var n=e.version;e.audienceManagerServer&&(n+="|"+e.audienceManagerServer),e.audienceManagerServerSecure&&(n+="|"+e.audienceManagerServerSecure),e._settingsDigest=e._hash(n)}return e._settingsDigest},e._readVisitorDone=!1,e._readVisitor=function(){if(!e._readVisitorDone){e._readVisitorDone=!0;var n,a,u,g,y,D,E=e._getSettingsDigest(),R=!1,T=e.cookieRead(e.cookieName),q=new Date;if(T||G||e.discardTrackingServerECID||(T=e.cookieRead(K.FIRST_PARTY_SERVER_COOKIE)),e._fields==null&&(e._fields={}),T&&T!=="T")for(T=T.split("|"),T[0].match(/^[\-0-9]+$/)&&(parseInt(T[0],10)!==E&&(R=!0),T.shift()),T.length%2==1&&T.pop(),n=0;n<T.length;n+=2)a=T[n].split("-"),u=a[0],g=T[n+1],a.length>1?(y=parseInt(a[1],10),D=a[1].indexOf("s")>0):(y=0,D=!1),R&&(u==="MCCIDH"&&(g=""),y>0&&(y=q.getTime()/1e3-60)),u&&g&&(e._setField(u,g,1),y>0&&(e._fields["expire"+u]=y+(D?"s":""),(q.getTime()>=1e3*y||D&&!e.cookieRead(e.sessionCookieName))&&(e._fieldsExpired||(e._fieldsExpired={}),e._fieldsExpired[u]=!0)));!e._getField(H)&&B.isTrackingServerPopulated()&&(T=e.cookieRead("s_vi"))&&(T=T.split("|"),T.length>1&&T[0].indexOf("v1")>=0&&(g=T[1],n=g.indexOf("["),n>=0&&(g=g.substring(0,n)),g&&g.match(K.VALID_VISITOR_ID_REGEX)&&e._setField(H,g)))}},e._appendVersionTo=function(n){var a="vVersion|"+e.version,u=n?e._getCookieVersion(n):null;return u?mt.areVersionsDifferent(u,e.version)&&(n=n.replace(K.VERSION_REGEX,a)):n+=(n?"|":"")+a,n},e._writeVisitor=function(){var n,a,u=e._getSettingsDigest();for(n in e._fields)J(n)&&e._fields[n]&&n.substring(0,6)!=="expire"&&(a=e._fields[n],u+=(u?"|":"")+n+(e._fields["expire"+n]?"-"+e._fields["expire"+n]:"")+"|"+a);u=e._appendVersionTo(u),e.cookieWrite(e.cookieName,u,1)},e._getField=function(n,a){return e._fields==null||!a&&e._fieldsExpired&&e._fieldsExpired[n]?null:e._fields[n]},e._setField=function(n,a,u){e._fields==null&&(e._fields={}),e._fields[n]=a,u||e._writeVisitor()},e._getFieldList=function(n,a){var u=e._getField(n,a);return u?u.split("*"):null},e._setFieldList=function(n,a,u){e._setField(n,a?a.join("*"):"",u)},e._getFieldMap=function(n,a){var u=e._getFieldList(n,a);if(u){var g,y={};for(g=0;g<u.length;g+=2)y[u[g]]=u[g+1];return y}return null},e._setFieldMap=function(n,a,u){var g,y=null;if(a){y=[];for(g in a)J(g)&&(y.push(g),y.push(a[g]))}e._setFieldList(n,y,u)},e._setFieldExpire=function(n,a,u){var g=new Date;g.setTime(g.getTime()+1e3*a),e._fields==null&&(e._fields={}),e._fields["expire"+n]=Math.floor(g.getTime()/1e3)+(u?"s":""),a<0?(e._fieldsExpired||(e._fieldsExpired={}),e._fieldsExpired[n]=!0):e._fieldsExpired&&(e._fieldsExpired[n]=!1),u&&(e.cookieRead(e.sessionCookieName)||e.cookieWrite(e.sessionCookieName,"1"))},e._findVisitorID=function(n){return n&&(s(n)==="object"&&(n=n.d_mid?n.d_mid:n.visitorID?n.visitorID:n.id?n.id:n.uuid?n.uuid:""+n),n&&(n=n.toUpperCase())==="NOTARGET"&&(n=V),n&&(n===V||n.match(K.VALID_VISITOR_ID_REGEX))||(n="")),n},e._setFields=function(n,a){if(e._clearTimeout(n),e._loading!=null&&(e._loading[n]=!1),ae.fieldGroupObj[n]&&ae.setState(n,!1),n==="MC"){ae.isClientSideMarketingCloudVisitorID!==!0&&(ae.isClientSideMarketingCloudVisitorID=!1);var u=e._getField(U);if(!u||e.overwriteCrossDomainMCIDAndAID){if(!(u=s(a)==="object"&&a.mid?a.mid:e._findVisitorID(a))){if(e._use1stPartyMarketingCloudServer&&!e.tried1stPartyMarketingCloudServer)return e.tried1stPartyMarketingCloudServer=!0,void e.getAnalyticsVisitorID(null,!1,!0);u=e._generateLocalMID()}e._setField(U,u)}u&&u!==V||(u=""),s(a)==="object"&&((a.d_region||a.dcs_region||a.d_blob||a.blob)&&e._setFields(ie,a),e._use1stPartyMarketingCloudServer&&a.mid&&e._setFields(z,{id:a.id})),e._callAllCallbacks(U,[u])}if(n===ie&&s(a)==="object"){var g=604800;a.id_sync_ttl!=null&&a.id_sync_ttl&&(g=parseInt(a.id_sync_ttl,10));var y=re.getRegionAndCheckIfChanged(a,g);e._callAllCallbacks("MCAAMLH",[y]);var D=e._getField(O);(a.d_blob||a.blob)&&(D=a.d_blob,D||(D=a.blob),e._setFieldExpire(O,g),e._setField(O,D)),D||(D=""),e._callAllCallbacks(O,[D]),!a.error_msg&&e._newCustomerIDsHash&&e._setField("MCCIDH",e._newCustomerIDsHash)}if(n===z){var E=e._getField(H);E&&!e.overwriteCrossDomainMCIDAndAID||(E=e._findVisitorID(a),E?E!==V&&e._setFieldExpire(O,-1):E=V,e._setField(H,E)),E&&E!==V||(E=""),e._callAllCallbacks(H,[E])}if(e.idSyncDisableSyncs||e.disableIdSyncs)re.idCallNotProcesssed=!0;else{re.idCallNotProcesssed=!1;var R={};R.ibs=a.ibs,R.subdomain=a.subdomain,re.processIDCallData(R)}if(a===Object(a)){var T,q;C()&&e.isAllowed()&&(T=e._getField("MCOPTOUT"));var se=N.parseOptOut(a,T,V);T=se.optOut,q=se.d_ottl,e._setFieldExpire("MCOPTOUT",q,!0),e._setField("MCOPTOUT",T),e._callAllCallbacks("MCOPTOUT",[T])}},e._loading=null,e._getRemoteField=function(n,a,u,g,y){var D,E="",R=B.isFirstPartyAnalyticsVisitorIDCall(n),T={MCAAMLH:!0,MCAAMB:!0};if(C()&&e.isAllowed())if(e._readVisitor(),E=e._getField(n,T[n]===!0),(function(){return(!E||e._fieldsExpired&&e._fieldsExpired[n])&&(!e.disableThirdPartyCalls||R)})()){if(n===U||n==="MCOPTOUT"?D="MC":n==="MCAAMLH"||n===O?D=ie:n===H&&(D=z),D)return!a||e._loading!=null&&e._loading[D]||(e._loading==null&&(e._loading={}),e._loading[D]=!0,e._loadData(D,a,function(q){if(!e._getField(n)){q&&ae.setState(D,!0);var se="";n===U?se=e._generateLocalMID():D===ie&&(se={error_msg:"timeout"}),e._setFields(D,se)}},y)),e._registerCallback(n,u),E||(a||e._setFields(D,{id:V}),"")}else E||(n===U?(e._registerCallback(n,u),E=e._generateLocalMID(),e.setMarketingCloudVisitorID(E)):n===H?(e._registerCallback(n,u),E="",e.setAnalyticsVisitorID(E)):(E="",g=!0));return n!==U&&n!==H||E!==V||(E="",g=!0),u&&g&&e._callCallback(u,[E]),E},e._setMarketingCloudFields=function(n){e._readVisitor(),e._setFields("MC",n)},e._mapCustomerIDs=function(n){e.getAudienceManagerBlob(n,!0)},e._setAnalyticsFields=function(n){e._readVisitor(),e._setFields(z,n)},e._setAudienceManagerFields=function(n){e._readVisitor(),e._setFields(ie,n)},e._getAudienceManagerURLData=function(n){var a=e.audienceManagerServer,u="",g=e._getField(U),y=e._getField(O,!0),D=e._getField(H),E=D&&D!==V?"&d_cid_ic=AVID%01"+encodeURIComponent(D):"";if(e.loadSSL&&e.audienceManagerServerSecure&&(a=e.audienceManagerServerSecure),a){var R,T,q=e.getCustomerIDs();if(q)for(R in q)J(R)&&(T=q[R],E+="&d_cid_ic="+encodeURIComponent(R)+"%01"+encodeURIComponent(T.id?T.id:"")+(T.authState?"%01"+T.authState:""));n||(n="_setAudienceManagerFields");var se="http"+(e.loadSSL?"s":"")+"://"+a+"/id",Mt="d_visid_ver="+e.version+(j&&se.indexOf("demdex.net")!==-1?"&gdpr=1&gdpr_force=1&gdpr_consent="+j:"")+"&d_rtbd=json&d_ver=2"+(!g&&e._use1stPartyMarketingCloudServer?"&d_verify=1":"")+"&d_orgid="+encodeURIComponent(e.marketingCloudOrgID)+"&d_nsid="+(e.idSyncContainerID||0)+(g?"&d_mid="+encodeURIComponent(g):"")+(e.idSyncDisable3rdPartySyncing||e.disableThirdPartyCookies?"&d_coppa=true":"")+($===!0?"&d_coop_safe=1":$===!1?"&d_coop_unsafe=1":"")+(y?"&d_blob="+encodeURIComponent(y):"")+E,ii=["s_c_il",e._in,n];return u=se+"?"+Mt+"&d_cb=s_c_il%5B"+e._in+"%5D."+n,{url:u,corsUrl:se+"?"+Mt,callback:ii}}return{url:u}},e.appendVisitorIDsTo=function(n){try{var a=[[U,e._getField(U)],[H,e._getField(H)],["MCORGID",e.marketingCloudOrgID]];return e._addQuerystringParam(n,K.ADOBE_MC,f(a))}catch{return n}},e.appendSupplementalDataIDTo=function(n,a){if(!(a=a||e.getSupplementalDataID(B.generateRandomString(),!0)))return n;try{var u=f([["SDID",a],["MCORGID",e.marketingCloudOrgID]]);return e._addQuerystringParam(n,K.ADOBE_MC_SDID,u)}catch{return n}};var B={parseHash:function(n){var a=n.indexOf("#");return a>0?n.substr(a):""},hashlessUrl:function(n){var a=n.indexOf("#");return a>0?n.substr(0,a):n},addQueryParamAtLocation:function(n,a,u){var g=n.split("&");return u=u??g.length,g.splice(u,0,a),g.join("&")},isFirstPartyAnalyticsVisitorIDCall:function(n,a,u){if(n!==H)return!1;var g;return a||(a=e.trackingServer),u||(u=e.trackingServerSecure),!(typeof(g=e.loadSSL?u:a)!="string"||!g.length)&&g.indexOf("2o7.net")<0&&g.indexOf("omtrdc.net")<0},isObject:function(n){return!!(n&&n===Object(n))},removeCookie:function(n){he.remove(n,{domain:e.cookieDomain})},isTrackingServerPopulated:function(){return!!e.trackingServer||!!e.trackingServerSecure},getTimestampInSeconds:function(){return Math.round(new Date().getTime()/1e3)},parsePipeDelimetedKeyValues:function(n){return n.split("|").reduce(function(a,u){var g=u.split("=");return a[g[0]]=decodeURIComponent(g[1]),a},{})},generateRandomString:function(n){n=n||5;for(var a="",u="abcdefghijklmnopqrstuvwxyz0123456789";n--;)a+=u[Math.floor(Math.random()*u.length)];return a},normalizeBoolean:function(n){return n==="true"||n!=="false"&&n},parseBoolean:function(n){return n==="true"||n!=="false"&&null},replaceMethodsWithFunction:function(n,a){for(var u in n)n.hasOwnProperty(u)&&typeof n[u]=="function"&&(n[u]=a);return n}};e._helpers=B;var re=xn(e,X);e._destinationPublishing=re,e.timeoutMetricsLog=[];var ae={isClientSideMarketingCloudVisitorID:null,MCIDCallTimedOut:null,AnalyticsIDCallTimedOut:null,AAMIDCallTimedOut:null,fieldGroupObj:{},setState:function(n,a){switch(n){case"MC":a===!1?this.MCIDCallTimedOut!==!0&&(this.MCIDCallTimedOut=!1):this.MCIDCallTimedOut=a;break;case z:a===!1?this.AnalyticsIDCallTimedOut!==!0&&(this.AnalyticsIDCallTimedOut=!1):this.AnalyticsIDCallTimedOut=a;break;case ie:a===!1?this.AAMIDCallTimedOut!==!0&&(this.AAMIDCallTimedOut=!1):this.AAMIDCallTimedOut=a}}};e.isClientSideMarketingCloudVisitorID=function(){return ae.isClientSideMarketingCloudVisitorID},e.MCIDCallTimedOut=function(){return ae.MCIDCallTimedOut},e.AnalyticsIDCallTimedOut=function(){return ae.AnalyticsIDCallTimedOut},e.AAMIDCallTimedOut=function(){return ae.AAMIDCallTimedOut},e.idSyncGetOnPageSyncInfo=function(){return e._readVisitor(),e._getField("MCSYNCSOP")},e.idSyncByURL=function(n){if(!e.isOptedOut()){var a=h(n||{});if(a.error)return a.error;var u,g,y=n.url,D=encodeURIComponent,E=re;return y=y.replace(/^https:/,"").replace(/^http:/,""),u=N.encodeAndBuildRequest(["",n.dpid,n.dpuuid||""],","),g=["ibs",D(n.dpid),"img",D(y),a.ttl,"",u],E.addMessage(g.join("|")),E.requestToProcess(),"Successfully queued"}},e.idSyncByDataSource=function(n){if(!e.isOptedOut())return n===Object(n)&&typeof n.dpuuid=="string"&&n.dpuuid.length?(n.url="//dpm.demdex.net/ibs:dpid="+n.dpid+"&dpuuid="+n.dpuuid,e.idSyncByURL(n)):"Error: config or config.dpuuid is empty"},zn(e,re),e._getCookieVersion=function(n){n=n||e.cookieRead(e.cookieName);var a=K.VERSION_REGEX.exec(n);return a&&a.length>1?a[1]:null},e._resetAmcvCookie=function(n){var a=e._getCookieVersion();a&&!mt.isLessThan(a,n)||B.removeCookie(e.cookieName)},e.setAsCoopSafe=function(){$=!0},e.setAsCoopUnsafe=function(){$=!1},(function(){if(e.configs=Object.create(null),B.isObject(r))for(var n in r)J(n)&&(e[n]=r[n],e.configs[n]=r[n])})(),m();var Tt;e.init=function(){I()&&(A.optIn.fetchPermissions(M,!0),!A.optIn.isApproved(A.optIn.Categories.ECID))||Tt||(Tt=!0,(function(){if(B.isObject(r)){e.idSyncContainerID=e.idSyncContainerID||0,$=typeof e.isCoopSafe=="boolean"?e.isCoopSafe:B.parseBoolean(e.isCoopSafe),e.resetBeforeVersion&&e._resetAmcvCookie(e.resetBeforeVersion),e._attemptToPopulateIdsFromUrl(),e._attemptToPopulateSdidFromUrl(),e._readVisitor();var n=e._getField(ne),a=Math.ceil(new Date().getTime()/K.MILLIS_PER_DAY);e.idSyncDisableSyncs||e.disableIdSyncs||!re.canMakeSyncIDCall(n,a)||(e._setFieldExpire(O,-1),e._setField(ne,a)),e.getMarketingCloudVisitorID(),e.getAudienceManagerLocationHint(),e.getAudienceManagerBlob(),e._mergeServerState(e.serverState)}else e._attemptToPopulateIdsFromUrl(),e._attemptToPopulateSdidFromUrl()})(),(function(){if(!e.idSyncDisableSyncs&&!e.disableIdSyncs){re.checkDPIframeSrc();var n=function(){var a=re;a.readyToAttachIframe()&&a.attachIframe()};Y.addEventListener("load",function(){X.windowLoaded=!0,n()});try{Ge.receiveMessage(function(a){re.receiveMessage(a.data)},re.iframeHost)}catch{}}})(),(function(){e.whitelistIframeDomains&&K.POST_MESSAGE_ENABLED&&(e.whitelistIframeDomains=e.whitelistIframeDomains instanceof Array?e.whitelistIframeDomains:[e.whitelistIframeDomains],e.whitelistIframeDomains.forEach(function(n){var a=new lt(t,n),u=wn(e,a);Ge.receiveMessage(u,n)}))})())}};qe.config=ht,k.Visitor=qe;var Ie=qe,Zn=function(t){if(N.isObject(t))return Object.keys(t).filter(function(r){return t[r]!==""}).reduce(function(r,o){var i=ht.normalizeConfig(t[o]),c=N.normalizeBoolean(i);return r[o]=c,r},Object.create(null))},ei=Xe.OptIn,ti=Xe.IabPlugin;return Ie.getInstance=function(t,r){if(!t)throw new Error("Visitor requires Adobe Marketing Cloud Org ID.");t.indexOf("@")<0&&(t+="@AdobeOrg");var o=(function(){var C=k.s_c_il;if(C)for(var m=0;m<C.length;m++){var b=C[m];if(b&&b._c==="Visitor"&&b.marketingCloudOrgID===t)return b}})();if(o)return o;var i=Zn(r);(function(C){k.adobe.optIn=k.adobe.optIn||(function(){var m=N.pluck(C,["doesOptInApply","previousPermissions","preOptInApprovals","isOptInStorageEnabled","optInStorageExpiry","isIabContext"]),b=C.optInCookieDomain||C.cookieDomain;b=b||pt(),b=b===window.location.hostname?"":b,m.optInCookieDomain=b;var M=new ei(m,{cookies:he});if(m.isIabContext&&m.doesOptInApply){var v=new ti(window.__cmp);M.registerPlugin(v)}return M})()})(i||{});var c=t,l=c.split("").reverse().join(""),f=new Ie(t,null,l);N.isObject(i)&&i.cookieDomain&&(f.cookieDomain=i.cookieDomain),(function(){k.s_c_il.splice(--k.s_c_in,1)})();var h=N.getIeVersion();if(typeof h=="number"&&h<10)return f._helpers.replaceMethodsWithFunction(f,function(){});var I=(function(){try{return k.self!==k.parent}catch{return!0}})()&&!(function(C){return C.cookieWrite("TEST_AMCV_COOKIE","T",1),C.cookieRead("TEST_AMCV_COOKIE")==="T"&&(C._helpers.removeCookie("TEST_AMCV_COOKIE"),!0)})(f)&&k.parent?new Mn(t,i,f,k.parent):new Ie(t,i,l);return f=null,I.init(),I},(function(){function t(){Ie.windowLoaded=!0}k.addEventListener?k.addEventListener("load",t):k.attachEvent&&k.attachEvent("onload",t),Ie.codeLoadEnd=new Date().getTime()})(),Ie})()});var ye="__mpi",te=typeof window<"u",kt=()=>te?window:void 0;function W(s){let p=kt()?.[ye]?.segmentWrapper||{};return s?p[s]:p}var ge=(s,d)=>{let p=kt();if(!p){console.warn("[segment-wrapper] Cannot set config in non-browser environment");return}p[ye]=p[ye]||{},p[ye].segmentWrapper=p[ye].segmentWrapper||{},p[ye].segmentWrapper[s]=d};var be,$e=()=>({ADOBE_ORG_ID:window.__SEGMENT_WRAPPER?.ADOBE_ORG_ID,DEFAULT_DEMDEX_VERSION:window.__SEGMENT_WRAPPER?.DEFAULT_DEMDEX_VERSION??"3.3.0",TIME_BETWEEN_RETRIES:window.__SEGMENT_WRAPPER?.TIME_BETWEEN_RETRIES??15,TIMES_TO_RETRY:window.__SEGMENT_WRAPPER?.TIMES_TO_RETRY??80,SERVERS:{trackingServer:window.__SEGMENT_WRAPPER?.TRACKING_SERVER,trackingServerSecure:window.__SEGMENT_WRAPPER?.TRACKING_SERVER}}),Pt=()=>{let s=$e();if(window.Visitor&&s.ADOBE_ORG_ID)return window.Visitor.getInstance(s.ADOBE_ORG_ID,s.SERVERS)},fi=s=>s?.getMarketingCloudVisitorID(),Rt=()=>{let s=Pt(),d=$e(),p=s?.version??d.DEFAULT_DEMDEX_VERSION,{trackingServer:_}=d.SERVERS;return Promise.resolve({trackingServer:_,version:p})},Lt=()=>{if(be)return Promise.resolve(be);let s=$e();return new Promise(d=>{function p(_){if(_===0)return d("");let S=Pt();be=fi(S),be?d(be):window.setTimeout(()=>p(--_),s.TIME_BETWEEN_RETRIES)}p(s.TIMES_TO_RETRY)})},gi=async()=>(await Promise.resolve().then(()=>li(wt())),Lt()),Ne=async()=>{let s=W("getCustomAdobeVisitorId");return typeof s=="function"?s():W("importAdobeVisitorId")===!0?gi():Lt()};var pi="borosTcf",mi=2,_i={channel:"GDPR"},xt={analytics:[1,8,10],advertising:[3]},ze={LOADED:"tcloaded",USER_ACTION_COMPLETE:"useractioncomplete"},Ci="CMP Submitted",ee={ACCEPTED:"accepted",DECLINED:"declined",UNKNOWN:"unknown"},ce={listeners:[],value:void 0,addListener:s=>ce.listeners.push(s),get:()=>ce.value,set:s=>{let{analytics:d,advertising:p}=s||{};ce.value={analytics:d,advertising:p},ce.listeners.forEach(_=>_(s)),ce.listeners=[]}};function hi(s){if(!te)return null;let p=new RegExp(s+"=([^;]+)").exec(document.cookie);return p!==null?unescape(p[1]):null}var Ii=()=>{if(W("initialized"))return!1;let s=!!window.__tcfapi;return s||console.warn("[tcfTracking] window.__tcfapi is not available on client and TCF won't be tracked."),s},yi=s=>xt.analytics.every(d=>s[`${d}`]),Si=s=>xt.advertising.every(d=>s[`${d}`]),vi=({gdprPrivacy:s})=>{let d=s.analytics===ee.ACCEPTED,p=s.advertising===ee.ACCEPTED;return Ve.track(Ci,{..._i,...W("tcfTrackDefaultProperties")||{},google_consents:{analytics_storage:d?"granted":"denied",ad_storage:p?"granted":"denied",ad_user_data:p?"granted":"denied",ad_personalization:p?"granted":"denied"}},{gdpr_privacy:s.analytics,gdpr_privacy_advertising:s.advertising})},Se=()=>{let s=ce.get();return s!==void 0?Promise.resolve(s):new Promise(d=>{ce.addListener(p=>d(p))})},Nt=()=>ce.get(),Ce=s=>s?.analytics===ee.ACCEPTED,Vt=s=>{let d=yi(s),p=Si(s),_=d?ee.ACCEPTED:ee.DECLINED,S=p?ee.ACCEPTED:ee.DECLINED;return ce.set({analytics:_,advertising:S}),{analytics:_,advertising:S}},Ft=()=>{let s=hi(pi);if(s)try{let{purpose:d}=JSON.parse(window.atob(s)),{consents:p}=d;return p}catch(d){console.error(d);return}},Ai=()=>{let s=Ft();s&&Vt(s)},Di=()=>{let s=Ft();ge("isFirstVisit",!s)};function Je(){if(te){if(Ai(),Di(),!Ii()){ce.get()?.analytics===void 0&&ce.set({analytics:ee.UNKNOWN,advertising:ee.UNKNOWN});return}ge("initialized",!0),window.__tcfapi?.("addEventListener",mi,({eventStatus:s,purpose:d},p)=>{if(!p)return Promise.resolve();if(s===ze.USER_ACTION_COMPLETE||s===ze.LOADED){let{consents:_}=d,S=Vt(_);if(s===ze.USER_ACTION_COMPLETE){let{analytics:P,advertising:L}=S;vi({gdprPrivacy:{analytics:P,advertising:L}})}}})}}function Ut(s){if(typeof document>"u")return null;let p=new RegExp(`${s}=([^;]+)`).exec(document.cookie);return p!==null?unescape(p[1]):null}function jt(s,d,p={}){if(typeof document>"u"||typeof window>"u")return;let{maxAge:_=31536e3,path:S="/",reduceDomain:P=!0,sameSite:L="Lax"}=p,x=P?Ht():window.location.hostname,de=[`${s}=${d}`,`domain=${x}`,`path=${S}`,`max-age=${_}`,`SameSite=${L}`].join(";");document.cookie=de}function Gt(s,d={}){if(typeof document>"u"||typeof window>"u")return;let{path:p="/",reduceDomain:_=!0}=d,S=_?Ht():window.location.hostname;document.cookie=`${s}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=${p}; domain=${S}`}var Ht=s=>{let d=s!==void 0?s:typeof window<"u"?window.location.hostname:"",p=".",_=d.split(p).reverse();if(_.length===1)return _[0];let S=[];for(let P of _)if(S.push(P),P.length>3)break;return`${p}${S.reverse().join(p)}`};var Ei="https://secure.adnxs.com/getuidj?consent=1",Qe="adit-xandr-id",bi=0;function Ti(){return te?window.fetch(Ei,{credentials:"include"}).then(s=>s.json()).then(s=>s?.uid).catch(()=>null):Promise.resolve(null)}function Bt({gdprPrivacyValueAdvertising:s}){if(!te)return null;if(s!==ee.ACCEPTED)return Gt(Qe),null;let d=S=>S!==null&&Number(S)>bi,p=Ut(Qe),_=d(p);return _||Ti().then(S=>{typeof S=="string"&&jt(Qe,S)}),ge("xandrId",p),_?p:null}var Mi={platform:"web"},Oi={All:!1},ki={All:!0},wi=s=>{let d=W("userIdPrefix");return d&&(typeof s=="number"||typeof s=="string"&&!s.startsWith(d))?`${d}${s}`:s},Ze=()=>({...Mi,...W("defaultProperties")}),Pi=async({gdprPrivacyValue:s,event:d})=>{let p=Ce(s),_;try{p&&(_=await Ne())}catch(P){console.error(P)}return{...Ri({isGdprAccepted:p,event:d}),"Adobe Analytics":_?{marketingCloudVisitorId:_}:!0,"Google Analytics 4 Web":!0}},Ri=({isGdprAccepted:s,event:d})=>d==="CMP Submitted"?ki:s?{}:Oi,Li=({context:s,xandrId:d})=>{let p=W("sendXandrId")!==!1,_=d&&parseInt(d)!==0;if(!p||!_)return{};let x=[...Array.isArray(s?.externalIds)?s.externalIds:[],{collection:"users",encoding:"none",id:d,type:"xandr_id"}];return{externalIds:x.filter(({id:ve,type:Ae},je)=>je===x.findIndex(({id:me,type:De})=>ve===me&&Ae===De))}},et=async({event:s="",context:d={}})=>{let p=await Se(),{analytics:_,advertising:S}=p||{},P=Ce(p),[L,x]=await Promise.all([Pi({gdprPrivacyValue:p,event:s}),Bt({gdprPrivacyValueAdvertising:S})]);return P||(d.integrations={...d.integrations??{},Personas:!1,Webhooks:!0,Webhook:!0}),{...d,...!P&&{ip:"0.0.0.0"},...Li({context:d,xandrId:x}),clientVersion:"segment-wrapper@5.0.0-beta.2",gdpr_privacy:_,gdpr_privacy_advertising:S,integrations:{...d.integrations,...L}}},Wt=(s,d,p={},_)=>new Promise(S=>{(async()=>{let L=await et({context:p,event:s}),x={...Ze(),...d},de=async(...ve)=>{_&&_(...ve);let[Ae]=await Promise.all([Se()]);Ce(Ae),S()};window.analytics.track(s,x,{...L,context:{integrations:{...L.integrations}}},de)})()}),xi=async(s,d,p,_)=>{let S=await Se(),P=wi(s);return window.analytics.identify(P,Ce(S)?d:{},p,_)},Ni=(s,d,p={},_)=>(p.isPageTrack=!0,Wt(s??"",d,p,_)),Vi=()=>Promise.resolve(window.analytics.reset()),Ve={page:Ni,identify:xi,track:Wt,reset:Vi};var Kt="__mpi_patch";function Yt(){let{track:s}=window.analytics;window.analytics.track=(...d)=>{let[p,_,S,P]=d,L={...Ze(),..._};return et({context:S,event:p}).then(x=>{s.call(window.analytics,p,L,x,P)}),window.analytics},window.analytics[Kt]=!0}te&&(window.analytics?window.analytics[Kt]||(window.analytics.initialized?Yt():window.analytics.ready(Yt)):console.warn("[segment-wrapper] Segment Analytics is not loaded so patch is not applied."));var tt={spaReferrer:"",referrer:""},Fe={getDocumentReferrer:()=>document.referrer,getActualLocation:()=>{let{origin:s,pathname:d}=window.location;return`${s}${d}`},getActualQueryString:()=>{let{search:s}=window.location;return s}},Xt=({isPageTrack:s=!1}={})=>{let{referrer:d,spaReferrer:p}=tt;return(s?d:p)||Fe.getDocumentReferrer()},Fi=()=>{tt.spaReferrer=Xt({isPageTrack:!0}),tt.referrer=Fe.getActualLocation()},qt=({payload:s,next:d})=>{let{obj:{context:p}}=s,{isPageTrack:_}=p,S=Xt({isPageTrack:_});s.obj.context={...p,page:{...p.page,referrer:S}},_&&Fi(),d(s)};var Te={QUERY:"stc",SPLIT_SYMBOL:"-",CAMPAIGN_SPLIT_SYMBOL:":"},Ui="utm_campaign",ji="utm_medium",Gi="utm_source",Hi="utm_content",Bi="utm_id",Wi="utm_term",Yi={aff:"affiliate",dis:"display",em:"email",met:"paid-metasearch",sem:"paid-search",rt:"display",sm:"social-media",sp:"paid-social",pn:"push-notification",cs:"cross-sites"},Ki="na",Xi={medium:null,source:null,campaign:null},qi={STC:"stc",UTM:"utm"},$t=({needsTransformation:s=!0}={})=>{let{medium:d,source:p,campaign:_,content:S,term:P}=$i();if(!d||!p||!_)return null;let[L,x]=_.split(Te.CAMPAIGN_SPLIT_SYMBOL);if(!L&&!x)return null;let de=typeof S<"u"&&S!==Ki;return{campaign:{medium:s&&Yi[d]||d,...typeof x<"u"&&{id:L},name:x??L,source:p,...de&&{content:S},...typeof P<"u"&&{term:P}}}};function $i(){let s=Fe.getActualQueryString(),d=new URLSearchParams(s);return W("trackingTagsType")===qi.UTM?zi(d):zt(d)}function zt(s){if(!Jt(s))return Xi;let d=s.get(Te.QUERY),[p,_,S,P,L]=d?.split(Te.SPLIT_SYMBOL)||[];return{medium:p,source:_,campaign:S,content:P,term:L}}function Jt(s){return s.has(Te.QUERY)}function zi(s){let d=s.get(Bi),p=s.get(Ui),_=s.get(ji),S=s.get(Gi),P=s.get(Hi),L=s.get(Wi),x=d?`${d}${Te.CAMPAIGN_SPLIT_SYMBOL}${p}`:p;return(!_||!S||!x)&&Jt(s)?zt(s):{campaign:x,medium:_,source:S,content:P??void 0,term:L??void 0}}var Qt=({payload:s,next:d})=>{let p=$t();s.obj.context={...s.obj.context,...p},d(s)};var Zt=({payload:s,next:d})=>{let p=Nt();if(p){let{analytics:_,advertising:S}=p,P=_===ee.ACCEPTED,L=S===ee.ACCEPTED;s.obj.properties={...s.obj.properties,google_consents:{analytics_storage:P?"granted":"denied",ad_storage:L?"granted":"denied",ad_user_data:L?"granted":"denied",ad_personalization:L?"granted":"denied"}}}d(s)};var Ji={platform:"web"},en=({payload:s,next:d})=>{let p=W("defaultContext")||{};s.obj.context={...Ji,...p,...s.obj.context},d(s)};var Qi=()=>{let s=null;return({payload:d,next:p})=>{try{let{obj:_}=d,{event:S,type:P}=_;if(P!=="track"){p(d);return}if(typeof S=="string"&&S.endsWith("Viewed")){let{page_name:L,page_type:x}=_.properties||{};s={name:L,type:x},p(d);return}if(!s){p(d);return}p({...d,obj:{..._,properties:{..._.properties,page_name_origin:s.name,page_type:_.properties?.page_type||s.type}}})}catch(_){console.error(_),p(d)}}},tn=Qi();var nn=({payload:s,next:d})=>{s.obj.context={...s.obj.context,screen:{height:window.innerHeight,width:window.innerWidth,density:window.devicePixelRatio}},d(s)};var Zi=s=>{let d=W("isUserTraitsEnabled"),p=window.analytics.user?.(),_=Ce(s),S=p?.id();return{anonymousId:p?.anonymousId(),...S&&{userId:S},..._&&d&&p?.traits()||{}}},rn=async({payload:s,next:d})=>{let p=await Se(),_;try{_=Zi(p)}catch(S){console.error(S)}s.obj.context={...s.obj.context,traits:{...s.obj.context.traits||{},..._}},d(s)};for(on=[],Ue=0;Ue<64;)on[Ue]=0|4294967296*Math.sin(++Ue%Math.PI);var on,Ue;for(oe=18,Me=[],nt=[];oe>1;oe--)for(F=oe;F<320;)Me[F+=oe]=1;var F,oe,Me,nt;function Q(s,d){return 4294967296*Math.pow(s,1/d)|0}for(F=0;F<64;)Me[++oe]||(nt[F]=Q(oe,2),Me[F++]=Q(oe,3));function ue(s,d){return s>>>d|s<<-d}function an(s){var d=nt.slice(oe=F=0,8),p=[],_=unescape(encodeURI(s))+"\x80",S=_.length;for(p[s=--S/4+2|15]=8*S;~S;)p[S>>2]|=_.charCodeAt(S)<<8*~S--;for(S=[];oe<s;oe+=16){for(Q=d.slice();F<64;Q.unshift(_+(ue(_=Q[0],2)^ue(_,13)^ue(_,22))+(_&Q[1]^Q[1]&Q[2]^Q[2]&_)))Q[3]+=_=0|(S[F]=F<16?~~p[F+oe]:(ue(_=S[F-2],17)^ue(_,19)^_>>>10)+S[F-7]+(ue(_=S[F-15],7)^ue(_,18)^_>>>3)+S[F-16])+Q.pop()+(ue(_=Q[4],6)^ue(_,11)^ue(_,25))+(_&Q[5]^~_&Q[6])+Me[F++];for(F=8;F;)d[--F]+=Q[F]}for(_="";F<64;)_+=(d[F>>3]>>4*(7-F++)&15).toString(16);return _}var er=/\.|\+.*$/g;function tr(s){if(typeof s!="string")return"";let p=s.toLowerCase().split(/@/);if(p.length!==2)return"";let[_,S]=p;return`${_.replace(er,"")}@${S}`}function sn(s){let d=tr(s);return d?an(d):""}var nr="USER_DATA_READY",ir=()=>W("universalId"),rr=()=>{let s=ir();if(s)return it(),s;let d=W("userEmail");if(d)return s=sn(d),or(s),it(),s;it()},cn=()=>{if(!te)return;let s=rr(),d=W("userEmail");if(typeof window<"u"&&typeof window.dispatchEvent=="function"){let p=new CustomEvent(nr,{detail:{universalId:s,userEmail:d}});window.dispatchEvent(p)}return{universalId:s,userEmail:d}},it=()=>{ge("universalIdInitialized",!0)},or=s=>{ge("universalId",s)};var un=()=>{if(typeof window>"u")return;let s=window,d=s.analytics;if(!d){console.warn("[segment-wrapper] Analytics is not available");return}let p=s.__SEGMENT_WRAPPER?.SEGMENT_ID_USER_WITHOUT_CONSENTS??"anonymous_user";d.user?.()?.anonymousId()===p&&"setAnonymousId"in d&&typeof d.setAnonymousId=="function"&&d.setAnonymousId(null)};Je();try{cn()}catch(s){console.error("[segment-wrapper] UniversalID could not be initialized",s)}var dn=()=>{let s=W("experimentalPageDataMiddleware");window.analytics.addSourceMiddleware?.(rn),window.analytics.addSourceMiddleware?.(en),window.analytics.addSourceMiddleware?.(Zt),window.analytics.addSourceMiddleware?.(Qt),window.analytics.addSourceMiddleware?.(nn),window.analytics.addSourceMiddleware?.(qt),s&&window.analytics.addSourceMiddleware?.(tn)};te&&window.analytics&&(window.analytics.ready(un),window.analytics.addSourceMiddleware?dn():window.analytics.ready(dn));var rt=Ve;var pe=window;pe.sui=pe.sui||{};pe.sui.analytics=pe.sui.analytics||rt;pe.sui.analytics.getAdobeVisitorData=pe.sui.analytics.getAdobeVisitorData||Rt;pe.sui.analytics.getAdobeMCVisitorID=pe.sui.analytics.getAdobeMCVisitorID||Ne;var ho=rt;})();
2
2
  /**
3
3
  * @license
4
4
  * Adobe Visitor API for JavaScript version: 4.6.0