@appfunnel-dev/sdk 2.0.0 → 2.0.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/CHANGELOG.md +41 -3
- package/dist/{checkout-BYcOfyg_.d.ts → checkout-B1K6ozwk.d.ts} +6 -0
- package/dist/{checkout-BM1T-u6_.d.cts → checkout-C4tFUEdF.d.cts} +6 -0
- package/dist/{chunk-MBTHQP4Z.cjs → chunk-DTSLJ24T.cjs} +11 -3
- package/dist/chunk-DTSLJ24T.cjs.map +1 -0
- package/dist/{chunk-NA7DRFOA.cjs → chunk-E7JXWUNV.cjs} +55 -17
- package/dist/chunk-E7JXWUNV.cjs.map +1 -0
- package/dist/{chunk-KVMNVX6J.js → chunk-USAECFWO.js} +11 -3
- package/dist/chunk-USAECFWO.js.map +1 -0
- package/dist/{chunk-PN7CRJAF.js → chunk-WCBVSZHJ.js} +55 -17
- package/dist/chunk-WCBVSZHJ.js.map +1 -0
- package/dist/driver-paddle.cjs +14 -14
- package/dist/driver-paddle.d.cts +1 -1
- package/dist/driver-paddle.d.ts +1 -1
- package/dist/driver-paddle.js +1 -1
- package/dist/driver-stripe.cjs +15 -15
- package/dist/driver-stripe.d.cts +1 -1
- package/dist/driver-stripe.d.ts +1 -1
- package/dist/driver-stripe.js +2 -2
- package/dist/index.cjs +78 -67
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -6
- package/dist/index.d.ts +25 -6
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/{manifest-BajvtPWs.d.cts → manifest-Dp1oRvqp.d.cts} +23 -0
- package/dist/{manifest-BajvtPWs.d.ts → manifest-Dp1oRvqp.d.ts} +23 -0
- package/dist/manifest-entry.cjs +9 -1
- package/dist/manifest-entry.cjs.map +1 -1
- package/dist/manifest-entry.d.cts +15 -2
- package/dist/manifest-entry.d.ts +15 -2
- package/dist/manifest-entry.js +9 -1
- package/dist/manifest-entry.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-KVMNVX6J.js.map +0 -1
- package/dist/chunk-MBTHQP4Z.cjs.map +0 -1
- package/dist/chunk-NA7DRFOA.cjs.map +0 -1
- package/dist/chunk-PN7CRJAF.js.map +0 -1
package/dist/driver-paddle.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkDTSLJ24T_cjs = require('./chunk-DTSLJ24T.cjs');
|
|
4
4
|
var chunkRUYT27DT_cjs = require('./chunk-RUYT27DT.cjs');
|
|
5
5
|
require('./chunk-O7I5CWRX.cjs');
|
|
6
6
|
var react = require('react');
|
|
@@ -653,7 +653,7 @@ async function openCheckout(ctx, session, correlationId, appearance, display) {
|
|
|
653
653
|
if (event.name === "checkout.completed") {
|
|
654
654
|
done = true;
|
|
655
655
|
listeners.delete(listener);
|
|
656
|
-
void
|
|
656
|
+
void chunkDTSLJ24T_cjs.completeWithPoll(ctx, correlationId, {
|
|
657
657
|
attempts: 10,
|
|
658
658
|
intervalMs: 3e3,
|
|
659
659
|
timeoutMessage: PADDLE_TIMEOUT_MESSAGE
|
|
@@ -692,29 +692,29 @@ function paddleCheckoutDriver(ctx) {
|
|
|
692
692
|
if (prior) {
|
|
693
693
|
pendingTimeouts.delete(priorKey);
|
|
694
694
|
try {
|
|
695
|
-
const check = await
|
|
696
|
-
if (check.step === "settled") return
|
|
695
|
+
const check = await chunkDTSLJ24T_cjs.postComplete(ctx, prior);
|
|
696
|
+
if (check.step === "settled") return chunkDTSLJ24T_cjs.settlementToResult(check.result);
|
|
697
697
|
} catch {
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
700
|
const correlationId = crypto.randomUUID();
|
|
701
701
|
try {
|
|
702
|
-
const session = await
|
|
702
|
+
const session = await chunkDTSLJ24T_cjs.postSession(ctx, req, correlationId);
|
|
703
703
|
switch (session.step) {
|
|
704
704
|
case "settled":
|
|
705
|
-
return
|
|
705
|
+
return chunkDTSLJ24T_cjs.settlementToResult(session.result);
|
|
706
706
|
case "pending":
|
|
707
707
|
return rememberIfStillPending(
|
|
708
708
|
req,
|
|
709
709
|
correlationId,
|
|
710
|
-
await
|
|
710
|
+
await chunkDTSLJ24T_cjs.completeWithPoll(ctx, correlationId, {
|
|
711
711
|
timeoutMessage: PADDLE_PENDING_TIMEOUT_MESSAGE
|
|
712
712
|
})
|
|
713
713
|
);
|
|
714
714
|
case "failed":
|
|
715
715
|
return { ok: false, error: session.error };
|
|
716
716
|
case "redirect":
|
|
717
|
-
return
|
|
717
|
+
return chunkDTSLJ24T_cjs.leaveForRedirect(session.url);
|
|
718
718
|
case "provider_checkout":
|
|
719
719
|
return rememberIfStillPending(
|
|
720
720
|
req,
|
|
@@ -733,7 +733,7 @@ function paddleCheckoutDriver(ctx) {
|
|
|
733
733
|
};
|
|
734
734
|
}
|
|
735
735
|
} catch (e) {
|
|
736
|
-
return { ok: false, error:
|
|
736
|
+
return { ok: false, error: chunkDTSLJ24T_cjs.toCheckoutError(e) };
|
|
737
737
|
}
|
|
738
738
|
},
|
|
739
739
|
renderInline(req, cb) {
|
|
@@ -742,7 +742,7 @@ function paddleCheckoutDriver(ctx) {
|
|
|
742
742
|
// Redirect-return resume: verify an existing attempt. Webhook-dependent, so it
|
|
743
743
|
// gets the same ~10×3s window the overlay completion poll uses.
|
|
744
744
|
resume(correlationId) {
|
|
745
|
-
return
|
|
745
|
+
return chunkDTSLJ24T_cjs.completeWithPoll(ctx, correlationId, {
|
|
746
746
|
attempts: 10,
|
|
747
747
|
intervalMs: 3e3,
|
|
748
748
|
timeoutMessage: PADDLE_TIMEOUT_MESSAGE
|
|
@@ -764,7 +764,7 @@ function PaddleInline({
|
|
|
764
764
|
let disposed = false;
|
|
765
765
|
void (async () => {
|
|
766
766
|
try {
|
|
767
|
-
const session = await
|
|
767
|
+
const session = await chunkDTSLJ24T_cjs.postSession(ctx, req, correlationId);
|
|
768
768
|
if (disposed) return;
|
|
769
769
|
switch (session.step) {
|
|
770
770
|
case "provider_checkout": {
|
|
@@ -784,13 +784,13 @@ function PaddleInline({
|
|
|
784
784
|
return;
|
|
785
785
|
}
|
|
786
786
|
case "settled":
|
|
787
|
-
cbRef.current.onSuccess(
|
|
787
|
+
cbRef.current.onSuccess(chunkDTSLJ24T_cjs.settlementToResult(session.result));
|
|
788
788
|
return;
|
|
789
789
|
case "failed":
|
|
790
790
|
cbRef.current.onError(session.error);
|
|
791
791
|
return;
|
|
792
792
|
case "redirect": {
|
|
793
|
-
const result = await
|
|
793
|
+
const result = await chunkDTSLJ24T_cjs.leaveForRedirect(session.url);
|
|
794
794
|
if (!disposed && !result.ok) {
|
|
795
795
|
cbRef.current.onError(result.error ?? chunkRUYT27DT_cjs.checkoutError("canceled", "Checkout was canceled"));
|
|
796
796
|
}
|
|
@@ -802,7 +802,7 @@ function PaddleInline({
|
|
|
802
802
|
);
|
|
803
803
|
}
|
|
804
804
|
} catch (e) {
|
|
805
|
-
if (!disposed) cbRef.current.onError(
|
|
805
|
+
if (!disposed) cbRef.current.onError(chunkDTSLJ24T_cjs.toCheckoutError(e));
|
|
806
806
|
}
|
|
807
807
|
})();
|
|
808
808
|
return () => {
|
package/dist/driver-paddle.d.cts
CHANGED
package/dist/driver-paddle.d.ts
CHANGED
package/dist/driver-paddle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { completeWithPoll, postComplete, settlementToResult, postSession, leaveForRedirect, toCheckoutError } from './chunk-
|
|
1
|
+
import { completeWithPoll, postComplete, settlementToResult, postSession, leaveForRedirect, toCheckoutError } from './chunk-USAECFWO.js';
|
|
2
2
|
import { checkoutError } from './chunk-QENSJ6JB.js';
|
|
3
3
|
import './chunk-PR4QN5HX.js';
|
|
4
4
|
import { createElement, useState, useId, useRef, useEffect } from 'react';
|
package/dist/driver-stripe.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkE7JXWUNV_cjs = require('./chunk-E7JXWUNV.cjs');
|
|
4
4
|
require('./chunk-6KTFVZA4.cjs');
|
|
5
5
|
require('./chunk-JL42MNGM.cjs');
|
|
6
6
|
require('./chunk-5HUJEI26.cjs');
|
|
7
|
-
var
|
|
7
|
+
var chunkDTSLJ24T_cjs = require('./chunk-DTSLJ24T.cjs');
|
|
8
8
|
var chunkRUYT27DT_cjs = require('./chunk-RUYT27DT.cjs');
|
|
9
9
|
var chunkO7I5CWRX_cjs = require('./chunk-O7I5CWRX.cjs');
|
|
10
10
|
var React = require('react');
|
|
@@ -2073,14 +2073,14 @@ function stripeCheckoutDriver(ctx) {
|
|
|
2073
2073
|
async start(req) {
|
|
2074
2074
|
const correlationId = crypto.randomUUID();
|
|
2075
2075
|
try {
|
|
2076
|
-
const session = await
|
|
2076
|
+
const session = await chunkDTSLJ24T_cjs.postSession(ctx, req, correlationId);
|
|
2077
2077
|
switch (session.step) {
|
|
2078
2078
|
case "settled":
|
|
2079
|
-
return
|
|
2079
|
+
return chunkDTSLJ24T_cjs.settlementToResult(session.result);
|
|
2080
2080
|
case "failed":
|
|
2081
2081
|
return { ok: false, error: session.error };
|
|
2082
2082
|
case "redirect":
|
|
2083
|
-
return
|
|
2083
|
+
return chunkDTSLJ24T_cjs.leaveForRedirect(session.url);
|
|
2084
2084
|
case "pending":
|
|
2085
2085
|
return {
|
|
2086
2086
|
ok: false,
|
|
@@ -2099,7 +2099,7 @@ function stripeCheckoutDriver(ctx) {
|
|
|
2099
2099
|
};
|
|
2100
2100
|
}
|
|
2101
2101
|
} catch (e) {
|
|
2102
|
-
return { ok: false, error:
|
|
2102
|
+
return { ok: false, error: chunkDTSLJ24T_cjs.toCheckoutError(e) };
|
|
2103
2103
|
}
|
|
2104
2104
|
},
|
|
2105
2105
|
renderInline(req, cb) {
|
|
@@ -2108,7 +2108,7 @@ function stripeCheckoutDriver(ctx) {
|
|
|
2108
2108
|
// Redirect-return resume: verify an existing attempt (Stripe settles /complete
|
|
2109
2109
|
// synchronously — the bounded poll only covers a `processing` intent tail).
|
|
2110
2110
|
resume(correlationId) {
|
|
2111
|
-
return
|
|
2111
|
+
return chunkDTSLJ24T_cjs.completeWithPoll(ctx, correlationId);
|
|
2112
2112
|
}
|
|
2113
2113
|
};
|
|
2114
2114
|
}
|
|
@@ -2125,7 +2125,7 @@ function StripeInline({
|
|
|
2125
2125
|
let disposed = false;
|
|
2126
2126
|
void (async () => {
|
|
2127
2127
|
try {
|
|
2128
|
-
const session = await
|
|
2128
|
+
const session = await chunkDTSLJ24T_cjs.postSession(ctx, req, correlationId);
|
|
2129
2129
|
if (disposed) return;
|
|
2130
2130
|
switch (session.step) {
|
|
2131
2131
|
case "client_confirm":
|
|
@@ -2138,13 +2138,13 @@ function StripeInline({
|
|
|
2138
2138
|
return;
|
|
2139
2139
|
}
|
|
2140
2140
|
case "settled":
|
|
2141
|
-
cbRef.current.onSuccess(
|
|
2141
|
+
cbRef.current.onSuccess(chunkDTSLJ24T_cjs.settlementToResult(session.result));
|
|
2142
2142
|
return;
|
|
2143
2143
|
case "failed":
|
|
2144
2144
|
cbRef.current.onError(session.error);
|
|
2145
2145
|
return;
|
|
2146
2146
|
case "redirect": {
|
|
2147
|
-
const result = await
|
|
2147
|
+
const result = await chunkDTSLJ24T_cjs.leaveForRedirect(session.url);
|
|
2148
2148
|
if (!disposed && !result.ok) {
|
|
2149
2149
|
cbRef.current.onError(result.error ?? chunkRUYT27DT_cjs.checkoutError("canceled", "Checkout was canceled"));
|
|
2150
2150
|
}
|
|
@@ -2156,7 +2156,7 @@ function StripeInline({
|
|
|
2156
2156
|
);
|
|
2157
2157
|
}
|
|
2158
2158
|
} catch (e) {
|
|
2159
|
-
if (!disposed) cbRef.current.onError(
|
|
2159
|
+
if (!disposed) cbRef.current.onError(chunkDTSLJ24T_cjs.toCheckoutError(e));
|
|
2160
2160
|
}
|
|
2161
2161
|
})();
|
|
2162
2162
|
return () => {
|
|
@@ -2170,12 +2170,12 @@ function StripeInline({
|
|
|
2170
2170
|
cbRef.current.onStart?.();
|
|
2171
2171
|
}, [phase.at]);
|
|
2172
2172
|
const finish = async (providerRef) => {
|
|
2173
|
-
const result = await
|
|
2173
|
+
const result = await chunkDTSLJ24T_cjs.completeWithPoll(ctx, correlationId, { providerRef });
|
|
2174
2174
|
if (result.ok) cbRef.current.onSuccess(result);
|
|
2175
2175
|
else cbRef.current.onError(result.error ?? chunkRUYT27DT_cjs.checkoutError("unknown", "Checkout failed"));
|
|
2176
2176
|
};
|
|
2177
2177
|
const reportFailure = (providerRef) => {
|
|
2178
|
-
void
|
|
2178
|
+
void chunkDTSLJ24T_cjs.postComplete(ctx, correlationId, providerRef).catch(() => {
|
|
2179
2179
|
});
|
|
2180
2180
|
};
|
|
2181
2181
|
let inner = null;
|
|
@@ -2292,12 +2292,12 @@ function ConfirmForm({
|
|
|
2292
2292
|
await finish(paymentIntent?.id);
|
|
2293
2293
|
}
|
|
2294
2294
|
} catch (e) {
|
|
2295
|
-
onError(
|
|
2295
|
+
onError(chunkDTSLJ24T_cjs.toCheckoutError(e));
|
|
2296
2296
|
} finally {
|
|
2297
2297
|
setSubmitting(false);
|
|
2298
2298
|
}
|
|
2299
2299
|
};
|
|
2300
|
-
|
|
2300
|
+
chunkE7JXWUNV_cjs.ensureCheckoutButtonStyles();
|
|
2301
2301
|
const submit = React.createElement(
|
|
2302
2302
|
"button",
|
|
2303
2303
|
{
|
package/dist/driver-stripe.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
-
import { C as CheckoutDriverContext, a as CheckoutDriver } from './checkout-
|
|
2
|
+
import { C as CheckoutDriverContext, a as CheckoutDriver } from './checkout-C4tFUEdF.cjs';
|
|
3
3
|
import '@stripe/stripe-js';
|
|
4
4
|
import '@paddle/paddle-js';
|
|
5
5
|
import './capabilities-BtnJi2JD.cjs';
|
package/dist/driver-stripe.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
-
import { C as CheckoutDriverContext, a as CheckoutDriver } from './checkout-
|
|
2
|
+
import { C as CheckoutDriverContext, a as CheckoutDriver } from './checkout-B1K6ozwk.js';
|
|
3
3
|
import '@stripe/stripe-js';
|
|
4
4
|
import '@paddle/paddle-js';
|
|
5
5
|
import './capabilities-BtnJi2JD.js';
|
package/dist/driver-stripe.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ensureCheckoutButtonStyles } from './chunk-
|
|
1
|
+
import { ensureCheckoutButtonStyles } from './chunk-WCBVSZHJ.js';
|
|
2
2
|
import './chunk-WIFTHXF5.js';
|
|
3
3
|
import './chunk-U5R4ILJT.js';
|
|
4
4
|
import './chunk-XEIWE7NY.js';
|
|
5
|
-
import { completeWithPoll, postSession, leaveForRedirect, settlementToResult, toCheckoutError, postComplete } from './chunk-
|
|
5
|
+
import { completeWithPoll, postSession, leaveForRedirect, settlementToResult, toCheckoutError, postComplete } from './chunk-USAECFWO.js';
|
|
6
6
|
import { checkoutError } from './chunk-QENSJ6JB.js';
|
|
7
7
|
import { __commonJS, __toESM, __export } from './chunk-PR4QN5HX.js';
|
|
8
8
|
import React, { createElement, useState, useRef, useEffect } from 'react';
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkOR4NHLLL_cjs = require('./chunk-OR4NHLLL.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkE7JXWUNV_cjs = require('./chunk-E7JXWUNV.cjs');
|
|
5
5
|
var chunk6KTFVZA4_cjs = require('./chunk-6KTFVZA4.cjs');
|
|
6
6
|
require('./chunk-JL42MNGM.cjs');
|
|
7
7
|
require('./chunk-5HUJEI26.cjs');
|
|
@@ -29,7 +29,7 @@ function resolveMeasurementSystem(contextRegion) {
|
|
|
29
29
|
return measurementSystemForCountry(contextRegion) ?? measurementSystemForCountry(navigatorRegion()) ?? "metric";
|
|
30
30
|
}
|
|
31
31
|
function useMeasurementSystem() {
|
|
32
|
-
const region =
|
|
32
|
+
const region = chunkE7JXWUNV_cjs.useLocale().region;
|
|
33
33
|
const [system, setSystem] = react.useState("metric");
|
|
34
34
|
react.useEffect(() => {
|
|
35
35
|
setSystem(resolveMeasurementSystem(region));
|
|
@@ -239,7 +239,7 @@ function sessionStorageKey(cfg) {
|
|
|
239
239
|
return `af_sid:${cfg.campaignId}`;
|
|
240
240
|
}
|
|
241
241
|
function createPlatformTracker(cfg) {
|
|
242
|
-
if (typeof window === "undefined") return
|
|
242
|
+
if (typeof window === "undefined") return chunkE7JXWUNV_cjs.createConsoleTracker();
|
|
243
243
|
const url = ingestEndpoint(cfg);
|
|
244
244
|
const landingUrl = window.location.href;
|
|
245
245
|
const sidKey = sessionStorageKey(cfg);
|
|
@@ -360,7 +360,7 @@ function createPlatformTracker(cfg) {
|
|
|
360
360
|
} catch {
|
|
361
361
|
}
|
|
362
362
|
if (cfg.experiment?.id && cfg.experiment.variant) {
|
|
363
|
-
enqueue("experiment.exposure",
|
|
363
|
+
enqueue("experiment.exposure", chunkE7JXWUNV_cjs.exposurePayload(cfg.experiment.id, cfg.experiment.variant, cfg.experiment.version));
|
|
364
364
|
}
|
|
365
365
|
return {
|
|
366
366
|
track: (event, data, userData) => enqueue(event, data, userData),
|
|
@@ -440,14 +440,14 @@ function createFunnelTree({
|
|
|
440
440
|
return react.createElement(
|
|
441
441
|
react.Fragment,
|
|
442
442
|
null,
|
|
443
|
-
react.createElement(
|
|
444
|
-
embedEnabled ? react.createElement(
|
|
443
|
+
react.createElement(chunkE7JXWUNV_cjs.CheckoutResume, null),
|
|
444
|
+
embedEnabled ? react.createElement(chunkE7JXWUNV_cjs.EmbedBridge, null) : null,
|
|
445
445
|
layout ? react.createElement(layout, null, children) : children
|
|
446
446
|
);
|
|
447
447
|
};
|
|
448
448
|
return react.createElement(AssetsProvider, {
|
|
449
449
|
assets: opts.assets,
|
|
450
|
-
children: react.createElement(
|
|
450
|
+
children: react.createElement(chunkE7JXWUNV_cjs.FunnelProvider, {
|
|
451
451
|
config,
|
|
452
452
|
offerings: opts.offerings ?? [],
|
|
453
453
|
messages: opts.messages ?? messages,
|
|
@@ -463,7 +463,7 @@ function createFunnelTree({
|
|
|
463
463
|
customerId: opts.customerId ?? null,
|
|
464
464
|
sessionId: opts.sessionId ?? null
|
|
465
465
|
},
|
|
466
|
-
children: react.createElement(
|
|
466
|
+
children: react.createElement(chunkE7JXWUNV_cjs.FunnelView, {
|
|
467
467
|
pages,
|
|
468
468
|
layout: layoutWithResume,
|
|
469
469
|
initialKey: opts.initialKey,
|
|
@@ -492,8 +492,8 @@ function Choice({
|
|
|
492
492
|
selectedClassName,
|
|
493
493
|
advanceOnSelect
|
|
494
494
|
}) {
|
|
495
|
-
const { value, set } =
|
|
496
|
-
const nav =
|
|
495
|
+
const { value, set } = chunkE7JXWUNV_cjs.useField(bind);
|
|
496
|
+
const nav = chunkE7JXWUNV_cjs.useNavigation();
|
|
497
497
|
return options.map((opt) => {
|
|
498
498
|
const o = typeof opt === "string" ? { value: opt } : opt;
|
|
499
499
|
const selected = value === o.value;
|
|
@@ -515,7 +515,7 @@ function Choice({
|
|
|
515
515
|
});
|
|
516
516
|
}
|
|
517
517
|
function Next({ children, onClick, ...rest }) {
|
|
518
|
-
const { next } =
|
|
518
|
+
const { next } = chunkE7JXWUNV_cjs.useNavigation();
|
|
519
519
|
return react.createElement(
|
|
520
520
|
"button",
|
|
521
521
|
{
|
|
@@ -530,7 +530,7 @@ function Next({ children, onClick, ...rest }) {
|
|
|
530
530
|
);
|
|
531
531
|
}
|
|
532
532
|
function Back({ children, onClick, ...rest }) {
|
|
533
|
-
const { back, canGoBack } =
|
|
533
|
+
const { back, canGoBack } = chunkE7JXWUNV_cjs.useNavigation();
|
|
534
534
|
if (!canGoBack) return null;
|
|
535
535
|
return react.createElement(
|
|
536
536
|
"button",
|
|
@@ -568,10 +568,10 @@ function resolveStore(stores, platform) {
|
|
|
568
568
|
|
|
569
569
|
// src/download/DownloadButton.tsx
|
|
570
570
|
function usePlatform() {
|
|
571
|
-
return platformFor(
|
|
571
|
+
return platformFor(chunkE7JXWUNV_cjs.useFunnel().context);
|
|
572
572
|
}
|
|
573
573
|
function useAppDownload(stores) {
|
|
574
|
-
const funnel =
|
|
574
|
+
const funnel = chunkE7JXWUNV_cjs.useFunnel();
|
|
575
575
|
const latest = react.useRef(stores);
|
|
576
576
|
latest.current = stores;
|
|
577
577
|
const platform = platformFor(funnel.context);
|
|
@@ -650,6 +650,17 @@ var EVENT_CATALOG = {
|
|
|
650
650
|
"purchase.complete": { sources: ["backend"], tracking: true, integrations: true },
|
|
651
651
|
"customer.first_purchase": { sources: ["backend"], tracking: true, integrations: true },
|
|
652
652
|
"subscription.created": { sources: ["backend"], tracking: true, integrations: true },
|
|
653
|
+
// A trial START — free or paid. Fires INSTEAD OF purchase.complete/subscription.created for a
|
|
654
|
+
// trial settlement: one event per settlement, and a taxonomy that can distinguish a trial from
|
|
655
|
+
// an outright sale. Value is the money that moved (0 free / fee paid), never the sticker price
|
|
656
|
+
// of the subscription behind it. Ad networks map it back onto `Purchase` with every other
|
|
657
|
+
// acquisition; the distinction is kept for analytics/GTM/customer.io.
|
|
658
|
+
"subscription.trial_started": { sources: ["backend"], tracking: true, integrations: true },
|
|
659
|
+
// A recurring charge and the FIRST charge after a trial are economically different events, and
|
|
660
|
+
// neither is an initial purchase. Keeping them apart is load-bearing for ad networks: collapsing
|
|
661
|
+
// them onto the same name as `purchase.complete` double-counts one customer in the ad account's
|
|
662
|
+
// Purchase column, trains the bidder on money no click caused, and inflates reported ROAS.
|
|
663
|
+
"subscription.trial_converted": { sources: ["backend"], tracking: true, integrations: true },
|
|
653
664
|
"subscription.renewal": { sources: ["backend"], tracking: true, integrations: true }
|
|
654
665
|
};
|
|
655
666
|
function isTrackableEvent(name) {
|
|
@@ -718,215 +729,215 @@ Object.defineProperty(exports, "compileManifest", {
|
|
|
718
729
|
});
|
|
719
730
|
Object.defineProperty(exports, "Checkout", {
|
|
720
731
|
enumerable: true,
|
|
721
|
-
get: function () { return
|
|
732
|
+
get: function () { return chunkE7JXWUNV_cjs.Checkout; }
|
|
722
733
|
});
|
|
723
734
|
Object.defineProperty(exports, "CheckoutButton", {
|
|
724
735
|
enumerable: true,
|
|
725
|
-
get: function () { return
|
|
736
|
+
get: function () { return chunkE7JXWUNV_cjs.CheckoutButton; }
|
|
726
737
|
});
|
|
727
738
|
Object.defineProperty(exports, "CheckoutResume", {
|
|
728
739
|
enumerable: true,
|
|
729
|
-
get: function () { return
|
|
740
|
+
get: function () { return chunkE7JXWUNV_cjs.CheckoutResume; }
|
|
730
741
|
});
|
|
731
742
|
Object.defineProperty(exports, "CheckoutSpinner", {
|
|
732
743
|
enumerable: true,
|
|
733
|
-
get: function () { return
|
|
744
|
+
get: function () { return chunkE7JXWUNV_cjs.CheckoutSpinner; }
|
|
734
745
|
});
|
|
735
746
|
Object.defineProperty(exports, "FunnelProvider", {
|
|
736
747
|
enumerable: true,
|
|
737
|
-
get: function () { return
|
|
748
|
+
get: function () { return chunkE7JXWUNV_cjs.FunnelProvider; }
|
|
738
749
|
});
|
|
739
750
|
Object.defineProperty(exports, "FunnelToaster", {
|
|
740
751
|
enumerable: true,
|
|
741
|
-
get: function () { return
|
|
752
|
+
get: function () { return chunkE7JXWUNV_cjs.FunnelToaster; }
|
|
742
753
|
});
|
|
743
754
|
Object.defineProperty(exports, "FunnelView", {
|
|
744
755
|
enumerable: true,
|
|
745
|
-
get: function () { return
|
|
756
|
+
get: function () { return chunkE7JXWUNV_cjs.FunnelView; }
|
|
746
757
|
});
|
|
747
758
|
Object.defineProperty(exports, "Modal", {
|
|
748
759
|
enumerable: true,
|
|
749
|
-
get: function () { return
|
|
760
|
+
get: function () { return chunkE7JXWUNV_cjs.Modal; }
|
|
750
761
|
});
|
|
751
762
|
Object.defineProperty(exports, "Sheet", {
|
|
752
763
|
enumerable: true,
|
|
753
|
-
get: function () { return
|
|
764
|
+
get: function () { return chunkE7JXWUNV_cjs.Sheet; }
|
|
754
765
|
});
|
|
755
766
|
Object.defineProperty(exports, "UpsellButton", {
|
|
756
767
|
enumerable: true,
|
|
757
|
-
get: function () { return
|
|
768
|
+
get: function () { return chunkE7JXWUNV_cjs.UpsellButton; }
|
|
758
769
|
});
|
|
759
770
|
Object.defineProperty(exports, "VariableStore", {
|
|
760
771
|
enumerable: true,
|
|
761
|
-
get: function () { return
|
|
772
|
+
get: function () { return chunkE7JXWUNV_cjs.VariableStore; }
|
|
762
773
|
});
|
|
763
774
|
Object.defineProperty(exports, "attachBus", {
|
|
764
775
|
enumerable: true,
|
|
765
|
-
get: function () { return
|
|
776
|
+
get: function () { return chunkE7JXWUNV_cjs.attachBus; }
|
|
766
777
|
});
|
|
767
778
|
Object.defineProperty(exports, "buildAcquisition", {
|
|
768
779
|
enumerable: true,
|
|
769
|
-
get: function () { return
|
|
780
|
+
get: function () { return chunkE7JXWUNV_cjs.buildAcquisition; }
|
|
770
781
|
});
|
|
771
782
|
Object.defineProperty(exports, "buildContext", {
|
|
772
783
|
enumerable: true,
|
|
773
|
-
get: function () { return
|
|
784
|
+
get: function () { return chunkE7JXWUNV_cjs.buildContext; }
|
|
774
785
|
});
|
|
775
786
|
Object.defineProperty(exports, "createBus", {
|
|
776
787
|
enumerable: true,
|
|
777
|
-
get: function () { return
|
|
788
|
+
get: function () { return chunkE7JXWUNV_cjs.createBus; }
|
|
778
789
|
});
|
|
779
790
|
Object.defineProperty(exports, "createConsoleTracker", {
|
|
780
791
|
enumerable: true,
|
|
781
|
-
get: function () { return
|
|
792
|
+
get: function () { return chunkE7JXWUNV_cjs.createConsoleTracker; }
|
|
782
793
|
});
|
|
783
794
|
Object.defineProperty(exports, "createFunnelStore", {
|
|
784
795
|
enumerable: true,
|
|
785
|
-
get: function () { return
|
|
796
|
+
get: function () { return chunkE7JXWUNV_cjs.createFunnelStore; }
|
|
786
797
|
});
|
|
787
798
|
Object.defineProperty(exports, "createMockDriver", {
|
|
788
799
|
enumerable: true,
|
|
789
|
-
get: function () { return
|
|
800
|
+
get: function () { return chunkE7JXWUNV_cjs.createMockDriver; }
|
|
790
801
|
});
|
|
791
802
|
Object.defineProperty(exports, "defineModal", {
|
|
792
803
|
enumerable: true,
|
|
793
|
-
get: function () { return
|
|
804
|
+
get: function () { return chunkE7JXWUNV_cjs.defineModal; }
|
|
794
805
|
});
|
|
795
806
|
Object.defineProperty(exports, "dismissAllModals", {
|
|
796
807
|
enumerable: true,
|
|
797
|
-
get: function () { return
|
|
808
|
+
get: function () { return chunkE7JXWUNV_cjs.dismissAllModals; }
|
|
798
809
|
});
|
|
799
810
|
Object.defineProperty(exports, "driverWithEmail", {
|
|
800
811
|
enumerable: true,
|
|
801
|
-
get: function () { return
|
|
812
|
+
get: function () { return chunkE7JXWUNV_cjs.driverWithEmail; }
|
|
802
813
|
});
|
|
803
814
|
Object.defineProperty(exports, "hideModal", {
|
|
804
815
|
enumerable: true,
|
|
805
|
-
get: function () { return
|
|
816
|
+
get: function () { return chunkE7JXWUNV_cjs.hideModal; }
|
|
806
817
|
});
|
|
807
818
|
Object.defineProperty(exports, "isValidEmail", {
|
|
808
819
|
enumerable: true,
|
|
809
|
-
get: function () { return
|
|
820
|
+
get: function () { return chunkE7JXWUNV_cjs.isValidEmail; }
|
|
810
821
|
});
|
|
811
822
|
Object.defineProperty(exports, "newEventId", {
|
|
812
823
|
enumerable: true,
|
|
813
|
-
get: function () { return
|
|
824
|
+
get: function () { return chunkE7JXWUNV_cjs.newEventId; }
|
|
814
825
|
});
|
|
815
826
|
Object.defineProperty(exports, "registerModal", {
|
|
816
827
|
enumerable: true,
|
|
817
|
-
get: function () { return
|
|
828
|
+
get: function () { return chunkE7JXWUNV_cjs.registerModal; }
|
|
818
829
|
});
|
|
819
830
|
Object.defineProperty(exports, "removeModal", {
|
|
820
831
|
enumerable: true,
|
|
821
|
-
get: function () { return
|
|
832
|
+
get: function () { return chunkE7JXWUNV_cjs.removeModal; }
|
|
822
833
|
});
|
|
823
834
|
Object.defineProperty(exports, "showModal", {
|
|
824
835
|
enumerable: true,
|
|
825
|
-
get: function () { return
|
|
836
|
+
get: function () { return chunkE7JXWUNV_cjs.showModal; }
|
|
826
837
|
});
|
|
827
838
|
Object.defineProperty(exports, "toast", {
|
|
828
839
|
enumerable: true,
|
|
829
|
-
get: function () { return
|
|
840
|
+
get: function () { return chunkE7JXWUNV_cjs.toast; }
|
|
830
841
|
});
|
|
831
842
|
Object.defineProperty(exports, "unregisterModal", {
|
|
832
843
|
enumerable: true,
|
|
833
|
-
get: function () { return
|
|
844
|
+
get: function () { return chunkE7JXWUNV_cjs.unregisterModal; }
|
|
834
845
|
});
|
|
835
846
|
Object.defineProperty(exports, "useActiveLocale", {
|
|
836
847
|
enumerable: true,
|
|
837
|
-
get: function () { return
|
|
848
|
+
get: function () { return chunkE7JXWUNV_cjs.useActiveLocale; }
|
|
838
849
|
});
|
|
839
850
|
Object.defineProperty(exports, "useCheckout", {
|
|
840
851
|
enumerable: true,
|
|
841
|
-
get: function () { return
|
|
852
|
+
get: function () { return chunkE7JXWUNV_cjs.useCheckout; }
|
|
842
853
|
});
|
|
843
854
|
Object.defineProperty(exports, "useClickIds", {
|
|
844
855
|
enumerable: true,
|
|
845
|
-
get: function () { return
|
|
856
|
+
get: function () { return chunkE7JXWUNV_cjs.useClickIds; }
|
|
846
857
|
});
|
|
847
858
|
Object.defineProperty(exports, "useContextValue", {
|
|
848
859
|
enumerable: true,
|
|
849
|
-
get: function () { return
|
|
860
|
+
get: function () { return chunkE7JXWUNV_cjs.useContextValue; }
|
|
850
861
|
});
|
|
851
862
|
Object.defineProperty(exports, "useData", {
|
|
852
863
|
enumerable: true,
|
|
853
|
-
get: function () { return
|
|
864
|
+
get: function () { return chunkE7JXWUNV_cjs.useData; }
|
|
854
865
|
});
|
|
855
866
|
Object.defineProperty(exports, "useDevice", {
|
|
856
867
|
enumerable: true,
|
|
857
|
-
get: function () { return
|
|
868
|
+
get: function () { return chunkE7JXWUNV_cjs.useDevice; }
|
|
858
869
|
});
|
|
859
870
|
Object.defineProperty(exports, "useExperiment", {
|
|
860
871
|
enumerable: true,
|
|
861
|
-
get: function () { return
|
|
872
|
+
get: function () { return chunkE7JXWUNV_cjs.useExperiment; }
|
|
862
873
|
});
|
|
863
874
|
Object.defineProperty(exports, "useField", {
|
|
864
875
|
enumerable: true,
|
|
865
|
-
get: function () { return
|
|
876
|
+
get: function () { return chunkE7JXWUNV_cjs.useField; }
|
|
866
877
|
});
|
|
867
878
|
Object.defineProperty(exports, "useFunnel", {
|
|
868
879
|
enumerable: true,
|
|
869
|
-
get: function () { return
|
|
880
|
+
get: function () { return chunkE7JXWUNV_cjs.useFunnel; }
|
|
870
881
|
});
|
|
871
882
|
Object.defineProperty(exports, "useGroupProgress", {
|
|
872
883
|
enumerable: true,
|
|
873
|
-
get: function () { return
|
|
884
|
+
get: function () { return chunkE7JXWUNV_cjs.useGroupProgress; }
|
|
874
885
|
});
|
|
875
886
|
Object.defineProperty(exports, "useLocale", {
|
|
876
887
|
enumerable: true,
|
|
877
|
-
get: function () { return
|
|
888
|
+
get: function () { return chunkE7JXWUNV_cjs.useLocale; }
|
|
878
889
|
});
|
|
879
890
|
Object.defineProperty(exports, "useMarketingConsent", {
|
|
880
891
|
enumerable: true,
|
|
881
|
-
get: function () { return
|
|
892
|
+
get: function () { return chunkE7JXWUNV_cjs.useMarketingConsent; }
|
|
882
893
|
});
|
|
883
894
|
Object.defineProperty(exports, "useModal", {
|
|
884
895
|
enumerable: true,
|
|
885
|
-
get: function () { return
|
|
896
|
+
get: function () { return chunkE7JXWUNV_cjs.useModal; }
|
|
886
897
|
});
|
|
887
898
|
Object.defineProperty(exports, "useNavigation", {
|
|
888
899
|
enumerable: true,
|
|
889
|
-
get: function () { return
|
|
900
|
+
get: function () { return chunkE7JXWUNV_cjs.useNavigation; }
|
|
890
901
|
});
|
|
891
902
|
Object.defineProperty(exports, "useOffering", {
|
|
892
903
|
enumerable: true,
|
|
893
|
-
get: function () { return
|
|
904
|
+
get: function () { return chunkE7JXWUNV_cjs.useOffering; }
|
|
894
905
|
});
|
|
895
906
|
Object.defineProperty(exports, "useOfferings", {
|
|
896
907
|
enumerable: true,
|
|
897
|
-
get: function () { return
|
|
908
|
+
get: function () { return chunkE7JXWUNV_cjs.useOfferings; }
|
|
898
909
|
});
|
|
899
910
|
Object.defineProperty(exports, "usePage", {
|
|
900
911
|
enumerable: true,
|
|
901
|
-
get: function () { return
|
|
912
|
+
get: function () { return chunkE7JXWUNV_cjs.usePage; }
|
|
902
913
|
});
|
|
903
914
|
Object.defineProperty(exports, "useResponse", {
|
|
904
915
|
enumerable: true,
|
|
905
|
-
get: function () { return
|
|
916
|
+
get: function () { return chunkE7JXWUNV_cjs.useResponse; }
|
|
906
917
|
});
|
|
907
918
|
Object.defineProperty(exports, "useSystem", {
|
|
908
919
|
enumerable: true,
|
|
909
|
-
get: function () { return
|
|
920
|
+
get: function () { return chunkE7JXWUNV_cjs.useSystem; }
|
|
910
921
|
});
|
|
911
922
|
Object.defineProperty(exports, "useTracker", {
|
|
912
923
|
enumerable: true,
|
|
913
|
-
get: function () { return
|
|
924
|
+
get: function () { return chunkE7JXWUNV_cjs.useTracker; }
|
|
914
925
|
});
|
|
915
926
|
Object.defineProperty(exports, "useTranslation", {
|
|
916
927
|
enumerable: true,
|
|
917
|
-
get: function () { return
|
|
928
|
+
get: function () { return chunkE7JXWUNV_cjs.useTranslation; }
|
|
918
929
|
});
|
|
919
930
|
Object.defineProperty(exports, "useUserAttribute", {
|
|
920
931
|
enumerable: true,
|
|
921
|
-
get: function () { return
|
|
932
|
+
get: function () { return chunkE7JXWUNV_cjs.useUserAttribute; }
|
|
922
933
|
});
|
|
923
934
|
Object.defineProperty(exports, "useUtm", {
|
|
924
935
|
enumerable: true,
|
|
925
|
-
get: function () { return
|
|
936
|
+
get: function () { return chunkE7JXWUNV_cjs.useUtm; }
|
|
926
937
|
});
|
|
927
938
|
Object.defineProperty(exports, "withBus", {
|
|
928
939
|
enumerable: true,
|
|
929
|
-
get: function () { return
|
|
940
|
+
get: function () { return chunkE7JXWUNV_cjs.withBus; }
|
|
930
941
|
});
|
|
931
942
|
Object.defineProperty(exports, "assignVariant", {
|
|
932
943
|
enumerable: true,
|