@dropins/storefront-checkout 3.0.0-beta4 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/api.js +1 -1
  2. package/chunks/ConditionalWrapper.js +1 -1
  3. package/chunks/OrderError.js +1 -1
  4. package/chunks/PaymentOnAccount2.js +1 -1
  5. package/chunks/PurchaseOrder.js +1 -1
  6. package/chunks/TermsAndConditions.js +1 -1
  7. package/chunks/checkout.js +1 -1
  8. package/chunks/classes.js +1 -1
  9. package/chunks/classifiers.js +1 -1
  10. package/chunks/dom.js +1 -1
  11. package/chunks/events.js +1 -1
  12. package/chunks/events2.js +1 -1
  13. package/chunks/fetch-graphql.js +1 -1
  14. package/chunks/getCompanyCredit.js +1 -1
  15. package/chunks/guards.js +1 -1
  16. package/chunks/render.js +1 -1
  17. package/chunks/setBillingAddress.js +1 -1
  18. package/chunks/setGuestEmailOnCart.js +1 -1
  19. package/chunks/setPaymentMethod.js +1 -1
  20. package/chunks/setShippingAddress.js +1 -1
  21. package/chunks/setShippingMethods.js +1 -1
  22. package/chunks/synchronizeCheckout.js +1 -1
  23. package/chunks/transform-shipping-estimate.js +1 -1
  24. package/chunks/transform-shipping-methods.js +1 -1
  25. package/chunks/validation.js +1 -1
  26. package/chunks/values.js +1 -1
  27. package/containers/AddressValidation.js +1 -1
  28. package/containers/BillToShippingAddress.js +1 -1
  29. package/containers/EstimateShipping.js +1 -1
  30. package/containers/LoginForm.js +1 -1
  31. package/containers/MergedCartBanner.js +1 -1
  32. package/containers/OutOfStock.js +1 -1
  33. package/containers/PaymentMethods.js +1 -1
  34. package/containers/PaymentOnAccount.js +1 -1
  35. package/containers/PlaceOrder.js +1 -1
  36. package/containers/PurchaseOrder.js +1 -1
  37. package/containers/ServerError.js +1 -1
  38. package/containers/ShippingMethods.js +1 -1
  39. package/containers/TermsAndConditions.js +1 -1
  40. package/fragments.js +1 -1
  41. package/lib/utils.js +1 -1
  42. package/package.json +1 -1
  43. package/render.js +1 -1
