@sprig-technologies/sprig-bundled 2.37.0 → 2.37.1

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.
@@ -6061,7 +6061,7 @@ const Bf = (e) => e._config && e._config.installationMethod ? e._config.installa
6061
6061
  su = !0, iu = e;
6062
6062
  };
6063
6063
  function Ue(e = {}) {
6064
- const t = { "Content-Type": "application/json", "userleap-platform": "web", "x-ul-sdk-version": "2.36.1", "x-ul-installation-method": Bf(e), "sprig-modules": Nf(), "x-ul-package-version": "2.37.0" };
6064
+ const t = { "Content-Type": "application/json", "userleap-platform": "web", "x-ul-sdk-version": "2.37.1", "x-ul-installation-method": Bf(e), "sprig-modules": Nf(), "x-ul-package-version": "2.37.1" };
6065
6065
  if (e.envId && (t["x-ul-environment-id"] = e.envId), e.token && (t.Authorization = "Bearer " + e.token), e.userId && (t["x-ul-user-id"] = e.userId), e.visitorId && (t["x-ul-visitor-id"] = e.visitorId), e.partnerAnonymousId && (t["x-ul-anonymous-id"] = e.partnerAnonymousId), e.mobileHeadersJSON) {
6066
6066
  const r = JSON.parse(e.mobileHeadersJSON);
6067
6067
  Object.assign(t, r);
@@ -6108,7 +6108,7 @@ const Ha = async ({ shouldDropOnRateLimit: e, ...t }) => {
6108
6108
  const c = r + 1;
6109
6109
  return c > 5 || ou ? { ok: !1, reportError: !1, error: l } : (await bn(1e3 * Math.pow(2, r)), Xe(e, { ...i, retries: c }));
6110
6110
  }
6111
- }, $a = "ul-view-sdk-script", zf = ["ios", "android"], nt = "visitors", st = "environments";
6111
+ }, $a = "ul-view-sdk-script", zf = /* @__PURE__ */ new Set(["ios", "android"]), nt = "visitors", st = "environments";
6112
6112
  async function Be(e, t) {
6113
6113
  var i, a, o;
6114
6114
  const { shouldDropOnRateLimit: r, ...n } = t;
@@ -6189,7 +6189,7 @@ const Qt = async (e, t, r) => {
6189
6189
  }();
6190
6190
  S.installationMethod === "web-npm" || S.installationMethod;
6191
6191
  {
6192
- const { default: C } = await import("./view-BLTLs8qM.js");
6192
+ const { default: C } = await import("./view-DIc4kDKW.js");
6193
6193
  C.configure(S), E && window.UserLeap.container && window.UserLeap.container && Object.assign(window.UserLeap.container.style, { display: "flex" });
6194
6194
  }
6195
6195
  U == null || U.appendChild(b);
@@ -6203,9 +6203,9 @@ function Yn(e) {
6203
6203
  return pr(e) || t > 10 && t < 500;
6204
6204
  }
6205
6205
  function pr(e) {
6206
- return zf.includes(e["userleap-platform"]);
6206
+ return zf.has(e["userleap-platform"]);
6207
6207
  }
6208
- const jf = (e) => e.some((t) => t.type === "videovoice"), eo = "ul-frame";
6208
+ const sy = (e) => e["userleap-platform"] === "ios", jf = (e) => e.some((t) => t.type === "videovoice"), eo = "ul-frame";
6209
6209
  window.UserLeap && window.Sprig && (window.Sprig._gtm ? window.Sprig = window.UserLeap : window.UserLeap = window.Sprig), window.UserLeap || (window.UserLeap = window.Sprig), window.Sprig || (window.Sprig = window.UserLeap);
6210
6210
  const ms = "0px", au = (e, t, r) => {
6211
6211
  window.UserLeap.container = document.createElement("div"), window.UserLeap.container.className = "ul-container" + (t ? " ul-container-feedback" : ""), e && (window.UserLeap.container.dataset.studyId = e.toString());
@@ -6340,7 +6340,7 @@ const du = (e) => {
6340
6340
  }
6341
6341
  }
6342
6342
  return [i + 1, a, $f(o, e)];
6343
- }, sy = (e) => {
6343
+ }, iy = (e) => {
6344
6344
  const t = e.querySelector(".ul-card__container");
6345
6345
  t && (t.scrollTop = 0);
6346
6346
  }, pu = () => X, xt = () => document.getElementById("sprig-feedback-container"), ui = () => document.getElementById("sprig-feedback-loading-animation"), hu = () => !!document.getElementById(eo);
