@onside/install-widget 1.1.0 → 1.1.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.
Files changed (24) hide show
  1. package/dist-lib/{AndroidPlatformModal-B_uF1M7D.cjs → AndroidPlatformModal-Bo8KL9YE.cjs} +1 -1
  2. package/dist-lib/{AndroidPlatformModal-3kGO8HxK.js → AndroidPlatformModal-DGNUxRkK.js} +2 -2
  3. package/dist-lib/{CheckInstallModal-Do2gfb9L.js → CheckInstallModal-BAx1q0Eh.js} +3 -3
  4. package/dist-lib/{CheckInstallModal-ClGHu6XA.cjs → CheckInstallModal-CamMs4Ky.cjs} +1 -1
  5. package/dist-lib/{Dialog-B1D2BvMl.js → Dialog-BpvFTl3s.js} +1 -1
  6. package/dist-lib/{Dialog-BRBYK08a.cjs → Dialog-H1GsCMbd.cjs} +1 -1
  7. package/dist-lib/{FaqModal-J1y4DGzd.js → FaqModal-B6YPov5t.js} +3 -3
  8. package/dist-lib/{FaqModal-BspE3dHf.cjs → FaqModal-BYENishJ.cjs} +1 -1
  9. package/dist-lib/{GoToSafariModal-Be-O5A-M.cjs → GoToSafariModal-B1EWxzWE.cjs} +1 -1
  10. package/dist-lib/{GoToSafariModal-BSuOwGJ3.js → GoToSafariModal-pXhEb2yy.js} +2 -2
  11. package/dist-lib/{UpdateIOSModal-Mxvo1zPl.cjs → UpdateIOSModal-B-jqDkQO.cjs} +1 -1
  12. package/dist-lib/{UpdateIOSModal-CF7lFNfI.js → UpdateIOSModal-D-cikTQ4.js} +3 -3
  13. package/dist-lib/{cdn-BmfyFccQ.js → cdn-DQucWvIe.js} +1 -1
  14. package/dist-lib/{cdn-BonUyxCA.cjs → cdn-ToXHpWOt.cjs} +1 -1
  15. package/dist-lib/{index-fWIxOyUM.js → index-BqoWsHcB.js} +59 -58
  16. package/dist-lib/index-DFXiHkdo.cjs +1 -0
  17. package/dist-lib/install-package-5TE9fTFQ.cjs +1 -0
  18. package/dist-lib/{install-package-CZGZODly.js → install-package-S3saul1C.js} +170 -170
  19. package/dist-lib/install-package.cjs +1 -1
  20. package/dist-lib/install-package.js +1 -1
  21. package/dist-lib/install-widget.css +1 -1
  22. package/package.json +10 -2
  23. package/dist-lib/index-BzQo1EMv.cjs +0 -1
  24. package/dist-lib/install-package-Dkv3eM_d.cjs +0 -1
@@ -1,9 +1,9 @@
1
- import { jsx as i, jsxs as k, Fragment as B } from "react/jsx-runtime";
2
- import * as y from "react";
3
- import { createContext as U, useContext as R, useState as q, useRef as F, useCallback as I, useEffect as H, lazy as w, useMemo as Y, Suspense as W } from "react";
4
- import { S as L, u as K, i as Z } from "./useInstallUrl-McaAuMPK.js";
5
- import { trackModalEvent as Q, trackEvent as J, resolveInstallConditions as X, getDeviceInfo as ee } from "./utils.js";
6
- import { create as te } from "zustand";
1
+ import { jsx as s, jsxs as w, Fragment as P } from "react/jsx-runtime";
2
+ import * as S from "react";
3
+ import { createContext as R, useContext as j, useState as H, useRef as F, useCallback as I, useEffect as W, lazy as C, useMemo as Y, Suspense as K } from "react";
4
+ import { S as B, u as Q, i as Z } from "./useInstallUrl-McaAuMPK.js";
5
+ import { trackModalEvent as J, trackEvent as X, resolveInstallConditions as ee, getDeviceInfo as te } from "./utils.js";
6
+ import { create as ne } from "zustand";
7
7
  import "./installUrlService-CrJfYPwM.js";
8
8
  function G(e) {
9
9
  var t, o, n = "";
@@ -14,19 +14,19 @@ function G(e) {
14
14
  } else for (o in e) e[o] && (n && (n += " "), n += o);
15
15
  return n;
16
16
  }
