Submit
Path:
~
/
home
/
getwphos
/
www
/
techniquetechs
/
wp-content
/
plugins
/
woocommerce
/
assets
/
client
/
blocks
/
File Content:
checkout.js
(()=>{var e,t,o,r={4592:(e,t,o)=>{"use strict";o.r(t);var r=o(1609),n=o(851),c=o(5573);const s=(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},(0,r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M5 3.75h14c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H5c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),(0,r.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.4 10.75c0-.47.38-.85.85-.85h9.5c.47 0 .85.38.85.85v1.5c0 .47-.38.85-.85.85h-9.5a.85.85 0 01-.85-.85v-1.5zm1.2.35v.8h8.8v-.8H7.6zM12.4 15.25c0-.47.38-.85.85-.85h3.5c.47 0 .85.38.85.85v1.5c0 .47-.38.85-.85.85h-3.5a.85.85 0 01-.85-.85v-1.5zm1.2.35v.8h2.8v-.8h-2.8zM6.5 15.9a.6.6 0 01.6-.6h2.8a.6.6 0 010 1.2H7.1a.6.6 0 01-.6-.6zM6.5 7.9a.6.6 0 01.6-.6h9.8a.6.6 0 110 1.2H7.1a.6.6 0 01-.6-.6z",clipRule:"evenodd"}));var a=o(7104);const i=window.wp.blocks,l=window.wp.blockEditor;var m=o(6087),d=o(9491);const u=(0,m.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),p=()=>(0,m.useContext)(u),h=({children:e,className:t=""})=>{const[o,c]=(()=>{const[e,{width:t}]=(0,d.useResizeObserver)();let o="";return t>700?o="is-large":t>520?o="is-medium":t>400?o="is-small":t&&(o="is-mobile"),[e,o]})(),s={hasContainerWidth:""!==c,containerClassName:c,isMobile:"is-mobile"===c,isSmall:"is-small"===c,isMedium:"is-medium"===c,isLarge:"is-large"===c};return(0,r.createElement)(u.Provider,{value:s},(0,r.createElement)("div",{className:(0,n.A)(t,c)},o,e))};o(1221);const g=({children:e,className:t})=>(0,r.createElement)(h,{className:(0,n.A)("wc-block-components-sidebar-layout",t)},e),_=window.wp.data,k=(0,m.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>({})}),b=()=>(0,m.useContext)(k),w=({children:e,currentPostId:t=0,previewData:o={},currentView:n="",isPreview:c=!1})=>{const s=(0,_.useSelect)((e=>t||e("core/editor").getCurrentPostId()),[t]),a=(0,m.useCallback)(((e,t={})=>o&&e in o?o[e]:t),[o]),i={isEditor:!0,currentPostId:s,currentView:n,previewData:o,getPreviewData:a,isPreview:c};return(0,r.createElement)(k.Provider,{value:i},e)},E=window.wp.plugins,y=window.wc.wcSettings;var v,f,S,C,P,N,A,x,I,R,T=o(2294),M=o(7723);const B=(0,y.getSetting)("wcBlocksConfig",{pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),D=B.pluginUrl+"assets/images/",O=(B.pluginUrl,null===(v=y.STORE_PAGES.shop)||void 0===v||v.permalink,null===(f=y.STORE_PAGES.checkout)||void 0===f?void 0:f.id),F=(null===(S=y.STORE_PAGES.checkout)||void 0===S||S.permalink,null===(C=y.STORE_PAGES.privacy)||void 0===C?void 0:C.permalink),L=(null===(P=y.STORE_PAGES.privacy)||void 0===P||P.title,null===(N=y.STORE_PAGES.terms)||void 0===N?void 0:N.permalink),j=(null===(A=y.STORE_PAGES.terms)||void 0===A||A.title,null===(x=y.STORE_PAGES.cart)||void 0===x?void 0:x.id),V=null===(I=y.STORE_PAGES.cart)||void 0===I?void 0:I.permalink,U=(null!==(R=y.STORE_PAGES.myaccount)&&void 0!==R&&R.permalink?y.STORE_PAGES.myaccount.permalink:(0,y.getSetting)("wpLoginUrl","/wp-login.php"),(0,y.getSetting)("localPickupEnabled",!1)),$=((0,y.getSetting)("shippingMethodsExist",!1),(0,y.getSetting)("shippingEnabled",!0)),H=(0,y.getSetting)("countries",{}),q=(0,y.getSetting)("countryData",{}),z=Object.fromEntries(Object.keys(q).filter((e=>!0===q[e].allowBilling)).map((e=>[e,H[e]||""]))),W=Object.fromEntries(Object.keys(q).filter((e=>!0===q[e].allowBilling)).map((e=>[e,q[e].states||{}]))),Y=Object.fromEntries(Object.keys(q).filter((e=>!0===q[e].allowShipping)).map((e=>[e,H[e]||""]))),G=Object.fromEntries(Object.keys(q).filter((e=>!0===q[e].allowShipping)).map((e=>[e,q[e].states||{}]))),K=Object.fromEntries(Object.keys(q).map((e=>[e,q[e].locale||{}]))),Z={address:["first_name","last_name","company","address_1","address_2","city","postcode","country","state","phone"],contact:["email"],order:[]},J=(0,y.getSetting)("addressFieldsLocations",Z).address,X=(0,y.getSetting)("addressFieldsLocations",Z).contact,Q=(0,y.getSetting)("addressFieldsLocations",Z).order,ee=((0,y.getSetting)("additionalOrderFields",{}),(0,y.getSetting)("additionalContactFields",{}),(0,y.getSetting)("additionalAddressFields",{}),({imageUrl:e=`${D}/block-error.svg`,header:t=(0,M.__)("Oops!","woocommerce"),text:o=(0,M.__)("There was an error loading the content.","woocommerce"),errorMessage:n,errorMessagePrefix:c=(0,M.__)("Error:","woocommerce"),button:s,showErrorBlock:a=!0})=>a?(0,r.createElement)("div",{className:"wc-block-error wc-block-components-error"},e&&(0,r.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:e,alt:""}),(0,r.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},t&&(0,r.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},t),o&&(0,r.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},o),n&&(0,r.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},c?c+" ":"",n),s&&(0,r.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},s))):null);o(9407);class te extends m.Component{constructor(...e){super(...e),(0,T.A)(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:o=!0,showErrorBlock:n=!0,text:c,errorMessagePrefix:s,renderError:a,button:i}=this.props,{errorMessage:l,hasError:m}=this.state;return m?"function"==typeof a?a({errorMessage:l}):(0,r.createElement)(ee,{showErrorBlock:n,errorMessage:o?l:null,header:e,imageUrl:t,text:c,errorMessagePrefix:s,button:i}):this.props.children}}const oe=te,re=window.wc.wcBlocksData;var ne=o(4040),ce=o.n(ne);let se=function(e){return e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback",e}({});const ae={},ie=(e=ae,{type:t,eventType:o,id:r,callback:n,priority:c})=>{const s=e.hasOwnProperty(o)?new Map(e[o]):new Map;switch(t){case se.ADD_EVENT_CALLBACK:return s.set(r,{priority:c,callback:n}),{...e,[o]:s};case se.REMOVE_EVENT_CALLBACK:return s.delete(r),{...e,[o]:s}}},le=(e,t)=>(o,r=10)=>{const n=((e,t,o=10)=>({id:Math.floor(Math.random()*Date.now()).toString(),type:se.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:o}))(e,o,r);return t(n),()=>{var o;t((o=e,{id:n.id,type:se.REMOVE_EVENT_CALLBACK,eventType:o}))}},me=(0,m.createContext)({onPaymentProcessing:()=>()=>()=>{},onPaymentSetup:()=>()=>()=>{}}),de=({children:e})=>{const{isProcessing:t,isIdle:o,isCalculating:n,hasError:c}=(0,_.useSelect)((e=>{const t=e(re.checkoutStore);return{isProcessing:t.isProcessing(),isIdle:t.isIdle(),hasError:t.hasError(),isCalculating:t.isCalculating()}})),{isPaymentReady:s}=(0,_.useSelect)((e=>{const t=e(re.paymentStore);return{isPaymentProcessing:t.isPaymentProcessing(),isPaymentReady:t.isPaymentReady()}})),{setValidationErrors:a}=(0,_.useDispatch)(re.validationStore),[i,l]=(0,m.useReducer)(ie,{}),{onPaymentSetup:d}=(e=>(0,m.useMemo)((()=>({onPaymentSetup:le("payment_setup",e)})),[e]))(l),u=(0,m.useRef)(i);(0,m.useEffect)((()=>{u.current=i}),[i]);const{__internalSetPaymentProcessing:p,__internalSetPaymentIdle:h,__internalEmitPaymentProcessingEvent:g}=(0,_.useDispatch)(re.paymentStore);(0,m.useEffect)((()=>{!t||c||n||(p(),g(u.current,a))}),[t,c,n,p,g,a]),(0,m.useEffect)((()=>{o&&!s&&h()}),[o,s,h]),(0,m.useEffect)((()=>{c&&s&&h()}),[c,s,h]);const k={onPaymentProcessing:(0,m.useMemo)((()=>function(...e){return ce()("onPaymentProcessing",{alternative:"onPaymentSetup",plugin:"WooCommerce Blocks"}),d(...e)}),[d]),onPaymentSetup:d};return(0,r.createElement)(me.Provider,{value:k},e)},ue={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},pe={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},he={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:e=>e,shippingErrorTypes:ue,onShippingRateSuccess:()=>()=>{},onShippingRateFail:()=>()=>{},onShippingRateSelectSuccess:()=>()=>{},onShippingRateSelectFail:()=>()=>{}},ge=(e,{type:t})=>Object.values(ue).includes(t)?t:e,_e="shipping_rates_success",ke="shipping_rates_fail",be="shipping_rate_select_success",we="shipping_rate_select_fail",Ee=e=>({onSuccess:le(_e,e),onFail:le(ke,e),onSelectSuccess:le(be,e),onSelectFail:le(we,e)}),ye=window.wc.wcTypes;let ve=function(e){return e.CART="wc/cart",e.CHECKOUT="wc/checkout",e.PAYMENTS="wc/checkout/payments",e.EXPRESS_PAYMENTS="wc/checkout/express-payments",e.CONTACT_INFORMATION="wc/checkout/contact-information",e.SHIPPING_ADDRESS="wc/checkout/shipping-address",e.BILLING_ADDRESS="wc/checkout/billing-address",e.SHIPPING_METHODS="wc/checkout/shipping-methods",e.CHECKOUT_ACTIONS="wc/checkout/checkout-actions",e.ORDER_INFORMATION="wc/checkout/order-information",e}({});const fe=async(e,t,o)=>{const r=((e,t)=>e[t]?Array.from(e[t].values()).sort(((e,t)=>e.priority-t.priority)):[])(e,t),n=[];for(const e of r)try{const t=await Promise.resolve(e.callback(o));"object"==typeof t&&n.push(t)}catch(e){console.error(e)}return!n.length||n};var Se=o(458),Ce=o.n(Se);const Pe=window.wp.htmlEntities,Ne=Object.entries(K).reduce(((e,[t,o])=>(e[t]=Object.entries(o).reduce(((e,[t,o])=>(e[t]=(e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=(0,M.sprintf)(/* translators: %s Field label. */ /* translators: %s Field label. */ (0,M.__)("%s (optional)","woocommerce"),e.label)),e.index&&((0,ye.isNumber)(e.index)&&(t.index=e.index),(0,ye.isString)(e.index)&&(t.index=parseInt(e.index,10))),e.hidden&&(t.required=!1),t})(o),e)),{}),e)),{}),Ae=(e,t,o="")=>{const r=o&&void 0!==Ne[o]?Ne[o]:{};return e.map((e=>({key:e,...t[e]||{},...r[e]||{}}))).sort(((e,t)=>e.index-t.index))},xe=window.wp.url,Ie=(e,t)=>e in t,Re=e=>{const t=Ae(J,y.defaultFields,e.country),o=Object.assign({},e);return t.forEach((({key:t,hidden:r})=>{r&&Ie(t,e)&&(o[t]="")})),o},Te=(e,t=[])=>{if(!e.country)return!1;const o=Ae(J,y.defaultFields,e.country);return(t.length>0?o.filter((({key:e})=>t.includes(e))):o).every((({key:t,hidden:o,required:r})=>!(!o&&r)||Ie(t,e)&&""!==e[t]))},Me=window.CustomEvent||null,Be=(e,t,o=!1,r=!1)=>{if("function"!=typeof jQuery)return()=>{};const n=()=>{((e,{bubbles:t=!1,cancelable:o=!1,element:r,detail:n={}})=>{if(!Me)return;r||(r=document.body);const c=new Me(e,{bubbles:t,cancelable:o,detail:n});r.dispatchEvent(c)})(t,{bubbles:o,cancelable:r})};return jQuery(document).on(e,n),()=>jQuery(document).off(e,n)},De=e=>{const t=null==e?void 0:e.detail;t&&t.preserveCartData||(0,_.dispatch)(re.cartStore).invalidateResolutionForStore()},Oe=e=>{(null!=e&&e.persisted||"back_forward"===(window.performance&&window.performance.getEntriesByType("navigation").length?window.performance.getEntriesByType("navigation")[0].type:""))&&(0,_.dispatch)(re.cartStore).invalidateResolutionForStore()},Fe=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},Le={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},je={...Le,email:""},Ve={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:re.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},Ue=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(0,Pe.decodeEntities)(t)]))),$e={cartCoupons:re.EMPTY_CART_COUPONS,cartItems:re.EMPTY_CART_ITEMS,cartFees:re.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,crossSellsProducts:re.EMPTY_CART_CROSS_SELLS,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:re.EMPTY_CART_ITEM_ERRORS,cartTotals:Ve,cartIsLoading:!0,cartErrors:re.EMPTY_CART_ERRORS,billingData:je,billingAddress:je,shippingAddress:Le,shippingRates:re.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentMethods:re.EMPTY_PAYMENT_METHODS,paymentRequirements:re.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},receiveCartContents:()=>{},extensions:re.EMPTY_EXTENSIONS},He=(e={shouldSelect:!0})=>{const{shouldSelect:t}=e,{isEditor:o,previewData:r}=b(),n=null==r?void 0:r.previewCart,c=(0,m.useRef)(),s=(0,m.useRef)(je),a=(0,m.useRef)(Le);(0,m.useEffect)((()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),(null===(e=window.wcBlocksStoreCartListeners)||void 0===e?void 0:e.count)>0)return void window.wcBlocksStoreCartListeners.count++;var e;document.body.addEventListener("wc-blocks_added_to_cart",De),document.body.addEventListener("wc-blocks_removed_from_cart",De),window.addEventListener("pageshow",Oe);const t=Be("added_to_cart","wc-blocks_added_to_cart"),o=Be("removed_from_cart","wc-blocks_removed_from_cart");window.wcBlocksStoreCartListeners.count=1,window.wcBlocksStoreCartListeners.remove=()=>{document.body.removeEventListener("wc-blocks_added_to_cart",De),document.body.removeEventListener("wc-blocks_removed_from_cart",De),window.removeEventListener("pageshow",Oe),t(),o()}})(),Fe)),[]);const i=(0,_.useSelect)(((e,{dispatch:r})=>{if(!t)return $e;if(o)return{...$e,cartCoupons:n.coupons,cartItems:n.items,crossSellsProducts:n.cross_sells,cartFees:n.fees,cartItemsCount:n.items_count,cartItemsWeight:n.items_weight,cartNeedsPayment:n.needs_payment,cartNeedsShipping:n.needs_shipping,cartTotals:n.totals,shippingRates:n.shipping_rates,cartHasCalculatedShipping:n.has_calculated_shipping,paymentMethods:n.payment_methods,paymentRequirements:n.payment_requirements,cartIsLoading:!1,receiveCart:"function"==typeof(null==n?void 0:n.receiveCart)?n.receiveCart:()=>{},receiveCartContents:"function"==typeof(null==n?void 0:n.receiveCartContents)?n.receiveCartContents:()=>{}};const c=e(re.cartStore),i=c.getCartData(),l=c.getCartErrors(),m=c.getCartTotals(),d=!c.hasFinishedResolution("getCartData"),u=c.isCustomerDataUpdating(),{receiveCart:p,receiveCartContents:h}=r(re.cartStore),g=i.fees.length>0?i.fees.map((e=>Ue(e))):re.EMPTY_CART_FEES,_=i.coupons.length>0?i.coupons.map((e=>({...e,label:e.code}))):re.EMPTY_CART_COUPONS,k=Re(Ue(i.billingAddress)),b=i.needsShipping?Re(Ue(i.shippingAddress)):k;return Ce()(k,s.current)||(s.current=k),Ce()(b,a.current)||(a.current=b),{cartCoupons:_,cartItems:i.items,crossSellsProducts:i.crossSells,cartFees:g,cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors,cartTotals:m,cartIsLoading:d,cartErrors:l,billingData:s.current,billingAddress:s.current,shippingAddress:a.current,extensions:i.extensions,shippingRates:i.shippingRates,isLoadingRates:u,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements,receiveCart:p,receiveCartContents:h}}),[t,o]);return c.current&&Ce()(c.current,i)||(c.current=i),c.current},qe=e=>e.length,ze=(0,y.getSetting)("collectableMethodIds",[]),We=e=>ze.includes(e.method_id),Ye=e=>!!U&&(Array.isArray(e)?!!e.find((e=>ze.includes(e))):ze.includes(e)),Ge=e=>e.some((e=>!!e.shipping_rates.length)),Ke=e=>Object.fromEntries(e.map((({package_id:e,shipping_rates:t})=>{var o;return[e,(null===(o=t.find((e=>e.selected)))||void 0===o?void 0:o.rate_id)||""]})));var Ze=o(923),Je=o.n(Ze);const Xe={currency_code:y.SITE_CURRENCY.code,currency_symbol:y.SITE_CURRENCY.symbol,currency_minor_unit:y.SITE_CURRENCY.minorUnit,currency_decimal_separator:y.SITE_CURRENCY.decimalSeparator,currency_thousand_separator:y.SITE_CURRENCY.thousandSeparator,currency_prefix:y.SITE_CURRENCY.prefix,currency_suffix:y.SITE_CURRENCY.suffix},Qe=(e,t=2)=>{const o=y.SITE_CURRENCY.minorUnit;if(o===t||!e)return e;const r=Math.pow(10,o);return(Math.round(parseInt(e,10)/Math.pow(10,t))*r).toString()},et=(0,y.getSetting)("localPickupEnabled",!1),tt=(0,y.getSetting)("localPickupText",(0,M.__)("Local pickup","woocommerce")),ot=(0,y.getSetting)("localPickupCost",""),rt=et?(0,y.getSetting)("localPickupLocations",[]):[],nt=rt?Object.values(rt).map(((e,t)=>({...Xe,name:`${tt} (${e.name})`,description:"",delivery_time:"",price:Qe(ot,0)||"0",taxes:"0",rate_id:`pickup_location:${t+1}`,instance_id:t+1,meta_data:[{key:"pickup_location",value:e.name},{key:"pickup_address",value:e.formatted_address},{key:"pickup_details",value:e.details}],method_id:"pickup_location",selected:!1}))):[],ct=[{destination:{address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},package_id:0,name:(0,M.__)("Shipping","woocommerce"),items:[{key:"33e75ff09dd601bbe69f351039152189",name:(0,M._x)("Beanie with Logo","example product in Cart Block","woocommerce"),quantity:2},{key:"6512bd43d9caa6e02c990b0a82652dca",name:(0,M._x)("Beanie","example product in Cart Block","woocommerce"),quantity:1}],shipping_rates:[{...Xe,name:(0,M.__)("Flat rate shipping","woocommerce"),description:"",delivery_time:"",price:Qe("500"),taxes:"0",rate_id:"flat_rate:0",instance_id:0,meta_data:[],method_id:"flat_rate",selected:!1},{...Xe,name:(0,M.__)("Free shipping","woocommerce"),description:"",delivery_time:"",price:"0",taxes:"0",rate_id:"free_shipping:1",instance_id:0,meta_data:[],method_id:"flat_rate",selected:!0},...nt]}],st=(0,y.getSetting)("displayCartPricesIncludingTax",!1),at={coupons:[],shipping_rates:(0,y.getSetting)("shippingMethodsExist",!1)||(0,y.getSetting)("localPickupEnabled",!1)?ct:[],items:[{key:"1",id:1,type:"simple",quantity:2,catalog_visibility:"visible",name:(0,M.__)("Beanie","woocommerce"),summary:(0,M.__)("Beanie","woocommerce"),short_description:(0,M.__)("Warm hat for winter","woocommerce"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-beanie",permalink:"https://example.org",low_stock_remaining:2,backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,quantity_limits:{minimum:1,maximum:99,multiple_of:1,editable:!0},images:[{id:10,src:D+"previews/beanie.jpg",thumbnail:D+"previews/beanie.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:(0,M.__)("Color","woocommerce"),value:(0,M.__)("Yellow","woocommerce")},{attribute:(0,M.__)("Size","woocommerce"),value:(0,M.__)("Small","woocommerce")}],prices:{...Xe,price:Qe(st?"12000":"10000"),regular_price:Qe(st?"120":"100"),sale_price:Qe(st?"12000":"10000"),price_range:null,raw_prices:{precision:6,price:st?"12000000":"10000000",regular_price:st?"12000000":"10000000",sale_price:st?"12000000":"10000000"}},totals:{...Xe,line_subtotal:Qe("2000"),line_subtotal_tax:Qe("400"),line_total:Qe("2000"),line_total_tax:Qe("400")},extensions:{},item_data:[]},{key:"2",id:2,type:"simple",quantity:1,catalog_visibility:"visible",name:(0,M.__)("Cap","woocommerce"),summary:(0,M.__)("Cap","woocommerce"),short_description:(0,M.__)("Lightweight baseball cap","woocommerce"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-cap",low_stock_remaining:null,permalink:"https://example.org",backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,quantity_limits:{minimum:1,maximum:99,multiple_of:1,editable:!0},images:[{id:11,src:D+"previews/cap.jpg",thumbnail:D+"previews/cap.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:(0,M.__)("Color","woocommerce"),value:(0,M.__)("Orange","woocommerce")}],prices:{...Xe,price:Qe(st?"2400":"2000"),regular_price:Qe(st?"2400":"2000"),sale_price:Qe(st?"2400":"2000"),price_range:null,raw_prices:{precision:6,price:st?"24000000":"20000000",regular_price:st?"24000000":"20000000",sale_price:st?"24000000":"20000000"}},totals:{...Xe,line_subtotal:Qe("2000"),line_subtotal_tax:Qe("400"),line_total:Qe("2000"),line_total_tax:Qe("400")},extensions:{},item_data:[]}],cross_sells:[{id:1,name:(0,M.__)("Polo","woocommerce"),slug:"polo",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-polo",short_description:(0,M.__)("Polo","woocommerce"),description:(0,M.__)("Polo","woocommerce"),on_sale:!1,prices:{...Xe,price:Qe(st?"24000":"20000"),regular_price:Qe(st?"24000":"20000"),sale_price:Qe(st?"12000":"10000"),price_range:null},price_html:"",average_rating:"4.5",review_count:2,images:[{id:17,src:D+"previews/polo.jpg",thumbnail:D+"previews/polo.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}},{id:2,name:(0,M.__)("Long Sleeve Tee","woocommerce"),slug:"long-sleeve-tee",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-long-sleeve-tee",short_description:(0,M.__)("Long Sleeve Tee","woocommerce"),description:(0,M.__)("Long Sleeve Tee","woocommerce"),on_sale:!1,prices:{...Xe,price:Qe(st?"30000":"25000"),regular_price:Qe(st?"30000":"25000"),sale_price:Qe(st?"30000":"25000"),price_range:null},price_html:"",average_rating:"4",review_count:2,images:[{id:17,src:D+"previews/long-sleeve-tee.jpg",thumbnail:D+"previews/long-sleeve-tee.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}},{id:3,name:(0,M.__)("Hoodie with Zipper","woocommerce"),slug:"hoodie-with-zipper",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-hoodie-with-zipper",short_description:(0,M.__)("Hoodie with Zipper","woocommerce"),description:(0,M.__)("Hoodie with Zipper","woocommerce"),on_sale:!0,prices:{...Xe,price:Qe(st?"15000":"12500"),regular_price:Qe(st?"30000":"25000"),sale_price:Qe(st?"15000":"12500"),price_range:null},price_html:"",average_rating:"1",review_count:2,images:[{id:17,src:D+"previews/hoodie-with-zipper.jpg",thumbnail:D+"previews/hoodie-with-zipper.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}},{id:4,name:(0,M.__)("Hoodie with Logo","woocommerce"),slug:"hoodie-with-logo",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-hoodie-with-logo",short_description:(0,M.__)("Polo","woocommerce"),description:(0,M.__)("Polo","woocommerce"),on_sale:!1,prices:{...Xe,price:Qe(st?"4500":"4250"),regular_price:Qe(st?"4500":"4250"),sale_price:Qe(st?"4500":"4250"),price_range:null},price_html:"",average_rating:"5",review_count:2,images:[{id:17,src:D+"previews/hoodie-with-logo.jpg",thumbnail:D+"previews/hoodie-with-logo.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}},{id:5,name:(0,M.__)("Hoodie with Pocket","woocommerce"),slug:"hoodie-with-pocket",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-hoodie-with-pocket",short_description:(0,M.__)("Hoodie with Pocket","woocommerce"),description:(0,M.__)("Hoodie with Pocket","woocommerce"),on_sale:!0,prices:{...Xe,price:Qe(st?"3500":"3250"),regular_price:Qe(st?"4500":"4250"),sale_price:Qe(st?"3500":"3250"),price_range:null},price_html:"",average_rating:"3.75",review_count:4,images:[{id:17,src:D+"previews/hoodie-with-pocket.jpg",thumbnail:D+"previews/hoodie-with-pocket.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}},{id:6,name:(0,M.__)("T-Shirt","woocommerce"),slug:"t-shirt",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-t-shirt",short_description:(0,M.__)("T-Shirt","woocommerce"),description:(0,M.__)("T-Shirt","woocommerce"),on_sale:!1,prices:{...Xe,price:Qe(st?"1800":"1500"),regular_price:Qe(st?"1800":"1500"),sale_price:Qe(st?"1800":"1500"),price_range:null},price_html:"",average_rating:"3",review_count:2,images:[{id:17,src:D+"previews/tshirt.jpg",thumbnail:D+"previews/tshirt.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}}],fees:[{id:"fee",name:(0,M.__)("Fee","woocommerce"),totals:{...Xe,total:Qe("100"),total_tax:Qe("20")}}],items_count:3,items_weight:0,needs_payment:!0,needs_shipping:$,has_calculated_shipping:!0,shipping_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},billing_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},totals:{...Xe,total_items:Qe("4000"),total_items_tax:Qe("800"),total_fees:Qe("100"),total_fees_tax:Qe("20"),total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:Qe("820"),total_price:Qe("4920"),tax_lines:[{name:(0,M.__)("Sales tax","woocommerce"),rate:"20%",price:Qe("820")}]},errors:[],payment_methods:["cod","bacs","cheque"],payment_requirements:["products"],extensions:{}},it=window.wp.hooks,lt=()=>({dispatchStoreEvent:(0,m.useCallback)(((e,t={})=>{try{(0,it.doAction)(`experimental__woocommerce_blocks-${e}`,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:(0,m.useCallback)(((e,t={})=>{try{(0,it.doAction)(`experimental__woocommerce_blocks-checkout-${e}`,{...t,storeCart:(0,_.select)("wc/store/cart").getCartData()})}catch(e){console.error(e)}}),[])}),mt=()=>{const{isEditor:e}=b(),{shippingRates:t,needsShipping:o,hasCalculatedShipping:r,isLoadingRates:n,isCollectable:c,isSelectingRate:s}=(0,_.useSelect)((t=>{const o=t(re.cartStore),r=e?at.shipping_rates:o.getShippingRates();return{shippingRates:r,needsShipping:e?at.needs_shipping:o.getNeedsShipping(),hasCalculatedShipping:e?at.has_calculated_shipping:o.getHasCalculatedShipping(),isLoadingRates:!e&&o.isCustomerDataUpdating(),isCollectable:r.every((({shipping_rates:e})=>e.find((({method_id:e})=>Ye(e))))),isSelectingRate:!e&&o.isShippingRateBeingSelected()}}),[e]),a=(0,m.useRef)({});(0,m.useEffect)((()=>{const e=Ke(t);(0,ye.isObject)(e)&&!Je()(a.current,e)&&(a.current=e)}),[t]);const{selectShippingRate:i}=(0,_.useDispatch)(re.cartStore),l=Ye(Object.values(a.current).map((e=>e.split(":")[0]))),{dispatchCheckoutEvent:d}=lt(),u=(0,m.useCallback)(((e,t)=>{let o;void 0!==e&&(o=Ye(e.split(":")[0])?i(e,null):i(e,t),o.then((()=>{d("set-selected-shipping-rate",{shippingRateId:e})})).catch((e=>{(0,re.processErrorResponse)(e)})))}),[i,d]);return{isSelectingRate:s,selectedRates:a.current,selectShippingRate:u,shippingRates:t,needsShipping:o,hasCalculatedShipping:r,isLoadingRates:n,isCollectable:c,hasSelectedLocalPickup:l}},{NONE:dt,INVALID_ADDRESS:ut,UNKNOWN:pt}=ue,ht=(0,m.createContext)(he),gt=()=>(0,m.useContext)(ht),_t=({children:e})=>{const{__internalIncrementCalculating:t,__internalDecrementCalculating:o}=(0,_.useDispatch)(re.checkoutStore),{shippingRates:n,isLoadingRates:c,cartErrors:s}=He(),{selectedRates:a,isSelectingRate:i}=mt(),[l,d]=(0,m.useReducer)(ge,dt),[u,p]=(0,m.useReducer)(ie,{}),h=(0,m.useRef)(u),g=(0,m.useMemo)((()=>({onShippingRateSuccess:Ee(p).onSuccess,onShippingRateFail:Ee(p).onFail,onShippingRateSelectSuccess:Ee(p).onSelectSuccess,onShippingRateSelectFail:Ee(p).onSelectFail})),[p]);(0,m.useEffect)((()=>{h.current=u}),[u]),(0,m.useEffect)((()=>{c?t():o()}),[c,t,o]),(0,m.useEffect)((()=>{i?t():o()}),[t,o,i]),(0,m.useEffect)((()=>{s.length>0&&s.some((e=>!(!e.code||!Object.values(pe).includes(e.code))))?d({type:ut}):d({type:dt})}),[s]);const k=(0,m.useMemo)((()=>({isPristine:l===dt,isValid:l===dt,hasInvalidAddress:l===ut,hasError:l===pt||l===ut})),[l]);(0,m.useEffect)((()=>{c||0!==n.length&&!k.hasError||fe(h.current,ke,{hasInvalidAddress:k.hasInvalidAddress,hasError:k.hasError})}),[n,c,k.hasError,k.hasInvalidAddress]),(0,m.useEffect)((()=>{!c&&n.length>0&&!k.hasError&&fe(h.current,_e,n)}),[n,c,k.hasError]),(0,m.useEffect)((()=>{i||(k.hasError?fe(h.current,we,{hasError:k.hasError,hasInvalidAddress:k.hasInvalidAddress}):fe(h.current,be,a.current))}),[a,i,k.hasError,k.hasInvalidAddress]);const b={shippingErrorStatus:k,dispatchErrorStatus:d,shippingErrorTypes:ue,...g};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(ht.Provider,{value:b},e))};function kt(e,t){const o=(0,m.useRef)();return(0,m.useEffect)((()=>{o.current===e||t&&!t(e,o.current)||(o.current=e)}),[e,t]),o.current}const bt=window.wp.notices,wt=window.wc.blocksCheckoutEvents,Et={},yt={},vt=()=>Et,ft=()=>yt,St=(0,m.createContext)({onSubmit:()=>{},onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},onCheckoutSuccess:()=>()=>{},onCheckoutFail:()=>()=>{},onCheckoutValidation:()=>()=>{}}),Ct=({children:e,redirectUrl:t})=>{const o=vt(),n=ft(),{isEditor:c}=b(),{__internalUpdateAvailablePaymentMethods:s}=(0,_.useDispatch)(re.paymentStore);(0,m.useEffect)((()=>{(c||0!==Object.keys(o).length||0!==Object.keys(n).length)&&s()}),[c,o,n,s]);const{__internalSetRedirectUrl:a,__internalEmitValidateEvent:i,__internalEmitAfterProcessingEvents:l,__internalSetBeforeProcessing:d}=(0,_.useDispatch)(re.checkoutStore),{checkoutRedirectUrl:u,checkoutStatus:p,isCheckoutBeforeProcessing:h,isCheckoutAfterProcessing:g,checkoutHasError:k,checkoutOrderId:w,checkoutOrderNotes:E,checkoutCustomerId:y}=(0,_.useSelect)((e=>{const t=e(re.checkoutStore);return{checkoutRedirectUrl:t.getRedirectUrl(),checkoutStatus:t.getCheckoutStatus(),isCheckoutBeforeProcessing:t.isBeforeProcessing(),isCheckoutAfterProcessing:t.isAfterProcessing(),checkoutHasError:t.hasError(),checkoutOrderId:t.getOrderId(),checkoutOrderNotes:t.getOrderNotes(),checkoutCustomerId:t.getCustomerId()}}));t&&t!==u&&a(t);const{setValidationErrors:v}=(0,_.useDispatch)(re.validationStore),{dispatchCheckoutEvent:f}=lt(),S=Object.values(ve).filter((e=>e!==ve.PAYMENTS&&e!==ve.EXPRESS_PAYMENTS)),C=(0,_.useSelect)((e=>{const{getNotices:t}=e(bt.store);return S.reduce(((e,o)=>[...e,...t(o)]),[])}),[S]),{paymentNotices:P,expressPaymentNotices:N}=(0,_.useSelect)((e=>{const{getNotices:t}=e(bt.store);return{paymentNotices:t(ve.PAYMENTS),expressPaymentNotices:t(ve.EXPRESS_PAYMENTS)}}),[]),[A]=(0,m.useReducer)(ie,{}),x=(0,m.useRef)(A),{onCheckoutValidation:I,onCheckoutSuccess:R,onCheckoutFail:T}=wt.checkoutEvents;(0,m.useEffect)((()=>{x.current=A}),[A]);const M=(0,m.useMemo)((()=>function(...e){return ce()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidation",plugin:"WooCommerce Blocks"}),I(...e)}),[I]),B=(0,m.useMemo)((()=>function(...e){return ce()("onCheckoutValidationBeforeProcessing",{since:"9.7.0",alternative:"onCheckoutValidation",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8381"}),I(...e)}),[I]),D=(0,m.useMemo)((()=>function(...e){return ce()("onCheckoutAfterProcessingWithSuccess",{since:"9.7.0",alternative:"onCheckoutSuccess",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8381"}),R(...e)}),[R]),O=(0,m.useMemo)((()=>function(...e){return ce()("onCheckoutAfterProcessingWithError",{since:"9.7.0",alternative:"onCheckoutFail",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8381"}),T(...e)}),[T]);(0,m.useEffect)((()=>{h&&i({setValidationErrors:v})}),[h,v,i]);const F=kt(p),L=kt(k);(0,m.useEffect)((()=>{p===F&&k===L||g&&l({notices:{checkoutNotices:C,paymentNotices:P,expressPaymentNotices:N}})}),[p,k,u,w,y,E,g,h,F,L,C,N,P,i,l]);const j={onSubmit:(0,m.useCallback)((()=>{f("submit"),d()}),[f,d]),onCheckoutBeforeProcessing:M,onCheckoutValidationBeforeProcessing:B,onCheckoutAfterProcessingWithSuccess:D,onCheckoutAfterProcessingWithError:O,onCheckoutSuccess:R,onCheckoutFail:T,onCheckoutValidation:I};return(0,r.createElement)(St.Provider,{value:j},e)},Pt=window.wp.apiFetch;var Nt=o.n(Pt);(0,M.__)("Something went wrong. Please contact us to get assistance.","woocommerce");const At=window.wc.wcBlocksRegistry,xt=(e,t,o)=>{const r=Object.keys(e).map((t=>({key:t,value:e[t]})),[]),n=`wc-${o}-new-payment-method`;return r.push({key:n,value:t}),r},It=e=>{if(!e)return;const{__internalSetCustomerId:t}=(0,_.dispatch)(re.checkoutStore);Nt().setNonce&&"function"==typeof Nt().setNonce&&Nt().setNonce(e),Nt().setCartHash&&"function"==typeof Nt().setCartHash&&Nt().setCartHash(e),null!=e&&e.get("User-ID")&&t(parseInt(e.get("User-ID")||"0",10))},Rt=()=>{const{onCheckoutValidation:e}=wt.checkoutEvents,{additionalFields:t,customerId:o,customerPassword:r,extensionData:n,hasError:c,isBeforeProcessing:s,isComplete:a,isProcessing:i,orderNotes:l,redirectUrl:d,shouldCreateAccount:u}=(0,_.useSelect)((e=>{const t=e(re.checkoutStore);return{additionalFields:t.getAdditionalFields(),customerId:t.getCustomerId(),customerPassword:t.getCustomerPassword(),extensionData:t.getExtensionData(),hasError:t.hasError(),isBeforeProcessing:t.isBeforeProcessing(),isComplete:t.isComplete(),isProcessing:t.isProcessing(),orderNotes:t.getOrderNotes(),redirectUrl:t.getRedirectUrl(),shouldCreateAccount:t.getShouldCreateAccount()}})),{__internalSetHasError:p,__internalProcessCheckoutResponse:h}=(0,_.useDispatch)(re.checkoutStore),g=(0,_.useSelect)((e=>e(re.validationStore).hasValidationErrors)),{shippingErrorStatus:k}=gt(),{billingAddress:b,shippingAddress:w}=(0,_.useSelect)((e=>e(re.cartStore).getCustomerData())),{cartNeedsPayment:E,cartNeedsShipping:y,receiveCartContents:v}=He(),{activePaymentMethod:f,paymentMethodData:S,isExpressPaymentMethodActive:C,hasPaymentError:P,isPaymentReady:N,shouldSavePayment:A}=(0,_.useSelect)((e=>{const t=e(re.paymentStore);return{activePaymentMethod:t.getActivePaymentMethod(),paymentMethodData:t.getPaymentMethodData(),isExpressPaymentMethodActive:t.isExpressPaymentMethodActive(),hasPaymentError:t.hasPaymentError(),isPaymentReady:t.isPaymentReady(),shouldSavePayment:t.getShouldSavePaymentMethod()}}),[]),x=(0,At.getPaymentMethods)(),I=(0,At.getExpressPaymentMethods)(),R=(0,m.useRef)(b),T=(0,m.useRef)(w),B=(0,m.useRef)(d),[D,O]=(0,m.useState)(!1),F=(0,m.useMemo)((()=>{var e;const t={...I,...x};return null==t||null===(e=t[f])||void 0===e?void 0:e.paymentMethodId}),[f,I,x]),L=g()&&!C||P||k.hasError,j=!c&&!L&&(N||!E)&&i;(0,m.useEffect)((()=>{L===c||!i&&!s||C||p(L)}),[L,c,i,s,C,p]),(0,m.useEffect)((()=>{R.current=b,T.current=w,B.current=d}),[b,w,d]);const V=(0,m.useCallback)((()=>g()?void 0!==(0,_.select)(re.validationStore).getValidationError("shipping-rates-error")&&{errorMessage:(0,M.__)("Sorry, this order requires a shipping option.","woocommerce")}:P?{errorMessage:(0,M.__)("There was a problem with your payment option.","woocommerce"),context:"wc/checkout/payments"}:!k.hasError||{errorMessage:(0,M.__)("There was a problem with your shipping option.","woocommerce"),context:"wc/checkout/shipping-methods"}),[g,P,k.hasError]);(0,m.useEffect)((()=>{let t;return C||(t=e(V,0)),()=>{C||"function"!=typeof t||t()}}),[e,V,C]),(0,m.useEffect)((()=>{window.localStorage.removeItem("WOOCOMMERCE_CHECKOUT_IS_CUSTOMER_DATA_DIRTY"),B.current&&(window.location.href=B.current)}),[a]);const U=(0,m.useCallback)((async()=>{if(D)return;O(!0),(()=>{const e=(0,_.select)("wc/store/store-notices").getRegisteredContainers(),{removeNotice:t}=(0,_.dispatch)(bt.store),{getNotices:o}=(0,_.select)(bt.store);e.forEach((e=>{o(e).forEach((o=>{t(o.id,e)}))}))})();const e=E?{payment_method:F,payment_data:xt(S,A,f)}:{},c={additional_fields:t,billing_address:Re(R.current),create_account:u,customer_note:l,customer_password:r,extensions:{...n},shipping_address:y?Re(T.current):void 0,...e};(0,re.clearCheckoutPutRequests)(),Nt()({path:"/wc/store/v1/checkout",method:"POST",data:c,cache:"no-store",parse:!1}).then((e=>{if((0,ye.assertResponseIsValid)(e),It(e.headers),!e.ok)throw e;return e.json()})).then((e=>{h(e),O(!1)})).catch((e=>{It(null==e?void 0:e.headers);try{e.json().then((e=>e)).then((e=>{var t;null!==(t=e.data)&&void 0!==t&&t.cart&&v(e.data.cart),(0,re.processErrorResponse)(e),h(e)}))}catch{let e=(0,M.__)("Something went wrong when placing the order. Check your email for order updates before retrying.","woocommerce");0!==o&&(e=(0,M.__)("Something went wrong when placing the order. Check your account's order history or your email for order updates before retrying.","woocommerce")),(0,re.processErrorResponse)({code:"unknown_error",message:e,data:null})}p(!0),O(!1)}))}),[D,E,F,S,A,f,l,u,o,r,n,t,y,v,p,h]);return(0,m.useEffect)((()=>{j&&!D&&U()}),[U,j,D]),null},Tt=({children:e,redirectUrl:t})=>(0,r.createElement)(Ct,{redirectUrl:t},(0,r.createElement)(_t,null,(0,r.createElement)(de,null,e,(0,r.createElement)(oe,{renderError:y.CURRENT_USER_IS_ADMIN?null:()=>null},(0,r.createElement)(E.PluginArea,{scope:"woocommerce-checkout"})),(0,r.createElement)(Rt,null)))),Mt={cc:[{method:{gateway:"credit-card",last4:"5678",brand:"Visa"},expires:"12/20",is_default:!1,tokenId:"1"}]},Bt=window.wc.blocksCheckout,Dt=window.wp.coreData;var Ot=o(2172);const Ft=(0,m.forwardRef)((({children:e,className:t=""},o)=>(0,r.createElement)("div",{ref:o,className:(0,n.A)("wc-block-components-main",t)},e))),Lt={showOrderNotes:!0,showPolicyLinks:!0,showReturnToCart:!0,cartPageId:0,showRateAfterTaxName:!1,showFormStepNumbers:!1,defaultFields:y.defaultFields},jt=(0,m.createContext)(Lt),Vt=()=>{const e=(0,m.useContext)(jt);return{...Lt,...e}},Ut=["core/paragraph","core/image","core/separator"],$t=e=>{const t=(0,Bt.applyCheckoutFilter)({filterName:"additionalCartCheckoutInnerBlockTypes",defaultValue:[],extensions:(0,_.select)(re.cartStore).getCartData().extensions,arg:{block:e},validation:e=>{if(Array.isArray(e)&&e.every((e=>"string"==typeof e)))return!0;throw new Error("allowedBlockTypes filters must return an array of strings.")}});return Array.from(new Set([...(0,i.getBlockTypes)().filter((t=>((null==t?void 0:t.parent)||[]).includes(e))).map((({name:e})=>e)),...Ut,...t]))},Ht=({clientId:e,registeredBlocks:t,defaultTemplate:o=[]})=>{const r=(0,m.useRef)(t),n=(0,m.useRef)(o),c=(0,_.useRegistry)(),{isPreview:s}=b();(0,m.useEffect)((()=>{let t=!1;if(s)return;const{replaceInnerBlocks:o}=(0,_.dispatch)("core/block-editor");return c.subscribe((()=>{if(!c.select("core/block-editor").getBlock(e))return;const s=c.select("core/block-editor").getBlocks(e);if(0===s.length&&n.current.length>0&&!t){const r=(0,i.createBlocksFromInnerBlocksTemplate)(n.current);if(0!==r.length)return t=!0,void o(e,r)}const a=r.current.map((e=>(0,i.getBlockType)(e))),l=((e,t)=>{const o=t.filter((e=>e&&(({attributes:e})=>{var t,o;return Boolean((null===(t=e.lock)||void 0===t?void 0:t.remove)||(null===(o=e.lock)||void 0===o||null===(o=o.default)||void 0===o?void 0:o.remove))})(e))),r=[];return o.forEach((t=>{if(void 0===t)return;const o=e.find((e=>e.name===t.name));o||r.push(t)})),r})(s,a);if(0===l.length)return;let m=-1;const d=l.map((e=>{const t=n.current.findIndex((([t])=>t===e.name)),o=(0,i.createBlock)(e.name);return-1===m&&(m=(({defaultTemplatePosition:e,innerBlocks:t,currentDefaultTemplate:o})=>{switch(e){case-1:return t.length;case 0:return 0;default:const r=o.current[e-1],n=t.findIndex((({name:e})=>e===r[0]));return-1===n?e:n+1}})({defaultTemplatePosition:t,innerBlocks:s,currentDefaultTemplate:n})),o}));c.batch((()=>{c.dispatch("core/block-editor").insertBlocks(d,m,e)}))}),"core/block-editor")}),[e,s,c])};o(6619);const qt=window.wp.components,zt=()=>{const{defaultFields:e}=Vt(),t=(e,t)=>{["phone","company","address_2"].includes(e)&&["optional","required","hidden"].includes(t)&&(0,_.dispatch)(Dt.store).editEntityRecord("root","site",void 0,{[`woocommerce_checkout_${e}_field`]:t})},o=[{label:(0,M.__)("Optional","woocommerce"),value:"false"},{label:(0,M.__)("Required","woocommerce"),value:"true"}];return(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(qt.PanelBody,{title:(0,M.__)("Address Fields","woocommerce")},(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("Show or hide fields in the checkout address forms.","woocommerce")),(0,r.createElement)(qt.ToggleControl,{label:(0,M.__)("Company","woocommerce"),checked:!e.company.hidden,onChange:()=>{e.company.hidden?t("company","optional"):t("company","hidden")}}),!e.company.hidden&&(0,r.createElement)(qt.RadioControl,{selected:e.company.required?"true":"false",options:o,onChange:e=>{t("company","true"===e?"required":"optional")},className:"components-base-control--nested wc-block-components-require-company-field"}),(0,r.createElement)(qt.ToggleControl,{label:(0,M.__)("Address line 2","woocommerce"),checked:!e.address_2.hidden,onChange:()=>{e.address_2.hidden?t("address_2","optional"):t("address_2","hidden")}}),!e.address_2.hidden&&(0,r.createElement)(qt.RadioControl,{selected:e.address_2.required?"true":"false",options:o,onChange:e=>{t("address_2","true"===e?"required":"optional")},className:"components-base-control--nested wc-block-components-require-address_2-field"}),(0,r.createElement)(qt.ToggleControl,{label:(0,M.__)("Phone","woocommerce"),checked:!e.phone.hidden,onChange:()=>{e.phone.hidden?t("phone","optional"):t("phone","hidden")}}),!e.phone.hidden&&(0,r.createElement)(qt.RadioControl,{selected:e.phone.required?"true":"false",options:o,onChange:e=>{t("phone","true"===e?"required":"optional")},className:"components-base-control--nested wc-block-components-require-phone-field"})))};(0,i.registerBlockType)("woocommerce/checkout-fields-block",{icon:{src:(0,r.createElement)(a.A,{icon:Ot.A,className:"wc-block-editor-components-block-icon"})},edit:({clientId:e,attributes:t})=>{const o=(0,l.useBlockProps)({className:(0,n.A)("wc-block-checkout__main",null==t?void 0:t.className)}),c=$t(Bt.innerBlockAreas.CHECKOUT_FIELDS),{showFormStepNumbers:s}=Vt(),a=[["woocommerce/checkout-express-payment-block",{},[]],["woocommerce/checkout-contact-information-block",{},[]],["woocommerce/checkout-shipping-method-block",{},[]],["woocommerce/checkout-pickup-options-block",{},[]],["woocommerce/checkout-shipping-address-block",{},[]],["woocommerce/checkout-billing-address-block",{},[]],["woocommerce/checkout-shipping-methods-block",{},[]],["woocommerce/checkout-payment-block",{},[]],["woocommerce/checkout-additional-information-block",{},[]],["woocommerce/checkout-order-note-block",{},[]],["woocommerce/checkout-terms-block",{},[]],["woocommerce/checkout-actions-block",{},[]]].filter(Boolean);return Ht({clientId:e,registeredBlocks:c,defaultTemplate:a}),(0,r.createElement)(Ft,{...o},(0,r.createElement)(zt,null),(0,r.createElement)("form",{className:(0,n.A)("wc-block-components-form wc-block-checkout__form",{"wc-block-checkout__form--with-step-numbers":s})},(0,r.createElement)(l.InnerBlocks,{allowedBlocks:c,templateLock:!1,template:a,renderAppender:l.InnerBlocks.ButtonBlockAppender})))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(l.InnerBlocks.Content,null))});const Wt=(0,m.forwardRef)((({children:e,className:t=""},o)=>(0,r.createElement)("div",{ref:o,className:(0,n.A)("wc-block-components-sidebar",t)},e)));o(7765),(0,i.registerBlockType)("woocommerce/checkout-totals-block",{icon:{src:(0,r.createElement)(a.A,{icon:Ot.A,className:"wc-block-editor-components-block-icon"})},edit:({clientId:e,attributes:t})=>{const o=(0,l.useBlockProps)({className:(0,n.A)("wc-block-checkout__sidebar",null==t?void 0:t.className)}),c=$t(Bt.innerBlockAreas.CHECKOUT_TOTALS),s=[["woocommerce/checkout-order-summary-block",{},[]]];return Ht({clientId:e,registeredBlocks:c,defaultTemplate:s}),(0,r.createElement)(Wt,{...o},(0,r.createElement)(l.InnerBlocks,{allowedBlocks:c,templateLock:!1,template:s,renderAppender:l.InnerBlocks.ButtonBlockAppender}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(l.InnerBlocks.Content,null))});var Yt=o(601);const Gt=()=>{const{customerData:e,isInitialized:t}=(0,_.useSelect)((e=>{const t=e(re.cartStore);return{customerData:t.getCustomerData(),isInitialized:t.hasFinishedResolution("getCartData")}})),{setShippingAddress:o,setBillingAddress:r}=(0,_.useDispatch)(re.cartStore);return{isInitialized:t,billingAddress:e.billingAddress,shippingAddress:e.shippingAddress,setBillingAddress:r,setShippingAddress:o}},Kt=()=>{const{isEditor:e,getPreviewData:t}=b(),{needsShipping:o}=mt(),{useShippingAsBilling:r,prefersCollection:n,editingBillingAddress:c,editingShippingAddress:s}=(0,_.useSelect)((e=>({useShippingAsBilling:e(re.checkoutStore).getUseShippingAsBilling(),prefersCollection:e(re.checkoutStore).prefersCollection(),editingBillingAddress:e(re.checkoutStore).getEditingBillingAddress(),editingShippingAddress:e(re.checkoutStore).getEditingShippingAddress()}))),{__internalSetUseShippingAsBilling:a,setEditingBillingAddress:i,setEditingShippingAddress:l}=(0,_.useDispatch)(re.checkoutStore),{billingAddress:d,setBillingAddress:u,shippingAddress:p,setShippingAddress:h}=Gt(),g=(0,m.useCallback)((e=>{u({email:e})}),[u]),k=(0,y.getSetting)("forcedBillingAddress",!1);return{shippingAddress:p,billingAddress:d,setShippingAddress:h,setBillingAddress:u,setEmail:g,defaultFields:e?t("defaultFields",y.defaultFields):y.defaultFields,useShippingAsBilling:r,setUseShippingAsBilling:a,editingBillingAddress:c,editingShippingAddress:s,setEditingBillingAddress:i,setEditingShippingAddress:l,needsShipping:o,showShippingFields:!k&&o&&!n,showShippingMethods:o&&!n,showBillingFields:!o||!r||!!n,forcedBillingAddress:k,useBillingAsShipping:k||!!n}},Zt=window.wc.blocksComponents,Jt=({children:e,stepHeadingContent:t})=>(0,r.createElement)("div",{className:"wc-block-components-checkout-step__heading"},(0,r.createElement)(Zt.Title,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},e),!!t&&(0,r.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},t)),Xt=({attributes:e,setAttributes:t,className:o="",children:c})=>{const{showFormStepNumbers:s}=Vt(),{title:a="",description:i=""}=e,m=(0,l.useBlockProps)({className:(0,n.A)("wc-block-components-checkout-step",o,{"wc-block-components-checkout-step--with-step-number":s})});return(0,r.createElement)("div",{...m},(0,r.createElement)(Jt,null,(0,r.createElement)(l.PlainText,{className:"",value:a,onChange:e=>t({title:e}),style:{backgroundColor:"transparent"}})),(0,r.createElement)("div",{className:"wc-block-components-checkout-step__container"},(0,r.createElement)("p",{className:"wc-block-components-checkout-step__description"},(0,r.createElement)(l.PlainText,{className:i?"":"wc-block-components-checkout-step__description-placeholder",value:i,placeholder:(0,M.__)("Optional text for this form step.","woocommerce"),onChange:e=>t({description:e}),style:{backgroundColor:"transparent"}})),(0,r.createElement)("div",{className:"wc-block-components-checkout-step__content"},c)))};o(6664);const Qt=({block:e})=>{const{"data-block":t}=(0,l.useBlockProps)(),o=$t(e);return Ht({clientId:t,registeredBlocks:o}),(0,r.createElement)("div",{className:"wc-block-checkout__additional_fields"},(0,r.createElement)(l.InnerBlocks,{allowedBlocks:o}))},eo=()=>(0,r.createElement)(l.InnerBlocks.Content,null);var to=o(4375),oo=o(8107),ro=o(4717);const no=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA","A"],co=({children:e,style:t={},...o})=>{const n=(0,m.useRef)(null),c=()=>{n.current&&oo.focus.focusable.find(n.current).forEach((e=>{no.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")}))},s=(0,ro.YQ)(c,0,{leading:!0});return(0,m.useLayoutEffect)((()=>{let e;return c(),n.current&&(e=new window.MutationObserver(s),e.observe(n.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),s.cancel()}}),[s]),(0,r.createElement)("div",{ref:n,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...t},...o},e)};o(2931);var so=o(224);o(5452);const ao=e=>{const{onChange:t,options:o,label:c,value:s="",className:i,size:l,errorId:d,required:u,errorMessage:p=(0,M.__)("Please select a valid option","woocommerce"),placeholder:h,...g}=e,k=(0,m.useCallback)((e=>{t(e.target.value)}),[t]),b=(0,Bt.getFieldLabel)(c),w=(0,m.useMemo)((()=>({value:"",label:null!=h?h:(0,M.sprintf)( // translators: %s will be label of the field. For example "country/region". // translators: %s will be label of the field. For example "country/region". (0,M.__)("Select a %s","woocommerce"),b),disabled:!!u})),[h,u,b]),E=(0,m.useId)(),y=g.id||`wc-blocks-components-select-${E}`,v=d||y,f=(0,m.useMemo)((()=>u&&s?o:[w].concat(o)),[u,s,w,o]),{setValidationErrors:S,clearValidationError:C}=(0,_.useDispatch)(re.validationStore),{error:P,validationErrorId:N}=(0,_.useSelect)((e=>{const t=e(re.validationStore);return{error:t.getValidationError(v),validationErrorId:t.getValidationErrorId(v)}}),[v]);(0,m.useEffect)((()=>(!u||s?C(v):S({[v]:{message:p,hidden:!0}}),()=>{C(v)})),[C,s,v,p,u,S]);const A=(0,_.useSelect)((e=>e(re.validationStore).getValidationError(v||"")||{hidden:!0}),[v]);return(0,r.createElement)("div",{className:(0,n.A)(i,{"has-error":!A.hidden})},(0,r.createElement)("div",{className:"wc-blocks-components-select"},(0,r.createElement)("div",{className:"wc-blocks-components-select__container"},(0,r.createElement)("label",{htmlFor:y,className:"wc-blocks-components-select__label"},c),(0,r.createElement)("select",{className:"wc-blocks-components-select__select",id:y,size:void 0!==l?l:1,onChange:k,value:s,"aria-invalid":!(null==P||!P.message||null!=P&&P.hidden),"aria-errormessage":N,...g},f.map((e=>(0,r.createElement)("option",{key:e.value,value:e.value,"data-alternate-values":`[${e.label}]`,disabled:void 0!==e.disabled&&e.disabled},e.label)))),(0,r.createElement)(a.A,{className:"wc-blocks-components-select__expand",icon:so.A}))),(0,r.createElement)(Zt.ValidationInputError,{propertyName:v}))},io=({className:e,countries:t,id:o,label:c,onChange:s,value:a="",autoComplete:i="off",required:l=!1})=>{const d=(0,m.useMemo)((()=>Object.entries(t).map((([e,t])=>({value:e,label:(0,Pe.decodeEntities)(t)})))),[t]);return(0,r.createElement)(ao,{className:(0,n.A)(e,"wc-block-components-country-input"),id:o,label:c||"",onChange:s,options:d,value:a,required:l,autoComplete:i})},lo=e=>{const{...t}=e;return(0,r.createElement)(io,{countries:z,...t})},mo=e=>(0,r.createElement)(io,{countries:Y,...e});o(8824);const uo=(e,t)=>{const o=t.find((t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase()));return o?o.value:""},po=({className:e,id:t,states:o,country:c,label:s,onChange:a,autoComplete:i="off",value:l="",required:d=!1})=>{const u=o[c],p=(0,m.useMemo)((()=>u&&Object.keys(u).length>0?Object.keys(u).map((e=>({value:e,label:(0,Pe.decodeEntities)(u[e])}))):[]),[u]),h=(0,m.useCallback)((e=>{const t=p.length>0?uo(e,p):e;t!==l&&a(t)}),[a,p,l]),g=(0,m.useRef)(l);return(0,m.useEffect)((()=>{g.current!==l&&(g.current=l)}),[l]),(0,m.useEffect)((()=>{if(p.length>0&&g.current){const e=uo(g.current,p);e!==g.current&&h(e)}}),[p,h]),p.length>0?(0,r.createElement)(ao,{className:(0,n.$)(e,"wc-block-components-state-input"),options:p,label:s||"",id:t,onChange:h,value:l,autoComplete:i,required:d}):(0,r.createElement)(Zt.ValidatedTextInput,{className:e,id:t,label:s,onChange:h,autoComplete:i,value:l,required:d})},ho=e=>{const{...t}=e;return(0,r.createElement)(po,{states:W,...t})},go=e=>(0,r.createElement)(po,{states:G,...e});function _o(e){const t=(0,m.useRef)(e);return Je()(e,t.current)||(t.current=e),t.current}var ko=o(1777);o(5684);const bo=({field:e,props:t,onChange:o,value:n})=>{var c;const s=null!==(c=null==e?void 0:e.required)&&void 0!==c&&c,a=kt(s),[i,l]=(0,m.useState)((()=>Boolean(n)||s)),d=(0,Bt.getFieldLabel)(e.label);(0,m.useEffect)((()=>{a!==s&&l(Boolean(n)||s)}),[n,a,s]);const u=(0,m.useCallback)((e=>{o(e),l(!0)}),[o]);return(0,r.createElement)(m.Fragment,null,i?(0,r.createElement)(Zt.ValidatedTextInput,{...t,type:e.type,label:s?e.label:e.optionalLabel,className:"wc-block-components-address-form__address_2",value:n,onChange:e=>o(e)}):(0,r.createElement)(m.Fragment,null,(0,r.createElement)(ko.$,{render:(0,r.createElement)("span",null),className:"wc-block-components-address-form__address_2-toggle",onClick:()=>l(!0)},(0,M.sprintf)( // translators: %s: address 2 field label. // translators: %s: address 2 field label. (0,M.__)("+ Add %s","woocommerce"),d)),(0,r.createElement)("input",{type:"text",tabIndex:-1,className:"wc-block-components-address-form__address_2-hidden-input","aria-hidden":"true","aria-label":e.label,autoComplete:e.autocomplete,id:null==t?void 0:t.id,value:n,onChange:e=>u(e.target.value)})))},wo=(e,t,o)=>({id:`${t}-${null==e?void 0:e.key}`.replaceAll("/","-"),errorId:`${o}_${null==e?void 0:e.key}`,label:(null!=e&&e.required?null==e?void 0:e.label:null==e?void 0:e.optionalLabel)||"",autoCapitalize:null==e?void 0:e.autocapitalize,autoComplete:null==e?void 0:e.autocomplete,errorMessage:null==e?void 0:e.errorMessage,required:null==e?void 0:e.required,placeholder:null==e?void 0:e.placeholder,className:`wc-block-components-address-form__${null==e?void 0:e.key}`.replaceAll("/","-"),...null==e?void 0:e.attributes}),Eo=(e,t,o)=>{const r=t.find((t=>t.key===e)),n=(0,ye.objectHasProp)(o,e)?o[e]:"";return r?{field:{...r,key:e},value:n}:null},yo=(e,t)=>(0,ye.isObject)(e.rules)&&(0,ye.isObject)(e.rules[t])&&Object.keys(e.rules[t]).length>0,vo=({formId:e,address1:t,address2:o,addressType:n,onChange:c})=>{const s=wo(t.field,e,n),a=wo(o.field,e,n);return(0,r.createElement)(r.Fragment,null,t&&(0,r.createElement)(Zt.ValidatedTextInput,{...s,type:t.field.type,label:t.field.label,className:"wc-block-components-address-form__address_1",value:t.value,onChange:e=>c("address_1",e)}),o.field&&!o.field.hidden&&(0,r.createElement)(bo,{field:o.field,props:a,onChange:e=>c("address_2",e),value:o.value}))};var fo=o(4370);const So=e=>((e,t)=>Object.entries(e).reduce(((e,[o,r])=>({...e,[t(0,o)]:r})),{}))(e,((e,t)=>(0,fo.L)(t))),Co=e=>{const t=(e=>{const t=(0,m.useRef)({cart:{},checkout:{},customer:{}}),o=(0,_.useSelect)((t=>{const o=t(re.cartStore),r=t(re.checkoutStore),n=t(re.paymentStore),c=o.getCartData(),{coupons:s,shippingRates:a,shippingAddress:i,billingAddress:l,items:m,itemsCount:d,itemsWeight:u,needsShipping:p,totals:h}=c,g={cart:{coupons:s.map((e=>e.code)),shippingRates:[...new Set(a.map((e=>{var t;return null===(t=e.shipping_rates.find((e=>e.selected)))||void 0===t?void 0:t.rate_id})).filter(Boolean))],items:m.map((e=>Array(e.quantity).fill(e.id))).flat(),itemsType:[...new Set(m.map((e=>e.type)))],itemsCount:d,itemsWeight:u,needsShipping:p,prefersCollection:"boolean"==typeof r.prefersCollection()&&r.prefersCollection(),totals:{totalPrice:Number(h.total_price),totalTax:Number(h.total_tax)},extensions:c.extensions},checkout:{createAccount:r.getShouldCreateAccount(),customerNote:r.getOrderNotes(),additionalFields:r.getAdditionalFields(),paymentMethod:n.getActivePaymentMethod()},customer:{id:r.getCustomerId(),billingAddress:l,shippingAddress:i,..."billing"===e||"shipping"===e?{address:"billing"===e?l:i}:{}}};return{cart:So(g.cart),checkout:So(g.checkout),customer:So(g.customer)}}),[e]);return t.current&&Ce()(t.current,o)||(t.current=o),t.current})(e);return window.schemaParser?{parser:window.schemaParser,data:t}:{parser:null,data:t}},Po={};function No(e){let t=e;return function(e){const o=t;return t=e,o}}const Ao=No(),xo=No(),Io=({id:e="",fields:t,onChange:o,addressType:c="shipping",values:s,children:a,isEditing:i,ariaDescribedBy:l=""})=>{const u=(0,d.useInstanceId)(Io),p=(0,m.useRef)(!0),{defaultFields:h}=Kt(),g=_o(t),k=_o("country"in s?s.country:""),b=((e,t,o,r="")=>{const n=(0,m.useRef)([]),{parser:c,data:s}=Co(o),a=Ae(e,t,r).map((e=>{const o=t[e.key]||{};if(o.rules&&c){if(yo(o,"required")){let t={};t=Object.keys(o.rules.required).some((e=>"cart"===e||"checkout"===e||"customer"===e))?{type:"object",properties:o.rules.required}:o.rules.required;try{const o=c.validate(t,s);e.required=o}catch(e){y.CURRENT_USER_IS_ADMIN&&console.error(e)}}if(yo(o,"hidden")){const t={type:"object",properties:o.rules.hidden};try{const o=c.validate(t,s);e.hidden=o}catch(e){y.CURRENT_USER_IS_ADMIN&&console.error(e)}}}return e}));return n.current&&Ce()(n.current,a)||(n.current=a),n.current})(g,h,c,k),w=kt(b),E=kt(i),v=kt(s),f=(0,m.useRef)({}),{errors:S,previousErrors:C}=((e,t,o)=>{const{parser:r,data:n}=Co(t),c=(0,m.useRef)(Po),s=kt(c.current);if(!n)return{errors:c.current,previousErrors:s};let a;if(o)a=o;else switch(t){case"billing":case"shipping":a=n.customer.address||{};break;case"contact":case"order":a=n.checkout.additional_fields||{};break;default:a={}}const i=e.reduce(((e,t)=>(yo(t,"validation")&&!t.hidden&&(t.required||a[t.key])&&(e[t.key]=t.rules.validation),e)),{});let l=Po;if(Object.keys(i).length>0&&r){const o={type:"object",properties:{}};switch(t){case"shipping":o.properties={customer:{type:"object",properties:{shipping_address:{type:"object",properties:i}}}};break;case"billing":o.properties={customer:{type:"object",properties:{billing_address:{type:"object",properties:i}}}};break;default:o.properties={checkout:{type:"object",properties:{additional_fields:{type:"object",properties:i}}}}}const c=r.compile(o),s=c(n);l=!s&&c.errors?((e,t)=>e.reduce(((e,o)=>{var r;const n=null===(c=o.instancePath.split("/").pop())||void 0===c?void 0:c.replace("~1","/");var c;const s=t.find((e=>e.key===n));if(!s||!n)return e;const a=(0,Bt.getFieldLabel)(s.label),i=(0,M.sprintf)( // translators: %s is the label of the field. // translators: %s is the label of the field. (0,M.__)("%s is invalid","woocommerce"),a);if(n)switch(o.keyword){case"errorMessage":e[n]=null!==(r=o.message)&&void 0!==r?r:i;break;case"pattern":e[n]=(0,M.sprintf)( // translators: %1$s is the label of the field, %2$s is the pattern. // translators: %1$s is the label of the field, %2$s is the pattern. (0,M.__)("%1$s must match the pattern %2$s","woocommerce"),a,o.params.pattern);break;default:e[n]=i}return e}),{}))(c.errors,e):Po}const d=e.map((e=>l[e.key]?[e.key,l[e.key]]:e.hidden||!e.required&&!a[e.key]?null:"postcode"===e.key&&"country"in a&&!(0,Bt.isPostcode)({postcode:a.postcode,country:a.country})?[e.key,(0,M.__)("Please enter a valid postcode","woocommerce")]:"email"===e.key&&"email"in a&&!(0,xe.isEmail)(a.email)?[e.key,(0,M.__)("Please enter a valid email address","woocommerce")]:null)).filter(ye.nonNullable);return Ce()(c.current,Object.fromEntries(d))||(c.current=Object.fromEntries(d)),{errors:c.current,previousErrors:s}})(b,c,"shipping"===c?s:void 0);return(0,m.useEffect)((()=>{Object.entries(S).forEach((([e,t])=>{const o=f.current[e];t&&(null==o||o.setErrorMessage(t),(0,_.dispatch)(re.validationStore).setValidationErrors({[`${c}_${e}`]:{message:t,hidden:!(null==o||!o.isFocused())}}),null!=o&&o.isFocused()||null==o||o.revalidate())})),C&&Object.entries(C).forEach((([e])=>{const t=f.current[e];e in S||((0,_.dispatch)(re.validationStore).clearValidationError(`${c}_${e}`),null==t||t.setErrorMessage(""))}))}),[S,C,c,s]),(0,m.useEffect)((()=>{var e;null===(e=f.current)||void 0===e||null===(e=e.postcode)||void 0===e||e.revalidate()}),[k]),(0,m.useEffect)((()=>{let t;if(!p.current&&i&&f.current&&E!==i){const o=b.find((e=>!1===e.hidden));if(!o)return;const{id:r}=wo(o,e||`${u}`,c),n=document.getElementById(r);n&&(t=setTimeout((()=>{n.focus()}),300))}return p.current=!1,()=>{clearTimeout(t)}}),[i,b,e,u,c,E]),(0,m.useEffect)((()=>{if(Ce()(w,b))return;const e={...s,...Object.fromEntries(b.filter((e=>e.hidden)).map((e=>[e.key,""])))};Je()(s,e)||o(e)}),[o,b,w,s]),(0,m.useEffect)((()=>{if((!Ce()(w,b)||!Ce()(v,s))&&("country"in s&&((e,t)=>{const o=`${e}_country`,r=(0,_.select)(re.validationStore).getValidationError(o);!t.country&&(t.city||t.state||t.postcode)&&(r?(0,_.dispatch)(re.validationStore).showValidationError(o):(0,_.dispatch)(re.validationStore).setValidationErrors({[o]:{message:(0,M.__)("Please select your country","woocommerce"),hidden:!1}})),r&&t.country&&(0,_.dispatch)(re.validationStore).clearValidationError(o)})(c,s),"state"in s)){const e=b.find((e=>"state"===e.key));e&&((e,t,o)=>{const r=`${e}_state`,n=(0,_.select)(re.validationStore).getValidationError(r),c=o.required,s="shipping"===e?Ao(t):xo(t),a=!!s&&!Je()(s,t);n?!c||t.state?(0,_.dispatch)(re.validationStore).clearValidationError(r):a||(0,_.dispatch)(re.validationStore).showValidationError(r):!n&&c&&!t.state&&t.country&&(0,_.dispatch)(re.validationStore).setValidationErrors({[r]:{message:(0,M.sprintf)(/* translators: %s will be the state field label in lowercase e.g. "state" */ /* translators: %s will be the state field label in lowercase e.g. "state" */ (0,M.__)("Please select a %s","woocommerce"),o.label.toLowerCase()),hidden:!0}})})(c,s,e)}}),[s,v,c,b,w]),e=e||`${u}`,(0,r.createElement)("div",{id:e,className:"wc-block-components-address-form"},b.map((t=>{var a;if(t.hidden)return null;const i=wo(t,e,c),m=(e=>{const{autoCapitalize:t,autoComplete:o,placeholder:r,...n}=e;return n})(i);if("email"===t.key&&(i.id="email",i.errorId="billing_email"),"checkbox"===t.type){const e=t.key in s&&s[t.key],n={checked:Boolean(e),onChange:e=>{o({...s,[t.key]:e})},...m};return t.required?(0,r.createElement)(Zt.ValidatedCheckboxControl,{key:t.key,...t.errorMessage?{errorMessage:t.errorMessage}:{},...n}):(0,r.createElement)(Zt.CheckboxControl,{key:t.key,...n})}if("address_1"===t.key&&"address_1"in s){const n=Eo("address_1",b,s),a=Eo("address_2",b,s);return(0,ye.isNull)(n)||(0,ye.isNull)(a)?null:(0,r.createElement)(vo,{address1:n,address2:a,addressType:c,formId:e,key:t.key,onChange:(e,t)=>{o({...s,[e]:t})}})}if("address_2"===t.key)return null;if("country"===t.key&&"country"in s){const e="shipping"===c?mo:lo;return(0,r.createElement)(e,{key:t.key,...i,value:s.country,onChange:e=>{o({...s,country:e,state:"",postcode:""})}})}if("state"===t.key&&"state"in s&&"country"in s){const e="shipping"===c?go:ho;return(0,r.createElement)(e,{key:t.key,...i,country:s.country,value:s.state,onChange:e=>o({...s,state:e})})}return"select"===t.type&&"options"in t?void 0===t.options?null:(0,r.createElement)(ao,{key:t.key,...i,label:i.label||"",className:(0,n.A)("wc-block-components-select-input",`wc-block-components-select-input-${t.key}`.replaceAll("/","-")),value:t.key in s?s[t.key]:"",onChange:e=>{o({...s,[t.key]:e})},options:t.options,required:t.required,errorMessage:i.errorMessage||void 0}):(0,r.createElement)(Zt.ValidatedTextInput,{key:t.key,ref:e=>f.current[t.key]=e,...i,type:t.type,ariaDescribedBy:l,value:null!==(a=(0,Pe.decodeEntities)(s[t.key]))&&void 0!==a?a:"",onChange:e=>o({...s,[t.key]:e}),customFormatter:e=>"postcode"===t.key?e.trimStart().toUpperCase():e})})),a)},Ro=Io;o(7259);const To=({isEditing:e=!1,addressCard:t,addressForm:o})=>{const c=(0,n.A)("wc-block-components-address-address-wrapper",{"is-editing":e});return(0,r.createElement)("div",{className:c},(0,r.createElement)("div",{className:"wc-block-components-address-card-wrapper"},t()),(0,r.createElement)("div",{className:"wc-block-components-address-form-wrapper"},o()))},Mo=e=>(0,ye.isObject)(W[e.country])&&(0,ye.isString)(W[e.country][e.state])?(0,Pe.decodeEntities)(W[e.country][e.state]):e.state,Bo=e=>(0,ye.isString)(z[e.country])?(0,Pe.decodeEntities)(z[e.country]):e.country;o(1094);const Do=({address:e,onEdit:t,target:o,isExpanded:n})=>{const c=(0,y.getSetting)("countryData",{});let s=(0,y.getSetting)("defaultAddressFormat","{name}\n{company}\n{address_1}\n{address_2}\n{city}\n{state}\n{postcode}\n{country}");(0,ye.objectHasProp)(c,null==e?void 0:e.country)&&(0,ye.objectHasProp)(c[e.country],"format")&&(0,ye.isString)(c[e.country].format)&&(s=c[e.country].format);const{name:a,address:i}=((e,t)=>{const o=(e=>["{name}","{name_upper}","{first_name} {last_name}","{last_name} {first_name}","{first_name_upper} {last_name_upper}","{last_name_upper} {first_name_upper}","{first_name} {last_name_upper}","{first_name_upper} {last_name}","{last_name} {first_name_upper}","{last_name_upper} {first_name}"].find((t=>e.indexOf(t)>=0))||"")(t),r=t.replace(`${o}\n`,""),n=[["{company}",(null==e?void 0:e.company)||""],["{address_1}",(null==e?void 0:e.address_1)||""],["{address_2}",(null==e?void 0:e.address_2)||""],["{city}",(null==e?void 0:e.city)||""],["{state}",Mo(e)],["{postcode}",(null==e?void 0:e.postcode)||""],["{country}",Bo(e)],["{company_upper}",((null==e?void 0:e.company)||"").toUpperCase()],["{address_1_upper}",((null==e?void 0:e.address_1)||"").toUpperCase()],["{address_2_upper}",((null==e?void 0:e.address_2)||"").toUpperCase()],["{city_upper}",((null==e?void 0:e.city)||"").toUpperCase()],["{state_upper}",Mo(e).toUpperCase()],["{state_code}",(null==e?void 0:e.state)||""],["{postcode_upper}",((null==e?void 0:e.postcode)||"").toUpperCase()],["{country_upper}",Bo(e).toUpperCase()]],c=[["{name}",(null==e?void 0:e.first_name)+(null!=e&&e.first_name&&null!=e&&e.last_name?" ":"")+(null==e?void 0:e.last_name)],["{name_upper}",((null==e?void 0:e.first_name)+(null!=e&&e.first_name&&null!=e&&e.last_name?" ":"")+(null==e?void 0:e.last_name)).toUpperCase()],["{first_name}",(null==e?void 0:e.first_name)||""],["{last_name}",(null==e?void 0:e.last_name)||""],["{first_name_upper}",((null==e?void 0:e.first_name)||"").toUpperCase()],["{last_name_upper}",((null==e?void 0:e.last_name)||"").toUpperCase()]];let s=o;c.forEach((([e,t])=>{s=s.replace(e,t)}));let a=r;n.forEach((([e,t])=>{a=a.replace(e,t)}));const i=a.replace(/^,\s|,\s$/g,"").replace(/\n{2,}/,"\n").split("\n").filter(Boolean);return{name:s,address:i}})(e,s),l="shipping"===o?(0,M.__)("Edit shipping address","woocommerce"):(0,M.__)("Edit billing address","woocommerce");return(0,r.createElement)("div",{className:"wc-block-components-address-card"},(0,r.createElement)("address",null,(0,r.createElement)("span",{className:"wc-block-components-address-card__address-section"},(0,Pe.decodeEntities)(a)),(0,r.createElement)("div",{className:"wc-block-components-address-card__address-section"},i.filter((e=>!!e)).map(((e,t)=>(0,r.createElement)("span",{key:"address-"+t},(0,Pe.decodeEntities)(e))))),e.phone?(0,r.createElement)("div",{key:"address-phone",className:"wc-block-components-address-card__address-section"},e.phone):""),t&&(0,r.createElement)(ko.$,{render:(0,r.createElement)("span",null),className:"wc-block-components-address-card__edit","aria-controls":o,"aria-expanded":n,"aria-label":l,onClick:e=>{e.preventDefault(),t()},type:"button"},(0,M.__)("Edit","woocommerce")))},Oo=()=>{const{shippingAddress:e,setShippingAddress:t,setBillingAddress:o,useShippingAsBilling:n,editingShippingAddress:c,setEditingShippingAddress:s}=Kt(),{dispatchCheckoutEvent:a}=lt(),{hasValidationErrors:i,invalidProps:l}=(0,_.useSelect)((t=>{const o=t(re.validationStore);return{hasValidationErrors:o.hasValidationErrors(),invalidProps:Object.keys(e).filter((e=>void 0!==o.getValidationError("shipping_"+e))).filter(Boolean)}}),[e]);(0,m.useEffect)((()=>{l.length>0&&!1===c&&s(!0)}),[c,i,l.length,s]);const d=(0,m.useCallback)((e=>{t(e),n&&(o(e),a("set-billing-address")),a("set-shipping-address")}),[a,o,t,n]),u=(0,m.useCallback)((()=>(0,r.createElement)(Do,{address:e,target:"shipping",onEdit:()=>{s(!0)},isExpanded:c})),[e,c,s]),p=(0,m.useCallback)((()=>(0,r.createElement)(Ro,{id:"shipping",addressType:"shipping",onChange:d,values:e,fields:J,isEditing:c})),[d,e,c]);return(0,r.createElement)(To,{isEditing:c,addressCard:u,addressForm:p})},Fo=()=>{const{defaultFields:e,setBillingAddress:t,shippingAddress:o,billingAddress:n,useShippingAsBilling:c,setUseShippingAsBilling:s,setEditingBillingAddress:a}=Kt(),{isEditor:i}=b(),l=0===(0,y.getSetting)("currentUserId"),d=()=>{var r,n;const c={...o};null!=e&&null!==(r=e.phone)&&void 0!==r&&r.hidden&&delete c.phone,null!=e&&null!==(n=e.company)&&void 0!==n&&n.hidden&&delete c.company,t(c)};(0,to.Su)((()=>{c&&d()}));const u=i?co:m.Fragment,p=c?[ve.SHIPPING_ADDRESS,ve.BILLING_ADDRESS]:[ve.SHIPPING_ADDRESS],{cartDataLoaded:h}=(0,_.useSelect)((e=>({cartDataLoaded:e(re.cartStore).hasFinishedResolution("getCartData")})));return(0,r.createElement)(m.Fragment,null,(0,r.createElement)(Zt.StoreNoticesContainer,{context:p}),(0,r.createElement)(u,null,h?(0,r.createElement)(Oo,null):null),(0,r.createElement)(Zt.CheckboxControl,{className:"wc-block-checkout__use-address-for-billing",label:(0,M.__)("Use same address for billing","woocommerce"),checked:c,onChange:e=>{s(e),e?d():(a(!0),(e=>{if(!e||!l)return;const o=(e=>{const t=Ae(J,y.defaultFields,e.country),o=Object.assign({},e);return t.forEach((({key:t})=>{"country"!==t&&"state"!==t&&Ie(t,e)&&(o[t]="")})),o})(e);t(o)})(n))}}))},Lo=({defaultTitle:e=(0,M.__)("Step","woocommerce"),defaultDescription:t=(0,M.__)("Step description text.","woocommerce"),defaultShowStepNumber:o=!0})=>({title:{type:"string",default:e},description:{type:"string",default:t},showStepNumber:{type:"boolean",default:o}}),jo={...Lo({defaultTitle:(0,M.__)("Shipping address","woocommerce"),defaultDescription:(0,M.__)("Enter the address where you want your order delivered.","woocommerce")}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}};(0,i.registerBlockType)("woocommerce/checkout-shipping-address-block",{icon:{src:(0,r.createElement)(a.A,{icon:Yt.A,className:"wc-block-editor-components-block-icon"})},attributes:jo,edit:({attributes:e,setAttributes:t})=>{const{showShippingFields:o}=Kt();return o?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(zt,null),(0,r.createElement)(Xt,{setAttributes:t,attributes:e,className:(0,n.A)("wc-block-checkout__shipping-fields",null==e?void 0:e.className)},(0,r.createElement)(Fo,null),(0,r.createElement)(Qt,{block:Bt.innerBlockAreas.SHIPPING_ADDRESS}))):null},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(eo,null))});var Vo=o(3813);o(8845);const Uo=L?`<a href="${L}" target="_blank">${(0,M.__)("Terms and Conditions","woocommerce")}</a>`:(0,M.__)("Terms and Conditions","woocommerce"),$o=F?`<a href="${F}" target="_blank">${(0,M.__)("Privacy Policy","woocommerce")}</a>`:(0,M.__)("Privacy Policy","woocommerce"),Ho=(0,M.sprintf)(/* translators: %1$s terms page link, %2$s privacy page link. */ /* translators: %1$s terms page link, %2$s privacy page link. */ (0,M.__)("By proceeding with your purchase you agree to our %1$s and %2$s","woocommerce"),Uo,$o),qo=(0,M.sprintf)(/* translators: %1$s terms page link, %2$s privacy page link. */ /* translators: %1$s terms page link, %2$s privacy page link. */ (0,M.__)("You must accept our %1$s and %2$s to continue with your purchase.","woocommerce"),Uo,$o);o(5609),(0,i.registerBlockType)("woocommerce/checkout-terms-block",{icon:{src:(0,r.createElement)(a.A,{icon:Vo.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:{checkbox:e,text:t,showSeparator:o},setAttributes:c})=>{const s=(0,l.useBlockProps)(),a=t||(e?qo:Ho);return(0,r.createElement)("div",{...s},(0,r.createElement)(l.InspectorControls,null,(!L||!F)&&(0,r.createElement)(qt.Notice,{className:"wc-block-checkout__terms_notice",status:"warning",isDismissible:!1},(0,M.__)("Link to your store's Terms and Conditions and Privacy Policy pages by creating pages for them.","woocommerce"),(0,r.createElement)("br",null),!L&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("br",null),(0,r.createElement)(qt.ExternalLink,{href:`${y.ADMIN_URL}admin.php?page=wc-settings&tab=advanced`},(0,M.__)("Setup a Terms and Conditions page","woocommerce"))),!F&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("br",null),(0,r.createElement)(qt.ExternalLink,{href:`${y.ADMIN_URL}options-privacy.php`},(0,M.__)("Setup a Privacy Policy page","woocommerce")))),L&&F&&!(a.includes(L)&&a.includes(F))&&(0,r.createElement)(qt.Notice,{className:"wc-block-checkout__terms_notice",status:"warning",isDismissible:!1,actions:Ho!==t?[{label:(0,M.__)("Restore default text","woocommerce"),onClick:()=>c({text:""})}]:[]},(0,r.createElement)("p",null,(0,M.__)("Ensure you add links to your policy pages in this section.","woocommerce"))),(0,r.createElement)(qt.PanelBody,{title:(0,M.__)("Display options","woocommerce")},(0,r.createElement)(qt.ToggleControl,{label:(0,M.__)("Require checkbox","woocommerce"),checked:e,onChange:()=>c({checkbox:!e})}),(0,r.createElement)(qt.ToggleControl,{label:(0,M.__)("Show separator","woocommerce"),checked:o,onChange:()=>c({showSeparator:!o})}))),(0,r.createElement)("div",{className:(0,n.A)("wc-block-checkout__terms",{"wc-block-checkout__terms--with-separator":o})},e?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Zt.CheckboxControl,{id:"terms-condition",checked:!1}),(0,r.createElement)(l.RichText,{value:a,onChange:e=>c({text:e})})):(0,r.createElement)(l.RichText,{tagName:"span",value:a,onChange:e=>c({text:e})})))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});var zo=o(2596),Wo=o(3876);o(3091);const Yo=[(0,M.__)("Too weak","woocommerce"),(0,M.__)("Weak","woocommerce"),(0,M.__)("Medium","woocommerce"),(0,M.__)("Strong","woocommerce"),(0,M.__)("Very strong","woocommerce")],Go=({password:e="",onChange:t})=>{var o;const c=(0,d.useInstanceId)(Go,"woocommerce-password-strength-meter");let s=-1;e.length>0&&(s=(e=>void 0===window.zxcvbn?(0,Wo.Bi)(e,[{id:0,value:Yo[0],minDiversity:0,minLength:0},{id:1,value:Yo[1],minDiversity:1,minLength:4},{id:2,value:Yo[2],minDiversity:2,minLength:8},{id:3,value:Yo[3],minDiversity:4,minLength:12},{id:4,value:Yo[4],minDiversity:4,minLength:20}]).id:window.zxcvbn(e).score)(e));const a=kt(s);return(0,m.useEffect)((()=>{s!==a&&t&&t(s)}),[s,a,t]),(0,r.createElement)("div",{id:c,className:(0,n.A)("wc-block-components-password-strength",{hidden:-1===s})},(0,r.createElement)("label",{htmlFor:c+"-meter",className:"screen-reader-text"},(0,M.__)("Password strength","woocommerce")),(0,r.createElement)("meter",{id:c+"-meter",className:"wc-block-components-password-strength__meter",min:0,max:4,value:s>-1?s:0},null!==(o=Yo[s])&&void 0!==o?o:""),!!Yo[s]&&(0,r.createElement)("div",{id:c+"-result",className:"wc-block-components-password-strength__result"},(0,r.createElement)("span",{className:"screen-reader-text","aria-live":"polite"},(0,M.sprintf)(/* translators: %s: Password strength */ /* translators: %s: Password strength */ (0,M.__)("Password strength: %1$s (%2$d characters long)","woocommerce"),Yo[s],e.length))," ",(0,r.createElement)("span",{"aria-hidden":!0},Yo[s])))},Ko=Go,Zo=()=>{const[e,t]=(0,m.useState)(0),{customerPassword:o}=(0,_.useSelect)((e=>({customerPassword:e(re.checkoutStore).getCustomerPassword()})),[]),{__internalSetCustomerPassword:n}=(0,_.useDispatch)(re.checkoutStore),{setValidationErrors:c,clearValidationError:s}=(0,_.useDispatch)(re.validationStore);return(0,r.createElement)(Zt.ValidatedTextInput,{type:"password",label:(0,M.__)("Create a password","woocommerce"),className:"wc-block-components-address-form__password",value:o,required:!0,errorId:"account-password",onChange:t=>{n(t),t?e<2?c({"account-password":{message:(0,M.__)("Please create a stronger password","woocommerce"),hidden:!0}}):s("account-password"):c({"account-password":{message:(0,M.__)("Please enter a valid password","woocommerce"),hidden:!0}})},feedback:(0,r.createElement)(Ko,{password:o,onChange:e=>t(e)})})},Jo="wc-guest-checkout-notice",Xo=()=>{const{shouldCreateAccount:e}=(0,_.useSelect)((e=>({shouldCreateAccount:e(re.checkoutStore).getShouldCreateAccount()}))),{__internalSetShouldCreateAccount:t,__internalSetCustomerPassword:o}=(0,_.useDispatch)(re.checkoutStore),n=(0,y.getSetting)("checkoutAllowsGuest",!1),c=(0,y.getSetting)("checkoutAllowsSignup",!1),s=n&&c,a=!(0,y.getSetting)("generatePassword",!1)&&(s&&e||!n);return n||s||a?(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)("p",{id:Jo,className:"wc-block-checkout__guest-checkout-notice"},(0,M.__)("You are currently checking out as a guest.","woocommerce")),s&&(0,r.createElement)(Zt.CheckboxControl,{className:"wc-block-checkout__create-account",label:(0,M.sprintf)(/* translators: Store name */ /* translators: Store name */ (0,M.__)("Create an account with %s","woocommerce"),(0,y.getSetting)("siteTitle","")),checked:e,onChange:e=>{t(e),o("")}}),a&&(0,r.createElement)(Zo,null)):null},Qo=()=>{const{additionalFields:e,customerId:t}=(0,_.useSelect)((e=>{const t=e(re.checkoutStore);return{additionalFields:t.getAdditionalFields(),customerId:t.getCustomerId()}})),{setAdditionalFields:o}=(0,_.useDispatch)(re.checkoutStore),{billingAddress:n,setEmail:c}=Kt(),{dispatchCheckoutEvent:s}=lt(),a={email:n.email,...e};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Zt.StoreNoticesContainer,{context:ve.CONTACT_INFORMATION}),(0,r.createElement)(Ro,{id:"contact",addressType:"contact",ariaDescribedBy:Jo,onChange:e=>{const{email:t,...r}=e;c(t),s("set-email-address"),o(r)},values:a,fields:X},!t&&(0,r.createElement)(Xo,null)))},er={...Lo({defaultTitle:(0,M.__)("Contact information","woocommerce"),defaultDescription:(0,M.__)("We'll use this email to send you details and updates about your order.","woocommerce")}),className:{type:"string",default:""},lock:{type:"object",default:{remove:!0,move:!0}}};(0,i.registerBlockType)("woocommerce/checkout-contact-information-block",{icon:{src:(0,r.createElement)(a.A,{icon:zo.A,className:"wc-block-editor-components-block-icon"})},attributes:er,edit:({attributes:e,setAttributes:t})=>(0,r.createElement)(Xt,{attributes:e,setAttributes:t,className:(0,n.A)("wc-block-checkout__contact-fields",null==e?void 0:e.className)},(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(qt.PanelBody,{title:(0,M.__)("Account creation and guest checkout","woocommerce")},(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("Account creation and guest checkout settings can be managed in your store settings.","woocommerce")),(0,r.createElement)(qt.ExternalLink,{href:`${y.ADMIN_URL}admin.php?page=wc-settings&tab=account`},(0,M.__)("Manage account settings","woocommerce")))),(0,r.createElement)(co,null,(0,r.createElement)(Qo,null)),(0,r.createElement)(Qt,{block:Bt.innerBlockAreas.CONTACT_INFORMATION})),save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(eo,null))});const tr=()=>{const{billingAddress:e,setShippingAddress:t,setBillingAddress:o,useBillingAsShipping:n,editingBillingAddress:c,setEditingBillingAddress:s}=Kt(),{dispatchCheckoutEvent:a}=lt(),{hasValidationErrors:i,invalidProps:l}=(0,_.useSelect)((t=>{const o=t(re.validationStore);return{hasValidationErrors:o.hasValidationErrors(),invalidProps:Object.keys(e).filter((e=>"email"!==e&&void 0!==o.getValidationError("billing_"+e))).filter(Boolean)}}));(0,m.useEffect)((()=>{l.length>0&&!1===c&&s(!0)}),[c,i,l.length,s]);const d=(0,m.useCallback)((e=>{o(e),n&&(t(e),a("set-shipping-address")),a("set-billing-address")}),[a,o,t,n]),u=(0,m.useCallback)((()=>(0,r.createElement)(Do,{address:e,target:"billing",onEdit:()=>{s(!0)},isExpanded:c})),[e,c,s]),p=(0,m.useCallback)((()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Ro,{id:"billing",addressType:"billing",onChange:d,values:e,fields:J,isEditing:c}))),[e,d,c]);return(0,r.createElement)(To,{isEditing:c,addressCard:u,addressForm:p})},or=()=>{const{defaultFields:e,billingAddress:t,setShippingAddress:o,useBillingAsShipping:n}=Kt(),{isEditor:c}=b();(0,to.Su)((()=>{if(n){var r,c;const{email:n,...s}=t,a={...s};null!=e&&null!==(r=e.phone)&&void 0!==r&&r.hidden&&delete a.phone,null!=e&&null!==(c=e.company)&&void 0!==c&&c.hidden&&delete a.company,o(a)}}));const s=c?co:m.Fragment,a=n?[ve.BILLING_ADDRESS,ve.SHIPPING_ADDRESS]:[ve.BILLING_ADDRESS],{cartDataLoaded:i}=(0,_.useSelect)((e=>({cartDataLoaded:e(re.cartStore).hasFinishedResolution("getCartData")})));return(0,r.createElement)(m.Fragment,null,(0,r.createElement)(Zt.StoreNoticesContainer,{context:a}),(0,r.createElement)(s,null,i?(0,r.createElement)(tr,null):null))},rr=(0,M.__)("Billing address","woocommerce"),nr=(0,M.__)("Enter the billing address that matches your payment method.","woocommerce"),cr=(0,M.__)("Billing and shipping address","woocommerce"),sr=(0,M.__)("Enter the billing and shipping address that matches your payment method.","woocommerce"),ar={...Lo({defaultTitle:rr,defaultDescription:nr}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}};(0,i.registerBlockType)("woocommerce/checkout-billing-address-block",{icon:{src:(0,r.createElement)(a.A,{icon:Yt.A,className:"wc-block-editor-components-block-icon"})},attributes:ar,edit:({attributes:e,setAttributes:t})=>{const{showBillingFields:o,forcedBillingAddress:c,useBillingAsShipping:s}=Kt();return o||s?(e.title=((e,t)=>t?e===rr?cr:e:e===cr?rr:e)(e.title,c),e.description=((e,t)=>t?e===nr?sr:e:e===sr?nr:e)(e.description,c),(0,r.createElement)(Xt,{setAttributes:t,attributes:e,className:(0,n.A)("wc-block-checkout__billing-fields",null==e?void 0:e.className)},(0,r.createElement)(zt,null),(0,r.createElement)(or,null),(0,r.createElement)(Qt,{block:Bt.innerBlockAreas.BILLING_ADDRESS}))):null},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(eo,null))});var ir=o(498);const lr=(0,M.__)("Place Order","woocommerce"),mr=(0,M.__)("Return to Cart","woocommerce"),dr={placeOrderButtonLabel:{type:"string",default:lr},returnToCartButtonLabel:{type:"string",default:mr}},ur=(e,t)=>{if(!e.title.raw)return e.slug;const o=1===t.filter((t=>t.title.raw===e.title.raw)).length;return e.title.raw+(o?"":` - ${e.slug}`)},pr=({setPageId:e,pageId:t,labels:o})=>{const n=(0,_.useSelect)((e=>e("core").getEntityRecords("postType","page",{status:"publish",orderby:"title",order:"asc",per_page:100})),[])||null;return n?(0,r.createElement)(qt.PanelBody,{title:o.title},(0,r.createElement)(qt.SelectControl,{label:(0,M.__)("Link to","woocommerce"),value:t,options:[{label:o.default,value:0},...n.map((e=>({label:ur(e,n),value:parseInt(e.id,10)})))],onChange:t=>e(parseInt(t,10))})):null};var hr=o(1387);o(718);const gr=({href:e,children:t})=>{const o=e||V;return o?(0,r.createElement)("a",{href:o,className:"wc-block-components-checkout-return-to-cart-button"},(0,r.createElement)(a.A,{icon:hr.A}),t):null};o(2080),o(7791);const _r=()=>(0,r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"}),kr=(0,m.forwardRef)(((e,t)=>{"showSpinner"in e&&ce()("showSpinner prop",{version:"8.9.0",alternative:"Render a spinner in the button children instead.",plugin:"WooCommerce"});const{className:o,showSpinner:c=!1,children:s,variant:a="contained",removeTextWrap:i=!1,...l}=e,m=(0,n.A)("wc-block-components-button","wp-element-button",o,a,{"wc-block-components-button--loading":c});if("href"in e)return(0,r.createElement)(ko.$,{render:(0,r.createElement)("a",{ref:t,href:e.href},c&&(0,r.createElement)(_r,null),(0,r.createElement)("span",{className:"wc-block-components-button__text"},s)),className:m,...l});const d=i?e.children:(0,r.createElement)("span",{className:"wc-block-components-button__text"},e.children);return(0,r.createElement)(ko.$,{ref:t,className:m,...l},c&&(0,r.createElement)(_r,null),d)})),br=({onChange:e,placeholder:t,value:o,children:n,...c})=>(0,r.createElement)(kr,{...c},(0,r.createElement)(l.RichText,{multiline:!1,allowedFormats:[],value:o,placeholder:t,onChange:e}),n),wr=window.wc.priceFormat;o(149);const Er=JSON.parse('{"uK":{"lock":{"type":"object","default":{"remove":true,"move":true}},"cartPageId":{"type":"number","default":0},"showReturnToCart":{"type":"boolean","default":true},"className":{"type":"string","default":""},"priceSeparator":{"type":"string","default":"·"}}}');o(5089);const yr={example:{attributes:{showPrice:!0,placeOrderButtonLabel:(0,M.__)("Place Order","woocommerce"),showReturnToCart:!1}},icon:{src:(0,r.createElement)(a.A,{icon:ir.A,className:"wc-block-editor-components-block-icon"})},attributes:{...dr,...Er.uK},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()}),edit:({attributes:e,setAttributes:t})=>{const o=(0,l.useBlockProps)(),{cartPageId:c=0,showReturnToCart:s=!1,placeOrderButtonLabel:a,returnToCartButtonLabel:i}=e,{cartTotals:d}=He(),u=(0,wr.getCurrencyFromPriceResponse)(d),{current:p}=(0,m.useRef)(c),h=(0,_.useSelect)((e=>p||e("core/editor").getCurrentPostId()),[p]),g=o.className.includes("is-style-with-price");return(0,r.createElement)("div",{...o},(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(qt.PanelBody,{title:(0,M.__)("Options","woocommerce")},(0,r.createElement)(qt.ToggleControl,{label:(0,M.__)('Show a "Return to Cart" link',"woocommerce"),help:(0,M.__)("Recommended to enable only if there is no Cart link in the header.","woocommerce"),checked:s,onChange:()=>t({showReturnToCart:!s})}),g&&(0,r.createElement)(qt.TextControl,{label:(0,M.__)("Price separator","woocommerce"),id:"price-separator",value:e.priceSeparator,onChange:e=>{t({priceSeparator:e})}})),s&&!(h===O&&0===p)&&(0,r.createElement)(pr,{pageId:c,setPageId:e=>t({cartPageId:e}),labels:{title:(0,M.__)("Return to Cart button","woocommerce"),default:(0,M.__)("WooCommerce Cart Page","woocommerce")}})),(0,r.createElement)("div",{className:"wc-block-checkout__actions"},(0,r.createElement)("div",{className:"wc-block-checkout__actions_row"},s&&(0,r.createElement)(gr,{href:"#cart-page-placeholder"},(0,r.createElement)(l.RichText,{multiline:!1,allowedFormats:[],value:i,placeholder:mr,onChange:e=>{t({returnToCartButtonLabel:e})}})),(0,r.createElement)(br,{className:(0,n.A)("wc-block-cart__submit-button","wc-block-components-checkout-place-order-button",{"wc-block-components-checkout-place-order-button--full-width":!s}),value:a,placeholder:lr,onChange:e=>{t({placeOrderButtonLabel:e})}},g&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("style",null,`.wp-block-woocommerce-checkout-actions-block {\n\t\t\t\t\t\t\t\t\t\t.wc-block-components-checkout-place-order-button__separator {\n\t\t\t\t\t\t\t\t\t\t\t&::after {\n\t\t\t\t\t\t\t\t\t\t\t\tcontent: "${e.priceSeparator}";\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}`),(0,r.createElement)("div",{className:"wc-block-components-checkout-place-order-button__separator"}),(0,r.createElement)("div",{className:"wc-block-components-checkout-place-order-button__price"},(0,r.createElement)(Zt.FormattedMonetaryAmount,{value:d.total_price,currency:u})))))))}};(0,i.registerBlockType)("woocommerce/checkout-actions-block",yr);const vr=()=>{const{additionalFields:e}=(0,_.useSelect)((e=>({additionalFields:e(re.checkoutStore).getAdditionalFields()}))),{setAdditionalFields:t}=(0,_.useDispatch)(re.checkoutStore),o={...e};return 0===Q.length?null:(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Zt.StoreNoticesContainer,{context:ve.ORDER_INFORMATION}),(0,r.createElement)(Ro,{id:"order",addressType:"order",onChange:e=>{t(e)},values:o,fields:Q}))},fr={...Lo({defaultTitle:(0,M.__)("Additional order information","woocommerce"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!1,remove:!0}}};(0,i.registerBlockType)("woocommerce/checkout-additional-information-block",{attributes:fr,icon:{src:(0,r.createElement)(a.A,{icon:Vo.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:t})=>0===Q.length?null:(0,r.createElement)(Xt,{setAttributes:t,attributes:e,className:(0,n.A)("wc-block-checkout__additional-information-fields",null==e?void 0:e.className)},(0,r.createElement)(vr,null)),save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});var Sr=o(6465);const Cr=({disabled:e,onChange:t,placeholder:o,value:n})=>{const[c,s]=(0,m.useState)(""!==n),[a,i]=(0,m.useState)("");return(0,r.createElement)("div",{className:"wc-block-checkout__add-note"},(0,r.createElement)(Zt.CheckboxControl,{disabled:e,label:(0,M.__)("Add a note to your order","woocommerce"),checked:c,onChange:e=>{s(e),e?n!==a&&t(a):(t(""),i(n))}}),c&&(0,r.createElement)(Zt.Textarea,{disabled:e,onTextChange:t,placeholder:o,value:n}))},Pr=({className:e})=>{const{needsShipping:t}=mt(),{isProcessing:o,orderNotes:c}=(0,_.useSelect)((e=>{const t=e(re.checkoutStore);return{isProcessing:t.isProcessing(),orderNotes:t.getOrderNotes()}})),{__internalSetOrderNotes:s}=(0,_.useDispatch)(re.checkoutStore);return(0,r.createElement)(Zt.FormStep,{id:"order-notes",showStepNumber:!1,className:(0,n.A)("wc-block-checkout__order-notes",e),disabled:o},(0,r.createElement)(Cr,{disabled:o,onChange:s,placeholder:t?(0,M.__)("Notes about your order, e.g. special notes for delivery.","woocommerce"):(0,M.__)("Notes about your order.","woocommerce"),value:c}))};o(377),o(7797),(0,i.registerBlockType)("woocommerce/checkout-order-note-block",{icon:{src:(0,r.createElement)(a.A,{icon:Sr.A,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=(0,l.useBlockProps)();return(0,r.createElement)("div",{...e},(0,r.createElement)(co,null,(0,r.createElement)(Pr,null)))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});const Nr=(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},(0,r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M6 3.75h12c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H6c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),(0,r.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.9 7.5A1.1 1.1 0 018 6.4h8a1.1 1.1 0 011.1 1.1v2a1.1 1.1 0 01-1.1 1.1H8a1.1 1.1 0 01-1.1-1.1v-2zm1.2.1v1.8h7.8V7.6H8.1z",clipRule:"evenodd"}),(0,r.createElement)("path",{fill:"currentColor",d:"M8.5 12h1v1h-1v-1zM8.5 14h1v1h-1v-1zM8.5 16h1v1h-1v-1zM11.5 12h1v1h-1v-1zM11.5 14h1v1h-1v-1zM11.5 16h1v1h-1v-1zM14.5 12h1v1h-1v-1zM14.5 14h1v1h-1v-1zM14.5 16h1v1h-1v-1z"}));o(8375);const Ar=({children:e,className:t,screenReaderLabel:o,showSpinner:c=!1,isLoading:s=!0})=>(0,r.createElement)("div",{className:(0,n.A)(t,{"wc-block-components-loading-mask":s})},s&&c&&(0,r.createElement)(Zt.Spinner,null),(0,r.createElement)("div",{className:(0,n.A)({"wc-block-components-loading-mask__children":s}),"aria-hidden":s},e),s&&(0,r.createElement)("span",{className:"screen-reader-text"},o||(0,M.__)("Loading…","woocommerce")));o(3048);const xr=({instanceId:e,isLoading:t=!1,onSubmit:o,displayCouponForm:n=!1})=>{const[c,s]=(0,m.useState)(""),[a,i]=(0,m.useState)(n),l=`wc-block-components-totals-coupon__input-${e}`,{validationErrorId:d}=(0,_.useSelect)((t=>({validationErrorId:t(re.validationStore).getValidationErrorId(e)}))),u=(0,m.useRef)(null);return(0,r.createElement)(Zt.Panel,{className:"wc-block-components-totals-coupon",initialOpen:a,hasBorder:!1,headingLevel:2,title:(0,M.__)("Add a coupon","woocommerce"),state:[a,i]},(0,r.createElement)(Ar,{screenReaderLabel:(0,M.__)("Applying coupon…","woocommerce"),isLoading:t,showSpinner:!1},(0,r.createElement)("div",{className:"wc-block-components-totals-coupon__content"},(0,r.createElement)("form",{className:"wc-block-components-totals-coupon__form",id:"wc-block-components-totals-coupon__form"},(0,r.createElement)(Zt.ValidatedTextInput,{id:l,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:(0,M.__)("Enter code","woocommerce"),value:c,ariaDescribedBy:d,onChange:e=>{s(e)},focusOnMount:!0,validateOnMount:!1,showError:!1,ref:u}),(0,r.createElement)(kr,{className:"wc-block-components-totals-coupon__button",disabled:t||!c,showSpinner:t,onClick:e=>{var t;e.preventDefault(),void 0!==o?null===(t=o(c))||void 0===t||t.then((e=>{var t;e?(s(""),i(!1)):null!==(t=u.current)&&void 0!==t&&t.focus&&u.current.focus()})):(s(""),i(!0))},type:"submit"},(0,M.__)("Apply","woocommerce"))),(0,r.createElement)(Zt.ValidationInputError,{propertyName:"coupon",elementId:e}))))};o(265);const Ir={context:"summary"},Rr=({cartCoupons:e=[],currency:t,isRemovingCoupon:o,removeCoupon:n,values:c})=>{const{total_discount:s,total_discount_tax:a}=c,i=parseInt(s,10),l=(0,Bt.applyCheckoutFilter)({arg:Ir,filterName:"coupons",defaultValue:e});if(!i&&0===l.length)return null;const m=parseInt(a,10),d=(0,y.getSetting)("displayCartPricesIncludingTax",!1)?i+m:i;return(0,r.createElement)(Zt.TotalsItem,{className:"wc-block-components-totals-discount",currency:t,description:0!==l.length&&(0,r.createElement)(Ar,{screenReaderLabel:(0,M.__)("Removing coupon…","woocommerce"),isLoading:o,showSpinner:!1},(0,r.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},l.map((e=>(0,r.createElement)(Zt.RemovableChip,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:(0,M.sprintf)(/* translators: %s Coupon code. */ /* translators: %s Coupon code. */ (0,M.__)("Coupon: %s","woocommerce"),e.label),disabled:o,onRemove:()=>{n(e.code)},radius:"large",ariaLabel:(0,M.sprintf)(/* translators: %s is a coupon code. */ /* translators: %s is a coupon code. */ (0,M.__)('Remove coupon "%s"',"woocommerce"),e.label)}))))),label:d?(0,M.__)("Discount","woocommerce"):(0,M.__)("Coupons","woocommerce"),value:d?-1*d:"-"})};o(7919);const Tr=({currency:e,values:t,className:o})=>{const c=(0,y.getSetting)("taxesEnabled",!0)&&(0,y.getSetting)("displayCartPricesIncludingTax",!1),{total_price:s,total_tax:a,tax_lines:i}=t,{receiveCart:l,...d}=He(),u=(0,Bt.applyCheckoutFilter)({filterName:"totalLabel",defaultValue:(0,M.__)("Total","woocommerce"),extensions:d.extensions,arg:{cart:d}}),p=(0,Bt.applyCheckoutFilter)({filterName:"totalValue",defaultValue:"<price/>",extensions:d.extensions,arg:{cart:d},validation:Bt.productPriceValidation}),h=(0,r.createElement)(Zt.FormattedMonetaryAmount,{className:"wc-block-components-totals-footer-item-tax-value",currency:e,value:parseInt(s,10)}),g=(0,m.createInterpolateElement)(p,{price:h}),_=parseInt(a,10),k=i&&i.length>0?(0,M.sprintf)(/* translators: %s is a list of tax rates */ /* translators: %s is a list of tax rates */ (0,M.__)("Including %s","woocommerce"),i.map((({name:t,price:o})=>`${(0,wr.formatPrice)(o,e)} ${t}`)).join(", ")):(0,M.__)("Including <TaxAmount/> in taxes","woocommerce");return(0,r.createElement)(Zt.TotalsItem,{className:(0,n.A)("wc-block-components-totals-footer-item",o),currency:e,label:u,value:g,description:c&&0!==_&&(0,r.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},(0,m.createInterpolateElement)(k,{TaxAmount:(0,r.createElement)(Zt.FormattedMonetaryAmount,{className:"wc-block-components-totals-footer-item-tax-value",currency:e,value:_})}))})},Mr=()=>{const{shippingRates:e}=He(),t=(e=>e.flatMap((e=>e.shipping_rates.filter((e=>e.selected)).flatMap((e=>e.name)))))(e);return t?(0,r.createElement)("div",{className:"wc-block-components-totals-shipping__via"},(0,Pe.decodeEntities)(t.filter(((e,o)=>t.indexOf(e)===o)).join(", "))):null};let Br=null;o(7051);const Dr=({address:e,onUpdate:t,onCancel:o,addressFields:n})=>{const[c,s]=(0,m.useState)(e),{showAllValidationErrors:a}=(0,_.useDispatch)(re.validationStore),i=function(e){const t=(0,m.useRef)(null),o=(0,m.useRef)(null),r=(0,m.useRef)(e);return(0,m.useEffect)((()=>{r.current=e}),[e]),(0,m.useCallback)((e=>{if(e)t.current=e,o.current=e.ownerDocument.activeElement;else if(o.current){var n,c,s;const e=null===(n=t.current)||void 0===n?void 0:n.contains(null===(c=t.current)||void 0===c?void 0:c.ownerDocument.activeElement);var a;if(null!==(s=t.current)&&void 0!==s&&s.isConnected&&!e&&(null!==(a=Br)&&void 0!==a||(Br=o.current)),r.current)r.current();else{var i;const e=o.current;null===(i=null!=e&&e.isConnected?e:Br)||void 0===i||i.focus()}Br=null}}),[])}(),{hasValidationErrors:l,isCustomerDataUpdating:d}=(0,_.useSelect)((e=>({hasValidationErrors:e(re.validationStore).hasValidationErrors,isCustomerDataUpdating:e(re.cartStore).isCustomerDataUpdating()})));return(0,r.createElement)("form",{className:"wc-block-components-shipping-calculator-address",ref:i},(0,r.createElement)(Ro,{fields:n,onChange:s,values:c}),(0,r.createElement)(kr,{className:"wc-block-components-shipping-calculator-address__button",disabled:d,variant:"outlined",onClick:r=>{if(r.preventDefault(),Je()(c,e))return o();if(a(),!l()){const e={};return n.forEach((t=>{void 0!==c[t]&&(e[t]=c[t])})),t(e)}},type:"submit"},(0,M.__)("Check delivery options","woocommerce")))},Or=(0,m.createContext)({shippingCalculatorID:"",showCalculator:!1,isShippingCalculatorOpen:!1,setIsShippingCalculatorOpen:()=>{}}),Fr=({onUpdate:e=()=>{},onCancel:t=()=>{},addressFields:o=["country","state","city","postcode"]})=>{const{shippingCalculatorID:n,showCalculator:c,setIsShippingCalculatorOpen:s}=(0,m.useContext)(Or),{shippingAddress:a}=Gt(),i="wc/cart/shipping-calculator",l=(0,m.useCallback)((()=>{s(!1),t()}),[s,t]),d=(0,m.useCallback)((t=>{(0,_.dispatch)(re.cartStore).updateCustomerData({shipping_address:t},!1).then((()=>{(e=>{const{removeNotice:t}=(0,_.dispatch)(bt.store),{getNotices:o}=(0,_.select)(bt.store);o(e).forEach((o=>{t(o.id,e)}))})(i),s(!1),e(t)})).catch((e=>{(0,re.processErrorResponse)(e,i)}))}),[e,s]);return c?(0,r.createElement)("div",{className:"wc-block-components-shipping-calculator",id:n},(0,r.createElement)(Zt.StoreNoticesContainer,{context:i}),(0,r.createElement)(Dr,{address:a,addressFields:o,onCancel:l,onUpdate:d})):null},Lr=({title:e})=>{const{isShippingCalculatorOpen:t,setIsShippingCalculatorOpen:o}=(0,m.useContext)(Or);return(0,r.createElement)(Zt.Panel,{className:"wc-block-components-totals-shipping-panel",initialOpen:!1,hasBorder:!1,title:e,state:[t,o]},(0,r.createElement)(Fr,null))},jr=e=>{const t=(e=>(0,y.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.total_shipping,10)+parseInt(e.total_shipping_tax,10):parseInt(e.total_shipping,10))(e);return 0===t?(0,r.createElement)("strong",null,(0,M.__)("Free","woocommerce")):t},Vr=()=>{const{shippingRates:e,shippingAddress:t}=He(),o=(0,_.useSelect)((e=>e(re.checkoutStore).prefersCollection())),n=Ge(e),{showCalculator:c}=(0,m.useContext)(Or),s=o?(e=>{const t=(e||[]).flatMap((e=>e.shipping_rates)).find((e=>e.selected&&We(e)));if((0,ye.isObject)(t)&&(0,ye.objectHasProp)(t,"meta_data")){const e=t.meta_data.find((e=>"pickup_address"===e.key));if((0,ye.isObject)(e)&&(0,ye.objectHasProp)(e,"value")&&e.value)return e.value}return""})(e):(e=>{if(0===Object.values(e).length)return null;const t=(0,ye.isString)(Y[e.country])?(0,Pe.decodeEntities)(Y[e.country]):"",o=(0,ye.isObject)(G[e.country])&&(0,ye.isString)(G[e.country][e.state])?(0,Pe.decodeEntities)(G[e.country][e.state]):e.state,r=[];return r.push(e.postcode.toUpperCase()),r.push(e.city),r.push(o),r.push(t),r.filter(Boolean).join(", ")||null})(t),a=n? // Translators: <address/> is the formatted shipping address. // Translators: <address/> is the formatted shipping address. (0,M.__)("Delivers to <address/>","woocommerce"): // Translators: <address/> is the formatted shipping address. // Translators: <address/> is the formatted shipping address. (0,M.__)("No delivery options available for <address/>","woocommerce"),i=Te(t,["state","city","country","postcode"]),l=(0,y.getSetting)("shippingCostRequiresAddress",!1)&&!i,d=o? // Translators: <address/> is the pickup location. // Translators: <address/> is the pickup location. (0,M.__)("Collection from <address/>","woocommerce"):a,u=(0,r.createElement)("p",{className:"wc-block-components-totals-shipping-address-summary"},s&&!l?(0,m.createInterpolateElement)(d,{address:(0,r.createElement)("strong",null,s)}):(0,r.createElement)(r.Fragment,null,(0,M.__)("Enter address to check delivery options","woocommerce")));return(0,r.createElement)("div",{className:"wc-block-components-shipping-address"},c&&(0,r.createElement)(Lr,{title:u}))};o(780);const Ur=({label:e=(0,M.__)("Shipping","woocommerce"),placeholder:t=null,collaterals:o=null})=>{const{cartTotals:n,shippingRates:c}=He(),s=Ge(c);return(0,r.createElement)("div",{className:"wc-block-components-totals-shipping"},(0,r.createElement)(Zt.TotalsItem,{label:e,value:s?jr(n):t,description:(0,r.createElement)(r.Fragment,null,!!s&&(0,r.createElement)(Mr,null),(0,r.createElement)(Vr,null),o&&(0,r.createElement)("div",{className:"wc-block-components-totals-shipping__collaterals"},o)),currency:(0,wr.getCurrencyFromPriceResponse)(n)}))};var $r=o(9813);const Hr=()=>{const{extensions:e,receiveCart:t,...o}=He(),n={extensions:e,cart:o,context:"woocommerce/checkout"};return(0,r.createElement)(Bt.ExperimentalOrderMeta.Slot,{...n})},{Fill:qr,Slot:zr}=(0,Bt.createSlotFill)("checkoutOrderSummaryActionArea"),Wr=JSON.parse('{"xY":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"uK":{"lock":{"type":"object","default":{"remove":true}}}}'),Yr=[{attributes:Wr.uK,save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(l.InnerBlocks.Content,null)),supports:Wr.xY,migrate:({attributes:e})=>[e,[(0,i.createBlock)("woocommerce/checkout-order-summary-cart-items-block",{},[]),(0,i.createBlock)("woocommerce/checkout-order-summary-coupon-form-block",{},[]),(0,i.createBlock)("woocommerce/checkout-order-summary-totals-block",{},[(0,i.createBlock)("woocommerce/checkout-order-summary-subtotal-block",{},[]),(0,i.createBlock)("woocommerce/checkout-order-summary-fee-block",{},[]),(0,i.createBlock)("woocommerce/checkout-order-summary-discount-block",{},[]),(0,i.createBlock)("woocommerce/checkout-order-summary-shipping-block",{},[]),(0,i.createBlock)("woocommerce/checkout-order-summary-taxes-block",{},[])])]],isEligible:(e,t)=>!t.some((e=>"woocommerce/checkout-order-summary-totals-block"===e.name))}],Gr=Yr;o(1407),(0,i.registerBlockType)("woocommerce/checkout-order-summary-block",{icon:{src:(0,r.createElement)(a.A,{icon:Nr,className:"wc-block-editor-components-block-icon"})},attributes:{className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},edit:({clientId:e})=>{const t=(0,l.useBlockProps)(),{cartTotals:o}=He(),c=(0,wr.getCurrencyFromPriceResponse)(o),s=parseInt(o.total_price,10),a=$t(Bt.innerBlockAreas.CHECKOUT_ORDER_SUMMARY),{isLarge:i}=p(),[d,u]=(0,m.useState)(!1),h=(0,m.useId)(),g=i?{}:{role:"button",onClick:()=>u(!d),"aria-expanded":d,"aria-controls":h,tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||u(!d)}},_=[["woocommerce/checkout-order-summary-cart-items-block",{},[]],["woocommerce/checkout-order-summary-coupon-form-block",{},[]],["woocommerce/checkout-order-summary-totals-block",{},[]]];return Ht({clientId:e,registeredBlocks:a,defaultTemplate:_}),(0,r.createElement)("div",{...t},(0,r.createElement)("div",{className:"wc-block-components-checkout-order-summary__title",...g},(0,r.createElement)("p",{className:"wc-block-components-checkout-order-summary__title-text",role:"heading"},(0,M.__)("Order summary","woocommerce")),!i&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Zt.FormattedMonetaryAmount,{currency:c,value:s}),(0,r.createElement)(qt.Icon,{icon:d?$r.A:so.A}))),(0,r.createElement)("div",{className:(0,n.A)("wc-block-components-checkout-order-summary__content",{"is-open":d}),id:h},(0,r.createElement)(l.InnerBlocks,{allowedBlocks:a,template:_}),(0,r.createElement)("div",{className:"wc-block-components-totals-wrapper"},(0,r.createElement)(Tr,{currency:c,values:o})),(0,r.createElement)(Hr,null)))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(l.InnerBlocks.Content,null)),deprecated:Gr});var Kr=o(8994),Zr=o(4133),Jr=o(7674),Xr=o.n(Jr);const Qr=["a","b","em","i","strong","p","br"],en=["target","href","rel","name","download"],tn=(e,t)=>{const o=(null==t?void 0:t.tags)||Qr,r=(null==t?void 0:t.attr)||en;return Xr().sanitize(e,{ALLOWED_TAGS:o,ALLOWED_ATTR:r})},on={warning:"#F0B849",error:"#CC1818",success:"#46B450",info:"#0073AA"},rn=({status:e="warning",...t})=>(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t},(0,r.createElement)("path",{d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z",stroke:on[e],strokeWidth:"1.5"}),(0,r.createElement)("path",{d:"M13 7H11V13H13V7Z",fill:on[e]}),(0,r.createElement)("path",{d:"M13 15H11V17H13V15Z",fill:on[e]}));o(9705);const nn=({href:e,title:t,description:o,warning:n})=>(0,r.createElement)("a",{href:e,className:"wc-block-editor-components-external-link-card",target:"_blank",rel:"noreferrer"},(0,r.createElement)("span",{className:"wc-block-editor-components-external-link-card__content"},(0,r.createElement)("strong",{className:"wc-block-editor-components-external-link-card__title"},t),o&&(0,r.createElement)("span",{className:"wc-block-editor-components-external-link-card__description",dangerouslySetInnerHTML:{__html:tn(o)}}),n?(0,r.createElement)("span",{className:"wc-block-editor-components-external-link-card__warning"},(0,r.createElement)(a.A,{icon:(0,r.createElement)(rn,{status:"error"})}),(0,r.createElement)("span",null,n)):null),(0,r.createElement)(qt.VisuallyHidden,{as:"span"},/* translators: accessibility text */ /* translators: accessibility text */ (0,M.__)("(opens in a new tab)","woocommerce")),(0,r.createElement)(a.A,{icon:Zr.A,className:"wc-block-editor-components-external-link-card__icon"})),cn=window.wp.autop,sn=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),an=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,ln=(e,t,o="…",r=!0)=>{const n=sn(e),c=n.split(" ").splice(0,t).join(" ");return c===n?r?(0,cn.autop)(n):n:r?(0,cn.autop)(an(c,o)):an(c,o)},mn=(e,t,o=!0,r="…",n=!0)=>{const c=sn(e),s=c.slice(0,t);if(s===c)return n?(0,cn.autop)(c):c;if(o)return(0,cn.autop)(an(s,r));const a=s.match(/([\s]+)/g),i=a?a.length:0,l=c.slice(0,t+i);return n?(0,cn.autop)(an(l,r)):an(l,r)};var dn=o(1208),un=(o(9345),o(2900)),pn=o(2478),hn=o(8306);const gn=e=>{switch(e){case"success":case"warning":case"info":case"default":return"polite";default:return"assertive"}},kn=e=>{switch(e){case"success":return un.A;case"warning":case"info":case"error":return pn.A;default:return hn.A}};var bn=o(195);const wn=({className:e,status:t="default",children:o,spokenMessage:c=o,onRemove:s=()=>{},isDismissible:i=!0,politeness:l=gn(t),summary:d})=>(((e,t)=>{const o="string"==typeof e?e:(0,m.renderToString)(e);(0,m.useEffect)((()=>{o&&(0,bn.speak)(o,t)}),[o,t])})(c,l),(0,r.createElement)("div",{className:(0,n.A)(e,"wc-block-components-notice-banner","is-"+t,{"is-dismissible":i})},(0,r.createElement)(a.A,{icon:kn(t)}),(0,r.createElement)("div",{className:"wc-block-components-notice-banner__content"},d&&(0,r.createElement)("p",{className:"wc-block-components-notice-banner__summary"},d),o),!!i&&(0,r.createElement)(kr,{className:"wc-block-components-notice-banner__dismiss","aria-label":(0,M.__)("Dismiss this notice","woocommerce"),onClick:e=>{"function"==typeof(null==e?void 0:e.preventDefault)&&e.preventDefault&&e.preventDefault(),s()},removeTextWrap:!0},(0,r.createElement)(a.A,{icon:dn.A}))));o(1637);const En=()=>(0,r.createElement)(wn,{isDismissible:!1,className:"wc-block-checkout__no-payment-methods-notice",status:"error"},(0,M.__)("There are no payment methods available. This may be an error on our side. Please contact us if you need any help placing your order.","woocommerce")),yn=(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)("g",{fill:"none",fillRule:"evenodd"},(0,r.createElement)("path",{d:"M0 0h24v24H0z"}),(0,r.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),(0,r.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"})));var vn=o(4166),fn=o(3576);o(777);const Sn={bank:vn.A,bill:fn.A,card:Kr.A,checkPayment:yn},Cn=({icon:e="",text:t=""})=>{const o=!!e,c=(0,m.useCallback)((e=>o&&(0,ye.isString)(e)&&(0,ye.objectHasProp)(Sn,e)),[o]),s=(0,n.A)("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":o});return(0,r.createElement)("span",{className:s},c(e)?(0,r.createElement)(a.A,{icon:Sn[e]}):e,t)},Pn=e=>`wc-block-components-payment-method-icon wc-block-components-payment-method-icon--${e}`,Nn=({id:e,src:t=null,alt:o=""})=>t?(0,r.createElement)("img",{className:Pn(e),src:t,alt:o}):null,An=[{id:"alipay",alt:"Alipay",src:D+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:D+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:D+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:D+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:D+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:D+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:D+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:D+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:D+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:D+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:D+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:D+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:D+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:D+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:D+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:D+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:D+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:D+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:D+"payment-methods/wechat.svg"}];o(4957);const xn=({icons:e=[],align:t="center",className:o})=>{const c=(e=>{const t={};return e.forEach((e=>{let o={};"string"==typeof e&&(o={id:e,alt:e,src:null}),"object"==typeof e&&(o={id:e.id||"",alt:e.alt||"",src:e.src||null}),o.id&&(0,ye.isString)(o.id)&&!t[o.id]&&(t[o.id]=o)})),Object.values(t)})(e);if(0===c.length)return null;const s=(0,n.A)("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===t,"wc-block-components-payment-method-icons--align-right":"right"===t},o);return(0,r.createElement)("div",{className:s},c.map((e=>{const t={...e,...(o=e.id,An.find((e=>e.id===o))||{})};var o;return(0,r.createElement)(Nn,{key:"payment-method-icon-"+e.id,...t})})))},In=(e="")=>{const{cartCoupons:t,cartIsLoading:o}=He(),{createErrorNotice:r}=(0,_.useDispatch)("core/notices"),{createNotice:n}=(0,_.useDispatch)("core/notices"),{setValidationErrors:c}=(0,_.useDispatch)(re.validationStore),{isApplyingCoupon:s,isRemovingCoupon:a}=(0,_.useSelect)((e=>{const t=e(re.cartStore);return{isApplyingCoupon:t.isApplyingCoupon(),isRemovingCoupon:t.isRemovingCoupon()}})),{applyCoupon:i,removeCoupon:l}=(0,_.useDispatch)(re.cartStore),m=(0,_.useSelect)((e=>e(re.checkoutStore).getOrderId()));return{appliedCoupons:t,isLoading:o,applyCoupon:t=>i(t).then((()=>((0,Bt.applyCheckoutFilter)({filterName:"showApplyCouponNotice",defaultValue:!0,arg:{couponCode:t,context:e}})&&n("info",(0,M.sprintf)(/* translators: %s coupon code. */ /* translators: %s coupon code. */ (0,M.__)('Coupon code "%s" has been applied to your cart.',"woocommerce"),t),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0)))).catch((e=>{const t=(e=>{var t,o;return m&&m>0&&null!=e&&null!==(t=e.data)&&void 0!==t&&null!==(t=t.details)&&void 0!==t&&t.checkout?e.data.details.checkout:null!=e&&null!==(o=e.data)&&void 0!==o&&null!==(o=o.details)&&void 0!==o&&o.cart?e.data.details.cart:e.message})(e);return c({coupon:{message:(0,Pe.decodeEntities)(t),hidden:!1}}),Promise.resolve(!1)})),removeCoupon:t=>l(t).then((()=>((0,Bt.applyCheckoutFilter)({filterName:"showRemoveCouponNotice",defaultValue:!0,arg:{couponCode:t,context:e}})&&n("info",(0,M.sprintf)(/* translators: %s coupon code. */ /* translators: %s coupon code. */ (0,M.__)('Coupon code "%s" has been removed from your cart.',"woocommerce"),t),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0)))).catch((t=>(r(t.message,{id:"coupon-form",context:e}),Promise.resolve(!1)))),isApplyingCoupon:s,isRemovingCoupon:a}},Rn=(e,t)=>{const o=[],r=(t,o)=>{const r=o+"_tax",n=(0,ye.objectHasProp)(e,o)&&(0,ye.isString)(e[o])?parseInt(e[o],10):0;return{key:o,label:t,value:n,valueWithTax:n+((0,ye.objectHasProp)(e,r)&&(0,ye.isString)(e[r])?parseInt(e[r],10):0)}};return o.push(r((0,M.__)("Subtotal:","woocommerce"),"total_items")),o.push(r((0,M.__)("Fees:","woocommerce"),"total_fees")),o.push(r((0,M.__)("Discount:","woocommerce"),"total_discount")),o.push({key:"total_tax",label:(0,M.__)("Taxes:","woocommerce"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&o.push(r((0,M.__)("Shipping:","woocommerce"),"total_shipping")),o},Tn=()=>{const{onCheckoutBeforeProcessing:e,onCheckoutValidationBeforeProcessing:t,onCheckoutAfterProcessingWithSuccess:o,onCheckoutAfterProcessingWithError:r,onSubmit:n}=(0,m.useContext)(St),{onCheckoutValidation:c,onCheckoutSuccess:s,onCheckoutFail:a}=wt.checkoutEvents,{isCalculating:i,isComplete:l,isIdle:d,isProcessing:u,customerId:p}=(0,_.useSelect)((e=>{const t=e(re.checkoutStore);return{isComplete:t.isComplete(),isIdle:t.isIdle(),isProcessing:t.isProcessing(),customerId:t.getCustomerId(),isCalculating:t.isCalculating()}})),{paymentStatus:h,activePaymentMethod:g,shouldSavePayment:k}=(0,_.useSelect)((e=>{const t=e(re.paymentStore);return{paymentStatus:{get isPristine(){return ce()("isPristine",{since:"9.6.0",alternative:"isIdle",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8110"}),t.isPaymentIdle()},isIdle:t.isPaymentIdle(),isStarted:t.isExpressPaymentStarted(),isProcessing:t.isPaymentProcessing(),get isFinished(){return ce()("isFinished",{since:"9.6.0",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8110"}),t.hasPaymentError()||t.isPaymentReady()},hasError:t.hasPaymentError(),get hasFailed(){return ce()("hasFailed",{since:"9.6.0",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8110"}),t.hasPaymentError()},get isSuccessful(){return ce()("isSuccessful",{since:"9.6.0",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8110"}),t.isPaymentReady()},isReady:t.isPaymentReady(),isDoingExpressPayment:t.isExpressPaymentMethodActive()},activePaymentMethod:t.getActivePaymentMethod(),shouldSavePayment:t.getShouldSavePaymentMethod()}})),{__internalSetExpressPaymentError:b}=(0,_.useDispatch)(re.paymentStore),{onPaymentProcessing:w,onPaymentSetup:E}=(0,m.useContext)(me),{shippingErrorStatus:v,shippingErrorTypes:f,onShippingRateSuccess:S,onShippingRateFail:C,onShippingRateSelectSuccess:P,onShippingRateSelectFail:N}=gt(),{shippingRates:A,isLoadingRates:x,selectedRates:I,isSelectingRate:R,selectShippingRate:T,needsShipping:B}=mt(),{billingAddress:D,shippingAddress:O}=(0,_.useSelect)((e=>e(re.cartStore).getCustomerData())),{setShippingAddress:F}=(0,_.useDispatch)(re.cartStore),{cartItems:L,cartFees:j,cartTotals:V,extensions:U}=He(),{appliedCoupons:$}=In(),H=(0,m.useRef)(Rn(V,B)),q=(0,m.useRef)({label:(0,M.__)("Total","woocommerce"),value:parseInt(V.total_price,10)});(0,m.useEffect)((()=>{H.current=Rn(V,B),q.current={label:(0,M.__)("Total","woocommerce"),value:parseInt(V.total_price,10)}}),[V,B]);const z=(0,m.useCallback)(((e="")=>{ce()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),b(e)}),[b]);return{activePaymentMethod:g,billing:{appliedCoupons:$,billingAddress:D,billingData:D,cartTotal:q.current,cartTotalItems:H.current,currency:(0,wr.getCurrencyFromPriceResponse)(V),customerId:p,displayPricesIncludingTax:(0,y.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:L,cartFees:j,extensions:U},checkoutStatus:{isCalculating:i,isComplete:l,isIdle:d,isProcessing:u},components:{LoadingMask:Ar,PaymentMethodIcons:xn,PaymentMethodLabel:Cn,ValidationInputError:Zt.ValidationInputError},emitResponse:{noticeContexts:ve,responseTypes:ye.responseTypes},eventRegistration:{onCheckoutAfterProcessingWithError:r,onCheckoutAfterProcessingWithSuccess:o,onCheckoutBeforeProcessing:e,onCheckoutValidationBeforeProcessing:t,onCheckoutSuccess:s,onCheckoutFail:a,onCheckoutValidation:c,onPaymentProcessing:w,onPaymentSetup:E,onShippingRateFail:C,onShippingRateSelectFail:N,onShippingRateSelectSuccess:P,onShippingRateSuccess:S},onSubmit:n,paymentStatus:h,setExpressPaymentError:z,shippingData:{isSelectingRate:R,needsShipping:B,selectedRates:I,setSelectedRates:T,setShippingAddress:F,shippingAddress:O,shippingRates:A,shippingRatesLoading:x},shippingStatus:{shippingErrorStatus:v,shippingErrorTypes:f},shouldSavePayment:k}};class Mn extends m.Component{constructor(...e){super(...e),(0,T.A)(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:o}=this.props;if(e){let e=(0,M.__)("We are experiencing difficulties with this payment method. Please contact us for assistance.","woocommerce");(o||y.CURRENT_USER_IS_ADMIN)&&(e=t||(0,M.__)("There was an error with this payment method. Please verify it's configured correctly.","woocommerce"));const n=[{id:"0",content:e,isDismissible:!1,status:"error"}];return(0,r.createElement)(Zt.StoreNoticesContainer,{additionalNotices:n,context:ve.PAYMENTS})}return this.props.children}}const Bn=Mn,Dn=({children:e,showSaveOption:t})=>{const{isEditor:o}=b(),{shouldSavePaymentMethod:n,customerId:c}=(0,_.useSelect)((e=>{const t=e(re.paymentStore),o=e(re.checkoutStore);return{shouldSavePaymentMethod:t.getShouldSavePaymentMethod(),customerId:o.getCustomerId()}})),{__internalSetShouldSavePaymentMethod:s}=(0,_.useDispatch)(re.paymentStore);return(0,r.createElement)(Bn,{isEditor:o},e,c>0&&t&&(0,r.createElement)(Zt.CheckboxControl,{className:"wc-block-components-payment-methods__save-card-info",label:(0,M.__)("Save payment information to my account for future purchases.","woocommerce"),checked:n,onChange:()=>s(!n)}))},On=()=>{const{activeSavedToken:e,activePaymentMethod:t,isExpressPaymentMethodActive:o,savedPaymentMethods:c,availablePaymentMethods:s}=(0,_.useSelect)((e=>{const t=e(re.paymentStore);return{activeSavedToken:t.getActiveSavedToken(),activePaymentMethod:t.getActivePaymentMethod(),isExpressPaymentMethodActive:t.isExpressPaymentMethodActive(),savedPaymentMethods:t.getSavedPaymentMethods(),availablePaymentMethods:t.getAvailablePaymentMethods()}})),{__internalSetActivePaymentMethod:a}=(0,_.useDispatch)(re.paymentStore),i=(0,At.getPaymentMethods)(),{...l}=Tn(),{removeNotice:d}=(0,_.useDispatch)("core/notices"),{dispatchCheckoutEvent:u}=lt(),{isEditor:p}=b(),h=Object.keys(s).map((e=>{const{edit:t,content:o,label:n,supports:c}=i[e],s=p?t:o;return{value:e,label:"string"==typeof n?n:(0,m.cloneElement)(n,{components:l.components}),name:`wc-saved-payment-method-token-${e}`,content:(0,r.createElement)(Dn,{showSaveOption:c.showSaveOption},(0,m.cloneElement)(s,{__internalSetActivePaymentMethod:a,...l}))}})),g=(0,m.useCallback)((e=>{a(e),d("wc-payment-error",ve.PAYMENTS),u("set-active-payment-method",{paymentMethodSlug:e})}),[u,d,a]),k=0===Object.keys(c).length&&1===Object.keys(i).length,w=(0,n.A)({"disable-radio-control":k});return o?null:(0,r.createElement)(Zt.RadioControlAccordion,{highlightChecked:!0,id:"wc-payment-method-options",className:w,selected:e?null:t,onChange:g,options:h})},Fn="wc/store/cart",Ln=((0,M.__)("Unable to get cart data from the API.","woocommerce"),[]),jn=[],Vn={},Un={};J.forEach((e=>{Un[e]=""}));const $n={};J.forEach((e=>{$n[e]=""})),$n.email="";const Hn={cartItemsPendingQuantity:[],cartItemsPendingDelete:[],productsPendingAdd:[],cartData:{coupons:[],shippingRates:[],shippingAddress:Un,billingAddress:$n,items:[],itemsCount:0,itemsWeight:0,crossSells:[],needsShipping:!0,needsPayment:!1,hasCalculatedShipping:!0,fees:[],totals:{currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"",currency_suffix:"",total_items:"0",total_items_tax:"0",total_fees:"0",total_fees_tax:"0",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_price:"0",total_tax:"0",tax_lines:[]},errors:Ln,paymentMethods:[],paymentRequirements:[],extensions:Vn},metaData:{updatingCustomerData:!1,updatingSelectedRate:!1,applyingCoupon:"",removingCoupon:"",isCartDataStale:!1},errors:jn},qn=({method:e,expires:t})=>{var o,r,n;return(0,M.sprintf)(/* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card, %3$s is referring to the expiry date. */ /* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card, %3$s is referring to the expiry date. */ (0,M.__)("%1$s ending in %2$s (expires %3$s)","woocommerce"),null!==(o=null!==(r=null==e?void 0:e.display_brand)&&void 0!==r?r:null==e||null===(n=e.networks)||void 0===n?void 0:n.preferred)&&void 0!==o?o:e.brand,e.last4,t)},zn=({method:e})=>e.brand&&e.last4?(0,M.sprintf)(/* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card. */ /* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card. */ (0,M.__)("%1$s ending in %2$s","woocommerce"),e.brand,e.last4):(0,M.sprintf)(/* translators: %s is the name of the payment method gateway. */ /* translators: %s is the name of the payment method gateway. */ (0,M.__)("Saved token for %s","woocommerce"),e.gateway),Wn=()=>{var e;const{activeSavedToken:t,activePaymentMethod:o,savedPaymentMethods:n}=(0,_.useSelect)((e=>{const t=e(re.paymentStore);return{activeSavedToken:t.getActiveSavedToken(),activePaymentMethod:t.getActivePaymentMethod(),savedPaymentMethods:t.getSavedPaymentMethods()}})),{__internalSetActivePaymentMethod:c}=(0,_.useDispatch)(re.paymentStore),s=(()=>{let e;if((0,_.select)("core/editor")){const t={cartCoupons:at.coupons,cartItems:at.items,crossSellsProducts:at.cross_sells,cartFees:at.fees,cartItemsCount:at.items_count,cartItemsWeight:at.items_weight,cartNeedsPayment:at.needs_payment,cartNeedsShipping:at.needs_shipping,cartItemErrors:Ln,cartTotals:at.totals,cartIsLoading:!1,cartErrors:jn,billingData:Hn.cartData.billingAddress,billingAddress:Hn.cartData.billingAddress,shippingAddress:Hn.cartData.shippingAddress,extensions:Vn,shippingRates:at.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:at.has_calculated_shipping,paymentRequirements:at.payment_requirements,receiveCart:()=>{}};e={cart:t,cartTotals:t.cartTotals,cartNeedsShipping:t.cartNeedsShipping,billingData:t.billingAddress,billingAddress:t.billingAddress,shippingAddress:t.shippingAddress,selectedShippingMethods:Ke(t.shippingRates),paymentMethods:at.payment_methods,paymentRequirements:t.paymentRequirements}}else{const t=(0,_.select)(Fn),o=t.getCartData(),r=t.getCartErrors(),n=t.getCartTotals(),c=!t.hasFinishedResolution("getCartData"),s=t.isCustomerDataUpdating(),a=Ke(o.shippingRates);e={cart:{cartCoupons:o.coupons,cartItems:o.items,crossSellsProducts:o.crossSells,cartFees:o.fees,cartItemsCount:o.itemsCount,cartItemsWeight:o.itemsWeight,cartNeedsPayment:o.needsPayment,cartNeedsShipping:o.needsShipping,cartItemErrors:o.errors,cartTotals:n,cartIsLoading:c,cartErrors:r,billingData:Re(o.billingAddress),billingAddress:Re(o.billingAddress),shippingAddress:Re(o.shippingAddress),extensions:o.extensions,shippingRates:o.shippingRates,isLoadingRates:s,cartHasCalculatedShipping:o.hasCalculatedShipping,paymentRequirements:o.paymentRequirements,receiveCart:(0,_.dispatch)(Fn).receiveCart},cartTotals:o.totals,cartNeedsShipping:o.needsShipping,billingData:o.billingAddress,billingAddress:o.billingAddress,shippingAddress:o.shippingAddress,selectedShippingMethods:a,paymentMethods:o.paymentMethods,paymentRequirements:o.paymentRequirements}}return e})(),a=(0,At.getPaymentMethods)(),i=Tn(),{removeNotice:l}=(0,_.useDispatch)("core/notices"),{dispatchCheckoutEvent:d}=lt(),u=(0,m.useMemo)((()=>{const e=Object.keys(n),t=new Set(e.flatMap((e=>n[e].map((e=>e.method.gateway))))),o=Array.from(t).filter((e=>{var t;return null===(t=a[e])||void 0===t?void 0:t.canMakePayment(s)}));return e.flatMap((e=>n[e].map((t=>{if(!o.includes(t.method.gateway))return;const r="cc"===e||"echeck"===e,n=t.method.gateway;return{name:`wc-saved-payment-method-token-${n}`,label:r?qn(t):zn(t),value:t.tokenId.toString(),onChange:e=>{const t=`wc-${n}-payment-token`;c(n,{token:e,payment_method:n,[t]:e.toString(),isSavedToken:!0}),l("wc-payment-error",ve.PAYMENTS),d("set-active-payment-method",{paymentMethodSlug:n})}}})))).filter((e=>void 0!==e))}),[n,a,c,l,d,s]),p=t&&a[o]&&void 0!==(null===(e=a[o])||void 0===e?void 0:e.savedTokenComponent)&&!(0,ye.isNull)(a[o].savedTokenComponent)?(0,m.cloneElement)(a[o].savedTokenComponent,{token:t,...i}):null;return u.length>0?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Zt.RadioControl,{highlightChecked:!0,id:"wc-payment-method-saved-tokens",selected:t,options:u,onChange:()=>{}}),p):null};o(181);const Yn=({noPaymentMethods:e=(0,r.createElement)(En,null)})=>{const{paymentMethodsInitialized:t,availablePaymentMethods:o,savedPaymentMethods:n}=(0,_.useSelect)((e=>{const t=e(re.paymentStore);return{paymentMethodsInitialized:t.paymentMethodsInitialized(),availablePaymentMethods:t.getAvailablePaymentMethods(),savedPaymentMethods:t.getSavedPaymentMethods()}}));return t&&0===Object.keys(o).length?e:(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Wn,null),Object.keys(n).length>0&&(0,r.createElement)(Zt.Label,{label:(0,M.__)("Use another payment method.","woocommerce"),screenReaderLabel:(0,M.__)("Other available payment methods","woocommerce"),wrapperElement:"p",wrapperProps:{className:["wc-block-components-checkout-step__description wc-block-components-checkout-step__description-payments-aligned"]}}),(0,r.createElement)(On,null))},Gn=({noPaymentMethods:e})=>(0,r.createElement)(Yn,{noPaymentMethods:e});var Kn=o(433),Zn=o(4400);const Jn=({label:e,description:t,buttonLabel:o,buttonHref:n,icon:c=Kn.A})=>(0,r.createElement)(qt.Placeholder,{icon:(0,r.createElement)(a.A,{icon:c}),label:e,className:"wc-block-checkout__configure-placeholder"},(0,r.createElement)("span",{className:"wc-block-checkout__configure-placeholder-description"},t),(0,r.createElement)(qt.Button,{variant:"primary",href:n,target:"_blank",rel:"noopener noreferrer",style:{backgroundColor:Zn.T.fN2,color:Zn.T.cai,pointerEvents:"all"}},o)),Xn={...Lo({defaultTitle:(0,M.__)("Payment options","woocommerce"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}};(0,i.registerBlockType)("woocommerce/checkout-payment-block",{icon:{src:(0,r.createElement)(a.A,{icon:Kr.A,className:"wc-block-editor-components-block-icon"})},attributes:Xn,edit:({attributes:e,setAttributes:t})=>{const o=(0,y.getSetting)("globalPaymentMethods"),c=(0,_.select)(re.paymentStore).getIncompatiblePaymentMethods(),s=(0,M.__)("Incompatible with block-based checkout","woocommerce"),a=B.wordCountType;return(0,r.createElement)(Xt,{attributes:e,setAttributes:t,className:(0,n.A)("wc-block-checkout__payment-method",null==e?void 0:e.className)},(0,r.createElement)(l.InspectorControls,null,o.length>0&&(0,r.createElement)(qt.PanelBody,{title:(0,M.__)("Methods","woocommerce")},(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("You currently have the following payment integrations active.","woocommerce")),o.map((e=>{const t=!!c[e.id];let o;return o="words"===a?ln(e.description,30,void 0,!1):mn(e.description,30,"characters_including_spaces"===a,void 0,!1),(0,r.createElement)(nn,{key:e.id,href:`${y.ADMIN_URL}admin.php?page=wc-settings&tab=checkout§ion=${e.id}`,title:e.title,description:o,...t?{warning:s}:{}})})),(0,r.createElement)(qt.ExternalLink,{href:`${y.ADMIN_URL}admin.php?page=wc-settings&tab=checkout`},(0,M.__)("Manage payment methods","woocommerce")))),(0,r.createElement)(co,null,(0,r.createElement)(Gn,{noPaymentMethods:(0,r.createElement)(Jn,{icon:Kr.A,label:(0,M.__)("Payment options","woocommerce"),description:(0,M.__)("Your store does not have any payment methods that support the Checkout block. Once you have configured a compatible payment method it will be displayed here.","woocommerce"),buttonLabel:(0,M.__)("Configure Payment Options","woocommerce"),buttonHref:`${y.ADMIN_URL}admin.php?page=wc-settings&tab=checkout`})})),(0,r.createElement)(Qt,{block:Bt.innerBlockAreas.PAYMENT_METHODS}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(eo,null))});const Qn=(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},(0,r.createElement)("path",{stroke:"#1E1E1E",strokeLinejoin:"round",strokeWidth:"1.5",d:"M18.25 12a6.25 6.25 0 1 1-12.5 0 6.25 6.25 0 0 1 12.5 0Z"}),(0,r.createElement)("path",{fill:"#1E1E1E",d:"M10 3h4v3h-4z"}),(0,r.createElement)("rect",{width:"1.5",height:"5",x:"11.25",y:"8",fill:"#1E1E1E",rx:".75"}),(0,r.createElement)("path",{fill:"#1E1E1E",d:"m15.7 4.816 1.66 1.078-1.114 1.718-1.661-1.078z"})),ec=()=>((e=!1)=>{const{paymentMethodsInitialized:t,expressPaymentMethodsInitialized:o,availablePaymentMethods:r,availableExpressPaymentMethods:n}=(0,_.useSelect)((e=>{const t=e(re.paymentStore);return{paymentMethodsInitialized:t.paymentMethodsInitialized(),expressPaymentMethodsInitialized:t.expressPaymentMethodsInitialized(),availableExpressPaymentMethods:t.getAvailableExpressPaymentMethods(),availablePaymentMethods:t.getAvailablePaymentMethods()}})),c=Object.values(r).map((({name:e})=>e)),s=Object.values(n).map((({name:e})=>e)),a=(0,At.getPaymentMethods)(),i=(0,At.getExpressPaymentMethods)(),l=Object.keys(a).reduce(((e,t)=>(c.includes(t)&&(e[t]=a[t]),e)),{}),m=Object.keys(i).reduce(((e,t)=>(s.includes(t)&&(e[t]=i[t]),e)),{}),d=_o(l),u=_o(m);return{paymentMethods:e?u:d,isInitialized:e?o:t}})(!0),tc=["height","borderRadius"],oc=e=>{const t=(0,_.select)(re.paymentStore).getAvailableExpressPaymentMethods();return Object.values(t).reduce(((t,o)=>t||(null==o?void 0:o.supportsStyle.some((t=>e.includes(t))))),!1)},rc=({attributes:e,setAttributes:t})=>{const{buttonHeight:o,buttonBorderRadius:n}=e;return(0,r.createElement)(r.Fragment,null,oc(["height"])&&(0,r.createElement)(qt.RadioControl,{label:(0,M.__)("Button height","woocommerce"),selected:o,options:[{label:(0,M.__)("Small (40px)","woocommerce"),value:"40"},{label:(0,M.__)("Medium (48px)","woocommerce"),value:"48"},{label:(0,M.__)("Large (55px)","woocommerce"),value:"55"}],onChange:e=>t({buttonHeight:e})}),oc(["borderRadius"])&&(0,r.createElement)("div",{className:"border-radius-control-container"},(0,r.createElement)(l.HeightControl,{label:(0,M.__)("Button border radius","woocommerce"),value:n,onChange:e=>{const o=e.replace("px","");t({buttonBorderRadius:o})}})))},nc=({attributes:e,setAttributes:t})=>e.showButtonStyles?(0,r.createElement)(rc,{attributes:e,setAttributes:t}):null,cc=()=>{const e=(0,_.select)(re.paymentStore).getAvailableExpressPaymentMethods();return Object.entries(e).length<1?(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("You currently have no express payment integrations active.","woocommerce")):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("You currently have the following express payment integrations active.","woocommerce")),Object.values(e).map((e=>(0,r.createElement)(nn,{key:e.name,href:`${y.ADMIN_URL}admin.php?page=wc-settings&tab=checkout§ion=${encodeURIComponent(e.gatewayId)}`,title:e.title,description:e.description}))))},sc=(0,r.createElement)(r.Fragment,null,(0,M.__)("Apply uniform styles","woocommerce")," ",(0,r.createElement)("span",{className:"express-payment-styles-beta-badge"},"Beta")),ac=({attributes:e,setAttributes:t})=>(0,r.createElement)(l.InspectorControls,null,oc(tc)&&(0,r.createElement)(qt.PanelBody,{title:(0,M.__)("Button Settings","woocommerce"),className:"express-payment-button-settings"},(0,r.createElement)(qt.ToggleControl,{label:sc,checked:e.showButtonStyles,onChange:()=>t({showButtonStyles:!e.showButtonStyles}),help:(0,M.__)("Sets a consistent style for express payment buttons.","woocommerce")}),(0,r.createElement)(qt.Notice,{status:"warning",isDismissible:!1,className:"wc-block-checkout__notice express-payment-styles-notice"},(0,r.createElement)("strong",null,(0,M.__)("Note","woocommerce"),":")," ",(0,M.__)("Some payment methods might not yet support all style controls","woocommerce")),(0,r.createElement)(nc,{attributes:e,setAttributes:t})),(0,r.createElement)(qt.PanelBody,{title:(0,M.__)("Express Payment Methods","woocommerce")},(0,r.createElement)(cc,null))),ic="wc/store/payment",lc=(0,m.createContext)({showButtonStyles:!1,buttonHeight:"48",buttonBorderRadius:"4"}),mc=()=>{const{isEditor:e}=b(),{showButtonStyles:t,buttonHeight:o,buttonBorderRadius:n}=(0,m.useContext)(lc),c=t?{height:o,borderRadius:n}:void 0,{activePaymentMethod:s,paymentMethodData:a}=(0,_.useSelect)((e=>{const t=e(ic);return{activePaymentMethod:t.getActivePaymentMethod(),paymentMethodData:t.getPaymentMethodData()}})),{__internalSetActivePaymentMethod:i,__internalSetExpressPaymentStarted:l,__internalSetPaymentIdle:d,__internalSetPaymentError:u,__internalSetPaymentMethodData:p,__internalSetExpressPaymentError:h}=(0,_.useDispatch)(ic),{paymentMethods:g}=ec(),k=Tn(),w=(0,m.useRef)(s),E=(0,m.useRef)(a),y=(0,m.useCallback)((e=>()=>{w.current=s,E.current=a,l(),i(e)}),[s,a,i,l]),v=(0,m.useCallback)((()=>{d(),i(w.current,E.current)}),[i,d]),f=(0,m.useCallback)((e=>{u(),p(e),h(e),i(w.current,E.current)}),[i,u,p,h]),S=(0,m.useCallback)(((e="")=>{ce()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?f(e):h("")}),[h,f]),C=Object.entries(g),P=C.length>0?C.map((([t,o])=>{const n=e?o.edit:o.content;return(0,m.isValidElement)(n)?(0,r.createElement)("li",{key:t,id:`express-payment-method-${t}`},(0,m.cloneElement)(n,{...k,onClick:y(t),onClose:v,onError:f,setExpressPaymentError:S,buttonAttributes:c})):null})):(0,r.createElement)("li",{key:"noneRegistered"},(0,M.__)("No registered Payment Methods","woocommerce"));return(0,r.createElement)(Bn,{isEditor:e},(0,r.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},P))};o(9569);const dc=()=>{const{isCalculating:e,isProcessing:t,isAfterProcessing:o,isBeforeProcessing:n,isComplete:c,hasError:s}=(0,_.useSelect)((e=>{const t=e(re.checkoutStore);return{isCalculating:t.isCalculating(),isProcessing:t.isProcessing(),isAfterProcessing:t.isAfterProcessing(),isBeforeProcessing:t.isBeforeProcessing(),isComplete:t.isComplete(),hasError:t.hasError()}})),{availableExpressPaymentMethods:a,expressPaymentMethodsInitialized:i,isExpressPaymentMethodActive:l}=(0,_.useSelect)((e=>{const t=e(re.paymentStore);return{availableExpressPaymentMethods:t.getAvailableExpressPaymentMethods(),expressPaymentMethodsInitialized:t.expressPaymentMethodsInitialized(),isExpressPaymentMethodActive:t.isExpressPaymentMethodActive()}})),{isEditor:m}=b();if(!i||i&&0===Object.keys(a).length)return m||y.CURRENT_USER_IS_ADMIN?(0,r.createElement)(Zt.StoreNoticesContainer,{context:ve.EXPRESS_PAYMENTS}):null;const d=t||o||n||c&&!s;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Ar,{isLoading:e||d||l},(0,r.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--checkout"},(0,r.createElement)("div",{className:"wc-block-components-express-payment__title-container"},(0,r.createElement)(Zt.Title,{className:"wc-block-components-express-payment__title",headingLevel:"2"},(0,M.__)("Express Checkout","woocommerce"))),(0,r.createElement)("div",{className:"wc-block-components-express-payment__content"},(0,r.createElement)(Zt.StoreNoticesContainer,{context:ve.EXPRESS_PAYMENTS}),(0,r.createElement)(mc,null)))),(0,r.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--checkout"},(0,M.__)("Or continue below","woocommerce")))},uc=({className:e})=>{const{cartNeedsPayment:t}=He();return t?(0,r.createElement)("div",{className:e},(0,r.createElement)(dc,null)):null};o(9865),(0,i.registerBlockType)("woocommerce/checkout-express-payment-block",{icon:{src:(0,r.createElement)(a.A,{style:{fill:"none"},icon:Qn,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:t})=>{const{paymentMethods:o,isInitialized:c}=ec(),s=Object.keys(o).length>0,a=(0,l.useBlockProps)({className:(0,n.A)({"wp-block-woocommerce-checkout-express-payment-block--has-express-payment-methods":s},null==e?void 0:e.className),attributes:e});if(!c||!s)return null;const{buttonHeight:i,buttonBorderRadius:m,showButtonStyles:d}=e;return(0,r.createElement)("div",{...a},(0,r.createElement)(ac,{attributes:e,setAttributes:t}),(0,r.createElement)(lc.Provider,{value:{showButtonStyles:d,buttonHeight:i,buttonBorderRadius:m}},(0,r.createElement)(uc,null)))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});var pc=o(1176),hc=o(3705);const gc=({minRate:e,maxRate:t,multiple:o=!1})=>{if(void 0===e||void 0===t)return null;const n=(0,y.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10),c=(0,y.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(t.price,10)+parseInt(t.taxes,10):parseInt(t.price,10),s=0===n?(0,r.createElement)("em",null,(0,M.__)("free","woocommerce")):(0,r.createElement)(Zt.FormattedMonetaryAmount,{currency:(0,wr.getCurrencyFromPriceResponse)(e),value:n});return(0,r.createElement)("span",{className:"wc-block-checkout__shipping-method-option-price"},n!==c||o?(0,m.createInterpolateElement)(0===n&&0===c?"<price />":(0,M.__)("from <price />","woocommerce"),{price:s}):s)};function _c(e){return e?{min:e.reduce(((e,t)=>Ye(t.method_id)?e:void 0===e||parseInt(t.price,10)<parseInt(e.price,10)?t:e),void 0),max:e.reduce(((e,t)=>Ye(t.method_id)?e:void 0===e||parseInt(t.price,10)>parseInt(e.price,10)?t:e),void 0)}:{min:void 0,max:void 0}}function kc(e){return e?{min:e.reduce(((e,t)=>Ye(t.method_id)&&(void 0===e||t.price<e.price)?t:e),void 0),max:e.reduce(((e,t)=>Ye(t.method_id)&&(void 0===e||t.price>e.price)?t:e),void 0)}:{min:void 0,max:void 0}}o(7694);const bc=(0,M.__)("Pickup","woocommerce"),wc=(0,M.__)("Ship","woocommerce"),Ec=({checked:e,rate:t,showPrice:o,showIcon:c,toggleText:s,setAttributes:i,onClick:m})=>(0,r.createElement)(ko.$,{render:(0,r.createElement)("div",null),className:(0,n.A)("wc-block-checkout__shipping-method-option",{"wc-block-checkout__shipping-method-option--selected":"pickup"===e}),onClick:m},!0===c&&(0,r.createElement)(a.A,{icon:hc.A,size:28,className:"wc-block-checkout__shipping-method-option-icon"}),(0,r.createElement)(l.RichText,{value:s,placeholder:bc,tagName:"span",className:"wc-block-checkout__shipping-method-option-title",onChange:e=>i({localPickupText:e}),__unstableDisableFormats:!0,preserveWhiteSpace:!0}),!0===o&&(0,r.createElement)(gc,{minRate:t.min,maxRate:t.max})),yc=({checked:e,rate:t,showPrice:o,showIcon:c,toggleText:s,setAttributes:i,onClick:m})=>{const d=void 0===t.min?(0,r.createElement)("span",{className:"wc-block-checkout__shipping-method-option-price"},(0,M.__)("calculated with an address","woocommerce")):(0,r.createElement)(gc,{minRate:t.min,maxRate:t.max});return(0,r.createElement)(ko.$,{render:(0,r.createElement)("div",null),className:(0,n.A)("wc-block-checkout__shipping-method-option",{"wc-block-checkout__shipping-method-option--selected":"shipping"===e}),onClick:m},!0===c&&(0,r.createElement)(a.A,{icon:pc.A,size:28,className:"wc-block-checkout__shipping-method-option-icon"}),(0,r.createElement)(l.RichText,{value:s,placeholder:wc,tagName:"span",className:"wc-block-checkout__shipping-method-option-title",onChange:e=>i({shippingText:e}),__unstableDisableFormats:!0,preserveWhiteSpace:!0}),!0===o&&d)},vc={...Lo({defaultTitle:(0,M.__)("Delivery","woocommerce"),defaultDescription:(0,M.__)("Select how you would like to receive your order.","woocommerce")}),className:{type:"string",default:""},showIcon:{type:"boolean",default:!0},showPrice:{type:"boolean",default:!1},localPickupText:{type:"string",default:bc},shippingText:{type:"string",default:wc},lock:{type:"object",default:{move:!0,remove:!0}}};(0,i.registerBlockType)("woocommerce/checkout-shipping-method-block",{icon:{src:(0,r.createElement)(a.A,{icon:pc.A,className:"wc-block-editor-components-block-icon"})},attributes:vc,edit:({attributes:e,setAttributes:t})=>{var o,c;(0,m.useEffect)((()=>{const o=(0,y.getSetting)("localPickupText",e.localPickupText);t({localPickupText:o})}),[t]);const{setPrefersCollection:s}=(0,_.useDispatch)(re.checkoutStore),{prefersCollection:a}=(0,_.useSelect)((e=>({prefersCollection:e(re.checkoutStore).prefersCollection()}))),{showPrice:i,showIcon:d,className:u,localPickupText:p,shippingText:h}=e,{shippingRates:g,needsShipping:k,hasCalculatedShipping:b,isCollectable:w}=mt();if(!(k&&b&&g&&w&&U))return null;const E=e=>{s("pickup"===e)};return(0,r.createElement)(Xt,{attributes:e,setAttributes:t,className:(0,n.A)("wc-block-checkout__shipping-method",u)},(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(qt.PanelBody,{title:(0,M.__)("Appearance","woocommerce")},(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("Choose how this block is displayed to your customers.","woocommerce")),(0,r.createElement)(qt.ToggleControl,{label:(0,M.__)("Show icon","woocommerce"),checked:d,onChange:()=>t({showIcon:!d})}),(0,r.createElement)(qt.ToggleControl,{label:(0,M.__)("Show costs","woocommerce"),checked:i,onChange:()=>t({showPrice:!i})})),(0,r.createElement)(qt.PanelBody,{title:(0,M.__)("Shipping Methods","woocommerce")},(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("Methods can be made managed in your store settings.","woocommerce")),(0,r.createElement)(nn,{key:"shipping_methods",href:`${y.ADMIN_URL}admin.php?page=wc-settings&tab=shipping`,title:(0,M.__)("Shipping","woocommerce"),description:(0,M.__)("Manage your shipping zones, methods, and rates.","woocommerce")}),(0,r.createElement)(nn,{key:"pickup_location",href:`${y.ADMIN_URL}admin.php?page=wc-settings&tab=shipping§ion=pickup_location`,title:(0,M.__)("Pickup","woocommerce"),description:(0,M.__)("Allow customers to choose a local pickup location during checkout.","woocommerce")}))),(0,r.createElement)("div",{id:"shipping-method",className:"wc-block-checkout__shipping-method-container",role:"radiogroup"},(0,r.createElement)(yc,{checked:a?"pickup":"shipping",rate:_c(null===(o=g[0])||void 0===o?void 0:o.shipping_rates),onClick:()=>{E("shipping")},showPrice:i,showIcon:d,setAttributes:t,toggleText:h}),(0,r.createElement)(Ec,{checked:a?"pickup":"shipping",rate:kc(null===(c=g[0])||void 0===c?void 0:c.shipping_rates),showPrice:i,onClick:()=>{E("pickup")},showIcon:d,setAttributes:t,toggleText:p})),(0,r.createElement)(Qt,{block:Bt.innerBlockAreas.SHIPPING_METHOD}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(eo,null))});const fc=e=>{const t=(0,y.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);let o=(0,r.createElement)(r.Fragment,null,Number.isFinite(t)&&(0,r.createElement)(Zt.FormattedMonetaryAmount,{currency:(0,wr.getCurrencyFromPriceResponse)(e),value:t}),(0,r.createElement)("span",{className:"wc-block-components-shipping-rates-control__package__delivery_time"},Number.isFinite(t)&&e.delivery_time?" — ":null,(0,Pe.decodeEntities)(e.delivery_time)));return 0===t&&(o=(0,r.createElement)("span",{className:"wc-block-components-shipping-rates-control__package__description--free"},(0,M.__)("Free","woocommerce"),(0,r.createElement)("span",{className:"wc-block-components-shipping-rates-control__package__delivery_time"},e.delivery_time&&" — "+(0,Pe.decodeEntities)(e.delivery_time)))),{label:(0,Pe.decodeEntities)(e.name),value:e.rate_id,description:o}},Sc=({className:e="",noResultsMessage:t,onSelectRate:o,rates:n,renderOption:c=fc,selectedRate:s,disabled:a=!1,highlightChecked:i=!1})=>{const l=(null==s?void 0:s.rate_id)||"",d=kt(l),[u,p]=(0,m.useState)(null!=l?l:"");return(0,m.useEffect)((()=>{l&&l!==d&&l!==u&&p(l)}),[l,u,d]),(0,m.useEffect)((()=>{!u&&n.length>0&&(p(n[0].rate_id),o(n[0].rate_id))}),[o,n,u]),0===n.length?t:(0,r.createElement)(Zt.RadioControl,{className:e,onChange:e=>{p(e),o(e)},highlightChecked:i,disabled:a,selected:u,options:n.map(c)})},Cc=({packageData:e})=>(0,r.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(e.items).map((e=>{const t=(0,Pe.decodeEntities)(e.name),o=e.quantity;return(0,r.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},(0,r.createElement)(Zt.Label,{label:o>1?`${t} × ${o}`:`${t}`,allowHTML:!0,screenReaderLabel:(0,M.sprintf)(/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ /* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ (0,M._n)("%1$s (%2$d unit)","%1$s (%2$d units)",o,"woocommerce"),t,o)}))})));o(2867);const Pc=({packageId:e,className:t="",noResultsMessage:o,renderOption:c,packageData:s,collapsible:a,showItems:i,highlightChecked:l=!1})=>{var d;const{selectShippingRate:u,isSelectingRate:p}=mt(),h=(0,_.useSelect)((e=>{var t;return null===(t=e(re.cartStore))||void 0===t||null===(t=t.getCartData())||void 0===t||null===(t=t.shippingRates)||void 0===t?void 0:t.length})),[g,k]=(0,m.useState)(0),b=h>1||g>1;(0,m.useEffect)((()=>{const e=()=>{k(document.querySelectorAll(".wc-block-components-shipping-rates-control__package").length)};e();const t=new MutationObserver(e);return t.observe(document.body,{childList:!0,subtree:!0}),()=>{t.disconnect()}}),[]);const w=null!=i?i:b,E=null!=a?a:b,{selectedOptionNumber:y,selectedOption:v}=(0,m.useMemo)((()=>{var e,t;return{selectedOptionNumber:null==s||null===(e=s.shipping_rates)||void 0===e?void 0:e.findIndex((e=>null==e?void 0:e.selected)),selectedOption:null==s||null===(t=s.shipping_rates)||void 0===t?void 0:t.find((e=>null==e?void 0:e.selected))}}),[null==s?void 0:s.shipping_rates]),f=E||w?(0,r.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-header"},(0,r.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title",dangerouslySetInnerHTML:{__html:tn(s.name)}}),E&&(0,r.createElement)("div",{className:"wc-block-components-totals-shipping__via"},(0,Pe.decodeEntities)(null==v?void 0:v.name)),w&&(0,r.createElement)(Cc,{packageData:s})):null,S=(0,m.useCallback)((t=>{u(t,e)}),[e,u]),C={className:t,noResultsMessage:o,rates:s.shipping_rates,onSelectRate:S,selectedRate:s.shipping_rates.find((e=>e.selected)),renderOption:c,disabled:p,highlightChecked:l};return E?(0,r.createElement)(Zt.Panel,{className:(0,n.A)("wc-block-components-shipping-rates-control__package",t,{"wc-block-components-shipping-rates-control__package--disabled":p}),initialOpen:!1,title:f},(0,r.createElement)(Sc,{...C})):(0,r.createElement)("div",{className:(0,n.A)("wc-block-components-shipping-rates-control__package",t,{"wc-block-components-shipping-rates-control__package--disabled":p,"wc-block-components-shipping-rates-control__package--first-selected":!p&&0===y,"wc-block-components-shipping-rates-control__package--last-selected":!p&&y===(null==s||null===(d=s.shipping_rates)||void 0===d?void 0:d.length)-1})},f,(0,r.createElement)(Sc,{...C}))},Nc=({packages:e,showItems:t,collapsible:o,noResultsMessage:n,renderOption:c,context:s=""})=>e.length?(0,r.createElement)(r.Fragment,null,e.map((({package_id:e,...a})=>(0,r.createElement)(Pc,{highlightChecked:"woocommerce/cart"!==s,key:e,packageId:e,packageData:a,collapsible:o,showItems:t,noResultsMessage:n,renderOption:c})))):null,Ac=({shippingRates:e,isLoadingRates:t,className:o,collapsible:n,showItems:c,noResultsMessage:s=(0,r.createElement)(r.Fragment,null),renderOption:a,context:i})=>{const l=(e=>e.reduce((function(e,t){return e+t.shipping_rates.length}),0))(e),d=qe(e),u=kt(l),p=kt(d);(0,m.useEffect)((()=>{var e,o;t||u===l&&p===d||(o=l,1===(e=d)?(0,bn.speak)((0,M.sprintf)(/* translators: %d number of shipping options found. */ /* translators: %d number of shipping options found. */ (0,M._n)("%d shipping option was found.","%d shipping options were found.",o,"woocommerce"),o)):(0,bn.speak)((0,M.sprintf)(/* translators: %d number of shipping packages packages. */ /* translators: %d number of shipping packages packages. */ (0,M._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woocommerce"),e)+" "+(0,M.sprintf)(/* translators: %d number of shipping options available. */ /* translators: %d number of shipping options available. */ (0,M._n)("%d shipping option was found","%d shipping options were found",o,"woocommerce"),o)))}),[t,l,d,u,p]);const{extensions:h,receiveCart:g,..._}=He(),k={className:o,collapsible:n,showItems:c,noResultsMessage:s,renderOption:a,extensions:h,cart:_,components:{ShippingRatesControlPackage:Pc},context:i},{isEditor:w}=b(),{hasSelectedLocalPickup:E,selectedRates:y}=mt(),v=(0,ye.isObject)(y)?Object.values(y):[],f=v.every((e=>e===v[0]));return(0,r.createElement)(Ar,{isLoading:t,screenReaderLabel:(0,M.__)("Loading shipping rates…","woocommerce"),showSpinner:!0},E&&"woocommerce/cart"===i&&e.length>1&&!f&&!w&&(0,r.createElement)(wn,{className:"wc-block-components-notice",isDismissible:!1,status:"warning"},(0,M.__)("Multiple shipments must have the same pickup location","woocommerce")),(0,r.createElement)(Bt.ExperimentalOrderShippingPackages.Slot,{...k}),(0,r.createElement)(Bt.ExperimentalOrderShippingPackages,null,(0,r.createElement)(Nc,{packages:e,noResultsMessage:s,renderOption:a})))},xc=e=>{const t=(0,y.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10),o=0===t?(0,r.createElement)("span",{className:"wc-block-checkout__shipping-option--free"},(0,M.__)("Free","woocommerce")):(0,r.createElement)(Zt.FormattedMonetaryAmount,{currency:(0,wr.getCurrencyFromPriceResponse)(e),value:t});return{label:(0,Pe.decodeEntities)(e.name),value:e.rate_id,description:(0,Pe.decodeEntities)(e.description),secondaryLabel:o,secondaryDescription:(0,Pe.decodeEntities)(e.delivery_time)}},Ic=()=>(0,r.createElement)("p",{role:"status","aria-live":"polite",className:"wc-block-components-shipping-rates-control__no-shipping-address-message"},(0,M.__)("Enter a shipping address to view shipping options.","woocommerce")),Rc=({noShippingPlaceholder:e=null})=>{const{isEditor:t}=b(),{shippingRates:o,needsShipping:n,isLoadingRates:c,hasCalculatedShipping:s,isCollectable:a}=mt(),{shippingAddress:i}=Gt(),l=(0,m.useMemo)((()=>a?o.map((e=>({...e,shipping_rates:e.shipping_rates.filter((e=>!Ye(e.method_id)))}))):o),[o,a]);if(!n)return null;const d=qe(o);if(!s&&!d)return(0,r.createElement)(Ic,null);const u=Te(i);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Zt.StoreNoticesContainer,{context:ve.SHIPPING_METHODS}),t&&!d?e:(0,r.createElement)(Ac,{noResultsMessage:(0,r.createElement)(r.Fragment,null,u?(0,r.createElement)(wn,{isDismissible:!1,className:"wc-block-components-shipping-rates-control__no-results-notice",status:"warning"},(0,M.__)("No shipping options are available for this address. Please verify the address is correct or try a different address.","woocommerce")):(0,r.createElement)(Ic,null)),renderOption:xc,collapsible:!1,shippingRates:l,isLoadingRates:c,context:"woocommerce/checkout"}))};o(2255);const Tc={...Lo({defaultTitle:(0,M.__)("Shipping options","woocommerce"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}};o(1299),(0,i.registerBlockType)("woocommerce/checkout-shipping-methods-block",{icon:{src:(0,r.createElement)(a.A,{icon:pc.A,className:"wc-block-editor-components-block-icon"})},attributes:Tc,edit:({attributes:e,setAttributes:t})=>{const o=(0,y.getSetting)("globalShippingMethods"),c=(0,y.getSetting)("activeShippingZones"),{showShippingMethods:s}=Kt();return s?(0,r.createElement)(Xt,{attributes:e,setAttributes:t,className:(0,n.A)("wc-block-checkout__shipping-option",null==e?void 0:e.className)},(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(qt.PanelBody,{title:(0,M.__)("Shipping Calculations","woocommerce")},(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("Options that control shipping can be managed in your store settings.","woocommerce")),(0,r.createElement)(qt.ExternalLink,{href:`${y.ADMIN_URL}admin.php?page=wc-settings&tab=shipping§ion=options`},(0,M.__)("Manage shipping options","woocommerce"))," "),o.length>0&&(0,r.createElement)(qt.PanelBody,{title:(0,M.__)("Methods","woocommerce")},(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("The following shipping integrations are active on your store.","woocommerce")),o.map((e=>(0,r.createElement)(nn,{key:e.id,href:`${y.ADMIN_URL}admin.php?page=wc-settings&tab=shipping§ion=${e.id}`,title:e.title,description:e.description}))),(0,r.createElement)(qt.ExternalLink,{href:`${y.ADMIN_URL}admin.php?page=wc-settings&tab=shipping`},(0,M.__)("Manage shipping methods","woocommerce"))),c.length&&(0,r.createElement)(qt.PanelBody,{title:(0,M.__)("Shipping Zones","woocommerce")},(0,r.createElement)("p",{className:"wc-block-checkout__controls-text"},(0,M.__)("Shipping Zones can be made managed in your store settings.","woocommerce")),c.map((e=>(0,r.createElement)(nn,{key:e.id,href:`${y.ADMIN_URL}admin.php?page=wc-settings&tab=shipping&zone_id=${e.id}`,title:e.title,description:e.description}))))),(0,r.createElement)(co,null,(0,r.createElement)(Rc,{noShippingPlaceholder:(0,r.createElement)(Jn,{icon:pc.A,label:(0,M.__)("Shipping options","woocommerce"),description:(0,M.__)("Your store does not have any Shipping Options configured. Once you have added your Shipping Options they will appear here.","woocommerce"),buttonLabel:(0,M.__)("Configure Shipping Options","woocommerce"),buttonHref:`${y.ADMIN_URL}admin.php?page=wc-settings&tab=shipping`})})),(0,r.createElement)(Qt,{block:Bt.innerBlockAreas.SHIPPING_METHODS})):null},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(eo,null))});const Mc=({title:e,setSelectedOption:t,selectedOption:o,pickupLocations:n,onSelectRate:c,renderPickupLocation:s,packageCount:a})=>{const i=(0,_.useSelect)((e=>{var t;return null===(t=e(re.cartStore))||void 0===t||null===(t=t.getCartData())||void 0===t||null===(t=t.shippingRates)||void 0===t?void 0:t.length}))>1||document.querySelectorAll(".wc-block-components-local-pickup-select .wc-block-components-radio-control").length>1;return(0,r.createElement)("div",{className:"wc-block-components-local-pickup-select"},!(!i||!e)&&(0,r.createElement)("div",null,e),(0,r.createElement)(Zt.RadioControl,{onChange:e=>{t(e),c(e)},highlightChecked:!0,selected:o,options:n.map((e=>s(e,a)))}))};function Bc(e){let t,o,r,n=[];for(let c=0;c<e.length;c++)t=e.substring(c),o=t.match(/^&[a-z0-9#]+;/),o?(r=o[0],n.push(r),c+=r.length-1):n.push(e[c]);return n}const Dc=(e,t,o="...")=>{const r=function(e,t){const o=(t=t||{}).limit||100,r=void 0===t.preserveTags||t.preserveTags,n=void 0!==t.wordBreak&&t.wordBreak,c=t.suffix||"...",s=t.moreLink||"",a=t.moreText||"»",i=t.preserveWhiteSpace||!1,l=e.replace(/</g,"\n<").replace(/>/g,">\n").replace(/\n\n/g,"\n").replace(/^\n/g,"").replace(/\n$/g,"").split("\n");let m,d,u,p,h,g,_=0,k=[],b=!1;for(let e=0;e<l.length;e++){if(m=l[e],p=i?m:m.replace(/[ ]+/g," "),!m.length)continue;const t=Bc(p);if("<"!==m[0])if(_>=o)m="";else if(_+t.length>=o){if(d=o-_," "===t[d-1])for(;d&&(d-=1," "===t[d-1]););else u=t.slice(d).indexOf(" "),n||(-1!==u?d+=u:d=m.length);if(m=t.slice(0,d).join("")+c,s){const e=document.createElement("a");e.href=s,e.style.display="inline",e.textContent=a,m+=e.outerHTML}_=o,b=!0}else _+=t.length;else if(r){if(_>=o)if(h=m.match(/[a-zA-Z]+/),g=h?h[0]:"",g)if("</"!==m.substring(0,2))k.push(g),m="";else{for(;k[k.length-1]!==g&&k.length;)k.pop();k.length&&(m=""),k.pop()}else m=""}else m="";l[e]=m}return{html:l.join("\n").replace(/\n/g,""),more:b}}(e,{suffix:o,limit:t});return r.html},Oc=(e,t,o)=>(t<=o?e.start=e.middle+1:e.end=e.middle-1,e),Fc=(e,t,o,r)=>{const n=((e,t,o)=>{let r={start:0,middle:0,end:e.length};for(;r.start<=r.end;)r.middle=Math.floor((r.start+r.end)/2),t.innerHTML=Dc(e,r.middle),r=Oc(r,t.clientHeight,o);return r.middle})(e,t,o);return Dc(e,n-r.length,r)},Lc={className:"read-more-content",ellipsis:"…",lessText:(0,M.__)("Read less","woocommerce"),maxLines:3,moreText:(0,M.__)("Read more","woocommerce")};class jc extends m.Component{constructor(e){super(e),(0,T.A)(this,"reviewSummary",void 0),(0,T.A)(this,"reviewContent",void 0),this.state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},this.reviewContent=(0,m.createRef)(),this.reviewSummary=(0,m.createRef)(),this.getButton=this.getButton.bind(this),this.onClick=this.onClick.bind(this)}componentDidMount(){this.setSummary()}componentDidUpdate(e){e.maxLines===this.props.maxLines&&e.children===this.props.children||this.setState({clampEnabled:null,summary:"."},this.setSummary)}setSummary(){if(this.props.children){const{maxLines:e,ellipsis:t}=this.props;if(!this.reviewSummary.current||!this.reviewContent.current)return;const o=(this.reviewSummary.current.clientHeight+1)*e+1,r=this.reviewContent.current.clientHeight+1>o;this.setState({clampEnabled:r}),r&&this.setState({summary:Fc(this.reviewContent.current.innerHTML,this.reviewSummary.current,o,t)})}}getButton(){const{isExpanded:e}=this.state,{className:t,lessText:o,moreText:n}=this.props,c=e?o:n;if(c)return(0,r.createElement)("a",{href:"#more",className:t+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}onClick(e){e.preventDefault();const{isExpanded:t}=this.state;this.setState({isExpanded:!t})}render(){const{className:e}=this.props,{content:t,summary:o,clampEnabled:n,isExpanded:c}=this.state;return t?!1===n?(0,r.createElement)("div",{className:e},(0,r.createElement)("div",{ref:this.reviewContent},t)):(0,r.createElement)("div",{className:e},(!c||null===n)&&(0,r.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:o}}),(c||null===n)&&(0,r.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},t),this.getButton()):null}}(0,T.A)(jc,"defaultProps",Lc);const Vc=jc,Uc=(e,t)=>{const o=(0,y.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):e.price,n=(e=>{if(null!=e&&e.meta_data){const t=e.meta_data.find((e=>"pickup_location"===e.key));return t?t.value:""}return""})(e),c=(e=>{if(null!=e&&e.meta_data){const t=e.meta_data.find((e=>"pickup_address"===e.key));return t?t.value:""}return""})(e),s=(e=>{if(null!=e&&e.meta_data){const t=e.meta_data.find((e=>"pickup_details"===e.key));return t?t.value:""}return""})(e);let i=(0,r.createElement)("em",null,(0,M.__)("free","woocommerce"));return parseInt(o,10)>0&&(i=1===t?(0,r.createElement)(Zt.FormattedMonetaryAmount,{currency:(0,wr.getCurrencyFromPriceResponse)(e),value:o}):(0,m.createInterpolateElement)(/* translators: <price/> is the price of the package, <packageCount/> is the number of packages. These must appear in the translated string. */ /* translators: <price/> is the price of the package, <packageCount/> is the number of packages. These must appear in the translated string. */ (0,M._n)("<price/> x <packageCount/> package","<price/> x <packageCount/> packages",t,"woocommerce"),{price:(0,r.createElement)(Zt.FormattedMonetaryAmount,{currency:(0,wr.getCurrencyFromPriceResponse)(e),value:o}),packageCount:(0,r.createElement)(r.Fragment,null,t)})),{value:e.rate_id,label:n?(0,Pe.decodeEntities)(n):(0,Pe.decodeEntities)(e.name),secondaryLabel:i,description:c?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.A,{icon:Yt.A,className:"wc-block-editor-components-block-icon"}),(0,Pe.decodeEntities)(c)):void 0,secondaryDescription:s?(0,r.createElement)(Vc,{maxLines:2},(0,Pe.decodeEntities)(s)):void 0}},$c=()=>{const{shippingRates:e,selectShippingRate:t}=mt(),o=(0,m.useMemo)((()=>{var t;return((null===(t=e[0])||void 0===t?void 0:t.shipping_rates)||[]).filter(We)}),[e]),[n,c]=(0,m.useState)((()=>{var e;return(null===(e=o.find((e=>e.selected)))||void 0===e?void 0:e.rate_id)||""})),s=(0,m.useCallback)((e=>{t(e)}),[t]),{extensions:a,receiveCart:i,...l}=He(),d={extensions:a,cart:l,components:{ShippingRatesControlPackage:Pc,LocalPickupSelect:Mc},renderPickupLocation:Uc};(0,m.useEffect)((()=>{!n&&o[0]&&n!==o[0].rate_id&&(c(o[0].rate_id),s(o[0].rate_id))}),[o,n]);const u=qe(e);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Bt.ExperimentalOrderLocalPickupPackages.Slot,{...d}),(0,r.createElement)(Bt.ExperimentalOrderLocalPickupPackages,null,(0,r.createElement)(Mc,{title:e[0].name,setSelectedOption:c,onSelectRate:s,selectedOption:n,renderPickupLocation:Uc,pickupLocations:o,packageCount:u})))},Hc={...Lo({defaultTitle:(0,M.__)("Pickup locations","woocommerce"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}};o(3425),(0,i.registerBlockType)("woocommerce/checkout-pickup-options-block",{icon:{src:(0,r.createElement)(a.A,{icon:hc.A,className:"wc-block-editor-components-block-icon"})},attributes:Hc,edit:({attributes:e,setAttributes:t})=>{const{prefersCollection:o}=(0,_.useSelect)((e=>({prefersCollection:e(re.checkoutStore).prefersCollection()}))),{className:c}=e;return o&&U?(0,r.createElement)(Xt,{attributes:e,setAttributes:t,className:(0,n.A)("wc-block-checkout__shipping-method",c)},(0,r.createElement)(qt.Disabled,null,(0,r.createElement)($c,null)),(0,r.createElement)(Qt,{block:Bt.innerBlockAreas.PICKUP_LOCATION})):null},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(eo,null))});const qc=({className:e=""})=>{const{cartTotals:t}=He(),o=(0,wr.getCurrencyFromPriceResponse)(t);return(0,r.createElement)(Zt.TotalsWrapper,{className:e},(0,r.createElement)(Zt.Subtotal,{currency:o,values:t}))};(0,i.registerBlockType)("woocommerce/checkout-order-summary-subtotal-block",{icon:{src:(0,r.createElement)(a.A,{icon:Nr,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:t}=e,o=(0,l.useBlockProps)();return(0,r.createElement)("div",{...o},(0,r.createElement)(qc,{className:t}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});const zc=({className:e=""})=>{const{cartFees:t,cartTotals:o}=He(),n=(0,wr.getCurrencyFromPriceResponse)(o);return(0,r.createElement)(Zt.TotalsWrapper,{className:e},(0,r.createElement)(Zt.TotalsFees,{currency:n,cartFees:t}))};(0,i.registerBlockType)("woocommerce/checkout-order-summary-fee-block",{icon:{src:(0,r.createElement)(a.A,{icon:Nr,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:t}=e,o=(0,l.useBlockProps)();return(0,r.createElement)("div",{...o},(0,r.createElement)(zc,{className:t}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});const Wc=()=>{const{extensions:e,receiveCart:t,...o}=He(),n={extensions:e,cart:o,context:"woocommerce/checkout"};return(0,r.createElement)(Bt.ExperimentalDiscountsMeta.Slot,{...n})},Yc=({className:e=""})=>{const{cartTotals:t,cartCoupons:o}=He(),{removeCoupon:n,isRemovingCoupon:c}=In("wc/checkout"),s=(0,wr.getCurrencyFromPriceResponse)(t);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Zt.TotalsWrapper,{className:e},(0,r.createElement)(Rr,{cartCoupons:o,currency:s,isRemovingCoupon:c,removeCoupon:n,values:t})),(0,r.createElement)(Wc,null))};(0,i.registerBlockType)("woocommerce/checkout-order-summary-discount-block",{icon:{src:(0,r.createElement)(a.A,{icon:Nr,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:t}=e,o=(0,l.useBlockProps)();return(0,r.createElement)("div",{...o},(0,r.createElement)(Yc,{className:t}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});const Gc=({className:e=""})=>{const{cartNeedsShipping:t,shippingRates:o,shippingAddress:n}=He(),c=(0,_.useSelect)((e=>e(re.checkoutStore).prefersCollection()));if(!t)return null;const s=(e=>!!Ge(e)&&e.every((e=>e.shipping_rates.every((e=>!e.selected||We(e))))))(((e,t)=>e.map((e=>({...e,shipping_rates:e.shipping_rates.filter((e=>{const o=Ye(e.method_id);return t?o:!o}))}))))(o,null!=c&&c)),a=Te(n,["state","country","postcode","city"]);return(0,r.createElement)(Bt.TotalsWrapper,{className:e},(0,r.createElement)(Ur,{label:s?(0,M.__)("Pickup","woocommerce"):(0,M.__)("Delivery","woocommerce"),placeholder:(0,r.createElement)("span",{className:"wc-block-components-shipping-placeholder__value"},a?(0,M.__)("No available delivery option","woocommerce"):(0,M.__)("Enter address to calculate","woocommerce"))}))};(0,i.registerBlockType)("woocommerce/checkout-order-summary-shipping-block",{icon:{src:(0,r.createElement)(a.A,{icon:Nr,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:t}=e,o=(0,l.useBlockProps)();return(0,r.createElement)("div",{...o},(0,r.createElement)(co,null,(0,r.createElement)(Gc,{className:t})))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});var Kc=o(8848);const Zc=({className:e=""})=>{const t=(0,y.getSetting)("couponsEnabled",!0),{applyCoupon:o,isApplyingCoupon:n}=In("wc/checkout");return t?(0,r.createElement)(Zt.TotalsWrapper,{className:e},(0,r.createElement)(xr,{onSubmit:o,isLoading:n,instanceId:"coupon"})):null};(0,i.registerBlockType)("woocommerce/checkout-order-summary-coupon-form-block",{icon:{src:(0,r.createElement)(a.A,{icon:Kc.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:t}=e,o=(0,l.useBlockProps)();return(0,r.createElement)("div",{...o},(0,r.createElement)(co,null,(0,r.createElement)(Zc,{className:t})))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});const Jc=({className:e,showRateAfterTaxName:t})=>{const{cartTotals:o}=He();if((0,y.getSetting)("displayCartPricesIncludingTax",!1)||parseInt(o.total_tax,10)<=0)return null;const n=(0,wr.getCurrencyFromPriceResponse)(o);return(0,r.createElement)(Zt.TotalsWrapper,{className:e},(0,r.createElement)(Zt.TotalsTaxes,{showRateAfterTaxName:t,currency:n,values:o}))},Xc={showRateAfterTaxName:{type:"boolean",default:(0,y.getSetting)("displayCartPricesIncludingTax",!1)},lock:{type:"object",default:{remove:!0,move:!0}}};(0,i.registerBlockType)("woocommerce/checkout-order-summary-taxes-block",{icon:{src:(0,r.createElement)(a.A,{icon:Nr,className:"wc-block-editor-components-block-icon"})},attributes:Xc,edit:({attributes:e,setAttributes:t})=>{const{className:o,showRateAfterTaxName:n}=e,c=(0,l.useBlockProps)(),s=(0,y.getSetting)("taxesEnabled"),a=(0,y.getSetting)("displayItemizedTaxes",!1),i=(0,y.getSetting)("displayCartPricesIncludingTax",!1);return(0,r.createElement)("div",{...c},(0,r.createElement)(l.InspectorControls,null,s&&a&&!i&&(0,r.createElement)(qt.PanelBody,{title:(0,M.__)("Taxes","woocommerce")},(0,r.createElement)(qt.ToggleControl,{label:(0,M.__)("Show rate after tax name","woocommerce"),help:(0,M.__)("Show the percentage rate alongside each tax line in the summary.","woocommerce"),checked:n,onChange:()=>t({showRateAfterTaxName:!n})}))),(0,r.createElement)(Jc,{className:o,showRateAfterTaxName:n}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})});const Qc=(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));o(4567);const es=({currency:e,maxPrice:t,minPrice:o,priceClassName:c,priceStyle:s={}})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:"screen-reader-text"},(0,M.sprintf)(/* translators: %1$s min price, %2$s max price */ /* translators: %1$s min price, %2$s max price */ (0,M.__)("Price between %1$s and %2$s","woocommerce"),(0,wr.formatPrice)(o),(0,wr.formatPrice)(t))),(0,r.createElement)("span",{"aria-hidden":!0},(0,r.createElement)(Zt.FormattedMonetaryAmount,{className:(0,n.A)("wc-block-components-product-price__value",c),currency:e,value:o,style:s})," — ",(0,r.createElement)(Zt.FormattedMonetaryAmount,{className:(0,n.A)("wc-block-components-product-price__value",c),currency:e,value:t,style:s}))),ts=({currency:e,regularPriceClassName:t,regularPriceStyle:o,regularPrice:c,priceClassName:s,priceStyle:a,price:i})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:"screen-reader-text"},(0,M.__)("Previous price:","woocommerce")),(0,r.createElement)(Zt.FormattedMonetaryAmount,{currency:e,renderText:e=>(0,r.createElement)("del",{className:(0,n.A)("wc-block-components-product-price__regular",t),style:o},e),value:c}),(0,r.createElement)("span",{className:"screen-reader-text"},(0,M.__)("Discounted price:","woocommerce")),(0,r.createElement)(Zt.FormattedMonetaryAmount,{currency:e,renderText:e=>(0,r.createElement)("ins",{className:(0,n.A)("wc-block-components-product-price__value","is-discounted",s),style:a},e),value:i})),os=({align:e,className:t,currency:o,format:c="<price/>",maxPrice:s,minPrice:a,price:i,priceClassName:l,priceStyle:d,regularPrice:u,regularPriceClassName:p,regularPriceStyle:h,style:g})=>{const _=(0,n.A)(t,"price","wc-block-components-product-price",{[`wc-block-components-product-price--align-${e}`]:e});c.includes("<price/>")||(c="<price/>",console.error("Price formats need to include the `<price/>` tag."));const k=u&&i&&i<u;let b=(0,r.createElement)("span",{className:(0,n.A)("wc-block-components-product-price__value",l)});return k?b=(0,r.createElement)(ts,{currency:o,price:i,priceClassName:l,priceStyle:d,regularPrice:u,regularPriceClassName:p,regularPriceStyle:h}):void 0!==a&&void 0!==s?b=(0,r.createElement)(es,{currency:o,maxPrice:s,minPrice:a,priceClassName:l,priceStyle:d}):i&&(b=(0,r.createElement)(Zt.FormattedMonetaryAmount,{className:(0,n.A)("wc-block-components-product-price__value",l),currency:o,value:i,style:d})),(0,r.createElement)("span",{className:_,style:g},(0,m.createInterpolateElement)(c,{price:b}))};o(6625);const rs=({className:e="",disabled:t=!1,name:o,permalink:c="",target:s,rel:a,style:i,onClick:l,disabledTagName:m="span",...d})=>{const u=(0,n.A)("wc-block-components-product-name",e),p=m;if(t){const e=d;return(0,r.createElement)(p,{className:u,...e,dangerouslySetInnerHTML:{__html:o}})}return(0,r.createElement)("a",{className:u,href:c,target:s,...d,dangerouslySetInnerHTML:{__html:o},style:i})};var ns=o(131);o(9507);const cs=({children:e,className:t})=>(0,r.createElement)("div",{className:(0,n.A)("wc-block-components-product-badge",t)},e),ss=()=>(0,r.createElement)(cs,{className:"wc-block-components-product-backorder-badge"},(0,M.__)("Available on backorder","woocommerce")),as=({image:e={},fallbackAlt:t=""})=>{const o=e.thumbnail?{src:e.thumbnail,alt:(0,Pe.decodeEntities)(e.alt)||t||"Product Image"}:{src:y.PLACEHOLDER_IMG_SRC,alt:""};return(0,r.createElement)("img",{...o,alt:o.alt})},is=({lowStockRemaining:e})=>e?(0,r.createElement)(cs,{className:"wc-block-components-product-low-stock-badge"},(0,M.sprintf)(/* translators: %d stock amount (number of items in stock for product) */ /* translators: %d stock amount (number of items in stock for product) */ (0,M.__)("%d left in stock","woocommerce"),e)):null;var ls=o(1194);o(4982);const ms=({details:e=[]})=>{if(!Array.isArray(e))return null;if(0===(e=e.filter((e=>!e.hidden))).length)return null;let t="ul",o="li";return 1===e.length&&(t="div",o="div"),(0,r.createElement)(t,{className:"wc-block-components-product-details"},e.map((e=>{const t=(null==e?void 0:e.key)||e.name||"",n=(null==e?void 0:e.className)||(t?`wc-block-components-product-details__${(0,ls.c)(t)}`:"");return(0,r.createElement)(o,{key:t+(e.display||e.value),className:n},t&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:"wc-block-components-product-details__name"},(0,Pe.decodeEntities)(t),":")," "),(0,r.createElement)("span",{className:"wc-block-components-product-details__value"},(0,Pe.decodeEntities)(e.display||e.value)))})))},ds=window.wp.wordcount,us=["a","b","em","i","strong","p","br","ul","ol","li","h1","h2","h3","h4","h5","h6","pre","blockquote","img"],ps=["target","href","rel","name","download","src","class","alt","style"],hs=({source:e,maxLength:t=15,countType:o="words",className:n="",style:c={}})=>{const s=(0,m.useMemo)((()=>((e,t=15,o="words")=>{const r=(0,cn.autop)(e);if((0,ds.count)(r,o)<=t)return r;const n=(e=>{const t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)})(r);return(0,ds.count)(n,o)<=t?n:"words"===o?ln(n,t):mn(n,t,"characters_including_spaces"===o)})(e,t,o)),[e,t,o]);return(0,r.createElement)(m.RawHTML,{style:c,className:n},tn(s,{tags:us,attr:ps}))},gs=({className:e,shortDescription:t="",fullDescription:o=""})=>{const n=t||o;return n?(0,r.createElement)(hs,{className:e,source:n,maxLength:15,countType:B.wordCountType||"words"}):null};o(401);const _s=({shortDescription:e="",fullDescription:t="",itemData:o=[],variation:n=[]})=>(0,r.createElement)("div",{className:"wc-block-components-product-metadata"},(0,r.createElement)(gs,{className:"wc-block-components-product-metadata__description",shortDescription:e,fullDescription:t}),(0,r.createElement)(ms,{details:o}),(0,r.createElement)(ms,{details:n.map((({attribute:e="",value:t})=>({key:e,value:t})))})),ks=({cartItem:e,disableProductDescriptions:t})=>{const{images:o,low_stock_remaining:c,show_backorder_badge:s,name:a,permalink:i,prices:l,quantity:d,short_description:u,description:p,item_data:h,variation:g,totals:_,extensions:k}=e,{receiveCart:b,...w}=He(),E=(0,m.useMemo)((()=>({context:"summary",cartItem:e,cart:w})),[e,w]),v=(0,wr.getCurrencyFromPriceResponse)(l),f=(0,Bt.applyCheckoutFilter)({filterName:"itemName",defaultValue:a,extensions:k,arg:E}),S=(0,ns.A)({amount:parseInt(l.raw_prices.regular_price,10),precision:(0,ye.isString)(l.raw_prices.precision)?parseInt(l.raw_prices.precision,10):l.raw_prices.precision}).convertPrecision(v.minorUnit).getAmount(),C=(0,ns.A)({amount:parseInt(l.raw_prices.price,10),precision:(0,ye.isString)(l.raw_prices.precision)?parseInt(l.raw_prices.precision,10):l.raw_prices.precision}).convertPrecision(v.minorUnit).getAmount(),P=(0,wr.getCurrencyFromPriceResponse)(_);let N=parseInt(_.line_subtotal,10);(0,y.getSetting)("displayCartPricesIncludingTax",!1)&&(N+=parseInt(_.line_subtotal_tax,10));const A=(0,ns.A)({amount:N,precision:P.minorUnit}).getAmount(),x=(0,Bt.applyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"<price/>",extensions:k,arg:E,validation:Bt.productPriceValidation}),I=(0,Bt.applyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"<price/>",extensions:k,arg:E,validation:Bt.productPriceValidation}),R=(0,Bt.applyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:k,arg:E}),T=t?{itemData:h,variation:g}:{itemData:h,variation:g,shortDescription:u,fullDescription:p};return(0,r.createElement)("div",{className:(0,n.A)("wc-block-components-order-summary-item",R)},(0,r.createElement)("div",{className:"wc-block-components-order-summary-item__image"},(0,r.createElement)("div",{className:"wc-block-components-order-summary-item__quantity"},(0,r.createElement)(Zt.Label,{label:d.toString(),screenReaderLabel:(0,M.sprintf)(/* translators: %d number of products of the same type in the cart */ /* translators: %d number of products of the same type in the cart */ (0,M._n)("%d item","%d items",d,"woocommerce"),d)})),(0,r.createElement)(as,{image:o.length?o[0]:{},fallbackAlt:f})),(0,r.createElement)("div",{className:"wc-block-components-order-summary-item__description"},(0,r.createElement)(rs,{disabled:!0,name:f,permalink:i,disabledTagName:"h3"}),(0,r.createElement)(os,{currency:v,price:C,regularPrice:S,className:"wc-block-components-order-summary-item__individual-prices",priceClassName:"wc-block-components-order-summary-item__individual-price",regularPriceClassName:"wc-block-components-order-summary-item__regular-individual-price",format:x}),s?(0,r.createElement)(ss,null):!!c&&(0,r.createElement)(is,{lowStockRemaining:c}),(0,r.createElement)(_s,{...T})),(0,r.createElement)("span",{className:"screen-reader-text"},(0,M.sprintf)(/* translators: %1$d is the number of items, %2$s is the item name and %3$s is the total price including the currency symbol. */ /* translators: %1$d is the number of items, %2$s is the item name and %3$s is the total price including the currency symbol. */ (0,M._n)("Total price for %1$d %2$s item: %3$s","Total price for %1$d %2$s items: %3$s",d,"woocommerce"),d,f,(0,wr.formatPrice)(A,P))),(0,r.createElement)("div",{className:"wc-block-components-order-summary-item__total-price","aria-hidden":"true"},(0,r.createElement)(os,{currency:P,format:I,price:A})))};o(5415);const bs=({cartItems:e=[],disableProductDescriptions:t=!1})=>{const{isLarge:o,hasContainerWidth:c}=p();return c?(0,r.createElement)("div",{className:(0,n.A)("wc-block-components-order-summary",{"is-large":o})},(0,r.createElement)("div",{className:"wc-block-components-order-summary__content"},e.map((e=>(0,r.createElement)(ks,{disableProductDescriptions:t,key:e.key,cartItem:e}))))):null},ws=({className:e="",disableProductDescriptions:t=!1})=>{const{cartItems:o}=He();return(0,r.createElement)(Zt.TotalsWrapper,{className:e},(0,r.createElement)(bs,{cartItems:o,disableProductDescriptions:t}))};(0,i.registerBlockType)("woocommerce/checkout-order-summary-cart-items-block",{icon:{src:(0,r.createElement)(a.A,{icon:Qc,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:t})=>{const{className:o,disableProductDescriptions:n}=e,c=(0,l.useBlockProps)();return(0,r.createElement)("div",{...c},(()=>{const{experimentalBlocksEnabled:e}=(0,y.getSetting)("wcBlocksConfig",{experimentalBlocksEnabled:!1});return e})()&&(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(qt.PanelBody,{title:(0,M.__)("Settings","woocommerce")},(0,r.createElement)(qt.ToggleControl,{label:(0,M.__)("Disable product descriptions","woocommerce"),help:(0,M.__)("Disable display of product descriptions.","woocommerce"),checked:n,onChange:()=>t({disableProductDescriptions:!n})}))),(0,r.createElement)(ws,{disableProductDescriptions:n,className:o}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()})}),o(5681),(0,i.registerBlockType)("woocommerce/checkout-order-summary-totals-block",{icon:{src:(0,r.createElement)(a.A,{icon:Nr,className:"wc-block-editor-components-block-icon"})},edit:({clientId:e})=>{const t=(0,l.useBlockProps)(),o=$t(Bt.innerBlockAreas.CHECKOUT_ORDER_SUMMARY_TOTALS),n=[["woocommerce/checkout-order-summary-subtotal-block",{},[]],["woocommerce/checkout-order-summary-fee-block",{},[]],["woocommerce/checkout-order-summary-discount-block",{},[]],["woocommerce/checkout-order-summary-shipping-block",{},[]],["woocommerce/checkout-order-summary-taxes-block",{},[]]];return Ht({clientId:e,registeredBlocks:o,defaultTemplate:n}),(0,r.createElement)("div",{...t},(0,r.createElement)(l.InnerBlocks,{allowedBlocks:o,template:n}))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save()},(0,r.createElement)(l.InnerBlocks.Content,null))}),o(6201);var Es=o(8558);const ys=(e,t=!0)=>{t?window.document.body.classList.add(e):window.document.body.classList.remove(e)},vs=({attributes:e,setAttributes:t})=>{const{hasDarkControls:o,showFormStepNumbers:n}=e;return(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(qt.PanelBody,{title:(0,M.__)("Style","woocommerce")},(0,r.createElement)(qt.ToggleControl,{label:(0,M.__)("Show form step numbers","woocommerce"),checked:n,onChange:()=>t({showFormStepNumbers:!n})}),(0,r.createElement)(qt.ToggleControl,{label:(0,M.__)("Dark mode inputs","woocommerce"),help:(0,M.__)("Inputs styled specifically for use on dark background colors.","woocommerce"),checked:o,onChange:()=>t({hasDarkControls:!o})})))},fs=window.wp.editor;function Ss({block:e}){const t="checkout"===e?O:j,o="checkout"===e?"woocommerce_checkout_page_id":"woocommerce_cart_page_id",{saveEntityRecord:n}=(0,_.useDispatch)(Dt.store),{editPost:c,savePost:s}=(0,_.useDispatch)(fs.store),{slug:a,postPublished:i,currentPostId:l}=(0,_.useSelect)((o=>{var r;const{getEntityRecord:n}=o(Dt.store),{isCurrentPostPublished:c,getCurrentPostId:s}=o(fs.store);return{slug:(null===(r=n("postType","page",t))||void 0===r?void 0:r.slug)||e,postPublished:c(),currentPostId:s()}}),[]),[d,u]=(0,m.useState)("pristine"),p=(0,m.useCallback)((()=>{u("updating"),Promise.resolve().then((()=>Nt()({path:`/wc/v3/settings/advanced/${o}`,method:"GET"}))).catch((e=>{"rest_setting_setting_invalid"===e.code&&u("error")})).then((()=>{if(!i)return c({status:"publish"}),s()})).then((()=>Nt()({path:`/wc/v3/settings/advanced/${o}`,method:"POST",data:{value:l.toString()}}))).then((()=>{if(0!==t)return n("postType","page",{id:t,slug:`${a}-2`})})).then((()=>c({slug:a}))).then((()=>s())).then((()=>u("updated")))}),[i,c,s,o,l,t,n,a]);let h;return h="checkout"===e?(0,m.createInterpolateElement)((0,M.__)("If you would like to use this block as your default checkout, <a>update your page settings</a>.","woocommerce"),{a:(0,r.createElement)("a",{href:"#",onClick:p},(0,M.__)("update your page settings","woocommerce"))}):(0,m.createInterpolateElement)((0,M.__)("If you would like to use this block as your default cart, <a>update your page settings</a>.","woocommerce"),{a:(0,r.createElement)("a",{href:"#",onClick:p},(0,M.__)("update your page settings","woocommerce"))}),"string"==typeof pagenow&&"site-editor"===pagenow||l===t||"dismissed"===d?null:(0,r.createElement)(qt.Notice,{className:"wc-default-page-notice",status:"updated"===d?"success":"info",onRemove:()=>u("dismissed"),spokenMessage:"updated"===d?(0,M.__)("Page settings updated","woocommerce"):h},"updated"===d?(0,M.__)("Page settings updated","woocommerce"):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,h)))}o(4688);const Cs=[],Ps=e=>{const[t,o,r]=(()=>{const e={};(0,y.getSetting)("incompatibleExtensions")&&(0,y.getSetting)("incompatibleExtensions").forEach((t=>{e[t.id]=t.title}));const t=Object.keys(e),o=t.length;return[e,t,o]})(),[n,c,s]=(()=>{const{incompatiblePaymentMethods:e}=(0,_.useSelect)((e=>{const{getIncompatiblePaymentMethods:t}=e(re.paymentStore);return{incompatiblePaymentMethods:t()}}),[]),t=Object.keys(e);return[e,t,t.length]})(),a={...t,...n},i=[...o,...c],l=r+s,[d,u]=((e,t)=>{const[o,r]=(0,m.useState)((()=>{const o=window.localStorage.getItem(e);if(o)try{return JSON.parse(o)}catch{console.error(`Value for key '${e}' could not be retrieved from localStorage because it can't be parsed.`)}return t}));return(0,m.useEffect)((()=>{try{window.localStorage.setItem(e,JSON.stringify(o))}catch{console.error(`Value for key '${e}' could not be saved in localStorage because it can't be converted into a string.`)}}),[e,o]),[o,r]})("wc-blocks_dismissed_incompatible_extensions_notices",Cs),[p,h]=(0,m.useState)(!1),g=d.some((t=>{return Object.keys(t).includes(e)&&(o=t[e],r=i,o.length===r.length&&new Set([...o,...r]).size===o.length);var o,r})),k=0===l||g;return(0,m.useEffect)((()=>{h(!k),k||g||u((t=>t.reduce(((t,o)=>(Object.keys(o).includes(e)||t.push(o),t)),[])))}),[k,g,u,e]),[p,()=>{const t=new Set(d);t.add({[e]:i}),u([...t])},(b=a,Object.fromEntries(Object.entries(b).sort((([,e],[,t])=>e.localeCompare(t))))),l];var b};var Ns=o(4922),As=o.n(Ns);As()("wc-admin:tracks:stats");const xs=As()("wc-admin:tracks");function Is(e,t){if(xs("recordevent %s %o","wcadmin_"+e,t,{_tqk:window._tkq,shouldRecord:!!window._tkq&&!!window.wcTracks&&!!window.wcTracks.isEnabled}),!window.wcTracks||"function"!=typeof window.wcTracks.recordEvent)return!1;window.wcTracks.recordEvent(e,t)}const Rs=({blocks:e,findCondition:t})=>{for(const o of e){if(t(o))return o;if(o.innerBlocks){const e=Rs({blocks:o.innerBlocks,findCondition:t});if(e)return e}}},Ts=({blockType:e="woocommerce/cart"})=>"woocommerce/cart"===e?(0,r.createElement)("p",null,(0,M.__)("If you continue, the cart block will be replaced with the classic experience powered by shortcodes. This means that you may lose customizations that you made to the cart block.","woocommerce")):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,(0,M.__)("If you continue, the checkout block will be replaced with the classic experience powered by shortcodes. This means that you may lose:","woocommerce")),(0,r.createElement)("ul",{className:"cross-list"},(0,r.createElement)("li",null,(0,M.__)("Customizations and updates to the block","woocommerce")),(0,r.createElement)("li",null,(0,M.__)("Additional local pickup options created for the new checkout","woocommerce"))));function Ms({block:e,clientId:t,type:o}){const{createInfoNotice:n}=(0,_.useDispatch)(bt.store),{replaceBlock:c,selectBlock:s}=(0,_.useDispatch)(l.store),[a,d]=(0,m.useState)(!1),u=()=>d(!1),{undo:p}=(0,_.useDispatch)(Dt.store),[,,h,g]=Ps(e),k="woocommerce/cart"===e,b=k?(0,M.__)("Switch to classic cart","woocommerce"):(0,M.__)("Switch to classic checkout","woocommerce"),w=k?(0,M.__)("Switched to classic cart.","woocommerce"):(0,M.__)("Switched to classic checkout.","woocommerce"),E=k?"cart":"checkout",y={shortcode:E,notice:"incompatible"===o?"incompatible_notice":"generic_notice",incompatible_extensions_count:g,incompatible_extensions_names:JSON.stringify(h)},{getBlocks:v}=(0,_.useSelect)((e=>({getBlocks:e(l.store).getBlocks})),[]),f=()=>{p(),Is("switch_to_classic_shortcode_undo",y)};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(qt.Button,{variant:"secondary",onClick:()=>{Is("switch_to_classic_shortcode_click",y),d(!0)}},b),a&&(0,r.createElement)(qt.Modal,{size:"medium",title:b,onRequestClose:u,className:"wc-blocks-switch-to-classic-shortcode-modal-content"},(0,r.createElement)(Ts,{blockType:e}),(0,r.createElement)(qt.TabbableContainer,{className:"wc-blocks-switch-to-classic-shortcode-modal-actions"},(0,r.createElement)(qt.Button,{variant:"primary",isDestructive:!0,onClick:()=>{c(t,(0,i.createBlock)("woocommerce/classic-shortcode",{shortcode:E})),Is("switch_to_classic_shortcode_confirm",y),(()=>{const e=Rs({blocks:v(),findCondition:e=>"woocommerce/classic-shortcode"===e.name});e&&s(e.clientId)})(),n(w,{actions:[{label:(0,M.__)("Undo","woocommerce"),onClick:f}],type:"snackbar"}),u()}},(0,M.__)("Switch","woocommerce"))," ",(0,r.createElement)(qt.Button,{variant:"secondary",onClick:()=>{Is("switch_to_classic_shortcode_cancel",y),u()}},(0,M.__)("Cancel","woocommerce")))))}function Bs({block:e,clientId:t}){const[o,n,c,s]=Ps(e);if(!o)return null;const i=(0,r.createElement)(r.Fragment,null,s>1?(0,m.createInterpolateElement)((0,M.__)("Some active extensions do not yet support this block. This may impact the shopper experience. <a>Learn more</a>","woocommerce"),{a:(0,r.createElement)(qt.ExternalLink,{href:"https://woocommerce.com/document/woocommerce-store-editing/customizing-cart-and-checkout/#incompatible-extensions/"})}):(0,m.createInterpolateElement)((0,M.sprintf)( // translators: %s is the name of the extension. // translators: %s is the name of the extension. (0,M.__)("<strong>%s</strong> does not yet support this block. This may impact the shopper experience. <a>Learn more</a>","woocommerce"),Object.values(c)[0]),{strong:(0,r.createElement)("strong",null),a:(0,r.createElement)(qt.ExternalLink,{href:"https://woocommerce.com/document/woocommerce-store-editing/customizing-cart-and-checkout/#incompatible-extensions/"})})),l=Object.entries(c),d=l.length-2;return(0,r.createElement)(qt.Notice,{className:"wc-blocks-incompatible-extensions-notice",status:"warning",onRemove:n,spokenMessage:i},(0,r.createElement)("div",{className:"wc-blocks-incompatible-extensions-notice__content"},(0,r.createElement)(a.A,{className:"wc-blocks-incompatible-extensions-notice__warning-icon",icon:(0,r.createElement)(rn,null)}),(0,r.createElement)("div",null,(0,r.createElement)("p",null,i),s>1&&(0,r.createElement)("ul",null,l.slice(0,2).map((([e,t])=>(0,r.createElement)("li",{key:e,className:"wc-blocks-incompatible-extensions-notice__element"},t)))),l.length>2&&(0,r.createElement)("details",null,(0,r.createElement)("summary",null,(0,r.createElement)("span",null,(0,M.sprintf)( // translators: %s is the number of incompatible extensions. // translators: %s is the number of incompatible extensions. (0,M._n)("%s more incompatibility","%s more incompatibilities",d,"woocommerce"),d)),(0,r.createElement)(a.A,{icon:so.A})),(0,r.createElement)("ul",null,l.slice(2).map((([e,t])=>(0,r.createElement)("li",{key:e,className:"wc-blocks-incompatible-extensions-notice__element"},t))))),(0,r.createElement)(Ms,{block:e,clientId:t,type:"incompatible"}))))}o(7840),o(1212);var Ds=o(361);o(1598);const Os=({text:e,title:t=(0,M.__)("Feedback?","woocommerce"),url:o})=>{const[n,c]=(0,m.useState)(!1);return(0,m.useEffect)((()=>{c(!0)}),[]),(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)("div",{className:"wc-block-feedback-prompt"},(0,r.createElement)(a.A,{icon:Ds.A}),(0,r.createElement)("h2",{className:"wc-block-feedback-prompt__title"},t),(0,r.createElement)("p",{className:"wc-block-feedback-prompt__text"},e),(0,r.createElement)("a",{href:o,className:"wc-block-feedback-prompt__link",rel:"noreferrer noopener",target:"_blank"},(0,M.__)("Give us your feedback.","woocommerce"),(0,r.createElement)(a.A,{icon:Zr.A,size:16}))))},Fs=()=>(0,r.createElement)(Os,{text:(0,M.__)("We are currently working on improving our cart and checkout blocks to provide merchants with the tools and customization options they need.","woocommerce"),url:"https://github.com/woocommerce/woocommerce/discussions/new?category=checkout-flow&labels=type%3A+product%20feedback"}),Ls=(0,d.createHigherOrderComponent)((e=>t=>{const{clientId:o,name:n,isSelected:c}=t,{isCart:s,isCheckout:a,parentId:i}=(0,_.useSelect)((e=>{const{getBlockParentsByBlockName:t,getBlockName:r}=e(l.store),n=t(o,["woocommerce/cart","woocommerce/checkout"]).reduce(((e,t)=>(e[r(t)]=t,e)),{}),c=r(o),s=Object.keys(n).includes("woocommerce/cart"),a=Object.keys(n).includes("woocommerce/checkout"),i="woocommerce/cart"===c||s,m=i?"woocommerce/cart":"woocommerce/checkout";return{isCart:i,isCheckout:"woocommerce/checkout"===c||a,parentId:c===m?o:n[m]}}));return n.startsWith("woocommerce/")&&c&&(s||a)?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(Bs,{block:s?"woocommerce/cart":"woocommerce/checkout",clientId:i}),(0,r.createElement)(Ss,{block:a?"checkout":"cart"}),(0,r.createElement)(Fs,null)),(0,r.createElement)(e,{key:"edit",...t})):(0,r.createElement)(e,{key:"edit",...t})}),"withSidebarNotices");(0,it.hasFilter)("editor.BlockEdit","woocommerce/add/sidebar-compatibility-notice")||(0,it.addFilter)("editor.BlockEdit","woocommerce/add/sidebar-compatibility-notice",Ls,11),(0,it.hasFilter)("blocks.registerBlockType","core/lock/addAttribute")||(0,_.subscribe)((()=>{var e,t;const o=(0,_.select)(l.store);if(!o)return;const r=o.getSelectedBlock();r&&(ys("wc-lock-selected-block--remove",!(null==r||null===(e=r.attributes)||void 0===e||null===(e=e.lock)||void 0===e||!e.remove)),ys("wc-lock-selected-block--move",!(null==r||null===(t=r.attributes)||void 0===t||null===(t=t.lock)||void 0===t||!t.move)))}));const js=["woocommerce/checkout-fields-block","woocommerce/checkout-totals-block"],Vs={hasDarkControls:{type:"boolean",default:(0,y.getSetting)("hasDarkEditorStyleSupport",!1)},showRateAfterTaxName:{type:"boolean",default:(0,y.getSetting)("displayCartPricesIncludingTax",!1)}},Us={showOrderNotes:{type:"boolean",default:!0},showPolicyLinks:{type:"boolean",default:!0},showReturnToCart:{type:"boolean",default:!0},cartPageId:{type:"number",default:0},showCompanyField:{type:"boolean",default:!1},requireCompanyField:{type:"boolean",default:!1},showApartmentField:{type:"boolean",default:!0},requireApartmentField:{type:"boolean",default:!1},showPhoneField:{type:"boolean",default:!0},requirePhoneField:{type:"boolean",default:!1}},$s=JSON.parse('{"name":"woocommerce/checkout","version":"1.0.0","title":"Checkout","description":"Display a checkout form so your customers can submit orders.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"align":["wide"],"html":false,"multiple":false},"example":{"attributes":{"isPreview":true},"viewportWidth":800},"attributes":{"isPreview":{"type":"boolean","default":false,"save":false},"align":{"type":"string","default":"wide"},"showFormStepNumbers":{"type":"boolean","default":false}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),Hs={icon:{src:(0,r.createElement)(a.A,{icon:s,className:"wc-block-editor-components-block-icon"})},attributes:{...$s.attributes,...Vs,...Us},edit:({clientId:e,attributes:t,setAttributes:o})=>{const{showOrderNotes:c,showPolicyLinks:s,showReturnToCart:a,showRateAfterTaxName:d,cartPageId:u,isPreview:p=!1,showFormStepNumbers:h=!1,hasDarkControls:k=!1}=t,b=(0,_.useSelect)((e=>{const t=e(Dt.store).getEditedEntityRecord("root","site");return{...y.defaultFields,...Object.fromEntries(Object.entries({phone:"optional",company:"hidden",address_2:"optional"}).map((([e,o])=>{const r=t[`woocommerce_checkout_${e}_field`]||o;return[e,{...y.defaultFields[e],required:"required"===r,hidden:"hidden"===r}]})))}})),E=(0,m.useRef)((0,xe.getQueryArg)(window.location.href,"focus"));(0,m.useEffect)((()=>{"checkout"!==E.current||(0,_.select)("core/block-editor").hasSelectedBlock()||((0,_.dispatch)("core/block-editor").selectBlock(e),(0,_.dispatch)("core/interface").enableComplementaryArea("core/edit-site","edit-site/block-inspector"))}),[e]);const v=((e={})=>{const t=(0,m.useRef)(),o=(0,l.useBlockProps)({ref:t,...e});return(({ref:e})=>{const t=(0,it.hasFilter)("blocks.registerBlockType","core/lock/addAttribute"),o=e.current;(0,m.useEffect)((()=>{if(o&&!t)return o.addEventListener("keydown",e,{capture:!0,passive:!1}),()=>{o.removeEventListener("keydown",e,{capture:!0})};function e(e){const{keyCode:t,target:o}=e;if(!(o instanceof HTMLElement))return;if(t!==Es.BACKSPACE&&t!==Es.DELETE)return;if((0,oo.isTextField)(o))return;const r=o;if(void 0===r.dataset.block)return;const n=(e=>{var t,o;if(!e)return!1;const{getBlock:r}=(0,_.select)(l.store),n=r(e);if("boolean"==typeof(null==n||null===(t=n.attributes)||void 0===t||null===(t=t.lock)||void 0===t?void 0:t.remove))return n.attributes.lock.remove;const c=(0,i.getBlockType)(n.name);var s;return"boolean"==typeof(null==c||null===(o=c.attributes)||void 0===o||null===(o=o.lock)||void 0===o||null===(o=o.default)||void 0===o?void 0:o.remove)&&(null==c||null===(s=c.attributes)||void 0===s||null===(s=s.lock)||void 0===s||null===(s=s.default)||void 0===s?void 0:s.remove)})(r.dataset.block);n&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}}),[o,t])})({ref:t}),o})();return(0,r.createElement)("div",{...v},(0,r.createElement)(l.InspectorControls,null,(0,r.createElement)(vs,{attributes:t,setAttributes:o})),(0,r.createElement)(w,{isPreview:!!p,previewData:{previewCart:at,previewSavedPaymentMethods:Mt,defaultFields:b}},(0,r.createElement)(Bt.SlotFillProvider,null,(0,r.createElement)(Tt,null,(0,r.createElement)(g,{className:(0,n.A)("wc-block-checkout",{"has-dark-controls":k})},(0,r.createElement)(jt.Provider,{value:{showOrderNotes:c,showPolicyLinks:s,showReturnToCart:a,cartPageId:u,showRateAfterTaxName:d,showFormStepNumbers:h,defaultFields:b}},(0,r.createElement)(l.InnerBlocks,{allowedBlocks:js,template:[["woocommerce/checkout-totals-block",{},[]],["woocommerce/checkout-fields-block",{},[]]],templateLock:"insert"})))))))},save:()=>(0,r.createElement)("div",{...l.useBlockProps.save({className:"wc-block-checkout is-loading"})},(0,r.createElement)(l.InnerBlocks.Content,null)),transforms:{to:[{type:"block",blocks:["woocommerce/classic-shortcode"],transform:e=>(0,i.createBlock)("woocommerce/classic-shortcode",{shortcode:"checkout",align:e.align},[])}]},deprecated:[{attributes:{...$s.attributes,...Vs,...Us},save:({attributes:e})=>(0,r.createElement)("div",{className:(0,n.A)("is-loading",e.className)}),migrate:e=>{const{showOrderNotes:t,showPolicyLinks:o,showReturnToCart:r,cartPageId:n}=e;return[e,[(0,i.createBlock)("woocommerce/checkout-fields-block",{},[(0,i.createBlock)("woocommerce/checkout-express-payment-block",{},[]),(0,i.createBlock)("woocommerce/checkout-contact-information-block",{},[]),(0,i.createBlock)("woocommerce/checkout-shipping-address-block",{},[]),(0,i.createBlock)("woocommerce/checkout-billing-address-block",{},[]),(0,i.createBlock)("woocommerce/checkout-shipping-methods-block",{},[]),(0,i.createBlock)("woocommerce/checkout-payment-block",{},[]),(0,i.createBlock)("woocommerce/checkout-additional-information-block",{},[]),!!t&&(0,i.createBlock)("woocommerce/checkout-order-note-block",{},[]),!!o&&(0,i.createBlock)("woocommerce/checkout-terms-block",{},[]),(0,i.createBlock)("woocommerce/checkout-actions-block",{showReturnToCart:r,cartPageId:n},[])].filter(Boolean)),(0,i.createBlock)("woocommerce/checkout-totals-block",{})]]},isEligible:(e,t)=>!t.some((e=>"woocommerce/checkout-fields-block"===e.name))},{save:({attributes:e})=>(0,r.createElement)("div",{className:(0,n.A)("is-loading",e.className)}),isEligible:(e,t)=>{const o=t.find((e=>"woocommerce/checkout-fields-block"===e.name));return!!o&&!o.innerBlocks.some((e=>"woocommerce/checkout-additional-information-block"===e.name))},migrate:(e,t)=>{const o=t.findIndex((e=>"woocommerce/checkout-fields-block"===e.name));if(-1===o)return!1;const r=t[o],n=r.innerBlocks.findIndex((e=>"wp-block-woocommerce-checkout-payment-block"===e.name));return-1!==n&&(t[o]=r.innerBlocks.slice(0,n).concat((0,i.createBlock)("woocommerce/checkout-additional-information-block",{},[])).concat(t.slice(n+1,t.length)),[e,t])}}]};(0,i.registerBlockType)($s,Hs)},9407:()=>{},2080:()=>{},5684:()=>{},5415:()=>{},3091:()=>{},4957:()=>{},777:()=>{},9507:()=>{},4982:()=>{},401:()=>{},718:()=>{},7051:()=>{},2867:()=>{},3048:()=>{},265:()=>{},7919:()=>{},780:()=>{},2931:()=>{},8375:()=>{},9345:()=>{},6625:()=>{},4567:()=>{},5452:()=>{},1221:()=>{},8824:()=>{},9569:()=>{},1637:()=>{},181:()=>{},1094:()=>{},7259:()=>{},6664:()=>{},149:()=>{},5089:()=>{},9865:()=>{},6619:()=>{},377:()=>{},7797:()=>{},1407:()=>{},5681:()=>{},3425:()=>{},7694:()=>{},2255:()=>{},1299:()=>{},8845:()=>{},5609:()=>{},7765:()=>{},6201:()=>{},4688:()=>{},9705:()=>{},1598:()=>{},1212:()=>{},7840:()=>{},7791:()=>{},1609:e=>{"use strict";e.exports=window.React},790:e=>{"use strict";e.exports=window.ReactJSXRuntime},195:e=>{"use strict";e.exports=window.wp.a11y},9491:e=>{"use strict";e.exports=window.wp.compose},4040:e=>{"use strict";e.exports=window.wp.deprecated},8107:e=>{"use strict";e.exports=window.wp.dom},6087:e=>{"use strict";e.exports=window.wp.element},7723:e=>{"use strict";e.exports=window.wp.i18n},923:e=>{"use strict";e.exports=window.wp.isShallowEqual},8558:e=>{"use strict";e.exports=window.wp.keycodes},5573:e=>{"use strict";e.exports=window.wp.primitives}},n={};function c(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return r[e].call(o.exports,o,o.exports,c),o.exports}c.m=r,e=[],c.O=(t,o,r,n)=>{if(!o){var s=1/0;for(m=0;m<e.length;m++){for(var[o,r,n]=e[m],a=!0,i=0;i<o.length;i++)(!1&n||s>=n)&&Object.keys(c.O).every((e=>c.O[e](o[i])))?o.splice(i--,1):(a=!1,n<s&&(s=n));if(a){e.splice(m--,1);var l=r();void 0!==l&&(t=l)}}return t}n=n||0;for(var m=e.length;m>0&&e[m-1][2]>n;m--)e[m]=e[m-1];e[m]=[o,r,n]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var n=Object.create(null);c.r(n);var s={};t=t||[null,o({}),o([]),o(o)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=o(a))Object.getOwnPropertyNames(a).forEach((t=>s[t]=()=>e[t]));return s.default=()=>e,c.d(n,s),n},c.d=(e,t)=>{for(var o in t)c.o(t,o)&&!c.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.j=251,(()=>{var e={251:0};c.O.j=t=>0===e[t];var t=(t,o)=>{var r,n,[s,a,i]=o,l=0;if(s.some((t=>0!==e[t]))){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);if(i)var m=i(c)}for(t&&t(o);l<s.length;l++)n=s[l],c.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return c.O(m)},o=self.webpackChunkwebpackWcBlocksMainJsonp=self.webpackChunkwebpackWcBlocksMainJsonp||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var s=c.O(void 0,[94],(()=>c(4592)));s=c.O(s),((this.wc=this.wc||{}).blocks=this.wc.blocks||{}).checkout=s})();
Submit
FILE
FOLDER
Name
Size
Permission
Action
@woocommerce
---
0755
accordion-group
---
0755
accordion-header
---
0755
accordion-item
---
0755
accordion-panel
---
0755
active-filters
---
0755
add-to-cart-form
---
0755
add-to-cart-with-options
---
0755
add-to-cart-with-options-grouped-product-selector
---
0755
add-to-cart-with-options-grouped-product-selector-item
---
0755
add-to-cart-with-options-quantity-selector
---
0755
add-to-cart-with-options-variation-selector
---
0755
all-products
---
0755
attribute-filter
---
0755
blockified-product-details
---
0755
breadcrumbs
---
0755
cart-blocks
---
0755
cart-link
---
0755
catalog-sorting
---
0755
checkout
---
0755
checkout-blocks
---
0755
classic-shortcode
---
0755
coming-soon
---
0755
customer-account
---
0755
featured-category
---
0755
featured-product
---
0755
filter-wrapper
---
0755
handpicked-products
---
0755
inner-blocks
---
0755
mini-cart
---
0755
mini-cart-contents-block
---
0755
order-confirmation-additional-fields
---
0755
order-confirmation-additional-fields-wrapper
---
0755
order-confirmation-additional-information
---
0755
order-confirmation-billing-address
---
0755
order-confirmation-billing-wrapper
---
0755
order-confirmation-create-account
---
0755
order-confirmation-downloads
---
0755
order-confirmation-downloads-wrapper
---
0755
order-confirmation-shipping-address
---
0755
order-confirmation-shipping-wrapper
---
0755
order-confirmation-status
---
0755
order-confirmation-summary
---
0755
order-confirmation-totals
---
0755
order-confirmation-totals-wrapper
---
0755
page-content-wrapper
---
0755
price-filter
---
0755
product-average-rating
---
0755
product-best-sellers
---
0755
product-button
---
0755
product-categories
---
0755
product-category
---
0755
product-collection
---
0755
product-collection-no-results
---
0755
product-details
---
0755
product-filter-active
---
0755
product-filter-attribute
---
0755
product-filter-checkbox-list
---
0755
product-filter-chips
---
0755
product-filter-clear-button
---
0755
product-filter-price
---
0755
product-filter-price-slider
---
0755
product-filter-rating
---
0755
product-filter-removable-chips
---
0755
product-filter-status
---
0755
product-filters
---
0755
product-gallery
---
0755
product-gallery-large-image
---
0755
product-gallery-large-image-next-previous
---
0755
product-gallery-pager
---
0755
product-gallery-thumbnails
---
0755
product-image
---
0755
product-image-gallery
---
0755
product-meta
---
0755
product-new
---
0755
product-price
---
0755
product-rating
---
0755
product-rating-counter
---
0755
product-rating-stars
---
0755
product-results-count
---
0755
product-reviews
---
0755
product-sale-badge
---
0755
product-summary
---
0755
product-tag
---
0755
product-template
---
0755
product-top-rated
---
0755
products-by-attribute
---
0755
rating-filter
---
0755
related-products
---
0755
single-product
---
0755
stock-filter
---
0755
store-notices
---
0755
woocommerce
---
0755
2727-style.js.LICENSE.txt
188 bytes
0644
3671-style.js.LICENSE.txt
121 bytes
0644
accordion-group-frontend.asset.php
147 bytes
0644
accordion-group-frontend.js
691 bytes
0644
accordion-group-rtl.css
1940 bytes
0644
accordion-group-style.asset.php
186 bytes
0644
accordion-group.asset.php
166 bytes
0644
accordion-group.css
1939 bytes
0644
accordion-group.js
4760 bytes
0644
accordion-header-style.asset.php
166 bytes
0644
accordion-header.asset.php
166 bytes
0644
accordion-header.js
9782 bytes
0644
accordion-item-style.asset.php
191 bytes
0644
accordion-item.asset.php
191 bytes
0644
accordion-item.js
5145 bytes
0644
accordion-panel-style.asset.php
155 bytes
0644
accordion-panel.asset.php
155 bytes
0644
accordion-panel.js
5682 bytes
0644
active-filters-frontend.asset.php
336 bytes
0644
active-filters-frontend.js
18676 bytes
0644
active-filters-rtl.css
9793 bytes
0644
active-filters-style.asset.php
369 bytes
0644
active-filters-wrapper-frontend.js
15040 bytes
0644
active-filters-wrapper-rtl.css
9260 bytes
0644
active-filters-wrapper.css
9262 bytes
0644
active-filters.asset.php
369 bytes
0644
active-filters.css
9795 bytes
0644
active-filters.js
17367 bytes
0644
add-to-cart-form-frontend.asset.php
147 bytes
0644
add-to-cart-form-frontend.js
1067 bytes
0644
add-to-cart-form-rtl.css
6923 bytes
0644
add-to-cart-form-style.asset.php
255 bytes
0644
add-to-cart-form.asset.php
235 bytes
0644
add-to-cart-form.css
6927 bytes
0644
add-to-cart-form.js
11717 bytes
0644
add-to-cart-with-options-frontend.asset.php
147 bytes
0644
add-to-cart-with-options-frontend.js
370 bytes
0644
add-to-cart-with-options-grouped-product-selector-frontend.asset.php
147 bytes
0644
add-to-cart-with-options-grouped-product-selector-frontend.js
395 bytes
0644
add-to-cart-with-options-grouped-product-selector-item-frontend.asset.php
147 bytes
0644
add-to-cart-with-options-grouped-product-selector-item-frontend.js
400 bytes
0644
add-to-cart-with-options-grouped-product-selector-item-style.asset.php
311 bytes
0644
add-to-cart-with-options-grouped-product-selector-item.asset.php
291 bytes
0644
add-to-cart-with-options-grouped-product-selector-item.js
6179 bytes
0644
add-to-cart-with-options-grouped-product-selector-style.asset.php
255 bytes
0644
add-to-cart-with-options-grouped-product-selector.asset.php
235 bytes
0644
add-to-cart-with-options-grouped-product-selector.js
5587 bytes
0644
add-to-cart-with-options-quantity-selector-frontend.asset.php
147 bytes
0644
add-to-cart-with-options-quantity-selector-frontend.js
1101 bytes
0644
add-to-cart-with-options-quantity-selector-rtl.css
3603 bytes
0644
add-to-cart-with-options-quantity-selector-style.asset.php
255 bytes
0644
add-to-cart-with-options-quantity-selector.asset.php
235 bytes
0644
add-to-cart-with-options-quantity-selector.css
3605 bytes
0644
add-to-cart-with-options-quantity-selector.js
5744 bytes
0644
add-to-cart-with-options-rtl.css
1226 bytes
0644
add-to-cart-with-options-style.asset.php
326 bytes
0644
add-to-cart-with-options-variation-selector-frontend.asset.php
147 bytes
0644
add-to-cart-with-options-variation-selector-frontend.js
389 bytes
0644
add-to-cart-with-options-variation-selector-rtl.css
96 bytes
0644
add-to-cart-with-options-variation-selector-style.asset.php
283 bytes
0644
add-to-cart-with-options-variation-selector.asset.php
263 bytes
0644
add-to-cart-with-options-variation-selector.css
96 bytes
0644
add-to-cart-with-options-variation-selector.js
6052 bytes
0644
add-to-cart-with-options.asset.php
306 bytes
0644
add-to-cart-with-options.css
1226 bytes
0644
add-to-cart-with-options.js
13910 bytes
0644
all-products-frontend.asset.php
531 bytes
0644
all-products-frontend.js
30921 bytes
0644
all-products-rtl.css
27637 bytes
0644
all-products-style.asset.php
548 bytes
0644
all-products-style.js.LICENSE.txt
188 bytes
0644
all-products.asset.php
548 bytes
0644
all-products.css
27627 bytes
0644
all-products.js
140783 bytes
0644
all-reviews-rtl.css
10572 bytes
0644
all-reviews-style.asset.php
313 bytes
0644
all-reviews-style.js.LICENSE.txt
188 bytes
0644
all-reviews.asset.php
313 bytes
0644
all-reviews.css
10572 bytes
0644
all-reviews.js
27306 bytes
0644
attribute-filter-frontend.asset.php
408 bytes
0644
attribute-filter-frontend.js
22663 bytes
0644
attribute-filter-rtl.css
29718 bytes
0644
attribute-filter-style.asset.php
427 bytes
0644
attribute-filter-style.js.LICENSE.txt
121 bytes
0644
attribute-filter-wrapper-frontend.js
19200 bytes
0644
attribute-filter-wrapper-rtl.css
8811 bytes
0644
attribute-filter-wrapper.css
8809 bytes
0644
attribute-filter.asset.php
427 bytes
0644
attribute-filter.css
29707 bytes
0644
attribute-filter.js
34955 bytes
0644
base-components-stock-filter-wrapper~attribute-filter-wrapper~rating-filter-wrapper-style.scss-rtl.css
20374 bytes
0644
base-components-stock-filter-wrapper~attribute-filter-wrapper~rating-filter-wrapper-style.scss.css
20365 bytes
0644
blockified-product-details-style.asset.php
170 bytes
0644
blockified-product-details.asset.php
170 bytes
0644
blockified-product-details.js
3196 bytes
0644
blocks-checkout-events.asset.php
109 bytes
0644
blocks-checkout-events.js
1668 bytes
0644
blocks-checkout.asset.php
456 bytes
0644
blocks-checkout.js
2631 bytes
0644
blocks-components.asset.php
373 bytes
0644
blocks-components.js
2451 bytes
0644
blocks-json.php
144395 bytes
0644
breadcrumbs-rtl.css
155 bytes
0644
breadcrumbs-style.asset.php
197 bytes
0644
breadcrumbs.asset.php
197 bytes
0644
breadcrumbs.css
155 bytes
0644
breadcrumbs.js
3941 bytes
0644
cart-frontend.asset.php
666 bytes
0644
cart-frontend.js
22831 bytes
0644
cart-link-rtl.css
1022 bytes
0644
cart-link-style.asset.php
197 bytes
0644
cart-link.asset.php
197 bytes
0644
cart-link.css
1020 bytes
0644
cart-link.js
9025 bytes
0644
cart-rtl.css
73790 bytes
0644
cart-style.asset.php
701 bytes
0644
cart-style.js.LICENSE.txt
188 bytes
0644
cart.asset.php
701 bytes
0644
cart.css
73780 bytes
0644
cart.js
169815 bytes
0644
catalog-sorting-rtl.css
357 bytes
0644
catalog-sorting-style.asset.php
197 bytes
0644
catalog-sorting.asset.php
197 bytes
0644
catalog-sorting.css
358 bytes
0644
catalog-sorting.js
4806 bytes
0644
checkout-frontend.asset.php
614 bytes
0644
checkout-frontend.js
31904 bytes
0644
checkout-rtl.css
86490 bytes
0644
checkout-style.asset.php
654 bytes
0644
checkout-style.js.LICENSE.txt
188 bytes
0644
checkout.asset.php
629 bytes
0644
checkout.css
86463 bytes
0644
checkout.js
202972 bytes
0644
classic-shortcode-rtl.css
114 bytes
0644
classic-shortcode-style.asset.php
222 bytes
0644
classic-shortcode.asset.php
222 bytes
0644
classic-shortcode.css
114 bytes
0644
classic-shortcode.js
11941 bytes
0644
coming-soon-rtl.css
2023 bytes
0644
coming-soon-style.asset.php
219 bytes
0644
coming-soon.asset.php
219 bytes
0644
coming-soon.css
2023 bytes
0644
coming-soon.js
7182 bytes
0644
customer-account-rtl.css
706 bytes
0644
customer-account-style.asset.php
212 bytes
0644
customer-account.asset.php
212 bytes
0644
customer-account.css
706 bytes
0644
customer-account.js
9307 bytes
0644
featured-category-rtl.css
4926 bytes
0644
featured-category-style.asset.php
355 bytes
0644
featured-category.asset.php
355 bytes
0644
featured-category.css
4926 bytes
0644
featured-category.js
45730 bytes
0644
featured-product-rtl.css
5342 bytes
0644
featured-product-style.asset.php
355 bytes
0644
featured-product.asset.php
355 bytes
0644
featured-product.css
5342 bytes
0644
featured-product.js
46181 bytes
0644
filter-wrapper-frontend.asset.php
490 bytes
0644
filter-wrapper-frontend.js
13807 bytes
0644
filter-wrapper-rtl.css
533 bytes
0644
filter-wrapper-style.asset.php
492 bytes
0644
filter-wrapper.asset.php
180 bytes
0644
filter-wrapper.css
533 bytes
0644
filter-wrapper.js
6931 bytes
0644
handpicked-products-style.asset.php
315 bytes
0644
handpicked-products.asset.php
315 bytes
0644
handpicked-products.js
26767 bytes
0644
interactivity-blocks-frontend-assets.php
2873 bytes
0644
legacy-template-rtl.css
112 bytes
0644
legacy-template-style.asset.php
253 bytes
0644
legacy-template.asset.php
253 bytes
0644
legacy-template.css
112 bytes
0644
legacy-template.js
24594 bytes
0644
mini-cart-component-frontend.asset.php
540 bytes
0644
mini-cart-component-frontend.js
20453 bytes
0644
mini-cart-contents-rtl.css
20427 bytes
0644
mini-cart-contents-style.asset.php
546 bytes
0644
mini-cart-contents-style.js.LICENSE.txt
188 bytes
0644
mini-cart-contents.asset.php
513 bytes
0644
mini-cart-contents.css
20428 bytes
0644
mini-cart-contents.js
62035 bytes
0644
mini-cart-frontend.asset.php
242 bytes
0644
mini-cart-frontend.js
5799 bytes
0644
mini-cart-rtl.css
12259 bytes
0644
mini-cart-style.asset.php
374 bytes
0644
mini-cart.asset.php
276 bytes
0644
mini-cart.css
12257 bytes
0644
mini-cart.js
19585 bytes
0644
order-confirmation-additional-fields-rtl.css
2014 bytes
0644
order-confirmation-additional-fields-style.asset.php
195 bytes
0644
order-confirmation-additional-fields-wrapper-rtl.css
80 bytes
0644
order-confirmation-additional-fields-wrapper-style.asset.php
195 bytes
0644
order-confirmation-additional-fields-wrapper.asset.php
195 bytes
0644
order-confirmation-additional-fields-wrapper.css
80 bytes
0644
order-confirmation-additional-fields-wrapper.js
5537 bytes
0644
order-confirmation-additional-fields.asset.php
195 bytes
0644
order-confirmation-additional-fields.css
2014 bytes
0644
order-confirmation-additional-fields.js
5737 bytes
0644
order-confirmation-additional-information-rtl.css
172 bytes
0644
order-confirmation-additional-information-style.asset.php
180 bytes
0644
order-confirmation-additional-information.asset.php
180 bytes
0644
order-confirmation-additional-information.css
172 bytes
0644
order-confirmation-additional-information.js
3512 bytes
0644
order-confirmation-billing-address-rtl.css
1617 bytes
0644
order-confirmation-billing-address-style.asset.php
195 bytes
0644
order-confirmation-billing-address.asset.php
195 bytes
0644
order-confirmation-billing-address.css
1617 bytes
0644
order-confirmation-billing-address.js
6271 bytes
0644
order-confirmation-billing-wrapper-style.asset.php
180 bytes
0644
order-confirmation-billing-wrapper.asset.php
180 bytes
0644
order-confirmation-billing-wrapper.js
3352 bytes
0644
order-confirmation-create-account-frontend.asset.php
287 bytes
0644
order-confirmation-create-account-frontend.js
13326 bytes
0644
order-confirmation-create-account-rtl.css
9360 bytes
0644
order-confirmation-create-account-style.asset.php
323 bytes
0644
order-confirmation-create-account.asset.php
323 bytes
0644
order-confirmation-create-account.css
9357 bytes
0644
order-confirmation-create-account.js
13811 bytes
0644
order-confirmation-downloads-rtl.css
1561 bytes
0644
order-confirmation-downloads-style.asset.php
197 bytes
0644
order-confirmation-downloads-wrapper-style.asset.php
195 bytes
0644
order-confirmation-downloads-wrapper.asset.php
195 bytes
0644
order-confirmation-downloads-wrapper.js
3556 bytes
0644
order-confirmation-downloads.asset.php
197 bytes
0644
order-confirmation-downloads.css
1561 bytes
0644
order-confirmation-downloads.js
5551 bytes
0644
order-confirmation-shipping-address-rtl.css
2187 bytes
0644
order-confirmation-shipping-address-style.asset.php
195 bytes
0644
order-confirmation-shipping-address.asset.php
195 bytes
0644
order-confirmation-shipping-address.css
2187 bytes
0644
order-confirmation-shipping-address.js
6274 bytes
0644
order-confirmation-shipping-wrapper-style.asset.php
180 bytes
0644
order-confirmation-shipping-wrapper.asset.php
180 bytes
0644
order-confirmation-shipping-wrapper.js
3379 bytes
0644
order-confirmation-status-rtl.css
824 bytes
0644
order-confirmation-status-style.asset.php
180 bytes
0644
order-confirmation-status.asset.php
180 bytes
0644
order-confirmation-status.css
825 bytes
0644
order-confirmation-status.js
3733 bytes
0644
order-confirmation-summary-rtl.css
913 bytes
0644
order-confirmation-summary-style.asset.php
242 bytes
0644
order-confirmation-summary.asset.php
242 bytes
0644
order-confirmation-summary.css
913 bytes
0644
order-confirmation-summary.js
5589 bytes
0644
order-confirmation-totals-rtl.css
1996 bytes
0644
order-confirmation-totals-style.asset.php
216 bytes
0644
order-confirmation-totals-wrapper-style.asset.php
180 bytes
0644
order-confirmation-totals-wrapper.asset.php
180 bytes
0644
order-confirmation-totals-wrapper.js
4061 bytes
0644
order-confirmation-totals.asset.php
216 bytes
0644
order-confirmation-totals.css
1995 bytes
0644
order-confirmation-totals.js
6420 bytes
0644
packages-style-rtl.css
42214 bytes
0644
packages-style-style.asset.php
378 bytes
0644
packages-style-style.js.LICENSE.txt
1698 bytes
0644
packages-style.css
42203 bytes
0644
page-content-wrapper-style.asset.php
195 bytes
0644
page-content-wrapper.asset.php
195 bytes
0644
page-content-wrapper.js
5451 bytes
0644
price-filter-frontend.asset.php
299 bytes
0644
price-filter-frontend.js
21667 bytes
0644
price-filter-rtl.css
18201 bytes
0644
price-filter-style.asset.php
349 bytes
0644
price-filter-wrapper-frontend.js
17805 bytes
0644
price-filter-wrapper-rtl.css
17668 bytes
0644
price-filter-wrapper.css
17649 bytes
0644
price-filter.asset.php
349 bytes
0644
price-filter.css
18182 bytes
0644
price-filter.js
23538 bytes
0644
price-format.asset.php
132 bytes
0644
price-format.js
1669 bytes
0644
product-average-rating-frontend.js
2766 bytes
0644
product-average-rating.js
2945 bytes
0644
product-best-sellers-style.asset.php
315 bytes
0644
product-best-sellers.asset.php
315 bytes
0644
product-best-sellers.js
26149 bytes
0644
product-button-frontend.js
10886 bytes
0644
product-button-rtl.css
3588 bytes
0644
product-button.css
3587 bytes
0644
product-button.js
12307 bytes
0644
product-categories-rtl.css
1757 bytes
0644
product-categories-style.asset.php
233 bytes
0644
product-categories.asset.php
233 bytes
0644
product-categories.css
1757 bytes
0644
product-categories.js
7588 bytes
0644
product-category-style.asset.php
315 bytes
0644
product-category.asset.php
315 bytes
0644
product-category.js
30227 bytes
0644
product-collection-no-results-style.asset.php
166 bytes
0644
product-collection-no-results.asset.php
166 bytes
0644
product-collection-no-results.js
3793 bytes
0644
product-collection-rtl.css
232 bytes
0644
product-collection-style.asset.php
493 bytes
0644
product-collection.asset.php
446 bytes
0644
product-collection.css
232 bytes
0644
product-collection.js
91072 bytes
0644
product-details-rtl.css
2213 bytes
0644
product-details-style.asset.php
220 bytes
0644
product-details.css
2211 bytes
0644
product-filter-active-rtl.css
516 bytes
0644
product-filter-active-style.asset.php
201 bytes
0644
product-filter-active.asset.php
181 bytes
0644
product-filter-active.css
516 bytes
0644
product-filter-active.js
3246 bytes
0644
product-filter-attribute-rtl.css
977 bytes
0644
product-filter-attribute-style.asset.php
302 bytes
0644
product-filter-attribute.asset.php
282 bytes
0644
product-filter-attribute.css
978 bytes
0644
product-filter-attribute.js
16772 bytes
0644
product-filter-checkbox-list-frontend.asset.php
147 bytes
0644
product-filter-checkbox-list-frontend.js
413 bytes
0644
product-filter-checkbox-list-rtl.css
1830 bytes
0644
product-filter-checkbox-list-style.asset.php
232 bytes
0644
product-filter-checkbox-list.asset.php
212 bytes
0644
product-filter-checkbox-list.css
1828 bytes
0644
product-filter-checkbox-list.js
7853 bytes
0644
product-filter-chips-frontend.asset.php
147 bytes
0644
product-filter-chips-frontend.js
397 bytes
0644
product-filter-chips-rtl.css
1568 bytes
0644
product-filter-chips-style.asset.php
215 bytes
0644
product-filter-chips.asset.php
195 bytes
0644
product-filter-chips.css
1568 bytes
0644
product-filter-chips.js
8250 bytes
0644
product-filter-clear-button-style.asset.php
181 bytes
0644
product-filter-clear-button.asset.php
181 bytes
0644
product-filter-clear-button.js
3447 bytes
0644
product-filter-price-rtl.css
516 bytes
0644
product-filter-price-slider-frontend.asset.php
147 bytes
0644
product-filter-price-slider-frontend.js
1204 bytes
0644
product-filter-price-slider-rtl.css
6602 bytes
0644
product-filter-price-slider-style.asset.php
222 bytes
0644
product-filter-price-slider.asset.php
202 bytes
0644
product-filter-price-slider.css
6589 bytes
0644
product-filter-price-slider.js
6960 bytes
0644
product-filter-price-style.asset.php
304 bytes
0644
product-filter-price.asset.php
284 bytes
0644
product-filter-price.css
516 bytes
0644
product-filter-price.js
9155 bytes
0644
product-filter-rating-rtl.css
4306 bytes
0644
product-filter-rating-style.asset.php
312 bytes
0644
product-filter-rating.asset.php
292 bytes
0644
product-filter-rating.css
4303 bytes
0644
product-filter-rating.js
12996 bytes
0644
product-filter-removable-chips-rtl.css
1714 bytes
0644
product-filter-removable-chips-style.asset.php
256 bytes
0644
product-filter-removable-chips.asset.php
236 bytes
0644
product-filter-removable-chips.css
1714 bytes
0644
product-filter-removable-chips.js
7408 bytes
0644
product-filter-status-rtl.css
822 bytes
0644
product-filter-status-style.asset.php
302 bytes
0644
product-filter-status.asset.php
282 bytes
0644
product-filter-status.css
822 bytes
0644
product-filter-status.js
10085 bytes
0644
product-filters-rtl.css
4863 bytes
0644
product-filters-style.asset.php
242 bytes
0644
product-filters.asset.php
195 bytes
0644
product-filters.css
4863 bytes
0644
product-filters.js
6526 bytes
0644
product-gallery-large-image-next-previous-style.asset.php
155 bytes
0644
product-gallery-large-image-next-previous.asset.php
155 bytes
0644
product-gallery-large-image-next-previous.js
6273 bytes
0644
product-gallery-large-image-style.asset.php
187 bytes
0644
product-gallery-large-image.asset.php
167 bytes
0644
product-gallery-large-image.js
6303 bytes
0644
product-gallery-pager-style.asset.php
138 bytes
0644
product-gallery-pager.asset.php
138 bytes
0644
product-gallery-pager.js
1743 bytes
0644
product-gallery-rtl.css
9396 bytes
0644
product-gallery-style.asset.php
241 bytes
0644
product-gallery-thumbnails-style.asset.php
181 bytes
0644
product-gallery-thumbnails.asset.php
181 bytes
0644
product-gallery-thumbnails.js
5224 bytes
0644
product-gallery.asset.php
221 bytes
0644
product-gallery.css
9395 bytes
0644
product-gallery.js
19001 bytes
0644
product-image-frontend.js
5704 bytes
0644
product-image-gallery-rtl.css
408 bytes
0644
product-image-gallery-style.asset.php
210 bytes
0644
product-image-gallery.css
408 bytes
0644
product-image-rtl.css
3732 bytes
0644
product-image.css
3732 bytes
0644
product-image.js
6772 bytes
0644
product-new-style.asset.php
315 bytes
0644
product-new.asset.php
315 bytes
0644
product-new.js
28314 bytes
0644
product-on-sale-style.asset.php
315 bytes
0644
product-on-sale.asset.php
315 bytes
0644
product-on-sale.js
27505 bytes
0644
product-price-frontend.js
6367 bytes
0644
product-price-rtl.css
1605 bytes
0644
product-price.css
1603 bytes
0644
product-price.js
6660 bytes
0644
product-query-rtl.css
444 bytes
0644
product-query-style.asset.php
325 bytes
0644
product-query.asset.php
325 bytes
0644
product-query.css
443 bytes
0644
product-query.js
40881 bytes
0644
product-rating-counter-frontend.js
3601 bytes
0644
product-rating-counter.js
3779 bytes
0644
product-rating-frontend.js
5452 bytes
0644
product-rating-rtl.css
217 bytes
0644
product-rating-stars-frontend.js
5395 bytes
0644
product-rating-stars-rtl.css
2904 bytes
0644
product-rating-stars.css
2902 bytes
0644
product-rating-stars.js
5599 bytes
0644
product-rating.css
217 bytes
0644
product-rating.js
5655 bytes
0644
product-results-count-rtl.css
112 bytes
0644
product-results-count-style.asset.php
180 bytes
0644
product-results-count.asset.php
180 bytes
0644
product-results-count.css
112 bytes
0644
product-results-count.js
3846 bytes
0644
product-reviews-rtl.css
916 bytes
0644
product-reviews-style.asset.php
204 bytes
0644
product-reviews.css
917 bytes
0644
product-sale-badge-frontend.js
3073 bytes
0644
product-sale-badge-rtl.css
743 bytes
0644
product-sale-badge.css
743 bytes
0644
product-sale-badge.js
3277 bytes
0644
product-search-rtl.css
958 bytes
0644
product-search-style.asset.php
261 bytes
0644
product-search.asset.php
261 bytes
0644
product-search.css
957 bytes
0644
product-search.js
9999 bytes
0644
product-sku-frontend.js
3702 bytes
0644
product-sku-rtl.css
312 bytes
0644
product-sku.css
312 bytes
0644
product-sku.js
3906 bytes
0644
product-stock-indicator-frontend.js
4756 bytes
0644
product-stock-indicator-rtl.css
110 bytes
0644
product-stock-indicator.css
110 bytes
0644
product-stock-indicator.js
4959 bytes
0644
product-summary-frontend.js
5125 bytes
0644
product-summary-rtl.css
1411 bytes
0644
product-summary.css
1410 bytes
0644
product-summary.js
5329 bytes
0644
product-tag-style.asset.php
309 bytes
0644
product-tag.asset.php
309 bytes
0644
product-tag.js
27792 bytes
0644
product-template-rtl.css
1913 bytes
0644
product-template-style.asset.php
302 bytes
0644
product-template.asset.php
302 bytes
0644
product-template.css
1913 bytes
0644
product-template.js
11863 bytes
0644
product-title-frontend.js
3985 bytes
0644
product-title-rtl.css
1572 bytes
0644
product-title.css
1571 bytes
0644
product-title.js
4857 bytes
0644
product-top-rated-style.asset.php
315 bytes
0644
product-top-rated.asset.php
315 bytes
0644
product-top-rated.js
27732 bytes
0644
products-by-attribute-style.asset.php
338 bytes
0644
products-by-attribute.asset.php
338 bytes
0644
products-by-attribute.js
29463 bytes
0644
rating-filter-frontend.asset.php
388 bytes
0644
rating-filter-frontend.js
19243 bytes
0644
rating-filter-rtl.css
30624 bytes
0644
rating-filter-style.asset.php
407 bytes
0644
rating-filter-style.js.LICENSE.txt
121 bytes
0644
rating-filter-wrapper-frontend.js
14989 bytes
0644
rating-filter-wrapper-rtl.css
9717 bytes
0644
rating-filter-wrapper.css
9712 bytes
0644
rating-filter.asset.php
407 bytes
0644
rating-filter.css
30610 bytes
0644
rating-filter.js
17121 bytes
0644
reviews-by-category-rtl.css
10572 bytes
0644
reviews-by-category-style.asset.php
337 bytes
0644
reviews-by-category-style.js.LICENSE.txt
188 bytes
0644
reviews-by-category.asset.php
337 bytes
0644
reviews-by-category.css
10572 bytes
0644
reviews-by-category.js
41084 bytes
0644
reviews-by-product-rtl.css
10572 bytes
0644
reviews-by-product-style.asset.php
349 bytes
0644
reviews-by-product-style.js.LICENSE.txt
188 bytes
0644
reviews-by-product.asset.php
349 bytes
0644
reviews-by-product.css
10572 bytes
0644
reviews-by-product.js
45420 bytes
0644
reviews-frontend.asset.php
270 bytes
0644
reviews-frontend.js
22728 bytes
0644
single-product-rtl.css
533 bytes
0644
single-product-style.asset.php
554 bytes
0644
single-product.asset.php
554 bytes
0644
single-product.css
533 bytes
0644
single-product.js
36016 bytes
0644
stock-filter-frontend.asset.php
408 bytes
0644
stock-filter-frontend.js
19623 bytes
0644
stock-filter-rtl.css
28578 bytes
0644
stock-filter-style.asset.php
427 bytes
0644
stock-filter-style.js.LICENSE.txt
121 bytes
0644
stock-filter-wrapper-frontend.js
15537 bytes
0644
stock-filter-wrapper-rtl.css
7671 bytes
0644
stock-filter-wrapper.css
7669 bytes
0644
stock-filter.asset.php
427 bytes
0644
stock-filter.css
28567 bytes
0644
stock-filter.js
18935 bytes
0644
store-notices-rtl.css
6305 bytes
0644
store-notices-style.asset.php
229 bytes
0644
store-notices.asset.php
229 bytes
0644
store-notices.css
6303 bytes
0644
store-notices.js
6161 bytes
0644
wc-blocks-classic-template-revert-button-style-rtl.css
217 bytes
0644
wc-blocks-classic-template-revert-button-style-style.asset.php
234 bytes
0644
wc-blocks-classic-template-revert-button-style.css
217 bytes
0644
wc-blocks-classic-template-revert-button.asset.php
234 bytes
0644
wc-blocks-classic-template-revert-button.js
2558 bytes
0644
wc-blocks-data.asset.php
353 bytes
0644
wc-blocks-data.js
82190 bytes
0644
wc-blocks-editor-style-rtl.css
61487 bytes
0644
wc-blocks-editor-style.css
61472 bytes
0644
wc-blocks-frontend-vendors-frontend.asset.php
97 bytes
0644
wc-blocks-frontend-vendors-frontend.js
115113 bytes
0644
wc-blocks-google-analytics.asset.php
120 bytes
0644
wc-blocks-google-analytics.js
3153 bytes
0644
wc-blocks-middleware.asset.php
123 bytes
0644
wc-blocks-middleware.js
1896 bytes
0644
wc-blocks-registry.asset.php
175 bytes
0644
wc-blocks-registry.js
20897 bytes
0644
wc-blocks-rtl.css
12614 bytes
0644
wc-blocks-shared-context.asset.php
120 bytes
0644
wc-blocks-shared-context.js
1889 bytes
0644
wc-blocks-shared-hocs.asset.php
218 bytes
0644
wc-blocks-shared-hocs.js
3213 bytes
0644
wc-blocks-style.asset.php
255 bytes
0644
wc-blocks-vendors.asset.php
97 bytes
0644
wc-blocks-vendors.js
129358 bytes
0644
wc-blocks.asset.php
255 bytes
0644
wc-blocks.css
12613 bytes
0644
wc-blocks.js
10128 bytes
0644
wc-cart-checkout-base-frontend.asset.php
97 bytes
0644
wc-cart-checkout-base-frontend.js
205717 bytes
0644
wc-cart-checkout-vendors-frontend.asset.php
97 bytes
0644
wc-cart-checkout-vendors-frontend.js
159129 bytes
0644
wc-interactivity.asset.php
97 bytes
0644
wc-interactivity.js
35695 bytes
0644
wc-payment-method-bacs.asset.php
188 bytes
0644
wc-payment-method-bacs.js
23233 bytes
0644
wc-payment-method-cheque.asset.php
188 bytes
0644
wc-payment-method-cheque.js
23230 bytes
0644
wc-payment-method-cod.asset.php
188 bytes
0644
wc-payment-method-cod.js
23466 bytes
0644
wc-payment-method-paypal.asset.php
188 bytes
0644
wc-payment-method-paypal.js
23301 bytes
0644
wc-schema-parser.asset.php
97 bytes
0644
wc-schema-parser.js
129571 bytes
0644
wc-settings.asset.php
109 bytes
0644
wc-settings.js
4566 bytes
0644
wc-shipping-method-pickup-location.asset.php
256 bytes
0644
wc-shipping-method-pickup-location.js
85677 bytes
0644
wc-types.asset.php
97 bytes
0644
wc-types.js
3693 bytes
0644
N4ST4R_ID | Naxtarrr