@@ -6995,7 +6995,7 @@ function pg(e = {}) {
6995
6995
  var m;
6996
6996
  await Be(Ae("1", [st], "metrics"), { body: k, method: "POST", headers: { "x-ul-replay-enabled": `${!!((m = te.replay) != null && m.isReplayRecording())}` }, shouldDropOnRateLimit: !0 });
6997
6997
  } }), !c) {
6998
- const k = u.alwaysOnReplay ? { userAgent: window.navigator.userAgent, surveyId: u.alwaysOnReplay.surveyId, responseGroupUuid: u.alwaysOnReplay.responseGroupUuid, sdkVersion: "2.36.1", maxDurationSeconds: u.alwaysOnReplay.maxDurationSeconds } : void 0;
6998
+ const k = u.alwaysOnReplay ? { userAgent: window.navigator.userAgent, surveyId: u.alwaysOnReplay.surveyId, responseGroupUuid: u.alwaysOnReplay.responseGroupUuid, sdkVersion: "2.37.1", maxDurationSeconds: u.alwaysOnReplay.maxDurationSeconds } : void 0;
6999
6999
  await ((y = te.replay) == null ? void 0 : y.initializeReplay({ maxReplayDurationSeconds: u.maxReplayDurationSeconds, maxInflightRequests: window.UserLeap.maxInflightReplayRequests ?? 2, replaySettings: u.replaySettings, apiUrl: window.UserLeap._API_URL, alwaysOnConfig: k })), no = u.replaySettings;
7000
7000
  }
7001
7001
  ug(u), await cg(u), window.UserLeap._queue.unpause(), (h = window.SprigLoggerCallback) == null || h.call(window, "SdkReady"), z.emit(B.SDKReady, { mobileMetricsReportingEnabled: !!u.mobileMetricsReportingEnabled, metricsReportingInterval: u.metricsReportingIntervalSeconds || 0, metricsThresholds: u.metricThresholds || [], maxMobileReplayDurationSeconds: u.maxMobileReplayDurationSeconds, mobileReplaySettings: u.mobileReplaySettings }), z.emit(B.VisitorIDUpdated, { visitorId: window.UserLeap.visitorId }), z.on(B.VisitorIDUpdated, () => {
@@ -7080,7 +7080,7 @@ class tl {
7080
7080
  window.Sprig("resumeReplayRecording");
7081
7081
  }
7082
7082
  }
7083
- const iy = { configure: (e) => {
7083
+ const oy = { configure: (e) => {
7084
7084
  if (!e.envId && !e.environmentId) throw new Error("Initialization Error: Sprig configure requires an environmentId");
7085
7085
  if (e.envId || (e.envId = e.environmentId ?? ""), e.installationMethod = "web-npm-bundled", window.Sprig) return window.Sprig;
7086
7086
  window.Sprig = function() {
@@ -7814,11 +7814,12 @@ export {
7814
7814
  ny as g,
7815
7815
  Qg as h,
7816
7816
  $e as i,
7817
- ry as j,
7818
- Sn as k,
7819
- tl as l,
7820
- iy as m,
7821
- sy as r,
7817
+ sy as j,
7818
+ ry as k,
7819
+ Sn as l,
7820
+ tl as m,
7821
+ oy as n,
7822
+ iy as r,
7822
7823
  ru as s,
7823
7824
  Mt as v
7824
7825
  };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-M_lw8BlN.cjs");exports.DismissReason=e.DismissReason,exports.SprigAPI=e.SprigAPI,exports.SprigEvent=e.SprigEvent,exports.sprig=e.sprig;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DUprOrkq.cjs");exports.DismissReason=e.DismissReason,exports.SprigAPI=e.SprigAPI,exports.SprigEvent=e.SprigEvent,exports.sprig=e.sprig;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as i, l as r, S as p, m as e } from "./index-BO6_4fuH.js";
1
+ import { b as i, m as r, S as p, n as e } from "./index-gGEvJlcK.js";
2
2
  export {
3
3
  i as DismissReason,
4
4
  r as SprigAPI,