@beamimpact/web-sdk 1.55.2 → 1.55.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-oPfou2yz.esm.js → _share-dialog-dependencies-BVseSHLF.esm.js} +2 -2
- package/dist/chunks/{_share-dialog-dependencies-oPfou2yz.esm.js.map → _share-dialog-dependencies-BVseSHLF.esm.js.map} +1 -1
- package/dist/chunks/{_share-dialog-dependencies-CrXoTXJn.esm.js → _share-dialog-dependencies-o8GVV6gC.esm.js} +2 -2
- package/dist/chunks/{_share-dialog-dependencies-CrXoTXJn.esm.js.map → _share-dialog-dependencies-o8GVV6gC.esm.js.map} +1 -1
- package/dist/chunks/{index-ddFvDm5F.esm.js → index-BNHAn1OG.esm.js} +2 -2
- package/dist/chunks/{index-ddFvDm5F.esm.js.map → index-BNHAn1OG.esm.js.map} +1 -1
- package/dist/chunks/{index-Cb7UHLgc.esm.js → index-BWtaQiQa.esm.js} +16 -16
- package/dist/chunks/index-BWtaQiQa.esm.js.map +1 -0
- package/dist/chunks/{index-C0iBcnhO.esm.js → index-CIQxph2z.esm.js} +2 -2
- package/dist/chunks/index-CIQxph2z.esm.js.map +1 -0
- package/dist/chunks/index-CM59QOJP.esm.js +2 -0
- package/dist/chunks/index-CM59QOJP.esm.js.map +1 -0
- package/dist/chunks/{index-CXu50lhe.esm.js → index-CVNcspb0.esm.js} +2 -2
- package/dist/chunks/index-CVNcspb0.esm.js.map +1 -0
- package/dist/chunks/index-CYxuuwlv.esm.js +2 -0
- package/dist/chunks/index-CYxuuwlv.esm.js.map +1 -0
- package/dist/chunks/{index-BRwtueB0.esm.js → index-D1Pso4Mx.esm.js} +2 -2
- package/dist/chunks/{index-BRwtueB0.esm.js.map → index-D1Pso4Mx.esm.js.map} +1 -1
- package/dist/chunks/{index-BfJw1nDH.esm.js → index-DiNDMv3P.esm.js} +2 -2
- package/dist/chunks/index-DiNDMv3P.esm.js.map +1 -0
- package/dist/chunks/index-Dji1l8sT.esm.js +2 -0
- package/dist/chunks/index-Dji1l8sT.esm.js.map +1 -0
- package/dist/chunks/index-DsvbqqAd.esm.js +2 -0
- package/dist/chunks/index-DsvbqqAd.esm.js.map +1 -0
- package/dist/chunks/{index-CJLX6Cat.esm.js → index-IAa5EO-6.esm.js} +16 -16
- package/dist/chunks/index-IAa5EO-6.esm.js.map +1 -0
- package/dist/chunks/{index-DTnVjvy8.esm.js → index-MoK57RXU.esm.js} +2 -2
- package/dist/chunks/index-MoK57RXU.esm.js.map +1 -0
- package/dist/chunks/{order-page-qV21CdRx.esm.js → order-page-Brrq-LAx.esm.js} +2 -2
- package/dist/chunks/{order-page-qV21CdRx.esm.js.map → order-page-Brrq-LAx.esm.js.map} +1 -1
- package/dist/chunks/{order-page-BL4PDyMz.esm.js → order-page-C41TBLoV.esm.js} +2 -2
- package/dist/chunks/{order-page-BL4PDyMz.esm.js.map → order-page-C41TBLoV.esm.js.map} +1 -1
- package/dist/chunks/{promo-pill-label-CbW_Vcru.esm.js → promo-pill-label-BESRGLn7.esm.js} +3 -3
- package/dist/chunks/promo-pill-label-BESRGLn7.esm.js.map +1 -0
- package/dist/chunks/promo-pill-label-YOC47M3t.esm.js +16 -0
- package/dist/chunks/promo-pill-label-YOC47M3t.esm.js.map +1 -0
- package/dist/chunks/{routes-BAqFeD8S.esm.js → routes-BGx3ADhY.esm.js} +2 -2
- package/dist/chunks/{routes-BAqFeD8S.esm.js.map → routes-BGx3ADhY.esm.js.map} +1 -1
- package/dist/chunks/{routes-C75nl1NS.esm.js → routes-D0_9umO_.esm.js} +2 -2
- package/dist/chunks/{routes-C75nl1NS.esm.js.map → routes-D0_9umO_.esm.js.map} +1 -1
- package/dist/chunks/{share-button-BxWziSBl.esm.js → share-button-BmoEHT-C.esm.js} +2 -2
- package/dist/chunks/{share-button-BxWziSBl.esm.js.map → share-button-BmoEHT-C.esm.js.map} +1 -1
- package/dist/chunks/{share-button-BNp67BPn.esm.js → share-button-CV5FZFS9.esm.js} +2 -2
- package/dist/chunks/{share-button-BNp67BPn.esm.js.map → share-button-CV5FZFS9.esm.js.map} +1 -1
- package/dist/chunks/{share-button-BSHKEfJo.esm.js → share-button-D-c9M84d.esm.js} +2 -2
- package/dist/chunks/{share-button-BSHKEfJo.esm.js.map → share-button-D-c9M84d.esm.js.map} +1 -1
- package/dist/chunks/{share-button-DCMaVhyw.esm.js → share-button-DcaL0AYo.esm.js} +2 -2
- package/dist/chunks/{share-button-DCMaVhyw.esm.js.map → share-button-DcaL0AYo.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-FKTMMTl5.esm.js → update-cart-CFB8JVgq.esm.js} +2 -2
- package/dist/chunks/{update-cart-FKTMMTl5.esm.js.map → update-cart-CFB8JVgq.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-DPxyDjY9.esm.js → update-cart-Dsu0mPtW.esm.js} +2 -2
- package/dist/chunks/{update-cart-DPxyDjY9.esm.js.map → update-cart-Dsu0mPtW.esm.js.map} +1 -1
- package/dist/components/community-impact.esm.js +9 -9
- package/dist/components/community-impact.esm.js.map +1 -1
- package/dist/components/community-impact.js +9 -9
- package/dist/components/community-impact.js.map +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 +7 -7
- package/dist/components/impact-overview.esm.js.map +1 -1
- package/dist/components/impact-overview.js +7 -7
- package/dist/components/impact-overview.js.map +1 -1
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/post-purchase.d.ts +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.d.ts +1 -1
- package/dist/components/product-details-page.esm.js +11 -11
- package/dist/components/product-details-page.esm.js.map +1 -1
- package/dist/components/product-details-page.js +11 -11
- package/dist/components/product-details-page.js.map +1 -1
- package/dist/components/redeem-transaction.d.ts +1 -1
- package/dist/components/redeem-transaction.esm.js +1 -1
- package/dist/components/redeem-transaction.js +1 -1
- package/dist/components/select-nonprofit.d.ts +1 -1
- package/dist/components/select-nonprofit.esm.js +9 -9
- package/dist/components/select-nonprofit.esm.js.map +1 -1
- package/dist/components/select-nonprofit.js +9 -9
- package/dist/components/select-nonprofit.js.map +1 -1
- package/dist/components/select-subscription-nonprofit.d.ts +1 -1
- package/dist/components/select-subscription-nonprofit.esm.js +7 -7
- package/dist/components/select-subscription-nonprofit.esm.js.map +1 -1
- package/dist/components/select-subscription-nonprofit.js +7 -7
- package/dist/components/select-subscription-nonprofit.js.map +1 -1
- 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 +1 -1
- package/dist/components/subscription-impact.esm.js +3 -3
- package/dist/components/subscription-impact.esm.js.map +1 -1
- package/dist/components/subscription-impact.js +3 -3
- package/dist/components/subscription-impact.js.map +1 -1
- package/dist/components/subscription-management.d.ts +1 -1
- package/dist/components/subscription-management.esm.js +1 -1
- package/dist/components/subscription-management.esm.js.map +1 -1
- package/dist/components/subscription-management.js +1 -1
- package/dist/components/subscription-management.js.map +1 -1
- 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.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/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/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.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.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.esm.js +1 -1
- package/dist/react/redeem-transaction.esm.js.map +1 -1
- package/dist/react/redeem-transaction.js +1 -1
- package/dist/react/redeem-transaction.js.map +1 -1
- package/dist/react/select-nonprofit.esm.js +1 -1
- package/dist/react/select-nonprofit.esm.js.map +1 -1
- package/dist/react/select-nonprofit.js +1 -1
- package/dist/react/select-nonprofit.js.map +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.esm.js.map +1 -1
- package/dist/react/subscription-impact.js +1 -1
- package/dist/react/subscription-impact.js.map +1 -1
- package/dist/react/subscription-management.esm.js +1 -1
- package/dist/react/subscription-management.esm.js.map +1 -1
- package/dist/react/subscription-management.js +1 -1
- package/dist/react/subscription-management.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/index-BfJw1nDH.esm.js.map +0 -1
- package/dist/chunks/index-C0iBcnhO.esm.js.map +0 -1
- package/dist/chunks/index-CB2FlO76.esm.js +0 -2
- package/dist/chunks/index-CB2FlO76.esm.js.map +0 -1
- package/dist/chunks/index-CFuuHEma.esm.js +0 -2
- package/dist/chunks/index-CFuuHEma.esm.js.map +0 -1
- package/dist/chunks/index-CJLX6Cat.esm.js.map +0 -1
- package/dist/chunks/index-CXu50lhe.esm.js.map +0 -1
- package/dist/chunks/index-Cb7UHLgc.esm.js.map +0 -1
- package/dist/chunks/index-DQU56kcv.esm.js +0 -2
- package/dist/chunks/index-DQU56kcv.esm.js.map +0 -1
- package/dist/chunks/index-DTnVjvy8.esm.js.map +0 -1
- package/dist/chunks/index-O-hdOxQR.esm.js +0 -2
- package/dist/chunks/index-O-hdOxQR.esm.js.map +0 -1
- package/dist/chunks/promo-pill-label-CbW_Vcru.esm.js.map +0 -1
- package/dist/utils/uuid.d.ts +0 -8
- package/dist/utils/uuid.esm.js +0 -2
- package/dist/utils/uuid.esm.js.map +0 -1
- package/dist/utils/uuid.js +0 -2
- package/dist/utils/uuid.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as o,t as i,h as I,y as h}from"../chunks/lit-WqMxC_PA.esm.js";import{M as f}from"../chunks/beam-errors-Ci0d3926.esm.js";import{deleteCookieValue as v,getCookieValue as b}from"../utils/cookies.js";import{c as S,d as P,e as $}from"../chunks/enforce-config-Ba1JkOHs.esm.js";import{createScopedLocalStorage as T}from"../utils/local-storage.js";import{A as U,_ as E}from"../chunks/localize-C25pEGnx.esm.js";import{D as O,L as u}from"../chunks/routes-
|
|
1
|
+
import{g as o,t as i,h as I,y as h}from"../chunks/lit-WqMxC_PA.esm.js";import{M as f}from"../chunks/beam-errors-Ci0d3926.esm.js";import{deleteCookieValue as v,getCookieValue as b}from"../utils/cookies.js";import{c as S,d as P,e as $}from"../chunks/enforce-config-Ba1JkOHs.esm.js";import{createScopedLocalStorage as T}from"../utils/local-storage.js";import{A as U,_ as E}from"../chunks/localize-C25pEGnx.esm.js";import{D as O,L as u}from"../chunks/routes-BGx3ADhY.esm.js";import{p as A}from"../chunks/index-BWtaQiQa.esm.js";import"./impact-overview.js";import{B as y}from"../chunks/cart-contents-DkoytiZh.esm.js";import{b as D}from"../chunks/events-Dki0ka4F.esm.js";import{formatStoreAndReturnPromoCodes as R,getAllPromoCodesFromCookie as _,mapToUnvalidatedPromoCodes as M,isEmptyPromoData as w,parseJsonStringArray as K}from"../utils/promoManager.js";import{P as N,a as L}from"../chunks/promo-types-DKAOFHJr.esm.js";import"../utils/logger.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/promo-pill-label-BESRGLn7.esm.js";import"../chunks/_share-dialog-dependencies-BVseSHLF.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"./beam-partner-logos.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../chunks/share-button-D-c9M84d.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-BmoEHT-C.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";var x=Object.defineProperty,e=(l,r,a,m)=>{for(var s=void 0,d=l.length-1,c;d>=0;d--)(c=l[d])&&(s=c(r,a,s)||s);return s&&x(r,a,s),s};const C=["baseUrl","apiKey","orderId","cartTotal","currencyCode","lang"],F=["storeId","postalCode","countryCode","cart","discountCodes","promoCodes","htmlPromoCodes","email","partnerUserId"];class t extends I{constructor(){super(...arguments),this.baseUrl=O,this.currencyCode="USD",this.lang="en",this.debug=!1,this.activeWidget=null,this.nonprofitId=null,this.selectionId=null,this.cartId=null,this.beamCartId=null,this.userId=null,this.transactionId=null,this.excludeDonationsForRecurringTransactions=!1,this.creationMethod="",this.draftConfig=!1,this.localStorage=T(this),this.handlePostTransaction=async()=>{this.enforceConfig();const r=this.getManualPromoCodes(),a=R(r.map(p=>({value:p})),this.apiKey),m=_(),s={unvalidatedPromoCodes:M(r.map(p=>({value:p}))),validatedPromoCodes:m?.validatedPromoCodes??[]},d=a??s,c=d&&!w(d),n=await A({baseUrl:this.baseUrl,apiRoot:"/api",headers:{authorization:`Api-Key ${this.apiKey}`},requestBody:{selectionId:this.selectionId||void 0,cartId:this.cartId||void 0,beamCartId:this.beamCartId||void 0,storeId:this.storeId,orderId:this.orderId,cartTotal:this.cartTotal,email:this.email,partnerUserId:this.partnerUserId,currencyCode:this.currencyCode,postalCode:this.postalCode,countryCode:this.countryCode,cart:this.cart,...c&&{promos:d},discountCodes:this.discountCodes}});this.transactionId=n.transactionId,this.userId=n.beamUserId,this.nonprofitId=n.nonprofitId,this.excludeDonationsForRecurringTransactions=!!n.reportSettings?.excludeRecurringDonations,this.creationMethod=n.creationMethod||"";const g=!!this.nonprofitId;return this.activeWidget=g?"impact-overview":"redeem-transaction",n.transactionCreated&&(["transaction","cart",N,u.NONPROFIT,u.NONPROFIT_SELECTED_AT].forEach(p=>{this.localStorage.removeItem(p)}),[{name:y,path:"/",domain:this.domain},{name:L,path:"/",domain:this.domain}].forEach(p=>v(p)),dispatchEvent(new D({transactionId:n.transactionId,orderId:this.orderId,cartTotal:this.cartTotal,currencyCode:this.currencyCode}))),n},this.transactionDataController=new U(this,this.handlePostTransaction)}get parsedPromoCodes(){return K(this.htmlPromoCodes)}firstUpdated(r){this.enforceConfig(),this.localStorage.getItem("transaction")?.toLocaleLowerCase()==="undefined"&&this.localStorage.removeItem("transaction"),this.selectionId=this.localStorage.getItem("transaction")||null,this.cartId=this.localStorage.getItemJson("cart")?.cartId||null,this.beamCartId=b(y)||null,this.selectionId&&this.nonprofitId&&(this.activeWidget="impact-overview")}async updated(r){[...C,...F].some(a=>r.has(a))&&await this.transactionDataController.exec()}enforceConfig(){if($(C,this),!this.email&&!this.partnerUserId)throw new f([this.email?"":"email",this.partnerUserId?"":"partnerUserId"].filter(Boolean),"At least one of [email, partnerUserId] must be provided")}getManualPromoCodes(){return this.parsedPromoCodes?.length?this.parsedPromoCodes:this.promoCodes?.length?this.promoCodes:[]}render(){return this.transactionDataController.loading?"":this.transactionDataController.error?this.debug?E({error:this.transactionDataController.error}):"":this.excludeDonationsForRecurringTransactions&&this.creationMethod==="recurring"?h``:this.activeWidget==="redeem-transaction"?h`
|
|
2
2
|
<beam-redeem-transaction
|
|
3
3
|
part="redeem-transaction"
|
|
4
4
|
baseUrl="${this.baseUrl}"
|
|
@@ -91,7 +91,7 @@ declare class BeamProductDetailsPage extends LitElement {
|
|
|
91
91
|
}>;
|
|
92
92
|
private productDetailsPageDataController;
|
|
93
93
|
updated(changedProperties: Map<string, unknown>): Promise<void>;
|
|
94
|
-
render(): lit_html.TemplateResult<1
|
|
94
|
+
render(): "" | lit_html.TemplateResult<1>;
|
|
95
95
|
renderWidgetIcon(iconDisplay: string): lit_html.TemplateResult<1>;
|
|
96
96
|
renderContent(isPromoPillVisible: boolean, shouldDisplayColon: boolean, data: IAPIV3PostProductDetailsPage): lit_html.TemplateResult<1>;
|
|
97
97
|
renderCloseTooltipIcon(): lit_html.TemplateResult<1>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as E,y as r,f as B,g as c,t as A,h as z,k as L}from"../chunks/lit-WqMxC_PA.esm.js";import{u as b,A as M,_ as W,i as k,d as D,a as G}from"../chunks/localize-Btu9xYcE.esm.js";import{D as R,W as y,j as _,S as j}from"../chunks/routes-D0_9umO_.esm.js";import{c as O,d as H,e as U}from"../chunks/enforce-config-CZ3ToOgr.esm.js";import{c as K}from"../chunks/responsive-BR8qUfBa.esm.js";import"../chunks/_share-dialog-dependencies-o8GVV6gC.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import{p as N}from"../chunks/promo-pill-label-YOC47M3t.esm.js";import{formatStoreAndReturnPromoCodes as V,isEmptyPromoData as q,parseJsonStringArray as J,getPromoCodesFromCart as Y,setPromoCodesInLocalStorage as Z,setPromoCodeInCookie as Q}from"../utils/promoManager.esm.js";import{B as X}from"../chunks/cart-contents-DkoytiZh.esm.js";import{createScopedLocalStorage as ee}from"../utils/local-storage.esm.js";import{makeApiKeyHeader as te}from"../utils/makeApiKeyHeader.esm.js";import{f as w,a as S}from"../chunks/events-Dki0ka4F.esm.js";import{getBeamCartId as oe}from"../utils/cart.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../utils/cookies.esm.js";const ae=(n="",{borderRadius:e="0px",borderStyle:t="unset",borderColor:o="#000000",borderWidth:i="1px"}={})=>{const a=n.startsWith("--beam-")?n:`--beam-${n}`;return{[`${a}-borderRadius`]:e,[`${a}-borderStyle`]:t,[`${a}-borderColor`]:o,[`${a}-borderWidth`]:i}},ie=(n="",{borderRadius:e="0px",borderStyle:t="unset",borderColor:o="#000000",borderWidth:i="1px"}={})=>{const a=n.startsWith("--beam-")?n:`--beam-${n}`;return E(` border-radius: var(${a}-borderRadius, ${e});
|
|
2
2
|
border-style: var(${a}-borderStyle, ${t});
|
|
3
3
|
border-color: var(${a}-borderColor, ${o});
|
|
4
4
|
border-width: var(${a}-borderWidth, ${i});
|
|
@@ -17,7 +17,7 @@ import{j as z,y as r,f as E,g as c,t as A,h as B,k as L}from"../chunks/lit-WqMxC
|
|
|
17
17
|
<circle cx="12" cy="12" r="10"></circle>
|
|
18
18
|
<path d="M12 16v-4"></path>
|
|
19
19
|
<path d="M12 8h.01"></path>
|
|
20
|
-
</svg>`,v={en:{ctaTitle:()=>"Choose Your Impact",ctaMessage:()=>"At no extra cost, 1% of every order will be donated to a nonprofit you choose. Add to cart to choose. Powered by Beam",inlineSeparator:()=>":"},fr:{ctaTitle:()=>"Choisissez votre impact",ctaMessage:()=>"Sans frais suppl\xE9mentaires, 1 % de chaque commande est revers\xE9 \xE0 l'association de votre choix. Ajoutez au panier pour choisir. Propuls\xE9 par Beam.",inlineSeparator:()=>":"},es:{ctaTitle:()=>"Elige tu impacto",ctaMessage:()=>"Sin coste adicional, el 1 % de cada pedido se dona a la organizaci\xF3n sin \xE1nimo de lucro que elijas. A\xF1\xE1delo al carrito para elegir. Impulsado por Beam.",inlineSeparator:()=>":"},de:{ctaTitle:()=>"W\xE4hlen Sie Ihren Impact",ctaMessage:()=>"Ohne zus\xE4tzliche Kosten wird 1 % jeder Bestellung an eine von Ihnen gew\xE4hlte gemeinn\xFCtzige Organisation gespendet. Zum Warenkorb hinzuf\xFCgen, um auszuw\xE4hlen. Unterst\xFCtzt von Beam.",inlineSeparator:()=>":"},it:{ctaTitle:()=>"Scegli il tuo impatto",ctaMessage:()=>"L'1 % di ogni acquisto viene donato, senza alcun costo aggiuntivo, a un'organizzazione no-profit a tua scelta. Aggiungi al carrello per scegliere. Promosso da Beam.",inlineSeparator:()=>":"},pl:{ctaTitle:()=>"Wybierz sw\xF3j wp\u0142yw",ctaMessage:()=>"1 % warto\u015Bci ka\u017Cdego zam\xF3wienia przekazywany jest na wybran\u0105 przez Ciebie organizacj\u0119 non-profit \u2013 bez dodatkowych koszt\xF3w. Dodaj do koszyka, aby wybra\u0107. Obs\u0142ugiwane przez Beam.",inlineSeparator:()=>":"},ja:{ctaTitle:()=>"
|
|
20
|
+
</svg>`,v={en:{ctaTitle:()=>"Choose Your Impact",ctaMessage:()=>"At no extra cost, 1% of every order will be donated to a nonprofit you choose. Add to cart to choose. Powered by Beam",inlineSeparator:()=>":"},fr:{ctaTitle:()=>"Choisissez votre impact",ctaMessage:()=>"Sans frais suppl\xE9mentaires, 1 % de chaque commande est revers\xE9 \xE0 l'association de votre choix. Ajoutez au panier pour choisir. Propuls\xE9 par Beam.",inlineSeparator:()=>":"},es:{ctaTitle:()=>"Elige tu impacto",ctaMessage:()=>"Sin coste adicional, el 1 % de cada pedido se dona a la organizaci\xF3n sin \xE1nimo de lucro que elijas. A\xF1\xE1delo al carrito para elegir. Impulsado por Beam.",inlineSeparator:()=>":"},de:{ctaTitle:()=>"W\xE4hlen Sie Ihren Impact",ctaMessage:()=>"Ohne zus\xE4tzliche Kosten wird 1 % jeder Bestellung an eine von Ihnen gew\xE4hlte gemeinn\xFCtzige Organisation gespendet. Zum Warenkorb hinzuf\xFCgen, um auszuw\xE4hlen. Unterst\xFCtzt von Beam.",inlineSeparator:()=>":"},it:{ctaTitle:()=>"Scegli il tuo impatto",ctaMessage:()=>"L'1 % di ogni acquisto viene donato, senza alcun costo aggiuntivo, a un'organizzazione no-profit a tua scelta. Aggiungi al carrello per scegliere. Promosso da Beam.",inlineSeparator:()=>":"},pl:{ctaTitle:()=>"Wybierz sw\xF3j wp\u0142yw",ctaMessage:()=>"1 % warto\u015Bci ka\u017Cdego zam\xF3wienia przekazywany jest na wybran\u0105 przez Ciebie organizacj\u0119 non-profit \u2013 bez dodatkowych koszt\xF3w. Dodaj do koszyka, aby wybra\u0107. Obs\u0142ugiwane przez Beam.",inlineSeparator:()=>":"},ja:{ctaTitle:()=>"\u5BC4\u4ED8\u5148\u3092\u304A\u9078\u3073\u304F\u3060\u3055\u3044\u3002",ctaMessage:()=>"\u8FFD\u52A0\u8CBB\u7528\u306A\u3057\u3067\u3001\u3054\u6CE8\u6587\u91D1\u984D\u306E1%\u3092\u975E\u55B6\u5229\u56E3\u4F53\u3078\u5BC4\u4ED8\u3067\u304D\u307E\u3059\u3002\u3054\u5E0C\u671B\u306E\u5834\u5408\u3001\u30AB\u30FC\u30C8\u306B\u8FFD\u52A0\u3057\u3066\u5BC4\u4ED8\u5185\u5BB9\u3092\u304A\u9078\u3073\u304F\u3060\u3055\u3044\u3002Powered by Beam",inlineSeparator:()=>":"}};var se=Object.defineProperty,d=(n,e,t,o)=>{for(var i=void 0,a=n.length-1,l;a>=0;a--)(l=n[a])&&(i=l(e,t,i)||i);return i&&se(e,t,i),i};const le="--beam-ProductDetailsPage-imageUrl";class s extends z{constructor(){super(...arguments),this.baseUrl=R,this.lang="en",this.draftConfig=!1,this.debug=!1,this.localStorage=ee(this),this.pluginPromoCodes=[],this.handlePromoCodesStored=e=>{const t=(e.detail.promoCodes?.unvalidatedPromoCodes??[]).map(o=>o.attributes?.value??o.attributes?.url??"").sort();this.pluginPromoCodes=t},this.postProductDetailsPageData=async()=>{U(["apiKey","storeId"],this);const e=oe(X,{apiKey:this.apiKey}),t=this.getManualPromoCodes(),o=V(t.map(l=>({value:l})),this.apiKey),i=o&&!q(o);i&&this.dispatchEvent(new w({source:y.product_details_page}));const a=await _({baseUrl:this.baseUrl,headers:te(this.apiKey),queryParams:{version:"1.0.0",lang:this.configLang,storeId:this.storeId,widgetName:y.product_details_page,draftConfig:this.draftConfig,remoteProductIdentifier:this.remoteProductIdentifier},requestBody:{...i&&{promos:o},beamCartId:e||void 0}});return this.handleValidatedPromoCodes(a),a},this.productDetailsPageDataController=new M(this,this.postProductDetailsPageData)}get configLang(){return j[this.lang]||"en"}get parsedPromoCodes(){return J(this.promoCodes)}getManualPromoCodes(){if(this.parsedPromoCodes&&this.parsedPromoCodes.length>0)return this.parsedPromoCodes;const e=this.localStorage.getItemJson("cart");return e?Y(e):[]}async handleValidatedPromoCodes(e){e.promos?.validatedPromoCodes&&(await Promise.all([Z({apiKey:this.apiKey,promoCodes:{validatedPromoCodes:e.promos.validatedPromoCodes,unvalidatedPromoCodes:[]}}),Q({validatedPromoCodes:e.promos.validatedPromoCodes,domain:this.domain})]),this.dispatchEvent(new w({source:y.product_details_page})))}async firstUpdated(){window.addEventListener(S.eventName,this.handlePromoCodesStored)}disconnectedCallback(){window.removeEventListener(S.eventName,this.handlePromoCodesStored),super.disconnectedCallback()}async updated(e){const t=["storeId","baseUrl","lang","apiKey","pluginPromoCodes","promoCodes"];this.pluginPromoCodes;for(const o of t)if(e.has(o)){await this.productDetailsPageDataController.exec();break}}render(){const{data:e,loading:t}=this.productDetailsPageDataController,o=this.cssVariables["--beam-ProductDetailsPage-image-placement"],i=P=>P!=="0px"&&P!=="0",a=this.cssVariables["--beam-ProductDetailsPage-shouldDisplayPromoPill"]==="true",l=!!e?.config?.web?.promo,p=i(this.cssVariables["--beam-ProductDetailsPage-imageHeight"]),h=i(this.cssVariables["--beam-ProductDetailsPage-title-fontSize"]),u=a&&l&&p&&h,m=this.cssVariables["--beam-ProductDetailsPage-shouldDisplayColon"]==="true";return t?r``:e==null?this.debug?W({error:new Error("No data")}):"":r`
|
|
21
21
|
<style>
|
|
22
22
|
:host {
|
|
23
23
|
${this.cssVariables.toCSS()}
|
|
@@ -29,21 +29,21 @@ import{j as z,y as r,f as E,g as c,t as A,h as B,k as L}from"../chunks/lit-WqMxC
|
|
|
29
29
|
>
|
|
30
30
|
${o==="block-center"?r`
|
|
31
31
|
${this.renderWidgetIcon(o)}
|
|
32
|
-
${
|
|
32
|
+
${u?r`
|
|
33
33
|
<div class="promo-container">
|
|
34
34
|
<beam-promo-info-pill .promo=${e?.config?.web?.promo}></beam-promo-info-pill>
|
|
35
35
|
</div>
|
|
36
36
|
`:r``}
|
|
37
|
-
<div class="info-container">${this.renderContent(
|
|
37
|
+
<div class="info-container">${this.renderContent(u,m,e)}</div>
|
|
38
38
|
`:r`
|
|
39
|
-
${
|
|
39
|
+
${u?r`
|
|
40
40
|
<div class="promo-container">
|
|
41
41
|
<beam-promo-info-pill .promo=${e?.config?.web?.promo}></beam-promo-info-pill>
|
|
42
42
|
</div>
|
|
43
43
|
`:r``}
|
|
44
44
|
<div class="content-inline">
|
|
45
45
|
${this.renderWidgetIcon(o)}
|
|
46
|
-
<div class="info-container">${this.renderContent(
|
|
46
|
+
<div class="info-container">${this.renderContent(u,m,e)}</div>
|
|
47
47
|
</div>
|
|
48
48
|
`}
|
|
49
49
|
</div>
|
|
@@ -78,14 +78,14 @@ import{j as z,y as r,f as E,g as c,t as A,h as B,k as L}from"../chunks/lit-WqMxC
|
|
|
78
78
|
stroke-linecap="round"
|
|
79
79
|
stroke-linejoin="round"
|
|
80
80
|
/>
|
|
81
|
-
</svg> `}renderDisclosureTooltip(){let e,t;const o=()=>document.activeElement?.tagName.toLowerCase()===this.tagName.toLowerCase(),i=()=>{clearTimeout(t),t=setTimeout(()=>{this.renderRoot.querySelector(".ppgf-disclosure-tooltip-content")?.setAttribute("aria-hidden","true")},50)},a=()=>{clearTimeout(t),this.renderRoot.querySelector(".ppgf-disclosure-tooltip-content")?.setAttribute("aria-hidden","false")},l=({skipDelay:
|
|
81
|
+
</svg> `}renderDisclosureTooltip(){let e,t;const o=()=>document.activeElement?.tagName.toLowerCase()===this.tagName.toLowerCase(),i=()=>{clearTimeout(t),t=setTimeout(()=>{this.renderRoot.querySelector(".ppgf-disclosure-tooltip-content")?.setAttribute("aria-hidden","true")},50)},a=()=>{clearTimeout(t),this.renderRoot.querySelector(".ppgf-disclosure-tooltip-content")?.setAttribute("aria-hidden","false")},l=({skipDelay:g=!1,keepOpenIfFocused:f=!1})=>{clearTimeout(e),e=setTimeout(()=>{f&&o()||this.renderRoot.querySelector(".ppgf-disclosure-tooltip")?.hide()},g?0:300)},p=()=>{clearTimeout(e),this.renderRoot.querySelector(".ppgf-disclosure-tooltip")?.show()},h=({skipDelay:g=!1,keepOpenIfFocused:f=!1})=>{const x=this.renderRoot.querySelector(".ppgf-disclosure-tooltip");x&&(x.open?l({skipDelay:g,keepOpenIfFocused:f}):p())},u=()=>{p()},m=()=>{l({skipDelay:!1,keepOpenIfFocused:!0})},P=()=>{p()},$=()=>{p()},F=()=>{l({skipDelay:!1,keepOpenIfFocused:!1})},I=g=>{if(g.key==="Enter"||g.key===" "){h({skipDelay:!0,keepOpenIfFocused:!1});return}l({skipDelay:!0,keepOpenIfFocused:!0})},T=()=>{l({skipDelay:!0,keepOpenIfFocused:!1})},C=this.productDetailsPageDataController.data?.ppgfDisclosure;return C?r`<sl-tooltip
|
|
82
82
|
class="ppgf-disclosure-tooltip"
|
|
83
83
|
part="tooltip"
|
|
84
84
|
trigger="manual"
|
|
85
85
|
tabindex="0"
|
|
86
86
|
@mouseenter="${$}"
|
|
87
|
-
@mouseleave="${
|
|
88
|
-
@keydown="${
|
|
87
|
+
@mouseleave="${F}"
|
|
88
|
+
@keydown="${I}"
|
|
89
89
|
@sl-after-hide="${i}"
|
|
90
90
|
@sl-after-show="${a}"
|
|
91
91
|
>
|
|
@@ -115,7 +115,7 @@ import{j as z,y as r,f as E,g as c,t as A,h as B,k as L}from"../chunks/lit-WqMxC
|
|
|
115
115
|
aria-label="More Information"
|
|
116
116
|
role="button"
|
|
117
117
|
tabindex="0"
|
|
118
|
-
@focus="${
|
|
118
|
+
@focus="${u}"
|
|
119
119
|
@blur="${m}"
|
|
120
120
|
@click="${P}"
|
|
121
121
|
>
|
|
@@ -132,7 +132,7 @@ import{j as z,y as r,f as E,g as c,t as A,h as B,k as L}from"../chunks/lit-WqMxC
|
|
|
132
132
|
${re()}
|
|
133
133
|
</sl-button>
|
|
134
134
|
</span>
|
|
135
|
-
</sl-tooltip>`:r``}get cssVariables(){const e={"--beam-ProductDetailsPage-imageWidth":"24px","--beam-ProductDetailsPage-imageHeight":"24px","--beam-ProductDetailsPage-maxWidth":"346px","--beam-ProductDetailsPage-paddingTop":"8px","--beam-ProductDetailsPage-paddingRight":"12px","--beam-ProductDetailsPage-paddingBottom":"8px","--beam-ProductDetailsPage-paddingLeft":"15px","--beam-ProductDetailsPage-InfoContainer-marginLeft":"8px","--beam-ProductDetailsPage-InfoContainer-textAlign":"inherit","--beam-ProductDetailsPage-InfoContainer-lineHeight":"15px","--beam-ProductDetailsPage-InfoContainer-marginTop":"4px","--beam-ProductDetailsPage-backgroundColor":"unset","--beam-ProductDetailsPage-TooltipIcon-width":"10px","--beam-ProductDetailsPage-TooltipIcon-color":"inherit","--beam-ProductDetailsPage-PPGFDisclosure-backgroundColor":"#000000","--beam-ProductDetailsPage-PPGFDisclosure-paddingTop":"10px","--beam-ProductDetailsPage-PPGFDisclosure-paddingRight":"8px","--beam-ProductDetailsPage-PPGFDisclosure-paddingBottom":"10px","--beam-ProductDetailsPage-PPGFDisclosure-paddingLeft":"8px","--beam-ProductDetailsPage-PPGFDisclosureHyperlink-color":"#5CA3FF",...D("--beam-ProductDetailsPage-title",{fontSize:"12px",fontWeight:"bold"}),"--beam-ProductDetailsPage-title-textAlign":"left",...D("--beam-ProductDetailsPage-description",{marginTop:"0px",fontSize:"12px",lineHeight:"15px"}),"--beam-ProductDetailsPage-description-textAlign":"left",...D("--beam-ProductDetailsPage-PPGFDisclosureTooltipContent",{fontSize:"12px",lineHeight:"16px",color:"#FFFFFF"}),...ae("--beam-ProductDetailsPage"),"--beam-ProductDetailsPage-close-display":"initial","--beam-ProductDetailsPage-close-padding":"0","--beam-ProductDetailsPage-image-placement":"inline-left","--beam-ProductDetailsPage-blockImage-alignSelf":"center","--beam-ProductDetailsPage-promoPill-marginTop":"4px","--beam-ProductDetailsPage-promoPill-alignSelf":"left","--beam-ProductDetailsPage-shouldDisplayColon":"true","--beam-ProductDetailsPage-shouldDisplayPromoPill":"true",...N},t=this.productDetailsPageDataController?.data?.config?.web?.theme||{},o={...e,...t};return Object.assign(Object.create({toCSS(){return G(this)}}),o)}}s.tagName="beam-product-details-page",s.styles=[O,K,
|
|
135
|
+
</sl-tooltip>`:r``}get cssVariables(){const e={"--beam-ProductDetailsPage-imageWidth":"24px","--beam-ProductDetailsPage-imageHeight":"24px","--beam-ProductDetailsPage-maxWidth":"346px","--beam-ProductDetailsPage-paddingTop":"8px","--beam-ProductDetailsPage-paddingRight":"12px","--beam-ProductDetailsPage-paddingBottom":"8px","--beam-ProductDetailsPage-paddingLeft":"15px","--beam-ProductDetailsPage-InfoContainer-marginLeft":"8px","--beam-ProductDetailsPage-InfoContainer-textAlign":"inherit","--beam-ProductDetailsPage-InfoContainer-lineHeight":"15px","--beam-ProductDetailsPage-InfoContainer-marginTop":"4px","--beam-ProductDetailsPage-backgroundColor":"unset","--beam-ProductDetailsPage-TooltipIcon-width":"10px","--beam-ProductDetailsPage-TooltipIcon-color":"inherit","--beam-ProductDetailsPage-PPGFDisclosure-backgroundColor":"#000000","--beam-ProductDetailsPage-PPGFDisclosure-paddingTop":"10px","--beam-ProductDetailsPage-PPGFDisclosure-paddingRight":"8px","--beam-ProductDetailsPage-PPGFDisclosure-paddingBottom":"10px","--beam-ProductDetailsPage-PPGFDisclosure-paddingLeft":"8px","--beam-ProductDetailsPage-PPGFDisclosureHyperlink-color":"#5CA3FF",...D("--beam-ProductDetailsPage-title",{fontSize:"12px",fontWeight:"bold"}),"--beam-ProductDetailsPage-title-textAlign":"left",...D("--beam-ProductDetailsPage-description",{marginTop:"0px",fontSize:"12px",lineHeight:"15px"}),"--beam-ProductDetailsPage-description-textAlign":"left",...D("--beam-ProductDetailsPage-PPGFDisclosureTooltipContent",{fontSize:"12px",lineHeight:"16px",color:"#FFFFFF"}),...ae("--beam-ProductDetailsPage"),"--beam-ProductDetailsPage-close-display":"initial","--beam-ProductDetailsPage-close-padding":"0","--beam-ProductDetailsPage-image-placement":"inline-left","--beam-ProductDetailsPage-blockImage-alignSelf":"center","--beam-ProductDetailsPage-promoPill-marginTop":"4px","--beam-ProductDetailsPage-promoPill-alignSelf":"left","--beam-ProductDetailsPage-shouldDisplayColon":"true","--beam-ProductDetailsPage-shouldDisplayPromoPill":"true",...N},t=this.productDetailsPageDataController?.data?.config?.web?.theme||{},o={...e,...t};return Object.assign(Object.create({toCSS(){return G(this)}}),o)}}s.tagName="beam-product-details-page",s.styles=[O,K,B`
|
|
136
136
|
:host {
|
|
137
137
|
font-family: var(--beam-fontFamily);
|
|
138
138
|
font-style: var(--beam-fontStyle);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-details-page.esm.js","sources":["../../src/shared/fragments/custom-border.ts","../../src/shared/fragments/info.ts","../../src/components/product-details-page/strings.ts","../../src/components/product-details-page/index.ts"],"sourcesContent":["import { CSSResult, unsafeCSS } from \"lit\";\n\nexport const defineCustomBorder = (\n namespace = \"\",\n { borderRadius = \"0px\", borderStyle = \"unset\", borderColor = \"#000000\", borderWidth = \"1px\" } = {}\n): Record<string, string> => {\n const prefix = namespace.startsWith(\"--beam-\") ? namespace : `--beam-${namespace}`;\n return {\n [`${prefix}-borderRadius`]: borderRadius,\n [`${prefix}-borderStyle`]: borderStyle,\n [`${prefix}-borderColor`]: borderColor,\n [`${prefix}-borderWidth`]: borderWidth,\n };\n};\n\nexport const useCustomBorder = (\n namespace = \"\",\n { borderRadius = \"0px\", borderStyle = \"unset\", borderColor = \"#000000\", borderWidth = \"1px\" } = {}\n): CSSResult => {\n const prefix = namespace.startsWith(\"--beam-\") ? namespace : `--beam-${namespace}`;\n return unsafeCSS(`\\\n border-radius: var(${prefix}-borderRadius, ${borderRadius});\n border-style: var(${prefix}-borderStyle, ${borderStyle});\n border-color: var(${prefix}-borderColor, ${borderColor});\n border-width: var(${prefix}-borderWidth, ${borderWidth});\n `);\n};\n","import { html } from \"lit\";\n\nexport const _info = () => html` <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n part=\"svg\"\n>\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <path d=\"M12 16v-4\"></path>\n <path d=\"M12 8h.01\"></path>\n</svg>`;\n","export const strings = {\n en: {\n ctaTitle: () => `Choose Your Impact`,\n ctaMessage: () =>\n `At no extra cost, 1% of every order will be donated to a nonprofit you choose. Add to cart to choose. Powered by Beam`,\n inlineSeparator: () => `:`,\n },\n fr: {\n ctaTitle: () => `Choisissez votre impact`,\n ctaMessage: () =>\n `Sans frais supplémentaires, 1 % de chaque commande est reversé à l'association de votre choix. Ajoutez au panier pour choisir. Propulsé par Beam.`,\n inlineSeparator: () => `:`,\n },\n es: {\n ctaTitle: () => `Elige tu impacto`,\n ctaMessage: () =>\n `Sin coste adicional, el 1 % de cada pedido se dona a la organización sin ánimo de lucro que elijas. Añádelo al carrito para elegir. Impulsado por Beam.`,\n inlineSeparator: () => `:`,\n },\n de: {\n ctaTitle: () => `Wählen Sie Ihren Impact`,\n ctaMessage: () =>\n `Ohne zusätzliche Kosten wird 1 % jeder Bestellung an eine von Ihnen gewählte gemeinnützige Organisation gespendet. Zum Warenkorb hinzufügen, um auszuwählen. Unterstützt von Beam.`,\n inlineSeparator: () => `:`,\n },\n it: {\n ctaTitle: () => `Scegli il tuo impatto`,\n ctaMessage: () =>\n `L'1 % di ogni acquisto viene donato, senza alcun costo aggiuntivo, a un'organizzazione no-profit a tua scelta. Aggiungi al carrello per scegliere. Promosso da Beam.`,\n inlineSeparator: () => `:`,\n },\n pl: {\n ctaTitle: () => `Wybierz swój wpływ`,\n ctaMessage: () =>\n `1 % wartości każdego zamówienia przekazywany jest na wybraną przez Ciebie organizację non-profit – bez dodatkowych kosztów. Dodaj do koszyka, aby wybrać. Obsługiwane przez Beam.`,\n inlineSeparator: () => `:`,\n },\n ja: {\n ctaTitle: () => `Choose Your Impact`,\n ctaMessage: () =>\n `At no extra cost, 1% of every order will be donated to a nonprofit you choose. Add to cart to choose. Powered by Beam`,\n inlineSeparator: () => `:`,\n },\n};\n","import { LitElement, css, html } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { unsafeHTML } from \"lit/directives/unsafe-html.js\";\nimport { AsyncController } from \"../../shared/controllers/async-controller\";\nimport { postProductDetailsPage } from \"../../api-sdk/v3/routes\";\nimport { DEFAULT_BASE_URL, SUPPORTED_LANGUAGES, WIDGET_NAMES } from \"../../api-sdk/constants\";\nimport { LANGUAGES, TUrl } from \"../../api-sdk/types\";\nimport { MissingConfig } from \"../../utils/beam-errors\";\nimport { enforceConfig } from \"../../shared/enforce-config\";\nimport { _cssVariableMap } from \"../../shared/fragments/css-variable-map\";\nimport { localizeUserString } from \"../../shared/localize\";\nimport { _errorMessage } from \"../../shared/fragments/error-message-template\";\nimport { cssResponsiveUtils } from \"../../shared/responsive\";\nimport { defineCustomElement } from \"../../shared/defineCustomElement\";\nimport { cssReset } from \"../../shared/css-reset\";\nimport { defineCustomText, useCustomText } from \"../../shared/fragments/custom-text\";\nimport { defineCustomBorder, useCustomBorder } from \"../../shared/fragments/custom-border\";\n// shoelace html tag imports\nimport \"@shoelace-style/shoelace/dist/components/tooltip/tooltip.js\";\nimport \"@shoelace-style/shoelace/dist/components/button/button.js\";\nimport { _info } from \"../../shared/fragments/info\";\nimport { promoPillLabelConfigDefaults } from \"../../shared/components/promo-pill-label\";\nimport {\n getPromoCodesFromCart,\n setPromoCodeInCookie,\n parseJsonStringArray,\n formatStoreAndReturnPromoCodes,\n setPromoCodesInLocalStorage,\n isEmptyPromoData,\n} from \"../../utils/promoManager\";\nimport \"../../shared/components/promo-pill-label\";\nimport { BEAM_CART_COOKIE_NAME, TBeamCartLocalStorage } from \"../../shared/cart-contents\";\nimport { createScopedLocalStorage } from \"../../utils/local-storage\";\nimport { makeApiKeyHeader } from \"../../utils/makeApiKeyHeader\";\nimport { BeamPromoCodesStoredEvent, BeamWidgetStoredPromoCodesEvent } from \"../../utils/events\";\nimport { getBeamCartId } from \"../../utils/cart\";\nimport { strings } from \"./strings\";\n\ntype RequiredConfig = {\n apiKey: string;\n storeId: number;\n};\ntype IAPIV3PostProductDetailsPage = Awaited<ReturnType<typeof postProductDetailsPage>>;\n\nconst IMAGE_URL_REMOTE_CONFIG_KEY = \"--beam-ProductDetailsPage-imageUrl\";\n\nexport class BeamProductDetailsPage extends LitElement {\n static tagName = \"beam-product-details-page\";\n\n @property({ type: String, reflect: true }) public baseUrl: TUrl = DEFAULT_BASE_URL;\n\n @property({ type: String, reflect: false }) apiKey?: RequiredConfig[\"apiKey\"];\n\n @property({ type: Number }) storeId?: number;\n\n @property({ type: String }) public lang: LANGUAGES = \"en\";\n\n @property({ type: Boolean }) public draftConfig = false;\n\n @property({ type: Boolean }) public debug = false;\n\n @property({ type: String }) remoteProductIdentifier?: string;\n\n @property({ type: String }) public promoCodes?: string;\n\n @property({ type: String }) public domain?: string;\n\n private localStorage = createScopedLocalStorage(this as LitElement & RequiredConfig);\n\n @state() private pluginPromoCodes: string[] = [];\n\n get configLang() {\n return SUPPORTED_LANGUAGES[this.lang] || \"en\";\n }\n\n get parsedPromoCodes(): string[] {\n return parseJsonStringArray(this.promoCodes);\n }\n\n private handlePromoCodesStored = (evt: BeamPromoCodesStoredEvent) => {\n const promoCodesFromPlugin = (evt.detail.promoCodes?.unvalidatedPromoCodes ?? [])\n .map((c) => c.attributes?.value ?? c.attributes?.url ?? \"\")\n .sort();\n this.pluginPromoCodes = promoCodesFromPlugin;\n };\n\n private getManualPromoCodes(): string[] {\n // Priority 1: Widget passed discount codes\n if (this.parsedPromoCodes && this.parsedPromoCodes.length > 0) {\n return this.parsedPromoCodes;\n }\n\n // Priority 2: Cart fallback\n const cart = this.localStorage.getItemJson<TBeamCartLocalStorage>(\"cart\");\n return cart ? getPromoCodesFromCart(cart) : [];\n }\n\n private async handleValidatedPromoCodes(response: IAPIV3PostProductDetailsPage) {\n if (response.promos?.validatedPromoCodes) {\n await Promise.all([\n setPromoCodesInLocalStorage({\n apiKey: this.apiKey,\n promoCodes: { validatedPromoCodes: response.promos.validatedPromoCodes, unvalidatedPromoCodes: [] },\n }),\n setPromoCodeInCookie({\n validatedPromoCodes: response.promos.validatedPromoCodes,\n domain: this.domain,\n }),\n ]);\n this.dispatchEvent(\n new BeamWidgetStoredPromoCodesEvent({\n source: WIDGET_NAMES.product_details_page,\n })\n );\n }\n }\n\n async firstUpdated() {\n window.addEventListener(BeamPromoCodesStoredEvent.eventName, this.handlePromoCodesStored as EventListener);\n }\n\n disconnectedCallback() {\n window.removeEventListener(BeamPromoCodesStoredEvent.eventName, this.handlePromoCodesStored as EventListener);\n super.disconnectedCallback();\n }\n\n postProductDetailsPageData = async () => {\n if (!enforceConfig<RequiredConfig>([\"apiKey\", \"storeId\"], this)) throw new MissingConfig();\n const beamCartId = getBeamCartId(BEAM_CART_COOKIE_NAME, { apiKey: this.apiKey });\n\n const manualPromoCodes = this.getManualPromoCodes();\n const formattedPromos = formatStoreAndReturnPromoCodes(\n manualPromoCodes.map((code) => ({ value: code })),\n this.apiKey\n );\n const shouldSendPromos = formattedPromos && !isEmptyPromoData(formattedPromos);\n\n if (shouldSendPromos) {\n this.dispatchEvent(\n new BeamWidgetStoredPromoCodesEvent({\n source: WIDGET_NAMES.product_details_page,\n })\n );\n }\n const res = await postProductDetailsPage({\n baseUrl: this.baseUrl,\n headers: makeApiKeyHeader(this.apiKey),\n queryParams: {\n version: \"1.0.0\",\n lang: this.configLang,\n storeId: this.storeId,\n widgetName: WIDGET_NAMES.product_details_page,\n draftConfig: this.draftConfig,\n remoteProductIdentifier: this.remoteProductIdentifier,\n },\n requestBody: {\n ...(shouldSendPromos && { promos: formattedPromos }),\n beamCartId: beamCartId ? beamCartId : undefined,\n },\n });\n this.handleValidatedPromoCodes(res);\n return res;\n };\n\n private productDetailsPageDataController = new AsyncController<typeof this.postProductDetailsPageData>(\n this,\n this.postProductDetailsPageData\n );\n\n async updated(changedProperties: Map<string, unknown>) {\n const requireNewDataProps = [\"storeId\", \"baseUrl\", \"lang\", \"apiKey\", \"pluginPromoCodes\", \"promoCodes\"];\n void this.pluginPromoCodes;\n for (const prop of requireNewDataProps) {\n if (changedProperties.has(prop)) {\n await this.productDetailsPageDataController.exec();\n break;\n }\n }\n }\n\n render() {\n const { data, loading } = this.productDetailsPageDataController;\n const iconDisplay = this.cssVariables[\"--beam-ProductDetailsPage-image-placement\"];\n const isNonZero = (value: string) => value !== \"0px\" && value !== \"0\";\n const shouldDisplayPromoPill = this.cssVariables[\"--beam-ProductDetailsPage-shouldDisplayPromoPill\"] === \"true\";\n const isPromoActive = !!data?.config?.web?.promo;\n const hasValidImageHeight = isNonZero(this.cssVariables[\"--beam-ProductDetailsPage-imageHeight\"]);\n const hasValidTitleFontSize = isNonZero(this.cssVariables[\"--beam-ProductDetailsPage-title-fontSize\"]);\n const isPromoPillVisible =\n shouldDisplayPromoPill && // Determines if the promo pill is enabled for the marketing version of the PDP\n isPromoActive && // Is promo currently active\n hasValidImageHeight && // Ensures the promo pill is not displayed for the subtext version of the PDP\n hasValidTitleFontSize; // Ensures the promo pill is not displayed for the subtext version of the PDP\n const shouldShowPunctuation = this.cssVariables[\"--beam-ProductDetailsPage-shouldDisplayColon\"] === \"true\"; // Determines if a colon should be displayed in promo display\n\n if (loading) {\n return html``;\n }\n if (data == null) {\n if (this.debug) {\n return _errorMessage({ error: new Error(\"No data\") });\n }\n return \"\";\n }\n return html`\n <style>\n :host {\n ${this.cssVariables.toCSS()}\n }\n </style>\n <div\n class=\"root ${iconDisplay === \"block-center\" ? \"block-display\" : \"inline-display\"}\"\n aria-label=\"product detail page Beam component\"\n >\n ${iconDisplay === \"block-center\"\n ? html`\n ${this.renderWidgetIcon(iconDisplay)}\n ${isPromoPillVisible\n ? html`\n <div class=\"promo-container\">\n <beam-promo-info-pill .promo=${data?.config?.web?.promo}></beam-promo-info-pill>\n </div>\n `\n : html``}\n <div class=\"info-container\">${this.renderContent(isPromoPillVisible, shouldShowPunctuation, data)}</div>\n `\n : html`\n ${isPromoPillVisible\n ? html`\n <div class=\"promo-container\">\n <beam-promo-info-pill .promo=${data?.config?.web?.promo}></beam-promo-info-pill>\n </div>\n `\n : html``}\n <div class=\"content-inline\">\n ${this.renderWidgetIcon(iconDisplay)}\n <div class=\"info-container\">${this.renderContent(isPromoPillVisible, shouldShowPunctuation, data)}</div>\n </div>\n `}\n </div>\n `;\n }\n\n renderWidgetIcon(iconDisplay: string) {\n const imageUrl = this.cssVariables[IMAGE_URL_REMOTE_CONFIG_KEY];\n\n if (!imageUrl) return html``;\n\n const isBlockDisplay = iconDisplay === \"block-center\";\n const containerStyle = isBlockDisplay ? 'style=\"order:1\"' : \"\";\n\n return html`\n <span class=\"icon-container\" part=\"icon\" ${containerStyle}>\n <img src=${imageUrl} part=\"icon\" aria-hidden=\"true\" alt=\"\" />\n </span>\n `;\n }\n\n renderContent(isPromoPillVisible: boolean, shouldDisplayColon: boolean, data: IAPIV3PostProductDetailsPage) {\n const title = localizeUserString(this.configLang, data?.config?.web?.title) || strings[this.configLang].ctaTitle();\n const description =\n localizeUserString(this.configLang, data?.config?.web?.description) || strings[this.configLang].ctaMessage();\n return isPromoPillVisible\n ? html`\n <div class=\"info-inline-promo\">\n <span class=\"title\">${title + (shouldDisplayColon ? strings[this.configLang].inlineSeparator() : \"\")}</span>\n <span class=\"description\"> <span>${description}</span> ${this.renderDisclosureTooltip()} </span>\n </div>\n `\n : html`\n <div class=\"title-block\">\n <h3 class=\"title\">${title}</h3>\n </div>\n <div class=\"description-block\">\n <span class=\"description\"> <span>${description}</span> ${this.renderDisclosureTooltip()} </span>\n </div>\n `;\n }\n\n renderCloseTooltipIcon() {\n return html`<svg\n aria-hidden=\"true\"\n width=\"11\"\n height=\"11\"\n viewBox=\"0 0 11 11\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.40836 5.40811L1.48828 1.48804M5.40836 5.40811L9.32843 9.32819M5.40836 5.40811L9.32843 1.48804M5.40836 5.40811L1.48828 9.32819\"\n stroke=\"white\"\n stroke-width=\"1.56803\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg> `;\n }\n\n /* PayPal Giving Fund Disclosure */\n renderDisclosureTooltip() {\n let closeTimer: number | undefined;\n let ariaTimer: number | undefined;\n\n // Does the PDP module still have the focusElement of the page?\n const stillHasFocus = () => {\n return document.activeElement?.tagName.toLowerCase() === this.tagName.toLowerCase();\n };\n\n const onHide = () => {\n // Even after animation is done, we need to give the browser a moment\n // to move focus to another element before setting aria-hidden\n clearTimeout(ariaTimer);\n ariaTimer = setTimeout(() => {\n this.renderRoot.querySelector(\".ppgf-disclosure-tooltip-content\")?.setAttribute(\"aria-hidden\", \"true\");\n }, 50);\n };\n\n const onShow = () => {\n clearTimeout(ariaTimer);\n this.renderRoot.querySelector(\".ppgf-disclosure-tooltip-content\")?.setAttribute(\"aria-hidden\", \"false\");\n };\n\n // Close the tooltip\n const closeTooltip = ({\n skipDelay = false,\n keepOpenIfFocused = false,\n }: {\n skipDelay?: boolean;\n keepOpenIfFocused?: boolean;\n }) => {\n clearTimeout(closeTimer);\n closeTimer = setTimeout(\n () => {\n // if focus is still on this module, don't close anything\n if (keepOpenIfFocused && stillHasFocus()) {\n return;\n }\n (this.renderRoot.querySelector(\".ppgf-disclosure-tooltip\") as any)?.hide();\n },\n skipDelay ? 0 : 300\n );\n };\n\n // Open the tooltip; resets the timeout for closing if one exists so we don't\n // close it again\n const openTooltip = () => {\n clearTimeout(closeTimer);\n (this.renderRoot.querySelector(\".ppgf-disclosure-tooltip\") as any)?.show();\n };\n\n // Toggle the tooltip\n const toggleTooltip = ({\n skipDelay = false,\n keepOpenIfFocused = false,\n }: {\n skipDelay?: boolean;\n keepOpenIfFocused?: boolean;\n }) => {\n const tooltip = this.renderRoot.querySelector(\".ppgf-disclosure-tooltip\") as any;\n if (tooltip) {\n if (tooltip.open) {\n closeTooltip({\n skipDelay,\n keepOpenIfFocused,\n });\n } else {\n openTooltip();\n }\n }\n };\n\n // Focus will go to \"<sl-tooltip>\" element first, triggering the tooltip to open\n const onFocusTrigger = () => {\n openTooltip();\n };\n\n // Blur on the trigger checks if focus is still on the PDP module before closing the tooltip\n const onBlurTrigger = () => {\n closeTooltip({\n skipDelay: false,\n keepOpenIfFocused: true,\n });\n };\n\n // If the icon is clicked, force open the tooltip (for mobile)\n const onClickTrigger = () => {\n openTooltip();\n };\n\n // Mouseover on the icon should open the tooltip every time\n const onMouseoverTooltip = () => {\n openTooltip();\n };\n\n // Mouseout of the icon should check if we came back within 100ms\n const onMouseoutTooltip = () => {\n closeTooltip({\n skipDelay: false,\n keepOpenIfFocused: false,\n });\n };\n\n // This is needed to close the tooltip if the focus goes from the tooltip content\n // to something outside the page\n const onKeydownTooltip = (evt: KeyboardEvent) => {\n // Check for Enter (key 13) or Space (key 32) which toggles the tooltip visibility immediately\n if (evt.key === \"Enter\" || evt.key === \" \") {\n toggleTooltip({\n skipDelay: true,\n keepOpenIfFocused: false,\n });\n return;\n }\n\n // If we tab out of the PDP tooltip, allow the tooltip to close itself\n closeTooltip({\n skipDelay: true,\n keepOpenIfFocused: true,\n });\n };\n\n // If the X is clicked, force close the tooltip\n const onClickClose = () => {\n closeTooltip({\n skipDelay: true,\n keepOpenIfFocused: false,\n });\n };\n\n const ppgfDisclosure = this.productDetailsPageDataController.data?.ppgfDisclosure;\n return ppgfDisclosure\n ? html`<sl-tooltip\n class=\"ppgf-disclosure-tooltip\"\n part=\"tooltip\"\n trigger=\"manual\"\n tabindex=\"0\"\n @mouseenter=\"${onMouseoverTooltip}\"\n @mouseleave=\"${onMouseoutTooltip}\"\n @keydown=\"${onKeydownTooltip}\"\n @sl-after-hide=\"${onHide}\"\n @sl-after-show=\"${onShow}\"\n >\n <div\n class=\"ppgf-disclosure-tooltip-content\"\n id=\"BeamPPGFDisclosure\"\n slot=\"content\"\n part=\"tooltip-content\"\n aria-hidden=\"true\"\n >\n <button\n class=\"ppgf-disclosure-close\"\n role=\"button\"\n aria-label=\"Close tooltip\"\n part=\"tooltip-close-button\"\n @click=\"${onClickClose}\"\n >\n ${this.renderCloseTooltipIcon()}\n </button>\n <div class=\"ppgf-disclosure-tooltip-copy\" part=\"tooltip-disclosure-copy\">\n ${unsafeHTML(ppgfDisclosure.copy)}\n </div>\n </div>\n <span\n class=\"ppgf-disclosure-tooltip-trigger\"\n part=\"tooltip-disclosure-icon\"\n aria-label=\"More Information\"\n role=\"button\"\n tabindex=\"0\"\n @focus=\"${onFocusTrigger}\"\n @blur=\"${onBlurTrigger}\"\n @click=\"${onClickTrigger}\"\n >\n <div class=\"ppgf-disclosure-tooltip-trigger-mask d-lg-none\"></div>\n <sl-button\n variant=\"text\"\n size=\"small\"\n class=\"ppgf-disclosure-tooltip-trigger\"\n part=\"tooltip-disclosure-button\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n circle\n >\n ${_info()}\n </sl-button>\n </span>\n </sl-tooltip>`\n : html``;\n }\n /* End PayPal Giving Fund Disclosure */\n\n public get cssVariables() {\n const defaults = {\n \"--beam-ProductDetailsPage-imageWidth\": \"24px\",\n \"--beam-ProductDetailsPage-imageHeight\": \"24px\",\n \"--beam-ProductDetailsPage-maxWidth\": \"346px\",\n \"--beam-ProductDetailsPage-paddingTop\": \"8px\",\n \"--beam-ProductDetailsPage-paddingRight\": \"12px\",\n \"--beam-ProductDetailsPage-paddingBottom\": \"8px\",\n \"--beam-ProductDetailsPage-paddingLeft\": \"15px\",\n \"--beam-ProductDetailsPage-InfoContainer-marginLeft\": \"8px\",\n \"--beam-ProductDetailsPage-InfoContainer-textAlign\": \"inherit\",\n \"--beam-ProductDetailsPage-InfoContainer-lineHeight\": \"15px\",\n \"--beam-ProductDetailsPage-InfoContainer-marginTop\": \"4px\",\n \"--beam-ProductDetailsPage-backgroundColor\": \"unset\",\n \"--beam-ProductDetailsPage-TooltipIcon-width\": \"10px\",\n \"--beam-ProductDetailsPage-TooltipIcon-color\": \"inherit\",\n \"--beam-ProductDetailsPage-PPGFDisclosure-backgroundColor\": \"#000000\",\n \"--beam-ProductDetailsPage-PPGFDisclosure-paddingTop\": \"10px\",\n \"--beam-ProductDetailsPage-PPGFDisclosure-paddingRight\": \"8px\",\n \"--beam-ProductDetailsPage-PPGFDisclosure-paddingBottom\": \"10px\",\n \"--beam-ProductDetailsPage-PPGFDisclosure-paddingLeft\": \"8px\",\n \"--beam-ProductDetailsPage-PPGFDisclosureHyperlink-color\": \"#5CA3FF\",\n ...defineCustomText(\"--beam-ProductDetailsPage-title\", {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n }),\n \"--beam-ProductDetailsPage-title-textAlign\": \"left\",\n ...defineCustomText(\"--beam-ProductDetailsPage-description\", {\n marginTop: \"0px\",\n fontSize: \"12px\",\n lineHeight: \"15px\",\n }),\n \"--beam-ProductDetailsPage-description-textAlign\": \"left\",\n ...defineCustomText(\"--beam-ProductDetailsPage-PPGFDisclosureTooltipContent\", {\n fontSize: \"12px\",\n lineHeight: \"16px\",\n color: \"#FFFFFF\",\n }),\n ...defineCustomBorder(\"--beam-ProductDetailsPage\"),\n \"--beam-ProductDetailsPage-close-display\": \"initial\",\n \"--beam-ProductDetailsPage-close-padding\": \"0\",\n \"--beam-ProductDetailsPage-image-placement\": \"inline-left\", // options: \"inline-left\" || \"block-center\"\n \"--beam-ProductDetailsPage-blockImage-alignSelf\": \"center\",\n \"--beam-ProductDetailsPage-promoPill-marginTop\": \"4px\",\n \"--beam-ProductDetailsPage-promoPill-alignSelf\": \"left\",\n \"--beam-ProductDetailsPage-shouldDisplayColon\": \"true\",\n \"--beam-ProductDetailsPage-shouldDisplayPromoPill\": \"true\",\n ...promoPillLabelConfigDefaults,\n };\n const remoteConfig = this.productDetailsPageDataController?.data?.config?.web?.theme || {};\n\n const config = { ...defaults, ...remoteConfig };\n\n const serializable = Object.create({\n toCSS() {\n return _cssVariableMap(this as Record<string, string>);\n },\n });\n\n return Object.assign(serializable, config);\n }\n\n static styles = [\n cssReset,\n cssResponsiveUtils,\n css`\n :host {\n font-family: var(--beam-fontFamily);\n font-style: var(--beam-fontStyle);\n font-size: var(--beam-fontSize);\n background-color: var(--beam-backgroundColor);\n color: var(--beam-textColor);\n max-width: var(--beam-ProductDetailsPage-maxWidth);\n word-break: normal;\n display: block;\n }\n .root {\n padding-top: var(--beam-ProductDetailsPage-paddingTop);\n padding-right: var(--beam-ProductDetailsPage-paddingRight);\n padding-bottom: var(--beam-ProductDetailsPage-paddingBottom);\n padding-left: var(--beam-ProductDetailsPage-paddingLeft);\n width: 100%;\n background-color: var(--beam-ProductDetailsPage-backgroundColor);\n display: flex;\n flex-direction: column;\n ${useCustomBorder(\"--beam-ProductDetailsPage\")}\n }\n /* When iconDisplay is inline-center */\n .inline-display {\n display: flex;\n }\n /* When iconDisplay is block-center */\n .block-display {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n .promo-container {\n order: 2;\n display: flex;\n margin-top: var(--beam-ProductDetailsPage-promoPill-marginTop);\n align-self: var(--beam-ProductDetailsPage-promoPill-alignSelf);\n }\n .content-inline {\n order: 3;\n display: flex;\n align-items: center;\n }\n /* Info block for both inline and block layout */\n .info-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n text-align: var(--beam-ProductDetailsPage-InfoContainer-textAlign);\n line-height: var(--beam-ProductDetailsPage-InfoContainer-lineHeight);\n margin-top: var(--beam-ProductDetailsPage-InfoContainer-marginTop);\n margin-left: var(--beam-ProductDetailsPage-InfoContainer-marginLeft);\n }\n .block-display .info-container {\n order: 3;\n }\n .root.inline-display .icon-container,\n .root.inline-display .info-container {\n display: inline-flex;\n }\n .root.inline-display {\n flex-direction: column;\n }\n .icon-container {\n width: var(--beam-ProductDetailsPage-imageWidth);\n height: var(--beam-ProductDetailsPage-imageHeight);\n align-self: var(--beam-ProductDetailsPage-blockImage-alignSelf);\n flex-shrink: 0;\n }\n .icon-container > img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n .title {\n ${useCustomText(\"--beam-ProductDetailsPage-title\")}\n }\n .title-block {\n text-align: var(--beam-ProductDetailsPage-title-textAlign);\n line-height: var(--beam-ProductDetailsPage-title-lineHeight);\n }\n .info-inline-promo {\n margin-top: var(--beam-ProductDetailsPage-description-marginTop, 0px);\n }\n .description {\n ${useCustomText(\"--beam-ProductDetailsPage-description\")}\n }\n .description-block {\n text-align: var(--beam-ProductDetailsPage-description-textAlign);\n line-height: var(--beam-ProductDetailsPage-description-lineHeight);\n ${useCustomText(\"--beam-ProductDetailsPage-description\")}\n }\n .ppgf-disclosure-tooltip {\n --max-width: 268px;\n }\n .ppgf-disclosure-tooltip::part(body) {\n background-color: var(--beam-ProductDetailsPage-PPGFDisclosure-backgroundColor);\n padding-top: var(--beam-ProductDetailsPage-PPGFDisclosure-paddingTop);\n padding-right: var(--beam-ProductDetailsPage-PPGFDisclosure-paddingRight);\n padding-bottom: var(--beam-ProductDetailsPage-PPGFDisclosure-paddingBottom);\n padding-left: var(--beam-ProductDetailsPage-PPGFDisclosure-paddingLeft);\n }\n .ppgf-disclosure-tooltip::part(base__arrow) {\n background-color: var(--beam-ProductDetailsPage-PPGFDisclosure-backgroundColor);\n }\n .ppgf-disclosure-tooltip-content {\n display: flex;\n flex-direction: column;\n ${useCustomText(\"--beam-ProductDetailsPage-PPGFDisclosureTooltipContent\")}\n }\n .ppgf-disclosure-tooltip-copy > a,\n .ppgf-disclosure-close {\n pointer-events: auto;\n cursor: pointer;\n color: var(--beam-ProductDetailsPage-PPGFDisclosureHyperlink-color);\n }\n .ppgf-disclosure-close {\n display: var(--beam-ProductDetailsPage-close-display);\n padding: var(--beam-ProductDetailsPage-close-padding);\n height: 12px;\n background: none;\n border: none;\n margin-left: auto;\n }\n .ppgf-disclosure-tooltip-copy > a:visited {\n color: var(--beam-ProductDetailsPage-PPGFDisclosureHyperlink-color);\n }\n .ppgf-disclosure-tooltip-trigger {\n position: relative;\n }\n .ppgf-disclosure-tooltip-trigger-mask {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: calc(var(--beam-ProductDetailsPage-TooltipIcon-width) + 20px);\n height: calc(var(--beam-ProductDetailsPage-TooltipIcon-width) + 20px);\n }\n .ppgf-disclosure-tooltip-trigger::part(base) {\n line-height: 1;\n border: none;\n min-height: 0;\n min-width: 0;\n width: auto;\n color: var(--beam-ProductDetailsPage-TooltipIcon-color);\n }\n .ppgf-disclosure-tooltip-trigger::part(label) {\n padding: 0;\n }\n .ppgf-disclosure-tooltip-trigger > svg {\n width: var(--beam-ProductDetailsPage-TooltipIcon-width);\n color: var(--beam-ProductDetailsPage-TooltipIcon-color);\n height: auto;\n }\n `,\n ];\n}\n\ndefineCustomElement(BeamProductDetailsPage);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"beam-product-details-page\": BeamProductDetailsPage;\n }\n}\n"],"names":["defineCustomBorder","namespace","borderRadius","borderStyle","borderColor","borderWidth","prefix","useCustomBorder","unsafeCSS","_info","html","strings","$","s","f","g","e","t","o","i","r","IMAGE_URL_REMOTE_CONFIG_KEY","BeamProductDetailsPage","LitElement","DEFAULT_BASE_URL","createScopedLocalStorage","evt","promoCodesFromPlugin","c","enforceConfig","beamCartId","getBeamCartId","BEAM_CART_COOKIE_NAME","manualPromoCodes","formattedPromos","formatStoreAndReturnPromoCodes","code","shouldSendPromos","isEmptyPromoData","BeamWidgetStoredPromoCodesEvent","WIDGET_NAMES","res","postProductDetailsPage","makeApiKeyHeader","AsyncController","SUPPORTED_LANGUAGES","parseJsonStringArray","cart","getPromoCodesFromCart","response","setPromoCodesInLocalStorage","setPromoCodeInCookie","BeamPromoCodesStoredEvent","changedProperties","requireNewDataProps","prop","data","loading","iconDisplay","isNonZero","value","shouldDisplayPromoPill","isPromoActive","hasValidImageHeight","hasValidTitleFontSize","isPromoPillVisible","shouldShowPunctuation","_errorMessage","imageUrl","shouldDisplayColon","title","localizeUserString","description","closeTimer","ariaTimer","stillHasFocus","onHide","onShow","closeTooltip","skipDelay","keepOpenIfFocused","openTooltip","toggleTooltip","tooltip","onFocusTrigger","onBlurTrigger","onClickTrigger","onMouseoverTooltip","onMouseoutTooltip","onKeydownTooltip","onClickClose","ppgfDisclosure","unsafeHTML","defaults","defineCustomText","promoPillLabelConfigDefaults","remoteConfig","config","_cssVariableMap","cssReset","cssResponsiveUtils","css","useCustomText","__decorateClass","property","state","defineCustomElement"],"mappings":"wpCAEO,MAAMA,GAAqB,CAChCC,EAAY,GACZ,CAAE,aAAAC,EAAe,MAAO,YAAAC,EAAc,QAAS,YAAAC,EAAc,UAAW,YAAAC,EAAc,KAAM,EAAI,CAAA,IACrE,CAC3B,MAAMC,EAASL,EAAU,WAAW,SAAS,EAAIA,EAAY,UAAUA,CAAS,GAChF,MAAO,CACL,CAAC,GAAGK,CAAM,eAAe,EAAGJ,EAC5B,CAAC,GAAGI,CAAM,cAAc,EAAGH,EAC3B,CAAC,GAAGG,CAAM,cAAc,EAAGF,EAC3B,CAAC,GAAGE,CAAM,cAAc,EAAGD,CAC7B,CACF,EAEaE,GAAkB,CAC7BN,EAAY,GACZ,CAAE,aAAAC,EAAe,MAAO,YAAAC,EAAc,QAAS,YAAAC,EAAc,UAAW,YAAAC,EAAc,KAAM,EAAI,CAClF,IAAA,CACd,MAAMC,EAASL,EAAU,WAAW,SAAS,EAAIA,EAAY,UAAUA,CAAS,GAChF,OAAOO,EAAU,8BACUF,CAAM,kBAAkBJ,CAAY;AAAA,4BACrCI,CAAM,iBAAiBH,CAAW;AAAA,4BAClCG,CAAM,iBAAiBF,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CAbhB,EAAAlF,EAayB,mBAERiF,EAAA,CAA3BC,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAfflF,EAeiB,UAAA,yBAAA,EAEOiF,EAAA,CAAlCC,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAjBflF,EAiBwB,UAEAiF,YAAAA,EAAAA,EAAA,CAAlCC,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAnBflF,EAmBwB,UAAA,QAAA,EAIlBiF,EAAA,CAAhBE,GAvBU,EAAAnF,EAuBM,UAqoBnBoF,kBAAAA,EAAAA,EAAoBpF,CAAsB"}
|
|
1
|
+
{"version":3,"file":"product-details-page.esm.js","sources":["../../src/shared/fragments/custom-border.ts","../../src/shared/fragments/info.ts","../../src/components/product-details-page/strings.ts","../../src/components/product-details-page/index.ts"],"sourcesContent":["import { CSSResult, unsafeCSS } from \"lit\";\n\nexport const defineCustomBorder = (\n namespace = \"\",\n { borderRadius = \"0px\", borderStyle = \"unset\", borderColor = \"#000000\", borderWidth = \"1px\" } = {}\n): Record<string, string> => {\n const prefix = namespace.startsWith(\"--beam-\") ? namespace : `--beam-${namespace}`;\n return {\n [`${prefix}-borderRadius`]: borderRadius,\n [`${prefix}-borderStyle`]: borderStyle,\n [`${prefix}-borderColor`]: borderColor,\n [`${prefix}-borderWidth`]: borderWidth,\n };\n};\n\nexport const useCustomBorder = (\n namespace = \"\",\n { borderRadius = \"0px\", borderStyle = \"unset\", borderColor = \"#000000\", borderWidth = \"1px\" } = {}\n): CSSResult => {\n const prefix = namespace.startsWith(\"--beam-\") ? namespace : `--beam-${namespace}`;\n return unsafeCSS(`\\\n border-radius: var(${prefix}-borderRadius, ${borderRadius});\n border-style: var(${prefix}-borderStyle, ${borderStyle});\n border-color: var(${prefix}-borderColor, ${borderColor});\n border-width: var(${prefix}-borderWidth, ${borderWidth});\n `);\n};\n","import { html } from \"lit\";\n\nexport const _info = () => html` <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n part=\"svg\"\n>\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <path d=\"M12 16v-4\"></path>\n <path d=\"M12 8h.01\"></path>\n</svg>`;\n","export const strings = {\n en: {\n ctaTitle: () => `Choose Your Impact`,\n ctaMessage: () =>\n `At no extra cost, 1% of every order will be donated to a nonprofit you choose. Add to cart to choose. Powered by Beam`,\n inlineSeparator: () => `:`,\n },\n fr: {\n ctaTitle: () => `Choisissez votre impact`,\n ctaMessage: () =>\n `Sans frais supplémentaires, 1 % de chaque commande est reversé à l'association de votre choix. Ajoutez au panier pour choisir. Propulsé par Beam.`,\n inlineSeparator: () => `:`,\n },\n es: {\n ctaTitle: () => `Elige tu impacto`,\n ctaMessage: () =>\n `Sin coste adicional, el 1 % de cada pedido se dona a la organización sin ánimo de lucro que elijas. Añádelo al carrito para elegir. Impulsado por Beam.`,\n inlineSeparator: () => `:`,\n },\n de: {\n ctaTitle: () => `Wählen Sie Ihren Impact`,\n ctaMessage: () =>\n `Ohne zusätzliche Kosten wird 1 % jeder Bestellung an eine von Ihnen gewählte gemeinnützige Organisation gespendet. Zum Warenkorb hinzufügen, um auszuwählen. Unterstützt von Beam.`,\n inlineSeparator: () => `:`,\n },\n it: {\n ctaTitle: () => `Scegli il tuo impatto`,\n ctaMessage: () =>\n `L'1 % di ogni acquisto viene donato, senza alcun costo aggiuntivo, a un'organizzazione no-profit a tua scelta. Aggiungi al carrello per scegliere. Promosso da Beam.`,\n inlineSeparator: () => `:`,\n },\n pl: {\n ctaTitle: () => `Wybierz swój wpływ`,\n ctaMessage: () =>\n `1 % wartości każdego zamówienia przekazywany jest na wybraną przez Ciebie organizację non-profit – bez dodatkowych kosztów. Dodaj do koszyka, aby wybrać. Obsługiwane przez Beam.`,\n inlineSeparator: () => `:`,\n },\n ja: {\n ctaTitle: () => `寄付先をお選びください。`,\n ctaMessage: () =>\n `追加費用なしで、ご注文金額の1%を非営利団体へ寄付できます。ご希望の場合、カートに追加して寄付内容をお選びください。Powered by Beam`,\n inlineSeparator: () => `:`,\n },\n};\n","import { LitElement, css, html } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { unsafeHTML } from \"lit/directives/unsafe-html.js\";\nimport { AsyncController } from \"../../shared/controllers/async-controller\";\nimport { postProductDetailsPage } from \"../../api-sdk/v3/routes\";\nimport { DEFAULT_BASE_URL, SUPPORTED_LANGUAGES, WIDGET_NAMES } from \"../../api-sdk/constants\";\nimport { LANGUAGES, TUrl } from \"../../api-sdk/types\";\nimport { MissingConfig } from \"../../utils/beam-errors\";\nimport { enforceConfig } from \"../../shared/enforce-config\";\nimport { _cssVariableMap } from \"../../shared/fragments/css-variable-map\";\nimport { localizeUserString } from \"../../shared/localize\";\nimport { _errorMessage } from \"../../shared/fragments/error-message-template\";\nimport { cssResponsiveUtils } from \"../../shared/responsive\";\nimport { defineCustomElement } from \"../../shared/defineCustomElement\";\nimport { cssReset } from \"../../shared/css-reset\";\nimport { defineCustomText, useCustomText } from \"../../shared/fragments/custom-text\";\nimport { defineCustomBorder, useCustomBorder } from \"../../shared/fragments/custom-border\";\n// shoelace html tag imports\nimport \"../../shared/shoelace-components\";\nimport \"@shoelace-style/shoelace/dist/components/tooltip/tooltip.js\";\nimport \"@shoelace-style/shoelace/dist/components/button/button.js\";\nimport { _info } from \"../../shared/fragments/info\";\nimport { promoPillLabelConfigDefaults } from \"../../shared/components/promo-pill-label\";\nimport {\n getPromoCodesFromCart,\n setPromoCodeInCookie,\n parseJsonStringArray,\n formatStoreAndReturnPromoCodes,\n setPromoCodesInLocalStorage,\n isEmptyPromoData,\n} from \"../../utils/promoManager\";\nimport \"../../shared/components/promo-pill-label\";\nimport { BEAM_CART_COOKIE_NAME, TBeamCartLocalStorage } from \"../../shared/cart-contents\";\nimport { createScopedLocalStorage } from \"../../utils/local-storage\";\nimport { makeApiKeyHeader } from \"../../utils/makeApiKeyHeader\";\nimport { BeamPromoCodesStoredEvent, BeamWidgetStoredPromoCodesEvent } from \"../../utils/events\";\nimport { getBeamCartId } from \"../../utils/cart\";\nimport { strings } from \"./strings\";\n\ntype RequiredConfig = {\n apiKey: string;\n storeId: number;\n};\ntype IAPIV3PostProductDetailsPage = Awaited<ReturnType<typeof postProductDetailsPage>>;\n\nconst IMAGE_URL_REMOTE_CONFIG_KEY = \"--beam-ProductDetailsPage-imageUrl\";\n\nexport class BeamProductDetailsPage extends LitElement {\n static tagName = \"beam-product-details-page\";\n\n @property({ type: String, reflect: true }) public baseUrl: TUrl = DEFAULT_BASE_URL;\n\n @property({ type: String, reflect: false }) apiKey?: RequiredConfig[\"apiKey\"];\n\n @property({ type: Number }) storeId?: number;\n\n @property({ type: String }) public lang: LANGUAGES = \"en\";\n\n @property({ type: Boolean }) public draftConfig = false;\n\n @property({ type: Boolean }) public debug = false;\n\n @property({ type: String }) remoteProductIdentifier?: string;\n\n @property({ type: String }) public promoCodes?: string;\n\n @property({ type: String }) public domain?: string;\n\n private localStorage = createScopedLocalStorage(this as LitElement & RequiredConfig);\n\n @state() private pluginPromoCodes: string[] = [];\n\n get configLang() {\n return SUPPORTED_LANGUAGES[this.lang] || \"en\";\n }\n\n get parsedPromoCodes(): string[] {\n return parseJsonStringArray(this.promoCodes);\n }\n\n private handlePromoCodesStored = (evt: BeamPromoCodesStoredEvent) => {\n const promoCodesFromPlugin = (evt.detail.promoCodes?.unvalidatedPromoCodes ?? [])\n .map((c) => c.attributes?.value ?? c.attributes?.url ?? \"\")\n .sort();\n this.pluginPromoCodes = promoCodesFromPlugin;\n };\n\n private getManualPromoCodes(): string[] {\n // Priority 1: Widget passed discount codes\n if (this.parsedPromoCodes && this.parsedPromoCodes.length > 0) {\n return this.parsedPromoCodes;\n }\n\n // Priority 2: Cart fallback\n const cart = this.localStorage.getItemJson<TBeamCartLocalStorage>(\"cart\");\n return cart ? getPromoCodesFromCart(cart) : [];\n }\n\n private async handleValidatedPromoCodes(response: IAPIV3PostProductDetailsPage) {\n if (response.promos?.validatedPromoCodes) {\n await Promise.all([\n setPromoCodesInLocalStorage({\n apiKey: this.apiKey,\n promoCodes: { validatedPromoCodes: response.promos.validatedPromoCodes, unvalidatedPromoCodes: [] },\n }),\n setPromoCodeInCookie({\n validatedPromoCodes: response.promos.validatedPromoCodes,\n domain: this.domain,\n }),\n ]);\n this.dispatchEvent(\n new BeamWidgetStoredPromoCodesEvent({\n source: WIDGET_NAMES.product_details_page,\n })\n );\n }\n }\n\n async firstUpdated() {\n window.addEventListener(BeamPromoCodesStoredEvent.eventName, this.handlePromoCodesStored as EventListener);\n }\n\n disconnectedCallback() {\n window.removeEventListener(BeamPromoCodesStoredEvent.eventName, this.handlePromoCodesStored as EventListener);\n super.disconnectedCallback();\n }\n\n postProductDetailsPageData = async () => {\n if (!enforceConfig<RequiredConfig>([\"apiKey\", \"storeId\"], this)) throw new MissingConfig();\n const beamCartId = getBeamCartId(BEAM_CART_COOKIE_NAME, { apiKey: this.apiKey });\n\n const manualPromoCodes = this.getManualPromoCodes();\n const formattedPromos = formatStoreAndReturnPromoCodes(\n manualPromoCodes.map((code) => ({ value: code })),\n this.apiKey\n );\n const shouldSendPromos = formattedPromos && !isEmptyPromoData(formattedPromos);\n\n if (shouldSendPromos) {\n this.dispatchEvent(\n new BeamWidgetStoredPromoCodesEvent({\n source: WIDGET_NAMES.product_details_page,\n })\n );\n }\n const res = await postProductDetailsPage({\n baseUrl: this.baseUrl,\n headers: makeApiKeyHeader(this.apiKey),\n queryParams: {\n version: \"1.0.0\",\n lang: this.configLang,\n storeId: this.storeId,\n widgetName: WIDGET_NAMES.product_details_page,\n draftConfig: this.draftConfig,\n remoteProductIdentifier: this.remoteProductIdentifier,\n },\n requestBody: {\n ...(shouldSendPromos && { promos: formattedPromos }),\n beamCartId: beamCartId ? beamCartId : undefined,\n },\n });\n this.handleValidatedPromoCodes(res);\n return res;\n };\n\n private productDetailsPageDataController = new AsyncController<typeof this.postProductDetailsPageData>(\n this,\n this.postProductDetailsPageData\n );\n\n async updated(changedProperties: Map<string, unknown>) {\n const requireNewDataProps = [\"storeId\", \"baseUrl\", \"lang\", \"apiKey\", \"pluginPromoCodes\", \"promoCodes\"];\n void this.pluginPromoCodes;\n for (const prop of requireNewDataProps) {\n if (changedProperties.has(prop)) {\n await this.productDetailsPageDataController.exec();\n break;\n }\n }\n }\n\n render() {\n const { data, loading } = this.productDetailsPageDataController;\n const iconDisplay = this.cssVariables[\"--beam-ProductDetailsPage-image-placement\"];\n const isNonZero = (value: string) => value !== \"0px\" && value !== \"0\";\n const shouldDisplayPromoPill = this.cssVariables[\"--beam-ProductDetailsPage-shouldDisplayPromoPill\"] === \"true\";\n const isPromoActive = !!data?.config?.web?.promo;\n const hasValidImageHeight = isNonZero(this.cssVariables[\"--beam-ProductDetailsPage-imageHeight\"]);\n const hasValidTitleFontSize = isNonZero(this.cssVariables[\"--beam-ProductDetailsPage-title-fontSize\"]);\n const isPromoPillVisible =\n shouldDisplayPromoPill && // Determines if the promo pill is enabled for the marketing version of the PDP\n isPromoActive && // Is promo currently active\n hasValidImageHeight && // Ensures the promo pill is not displayed for the subtext version of the PDP\n hasValidTitleFontSize; // Ensures the promo pill is not displayed for the subtext version of the PDP\n const shouldShowPunctuation = this.cssVariables[\"--beam-ProductDetailsPage-shouldDisplayColon\"] === \"true\"; // Determines if a colon should be displayed in promo display\n\n if (loading) {\n return html``;\n }\n if (data == null) {\n if (this.debug) {\n return _errorMessage({ error: new Error(\"No data\") });\n }\n return \"\";\n }\n return html`\n <style>\n :host {\n ${this.cssVariables.toCSS()}\n }\n </style>\n <div\n class=\"root ${iconDisplay === \"block-center\" ? \"block-display\" : \"inline-display\"}\"\n aria-label=\"product detail page Beam component\"\n >\n ${iconDisplay === \"block-center\"\n ? html`\n ${this.renderWidgetIcon(iconDisplay)}\n ${isPromoPillVisible\n ? html`\n <div class=\"promo-container\">\n <beam-promo-info-pill .promo=${data?.config?.web?.promo}></beam-promo-info-pill>\n </div>\n `\n : html``}\n <div class=\"info-container\">${this.renderContent(isPromoPillVisible, shouldShowPunctuation, data)}</div>\n `\n : html`\n ${isPromoPillVisible\n ? html`\n <div class=\"promo-container\">\n <beam-promo-info-pill .promo=${data?.config?.web?.promo}></beam-promo-info-pill>\n </div>\n `\n : html``}\n <div class=\"content-inline\">\n ${this.renderWidgetIcon(iconDisplay)}\n <div class=\"info-container\">${this.renderContent(isPromoPillVisible, shouldShowPunctuation, data)}</div>\n </div>\n `}\n </div>\n `;\n }\n\n renderWidgetIcon(iconDisplay: string) {\n const imageUrl = this.cssVariables[IMAGE_URL_REMOTE_CONFIG_KEY];\n\n if (!imageUrl) return html``;\n\n const isBlockDisplay = iconDisplay === \"block-center\";\n const containerStyle = isBlockDisplay ? 'style=\"order:1\"' : \"\";\n\n return html`\n <span class=\"icon-container\" part=\"icon\" ${containerStyle}>\n <img src=${imageUrl} part=\"icon\" aria-hidden=\"true\" alt=\"\" />\n </span>\n `;\n }\n\n renderContent(isPromoPillVisible: boolean, shouldDisplayColon: boolean, data: IAPIV3PostProductDetailsPage) {\n const title = localizeUserString(this.configLang, data?.config?.web?.title) || strings[this.configLang].ctaTitle();\n const description =\n localizeUserString(this.configLang, data?.config?.web?.description) || strings[this.configLang].ctaMessage();\n return isPromoPillVisible\n ? html`\n <div class=\"info-inline-promo\">\n <span class=\"title\">${title + (shouldDisplayColon ? strings[this.configLang].inlineSeparator() : \"\")}</span>\n <span class=\"description\"> <span>${description}</span> ${this.renderDisclosureTooltip()} </span>\n </div>\n `\n : html`\n <div class=\"title-block\">\n <h3 class=\"title\">${title}</h3>\n </div>\n <div class=\"description-block\">\n <span class=\"description\"> <span>${description}</span> ${this.renderDisclosureTooltip()} </span>\n </div>\n `;\n }\n\n renderCloseTooltipIcon() {\n return html`<svg\n aria-hidden=\"true\"\n width=\"11\"\n height=\"11\"\n viewBox=\"0 0 11 11\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.40836 5.40811L1.48828 1.48804M5.40836 5.40811L9.32843 9.32819M5.40836 5.40811L9.32843 1.48804M5.40836 5.40811L1.48828 9.32819\"\n stroke=\"white\"\n stroke-width=\"1.56803\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg> `;\n }\n\n /* PayPal Giving Fund Disclosure */\n renderDisclosureTooltip() {\n let closeTimer: number | undefined;\n let ariaTimer: number | undefined;\n\n // Does the PDP module still have the focusElement of the page?\n const stillHasFocus = () => {\n return document.activeElement?.tagName.toLowerCase() === this.tagName.toLowerCase();\n };\n\n const onHide = () => {\n // Even after animation is done, we need to give the browser a moment\n // to move focus to another element before setting aria-hidden\n clearTimeout(ariaTimer);\n ariaTimer = setTimeout(() => {\n this.renderRoot.querySelector(\".ppgf-disclosure-tooltip-content\")?.setAttribute(\"aria-hidden\", \"true\");\n }, 50);\n };\n\n const onShow = () => {\n clearTimeout(ariaTimer);\n this.renderRoot.querySelector(\".ppgf-disclosure-tooltip-content\")?.setAttribute(\"aria-hidden\", \"false\");\n };\n\n // Close the tooltip\n const closeTooltip = ({\n skipDelay = false,\n keepOpenIfFocused = false,\n }: {\n skipDelay?: boolean;\n keepOpenIfFocused?: boolean;\n }) => {\n clearTimeout(closeTimer);\n closeTimer = setTimeout(\n () => {\n // if focus is still on this module, don't close anything\n if (keepOpenIfFocused && stillHasFocus()) {\n return;\n }\n (this.renderRoot.querySelector(\".ppgf-disclosure-tooltip\") as any)?.hide();\n },\n skipDelay ? 0 : 300\n );\n };\n\n // Open the tooltip; resets the timeout for closing if one exists so we don't\n // close it again\n const openTooltip = () => {\n clearTimeout(closeTimer);\n (this.renderRoot.querySelector(\".ppgf-disclosure-tooltip\") as any)?.show();\n };\n\n // Toggle the tooltip\n const toggleTooltip = ({\n skipDelay = false,\n keepOpenIfFocused = false,\n }: {\n skipDelay?: boolean;\n keepOpenIfFocused?: boolean;\n }) => {\n const tooltip = this.renderRoot.querySelector(\".ppgf-disclosure-tooltip\") as any;\n if (tooltip) {\n if (tooltip.open) {\n closeTooltip({\n skipDelay,\n keepOpenIfFocused,\n });\n } else {\n openTooltip();\n }\n }\n };\n\n // Focus will go to \"<sl-tooltip>\" element first, triggering the tooltip to open\n const onFocusTrigger = () => {\n openTooltip();\n };\n\n // Blur on the trigger checks if focus is still on the PDP module before closing the tooltip\n const onBlurTrigger = () => {\n closeTooltip({\n skipDelay: false,\n keepOpenIfFocused: true,\n });\n };\n\n // If the icon is clicked, force open the tooltip (for mobile)\n const onClickTrigger = () => {\n openTooltip();\n };\n\n // Mouseover on the icon should open the tooltip every time\n const onMouseoverTooltip = () => {\n openTooltip();\n };\n\n // Mouseout of the icon should check if we came back within 100ms\n const onMouseoutTooltip = () => {\n closeTooltip({\n skipDelay: false,\n keepOpenIfFocused: false,\n });\n };\n\n // This is needed to close the tooltip if the focus goes from the tooltip content\n // to something outside the page\n const onKeydownTooltip = (evt: KeyboardEvent) => {\n // Check for Enter (key 13) or Space (key 32) which toggles the tooltip visibility immediately\n if (evt.key === \"Enter\" || evt.key === \" \") {\n toggleTooltip({\n skipDelay: true,\n keepOpenIfFocused: false,\n });\n return;\n }\n\n // If we tab out of the PDP tooltip, allow the tooltip to close itself\n closeTooltip({\n skipDelay: true,\n keepOpenIfFocused: true,\n });\n };\n\n // If the X is clicked, force close the tooltip\n const onClickClose = () => {\n closeTooltip({\n skipDelay: true,\n keepOpenIfFocused: false,\n });\n };\n\n const ppgfDisclosure = this.productDetailsPageDataController.data?.ppgfDisclosure;\n return ppgfDisclosure\n ? html`<sl-tooltip\n class=\"ppgf-disclosure-tooltip\"\n part=\"tooltip\"\n trigger=\"manual\"\n tabindex=\"0\"\n @mouseenter=\"${onMouseoverTooltip}\"\n @mouseleave=\"${onMouseoutTooltip}\"\n @keydown=\"${onKeydownTooltip}\"\n @sl-after-hide=\"${onHide}\"\n @sl-after-show=\"${onShow}\"\n >\n <div\n class=\"ppgf-disclosure-tooltip-content\"\n id=\"BeamPPGFDisclosure\"\n slot=\"content\"\n part=\"tooltip-content\"\n aria-hidden=\"true\"\n >\n <button\n class=\"ppgf-disclosure-close\"\n role=\"button\"\n aria-label=\"Close tooltip\"\n part=\"tooltip-close-button\"\n @click=\"${onClickClose}\"\n >\n ${this.renderCloseTooltipIcon()}\n </button>\n <div class=\"ppgf-disclosure-tooltip-copy\" part=\"tooltip-disclosure-copy\">\n ${unsafeHTML(ppgfDisclosure.copy)}\n </div>\n </div>\n <span\n class=\"ppgf-disclosure-tooltip-trigger\"\n part=\"tooltip-disclosure-icon\"\n aria-label=\"More Information\"\n role=\"button\"\n tabindex=\"0\"\n @focus=\"${onFocusTrigger}\"\n @blur=\"${onBlurTrigger}\"\n @click=\"${onClickTrigger}\"\n >\n <div class=\"ppgf-disclosure-tooltip-trigger-mask d-lg-none\"></div>\n <sl-button\n variant=\"text\"\n size=\"small\"\n class=\"ppgf-disclosure-tooltip-trigger\"\n part=\"tooltip-disclosure-button\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n circle\n >\n ${_info()}\n </sl-button>\n </span>\n </sl-tooltip>`\n : html``;\n }\n /* End PayPal Giving Fund Disclosure */\n\n public get cssVariables() {\n const defaults = {\n \"--beam-ProductDetailsPage-imageWidth\": \"24px\",\n \"--beam-ProductDetailsPage-imageHeight\": \"24px\",\n \"--beam-ProductDetailsPage-maxWidth\": \"346px\",\n \"--beam-ProductDetailsPage-paddingTop\": \"8px\",\n \"--beam-ProductDetailsPage-paddingRight\": \"12px\",\n \"--beam-ProductDetailsPage-paddingBottom\": \"8px\",\n \"--beam-ProductDetailsPage-paddingLeft\": \"15px\",\n \"--beam-ProductDetailsPage-InfoContainer-marginLeft\": \"8px\",\n \"--beam-ProductDetailsPage-InfoContainer-textAlign\": \"inherit\",\n \"--beam-ProductDetailsPage-InfoContainer-lineHeight\": \"15px\",\n \"--beam-ProductDetailsPage-InfoContainer-marginTop\": \"4px\",\n \"--beam-ProductDetailsPage-backgroundColor\": \"unset\",\n \"--beam-ProductDetailsPage-TooltipIcon-width\": \"10px\",\n \"--beam-ProductDetailsPage-TooltipIcon-color\": \"inherit\",\n \"--beam-ProductDetailsPage-PPGFDisclosure-backgroundColor\": \"#000000\",\n \"--beam-ProductDetailsPage-PPGFDisclosure-paddingTop\": \"10px\",\n \"--beam-ProductDetailsPage-PPGFDisclosure-paddingRight\": \"8px\",\n \"--beam-ProductDetailsPage-PPGFDisclosure-paddingBottom\": \"10px\",\n \"--beam-ProductDetailsPage-PPGFDisclosure-paddingLeft\": \"8px\",\n \"--beam-ProductDetailsPage-PPGFDisclosureHyperlink-color\": \"#5CA3FF\",\n ...defineCustomText(\"--beam-ProductDetailsPage-title\", {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n }),\n \"--beam-ProductDetailsPage-title-textAlign\": \"left\",\n ...defineCustomText(\"--beam-ProductDetailsPage-description\", {\n marginTop: \"0px\",\n fontSize: \"12px\",\n lineHeight: \"15px\",\n }),\n \"--beam-ProductDetailsPage-description-textAlign\": \"left\",\n ...defineCustomText(\"--beam-ProductDetailsPage-PPGFDisclosureTooltipContent\", {\n fontSize: \"12px\",\n lineHeight: \"16px\",\n color: \"#FFFFFF\",\n }),\n ...defineCustomBorder(\"--beam-ProductDetailsPage\"),\n \"--beam-ProductDetailsPage-close-display\": \"initial\",\n \"--beam-ProductDetailsPage-close-padding\": \"0\",\n \"--beam-ProductDetailsPage-image-placement\": \"inline-left\", // options: \"inline-left\" || \"block-center\"\n \"--beam-ProductDetailsPage-blockImage-alignSelf\": \"center\",\n \"--beam-ProductDetailsPage-promoPill-marginTop\": \"4px\",\n \"--beam-ProductDetailsPage-promoPill-alignSelf\": \"left\",\n \"--beam-ProductDetailsPage-shouldDisplayColon\": \"true\",\n \"--beam-ProductDetailsPage-shouldDisplayPromoPill\": \"true\",\n ...promoPillLabelConfigDefaults,\n };\n const remoteConfig = this.productDetailsPageDataController?.data?.config?.web?.theme || {};\n\n const config = { ...defaults, ...remoteConfig };\n\n const serializable = Object.create({\n toCSS() {\n return _cssVariableMap(this as Record<string, string>);\n },\n });\n\n return Object.assign(serializable, config);\n }\n\n static styles = [\n cssReset,\n cssResponsiveUtils,\n css`\n :host {\n font-family: var(--beam-fontFamily);\n font-style: var(--beam-fontStyle);\n font-size: var(--beam-fontSize);\n background-color: var(--beam-backgroundColor);\n color: var(--beam-textColor);\n max-width: var(--beam-ProductDetailsPage-maxWidth);\n word-break: normal;\n display: block;\n }\n .root {\n padding-top: var(--beam-ProductDetailsPage-paddingTop);\n padding-right: var(--beam-ProductDetailsPage-paddingRight);\n padding-bottom: var(--beam-ProductDetailsPage-paddingBottom);\n padding-left: var(--beam-ProductDetailsPage-paddingLeft);\n width: 100%;\n background-color: var(--beam-ProductDetailsPage-backgroundColor);\n display: flex;\n flex-direction: column;\n ${useCustomBorder(\"--beam-ProductDetailsPage\")}\n }\n /* When iconDisplay is inline-center */\n .inline-display {\n display: flex;\n }\n /* When iconDisplay is block-center */\n .block-display {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n .promo-container {\n order: 2;\n display: flex;\n margin-top: var(--beam-ProductDetailsPage-promoPill-marginTop);\n align-self: var(--beam-ProductDetailsPage-promoPill-alignSelf);\n }\n .content-inline {\n order: 3;\n display: flex;\n align-items: center;\n }\n /* Info block for both inline and block layout */\n .info-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n text-align: var(--beam-ProductDetailsPage-InfoContainer-textAlign);\n line-height: var(--beam-ProductDetailsPage-InfoContainer-lineHeight);\n margin-top: var(--beam-ProductDetailsPage-InfoContainer-marginTop);\n margin-left: var(--beam-ProductDetailsPage-InfoContainer-marginLeft);\n }\n .block-display .info-container {\n order: 3;\n }\n .root.inline-display .icon-container,\n .root.inline-display .info-container {\n display: inline-flex;\n }\n .root.inline-display {\n flex-direction: column;\n }\n .icon-container {\n width: var(--beam-ProductDetailsPage-imageWidth);\n height: var(--beam-ProductDetailsPage-imageHeight);\n align-self: var(--beam-ProductDetailsPage-blockImage-alignSelf);\n flex-shrink: 0;\n }\n .icon-container > img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n .title {\n ${useCustomText(\"--beam-ProductDetailsPage-title\")}\n }\n .title-block {\n text-align: var(--beam-ProductDetailsPage-title-textAlign);\n line-height: var(--beam-ProductDetailsPage-title-lineHeight);\n }\n .info-inline-promo {\n margin-top: var(--beam-ProductDetailsPage-description-marginTop, 0px);\n }\n .description {\n ${useCustomText(\"--beam-ProductDetailsPage-description\")}\n }\n .description-block {\n text-align: var(--beam-ProductDetailsPage-description-textAlign);\n line-height: var(--beam-ProductDetailsPage-description-lineHeight);\n ${useCustomText(\"--beam-ProductDetailsPage-description\")}\n }\n .ppgf-disclosure-tooltip {\n --max-width: 268px;\n }\n .ppgf-disclosure-tooltip::part(body) {\n background-color: var(--beam-ProductDetailsPage-PPGFDisclosure-backgroundColor);\n padding-top: var(--beam-ProductDetailsPage-PPGFDisclosure-paddingTop);\n padding-right: var(--beam-ProductDetailsPage-PPGFDisclosure-paddingRight);\n padding-bottom: var(--beam-ProductDetailsPage-PPGFDisclosure-paddingBottom);\n padding-left: var(--beam-ProductDetailsPage-PPGFDisclosure-paddingLeft);\n }\n .ppgf-disclosure-tooltip::part(base__arrow) {\n background-color: var(--beam-ProductDetailsPage-PPGFDisclosure-backgroundColor);\n }\n .ppgf-disclosure-tooltip-content {\n display: flex;\n flex-direction: column;\n ${useCustomText(\"--beam-ProductDetailsPage-PPGFDisclosureTooltipContent\")}\n }\n .ppgf-disclosure-tooltip-copy > a,\n .ppgf-disclosure-close {\n pointer-events: auto;\n cursor: pointer;\n color: var(--beam-ProductDetailsPage-PPGFDisclosureHyperlink-color);\n }\n .ppgf-disclosure-close {\n display: var(--beam-ProductDetailsPage-close-display);\n padding: var(--beam-ProductDetailsPage-close-padding);\n height: 12px;\n background: none;\n border: none;\n margin-left: auto;\n }\n .ppgf-disclosure-tooltip-copy > a:visited {\n color: var(--beam-ProductDetailsPage-PPGFDisclosureHyperlink-color);\n }\n .ppgf-disclosure-tooltip-trigger {\n position: relative;\n }\n .ppgf-disclosure-tooltip-trigger-mask {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: calc(var(--beam-ProductDetailsPage-TooltipIcon-width) + 20px);\n height: calc(var(--beam-ProductDetailsPage-TooltipIcon-width) + 20px);\n }\n .ppgf-disclosure-tooltip-trigger::part(base) {\n line-height: 1;\n border: none;\n min-height: 0;\n min-width: 0;\n width: auto;\n color: var(--beam-ProductDetailsPage-TooltipIcon-color);\n }\n .ppgf-disclosure-tooltip-trigger::part(label) {\n padding: 0;\n }\n .ppgf-disclosure-tooltip-trigger > svg {\n width: var(--beam-ProductDetailsPage-TooltipIcon-width);\n color: var(--beam-ProductDetailsPage-TooltipIcon-color);\n height: auto;\n }\n `,\n ];\n}\n\ndefineCustomElement(BeamProductDetailsPage);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"beam-product-details-page\": BeamProductDetailsPage;\n }\n}\n"],"names":["defineCustomBorder","namespace","borderRadius","borderStyle","borderColor","borderWidth","prefix","useCustomBorder","unsafeCSS","_info","html","strings","$","s","f","g","e","t","o","i","r","IMAGE_URL_REMOTE_CONFIG_KEY","BeamProductDetailsPage","LitElement","DEFAULT_BASE_URL","createScopedLocalStorage","evt","promoCodesFromPlugin","c","enforceConfig","beamCartId","getBeamCartId","BEAM_CART_COOKIE_NAME","manualPromoCodes","formattedPromos","formatStoreAndReturnPromoCodes","code","shouldSendPromos","isEmptyPromoData","BeamWidgetStoredPromoCodesEvent","WIDGET_NAMES","res","postProductDetailsPage","makeApiKeyHeader","AsyncController","SUPPORTED_LANGUAGES","parseJsonStringArray","cart","getPromoCodesFromCart","response","setPromoCodesInLocalStorage","setPromoCodeInCookie","BeamPromoCodesStoredEvent","changedProperties","requireNewDataProps","prop","data","loading","iconDisplay","isNonZero","value","shouldDisplayPromoPill","isPromoActive","hasValidImageHeight","hasValidTitleFontSize","isPromoPillVisible","shouldShowPunctuation","_errorMessage","imageUrl","shouldDisplayColon","title","localizeUserString","description","closeTimer","ariaTimer","stillHasFocus","onHide","onShow","closeTooltip","skipDelay","keepOpenIfFocused","openTooltip","toggleTooltip","tooltip","onFocusTrigger","onBlurTrigger","onClickTrigger","onMouseoverTooltip","onMouseoutTooltip","onKeydownTooltip","onClickClose","ppgfDisclosure","unsafeHTML","defaults","defineCustomText","promoPillLabelConfigDefaults","remoteConfig","config","_cssVariableMap","cssReset","cssResponsiveUtils","css","useCustomText","__decorateClass","property","state","defineCustomElement"],"mappings":"qtCAEO,MAAMA,GAAqB,CAChCC,EAAY,GACZ,CAAE,aAAAC,EAAe,MAAO,YAAAC,EAAc,QAAS,YAAAC,EAAc,UAAW,YAAAC,EAAc,KAAM,EAAI,CAAA,IACrE,CAC3B,MAAMC,EAASL,EAAU,WAAW,SAAS,EAAIA,EAAY,UAAUA,CAAS,GAChF,MAAO,CACL,CAAC,GAAGK,CAAM,eAAe,EAAGJ,EAC5B,CAAC,GAAGI,CAAM,cAAc,EAAGH,EAC3B,CAAC,GAAGG,CAAM,cAAc,EAAGF,EAC3B,CAAC,GAAGE,CAAM,cAAc,EAAGD,CAC7B,CACF,EAEaE,GAAkB,CAC7BN,EAAY,GACZ,CAAE,aAAAC,EAAe,MAAO,YAAAC,EAAc,QAAS,YAAAC,EAAc,UAAW,YAAAC,EAAc,KAAM,EAAI,CAClF,IAAA,CACd,MAAMC,EAASL,EAAU,WAAW,SAAS,EAAIA,EAAY,UAAUA,CAAS,GAChF,OAAOO,EAAU,8BACUF,CAAM,kBAAkBJ,CAAY;AAAA,4BACrCI,CAAM,iBAAiBH,CAAW;AAAA,4BAClCG,CAAM,iBAAiBF,CAAW;AAAA,4BAClCE,CAAM,iBAAiBD,CAAW;AAAA,KACzD,CACL,ECxBaI,GAAQ,IAAMC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA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A,EAjBflF,EAiBwB,UAEAiF,YAAAA,EAAAA,EAAA,CAAlCC,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAnBflF,EAmBwB,UAAA,QAAA,EAIlBiF,EAAA,CAAhBE,GAvBU,EAAAnF,EAuBM,UAqoBnBoF,kBAAAA,EAAAA,EAAoBpF,CAAsB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as E,y as r,f as B,g as c,t as A,h as z,k as L}from"../chunks/lit-WqMxC_PA.esm.js";import{u as b,A as M,_ as W,i as k,d as D,a as G}from"../chunks/localize-C25pEGnx.esm.js";import{D as R,W as y,j as _,S as j}from"../chunks/routes-BGx3ADhY.esm.js";import{c as O,d as H,e as U}from"../chunks/enforce-config-Ba1JkOHs.esm.js";import{c as K}from"../chunks/responsive-BR8qUfBa.esm.js";import"../chunks/_share-dialog-dependencies-BVseSHLF.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import{p as N}from"../chunks/promo-pill-label-BESRGLn7.esm.js";import{formatStoreAndReturnPromoCodes as V,isEmptyPromoData as q,parseJsonStringArray as J,getPromoCodesFromCart as Y,setPromoCodesInLocalStorage as Z,setPromoCodeInCookie as Q}from"../utils/promoManager.js";import{B as X}from"../chunks/cart-contents-DkoytiZh.esm.js";import{createScopedLocalStorage as ee}from"../utils/local-storage.js";import{makeApiKeyHeader as te}from"../utils/makeApiKeyHeader.js";import{f as w,a as S}from"../chunks/events-Dki0ka4F.esm.js";import{getBeamCartId as oe}from"../utils/cart.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../utils/cookies.js";const ae=(n="",{borderRadius:e="0px",borderStyle:t="unset",borderColor:o="#000000",borderWidth:i="1px"}={})=>{const a=n.startsWith("--beam-")?n:`--beam-${n}`;return{[`${a}-borderRadius`]:e,[`${a}-borderStyle`]:t,[`${a}-borderColor`]:o,[`${a}-borderWidth`]:i}},ie=(n="",{borderRadius:e="0px",borderStyle:t="unset",borderColor:o="#000000",borderWidth:i="1px"}={})=>{const a=n.startsWith("--beam-")?n:`--beam-${n}`;return E(` border-radius: var(${a}-borderRadius, ${e});
|
|
2
2
|
border-style: var(${a}-borderStyle, ${t});
|
|
3
3
|
border-color: var(${a}-borderColor, ${o});
|
|
4
4
|
border-width: var(${a}-borderWidth, ${i});
|
|
@@ -17,7 +17,7 @@ import{j as z,y as r,f as E,g as c,t as A,h as B,k as L}from"../chunks/lit-WqMxC
|
|
|
17
17
|
<circle cx="12" cy="12" r="10"></circle>
|
|
18
18
|
<path d="M12 16v-4"></path>
|
|
19
19
|
<path d="M12 8h.01"></path>
|
|
20
|
-
</svg>`,v={en:{ctaTitle:()=>"Choose Your Impact",ctaMessage:()=>"At no extra cost, 1% of every order will be donated to a nonprofit you choose. Add to cart to choose. Powered by Beam",inlineSeparator:()=>":"},fr:{ctaTitle:()=>"Choisissez votre impact",ctaMessage:()=>"Sans frais suppl\xE9mentaires, 1 % de chaque commande est revers\xE9 \xE0 l'association de votre choix. Ajoutez au panier pour choisir. Propuls\xE9 par Beam.",inlineSeparator:()=>":"},es:{ctaTitle:()=>"Elige tu impacto",ctaMessage:()=>"Sin coste adicional, el 1 % de cada pedido se dona a la organizaci\xF3n sin \xE1nimo de lucro que elijas. A\xF1\xE1delo al carrito para elegir. Impulsado por Beam.",inlineSeparator:()=>":"},de:{ctaTitle:()=>"W\xE4hlen Sie Ihren Impact",ctaMessage:()=>"Ohne zus\xE4tzliche Kosten wird 1 % jeder Bestellung an eine von Ihnen gew\xE4hlte gemeinn\xFCtzige Organisation gespendet. Zum Warenkorb hinzuf\xFCgen, um auszuw\xE4hlen. Unterst\xFCtzt von Beam.",inlineSeparator:()=>":"},it:{ctaTitle:()=>"Scegli il tuo impatto",ctaMessage:()=>"L'1 % di ogni acquisto viene donato, senza alcun costo aggiuntivo, a un'organizzazione no-profit a tua scelta. Aggiungi al carrello per scegliere. Promosso da Beam.",inlineSeparator:()=>":"},pl:{ctaTitle:()=>"Wybierz sw\xF3j wp\u0142yw",ctaMessage:()=>"1 % warto\u015Bci ka\u017Cdego zam\xF3wienia przekazywany jest na wybran\u0105 przez Ciebie organizacj\u0119 non-profit \u2013 bez dodatkowych koszt\xF3w. Dodaj do koszyka, aby wybra\u0107. Obs\u0142ugiwane przez Beam.",inlineSeparator:()=>":"},ja:{ctaTitle:()=>"
|
|
20
|
+
</svg>`,v={en:{ctaTitle:()=>"Choose Your Impact",ctaMessage:()=>"At no extra cost, 1% of every order will be donated to a nonprofit you choose. Add to cart to choose. Powered by Beam",inlineSeparator:()=>":"},fr:{ctaTitle:()=>"Choisissez votre impact",ctaMessage:()=>"Sans frais suppl\xE9mentaires, 1 % de chaque commande est revers\xE9 \xE0 l'association de votre choix. Ajoutez au panier pour choisir. Propuls\xE9 par Beam.",inlineSeparator:()=>":"},es:{ctaTitle:()=>"Elige tu impacto",ctaMessage:()=>"Sin coste adicional, el 1 % de cada pedido se dona a la organizaci\xF3n sin \xE1nimo de lucro que elijas. A\xF1\xE1delo al carrito para elegir. Impulsado por Beam.",inlineSeparator:()=>":"},de:{ctaTitle:()=>"W\xE4hlen Sie Ihren Impact",ctaMessage:()=>"Ohne zus\xE4tzliche Kosten wird 1 % jeder Bestellung an eine von Ihnen gew\xE4hlte gemeinn\xFCtzige Organisation gespendet. Zum Warenkorb hinzuf\xFCgen, um auszuw\xE4hlen. Unterst\xFCtzt von Beam.",inlineSeparator:()=>":"},it:{ctaTitle:()=>"Scegli il tuo impatto",ctaMessage:()=>"L'1 % di ogni acquisto viene donato, senza alcun costo aggiuntivo, a un'organizzazione no-profit a tua scelta. Aggiungi al carrello per scegliere. Promosso da Beam.",inlineSeparator:()=>":"},pl:{ctaTitle:()=>"Wybierz sw\xF3j wp\u0142yw",ctaMessage:()=>"1 % warto\u015Bci ka\u017Cdego zam\xF3wienia przekazywany jest na wybran\u0105 przez Ciebie organizacj\u0119 non-profit \u2013 bez dodatkowych koszt\xF3w. Dodaj do koszyka, aby wybra\u0107. Obs\u0142ugiwane przez Beam.",inlineSeparator:()=>":"},ja:{ctaTitle:()=>"\u5BC4\u4ED8\u5148\u3092\u304A\u9078\u3073\u304F\u3060\u3055\u3044\u3002",ctaMessage:()=>"\u8FFD\u52A0\u8CBB\u7528\u306A\u3057\u3067\u3001\u3054\u6CE8\u6587\u91D1\u984D\u306E1%\u3092\u975E\u55B6\u5229\u56E3\u4F53\u3078\u5BC4\u4ED8\u3067\u304D\u307E\u3059\u3002\u3054\u5E0C\u671B\u306E\u5834\u5408\u3001\u30AB\u30FC\u30C8\u306B\u8FFD\u52A0\u3057\u3066\u5BC4\u4ED8\u5185\u5BB9\u3092\u304A\u9078\u3073\u304F\u3060\u3055\u3044\u3002Powered by Beam",inlineSeparator:()=>":"}};var se=Object.defineProperty,d=(n,e,t,o)=>{for(var i=void 0,a=n.length-1,l;a>=0;a--)(l=n[a])&&(i=l(e,t,i)||i);return i&&se(e,t,i),i};const le="--beam-ProductDetailsPage-imageUrl";class s extends z{constructor(){super(...arguments),this.baseUrl=R,this.lang="en",this.draftConfig=!1,this.debug=!1,this.localStorage=ee(this),this.pluginPromoCodes=[],this.handlePromoCodesStored=e=>{const t=(e.detail.promoCodes?.unvalidatedPromoCodes??[]).map(o=>o.attributes?.value??o.attributes?.url??"").sort();this.pluginPromoCodes=t},this.postProductDetailsPageData=async()=>{U(["apiKey","storeId"],this);const e=oe(X,{apiKey:this.apiKey}),t=this.getManualPromoCodes(),o=V(t.map(l=>({value:l})),this.apiKey),i=o&&!q(o);i&&this.dispatchEvent(new w({source:y.product_details_page}));const a=await _({baseUrl:this.baseUrl,headers:te(this.apiKey),queryParams:{version:"1.0.0",lang:this.configLang,storeId:this.storeId,widgetName:y.product_details_page,draftConfig:this.draftConfig,remoteProductIdentifier:this.remoteProductIdentifier},requestBody:{...i&&{promos:o},beamCartId:e||void 0}});return this.handleValidatedPromoCodes(a),a},this.productDetailsPageDataController=new M(this,this.postProductDetailsPageData)}get configLang(){return j[this.lang]||"en"}get parsedPromoCodes(){return J(this.promoCodes)}getManualPromoCodes(){if(this.parsedPromoCodes&&this.parsedPromoCodes.length>0)return this.parsedPromoCodes;const e=this.localStorage.getItemJson("cart");return e?Y(e):[]}async handleValidatedPromoCodes(e){e.promos?.validatedPromoCodes&&(await Promise.all([Z({apiKey:this.apiKey,promoCodes:{validatedPromoCodes:e.promos.validatedPromoCodes,unvalidatedPromoCodes:[]}}),Q({validatedPromoCodes:e.promos.validatedPromoCodes,domain:this.domain})]),this.dispatchEvent(new w({source:y.product_details_page})))}async firstUpdated(){window.addEventListener(S.eventName,this.handlePromoCodesStored)}disconnectedCallback(){window.removeEventListener(S.eventName,this.handlePromoCodesStored),super.disconnectedCallback()}async updated(e){const t=["storeId","baseUrl","lang","apiKey","pluginPromoCodes","promoCodes"];this.pluginPromoCodes;for(const o of t)if(e.has(o)){await this.productDetailsPageDataController.exec();break}}render(){const{data:e,loading:t}=this.productDetailsPageDataController,o=this.cssVariables["--beam-ProductDetailsPage-image-placement"],i=P=>P!=="0px"&&P!=="0",a=this.cssVariables["--beam-ProductDetailsPage-shouldDisplayPromoPill"]==="true",l=!!e?.config?.web?.promo,p=i(this.cssVariables["--beam-ProductDetailsPage-imageHeight"]),h=i(this.cssVariables["--beam-ProductDetailsPage-title-fontSize"]),u=a&&l&&p&&h,m=this.cssVariables["--beam-ProductDetailsPage-shouldDisplayColon"]==="true";return t?r``:e==null?this.debug?W({error:new Error("No data")}):"":r`
|
|
21
21
|
<style>
|
|
22
22
|
:host {
|
|
23
23
|
${this.cssVariables.toCSS()}
|
|
@@ -29,21 +29,21 @@ import{j as z,y as r,f as E,g as c,t as A,h as B,k as L}from"../chunks/lit-WqMxC
|
|
|
29
29
|
>
|
|
30
30
|
${o==="block-center"?r`
|
|
31
31
|
${this.renderWidgetIcon(o)}
|
|
32
|
-
${
|
|
32
|
+
${u?r`
|
|
33
33
|
<div class="promo-container">
|
|
34
34
|
<beam-promo-info-pill .promo=${e?.config?.web?.promo}></beam-promo-info-pill>
|
|
35
35
|
</div>
|
|
36
36
|
`:r``}
|
|
37
|
-
<div class="info-container">${this.renderContent(
|
|
37
|
+
<div class="info-container">${this.renderContent(u,m,e)}</div>
|
|
38
38
|
`:r`
|
|
39
|
-
${
|
|
39
|
+
${u?r`
|
|
40
40
|
<div class="promo-container">
|
|
41
41
|
<beam-promo-info-pill .promo=${e?.config?.web?.promo}></beam-promo-info-pill>
|
|
42
42
|
</div>
|
|
43
43
|
`:r``}
|
|
44
44
|
<div class="content-inline">
|
|
45
45
|
${this.renderWidgetIcon(o)}
|
|
46
|
-
<div class="info-container">${this.renderContent(
|
|
46
|
+
<div class="info-container">${this.renderContent(u,m,e)}</div>
|
|
47
47
|
</div>
|
|
48
48
|
`}
|
|
49
49
|
</div>
|
|
@@ -78,14 +78,14 @@ import{j as z,y as r,f as E,g as c,t as A,h as B,k as L}from"../chunks/lit-WqMxC
|
|
|
78
78
|
stroke-linecap="round"
|
|
79
79
|
stroke-linejoin="round"
|
|
80
80
|
/>
|
|
81
|
-
</svg> `}renderDisclosureTooltip(){let e,t;const o=()=>document.activeElement?.tagName.toLowerCase()===this.tagName.toLowerCase(),i=()=>{clearTimeout(t),t=setTimeout(()=>{this.renderRoot.querySelector(".ppgf-disclosure-tooltip-content")?.setAttribute("aria-hidden","true")},50)},a=()=>{clearTimeout(t),this.renderRoot.querySelector(".ppgf-disclosure-tooltip-content")?.setAttribute("aria-hidden","false")},l=({skipDelay:
|
|
81
|
+
</svg> `}renderDisclosureTooltip(){let e,t;const o=()=>document.activeElement?.tagName.toLowerCase()===this.tagName.toLowerCase(),i=()=>{clearTimeout(t),t=setTimeout(()=>{this.renderRoot.querySelector(".ppgf-disclosure-tooltip-content")?.setAttribute("aria-hidden","true")},50)},a=()=>{clearTimeout(t),this.renderRoot.querySelector(".ppgf-disclosure-tooltip-content")?.setAttribute("aria-hidden","false")},l=({skipDelay:g=!1,keepOpenIfFocused:f=!1})=>{clearTimeout(e),e=setTimeout(()=>{f&&o()||this.renderRoot.querySelector(".ppgf-disclosure-tooltip")?.hide()},g?0:300)},p=()=>{clearTimeout(e),this.renderRoot.querySelector(".ppgf-disclosure-tooltip")?.show()},h=({skipDelay:g=!1,keepOpenIfFocused:f=!1})=>{const x=this.renderRoot.querySelector(".ppgf-disclosure-tooltip");x&&(x.open?l({skipDelay:g,keepOpenIfFocused:f}):p())},u=()=>{p()},m=()=>{l({skipDelay:!1,keepOpenIfFocused:!0})},P=()=>{p()},$=()=>{p()},F=()=>{l({skipDelay:!1,keepOpenIfFocused:!1})},I=g=>{if(g.key==="Enter"||g.key===" "){h({skipDelay:!0,keepOpenIfFocused:!1});return}l({skipDelay:!0,keepOpenIfFocused:!0})},T=()=>{l({skipDelay:!0,keepOpenIfFocused:!1})},C=this.productDetailsPageDataController.data?.ppgfDisclosure;return C?r`<sl-tooltip
|
|
82
82
|
class="ppgf-disclosure-tooltip"
|
|
83
83
|
part="tooltip"
|
|
84
84
|
trigger="manual"
|
|
85
85
|
tabindex="0"
|
|
86
86
|
@mouseenter="${$}"
|
|
87
|
-
@mouseleave="${
|
|
88
|
-
@keydown="${
|
|
87
|
+
@mouseleave="${F}"
|
|
88
|
+
@keydown="${I}"
|
|
89
89
|
@sl-after-hide="${i}"
|
|
90
90
|
@sl-after-show="${a}"
|
|
91
91
|
>
|
|
@@ -115,7 +115,7 @@ import{j as z,y as r,f as E,g as c,t as A,h as B,k as L}from"../chunks/lit-WqMxC
|
|
|
115
115
|
aria-label="More Information"
|
|
116
116
|
role="button"
|
|
117
117
|
tabindex="0"
|
|
118
|
-
@focus="${
|
|
118
|
+
@focus="${u}"
|
|
119
119
|
@blur="${m}"
|
|
120
120
|
@click="${P}"
|
|
121
121
|
>
|
|
@@ -132,7 +132,7 @@ import{j as z,y as r,f as E,g as c,t as A,h as B,k as L}from"../chunks/lit-WqMxC
|
|
|
132
132
|
${re()}
|
|
133
133
|
</sl-button>
|
|
134
134
|
</span>
|
|
135
|
-
</sl-tooltip>`:r``}get cssVariables(){const e={"--beam-ProductDetailsPage-imageWidth":"24px","--beam-ProductDetailsPage-imageHeight":"24px","--beam-ProductDetailsPage-maxWidth":"346px","--beam-ProductDetailsPage-paddingTop":"8px","--beam-ProductDetailsPage-paddingRight":"12px","--beam-ProductDetailsPage-paddingBottom":"8px","--beam-ProductDetailsPage-paddingLeft":"15px","--beam-ProductDetailsPage-InfoContainer-marginLeft":"8px","--beam-ProductDetailsPage-InfoContainer-textAlign":"inherit","--beam-ProductDetailsPage-InfoContainer-lineHeight":"15px","--beam-ProductDetailsPage-InfoContainer-marginTop":"4px","--beam-ProductDetailsPage-backgroundColor":"unset","--beam-ProductDetailsPage-TooltipIcon-width":"10px","--beam-ProductDetailsPage-TooltipIcon-color":"inherit","--beam-ProductDetailsPage-PPGFDisclosure-backgroundColor":"#000000","--beam-ProductDetailsPage-PPGFDisclosure-paddingTop":"10px","--beam-ProductDetailsPage-PPGFDisclosure-paddingRight":"8px","--beam-ProductDetailsPage-PPGFDisclosure-paddingBottom":"10px","--beam-ProductDetailsPage-PPGFDisclosure-paddingLeft":"8px","--beam-ProductDetailsPage-PPGFDisclosureHyperlink-color":"#5CA3FF",...D("--beam-ProductDetailsPage-title",{fontSize:"12px",fontWeight:"bold"}),"--beam-ProductDetailsPage-title-textAlign":"left",...D("--beam-ProductDetailsPage-description",{marginTop:"0px",fontSize:"12px",lineHeight:"15px"}),"--beam-ProductDetailsPage-description-textAlign":"left",...D("--beam-ProductDetailsPage-PPGFDisclosureTooltipContent",{fontSize:"12px",lineHeight:"16px",color:"#FFFFFF"}),...ae("--beam-ProductDetailsPage"),"--beam-ProductDetailsPage-close-display":"initial","--beam-ProductDetailsPage-close-padding":"0","--beam-ProductDetailsPage-image-placement":"inline-left","--beam-ProductDetailsPage-blockImage-alignSelf":"center","--beam-ProductDetailsPage-promoPill-marginTop":"4px","--beam-ProductDetailsPage-promoPill-alignSelf":"left","--beam-ProductDetailsPage-shouldDisplayColon":"true","--beam-ProductDetailsPage-shouldDisplayPromoPill":"true",...N},t=this.productDetailsPageDataController?.data?.config?.web?.theme||{},o={...e,...t};return Object.assign(Object.create({toCSS(){return G(this)}}),o)}}s.tagName="beam-product-details-page",s.styles=[O,K,
|
|
135
|
+
</sl-tooltip>`:r``}get cssVariables(){const e={"--beam-ProductDetailsPage-imageWidth":"24px","--beam-ProductDetailsPage-imageHeight":"24px","--beam-ProductDetailsPage-maxWidth":"346px","--beam-ProductDetailsPage-paddingTop":"8px","--beam-ProductDetailsPage-paddingRight":"12px","--beam-ProductDetailsPage-paddingBottom":"8px","--beam-ProductDetailsPage-paddingLeft":"15px","--beam-ProductDetailsPage-InfoContainer-marginLeft":"8px","--beam-ProductDetailsPage-InfoContainer-textAlign":"inherit","--beam-ProductDetailsPage-InfoContainer-lineHeight":"15px","--beam-ProductDetailsPage-InfoContainer-marginTop":"4px","--beam-ProductDetailsPage-backgroundColor":"unset","--beam-ProductDetailsPage-TooltipIcon-width":"10px","--beam-ProductDetailsPage-TooltipIcon-color":"inherit","--beam-ProductDetailsPage-PPGFDisclosure-backgroundColor":"#000000","--beam-ProductDetailsPage-PPGFDisclosure-paddingTop":"10px","--beam-ProductDetailsPage-PPGFDisclosure-paddingRight":"8px","--beam-ProductDetailsPage-PPGFDisclosure-paddingBottom":"10px","--beam-ProductDetailsPage-PPGFDisclosure-paddingLeft":"8px","--beam-ProductDetailsPage-PPGFDisclosureHyperlink-color":"#5CA3FF",...D("--beam-ProductDetailsPage-title",{fontSize:"12px",fontWeight:"bold"}),"--beam-ProductDetailsPage-title-textAlign":"left",...D("--beam-ProductDetailsPage-description",{marginTop:"0px",fontSize:"12px",lineHeight:"15px"}),"--beam-ProductDetailsPage-description-textAlign":"left",...D("--beam-ProductDetailsPage-PPGFDisclosureTooltipContent",{fontSize:"12px",lineHeight:"16px",color:"#FFFFFF"}),...ae("--beam-ProductDetailsPage"),"--beam-ProductDetailsPage-close-display":"initial","--beam-ProductDetailsPage-close-padding":"0","--beam-ProductDetailsPage-image-placement":"inline-left","--beam-ProductDetailsPage-blockImage-alignSelf":"center","--beam-ProductDetailsPage-promoPill-marginTop":"4px","--beam-ProductDetailsPage-promoPill-alignSelf":"left","--beam-ProductDetailsPage-shouldDisplayColon":"true","--beam-ProductDetailsPage-shouldDisplayPromoPill":"true",...N},t=this.productDetailsPageDataController?.data?.config?.web?.theme||{},o={...e,...t};return Object.assign(Object.create({toCSS(){return G(this)}}),o)}}s.tagName="beam-product-details-page",s.styles=[O,K,B`
|
|
136
136
|
:host {
|
|
137
137
|
font-family: var(--beam-fontFamily);
|
|
138
138
|
font-style: var(--beam-fontStyle);
|