@tinkerlandai/longplay-sdk 0.10.25 → 0.10.26

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 (96) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/THIRD_PARTY_NOTICES.md +26 -0
  3. package/dist/{ai-usage-B6RepnmH.d.ts → ai-usage-E4c9NSJK.d.ts} +1 -1
  4. package/dist/{api-C9P338XT.d.ts → api-BpeJkr6U.d.ts} +390 -390
  5. package/dist/chunk-2KOQBV3Y.js +1 -0
  6. package/dist/chunk-2MTTK3BT.js +1 -0
  7. package/dist/chunk-3FPYCF7Z.js +1 -0
  8. package/dist/chunk-3VUPVXAV.js +1 -0
  9. package/dist/chunk-5RXU57I5.js +1 -0
  10. package/dist/chunk-6VY4PZZ6.js +1 -0
  11. package/dist/chunk-7CFF6SWH.js +1 -0
  12. package/dist/chunk-B5JHPPR4.js +10 -0
  13. package/dist/chunk-BZSKOOMM.js +1 -0
  14. package/dist/chunk-C6JRUYKW.js +1 -0
  15. package/dist/chunk-CILM5XMH.js +1 -0
  16. package/dist/chunk-CNIBGSVO.js +1 -0
  17. package/dist/chunk-CZ3H2X7D.js +1 -0
  18. package/dist/chunk-DCCM7FYR.js +1 -0
  19. package/dist/chunk-DCIGO3NJ.js +1 -0
  20. package/dist/chunk-DOJE7VUR.js +1 -0
  21. package/dist/{chunk-34I23EKZ.js → chunk-ECMWY3G2.js} +1 -1
  22. package/dist/chunk-G7NSECIG.js +1 -0
  23. package/dist/chunk-GIV4FOOW.js +1 -0
  24. package/dist/chunk-HMRIMJ5W.js +1 -0
  25. package/dist/chunk-JAKOBECD.js +1 -0
  26. package/dist/{chunk-O3LZPMS4.js → chunk-KRTX4QEH.js} +1 -1
  27. package/dist/chunk-LPDUK7HT.js +1 -0
  28. package/dist/chunk-MRFBMFNK.js +1 -0
  29. package/dist/chunk-MWDR5FEU.js +1 -0
  30. package/dist/chunk-MYUYN7ZG.js +1 -0
  31. package/dist/chunk-NMKZ724L.js +1 -0
  32. package/dist/chunk-O4KXODTJ.js +17 -0
  33. package/dist/chunk-ORPOCB2J.js +1 -0
  34. package/dist/chunk-PMCGTXGH.js +1 -0
  35. package/dist/{chunk-RKREEPCT.js → chunk-PWQ5BHBJ.js} +1 -1
  36. package/dist/chunk-SMIO7OG5.js +1 -0
  37. package/dist/chunk-T4GTAH43.js +1 -0
  38. package/dist/chunk-UBKD6VMS.js +1 -0
  39. package/dist/chunk-UHI7SPHK.js +1 -0
  40. package/dist/chunk-WM27UTWT.js +62 -0
  41. package/dist/chunk-WOT6VMZA.js +1 -0
  42. package/dist/{chunk-SJNF6JDJ.js → chunk-X7G7JMZ3.js} +1 -1
  43. package/dist/chunk-YSNMXK4R.js +1 -0
  44. package/dist/{configuration-sync-eEFj_oKG.d.ts → configuration-sync-DdTRUv7A.d.ts} +17 -17
  45. package/dist/content-UDP5VQS4.js +1 -0
  46. package/dist/funnel-host-purchase-5NLPYJRK.js +1 -0
  47. package/dist/{funnel-local-client-CSA9XoC4.d.ts → funnel-local-client-DoYVcZ1z.d.ts} +1696 -1696
  48. package/dist/funnel-node-evaluation-COxXtZEQ.d.ts +1003 -0
  49. package/dist/{funnel-process-client-RXgS2i-R.d.ts → funnel-process-client-DtXNiFQ-.d.ts} +1736 -1736
  50. package/dist/funnel-runtime-host-ZWUAGDBU.js +1 -0
  51. package/dist/index.d.ts +70 -69
  52. package/dist/index.js +1 -1
  53. package/dist/merchant-bridge-contracts-N3Q4W6ZU.js +1 -0
  54. package/dist/native-shell.js +1 -1
  55. package/dist/openrouter.d.ts +3 -3
  56. package/dist/openrouter.js +1 -1
  57. package/dist/operation-contracts-VURXKAFX.js +1 -0
  58. package/dist/page.d.ts +12 -12
  59. package/dist/page.js +1 -1
  60. package/dist/paywall-QQ2MC4KO.js +1 -0
  61. package/dist/paywall-session-WC2WFWBQ.js +1 -0
  62. package/dist/popup.d.ts +4 -4
  63. package/dist/popup.js +1 -1
  64. package/dist/react-native.d.ts +8 -8
  65. package/dist/react-native.js +1 -1
  66. package/dist/screen-renderer-G2EWN3WB.js +1 -0
  67. package/dist/server.d.ts +1752 -23
  68. package/dist/server.js +6 -1
  69. package/dist/visual-dom-5LUN4AHO.js +1 -0
  70. package/dist/visual.js +1 -1
  71. package/package.json +1 -1
  72. package/dist/chunk-2KI63SPJ.js +0 -10
  73. package/dist/chunk-2ZJ5CS5Q.js +0 -1
  74. package/dist/chunk-5HJMAZ7A.js +0 -1
  75. package/dist/chunk-7AXCG6NU.js +0 -1
  76. package/dist/chunk-BB5P5HPS.js +0 -1
  77. package/dist/chunk-C2BODHNY.js +0 -1
  78. package/dist/chunk-EIYWDWXP.js +0 -1
  79. package/dist/chunk-LFFBNGXP.js +0 -1
  80. package/dist/chunk-MHEYMXGZ.js +0 -17
  81. package/dist/chunk-ML3BIPM6.js +0 -1
  82. package/dist/chunk-O4535GJR.js +0 -6
  83. package/dist/chunk-OEH47Y2L.js +0 -1
  84. package/dist/chunk-THGLNE4K.js +0 -1
  85. package/dist/chunk-TUYBXAAK.js +0 -1
  86. package/dist/chunk-ZX2RWS3T.js +0 -1
  87. package/dist/content-FD2Q6XD6.js +0 -1
  88. package/dist/funnel-host-purchase-XW7IF52Y.js +0 -1
  89. package/dist/funnel-node-evaluation-Cg-4tcAs.d.ts +0 -2731
  90. package/dist/funnel-runtime-host-I6PJXVRC.js +0 -1
  91. package/dist/paywall-CGBFHFRU.js +0 -1
  92. package/dist/screen-renderer-WOMWOEYL.js +0 -1
  93. package/dist/visual-dom-7IF7ITAK.js +0 -1
  94. package/dist/{coupon-DyKA-BRG.d.ts → coupon-kfkIVf9n.d.ts} +4 -4
  95. package/dist/{presentation-loading-D0A9G_kT.d.ts → presentation-loading-iSaRiDP2.d.ts} +3 -3
  96. package/dist/{screen-DRP7nsrQ.d.ts → screen-CGCJ46b1.d.ts} +3 -3
@@ -0,0 +1 @@
1
+ import{c as a,d as b}from"./chunk-YSNMXK4R.js";import"./chunk-JGG4R75K.js";import"./chunk-CNIBGSVO.js";import"./chunk-PMCGTXGH.js";import"./chunk-7CFF6SWH.js";import"./chunk-PWQ5BHBJ.js";import"./chunk-HMRIMJ5W.js";import"./chunk-MWDR5FEU.js";import"./chunk-UBKD6VMS.js";import"./chunk-5RXU57I5.js";import"./chunk-DOJE7VUR.js";import"./chunk-X7G7JMZ3.js";import"./chunk-JAKOBECD.js";import"./chunk-SLUA7ABW.js";import"./chunk-DCIGO3NJ.js";import"./chunk-SMIO7OG5.js";import"./chunk-WM27UTWT.js";import"./chunk-DSPLGTQI.js";import"./chunk-O4KXODTJ.js";import"./chunk-CILM5XMH.js";import"./chunk-WOT6VMZA.js";export{a as showFunnelRun,b as showObservedFunnelRun};
package/dist/index.d.ts CHANGED
@@ -1,18 +1,18 @@
1
1
  import { z } from 'zod';
2
- import { S as ScreenAnswers, P as PresentationLoadingOptions, s as screenInputBindingsSchema, a as SurfaceData, C as CustomerDataIntent, c as createPresentationLoading } from './presentation-loading-D0A9G_kT.js';
3
- export { b as PresentationState } from './presentation-loading-D0A9G_kT.js';
2
+ import { S as ScreenAnswers, P as PresentationLoadingOptions, s as screenInputBindingsSchema, a as SurfaceData, C as CustomerDataIntent, c as createPresentationLoading } from './presentation-loading-iSaRiDP2.js';
3
+ export { b as PresentationState } from './presentation-loading-iSaRiDP2.js';
4
4
  import { J as JsonValue } from './growth-rules-B4YYy64R.js';
5
- import { S as StackNode, a as ScreenSelection } from './screen-DRP7nsrQ.js';
6
- import { P as PaywallSession, S as SubscriptionOperation, F as FunnelRunController, a as FunnelRunView, b as PaywallRecovery, c as FunnelCommandStorage, s as scopeSchema, I as IndianaOptions, d as SessionCredentials, e as FunnelExecutionPolicy, f as SubscriptionAttachQuote, g as FunnelStartInput, h as IamFunnelEntryDelivery, i as FunnelProcessRunView } from './funnel-local-client-CSA9XoC4.js';
7
- export { C as CustomerSession, j as FeatureClient, k as FeatureClientOptions, l as FunnelControllerResponse, m as FunnelPendingEntry, n as FunnelPurchaseRecovery, o as FunnelRuntimeResponse, p as FunnelSegmentPrediction, L as LocalFunnelClient, q as LocalFunnelClientOptions, r as LongplayError, t as PaywallPurchaseInput, u as PaywallStartInput, v as PushHost, w as PushJournal, x as createFeatureClient, y as createFunnelRunController, z as createLocalFunnelClient, A as createPaywallSession, B as getPaywallRecovery, D as preparePaywallFallback } from './funnel-local-client-CSA9XoC4.js';
8
- import { E as EntitlementCheckResult, M as MerchantBridgeManifest } from './funnel-node-evaluation-Cg-4tcAs.js';
9
- export { a as EntitlementCheckInput, b as EntitlementCheckObservation, c as EntitlementRequirement, F as FunnelNodeEvaluationContext, e as evaluateFunnelNode } from './funnel-node-evaluation-Cg-4tcAs.js';
10
- import { C as CouponInput } from './coupon-DyKA-BRG.js';
11
- export { O as Offer, a as OfferUnavailableReason } from './coupon-DyKA-BRG.js';
12
- import { c as createFunnelProcess } from './funnel-process-client-RXgS2i-R.js';
13
- export { F as FunnelProcessAdapter, a as FunnelProcessOptions, b as FunnelResourceSource, I as LongplayFeatureOptions, d as createFunnelClient, e as createLongplay } from './funnel-process-client-RXgS2i-R.js';
14
- export { C as ConfigurationStorage, a as ConfigurationSync, b as ConfigurationSyncOptions, c as createConfigurationSync } from './configuration-sync-eEFj_oKG.js';
15
- import './api-C9P338XT.js';
5
+ import { S as StackNode, a as ScreenSelection } from './screen-CGCJ46b1.js';
6
+ import { P as PaywallSession, S as SubscriptionOperation, F as FunnelRunController, a as FunnelRunView, b as PaywallRecovery, c as FunnelCommandStorage, s as scopeSchema, I as IndianaOptions, d as SessionCredentials, e as FunnelExecutionPolicy, f as SubscriptionAttachQuote, g as FunnelStartInput, h as IamFunnelEntryDelivery, i as FunnelProcessRunView, j as createPaywallSession$1 } from './funnel-local-client-DoYVcZ1z.js';
7
+ export { C as CustomerSession, k as FeatureClient, l as FeatureClientOptions, m as FunnelControllerResponse, n as FunnelPendingEntry, o as FunnelPurchaseRecovery, p as FunnelRuntimeResponse, q as FunnelSegmentPrediction, L as LocalFunnelClient, r as LocalFunnelClientOptions, t as LongplayError, u as PaywallPurchaseInput, v as PaywallStartInput, w as PushHost, x as PushJournal, y as createFeatureClient, z as createFunnelRunController, A as createLocalFunnelClient, B as getPaywallRecovery, D as preparePaywallFallback } from './funnel-local-client-DoYVcZ1z.js';
8
+ import { E as EntitlementCheckResult, M as MerchantBridgeManifest } from './funnel-node-evaluation-COxXtZEQ.js';
9
+ export { a as EntitlementCheckInput, b as EntitlementCheckObservation, c as EntitlementRequirement, F as FunnelNodeEvaluationContext, e as evaluateFunnelNode } from './funnel-node-evaluation-COxXtZEQ.js';
10
+ import { C as CouponInput } from './coupon-kfkIVf9n.js';
11
+ export { O as Offer, a as OfferUnavailableReason } from './coupon-kfkIVf9n.js';
12
+ import { c as createFunnelProcess } from './funnel-process-client-DtXNiFQ-.js';
13
+ export { F as FunnelProcessAdapter, a as FunnelProcessOptions, b as FunnelResourceSource, I as LongplayFeatureOptions, d as createFunnelClient, e as createLongplay } from './funnel-process-client-DtXNiFQ-.js';
14
+ export { C as ConfigurationStorage, a as ConfigurationSync, b as ConfigurationSyncOptions, c as createConfigurationSync } from './configuration-sync-DdTRUv7A.js';
15
+ import './api-BpeJkr6U.js';
16
16
  import 'zod/v4';