package/api.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{a as A,c as G,g as S,b as T,i as k,d as y,r as O,s as F}from"./chunks/synchronizeCheckout.js";import{e as b,s as H}from"./chunks/setShippingAddress.js";import{d as o}from"./chunks/fetch-graphql.js";import{D as Q,S as U,f as R,g as q,e as v,j as z,r as D,a as K,b as L,c as j}from"./chunks/fetch-graphql.js";import"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";import{A as s}from"./chunks/checkout.js";import{g as B}from"./chunks/getCompanyCredit.js";import{g as P,i as V,s as Y}from"./chunks/setGuestEmailOnCart.js";import{s as W}from"./chunks/setBillingAddress.js";import{s as Z}from"./chunks/setPaymentMethod.js";import{s as ee,s as te}from"./chunks/setShippingMethods.js";import"./fragments.js";import"./chunks/transform-shipping-methods.js";import"./chunks/classifiers.js";import"./chunks/transform-shipping-estimate.js";import"./chunks/values.js";import"./chunks/guards.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";const r=t=>t?t.filter(e=>!!e).map(e=>({id:e.agreement_id,name:e.name,mode:s[e.mode],text:e.checkbox_text,content:{value:e.content,html:e.is_html,height:e.content_height??null}})):[],a=`
4
4
  query GET_CHECKOUT_AGREEMENTS {
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsxs as a,jsx as o}from"@dropins/tools/preact-jsx-runtime.js";function l(r,t){return function(e){const{initialized:i=!0,visible:n=!0,...s}=e;return a("div",{className:"conditional-wrapper",children:[n&&!i&&o(t,{}),n&&i&&o(r,{...s})]})}}export{l as W};
4
4
  //# sourceMappingURL=ConditionalWrapper.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import*as e from"@dropins/tools/preact-compat.js";const r=t=>e.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("g",{clipPath:"url(#clip0_4797_15331)"},e.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M10.25 20.91L1.5 17.55V6.51996L10.25 9.92996V20.91Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1}),e.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M6.24023 4.64001L14.9902 8.06001V11.42",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1}),e.createElement("path",{className:"error-icon",vectorEffect:"non-scaling-stroke",d:"M19 13.31L15.5 19.37H22.5L19 13.31Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1}),e.createElement("path",{className:"error-icon",vectorEffect:"non-scaling-stroke",d:"M19.0202 17.11H18.9802L18.9502 15.56H19.0502L19.0202 17.11ZM18.9602 18.29V18.06H19.0502V18.29H18.9602Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1}),e.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M19 12.16V6.51996L10.25 9.92996V20.91L14.27 19.37L14.4 19.32",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:1}),e.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M1.5 6.51999L10.25 3.04999L19 6.51999L10.25 9.92999L1.5 6.51999Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1})),e.createElement("defs",null,e.createElement("clipPath",{id:"clip0_4797_15331"},e.createElement("rect",{width:22,height:18.86,fill:"white",transform:"translate(1 2.54999)"}))));export{r as S};
4
4
  //# sourceMappingURL=OrderError.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsxs as x,jsx as n}from"@dropins/tools/preact-jsx-runtime.js";import{useState as f,useCallback as b,useEffect as k}from"@dropins/tools/preact-compat.js";import{W as T}from"./ConditionalWrapper.js";/* empty css */import{Skeleton as V,SkeletonRow as A,Price as p,Field as q,Input as F,InLineAlert as S}from"@dropins/tools/components.js";import{getPriceFormatter as y,classes as H}from"@dropins/tools/lib.js";import{useText as j,Text as w}from"@dropins/tools/i18n.js";import{s as g}from"./fetch-graphql.js";import{events as I}from"@dropins/tools/event-bus.js";import{g as Q}from"./getCompanyCredit.js";const $=()=>x(V,{"data-testid":"payment-on-account-skeleton",children:[n(A,{fullWidth:!0,size:"medium"}),n(A,{fullWidth:!0,size:"medium"})]}),B=(a,c)=>{if(!(a!=null&&a.availableCredit)||!c)return null;const l=a.availableCredit.value,e=c.value-l;return e<=0?null:{value:e,currency:a.availableCredit.currency}},D=({className:a,referenceNumber:c="",onReferenceNumberChange:l,onReferenceNumberBlur:h,companyCredit:e=null,totalAmount:s=null,...v})=>{const u=B(e,s),m=e==null?void 0:e.availableCredit,d=y({currency:(s==null?void 0:s.currency)??""}),r=j({referenceNumberLabel:"Checkout.PaymentOnAccount.referenceNumberLabel",referenceNumberPlaceholder:"Checkout.PaymentOnAccount.referenceNumberPlaceholder",referenceNumberHint:"Checkout.PaymentOnAccount.referenceNumberHint",availableCreditLabel:"Checkout.PaymentOnAccount.availableCreditLabel",exceedLimitError:"Checkout.PaymentOnAccount.exceedLimitError",exceedLimitWarning:u?n(w,{fields:{creditLimit:d.format((m==null?void 0:m.value)??0),exceededAmount:d.format((u==null?void 0:u.value)??0)},id:"Checkout.PaymentOnAccount.exceedLimitWarning"}):""});return n("div",{className:"checkout-payment-on-account","data-testid":"checkout-payment-on-account",children:x("form",{...v,noValidate:!0,className:H(["checkout-payment-on-account__form",a]),"data-testid":"checkout-payment-on-account-form",name:"checkout-payment-on-account__form",children:[e&&e.availableCredit&&x("div",{className:"checkout-payment-on-account__credit","data-testid":"checkout-payment-on-account-credit",children:[n("span",{className:"checkout-payment-on-account__credit-label",children:r.availableCreditLabel}),n("span",{className:"checkout-payment-on-account__credit-amount",children:n(p,{amount:e==null?void 0:e.availableCredit.value,currency:e==null?void 0:e.availableCredit.currency})})]}),n(q,{hint:r.referenceNumberHint,children:n(F,{"aria-label":r.referenceNumberLabel,floatingLabel:r.referenceNumberLabel,id:"reference-number",name:"reference-number",placeholder:r.referenceNumberPlaceholder,type:"text",value:c,onBlur:h,onChange:l})}),u&&n("div",{className:"checkout-payment-on-account__exceed-message","data-testid":"checkout-payment-on-account-exceed-message",children:n(S,{heading:e!=null&&e.exceedLimit?r.exceedLimitWarning:r.exceedLimitError,type:e!=null&&e.exceedLimit?"warning":"error",variant:"primary"})})]})})},G=T(D,$),te=({initialReferenceNumber:a="",onReferenceNumberChange:c,onReferenceNumberBlur:l,...h})=>{const[e,s]=f(!1),[v,u]=f(null),[m,d]=f(null),[r,W]=f(a),L=g.authenticated,P=!!g.cartId,N=!!g.quoteId,_=b(t=>{var o;d(((o=t==null?void 0:t.total)==null?void 0:o.includingTax)||null)},[]),O=b(t=>{var o,i;d(((i=(o=t==null?void 0:t.quote)==null?void 0:o.prices)==null?void 0:i.grandTotal)||null)},[]),z=b(t=>{const i=t.target.value;W(i),c==null||c(i)},[c]),E=b(t=>{const i=t.target.value;l==null||l(i)},[l]);return k(()=>{if(!P)return;const t=I.on("cart/data",_,{eager:!0});return()=>{t==null||t.off()}},[P,_]),k(()=>{if(!N)return;const t=I.on("quote-management/quote-data",O,{eager:!0});return()=>{t==null||t.off()}},[N,O]),k(()=>{L&&Q().then(t=>{u(t)}).catch(t=>{console.error("Failed to fetch company credit:",t),u(null)}).finally(()=>{s(!0)})},[L]),n("div",{...h,children:n(G,{companyCredit:v,initialized:e,referenceNumber:r,totalAmount:m,onReferenceNumberBlur:E,onReferenceNumberChange:z})})};export{te as P};
4
4
  //# sourceMappingURL=PaymentOnAccount2.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as i}from"@dropins/tools/preact-jsx-runtime.js";import"./TermsAndConditions.js";import{classes as k}from"@dropins/tools/lib.js";import{Field as O,Input as E}from"@dropins/tools/components.js";/* empty css */import"./fetch-graphql.js";import"@dropins/tools/event-bus.js";import{h as x,v as y}from"./validation.js";import{useState as b,useCallback as c}from"@dropins/tools/preact-compat.js";/* empty css *//* empty css */import{useText as v}from"@dropins/tools/i18n.js";/* empty css */import"@dropins/tools/preact-hooks.js";const I=({className:d,error:r="",referenceNumber:t="",onReferenceNumberBlur:l,onReferenceNumberChange:h,onInvalidReferenceNumber:u,...p})=>{const o=v({refNumberHint:"Checkout.PurchaseOrder.referenceNumberHint",refNumberLabel:"Checkout.PurchaseOrder.referenceNumberLabel",refNumberPlaceholder:"Checkout.PurchaseOrder.referenceNumberPlaceholder"});return i("div",{className:"checkout-purchase-order","data-testid":"checkout-purchase-order",children:i("form",{...p,noValidate:!0,className:k(["checkout-purchase-order__form",d]),"data-testid":"checkout-purchase-order-form",children:i(O,{error:r,hint:o.refNumberHint||void 0,children:i(E,{"aria-required":"true",floatingLabel:`${o.refNumberLabel} *`,id:"reference-number",name:"reference-number",pattern:x.NOT_EMPTY,placeholder:o.refNumberPlaceholder,required:!0,type:"text",value:t,onBlur:l,onChange:h,onInvalid:u})})})})},w=({initialReferenceNumber:d="",onReferenceNumberChange:r,onReferenceNumberBlur:t,...l})=>{const[h,u]=b(""),[p,o]=b(d),{missingRefNumberError:m}=v({missingRefNumberError:"Checkout.PurchaseOrder.missingReferenceNumberError"}),n=c(e=>{const s=y(e);u(s?"":m)},[m]),f=c(e=>{u(e.valid?"":m)},[m]),N=c(e=>{const a=e.target.value;o(a),n(a),r==null||r(a)},[r,n]),P=c(e=>{const a=e.target.value;n(a),t==null||t(a)},[t,n]),g=c(e=>{const s=e.target;f(s.validity)},[f]);return i(I,{...l,error:h,referenceNumber:p,onInvalidReferenceNumber:g,onReferenceNumberBlur:P,onReferenceNumberChange:N})};export{w as P};
4
4
  //# sourceMappingURL=PurchaseOrder.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:Tt,setPrototypeOf:rt,isFrozen:Bt,getPrototypeOf:Yt,getOwnPropertyDescriptor:Xt}=Object;let{freeze:S,seal:y,create:_t}=Object,{apply:we,construct:xe}=typeof Reflect<"u"&&Reflect;S||(S=function(o){return o});y||(y=function(o){return o});we||(we=function(o,l,s){return o.apply(l,s)});xe||(xe=function(o,l){return new o(...l)});const le=R(Array.prototype.forEach),jt=R(Array.prototype.lastIndexOf),st=R(Array.prototype.pop),$=R(Array.prototype.push),Vt=R(Array.prototype.splice),fe=R(String.prototype.toLowerCase),Ne=R(String.prototype.toString),lt=R(String.prototype.match),q=R(String.prototype.replace),$t=R(String.prototype.indexOf),qt=R(String.prototype.trim),L=R(Object.prototype.hasOwnProperty),A=R(RegExp.prototype.test),K=Kt(TypeError);function R(r){return function(o){o instanceof RegExp&&(o.lastIndex=0);for(var l=arguments.length,s=new Array(l>1?l-1:0),T=1;T<l;T++)s[T-1]=arguments[T];return we(r,o,s)}}function Kt(r){return function(){for(var o=arguments.length,l=new Array(o),s=0;s<o;s++)l[s]=arguments[s];return xe(r,l)}}function a(r,o){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fe;rt&&rt(r,null);let s=o.length;for(;s--;){let T=o[s];if(typeof T=="string"){const N=l(T);N!==T&&(Bt(o)||(o[s]=N),T=N)}r[T]=!0}return r}function Zt(r){for(let o=0;o<r.length;o++)L(r,o)||(r[o]=null);return r}function C(r){const o=_t(null);for(const[l,s]of Tt(r))L(r,l)&&(Array.isArray(s)?o[l]=Zt(s):s&&typeof s=="object"&&s.constructor===Object?o[l]=C(s):o[l]=s);return o}function Z(r,o){for(;r!==null;){const s=Xt(r,o);if(s){if(s.get)return R(s.get);if(typeof s.value=="function")return R(s.value)}r=Yt(r)}function l(){return null}return l}const ct=S(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),be=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ie=S(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Jt=S(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Me=S(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Qt=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ft=S(["#text"]),ut=S(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ce=S(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),mt=S(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ce=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),en=y(/\{\{[\w\W]*|[\w\W]*\}\}/gm),tn=y(/<%[\w\W]*|[\w\W]*%>/gm),nn=y(/\$\{[\w\W]*/gm),on=y(/^data-[\-\w.\u00B7-\uFFFF]+$/),an=y(/^aria-[\-\w]+$/),Et=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),rn=y(/^(?:\w+script|data):/i),sn=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),gt=y(/^html$/i),ln=y(/^[a-z][.\w]*(-[.\w]+)+$/i);var pt=Object.freeze({__proto__:null,ARIA_ATTR:an,ATTR_WHITESPACE:sn,CUSTOM_ELEMENT:ln,DATA_ATTR:on,DOCTYPE_NAME:gt,ERB_EXPR:tn,IS_ALLOWED_URI:Et,IS_SCRIPT_OR_DATA:rn,MUSTACHE_EXPR:en,TMPLIT_EXPR:nn});const J={element:1,text:3,progressingInstruction:7,comment:8,document:9},cn=function(){return typeof window>"u"?null:window},fn=function(o,l){if(typeof o!="object"||typeof o.createPolicy!="function")return null;let s=null;const T="data-tt-policy-suffix";l&&l.hasAttribute(T)&&(s=l.getAttribute(T));const N="dompurify"+(s?"#"+s:"");try{return o.createPolicy(N,{createHTML(x){return x},createScriptURL(x){return x}})}catch{return console.warn("TrustedTypes policy "+N+" could not be created."),null}},dt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ht(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cn();const o=i=>ht(i);if(o.version="3.2.6",o.removed=[],!r||!r.document||r.document.nodeType!==J.document||!r.Element)return o.isSupported=!1,o;let{document:l}=r;const s=l,T=s.currentScript,{DocumentFragment:N,HTMLTemplateElement:x,Node:ue,Element:Pe,NodeFilter:G,NamedNodeMap:At=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:St,DOMParser:Rt,trustedTypes:Q}=r,W=Pe.prototype,Ot=Z(W,"cloneNode"),yt=Z(W,"remove"),Lt=Z(W,"nextSibling"),Dt=Z(W,"childNodes"),ee=Z(W,"parentNode");if(typeof x=="function"){const i=l.createElement("template");i.content&&i.content.ownerDocument&&(l=i.content.ownerDocument)}let g,B="";const{implementation:me,createNodeIterator:Nt,createDocumentFragment:bt,getElementsByTagName:It}=l,{importNode:Mt}=s;let h=dt();o.isSupported=typeof Tt=="function"&&typeof ee=="function"&&me&&me.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:pe,ERB_EXPR:de,TMPLIT_EXPR:Te,DATA_ATTR:Ct,ARIA_ATTR:wt,IS_SCRIPT_OR_DATA:xt,ATTR_WHITESPACE:ve,CUSTOM_ELEMENT:Pt}=pt;let{IS_ALLOWED_URI:ke}=pt,m=null;const Ue=a({},[...ct,...be,...Ie,...Me,...ft]);let d=null;const Fe=a({},[...ut,...Ce,...mt,...ce]);let f=Object.seal(_t(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,_e=null,He=!0,Ee=!0,ze=!1,Ge=!0,P=!1,te=!0,w=!1,ge=!1,he=!1,v=!1,ne=!1,oe=!1,We=!0,Be=!1;const vt="user-content-";let Ae=!0,X=!1,k={},U=null;const Ye=a({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Xe=null;const je=a({},["audio","video","img","source","image","track"]);let Se=null;const Ve=a({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ie="http://www.w3.org/1998/Math/MathML",ae="http://www.w3.org/2000/svg",b="http://www.w3.org/1999/xhtml";let F=b,Re=!1,Oe=null;const kt=a({},[ie,ae,b],Ne);let re=a({},["mi","mo","mn","ms","mtext"]),se=a({},["annotation-xml"]);const Ut=a({},["title","style","font","a","script"]);let j=null;const Ft=["application/xhtml+xml","text/html"],Ht="text/html";let p=null,H=null;const zt=l.createElement("form"),$e=function(e){return e instanceof RegExp||e instanceof Function},ye=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(H&&H===e)){if((!e||typeof e!="object")&&(e={}),e=C(e),j=Ft.indexOf(e.PARSER_MEDIA_TYPE)===-1?Ht:e.PARSER_MEDIA_TYPE,p=j==="application/xhtml+xml"?Ne:fe,m=L(e,"ALLOWED_TAGS")?a({},e.ALLOWED_TAGS,p):Ue,d=L(e,"ALLOWED_ATTR")?a({},e.ALLOWED_ATTR,p):Fe,Oe=L(e,"ALLOWED_NAMESPACES")?a({},e.ALLOWED_NAMESPACES,Ne):kt,Se=L(e,"ADD_URI_SAFE_ATTR")?a(C(Ve),e.ADD_URI_SAFE_ATTR,p):Ve,Xe=L(e,"ADD_DATA_URI_TAGS")?a(C(je),e.ADD_DATA_URI_TAGS,p):je,U=L(e,"FORBID_CONTENTS")?a({},e.FORBID_CONTENTS,p):Ye,Y=L(e,"FORBID_TAGS")?a({},e.FORBID_TAGS,p):C({}),_e=L(e,"FORBID_ATTR")?a({},e.FORBID_ATTR,p):C({}),k=L(e,"USE_PROFILES")?e.USE_PROFILES:!1,He=e.ALLOW_ARIA_ATTR!==!1,Ee=e.ALLOW_DATA_ATTR!==!1,ze=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ge=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,P=e.SAFE_FOR_TEMPLATES||!1,te=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,v=e.RETURN_DOM||!1,ne=e.RETURN_DOM_FRAGMENT||!1,oe=e.RETURN_TRUSTED_TYPE||!1,he=e.FORCE_BODY||!1,We=e.SANITIZE_DOM!==!1,Be=e.SANITIZE_NAMED_PROPS||!1,Ae=e.KEEP_CONTENT!==!1,X=e.IN_PLACE||!1,ke=e.ALLOWED_URI_REGEXP||Et,F=e.NAMESPACE||b,re=e.MATHML_TEXT_INTEGRATION_POINTS||re,se=e.HTML_INTEGRATION_POINTS||se,f=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&$e(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(f.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&$e(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(f.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(f.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),P&&(Ee=!1),ne&&(v=!0),k&&(m=a({},ft),d=[],k.html===!0&&(a(m,ct),a(d,ut)),k.svg===!0&&(a(m,be),a(d,Ce),a(d,ce)),k.svgFilters===!0&&(a(m,Ie),a(d,Ce),a(d,ce)),k.mathMl===!0&&(a(m,Me),a(d,mt),a(d,ce))),e.ADD_TAGS&&(m===Ue&&(m=C(m)),a(m,e.ADD_TAGS,p)),e.ADD_ATTR&&(d===Fe&&(d=C(d)),a(d,e.ADD_ATTR,p)),e.ADD_URI_SAFE_ATTR&&a(Se,e.ADD_URI_SAFE_ATTR,p),e.FORBID_CONTENTS&&(U===Ye&&(U=C(U)),a(U,e.FORBID_CONTENTS,p)),Ae&&(m["#text"]=!0),w&&a(m,["html","head","body"]),m.table&&(a(m,["tbody"]),delete Y.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,B=g.createHTML("")}else g===void 0&&(g=fn(Q,T)),g!==null&&typeof B=="string"&&(B=g.createHTML(""));S&&S(e),H=e}},qe=a({},[...be,...Ie,...Jt]),Ke=a({},[...Me,...Qt]),Gt=function(e){let t=ee(e);(!t||!t.tagName)&&(t={namespaceURI:F,tagName:"template"});const n=fe(e.tagName),c=fe(t.tagName);return Oe[e.namespaceURI]?e.namespaceURI===ae?t.namespaceURI===b?n==="svg":t.namespaceURI===ie?n==="svg"&&(c==="annotation-xml"||re[c]):!!qe[n]:e.namespaceURI===ie?t.namespaceURI===b?n==="math":t.namespaceURI===ae?n==="math"&&se[c]:!!Ke[n]:e.namespaceURI===b?t.namespaceURI===ae&&!se[c]||t.namespaceURI===ie&&!re[c]?!1:!Ke[n]&&(Ut[n]||!qe[n]):!!(j==="application/xhtml+xml"&&Oe[e.namespaceURI]):!1},D=function(e){$(o.removed,{element:e});try{ee(e).removeChild(e)}catch{yt(e)}},z=function(e,t){try{$(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch{$(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(v||ne)try{D(t)}catch{}else try{t.setAttribute(e,"")}catch{}},Ze=function(e){let t=null,n=null;if(he)e="<remove></remove>"+e;else{const u=lt(e,/^[\r\n\t ]+/);n=u&&u[0]}j==="application/xhtml+xml"&&F===b&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const c=g?g.createHTML(e):e;if(F===b)try{t=new Rt().parseFromString(c,j)}catch{}if(!t||!t.documentElement){t=me.createDocument(F,"template",null);try{t.documentElement.innerHTML=Re?B:c}catch{}}const _=t.body||t.documentElement;return e&&n&&_.insertBefore(l.createTextNode(n),_.childNodes[0]||null),F===b?It.call(t,w?"html":"body")[0]:w?t.documentElement:_},Je=function(e){return Nt.call(e.ownerDocument||e,e,G.SHOW_ELEMENT|G.SHOW_COMMENT|G.SHOW_TEXT|G.SHOW_PROCESSING_INSTRUCTION|G.SHOW_CDATA_SECTION,null)},Le=function(e){return e instanceof St&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof At)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},Qe=function(e){return typeof ue=="function"&&e instanceof ue};function I(i,e,t){le(i,n=>{n.call(o,e,t,H)})}const et=function(e){let t=null;if(I(h.beforeSanitizeElements,e,null),Le(e))return D(e),!0;const n=p(e.nodeName);if(I(h.uponSanitizeElement,e,{tagName:n,allowedTags:m}),te&&e.hasChildNodes()&&!Qe(e.firstElementChild)&&A(/<[/\w!]/g,e.innerHTML)&&A(/<[/\w!]/g,e.textContent)||e.nodeType===J.progressingInstruction||te&&e.nodeType===J.comment&&A(/<[/\w]/g,e.data))return D(e),!0;if(!m[n]||Y[n]){if(!Y[n]&&nt(n)&&(f.tagNameCheck instanceof RegExp&&A(f.tagNameCheck,n)||f.tagNameCheck instanceof Function&&f.tagNameCheck(n)))return!1;if(Ae&&!U[n]){const c=ee(e)||e.parentNode,_=Dt(e)||e.childNodes;if(_&&c){const u=_.length;for(let O=u-1;O>=0;--O){const M=Ot(_[O],!0);M.__removalCount=(e.__removalCount||0)+1,c.insertBefore(M,Lt(e))}}}return D(e),!0}return e instanceof Pe&&!Gt(e)||(n==="noscript"||n==="noembed"||n==="noframes")&&A(/<\/no(script|embed|frames)/i,e.innerHTML)?(D(e),!0):(P&&e.nodeType===J.text&&(t=e.textContent,le([pe,de,Te],c=>{t=q(t,c," ")}),e.textContent!==t&&($(o.removed,{element:e.cloneNode()}),e.textContent=t)),I(h.afterSanitizeElements,e,null),!1)},tt=function(e,t,n){if(We&&(t==="id"||t==="name")&&(n in l||n in zt))return!1;if(!(Ee&&!_e[t]&&A(Ct,t))){if(!(He&&A(wt,t))){if(!d[t]||_e[t]){if(!(nt(e)&&(f.tagNameCheck instanceof RegExp&&A(f.tagNameCheck,e)||f.tagNameCheck instanceof Function&&f.tagNameCheck(e))&&(f.attributeNameCheck instanceof RegExp&&A(f.attributeNameCheck,t)||f.attributeNameCheck instanceof Function&&f.attributeNameCheck(t))||t==="is"&&f.allowCustomizedBuiltInElements&&(f.tagNameCheck instanceof RegExp&&A(f.tagNameCheck,n)||f.tagNameCheck instanceof Function&&f.tagNameCheck(n))))return!1}else if(!Se[t]){if(!A(ke,q(n,ve,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&$t(n,"data:")===0&&Xe[e])){if(!(ze&&!A(xt,q(n,ve,"")))){if(n)return!1}}}}}}return!0},nt=function(e){return e!=="annotation-xml"&&lt(e,Pt)},ot=function(e){I(h.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Le(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:d,forceKeepAttr:void 0};let c=t.length;for(;c--;){const _=t[c],{name:u,namespaceURI:O,value:M}=_,V=p(u),De=M;let E=u==="value"?De:qt(De);if(n.attrName=V,n.attrValue=E,n.keepAttr=!0,n.forceKeepAttr=void 0,I(h.uponSanitizeAttribute,e,n),E=n.attrValue,Be&&(V==="id"||V==="name")&&(z(u,e),E=vt+E),te&&A(/((--!?|])>)|<\/(style|title)/i,E)){z(u,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){z(u,e);continue}if(!Ge&&A(/\/>/i,E)){z(u,e);continue}P&&le([pe,de,Te],at=>{E=q(E,at," ")});const it=p(e.nodeName);if(!tt(it,V,E)){z(u,e);continue}if(g&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!O)switch(Q.getAttributeType(it,V)){case"TrustedHTML":{E=g.createHTML(E);break}case"TrustedScriptURL":{E=g.createScriptURL(E);break}}if(E!==De)try{O?e.setAttributeNS(O,u,E):e.setAttribute(u,E),Le(e)?D(e):st(o.removed)}catch{z(u,e)}}I(h.afterSanitizeAttributes,e,null)},Wt=function i(e){let t=null;const n=Je(e);for(I(h.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)I(h.uponSanitizeShadowNode,t,null),et(t),ot(t),t.content instanceof N&&i(t.content);I(h.afterSanitizeShadowDOM,e,null)};return o.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,n=null,c=null,_=null;if(Re=!i,Re&&(i="<!-->"),typeof i!="string"&&!Qe(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw K("dirty is not a string, aborting")}else throw K("toString is not a function");if(!o.isSupported)return i;if(ge||ye(e),o.removed=[],typeof i=="string"&&(X=!1),X){if(i.nodeName){const M=p(i.nodeName);if(!m[M]||Y[M])throw K("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof ue)t=Ze("<!---->"),n=t.ownerDocument.importNode(i,!0),n.nodeType===J.element&&n.nodeName==="BODY"||n.nodeName==="HTML"?t=n:t.appendChild(n);else{if(!v&&!P&&!w&&i.indexOf("<")===-1)return g&&oe?g.createHTML(i):i;if(t=Ze(i),!t)return v?null:oe?B:""}t&&he&&D(t.firstChild);const u=Je(X?i:t);for(;c=u.nextNode();)et(c),ot(c),c.content instanceof N&&Wt(c.content);if(X)return i;if(v){if(ne)for(_=bt.call(t.ownerDocument);t.firstChild;)_.appendChild(t.firstChild);else _=t;return(d.shadowroot||d.shadowrootmode)&&(_=Mt.call(s,_,!0)),_}let O=w?t.outerHTML:t.innerHTML;return w&&m["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&A(gt,t.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
4
4
  `+O),P&&le([pe,de,Te],M=>{O=q(O,M," ")}),g&&oe?g.createHTML(O):O},o.setConfig=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ye(i),ge=!0},o.clearConfig=function(){H=null,ge=!1},o.isValidAttribute=function(i,e,t){H||ye({});const n=p(i),c=p(e);return tt(n,c,t)},o.addHook=function(i,e){typeof e=="function"&&$(h[i],e)},o.removeHook=function(i,e){if(e!==void 0){const t=jt(h[i],e);return t===-1?void 0:Vt(h[i],t,1)[0]}return st(h[i])},o.removeHooks=function(i){h[i]=[]},o.removeAllHooks=function(){h=dt()},o}var un=ht();export{un as p};
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  var r=(a=>(a.MANUAL="manual",a.AUTO="auto",a))(r||{});export{r as A};
4
4
  //# sourceMappingURL=checkout.js.map
