@tinkerlandai/longplay-sdk 0.10.90 → 0.10.94
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 +14 -0
- package/README.md +16 -0
- package/README.zh-CN.md +9 -0
- package/dist/{chunk-KEFBS26K.js → chunk-5SB3RRGA.js} +1 -1
- package/dist/{chunk-47S2FZV7.js → chunk-6QBSJRAD.js} +1 -1
- package/dist/{chunk-AXK24XOE.js → chunk-ANEFV7YJ.js} +2 -2
- package/dist/{chunk-X3TJBUFF.js → chunk-C4HLVYSU.js} +1 -1
- package/dist/{chunk-FYWMUFWC.js → chunk-FDXBCQBO.js} +1 -1
- package/dist/{chunk-XUKBBAME.js → chunk-FEU6XRHV.js} +1 -1
- package/dist/{chunk-P3J2GOGH.js → chunk-H3LJWAAE.js} +1 -1
- package/dist/chunk-IL5OTR6J.js +1 -0
- package/dist/chunk-MMHL2KFB.js +1 -0
- package/dist/chunk-NKYNGR3L.js +1 -0
- package/dist/{chunk-3VDU2U66.js → chunk-Q5IYCTRL.js} +1 -1
- package/dist/chunk-VVBXVJI6.js +1 -0
- package/dist/chunk-XKYVXIUI.js +1 -0
- package/dist/{configuration-sync-B0fgKcKb.d.ts → configuration-sync-BIDHJCL0.d.ts} +14 -0
- package/dist/{content-T47OCROR.js → content-K2T4V3ZD.js} +1 -1
- package/dist/funnel-host-purchase-M2JNOOCE.js +1 -0
- package/dist/funnel-host-purchase-entry-OKHAEHOG.js +1 -0
- package/dist/{funnel-host-recovery-paywall-VTH7QU2M.js → funnel-host-recovery-paywall-XFL6JS74.js} +1 -1
- package/dist/{funnel-local-client-D6X7hfc6.d.ts → funnel-local-client-B5AJpV3L.d.ts} +11 -1
- package/dist/funnel-paywall-pins-source-ZK2DZWY3.js +1 -0
- package/dist/{funnel-paywall-prerender-W3DBHEND.js → funnel-paywall-prerender-YUBH7ZC7.js} +1 -1
- package/dist/{funnel-process-client-D-tZZGWK.d.ts → funnel-process-client-DX6W2Cij.d.ts} +1 -1
- package/dist/{funnel-runtime-host-ZOOBQF3C.js → funnel-runtime-host-3P62SXBA.js} +1 -1
- package/dist/index.d.ts +126 -13
- package/dist/index.js +1 -1
- package/dist/native-shell.js +1 -1
- package/dist/openrouter.js +1 -1
- package/dist/page.d.ts +1 -1
- package/dist/page.js +1 -1
- package/dist/{paywall-GHU6D5SU.js → paywall-JTKB4MMC.js} +1 -1
- package/dist/{paywall-content-EGRO37Y2.js → paywall-content-GJX3FQ6D.js} +1 -1
- package/dist/{paywall-session-4MJC4RBH.js → paywall-session-PCWN2M24.js} +1 -1
- package/dist/react-native.d.ts +5 -5
- package/dist/react-native.js +1 -1
- package/dist/server.d.ts +4 -4
- package/dist/server.js +1 -1
- package/dist/visual.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4JOYBJQO.js +0 -1
- package/dist/chunk-6OGBLDKX.js +0 -1
- package/dist/chunk-BQBXK2EG.js +0 -1
- package/dist/chunk-XVTH3B5P.js +0 -1
- package/dist/funnel-host-purchase-U5FSCSJF.js +0 -1
- /package/dist/{chunk-AXK24XOE.js.LEGAL.txt → chunk-ANEFV7YJ.js.LEGAL.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as y}from"./chunk-CKMSSBJM.js";import{c as g}from"./chunk-S2S4ROGY.js";import{b as $}from"./chunk-Y55OBV7D.js";import{e as Y,f as X,g as Z,h as ee,i as re}from"./chunk-MOIVJERE.js";import{b as B}from"./chunk-PUDTOCQF.js";import{b as F}from"./chunk-
|
|
1
|
+
import{e as y}from"./chunk-CKMSSBJM.js";import{c as g}from"./chunk-S2S4ROGY.js";import{b as $}from"./chunk-Y55OBV7D.js";import{e as Y,f as X,g as Z,h as ee,i as re}from"./chunk-MOIVJERE.js";import{b as B}from"./chunk-PUDTOCQF.js";import{b as F}from"./chunk-C4HLVYSU.js";import{b as j}from"./chunk-6XRQR43F.js";import{A as J,B as R,E as H,z as x}from"./chunk-3532HSBP.js";import{x as G}from"./chunk-67WFVDTV.js";import{b as W}from"./chunk-6QBSJRAD.js";import{a as L}from"./chunk-KCUE2VFJ.js";import{t as K}from"./chunk-Y3W5G4BF.js";import{a}from"./chunk-UGATOG2T.js";import{a as z}from"./chunk-DSPLGTQI.js";function ae(I){let t=[...new Set(I.map(({path:s})=>{let c=s.map(String).join(".");return c.startsWith("selector")?"paywallId or paywallVersionId":c||"input"}))],O=t.includes("locale")?` Pass locale, the Customer's language such as "en" or "zh-CN".`:"";return new a("INVALID_REQUEST",`createPaywallSession input is invalid: ${t.join(", ")}.${O}`)}async function Ie(I,t){if(!L.test(t.customerToken))throw new a("INVALID_TOKEN","A verified Customer credential is required");if(I.session&&I.session.peek()!==t.customerToken)throw new a("SCOPE_MISMATCH","Paywall credential does not match the shared session");let O=y.resolvePaywall.request.safeParse({funnelId:t.funnelId,funnelVersionId:t.funnelVersionId,selector:t.paywallVersionId?{type:"version",versionId:t.paywallVersionId}:{type:"paywall",paywallId:t.paywallId},commerce:t.commerce,locale:t.locale,...t.requirement?{requirement:t.requirement}:{}});if(!O.success)throw ae(O.error.issues);let s=O.data,c=W(I);I.session||c.identify(t.customerToken);let n=null,b=!1,k=new AbortController,u=null,d=null,v=null,P=null,T=null,w=null,m=null,A=0,q=null,U="",D=0,C=new Map,E=new Set;function S(){if(b)throw new a("IDENTITY_CHANGED","Paywall is closed")}function M(){let e=JSON.stringify([A,m!==null]);if(!q||e!==U){U=e;let r=te(++D);q=r;let i=()=>{q===r&&(q=null)};r.then(i,i)}return q.then(r=>structuredClone(r))}async function te(e){S();let r=y.resolvePaywall,i=await g(c.request,r,{...s,selector:n?{type:"version",versionId:n.id}:s.selector});B(s,i.paywall.check,i.scope);let l=await F(I,i.paywall);if(S(),t.paywallVersionId?l.id!==t.paywallVersionId:l.paywallId!==t.paywallId)throw new a("INVALID_RESPONSE","The requested Paywall changed");if(n&&(!Y(l,n)||l.paywallId!==n.paywallId))throw new a("INVALID_RESPONSE","The pinned Paywall or Offering Version changed");if(e!==D)return structuredClone(n??l);n=l;for(let h of E)z(h,structuredClone(n));return structuredClone(n)}async function Q(e){if(S(),P&&e!=="read")throw new a("COMMAND_PENDING","Wait for the original quote");if(!u)throw new a("INVALID_REQUEST","A quoted purchase is required");let r=u;if(e!=="read"){if(m){if(w===e)return m;throw new a("COMMAND_PENDING","Wait for the original purchase command")}if(w&&w!==e)throw new a("COMMAND_PENDING","Read the original purchase before changing an uncertain command");w=e,A++,D++}let i=w,l=A,h=e==="read"&&m===null,f=JSON.stringify([r.operationId,l,m!==null]);if(e==="read"&&C.has(f))return C.get(f).then(o=>structuredClone(o));let p=(async()=>{let o={operationId:r.operationId,...e==="read"?{}:{intent:e},...e==="confirm"&&r.merchantTerms?{merchantConfirmation:G(r.merchantTerms)}:{}},V=R(r)?e==="read"?await g(c.request,y.readSubscriptionUpdate,o):await g(c.request,y.update,o):e==="read"?await g(c.request,y.readSubscriptionOperation,o):await g(c.request,y.attach,o),N=J.parse(V.operation);return N.quote&&ee(r,N.quote),X(N,{operationId:r.operationId,currency:s.commerce.currency,membershipId:R(r)?r.membershipId:null,...R(r)?{featureQuantities:r.featureQuantities??{}}:{}},"The purchase operation changed"),S(),u?.operationId!==r.operationId?structuredClone(N):(d=re(d,N),(e!=="read"||h&&m===null)&&A===l&&w===i&&(w=null),structuredClone(d))})();if(e!=="read"){m=p;let o=()=>{m===p&&(m=null)};p.then(o,o)}else{C.set(f,p);let o=()=>{C.get(f)===p&&C.delete(f)};p.then(o,o)}return p.then(o=>structuredClone(o))}let _={signal:k.signal,get view(){return n?structuredClone(n):null},get quote(){return u?structuredClone(u):null},get operation(){return d?structuredClone(d):null},get webViewUrl(){return"bundled"},get locale(){return s.locale},get recovery(){return $({quote:u,operation:d,requestId:T,pending:P!==null||w!==null,destroyed:b})},get pendingCancellation(){return!b&&w==="cancel"},refresh:M,subscribe(e){return b?()=>{}:(E.add(e),()=>E.delete(e))},async preview(e){if(S(),!n)throw new a("INVALID_REQUEST","Load the Paywall first");let r=n.document.buttons[e.actionId];if(r?.type!=="checkout")throw new a("INVALID_REQUEST","Choose an authored purchase action");let i=j(r.product,e.selection,n.capabilities);if(!i)throw new a("PRODUCT_UNAVAILABLE","Choose an available Product");let l=K(n.document.screen,i,e.selection,n.capabilities);if(s.commerce.intent==="subscription_change"&&!e.subscriptionChange)throw new a("INVALID_REQUEST","Choose the existing membership for this subscription change");if(e.subscriptionChange&&e.nativeOffer)throw new a("INVALID_REQUEST","A web membership change cannot include a store offer");let h=e.subscriptionChange?y.previewUpdate.request.parse({requestId:e.requestId,...e.subscriptionChange,change:{type:"plan",productVersionId:i,...Object.keys(l).length?{featureQuantities:l}:{}},...e.offerId?{offerId:e.offerId}:{}}):y.previewAttach.request.parse({funnelId:s.funnelId,funnelVersionId:s.funnelVersionId,requestId:e.requestId,plans:[{productVersionId:i,...Object.keys(l).length?{featureQuantities:l}:{}}],provider:s.commerce.provider,currency:s.commerce.currency,...e.offerId?{offerId:e.offerId}:{},...e.nativeOffer?{nativeOffer:e.nativeOffer}:{}}),f=JSON.stringify(h);if(v&&v!==f&&(P||w||!d||H(d)))throw new a("COMMAND_PENDING","Finish or cancel the original purchase before changing it");if(v===f){if(P)return P;if(u)return structuredClone(u)}v!==f&&(u=null,d=null),v=f,T=h.requestId;let p=(async()=>{let o="membershipId"in h?await g(c.request,y.previewUpdate,h):await g(c.request,y.previewAttach,h),V=x.parse(o.quote);return S(),Z(V,{productVersionId:i,featureQuantities:l,currency:s.commerce.currency,provider:s.commerce.provider,subscriptionChange:e.subscriptionChange},"The purchase quote changed its selected Product or presentment"),u=V,d=null,structuredClone(u)})();P=p;try{return await p}finally{P===p&&(P=null)}},confirm:()=>Q("confirm"),cancel:()=>Q("cancel"),read:()=>Q("read"),destroy(){b||(b=!0,k.abort(),E.clear(),C.clear(),ne?.(),c.dispose(),n=null,u=null,d=null,v=null,T=null)}},ne=I.session?.subscribeIdentity(_.destroy);try{return await M(),_}catch(e){throw _.destroy(),e}}export{Ie as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as Ge}from"./chunk-XLGNBPGF.js";import{a as ee}from"./chunk-EQUVI5QU.js";import{D as Z,F as Ye,c as Ve,e as Y,j as He,u as ze,v as Qe,x as Be,z as Je}from"./chunk-FDXBCQBO.js";import{a as Ue,b as xe,c as De}from"./chunk-S2S4ROGY.js";import{b as de}from"./chunk-Y55OBV7D.js";import{i as pe}from"./chunk-MOIVJERE.js";import{K as J}from"./chunk-ME6QTD5Y.js";import{A as le,B as X,C as B,E as Te}from"./chunk-3532HSBP.js";import{x as Ce}from"./chunk-67WFVDTV.js";import{b as Me}from"./chunk-6QBSJRAD.js";import{a as l}from"./chunk-UGATOG2T.js";import{h as ce}from"./chunk-LFR2LWYC.js";import{a as Le}from"./chunk-5MRSFLQA.js";import{b as a}from"./chunk-W22ESUYY.js";import{a as Ee}from"./chunk-DSPLGTQI.js";var E=J.options,ft=a.discriminatedUnion("operation",[E[1].omit({customerToken:!0}),E[2].omit({customerToken:!0}),E[3].omit({customerToken:!0}),E[4].omit({customerToken:!0}),E[5].omit({customerToken:!0}),E[6].omit({customerToken:!0}),E[7].omit({customerToken:!0}),E[8].omit({customerToken:!0}),He.omit({customerToken:!0})]),Se=a.strictObject({receiptId:a.uuid(),operationId:a.uuid()}),bt=a.discriminatedUnion("operation",[a.strictObject({operation:a.literal("find_purchase")}),a.strictObject({operation:a.literal("recover_start"),intent:a.enum(["lookup","resume","start"]),start:a.strictObject({requestId:E[0].shape.requestId,funnelId:E[0].shape.funnelId,locale:E[0].shape.locale,parameters:E[0].shape.parameters})}),a.strictObject({operation:a.literal("recover_run"),runId:a.uuid(),funnelId:a.uuid()}),a.strictObject({operation:a.literal("recover_purchase"),runId:a.uuid(),funnelId:a.uuid(),purchase:Se,includePaywallVersion:a.literal(!0).optional()}),a.strictObject({operation:a.literal("terminate_checkout"),runId:a.uuid(),funnelId:a.uuid(),purchase:Se,intent:a.literal("expire_unconfirmed_quote").optional()}),a.strictObject({operation:a.literal("settle_command"),runId:a.uuid(),funnelId:a.uuid(),requestId:a.uuid(),command:a.discriminatedUnion("operation",[E[3].omit({customerToken:!0}),E[4].omit({customerToken:!0}),E[5].omit({customerToken:!0}),E[6].omit({customerToken:!0}),E[7].omit({customerToken:!0})]).optional()}).refine(u=>!u.command||u.requestId===u.command.requestId),a.strictObject({operation:a.literal("run_command"),runId:a.uuid(),funnelId:a.uuid(),command:ft})]),me=a.strictObject({runId:a.uuid(),funnelId:a.uuid(),versionId:a.uuid(),startRequestId:a.uuid(),runExpiresAt:a.iso.datetime({offset:!0}),status:Y.shape.run.shape.status}),G={scope:ce,customerId:a.uuid()},Ke=a.discriminatedUnion("outcome",[a.strictObject({...G,outcome:a.literal("unknown"),target:a.null(),view:a.null(),access:a.null()}),a.strictObject({...G,outcome:a.literal("resolved"),target:me,view:Y.shape.run.nullable(),access:a.discriminatedUnion("type",[a.strictObject({type:a.literal("customer")}),a.strictObject({type:a.literal("operation_only"),cause:a.enum(["run_terminal","run_expired","run_revoked","issuer_unavailable"])})])})]).superRefine((u,m)=>{u.outcome==="resolved"&&(u.access.type==="customer"!=(u.view!==null)||u.view&&(u.view.id!==u.target.runId||u.view.source.id!==u.target.funnelId||u.view.source.versionId!==u.target.versionId||u.view.status!==u.target.status||u.view.runExpiresAt!==u.target.runExpiresAt||u.view.credentialExpiresAt!==null))&&m.addIssue({code:"custom",message:"Recovery view and original Run binding differ"})}),$e=a.strictObject({...G,target:me,view:Y.shape.run.nullable(),settlement:a.strictObject({requestId:a.uuid(),state:a.enum(["pending","unknown","settled"]),acceptance:a.enum(["accepted","not_accepted","unknown"]),receiptPhase:a.enum(["accepted","processing","done"]).nullable(),basis:a.enum(["receipt","run_terminal","position_advanced","none"]),receiptId:a.uuid().nullable(),operationId:a.uuid().nullable()}),purchase:Y.shape.purchase.unwrap().nullable()}).superRefine((u,m)=>{let h=u.settlement;(h.acceptance==="accepted"!=(h.receiptPhase!==null)||h.acceptance==="accepted"&&h.basis!=="receipt"||h.acceptance==="unknown"&&(h.state!=="unknown"||h.basis!=="none")||h.acceptance!=="accepted"&&(h.operationId!==null||h.receiptId!==null)||h.acceptance==="not_accepted"&&(h.state!=="settled"||!["run_terminal","position_advanced"].includes(h.basis))||u.purchase&&(u.purchase.receiptId!==h.receiptId||u.purchase.operation&&u.purchase.operation.operationId!==h.operationId||u.purchase.quote&&u.purchase.quote.operationId!==h.operationId)||u.view&&(u.view.id!==u.target.runId||u.view.source.id!==u.target.funnelId||u.view.source.versionId!==u.target.versionId||u.view.status!==u.target.status||u.view.runExpiresAt!==u.target.runExpiresAt||u.view.credentialExpiresAt!==null))&&m.addIssue({code:"custom",message:"Original command settlement binding differs"})}),We=a.strictObject({...G,target:me,purchase:Y.shape.purchase.unwrap(),paywallVersionId:a.uuid().optional()}).superRefine((u,m)=>{(!u.purchase.operation||typeof u.purchase.canReselect!="boolean"||u.purchase.quote&&u.purchase.quote.operationId!==u.purchase.operation.operationId)&&m.addIssue({code:"custom",message:"Original purchase proof is incomplete"})}),Xe=a.discriminatedUnion("outcome",[a.strictObject({...G,outcome:a.literal("none")}),a.strictObject({...G,outcome:a.literal("blocked")}),a.strictObject({...G,outcome:a.literal("found"),target:me,start:a.strictObject({locale:E[0].shape.locale,parameters:E[0].shape.parameters}),purchase:Se})]);var ht=J.options[0].refine(u=>!u.customer&&!u.customerData),wt=a.strictObject({receiptId:a.uuid(),operationId:a.uuid(),terminal:a.enum(["complete","native"]).nullable()}),Ze=a.strictObject({schemaVersion:a.literal(1),baseUrl:a.url(),scope:ce,customerId:a.uuid(),sessionId:a.uuid(),start:ht,allowed:a.array(a.enum(["merchant","record_only","indiana","native"])),run:a.strictObject({id:a.uuid(),versionId:a.uuid(),status:Ve.shape.status,revision:a.number().int().nonnegative(),runExpiresAt:a.iso.datetime({offset:!0}).optional()}).optional(),purchases:a.array(wt).max(100),operationCommand:a.strictObject({operationId:a.uuid(),intent:a.literal("confirm")}).optional(),journal:a.strictObject({revision:a.number().int().nonnegative(),entry:ze.nullable()})});function et(u){return Be({...u,namespace:"purchases",identity:[u.scope.projectId,u.scope.environment,u.customerId]})}function tt(u){let m=new URL(u.baseUrl??Le).href,h=()=>new l("PURCHASE_STORAGE_INVALID","Purchase recovery storage is unavailable or invalid; native fallback is not authorized");async function S(){u.assertCurrent();try{let C=await u.storage.read();if(u.assertCurrent(),!Number.isSafeInteger(C.revision)||C.revision<0)throw h();let c=C.entry===null?null:Ze.parse(C.entry);if(c&&(c.baseUrl!==m||c.customerId!==u.customerId||c.scope.projectId!==u.scope.projectId||c.scope.environment!==u.scope.environment))throw new l("SCOPE_MISMATCH","Purchase recovery belongs to another Customer or environment");if(c?.journal.entry&&(c.journal.entry.scope.projectId!==c.scope.projectId||c.journal.entry.scope.environment!==c.scope.environment||c.journal.entry.funnelId!==c.start.funnelId||c.journal.entry.runId!==c.run?.id||c.journal.entry.versionId!==c.run?.versionId)||c?.operationCommand&&!c.purchases.some(k=>k.operationId===c.operationCommand?.operationId))throw h();return{revision:C.revision,entry:c}}catch(C){throw C instanceof l?C:h()}}async function te(C){for(let c=0;c<8;c++){let k=await S(),O=C(structuredClone(k.entry));if(JSON.stringify(O)===JSON.stringify(k.entry))return O;O&&Ze.parse(O),u.assertCurrent();let U;try{U=await u.storage.write(k.revision,O)}catch{throw h()}if(u.assertCurrent(),U!==null){if(!Number.isSafeInteger(U)||U<=k.revision)throw h();return O}}throw new l("PURCHASE_STORAGE_CONFLICT","Another consumer changed this purchase; recover the original attempt")}return{read:S,update:te,baseUrl:m}}var It=5*6e4,yt=2e3,gt=250;function Pt(u,m){let h=u.purchases.find(S=>S.type==="checkout");if(!u.actions.includes("continue_checkout")||h?.type!=="checkout"||m!==void 0&&h.operationId!==m)throw new l("PURCHASE_PENDING","No single resumable Checkout is confirmed");return h.checkoutUrl}function fe(u){return!u||u.operation==="close"||u.operation==="back"||u.operation==="shown"||u.operation==="submit"&&u.input.type==="screen"}var nt=()=>({revision:0,entry:null});function Zt(u){let m={...u,scope:{...u.scope},executionPolicy:structuredClone(u.executionPolicy)},h=m.session.snapshot();if(!h)throw new l("CUSTOMER_SESSION_REQUIRED","Purchase recovery requires a verified Customer session");let{customerId:S,sessionId:te}=h,C=!1,c=null,k,O,U=null,A=!1,x,ne,re,q={mode:"idle",status:"idle",actions:["start"],purchases:[]},v=new Map,be=new Map,D=new Map,he=new AbortController,oe=new Set,K=Me(m),ae=Ge(K.request);function $(e){return{code:e instanceof l?e.code:"PURCHASE_RECOVERY_BLOCKED",message:e instanceof Error?e.message:"The original purchase requires server confirmation",...e instanceof l&&e.status!==void 0?{status:e.status}:{}}}function I(){if(C||m.session.snapshot()?.customerId!==S)throw new l("IDENTITY_CHANGED","The original purchase Customer changed")}let w=tt({...m,customerId:S,assertCurrent:I,storage:m.storage??et({baseUrl:m.baseUrl,scope:m.scope,customerId:S})}),rt,_e=()=>rt??=import("./funnel-paywall-copies-LPOTYSTS.js").then(({createPaywallCopies:e})=>e({baseUrl:m.baseUrl,scope:m.scope,customerId:S})),ot={read:async e=>(await _e()).read(e),write:async(e,t)=>(await _e()).write(e,t)},at=m.session.subscribeIdentity(qe);function qe(){C||(C=!0,clearTimeout(re),he.abort(new l("IDENTITY_CHANGED","Purchase consumer was destroyed")),at(),c?.reset(),c=null,U=null,K.dispose(),oe.clear(),v.clear(),D.clear())}function R(e){I();let t=JSON.stringify(e)!==JSON.stringify(q);q=e,clearTimeout(re),(e.mode==="operation"||e.mode==="run"&&!e.actions.includes("close"))&&["waiting_result","fulfillment","recording"].includes(e.status)&&(re=setTimeout(()=>{Q().catch(()=>{})},5e3)),t&&Ee(m.onRecovery,structuredClone(e));for(let n of t?oe:[]){if(C)break;Ee(n,structuredClone(e))}return structuredClone(e)}function g(e){if(I(),!e||e.start.requestId!==O)throw new l("PURCHASE_STORAGE_CONFLICT","This purchase was superseded; the old consumer cannot dispatch")}function Oe(e){return!e.run&&!b(e).length&&!e.journal.entry&&!e.operationCommand}function we(e){let t=e.journal.entry;return!b(e).length&&!e.operationCommand&&fe(t?.command)&&fe(t?.closeCommand)}function z(e){return!!e.run&&we(e)}function b(e){let t=[...e.purchases],n=e.journal.entry?.purchase;return n&&!t.some(o=>o.operationId===n.operationId)&&t.push({receiptId:n.receiptId,operationId:n.operationId,terminal:null}),t}function j(e){let t=b(e),n=A&&t.length>0&&t.every(o=>o.terminal==="native"&&H(v.get(o.operationId))==="native")&&t.some(o=>{let r=v.get(o.operationId);return!r||D.get(o.operationId)!==!0?!1:B(r)?!0:r.status==="cancelled"&&r.confirmedAt===null&&!r.quoteFinalized&&!r.merchantExecution&&!r.problem&&!!r.quote&&Date.parse(r.quote.expiresAt)<=Date.now()});return e.run&&(n||!["running","waiting"].includes(e.run.status))&&!e.journal.entry?.command&&!e.journal.entry?.closeCommand&&!e.operationCommand&&t.every(o=>o.terminal!==null)}function N(e,t){let n=e.journal.entry?.command??e.journal.entry?.closeCommand,o=b(e).map(f=>{let _=v.get(f.operationId),P=de({quote:_?.quote??null,operation:_??null,requestId:n?.requestId??null,pending:!1,destroyed:!1,canReselect:D.get(f.operationId)===!0});return f.terminal&&(P.type==="checkout"||P.type==="recover"||P.type==="cancel")?{type:f.terminal,operationId:f.operationId}:P}),r=o.filter(f=>!["complete","native"].includes(f.type)),i=r[0],s=r.length===1&&i?.operationId?v.get(i.operationId):void 0;if(s&&(i?.type==="checkout"||i?.type==="cancel"))try{Z({allowed:e.allowed.filter(f=>m.executionPolicy.allowed.includes(f))},s.quote)}catch(f){return{mode:t,status:"blocked",actions:["refresh",...t==="run"&&e.run&&["running","waiting"].includes(e.run.status)?["close"]:[]],purchases:o,error:$(f)}}let d;if(t==="operation"&&!n&&i?.type==="cancel"&&s?.quote&&!s.problem&&!s.confirmedAt)try{Z({allowed:e.allowed.filter(f=>m.executionPolicy.allowed.includes(f))},s.quote),Date.parse(s.quote.expiresAt)>Date.now()&&(d={operationId:s.operationId,quote:s.quote})}catch{}let p=o.length>0&&r.length===0,y=j(e)||t==="operation"&&p&&!n&&!e.operationCommand?"complete":i?.type==="checkout"?"checkout":i?.type==="fulfillment"?"fulfillment":i?.type==="recording"?"recording":n||e.operationCommand||i&&i.type!=="cancel"||t==="operation"&&!d?"waiting_result":"ready";return{mode:t,status:y,purchases:o,...d?{confirmation:structuredClone(d)}:{},actions:["refresh",...j(e)||z(e)?["start"]:[],...t==="run"&&e.run&&["running","waiting"].includes(e.run.status)?["close"]:[],...e.operationCommand?["retry"]:d?["confirm"]:[],...r.length===1&&i?.type==="checkout"?["continue_checkout"]:[]]}}function H(e){let t=de({quote:e?.quote??null,operation:e??null,requestId:null,pending:!1,destroyed:!1,canReselect:e&&D.get(e.operationId)===!0});return t.type==="complete"||t.type==="native"?t.type:null}function Ie(e){if(!e.operation)return;let t=le.parse({...e.operation,...e.operation.quote?{}:e.quote?{quote:e.quote}:{}});if(t.merchantExecution&&t.merchantExecution.customerId!==S)throw new l("SCOPE_MISMATCH","Purchase execution belongs to another Customer");let n=pe(v.get(t.operationId)??null,t);v.set(t.operationId,n),n===t&&D.set(t.operationId,e.canReselect===!0)}async function it(e,t,n){I();for(let i of[e.purchase,e.run.paywall])i&&Ie(i);let o=!1,r=await w.update(i=>{if(i&&i.start.requestId!==t)return o=!0,i;if(g(i),i.run&&(i.run.id!==e.run.id||i.run.versionId!==e.run.source.versionId))throw new l("SCOPE_MISMATCH","The original purchase Run changed");let s=b(i);for(let d of[e.purchase,e.run.paywall]){let p=d?.operation?.operationId??d?.quote?.operationId;if(!d||!p)continue;let y=s.find(_=>_.operationId===p);if(y&&y.receiptId!==d.receiptId)throw new l("INVALID_RESPONSE","The original purchase Receipt changed");let f=H(v.get(p));y?y.terminal??=f:s.push({receiptId:d.receiptId,operationId:p,terminal:f})}return{...i,purchases:s,run:i.run&&(i.run.revision>e.run.revision||!["running","waiting"].includes(i.run.status)&&["running","waiting"].includes(e.run.status))?i.run:{id:e.run.id,versionId:e.run.source.versionId,status:e.run.status,revision:e.run.revision,runExpiresAt:e.run.runExpiresAt}}});if(o){n();return}g(r),r.run&&!["running","waiting"].includes(r.run.status)&&b(r).some(i=>!i.terminal)&&(r=await L(r,!r.journal.entry?.command&&!r.journal.entry?.closeCommand,new Set([e.purchase?.operation?.operationId,e.run.paywall?.operation?.operationId].filter(i=>!!i)))),g(r),R(N(r,"run"))}function st(e){let t;return()=>{t||C||(t=setTimeout(()=>{let n=e(),o=n.view;if(C||!o||!["running","waiting"].includes(o.status)||n.pendingCommands?.some(r=>r.operation==="close")){t=void 0;return}t=n.submit({operation:"close",requestId:crypto.randomUUID(),nodeId:o.nodeId,visit:o.visit,revision:o.revision}).catch(()=>{}).finally(()=>{t=void 0})}))}}function ut(e,t){let n=null,o=r=>!!r&&r.start.requestId!==e;return{async read(){let{entry:r}=await w.read();return I(),o(r)?(t(),structuredClone(n??=nt())):(g(r),structuredClone(r.journal))},async write(r,i){let s=null;return await w.update(d=>{if(o(d)){if(t(),!fe(i?.command)||!fe(i?.closeCommand))throw new l("PURCHASE_STORAGE_CONFLICT","This purchase was superseded; its Run can only be dismissed");let p=n??=nt();return s=null,p.revision!==r||(s=r+1,n={revision:s,entry:i}),d}if(g(d),d.operationCommand&&i?.command&&i.command.operation!=="close")throw new l("PURCHASE_PENDING","Recover the original Operation command before dispatching a Run mutation");return s=null,d.journal.revision!==r?d:(s=r+1,{...d,journal:{revision:s,entry:i}})}),s}}}async function L(e,t=!1,n=new Set){g(e);let o=b(e);for(let i of o){if(i.terminal)continue;let s=n.has(i.operationId)?v.get(i.operationId):void 0;if(s??=await V(e,i),I(),s.operationId!==i.operationId)throw new l("INVALID_RESPONSE","Original Operation changed");if(s.merchantExecution&&s.merchantExecution.customerId!==S)throw new l("SCOPE_MISMATCH","Purchase execution belongs to another Customer");if(t&&!e.operationCommand&&de({quote:s.quote??null,operation:s,requestId:null,pending:!1,destroyed:!1}).type==="cancel"){let d=B(s)?await ae.update({operationId:i.operationId,intent:"cancel"}):await ae.attach({operationId:i.operationId,intent:"cancel"});if(s=le.parse(d.operation),I(),s.operationId!==i.operationId)throw new l("INVALID_RESPONSE","Original cancellation Operation changed");s=await V(e,i)}v.set(i.operationId,pe(v.get(i.operationId)??null,s))}let r=await w.update(i=>{g(i);let s=i.operationCommand&&v.get(i.operationCommand.operationId);return{...i,...s&&(s.confirmedAt||s.merchantExecution||!Te(s))?{operationCommand:void 0}:{},purchases:b(i).map(d=>({...d,terminal:d.terminal??H(v.get(d.operationId))}))}});return g(r),r}async function W(e){I();let t=await K.request("funnels",e);return I(),t}async function ct(e){try{return await W(e)}catch(t){if(e.operation!=="recover_start"||e.intent!=="start"||!(t instanceof l)||t.status!==400||t.code!=="INVALID_REQUEST")throw t;return W({...e,intent:"resume"})}}async function lt(){let e=ee(Xe,await W({operation:"find_purchase"}));if(e.customerId!==S||e.scope.projectId!==m.scope.projectId||e.scope.environment!==m.scope.environment)throw new l("SCOPE_MISMATCH","Recovery Customer or environment changed");if(e.outcome!=="found")return e.outcome;let{target:t,purchase:n}=e;return await w.update(o=>o&&!j(o)&&!z(o)?o:{schemaVersion:1,baseUrl:w.baseUrl,scope:m.scope,customerId:S,sessionId:te,start:{operation:"start",requestId:t.startRequestId,funnelId:t.funnelId,...e.start},allowed:[...m.executionPolicy.allowed],run:{id:t.runId,versionId:t.versionId,status:t.status,revision:0,runExpiresAt:t.runExpiresAt},purchases:[{...n,terminal:null}],journal:{revision:0,entry:null}}),"found"}let ie;function ye(e){let t=ie;if(t&&(!t.outcome||e&&t.outcome==="none"&&Date.now()-t.at<It))return t.job;let n={at:Date.now(),job:lt().then(o=>(n.outcome=o,n.at=Date.now(),o),o=>{throw ie===n&&(ie=void 0),o})};return ie=n,n.job}async function V(e,t,n="recover_purchase",o=!1){let r={runId:e.run.id,funnelId:e.start.funnelId,purchase:{receiptId:t.receiptId,operationId:t.operationId}},i=n==="recover_purchase"?{...r,operation:n,...o?{includePaywallVersion:!0}:{}}:{...r,operation:"terminate_checkout",...n==="expire_unconfirmed_quote"?{intent:n}:{}},s=ee(We,await W(i));if(ge(e,s),s.purchase.receiptId!==t.receiptId||s.purchase.operation?.operationId!==t.operationId)throw new l("INVALID_RESPONSE","Original purchase reference changed");return Ie(s.purchase),o&&s.paywallVersionId&&be.set(t.operationId,s.paywallVersionId),v.get(t.operationId)}async function Fe(e){for(let t of[e.journal.entry?.command,e.journal.entry?.closeCommand]){if(!t)continue;let n=ee($e,await W({operation:"settle_command",runId:e.run.id,funnelId:e.start.funnelId,requestId:t.requestId,...t.operation==="resume"?{}:{command:t}}));if(ge(e,n),n.settlement.requestId!==t.requestId)throw new l("INVALID_RESPONSE","Original command settlement changed");n.purchase&&Ie(n.purchase);let o=await w.update(r=>{g(r);let i=b(r),{receiptId:s,operationId:d}=n.settlement;if(s&&d){let y=i.find(f=>f.operationId===d);if(y&&y.receiptId!==s)throw new l("INVALID_RESPONSE","Original Receipt changed");y||i.push({receiptId:s,operationId:d,terminal:H(v.get(d))})}let p=n.settlement.state==="settled"?Qe(r.journal.entry,t.requestId):r.journal.entry;return{...r,purchases:i,journal:p===r.journal.entry?r.journal:{revision:r.journal.revision+1,entry:p}}});g(o),e=o}return e}function ge(e,t){if(t.customerId!==S||t.scope.projectId!==m.scope.projectId||t.scope.environment!==m.scope.environment||t.target.funnelId!==e.start.funnelId||t.target.startRequestId!==e.start.requestId||e.run&&(t.target.runId!==e.run.id||t.target.versionId!==e.run.versionId))throw new l("SCOPE_MISMATCH","The original recovery binding changed")}async function Pe(e,t){if(g(e),e.run&&(e=await Fe(e)),!b(e).length&&j(e))return R(N(e,"operation"));if(we(e)){let r=e.start.requestId;if(!await w.update(s=>s&&s.start.requestId===r&&we(s)?null:s))return c?.reset(),c=null,A=!1,R({mode:"idle",status:"idle",actions:["start"],purchases:[]})}if(!b(e).length)return R({mode:"blocked",status:"blocked",actions:["refresh"],purchases:[],error:$(t)});A=!0;let n=b(e);if(e.run&&["running","waiting"].includes(e.run.status)&&n.every(r=>r.terminal==="native"))for(let r of n)H(v.get(r.operationId))!=="native"&&await V(e,r);let o=await dt(await L(e));return R(N(o,"operation"))}async function dt(e){if(e.journal.entry?.command||e.journal.entry?.closeCommand||e.operationCommand)return e;let t=b(e).filter(i=>!i.terminal),n=t[0];if(!n||t.length!==1)return e;let o=v.get(n.operationId),r=o?.quote;if(!o||B(o)||!r||X(r)||r.provider!=="merchant"||o.status!=="pending"||o.confirmedAt!==null||o.quoteFinalized||o.checkoutUrl||o.nativePurchase||o.merchantExecution||o.problem||Date.parse(r.expiresAt)>Date.now())return e;try{await V(e,n,"expire_unconfirmed_quote")}catch{return I(),e}return L(e,!1,new Set([n.operationId]))}async function se(e,t=!1,n=!0,o=!1){if(O=e.start.requestId,U=structuredClone({requestId:e.start.requestId,funnelId:e.start.funnelId,locale:e.start.locale,parameters:e.start.parameters}),!c){let r=e.run?{operation:"recover_run",runId:e.run.id,funnelId:e.start.funnelId}:{operation:"recover_start",intent:t?"start":"lookup",start:{requestId:e.start.requestId,funnelId:e.start.funnelId,locale:e.start.locale,parameters:e.start.parameters}},i;try{i=await ct(r)}catch(P){if(!e.run&&P instanceof l&&(P.status===void 0||P.status>=500))return R({mode:"blocked",status:"blocked",actions:["refresh","retry"],purchases:q.purchases,error:$(P)});throw P}let s=ee(Ke,i);if(s.customerId!==S||s.scope.projectId!==m.scope.projectId||s.scope.environment!==m.scope.environment)throw new l("SCOPE_MISMATCH","Recovery Customer or environment changed");if(s.outcome==="unknown"){if(!t&&Oe(e)){let P=e.start.requestId;if(!await w.update(M=>M&&M.start.requestId===P&&Oe(M)?null:M))return R({mode:"idle",status:"idle",actions:["start"],purchases:[]})}return R({mode:"blocked",status:"blocked",actions:["refresh","retry"],purchases:q.purchases,error:{code:"RESULT_UNKNOWN",message:"The original Start outcome remains unknown; retry only its original input"}})}ge(e,s);let d=await w.update(P=>(g(P),{...P,run:{id:s.target.runId,versionId:s.target.versionId,status:s.target.status,revision:s.view?.revision??P.run?.revision??0,runExpiresAt:s.target.runExpiresAt}}));if(g(d),e=d,s.access.type==="operation_only")return Pe(e,new l("RUN_RECONCILIATION_REQUIRED","Only the original command and Operation can be recovered"));e=await Fe(e);let p=s.view;if(p.locale!==e.start.locale||!Je(p.parameters,e.start.parameters))throw new l("INVALID_RESPONSE","The original Start input changed");let y=e.start.requestId,f=st(()=>_),_=Ye({...m,customerRun:{runId:s.target.runId,customerId:S,startRequestId:y},funnelId:e.start.funnelId,funnelExecutionPolicy:{allowed:e.allowed.filter(P=>m.executionPolicy.allowed.includes(P))},funnelCommandStorage:ut(y,f),onAcceptedResponse:P=>it(P,y,f)},{scope:s.scope,run:p});c=_}try{let r=o&&k?.controller===c?performance.now()-k.at:1/0;(r>=yt||c.pendingCommands?.length||(c.viewAgeMs??0)<r)&&(k=void 0,await c.get(),k={controller:c,at:performance.now()}),c.view?.pendingRequest?.requestId===e.start.requestId&&!c.pendingCommands?.length&&await c.resume(c.view.pendingRequest.requestId);for(let s of c.pendingCommands??[])s.operation!=="close"&&await c.settle?.(s.requestId);c.pendingCommands?.length&&await c.retry(),I();let i=(await w.read()).entry;return g(i),R(N(i,"run"))}catch(r){if(I(),n&&r instanceof l&&(r.status===401||r.status===409&&r.reason==="STATE_CHANGED")){c.reset(),c=null;let i=(await w.read()).entry;return g(i),se(i,!1,!1,!1)}throw r}}function T(e,t="read",n){if(I(),x)return t==="read"||t===ne?x:x.then(()=>T(e,t,n),()=>T(e,t,n));clearTimeout(re);let o=e().catch(r=>{throw!C&&!n?.(r)&&R({mode:"blocked",status:"blocked",actions:["refresh"],purchases:q.purchases,error:$(r)}),r});return x=o,ne=t,o.then(()=>{x===o&&(x=void 0,ne=void 0)},()=>{x===o&&(x=void 0,ne=void 0)}),o}function pt(e){return e instanceof l&&(e.code==="NETWORK_ERROR"||e.code==="TIMEOUT"||e.status===409||e.status===429||e.status!==void 0&&e.status>=500)}function Q(e){let t=e?.reuseRecentRead===!0,n=async o=>{let{entry:r}=await w.read();if(!r||j(r)){if(await ye(!1)==="blocked")return ke();({entry:r}=await w.read())}return r?(O&&r.start.requestId!==O&&(c?.reset(),c=null,v.clear(),D.clear(),A=!1),A&&O===r.start.requestId?Pe(r,q.error):se(r,!1,!0,o)):R({mode:"idle",status:"idle",actions:["start"],purchases:[]})};return T(async()=>{try{return await n(t)}catch(o){if(C||!pt(o))throw o;return I(),c?.reset(),c=null,k=void 0,o.status===409?A=!1:await new Promise(r=>setTimeout(r,gt)),I(),n(!1)}})}function ke(){return R({mode:"blocked",status:"blocked",actions:["refresh"],purchases:[],error:$(new l("PURCHASE_PENDING","Check the outstanding purchases before starting another"))})}async function Ae(){let e=await Q();return e.mode==="operation"&&!e.actions.includes("confirm")&&!e.actions.includes("retry")?e:T(async()=>{let t=(await w.read()).entry;if(g(t),!A){if(!c?.view?.paywall?.quote)throw new l("PURCHASE_PENDING","Read the original quote before confirming");let p=c.view.paywall.operation;if(p?.confirmedAt||p?.merchantExecution||p&&!(B(p)?["prepared","quoted"].includes(p.status):p.status==="pending"))return R(N(t,"run"));if(c.pendingCommands?.length)await c.retry();else{let f=c.view;await c.submit({operation:"submit",requestId:crypto.randomUUID(),nodeId:f.nodeId,visit:f.visit,revision:f.revision,input:{type:"paywall_confirm",operationId:f.paywall.quote.operationId,...f.paywall.quote.merchantTerms?{merchantConfirmation:Ce(f.paywall.quote.merchantTerms)}:{}}})}let y=(await w.read()).entry;return g(y),R(N(y,"run"))}let n=t.operationCommand?.operationId??q.confirmation?.operationId,o=n&&v.get(n);if(!n||!o||t.journal.entry?.command||t.journal.entry?.closeCommand)throw new l("PURCHASE_PENDING","The original Run command must be settled before Operation confirmation");Z({allowed:t.allowed.filter(p=>m.executionPolicy.allowed.includes(p))},o.quote),await w.update(p=>{if(g(p),p.journal.entry?.command||p.journal.entry?.closeCommand||p.operationCommand&&p.operationCommand.operationId!==n)throw new l("PURCHASE_PENDING","Another original command is pending");return{...p,operationCommand:{operationId:n,intent:"confirm"}}});let r={operationId:n,intent:"confirm",...o.quote?.merchantTerms?{merchantConfirmation:Ce(o.quote.merchantTerms)}:{}},i=B(o)?await ae.update(r):await ae.attach(r),s=le.parse(i.operation);if(I(),i.operation.operationId!==n)throw new l("INVALID_RESPONSE","Original confirmation Operation changed");v.set(n,pe(o,s));let d=(await w.read()).entry;return g(d),R(N(await L(d,!1,new Set([n])),"operation"))},"confirm")}function mt(e){let t=e?.quote;return t&&X(t)&&t.timing==="immediate"&&t.execution.provider==="merchant"&&(e.confirmedAt||e.merchantExecution)?t:null}function Ne(){if(q.mode!=="operation"||q.status==="blocked")return null;let e=q.purchases.filter(({type:n})=>n!=="complete"&&n!=="native"),t=e.length===1&&e[0]?.operationId;return t?mt(v.get(t)):null}async function je(){I();let{entry:e}=await w.read();return e?j(e)||z(e)?"finished":"pending":"none"}return{get controller(){return c},get recovery(){return structuredClone(q)},get attempt(){return I(),structuredClone(U)},get identitySignal(){return he.signal},get customerId(){return S},retained:je,async pendingFunnel(){I();let{entry:e}=await w.read();return e&&!j(e)&&!z(e)?e.start.funnelId:null},get paywallCopies(){return ot},async findPurchase(){let e=await je();if(e==="pending")return e;let t=await ye(!0);return I(),t==="none"?e:t},async readPaywall(e){I();let t=Ue(e),[n,{readPaywallContent:o},{validateResourceCheck:r}]=await Promise.all([xe(K.request,"resolvePaywall"),import("./paywall-content-GJX3FQ6D.js"),import("./check-response-XGOTG3KL.js")]);I();let i=n.request.parse({selector:t.paywallVersionId?{type:"version",versionId:t.paywallVersionId}:{type:"paywall",paywallId:t.paywallId},commerce:t.commerce,locale:t.locale}),s=await De(K.request,n,i);r(i,s.paywall.check,s.scope);let d=await o(m,s.paywall);if(I(),t.paywallVersionId?d.id!==t.paywallVersionId:d.paywallId!==t.paywallId)throw new l("INVALID_RESPONSE","The requested Paywall changed");return d},get canRestoreUpgradePaywall(){return Ne()!==null},recoverUpgradePaywall(){let e=Ne();return e?this.recoverPurchasePaywall(void 0,e.operationId):Promise.resolve(null)},async recoverPurchasePaywall(e,t){if(q.mode!=="operation"||q.status==="blocked")return null;let{entry:n}=await w.read();if(!n?.run)return null;g(n);let o=b(n),r=o.filter(F=>!F.terminal),i=o.filter(F=>F.terminal==="complete"),s=r.length===1?r[0]:r.length?void 0:i.find(F=>e&&e.runId===n.run?.id&&F.receiptId===e.receiptId)??(i.length===1?i[0]:void 0);if(!s||t&&s.operationId!==t)return null;let d=e?.runId===n.run.id&&e.receiptId===s.receiptId?e.view:void 0,p;try{p=await V(n,s,"recover_purchase",!0)}catch(F){if(!(F instanceof l&&F.status===400&&F.code==="INVALID_REQUEST"))throw F;if(!d)return null;p=await V(n,s)}let y=p.quote;if(!y||X(y)&&(y.timing!=="immediate"||y.execution.provider!=="merchant")||!(p.confirmedAt||p.merchantExecution||p.checkoutUrl||H(p)==="complete"))return null;H(p)!=="complete"&&Z({allowed:n.allowed.filter(F=>m.executionPolicy.allowed.includes(F))},y);let f=be.get(s.operationId),_=n.start.parameters?.commerce,P=n.start.locale??"en",ue=d;if(f){if(typeof _!="object"||!_||!("provider"in _)||typeof _.provider!="string"||!("currency"in _)||typeof _.currency!="string")return null;ue=await this.readPaywall({paywallVersionId:f,locale:P,commerce:{provider:_.provider,currency:_.currency,...X(y)?{intent:"subscription_change"}:{}}})}if(!ue)return null;I();let M=ue,ve=!1,Re=async()=>{throw new l("PURCHASE_PENDING","Only the original purchase can be recovered")};return{signal:he.signal,view:M,quote:y,locale:P,get operation(){return p},get canReselect(){return D.get(s.operationId)===!0},async refresh(){return M},preview:Re,confirm:Re,cancel:Re,async read(){if(ve)throw new DOMException("Purchase view closed","AbortError");p=await V(n,s);let F=await L(n,!1,new Set([s.operationId]));return ve||R(N(F,"operation")),structuredClone(p)},destroy(){ve=!0}}},start(e){let t=J.parse({...structuredClone(e),operation:"start",requestId:e.requestId??crypto.randomUUID()});if(t.operation!=="start"||t.customer||t.customerData)throw new l("INVALID_REQUEST","A Customer-owned Funnel start is required");return T(async()=>{let n=(await w.read()).entry;if((!n||j(n)||z(n))&&await ye(!0)==="blocked")return ke();let o=await w.update(r=>{if(r&&!j(r)&&!(z(r)&&r.start.requestId!==t.requestId)){if(r.start.funnelId!==t.funnelId)throw new l("PURCHASE_PENDING","Recover the original Funnel before starting another purchase");return r}return{schemaVersion:1,baseUrl:w.baseUrl,scope:m.scope,customerId:S,sessionId:te,start:t,allowed:[...m.executionPolicy.allowed],purchases:[],journal:{revision:0,entry:null}}});if(!o)throw new l("PURCHASE_STORAGE_INVALID","Original start was not retained");return O!==o.start.requestId&&(c?.reset(),c=null,v.clear(),D.clear(),A=!1),A?Pe(o,q.error):se(o,!0,!0,!0)},`start:${t.funnelId}`)},refresh:Q,confirm:Ae,retry:()=>A?Ae():T(async()=>{let{entry:e}=await w.read();return e?se(e,!0):R({mode:"idle",status:"idle",actions:["start"],purchases:[]})},"retry"),async close(){return c?.view?T(async()=>{if(!c?.view)throw new l("PURCHASE_PENDING","Recover the original Run before closing");if(c.pendingCommands?.find(n=>n.operation==="close"))await c.retry();else if(["running","waiting"].includes(c.view.status)){let n=c.view;await c.submit({operation:"close",requestId:crypto.randomUUID(),nodeId:n.nodeId,visit:n.visit,revision:n.revision})}let t=(await w.read()).entry;return t&&t.start.requestId!==O?R({mode:"idle",status:"idle",actions:["start"],purchases:[]}):(g(t),R(N(t,"run")))},"close"):Q()},async continueCheckout(e,t){let n=t?await T(async()=>{let{entry:o}=await w.read();if(g(o),!o.run||!b(o).some(i=>i.operationId===t&&!i.terminal))throw new l("PURCHASE_PENDING","The original Checkout changed");let r=await L(o);return R(N(r,A?"operation":"run"))},`continue:${t}`,o=>o instanceof l&&o.code==="PURCHASE_PENDING"):await Q();I(),await e(Pt(n,t))},async terminateCheckout(e){let t=n=>n.actions.includes("continue_checkout")&&n.purchases.some(o=>o.type==="checkout"&&o.operationId===e);if(!t(q)&&!t(await Q()))throw new l("PURCHASE_PENDING","The original Checkout has changed");return T(async()=>{let{entry:n}=await w.read();g(n);let o=b(n).find(i=>i.operationId===e&&!i.terminal);if(!o||!n.run)throw new l("PURCHASE_PENDING","The original Checkout has changed");await V(n,o,"terminate_checkout");let r=await L(n,!1,new Set([e]));return R(N(r,A?"operation":"run"))},`terminate:${e}`,n=>n instanceof l&&["CAPABILITY_UNAVAILABLE","NOT_CONFIGURED"].includes(n.code))},subscribe(e){return oe.add(e),()=>{oe.delete(e)}},destroy:qe}}export{et as a,Pt as b,Zt as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as n,r as t}from"./chunk-FDXBCQBO.js";function u(o,e,a){return n(o,e,a,t)}export{u as a};
|
|
@@ -1367,6 +1367,20 @@ declare function createConfigurationSync(options: ConfigurationSyncOptions): {
|
|
|
1367
1367
|
};
|
|
1368
1368
|
generation: string;
|
|
1369
1369
|
}>;
|
|
1370
|
+
/**
|
|
1371
|
+
* The Paywall Versions an active Funnel's current Version fixes, for every Funnel in the public
|
|
1372
|
+
* selection: Version identities only, without the route's conditions or Splits.
|
|
1373
|
+
*/
|
|
1374
|
+
funnelPaywallPins: (funnelId: string) => Promise<{
|
|
1375
|
+
pins: {
|
|
1376
|
+
kind: "funnel_paywall_pins";
|
|
1377
|
+
formatVersion: 1;
|
|
1378
|
+
funnelId: string;
|
|
1379
|
+
versionId: string;
|
|
1380
|
+
paywalls: Record<string, string[]>;
|
|
1381
|
+
};
|
|
1382
|
+
generation: string;
|
|
1383
|
+
}>;
|
|
1370
1384
|
paywall: (paywallId: string, versionId?: string) => Promise<{
|
|
1371
1385
|
document: {
|
|
1372
1386
|
kind: "paywall";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as ie}from"./chunk-LQV7EC5H.js";import{a as N,b as Z,d as ee,f as te,g as ne,j as M,l as re,m as oe,n as se}from"./chunk-CO6HDNOC.js";import{b as K}from"./chunk-FPJ3FE26.js";import{r as V}from"./chunk-BT7IC765.js";import"./chunk-ME6QTD5Y.js";import"./chunk-6XRQR43F.js";import"./chunk-3532HSBP.js";import"./chunk-67WFVDTV.js";import"./chunk-6VVQWTHV.js";import"./chunk-VILB5M4X.js";import"./chunk-
|
|
1
|
+
import{i as ie}from"./chunk-LQV7EC5H.js";import{a as N,b as Z,d as ee,f as te,g as ne,j as M,l as re,m as oe,n as se}from"./chunk-CO6HDNOC.js";import{b as K}from"./chunk-FPJ3FE26.js";import{r as V}from"./chunk-BT7IC765.js";import"./chunk-ME6QTD5Y.js";import"./chunk-6XRQR43F.js";import"./chunk-3532HSBP.js";import"./chunk-67WFVDTV.js";import"./chunk-6VVQWTHV.js";import"./chunk-VILB5M4X.js";import"./chunk-6QBSJRAD.js";import"./chunk-KCUE2VFJ.js";import{o as X,p as Y}from"./chunk-Y3W5G4BF.js";import{A as G}from"./chunk-FYUMVOCV.js";import"./chunk-DUS5V65Z.js";import"./chunk-BOT6ZDLK.js";import{d as R}from"./chunk-A5WUQLAO.js";import{a as p}from"./chunk-UGATOG2T.js";import"./chunk-LFR2LWYC.js";import"./chunk-FEU6XRHV.js";import"./chunk-5MRSFLQA.js";import{b as u}from"./chunk-W22ESUYY.js";import{a as h}from"./chunk-DSPLGTQI.js";import"./chunk-FYMVNLQN.js";import"./chunk-FRK6322O.js";import"./chunk-WOT6VMZA.js";var z=new WeakMap;function ce(o){let t={string:u.string(),number:u.number().finite(),boolean:u.boolean(),strings:u.array(u.string()),json:R}[o.type];return o.nullable?t.nullable():t}function ae(o,t){let f=u.record(u.string(),R).parse(o);if(Object.keys(f).length>40)throw new p("INVALID_REQUEST","Too many content inputs");for(let[m,n]of Object.entries(f))X.parse({[m]:n});if(Object.keys(f).some(m=>!Object.hasOwn(t.inputs,m)))throw new p("INVALID_REQUEST","Undeclared content input");for(let[m,n]of Object.entries(t.inputs))if(Object.hasOwn(f,m))ce(n).parse(f[m]);else if(n.required)throw new p("INVALID_REQUEST",`Missing content input ${m}`);return f}async function Ve(o,t){return le(o,t,!1)}async function Ae(o,t){return le(o,t,!0)}async function le(o,t,f){t.signal?.throwIfAborted();let m=K.parse(t.content),n=m.document;if(t.closeControl==="content"&&!n.screen.actions.some(e=>e.type==="event"&&e.close))throw new p("INVALID_REQUEST","An authored Close control requires a declared Close action");if(z.has(o))throw new p("CONFLICT","Content is already mounted in this container");let g=ae(t.inputs??{},n.contract),T=new Set(u.array(u.string()).max(40).parse(t.mutableInputs??[]));if(T.size!==(t.mutableInputs?.length??0)||[...T].some(e=>!Object.hasOwn(n.contract.inputs,e)))throw new p("INVALID_REQUEST","Mutable content inputs must name unique declared inputs");for(let e of Object.keys(n.contract.outputs))if(typeof t.actions[e]!="function")throw new p("INVALID_REQUEST",`Missing host handler for ${e}`);let q=Y.parse(t.bindings??[]),d=o.ownerDocument,ue=o.clientHeight||d.defaultView?.innerHeight||800,P,w,a,_,H=n.kind==="popup",r=H?d.createElement("dialog"):null,c=d.createElement("div");if(c.dataset.indianaContent=n.kind,c.setAttribute("aria-label",n.name),c.style.cssText="width:100%;min-width:0",r){r.setAttribute("aria-label",n.name);let e=n.screen.presentation;r.style.cssText=e.type==="inline"?N("content",{type:"fullscreen"},n.screen.theme):N("content",e,n.screen.theme),a=ee(r,n.screen,()=>{w?.resizeViewport(d.defaultView?.innerHeight||800,d.defaultView?.innerWidth||1024)}),r.append(c),o.append(r)}else o.append(c);let i=!1,A=!1,C=!1,D=!1,de=r?oe(r):se(c,o),S=re(o,t,n.kind,()=>{k()&&(v(),h(t.onDismiss))}),F,j,L=new Promise((e,s)=>{F=e,j=s});L.catch(()=>{});let y=null,E=structuredClone(n.screen),J=G(E,[t.locale,...d.defaultView?.navigator.languages??[]]),x=t.capabilities;E.actions=E.actions.map(e=>e.type==="event"?{...e,close:!1}:e);function v(){i||(i=!0,t.signal?.removeEventListener("abort",v),S.finish("dismissed"),j(new Error("Content preparation cancelled")),a?.destroy(),_?.(),w?.destroy(),r?.close(),r?.remove(),c.remove(),z.delete(o),r&&P?.())}let I=()=>{!C||!k()||(v(),h(t.onDismiss))};function k(){try{return t.canDismiss?.()!==!1}catch(e){return h(t.onError,e),!1}}if(r&&t.closeControl!=="content"){let e=d.createElement("button");e.type="button",e.textContent="×",e.setAttribute("aria-label",t.locale?.startsWith("zh")?"关闭":"Close"),ne(e,n.screen.theme),e.addEventListener("click",I),r.prepend(e)}r&&a?.responsive&&(_=Z(r,I,k,t.locale?.startsWith("zh")?"关闭":"Close")),r?.addEventListener("cancel",e=>{e.preventDefault(),I()}),r?.addEventListener("keydown",e=>{e.key==="Escape"&&(e.preventDefault(),I())});async function Q(){if(i||!C||A||!y)return;let e=y;A=!0,c.setAttribute("aria-busy","true");try{await t.actions[e.actionId](structuredClone(e)),y=null}catch(s){i||h(t.onError,s)}finally{A=!1,i||c.removeAttribute("aria-busy")}}function W(){if(i)throw new p("CONFLICT","Content host has been destroyed");C||!D||(P??=M(d),S.present(e=>{de(),r&&(a?.latch(),r.showModal(),a?.responsive&&r.focus({preventScroll:!0}),!e&&t.loading!=="host"&&te(r,a?.type??n.screen.presentation.type,a?.responsive)),C=!0}))}function U(e){S.finish("error",e),j(e instanceof Error?e:new Error(String(e))),v()}let B={destroy:v,show:W,get pendingAction(){return y?structuredClone(y):null},retryAction:Q,updateInputs(e){if(i)throw new p("CONFLICT","Content host has been destroyed");let s=u.record(u.string(),R).parse(e),b=ae({...g,...s},n.contract);for(let l of Object.keys(s))if(!T.has(l)&&(!Object.hasOwn(g,l)||V(g[l])!==V(b[l])))throw new p("PRECONDITION_FAILED","This content input is frozen; prepare a new presentation");V(g)!==V(b)&&(w?.update(E,J,{capabilities:x,serverInput:{bindings:q,answers:{},values:b}}),g=b)},updateCapabilities(e){if(i)return;let s=structuredClone(e);w?.updateCapabilities(s),x=s}};z.set(o,B),t.signal?.addEventListener("abort",v,{once:!0});try{if(t.signal?.throwIfAborted(),f||(P=M(d),S.start(H,t.locale??n.screen.strings.defaultLocale),i&&await L),w=ie(c,{mode:"live",rendererUrl:t.rendererUrl,title:n.name,viewportHeight:n.kind==="page"?ue:a?.responsive?d.defaultView?.innerHeight||800:void 0,...a?.responsive?{viewportWidth:d.defaultView?.innerWidth||1024,hostPresentation:()=>a.type}:{},onResize:e=>{i||a?.responsive&&(c.style.height=`${e}px`,c.style.overflow="clip",a.setContentHeight(e))},onRendered:e=>{if(!i&&(e&&r?.setAttribute("aria-label",e),!D))try{D=!0,f||W(),F()}catch(s){U(s),h(t.onError,s)}},onError:e=>{if(i)return;let s=new Error(e);D||U(s),h(t.onError,s)},onEscape:H?I:void 0,onAction:(e,s,b)=>{if(i||!C||A||y)return;let l=n.screen.actions.find(O=>O.id===e),$=n.contract.outputs[e];if(!(l?.type!=="event"||!$)&&!(l.close&&!k()))try{let O=ce($).parse(Object.hasOwn(l.properties,"value")?l.properties.value:l.properties);y=structuredClone({requestId:crypto.randomUUID(),contentVersionId:m.id,actionId:e,event:l.event,value:O,selection:s??{},answers:b??{},requestedClose:l.close}),Q()}catch(O){h(t.onError,O)}}}),w.update(E,J,{capabilities:x,serverInput:{bindings:q,answers:{},values:g}}),await Promise.race([w.ready,L]),f&&await L,i)throw new Error("Content preparation cancelled");return B}catch(e){throw U(e),e}}export{Ve as mountContent,Ae as prepareContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-MMHL2KFB.js";import"./chunk-H3LJWAAE.js";import"./chunk-NKYNGR3L.js";import"./chunk-KCG7GZXO.js";import"./chunk-XAPMQRVJ.js";import"./chunk-C4KLIT5L.js";import"./chunk-CHRNCOXJ.js";import"./chunk-7CZEXBQY.js";import"./chunk-VXNN3RV3.js";import"./chunk-VVBXVJI6.js";import"./chunk-7ZAM4YRK.js";import"./chunk-AEQUKR4O.js";import"./chunk-W32FI2A2.js";import"./chunk-CO6HDNOC.js";import"./chunk-XLGNBPGF.js";import"./chunk-EQUVI5QU.js";import"./chunk-FDXBCQBO.js";import"./chunk-F4AIEI5N.js";import"./chunk-S2S4ROGY.js";import"./chunk-Y55OBV7D.js";import"./chunk-MOIVJERE.js";import"./chunk-C4HLVYSU.js";import"./chunk-7QPCNDIY.js";import"./chunk-BT7IC765.js";import"./chunk-ME6QTD5Y.js";import"./chunk-6XRQR43F.js";import"./chunk-3532HSBP.js";import"./chunk-67WFVDTV.js";import"./chunk-KX67ZM7H.js";import"./chunk-6VVQWTHV.js";import"./chunk-VILB5M4X.js";import"./chunk-6QBSJRAD.js";import"./chunk-KCUE2VFJ.js";import"./chunk-Y3W5G4BF.js";import"./chunk-FYUMVOCV.js";import"./chunk-DUS5V65Z.js";import"./chunk-BOT6ZDLK.js";import"./chunk-A5WUQLAO.js";import"./chunk-UGATOG2T.js";import"./chunk-LFR2LWYC.js";import"./chunk-SLUA7ABW.js";import"./chunk-MB2U2GWJ.js";import"./chunk-3VUPVXAV.js";import"./chunk-FEU6XRHV.js";import"./chunk-5MRSFLQA.js";import"./chunk-W22ESUYY.js";import"./chunk-DSPLGTQI.js";import"./chunk-FYMVNLQN.js";import"./chunk-FRK6322O.js";import"./chunk-WOT6VMZA.js";export{a as showFunnelPurchase};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as x}from"./chunk-MMHL2KFB.js";import"./chunk-H3LJWAAE.js";import{a as T,c as A}from"./chunk-NKYNGR3L.js";import"./chunk-KCG7GZXO.js";import"./chunk-XAPMQRVJ.js";import"./chunk-C4KLIT5L.js";import"./chunk-CHRNCOXJ.js";import"./chunk-7CZEXBQY.js";import"./chunk-VXNN3RV3.js";import"./chunk-VVBXVJI6.js";import"./chunk-7ZAM4YRK.js";import"./chunk-AEQUKR4O.js";import"./chunk-W32FI2A2.js";import"./chunk-CO6HDNOC.js";import"./chunk-XLGNBPGF.js";import"./chunk-EQUVI5QU.js";import"./chunk-FDXBCQBO.js";import"./chunk-F4AIEI5N.js";import"./chunk-S2S4ROGY.js";import"./chunk-Y55OBV7D.js";import"./chunk-MOIVJERE.js";import"./chunk-C4HLVYSU.js";import"./chunk-7QPCNDIY.js";import"./chunk-BT7IC765.js";import"./chunk-ME6QTD5Y.js";import"./chunk-6XRQR43F.js";import"./chunk-3532HSBP.js";import"./chunk-67WFVDTV.js";import"./chunk-KX67ZM7H.js";import"./chunk-6VVQWTHV.js";import"./chunk-VILB5M4X.js";import"./chunk-6QBSJRAD.js";import"./chunk-KCUE2VFJ.js";import"./chunk-Y3W5G4BF.js";import"./chunk-FYUMVOCV.js";import"./chunk-DUS5V65Z.js";import"./chunk-BOT6ZDLK.js";import"./chunk-A5WUQLAO.js";import"./chunk-UGATOG2T.js";import"./chunk-LFR2LWYC.js";import"./chunk-SLUA7ABW.js";import"./chunk-MB2U2GWJ.js";import"./chunk-3VUPVXAV.js";import"./chunk-FEU6XRHV.js";import"./chunk-5MRSFLQA.js";import"./chunk-W22ESUYY.js";import{a as P}from"./chunk-DSPLGTQI.js";import"./chunk-FYMVNLQN.js";import"./chunk-FRK6322O.js";import"./chunk-WOT6VMZA.js";var D=.8;function N(l,n){let p=l.ownerDocument,v=new AbortController,c=AbortSignal.any([v.signal,n.client.identitySignal,...n.signal?[n.signal]:[]]),r,d,y,C=n.maxAgeMs??T,m=e=>P(n.onEvent,{at:performance.now(),...e});function f(e){e?.copy.destroy(),e?.select(void 0)}function E(){clearTimeout(y);let e=[r,d];r=d=void 0,e.forEach(f)}function O(){let e,t=new Promise(i=>{e=i}),o,a=A(l,{...n,start:t,signal:c,onState(i){m({type:"copy",state:i,...a.reason!==void 0&&{reason:a.reason},...o!==void 0&&{local:o}}),P(n.onState,i)}});return a.local.then(i=>o=i),{copy:a,select:e}}function u(){if(r||c.aborted||!l.isConnected||p.visibilityState==="hidden")return;let e=r=O();e.copy.ready.then(t=>{t&&r===e&&w()})}function w(){clearTimeout(y),y=setTimeout(()=>{if(!r||d||c.aborted)return;let e=d=O();e.copy.ready.then(t=>{if(d===e){if(d=void 0,!t||!r)return f(e);f(r),r=e,m({type:"renewed"}),w()}})},C*D)}function b(){p.visibilityState==="hidden"?E():u()}function R(){p.removeEventListener("visibilitychange",b),E()}function g(e){let t=e?.parameters?.commerce;return e?.funnelId===n.funnelId&&e.locale===n.locale&&t?.provider===n.commerce.provider&&t.currency===n.commerce.currency&&t.intent===n.commerce.intent}return c.aborted||(c.addEventListener("abort",R,{once:!0}),p.addEventListener("visibilitychange",b),u()),{open(e){if(c.aborted)return Promise.resolve(null);let t=r;r=void 0,clearTimeout(y),f(d),d=void 0;let o=t?.copy,a=e.start,i=!e.hostPaywallTarget&&e.allowNewPurchase!==!1&&(a instanceof Promise||g(a)),F=!1,h=s=>{F||(F=!0,m({type:"end",outcome:s}))};m({type:"open",copy:o?.state??"none",used:!!o&&i}),i||o?.destroy(),t?.select(i?a instanceof Promise?a.then(s=>{if(s&&!g(s)){o?.destroy();return}return s}):a:void 0);let S=x(l,{...e,client:n.client,prepared:i?o:void 0,signal:c,onDismiss(s){return h("dismissed"),queueMicrotask(u),e.onDismiss?.(s)}});return S.then(s=>{s||(h("nothing"),u())},()=>{h("error"),u()}),S},destroy(){v.abort()}}}export{N as createFunnelPurchaseEntry};
|
package/dist/{funnel-host-recovery-paywall-VTH7QU2M.js → funnel-host-recovery-paywall-XFL6JS74.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-KCG7GZXO.js";import"./chunk-XAPMQRVJ.js";import"./chunk-C4KLIT5L.js";import"./chunk-CHRNCOXJ.js";import"./chunk-AEQUKR4O.js";import"./chunk-W32FI2A2.js";import"./chunk-CO6HDNOC.js";import"./chunk-Y55OBV7D.js";import"./chunk-MOIVJERE.js";import"./chunk-ME6QTD5Y.js";import"./chunk-6XRQR43F.js";import"./chunk-3532HSBP.js";import"./chunk-67WFVDTV.js";import"./chunk-6VVQWTHV.js";import"./chunk-VILB5M4X.js";import"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-KCG7GZXO.js";import"./chunk-XAPMQRVJ.js";import"./chunk-C4KLIT5L.js";import"./chunk-CHRNCOXJ.js";import"./chunk-AEQUKR4O.js";import"./chunk-W32FI2A2.js";import"./chunk-CO6HDNOC.js";import"./chunk-Y55OBV7D.js";import"./chunk-MOIVJERE.js";import"./chunk-ME6QTD5Y.js";import"./chunk-6XRQR43F.js";import"./chunk-3532HSBP.js";import"./chunk-67WFVDTV.js";import"./chunk-6VVQWTHV.js";import"./chunk-VILB5M4X.js";import"./chunk-6QBSJRAD.js";import"./chunk-KCUE2VFJ.js";import"./chunk-Y3W5G4BF.js";import"./chunk-FYUMVOCV.js";import"./chunk-DUS5V65Z.js";import"./chunk-BOT6ZDLK.js";import"./chunk-A5WUQLAO.js";import"./chunk-UGATOG2T.js";import"./chunk-LFR2LWYC.js";import"./chunk-FEU6XRHV.js";import"./chunk-5MRSFLQA.js";import"./chunk-W22ESUYY.js";import"./chunk-DSPLGTQI.js";import"./chunk-FYMVNLQN.js";import"./chunk-FRK6322O.js";import"./chunk-WOT6VMZA.js";export{a as mountFunnelRecoveryPaywall,b as replaceableOriginalSession};
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
import { I as InvoiceModeParams, b as InvoiceModeParamsInput, A as ApiInput } from './api-KIp0I50M.js';
|
|
4
4
|
import { S as StackNode, a as ScreenSelection } from './screen-Pv_pViF6.js';
|
|
5
5
|
import { J as JsonValue, E as EvaluationContext, F as FeatureResult } from './growth-rules-B4YYy64R.js';
|
|
6
|
-
import { C as ConfigurationSync } from './configuration-sync-
|
|
6
|
+
import { C as ConfigurationSync } from './configuration-sync-BIDHJCL0.js';
|
|
7
7
|
|
|
8
8
|
declare const scopeSchema: z.ZodObject<{
|
|
9
9
|
projectId: z.ZodString;
|
|
@@ -46576,6 +46576,16 @@ declare function createFunnelRunController(options: FunnelRunControllerOptions):
|
|
|
46576
46576
|
};
|
|
46577
46577
|
generation: string;
|
|
46578
46578
|
}>;
|
|
46579
|
+
funnelPaywallPins: (funnelId: string) => Promise<{
|
|
46580
|
+
pins: {
|
|
46581
|
+
kind: "funnel_paywall_pins";
|
|
46582
|
+
formatVersion: 1;
|
|
46583
|
+
funnelId: string;
|
|
46584
|
+
versionId: string;
|
|
46585
|
+
paywalls: Record<string, string[]>;
|
|
46586
|
+
};
|
|
46587
|
+
generation: string;
|
|
46588
|
+
}>;
|
|
46579
46589
|
paywall: (paywallId: string, versionId?: string) => Promise<{
|
|
46580
46590
|
document: {
|
|
46581
46591
|
kind: "paywall";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a}from"./chunk-W22ESUYY.js";import"./chunk-WOT6VMZA.js";var l={paywalls:200,versionsPerPaywall:200,maxBytes:65536},n=a.object({kind:a.literal("funnel_paywall_pins"),formatVersion:a.literal(1),funnelId:a.uuid(),versionId:a.uuid(),paywalls:a.record(a.uuid(),a.array(a.uuid()).min(1).max(l.versionsPerPaywall)).refine(e=>Object.keys(e).length<=l.paywalls,"Too many Paywalls")});export{l as FUNNEL_PAYWALL_PINS_LIMITS,n as funnelPaywallPinsSchema};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-
|
|
1
|
+
import{a,b,c,d}from"./chunk-NKYNGR3L.js";import"./chunk-7CZEXBQY.js";import"./chunk-VXNN3RV3.js";import"./chunk-MOIVJERE.js";import"./chunk-3532HSBP.js";import"./chunk-67WFVDTV.js";import"./chunk-KX67ZM7H.js";import"./chunk-6VVQWTHV.js";import"./chunk-VILB5M4X.js";import"./chunk-KCUE2VFJ.js";import"./chunk-FYUMVOCV.js";import"./chunk-DUS5V65Z.js";import"./chunk-BOT6ZDLK.js";import"./chunk-A5WUQLAO.js";import"./chunk-UGATOG2T.js";import"./chunk-LFR2LWYC.js";import"./chunk-W22ESUYY.js";import"./chunk-DSPLGTQI.js";import"./chunk-FYMVNLQN.js";import"./chunk-FRK6322O.js";import"./chunk-WOT6VMZA.js";export{a as PRERENDER_MAX_AGE_MS,b as preparedInternals,c as prerenderFunnelPurchase,d as prerenderRunPaywall};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as zod from 'zod';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { n as FeatureClientOptions, I as IndianaOptions, C as CustomerSession, R as RemoteFeatureResult, O as PushAddressObservation, d as FunnelStartInput, r as FunnelRuntimeResponse, o as FunnelControllerResponse, B as createFunnelRunController, Q as FunnelProcessOpenInput, T as FunnelProcessResponse, U as FunnelCommand, V as FunnelProcessMutation, W as FunnelPageExperimentsResponse, k as FunnelProcessRunView, h as FunnelRunController } from './funnel-local-client-
|
|
3
|
+
import { n as FeatureClientOptions, I as IndianaOptions, C as CustomerSession, R as RemoteFeatureResult, O as PushAddressObservation, d as FunnelStartInput, r as FunnelRuntimeResponse, o as FunnelControllerResponse, B as createFunnelRunController, Q as FunnelProcessOpenInput, T as FunnelProcessResponse, U as FunnelCommand, V as FunnelProcessMutation, W as FunnelPageExperimentsResponse, k as FunnelProcessRunView, h as FunnelRunController } from './funnel-local-client-B5AJpV3L.js';
|
|
4
4
|
import { A as ApiInput, O as OfferingItem, I as InvoiceModeParams, a as ApiOutput } from './api-KIp0I50M.js';
|
|
5
5
|
import { O as Offer } from './coupon-kfkIVf9n.js';
|
|
6
6
|
import { S as StackNode } from './screen-Pv_pViF6.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-H3LJWAAE.js";import"./chunk-NKYNGR3L.js";import"./chunk-C4KLIT5L.js";import"./chunk-CHRNCOXJ.js";import"./chunk-7CZEXBQY.js";import"./chunk-VXNN3RV3.js";import"./chunk-7ZAM4YRK.js";import"./chunk-AEQUKR4O.js";import"./chunk-W32FI2A2.js";import"./chunk-CO6HDNOC.js";import"./chunk-F4AIEI5N.js";import"./chunk-Y55OBV7D.js";import"./chunk-MOIVJERE.js";import"./chunk-ME6QTD5Y.js";import"./chunk-6XRQR43F.js";import"./chunk-3532HSBP.js";import"./chunk-67WFVDTV.js";import"./chunk-KX67ZM7H.js";import"./chunk-6VVQWTHV.js";import"./chunk-VILB5M4X.js";import"./chunk-6QBSJRAD.js";import"./chunk-KCUE2VFJ.js";import"./chunk-Y3W5G4BF.js";import"./chunk-FYUMVOCV.js";import"./chunk-DUS5V65Z.js";import"./chunk-BOT6ZDLK.js";import"./chunk-A5WUQLAO.js";import"./chunk-UGATOG2T.js";import"./chunk-LFR2LWYC.js";import"./chunk-SLUA7ABW.js";import"./chunk-MB2U2GWJ.js";import"./chunk-FEU6XRHV.js";import"./chunk-5MRSFLQA.js";import"./chunk-W22ESUYY.js";import"./chunk-DSPLGTQI.js";import"./chunk-FYMVNLQN.js";import"./chunk-FRK6322O.js";import"./chunk-WOT6VMZA.js";export{a as showFunnelRun,b as showObservedFunnelRun};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { S as ScreenAnswers, P as PresentationLoadingOptions, s as screenInputBindingsSchema, a as SurfaceData, b as PaywallLoadingDocument, C as CustomerDataIntent, c as createPresentationLoading, R as RetainedPurchaseDialog } from './presentation-loading-CU4c-koG.js';
|
|
3
|
-
export { d as PresentationState } from './presentation-loading-CU4c-koG.js';
|
|
2
|
+
import { S as ScreenAnswers, P as PresentationLoadingOptions, s as screenInputBindingsSchema, a as SurfaceData, b as PaywallLoadingDocument, C as CustomerDataIntent, c as createPresentationLoading, d as PresentationState, R as RetainedPurchaseDialog } from './presentation-loading-CU4c-koG.js';
|
|
4
3
|
import { J as JsonValue } from './growth-rules-B4YYy64R.js';
|
|
5
4
|
import { S as StackNode, a as ScreenSelection } from './screen-Pv_pViF6.js';
|
|
6
5
|
import { C as CouponInput, O as Offer } from './coupon-kfkIVf9n.js';
|
|
7
6
|
export { a as OfferUnavailableReason } from './coupon-kfkIVf9n.js';
|
|
8
|
-
import { P as PaywallSession, a as PaywallOperation, b as PaywallResolution, c as PaywallSubscriptionChange, F as FunnelCommandStorage, s as scopeSchema, d as FunnelStartInput, I as IndianaOptions, S as SessionCredentials, e as FunnelExecutionPolicy, f as PaywallRecovery, g as PaywallQuote, h as FunnelRunController, i as FunnelRunView, j as IamFunnelEntryDelivery, k as FunnelProcessRunView, l as createPaywallSession$1 } from './funnel-local-client-
|
|
9
|
-
export { C as CustomerSession, m as FeatureClient, n as FeatureClientOptions, o as FunnelControllerResponse, p as FunnelPendingEntry, q as FunnelPurchaseRecovery, r as FunnelRuntimeResponse, t as FunnelSegmentPrediction, L as LocalFunnelClient, u as LocalFunnelClientOptions, v as LongplayError, w as PaywallPurchaseInput, x as PaywallStartInput, y as PushHost, z as PushJournal, A as createFeatureClient, B as createFunnelRunController, D as createLocalFunnelClient, E as getPaywallRecovery, G as isPaywallOperationComplete, H as isPaywallOperationPending, J as isPaywallUpdateOperation, K as isPaywallUpdateQuote, M as preparePaywallFallback } from './funnel-local-client-
|
|
7
|
+
import { P as PaywallSession, a as PaywallOperation, b as PaywallResolution, c as PaywallSubscriptionChange, F as FunnelCommandStorage, s as scopeSchema, d as FunnelStartInput, I as IndianaOptions, S as SessionCredentials, e as FunnelExecutionPolicy, f as PaywallRecovery, g as PaywallQuote, h as FunnelRunController, i as FunnelRunView, j as IamFunnelEntryDelivery, k as FunnelProcessRunView, l as createPaywallSession$1 } from './funnel-local-client-B5AJpV3L.js';
|
|
8
|
+
export { C as CustomerSession, m as FeatureClient, n as FeatureClientOptions, o as FunnelControllerResponse, p as FunnelPendingEntry, q as FunnelPurchaseRecovery, r as FunnelRuntimeResponse, t as FunnelSegmentPrediction, L as LocalFunnelClient, u as LocalFunnelClientOptions, v as LongplayError, w as PaywallPurchaseInput, x as PaywallStartInput, y as PushHost, z as PushJournal, A as createFeatureClient, B as createFunnelRunController, D as createLocalFunnelClient, E as getPaywallRecovery, G as isPaywallOperationComplete, H as isPaywallOperationPending, J as isPaywallUpdateOperation, K as isPaywallUpdateQuote, M as preparePaywallFallback } from './funnel-local-client-B5AJpV3L.js';
|
|
10
9
|
import { E as EntitlementCheckResult, M as MerchantBridgeManifest } from './funnel-node-evaluation-COIh1hKs.js';
|
|
11
10
|
export { a as EntitlementCheckInput, b as EntitlementCheckObservation, c as EntitlementRequirement, F as FunnelNodeEvaluationContext, e as evaluateFunnelNode } from './funnel-node-evaluation-COIh1hKs.js';
|
|
12
|
-
import { C as ConfigurationSync } from './configuration-sync-
|
|
13
|
-
export { a as ConfigurationStorage, b as ConfigurationSyncOptions, c as createConfigurationSync } from './configuration-sync-
|
|
14
|
-
import { c as createFunnelProcess } from './funnel-process-client-
|
|
15
|
-
export { F as FunnelProcessAdapter, a as FunnelProcessOptions, b as FunnelResourceSource, I as LongplayFeatureOptions, d as createFunnelClient, e as createLongplay } from './funnel-process-client-
|
|
11
|
+
import { C as ConfigurationSync } from './configuration-sync-BIDHJCL0.js';
|
|
12
|
+
export { a as ConfigurationStorage, b as ConfigurationSyncOptions, c as createConfigurationSync } from './configuration-sync-BIDHJCL0.js';
|
|
13
|
+
import { c as createFunnelProcess } from './funnel-process-client-DX6W2Cij.js';
|
|
14
|
+
export { F as FunnelProcessAdapter, a as FunnelProcessOptions, b as FunnelResourceSource, I as LongplayFeatureOptions, d as createFunnelClient, e as createLongplay } from './funnel-process-client-DX6W2Cij.js';
|
|
16
15
|
import './api-KIp0I50M.js';
|
|
17
16
|
import 'zod/v4';
|
|
18
17
|
|
|
@@ -2913,13 +2912,14 @@ declare function prerenderFunnelPurchase$1(container: HTMLElement, input: {
|
|
|
2913
2912
|
* With one, a Start the route sends elsewhere (another Paywall, a screen, an end, a paused
|
|
2914
2913
|
* Funnel) makes the copy unavailable and forgets the kept copy, so that Customer is never shown
|
|
2915
2914
|
* it first; a route that cannot be read (not published, a failed read) changes nothing.
|
|
2916
|
-
* With `paywallId`, a
|
|
2917
|
-
*
|
|
2915
|
+
* With `paywallId`, a Funnel Version that fixes that Paywall at one Version makes the copy
|
|
2916
|
+
* that Version, the one the Run will present, instead of the current published one. Every
|
|
2917
|
+
* Funnel in the public selection publishes these pins; no route consent is needed.
|
|
2918
2918
|
*/
|
|
2919
2919
|
configuration?: ConfigurationSync;
|
|
2920
2920
|
/**
|
|
2921
|
-
* The Funnel of the Start, for reading its route before a `start` promise
|
|
2922
|
-
*
|
|
2921
|
+
* The Funnel of the Start, for reading its route or Paywall pins before a `start` promise
|
|
2922
|
+
* settles. Without it they are read once the Start is known.
|
|
2923
2923
|
*/
|
|
2924
2924
|
funnelId?: string;
|
|
2925
2925
|
/** Required while `start` is a promise: the Start's commerce and locale. */
|
|
@@ -3843,6 +3843,62 @@ type Host = Omit<RunHost, "retainPurchaseDialog" | "recoveryPaywall" | "setPurch
|
|
|
3843
3843
|
*/
|
|
3844
3844
|
declare function showFunnelPurchase$1(container: HTMLElement, options: FunnelPurchaseHostOptions): Promise<Host | null>;
|
|
3845
3845
|
|
|
3846
|
+
type Preparation = Parameters<typeof prerenderFunnelPurchase$1>[1];
|
|
3847
|
+
type FunnelPurchaseEntryOptions = Omit<Preparation, "start" | "funnelId" | "commerce" | "locale"> & Required<Pick<Preparation, "funnelId" | "commerce" | "locale">> & ({
|
|
3848
|
+
paywallId: string;
|
|
3849
|
+
} | {
|
|
3850
|
+
paywallVersionId: string;
|
|
3851
|
+
}) & {
|
|
3852
|
+
/**
|
|
3853
|
+
* Every change of the entry's prepared copy and every opening, with the reason the SDK has
|
|
3854
|
+
* for it. For diagnostics and timing: it never changes what the entry does.
|
|
3855
|
+
*/
|
|
3856
|
+
onEvent?(event: FunnelPurchaseEntryEvent): void;
|
|
3857
|
+
};
|
|
3858
|
+
/** What a registered entry did, at `at` milliseconds on the page's clock (`performance.now()`). */
|
|
3859
|
+
type FunnelPurchaseEntryEvent = {
|
|
3860
|
+
at: number;
|
|
3861
|
+
} & ({
|
|
3862
|
+
/** A prepared copy changed state. `local` is set once known: painted from the device copy. */
|
|
3863
|
+
type: "copy";
|
|
3864
|
+
state: PreparedState;
|
|
3865
|
+
reason?: string;
|
|
3866
|
+
local?: boolean;
|
|
3867
|
+
} | {
|
|
3868
|
+
/** A copy near the end of its price age was replaced by a newly painted one. */
|
|
3869
|
+
type: "renewed";
|
|
3870
|
+
} | {
|
|
3871
|
+
/**
|
|
3872
|
+
* `open()` was called. `copy` is what the click found; `used` is false when the opening
|
|
3873
|
+
* could not take it (another scope, a host Paywall target, no new purchase allowed).
|
|
3874
|
+
*/
|
|
3875
|
+
type: "open";
|
|
3876
|
+
copy: PreparedState | "none";
|
|
3877
|
+
used: boolean;
|
|
3878
|
+
} | {
|
|
3879
|
+
/** The opening ended: presented and later dismissed, presented nothing, or failed. */
|
|
3880
|
+
type: "end";
|
|
3881
|
+
outcome: "dismissed" | "nothing" | "error";
|
|
3882
|
+
});
|
|
3883
|
+
type OpenOptions = Omit<FunnelPurchaseHostOptions, "client" | "prepared" | "signal">;
|
|
3884
|
+
/**
|
|
3885
|
+
* Keeps a prepared Paywall for a visible merchant entry. The caller supplies the final Start
|
|
3886
|
+
* at the click. The prepared copy paints display data; the purchase host still owns recovery
|
|
3887
|
+
* and execution.
|
|
3888
|
+
*/
|
|
3889
|
+
declare function createFunnelPurchaseEntry$1(container: HTMLElement, options: FunnelPurchaseEntryOptions): {
|
|
3890
|
+
open(opening: OpenOptions): Promise<{
|
|
3891
|
+
readonly recovery: PaywallRecovery;
|
|
3892
|
+
refresh: () => Promise<void>;
|
|
3893
|
+
destroy: () => void;
|
|
3894
|
+
prepareFallback: () => Promise<PaywallRecovery>;
|
|
3895
|
+
review: (receiptId?: string) => Promise<void>;
|
|
3896
|
+
exitReview: () => Promise<void>;
|
|
3897
|
+
readonly unappliedDrafts: Map<string, Record<string, string | boolean | string[]>>;
|
|
3898
|
+
} | null>;
|
|
3899
|
+
destroy(): void;
|
|
3900
|
+
};
|
|
3901
|
+
|
|
3846
3902
|
declare class MerchantBridgeError extends Error {
|
|
3847
3903
|
readonly code: string;
|
|
3848
3904
|
readonly status: number;
|
|
@@ -5369,6 +5425,63 @@ declare function prerenderFunnelPurchase(...args: Parameters<typeof prerenderFun
|
|
|
5369
5425
|
*/
|
|
5370
5426
|
declare function preloadFunnelPurchase(): Promise<void>;
|
|
5371
5427
|
|
|
5428
|
+
/** Prepares the Paywall of a merchant entry and refreshes its preview after dismissal. */
|
|
5429
|
+
declare function createFunnelPurchaseEntry(...args: Parameters<typeof createFunnelPurchaseEntry$1>): Promise<{
|
|
5430
|
+
open(opening: {
|
|
5431
|
+
start?: (FunnelPurchaseStart | Promise<FunnelPurchaseStart | null | undefined>) | undefined;
|
|
5432
|
+
resolveOfferId?: ((purchase: Parameters<NonNullable<FunnelHostOptions["resolveOfferId"]>>[0], attempt: FunnelPurchaseAttempt) => ReturnType<NonNullable<FunnelHostOptions["resolveOfferId"]>>) | undefined;
|
|
5433
|
+
loading?: "sdk" | "host" | undefined;
|
|
5434
|
+
onPresentationState?: ((state: PresentationState) => void) | undefined;
|
|
5435
|
+
hostPaywallTarget?: HTMLElement | undefined;
|
|
5436
|
+
closeActions?: readonly string[] | undefined;
|
|
5437
|
+
prepareNextPaywall?: ((input: {
|
|
5438
|
+
run: FunnelRunView;
|
|
5439
|
+
paywallVersionId: string;
|
|
5440
|
+
}) => PreparedFunnelPurchase | undefined) | undefined;
|
|
5441
|
+
appManifestRelease?: string | undefined;
|
|
5442
|
+
mountPaywallControls?: ((container: HTMLElement, run: FunnelRunView) => void | (() => void)) | undefined;
|
|
5443
|
+
onPurchaseIntent?: ((intent: PaywallPurchaseIntent, run: FunnelRunView) => unknown | Promise<unknown>) | undefined;
|
|
5444
|
+
onPurchase?: ((request: {
|
|
5445
|
+
operation: PaywallOperation;
|
|
5446
|
+
signal: AbortSignal;
|
|
5447
|
+
}) => unknown | Promise<unknown>) | undefined;
|
|
5448
|
+
onCheckoutUrl?: ((url: string) => unknown) | undefined;
|
|
5449
|
+
allowNewPurchase?: boolean | undefined;
|
|
5450
|
+
beforeCheckoutReplacement?: ((intent: PaywallPurchaseIntent) => void | Promise<void>) | undefined;
|
|
5451
|
+
purchaseConfirmation?: "paywall" | "purchase_button" | undefined;
|
|
5452
|
+
confirmOnHostedCheckout?: boolean | undefined;
|
|
5453
|
+
prepareSubscriptionChange?: ((signal: AbortSignal) => Promise<(purchase: Pick<PaywallPurchaseIntent, "productVersionId" | "actionId"> & {
|
|
5454
|
+
featureQuantities: Readonly<Record<string, number>>;
|
|
5455
|
+
}) => PaywallSubscriptionChange | undefined | Promise<PaywallSubscriptionChange | undefined>>) | undefined;
|
|
5456
|
+
resolveSubscriptionChange?: ((purchase: Pick<PaywallPurchaseIntent, "productVersionId" | "actionId"> & {
|
|
5457
|
+
featureQuantities: Readonly<Record<string, number>>;
|
|
5458
|
+
}, readPrepared?: () => Promise<PaywallSubscriptionChange | undefined>) => PaywallSubscriptionChange | undefined | Promise<PaywallSubscriptionChange | undefined>) | undefined;
|
|
5459
|
+
claimCoupon?: ((couponId: string, requestId: string) => Promise<{
|
|
5460
|
+
offer: Offer | null;
|
|
5461
|
+
}>) | undefined;
|
|
5462
|
+
onOpenUrl?: ((instruction: {
|
|
5463
|
+
receiptId: string;
|
|
5464
|
+
url: string;
|
|
5465
|
+
openIn: FunnelOpenIn;
|
|
5466
|
+
}) => unknown) | undefined;
|
|
5467
|
+
onEvent?: ((name: string) => unknown) | undefined;
|
|
5468
|
+
onCustomerDataIntent?: ((intent: CustomerDataIntent, run: FunnelRunView) => unknown) | undefined;
|
|
5469
|
+
onState?: ((run: FunnelRunView) => unknown) | undefined;
|
|
5470
|
+
onComplete?: ((run: FunnelRunView) => unknown) | undefined;
|
|
5471
|
+
onDismiss?: ((run: FunnelRunView | null) => unknown) | undefined;
|
|
5472
|
+
onError?: ((error: unknown) => unknown) | undefined;
|
|
5473
|
+
loadingDocument?: PaywallLoadingDocument | undefined;
|
|
5474
|
+
}): Promise<{
|
|
5475
|
+
readonly recovery: PaywallRecovery;
|
|
5476
|
+
refresh: () => Promise<void>;
|
|
5477
|
+
destroy: () => void;
|
|
5478
|
+
prepareFallback: () => Promise<PaywallRecovery>;
|
|
5479
|
+
review: (receiptId?: string) => Promise<void>;
|
|
5480
|
+
exitReview: () => Promise<void>;
|
|
5481
|
+
readonly unappliedDrafts: Map<string, Record<string, string | boolean | string[]>>;
|
|
5482
|
+
} | null>;
|
|
5483
|
+
destroy(): void;
|
|
5484
|
+
}>;
|
|
5372
5485
|
/**
|
|
5373
5486
|
* Which first screen a Run of a Funnel would present for this Customer and Start, computed on the
|
|
5374
5487
|
* device from the Funnel's published route. Records nothing; the Run started at the click
|
|
@@ -5583,4 +5696,4 @@ declare function prepareContent(...args: Parameters<typeof prepareContent$1>): P
|
|
|
5583
5696
|
updateCapabilities(data: SurfaceData): void;
|
|
5584
5697
|
}>;
|
|
5585
5698
|
|
|
5586
|
-
export { ConfigurationSync, 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 FunnelStartPrediction, type IamFunnelEntriesOptions, type IamFunnelProcessEntriesOptions, IndianaOptions as LongplayOptions, MerchantBridgeError, type MerchantBridgeOptions, Offer, type PaywallHostOptions, PaywallLoadingDocument, PaywallOperation, type PaywallPurchaseIntent, PaywallQuote, PaywallRecovery, PaywallSession, PaywallSubscriptionChange, type PreparedFunnelPurchase, type PreparedState, PresentationLoadingOptions, SessionCredentials, createBrowserFunnelCommandStorage, createBrowserFunnelPurchaseStorage, createFunnelPageExperiments, createFunnelProcess, createFunnelPurchaseClient, createIamFunnelEntries, createIamFunnelProcessEntries, createMerchantBridge, createPaywallSession, formatCouponDiscount, formatCouponMoney, formatCouponTerms, mountContent, mountFunnelRecoveryPaywall, predictFunnelStart, predictedPaywallLoadingDocument, preloadFunnelPurchase, preloadPaywall, prepareContent, prerenderFunnelPurchase, showFunnelPurchase, showFunnelRun, showPaywall };
|
|
5699
|
+
export { ConfigurationSync, type ContentActionIntent, type ContentHostOptions, EntitlementCheckResult, FunnelCommandStorage, FunnelExecutionPolicy, type FunnelHostOptions, type FunnelPurchaseAttempt, type FunnelPurchaseClient, type FunnelPurchaseEntry, type FunnelPurchaseEntryEvent, type FunnelPurchaseEntryOptions, type FunnelPurchaseHostOptions, type FunnelPurchaseOptions, type FunnelPurchaseStart, type FunnelPurchaseState, type FunnelPurchaseStorage, FunnelRunController, type FunnelStartPrediction, type IamFunnelEntriesOptions, type IamFunnelProcessEntriesOptions, IndianaOptions as LongplayOptions, MerchantBridgeError, type MerchantBridgeOptions, Offer, type PaywallHostOptions, PaywallLoadingDocument, PaywallOperation, type PaywallPurchaseIntent, PaywallQuote, PaywallRecovery, PaywallSession, PaywallSubscriptionChange, type PreparedFunnelPurchase, type PreparedState, PresentationLoadingOptions, PresentationState, SessionCredentials, createBrowserFunnelCommandStorage, createBrowserFunnelPurchaseStorage, createFunnelPageExperiments, createFunnelProcess, createFunnelPurchaseClient, createFunnelPurchaseEntry, createIamFunnelEntries, createIamFunnelProcessEntries, createMerchantBridge, createPaywallSession, formatCouponDiscount, formatCouponMoney, formatCouponTerms, mountContent, mountFunnelRecoveryPaywall, predictFunnelStart, predictedPaywallLoadingDocument, preloadFunnelPurchase, preloadPaywall, prepareContent, prerenderFunnelPurchase, showFunnelPurchase, showFunnelRun, showPaywall };
|