17
17
 
18
18
  /** Currency always comes from business data; locale only controls notation. No currency conversion. */
@@ -439,9 +439,9 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
439
439
  id: z.ZodUUID;
440
440
  versionId: z.ZodUUID;
441
441
  status: z.ZodEnum<{
442
+ completed: "completed";
442
443
  failed: "failed";
443
444
  running: "running";
444
- completed: "completed";
445
445
  closed: "closed";
446
446
  ineligible: "ineligible";
447
447
  waiting: "waiting";
@@ -515,8 +515,8 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
515
515
  id: z.ZodUUID;
516
516
  type: z.ZodEnum<{
517
517
  invoice: "invoice";
518
- usage: "usage";
519
518
  source: "source";
519
+ usage: "usage";
520
520
  debt: "debt";
521
521
  transaction: "transaction";
522
522
  settlement: "settlement";
@@ -528,17 +528,17 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
528
528
  }, z.core.$strict>], "kind">>;
529
529
  filter: z.ZodEnum<{
530
530
  purchase: "purchase";
531
- refund: "refund";
532
- expired: "expired";
533
- revoked: "revoked";
534
- usage: "usage";
535
- all: "all";
536
531
  source: "source";
537
- issued: "issued";
532
+ usage: "usage";
533
+ revoked: "revoked";
534
+ expired: "expired";
535
+ refund: "refund";
538
536
  reserved: "reserved";
539
- redeemed: "redeemed";
540
537
  debt: "debt";
541
538
  settlement: "settlement";
539
+ issued: "issued";
540
+ redeemed: "redeemed";
541
+ all: "all";
542
542
  }>;
543
543
  }, z.core.$strict>>;
544
544
  }, z.core.$strict>>;
@@ -588,9 +588,9 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
588
588
  receiptId: z.ZodUUID;
589
589
  outcome: z.ZodEnum<{
590
590
  success: "success";
591
- cancel: "cancel";
592
591
  failed: "failed";
593
592
  opened: "opened";
593
+ cancel: "cancel";
594
594
  failure: "failure";
595
595
  }>;
596
596
  }, z.core.$strict>], "type">;
@@ -669,7 +669,7 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
669
669
  } | {
670
670
  type: "client_action";
671
671
  receiptId: string;
672
- outcome: "success" | "cancel" | "failed" | "opened" | "failure";
672
+ outcome: "success" | "failed" | "opened" | "cancel" | "failure";
673
673
  };
674
674
  requestId: string;
675
675
  nodeId: string;
@@ -744,13 +744,13 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
744
744
  cursor: {
745
745
  at: string;
746
746
  id: string;
747
- type: "invoice" | "usage" | "source" | "debt" | "transaction" | "settlement";
747
+ type: "invoice" | "source" | "usage" | "debt" | "transaction" | "settlement";
748
748
  };
749
749
  } | {
750
750
  kind: "billing";
751
751
  cursor: string;
752
752
  } | null;
753
- filter: "purchase" | "refund" | "expired" | "revoked" | "usage" | "all" | "source" | "issued" | "reserved" | "redeemed" | "debt" | "settlement";
753
+ filter: "purchase" | "source" | "usage" | "revoked" | "expired" | "refund" | "reserved" | "debt" | "settlement" | "issued" | "redeemed" | "all";
754
754
  resourceKey?: string | undefined;
755
755
  }>;
756
756
  } | undefined;
@@ -794,7 +794,7 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
794
794
  } | {
795
795
  type: "client_action";
796
796
  receiptId: string;
797
- outcome: "success" | "cancel" | "failed" | "opened" | "failure";
797
+ outcome: "success" | "failed" | "opened" | "cancel" | "failure";
798
798
  };
799
799
  requestId: string;
800
800
  nodeId: string;
@@ -876,8 +876,8 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
876
876
  id: z.ZodUUID;
877
877
  type: z.ZodEnum<{
878
878
  invoice: "invoice";
879
- usage: "usage";
880
879
  source: "source";
880
+ usage: "usage";
881
881
  debt: "debt";
882
882
  transaction: "transaction";
883
883
  settlement: "settlement";
@@ -889,17 +889,17 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
889
889
  }, z.core.$strict>], "kind">>;
890
890
  filter: z.ZodEnum<{
891
891
  purchase: "purchase";
892
- refund: "refund";
893
- expired: "expired";
894
- revoked: "revoked";
895
- usage: "usage";
896
- all: "all";
897
892
  source: "source";
898
- issued: "issued";
893
+ usage: "usage";
894
+ revoked: "revoked";
895
+ expired: "expired";
896
+ refund: "refund";
899
897
  reserved: "reserved";
900
- redeemed: "redeemed";
901
898
  debt: "debt";
902
899
  settlement: "settlement";
900
+ issued: "issued";
901
+ redeemed: "redeemed";
902
+ all: "all";
903
903
  }>;
904
904
  }, z.core.$strict>>;
905
905
  }, z.core.$strict>>;
@@ -949,9 +949,9 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
949
949
  receiptId: z.ZodUUID;
950
950
  outcome: z.ZodEnum<{
951
951
  success: "success";
952
- cancel: "cancel";
953
952
  failed: "failed";
954
953
  opened: "opened";
954
+ cancel: "cancel";
955
955
  failure: "failure";
956
956
  }>;
957
957
  }, z.core.$strict>], "type">;
@@ -1030,7 +1030,7 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
1030
1030
  } | {
1031
1031
  type: "client_action";
1032
1032
  receiptId: string;
1033
- outcome: "success" | "cancel" | "failed" | "opened" | "failure";
1033
+ outcome: "success" | "failed" | "opened" | "cancel" | "failure";
1034
1034
  };
1035
1035
  requestId: string;
1036
1036
  nodeId: string;
@@ -1105,13 +1105,13 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
1105
1105
  cursor: {
1106
1106
  at: string;
1107
1107
  id: string;
1108
- type: "invoice" | "usage" | "source" | "debt" | "transaction" | "settlement";
1108
+ type: "invoice" | "source" | "usage" | "debt" | "transaction" | "settlement";
1109
1109
  };
1110
1110
  } | {
1111
1111
  kind: "billing";
1112
1112
  cursor: string;
1113
1113
  } | null;
1114
- filter: "purchase" | "refund" | "expired" | "revoked" | "usage" | "all" | "source" | "issued" | "reserved" | "redeemed" | "debt" | "settlement";
1114
+ filter: "purchase" | "source" | "usage" | "revoked" | "expired" | "refund" | "reserved" | "debt" | "settlement" | "issued" | "redeemed" | "all";
1115
1115
  resourceKey?: string | undefined;
1116
1116
  }>;
1117
1117
  } | undefined;
@@ -1155,7 +1155,7 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
1155
1155
  } | {
1156
1156
  type: "client_action";
1157
1157
  receiptId: string;
1158
- outcome: "success" | "cancel" | "failed" | "opened" | "failure";
1158
+ outcome: "success" | "failed" | "opened" | "cancel" | "failure";
1159
1159
  };
1160
1160
  requestId: string;
1161
1161
  nodeId: string;
@@ -1241,13 +1241,13 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
1241
1241
  cursor: {
1242
1242
  at: string;
1243
1243
  id: string;
1244
- type: "invoice" | "usage" | "source" | "debt" | "transaction" | "settlement";
1244
+ type: "invoice" | "source" | "usage" | "debt" | "transaction" | "settlement";
1245
1245
  };
1246
1246
  } | {
1247
1247
  kind: "billing";
1248
1248
  cursor: string;
1249
1249
  } | null;
1250
- filter: "purchase" | "refund" | "expired" | "revoked" | "usage" | "all" | "source" | "issued" | "reserved" | "redeemed" | "debt" | "settlement";
1250
+ filter: "purchase" | "source" | "usage" | "revoked" | "expired" | "refund" | "reserved" | "debt" | "settlement" | "issued" | "redeemed" | "all";
1251
1251
  resourceKey?: string | undefined;
1252
1252
  }>;
1253
1253
  } | undefined;
@@ -1291,7 +1291,7 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
1291
1291
  } | {
1292
1292
  type: "client_action";
1293
1293
  receiptId: string;
1294
- outcome: "success" | "cancel" | "failed" | "opened" | "failure";
1294
+ outcome: "success" | "failed" | "opened" | "cancel" | "failure";
1295
1295
  };
1296
1296
  requestId: string;
1297
1297
  nodeId: string;
@@ -1377,13 +1377,13 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
1377
1377
  cursor: {
1378
1378
  at: string;
1379
1379
  id: string;
1380
- type: "invoice" | "usage" | "source" | "debt" | "transaction" | "settlement";
1380
+ type: "invoice" | "source" | "usage" | "debt" | "transaction" | "settlement";
1381
1381
  };
1382
1382
  } | {
1383
1383
  kind: "billing";
1384
1384
  cursor: string;
1385
1385
  } | null;
1386
- filter: "purchase" | "refund" | "expired" | "revoked" | "usage" | "all" | "source" | "issued" | "reserved" | "redeemed" | "debt" | "settlement";
1386
+ filter: "purchase" | "source" | "usage" | "revoked" | "expired" | "refund" | "reserved" | "debt" | "settlement" | "issued" | "redeemed" | "all";
1387
1387
  resourceKey?: string | undefined;
1388
1388
  }>;
1389
1389
  } | undefined;
@@ -1427,7 +1427,7 @@ declare const funnelPurchaseEntrySchema: z.ZodObject<{
1427
1427
  } | {
1428
1428
  type: "client_action";
1429
1429
  receiptId: string;
1430
- outcome: "success" | "cancel" | "failed" | "opened" | "failure";
1430
+ outcome: "success" | "failed" | "opened" | "cancel" | "failure";
1431
1431
  };
1432
1432
  requestId: string;
1433
1433
  nodeId: string;