package/chunks/classes.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  const e=n=>n.reduce((s,r)=>{if(!r)return s;if(typeof r=="string"&&(s+=` ${r}`),Array.isArray(r)){const[c,a]=r;c&&a&&(s+=` ${c}`)}return s},"").trim();export{e as c};
4
4
  //# sourceMappingURL=classes.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{I as E,U as N}from"./fetch-graphql.js";var I=(R=>(R.INVALID_INPUT="INVALID_INPUT",R.SERVER_ERROR="SERVER_ERROR",R.UNAUTHENTICATED="UNAUTHENTICATED",R.UNKNOWN_ERROR="UNKNOWN_ERROR",R.QUOTE_DATA_ERROR="QUOTE_DATA_ERROR",R.QUOTE_PERMISSION_DENIED="QUOTE_PERMISSION_DENIED",R.PERMISSION_DENIED="PERMISSION_DENIED",R))(I||{});const t=["PlaceOrderError"],_=[{code:"INVALID_INPUT",matches:R=>R instanceof E},{code:"UNAUTHENTICATED",matches:R=>R instanceof N},{code:"SERVER_ERROR",matches:R=>!R||typeof R!="object"||!("name"in R)?!1:t.includes(R.name)}];export{I as E,_ as c};
4
4
  //# sourceMappingURL=classifiers.js.map
package/chunks/dom.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  function t(o){return o.closest("[data-dropin-container]")}function a(o){o.focus(),document.activeElement!==o&&o.scrollIntoView({behavior:"smooth"})}function r(o){const n=t(o);n&&a(n)}export{r as a,t as g,a as s};
4
4
  //# sourceMappingURL=dom.js.map
package/chunks/events.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{g as s}from"./events2.js";function u(n){if(n===void 0){const r=s();return!!(r!=null&&r.isVirtual)}return!!(n!=null&&n.isVirtual)}function o(n){return!n||n.isEmpty}function l(n){var i;if(!n)return null;const r=n.shippingAddresses||[];return r.length===0?null:(i=r[0])==null?void 0:i.selectedShippingMethod}function p(n,r="shipping"){var e;return n?(r==="shipping"?(e=n.shippingAddresses)==null?void 0:e[0]:n.billingAddress)??null:null}function g(n){if(!n)return null;const{selectedPaymentMethod:r}=n;return!r||!(r!=null&&r.code)?null:n.selectedPaymentMethod}export{o as a,p as b,g as c,l as g,u as i};
4
4
  //# sourceMappingURL=events.js.map
package/chunks/events2.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{events as n}from"@dropins/tools/event-bus.js";function u(){return n.lastPayload("checkout/initialized")??null}function i(){return n.lastPayload("checkout/updated")??null}function a(){return i()??u()}function s(){var e;const t=a();return!!((e=t==null?void 0:t.shippingAddresses)!=null&&e.length)}function l(){const t=a();return(t==null?void 0:t.email)??null}export{i as a,l as b,a as g,s as h};
4
4
  //# sourceMappingURL=events2.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import"@dropins/tools/lib.js";import{signal as m,computed as I}from"@dropins/tools/signals.js";import{events as D}from"@dropins/tools/event-bus.js";import{FetchGraphQL as U}from"@dropins/tools/fetch-graphql.js";const A={authenticated:!1,cartId:null,config:null,initialized:!1,quoteId:null},E=new Proxy(A,{set(e,t,s){return e[t]=s,!0},get(e,t){return e[t]}});function V(){return E.quoteId!==null}var u=(e=>(e.EXCLUDING_TAX="EXCLUDING_TAX",e.INCLUDING_EXCLUDING_TAX="INCLUDING_AND_EXCLUDING_TAX",e.INCLUDING_TAX="INCLUDING_TAX",e))(u||{});const B=m(!1);var G=(e=>(e.Updates="updates",e.Default="default",e.ShippingEstimate="shippingEstimate",e))(G||{});const d=new Map,g=new Map,c=m(new Set),N=new Map;N.set("updates",e=>{D.emit("checkout/updated",e)});async function q(e){g.set(e,!0);const t=d.get(e);let s;for(;t.length>0;){const i=t.shift();try{const r=await i.requestFn();i.resolve(r),s=r}catch(r){i.reject(r)}}g.set(e,!1);const n=new Set(c.value);n.delete(e),c.value=n;const o=N.get(e);o&&s&&o(s)}function w(e,t="default"){d.has(t)||d.set(t,[]);const s=d.get(t),n=new Promise((i,r)=>{s.push({requestFn:e,resolve:i,reject:r})}),o=new Set(c.value);return o.add(t),c.value=o,g.get(t)||q(t),n}const $=I(()=>c.value.has("updates")),z=I(()=>c.value.has("shippingEstimate")),v=["sender_email","recipient_email"];function X(e){return e.filter(t=>!t.path||!v.some(s=>{var n;return((n=t.path)==null?void 0:n.at(-1))===s}))}class T extends Error{constructor(t){super(t.map(s=>s.message).join(" ")),this.name="FetchError"}}class S extends Error{constructor(t){super(t),this.name="InvalidInput"}}class a extends S{constructor(t){super(`${t} is required.`)}}class Y extends a{constructor(){super("Cart ID")}}class J extends S{constructor(){super("Either Cart ID or Quote ID is required.")}}class K extends Error{constructor(){super("User is not authenticated")}}class W extends a{constructor(){super("Negotiable Quote ID")}}class Z extends a{constructor(){super("Email")}}class ee extends a{constructor(){super("Payment method code")}}class te extends a{constructor(){super("Shipping address")}}class se extends a{constructor(){super("Shipping method")}}class ne extends a{constructor(){super("Billing address")}}class re extends a{constructor(){super("Country Code")}}function L(e,t){return t.split(".").reduce((s,n)=>s&&s[n]!==void 0?s[n]:void 0,e)}async function M(e){const{defaultValueOnFail:t,options:s,path:n,query:o,queueName:i,transformer:r,type:p}=e;try{const l=async()=>{const{data:y,errors:C}=await b(o,{method:p==="query"?"GET":"POST",cache:p==="query"?"no-cache":void 0,...s});if(C){const _=X(C);if(_.length>0)throw new T(_)}let h=L(y,n);if(h===void 0)throw new Error(`No data found at path: ${n}`);return r?r(h):h};return p==="mutation"?await w(l,i):await l()}catch(l){if(t!==void 0)return t;throw l}}const x=`
