From d17c3ee3e6c5cf4de361aa67e60606ca48f85206 Mon Sep 17 00:00:00 2001 From: Konstantin Fandelyuk Date: Thu, 12 Dec 2024 10:50:45 +0200 Subject: [PATCH] updated input date 2 --- scripts/__dropins__/tools/components.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/__dropins__/tools/components.js b/scripts/__dropins__/tools/components.js index 6d8681495..10a678095 100644 --- a/scripts/__dropins__/tools/components.js +++ b/scripts/__dropins__/tools/components.js @@ -1,3 +1,3 @@ /*! Copyright 2024 Adobe All Rights Reserved. */ -import{jsx as e}from"./preact-jsx-runtime.js";import{d as Z,c as s,R as be,a as se,V as y,b as fe,g as ve,i as Ne}from"./chunks/deviceUtils.js";import{G as ge,T as q,k as B,F as N,L as we,h as A,q as T,S as K,A as X,y as W,_ as ke,N as le,E as ye,x as Ie}from"./chunks/icons/Add.js";import{IntlProvider as xe,Localizer as ee,Text as z,useText as D}from"./i18n.js";import U from"./chunks/icons/Minus.js";import De from"./chunks/icons/CheckWithCircle.js";import Ee from"./chunks/icons/WarningWithCircle.js";import $e from"./chunks/icons/Date.js";import Se from"./chunks/icons/Locker.js";import Te from"./chunks/icons/Eye.js";import Le from"./chunks/icons/EyeClose.js";import de from"./chunks/icons/Check.js";import j from"./chunks/icons/Close.js";import J from"./chunks/icons/ChevronDown.js";import Oe from"./chunks/icons/Trash.js";import"./chunks/image-params-keymap.js";import"./signals.js";const Pe={ExampleComponentName:{item:{label:"string"}},Pagination:{backwardButton:{ariaLabel:"Go to previous page"},forwardButton:{ariaLabel:"Go to next page"}},Incrementer:{decreaseLabel:"Decrease Quantity",increaseLabel:"Increase Quantity",label:"Quantity",errorMessage:"Enter a valid quantity",minQuantityMessage:"Enter at least {{minQuantity}}",maxQuantityMessage:"Maximum quantity is {{maxQuantity}}"},Modal:{Close:{label:"Close"}},InputPassword:{placeholder:"Password",floatingLabel:"Password",buttonShowTitle:"Click to show password",buttonHideTitle:"Click to hide password"},PasswordStatusIndicator:{chartTwoSymbols:"Use characters and numbers or symbols",chartThreeSymbols:"Use characters, numbers and symbols",chartFourSymbols:"Use uppercase characters, lowercase characters, numbers and symbols",messageLengthPassword:"At least {minLength} characters long"},InlineAlert:{dismissLabel:"Dismiss Alert"},PriceSummary:{subTotal:{label:"Subtotal",withTaxes:"Including taxes",withoutTaxes:"excluding taxes"},shipping:{label:"Shipping",editZipAction:"Apply",estimated:"Estimated Shipping",estimatedDestination:"Estimated Shipping to ",destinationLinkAriaLabel:"Change destination",zipPlaceholder:"Zip Code",withTaxes:"Including taxes",withoutTaxes:"excluding taxes",alternateField:{zip:"Estimate using country/zip",state:"Estimate using country/state"}},taxes:{total:"Tax Total",totalOnly:"Tax",breakdown:"Taxes",showBreakdown:"Show Tax Breakdown",hideBreakdown:"Hide Tax Breakdown",estimated:"Estimated Tax"},total:{estimated:"Estimated Total",label:"Total",withoutTax:"Total excluding taxes"}},ProgressSpinner:{updating:{label:"Item is updating"},updatingChildren:{label:"Items are updating"}},PriceRange:{from:{label:"From"},to:{label:"to"},asLowAs:{label:"As low as"}},Swatches:{outOfStock:{label:"out of stock swatch"},selected:{label:"swatch selected"},swatch:{label:"swatch"}},Accordion:{open:{label:"Open"},close:{label:"Close"}},CartItem:{each:{label:"each"},pricePerItem:{label:"price per item"},quantity:{label:"Quantity"},remove:{label:"Remove {product} from the cart"},removeDefault:{label:"Remove item from the cart"},taxIncluded:{label:"incl. VAT"},taxExcluded:{label:"excl. tax"},updating:{label:"{product} is updating"}},InputDate:{picker:"Select a date"}},te={Dropin:Pe},re={default:te,en_US:te},Ce=a=>Z(re.default,re[a]||{}),ne=1,H=({className:a,fullWidth:r=!1,lines:n=ne,size:t="small",variant:o="row",children:i=null,multilineGap:l="medium",...d})=>{const _=[[`dropin-skeleton-row__${o}`,o],[`dropin-skeleton-row__${o}-${t}`,o&&t]];if(!i&&o==="empty")return e("div",{className:s(["dropin-skeleton-row dropin-skeleton-row__empty",a])});if(i){const h=i.trim();return e("div",{...d,class:s(["dropin-skeleton-row",["dropin-skeleton-row--full",r],a]),dangerouslySetInnerHTML:{__html:h}})}return n>ne===!1?e("div",{...d,class:s(["dropin-skeleton-row",["dropin-skeleton-row--full",r],"dropin-skeleton--row__content",..._,a])}):e("div",{...d,style:{"--multiline-gap-spacing":`var(--spacing-${l})`},class:s(["dropin-skeleton-row--multiline",["dropin-skeleton-row--full",r],a]),children:Array.from({length:n}).map((h,p)=>e("div",{class:s(["dropin-skeleton-row",["dropin-skeleton-row--full",r],"dropin-skeleton--row__content",..._])},p))})},Ae=({className:a,children:r,rowGap:n="medium",...t})=>e("div",{style:{"--row-gap-spacing":`var(--spacing-${n})`},...t,className:s(["dropin-skeleton",a]),role:"status","aria-label":"Loading...",children:r}),ce=ge({locale:"en-US"}),Ve=({lang:a="en_US",langDefinitions:r={},children:n})=>{const t=q(()=>{const i=Z(r.default,r[a]??{});return Z(Ce(a),i)},[a,r]),o=a.replace("_","-");return e(ce.Provider,{value:{locale:o},children:e(xe,{definition:t,children:e(B,{children:n})})})},ht=new be(e(Ve,{})),Re=function(){const r=typeof document<"u"&&document.createElement("link").relList;return r&&r.supports&&r.supports("modulepreload")?"modulepreload":"preload"}(),Be=function(a){return"/"+a},ie={},g=function(r,n,t){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));o=Promise.all(n.map(d=>{if(d=Be(d),d in ie)return;ie[d]=!0;const _=d.endsWith(".css"),m=_?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${m}`))return;const h=document.createElement("link");if(h.rel=_?"stylesheet":Re,_||(h.as="script",h.crossOrigin=""),h.href=d,l&&h.setAttribute("nonce",l),document.head.appendChild(h),_)return new Promise((p,c)=>{h.addEventListener("load",p),h.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${d}`)))})}))}return o.then(()=>r()).catch(i=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i})},Fe={Add:N(()=>g(()=>import("./chunks/icons/Add.js").then(a=>a.$),[])),Bulk:N(()=>g(()=>import("./chunks/icons/Bulk.js"),[])),Burger:N(()=>g(()=>import("./chunks/icons/Burger.js"),[])),Cart:N(()=>g(()=>import("./chunks/icons/Cart.js"),[])),Check:N(()=>g(()=>import("./chunks/icons/Check.js"),[])),ChevronDown:N(()=>g(()=>import("./chunks/icons/ChevronDown.js"),[])),ChevronUp:N(()=>g(()=>import("./chunks/icons/ChevronUp.js"),[])),ChevronRight:N(()=>g(()=>import("./chunks/icons/ChevronRight.js"),[])),Close:N(()=>g(()=>import("./chunks/icons/Close.js"),[])),Heart:N(()=>g(()=>import("./chunks/icons/Heart.js"),[])),Minus:N(()=>g(()=>import("./chunks/icons/Minus.js"),[])),Placeholder:N(()=>g(()=>import("./chunks/icons/Placeholder.js"),[])),PlaceholderFilled:N(()=>g(()=>import("./chunks/icons/PlaceholderFilled.js"),[])),Search:N(()=>g(()=>import("./chunks/icons/Search.js"),[])),SearchFilled:N(()=>g(()=>import("./chunks/icons/SearchFilled.js"),[])),Sort:N(()=>g(()=>import("./chunks/icons/Sort.js"),[])),Star:N(()=>g(()=>import("./chunks/icons/Star.js"),[])),View:N(()=>g(()=>import("./chunks/icons/View.js"),[])),User:N(()=>g(()=>import("./chunks/icons/User.js"),[])),Warning:N(()=>g(()=>import("./chunks/icons/Warning.js"),[])),Locker:N(()=>g(()=>import("./chunks/icons/Locker.js"),[])),Wallet:N(()=>g(()=>import("./chunks/icons/Wallet.js"),[])),Card:N(()=>g(()=>import("./chunks/icons/Card.js"),[])),Order:N(()=>g(()=>import("./chunks/icons/Order.js"),[])),Delivery:N(()=>g(()=>import("./chunks/icons/Delivery.js"),[])),OrderError:N(()=>g(()=>import("./chunks/icons/OrderError.js"),[])),OrderSuccess:N(()=>g(()=>import("./chunks/icons/OrderSuccess.js"),[])),PaymentError:N(()=>g(()=>import("./chunks/icons/PaymentError.js"),[])),CheckWithCircle:N(()=>g(()=>import("./chunks/icons/CheckWithCircle.js"),[])),WarningWithCircle:N(()=>g(()=>import("./chunks/icons/WarningWithCircle.js"),[])),WarningFilled:N(()=>g(()=>import("./chunks/icons/WarningFilled.js"),[])),InfoFilled:N(()=>g(()=>import("./chunks/icons/InfoFilled.js"),[])),HeartFilled:N(()=>g(()=>import("./chunks/icons/HeartFilled.js"),[])),Trash:N(()=>g(()=>import("./chunks/icons/Trash.js"),[])),Eye:N(()=>g(()=>import("./chunks/icons/Eye.js"),[])),EyeClose:N(()=>g(()=>import("./chunks/icons/EyeClose.js"),[])),Date:N(()=>g(()=>import("./chunks/icons/Date.js"),[])),AddressBook:N(()=>g(()=>import("./chunks/icons/AddressBook.js"),[])),EmptyBox:N(()=>g(()=>import("./chunks/icons/EmptyBox.js"),[])),Coupon:N(()=>g(()=>import("./chunks/icons/Coupon.js"),[]))};function L({source:a,size:r="24",stroke:n="2",viewBox:t="0 0 24 24",className:o,...i}){const l=typeof a=="string"?Fe[a]:null,d={className:s(["dropin-icon",`dropin-icon--shape-stroke-${n}`,o]),width:r,height:r,viewBox:t};return e(we,{fallback:e("svg",{...i,...d}),children:l?e(l,{...i,...d}):e(a,{...i,...d})})}const He=({name:a,value:r="1",className:n,disabled:t,error:o,success:i,min:l,max:d,onValue:_,onUpdateError:m,size:h="medium",...p})=>{const[c,u]=A(Number(r)),f=Number(l),b=Number(d),v=o||cb,w=cb?"Dropin.Incrementer.maxQuantityMessage":"Dropin.Incrementer.errorMessage",I=T(se(async $=>{if(_)try{_($)}catch(k){m&&m(k)}},200),[_,m]),E=$=>{let k=$;I(k),u(k)};return e("div",{className:s(["dropin-incrementer",`dropin-incrementer--${h}`,n]),children:[e("div",{className:s(["dropin-incrementer__content",`dropin-incrementer__content--${h}`,["dropin-incrementer__content--error",v],["dropin-incrementer__content--success",i],["dropin-incrementer__content--disabled",t]]),children:[e("div",{className:s(["dropin-incrementer__button-container",["dropin-incrementer__button-container--disabled",t]]),children:e(ee,{children:e("button",{type:"button",className:s(["dropin-incrementer__decrease-button",["dropin-incrementer__decrease-button--disabled",t]]),onClick:()=>E(c-1),disabled:t||c{E(Number(c))},onChange:$=>{const k=$.currentTarget.value;k!==""&&E(Number(k))},...p}),e("div",{className:s(["dropin-incrementer__button-container",["dropin-incrementer__button-container--disabled",t]]),children:e(ee,{children:e("button",{type:"button",className:s(["dropin-incrementer__increase-button",["dropin-incrementer__increase-button--disabled",t]]),onClick:()=>E(c+1),disabled:t||c>b-1,"aria-label":e(z,{id:"Dropin.Incrementer.increaseLabel"}),children:e(L,{source:K,size:"16",stroke:"1",viewBox:"4 2 20 20",className:"dropin-incrementer__add"})})})})]}),v&&e("p",{className:"dropin-incrementer__content--error-message",children:e(z,{id:w,fields:{minQuantity:l,maxQuantity:d}})})]})},pe=({name:a,value:r,variant:n="primary",className:t,disabled:o,error:i,floatingLabel:l,onValue:d,onUpdateError:_,size:m="medium",icon:h,maxLength:p,success:c,...u})=>{const f=(u==null?void 0:u.id)||a||`dropin-input-${Math.random().toString(36)}`,b=T(se(async w=>{if(d)try{await d(w)}catch(I){_&&_(I)}},200),[d,_]),v=w=>{const I=w.target;b(I.value.trim())};return e("div",{className:s(["dropin-input-container",`dropin-input-container--${n}`,["dropin-input-container--floating",!!l],["dropin-input-container--disabled",o]]),children:[h&&e(y,{node:h,className:s(["dropin-input__field-icon--left",h.props.className])}),e("div",{className:"dropin-input-label-container",children:[e("input",{id:f,onChange:v,type:"text",maxLength:p,name:a,value:r,...u,className:s(["dropin-input",`dropin-input--${m}`,`dropin-input--${n}`,["dropin-input--error",!!i],["dropin-input--success",!!c],["dropin-input--disabled",o],["dropin-input--floating",!!l],["dropin-input--icon-left",!!h],t]),disabled:o}),l&&e("label",{htmlFor:f,className:s([["dropin-input__label--floating",!!l],["dropin-input__label--floating--icon-left",!!h],["dropin-input__label--floating--error",!!i]]),children:l})]}),i&&e("div",{className:s(["dropin-input__field-icon--right","dropin-input__field-icon--error"]),children:e(L,{source:Ee,size:"16",stroke:"2",className:"dropin-input--warning-icon",viewBox:"-1 -1 26 26"})}),c&&e("div",{className:s(["dropin-input__field-icon--right","dropin-input__field-icon--success"]),children:e(L,{source:De,size:"16",stroke:"2",className:"dropin-input--success-icon",viewBox:"-1 -1 26 26"})})]})},bt=({name:a="",error:r,value:n,label:t,onChange:o,onBlur:i,...l})=>{const[d,_]=A((n==null?void 0:n.toString())??""),m=X(null),h=D({picker:"Dropin.InputDate.picker"}),p=T(b=>{b.currentTarget.setAttribute("type","date"),window.visualViewport.scale>1&&m.current.focus()},[]),c=T(b=>{var w;const v=(w=b.currentTarget.parentElement)==null?void 0:w.querySelector("input");v==null||v.focus(),v==null||v.showPicker()},[]),u=T(b=>{b.currentTarget.setAttribute("type","text"),i==null||i(b)},[i]),f=T(b=>{_(b.target.value),o==null||o(b)},[o]);return e("div",{className:s(["dropin-input-date"]),children:[fe()?e("input",{ref:m,"data-testid":"inputDateIos",className:"dropin-input-date__input--ios",type:"date",onChange:f}):null,e(me,{error:r,children:e(pe,{"data-testid":"input-date",error:!!r,name:a,value:d,placeholder:t,floatingLabel:t,onFocus:p,onBlur:u,onChange:f,"aria-labelledby":t,className:"dropin-input-date__input",...l})}),e("button",{type:"button","data-testid":"dropin-input-date__icon",className:"dropin-input-date__icon","aria-label":h.picker,onClick:c,children:e(L,{source:$e,size:"24"})})]})},ae={pending:e(U,{}),success:e(de,{}),error:e(j,{style:{fill:"red"}})},qe=({minLength:a=0,requiredCharacterClasses:r=0,uniqueSymbolsStatus:n="pending",validateLengthConfig:t={status:"",icon:"",message:""}})=>{const o=D({chartTwoSymbols:"Dropin.PasswordStatusIndicator.chartTwoSymbols",chartThreeSymbols:"Dropin.PasswordStatusIndicator.chartThreeSymbols",chartFourSymbols:"Dropin.PasswordStatusIndicator.chartFourSymbols"}),i=l=>{switch(l){case 2:return o.chartTwoSymbols;case 3:return o.chartThreeSymbols;case 4:return o.chartFourSymbols;default:return""}};return e("div",{className:s(["dropin-password-status-indicator"]),children:[a>0?e("div",{className:`dropin-password-status-indicator__item dropin-password-status-indicator__item--${t.status}`,"data-testid":`dropin-password-status-indicator__item--${t.icon}`,children:[ae[t.icon],e("span",{className:`${t.status}`,children:t.message})]}):null,r>=2?e("div",{className:`dropin-password-status-indicator__item dropin-password-status-indicator__item--${n}`,"data-testid":`dropin-password-status-indicator__item--${n}`,children:[ae[n],e("span",{className:"pending",children:i(r)})]}):null]})},ft=({placeholder:a,floatingLabel:r,children:n,name:t,required:o,className:i,minLength:l,autoComplete:d,defaultValue:_="",hideStatusIndicator:m=!1,uniqueSymbolsStatus:h,validateLengthConfig:p,requiredCharacterClasses:c,errorMessage:u,onValue:f,onBlur:b,...v})=>{const w=D({placeholder:"Dropin.InputPassword.placeholder",floatingLabel:"Dropin.InputPassword.floatingLabel",buttonShowTitle:"Dropin.InputPassword.buttonShowTitle",buttonHideTitle:"Dropin.InputPassword.buttonHideTitle"}),[I,E]=A(!1),$=T(()=>{E(O=>!O)},[]),k=I?w.buttonHideTitle:w.buttonShowTitle;return e("div",{"data-testid":"passwordFieldInput",className:s(["dropin-input-password",["dropin-input-password--error",u],i]),...v,children:[e(me,{error:u,children:e(pe,{autoComplete:d,name:t??"password",type:I?"text":"password",placeholder:a||w.placeholder,floatingLabel:r||w.floatingLabel,"aria-label":w.placeholder,"aria-required":o||!0,"aria-invalid":!!u,"aria-describedby":"password-feedback",required:o||!1,value:_,onValue:f,icon:e(Se,{}),onBlur:b,"data-testid":"passwordInput"})}),e(R,{"aria-label":k,title:k,type:"button","data-testid":"toggle-password-icon",variant:"tertiary",className:s(["dropin-input-password__eye-icon",`dropin-input-password__eye-icon--${I?"show":"hide"}`,i]),onClick:$,children:e(L,{focusable:!1,"aria-hidden":I,source:I?Te:Le})}),m?null:e(qe,{minLength:l,requiredCharacterClasses:c,validateLengthConfig:p,uniqueSymbolsStatus:h}),n]})},vt=({disabled:a,name:r="",errorMessage:n,value:t,label:o,className:i,onChange:l,onBlur:d,..._})=>{const m=(_==null?void 0:_.id)||r||`dropin-textarea-${Math.random().toString(36)}`,h=!!(n!=null&&n.length),p=T(c=>{const u=c.target;u.style.height="auto",u.style.height=`${u.scrollHeight}px`,l==null||l(c)},[l]);return e("div",{className:s(["dropin-textarea-container",i]),"data-testid":"dropin-textarea-container",children:[e("textarea",{"data-testid":"dropin-textarea-field",className:s(["dropin-textarea",["dropin-textarea--error",h],["dropin-textarea--disabled",!!a]]),id:m,placeholder:o,name:r,value:t,disabled:a,onBlur:d,onChange:p,..._}),e("label",{htmlFor:m,className:s(["dropin-textarea__label--floating",["dropin-textarea__label--floating--error",h]]),children:o}),h?e("div",{className:s(["dropin-textarea__label--floating--text",["dropin-textarea__label--floating--error",h]]),children:n}):null]})},Me=({className:a,src:r,params:n,loading:t="lazy",srcSet:o,onLoad:i,...l})=>{const[d,_]=A(!1),m=q(()=>{if(o)return o;if(!(!r||!n))return ve(r,{...n})},[n,r,o]),h=p=>{_(!0),i==null||i(p)};return e("img",{...l,className:s(["dropin-image",["dropin-image--loaded",d],a]),loading:t,onLoad:h,src:r,srcSet:m})},_e=({variant:a="primary",className:r})=>e("hr",{role:"separator",className:s(["dropin-divider",`dropin-divider--${a}`,r])}),V=({amount:a=0,currency:r,locale:n=void 0,variant:t="default",weight:o="bold",className:i,children:l,sale:d=!1,formatOptions:_={},size:m="small",...h})=>{const p=q(()=>new Intl.NumberFormat(n,{style:"currency",currency:r||"USD",minimumFractionDigits:2,maximumFractionDigits:2,..._}),[n,r,_]),c=q(()=>p.format(a),[a,p]);return e("span",{...h,className:s(["dropin-price",`dropin-price--${t}`,`dropin-price--${m}`,`dropin-price--${o}`,["dropin-price--sale",d],i]),children:c})},We=({name:a,label:r,value:n,size:t="medium",checked:o=!1,disabled:i=!1,error:l=!1,description:d="",busy:_=!1,className:m,children:h,...p})=>e("label",{className:s([m,"dropin-radio-button",["dropin-radio-button--error",l],["dropin-radio-button--disabled",i]]),children:[e("input",{name:a,value:n,checked:o,disabled:i,type:"radio",className:s(["dropin-radio-button__input",["dropin-radio-button__input--error",l],["dropin-radio-button__input--disabled",i]]),"aria-busy":_,...p}),e("span",{className:s(["dropin-radio-button__label",`dropin-radio-button__label--${t}`,["dropin-radio-button__label--error",l],["dropin-radio-button__label--disabled",i]]),children:r}),e("span",{className:s(["dropin-radio-button__description",`dropin-radio-button__description--${t}`,["dropin-radio-button__description--disabled",i]]),children:d})]}),R=({value:a,variant:r="primary",size:n="medium",icon:t,className:o,children:i,disabled:l=!1,active:d=!1,activeChildren:_,activeIcon:m,href:h,...p})=>{let c="dropin-button";(t&&!i||t&&d&&!_||!t&&d&&m)&&(c="dropin-iconButton"),d&&_&&(c="dropin-button"),o=s([c,`${c}--${n}`,`${c}--${r}`,[`${c}--${r}--disabled`,l],i&&t&&`${c}--with-icon`,!i&&_&&t&&`${c}--with-icon`,d&&m&&`${c}--with-icon`,o]);const u=s(["dropin-button-icon",`dropin-button-icon--${r}`,[`dropin-button-icon--${r}--disabled`,l],t==null?void 0:t.props.className]),f=h?{node:e("a",{}),role:"link",href:h,...p,disabled:l,active:d,onKeyDown:b=>{l&&b.preventDefault()},tabIndex:l?-1:0}:{node:e("button",{}),role:"button",...p,value:a,disabled:l,active:d};return e(y,{...f,className:o,children:[t&&!d&&e(y,{node:t,className:u}),m&&d&&e(y,{node:m,className:u}),i&&!d&&(typeof i=="string"?e("span",{children:i}):i),d&&_&&(typeof _=="string"?e("span",{children:_}):_)]})};function oe(a,r,n,t,o){return a||(r?r.value:n||t?"":o?o.value:null)}const Ge=({name:a,value:r=null,options:n,variant:t="primary",floatingLabel:o,size:i="medium",handleSelect:l=()=>{},disabled:d=!1,error:_=!1,placeholder:m,defaultOption:h,icon:p,className:c,...u})=>{const f=(u==null?void 0:u.id)||a||`dropin-picker-${Math.random().toString(36)}`,b=!!(u!=null&&u.required),v=n==null?void 0:n.find(P=>!P.disabled),[w,I]=A(()=>oe(r,h,m,o,v));W(()=>{I(oe(r,h,m,o,v))},[r,h,m,o,v]);const E=P=>{const{options:x,value:S}=P.target;for(const M of x)M.selected&&(I(S),l(P))},$=n==null?void 0:n.map(P=>{const{value:x,text:S,disabled:M}=P;return e("option",{value:x,selected:x===w,disabled:M,className:s(["dropin-picker__option"]),children:S},x)}),k=!!w,O=()=>(!b||!k)&&(o||m);return e("div",{className:s([c,"dropin-picker",`dropin-picker__${i}`,["dropin-picker__floating",!!o],["dropin-picker__selected",k],["dropin-picker__error",_],["dropin-picker__disabled",d],["dropin-picker__icon",p]]),children:[p&&e(p.type,{...p.props,className:"dropin-picker__icon--placeholder"}),e("select",{id:f,className:s(["dropin-picker__select",`dropin-picker__select--${t}`,`dropin-picker__select--${i}`,["dropin-picker__select--floating",!!o]]),name:a,"aria-label":a,disabled:d,onChange:E,...u,children:[O()&&e("option",{selected:!k,value:"",className:s(["dropin-picker__option dropin-picker__placeholder"]),children:o??m},r),$]}),e(L,{source:J,size:"24",stroke:"2",className:"dropin-picker__chevronDown"}),o&&k&&e("label",{htmlFor:f,className:s(["dropin-picker__floatingLabel",!!o]),children:o})]})},me=({className:a,label:r,error:n,hint:t,success:o,size:i="medium",disabled:l=!1,children:d,..._})=>{var p;const m=((p=d==null?void 0:d.props)==null?void 0:p.id)??`dropin-field-${Math.random().toString(36)}`,h=d&&typeof d.type!="string"?d.type:null;return e("div",{..._,className:s(["dropin-field",a]),children:[r&&e("label",{className:s(["dropin-field__label",["dropin-field__label--disabled",l],`dropin-field__label--${i}`]),htmlFor:m,children:r}),e("div",{className:s(["dropin-field__content"]),children:h&&d&&ke(h,{...d.props,id:m,key:d.key,disabled:l,size:i,error:!!n,success:!!o&&!n})}),e("div",{className:s(["dropin-field__hint",[`dropin-field__hint--${i}`,i],["dropin-field__hint--error",!!n],["dropin-field__hint--success",!!o&&!n],["dropin-field__hint--disabled",!!l]]),children:n||o||t})]})},Nt=({icon:a,className:r,children:n,active:t=!1,disabled:o=!1,...i})=>e("button",{role:"button",disabled:o,...i,className:s(["dropin-action-button",["dropin-action-button--active",t],["dropin-action-button--disabled",o],r]),children:[a&&e(y,{node:a,className:s(["dropin-action-button-icon"])}),n&&(typeof n=="string"?e("span",{children:n}):n)]}),gt=({className:a,variant:r="primary",activeOption:n,disabled:t=!1,dividers:o=!0,children:i,handleSelect:l,...d})=>{const[_,m]=A(n),h=T(c=>{t||c.props.disabled||(m(c.props.value),l&&l(c.props.value))},[l,m,t]),p=le.map(i,c=>{const u=t||c.props.disabled,f=c.props.value===_;return ye(c,{disabled:u,active:f,onClick:()=>h(c),className:s(["dropin-action-button-group__option",`dropin-action-button-group__option--${r}`,["dropin-action-button-group__option--active",f],["dropin-action-button-group__option--with-dividers",o]])})});return e("div",{role:"group",...d,className:s(["dropin-action-button-group",`dropin-action-button-group--${r}`,a]),children:p})},Ke=({variant:a="primary",className:r,children:n,...t})=>e("div",{...t,className:s(["dropin-card",`dropin-card--${a}`,r]),children:e("div",{class:"dropin-card__content",children:n})}),wt=({name:a,value:r,size:n="medium",disabled:t=!1,error:o=!1,label:i="",description:l="",className:d,checked:_,...m})=>{const[h,p]=A(_===void 0?!1:_),c=X(null),u=b=>{var v;(v=m.onChange)==null||v.call(m,b),p(b.currentTarget.checked)},f=b=>{var v;b.key===" "&&(b.preventDefault(),(v=c==null?void 0:c.current)==null||v.click())};return e("label",{className:s(["dropin-checkbox",["dropin-checkbox--disabled",t]]),children:[e("input",{ref:c,name:a,value:r,type:"checkbox",disabled:t,className:s(["dropin-checkbox__checkbox",["dropin-checkbox__checkbox--error",o],d]),...m,onChange:u,checked:h}),e("span",{"aria-checked":h?"true":"false","aria-labelledby":`${a}-label`,"aria-describedby":`${a}-description`,className:s(["dropin-checkbox__box",["dropin-checkbox__box--error",o],["dropin-checkbox__box--disabled",t]]),role:"checkbox",tabIndex:t?-1:0,onKeyDown:f,children:e(L,{className:s(["dropin-checkbox__checkmark"]),source:de,size:"16",stroke:"3"})}),e("div",{id:`${a}-label`,className:s(["dropin-checkbox__label",`dropin-checkbox__label--${n}`,["dropin-checkbox__label--disabled",t]]),children:i}),e("div",{}),e("div",{id:`${a}-description`,role:"note",className:s(["dropin-checkbox__description",`dropin-checkbox__description--${n}`,["dropin-checkbox__description--disabled",t]]),children:l})]})},kt=({className:a,name:r,value:n,id:t,label:o,groupAriaLabel:i,size:l="medium",color:d,disabled:_=!1,selected:m=!1,outOfStock:h=!1,multi:p=!1,onValue:c,onUpdateError:u,...f})=>{const b=D("Dropin.Swatches.outOfStock.label").label,v=D("Dropin.Swatches.selected.label").label,w=D("Dropin.Swatches.swatch.label").label,I=T(async x=>{if(c)try{await c(x)}catch(S){u&&u(S)}},[c,u]),E=x=>{const S=x.target;I(S.value)},O=d&&(x=>{const S=new Option().style;return S.color=x,S.color!==""})(d)?d:"var(--color-gray-300);",P=()=>h?`${i}: ${o} ${b}`:m?`${i}: ${o} ${v}`:`${i}: ${o} ${w}`;return e("label",{className:s(["dropin-color-swatch__container",`dropin-color-swatch__container--${l}`,a]),children:[e("input",{type:p?"checkbox":"radio",name:r,id:t,value:n,"aria-label":P(),checked:m,disabled:_,onChange:E,...f,className:s(["dropin-color-swatch",["dropin-color-swatch--selected",m],["dropin-color-swatch--disabled",_],a])}),e("span",{style:{"--bg-color":O},className:s(["dropin-color-swatch__span",["dropin-color-swatch__span--out-of-stock",h],a])})]})},yt=({className:a,name:r,value:n,label:t,groupAriaLabel:o,id:i,disabled:l=!1,selected:d=!1,outOfStock:_=!1,multi:m=!1,onValue:h,onUpdateError:p,...c})=>{const u=D("Dropin.Swatches.outOfStock.label").label,f=D("Dropin.Swatches.selected.label").label,b=D("Dropin.Swatches.swatch.label").label,[v,w]=A(!1),I=X(null),E=T(async O=>{if(h)try{await h(O)}catch(P){p&&p(P)}},[h,p]),$=O=>{const P=O.target;E(P.value)},k=()=>_?`${o}: ${t} ${u}`:d?`${o}: ${t} ${f}`:`${o}: ${t} ${b}`;return W(()=>{I.current&&I.current.scrollWidth>I.current.clientWidth&&w(!0)},[t]),e("div",{className:"dropin-text-swatch__container",...v?{"data-tooltip":t}:{},children:[e("input",{type:m?"checkbox":"radio",name:r,id:i,value:n,"aria-label":k(),checked:d,disabled:l,onChange:$,...c,className:s(["dropin-text-swatch",["dropin-text-swatch--selected",d],["dropin-text-swatch--disabled",l],a])}),e("label",{htmlFor:i,ref:I,className:s(["dropin-text-swatch__label",["dropin-text-swatch__label--out-of-stock",_],a]),children:t})]})},Ue=({ariaLabel:a,size:r="small",stroke:n="4",children:t,className:o,style:i,...l})=>{const d=["dropin-progress-spinner",`dropin-progress-spinner--shape-size-${r}`,`dropin-progress-spinner--shape-stroke-${n}`],_=D({updating:"Dropin.ProgressSpinner.updating.label",updatingChildren:"Dropin.ProgressSpinner.updatingChildren.label"}),m=()=>a||(t?_.updatingChildren:_.updating);return t?e("div",{...l,className:s(["dropin-progress-spinner-provider"]),"aria-live":"polite",role:"status",children:[e("div",{"aria-hidden":!0,children:t}),e("div",{"aria-label":m(),role:"status",className:s(["dropin-progress-spinner-background",o]),style:i}),e("div",{className:s(["dropin-progress-spinner-with-provider",...d]),"aria-hidden":!0})]}):e("div",{...l,className:s([o,...d]),"aria-live":"polite",role:"status","aria-label":m()})},It=({className:a,name:r,value:n,id:t,label:o,groupAriaLabel:i,src:l,alt:d,disabled:_=!1,selected:m=!1,outOfStock:h=!1,multi:p=!1,onValue:c,onUpdateError:u,...f})=>{const b=D("Dropin.Swatches.outOfStock.label").label,v=D("Dropin.Swatches.selected.label").label,w=D("Dropin.Swatches.swatch.label").label,I=T(async k=>{if(c)try{await c(k)}catch(O){u&&u(O)}},[c,u]),E=k=>{const O=k.target;I(O.value)},$=()=>h?`${i}: ${o} ${b}`:m?`${i}: ${o} ${v}`:`${i}: ${o} ${w}`;return e("label",{className:s(["dropin-image-swatch__container",a]),children:[e("input",{type:p?"checkbox":"radio",name:r,id:t,value:n,"aria-label":$(),checked:m,disabled:_,onChange:E,...f,className:s(["dropin-image-swatch",["dropin-image-swatch--selected",m],["dropin-image-swatch--disabled",_],a])}),e("span",{className:s(["dropin-image-swatch__span",["dropin-image-swatch__span--out-of-stock",h],a]),children:e(Me,{src:l,className:s(["dropin-image-swatch__content"]),params:{width:100,fit:"bounds",crop:!0},alt:d,loading:"lazy",onError:k=>k.target.style.display="none"})})]})},je=({className:a,children:r,title:n,secondaryText:t,actionIconPosition:o="left",iconOpen:i=K,iconClose:l=U,iconLeft:d=K,showIconLeft:_=!1,renderContentWhenClosed:m=!0,defaultOpen:h=!1,onStateChange:p,...c})=>{const[u,f]=A(h),b=$=>{$.stopImmediatePropagation();const k=!u;f(k),p==null||p(k)},v=D(`Dropin.Accordion.${u?"close":"open"}.label`).label,w=e(L,{source:i,size:"24",onClick:b,onKeyPress:b,className:"dropin-accordion-section__open-icon"}),I=e(L,{source:l,size:"24",onClick:b,onKeyPress:b,className:"dropin-accordion-section__close-icon"}),E=e(L,{source:d,size:"24"});return e("div",{...c,className:s(["dropin-accordion-section",a]),children:[e("div",{className:"dropin-accordion-section__heading",children:[e("div",{className:"dropin-accordion-section__flex",onClick:b,onKeyPress:b,role:"button","aria-label":`${v} ${n}`,tabIndex:0,children:e("div",{className:"dropin-accordion-section__title-container",children:[o==="left"&&(u?I:w),_&&E,e("h3",{className:"dropin-accordion-section__title",children:n})]})}),e("div",{className:"dropin-accordion-section__secondary-text-container",children:[t&&e("h4",{className:"dropin-accordion-section__secondary-text",children:t}),o==="right"&&(u?I:w)]})]}),e("div",{className:"dropin-accordion-section__content-container",style:{display:u?"grid":"none"},children:(u||m&&!u)&&r})]})},xt=({className:a,children:r,actionIconPosition:n="left",iconOpen:t=K,iconClose:o=U,...i})=>{const l=e(_e,{variant:"secondary"}),d=_=>e(B,{children:[e(je,{..._.props,actionIconPosition:n,iconOpen:t,iconClose:o}),l]});return e("div",{...i,className:s(["dropin-accordion",a]),children:[l,...(Array.isArray(r)?r:[r]).map(d)]})},Dt=({variant:a="primary",className:r,type:n="warning",additionalActions:t,onDismiss:o,heading:i,description:l,icon:d,itemList:_,actionButtonPosition:m,...h})=>{var c,u,f;const p=D({dismiss:"Dropin.InlineAlert.dismissLabel"});return e("div",{...h,className:s(["dropin-in-line-alert",`dropin-in-line-alert--${n}`,`dropin-in-line-alert--${a}`,r]),children:[e("div",{className:"dropin-in-line-alert__heading",children:[e("div",{className:"dropin-in-line-alert__title-container",children:[d&&e(y,{node:d,className:"dropin-in-line-alert__icon"}),e("span",{className:"dropin-in-line-alert__title",children:i})]}),e("div",{className:"dropin-in-line-alert__actions-container",children:[t&&(m==="top"||!m&&t.length<=1)&&e(R,{variant:"tertiary",className:"dropin-in-line-alert__additional-action",onClick:t.length>0?(c=t[0])==null?void 0:c.onClick:void 0,"aria-label":(u=t[0])==null?void 0:u.label,children:(f=t[0])==null?void 0:f.label}),o&&e(R,{icon:e(L,{source:j,size:"24",stroke:"2"}),className:"dropin-in-line-alert__dismiss-button",variant:"tertiary",onClick:o,"aria-label":p.dismiss})]})]}),l&&e("p",{className:"dropin-in-line-alert__description",children:l}),e("div",{className:"dropin-in-line-alert__item-list-container",children:_&&e(y,{node:_,className:s(["dropin-in-line-alert__item-list"])})}),t&&(m==="bottom"||!m&&t.length>1)&&e("div",{className:"dropin-in-line-alert__additional-actions-container",children:t.map(b=>e(R,{variant:"tertiary",className:"dropin-in-line-alert__additional-action",onClick:b.onClick,children:b.label},b.label))})]})},Et=({size:a="small",title:r=null,centered:n=!1,backgroundDim:t=!0,clickToDismiss:o=!0,escapeToDismiss:i=!0,onClose:l,showCloseButton:d=!0,className:_,children:m=null,...h})=>{const p=T(()=>{l==null||l()},[l]),c=D({modalCloseLabel:"Dropin.Modal.Close.label"});return W(()=>{const u=f=>{const b=document.querySelector(".dropin-modal"),v=document.querySelector(".dropin-modal__body");o&&b&&v&&!v.contains(f.target)&&p()};return document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[p,o]),W(()=>{const u=f=>{f.key==="Escape"&&i&&p()};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}},[p,i]),W(()=>{const u=document.scrollingElement,f=u.style.overflow;return u.style.overflow="hidden",()=>{u.style.overflow=f}},[]),e("div",{className:s(["dropin-modal",["dropin-modal--dim",t]]),children:e("div",{...h,className:s(["dropin-modal__body",[`dropin-modal__body--${a}`,a],_]),children:[e("div",{className:s(["dropin-modal__header",["dropin-modal__header-title",!!r]]),children:[r&&e("div",{className:s(["dropin-modal__header-title-content"]),children:r}),d&&e(R,{"aria-label":c.modalCloseLabel,variant:"tertiary",className:"dropin-modal__header-close-button",onClick:p,icon:e(j,{})})]}),e("div",{className:s(["dropin-modal__content",["dropin-modal__body--centered",n]]),children:m})]})})},$t=({className:a,children:r,ariaLabel:n,image:t,title:o,price:i,taxIncluded:l=!1,taxExcluded:d=!1,total:_,totalExcludingTax:m,sku:h,configurations:p,warning:c,alert:u,discount:f,savings:b,quantity:v,description:w,attributes:I,footer:E,loading:$=!1,updating:k=!1,quantityType:O,dropdownOptions:P,onQuantity:x,onRemove:S,...M})=>{var Y,Q;const{locale:G}=Ie(ce),C=D({each:"Dropin.CartItem.each.label",pricePerItem:"Dropin.CartItem.pricePerItem.label",quantity:"Dropin.CartItem.quantity.label",remove:"Dropin.CartItem.remove.label",removeDefault:"Dropin.CartItem.removeDefault.label",taxIncluded:"Dropin.CartItem.taxIncluded.label",taxExcluded:"Dropin.CartItem.taxExcluded.label",updating:"Dropin.CartItem.updating.label",updatingDefault:"Dropin.ProgressSpinner.updating.label"});if($)return e(ze,{});const ue=O==="dropdown"?e(Ge,{className:s(["dropin-cart-item__quantity__picker"]),value:String(v),name:"quantity","aria-label":C.quantity,disabled:k,variant:"primary",options:P,handleSelect:F=>x==null?void 0:x(Number(F.target.value))}):e(He,{className:s(["dropin-cart-item__quantity__incrementer"]),value:v,min:1,onValue:F=>x==null?void 0:x(Number(F)),name:"quantity","aria-label":C.quantity,disabled:k});return e("div",{...M,className:s(["dropin-cart-item",["dropin-cart-item--updating",k],a]),children:[k&&e(Ue,{className:s(["dropin-cart-item__spinner"]),ariaLabel:n?(Y=C.updating)==null?void 0:Y.replace("{product}",n):C.updatingDefault}),e("div",{className:"dropin-cart-item__wrapper",children:[t&&e(y,{node:t,className:s(["dropin-cart-item__image"])}),o&&e(y,{node:o,className:s(["dropin-cart-item__title",["dropin-cart-item__title--edit",!!x||!!S]])}),w&&e(y,{node:w,className:s(["dropin-cart-item__description"])}),h&&e(y,{node:h,className:s(["dropin-cart-item__sku"])}),e("div",{className:s(["dropin-cart-item__savings__wrapper"]),children:[f&&e(y,{node:f,className:s(["dropin-cart-item__discount","dropin-cart-item__discount__large-screen"])}),b&&e(y,{node:b,className:s(["dropin-cart-item__savings","dropin-cart-item__savings__large-screen"])})]}),I&&e("div",{className:s(["dropin-cart-item__attributes"]),children:e(y,{node:I})}),p&&e("ul",{className:s(["dropin-cart-item__configurations"]),children:Object.entries(p).map(([F,he])=>e("li",{className:s(["dropin-cart-item__configurations__item"]),children:[F,":"," ",e("strong",{className:s(["dropin-cart-item__configurations__item__value"]),children:he})]},F))}),i&&e("span",{className:s(["dropin-cart-item__price"]),"aria-label":C.pricePerItem,children:[v&&!x&&e(B,{children:[e("span",{className:"dropin-cart-item__price__quantity","aria-hidden":!0,children:[v.toLocaleString(G)," x"," "]}),e("div",{className:"dropin-cart-item__sr-only",children:[C.quantity,": ",v==null?void 0:v.toLocaleString(G),";"]})]}),e(y,{node:i,role:"text"}),v&&v>1&&e(B,{children:[" ",C.each]}),l&&e("span",{"data-testid":"tax-message",className:"dropin-cart-item__price-tax-message",children:[" ",C.taxIncluded]}),d&&e("span",{"data-testid":"tax-message",className:"dropin-cart-item__price-tax-message",children:[" ",C.taxExcluded]})]}),e("div",{className:s(["dropin-cart-item__quantity",["dropin-cart-item__quantity--edit",!!x]]),children:[x?ue:v&&e("span",{className:s(["dropin-cart-item__quantity__value"]),children:[C.quantity,":"," ",e("strong",{className:"dropin-cart-item__quantity__number",children:Number(v).toLocaleString(G)})]}),c&&e(y,{node:c,className:s(["dropin-cart-item__warning","dropin-cart-item__warning--quantity"])}),u&&e(y,{node:u,className:s(["dropin-cart-item__alert","dropin-cart-item__alert--quantity"])})]}),c&&e(y,{node:c,className:s(["dropin-cart-item__warning"])}),u&&e(y,{node:u,className:s(["dropin-cart-item__alert"])}),e("div",{className:s(["dropin-cart-item__total",["dropin-cart-item__total--edit",!!S]]),children:[e("div",{className:"dropin-cart-item__row-total__wrapper",children:[_&&e("div",{className:"dropin-cart-item__row-total",children:e(y,{node:_,role:"text"})}),l&&e("div",{className:"dropin-cart-item__total-tax-included",children:e("span",{"data-testid":"tax-message",className:s(["dropin-cart-item__total-tax-message"]),children:C.taxIncluded})})]}),d&&e("div",{className:"dropin-cart-item__total-tax-excluded",children:e("span",{"data-testid":"tax-message",className:s(["dropin-cart-item__total-tax-excluded-message"]),children:[m&&e(y,{node:m,role:"text"})," ",C.taxExcluded]})}),f&&e(y,{node:f,className:s(["dropin-cart-item__discount"])}),b&&e(y,{node:b,className:s(["dropin-cart-item__savings"])})]}),E&&e("div",{className:s(["dropin-cart-item__footer"]),children:e(y,{node:E})})]}),S&&e(R,{"data-testid":"cart-item-remove-button",className:s(["dropin-cart-item__remove"]),variant:"tertiary",onClick:()=>S==null?void 0:S(),icon:e(L,{"data-testid":"cart-item-remove-icon",source:Oe,size:"24",stroke:"2",viewBox:"0 0 24 24","aria-label":n?(Q=C.remove)==null?void 0:Q.replace("{product}",n):C.removeDefault}),disabled:k})]})},ze=()=>e("div",{className:"dropin-cart-item dropin-cart-item-skeleton",children:e(Ae,{className:"dropin-cart-item__skeleton dropin-cart-item__wrapper",children:[e("div",{className:"dropin-cart-item__image",children:e(H,{className:"dropin-cart-item__skeleton__item"})}),e("div",{className:"dropin-cart-item__title",children:e(H,{className:"dropin-cart-item__skeleton__item"})}),e("div",{className:"dropin-cart-item__sku",children:e(H,{className:"dropin-cart-item__skeleton__item"})}),e("div",{className:"dropin-cart-item__price",children:e(H,{className:"dropin-cart-item__skeleton__item"})}),e("div",{className:"dropin-cart-item__quantity",children:e(H,{className:"dropin-cart-item__skeleton__item"})}),e("div",{className:"dropin-cart-item__total",children:e(H,{className:"dropin-cart-item__skeleton__item"})})]})}),St=({className:a,children:r,...n})=>e("div",{...n,className:s(["dropin-cart-list",a]),children:e("div",{className:"dropin-cart-list__wrapper","aria-live":"assertive","aria-relevant":"all",children:le.map(r,(t,o)=>e("div",{className:"dropin-cart-list__item",children:t},o))})}),Tt=({className:a,children:r,locale:n,currency:t,amount:o,variant:i="default",minimumAmount:l,maximumAmount:d,size:_="small",display:m="dash",specialPrice:h,sale:p=!1,...c})=>{const u=q(()=>o||l===d||l&&!d||d&&!l,[o,d,l]);return e("div",{children:u?e("div",{...c,className:s(["dropin-price-range",a]),children:e(V,{amount:o??l??d,currency:t,locale:n,size:_,variant:i,sale:p})}):e("div",{...c,className:s(["dropin-price-range",a]),children:[m==="dash"?e(Ze,{specialPrice:h,minimumAmount:l,maximumAmount:d,currency:t,locale:n,size:_,sale:p}):null,m==="from to"?e(Je,{specialPrice:h,minimumAmount:l,maximumAmount:d,currency:t,locale:n,size:_,sale:p}):null,m==="as low as"?e(Xe,{specialPrice:h,minimumAmount:l,maximumAmount:d,currency:t,locale:n,size:_,sale:p}):null]})})};function Ze({specialPrice:a,minimumAmount:r,maximumAmount:n,currency:t,locale:o,size:i,sale:l}){return e(B,{children:[e(V,{amount:a??r,currency:t,locale:o,size:i,sale:!!a&&l}),e("span",{className:"dropin-price-range__separator",children:"-"}),e(V,{amount:n,currency:t,locale:o,size:i})]})}function Je({specialPrice:a,minimumAmount:r,maximumAmount:n,currency:t,locale:o,size:i,sale:l}){const d=D({from:"Dropin.PriceRange.from.label",to:"Dropin.PriceRange.to.label",asLowAs:"Dropin.PriceRange.asLowAs.label"});return e(B,{children:[e("span",{className:s(["dropin-price-range__from",`dropin-price-range__from--${i}`]),children:d.from}),e(V,{amount:a??r,currency:t,locale:o,size:i,sale:!!a&&l}),e("span",{className:s(["dropin-price-range__to",`dropin-price-range__to--${i}`]),children:d.to}),e(V,{amount:n,currency:t,locale:o,size:i})]})}function Xe({specialPrice:a,minimumAmount:r,maximumAmount:n,currency:t,locale:o,size:i,sale:l}){const d=D({from:"Dropin.PriceRange.from.label",to:"Dropin.PriceRange.to.label",asLowAs:"Dropin.PriceRange.asLowAs.label"});return e(B,{children:[e("span",{className:s(["dropin-price-range__as-low-as",`dropin-price-range__as-low-as--${i}`]),children:d.asLowAs}),a?e("div",{children:[e(V,{amount:n,currency:t,locale:o,size:i,variant:"strikethrough"}),e(V,{amount:a,currency:t,locale:o,size:i,className:"dropin-price-range__special",sale:!!a&&l})]}):e(V,{amount:r,currency:t,locale:o,size:i})]})}const Lt=({className:a,categories:r,separator:n,...t})=>e(B,{children:(r==null?void 0:r.length)>1&&e("nav",{role:"navigation",...t,className:s(["dropin-breadcrumbs__container",a]),children:e("ul",{className:"dropin-breadcrumbs__items",children:r==null?void 0:r.map((o,i)=>e("li",{className:s(["dropin-breadcrumbs__item",["dropin-breadcrumbs__item--last",i===r.length-1]]),children:[e(y,{node:o,className:"dropin-breadcrumbs__link"}),!n&&i!==r.length-1&&e("span",{className:"dropin-breadcrumbs__separator--default",children:[" ","/"," "]}),n&&i!==r.length-1&&e(y,{node:n,className:"dropin-breadcrumbs__separator--icon"})]},i))})})}),Ot=({className:a,variant:r,icon:n,message:t,onDismiss:o,action:i,...l})=>{const d=D({dismiss:"Dropin.InlineAlert.dismissLabel"});return e("div",{...l,className:s([a,"dropin-alert-banner",`dropin-alert-banner--${r}`]),children:[e("div",{className:"dropin-alert-banner__content",children:[n&&e(y,{node:n,"aria-hidden":"true",className:"dropin-alert-banner__icon"}),e(y,{node:t,className:s(["dropin-alert-banner__message"])})]}),e("div",{className:"dropin-alert-banner__actions",children:[i&&e(R,{variant:"tertiary",className:"dropin-alert-banner__action",onClick:i.onClick,"aria-label":i.label,children:i.label}),e(R,{icon:e(L,{source:j,size:"24",stroke:"2"}),className:"dropin-alert-banner__dismiss-button",variant:"primary",onClick:o,"aria-label":d.dismiss})]})]})},Pt=({className:a,icon:r,heading:n,headingLevel:t=2,message:o,action:i,variant:l="secondary",...d})=>{const _=t>=1&&t<=6?`h${t}`:"h2";return e("div",{...d,className:s(["dropin-illustrated-message",a]),children:e(Ke,{variant:l,children:[r&&e(y,{node:r,"aria-hidden":"true",size:"80",className:"dropin-illustrated-message__icon"}),n&&e(_,{className:"dropin-illustrated-message__heading",children:n}),o&&e(y,{node:o,className:"dropin-illustrated-message__message"}),i&&e(y,{node:i,className:"dropin-illustrated-message__action"})]})})},Ct=({className:a,label:r,name:n,value:t,selected:o=!0,onChange:i,icon:l,busy:d=!1,children:_,...m})=>e("div",{...m,className:s(["dropin-toggle-button",a,["dropin-toggle-button__selected",o]]),children:e("label",{className:"dropin-toggle-button__actionButton",children:[e(We,{label:"",name:n,value:t,checked:o,onChange:()=>i&&i(t),"aria-label":r,busy:d,className:s([a,"dropin-toggle-button__radioButton"])}),e("span",{className:"dropin-toggle-button__content",children:[l&&e(l.type,{...l==null?void 0:l.props,className:"dropin-toggle-button__icon"}),r]})]})}),At=({title:a=null,size:r="medium",cta:n,divider:t=!0,className:o,...i})=>a?e("div",{...i,className:s(["dropin-header-container",o]),"data-testid":"dropin-header-container",children:[e("span",{className:s(["dropin-header-container__title",["dropin-header-container__title--medium",r==="medium"],["dropin-header-container__title--large",r==="large"]]),children:a}),n?e(y,{node:n,className:"dropin-header-container__actions"}):null,t?e(_e,{className:s(["dropin-header-container__divider",["dropin-header-container__divider--medium",r==="medium"],["dropin-header-container__divider--large",r==="large"]])}):null]}):null,Vt=({label:a,className:r,...n})=>a?e("div",{...n,className:s(["dropin-tag-container",r]),"data-testid":"dropin-tag-container",children:e("span",{className:"dropin-tag-container__label",children:a})}):null,Rt=({className:a,children:r,maxColumns:n,emptyGridContent:t,...o})=>{const i=!!r&&(Array.isArray(r)?r.length>0:!0),l=i?{gridTemplateColumns:`repeat(${n}, 1fr)`}:void 0;return e("div",{...o,className:s(["dropin-content-grid",a]),tabindex:0,children:e("div",{"data-testid":"content-grid-content",className:s(["dropin-content-grid__content",["dropin-content-grid__dynamic-columns-content",!n],["dropin-content-grid__content--empty",!i]]),style:l,children:i?r:t})})},Bt=({totalPages:a=10,currentPage:r=1,onChange:n,className:t,...o})=>{const i=D({backwardButton:"Dropin.Pagination.backwardButton.ariaLabel",forwardButton:"Dropin.Pagination.forwardButton.ariaLabel"}),l=T(()=>{const p=Math.min(r+1,a);n==null||n(p)},[r,n,a]),d=T(()=>{const p=Math.max(r-1,1);n==null||n(p)},[r,n]),_=T(p=>{Ne(p)&&(n==null||n(p))},[n]),m=T((p,c)=>{let u=[];const f=(b,v)=>{for(let w=b;w<=v;w++)u.push({page:w,isActive:w===p,label:w})};return c<=5?f(1,c):p<=2?(f(1,2),u.push({page:"ellipsis",isActive:!1,label:"..."}),f(c-1,c)):p>=c-3?f(c-4,c):(f(p-1,p),u.push({page:"ellipsis",isActive:!1,label:"..."}),f(c-1,c)),u},[]),h=q(()=>m(r,a),[m,r,a]);return e("div",{...o,className:s(["dropin-pagination",t]),children:[e("button",{type:"button","data-testid":"prev-button","aria-label":i.backwardButton,disabled:r===1,onClick:d,className:s(["dropin-pagination-arrow","dropin-pagination-arrow--backward"]),children:e(L,{size:"24",source:J})}),e("ul",{className:"dropin-pagination_list",children:h.map((p,c)=>e("li",{"data-testid":`dropin-pagination_list-item--${p.page}`,className:s(["dropin-pagination_list-item",`dropin-pagination_list-item--${p.page}`,["dropin-pagination_list-item--active",p.isActive]]),children:e("button",{type:"button","data-testid":`set-page-button-${p.page}`,onClick:()=>_(p.page),children:p.label})},`${p.page}_${c}`))}),e("button",{type:"button","data-testid":"next-button","aria-label":i.forwardButton,disabled:r===a,onClick:l,className:s(["dropin-pagination-arrow","dropin-pagination-arrow--forward"]),children:e(L,{size:"24",source:J})})]})};export{xt as Accordion,je as AccordionSection,Nt as ActionButton,gt as ActionButtonGroup,Ot as AlertBanner,Lt as Breadcrumbs,R as Button,Ke as Card,$t as CartItem,ze as CartItemSkeleton,St as CartList,wt as Checkbox,kt as ColorSwatch,Rt as ContentGrid,_e as Divider,me as Field,At as Header,L as Icon,Pt as IllustratedMessage,Me as Image,It as ImageSwatch,Dt as InLineAlert,He as Incrementer,pe as Input,bt as InputDate,ft as InputPassword,Et as Modal,Bt as Pagination,Ge as Picker,V as Price,Tt as PriceRange,Ue as ProgressSpinner,We as RadioButton,Ae as Skeleton,H as SkeletonRow,Vt as Tag,vt as TextArea,yt as TextSwatch,Ct as ToggleButton,ce as UIContext,Ve as UIProvider,ht as provider}; +import{jsx as e}from"./preact-jsx-runtime.js";import{d as Z,c as s,R as be,a as se,V as y,b as fe,g as ve,i as Ne}from"./chunks/deviceUtils.js";import{G as ge,T as q,k as B,F as N,L as we,h as A,q as T,S as K,A as X,y as W,_ as ke,N as le,E as ye,x as Ie}from"./chunks/icons/Add.js";import{IntlProvider as xe,Localizer as ee,Text as z,useText as D}from"./i18n.js";import U from"./chunks/icons/Minus.js";import De from"./chunks/icons/CheckWithCircle.js";import Ee from"./chunks/icons/WarningWithCircle.js";import $e from"./chunks/icons/Date.js";import Se from"./chunks/icons/Locker.js";import Te from"./chunks/icons/Eye.js";import Le from"./chunks/icons/EyeClose.js";import de from"./chunks/icons/Check.js";import j from"./chunks/icons/Close.js";import J from"./chunks/icons/ChevronDown.js";import Oe from"./chunks/icons/Trash.js";import"./chunks/image-params-keymap.js";import"./signals.js";const Pe={ExampleComponentName:{item:{label:"string"}},Pagination:{backwardButton:{ariaLabel:"Go to previous page"},forwardButton:{ariaLabel:"Go to next page"}},Incrementer:{decreaseLabel:"Decrease Quantity",increaseLabel:"Increase Quantity",label:"Quantity",errorMessage:"Enter a valid quantity",minQuantityMessage:"Enter at least {{minQuantity}}",maxQuantityMessage:"Maximum quantity is {{maxQuantity}}"},Modal:{Close:{label:"Close"}},InputPassword:{placeholder:"Password",floatingLabel:"Password",buttonShowTitle:"Click to show password",buttonHideTitle:"Click to hide password"},PasswordStatusIndicator:{chartTwoSymbols:"Use characters and numbers or symbols",chartThreeSymbols:"Use characters, numbers and symbols",chartFourSymbols:"Use uppercase characters, lowercase characters, numbers and symbols",messageLengthPassword:"At least {minLength} characters long"},InlineAlert:{dismissLabel:"Dismiss Alert"},PriceSummary:{subTotal:{label:"Subtotal",withTaxes:"Including taxes",withoutTaxes:"excluding taxes"},shipping:{label:"Shipping",editZipAction:"Apply",estimated:"Estimated Shipping",estimatedDestination:"Estimated Shipping to ",destinationLinkAriaLabel:"Change destination",zipPlaceholder:"Zip Code",withTaxes:"Including taxes",withoutTaxes:"excluding taxes",alternateField:{zip:"Estimate using country/zip",state:"Estimate using country/state"}},taxes:{total:"Tax Total",totalOnly:"Tax",breakdown:"Taxes",showBreakdown:"Show Tax Breakdown",hideBreakdown:"Hide Tax Breakdown",estimated:"Estimated Tax"},total:{estimated:"Estimated Total",label:"Total",withoutTax:"Total excluding taxes"}},ProgressSpinner:{updating:{label:"Item is updating"},updatingChildren:{label:"Items are updating"}},PriceRange:{from:{label:"From"},to:{label:"to"},asLowAs:{label:"As low as"}},Swatches:{outOfStock:{label:"out of stock swatch"},selected:{label:"swatch selected"},swatch:{label:"swatch"}},Accordion:{open:{label:"Open"},close:{label:"Close"}},CartItem:{each:{label:"each"},pricePerItem:{label:"price per item"},quantity:{label:"Quantity"},remove:{label:"Remove {product} from the cart"},removeDefault:{label:"Remove item from the cart"},taxIncluded:{label:"incl. VAT"},taxExcluded:{label:"excl. tax"},updating:{label:"{product} is updating"}},InputDate:{picker:"Select a date"}},te={Dropin:Pe},re={default:te,en_US:te},Ce=a=>Z(re.default,re[a]||{}),ne=1,H=({className:a,fullWidth:r=!1,lines:n=ne,size:t="small",variant:o="row",children:i=null,multilineGap:l="medium",...d})=>{const _=[[`dropin-skeleton-row__${o}`,o],[`dropin-skeleton-row__${o}-${t}`,o&&t]];if(!i&&o==="empty")return e("div",{className:s(["dropin-skeleton-row dropin-skeleton-row__empty",a])});if(i){const h=i.trim();return e("div",{...d,class:s(["dropin-skeleton-row",["dropin-skeleton-row--full",r],a]),dangerouslySetInnerHTML:{__html:h}})}return n>ne===!1?e("div",{...d,class:s(["dropin-skeleton-row",["dropin-skeleton-row--full",r],"dropin-skeleton--row__content",..._,a])}):e("div",{...d,style:{"--multiline-gap-spacing":`var(--spacing-${l})`},class:s(["dropin-skeleton-row--multiline",["dropin-skeleton-row--full",r],a]),children:Array.from({length:n}).map((h,p)=>e("div",{class:s(["dropin-skeleton-row",["dropin-skeleton-row--full",r],"dropin-skeleton--row__content",..._])},p))})},Ae=({className:a,children:r,rowGap:n="medium",...t})=>e("div",{style:{"--row-gap-spacing":`var(--spacing-${n})`},...t,className:s(["dropin-skeleton",a]),role:"status","aria-label":"Loading...",children:r}),ce=ge({locale:"en-US"}),Ve=({lang:a="en_US",langDefinitions:r={},children:n})=>{const t=q(()=>{const i=Z(r.default,r[a]??{});return Z(Ce(a),i)},[a,r]),o=a.replace("_","-");return e(ce.Provider,{value:{locale:o},children:e(xe,{definition:t,children:e(B,{children:n})})})},ht=new be(e(Ve,{})),Re=function(){const r=typeof document<"u"&&document.createElement("link").relList;return r&&r.supports&&r.supports("modulepreload")?"modulepreload":"preload"}(),Be=function(a){return"/"+a},ie={},g=function(r,n,t){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));o=Promise.all(n.map(d=>{if(d=Be(d),d in ie)return;ie[d]=!0;const _=d.endsWith(".css"),m=_?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${m}`))return;const h=document.createElement("link");if(h.rel=_?"stylesheet":Re,_||(h.as="script",h.crossOrigin=""),h.href=d,l&&h.setAttribute("nonce",l),document.head.appendChild(h),_)return new Promise((p,c)=>{h.addEventListener("load",p),h.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${d}`)))})}))}return o.then(()=>r()).catch(i=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i})},Fe={Add:N(()=>g(()=>import("./chunks/icons/Add.js").then(a=>a.$),[])),Bulk:N(()=>g(()=>import("./chunks/icons/Bulk.js"),[])),Burger:N(()=>g(()=>import("./chunks/icons/Burger.js"),[])),Cart:N(()=>g(()=>import("./chunks/icons/Cart.js"),[])),Check:N(()=>g(()=>import("./chunks/icons/Check.js"),[])),ChevronDown:N(()=>g(()=>import("./chunks/icons/ChevronDown.js"),[])),ChevronUp:N(()=>g(()=>import("./chunks/icons/ChevronUp.js"),[])),ChevronRight:N(()=>g(()=>import("./chunks/icons/ChevronRight.js"),[])),Close:N(()=>g(()=>import("./chunks/icons/Close.js"),[])),Heart:N(()=>g(()=>import("./chunks/icons/Heart.js"),[])),Minus:N(()=>g(()=>import("./chunks/icons/Minus.js"),[])),Placeholder:N(()=>g(()=>import("./chunks/icons/Placeholder.js"),[])),PlaceholderFilled:N(()=>g(()=>import("./chunks/icons/PlaceholderFilled.js"),[])),Search:N(()=>g(()=>import("./chunks/icons/Search.js"),[])),SearchFilled:N(()=>g(()=>import("./chunks/icons/SearchFilled.js"),[])),Sort:N(()=>g(()=>import("./chunks/icons/Sort.js"),[])),Star:N(()=>g(()=>import("./chunks/icons/Star.js"),[])),View:N(()=>g(()=>import("./chunks/icons/View.js"),[])),User:N(()=>g(()=>import("./chunks/icons/User.js"),[])),Warning:N(()=>g(()=>import("./chunks/icons/Warning.js"),[])),Locker:N(()=>g(()=>import("./chunks/icons/Locker.js"),[])),Wallet:N(()=>g(()=>import("./chunks/icons/Wallet.js"),[])),Card:N(()=>g(()=>import("./chunks/icons/Card.js"),[])),Order:N(()=>g(()=>import("./chunks/icons/Order.js"),[])),Delivery:N(()=>g(()=>import("./chunks/icons/Delivery.js"),[])),OrderError:N(()=>g(()=>import("./chunks/icons/OrderError.js"),[])),OrderSuccess:N(()=>g(()=>import("./chunks/icons/OrderSuccess.js"),[])),PaymentError:N(()=>g(()=>import("./chunks/icons/PaymentError.js"),[])),CheckWithCircle:N(()=>g(()=>import("./chunks/icons/CheckWithCircle.js"),[])),WarningWithCircle:N(()=>g(()=>import("./chunks/icons/WarningWithCircle.js"),[])),WarningFilled:N(()=>g(()=>import("./chunks/icons/WarningFilled.js"),[])),InfoFilled:N(()=>g(()=>import("./chunks/icons/InfoFilled.js"),[])),HeartFilled:N(()=>g(()=>import("./chunks/icons/HeartFilled.js"),[])),Trash:N(()=>g(()=>import("./chunks/icons/Trash.js"),[])),Eye:N(()=>g(()=>import("./chunks/icons/Eye.js"),[])),EyeClose:N(()=>g(()=>import("./chunks/icons/EyeClose.js"),[])),Date:N(()=>g(()=>import("./chunks/icons/Date.js"),[])),AddressBook:N(()=>g(()=>import("./chunks/icons/AddressBook.js"),[])),EmptyBox:N(()=>g(()=>import("./chunks/icons/EmptyBox.js"),[])),Coupon:N(()=>g(()=>import("./chunks/icons/Coupon.js"),[]))};function L({source:a,size:r="24",stroke:n="2",viewBox:t="0 0 24 24",className:o,...i}){const l=typeof a=="string"?Fe[a]:null,d={className:s(["dropin-icon",`dropin-icon--shape-stroke-${n}`,o]),width:r,height:r,viewBox:t};return e(we,{fallback:e("svg",{...i,...d}),children:l?e(l,{...i,...d}):e(a,{...i,...d})})}const He=({name:a,value:r="1",className:n,disabled:t,error:o,success:i,min:l,max:d,onValue:_,onUpdateError:m,size:h="medium",...p})=>{const[c,u]=A(Number(r)),f=Number(l),b=Number(d),v=o||cb,w=cb?"Dropin.Incrementer.maxQuantityMessage":"Dropin.Incrementer.errorMessage",I=T(se(async $=>{if(_)try{_($)}catch(k){m&&m(k)}},200),[_,m]),E=$=>{let k=$;I(k),u(k)};return e("div",{className:s(["dropin-incrementer",`dropin-incrementer--${h}`,n]),children:[e("div",{className:s(["dropin-incrementer__content",`dropin-incrementer__content--${h}`,["dropin-incrementer__content--error",v],["dropin-incrementer__content--success",i],["dropin-incrementer__content--disabled",t]]),children:[e("div",{className:s(["dropin-incrementer__button-container",["dropin-incrementer__button-container--disabled",t]]),children:e(ee,{children:e("button",{type:"button",className:s(["dropin-incrementer__decrease-button",["dropin-incrementer__decrease-button--disabled",t]]),onClick:()=>E(c-1),disabled:t||c{E(Number(c))},onChange:$=>{const k=$.currentTarget.value;k!==""&&E(Number(k))},...p}),e("div",{className:s(["dropin-incrementer__button-container",["dropin-incrementer__button-container--disabled",t]]),children:e(ee,{children:e("button",{type:"button",className:s(["dropin-incrementer__increase-button",["dropin-incrementer__increase-button--disabled",t]]),onClick:()=>E(c+1),disabled:t||c>b-1,"aria-label":e(z,{id:"Dropin.Incrementer.increaseLabel"}),children:e(L,{source:K,size:"16",stroke:"1",viewBox:"4 2 20 20",className:"dropin-incrementer__add"})})})})]}),v&&e("p",{className:"dropin-incrementer__content--error-message",children:e(z,{id:w,fields:{minQuantity:l,maxQuantity:d}})})]})},pe=({name:a,value:r,variant:n="primary",className:t,disabled:o,error:i,floatingLabel:l,onValue:d,onUpdateError:_,size:m="medium",icon:h,maxLength:p,success:c,...u})=>{const f=(u==null?void 0:u.id)||a||`dropin-input-${Math.random().toString(36)}`,b=T(se(async w=>{if(d)try{await d(w)}catch(I){_&&_(I)}},200),[d,_]),v=w=>{const I=w.target;b(I.value.trim())};return e("div",{className:s(["dropin-input-container",`dropin-input-container--${n}`,["dropin-input-container--floating",!!l],["dropin-input-container--disabled",o]]),children:[h&&e(y,{node:h,className:s(["dropin-input__field-icon--left",h.props.className])}),e("div",{className:"dropin-input-label-container",children:[e("input",{id:f,onChange:v,type:"text",maxLength:p,name:a,value:r,...u,className:s(["dropin-input",`dropin-input--${m}`,`dropin-input--${n}`,["dropin-input--error",!!i],["dropin-input--success",!!c],["dropin-input--disabled",o],["dropin-input--floating",!!l],["dropin-input--icon-left",!!h],t]),disabled:o}),l&&e("label",{htmlFor:f,className:s([["dropin-input__label--floating",!!l],["dropin-input__label--floating--icon-left",!!h],["dropin-input__label--floating--error",!!i]]),children:l})]}),i&&e("div",{className:s(["dropin-input__field-icon--right","dropin-input__field-icon--error"]),children:e(L,{source:Ee,size:"16",stroke:"2",className:"dropin-input--warning-icon",viewBox:"-1 -1 26 26"})}),c&&e("div",{className:s(["dropin-input__field-icon--right","dropin-input__field-icon--success"]),children:e(L,{source:De,size:"16",stroke:"2",className:"dropin-input--success-icon",viewBox:"-1 -1 26 26"})})]})},bt=({name:a="",error:r,value:n,label:t,onChange:o,onBlur:i,...l})=>{const[d,_]=A((n==null?void 0:n.toString())??""),m=X(null),h=D({picker:"Dropin.InputDate.picker"}),p=T(b=>{b.currentTarget.setAttribute("type","date")},[]),c=T(b=>{var w;const v=(w=b.currentTarget.parentElement)==null?void 0:w.querySelector("input");v==null||v.focus(),v==null||v.showPicker()},[]),u=T(b=>{b.currentTarget.setAttribute("type","text"),i==null||i(b)},[i]),f=T(b=>{_(b.target.value),o==null||o(b)},[o]);return e("div",{className:s(["dropin-input-date"]),children:[fe()?e("input",{ref:m,"data-testid":"inputDateIos",className:"dropin-input-date__input--ios",type:"date",onChange:f}):null,e(me,{error:r,children:e(pe,{"data-testid":"input-date",error:!!r,name:a,value:d,placeholder:t,floatingLabel:t,onFocus:p,onBlur:u,onChange:f,"aria-labelledby":t,className:"dropin-input-date__input",...l})}),e("button",{type:"button","data-testid":"dropin-input-date__icon",className:"dropin-input-date__icon","aria-label":h.picker,onClick:c,children:e(L,{source:$e,size:"24"})})]})},ae={pending:e(U,{}),success:e(de,{}),error:e(j,{style:{fill:"red"}})},qe=({minLength:a=0,requiredCharacterClasses:r=0,uniqueSymbolsStatus:n="pending",validateLengthConfig:t={status:"",icon:"",message:""}})=>{const o=D({chartTwoSymbols:"Dropin.PasswordStatusIndicator.chartTwoSymbols",chartThreeSymbols:"Dropin.PasswordStatusIndicator.chartThreeSymbols",chartFourSymbols:"Dropin.PasswordStatusIndicator.chartFourSymbols"}),i=l=>{switch(l){case 2:return o.chartTwoSymbols;case 3:return o.chartThreeSymbols;case 4:return o.chartFourSymbols;default:return""}};return e("div",{className:s(["dropin-password-status-indicator"]),children:[a>0?e("div",{className:`dropin-password-status-indicator__item dropin-password-status-indicator__item--${t.status}`,"data-testid":`dropin-password-status-indicator__item--${t.icon}`,children:[ae[t.icon],e("span",{className:`${t.status}`,children:t.message})]}):null,r>=2?e("div",{className:`dropin-password-status-indicator__item dropin-password-status-indicator__item--${n}`,"data-testid":`dropin-password-status-indicator__item--${n}`,children:[ae[n],e("span",{className:"pending",children:i(r)})]}):null]})},ft=({placeholder:a,floatingLabel:r,children:n,name:t,required:o,className:i,minLength:l,autoComplete:d,defaultValue:_="",hideStatusIndicator:m=!1,uniqueSymbolsStatus:h,validateLengthConfig:p,requiredCharacterClasses:c,errorMessage:u,onValue:f,onBlur:b,...v})=>{const w=D({placeholder:"Dropin.InputPassword.placeholder",floatingLabel:"Dropin.InputPassword.floatingLabel",buttonShowTitle:"Dropin.InputPassword.buttonShowTitle",buttonHideTitle:"Dropin.InputPassword.buttonHideTitle"}),[I,E]=A(!1),$=T(()=>{E(O=>!O)},[]),k=I?w.buttonHideTitle:w.buttonShowTitle;return e("div",{"data-testid":"passwordFieldInput",className:s(["dropin-input-password",["dropin-input-password--error",u],i]),...v,children:[e(me,{error:u,children:e(pe,{autoComplete:d,name:t??"password",type:I?"text":"password",placeholder:a||w.placeholder,floatingLabel:r||w.floatingLabel,"aria-label":w.placeholder,"aria-required":o||!0,"aria-invalid":!!u,"aria-describedby":"password-feedback",required:o||!1,value:_,onValue:f,icon:e(Se,{}),onBlur:b,"data-testid":"passwordInput"})}),e(R,{"aria-label":k,title:k,type:"button","data-testid":"toggle-password-icon",variant:"tertiary",className:s(["dropin-input-password__eye-icon",`dropin-input-password__eye-icon--${I?"show":"hide"}`,i]),onClick:$,children:e(L,{focusable:!1,"aria-hidden":I,source:I?Te:Le})}),m?null:e(qe,{minLength:l,requiredCharacterClasses:c,validateLengthConfig:p,uniqueSymbolsStatus:h}),n]})},vt=({disabled:a,name:r="",errorMessage:n,value:t,label:o,className:i,onChange:l,onBlur:d,..._})=>{const m=(_==null?void 0:_.id)||r||`dropin-textarea-${Math.random().toString(36)}`,h=!!(n!=null&&n.length),p=T(c=>{const u=c.target;u.style.height="auto",u.style.height=`${u.scrollHeight}px`,l==null||l(c)},[l]);return e("div",{className:s(["dropin-textarea-container",i]),"data-testid":"dropin-textarea-container",children:[e("textarea",{"data-testid":"dropin-textarea-field",className:s(["dropin-textarea",["dropin-textarea--error",h],["dropin-textarea--disabled",!!a]]),id:m,placeholder:o,name:r,value:t,disabled:a,onBlur:d,onChange:p,..._}),e("label",{htmlFor:m,className:s(["dropin-textarea__label--floating",["dropin-textarea__label--floating--error",h]]),children:o}),h?e("div",{className:s(["dropin-textarea__label--floating--text",["dropin-textarea__label--floating--error",h]]),children:n}):null]})},Me=({className:a,src:r,params:n,loading:t="lazy",srcSet:o,onLoad:i,...l})=>{const[d,_]=A(!1),m=q(()=>{if(o)return o;if(!(!r||!n))return ve(r,{...n})},[n,r,o]),h=p=>{_(!0),i==null||i(p)};return e("img",{...l,className:s(["dropin-image",["dropin-image--loaded",d],a]),loading:t,onLoad:h,src:r,srcSet:m})},_e=({variant:a="primary",className:r})=>e("hr",{role:"separator",className:s(["dropin-divider",`dropin-divider--${a}`,r])}),V=({amount:a=0,currency:r,locale:n=void 0,variant:t="default",weight:o="bold",className:i,children:l,sale:d=!1,formatOptions:_={},size:m="small",...h})=>{const p=q(()=>new Intl.NumberFormat(n,{style:"currency",currency:r||"USD",minimumFractionDigits:2,maximumFractionDigits:2,..._}),[n,r,_]),c=q(()=>p.format(a),[a,p]);return e("span",{...h,className:s(["dropin-price",`dropin-price--${t}`,`dropin-price--${m}`,`dropin-price--${o}`,["dropin-price--sale",d],i]),children:c})},We=({name:a,label:r,value:n,size:t="medium",checked:o=!1,disabled:i=!1,error:l=!1,description:d="",busy:_=!1,className:m,children:h,...p})=>e("label",{className:s([m,"dropin-radio-button",["dropin-radio-button--error",l],["dropin-radio-button--disabled",i]]),children:[e("input",{name:a,value:n,checked:o,disabled:i,type:"radio",className:s(["dropin-radio-button__input",["dropin-radio-button__input--error",l],["dropin-radio-button__input--disabled",i]]),"aria-busy":_,...p}),e("span",{className:s(["dropin-radio-button__label",`dropin-radio-button__label--${t}`,["dropin-radio-button__label--error",l],["dropin-radio-button__label--disabled",i]]),children:r}),e("span",{className:s(["dropin-radio-button__description",`dropin-radio-button__description--${t}`,["dropin-radio-button__description--disabled",i]]),children:d})]}),R=({value:a,variant:r="primary",size:n="medium",icon:t,className:o,children:i,disabled:l=!1,active:d=!1,activeChildren:_,activeIcon:m,href:h,...p})=>{let c="dropin-button";(t&&!i||t&&d&&!_||!t&&d&&m)&&(c="dropin-iconButton"),d&&_&&(c="dropin-button"),o=s([c,`${c}--${n}`,`${c}--${r}`,[`${c}--${r}--disabled`,l],i&&t&&`${c}--with-icon`,!i&&_&&t&&`${c}--with-icon`,d&&m&&`${c}--with-icon`,o]);const u=s(["dropin-button-icon",`dropin-button-icon--${r}`,[`dropin-button-icon--${r}--disabled`,l],t==null?void 0:t.props.className]),f=h?{node:e("a",{}),role:"link",href:h,...p,disabled:l,active:d,onKeyDown:b=>{l&&b.preventDefault()},tabIndex:l?-1:0}:{node:e("button",{}),role:"button",...p,value:a,disabled:l,active:d};return e(y,{...f,className:o,children:[t&&!d&&e(y,{node:t,className:u}),m&&d&&e(y,{node:m,className:u}),i&&!d&&(typeof i=="string"?e("span",{children:i}):i),d&&_&&(typeof _=="string"?e("span",{children:_}):_)]})};function oe(a,r,n,t,o){return a||(r?r.value:n||t?"":o?o.value:null)}const Ge=({name:a,value:r=null,options:n,variant:t="primary",floatingLabel:o,size:i="medium",handleSelect:l=()=>{},disabled:d=!1,error:_=!1,placeholder:m,defaultOption:h,icon:p,className:c,...u})=>{const f=(u==null?void 0:u.id)||a||`dropin-picker-${Math.random().toString(36)}`,b=!!(u!=null&&u.required),v=n==null?void 0:n.find(P=>!P.disabled),[w,I]=A(()=>oe(r,h,m,o,v));W(()=>{I(oe(r,h,m,o,v))},[r,h,m,o,v]);const E=P=>{const{options:x,value:S}=P.target;for(const M of x)M.selected&&(I(S),l(P))},$=n==null?void 0:n.map(P=>{const{value:x,text:S,disabled:M}=P;return e("option",{value:x,selected:x===w,disabled:M,className:s(["dropin-picker__option"]),children:S},x)}),k=!!w,O=()=>(!b||!k)&&(o||m);return e("div",{className:s([c,"dropin-picker",`dropin-picker__${i}`,["dropin-picker__floating",!!o],["dropin-picker__selected",k],["dropin-picker__error",_],["dropin-picker__disabled",d],["dropin-picker__icon",p]]),children:[p&&e(p.type,{...p.props,className:"dropin-picker__icon--placeholder"}),e("select",{id:f,className:s(["dropin-picker__select",`dropin-picker__select--${t}`,`dropin-picker__select--${i}`,["dropin-picker__select--floating",!!o]]),name:a,"aria-label":a,disabled:d,onChange:E,...u,children:[O()&&e("option",{selected:!k,value:"",className:s(["dropin-picker__option dropin-picker__placeholder"]),children:o??m},r),$]}),e(L,{source:J,size:"24",stroke:"2",className:"dropin-picker__chevronDown"}),o&&k&&e("label",{htmlFor:f,className:s(["dropin-picker__floatingLabel",!!o]),children:o})]})},me=({className:a,label:r,error:n,hint:t,success:o,size:i="medium",disabled:l=!1,children:d,..._})=>{var p;const m=((p=d==null?void 0:d.props)==null?void 0:p.id)??`dropin-field-${Math.random().toString(36)}`,h=d&&typeof d.type!="string"?d.type:null;return e("div",{..._,className:s(["dropin-field",a]),children:[r&&e("label",{className:s(["dropin-field__label",["dropin-field__label--disabled",l],`dropin-field__label--${i}`]),htmlFor:m,children:r}),e("div",{className:s(["dropin-field__content"]),children:h&&d&&ke(h,{...d.props,id:m,key:d.key,disabled:l,size:i,error:!!n,success:!!o&&!n})}),e("div",{className:s(["dropin-field__hint",[`dropin-field__hint--${i}`,i],["dropin-field__hint--error",!!n],["dropin-field__hint--success",!!o&&!n],["dropin-field__hint--disabled",!!l]]),children:n||o||t})]})},Nt=({icon:a,className:r,children:n,active:t=!1,disabled:o=!1,...i})=>e("button",{role:"button",disabled:o,...i,className:s(["dropin-action-button",["dropin-action-button--active",t],["dropin-action-button--disabled",o],r]),children:[a&&e(y,{node:a,className:s(["dropin-action-button-icon"])}),n&&(typeof n=="string"?e("span",{children:n}):n)]}),gt=({className:a,variant:r="primary",activeOption:n,disabled:t=!1,dividers:o=!0,children:i,handleSelect:l,...d})=>{const[_,m]=A(n),h=T(c=>{t||c.props.disabled||(m(c.props.value),l&&l(c.props.value))},[l,m,t]),p=le.map(i,c=>{const u=t||c.props.disabled,f=c.props.value===_;return ye(c,{disabled:u,active:f,onClick:()=>h(c),className:s(["dropin-action-button-group__option",`dropin-action-button-group__option--${r}`,["dropin-action-button-group__option--active",f],["dropin-action-button-group__option--with-dividers",o]])})});return e("div",{role:"group",...d,className:s(["dropin-action-button-group",`dropin-action-button-group--${r}`,a]),children:p})},Ke=({variant:a="primary",className:r,children:n,...t})=>e("div",{...t,className:s(["dropin-card",`dropin-card--${a}`,r]),children:e("div",{class:"dropin-card__content",children:n})}),wt=({name:a,value:r,size:n="medium",disabled:t=!1,error:o=!1,label:i="",description:l="",className:d,checked:_,...m})=>{const[h,p]=A(_===void 0?!1:_),c=X(null),u=b=>{var v;(v=m.onChange)==null||v.call(m,b),p(b.currentTarget.checked)},f=b=>{var v;b.key===" "&&(b.preventDefault(),(v=c==null?void 0:c.current)==null||v.click())};return e("label",{className:s(["dropin-checkbox",["dropin-checkbox--disabled",t]]),children:[e("input",{ref:c,name:a,value:r,type:"checkbox",disabled:t,className:s(["dropin-checkbox__checkbox",["dropin-checkbox__checkbox--error",o],d]),...m,onChange:u,checked:h}),e("span",{"aria-checked":h?"true":"false","aria-labelledby":`${a}-label`,"aria-describedby":`${a}-description`,className:s(["dropin-checkbox__box",["dropin-checkbox__box--error",o],["dropin-checkbox__box--disabled",t]]),role:"checkbox",tabIndex:t?-1:0,onKeyDown:f,children:e(L,{className:s(["dropin-checkbox__checkmark"]),source:de,size:"16",stroke:"3"})}),e("div",{id:`${a}-label`,className:s(["dropin-checkbox__label",`dropin-checkbox__label--${n}`,["dropin-checkbox__label--disabled",t]]),children:i}),e("div",{}),e("div",{id:`${a}-description`,role:"note",className:s(["dropin-checkbox__description",`dropin-checkbox__description--${n}`,["dropin-checkbox__description--disabled",t]]),children:l})]})},kt=({className:a,name:r,value:n,id:t,label:o,groupAriaLabel:i,size:l="medium",color:d,disabled:_=!1,selected:m=!1,outOfStock:h=!1,multi:p=!1,onValue:c,onUpdateError:u,...f})=>{const b=D("Dropin.Swatches.outOfStock.label").label,v=D("Dropin.Swatches.selected.label").label,w=D("Dropin.Swatches.swatch.label").label,I=T(async x=>{if(c)try{await c(x)}catch(S){u&&u(S)}},[c,u]),E=x=>{const S=x.target;I(S.value)},O=d&&(x=>{const S=new Option().style;return S.color=x,S.color!==""})(d)?d:"var(--color-gray-300);",P=()=>h?`${i}: ${o} ${b}`:m?`${i}: ${o} ${v}`:`${i}: ${o} ${w}`;return e("label",{className:s(["dropin-color-swatch__container",`dropin-color-swatch__container--${l}`,a]),children:[e("input",{type:p?"checkbox":"radio",name:r,id:t,value:n,"aria-label":P(),checked:m,disabled:_,onChange:E,...f,className:s(["dropin-color-swatch",["dropin-color-swatch--selected",m],["dropin-color-swatch--disabled",_],a])}),e("span",{style:{"--bg-color":O},className:s(["dropin-color-swatch__span",["dropin-color-swatch__span--out-of-stock",h],a])})]})},yt=({className:a,name:r,value:n,label:t,groupAriaLabel:o,id:i,disabled:l=!1,selected:d=!1,outOfStock:_=!1,multi:m=!1,onValue:h,onUpdateError:p,...c})=>{const u=D("Dropin.Swatches.outOfStock.label").label,f=D("Dropin.Swatches.selected.label").label,b=D("Dropin.Swatches.swatch.label").label,[v,w]=A(!1),I=X(null),E=T(async O=>{if(h)try{await h(O)}catch(P){p&&p(P)}},[h,p]),$=O=>{const P=O.target;E(P.value)},k=()=>_?`${o}: ${t} ${u}`:d?`${o}: ${t} ${f}`:`${o}: ${t} ${b}`;return W(()=>{I.current&&I.current.scrollWidth>I.current.clientWidth&&w(!0)},[t]),e("div",{className:"dropin-text-swatch__container",...v?{"data-tooltip":t}:{},children:[e("input",{type:m?"checkbox":"radio",name:r,id:i,value:n,"aria-label":k(),checked:d,disabled:l,onChange:$,...c,className:s(["dropin-text-swatch",["dropin-text-swatch--selected",d],["dropin-text-swatch--disabled",l],a])}),e("label",{htmlFor:i,ref:I,className:s(["dropin-text-swatch__label",["dropin-text-swatch__label--out-of-stock",_],a]),children:t})]})},Ue=({ariaLabel:a,size:r="small",stroke:n="4",children:t,className:o,style:i,...l})=>{const d=["dropin-progress-spinner",`dropin-progress-spinner--shape-size-${r}`,`dropin-progress-spinner--shape-stroke-${n}`],_=D({updating:"Dropin.ProgressSpinner.updating.label",updatingChildren:"Dropin.ProgressSpinner.updatingChildren.label"}),m=()=>a||(t?_.updatingChildren:_.updating);return t?e("div",{...l,className:s(["dropin-progress-spinner-provider"]),"aria-live":"polite",role:"status",children:[e("div",{"aria-hidden":!0,children:t}),e("div",{"aria-label":m(),role:"status",className:s(["dropin-progress-spinner-background",o]),style:i}),e("div",{className:s(["dropin-progress-spinner-with-provider",...d]),"aria-hidden":!0})]}):e("div",{...l,className:s([o,...d]),"aria-live":"polite",role:"status","aria-label":m()})},It=({className:a,name:r,value:n,id:t,label:o,groupAriaLabel:i,src:l,alt:d,disabled:_=!1,selected:m=!1,outOfStock:h=!1,multi:p=!1,onValue:c,onUpdateError:u,...f})=>{const b=D("Dropin.Swatches.outOfStock.label").label,v=D("Dropin.Swatches.selected.label").label,w=D("Dropin.Swatches.swatch.label").label,I=T(async k=>{if(c)try{await c(k)}catch(O){u&&u(O)}},[c,u]),E=k=>{const O=k.target;I(O.value)},$=()=>h?`${i}: ${o} ${b}`:m?`${i}: ${o} ${v}`:`${i}: ${o} ${w}`;return e("label",{className:s(["dropin-image-swatch__container",a]),children:[e("input",{type:p?"checkbox":"radio",name:r,id:t,value:n,"aria-label":$(),checked:m,disabled:_,onChange:E,...f,className:s(["dropin-image-swatch",["dropin-image-swatch--selected",m],["dropin-image-swatch--disabled",_],a])}),e("span",{className:s(["dropin-image-swatch__span",["dropin-image-swatch__span--out-of-stock",h],a]),children:e(Me,{src:l,className:s(["dropin-image-swatch__content"]),params:{width:100,fit:"bounds",crop:!0},alt:d,loading:"lazy",onError:k=>k.target.style.display="none"})})]})},je=({className:a,children:r,title:n,secondaryText:t,actionIconPosition:o="left",iconOpen:i=K,iconClose:l=U,iconLeft:d=K,showIconLeft:_=!1,renderContentWhenClosed:m=!0,defaultOpen:h=!1,onStateChange:p,...c})=>{const[u,f]=A(h),b=$=>{$.stopImmediatePropagation();const k=!u;f(k),p==null||p(k)},v=D(`Dropin.Accordion.${u?"close":"open"}.label`).label,w=e(L,{source:i,size:"24",onClick:b,onKeyPress:b,className:"dropin-accordion-section__open-icon"}),I=e(L,{source:l,size:"24",onClick:b,onKeyPress:b,className:"dropin-accordion-section__close-icon"}),E=e(L,{source:d,size:"24"});return e("div",{...c,className:s(["dropin-accordion-section",a]),children:[e("div",{className:"dropin-accordion-section__heading",children:[e("div",{className:"dropin-accordion-section__flex",onClick:b,onKeyPress:b,role:"button","aria-label":`${v} ${n}`,tabIndex:0,children:e("div",{className:"dropin-accordion-section__title-container",children:[o==="left"&&(u?I:w),_&&E,e("h3",{className:"dropin-accordion-section__title",children:n})]})}),e("div",{className:"dropin-accordion-section__secondary-text-container",children:[t&&e("h4",{className:"dropin-accordion-section__secondary-text",children:t}),o==="right"&&(u?I:w)]})]}),e("div",{className:"dropin-accordion-section__content-container",style:{display:u?"grid":"none"},children:(u||m&&!u)&&r})]})},xt=({className:a,children:r,actionIconPosition:n="left",iconOpen:t=K,iconClose:o=U,...i})=>{const l=e(_e,{variant:"secondary"}),d=_=>e(B,{children:[e(je,{..._.props,actionIconPosition:n,iconOpen:t,iconClose:o}),l]});return e("div",{...i,className:s(["dropin-accordion",a]),children:[l,...(Array.isArray(r)?r:[r]).map(d)]})},Dt=({variant:a="primary",className:r,type:n="warning",additionalActions:t,onDismiss:o,heading:i,description:l,icon:d,itemList:_,actionButtonPosition:m,...h})=>{var c,u,f;const p=D({dismiss:"Dropin.InlineAlert.dismissLabel"});return e("div",{...h,className:s(["dropin-in-line-alert",`dropin-in-line-alert--${n}`,`dropin-in-line-alert--${a}`,r]),children:[e("div",{className:"dropin-in-line-alert__heading",children:[e("div",{className:"dropin-in-line-alert__title-container",children:[d&&e(y,{node:d,className:"dropin-in-line-alert__icon"}),e("span",{className:"dropin-in-line-alert__title",children:i})]}),e("div",{className:"dropin-in-line-alert__actions-container",children:[t&&(m==="top"||!m&&t.length<=1)&&e(R,{variant:"tertiary",className:"dropin-in-line-alert__additional-action",onClick:t.length>0?(c=t[0])==null?void 0:c.onClick:void 0,"aria-label":(u=t[0])==null?void 0:u.label,children:(f=t[0])==null?void 0:f.label}),o&&e(R,{icon:e(L,{source:j,size:"24",stroke:"2"}),className:"dropin-in-line-alert__dismiss-button",variant:"tertiary",onClick:o,"aria-label":p.dismiss})]})]}),l&&e("p",{className:"dropin-in-line-alert__description",children:l}),e("div",{className:"dropin-in-line-alert__item-list-container",children:_&&e(y,{node:_,className:s(["dropin-in-line-alert__item-list"])})}),t&&(m==="bottom"||!m&&t.length>1)&&e("div",{className:"dropin-in-line-alert__additional-actions-container",children:t.map(b=>e(R,{variant:"tertiary",className:"dropin-in-line-alert__additional-action",onClick:b.onClick,children:b.label},b.label))})]})},Et=({size:a="small",title:r=null,centered:n=!1,backgroundDim:t=!0,clickToDismiss:o=!0,escapeToDismiss:i=!0,onClose:l,showCloseButton:d=!0,className:_,children:m=null,...h})=>{const p=T(()=>{l==null||l()},[l]),c=D({modalCloseLabel:"Dropin.Modal.Close.label"});return W(()=>{const u=f=>{const b=document.querySelector(".dropin-modal"),v=document.querySelector(".dropin-modal__body");o&&b&&v&&!v.contains(f.target)&&p()};return document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[p,o]),W(()=>{const u=f=>{f.key==="Escape"&&i&&p()};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}},[p,i]),W(()=>{const u=document.scrollingElement,f=u.style.overflow;return u.style.overflow="hidden",()=>{u.style.overflow=f}},[]),e("div",{className:s(["dropin-modal",["dropin-modal--dim",t]]),children:e("div",{...h,className:s(["dropin-modal__body",[`dropin-modal__body--${a}`,a],_]),children:[e("div",{className:s(["dropin-modal__header",["dropin-modal__header-title",!!r]]),children:[r&&e("div",{className:s(["dropin-modal__header-title-content"]),children:r}),d&&e(R,{"aria-label":c.modalCloseLabel,variant:"tertiary",className:"dropin-modal__header-close-button",onClick:p,icon:e(j,{})})]}),e("div",{className:s(["dropin-modal__content",["dropin-modal__body--centered",n]]),children:m})]})})},$t=({className:a,children:r,ariaLabel:n,image:t,title:o,price:i,taxIncluded:l=!1,taxExcluded:d=!1,total:_,totalExcludingTax:m,sku:h,configurations:p,warning:c,alert:u,discount:f,savings:b,quantity:v,description:w,attributes:I,footer:E,loading:$=!1,updating:k=!1,quantityType:O,dropdownOptions:P,onQuantity:x,onRemove:S,...M})=>{var Y,Q;const{locale:G}=Ie(ce),C=D({each:"Dropin.CartItem.each.label",pricePerItem:"Dropin.CartItem.pricePerItem.label",quantity:"Dropin.CartItem.quantity.label",remove:"Dropin.CartItem.remove.label",removeDefault:"Dropin.CartItem.removeDefault.label",taxIncluded:"Dropin.CartItem.taxIncluded.label",taxExcluded:"Dropin.CartItem.taxExcluded.label",updating:"Dropin.CartItem.updating.label",updatingDefault:"Dropin.ProgressSpinner.updating.label"});if($)return e(ze,{});const ue=O==="dropdown"?e(Ge,{className:s(["dropin-cart-item__quantity__picker"]),value:String(v),name:"quantity","aria-label":C.quantity,disabled:k,variant:"primary",options:P,handleSelect:F=>x==null?void 0:x(Number(F.target.value))}):e(He,{className:s(["dropin-cart-item__quantity__incrementer"]),value:v,min:1,onValue:F=>x==null?void 0:x(Number(F)),name:"quantity","aria-label":C.quantity,disabled:k});return e("div",{...M,className:s(["dropin-cart-item",["dropin-cart-item--updating",k],a]),children:[k&&e(Ue,{className:s(["dropin-cart-item__spinner"]),ariaLabel:n?(Y=C.updating)==null?void 0:Y.replace("{product}",n):C.updatingDefault}),e("div",{className:"dropin-cart-item__wrapper",children:[t&&e(y,{node:t,className:s(["dropin-cart-item__image"])}),o&&e(y,{node:o,className:s(["dropin-cart-item__title",["dropin-cart-item__title--edit",!!x||!!S]])}),w&&e(y,{node:w,className:s(["dropin-cart-item__description"])}),h&&e(y,{node:h,className:s(["dropin-cart-item__sku"])}),e("div",{className:s(["dropin-cart-item__savings__wrapper"]),children:[f&&e(y,{node:f,className:s(["dropin-cart-item__discount","dropin-cart-item__discount__large-screen"])}),b&&e(y,{node:b,className:s(["dropin-cart-item__savings","dropin-cart-item__savings__large-screen"])})]}),I&&e("div",{className:s(["dropin-cart-item__attributes"]),children:e(y,{node:I})}),p&&e("ul",{className:s(["dropin-cart-item__configurations"]),children:Object.entries(p).map(([F,he])=>e("li",{className:s(["dropin-cart-item__configurations__item"]),children:[F,":"," ",e("strong",{className:s(["dropin-cart-item__configurations__item__value"]),children:he})]},F))}),i&&e("span",{className:s(["dropin-cart-item__price"]),"aria-label":C.pricePerItem,children:[v&&!x&&e(B,{children:[e("span",{className:"dropin-cart-item__price__quantity","aria-hidden":!0,children:[v.toLocaleString(G)," x"," "]}),e("div",{className:"dropin-cart-item__sr-only",children:[C.quantity,": ",v==null?void 0:v.toLocaleString(G),";"]})]}),e(y,{node:i,role:"text"}),v&&v>1&&e(B,{children:[" ",C.each]}),l&&e("span",{"data-testid":"tax-message",className:"dropin-cart-item__price-tax-message",children:[" ",C.taxIncluded]}),d&&e("span",{"data-testid":"tax-message",className:"dropin-cart-item__price-tax-message",children:[" ",C.taxExcluded]})]}),e("div",{className:s(["dropin-cart-item__quantity",["dropin-cart-item__quantity--edit",!!x]]),children:[x?ue:v&&e("span",{className:s(["dropin-cart-item__quantity__value"]),children:[C.quantity,":"," ",e("strong",{className:"dropin-cart-item__quantity__number",children:Number(v).toLocaleString(G)})]}),c&&e(y,{node:c,className:s(["dropin-cart-item__warning","dropin-cart-item__warning--quantity"])}),u&&e(y,{node:u,className:s(["dropin-cart-item__alert","dropin-cart-item__alert--quantity"])})]}),c&&e(y,{node:c,className:s(["dropin-cart-item__warning"])}),u&&e(y,{node:u,className:s(["dropin-cart-item__alert"])}),e("div",{className:s(["dropin-cart-item__total",["dropin-cart-item__total--edit",!!S]]),children:[e("div",{className:"dropin-cart-item__row-total__wrapper",children:[_&&e("div",{className:"dropin-cart-item__row-total",children:e(y,{node:_,role:"text"})}),l&&e("div",{className:"dropin-cart-item__total-tax-included",children:e("span",{"data-testid":"tax-message",className:s(["dropin-cart-item__total-tax-message"]),children:C.taxIncluded})})]}),d&&e("div",{className:"dropin-cart-item__total-tax-excluded",children:e("span",{"data-testid":"tax-message",className:s(["dropin-cart-item__total-tax-excluded-message"]),children:[m&&e(y,{node:m,role:"text"})," ",C.taxExcluded]})}),f&&e(y,{node:f,className:s(["dropin-cart-item__discount"])}),b&&e(y,{node:b,className:s(["dropin-cart-item__savings"])})]}),E&&e("div",{className:s(["dropin-cart-item__footer"]),children:e(y,{node:E})})]}),S&&e(R,{"data-testid":"cart-item-remove-button",className:s(["dropin-cart-item__remove"]),variant:"tertiary",onClick:()=>S==null?void 0:S(),icon:e(L,{"data-testid":"cart-item-remove-icon",source:Oe,size:"24",stroke:"2",viewBox:"0 0 24 24","aria-label":n?(Q=C.remove)==null?void 0:Q.replace("{product}",n):C.removeDefault}),disabled:k})]})},ze=()=>e("div",{className:"dropin-cart-item dropin-cart-item-skeleton",children:e(Ae,{className:"dropin-cart-item__skeleton dropin-cart-item__wrapper",children:[e("div",{className:"dropin-cart-item__image",children:e(H,{className:"dropin-cart-item__skeleton__item"})}),e("div",{className:"dropin-cart-item__title",children:e(H,{className:"dropin-cart-item__skeleton__item"})}),e("div",{className:"dropin-cart-item__sku",children:e(H,{className:"dropin-cart-item__skeleton__item"})}),e("div",{className:"dropin-cart-item__price",children:e(H,{className:"dropin-cart-item__skeleton__item"})}),e("div",{className:"dropin-cart-item__quantity",children:e(H,{className:"dropin-cart-item__skeleton__item"})}),e("div",{className:"dropin-cart-item__total",children:e(H,{className:"dropin-cart-item__skeleton__item"})})]})}),St=({className:a,children:r,...n})=>e("div",{...n,className:s(["dropin-cart-list",a]),children:e("div",{className:"dropin-cart-list__wrapper","aria-live":"assertive","aria-relevant":"all",children:le.map(r,(t,o)=>e("div",{className:"dropin-cart-list__item",children:t},o))})}),Tt=({className:a,children:r,locale:n,currency:t,amount:o,variant:i="default",minimumAmount:l,maximumAmount:d,size:_="small",display:m="dash",specialPrice:h,sale:p=!1,...c})=>{const u=q(()=>o||l===d||l&&!d||d&&!l,[o,d,l]);return e("div",{children:u?e("div",{...c,className:s(["dropin-price-range",a]),children:e(V,{amount:o??l??d,currency:t,locale:n,size:_,variant:i,sale:p})}):e("div",{...c,className:s(["dropin-price-range",a]),children:[m==="dash"?e(Ze,{specialPrice:h,minimumAmount:l,maximumAmount:d,currency:t,locale:n,size:_,sale:p}):null,m==="from to"?e(Je,{specialPrice:h,minimumAmount:l,maximumAmount:d,currency:t,locale:n,size:_,sale:p}):null,m==="as low as"?e(Xe,{specialPrice:h,minimumAmount:l,maximumAmount:d,currency:t,locale:n,size:_,sale:p}):null]})})};function Ze({specialPrice:a,minimumAmount:r,maximumAmount:n,currency:t,locale:o,size:i,sale:l}){return e(B,{children:[e(V,{amount:a??r,currency:t,locale:o,size:i,sale:!!a&&l}),e("span",{className:"dropin-price-range__separator",children:"-"}),e(V,{amount:n,currency:t,locale:o,size:i})]})}function Je({specialPrice:a,minimumAmount:r,maximumAmount:n,currency:t,locale:o,size:i,sale:l}){const d=D({from:"Dropin.PriceRange.from.label",to:"Dropin.PriceRange.to.label",asLowAs:"Dropin.PriceRange.asLowAs.label"});return e(B,{children:[e("span",{className:s(["dropin-price-range__from",`dropin-price-range__from--${i}`]),children:d.from}),e(V,{amount:a??r,currency:t,locale:o,size:i,sale:!!a&&l}),e("span",{className:s(["dropin-price-range__to",`dropin-price-range__to--${i}`]),children:d.to}),e(V,{amount:n,currency:t,locale:o,size:i})]})}function Xe({specialPrice:a,minimumAmount:r,maximumAmount:n,currency:t,locale:o,size:i,sale:l}){const d=D({from:"Dropin.PriceRange.from.label",to:"Dropin.PriceRange.to.label",asLowAs:"Dropin.PriceRange.asLowAs.label"});return e(B,{children:[e("span",{className:s(["dropin-price-range__as-low-as",`dropin-price-range__as-low-as--${i}`]),children:d.asLowAs}),a?e("div",{children:[e(V,{amount:n,currency:t,locale:o,size:i,variant:"strikethrough"}),e(V,{amount:a,currency:t,locale:o,size:i,className:"dropin-price-range__special",sale:!!a&&l})]}):e(V,{amount:r,currency:t,locale:o,size:i})]})}const Lt=({className:a,categories:r,separator:n,...t})=>e(B,{children:(r==null?void 0:r.length)>1&&e("nav",{role:"navigation",...t,className:s(["dropin-breadcrumbs__container",a]),children:e("ul",{className:"dropin-breadcrumbs__items",children:r==null?void 0:r.map((o,i)=>e("li",{className:s(["dropin-breadcrumbs__item",["dropin-breadcrumbs__item--last",i===r.length-1]]),children:[e(y,{node:o,className:"dropin-breadcrumbs__link"}),!n&&i!==r.length-1&&e("span",{className:"dropin-breadcrumbs__separator--default",children:[" ","/"," "]}),n&&i!==r.length-1&&e(y,{node:n,className:"dropin-breadcrumbs__separator--icon"})]},i))})})}),Ot=({className:a,variant:r,icon:n,message:t,onDismiss:o,action:i,...l})=>{const d=D({dismiss:"Dropin.InlineAlert.dismissLabel"});return e("div",{...l,className:s([a,"dropin-alert-banner",`dropin-alert-banner--${r}`]),children:[e("div",{className:"dropin-alert-banner__content",children:[n&&e(y,{node:n,"aria-hidden":"true",className:"dropin-alert-banner__icon"}),e(y,{node:t,className:s(["dropin-alert-banner__message"])})]}),e("div",{className:"dropin-alert-banner__actions",children:[i&&e(R,{variant:"tertiary",className:"dropin-alert-banner__action",onClick:i.onClick,"aria-label":i.label,children:i.label}),e(R,{icon:e(L,{source:j,size:"24",stroke:"2"}),className:"dropin-alert-banner__dismiss-button",variant:"primary",onClick:o,"aria-label":d.dismiss})]})]})},Pt=({className:a,icon:r,heading:n,headingLevel:t=2,message:o,action:i,variant:l="secondary",...d})=>{const _=t>=1&&t<=6?`h${t}`:"h2";return e("div",{...d,className:s(["dropin-illustrated-message",a]),children:e(Ke,{variant:l,children:[r&&e(y,{node:r,"aria-hidden":"true",size:"80",className:"dropin-illustrated-message__icon"}),n&&e(_,{className:"dropin-illustrated-message__heading",children:n}),o&&e(y,{node:o,className:"dropin-illustrated-message__message"}),i&&e(y,{node:i,className:"dropin-illustrated-message__action"})]})})},Ct=({className:a,label:r,name:n,value:t,selected:o=!0,onChange:i,icon:l,busy:d=!1,children:_,...m})=>e("div",{...m,className:s(["dropin-toggle-button",a,["dropin-toggle-button__selected",o]]),children:e("label",{className:"dropin-toggle-button__actionButton",children:[e(We,{label:"",name:n,value:t,checked:o,onChange:()=>i&&i(t),"aria-label":r,busy:d,className:s([a,"dropin-toggle-button__radioButton"])}),e("span",{className:"dropin-toggle-button__content",children:[l&&e(l.type,{...l==null?void 0:l.props,className:"dropin-toggle-button__icon"}),r]})]})}),At=({title:a=null,size:r="medium",cta:n,divider:t=!0,className:o,...i})=>a?e("div",{...i,className:s(["dropin-header-container",o]),"data-testid":"dropin-header-container",children:[e("span",{className:s(["dropin-header-container__title",["dropin-header-container__title--medium",r==="medium"],["dropin-header-container__title--large",r==="large"]]),children:a}),n?e(y,{node:n,className:"dropin-header-container__actions"}):null,t?e(_e,{className:s(["dropin-header-container__divider",["dropin-header-container__divider--medium",r==="medium"],["dropin-header-container__divider--large",r==="large"]])}):null]}):null,Vt=({label:a,className:r,...n})=>a?e("div",{...n,className:s(["dropin-tag-container",r]),"data-testid":"dropin-tag-container",children:e("span",{className:"dropin-tag-container__label",children:a})}):null,Rt=({className:a,children:r,maxColumns:n,emptyGridContent:t,...o})=>{const i=!!r&&(Array.isArray(r)?r.length>0:!0),l=i?{gridTemplateColumns:`repeat(${n}, 1fr)`}:void 0;return e("div",{...o,className:s(["dropin-content-grid",a]),tabindex:0,children:e("div",{"data-testid":"content-grid-content",className:s(["dropin-content-grid__content",["dropin-content-grid__dynamic-columns-content",!n],["dropin-content-grid__content--empty",!i]]),style:l,children:i?r:t})})},Bt=({totalPages:a=10,currentPage:r=1,onChange:n,className:t,...o})=>{const i=D({backwardButton:"Dropin.Pagination.backwardButton.ariaLabel",forwardButton:"Dropin.Pagination.forwardButton.ariaLabel"}),l=T(()=>{const p=Math.min(r+1,a);n==null||n(p)},[r,n,a]),d=T(()=>{const p=Math.max(r-1,1);n==null||n(p)},[r,n]),_=T(p=>{Ne(p)&&(n==null||n(p))},[n]),m=T((p,c)=>{let u=[];const f=(b,v)=>{for(let w=b;w<=v;w++)u.push({page:w,isActive:w===p,label:w})};return c<=5?f(1,c):p<=2?(f(1,2),u.push({page:"ellipsis",isActive:!1,label:"..."}),f(c-1,c)):p>=c-3?f(c-4,c):(f(p-1,p),u.push({page:"ellipsis",isActive:!1,label:"..."}),f(c-1,c)),u},[]),h=q(()=>m(r,a),[m,r,a]);return e("div",{...o,className:s(["dropin-pagination",t]),children:[e("button",{type:"button","data-testid":"prev-button","aria-label":i.backwardButton,disabled:r===1,onClick:d,className:s(["dropin-pagination-arrow","dropin-pagination-arrow--backward"]),children:e(L,{size:"24",source:J})}),e("ul",{className:"dropin-pagination_list",children:h.map((p,c)=>e("li",{"data-testid":`dropin-pagination_list-item--${p.page}`,className:s(["dropin-pagination_list-item",`dropin-pagination_list-item--${p.page}`,["dropin-pagination_list-item--active",p.isActive]]),children:e("button",{type:"button","data-testid":`set-page-button-${p.page}`,onClick:()=>_(p.page),children:p.label})},`${p.page}_${c}`))}),e("button",{type:"button","data-testid":"next-button","aria-label":i.forwardButton,disabled:r===a,onClick:l,className:s(["dropin-pagination-arrow","dropin-pagination-arrow--forward"]),children:e(L,{size:"24",source:J})})]})};export{xt as Accordion,je as AccordionSection,Nt as ActionButton,gt as ActionButtonGroup,Ot as AlertBanner,Lt as Breadcrumbs,R as Button,Ke as Card,$t as CartItem,ze as CartItemSkeleton,St as CartList,wt as Checkbox,kt as ColorSwatch,Rt as ContentGrid,_e as Divider,me as Field,At as Header,L as Icon,Pt as IllustratedMessage,Me as Image,It as ImageSwatch,Dt as InLineAlert,He as Incrementer,pe as Input,bt as InputDate,ft as InputPassword,Et as Modal,Bt as Pagination,Ge as Picker,V as Price,Tt as PriceRange,Ue as ProgressSpinner,We as RadioButton,Ae as Skeleton,H as SkeletonRow,Vt as Tag,vt as TextArea,yt as TextSwatch,Ct as ToggleButton,ce as UIContext,Ve as UIProvider,ht as provider};