@beamimpact/web-sdk 1.45.2 → 1.46.0
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--DwhY4w7.esm.js +2 -0
- package/dist/chunks/_share-dialog-dependencies--DwhY4w7.esm.js.map +1 -0
- package/dist/chunks/_share-dialog-dependencies-XEpMl5XM.esm.js +2 -0
- package/dist/chunks/_share-dialog-dependencies-XEpMl5XM.esm.js.map +1 -0
- package/dist/chunks/{cart-contents-HAPzwbeL.esm.d.ts → cart-contents-MrYQNVDx.esm.d.ts} +1 -1
- package/dist/chunks/{events-fqRWfo7p.esm.d.ts → events--Qgk7Mel.esm.d.ts} +1 -1
- package/dist/chunks/{index--JacA4R2.esm.js → index-2sMT9J8K.esm.js} +2 -2
- package/dist/chunks/{index--JacA4R2.esm.js.map → index-2sMT9J8K.esm.js.map} +1 -1
- package/dist/chunks/index-4kINfIHU.esm.js +2 -0
- package/dist/chunks/index-4kINfIHU.esm.js.map +1 -0
- package/dist/chunks/{index-MSoONvC5.esm.d.ts → index-8gDNc2to.esm.d.ts} +1 -1
- package/dist/chunks/index-COmf0U0P.esm.js +2 -0
- package/dist/chunks/index-COmf0U0P.esm.js.map +1 -0
- package/dist/chunks/{index-qs-xQCeM.esm.js → index-Fmt8u1QB.esm.js} +2 -2
- package/dist/chunks/{index-qs-xQCeM.esm.js.map → index-Fmt8u1QB.esm.js.map} +1 -1
- package/dist/chunks/index-H8fABpZF.esm.js +2 -0
- package/dist/chunks/index-H8fABpZF.esm.js.map +1 -0
- package/dist/chunks/index-HzqAV0Ls.esm.js +2 -0
- package/dist/chunks/index-HzqAV0Ls.esm.js.map +1 -0
- package/dist/chunks/{index-qt5iD9Ok.esm.d.ts → index-Ie9en2n6.esm.d.ts} +1 -1
- package/dist/chunks/{index-SExnliMs.esm.d.ts → index-S_lCvtkH.esm.d.ts} +1 -1
- package/dist/chunks/{index-JG4nmG9U.esm.d.ts → index-gQHtJWVP.esm.d.ts} +1 -1
- package/dist/chunks/{index-tdUx2WLc.esm.d.ts → index-ikzViFqS.esm.d.ts} +4 -4
- package/dist/chunks/{index-7mukhxz_.esm.d.ts → index-wqLh9Pnq.esm.d.ts} +1 -1
- package/dist/chunks/index-y4dGW0m2.esm.js +2 -0
- package/dist/chunks/index-y4dGW0m2.esm.js.map +1 -0
- package/dist/chunks/index-yhi0tTdC.esm.js +2 -0
- package/dist/chunks/index-yhi0tTdC.esm.js.map +1 -0
- package/dist/chunks/localize-m-_ESmpk.esm.js.map +1 -1
- package/dist/chunks/localize-o-cYvHQf.esm.js.map +1 -1
- package/dist/chunks/{openapi-spec-RlP2IT1i.esm.d.ts → openapi-spec--os_utEo.esm.d.ts} +55 -1
- package/dist/chunks/order-page--Xn2Rb6J.esm.js +2 -0
- package/dist/chunks/{order-page-KZ7xLkRW.esm.js.map → order-page--Xn2Rb6J.esm.js.map} +1 -1
- package/dist/chunks/{order-page-FLhpaZg2.esm.d.ts → order-page-GwRa273v.esm.d.ts} +3 -3
- package/dist/chunks/order-page-uEOo5EPy.esm.js +2 -0
- package/dist/chunks/{order-page-mlWRT5YL.esm.js.map → order-page-uEOo5EPy.esm.js.map} +1 -1
- package/dist/chunks/{promo-pill-label-58PJRvSl.esm.js → promo-pill-label-P1X4xeAx.esm.js} +4 -3
- package/dist/chunks/promo-pill-label-P1X4xeAx.esm.js.map +1 -0
- package/dist/chunks/{routes-FBB1GA4-.esm.js → routes-F1ZIumMP.esm.js} +2 -2
- package/dist/chunks/{routes-FBB1GA4-.esm.js.map → routes-F1ZIumMP.esm.js.map} +1 -1
- package/dist/chunks/{routes-NIuAzAOC.esm.d.ts → routes-iurI6dvR.esm.d.ts} +71 -1
- package/dist/chunks/{routes-jmFlXAbv.esm.js → routes-sQWfbAoi.esm.js} +2 -2
- package/dist/chunks/{routes-jmFlXAbv.esm.js.map → routes-sQWfbAoi.esm.js.map} +1 -1
- package/dist/chunks/{share-button-bQ8brpBZ.esm.js → share-button-2RaDSzSs.esm.js} +3 -4
- package/dist/chunks/{share-button-hLOsYlSA.esm.js.map → share-button-2RaDSzSs.esm.js.map} +1 -1
- package/dist/chunks/{share-button-hLOsYlSA.esm.js → share-button-_QWVlCcB.esm.js} +3 -4
- package/dist/chunks/{share-button-bQ8brpBZ.esm.js.map → share-button-_QWVlCcB.esm.js.map} +1 -1
- package/dist/chunks/{shoelace-components-leDI-Yop.esm.js → shoelace-components-9s7uTeO6.esm.js} +2 -2
- package/dist/chunks/{shoelace-components-leDI-Yop.esm.js.map → shoelace-components-9s7uTeO6.esm.js.map} +1 -1
- package/dist/chunks/{shoelace-components-qjNlvvPx.esm.js → shoelace-components-tjFhbEiI.esm.js} +2 -2
- package/dist/chunks/{shoelace-components-qjNlvvPx.esm.js.map → shoelace-components-tjFhbEiI.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-Hebtxhto.esm.d.ts → update-cart-KjKc8Cls.esm.d.ts} +1 -1
- package/dist/chunks/{update-cart-aKQ3Cjc8.esm.js → update-cart-T7h4g2nt.esm.js} +2 -2
- package/dist/chunks/{update-cart-aKQ3Cjc8.esm.js.map → update-cart-T7h4g2nt.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-j9LPS5By.esm.js → update-cart-WyIeEybK.esm.js} +2 -2
- package/dist/chunks/{update-cart-j9LPS5By.esm.js.map → update-cart-WyIeEybK.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.esm.js.map +1 -1
- package/dist/components/cumulative-impact.js +1 -1
- package/dist/components/cumulative-impact.js.map +1 -1
- package/dist/components/impact-overview.d.ts +5 -1
- package/dist/components/impact-overview.esm.js +31 -25
- package/dist/components/impact-overview.esm.js.map +1 -1
- package/dist/components/impact-overview.js +31 -25
- package/dist/components/impact-overview.js.map +1 -1
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/post-purchase.d.ts +4 -2
- package/dist/components/post-purchase.esm.js +1 -1
- package/dist/components/post-purchase.js +1 -1
- package/dist/components/product-details-page.d.ts +6 -1
- package/dist/components/product-details-page.esm.js +106 -33
- package/dist/components/product-details-page.esm.js.map +1 -1
- package/dist/components/product-details-page.js +106 -33
- package/dist/components/product-details-page.js.map +1 -1
- package/dist/components/redeem-transaction.d.ts +2 -2
- package/dist/components/redeem-transaction.esm.js +2 -2
- package/dist/components/redeem-transaction.esm.js.map +1 -1
- package/dist/components/redeem-transaction.js +2 -2
- package/dist/components/redeem-transaction.js.map +1 -1
- package/dist/components/select-nonprofit.d.ts +2 -2
- package/dist/components/select-nonprofit.esm.js +4 -4
- package/dist/components/select-nonprofit.esm.js.map +1 -1
- package/dist/components/select-nonprofit.js +4 -4
- package/dist/components/select-nonprofit.js.map +1 -1
- package/dist/components/select-subscription-nonprofit.esm.js +6 -4
- package/dist/components/select-subscription-nonprofit.esm.js.map +1 -1
- package/dist/components/select-subscription-nonprofit.js +6 -4
- package/dist/components/select-subscription-nonprofit.js.map +1 -1
- package/dist/components/shopify.d.ts +6 -6
- package/dist/components/shopify.esm.js +1 -1
- package/dist/components/shopify.js +1 -1
- package/dist/components/social-share.esm.js +1 -1
- package/dist/components/social-share.js +1 -1
- package/dist/components/subscription-impact.d.ts +2 -0
- package/dist/components/subscription-impact.esm.js +1 -1
- package/dist/components/subscription-impact.js +1 -1
- package/dist/components/subscription-management.d.ts +6 -3
- package/dist/components/subscription-management.esm.js +10 -10
- package/dist/components/subscription-management.esm.js.map +1 -1
- package/dist/components/subscription-management.js +10 -10
- package/dist/components/subscription-management.js.map +1 -1
- package/dist/index.d.ts +12 -12
- 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.d.ts +3 -3
- package/dist/integrations/cart.esm.js +1 -1
- package/dist/integrations/cart.js +1 -1
- package/dist/integrations/index.d.ts +10 -10
- package/dist/integrations/index.esm.js +1 -1
- package/dist/integrations/index.js +1 -1
- package/dist/integrations/logs.d.ts +2 -2
- package/dist/integrations/logs.esm.js +1 -1
- package/dist/integrations/logs.js +1 -1
- package/dist/integrations/shopify.d.ts +5 -5
- package/dist/integrations/shopify.esm.js +1 -1
- package/dist/integrations/shopify.js +1 -1
- package/dist/integrations/statsig.d.ts +3 -0
- package/dist/integrations/statsig.esm.js +3 -3
- package/dist/integrations/statsig.esm.js.map +1 -1
- package/dist/integrations/statsig.js +3 -3
- package/dist/integrations/statsig.js.map +1 -1
- package/dist/integrations/utils.d.ts +3 -3
- 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 +4 -4
- package/dist/react/index.esm.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/post-purchase.d.ts +2 -2
- package/dist/react/post-purchase.esm.js +1 -1
- package/dist/react/post-purchase.js +1 -1
- package/dist/react/product-details-page.d.ts +2 -0
- package/dist/react/product-details-page.esm.js +1 -1
- package/dist/react/product-details-page.esm.js.map +1 -1
- package/dist/react/product-details-page.js +1 -1
- package/dist/react/product-details-page.js.map +1 -1
- package/dist/react/redeem-transaction.d.ts +3 -3
- package/dist/react/redeem-transaction.esm.js +1 -1
- package/dist/react/redeem-transaction.js +1 -1
- package/dist/react/select-nonprofit.d.ts +3 -3
- 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 +3 -3
- 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.d.ts +3 -3
- package/dist/react/subscription-management.esm.js +1 -1
- package/dist/react/subscription-management.js +1 -1
- package/dist/utils/events.d.ts +3 -3
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/local-storage.esm.js.map +1 -1
- package/dist/utils/local-storage.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/_share-dialog-dependencies-R9RsuSGx.esm.js +0 -2
- package/dist/chunks/_share-dialog-dependencies-R9RsuSGx.esm.js.map +0 -1
- package/dist/chunks/_share-dialog-dependencies-o5GBtNTA.esm.js +0 -2
- package/dist/chunks/_share-dialog-dependencies-o5GBtNTA.esm.js.map +0 -1
- package/dist/chunks/index-1WxwWfcp.esm.js +0 -2
- package/dist/chunks/index-1WxwWfcp.esm.js.map +0 -1
- package/dist/chunks/index-4fdLArZg.esm.js +0 -2
- package/dist/chunks/index-4fdLArZg.esm.js.map +0 -1
- package/dist/chunks/index-Hd_2hpsA.esm.js +0 -2
- package/dist/chunks/index-Hd_2hpsA.esm.js.map +0 -1
- package/dist/chunks/index-MJNFm2RK.esm.js +0 -2
- package/dist/chunks/index-MJNFm2RK.esm.js.map +0 -1
- package/dist/chunks/index-gBAASIWa.esm.js +0 -2
- package/dist/chunks/index-gBAASIWa.esm.js.map +0 -1
- package/dist/chunks/index-lyf1T2wZ.esm.js +0 -2
- package/dist/chunks/index-lyf1T2wZ.esm.js.map +0 -1
- package/dist/chunks/order-page-KZ7xLkRW.esm.js +0 -2
- package/dist/chunks/order-page-mlWRT5YL.esm.js +0 -2
- package/dist/chunks/promo-pill-label-58PJRvSl.esm.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
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--Qgk7Mel.esm.js';
|
|
4
4
|
import { BeamSelectSubscriptionNonprofit as BeamSelectSubscriptionNonprofit$1 } from '../components/select-subscription-nonprofit.js';
|
|
5
|
-
import '../chunks/cart-contents-
|
|
6
|
-
import '../chunks/openapi-spec
|
|
5
|
+
import '../chunks/cart-contents-MrYQNVDx.esm.js';
|
|
6
|
+
import '../chunks/openapi-spec--os_utEo.esm.js';
|
|
7
7
|
import '../chunks/types-zbTZ8-KP.esm.js';
|
|
8
8
|
import 'lit-html';
|
|
9
9
|
import 'lit';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r from"react";import{l as e}from"../chunks/lit-iNN5L_Qk.esm.js";import{c as m}from"../chunks/events-_4nImo3u.esm.js";import{BeamSelectSubscriptionNonprofit as t}from"../components/select-subscription-nonprofit.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-
|
|
1
|
+
import r from"react";import{l as e}from"../chunks/lit-iNN5L_Qk.esm.js";import{c as m}from"../chunks/events-_4nImo3u.esm.js";import{BeamSelectSubscriptionNonprofit as t}from"../components/select-subscription-nonprofit.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-sQWfbAoi.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";import"../chunks/localize-o-cYvHQf.esm.js";import"../chunks/progress-bar-PMU_xI3L.esm.js";import"../chunks/enforce-config-ZAI7WYAd.esm.js";import"../chunks/loading-template-t4fFsYtr.esm.js";import"../utils/makeApiKeyHeader.esm.js";import"../utils/local-storage.esm.js";import"../chunks/css-card-grid-nEc--M5M.esm.js";import"../components/beam-partner-logos.esm.js";const o=e({tagName:t.tagName,elementClass:t,react:r,events:{onNonprofitSelect:m.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 e}from"../chunks/lit-iNN5L_Qk.esm.js";import{c as m}from"../chunks/events-_4nImo3u.esm.js";import{BeamSelectSubscriptionNonprofit as t}from"../components/select-subscription-nonprofit.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-
|
|
1
|
+
import r from"react";import{l as e}from"../chunks/lit-iNN5L_Qk.esm.js";import{c as m}from"../chunks/events-_4nImo3u.esm.js";import{BeamSelectSubscriptionNonprofit as t}from"../components/select-subscription-nonprofit.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-F1ZIumMP.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";import"../chunks/localize-m-_ESmpk.esm.js";import"../chunks/progress-bar-PMU_xI3L.esm.js";import"../chunks/enforce-config-ZyPq_4CF.esm.js";import"../chunks/loading-template-t4fFsYtr.esm.js";import"../utils/makeApiKeyHeader.js";import"../utils/local-storage.js";import"../chunks/css-card-grid-nEc--M5M.esm.js";import"../components/beam-partner-logos.js";const o=e({tagName:t.tagName,elementClass:t,react:r,events:{onNonprofitSelect:m.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-iNN5L_Qk.esm.js";import{BeamSocialShare as m}from"../components/social-share.esm.js";import"../chunks/vendor-GKiOHg2N.esm.js";import"../chunks/shoelace-components-
|
|
1
|
+
import r from"react";import{l as t}from"../chunks/lit-iNN5L_Qk.esm.js";import{BeamSocialShare as m}from"../components/social-share.esm.js";import"../chunks/vendor-GKiOHg2N.esm.js";import"../chunks/shoelace-components-9s7uTeO6.esm.js";import"../chunks/routes-sQWfbAoi.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";import"../chunks/progress-bar-PMU_xI3L.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/enforce-config-ZAI7WYAd.esm.js";import"../chunks/loading-template-t4fFsYtr.esm.js";import"../chunks/share-button-SNvuFDC9.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-iNN5L_Qk.esm.js";import{BeamSocialShare as m}from"../components/social-share.js";import"../chunks/vendor-GKiOHg2N.esm.js";import"../chunks/shoelace-components-
|
|
1
|
+
import r from"react";import{l as t}from"../chunks/lit-iNN5L_Qk.esm.js";import{BeamSocialShare as m}from"../components/social-share.js";import"../chunks/vendor-GKiOHg2N.esm.js";import"../chunks/shoelace-components-tjFhbEiI.esm.js";import"../chunks/routes-F1ZIumMP.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";import"../chunks/progress-bar-PMU_xI3L.esm.js";import"../components/beam-partner-logos.js";import"../chunks/enforce-config-ZyPq_4CF.esm.js";import"../chunks/loading-template-t4fFsYtr.esm.js";import"../chunks/share-button-SNvuFDC9.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-iNN5L_Qk.esm.js";import{BeamSubscriptionImpact as t}from"../components/subscription-impact.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/progress-bar-PMU_xI3L.esm.js";import"../chunks/share-button-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-iNN5L_Qk.esm.js";import{BeamSubscriptionImpact as t}from"../components/subscription-impact.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/progress-bar-PMU_xI3L.esm.js";import"../chunks/share-button-2RaDSzSs.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/vendor-GKiOHg2N.esm.js";import"../chunks/share-button-SNvuFDC9.esm.js";import"../chunks/routes-sQWfbAoi.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";import"../chunks/localize-o-cYvHQf.esm.js";import"../chunks/enforce-config-ZAI7WYAd.esm.js";import"../chunks/loading-template-t4fFsYtr.esm.js";import"../utils/makeApiKeyHeader.esm.js";import"../chunks/responsive-2lC2Wrtg.esm.js";import"../chunks/css-card-grid-nEc--M5M.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-iNN5L_Qk.esm.js";import{BeamSubscriptionImpact as t}from"../components/subscription-impact.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/progress-bar-PMU_xI3L.esm.js";import"../chunks/share-button-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-iNN5L_Qk.esm.js";import{BeamSubscriptionImpact as t}from"../components/subscription-impact.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/progress-bar-PMU_xI3L.esm.js";import"../chunks/share-button-_QWVlCcB.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/vendor-GKiOHg2N.esm.js";import"../chunks/share-button-SNvuFDC9.esm.js";import"../chunks/routes-F1ZIumMP.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";import"../chunks/localize-m-_ESmpk.esm.js";import"../chunks/enforce-config-ZyPq_4CF.esm.js";import"../chunks/loading-template-t4fFsYtr.esm.js";import"../utils/makeApiKeyHeader.js";import"../chunks/responsive-2lC2Wrtg.esm.js";import"../chunks/css-card-grid-nEc--M5M.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
|
|
@@ -2,9 +2,9 @@ import * as _lit_react from '@lit/react';
|
|
|
2
2
|
import { BeamSubscriptionManagement as BeamSubscriptionManagement$1 } from '../components/subscription-management.js';
|
|
3
3
|
import 'lit-html';
|
|
4
4
|
import 'lit';
|
|
5
|
-
import '../chunks/routes-
|
|
6
|
-
import '../chunks/cart-contents-
|
|
7
|
-
import '../chunks/openapi-spec
|
|
5
|
+
import '../chunks/routes-iurI6dvR.esm.js';
|
|
6
|
+
import '../chunks/cart-contents-MrYQNVDx.esm.js';
|
|
7
|
+
import '../chunks/openapi-spec--os_utEo.esm.js';
|
|
8
8
|
import '../components/select-subscription-nonprofit.js';
|
|
9
9
|
import 'lodash';
|
|
10
10
|
import '../chunks/types-zbTZ8-KP.esm.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-iNN5L_Qk.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-iNN5L_Qk.esm.js";import{BeamSubscriptionManagement as t}from"../components/subscription-management.esm.js";import"../chunks/routes-sQWfbAoi.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";import"../chunks/progress-bar-PMU_xI3L.esm.js";import"../chunks/enforce-config-ZAI7WYAd.esm.js";import"../chunks/localize-o-cYvHQf.esm.js";import"../chunks/events-_4nImo3u.esm.js";import"../components/select-subscription-nonprofit.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/loading-template-t4fFsYtr.esm.js";import"../utils/makeApiKeyHeader.esm.js";import"../utils/local-storage.esm.js";import"../chunks/css-card-grid-nEc--M5M.esm.js";import"../components/beam-partner-logos.esm.js";import"../components/subscription-impact.esm.js";import"../chunks/share-button-2RaDSzSs.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/vendor-GKiOHg2N.esm.js";import"../chunks/share-button-SNvuFDC9.esm.js";import"../chunks/responsive-2lC2Wrtg.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-iNN5L_Qk.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-iNN5L_Qk.esm.js";import{BeamSubscriptionManagement as t}from"../components/subscription-management.js";import"../chunks/routes-F1ZIumMP.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";import"../chunks/progress-bar-PMU_xI3L.esm.js";import"../chunks/enforce-config-ZyPq_4CF.esm.js";import"../chunks/localize-m-_ESmpk.esm.js";import"../chunks/events-_4nImo3u.esm.js";import"../components/select-subscription-nonprofit.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/loading-template-t4fFsYtr.esm.js";import"../utils/makeApiKeyHeader.js";import"../utils/local-storage.js";import"../chunks/css-card-grid-nEc--M5M.esm.js";import"../components/beam-partner-logos.js";import"../components/subscription-impact.js";import"../chunks/share-button-_QWVlCcB.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/vendor-GKiOHg2N.esm.js";import"../chunks/share-button-SNvuFDC9.esm.js";import"../chunks/responsive-2lC2Wrtg.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,4 +1,4 @@
|
|
|
1
|
-
import '../chunks/cart-contents-
|
|
1
|
+
import '../chunks/cart-contents-MrYQNVDx.esm.js';
|
|
2
2
|
import '../chunks/types-zbTZ8-KP.esm.js';
|
|
3
|
-
export { b as BeamCartChangeEvent, c as BeamCartCreatedEvent, a as BeamNetworkCallEvent, B as BeamNonprofitSelectEvent, g as BeamNonprofitSelectionRemovedEvent, d as BeamOrderCreatedEvent, f as BeamStatusChangeEvent } from '../chunks/events
|
|
4
|
-
import '../chunks/openapi-spec
|
|
3
|
+
export { b as BeamCartChangeEvent, c as BeamCartCreatedEvent, a as BeamNetworkCallEvent, B as BeamNonprofitSelectEvent, g as BeamNonprofitSelectionRemovedEvent, d as BeamOrderCreatedEvent, f as BeamStatusChangeEvent } from '../chunks/events--Qgk7Mel.esm.js';
|
|
4
|
+
import '../chunks/openapi-spec--os_utEo.esm.js';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { b as errors } from '../chunks/beam-errors-fXDkG1zo.esm.js';
|
|
2
|
-
export { e as events } from '../chunks/events
|
|
2
|
+
export { e as events } from '../chunks/events--Qgk7Mel.esm.js';
|
|
3
3
|
export { logger } from './logger.js';
|
|
4
4
|
export { fetchProxy, initNetworkListeners, xhrProxy } from './network-listeners.js';
|
|
5
5
|
export { createScopedLocalStorage } from './local-storage.js';
|
|
@@ -9,6 +9,6 @@ export { getRemoteSession, saveRemoteSession } from './remote-session.js';
|
|
|
9
9
|
export { memoizeLast } from './memoize-last.js';
|
|
10
10
|
export { default as debounce } from 'lodash-es/debounce';
|
|
11
11
|
export { default as isEqual } from 'lodash-es/isEqual';
|
|
12
|
-
import '../chunks/cart-contents-
|
|
13
|
-
import '../chunks/openapi-spec
|
|
12
|
+
import '../chunks/cart-contents-MrYQNVDx.esm.js';
|
|
13
|
+
import '../chunks/openapi-spec--os_utEo.esm.js';
|
|
14
14
|
import '../chunks/types-zbTZ8-KP.esm.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-storage.esm.js","sources":["../../src/utils/local-storage.ts"],"sourcesContent":["import { LocalStorageError } from \"./beam-errors\";\nimport { logger } from \"./logger\";\n\n/**\n * Creates an object that has the same API as normal localStorage, but adds a beam_ prefix and apiKey postfix to keys\n * Also adds helper methods for JSON (de-)serialization\n */\nexport const createScopedLocalStorage = (config: { apiKey: string }) => {\n
|
|
1
|
+
{"version":3,"file":"local-storage.esm.js","sources":["../../src/utils/local-storage.ts"],"sourcesContent":["import { LocalStorageError } from \"./beam-errors\";\nimport { logger } from \"./logger\";\n\n/**\n * Creates an object that has the same API as normal localStorage, but adds a beam_ prefix and apiKey postfix to keys\n * Also adds helper methods for JSON (de-)serialization\n */\nexport const createScopedLocalStorage = (config: { apiKey: string }) => {\n return {\n get prefix() {\n return `beam_`;\n },\n get postfix() {\n return `_key_${config.apiKey}`;\n },\n getItem(key: string): string | null {\n return localStorage.getItem(this.prefix + key + this.postfix);\n },\n setItem(key: string, value: unknown) {\n return localStorage.setItem(this.prefix + key + this.postfix, `${value}`);\n },\n removeItem(key: string) {\n return localStorage.removeItem(this.prefix + key + this.postfix);\n },\n /** Safely parses value as JSON and return JS object */\n getItemJson<T = Record<string, unknown>>(key: string) {\n try {\n const json = this.getItem(key);\n if (json) {\n return JSON.parse(json) as T;\n }\n } catch (err) {\n logger.error(new LocalStorageError(`Could not parse JSON: ${key}`));\n }\n return null;\n },\n /** Safely stringifies value as JSON */\n setItemJson(key: string, value: object) {\n return this.setItem(key, JSON.stringify(value));\n },\n };\n};\n"],"names":["createScopedLocalStorage","config","key","value","json","logger","LocalStorageError"],"mappings":"mGAOO,MAAMA,EAA4BC,IAChC,CACL,IAAI,QAAS,CACX,MAAO,OACT,EACA,IAAI,SAAU,CACZ,MAAO,QAAQA,EAAO,MAAM,EAC9B,EACA,QAAQC,EAA4B,CAClC,OAAO,aAAa,QAAQ,KAAK,OAASA,EAAM,KAAK,OAAO,CAC9D,EACA,QAAQA,EAAaC,EAAgB,CACnC,OAAO,aAAa,QAAQ,KAAK,OAASD,EAAM,KAAK,QAAS,GAAGC,CAAK,EAAE,CAC1E,EACA,WAAWD,EAAa,CACtB,OAAO,aAAa,WAAW,KAAK,OAASA,EAAM,KAAK,OAAO,CACjE,EAEA,YAAyCA,EAAa,CACpD,GAAI,CACF,MAAME,EAAO,KAAK,QAAQF,CAAG,EAC7B,GAAIE,EACF,OAAO,KAAK,MAAMA,CAAI,CAE1B,MAAc,CACZC,EAAO,MAAM,IAAIC,EAAkB,yBAAyBJ,CAAG,EAAE,CAAC,CACpE,CACA,OAAO,IACT,EAEA,YAAYA,EAAaC,EAAe,CACtC,OAAO,KAAK,QAAQD,EAAK,KAAK,UAAUC,CAAK,CAAC,CAChD,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-storage.js","sources":["../../src/utils/local-storage.ts"],"sourcesContent":["import { LocalStorageError } from \"./beam-errors\";\nimport { logger } from \"./logger\";\n\n/**\n * Creates an object that has the same API as normal localStorage, but adds a beam_ prefix and apiKey postfix to keys\n * Also adds helper methods for JSON (de-)serialization\n */\nexport const createScopedLocalStorage = (config: { apiKey: string }) => {\n
|
|
1
|
+
{"version":3,"file":"local-storage.js","sources":["../../src/utils/local-storage.ts"],"sourcesContent":["import { LocalStorageError } from \"./beam-errors\";\nimport { logger } from \"./logger\";\n\n/**\n * Creates an object that has the same API as normal localStorage, but adds a beam_ prefix and apiKey postfix to keys\n * Also adds helper methods for JSON (de-)serialization\n */\nexport const createScopedLocalStorage = (config: { apiKey: string }) => {\n return {\n get prefix() {\n return `beam_`;\n },\n get postfix() {\n return `_key_${config.apiKey}`;\n },\n getItem(key: string): string | null {\n return localStorage.getItem(this.prefix + key + this.postfix);\n },\n setItem(key: string, value: unknown) {\n return localStorage.setItem(this.prefix + key + this.postfix, `${value}`);\n },\n removeItem(key: string) {\n return localStorage.removeItem(this.prefix + key + this.postfix);\n },\n /** Safely parses value as JSON and return JS object */\n getItemJson<T = Record<string, unknown>>(key: string) {\n try {\n const json = this.getItem(key);\n if (json) {\n return JSON.parse(json) as T;\n }\n } catch (err) {\n logger.error(new LocalStorageError(`Could not parse JSON: ${key}`));\n }\n return null;\n },\n /** Safely stringifies value as JSON */\n setItemJson(key: string, value: object) {\n return this.setItem(key, JSON.stringify(value));\n },\n };\n};\n"],"names":["createScopedLocalStorage","config","key","value","json","logger","LocalStorageError"],"mappings":"+FAOO,MAAMA,EAA4BC,IAChC,CACL,IAAI,QAAS,CACX,MAAO,OACT,EACA,IAAI,SAAU,CACZ,MAAO,QAAQA,EAAO,MAAM,EAC9B,EACA,QAAQC,EAA4B,CAClC,OAAO,aAAa,QAAQ,KAAK,OAASA,EAAM,KAAK,OAAO,CAC9D,EACA,QAAQA,EAAaC,EAAgB,CACnC,OAAO,aAAa,QAAQ,KAAK,OAASD,EAAM,KAAK,QAAS,GAAGC,CAAK,EAAE,CAC1E,EACA,WAAWD,EAAa,CACtB,OAAO,aAAa,WAAW,KAAK,OAASA,EAAM,KAAK,OAAO,CACjE,EAEA,YAAyCA,EAAa,CACpD,GAAI,CACF,MAAME,EAAO,KAAK,QAAQF,CAAG,EAC7B,GAAIE,EACF,OAAO,KAAK,MAAMA,CAAI,CAE1B,MAAc,CACZC,EAAO,MAAM,IAAIC,EAAkB,yBAAyBJ,CAAG,EAAE,CAAC,CACpE,CACA,OAAO,IACT,EAEA,YAAYA,EAAaC,EAAe,CACtC,OAAO,KAAK,QAAQD,EAAK,KAAK,UAAUC,CAAK,CAAC,CAChD,CACF"}
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"./vendor-GKiOHg2N.esm.js";import"./shoelace-components-qjNlvvPx.esm.js";import"./lit-iNN5L_Qk.esm.js";import"./routes-jmFlXAbv.esm.js";import"./beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";
|
|
2
|
-
//# sourceMappingURL=_share-dialog-dependencies-R9RsuSGx.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_share-dialog-dependencies-R9RsuSGx.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_share-dialog-dependencies-o5GBtNTA.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p as e,w as r,J as t,s as a,q as o}from"./order-page-mlWRT5YL.esm.js";var s=Object.freeze({__proto__:null,addBeamAttributesToCart:e,getCurrentCart:r,registerCartIntegration:t,showBeamOrderPageWidgets:a,trackCart:o});export{s as i};
|
|
2
|
-
//# sourceMappingURL=index-1WxwWfcp.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-1WxwWfcp.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p as e,w as r,J as t,s as a,q as o}from"./order-page-KZ7xLkRW.esm.js";var s=Object.freeze({__proto__:null,addBeamAttributesToCart:e,getCurrentCart:r,registerCartIntegration:t,showBeamOrderPageWidgets:a,trackCart:o});export{s as i};
|
|
2
|
-
//# sourceMappingURL=index-4fdLArZg.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-4fdLArZg.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-Hd_2hpsA.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i}from"./index-z8c9I9IQ.esm.js";import{i as o}from"./index-4fdLArZg.esm.js";import{i as r}from"./index-eXilYHHK.esm.js";import{i as e}from"./index-lyf1T2wZ.esm.js";import{i as m}from"./index-qs-xQCeM.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-MJNFm2RK.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-MJNFm2RK.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i}from"./index-x2kxA_Xo.esm.js";import{i as o}from"./index-1WxwWfcp.esm.js";import{i as r}from"./index-JDZQClkA.esm.js";import{i as e}from"./index-Hd_2hpsA.esm.js";import{i as m}from"./index--JacA4R2.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-gBAASIWa.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-gBAASIWa.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-lyf1T2wZ.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as U}from"./lodash-P8OIs-at.esm.js";import{b as J,d as O,c as j,g as k}from"./events-_4nImo3u.esm.js";import{logger as D}from"../utils/logger.esm.js";import{initNetworkListeners as K}from"../utils/network-listeners.esm.js";import{createScopedLocalStorage as S}from"../utils/local-storage.esm.js";import{getCookieValue as N}from"../utils/cookies.esm.js";import{memoizeLast as R}from"../utils/memoize-last.esm.js";import{B as C}from"./cart-contents-h60geKWa.esm.js";import{K as y}from"./update-cart-aKQ3Cjc8.esm.js";import{W as x,D as q}from"./routes-jmFlXAbv.esm.js";import{getExternalCartId as B,getBeamCartId as b}from"../utils/cart.esm.js";import"../components/post-purchase.esm.js";import{waitForElement as M}from"../utils/wait-for-element.esm.js";import{B as P}from"./beam-errors-P-Lu07Ce.esm.js";const L=window.Shopify?.routes?.root||"/";let T=!1;const E="cart";async function W(t){if(T)return!1;const l=await v(t),p=N(E);l.cart.cartId!==p&&await y(t,l.cart),await _({}),K(),window.addEventListener(J.eventName,async s=>{const r=s,n=/cart\/(add|change|update|clear)/,o=r.detail.type==="xhr"?r.detail.xhr.responseURL:r.detail.response.url,a=new URL(o);if(!n.test(a.pathname))return;const i=await v(t);if(!i.changed)return;const c={schema:i.cart.schema,content:{items:i.cart.content.items,discounts:i.cart.content.discounts}};window.dispatchEvent(new O(c)),await y(t,i.cart)});let d,m;return window.addEventListener(j.eventName,async s=>{const r=s,{source:n,selectedNonprofitId:o,selectionId:a}=r.detail;if(n===x.select_nonprofit){const i=B(E,t),c=b(C,t),{chainId:u,storeId:I}=t;if(d===o&&m===a)return;await _({selectedNonprofitId:o,selectionId:a,beamCartId:c||void 0,cartId:i||void 0,chainId:u,storeId:I}),m=a,d=o}}),window.addEventListener(k.eventName,async s=>{const r=s,{newNonprofitId:n,selectionId:o}=r.detail,a=B(E,t),i=b(C,t),{chainId:c,storeId:u}=t;d===n&&m===o||(await _({selectedNonprofitId:n,beamCartId:i||void 0,selectionId:o,cartId:a||void 0,chainId:c,storeId:u}),m=o,d=n)}),T=!0,!0}async function v(t){const{token:l,total_price:p,item_count:d,currency:m,items:s,cart_level_discount_applications:r}=await window.fetch(L+"cart.js",{method:"GET",headers:{"Content-Type":"application/json"}}).then(c=>c.json());let n=!1;const o=S(t).getItemJson("cart"),a=b(C,t),i={cartId:l,beamCartId:a,subtotal:p/100,itemCount:d,currencyCode:m,schema:{source:"generic"},content:{items:s.map(({sku:c,final_line_price:u,product_id:I,line_level_discount_allocations:g})=>{const f=c||String(I),w=u/100,e=g?.map(({discount_application:h})=>({code:h?.title,applicable:!0}));return{remoteProductIdentifier:f,localAmount:w,discounts:e}}),discounts:r.map(({title:c})=>({code:c,applicable:!0}))}};return U(i,{...o,beamCartId:o?.beamCartId})||(n=!0),{changed:n,cart:i}}const F=y,_=R(async function({selectedNonprofitId:t,selectionId:l,beamCartId:p,cartId:d,chainId:m,storeId:s}){let r,n;if(window.statsig){const a=window.statsig;r=a.getLayer("beam_trial_layer").get("show_beam",!1),n=a.getStableID()}const o={beam:JSON.stringify({nonprofit_id:t,selection_id:l,beam_cart_id:p,shopify_cart_id:d,chain_id:m,store_id:s,show_beam:r,remote_session_id:n})};try{await window.fetch(L+"cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:o})})}catch(a){D.error(a)}});async function G({parentSelector:t=".step__sections",apiKey:l,baseUrl:p=q,storeId:d,postalCode:m,countryCode:s,orderId:r,email:n,cartTotal:o,cart:a,discountCodes:i,currencyCode:c="USD",domain:u,lang:I="en",debug:g=!1}){const f=document.querySelector(t)||await M(t);if(!f)throw new P(`Timed out waiting for selector '${t}'. Could not render Beam post-purchase widget.`);const w=await N("cart");if(w){const h=S({apiKey:l}),A=h.getItemJson("cart")||{};h.setItemJson("cart",{...A,cartId:w})}const e=document.createElement("beam-post-purchase");e.apiKey=l,e.baseUrl=p,e.storeId=d,e.postalCode=m,e.countryCode=s,e.orderId=String(r),e.email=n,e.cartTotal=o,e.cart=a,e.discountCodes=i,e.currencyCode=c,e.domain=u,e.lang=I,e.debug=g,f.appendChild(e)}export{W as J,_ as p,F as q,G as s,v as w};
|
|
2
|
-
//# sourceMappingURL=order-page-KZ7xLkRW.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as U}from"./lodash-P8OIs-at.esm.js";import{b as J,d as O,c as j,g as k}from"./events-_4nImo3u.esm.js";import{logger as D}from"../utils/logger.js";import{initNetworkListeners as K}from"../utils/network-listeners.js";import{createScopedLocalStorage as S}from"../utils/local-storage.js";import{getCookieValue as N}from"../utils/cookies.js";import{memoizeLast as R}from"../utils/memoize-last.js";import{B as C}from"./cart-contents-h60geKWa.esm.js";import{K as y}from"./update-cart-j9LPS5By.esm.js";import{W as x,D as q}from"./routes-FBB1GA4-.esm.js";import{getExternalCartId as B,getBeamCartId as b}from"../utils/cart.js";import"../components/post-purchase.js";import{waitForElement as M}from"../utils/wait-for-element.js";import{B as P}from"./beam-errors-P-Lu07Ce.esm.js";const L=window.Shopify?.routes?.root||"/";let T=!1;const E="cart";async function W(t){if(T)return!1;const l=await v(t),p=N(E);l.cart.cartId!==p&&await y(t,l.cart),await _({}),K(),window.addEventListener(J.eventName,async s=>{const r=s,n=/cart\/(add|change|update|clear)/,o=r.detail.type==="xhr"?r.detail.xhr.responseURL:r.detail.response.url,a=new URL(o);if(!n.test(a.pathname))return;const i=await v(t);if(!i.changed)return;const c={schema:i.cart.schema,content:{items:i.cart.content.items,discounts:i.cart.content.discounts}};window.dispatchEvent(new O(c)),await y(t,i.cart)});let d,m;return window.addEventListener(j.eventName,async s=>{const r=s,{source:n,selectedNonprofitId:o,selectionId:a}=r.detail;if(n===x.select_nonprofit){const i=B(E,t),c=b(C,t),{chainId:u,storeId:I}=t;if(d===o&&m===a)return;await _({selectedNonprofitId:o,selectionId:a,beamCartId:c||void 0,cartId:i||void 0,chainId:u,storeId:I}),m=a,d=o}}),window.addEventListener(k.eventName,async s=>{const r=s,{newNonprofitId:n,selectionId:o}=r.detail,a=B(E,t),i=b(C,t),{chainId:c,storeId:u}=t;d===n&&m===o||(await _({selectedNonprofitId:n,beamCartId:i||void 0,selectionId:o,cartId:a||void 0,chainId:c,storeId:u}),m=o,d=n)}),T=!0,!0}async function v(t){const{token:l,total_price:p,item_count:d,currency:m,items:s,cart_level_discount_applications:r}=await window.fetch(L+"cart.js",{method:"GET",headers:{"Content-Type":"application/json"}}).then(c=>c.json());let n=!1;const o=S(t).getItemJson("cart"),a=b(C,t),i={cartId:l,beamCartId:a,subtotal:p/100,itemCount:d,currencyCode:m,schema:{source:"generic"},content:{items:s.map(({sku:c,final_line_price:u,product_id:I,line_level_discount_allocations:g})=>{const f=c||String(I),w=u/100,e=g?.map(({discount_application:h})=>({code:h?.title,applicable:!0}));return{remoteProductIdentifier:f,localAmount:w,discounts:e}}),discounts:r.map(({title:c})=>({code:c,applicable:!0}))}};return U(i,{...o,beamCartId:o?.beamCartId})||(n=!0),{changed:n,cart:i}}const F=y,_=R(async function({selectedNonprofitId:t,selectionId:l,beamCartId:p,cartId:d,chainId:m,storeId:s}){let r,n;if(window.statsig){const a=window.statsig;r=a.getLayer("beam_trial_layer").get("show_beam",!1),n=a.getStableID()}const o={beam:JSON.stringify({nonprofit_id:t,selection_id:l,beam_cart_id:p,shopify_cart_id:d,chain_id:m,store_id:s,show_beam:r,remote_session_id:n})};try{await window.fetch(L+"cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:o})})}catch(a){D.error(a)}});async function G({parentSelector:t=".step__sections",apiKey:l,baseUrl:p=q,storeId:d,postalCode:m,countryCode:s,orderId:r,email:n,cartTotal:o,cart:a,discountCodes:i,currencyCode:c="USD",domain:u,lang:I="en",debug:g=!1}){const f=document.querySelector(t)||await M(t);if(!f)throw new P(`Timed out waiting for selector '${t}'. Could not render Beam post-purchase widget.`);const w=await N("cart");if(w){const h=S({apiKey:l}),A=h.getItemJson("cart")||{};h.setItemJson("cart",{...A,cartId:w})}const e=document.createElement("beam-post-purchase");e.apiKey=l,e.baseUrl=p,e.storeId=d,e.postalCode=m,e.countryCode=s,e.orderId=String(r),e.email=n,e.cartTotal=o,e.cart=a,e.discountCodes=i,e.currencyCode=c,e.domain=u,e.lang=I,e.debug=g,f.appendChild(e)}export{W as J,_ as p,F as q,G as s,v as w};
|
|
2
|
-
//# sourceMappingURL=order-page-mlWRT5YL.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promo-pill-label-58PJRvSl.esm.js","sources":["../../src/shared/components/promo-pill-label.ts"],"sourcesContent":["import { css, html, LitElement } from \"lit\";\nimport { property } from \"lit/decorators/property.js\";\nimport \"@shoelace-style/shoelace/dist/components/badge/badge.js\";\n\ntype Promo = {\n \"promo-text-long\": string;\n \"promo-text-short\": string;\n};\n\nexport class BeamPromoInfoPill extends LitElement {\n @property({ type: Object }) promo: Promo | null = null;\n @property({ type: Boolean }) shortVersion = false;\n\n static get styles() {\n return css`\n sl-badge::part(base) {\n background-color: var(--beam-promoPillLabel-color-background, #000);\n color: var(--beam-promoPillLabel-color, #fff);\n border: var(--beam-promoPillLabel-border-width, 0px) solid var(--beam-promoPillLabel-border, #000);\n border-radius: 18.37px;\n font-family: var(--beam-promoPillLabel-font, inherit);\n font-size: var(--beam-promoPillLabel-font-size, 12px);\n font-weight: var(--beam-promoPillLabel-font-weight, bold);\n text-transform: var(--beam-promoPillLabel-text-transform, none);\n text-wrap: var(--beam-promoPillLabel-text-wrap, wrap);\n margin: var(--beam-promoPillLabel-border-margin);\n }\n `;\n }\n\n render() {\n if (this.promo) {\n const promoText = this.shortVersion ? this.promo[\"promo-text-short\"] : this.promo[\"promo-text-long\"];\n return html`<sl-badge pill aria-label=\"${promoText}\">${promoText}</sl-badge>`;\n } else {\n return html``;\n }\n }\n}\n\ncustomElements.get(\"beam-promo-info-pill\") || customElements.define(\"beam-promo-info-pill\", BeamPromoInfoPill);\n\nexport const promoPillLabelConfigDefaults = {\n \"--beam-promoPillLabel-color-background\": \"#000\",\n \"--beam-promoPillLabel-color\": \"#fff\",\n \"--beam-promoPillLabel-border\": \"#000\",\n \"--beam-promoPillLabel-border-width\": \"0px\",\n \"--beam-promoPillLabel-font-size\": \"11px\",\n \"--beam-promoPillLabel-font\": \"inherit\",\n \"--beam-promoPillLabel-font-weight\": \"normal\",\n \"--beam-promoPillLabel-text-transform\": \"none\",\n \"--beam-promoPillLabel-text-wrap\": \"wrap\",\n \"--beam-promoPillLabel-border-margin\": \"0px\",\n} as const;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"beam-promo-info-pill\": BeamPromoInfoPill;\n }\n}\n"],"names":["BeamPromoInfoPill","LitElement","css","promoText","html","__decorateClass","property","promoPillLabelConfigDefaults"],"mappings":"2RASa,MAAAA,UAA0BC,CAAW,CAA3C,aACuB,CAAA,MAAA,GAAA,SAAA,EAAA,KAAA,MAAsB,KACrB,KAAA,aAAe,EAE5C,CAAA,WAAW,QAAS,CAClB,OAAOC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,KAcT,CAEA,QAAS,CACP,GAAI,KAAK,MAAO,CACd,MAAMC,EAAY,KAAK,aAAe,KAAK,MAAM,kBAAkB,EAAI,KAAK,MAAM,iBAAiB,EACnG,OAAOC,+BAAkCD,CAAS,KAAKA,CAAS,aAClE,aACSC,GAEX,CACF,CA5B8BC,EAAA,CAA3BC,EAAS,CAAE,KAAM,MAAO,CAAC,GADfN,EACiB,UAAA,QAAA,CAAA,EACCK,EAAA,CAA5BC,EAAS,CAAE,KAAM,OAAQ,CAAC,GAFhBN,EAEkB,UAAA,eAAA,CAAA,EA6B/B,eAAe,IAAI,sBAAsB,GAAK,eAAe,OAAO,uBAAwBA,CAAiB,EAEhG,MAAAO,EAA+B,CAC1C,yCAA0C,OAC1C,8BAA+B,OAC/B,+BAAgC,OAChC,qCAAsC,MACtC,kCAAmC,OACnC,6BAA8B,UAC9B,oCAAqC,SACrC,uCAAwC,OACxC,kCAAmC,OACnC,sCAAuC,KACzC"}
|