@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.
- package/dist-lib/{AndroidPlatformModal-B_uF1M7D.cjs → AndroidPlatformModal-Bo8KL9YE.cjs} +1 -1
- package/dist-lib/{AndroidPlatformModal-3kGO8HxK.js → AndroidPlatformModal-DGNUxRkK.js} +2 -2
- package/dist-lib/{CheckInstallModal-Do2gfb9L.js → CheckInstallModal-BAx1q0Eh.js} +3 -3
- package/dist-lib/{CheckInstallModal-ClGHu6XA.cjs → CheckInstallModal-CamMs4Ky.cjs} +1 -1
- package/dist-lib/{Dialog-B1D2BvMl.js → Dialog-BpvFTl3s.js} +1 -1
- package/dist-lib/{Dialog-BRBYK08a.cjs → Dialog-H1GsCMbd.cjs} +1 -1
- package/dist-lib/{FaqModal-J1y4DGzd.js → FaqModal-B6YPov5t.js} +3 -3
- package/dist-lib/{FaqModal-BspE3dHf.cjs → FaqModal-BYENishJ.cjs} +1 -1
- package/dist-lib/{GoToSafariModal-Be-O5A-M.cjs → GoToSafariModal-B1EWxzWE.cjs} +1 -1
- package/dist-lib/{GoToSafariModal-BSuOwGJ3.js → GoToSafariModal-pXhEb2yy.js} +2 -2
- package/dist-lib/{UpdateIOSModal-Mxvo1zPl.cjs → UpdateIOSModal-B-jqDkQO.cjs} +1 -1
- package/dist-lib/{UpdateIOSModal-CF7lFNfI.js → UpdateIOSModal-D-cikTQ4.js} +3 -3
- package/dist-lib/{cdn-BmfyFccQ.js → cdn-DQucWvIe.js} +1 -1
- package/dist-lib/{cdn-BonUyxCA.cjs → cdn-ToXHpWOt.cjs} +1 -1
- package/dist-lib/{index-fWIxOyUM.js → index-BqoWsHcB.js} +59 -58
- package/dist-lib/index-DFXiHkdo.cjs +1 -0
- package/dist-lib/install-package-5TE9fTFQ.cjs +1 -0
- package/dist-lib/{install-package-CZGZODly.js → install-package-S3saul1C.js} +170 -170
- package/dist-lib/install-package.cjs +1 -1
- package/dist-lib/install-package.js +1 -1
- package/dist-lib/install-widget.css +1 -1
- package/package.json +10 -2
- package/dist-lib/index-BzQo1EMv.cjs +0 -1
- package/dist-lib/install-package-Dkv3eM_d.cjs +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { S as
|
|
5
|
-
import { trackModalEvent as
|
|
6
|
-
import { create as
|
|
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
|
|
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
|
|
22
|
-
return
|
|
21
|
+
function p(...e) {
|
|
22
|
+
return oe(e);
|
|
23
23
|
}
|
|
24
|
-
const
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
|
55
|
-
const o = t.variant ?? "primary", n = t.color ?? "blue", a = t.size ?? "md",
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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__ */
|
|
63
|
-
const
|
|
64
|
-
return /* @__PURE__ */
|
|
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
|
|
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${
|
|
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${
|
|
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${
|
|
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
|
-
},
|
|
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
|
-
})),
|
|
155
|
+
})), ue = {
|
|
156
156
|
INSTALL_BUTTON_CLICK: "install_button_click"
|
|
157
|
-
},
|
|
157
|
+
}, pe = (e = {}, t) => ({
|
|
158
158
|
trackInstallEvent: (a) => {
|
|
159
|
-
const
|
|
159
|
+
const l = X(ue.INSTALL_BUTTON_CLICK, {
|
|
160
160
|
...e,
|
|
161
161
|
event_type: a
|
|
162
162
|
});
|
|
163
|
-
|
|
163
|
+
l && t?.onEvent?.(l);
|
|
164
164
|
},
|
|
165
165
|
trackOpenModalEvent: (a) => {
|
|
166
|
-
const
|
|
166
|
+
const l = J(a, "opened", "install_button", {
|
|
167
167
|
...e
|
|
168
168
|
});
|
|
169
|
-
|
|
169
|
+
l && t?.onEvent?.(l);
|
|
170
170
|
}
|
|
171
|
-
}),
|
|
172
|
-
e(
|
|
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
|
-
|
|
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:
|
|
178
|
+
page: l,
|
|
179
179
|
location: o,
|
|
180
180
|
button_id: t ?? void 0,
|
|
181
|
-
onside_token:
|
|
182
|
-
attribution_token:
|
|
181
|
+
onside_token: A ?? void 0,
|
|
182
|
+
attribution_token: E ?? void 0
|
|
183
183
|
},
|
|
184
184
|
n
|
|
185
|
-
),
|
|
186
|
-
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
},
|
|
190
|
-
return () => clearTimeout(
|
|
185
|
+
), m = I(() => {
|
|
186
|
+
k(!0);
|
|
187
|
+
const y = setTimeout(() => {
|
|
188
|
+
k(!1);
|
|
189
|
+
}, de);
|
|
190
|
+
return () => clearTimeout(y);
|
|
191
191
|
}, []), O = I(
|
|
192
|
-
(
|
|
193
|
-
if (!
|
|
194
|
-
|
|
192
|
+
(y) => {
|
|
193
|
+
if (!f || !Z) {
|
|
194
|
+
y.preventDefault();
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
|
-
if (
|
|
197
|
+
if (m(), a) {
|
|
198
198
|
setTimeout(() => a(), 100);
|
|
199
199
|
return;
|
|
200
200
|
}
|
|
201
|
-
|
|
202
|
-
if (
|
|
201
|
+
he(v, i.usesNewInstallFlow), setTimeout(() => {
|
|
202
|
+
if (i.usesNewInstallFlow) {
|
|
203
203
|
clearTimeout(x.current), x.current = setTimeout(() => {
|
|
204
|
-
|
|
205
|
-
},
|
|
204
|
+
c("checkInstall"), d("check_install");
|
|
205
|
+
}, ce);
|
|
206
206
|
return;
|
|
207
207
|
}
|
|
208
|
-
|
|
208
|
+
c("getApproved"), d("get_approved");
|
|
209
209
|
}, 100);
|
|
210
210
|
},
|
|
211
211
|
[
|
|
212
|
-
|
|
212
|
+
f,
|
|
213
213
|
a,
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
i.usesNewInstallFlow,
|
|
215
|
+
v,
|
|
216
|
+
d,
|
|
216
217
|
c,
|
|
217
|
-
|
|
218
|
-
h
|
|
218
|
+
m
|
|
219
219
|
]
|
|
220
220
|
), N = I(() => {
|
|
221
|
-
if (
|
|
222
|
-
|
|
221
|
+
if (m(), i.installState === "go_to_safari") {
|
|
222
|
+
d("go_to_safari"), c("goToSafari");
|
|
223
223
|
return;
|
|
224
224
|
}
|
|
225
|
-
if (
|
|
226
|
-
|
|
225
|
+
if (i.installState === "update_ios") {
|
|
226
|
+
d("update_ios"), c("updateIOS");
|
|
227
227
|
return;
|
|
228
228
|
}
|
|
229
|
-
|
|
229
|
+
me(v);
|
|
230
230
|
}, [
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
231
|
+
i.installState,
|
|
232
|
+
c,
|
|
233
|
+
m,
|
|
234
|
+
v,
|
|
235
|
+
d
|
|
236
236
|
]), T = I(() => {
|
|
237
|
-
|
|
238
|
-
}, [
|
|
237
|
+
d("is_android"), c("isAndroid");
|
|
238
|
+
}, [c, d]);
|
|
239
239
|
return {
|
|
240
|
-
viewMode:
|
|
241
|
-
installUrl:
|
|
242
|
-
error:
|
|
243
|
-
isEligible:
|
|
244
|
-
conditions:
|
|
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
|
-
},
|
|
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:
|
|
256
|
-
}) => /* @__PURE__ */
|
|
257
|
-
|
|
255
|
+
androidTextClassName: l
|
|
256
|
+
}) => /* @__PURE__ */ s(
|
|
257
|
+
M,
|
|
258
258
|
{
|
|
259
259
|
id: n,
|
|
260
|
-
className:
|
|
260
|
+
className: p("bg-white px-7", e, a),
|
|
261
261
|
variant: "secondary",
|
|
262
262
|
size: "lg",
|
|
263
263
|
onClick: t,
|
|
264
|
-
children: /* @__PURE__ */
|
|
265
|
-
/* @__PURE__ */
|
|
266
|
-
/* @__PURE__ */
|
|
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
|
-
),
|
|
269
|
+
), ye = ({
|
|
270
270
|
href: e,
|
|
271
271
|
onClick: t,
|
|
272
272
|
children: o,
|
|
273
273
|
className: n,
|
|
274
274
|
id: a
|
|
275
|
-
}) => /* @__PURE__ */
|
|
276
|
-
|
|
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
|
-
),
|
|
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__ */
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
|
|
290
|
-
] }) });
|
|
291
|
-
},
|
|
292
|
-
const t =
|
|
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:
|
|
297
|
-
caption:
|
|
298
|
-
captionClassName:
|
|
299
|
-
showCaption:
|
|
300
|
-
showLoaderOnly:
|
|
301
|
-
androidClassName:
|
|
302
|
-
androidTextClassName:
|
|
303
|
-
customAnalytics:
|
|
304
|
-
id:
|
|
305
|
-
} = e,
|
|
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:
|
|
308
|
-
error:
|
|
309
|
-
isEligible:
|
|
308
|
+
installUrl: d,
|
|
309
|
+
error: v,
|
|
310
|
+
isEligible: m,
|
|
310
311
|
handleInstallClick: O,
|
|
311
312
|
handleModalFlowClick: N,
|
|
312
313
|
handleAndroidClick: T
|
|
313
|
-
} =
|
|
314
|
-
id:
|
|
315
|
-
location:
|
|
316
|
-
customAnalytics:
|
|
314
|
+
} = ge({
|
|
315
|
+
id: h,
|
|
316
|
+
location: l,
|
|
317
|
+
customAnalytics: E,
|
|
317
318
|
handleCustomStep: a,
|
|
318
|
-
pathname:
|
|
319
|
+
pathname: _.current
|
|
319
320
|
});
|
|
320
|
-
|
|
321
|
-
}, [
|
|
322
|
-
const
|
|
321
|
+
W(() => {
|
|
322
|
+
}, [k]);
|
|
323
|
+
const L = r && (!m || i) && /* @__PURE__ */ s(
|
|
323
324
|
"div",
|
|
324
325
|
{
|
|
325
|
-
className:
|
|
326
|
+
className: p(
|
|
326
327
|
"text-2xs font-mono opacity-60",
|
|
327
|
-
|
|
328
|
+
g
|
|
328
329
|
),
|
|
329
|
-
children:
|
|
330
|
+
children: m ? i : t.button.regionUnavailable
|
|
330
331
|
}
|
|
331
|
-
),
|
|
332
|
-
android: /* @__PURE__ */
|
|
333
|
-
|
|
332
|
+
), y = {
|
|
333
|
+
android: /* @__PURE__ */ s(
|
|
334
|
+
ve,
|
|
334
335
|
{
|
|
335
|
-
id:
|
|
336
|
+
id: h,
|
|
336
337
|
className: o,
|
|
337
|
-
androidClassName:
|
|
338
|
-
androidTextClassName:
|
|
338
|
+
androidClassName: f,
|
|
339
|
+
androidTextClassName: A,
|
|
339
340
|
onClick: T,
|
|
340
341
|
children: t.button.androidOnly
|
|
341
342
|
}
|
|
342
343
|
),
|
|
343
|
-
loading: /* @__PURE__ */
|
|
344
|
-
|
|
344
|
+
loading: /* @__PURE__ */ s(
|
|
345
|
+
we,
|
|
345
346
|
{
|
|
346
|
-
showLoaderOnly:
|
|
347
|
-
id:
|
|
348
|
-
className:
|
|
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__ */
|
|
353
|
-
/* @__PURE__ */
|
|
354
|
-
|
|
353
|
+
link: /* @__PURE__ */ w(P, { children: [
|
|
354
|
+
/* @__PURE__ */ w(
|
|
355
|
+
ye,
|
|
355
356
|
{
|
|
356
|
-
id:
|
|
357
|
-
className:
|
|
358
|
-
href:
|
|
357
|
+
id: h,
|
|
358
|
+
className: p(o, "flex-col gap-1"),
|
|
359
|
+
href: d ?? "",
|
|
359
360
|
onClick: O,
|
|
360
361
|
children: [
|
|
361
|
-
|
|
362
|
-
|
|
362
|
+
c,
|
|
363
|
+
L
|
|
363
364
|
]
|
|
364
365
|
}
|
|
365
366
|
),
|
|
366
|
-
|
|
367
|
+
v && /* @__PURE__ */ s(Ce, { message: t.button.linkError })
|
|
367
368
|
] }),
|
|
368
|
-
button: /* @__PURE__ */
|
|
369
|
-
|
|
369
|
+
button: /* @__PURE__ */ w(
|
|
370
|
+
M,
|
|
370
371
|
{
|
|
371
|
-
id:
|
|
372
|
-
className:
|
|
372
|
+
id: h,
|
|
373
|
+
className: p(o, "flex-col gap-1"),
|
|
373
374
|
size: "lg",
|
|
374
375
|
onClick: N,
|
|
375
376
|
children: [
|
|
376
|
-
|
|
377
|
-
|
|
377
|
+
c,
|
|
378
|
+
L
|
|
378
379
|
]
|
|
379
380
|
}
|
|
380
381
|
)
|
|
381
382
|
};
|
|
382
|
-
return /* @__PURE__ */
|
|
383
|
+
return /* @__PURE__ */ s(P, { children: y[x] ?? y.button });
|
|
383
384
|
};
|
|
384
|
-
function
|
|
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],
|
|
389
|
-
|
|
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
|
-
|
|
392
|
-
) : o[n] =
|
|
392
|
+
l
|
|
393
|
+
) : o[n] = l);
|
|
393
394
|
}
|
|
394
395
|
return o;
|
|
395
396
|
}
|
|
396
|
-
const xe =
|
|
397
|
-
const { activeModal: e, closeModal: t, openModal: o } =
|
|
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__ */
|
|
402
|
+
n = /* @__PURE__ */ s(Ie, { open: !0, onClose: t });
|
|
402
403
|
break;
|
|
403
404
|
case "updateIOS":
|
|
404
|
-
n = /* @__PURE__ */
|
|
405
|
+
n = /* @__PURE__ */ s(Se, { open: !0, onClose: t });
|
|
405
406
|
break;
|
|
406
407
|
case "isAndroid":
|
|
407
|
-
n = /* @__PURE__ */
|
|
408
|
+
n = /* @__PURE__ */ s(xe, { open: !0, onClose: t });
|
|
408
409
|
break;
|
|
409
410
|
case "getApproved":
|
|
410
|
-
n = /* @__PURE__ */
|
|
411
|
-
|
|
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__ */
|
|
421
|
+
n = /* @__PURE__ */ s(Ae, { open: !0, onClose: t });
|
|
421
422
|
break;
|
|
422
423
|
default:
|
|
423
424
|
n = null;
|
|
424
425
|
}
|
|
425
|
-
return /* @__PURE__ */
|
|
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
|
-
() =>
|
|
432
|
+
() => z(D, t),
|
|
432
433
|
[t]
|
|
433
434
|
);
|
|
434
|
-
return /* @__PURE__ */
|
|
435
|
+
return /* @__PURE__ */ s($.Provider, { value: o, children: /* @__PURE__ */ w(V.Provider, { value: !0, children: [
|
|
435
436
|
e,
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ s(Ee, {})
|
|
437
438
|
] }) });
|
|
438
439
|
};
|
|
439
440
|
export {
|
|
440
|
-
|
|
441
|
-
|
|
441
|
+
ce as A,
|
|
442
|
+
M as B,
|
|
442
443
|
Ue as I,
|
|
443
|
-
|
|
444
|
-
u as a,
|
|
444
|
+
p as a,
|
|
445
445
|
Be as b,
|
|
446
|
-
|
|
446
|
+
oe as c,
|
|
447
447
|
Re as d,
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
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-
|
|
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-
|
|
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";
|