4
4
  query getStoreConfig {
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{d as r}from"./fetch-graphql.js";import"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";const i=e=>!e||!(e!=null&&e.available_credit)||e.available_credit.value==null||!e.available_credit.currency?null:{availableCredit:{value:e.available_credit.value,currency:e.available_credit.currency},exceedLimit:(e==null?void 0:e.exceed_limit)||!1},l=`
4
4
  query getCompanyCredit {
package/chunks/guards.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{s as u,M as a}from"./fetch-graphql.js";function p({code:t,...e}){return{code:t,...e}}function f({code:t,...e}){return{code:t,...e}}const d=t=>{if("carrier_code"in t&&"method_code"in t)return t;const e=t,{carrierCode:o,methodCode:r,...n}=e;return{carrier_code:o,method_code:r,...n}};function m(t){return t.map(d)}function i(t){var e;return{fax:t.fax,middlename:t.middleName,prefix:t.prefix,suffix:t.suffix,vat_id:t.vatId,city:t.city,custom_attributes:((e=t.customAttributes)==null?void 0:e.map(o=>({attribute_code:o.code,value:o.value})))||[],company:t.company,country_code:t.countryCode,firstname:t.firstName,lastname:t.lastName,postcode:t.postcode,region:t.region,region_id:t.regionId,save_in_address_book:t.saveInAddressBook,street:t.street,telephone:t.telephone}}function l(t){const{customerAddressId:e,pickupLocationCode:o,address:r}=t,n={};return e?{customer_address_id:e}:(o&&(n.pickup_location_code=o),!o&&r&&(n.address=i(r)),n)}function _(t){const{customerAddressUid:e,address:o}=t,r={};return e?{customer_address_uid:e}:(o&&(r.address=i(o)),r)}function I(t){const{customerAddressId:e,sameAsShipping:o=!1,useForShipping:r=!1,address:n}=t;let s={use_for_shipping:r,same_as_shipping:o};return!o&&e?(s.customer_address_id=e,s):(!o&&n&&(s.address=i(n)),s)}function h(t){const{customerAddressUid:e,sameAsShipping:o=!1,useForShipping:r=!1,address:n}=t;let s={use_for_shipping:r,same_as_shipping:o};return!o&&e?(s.customer_address_uid=e,s):(!o&&n&&(s.address=i(n)),s)}const g=()=>{const{cartId:t,quoteId:e}=u;if(!t&&!e)throw new a};export{p as a,f as b,I as c,h as d,g as e,l as f,_ as g,m as t};
4
4
  //# sourceMappingURL=guards.js.map
package/chunks/render.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  (function(n,o){try{if(typeof document<"u"){const t=document.createElement("style"),r=o.styleId;for(const e in o.attributes)t.setAttribute(e,o.attributes[e]);t.setAttribute("data-dropin",r),t.appendChild(document.createTextNode(n));const a=document.querySelector('style[data-dropin="sdk"]');if(a)a.after(t);else{const e=document.querySelector('link[rel="stylesheet"], style');e?e.before(t):document.head.append(t)}}}catch(t){console.error("dropin-styles (injectCodeFunction)",t)}})(`.checkout__banner{margin-bottom:var(--spacing-xbig)}
4
4
  .checkout-shipping-methods__title,.checkout-shipping-methods__title h3{color:var(--color-neutral-800);font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);margin:0 0 var(--spacing-medium) 0}.checkout-shipping-methods__content{position:relative;display:block}.checkout-shipping-methods__method{margin-bottom:var(--spacing-medium);width:fit-content;cursor:pointer;font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing)}.checkout-shipping-methods__method:last-child{margin-bottom:0}.dropin-radio-button__label .dropin-price{color:var(--color-neutral-800);font-weight:400}.checkout-shipping-methods__options--busy{opacity:.4;pointer-events:none}.checkout-shipping-methods__spinner{margin:0 auto;position:absolute;z-index:999;left:0;right:0;top:calc(50% - (var(--size) / 2));bottom:0}.checkout-shipping-methods__options--toggleButton{display:grid;grid-template-columns:1fr 1fr;gap:var(--spacing-medium)}.checkout-shipping-methods__options--toggleButton .dropin-toggle-button__content{justify-content:start;display:grid;grid-template-columns:1fr min-content}.checkout-shipping-methods__options--toggleButton .checkout-shipping-methods__method{margin-bottom:0;width:auto}.checkout-shipping-methods__error{margin-top:var(--spacing-medium)}
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{CHECKOUT_DATA_FRAGMENT as A,NEGOTIABLE_QUOTE_FRAGMENT as I}from"../fragments.js";import{e as g,c as p,d as c}from"./guards.js";import{t as m,e as B}from"./synchronizeCheckout.js";import{s as r,d as f,Q as C,I as o,m as a}from"./fetch-graphql.js";import"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";const Q=`
4
4
  mutation setBillingAddress(
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{CUSTOMER_FRAGMENT as o,CHECKOUT_DATA_FRAGMENT as n}from"../fragments.js";import{s as m,d as r,u as l,p as u,Q as c}from"./fetch-graphql.js";import{merge as E}from"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";import{c as p,t as f}from"./synchronizeCheckout.js";const C=t=>{var i,a,s;if(!t)return null;const e={firstName:t.firstname||"",lastName:t.lastname||"",email:t.email||""};return E(e,(s=(a=(i=p.getConfig().models)==null?void 0:i.CustomerModel)==null?void 0:a.transformer)==null?void 0:s.call(a,t))},y=t=>!!(t!=null&&t.is_email_available),A=`
4
4
  query getCustomer {
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{CHECKOUT_DATA_FRAGMENT as d,NEGOTIABLE_QUOTE_FRAGMENT as i}from"../fragments.js";import{e as p,a as M,b as y}from"./guards.js";import{t as c,e as h}from"./synchronizeCheckout.js";import{s as e,l as I,d as P,Q as C}from"./fetch-graphql.js";import"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";const T=`
4
4
  mutation setPaymentMethodOnCart(
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{s as o,p as G,q as D,d as T,Q as E,I as l,t as Q}from"./fetch-graphql.js";import"@dropins/tools/lib.js";import{t as F,a as O}from"./transform-shipping-estimate.js";import{a as R}from"./transform-shipping-methods.js";import{events as $}from"@dropins/tools/event-bus.js";import{g as N}from"./values.js";import{c as w,t as x,e as H}from"./synchronizeCheckout.js";import{e as V,f as K,g as L}from"./guards.js";import{CHECKOUT_DATA_FRAGMENT as y,NEGOTIABLE_QUOTE_FRAGMENT as B}from"../fragments.js";const k=`
4
4
  mutation estimateShippingMethods(
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{CHECKOUT_DATA_FRAGMENT as r,NEGOTIABLE_QUOTE_FRAGMENT as h}from"../fragments.js";import{e as d,t as u}from"./guards.js";import{t as g,e as M}from"./synchronizeCheckout.js";import{s as e,k as m,d as c,Q as I}from"./fetch-graphql.js";import"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";const S=`
4
4
  mutation setShippingMethodsOnCart(
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{s as r,p as D,d as _,U as S,v as N,e as Q}from"./fetch-graphql.js";import{merge as k,Initializer as z,deepmerge as O}from"@dropins/tools/lib.js";import{events as d}from"@dropins/tools/event-bus.js";import{CHECKOUT_DATA_FRAGMENT as C,NEGOTIABLE_QUOTE_FRAGMENT as G}from"../fragments.js";import{b as P,c as R,d as U,a as L,e as x,f as B,g as $}from"./transform-shipping-methods.js";import{E as p}from"./classifiers.js";const F=async(e=!1)=>{r.authenticated=e},b=e=>{if(!e)return;const{code:t,title:a,...s}=e;return{code:t,title:a,additionalData:s}},I=e=>{if(e)return e.filter(t=>!!t).map(t=>{const{code:a,title:s,...c}=t;return{code:a,title:s,additionalData:c}})},H=e=>{var a,s,c;if(!e)return;const t={type:"cart",availablePaymentMethods:I(e.available_payment_methods),billingAddress:R(e.billing_address),email:e.email??void 0,id:e.id,isEmpty:e.total_quantity===0,isVirtual:e.is_virtual,selectedPaymentMethod:b(e.selected_payment_method),shippingAddresses:P(e.shipping_addresses),isGuest:!r.authenticated};return k(t,(c=(s=(a=te.getConfig().models)==null?void 0:a.CartModel)==null?void 0:s.transformer)==null?void 0:c.call(s,e))},q=e=>{const t=e.street.filter(Boolean);return{city:e.city,company:e.company||void 0,country:$(e.country),customAttributes:B(e.custom_attributes),customerAddressUid:e.customer_address_uid||void 0,fax:e.fax||void 0,firstName:e.firstname,lastName:e.lastname,middleName:e.middlename||void 0,postCode:e.postcode||void 0,prefix:e.prefix||void 0,region:x(e.region),street:t,suffix:e.suffix||void 0,telephone:e.telephone||void 0,uid:e.uid,vatId:e.vat_id||void 0}},K=e=>{if(e)return q(e)},V=e=>e.filter(t=>!!t).map(t=>{const{available_shipping_methods:a,selected_shipping_method:s,...c}=t;return{...q(c),availableShippingMethods:L(a),selectedShippingMethod:U(s)}}),Y=e=>e?{type:"quote",availablePaymentMethods:I(e.available_payment_methods),billingAddress:K(e.billing_address),email:e.email??"",isEmpty:e.total_quantity===0,isVirtual:e.is_virtual,name:e.name,selectedPaymentMethod:b(e.selected_payment_method),shippingAddresses:V(e.shipping_addresses),status:e.status,uid:e.uid}:null,W=`
4
4
  query getCart($cartId: String!) {
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  const r=o=>({countryCode:o.country_id,postCode:o.postcode||"",...o.region_id?{regionId:Number(o.region_id)}:{...o.region?{region:o.region}:{}}}),n=o=>({carrierCode:o.carrier.code||"",methodCode:o.code||"",amount:o.amount,amountExclTax:o.amountExclTax,amountInclTax:o.amountInclTax});export{r as a,n as t};
4
4
  //# sourceMappingURL=transform-shipping-estimate.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import"./fetch-graphql.js";import"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";const s=e=>e?"code"in e&&"value"in e:!1,m=e=>e?e.filter(s).map(r=>{const{code:i,value:o}=r;return{code:i,value:o}}):[],n=e=>{const r=e.street.filter(Boolean);return{city:e.city,company:e.company||void 0,country:f(e.country),customAttributes:m(e.custom_attributes),fax:e.fax||void 0,firstName:e.firstname,id:(e==null?void 0:e.id)||void 0,lastName:e.lastname,middleName:e.middlename||void 0,postCode:e.postcode||void 0,prefix:e.prefix||void 0,region:p(e.region),street:r,suffix:e.suffix||void 0,telephone:e.telephone||void 0,uid:e.uid,vatId:e.vat_id||void 0}},A=e=>{if(e)return n(e)},N=e=>e.filter(r=>!!r).map(r=>{const{available_shipping_methods:i,selected_shipping_method:o,same_as_billing:u,...l}=r;return{...n(l),availableShippingMethods:h(i),selectedShippingMethod:x(o),sameAsBilling:u}}),C=e=>{var r,i;if(e)return{city:e.city,company:e.company,countryCode:e.country.code,customAttributes:e.customAttributes||[],firstName:e.firstName,lastName:e.lastName,postcode:e.postCode,region:(r=e.region)==null?void 0:r.code,regionId:(i=e.region)==null?void 0:i.id,street:e.street,telephone:e.telephone,vatId:e.vatId,prefix:e.prefix,suffix:e.suffix,middleName:e.middleName,fax:e.fax}},f=e=>({code:(e==null?void 0:e.code)??"",label:(e==null?void 0:e.label)??""}),p=e=>{if(!(!(e!=null&&e.code)||!(e!=null&&e.label)))return{code:e.code,name:e.label,id:e.region_id??void 0}},_=(e,r)=>e.amount.value-r.amount.value,v=e=>e==null,t=e=>!(!e||!e.method_code||!e.method_title||v(e.amount.value)||!e.amount.currency),c=e=>({amount:{value:e.amount.value,currency:e.amount.currency},title:e.method_title,code:e.method_code,carrier:{code:e.carrier_code,title:e.carrier_title},value:`${e.carrier_code} - ${e.method_code}`,...e.price_excl_tax&&{amountExclTax:{value:e.price_excl_tax.value,currency:e.price_excl_tax.currency}},...e.price_incl_tax&&{amountInclTax:{value:e.price_incl_tax.value,currency:e.price_incl_tax.currency}}}),x=e=>{if(t(e))return c(e)},h=e=>e?e.filter(t).map(r=>c(r)).sort(_):[];export{h as a,N as b,A as c,x as d,p as e,m as f,f as g,C as t};
4
4
  //# sourceMappingURL=transform-shipping-methods.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  const a={EMAIL:/^[a-z0-9,!#$%&'*+/=?^_`{|}~-]+(\.[a-z0-9,!#$%&'*+/=?^_`{|}~-]+)*@([a-z0-9-]+\.)+[a-z]{2,}$/i,NOT_EMPTY:/^(?!\s*$).+/},s=t=>a.EMAIL.test(t),e=t=>a.NOT_EMPTY.test(t),n={NOT_EMPTY:a.NOT_EMPTY.source};export{s as a,n as h,e as v};
4
4
  //# sourceMappingURL=validation.js.map
package/chunks/values.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{events as l}from"@dropins/tools/event-bus.js";const o={email:"",isBillToShipping:void 0,selectedPaymentMethod:null,selectedShippingMethod:null};function s(e){const n={...l.lastPayload("checkout/values")??o,...e};l.emit("checkout/values",n)}function i(e){const t=l.lastPayload("checkout/values");return t&&e in t?t[e]:null}export{i as g,s as n};
4
4
  //# sourceMappingURL=values.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsxs as h,jsx as o}from"@dropins/tools/preact-jsx-runtime.js";import{useState as p,useMemo as N,useCallback as k,useEffect as _}from"@dropins/tools/preact-hooks.js";import"../chunks/TermsAndConditions.js";import{classes as A}from"@dropins/tools/lib.js";import{Header as $,ToggleButton as b}from"@dropins/tools/components.js";import{useText as V}from"@dropins/tools/i18n.js";/* empty css */import"../chunks/fetch-graphql.js";import{t as x}from"../chunks/transform-shipping-methods.js";import{events as y}from"@dropins/tools/event-bus.js";import{a as B}from"../chunks/events2.js";import"@dropins/tools/preact-compat.js";/* empty css *//* empty css *//* empty css */import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";function T(t){var f;if(!t)return[];const a=`${t.firstName} ${t.lastName}`.trim(),m=((f=t.street)==null?void 0:f[0])??"",r=t.city??"",s=t.region||"",n=t.postcode??"",c=t.countryCode??"";let e="";r&&s?e=`${r}, ${s}`:r?e=r:s&&(e=s);let d=e;n&&(d=e?`${e} ${n}`:n);let u=d;return c&&(u=d?`${d}, ${c}`:c),[a,m,u]}const C=({title:t,address:a,selected:m,busy:r,onChange:s})=>{const[n,c,e]=T(a);return o("div",{className:"checkout-address-validation__option",children:o(b,{busy:r,className:"checkout-address-validation__radio",label:h("div",{children:[o("div",{className:"checkout-address-validation__option-title",children:o("strong",{children:t})}),n&&o("div",{children:n}),c&&o("div",{children:c}),e&&o("div",{children:e})]}),name:"address-validation-choice",selected:m,value:t,onChange:s})})},j=({busy:t=!1,className:a,currentAddress:m,onSelectionChange:r,selection:s,suggestedAddress:n})=>{const c=!!n,e=V({title:"Checkout.AddressValidation.title",subtitle:"Checkout.AddressValidation.subtitle",suggestedAddress:"Checkout.AddressValidation.suggestedAddress",originalAddress:"Checkout.AddressValidation.originalAddress"});return h("div",{className:A(["checkout-address-validation",a]),children:[o($,{className:"checkout-address-validation__title",divider:!1,title:e.title}),o("div",{className:"checkout-address-validation__subtitle",children:e.subtitle}),h("div",{className:A(["checkout-address-validation__options",t&&"checkout-address-validation__options--busy"]),children:[c&&o(C,{address:n,busy:t,selected:s==="suggested",title:e.suggestedAddress,onChange:()=>r("suggested")}),o(C,{address:m,busy:t,selected:s==="original",title:e.originalAddress,onChange:()=>r("original")})]})]})},Q=({suggestedAddress:t,handleSelectedAddress:a})=>{const[m,r]=p(null),[s,n]=p(void 0),[c,e]=p(!1),d=N(()=>!t||!s?null:{...s,regionId:void 0,...t},[s,t]),u=k(i=>{var v;const l=(v=i==null?void 0:i.shippingAddresses)==null?void 0:v[0],g=x(l);n(g)},[]);_(()=>{const i=y.on("checkout/initialized",l=>{u(l)},{eager:!0});return()=>{i==null||i.off()}},[u]),_(()=>{const i=B();i&&u(i);const l=y.on("checkout/updated",g=>{u(g)},{eager:!1});return()=>{l==null||l.off()}},[u]);const f=k(async i=>{r(i);const l=i==="suggested"?d:s;e(!0);try{await(a==null?void 0:a({selection:i,address:l}))}finally{e(!1)}},[d,s,a]);return o(j,{busy:c,currentAddress:s,selection:m,suggestedAddress:d,onSelectionChange:f})};export{Q as AddressValidation,Q as default};
4
4
  //# sourceMappingURL=AddressValidation.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as n,jsxs as R}from"@dropins/tools/preact-jsx-runtime.js";import{h as j,i as w}from"../chunks/fetch-graphql.js";import"@dropins/tools/lib.js";import{h as C,a as L}from"../chunks/events2.js";import{n as P,g as U}from"../chunks/values.js";import{events as D}from"@dropins/tools/event-bus.js";import{c as W}from"../chunks/synchronizeCheckout.js";import{s as V}from"../chunks/setBillingAddress.js";/* empty css */import{Skeleton as q,SkeletonRow as $,Checkbox as y,InLineAlert as F}from"@dropins/tools/components.js";import{W as G}from"../chunks/ConditionalWrapper.js";import{c as H}from"../chunks/classes.js";import{useText as v}from"@dropins/tools/i18n.js";import{useState as b,useRef as J,useCallback as A,useEffect as B}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../fragments.js";import"../chunks/transform-shipping-methods.js";import"../chunks/classifiers.js";import"../chunks/guards.js";const K=()=>n(q,{className:"bill-to-shipping-address__skeleton","data-testid":"bill-to-shipping-skeleton",children:n($,{size:"small",variant:"row"})}),M=({className:i,checked:c,disabled:e,error:t=null,onChange:p=()=>{},onDismissError:a=()=>{}})=>{const f=v({title:"Checkout.BillToShippingAddress.title"}),g=t!==null,r=l=>{const d=l.target;p==null||p(d.checked)};return R("div",{className:"checkout-bill-to-shipping-address",children:[n(y,{checked:c,className:H(["checkout-bill-to-shipping-address__checkbox",i]),"data-testid":"bill-to-shipping-checkbox",disabled:e,label:f.title,name:"checkout-bill-to-shipping-address__checkbox",onChange:r}),g&&n("div",{className:"checkout-bill-to-shipping-address__error","data-testid":"checkout-bill-to-shipping-address-alert",children:n(F,{heading:t,type:"error",variant:"primary",onDismiss:a})})]})},O=G(M,K),gs=({active:i=!0,autoSync:c=!0,onCartSyncError:e,onChange:t})=>{const[p,a]=b(null),[f,g]=b(!1),[r,l]=b(),d=J(!1),E=j.value||w.value,{cartSyncError:S}=v({cartSyncError:"Checkout.BillToShippingAddress.cartSyncError"}),I=A(()=>{a(null)},[]),N=A(s=>{a(null),l(s),t==null||t(s),!(!c||!s||!C())&&V({sameAsShipping:!0}).catch(o=>{l(!1),e==null||e({error:o}),e||a(S)})},[c,S,e,t]),h=A(s=>{var _;const o=!s||s.isEmpty,u=!!(s!=null&&s.isVirtual);if(o||u){g(u),l(!1),d.current=!1;return}if(d.current)return;const x=s,k=(_=x.shippingAddresses)==null?void 0:_[0],T=!!x.billingAddress;let m;if(k)m=k.sameAsBilling??!T;else{const{defaults:z}=W.getConfig();m=z.isBillToShipping}l(m),d.current=!0,c&&m&&k&&!T&&V({sameAsShipping:!0}).catch(()=>{})},[]);return B(()=>{!i||r===void 0||P({isBillToShipping:r})},[i,r]),B(()=>{if(!i)return;const s=L();if(s){const u=U("isBillToShipping");u!=null&&l(u),h(s);return}const o=D.on("checkout/initialized",h,{eager:!0});return()=>{o==null||o.off()}},[i,h]),B(()=>{if(!i)return;const s=D.on("checkout/updated",h,{eager:!1});return()=>{s==null||s.off()}},[i,h]),n(O,{checked:r,disabled:E,error:p,initialized:r!==void 0,visible:i&&!f,onChange:N,onDismissError:I})};export{gs as BillToShippingAddress,gs as default};
4
4
  //# sourceMappingURL=BillToShippingAddress.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as i,jsxs as k}from"@dropins/tools/preact-jsx-runtime.js";import"../chunks/TermsAndConditions.js";import{VComponent as C,classes as D}from"@dropins/tools/lib.js";import{Skeleton as B,SkeletonRow as U,Price as h}from"@dropins/tools/components.js";/* empty css */import{W as z}from"../chunks/ConditionalWrapper.js";import{useText as _}from"@dropins/tools/i18n.js";import{s as G,T as I}from"../chunks/fetch-graphql.js";import{events as d}from"@dropins/tools/event-bus.js";import{a as P}from"../chunks/events2.js";import"@dropins/tools/preact-compat.js";/* empty css *//* empty css *//* empty css */import{useState as V,useCallback as b,useEffect as x}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";const X=()=>i(B,{"data-testid":"estimate-shipping-skeleton",children:i(U,{size:"xsmall"})}),j=({label:n,price:t,priceExclTax:a,taxExcluded:o=!1,taxIncluded:c=!1})=>{const l=_({withTaxes:"Checkout.EstimateShipping.withTaxes",withoutTaxes:"Checkout.EstimateShipping.withoutTaxes"});return k("div",{className:"checkout-estimate-shipping","data-testid":"estimate-shipping",children:[i(C,{className:"checkout-estimate-shipping__label",node:n}),i(C,{className:"checkout-estimate-shipping__price",node:t}),c&&i("span",{className:D(["checkout-estimate-shipping__caption"]),"data-testid":"shipping-tax-included",children:l.withTaxes}),o&&k("span",{className:D(["checkout-estimate-shipping__caption"]),"data-testid":"shipping-tax-included-excluded",children:[a," ",l.withoutTaxes]})]})},v=z(j,X),at=({active:n=!0})=>{var T;const[t,a]=V(),o=(t==null?void 0:t.amount.value)===0,c=(T=G.config)==null?void 0:T.shoppingCartDisplaySetting.shipping,l=c===I.INCLUDING_EXCLUDING_TAX,g=c===I.INCLUDING_TAX,u=_({freeShipping:"Checkout.EstimateShipping.freeShipping",taxToBeDetermined:"Checkout.EstimateShipping.taxToBeDetermined",label:"Checkout.EstimateShipping.label",estimated:"Checkout.EstimateShipping.estimated"}),r=b(e=>{var S;const s=!e||e.isEmpty,p=!!(e!=null&&e.isVirtual);if(s||p){a(null);return}const m=(S=e.shippingAddresses)==null?void 0:S[0];if(!m)return;const E=m==null?void 0:m.selectedShippingMethod;if(!E){a(null);return}const{amount:w,amountExclTax:L,amountInclTax:M}=E;a({estimated:!1,amount:w,amountExclTax:L,amountInclTax:M})},[]),f=b(e=>{let s=null;if(e.shippingMethod){const p=e.shippingMethod;s={estimated:!0,amount:p.amount,amountExclTax:p.amountExclTax,amountInclTax:p.amountInclTax}}a(s)},[]);x(()=>{if(!n)return;const e=d.on("shipping/estimate",f,{eager:!0});return()=>{e==null||e.off()}},[n,f]),x(()=>{if(!n)return;const e=P();if(e){r(e);return}const s=d.on("checkout/initialized",r,{eager:!0});return()=>{s==null||s.off()}},[n,r]),x(()=>{if(!n)return;const e=d.on("checkout/updated",r,{eager:!1});return()=>{e==null||e.off()}},[n,r]);const y=()=>o?i("span",{"data-testid":"free-shipping",children:u.freeShipping}):g&&(t!=null&&t.amountInclTax)?i(h,{amount:t.amountInclTax.value,currency:t.amountInclTax.currency,"data-testid":"shipping"}):i(h,{amount:t==null?void 0:t.amount.value,currency:t==null?void 0:t.amount.currency,"data-testid":"shipping"}),N=()=>t!=null&&t.amountExclTax?i(h,{amount:t.amountExclTax.value,currency:t.amountExclTax.currency,"data-testid":"shipping-excluding-tax"}):i("span",{children:u.taxToBeDetermined});return i(v,{initialized:t!==void 0,label:(()=>{const e=t!=null&&t.estimated?u.estimated:u.label;return i("span",{"data-testid":"estimate-shipping-label",children:e})})(),price:y(),priceExclTax:N(),taxExcluded:l&&!o,taxIncluded:g&&!o,visible:n&&t!==null})};export{at as EstimateShipping,at as default};
4
4
  //# sourceMappingURL=EstimateShipping.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as r,jsxs as u,Fragment as le}from"@dropins/tools/preact-jsx-runtime.js";import"../chunks/fetch-graphql.js";import{VComponent as G,classes as se,Slot as J}from"@dropins/tools/lib.js";import{b as ce,a as me}from"../chunks/events2.js";import{a as z}from"../chunks/validation.js";import{n as B,g as K}from"../chunks/values.js";import{events as D}from"@dropins/tools/event-bus.js";import{i as ue,s as he,g as de}from"../chunks/setGuestEmailOnCart.js";import{Field as ge,Input as fe,Skeleton as pe,SkeletonRow as Q}from"@dropins/tools/components.js";import{useText as I}from"@dropins/tools/i18n.js";import"../chunks/TermsAndConditions.js";/* empty css */import{W as ke}from"../chunks/ConditionalWrapper.js";import"@dropins/tools/preact-compat.js";/* empty css *//* empty css *//* empty css */import{useState as k,useRef as Le,useCallback as d,useEffect as w,useMemo as M}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../fragments.js";import"../chunks/synchronizeCheckout.js";import"../chunks/transform-shipping-methods.js";import"../chunks/classifiers.js";const ve=({value:o,error:n,hint:a,onChange:g,onBlur:L,onInvalid:c})=>{const l=I({LoginFormLabel:"Checkout.LoginForm.ariaLabel",LoginFormFloatingLabel:"Checkout.LoginForm.floatingLabel",LoginFormPlaceholder:"Checkout.LoginForm.placeholder"});return r(ge,{error:n,hint:a,children:r(fe,{"aria-label":l.LoginFormLabel,"aria-required":!0,autocomplete:"email",floatingLabel:l.LoginFormFloatingLabel,id:"customer-email",name:"customer-email",placeholder:l.LoginFormPlaceholder,required:!0,type:"email",value:o,onBlur:L,onChange:g,onInvalid:c})})},Fe=({onClick:o})=>{const n=I({account:"Checkout.LoginForm.account",signIn:"Checkout.LoginForm.signIn"});return u("div",{className:"checkout-login-form__sign-in",children:[n.account,r("a",{className:"checkout-login-form__link","data-testid":"sign-in-link",href:"#",rel:"noreferrer",target:"_blank",onClick:a=>{a.preventDefault(),o(a)},children:n.signIn})]})},_e=()=>u(pe,{"data-testid":"login-form-skeleton",children:[r(Q,{fullWidth:!0,variant:"heading"}),r(Q,{fullWidth:!0,size:"medium"})]}),be=({className:o,customer:n,email:a,error:g,headingContent:L,hint:c,name:l,onEmailBlur:f,onEmailChange:m,onEmailInvalid:s,title:F,...y})=>u("div",{className:"checkout-login-form","data-testid":"checkout-login-form",children:[u("div",{className:"checkout-login-form__heading",children:[F&&r(G,{className:"checkout-login-form__title",node:F}),L&&r(G,{className:"checkout-login-form__heading-label",node:L})]}),n?u("div",{className:"checkout-login-form__customer-details",children:[r("div",{className:"checkout-login-form__customer-name",children:`${n.firstName} ${n.lastName}`}),r("div",{className:"checkout-login-form__customer-email",children:n.email})]}):r("div",{className:"checkout-login-form__content",children:u("form",{...y,noValidate:!0,className:se(["dropin-login-form__form",o]),name:l,children:[r("button",{disabled:!0,"aria-hidden":"true",style:"display: none",type:"submit"}),r(ve,{error:g,hint:c,value:a,onBlur:f,onChange:m,onInvalid:s})]})})]}),Ee=ke(be,_e),Ce=({onClick:o})=>{const n=I({switch:"Checkout.LoginForm.switch",signOut:"Checkout.LoginForm.signOut"});return u("p",{className:"checkout-login-form__sign-out",children:[n.switch,r("a",{className:"checkout-login-form__link",href:"#",rel:"noreferrer",target:"_blank",onClick:a=>{a.preventDefault(),o==null||o(a)},children:n.signOut})]})},Ne=1e3,Xe=({active:o=!0,autoSync:n=!0,displayHeadingContent:a=!0,displayTitle:g=!0,initialData:L,onCartSyncError:c,onSignInClick:l,onSignOutClick:f,onValidationError:m,slots:s,...F})=>{const[y,X]=k(null),[Y,A]=k(""),[Z,p]=k(""),[x,S]=k(!1),[V,_]=k(!0),[ee,W]=k(!1),h=Le(null),{alreadyHaveAccountHint:$,cartSyncError:j,defaultTitle:q,fasterCheckoutHint:O,invalidEmailError:b,missingEmailError:E,signInLabel:P}=I({alreadyHaveAccountHint:"Checkout.LoginForm.emailExists.alreadyHaveAccount",cartSyncError:"Checkout.LoginForm.cartSyncError",defaultTitle:"Checkout.LoginForm.title",fasterCheckoutHint:"Checkout.LoginForm.emailExists.forFasterCheckout",invalidEmailError:"Checkout.LoginForm.invalidEmailError",missingEmailError:"Checkout.LoginForm.missingEmailError",signInLabel:"Checkout.LoginForm.emailExists.signInButton"}),C=d(e=>{!z(e)||e===ce()||(ue(e).then(t=>{_(t)}).catch(t=>{console.error(t),_(!0)}),n&&he(e).catch(t=>{c==null||c({email:e,error:t}),c||p(j)}))},[n,c,j]),te=d(e=>{const i=e.target.value;A(i),_(!0),p(""),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{C(i),B({email:i}),h.current=null},Ne)},[C]),ie=d(e=>{const t=e.target,i=t.value.trim();if(z(i)){if(p(""),t.setCustomValidity(""),!h.current)return;clearTimeout(h.current),h.current=null,C(i),B({email:i});return}const U=i===""?"missing":"invalid",H=U==="missing"?E:b;if(m){m({email:i,message:H,type:U});return}p(H),t.setCustomValidity(H)},[b,E,m,C]),re=d(e=>{const t=e.target,i=t.validity,T=i.valueMissing?E:b;if(!m){p(T);return}m({email:t.value,message:T,type:i.valueMissing?"missing":"invalid"})},[E,b,m]),N=d(()=>{const e=K("email")??"",t=z(e);l==null||l(t?e:"")},[l]),R=d(()=>{f==null||f()},[f]),v=d(e=>{const t=K("email")??"",i=(e==null?void 0:e.email)??"";i!==t&&(A(i),p(""),_(!0),B({email:i}))},[]);w(()=>{if(!o)return;const e=D.on("authenticated",t=>{S(t),de().then(i=>{X(i)}).catch(console.error)},{eager:!0});return()=>{e==null||e.off()}},[o]),w(()=>{if(!o)return;const e=me();if(e){W(!0);const i=e.email??"";i&&A(i),v(e);return}const t=D.on("checkout/initialized",i=>{W(!0),v(i)},{eager:!0});return()=>{t==null||t.off()}},[o,v]),w(()=>{if(!o)return;const e=D.on("checkout/updated",v,{eager:!1});return()=>{e==null||e.off()}},[o,v]);const oe=M(()=>{if(g)return r(J,{name:"checkout-login-form-title",slot:s==null?void 0:s.Title,children:r("h2",{children:q})})},[g,s,q]),ne=M(()=>{if(a)return r(J,{context:{authenticated:x},name:"checkout-login-form-heading-label",slot:s==null?void 0:s.Heading,children:x?r(Ce,{onClick:R}):r(Fe,{onClick:N})})},[a,x,s,N,R]),ae=M(()=>V?"":u(le,{children:[$," ",r("a",{href:"#",onClick:N,children:P})," ",O]}),[V,$,P,O,N]);return r(Ee,{...F,customer:y,email:Y,error:Z,headingContent:ne,hint:ae,initialized:ee,title:oe,visible:o,onEmailBlur:ie,onEmailChange:te,onEmailInvalid:re})};export{Xe as LoginForm,Xe as default};
4
4
  //# sourceMappingURL=LoginForm.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as t}from"@dropins/tools/preact-jsx-runtime.js";/* empty css */import{AlertBanner as h,Icon as I}from"@dropins/tools/components.js";import{c as B}from"../chunks/classes.js";import{events as c}from"@dropins/tools/event-bus.js";import{useState as M,useCallback as w,useEffect as u}from"@dropins/tools/preact-hooks.js";import*as f from"@dropins/tools/preact-compat.js";import{useText as x,Text as H}from"@dropins/tools/i18n.js";const V=n=>f.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 12C0 5.37931 5.37931 0 12 0C18.6207 0 24 5.37931 24 12C24 18.6207 18.6207 24 12 24C5.37931 24 0 18.6207 0 12ZM11.8885 5.06101C11.1405 5.06101 10.5357 5.66579 10.5357 6.4138V6.57295C10.5835 7.27321 11.1882 7.81433 11.8885 7.76658H12.0795C12.7797 7.70292 13.289 7.09815 13.2413 6.4138C13.2413 5.66579 12.6365 5.06101 11.8885 5.06101ZM13.1935 16.8223H14.1007C14.2599 16.8223 14.4031 16.9655 14.4031 17.1247V17.7294C14.4031 17.9045 14.2599 18.0318 14.1007 18.0318H9.8832C9.70813 18.0318 9.58081 17.8886 9.58081 17.7294V17.1247C9.58081 16.9496 9.72405 16.8223 9.8832 16.8223H10.7904V10.7905H9.8832C9.70813 10.7905 9.58081 10.6472 9.58081 10.4881V9.88329C9.58081 9.70823 9.72405 9.58091 9.8832 9.58091H12.5888C12.923 9.58091 13.1935 9.85146 13.1935 10.1857V16.8223Z",fill:"currentColor"})),S=({className:n,initialData:b,active:r=!0,...C})=>{const[o,s]=M(0),a=x({mergedCartBannerItems:t(H,{fields:{count:o},id:"Checkout.MergedCartBanner.items",plural:o})}),d=()=>{s(0)},l=w(e=>{var i;const m=(i=e==null?void 0:e.oldCartItems)==null?void 0:i.reduce((g,p)=>g+p.quantity,0);m>0&&s(m)},[]);return u(()=>{if(!r)return;const e=c.on("cart/merged",l,{eager:!0});return()=>{e==null||e.off()}},[r,l]),u(()=>{if(!r)return;const e=c.on("cart/reset",()=>{s(0)},{eager:!1});return()=>{e==null||e.off()}},[r]),!r||!o?null:t(h,{...C,"aria-label":a.mergedCartBannerItems,className:B(["checkout__banner",n]),"data-testid":"merged-cart-banner",icon:t(I,{source:V}),message:t("span",{children:a.mergedCartBannerItems}),variant:"neutral",onDismiss:d})};export{S as MergedCartBanner,S as default};
4
4
  //# sourceMappingURL=MergedCartBanner.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsxs as n,jsx as o}from"@dropins/tools/preact-jsx-runtime.js";import"../chunks/TermsAndConditions.js";import{classes as l}from"@dropins/tools/lib.js";import{Card as h,Icon as O,Image as d}from"@dropins/tools/components.js";/* empty css */import{S as p}from"../chunks/OrderError.js";import{useText as S}from"@dropins/tools/i18n.js";import"../chunks/fetch-graphql.js";import{events as _}from"@dropins/tools/event-bus.js";import"@dropins/tools/preact-compat.js";/* empty css *//* empty css *//* empty css */import{useState as g,useCallback as v,useEffect as N}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";const w=({className:r,items:u,onRemoveOutOfStock:s,routeCart:t,...a})=>{const i=S({title:"Checkout.OutOfStock.title",message:"Checkout.OutOfStock.message",reviewCart:"Checkout.OutOfStock.actions.reviewCart",removeOutOfStock:"Checkout.OutOfStock.actions.removeOutOfStock"});return n(h,{className:l(["checkout-out-of-stock",r]),"data-testid":"checkout-out-of-stock",variant:"secondary",...a,children:[n("h4",{className:"checkout-out-of-stock__title",children:[o(O,{size:"16",source:p,stroke:"1"}),i.title]}),o("p",{className:"checkout-out-of-stock__message",children:i.message}),o("ol",{className:"checkout-out-of-stock__items",children:u.map(m=>o("li",{className:"checkout-out-of-stock__item","data-testid":"out-of-stock-item",children:o(d,{alt:m.image.alt,height:"100",loading:"eager",params:{width:100},src:m.image.src,width:"100"})},m.sku))}),n("div",{className:"checkout-out-of-stock__actions",children:[t&&o("a",{className:"checkout-out-of-stock__action","data-testid":"review-cart",href:t,children:i.reviewCart}),s&&o("button",{className:"checkout-out-of-stock__action","data-testid":"remove-out-of-stock",type:"button",onClick:s,children:i.removeOutOfStock})]})]})},G=({onCartProductsUpdate:r,routeCart:u,active:s=!0})=>{const[t,a]=g([]),i=v(()=>{if(!r)return;const e=t.filter(c=>c.outOfStock).map(c=>({uid:c.uid,quantity:0}));r(e)},[t,r]);if(N(()=>{if(!s)return;const e=_.on("cart/data",c=>{const k=(c==null?void 0:c.items)||[];a(k.filter(f=>f.outOfStock||f.insufficientQuantity))},{eager:!0});return()=>{e==null||e.off()}},[s]),!s||t.length===0)return null;const m=!t.some(e=>e.insufficientQuantity);return o(w,{items:t,routeCart:u==null?void 0:u(),onRemoveOutOfStock:m?i:void 0})};export{G as OutOfStock,G as default};
4
4
  //# sourceMappingURL=OutOfStock.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{h as se,s as ie}from"../chunks/fetch-graphql.js";import{classes as O,VComponent as me,deepmerge as de,Slot as G}from"@dropins/tools/lib.js";import{events as q}from"@dropins/tools/event-bus.js";import{v as le}from"../chunks/validation.js";import{s as Q}from"../chunks/setPaymentMethod.js";import{jsxs as D,jsx as c}from"@dropins/tools/preact-jsx-runtime.js";import{useState as _,useMemo as L,useCallback as p,useEffect as R}from"@dropins/tools/preact-hooks.js";import"../chunks/TermsAndConditions.js";import{Skeleton as ue,SkeletonRow as N,IllustratedMessage as pe,Icon as X,InLineAlert as he,ToggleButton as fe,RadioButton as ye}from"@dropins/tools/components.js";/* empty css */import*as T from"@dropins/tools/preact-compat.js";import{useRef as ke,useEffect as ge}from"@dropins/tools/preact-compat.js";/* empty css *//* empty css *//* empty css *//* empty css */import{P as ve}from"../chunks/PurchaseOrder.js";import{P as Ce}from"../chunks/PaymentOnAccount2.js";import{r as Se}from"../chunks/render.js";import{i as Me}from"../chunks/events.js";import{h as be,a as Ee}from"../chunks/events2.js";import{g as V,n as Pe}from"../chunks/values.js";import{W as we}from"../chunks/ConditionalWrapper.js";import{s as _e}from"../chunks/dom.js";import{useText as Y}from"@dropins/tools/i18n.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../fragments.js";import"../chunks/guards.js";import"../chunks/synchronizeCheckout.js";import"../chunks/transform-shipping-methods.js";import"../chunks/classifiers.js";import"../chunks/getCompanyCredit.js";const Ne=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M17.93 14.8V18.75H5.97C4.75 18.75 3.75 17.97 3.75 17V6.5M3.75 6.5C3.75 5.53 4.74 4.75 5.97 4.75H15.94V8.25H5.97C4.75 8.25 3.75 7.47 3.75 6.5Z",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M19.35 11.64H14.04V14.81H19.35V11.64Z",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M17.9304 11.64V8.25H15.1504",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})),Te=()=>D(ue,{"data-testid":"payment-methods-skeleton",children:[c(N,{size:"medium",variant:"heading"}),c(N,{size:"medium",variant:"empty"}),c(N,{fullWidth:!0,size:"xlarge"}),c(N,{fullWidth:!0,size:"xlarge"})]}),Ie=({UIComponentType:e="ToggleButton",busy:r,code:a,icon:i,onSelectionChange:o,selected:s,title:m})=>{const u={busy:r,className:"checkout-payment-methods__method",label:m,name:"payment-method",onChange:()=>o({code:a,title:m}),value:a};return e==="ToggleButton"?c(fe,{...u,icon:i?c(X,{source:i}):void 0,selected:s}):c(ye,{...u,checked:s,icon:i??void 0})},He=({className:e,error:r=null,busy:a=!1,onDismissError:i,onSelectionChange:o=()=>{},options:s,paymentMethodContent:m,selection:u,title:f,UIComponentType:S})=>{const v=Y({EmptyState:"Checkout.PaymentMethods.emptyState"}),d=r!==null,C=ke(null);return ge(()=>{d&&C.current&&_e(C.current)},[d]),D("div",{className:O(["checkout-payment-methods",e]),"data-testid":"checkout-payment-methods",children:[f&&c(me,{className:"checkout-payment-methods__title",node:f}),!a&&s.length===0&&c(pe,{"data-testid":"checkout-payment-methods-empty",icon:c(X,{source:Ne}),message:c("p",{children:v.EmptyState})}),D("div",{className:O(["checkout-payment-methods__wrapper",["checkout-payment-methods__wrapper--busy",a]]),"data-testid":"checkout-payment-methods-wrapper",children:[c("div",{className:O(["checkout-payment-methods__methods",["checkout-payment-methods--full-width",s.length%2!==0]]),children:s==null?void 0:s.map(y=>c(Ie,{UIComponentType:S,busy:a,code:y.code,icon:y.icon,selected:(u==null?void 0:u.code)===y.code,title:y.displayLabel??!0?y.title:"",onSelectionChange:o},y.code))}),m&&c("div",{className:"checkout-payment-methods__content",children:m})]}),d&&c("div",{ref:C,className:"checkout-payment-methods__error","data-testid":"checkout-payment-methods-alert",children:c(he,{heading:r,type:"error",variant:"primary",onDismiss:i})})]})},Oe=we(He,Te),Le=(e,r)=>{let a;return function(...i){clearTimeout(a),a=setTimeout(()=>e.apply(this,i),r)}};var Re=(e=>(e.PaymentOnAccount="companycredit",e.PurchaseOrder="purchaseorder",e))(Re||{});const J={companycredit:{Container:Ce,autoSync:!0,formName:"payment-on-account",validateRefNumber:!1},purchaseorder:{Container:ve,autoSync:!1,formName:"purchase-order",validateRefNumber:!0}},I=new Map,Ve=(e,r)=>{const a=`${e}-${r}`;if(!I.has(a)){const i=Le(async o=>{if(!r||le(o))try{await Q({code:e,purchase_order_number:o})}catch(s){console.error(`Failed to set payment method for ${e}:`,s)}},1e3);I.set(a,i)}return I.get(a)},w={},kt=()=>{Object.keys(w).forEach(e=>{delete w[e]}),I.clear()},K=e=>{if(!(e in J))throw new Error(`Invalid handler code: ${e}`);if(w[e])return w[e];const r=J[e],{autoSync:a,Container:i,formName:o,validateRefNumber:s}=r,m={enabled:!0,autoSync:a,render:u=>{var v;const f=String(((v=u.additionalData)==null?void 0:v.purchase_order_number)??""),S=document.createElement("div");Se.render(i,{name:o,initialReferenceNumber:f,onReferenceNumberChange:Ve(e,s)})(S),u.replaceHTML(S)}};return w[e]=m,m},Ae={companycredit:K("companycredit"),purchaseorder:K("purchaseorder")};function A(e,r){return e?r.some(a=>a.code===e.code):!1}function De(e,r){return!e||!r?!1:e.code===r.code}function We(e){return e?!!e.code&&!!e.title:!1}const gt=({UIComponentType:e="ToggleButton",active:r=!0,autoSync:a=!0,displayTitle:i=!0,slots:o,onCartSyncError:s,onSelectionChange:m})=>{const[u,f]=_(null),[S,v]=_(!1),[d,C]=_(null),[y,W]=_([]),ee=se.value,{cartSyncError:x,defaultTitle:z}=Y({cartSyncError:"Checkout.PaymentMethods.cartSyncError",defaultTitle:"Checkout.PaymentMethods.title"}),k=L(()=>{const t=(o==null?void 0:o.Methods)??{};return de(Ae,t)},[o==null?void 0:o.Methods]),U=p(t=>{var n;return(n=k[t.code])==null?void 0:n.render},[k]),B=p(t=>{const n=k[t.code];return n?n.autoSync!==!1:a},[a,k]),$=p(t=>{var l;return((l=k[t.code])==null?void 0:l.enabled)!==!1},[k]),te=p(t=>t.map(n=>{const l=k[n.code];return l?{...n,icon:l.icon}:n}),[k]),j=p(t=>{C(n=>n&&{...n,additionalData:t})},[]),ne=p(()=>{f(null)},[]),h=p(t=>{f(null),C(t)},[]),E=p(async(t,n)=>{(Me()||be())&&B(t)&&Q({code:t.code}).catch(g=>{h(n??null),f(s?null:x),s==null||s({method:t,error:g})})},[x,B,s,h]),re=p(async t=>{const n=V("selectedPaymentMethod");h(t),m==null||m(t),await E(t,n)},[m,h,E]),P=p(t=>{if(!t||t.isEmpty){h(null),W([]);return}const g=(t.availablePaymentMethods??[]).filter($);if(W(g),g.length===0){h(null);return}const M=t.selectedPaymentMethod??null,F=We(M),b=V("selectedPaymentMethod"),H=A(b,g),ce=De(b,M);if(b&&H&&!ce){E(b,M);return}if((!b||!H)&&F&&A(M,g)){h(M);return}if((!b||!H)&&(!F||!A(M,g))){const Z=g[0];h(Z),E(Z)}},[$,h,E]);R(()=>{if(!r)return;const t=Ee();if(t){v(!0);const l=V("selectedPaymentMethod");l&&C(l),P(t);return}const n=q.on("checkout/initialized",l=>{v(!0),P(l)},{eager:!0});return()=>{n==null||n.off()}},[r,P]),R(()=>{if(!r)return;const t=q.on("checkout/updated",P,{eager:!1});return()=>{t==null||t.off()}},[r,P]),R(()=>{Pe({selectedPaymentMethod:d})},[d]);const oe=L(()=>{if(i)return c(G,{name:"checkout-payment-methods-title",slot:o==null?void 0:o.Title,children:c("h2",{children:z})})},[i,o==null?void 0:o.Title,z]),ae=L(()=>{if(!d)return;const t=U(d);if(t)return c(G,{context:{additionalData:d.additionalData,cartId:ie.cartId??"",replaceHTML(n){this.replaceWith(n)},setAdditionalData:j},name:"PaymentMethodContent",slot:t},d.code)},[U,d,j]);return c(Oe,{UIComponentType:e,busy:ee,error:u,initialized:S,options:te(y),paymentMethodContent:ae,selection:d,title:oe,visible:r,onDismissError:ne,onSelectionChange:re})};export{Re as HandlerCode,gt as PaymentMethods,K as createHandler,gt as default,Ae as defaultHandlers,Ve as handleRefNumberChange,kt as resetHandlersCache};
4
4
  //# sourceMappingURL=PaymentMethods.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{P as d,P as l}from"../chunks/PaymentOnAccount2.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/preact-compat.js";import"../chunks/ConditionalWrapper.js";/* empty css */import"@dropins/tools/components.js";import"@dropins/tools/lib.js";import"@dropins/tools/i18n.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/signals.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/getCompanyCredit.js";export{d as PaymentOnAccount,l as default};
4
4
  //# sourceMappingURL=PaymentOnAccount.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsxs as R,jsx as s}from"@dropins/tools/preact-jsx-runtime.js";import{W as U}from"../chunks/ConditionalWrapper.js";/* empty css */import{Skeleton as W,SkeletonRow as E,Button as _}from"@dropins/tools/components.js";import{classes as q,Slot as B}from"@dropins/tools/lib.js";import{h as j,s as y,i as v}from"../chunks/fetch-graphql.js";import{c as w,E as P}from"../chunks/classifiers.js";import{events as u}from"@dropins/tools/event-bus.js";import{a as K}from"../chunks/events2.js";import{g}from"../chunks/values.js";import{useState as S,useCallback as m,useEffect as f}from"@dropins/tools/preact-hooks.js";import{useText as M}from"@dropins/tools/i18n.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";function Q(n){const r=w.find(o=>o.matches(n));return r?r.code:P.UNKNOWN_ERROR}const T=()=>R(W,{"data-testid":"place-order-skeleton",children:[s(E,{size:"small",variant:"empty"}),s(E,{size:"small"})]}),A=({children:n,className:r,disabled:o=!1,onClick:a})=>s("div",{className:q(["checkout-place-order",r]),children:s(_,{className:"checkout-place-order__button","data-testid":"place-order-button",disabled:o,size:"medium",type:"button",variant:"primary",onClick:a,children:n},"placeOrder")}),H=U(A,T),se=({disabled:n=!1,active:r=!0,handleValidation:o,handlePlaceOrder:a,slots:d,...b})=>{var O;const[x,p]=S(!1),[z,h]=S(!1),I=j.value,l=M({CheckoutUnexpectedError:"Checkout.ServerError.unexpected",placeOrderButton:"Checkout.PlaceOrder.button"}),k=m(e=>{const t=Q(e),i=t===P.UNKNOWN_ERROR?l.CheckoutUnexpectedError:e.message;u.emit("checkout/error",{message:i,code:t})},[l]),N=m(async()=>{var e;try{if(o&&!o())return;await a({cartId:y.cartId,quoteId:y.quoteId,code:((e=g("selectedPaymentMethod"))==null?void 0:e.code)??""})}catch(t){k(t)}},[o,a,k]),c=m(e=>{(!e||"isEmpty"in e&&e.isEmpty)&&h(!1)},[]);return f(()=>{if(r===!1)return;const e=u.on("cart/initialized",t=>{const i=(t==null?void 0:t.items)||[];h(i.some(C=>C.outOfStock||C.insufficientQuantity))},{eager:!0});return()=>{e==null||e.off()}},[r]),f(()=>{if(!r)return;const e=K();if(e){p(!0),c(e);return}const t=u.on("checkout/initialized",i=>{p(!0),c(i)},{eager:!0});return()=>{t==null||t.off()}},[r,c]),f(()=>{if(!r)return;const e=u.on("checkout/updated",t=>{c(t)},{eager:!1});return()=>{e==null||e.off()}},[r,c]),s(H,{...b,disabled:n||z||I||v.value,initialized:x,visible:r,onClick:N,children:s(B,{context:{code:((O=g("selectedPaymentMethod"))==null?void 0:O.code)??""},name:"Content",slot:d==null?void 0:d.Content,children:l.placeOrderButton})})};export{se as PlaceOrder,se as default};
4
4
  //# sourceMappingURL=PlaceOrder.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{P as b,P as g}from"../chunks/PurchaseOrder.js";import"@dropins/tools/preact-jsx-runtime.js";import"../chunks/TermsAndConditions.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";/* empty css */import"../chunks/fetch-graphql.js";import"@dropins/tools/signals.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/validation.js";import"@dropins/tools/preact-compat.js";/* empty css *//* empty css */import"@dropins/tools/i18n.js";/* empty css */import"@dropins/tools/preact-hooks.js";export{b as PurchaseOrder,g as default};
4
4
  //# sourceMappingURL=PurchaseOrder.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as o,jsxs as f}from"@dropins/tools/preact-jsx-runtime.js";import"../chunks/TermsAndConditions.js";import{classes as i}from"@dropins/tools/lib.js";import{IllustratedMessage as h,Icon as d,Button as v}from"@dropins/tools/components.js";/* empty css */import"../chunks/fetch-graphql.js";import{events as g}from"@dropins/tools/event-bus.js";import{s as k}from"../chunks/dom.js";import"@dropins/tools/preact-compat.js";/* empty css *//* empty css */import{S}from"../chunks/OrderError.js";import{useText as C}from"@dropins/tools/i18n.js";/* empty css */import{useState as E,useRef as _,useEffect as l}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";const b=({className:n,contactSupport:s,errorMessage:t,onClick:a,errorMessageRef:r})=>{const e=C({Title:"Checkout.ServerError.title",Message:"Checkout.ServerError.message",ContactSupport:"Checkout.ServerError.contactSupport",Button:"Checkout.ServerError.button"}),c=t!==""?t:e.Title;return o(h,{action:o(v,{className:i(["checkout-server-error__button"]),name:"server-error-button",onClick:a,children:e.Button}),"aria-describedby":"checkout-server-error__message","aria-invalid":"true","aria-live":"polite",className:i(["checkout-server-error",n]),"data-testid":"checkout-server-error",heading:c,icon:o(d,{className:i(["checkout-server-error__icon"]),source:S}),message:f("p",{ref:r,"data-testid":"checkout-server-error-message",id:i(["checkout-server-error__message"]),children:[e.Message,o("br",{}),o("span",{children:s??e.ContactSupport})]})})},J=({active:n=!0,onRetry:s,onServerError:t,autoScroll:a=!1})=>{const[r,e]=E(null),c=_(null),p=async()=>{s==null||s(r),e(null)};return l(()=>{const u=g.on("checkout/error",m=>{e(m||null),m&&t&&t(m.message)},{eager:!0});return()=>{u==null||u.off()}},[t]),l(()=>{!a||!r||!c.current||k(c.current)},[r,a]),!n||!r?null:o(b,{errorMessage:r.message,errorMessageRef:c,onClick:p})};export{J as ServerError,J as default};
4
4
  //# sourceMappingURL=ServerError.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsxs as A,jsx as r,Fragment as K}from"@dropins/tools/preact-jsx-runtime.js";import{h as pe,n as de,o as X}from"../chunks/fetch-graphql.js";import{classes as D,VComponent as he,Slot as me}from"@dropins/tools/lib.js";import{t as fe}from"../chunks/transform-shipping-estimate.js";import{h as I,a as ge}from"../chunks/events2.js";import{n as ke,g as N}from"../chunks/values.js";import{events as B}from"@dropins/tools/event-bus.js";import{c as Y}from"../chunks/synchronizeCheckout.js";import{s as ve}from"../chunks/setShippingMethods.js";import{W as Se}from"../chunks/ConditionalWrapper.js";/* empty css */import{Skeleton as Ee,SkeletonRow as T,IllustratedMessage as Ce,Icon as Le,InLineAlert as Me,RadioButton as ye,Price as ee,ToggleButton as _e}from"@dropins/tools/components.js";import{s as We}from"../chunks/dom.js";import{useRef as ne,useEffect as R,useState as V,useCallback as p,useMemo as te}from"@dropins/tools/preact-hooks.js";import*as a from"@dropins/tools/preact-compat.js";import{useText as re}from"@dropins/tools/i18n.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../fragments.js";import"../chunks/transform-shipping-methods.js";import"../chunks/classifiers.js";import"../chunks/guards.js";const je=i=>a.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i},a.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M2.47266 4.90002H15.1851V10.9645H21.2495L23 12.715V17.6124H20.073",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M15.1758 5.87573H19.0019L21.0394 10.7636",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M9.76151 16.7898C9.76151 18.0525 8.72845 19.076 7.46582 19.076C6.20318 19.076 5.17969 18.0429 5.17969 16.7803C5.17969 15.5176 6.20318 14.4941 7.46582 14.4941C8.72845 14.4941 9.75195 15.5176 9.76151 16.7803C9.76151 16.7803 9.76151 16.7803 9.76151 16.7898Z",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M19.8726 16.7898C19.8726 18.062 18.8491 19.0855 17.5769 19.0855C16.3047 19.0855 15.2812 18.062 15.2812 16.7898C15.2812 15.5176 16.3047 14.4941 17.5769 14.4941C18.8491 14.4941 19.8726 15.5176 19.8726 16.7898Z",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M8.08792 7.63574H1.69824",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M7.11229 10.3619H1",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M5.16084 13.0402H1.92773",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M9.76172 16.7611H15.2809",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M2.38672 16.7611H5.17025",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})),Be=()=>A(Ee,{"data-testid":"shipping-methods-skeleton",children:[r(T,{size:"small",variant:"heading"}),r(T,{size:"small",variant:"empty"}),r(T,{fullWidth:!0,size:"medium"}),r(T,{fullWidth:!0,size:"medium"})]}),Oe=({className:i,busy:n=!1,onSelectionChange:g=()=>{},options:v,selection:d,title:l,UIComponentType:u="RadioButton",error:h=null,onDismissError:b=()=>{},...U})=>{const S=re({EmptyState:"Checkout.ShippingMethods.emptyState"}),E=h!==null,C=ne(null);R(()=>{E&&C.current&&We(C.current)},[E]);const L=(o,x)=>{const M={busy:n,className:"checkout-shipping-methods__method",key:o.value,name:"shipping-method",value:o.value,onChange:()=>g(o)};return x==="RadioButton"?r(ye,{...M,checked:(d==null?void 0:d.value)===o.value,"data-testid":"shipping-method-radioButton",description:o.title,disabled:n,id:o.value,label:A(K,{children:[r(ee,{amount:o.amount.value,currency:o.amount.currency})," ",r("span",{children:o.carrier.title})]})}):r(_e,{...M,"data-testid":"shipping-method-toggleButton",label:A(K,{children:[r("span",{children:o.carrier.title}),r(ee,{amount:o.amount.value,currency:o.amount.currency})]}),selected:(d==null?void 0:d.value)===o.value})};return A("div",{...U,className:D(["checkout-shipping-methods",i]),"data-testid":"checkout-shipping-methods",children:[l&&r(he,{className:"checkout-shipping-methods__title",node:l}),r("div",{className:D(["checkout-shipping-methods__content"]),children:r("div",{className:D(["checkout-shipping-methods__options",["checkout-shipping-methods__options--busy",n],["checkout-shipping-methods__options--toggleButton",u==="ToggleButton"]]),"data-testid":"checkout-shipping-methods-options",children:v.length===0?r(Ce,{"data-testid":"checkout-shipping-methods-empty",icon:r(Le,{source:je}),message:r("p",{children:S.EmptyState})}):v.map(o=>L(o,u))})}),E&&r("div",{ref:C,className:"checkout-shipping-methods__error","data-testid":"checkout-shipping-methods-alert",children:r(Me,{heading:h,type:"error",variant:"primary",onDismiss:b})})]})},we=Se(Oe,Be);function P(i,n){return i?n.some(g=>Q(g,i)):!1}function Q(i,n){return!i||!n||i.amount.value!==n.amount.value?!1:i.code===n.code&&i.carrier.code===n.carrier.code}function He(i){const n=B.lastPayload("shipping/estimate");n&&B.emit("shipping/estimate",{...n,shippingMethod:fe(i)})}const Ye=({UIComponentType:i="RadioButton",active:n=!0,autoSync:g=!0,displayTitle:v=!0,initialData:d,slots:l,onCartSyncError:u,onSelectionChange:h,...b})=>{const[U,S]=V(null),[E,C]=V(!1),[L,o]=V(),[x,M]=V(null),O=ne(null),oe=pe.value,ie=de.value,{cartSyncError:Z,defaultTitle:q}=re({cartSyncError:"Checkout.ShippingMethods.cartSyncError",defaultTitle:"Checkout.ShippingMethods.title"}),w=p(e=>{if(!e||e.length===0)return[];const{shipping:t}=Y.getConfig();return t!=null&&t.filterOptions?e.filter(t.filterOptions):e},[]),F=p(e=>{if(e.length===0)return null;const{defaults:t}=Y.getConfig();return t.selectedShippingMethod(e)},[]),se=te(()=>w(L),[L,w]),ce=p(()=>{S(null)},[]),c=p(e=>{S(null),M(t=>Q(t,e)?t:(ke({selectedShippingMethod:e}),e))},[]),y=p(async(e,t)=>{if(!g||!I())return;const s={carrierCode:e.carrier.code,methodCode:e.code};ve([s]).catch(m=>{c(t??null),u==null||u({method:e,error:m}),u||S(Z)})},[g,c,u,Z]),ae=p(async e=>{const t=N("selectedShippingMethod");c(e),h==null||h(e),I()||He(e),await y(e,t)},[h,c,y]),_=p(e=>{var J;const t=!e||e.isEmpty,s=!!(e!=null&&e.isVirtual);if(t||s){C(s),c(null),o([]);return}const m=(J=e.shippingAddresses)==null?void 0:J[0];if(!m)return;const W=m.availableShippingMethods??[];X()&&!O.current&&(O.current=W);const G=X()&&O.current?O.current:W;o(G);const j=w(G);if(j.length===0){c(null);return}const f=m.selectedShippingMethod??null,k=N("selectedShippingMethod"),z=P(k,j),ue=Q(k,f);if(k&&z&&!ue){y(k,f);return}if((!k||!z)&&f&&P(f,j)){c(f);return}if((!k||!z)&&(!f||!P(f,j))){const H=F(j);c(H),H&&y(H)}},[w,F,c,y]),$=p(e=>{if(e===void 0)return;const{shippingMethod:t,availableShippingMethods:s}=e,m=(s==null?void 0:s.find(W=>W.code===(t==null?void 0:t.methodCode)&&W.carrier.code===(t==null?void 0:t.carrierCode)))??null;o(s),c(m)},[c]);R(()=>{if(!n)return;const e=ge();if(e){const s=N("selectedShippingMethod");s&&M(s),_(e);return}const t=B.on("checkout/initialized",_,{eager:!0});return()=>{t==null||t.off()}},[n,_]),R(()=>{if(!n)return;const e=B.on("checkout/updated",_,{eager:!1});return()=>{e==null||e.off()}},[n,_]),R(()=>{if(!n||I())return;const e=B.on("shipping/estimate",$,{eager:!0});return()=>{e==null||e.off()}},[n,$]);const le=te(()=>{if(v)return r(me,{name:"checkout-shipping-methods-title",slot:l==null?void 0:l.Title,children:r("h3",{children:q})})},[v,l==null?void 0:l.Title,q]);return r(we,{...b,UIComponentType:i,busy:oe||ie,error:U,initialized:L!==void 0,options:se,selection:x,title:le,visible:n&&!E,onDismissError:ce,onSelectionChange:ae})};export{Ye as ShippingMethods,Ye as default,He as emitShippingEstimateEvent};
4
4
  //# sourceMappingURL=ShippingMethods.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as e,jsxs as M}from"@dropins/tools/preact-jsx-runtime.js";import{p as v}from"../chunks/TermsAndConditions.js";import{classes as f,VComponent as S,Slot as b}from"@dropins/tools/lib.js";import{Skeleton as N,SkeletonRow as U,Checkbox as w}from"@dropins/tools/components.js";/* empty css */import{s as E}from"../chunks/fetch-graphql.js";import{A as V}from"../chunks/checkout.js";import{events as W}from"@dropins/tools/event-bus.js";import{a as j}from"../chunks/events2.js";import"@dropins/tools/preact-compat.js";/* empty css *//* empty css *//* empty css */import{useState as g,useEffect as y}from"@dropins/tools/preact-hooks.js";import{W as D}from"../chunks/ConditionalWrapper.js";import{useText as H,MarkupText as L}from"@dropins/tools/i18n.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";const P=({html:n})=>{const t=v.sanitize(n,{ADD_ATTR:["target"]});return t===""?null:e("span",{dangerouslySetInnerHTML:{__html:t}})},R=()=>e(N,{className:"checkout-terms-and-conditions-skeleton","data-testid":"checkout-terms-and-conditions-skeleton",children:e(U,{fullWidth:!0,size:"small",variant:"row"})}),$=({className:n,agreements:t,error:r,...s})=>e("div",{className:"checkout-terms-and-conditions","data-testid":"checkout-terms-and-conditions",children:M("form",{...s,noValidate:!0,className:f(["checkout-terms-and-conditions__form",n]),"data-testid":"checkout-terms-and-conditions-form",name:"checkout-terms-and-conditions__form",children:[t&&e(S,{className:f(["checkout-terms-and-conditions__agreements"]),"data-testid":"checkout-terms-and-conditions-agreements",node:t}),r&&e("div",{className:"checkout-terms-and-conditions__error","data-testid":"checkout-terms-and-conditions-error",children:r})]})}),q=D($,R),de=({active:n=!0,slots:t,...r})=>{var c;const[s,d]=g(!1),[k,m]=g(""),{errorMessage:_}=H({errorMessage:"Checkout.TermsAndConditions.error"}),i=((c=E.config)==null?void 0:c.agreementsEnabled)===!1,A=()=>{m("")},C=()=>{m(_)};return y(()=>{if(!n||i)return;if(j()){d(!0);return}const o=W.on("checkout/initialized",()=>{d(!0)},{eager:!0});return()=>{o==null||o.off()}},[n,i]),e(q,{...r,agreements:e(b,{context:{appendAgreement(l){this._registerMethod((...o)=>{const u=l(...o);if(!u)return;const{mode:T,name:p,text:a,translationId:h}=u;if(!a&&!h){console.warn(`The agreement ${p} is misconfigured. Please provide a text or a translationId.`);return}const x=a?e(P,{html:a}):e(L,{id:h}),z=e(w,{checked:T===V.AUTO,label:x,name:p,required:!0,onChange:A,onInvalid:C});this._setProps(I=>({children:[...I.children||[],z]}))})}},name:"Agreements",slot:t==null?void 0:t.Agreements}),error:k,initialized:s,visible:n&&!i})};export{de as TermsAndConditions,de as default};
4
4
  //# sourceMappingURL=TermsAndConditions.js.map
package/fragments.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  const e=`
4
4
  fragment AVAILABLE_SHIPPING_METHOD_FRAGMENT on AvailableShippingMethod {
package/lib/utils.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{i as l}from"../chunks/fetch-graphql.js";import{s as C,e as d}from"../chunks/setShippingAddress.js";import{debounce as g}from"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";import{s as A}from"../chunks/setBillingAddress.js";import{b as H,c as J,g as K,a as L,i as Q}from"../chunks/events.js";import{a as y}from"../chunks/dom.js";import{g as X,s as Y}from"../chunks/dom.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/transform-shipping-estimate.js";import"../chunks/transform-shipping-methods.js";import"../chunks/values.js";import"../chunks/synchronizeCheckout.js";import"../fragments.js";import"../chunks/classifiers.js";import"../chunks/guards.js";import"../chunks/events2.js";let m=0;function R({type:e="shipping",debounceMs:t=0}){const i=e==="shipping"?C:A,r=g(o=>{m+=1,i(o).catch(console.error).finally(()=>{m-=1,m===0&&(l.value=!1)})},t);return({data:o,isDataValid:s})=>{if(!s)return;l.value=!0;const n=I(o);r(n)}}function _({debounceMs:e=0}){let t={},i=!1;const r=g(o=>{var n,c,p,f;if(i)return;const s={country_code:o.countryCode,region_name:String(((n=o.region)==null?void 0:n.regionCode)||""),region_id:String(((c=o.region)==null?void 0:c.regionId)||""),zip:o.postcode};d({criteria:s}),t={countryCode:o.countryCode,regionCode:((p=o.region)==null?void 0:p.regionCode)||"",regionId:((f=o.region)==null?void 0:f.regionId)||"",postcode:o.postcode}},e);return({data:o,isDataValid:s})=>{var n,c;if(s){i=!0;return}t.countryCode===o.countryCode&&t.regionCode===(((n=o.region)==null?void 0:n.regionCode)||"")&&t.regionId===(((c=o.region)==null?void 0:c.regionId)||"")&&t.postcode===o.postcode||r(o)}}function h(e,t=!1){var n;const{name:i,ref:r}=e,o=document.forms.namedItem(i);if(!o||o.offsetParent===null)return!0;o.setAttribute("novalidate","");const s=((n=r==null?void 0:r.current)==null?void 0:n.handleValidationSubmit(!1))??o.checkValidity();return!s&&t&&y(o),s}function D(e){for(const t of e)if(!h(t,!0))return!1;return!0}function $(e){return document.createRange().createContextualFragment(e)}function z(e){return function(t){return e.querySelector(t)}}function u(e,t,i){if(!e||!i)return;const r=document.head.querySelector(`meta[${i}="${e}"]`);if(!t){r==null||r.remove();return}if(r)r.setAttribute("content",t);else{const o=document.createElement("meta");o.setAttribute(i,e),o.setAttribute("content",t),document.head.appendChild(o)}}function O(e){u("title",e,"name"),u("description",e,"name"),u("keywords",e,"name"),u("og:description",e,"property"),u("og:title",e,"property"),u("og:url",window.location.href,"property")}const I=e=>{var r,o,s;if(!(!(e!=null&&e.id)&&!(e!=null&&e.uid)))return{customerAddressId:e.id,customerAddressUid:e.uid};const i=(r=e.customAttributes)==null?void 0:r.map(({code:n,value:c})=>({code:n,value:String(c)}));return{address:{city:e.city,company:e==null?void 0:e.company,countryCode:e.countryCode,customAttributes:i,fax:e.fax,firstName:e.firstName,lastName:e.lastName,middleName:e.middleName,postcode:e.postcode,prefix:e.prefix,region:(o=e==null?void 0:e.region)==null?void 0:o.regionCode,regionId:(s=e==null?void 0:e.region)==null?void 0:s.regionId,street:e.street,suffix:e.suffix,telephone:e.telephone,vatId:e.vatId,saveInAddressBook:e.saveAddressBook}}},U=e=>{var t,i,r;return{city:e.city,company:e==null?void 0:e.company,countryCode:(t=e.country)==null?void 0:t.code,customAttributes:e.customAttributes,fax:e.fax,firstName:e.firstName,lastName:e.lastName,middleName:e.middleName,postcode:e.postCode,prefix:e.prefix,region:{regionCode:(i=e.region)==null?void 0:i.code,regionId:(r=e.region)==null?void 0:r.id},street:e.street,suffix:e.suffix,telephone:e.telephone,vatId:e.vatId}};export{$ as createFragment,u as createMetaTag,z as createScopedSelector,_ as estimateShippingCost,H as getCartAddress,J as getCartPaymentMethod,K as getCartShippingMethod,X as getParentContainer,L as isEmptyCart,Q as isVirtualCart,Y as scrollToElement,y as scrollToParentContainer,R as setAddressOnCart,O as setMetaTags,I as transformAddressFormValuesToAddressInput,U as transformCartAddressToFormValues,h as validateForm,D as validateForms};
4
4
  //# sourceMappingURL=utils.js.map
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name": "@dropins/storefront-checkout", "version": "3.0.0-beta4", "@dropins/tools": "^1.6.0-beta3", "license": "SEE LICENSE IN LICENSE.md"}
1
+ {"name": "@dropins/storefront-checkout", "version": "3.0.0", "@dropins/tools": "1.6.0", "license": "SEE LICENSE IN LICENSE.md"}
package/render.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  (function(n,o){try{if(typeof document<"u"){const t=document.createElement("style"),r=o.styleId;for(const e in o.attributes)t.setAttribute(e,o.attributes[e]);t.setAttribute("data-dropin",r),t.appendChild(document.createTextNode(n));const a=document.querySelector('style[data-dropin="sdk"]');if(a)a.after(t);else{const e=document.querySelector('link[rel="stylesheet"], style');e?e.before(t):document.head.append(t)}}}catch(t){console.error("dropin-styles (injectCodeFunction)",t)}})(`.checkout__banner{margin-bottom:var(--spacing-xbig)}
4
4
  .checkout-shipping-methods__title,.checkout-shipping-methods__title h3{color:var(--color-neutral-800);font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing);margin:0 0 var(--spacing-medium) 0}.checkout-shipping-methods__content{position:relative;display:block}.checkout-shipping-methods__method{margin-bottom:var(--spacing-medium);width:fit-content;cursor:pointer;font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing)}.checkout-shipping-methods__method:last-child{margin-bottom:0}.dropin-radio-button__label .dropin-price{color:var(--color-neutral-800);font-weight:400}.checkout-shipping-methods__options--busy{opacity:.4;pointer-events:none}.checkout-shipping-methods__spinner{margin:0 auto;position:absolute;z-index:999;left:0;right:0;top:calc(50% - (var(--size) / 2));bottom:0}.checkout-shipping-methods__options--toggleButton{display:grid;grid-template-columns:1fr 1fr;gap:var(--spacing-medium)}.checkout-shipping-methods__options--toggleButton .dropin-toggle-button__content{justify-content:start;display:grid;grid-template-columns:1fr min-content}.checkout-shipping-methods__options--toggleButton .checkout-shipping-methods__method{margin-bottom:0;width:auto}.checkout-shipping-methods__error{margin-top:var(--spacing-medium)}