Current File : /home/mdkeenpw/www/wp-content/plugins/woocommerce/assets/client/blocks/mini-cart-contents.js
(()=>{var e,t,r,o={1969:(e,t,r)=>{"use strict";const o=window.wp.blocks,c=window.wp.blockEditor;var s=r(6087);const i=window.wp.data;var n=r(790);const a=(0,s.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>({})}),l=()=>(0,s.useContext)(a),m=({children:e,currentPostId:t=0,previewData:r={},currentView:o="",isPreview:c=!1})=>{const l=(0,i.useSelect)((e=>t||e("core/editor").getCurrentPostId()),[t]),m=(0,s.useCallback)(((e,t={})=>r&&e in r?r[e]:t),[r]),d={isEditor:!0,currentPostId:l,currentView:o,previewData:r,getPreviewData:m,isPreview:c};return(0,n.jsx)(a.Provider,{value:d,children:e})};var d=r(7723);const u=window.wp.components,p=({clientId:e,registeredBlocks:t,defaultTemplate:r=[]})=>{const c=(0,s.useRef)(t),n=(0,s.useRef)(r),a=(0,i.useRegistry)(),{isPreview:m}=l();(0,s.useEffect)((()=>{let t=!1;if(m)return;const{replaceInnerBlocks:r}=(0,i.dispatch)("core/block-editor");return a.subscribe((()=>{if(!a.select("core/block-editor").getBlock(e))return;const s=a.select("core/block-editor").getBlocks(e);if(0===s.length&&n.current.length>0&&!t){const c=(0,o.createBlocksFromInnerBlocksTemplate)(n.current);if(0!==c.length)return t=!0,void r(e,c)}const i=c.current.map((e=>(0,o.getBlockType)(e))),l=((e,t)=>{const r=t.filter((e=>e&&(({attributes:e})=>Boolean(e.lock?.remove||e.lock?.default?.remove))(e))),o=[];return r.forEach((t=>{if(void 0===t)return;const r=e.find((e=>e.name===t.name));r||o.push(t)})),o})(s,i);if(0===l.length)return;let m=-1;const d=l.map((e=>{const t=n.current.findIndex((([t])=>t===e.name)),r=(0,o.createBlock)(e.name);return-1===m&&(m=(({defaultTemplatePosition:e,innerBlocks:t,currentDefaultTemplate:r})=>{switch(e){case-1:return t.length;case 0:return 0;default:const o=r.current[e-1],c=t.findIndex((({name:e})=>e===o[0]));return-1===c?e:c+1}})({defaultTemplatePosition:t,innerBlocks:s,currentDefaultTemplate:n})),r}));a.batch((()=>{a.dispatch("core/block-editor").insertBlocks(d,m,e)}))}),"core/block-editor")}),[e,m,a])},_=({style:e})=>{const t=[{selector:".wc-block-mini-cart__footer .wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-checkout",properties:[{property:"color",value:e.backgroundColor},{property:"background-color",value:e.color},{property:"border-color",value:e.color}]}].map((({selector:e,properties:t})=>{const r=t.filter((({value:e})=>e)).map((({property:e,value:t})=>`${e}: ${t};`)).join("");return r?`${e} { ${r} }`:""})).join("").trim();return t?(0,n.jsxs)("style",{children:[t," "]}):(0,n.jsx)(n.Fragment,{})};r(6126);var h=r(4530),w=r(5573);const g=(0,n.jsxs)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,n.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,n.jsx)("path",{d:"M0 0h24v24H0z"}),(0,n.jsx)("path",{fill:"currentColor",fillRule:"nonzero",d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49A.996.996 0 0 0 20.01 4H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45ZM7 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"})]})," "]}),b=(0,n.jsxs)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,n.jsx)("path",{d:"M22.7 22.7l-20-20L2 2l-.7-.7L0 2.5 4.4 7l2.2 4.7L5.2 14A2 2 0 007 17h7.5l1.3 1.4a2 2 0 102.8 2.8l2.9 2.8 1.2-1.3zM7.4 15a.2.2 0 01-.2-.3l.9-1.7h2.4l2 2h-5zm8.2-2a2 2 0 001.7-1l3.6-6.5.1-.5c0-.6-.4-1-1-1H6.5l9 9zM7 18a2 2 0 100 4 2 2 0 000-4z"}),(0,n.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"})]}),y={isPreview:{type:"boolean",default:!1},lock:{type:"object",default:{remove:!0,move:!0}},currentView:{type:"string",default:"woocommerce/filled-mini-cart-contents-block",source:"readonly"},editorViews:{type:"object",default:[{view:"woocommerce/filled-mini-cart-contents-block",label:(0,d.__)("Filled Mini-Cart","woocommerce"),icon:(0,n.jsx)(h.A,{icon:g})},{view:"woocommerce/empty-mini-cart-contents-block",label:(0,d.__)("Empty Mini-Cart","woocommerce"),icon:(0,n.jsx)(h.A,{icon:b})}]},width:{type:"string",default:"480px"}},k=["woocommerce/filled-mini-cart-contents-block","woocommerce/empty-mini-cart-contents-block"],v=["woocommerce/mini-cart","woocommerce/checkout","woocommerce/cart","woocommerce/single-product","woocommerce/cart-totals-block","woocommerce/checkout-fields-block","core/post-template","core/comment-template","core/query-pagination","core/comments-query-loop","core/post-comments-form","core/post-comments-link","core/post-comments-count","core/comments-pagination","core/post-navigation-link","core/button"],f=()=>(0,o.getBlockTypes)().filter((e=>!(v.includes(e.name)||e.parent&&e.parent.filter((e=>v.includes(e))).length>0))).map((({name:e})=>e));(0,o.registerBlockType)("woocommerce/empty-mini-cart-contents-block",{icon:{src:(0,n.jsx)(h.A,{icon:b,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=(0,c.useBlockProps)(),{currentView:t}=l();return(0,n.jsx)("div",{...e,hidden:"woocommerce/empty-mini-cart-contents-block"!==t,children:(0,n.jsx)(c.InnerBlocks,{allowedBlocks:f(),renderAppender:c.InnerBlocks.ButtonBlockAppender})})},save:()=>(0,n.jsx)("div",{...c.useBlockProps.save(),children:(0,n.jsx)(c.InnerBlocks.Content,{})})});const x=window.wc.blocksCheckout,j=window.wc.wcSettings,P=(0,j.getSetting)("wcBlocksConfig",{pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),C=P.pluginUrl+"assets/images/",S=(P.pluginUrl,j.STORE_PAGES.shop,j.STORE_PAGES.checkout,j.STORE_PAGES.checkout,j.STORE_PAGES.privacy,j.STORE_PAGES.privacy,j.STORE_PAGES.terms,j.STORE_PAGES.terms,j.STORE_PAGES.cart,j.STORE_PAGES.cart,j.STORE_PAGES.myaccount?.permalink?j.STORE_PAGES.myaccount.permalink:(0,j.getSetting)("wpLoginUrl","/wp-login.php"),(0,j.getSetting)("localPickupEnabled",!1),(0,j.getSetting)("shippingMethodsExist",!1),(0,j.getSetting)("shippingEnabled",!0)),E=(0,j.getSetting)("countries",{}),N=(0,j.getSetting)("countryData",{}),A={...Object.fromEntries(Object.keys(N).filter((e=>!0===N[e].allowBilling)).map((e=>[e,E[e]||""]))),...Object.fromEntries(Object.keys(N).filter((e=>!0===N[e].allowShipping)).map((e=>[e,E[e]||""])))},B=(Object.fromEntries(Object.keys(A).map((e=>[e,N[e].states||{}]))),Object.fromEntries(Object.keys(A).map((e=>[e,N[e].locale||{}])))),T={address:["first_name","last_name","company","address_1","address_2","city","postcode","country","state","phone"],contact:["email"],order:[]},I=(0,j.getSetting)("addressFieldsLocations",T).address,R=((0,j.getSetting)("addressFieldsLocations",T).contact,(0,j.getSetting)("addressFieldsLocations",T).order,(0,j.getSetting)("additionalOrderFields",{}),(0,j.getSetting)("additionalContactFields",{}),(0,j.getSetting)("additionalAddressFields",{}),{currency_code:j.SITE_CURRENCY.code,currency_symbol:j.SITE_CURRENCY.symbol,currency_minor_unit:j.SITE_CURRENCY.minorUnit,currency_decimal_separator:j.SITE_CURRENCY.decimalSeparator,currency_thousand_separator:j.SITE_CURRENCY.thousandSeparator,currency_prefix:j.SITE_CURRENCY.prefix,currency_suffix:j.SITE_CURRENCY.suffix}),M=(e,t=2)=>{const r=j.SITE_CURRENCY.minorUnit;if(r===t||!e)return e;const o=Math.pow(10,r);return(Math.round(parseInt(e,10)/Math.pow(10,t))*o).toString()},L=(0,j.getSetting)("localPickupEnabled",!1),O=(0,j.getSetting)("localPickupText",(0,d.__)("Local pickup","woocommerce")),D=(0,j.getSetting)("localPickupCost",""),q=L?(0,j.getSetting)("localPickupLocations",[]):[],F=q?Object.values(q).map(((e,t)=>({...R,name:`${O} (${e.name})`,description:"",delivery_time:"",price:M(D,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}))):[],V=[{destination:{address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},package_id:0,name:(0,d.__)("Shipping","woocommerce"),items:[{key:"33e75ff09dd601bbe69f351039152189",name:(0,d._x)("Beanie with Logo","example product in Cart Block","woocommerce"),quantity:2},{key:"6512bd43d9caa6e02c990b0a82652dca",name:(0,d._x)("Beanie","example product in Cart Block","woocommerce"),quantity:1}],shipping_rates:[{...R,name:(0,d.__)("Flat rate shipping","woocommerce"),description:"",delivery_time:"",price:M("500"),taxes:"0",rate_id:"flat_rate:0",instance_id:0,meta_data:[],method_id:"flat_rate",selected:!1},{...R,name:(0,d.__)("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},...F]}],z=(0,j.getSetting)("displayCartPricesIncludingTax",!1),H={coupons:[],shipping_rates:(0,j.getSetting)("shippingMethodsExist",!1)||(0,j.getSetting)("localPickupEnabled",!1)?V:[],items:[{key:"1",id:1,type:"simple",quantity:2,catalog_visibility:"visible",name:(0,d.__)("Beanie","woocommerce"),summary:(0,d.__)("Beanie","woocommerce"),short_description:(0,d.__)("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:C+"previews/beanie.jpg",thumbnail:C+"previews/beanie.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:(0,d.__)("Color","woocommerce"),value:(0,d.__)("Yellow","woocommerce")},{attribute:(0,d.__)("Size","woocommerce"),value:(0,d.__)("Small","woocommerce")}],prices:{...R,price:M(z?"12000":"10000"),regular_price:M(z?"120":"100"),sale_price:M(z?"12000":"10000"),price_range:null,raw_prices:{precision:6,price:z?"12000000":"10000000",regular_price:z?"12000000":"10000000",sale_price:z?"12000000":"10000000"}},totals:{...R,line_subtotal:M("2000"),line_subtotal_tax:M("400"),line_total:M("2000"),line_total_tax:M("400")},extensions:{},item_data:[]},{key:"2",id:2,type:"simple",quantity:1,catalog_visibility:"visible",name:(0,d.__)("Cap","woocommerce"),summary:(0,d.__)("Cap","woocommerce"),short_description:(0,d.__)("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:C+"previews/cap.jpg",thumbnail:C+"previews/cap.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:(0,d.__)("Color","woocommerce"),value:(0,d.__)("Orange","woocommerce")}],prices:{...R,price:M(z?"2400":"2000"),regular_price:M(z?"2400":"2000"),sale_price:M(z?"2400":"2000"),price_range:null,raw_prices:{precision:6,price:z?"24000000":"20000000",regular_price:z?"24000000":"20000000",sale_price:z?"24000000":"20000000"}},totals:{...R,line_subtotal:M("2000"),line_subtotal_tax:M("400"),line_total:M("2000"),line_total_tax:M("400")},extensions:{},item_data:[]}],cross_sells:[{id:1,name:(0,d.__)("Polo","woocommerce"),slug:"polo",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-polo",short_description:(0,d.__)("Polo","woocommerce"),description:(0,d.__)("Polo","woocommerce"),on_sale:!1,prices:{...R,price:M(z?"24000":"20000"),regular_price:M(z?"24000":"20000"),sale_price:M(z?"12000":"10000"),price_range:null},price_html:"",average_rating:"4.5",review_count:2,images:[{id:17,src:C+"previews/polo.jpg",thumbnail:C+"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,d.__)("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,d.__)("Long Sleeve Tee","woocommerce"),description:(0,d.__)("Long Sleeve Tee","woocommerce"),on_sale:!1,prices:{...R,price:M(z?"30000":"25000"),regular_price:M(z?"30000":"25000"),sale_price:M(z?"30000":"25000"),price_range:null},price_html:"",average_rating:"4",review_count:2,images:[{id:17,src:C+"previews/long-sleeve-tee.jpg",thumbnail:C+"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,d.__)("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,d.__)("Hoodie with Zipper","woocommerce"),description:(0,d.__)("Hoodie with Zipper","woocommerce"),on_sale:!0,prices:{...R,price:M(z?"15000":"12500"),regular_price:M(z?"30000":"25000"),sale_price:M(z?"15000":"12500"),price_range:null},price_html:"",average_rating:"1",review_count:2,images:[{id:17,src:C+"previews/hoodie-with-zipper.jpg",thumbnail:C+"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,d.__)("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,d.__)("Polo","woocommerce"),description:(0,d.__)("Polo","woocommerce"),on_sale:!1,prices:{...R,price:M(z?"4500":"4250"),regular_price:M(z?"4500":"4250"),sale_price:M(z?"4500":"4250"),price_range:null},price_html:"",average_rating:"5",review_count:2,images:[{id:17,src:C+"previews/hoodie-with-logo.jpg",thumbnail:C+"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,d.__)("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,d.__)("Hoodie with Pocket","woocommerce"),description:(0,d.__)("Hoodie with Pocket","woocommerce"),on_sale:!0,prices:{...R,price:M(z?"3500":"3250"),regular_price:M(z?"4500":"4250"),sale_price:M(z?"3500":"3250"),price_range:null},price_html:"",average_rating:"3.75",review_count:4,images:[{id:17,src:C+"previews/hoodie-with-pocket.jpg",thumbnail:C+"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,d.__)("T-Shirt","woocommerce"),slug:"t-shirt",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-t-shirt",short_description:(0,d.__)("T-Shirt","woocommerce"),description:(0,d.__)("T-Shirt","woocommerce"),on_sale:!1,prices:{...R,price:M(z?"1800":"1500"),regular_price:M(z?"1800":"1500"),sale_price:M(z?"1800":"1500"),price_range:null},price_html:"",average_rating:"3",review_count:2,images:[{id:17,src:C+"previews/tshirt.jpg",thumbnail:C+"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,d.__)("Fee","woocommerce"),totals:{...R,total:M("100"),total_tax:M("20")}}],items_count:3,items_weight:0,needs_payment:!0,needs_shipping:S,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:{...R,total_items:M("4000"),total_items_tax:M("800"),total_fees:M("100"),total_fees_tax:M("20"),total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:M("820"),total_price:M("4920"),tax_lines:[{name:(0,d.__)("Sales tax","woocommerce"),rate:"20%",price:M("820")}]},errors:[],payment_methods:["cod","bacs","cheque"],payment_requirements:["products"],extensions:{}},U=window.wc.wcBlocksData,Y=["core/paragraph","core/image","core/separator"];(0,o.registerBlockType)("woocommerce/filled-mini-cart-contents-block",{icon:{src:(0,n.jsx)(h.A,{icon:g,className:"wc-block-editor-components-block-icon"})},edit:({clientId:e})=>{const t=(0,c.useBlockProps)(),r=(e=>{const t=(0,x.applyCheckoutFilter)({filterName:"additionalCartCheckoutInnerBlockTypes",defaultValue:[],extensions:(0,i.select)(U.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,o.getBlockTypes)().filter((t=>(t?.parent||[]).includes(e))).map((({name:e})=>e)),...Y,...t]))})(x.innerBlockAreas.FILLED_MINI_CART),{currentView:s}=l(),a=[["woocommerce/mini-cart-title-block",{}],["woocommerce/mini-cart-items-block",{}],["woocommerce/mini-cart-footer-block",{}]].filter(Boolean);return p({clientId:e,registeredBlocks:r,defaultTemplate:a}),(0,n.jsx)("div",{...t,hidden:"woocommerce/filled-mini-cart-contents-block"!==s,children:(0,n.jsx)(m,{currentView:s,previewData:{previewCart:H},children:(0,n.jsx)(c.InnerBlocks,{template:a,allowedBlocks:r,templateLock:"insert"})})})},save:()=>(0,n.jsx)("div",{...c.useBlockProps.save(),children:(0,n.jsx)(c.InnerBlocks.Content,{})})});var $=r(8992);(0,o.registerBlockType)("woocommerce/mini-cart-title-block",{icon:{src:(0,n.jsx)(h.A,{icon:$.A,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=(0,c.useBlockProps)({className:"wc-block-mini-cart__title"});return(0,n.jsx)("h2",{...e,children:(0,n.jsx)(c.InnerBlocks,{allowedBlocks:["woocommerce/mini-cart-title-label-block","woocommerce/mini-cart-title-items-counter-block"],template:[["woocommerce/mini-cart-title-label-block",{}],["woocommerce/mini-cart-title-items-counter-block",{}]],templateLock:"all"})})},save:()=>(0,n.jsx)("div",{...c.useBlockProps.save(),children:(0,n.jsx)(c.InnerBlocks.Content,{})})});var G=r(1824),Q=r.n(G);const W=window.wp.htmlEntities,K=window.wc.wcTypes,Z=Object.entries(B).reduce(((e,[t,r])=>(e[t]=Object.entries(r).reduce(((e,[t,r])=>(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,d.sprintf)(/* translators: %s Field label. */ /* translators: %s Field label. */
(0,d.__)("%s (optional)","woocommerce"),e.label)),e.index&&((0,K.isNumber)(e.index)&&(t.index=e.index),(0,K.isString)(e.index)&&(t.index=parseInt(e.index,10))),e.hidden&&(t.required=!1),t})(r),e)),{}),e)),{}),J=e=>{const t=((e,t,r="")=>{const o=r&&void 0!==Z[r]?Z[r]:{};return e.map((e=>({key:e,...t&&e in t?t[e]:{},...o&&e in o?o[e]:{}}))).sort(((e,t)=>e.index-t.index))})(I,j.defaultFields,e.country),r=Object.assign({},e);return t.forEach((({key:t,hidden:o})=>{!0===o&&((e,t)=>e in t)(t,e)&&(r[t]="")})),r},X=window.CustomEvent||null,ee=(e,t,r=!1,o=!1)=>{if("function"!=typeof jQuery)return()=>{};const c=()=>{((e,{bubbles:t=!1,cancelable:r=!1,element:o,detail:c={}})=>{if(!X)return;o||(o=document.body);const s=new X(e,{bubbles:t,cancelable:r,detail:c});o.dispatchEvent(s)})(t,{bubbles:r,cancelable:o})};return jQuery(document).on(e,c),()=>jQuery(document).off(e,c)},te=e=>{const t=e?.detail;t&&t.preserveCartData||(0,i.dispatch)(U.cartStore).invalidateResolutionForStore()},re=e=>{(e?.persisted||"back_forward"===(window.performance&&window.performance.getEntriesByType("navigation").length?window.performance.getEntriesByType("navigation")[0].type:""))&&(0,i.dispatch)(U.cartStore).invalidateResolutionForStore()},oe=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},ce={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},se={...ce,email:""},ie={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:U.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},ne=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(0,W.decodeEntities)(t)]))),ae={cartCoupons:U.EMPTY_CART_COUPONS,cartItems:U.EMPTY_CART_ITEMS,cartFees:U.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,crossSellsProducts:U.EMPTY_CART_CROSS_SELLS,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:U.EMPTY_CART_ITEM_ERRORS,cartTotals:ie,cartIsLoading:!0,cartErrors:U.EMPTY_CART_ERRORS,billingData:se,billingAddress:se,shippingAddress:ce,shippingRates:U.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentMethods:U.EMPTY_PAYMENT_METHODS,paymentRequirements:U.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},receiveCartContents:()=>{},extensions:U.EMPTY_EXTENSIONS,hasPendingItemsOperations:!1},le=(e={shouldSelect:!0})=>{const{shouldSelect:t}=e,r=(0,s.useRef)(),o=(0,s.useRef)(se),c=(0,s.useRef)(ce);(0,s.useEffect)((()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),window.wcBlocksStoreCartListeners?.count>0)return void window.wcBlocksStoreCartListeners.count++;document.body.addEventListener("wc-blocks_added_to_cart",te),document.body.addEventListener("wc-blocks_removed_from_cart",te),window.addEventListener("pageshow",re);const e=ee("added_to_cart","wc-blocks_added_to_cart"),t=ee("removed_from_cart","wc-blocks_removed_from_cart");window.wcBlocksStoreCartListeners.count=1,window.wcBlocksStoreCartListeners.remove=()=>{document.body.removeEventListener("wc-blocks_added_to_cart",te),document.body.removeEventListener("wc-blocks_removed_from_cart",te),window.removeEventListener("pageshow",re),e(),t()}})(),oe)),[]);const{receiveCart:n,receiveCartContents:a}=(0,i.useDispatch)(U.cartStore),{cartData:l,cartErrors:m,cartTotals:d,cartIsLoading:u,isLoadingRates:p,hasPendingItemsOperations:_}=(0,i.useSelect)((e=>{const t=e(U.cartStore),r=!t.hasFinishedResolution("getCartData",[]);return{cartData:t.getCartData(),cartErrors:t.getCartErrors(),cartTotals:t.getCartTotals(),cartIsLoading:r,isLoadingRates:t.isAddressFieldsForShippingRatesUpdating(),hasPendingItemsOperations:t.hasPendingItemsOperations()}}),[]);if(!t)return ae;const h=J(ne(l.billingAddress));Q()(o.current,h)||(o.current=h);const w=o.current,g=l.needsShipping?J(ne(l.shippingAddress)):w;Q()(c.current,g)||(c.current=g);const b=c.current,y={cartCoupons:l.coupons.length>0?l.coupons.map((e=>({...e,label:(0,W.decodeEntities)(e.code)}))):U.EMPTY_CART_COUPONS,cartItems:l.items,crossSellsProducts:l.crossSells,cartFees:l.fees.length>0?l.fees.map((e=>ne(e))):U.EMPTY_CART_FEES,cartItemsCount:l.itemsCount,cartItemsWeight:l.itemsWeight,cartNeedsPayment:l.needsPayment,cartNeedsShipping:l.needsShipping,cartItemErrors:l.errors,cartTotals:d,cartIsLoading:u,cartErrors:m,billingData:w,billingAddress:w,shippingAddress:b,extensions:l.extensions,shippingRates:l.shippingRates,isLoadingRates:p,cartHasCalculatedShipping:l.hasCalculatedShipping,paymentRequirements:l.paymentRequirements,paymentMethods:l.paymentMethods,receiveCart:n,receiveCartContents:a,hasPendingItemsOperations:_};return r.current&&Q()(r.current,y)||(r.current=y),r.current};(0,o.registerBlockType)("woocommerce/mini-cart-title-items-counter-block",{icon:{src:(0,n.jsx)(h.A,{icon:$.A,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=(0,c.useBlockProps)(),{cartItemsCount:t}=le();return(0,n.jsx)("span",{...e,children:(0,d.sprintf)(/* translators: %d is the count of items in the cart. */ /* translators: %d is the count of items in the cart. */
(0,d._n)("(%d item)","(%d items)",t,"woocommerce"),t)})},save:()=>(0,n.jsx)("div",{...c.useBlockProps.save()})});const me={label:{type:"string",default:(0,d.__)("Your cart","woocommerce")}};(0,o.registerBlockType)("woocommerce/mini-cart-title-label-block",{icon:{src:(0,n.jsx)(h.A,{icon:$.A,className:"wc-block-editor-components-block-icon"})},attributes:me,edit:({attributes:{label:e},setAttributes:t})=>{const r=(0,c.useBlockProps)();return(0,n.jsx)("span",{...r,children:(0,n.jsx)(c.RichText,{allowedFormats:[],value:e,onChange:e=>t({label:e})})})},save:()=>(0,n.jsx)("div",{...c.useBlockProps.save()})});var de=r(9264);(0,o.registerBlockType)("woocommerce/mini-cart-items-block",{icon:{src:(0,n.jsx)(h.A,{icon:de.A,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=(0,c.useBlockProps)({className:"wc-block-mini-cart__items"}),t=[["woocommerce/mini-cart-products-table-block",{}]].filter(Boolean);return(0,n.jsx)("div",{...e,children:(0,n.jsx)(c.InnerBlocks,{template:t,renderAppender:c.InnerBlocks.ButtonBlockAppender,templateLock:!1,allowedBlocks:f()})})},save:()=>(0,n.jsx)("div",{...c.useBlockProps.save(),children:(0,n.jsx)(c.InnerBlocks.Content,{})})});var ue=r(8940),pe=r(8107),_e=r(4347);const he=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA","A"],we=({children:e,style:t={},...r})=>{const o=(0,s.useRef)(null),c=()=>{o.current&&pe.focus.focusable.find(o.current).forEach((e=>{he.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")}))},i=(0,_e.YQ)(c,0,{leading:!0});return(0,s.useLayoutEffect)((()=>{let e;return c(),o.current&&(e=new window.MutationObserver(i),e.observe(o.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),i.cancel()}}),[i]),(0,n.jsx)("div",{ref:o,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...t},...r,children:e})};var ge=r(4921),be=r(195),ye=r(8558);r(9959);const ke=({className:e,quantity:t=1,minimum:r=1,maximum:o,onChange:c=()=>{},step:i=1,itemName:a="",disabled:l,editable:m=!0})=>{const u=(0,ge.A)("wc-block-components-quantity-selector",e),p=(0,s.useRef)(null),_=(0,s.useRef)(null),h=(0,s.useRef)(null),w=void 0!==o,g=!l&&t-i>=r,b=!l&&(!w||t+i<=o),[y,k]=(0,s.useState)(t),v=(0,s.useRef)(t),f=(0,s.useRef)("input"),x=(0,s.useCallback)((e=>{let t=e;w&&(t=Math.min(t,Math.floor(o/i)*i)),t=Math.max(t,Math.ceil(r/i)*i),t=Math.round(t/i)*i;const c=i.toString().split(".")[1]?.length||0;return t=Math.round(t*Math.pow(10,c))/Math.pow(10,c),t}),[w,o,r,i]),j=(0,_e.YQ)((e=>{c(e)}),600),P=(0,s.useCallback)((e=>{if(isNaN(e))return void k(t);j.cancel();const r=x(e);k(r),v.current=r,r!==t&&c(r)}),[x,t,j,c]);(0,s.useLayoutEffect)((()=>{t!==v.current?"increase"===f.current&&t<v.current||"decrease"===f.current&&t>v.current||(k(t),v.current=t,f.current="input"):f.current="input"}),[t,x]);const C=(0,s.useCallback)((e=>{const t="ArrowDown"===e.key||e.keyCode===ye.DOWN,r="ArrowUp"===e.key||e.keyCode===ye.UP,o="Enter"===e.key||e.keyCode===ye.ENTER;t&&(e.preventDefault(),_.current?.click()),r&&(e.preventDefault(),h.current?.click()),o&&(e.preventDefault(),p.current?.blur())}),[]),S=(0,s.useCallback)((e=>{const r=e.target.value,o=Number(r);if(k(o),isNaN(o))return void j.cancel();const c=x(o);v.current=c,c===o&&c!==t?j(c):j.cancel()}),[j,x,t]),E=(0,s.useCallback)((()=>{P(y)}),[y,P]),N=(0,s.useCallback)((e=>e.toString()),[]);return(0,n.jsxs)("div",{className:u,children:[(0,n.jsx)("input",{ref:p,className:"wc-block-components-quantity-selector__input",disabled:l,readOnly:!m,type:"number",step:i,min:r,max:o,value:N(y),onKeyDown:C,onBlur:E,onChange:S,"aria-label":(0,d.sprintf)(/* translators: %s refers to the item name in the cart. */ /* translators: %s refers to the item name in the cart. */
(0,d.__)("Quantity of %s in your cart.","woocommerce"),a)}),m&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{ref:_,"aria-label":(0,d.sprintf)(/* translators: %s refers to the item name in the cart. */ /* translators: %s refers to the item name in the cart. */
(0,d.__)("Reduce quantity of %s","woocommerce"),a),className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus",disabled:!g,onClick:()=>{const e=y-i;P(e),f.current="decrease",(0,be.speak)((0,d.sprintf)(/* translators: %s refers to the item's new quantity in the cart. */ /* translators: %s refers to the item's new quantity in the cart. */
(0,d.__)("Quantity reduced to %s.","woocommerce"),e))},children:"−"}),(0,n.jsx)("button",{ref:h,"aria-label":(0,d.sprintf)(/* translators: %s refers to the item's name in the cart. */ /* translators: %s refers to the item's name in the cart. */
(0,d.__)("Increase quantity of %s","woocommerce"),a),disabled:!b,className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus",onClick:()=>{const e=y+i;P(e),f.current="increase",(0,be.speak)((0,d.sprintf)(/* translators: %s refers to the item's new quantity in the cart. */ /* translators: %s refers to the item's new quantity in the cart. */
(0,d.__)("Quantity increased to %s.","woocommerce"),e))},children:"+"})]})]})},ve=window.wc.blocksComponents,fe=window.wc.priceFormat;r(8501);const xe=({currency:e,maxPrice:t,minPrice:r,priceClassName:o,priceStyle:c={}})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"screen-reader-text",children:(0,d.sprintf)(/* translators: %1$s min price, %2$s max price */ /* translators: %1$s min price, %2$s max price */
(0,d.__)("Price between %1$s and %2$s","woocommerce"),(0,fe.formatPrice)(r),(0,fe.formatPrice)(t))}),(0,n.jsxs)("span",{"aria-hidden":!0,children:[(0,n.jsx)(ve.FormattedMonetaryAmount,{className:(0,ge.A)("wc-block-components-product-price__value",o),currency:e,value:r,style:c})," — ",(0,n.jsx)(ve.FormattedMonetaryAmount,{className:(0,ge.A)("wc-block-components-product-price__value",o),currency:e,value:t,style:c})]})]}),je=({currency:e,regularPriceClassName:t,regularPriceStyle:r,regularPrice:o,priceClassName:c,priceStyle:s,price:i})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"screen-reader-text",children:(0,d.__)("Previous price:","woocommerce")}),(0,n.jsx)(ve.FormattedMonetaryAmount,{currency:e,renderText:e=>(0,n.jsx)("del",{className:(0,ge.A)("wc-block-components-product-price__regular",t),style:r,children:e}),value:o}),(0,n.jsx)("span",{className:"screen-reader-text",children:(0,d.__)("Discounted price:","woocommerce")}),(0,n.jsx)(ve.FormattedMonetaryAmount,{currency:e,renderText:e=>(0,n.jsx)("ins",{className:(0,ge.A)("wc-block-components-product-price__value","is-discounted",c),style:s,children:e}),value:i})]}),Pe=({align:e,className:t,currency:r,format:o="<price/>",maxPrice:c,minPrice:i,price:a,priceClassName:l,priceStyle:m,regularPrice:d,regularPriceClassName:u,regularPriceStyle:p,style:_})=>{const h=(0,ge.A)(t,"price","wc-block-components-product-price",{[`wc-block-components-product-price--align-${e}`]:e});o.includes("<price/>")||(o="<price/>",console.error("Price formats need to include the `<price/>` tag."));const w=d&&a&&a<d;let g=(0,n.jsx)("span",{className:(0,ge.A)("wc-block-components-product-price__value",l)});return w?g=(0,n.jsx)(je,{currency:r,price:a,priceClassName:l,priceStyle:m,regularPrice:d,regularPriceClassName:u,regularPriceStyle:p}):void 0!==i&&void 0!==c?g=(0,n.jsx)(xe,{currency:r,maxPrice:c,minPrice:i,priceClassName:l,priceStyle:m}):a&&(g=(0,n.jsx)(ve.FormattedMonetaryAmount,{className:(0,ge.A)("wc-block-components-product-price__value",l),currency:r,value:a,style:m})),(0,n.jsx)("span",{className:h,style:_,children:(0,s.createInterpolateElement)(o,{price:g})})};r(959);const Ce=({className:e="",disabled:t=!1,name:r,permalink:o="",target:c,rel:s,style:i,onClick:a,disabledTagName:l="span",...m})=>{const d=(0,ge.A)("wc-block-components-product-name",e),u=l;if(t){const e=m;return(0,n.jsx)(u,{className:d,...e,dangerouslySetInnerHTML:{__html:r}})}return(0,n.jsx)("a",{className:d,href:o,target:c,...m,dangerouslySetInnerHTML:{__html:r},style:i})},Se=window.wp.hooks;var Ee=r(6513);r(7605);const Ne=({children:e,className:t})=>(0,n.jsx)("div",{className:(0,ge.A)("wc-block-components-product-badge",t),children:e}),Ae=()=>(0,n.jsx)(Ne,{className:"wc-block-components-product-backorder-badge",children:(0,d.__)("Available on backorder","woocommerce")}),Be=({image:e={},fallbackAlt:t="",width:r,height:o})=>{const c=e.thumbnail?{src:e.thumbnail,alt:(0,W.decodeEntities)(e.alt)||t||"Product Image"}:{src:j.PLACEHOLDER_IMG_SRC,alt:""};return(0,n.jsx)("img",{src:c.src,alt:c.alt,width:r,height:o})},Te=({lowStockRemaining:e})=>e?(0,n.jsx)(Ne,{className:"wc-block-components-product-low-stock-badge",children:(0,d.sprintf)(/* translators: %d stock amount (number of items in stock for product) */ /* translators: %d stock amount (number of items in stock for product) */
(0,d.__)("%d left in stock","woocommerce"),e)}):null;var Ie=r(7356);r(3692);const Re=({details:e=[]})=>{if(!Array.isArray(e))return null;if(0===(e=e.filter((e=>!e.hidden))).length)return null;let t="ul",r="li";return 1===e.length&&(t="div",r="div"),(0,n.jsx)(t,{className:"wc-block-components-product-details",children:e.map((e=>{const t=e?.key||e.name||"",o=e?.className||(t?`wc-block-components-product-details__${(0,Ie.c)(t)}`:"");return(0,n.jsxs)(r,{className:o,children:[t&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("span",{className:"wc-block-components-product-details__name",children:[(0,W.decodeEntities)(t),":"]})," "]}),(0,n.jsx)("span",{className:"wc-block-components-product-details__value",children:(0,W.decodeEntities)(e.display||e.value)})]},t+(e.display||e.value))}))})};var Me=r(3240),Le=r.n(Me);const Oe=["a","b","em","i","strong","p","br"],De=["target","href","rel","name","download"],qe=(e,t)=>{const r=t?.tags||Oe,o=t?.attr||De;return Le().sanitize(e,{ALLOWED_TAGS:r,ALLOWED_ATTR:o})},Fe=window.wp.autop,Ve=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),ze=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,He=window.wp.wordcount,Ue=["a","b","em","i","strong","p","br","ul","ol","li","h1","h2","h3","h4","h5","h6","pre","blockquote","img"],Ye=["target","href","rel","name","download","src","class","alt","style"],$e=({source:e,maxLength:t=15,countType:r="words",className:o="",style:c={}})=>{const i=(0,s.useMemo)((()=>((e,t=15,r="words")=>{const o=(0,Fe.autop)(e);if((0,He.count)(o,r)<=t)return o;const c=(e=>{const t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)})(o);return(0,He.count)(c,r)<=t?c:"words"===r?((e,t,r="&hellip;",o=!0)=>{const c=Ve(e),s=c.split(" ").splice(0,t).join(" ");return s===c?o?(0,Fe.autop)(c):c:o?(0,Fe.autop)(ze(s,r)):ze(s,r)})(c,t):((e,t,r=!0,o="&hellip;",c=!0)=>{const s=Ve(e),i=s.slice(0,t);if(i===s)return c?(0,Fe.autop)(s):s;if(r)return(0,Fe.autop)(ze(i,o));const n=i.match(/([\s]+)/g),a=n?n.length:0,l=s.slice(0,t+a);return c?(0,Fe.autop)(ze(l,o)):ze(l,o)})(c,t,"characters_including_spaces"===r)})(e,t,r)),[e,t,r]);return(0,n.jsx)(s.RawHTML,{style:c,className:o,children:qe(i,{tags:Ue,attr:Ye})})},Ge=({className:e,shortDescription:t="",fullDescription:r=""})=>{const o=t||r;return o?(0,n.jsx)($e,{className:e,source:o,maxLength:15,countType:P.wordCountType||"words"}):null};r(8879);const Qe=({shortDescription:e="",fullDescription:t="",itemData:r=[],variation:o=[]})=>(0,n.jsxs)("div",{className:"wc-block-components-product-metadata",children:[(0,n.jsx)(Ge,{className:"wc-block-components-product-metadata__description",shortDescription:e,fullDescription:t}),(0,n.jsx)(Re,{details:r}),(0,n.jsx)(Re,{details:o.map((({attribute:e="",value:t})=>({key:e,value:t})))})]}),We=({currency:e,saleAmount:t,format:r="<price/>"})=>{if(!t||t<=0)return null;r.includes("<price/>")||(r="<price/>",console.error("Price formats need to include the `<price/>` tag."));const o=(0,d.sprintf)(/* translators: %s will be replaced by the discount amount */ /* translators: %s will be replaced by the discount amount */
(0,d.__)("Save %s","woocommerce"),r);return(0,n.jsx)(Ne,{className:"wc-block-components-sale-badge",children:(0,s.createInterpolateElement)(o,{price:(0,n.jsx)(ve.FormattedMonetaryAmount,{currency:e,value:t})})})},Ke=(e,t)=>e.convertPrecision(t.minorUnit).getAmount(),Ze=(0,s.forwardRef)((({lineItem:e,onRemove:t=()=>{},tabIndex:r},o)=>{const{name:c="",catalog_visibility:a="visible",short_description:l="",description:m="",low_stock_remaining:u=null,show_backorder_badge:p=!1,quantity_limits:_={minimum:1,maximum:99,multiple_of:1,editable:!0},sold_individually:h=!1,permalink:w="",images:g=[],variation:b=[],item_data:y=[],prices:k={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",price:"0",regular_price:"0",sale_price:"0",price_range:null,raw_prices:{precision:6,price:"0",regular_price:"0",sale_price:"0"}},totals:v={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",line_subtotal:"0",line_subtotal_tax:"0"},extensions:f}=e,{quantity:P,setItemQuantity:C,removeItem:S,isPendingDelete:E}=(e=>{const t={key:"",quantity:1};(e=>(0,K.isObject)(e)&&(0,K.objectHasProp)(e,"key")&&(0,K.objectHasProp)(e,"quantity")&&(0,K.isString)(e.key)&&(0,K.isNumber)(e.quantity))(e)&&(t.key=e.key,t.quantity=e.quantity);const{key:r="",quantity:o=1}=t,{cartErrors:c}=le(),{__internalStartCalculation:n,__internalFinishCalculation:a}=(0,i.useDispatch)(U.checkoutStore),[l,m]=(0,s.useState)(o),[d]=(0,_e.d7)(l,400),u=function(e,t){const r=(0,s.useRef)();return(0,s.useEffect)((()=>{r.current===e||(r.current=e)}),[e,t]),r.current}(d),{removeItemFromCart:p,changeCartItemQuantity:_}=(0,i.useDispatch)(U.cartStore);(0,s.useEffect)((()=>m(o)),[o]);const h=(0,i.useSelect)((e=>{if(!r)return{quantity:!1,delete:!1};const t=e(U.cartStore);return{quantity:t.isItemPendingQuantity(r),delete:t.isItemPendingDelete(r)}}),[r]),w=(0,s.useCallback)((()=>r?p(r).catch((e=>{(0,U.processErrorResponse)(e)})):Promise.resolve(!1)),[r,p]);return(0,s.useEffect)((()=>{r&&(0,K.isNumber)(u)&&Number.isFinite(u)&&u!==d&&_(r,d).catch((e=>{(0,U.processErrorResponse)(e)}))}),[r,_,d,u]),(0,s.useEffect)((()=>(h.delete?n():a(),()=>{h.delete&&a()})),[a,n,h.delete]),(0,s.useEffect)((()=>(h.quantity||d!==l?n():a(),()=>{(h.quantity||d!==l)&&a()})),[n,a,h.quantity,d,l]),{isPendingDelete:h.delete,quantity:l,setItemQuantity:m,removeItem:w,cartItemQuantityErrors:c}})(e),{dispatchStoreEvent:N}={dispatchStoreEvent:(0,s.useCallback)(((e,t={})=>{try{(0,Se.doAction)(`experimental__woocommerce_blocks-${e}`,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:(0,s.useCallback)(((e,t={})=>{try{(0,Se.doAction)(`experimental__woocommerce_blocks-checkout-${e}`,{...t,storeCart:(0,i.select)("wc/store/cart").getCartData()})}catch(e){console.error(e)}}),[])},{receiveCart:A,...B}=le(),T=(0,s.useMemo)((()=>({context:"cart",cartItem:e,cart:B})),[e,B]),I=(0,fe.getCurrencyFromPriceResponse)(k),R=(0,x.applyCheckoutFilter)({filterName:"itemName",defaultValue:c,extensions:f,arg:T}),M=(0,Ee.A)({amount:parseInt(k.raw_prices.regular_price,10),precision:k.raw_prices.precision}),L=(0,Ee.A)({amount:parseInt(k.raw_prices.price,10),precision:k.raw_prices.precision}),O=M.subtract(L),D=O.multiply(P),q=(0,fe.getCurrencyFromPriceResponse)(v);let F=parseInt(v.line_subtotal,10);(0,j.getSetting)("displayCartPricesIncludingTax",!1)&&(F+=parseInt(v.line_subtotal_tax,10));const V=(0,Ee.A)({amount:F,precision:q.minorUnit}),z=g.length?g[0]:{},H="hidden"===a||"search"===a,Y=(0,x.applyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:f,arg:T}),$=(0,x.applyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"<price/>",extensions:f,arg:T,validation:x.productPriceValidation}),G=(0,x.applyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"<price/>",extensions:f,arg:T,validation:x.productPriceValidation}),Q=(0,x.applyCheckoutFilter)({filterName:"saleBadgePriceFormat",defaultValue:"<price/>",extensions:f,arg:T,validation:x.productPriceValidation}),W=(0,x.applyCheckoutFilter)({filterName:"showRemoveItemLink",defaultValue:!0,extensions:f,arg:T});return(0,n.jsxs)("tr",{className:(0,ge.A)("wc-block-cart-items__row",Y,{"is-disabled":E}),ref:o,tabIndex:r,children:[(0,n.jsx)("td",{className:"wc-block-cart-item__image","aria-hidden":!(0,K.objectHasProp)(z,"alt")||!z.alt,children:H?(0,n.jsx)(Be,{image:z,fallbackAlt:R}):(0,n.jsx)("a",{href:w,tabIndex:-1,children:(0,n.jsx)(Be,{image:z,fallbackAlt:R})})}),(0,n.jsx)("td",{className:"wc-block-cart-item__product",children:(0,n.jsxs)("div",{className:"wc-block-cart-item__wrap",children:[(0,n.jsx)(Ce,{disabled:E||H,name:R,permalink:w}),p?(0,n.jsx)(Ae,{}):!!u&&(0,n.jsx)(Te,{lowStockRemaining:u}),(0,n.jsx)("div",{className:"wc-block-cart-item__prices",children:(0,n.jsx)(Pe,{currency:I,regularPrice:Ke(M,I),price:Ke(L,I),format:G})}),(0,n.jsx)(We,{currency:I,saleAmount:Ke(O,I),format:Q}),(0,n.jsx)(Qe,{shortDescription:l,fullDescription:m,itemData:y,variation:b}),(0,n.jsxs)("div",{className:"wc-block-cart-item__quantity",children:[!h&&(0,n.jsx)(ke,{disabled:E,editable:_.editable,quantity:P,minimum:_.minimum,maximum:_.maximum,step:_.multiple_of,onChange:t=>{C(t),N("cart-set-item-quantity",{product:e,quantity:t})},itemName:R}),W&&(0,n.jsx)("button",{className:"wc-block-cart-item__remove-link","aria-label":(0,d.sprintf)(/* translators: %s refers to the item's name in the cart. */ /* translators: %s refers to the item's name in the cart. */
(0,d.__)("Remove %s from cart","woocommerce"),R),onClick:()=>{t(),S(),N("cart-remove-item",{product:e,quantity:P}),(0,be.speak)((0,d.sprintf)(/* translators: %s refers to the item name in the cart. */ /* translators: %s refers to the item name in the cart. */
(0,d.__)("%s has been removed from your cart.","woocommerce"),R))},disabled:E,children:(0,d.__)("Remove item","woocommerce")})]})]})}),(0,n.jsx)("td",{className:"wc-block-cart-item__total",children:(0,n.jsxs)("div",{className:"wc-block-cart-item__total-price-and-sale-badge-wrapper",children:[(0,n.jsx)(Pe,{currency:q,format:$,price:V.getAmount()}),P>1&&(0,n.jsx)(We,{currency:I,saleAmount:Ke(D,I),format:Q})]})})]})}));r(359);const Je=[...Array(3)].map(((_x,e)=>(0,n.jsx)(Ze,{lineItem:{}},e))),Xe=e=>{const t={};return e.forEach((({key:e})=>{t[e]=(0,s.createRef)()})),t},et=({lineItems:e=[],isLoading:t=!1,className:r})=>{const o=(0,s.useRef)(null),c=(0,s.useRef)(Xe(e));(0,s.useEffect)((()=>{c.current=Xe(e)}),[e]);const i=e=>()=>{c?.current&&e&&c.current[e].current instanceof HTMLElement?c.current[e].current.focus():o.current instanceof HTMLElement&&o.current.focus()},a=t?Je:e.map(((t,r)=>{const o=e.length>r+1?e[r+1].key:null;return(0,n.jsx)(Ze,{lineItem:t,onRemove:i(o),ref:c.current[t.key],tabIndex:-1},t.key)}));return(0,n.jsxs)("table",{className:(0,ge.A)("wc-block-cart-items",r),ref:o,tabIndex:-1,children:[(0,n.jsx)("caption",{className:"screen-reader-text",children:(0,n.jsx)("h2",{children:(0,d.__)("Products in cart","woocommerce")})}),(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{className:"wc-block-cart-items__header",children:[(0,n.jsx)("th",{className:"wc-block-cart-items__header-image",children:(0,n.jsx)("span",{children:(0,d.__)("Product","woocommerce")})}),(0,n.jsx)("th",{className:"wc-block-cart-items__header-product",children:(0,n.jsx)("span",{children:(0,d.__)("Details","woocommerce")})}),(0,n.jsx)("th",{className:"wc-block-cart-items__header-total",children:(0,n.jsx)("span",{children:(0,d.__)("Total","woocommerce")})})]})}),(0,n.jsx)("tbody",{children:a})]})},tt=({className:e})=>{const{cartItems:t,cartIsLoading:r}=le();return(0,n.jsx)("div",{className:(0,ge.A)(e,"wc-block-mini-cart__products-table"),children:(0,n.jsx)(et,{lineItems:t,isLoading:r,className:"wc-block-mini-cart-items"})})};(0,o.registerBlockType)("woocommerce/mini-cart-products-table-block",{icon:(0,n.jsx)(h.A,{icon:ue.A,className:"wc-block-editor-components-block-icon"}),edit:()=>{const e=(0,c.useBlockProps)();return(0,n.jsx)("div",{...e,children:(0,n.jsx)(we,{children:(0,n.jsx)(tt,{className:"is-mobile"})})})},save:()=>(0,n.jsx)("div",{...c.useBlockProps.save()})});var rt=r(6208),ot=r(923),ct=r.n(ot);function st(e){const t=(0,s.useRef)(e);return ct()(e,t.current)||(t.current=e),t.current}const it=window.wc.wcBlocksRegistry,nt=e=>`wc-block-components-payment-method-icon wc-block-components-payment-method-icon--${e}`,at=({id:e,src:t=null,alt:r=""})=>t?(0,n.jsx)("img",{className:nt(e),src:t,alt:r}):null,lt=[{id:"alipay",alt:"Alipay",src:C+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:C+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:C+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:C+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:C+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:C+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:C+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:C+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:C+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:C+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:C+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:C+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:C+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:C+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:C+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:C+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:C+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:C+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:C+"payment-methods/wechat.svg"}];r(6983);const mt=({icons:e=[],align:t="center",className:r})=>{const o=(e=>{const t={};return e.forEach((e=>{let r={};"string"==typeof e&&(r={id:e,alt:e,src:null}),"object"==typeof e&&(r={id:e.id||"",alt:e.alt||"",src:e.src||null}),r.id&&(0,K.isString)(r.id)&&!t[r.id]&&(t[r.id]=r)})),Object.values(t)})(e);if(0===o.length)return null;const c=(0,ge.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},r);return(0,n.jsx)("div",{className:c,children:o.map((e=>{const t={...e,...(r=e.id,lt.find((e=>e.id===r))||{})};var r;return(0,n.jsx)(at,{...t},"payment-method-icon-"+e.id)}))})},dt=e=>Object.values(e).reduce(((e,t)=>(null!==t.icons&&(e=e.concat(t.icons)),e)),[]);var ut=r(4040),pt=r.n(ut);let _t=function(e){return e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback",e}({});const ht={},wt=(e=ht,{type:t,eventType:r,id:o,callback:c,priority:s})=>{const i=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case _t.ADD_EVENT_CALLBACK:return i.set(o,{priority:s,callback:c}),{...e,[r]:i};case _t.REMOVE_EVENT_CALLBACK:return i.delete(o),{...e,[r]:i}}},gt=(e,t)=>(r,o=10)=>{const c=((e,t,r=10)=>({id:Math.floor(Math.random()*Date.now()).toString(),type:_t.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}))(e,r,o);return t(c),()=>{var r;t((r=e,{id:c.id,type:_t.REMOVE_EVENT_CALLBACK,eventType:r}))}},bt=(0,s.createContext)({onPaymentProcessing:()=>()=>()=>{},onPaymentSetup:()=>()=>()=>{}}),yt=({children:e})=>{const{isProcessing:t,isIdle:r,isCalculating:o,hasError:c}=(0,i.useSelect)((e=>{const t=e(U.checkoutStore);return{isProcessing:t.isProcessing(),isIdle:t.isIdle(),hasError:t.hasError(),isCalculating:t.isCalculating()}})),{isPaymentReady:a}=(0,i.useSelect)((e=>{const t=e(U.paymentStore);return{isPaymentProcessing:t.isPaymentProcessing(),isPaymentReady:t.isPaymentReady()}})),{setValidationErrors:l}=(0,i.useDispatch)(U.validationStore),[m,d]=(0,s.useReducer)(wt,{}),{onPaymentSetup:u}=(e=>(0,s.useMemo)((()=>({onPaymentSetup:gt("payment_setup",e)})),[e]))(d),p=(0,s.useRef)(m);(0,s.useEffect)((()=>{p.current=m}),[m]);const{__internalSetPaymentProcessing:_,__internalSetPaymentIdle:h,__internalEmitPaymentProcessingEvent:w}=(0,i.useDispatch)(U.paymentStore);(0,s.useEffect)((()=>{!t||c||o||(_(),w(p.current,l))}),[t,c,o,_,w,l]),(0,s.useEffect)((()=>{r&&!a&&h()}),[r,a,h]),(0,s.useEffect)((()=>{c&&a&&h()}),[c,a,h]);const g={onPaymentProcessing:(0,s.useMemo)((()=>function(...e){return pt()("onPaymentProcessing",{alternative:"onPaymentSetup",plugin:"WooCommerce Blocks"}),u(...e)}),[u]),onPaymentSetup:u};return(0,n.jsx)(bt.Provider,{value:g,children:e})};r(3337);const kt=()=>{const{paymentMethods:e}=((e=!1)=>{const{paymentMethodsInitialized:t,expressPaymentMethodsInitialized:r,availablePaymentMethods:o,availableExpressPaymentMethods:c}=(0,i.useSelect)((e=>{const t=e(U.paymentStore);return{paymentMethodsInitialized:t.paymentMethodsInitialized(),expressPaymentMethodsInitialized:t.expressPaymentMethodsInitialized(),availableExpressPaymentMethods:t.getAvailableExpressPaymentMethods(),availablePaymentMethods:t.getAvailablePaymentMethods()}})),s=Object.values(o).map((({name:e})=>e)),n=Object.values(c).map((({name:e})=>e)),a=(0,it.getPaymentMethods)(),l=(0,it.getExpressPaymentMethods)(),m=Object.keys(a).reduce(((e,t)=>(s.includes(t)&&(e[t]=a[t]),e)),{}),d=Object.keys(l).reduce(((e,t)=>(n.includes(t)&&(e[t]=l[t]),e)),{}),u=st(m),p=st(d);return{paymentMethods:e?p:u,isInitialized:e?r:t}})(!1);return(0,n.jsx)(mt,{icons:dt(e)})},vt={cartButtonLabel:{type:"string",default:(0,d.__)("View my cart","woocommerce")},checkoutButtonLabel:{type:"string",default:(0,d.__)("Go to checkout","woocommerce")}};(0,o.registerBlockType)("woocommerce/mini-cart-footer-block",{icon:{src:(0,n.jsx)(h.A,{icon:rt.A,className:"wc-block-editor-components-block-icon"})},deprecated:[{attributes:vt,migrate(e,t){const{cartButtonLabel:r,checkoutButtonLabel:c,...s}=e;return[s,[(0,o.createBlock)("woocommerce/mini-cart-cart-button-block",{cartButtonLabel:r}),(0,o.createBlock)("woocommerce/mini-cart-checkout-button-block",{checkoutButtonLabel:c}),...t]]},isEligible:(e,t)=>!t.length,save:()=>(0,n.jsx)("div",{...c.useBlockProps.save()})}],edit:()=>{const e=(0,c.useBlockProps)(),{cartTotals:t}=le(),r=(0,j.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(t.total_items,10)+parseInt(t.total_items_tax,10):parseInt(t.total_items,10);return(0,n.jsx)("div",{...e,children:(0,n.jsxs)("div",{className:"wc-block-mini-cart__footer",children:[(0,n.jsx)(ve.TotalsItem,{className:"wc-block-mini-cart__footer-subtotal",currency:(0,fe.getCurrencyFromPriceResponse)(t),label:(0,d.__)("Subtotal","woocommerce"),value:r,description:(0,d.__)("Shipping, taxes, and discounts calculated at checkout.","woocommerce")}),(0,n.jsx)("div",{className:"wc-block-mini-cart__footer-actions",children:(0,n.jsx)(c.InnerBlocks,{template:[["woocommerce/mini-cart-cart-button-block",{}],["woocommerce/mini-cart-checkout-button-block",{}]]})}),(0,n.jsx)(yt,{children:(0,n.jsx)(kt,{})})]})})},save:()=>(0,n.jsx)("div",{...c.useBlockProps.save(),children:(0,n.jsx)(c.InnerBlocks.Content,{})})});var ft=r(6012),xt=r(111);r(6882);const jt=(0,s.forwardRef)(((e,t)=>{const{className:r,children:o,variant:c="contained",removeTextWrap:s=!1,...i}=e,a=(0,ge.A)("wc-block-components-button","wp-element-button",r,c);if("href"in e)return(0,n.jsx)(xt.$,{render:(0,n.jsx)("a",{ref:t,href:e.href,children:(0,n.jsx)("div",{className:"wc-block-components-button__text",children:o})}),className:a,...i});const l=s?e.children:(0,n.jsx)("div",{className:"wc-block-components-button__text",children:e.children});return(0,n.jsx)(xt.$,{ref:t,className:a,...i,children:l})})),Pt=({onChange:e,placeholder:t,value:r,children:o,...s})=>(0,n.jsxs)(jt,{...s,children:[(0,n.jsx)(c.RichText,{multiline:!1,allowedFormats:[],value:r,placeholder:t,onChange:e}),o]}),Ct=(0,d.__)("Start shopping","woocommerce"),St=(e="",t)=>e.includes("is-style-outline")?"outlined":e.includes("is-style-fill")?"contained":t,Et={startShoppingButtonLabel:{type:"string",default:Ct}};(0,o.registerBlockType)("woocommerce/mini-cart-shopping-button-block",{icon:{src:(0,n.jsx)(h.A,{icon:ft.A,className:"wc-block-editor-components-block-icon"})},attributes:Et,edit:({attributes:e,setAttributes:t})=>{const r=(0,c.useBlockProps)({className:"wp-block-button aligncenter"}),o=(0,c.__experimentalUseColorProps)(e),{startShoppingButtonLabel:s}=e;return(0,n.jsx)("div",{...r,children:(0,n.jsx)(Pt,{className:`wc-block-mini-cart__shopping-button ${o.className||""}`,value:s,placeholder:Ct,onChange:e=>{t({startShoppingButtonLabel:e})},variant:St(r.className,"contained"),style:o.style})})},save:()=>(0,n.jsx)("div",{...c.useBlockProps.save()})});const Nt=(0,d.__)("View my cart","woocommerce"),At={cartButtonLabel:{type:"string",default:Nt}};(0,o.registerBlockType)("woocommerce/mini-cart-cart-button-block",{icon:{src:(0,n.jsx)(h.A,{icon:ft.A,className:"wc-block-editor-components-block-icon"})},attributes:At,edit:({attributes:e,setAttributes:t})=>{const r=(0,c.useBlockProps)({className:"wc-block-mini-cart__footer-cart"}),{cartButtonLabel:o}=e;return(0,n.jsx)("div",{...r,children:(0,n.jsx)(Pt,{variant:St(r.className,"outlined"),value:o,placeholder:Nt,onChange:e=>{t({cartButtonLabel:e})},style:r.style})})},save:()=>(0,n.jsx)("div",{...c.useBlockProps.save()})});const Bt=(0,d.__)("Go to checkout","woocommerce"),Tt={checkoutButtonLabel:{type:"string",default:Bt}};(0,o.registerBlockType)("woocommerce/mini-cart-checkout-button-block",{icon:{src:(0,n.jsx)(h.A,{icon:ft.A,className:"wc-block-editor-components-block-icon"})},attributes:Tt,edit:({attributes:e,setAttributes:t})=>{const r=(0,c.useBlockProps)({className:(0,ge.A)("wc-block-mini-cart__footer-checkout")}),{checkoutButtonLabel:o}=e;return(0,n.jsx)("div",{...r,children:(0,n.jsx)(Pt,{variant:St(r.className,"contained"),value:o,placeholder:Bt,onChange:e=>{t({checkoutButtonLabel:e})},style:r.style})})},save:()=>(0,n.jsx)("div",{...c.useBlockProps.save()})});const It=(0,n.jsxs)(w.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,n.jsx)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,n.jsx)("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"})]}),Rt={apiVersion:3,title:(0,d.__)("Mini-Cart Contents","woocommerce"),icon:{src:(0,n.jsx)(h.A,{icon:It,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[(0,d.__)("WooCommerce","woocommerce")],description:(0,d.__)("Display a Mini-Cart widget.","woocommerce"),supports:{align:!1,html:!1,multiple:!1,reusable:!1,inserter:!1,color:{link:!0},lock:!1,__experimentalBorder:{color:!0,width:!0}},example:{attributes:{isPreview:!0}}};(0,o.registerBlockType)("woocommerce/mini-cart-contents",{...Rt,attributes:y,edit:({clientId:e,attributes:t,setAttributes:r})=>{const{currentView:o,width:i}=t,a=(0,c.useBlockProps)(),l=[["woocommerce/filled-mini-cart-contents-block",{},[]],["woocommerce/empty-mini-cart-contents-block",{},[]]];return p({clientId:e,registeredBlocks:k,defaultTemplate:l}),((e,t)=>{const r=(0,s.useRef)(null);(0,s.useEffect)((()=>{let o=document.querySelector(".editor-styles-wrapper");if(!o){const e=document.querySelector(".edit-site-visual-editor__editor-canvas");if(!(e&&e instanceof HTMLIFrameElement))return;const t=e.contentDocument||e.contentWindow?.document;if(!t)return;o=t.querySelector(".editor-styles-wrapper")}if(!o)return;const c=window.getComputedStyle(o),s=c?.backgroundColor,i=c?.color;if(!s||!i)return;const n=`${e}-editor-theme-colors`;let a=o.querySelector(`#${n}`);a||(a=document.createElement("style"),a.id=n,o.appendChild(a)),r.current=a;const l=t({editorBackgroundColor:s,editorColor:i});a.textContent=l;const m=new MutationObserver((()=>{const e=window.getComputedStyle(o),c=e?.backgroundColor,n=e?.color;if(c!==s||n!==i){const e=t({editorBackgroundColor:c,editorColor:n});r.current&&(r.current.textContent=e)}}));return m.observe(o,{attributes:!0,attributeFilter:["class"]}),()=>{m.disconnect(),r.current&&r.current.parentNode&&r.current.parentNode.removeChild(r.current)}}),[t,e])})("mini-cart-contents",(({editorBackgroundColor:e,editorColor:t})=>`\n\t\t\t\t:where(.wp-block-woocommerce-mini-cart-contents) {\n\t\t\t\t\tbackground-color: ${e};\n\t\t\t\t\tcolor: ${t};\n\t\t\t\t}\n\t\t\t`)),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.InspectorControls,{children:(0,n.jsx)(u.PanelBody,{title:(0,d.__)("Dimensions","woocommerce"),initialOpen:!0,children:(0,n.jsx)(u.__experimentalUnitControl,{onChange:e=>{r({width:e})},onBlur:e=>{""===e.target.value?r({width:y.width.default}):Number(e.target.value)<300&&r({width:"300px"})},value:i,units:[{value:"px",label:"px",default:y.width.default}]})})},"inspector"),(0,n.jsx)("div",{className:"wc-block-components-drawer__screen-overlay","aria-hidden":"true"}),(0,n.jsx)("div",{className:"wc-block-editor-mini-cart-contents__wrapper",children:(0,n.jsxs)("div",{...a,children:[(0,n.jsx)(m,{currentView:o,children:(0,n.jsx)(c.InnerBlocks,{allowedBlocks:k,template:l,templateLock:!1})}),(0,n.jsx)(_,{style:a.style})]})})]})},save:()=>(0,n.jsx)("div",{...c.useBlockProps.save(),children:(0,n.jsx)(c.InnerBlocks.Content,{})})})},6882:()=>{},359:()=>{},6983:()=>{},7605:()=>{},3692:()=>{},8879:()=>{},959:()=>{},8501:()=>{},9959:()=>{},6126:()=>{},3337:()=>{},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},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}},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}};return o[e].call(r.exports,r,r.exports,s),r.exports}s.m=o,e=[],s.O=(t,r,o,c)=>{if(!r){var i=1/0;for(m=0;m<e.length;m++){for(var[r,o,c]=e[m],n=!0,a=0;a<r.length;a++)(!1&c||i>=c)&&Object.keys(s.O).every((e=>s.O[e](r[a])))?r.splice(a--,1):(n=!1,c<i&&(i=c));if(n){e.splice(m--,1);var l=o();void 0!==l&&(t=l)}}return t}c=c||0;for(var m=e.length;m>0&&e[m-1][2]>c;m--)e[m]=e[m-1];e[m]=[r,o,c]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var c=Object.create(null);s.r(c);var i={};t=t||[null,r({}),r([]),r(r)];for(var n=2&o&&e;"object"==typeof n&&!~t.indexOf(n);n=r(n))Object.getOwnPropertyNames(n).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,s.d(c,i),c},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.j=1028,(()=>{var e={1028:0};s.O.j=t=>0===e[t];var t=(t,r)=>{var o,c,[i,n,a]=r,l=0;if(i.some((t=>0!==e[t]))){for(o in n)s.o(n,o)&&(s.m[o]=n[o]);if(a)var m=a(s)}for(t&&t(r);l<i.length;l++)c=i[l],s.o(e,c)&&e[c]&&e[c][0](),e[c]=0;return s.O(m)},r=globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var i=s.O(void 0,[94],(()=>s(1969)));i=s.O(i),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["mini-cart-contents"]=i})();