@beamimpact/web-sdk 1.54.2 → 1.54.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{_share-dialog-dependencies-CwQxKtg2.esm.js → _share-dialog-dependencies-DQlABdY4.esm.js} +2 -2
- package/dist/chunks/{_share-dialog-dependencies-CwQxKtg2.esm.js.map → _share-dialog-dependencies-DQlABdY4.esm.js.map} +1 -1
- package/dist/chunks/{_share-dialog-dependencies-BXp5YnfR.esm.js → _share-dialog-dependencies-Dg-9riak.esm.js} +2 -2
- package/dist/chunks/{_share-dialog-dependencies-BXp5YnfR.esm.js.map → _share-dialog-dependencies-Dg-9riak.esm.js.map} +1 -1
- package/dist/chunks/{events-D7Q2jJgz.esm.d.ts → events-C55rozsO.esm.d.ts} +19 -3
- package/dist/chunks/events-Dki0ka4F.esm.js +2 -0
- package/dist/chunks/{events-DahlkyxO.esm.js.map → events-Dki0ka4F.esm.js.map} +1 -1
- package/dist/chunks/{index-CuzElPMZ.esm.d.ts → index-B6EWjlNI.esm.d.ts} +1 -1
- package/dist/chunks/index-B9cvR1bA.esm.js +2 -0
- package/dist/chunks/index-B9cvR1bA.esm.js.map +1 -0
- package/dist/chunks/index-BBU6h_u0.esm.js +2 -0
- package/dist/chunks/index-BBU6h_u0.esm.js.map +1 -0
- package/dist/chunks/index-BJWJMzYy.esm.js +2 -0
- package/dist/chunks/index-BJWJMzYy.esm.js.map +1 -0
- package/dist/chunks/index-BXVkhkpJ.esm.js +2 -0
- package/dist/chunks/index-BXVkhkpJ.esm.js.map +1 -0
- package/dist/chunks/{index--NDbk-eE.esm.js → index-Bp9sWMsk.esm.js} +2 -2
- package/dist/chunks/{index--NDbk-eE.esm.js.map → index-Bp9sWMsk.esm.js.map} +1 -1
- package/dist/chunks/{index-Bydn4zMN.esm.js → index-BzcA5RKX.esm.js} +2 -2
- package/dist/chunks/{index-Bydn4zMN.esm.js.map → index-BzcA5RKX.esm.js.map} +1 -1
- package/dist/chunks/{index-CeYpLstb.esm.js → index-CGKJagBi.esm.js} +2 -2
- package/dist/chunks/index-CGKJagBi.esm.js.map +1 -0
- package/dist/chunks/{index-Ls4pNA_r.esm.js → index-Cb7X_azQ.esm.js} +2 -2
- package/dist/chunks/{index-Ls4pNA_r.esm.js.map → index-Cb7X_azQ.esm.js.map} +1 -1
- package/dist/chunks/{index-MKr3f8W9.esm.js → index-Ct1m4IjM.esm.js} +2 -2
- package/dist/chunks/index-Ct1m4IjM.esm.js.map +1 -0
- package/dist/chunks/{index-DDNrz43j.esm.js → index-DA4pws6n.esm.js} +2 -2
- package/dist/chunks/{index-DDNrz43j.esm.js.map → index-DA4pws6n.esm.js.map} +1 -1
- package/dist/chunks/{index-Co6Pvowh.esm.js → index-DBb5HSkR.esm.js} +2 -2
- package/dist/chunks/index-DBb5HSkR.esm.js.map +1 -0
- package/dist/chunks/{index-C-TP8NdG.esm.d.ts → index-DjSzY8-j.esm.d.ts} +1 -1
- package/dist/chunks/index-Dw8XJ6pi.esm.js +2 -0
- package/dist/chunks/index-Dw8XJ6pi.esm.js.map +1 -0
- package/dist/chunks/{index-E5gX8_N2.esm.js → index-MGQHF6Jd.esm.js} +2 -2
- package/dist/chunks/index-MGQHF6Jd.esm.js.map +1 -0
- package/dist/chunks/{index-CCRz-5hA.esm.d.ts → index-OTDSwrqr.esm.d.ts} +1 -1
- package/dist/chunks/index-VrM10qBv.esm.js +2 -0
- package/dist/chunks/index-VrM10qBv.esm.js.map +1 -0
- package/dist/chunks/{index-XTzV546k.esm.js → index-ayo08Z4n.esm.js} +2 -2
- package/dist/chunks/index-ayo08Z4n.esm.js.map +1 -0
- package/dist/chunks/{index-rO_5zds6.esm.js → index-tbwbkOdj.esm.js} +2 -2
- package/dist/chunks/index-tbwbkOdj.esm.js.map +1 -0
- package/dist/chunks/order-page-Bowqodk5.esm.js +2 -0
- package/dist/chunks/order-page-Bowqodk5.esm.js.map +1 -0
- package/dist/chunks/order-page-C2wPfn6k.esm.js +2 -0
- package/dist/chunks/order-page-C2wPfn6k.esm.js.map +1 -0
- package/dist/chunks/{routes-Ck-AZVsH.esm.js → routes-DCT5U9dA.esm.js} +2 -2
- package/dist/chunks/{routes-Ck-AZVsH.esm.js.map → routes-DCT5U9dA.esm.js.map} +1 -1
- package/dist/chunks/{routes-Bw7hn3RL.esm.js → routes-DelUpFFo.esm.js} +2 -2
- package/dist/chunks/{routes-Bw7hn3RL.esm.js.map → routes-DelUpFFo.esm.js.map} +1 -1
- package/dist/chunks/{share-button-BopORXeO.esm.js → share-button-7um4cBYz.esm.js} +2 -2
- package/dist/chunks/{share-button-BopORXeO.esm.js.map → share-button-7um4cBYz.esm.js.map} +1 -1
- package/dist/chunks/{share-button-BupVxILq.esm.js → share-button-B376j4qt.esm.js} +2 -2
- package/dist/chunks/{share-button-BupVxILq.esm.js.map → share-button-B376j4qt.esm.js.map} +1 -1
- package/dist/chunks/{share-button-gAbnieb4.esm.js → share-button-BEXn6SRs.esm.js} +2 -2
- package/dist/chunks/{share-button-gAbnieb4.esm.js.map → share-button-BEXn6SRs.esm.js.map} +1 -1
- package/dist/chunks/{share-button-G4zNdeOS.esm.js → share-button-BZ9Dmpsy.esm.js} +2 -2
- package/dist/chunks/{share-button-G4zNdeOS.esm.js.map → share-button-BZ9Dmpsy.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-CmyZ_Qmv.esm.js → update-cart-BGAM3i5j.esm.js} +2 -2
- package/dist/chunks/{update-cart-CmyZ_Qmv.esm.js.map → update-cart-BGAM3i5j.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-DhgjSmWJ.esm.js → update-cart-pMo1b75q.esm.js} +2 -2
- package/dist/chunks/{update-cart-DhgjSmWJ.esm.js.map → update-cart-pMo1b75q.esm.js.map} +1 -1
- package/dist/components/community-impact.esm.js +1 -1
- package/dist/components/community-impact.js +1 -1
- package/dist/components/cumulative-impact.esm.js +1 -1
- package/dist/components/cumulative-impact.js +1 -1
- package/dist/components/impact-overview.esm.js +1 -1
- package/dist/components/impact-overview.js +1 -1
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/post-purchase.esm.js +1 -1
- package/dist/components/post-purchase.js +1 -1
- package/dist/components/product-details-page.esm.js +1 -1
- package/dist/components/product-details-page.js +1 -1
- package/dist/components/redeem-transaction.esm.js +1 -1
- package/dist/components/redeem-transaction.js +1 -1
- package/dist/components/select-nonprofit.esm.js +21 -21
- package/dist/components/select-nonprofit.esm.js.map +1 -1
- package/dist/components/select-nonprofit.js +21 -21
- package/dist/components/select-nonprofit.js.map +1 -1
- package/dist/components/select-subscription-nonprofit.esm.js +1 -1
- package/dist/components/select-subscription-nonprofit.js +1 -1
- package/dist/components/shopify.d.ts +1 -1
- package/dist/components/shopify.esm.js +1 -1
- package/dist/components/shopify.esm.js.map +1 -1
- package/dist/components/shopify.js +1 -1
- package/dist/components/shopify.js.map +1 -1
- package/dist/components/social-share.esm.js +1 -1
- package/dist/components/social-share.js +1 -1
- package/dist/components/subscription-impact.esm.js +1 -1
- package/dist/components/subscription-impact.js +1 -1
- package/dist/components/subscription-management.esm.js +1 -1
- package/dist/components/subscription-management.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/integrations/beam.esm.js +1 -1
- package/dist/integrations/beam.js +1 -1
- package/dist/integrations/cart.esm.js +1 -1
- package/dist/integrations/cart.js +1 -1
- package/dist/integrations/index.d.ts +2 -2
- package/dist/integrations/index.esm.js +1 -1
- package/dist/integrations/index.js +1 -1
- package/dist/integrations/logs.esm.js +1 -1
- package/dist/integrations/logs.js +1 -1
- package/dist/integrations/promoManager.esm.js +1 -1
- package/dist/integrations/promoManager.js +1 -1
- package/dist/integrations/shopify.esm.js +1 -1
- package/dist/integrations/shopify.js +1 -1
- package/dist/integrations/statsig.esm.js +1 -1
- package/dist/integrations/statsig.js +1 -1
- package/dist/integrations/utils.d.ts +1 -1
- package/dist/integrations/utils.esm.js +1 -1
- package/dist/integrations/utils.js +1 -1
- package/dist/react/community-impact.esm.js +1 -1
- package/dist/react/community-impact.js +1 -1
- package/dist/react/cumulative-impact.esm.js +1 -1
- package/dist/react/cumulative-impact.js +1 -1
- package/dist/react/impact-overview.esm.js +1 -1
- package/dist/react/impact-overview.js +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.esm.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/post-purchase.esm.js +1 -1
- package/dist/react/post-purchase.js +1 -1
- package/dist/react/product-details-page.esm.js +1 -1
- package/dist/react/product-details-page.js +1 -1
- package/dist/react/redeem-transaction.d.ts +1 -1
- package/dist/react/redeem-transaction.esm.js +1 -1
- package/dist/react/redeem-transaction.js +1 -1
- package/dist/react/select-nonprofit.d.ts +1 -1
- package/dist/react/select-nonprofit.esm.js +1 -1
- package/dist/react/select-nonprofit.js +1 -1
- package/dist/react/select-subscription-nonprofit.d.ts +1 -1
- package/dist/react/select-subscription-nonprofit.esm.js +1 -1
- package/dist/react/select-subscription-nonprofit.js +1 -1
- package/dist/react/social-share.esm.js +1 -1
- package/dist/react/social-share.js +1 -1
- package/dist/react/subscription-impact.esm.js +1 -1
- package/dist/react/subscription-impact.js +1 -1
- package/dist/react/subscription-management.esm.js +1 -1
- package/dist/react/subscription-management.js +1 -1
- package/dist/utils/events.d.ts +1 -1
- package/dist/utils/events.esm.js +1 -1
- package/dist/utils/events.js +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.esm.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/network-listeners.esm.js +1 -1
- package/dist/utils/network-listeners.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/events-DahlkyxO.esm.js +0 -2
- package/dist/chunks/index-B7ij5jz8.esm.js +0 -2
- package/dist/chunks/index-B7ij5jz8.esm.js.map +0 -1
- package/dist/chunks/index-C2KsnRGC.esm.js +0 -2
- package/dist/chunks/index-C2KsnRGC.esm.js.map +0 -1
- package/dist/chunks/index-CIey5rKC.esm.js +0 -2
- package/dist/chunks/index-CIey5rKC.esm.js.map +0 -1
- package/dist/chunks/index-CInpKPId.esm.js +0 -2
- package/dist/chunks/index-CInpKPId.esm.js.map +0 -1
- package/dist/chunks/index-CeYpLstb.esm.js.map +0 -1
- package/dist/chunks/index-Co6Pvowh.esm.js.map +0 -1
- package/dist/chunks/index-DqwTVzld.esm.js +0 -2
- package/dist/chunks/index-DqwTVzld.esm.js.map +0 -1
- package/dist/chunks/index-E5gX8_N2.esm.js.map +0 -1
- package/dist/chunks/index-MKr3f8W9.esm.js.map +0 -1
- package/dist/chunks/index-XTzV546k.esm.js.map +0 -1
- package/dist/chunks/index-ewiV_0-t.esm.js +0 -2
- package/dist/chunks/index-ewiV_0-t.esm.js.map +0 -1
- package/dist/chunks/index-rO_5zds6.esm.js.map +0 -1
- package/dist/chunks/order-page-CJR7GRgk.esm.js +0 -2
- package/dist/chunks/order-page-CJR7GRgk.esm.js.map +0 -1
- package/dist/chunks/order-page-CtQ9OX_A.esm.js +0 -2
- package/dist/chunks/order-page-CtQ9OX_A.esm.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r from"react";import{l as o}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamImpactOverview as m}from"../components/impact-overview.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/routes-
|
|
1
|
+
import r from"react";import{l as o}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamImpactOverview as m}from"../components/impact-overview.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/routes-DCT5U9dA.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/_share-dialog-dependencies-DQlABdY4.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/share-button-BEXn6SRs.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-7um4cBYz.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";const t=o({tagName:m.tagName,elementClass:m,react:r,events:{}});export{t as BeamImpactOverview,t as default};
|
|
2
2
|
//# sourceMappingURL=impact-overview.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r from"react";import{l as o}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamImpactOverview as m}from"../components/impact-overview.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/routes-
|
|
1
|
+
import r from"react";import{l as o}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamImpactOverview as m}from"../components/impact-overview.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/routes-DelUpFFo.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/_share-dialog-dependencies-Dg-9riak.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/share-button-B376j4qt.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-BZ9Dmpsy.esm.js";import"../components/beam-partner-logos.js";import"../chunks/responsive-BR8qUfBa.esm.js";const t=o({tagName:m.tagName,elementClass:m,react:r,events:{}});export{t as BeamImpactOverview,t as default};
|
|
2
2
|
//# sourceMappingURL=impact-overview.js.map
|
package/dist/react/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ import '../components/cumulative-impact.js';
|
|
|
21
21
|
import 'lodash';
|
|
22
22
|
import '../components/impact-overview.js';
|
|
23
23
|
import '../chunks/share-button-B9hpxBVr.esm.js';
|
|
24
|
-
import '../chunks/events-
|
|
24
|
+
import '../chunks/events-C55rozsO.esm.js';
|
|
25
25
|
import '../chunks/cart-contents-oArgpFbi.esm.js';
|
|
26
26
|
import '../chunks/openapi-spec-x9NbL7bU.esm.js';
|
|
27
27
|
import '../chunks/promo-types-Cz_Zkjy1.esm.js';
|
package/dist/react/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{BeamCommunityImpact as G}from"./community-impact.esm.js";import{BeamCumulativeImpact as J}from"./cumulative-impact.esm.js";import{BeamImpactOverview as L}from"./impact-overview.esm.js";import{BeamSelectNonprofit as U}from"./select-nonprofit.esm.js";import{BeamRedeemTransaction as W}from"./redeem-transaction.esm.js";import{BeamPostPurchase as Y}from"./post-purchase.esm.js";import{BeamSubscriptionManagement as _}from"./subscription-management.esm.js";import{BeamSelectSubscriptionNonprofit as oo}from"./select-subscription-nonprofit.esm.js";import{BeamSubscriptionImpact as mo}from"./subscription-impact.esm.js";import{BeamProductDetailsPage as po}from"./product-details-page.esm.js";import{BeamSocialShare as eo}from"./social-share.esm.js";import"react";import"../chunks/lit-WqMxC_PA.esm.js";import"../components/community-impact.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/routes-
|
|
1
|
+
import{BeamCommunityImpact as G}from"./community-impact.esm.js";import{BeamCumulativeImpact as J}from"./cumulative-impact.esm.js";import{BeamImpactOverview as L}from"./impact-overview.esm.js";import{BeamSelectNonprofit as U}from"./select-nonprofit.esm.js";import{BeamRedeemTransaction as W}from"./redeem-transaction.esm.js";import{BeamPostPurchase as Y}from"./post-purchase.esm.js";import{BeamSubscriptionManagement as _}from"./subscription-management.esm.js";import{BeamSelectSubscriptionNonprofit as oo}from"./select-subscription-nonprofit.esm.js";import{BeamSubscriptionImpact as mo}from"./subscription-impact.esm.js";import{BeamProductDetailsPage as po}from"./product-details-page.esm.js";import{BeamSocialShare as eo}from"./social-share.esm.js";import"react";import"../chunks/lit-WqMxC_PA.esm.js";import"../components/community-impact.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/routes-DCT5U9dA.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../components/cumulative-impact.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../components/impact-overview.esm.js";import"../chunks/_share-dialog-dependencies-DQlABdY4.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/share-button-BEXn6SRs.esm.js";import"../chunks/share-button-7um4cBYz.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";import"../chunks/events-Dki0ka4F.esm.js";import"../components/select-nonprofit.esm.js";import"../chunks/promo-pill-label-CbW_Vcru.esm.js";import"../utils/local-storage.esm.js";import"../utils/promoManager.esm.js";import"../utils/cookies.esm.js";import"../chunks/cart-contents-DkoytiZh.esm.js";import"../utils/cart.esm.js";import"../chunks/index-Bp9sWMsk.esm.js";import"../components/post-purchase.esm.js";import"../components/subscription-management.esm.js";import"../components/select-subscription-nonprofit.esm.js";import"../utils/makeApiKeyHeader.esm.js";import"../components/subscription-impact.esm.js";import"../components/product-details-page.esm.js";import"../components/social-share.esm.js";export{G as BeamCommunityImpact,J as BeamCumulativeImpact,L as BeamImpactOverview,Y as BeamPostPurchase,po as BeamProductDetailsPage,W as BeamRedeemTransaction,U as BeamSelectNonprofit,oo as BeamSelectSubscriptionNonprofit,eo as BeamSocialShare,mo as BeamSubscriptionImpact,_ as BeamSubscriptionManagement};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/react/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{BeamCommunityImpact as G}from"./community-impact.js";import{BeamCumulativeImpact as J}from"./cumulative-impact.js";import{BeamImpactOverview as L}from"./impact-overview.js";import{BeamSelectNonprofit as U}from"./select-nonprofit.js";import{BeamRedeemTransaction as W}from"./redeem-transaction.js";import{BeamPostPurchase as Y}from"./post-purchase.js";import{BeamSubscriptionManagement as _}from"./subscription-management.js";import{BeamSelectSubscriptionNonprofit as oo}from"./select-subscription-nonprofit.js";import{BeamSubscriptionImpact as mo}from"./subscription-impact.js";import{BeamProductDetailsPage as po}from"./product-details-page.js";import{BeamSocialShare as eo}from"./social-share.js";import"react";import"../chunks/lit-WqMxC_PA.esm.js";import"../components/community-impact.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../components/beam-partner-logos.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/routes-
|
|
1
|
+
import{BeamCommunityImpact as G}from"./community-impact.js";import{BeamCumulativeImpact as J}from"./cumulative-impact.js";import{BeamImpactOverview as L}from"./impact-overview.js";import{BeamSelectNonprofit as U}from"./select-nonprofit.js";import{BeamRedeemTransaction as W}from"./redeem-transaction.js";import{BeamPostPurchase as Y}from"./post-purchase.js";import{BeamSubscriptionManagement as _}from"./subscription-management.js";import{BeamSelectSubscriptionNonprofit as oo}from"./select-subscription-nonprofit.js";import{BeamSubscriptionImpact as mo}from"./subscription-impact.js";import{BeamProductDetailsPage as po}from"./product-details-page.js";import{BeamSocialShare as eo}from"./social-share.js";import"react";import"../chunks/lit-WqMxC_PA.esm.js";import"../components/community-impact.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../components/beam-partner-logos.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/routes-DelUpFFo.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../components/cumulative-impact.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../components/impact-overview.js";import"../chunks/_share-dialog-dependencies-Dg-9riak.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/share-button-B376j4qt.esm.js";import"../chunks/share-button-BZ9Dmpsy.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";import"../chunks/events-Dki0ka4F.esm.js";import"../components/select-nonprofit.js";import"../chunks/promo-pill-label-CbW_Vcru.esm.js";import"../utils/local-storage.js";import"../utils/promoManager.js";import"../utils/cookies.js";import"../chunks/cart-contents-DkoytiZh.esm.js";import"../utils/cart.js";import"../chunks/index-DA4pws6n.esm.js";import"../components/post-purchase.js";import"../components/subscription-management.js";import"../components/select-subscription-nonprofit.js";import"../utils/makeApiKeyHeader.js";import"../components/subscription-impact.js";import"../components/product-details-page.js";import"../components/social-share.js";export{G as BeamCommunityImpact,J as BeamCumulativeImpact,L as BeamImpactOverview,Y as BeamPostPurchase,po as BeamProductDetailsPage,W as BeamRedeemTransaction,U as BeamSelectNonprofit,oo as BeamSelectSubscriptionNonprofit,eo as BeamSocialShare,mo as BeamSubscriptionImpact,_ as BeamSubscriptionManagement};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamPostPurchase as t}from"../components/post-purchase.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/cookies.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../utils/logger.esm.js";import"../utils/local-storage.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/routes-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamPostPurchase as t}from"../components/post-purchase.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/cookies.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../utils/logger.esm.js";import"../utils/local-storage.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/routes-DCT5U9dA.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/index-Bp9sWMsk.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/promo-pill-label-CbW_Vcru.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../chunks/events-Dki0ka4F.esm.js";import"../components/impact-overview.esm.js";import"../chunks/_share-dialog-dependencies-DQlABdY4.esm.js";import"../chunks/share-button-BEXn6SRs.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-7um4cBYz.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";import"../chunks/cart-contents-DkoytiZh.esm.js";import"../utils/promoManager.esm.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{}});export{m as BeamPostPurchase,m as default};
|
|
2
2
|
//# sourceMappingURL=post-purchase.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamPostPurchase as t}from"../components/post-purchase.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/cookies.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../utils/logger.js";import"../utils/local-storage.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/routes-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamPostPurchase as t}from"../components/post-purchase.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/cookies.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../utils/logger.js";import"../utils/local-storage.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/routes-DelUpFFo.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/index-DA4pws6n.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/promo-pill-label-CbW_Vcru.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../components/beam-partner-logos.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../chunks/events-Dki0ka4F.esm.js";import"../components/impact-overview.js";import"../chunks/_share-dialog-dependencies-Dg-9riak.esm.js";import"../chunks/share-button-B376j4qt.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-BZ9Dmpsy.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";import"../chunks/cart-contents-DkoytiZh.esm.js";import"../utils/promoManager.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{}});export{m as BeamPostPurchase,m as default};
|
|
2
2
|
//# sourceMappingURL=post-purchase.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamProductDetailsPage as t}from"../components/product-details-page.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/routes-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamProductDetailsPage as t}from"../components/product-details-page.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/routes-DCT5U9dA.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/promo-pill-label-CbW_Vcru.esm.js";import"../utils/promoManager.esm.js";import"../utils/cookies.esm.js";import"../utils/local-storage.esm.js";import"../chunks/cart-contents-DkoytiZh.esm.js";import"../utils/makeApiKeyHeader.esm.js";import"../chunks/events-Dki0ka4F.esm.js";import"../utils/cart.esm.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{}});export{m as BeamProductDetailsPage,m as default};
|
|
2
2
|
//# sourceMappingURL=product-details-page.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamProductDetailsPage as t}from"../components/product-details-page.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/routes-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamProductDetailsPage as t}from"../components/product-details-page.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/routes-DelUpFFo.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/promo-pill-label-CbW_Vcru.esm.js";import"../utils/promoManager.js";import"../utils/cookies.js";import"../utils/local-storage.js";import"../chunks/cart-contents-DkoytiZh.esm.js";import"../utils/makeApiKeyHeader.js";import"../chunks/events-Dki0ka4F.esm.js";import"../utils/cart.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{}});export{m as BeamProductDetailsPage,m as default};
|
|
2
2
|
//# sourceMappingURL=product-details-page.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _lit_react from '@lit/react';
|
|
2
2
|
import { EventName } from '@lit/react';
|
|
3
|
-
import { B as BeamNonprofitSelectEvent } from '../chunks/events-
|
|
3
|
+
import { B as BeamNonprofitSelectEvent } from '../chunks/events-C55rozsO.esm.js';
|
|
4
4
|
import { BeamRedeemTransaction as BeamRedeemTransaction$1 } from '../components/redeem-transaction.js';
|
|
5
5
|
import '../chunks/cart-contents-oArgpFbi.esm.js';
|
|
6
6
|
import '../chunks/openapi-spec-x9NbL7bU.esm.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{c as e}from"../chunks/events-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{c as e}from"../chunks/events-Dki0ka4F.esm.js";import{B as t}from"../chunks/index-Bp9sWMsk.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/routes-DCT5U9dA.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/promo-pill-label-CbW_Vcru.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../utils/local-storage.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{onNonprofitSelect:e.eventName}});export{m as BeamRedeemTransaction,m as default};
|
|
2
2
|
//# sourceMappingURL=redeem-transaction.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{c as e}from"../chunks/events-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{c as e}from"../chunks/events-Dki0ka4F.esm.js";import{B as t}from"../chunks/index-DA4pws6n.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/routes-DelUpFFo.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/promo-pill-label-CbW_Vcru.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../components/beam-partner-logos.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../utils/local-storage.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{onNonprofitSelect:e.eventName}});export{m as BeamRedeemTransaction,m as default};
|
|
2
2
|
//# sourceMappingURL=redeem-transaction.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _lit_react from '@lit/react';
|
|
2
2
|
import { EventName } from '@lit/react';
|
|
3
|
-
import { B as BeamNonprofitSelectEvent } from '../chunks/events-
|
|
3
|
+
import { B as BeamNonprofitSelectEvent } from '../chunks/events-C55rozsO.esm.js';
|
|
4
4
|
import { BeamSelectNonprofit as BeamSelectNonprofit$1 } from '../components/select-nonprofit.js';
|
|
5
5
|
import '../chunks/cart-contents-oArgpFbi.esm.js';
|
|
6
6
|
import '../chunks/openapi-spec-x9NbL7bU.esm.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as m}from"../chunks/lit-WqMxC_PA.esm.js";import{c as r}from"../chunks/events-
|
|
1
|
+
import o from"react";import{l as m}from"../chunks/lit-WqMxC_PA.esm.js";import{c as r}from"../chunks/events-Dki0ka4F.esm.js";import{BeamSelectNonprofit as e}from"../components/select-nonprofit.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/routes-DCT5U9dA.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/promo-pill-label-CbW_Vcru.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../utils/local-storage.esm.js";import"../utils/promoManager.esm.js";import"../utils/cookies.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";import"../chunks/cart-contents-DkoytiZh.esm.js";import"../utils/cart.esm.js";const t=m({tagName:"beam-select-nonprofit",elementClass:e,react:o,events:{onNonprofitSelect:r.eventName}});export{t as BeamSelectNonprofit,t as default};
|
|
2
2
|
//# sourceMappingURL=select-nonprofit.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as m}from"../chunks/lit-WqMxC_PA.esm.js";import{c as r}from"../chunks/events-
|
|
1
|
+
import o from"react";import{l as m}from"../chunks/lit-WqMxC_PA.esm.js";import{c as r}from"../chunks/events-Dki0ka4F.esm.js";import{BeamSelectNonprofit as e}from"../components/select-nonprofit.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/routes-DelUpFFo.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/promo-pill-label-CbW_Vcru.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../utils/local-storage.js";import"../utils/promoManager.js";import"../utils/cookies.js";import"../chunks/responsive-BR8qUfBa.esm.js";import"../chunks/cart-contents-DkoytiZh.esm.js";import"../utils/cart.js";const t=m({tagName:"beam-select-nonprofit",elementClass:e,react:o,events:{onNonprofitSelect:r.eventName}});export{t as BeamSelectNonprofit,t as default};
|
|
2
2
|
//# sourceMappingURL=select-nonprofit.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _lit_react from '@lit/react';
|
|
2
2
|
import { EventName } from '@lit/react';
|
|
3
|
-
import { B as BeamNonprofitSelectEvent } from '../chunks/events-
|
|
3
|
+
import { B as BeamNonprofitSelectEvent } from '../chunks/events-C55rozsO.esm.js';
|
|
4
4
|
import { BeamSelectSubscriptionNonprofit as BeamSelectSubscriptionNonprofit$1 } from '../components/select-subscription-nonprofit.js';
|
|
5
5
|
import '../chunks/cart-contents-oArgpFbi.esm.js';
|
|
6
6
|
import '../chunks/openapi-spec-x9NbL7bU.esm.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r from"react";import{l as m}from"../chunks/lit-WqMxC_PA.esm.js";import{c as e}from"../chunks/events-
|
|
1
|
+
import r from"react";import{l as m}from"../chunks/lit-WqMxC_PA.esm.js";import{c as e}from"../chunks/events-Dki0ka4F.esm.js";import{BeamSelectSubscriptionNonprofit as t}from"../components/select-subscription-nonprofit.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/routes-DCT5U9dA.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../utils/makeApiKeyHeader.esm.js";import"../utils/local-storage.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../components/beam-partner-logos.esm.js";const o=m({tagName:t.tagName,elementClass:t,react:r,events:{onNonprofitSelect:e.eventName}});export{o as BeamSelectSubscriptionNonprofit,o as default};
|
|
2
2
|
//# sourceMappingURL=select-subscription-nonprofit.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r from"react";import{l as m}from"../chunks/lit-WqMxC_PA.esm.js";import{c as e}from"../chunks/events-
|
|
1
|
+
import r from"react";import{l as m}from"../chunks/lit-WqMxC_PA.esm.js";import{c as e}from"../chunks/events-Dki0ka4F.esm.js";import{BeamSelectSubscriptionNonprofit as t}from"../components/select-subscription-nonprofit.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/routes-DelUpFFo.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../utils/makeApiKeyHeader.js";import"../utils/local-storage.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../components/beam-partner-logos.js";const o=m({tagName:t.tagName,elementClass:t,react:r,events:{onNonprofitSelect:e.eventName}});export{o as BeamSelectSubscriptionNonprofit,o as default};
|
|
2
2
|
//# sourceMappingURL=select-subscription-nonprofit.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r from"react";import{l as t}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamSocialShare as m}from"../components/social-share.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/_share-dialog-dependencies-
|
|
1
|
+
import r from"react";import{l as t}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamSocialShare as m}from"../components/social-share.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/_share-dialog-dependencies-DQlABdY4.esm.js";import"../chunks/routes-DCT5U9dA.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/share-button-7um4cBYz.esm.js";const o=t({tagName:m.tagName,elementClass:m,react:r});export{o as BeamSocialShare,o as default};
|
|
2
2
|
//# sourceMappingURL=social-share.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r from"react";import{l as t}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamSocialShare as m}from"../components/social-share.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/_share-dialog-dependencies-
|
|
1
|
+
import r from"react";import{l as t}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamSocialShare as m}from"../components/social-share.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/_share-dialog-dependencies-Dg-9riak.esm.js";import"../chunks/routes-DelUpFFo.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../components/beam-partner-logos.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/share-button-BZ9Dmpsy.esm.js";const o=t({tagName:m.tagName,elementClass:m,react:r});export{o as BeamSocialShare,o as default};
|
|
2
2
|
//# sourceMappingURL=social-share.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamSubscriptionImpact as t}from"../components/subscription-impact.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/share-button-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamSubscriptionImpact as t}from"../components/subscription-impact.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/share-button-BEXn6SRs.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-7um4cBYz.esm.js";import"../chunks/routes-DCT5U9dA.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../utils/makeApiKeyHeader.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{}});export{m as BeamSubscriptionImpact,m as default};
|
|
2
2
|
//# sourceMappingURL=subscription-impact.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamSubscriptionImpact as t}from"../components/subscription-impact.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/share-button-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamSubscriptionImpact as t}from"../components/subscription-impact.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/share-button-B376j4qt.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-BZ9Dmpsy.esm.js";import"../chunks/routes-DelUpFFo.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../utils/makeApiKeyHeader.js";import"../chunks/responsive-BR8qUfBa.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{}});export{m as BeamSubscriptionImpact,m as default};
|
|
2
2
|
//# sourceMappingURL=subscription-impact.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamSubscriptionManagement as t}from"../components/subscription-management.esm.js";import"../chunks/routes-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamSubscriptionManagement as t}from"../components/subscription-management.esm.js";import"../chunks/routes-DCT5U9dA.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/events-Dki0ka4F.esm.js";import"../components/select-subscription-nonprofit.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../utils/makeApiKeyHeader.esm.js";import"../utils/local-storage.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../components/beam-partner-logos.esm.js";import"../components/subscription-impact.esm.js";import"../chunks/share-button-BEXn6SRs.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-7um4cBYz.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{}});export{m as BeamSubscriptionManagement,m as default};
|
|
2
2
|
//# sourceMappingURL=subscription-management.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamSubscriptionManagement as t}from"../components/subscription-management.js";import"../chunks/routes-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamSubscriptionManagement as t}from"../components/subscription-management.js";import"../chunks/routes-DelUpFFo.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/events-Dki0ka4F.esm.js";import"../components/select-subscription-nonprofit.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../utils/makeApiKeyHeader.js";import"../utils/local-storage.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../components/beam-partner-logos.js";import"../components/subscription-impact.js";import"../chunks/share-button-B376j4qt.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-BZ9Dmpsy.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{}});export{m as BeamSubscriptionManagement,m as default};
|
|
2
2
|
//# sourceMappingURL=subscription-management.js.map
|
package/dist/utils/events.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../chunks/cart-contents-oArgpFbi.esm.js';
|
|
2
2
|
import '../chunks/promo-types-Cz_Zkjy1.esm.js';
|
|
3
3
|
import '../chunks/types-CPxMwnoR.esm.js';
|
|
4
|
-
export { b as BeamCartChangeEvent, c as BeamCartCreatedEvent, a as BeamNetworkCallEvent, B as BeamNonprofitSelectEvent, g as BeamNonprofitSelectionRemovedEvent, d as BeamOrderCreatedEvent, h as BeamPromoCodesStoredEvent, f as BeamStatusChangeEvent, j as BeamWidgetInitialNonprofitSyncEvent, i as BeamWidgetStoredPromoCodesEvent } from '../chunks/events-
|
|
4
|
+
export { b as BeamCartChangeEvent, c as BeamCartCreatedEvent, a as BeamNetworkCallEvent, B as BeamNonprofitSelectEvent, g as BeamNonprofitSelectionRemovedEvent, d as BeamOrderCreatedEvent, h as BeamPromoCodesStoredEvent, f as BeamStatusChangeEvent, k as BeamWidgetInitialNonprofitSyncCancelEvent, j as BeamWidgetInitialNonprofitSyncEvent, i as BeamWidgetStoredPromoCodesEvent } from '../chunks/events-C55rozsO.esm.js';
|
|
5
5
|
import '../chunks/openapi-spec-x9NbL7bU.esm.js';
|
package/dist/utils/events.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as t,h as
|
|
1
|
+
import{g as t,h as n,d as o,c as r,k as m,b as s,a as i,B as d,j as v,i as B,f as E}from"../chunks/events-Dki0ka4F.esm.js";export{t as BeamCartChangeEvent,n as BeamCartCreatedEvent,o as BeamNetworkCallEvent,r as BeamNonprofitSelectEvent,m as BeamNonprofitSelectionRemovedEvent,s as BeamOrderCreatedEvent,i as BeamPromoCodesStoredEvent,d as BeamStatusChangeEvent,v as BeamWidgetInitialNonprofitSyncCancelEvent,B as BeamWidgetInitialNonprofitSyncEvent,E as BeamWidgetStoredPromoCodesEvent};
|
|
2
2
|
//# sourceMappingURL=events.esm.js.map
|
package/dist/utils/events.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as t,h as
|
|
1
|
+
import{g as t,h as n,d as o,c as r,k as m,b as s,a as i,B as d,j as v,i as B,f as E}from"../chunks/events-Dki0ka4F.esm.js";export{t as BeamCartChangeEvent,n as BeamCartCreatedEvent,o as BeamNetworkCallEvent,r as BeamNonprofitSelectEvent,m as BeamNonprofitSelectionRemovedEvent,s as BeamOrderCreatedEvent,i as BeamPromoCodesStoredEvent,d as BeamStatusChangeEvent,v as BeamWidgetInitialNonprofitSyncCancelEvent,B as BeamWidgetInitialNonprofitSyncEvent,E as BeamWidgetStoredPromoCodesEvent};
|
|
2
2
|
//# sourceMappingURL=events.js.map
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { b as errors } from '../chunks/beam-errors-CCe004HS.esm.js';
|
|
2
|
-
export { e as events } from '../chunks/events-
|
|
2
|
+
export { e as events } from '../chunks/events-C55rozsO.esm.js';
|
|
3
3
|
export { logger } from './logger.js';
|
|
4
4
|
export { initNetworkListeners } from './network-listeners.js';
|
|
5
5
|
export { createScopedLocalStorage } from './local-storage.js';
|
package/dist/utils/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as t}from"../chunks/beam-errors-Ci0d3926.esm.js";import{e as a}from"../chunks/events-
|
|
1
|
+
import{b as t}from"../chunks/beam-errors-Ci0d3926.esm.js";import{e as a}from"../chunks/events-Dki0ka4F.esm.js";import{logger as i}from"./logger.esm.js";import{initNetworkListeners as d}from"./network-listeners.esm.js";import{createScopedLocalStorage as C}from"./local-storage.esm.js";import{waitForElement as l}from"./wait-for-element.esm.js";import{deleteCookieValue as S,getCookieMap as x,getCookieValue as P,setCookieValue as k}from"./cookies.esm.js";import{getRemoteSession as c,saveRemoteSession as A}from"./remote-session.esm.js";import{memoizeLast as L}from"./memoize-last.esm.js";import{d as R,i as v}from"../chunks/lodash-D3TLHRR_.esm.js";import{formatStoreAndReturnPromoCodes as V,getAllPromoCodesFromCookie as b,getPromoCodeFromShopifyCookie as q,getPromoCodesFromCart as w,getPromoCodesLocalStorage as z,getSanitizedUrlForStorage as I,isEmptyPromoData as U,mapToUnvalidatedPromoCodes as h,mergeStoreAndReturnPromos as D,parseJsonStringArray as J,promoCodesAreEqual as M,setPromoCodeInCookie as N,setPromoCodesInLocalStorage as T}from"./promoManager.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";export{C as createScopedLocalStorage,R as debounce,S as deleteCookieValue,t as errors,a as events,V as formatStoreAndReturnPromoCodes,b as getAllPromoCodesFromCookie,x as getCookieMap,P as getCookieValue,q as getPromoCodeFromShopifyCookie,w as getPromoCodesFromCart,z as getPromoCodesLocalStorage,c as getRemoteSession,I as getSanitizedUrlForStorage,d as initNetworkListeners,U as isEmptyPromoData,v as isEqual,i as logger,h as mapToUnvalidatedPromoCodes,L as memoizeLast,D as mergeStoreAndReturnPromos,J as parseJsonStringArray,M as promoCodesAreEqual,A as saveRemoteSession,k as setCookieValue,N as setPromoCodeInCookie,T as setPromoCodesInLocalStorage,l as waitForElement};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/utils/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as t}from"../chunks/beam-errors-Ci0d3926.esm.js";import{e as a}from"../chunks/events-
|
|
1
|
+
import{b as t}from"../chunks/beam-errors-Ci0d3926.esm.js";import{e as a}from"../chunks/events-Dki0ka4F.esm.js";import{logger as i}from"./logger.js";import{initNetworkListeners as d}from"./network-listeners.js";import{createScopedLocalStorage as C}from"./local-storage.js";import{waitForElement as l}from"./wait-for-element.js";import{deleteCookieValue as S,getCookieMap as x,getCookieValue as P,setCookieValue as k}from"./cookies.js";import{getRemoteSession as c,saveRemoteSession as A}from"./remote-session.js";import{memoizeLast as L}from"./memoize-last.js";import{d as R,i as v}from"../chunks/lodash-D3TLHRR_.esm.js";import{formatStoreAndReturnPromoCodes as V,getAllPromoCodesFromCookie as b,getPromoCodeFromShopifyCookie as q,getPromoCodesFromCart as w,getPromoCodesLocalStorage as z,getSanitizedUrlForStorage as I,isEmptyPromoData as U,mapToUnvalidatedPromoCodes as h,mergeStoreAndReturnPromos as D,parseJsonStringArray as J,promoCodesAreEqual as M,setPromoCodeInCookie as N,setPromoCodesInLocalStorage as T}from"./promoManager.js";import"../chunks/promo-types-DKAOFHJr.esm.js";export{C as createScopedLocalStorage,R as debounce,S as deleteCookieValue,t as errors,a as events,V as formatStoreAndReturnPromoCodes,b as getAllPromoCodesFromCookie,x as getCookieMap,P as getCookieValue,q as getPromoCodeFromShopifyCookie,w as getPromoCodesFromCart,z as getPromoCodesLocalStorage,c as getRemoteSession,I as getSanitizedUrlForStorage,d as initNetworkListeners,U as isEmptyPromoData,v as isEqual,i as logger,h as mapToUnvalidatedPromoCodes,L as memoizeLast,D as mergeStoreAndReturnPromos,J as parseJsonStringArray,M as promoCodesAreEqual,A as saveRemoteSession,k as setCookieValue,N as setPromoCodeInCookie,T as setPromoCodesInLocalStorage,l as waitForElement};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as i}from"../chunks/events-
|
|
1
|
+
import{d as i}from"../chunks/events-Dki0ka4F.esm.js";const a={apply:function(o,r,t){return o(...t).then(e=>{if(e.ok){const n=e.clone();window.dispatchEvent(new i({url:t[0].toString(),method:(t[1]?.method||"get").toLowerCase(),type:"fetch",response:n}))}return e})}},d={construct(o,r){const t=new o(...r),e=t.open;let n,s;return t.open=function(c,p){n=c,s=p,e.apply(this,arguments)},t.addEventListener("load",()=>{window.dispatchEvent(new i({url:(s||"").toString(),method:(n||"get").toLowerCase(),type:"xhr",xhr:t}))}),t}};let w=!1;const h=()=>{w||(window.fetch=new Proxy(window.fetch,a),XMLHttpRequest=new Proxy(XMLHttpRequest,d),w=!0)};export{h as initNetworkListeners};
|
|
2
2
|
//# sourceMappingURL=network-listeners.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as i}from"../chunks/events-
|
|
1
|
+
import{d as i}from"../chunks/events-Dki0ka4F.esm.js";const a={apply:function(o,r,t){return o(...t).then(e=>{if(e.ok){const n=e.clone();window.dispatchEvent(new i({url:t[0].toString(),method:(t[1]?.method||"get").toLowerCase(),type:"fetch",response:n}))}return e})}},d={construct(o,r){const t=new o(...r),e=t.open;let n,s;return t.open=function(c,p){n=c,s=p,e.apply(this,arguments)},t.addEventListener("load",()=>{window.dispatchEvent(new i({url:(s||"").toString(),method:(n||"get").toLowerCase(),type:"xhr",xhr:t}))}),t}};let w=!1;const h=()=>{w||(window.fetch=new Proxy(window.fetch,a),XMLHttpRequest=new Proxy(XMLHttpRequest,d),w=!0)};export{h as initNetworkListeners};
|
|
2
2
|
//# sourceMappingURL=network-listeners.js.map
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const t=class S extends CustomEvent{constructor(e){super(S.eventName,{detail:e,bubbles:!0,composed:!0})}};t.eventName="beamnetworkcall";let s=t;const o=class f extends CustomEvent{constructor(e){super(f.eventName,{detail:e,bubbles:!0,composed:!0})}};o.eventName="beamnonprofitselect";let a=o;const n=class x extends CustomEvent{constructor(e){super(x.eventName,{detail:e,bubbles:!0,composed:!0})}};n.eventName="beamcartchange";let r=n;const m=class h extends CustomEvent{constructor(e){super(h.eventName,{detail:e,bubbles:!0,composed:!0})}};m.eventName="beamcartcreated";let c=m;const u=class w extends CustomEvent{constructor(e){super(w.eventName,{detail:e,bubbles:!0,composed:!0})}};u.eventName="beamordercreated";let d=u;const l=class P extends CustomEvent{constructor(e){super(P.eventName,{detail:e,bubbles:!0,composed:!0})}};l.eventName="beamstatuschange";let v=l;const b=class W extends CustomEvent{constructor(e){super(W.eventName,{detail:e,bubbles:!0,composed:!0})}};b.eventName="beamnonprofitselectionremoved";let i=b;const p=class k extends CustomEvent{constructor(e){super(k.eventName,{detail:e,bubbles:!0,composed:!0})}};p.eventName="beampromocodesstored";let E=p;const C=class y extends CustomEvent{constructor(e){super(y.eventName,{detail:e,bubbles:!0,composed:!0})}};C.eventName="beamwidgetstoredpromocodes";let N=C;const B=class O extends CustomEvent{constructor(e){super(O.eventName,{detail:e,bubbles:!0,composed:!0})}};B.eventName="beamwidgetinitialnonprofitsync";let g=B;var j=Object.freeze({__proto__:null,BeamCartChangeEvent:r,BeamCartCreatedEvent:c,BeamNetworkCallEvent:s,BeamNonprofitSelectEvent:a,BeamNonprofitSelectionRemovedEvent:i,BeamOrderCreatedEvent:d,BeamPromoCodesStoredEvent:E,BeamStatusChangeEvent:v,BeamWidgetInitialNonprofitSyncEvent:g,BeamWidgetStoredPromoCodesEvent:N});export{v as B,E as a,d as b,a as c,s as d,j as e,N as f,r as g,c as h,g as i,i as j};
|
|
2
|
-
//# sourceMappingURL=events-DahlkyxO.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Z as t,C as e,V as r,D as a,b as i,S as o,B as s,Q as p,s as C,X as d}from"./order-page-CJR7GRgk.esm.js";var g=Object.freeze({__proto__:null,addBeamAttributesToCart:t,appendBeamAttributesToCart:e,appendStatsigToShopifyCartAttributes:r,appendToShopifyCartBeamAttribute:a,getBeamAttributesForCart:i,getCurrentCart:o,getShopifyCart:s,registerCartIntegration:p,showBeamOrderPageWidgets:C,trackCart:d});export{g as i};
|
|
2
|
-
//# sourceMappingURL=index-B7ij5jz8.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-B7ij5jz8.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Z as t,C as e,V as r,D as a,b as i,S as o,B as s,Q as p,s as C,X as d}from"./order-page-CtQ9OX_A.esm.js";var g=Object.freeze({__proto__:null,addBeamAttributesToCart:t,appendBeamAttributesToCart:e,appendStatsigToShopifyCartAttributes:r,appendToShopifyCartBeamAttribute:a,getBeamAttributesForCart:i,getCurrentCart:o,getShopifyCart:s,registerCartIntegration:p,showBeamOrderPageWidgets:C,trackCart:d});export{g as i};
|
|
2
|
-
//# sourceMappingURL=index-C2KsnRGC.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-C2KsnRGC.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i}from"./index-rO_5zds6.esm.js";import{i as o}from"./index-B7ij5jz8.esm.js";import{i as r}from"./index-BNjsFEGn.esm.js";import{i as e}from"./index-CInpKPId.esm.js";import{i as m}from"./index-Ls4pNA_r.esm.js";var s=Object.freeze({__proto__:null,Cart:e,Logs:m,Session:r,Shopify:o,Utils:i});export{s as i};
|
|
2
|
-
//# sourceMappingURL=index-CIey5rKC.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-CIey5rKC.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-CInpKPId.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-CeYpLstb.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-Co6Pvowh.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DqwTVzld.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-E5gX8_N2.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-MKr3f8W9.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-XTzV546k.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i}from"./index-MKr3f8W9.esm.js";import{i as o}from"./index-C2KsnRGC.esm.js";import{i as r}from"./index-IKiJwo5v.esm.js";import{i as e}from"./index-DqwTVzld.esm.js";import{i as m}from"./index-Bydn4zMN.esm.js";var s=Object.freeze({__proto__:null,Cart:e,Logs:m,Session:r,Shopify:o,Utils:i});export{s as i};
|
|
2
|
-
//# sourceMappingURL=index-ewiV_0-t.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-ewiV_0-t.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-rO_5zds6.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as O,i as T,a as j}from"./lodash-D3TLHRR_.esm.js";import{i as x,d as K,c as W,j as M,h as q,g as z}from"./events-DahlkyxO.esm.js";import{logger as g}from"../utils/logger.js";import{initNetworkListeners as F}from"../utils/network-listeners.js";import{createScopedLocalStorage as J}from"../utils/local-storage.js";import{memoizeLast as U}from"../utils/memoize-last.js";import"./promo-types-DKAOFHJr.esm.js";import{B as A}from"./cart-contents-DkoytiZh.esm.js";import{O as E}from"./update-cart-DhgjSmWJ.esm.js";import{W as G,D as V}from"./routes-Bw7hn3RL.esm.js";import{getBeamCartId as D,getExternalCartId as $}from"../utils/cart.js";import"../components/post-purchase.js";import{waitForElement as Q}from"../utils/wait-for-element.js";import{B as X}from"./beam-errors-Ci0d3926.esm.js";import{getCookieValue as Z}from"../utils/cookies.js";const N=window.Shopify?.routes?.root||"/";let R=!1;const H="cart";async function Y(t,c=!0){if(R)return!1;F(),window.addEventListener(K.eventName,async n=>{const e=n,o=/cart\/(add|change|update|clear)/,r=e.detail.type==="xhr"?e.detail.xhr.responseURL:e.detail.response.url,a=new URL(r);if(!o.test(a.pathname))return;const i=await B(t);i.changed&&E(t,i.cart)});let l,d;window.addEventListener(W.eventName,async n=>{const e=n;g.debug("[cart-page][BeamNonprofitSelectEvent]",e.detail);const{source:o,selectedNonprofitId:r,selectionId:a}=e.detail;if(o===G.select_nonprofit){if(l===r&&d===a)return;const i=await I(t);await h({...i,selectedNonprofitId:r,selectionId:a}),d=a,l=r}}),window.addEventListener(M.eventName,async n=>{const e=n;g.debug("[cart-page][BeamNonprofitSelectionRemovedEvent]",e.detail);const{newNonprofitId:o,selectionId:r}=e.detail;if(l===o&&d===r)return;const a=await I(t);await h({...a,selectedNonprofitId:null,selectionId:r}),d=r,l=o}),window.addEventListener(q.eventName,async n=>{const e=n;if(g.debug("[cart-page][BeamCartCreatedEvent]",e.detail),window.statsig||c){const o=await I(t);await h(o)}}),window.addEventListener(z.eventName,async n=>{const e=n;if(g.debug("[cart-page][BeamCartChangeEvent]",e.detail),window.statsig||c){const o=await I(t);await h(o)}});const m=await B(t);return await E(t,m.cart,!0),R=!0,!0}async function P(t){const c=await I(t);await h(c)}async function I(t){let c,l;if(window.statsig)try{const o=window.statsig;typeof o?.getLayer("beam_trial_layer")?.get("show_beam")=="boolean"&&(c=o.getLayer("beam_trial_layer").get("show_beam",!1),l=o.getStableID())}catch{}const d=$(H,t),m=D(A,t),{chainId:n,storeId:e}=t;return{showBeam:c??void 0,remoteSessionId:l??void 0,beamCartId:m&&m!=="null"?m:void 0,cartId:d&&d!=="null"?d:void 0,chainId:n,storeId:e}}const tt=P;async function B(t){const{token:c,total_price:l,item_count:d,currency:m,items:n,cart_level_discount_applications:e,attributes:o}=await L();let r=!1;const a=J(t),i=a.getItemJson("cart"),b=D(A,t),_={cartId:c,beamCartId:b,subtotal:l/100,itemCount:d,currencyCode:m,schema:{source:"generic"},content:{items:n.map(({sku:p,final_line_price:y,product_id:u,line_level_discount_allocations:C})=>{const s=p||String(u),v=y/100,S=C?.map(({discount_application:k})=>({code:k?.title,applicable:!0}));return{remoteProductIdentifier:s,localAmount:v,discounts:S}}),discounts:e.map(({title:p})=>({code:p,applicable:!0}))}};let f=null;try{o?.beam&&(f=JSON.parse(o.beam))}catch(p){g.error(p)}let w=!1;if(f){const{nonprofit_id:p,selection_id:y}=f;if(p!==void 0){const u=String(p);a.getItem("nonprofit")!==u&&(a.setItem("nonprofit",u),w=!0)}if(y!=null){const u=String(y);a.getItem("transaction")!==u&&(a.setItem("transaction",u),w=!0)}}return w&&window.dispatchEvent(new x({nonprofitId:f?.nonprofit_id,selectionId:f?.selection_id})),T(_,{...i,beamCartId:i?.beamCartId})||(r=!0),{changed:r,cart:_}}const et=E,L=async function(){return await window.fetch(N+"cart.js",{method:"GET",headers:{"Content-Type":"application/json"}}).then(t=>t.json())},h=U(async function({selectedNonprofitId:t,selectionId:c,beamCartId:l,cartId:d,chainId:m,storeId:n,showBeam:e,remoteSessionId:o}){const{attributes:r}=await L(),a=r?.beam;let i={};try{a&&(i=JSON.parse(a))}catch(w){g.error(w)}const b=O({nonprofit_id:t,selection_id:c,beam_cart_id:l,shopify_cart_id:d,chain_id:m,store_id:n,show_beam:e,remote_session_id:o},j),_={...i,...b};t===null&&(_.nonprofit_id=void 0);const f={beam:JSON.stringify(_)};if(!T(_,i))try{await window.fetch(N+"cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:f})})}catch(w){g.error(w)}}),ot=U(async function({selectedNonprofitId:t,selectionId:c,beamCartId:l,cartId:d,chainId:m,storeId:n}){let e,o;if(window.statsig)try{const i=window.statsig;typeof i?.getLayer("beam_trial_layer")?.get("show_beam")=="boolean"&&(e=i.getLayer("beam_trial_layer").get("show_beam",!1),o=i.getStableID())}catch{}const r=O({nonprofit_id:t,selection_id:c,beam_cart_id:l,shopify_cart_id:d,chain_id:m,store_id:n,show_beam:e,remote_session_id:o},j);t===null&&(r.nonprofit_id=void 0);const a={beam:JSON.stringify(r)};try{await window.fetch(N+"cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:a})})}catch(i){g.error(i)}});async function at({parentSelector:t=".step__sections",apiKey:c,baseUrl:l=V,storeId:d,postalCode:m,discountCodes:n,countryCode:e,orderId:o,email:r,cartTotal:a,cart:i,promoCodes:b,htmlPromoCodes:_,currencyCode:f="USD",domain:w,lang:p="en",debug:y=!1}){const u=document.querySelector(t)||await Q(t);if(!u)throw new X(`Timed out waiting for selector '${t}'. Could not render Beam post-purchase widget.`);const C=await Z("cart");if(C){const v=J({apiKey:c}),S=v.getItemJson("cart")||{};v.setItemJson("cart",{...S,cartId:C})}const s=document.createElement("beam-post-purchase");s.apiKey=c,s.baseUrl=l,s.storeId=d,s.postalCode=m,s.countryCode=e,s.orderId=String(o),s.email=r,s.cartTotal=a,s.cart=i,s.promoCodes=b,s.htmlPromoCodes=_,s.discountCodes=n,s.currencyCode=f,s.domain=w,s.lang=p,s.debug=y,u.appendChild(s)}export{L as B,h as C,P as D,Y as Q,B as S,tt as V,et as X,ot as Z,I as b,at as s};
|
|
2
|
-
//# sourceMappingURL=order-page-CJR7GRgk.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"order-page-CJR7GRgk.esm.js","sources":["../../src/integrations/shopify/cart-page.ts","../../src/integrations/shopify/order-page.ts"],"sourcesContent":["/* eslint-disable camelcase */\nimport isEqual from \"lodash-es/isEqual\";\nimport isUndefined from \"lodash-es/isUndefined\";\nimport omitBy from \"lodash-es/omitBy\";\nimport { logger, memoizeLast } from \"../../utils\";\nimport { initNetworkListeners } from \"../../utils/network-listeners\";\nimport {\n BeamCartChangeEvent,\n BeamCartCreatedEvent,\n BeamNetworkCallEvent,\n BeamNonprofitSelectEvent,\n BeamNonprofitSelectionRemovedEvent,\n BeamWidgetInitialNonprofitSyncEvent,\n} from \"../../utils/events\";\nimport { createScopedLocalStorage } from \"../../utils/local-storage\";\nimport { BEAM_CART_COOKIE_NAME, TBeamCartLocalStorage, TCart, TCartItems } from \"../../shared/cart-contents\";\nimport { BeamCartAPIConfig, updateCart } from \"../cart\";\nimport { WIDGET_NAMES } from \"../../api-sdk/constants\";\nimport { getBeamCartId, getExternalCartId } from \"../../utils/cart\";\n\nexport type BeamShopifyCartIntegrationConfig = BeamCartAPIConfig & {\n storeId: number; // will be added to cart custom_attributes, and used in cart API call\n chainId?: number; // will be added to cart custom_attributes\n};\n\ntype ShopifyDiscountApplication = {\n title: string;\n value: string;\n};\n\ntype ShopifyLineLevelDiscountAllocations = {\n amount?: string;\n discount_application: ShopifyDiscountApplication;\n};\n\ntype ShopifyCartBeamAttribute = {\n nonprofit_id?: number | null;\n selection_id?: string;\n beam_cart_id?: string;\n shopify_cart_id?: string;\n chain_id?: number;\n store_id?: number;\n show_beam?: boolean;\n remote_session_id?: string;\n};\n\nconst SHOPIFY_BASE_URL = window.Shopify?.routes?.root || \"/\"; // see window.d.ts\n\nlet isBeamCartIntegrationRegistered = false; // Skip registering event listeners if already set up\n\nconst SHOPIFY_CART_COOKIE_NAME = \"cart\";\n\n/**\n * @main registerCartIntegration - set up event listeners to integrate Beam with Shopify cart\n * @return {boolean} returns true if NEW listeners were created, false if setup was already done\n */\nasync function registerCartIntegration(\n config: BeamShopifyCartIntegrationConfig,\n autoUpdateShopifyCartAttributes = true\n) {\n if (isBeamCartIntegrationRegistered) {\n return false; // Do nothing if listeners are already attached\n }\n\n // logger.debug(\"[cart-page][registerCartIntegration] initializing network listeners\");\n // Set up event listeners for AJAX events\n initNetworkListeners();\n\n // When any network call happens, check if it's for the Shopify /cart AJAX Api.\n // If so, and the cart is updated, send the cart to Beam\n window.addEventListener(BeamNetworkCallEvent.eventName, async (_event: Event) => {\n const event = _event as BeamNetworkCallEvent;\n const cartChangePaths = /cart\\/(add|change|update|clear)/;\n // note: response urls below follow redirects\n const requestUrlStr = event.detail.type === \"xhr\" ? event.detail.xhr.responseURL : event.detail.response.url;\n const url = new URL(requestUrlStr);\n if (!cartChangePaths.test(url.pathname)) {\n return;\n }\n // logger.debug(\"[cart-page][BeamNetworkCallEvent] getting current cart\");\n const currentCart = await getCurrentCart(config);\n if (!currentCart.changed) {\n // logger.debug(`[cart-page][BeamNetworkCallEvent] cart has not changed from URL ${requestUrlStr}`, currentCart.cart);\n return;\n }\n // Send cart to Beam to update timestamp, which is used for cart abandonment / ROI calc\n // logger.debug(`[cart-page][BeamNetworkCallEvent] cart has changed from URL ${requestUrlStr}`, currentCart.cart);\n updateCart(config, currentCart.cart);\n });\n\n // Listen to Beam's own events to integrate Beam data into Shopify order\n let lastNonprofitId: number | null | undefined;\n let lastSelectionId: string | null | undefined;\n window.addEventListener(BeamNonprofitSelectEvent.eventName, async (_event) => {\n const event = _event as BeamNonprofitSelectEvent;\n logger.debug(\"[cart-page][BeamNonprofitSelectEvent]\", event.detail);\n const { source, selectedNonprofitId, selectionId } = event.detail;\n\n // On nonprofit selection, we always write Beam's attributes\n // to the Shopify cart attributes\n if (source === WIDGET_NAMES.select_nonprofit) {\n // Skip update if nothing changed (can happen if widget is re-initialized and\n // emits event after cache restoration, i.e., on cart re-render).\n if (lastNonprofitId === selectedNonprofitId && lastSelectionId === selectionId) {\n return;\n }\n\n const beamCartData = await getBeamAttributesForCart(config);\n await appendBeamAttributesToCart({\n ...beamCartData,\n selectedNonprofitId,\n selectionId,\n });\n lastSelectionId = selectionId;\n lastNonprofitId = selectedNonprofitId;\n }\n });\n\n /**\n * Upon removal of the selected nonprofit from the widget and local storage,\n * an event is emitted and that event is then used to update the cart attributes accordingly\n * This event listener updates the cart attributes based on the emitted event\n */\n window.addEventListener(BeamNonprofitSelectionRemovedEvent.eventName, async (_event) => {\n const event = _event as BeamNonprofitSelectionRemovedEvent;\n logger.debug(\"[cart-page][BeamNonprofitSelectionRemovedEvent]\", event.detail);\n const { newNonprofitId, selectionId } = event.detail;\n\n if (lastNonprofitId === newNonprofitId && lastSelectionId === selectionId) {\n return;\n }\n\n // On nonprofit deselection, we always write Beam's attributes\n // to the Shopify cart attributes\n const beamCartData = await getBeamAttributesForCart(config);\n await appendBeamAttributesToCart({\n ...beamCartData,\n selectedNonprofitId: null,\n selectionId,\n });\n lastSelectionId = selectionId;\n lastNonprofitId = newNonprofitId;\n });\n\n /**\n * When a BeamCart is created, write beam metadata to the Shopify cart if\n * we need to capture it for Statsig or Extensibility\n */\n window.addEventListener(BeamCartCreatedEvent.eventName, async (_event: Event) => {\n const event = _event as BeamCartCreatedEvent;\n logger.debug(\"[cart-page][BeamCartCreatedEvent]\", event.detail);\n if (window.statsig || autoUpdateShopifyCartAttributes) {\n const beamCartData = await getBeamAttributesForCart(config);\n await appendBeamAttributesToCart(beamCartData);\n }\n });\n\n /**\n * On any cart changes, write beam metadata to the Shopify cart if\n * we need to capture it for Statsig or Extensibility\n */\n window.addEventListener(BeamCartChangeEvent.eventName, async (_event: Event) => {\n const event = _event as BeamCartChangeEvent;\n logger.debug(\"[cart-page][BeamCartChangeEvent]\", event.detail);\n if (window.statsig || autoUpdateShopifyCartAttributes) {\n const beamCartData = await getBeamAttributesForCart(config);\n await appendBeamAttributesToCart(beamCartData);\n }\n });\n\n // Handle full-page load, ie, first-time page load and reloads from form submit events\n // This creates a GET to /cart.js\n const currentCart = await getCurrentCart(config);\n // logger.debug(\"[cart-page][registerCartIntegration] initial cart fetch result\", currentCart);\n await updateCart(config, currentCart.cart, true);\n\n isBeamCartIntegrationRegistered = true;\n\n return true;\n}\n\n/* ***************************************** HELPER FUNCTIONS *****************************************\n These may be used individually to integrate with carts if the registerCartIntegration\n script doesn't work for some reason.\n ****************************************************************************************************/\n\nasync function appendToShopifyCartBeamAttribute(config: BeamShopifyCartIntegrationConfig) {\n const beamCartData = await getBeamAttributesForCart(config);\n await appendBeamAttributesToCart(beamCartData);\n}\n\n/**\n * Gathers the base Beam data needed for updating a Shopify cart's metadata\n */\nasync function getBeamAttributesForCart(config: BeamShopifyCartIntegrationConfig) {\n let showBeam;\n let remoteSessionId;\n\n if (window.statsig) {\n // If the site is using Statsig, but not for Beam, we need to ignore it\n try {\n const statsig = window.statsig as any;\n const statsigLayerProperty = statsig?.getLayer(\"beam_trial_layer\")?.get(\"show_beam\");\n if (typeof statsigLayerProperty === \"boolean\") {\n showBeam = statsig.getLayer(\"beam_trial_layer\").get(\"show_beam\", false /* default to hide */) as boolean;\n remoteSessionId = statsig.getStableID();\n }\n } catch (err) {\n // logger.error(err)\n }\n }\n\n const cartId = getExternalCartId(SHOPIFY_CART_COOKIE_NAME, config);\n const beamCartId = getBeamCartId(BEAM_CART_COOKIE_NAME, config);\n const { chainId, storeId } = config;\n\n return {\n showBeam: showBeam ?? undefined,\n remoteSessionId: remoteSessionId ?? undefined,\n beamCartId: beamCartId && beamCartId !== \"null\" ? beamCartId : undefined,\n cartId: cartId && cartId !== \"null\" ? cartId : undefined,\n chainId,\n storeId,\n };\n}\n\n/**\n * Adds Statsig data to a Shopify cart\n */\nconst appendStatsigToShopifyCartAttributes = appendToShopifyCartBeamAttribute;\n\n/**\n * Detects change in cart since last page load,\n * by calling GET /cart.js, and returns cart values.\n * Used for:\n * - Form-based carts where the page refreshes to modify cart instead of using AJAX calls\n * - Hydrogen/GraphQL based carts (needs to be integrated manually)\n */\nasync function getCurrentCart(config: BeamShopifyCartIntegrationConfig): Promise<{\n changed: boolean;\n cart: {\n cartId: string;\n subtotal: number;\n itemCount: number;\n currencyCode: string;\n } & TCart;\n}> {\n const {\n token, // equal to \"cart\" cookie\n total_price, // this is the pretax value, after discounts, and multiplied by 100 (integer from decimal)\n item_count,\n currency,\n items,\n cart_level_discount_applications,\n attributes,\n } = await getShopifyCart();\n\n let changed = false;\n\n const localStorage = createScopedLocalStorage(config);\n\n // The cart cache is used to detect changes after page refreshes / across tabs\n const cachedCart: TBeamCartLocalStorage | null = localStorage.getItemJson(\"cart\");\n // The Beam cart cookie is used to identify the cart across subdomains\n // Use explicit null if empty because API requires it\n const beamCartId: string | null = getBeamCartId(BEAM_CART_COOKIE_NAME, config);\n\n const cart = {\n cartId: token,\n beamCartId,\n subtotal: total_price / 100,\n itemCount: item_count,\n currencyCode: currency,\n schema: { source: \"generic\" } as const,\n content: {\n // pull out minimal fields from full line items\n items: (items as TCartItems).map(({ sku, final_line_price, product_id, line_level_discount_allocations }) => {\n const remoteProductIdentifier = sku || String(product_id);\n const localAmount = final_line_price / 100;\n const discounts = (line_level_discount_allocations as ShopifyLineLevelDiscountAllocations[])?.map(\n ({ discount_application }) => {\n return { code: discount_application?.title, applicable: true };\n }\n );\n return { remoteProductIdentifier, localAmount, discounts };\n }),\n discounts: (cart_level_discount_applications as ShopifyDiscountApplication[]).map(({ title }) => {\n return { code: title, applicable: true };\n }),\n },\n };\n\n let beamAttr: ShopifyCartBeamAttribute | null = null;\n\n try {\n if (attributes?.beam) {\n beamAttr = JSON.parse(attributes.beam);\n }\n } catch (err) {\n logger.error(err);\n }\n\n let updated = false;\n\n if (beamAttr) {\n const { nonprofit_id, selection_id } = beamAttr;\n if (nonprofit_id !== undefined) {\n const newNonprofitId = String(nonprofit_id);\n if (localStorage.getItem(\"nonprofit\") !== newNonprofitId) {\n localStorage.setItem(\"nonprofit\", newNonprofitId);\n updated = true;\n }\n }\n if (selection_id != null) {\n const newSelectionId = String(selection_id);\n if (localStorage.getItem(\"transaction\") !== newSelectionId) {\n localStorage.setItem(\"transaction\", newSelectionId);\n updated = true;\n }\n }\n }\n\n if (updated) {\n window.dispatchEvent(\n new BeamWidgetInitialNonprofitSyncEvent({\n nonprofitId: beamAttr?.nonprofit_id,\n selectionId: beamAttr?.selection_id,\n })\n );\n }\n\n if (\n !isEqual(cart, {\n ...cachedCart,\n beamCartId: cachedCart?.beamCartId,\n })\n ) {\n changed = true;\n }\n\n // logger.debug(\"[cart-page][getCurrentCart] has cart changed?\", changed, cart);\n\n return { changed, cart };\n}\n\n/**\n * trackCart - Backwards-compatible alias for updateCart\n */\nconst trackCart = updateCart;\n\n/**\n * Helper function to get the Shopify cart attributes\n */\nconst getShopifyCart = async function () {\n const cart = await window\n .fetch(SHOPIFY_BASE_URL + \"cart.js\", {\n method: \"GET\",\n headers: { \"Content-Type\": \"application/json\" },\n })\n .then((res) => res.json());\n return cart;\n};\n\n/**\n * Sends Beam data to Shopify to integrate with order as custom attributes.\n * Memoized so that calls with the same data as the previous don't create additional API calls to Shopify.\n * This will do an append, not a full overwrite of the attributes in the beam property\n */\nconst appendBeamAttributesToCart = memoizeLast(async function appendBeamAttributesToCart({\n selectedNonprofitId,\n selectionId,\n beamCartId,\n cartId,\n chainId,\n storeId,\n showBeam,\n remoteSessionId,\n}: {\n selectedNonprofitId?: number | null;\n selectionId?: string;\n beamCartId?: string;\n cartId?: string;\n chainId?: number;\n storeId?: number;\n showBeam?: boolean;\n remoteSessionId?: string;\n}) {\n // logger.debug(\"[cart-page][appendBeamAttributesToCart] fetching existing cart\");\n const { attributes } = await getShopifyCart();\n\n // Get only the Beam attribute, if it exists\n const existingBeamCartAttrString = attributes?.beam;\n let existingBeamCartAttr = {};\n try {\n if (existingBeamCartAttrString) {\n existingBeamCartAttr = JSON.parse(existingBeamCartAttrString);\n }\n } catch (err) {\n logger.error(err);\n }\n\n const newBeamAttrs = omitBy(\n {\n nonprofit_id: selectedNonprofitId,\n selection_id: selectionId,\n beam_cart_id: beamCartId,\n shopify_cart_id: cartId,\n chain_id: chainId,\n store_id: storeId,\n show_beam: showBeam,\n remote_session_id: remoteSessionId,\n },\n isUndefined\n );\n\n const appendedBeamAttributes = {\n ...existingBeamCartAttr,\n ...newBeamAttrs,\n } as ShopifyCartBeamAttribute;\n\n // For the nonprofitId, if we specifically get a null value here,\n // we want to remove it from the cart attributes, not just write \"null\"\n if (selectedNonprofitId === null) {\n appendedBeamAttributes.nonprofit_id = undefined;\n }\n\n const beamCartAttrs = {\n beam: JSON.stringify(appendedBeamAttributes),\n };\n\n // If the attributes match, no reason to update the cart\n if (isEqual(appendedBeamAttributes, existingBeamCartAttr)) {\n // logger.debug(\"[cart-page][appendBeamAttributesToCart] cart attributes match, skipping update\");\n return;\n }\n\n try {\n // logger.debug(\"[cart-page][appendBeamAttributesToCart] updating Shopify cart\");\n await window.fetch(SHOPIFY_BASE_URL + \"cart/update.js\", {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ attributes: beamCartAttrs }),\n });\n } catch (err) {\n logger.error(err); // don't throw, allow later calls to continue\n }\n});\n\n/**\n * Sends Beam data to Shopify to integrate with order as custom attributes.\n * Memoized so that calls with the same data as the previous don't create additional API calls to Shopify.\n * This method force-updates the \"beam\" attribute with the values passed in\n */\nconst addBeamAttributesToCart = memoizeLast(async function addBeamAttributesToCart({\n selectedNonprofitId,\n selectionId,\n beamCartId,\n cartId,\n chainId,\n storeId,\n}: {\n selectedNonprofitId?: number | null;\n selectionId?: string;\n beamCartId?: string;\n cartId?: string;\n chainId?: number;\n storeId?: number;\n}) {\n let showBeam;\n let remoteSessionId;\n\n if (window.statsig) {\n // If the site is using Statsig, but not for Beam, we need to ignore it\n try {\n const statsig = window.statsig as any;\n const statsigLayerProperty = statsig?.getLayer(\"beam_trial_layer\")?.get(\"show_beam\");\n if (typeof statsigLayerProperty === \"boolean\") {\n showBeam = statsig.getLayer(\"beam_trial_layer\").get(\"show_beam\", false /* default to hide */) as boolean;\n remoteSessionId = statsig.getStableID();\n }\n } catch (err) {\n // logger.error(err)\n }\n }\n\n const allBeamAttributes = omitBy(\n {\n nonprofit_id: selectedNonprofitId,\n selection_id: selectionId,\n beam_cart_id: beamCartId,\n shopify_cart_id: cartId,\n chain_id: chainId,\n store_id: storeId,\n show_beam: showBeam,\n remote_session_id: remoteSessionId,\n },\n isUndefined\n ) as ShopifyCartBeamAttribute;\n\n // For the nonprofitId, if we specifically get a null value here,\n // we want to remove it from the cart attributes, not just write \"null\"\n if (selectedNonprofitId === null) {\n allBeamAttributes.nonprofit_id = undefined;\n }\n\n const beamCartAttrs = {\n beam: JSON.stringify(allBeamAttributes),\n };\n\n try {\n await window.fetch(SHOPIFY_BASE_URL + \"cart/update.js\", {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ attributes: beamCartAttrs }),\n });\n } catch (err) {\n logger.error(err); // don't throw, allow later calls to continue\n }\n});\n\ndeclare global {\n interface Window {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n statsig?: any; // attached by Statsig CDN script\n }\n}\nexport {\n trackCart,\n getCurrentCart,\n addBeamAttributesToCart,\n appendStatsigToShopifyCartAttributes,\n appendToShopifyCartBeamAttribute,\n registerCartIntegration,\n appendBeamAttributesToCart,\n getShopifyCart,\n getBeamAttributesForCart,\n};\n","import \"../../components/post-purchase\";\nimport { postTransaction } from \"../../api-sdk/v3/routes\";\nimport { DEFAULT_BASE_URL } from \"../../api-sdk/constants\";\nimport { LANGUAGES, TUrl } from \"../../api-sdk/types\";\nimport { waitForElement } from \"../../utils/wait-for-element\";\nimport { BeamError } from \"../../utils/beam-errors\";\nimport { getCookieValue } from \"../../utils/cookies\";\nimport { createScopedLocalStorage } from \"../../utils/local-storage\";\nimport { TCart } from \"../../shared/cart-contents\";\n\n// Shopify admin page: admin/settings/checkout\n\nexport type TBeamOrderPageParams = Parameters<typeof postTransaction>[0][\"requestBody\"] & {\n // Either storeId or postalCode + countryCode must be provided\n storeId?: number;\n postalCode?: string;\n countryCode?: string;\n orderId: string;\n email: string;\n cartTotal: number;\n cart: TCart;\n discountCodes: string[];\n promoCodes: string[];\n htmlPromoCodes: string;\n currencyCode: string;\n parentSelector: string; // CSS Selector for parent of widget to be inserted into DOM\n apiKey: string;\n baseUrl: TUrl;\n domain?: string; // Base domain for setting cookies\n lang: LANGUAGES;\n debug: boolean;\n};\n\nexport async function showBeamOrderPageWidgets({\n parentSelector = \".step__sections\",\n apiKey,\n baseUrl = DEFAULT_BASE_URL,\n storeId,\n postalCode,\n discountCodes,\n countryCode,\n orderId,\n email,\n cartTotal,\n cart,\n promoCodes,\n htmlPromoCodes,\n currencyCode = \"USD\",\n domain,\n lang = \"en\",\n debug = false,\n}: TBeamOrderPageParams) {\n const parentElement = document.querySelector(parentSelector) || (await waitForElement(parentSelector));\n if (!parentElement) {\n throw new BeamError(\n `Timed out waiting for selector '${parentSelector}'. Could not render Beam post-purchase widget.`\n );\n }\n\n // If checkout and order page are on different subdomains, we can't access localStorage\n // We can make postTransaction work by copying the cart cookie to the expected localStorage key on the current domain\n const cartId = await getCookieValue(\"cart\"); // Shopify-only cart identifier\n if (cartId) {\n const beamLocalStorage = createScopedLocalStorage({ apiKey });\n const existingValue = beamLocalStorage.getItemJson(\"cart\") || {};\n beamLocalStorage.setItemJson(\"cart\", { ...existingValue, cartId });\n }\n\n // Note: assign properties one by one instead of bulk Object.assign to type check assignments\n const widget = document.createElement(\"beam-post-purchase\");\n widget.apiKey = apiKey;\n widget.baseUrl = baseUrl;\n widget.storeId = storeId;\n widget.postalCode = postalCode;\n widget.countryCode = countryCode;\n widget.orderId = String(orderId);\n widget.email = email;\n widget.cartTotal = cartTotal;\n widget.cart = cart;\n widget.promoCodes = promoCodes;\n widget.htmlPromoCodes = htmlPromoCodes;\n widget.discountCodes = discountCodes;\n widget.currencyCode = currencyCode;\n widget.domain = domain;\n widget.lang = lang;\n widget.debug = debug;\n\n // Insert widget into DOM\n parentElement.appendChild(widget);\n}\n"],"names":["SHOPIFY_BASE_URL","isBeamCartIntegrationRegistered","SHOPIFY_CART_COOKIE_NAME","registerCartIntegration","config","autoUpdateShopifyCartAttributes","initNetworkListeners","BeamNetworkCallEvent","_event","event","cartChangePaths","requestUrlStr","url","currentCart","getCurrentCart","updateCart","lastNonprofitId","lastSelectionId","BeamNonprofitSelectEvent","logger","source","selectedNonprofitId","selectionId","WIDGET_NAMES","beamCartData","getBeamAttributesForCart","appendBeamAttributesToCart","BeamNonprofitSelectionRemovedEvent","newNonprofitId","BeamCartCreatedEvent","BeamCartChangeEvent","appendToShopifyCartBeamAttribute","showBeam","remoteSessionId","statsig","cartId","getExternalCartId","beamCartId","getBeamCartId","BEAM_CART_COOKIE_NAME","chainId","storeId","appendStatsigToShopifyCartAttributes","token","total_price","item_count","currency","items","cart_level_discount_applications","attributes","getShopifyCart","changed","localStorage","createScopedLocalStorage","cachedCart","cart","sku","final_line_price","product_id","line_level_discount_allocations","remoteProductIdentifier","localAmount","discounts","discount_application","title","beamAttr","err","updated","nonprofit_id","selection_id","newSelectionId","BeamWidgetInitialNonprofitSyncEvent","isEqual","trackCart","res","memoizeLast","existingBeamCartAttrString","existingBeamCartAttr","newBeamAttrs","omitBy","isUndefined","appendedBeamAttributes","beamCartAttrs","addBeamAttributesToCart","allBeamAttributes","showBeamOrderPageWidgets","parentSelector","apiKey","baseUrl","DEFAULT_BASE_URL","postalCode","discountCodes","countryCode","orderId","email","cartTotal","promoCodes","htmlPromoCodes","currencyCode","domain","lang","debug","parentElement","waitForElement","BeamError","getCookieValue","beamLocalStorage","existingValue","widget"],"mappings":"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"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as O,i as T,a as j}from"./lodash-D3TLHRR_.esm.js";import{i as x,d as K,c as W,j as M,h as q,g as z}from"./events-DahlkyxO.esm.js";import{logger as g}from"../utils/logger.esm.js";import{initNetworkListeners as F}from"../utils/network-listeners.esm.js";import{createScopedLocalStorage as J}from"../utils/local-storage.esm.js";import{memoizeLast as U}from"../utils/memoize-last.esm.js";import"./promo-types-DKAOFHJr.esm.js";import{B as A}from"./cart-contents-DkoytiZh.esm.js";import{O as E}from"./update-cart-CmyZ_Qmv.esm.js";import{W as G,D as V}from"./routes-Ck-AZVsH.esm.js";import{getBeamCartId as D,getExternalCartId as $}from"../utils/cart.esm.js";import"../components/post-purchase.esm.js";import{waitForElement as Q}from"../utils/wait-for-element.esm.js";import{B as X}from"./beam-errors-Ci0d3926.esm.js";import{getCookieValue as Z}from"../utils/cookies.esm.js";const N=window.Shopify?.routes?.root||"/";let R=!1;const H="cart";async function Y(t,c=!0){if(R)return!1;F(),window.addEventListener(K.eventName,async n=>{const e=n,o=/cart\/(add|change|update|clear)/,r=e.detail.type==="xhr"?e.detail.xhr.responseURL:e.detail.response.url,a=new URL(r);if(!o.test(a.pathname))return;const i=await B(t);i.changed&&E(t,i.cart)});let l,d;window.addEventListener(W.eventName,async n=>{const e=n;g.debug("[cart-page][BeamNonprofitSelectEvent]",e.detail);const{source:o,selectedNonprofitId:r,selectionId:a}=e.detail;if(o===G.select_nonprofit){if(l===r&&d===a)return;const i=await I(t);await h({...i,selectedNonprofitId:r,selectionId:a}),d=a,l=r}}),window.addEventListener(M.eventName,async n=>{const e=n;g.debug("[cart-page][BeamNonprofitSelectionRemovedEvent]",e.detail);const{newNonprofitId:o,selectionId:r}=e.detail;if(l===o&&d===r)return;const a=await I(t);await h({...a,selectedNonprofitId:null,selectionId:r}),d=r,l=o}),window.addEventListener(q.eventName,async n=>{const e=n;if(g.debug("[cart-page][BeamCartCreatedEvent]",e.detail),window.statsig||c){const o=await I(t);await h(o)}}),window.addEventListener(z.eventName,async n=>{const e=n;if(g.debug("[cart-page][BeamCartChangeEvent]",e.detail),window.statsig||c){const o=await I(t);await h(o)}});const m=await B(t);return await E(t,m.cart,!0),R=!0,!0}async function P(t){const c=await I(t);await h(c)}async function I(t){let c,l;if(window.statsig)try{const o=window.statsig;typeof o?.getLayer("beam_trial_layer")?.get("show_beam")=="boolean"&&(c=o.getLayer("beam_trial_layer").get("show_beam",!1),l=o.getStableID())}catch{}const d=$(H,t),m=D(A,t),{chainId:n,storeId:e}=t;return{showBeam:c??void 0,remoteSessionId:l??void 0,beamCartId:m&&m!=="null"?m:void 0,cartId:d&&d!=="null"?d:void 0,chainId:n,storeId:e}}const tt=P;async function B(t){const{token:c,total_price:l,item_count:d,currency:m,items:n,cart_level_discount_applications:e,attributes:o}=await L();let r=!1;const a=J(t),i=a.getItemJson("cart"),b=D(A,t),_={cartId:c,beamCartId:b,subtotal:l/100,itemCount:d,currencyCode:m,schema:{source:"generic"},content:{items:n.map(({sku:p,final_line_price:y,product_id:u,line_level_discount_allocations:C})=>{const s=p||String(u),v=y/100,S=C?.map(({discount_application:k})=>({code:k?.title,applicable:!0}));return{remoteProductIdentifier:s,localAmount:v,discounts:S}}),discounts:e.map(({title:p})=>({code:p,applicable:!0}))}};let f=null;try{o?.beam&&(f=JSON.parse(o.beam))}catch(p){g.error(p)}let w=!1;if(f){const{nonprofit_id:p,selection_id:y}=f;if(p!==void 0){const u=String(p);a.getItem("nonprofit")!==u&&(a.setItem("nonprofit",u),w=!0)}if(y!=null){const u=String(y);a.getItem("transaction")!==u&&(a.setItem("transaction",u),w=!0)}}return w&&window.dispatchEvent(new x({nonprofitId:f?.nonprofit_id,selectionId:f?.selection_id})),T(_,{...i,beamCartId:i?.beamCartId})||(r=!0),{changed:r,cart:_}}const et=E,L=async function(){return await window.fetch(N+"cart.js",{method:"GET",headers:{"Content-Type":"application/json"}}).then(t=>t.json())},h=U(async function({selectedNonprofitId:t,selectionId:c,beamCartId:l,cartId:d,chainId:m,storeId:n,showBeam:e,remoteSessionId:o}){const{attributes:r}=await L(),a=r?.beam;let i={};try{a&&(i=JSON.parse(a))}catch(w){g.error(w)}const b=O({nonprofit_id:t,selection_id:c,beam_cart_id:l,shopify_cart_id:d,chain_id:m,store_id:n,show_beam:e,remote_session_id:o},j),_={...i,...b};t===null&&(_.nonprofit_id=void 0);const f={beam:JSON.stringify(_)};if(!T(_,i))try{await window.fetch(N+"cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:f})})}catch(w){g.error(w)}}),ot=U(async function({selectedNonprofitId:t,selectionId:c,beamCartId:l,cartId:d,chainId:m,storeId:n}){let e,o;if(window.statsig)try{const i=window.statsig;typeof i?.getLayer("beam_trial_layer")?.get("show_beam")=="boolean"&&(e=i.getLayer("beam_trial_layer").get("show_beam",!1),o=i.getStableID())}catch{}const r=O({nonprofit_id:t,selection_id:c,beam_cart_id:l,shopify_cart_id:d,chain_id:m,store_id:n,show_beam:e,remote_session_id:o},j);t===null&&(r.nonprofit_id=void 0);const a={beam:JSON.stringify(r)};try{await window.fetch(N+"cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:a})})}catch(i){g.error(i)}});async function at({parentSelector:t=".step__sections",apiKey:c,baseUrl:l=V,storeId:d,postalCode:m,discountCodes:n,countryCode:e,orderId:o,email:r,cartTotal:a,cart:i,promoCodes:b,htmlPromoCodes:_,currencyCode:f="USD",domain:w,lang:p="en",debug:y=!1}){const u=document.querySelector(t)||await Q(t);if(!u)throw new X(`Timed out waiting for selector '${t}'. Could not render Beam post-purchase widget.`);const C=await Z("cart");if(C){const v=J({apiKey:c}),S=v.getItemJson("cart")||{};v.setItemJson("cart",{...S,cartId:C})}const s=document.createElement("beam-post-purchase");s.apiKey=c,s.baseUrl=l,s.storeId=d,s.postalCode=m,s.countryCode=e,s.orderId=String(o),s.email=r,s.cartTotal=a,s.cart=i,s.promoCodes=b,s.htmlPromoCodes=_,s.discountCodes=n,s.currencyCode=f,s.domain=w,s.lang=p,s.debug=y,u.appendChild(s)}export{L as B,h as C,P as D,Y as Q,B as S,tt as V,et as X,ot as Z,I as b,at as s};
|
|
2
|
-
//# sourceMappingURL=order-page-CtQ9OX_A.esm.js.map
|