@depict-ai/dpc 2.6.1 → 2.6.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/ES10/index.cjs CHANGED
@@ -17,7 +17,7 @@ function $parcel$interopDefault(a) {
17
17
  $parcel$export(module.exports, "DPC", () => $89ae37e3a26189b4$export$820526014323765f);
18
18
  $parcel$export(module.exports, "version", () => $fcc8287091fb489d$export$83d89fbfd8236492);
19
19
  /*! Depict PerformanceClient */
20
- const $fcc8287091fb489d$export$83d89fbfd8236492 = "2.6.1";
20
+ const $fcc8287091fb489d$export$83d89fbfd8236492 = "2.6.2";
21
21
  let $405164bc961cc106$export$8ae64f3d447c14f7;
22
22
  (function (ProductCardType) {
23
23
  ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
@@ -107,9 +107,8 @@ const $5323e9ffea4e414a$var$event_handler = (dpc, eventName, eventData) => {
107
107
  });else if (eventName === "setMarket") dpc.setMarket($5323e9ffea4e414a$var$string_guard(eventName, eventData));else if (eventName === "setProductId") dpc.setProductId($5323e9ffea4e414a$var$string_guard(eventName, eventData));else if (eventName === "setSessionId") dpc.setSessionId($5323e9ffea4e414a$var$nullable_undefined_string_guard(eventName, eventData));
108
108
  };
109
109
  const $5323e9ffea4e414a$export$7a1bb429756ced60 = dpc => {
110
- var _window, _window2;
111
- const dpq = (_window = window).dpq || (_window.dpq = $5323e9ffea4e414a$var$create_dpq());
112
- const depict = (_window2 = window).depict || (_window2.depict = {});
110
+ const dpq = globalThis.dpq || (globalThis.dpq = $5323e9ffea4e414a$var$create_dpq());
111
+ const depict = globalThis.depict || (globalThis.depict = {});
113
112
  depict.dpq = dpq; // refrencing dpq into the depict object
114
113
  depict.eventHistory = dpq.queue; // making this more visible in the depict object
115
114
  depict.dpc = dpc;
@@ -149,7 +148,7 @@ var $89ae37e3a26189b4$var$_sendTrackingEvent = /*#__PURE__*/new WeakSet();
149
148
  var $89ae37e3a26189b4$var$_getProductId = /*#__PURE__*/new WeakSet();
150
149
  class $89ae37e3a26189b4$export$820526014323765f {
151
150
  /** Latest product_id found in the DOM. Used in a2c & pageview events on PDPs. */ /** The value of location.pathname when latest_product_id was set */ /** Latest session_id set on the client. Used for all events. */ /** if we've sent a page view event for the current href */constructor(merchant, _options) {
152
- var _window$depict;
151
+ var _globalThis$depict;
153
152
  $89ae37e3a26189b4$var$_classPrivateMethodInitSpec(this, $89ae37e3a26189b4$var$_getProductId);
154
153
  $89ae37e3a26189b4$var$_classPrivateMethodInitSpec(this, $89ae37e3a26189b4$var$_sendTrackingEvent);
155
154
  $89ae37e3a26189b4$var$_classPrivateMethodInitSpec(this, $89ae37e3a26189b4$var$_getContextData);
@@ -167,9 +166,9 @@ class $89ae37e3a26189b4$export$820526014323765f {
167
166
  });
168
167
  $parcel$interopDefault($9AWcE$babelruntimehelpersdefineProperty)(this, "tracked_elements", new WeakSet());
169
168
  // Make sure we do not construct dpc more than once.
170
- if (((_window$depict = window.depict) === null || _window$depict === void 0 ? void 0 : _window$depict.dpc) instanceof $89ae37e3a26189b4$export$820526014323765f) {
169
+ if ((globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$depict = globalThis.depict) === null || _globalThis$depict === void 0 ? void 0 : _globalThis$depict.dpc) instanceof $89ae37e3a26189b4$export$820526014323765f) {
171
170
  $9AWcE$depictaiutilishared.dlog("DPC already initialized. Returning existing instance.");
172
- return window.depict.dpc;
171
+ return globalThis === null || globalThis === void 0 ? void 0 : globalThis.depict.dpc;
173
172
  }
174
173
  this.merchant = merchant;
175
174
  $89ae37e3a26189b4$var$_classPrivateMethodGet(this, $89ae37e3a26189b4$var$_parseOptions, $89ae37e3a26189b4$var$_parseOptions2).call(this, _options);
package/ES10/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export const version = "2.6.1";
1
+ export const version = "2.6.2";
2
2
  enum ProductCardType {
3
3
  Recommendation = 0,
4
4
  SnakeRecommendation = 1,
package/ES10/index.js CHANGED
@@ -6,7 +6,7 @@ import $4uUHR$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpe
6
6
  /*! Depict PerformanceClient */
7
7
  import { register_es_version } from "../multi_import_deduplicator.mjs";
8
8
  register_es_version("performance-client", "ES10");
9
- const $3242b911de3d57ad$export$83d89fbfd8236492 = "2.6.1";
9
+ const $3242b911de3d57ad$export$83d89fbfd8236492 = "2.6.2";
10
10
  let $983195e3c4979825$export$8ae64f3d447c14f7;
11
11
  (function (ProductCardType) {
12
12
  ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
@@ -96,9 +96,8 @@ const $f06bf37f1e6136a4$var$event_handler = (dpc, eventName, eventData) => {
96
96
  });else if (eventName === "setMarket") dpc.setMarket($f06bf37f1e6136a4$var$string_guard(eventName, eventData));else if (eventName === "setProductId") dpc.setProductId($f06bf37f1e6136a4$var$string_guard(eventName, eventData));else if (eventName === "setSessionId") dpc.setSessionId($f06bf37f1e6136a4$var$nullable_undefined_string_guard(eventName, eventData));
97
97
  };
98
98
  const $f06bf37f1e6136a4$export$7a1bb429756ced60 = dpc => {
99
- var _window, _window2;
100
- const dpq = (_window = window).dpq || (_window.dpq = $f06bf37f1e6136a4$var$create_dpq());
101
- const depict = (_window2 = window).depict || (_window2.depict = {});
99
+ const dpq = globalThis.dpq || (globalThis.dpq = $f06bf37f1e6136a4$var$create_dpq());
100
+ const depict = globalThis.depict || (globalThis.depict = {});
102
101
  depict.dpq = dpq; // refrencing dpq into the depict object
103
102
  depict.eventHistory = dpq.queue; // making this more visible in the depict object
104
103
  depict.dpc = dpc;
@@ -138,7 +137,7 @@ var $53af71a3700e1e90$var$_sendTrackingEvent = /*#__PURE__*/new WeakSet();
138
137
  var $53af71a3700e1e90$var$_getProductId = /*#__PURE__*/new WeakSet();
139
138
  class $53af71a3700e1e90$export$820526014323765f {
140
139
  /** Latest product_id found in the DOM. Used in a2c & pageview events on PDPs. */ /** The value of location.pathname when latest_product_id was set */ /** Latest session_id set on the client. Used for all events. */ /** if we've sent a page view event for the current href */constructor(merchant, _options) {
141
- var _window$depict;
140
+ var _globalThis$depict;
142
141
  $53af71a3700e1e90$var$_classPrivateMethodInitSpec(this, $53af71a3700e1e90$var$_getProductId);
143
142
  $53af71a3700e1e90$var$_classPrivateMethodInitSpec(this, $53af71a3700e1e90$var$_sendTrackingEvent);
144
143
  $53af71a3700e1e90$var$_classPrivateMethodInitSpec(this, $53af71a3700e1e90$var$_getContextData);
@@ -156,9 +155,9 @@ class $53af71a3700e1e90$export$820526014323765f {
156
155
  });
157
156
  $4uUHR$babelruntimehelpersdefineProperty(this, "tracked_elements", new WeakSet());
158
157
  // Make sure we do not construct dpc more than once.
159
- if (((_window$depict = window.depict) === null || _window$depict === void 0 ? void 0 : _window$depict.dpc) instanceof $53af71a3700e1e90$export$820526014323765f) {
158
+ if ((globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$depict = globalThis.depict) === null || _globalThis$depict === void 0 ? void 0 : _globalThis$depict.dpc) instanceof $53af71a3700e1e90$export$820526014323765f) {
160
159
  $4uUHR$dlog("DPC already initialized. Returning existing instance.");
161
- return window.depict.dpc;
160
+ return globalThis === null || globalThis === void 0 ? void 0 : globalThis.depict.dpc;
162
161
  }
163
162
  this.merchant = merchant;
164
163
  $53af71a3700e1e90$var$_classPrivateMethodGet(this, $53af71a3700e1e90$var$_parseOptions, $53af71a3700e1e90$var$_parseOptions2).call(this, _options);
package/dist/index.cjs CHANGED
@@ -17,7 +17,7 @@ function $parcel$interopDefault(a) {
17
17
  $parcel$export(module.exports, "DPC", () => $89ae37e3a26189b4$export$820526014323765f);
18
18
  $parcel$export(module.exports, "version", () => $fcc8287091fb489d$export$83d89fbfd8236492);
19
19
  /*! Depict PerformanceClient */
20
- const $fcc8287091fb489d$export$83d89fbfd8236492 = "2.6.1";
20
+ const $fcc8287091fb489d$export$83d89fbfd8236492 = "2.6.2";
21
21
  let $405164bc961cc106$export$8ae64f3d447c14f7;
22
22
  (function (ProductCardType) {
23
23
  ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
@@ -107,9 +107,8 @@ const $5323e9ffea4e414a$var$event_handler = (dpc, eventName, eventData) => {
107
107
  });else if (eventName === "setMarket") dpc.setMarket($5323e9ffea4e414a$var$string_guard(eventName, eventData));else if (eventName === "setProductId") dpc.setProductId($5323e9ffea4e414a$var$string_guard(eventName, eventData));else if (eventName === "setSessionId") dpc.setSessionId($5323e9ffea4e414a$var$nullable_undefined_string_guard(eventName, eventData));
108
108
  };
109
109
  const $5323e9ffea4e414a$export$7a1bb429756ced60 = dpc => {
110
- var _window, _window2;
111
- const dpq = (_window = window).dpq || (_window.dpq = $5323e9ffea4e414a$var$create_dpq());
112
- const depict = (_window2 = window).depict || (_window2.depict = {});
110
+ const dpq = globalThis.dpq || (globalThis.dpq = $5323e9ffea4e414a$var$create_dpq());
111
+ const depict = globalThis.depict || (globalThis.depict = {});
113
112
  depict.dpq = dpq; // refrencing dpq into the depict object
114
113
  depict.eventHistory = dpq.queue; // making this more visible in the depict object
115
114
  depict.dpc = dpc;
@@ -149,7 +148,7 @@ var $89ae37e3a26189b4$var$_sendTrackingEvent = /*#__PURE__*/new WeakSet();
149
148
  var $89ae37e3a26189b4$var$_getProductId = /*#__PURE__*/new WeakSet();
150
149
  class $89ae37e3a26189b4$export$820526014323765f {
151
150
  /** Latest product_id found in the DOM. Used in a2c & pageview events on PDPs. */ /** The value of location.pathname when latest_product_id was set */ /** Latest session_id set on the client. Used for all events. */ /** if we've sent a page view event for the current href */constructor(merchant, _options) {
152
- var _window$depict;
151
+ var _globalThis$depict;
153
152
  $89ae37e3a26189b4$var$_classPrivateMethodInitSpec(this, $89ae37e3a26189b4$var$_getProductId);
154
153
  $89ae37e3a26189b4$var$_classPrivateMethodInitSpec(this, $89ae37e3a26189b4$var$_sendTrackingEvent);
155
154
  $89ae37e3a26189b4$var$_classPrivateMethodInitSpec(this, $89ae37e3a26189b4$var$_getContextData);
@@ -167,9 +166,9 @@ class $89ae37e3a26189b4$export$820526014323765f {
167
166
  });
168
167
  $parcel$interopDefault($9AWcE$babelruntimehelpersdefineProperty)(this, "tracked_elements", new WeakSet());
169
168
  // Make sure we do not construct dpc more than once.
170
- if (((_window$depict = window.depict) === null || _window$depict === void 0 ? void 0 : _window$depict.dpc) instanceof $89ae37e3a26189b4$export$820526014323765f) {
169
+ if ((globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$depict = globalThis.depict) === null || _globalThis$depict === void 0 ? void 0 : _globalThis$depict.dpc) instanceof $89ae37e3a26189b4$export$820526014323765f) {
171
170
  $9AWcE$depictaiutilishared.dlog("DPC already initialized. Returning existing instance.");
172
- return window.depict.dpc;
171
+ return globalThis === null || globalThis === void 0 ? void 0 : globalThis.depict.dpc;
173
172
  }
174
173
  this.merchant = merchant;
175
174
  $89ae37e3a26189b4$var$_classPrivateMethodGet(this, $89ae37e3a26189b4$var$_parseOptions, $89ae37e3a26189b4$var$_parseOptions2).call(this, _options);
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export const version = "2.6.1";
1
+ export const version = "2.6.2";
2
2
  enum ProductCardType {
3
3
  Recommendation = 0,
4
4
  SnakeRecommendation = 1,
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import $4uUHR$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpe
6
6
  /*! Depict PerformanceClient */
7
7
  import { register_es_version } from "../multi_import_deduplicator.mjs";
8
8
  register_es_version("performance-client", "ES10");
9
- const $3242b911de3d57ad$export$83d89fbfd8236492 = "2.6.1";
9
+ const $3242b911de3d57ad$export$83d89fbfd8236492 = "2.6.2";
10
10
  let $983195e3c4979825$export$8ae64f3d447c14f7;
11
11
  (function (ProductCardType) {
12
12
  ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
@@ -96,9 +96,8 @@ const $f06bf37f1e6136a4$var$event_handler = (dpc, eventName, eventData) => {
96
96
  });else if (eventName === "setMarket") dpc.setMarket($f06bf37f1e6136a4$var$string_guard(eventName, eventData));else if (eventName === "setProductId") dpc.setProductId($f06bf37f1e6136a4$var$string_guard(eventName, eventData));else if (eventName === "setSessionId") dpc.setSessionId($f06bf37f1e6136a4$var$nullable_undefined_string_guard(eventName, eventData));
97
97
  };
98
98
  const $f06bf37f1e6136a4$export$7a1bb429756ced60 = dpc => {
99
- var _window, _window2;
100
- const dpq = (_window = window).dpq || (_window.dpq = $f06bf37f1e6136a4$var$create_dpq());
101
- const depict = (_window2 = window).depict || (_window2.depict = {});
99
+ const dpq = globalThis.dpq || (globalThis.dpq = $f06bf37f1e6136a4$var$create_dpq());
100
+ const depict = globalThis.depict || (globalThis.depict = {});
102
101
  depict.dpq = dpq; // refrencing dpq into the depict object
103
102
  depict.eventHistory = dpq.queue; // making this more visible in the depict object
104
103
  depict.dpc = dpc;
@@ -138,7 +137,7 @@ var $53af71a3700e1e90$var$_sendTrackingEvent = /*#__PURE__*/new WeakSet();
138
137
  var $53af71a3700e1e90$var$_getProductId = /*#__PURE__*/new WeakSet();
139
138
  class $53af71a3700e1e90$export$820526014323765f {
140
139
  /** Latest product_id found in the DOM. Used in a2c & pageview events on PDPs. */ /** The value of location.pathname when latest_product_id was set */ /** Latest session_id set on the client. Used for all events. */ /** if we've sent a page view event for the current href */constructor(merchant, _options) {
141
- var _window$depict;
140
+ var _globalThis$depict;
142
141
  $53af71a3700e1e90$var$_classPrivateMethodInitSpec(this, $53af71a3700e1e90$var$_getProductId);
143
142
  $53af71a3700e1e90$var$_classPrivateMethodInitSpec(this, $53af71a3700e1e90$var$_sendTrackingEvent);
144
143
  $53af71a3700e1e90$var$_classPrivateMethodInitSpec(this, $53af71a3700e1e90$var$_getContextData);
@@ -156,9 +155,9 @@ class $53af71a3700e1e90$export$820526014323765f {
156
155
  });
157
156
  $4uUHR$babelruntimehelpersdefineProperty(this, "tracked_elements", new WeakSet());
158
157
  // Make sure we do not construct dpc more than once.
159
- if (((_window$depict = window.depict) === null || _window$depict === void 0 ? void 0 : _window$depict.dpc) instanceof $53af71a3700e1e90$export$820526014323765f) {
158
+ if ((globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$depict = globalThis.depict) === null || _globalThis$depict === void 0 ? void 0 : _globalThis$depict.dpc) instanceof $53af71a3700e1e90$export$820526014323765f) {
160
159
  $4uUHR$dlog("DPC already initialized. Returning existing instance.");
161
- return window.depict.dpc;
160
+ return globalThis === null || globalThis === void 0 ? void 0 : globalThis.depict.dpc;
162
161
  }
163
162
  this.merchant = merchant;
164
163
  $53af71a3700e1e90$var$_classPrivateMethodGet(this, $53af71a3700e1e90$var$_parseOptions, $53af71a3700e1e90$var$_parseOptions2).call(this, _options);
package/latest/index.cjs CHANGED
@@ -11,7 +11,7 @@ function $parcel$export(e, n, v, s) {
11
11
  $parcel$export(module.exports, "DPC", () => $15e3eebad2263636$export$820526014323765f);
12
12
  $parcel$export(module.exports, "version", () => $9c6b4a5c4c4f318d$export$83d89fbfd8236492);
13
13
  /*! Depict PerformanceClient */
14
- const $9c6b4a5c4c4f318d$export$83d89fbfd8236492 = "2.6.1";
14
+ const $9c6b4a5c4c4f318d$export$83d89fbfd8236492 = "2.6.2";
15
15
  let $02e69dba644a2ef8$export$8ae64f3d447c14f7;
16
16
  (function (ProductCardType) {
17
17
  ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
@@ -101,8 +101,8 @@ const $9ccf446d29413158$var$event_handler = (dpc, eventName, eventData) => {
101
101
  });else if (eventName === "setMarket") dpc.setMarket($9ccf446d29413158$var$string_guard(eventName, eventData));else if (eventName === "setProductId") dpc.setProductId($9ccf446d29413158$var$string_guard(eventName, eventData));else if (eventName === "setSessionId") dpc.setSessionId($9ccf446d29413158$var$nullable_undefined_string_guard(eventName, eventData));
102
102
  };
103
103
  const $9ccf446d29413158$export$7a1bb429756ced60 = dpc => {
104
- const dpq = window.dpq ||= $9ccf446d29413158$var$create_dpq();
105
- const depict = window.depict ||= {};
104
+ const dpq = globalThis.dpq ||= $9ccf446d29413158$var$create_dpq();
105
+ const depict = globalThis.depict ||= {};
106
106
  depict.dpq = dpq; // refrencing dpq into the depict object
107
107
  depict.eventHistory = dpq.queue; // making this more visible in the depict object
108
108
  depict.dpc = dpc;
@@ -124,9 +124,9 @@ class $15e3eebad2263636$export$820526014323765f {
124
124
  #has_sent_pageview_for_current_href = false;
125
125
  constructor(merchant, options) {
126
126
  // Make sure we do not construct dpc more than once.
127
- if (window.depict?.dpc instanceof $15e3eebad2263636$export$820526014323765f) {
127
+ if (globalThis?.depict?.dpc instanceof $15e3eebad2263636$export$820526014323765f) {
128
128
  $dwOGf$depictaiutilishared.dlog("DPC already initialized. Returning existing instance.");
129
- return window.depict.dpc;
129
+ return globalThis?.depict.dpc;
130
130
  }
131
131
  this.merchant = merchant;
132
132
  this.#parseOptions(options);
package/latest/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export const version = "2.6.1";
1
+ export const version = "2.6.2";
2
2
  enum ProductCardType {
3
3
  Recommendation = 0,
4
4
  SnakeRecommendation = 1,
package/latest/index.js CHANGED
@@ -3,7 +3,7 @@ import { add_to_version_info as $lbGMC$add_to_version_info, dlog as $lbGMC$dlog,
3
3
  /*! Depict PerformanceClient */
4
4
  import { register_es_version } from "../multi_import_deduplicator.mjs";
5
5
  register_es_version("performance-client", "latest");
6
- const $3b068891cefe570d$export$83d89fbfd8236492 = "2.6.1";
6
+ const $3b068891cefe570d$export$83d89fbfd8236492 = "2.6.2";
7
7
  let $ba8dc1a552d27224$export$8ae64f3d447c14f7;
8
8
  (function (ProductCardType) {
9
9
  ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
@@ -93,8 +93,8 @@ const $b1ff6e3aa9b3b030$var$event_handler = (dpc, eventName, eventData) => {
93
93
  });else if (eventName === "setMarket") dpc.setMarket($b1ff6e3aa9b3b030$var$string_guard(eventName, eventData));else if (eventName === "setProductId") dpc.setProductId($b1ff6e3aa9b3b030$var$string_guard(eventName, eventData));else if (eventName === "setSessionId") dpc.setSessionId($b1ff6e3aa9b3b030$var$nullable_undefined_string_guard(eventName, eventData));
94
94
  };
95
95
  const $b1ff6e3aa9b3b030$export$7a1bb429756ced60 = dpc => {
96
- const dpq = window.dpq ||= $b1ff6e3aa9b3b030$var$create_dpq();
97
- const depict = window.depict ||= {};
96
+ const dpq = globalThis.dpq ||= $b1ff6e3aa9b3b030$var$create_dpq();
97
+ const depict = globalThis.depict ||= {};
98
98
  depict.dpq = dpq; // refrencing dpq into the depict object
99
99
  depict.eventHistory = dpq.queue; // making this more visible in the depict object
100
100
  depict.dpc = dpc;
@@ -116,9 +116,9 @@ class $fe563348936ab010$export$820526014323765f {
116
116
  #has_sent_pageview_for_current_href = false;
117
117
  constructor(merchant, options) {
118
118
  // Make sure we do not construct dpc more than once.
119
- if (window.depict?.dpc instanceof $fe563348936ab010$export$820526014323765f) {
119
+ if (globalThis?.depict?.dpc instanceof $fe563348936ab010$export$820526014323765f) {
120
120
  $lbGMC$dlog("DPC already initialized. Returning existing instance.");
121
- return window.depict.dpc;
121
+ return globalThis?.depict.dpc;
122
122
  }
123
123
  this.merchant = merchant;
124
124
  this.#parseOptions(options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/dpc",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "./src/index.ts",
6
6
  "types": "ES10/index.d.ts",