@@ -1603,7 +1603,7 @@ declare function createMerchantBridge(options: MerchantBridgeOptions): {
1603
1603
  merchantSubscriptionId: string;
1604
1604
  merchantProductId: string;
1605
1605
  productVersionId: string | null;
1606
- status: "active" | "expired" | "trialing" | "past_due" | "cancelled";
1606
+ status: "active" | "trialing" | "cancelled" | "expired" | "past_due";
1607
1607
  currentPeriodStartsAt: string | null;
1608
1608
  currentPeriodEndsAt: string | null;
1609
1609
  cancelAtPeriodEnd: boolean;
@@ -1628,17 +1628,17 @@ declare function createMerchantBridge(options: MerchantBridgeOptions): {
1628
1628
  executePurchase(operationId: string, signal?: AbortSignal): Promise<{
1629
1629
  type: "purchase";
1630
1630
  merchantOrderId: string | null;
1631
- paymentStatus: "unknown" | "not_started" | "pending" | "failed" | "succeeded" | "not_required" | "expired";
1631
+ paymentStatus: "unknown" | "failed" | "pending" | "expired" | "succeeded" | "not_started" | "not_required";
1632
1632
  checkoutUrl: string | null;
1633
1633
  checkoutExpiresAt: string | null;
1634
1634
  operationId: string;
1635
1635
  customerId: string;
1636
1636
  merchantExecutionId: string;
1637
- fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
1638
- recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
1637
+ fulfillmentStatus: "failed" | "pending" | "applied" | "not_started" | "not_applicable";
1638
+ recordingStatus: "accepted" | "failed" | "pending" | "not_ready";
1639
1639
  updatedAt: string;
1640
1640
  problem: {
1641
- phase: "payment" | "execution" | "fulfillment" | "recording";
1641
+ phase: "execution" | "payment" | "fulfillment" | "recording";
1642
1642
  code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
1643
1643
  recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
1644
1644
  retryable: boolean;
@@ -1653,17 +1653,17 @@ declare function createMerchantBridge(options: MerchantBridgeOptions): {
1653
1653
  execution: {
1654
1654
  type: "purchase";
1655
1655
  merchantOrderId: string | null;
1656
- paymentStatus: "unknown" | "not_started" | "pending" | "failed" | "succeeded" | "not_required" | "expired";
1656
+ paymentStatus: "unknown" | "failed" | "pending" | "expired" | "succeeded" | "not_started" | "not_required";
1657
1657
  checkoutUrl: string | null;
1658
1658
  checkoutExpiresAt: string | null;
1659
1659
  operationId: string;
1660
1660
  customerId: string;
1661
1661
  merchantExecutionId: string;
1662
- fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
1663
- recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
1662
+ fulfillmentStatus: "failed" | "pending" | "applied" | "not_started" | "not_applicable";
1663
+ recordingStatus: "accepted" | "failed" | "pending" | "not_ready";
1664
1664
  updatedAt: string;
1665
1665
  problem: {
1666
- phase: "payment" | "execution" | "fulfillment" | "recording";
1666
+ phase: "execution" | "payment" | "fulfillment" | "recording";
1667
1667
  code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
1668
1668
  recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
1669
1669
  retryable: boolean;
@@ -1672,17 +1672,17 @@ declare function createMerchantBridge(options: MerchantBridgeOptions): {
1672
1672
  pollAfterMs: number | null;
1673
1673
  } | {
1674
1674
  type: "subscription_change";
1675
- status: "unknown" | "pending" | "applied" | "failed" | "scheduled";
1675
+ status: "unknown" | "failed" | "pending" | "scheduled" | "applied";
1676
1676
  merchantSubscriptionId: string;
1677
1677
  scheduledFor: string | null;
1678
1678
  operationId: string;
1679
1679
  customerId: string;
1680
1680
  merchantExecutionId: string;
1681
- fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
1682
- recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
1681
+ fulfillmentStatus: "failed" | "pending" | "applied" | "not_started" | "not_applicable";
1682
+ recordingStatus: "accepted" | "failed" | "pending" | "not_ready";
1683
1683
  updatedAt: string;
1684
1684
  problem: {
1685
- phase: "payment" | "execution" | "fulfillment" | "recording";
1685
+ phase: "execution" | "payment" | "fulfillment" | "recording";
1686
1686
  code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
1687
1687
  recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
1688
1688
  retryable: boolean;
@@ -1696,16 +1696,16 @@ declare function createMerchantBridge(options: MerchantBridgeOptions): {
1696
1696
  } | undefined;
1697
1697
  } | {
1698
1698
  type: "refund";
1699
- status: "unknown" | "pending" | "failed" | "succeeded";
1699
+ status: "unknown" | "failed" | "pending" | "succeeded";
1700
1700
  merchantRefundId: string | null;
1701
1701
  operationId: string;
1702
1702
  customerId: string;
1703
1703
  merchantExecutionId: string;
1704
- fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
1705
- recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
1704
+ fulfillmentStatus: "failed" | "pending" | "applied" | "not_started" | "not_applicable";
1705
+ recordingStatus: "accepted" | "failed" | "pending" | "not_ready";
1706
1706
  updatedAt: string;
1707
1707
  problem: {
1708
- phase: "payment" | "execution" | "fulfillment" | "recording";
1708
+ phase: "execution" | "payment" | "fulfillment" | "recording";
1709
1709
  code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
1710
1710
  recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
1711
1711
  retryable: boolean;
@@ -1723,17 +1723,17 @@ declare function createMerchantBridge(options: MerchantBridgeOptions): {
1723
1723
  }>;
1724
1724
  executeSubscriptionChange(operationId: string, signal?: AbortSignal): Promise<{
1725
1725
  type: "subscription_change";
1726
- status: "unknown" | "pending" | "applied" | "failed" | "scheduled";
1726
+ status: "unknown" | "failed" | "pending" | "scheduled" | "applied";
1727
1727
  merchantSubscriptionId: string;
1728
1728
  scheduledFor: string | null;
1729
1729
  operationId: string;
1730
1730
  customerId: string;
1731
1731
  merchantExecutionId: string;
1732
- fulfillmentStatus: "not_started" | "pending" | "applied" | "failed" | "not_applicable";
1733
- recordingStatus: "pending" | "failed" | "not_ready" | "accepted";
1732
+ fulfillmentStatus: "failed" | "pending" | "applied" | "not_started" | "not_applicable";
1733
+ recordingStatus: "accepted" | "failed" | "pending" | "not_ready";
1734
1734
  updatedAt: string;
1735
1735
  problem: {
1736
- phase: "payment" | "execution" | "fulfillment" | "recording";
1736
+ phase: "execution" | "payment" | "fulfillment" | "recording";
1737
1737
  code: "INVALID_PROTOCOL_VERSION" | "UNSUPPORTED_PROTOCOL_VERSION" | "PROTOCOL_RETIRED" | "UNAUTHENTICATED" | "FORBIDDEN" | "SCOPE_MISMATCH" | "INVALID_REQUEST" | "NOT_FOUND" | "CONFLICT" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "NOT_CONFIGURED" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_ERROR";
1738
1738
  recovery: "fix_request" | "authenticate" | "check_permissions" | "check_scope" | "resolve_conflict" | "reload_state" | "retry_same_request" | "configure_integration" | "check_availability" | "upgrade_sdk" | "recover_operation" | "contact_support";
1739
1739
  retryable: boolean;
@@ -2026,7 +2026,6 @@ declare function showPaywall(container: HTMLElement, options: PaywallHostOptions
2026
2026
  initialPageId?: string | undefined;
2027
2027
  };
2028
2028
  schemaVersion: 3;
2029
- offeringVersionId: string | null;
2030
2029
  products: {
2031
2030
  items: {
2032
2031
  productVersionId: string;
@@ -2045,6 +2044,7 @@ declare function showPaywall(container: HTMLElement, options: PaywallHostOptions
2045
2044
  }[];
2046
2045
  } | undefined;
2047
2046
  };
2047
+ offeringVersionId: string | null;
2048
2048
  buttons: Record<string, {
2049
2049
  type: "checkout";
2050
2050
  product: {
@@ -2257,6 +2257,7 @@ declare function showPaywall(container: HTMLElement, options: PaywallHostOptions
2257
2257
  }>;
2258
2258
  };
2259
2259
  }>;
2260
+ declare function createPaywallSession(...args: Parameters<typeof createPaywallSession$1>): Promise<PaywallSession>;
2260
2261
 
2261
2262
  /** Loading customer API clients does not initialize the UI renderer. */
2262
2263
  declare function showFunnelRun(...args: Parameters<typeof showFunnelRun$1>): Promise<{
@@ -2297,4 +2298,4 @@ declare function prepareContent(...args: Parameters<typeof prepareContent$1>): P
2297
2298
  updateCapabilities(data: SurfaceData): void;
2298
2299
  }>;
2299
2300
 
2300
- export { type ContentActionIntent, type ContentHostOptions, EntitlementCheckResult, FunnelCommandStorage, FunnelExecutionPolicy, type FunnelHostOptions, type FunnelPurchaseAttempt, type FunnelPurchaseClient, type FunnelPurchaseEntry, type FunnelPurchaseHostOptions, type FunnelPurchaseOptions, type FunnelPurchaseStart, type FunnelPurchaseState, type FunnelPurchaseStorage, FunnelRunController, type IamFunnelEntriesOptions, type IamFunnelProcessEntriesOptions, IndianaOptions as LongplayOptions, MerchantBridgeError, type MerchantBridgeOptions, type PaywallHostOptions, type PaywallPurchaseIntent, PaywallRecovery, PaywallSession, PresentationLoadingOptions, SessionCredentials, createBrowserFunnelCommandStorage, createBrowserFunnelPurchaseStorage, createFunnelPageExperiments, createFunnelProcess, createFunnelPurchaseClient, createIamFunnelEntries, createIamFunnelProcessEntries, createMerchantBridge, formatCouponDiscount, formatCouponMoney, formatCouponTerms, mountContent, prepareContent, showFunnelPurchase, showFunnelRun, showPaywall };
2301
+ export { type ContentActionIntent, type ContentHostOptions, EntitlementCheckResult, FunnelCommandStorage, FunnelExecutionPolicy, type FunnelHostOptions, type FunnelPurchaseAttempt, type FunnelPurchaseClient, type FunnelPurchaseEntry, type FunnelPurchaseHostOptions, type FunnelPurchaseOptions, type FunnelPurchaseStart, type FunnelPurchaseState, type FunnelPurchaseStorage, FunnelRunController, type IamFunnelEntriesOptions, type IamFunnelProcessEntriesOptions, IndianaOptions as LongplayOptions, MerchantBridgeError, type MerchantBridgeOptions, type PaywallHostOptions, type PaywallPurchaseIntent, PaywallRecovery, PaywallSession, PresentationLoadingOptions, SessionCredentials, createBrowserFunnelCommandStorage, createBrowserFunnelPurchaseStorage, createFunnelPageExperiments, createFunnelProcess, createFunnelPurchaseClient, createIamFunnelEntries, createIamFunnelProcessEntries, createMerchantBridge, createPaywallSession, formatCouponDiscount, formatCouponMoney, formatCouponTerms, mountContent, prepareContent, showFunnelPurchase, showFunnelRun, showPaywall };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{a as ln,c as fn}from"./chunk-7AXCG6NU.js";import{a as yn,b as ge}from"./chunk-EIYWDWXP.js";import{a as pe}from"./chunk-JGG4R75K.js";import"./chunk-ZX2RWS3T.js";import{a as tn,c as un,d as mn}from"./chunk-BB5P5HPS.js";import"./chunk-THGLNE4K.js";import{a as dn}from"./chunk-C2BODHNY.js";import"./chunk-34I23EKZ.js";import{c as nn,d as sn,e as cn,g as pn}from"./chunk-TUYBXAAK.js";import{i as rn,q as Se}from"./chunk-LFFBNGXP.js";import{c as on,d as an}from"./chunk-RKREEPCT.js";import{b as Re}from"./chunk-5HJMAZ7A.js";import{a as B}from"./chunk-SJNF6JDJ.js";import{a as Ie,c as se}from"./chunk-J6KIN4RH.js";import"./chunk-SLUA7ABW.js";import{c as ye,d as he}from"./chunk-OEH47Y2L.js";import"./chunk-2ZJ5CS5Q.js";import{A as Be,B as He,C as Le,D as qe,F as be,G as Ue,H as Ve,Ha as Ge,Ka as Ke,La as fe,Ma as me,Na as $e,S as Ye,T as Qe,U as en,l as Fe,ma as je,s as Ee,t as Ne,u as Oe,v as xe,x as De,y as Te,z as ke}from"./chunk-O4535GJR.js";import{a as X}from"./chunk-DSPLGTQI.js";import"./chunk-MHEYMXGZ.js";import{z as we}from"zod";var f=class extends Error{constructor(m,T=0,b=!1,R="fix_request"){super(m);this.code=m;this.status=T;this.retryable=b;this.recovery=R;this.name="MerchantBridgeError"}code;status;retryable;recovery};async function hn(n,P){if(!n.headers.get("content-type")?.split(";",1)[0].trim().match(/^application\/(?:json|[a-z0-9.+-]+\+json)$/i))throw new f("MERCHANT_BRIDGE_INVALID_RESPONSE");let m=n.body?.getReader();if(!m)throw new f("MERCHANT_BRIDGE_INVALID_RESPONSE");let T=()=>{m.cancel().catch(()=>{})};P.addEventListener("abort",T,{once:!0});let b=0,R="",r=new TextDecoder("utf-8",{fatal:!0});try{for(P.throwIfAborted();;){let i=await m.read();if(P.throwIfAborted(),i.done)break;if(b+=i.value.byteLength,b>262144)throw new f("MERCHANT_BRIDGE_INVALID_RESPONSE");R+=r.decode(i.value,{stream:!0})}return R+=r.decode(),JSON.parse(R)}catch(i){throw P.throwIfAborted(),i instanceof f?i:new f("MERCHANT_BRIDGE_INVALID_RESPONSE")}finally{P.removeEventListener("abort",T),await m.cancel().catch(()=>{}),m.releaseLock()}}function In(n){let P=De.parse(n.origin),m=Te.parse(n.manifest),T={projectId:n.scope.projectId,environmentId:n.scope.environmentId,environment:n.scope.environment};for(let u of["projectId","environmentId","environment"])if(m[u]!==n.scope[u])throw new f("MERCHANT_BRIDGE_SCOPE_MISMATCH");let b=n.customerId===void 0?null:we.uuid().parse(n.customerId),R=0,r=null,i=null,y=new AbortController,p=n.fetch??globalThis.fetch;async function U(u,s,h,O,K){if(!m.capabilities.includes(u))throw new f("MERCHANT_BRIDGE_CAPABILITY_UNSUPPORTED",501);let g=xe[u];if(["merchant_catalog_reader","merchant_refund_authority","indiana_server_key"].includes(g.authority))throw new f("MERCHANT_BRIDGE_FORBIDDEN",403);let d=R,S=AbortSignal.any([y.signal,AbortSignal.timeout(Math.min(3e4,Math.max(1e3,n.timeoutMs??1e4))),...n.signal?[n.signal]:[],...O?[O]:[]]);S.throwIfAborted();let a=new Headers(await n.headers?.());if(S.throwIfAborted(),d!==R)throw new DOMException("Merchant identity changed","AbortError");if(/\bgg_(?:sk|ct|rt)_/.test(a.get("authorization")??"")||a.has("X-Indiana-Bridge-Signature")||a.has("X-Indiana-Bridge-Key-Id"))throw new f("MERCHANT_BRIDGE_FORBIDDEN",403);a.set(Oe,String(Ee)),a.set("Accept","application/json");let V=crypto.randomUUID();a.set("X-Request-Id",V),a.set("Content-Type","application/json");let E=await p(P+Ne,{method:"POST",credentials:"include",redirect:"error",cache:"no-store",headers:a,signal:S,body:JSON.stringify({bridgeVersion:Ee,requestId:V,command:g.command,scope:T,data:K??(h===void 0?{}:{operationId:h})})}),H=await hn(E,S);if(S.throwIfAborted(),d!==R)throw new DOMException("Merchant identity changed","AbortError");if(!E.ok){let _=Ve.safeParse(H);throw!_.success||_.data.scope.projectId!==n.scope.projectId||_.data.scope.environment!==n.scope.environment||_.data.scope.environmentId!==n.scope.environmentId||_.data.requestId!==V||_.data.command!==g.command?new f("MERCHANT_BRIDGE_INVALID_RESPONSE",E.status):new f(_.data.error.code,E.status,_.data.error.retryable,_.data.error.recovery)}let x=ke(we.unknown()).safeParse(H);if(!x.success||x.data.scope.projectId!==n.scope.projectId||x.data.scope.environment!==n.scope.environment||x.data.scope.environmentId!==n.scope.environmentId||x.data.requestId!==V||x.data.command!==g.command)throw new f("MERCHANT_BRIDGE_INVALID_RESPONSE",E.status);let l=s.safeParse(x.data.data);if(!l.success)throw new f("MERCHANT_BRIDGE_INVALID_RESPONSE",E.status);return l.data}function N(){if(!b)throw new f("MERCHANT_BRIDGE_UNAUTHENTICATED",401);return b}async function $(u,s,h,O){let K=N(),g=qe.parse({operationId:h,customerId:K}),d=await U(u,s,g.operationId,O,g);if(d.customerId!==K||d.operationId!==g.operationId)throw new f("MERCHANT_BRIDGE_SCOPE_MISMATCH");return d}return{async readPresentation(u){let s=await U("presentation",He,void 0,u);if(i!==null&&i!==s.nativeUserId)throw new f("MERCHANT_BRIDGE_SCOPE_MISMATCH");if(s.presentation&&b!==null&&s.presentation.customerId!==b)throw new f("MERCHANT_BRIDGE_SCOPE_MISMATCH");return i=s.nativeUserId,r=s.presentation,s},async createSession(u){let s=await U("session",Be,void 0,u);if(i!==null&&i!==s.nativeUserId)throw new f("MERCHANT_BRIDGE_SCOPE_MISMATCH");if(b!==null&&b!==s.session.customerId)throw new f("MERCHANT_BRIDGE_SCOPE_MISMATCH");if(r&&r.customerId!==s.session.customerId)throw new f("MERCHANT_BRIDGE_SCOPE_MISMATCH");return b=s.session.customerId,i=s.nativeUserId,s.session},async reportPresentation(u,s){let h=N(),O=Le.parse(u);if(!r||r.customerId!==h||r.decisionId!==O.decisionId)throw new f("MERCHANT_BRIDGE_SCOPE_MISMATCH");return U("presentation_events",we.strictObject({queued:we.literal(!0)}),void 0,s,O)},async readCustomerCommerce(u){let s=N(),h=await U("customer_commerce",Ue,void 0,u);if(h.customerId!==s)throw new f("MERCHANT_BRIDGE_SCOPE_MISMATCH");return h},async executePurchase(u,s){let h=await $("purchases",be,u,s);if(h.type!=="purchase")throw new f("MERCHANT_BRIDGE_INVALID_RESPONSE");return h},readOperation:(u,s)=>$("operation_status",Fe,u,s),async executeSubscriptionChange(u,s){let h=await $("subscription_changes",be,u,s);if(h.type!=="subscription_change")throw new f("MERCHANT_BRIDGE_INVALID_RESPONSE");return h},reset(){R++,y.abort(),y=new AbortController,b=null,r=null,i=null}}}import{z as ce}from"zod";var Je=ce.strictObject({command:me,target:Ke,runId:ce.uuid().optional(),expiresAt:ce.iso.datetime({offset:!0}).optional()}).refine(n=>n.command.release===n.target.release),ze=ce.strictObject({schemaVersion:ce.literal(1),entries:ce.array(Je).max(4e3)});function Xe(n){let P=!1,m=()=>{P||n.unavailable(),P=!0};function T(){return n.storage===!1?void 0:n.storage??globalThis.sessionStorage}function b(r){let i=T()?.getItem(r);if(!i)return[];if(i.length>1048576)throw Error("Entry recovery is too large");return ze.parse(JSON.parse(i)).entries}function R(r,i){let y=T();if(!y)return;if(!i.length)return y.removeItem(r);let p=JSON.stringify(ze.parse({schemaVersion:1,entries:i}));if(p.length>1048576)throw Error("Entry recovery is too large");y.setItem(r,p)}return{load(){try{let r=n.binding();if(!r||n.storage===!1)return;let i="indiana.funnel.entries.v1."+JSON.stringify(r);return{key:i,entries:b(i)}}catch{m();return}},retain(r,i){if(r)try{let y=Je.parse(i);R(r,[...b(r).filter(p=>p.command.funnelId!==y.command.funnelId),y])}catch{m()}},forget(r,i){if(r)try{R(r,b(r).filter(y=>y.command.requestId!==i))}catch{m()}}}}var ve=n=>["running","waiting"].includes(n.status)&&!n.pendingRequest&&(n.stopped||!n.screen&&!n.paywall&&n.instruction?.type==="wait"&&n.instruction.kind!=="operation");function gn(n){let P=ye(n.baseUrl),m=n.scope,T=Re(n),b=n.fetch??globalThis.fetch.bind(globalThis),R,r=!1,i=!1,y=0,p=0,U="",N=0,$=0,u=0,s=!1,h,O=!0,K,g,d,S,a,V=-1,E,H=e=>{E===e&&(E=void 0,q())},x=new Set,l=(e,o)=>X(n.onStatus,e,o),_=new Set,W=Xe({storage:n.recoveryStorage,binding:()=>{let e=n.session.snapshot()?.customerId;return e?[P,m.projectId,m.environment,n.environmentId,n.appManifestRelease,e]:void 0},unavailable:()=>l("recovery_unavailable")}),z=e=>W.forget(e.storageKey,e.command.requestId);function te(e,o){o&&(e.runId=o.id,e.expiresAt=o.runExpiresAt),W.retain(e.storageKey,{command:e.command,target:e.target,...e.runId&&{runId:e.runId},...e.expiresAt&&{expiresAt:e.expiresAt}})}function Q(){let e=a;a=void 0,e?.host.destroy(),e?.slot.remove(),e?.client.reset(),q()}let de=()=>E!==void 0||a!==void 0&&!a.background;function t(e,o){if(a?.client!==e)return;te(a.recovery,o);let c=ve(o);a.slot.hidden=c,c!==a.background&&(a.background=c,c?l("run_background",a.entryId):V=p,q())}function w(e,o,c){let v=e.client.view;if(!o||e.background||!v?.screen||v.paywall||v.pendingRequest||v.stopped||v.status!=="waiting")return;let M=je.parse({operation:"close",requestId:crypto.randomUUID(),nodeId:v.nodeId,visit:v.visit,revision:v.revision,customerToken:o}),G=Re({...n,session:void 0});G.requestWithCredential("funnels",M,e.runToken,{keepalive:c}).then(()=>z(e.recovery)).catch(()=>{}).finally(()=>G.dispose())}let A=()=>{a&&w(a,n.session.peek(),!0)},L=()=>Date.now()<$&&performance.now()<u;function j(e){if(e.target.release!==n.appManifestRelease||!L())return!1;try{return se(e.target.render,document,location.pathname,()=>{})}catch{return l("incompatible",e.id),!1}}function ee(e){if(r||e.epoch!==N||e.visit!==p||document.visibilityState==="hidden")return!1;try{return se(e.target.render,document,location.pathname,()=>{})}catch{return!1}}async function re(e){if(de()){l("in_progress",e.id);return}if(!n.session.peek()){l("identity_required",e.id);return}let o=W.load(),c=o?.entries.find(M=>M.command.funnelId===e.funnelId&&(!M.expiresAt||Date.parse(M.expiresAt)>Date.now()));if(c){if(!oe(c)){l("recovery_pending",e.id);return}let M={...c,storageKey:o.key,epoch:N,visit:p};_.add(M.command.requestId),E=M,await ne(M);return}let v={freshStart:!0,command:me.parse({operation:"entry_start",entryId:e.id,funnelId:e.funnelId,versionId:e.versionId,release:n.appManifestRelease,requestId:crypto.randomUUID(),locale:document.documentElement.lang||"en"}),epoch:N,visit:p,target:e.target,storageKey:o?.key};_.add(v.command.requestId),E=v,await ne(v)}async function ne(e){if(e.dispatching)return;e.dispatching=!0;let o=e.freshStart===!0;e.freshStart=!1;let c,v=!1,M=!1;async function G(D){if(e.epoch!==N)return;let I=D.view;if(!(e.storageKey&&I&&(ve(I)||I.paywall||I.pendingRequest))&&I&&["running","waiting"].includes(I.status))try{await D.submit({operation:"close",requestId:crypto.randomUUID(),nodeId:I.nodeId,visit:I.visit,revision:I.revision}),z(e)}catch(F){if(!(F instanceof B&&F.code==="FORBIDDEN"))throw F}}try{te(e),l("starting",e.command.entryId);let D=await T.request("funnels",e.command),I=$e.safeParse(D);if(I.success){if(I.data.scope.projectId!==m.projectId||I.data.scope.environment!==m.environment)throw new B("SCOPE_MISMATCH","Entry scope changed");e.epoch===N&&l(I.data.reason,e.command.entryId),z(e),H(e);return}let F=Ge.parse(D);if(!F.runToken||F.scope.projectId!==m.projectId||F.scope.environment!==m.environment||F.run.source.type!=="funnel"||F.run.source.id!==e.command.funnelId||F.run.source.versionId!==e.command.versionId||e.runId!==void 0&&F.run.id!==e.runId)throw new B("INVALID_RESPONSE","Invalid entry Run");if(e.epoch!==N){H(e),l("identity_changed",e.command.entryId);return}te(e,F.run);let C=Se({...n,runToken:F.runToken,funnelId:e.command.funnelId,initialResponse:o?D:void 0});c=C,M=!0,await C.get(),M=!1;let J=C.view;if(!J||J.id!==F.run.id||J.source.type!=="funnel"||J.source.id!==e.command.funnelId||J.source.versionId!==e.command.versionId)throw new B("INVALID_RESPONSE","Entry Run version changed");if(!["running","waiting"].includes(J.status)){z(e),H(e),l("run_ended",e.command.entryId);return}if(!ee(e)){await G(C),l("left_screen",e.command.entryId),H(e);return}let ie=!1,Ae=!1;if(a&&!a.background){await G(C),l("in_progress",e.command.entryId),H(e);return}a&&Q();let Y=document.createElement("div");Y.hidden=ve(J),n.container.append(Y);let Me=await ge(Y,{...n.host,client:C,appManifestRelease:n.appManifestRelease,onState(k){t(C,k),X(n.host?.onState,k)},onDismiss(k){ie=!0,Y.remove(),k&&!["running","waiting"].includes(k.status)&&z(e),a?.client===C&&(a=void 0,C.reset(),q(),k&&k.status!=="completed"&&l("run_ended",e.command.entryId)),X(n.host?.onDismiss,k)},onComplete(k){Ae=!0,z(e),a?.client===C&&Q(),X(n.host?.onComplete,k)},onError(k){X(n.host?.onError,k),a?.client===C&&k instanceof B&&k.code==="FORBIDDEN"&&(z(e),Q(),l("run_ended",e.command.entryId))}}).catch(k=>{throw Y.remove(),k});if(!ee(e)||ie||Ae){Me.destroy(),Y.remove(),ee(e)||await G(C),H(e);return}let le=ve(C.view??J);Y.hidden=le,a={host:Me,client:C,slot:Y,entryId:e.command.entryId,background:le,runToken:F.runToken,owner:n.session.peek(),recovery:e},le||(V=e.visit),v=!0,H(e),l("started",e.command.entryId),le&&l("run_background",e.command.entryId)}catch(D){D instanceof B&&(!c||M&&D.code==="FORBIDDEN")&&D.status!==void 0&&D.status>=400&&D.status<500&&!D.retryable&&(z(e),H(e)),e.epoch===N&&!r&&(l("start_failed",e.command.entryId),X(n.host?.onError,D))}finally{v||c?.reset(),e.dispatching=!1}}function oe(e){if(e.command.release!==n.appManifestRelease||e.target.release!==n.appManifestRelease)return!1;try{return se(e.target.render,document,location.pathname,()=>{})}catch{return!1}}function Z(){if(de())return!1;let e=W.load();for(let o of e?.entries??[]){if(o.expiresAt&&Date.parse(o.expiresAt)<=Date.now()){W.forget(e.key,o.command.requestId);continue}if(o.command.requestId===a?.recovery.command.requestId||_.has(o.command.requestId)||!oe(o))continue;_.add(o.command.requestId);let c={...o,storageKey:e.key,epoch:N,visit:p};return E=c,ne(c),!0}return!1}function ue(){if(s=!1,r||!i||document.visibilityState==="hidden")return;ae();let e=a!==void 0&&!a.background;if(e&&(V=p),!Z()){if(!L()){O=!0;return}O=!1;for(let o of R?.entries??[]){let c=`${o.funnelId}:${o.id}`;if(!(o.event!=="screen_enter"||x.has(c)||!j(o))){if(!n.session.peek()){l("identity_required",o.id);continue}if(V===p){x.add(c),e&&l("in_progress",o.id);continue}if(E){l("in_progress",o.id);return}x.add(c),re(o);break}}}}let q=()=>{!s&&!r&&(s=!0,queueMicrotask(ue))};function ae(){let e=location.origin+location.pathname;return e===U?!1:(U=e,p++,O=!0,x.clear(),_.clear(),!0)}function Ze(){ae()&&q()}function _e(e){if(!e.isTrusted||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||document.visibilityState==="hidden")return;let o=e.target;if(!(o instanceof Element)||o.closest("[data-indiana-funnel]"))return;let c=o.closest("button,a,input");if(!(!c||c.matches(":disabled,[aria-disabled='true']")||c.closest("[hidden],[inert],[aria-hidden='true']")))for(let v of R?.entries??[]){let M=v.target.button;if(!(v.event!=="button_click"||!M||!j(v))){try{let G=Ie(document);if(!c.matches(M.selector)||G(M.selector,c)!==1)continue}catch{l("incompatible",v.id);continue}re(v);break}}}async function Pe(){if(r)return;if(h)return h;let e=++y,o=new AbortController;K=o;let c,v=new Promise((D,I)=>{c=()=>I(new B("TIMEOUT","Funnel entry configuration read cancelled or timed out")),o.signal.addEventListener("abort",c,{once:!0})}),M=setTimeout(()=>o.abort(),n.timeoutMs??5e3),G=(async()=>{let D=async()=>{let ie=await b(`${P}/api/v1/funnel-entries/${n.environmentId}?iam=${n.appManifestRelease}`,{credentials:"omit",cache:"no-store",redirect:"error",signal:o.signal});if(!ie.ok)throw new B("SERVICE_UNAVAILABLE","Funnel entries unavailable",ie.status);return fe.parse(await ie.json())},I=await Promise.race([D(),v]),F=Date.parse(I.validatedAt),C=Date.parse(I.validUntil);if(I.scope.projectId!==m.projectId||I.scope.environment!==m.environment||I.scope.environmentId!==n.environmentId||I.release!==n.appManifestRelease||C<=Date.now()||F>Date.now()+5e3||C-F>6e4||C<=F)throw new B("INVALID_RESPONSE","Entry configuration scope or deadline changed");if(r||e!==y)return;let J=R===void 0;R=I,$=C,u=performance.now()+Math.min(C-Date.now(),6e4),(J||O)&&q()})();h=G;try{await G}finally{clearTimeout(M),o.signal.removeEventListener("abort",c),h===G&&(h=void 0)}}async function We(){if(!(!i||r)){try{await Pe()}catch{r||l("configuration_unavailable")}q()}}let Ce=pe({document,run:We,delay:()=>i&&!r?15e3:void 0});return{async start(){i||r||(i=!0,U=location.origin+location.pathname,g=he(Ze),d=n.session.subscribeIdentity(()=>{N++,O=!0,E=void 0,x.clear(),V=-1,_.clear(),a&&w(a,a.owner,!1),Q(),q()}),S=new MutationObserver(q),S.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["hidden","inert","aria-hidden","data-indiana-id","id","style","data-testid","data-test","data-qa"]}),document.addEventListener("click",_e,!0),addEventListener("pagehide",A),await Ce.refresh())},refresh:Pe,async retry(){E&&!r&&E.epoch===N&&await ne(E)},destroy(){r=!0,y++,Ce.destroy(),K?.abort(),S?.disconnect(),g?.(),d?.(),document.removeEventListener("click",_e,!0),removeEventListener("pagehide",A),A(),Q(),T.dispose(),R=void 0}}}function wn(n){let P=ye(n.baseUrl),m=n.fetch??globalThis.fetch.bind(globalThis),T,b=0,R=0,r=!1,i=!1,y=0,p=0,U=-1,N=!1,$="",u,s,h,O,K=new Set,g,d,S,a=(t,w)=>X(n.onStatus,t,w),V=()=>Date.now()<b&&performance.now()<R;function E(t){try{return V()&&t.target.release===n.appManifestRelease&&se(t.target.render,document,location.pathname,()=>{})}catch{return a("incompatible",t.id),!1}}function H(){let t=S;S=void 0,t?.host.destroy(),t?.slot.remove()}async function x(t){if(t.dispatching)return;t.dispatching=!0;let w=y;try{let A=await t.process.open({operation:"entry_start",funnelId:t.entry.funnelId,versionId:t.entry.versionId,entryId:t.entry.id,release:n.appManifestRelease,locale:n.locale??"en"});if(r||w!==y||d!==t)return;let L=document.createElement("div");n.container.append(L),U=p;let j=await ge(L,{...n.host,client:A.controller,appManifestRelease:n.appManifestRelease,onDismiss(ee){S?.process===t.process&&(S=void 0,L.remove()),X(n.host?.onDismiss,ee)}});if(r||w!==y||d!==t){j.destroy(),L.remove();return}S={entry:t.entry,process:t.process,host:j,slot:L},d=void 0,a("run_presented",t.entry.id)}catch(A){if(r||w!==y||d!==t)return;A instanceof B&&"result"in A?(d=void 0,t.process.destroy(),a("suppressed",t.entry.id),_()):a("entry_unavailable",t.entry.id)}finally{t.dispatching=!1}}function l(t){if(r||d||S||g||U===p||!E(t))return;let w=`${p}:${t.id}`;if(K.has(w))return;K.add(w);let A={entry:t,process:n.createProcess(t),visit:p};d=A,x(A)}function _(){N||r||(N=!0,queueMicrotask(()=>{if(N=!1,!(r||document.visibilityState==="hidden"||!V()||d||S||g||U===p)){for(let t of T?.entries??[])if(t.event==="screen_enter"&&E(t)){l(t);break}}}))}function W(t){if(!t.isTrusted||t.defaultPrevented||!(t.target instanceof Element)||d||S||g||U===p)return;let w=Ie(document,()=>{});for(let A of T?.entries??[]){let L=A.target.button;if(A.event!=="button_click"||!L||!E(A))continue;let j=t.target.closest(L.selector);if(!(!j||j.tagName.toLowerCase()!==L.tag||w(L.selector)!==1||j.matches(":disabled")||j.closest('[inert],[hidden],[aria-hidden="true"]'))){l(A);break}}}let z=()=>{let t=location.origin+location.pathname;t!==$&&($=t,p++,K.clear(),_())};async function te(){if(r)return;if(s)return s;let t=y,w=new AbortController;u=w;let A,L=new Promise((ne,oe)=>{A=oe}),j=()=>A(new B("TIMEOUT","Funnel entry read cancelled"));w.signal.addEventListener("abort",j,{once:!0});let ee=setTimeout(()=>w.abort(),n.timeoutMs??5e3),re=(async()=>{let ne=encodeURIComponent(JSON.stringify(["funnel-process/1"])),oe=async()=>{let ae=await m(`${P}/api/v1/funnel-entries/${n.environmentId}?iam=${n.appManifestRelease}&executionContracts=${ne}`,{credentials:"omit",cache:"no-store",redirect:"error",signal:w.signal});if(!ae.ok)throw new B("SERVICE_UNAVAILABLE","Funnel entries unavailable",ae.status);return fe.parse(await ae.json())},Z=await Promise.race([oe(),L]),ue=Date.parse(Z.validatedAt),q=Date.parse(Z.validUntil);if(Z.scope.projectId!==n.scope.projectId||Z.scope.environment!==n.scope.environment||Z.scope.environmentId!==n.environmentId||Z.release!==n.appManifestRelease||q<=Date.now()||ue>Date.now()+5e3||q<=ue||q-ue>6e4)throw new B("INVALID_RESPONSE","Entry scope or deadline changed");r||t!==y||(T=Z,b=q,R=performance.now()+Math.min(q-Date.now(),6e4),_())})();s=re;try{await re}finally{clearTimeout(ee),w.signal.removeEventListener("abort",j),s===re&&(s=void 0)}}async function Q(){if(!(!i||r))try{await te()}catch{r||a("configuration_unavailable")}}let de=pe({document,run:Q,delay:()=>i&&!r?15e3:void 0});return{async start(){i||r||(i=!0,$=location.origin+location.pathname,h=he(z),O=new MutationObserver(_),O.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["hidden","inert","aria-hidden","data-indiana-id","id","style","data-testid","data-test","data-qa"]}),document.addEventListener("click",W,!0),await de.refresh())},refresh:te,async retry(){d&&!r&&await x(d)},async syncIdentity(){let t=S??d??g;if(t)try{let w=await t.process.syncIdentity();return g===t&&(d={entry:t.entry,process:t.process,visit:p},g=void 0,await x(d)),w}catch(w){throw t.process.view||(g={entry:t.entry,process:t.process,visit:p},d=void 0,H()),w}},async detach(){y++,u?.abort();let t=S??d??g;t&&(g={entry:t.entry,process:t.process,visit:p}),d=void 0,H(),t&&await t.process.detach()},destroy(){r=!0,y++,de.destroy(),u?.abort(),O?.disconnect(),h?.(),document.removeEventListener("click",W,!0);let t=S??d??g;d=void 0,g=void 0,H(),t?.process.destroy(),T=void 0}}}async function zn(n,P){return(await import("./paywall-CGBFHFRU.js")).showPaywall(n,P)}async function Jn(...n){let[P]=await Promise.all([import("./funnel-runtime-host-I6PJXVRC.js"),import("./screen-renderer-WOMWOEYL.js"),import("./paywall-CGBFHFRU.js")]);return P.showFunnelRun(...n)}async function Xn(...n){return(await import("./funnel-host-purchase-XW7IF52Y.js")).showFunnelPurchase(...n)}async function Zn(...n){return(await import("./content-FD2Q6XD6.js")).mountContent(...n)}async function Wn(...n){return(await import("./content-FD2Q6XD6.js")).prepareContent(...n)}export{B as LongplayError,f as MerchantBridgeError,rn as createBrowserFunnelCommandStorage,ln as createBrowserFunnelPurchaseStorage,cn as createConfigurationSync,nn as createFeatureClient,un as createFunnelClient,yn as createFunnelPageExperiments,mn as createFunnelProcess,fn as createFunnelPurchaseClient,Se as createFunnelRunController,gn as createIamFunnelEntries,wn as createIamFunnelProcessEntries,pn as createLocalFunnelClient,tn as createLongplay,In as createMerchantBridge,sn as createPaywallSession,dn as evaluateFunnelNode,Qe as formatCouponDiscount,Ye as formatCouponMoney,en as formatCouponTerms,on as getPaywallRecovery,Zn as mountContent,Wn as prepareContent,an as preparePaywallFallback,Xn as showFunnelPurchase,Jn as showFunnelRun,zn as showPaywall};
1
+ import{a as cn,c as dn}from"./chunk-DCCM7FYR.js";import{a as Ue,b as fn,c as Ie}from"./chunk-YSNMXK4R.js";import{a as pe}from"./chunk-JGG4R75K.js";import"./chunk-CNIBGSVO.js";import{a as en,c as sn,d as un}from"./chunk-MRFBMFNK.js";import"./chunk-3FPYCF7Z.js";import{a as an}from"./chunk-ORPOCB2J.js";import"./chunk-ECMWY3G2.js";import{h as Qe,i as on,k as ln}from"./chunk-2MTTK3BT.js";import"./chunk-BZSKOOMM.js";import"./chunk-LPDUK7HT.js";import{F as Re,e as Ve,g as je,h as fe,i as me,j as Ge,x as nn}from"./chunk-UHI7SPHK.js";import{a as qe}from"./chunk-G7NSECIG.js";import"./chunk-GIV4FOOW.js";import"./chunk-MYUYN7ZG.js";import{B as Fe,D as Oe,E as xe,G as De,H as Te,I as ke,J as Be,K as Ee,L as He,x as ve,y as Me,z as Ne}from"./chunk-C6JRUYKW.js";import{$ as Le,l as Ye,m as Ze,n as We}from"./chunk-PMCGTXGH.js";import"./chunk-7CFF6SWH.js";import{c as tn,d as rn}from"./chunk-PWQ5BHBJ.js";import"./chunk-HMRIMJ5W.js";import{b as be}from"./chunk-MWDR5FEU.js";import"./chunk-UBKD6VMS.js";import"./chunk-5RXU57I5.js";import"./chunk-DOJE7VUR.js";import{a as H}from"./chunk-X7G7JMZ3.js";import"./chunk-JAKOBECD.js";import{a as ge,c as ce}from"./chunk-J6KIN4RH.js";import"./chunk-SLUA7ABW.js";import{c as ye,d as he}from"./chunk-DCIGO3NJ.js";import"./chunk-3VUPVXAV.js";import"./chunk-SMIO7OG5.js";import{b as K}from"./chunk-WM27UTWT.js";import{a as Z}from"./chunk-DSPLGTQI.js";import"./chunk-O4KXODTJ.js";import"./chunk-CILM5XMH.js";import"./chunk-WOT6VMZA.js";var y=class extends Error{constructor(m,k=0,_=!1,E="fix_request"){super(m);this.code=m;this.status=k;this.retryable=_;this.recovery=E;this.name="MerchantBridgeError"}code;status;retryable;recovery};async function mn(n,A){if(!n.headers.get("content-type")?.split(";",1)[0].trim().match(/^application\/(?:json|[a-z0-9.+-]+\+json)$/i))throw new y("MERCHANT_BRIDGE_INVALID_RESPONSE");let m=n.body?.getReader();if(!m)throw new y("MERCHANT_BRIDGE_INVALID_RESPONSE");let k=()=>{m.cancel().catch(()=>{})};A.addEventListener("abort",k,{once:!0});let _=0,E="",r=new TextDecoder("utf-8",{fatal:!0});try{for(A.throwIfAborted();;){let i=await m.read();if(A.throwIfAborted(),i.done)break;if(_+=i.value.byteLength,_>262144)throw new y("MERCHANT_BRIDGE_INVALID_RESPONSE");E+=r.decode(i.value,{stream:!0})}return E+=r.decode(),JSON.parse(E)}catch(i){throw A.throwIfAborted(),i instanceof y?i:new y("MERCHANT_BRIDGE_INVALID_RESPONSE")}finally{A.removeEventListener("abort",k),await m.cancel().catch(()=>{}),m.releaseLock()}}function pn(n){let A=Oe.parse(n.origin),m=xe.parse(n.manifest),k={projectId:n.scope.projectId,environmentId:n.scope.environmentId,environment:n.scope.environment};for(let c of["projectId","environmentId","environment"])if(m[c]!==n.scope[c])throw new y("MERCHANT_BRIDGE_SCOPE_MISMATCH");let _=n.customerId===void 0?null:K.uuid().parse(n.customerId),E=0,r=null,i=null,g=new AbortController,I=n.fetch??globalThis.fetch;async function U(c,s,p,w,h){if(!m.capabilities.includes(c))throw new y("MERCHANT_BRIDGE_CAPABILITY_UNSUPPORTED",501);let d=Fe[c];if(["merchant_catalog_reader","merchant_refund_authority","indiana_server_key"].includes(d.authority))throw new y("MERCHANT_BRIDGE_FORBIDDEN",403);let l=E,o=AbortSignal.any([g.signal,AbortSignal.timeout(Math.min(3e4,Math.max(1e3,n.timeoutMs??1e4))),...n.signal?[n.signal]:[],...w?[w]:[]]);o.throwIfAborted();let N=new Headers(await n.headers?.());if(o.throwIfAborted(),l!==E)throw new DOMException("Merchant identity changed","AbortError");if(/\bgg_(?:sk|ct|rt)_/.test(N.get("authorization")??"")||N.has("X-Indiana-Bridge-Signature")||N.has("X-Indiana-Bridge-Key-Id"))throw new y("MERCHANT_BRIDGE_FORBIDDEN",403);N.set(Ne,String(ve)),N.set("Accept","application/json");let P=crypto.randomUUID();N.set("X-Request-Id",P),N.set("Content-Type","application/json");let b=await I(A+Me,{method:"POST",credentials:"include",redirect:"error",cache:"no-store",headers:N,signal:o,body:JSON.stringify({bridgeVersion:ve,requestId:P,command:d.command,scope:k,data:h??(p===void 0?{}:{operationId:p})})}),V=await mn(b,o);if(o.throwIfAborted(),l!==E)throw new DOMException("Merchant identity changed","AbortError");if(!b.ok){let D=He.safeParse(V);throw!D.success||D.data.scope.projectId!==n.scope.projectId||D.data.scope.environment!==n.scope.environment||D.data.scope.environmentId!==n.scope.environmentId||D.data.requestId!==P||D.data.command!==d.command?new y("MERCHANT_BRIDGE_INVALID_RESPONSE",b.status):new y(D.data.error.code,b.status,D.data.error.retryable,D.data.error.recovery)}let u=De(K.unknown()).safeParse(V);if(!u.success||u.data.scope.projectId!==n.scope.projectId||u.data.scope.environment!==n.scope.environment||u.data.scope.environmentId!==n.scope.environmentId||u.data.requestId!==P||u.data.command!==d.command)throw new y("MERCHANT_BRIDGE_INVALID_RESPONSE",b.status);let j=s.safeParse(u.data.data);if(!j.success)throw new y("MERCHANT_BRIDGE_INVALID_RESPONSE",b.status);return j.data}function M(){if(!_)throw new y("MERCHANT_BRIDGE_UNAUTHENTICATED",401);return _}async function z(c,s,p,w){let h=M();if(w!==void 0&&Ee.parse({operationId:w,customerId:h}),!m.capabilities.includes(c))throw new y("MERCHANT_BRIDGE_CAPABILITY_UNSUPPORTED",501);let d=E,l=AbortSignal.any([g.signal,AbortSignal.timeout(Math.min(3e4,Math.max(1e3,n.timeoutMs??1e4))),...n.signal?[n.signal]:[],...s?[s]:[]]);l.throwIfAborted();let o,N=new Promise((P,b)=>{o=()=>b(l.reason),l.addEventListener("abort",o,{once:!0})});try{let b=p(async()=>{let u=await import("./merchant-bridge-contracts-N3Q4W6ZU.js");if(l.throwIfAborted(),d!==E||_!==h)throw new DOMException("Merchant identity changed","AbortError");return u},l),V=await Promise.race([b,N]);return l.throwIfAborted(),V}finally{l.removeEventListener("abort",o)}}async function J(c,s,p,w){let h=M(),d=Ee.parse({operationId:p,customerId:h}),l=await U(c,s,d.operationId,w,d);if(l.customerId!==h||l.operationId!==d.operationId)throw new y("MERCHANT_BRIDGE_SCOPE_MISMATCH");return l}return{async readPresentation(c){let s=await U("presentation",ke,void 0,c);if(i!==null&&i!==s.nativeUserId)throw new y("MERCHANT_BRIDGE_SCOPE_MISMATCH");if(s.presentation&&_!==null&&s.presentation.customerId!==_)throw new y("MERCHANT_BRIDGE_SCOPE_MISMATCH");return i=s.nativeUserId,r=s.presentation,s},async createSession(c){let s=await U("session",Te,void 0,c);if(i!==null&&i!==s.nativeUserId)throw new y("MERCHANT_BRIDGE_SCOPE_MISMATCH");if(_!==null&&_!==s.session.customerId)throw new y("MERCHANT_BRIDGE_SCOPE_MISMATCH");if(r&&r.customerId!==s.session.customerId)throw new y("MERCHANT_BRIDGE_SCOPE_MISMATCH");return _=s.session.customerId,i=s.nativeUserId,s.session},async reportPresentation(c,s){let p=M(),w=Be.parse(c);if(!r||r.customerId!==p||r.decisionId!==w.decisionId)throw new y("MERCHANT_BRIDGE_SCOPE_MISMATCH");return U("presentation_events",K.strictObject({queued:K.literal(!0)}),void 0,s,w)},async readCustomerCommerce(c){let s=M(),p=await z("customer_commerce",c,async(w,h)=>{let[d,l]=await Promise.all([w(),U("customer_commerce",K.unknown(),void 0,h)]),o=d.merchantBridgeCommerceSchema.safeParse(l);if(!o.success)throw new y("MERCHANT_BRIDGE_INVALID_RESPONSE");return o.data});if(p.customerId!==s)throw new y("MERCHANT_BRIDGE_SCOPE_MISMATCH");return p},async executePurchase(c,s){let p=await z("purchases",s,async(w,h)=>J("purchases",(await w()).merchantBridgeOperationSchema,c,h),c);if(p.type!=="purchase")throw new y("MERCHANT_BRIDGE_INVALID_RESPONSE");return p},readOperation:(c,s)=>z("operation_status",s,async(p,w)=>J("operation_status",(await p()).merchantOperationLookupSchema,c,w),c),async executeSubscriptionChange(c,s){let p=await z("subscription_changes",s,async(w,h)=>J("subscription_changes",(await w()).merchantBridgeOperationSchema,c,h),c);if(p.type!=="subscription_change")throw new y("MERCHANT_BRIDGE_INVALID_RESPONSE");return p},reset(){E++,g.abort(),g=new AbortController,_=null,r=null,i=null}}}var $e=K.strictObject({command:me,target:je,runId:K.uuid().optional(),expiresAt:K.iso.datetime({offset:!0}).optional()}).refine(n=>n.command.release===n.target.release),Ke=K.strictObject({schemaVersion:K.literal(1),entries:K.array($e).max(4e3)});function ze(n){let A=!1,m=()=>{A||n.unavailable(),A=!0};function k(){return n.storage===!1?void 0:n.storage??globalThis.sessionStorage}function _(r){let i=k()?.getItem(r);if(!i)return[];if(i.length>1048576)throw Error("Entry recovery is too large");return Ke.parse(JSON.parse(i)).entries}function E(r,i){let g=k();if(!g)return;if(!i.length)return g.removeItem(r);let I=JSON.stringify(Ke.parse({schemaVersion:1,entries:i}));if(I.length>1048576)throw Error("Entry recovery is too large");g.setItem(r,I)}return{load(){try{let r=n.binding();if(!r||n.storage===!1)return;let i="indiana.funnel.entries.v1."+JSON.stringify(r);return{key:i,entries:_(i)}}catch{m();return}},retain(r,i){if(r)try{let g=$e.parse(i);E(r,[..._(r).filter(I=>I.command.funnelId!==g.command.funnelId),g])}catch{m()}},forget(r,i){if(r)try{E(r,_(r).filter(g=>g.command.requestId!==i))}catch{m()}}}}var we=n=>["running","waiting"].includes(n.status)&&!n.pendingRequest&&(n.stopped||!n.screen&&!n.paywall&&n.instruction?.type==="wait"&&n.instruction.kind!=="operation");function yn(n){let A=ye(n.baseUrl),m=n.scope,k=be(n),_=n.fetch??globalThis.fetch.bind(globalThis),E,r=!1,i=!1,g=0,I=0,U="",M=0,z=0,J=0,c=!1,s,p=!0,w,h,d,l,o,N=-1,P,b=e=>{P===e&&(P=void 0,q())},V=new Set,u=(e,a)=>Z(n.onStatus,e,a),j=new Set,D=ze({storage:n.recoveryStorage,binding:()=>{let e=n.session.snapshot()?.customerId;return e?[A,m.projectId,m.environment,n.environmentId,n.appManifestRelease,e]:void 0},unavailable:()=>u("recovery_unavailable")}),X=e=>D.forget(e.storageKey,e.command.requestId);function re(e,a){a&&(e.runId=a.id,e.expiresAt=a.runExpiresAt),D.retain(e.storageKey,{command:e.command,target:e.target,...e.runId&&{runId:e.runId},...e.expiresAt&&{expiresAt:e.expiresAt}})}function ee(){let e=o;o=void 0,e?.host.destroy(),e?.slot.remove(),e?.client.reset(),q()}let de=()=>P!==void 0||o!==void 0&&!o.background;function t(e,a){if(o?.client!==e)return;re(o.recovery,a);let f=we(a);o.slot.hidden=f,f!==o.background&&(o.background=f,f?u("run_background",o.entryId):N=I,q())}function R(e,a,f){let S=e.client.view;if(!a||e.background||!S?.screen||S.paywall||S.pendingRequest||S.stopped||S.status!=="waiting")return;let O=Le.parse({operation:"close",requestId:crypto.randomUUID(),nodeId:S.nodeId,visit:S.visit,revision:S.revision,customerToken:a}),$=be({...n,session:void 0});$.requestWithCredential("funnels",O,e.runToken,{keepalive:f}).then(()=>X(e.recovery)).catch(()=>{}).finally(()=>$.dispose())}let F=()=>{o&&R(o,n.session.peek(),!0)},L=()=>Date.now()<z&&performance.now()<J;function G(e){if(e.target.release!==n.appManifestRelease||!L())return!1;try{return ce(e.target.render,document,location.pathname,()=>{})}catch{return u("incompatible",e.id),!1}}function ne(e){if(r||e.epoch!==M||e.visit!==I||document.visibilityState==="hidden")return!1;try{return ce(e.target.render,document,location.pathname,()=>{})}catch{return!1}}async function oe(e){if(de()){u("in_progress",e.id);return}if(!n.session.peek()){u("identity_required",e.id);return}let a=D.load(),f=a?.entries.find(O=>O.command.funnelId===e.funnelId&&(!O.expiresAt||Date.parse(O.expiresAt)>Date.now()));if(f){if(!ae(f)){u("recovery_pending",e.id);return}let O={...f,storageKey:a.key,epoch:M,visit:I};j.add(O.command.requestId),P=O,await te(O);return}let S={freshStart:!0,command:me.parse({operation:"entry_start",entryId:e.id,funnelId:e.funnelId,versionId:e.versionId,release:n.appManifestRelease,requestId:crypto.randomUUID(),locale:document.documentElement.lang||"en"}),epoch:M,visit:I,target:e.target,storageKey:a?.key};j.add(S.command.requestId),P=S,await te(S)}async function te(e){if(e.dispatching)return;e.dispatching=!0;let a=e.freshStart===!0;e.freshStart=!1;let f,S=!1,O=!1;async function $(T){if(e.epoch!==M)return;let v=T.view;if(!(e.storageKey&&v&&(we(v)||v.paywall||v.pendingRequest))&&v&&["running","waiting"].includes(v.status))try{await T.submit({operation:"close",requestId:crypto.randomUUID(),nodeId:v.nodeId,visit:v.visit,revision:v.revision}),X(e)}catch(x){if(!(x instanceof H&&x.code==="FORBIDDEN"))throw x}}try{re(e),u("starting",e.command.entryId);let T=await k.request("funnels",e.command),v=Ge.safeParse(T);if(v.success){if(v.data.scope.projectId!==m.projectId||v.data.scope.environment!==m.environment)throw new H("SCOPE_MISMATCH","Entry scope changed");e.epoch===M&&u(v.data.reason,e.command.entryId),X(e),b(e);return}let x=Ve.parse(T);if(!x.runToken||x.scope.projectId!==m.projectId||x.scope.environment!==m.environment||x.run.source.type!=="funnel"||x.run.source.id!==e.command.funnelId||x.run.source.versionId!==e.command.versionId||e.runId!==void 0&&x.run.id!==e.runId)throw new H("INVALID_RESPONSE","Invalid entry Run");if(e.epoch!==M){b(e),u("identity_changed",e.command.entryId);return}re(e,x.run);let C=Re({...n,runToken:x.runToken,funnelId:e.command.funnelId,initialResponse:a?T:void 0});f=C,O=!0,await C.get(),O=!1;let Y=C.view;if(!Y||Y.id!==x.run.id||Y.source.type!=="funnel"||Y.source.id!==e.command.funnelId||Y.source.versionId!==e.command.versionId)throw new H("INVALID_RESPONSE","Entry Run version changed");if(!["running","waiting"].includes(Y.status)){X(e),b(e),u("run_ended",e.command.entryId);return}if(!ne(e)){await $(C),u("left_screen",e.command.entryId),b(e);return}let se=!1,Ae=!1;if(o&&!o.background){await $(C),u("in_progress",e.command.entryId),b(e);return}o&&ee();let Q=document.createElement("div");Q.hidden=we(Y),n.container.append(Q);let Ce=await Ie(Q,{...n.host,client:C,appManifestRelease:n.appManifestRelease,onState(B){t(C,B),Z(n.host?.onState,B)},onDismiss(B){se=!0,Q.remove(),B&&!["running","waiting"].includes(B.status)&&X(e),o?.client===C&&(o=void 0,C.reset(),q(),B&&B.status!=="completed"&&u("run_ended",e.command.entryId)),Z(n.host?.onDismiss,B)},onComplete(B){Ae=!0,X(e),o?.client===C&&ee(),Z(n.host?.onComplete,B)},onError(B){Z(n.host?.onError,B),o?.client===C&&B instanceof H&&B.code==="FORBIDDEN"&&(X(e),ee(),u("run_ended",e.command.entryId))}}).catch(B=>{throw Q.remove(),B});if(!ne(e)||se||Ae){Ce.destroy(),Q.remove(),ne(e)||await $(C),b(e);return}let le=we(C.view??Y);Q.hidden=le,o={host:Ce,client:C,slot:Q,entryId:e.command.entryId,background:le,runToken:x.runToken,owner:n.session.peek(),recovery:e},le||(N=e.visit),S=!0,b(e),u("started",e.command.entryId),le&&u("run_background",e.command.entryId)}catch(T){T instanceof H&&(!f||O&&T.code==="FORBIDDEN")&&T.status!==void 0&&T.status>=400&&T.status<500&&!T.retryable&&(X(e),b(e)),e.epoch===M&&!r&&(u("start_failed",e.command.entryId),Z(n.host?.onError,T))}finally{S||f?.reset(),e.dispatching=!1}}function ae(e){if(e.command.release!==n.appManifestRelease||e.target.release!==n.appManifestRelease)return!1;try{return ce(e.target.render,document,location.pathname,()=>{})}catch{return!1}}function W(){if(de())return!1;let e=D.load();for(let a of e?.entries??[]){if(a.expiresAt&&Date.parse(a.expiresAt)<=Date.now()){D.forget(e.key,a.command.requestId);continue}if(a.command.requestId===o?.recovery.command.requestId||j.has(a.command.requestId)||!ae(a))continue;j.add(a.command.requestId);let f={...a,storageKey:e.key,epoch:M,visit:I};return P=f,te(f),!0}return!1}function ue(){if(c=!1,r||!i||document.visibilityState==="hidden")return;ie();let e=o!==void 0&&!o.background;if(e&&(N=I),!W()){if(!L()){p=!0;return}p=!1;for(let a of E?.entries??[]){let f=`${a.funnelId}:${a.id}`;if(!(a.event!=="screen_enter"||V.has(f)||!G(a))){if(!n.session.peek()){u("identity_required",a.id);continue}if(N===I){V.add(f),e&&u("in_progress",a.id);continue}if(P){u("in_progress",a.id);return}V.add(f),oe(a);break}}}}let q=()=>{!c&&!r&&(c=!0,queueMicrotask(ue))};function ie(){let e=location.origin+location.pathname;return e===U?!1:(U=e,I++,p=!0,V.clear(),j.clear(),!0)}function Je(){ie()&&q()}function Se(e){if(!e.isTrusted||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||document.visibilityState==="hidden")return;let a=e.target;if(!(a instanceof Element)||a.closest("[data-indiana-funnel]"))return;let f=a.closest("button,a,input");if(!(!f||f.matches(":disabled,[aria-disabled='true']")||f.closest("[hidden],[inert],[aria-hidden='true']")))for(let S of E?.entries??[]){let O=S.target.button;if(!(S.event!=="button_click"||!O||!G(S))){try{let $=ge(document);if(!f.matches(O.selector)||$(O.selector,f)!==1)continue}catch{u("incompatible",S.id);continue}oe(S);break}}}async function _e(){if(r)return;if(s)return s;let e=++g,a=new AbortController;w=a;let f,S=new Promise((T,v)=>{f=()=>v(new H("TIMEOUT","Funnel entry configuration read cancelled or timed out")),a.signal.addEventListener("abort",f,{once:!0})}),O=setTimeout(()=>a.abort(),n.timeoutMs??5e3),$=(async()=>{let T=async()=>{let se=await _(`${A}/api/v1/funnel-entries/${n.environmentId}?iam=${n.appManifestRelease}`,{credentials:"omit",cache:"no-store",redirect:"error",signal:a.signal});if(!se.ok)throw new H("SERVICE_UNAVAILABLE","Funnel entries unavailable",se.status);return fe.parse(await se.json())},v=await Promise.race([T(),S]),x=Date.parse(v.validatedAt),C=Date.parse(v.validUntil);if(v.scope.projectId!==m.projectId||v.scope.environment!==m.environment||v.scope.environmentId!==n.environmentId||v.release!==n.appManifestRelease||C<=Date.now()||x>Date.now()+5e3||C-x>6e4||C<=x)throw new H("INVALID_RESPONSE","Entry configuration scope or deadline changed");if(r||e!==g)return;let Y=E===void 0;E=v,z=C,J=performance.now()+Math.min(C-Date.now(),6e4),(Y||p)&&q()})();s=$;try{await $}finally{clearTimeout(O),a.signal.removeEventListener("abort",f),s===$&&(s=void 0)}}async function Xe(){if(!(!i||r)){try{await _e()}catch{r||u("configuration_unavailable")}q()}}let Pe=pe({document,run:Xe,delay:()=>i&&!r?15e3:void 0});return{async start(){i||r||(i=!0,U=location.origin+location.pathname,h=he(Je),d=n.session.subscribeIdentity(()=>{M++,p=!0,P=void 0,V.clear(),N=-1,j.clear(),o&&R(o,o.owner,!1),ee(),q()}),l=new MutationObserver(q),l.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["hidden","inert","aria-hidden","data-indiana-id","id","style","data-testid","data-test","data-qa"]}),document.addEventListener("click",Se,!0),addEventListener("pagehide",F),await Pe.refresh())},refresh:_e,async retry(){P&&!r&&P.epoch===M&&await te(P)},destroy(){r=!0,g++,Pe.destroy(),w?.abort(),l?.disconnect(),h?.(),d?.(),document.removeEventListener("click",Se,!0),removeEventListener("pagehide",F),F(),ee(),k.dispose(),E=void 0}}}function hn(n){let A=ye(n.baseUrl),m=n.fetch??globalThis.fetch.bind(globalThis),k,_=0,E=0,r=!1,i=!1,g=0,I=0,U=-1,M=!1,z="",J,c,s,p,w=new Set,h,d,l,o=(t,R)=>Z(n.onStatus,t,R),N=()=>Date.now()<_&&performance.now()<E;function P(t){try{return N()&&t.target.release===n.appManifestRelease&&ce(t.target.render,document,location.pathname,()=>{})}catch{return o("incompatible",t.id),!1}}function b(){let t=l;l=void 0,t?.host.destroy(),t?.slot.remove()}async function V(t){if(t.dispatching)return;t.dispatching=!0;let R=g;try{let F=await t.process.open({operation:"entry_start",funnelId:t.entry.funnelId,versionId:t.entry.versionId,entryId:t.entry.id,release:n.appManifestRelease,locale:n.locale??"en"});if(r||R!==g||d!==t)return;let L=document.createElement("div");n.container.append(L),U=I;let G=await Ie(L,{...n.host,client:F.controller,appManifestRelease:n.appManifestRelease,onDismiss(ne){l?.process===t.process&&(l=void 0,L.remove()),Z(n.host?.onDismiss,ne)}});if(r||R!==g||d!==t){G.destroy(),L.remove();return}l={entry:t.entry,process:t.process,host:G,slot:L},d=void 0,o("run_presented",t.entry.id)}catch(F){if(r||R!==g||d!==t)return;F instanceof H&&"result"in F?(d=void 0,t.process.destroy(),o("suppressed",t.entry.id),j()):o("entry_unavailable",t.entry.id)}finally{t.dispatching=!1}}function u(t){if(r||d||l||h||U===I||!P(t))return;let R=`${I}:${t.id}`;if(w.has(R))return;w.add(R);let F={entry:t,process:n.createProcess(t),visit:I};d=F,V(F)}function j(){M||r||(M=!0,queueMicrotask(()=>{if(M=!1,!(r||document.visibilityState==="hidden"||!N()||d||l||h||U===I)){for(let t of k?.entries??[])if(t.event==="screen_enter"&&P(t)){u(t);break}}}))}function D(t){if(!t.isTrusted||t.defaultPrevented||!(t.target instanceof Element)||d||l||h||U===I)return;let R=ge(document,()=>{});for(let F of k?.entries??[]){let L=F.target.button;if(F.event!=="button_click"||!L||!P(F))continue;let G=t.target.closest(L.selector);if(!(!G||G.tagName.toLowerCase()!==L.tag||R(L.selector)!==1||G.matches(":disabled")||G.closest('[inert],[hidden],[aria-hidden="true"]'))){u(F);break}}}let X=()=>{let t=location.origin+location.pathname;t!==z&&(z=t,I++,w.clear(),j())};async function re(){if(r)return;if(c)return c;let t=g,R=new AbortController;J=R;let F,L=new Promise((te,ae)=>{F=ae}),G=()=>F(new H("TIMEOUT","Funnel entry read cancelled"));R.signal.addEventListener("abort",G,{once:!0});let ne=setTimeout(()=>R.abort(),n.timeoutMs??5e3),oe=(async()=>{let te=encodeURIComponent(JSON.stringify(["funnel-process/1"])),ae=async()=>{let ie=await m(`${A}/api/v1/funnel-entries/${n.environmentId}?iam=${n.appManifestRelease}&executionContracts=${te}`,{credentials:"omit",cache:"no-store",redirect:"error",signal:R.signal});if(!ie.ok)throw new H("SERVICE_UNAVAILABLE","Funnel entries unavailable",ie.status);return fe.parse(await ie.json())},W=await Promise.race([ae(),L]),ue=Date.parse(W.validatedAt),q=Date.parse(W.validUntil);if(W.scope.projectId!==n.scope.projectId||W.scope.environment!==n.scope.environment||W.scope.environmentId!==n.environmentId||W.release!==n.appManifestRelease||q<=Date.now()||ue>Date.now()+5e3||q<=ue||q-ue>6e4)throw new H("INVALID_RESPONSE","Entry scope or deadline changed");r||t!==g||(k=W,_=q,E=performance.now()+Math.min(q-Date.now(),6e4),j())})();c=oe;try{await oe}finally{clearTimeout(ne),R.signal.removeEventListener("abort",G),c===oe&&(c=void 0)}}async function ee(){if(!(!i||r))try{await re()}catch{r||o("configuration_unavailable")}}let de=pe({document,run:ee,delay:()=>i&&!r?15e3:void 0});return{async start(){i||r||(i=!0,z=location.origin+location.pathname,s=he(X),p=new MutationObserver(j),p.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["hidden","inert","aria-hidden","data-indiana-id","id","style","data-testid","data-test","data-qa"]}),document.addEventListener("click",D,!0),await de.refresh())},refresh:re,async retry(){d&&!r&&await V(d)},async syncIdentity(){let t=l??d??h;if(t)try{let R=await t.process.syncIdentity();return h===t&&(d={entry:t.entry,process:t.process,visit:I},h=void 0,await V(d)),R}catch(R){throw t.process.view||(h={entry:t.entry,process:t.process,visit:I},d=void 0,b()),R}},async detach(){g++,J?.abort();let t=l??d??h;t&&(h={entry:t.entry,process:t.process,visit:I}),d=void 0,b(),t&&await t.process.detach()},destroy(){r=!0,g++,de.destroy(),J?.abort(),p?.disconnect(),s?.(),document.removeEventListener("click",D,!0);let t=l??d??h;d=void 0,h=void 0,b(),t?.process.destroy(),k=void 0}}}async function zn(n,A){return(await import("./paywall-QQ2MC4KO.js")).showPaywall(n,A)}async function Jn(...n){return n[1]=qe(n[1]),(await import("./paywall-session-WC2WFWBQ.js")).createPaywallSession(...n)}async function Xn(...n){let A=n[1].signal?.aborted?void 0:Ue(n[1].client);try{let[m]=await Promise.all([import("./funnel-runtime-host-ZWUAGDBU.js"),import("./screen-renderer-G2EWN3WB.js"),import("./paywall-QQ2MC4KO.js")]);return await m.showFunnelRun(...n)}finally{A?.()}}async function Yn(...n){return(await import("./funnel-host-purchase-5NLPYJRK.js")).showFunnelPurchase(...n)}async function Zn(...n){return(await import("./content-UDP5VQS4.js")).mountContent(...n)}async function Wn(...n){return(await import("./content-UDP5VQS4.js")).prepareContent(...n)}export{H as LongplayError,y as MerchantBridgeError,nn as createBrowserFunnelCommandStorage,cn as createBrowserFunnelPurchaseStorage,on as createConfigurationSync,Qe as createFeatureClient,sn as createFunnelClient,fn as createFunnelPageExperiments,un as createFunnelProcess,dn as createFunnelPurchaseClient,Re as createFunnelRunController,yn as createIamFunnelEntries,hn as createIamFunnelProcessEntries,ln as createLocalFunnelClient,en as createLongplay,pn as createMerchantBridge,Jn as createPaywallSession,an as evaluateFunnelNode,Ze as formatCouponDiscount,Ye as formatCouponMoney,We as formatCouponTerms,tn as getPaywallRecovery,Zn as mountContent,Wn as prepareContent,rn as preparePaywallFallback,Yn as showFunnelPurchase,Xn as showFunnelRun,zn as showPaywall};
@@ -0,0 +1 @@
1
+ import{N as r,O as m,h as e}from"./chunk-C6JRUYKW.js";import"./chunk-7CFF6SWH.js";import"./chunk-UBKD6VMS.js";import"./chunk-DOJE7VUR.js";import"./chunk-JAKOBECD.js";import"./chunk-WM27UTWT.js";import"./chunk-CILM5XMH.js";import"./chunk-WOT6VMZA.js";export{m as merchantBridgeCommerceSchema,r as merchantBridgeOperationSchema,e as merchantOperationLookupSchema};