17
- function ne() {
17
+ function oe() {
18
18
  for (var e, t, o = 0, n = "", a = arguments.length; o < a; o++) (e = arguments[o]) && (t = G(e)) && (n && (n += " "), n += t);
19
19
  return n;
20
20
  }
21
- function u(...e) {
22
- return ne(e);
21
+ function p(...e) {
22
+ return oe(e);
23
23
  }
24
- const oe = {
24
+ const ae = {
25
25
  primary: "rounded-full whitespace-nowrap leading-none font-medium transition-bg font-sans duration-300 flex items-center justify-center text-center",
26
26
  secondary: "rounded-full whitespace-nowrap leading-none font-medium font-sans bg-transparent border transition-bg transition-color duration-300 flex items-center justify-center text-center",
27
27
  text: "whitespace-nowrap leading-none font-medium font-sans transition-colors duration-300 flex items-center justify-center text-center",
28
28
  transparent: "rounded-full whitespace-nowrap leading-none font-medium transition-opacity duration-300 flex items-center justify-center text-center"
29
- }, ae = {
29
+ }, se = {
30
30
  primary: {
31
31
  blue: "bg-blue text-white hover:bg-buttonHover focus:bg-blue disabled:bg-buttonDisabled",
32
32
  lightBlue: "bg-[#e2eaf8] text-blue hover:opacity-60 focus:opacity-100",
@@ -47,23 +47,23 @@ const oe = {
47
47
  lightBlue: "bg-transparent text-[#e2eaf8] hover:opacity-75",
48
48
  white: "bg-transparent text-white hover:opacity-75"
49
49
  }
50
- }, se = {
50
+ }, le = {
51
51
  lg: "py-4 px-8 font-sans font-medium text-lg sm:text-xl leading-none!",
52
52
  md: "py-3 px-5 font-sans font-medium text-base sm:text-lg leading-none!"
53
53
  };
54
- function S({ className: e, ...t }) {
55
- const o = t.variant ?? "primary", n = t.color ?? "blue", a = t.size ?? "md", s = u(
56
- oe[o],
57
- se[o !== "text" ? a : "md"],
58
- ae[o][n],
54
+ function M({ className: e, ...t }) {
55
+ const o = t.variant ?? "primary", n = t.color ?? "blue", a = t.size ?? "md", l = p(
56
+ ae[o],
57
+ le[o !== "text" ? a : "md"],
58
+ se[o][n],
59
59
  e
60
60
  );
61
61
  if (typeof t.href > "u")
62
- return /* @__PURE__ */ i("button", { className: s, ...t });
63
- const l = t, m = ("rel" in l ? l.rel : void 0) ?? (l.target === "_blank" ? "noopener noreferrer" : void 0);
64
- return /* @__PURE__ */ i("a", { className: s, rel: m, ...l });
62
+ return /* @__PURE__ */ s("button", { className: l, ...t });
63
+ const i = t, { pureLink: g, ...r } = i, b = ("rel" in r ? r.rel : void 0) ?? (r.target === "_blank" ? "noopener noreferrer" : void 0);
64
+ return g ? /* @__PURE__ */ s("a", { className: l, rel: b, ...r }) : /* @__PURE__ */ s("a", { className: l, rel: b, ...r });
65
65
  }
66
- const d = " ", ie = "ʹ", V = {
66
+ const u = " ", ie = "ʹ", D = {
67
67
  button: {
68
68
  install: "Install Onside",
69
69
  regionUnavailable: "Only available in the EU. Install from an eligible region.",
@@ -113,7 +113,7 @@ const d = " ", ie = "ʹ", V = {
113
113
  items: [
114
114
  {
115
115
  question: "How can I install Onside store app outside EU region?",
116
- answer: `You can install the${d}Onside store app only if${d}you are using your iPhone in${d}the${d}EU${d}region`
116
+ answer: `You can install the${u}Onside store app only if${u}you are using your iPhone in${u}the${u}EU${u}region`
117
117
  },
118
118
  {
119
119
  question: `I am in EU region but still can${ie}t install Onside store app`,
@@ -121,7 +121,7 @@ const d = " ", ie = "ʹ", V = {
121
121
  action: { event: "change_region", word: "here" }
122
122
  },
123
123
  {
124
- question: `Could not install app due${d}to content restrictions`,
124
+ question: `Could not install app due${u}to content restrictions`,
125
125
  answer: "Go to content restrictions in Settings, then “App Store, Media, Web & games” then “Apps” and set to unrated"
126
126
  },
127
127
  {
@@ -131,7 +131,7 @@ const d = " ", ie = "ʹ", V = {
131
131
  }
132
132
  ],
133
133
  changeRegion: {
134
- title: `Change your App Store country to install Onside${d}store${d}app`,
134
+ title: `Change your App Store country to install Onside${u}store${u}app`,
135
135
  label: "To change, please go to:",
136
136
  breadcrumbs: [
137
137
  "Settings",
@@ -148,267 +148,268 @@ const d = " ", ie = "ʹ", V = {
148
148
  didntFind: "Didn’t find an answer?"
149
149
  }
150
150
  }
151
- }, j = U(V), le = () => R(j), Be = 7 * L, re = 7 * L, ce = 2 * L, z = te((e) => ({
151
+ }, $ = R(D), re = () => j($), Be = 7 * B, ce = 7 * B, de = 2 * B, q = ne((e) => ({
152
152
  activeModal: null,
153
153
  openModal: (t) => e({ activeModal: t }),
154
154
  closeModal: () => e({ activeModal: null })
155
- })), de = {
155
+ })), ue = {
156
156
  INSTALL_BUTTON_CLICK: "install_button_click"
157
- }, ue = (e = {}, t) => ({
157
+ }, pe = (e = {}, t) => ({
158
158
  trackInstallEvent: (a) => {
159
- const s = J(de.INSTALL_BUTTON_CLICK, {
159
+ const l = X(ue.INSTALL_BUTTON_CLICK, {
160
160
  ...e,
161
161
  event_type: a
162
162
  });
163
- s && t?.onEvent?.(s);
163
+ l && t?.onEvent?.(l);
164
164
  },
165
165
  trackOpenModalEvent: (a) => {
166
- const s = Q(a, "opened", "install_button", {
166
+ const l = J(a, "opened", "install_button", {
167
167
  ...e
168
168
  });
169
- s && t?.onEvent?.(s);
169
+ l && t?.onEvent?.(l);
170
170
  }
171
- }), pe = (e) => e ? "ios_18_6_plus" : "install_click", fe = (e, t) => {
172
- e(pe(t));
173
- }, he = (e) => {
174
- e("no_condition_matched");
171
+ }), fe = (e) => e ? "ios_18_6_plus" : "install_click", he = (e, t) => {
172
+ e(fe(t));
175
173
  }, me = (e) => {
176
- const { id: t, location: o = "hero", customAnalytics: n, handleCustomStep: a, pathname: s } = e, l = X(ee()), m = l.installState === "install_available", { data: p, error: _ } = K(m), g = p?.url ?? null, M = p?.onside_token ?? null, A = p?.attribution_token ?? null, f = p?.is_eligible ?? null, { openModal: r } = z(), [E, C] = q(!1), x = F(void 0), { trackOpenModalEvent: c, trackInstallEvent: b } = ue(
174
+ e("no_condition_matched");
175
+ }, ge = (e) => {
176
+ const { id: t, location: o = "hero", customAnalytics: n, handleCustomStep: a, pathname: l } = e, i = ee(te()), g = i.installState === "install_available", { data: r, error: b } = Q(g), f = r?.url ?? null, A = r?.onside_token ?? null, E = r?.attribution_token ?? null, h = r?.is_eligible ?? null, { openModal: c } = q(), [_, k] = H(!1), x = F(void 0), { trackOpenModalEvent: d, trackInstallEvent: v } = pe(
177
177
  {
178
- page: s,
178
+ page: l,
179
179
  location: o,
180
180
  button_id: t ?? void 0,
181
- onside_token: M ?? void 0,
182
- attribution_token: A ?? void 0
181
+ onside_token: A ?? void 0,
182
+ attribution_token: E ?? void 0
183
183
  },
184
184
  n
185
- ), h = I(() => {
186
- C(!0);
187
- const v = setTimeout(() => {
188
- C(!1);
189
- }, ce);
190
- return () => clearTimeout(v);
185
+ ), m = I(() => {
186
+ k(!0);
187
+ const y = setTimeout(() => {
188
+ k(!1);
189
+ }, de);
190
+ return () => clearTimeout(y);
191
191
  }, []), O = I(
192
- (v) => {
193
- if (!g || !Z) {
194
- v.preventDefault();
192
+ (y) => {
193
+ if (!f || !Z) {
194
+ y.preventDefault();
195
195
  return;
196
196
  }
197
- if (h(), a) {
197
+ if (m(), a) {
198
198
  setTimeout(() => a(), 100);
199
199
  return;
200
200
  }
201
- fe(b, l.usesNewInstallFlow), setTimeout(() => {
202
- if (l.usesNewInstallFlow) {
201
+ he(v, i.usesNewInstallFlow), setTimeout(() => {
202
+ if (i.usesNewInstallFlow) {
203
203
  clearTimeout(x.current), x.current = setTimeout(() => {
204
- r("checkInstall"), c("check_install");
205
- }, re);
204
+ c("checkInstall"), d("check_install");
205
+ }, ce);
206
206
  return;
207
207
  }
208
- r("getApproved"), c("get_approved");
208
+ c("getApproved"), d("get_approved");
209
209
  }, 100);
210
210
  },
211
211
  [
212
- g,
212
+ f,
213
213
  a,
214
- l.usesNewInstallFlow,
215
- b,
214
+ i.usesNewInstallFlow,
215
+ v,
216
+ d,
216
217
  c,
217
- r,
218
- h
218
+ m
219
219
  ]
220
220
  ), N = I(() => {
221
- if (h(), l.installState === "go_to_safari") {
222
- c("go_to_safari"), r("goToSafari");
221
+ if (m(), i.installState === "go_to_safari") {
222
+ d("go_to_safari"), c("goToSafari");
223
223
  return;
224
224
  }
225
- if (l.installState === "update_ios") {
226
- c("update_ios"), r("updateIOS");
225
+ if (i.installState === "update_ios") {
226
+ d("update_ios"), c("updateIOS");
227
227
  return;
228
228
  }
229
- he(b);
229
+ me(v);
230
230
  }, [
231
- l.installState,
232
- r,
233
- h,
234
- b,
235
- c
231
+ i.installState,
232
+ c,
233
+ m,
234
+ v,
235
+ d
236
236
  ]), T = I(() => {
237
- c("is_android"), r("isAndroid");
238
- }, [r, c]);
237
+ d("is_android"), c("isAndroid");
238
+ }, [c, d]);
239
239
  return {
240
- viewMode: l.installState === "android" ? "android" : E ? "loading" : g && m ? "link" : "button",
241
- installUrl: g,
242
- error: _,
243
- isEligible: f,
244
- conditions: l,
240
+ viewMode: i.installState === "android" ? "android" : _ ? "loading" : f && g ? "link" : "button",
241
+ installUrl: f,
242
+ error: b,
243
+ isEligible: h,
244
+ conditions: i,
245
245
  handleInstallClick: O,
246
246
  handleModalFlowClick: N,
247
247
  handleAndroidClick: T
248
248
  };
249
- }, ge = (e) => /* @__PURE__ */ y.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ y.createElement("path", { d: "M12.1268 5.74646C11.3368 5.74646 10.1139 4.84824 8.82613 4.88071C7.12708 4.90235 5.56872 5.8655 4.69214 7.39139C2.92817 10.454 4.23762 14.9776 5.95831 17.4667C6.80243 18.6787 7.79805 20.0423 9.11832 19.999C10.3845 19.9449 10.8607 19.1765 12.3974 19.1765C13.9233 19.1765 14.3562 19.999 15.6981 19.9665C17.0617 19.9449 17.9274 18.7328 18.7607 17.5099C19.7239 16.1031 20.1243 14.7395 20.1459 14.6638C20.1134 14.653 17.4945 13.6465 17.4621 10.6164C17.4404 8.084 19.5291 6.87195 19.6265 6.81784C18.436 5.0755 16.6071 4.88071 15.9686 4.83742C14.3021 4.70755 12.906 5.74646 12.1268 5.74646ZM14.9406 3.19248C15.644 2.34837 16.1093 1.16877 15.9795 0C14.973 0.0432878 13.761 0.670965 13.0359 1.51508C12.3866 2.26179 11.8238 3.46303 11.9753 4.61016C13.09 4.69673 14.2371 4.03659 14.9406 3.19248Z", fill: "currentColor" })), be = ({
249
+ }, be = (e) => /* @__PURE__ */ S.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ S.createElement("path", { d: "M12.1268 5.74646C11.3368 5.74646 10.1139 4.84824 8.82613 4.88071C7.12708 4.90235 5.56872 5.8655 4.69214 7.39139C2.92817 10.454 4.23762 14.9776 5.95831 17.4667C6.80243 18.6787 7.79805 20.0423 9.11832 19.999C10.3845 19.9449 10.8607 19.1765 12.3974 19.1765C13.9233 19.1765 14.3562 19.999 15.6981 19.9665C17.0617 19.9449 17.9274 18.7328 18.7607 17.5099C19.7239 16.1031 20.1243 14.7395 20.1459 14.6638C20.1134 14.653 17.4945 13.6465 17.4621 10.6164C17.4404 8.084 19.5291 6.87195 19.6265 6.81784C18.436 5.0755 16.6071 4.88071 15.9686 4.83742C14.3021 4.70755 12.906 5.74646 12.1268 5.74646ZM14.9406 3.19248C15.644 2.34837 16.1093 1.16877 15.9795 0C14.973 0.0432878 13.761 0.670965 13.0359 1.51508C12.3866 2.26179 11.8238 3.46303 11.9753 4.61016C13.09 4.69673 14.2371 4.03659 14.9406 3.19248Z", fill: "currentColor" })), ve = ({
250
250
  className: e,
251
251
  onClick: t,
252
252
  children: o,
253
253
  id: n,
254
254
  androidClassName: a,
255
- androidTextClassName: s
256
- }) => /* @__PURE__ */ i(
257
- S,
255
+ androidTextClassName: l
256
+ }) => /* @__PURE__ */ s(
257
+ M,
258
258
  {
259
259
  id: n,
260
- className: u("bg-white px-7", e, a),
260
+ className: p("bg-white px-7", e, a),
261
261
  variant: "secondary",
262
262
  size: "lg",
263
263
  onClick: t,
264
- children: /* @__PURE__ */ k("span", { className: "flex flex-row items-center gap-1", children: [
265
- /* @__PURE__ */ i(ge, { className: s ? "text-[#FF465D]" : void 0 }),
266
- /* @__PURE__ */ i("span", { className: u("flex-1", s), children: o })
264
+ children: /* @__PURE__ */ w("span", { className: "flex flex-row items-center gap-1", children: [
265
+ /* @__PURE__ */ s(be, { className: l ? "text-[#FF465D]" : void 0 }),
266
+ /* @__PURE__ */ s("span", { className: p("flex-1", l), children: o })
267
267
  ] })
268
268
  }
269
- ), ve = ({
269
+ ), ye = ({
270
270
  href: e,
271
271
  onClick: t,
272
272
  children: o,
273
273
  className: n,
274
274
  id: a
275
- }) => /* @__PURE__ */ i(
276
- S,
275
+ }) => /* @__PURE__ */ s(
276
+ M,
277
277
  {
278
278
  id: a,
279
279
  href: e,
280
+ pureLink: !0,
280
281
  size: "lg",
281
282
  onClick: t,
282
283
  className: n,
283
284
  children: o
284
285
  }
285
- ), ye = (e) => /* @__PURE__ */ y.createElement("svg", { stroke: "customColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ y.createElement("style", null, ".spinner_V8m1{transform-origin:center;animation:spinner_zKoa 2s linear infinite}.spinner_V8m1 circle{stroke-linecap:round;animation:spinner_YpZS 1.5s ease-in-out infinite}@keyframes spinner_zKoa{100%{transform:rotate(360deg)}}@keyframes spinner_YpZS{0%{stroke-dasharray:0 150;stroke-dashoffset:0}47.5%{stroke-dasharray:42 150;stroke-dashoffset:-16}95%,100%{stroke-dasharray:42 150;stroke-dashoffset:-59}}"), /* @__PURE__ */ y.createElement("g", { className: "spinner_V8m1" }, /* @__PURE__ */ y.createElement("circle", { cx: 12, cy: 12, r: 9.5, fill: "none", strokeWidth: 3 }))), ke = (e) => {
286
+ ), U = (e) => /* @__PURE__ */ S.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ S.createElement("path", { d: "M17.5 10.0001C17.4999 11.5839 16.9984 13.1271 16.0674 14.4084C15.1364 15.6897 13.8237 16.6434 12.3174 17.1328C10.8111 17.6221 9.1885 17.6221 7.6822 17.1326C6.17591 16.6432 4.86323 15.6894 3.9323 14.4081C3.00138 13.1267 2.49999 11.5835 2.5 9.9997C2.50001 8.41588 3.00142 6.87271 3.93237 5.59137C4.86331 4.31003 6.176 3.3563 7.6823 2.86685C9.1886 2.37741 10.8112 2.37739 12.3175 2.86679", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), we = (e) => {
286
287
  const { id: t, className: o, children: n, showLoaderOnly: a } = e;
287
- return /* @__PURE__ */ i(S, { id: t, className: u("px-8 py-4", o), disabled: !0, children: /* @__PURE__ */ k("span", { className: "flex items-center gap-2", children: [
288
- /* @__PURE__ */ i(ye, { className: "size-5 animate-spin stroke-blue" }),
289
- !a && n
290
- ] }) });
291
- }, we = ({ message: e }) => /* @__PURE__ */ i("p", { className: "mt-2 text-center text-sm text-error", children: e ?? "Unable to load install link. Please try again." }), D = U(!1), Ce = () => typeof window < "u" ? window.location.pathname : "", Ue = (e) => {
292
- const t = le(), {
288
+ return /* @__PURE__ */ s(M, { id: t, className: p("px-8 py-4", o), disabled: !0, children: /* @__PURE__ */ s("span", { className: "flex items-center gap-2", children: a ? /* @__PURE__ */ s(U, { className: "animate-spin" }) : /* @__PURE__ */ w(P, { children: [
289
+ /* @__PURE__ */ s(U, { className: "animate-spin" }),
290
+ n
291
+ ] }) }) });
292
+ }, Ce = ({ message: e }) => /* @__PURE__ */ s("p", { className: "mt-2 text-center text-sm text-error", children: e ?? "Unable to load install link. Please try again." }), V = R(!1), ke = () => typeof window < "u" ? window.location.pathname : "", Ue = (e) => {
293
+ const t = re(), {
293
294
  className: o,
294
295
  children: n,
295
296
  handleCustomStep: a,
296
- location: s = "hero",
297
- caption: l,
298
- captionClassName: m,
299
- showCaption: p = !0,
300
- showLoaderOnly: _ = !1,
301
- androidClassName: g,
302
- androidTextClassName: M,
303
- customAnalytics: A,
304
- id: f
305
- } = e, r = n ?? t.button.install, E = F(Ce()), C = R(D), {
297
+ location: l = "hero",
298
+ caption: i,
299
+ captionClassName: g,
300
+ showCaption: r = !0,
301
+ showLoaderOnly: b = !1,
302
+ androidClassName: f,
303
+ androidTextClassName: A,
304
+ customAnalytics: E,
305
+ id: h
306
+ } = e, c = n ?? t.button.install, _ = F(ke()), k = j(V), {
306
307
  viewMode: x,
307
- installUrl: c,
308
- error: b,
309
- isEligible: h,
308
+ installUrl: d,
309
+ error: v,
310
+ isEligible: m,
310
311
  handleInstallClick: O,
311
312
  handleModalFlowClick: N,
312
313
  handleAndroidClick: T
313
- } = me({
314
- id: f,
315
- location: s,
316
- customAnalytics: A,
314
+ } = ge({
315
+ id: h,
316
+ location: l,
317
+ customAnalytics: E,
317
318
  handleCustomStep: a,
318
- pathname: E.current
319
+ pathname: _.current
319
320
  });
320
- H(() => {
321
- }, [C]);
322
- const P = p && (!h || l) && /* @__PURE__ */ i(
321
+ W(() => {
322
+ }, [k]);
323
+ const L = r && (!m || i) && /* @__PURE__ */ s(
323
324
  "div",
324
325
  {
325
- className: u(
326
+ className: p(
326
327
  "text-2xs font-mono opacity-60",
327
- m
328
+ g
328
329
  ),
329
- children: h ? l : t.button.regionUnavailable
330
+ children: m ? i : t.button.regionUnavailable
330
331
  }
331
- ), v = {
332
- android: /* @__PURE__ */ i(
333
- be,
332
+ ), y = {
333
+ android: /* @__PURE__ */ s(
334
+ ve,
334
335
  {
335
- id: f,
336
+ id: h,
336
337
  className: o,
337
- androidClassName: g,
338
- androidTextClassName: M,
338
+ androidClassName: f,
339
+ androidTextClassName: A,
339
340
  onClick: T,
340
341
  children: t.button.androidOnly
341
342
  }
342
343
  ),
343
- loading: /* @__PURE__ */ i(
344
- ke,
344
+ loading: /* @__PURE__ */ s(
345
+ we,
345
346
  {
346
- showLoaderOnly: _,
347
- id: f,
348
- className: u("bg-buttonHover!", o),
347
+ showLoaderOnly: b,
348
+ id: h,
349
+ className: p("bg-buttonHover!", o),
349
350
  children: t.button.loading
350
351
  }
351
352
  ),
352
- link: /* @__PURE__ */ k(B, { children: [
353
- /* @__PURE__ */ k(
354
- ve,
353
+ link: /* @__PURE__ */ w(P, { children: [
354
+ /* @__PURE__ */ w(
355
+ ye,
355
356
  {
356
- id: f,
357
- className: u(o, "flex-col gap-1"),
358
- href: c ?? "",
357
+ id: h,
358
+ className: p(o, "flex-col gap-1"),
359
+ href: d ?? "",
359
360
  onClick: O,
360
361
  children: [
361
- r,
362
- P
362
+ c,
363
+ L
363
364
  ]
364
365
  }
365
366
  ),
366
- b && /* @__PURE__ */ i(we, { message: t.button.linkError })
367
+ v && /* @__PURE__ */ s(Ce, { message: t.button.linkError })
367
368
  ] }),
368
- button: /* @__PURE__ */ k(
369
- S,
369
+ button: /* @__PURE__ */ w(
370
+ M,
370
371
  {
371
- id: f,
372
- className: u(o, "flex-col gap-1"),
372
+ id: h,
373
+ className: p(o, "flex-col gap-1"),
373
374
  size: "lg",
374
375
  onClick: N,
375
376
  children: [
376
- r,
377
- P
377
+ c,
378
+ L
378
379
  ]
379
380
  }
380
381
  )
381
382
  };
382
- return /* @__PURE__ */ i(B, { children: v[x] ?? v.button });
383
+ return /* @__PURE__ */ s(P, { children: y[x] ?? y.button });
383
384
  };
384
- function $(e, t) {
385
+ function z(e, t) {
385
386
  if (!t) return e;
386
387
  const o = { ...e };
387
388
  for (const n of Object.keys(t)) {
388
- const a = o[n], s = t[n];
389
- s !== void 0 && (typeof a == "object" && a !== null && !Array.isArray(a) && typeof s == "object" && s !== null && !Array.isArray(s) ? o[n] = $(
389
+ const a = o[n], l = t[n];
390
+ l !== void 0 && (typeof a == "object" && a !== null && !Array.isArray(a) && typeof l == "object" && l !== null && !Array.isArray(l) ? o[n] = z(
390
391
  a,
391
- s
392
- ) : o[n] = s);
392
+ l
393
+ ) : o[n] = l);
393
394
  }
394
395
  return o;
395
396
  }
396
- const xe = w(async () => ({ default: (await import("./AndroidPlatformModal-3kGO8HxK.js")).AndroidPlatformModal })), Ie = w(async () => ({ default: (await import("./GoToSafariModal-BSuOwGJ3.js")).GoToSafariModal })), Se = w(async () => ({ default: (await import("./UpdateIOSModal-CF7lFNfI.js")).UpdateIOSModal })), _e = w(async () => ({ default: (await import("./index-fWIxOyUM.js")).GetApprovedModal })), Me = w(async () => ({ default: (await import("./CheckInstallModal-Do2gfb9L.js")).CheckInstallModal })), Ae = () => {
397
- const { activeModal: e, closeModal: t, openModal: o } = z();
397
+ const xe = C(async () => ({ default: (await import("./AndroidPlatformModal-DGNUxRkK.js")).AndroidPlatformModal })), Ie = C(async () => ({ default: (await import("./GoToSafariModal-pXhEb2yy.js")).GoToSafariModal })), Se = C(async () => ({ default: (await import("./UpdateIOSModal-D-cikTQ4.js")).UpdateIOSModal })), Me = C(async () => ({ default: (await import("./index-BqoWsHcB.js")).GetApprovedModal })), Ae = C(async () => ({ default: (await import("./CheckInstallModal-BAx1q0Eh.js")).CheckInstallModal })), Ee = () => {
398
+ const { activeModal: e, closeModal: t, openModal: o } = q();
398
399
  let n = null;
399
400
  switch (e) {
400
401
  case "goToSafari":
401
- n = /* @__PURE__ */ i(Ie, { open: !0, onClose: t });
402
+ n = /* @__PURE__ */ s(Ie, { open: !0, onClose: t });
402
403
  break;
403
404
  case "updateIOS":
404
- n = /* @__PURE__ */ i(Se, { open: !0, onClose: t });
405
+ n = /* @__PURE__ */ s(Se, { open: !0, onClose: t });
405
406
  break;
406
407
  case "isAndroid":
407
- n = /* @__PURE__ */ i(xe, { open: !0, onClose: t });
408
+ n = /* @__PURE__ */ s(xe, { open: !0, onClose: t });
408
409
  break;
409
410
  case "getApproved":
410
- n = /* @__PURE__ */ i(
411
- _e,
411
+ n = /* @__PURE__ */ s(
412
+ Me,
412
413
  {
413
414
  open: !0,
414
415
  onClose: t,
@@ -417,35 +418,34 @@ const xe = w(async () => ({ default: (await import("./AndroidPlatformModal-3kGO8
417
418
  );
418
419
  break;
419
420
  case "checkInstall":
420
- n = /* @__PURE__ */ i(Me, { open: !0, onClose: t });
421
+ n = /* @__PURE__ */ s(Ae, { open: !0, onClose: t });
421
422
  break;
422
423
  default:
423
424
  n = null;
424
425
  }
425
- return /* @__PURE__ */ i(W, { fallback: null, children: n });
426
+ return /* @__PURE__ */ s(K, { fallback: null, children: n });
426
427
  }, Re = ({
427
428
  children: e,
428
429
  messages: t
429
430
  }) => {
430
431
  const o = Y(
431
- () => $(V, t),
432
+ () => z(D, t),
432
433
  [t]
433
434
  );
434
- return /* @__PURE__ */ i(j.Provider, { value: o, children: /* @__PURE__ */ k(D.Provider, { value: !0, children: [
435
+ return /* @__PURE__ */ s($.Provider, { value: o, children: /* @__PURE__ */ w(V.Provider, { value: !0, children: [
435
436
  e,
436
- /* @__PURE__ */ i(Ae, {})
437
+ /* @__PURE__ */ s(Ee, {})
437
438
  ] }) });
438
439
  };
439
440
  export {
440
- re as A,
441
- S as B,
441
+ ce as A,
442
+ M as B,
442
443
  Ue as I,
443
- ye as S,
444
- u as a,
444
+ p as a,
445
445
  Be as b,
446
- ne as c,
446
+ oe as c,
447
447
  Re as d,
448
- ce as e,
449
- V as f,
450
- le as u
448
+ de as e,
449
+ D as f,
450
+ re as u
451
451
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./install-package-Dkv3eM_d.cjs"),s=require("./useInstallUrl-iPCPqYWB.cjs"),t=require("./installUrlService-AjG03i8i.cjs"),l=require("./utils.cjs");exports.AVERAGE_CHECK_TIME=e.AVERAGE_CHECK_TIME;exports.AVERAGE_INSTALL_TIME=e.AVERAGE_INSTALL_TIME;exports.AVERAGE_LOADING_TIME=e.AVERAGE_LOADING_TIME;exports.InstallAppButton=e.InstallAppButton;exports.InstallWidgetProvider=e.InstallWidgetProvider;exports.defaultMessages=e.defaultMessages;exports.useInstallUrl=s.useInstallUrl;exports.useInstallUrlStore=s.useInstallUrlStore;exports.generateUUID=t.generateUUID;exports.getCookie=t.getCookie;exports.getInstallUrl=t.getInstallUrl;exports.getOnsideToken=t.getOnsideToken;exports.setCookie=t.setCookie;exports.compareVersions=l.compareVersions;exports.getDeviceInfo=l.getDeviceInfo;exports.resolveInstallConditions=l.resolveInstallConditions;exports.trackEvent=l.trackEvent;exports.trackModalEvent=l.trackModalEvent;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./install-package-5TE9fTFQ.cjs"),s=require("./useInstallUrl-iPCPqYWB.cjs"),t=require("./installUrlService-AjG03i8i.cjs"),l=require("./utils.cjs");exports.AVERAGE_CHECK_TIME=e.AVERAGE_CHECK_TIME;exports.AVERAGE_INSTALL_TIME=e.AVERAGE_INSTALL_TIME;exports.AVERAGE_LOADING_TIME=e.AVERAGE_LOADING_TIME;exports.InstallAppButton=e.InstallAppButton;exports.InstallWidgetProvider=e.InstallWidgetProvider;exports.defaultMessages=e.defaultMessages;exports.useInstallUrl=s.useInstallUrl;exports.useInstallUrlStore=s.useInstallUrlStore;exports.generateUUID=t.generateUUID;exports.getCookie=t.getCookie;exports.getInstallUrl=t.getInstallUrl;exports.getOnsideToken=t.getOnsideToken;exports.setCookie=t.setCookie;exports.compareVersions=l.compareVersions;exports.getDeviceInfo=l.getDeviceInfo;exports.resolveInstallConditions=l.resolveInstallConditions;exports.trackEvent=l.trackEvent;exports.trackModalEvent=l.trackModalEvent;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { A as a, b as t, e as o, I as r, d as l, f as n } from "./install-package-CZGZODly.js";
2
+ import { A as a, b as t, e as o, I as r, d as l, f as n } from "./install-package-S3saul1C.js";
3
3
  import { u as E, a as i } from "./useInstallUrl-McaAuMPK.js";
4
4
  import { c as g, b as d, g as f, a as p, s as c } from "./installUrlService-CrJfYPwM.js";
5
5
  import { compareVersions as _, getDeviceInfo as k, resolveInstallConditions as m, trackEvent as v, trackModalEvent as C } from "./utils.js";