WooCommerce Gutenberg Products Block - Version 6.7.1

Version Description

  • 2022-01-07 =

Bug Fixes

  • Convert token to string when setting the active payment method. (5535)
Download this release

Release Info

Developer automattic
Plugin Icon 128x128 WooCommerce Gutenberg Products Block
Version 6.7.1
Comparing to
See all releases

Code changes from version 6.7.0 to 6.7.1

assets/js/base/context/providers/cart-checkout/payment-methods/payment-method-data-context.tsx CHANGED
@@ -195,14 +195,14 @@ export const PaymentMethodDataProvider = ( {
195
  )[ 0 ] || undefined;
196
 
197
  if ( customerPaymentMethod ) {
198
- const token = customerPaymentMethod.tokenId;
199
  const paymentMethodSlug = customerPaymentMethod.method.gateway;
200
  const savedTokenKey = `wc-${ paymentMethodSlug }-payment-token`;
201
 
202
  dispatchActions.setActivePaymentMethod( paymentMethodSlug, {
203
  token,
204
  payment_method: paymentMethodSlug,
205
- [ savedTokenKey ]: token.toString(),
206
  isSavedToken: true,
207
  } );
208
  return;
195
  )[ 0 ] || undefined;
196
 
197
  if ( customerPaymentMethod ) {
198
+ const token = customerPaymentMethod.tokenId.toString();
199
  const paymentMethodSlug = customerPaymentMethod.method.gateway;
200
  const savedTokenKey = `wc-${ paymentMethodSlug }-payment-token`;
201
 
202
  dispatchActions.setActivePaymentMethod( paymentMethodSlug, {
203
  token,
204
  payment_method: paymentMethodSlug,
205
+ [ savedTokenKey ]: token,
206
  isSavedToken: true,
207
  } );
208
  return;
build/cart-frontend.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '41e298010000a80fb68cdea8184d5a0f');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '78f34fd69d917f97bc0d2828b3d9b7b1');
build/cart-frontend.js CHANGED
@@ -3,4 +3,4 @@
3
  Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(i.b)(e.priority)&&(t.index=e.priority),Object(i.d)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},c=Object.entries(a).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,s(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==c[r]?c[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,i=Object(n.useRef)(null),a=Object(n.useRef)(0),s=Object(n.useRef)(null),c=Object(n.useRef)([]),l=Object(n.useRef)(),u=Object(n.useRef)(),d=Object(n.useRef)(e),p=Object(n.useRef)(!0);d.current=e;var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var m=!!(r=r||{}).leading,h=!("trailing"in r)||!!r.trailing,b="maxWait"in r,g=b?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=c.current,r=l.current;return c.current=l.current=null,a.current=e,u.current=d.current.apply(r,t)},r=function(e,t){f&&cancelAnimationFrame(s.current),s.current=f?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-i.current,n=e-a.current;return!i.current||r>=t||r<0||b&&n>=g},y=function(t){return s.current=null,h&&c.current?e(t):(c.current=l.current=null,u.current)},E=function(){var e=Date.now();if(n(e))return y(e);if(p.current){var o=e-i.current,s=e-a.current,c=t-o,l=b?Math.min(c,g-s):c;r(E,l)}},v=function(){for(var d=[],f=0;f<arguments.length;f++)d[f]=arguments[f];var h=Date.now(),g=n(h);if(c.current=d,l.current=o,i.current=h,g){if(!s.current&&p.current)return a.current=i.current,r(E,t),m?e(i.current):u.current;if(b)return r(E,t),e(i.current)}return s.current||r(E,t),u.current};return v.cancel=function(){s.current&&(f?cancelAnimationFrame(s.current):clearTimeout(s.current)),a.current=0,c.current=i.current=l.current=s.current=null},v.isPending=function(){return!!s.current},v.flush=function(){return s.current?y(Date.now()):u.current},v}),[m,b,t,g,h,f])}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(10),o=r.n(n),i=r(0),a=r(16);const s=[".wp-block-woocommerce-cart"],c=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:s=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const c=n(e,r),l=s(e,r),u={...e.dataset,...c.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:s={},errorBoundaryProps:c={}}=e;Object(i.render)(Object(i.createElement)(a.a,c,Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(i.createElement)(t,o()({},s,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:c,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(s.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:i}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:i}=e;const a=document.body.querySelectorAll(o);i&&i.length>0&&Array.prototype.filter.call(a,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,i)),c({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:i,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:i}=e;const a=i.querySelectorAll(o);c({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},,function(e,t,r){"use strict";var n=r(7),o=r(0),i=r(4),a=r.n(i),s=r(5),c=r(30),l=r.n(c),u=r(12),d=r(60),p=r(90),f=r(1);function m(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const i=o.getBoundingClientRect();return new n.DOMRect(e.left+i.left,e.top+i.top,e.width,e.height)}let h=0;function b(e){const t=document.scrollingElement||document.body;e&&(h=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=h)}let g=0;function y(){return Object(o.useEffect)(()=>(0===g&&b(!0),++g,()=>{1===g&&b(!1),--g}),[]),null}var E=r(26);function v(e){const t=Object(o.useContext)(E.a),r=t.slots[e]||{},n=t.fills[e],i=Object(o.useMemo)(()=>n||[],[n]);return{...r,updateSlot:Object(o.useCallback)(r=>{t.updateSlot(e,r)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(r=>{t.unregisterSlot(e,r)},[e,t.unregisterSlot]),fills:i,registerFill:Object(o.useCallback)(r=>{t.registerFill(e,r)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(r=>{t.unregisterFill(e,r)},[e,t.unregisterFill])}}var O=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function S({name:e,children:t,registerFill:r,unregisterFill:n}){const i=(e=>{const{getSlot:t,subscribe:r}=Object(o.useContext)(O),[n,i]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(i(t(e)),r(()=>{i(t(e))})),[e]),n})(e),a=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(r(e,a.current),()=>n(e,a.current)),[]),Object(o.useLayoutEffect)(()=>{a.current.children=t,i&&i.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==a.current.name&&(n(a.current.name,a.current),a.current.name=e,r(e,a.current))},[e]),i&&i.node?(Object(s.isFunction)(t)&&(t=t(i.props.fillProps)),Object(o.createPortal)(t,i.node)):null}var _=e=>Object(o.createElement)(O.Consumer,null,({registerFill:t,unregisterFill:r})=>Object(o.createElement)(S,Object(n.a)({},e,{registerFill:t,unregisterFill:r})));class j extends o.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,i=Object(s.map)(n(t,this),e=>{const t=Object(s.isFunction)(e.children)?e.children(r):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(s.isString)(e))return e;const r=e.key||t;return Object(o.cloneElement)(e,{key:r})})}).filter(Object(s.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(s.isFunction)(e)?e(i):i)}}var w=e=>Object(o.createElement)(O.Consumer,null,({registerSlot:t,unregisterSlot:r,getFills:i})=>Object(o.createElement)(j,Object(n.a)({},e,{registerSlot:t,unregisterSlot:r,getFills:i})));function k(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function C({name:e,children:t}){const r=v(e),n=Object(o.useRef)({rerender:k()});return Object(o.useEffect)(()=>(r.registerFill(n),()=>{r.unregisterFill(n)}),[r.registerFill,r.unregisterFill]),r.ref&&r.ref.current?("function"==typeof t&&(t=t(r.fillProps)),Object(o.createPortal)(t,r.ref.current)):null}var R=Object(o.forwardRef)((function({name:e,fillProps:t={},as:r="div",...i},a){const s=Object(o.useContext)(E.a),c=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(s.registerSlot(e,c,t),()=>{s.unregisterSlot(e,c)}),[s.registerSlot,s.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{s.updateSlot(e,t)}),Object(o.createElement)(r,Object(n.a)({ref:Object(u.useMergeRefs)([a,c])},i))}));function T(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(_,e),Object(o.createElement)(C,e))}r(11),o.Component;const P=Object(o.forwardRef)(({bubblesVirtually:e,...t},r)=>e?Object(o.createElement)(R,Object(n.a)({},t,{ref:r})):Object(o.createElement)(w,t));function x(e){return"appear"===e?"top":"left"}function A(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:i}=(a=t).ownerDocument.defaultView.getComputedStyle(a);var a;const s=r?parseInt(r,10):0,c=n?parseInt(n,10):0,l=o?parseInt(o,10):0,u=i?parseInt(i,10):0;return{x:e.left+l,y:e.top+s,width:e.width-l-u,height:e.height-s-c,left:e.left+l,right:e.right-u,top:e.top+s,bottom:e.bottom-c}}function N(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function M(e,t,r=""){e.style[t]!==r&&(e.style[t]=r)}function I(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const D=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:r,className:i,noArrow:s=!0,isAlternate:c,position:h="bottom right",range:b,focusOnMount:g="firstElement",anchorRef:E,shouldAnchorIncludePadding:O,anchorRect:S,getAnchorRect:_,expandOnMobile:j,animate:w=!0,onClickOutside:k,onFocusOutside:C,__unstableStickyBoundaryElement:R,__unstableSlotName:P="Popover",__unstableObserveElement:D,__unstableBoundaryParent:L,__unstableForcePosition:F,__unstableForceXAlignment:V,...B},U)=>{const H=Object(o.useRef)(null),G=Object(o.useRef)(null),z=Object(o.useRef)(),W=Object(u.useViewportMatch)("medium","<"),[q,X]=Object(o.useState)(),$=v(P),K=j&&W,[J,Q]=Object(u.useResizeObserver)();s=K||s,Object(o.useLayoutEffect)(()=>{if(K)return I(z.current,"is-without-arrow",s),I(z.current,"is-alternate",c),N(z.current,"data-x-axis"),N(z.current,"data-y-axis"),M(z.current,"top"),M(z.current,"left"),M(G.current,"maxHeight"),void M(G.current,"maxWidth");const e=()=>{if(!z.current||!G.current)return;let e=function(e,t,r,n=!1,o,i){if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return m(t,t.ownerDocument||e.current.ownerDocument,i)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return m(Object(d.getRectangleFromRange)(n),n.endContainer.ownerDocument,i);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=m(n.getBoundingClientRect(),n.ownerDocument,i);return o?e:A(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),a=t.getBoundingClientRect(),s=m(new window.DOMRect(r.left,r.top,r.width,a.bottom-r.top),e.ownerDocument,i);return o?s:A(s,n)}if(!e.current)return;const{parentNode:a}=e.current,s=a.getBoundingClientRect();return o?s:A(s,a)}(H,S,_,E,O,z.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=z.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}var i;L&&(n=null===(i=z.current.closest(".popover-slot"))||void 0===i?void 0:i.parentNode);const a=Q.height?Q:G.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:p,yAxis:b,contentHeight:g,contentWidth:y}=function(e,t,r="top",n,o,i,a,s,c){const[l,u="center",d]=r.split(" "),p=function(e,t,r,n,o,i,a,s){const{height:c}=t;if(o){const t=o.getBoundingClientRect().top+c-a;if(e.top<=t)return{yAxis:r,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===n?l=e.bottom:"top"===n&&(l=e.top);const u={popoverTop:l,contentHeight:(l-c/2>0?c/2:l)+(l+c/2>window.innerHeight?window.innerHeight-l:c/2)},d={popoverTop:e.top,contentHeight:e.top-10-c>0?c:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+c>window.innerHeight?window.innerHeight-10-e.bottom:c};let f,m=r,h=null;if(!o&&!s)if("middle"===r&&u.contentHeight===c)m="middle";else if("top"===r&&d.contentHeight===c)m="top";else if("bottom"===r&&p.contentHeight===c)m="bottom";else{m=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===m?d.contentHeight:p.contentHeight;h=e!==c?e:null}return f="middle"===m?u.popoverTop:"top"===m?d.popoverTop:p.popoverTop,{yAxis:m,popoverTop:f,contentHeight:h}}(e,t,l,d,n,0,i,s);return{...function(e,t,r,n,o,i,a,s,c){const{width:l}=t;"left"===r&&Object(f.isRTL)()?r="right":"right"===r&&Object(f.isRTL)()&&(r="left"),"left"===n&&Object(f.isRTL)()?n="right":"right"===n&&Object(f.isRTL)()&&(n="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===n?p=e.right:"middle"===i||c||(p=u);let m=e.right;"left"===n?m=e.left:"middle"===i||c||(m=u);const h={popoverLeft:p,contentWidth:p-l>0?l:p},b={popoverLeft:m,contentWidth:m+l>window.innerWidth?window.innerWidth-m:l};let g,y=r,E=null;if(!o&&!s)if("center"===r&&d.contentWidth===l)y="center";else if("left"===r&&h.contentWidth===l)y="left";else if("right"===r&&b.contentWidth===l)y="right";else{y=h.contentWidth>b.contentWidth?"left":"right";const e="left"===y?h.contentWidth:b.contentWidth;l>window.innerWidth&&(E=window.innerWidth),e!==l&&(y="center",d.popoverLeft=window.innerWidth/2)}if(g="center"===y?d.popoverLeft:"left"===y?h.popoverLeft:b.popoverLeft,a){const e=a.getBoundingClientRect();g=Math.min(g,e.right-l),Object(f.isRTL)()||(g=Math.max(g,0))}return{xAxis:y,popoverLeft:g,contentWidth:E}}(e,t,u,d,n,p.yAxis,a,s,c),...p}}(e,a,h,R,z.current,o,n,F,V);"number"==typeof l&&"number"==typeof u&&(M(z.current,"top",l+"px"),M(z.current,"left",u+"px")),I(z.current,"is-without-arrow",s||"center"===p&&"middle"===b),I(z.current,"is-alternate",c),N(z.current,"data-x-axis",p),N(z.current,"data-y-axis",b),M(G.current,"maxHeight","number"==typeof g?g+"px":""),M(G.current,"maxWidth","number"==typeof y?y+"px":""),X(({left:"right",right:"left"}[p]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))};e();const{ownerDocument:t}=z.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const i=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",i),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const a=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(E);let l;return a&&a!==t&&(a.defaultView.addEventListener("resize",e),a.defaultView.addEventListener("scroll",e,!0)),D&&(l=new r.MutationObserver(e),l.observe(D,{attributes:!0})),()=>{r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",i),r.cancelAnimationFrame(o),a&&a!==t&&(a.defaultView.removeEventListener("resize",e),a.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}},[K,S,_,E,O,h,Q,R,D,L]);const Z=(e,r)=>{if("focus-outside"===e&&C)C(r);else if("focus-outside"===e&&k){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>r.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),k(e)}else t&&t()},[ee,te]=Object(u.__experimentalUseDialog)({focusOnMount:g,__unstableOnClose:Z,onClose:Z}),re=Object(u.useMergeRefs)([z,ee,U]),ne=Boolean(w&&q)&&function(e){if("loading"===e.type)return a()("components-animate__loading");const{type:t,origin:r=x(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return a()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?a()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:q});let oe=Object(o.createElement)("div",Object(n.a)({className:a()("components-popover",i,ne,{"is-expanded":K,"is-without-arrow":s,"is-alternate":c})},B,{ref:re},te,{tabIndex:"-1"}),K&&Object(o.createElement)(y,null),K&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(Y,{className:"components-popover__close",icon:p.a,onClick:t})),Object(o.createElement)("div",{ref:G,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},J,r)));return $.ref&&(oe=Object(o.createElement)(T,{name:P},oe)),E||S?oe:Object(o.createElement)("span",{ref:H},oe)});D.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(P,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var L=D,F=function({shortcut:e,className:t}){if(!e)return null;let r,n;return Object(s.isString)(e)&&(r=e),Object(s.isObject)(e)&&(r=e.display,n=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":n},r)};const V=Object(o.createElement)("div",{className:"event-catcher"}),B=({eventHandlers:e,child:t,childrenWithPopover:r})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(V,e),Object(o.cloneElement)(t,{children:r}),","),e),U=({child:e,eventHandlers:t,childrenWithPopover:r})=>Object(o.cloneElement)(e,{...t,children:r}),H=(e,t,r)=>{if(1!==o.Children.count(e))return;const n=o.Children.only(e);"function"==typeof n.props[t]&&n.props[t](r)};var G=function({children:e,position:t,text:r,shortcut:n}){const[i,a]=Object(o.useState)(!1),[c,l]=Object(o.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{H(e,"onMouseDown",t),document.addEventListener("mouseup",h),a(!0)},f=t=>{H(e,"onMouseUp",t),document.removeEventListener("mouseup",h),a(!1)},m=e=>"mouseUp"===e?f:"mouseDown"===e?p:void 0,h=m("mouseUp"),b=(t,r)=>n=>{if(H(e,t,n),n.currentTarget.disabled)return;if("focus"===n.type&&i)return;d.cancel();const o=Object(s.includes)(["focus","mouseenter"],n.type);o!==c&&(r?d(o):l(o))},g=()=>{d.cancel(),document.removeEventListener("mouseup",h)};if(Object(o.useEffect)(()=>g,[]),1!==o.Children.count(e))return e;const y={onMouseEnter:b("onMouseEnter",!0),onMouseLeave:b("onMouseLeave"),onClick:b("onClick"),onFocus:b("onFocus"),onBlur:b("onBlur"),onMouseDown:m("mouseDown")},E=o.Children.only(e),{children:v,disabled:O}=E.props;return(O?B:U)({child:E,eventHandlers:y,childrenWithPopover:(({grandchildren:e,isOver:t,position:r,text:n,shortcut:i})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(L,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(o.createElement)(F,{className:"components-tooltip__shortcut",shortcut:i}))))({grandchildren:v,isOver:c,position:t,text:r,shortcut:n})})},z=r(46),W=r(47);const q=["onMouseDown","onClick"];var Y=t.a=Object(o.forwardRef)((function(e,t){const{href:r,target:i,isSmall:c,isPressed:u,isBusy:d,isDestructive:p,className:f,disabled:m,icon:h,iconPosition:b="left",iconSize:g,showTooltip:y,tooltipPosition:E,shortcut:v,label:O,children:S,text:_,variant:j,__experimentalIsFocusable:w,describedBy:k,...C}=function({isDefault:e,isPrimary:t,isSecondary:r,isTertiary:n,isLink:o,variant:i,...a}){let s=i;var c,u,d,p,f;return t&&(null!==(c=s)&&void 0!==c||(s="primary")),n&&(null!==(u=s)&&void 0!==u||(s="tertiary")),r&&(null!==(d=s)&&void 0!==d||(s="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=s)&&void 0!==p||(s="secondary")),o&&(null!==(f=s)&&void 0!==f||(s="link")),{...a,variant:s}}(e),R=a()("components-button",f,{"is-secondary":"secondary"===j,"is-primary":"primary"===j,"is-small":c,"is-tertiary":"tertiary"===j,"is-pressed":u,"is-busy":d,"is-link":"link"===j,"is-destructive":p,"has-text":!!h&&!!S,"has-icon":!!h}),T=m&&!w,P=void 0===r||T?"button":"a",x="a"===P?{href:r,target:i}:{type:"button",disabled:T,"aria-pressed":u};if(m&&w){x["aria-disabled"]=!0;for(const e of q)C[e]=e=>{e.stopPropagation(),e.preventDefault()}}const A=!T&&(y&&O||v||!!O&&(!S||Object(s.isArray)(S)&&!S.length)&&!1!==y),N=k?Object(s.uniqueId)():null,M=C["aria-describedby"]||N,I=Object(o.createElement)(P,Object(n.a)({},x,C,{className:R,"aria-label":C["aria-label"]||O,"aria-describedby":M,ref:t}),h&&"left"===b&&Object(o.createElement)(z.a,{icon:h,size:g}),_&&Object(o.createElement)(o.Fragment,null,_),h&&"right"===b&&Object(o.createElement)(z.a,{icon:h,size:g}),S);return A?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(G,{text:k||O,shortcut:v,position:E},I),k&&Object(o.createElement)(W.a,null,Object(o.createElement)("span",{id:N},k))):Object(o.createElement)(o.Fragment,null,I,k&&Object(o.createElement)(W.a,null,Object(o.createElement)("span",{id:N},k)))}))},function(e,t,r){var n=r(76),o=r(58),i=o.setStyleProp,a=n.html,s=n.svg,c=n.isCustomAttribute,l=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,u;e=e||{};var d={};for(t in e)n=e[t],c(t)?d[t]=n:(r=t.toLowerCase(),l.call(a,r)?d[(u=a[r]).propertyName]=!!(u.hasBooleanValue||u.hasOverloadedBooleanValue&&!n)||n:l.call(s,t)?d[(u=s[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return i(e.style,d),d}},function(e,t,r){var n=r(3),o=r(80).default,i={reactCompat:!0},a=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,i={},a={};for(r in e)n=e[r],o&&(i=t(r,n))&&2===i.length?a[i[0]]=i[1]:"string"==typeof n&&(a[n]=r);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,i))}}},function(e,t,r){for(var n,o=r(86).CASE_SENSITIVE_TAG_NAMES,i={},a=0,s=o.length;a<s;a++)n=o[a],i[n.toLowerCase()]=n;function c(e){for(var t,r={},n=0,o=e.length;n<o;n++)r[(t=e[n]).name]=t.value;return r}function l(e){return function(e){return i[e]}(e=e.toLowerCase())||e}e.exports={formatAttributes:c,formatDOM:function e(t,r,n){r=r||null;for(var o,i,a,s=[],u=0,d=t.length;u<d;u++){switch(o=t[u],a={next:null,prev:s[u-1]||null,parent:r},(i=s[u-1])&&(i.next=a),"#"!==o.nodeName[0]&&(a.name=l(o.nodeName),a.attribs={},o.attributes&&o.attributes.length&&(a.attribs=c(o.attributes))),o.nodeType){case 1:"script"===a.name||"style"===a.name?a.type=a.name:a.type="tag",a.children=e(o.childNodes,a);break;case 3:a.type="text",a.data=o.nodeValue;break;case 8:a.type="comment",a.data=o.nodeValue}s.push(a)}return n&&(s.unshift({name:n.substring(0,n.indexOf(" ")).toLowerCase(),data:n,type:"directive",next:s[0]?s[0]:null,prev:null,parent:r}),s[1]&&(s[1].prev=s[0])),s},isIE:function(e){return e?document.documentMode===e:/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},function(e,t){e.exports=window.wp.dom},function(e,t,r){var n=r(75),o=r(57),i=r(84),a={decodeEntities:!0,lowerCaseAttributeNames:!1};function s(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(i(e,(t=t||{}).htmlparser2||a),t)}s.domToReact=n,s.htmlToDOM=i,s.attributesToProps=o,e.exports=s,e.exports.default=s},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},,,function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c,l=[],u=!1,d=-1;function p(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&f())}function f(){if(!u){var e=s(p);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new m(e,t)),1!==l.length||u||s(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){"use strict";r.d(t,"n",(function(){return i})),r.d(t,"l",(function(){return a})),r.d(t,"k",(function(){return s})),r.d(t,"m",(function(){return c})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return f})),r.d(t,"e",(function(){return m})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return b})),r.d(t,"h",(function(){return g})),r.d(t,"b",(function(){return y}));var n,o=r(2);const i=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=i.pluginUrl+"images/",s=i.pluginUrl+"build/",c=i.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),f=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),h=Object(o.getSetting)("shippingCountries",{}),b=Object(o.getSetting)("allowedCountries",{}),g=Object(o.getSetting)("shippingStates",{}),y=Object(o.getSetting)("allowedStates",{})},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"c",(function(){return a})),r.d(t,"b",(function(){return s}));const n=window.CustomEvent||null,o=(e,t)=>{let{bubbles:r=!1,cancelable:o=!1,element:i,detail:a={}}=t;if(!n)return;i||(i=document.body);const s=new n(e,{bubbles:r,cancelable:o,detail:a});i.dispatchEvent(s)};let i;const a=()=>{i&&clearTimeout(i),i=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const i=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,i),()=>jQuery(document).off(e,i)}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>e.reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})},function(e,t,r){"use strict";var n=r(10),o=r.n(n),i=r(0);r(101);const a=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const r=Object(i.useRef)(null);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),Object(i.createElement)(e,o()({},t,{scrollToTop:e=>{null!==r.current&&((e,t)=>{const{focusableSelector:r}=t||{};window&&Number.isFinite(window.innerHeight)&&(r?((e,t)=>{var r;const n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){const e=n[0];a(e),null==e||e.focus()}else a(e)})(e,r):a(e))})(r.current,e)}})))}},,,function(e,t){},function(e,t,r){var n=r(3),o=r(57),i=r(58),a=i.setStyleProp;function s(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&i.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var i,c,l,u,d=(r=r||{}).library||n,p=d.cloneElement,f=d.createElement,m=d.isValidElement,h=[],b="function"==typeof r.replace,g=r.trim,y=0,E=t.length;y<E;y++)if(i=t[y],b&&m(c=r.replace(i)))E>1&&(c=p(c,{key:c.key||y})),h.push(c);else if("text"!==i.type){switch(l=i.attribs,s(i)?a(l.style,l):l&&(l=o(l)),u=null,i.type){case"script":case"style":i.children[0]&&(l.dangerouslySetInnerHTML={__html:i.children[0].data});break;case"tag":"textarea"===i.name&&i.children[0]?l.defaultValue=i.children[0].data:i.children&&i.children.length&&(u=e(i.children,r));break;default:continue}E>1&&(l.key=y),h.push(f(i.name,l,u))}else g?i.data.trim()&&h.push(i.data):h.push(i.data);return 1===h.length?h[0]:h}},function(e,t,r){var n=r(77),o=r(78),i=r(79),a=i.MUST_USE_PROPERTY,s=i.HAS_BOOLEAN_VALUE,c=i.HAS_NUMERIC_VALUE,l=i.HAS_POSITIVE_NUMERIC_VALUE,u=i.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function p(e,t,r){var n,o,i,p=e.Properties,f=e.DOMAttributeNames;for(o in p)n=f[o]||(r?o:o.toLowerCase()),i=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(i,a),hasBooleanValue:d(i,s),hasNumericValue:d(i,c),hasPositiveNumericValue:d(i,l),hasOverloadedBooleanValue:d(i,u)}}var f={};p(n,f);var m={};p(o,m,!0);var h={};p(n,h),p(o,h,!0),e.exports={html:f,svg:m,properties:h,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(81)),i=r(83);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[i.camelCase(e,t)]=n)})),r):r}},function(e,t,r){var n=r(82);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var i,a,s=n(e),c="function"==typeof t,l=0,u=s.length;l<u;l++)i=(r=s[l]).property,a=r.value,c?t(i,a,r):a&&(o||(o={}),o[i]=a);return o}},function(e,t){var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e){return e?e.replace(l,""):""}e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var l=1,d=1;function p(e){var t=e.match(n);t&&(l+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function f(){var e={line:l,column:d};return function(t){return t.position=new m(e),y(),t}}function m(e){this.start=e,this.end={line:l,column:d},this.source=t.source}m.prototype.content=e;var h=[];function b(r){var n=new Error(t.source+":"+l+":"+d+": "+r);if(n.reason=r,n.filename=t.source,n.line=l,n.column=d,n.source=e,!t.silent)throw n;h.push(n)}function g(t){var r=t.exec(e);if(r){var n=r[0];return p(n),e=e.slice(n.length),r}}function y(){g(o)}function E(e){var t;for(e=e||[];t=v();)!1!==t&&e.push(t);return e}function v(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;""!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return b("End of comment missing");var n=e.slice(2,r-2);return d+=2,p(n),e=e.slice(r),d+=2,t({type:"comment",comment:n})}}function O(){var e=f(),t=g(i);if(t){if(v(),!g(a))return b("property missing ':'");var n=g(s),o=e({type:"declaration",property:u(t[0].replace(r,"")),value:n?u(n[0].replace(r,"")):""});return g(c),o}}return y(),function(){var e,t=[];for(E(t);e=O();)!1!==e&&(t.push(e),E(t));return t}()}},function(e,t,r){"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=function(e,t){return t.toUpperCase()},c=function(e,t){return t+"-"};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||i.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),t.reactCompat||(e=e.replace(a,c)),e.replace(o,s))}},function(e,t,r){var n=r(85),o=r(59),i=o.formatDOM,a=o.isIE(9),s=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(s);return r&&r[1]&&(t=r[1],a&&(e=e.replace(r[0],""))),i(n(e),null,t)}},function(e,t,r){var n=r(59),o=/<([a-zA-Z]+[0-9]?)/,i=/<head.*>/i,a=/<body.*>/i,s=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,c=n.isIE(9),l=c||n.isIE(),u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,f=c?"text/xml":"text/html";u=d=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),c&&(e=e.replace(s,"<$1$2$3/>")),p.parseFromString(e,f)}}if(document.implementation){var m=document.implementation.createHTMLDocument(l?"html-dom-parser":void 0);u=function(e,t){if(t)return m.documentElement.getElementsByTagName(t)[0].innerHTML=e,m;try{return m.documentElement.innerHTML=e,m}catch(t){if(d)return d(e)}}}var h,b=document.createElement("template");b.content&&(h=function(e){return b.innerHTML=e,b.content.childNodes}),e.exports=function(e){var t,r,n,s,c=e.match(o);switch(c&&c[1]&&(t=c[1].toLowerCase()),t){case"html":return r=d(e),i.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),a.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return s=u(e).getElementsByTagName(t),a.test(e)&&i.test(e)?s[0].parentNode.childNodes:s;default:return h?h(e):u(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return b}));var n=r(0),o=(r(8),r(9)),i=r(38),a=r(18),s=r(10),c=r.n(s),l=r(4),u=r.n(l),d=r(116);r(74);const p=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""};var f=e=>{let{className:t,notices:r,removeNotice:o}=e;const i=r.filter(e=>"snackbar"!==e.type);if(!i.length)return null;const a=u()(t,"wc-block-components-notices");return Object(n.createElement)("div",{className:a},i.map(e=>Object(n.createElement)(d.a,c()({key:"store-notice-"+e.id},e,{className:u()("wc-block-components-notices__notice",p(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const m=Object(n.createContext)({notices:[],createNotice:(e,t,r)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),h=()=>Object(n.useContext)(m),b=e=>{let{children:t,className:r="",createNoticeContainer:s=!0,context:c="wc/core"}=e;const{createNotice:l,removeNotice:u}=Object(o.useDispatch)("core/notices"),[d,p]=Object(n.useState)(!1),{dispatchStoreEvent:h}=Object(i.a)(),{isEditor:b}=Object(a.a)(),g=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};l(e,t,{...r,context:r.context||c}),h("store-notice-create",{status:e,content:t,options:r})}),[l,h,c]),y=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;u(e,t)}),[u,c]),{notices:E}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(c)}),[c]),v={notices:E,createNotice:g,removeNotice:y,context:c,setIsSuppressed:p},O=d?null:Object(n.createElement)(f,{className:r,notices:v.notices,removeNotice:v.removeNotice,isEditor:b});return Object(n.createElement)(m.Provider,{value:v},s&&O,t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},i=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return s}));var n=r(5);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const i={addEventCallback:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(n.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},a={},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:r,id:n,callback:i,priority:s}=arguments.length>1?arguments[1]:void 0;const c=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return c.set(n,{priority:s,callback:i}),{...e,[r]:c};case o.REMOVE_EVENT_CALLBACK:return c.delete(n),{...e,[r]:c}}}},function(e,t,r){"use strict";var n=r(0),o=r(24);const i=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=i},function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(10)),i=n(r(120)),a=r(3),s=n(a),c=n(r(121)),l=n(r(123)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var r;for(r in e)if(!(r in t))return!1;for(r in t)if(e[r]!==t[r])return!1;return!u.und(r)||e===t}};function d(){var e=a.useState(!1)[1];return a.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function m(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return u.fun(e)?e.apply(void 0,r):e}function h(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,i(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var r=Object.keys(e).reduce((function(r,n){var i;return u.und(t[n])?o({},r,((i={})[n]=e[n],i)):r}),{});return o({to:t},r)}var b,g,y=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),E=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof y&&e.addChild(l(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof y&&e.removeChild(l(t))}))},t}return c(t,e),t}(y),v=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof y&&e.addChild(l(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof y&&e.removeChild(l(t))}))},t}c(t,e);var r=t.prototype;return r.getValue=function(e){void 0===e&&(e=!1);var t={};for(var r in this.payload){var n=this.payload[r];(!e||n instanceof y)&&(t[r]=n instanceof y?n[e?"getAnimatedValue":"getValue"]():n)}return t},r.getAnimatedValue=function(){return this.getValue(!0)},t}(y);function O(e,t){b={fn:e,transform:t}}function S(e){g=e}var _,j=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},w=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function k(e){_=e}var C,R=function(){return Date.now()};function T(e){C=e}var P,x,A=function(e){return e.current};function N(e){P=e}var M=Object.freeze({get applyAnimatedValues(){return b},injectApplyAnimatedValues:O,get colorNames(){return g},injectColorNames:S,get requestFrame(){return j},get cancelFrame(){return w},injectFrame:function(e,t){j=e,w=t},get interpolation(){return _},injectStringInterpolator:k,get now(){return R},injectNow:function(e){R=e},get defaultElement(){return C},injectDefaultElement:T,get animatedApi(){return A},injectAnimatedApi:function(e){A=e},get createAnimatedStyle(){return P},injectCreateAnimatedStyle:N,get manualFrameloop(){return x},injectManualFrameloop:function(e){x=e}}),I=function(e){function t(t,r){var n;return(n=e.call(this)||this).update=void 0,n.payload=t.style?o({},t,{style:P(t.style)}):t,n.update=r,n.attach(),n}return c(t,e),t}(v),D=!1,L=new Set,F=function e(){if(!D)return!1;var t=R(),r=L,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var i;if(n){if(o>=r.length)break;i=r[o++]}else{if((o=r.next()).done)break;i=o.value}for(var a=i,s=!1,c=0;c<a.configs.length;c++){for(var l=a.configs[c],u=void 0,d=void 0,p=0;p<l.animatedValues.length;p++){var f=l.animatedValues[p];if(!f.done){var m=l.fromValues[p],h=l.toValues[p],b=f.lastPosition,g=h instanceof y,E=Array.isArray(l.initialVelocity)?l.initialVelocity[p]:l.initialVelocity;if(g&&(h=h.getValue()),l.immediate)f.setValue(h),f.done=!0;else if("string"!=typeof m&&"string"!=typeof h){if(void 0!==l.duration)b=m+l.easing((t-f.startTime)/l.duration)*(h-m),u=t>=f.startTime+l.duration;else if(l.decay)b=m+E/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-b)<.1)&&(h=b);else{d=void 0!==f.lastTime?f.lastTime:t,E=void 0!==f.lastVelocity?f.lastVelocity:l.initialVelocity,t>d+64&&(d=t);for(var v=Math.floor(t-d),O=0;O<v;++O)b+=1*(E+=(-l.tension*(b-h)+-l.friction*E)/l.mass*1/1e3)/1e3;var S=!(!l.clamp||0===l.tension)&&(m<h?b>h:b<h),_=Math.abs(E)<=l.precision,w=0===l.tension||Math.abs(h-b)<=l.precision;u=S||_&&w,f.lastVelocity=E,f.lastTime=t}g&&!l.toValues[p].done&&(u=!1),u?(f.value!==h&&(b=h),f.done=!0):s=!0,f.setValue(b),f.lastPosition=b}else f.setValue(h),f.done=!0}}a.props.onFrame&&(a.values[l.name]=l.interpolation.getValue())}a.props.onFrame&&a.props.onFrame(a.values),s||(L.delete(a),a.stop(!0))}return L.size?x?x():j(e):D=!1,D};function V(e,t,r){if("function"==typeof e)return e;if(Array.isArray(e))return V({range:e,output:t,extrapolate:r});if(_&&"string"==typeof e.output[0])return _(e);var n=e,o=n.output,i=n.range||[0,1],a=n.extrapolateLeft||n.extrapolate||"extend",s=n.extrapolateRight||n.extrapolate||"extend",c=n.easing||function(e){return e};return function(e){var t=function(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}(e,i);return function(e,t,r,n,o,i,a,s,c){var l=c?c(e):e;if(l<t){if("identity"===a)return l;"clamp"===a&&(l=t)}if(l>r){if("identity"===s)return l;"clamp"===s&&(l=r)}return n===o?n:t===r?e<=t?n:o:(t===-1/0?l=-l:r===1/0?l-=t:l=(l-t)/(r-t),l=i(l),n===-1/0?l=-l:o===1/0?l+=n:l=l*(o-n)+n,l)}(e,i[t],i[t+1],o[t],o[t+1],c,a,s,n.map)}}var B=function(e){function t(r,n,o,i){var a;return(a=e.call(this)||this).calc=void 0,a.payload=r instanceof E&&!(r instanceof t)?r.getPayload():Array.isArray(r)?r:[r],a.calc=V(n,o,i),a}c(t,e);var r=t.prototype;return r.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},r.updateConfig=function(e,t,r){this.calc=V(e,t,r)},r.interpolate=function(e,r,n){return new t(this,e,r,n)},t}(E),U=function(e){function t(t){var r;return(r=e.call(this)||this).animatedStyles=new Set,r.value=void 0,r.startPosition=void 0,r.lastPosition=void 0,r.lastVelocity=void 0,r.startTime=void 0,r.lastTime=void 0,r.done=!1,r.setValue=function(e,t){void 0===t&&(t=!0),r.value=e,t&&r.flush()},r.value=t,r.startPosition=t,r.lastPosition=t,r}c(t,e);var r=t.prototype;return r.flush=function(){0===this.animatedStyles.size&&function e(t,r){"update"in t?r.add(t):t.getChildren().forEach((function(t){return e(t,r)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},r.clearStyles=function(){this.animatedStyles.clear()},r.getValue=function(){return this.value},r.interpolate=function(e,t,r){return new B(this,e,t,r)},t}(y),H=function(e){function t(t){var r;return(r=e.call(this)||this).payload=t.map((function(e){return new U(e)})),r}c(t,e);var r=t.prototype;return r.setValue=function(e,t){var r=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,n){return r.payload[n].setValue(e,t)})):this.payload.forEach((function(r){return r.setValue(e,t)}))},r.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},r.interpolate=function(e,t){return new B(this,e,t)},t}(E),G=0,z=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),r=t.delay,n=void 0===r?0:r,a=t.to,s=i(t,["delay","to"]);if(u.arr(a)||u.fun(a))this.queue.push(o({},s,{delay:n,to:a}));else if(a){var c={};Object.entries(a).forEach((function(e){var t,r=e[0],i=e[1],a=o({to:(t={},t[r]=i,t),delay:m(n,r)},s),l=c[a.delay]&&c[a.delay].to;c[a.delay]=o({},c[a.delay],a,{to:o({},l,a.to)})})),this.queue=Object.values(c)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(s),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var r=e.from,n=void 0===r?{}:r,i=e.to,a=void 0===i?{}:i;u.obj(n)&&(t.merged=o({},n,t.merged)),u.obj(a)&&(t.merged=o({},t.merged,a))}));var r=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach((function(o,a){var s=o.delay,c=i(o,["delay"]),l=function(o){a===n.length-1&&r===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(c.to)||u.fun(c.to);s?setTimeout((function(){r===t.guid&&(d?t.runAsync(c,l):t.diff(c).start(l))}),s):d?t.runAsync(c,l):t.diff(c).start(l)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),D||(D=!0,j(x||F));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var r=this,n=(e.delay,i(e,["delay"])),a=this.local,s=Promise.resolve(void 0);if(u.arr(n.to))for(var c=function(e){var t=e,i=o({},n,h(n.to[t]));u.arr(i.config)&&(i.config=i.config[t]),s=s.then((function(){if(a===r.guid)return new Promise((function(e){return r.diff(i).start(e)}))}))},l=0;l<n.to.length;l++)c(l);else if(u.fun(n.to)){var d,p=0;s=s.then((function(){return n.to((function(e){var t=o({},n,h(e));if(u.arr(t.config)&&(t.config=t.config[p]),p++,a===r.guid)return d=new Promise((function(e){return r.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),r.stop(e)})).then((function(){return d}))}))}s.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var r=this.props,n=r.from,i=void 0===n?{}:n,a=r.to,s=void 0===a?{}:a,c=r.config,l=void 0===c?{}:c,d=r.reverse,h=r.attach,b=r.reset,y=r.immediate;if(d){var E=[s,i];i=E[0],s=E[1]}this.merged=o({},i,this.merged,s),this.hasChanged=!1;var v=h&&h(this);if(this.animations=Object.entries(this.merged).reduce((function(e,r){var n=r[0],a=r[1],s=e[n]||{},c=u.num(a),d=u.str(a)&&!a.startsWith("#")&&!/\d/.test(a)&&!g[a],h=u.arr(a),E=!c&&!h&&!d,O=u.und(i[n])?a:i[n],S=c||h||d?a:1,j=m(l,n);v&&(S=v.animations[n].parent);var w,k=s.parent,C=s.interpolation,T=f(v?S.getPayload():S),P=a;E&&(P=_({range:[0,1],output:[a,a]})(1));var x,A=C&&C.getValue(),N=!u.und(k)&&s.animatedValues.some((function(e){return!e.done})),M=!u.equ(P,A),I=!u.equ(P,s.previous),D=!u.equ(j,s.config);if(b||I&&M||D){var L;if(c||d)k=C=s.parent||new U(O);else if(h)k=C=s.parent||new H(O);else if(E){var F=s.interpolation&&s.interpolation.calc(s.parent.value);F=void 0===F||b?O:F,s.parent?(k=s.parent).setValue(0,!1):k=new U(0);var V={output:[F,a]};s.interpolation?(C=s.interpolation,s.interpolation.updateConfig(V)):C=k.interpolate(V)}return T=f(v?S.getPayload():S),w=f(k.getPayload()),b&&!E&&k.setValue(O,!1),t.hasChanged=!0,w.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=N?e.lastVelocity:void 0,e.lastTime=N?e.lastTime:void 0,e.startTime=R(),e.done=!1,e.animatedStyles.clear()})),m(y,n)&&k.setValue(E?S:a,!1),o({},e,((L={})[n]=o({},s,{name:n,parent:k,interpolation:C,animatedValues:w,toValues:T,previous:P,config:j,fromValues:f(k.getValue()),immediate:m(y,n),initialVelocity:p(j.velocity,0),clamp:p(j.clamp,!1),precision:p(j.precision,.01),tension:p(j.tension,170),friction:p(j.friction,26),mass:p(j.mass,1),duration:j.duration,easing:p(j.easing,(function(e){return e})),decay:j.decay}),L))}return M?e:(E&&(k.setValue(1,!1),C.updateConfig({output:[P,P]})),k.done=!0,t.hasChanged=!0,o({},e,((x={})[n]=o({},e[n],{previous:P}),x)))}),this.animations),this.hasChanged)for(var O in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[O]=this.animations[O].interpolation,this.values[O]=this.animations[O].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),W=function(e,t){var r=a.useRef(!1),n=a.useRef(),o=u.fun(t),i=a.useMemo((function(){var r;return n.current&&(n.current.map((function(e){return e.destroy()})),n.current=void 0),[new Array(e).fill().map((function(e,n){var i=new z,a=o?m(t,n,i):t[n];return 0===n&&(r=a.ref),i.update(a),r||i.start(),i})),r]}),[e]),s=i[0],c=i[1];n.current=s,a.useImperativeHandle(c,(function(){return{start:function(){return Promise.all(n.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return n.current.forEach((function(t){return t.stop(e)}))},get controllers(){return n.current}}}));var l=a.useMemo((function(){return function(e){return n.current.map((function(t,r){t.update(o?m(e,r,t):e[r]),c||t.start()}))}}),[e]);a.useEffect((function(){r.current?o||l(t):c||n.current.forEach((function(e){return e.start()}))})),a.useEffect((function(){return r.current=!0,function(){return n.current.forEach((function(e){return e.destroy()}))}}),[]);var d=n.current.map((function(e){return e.getValues()}));return o?[d,l,function(e){return n.current.forEach((function(t){return t.pause(e)}))}]:d},q=0,Y=function(e,t){return("function"==typeof t?e.map(t):f(t)).map(String)},X=function(e){var t=e.items,r=e.keys,n=void 0===r?function(e){return e}:r,a=i(e,["items","keys"]);return t=f(void 0!==t?t:null),o({items:t,keys:Y(t,n)},a)};function $(e,t){var r=function(){if(o){if(i>=n.length)return"break";a=n[i++]}else{if((i=n.next()).done)return"break";a=i.value}var r=a.key,s=function(e){return e.key!==r};(u.und(t)||t===r)&&(e.current.instances.delete(r),e.current.transitions=e.current.transitions.filter(s),e.current.deleted=e.current.deleted.filter(s))},n=e.current.deleted,o=Array.isArray(n),i=0;for(n=o?n:n[Symbol.iterator]();;){var a;if("break"===r())break}e.current.forceUpdate()}var K=function(e){function t(t){var r;return void 0===t&&(t={}),r=e.call(this)||this,!t.transform||t.transform instanceof y||(t=b.transform(t)),r.payload=t,r}return c(t,e),t}(v),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Q="[-+]?\\d*\\.?\\d+";function Z(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+Z(Q,Q,Q)),te=new RegExp("rgba"+Z(Q,Q,Q,Q)),re=new RegExp("hsl"+Z(Q,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),ne=new RegExp("hsla"+Z(Q,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Q)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ae=/^#([0-9a-fA-F]{6})$/,se=/^#([0-9a-fA-F]{8})$/;function ce(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function le(e,t,r){var n=r<.5?r*(1+t):r+t-r*t,o=2*r-n,i=ce(o,n,e+1/3),a=ce(o,n,e),s=ce(o,n,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,r,n="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(r=ae.exec(t))?parseInt(r[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(r=ee.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|255)>>>0:(r=te.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|pe(r[4]))>>>0:(r=oe.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=se.exec(t))?parseInt(r[1],16)>>>0:(r=ie.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=re.exec(t))?(255|le(de(r[1]),fe(r[2]),fe(r[3])))>>>0:(r=ne.exec(t))?(le(de(r[1]),fe(r[2]),fe(r[3]))|pe(r[4]))>>>0:null;return null===n?e:"rgba("+((4278190080&(n=n||0))>>>24)+", "+((16711680&n)>>>16)+", "+((65280&n)>>>8)+", "+(255&n)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,be=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(J).join("|")+")","g"),ye={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ee=["Webkit","Ms","Moz","O"];function ve(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||ye.hasOwnProperty(e)&&ye[e]?(""+t).trim():t+"px"}ye=Object.keys(ye).reduce((function(e,t){return Ee.forEach((function(r){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(r,t)]=e[t]})),e}),ye);var Oe={};N((function(e){return new K(e)})),T("div"),k((function(e){var t=e.output.map((function(e){return e.replace(be,me)})).map((function(e){return e.replace(ge,me)})),r=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return r[t].push(+e)}))}));var n=t[0].match(he).map((function(t,n){return V(o({},e,{output:r[n]}))}));return function(e){var r=0;return t[0].replace(he,(function(){return n[r++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,r,n,o){return"rgba("+Math.round(t)+", "+Math.round(r)+", "+Math.round(n)+", "+o+")"}))}})),S(J),O((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var r=t.style,n=t.children,o=t.scrollTop,a=t.scrollLeft,s=i(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==n&&(e.textContent=n),r)if(r.hasOwnProperty(l)){var u=0===l.indexOf("--"),d=ve(l,r[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,d):e.style[l]=d}for(var p in s){var f=c?p:Oe[p]||(Oe[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,s[p])}}),(function(e){return e}));var Se,_e,je=(Se=function(e){return a.forwardRef((function(t,r){var n=d(),c=a.useRef(!0),l=a.useRef(null),p=a.useRef(null),f=a.useCallback((function(e){var t=l.current;l.current=new I(e,(function(){var e=!1;p.current&&(e=b.fn(p.current,l.current.getAnimatedValue())),p.current&&!1!==e||n()})),t&&t.detach()}),[]);a.useEffect((function(){return function(){c.current=!1,l.current&&l.current.detach()}}),[]),a.useImperativeHandle(r,(function(){return A(p,c,n)})),f(t);var m,h=l.current.getValue(),g=(h.scrollTop,h.scrollLeft,i(h,["scrollTop","scrollLeft"])),y=(m=e,!u.fun(m)||m.prototype instanceof s.Component?function(e){return p.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,r)}:void 0);return s.createElement(e,o({},g,{ref:y}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var r=_e?t[0].toLowerCase()+t.substring(1):t;return e[r]=Se(r),e}),Se)}),we=je(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=je,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=F,t.animated=we,t.a=we,t.interpolate=function(e,t,r){return e&&new B(e,t,r)},t.Globals=M,t.useSpring=function(e){var t=u.fun(e),r=W(1,t?e:[e]),n=r[0],o=r[1],i=r[2];return t?[n[0],o,i]:n},t.useTrail=function(e,t){var r=a.useRef(!1),n=u.fun(t),i=m(t),s=a.useRef(),c=W(e,(function(e,t){return 0===e&&(s.current=[]),s.current.push(t),o({},i,{config:m(i.config,e),attach:e>0&&function(){return s.current[e-1]}})})),l=c[0],d=c[1],p=c[2],f=a.useMemo((function(){return function(e){return d((function(t,r){e.reverse;var n=e.reverse?t+1:t-1,a=s.current[n];return o({},e,{config:m(e.config||i.config,t),attach:a&&function(){return a}})}))}}),[e,i.reverse]);return a.useEffect((function(){r.current&&!n&&f(t)})),a.useEffect((function(){r.current=!0}),[]),n?[l,f,p]:l},t.useTransition=function(e,t,r){var n=o({items:e,keys:t||function(e){return e}},r),s=X(n),c=s.lazy,l=void 0!==c&&c,u=(s.unique,s.reset),p=void 0!==u&&u,f=(s.enter,s.leave,s.update,s.onDestroyed),h=(s.keys,s.items,s.onFrame),b=s.onRest,g=s.onStart,y=s.ref,E=i(s,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),v=d(),O=a.useRef(!1),S=a.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!n.ref,instances:!O.current&&new Map,forceUpdate:v});return a.useImperativeHandle(n.ref,(function(){return{start:function(){return Promise.all(Array.from(S.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(S.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(S.current.instances).map((function(e){return e[1]}))}}})),S.current=function(e,t){for(var r=e.first,n=e.prevProps,a=i(e,["first","prevProps"]),s=X(t),c=s.items,l=s.keys,u=s.initial,d=s.from,p=s.enter,f=s.leave,h=s.update,b=s.trail,g=void 0===b?0:b,y=s.unique,E=s.config,v=s.order,O=void 0===v?["enter","leave","update"]:v,S=X(n),_=S.keys,j=S.items,w=o({},a.current),k=[].concat(a.deleted),C=Object.keys(w),R=new Set(C),T=new Set(l),P=l.filter((function(e){return!R.has(e)})),x=a.transitions.filter((function(e){return!e.destroyed&&!T.has(e.originalKey)})).map((function(e){return e.originalKey})),A=l.filter((function(e){return R.has(e)})),N=-g;O.length;)switch(O.shift()){case"enter":P.forEach((function(e,t){y&&k.find((function(t){return t.originalKey===e}))&&(k=k.filter((function(t){return t.originalKey!==e})));var n=l.indexOf(e),o=c[n],i=r&&void 0!==u?"initial":"enter";w[e]={slot:i,originalKey:e,key:y?String(e):q++,item:o,trail:N+=g,config:m(E,o,i),from:m(r&&void 0!==u?u||{}:d,o),to:m(p,o)}}));break;case"leave":x.forEach((function(e){var t=_.indexOf(e),r=j[t];k.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=g,config:m(E,r,"leave"),to:m(f,r)})),delete w[e]}));break;case"update":A.forEach((function(e){var t=l.indexOf(e),r=c[t];w[e]=o({},w[e],{item:r,slot:"update",trail:N+=g,config:m(E,r,"update"),to:m(h,r)})}))}var M=l.map((function(e){return w[e]}));return k.forEach((function(e){var t,r=e.left,n=(e.right,i(e,["left","right"]));-1!==(t=M.findIndex((function(e){return e.originalKey===r})))&&(t+=1),t=Math.max(0,t),M=[].concat(M.slice(0,t),[n],M.slice(t))})),o({},a,{changed:P.length||x.length||A.length,first:r&&0===P.length,transitions:M,current:w,deleted:k,prevProps:t})}(S.current,n),S.current.changed&&S.current.transitions.forEach((function(e){var t=e.slot,r=e.from,n=e.to,i=e.config,a=e.trail,s=e.key,c=e.item;S.current.instances.has(s)||S.current.instances.set(s,new z);var u=S.current.instances.get(s),d=o({},E,{to:n,from:r,config:i,ref:y,onRest:function(r){S.current.mounted&&(e.destroyed&&(y||l||$(S,s),f&&f(c)),!Array.from(S.current.instances).some((function(e){return!e[1].idle}))&&(y||l)&&S.current.deleted.length>0&&$(S),b&&b(c,t,r))},onStart:g&&function(){return g(c,t)},onFrame:h&&function(e){return h(c,t,e)},delay:a,reset:p&&"enter"===t});u.update(d),S.current.paused||u.start()})),a.useEffect((function(){return S.current.mounted=O.current=!0,function(){S.current.mounted=O.current=!1,Array.from(S.current.instances).map((function(e){return e[1].destroy()})),S.current.instances.clear()}}),[]),S.current.transitions.map((function(e){var t=e.item,r=e.slot,n=e.key;return{item:t,key:n,state:r,props:S.current.instances.get(n).getValues()}}))},t.useChain=function(e,t,r){void 0===r&&(r=1e3);var n=a.useRef();a.useEffect((function(){u.equ(e,n.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,n){var i=e.current;if(i){var a=i.controllers;if(a.length){var s=r*t[n];a.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+s})})),e.start()}))}}})):e.reduce((function(e,t,r){var n=t.current;return e.then((function(){return n.start()}))}),Promise.resolve()),n.current=e}))},t.useSprings=W},,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(9),o=r(0),i=r(6),a=r(54);const s=()=>{const e=Object(a.a)(),{selectShippingRate:t}=Object(n.useDispatch)(i.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((r,n)=>{t(r,n).catch(t=>{e(t)})},[e,t]),isSelectingRate:Object(n.useSelect)(e=>e(i.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},,function(e,t){},,,,,,function(e,t,r){"use strict";(function(e){var n=r(0),o=r(5),i=r(4),a=r.n(i),s=r(23),c=r(1),l=(r(45),r(56));t.a=Object(n.forwardRef)((function({className:t,children:r,spokenMessage:i=r,politeness:u="polite",actions:d=[],onRemove:p=o.noop,icon:f=null,explicitDismiss:m=!1,onDismiss:h=o.noop},b){function g(e){e&&e.preventDefault&&e.preventDefault(),h(),p()}h=h||o.noop,function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(s.speak)(r,t)},[r,t])}(i,u),Object(n.useEffect)(()=>{const e=setTimeout(()=>{m||(h(),p())},1e4);return()=>clearTimeout(e)},[h,p]);const y=a()(t,"components-snackbar",{"components-snackbar-explicit-dismiss":!!m});d&&d.length>1&&(void 0!==e&&e.env,d=[d[0]]);const E=a()("components-snackbar__content",{"components-snackbar__content-with-icon":!!f});return Object(n.createElement)("div",{ref:b,className:y,onClick:m?o.noop:g,tabIndex:"0",role:m?"":"button",onKeyPress:m?o.noop:g,"aria-label":m?"":Object(c.__)("Dismiss this notice")},Object(n.createElement)("div",{className:E},f&&Object(n.createElement)("div",{className:"components-snackbar__icon"},f),r,d.map(({label:e,onClick:t,url:r},o)=>Object(n.createElement)(l.a,{key:o,href:r,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),p(),t&&t(e)}(e,t),className:"components-snackbar__action"},e)),m&&Object(n.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:g,onKeyPress:g},"✕")))}))}).call(this,r(65))},function(e,t){e.exports=window.wp.plugins},function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){return c}));var n=r(2),o=r(50),i=r(34);const a=e=>{let{country:t="",state:r="",city:n="",postcode:o=""}=e;return{country:t.trim(),state:r.trim(),city:n.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},s=e=>{let{email:t=""}=e;return Object(i.isEmail)(t)?t.trim():""},c=e=>{const t=Object.keys(n.defaultAddressFields),r=Object(o.a)(t,{},e.country),i=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(i[r]="")}),i}},function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},,function(e,t,r){"use strict";var n=r(0),o=r(5),i=r(4),a=r.n(i),s=r(1),c=r(23),l=r(90),u=r(56);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:r,spokenMessage:i=r,onRemove:p=o.noop,isDismissible:f=!0,actions:m=[],politeness:h=d(t),__unstableHTML:b,onDismiss:g=o.noop}){!function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(c.speak)(r,t)},[r,t])}(i,h);const y=a()(e,"components-notice","is-"+t,{"is-dismissible":f});return b&&(r=Object(n.createElement)(n.RawHTML,null,r)),Object(n.createElement)("div",{className:y},Object(n.createElement)("div",{className:"components-notice__content"},r,Object(n.createElement)("div",{className:"components-notice__actions"},m.map(({className:e,label:t,isPrimary:r,variant:o,noDefaultClasses:i=!1,onClick:s,url:c},l)=>{let d=o;return"primary"===o||i||(d=c?"link":"secondary"),void 0===d&&r&&(d="primary"),Object(n.createElement)(u.a,{key:l,href:c,variant:d,onClick:c?void 0:s,className:a()("components-notice__action",e)},t)}))),f&&Object(n.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(s.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),g(),p()},showTooltip:!1}))}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(0),o=r(53),i=r(61),a=r.n(i),s=r(13);const c=(e,t)=>e&&t[e]?t[e]:null,l=e=>{let{block:t,blockMap:r,blockWrapper:o,children:i,depth:u=1}=e;return i&&0!==i.length?Array.from(i).map((e,i)=>{const{blockName:d="",...p}={key:`${t}_${u}_${i}`,...e instanceof HTMLElement?e.dataset:{},className:e.className||""},f=c(d,r);if(!f){const i=a()((null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof i&&i)return i;if(!Object(n.isValidElement)(i))return null;const s=e.childNodes.length?l({block:t,blockMap:r,children:e.childNodes,depth:u+1,blockWrapper:o}):void 0;return s?Object(n.cloneElement)(i,p,s):Object(n.cloneElement)(i,p)}const m=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${u}_${i}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(m,null,Object(n.createElement)(f,p,l({block:t,blockMap:r,children:e.children,depth:u+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(s.hasInnerBlocks)(e))return null;const i=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],a=Object(s.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!i.includes(t)}),l=o||n.Fragment;return Object(n.createElement)(l,null,a.map((e,r)=>{let{blockName:o,component:i}=e;const a=i||c(o,t);return a?Object(n.createElement)(a,{key:`${o}_forced_${r}`}):null}))})(d,r,e.children,o))))}):null},u=e=>{let{Block:t,selector:r,blockName:n,getProps:i=(()=>({})),blockMap:a,blockWrapper:s}=e;Object(o.a)({Block:t,selector:r,getProps:(e,t)=>{const r=l({block:n,blockMap:a,children:e.children||[],blockWrapper:s});return{...i(e,t),children:r}}})}},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){var n=r(122);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,r(t,n)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";r.d(t,"a",(function(){return S}));var n=r(0),o=r(108),i=r(2),a=r(16),s=r(204),c=r(44),l=r(33),u=r(31),d=r(1),p=r(27),f=r.n(p),m=r(109),h=r(88);const b=(e,t,r)=>{const n=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${r}-new-payment-method`;return n.push({key:o,value:t}),n},g=(e,t)=>{f.a.setNonce&&"function"==typeof f.a.setNonce&&f.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))};var y=r(160),E=r(22),v=r(32),O=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:r,redirectUrl:o,isProcessing:i,isBeforeProcessing:a,isComplete:p,orderNotes:O,shouldCreateAccount:S,extensionData:_}=Object(u.b)(),{hasValidationErrors:j}=Object(y.b)(),{shippingErrorStatus:w}=Object(c.b)(),{billingData:k,shippingAddress:C}=Object(l.b)(),{cartNeedsPayment:R,receiveCart:T}=Object(E.a)(),{activePaymentMethod:P,isExpressPaymentMethodActive:x,currentStatus:A,paymentMethodData:N,expressPaymentMethods:M,paymentMethods:I,shouldSavePayment:D}=Object(s.b)(),{addErrorNotice:L,removeNotice:F,setIsSuppressed:V}=Object(v.a)(),B=Object(n.useRef)(k),U=Object(n.useRef)(C),H=Object(n.useRef)(o),[G,z]=Object(n.useState)(!1),W=Object(n.useMemo)(()=>{var e;const t={...M,...I};return null==t||null===(e=t[P])||void 0===e?void 0:e.paymentMethodId},[P,M,I]),q=j&&!x||A.hasError||w.hasError,Y=!e&&!q&&(A.isSuccessful||!R)&&i;Object(n.useEffect)(()=>{V(x)},[x,V]),Object(n.useEffect)(()=>{q===e||!i&&!a||x||r.setHasError(q)},[q,e,i,a,x,r]),Object(n.useEffect)(()=>{B.current=k,U.current=C,H.current=o},[k,C,o]);const X=Object(n.useCallback)(()=>!j&&(A.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!w.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[j,A.hasError,w.hasError]);Object(n.useEffect)(()=>{let e;return x||(e=t(X,0)),()=>{x||e()}},[t,X,x]),Object(n.useEffect)(()=>{H.current&&(window.location.href=H.current)},[p]);const $=Object(n.useCallback)(async()=>{if(G)return;z(!0),F("checkout");const e=R?{payment_method:W,payment_data:b(N,D,P)}:{},t={billing_address:Object(m.a)(B.current),shipping_address:Object(m.a)(U.current),customer_note:O,should_create_account:S,...e,extensions:{..._}};f()({path:"/wc/store/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(g(e.headers,r),!e.ok)throw new Error(e);return e.json()}).then(e=>{r.setAfterProcessing(e),z(!1)}).catch(e=>{try{null!=e&&e.headers&&g(e.headers,r),e.json().then(e=>{var t,n,o;null!==(t=e.data)&&void 0!==t&&t.cart&&T(e.data.cart),L(Object(h.b)(e),{id:"checkout"}),null==e||null===(n=e.additional_errors)||void 0===n||null===(o=n.forEach)||void 0===o||o.call(n,e=>{L(e.message,{id:e.error_code})}),r.setAfterProcessing(e)})}catch{var t;L(Object(d.sprintf)(// Translators: %s Error text.
4
  Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout"})}r.setHasError(!0),z(!1)})},[G,F,O,S,R,W,N,D,P,_,r,L,T]);return Object(n.useEffect)(()=>{Y&&!G&&$()},[$,Y,G]),null};const S=e=>{let{children:t,isCart:r=!1,redirectUrl:d}=e;return Object(n.createElement)(u.a,{redirectUrl:d,isCart:r},Object(n.createElement)(l.a,null,Object(n.createElement)(c.a,null,Object(n.createElement)(s.a,null,t,Object(n.createElement)(a.a,{renderError:i.CURRENT_USER_IS_ADMIN?null:()=>null},Object(n.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(n.createElement)(O,null)))))}},,,function(e){e.exports=JSON.parse('{"name":"woocommerce/filled-cart-block","version":"1.0.0","title":"Filled Cart","description":"Contains blocks that are displayed when the cart contains products.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/empty-cart-block","version":"1.0.0","title":"Empty Cart","description":"Contains blocks that are displayed when the cart is empty.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e,t,r){"use strict";var n=r(0),o=r(1),i=(r(8),r(4)),a=r.n(i),s=(r(161),r(130));t.a=e=>{let{children:t,className:r,screenReaderLabel:i,showSpinner:c=!1,isLoading:l=!0}=e;return Object(n.createElement)("div",{className:a()(r,{"wc-block-components-loading-mask":l})},l&&c&&Object(n.createElement)(s.a,null),Object(n.createElement)("div",{className:a()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},t),l&&Object(n.createElement)("span",{className:"screen-reader-text"},i||Object(o.__)("Loading…","woo-gutenberg-products-block")))}},function(e,t,r){"use strict";var n=r(0);r(157),t.a=()=>Object(n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=(e,t)=>{const r=[];return Object.keys(e).forEach(n=>{if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default}),r}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(0);const o=Object(n.createContext)({hasDarkControls:!1}),i=()=>Object(n.useContext)(o)},,,function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-items-block","version":"1.0.0","title":"Cart Items block","description":"Column containing cart items.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-line-items-block","version":"1.0.0","title":"Cart Line Items","description":"Block containing current line items in Cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-items-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-totals-block","version":"1.0.0","title":"Cart Totals","description":"Column containing the cart totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false},"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/proceed-to-checkout-block","version":"1.0.0","title":"Proceed to checkout","description":"Allow customers proceed to Checkout.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-accepted-payment-methods-block","version":"1.0.0","title":"Accepted Payment Methods","description":"Display accepted payment methods.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,,function(e,t){},,,function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return l}));var n=r(0),o=r(5),i=r(11),a=r.n(i);const s=Object(n.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),c=()=>Object(n.useContext)(s),l=e=>{let{children:t}=e;const[r,i]=Object(n.useState)({}),c=Object(n.useCallback)(e=>r[e],[r]),l=Object(n.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),u=Object(n.useCallback)(e=>{i(t=>{if(!t[e])return t;const{[e]:r,...n}=t;return n})},[]),d=Object(n.useCallback)(()=>{i({})},[]),p=Object(n.useCallback)(e=>{e&&i(t=>(e=Object(o.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&a()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),f=Object(n.useCallback)((e,t)=>{i(r=>{if(!r.hasOwnProperty(e))return r;const n={...r[e],...t};return a()(r[e],n)?r:{...r,[e]:n}})},[]),m={getValidationError:c,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!0})},[f]),showValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!1})},[f]),showAllValidationErrors:Object(n.useCallback)(()=>{i(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:l};return Object(n.createElement)(s.Provider,{value:m},t)}},function(e,t){},,,,,,function(e,t){e.exports=window.wp.keycodes},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(89);const o=(e,t)=>function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const i=n.a.addEventCallback(e,r,o);return t(i),()=>{t(n.a.removeEventCallback(e,i.id))}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return a}));const n=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=r(29);const i=async(e,t,r)=>{const o=n(e,t),i=[];for(const e of o)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&i.push(t)}catch(e){console.error(e)}return!i.length||i},a=async(e,t,r)=>{const i=[],a=n(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return i.push(t),i;i.push(t)}catch(e){return console.error(e),i.push({type:"error"}),i}return i}},,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(207)},function(e,t){},,,,,,,,,,,,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return D})),r.d(t,"a",(function(){return L}));var n=r(0),o=r(35);let i,a;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(i||(i={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(a||(a={}));const s={currentStatus:i.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},c={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:i,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,paymentMethodData:r,shouldSavePaymentMethod:n=!1,errorMessage:o="",paymentMethods:c={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case i.PRISTINE:return{...s,...e,errorMessage:"",currentStatus:i.PRISTINE};case i.STARTED:return{...e,currentStatus:i.STARTED};case i.ERROR:return e.currentStatus!==i.ERROR?{...e,currentStatus:i.ERROR,errorMessage:o||e.errorMessage}:e;case i.FAILED:return e.currentStatus!==i.FAILED?{...e,currentStatus:i.FAILED,paymentMethodData:r||e.paymentMethodData,errorMessage:o||e.errorMessage}:e;case i.SUCCESS:return e.currentStatus!==i.SUCCESS?{...e,currentStatus:i.SUCCESS,paymentMethodData:r||e.paymentMethodData}:e;case i.PROCESSING:return e.currentStatus!==i.PROCESSING?{...e,currentStatus:i.PROCESSING,errorMessage:""}:e;case i.COMPLETE:return e.currentStatus!==i.COMPLETE?{...e,currentStatus:i.COMPLETE}:e;case a.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:c};case a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:c};case a.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:n};case a.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:r||e.paymentMethodData}}},u=r(1),d=r(14),p=r(17),f=r(2),m=r(52),h=r(18),b=r(44),g=r(33),y=r(22),E=r(32),v=r(29);const O=(e,t,r,o)=>{const[i,a]=Object(n.useState)(!1),{isEditor:s}=Object(h.a)(),{selectedRates:c}=Object(b.b)(),{billingData:l,shippingAddress:d}=Object(g.b)(),v=Object(p.a)(c),O=Object(p.a)(r),S=Object(y.a)(),{cartTotals:_,cartIsLoading:j,cartNeedsShipping:w,paymentRequirements:k}=S,C=Object(n.useRef)({cart:S,cartTotals:_,cartNeedsShipping:w,billingData:l,shippingAddress:d,selectedShippingMethods:v,paymentRequirements:k}),{addErrorNotice:R}=Object(E.a)();Object(n.useEffect)(()=>{C.current={cart:S,cartTotals:_,cartNeedsShipping:w,billingData:l,shippingAddress:d,selectedShippingMethods:v,paymentRequirements:k}},[S,_,w,l,d,v,k]);const T=Object(n.useCallback)(async()=>{let r={};const n=e=>{r={...r,[e.name]:e}};for(let e=0;e<O.length;e++){const r=O[e],i=t[r];if(i)try{const e=!!s||await Promise.resolve(i.canMakePayment(C.current));if(e){if("object"==typeof e&&null!==e&&e.error)throw new Error(e.error.message);n(i)}}catch(e){if(f.CURRENT_USER_IS_ADMIN||s){const t=Object(u.sprintf)(
5
  /* translators: %s the id of the payment method being registered (bank transfer, Stripe...) */
6
- Object(u.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),i.paymentMethodId);R(`${t} ${e}`,{context:o,id:`wc-${i.paymentMethodId}-registration-error`})}}}e(r),a(!0)},[R,e,s,o,O,t]),P=Object(m.a)(T,500,{leading:!0});return Object(n.useEffect)(()=>{j||P()},[P,S,v,l,j]),i},S=e=>({type:e}),_=e=>({type:i.ERROR,errorMessage:e}),j=e=>{let{errorMessage:t,paymentMethodData:r}=e;return{type:i.FAILED,errorMessage:t,paymentMethodData:r}},w=e=>{let{paymentMethodData:t}=e;return{type:i.SUCCESS,paymentMethodData:t}},k=e=>({type:a.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),C=e=>({type:a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),R=e=>({type:a.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),T=(e,t)=>({type:a.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var P=r(31),x=r(89),A=r(169);var N=r(170),M=r(160);const I=Object(n.createContext)(c),D=()=>Object(n.useContext)(I),L=e=>{let{children:t}=e;const{isProcessing:r,isIdle:a,isCalculating:c,hasError:u}=Object(P.b)(),{isEditor:p,getPreviewData:m}=Object(h.a)(),{setValidationErrors:y}=Object(M.b)(),{addErrorNotice:D,removeNotice:L}=Object(E.a)(),{isSuccessResponse:F,isErrorResponse:V,isFailResponse:B,noticeContexts:U}=Object(v.c)(),[H,G]=Object(n.useReducer)(x.b,{}),{onPaymentProcessing:z}=(e=>Object(n.useMemo)(()=>({onPaymentProcessing:Object(A.a)("payment_processing",e)}),[e]))(G),W=Object(n.useRef)(H);Object(n.useEffect)(()=>{W.current=H},[H]);const[q,Y]=Object(n.useReducer)(l,s),{dispatchActions:X,setPaymentStatus:$}=(e=>{const{setBillingData:t}=Object(g.b)(),{setShippingAddress:r}=Object(b.b)();return{dispatchActions:Object(n.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(k(t))},setRegisteredExpressPaymentMethods:t=>{e(C(t))},setShouldSavePayment:t=>{e(R(t))},setActivePaymentMethod:function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(T(t,r))}}),[e]),setPaymentStatus:Object(n.useCallback)(()=>({pristine:()=>e(S(i.PRISTINE)),started:()=>e(S(i.STARTED)),processing:()=>e(S(i.PROCESSING)),completed:()=>e(S(i.COMPLETE)),error:t=>e(_(t)),failed:function(r,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(j({errorMessage:r||"",paymentMethodData:n||{}}))},success:function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof i&&null!=i&&i.address&&r(i.address),e(w({paymentMethodData:n}))}}),[e,t,r])}})(Y),K=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:r}=Object(v.c)(),n=new Set([...Object(f.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return O(e,t,Array.from(n),r.PAYMENTS)})(X.setRegisteredPaymentMethods),J=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:r}=Object(v.c)();return O(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)})(X.setRegisteredExpressPaymentMethods),Q=Object(n.useMemo)(()=>p?m("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(f.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach(r=>{const o=t[r].filter(t=>{var r;let{method:{gateway:n}}=t;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)});o.length&&(n[r]=o)}),n}(q.paymentMethods):{},[p,m,K,q.paymentMethods]),Z=Object(n.useCallback)(e=>{e?D(e,{id:"wc-express-payment-error",context:U.EXPRESS_PAYMENTS}):L("wc-express-payment-error",U.EXPRESS_PAYMENTS)},[D,U.EXPRESS_PAYMENTS,L]),ee=Object.keys(q.expressPaymentMethods).includes(q.activePaymentMethod),te=Object(n.useMemo)(()=>({isPristine:q.currentStatus===i.PRISTINE,isStarted:q.currentStatus===i.STARTED,isProcessing:q.currentStatus===i.PROCESSING,isFinished:[i.ERROR,i.FAILED,i.SUCCESS].includes(q.currentStatus),hasError:q.currentStatus===i.ERROR,hasFailed:q.currentStatus===i.FAILED,isSuccessful:q.currentStatus===i.SUCCESS,isDoingExpressPayment:q.currentStatus!==i.PRISTINE&&ee}),[q.currentStatus,ee]);Object(n.useEffect)(()=>{const e=Object.keys(q.paymentMethods);if(!K||!e.length)return;const t=[...e,...Object.keys(q.expressPaymentMethods)];if(q.activePaymentMethod&&t.includes(q.activePaymentMethod))return;$().pristine();const r=Object.keys(Q).flatMap(e=>Q[e])[0]||void 0;if(r){const e=r.tokenId,t=r.method.gateway,n=`wc-${t}-payment-token`;X.setActivePaymentMethod(t,{token:e,payment_method:t,[n]:e.toString(),isSavedToken:!0})}else X.setActivePaymentMethod(Object.keys(q.paymentMethods)[0])},[K,q.paymentMethods,q.expressPaymentMethods,X,$,q.activePaymentMethod,Q]),Object(n.useEffect)(()=>{!r||u||c||te.isFinished||$().processing()},[r,u,c,te.isFinished,$]),Object(n.useEffect)(()=>{a&&!te.isSuccessful&&$().pristine()},[a,te.isSuccessful,$]),Object(n.useEffect)(()=>{u&&te.isSuccessful&&$().pristine()},[u,te.isSuccessful,$]),Object(n.useEffect)(()=>{te.isProcessing&&(L("wc-payment-error",U.PAYMENTS),Object(N.b)(W.current,"payment_processing",{}).then(e=>{let t,r;var n,o,i,a,s,c;if(e.forEach(e=>{F(e)&&(t=e),(V(e)||B(e))&&(r=e)}),t&&!r)$().success(null===(n=t)||void 0===n||null===(o=n.meta)||void 0===o?void 0:o.paymentMethodData,null===(i=t)||void 0===i||null===(a=i.meta)||void 0===a?void 0:a.billingData,null===(s=t)||void 0===s||null===(c=s.meta)||void 0===c?void 0:c.shippingData);else if(r&&B(r)){var l,u,d,p,f,m;r.message&&r.message.length&&D(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=r)||void 0===m?void 0:m.messageContext)||U.PAYMENTS}),$().failed(null===(l=r)||void 0===l?void 0:l.message,null===(u=r)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=r)||void 0===p||null===(f=p.meta)||void 0===f?void 0:f.billingData)}else if(r){var h,b;r.message&&r.message.length&&D(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(b=r)||void 0===b?void 0:b.messageContext)||U.PAYMENTS}),$().error(r.message),y(null===(h=r)||void 0===h?void 0:h.validationErrors)}else $().success()}))},[te.isProcessing,y,$,L,U.PAYMENTS,F,B,V,D]);const re="object"==typeof q.paymentMethodData&&Object(o.e)(q.paymentMethodData,"token")?q.paymentMethodData.token+"":"",ne={setPaymentStatus:$,currentStatus:te,paymentStatuses:i,paymentMethodData:q.paymentMethodData,errorMessage:q.errorMessage,activePaymentMethod:q.activePaymentMethod,activeSavedToken:re,setActivePaymentMethod:X.setActivePaymentMethod,onPaymentProcessing:z,customerPaymentMethods:Q,paymentMethods:q.paymentMethods,expressPaymentMethods:q.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:J,setExpressPaymentError:Z,isExpressPaymentMethodActive:ee,shouldSavePayment:q.shouldSavePaymentMethod,setShouldSavePayment:X.setShouldSavePayment};return Object(n.createElement)(I.Provider,{value:ne},t)}},,,function(e,t,r){"use strict";r.r(t);var n=r(134),o=r(0),i=r(22),a=r(14),s=r(119),c=r(66),l=r(13),u=r(127),d=r(128),p=r(138),f=r(142),m=r(139),h=r(141),b=r(140),g=r(143),y=r(144);r.p=c.k,Object(l.registerCheckoutBlock)({metadata:u,component:Object(o.lazy)(()=>r.e(25).then(r.bind(null,375)))}),Object(l.registerCheckoutBlock)({metadata:d,component:Object(o.lazy)(()=>r.e(23).then(r.bind(null,376)))}),Object(l.registerCheckoutBlock)({metadata:u,component:Object(o.lazy)(()=>r.e(25).then(r.bind(null,375)))}),Object(l.registerCheckoutBlock)({metadata:d,component:Object(o.lazy)(()=>r.e(23).then(r.bind(null,376)))}),Object(l.registerCheckoutBlock)({metadata:p,component:Object(o.lazy)(()=>r.e(26).then(r.bind(null,377)))}),Object(l.registerCheckoutBlock)({metadata:m,component:Object(o.lazy)(()=>Promise.all([r.e(1),r.e(4),r.e(27)]).then(r.bind(null,386)))}),Object(l.registerCheckoutBlock)({metadata:b,component:Object(o.lazy)(()=>r.e(29).then(r.bind(null,378)))}),Object(l.registerCheckoutBlock)({metadata:h,component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(1),r.e(2),r.e(28)]).then(r.bind(null,390)))}),Object(l.registerCheckoutBlock)({metadata:f,component:Object(o.lazy)(()=>r.e(24).then(r.bind(null,398)))}),Object(l.registerCheckoutBlock)({metadata:g,component:Object(o.lazy)(()=>r.e(22).then(r.bind(null,399)))}),Object(l.registerCheckoutBlock)({metadata:y,component:Object(o.lazy)(()=>r.e(21).then(r.bind(null,400)))});var E=r(1),v=r(129),O=r(160),S=r(2),_=r(16),j=r(67),w=r(71),k=r(211),C=r(87),R=r(124);const T=e=>{let{children:t,redirectUrl:r}=e;return Object(o.createElement)(R.a,{isCart:!0,redirectUrl:r},t)};var P=r(135);r(190);const x=()=>{window.location.reload(!0)},A=e=>{let{children:t,attributes:r}=e;const{cartIsLoading:n}=Object(i.a)(),{hasDarkControls:a}=r;return Object(o.createElement)(v.a,{showSpinner:!0,isLoading:n},Object(o.createElement)(P.a.Provider,{value:{hasDarkControls:a}},Object(o.createElement)(O.a,null,t)))},N=e=>{let{scrollToTop:t}=e;return Object(o.useEffect)(()=>{const e=Object(j.b)("added_to_cart","wc-blocks_added_to_cart");return document.body.addEventListener("wc-blocks_added_to_cart",t),()=>{e(),document.body.removeEventListener("wc-blocks_added_to_cart",t)}},[t]),null};var M=Object(w.a)(e=>{let{attributes:t,children:r,scrollToTop:n}=e;return Object(o.createElement)(_.a,{header:Object(E.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(E.__)("The cart has encountered an unexpected error. If the error persists, please get in touch with us for help.","woo-gutenberg-products-block"),button:Object(o.createElement)("button",{className:"wc-block-button",onClick:x},Object(E.__)("Reload the page","woo-gutenberg-products-block")),showErrorMessage:S.CURRENT_USER_IS_ADMIN},Object(o.createElement)(k.a,{context:"wc/cart"},Object(o.createElement)(C.a,{context:"wc/cart"},Object(o.createElement)(l.SlotFillProvider,null,Object(o.createElement)(T,null,Object(o.createElement)(A,{attributes:t},r),Object(o.createElement)(N,{scrollToTop:n}))))))});const I={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(S.getSetting)("hasDarkEditorStyleSupport",!1)},isShippingCalculatorEnabled:{type:"boolean",default:Object(S.getSetting)("isShippingCalculatorEnabled",!0)},checkoutPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:!0},align:{type:"string"}};Object(s.a)({Block:M,blockName:"woocommerce/cart",selector:".wp-block-woocommerce-cart",getProps:e=>({attributes:Object(n.a)(I,e?e.dataset:{})}),blockMap:Object(a.getRegisteredBlockComponents)("woocommerce/cart"),blockWrapper:e=>{let{children:t}=e;const{extensions:r,receiveCart:n,...a}=Object(i.a)();return o.Children.map(t,e=>{if(Object(o.isValidElement)(e)){const t={extensions:r,cart:a};return Object(o.cloneElement)(e,t)}return e})}})},,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return E})),r.d(t,"a",(function(){return v}));var n=r(0),o=(r(8),r(9)),i=r(7),a=r(4),s=r.n(a),c=r(5),l=r(91),u=r(12),d=r(107),p=function({notices:e,className:t,children:r,onRemove:o=c.noop}){const a=Object(u.useReducedMotion)(),[p]=Object(n.useState)(()=>new WeakMap),f=Object(l.useTransition)(e,e=>e.id,{from:{opacity:0,height:0},enter:e=>async t=>await t({opacity:1,height:p.get(e).offsetHeight}),leave:()=>async e=>{await e({opacity:0}),await e({height:0})},immediate:a});t=s()("components-snackbar-list",t);const m=e=>()=>o(e.id);return Object(n.createElement)("div",{className:t},r,f.map(({item:e,key:t,props:r})=>Object(n.createElement)(l.animated.div,{key:t,style:r},Object(n.createElement)("div",{className:"components-snackbar-list__notice-container",ref:t=>t&&p.set(e,t)},Object(n.createElement)(d.a,Object(i.a)({},Object(c.omit)(e,["content"]),{onRemove:m(e)}),e.content)))))},f=r(13);const m={};var h=e=>{let{className:t,notices:r,removeNotice:o,isEditor:i}=e;if(i)return null;const a=r.filter(e=>"snackbar"===e.type),c=a.length>0?a.reduce((e,t)=>{let{content:r}=t;return e[r]=!0,e},{}):m,l=Object(f.__experimentalApplyCheckoutFilter)({filterName:"snackbarNoticeVisibility",defaultValue:c}),u=a.filter(e=>!0===l[e.content]),d=s()(t,"wc-block-components-notices__snackbar");return Object(n.createElement)(p,{notices:u,className:d,onRemove:o})},b=r(38),g=r(18);const y=Object(n.createContext)({notices:[],createSnackbarNotice:(e,t)=>{},removeSnackbarNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),E=()=>Object(n.useContext)(y),v=e=>{let{children:t,context:r="wc/core"}=e;const{createNotice:i,removeNotice:a}=Object(o.useDispatch)("core/notices"),[s,c]=Object(n.useState)(!1),{dispatchStoreEvent:l}=Object(b.a)(),{isEditor:u}=Object(g.a)(),d=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i("default",e,{...t,type:"snackbar",context:t.context||r}),l("store-notice-create",{status:"default",content:e,options:t})}),[i,l,r]),p=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;a(e,t)}),[a,r]),{notices:f}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(r)}),[r]),m={notices:f,createSnackbarNotice:d,removeSnackbarNotice:p,context:r,setIsSuppressed:c},E=s?null:Object(n.createElement)(h,{notices:m.notices,removeNotice:m.removeSnackbarNotice,isEditor:u});return Object(n.createElement)(y.Provider,{value:m},t,E)}}]);
3
  Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(i.b)(e.priority)&&(t.index=e.priority),Object(i.d)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},c=Object.entries(a).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,s(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==c[r]?c[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,i=Object(n.useRef)(null),a=Object(n.useRef)(0),s=Object(n.useRef)(null),c=Object(n.useRef)([]),l=Object(n.useRef)(),u=Object(n.useRef)(),d=Object(n.useRef)(e),p=Object(n.useRef)(!0);d.current=e;var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var m=!!(r=r||{}).leading,h=!("trailing"in r)||!!r.trailing,b="maxWait"in r,g=b?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=c.current,r=l.current;return c.current=l.current=null,a.current=e,u.current=d.current.apply(r,t)},r=function(e,t){f&&cancelAnimationFrame(s.current),s.current=f?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-i.current,n=e-a.current;return!i.current||r>=t||r<0||b&&n>=g},y=function(t){return s.current=null,h&&c.current?e(t):(c.current=l.current=null,u.current)},E=function(){var e=Date.now();if(n(e))return y(e);if(p.current){var o=e-i.current,s=e-a.current,c=t-o,l=b?Math.min(c,g-s):c;r(E,l)}},v=function(){for(var d=[],f=0;f<arguments.length;f++)d[f]=arguments[f];var h=Date.now(),g=n(h);if(c.current=d,l.current=o,i.current=h,g){if(!s.current&&p.current)return a.current=i.current,r(E,t),m?e(i.current):u.current;if(b)return r(E,t),e(i.current)}return s.current||r(E,t),u.current};return v.cancel=function(){s.current&&(f?cancelAnimationFrame(s.current):clearTimeout(s.current)),a.current=0,c.current=i.current=l.current=s.current=null},v.isPending=function(){return!!s.current},v.flush=function(){return s.current?y(Date.now()):u.current},v}),[m,b,t,g,h,f])}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(10),o=r.n(n),i=r(0),a=r(16);const s=[".wp-block-woocommerce-cart"],c=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:s=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const c=n(e,r),l=s(e,r),u={...e.dataset,...c.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:s={},errorBoundaryProps:c={}}=e;Object(i.render)(Object(i.createElement)(a.a,c,Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(i.createElement)(t,o()({},s,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:c,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(s.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:i}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:i}=e;const a=document.body.querySelectorAll(o);i&&i.length>0&&Array.prototype.filter.call(a,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,i)),c({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:i,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:i}=e;const a=i.querySelectorAll(o);c({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},,function(e,t,r){"use strict";var n=r(7),o=r(0),i=r(4),a=r.n(i),s=r(5),c=r(30),l=r.n(c),u=r(12),d=r(60),p=r(90),f=r(1);function m(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const i=o.getBoundingClientRect();return new n.DOMRect(e.left+i.left,e.top+i.top,e.width,e.height)}let h=0;function b(e){const t=document.scrollingElement||document.body;e&&(h=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=h)}let g=0;function y(){return Object(o.useEffect)(()=>(0===g&&b(!0),++g,()=>{1===g&&b(!1),--g}),[]),null}var E=r(26);function v(e){const t=Object(o.useContext)(E.a),r=t.slots[e]||{},n=t.fills[e],i=Object(o.useMemo)(()=>n||[],[n]);return{...r,updateSlot:Object(o.useCallback)(r=>{t.updateSlot(e,r)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(r=>{t.unregisterSlot(e,r)},[e,t.unregisterSlot]),fills:i,registerFill:Object(o.useCallback)(r=>{t.registerFill(e,r)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(r=>{t.unregisterFill(e,r)},[e,t.unregisterFill])}}var O=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function S({name:e,children:t,registerFill:r,unregisterFill:n}){const i=(e=>{const{getSlot:t,subscribe:r}=Object(o.useContext)(O),[n,i]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(i(t(e)),r(()=>{i(t(e))})),[e]),n})(e),a=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(r(e,a.current),()=>n(e,a.current)),[]),Object(o.useLayoutEffect)(()=>{a.current.children=t,i&&i.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==a.current.name&&(n(a.current.name,a.current),a.current.name=e,r(e,a.current))},[e]),i&&i.node?(Object(s.isFunction)(t)&&(t=t(i.props.fillProps)),Object(o.createPortal)(t,i.node)):null}var _=e=>Object(o.createElement)(O.Consumer,null,({registerFill:t,unregisterFill:r})=>Object(o.createElement)(S,Object(n.a)({},e,{registerFill:t,unregisterFill:r})));class j extends o.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,i=Object(s.map)(n(t,this),e=>{const t=Object(s.isFunction)(e.children)?e.children(r):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(s.isString)(e))return e;const r=e.key||t;return Object(o.cloneElement)(e,{key:r})})}).filter(Object(s.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(s.isFunction)(e)?e(i):i)}}var w=e=>Object(o.createElement)(O.Consumer,null,({registerSlot:t,unregisterSlot:r,getFills:i})=>Object(o.createElement)(j,Object(n.a)({},e,{registerSlot:t,unregisterSlot:r,getFills:i})));function k(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function C({name:e,children:t}){const r=v(e),n=Object(o.useRef)({rerender:k()});return Object(o.useEffect)(()=>(r.registerFill(n),()=>{r.unregisterFill(n)}),[r.registerFill,r.unregisterFill]),r.ref&&r.ref.current?("function"==typeof t&&(t=t(r.fillProps)),Object(o.createPortal)(t,r.ref.current)):null}var R=Object(o.forwardRef)((function({name:e,fillProps:t={},as:r="div",...i},a){const s=Object(o.useContext)(E.a),c=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(s.registerSlot(e,c,t),()=>{s.unregisterSlot(e,c)}),[s.registerSlot,s.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{s.updateSlot(e,t)}),Object(o.createElement)(r,Object(n.a)({ref:Object(u.useMergeRefs)([a,c])},i))}));function T(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(_,e),Object(o.createElement)(C,e))}r(11),o.Component;const P=Object(o.forwardRef)(({bubblesVirtually:e,...t},r)=>e?Object(o.createElement)(R,Object(n.a)({},t,{ref:r})):Object(o.createElement)(w,t));function x(e){return"appear"===e?"top":"left"}function A(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:i}=(a=t).ownerDocument.defaultView.getComputedStyle(a);var a;const s=r?parseInt(r,10):0,c=n?parseInt(n,10):0,l=o?parseInt(o,10):0,u=i?parseInt(i,10):0;return{x:e.left+l,y:e.top+s,width:e.width-l-u,height:e.height-s-c,left:e.left+l,right:e.right-u,top:e.top+s,bottom:e.bottom-c}}function N(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function M(e,t,r=""){e.style[t]!==r&&(e.style[t]=r)}function I(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const D=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:r,className:i,noArrow:s=!0,isAlternate:c,position:h="bottom right",range:b,focusOnMount:g="firstElement",anchorRef:E,shouldAnchorIncludePadding:O,anchorRect:S,getAnchorRect:_,expandOnMobile:j,animate:w=!0,onClickOutside:k,onFocusOutside:C,__unstableStickyBoundaryElement:R,__unstableSlotName:P="Popover",__unstableObserveElement:D,__unstableBoundaryParent:L,__unstableForcePosition:F,__unstableForceXAlignment:V,...B},U)=>{const H=Object(o.useRef)(null),G=Object(o.useRef)(null),z=Object(o.useRef)(),W=Object(u.useViewportMatch)("medium","<"),[q,X]=Object(o.useState)(),$=v(P),K=j&&W,[J,Q]=Object(u.useResizeObserver)();s=K||s,Object(o.useLayoutEffect)(()=>{if(K)return I(z.current,"is-without-arrow",s),I(z.current,"is-alternate",c),N(z.current,"data-x-axis"),N(z.current,"data-y-axis"),M(z.current,"top"),M(z.current,"left"),M(G.current,"maxHeight"),void M(G.current,"maxWidth");const e=()=>{if(!z.current||!G.current)return;let e=function(e,t,r,n=!1,o,i){if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return m(t,t.ownerDocument||e.current.ownerDocument,i)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return m(Object(d.getRectangleFromRange)(n),n.endContainer.ownerDocument,i);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=m(n.getBoundingClientRect(),n.ownerDocument,i);return o?e:A(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),a=t.getBoundingClientRect(),s=m(new window.DOMRect(r.left,r.top,r.width,a.bottom-r.top),e.ownerDocument,i);return o?s:A(s,n)}if(!e.current)return;const{parentNode:a}=e.current,s=a.getBoundingClientRect();return o?s:A(s,a)}(H,S,_,E,O,z.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=z.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}var i;L&&(n=null===(i=z.current.closest(".popover-slot"))||void 0===i?void 0:i.parentNode);const a=Q.height?Q:G.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:p,yAxis:b,contentHeight:g,contentWidth:y}=function(e,t,r="top",n,o,i,a,s,c){const[l,u="center",d]=r.split(" "),p=function(e,t,r,n,o,i,a,s){const{height:c}=t;if(o){const t=o.getBoundingClientRect().top+c-a;if(e.top<=t)return{yAxis:r,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===n?l=e.bottom:"top"===n&&(l=e.top);const u={popoverTop:l,contentHeight:(l-c/2>0?c/2:l)+(l+c/2>window.innerHeight?window.innerHeight-l:c/2)},d={popoverTop:e.top,contentHeight:e.top-10-c>0?c:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+c>window.innerHeight?window.innerHeight-10-e.bottom:c};let f,m=r,h=null;if(!o&&!s)if("middle"===r&&u.contentHeight===c)m="middle";else if("top"===r&&d.contentHeight===c)m="top";else if("bottom"===r&&p.contentHeight===c)m="bottom";else{m=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===m?d.contentHeight:p.contentHeight;h=e!==c?e:null}return f="middle"===m?u.popoverTop:"top"===m?d.popoverTop:p.popoverTop,{yAxis:m,popoverTop:f,contentHeight:h}}(e,t,l,d,n,0,i,s);return{...function(e,t,r,n,o,i,a,s,c){const{width:l}=t;"left"===r&&Object(f.isRTL)()?r="right":"right"===r&&Object(f.isRTL)()&&(r="left"),"left"===n&&Object(f.isRTL)()?n="right":"right"===n&&Object(f.isRTL)()&&(n="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===n?p=e.right:"middle"===i||c||(p=u);let m=e.right;"left"===n?m=e.left:"middle"===i||c||(m=u);const h={popoverLeft:p,contentWidth:p-l>0?l:p},b={popoverLeft:m,contentWidth:m+l>window.innerWidth?window.innerWidth-m:l};let g,y=r,E=null;if(!o&&!s)if("center"===r&&d.contentWidth===l)y="center";else if("left"===r&&h.contentWidth===l)y="left";else if("right"===r&&b.contentWidth===l)y="right";else{y=h.contentWidth>b.contentWidth?"left":"right";const e="left"===y?h.contentWidth:b.contentWidth;l>window.innerWidth&&(E=window.innerWidth),e!==l&&(y="center",d.popoverLeft=window.innerWidth/2)}if(g="center"===y?d.popoverLeft:"left"===y?h.popoverLeft:b.popoverLeft,a){const e=a.getBoundingClientRect();g=Math.min(g,e.right-l),Object(f.isRTL)()||(g=Math.max(g,0))}return{xAxis:y,popoverLeft:g,contentWidth:E}}(e,t,u,d,n,p.yAxis,a,s,c),...p}}(e,a,h,R,z.current,o,n,F,V);"number"==typeof l&&"number"==typeof u&&(M(z.current,"top",l+"px"),M(z.current,"left",u+"px")),I(z.current,"is-without-arrow",s||"center"===p&&"middle"===b),I(z.current,"is-alternate",c),N(z.current,"data-x-axis",p),N(z.current,"data-y-axis",b),M(G.current,"maxHeight","number"==typeof g?g+"px":""),M(G.current,"maxWidth","number"==typeof y?y+"px":""),X(({left:"right",right:"left"}[p]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))};e();const{ownerDocument:t}=z.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const i=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",i),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const a=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(E);let l;return a&&a!==t&&(a.defaultView.addEventListener("resize",e),a.defaultView.addEventListener("scroll",e,!0)),D&&(l=new r.MutationObserver(e),l.observe(D,{attributes:!0})),()=>{r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",i),r.cancelAnimationFrame(o),a&&a!==t&&(a.defaultView.removeEventListener("resize",e),a.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}},[K,S,_,E,O,h,Q,R,D,L]);const Z=(e,r)=>{if("focus-outside"===e&&C)C(r);else if("focus-outside"===e&&k){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>r.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),k(e)}else t&&t()},[ee,te]=Object(u.__experimentalUseDialog)({focusOnMount:g,__unstableOnClose:Z,onClose:Z}),re=Object(u.useMergeRefs)([z,ee,U]),ne=Boolean(w&&q)&&function(e){if("loading"===e.type)return a()("components-animate__loading");const{type:t,origin:r=x(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return a()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?a()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:q});let oe=Object(o.createElement)("div",Object(n.a)({className:a()("components-popover",i,ne,{"is-expanded":K,"is-without-arrow":s,"is-alternate":c})},B,{ref:re},te,{tabIndex:"-1"}),K&&Object(o.createElement)(y,null),K&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(Y,{className:"components-popover__close",icon:p.a,onClick:t})),Object(o.createElement)("div",{ref:G,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},J,r)));return $.ref&&(oe=Object(o.createElement)(T,{name:P},oe)),E||S?oe:Object(o.createElement)("span",{ref:H},oe)});D.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(P,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var L=D,F=function({shortcut:e,className:t}){if(!e)return null;let r,n;return Object(s.isString)(e)&&(r=e),Object(s.isObject)(e)&&(r=e.display,n=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":n},r)};const V=Object(o.createElement)("div",{className:"event-catcher"}),B=({eventHandlers:e,child:t,childrenWithPopover:r})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(V,e),Object(o.cloneElement)(t,{children:r}),","),e),U=({child:e,eventHandlers:t,childrenWithPopover:r})=>Object(o.cloneElement)(e,{...t,children:r}),H=(e,t,r)=>{if(1!==o.Children.count(e))return;const n=o.Children.only(e);"function"==typeof n.props[t]&&n.props[t](r)};var G=function({children:e,position:t,text:r,shortcut:n}){const[i,a]=Object(o.useState)(!1),[c,l]=Object(o.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{H(e,"onMouseDown",t),document.addEventListener("mouseup",h),a(!0)},f=t=>{H(e,"onMouseUp",t),document.removeEventListener("mouseup",h),a(!1)},m=e=>"mouseUp"===e?f:"mouseDown"===e?p:void 0,h=m("mouseUp"),b=(t,r)=>n=>{if(H(e,t,n),n.currentTarget.disabled)return;if("focus"===n.type&&i)return;d.cancel();const o=Object(s.includes)(["focus","mouseenter"],n.type);o!==c&&(r?d(o):l(o))},g=()=>{d.cancel(),document.removeEventListener("mouseup",h)};if(Object(o.useEffect)(()=>g,[]),1!==o.Children.count(e))return e;const y={onMouseEnter:b("onMouseEnter",!0),onMouseLeave:b("onMouseLeave"),onClick:b("onClick"),onFocus:b("onFocus"),onBlur:b("onBlur"),onMouseDown:m("mouseDown")},E=o.Children.only(e),{children:v,disabled:O}=E.props;return(O?B:U)({child:E,eventHandlers:y,childrenWithPopover:(({grandchildren:e,isOver:t,position:r,text:n,shortcut:i})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(L,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(o.createElement)(F,{className:"components-tooltip__shortcut",shortcut:i}))))({grandchildren:v,isOver:c,position:t,text:r,shortcut:n})})},z=r(46),W=r(47);const q=["onMouseDown","onClick"];var Y=t.a=Object(o.forwardRef)((function(e,t){const{href:r,target:i,isSmall:c,isPressed:u,isBusy:d,isDestructive:p,className:f,disabled:m,icon:h,iconPosition:b="left",iconSize:g,showTooltip:y,tooltipPosition:E,shortcut:v,label:O,children:S,text:_,variant:j,__experimentalIsFocusable:w,describedBy:k,...C}=function({isDefault:e,isPrimary:t,isSecondary:r,isTertiary:n,isLink:o,variant:i,...a}){let s=i;var c,u,d,p,f;return t&&(null!==(c=s)&&void 0!==c||(s="primary")),n&&(null!==(u=s)&&void 0!==u||(s="tertiary")),r&&(null!==(d=s)&&void 0!==d||(s="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=s)&&void 0!==p||(s="secondary")),o&&(null!==(f=s)&&void 0!==f||(s="link")),{...a,variant:s}}(e),R=a()("components-button",f,{"is-secondary":"secondary"===j,"is-primary":"primary"===j,"is-small":c,"is-tertiary":"tertiary"===j,"is-pressed":u,"is-busy":d,"is-link":"link"===j,"is-destructive":p,"has-text":!!h&&!!S,"has-icon":!!h}),T=m&&!w,P=void 0===r||T?"button":"a",x="a"===P?{href:r,target:i}:{type:"button",disabled:T,"aria-pressed":u};if(m&&w){x["aria-disabled"]=!0;for(const e of q)C[e]=e=>{e.stopPropagation(),e.preventDefault()}}const A=!T&&(y&&O||v||!!O&&(!S||Object(s.isArray)(S)&&!S.length)&&!1!==y),N=k?Object(s.uniqueId)():null,M=C["aria-describedby"]||N,I=Object(o.createElement)(P,Object(n.a)({},x,C,{className:R,"aria-label":C["aria-label"]||O,"aria-describedby":M,ref:t}),h&&"left"===b&&Object(o.createElement)(z.a,{icon:h,size:g}),_&&Object(o.createElement)(o.Fragment,null,_),h&&"right"===b&&Object(o.createElement)(z.a,{icon:h,size:g}),S);return A?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(G,{text:k||O,shortcut:v,position:E},I),k&&Object(o.createElement)(W.a,null,Object(o.createElement)("span",{id:N},k))):Object(o.createElement)(o.Fragment,null,I,k&&Object(o.createElement)(W.a,null,Object(o.createElement)("span",{id:N},k)))}))},function(e,t,r){var n=r(76),o=r(58),i=o.setStyleProp,a=n.html,s=n.svg,c=n.isCustomAttribute,l=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,u;e=e||{};var d={};for(t in e)n=e[t],c(t)?d[t]=n:(r=t.toLowerCase(),l.call(a,r)?d[(u=a[r]).propertyName]=!!(u.hasBooleanValue||u.hasOverloadedBooleanValue&&!n)||n:l.call(s,t)?d[(u=s[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return i(e.style,d),d}},function(e,t,r){var n=r(3),o=r(80).default,i={reactCompat:!0},a=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,i={},a={};for(r in e)n=e[r],o&&(i=t(r,n))&&2===i.length?a[i[0]]=i[1]:"string"==typeof n&&(a[n]=r);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,i))}}},function(e,t,r){for(var n,o=r(86).CASE_SENSITIVE_TAG_NAMES,i={},a=0,s=o.length;a<s;a++)n=o[a],i[n.toLowerCase()]=n;function c(e){for(var t,r={},n=0,o=e.length;n<o;n++)r[(t=e[n]).name]=t.value;return r}function l(e){return function(e){return i[e]}(e=e.toLowerCase())||e}e.exports={formatAttributes:c,formatDOM:function e(t,r,n){r=r||null;for(var o,i,a,s=[],u=0,d=t.length;u<d;u++){switch(o=t[u],a={next:null,prev:s[u-1]||null,parent:r},(i=s[u-1])&&(i.next=a),"#"!==o.nodeName[0]&&(a.name=l(o.nodeName),a.attribs={},o.attributes&&o.attributes.length&&(a.attribs=c(o.attributes))),o.nodeType){case 1:"script"===a.name||"style"===a.name?a.type=a.name:a.type="tag",a.children=e(o.childNodes,a);break;case 3:a.type="text",a.data=o.nodeValue;break;case 8:a.type="comment",a.data=o.nodeValue}s.push(a)}return n&&(s.unshift({name:n.substring(0,n.indexOf(" ")).toLowerCase(),data:n,type:"directive",next:s[0]?s[0]:null,prev:null,parent:r}),s[1]&&(s[1].prev=s[0])),s},isIE:function(e){return e?document.documentMode===e:/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},function(e,t){e.exports=window.wp.dom},function(e,t,r){var n=r(75),o=r(57),i=r(84),a={decodeEntities:!0,lowerCaseAttributeNames:!1};function s(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(i(e,(t=t||{}).htmlparser2||a),t)}s.domToReact=n,s.htmlToDOM=i,s.attributesToProps=o,e.exports=s,e.exports.default=s},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},,,function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c,l=[],u=!1,d=-1;function p(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&f())}function f(){if(!u){var e=s(p);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new m(e,t)),1!==l.length||u||s(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){"use strict";r.d(t,"n",(function(){return i})),r.d(t,"l",(function(){return a})),r.d(t,"k",(function(){return s})),r.d(t,"m",(function(){return c})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return f})),r.d(t,"e",(function(){return m})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return b})),r.d(t,"h",(function(){return g})),r.d(t,"b",(function(){return y}));var n,o=r(2);const i=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=i.pluginUrl+"images/",s=i.pluginUrl+"build/",c=i.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),f=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),h=Object(o.getSetting)("shippingCountries",{}),b=Object(o.getSetting)("allowedCountries",{}),g=Object(o.getSetting)("shippingStates",{}),y=Object(o.getSetting)("allowedStates",{})},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"c",(function(){return a})),r.d(t,"b",(function(){return s}));const n=window.CustomEvent||null,o=(e,t)=>{let{bubbles:r=!1,cancelable:o=!1,element:i,detail:a={}}=t;if(!n)return;i||(i=document.body);const s=new n(e,{bubbles:r,cancelable:o,detail:a});i.dispatchEvent(s)};let i;const a=()=>{i&&clearTimeout(i),i=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const i=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,i),()=>jQuery(document).off(e,i)}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>e.reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})},function(e,t,r){"use strict";var n=r(10),o=r.n(n),i=r(0);r(101);const a=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const r=Object(i.useRef)(null);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),Object(i.createElement)(e,o()({},t,{scrollToTop:e=>{null!==r.current&&((e,t)=>{const{focusableSelector:r}=t||{};window&&Number.isFinite(window.innerHeight)&&(r?((e,t)=>{var r;const n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){const e=n[0];a(e),null==e||e.focus()}else a(e)})(e,r):a(e))})(r.current,e)}})))}},,,function(e,t){},function(e,t,r){var n=r(3),o=r(57),i=r(58),a=i.setStyleProp;function s(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&i.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var i,c,l,u,d=(r=r||{}).library||n,p=d.cloneElement,f=d.createElement,m=d.isValidElement,h=[],b="function"==typeof r.replace,g=r.trim,y=0,E=t.length;y<E;y++)if(i=t[y],b&&m(c=r.replace(i)))E>1&&(c=p(c,{key:c.key||y})),h.push(c);else if("text"!==i.type){switch(l=i.attribs,s(i)?a(l.style,l):l&&(l=o(l)),u=null,i.type){case"script":case"style":i.children[0]&&(l.dangerouslySetInnerHTML={__html:i.children[0].data});break;case"tag":"textarea"===i.name&&i.children[0]?l.defaultValue=i.children[0].data:i.children&&i.children.length&&(u=e(i.children,r));break;default:continue}E>1&&(l.key=y),h.push(f(i.name,l,u))}else g?i.data.trim()&&h.push(i.data):h.push(i.data);return 1===h.length?h[0]:h}},function(e,t,r){var n=r(77),o=r(78),i=r(79),a=i.MUST_USE_PROPERTY,s=i.HAS_BOOLEAN_VALUE,c=i.HAS_NUMERIC_VALUE,l=i.HAS_POSITIVE_NUMERIC_VALUE,u=i.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function p(e,t,r){var n,o,i,p=e.Properties,f=e.DOMAttributeNames;for(o in p)n=f[o]||(r?o:o.toLowerCase()),i=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(i,a),hasBooleanValue:d(i,s),hasNumericValue:d(i,c),hasPositiveNumericValue:d(i,l),hasOverloadedBooleanValue:d(i,u)}}var f={};p(n,f);var m={};p(o,m,!0);var h={};p(n,h),p(o,h,!0),e.exports={html:f,svg:m,properties:h,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(81)),i=r(83);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[i.camelCase(e,t)]=n)})),r):r}},function(e,t,r){var n=r(82);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var i,a,s=n(e),c="function"==typeof t,l=0,u=s.length;l<u;l++)i=(r=s[l]).property,a=r.value,c?t(i,a,r):a&&(o||(o={}),o[i]=a);return o}},function(e,t){var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e){return e?e.replace(l,""):""}e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var l=1,d=1;function p(e){var t=e.match(n);t&&(l+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function f(){var e={line:l,column:d};return function(t){return t.position=new m(e),y(),t}}function m(e){this.start=e,this.end={line:l,column:d},this.source=t.source}m.prototype.content=e;var h=[];function b(r){var n=new Error(t.source+":"+l+":"+d+": "+r);if(n.reason=r,n.filename=t.source,n.line=l,n.column=d,n.source=e,!t.silent)throw n;h.push(n)}function g(t){var r=t.exec(e);if(r){var n=r[0];return p(n),e=e.slice(n.length),r}}function y(){g(o)}function E(e){var t;for(e=e||[];t=v();)!1!==t&&e.push(t);return e}function v(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;""!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return b("End of comment missing");var n=e.slice(2,r-2);return d+=2,p(n),e=e.slice(r),d+=2,t({type:"comment",comment:n})}}function O(){var e=f(),t=g(i);if(t){if(v(),!g(a))return b("property missing ':'");var n=g(s),o=e({type:"declaration",property:u(t[0].replace(r,"")),value:n?u(n[0].replace(r,"")):""});return g(c),o}}return y(),function(){var e,t=[];for(E(t);e=O();)!1!==e&&(t.push(e),E(t));return t}()}},function(e,t,r){"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=function(e,t){return t.toUpperCase()},c=function(e,t){return t+"-"};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||i.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),t.reactCompat||(e=e.replace(a,c)),e.replace(o,s))}},function(e,t,r){var n=r(85),o=r(59),i=o.formatDOM,a=o.isIE(9),s=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(s);return r&&r[1]&&(t=r[1],a&&(e=e.replace(r[0],""))),i(n(e),null,t)}},function(e,t,r){var n=r(59),o=/<([a-zA-Z]+[0-9]?)/,i=/<head.*>/i,a=/<body.*>/i,s=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,c=n.isIE(9),l=c||n.isIE(),u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,f=c?"text/xml":"text/html";u=d=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),c&&(e=e.replace(s,"<$1$2$3/>")),p.parseFromString(e,f)}}if(document.implementation){var m=document.implementation.createHTMLDocument(l?"html-dom-parser":void 0);u=function(e,t){if(t)return m.documentElement.getElementsByTagName(t)[0].innerHTML=e,m;try{return m.documentElement.innerHTML=e,m}catch(t){if(d)return d(e)}}}var h,b=document.createElement("template");b.content&&(h=function(e){return b.innerHTML=e,b.content.childNodes}),e.exports=function(e){var t,r,n,s,c=e.match(o);switch(c&&c[1]&&(t=c[1].toLowerCase()),t){case"html":return r=d(e),i.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),a.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return s=u(e).getElementsByTagName(t),a.test(e)&&i.test(e)?s[0].parentNode.childNodes:s;default:return h?h(e):u(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return b}));var n=r(0),o=(r(8),r(9)),i=r(38),a=r(18),s=r(10),c=r.n(s),l=r(4),u=r.n(l),d=r(116);r(74);const p=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""};var f=e=>{let{className:t,notices:r,removeNotice:o}=e;const i=r.filter(e=>"snackbar"!==e.type);if(!i.length)return null;const a=u()(t,"wc-block-components-notices");return Object(n.createElement)("div",{className:a},i.map(e=>Object(n.createElement)(d.a,c()({key:"store-notice-"+e.id},e,{className:u()("wc-block-components-notices__notice",p(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const m=Object(n.createContext)({notices:[],createNotice:(e,t,r)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),h=()=>Object(n.useContext)(m),b=e=>{let{children:t,className:r="",createNoticeContainer:s=!0,context:c="wc/core"}=e;const{createNotice:l,removeNotice:u}=Object(o.useDispatch)("core/notices"),[d,p]=Object(n.useState)(!1),{dispatchStoreEvent:h}=Object(i.a)(),{isEditor:b}=Object(a.a)(),g=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};l(e,t,{...r,context:r.context||c}),h("store-notice-create",{status:e,content:t,options:r})}),[l,h,c]),y=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;u(e,t)}),[u,c]),{notices:E}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(c)}),[c]),v={notices:E,createNotice:g,removeNotice:y,context:c,setIsSuppressed:p},O=d?null:Object(n.createElement)(f,{className:r,notices:v.notices,removeNotice:v.removeNotice,isEditor:b});return Object(n.createElement)(m.Provider,{value:v},s&&O,t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},i=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return s}));var n=r(5);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const i={addEventCallback:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(n.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},a={},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:r,id:n,callback:i,priority:s}=arguments.length>1?arguments[1]:void 0;const c=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return c.set(n,{priority:s,callback:i}),{...e,[r]:c};case o.REMOVE_EVENT_CALLBACK:return c.delete(n),{...e,[r]:c}}}},function(e,t,r){"use strict";var n=r(0),o=r(24);const i=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=i},function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(10)),i=n(r(120)),a=r(3),s=n(a),c=n(r(121)),l=n(r(123)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var r;for(r in e)if(!(r in t))return!1;for(r in t)if(e[r]!==t[r])return!1;return!u.und(r)||e===t}};function d(){var e=a.useState(!1)[1];return a.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function m(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return u.fun(e)?e.apply(void 0,r):e}function h(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,i(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var r=Object.keys(e).reduce((function(r,n){var i;return u.und(t[n])?o({},r,((i={})[n]=e[n],i)):r}),{});return o({to:t},r)}var b,g,y=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),E=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof y&&e.addChild(l(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof y&&e.removeChild(l(t))}))},t}return c(t,e),t}(y),v=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof y&&e.addChild(l(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof y&&e.removeChild(l(t))}))},t}c(t,e);var r=t.prototype;return r.getValue=function(e){void 0===e&&(e=!1);var t={};for(var r in this.payload){var n=this.payload[r];(!e||n instanceof y)&&(t[r]=n instanceof y?n[e?"getAnimatedValue":"getValue"]():n)}return t},r.getAnimatedValue=function(){return this.getValue(!0)},t}(y);function O(e,t){b={fn:e,transform:t}}function S(e){g=e}var _,j=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},w=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function k(e){_=e}var C,R=function(){return Date.now()};function T(e){C=e}var P,x,A=function(e){return e.current};function N(e){P=e}var M=Object.freeze({get applyAnimatedValues(){return b},injectApplyAnimatedValues:O,get colorNames(){return g},injectColorNames:S,get requestFrame(){return j},get cancelFrame(){return w},injectFrame:function(e,t){j=e,w=t},get interpolation(){return _},injectStringInterpolator:k,get now(){return R},injectNow:function(e){R=e},get defaultElement(){return C},injectDefaultElement:T,get animatedApi(){return A},injectAnimatedApi:function(e){A=e},get createAnimatedStyle(){return P},injectCreateAnimatedStyle:N,get manualFrameloop(){return x},injectManualFrameloop:function(e){x=e}}),I=function(e){function t(t,r){var n;return(n=e.call(this)||this).update=void 0,n.payload=t.style?o({},t,{style:P(t.style)}):t,n.update=r,n.attach(),n}return c(t,e),t}(v),D=!1,L=new Set,F=function e(){if(!D)return!1;var t=R(),r=L,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var i;if(n){if(o>=r.length)break;i=r[o++]}else{if((o=r.next()).done)break;i=o.value}for(var a=i,s=!1,c=0;c<a.configs.length;c++){for(var l=a.configs[c],u=void 0,d=void 0,p=0;p<l.animatedValues.length;p++){var f=l.animatedValues[p];if(!f.done){var m=l.fromValues[p],h=l.toValues[p],b=f.lastPosition,g=h instanceof y,E=Array.isArray(l.initialVelocity)?l.initialVelocity[p]:l.initialVelocity;if(g&&(h=h.getValue()),l.immediate)f.setValue(h),f.done=!0;else if("string"!=typeof m&&"string"!=typeof h){if(void 0!==l.duration)b=m+l.easing((t-f.startTime)/l.duration)*(h-m),u=t>=f.startTime+l.duration;else if(l.decay)b=m+E/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-b)<.1)&&(h=b);else{d=void 0!==f.lastTime?f.lastTime:t,E=void 0!==f.lastVelocity?f.lastVelocity:l.initialVelocity,t>d+64&&(d=t);for(var v=Math.floor(t-d),O=0;O<v;++O)b+=1*(E+=(-l.tension*(b-h)+-l.friction*E)/l.mass*1/1e3)/1e3;var S=!(!l.clamp||0===l.tension)&&(m<h?b>h:b<h),_=Math.abs(E)<=l.precision,w=0===l.tension||Math.abs(h-b)<=l.precision;u=S||_&&w,f.lastVelocity=E,f.lastTime=t}g&&!l.toValues[p].done&&(u=!1),u?(f.value!==h&&(b=h),f.done=!0):s=!0,f.setValue(b),f.lastPosition=b}else f.setValue(h),f.done=!0}}a.props.onFrame&&(a.values[l.name]=l.interpolation.getValue())}a.props.onFrame&&a.props.onFrame(a.values),s||(L.delete(a),a.stop(!0))}return L.size?x?x():j(e):D=!1,D};function V(e,t,r){if("function"==typeof e)return e;if(Array.isArray(e))return V({range:e,output:t,extrapolate:r});if(_&&"string"==typeof e.output[0])return _(e);var n=e,o=n.output,i=n.range||[0,1],a=n.extrapolateLeft||n.extrapolate||"extend",s=n.extrapolateRight||n.extrapolate||"extend",c=n.easing||function(e){return e};return function(e){var t=function(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}(e,i);return function(e,t,r,n,o,i,a,s,c){var l=c?c(e):e;if(l<t){if("identity"===a)return l;"clamp"===a&&(l=t)}if(l>r){if("identity"===s)return l;"clamp"===s&&(l=r)}return n===o?n:t===r?e<=t?n:o:(t===-1/0?l=-l:r===1/0?l-=t:l=(l-t)/(r-t),l=i(l),n===-1/0?l=-l:o===1/0?l+=n:l=l*(o-n)+n,l)}(e,i[t],i[t+1],o[t],o[t+1],c,a,s,n.map)}}var B=function(e){function t(r,n,o,i){var a;return(a=e.call(this)||this).calc=void 0,a.payload=r instanceof E&&!(r instanceof t)?r.getPayload():Array.isArray(r)?r:[r],a.calc=V(n,o,i),a}c(t,e);var r=t.prototype;return r.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},r.updateConfig=function(e,t,r){this.calc=V(e,t,r)},r.interpolate=function(e,r,n){return new t(this,e,r,n)},t}(E),U=function(e){function t(t){var r;return(r=e.call(this)||this).animatedStyles=new Set,r.value=void 0,r.startPosition=void 0,r.lastPosition=void 0,r.lastVelocity=void 0,r.startTime=void 0,r.lastTime=void 0,r.done=!1,r.setValue=function(e,t){void 0===t&&(t=!0),r.value=e,t&&r.flush()},r.value=t,r.startPosition=t,r.lastPosition=t,r}c(t,e);var r=t.prototype;return r.flush=function(){0===this.animatedStyles.size&&function e(t,r){"update"in t?r.add(t):t.getChildren().forEach((function(t){return e(t,r)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},r.clearStyles=function(){this.animatedStyles.clear()},r.getValue=function(){return this.value},r.interpolate=function(e,t,r){return new B(this,e,t,r)},t}(y),H=function(e){function t(t){var r;return(r=e.call(this)||this).payload=t.map((function(e){return new U(e)})),r}c(t,e);var r=t.prototype;return r.setValue=function(e,t){var r=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,n){return r.payload[n].setValue(e,t)})):this.payload.forEach((function(r){return r.setValue(e,t)}))},r.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},r.interpolate=function(e,t){return new B(this,e,t)},t}(E),G=0,z=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),r=t.delay,n=void 0===r?0:r,a=t.to,s=i(t,["delay","to"]);if(u.arr(a)||u.fun(a))this.queue.push(o({},s,{delay:n,to:a}));else if(a){var c={};Object.entries(a).forEach((function(e){var t,r=e[0],i=e[1],a=o({to:(t={},t[r]=i,t),delay:m(n,r)},s),l=c[a.delay]&&c[a.delay].to;c[a.delay]=o({},c[a.delay],a,{to:o({},l,a.to)})})),this.queue=Object.values(c)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(s),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var r=e.from,n=void 0===r?{}:r,i=e.to,a=void 0===i?{}:i;u.obj(n)&&(t.merged=o({},n,t.merged)),u.obj(a)&&(t.merged=o({},t.merged,a))}));var r=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach((function(o,a){var s=o.delay,c=i(o,["delay"]),l=function(o){a===n.length-1&&r===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(c.to)||u.fun(c.to);s?setTimeout((function(){r===t.guid&&(d?t.runAsync(c,l):t.diff(c).start(l))}),s):d?t.runAsync(c,l):t.diff(c).start(l)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),D||(D=!0,j(x||F));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var r=this,n=(e.delay,i(e,["delay"])),a=this.local,s=Promise.resolve(void 0);if(u.arr(n.to))for(var c=function(e){var t=e,i=o({},n,h(n.to[t]));u.arr(i.config)&&(i.config=i.config[t]),s=s.then((function(){if(a===r.guid)return new Promise((function(e){return r.diff(i).start(e)}))}))},l=0;l<n.to.length;l++)c(l);else if(u.fun(n.to)){var d,p=0;s=s.then((function(){return n.to((function(e){var t=o({},n,h(e));if(u.arr(t.config)&&(t.config=t.config[p]),p++,a===r.guid)return d=new Promise((function(e){return r.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),r.stop(e)})).then((function(){return d}))}))}s.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var r=this.props,n=r.from,i=void 0===n?{}:n,a=r.to,s=void 0===a?{}:a,c=r.config,l=void 0===c?{}:c,d=r.reverse,h=r.attach,b=r.reset,y=r.immediate;if(d){var E=[s,i];i=E[0],s=E[1]}this.merged=o({},i,this.merged,s),this.hasChanged=!1;var v=h&&h(this);if(this.animations=Object.entries(this.merged).reduce((function(e,r){var n=r[0],a=r[1],s=e[n]||{},c=u.num(a),d=u.str(a)&&!a.startsWith("#")&&!/\d/.test(a)&&!g[a],h=u.arr(a),E=!c&&!h&&!d,O=u.und(i[n])?a:i[n],S=c||h||d?a:1,j=m(l,n);v&&(S=v.animations[n].parent);var w,k=s.parent,C=s.interpolation,T=f(v?S.getPayload():S),P=a;E&&(P=_({range:[0,1],output:[a,a]})(1));var x,A=C&&C.getValue(),N=!u.und(k)&&s.animatedValues.some((function(e){return!e.done})),M=!u.equ(P,A),I=!u.equ(P,s.previous),D=!u.equ(j,s.config);if(b||I&&M||D){var L;if(c||d)k=C=s.parent||new U(O);else if(h)k=C=s.parent||new H(O);else if(E){var F=s.interpolation&&s.interpolation.calc(s.parent.value);F=void 0===F||b?O:F,s.parent?(k=s.parent).setValue(0,!1):k=new U(0);var V={output:[F,a]};s.interpolation?(C=s.interpolation,s.interpolation.updateConfig(V)):C=k.interpolate(V)}return T=f(v?S.getPayload():S),w=f(k.getPayload()),b&&!E&&k.setValue(O,!1),t.hasChanged=!0,w.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=N?e.lastVelocity:void 0,e.lastTime=N?e.lastTime:void 0,e.startTime=R(),e.done=!1,e.animatedStyles.clear()})),m(y,n)&&k.setValue(E?S:a,!1),o({},e,((L={})[n]=o({},s,{name:n,parent:k,interpolation:C,animatedValues:w,toValues:T,previous:P,config:j,fromValues:f(k.getValue()),immediate:m(y,n),initialVelocity:p(j.velocity,0),clamp:p(j.clamp,!1),precision:p(j.precision,.01),tension:p(j.tension,170),friction:p(j.friction,26),mass:p(j.mass,1),duration:j.duration,easing:p(j.easing,(function(e){return e})),decay:j.decay}),L))}return M?e:(E&&(k.setValue(1,!1),C.updateConfig({output:[P,P]})),k.done=!0,t.hasChanged=!0,o({},e,((x={})[n]=o({},e[n],{previous:P}),x)))}),this.animations),this.hasChanged)for(var O in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[O]=this.animations[O].interpolation,this.values[O]=this.animations[O].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),W=function(e,t){var r=a.useRef(!1),n=a.useRef(),o=u.fun(t),i=a.useMemo((function(){var r;return n.current&&(n.current.map((function(e){return e.destroy()})),n.current=void 0),[new Array(e).fill().map((function(e,n){var i=new z,a=o?m(t,n,i):t[n];return 0===n&&(r=a.ref),i.update(a),r||i.start(),i})),r]}),[e]),s=i[0],c=i[1];n.current=s,a.useImperativeHandle(c,(function(){return{start:function(){return Promise.all(n.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return n.current.forEach((function(t){return t.stop(e)}))},get controllers(){return n.current}}}));var l=a.useMemo((function(){return function(e){return n.current.map((function(t,r){t.update(o?m(e,r,t):e[r]),c||t.start()}))}}),[e]);a.useEffect((function(){r.current?o||l(t):c||n.current.forEach((function(e){return e.start()}))})),a.useEffect((function(){return r.current=!0,function(){return n.current.forEach((function(e){return e.destroy()}))}}),[]);var d=n.current.map((function(e){return e.getValues()}));return o?[d,l,function(e){return n.current.forEach((function(t){return t.pause(e)}))}]:d},q=0,Y=function(e,t){return("function"==typeof t?e.map(t):f(t)).map(String)},X=function(e){var t=e.items,r=e.keys,n=void 0===r?function(e){return e}:r,a=i(e,["items","keys"]);return t=f(void 0!==t?t:null),o({items:t,keys:Y(t,n)},a)};function $(e,t){var r=function(){if(o){if(i>=n.length)return"break";a=n[i++]}else{if((i=n.next()).done)return"break";a=i.value}var r=a.key,s=function(e){return e.key!==r};(u.und(t)||t===r)&&(e.current.instances.delete(r),e.current.transitions=e.current.transitions.filter(s),e.current.deleted=e.current.deleted.filter(s))},n=e.current.deleted,o=Array.isArray(n),i=0;for(n=o?n:n[Symbol.iterator]();;){var a;if("break"===r())break}e.current.forceUpdate()}var K=function(e){function t(t){var r;return void 0===t&&(t={}),r=e.call(this)||this,!t.transform||t.transform instanceof y||(t=b.transform(t)),r.payload=t,r}return c(t,e),t}(v),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Q="[-+]?\\d*\\.?\\d+";function Z(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+Z(Q,Q,Q)),te=new RegExp("rgba"+Z(Q,Q,Q,Q)),re=new RegExp("hsl"+Z(Q,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),ne=new RegExp("hsla"+Z(Q,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Q)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ae=/^#([0-9a-fA-F]{6})$/,se=/^#([0-9a-fA-F]{8})$/;function ce(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function le(e,t,r){var n=r<.5?r*(1+t):r+t-r*t,o=2*r-n,i=ce(o,n,e+1/3),a=ce(o,n,e),s=ce(o,n,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,r,n="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(r=ae.exec(t))?parseInt(r[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(r=ee.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|255)>>>0:(r=te.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|pe(r[4]))>>>0:(r=oe.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=se.exec(t))?parseInt(r[1],16)>>>0:(r=ie.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=re.exec(t))?(255|le(de(r[1]),fe(r[2]),fe(r[3])))>>>0:(r=ne.exec(t))?(le(de(r[1]),fe(r[2]),fe(r[3]))|pe(r[4]))>>>0:null;return null===n?e:"rgba("+((4278190080&(n=n||0))>>>24)+", "+((16711680&n)>>>16)+", "+((65280&n)>>>8)+", "+(255&n)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,be=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(J).join("|")+")","g"),ye={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ee=["Webkit","Ms","Moz","O"];function ve(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||ye.hasOwnProperty(e)&&ye[e]?(""+t).trim():t+"px"}ye=Object.keys(ye).reduce((function(e,t){return Ee.forEach((function(r){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(r,t)]=e[t]})),e}),ye);var Oe={};N((function(e){return new K(e)})),T("div"),k((function(e){var t=e.output.map((function(e){return e.replace(be,me)})).map((function(e){return e.replace(ge,me)})),r=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return r[t].push(+e)}))}));var n=t[0].match(he).map((function(t,n){return V(o({},e,{output:r[n]}))}));return function(e){var r=0;return t[0].replace(he,(function(){return n[r++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,r,n,o){return"rgba("+Math.round(t)+", "+Math.round(r)+", "+Math.round(n)+", "+o+")"}))}})),S(J),O((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var r=t.style,n=t.children,o=t.scrollTop,a=t.scrollLeft,s=i(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==n&&(e.textContent=n),r)if(r.hasOwnProperty(l)){var u=0===l.indexOf("--"),d=ve(l,r[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,d):e.style[l]=d}for(var p in s){var f=c?p:Oe[p]||(Oe[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,s[p])}}),(function(e){return e}));var Se,_e,je=(Se=function(e){return a.forwardRef((function(t,r){var n=d(),c=a.useRef(!0),l=a.useRef(null),p=a.useRef(null),f=a.useCallback((function(e){var t=l.current;l.current=new I(e,(function(){var e=!1;p.current&&(e=b.fn(p.current,l.current.getAnimatedValue())),p.current&&!1!==e||n()})),t&&t.detach()}),[]);a.useEffect((function(){return function(){c.current=!1,l.current&&l.current.detach()}}),[]),a.useImperativeHandle(r,(function(){return A(p,c,n)})),f(t);var m,h=l.current.getValue(),g=(h.scrollTop,h.scrollLeft,i(h,["scrollTop","scrollLeft"])),y=(m=e,!u.fun(m)||m.prototype instanceof s.Component?function(e){return p.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,r)}:void 0);return s.createElement(e,o({},g,{ref:y}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var r=_e?t[0].toLowerCase()+t.substring(1):t;return e[r]=Se(r),e}),Se)}),we=je(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=je,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=F,t.animated=we,t.a=we,t.interpolate=function(e,t,r){return e&&new B(e,t,r)},t.Globals=M,t.useSpring=function(e){var t=u.fun(e),r=W(1,t?e:[e]),n=r[0],o=r[1],i=r[2];return t?[n[0],o,i]:n},t.useTrail=function(e,t){var r=a.useRef(!1),n=u.fun(t),i=m(t),s=a.useRef(),c=W(e,(function(e,t){return 0===e&&(s.current=[]),s.current.push(t),o({},i,{config:m(i.config,e),attach:e>0&&function(){return s.current[e-1]}})})),l=c[0],d=c[1],p=c[2],f=a.useMemo((function(){return function(e){return d((function(t,r){e.reverse;var n=e.reverse?t+1:t-1,a=s.current[n];return o({},e,{config:m(e.config||i.config,t),attach:a&&function(){return a}})}))}}),[e,i.reverse]);return a.useEffect((function(){r.current&&!n&&f(t)})),a.useEffect((function(){r.current=!0}),[]),n?[l,f,p]:l},t.useTransition=function(e,t,r){var n=o({items:e,keys:t||function(e){return e}},r),s=X(n),c=s.lazy,l=void 0!==c&&c,u=(s.unique,s.reset),p=void 0!==u&&u,f=(s.enter,s.leave,s.update,s.onDestroyed),h=(s.keys,s.items,s.onFrame),b=s.onRest,g=s.onStart,y=s.ref,E=i(s,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),v=d(),O=a.useRef(!1),S=a.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!n.ref,instances:!O.current&&new Map,forceUpdate:v});return a.useImperativeHandle(n.ref,(function(){return{start:function(){return Promise.all(Array.from(S.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(S.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(S.current.instances).map((function(e){return e[1]}))}}})),S.current=function(e,t){for(var r=e.first,n=e.prevProps,a=i(e,["first","prevProps"]),s=X(t),c=s.items,l=s.keys,u=s.initial,d=s.from,p=s.enter,f=s.leave,h=s.update,b=s.trail,g=void 0===b?0:b,y=s.unique,E=s.config,v=s.order,O=void 0===v?["enter","leave","update"]:v,S=X(n),_=S.keys,j=S.items,w=o({},a.current),k=[].concat(a.deleted),C=Object.keys(w),R=new Set(C),T=new Set(l),P=l.filter((function(e){return!R.has(e)})),x=a.transitions.filter((function(e){return!e.destroyed&&!T.has(e.originalKey)})).map((function(e){return e.originalKey})),A=l.filter((function(e){return R.has(e)})),N=-g;O.length;)switch(O.shift()){case"enter":P.forEach((function(e,t){y&&k.find((function(t){return t.originalKey===e}))&&(k=k.filter((function(t){return t.originalKey!==e})));var n=l.indexOf(e),o=c[n],i=r&&void 0!==u?"initial":"enter";w[e]={slot:i,originalKey:e,key:y?String(e):q++,item:o,trail:N+=g,config:m(E,o,i),from:m(r&&void 0!==u?u||{}:d,o),to:m(p,o)}}));break;case"leave":x.forEach((function(e){var t=_.indexOf(e),r=j[t];k.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=g,config:m(E,r,"leave"),to:m(f,r)})),delete w[e]}));break;case"update":A.forEach((function(e){var t=l.indexOf(e),r=c[t];w[e]=o({},w[e],{item:r,slot:"update",trail:N+=g,config:m(E,r,"update"),to:m(h,r)})}))}var M=l.map((function(e){return w[e]}));return k.forEach((function(e){var t,r=e.left,n=(e.right,i(e,["left","right"]));-1!==(t=M.findIndex((function(e){return e.originalKey===r})))&&(t+=1),t=Math.max(0,t),M=[].concat(M.slice(0,t),[n],M.slice(t))})),o({},a,{changed:P.length||x.length||A.length,first:r&&0===P.length,transitions:M,current:w,deleted:k,prevProps:t})}(S.current,n),S.current.changed&&S.current.transitions.forEach((function(e){var t=e.slot,r=e.from,n=e.to,i=e.config,a=e.trail,s=e.key,c=e.item;S.current.instances.has(s)||S.current.instances.set(s,new z);var u=S.current.instances.get(s),d=o({},E,{to:n,from:r,config:i,ref:y,onRest:function(r){S.current.mounted&&(e.destroyed&&(y||l||$(S,s),f&&f(c)),!Array.from(S.current.instances).some((function(e){return!e[1].idle}))&&(y||l)&&S.current.deleted.length>0&&$(S),b&&b(c,t,r))},onStart:g&&function(){return g(c,t)},onFrame:h&&function(e){return h(c,t,e)},delay:a,reset:p&&"enter"===t});u.update(d),S.current.paused||u.start()})),a.useEffect((function(){return S.current.mounted=O.current=!0,function(){S.current.mounted=O.current=!1,Array.from(S.current.instances).map((function(e){return e[1].destroy()})),S.current.instances.clear()}}),[]),S.current.transitions.map((function(e){var t=e.item,r=e.slot,n=e.key;return{item:t,key:n,state:r,props:S.current.instances.get(n).getValues()}}))},t.useChain=function(e,t,r){void 0===r&&(r=1e3);var n=a.useRef();a.useEffect((function(){u.equ(e,n.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,n){var i=e.current;if(i){var a=i.controllers;if(a.length){var s=r*t[n];a.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+s})})),e.start()}))}}})):e.reduce((function(e,t,r){var n=t.current;return e.then((function(){return n.start()}))}),Promise.resolve()),n.current=e}))},t.useSprings=W},,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(9),o=r(0),i=r(6),a=r(54);const s=()=>{const e=Object(a.a)(),{selectShippingRate:t}=Object(n.useDispatch)(i.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((r,n)=>{t(r,n).catch(t=>{e(t)})},[e,t]),isSelectingRate:Object(n.useSelect)(e=>e(i.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},,function(e,t){},,,,,,function(e,t,r){"use strict";(function(e){var n=r(0),o=r(5),i=r(4),a=r.n(i),s=r(23),c=r(1),l=(r(45),r(56));t.a=Object(n.forwardRef)((function({className:t,children:r,spokenMessage:i=r,politeness:u="polite",actions:d=[],onRemove:p=o.noop,icon:f=null,explicitDismiss:m=!1,onDismiss:h=o.noop},b){function g(e){e&&e.preventDefault&&e.preventDefault(),h(),p()}h=h||o.noop,function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(s.speak)(r,t)},[r,t])}(i,u),Object(n.useEffect)(()=>{const e=setTimeout(()=>{m||(h(),p())},1e4);return()=>clearTimeout(e)},[h,p]);const y=a()(t,"components-snackbar",{"components-snackbar-explicit-dismiss":!!m});d&&d.length>1&&(void 0!==e&&e.env,d=[d[0]]);const E=a()("components-snackbar__content",{"components-snackbar__content-with-icon":!!f});return Object(n.createElement)("div",{ref:b,className:y,onClick:m?o.noop:g,tabIndex:"0",role:m?"":"button",onKeyPress:m?o.noop:g,"aria-label":m?"":Object(c.__)("Dismiss this notice")},Object(n.createElement)("div",{className:E},f&&Object(n.createElement)("div",{className:"components-snackbar__icon"},f),r,d.map(({label:e,onClick:t,url:r},o)=>Object(n.createElement)(l.a,{key:o,href:r,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),p(),t&&t(e)}(e,t),className:"components-snackbar__action"},e)),m&&Object(n.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:g,onKeyPress:g},"✕")))}))}).call(this,r(65))},function(e,t){e.exports=window.wp.plugins},function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){return c}));var n=r(2),o=r(50),i=r(34);const a=e=>{let{country:t="",state:r="",city:n="",postcode:o=""}=e;return{country:t.trim(),state:r.trim(),city:n.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},s=e=>{let{email:t=""}=e;return Object(i.isEmail)(t)?t.trim():""},c=e=>{const t=Object.keys(n.defaultAddressFields),r=Object(o.a)(t,{},e.country),i=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(i[r]="")}),i}},function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},,function(e,t,r){"use strict";var n=r(0),o=r(5),i=r(4),a=r.n(i),s=r(1),c=r(23),l=r(90),u=r(56);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:r,spokenMessage:i=r,onRemove:p=o.noop,isDismissible:f=!0,actions:m=[],politeness:h=d(t),__unstableHTML:b,onDismiss:g=o.noop}){!function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(c.speak)(r,t)},[r,t])}(i,h);const y=a()(e,"components-notice","is-"+t,{"is-dismissible":f});return b&&(r=Object(n.createElement)(n.RawHTML,null,r)),Object(n.createElement)("div",{className:y},Object(n.createElement)("div",{className:"components-notice__content"},r,Object(n.createElement)("div",{className:"components-notice__actions"},m.map(({className:e,label:t,isPrimary:r,variant:o,noDefaultClasses:i=!1,onClick:s,url:c},l)=>{let d=o;return"primary"===o||i||(d=c?"link":"secondary"),void 0===d&&r&&(d="primary"),Object(n.createElement)(u.a,{key:l,href:c,variant:d,onClick:c?void 0:s,className:a()("components-notice__action",e)},t)}))),f&&Object(n.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(s.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),g(),p()},showTooltip:!1}))}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(0),o=r(53),i=r(61),a=r.n(i),s=r(13);const c=(e,t)=>e&&t[e]?t[e]:null,l=e=>{let{block:t,blockMap:r,blockWrapper:o,children:i,depth:u=1}=e;return i&&0!==i.length?Array.from(i).map((e,i)=>{const{blockName:d="",...p}={key:`${t}_${u}_${i}`,...e instanceof HTMLElement?e.dataset:{},className:e.className||""},f=c(d,r);if(!f){const i=a()((null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof i&&i)return i;if(!Object(n.isValidElement)(i))return null;const s=e.childNodes.length?l({block:t,blockMap:r,children:e.childNodes,depth:u+1,blockWrapper:o}):void 0;return s?Object(n.cloneElement)(i,p,s):Object(n.cloneElement)(i,p)}const m=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${u}_${i}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(m,null,Object(n.createElement)(f,p,l({block:t,blockMap:r,children:e.children,depth:u+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(s.hasInnerBlocks)(e))return null;const i=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],a=Object(s.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!i.includes(t)}),l=o||n.Fragment;return Object(n.createElement)(l,null,a.map((e,r)=>{let{blockName:o,component:i}=e;const a=i||c(o,t);return a?Object(n.createElement)(a,{key:`${o}_forced_${r}`}):null}))})(d,r,e.children,o))))}):null},u=e=>{let{Block:t,selector:r,blockName:n,getProps:i=(()=>({})),blockMap:a,blockWrapper:s}=e;Object(o.a)({Block:t,selector:r,getProps:(e,t)=>{const r=l({block:n,blockMap:a,children:e.children||[],blockWrapper:s});return{...i(e,t),children:r}}})}},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){var n=r(122);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,r(t,n)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";r.d(t,"a",(function(){return S}));var n=r(0),o=r(108),i=r(2),a=r(16),s=r(204),c=r(44),l=r(33),u=r(31),d=r(1),p=r(27),f=r.n(p),m=r(109),h=r(88);const b=(e,t,r)=>{const n=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${r}-new-payment-method`;return n.push({key:o,value:t}),n},g=(e,t)=>{f.a.setNonce&&"function"==typeof f.a.setNonce&&f.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))};var y=r(160),E=r(22),v=r(32),O=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:r,redirectUrl:o,isProcessing:i,isBeforeProcessing:a,isComplete:p,orderNotes:O,shouldCreateAccount:S,extensionData:_}=Object(u.b)(),{hasValidationErrors:j}=Object(y.b)(),{shippingErrorStatus:w}=Object(c.b)(),{billingData:k,shippingAddress:C}=Object(l.b)(),{cartNeedsPayment:R,receiveCart:T}=Object(E.a)(),{activePaymentMethod:P,isExpressPaymentMethodActive:x,currentStatus:A,paymentMethodData:N,expressPaymentMethods:M,paymentMethods:I,shouldSavePayment:D}=Object(s.b)(),{addErrorNotice:L,removeNotice:F,setIsSuppressed:V}=Object(v.a)(),B=Object(n.useRef)(k),U=Object(n.useRef)(C),H=Object(n.useRef)(o),[G,z]=Object(n.useState)(!1),W=Object(n.useMemo)(()=>{var e;const t={...M,...I};return null==t||null===(e=t[P])||void 0===e?void 0:e.paymentMethodId},[P,M,I]),q=j&&!x||A.hasError||w.hasError,Y=!e&&!q&&(A.isSuccessful||!R)&&i;Object(n.useEffect)(()=>{V(x)},[x,V]),Object(n.useEffect)(()=>{q===e||!i&&!a||x||r.setHasError(q)},[q,e,i,a,x,r]),Object(n.useEffect)(()=>{B.current=k,U.current=C,H.current=o},[k,C,o]);const X=Object(n.useCallback)(()=>!j&&(A.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!w.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[j,A.hasError,w.hasError]);Object(n.useEffect)(()=>{let e;return x||(e=t(X,0)),()=>{x||e()}},[t,X,x]),Object(n.useEffect)(()=>{H.current&&(window.location.href=H.current)},[p]);const $=Object(n.useCallback)(async()=>{if(G)return;z(!0),F("checkout");const e=R?{payment_method:W,payment_data:b(N,D,P)}:{},t={billing_address:Object(m.a)(B.current),shipping_address:Object(m.a)(U.current),customer_note:O,should_create_account:S,...e,extensions:{..._}};f()({path:"/wc/store/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(g(e.headers,r),!e.ok)throw new Error(e);return e.json()}).then(e=>{r.setAfterProcessing(e),z(!1)}).catch(e=>{try{null!=e&&e.headers&&g(e.headers,r),e.json().then(e=>{var t,n,o;null!==(t=e.data)&&void 0!==t&&t.cart&&T(e.data.cart),L(Object(h.b)(e),{id:"checkout"}),null==e||null===(n=e.additional_errors)||void 0===n||null===(o=n.forEach)||void 0===o||o.call(n,e=>{L(e.message,{id:e.error_code})}),r.setAfterProcessing(e)})}catch{var t;L(Object(d.sprintf)(// Translators: %s Error text.
4
  Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout"})}r.setHasError(!0),z(!1)})},[G,F,O,S,R,W,N,D,P,_,r,L,T]);return Object(n.useEffect)(()=>{Y&&!G&&$()},[$,Y,G]),null};const S=e=>{let{children:t,isCart:r=!1,redirectUrl:d}=e;return Object(n.createElement)(u.a,{redirectUrl:d,isCart:r},Object(n.createElement)(l.a,null,Object(n.createElement)(c.a,null,Object(n.createElement)(s.a,null,t,Object(n.createElement)(a.a,{renderError:i.CURRENT_USER_IS_ADMIN?null:()=>null},Object(n.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(n.createElement)(O,null)))))}},,,function(e){e.exports=JSON.parse('{"name":"woocommerce/filled-cart-block","version":"1.0.0","title":"Filled Cart","description":"Contains blocks that are displayed when the cart contains products.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/empty-cart-block","version":"1.0.0","title":"Empty Cart","description":"Contains blocks that are displayed when the cart is empty.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e,t,r){"use strict";var n=r(0),o=r(1),i=(r(8),r(4)),a=r.n(i),s=(r(161),r(130));t.a=e=>{let{children:t,className:r,screenReaderLabel:i,showSpinner:c=!1,isLoading:l=!0}=e;return Object(n.createElement)("div",{className:a()(r,{"wc-block-components-loading-mask":l})},l&&c&&Object(n.createElement)(s.a,null),Object(n.createElement)("div",{className:a()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},t),l&&Object(n.createElement)("span",{className:"screen-reader-text"},i||Object(o.__)("Loading…","woo-gutenberg-products-block")))}},function(e,t,r){"use strict";var n=r(0);r(157),t.a=()=>Object(n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=(e,t)=>{const r=[];return Object.keys(e).forEach(n=>{if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default}),r}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(0);const o=Object(n.createContext)({hasDarkControls:!1}),i=()=>Object(n.useContext)(o)},,,function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-items-block","version":"1.0.0","title":"Cart Items block","description":"Column containing cart items.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-line-items-block","version":"1.0.0","title":"Cart Line Items","description":"Block containing current line items in Cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-items-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-totals-block","version":"1.0.0","title":"Cart Totals","description":"Column containing the cart totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false},"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/proceed-to-checkout-block","version":"1.0.0","title":"Proceed to checkout","description":"Allow customers proceed to Checkout.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-accepted-payment-methods-block","version":"1.0.0","title":"Accepted Payment Methods","description":"Display accepted payment methods.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,,function(e,t){},,,function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return l}));var n=r(0),o=r(5),i=r(11),a=r.n(i);const s=Object(n.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),c=()=>Object(n.useContext)(s),l=e=>{let{children:t}=e;const[r,i]=Object(n.useState)({}),c=Object(n.useCallback)(e=>r[e],[r]),l=Object(n.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),u=Object(n.useCallback)(e=>{i(t=>{if(!t[e])return t;const{[e]:r,...n}=t;return n})},[]),d=Object(n.useCallback)(()=>{i({})},[]),p=Object(n.useCallback)(e=>{e&&i(t=>(e=Object(o.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&a()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),f=Object(n.useCallback)((e,t)=>{i(r=>{if(!r.hasOwnProperty(e))return r;const n={...r[e],...t};return a()(r[e],n)?r:{...r,[e]:n}})},[]),m={getValidationError:c,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!0})},[f]),showValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!1})},[f]),showAllValidationErrors:Object(n.useCallback)(()=>{i(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:l};return Object(n.createElement)(s.Provider,{value:m},t)}},function(e,t){},,,,,,function(e,t){e.exports=window.wp.keycodes},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(89);const o=(e,t)=>function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const i=n.a.addEventCallback(e,r,o);return t(i),()=>{t(n.a.removeEventCallback(e,i.id))}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return a}));const n=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=r(29);const i=async(e,t,r)=>{const o=n(e,t),i=[];for(const e of o)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&i.push(t)}catch(e){console.error(e)}return!i.length||i},a=async(e,t,r)=>{const i=[],a=n(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return i.push(t),i;i.push(t)}catch(e){return console.error(e),i.push({type:"error"}),i}return i}},,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(207)},function(e,t){},,,,,,,,,,,,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return D})),r.d(t,"a",(function(){return L}));var n=r(0),o=r(35);let i,a;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(i||(i={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(a||(a={}));const s={currentStatus:i.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},c={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:i,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,paymentMethodData:r,shouldSavePaymentMethod:n=!1,errorMessage:o="",paymentMethods:c={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case i.PRISTINE:return{...s,...e,errorMessage:"",currentStatus:i.PRISTINE};case i.STARTED:return{...e,currentStatus:i.STARTED};case i.ERROR:return e.currentStatus!==i.ERROR?{...e,currentStatus:i.ERROR,errorMessage:o||e.errorMessage}:e;case i.FAILED:return e.currentStatus!==i.FAILED?{...e,currentStatus:i.FAILED,paymentMethodData:r||e.paymentMethodData,errorMessage:o||e.errorMessage}:e;case i.SUCCESS:return e.currentStatus!==i.SUCCESS?{...e,currentStatus:i.SUCCESS,paymentMethodData:r||e.paymentMethodData}:e;case i.PROCESSING:return e.currentStatus!==i.PROCESSING?{...e,currentStatus:i.PROCESSING,errorMessage:""}:e;case i.COMPLETE:return e.currentStatus!==i.COMPLETE?{...e,currentStatus:i.COMPLETE}:e;case a.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:c};case a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:c};case a.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:n};case a.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:r||e.paymentMethodData}}},u=r(1),d=r(14),p=r(17),f=r(2),m=r(52),h=r(18),b=r(44),g=r(33),y=r(22),E=r(32),v=r(29);const O=(e,t,r,o)=>{const[i,a]=Object(n.useState)(!1),{isEditor:s}=Object(h.a)(),{selectedRates:c}=Object(b.b)(),{billingData:l,shippingAddress:d}=Object(g.b)(),v=Object(p.a)(c),O=Object(p.a)(r),S=Object(y.a)(),{cartTotals:_,cartIsLoading:j,cartNeedsShipping:w,paymentRequirements:k}=S,C=Object(n.useRef)({cart:S,cartTotals:_,cartNeedsShipping:w,billingData:l,shippingAddress:d,selectedShippingMethods:v,paymentRequirements:k}),{addErrorNotice:R}=Object(E.a)();Object(n.useEffect)(()=>{C.current={cart:S,cartTotals:_,cartNeedsShipping:w,billingData:l,shippingAddress:d,selectedShippingMethods:v,paymentRequirements:k}},[S,_,w,l,d,v,k]);const T=Object(n.useCallback)(async()=>{let r={};const n=e=>{r={...r,[e.name]:e}};for(let e=0;e<O.length;e++){const r=O[e],i=t[r];if(i)try{const e=!!s||await Promise.resolve(i.canMakePayment(C.current));if(e){if("object"==typeof e&&null!==e&&e.error)throw new Error(e.error.message);n(i)}}catch(e){if(f.CURRENT_USER_IS_ADMIN||s){const t=Object(u.sprintf)(
5
  /* translators: %s the id of the payment method being registered (bank transfer, Stripe...) */
6
+ Object(u.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),i.paymentMethodId);R(`${t} ${e}`,{context:o,id:`wc-${i.paymentMethodId}-registration-error`})}}}e(r),a(!0)},[R,e,s,o,O,t]),P=Object(m.a)(T,500,{leading:!0});return Object(n.useEffect)(()=>{j||P()},[P,S,v,l,j]),i},S=e=>({type:e}),_=e=>({type:i.ERROR,errorMessage:e}),j=e=>{let{errorMessage:t,paymentMethodData:r}=e;return{type:i.FAILED,errorMessage:t,paymentMethodData:r}},w=e=>{let{paymentMethodData:t}=e;return{type:i.SUCCESS,paymentMethodData:t}},k=e=>({type:a.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),C=e=>({type:a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),R=e=>({type:a.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),T=(e,t)=>({type:a.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var P=r(31),x=r(89),A=r(169);var N=r(170),M=r(160);const I=Object(n.createContext)(c),D=()=>Object(n.useContext)(I),L=e=>{let{children:t}=e;const{isProcessing:r,isIdle:a,isCalculating:c,hasError:u}=Object(P.b)(),{isEditor:p,getPreviewData:m}=Object(h.a)(),{setValidationErrors:y}=Object(M.b)(),{addErrorNotice:D,removeNotice:L}=Object(E.a)(),{isSuccessResponse:F,isErrorResponse:V,isFailResponse:B,noticeContexts:U}=Object(v.c)(),[H,G]=Object(n.useReducer)(x.b,{}),{onPaymentProcessing:z}=(e=>Object(n.useMemo)(()=>({onPaymentProcessing:Object(A.a)("payment_processing",e)}),[e]))(G),W=Object(n.useRef)(H);Object(n.useEffect)(()=>{W.current=H},[H]);const[q,Y]=Object(n.useReducer)(l,s),{dispatchActions:X,setPaymentStatus:$}=(e=>{const{setBillingData:t}=Object(g.b)(),{setShippingAddress:r}=Object(b.b)();return{dispatchActions:Object(n.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(k(t))},setRegisteredExpressPaymentMethods:t=>{e(C(t))},setShouldSavePayment:t=>{e(R(t))},setActivePaymentMethod:function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(T(t,r))}}),[e]),setPaymentStatus:Object(n.useCallback)(()=>({pristine:()=>e(S(i.PRISTINE)),started:()=>e(S(i.STARTED)),processing:()=>e(S(i.PROCESSING)),completed:()=>e(S(i.COMPLETE)),error:t=>e(_(t)),failed:function(r,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(j({errorMessage:r||"",paymentMethodData:n||{}}))},success:function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof i&&null!=i&&i.address&&r(i.address),e(w({paymentMethodData:n}))}}),[e,t,r])}})(Y),K=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:r}=Object(v.c)(),n=new Set([...Object(f.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return O(e,t,Array.from(n),r.PAYMENTS)})(X.setRegisteredPaymentMethods),J=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:r}=Object(v.c)();return O(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)})(X.setRegisteredExpressPaymentMethods),Q=Object(n.useMemo)(()=>p?m("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(f.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach(r=>{const o=t[r].filter(t=>{var r;let{method:{gateway:n}}=t;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)});o.length&&(n[r]=o)}),n}(q.paymentMethods):{},[p,m,K,q.paymentMethods]),Z=Object(n.useCallback)(e=>{e?D(e,{id:"wc-express-payment-error",context:U.EXPRESS_PAYMENTS}):L("wc-express-payment-error",U.EXPRESS_PAYMENTS)},[D,U.EXPRESS_PAYMENTS,L]),ee=Object.keys(q.expressPaymentMethods).includes(q.activePaymentMethod),te=Object(n.useMemo)(()=>({isPristine:q.currentStatus===i.PRISTINE,isStarted:q.currentStatus===i.STARTED,isProcessing:q.currentStatus===i.PROCESSING,isFinished:[i.ERROR,i.FAILED,i.SUCCESS].includes(q.currentStatus),hasError:q.currentStatus===i.ERROR,hasFailed:q.currentStatus===i.FAILED,isSuccessful:q.currentStatus===i.SUCCESS,isDoingExpressPayment:q.currentStatus!==i.PRISTINE&&ee}),[q.currentStatus,ee]);Object(n.useEffect)(()=>{const e=Object.keys(q.paymentMethods);if(!K||!e.length)return;const t=[...e,...Object.keys(q.expressPaymentMethods)];if(q.activePaymentMethod&&t.includes(q.activePaymentMethod))return;$().pristine();const r=Object.keys(Q).flatMap(e=>Q[e])[0]||void 0;if(r){const e=r.tokenId.toString(),t=r.method.gateway,n=`wc-${t}-payment-token`;X.setActivePaymentMethod(t,{token:e,payment_method:t,[n]:e,isSavedToken:!0})}else X.setActivePaymentMethod(Object.keys(q.paymentMethods)[0])},[K,q.paymentMethods,q.expressPaymentMethods,X,$,q.activePaymentMethod,Q]),Object(n.useEffect)(()=>{!r||u||c||te.isFinished||$().processing()},[r,u,c,te.isFinished,$]),Object(n.useEffect)(()=>{a&&!te.isSuccessful&&$().pristine()},[a,te.isSuccessful,$]),Object(n.useEffect)(()=>{u&&te.isSuccessful&&$().pristine()},[u,te.isSuccessful,$]),Object(n.useEffect)(()=>{te.isProcessing&&(L("wc-payment-error",U.PAYMENTS),Object(N.b)(W.current,"payment_processing",{}).then(e=>{let t,r;var n,o,i,a,s,c;if(e.forEach(e=>{F(e)&&(t=e),(V(e)||B(e))&&(r=e)}),t&&!r)$().success(null===(n=t)||void 0===n||null===(o=n.meta)||void 0===o?void 0:o.paymentMethodData,null===(i=t)||void 0===i||null===(a=i.meta)||void 0===a?void 0:a.billingData,null===(s=t)||void 0===s||null===(c=s.meta)||void 0===c?void 0:c.shippingData);else if(r&&B(r)){var l,u,d,p,f,m;r.message&&r.message.length&&D(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=r)||void 0===m?void 0:m.messageContext)||U.PAYMENTS}),$().failed(null===(l=r)||void 0===l?void 0:l.message,null===(u=r)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=r)||void 0===p||null===(f=p.meta)||void 0===f?void 0:f.billingData)}else if(r){var h,b;r.message&&r.message.length&&D(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(b=r)||void 0===b?void 0:b.messageContext)||U.PAYMENTS}),$().error(r.message),y(null===(h=r)||void 0===h?void 0:h.validationErrors)}else $().success()}))},[te.isProcessing,y,$,L,U.PAYMENTS,F,B,V,D]);const re="object"==typeof q.paymentMethodData&&Object(o.e)(q.paymentMethodData,"token")?q.paymentMethodData.token+"":"",ne={setPaymentStatus:$,currentStatus:te,paymentStatuses:i,paymentMethodData:q.paymentMethodData,errorMessage:q.errorMessage,activePaymentMethod:q.activePaymentMethod,activeSavedToken:re,setActivePaymentMethod:X.setActivePaymentMethod,onPaymentProcessing:z,customerPaymentMethods:Q,paymentMethods:q.paymentMethods,expressPaymentMethods:q.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:J,setExpressPaymentError:Z,isExpressPaymentMethodActive:ee,shouldSavePayment:q.shouldSavePaymentMethod,setShouldSavePayment:X.setShouldSavePayment};return Object(n.createElement)(I.Provider,{value:ne},t)}},,,function(e,t,r){"use strict";r.r(t);var n=r(134),o=r(0),i=r(22),a=r(14),s=r(119),c=r(66),l=r(13),u=r(127),d=r(128),p=r(138),f=r(142),m=r(139),h=r(141),b=r(140),g=r(143),y=r(144);r.p=c.k,Object(l.registerCheckoutBlock)({metadata:u,component:Object(o.lazy)(()=>r.e(25).then(r.bind(null,375)))}),Object(l.registerCheckoutBlock)({metadata:d,component:Object(o.lazy)(()=>r.e(23).then(r.bind(null,376)))}),Object(l.registerCheckoutBlock)({metadata:u,component:Object(o.lazy)(()=>r.e(25).then(r.bind(null,375)))}),Object(l.registerCheckoutBlock)({metadata:d,component:Object(o.lazy)(()=>r.e(23).then(r.bind(null,376)))}),Object(l.registerCheckoutBlock)({metadata:p,component:Object(o.lazy)(()=>r.e(26).then(r.bind(null,377)))}),Object(l.registerCheckoutBlock)({metadata:m,component:Object(o.lazy)(()=>Promise.all([r.e(1),r.e(4),r.e(27)]).then(r.bind(null,386)))}),Object(l.registerCheckoutBlock)({metadata:b,component:Object(o.lazy)(()=>r.e(29).then(r.bind(null,378)))}),Object(l.registerCheckoutBlock)({metadata:h,component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(1),r.e(2),r.e(28)]).then(r.bind(null,390)))}),Object(l.registerCheckoutBlock)({metadata:f,component:Object(o.lazy)(()=>r.e(24).then(r.bind(null,398)))}),Object(l.registerCheckoutBlock)({metadata:g,component:Object(o.lazy)(()=>r.e(22).then(r.bind(null,399)))}),Object(l.registerCheckoutBlock)({metadata:y,component:Object(o.lazy)(()=>r.e(21).then(r.bind(null,400)))});var E=r(1),v=r(129),O=r(160),S=r(2),_=r(16),j=r(67),w=r(71),k=r(211),C=r(87),R=r(124);const T=e=>{let{children:t,redirectUrl:r}=e;return Object(o.createElement)(R.a,{isCart:!0,redirectUrl:r},t)};var P=r(135);r(190);const x=()=>{window.location.reload(!0)},A=e=>{let{children:t,attributes:r}=e;const{cartIsLoading:n}=Object(i.a)(),{hasDarkControls:a}=r;return Object(o.createElement)(v.a,{showSpinner:!0,isLoading:n},Object(o.createElement)(P.a.Provider,{value:{hasDarkControls:a}},Object(o.createElement)(O.a,null,t)))},N=e=>{let{scrollToTop:t}=e;return Object(o.useEffect)(()=>{const e=Object(j.b)("added_to_cart","wc-blocks_added_to_cart");return document.body.addEventListener("wc-blocks_added_to_cart",t),()=>{e(),document.body.removeEventListener("wc-blocks_added_to_cart",t)}},[t]),null};var M=Object(w.a)(e=>{let{attributes:t,children:r,scrollToTop:n}=e;return Object(o.createElement)(_.a,{header:Object(E.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(E.__)("The cart has encountered an unexpected error. If the error persists, please get in touch with us for help.","woo-gutenberg-products-block"),button:Object(o.createElement)("button",{className:"wc-block-button",onClick:x},Object(E.__)("Reload the page","woo-gutenberg-products-block")),showErrorMessage:S.CURRENT_USER_IS_ADMIN},Object(o.createElement)(k.a,{context:"wc/cart"},Object(o.createElement)(C.a,{context:"wc/cart"},Object(o.createElement)(l.SlotFillProvider,null,Object(o.createElement)(T,null,Object(o.createElement)(A,{attributes:t},r),Object(o.createElement)(N,{scrollToTop:n}))))))});const I={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(S.getSetting)("hasDarkEditorStyleSupport",!1)},isShippingCalculatorEnabled:{type:"boolean",default:Object(S.getSetting)("isShippingCalculatorEnabled",!0)},checkoutPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:!0},align:{type:"string"}};Object(s.a)({Block:M,blockName:"woocommerce/cart",selector:".wp-block-woocommerce-cart",getProps:e=>({attributes:Object(n.a)(I,e?e.dataset:{})}),blockMap:Object(a.getRegisteredBlockComponents)("woocommerce/cart"),blockWrapper:e=>{let{children:t}=e;const{extensions:r,receiveCart:n,...a}=Object(i.a)();return o.Children.map(t,e=>{if(Object(o.isValidElement)(e)){const t={extensions:r,cart:a};return Object(o.cloneElement)(e,t)}return e})}})},,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return E})),r.d(t,"a",(function(){return v}));var n=r(0),o=(r(8),r(9)),i=r(7),a=r(4),s=r.n(a),c=r(5),l=r(91),u=r(12),d=r(107),p=function({notices:e,className:t,children:r,onRemove:o=c.noop}){const a=Object(u.useReducedMotion)(),[p]=Object(n.useState)(()=>new WeakMap),f=Object(l.useTransition)(e,e=>e.id,{from:{opacity:0,height:0},enter:e=>async t=>await t({opacity:1,height:p.get(e).offsetHeight}),leave:()=>async e=>{await e({opacity:0}),await e({height:0})},immediate:a});t=s()("components-snackbar-list",t);const m=e=>()=>o(e.id);return Object(n.createElement)("div",{className:t},r,f.map(({item:e,key:t,props:r})=>Object(n.createElement)(l.animated.div,{key:t,style:r},Object(n.createElement)("div",{className:"components-snackbar-list__notice-container",ref:t=>t&&p.set(e,t)},Object(n.createElement)(d.a,Object(i.a)({},Object(c.omit)(e,["content"]),{onRemove:m(e)}),e.content)))))},f=r(13);const m={};var h=e=>{let{className:t,notices:r,removeNotice:o,isEditor:i}=e;if(i)return null;const a=r.filter(e=>"snackbar"===e.type),c=a.length>0?a.reduce((e,t)=>{let{content:r}=t;return e[r]=!0,e},{}):m,l=Object(f.__experimentalApplyCheckoutFilter)({filterName:"snackbarNoticeVisibility",defaultValue:c}),u=a.filter(e=>!0===l[e.content]),d=s()(t,"wc-block-components-notices__snackbar");return Object(n.createElement)(p,{notices:u,className:d,onRemove:o})},b=r(38),g=r(18);const y=Object(n.createContext)({notices:[],createSnackbarNotice:(e,t)=>{},removeSnackbarNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),E=()=>Object(n.useContext)(y),v=e=>{let{children:t,context:r="wc/core"}=e;const{createNotice:i,removeNotice:a}=Object(o.useDispatch)("core/notices"),[s,c]=Object(n.useState)(!1),{dispatchStoreEvent:l}=Object(b.a)(),{isEditor:u}=Object(g.a)(),d=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i("default",e,{...t,type:"snackbar",context:t.context||r}),l("store-notice-create",{status:"default",content:e,options:t})}),[i,l,r]),p=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;a(e,t)}),[a,r]),{notices:f}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(r)}),[r]),m={notices:f,createSnackbarNotice:d,removeSnackbarNotice:p,context:r,setIsSuppressed:c},E=s?null:Object(n.createElement)(h,{notices:m.notices,removeNotice:m.removeSnackbarNotice,isEditor:u});return Object(n.createElement)(y.Provider,{value:m},t,E)}}]);
build/cart.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'd0d66eae1c7f082aa947224d079aa10c');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '31bb3047fe46af92eb4f0c3c788aa803');
build/cart.js CHANGED
@@ -20,7 +20,7 @@ Object(i.__)("Remove","woo-gutenberg-products-block"):Object(i.sprintf)(
20
  /* translators: %s text of the chip to remove. */
21
  Object(i.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const O={"aria-label":t,disabled:r,onClick:a,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||a()}},j=p?O:{},E=p?{"aria-hidden":!0}:O;return Object(o.createElement)(d,n()({},g,j,{className:s()(c,"is-removable"),element:p?"button":g.element,screenReaderText:m,text:b}),Object(o.createElement)(h,n()({className:"wc-block-components-chip__remove"},E),Object(o.createElement)(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:u.a,size:16})))}},,function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));var r=c(40),n=c(189);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:o,expressPaymentMethodsInitialized:a}=Object(n.b)(),s=Object(r.a)(t),i=Object(r.a)(c);return{paymentMethods:e?i:s,isInitialized:e?a:o}},a=()=>o(!1),s=()=>o(!0)},,function(e,t,c){"use strict";c.d(t,"b",(function(){return D})),c.d(t,"a",(function(){return L}));var r=c(0),n=c(85);let o,a;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(o||(o={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(a||(a={}));const s={currentStatus:o.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},i={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:o,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,paymentMethodData:c,shouldSavePaymentMethod:r=!1,errorMessage:n="",paymentMethods:i={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case o.PRISTINE:return{...s,...e,errorMessage:"",currentStatus:o.PRISTINE};case o.STARTED:return{...e,currentStatus:o.STARTED};case o.ERROR:return e.currentStatus!==o.ERROR?{...e,currentStatus:o.ERROR,errorMessage:n||e.errorMessage}:e;case o.FAILED:return e.currentStatus!==o.FAILED?{...e,currentStatus:o.FAILED,paymentMethodData:c||e.paymentMethodData,errorMessage:n||e.errorMessage}:e;case o.SUCCESS:return e.currentStatus!==o.SUCCESS?{...e,currentStatus:o.SUCCESS,paymentMethodData:c||e.paymentMethodData}:e;case o.PROCESSING:return e.currentStatus!==o.PROCESSING?{...e,currentStatus:o.PROCESSING,errorMessage:""}:e;case o.COMPLETE:return e.currentStatus!==o.COMPLETE?{...e,currentStatus:o.COMPLETE}:e;case a.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:i};case a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:i};case a.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:r};case a.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:c||e.paymentMethodData}}},u=c(1),d=c(39),p=c(40),b=c(2),m=c(116),g=c(49),h=c(67),O=c(56),j=c(36),E=c(47),_=c(44);const f=(e,t,c,n)=>{const[o,a]=Object(r.useState)(!1),{isEditor:s}=Object(g.b)(),{selectedRates:i}=Object(h.b)(),{billingData:l,shippingAddress:d}=Object(O.b)(),_=Object(p.a)(i),f=Object(p.a)(c),y=Object(j.a)(),{cartTotals:v,cartIsLoading:k,cartNeedsShipping:w,paymentRequirements:S}=y,C=Object(r.useRef)({cart:y,cartTotals:v,cartNeedsShipping:w,billingData:l,shippingAddress:d,selectedShippingMethods:_,paymentRequirements:S}),{addErrorNotice:N}=Object(E.a)();Object(r.useEffect)(()=>{C.current={cart:y,cartTotals:v,cartNeedsShipping:w,billingData:l,shippingAddress:d,selectedShippingMethods:_,paymentRequirements:S}},[y,v,w,l,d,_,S]);const M=Object(r.useCallback)(async()=>{let c={};const r=e=>{c={...c,[e.name]:e}};for(let e=0;e<f.length;e++){const c=f[e],o=t[c];if(o)try{const e=!!s||await Promise.resolve(o.canMakePayment(C.current));if(e){if("object"==typeof e&&null!==e&&e.error)throw new Error(e.error.message);r(o)}}catch(e){if(b.CURRENT_USER_IS_ADMIN||s){const t=Object(u.sprintf)(
22
  /* translators: %s the id of the payment method being registered (bank transfer, Stripe...) */
23
- Object(u.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),o.paymentMethodId);N(`${t} ${e}`,{context:n,id:`wc-${o.paymentMethodId}-registration-error`})}}}e(c),a(!0)},[N,e,s,n,f,t]),I=Object(m.a)(M,500,{leading:!0});return Object(r.useEffect)(()=>{k||I()},[I,y,_,l,k]),o},y=e=>({type:e}),v=e=>({type:o.ERROR,errorMessage:e}),k=e=>{let{errorMessage:t,paymentMethodData:c}=e;return{type:o.FAILED,errorMessage:t,paymentMethodData:c}},w=e=>{let{paymentMethodData:t}=e;return{type:o.SUCCESS,paymentMethodData:t}},S=e=>({type:a.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),C=e=>({type:a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),N=e=>({type:a.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),M=(e,t)=>({type:a.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var I=c(50),R=c(107),x=c(251);var P=c(254),T=c(112);const A=Object(r.createContext)(i),D=()=>Object(r.useContext)(A),L=e=>{let{children:t}=e;const{isProcessing:c,isIdle:a,isCalculating:i,hasError:u}=Object(I.b)(),{isEditor:p,getPreviewData:m}=Object(g.b)(),{setValidationErrors:j}=Object(T.b)(),{addErrorNotice:D,removeNotice:L}=Object(E.a)(),{isSuccessResponse:B,isErrorResponse:V,isFailResponse:U,noticeContexts:z}=Object(_.c)(),[F,G]=Object(r.useReducer)(R.b,{}),{onPaymentProcessing:H}=(e=>Object(r.useMemo)(()=>({onPaymentProcessing:Object(x.a)("payment_processing",e)}),[e]))(G),Y=Object(r.useRef)(F);Object(r.useEffect)(()=>{Y.current=F},[F]);const[q,$]=Object(r.useReducer)(l,s),{dispatchActions:W,setPaymentStatus:Q}=(e=>{const{setBillingData:t}=Object(O.b)(),{setShippingAddress:c}=Object(h.b)();return{dispatchActions:Object(r.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(S(t))},setRegisteredExpressPaymentMethods:t=>{e(C(t))},setShouldSavePayment:t=>{e(N(t))},setActivePaymentMethod:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(M(t,c))}}),[e]),setPaymentStatus:Object(r.useCallback)(()=>({pristine:()=>e(y(o.PRISTINE)),started:()=>e(y(o.STARTED)),processing:()=>e(y(o.PROCESSING)),completed:()=>e(y(o.COMPLETE)),error:t=>e(v(t)),failed:function(c,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;n&&t(n),e(k({errorMessage:c||"",paymentMethodData:r||{}}))},success:function(r){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;n&&t(n),void 0!==typeof o&&null!=o&&o.address&&c(o.address),e(w({paymentMethodData:r}))}}),[e,t,c])}})($),K=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:c}=Object(_.c)(),r=new Set([...Object(b.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return f(e,t,Array.from(r),c.PAYMENTS)})(W.setRegisteredPaymentMethods),X=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:c}=Object(_.c)();return f(e,t,Object.keys(t),c.EXPRESS_PAYMENTS)})(W.setRegisteredExpressPaymentMethods),Z=Object(r.useMemo)(()=>p?m("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(b.getSetting)("customerPaymentMethods",{}),c=Object.keys(t),r={};return c.forEach(c=>{const n=t[c].filter(t=>{var c;let{method:{gateway:r}}=t;return r in e&&(null===(c=e[r].supports)||void 0===c?void 0:c.showSavedCards)});n.length&&(r[c]=n)}),r}(q.paymentMethods):{},[p,m,K,q.paymentMethods]),J=Object(r.useCallback)(e=>{e?D(e,{id:"wc-express-payment-error",context:z.EXPRESS_PAYMENTS}):L("wc-express-payment-error",z.EXPRESS_PAYMENTS)},[D,z.EXPRESS_PAYMENTS,L]),ee=Object.keys(q.expressPaymentMethods).includes(q.activePaymentMethod),te=Object(r.useMemo)(()=>({isPristine:q.currentStatus===o.PRISTINE,isStarted:q.currentStatus===o.STARTED,isProcessing:q.currentStatus===o.PROCESSING,isFinished:[o.ERROR,o.FAILED,o.SUCCESS].includes(q.currentStatus),hasError:q.currentStatus===o.ERROR,hasFailed:q.currentStatus===o.FAILED,isSuccessful:q.currentStatus===o.SUCCESS,isDoingExpressPayment:q.currentStatus!==o.PRISTINE&&ee}),[q.currentStatus,ee]);Object(r.useEffect)(()=>{const e=Object.keys(q.paymentMethods);if(!K||!e.length)return;const t=[...e,...Object.keys(q.expressPaymentMethods)];if(q.activePaymentMethod&&t.includes(q.activePaymentMethod))return;Q().pristine();const c=Object.keys(Z).flatMap(e=>Z[e])[0]||void 0;if(c){const e=c.tokenId,t=c.method.gateway,r=`wc-${t}-payment-token`;W.setActivePaymentMethod(t,{token:e,payment_method:t,[r]:e.toString(),isSavedToken:!0})}else W.setActivePaymentMethod(Object.keys(q.paymentMethods)[0])},[K,q.paymentMethods,q.expressPaymentMethods,W,Q,q.activePaymentMethod,Z]),Object(r.useEffect)(()=>{!c||u||i||te.isFinished||Q().processing()},[c,u,i,te.isFinished,Q]),Object(r.useEffect)(()=>{a&&!te.isSuccessful&&Q().pristine()},[a,te.isSuccessful,Q]),Object(r.useEffect)(()=>{u&&te.isSuccessful&&Q().pristine()},[u,te.isSuccessful,Q]),Object(r.useEffect)(()=>{te.isProcessing&&(L("wc-payment-error",z.PAYMENTS),Object(P.b)(Y.current,"payment_processing",{}).then(e=>{let t,c;var r,n,o,a,s,i;if(e.forEach(e=>{B(e)&&(t=e),(V(e)||U(e))&&(c=e)}),t&&!c)Q().success(null===(r=t)||void 0===r||null===(n=r.meta)||void 0===n?void 0:n.paymentMethodData,null===(o=t)||void 0===o||null===(a=o.meta)||void 0===a?void 0:a.billingData,null===(s=t)||void 0===s||null===(i=s.meta)||void 0===i?void 0:i.shippingData);else if(c&&U(c)){var l,u,d,p,b,m;c.message&&c.message.length&&D(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=c)||void 0===m?void 0:m.messageContext)||z.PAYMENTS}),Q().failed(null===(l=c)||void 0===l?void 0:l.message,null===(u=c)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=c)||void 0===p||null===(b=p.meta)||void 0===b?void 0:b.billingData)}else if(c){var g,h;c.message&&c.message.length&&D(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(h=c)||void 0===h?void 0:h.messageContext)||z.PAYMENTS}),Q().error(c.message),j(null===(g=c)||void 0===g?void 0:g.validationErrors)}else Q().success()}))},[te.isProcessing,j,Q,L,z.PAYMENTS,B,U,V,D]);const ce="object"==typeof q.paymentMethodData&&Object(n.d)(q.paymentMethodData,"token")?q.paymentMethodData.token+"":"",re={setPaymentStatus:Q,currentStatus:te,paymentStatuses:o,paymentMethodData:q.paymentMethodData,errorMessage:q.errorMessage,activePaymentMethod:q.activePaymentMethod,activeSavedToken:ce,setActivePaymentMethod:W.setActivePaymentMethod,onPaymentProcessing:H,customerPaymentMethods:Z,paymentMethods:q.paymentMethods,expressPaymentMethods:q.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:X,setExpressPaymentError:J,isExpressPaymentMethodActive:ee,shouldSavePayment:q.shouldSavePaymentMethod,setShouldSavePayment:W.setShouldSavePayment};return Object(r.createElement)(A.Provider,{value:re},t)}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0),n=(c(10),c(112));c(160);const o=e=>{let{errorMessage:t="",propertyName:c="",elementId:o=""}=e;const{getValidationError:a,getValidationErrorId:s}=Object(n.b)();if(!t||"string"!=typeof t){const e=a(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:s(o)},t))}},function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM20 4v13.17L18.83 16H4V4h16zM6 12h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"}));t.a=o},,,,,,,,,,,function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=o},function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(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"}));t.a=o},,function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(18);const s=Object(o.createElement)(e=>{let{className:t,size:c,...r}=e;return Object(o.createElement)(a.SVG,n()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:c,height:c},r),Object(o.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=s},,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(14),s=c(2);c(211),t.a=e=>{let{image:t={},fallbackAlt:c=""}=e;const r=t.thumbnail?{src:t.thumbnail,alt:Object(a.decodeEntities)(t.alt)||c||"Product Image"}:{src:s.PLACEHOLDER_IMG_SRC,alt:""};return Object(o.createElement)("img",n()({className:"wc-block-components-product-image"},r,{alt:r.alt}))}},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(109);t.a=()=>Object(r.createElement)(o.a,{className:"wc-block-components-product-backorder-badge"},Object(n.__)("Available on backorder","woo-gutenberg-products-block"))},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(109);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(r.createElement)(o.a,{className:"wc-block-components-product-low-stock-badge"},Object(n.sprintf)(
24
  /* translators: %d stock amount (number of items in stock for product) */
25
  Object(n.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},function(e,t,c){"use strict";c.d(t,"a",(function(){return y}));var r=c(0),n=c(181),o=c(2),a=c(114),s=c(189),i=c(67),l=c(56),u=c(50),d=c(1),p=c(11),b=c.n(p),m=c(248),g=c(28);const h=(e,t,c)=>{const r=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),n=`wc-${c}-new-payment-method`;return r.push({key:n,value:t}),r},O=(e,t)=>{b.a.setNonce&&"function"==typeof b.a.setNonce&&b.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))};var j=c(112),E=c(36),_=c(47),f=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:c,redirectUrl:n,isProcessing:o,isBeforeProcessing:a,isComplete:p,orderNotes:f,shouldCreateAccount:y,extensionData:v}=Object(u.b)(),{hasValidationErrors:k}=Object(j.b)(),{shippingErrorStatus:w}=Object(i.b)(),{billingData:S,shippingAddress:C}=Object(l.b)(),{cartNeedsPayment:N,receiveCart:M}=Object(E.a)(),{activePaymentMethod:I,isExpressPaymentMethodActive:R,currentStatus:x,paymentMethodData:P,expressPaymentMethods:T,paymentMethods:A,shouldSavePayment:D}=Object(s.b)(),{addErrorNotice:L,removeNotice:B,setIsSuppressed:V}=Object(_.a)(),U=Object(r.useRef)(S),z=Object(r.useRef)(C),F=Object(r.useRef)(n),[G,H]=Object(r.useState)(!1),Y=Object(r.useMemo)(()=>{var e;const t={...T,...A};return null==t||null===(e=t[I])||void 0===e?void 0:e.paymentMethodId},[I,T,A]),q=k&&!R||x.hasError||w.hasError,$=!e&&!q&&(x.isSuccessful||!N)&&o;Object(r.useEffect)(()=>{V(R)},[R,V]),Object(r.useEffect)(()=>{q===e||!o&&!a||R||c.setHasError(q)},[q,e,o,a,R,c]),Object(r.useEffect)(()=>{U.current=S,z.current=C,F.current=n},[S,C,n]);const W=Object(r.useCallback)(()=>!k&&(x.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!w.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[k,x.hasError,w.hasError]);Object(r.useEffect)(()=>{let e;return R||(e=t(W,0)),()=>{R||e()}},[t,W,R]),Object(r.useEffect)(()=>{F.current&&(window.location.href=F.current)},[p]);const Q=Object(r.useCallback)(async()=>{if(G)return;H(!0),B("checkout");const e=N?{payment_method:Y,payment_data:h(P,D,I)}:{},t={billing_address:Object(m.a)(U.current),shipping_address:Object(m.a)(z.current),customer_note:f,should_create_account:y,...e,extensions:{...v}};b()({path:"/wc/store/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(O(e.headers,c),!e.ok)throw new Error(e);return e.json()}).then(e=>{c.setAfterProcessing(e),H(!1)}).catch(e=>{try{null!=e&&e.headers&&O(e.headers,c),e.json().then(e=>{var t,r,n;null!==(t=e.data)&&void 0!==t&&t.cart&&M(e.data.cart),L(Object(g.b)(e),{id:"checkout"}),null==e||null===(r=e.additional_errors)||void 0===r||null===(n=r.forEach)||void 0===n||n.call(r,e=>{L(e.message,{id:e.error_code})}),c.setAfterProcessing(e)})}catch{var t;L(Object(d.sprintf)(// Translators: %s Error text.
26
  Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout"})}c.setHasError(!0),H(!1)})},[G,B,f,y,N,Y,P,D,I,v,c,L,M]);return Object(r.useEffect)(()=>{$&&!G&&Q()},[Q,$,G]),null};const y=e=>{let{children:t,isCart:c=!1,redirectUrl:d}=e;return Object(r.createElement)(u.a,{redirectUrl:d,isCart:c},Object(r.createElement)(l.a,null,Object(r.createElement)(i.a,null,Object(r.createElement)(s.a,null,t,Object(r.createElement)(a.a,{renderError:o.CURRENT_USER_IS_ADMIN?null:()=>null},Object(r.createElement)(n.PluginArea,{scope:"woocommerce-checkout"})),Object(r.createElement)(f,null)))))}},function(e,t,c){"use strict";var r=c(0),n=c(6),o=c(14);c(214);var a=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(r.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",c=t?"wc-block-components-product-details__"+Object(n.kebabCase)(t):"";return Object(r.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"wc-block-components-product-details__name"},Object(o.decodeEntities)(t),":")," "),Object(r.createElement)("span",{className:"wc-block-components-product-details__value"},Object(o.decodeEntities)(e.display||e.value)))}))):null},s=c(129),i=c(25),l=e=>{let{className:t,shortDescription:c="",fullDescription:n=""}=e;const o=c||n;return o?Object(r.createElement)(s.a,{className:t,source:o,maxLength:15,countType:i.o.wordCountType||"words"}):null};c(213),t.a=e=>{let{shortDescription:t="",fullDescription:c="",itemData:n=[],variation:o=[]}=e;return Object(r.createElement)("div",{className:"wc-block-components-product-metadata"},Object(r.createElement)(l,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:c}),Object(r.createElement)(a,{details:n}),Object(r.createElement)(a,{details:o.map(e=>{let{attribute:t="",value:c}=e;return{key:t,value:c}})}))}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return R}));var r=c(1),n=c(35),o=c(0),a=c(4),s=c.n(a),i=c(18),l=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),u=c(205),d=c(399),p=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(o.createElement)("path",{d:"M0 0h24v24H0z"}),Object(o.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"}),Object(o.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"}))),b=c(43),m=c(85);c(228);const g={bank:l,bill:u.a,card:d.a,checkPayment:p};var h=e=>{let{icon:t="",text:c=""}=e;const r=!!t,n=Object(o.useCallback)(e=>r&&Object(m.c)(e)&&Object(m.d)(g,e),[r]),a=s()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":r});return Object(o.createElement)("span",{className:a},n(t)?Object(o.createElement)(b.a,{srcElement:g[t]}):t,c)},O=c(184),j=c(2),E=c(65),_=c.n(E),f=c(66),y=c(193),v=c(36),k=c(183),w=c(44),S=c(50),C=c(189),N=c(67),M=c(56);const I=(e,t)=>{const c=[],n=(t,c)=>{const r=c+"_tax",n=Object(m.d)(e,c)&&Object(m.c)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:n,valueWithTax:n+(Object(m.d)(e,r)&&Object(m.c)(e[r])?parseInt(e[r],10):0)}};return c.push(n(Object(r.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(n(Object(r.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(n(Object(r.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(r.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(n(Object(r.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c},R=()=>{const{isCalculating:e,isComplete:t,isIdle:c,isProcessing:a,onCheckoutBeforeProcessing:s,onCheckoutValidationBeforeProcessing:i,onCheckoutAfterProcessingWithSuccess:l,onCheckoutAfterProcessingWithError:u,onSubmit:d,customerId:p}=Object(S.b)(),{currentStatus:b,activePaymentMethod:m,onPaymentProcessing:g,setExpressPaymentError:E,shouldSavePayment:R}=Object(C.b)(),{shippingErrorStatus:x,shippingErrorTypes:P,shippingRates:T,shippingRatesLoading:A,selectedRates:D,setSelectedRates:L,isSelectingRate:B,onShippingRateSuccess:V,onShippingRateFail:U,onShippingRateSelectSuccess:z,onShippingRateSelectFail:F,needsShipping:G}=Object(N.b)(),{billingData:H,shippingAddress:Y,setShippingAddress:q}=Object(M.b)(),{cartItems:$,cartFees:W,cartTotals:Q,extensions:K}=Object(v.a)(),{appliedCoupons:X}=Object(k.a)(),{noticeContexts:Z,responseTypes:J}=Object(w.c)(),ee=Object(o.useRef)(I(Q,G)),te=Object(o.useRef)({label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(Q.total_price,10)});Object(o.useEffect)(()=>{ee.current=I(Q,G),te.current={label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(Q.total_price,10)}},[Q,G]);const ce=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";_()("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"}),E(e)}),[E]);return{activePaymentMethod:m,billing:{appliedCoupons:X,billingData:H,cartTotal:te.current,cartTotalItems:ee.current,currency:Object(n.getCurrencyFromPriceResponse)(Q),customerId:p,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:$,cartFees:W,extensions:K},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:c,isProcessing:a},components:{LoadingMask:f.a,PaymentMethodIcons:O.a,PaymentMethodLabel:h,ValidationInputError:y.a},emitResponse:{noticeContexts:Z,responseTypes:J},eventRegistration:{onCheckoutAfterProcessingWithError:u,onCheckoutAfterProcessingWithSuccess:l,onCheckoutBeforeProcessing:s,onCheckoutValidationBeforeProcessing:i,onPaymentProcessing:g,onShippingRateFail:U,onShippingRateSelectFail:F,onShippingRateSelectSuccess:z,onShippingRateSuccess:V},onSubmit:d,paymentStatus:b,setExpressPaymentError:ce,shippingData:{isSelectingRate:B,needsShipping:G,selectedRates:D,setSelectedRates:L,setShippingAddress:q,shippingAddress:Y,shippingRates:T,shippingRatesLoading:A},shippingStatus:{shippingErrorStatus:x,shippingErrorTypes:P},shouldSavePayment:R}}},function(e,t,c){"use strict";c.d(t,"b",(function(){return i})),c.d(t,"a",(function(){return l}));var r=c(0),n=(c(10),c(9)),o=c(4),a=c.n(o);const s=Object(r.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),i=()=>Object(r.useContext)(s),l=e=>{let{children:t,className:c=""}=e;const[o,i]=(()=>{const[e,{width:t}]=Object(n.useResizeObserver)();let c="";return t>700?c="is-large":t>520?c="is-medium":t>400?c="is-small":t&&(c="is-mobile"),[e,c]})(),l={hasContainerWidth:""!==i,containerClassName:i,isMobile:"is-mobile"===i,isSmall:"is-small"===i,isMedium:"is-medium"===i,isLarge:"is-large"===i};return Object(r.createElement)(s.Provider,{value:l},Object(r.createElement)("div",{className:a()(c,i)},o,t))}},function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(1),s=c(8),i=c(4),l=c.n(i),u=c(112),d=c(193),p=c(9),b=c(85),m=c(30);c(170);var g=Object(s.forwardRef)((e,t)=>{let{className:c,id:r,type:a="text",ariaLabel:s,ariaDescribedBy:i,label:u,screenReaderLabel:d,disabled:p,help:b,autoCapitalize:g="off",autoComplete:h="off",value:O="",onChange:j,required:E=!1,onBlur:_=(()=>{}),feedback:f,...y}=e;const[v,k]=Object(o.useState)(!1);return Object(o.createElement)("div",{className:l()("wc-block-components-text-input",c,{"is-active":v||O})},Object(o.createElement)("input",n()({type:a,id:r,value:O,ref:t,autoCapitalize:g,autoComplete:h,onChange:e=>{j(e.target.value)},onFocus:()=>k(!0),onBlur:e=>{_(e.target.value),k(!1)},"aria-label":s||u,disabled:p,"aria-describedby":b&&!i?r+"__help":i,required:E},y)),Object(o.createElement)(m.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:r},htmlFor:r}),!!b&&Object(o.createElement)("p",{id:r+"__help",className:"wc-block-components-text-input__help"},b),f)});t.a=Object(p.withInstanceId)(e=>{let{className:t,instanceId:c,id:r,ariaDescribedBy:i,errorId:p,focusOnMount:m=!1,onChange:h,showError:O=!0,errorMessage:j="",value:E="",..._}=e;const[f,y]=Object(s.useState)(!0),v=Object(s.useRef)(null),{getValidationError:k,hideValidationError:w,setValidationErrors:S,clearValidationError:C,getValidationErrorId:N}=Object(u.b)(),M=void 0!==r?r:"textinput-"+c,I=void 0!==p?p:M,R=Object(s.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=v.current||null;if(!t)return;t.value=t.value.trim();const c=t.checkValidity();c?C(I):S({[I]:{message:t.validationMessage||Object(a.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[C,I,S]);Object(s.useEffect)(()=>{var e;f&&m&&(null===(e=v.current)||void 0===e||e.focus()),y(!1)},[m,f,y]),Object(s.useEffect)(()=>{var e,t;(null===(e=v.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==v.current&&R(!0)},[E,R]),Object(s.useEffect)(()=>()=>{C(I)},[C,I]);const x=k(I)||{};Object(b.c)(j)&&""!==j&&(x.message=j);const P=x.message&&!x.hidden,T=O&&P&&N(I)?N(I):i;return Object(o.createElement)(g,n()({className:l()(t,{"has-error":P}),"aria-invalid":!0===P,id:M,onBlur:()=>{R(!1)},feedback:O&&Object(o.createElement)(d.a,{errorMessage:j,propertyName:I}),ref:v,onChange:e=>{w(I),h(e)},ariaDescribedBy:T,value:E},_))})},,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));const r=window.CustomEvent||null,n=(e,t)=>{let{bubbles:c=!1,cancelable:n=!1,element:o,detail:a={}}=t;if(!r)return;o||(o=document.body);const s=new r(e,{bubbles:c,cancelable:n,detail:a});o.dispatchEvent(s)};let o;const a=()=>{o&&clearTimeout(o),o=setTimeout(()=>{n("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const o=()=>{n(t,{bubbles:c,cancelable:r})};return jQuery(document).on(e,o),()=>jQuery(document).off(e,o)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"c",(function(){return s})),c.d(t,"a",(function(){return i}));var r=c(2),n=c(98),o=c(15);const a=e=>{let{country:t="",state:c="",city:r="",postcode:n=""}=e;return{country:t.trim(),state:c.trim(),city:r.trim(),postcode:n?n.replace(" ","").toUpperCase():""}},s=e=>{let{email:t=""}=e;return Object(o.isEmail)(t)?t.trim():""},i=e=>{const t=Object.keys(r.defaultAddressFields),c=Object(n.a)(t,{},e.country),o=Object.assign({},e);return c.forEach(t=>{let{key:c="",hidden:r=!1}=t;r&&((e,t)=>e in t)(c,e)&&(o[c]="")}),o}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(107);const n=(e,t)=>function(c){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const o=r.a.addEventCallback(e,c,n);return t(o),()=>{t(r.a.removeEventCallback(e,o.id))}}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return a}));const r=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var n=c(44);const o=async(e,t,c)=>{const n=r(e,t),o=[];for(const e of n)try{const t=await Promise.resolve(e.callback(c));"object"==typeof t&&o.push(t)}catch(e){console.error(e)}return!o.length||o},a=async(e,t,c)=>{const o=[],a=r(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(c));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(n.a)(t)||Object(n.b)(t))return o.push(t),o;o.push(t)}catch(e){return console.error(e),o.push({type:"error"}),o}return o}},,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var r=c(0),n=c(13),o=c(12),a=c(6);const s=e=>{let{clientId:t,registeredBlocks:c,defaultTemplate:s=[]}=e;const i=Object(r.useRef)(c),l=Object(r.useRef)(s),{insertBlock:u,replaceInnerBlocks:d}=Object(n.useDispatch)("core/block-editor"),{innerBlocks:p,registeredBlockTypes:b}=Object(n.useSelect)(e=>({innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:i.current.map(e=>Object(o.getBlockType)(e))}),[t,i.current]),m=Object(r.useCallback)((e,c)=>{const r=Object(o.createBlock)(e.name);u(r,c,t,!1)},[t,u]),g=Object(r.useMemo)(()=>b.filter(e=>e&&(e=>{var t,c,r;let{attributes:n}=e;return Boolean((null===(t=n.lock)||void 0===t?void 0:t.remove)||(null===(c=n.lock)||void 0===c||null===(r=c.default)||void 0===r?void 0:r.remove))})(e)),[b]);Object(r.useLayoutEffect)(()=>{if(t){if(0===p.length&&l.current.length>0){const e=Object(o.createBlocksFromInnerBlocksTemplate)(l.current);if(!Object(a.isEqual)(e,p))return void d(t,e)}g.forEach(e=>{if(p.find(t=>{let{name:c}=t;return c===e.name}))return;const t=l.current.findIndex(t=>{let[c]=t;return c===e.name});switch(t){case-1:m(e,p.length);break;case 0:m(e,0);break;default:const c=l.current[t-1],r=p.findIndex(e=>{let{name:t}=e;return t===c[0]});m(e,-1===r?t:r+1)}})}},[t,p,g,d,m])}},function(e,t,c){"use strict";c.d(t,"a",(function(){return d}));var r=c(0),n=c(3),o=c(1),a=c(2);const s=[];var i=c(5),l=c.n(i),u=e=>Object(r.createElement)("div",l()({className:"wc-block-welcome-guide__image",style:{display:"flex",justifyContent:"center",alignItems:"center"}},e),Object(r.createElement)("svg",{height:"120",viewBox:"0 0 170 120",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("g",{filter:"url(#filter0_ddd)"},Object(r.createElement)("rect",{x:"5.5",y:"18",width:"159",height:"96",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"24.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"94.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"})),Object(r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.8908 42H125.078C129.899 42 133.802 45.9231 133.802 50.7692V80C133.802 84.8462 129.899 88.7692 125.078 88.7692H97.756L101.506 98L85.0135 88.7692H48.929C44.1076 88.7692 40.2045 84.8462 40.2045 80V50.7692C40.1662 45.9615 44.0693 42 48.8908 42Z",fill:"#7F54B3"}),Object(r.createElement)("path",{d:"M44.8709 50.723C45.4039 50.0175 46.2033 49.6462 47.2693 49.5719C49.2108 49.4234 50.3149 50.3145 50.5814 52.2453C51.7615 60.0056 53.0559 66.5778 54.4264 71.9617L62.7637 56.4782C63.5251 55.0673 64.4768 54.3246 65.6189 54.2504C67.294 54.139 68.3219 55.1786 68.7406 57.3694C69.6924 62.3077 70.9106 66.5035 72.3573 70.0681C73.3471 60.6369 75.0222 53.8419 77.3825 49.6462C77.9535 48.6065 78.7911 48.0867 79.8951 48.0124C80.7707 47.9382 81.5702 48.1981 82.2935 48.755C83.0168 49.312 83.3975 50.0175 83.4736 50.8715C83.5117 51.5398 83.3975 52.0968 83.0929 52.6538C81.6082 55.3272 80.39 59.82 79.4002 66.0579C78.4484 72.1102 78.1058 76.8258 78.3342 80.2047C78.4104 81.133 78.2581 81.9499 77.8774 82.6553C77.4205 83.4722 76.7353 83.9178 75.8597 83.9921C74.8699 84.0663 73.842 83.6207 72.8522 82.6182C69.3117 79.0908 66.4945 73.8183 64.4388 66.8006C61.9642 71.5533 60.1369 75.1178 58.9567 77.4942C56.7106 81.69 54.8071 83.8435 53.2082 83.9549C52.1803 84.0292 51.3047 83.1752 50.5433 81.3929C48.6017 76.5288 46.5079 67.1347 44.2618 53.2107C44.1476 52.2453 44.3379 51.3913 44.8709 50.723Z",fill:"white"}),Object(r.createElement)("path",{d:"M126.922 56.5426C125.536 54.1968 123.495 52.7819 120.761 52.2234C120.029 52.0745 119.336 52 118.681 52C114.985 52 111.981 53.8617 109.632 57.5851C107.63 60.75 106.629 64.25 106.629 68.0851C106.629 70.9521 107.245 73.4096 108.477 75.4574C109.863 77.8032 111.904 79.2181 114.638 79.7766C115.37 79.9255 116.063 80 116.717 80C120.453 80 123.456 78.1383 125.767 74.4149C127.769 71.2128 128.77 67.7128 128.77 63.8777C128.77 60.9734 128.154 58.5532 126.922 56.5426ZM122.07 66.8564C121.531 69.3138 120.568 71.1383 119.143 72.367C118.027 73.3351 116.987 73.7447 116.024 73.5585C115.1 73.3723 114.33 72.5904 113.752 71.1383C113.29 69.984 113.059 68.8298 113.059 67.75C113.059 66.8192 113.136 65.8883 113.329 65.0319C113.675 63.5053 114.33 62.016 115.37 60.6011C116.64 58.7766 117.988 58.0319 119.374 58.2925C120.299 58.4787 121.069 59.2606 121.646 60.7128C122.108 61.867 122.339 63.0213 122.339 64.1011C122.339 65.0691 122.224 66 122.07 66.8564Z",fill:"white"}),Object(r.createElement)("path",{d:"M102.767 56.5426C101.381 54.1968 99.3018 52.7819 96.6063 52.2234C95.8747 52.0745 95.1816 52 94.5269 52C90.8303 52 87.8267 53.8617 85.4778 57.5851C83.4755 60.75 82.4743 64.25 82.4743 68.0851C82.4743 70.9521 83.0904 73.4096 84.3226 75.4574C85.7089 77.8032 87.7497 79.2181 90.4837 79.7766C91.2153 79.9255 91.9085 80 92.5631 80C96.2983 80 99.3018 78.1383 101.612 74.4149C103.615 71.2128 104.616 67.7128 104.616 63.8777C104.616 60.9734 104 58.5532 102.767 56.5426ZM97.9155 66.8564C97.3765 69.3138 96.4138 71.1383 94.989 72.367C93.8723 73.3351 92.8326 73.7447 91.87 73.5585C90.9458 73.3723 90.1757 72.5904 89.5981 71.1383C89.136 69.984 88.9049 68.8298 88.9049 67.75C88.9049 66.8192 88.9819 65.8883 89.1745 65.0319C89.521 63.5053 90.1757 62.016 91.2153 60.6011C92.4861 58.7766 93.8338 58.0319 95.2201 58.2925C96.1442 58.4787 96.9144 59.2606 97.492 60.7128C97.9541 61.867 98.1851 63.0213 98.1851 64.1011C98.1851 65.0691 98.1081 66 97.9155 66.8564Z",fill:"white"}),Object(r.createElement)("defs",null,Object(r.createElement)("filter",{id:"filter0_ddd",x:"0.5",y:"0",width:"169",height:"120",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(r.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"2.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect1_dropShadow",result:"effect2_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"2"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),Object(r.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect3_dropShadow",result:"shape"})))));function d(e){let{blockName:t}=e;const[c,i]=(e=>{const[t,c]=((e,t)=>{const[c,n]=Object(r.useState)(()=>{const c=window.localStorage.getItem(e);if(c)try{return JSON.parse(c)}catch{console.error(`Value for key '${e}' could not be retrieved from localStorage because it can't be parsed.`)}return t});return Object(r.useEffect)(()=>{try{window.localStorage.setItem(e,JSON.stringify(c))}catch{console.error(`Value for key '${e}' could not be saved in localStorage because it can't be converted into a string.`)}},[e,c]),[c,n]})("wc-blocks_dismissed_compatibility_notices",s),[n,o]=Object(r.useState)(!1),a=t.includes(e);return Object(r.useEffect)(()=>{o(!a)},[a]),[n,()=>{const r=new Set(t);r.add(e),c([...r])}]})(t);return Object(a.isWpVersion)("5.4","<=")||!c?null:Object(r.createElement)(n.Guide,{className:"wc-block-welcome-guide",contentLabel:Object(o.__)("Compatibility notice","woo-gutenberg-products-block"),onFinish:()=>i(),finishButtonText:Object(o.__)("Got it!","woo-gutenberg-products-block"),pages:[{image:Object(r.createElement)(u,null),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"wc-block-welcome-guide__heading"},Object(o.__)("Compatibility notice","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(o.__)("This block may not be compatible with <em>all</em> checkout extensions and integrations.","woo-gutenberg-products-block"),{em:Object(r.createElement)("em",null)})),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(o.__)("We recommend reviewing our <a>expanding list</a> of compatible extensions prior to using this block on a live store.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:"https://docs.woocommerce.com/document/cart-checkout-blocks-support-status/",target:"_blank",rel:"noopener noreferrer"})})))}]})}},,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/filled-cart-block","version":"1.0.0","title":"Filled Cart","description":"Contains blocks that are displayed when the cart contains products.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-items-block","version":"1.0.0","title":"Cart Items block","description":"Column containing cart items.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-line-items-block","version":"1.0.0","title":"Cart Line Items","description":"Block containing current line items in Cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-items-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-totals-block","version":"1.0.0","title":"Cart Totals","description":"Column containing the cart totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false},"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/proceed-to-checkout-block","version":"1.0.0","title":"Proceed to checkout","description":"Allow customers proceed to Checkout.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e,t,c){"use strict";(function(e){var r=c(0),n=c(1),o=c(4),a=c.n(o),s=c(76),i=c(25),l=c(50),u=c(470),d=c(2);c(402),t.a=t=>{let{checkoutPageId:c,className:o}=t;const p=Object(d.getSetting)("page-"+c,!1),{isCalculating:b}=Object(l.b)(),[m,g]=Object(u.a)(),[h,O]=Object(r.useState)(!1);Object(r.useEffect)(()=>{if("function"!=typeof e.addEventListener||"function"!=typeof e.removeEventListener)return;const t=()=>{O(!1)};return e.addEventListener("pageshow",t),()=>{e.removeEventListener("pageshow",t)}},[]);const j=Object(r.createElement)(s.a,{className:"wc-block-cart__submit-button",href:p||i.f,disabled:b,onClick:()=>O(!0),showSpinner:h},Object(n.__)("Proceed to Checkout","woo-gutenberg-products-block"));return Object(r.createElement)("div",{className:a()("wc-block-cart__submit",o)},m,Object(r.createElement)("div",{className:"wc-block-cart__submit-container"},j),"below"===g&&Object(r.createElement)("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky"},j))}}).call(this,c(401))},function(e){e.exports=JSON.parse('{"name":"woocommerce/empty-cart-block","version":"1.0.0","title":"Empty Cart","description":"Contains blocks that are displayed when the cart is empty.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-accepted-payment-methods-block","version":"1.0.0","title":"Accepted Payment Methods","description":"Display accepted payment methods.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){e.exports=c(435)},function(e,t){},function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"}),Object(r.createElement)("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"}))," ");t.a=o},function(e,t){},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(12);const n=["core/paragraph","core/image","core/separator"],o=e=>[...Object(r.getBlockTypes)().filter(t=>((null==t?void 0:t.parent)||[]).includes(e)).map(e=>{let{name:t}=e;return t}),...n]},function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n),a=(c(10),c(241));c(210),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)(a.a,{className:o()("wc-block-components-sidebar-layout",c)},t)}},function(e,t,c){"use strict";var r=c(0),n=c(8),o=c(4),a=c.n(o);const s=Object(n.forwardRef)((e,t)=>{let{children:c,className:n=""}=e;return Object(r.createElement)("div",{ref:t,className:a()("wc-block-components-main",n)},c)});t.a=s},function(e,t){},function(e,t){},function(e,t,c){"use strict";var r=c(0),n=c(8),o=c(4),a=c.n(o);const s=Object(n.forwardRef)((e,t)=>{let{children:c,className:n=""}=e;return Object(r.createElement)("div",{ref:t,className:a()("wc-block-components-sidebar",n)},c)});t.a=s},function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},Object(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"}),Object(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"}),Object(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"}));t.a=o},,,,,function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(66),a=c(185),s=c(19),i=c(2);c(216);const l={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:c,isRemovingCoupon:u,removeCoupon:d,values:p}=e;const{total_discount:b,total_discount_tax:m}=p,g=parseInt(b,10);if(!g&&0===t.length)return null;const h=parseInt(m,10),O=Object(i.getSetting)("displayCartPricesIncludingTax",!1)?g+h:g,j=Object(s.__experimentalApplyCheckoutFilter)({arg:l,filterName:"coupons",defaultValue:t});return Object(r.createElement)(s.TotalsItem,{className:"wc-block-components-totals-discount",currency:c,description:0!==j.length&&Object(r.createElement)(o.a,{screenReaderLabel:Object(n.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},Object(r.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},j.map(e=>Object(r.createElement)(a.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(n.sprintf)(
20
  /* translators: %s text of the chip to remove. */
21
  Object(i.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const O={"aria-label":t,disabled:r,onClick:a,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||a()}},j=p?O:{},E=p?{"aria-hidden":!0}:O;return Object(o.createElement)(d,n()({},g,j,{className:s()(c,"is-removable"),element:p?"button":g.element,screenReaderText:m,text:b}),Object(o.createElement)(h,n()({className:"wc-block-components-chip__remove"},E),Object(o.createElement)(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:u.a,size:16})))}},,function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));var r=c(40),n=c(189);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:o,expressPaymentMethodsInitialized:a}=Object(n.b)(),s=Object(r.a)(t),i=Object(r.a)(c);return{paymentMethods:e?i:s,isInitialized:e?a:o}},a=()=>o(!1),s=()=>o(!0)},,function(e,t,c){"use strict";c.d(t,"b",(function(){return D})),c.d(t,"a",(function(){return L}));var r=c(0),n=c(85);let o,a;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(o||(o={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(a||(a={}));const s={currentStatus:o.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},i={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:o,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,paymentMethodData:c,shouldSavePaymentMethod:r=!1,errorMessage:n="",paymentMethods:i={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case o.PRISTINE:return{...s,...e,errorMessage:"",currentStatus:o.PRISTINE};case o.STARTED:return{...e,currentStatus:o.STARTED};case o.ERROR:return e.currentStatus!==o.ERROR?{...e,currentStatus:o.ERROR,errorMessage:n||e.errorMessage}:e;case o.FAILED:return e.currentStatus!==o.FAILED?{...e,currentStatus:o.FAILED,paymentMethodData:c||e.paymentMethodData,errorMessage:n||e.errorMessage}:e;case o.SUCCESS:return e.currentStatus!==o.SUCCESS?{...e,currentStatus:o.SUCCESS,paymentMethodData:c||e.paymentMethodData}:e;case o.PROCESSING:return e.currentStatus!==o.PROCESSING?{...e,currentStatus:o.PROCESSING,errorMessage:""}:e;case o.COMPLETE:return e.currentStatus!==o.COMPLETE?{...e,currentStatus:o.COMPLETE}:e;case a.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:i};case a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:i};case a.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:r};case a.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:c||e.paymentMethodData}}},u=c(1),d=c(39),p=c(40),b=c(2),m=c(116),g=c(49),h=c(67),O=c(56),j=c(36),E=c(47),_=c(44);const f=(e,t,c,n)=>{const[o,a]=Object(r.useState)(!1),{isEditor:s}=Object(g.b)(),{selectedRates:i}=Object(h.b)(),{billingData:l,shippingAddress:d}=Object(O.b)(),_=Object(p.a)(i),f=Object(p.a)(c),y=Object(j.a)(),{cartTotals:v,cartIsLoading:k,cartNeedsShipping:w,paymentRequirements:S}=y,C=Object(r.useRef)({cart:y,cartTotals:v,cartNeedsShipping:w,billingData:l,shippingAddress:d,selectedShippingMethods:_,paymentRequirements:S}),{addErrorNotice:N}=Object(E.a)();Object(r.useEffect)(()=>{C.current={cart:y,cartTotals:v,cartNeedsShipping:w,billingData:l,shippingAddress:d,selectedShippingMethods:_,paymentRequirements:S}},[y,v,w,l,d,_,S]);const M=Object(r.useCallback)(async()=>{let c={};const r=e=>{c={...c,[e.name]:e}};for(let e=0;e<f.length;e++){const c=f[e],o=t[c];if(o)try{const e=!!s||await Promise.resolve(o.canMakePayment(C.current));if(e){if("object"==typeof e&&null!==e&&e.error)throw new Error(e.error.message);r(o)}}catch(e){if(b.CURRENT_USER_IS_ADMIN||s){const t=Object(u.sprintf)(
22
  /* translators: %s the id of the payment method being registered (bank transfer, Stripe...) */
23
+ Object(u.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),o.paymentMethodId);N(`${t} ${e}`,{context:n,id:`wc-${o.paymentMethodId}-registration-error`})}}}e(c),a(!0)},[N,e,s,n,f,t]),I=Object(m.a)(M,500,{leading:!0});return Object(r.useEffect)(()=>{k||I()},[I,y,_,l,k]),o},y=e=>({type:e}),v=e=>({type:o.ERROR,errorMessage:e}),k=e=>{let{errorMessage:t,paymentMethodData:c}=e;return{type:o.FAILED,errorMessage:t,paymentMethodData:c}},w=e=>{let{paymentMethodData:t}=e;return{type:o.SUCCESS,paymentMethodData:t}},S=e=>({type:a.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),C=e=>({type:a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),N=e=>({type:a.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),M=(e,t)=>({type:a.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var I=c(50),R=c(107),x=c(251);var P=c(254),T=c(112);const A=Object(r.createContext)(i),D=()=>Object(r.useContext)(A),L=e=>{let{children:t}=e;const{isProcessing:c,isIdle:a,isCalculating:i,hasError:u}=Object(I.b)(),{isEditor:p,getPreviewData:m}=Object(g.b)(),{setValidationErrors:j}=Object(T.b)(),{addErrorNotice:D,removeNotice:L}=Object(E.a)(),{isSuccessResponse:B,isErrorResponse:V,isFailResponse:U,noticeContexts:z}=Object(_.c)(),[F,G]=Object(r.useReducer)(R.b,{}),{onPaymentProcessing:H}=(e=>Object(r.useMemo)(()=>({onPaymentProcessing:Object(x.a)("payment_processing",e)}),[e]))(G),Y=Object(r.useRef)(F);Object(r.useEffect)(()=>{Y.current=F},[F]);const[q,$]=Object(r.useReducer)(l,s),{dispatchActions:W,setPaymentStatus:Q}=(e=>{const{setBillingData:t}=Object(O.b)(),{setShippingAddress:c}=Object(h.b)();return{dispatchActions:Object(r.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(S(t))},setRegisteredExpressPaymentMethods:t=>{e(C(t))},setShouldSavePayment:t=>{e(N(t))},setActivePaymentMethod:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(M(t,c))}}),[e]),setPaymentStatus:Object(r.useCallback)(()=>({pristine:()=>e(y(o.PRISTINE)),started:()=>e(y(o.STARTED)),processing:()=>e(y(o.PROCESSING)),completed:()=>e(y(o.COMPLETE)),error:t=>e(v(t)),failed:function(c,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;n&&t(n),e(k({errorMessage:c||"",paymentMethodData:r||{}}))},success:function(r){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;n&&t(n),void 0!==typeof o&&null!=o&&o.address&&c(o.address),e(w({paymentMethodData:r}))}}),[e,t,c])}})($),K=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:c}=Object(_.c)(),r=new Set([...Object(b.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return f(e,t,Array.from(r),c.PAYMENTS)})(W.setRegisteredPaymentMethods),X=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:c}=Object(_.c)();return f(e,t,Object.keys(t),c.EXPRESS_PAYMENTS)})(W.setRegisteredExpressPaymentMethods),Z=Object(r.useMemo)(()=>p?m("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(b.getSetting)("customerPaymentMethods",{}),c=Object.keys(t),r={};return c.forEach(c=>{const n=t[c].filter(t=>{var c;let{method:{gateway:r}}=t;return r in e&&(null===(c=e[r].supports)||void 0===c?void 0:c.showSavedCards)});n.length&&(r[c]=n)}),r}(q.paymentMethods):{},[p,m,K,q.paymentMethods]),J=Object(r.useCallback)(e=>{e?D(e,{id:"wc-express-payment-error",context:z.EXPRESS_PAYMENTS}):L("wc-express-payment-error",z.EXPRESS_PAYMENTS)},[D,z.EXPRESS_PAYMENTS,L]),ee=Object.keys(q.expressPaymentMethods).includes(q.activePaymentMethod),te=Object(r.useMemo)(()=>({isPristine:q.currentStatus===o.PRISTINE,isStarted:q.currentStatus===o.STARTED,isProcessing:q.currentStatus===o.PROCESSING,isFinished:[o.ERROR,o.FAILED,o.SUCCESS].includes(q.currentStatus),hasError:q.currentStatus===o.ERROR,hasFailed:q.currentStatus===o.FAILED,isSuccessful:q.currentStatus===o.SUCCESS,isDoingExpressPayment:q.currentStatus!==o.PRISTINE&&ee}),[q.currentStatus,ee]);Object(r.useEffect)(()=>{const e=Object.keys(q.paymentMethods);if(!K||!e.length)return;const t=[...e,...Object.keys(q.expressPaymentMethods)];if(q.activePaymentMethod&&t.includes(q.activePaymentMethod))return;Q().pristine();const c=Object.keys(Z).flatMap(e=>Z[e])[0]||void 0;if(c){const e=c.tokenId.toString(),t=c.method.gateway,r=`wc-${t}-payment-token`;W.setActivePaymentMethod(t,{token:e,payment_method:t,[r]:e,isSavedToken:!0})}else W.setActivePaymentMethod(Object.keys(q.paymentMethods)[0])},[K,q.paymentMethods,q.expressPaymentMethods,W,Q,q.activePaymentMethod,Z]),Object(r.useEffect)(()=>{!c||u||i||te.isFinished||Q().processing()},[c,u,i,te.isFinished,Q]),Object(r.useEffect)(()=>{a&&!te.isSuccessful&&Q().pristine()},[a,te.isSuccessful,Q]),Object(r.useEffect)(()=>{u&&te.isSuccessful&&Q().pristine()},[u,te.isSuccessful,Q]),Object(r.useEffect)(()=>{te.isProcessing&&(L("wc-payment-error",z.PAYMENTS),Object(P.b)(Y.current,"payment_processing",{}).then(e=>{let t,c;var r,n,o,a,s,i;if(e.forEach(e=>{B(e)&&(t=e),(V(e)||U(e))&&(c=e)}),t&&!c)Q().success(null===(r=t)||void 0===r||null===(n=r.meta)||void 0===n?void 0:n.paymentMethodData,null===(o=t)||void 0===o||null===(a=o.meta)||void 0===a?void 0:a.billingData,null===(s=t)||void 0===s||null===(i=s.meta)||void 0===i?void 0:i.shippingData);else if(c&&U(c)){var l,u,d,p,b,m;c.message&&c.message.length&&D(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=c)||void 0===m?void 0:m.messageContext)||z.PAYMENTS}),Q().failed(null===(l=c)||void 0===l?void 0:l.message,null===(u=c)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=c)||void 0===p||null===(b=p.meta)||void 0===b?void 0:b.billingData)}else if(c){var g,h;c.message&&c.message.length&&D(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(h=c)||void 0===h?void 0:h.messageContext)||z.PAYMENTS}),Q().error(c.message),j(null===(g=c)||void 0===g?void 0:g.validationErrors)}else Q().success()}))},[te.isProcessing,j,Q,L,z.PAYMENTS,B,U,V,D]);const ce="object"==typeof q.paymentMethodData&&Object(n.d)(q.paymentMethodData,"token")?q.paymentMethodData.token+"":"",re={setPaymentStatus:Q,currentStatus:te,paymentStatuses:o,paymentMethodData:q.paymentMethodData,errorMessage:q.errorMessage,activePaymentMethod:q.activePaymentMethod,activeSavedToken:ce,setActivePaymentMethod:W.setActivePaymentMethod,onPaymentProcessing:H,customerPaymentMethods:Z,paymentMethods:q.paymentMethods,expressPaymentMethods:q.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:X,setExpressPaymentError:J,isExpressPaymentMethodActive:ee,shouldSavePayment:q.shouldSavePaymentMethod,setShouldSavePayment:W.setShouldSavePayment};return Object(r.createElement)(A.Provider,{value:re},t)}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0),n=(c(10),c(112));c(160);const o=e=>{let{errorMessage:t="",propertyName:c="",elementId:o=""}=e;const{getValidationError:a,getValidationErrorId:s}=Object(n.b)();if(!t||"string"!=typeof t){const e=a(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:s(o)},t))}},function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM20 4v13.17L18.83 16H4V4h16zM6 12h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"}));t.a=o},,,,,,,,,,,function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=o},function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(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"}));t.a=o},,function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(18);const s=Object(o.createElement)(e=>{let{className:t,size:c,...r}=e;return Object(o.createElement)(a.SVG,n()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:c,height:c},r),Object(o.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=s},,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(14),s=c(2);c(211),t.a=e=>{let{image:t={},fallbackAlt:c=""}=e;const r=t.thumbnail?{src:t.thumbnail,alt:Object(a.decodeEntities)(t.alt)||c||"Product Image"}:{src:s.PLACEHOLDER_IMG_SRC,alt:""};return Object(o.createElement)("img",n()({className:"wc-block-components-product-image"},r,{alt:r.alt}))}},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(109);t.a=()=>Object(r.createElement)(o.a,{className:"wc-block-components-product-backorder-badge"},Object(n.__)("Available on backorder","woo-gutenberg-products-block"))},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(109);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(r.createElement)(o.a,{className:"wc-block-components-product-low-stock-badge"},Object(n.sprintf)(
24
  /* translators: %d stock amount (number of items in stock for product) */
25
  Object(n.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},function(e,t,c){"use strict";c.d(t,"a",(function(){return y}));var r=c(0),n=c(181),o=c(2),a=c(114),s=c(189),i=c(67),l=c(56),u=c(50),d=c(1),p=c(11),b=c.n(p),m=c(248),g=c(28);const h=(e,t,c)=>{const r=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),n=`wc-${c}-new-payment-method`;return r.push({key:n,value:t}),r},O=(e,t)=>{b.a.setNonce&&"function"==typeof b.a.setNonce&&b.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))};var j=c(112),E=c(36),_=c(47),f=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:c,redirectUrl:n,isProcessing:o,isBeforeProcessing:a,isComplete:p,orderNotes:f,shouldCreateAccount:y,extensionData:v}=Object(u.b)(),{hasValidationErrors:k}=Object(j.b)(),{shippingErrorStatus:w}=Object(i.b)(),{billingData:S,shippingAddress:C}=Object(l.b)(),{cartNeedsPayment:N,receiveCart:M}=Object(E.a)(),{activePaymentMethod:I,isExpressPaymentMethodActive:R,currentStatus:x,paymentMethodData:P,expressPaymentMethods:T,paymentMethods:A,shouldSavePayment:D}=Object(s.b)(),{addErrorNotice:L,removeNotice:B,setIsSuppressed:V}=Object(_.a)(),U=Object(r.useRef)(S),z=Object(r.useRef)(C),F=Object(r.useRef)(n),[G,H]=Object(r.useState)(!1),Y=Object(r.useMemo)(()=>{var e;const t={...T,...A};return null==t||null===(e=t[I])||void 0===e?void 0:e.paymentMethodId},[I,T,A]),q=k&&!R||x.hasError||w.hasError,$=!e&&!q&&(x.isSuccessful||!N)&&o;Object(r.useEffect)(()=>{V(R)},[R,V]),Object(r.useEffect)(()=>{q===e||!o&&!a||R||c.setHasError(q)},[q,e,o,a,R,c]),Object(r.useEffect)(()=>{U.current=S,z.current=C,F.current=n},[S,C,n]);const W=Object(r.useCallback)(()=>!k&&(x.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!w.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[k,x.hasError,w.hasError]);Object(r.useEffect)(()=>{let e;return R||(e=t(W,0)),()=>{R||e()}},[t,W,R]),Object(r.useEffect)(()=>{F.current&&(window.location.href=F.current)},[p]);const Q=Object(r.useCallback)(async()=>{if(G)return;H(!0),B("checkout");const e=N?{payment_method:Y,payment_data:h(P,D,I)}:{},t={billing_address:Object(m.a)(U.current),shipping_address:Object(m.a)(z.current),customer_note:f,should_create_account:y,...e,extensions:{...v}};b()({path:"/wc/store/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(O(e.headers,c),!e.ok)throw new Error(e);return e.json()}).then(e=>{c.setAfterProcessing(e),H(!1)}).catch(e=>{try{null!=e&&e.headers&&O(e.headers,c),e.json().then(e=>{var t,r,n;null!==(t=e.data)&&void 0!==t&&t.cart&&M(e.data.cart),L(Object(g.b)(e),{id:"checkout"}),null==e||null===(r=e.additional_errors)||void 0===r||null===(n=r.forEach)||void 0===n||n.call(r,e=>{L(e.message,{id:e.error_code})}),c.setAfterProcessing(e)})}catch{var t;L(Object(d.sprintf)(// Translators: %s Error text.
26
  Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout"})}c.setHasError(!0),H(!1)})},[G,B,f,y,N,Y,P,D,I,v,c,L,M]);return Object(r.useEffect)(()=>{$&&!G&&Q()},[Q,$,G]),null};const y=e=>{let{children:t,isCart:c=!1,redirectUrl:d}=e;return Object(r.createElement)(u.a,{redirectUrl:d,isCart:c},Object(r.createElement)(l.a,null,Object(r.createElement)(i.a,null,Object(r.createElement)(s.a,null,t,Object(r.createElement)(a.a,{renderError:o.CURRENT_USER_IS_ADMIN?null:()=>null},Object(r.createElement)(n.PluginArea,{scope:"woocommerce-checkout"})),Object(r.createElement)(f,null)))))}},function(e,t,c){"use strict";var r=c(0),n=c(6),o=c(14);c(214);var a=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(r.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",c=t?"wc-block-components-product-details__"+Object(n.kebabCase)(t):"";return Object(r.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"wc-block-components-product-details__name"},Object(o.decodeEntities)(t),":")," "),Object(r.createElement)("span",{className:"wc-block-components-product-details__value"},Object(o.decodeEntities)(e.display||e.value)))}))):null},s=c(129),i=c(25),l=e=>{let{className:t,shortDescription:c="",fullDescription:n=""}=e;const o=c||n;return o?Object(r.createElement)(s.a,{className:t,source:o,maxLength:15,countType:i.o.wordCountType||"words"}):null};c(213),t.a=e=>{let{shortDescription:t="",fullDescription:c="",itemData:n=[],variation:o=[]}=e;return Object(r.createElement)("div",{className:"wc-block-components-product-metadata"},Object(r.createElement)(l,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:c}),Object(r.createElement)(a,{details:n}),Object(r.createElement)(a,{details:o.map(e=>{let{attribute:t="",value:c}=e;return{key:t,value:c}})}))}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return R}));var r=c(1),n=c(35),o=c(0),a=c(4),s=c.n(a),i=c(18),l=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),u=c(205),d=c(399),p=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(o.createElement)("path",{d:"M0 0h24v24H0z"}),Object(o.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"}),Object(o.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"}))),b=c(43),m=c(85);c(228);const g={bank:l,bill:u.a,card:d.a,checkPayment:p};var h=e=>{let{icon:t="",text:c=""}=e;const r=!!t,n=Object(o.useCallback)(e=>r&&Object(m.c)(e)&&Object(m.d)(g,e),[r]),a=s()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":r});return Object(o.createElement)("span",{className:a},n(t)?Object(o.createElement)(b.a,{srcElement:g[t]}):t,c)},O=c(184),j=c(2),E=c(65),_=c.n(E),f=c(66),y=c(193),v=c(36),k=c(183),w=c(44),S=c(50),C=c(189),N=c(67),M=c(56);const I=(e,t)=>{const c=[],n=(t,c)=>{const r=c+"_tax",n=Object(m.d)(e,c)&&Object(m.c)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:n,valueWithTax:n+(Object(m.d)(e,r)&&Object(m.c)(e[r])?parseInt(e[r],10):0)}};return c.push(n(Object(r.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(n(Object(r.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(n(Object(r.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(r.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(n(Object(r.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c},R=()=>{const{isCalculating:e,isComplete:t,isIdle:c,isProcessing:a,onCheckoutBeforeProcessing:s,onCheckoutValidationBeforeProcessing:i,onCheckoutAfterProcessingWithSuccess:l,onCheckoutAfterProcessingWithError:u,onSubmit:d,customerId:p}=Object(S.b)(),{currentStatus:b,activePaymentMethod:m,onPaymentProcessing:g,setExpressPaymentError:E,shouldSavePayment:R}=Object(C.b)(),{shippingErrorStatus:x,shippingErrorTypes:P,shippingRates:T,shippingRatesLoading:A,selectedRates:D,setSelectedRates:L,isSelectingRate:B,onShippingRateSuccess:V,onShippingRateFail:U,onShippingRateSelectSuccess:z,onShippingRateSelectFail:F,needsShipping:G}=Object(N.b)(),{billingData:H,shippingAddress:Y,setShippingAddress:q}=Object(M.b)(),{cartItems:$,cartFees:W,cartTotals:Q,extensions:K}=Object(v.a)(),{appliedCoupons:X}=Object(k.a)(),{noticeContexts:Z,responseTypes:J}=Object(w.c)(),ee=Object(o.useRef)(I(Q,G)),te=Object(o.useRef)({label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(Q.total_price,10)});Object(o.useEffect)(()=>{ee.current=I(Q,G),te.current={label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(Q.total_price,10)}},[Q,G]);const ce=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";_()("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"}),E(e)}),[E]);return{activePaymentMethod:m,billing:{appliedCoupons:X,billingData:H,cartTotal:te.current,cartTotalItems:ee.current,currency:Object(n.getCurrencyFromPriceResponse)(Q),customerId:p,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:$,cartFees:W,extensions:K},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:c,isProcessing:a},components:{LoadingMask:f.a,PaymentMethodIcons:O.a,PaymentMethodLabel:h,ValidationInputError:y.a},emitResponse:{noticeContexts:Z,responseTypes:J},eventRegistration:{onCheckoutAfterProcessingWithError:u,onCheckoutAfterProcessingWithSuccess:l,onCheckoutBeforeProcessing:s,onCheckoutValidationBeforeProcessing:i,onPaymentProcessing:g,onShippingRateFail:U,onShippingRateSelectFail:F,onShippingRateSelectSuccess:z,onShippingRateSuccess:V},onSubmit:d,paymentStatus:b,setExpressPaymentError:ce,shippingData:{isSelectingRate:B,needsShipping:G,selectedRates:D,setSelectedRates:L,setShippingAddress:q,shippingAddress:Y,shippingRates:T,shippingRatesLoading:A},shippingStatus:{shippingErrorStatus:x,shippingErrorTypes:P},shouldSavePayment:R}}},function(e,t,c){"use strict";c.d(t,"b",(function(){return i})),c.d(t,"a",(function(){return l}));var r=c(0),n=(c(10),c(9)),o=c(4),a=c.n(o);const s=Object(r.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),i=()=>Object(r.useContext)(s),l=e=>{let{children:t,className:c=""}=e;const[o,i]=(()=>{const[e,{width:t}]=Object(n.useResizeObserver)();let c="";return t>700?c="is-large":t>520?c="is-medium":t>400?c="is-small":t&&(c="is-mobile"),[e,c]})(),l={hasContainerWidth:""!==i,containerClassName:i,isMobile:"is-mobile"===i,isSmall:"is-small"===i,isMedium:"is-medium"===i,isLarge:"is-large"===i};return Object(r.createElement)(s.Provider,{value:l},Object(r.createElement)("div",{className:a()(c,i)},o,t))}},function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(1),s=c(8),i=c(4),l=c.n(i),u=c(112),d=c(193),p=c(9),b=c(85),m=c(30);c(170);var g=Object(s.forwardRef)((e,t)=>{let{className:c,id:r,type:a="text",ariaLabel:s,ariaDescribedBy:i,label:u,screenReaderLabel:d,disabled:p,help:b,autoCapitalize:g="off",autoComplete:h="off",value:O="",onChange:j,required:E=!1,onBlur:_=(()=>{}),feedback:f,...y}=e;const[v,k]=Object(o.useState)(!1);return Object(o.createElement)("div",{className:l()("wc-block-components-text-input",c,{"is-active":v||O})},Object(o.createElement)("input",n()({type:a,id:r,value:O,ref:t,autoCapitalize:g,autoComplete:h,onChange:e=>{j(e.target.value)},onFocus:()=>k(!0),onBlur:e=>{_(e.target.value),k(!1)},"aria-label":s||u,disabled:p,"aria-describedby":b&&!i?r+"__help":i,required:E},y)),Object(o.createElement)(m.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:r},htmlFor:r}),!!b&&Object(o.createElement)("p",{id:r+"__help",className:"wc-block-components-text-input__help"},b),f)});t.a=Object(p.withInstanceId)(e=>{let{className:t,instanceId:c,id:r,ariaDescribedBy:i,errorId:p,focusOnMount:m=!1,onChange:h,showError:O=!0,errorMessage:j="",value:E="",..._}=e;const[f,y]=Object(s.useState)(!0),v=Object(s.useRef)(null),{getValidationError:k,hideValidationError:w,setValidationErrors:S,clearValidationError:C,getValidationErrorId:N}=Object(u.b)(),M=void 0!==r?r:"textinput-"+c,I=void 0!==p?p:M,R=Object(s.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=v.current||null;if(!t)return;t.value=t.value.trim();const c=t.checkValidity();c?C(I):S({[I]:{message:t.validationMessage||Object(a.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[C,I,S]);Object(s.useEffect)(()=>{var e;f&&m&&(null===(e=v.current)||void 0===e||e.focus()),y(!1)},[m,f,y]),Object(s.useEffect)(()=>{var e,t;(null===(e=v.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==v.current&&R(!0)},[E,R]),Object(s.useEffect)(()=>()=>{C(I)},[C,I]);const x=k(I)||{};Object(b.c)(j)&&""!==j&&(x.message=j);const P=x.message&&!x.hidden,T=O&&P&&N(I)?N(I):i;return Object(o.createElement)(g,n()({className:l()(t,{"has-error":P}),"aria-invalid":!0===P,id:M,onBlur:()=>{R(!1)},feedback:O&&Object(o.createElement)(d.a,{errorMessage:j,propertyName:I}),ref:v,onChange:e=>{w(I),h(e)},ariaDescribedBy:T,value:E},_))})},,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));const r=window.CustomEvent||null,n=(e,t)=>{let{bubbles:c=!1,cancelable:n=!1,element:o,detail:a={}}=t;if(!r)return;o||(o=document.body);const s=new r(e,{bubbles:c,cancelable:n,detail:a});o.dispatchEvent(s)};let o;const a=()=>{o&&clearTimeout(o),o=setTimeout(()=>{n("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const o=()=>{n(t,{bubbles:c,cancelable:r})};return jQuery(document).on(e,o),()=>jQuery(document).off(e,o)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"c",(function(){return s})),c.d(t,"a",(function(){return i}));var r=c(2),n=c(98),o=c(15);const a=e=>{let{country:t="",state:c="",city:r="",postcode:n=""}=e;return{country:t.trim(),state:c.trim(),city:r.trim(),postcode:n?n.replace(" ","").toUpperCase():""}},s=e=>{let{email:t=""}=e;return Object(o.isEmail)(t)?t.trim():""},i=e=>{const t=Object.keys(r.defaultAddressFields),c=Object(n.a)(t,{},e.country),o=Object.assign({},e);return c.forEach(t=>{let{key:c="",hidden:r=!1}=t;r&&((e,t)=>e in t)(c,e)&&(o[c]="")}),o}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(107);const n=(e,t)=>function(c){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const o=r.a.addEventCallback(e,c,n);return t(o),()=>{t(r.a.removeEventCallback(e,o.id))}}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return a}));const r=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var n=c(44);const o=async(e,t,c)=>{const n=r(e,t),o=[];for(const e of n)try{const t=await Promise.resolve(e.callback(c));"object"==typeof t&&o.push(t)}catch(e){console.error(e)}return!o.length||o},a=async(e,t,c)=>{const o=[],a=r(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(c));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(n.a)(t)||Object(n.b)(t))return o.push(t),o;o.push(t)}catch(e){return console.error(e),o.push({type:"error"}),o}return o}},,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var r=c(0),n=c(13),o=c(12),a=c(6);const s=e=>{let{clientId:t,registeredBlocks:c,defaultTemplate:s=[]}=e;const i=Object(r.useRef)(c),l=Object(r.useRef)(s),{insertBlock:u,replaceInnerBlocks:d}=Object(n.useDispatch)("core/block-editor"),{innerBlocks:p,registeredBlockTypes:b}=Object(n.useSelect)(e=>({innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:i.current.map(e=>Object(o.getBlockType)(e))}),[t,i.current]),m=Object(r.useCallback)((e,c)=>{const r=Object(o.createBlock)(e.name);u(r,c,t,!1)},[t,u]),g=Object(r.useMemo)(()=>b.filter(e=>e&&(e=>{var t,c,r;let{attributes:n}=e;return Boolean((null===(t=n.lock)||void 0===t?void 0:t.remove)||(null===(c=n.lock)||void 0===c||null===(r=c.default)||void 0===r?void 0:r.remove))})(e)),[b]);Object(r.useLayoutEffect)(()=>{if(t){if(0===p.length&&l.current.length>0){const e=Object(o.createBlocksFromInnerBlocksTemplate)(l.current);if(!Object(a.isEqual)(e,p))return void d(t,e)}g.forEach(e=>{if(p.find(t=>{let{name:c}=t;return c===e.name}))return;const t=l.current.findIndex(t=>{let[c]=t;return c===e.name});switch(t){case-1:m(e,p.length);break;case 0:m(e,0);break;default:const c=l.current[t-1],r=p.findIndex(e=>{let{name:t}=e;return t===c[0]});m(e,-1===r?t:r+1)}})}},[t,p,g,d,m])}},function(e,t,c){"use strict";c.d(t,"a",(function(){return d}));var r=c(0),n=c(3),o=c(1),a=c(2);const s=[];var i=c(5),l=c.n(i),u=e=>Object(r.createElement)("div",l()({className:"wc-block-welcome-guide__image",style:{display:"flex",justifyContent:"center",alignItems:"center"}},e),Object(r.createElement)("svg",{height:"120",viewBox:"0 0 170 120",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("g",{filter:"url(#filter0_ddd)"},Object(r.createElement)("rect",{x:"5.5",y:"18",width:"159",height:"96",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"24.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"94.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"})),Object(r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.8908 42H125.078C129.899 42 133.802 45.9231 133.802 50.7692V80C133.802 84.8462 129.899 88.7692 125.078 88.7692H97.756L101.506 98L85.0135 88.7692H48.929C44.1076 88.7692 40.2045 84.8462 40.2045 80V50.7692C40.1662 45.9615 44.0693 42 48.8908 42Z",fill:"#7F54B3"}),Object(r.createElement)("path",{d:"M44.8709 50.723C45.4039 50.0175 46.2033 49.6462 47.2693 49.5719C49.2108 49.4234 50.3149 50.3145 50.5814 52.2453C51.7615 60.0056 53.0559 66.5778 54.4264 71.9617L62.7637 56.4782C63.5251 55.0673 64.4768 54.3246 65.6189 54.2504C67.294 54.139 68.3219 55.1786 68.7406 57.3694C69.6924 62.3077 70.9106 66.5035 72.3573 70.0681C73.3471 60.6369 75.0222 53.8419 77.3825 49.6462C77.9535 48.6065 78.7911 48.0867 79.8951 48.0124C80.7707 47.9382 81.5702 48.1981 82.2935 48.755C83.0168 49.312 83.3975 50.0175 83.4736 50.8715C83.5117 51.5398 83.3975 52.0968 83.0929 52.6538C81.6082 55.3272 80.39 59.82 79.4002 66.0579C78.4484 72.1102 78.1058 76.8258 78.3342 80.2047C78.4104 81.133 78.2581 81.9499 77.8774 82.6553C77.4205 83.4722 76.7353 83.9178 75.8597 83.9921C74.8699 84.0663 73.842 83.6207 72.8522 82.6182C69.3117 79.0908 66.4945 73.8183 64.4388 66.8006C61.9642 71.5533 60.1369 75.1178 58.9567 77.4942C56.7106 81.69 54.8071 83.8435 53.2082 83.9549C52.1803 84.0292 51.3047 83.1752 50.5433 81.3929C48.6017 76.5288 46.5079 67.1347 44.2618 53.2107C44.1476 52.2453 44.3379 51.3913 44.8709 50.723Z",fill:"white"}),Object(r.createElement)("path",{d:"M126.922 56.5426C125.536 54.1968 123.495 52.7819 120.761 52.2234C120.029 52.0745 119.336 52 118.681 52C114.985 52 111.981 53.8617 109.632 57.5851C107.63 60.75 106.629 64.25 106.629 68.0851C106.629 70.9521 107.245 73.4096 108.477 75.4574C109.863 77.8032 111.904 79.2181 114.638 79.7766C115.37 79.9255 116.063 80 116.717 80C120.453 80 123.456 78.1383 125.767 74.4149C127.769 71.2128 128.77 67.7128 128.77 63.8777C128.77 60.9734 128.154 58.5532 126.922 56.5426ZM122.07 66.8564C121.531 69.3138 120.568 71.1383 119.143 72.367C118.027 73.3351 116.987 73.7447 116.024 73.5585C115.1 73.3723 114.33 72.5904 113.752 71.1383C113.29 69.984 113.059 68.8298 113.059 67.75C113.059 66.8192 113.136 65.8883 113.329 65.0319C113.675 63.5053 114.33 62.016 115.37 60.6011C116.64 58.7766 117.988 58.0319 119.374 58.2925C120.299 58.4787 121.069 59.2606 121.646 60.7128C122.108 61.867 122.339 63.0213 122.339 64.1011C122.339 65.0691 122.224 66 122.07 66.8564Z",fill:"white"}),Object(r.createElement)("path",{d:"M102.767 56.5426C101.381 54.1968 99.3018 52.7819 96.6063 52.2234C95.8747 52.0745 95.1816 52 94.5269 52C90.8303 52 87.8267 53.8617 85.4778 57.5851C83.4755 60.75 82.4743 64.25 82.4743 68.0851C82.4743 70.9521 83.0904 73.4096 84.3226 75.4574C85.7089 77.8032 87.7497 79.2181 90.4837 79.7766C91.2153 79.9255 91.9085 80 92.5631 80C96.2983 80 99.3018 78.1383 101.612 74.4149C103.615 71.2128 104.616 67.7128 104.616 63.8777C104.616 60.9734 104 58.5532 102.767 56.5426ZM97.9155 66.8564C97.3765 69.3138 96.4138 71.1383 94.989 72.367C93.8723 73.3351 92.8326 73.7447 91.87 73.5585C90.9458 73.3723 90.1757 72.5904 89.5981 71.1383C89.136 69.984 88.9049 68.8298 88.9049 67.75C88.9049 66.8192 88.9819 65.8883 89.1745 65.0319C89.521 63.5053 90.1757 62.016 91.2153 60.6011C92.4861 58.7766 93.8338 58.0319 95.2201 58.2925C96.1442 58.4787 96.9144 59.2606 97.492 60.7128C97.9541 61.867 98.1851 63.0213 98.1851 64.1011C98.1851 65.0691 98.1081 66 97.9155 66.8564Z",fill:"white"}),Object(r.createElement)("defs",null,Object(r.createElement)("filter",{id:"filter0_ddd",x:"0.5",y:"0",width:"169",height:"120",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(r.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"2.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect1_dropShadow",result:"effect2_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"2"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),Object(r.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect3_dropShadow",result:"shape"})))));function d(e){let{blockName:t}=e;const[c,i]=(e=>{const[t,c]=((e,t)=>{const[c,n]=Object(r.useState)(()=>{const c=window.localStorage.getItem(e);if(c)try{return JSON.parse(c)}catch{console.error(`Value for key '${e}' could not be retrieved from localStorage because it can't be parsed.`)}return t});return Object(r.useEffect)(()=>{try{window.localStorage.setItem(e,JSON.stringify(c))}catch{console.error(`Value for key '${e}' could not be saved in localStorage because it can't be converted into a string.`)}},[e,c]),[c,n]})("wc-blocks_dismissed_compatibility_notices",s),[n,o]=Object(r.useState)(!1),a=t.includes(e);return Object(r.useEffect)(()=>{o(!a)},[a]),[n,()=>{const r=new Set(t);r.add(e),c([...r])}]})(t);return Object(a.isWpVersion)("5.4","<=")||!c?null:Object(r.createElement)(n.Guide,{className:"wc-block-welcome-guide",contentLabel:Object(o.__)("Compatibility notice","woo-gutenberg-products-block"),onFinish:()=>i(),finishButtonText:Object(o.__)("Got it!","woo-gutenberg-products-block"),pages:[{image:Object(r.createElement)(u,null),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"wc-block-welcome-guide__heading"},Object(o.__)("Compatibility notice","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(o.__)("This block may not be compatible with <em>all</em> checkout extensions and integrations.","woo-gutenberg-products-block"),{em:Object(r.createElement)("em",null)})),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(o.__)("We recommend reviewing our <a>expanding list</a> of compatible extensions prior to using this block on a live store.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:"https://docs.woocommerce.com/document/cart-checkout-blocks-support-status/",target:"_blank",rel:"noopener noreferrer"})})))}]})}},,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/filled-cart-block","version":"1.0.0","title":"Filled Cart","description":"Contains blocks that are displayed when the cart contains products.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-items-block","version":"1.0.0","title":"Cart Items block","description":"Column containing cart items.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-line-items-block","version":"1.0.0","title":"Cart Line Items","description":"Block containing current line items in Cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-items-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-totals-block","version":"1.0.0","title":"Cart Totals","description":"Column containing the cart totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false},"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/proceed-to-checkout-block","version":"1.0.0","title":"Proceed to checkout","description":"Allow customers proceed to Checkout.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e,t,c){"use strict";(function(e){var r=c(0),n=c(1),o=c(4),a=c.n(o),s=c(76),i=c(25),l=c(50),u=c(470),d=c(2);c(402),t.a=t=>{let{checkoutPageId:c,className:o}=t;const p=Object(d.getSetting)("page-"+c,!1),{isCalculating:b}=Object(l.b)(),[m,g]=Object(u.a)(),[h,O]=Object(r.useState)(!1);Object(r.useEffect)(()=>{if("function"!=typeof e.addEventListener||"function"!=typeof e.removeEventListener)return;const t=()=>{O(!1)};return e.addEventListener("pageshow",t),()=>{e.removeEventListener("pageshow",t)}},[]);const j=Object(r.createElement)(s.a,{className:"wc-block-cart__submit-button",href:p||i.f,disabled:b,onClick:()=>O(!0),showSpinner:h},Object(n.__)("Proceed to Checkout","woo-gutenberg-products-block"));return Object(r.createElement)("div",{className:a()("wc-block-cart__submit",o)},m,Object(r.createElement)("div",{className:"wc-block-cart__submit-container"},j),"below"===g&&Object(r.createElement)("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky"},j))}}).call(this,c(401))},function(e){e.exports=JSON.parse('{"name":"woocommerce/empty-cart-block","version":"1.0.0","title":"Empty Cart","description":"Contains blocks that are displayed when the cart is empty.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-accepted-payment-methods-block","version":"1.0.0","title":"Accepted Payment Methods","description":"Display accepted payment methods.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){e.exports=c(435)},function(e,t){},function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"}),Object(r.createElement)("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"}))," ");t.a=o},function(e,t){},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(12);const n=["core/paragraph","core/image","core/separator"],o=e=>[...Object(r.getBlockTypes)().filter(t=>((null==t?void 0:t.parent)||[]).includes(e)).map(e=>{let{name:t}=e;return t}),...n]},function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n),a=(c(10),c(241));c(210),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)(a.a,{className:o()("wc-block-components-sidebar-layout",c)},t)}},function(e,t,c){"use strict";var r=c(0),n=c(8),o=c(4),a=c.n(o);const s=Object(n.forwardRef)((e,t)=>{let{children:c,className:n=""}=e;return Object(r.createElement)("div",{ref:t,className:a()("wc-block-components-main",n)},c)});t.a=s},function(e,t){},function(e,t){},function(e,t,c){"use strict";var r=c(0),n=c(8),o=c(4),a=c.n(o);const s=Object(n.forwardRef)((e,t)=>{let{children:c,className:n=""}=e;return Object(r.createElement)("div",{ref:t,className:a()("wc-block-components-sidebar",n)},c)});t.a=s},function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},Object(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"}),Object(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"}),Object(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"}));t.a=o},,,,,function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(66),a=c(185),s=c(19),i=c(2);c(216);const l={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:c,isRemovingCoupon:u,removeCoupon:d,values:p}=e;const{total_discount:b,total_discount_tax:m}=p,g=parseInt(b,10);if(!g&&0===t.length)return null;const h=parseInt(m,10),O=Object(i.getSetting)("displayCartPricesIncludingTax",!1)?g+h:g,j=Object(s.__experimentalApplyCheckoutFilter)({arg:l,filterName:"coupons",defaultValue:t});return Object(r.createElement)(s.TotalsItem,{className:"wc-block-components-totals-discount",currency:c,description:0!==j.length&&Object(r.createElement)(o.a,{screenReaderLabel:Object(n.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},Object(r.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},j.map(e=>Object(r.createElement)(a.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(n.sprintf)(
build/checkout-frontend.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '0ab8ffa93f350d57aabb4f0a728461de');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '274737bed9f0f23f7683651f2da65b54');
build/checkout-frontend.js CHANGED
@@ -3,4 +3,4 @@
3
  Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(i.b)(e.priority)&&(t.index=e.priority),Object(i.d)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},a=Object.entries(c).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,s(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==a[r]?a[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,i=Object(n.useRef)(null),c=Object(n.useRef)(0),s=Object(n.useRef)(null),a=Object(n.useRef)([]),l=Object(n.useRef)(),u=Object(n.useRef)(),d=Object(n.useRef)(e),p=Object(n.useRef)(!0);d.current=e;var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var m=!!(r=r||{}).leading,h=!("trailing"in r)||!!r.trailing,b="maxWait"in r,g=b?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=a.current,r=l.current;return a.current=l.current=null,c.current=e,u.current=d.current.apply(r,t)},r=function(e,t){f&&cancelAnimationFrame(s.current),s.current=f?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-i.current,n=e-c.current;return!i.current||r>=t||r<0||b&&n>=g},y=function(t){return s.current=null,h&&a.current?e(t):(a.current=l.current=null,u.current)},E=function(){var e=Date.now();if(n(e))return y(e);if(p.current){var o=e-i.current,s=e-c.current,a=t-o,l=b?Math.min(a,g-s):a;r(E,l)}},v=function(){for(var d=[],f=0;f<arguments.length;f++)d[f]=arguments[f];var h=Date.now(),g=n(h);if(a.current=d,l.current=o,i.current=h,g){if(!s.current&&p.current)return c.current=i.current,r(E,t),m?e(i.current):u.current;if(b)return r(E,t),e(i.current)}return s.current||r(E,t),u.current};return v.cancel=function(){s.current&&(f?cancelAnimationFrame(s.current):clearTimeout(s.current)),c.current=0,a.current=i.current=l.current=s.current=null},v.isPending=function(){return!!s.current},v.flush=function(){return s.current?y(Date.now()):u.current},v}),[m,b,t,g,h,f])}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(10),o=r.n(n),i=r(0),c=r(16);const s=[".wp-block-woocommerce-cart"],a=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:s=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const a=n(e,r),l=s(e,r),u={...e.dataset,...a.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:s={},errorBoundaryProps:a={}}=e;Object(i.render)(Object(i.createElement)(c.a,a,Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(i.createElement)(t,o()({},s,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:a,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(s.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:i}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:i}=e;const c=document.body.querySelectorAll(o);i&&i.length>0&&Array.prototype.filter.call(c,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,i)),a({Block:t,containers:c,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:i,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:i}=e;const c=i.querySelectorAll(o);a({Block:t,containers:c,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},,function(e,t,r){"use strict";var n=r(7),o=r(0),i=r(4),c=r.n(i),s=r(5),a=r(30),l=r.n(a),u=r(12),d=r(60),p=r(90),f=r(1);function m(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const i=o.getBoundingClientRect();return new n.DOMRect(e.left+i.left,e.top+i.top,e.width,e.height)}let h=0;function b(e){const t=document.scrollingElement||document.body;e&&(h=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=h)}let g=0;function y(){return Object(o.useEffect)(()=>(0===g&&b(!0),++g,()=>{1===g&&b(!1),--g}),[]),null}var E=r(26);function v(e){const t=Object(o.useContext)(E.a),r=t.slots[e]||{},n=t.fills[e],i=Object(o.useMemo)(()=>n||[],[n]);return{...r,updateSlot:Object(o.useCallback)(r=>{t.updateSlot(e,r)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(r=>{t.unregisterSlot(e,r)},[e,t.unregisterSlot]),fills:i,registerFill:Object(o.useCallback)(r=>{t.registerFill(e,r)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(r=>{t.unregisterFill(e,r)},[e,t.unregisterFill])}}var O=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function _({name:e,children:t,registerFill:r,unregisterFill:n}){const i=(e=>{const{getSlot:t,subscribe:r}=Object(o.useContext)(O),[n,i]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(i(t(e)),r(()=>{i(t(e))})),[e]),n})(e),c=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(r(e,c.current),()=>n(e,c.current)),[]),Object(o.useLayoutEffect)(()=>{c.current.children=t,i&&i.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==c.current.name&&(n(c.current.name,c.current),c.current.name=e,r(e,c.current))},[e]),i&&i.node?(Object(s.isFunction)(t)&&(t=t(i.props.fillProps)),Object(o.createPortal)(t,i.node)):null}var S=e=>Object(o.createElement)(O.Consumer,null,({registerFill:t,unregisterFill:r})=>Object(o.createElement)(_,Object(n.a)({},e,{registerFill:t,unregisterFill:r})));class k extends o.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,i=Object(s.map)(n(t,this),e=>{const t=Object(s.isFunction)(e.children)?e.children(r):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(s.isString)(e))return e;const r=e.key||t;return Object(o.cloneElement)(e,{key:r})})}).filter(Object(s.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(s.isFunction)(e)?e(i):i)}}var j=e=>Object(o.createElement)(O.Consumer,null,({registerSlot:t,unregisterSlot:r,getFills:i})=>Object(o.createElement)(k,Object(n.a)({},e,{registerSlot:t,unregisterSlot:r,getFills:i})));function w(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function C({name:e,children:t}){const r=v(e),n=Object(o.useRef)({rerender:w()});return Object(o.useEffect)(()=>(r.registerFill(n),()=>{r.unregisterFill(n)}),[r.registerFill,r.unregisterFill]),r.ref&&r.ref.current?("function"==typeof t&&(t=t(r.fillProps)),Object(o.createPortal)(t,r.ref.current)):null}var R=Object(o.forwardRef)((function({name:e,fillProps:t={},as:r="div",...i},c){const s=Object(o.useContext)(E.a),a=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(s.registerSlot(e,a,t),()=>{s.unregisterSlot(e,a)}),[s.registerSlot,s.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{s.updateSlot(e,t)}),Object(o.createElement)(r,Object(n.a)({ref:Object(u.useMergeRefs)([c,a])},i))}));function T(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(S,e),Object(o.createElement)(C,e))}r(11),o.Component;const x=Object(o.forwardRef)(({bubblesVirtually:e,...t},r)=>e?Object(o.createElement)(R,Object(n.a)({},t,{ref:r})):Object(o.createElement)(j,t));function P(e){return"appear"===e?"top":"left"}function A(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:i}=(c=t).ownerDocument.defaultView.getComputedStyle(c);var c;const s=r?parseInt(r,10):0,a=n?parseInt(n,10):0,l=o?parseInt(o,10):0,u=i?parseInt(i,10):0;return{x:e.left+l,y:e.top+s,width:e.width-l-u,height:e.height-s-a,left:e.left+l,right:e.right-u,top:e.top+s,bottom:e.bottom-a}}function N(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function M(e,t,r=""){e.style[t]!==r&&(e.style[t]=r)}function I(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const D=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:r,className:i,noArrow:s=!0,isAlternate:a,position:h="bottom right",range:b,focusOnMount:g="firstElement",anchorRef:E,shouldAnchorIncludePadding:O,anchorRect:_,getAnchorRect:S,expandOnMobile:k,animate:j=!0,onClickOutside:w,onFocusOutside:C,__unstableStickyBoundaryElement:R,__unstableSlotName:x="Popover",__unstableObserveElement:D,__unstableBoundaryParent:L,__unstableForcePosition:F,__unstableForceXAlignment:V,...B},U)=>{const H=Object(o.useRef)(null),z=Object(o.useRef)(null),G=Object(o.useRef)(),q=Object(u.useViewportMatch)("medium","<"),[W,$]=Object(o.useState)(),X=v(x),K=k&&q,[J,Q]=Object(u.useResizeObserver)();s=K||s,Object(o.useLayoutEffect)(()=>{if(K)return I(G.current,"is-without-arrow",s),I(G.current,"is-alternate",a),N(G.current,"data-x-axis"),N(G.current,"data-y-axis"),M(G.current,"top"),M(G.current,"left"),M(z.current,"maxHeight"),void M(z.current,"maxWidth");const e=()=>{if(!G.current||!z.current)return;let e=function(e,t,r,n=!1,o,i){if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return m(t,t.ownerDocument||e.current.ownerDocument,i)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return m(Object(d.getRectangleFromRange)(n),n.endContainer.ownerDocument,i);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=m(n.getBoundingClientRect(),n.ownerDocument,i);return o?e:A(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),c=t.getBoundingClientRect(),s=m(new window.DOMRect(r.left,r.top,r.width,c.bottom-r.top),e.ownerDocument,i);return o?s:A(s,n)}if(!e.current)return;const{parentNode:c}=e.current,s=c.getBoundingClientRect();return o?s:A(s,c)}(H,_,S,E,O,G.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=G.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}var i;L&&(n=null===(i=G.current.closest(".popover-slot"))||void 0===i?void 0:i.parentNode);const c=Q.height?Q:z.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:p,yAxis:b,contentHeight:g,contentWidth:y}=function(e,t,r="top",n,o,i,c,s,a){const[l,u="center",d]=r.split(" "),p=function(e,t,r,n,o,i,c,s){const{height:a}=t;if(o){const t=o.getBoundingClientRect().top+a-c;if(e.top<=t)return{yAxis:r,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===n?l=e.bottom:"top"===n&&(l=e.top);const u={popoverTop:l,contentHeight:(l-a/2>0?a/2:l)+(l+a/2>window.innerHeight?window.innerHeight-l:a/2)},d={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a};let f,m=r,h=null;if(!o&&!s)if("middle"===r&&u.contentHeight===a)m="middle";else if("top"===r&&d.contentHeight===a)m="top";else if("bottom"===r&&p.contentHeight===a)m="bottom";else{m=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===m?d.contentHeight:p.contentHeight;h=e!==a?e:null}return f="middle"===m?u.popoverTop:"top"===m?d.popoverTop:p.popoverTop,{yAxis:m,popoverTop:f,contentHeight:h}}(e,t,l,d,n,0,i,s);return{...function(e,t,r,n,o,i,c,s,a){const{width:l}=t;"left"===r&&Object(f.isRTL)()?r="right":"right"===r&&Object(f.isRTL)()&&(r="left"),"left"===n&&Object(f.isRTL)()?n="right":"right"===n&&Object(f.isRTL)()&&(n="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===n?p=e.right:"middle"===i||a||(p=u);let m=e.right;"left"===n?m=e.left:"middle"===i||a||(m=u);const h={popoverLeft:p,contentWidth:p-l>0?l:p},b={popoverLeft:m,contentWidth:m+l>window.innerWidth?window.innerWidth-m:l};let g,y=r,E=null;if(!o&&!s)if("center"===r&&d.contentWidth===l)y="center";else if("left"===r&&h.contentWidth===l)y="left";else if("right"===r&&b.contentWidth===l)y="right";else{y=h.contentWidth>b.contentWidth?"left":"right";const e="left"===y?h.contentWidth:b.contentWidth;l>window.innerWidth&&(E=window.innerWidth),e!==l&&(y="center",d.popoverLeft=window.innerWidth/2)}if(g="center"===y?d.popoverLeft:"left"===y?h.popoverLeft:b.popoverLeft,c){const e=c.getBoundingClientRect();g=Math.min(g,e.right-l),Object(f.isRTL)()||(g=Math.max(g,0))}return{xAxis:y,popoverLeft:g,contentWidth:E}}(e,t,u,d,n,p.yAxis,c,s,a),...p}}(e,c,h,R,G.current,o,n,F,V);"number"==typeof l&&"number"==typeof u&&(M(G.current,"top",l+"px"),M(G.current,"left",u+"px")),I(G.current,"is-without-arrow",s||"center"===p&&"middle"===b),I(G.current,"is-alternate",a),N(G.current,"data-x-axis",p),N(G.current,"data-y-axis",b),M(z.current,"maxHeight","number"==typeof g?g+"px":""),M(z.current,"maxWidth","number"==typeof y?y+"px":""),$(({left:"right",right:"left"}[p]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))};e();const{ownerDocument:t}=G.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const i=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",i),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const c=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(E);let l;return c&&c!==t&&(c.defaultView.addEventListener("resize",e),c.defaultView.addEventListener("scroll",e,!0)),D&&(l=new r.MutationObserver(e),l.observe(D,{attributes:!0})),()=>{r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",i),r.cancelAnimationFrame(o),c&&c!==t&&(c.defaultView.removeEventListener("resize",e),c.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}},[K,_,S,E,O,h,Q,R,D,L]);const Z=(e,r)=>{if("focus-outside"===e&&C)C(r);else if("focus-outside"===e&&w){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>r.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),w(e)}else t&&t()},[ee,te]=Object(u.__experimentalUseDialog)({focusOnMount:g,__unstableOnClose:Z,onClose:Z}),re=Object(u.useMergeRefs)([G,ee,U]),ne=Boolean(j&&W)&&function(e){if("loading"===e.type)return c()("components-animate__loading");const{type:t,origin:r=P(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return c()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?c()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:W});let oe=Object(o.createElement)("div",Object(n.a)({className:c()("components-popover",i,ne,{"is-expanded":K,"is-without-arrow":s,"is-alternate":a})},B,{ref:re},te,{tabIndex:"-1"}),K&&Object(o.createElement)(y,null),K&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(Y,{className:"components-popover__close",icon:p.a,onClick:t})),Object(o.createElement)("div",{ref:z,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},J,r)));return X.ref&&(oe=Object(o.createElement)(T,{name:x},oe)),E||_?oe:Object(o.createElement)("span",{ref:H},oe)});D.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(x,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var L=D,F=function({shortcut:e,className:t}){if(!e)return null;let r,n;return Object(s.isString)(e)&&(r=e),Object(s.isObject)(e)&&(r=e.display,n=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":n},r)};const V=Object(o.createElement)("div",{className:"event-catcher"}),B=({eventHandlers:e,child:t,childrenWithPopover:r})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(V,e),Object(o.cloneElement)(t,{children:r}),","),e),U=({child:e,eventHandlers:t,childrenWithPopover:r})=>Object(o.cloneElement)(e,{...t,children:r}),H=(e,t,r)=>{if(1!==o.Children.count(e))return;const n=o.Children.only(e);"function"==typeof n.props[t]&&n.props[t](r)};var z=function({children:e,position:t,text:r,shortcut:n}){const[i,c]=Object(o.useState)(!1),[a,l]=Object(o.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{H(e,"onMouseDown",t),document.addEventListener("mouseup",h),c(!0)},f=t=>{H(e,"onMouseUp",t),document.removeEventListener("mouseup",h),c(!1)},m=e=>"mouseUp"===e?f:"mouseDown"===e?p:void 0,h=m("mouseUp"),b=(t,r)=>n=>{if(H(e,t,n),n.currentTarget.disabled)return;if("focus"===n.type&&i)return;d.cancel();const o=Object(s.includes)(["focus","mouseenter"],n.type);o!==a&&(r?d(o):l(o))},g=()=>{d.cancel(),document.removeEventListener("mouseup",h)};if(Object(o.useEffect)(()=>g,[]),1!==o.Children.count(e))return e;const y={onMouseEnter:b("onMouseEnter",!0),onMouseLeave:b("onMouseLeave"),onClick:b("onClick"),onFocus:b("onFocus"),onBlur:b("onBlur"),onMouseDown:m("mouseDown")},E=o.Children.only(e),{children:v,disabled:O}=E.props;return(O?B:U)({child:E,eventHandlers:y,childrenWithPopover:(({grandchildren:e,isOver:t,position:r,text:n,shortcut:i})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(L,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(o.createElement)(F,{className:"components-tooltip__shortcut",shortcut:i}))))({grandchildren:v,isOver:a,position:t,text:r,shortcut:n})})},G=r(46),q=r(47);const W=["onMouseDown","onClick"];var Y=t.a=Object(o.forwardRef)((function(e,t){const{href:r,target:i,isSmall:a,isPressed:u,isBusy:d,isDestructive:p,className:f,disabled:m,icon:h,iconPosition:b="left",iconSize:g,showTooltip:y,tooltipPosition:E,shortcut:v,label:O,children:_,text:S,variant:k,__experimentalIsFocusable:j,describedBy:w,...C}=function({isDefault:e,isPrimary:t,isSecondary:r,isTertiary:n,isLink:o,variant:i,...c}){let s=i;var a,u,d,p,f;return t&&(null!==(a=s)&&void 0!==a||(s="primary")),n&&(null!==(u=s)&&void 0!==u||(s="tertiary")),r&&(null!==(d=s)&&void 0!==d||(s="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=s)&&void 0!==p||(s="secondary")),o&&(null!==(f=s)&&void 0!==f||(s="link")),{...c,variant:s}}(e),R=c()("components-button",f,{"is-secondary":"secondary"===k,"is-primary":"primary"===k,"is-small":a,"is-tertiary":"tertiary"===k,"is-pressed":u,"is-busy":d,"is-link":"link"===k,"is-destructive":p,"has-text":!!h&&!!_,"has-icon":!!h}),T=m&&!j,x=void 0===r||T?"button":"a",P="a"===x?{href:r,target:i}:{type:"button",disabled:T,"aria-pressed":u};if(m&&j){P["aria-disabled"]=!0;for(const e of W)C[e]=e=>{e.stopPropagation(),e.preventDefault()}}const A=!T&&(y&&O||v||!!O&&(!_||Object(s.isArray)(_)&&!_.length)&&!1!==y),N=w?Object(s.uniqueId)():null,M=C["aria-describedby"]||N,I=Object(o.createElement)(x,Object(n.a)({},P,C,{className:R,"aria-label":C["aria-label"]||O,"aria-describedby":M,ref:t}),h&&"left"===b&&Object(o.createElement)(G.a,{icon:h,size:g}),S&&Object(o.createElement)(o.Fragment,null,S),h&&"right"===b&&Object(o.createElement)(G.a,{icon:h,size:g}),_);return A?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(z,{text:w||O,shortcut:v,position:E},I),w&&Object(o.createElement)(q.a,null,Object(o.createElement)("span",{id:N},w))):Object(o.createElement)(o.Fragment,null,I,w&&Object(o.createElement)(q.a,null,Object(o.createElement)("span",{id:N},w)))}))},function(e,t,r){var n=r(76),o=r(58),i=o.setStyleProp,c=n.html,s=n.svg,a=n.isCustomAttribute,l=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,u;e=e||{};var d={};for(t in e)n=e[t],a(t)?d[t]=n:(r=t.toLowerCase(),l.call(c,r)?d[(u=c[r]).propertyName]=!!(u.hasBooleanValue||u.hasOverloadedBooleanValue&&!n)||n:l.call(s,t)?d[(u=s[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return i(e.style,d),d}},function(e,t,r){var n=r(3),o=r(80).default,i={reactCompat:!0},c=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:c,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,i={},c={};for(r in e)n=e[r],o&&(i=t(r,n))&&2===i.length?c[i[0]]=i[1]:"string"==typeof n&&(c[n]=r);return c},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,i))}}},function(e,t,r){for(var n,o=r(86).CASE_SENSITIVE_TAG_NAMES,i={},c=0,s=o.length;c<s;c++)n=o[c],i[n.toLowerCase()]=n;function a(e){for(var t,r={},n=0,o=e.length;n<o;n++)r[(t=e[n]).name]=t.value;return r}function l(e){return function(e){return i[e]}(e=e.toLowerCase())||e}e.exports={formatAttributes:a,formatDOM:function e(t,r,n){r=r||null;for(var o,i,c,s=[],u=0,d=t.length;u<d;u++){switch(o=t[u],c={next:null,prev:s[u-1]||null,parent:r},(i=s[u-1])&&(i.next=c),"#"!==o.nodeName[0]&&(c.name=l(o.nodeName),c.attribs={},o.attributes&&o.attributes.length&&(c.attribs=a(o.attributes))),o.nodeType){case 1:"script"===c.name||"style"===c.name?c.type=c.name:c.type="tag",c.children=e(o.childNodes,c);break;case 3:c.type="text",c.data=o.nodeValue;break;case 8:c.type="comment",c.data=o.nodeValue}s.push(c)}return n&&(s.unshift({name:n.substring(0,n.indexOf(" ")).toLowerCase(),data:n,type:"directive",next:s[0]?s[0]:null,prev:null,parent:r}),s[1]&&(s[1].prev=s[0])),s},isIE:function(e){return e?document.documentMode===e:/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},function(e,t){e.exports=window.wp.dom},function(e,t,r){var n=r(75),o=r(57),i=r(84),c={decodeEntities:!0,lowerCaseAttributeNames:!1};function s(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(i(e,(t=t||{}).htmlparser2||c),t)}s.domToReact=n,s.htmlToDOM=i,s.attributesToProps=o,e.exports=s,e.exports.default=s},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},,,function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:c}catch(e){n=c}}();var a,l=[],u=!1,d=-1;function p(){u&&a&&(u=!1,a.length?l=a.concat(l):d=-1,l.length&&f())}function f(){if(!u){var e=s(p);u=!0;for(var t=l.length;t;){for(a=l,l=[];++d<t;)a&&a[d].run();d=-1,t=l.length}a=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===c||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new m(e,t)),1!==l.length||u||s(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){"use strict";r.d(t,"n",(function(){return i})),r.d(t,"l",(function(){return c})),r.d(t,"k",(function(){return s})),r.d(t,"m",(function(){return a})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return f})),r.d(t,"e",(function(){return m})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return b})),r.d(t,"h",(function(){return g})),r.d(t,"b",(function(){return y}));var n,o=r(2);const i=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),c=i.pluginUrl+"images/",s=i.pluginUrl+"build/",a=i.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),f=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),h=Object(o.getSetting)("shippingCountries",{}),b=Object(o.getSetting)("allowedCountries",{}),g=Object(o.getSetting)("shippingStates",{}),y=Object(o.getSetting)("allowedStates",{})},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"c",(function(){return c})),r.d(t,"b",(function(){return s}));const n=window.CustomEvent||null,o=(e,t)=>{let{bubbles:r=!1,cancelable:o=!1,element:i,detail:c={}}=t;if(!n)return;i||(i=document.body);const s=new n(e,{bubbles:r,cancelable:o,detail:c});i.dispatchEvent(s)};let i;const c=()=>{i&&clearTimeout(i),i=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const i=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,i),()=>jQuery(document).off(e,i)}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>e.reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})},function(e,t,r){"use strict";var n=r(10),o=r.n(n),i=r(0);r(101);const c=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const r=Object(i.useRef)(null);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),Object(i.createElement)(e,o()({},t,{scrollToTop:e=>{null!==r.current&&((e,t)=>{const{focusableSelector:r}=t||{};window&&Number.isFinite(window.innerHeight)&&(r?((e,t)=>{var r;const n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){const e=n[0];c(e),null==e||e.focus()}else c(e)})(e,r):c(e))})(r.current,e)}})))}},,,function(e,t){},function(e,t,r){var n=r(3),o=r(57),i=r(58),c=i.setStyleProp;function s(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&i.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var i,a,l,u,d=(r=r||{}).library||n,p=d.cloneElement,f=d.createElement,m=d.isValidElement,h=[],b="function"==typeof r.replace,g=r.trim,y=0,E=t.length;y<E;y++)if(i=t[y],b&&m(a=r.replace(i)))E>1&&(a=p(a,{key:a.key||y})),h.push(a);else if("text"!==i.type){switch(l=i.attribs,s(i)?c(l.style,l):l&&(l=o(l)),u=null,i.type){case"script":case"style":i.children[0]&&(l.dangerouslySetInnerHTML={__html:i.children[0].data});break;case"tag":"textarea"===i.name&&i.children[0]?l.defaultValue=i.children[0].data:i.children&&i.children.length&&(u=e(i.children,r));break;default:continue}E>1&&(l.key=y),h.push(f(i.name,l,u))}else g?i.data.trim()&&h.push(i.data):h.push(i.data);return 1===h.length?h[0]:h}},function(e,t,r){var n=r(77),o=r(78),i=r(79),c=i.MUST_USE_PROPERTY,s=i.HAS_BOOLEAN_VALUE,a=i.HAS_NUMERIC_VALUE,l=i.HAS_POSITIVE_NUMERIC_VALUE,u=i.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function p(e,t,r){var n,o,i,p=e.Properties,f=e.DOMAttributeNames;for(o in p)n=f[o]||(r?o:o.toLowerCase()),i=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(i,c),hasBooleanValue:d(i,s),hasNumericValue:d(i,a),hasPositiveNumericValue:d(i,l),hasOverloadedBooleanValue:d(i,u)}}var f={};p(n,f);var m={};p(o,m,!0);var h={};p(n,h),p(o,h,!0),e.exports={html:f,svg:m,properties:h,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(81)),i=r(83);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[i.camelCase(e,t)]=n)})),r):r}},function(e,t,r){var n=r(82);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var i,c,s=n(e),a="function"==typeof t,l=0,u=s.length;l<u;l++)i=(r=s[l]).property,c=r.value,a?t(i,c,r):c&&(o||(o={}),o[i]=c);return o}},function(e,t){var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,c=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e){return e?e.replace(l,""):""}e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var l=1,d=1;function p(e){var t=e.match(n);t&&(l+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function f(){var e={line:l,column:d};return function(t){return t.position=new m(e),y(),t}}function m(e){this.start=e,this.end={line:l,column:d},this.source=t.source}m.prototype.content=e;var h=[];function b(r){var n=new Error(t.source+":"+l+":"+d+": "+r);if(n.reason=r,n.filename=t.source,n.line=l,n.column=d,n.source=e,!t.silent)throw n;h.push(n)}function g(t){var r=t.exec(e);if(r){var n=r[0];return p(n),e=e.slice(n.length),r}}function y(){g(o)}function E(e){var t;for(e=e||[];t=v();)!1!==t&&e.push(t);return e}function v(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;""!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return b("End of comment missing");var n=e.slice(2,r-2);return d+=2,p(n),e=e.slice(r),d+=2,t({type:"comment",comment:n})}}function O(){var e=f(),t=g(i);if(t){if(v(),!g(c))return b("property missing ':'");var n=g(s),o=e({type:"declaration",property:u(t[0].replace(r,"")),value:n?u(n[0].replace(r,"")):""});return g(a),o}}return y(),function(){var e,t=[];for(E(t);e=O();)!1!==e&&(t.push(e),E(t));return t}()}},function(e,t,r){"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,i=/^[^-]+$/,c=/^-(webkit|moz|ms|o|khtml)-/,s=function(e,t){return t.toUpperCase()},a=function(e,t){return t+"-"};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||i.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),t.reactCompat||(e=e.replace(c,a)),e.replace(o,s))}},function(e,t,r){var n=r(85),o=r(59),i=o.formatDOM,c=o.isIE(9),s=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(s);return r&&r[1]&&(t=r[1],c&&(e=e.replace(r[0],""))),i(n(e),null,t)}},function(e,t,r){var n=r(59),o=/<([a-zA-Z]+[0-9]?)/,i=/<head.*>/i,c=/<body.*>/i,s=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,a=n.isIE(9),l=a||n.isIE(),u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,f=a?"text/xml":"text/html";u=d=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),a&&(e=e.replace(s,"<$1$2$3/>")),p.parseFromString(e,f)}}if(document.implementation){var m=document.implementation.createHTMLDocument(l?"html-dom-parser":void 0);u=function(e,t){if(t)return m.documentElement.getElementsByTagName(t)[0].innerHTML=e,m;try{return m.documentElement.innerHTML=e,m}catch(t){if(d)return d(e)}}}var h,b=document.createElement("template");b.content&&(h=function(e){return b.innerHTML=e,b.content.childNodes}),e.exports=function(e){var t,r,n,s,a=e.match(o);switch(a&&a[1]&&(t=a[1].toLowerCase()),t){case"html":return r=d(e),i.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),c.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return s=u(e).getElementsByTagName(t),c.test(e)&&i.test(e)?s[0].parentNode.childNodes:s;default:return h?h(e):u(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return b}));var n=r(0),o=(r(8),r(9)),i=r(38),c=r(18),s=r(10),a=r.n(s),l=r(4),u=r.n(l),d=r(116);r(74);const p=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""};var f=e=>{let{className:t,notices:r,removeNotice:o}=e;const i=r.filter(e=>"snackbar"!==e.type);if(!i.length)return null;const c=u()(t,"wc-block-components-notices");return Object(n.createElement)("div",{className:c},i.map(e=>Object(n.createElement)(d.a,a()({key:"store-notice-"+e.id},e,{className:u()("wc-block-components-notices__notice",p(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const m=Object(n.createContext)({notices:[],createNotice:(e,t,r)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),h=()=>Object(n.useContext)(m),b=e=>{let{children:t,className:r="",createNoticeContainer:s=!0,context:a="wc/core"}=e;const{createNotice:l,removeNotice:u}=Object(o.useDispatch)("core/notices"),[d,p]=Object(n.useState)(!1),{dispatchStoreEvent:h}=Object(i.a)(),{isEditor:b}=Object(c.a)(),g=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};l(e,t,{...r,context:r.context||a}),h("store-notice-create",{status:e,content:t,options:r})}),[l,h,a]),y=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;u(e,t)}),[u,a]),{notices:E}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(a)}),[a]),v={notices:E,createNotice:g,removeNotice:y,context:a,setIsSuppressed:p},O=d?null:Object(n.createElement)(f,{className:r,notices:v.notices,removeNotice:v.removeNotice,isEditor:b});return Object(n.createElement)(m.Provider,{value:v},s&&O,t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},i=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return s}));var n=r(5);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const i={addEventCallback:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(n.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},c={},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,{type:t,eventType:r,id:n,callback:i,priority:s}=arguments.length>1?arguments[1]:void 0;const a=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return a.set(n,{priority:s,callback:i}),{...e,[r]:a};case o.REMOVE_EVENT_CALLBACK:return a.delete(n),{...e,[r]:a}}}},function(e,t,r){"use strict";var n=r(0),o=r(24);const i=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=i},function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(10)),i=n(r(120)),c=r(3),s=n(c),a=n(r(121)),l=n(r(123)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var r;for(r in e)if(!(r in t))return!1;for(r in t)if(e[r]!==t[r])return!1;return!u.und(r)||e===t}};function d(){var e=c.useState(!1)[1];return c.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function m(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return u.fun(e)?e.apply(void 0,r):e}function h(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,i(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var r=Object.keys(e).reduce((function(r,n){var i;return u.und(t[n])?o({},r,((i={})[n]=e[n],i)):r}),{});return o({to:t},r)}var b,g,y=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),E=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof y&&e.addChild(l(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof y&&e.removeChild(l(t))}))},t}return a(t,e),t}(y),v=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof y&&e.addChild(l(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof y&&e.removeChild(l(t))}))},t}a(t,e);var r=t.prototype;return r.getValue=function(e){void 0===e&&(e=!1);var t={};for(var r in this.payload){var n=this.payload[r];(!e||n instanceof y)&&(t[r]=n instanceof y?n[e?"getAnimatedValue":"getValue"]():n)}return t},r.getAnimatedValue=function(){return this.getValue(!0)},t}(y);function O(e,t){b={fn:e,transform:t}}function _(e){g=e}var S,k=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},j=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function w(e){S=e}var C,R=function(){return Date.now()};function T(e){C=e}var x,P,A=function(e){return e.current};function N(e){x=e}var M=Object.freeze({get applyAnimatedValues(){return b},injectApplyAnimatedValues:O,get colorNames(){return g},injectColorNames:_,get requestFrame(){return k},get cancelFrame(){return j},injectFrame:function(e,t){k=e,j=t},get interpolation(){return S},injectStringInterpolator:w,get now(){return R},injectNow:function(e){R=e},get defaultElement(){return C},injectDefaultElement:T,get animatedApi(){return A},injectAnimatedApi:function(e){A=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:N,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),I=function(e){function t(t,r){var n;return(n=e.call(this)||this).update=void 0,n.payload=t.style?o({},t,{style:x(t.style)}):t,n.update=r,n.attach(),n}return a(t,e),t}(v),D=!1,L=new Set,F=function e(){if(!D)return!1;var t=R(),r=L,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var i;if(n){if(o>=r.length)break;i=r[o++]}else{if((o=r.next()).done)break;i=o.value}for(var c=i,s=!1,a=0;a<c.configs.length;a++){for(var l=c.configs[a],u=void 0,d=void 0,p=0;p<l.animatedValues.length;p++){var f=l.animatedValues[p];if(!f.done){var m=l.fromValues[p],h=l.toValues[p],b=f.lastPosition,g=h instanceof y,E=Array.isArray(l.initialVelocity)?l.initialVelocity[p]:l.initialVelocity;if(g&&(h=h.getValue()),l.immediate)f.setValue(h),f.done=!0;else if("string"!=typeof m&&"string"!=typeof h){if(void 0!==l.duration)b=m+l.easing((t-f.startTime)/l.duration)*(h-m),u=t>=f.startTime+l.duration;else if(l.decay)b=m+E/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-b)<.1)&&(h=b);else{d=void 0!==f.lastTime?f.lastTime:t,E=void 0!==f.lastVelocity?f.lastVelocity:l.initialVelocity,t>d+64&&(d=t);for(var v=Math.floor(t-d),O=0;O<v;++O)b+=1*(E+=(-l.tension*(b-h)+-l.friction*E)/l.mass*1/1e3)/1e3;var _=!(!l.clamp||0===l.tension)&&(m<h?b>h:b<h),S=Math.abs(E)<=l.precision,j=0===l.tension||Math.abs(h-b)<=l.precision;u=_||S&&j,f.lastVelocity=E,f.lastTime=t}g&&!l.toValues[p].done&&(u=!1),u?(f.value!==h&&(b=h),f.done=!0):s=!0,f.setValue(b),f.lastPosition=b}else f.setValue(h),f.done=!0}}c.props.onFrame&&(c.values[l.name]=l.interpolation.getValue())}c.props.onFrame&&c.props.onFrame(c.values),s||(L.delete(c),c.stop(!0))}return L.size?P?P():k(e):D=!1,D};function V(e,t,r){if("function"==typeof e)return e;if(Array.isArray(e))return V({range:e,output:t,extrapolate:r});if(S&&"string"==typeof e.output[0])return S(e);var n=e,o=n.output,i=n.range||[0,1],c=n.extrapolateLeft||n.extrapolate||"extend",s=n.extrapolateRight||n.extrapolate||"extend",a=n.easing||function(e){return e};return function(e){var t=function(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}(e,i);return function(e,t,r,n,o,i,c,s,a){var l=a?a(e):e;if(l<t){if("identity"===c)return l;"clamp"===c&&(l=t)}if(l>r){if("identity"===s)return l;"clamp"===s&&(l=r)}return n===o?n:t===r?e<=t?n:o:(t===-1/0?l=-l:r===1/0?l-=t:l=(l-t)/(r-t),l=i(l),n===-1/0?l=-l:o===1/0?l+=n:l=l*(o-n)+n,l)}(e,i[t],i[t+1],o[t],o[t+1],a,c,s,n.map)}}var B=function(e){function t(r,n,o,i){var c;return(c=e.call(this)||this).calc=void 0,c.payload=r instanceof E&&!(r instanceof t)?r.getPayload():Array.isArray(r)?r:[r],c.calc=V(n,o,i),c}a(t,e);var r=t.prototype;return r.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},r.updateConfig=function(e,t,r){this.calc=V(e,t,r)},r.interpolate=function(e,r,n){return new t(this,e,r,n)},t}(E),U=function(e){function t(t){var r;return(r=e.call(this)||this).animatedStyles=new Set,r.value=void 0,r.startPosition=void 0,r.lastPosition=void 0,r.lastVelocity=void 0,r.startTime=void 0,r.lastTime=void 0,r.done=!1,r.setValue=function(e,t){void 0===t&&(t=!0),r.value=e,t&&r.flush()},r.value=t,r.startPosition=t,r.lastPosition=t,r}a(t,e);var r=t.prototype;return r.flush=function(){0===this.animatedStyles.size&&function e(t,r){"update"in t?r.add(t):t.getChildren().forEach((function(t){return e(t,r)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},r.clearStyles=function(){this.animatedStyles.clear()},r.getValue=function(){return this.value},r.interpolate=function(e,t,r){return new B(this,e,t,r)},t}(y),H=function(e){function t(t){var r;return(r=e.call(this)||this).payload=t.map((function(e){return new U(e)})),r}a(t,e);var r=t.prototype;return r.setValue=function(e,t){var r=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,n){return r.payload[n].setValue(e,t)})):this.payload.forEach((function(r){return r.setValue(e,t)}))},r.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},r.interpolate=function(e,t){return new B(this,e,t)},t}(E),z=0,G=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=z++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),r=t.delay,n=void 0===r?0:r,c=t.to,s=i(t,["delay","to"]);if(u.arr(c)||u.fun(c))this.queue.push(o({},s,{delay:n,to:c}));else if(c){var a={};Object.entries(c).forEach((function(e){var t,r=e[0],i=e[1],c=o({to:(t={},t[r]=i,t),delay:m(n,r)},s),l=a[c.delay]&&a[c.delay].to;a[c.delay]=o({},a[c.delay],c,{to:o({},l,c.to)})})),this.queue=Object.values(a)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(s),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var r=e.from,n=void 0===r?{}:r,i=e.to,c=void 0===i?{}:i;u.obj(n)&&(t.merged=o({},n,t.merged)),u.obj(c)&&(t.merged=o({},t.merged,c))}));var r=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach((function(o,c){var s=o.delay,a=i(o,["delay"]),l=function(o){c===n.length-1&&r===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(a.to)||u.fun(a.to);s?setTimeout((function(){r===t.guid&&(d?t.runAsync(a,l):t.diff(a).start(l))}),s):d?t.runAsync(a,l):t.diff(a).start(l)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),D||(D=!0,k(P||F));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var r=this,n=(e.delay,i(e,["delay"])),c=this.local,s=Promise.resolve(void 0);if(u.arr(n.to))for(var a=function(e){var t=e,i=o({},n,h(n.to[t]));u.arr(i.config)&&(i.config=i.config[t]),s=s.then((function(){if(c===r.guid)return new Promise((function(e){return r.diff(i).start(e)}))}))},l=0;l<n.to.length;l++)a(l);else if(u.fun(n.to)){var d,p=0;s=s.then((function(){return n.to((function(e){var t=o({},n,h(e));if(u.arr(t.config)&&(t.config=t.config[p]),p++,c===r.guid)return d=new Promise((function(e){return r.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),r.stop(e)})).then((function(){return d}))}))}s.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var r=this.props,n=r.from,i=void 0===n?{}:n,c=r.to,s=void 0===c?{}:c,a=r.config,l=void 0===a?{}:a,d=r.reverse,h=r.attach,b=r.reset,y=r.immediate;if(d){var E=[s,i];i=E[0],s=E[1]}this.merged=o({},i,this.merged,s),this.hasChanged=!1;var v=h&&h(this);if(this.animations=Object.entries(this.merged).reduce((function(e,r){var n=r[0],c=r[1],s=e[n]||{},a=u.num(c),d=u.str(c)&&!c.startsWith("#")&&!/\d/.test(c)&&!g[c],h=u.arr(c),E=!a&&!h&&!d,O=u.und(i[n])?c:i[n],_=a||h||d?c:1,k=m(l,n);v&&(_=v.animations[n].parent);var j,w=s.parent,C=s.interpolation,T=f(v?_.getPayload():_),x=c;E&&(x=S({range:[0,1],output:[c,c]})(1));var P,A=C&&C.getValue(),N=!u.und(w)&&s.animatedValues.some((function(e){return!e.done})),M=!u.equ(x,A),I=!u.equ(x,s.previous),D=!u.equ(k,s.config);if(b||I&&M||D){var L;if(a||d)w=C=s.parent||new U(O);else if(h)w=C=s.parent||new H(O);else if(E){var F=s.interpolation&&s.interpolation.calc(s.parent.value);F=void 0===F||b?O:F,s.parent?(w=s.parent).setValue(0,!1):w=new U(0);var V={output:[F,c]};s.interpolation?(C=s.interpolation,s.interpolation.updateConfig(V)):C=w.interpolate(V)}return T=f(v?_.getPayload():_),j=f(w.getPayload()),b&&!E&&w.setValue(O,!1),t.hasChanged=!0,j.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=N?e.lastVelocity:void 0,e.lastTime=N?e.lastTime:void 0,e.startTime=R(),e.done=!1,e.animatedStyles.clear()})),m(y,n)&&w.setValue(E?_:c,!1),o({},e,((L={})[n]=o({},s,{name:n,parent:w,interpolation:C,animatedValues:j,toValues:T,previous:x,config:k,fromValues:f(w.getValue()),immediate:m(y,n),initialVelocity:p(k.velocity,0),clamp:p(k.clamp,!1),precision:p(k.precision,.01),tension:p(k.tension,170),friction:p(k.friction,26),mass:p(k.mass,1),duration:k.duration,easing:p(k.easing,(function(e){return e})),decay:k.decay}),L))}return M?e:(E&&(w.setValue(1,!1),C.updateConfig({output:[x,x]})),w.done=!0,t.hasChanged=!0,o({},e,((P={})[n]=o({},e[n],{previous:x}),P)))}),this.animations),this.hasChanged)for(var O in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[O]=this.animations[O].interpolation,this.values[O]=this.animations[O].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),q=function(e,t){var r=c.useRef(!1),n=c.useRef(),o=u.fun(t),i=c.useMemo((function(){var r;return n.current&&(n.current.map((function(e){return e.destroy()})),n.current=void 0),[new Array(e).fill().map((function(e,n){var i=new G,c=o?m(t,n,i):t[n];return 0===n&&(r=c.ref),i.update(c),r||i.start(),i})),r]}),[e]),s=i[0],a=i[1];n.current=s,c.useImperativeHandle(a,(function(){return{start:function(){return Promise.all(n.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return n.current.forEach((function(t){return t.stop(e)}))},get controllers(){return n.current}}}));var l=c.useMemo((function(){return function(e){return n.current.map((function(t,r){t.update(o?m(e,r,t):e[r]),a||t.start()}))}}),[e]);c.useEffect((function(){r.current?o||l(t):a||n.current.forEach((function(e){return e.start()}))})),c.useEffect((function(){return r.current=!0,function(){return n.current.forEach((function(e){return e.destroy()}))}}),[]);var d=n.current.map((function(e){return e.getValues()}));return o?[d,l,function(e){return n.current.forEach((function(t){return t.pause(e)}))}]:d},W=0,Y=function(e,t){return("function"==typeof t?e.map(t):f(t)).map(String)},$=function(e){var t=e.items,r=e.keys,n=void 0===r?function(e){return e}:r,c=i(e,["items","keys"]);return t=f(void 0!==t?t:null),o({items:t,keys:Y(t,n)},c)};function X(e,t){var r=function(){if(o){if(i>=n.length)return"break";c=n[i++]}else{if((i=n.next()).done)return"break";c=i.value}var r=c.key,s=function(e){return e.key!==r};(u.und(t)||t===r)&&(e.current.instances.delete(r),e.current.transitions=e.current.transitions.filter(s),e.current.deleted=e.current.deleted.filter(s))},n=e.current.deleted,o=Array.isArray(n),i=0;for(n=o?n:n[Symbol.iterator]();;){var c;if("break"===r())break}e.current.forceUpdate()}var K=function(e){function t(t){var r;return void 0===t&&(t={}),r=e.call(this)||this,!t.transform||t.transform instanceof y||(t=b.transform(t)),r.payload=t,r}return a(t,e),t}(v),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Q="[-+]?\\d*\\.?\\d+";function Z(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+Z(Q,Q,Q)),te=new RegExp("rgba"+Z(Q,Q,Q,Q)),re=new RegExp("hsl"+Z(Q,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),ne=new RegExp("hsla"+Z(Q,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Q)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{6})$/,se=/^#([0-9a-fA-F]{8})$/;function ae(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function le(e,t,r){var n=r<.5?r*(1+t):r+t-r*t,o=2*r-n,i=ae(o,n,e+1/3),c=ae(o,n,e),s=ae(o,n,e-1/3);return Math.round(255*i)<<24|Math.round(255*c)<<16|Math.round(255*s)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,r,n="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(r=ce.exec(t))?parseInt(r[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(r=ee.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|255)>>>0:(r=te.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|pe(r[4]))>>>0:(r=oe.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=se.exec(t))?parseInt(r[1],16)>>>0:(r=ie.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=re.exec(t))?(255|le(de(r[1]),fe(r[2]),fe(r[3])))>>>0:(r=ne.exec(t))?(le(de(r[1]),fe(r[2]),fe(r[3]))|pe(r[4]))>>>0:null;return null===n?e:"rgba("+((4278190080&(n=n||0))>>>24)+", "+((16711680&n)>>>16)+", "+((65280&n)>>>8)+", "+(255&n)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,be=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(J).join("|")+")","g"),ye={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ee=["Webkit","Ms","Moz","O"];function ve(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||ye.hasOwnProperty(e)&&ye[e]?(""+t).trim():t+"px"}ye=Object.keys(ye).reduce((function(e,t){return Ee.forEach((function(r){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(r,t)]=e[t]})),e}),ye);var Oe={};N((function(e){return new K(e)})),T("div"),w((function(e){var t=e.output.map((function(e){return e.replace(be,me)})).map((function(e){return e.replace(ge,me)})),r=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return r[t].push(+e)}))}));var n=t[0].match(he).map((function(t,n){return V(o({},e,{output:r[n]}))}));return function(e){var r=0;return t[0].replace(he,(function(){return n[r++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,r,n,o){return"rgba("+Math.round(t)+", "+Math.round(r)+", "+Math.round(n)+", "+o+")"}))}})),_(J),O((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var r=t.style,n=t.children,o=t.scrollTop,c=t.scrollLeft,s=i(t,["style","children","scrollTop","scrollLeft"]),a="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==o&&(e.scrollTop=o),void 0!==c&&(e.scrollLeft=c),void 0!==n&&(e.textContent=n),r)if(r.hasOwnProperty(l)){var u=0===l.indexOf("--"),d=ve(l,r[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,d):e.style[l]=d}for(var p in s){var f=a?p:Oe[p]||(Oe[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,s[p])}}),(function(e){return e}));var _e,Se,ke=(_e=function(e){return c.forwardRef((function(t,r){var n=d(),a=c.useRef(!0),l=c.useRef(null),p=c.useRef(null),f=c.useCallback((function(e){var t=l.current;l.current=new I(e,(function(){var e=!1;p.current&&(e=b.fn(p.current,l.current.getAnimatedValue())),p.current&&!1!==e||n()})),t&&t.detach()}),[]);c.useEffect((function(){return function(){a.current=!1,l.current&&l.current.detach()}}),[]),c.useImperativeHandle(r,(function(){return A(p,a,n)})),f(t);var m,h=l.current.getValue(),g=(h.scrollTop,h.scrollLeft,i(h,["scrollTop","scrollLeft"])),y=(m=e,!u.fun(m)||m.prototype instanceof s.Component?function(e){return p.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,r)}:void 0);return s.createElement(e,o({},g,{ref:y}))}))},void 0===(Se=!1)&&(Se=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var r=Se?t[0].toLowerCase()+t.substring(1):t;return e[r]=_e(r),e}),_e)}),je=ke(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=ke,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=F,t.animated=je,t.a=je,t.interpolate=function(e,t,r){return e&&new B(e,t,r)},t.Globals=M,t.useSpring=function(e){var t=u.fun(e),r=q(1,t?e:[e]),n=r[0],o=r[1],i=r[2];return t?[n[0],o,i]:n},t.useTrail=function(e,t){var r=c.useRef(!1),n=u.fun(t),i=m(t),s=c.useRef(),a=q(e,(function(e,t){return 0===e&&(s.current=[]),s.current.push(t),o({},i,{config:m(i.config,e),attach:e>0&&function(){return s.current[e-1]}})})),l=a[0],d=a[1],p=a[2],f=c.useMemo((function(){return function(e){return d((function(t,r){e.reverse;var n=e.reverse?t+1:t-1,c=s.current[n];return o({},e,{config:m(e.config||i.config,t),attach:c&&function(){return c}})}))}}),[e,i.reverse]);return c.useEffect((function(){r.current&&!n&&f(t)})),c.useEffect((function(){r.current=!0}),[]),n?[l,f,p]:l},t.useTransition=function(e,t,r){var n=o({items:e,keys:t||function(e){return e}},r),s=$(n),a=s.lazy,l=void 0!==a&&a,u=(s.unique,s.reset),p=void 0!==u&&u,f=(s.enter,s.leave,s.update,s.onDestroyed),h=(s.keys,s.items,s.onFrame),b=s.onRest,g=s.onStart,y=s.ref,E=i(s,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),v=d(),O=c.useRef(!1),_=c.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!n.ref,instances:!O.current&&new Map,forceUpdate:v});return c.useImperativeHandle(n.ref,(function(){return{start:function(){return Promise.all(Array.from(_.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(_.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(_.current.instances).map((function(e){return e[1]}))}}})),_.current=function(e,t){for(var r=e.first,n=e.prevProps,c=i(e,["first","prevProps"]),s=$(t),a=s.items,l=s.keys,u=s.initial,d=s.from,p=s.enter,f=s.leave,h=s.update,b=s.trail,g=void 0===b?0:b,y=s.unique,E=s.config,v=s.order,O=void 0===v?["enter","leave","update"]:v,_=$(n),S=_.keys,k=_.items,j=o({},c.current),w=[].concat(c.deleted),C=Object.keys(j),R=new Set(C),T=new Set(l),x=l.filter((function(e){return!R.has(e)})),P=c.transitions.filter((function(e){return!e.destroyed&&!T.has(e.originalKey)})).map((function(e){return e.originalKey})),A=l.filter((function(e){return R.has(e)})),N=-g;O.length;)switch(O.shift()){case"enter":x.forEach((function(e,t){y&&w.find((function(t){return t.originalKey===e}))&&(w=w.filter((function(t){return t.originalKey!==e})));var n=l.indexOf(e),o=a[n],i=r&&void 0!==u?"initial":"enter";j[e]={slot:i,originalKey:e,key:y?String(e):W++,item:o,trail:N+=g,config:m(E,o,i),from:m(r&&void 0!==u?u||{}:d,o),to:m(p,o)}}));break;case"leave":P.forEach((function(e){var t=S.indexOf(e),r=k[t];w.unshift(o({},j[e],{slot:"leave",destroyed:!0,left:S[Math.max(0,t-1)],right:S[Math.min(S.length,t+1)],trail:N+=g,config:m(E,r,"leave"),to:m(f,r)})),delete j[e]}));break;case"update":A.forEach((function(e){var t=l.indexOf(e),r=a[t];j[e]=o({},j[e],{item:r,slot:"update",trail:N+=g,config:m(E,r,"update"),to:m(h,r)})}))}var M=l.map((function(e){return j[e]}));return w.forEach((function(e){var t,r=e.left,n=(e.right,i(e,["left","right"]));-1!==(t=M.findIndex((function(e){return e.originalKey===r})))&&(t+=1),t=Math.max(0,t),M=[].concat(M.slice(0,t),[n],M.slice(t))})),o({},c,{changed:x.length||P.length||A.length,first:r&&0===x.length,transitions:M,current:j,deleted:w,prevProps:t})}(_.current,n),_.current.changed&&_.current.transitions.forEach((function(e){var t=e.slot,r=e.from,n=e.to,i=e.config,c=e.trail,s=e.key,a=e.item;_.current.instances.has(s)||_.current.instances.set(s,new G);var u=_.current.instances.get(s),d=o({},E,{to:n,from:r,config:i,ref:y,onRest:function(r){_.current.mounted&&(e.destroyed&&(y||l||X(_,s),f&&f(a)),!Array.from(_.current.instances).some((function(e){return!e[1].idle}))&&(y||l)&&_.current.deleted.length>0&&X(_),b&&b(a,t,r))},onStart:g&&function(){return g(a,t)},onFrame:h&&function(e){return h(a,t,e)},delay:c,reset:p&&"enter"===t});u.update(d),_.current.paused||u.start()})),c.useEffect((function(){return _.current.mounted=O.current=!0,function(){_.current.mounted=O.current=!1,Array.from(_.current.instances).map((function(e){return e[1].destroy()})),_.current.instances.clear()}}),[]),_.current.transitions.map((function(e){var t=e.item,r=e.slot,n=e.key;return{item:t,key:n,state:r,props:_.current.instances.get(n).getValues()}}))},t.useChain=function(e,t,r){void 0===r&&(r=1e3);var n=c.useRef();c.useEffect((function(){u.equ(e,n.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,n){var i=e.current;if(i){var c=i.controllers;if(c.length){var s=r*t[n];c.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+s})})),e.start()}))}}})):e.reduce((function(e,t,r){var n=t.current;return e.then((function(){return n.start()}))}),Promise.resolve()),n.current=e}))},t.useSprings=q},,,,,,,function(e,t,r){"use strict";var n=r(0);t.a=function(e){let{srcElement:t,size:r=24,...o}=e;return Object(n.isValidElement)(t)?Object(n.cloneElement)(t,{width:r,height:r,...o}):null}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(9),o=r(0),i=r(6),c=r(54);const s=()=>{const e=Object(c.a)(),{selectShippingRate:t}=Object(n.useDispatch)(i.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((r,n)=>{t(r,n).catch(t=>{e(t)})},[e,t]),isSelectingRate:Object(n.useSelect)(e=>e(i.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},,function(e,t){},,,,,,function(e,t,r){"use strict";(function(e){var n=r(0),o=r(5),i=r(4),c=r.n(i),s=r(23),a=r(1),l=(r(45),r(56));t.a=Object(n.forwardRef)((function({className:t,children:r,spokenMessage:i=r,politeness:u="polite",actions:d=[],onRemove:p=o.noop,icon:f=null,explicitDismiss:m=!1,onDismiss:h=o.noop},b){function g(e){e&&e.preventDefault&&e.preventDefault(),h(),p()}h=h||o.noop,function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(s.speak)(r,t)},[r,t])}(i,u),Object(n.useEffect)(()=>{const e=setTimeout(()=>{m||(h(),p())},1e4);return()=>clearTimeout(e)},[h,p]);const y=c()(t,"components-snackbar",{"components-snackbar-explicit-dismiss":!!m});d&&d.length>1&&(void 0!==e&&e.env,d=[d[0]]);const E=c()("components-snackbar__content",{"components-snackbar__content-with-icon":!!f});return Object(n.createElement)("div",{ref:b,className:y,onClick:m?o.noop:g,tabIndex:"0",role:m?"":"button",onKeyPress:m?o.noop:g,"aria-label":m?"":Object(a.__)("Dismiss this notice")},Object(n.createElement)("div",{className:E},f&&Object(n.createElement)("div",{className:"components-snackbar__icon"},f),r,d.map(({label:e,onClick:t,url:r},o)=>Object(n.createElement)(l.a,{key:o,href:r,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),p(),t&&t(e)}(e,t),className:"components-snackbar__action"},e)),m&&Object(n.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:g,onKeyPress:g},"✕")))}))}).call(this,r(65))},function(e,t){e.exports=window.wp.plugins},function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){return a}));var n=r(2),o=r(50),i=r(34);const c=e=>{let{country:t="",state:r="",city:n="",postcode:o=""}=e;return{country:t.trim(),state:r.trim(),city:n.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},s=e=>{let{email:t=""}=e;return Object(i.isEmail)(t)?t.trim():""},a=e=>{const t=Object.keys(n.defaultAddressFields),r=Object(o.a)(t,{},e.country),i=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(i[r]="")}),i}},function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},,function(e,t,r){"use strict";var n=r(0),o=r(5),i=r(4),c=r.n(i),s=r(1),a=r(23),l=r(90),u=r(56);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:r,spokenMessage:i=r,onRemove:p=o.noop,isDismissible:f=!0,actions:m=[],politeness:h=d(t),__unstableHTML:b,onDismiss:g=o.noop}){!function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(a.speak)(r,t)},[r,t])}(i,h);const y=c()(e,"components-notice","is-"+t,{"is-dismissible":f});return b&&(r=Object(n.createElement)(n.RawHTML,null,r)),Object(n.createElement)("div",{className:y},Object(n.createElement)("div",{className:"components-notice__content"},r,Object(n.createElement)("div",{className:"components-notice__actions"},m.map(({className:e,label:t,isPrimary:r,variant:o,noDefaultClasses:i=!1,onClick:s,url:a},l)=>{let d=o;return"primary"===o||i||(d=a?"link":"secondary"),void 0===d&&r&&(d="primary"),Object(n.createElement)(u.a,{key:l,href:a,variant:d,onClick:a?void 0:s,className:c()("components-notice__action",e)},t)}))),f&&Object(n.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(s.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),g(),p()},showTooltip:!1}))}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(0),o=r(53),i=r(61),c=r.n(i),s=r(13);const a=(e,t)=>e&&t[e]?t[e]:null,l=e=>{let{block:t,blockMap:r,blockWrapper:o,children:i,depth:u=1}=e;return i&&0!==i.length?Array.from(i).map((e,i)=>{const{blockName:d="",...p}={key:`${t}_${u}_${i}`,...e instanceof HTMLElement?e.dataset:{},className:e.className||""},f=a(d,r);if(!f){const i=c()((null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof i&&i)return i;if(!Object(n.isValidElement)(i))return null;const s=e.childNodes.length?l({block:t,blockMap:r,children:e.childNodes,depth:u+1,blockWrapper:o}):void 0;return s?Object(n.cloneElement)(i,p,s):Object(n.cloneElement)(i,p)}const m=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${u}_${i}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(m,null,Object(n.createElement)(f,p,l({block:t,blockMap:r,children:e.children,depth:u+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(s.hasInnerBlocks)(e))return null;const i=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],c=Object(s.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!i.includes(t)}),l=o||n.Fragment;return Object(n.createElement)(l,null,c.map((e,r)=>{let{blockName:o,component:i}=e;const c=i||a(o,t);return c?Object(n.createElement)(c,{key:`${o}_forced_${r}`}):null}))})(d,r,e.children,o))))}):null},u=e=>{let{Block:t,selector:r,blockName:n,getProps:i=(()=>({})),blockMap:c,blockWrapper:s}=e;Object(o.a)({Block:t,selector:r,getProps:(e,t)=>{const r=l({block:n,blockMap:c,children:e.children||[],blockWrapper:s});return{...i(e,t),children:r}}})}},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){var n=r(122);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,r(t,n)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";r.d(t,"a",(function(){return _}));var n=r(0),o=r(108),i=r(2),c=r(16),s=r(204),a=r(44),l=r(33),u=r(31),d=r(1),p=r(27),f=r.n(p),m=r(109),h=r(88);const b=(e,t,r)=>{const n=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${r}-new-payment-method`;return n.push({key:o,value:t}),n},g=(e,t)=>{f.a.setNonce&&"function"==typeof f.a.setNonce&&f.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))};var y=r(160),E=r(22),v=r(32),O=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:r,redirectUrl:o,isProcessing:i,isBeforeProcessing:c,isComplete:p,orderNotes:O,shouldCreateAccount:_,extensionData:S}=Object(u.b)(),{hasValidationErrors:k}=Object(y.b)(),{shippingErrorStatus:j}=Object(a.b)(),{billingData:w,shippingAddress:C}=Object(l.b)(),{cartNeedsPayment:R,receiveCart:T}=Object(E.a)(),{activePaymentMethod:x,isExpressPaymentMethodActive:P,currentStatus:A,paymentMethodData:N,expressPaymentMethods:M,paymentMethods:I,shouldSavePayment:D}=Object(s.b)(),{addErrorNotice:L,removeNotice:F,setIsSuppressed:V}=Object(v.a)(),B=Object(n.useRef)(w),U=Object(n.useRef)(C),H=Object(n.useRef)(o),[z,G]=Object(n.useState)(!1),q=Object(n.useMemo)(()=>{var e;const t={...M,...I};return null==t||null===(e=t[x])||void 0===e?void 0:e.paymentMethodId},[x,M,I]),W=k&&!P||A.hasError||j.hasError,Y=!e&&!W&&(A.isSuccessful||!R)&&i;Object(n.useEffect)(()=>{V(P)},[P,V]),Object(n.useEffect)(()=>{W===e||!i&&!c||P||r.setHasError(W)},[W,e,i,c,P,r]),Object(n.useEffect)(()=>{B.current=w,U.current=C,H.current=o},[w,C,o]);const $=Object(n.useCallback)(()=>!k&&(A.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!j.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[k,A.hasError,j.hasError]);Object(n.useEffect)(()=>{let e;return P||(e=t($,0)),()=>{P||e()}},[t,$,P]),Object(n.useEffect)(()=>{H.current&&(window.location.href=H.current)},[p]);const X=Object(n.useCallback)(async()=>{if(z)return;G(!0),F("checkout");const e=R?{payment_method:q,payment_data:b(N,D,x)}:{},t={billing_address:Object(m.a)(B.current),shipping_address:Object(m.a)(U.current),customer_note:O,should_create_account:_,...e,extensions:{...S}};f()({path:"/wc/store/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(g(e.headers,r),!e.ok)throw new Error(e);return e.json()}).then(e=>{r.setAfterProcessing(e),G(!1)}).catch(e=>{try{null!=e&&e.headers&&g(e.headers,r),e.json().then(e=>{var t,n,o;null!==(t=e.data)&&void 0!==t&&t.cart&&T(e.data.cart),L(Object(h.b)(e),{id:"checkout"}),null==e||null===(n=e.additional_errors)||void 0===n||null===(o=n.forEach)||void 0===o||o.call(n,e=>{L(e.message,{id:e.error_code})}),r.setAfterProcessing(e)})}catch{var t;L(Object(d.sprintf)(// Translators: %s Error text.
4
  Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout"})}r.setHasError(!0),G(!1)})},[z,F,O,_,R,q,N,D,x,S,r,L,T]);return Object(n.useEffect)(()=>{Y&&!z&&X()},[X,Y,z]),null};const _=e=>{let{children:t,isCart:r=!1,redirectUrl:d}=e;return Object(n.createElement)(u.a,{redirectUrl:d,isCart:r},Object(n.createElement)(l.a,null,Object(n.createElement)(a.a,null,Object(n.createElement)(s.a,null,t,Object(n.createElement)(c.a,{renderError:i.CURRENT_USER_IS_ADMIN?null:()=>null},Object(n.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(n.createElement)(O,null)))))}},,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(0);const o=Object(n.createContext)({allowCreateAccount:!1,showCompanyField:!1,showApartmentField:!1,showPhoneField:!1,requireCompanyField:!1,requirePhoneField:!1,showOrderNotes:!0,showPolicyLinks:!0,showReturnToCart:!0,cartPageId:0,showRateAfterTaxName:!1}),i=(Object(n.createContext)({addressFieldControls:()=>null,accountControls:()=>null}),()=>Object(n.useContext)(o))},,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=(e,t)=>{const r=[];return Object.keys(e).forEach(n=>{if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default}),r}},,,,,,,,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-fields-block","version":"1.0.0","title":"Checkout Fields","description":"Column containing checkout address fields.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-contact-information-block","version":"1.0.0","title":"Contact Information","description":"Collect your customer\'s contact information.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-address-block","version":"1.0.0","title":"Shipping Address","description":"Collect your customer\'s shipping address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-billing-address-block","version":"1.0.0","title":"Billing Address","description":"Collect your customer\'s billing address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-methods-block","version":"1.0.0","title":"Shipping Options","description":"Shipping options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-payment-block","version":"1.0.0","title":"Payment Options","description":"Payment options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-note-block","version":"1.0.0","title":"Order Note","description":"Allow customers to add a note to their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-terms-block","version":"1.0.0","title":"Terms and Conditions","description":"Ensure customers agree to your terms and conditions and privacy policy.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-actions-block","version":"1.0.0","title":"Actions","description":"Allow customers to place their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-totals-block","version":"1.0.0","title":"Checkout Totals","description":"Column containing the checkout totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/checkout-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return l}));var n=r(0),o=r(5),i=r(11),c=r.n(i);const s=Object(n.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),a=()=>Object(n.useContext)(s),l=e=>{let{children:t}=e;const[r,i]=Object(n.useState)({}),a=Object(n.useCallback)(e=>r[e],[r]),l=Object(n.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),u=Object(n.useCallback)(e=>{i(t=>{if(!t[e])return t;const{[e]:r,...n}=t;return n})},[]),d=Object(n.useCallback)(()=>{i({})},[]),p=Object(n.useCallback)(e=>{e&&i(t=>(e=Object(o.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&c()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),f=Object(n.useCallback)((e,t)=>{i(r=>{if(!r.hasOwnProperty(e))return r;const n={...r[e],...t};return c()(r[e],n)?r:{...r,[e]:n}})},[]),m={getValidationError:a,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!0})},[f]),showValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!1})},[f]),showAllValidationErrors:Object(n.useCallback)(()=>{i(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:l};return Object(n.createElement)(s.Provider,{value:m},t)}},,,,function(e,t){},,,function(e,t){e.exports=window.wp.keycodes},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(89);const o=(e,t)=>function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const i=n.a.addEventCallback(e,r,o);return t(i),()=>{t(n.a.removeEventCallback(e,i.id))}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return c}));const n=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=r(29);const i=async(e,t,r)=>{const o=n(e,t),i=[];for(const e of o)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&i.push(t)}catch(e){console.error(e)}return!i.length||i},c=async(e,t,r)=>{const i=[],c=n(e,t);for(const e of c)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return i.push(t),i;i.push(t)}catch(e){return console.error(e),i.push({type:"error"}),i}return i}},,,,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(201)},function(e,t){},function(e,t){},function(e,t){},,,,,,,function(e,t,r){"use strict";r.r(t);var n=r(0),o=r(134),i=r(22),c=r(11),s=r.n(c),a=r(31),l=r(160),u=r(14),d=r(119),p=r(66),f=r(13),m=r(154),h=r(149),b=r(147),g=r(146),y=r(145),E=r(152),v=r(156),O=r(151),_=r(148),S=r(150),k=r(153),j=r(155);r.p=p.k,Object(f.registerCheckoutBlock)({metadata:y,component:Object(n.lazy)(()=>r.e(35).then(r.bind(null,380)))}),Object(f.registerCheckoutBlock)({metadata:g,component:Object(n.lazy)(()=>r.e(34).then(r.bind(null,401)))}),Object(f.registerCheckoutBlock)({metadata:b,component:Object(n.lazy)(()=>r.e(33).then(r.bind(null,389)))}),Object(f.registerCheckoutBlock)({metadata:_,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(2),r.e(3),r.e(39)]).then(r.bind(null,391)))}),Object(f.registerCheckoutBlock)({metadata:h,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(2),r.e(3),r.e(32)]).then(r.bind(null,392)))}),Object(f.registerCheckoutBlock)({metadata:S,component:Object(n.lazy)(()=>Promise.all([r.e(1),r.e(40)]).then(r.bind(null,388)))}),Object(f.registerCheckoutBlock)({metadata:O,component:Object(n.lazy)(()=>r.e(38).then(r.bind(null,384)))}),Object(f.registerCheckoutBlock)({metadata:E,component:Object(n.lazy)(()=>r.e(36).then(r.bind(null,393)))}),Object(f.registerCheckoutBlock)({metadata:k,component:Object(n.lazy)(()=>r.e(41).then(r.bind(null,402)))}),Object(f.registerCheckoutBlock)({metadata:m,component:Object(n.lazy)(()=>r.e(31).then(r.bind(null,387)))}),Object(f.registerCheckoutBlock)({metadata:j,component:Object(n.lazy)(()=>r.e(42).then(r.bind(null,381)))}),Object(f.registerCheckoutBlock)({metadata:v,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(1),r.e(2),r.e(4),r.e(37)]).then(r.bind(null,394)))});var w=r(1),C=r(4),R=r.n(C),T=r(32),x=r(87),P=r(124),A=r(211),N=r(16),M=r(214),I=r(2),D=r(71),L=(r(192),r(98)),F=r(24),V=Object(n.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.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"}));r(193);var B=()=>Object(n.createElement)("div",{className:"wc-block-checkout-empty"},Object(n.createElement)(L.a,{className:"wc-block-checkout-empty__image",alt:"",srcElement:V,size:100}),Object(n.createElement)("strong",{className:"wc-block-checkout-empty__title"},Object(w.__)("Your cart is empty!","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-checkout-empty__description"},Object(w.__)("Checkout is not available whilst your cart is empty—please take a look through our store and come back when you're ready to place an order.","woo-gutenberg-products-block")),p.i&&Object(n.createElement)("span",{className:"wp-block-button"},Object(n.createElement)("a",{href:p.i,className:"wp-block-button__link"},Object(w.__)("Browse store","woo-gutenberg-products-block")))),U=Object(n.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("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"}),Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"})),H=r(19);r(194);const z=["woocommerce_product_out_of_stock","woocommerce_rest_cart_product_is_not_purchasable","woocommerce_rest_cart_product_no_stock","woocommerce_rest_cart_product_sold_individually","woocommerce_rest_cart_item_error"],G=Object(I.getSetting)("checkoutData",{}),q=e=>{let{errorData:t}=e,r=Object(w.__)("Checkout error","woo-gutenberg-products-block");return z.includes(t.code)&&(r=Object(w.__)("There is a problem with your cart","woo-gutenberg-products-block")),Object(n.createElement)("strong",{className:"wc-block-checkout-error_title"},r)},W=e=>{let{errorData:t}=e,r=t.message;return z.includes(t.code)&&(r=r+" "+Object(w.__)("Please edit your cart and try again.","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-checkout-error__description"},r)},Y=e=>{let{errorData:t}=e,r=Object(w.__)("Retry","woo-gutenberg-products-block"),o="javascript:window.location.reload(true)";return z.includes(t.code)&&(r=Object(w.__)("Edit your cart","woo-gutenberg-products-block"),o=p.c),Object(n.createElement)("span",{className:"wp-block-button"},Object(n.createElement)("a",{href:o,className:"wp-block-button__link"},r))};var $=()=>{const e={code:"",message:"",...G||{}},t={code:e.code||"unknown",message:Object(H.decodeEntities)(e.message)||Object(w.__)("There was a problem checking out. Please try again. If the problem persists, please get in touch with us so we can assist.","woo-gutenberg-products-block")};return Object(n.createElement)("div",{className:"wc-block-checkout-error"},Object(n.createElement)(L.a,{className:"wc-block-checkout-error__image",alt:"",srcElement:U,size:100}),Object(n.createElement)(q,{errorData:t}),Object(n.createElement)(W,{errorData:t}),Object(n.createElement)(Y,{errorData:t}))};const X=`${p.e}?redirect_to=${encodeURIComponent(window.location.href)}`,K=()=>{window.location.reload(!0)};var J=r(132);const Q=()=>Object(n.createElement)(n.Fragment,null,Object(w.__)("You must be logged in to checkout. ","woo-gutenberg-products-block"),Object(n.createElement)("a",{href:X},Object(w.__)("Click here to log in.","woo-gutenberg-products-block"))),Z=e=>{let{attributes:t,children:r}=e;const{hasOrder:o,customerId:c}=Object(a.b)(),{cartItems:s,cartIsLoading:l}=Object(i.a)(),{allowCreateAccount:u,showCompanyField:d,requireCompanyField:p,showApartmentField:f,showPhoneField:m,requirePhoneField:h}=t;return l||0!==s.length?o?((e=>!e&&!Object(I.getSetting)("checkoutAllowsGuest",!1))(c)&&u&&Object(I.getSetting)("checkoutAllowsSignup",!1)&&Object(n.createElement)(Q,null),Object(n.createElement)(J.a.Provider,{value:{allowCreateAccount:u,showCompanyField:d,requireCompanyField:p,showApartmentField:f,showPhoneField:m,requirePhoneField:h}},r)):Object(n.createElement)($,null):Object(n.createElement)(B,null)},ee=e=>{let{scrollToTop:t}=e;const{hasNoticesOfType:r}=Object(T.a)(),{hasError:o,isIdle:i}=Object(a.b)(),{hasValidationErrors:c,showAllValidationErrors:s}=Object(l.b)(),u=i&&o&&(c||r("default"));return Object(n.useEffect)(()=>{let e;return u&&(s(),e=window.setTimeout(()=>{t({focusableSelector:"input:invalid, .has-error input"})},50)),()=>{clearTimeout(e)}},[u,t,s]),null};var te=Object(D.a)(e=>{let{attributes:t,children:r,scrollToTop:o}=e;return Object(n.createElement)(N.a,{header:Object(w.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(n.createInterpolateElement)(Object(w.__)("The checkout has encountered an unexpected error. <button>Try reloading the page</button>. If the error persists, please get in touch with us so we can assist.","woo-gutenberg-products-block"),{button:Object(n.createElement)("button",{className:"wc-block-link-button",onClick:K})}),showErrorMessage:I.CURRENT_USER_IS_ADMIN},Object(n.createElement)(A.a,{context:"wc/checkout"},Object(n.createElement)(x.a,{context:"wc/checkout"},Object(n.createElement)(l.a,null,Object(n.createElement)(f.SlotFillProvider,null,Object(n.createElement)(P.a,null,Object(n.createElement)(M.a,{className:R()("wc-block-checkout",{"has-dark-controls":t.hasDarkControls})},Object(n.createElement)(Z,{attributes:t},r),Object(n.createElement)(ee,{scrollToTop:o}))))))))});const re={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(I.getSetting)("hasDarkEditorStyleSupport",!1)},showCompanyField:{type:"boolean",default:!1},requireCompanyField:{type:"boolean",default:!1},allowCreateAccount:{type:"boolean",default:!1},showApartmentField:{type:"boolean",default:!0},showPhoneField:{type:"boolean",default:!0},requirePhoneField:{type:"boolean",default:!1},showOrderNotes:{type:"boolean",default:!0},showPolicyLinks:{type:"boolean",default:!0},showReturnToCart:{type:"boolean",default:!0},cartPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:Object(I.getSetting)("displayCartPricesIncludingTax",!1)}};Object(d.a)({Block:te,blockName:"woocommerce/checkout",selector:".wp-block-woocommerce-checkout",getProps:e=>({attributes:Object(o.a)(re,e instanceof HTMLElement?e.dataset:{})}),blockMap:Object(u.getRegisteredBlockComponents)("woocommerce/checkout"),blockWrapper:e=>{let{children:t}=e;const{extensions:r,receiveCart:o,...c}=Object(i.a)(),u=(()=>{const{dispatchActions:e,extensionData:t}=Object(a.b)(),r=Object(n.useRef)(t);Object(n.useEffect)(()=>{s()(t,r.current)||(r.current=t)},[t]);const o=Object(n.useCallback)((t,n,o)=>{const i=r.current[t]||{};e.setExtensionData({...r.current,[t]:{...i,[n]:o}})},[e]);return{extensionData:r.current,setExtensionData:o}})(),d=(()=>{const{hasValidationErrors:e,getValidationError:t,clearValidationError:r,hideValidationError:o,setValidationErrors:i}=Object(l.b)(),c="extensions-errors";return{hasValidationErrors:e,getValidationError:Object(n.useCallback)(e=>t(`${c}-${e}`),[t]),clearValidationError:Object(n.useCallback)(e=>r(`${c}-${e}`),[r]),hideValidationError:Object(n.useCallback)(e=>o(`${c}-${e}`),[o]),setValidationErrors:Object(n.useCallback)(e=>i(Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[`${c}-${t}`,r]}))),[i])}})();return n.Children.map(t,e=>{if(Object(n.isValidElement)(e)){const t={extensions:r,cart:c,checkoutExtensionData:u,validation:d};return Object(n.cloneElement)(e,t)}return e})}})},,,function(e,t,r){"use strict";r.d(t,"b",(function(){return D})),r.d(t,"a",(function(){return L}));var n=r(0),o=r(35);let i,c;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(i||(i={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(c||(c={}));const s={currentStatus:i.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},a={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:i,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,paymentMethodData:r,shouldSavePaymentMethod:n=!1,errorMessage:o="",paymentMethods:a={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case i.PRISTINE:return{...s,...e,errorMessage:"",currentStatus:i.PRISTINE};case i.STARTED:return{...e,currentStatus:i.STARTED};case i.ERROR:return e.currentStatus!==i.ERROR?{...e,currentStatus:i.ERROR,errorMessage:o||e.errorMessage}:e;case i.FAILED:return e.currentStatus!==i.FAILED?{...e,currentStatus:i.FAILED,paymentMethodData:r||e.paymentMethodData,errorMessage:o||e.errorMessage}:e;case i.SUCCESS:return e.currentStatus!==i.SUCCESS?{...e,currentStatus:i.SUCCESS,paymentMethodData:r||e.paymentMethodData}:e;case i.PROCESSING:return e.currentStatus!==i.PROCESSING?{...e,currentStatus:i.PROCESSING,errorMessage:""}:e;case i.COMPLETE:return e.currentStatus!==i.COMPLETE?{...e,currentStatus:i.COMPLETE}:e;case c.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:a};case c.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:a};case c.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:n};case c.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:r||e.paymentMethodData}}},u=r(1),d=r(14),p=r(17),f=r(2),m=r(52),h=r(18),b=r(44),g=r(33),y=r(22),E=r(32),v=r(29);const O=(e,t,r,o)=>{const[i,c]=Object(n.useState)(!1),{isEditor:s}=Object(h.a)(),{selectedRates:a}=Object(b.b)(),{billingData:l,shippingAddress:d}=Object(g.b)(),v=Object(p.a)(a),O=Object(p.a)(r),_=Object(y.a)(),{cartTotals:S,cartIsLoading:k,cartNeedsShipping:j,paymentRequirements:w}=_,C=Object(n.useRef)({cart:_,cartTotals:S,cartNeedsShipping:j,billingData:l,shippingAddress:d,selectedShippingMethods:v,paymentRequirements:w}),{addErrorNotice:R}=Object(E.a)();Object(n.useEffect)(()=>{C.current={cart:_,cartTotals:S,cartNeedsShipping:j,billingData:l,shippingAddress:d,selectedShippingMethods:v,paymentRequirements:w}},[_,S,j,l,d,v,w]);const T=Object(n.useCallback)(async()=>{let r={};const n=e=>{r={...r,[e.name]:e}};for(let e=0;e<O.length;e++){const r=O[e],i=t[r];if(i)try{const e=!!s||await Promise.resolve(i.canMakePayment(C.current));if(e){if("object"==typeof e&&null!==e&&e.error)throw new Error(e.error.message);n(i)}}catch(e){if(f.CURRENT_USER_IS_ADMIN||s){const t=Object(u.sprintf)(
5
  /* translators: %s the id of the payment method being registered (bank transfer, Stripe...) */
6
- Object(u.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),i.paymentMethodId);R(`${t} ${e}`,{context:o,id:`wc-${i.paymentMethodId}-registration-error`})}}}e(r),c(!0)},[R,e,s,o,O,t]),x=Object(m.a)(T,500,{leading:!0});return Object(n.useEffect)(()=>{k||x()},[x,_,v,l,k]),i},_=e=>({type:e}),S=e=>({type:i.ERROR,errorMessage:e}),k=e=>{let{errorMessage:t,paymentMethodData:r}=e;return{type:i.FAILED,errorMessage:t,paymentMethodData:r}},j=e=>{let{paymentMethodData:t}=e;return{type:i.SUCCESS,paymentMethodData:t}},w=e=>({type:c.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),C=e=>({type:c.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),R=e=>({type:c.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),T=(e,t)=>({type:c.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var x=r(31),P=r(89),A=r(169);var N=r(170),M=r(160);const I=Object(n.createContext)(a),D=()=>Object(n.useContext)(I),L=e=>{let{children:t}=e;const{isProcessing:r,isIdle:c,isCalculating:a,hasError:u}=Object(x.b)(),{isEditor:p,getPreviewData:m}=Object(h.a)(),{setValidationErrors:y}=Object(M.b)(),{addErrorNotice:D,removeNotice:L}=Object(E.a)(),{isSuccessResponse:F,isErrorResponse:V,isFailResponse:B,noticeContexts:U}=Object(v.c)(),[H,z]=Object(n.useReducer)(P.b,{}),{onPaymentProcessing:G}=(e=>Object(n.useMemo)(()=>({onPaymentProcessing:Object(A.a)("payment_processing",e)}),[e]))(z),q=Object(n.useRef)(H);Object(n.useEffect)(()=>{q.current=H},[H]);const[W,Y]=Object(n.useReducer)(l,s),{dispatchActions:$,setPaymentStatus:X}=(e=>{const{setBillingData:t}=Object(g.b)(),{setShippingAddress:r}=Object(b.b)();return{dispatchActions:Object(n.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(w(t))},setRegisteredExpressPaymentMethods:t=>{e(C(t))},setShouldSavePayment:t=>{e(R(t))},setActivePaymentMethod:function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(T(t,r))}}),[e]),setPaymentStatus:Object(n.useCallback)(()=>({pristine:()=>e(_(i.PRISTINE)),started:()=>e(_(i.STARTED)),processing:()=>e(_(i.PROCESSING)),completed:()=>e(_(i.COMPLETE)),error:t=>e(S(t)),failed:function(r,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(k({errorMessage:r||"",paymentMethodData:n||{}}))},success:function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof i&&null!=i&&i.address&&r(i.address),e(j({paymentMethodData:n}))}}),[e,t,r])}})(Y),K=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:r}=Object(v.c)(),n=new Set([...Object(f.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return O(e,t,Array.from(n),r.PAYMENTS)})($.setRegisteredPaymentMethods),J=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:r}=Object(v.c)();return O(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)})($.setRegisteredExpressPaymentMethods),Q=Object(n.useMemo)(()=>p?m("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(f.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach(r=>{const o=t[r].filter(t=>{var r;let{method:{gateway:n}}=t;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)});o.length&&(n[r]=o)}),n}(W.paymentMethods):{},[p,m,K,W.paymentMethods]),Z=Object(n.useCallback)(e=>{e?D(e,{id:"wc-express-payment-error",context:U.EXPRESS_PAYMENTS}):L("wc-express-payment-error",U.EXPRESS_PAYMENTS)},[D,U.EXPRESS_PAYMENTS,L]),ee=Object.keys(W.expressPaymentMethods).includes(W.activePaymentMethod),te=Object(n.useMemo)(()=>({isPristine:W.currentStatus===i.PRISTINE,isStarted:W.currentStatus===i.STARTED,isProcessing:W.currentStatus===i.PROCESSING,isFinished:[i.ERROR,i.FAILED,i.SUCCESS].includes(W.currentStatus),hasError:W.currentStatus===i.ERROR,hasFailed:W.currentStatus===i.FAILED,isSuccessful:W.currentStatus===i.SUCCESS,isDoingExpressPayment:W.currentStatus!==i.PRISTINE&&ee}),[W.currentStatus,ee]);Object(n.useEffect)(()=>{const e=Object.keys(W.paymentMethods);if(!K||!e.length)return;const t=[...e,...Object.keys(W.expressPaymentMethods)];if(W.activePaymentMethod&&t.includes(W.activePaymentMethod))return;X().pristine();const r=Object.keys(Q).flatMap(e=>Q[e])[0]||void 0;if(r){const e=r.tokenId,t=r.method.gateway,n=`wc-${t}-payment-token`;$.setActivePaymentMethod(t,{token:e,payment_method:t,[n]:e.toString(),isSavedToken:!0})}else $.setActivePaymentMethod(Object.keys(W.paymentMethods)[0])},[K,W.paymentMethods,W.expressPaymentMethods,$,X,W.activePaymentMethod,Q]),Object(n.useEffect)(()=>{!r||u||a||te.isFinished||X().processing()},[r,u,a,te.isFinished,X]),Object(n.useEffect)(()=>{c&&!te.isSuccessful&&X().pristine()},[c,te.isSuccessful,X]),Object(n.useEffect)(()=>{u&&te.isSuccessful&&X().pristine()},[u,te.isSuccessful,X]),Object(n.useEffect)(()=>{te.isProcessing&&(L("wc-payment-error",U.PAYMENTS),Object(N.b)(q.current,"payment_processing",{}).then(e=>{let t,r;var n,o,i,c,s,a;if(e.forEach(e=>{F(e)&&(t=e),(V(e)||B(e))&&(r=e)}),t&&!r)X().success(null===(n=t)||void 0===n||null===(o=n.meta)||void 0===o?void 0:o.paymentMethodData,null===(i=t)||void 0===i||null===(c=i.meta)||void 0===c?void 0:c.billingData,null===(s=t)||void 0===s||null===(a=s.meta)||void 0===a?void 0:a.shippingData);else if(r&&B(r)){var l,u,d,p,f,m;r.message&&r.message.length&&D(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=r)||void 0===m?void 0:m.messageContext)||U.PAYMENTS}),X().failed(null===(l=r)||void 0===l?void 0:l.message,null===(u=r)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=r)||void 0===p||null===(f=p.meta)||void 0===f?void 0:f.billingData)}else if(r){var h,b;r.message&&r.message.length&&D(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(b=r)||void 0===b?void 0:b.messageContext)||U.PAYMENTS}),X().error(r.message),y(null===(h=r)||void 0===h?void 0:h.validationErrors)}else X().success()}))},[te.isProcessing,y,X,L,U.PAYMENTS,F,B,V,D]);const re="object"==typeof W.paymentMethodData&&Object(o.e)(W.paymentMethodData,"token")?W.paymentMethodData.token+"":"",ne={setPaymentStatus:X,currentStatus:te,paymentStatuses:i,paymentMethodData:W.paymentMethodData,errorMessage:W.errorMessage,activePaymentMethod:W.activePaymentMethod,activeSavedToken:re,setActivePaymentMethod:$.setActivePaymentMethod,onPaymentProcessing:G,customerPaymentMethods:Q,paymentMethods:W.paymentMethods,expressPaymentMethods:W.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:J,setExpressPaymentError:Z,isExpressPaymentMethodActive:ee,shouldSavePayment:W.shouldSavePaymentMethod,setShouldSavePayment:$.setShouldSavePayment};return Object(n.createElement)(I.Provider,{value:ne},t)}},,,,,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return E})),r.d(t,"a",(function(){return v}));var n=r(0),o=(r(8),r(9)),i=r(7),c=r(4),s=r.n(c),a=r(5),l=r(91),u=r(12),d=r(107),p=function({notices:e,className:t,children:r,onRemove:o=a.noop}){const c=Object(u.useReducedMotion)(),[p]=Object(n.useState)(()=>new WeakMap),f=Object(l.useTransition)(e,e=>e.id,{from:{opacity:0,height:0},enter:e=>async t=>await t({opacity:1,height:p.get(e).offsetHeight}),leave:()=>async e=>{await e({opacity:0}),await e({height:0})},immediate:c});t=s()("components-snackbar-list",t);const m=e=>()=>o(e.id);return Object(n.createElement)("div",{className:t},r,f.map(({item:e,key:t,props:r})=>Object(n.createElement)(l.animated.div,{key:t,style:r},Object(n.createElement)("div",{className:"components-snackbar-list__notice-container",ref:t=>t&&p.set(e,t)},Object(n.createElement)(d.a,Object(i.a)({},Object(a.omit)(e,["content"]),{onRemove:m(e)}),e.content)))))},f=r(13);const m={};var h=e=>{let{className:t,notices:r,removeNotice:o,isEditor:i}=e;if(i)return null;const c=r.filter(e=>"snackbar"===e.type),a=c.length>0?c.reduce((e,t)=>{let{content:r}=t;return e[r]=!0,e},{}):m,l=Object(f.__experimentalApplyCheckoutFilter)({filterName:"snackbarNoticeVisibility",defaultValue:a}),u=c.filter(e=>!0===l[e.content]),d=s()(t,"wc-block-components-notices__snackbar");return Object(n.createElement)(p,{notices:u,className:d,onRemove:o})},b=r(38),g=r(18);const y=Object(n.createContext)({notices:[],createSnackbarNotice:(e,t)=>{},removeSnackbarNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),E=()=>Object(n.useContext)(y),v=e=>{let{children:t,context:r="wc/core"}=e;const{createNotice:i,removeNotice:c}=Object(o.useDispatch)("core/notices"),[s,a]=Object(n.useState)(!1),{dispatchStoreEvent:l}=Object(b.a)(),{isEditor:u}=Object(g.a)(),d=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i("default",e,{...t,type:"snackbar",context:t.context||r}),l("store-notice-create",{status:"default",content:e,options:t})}),[i,l,r]),p=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;c(e,t)}),[c,r]),{notices:f}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(r)}),[r]),m={notices:f,createSnackbarNotice:d,removeSnackbarNotice:p,context:r,setIsSuppressed:a},E=s?null:Object(n.createElement)(h,{notices:m.notices,removeNotice:m.removeSnackbarNotice,isEditor:u});return Object(n.createElement)(y.Provider,{value:m},t,E)}},function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return l}));var n=r(0),o=(r(8),r(12)),i=r(4),c=r.n(i);const s=Object(n.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),a=()=>Object(n.useContext)(s),l=e=>{let{children:t,className:r=""}=e;const[i,a]=(()=>{const[e,{width:t}]=Object(o.useResizeObserver)();let r="";return t>700?r="is-large":t>520?r="is-medium":t>400?r="is-small":t&&(r="is-mobile"),[e,r]})(),l={hasContainerWidth:""!==a,containerClassName:a,isMobile:"is-mobile"===a,isSmall:"is-small"===a,isMedium:"is-medium"===a,isLarge:"is-large"===a};return Object(n.createElement)(s.Provider,{value:l},Object(n.createElement)("div",{className:c()(r,a)},i,t))}},,function(e,t,r){"use strict";var n=r(0),o=r(4),i=r.n(o),c=(r(8),r(212));r(164),t.a=e=>{let{children:t,className:r}=e;return Object(n.createElement)(c.a,{className:i()("wc-block-components-sidebar-layout",r)},t)}}]);
3
  Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(i.b)(e.priority)&&(t.index=e.priority),Object(i.d)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},a=Object.entries(c).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,s(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==a[r]?a[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,i=Object(n.useRef)(null),c=Object(n.useRef)(0),s=Object(n.useRef)(null),a=Object(n.useRef)([]),l=Object(n.useRef)(),u=Object(n.useRef)(),d=Object(n.useRef)(e),p=Object(n.useRef)(!0);d.current=e;var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var m=!!(r=r||{}).leading,h=!("trailing"in r)||!!r.trailing,b="maxWait"in r,g=b?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=a.current,r=l.current;return a.current=l.current=null,c.current=e,u.current=d.current.apply(r,t)},r=function(e,t){f&&cancelAnimationFrame(s.current),s.current=f?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-i.current,n=e-c.current;return!i.current||r>=t||r<0||b&&n>=g},y=function(t){return s.current=null,h&&a.current?e(t):(a.current=l.current=null,u.current)},E=function(){var e=Date.now();if(n(e))return y(e);if(p.current){var o=e-i.current,s=e-c.current,a=t-o,l=b?Math.min(a,g-s):a;r(E,l)}},v=function(){for(var d=[],f=0;f<arguments.length;f++)d[f]=arguments[f];var h=Date.now(),g=n(h);if(a.current=d,l.current=o,i.current=h,g){if(!s.current&&p.current)return c.current=i.current,r(E,t),m?e(i.current):u.current;if(b)return r(E,t),e(i.current)}return s.current||r(E,t),u.current};return v.cancel=function(){s.current&&(f?cancelAnimationFrame(s.current):clearTimeout(s.current)),c.current=0,a.current=i.current=l.current=s.current=null},v.isPending=function(){return!!s.current},v.flush=function(){return s.current?y(Date.now()):u.current},v}),[m,b,t,g,h,f])}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(10),o=r.n(n),i=r(0),c=r(16);const s=[".wp-block-woocommerce-cart"],a=e=>{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:s=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const a=n(e,r),l=s(e,r),u={...e.dataset,...a.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:s={},errorBoundaryProps:a={}}=e;Object(i.render)(Object(i.createElement)(c.a,a,Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(i.createElement)(t,o()({},s,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:a,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(s.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:i}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:i}=e;const c=document.body.querySelectorAll(o);i&&i.length>0&&Array.prototype.filter.call(c,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,i)),a({Block:t,containers:c,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:i,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:i}=e;const c=i.querySelectorAll(o);a({Block:t,containers:c,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},,function(e,t,r){"use strict";var n=r(7),o=r(0),i=r(4),c=r.n(i),s=r(5),a=r(30),l=r.n(a),u=r(12),d=r(60),p=r(90),f=r(1);function m(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const i=o.getBoundingClientRect();return new n.DOMRect(e.left+i.left,e.top+i.top,e.width,e.height)}let h=0;function b(e){const t=document.scrollingElement||document.body;e&&(h=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=h)}let g=0;function y(){return Object(o.useEffect)(()=>(0===g&&b(!0),++g,()=>{1===g&&b(!1),--g}),[]),null}var E=r(26);function v(e){const t=Object(o.useContext)(E.a),r=t.slots[e]||{},n=t.fills[e],i=Object(o.useMemo)(()=>n||[],[n]);return{...r,updateSlot:Object(o.useCallback)(r=>{t.updateSlot(e,r)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(r=>{t.unregisterSlot(e,r)},[e,t.unregisterSlot]),fills:i,registerFill:Object(o.useCallback)(r=>{t.registerFill(e,r)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(r=>{t.unregisterFill(e,r)},[e,t.unregisterFill])}}var O=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function _({name:e,children:t,registerFill:r,unregisterFill:n}){const i=(e=>{const{getSlot:t,subscribe:r}=Object(o.useContext)(O),[n,i]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(i(t(e)),r(()=>{i(t(e))})),[e]),n})(e),c=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(r(e,c.current),()=>n(e,c.current)),[]),Object(o.useLayoutEffect)(()=>{c.current.children=t,i&&i.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==c.current.name&&(n(c.current.name,c.current),c.current.name=e,r(e,c.current))},[e]),i&&i.node?(Object(s.isFunction)(t)&&(t=t(i.props.fillProps)),Object(o.createPortal)(t,i.node)):null}var S=e=>Object(o.createElement)(O.Consumer,null,({registerFill:t,unregisterFill:r})=>Object(o.createElement)(_,Object(n.a)({},e,{registerFill:t,unregisterFill:r})));class k extends o.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,i=Object(s.map)(n(t,this),e=>{const t=Object(s.isFunction)(e.children)?e.children(r):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(s.isString)(e))return e;const r=e.key||t;return Object(o.cloneElement)(e,{key:r})})}).filter(Object(s.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(s.isFunction)(e)?e(i):i)}}var j=e=>Object(o.createElement)(O.Consumer,null,({registerSlot:t,unregisterSlot:r,getFills:i})=>Object(o.createElement)(k,Object(n.a)({},e,{registerSlot:t,unregisterSlot:r,getFills:i})));function w(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function C({name:e,children:t}){const r=v(e),n=Object(o.useRef)({rerender:w()});return Object(o.useEffect)(()=>(r.registerFill(n),()=>{r.unregisterFill(n)}),[r.registerFill,r.unregisterFill]),r.ref&&r.ref.current?("function"==typeof t&&(t=t(r.fillProps)),Object(o.createPortal)(t,r.ref.current)):null}var R=Object(o.forwardRef)((function({name:e,fillProps:t={},as:r="div",...i},c){const s=Object(o.useContext)(E.a),a=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(s.registerSlot(e,a,t),()=>{s.unregisterSlot(e,a)}),[s.registerSlot,s.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{s.updateSlot(e,t)}),Object(o.createElement)(r,Object(n.a)({ref:Object(u.useMergeRefs)([c,a])},i))}));function T(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(S,e),Object(o.createElement)(C,e))}r(11),o.Component;const x=Object(o.forwardRef)(({bubblesVirtually:e,...t},r)=>e?Object(o.createElement)(R,Object(n.a)({},t,{ref:r})):Object(o.createElement)(j,t));function P(e){return"appear"===e?"top":"left"}function A(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:i}=(c=t).ownerDocument.defaultView.getComputedStyle(c);var c;const s=r?parseInt(r,10):0,a=n?parseInt(n,10):0,l=o?parseInt(o,10):0,u=i?parseInt(i,10):0;return{x:e.left+l,y:e.top+s,width:e.width-l-u,height:e.height-s-a,left:e.left+l,right:e.right-u,top:e.top+s,bottom:e.bottom-a}}function N(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function M(e,t,r=""){e.style[t]!==r&&(e.style[t]=r)}function I(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const D=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:r,className:i,noArrow:s=!0,isAlternate:a,position:h="bottom right",range:b,focusOnMount:g="firstElement",anchorRef:E,shouldAnchorIncludePadding:O,anchorRect:_,getAnchorRect:S,expandOnMobile:k,animate:j=!0,onClickOutside:w,onFocusOutside:C,__unstableStickyBoundaryElement:R,__unstableSlotName:x="Popover",__unstableObserveElement:D,__unstableBoundaryParent:L,__unstableForcePosition:F,__unstableForceXAlignment:V,...B},U)=>{const H=Object(o.useRef)(null),z=Object(o.useRef)(null),G=Object(o.useRef)(),q=Object(u.useViewportMatch)("medium","<"),[W,$]=Object(o.useState)(),X=v(x),K=k&&q,[J,Q]=Object(u.useResizeObserver)();s=K||s,Object(o.useLayoutEffect)(()=>{if(K)return I(G.current,"is-without-arrow",s),I(G.current,"is-alternate",a),N(G.current,"data-x-axis"),N(G.current,"data-y-axis"),M(G.current,"top"),M(G.current,"left"),M(z.current,"maxHeight"),void M(z.current,"maxWidth");const e=()=>{if(!G.current||!z.current)return;let e=function(e,t,r,n=!1,o,i){if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return m(t,t.ownerDocument||e.current.ownerDocument,i)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return m(Object(d.getRectangleFromRange)(n),n.endContainer.ownerDocument,i);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=m(n.getBoundingClientRect(),n.ownerDocument,i);return o?e:A(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),c=t.getBoundingClientRect(),s=m(new window.DOMRect(r.left,r.top,r.width,c.bottom-r.top),e.ownerDocument,i);return o?s:A(s,n)}if(!e.current)return;const{parentNode:c}=e.current,s=c.getBoundingClientRect();return o?s:A(s,c)}(H,_,S,E,O,G.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=G.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}var i;L&&(n=null===(i=G.current.closest(".popover-slot"))||void 0===i?void 0:i.parentNode);const c=Q.height?Q:z.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:p,yAxis:b,contentHeight:g,contentWidth:y}=function(e,t,r="top",n,o,i,c,s,a){const[l,u="center",d]=r.split(" "),p=function(e,t,r,n,o,i,c,s){const{height:a}=t;if(o){const t=o.getBoundingClientRect().top+a-c;if(e.top<=t)return{yAxis:r,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===n?l=e.bottom:"top"===n&&(l=e.top);const u={popoverTop:l,contentHeight:(l-a/2>0?a/2:l)+(l+a/2>window.innerHeight?window.innerHeight-l:a/2)},d={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a};let f,m=r,h=null;if(!o&&!s)if("middle"===r&&u.contentHeight===a)m="middle";else if("top"===r&&d.contentHeight===a)m="top";else if("bottom"===r&&p.contentHeight===a)m="bottom";else{m=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===m?d.contentHeight:p.contentHeight;h=e!==a?e:null}return f="middle"===m?u.popoverTop:"top"===m?d.popoverTop:p.popoverTop,{yAxis:m,popoverTop:f,contentHeight:h}}(e,t,l,d,n,0,i,s);return{...function(e,t,r,n,o,i,c,s,a){const{width:l}=t;"left"===r&&Object(f.isRTL)()?r="right":"right"===r&&Object(f.isRTL)()&&(r="left"),"left"===n&&Object(f.isRTL)()?n="right":"right"===n&&Object(f.isRTL)()&&(n="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===n?p=e.right:"middle"===i||a||(p=u);let m=e.right;"left"===n?m=e.left:"middle"===i||a||(m=u);const h={popoverLeft:p,contentWidth:p-l>0?l:p},b={popoverLeft:m,contentWidth:m+l>window.innerWidth?window.innerWidth-m:l};let g,y=r,E=null;if(!o&&!s)if("center"===r&&d.contentWidth===l)y="center";else if("left"===r&&h.contentWidth===l)y="left";else if("right"===r&&b.contentWidth===l)y="right";else{y=h.contentWidth>b.contentWidth?"left":"right";const e="left"===y?h.contentWidth:b.contentWidth;l>window.innerWidth&&(E=window.innerWidth),e!==l&&(y="center",d.popoverLeft=window.innerWidth/2)}if(g="center"===y?d.popoverLeft:"left"===y?h.popoverLeft:b.popoverLeft,c){const e=c.getBoundingClientRect();g=Math.min(g,e.right-l),Object(f.isRTL)()||(g=Math.max(g,0))}return{xAxis:y,popoverLeft:g,contentWidth:E}}(e,t,u,d,n,p.yAxis,c,s,a),...p}}(e,c,h,R,G.current,o,n,F,V);"number"==typeof l&&"number"==typeof u&&(M(G.current,"top",l+"px"),M(G.current,"left",u+"px")),I(G.current,"is-without-arrow",s||"center"===p&&"middle"===b),I(G.current,"is-alternate",a),N(G.current,"data-x-axis",p),N(G.current,"data-y-axis",b),M(z.current,"maxHeight","number"==typeof g?g+"px":""),M(z.current,"maxWidth","number"==typeof y?y+"px":""),$(({left:"right",right:"left"}[p]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))};e();const{ownerDocument:t}=G.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const i=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",i),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const c=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(E);let l;return c&&c!==t&&(c.defaultView.addEventListener("resize",e),c.defaultView.addEventListener("scroll",e,!0)),D&&(l=new r.MutationObserver(e),l.observe(D,{attributes:!0})),()=>{r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",i),r.cancelAnimationFrame(o),c&&c!==t&&(c.defaultView.removeEventListener("resize",e),c.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}},[K,_,S,E,O,h,Q,R,D,L]);const Z=(e,r)=>{if("focus-outside"===e&&C)C(r);else if("focus-outside"===e&&w){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>r.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),w(e)}else t&&t()},[ee,te]=Object(u.__experimentalUseDialog)({focusOnMount:g,__unstableOnClose:Z,onClose:Z}),re=Object(u.useMergeRefs)([G,ee,U]),ne=Boolean(j&&W)&&function(e){if("loading"===e.type)return c()("components-animate__loading");const{type:t,origin:r=P(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return c()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?c()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:W});let oe=Object(o.createElement)("div",Object(n.a)({className:c()("components-popover",i,ne,{"is-expanded":K,"is-without-arrow":s,"is-alternate":a})},B,{ref:re},te,{tabIndex:"-1"}),K&&Object(o.createElement)(y,null),K&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(Y,{className:"components-popover__close",icon:p.a,onClick:t})),Object(o.createElement)("div",{ref:z,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},J,r)));return X.ref&&(oe=Object(o.createElement)(T,{name:x},oe)),E||_?oe:Object(o.createElement)("span",{ref:H},oe)});D.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(x,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var L=D,F=function({shortcut:e,className:t}){if(!e)return null;let r,n;return Object(s.isString)(e)&&(r=e),Object(s.isObject)(e)&&(r=e.display,n=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":n},r)};const V=Object(o.createElement)("div",{className:"event-catcher"}),B=({eventHandlers:e,child:t,childrenWithPopover:r})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(V,e),Object(o.cloneElement)(t,{children:r}),","),e),U=({child:e,eventHandlers:t,childrenWithPopover:r})=>Object(o.cloneElement)(e,{...t,children:r}),H=(e,t,r)=>{if(1!==o.Children.count(e))return;const n=o.Children.only(e);"function"==typeof n.props[t]&&n.props[t](r)};var z=function({children:e,position:t,text:r,shortcut:n}){const[i,c]=Object(o.useState)(!1),[a,l]=Object(o.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{H(e,"onMouseDown",t),document.addEventListener("mouseup",h),c(!0)},f=t=>{H(e,"onMouseUp",t),document.removeEventListener("mouseup",h),c(!1)},m=e=>"mouseUp"===e?f:"mouseDown"===e?p:void 0,h=m("mouseUp"),b=(t,r)=>n=>{if(H(e,t,n),n.currentTarget.disabled)return;if("focus"===n.type&&i)return;d.cancel();const o=Object(s.includes)(["focus","mouseenter"],n.type);o!==a&&(r?d(o):l(o))},g=()=>{d.cancel(),document.removeEventListener("mouseup",h)};if(Object(o.useEffect)(()=>g,[]),1!==o.Children.count(e))return e;const y={onMouseEnter:b("onMouseEnter",!0),onMouseLeave:b("onMouseLeave"),onClick:b("onClick"),onFocus:b("onFocus"),onBlur:b("onBlur"),onMouseDown:m("mouseDown")},E=o.Children.only(e),{children:v,disabled:O}=E.props;return(O?B:U)({child:E,eventHandlers:y,childrenWithPopover:(({grandchildren:e,isOver:t,position:r,text:n,shortcut:i})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(L,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(o.createElement)(F,{className:"components-tooltip__shortcut",shortcut:i}))))({grandchildren:v,isOver:a,position:t,text:r,shortcut:n})})},G=r(46),q=r(47);const W=["onMouseDown","onClick"];var Y=t.a=Object(o.forwardRef)((function(e,t){const{href:r,target:i,isSmall:a,isPressed:u,isBusy:d,isDestructive:p,className:f,disabled:m,icon:h,iconPosition:b="left",iconSize:g,showTooltip:y,tooltipPosition:E,shortcut:v,label:O,children:_,text:S,variant:k,__experimentalIsFocusable:j,describedBy:w,...C}=function({isDefault:e,isPrimary:t,isSecondary:r,isTertiary:n,isLink:o,variant:i,...c}){let s=i;var a,u,d,p,f;return t&&(null!==(a=s)&&void 0!==a||(s="primary")),n&&(null!==(u=s)&&void 0!==u||(s="tertiary")),r&&(null!==(d=s)&&void 0!==d||(s="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=s)&&void 0!==p||(s="secondary")),o&&(null!==(f=s)&&void 0!==f||(s="link")),{...c,variant:s}}(e),R=c()("components-button",f,{"is-secondary":"secondary"===k,"is-primary":"primary"===k,"is-small":a,"is-tertiary":"tertiary"===k,"is-pressed":u,"is-busy":d,"is-link":"link"===k,"is-destructive":p,"has-text":!!h&&!!_,"has-icon":!!h}),T=m&&!j,x=void 0===r||T?"button":"a",P="a"===x?{href:r,target:i}:{type:"button",disabled:T,"aria-pressed":u};if(m&&j){P["aria-disabled"]=!0;for(const e of W)C[e]=e=>{e.stopPropagation(),e.preventDefault()}}const A=!T&&(y&&O||v||!!O&&(!_||Object(s.isArray)(_)&&!_.length)&&!1!==y),N=w?Object(s.uniqueId)():null,M=C["aria-describedby"]||N,I=Object(o.createElement)(x,Object(n.a)({},P,C,{className:R,"aria-label":C["aria-label"]||O,"aria-describedby":M,ref:t}),h&&"left"===b&&Object(o.createElement)(G.a,{icon:h,size:g}),S&&Object(o.createElement)(o.Fragment,null,S),h&&"right"===b&&Object(o.createElement)(G.a,{icon:h,size:g}),_);return A?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(z,{text:w||O,shortcut:v,position:E},I),w&&Object(o.createElement)(q.a,null,Object(o.createElement)("span",{id:N},w))):Object(o.createElement)(o.Fragment,null,I,w&&Object(o.createElement)(q.a,null,Object(o.createElement)("span",{id:N},w)))}))},function(e,t,r){var n=r(76),o=r(58),i=o.setStyleProp,c=n.html,s=n.svg,a=n.isCustomAttribute,l=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,u;e=e||{};var d={};for(t in e)n=e[t],a(t)?d[t]=n:(r=t.toLowerCase(),l.call(c,r)?d[(u=c[r]).propertyName]=!!(u.hasBooleanValue||u.hasOverloadedBooleanValue&&!n)||n:l.call(s,t)?d[(u=s[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return i(e.style,d),d}},function(e,t,r){var n=r(3),o=r(80).default,i={reactCompat:!0},c=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:c,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,i={},c={};for(r in e)n=e[r],o&&(i=t(r,n))&&2===i.length?c[i[0]]=i[1]:"string"==typeof n&&(c[n]=r);return c},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,i))}}},function(e,t,r){for(var n,o=r(86).CASE_SENSITIVE_TAG_NAMES,i={},c=0,s=o.length;c<s;c++)n=o[c],i[n.toLowerCase()]=n;function a(e){for(var t,r={},n=0,o=e.length;n<o;n++)r[(t=e[n]).name]=t.value;return r}function l(e){return function(e){return i[e]}(e=e.toLowerCase())||e}e.exports={formatAttributes:a,formatDOM:function e(t,r,n){r=r||null;for(var o,i,c,s=[],u=0,d=t.length;u<d;u++){switch(o=t[u],c={next:null,prev:s[u-1]||null,parent:r},(i=s[u-1])&&(i.next=c),"#"!==o.nodeName[0]&&(c.name=l(o.nodeName),c.attribs={},o.attributes&&o.attributes.length&&(c.attribs=a(o.attributes))),o.nodeType){case 1:"script"===c.name||"style"===c.name?c.type=c.name:c.type="tag",c.children=e(o.childNodes,c);break;case 3:c.type="text",c.data=o.nodeValue;break;case 8:c.type="comment",c.data=o.nodeValue}s.push(c)}return n&&(s.unshift({name:n.substring(0,n.indexOf(" ")).toLowerCase(),data:n,type:"directive",next:s[0]?s[0]:null,prev:null,parent:r}),s[1]&&(s[1].prev=s[0])),s},isIE:function(e){return e?document.documentMode===e:/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},function(e,t){e.exports=window.wp.dom},function(e,t,r){var n=r(75),o=r(57),i=r(84),c={decodeEntities:!0,lowerCaseAttributeNames:!1};function s(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(i(e,(t=t||{}).htmlparser2||c),t)}s.domToReact=n,s.htmlToDOM=i,s.attributesToProps=o,e.exports=s,e.exports.default=s},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},,,function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:c}catch(e){n=c}}();var a,l=[],u=!1,d=-1;function p(){u&&a&&(u=!1,a.length?l=a.concat(l):d=-1,l.length&&f())}function f(){if(!u){var e=s(p);u=!0;for(var t=l.length;t;){for(a=l,l=[];++d<t;)a&&a[d].run();d=-1,t=l.length}a=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===c||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new m(e,t)),1!==l.length||u||s(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){"use strict";r.d(t,"n",(function(){return i})),r.d(t,"l",(function(){return c})),r.d(t,"k",(function(){return s})),r.d(t,"m",(function(){return a})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return f})),r.d(t,"e",(function(){return m})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return b})),r.d(t,"h",(function(){return g})),r.d(t,"b",(function(){return y}));var n,o=r(2);const i=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),c=i.pluginUrl+"images/",s=i.pluginUrl+"build/",a=i.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),f=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),h=Object(o.getSetting)("shippingCountries",{}),b=Object(o.getSetting)("allowedCountries",{}),g=Object(o.getSetting)("shippingStates",{}),y=Object(o.getSetting)("allowedStates",{})},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"c",(function(){return c})),r.d(t,"b",(function(){return s}));const n=window.CustomEvent||null,o=(e,t)=>{let{bubbles:r=!1,cancelable:o=!1,element:i,detail:c={}}=t;if(!n)return;i||(i=document.body);const s=new n(e,{bubbles:r,cancelable:o,detail:c});i.dispatchEvent(s)};let i;const c=()=>{i&&clearTimeout(i),i=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const i=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,i),()=>jQuery(document).off(e,i)}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>e.reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})},function(e,t,r){"use strict";var n=r(10),o=r.n(n),i=r(0);r(101);const c=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const r=Object(i.useRef)(null);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),Object(i.createElement)(e,o()({},t,{scrollToTop:e=>{null!==r.current&&((e,t)=>{const{focusableSelector:r}=t||{};window&&Number.isFinite(window.innerHeight)&&(r?((e,t)=>{var r;const n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){const e=n[0];c(e),null==e||e.focus()}else c(e)})(e,r):c(e))})(r.current,e)}})))}},,,function(e,t){},function(e,t,r){var n=r(3),o=r(57),i=r(58),c=i.setStyleProp;function s(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&i.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var i,a,l,u,d=(r=r||{}).library||n,p=d.cloneElement,f=d.createElement,m=d.isValidElement,h=[],b="function"==typeof r.replace,g=r.trim,y=0,E=t.length;y<E;y++)if(i=t[y],b&&m(a=r.replace(i)))E>1&&(a=p(a,{key:a.key||y})),h.push(a);else if("text"!==i.type){switch(l=i.attribs,s(i)?c(l.style,l):l&&(l=o(l)),u=null,i.type){case"script":case"style":i.children[0]&&(l.dangerouslySetInnerHTML={__html:i.children[0].data});break;case"tag":"textarea"===i.name&&i.children[0]?l.defaultValue=i.children[0].data:i.children&&i.children.length&&(u=e(i.children,r));break;default:continue}E>1&&(l.key=y),h.push(f(i.name,l,u))}else g?i.data.trim()&&h.push(i.data):h.push(i.data);return 1===h.length?h[0]:h}},function(e,t,r){var n=r(77),o=r(78),i=r(79),c=i.MUST_USE_PROPERTY,s=i.HAS_BOOLEAN_VALUE,a=i.HAS_NUMERIC_VALUE,l=i.HAS_POSITIVE_NUMERIC_VALUE,u=i.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function p(e,t,r){var n,o,i,p=e.Properties,f=e.DOMAttributeNames;for(o in p)n=f[o]||(r?o:o.toLowerCase()),i=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(i,c),hasBooleanValue:d(i,s),hasNumericValue:d(i,a),hasPositiveNumericValue:d(i,l),hasOverloadedBooleanValue:d(i,u)}}var f={};p(n,f);var m={};p(o,m,!0);var h={};p(n,h),p(o,h,!0),e.exports={html:f,svg:m,properties:h,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(81)),i=r(83);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[i.camelCase(e,t)]=n)})),r):r}},function(e,t,r){var n=r(82);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var i,c,s=n(e),a="function"==typeof t,l=0,u=s.length;l<u;l++)i=(r=s[l]).property,c=r.value,a?t(i,c,r):c&&(o||(o={}),o[i]=c);return o}},function(e,t){var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,c=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e){return e?e.replace(l,""):""}e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var l=1,d=1;function p(e){var t=e.match(n);t&&(l+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function f(){var e={line:l,column:d};return function(t){return t.position=new m(e),y(),t}}function m(e){this.start=e,this.end={line:l,column:d},this.source=t.source}m.prototype.content=e;var h=[];function b(r){var n=new Error(t.source+":"+l+":"+d+": "+r);if(n.reason=r,n.filename=t.source,n.line=l,n.column=d,n.source=e,!t.silent)throw n;h.push(n)}function g(t){var r=t.exec(e);if(r){var n=r[0];return p(n),e=e.slice(n.length),r}}function y(){g(o)}function E(e){var t;for(e=e||[];t=v();)!1!==t&&e.push(t);return e}function v(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;""!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return b("End of comment missing");var n=e.slice(2,r-2);return d+=2,p(n),e=e.slice(r),d+=2,t({type:"comment",comment:n})}}function O(){var e=f(),t=g(i);if(t){if(v(),!g(c))return b("property missing ':'");var n=g(s),o=e({type:"declaration",property:u(t[0].replace(r,"")),value:n?u(n[0].replace(r,"")):""});return g(a),o}}return y(),function(){var e,t=[];for(E(t);e=O();)!1!==e&&(t.push(e),E(t));return t}()}},function(e,t,r){"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,o=/-([a-z])/g,i=/^[^-]+$/,c=/^-(webkit|moz|ms|o|khtml)-/,s=function(e,t){return t.toUpperCase()},a=function(e,t){return t+"-"};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||i.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),t.reactCompat||(e=e.replace(c,a)),e.replace(o,s))}},function(e,t,r){var n=r(85),o=r(59),i=o.formatDOM,c=o.isIE(9),s=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(s);return r&&r[1]&&(t=r[1],c&&(e=e.replace(r[0],""))),i(n(e),null,t)}},function(e,t,r){var n=r(59),o=/<([a-zA-Z]+[0-9]?)/,i=/<head.*>/i,c=/<body.*>/i,s=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,a=n.isIE(9),l=a||n.isIE(),u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,f=a?"text/xml":"text/html";u=d=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),a&&(e=e.replace(s,"<$1$2$3/>")),p.parseFromString(e,f)}}if(document.implementation){var m=document.implementation.createHTMLDocument(l?"html-dom-parser":void 0);u=function(e,t){if(t)return m.documentElement.getElementsByTagName(t)[0].innerHTML=e,m;try{return m.documentElement.innerHTML=e,m}catch(t){if(d)return d(e)}}}var h,b=document.createElement("template");b.content&&(h=function(e){return b.innerHTML=e,b.content.childNodes}),e.exports=function(e){var t,r,n,s,a=e.match(o);switch(a&&a[1]&&(t=a[1].toLowerCase()),t){case"html":return r=d(e),i.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),c.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return s=u(e).getElementsByTagName(t),c.test(e)&&i.test(e)?s[0].parentNode.childNodes:s;default:return h?h(e):u(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return b}));var n=r(0),o=(r(8),r(9)),i=r(38),c=r(18),s=r(10),a=r.n(s),l=r(4),u=r.n(l),d=r(116);r(74);const p=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""};var f=e=>{let{className:t,notices:r,removeNotice:o}=e;const i=r.filter(e=>"snackbar"!==e.type);if(!i.length)return null;const c=u()(t,"wc-block-components-notices");return Object(n.createElement)("div",{className:c},i.map(e=>Object(n.createElement)(d.a,a()({key:"store-notice-"+e.id},e,{className:u()("wc-block-components-notices__notice",p(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const m=Object(n.createContext)({notices:[],createNotice:(e,t,r)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),h=()=>Object(n.useContext)(m),b=e=>{let{children:t,className:r="",createNoticeContainer:s=!0,context:a="wc/core"}=e;const{createNotice:l,removeNotice:u}=Object(o.useDispatch)("core/notices"),[d,p]=Object(n.useState)(!1),{dispatchStoreEvent:h}=Object(i.a)(),{isEditor:b}=Object(c.a)(),g=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};l(e,t,{...r,context:r.context||a}),h("store-notice-create",{status:e,content:t,options:r})}),[l,h,a]),y=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;u(e,t)}),[u,a]),{notices:E}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(a)}),[a]),v={notices:E,createNotice:g,removeNotice:y,context:a,setIsSuppressed:p},O=d?null:Object(n.createElement)(f,{className:r,notices:v.notices,removeNotice:v.removeNotice,isEditor:b});return Object(n.createElement)(m.Provider,{value:v},s&&O,t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},i=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return s}));var n=r(5);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const i={addEventCallback:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(n.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},c={},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,{type:t,eventType:r,id:n,callback:i,priority:s}=arguments.length>1?arguments[1]:void 0;const a=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return a.set(n,{priority:s,callback:i}),{...e,[r]:a};case o.REMOVE_EVENT_CALLBACK:return a.delete(n),{...e,[r]:a}}}},function(e,t,r){"use strict";var n=r(0),o=r(24);const i=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=i},function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(10)),i=n(r(120)),c=r(3),s=n(c),a=n(r(121)),l=n(r(123)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var r;for(r in e)if(!(r in t))return!1;for(r in t)if(e[r]!==t[r])return!1;return!u.und(r)||e===t}};function d(){var e=c.useState(!1)[1];return c.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function m(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return u.fun(e)?e.apply(void 0,r):e}function h(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,i(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var r=Object.keys(e).reduce((function(r,n){var i;return u.und(t[n])?o({},r,((i={})[n]=e[n],i)):r}),{});return o({to:t},r)}var b,g,y=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),E=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof y&&e.addChild(l(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof y&&e.removeChild(l(t))}))},t}return a(t,e),t}(y),v=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof y&&e.addChild(l(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof y&&e.removeChild(l(t))}))},t}a(t,e);var r=t.prototype;return r.getValue=function(e){void 0===e&&(e=!1);var t={};for(var r in this.payload){var n=this.payload[r];(!e||n instanceof y)&&(t[r]=n instanceof y?n[e?"getAnimatedValue":"getValue"]():n)}return t},r.getAnimatedValue=function(){return this.getValue(!0)},t}(y);function O(e,t){b={fn:e,transform:t}}function _(e){g=e}var S,k=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},j=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function w(e){S=e}var C,R=function(){return Date.now()};function T(e){C=e}var x,P,A=function(e){return e.current};function N(e){x=e}var M=Object.freeze({get applyAnimatedValues(){return b},injectApplyAnimatedValues:O,get colorNames(){return g},injectColorNames:_,get requestFrame(){return k},get cancelFrame(){return j},injectFrame:function(e,t){k=e,j=t},get interpolation(){return S},injectStringInterpolator:w,get now(){return R},injectNow:function(e){R=e},get defaultElement(){return C},injectDefaultElement:T,get animatedApi(){return A},injectAnimatedApi:function(e){A=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:N,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),I=function(e){function t(t,r){var n;return(n=e.call(this)||this).update=void 0,n.payload=t.style?o({},t,{style:x(t.style)}):t,n.update=r,n.attach(),n}return a(t,e),t}(v),D=!1,L=new Set,F=function e(){if(!D)return!1;var t=R(),r=L,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var i;if(n){if(o>=r.length)break;i=r[o++]}else{if((o=r.next()).done)break;i=o.value}for(var c=i,s=!1,a=0;a<c.configs.length;a++){for(var l=c.configs[a],u=void 0,d=void 0,p=0;p<l.animatedValues.length;p++){var f=l.animatedValues[p];if(!f.done){var m=l.fromValues[p],h=l.toValues[p],b=f.lastPosition,g=h instanceof y,E=Array.isArray(l.initialVelocity)?l.initialVelocity[p]:l.initialVelocity;if(g&&(h=h.getValue()),l.immediate)f.setValue(h),f.done=!0;else if("string"!=typeof m&&"string"!=typeof h){if(void 0!==l.duration)b=m+l.easing((t-f.startTime)/l.duration)*(h-m),u=t>=f.startTime+l.duration;else if(l.decay)b=m+E/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-b)<.1)&&(h=b);else{d=void 0!==f.lastTime?f.lastTime:t,E=void 0!==f.lastVelocity?f.lastVelocity:l.initialVelocity,t>d+64&&(d=t);for(var v=Math.floor(t-d),O=0;O<v;++O)b+=1*(E+=(-l.tension*(b-h)+-l.friction*E)/l.mass*1/1e3)/1e3;var _=!(!l.clamp||0===l.tension)&&(m<h?b>h:b<h),S=Math.abs(E)<=l.precision,j=0===l.tension||Math.abs(h-b)<=l.precision;u=_||S&&j,f.lastVelocity=E,f.lastTime=t}g&&!l.toValues[p].done&&(u=!1),u?(f.value!==h&&(b=h),f.done=!0):s=!0,f.setValue(b),f.lastPosition=b}else f.setValue(h),f.done=!0}}c.props.onFrame&&(c.values[l.name]=l.interpolation.getValue())}c.props.onFrame&&c.props.onFrame(c.values),s||(L.delete(c),c.stop(!0))}return L.size?P?P():k(e):D=!1,D};function V(e,t,r){if("function"==typeof e)return e;if(Array.isArray(e))return V({range:e,output:t,extrapolate:r});if(S&&"string"==typeof e.output[0])return S(e);var n=e,o=n.output,i=n.range||[0,1],c=n.extrapolateLeft||n.extrapolate||"extend",s=n.extrapolateRight||n.extrapolate||"extend",a=n.easing||function(e){return e};return function(e){var t=function(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}(e,i);return function(e,t,r,n,o,i,c,s,a){var l=a?a(e):e;if(l<t){if("identity"===c)return l;"clamp"===c&&(l=t)}if(l>r){if("identity"===s)return l;"clamp"===s&&(l=r)}return n===o?n:t===r?e<=t?n:o:(t===-1/0?l=-l:r===1/0?l-=t:l=(l-t)/(r-t),l=i(l),n===-1/0?l=-l:o===1/0?l+=n:l=l*(o-n)+n,l)}(e,i[t],i[t+1],o[t],o[t+1],a,c,s,n.map)}}var B=function(e){function t(r,n,o,i){var c;return(c=e.call(this)||this).calc=void 0,c.payload=r instanceof E&&!(r instanceof t)?r.getPayload():Array.isArray(r)?r:[r],c.calc=V(n,o,i),c}a(t,e);var r=t.prototype;return r.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},r.updateConfig=function(e,t,r){this.calc=V(e,t,r)},r.interpolate=function(e,r,n){return new t(this,e,r,n)},t}(E),U=function(e){function t(t){var r;return(r=e.call(this)||this).animatedStyles=new Set,r.value=void 0,r.startPosition=void 0,r.lastPosition=void 0,r.lastVelocity=void 0,r.startTime=void 0,r.lastTime=void 0,r.done=!1,r.setValue=function(e,t){void 0===t&&(t=!0),r.value=e,t&&r.flush()},r.value=t,r.startPosition=t,r.lastPosition=t,r}a(t,e);var r=t.prototype;return r.flush=function(){0===this.animatedStyles.size&&function e(t,r){"update"in t?r.add(t):t.getChildren().forEach((function(t){return e(t,r)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},r.clearStyles=function(){this.animatedStyles.clear()},r.getValue=function(){return this.value},r.interpolate=function(e,t,r){return new B(this,e,t,r)},t}(y),H=function(e){function t(t){var r;return(r=e.call(this)||this).payload=t.map((function(e){return new U(e)})),r}a(t,e);var r=t.prototype;return r.setValue=function(e,t){var r=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,n){return r.payload[n].setValue(e,t)})):this.payload.forEach((function(r){return r.setValue(e,t)}))},r.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},r.interpolate=function(e,t){return new B(this,e,t)},t}(E),z=0,G=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=z++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),r=t.delay,n=void 0===r?0:r,c=t.to,s=i(t,["delay","to"]);if(u.arr(c)||u.fun(c))this.queue.push(o({},s,{delay:n,to:c}));else if(c){var a={};Object.entries(c).forEach((function(e){var t,r=e[0],i=e[1],c=o({to:(t={},t[r]=i,t),delay:m(n,r)},s),l=a[c.delay]&&a[c.delay].to;a[c.delay]=o({},a[c.delay],c,{to:o({},l,c.to)})})),this.queue=Object.values(a)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(s),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var r=e.from,n=void 0===r?{}:r,i=e.to,c=void 0===i?{}:i;u.obj(n)&&(t.merged=o({},n,t.merged)),u.obj(c)&&(t.merged=o({},t.merged,c))}));var r=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach((function(o,c){var s=o.delay,a=i(o,["delay"]),l=function(o){c===n.length-1&&r===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(a.to)||u.fun(a.to);s?setTimeout((function(){r===t.guid&&(d?t.runAsync(a,l):t.diff(a).start(l))}),s):d?t.runAsync(a,l):t.diff(a).start(l)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),D||(D=!0,k(P||F));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var r=this,n=(e.delay,i(e,["delay"])),c=this.local,s=Promise.resolve(void 0);if(u.arr(n.to))for(var a=function(e){var t=e,i=o({},n,h(n.to[t]));u.arr(i.config)&&(i.config=i.config[t]),s=s.then((function(){if(c===r.guid)return new Promise((function(e){return r.diff(i).start(e)}))}))},l=0;l<n.to.length;l++)a(l);else if(u.fun(n.to)){var d,p=0;s=s.then((function(){return n.to((function(e){var t=o({},n,h(e));if(u.arr(t.config)&&(t.config=t.config[p]),p++,c===r.guid)return d=new Promise((function(e){return r.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),r.stop(e)})).then((function(){return d}))}))}s.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var r=this.props,n=r.from,i=void 0===n?{}:n,c=r.to,s=void 0===c?{}:c,a=r.config,l=void 0===a?{}:a,d=r.reverse,h=r.attach,b=r.reset,y=r.immediate;if(d){var E=[s,i];i=E[0],s=E[1]}this.merged=o({},i,this.merged,s),this.hasChanged=!1;var v=h&&h(this);if(this.animations=Object.entries(this.merged).reduce((function(e,r){var n=r[0],c=r[1],s=e[n]||{},a=u.num(c),d=u.str(c)&&!c.startsWith("#")&&!/\d/.test(c)&&!g[c],h=u.arr(c),E=!a&&!h&&!d,O=u.und(i[n])?c:i[n],_=a||h||d?c:1,k=m(l,n);v&&(_=v.animations[n].parent);var j,w=s.parent,C=s.interpolation,T=f(v?_.getPayload():_),x=c;E&&(x=S({range:[0,1],output:[c,c]})(1));var P,A=C&&C.getValue(),N=!u.und(w)&&s.animatedValues.some((function(e){return!e.done})),M=!u.equ(x,A),I=!u.equ(x,s.previous),D=!u.equ(k,s.config);if(b||I&&M||D){var L;if(a||d)w=C=s.parent||new U(O);else if(h)w=C=s.parent||new H(O);else if(E){var F=s.interpolation&&s.interpolation.calc(s.parent.value);F=void 0===F||b?O:F,s.parent?(w=s.parent).setValue(0,!1):w=new U(0);var V={output:[F,c]};s.interpolation?(C=s.interpolation,s.interpolation.updateConfig(V)):C=w.interpolate(V)}return T=f(v?_.getPayload():_),j=f(w.getPayload()),b&&!E&&w.setValue(O,!1),t.hasChanged=!0,j.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=N?e.lastVelocity:void 0,e.lastTime=N?e.lastTime:void 0,e.startTime=R(),e.done=!1,e.animatedStyles.clear()})),m(y,n)&&w.setValue(E?_:c,!1),o({},e,((L={})[n]=o({},s,{name:n,parent:w,interpolation:C,animatedValues:j,toValues:T,previous:x,config:k,fromValues:f(w.getValue()),immediate:m(y,n),initialVelocity:p(k.velocity,0),clamp:p(k.clamp,!1),precision:p(k.precision,.01),tension:p(k.tension,170),friction:p(k.friction,26),mass:p(k.mass,1),duration:k.duration,easing:p(k.easing,(function(e){return e})),decay:k.decay}),L))}return M?e:(E&&(w.setValue(1,!1),C.updateConfig({output:[x,x]})),w.done=!0,t.hasChanged=!0,o({},e,((P={})[n]=o({},e[n],{previous:x}),P)))}),this.animations),this.hasChanged)for(var O in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[O]=this.animations[O].interpolation,this.values[O]=this.animations[O].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),q=function(e,t){var r=c.useRef(!1),n=c.useRef(),o=u.fun(t),i=c.useMemo((function(){var r;return n.current&&(n.current.map((function(e){return e.destroy()})),n.current=void 0),[new Array(e).fill().map((function(e,n){var i=new G,c=o?m(t,n,i):t[n];return 0===n&&(r=c.ref),i.update(c),r||i.start(),i})),r]}),[e]),s=i[0],a=i[1];n.current=s,c.useImperativeHandle(a,(function(){return{start:function(){return Promise.all(n.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return n.current.forEach((function(t){return t.stop(e)}))},get controllers(){return n.current}}}));var l=c.useMemo((function(){return function(e){return n.current.map((function(t,r){t.update(o?m(e,r,t):e[r]),a||t.start()}))}}),[e]);c.useEffect((function(){r.current?o||l(t):a||n.current.forEach((function(e){return e.start()}))})),c.useEffect((function(){return r.current=!0,function(){return n.current.forEach((function(e){return e.destroy()}))}}),[]);var d=n.current.map((function(e){return e.getValues()}));return o?[d,l,function(e){return n.current.forEach((function(t){return t.pause(e)}))}]:d},W=0,Y=function(e,t){return("function"==typeof t?e.map(t):f(t)).map(String)},$=function(e){var t=e.items,r=e.keys,n=void 0===r?function(e){return e}:r,c=i(e,["items","keys"]);return t=f(void 0!==t?t:null),o({items:t,keys:Y(t,n)},c)};function X(e,t){var r=function(){if(o){if(i>=n.length)return"break";c=n[i++]}else{if((i=n.next()).done)return"break";c=i.value}var r=c.key,s=function(e){return e.key!==r};(u.und(t)||t===r)&&(e.current.instances.delete(r),e.current.transitions=e.current.transitions.filter(s),e.current.deleted=e.current.deleted.filter(s))},n=e.current.deleted,o=Array.isArray(n),i=0;for(n=o?n:n[Symbol.iterator]();;){var c;if("break"===r())break}e.current.forceUpdate()}var K=function(e){function t(t){var r;return void 0===t&&(t={}),r=e.call(this)||this,!t.transform||t.transform instanceof y||(t=b.transform(t)),r.payload=t,r}return a(t,e),t}(v),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Q="[-+]?\\d*\\.?\\d+";function Z(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+Z(Q,Q,Q)),te=new RegExp("rgba"+Z(Q,Q,Q,Q)),re=new RegExp("hsl"+Z(Q,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),ne=new RegExp("hsla"+Z(Q,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Q)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{6})$/,se=/^#([0-9a-fA-F]{8})$/;function ae(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function le(e,t,r){var n=r<.5?r*(1+t):r+t-r*t,o=2*r-n,i=ae(o,n,e+1/3),c=ae(o,n,e),s=ae(o,n,e-1/3);return Math.round(255*i)<<24|Math.round(255*c)<<16|Math.round(255*s)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,r,n="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(r=ce.exec(t))?parseInt(r[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(r=ee.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|255)>>>0:(r=te.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|pe(r[4]))>>>0:(r=oe.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=se.exec(t))?parseInt(r[1],16)>>>0:(r=ie.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=re.exec(t))?(255|le(de(r[1]),fe(r[2]),fe(r[3])))>>>0:(r=ne.exec(t))?(le(de(r[1]),fe(r[2]),fe(r[3]))|pe(r[4]))>>>0:null;return null===n?e:"rgba("+((4278190080&(n=n||0))>>>24)+", "+((16711680&n)>>>16)+", "+((65280&n)>>>8)+", "+(255&n)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,be=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(J).join("|")+")","g"),ye={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ee=["Webkit","Ms","Moz","O"];function ve(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||ye.hasOwnProperty(e)&&ye[e]?(""+t).trim():t+"px"}ye=Object.keys(ye).reduce((function(e,t){return Ee.forEach((function(r){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(r,t)]=e[t]})),e}),ye);var Oe={};N((function(e){return new K(e)})),T("div"),w((function(e){var t=e.output.map((function(e){return e.replace(be,me)})).map((function(e){return e.replace(ge,me)})),r=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return r[t].push(+e)}))}));var n=t[0].match(he).map((function(t,n){return V(o({},e,{output:r[n]}))}));return function(e){var r=0;return t[0].replace(he,(function(){return n[r++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,r,n,o){return"rgba("+Math.round(t)+", "+Math.round(r)+", "+Math.round(n)+", "+o+")"}))}})),_(J),O((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var r=t.style,n=t.children,o=t.scrollTop,c=t.scrollLeft,s=i(t,["style","children","scrollTop","scrollLeft"]),a="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==o&&(e.scrollTop=o),void 0!==c&&(e.scrollLeft=c),void 0!==n&&(e.textContent=n),r)if(r.hasOwnProperty(l)){var u=0===l.indexOf("--"),d=ve(l,r[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,d):e.style[l]=d}for(var p in s){var f=a?p:Oe[p]||(Oe[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,s[p])}}),(function(e){return e}));var _e,Se,ke=(_e=function(e){return c.forwardRef((function(t,r){var n=d(),a=c.useRef(!0),l=c.useRef(null),p=c.useRef(null),f=c.useCallback((function(e){var t=l.current;l.current=new I(e,(function(){var e=!1;p.current&&(e=b.fn(p.current,l.current.getAnimatedValue())),p.current&&!1!==e||n()})),t&&t.detach()}),[]);c.useEffect((function(){return function(){a.current=!1,l.current&&l.current.detach()}}),[]),c.useImperativeHandle(r,(function(){return A(p,a,n)})),f(t);var m,h=l.current.getValue(),g=(h.scrollTop,h.scrollLeft,i(h,["scrollTop","scrollLeft"])),y=(m=e,!u.fun(m)||m.prototype instanceof s.Component?function(e){return p.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,r)}:void 0);return s.createElement(e,o({},g,{ref:y}))}))},void 0===(Se=!1)&&(Se=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var r=Se?t[0].toLowerCase()+t.substring(1):t;return e[r]=_e(r),e}),_e)}),je=ke(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=ke,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=F,t.animated=je,t.a=je,t.interpolate=function(e,t,r){return e&&new B(e,t,r)},t.Globals=M,t.useSpring=function(e){var t=u.fun(e),r=q(1,t?e:[e]),n=r[0],o=r[1],i=r[2];return t?[n[0],o,i]:n},t.useTrail=function(e,t){var r=c.useRef(!1),n=u.fun(t),i=m(t),s=c.useRef(),a=q(e,(function(e,t){return 0===e&&(s.current=[]),s.current.push(t),o({},i,{config:m(i.config,e),attach:e>0&&function(){return s.current[e-1]}})})),l=a[0],d=a[1],p=a[2],f=c.useMemo((function(){return function(e){return d((function(t,r){e.reverse;var n=e.reverse?t+1:t-1,c=s.current[n];return o({},e,{config:m(e.config||i.config,t),attach:c&&function(){return c}})}))}}),[e,i.reverse]);return c.useEffect((function(){r.current&&!n&&f(t)})),c.useEffect((function(){r.current=!0}),[]),n?[l,f,p]:l},t.useTransition=function(e,t,r){var n=o({items:e,keys:t||function(e){return e}},r),s=$(n),a=s.lazy,l=void 0!==a&&a,u=(s.unique,s.reset),p=void 0!==u&&u,f=(s.enter,s.leave,s.update,s.onDestroyed),h=(s.keys,s.items,s.onFrame),b=s.onRest,g=s.onStart,y=s.ref,E=i(s,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),v=d(),O=c.useRef(!1),_=c.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!n.ref,instances:!O.current&&new Map,forceUpdate:v});return c.useImperativeHandle(n.ref,(function(){return{start:function(){return Promise.all(Array.from(_.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(_.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(_.current.instances).map((function(e){return e[1]}))}}})),_.current=function(e,t){for(var r=e.first,n=e.prevProps,c=i(e,["first","prevProps"]),s=$(t),a=s.items,l=s.keys,u=s.initial,d=s.from,p=s.enter,f=s.leave,h=s.update,b=s.trail,g=void 0===b?0:b,y=s.unique,E=s.config,v=s.order,O=void 0===v?["enter","leave","update"]:v,_=$(n),S=_.keys,k=_.items,j=o({},c.current),w=[].concat(c.deleted),C=Object.keys(j),R=new Set(C),T=new Set(l),x=l.filter((function(e){return!R.has(e)})),P=c.transitions.filter((function(e){return!e.destroyed&&!T.has(e.originalKey)})).map((function(e){return e.originalKey})),A=l.filter((function(e){return R.has(e)})),N=-g;O.length;)switch(O.shift()){case"enter":x.forEach((function(e,t){y&&w.find((function(t){return t.originalKey===e}))&&(w=w.filter((function(t){return t.originalKey!==e})));var n=l.indexOf(e),o=a[n],i=r&&void 0!==u?"initial":"enter";j[e]={slot:i,originalKey:e,key:y?String(e):W++,item:o,trail:N+=g,config:m(E,o,i),from:m(r&&void 0!==u?u||{}:d,o),to:m(p,o)}}));break;case"leave":P.forEach((function(e){var t=S.indexOf(e),r=k[t];w.unshift(o({},j[e],{slot:"leave",destroyed:!0,left:S[Math.max(0,t-1)],right:S[Math.min(S.length,t+1)],trail:N+=g,config:m(E,r,"leave"),to:m(f,r)})),delete j[e]}));break;case"update":A.forEach((function(e){var t=l.indexOf(e),r=a[t];j[e]=o({},j[e],{item:r,slot:"update",trail:N+=g,config:m(E,r,"update"),to:m(h,r)})}))}var M=l.map((function(e){return j[e]}));return w.forEach((function(e){var t,r=e.left,n=(e.right,i(e,["left","right"]));-1!==(t=M.findIndex((function(e){return e.originalKey===r})))&&(t+=1),t=Math.max(0,t),M=[].concat(M.slice(0,t),[n],M.slice(t))})),o({},c,{changed:x.length||P.length||A.length,first:r&&0===x.length,transitions:M,current:j,deleted:w,prevProps:t})}(_.current,n),_.current.changed&&_.current.transitions.forEach((function(e){var t=e.slot,r=e.from,n=e.to,i=e.config,c=e.trail,s=e.key,a=e.item;_.current.instances.has(s)||_.current.instances.set(s,new G);var u=_.current.instances.get(s),d=o({},E,{to:n,from:r,config:i,ref:y,onRest:function(r){_.current.mounted&&(e.destroyed&&(y||l||X(_,s),f&&f(a)),!Array.from(_.current.instances).some((function(e){return!e[1].idle}))&&(y||l)&&_.current.deleted.length>0&&X(_),b&&b(a,t,r))},onStart:g&&function(){return g(a,t)},onFrame:h&&function(e){return h(a,t,e)},delay:c,reset:p&&"enter"===t});u.update(d),_.current.paused||u.start()})),c.useEffect((function(){return _.current.mounted=O.current=!0,function(){_.current.mounted=O.current=!1,Array.from(_.current.instances).map((function(e){return e[1].destroy()})),_.current.instances.clear()}}),[]),_.current.transitions.map((function(e){var t=e.item,r=e.slot,n=e.key;return{item:t,key:n,state:r,props:_.current.instances.get(n).getValues()}}))},t.useChain=function(e,t,r){void 0===r&&(r=1e3);var n=c.useRef();c.useEffect((function(){u.equ(e,n.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,n){var i=e.current;if(i){var c=i.controllers;if(c.length){var s=r*t[n];c.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+s})})),e.start()}))}}})):e.reduce((function(e,t,r){var n=t.current;return e.then((function(){return n.start()}))}),Promise.resolve()),n.current=e}))},t.useSprings=q},,,,,,,function(e,t,r){"use strict";var n=r(0);t.a=function(e){let{srcElement:t,size:r=24,...o}=e;return Object(n.isValidElement)(t)?Object(n.cloneElement)(t,{width:r,height:r,...o}):null}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(9),o=r(0),i=r(6),c=r(54);const s=()=>{const e=Object(c.a)(),{selectShippingRate:t}=Object(n.useDispatch)(i.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((r,n)=>{t(r,n).catch(t=>{e(t)})},[e,t]),isSelectingRate:Object(n.useSelect)(e=>e(i.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},,function(e,t){},,,,,,function(e,t,r){"use strict";(function(e){var n=r(0),o=r(5),i=r(4),c=r.n(i),s=r(23),a=r(1),l=(r(45),r(56));t.a=Object(n.forwardRef)((function({className:t,children:r,spokenMessage:i=r,politeness:u="polite",actions:d=[],onRemove:p=o.noop,icon:f=null,explicitDismiss:m=!1,onDismiss:h=o.noop},b){function g(e){e&&e.preventDefault&&e.preventDefault(),h(),p()}h=h||o.noop,function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(s.speak)(r,t)},[r,t])}(i,u),Object(n.useEffect)(()=>{const e=setTimeout(()=>{m||(h(),p())},1e4);return()=>clearTimeout(e)},[h,p]);const y=c()(t,"components-snackbar",{"components-snackbar-explicit-dismiss":!!m});d&&d.length>1&&(void 0!==e&&e.env,d=[d[0]]);const E=c()("components-snackbar__content",{"components-snackbar__content-with-icon":!!f});return Object(n.createElement)("div",{ref:b,className:y,onClick:m?o.noop:g,tabIndex:"0",role:m?"":"button",onKeyPress:m?o.noop:g,"aria-label":m?"":Object(a.__)("Dismiss this notice")},Object(n.createElement)("div",{className:E},f&&Object(n.createElement)("div",{className:"components-snackbar__icon"},f),r,d.map(({label:e,onClick:t,url:r},o)=>Object(n.createElement)(l.a,{key:o,href:r,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),p(),t&&t(e)}(e,t),className:"components-snackbar__action"},e)),m&&Object(n.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:g,onKeyPress:g},"✕")))}))}).call(this,r(65))},function(e,t){e.exports=window.wp.plugins},function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){return a}));var n=r(2),o=r(50),i=r(34);const c=e=>{let{country:t="",state:r="",city:n="",postcode:o=""}=e;return{country:t.trim(),state:r.trim(),city:n.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},s=e=>{let{email:t=""}=e;return Object(i.isEmail)(t)?t.trim():""},a=e=>{const t=Object.keys(n.defaultAddressFields),r=Object(o.a)(t,{},e.country),i=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(i[r]="")}),i}},function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},,function(e,t,r){"use strict";var n=r(0),o=r(5),i=r(4),c=r.n(i),s=r(1),a=r(23),l=r(90),u=r(56);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:r,spokenMessage:i=r,onRemove:p=o.noop,isDismissible:f=!0,actions:m=[],politeness:h=d(t),__unstableHTML:b,onDismiss:g=o.noop}){!function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(a.speak)(r,t)},[r,t])}(i,h);const y=c()(e,"components-notice","is-"+t,{"is-dismissible":f});return b&&(r=Object(n.createElement)(n.RawHTML,null,r)),Object(n.createElement)("div",{className:y},Object(n.createElement)("div",{className:"components-notice__content"},r,Object(n.createElement)("div",{className:"components-notice__actions"},m.map(({className:e,label:t,isPrimary:r,variant:o,noDefaultClasses:i=!1,onClick:s,url:a},l)=>{let d=o;return"primary"===o||i||(d=a?"link":"secondary"),void 0===d&&r&&(d="primary"),Object(n.createElement)(u.a,{key:l,href:a,variant:d,onClick:a?void 0:s,className:c()("components-notice__action",e)},t)}))),f&&Object(n.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(s.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),g(),p()},showTooltip:!1}))}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(0),o=r(53),i=r(61),c=r.n(i),s=r(13);const a=(e,t)=>e&&t[e]?t[e]:null,l=e=>{let{block:t,blockMap:r,blockWrapper:o,children:i,depth:u=1}=e;return i&&0!==i.length?Array.from(i).map((e,i)=>{const{blockName:d="",...p}={key:`${t}_${u}_${i}`,...e instanceof HTMLElement?e.dataset:{},className:e.className||""},f=a(d,r);if(!f){const i=c()((null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof i&&i)return i;if(!Object(n.isValidElement)(i))return null;const s=e.childNodes.length?l({block:t,blockMap:r,children:e.childNodes,depth:u+1,blockWrapper:o}):void 0;return s?Object(n.cloneElement)(i,p,s):Object(n.cloneElement)(i,p)}const m=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${u}_${i}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(m,null,Object(n.createElement)(f,p,l({block:t,blockMap:r,children:e.children,depth:u+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(s.hasInnerBlocks)(e))return null;const i=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],c=Object(s.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!i.includes(t)}),l=o||n.Fragment;return Object(n.createElement)(l,null,c.map((e,r)=>{let{blockName:o,component:i}=e;const c=i||a(o,t);return c?Object(n.createElement)(c,{key:`${o}_forced_${r}`}):null}))})(d,r,e.children,o))))}):null},u=e=>{let{Block:t,selector:r,blockName:n,getProps:i=(()=>({})),blockMap:c,blockWrapper:s}=e;Object(o.a)({Block:t,selector:r,getProps:(e,t)=>{const r=l({block:n,blockMap:c,children:e.children||[],blockWrapper:s});return{...i(e,t),children:r}}})}},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){var n=r(122);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,r(t,n)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";r.d(t,"a",(function(){return _}));var n=r(0),o=r(108),i=r(2),c=r(16),s=r(204),a=r(44),l=r(33),u=r(31),d=r(1),p=r(27),f=r.n(p),m=r(109),h=r(88);const b=(e,t,r)=>{const n=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${r}-new-payment-method`;return n.push({key:o,value:t}),n},g=(e,t)=>{f.a.setNonce&&"function"==typeof f.a.setNonce&&f.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))};var y=r(160),E=r(22),v=r(32),O=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:r,redirectUrl:o,isProcessing:i,isBeforeProcessing:c,isComplete:p,orderNotes:O,shouldCreateAccount:_,extensionData:S}=Object(u.b)(),{hasValidationErrors:k}=Object(y.b)(),{shippingErrorStatus:j}=Object(a.b)(),{billingData:w,shippingAddress:C}=Object(l.b)(),{cartNeedsPayment:R,receiveCart:T}=Object(E.a)(),{activePaymentMethod:x,isExpressPaymentMethodActive:P,currentStatus:A,paymentMethodData:N,expressPaymentMethods:M,paymentMethods:I,shouldSavePayment:D}=Object(s.b)(),{addErrorNotice:L,removeNotice:F,setIsSuppressed:V}=Object(v.a)(),B=Object(n.useRef)(w),U=Object(n.useRef)(C),H=Object(n.useRef)(o),[z,G]=Object(n.useState)(!1),q=Object(n.useMemo)(()=>{var e;const t={...M,...I};return null==t||null===(e=t[x])||void 0===e?void 0:e.paymentMethodId},[x,M,I]),W=k&&!P||A.hasError||j.hasError,Y=!e&&!W&&(A.isSuccessful||!R)&&i;Object(n.useEffect)(()=>{V(P)},[P,V]),Object(n.useEffect)(()=>{W===e||!i&&!c||P||r.setHasError(W)},[W,e,i,c,P,r]),Object(n.useEffect)(()=>{B.current=w,U.current=C,H.current=o},[w,C,o]);const $=Object(n.useCallback)(()=>!k&&(A.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!j.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[k,A.hasError,j.hasError]);Object(n.useEffect)(()=>{let e;return P||(e=t($,0)),()=>{P||e()}},[t,$,P]),Object(n.useEffect)(()=>{H.current&&(window.location.href=H.current)},[p]);const X=Object(n.useCallback)(async()=>{if(z)return;G(!0),F("checkout");const e=R?{payment_method:q,payment_data:b(N,D,x)}:{},t={billing_address:Object(m.a)(B.current),shipping_address:Object(m.a)(U.current),customer_note:O,should_create_account:_,...e,extensions:{...S}};f()({path:"/wc/store/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(g(e.headers,r),!e.ok)throw new Error(e);return e.json()}).then(e=>{r.setAfterProcessing(e),G(!1)}).catch(e=>{try{null!=e&&e.headers&&g(e.headers,r),e.json().then(e=>{var t,n,o;null!==(t=e.data)&&void 0!==t&&t.cart&&T(e.data.cart),L(Object(h.b)(e),{id:"checkout"}),null==e||null===(n=e.additional_errors)||void 0===n||null===(o=n.forEach)||void 0===o||o.call(n,e=>{L(e.message,{id:e.error_code})}),r.setAfterProcessing(e)})}catch{var t;L(Object(d.sprintf)(// Translators: %s Error text.
4
  Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout"})}r.setHasError(!0),G(!1)})},[z,F,O,_,R,q,N,D,x,S,r,L,T]);return Object(n.useEffect)(()=>{Y&&!z&&X()},[X,Y,z]),null};const _=e=>{let{children:t,isCart:r=!1,redirectUrl:d}=e;return Object(n.createElement)(u.a,{redirectUrl:d,isCart:r},Object(n.createElement)(l.a,null,Object(n.createElement)(a.a,null,Object(n.createElement)(s.a,null,t,Object(n.createElement)(c.a,{renderError:i.CURRENT_USER_IS_ADMIN?null:()=>null},Object(n.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(n.createElement)(O,null)))))}},,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(0);const o=Object(n.createContext)({allowCreateAccount:!1,showCompanyField:!1,showApartmentField:!1,showPhoneField:!1,requireCompanyField:!1,requirePhoneField:!1,showOrderNotes:!0,showPolicyLinks:!0,showReturnToCart:!0,cartPageId:0,showRateAfterTaxName:!1}),i=(Object(n.createContext)({addressFieldControls:()=>null,accountControls:()=>null}),()=>Object(n.useContext)(o))},,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=(e,t)=>{const r=[];return Object.keys(e).forEach(n=>{if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default}),r}},,,,,,,,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-fields-block","version":"1.0.0","title":"Checkout Fields","description":"Column containing checkout address fields.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-contact-information-block","version":"1.0.0","title":"Contact Information","description":"Collect your customer\'s contact information.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-address-block","version":"1.0.0","title":"Shipping Address","description":"Collect your customer\'s shipping address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-billing-address-block","version":"1.0.0","title":"Billing Address","description":"Collect your customer\'s billing address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-methods-block","version":"1.0.0","title":"Shipping Options","description":"Shipping options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-payment-block","version":"1.0.0","title":"Payment Options","description":"Payment options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-note-block","version":"1.0.0","title":"Order Note","description":"Allow customers to add a note to their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-terms-block","version":"1.0.0","title":"Terms and Conditions","description":"Ensure customers agree to your terms and conditions and privacy policy.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-actions-block","version":"1.0.0","title":"Actions","description":"Allow customers to place their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-totals-block","version":"1.0.0","title":"Checkout Totals","description":"Column containing the checkout totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/checkout-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return l}));var n=r(0),o=r(5),i=r(11),c=r.n(i);const s=Object(n.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),a=()=>Object(n.useContext)(s),l=e=>{let{children:t}=e;const[r,i]=Object(n.useState)({}),a=Object(n.useCallback)(e=>r[e],[r]),l=Object(n.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),u=Object(n.useCallback)(e=>{i(t=>{if(!t[e])return t;const{[e]:r,...n}=t;return n})},[]),d=Object(n.useCallback)(()=>{i({})},[]),p=Object(n.useCallback)(e=>{e&&i(t=>(e=Object(o.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&c()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),f=Object(n.useCallback)((e,t)=>{i(r=>{if(!r.hasOwnProperty(e))return r;const n={...r[e],...t};return c()(r[e],n)?r:{...r,[e]:n}})},[]),m={getValidationError:a,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!0})},[f]),showValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!1})},[f]),showAllValidationErrors:Object(n.useCallback)(()=>{i(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:l};return Object(n.createElement)(s.Provider,{value:m},t)}},,,,function(e,t){},,,function(e,t){e.exports=window.wp.keycodes},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(89);const o=(e,t)=>function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const i=n.a.addEventCallback(e,r,o);return t(i),()=>{t(n.a.removeEventCallback(e,i.id))}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return c}));const n=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=r(29);const i=async(e,t,r)=>{const o=n(e,t),i=[];for(const e of o)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&i.push(t)}catch(e){console.error(e)}return!i.length||i},c=async(e,t,r)=>{const i=[],c=n(e,t);for(const e of c)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return i.push(t),i;i.push(t)}catch(e){return console.error(e),i.push({type:"error"}),i}return i}},,,,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(201)},function(e,t){},function(e,t){},function(e,t){},,,,,,,function(e,t,r){"use strict";r.r(t);var n=r(0),o=r(134),i=r(22),c=r(11),s=r.n(c),a=r(31),l=r(160),u=r(14),d=r(119),p=r(66),f=r(13),m=r(154),h=r(149),b=r(147),g=r(146),y=r(145),E=r(152),v=r(156),O=r(151),_=r(148),S=r(150),k=r(153),j=r(155);r.p=p.k,Object(f.registerCheckoutBlock)({metadata:y,component:Object(n.lazy)(()=>r.e(35).then(r.bind(null,380)))}),Object(f.registerCheckoutBlock)({metadata:g,component:Object(n.lazy)(()=>r.e(34).then(r.bind(null,401)))}),Object(f.registerCheckoutBlock)({metadata:b,component:Object(n.lazy)(()=>r.e(33).then(r.bind(null,389)))}),Object(f.registerCheckoutBlock)({metadata:_,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(2),r.e(3),r.e(39)]).then(r.bind(null,391)))}),Object(f.registerCheckoutBlock)({metadata:h,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(2),r.e(3),r.e(32)]).then(r.bind(null,392)))}),Object(f.registerCheckoutBlock)({metadata:S,component:Object(n.lazy)(()=>Promise.all([r.e(1),r.e(40)]).then(r.bind(null,388)))}),Object(f.registerCheckoutBlock)({metadata:O,component:Object(n.lazy)(()=>r.e(38).then(r.bind(null,384)))}),Object(f.registerCheckoutBlock)({metadata:E,component:Object(n.lazy)(()=>r.e(36).then(r.bind(null,393)))}),Object(f.registerCheckoutBlock)({metadata:k,component:Object(n.lazy)(()=>r.e(41).then(r.bind(null,402)))}),Object(f.registerCheckoutBlock)({metadata:m,component:Object(n.lazy)(()=>r.e(31).then(r.bind(null,387)))}),Object(f.registerCheckoutBlock)({metadata:j,component:Object(n.lazy)(()=>r.e(42).then(r.bind(null,381)))}),Object(f.registerCheckoutBlock)({metadata:v,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(1),r.e(2),r.e(4),r.e(37)]).then(r.bind(null,394)))});var w=r(1),C=r(4),R=r.n(C),T=r(32),x=r(87),P=r(124),A=r(211),N=r(16),M=r(214),I=r(2),D=r(71),L=(r(192),r(98)),F=r(24),V=Object(n.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.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"}));r(193);var B=()=>Object(n.createElement)("div",{className:"wc-block-checkout-empty"},Object(n.createElement)(L.a,{className:"wc-block-checkout-empty__image",alt:"",srcElement:V,size:100}),Object(n.createElement)("strong",{className:"wc-block-checkout-empty__title"},Object(w.__)("Your cart is empty!","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-checkout-empty__description"},Object(w.__)("Checkout is not available whilst your cart is empty—please take a look through our store and come back when you're ready to place an order.","woo-gutenberg-products-block")),p.i&&Object(n.createElement)("span",{className:"wp-block-button"},Object(n.createElement)("a",{href:p.i,className:"wp-block-button__link"},Object(w.__)("Browse store","woo-gutenberg-products-block")))),U=Object(n.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("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"}),Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"})),H=r(19);r(194);const z=["woocommerce_product_out_of_stock","woocommerce_rest_cart_product_is_not_purchasable","woocommerce_rest_cart_product_no_stock","woocommerce_rest_cart_product_sold_individually","woocommerce_rest_cart_item_error"],G=Object(I.getSetting)("checkoutData",{}),q=e=>{let{errorData:t}=e,r=Object(w.__)("Checkout error","woo-gutenberg-products-block");return z.includes(t.code)&&(r=Object(w.__)("There is a problem with your cart","woo-gutenberg-products-block")),Object(n.createElement)("strong",{className:"wc-block-checkout-error_title"},r)},W=e=>{let{errorData:t}=e,r=t.message;return z.includes(t.code)&&(r=r+" "+Object(w.__)("Please edit your cart and try again.","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-checkout-error__description"},r)},Y=e=>{let{errorData:t}=e,r=Object(w.__)("Retry","woo-gutenberg-products-block"),o="javascript:window.location.reload(true)";return z.includes(t.code)&&(r=Object(w.__)("Edit your cart","woo-gutenberg-products-block"),o=p.c),Object(n.createElement)("span",{className:"wp-block-button"},Object(n.createElement)("a",{href:o,className:"wp-block-button__link"},r))};var $=()=>{const e={code:"",message:"",...G||{}},t={code:e.code||"unknown",message:Object(H.decodeEntities)(e.message)||Object(w.__)("There was a problem checking out. Please try again. If the problem persists, please get in touch with us so we can assist.","woo-gutenberg-products-block")};return Object(n.createElement)("div",{className:"wc-block-checkout-error"},Object(n.createElement)(L.a,{className:"wc-block-checkout-error__image",alt:"",srcElement:U,size:100}),Object(n.createElement)(q,{errorData:t}),Object(n.createElement)(W,{errorData:t}),Object(n.createElement)(Y,{errorData:t}))};const X=`${p.e}?redirect_to=${encodeURIComponent(window.location.href)}`,K=()=>{window.location.reload(!0)};var J=r(132);const Q=()=>Object(n.createElement)(n.Fragment,null,Object(w.__)("You must be logged in to checkout. ","woo-gutenberg-products-block"),Object(n.createElement)("a",{href:X},Object(w.__)("Click here to log in.","woo-gutenberg-products-block"))),Z=e=>{let{attributes:t,children:r}=e;const{hasOrder:o,customerId:c}=Object(a.b)(),{cartItems:s,cartIsLoading:l}=Object(i.a)(),{allowCreateAccount:u,showCompanyField:d,requireCompanyField:p,showApartmentField:f,showPhoneField:m,requirePhoneField:h}=t;return l||0!==s.length?o?((e=>!e&&!Object(I.getSetting)("checkoutAllowsGuest",!1))(c)&&u&&Object(I.getSetting)("checkoutAllowsSignup",!1)&&Object(n.createElement)(Q,null),Object(n.createElement)(J.a.Provider,{value:{allowCreateAccount:u,showCompanyField:d,requireCompanyField:p,showApartmentField:f,showPhoneField:m,requirePhoneField:h}},r)):Object(n.createElement)($,null):Object(n.createElement)(B,null)},ee=e=>{let{scrollToTop:t}=e;const{hasNoticesOfType:r}=Object(T.a)(),{hasError:o,isIdle:i}=Object(a.b)(),{hasValidationErrors:c,showAllValidationErrors:s}=Object(l.b)(),u=i&&o&&(c||r("default"));return Object(n.useEffect)(()=>{let e;return u&&(s(),e=window.setTimeout(()=>{t({focusableSelector:"input:invalid, .has-error input"})},50)),()=>{clearTimeout(e)}},[u,t,s]),null};var te=Object(D.a)(e=>{let{attributes:t,children:r,scrollToTop:o}=e;return Object(n.createElement)(N.a,{header:Object(w.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(n.createInterpolateElement)(Object(w.__)("The checkout has encountered an unexpected error. <button>Try reloading the page</button>. If the error persists, please get in touch with us so we can assist.","woo-gutenberg-products-block"),{button:Object(n.createElement)("button",{className:"wc-block-link-button",onClick:K})}),showErrorMessage:I.CURRENT_USER_IS_ADMIN},Object(n.createElement)(A.a,{context:"wc/checkout"},Object(n.createElement)(x.a,{context:"wc/checkout"},Object(n.createElement)(l.a,null,Object(n.createElement)(f.SlotFillProvider,null,Object(n.createElement)(P.a,null,Object(n.createElement)(M.a,{className:R()("wc-block-checkout",{"has-dark-controls":t.hasDarkControls})},Object(n.createElement)(Z,{attributes:t},r),Object(n.createElement)(ee,{scrollToTop:o}))))))))});const re={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(I.getSetting)("hasDarkEditorStyleSupport",!1)},showCompanyField:{type:"boolean",default:!1},requireCompanyField:{type:"boolean",default:!1},allowCreateAccount:{type:"boolean",default:!1},showApartmentField:{type:"boolean",default:!0},showPhoneField:{type:"boolean",default:!0},requirePhoneField:{type:"boolean",default:!1},showOrderNotes:{type:"boolean",default:!0},showPolicyLinks:{type:"boolean",default:!0},showReturnToCart:{type:"boolean",default:!0},cartPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:Object(I.getSetting)("displayCartPricesIncludingTax",!1)}};Object(d.a)({Block:te,blockName:"woocommerce/checkout",selector:".wp-block-woocommerce-checkout",getProps:e=>({attributes:Object(o.a)(re,e instanceof HTMLElement?e.dataset:{})}),blockMap:Object(u.getRegisteredBlockComponents)("woocommerce/checkout"),blockWrapper:e=>{let{children:t}=e;const{extensions:r,receiveCart:o,...c}=Object(i.a)(),u=(()=>{const{dispatchActions:e,extensionData:t}=Object(a.b)(),r=Object(n.useRef)(t);Object(n.useEffect)(()=>{s()(t,r.current)||(r.current=t)},[t]);const o=Object(n.useCallback)((t,n,o)=>{const i=r.current[t]||{};e.setExtensionData({...r.current,[t]:{...i,[n]:o}})},[e]);return{extensionData:r.current,setExtensionData:o}})(),d=(()=>{const{hasValidationErrors:e,getValidationError:t,clearValidationError:r,hideValidationError:o,setValidationErrors:i}=Object(l.b)(),c="extensions-errors";return{hasValidationErrors:e,getValidationError:Object(n.useCallback)(e=>t(`${c}-${e}`),[t]),clearValidationError:Object(n.useCallback)(e=>r(`${c}-${e}`),[r]),hideValidationError:Object(n.useCallback)(e=>o(`${c}-${e}`),[o]),setValidationErrors:Object(n.useCallback)(e=>i(Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[`${c}-${t}`,r]}))),[i])}})();return n.Children.map(t,e=>{if(Object(n.isValidElement)(e)){const t={extensions:r,cart:c,checkoutExtensionData:u,validation:d};return Object(n.cloneElement)(e,t)}return e})}})},,,function(e,t,r){"use strict";r.d(t,"b",(function(){return D})),r.d(t,"a",(function(){return L}));var n=r(0),o=r(35);let i,c;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(i||(i={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(c||(c={}));const s={currentStatus:i.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},a={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:i,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,paymentMethodData:r,shouldSavePaymentMethod:n=!1,errorMessage:o="",paymentMethods:a={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case i.PRISTINE:return{...s,...e,errorMessage:"",currentStatus:i.PRISTINE};case i.STARTED:return{...e,currentStatus:i.STARTED};case i.ERROR:return e.currentStatus!==i.ERROR?{...e,currentStatus:i.ERROR,errorMessage:o||e.errorMessage}:e;case i.FAILED:return e.currentStatus!==i.FAILED?{...e,currentStatus:i.FAILED,paymentMethodData:r||e.paymentMethodData,errorMessage:o||e.errorMessage}:e;case i.SUCCESS:return e.currentStatus!==i.SUCCESS?{...e,currentStatus:i.SUCCESS,paymentMethodData:r||e.paymentMethodData}:e;case i.PROCESSING:return e.currentStatus!==i.PROCESSING?{...e,currentStatus:i.PROCESSING,errorMessage:""}:e;case i.COMPLETE:return e.currentStatus!==i.COMPLETE?{...e,currentStatus:i.COMPLETE}:e;case c.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:a};case c.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:a};case c.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:n};case c.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:r||e.paymentMethodData}}},u=r(1),d=r(14),p=r(17),f=r(2),m=r(52),h=r(18),b=r(44),g=r(33),y=r(22),E=r(32),v=r(29);const O=(e,t,r,o)=>{const[i,c]=Object(n.useState)(!1),{isEditor:s}=Object(h.a)(),{selectedRates:a}=Object(b.b)(),{billingData:l,shippingAddress:d}=Object(g.b)(),v=Object(p.a)(a),O=Object(p.a)(r),_=Object(y.a)(),{cartTotals:S,cartIsLoading:k,cartNeedsShipping:j,paymentRequirements:w}=_,C=Object(n.useRef)({cart:_,cartTotals:S,cartNeedsShipping:j,billingData:l,shippingAddress:d,selectedShippingMethods:v,paymentRequirements:w}),{addErrorNotice:R}=Object(E.a)();Object(n.useEffect)(()=>{C.current={cart:_,cartTotals:S,cartNeedsShipping:j,billingData:l,shippingAddress:d,selectedShippingMethods:v,paymentRequirements:w}},[_,S,j,l,d,v,w]);const T=Object(n.useCallback)(async()=>{let r={};const n=e=>{r={...r,[e.name]:e}};for(let e=0;e<O.length;e++){const r=O[e],i=t[r];if(i)try{const e=!!s||await Promise.resolve(i.canMakePayment(C.current));if(e){if("object"==typeof e&&null!==e&&e.error)throw new Error(e.error.message);n(i)}}catch(e){if(f.CURRENT_USER_IS_ADMIN||s){const t=Object(u.sprintf)(
5
  /* translators: %s the id of the payment method being registered (bank transfer, Stripe...) */
6
+ Object(u.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),i.paymentMethodId);R(`${t} ${e}`,{context:o,id:`wc-${i.paymentMethodId}-registration-error`})}}}e(r),c(!0)},[R,e,s,o,O,t]),x=Object(m.a)(T,500,{leading:!0});return Object(n.useEffect)(()=>{k||x()},[x,_,v,l,k]),i},_=e=>({type:e}),S=e=>({type:i.ERROR,errorMessage:e}),k=e=>{let{errorMessage:t,paymentMethodData:r}=e;return{type:i.FAILED,errorMessage:t,paymentMethodData:r}},j=e=>{let{paymentMethodData:t}=e;return{type:i.SUCCESS,paymentMethodData:t}},w=e=>({type:c.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),C=e=>({type:c.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),R=e=>({type:c.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),T=(e,t)=>({type:c.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var x=r(31),P=r(89),A=r(169);var N=r(170),M=r(160);const I=Object(n.createContext)(a),D=()=>Object(n.useContext)(I),L=e=>{let{children:t}=e;const{isProcessing:r,isIdle:c,isCalculating:a,hasError:u}=Object(x.b)(),{isEditor:p,getPreviewData:m}=Object(h.a)(),{setValidationErrors:y}=Object(M.b)(),{addErrorNotice:D,removeNotice:L}=Object(E.a)(),{isSuccessResponse:F,isErrorResponse:V,isFailResponse:B,noticeContexts:U}=Object(v.c)(),[H,z]=Object(n.useReducer)(P.b,{}),{onPaymentProcessing:G}=(e=>Object(n.useMemo)(()=>({onPaymentProcessing:Object(A.a)("payment_processing",e)}),[e]))(z),q=Object(n.useRef)(H);Object(n.useEffect)(()=>{q.current=H},[H]);const[W,Y]=Object(n.useReducer)(l,s),{dispatchActions:$,setPaymentStatus:X}=(e=>{const{setBillingData:t}=Object(g.b)(),{setShippingAddress:r}=Object(b.b)();return{dispatchActions:Object(n.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(w(t))},setRegisteredExpressPaymentMethods:t=>{e(C(t))},setShouldSavePayment:t=>{e(R(t))},setActivePaymentMethod:function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(T(t,r))}}),[e]),setPaymentStatus:Object(n.useCallback)(()=>({pristine:()=>e(_(i.PRISTINE)),started:()=>e(_(i.STARTED)),processing:()=>e(_(i.PROCESSING)),completed:()=>e(_(i.COMPLETE)),error:t=>e(S(t)),failed:function(r,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(k({errorMessage:r||"",paymentMethodData:n||{}}))},success:function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof i&&null!=i&&i.address&&r(i.address),e(j({paymentMethodData:n}))}}),[e,t,r])}})(Y),K=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:r}=Object(v.c)(),n=new Set([...Object(f.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return O(e,t,Array.from(n),r.PAYMENTS)})($.setRegisteredPaymentMethods),J=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:r}=Object(v.c)();return O(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)})($.setRegisteredExpressPaymentMethods),Q=Object(n.useMemo)(()=>p?m("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(f.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach(r=>{const o=t[r].filter(t=>{var r;let{method:{gateway:n}}=t;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)});o.length&&(n[r]=o)}),n}(W.paymentMethods):{},[p,m,K,W.paymentMethods]),Z=Object(n.useCallback)(e=>{e?D(e,{id:"wc-express-payment-error",context:U.EXPRESS_PAYMENTS}):L("wc-express-payment-error",U.EXPRESS_PAYMENTS)},[D,U.EXPRESS_PAYMENTS,L]),ee=Object.keys(W.expressPaymentMethods).includes(W.activePaymentMethod),te=Object(n.useMemo)(()=>({isPristine:W.currentStatus===i.PRISTINE,isStarted:W.currentStatus===i.STARTED,isProcessing:W.currentStatus===i.PROCESSING,isFinished:[i.ERROR,i.FAILED,i.SUCCESS].includes(W.currentStatus),hasError:W.currentStatus===i.ERROR,hasFailed:W.currentStatus===i.FAILED,isSuccessful:W.currentStatus===i.SUCCESS,isDoingExpressPayment:W.currentStatus!==i.PRISTINE&&ee}),[W.currentStatus,ee]);Object(n.useEffect)(()=>{const e=Object.keys(W.paymentMethods);if(!K||!e.length)return;const t=[...e,...Object.keys(W.expressPaymentMethods)];if(W.activePaymentMethod&&t.includes(W.activePaymentMethod))return;X().pristine();const r=Object.keys(Q).flatMap(e=>Q[e])[0]||void 0;if(r){const e=r.tokenId.toString(),t=r.method.gateway,n=`wc-${t}-payment-token`;$.setActivePaymentMethod(t,{token:e,payment_method:t,[n]:e,isSavedToken:!0})}else $.setActivePaymentMethod(Object.keys(W.paymentMethods)[0])},[K,W.paymentMethods,W.expressPaymentMethods,$,X,W.activePaymentMethod,Q]),Object(n.useEffect)(()=>{!r||u||a||te.isFinished||X().processing()},[r,u,a,te.isFinished,X]),Object(n.useEffect)(()=>{c&&!te.isSuccessful&&X().pristine()},[c,te.isSuccessful,X]),Object(n.useEffect)(()=>{u&&te.isSuccessful&&X().pristine()},[u,te.isSuccessful,X]),Object(n.useEffect)(()=>{te.isProcessing&&(L("wc-payment-error",U.PAYMENTS),Object(N.b)(q.current,"payment_processing",{}).then(e=>{let t,r;var n,o,i,c,s,a;if(e.forEach(e=>{F(e)&&(t=e),(V(e)||B(e))&&(r=e)}),t&&!r)X().success(null===(n=t)||void 0===n||null===(o=n.meta)||void 0===o?void 0:o.paymentMethodData,null===(i=t)||void 0===i||null===(c=i.meta)||void 0===c?void 0:c.billingData,null===(s=t)||void 0===s||null===(a=s.meta)||void 0===a?void 0:a.shippingData);else if(r&&B(r)){var l,u,d,p,f,m;r.message&&r.message.length&&D(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=r)||void 0===m?void 0:m.messageContext)||U.PAYMENTS}),X().failed(null===(l=r)||void 0===l?void 0:l.message,null===(u=r)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=r)||void 0===p||null===(f=p.meta)||void 0===f?void 0:f.billingData)}else if(r){var h,b;r.message&&r.message.length&&D(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(b=r)||void 0===b?void 0:b.messageContext)||U.PAYMENTS}),X().error(r.message),y(null===(h=r)||void 0===h?void 0:h.validationErrors)}else X().success()}))},[te.isProcessing,y,X,L,U.PAYMENTS,F,B,V,D]);const re="object"==typeof W.paymentMethodData&&Object(o.e)(W.paymentMethodData,"token")?W.paymentMethodData.token+"":"",ne={setPaymentStatus:X,currentStatus:te,paymentStatuses:i,paymentMethodData:W.paymentMethodData,errorMessage:W.errorMessage,activePaymentMethod:W.activePaymentMethod,activeSavedToken:re,setActivePaymentMethod:$.setActivePaymentMethod,onPaymentProcessing:G,customerPaymentMethods:Q,paymentMethods:W.paymentMethods,expressPaymentMethods:W.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:J,setExpressPaymentError:Z,isExpressPaymentMethodActive:ee,shouldSavePayment:W.shouldSavePaymentMethod,setShouldSavePayment:$.setShouldSavePayment};return Object(n.createElement)(I.Provider,{value:ne},t)}},,,,,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return E})),r.d(t,"a",(function(){return v}));var n=r(0),o=(r(8),r(9)),i=r(7),c=r(4),s=r.n(c),a=r(5),l=r(91),u=r(12),d=r(107),p=function({notices:e,className:t,children:r,onRemove:o=a.noop}){const c=Object(u.useReducedMotion)(),[p]=Object(n.useState)(()=>new WeakMap),f=Object(l.useTransition)(e,e=>e.id,{from:{opacity:0,height:0},enter:e=>async t=>await t({opacity:1,height:p.get(e).offsetHeight}),leave:()=>async e=>{await e({opacity:0}),await e({height:0})},immediate:c});t=s()("components-snackbar-list",t);const m=e=>()=>o(e.id);return Object(n.createElement)("div",{className:t},r,f.map(({item:e,key:t,props:r})=>Object(n.createElement)(l.animated.div,{key:t,style:r},Object(n.createElement)("div",{className:"components-snackbar-list__notice-container",ref:t=>t&&p.set(e,t)},Object(n.createElement)(d.a,Object(i.a)({},Object(a.omit)(e,["content"]),{onRemove:m(e)}),e.content)))))},f=r(13);const m={};var h=e=>{let{className:t,notices:r,removeNotice:o,isEditor:i}=e;if(i)return null;const c=r.filter(e=>"snackbar"===e.type),a=c.length>0?c.reduce((e,t)=>{let{content:r}=t;return e[r]=!0,e},{}):m,l=Object(f.__experimentalApplyCheckoutFilter)({filterName:"snackbarNoticeVisibility",defaultValue:a}),u=c.filter(e=>!0===l[e.content]),d=s()(t,"wc-block-components-notices__snackbar");return Object(n.createElement)(p,{notices:u,className:d,onRemove:o})},b=r(38),g=r(18);const y=Object(n.createContext)({notices:[],createSnackbarNotice:(e,t)=>{},removeSnackbarNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),E=()=>Object(n.useContext)(y),v=e=>{let{children:t,context:r="wc/core"}=e;const{createNotice:i,removeNotice:c}=Object(o.useDispatch)("core/notices"),[s,a]=Object(n.useState)(!1),{dispatchStoreEvent:l}=Object(b.a)(),{isEditor:u}=Object(g.a)(),d=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i("default",e,{...t,type:"snackbar",context:t.context||r}),l("store-notice-create",{status:"default",content:e,options:t})}),[i,l,r]),p=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;c(e,t)}),[c,r]),{notices:f}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(r)}),[r]),m={notices:f,createSnackbarNotice:d,removeSnackbarNotice:p,context:r,setIsSuppressed:a},E=s?null:Object(n.createElement)(h,{notices:m.notices,removeNotice:m.removeSnackbarNotice,isEditor:u});return Object(n.createElement)(y.Provider,{value:m},t,E)}},function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return l}));var n=r(0),o=(r(8),r(12)),i=r(4),c=r.n(i);const s=Object(n.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),a=()=>Object(n.useContext)(s),l=e=>{let{children:t,className:r=""}=e;const[i,a]=(()=>{const[e,{width:t}]=Object(o.useResizeObserver)();let r="";return t>700?r="is-large":t>520?r="is-medium":t>400?r="is-small":t&&(r="is-mobile"),[e,r]})(),l={hasContainerWidth:""!==a,containerClassName:a,isMobile:"is-mobile"===a,isSmall:"is-small"===a,isMedium:"is-medium"===a,isLarge:"is-large"===a};return Object(n.createElement)(s.Provider,{value:l},Object(n.createElement)("div",{className:c()(r,a)},i,t))}},,function(e,t,r){"use strict";var n=r(0),o=r(4),i=r.n(o),c=(r(8),r(212));r(164),t.a=e=>{let{children:t,className:r}=e;return Object(n.createElement)(c.a,{className:i()("wc-block-components-sidebar-layout",r)},t)}}]);
build/checkout.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'fb8bcec9a1324d303b0cd80b32f61a2f');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'ee83dcf0dc970af898a9820afb8af335');
build/checkout.js CHANGED
@@ -20,7 +20,7 @@ Object(l.__)("Remove","woo-gutenberg-products-block"):Object(l.sprintf)(
20
  /* translators: %s text of the chip to remove. */
21
  Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const O={"aria-label":t,disabled:r,onClick:s,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||s()}},j=p?O:{},E=p?{"aria-hidden":!0}:O;return Object(n.createElement)(d,o()({},g,j,{className:a()(c,"is-removable"),element:p?"button":g.element,screenReaderText:m,text:b}),Object(n.createElement)(h,o()({className:"wc-block-components-chip__remove"},E),Object(n.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",srcElement:u.a,size:16})))}},,function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return a}));var r=c(40),o=c(189);const n=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:n,expressPaymentMethodsInitialized:s}=Object(o.b)(),a=Object(r.a)(t),l=Object(r.a)(c);return{paymentMethods:e?l:a,isInitialized:e?s:n}},s=()=>n(!1),a=()=>n(!0)},,function(e,t,c){"use strict";c.d(t,"b",(function(){return D})),c.d(t,"a",(function(){return L}));var r=c(0),o=c(85);let n,s;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(n||(n={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(s||(s={}));const a={currentStatus:n.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},l={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:n,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,paymentMethodData:c,shouldSavePaymentMethod:r=!1,errorMessage:o="",paymentMethods:l={},paymentMethod:i=""}=arguments.length>1?arguments[1]:void 0;switch(t){case n.PRISTINE:return{...a,...e,errorMessage:"",currentStatus:n.PRISTINE};case n.STARTED:return{...e,currentStatus:n.STARTED};case n.ERROR:return e.currentStatus!==n.ERROR?{...e,currentStatus:n.ERROR,errorMessage:o||e.errorMessage}:e;case n.FAILED:return e.currentStatus!==n.FAILED?{...e,currentStatus:n.FAILED,paymentMethodData:c||e.paymentMethodData,errorMessage:o||e.errorMessage}:e;case n.SUCCESS:return e.currentStatus!==n.SUCCESS?{...e,currentStatus:n.SUCCESS,paymentMethodData:c||e.paymentMethodData}:e;case n.PROCESSING:return e.currentStatus!==n.PROCESSING?{...e,currentStatus:n.PROCESSING,errorMessage:""}:e;case n.COMPLETE:return e.currentStatus!==n.COMPLETE?{...e,currentStatus:n.COMPLETE}:e;case s.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:l};case s.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:l};case s.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:r};case s.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:i,paymentMethodData:c||e.paymentMethodData}}},u=c(1),d=c(39),p=c(40),b=c(2),m=c(116),g=c(49),h=c(67),O=c(56),j=c(36),E=c(47),_=c(44);const f=(e,t,c,o)=>{const[n,s]=Object(r.useState)(!1),{isEditor:a}=Object(g.b)(),{selectedRates:l}=Object(h.b)(),{billingData:i,shippingAddress:d}=Object(O.b)(),_=Object(p.a)(l),f=Object(p.a)(c),k=Object(j.a)(),{cartTotals:w,cartIsLoading:y,cartNeedsShipping:v,paymentRequirements:S}=k,C=Object(r.useRef)({cart:k,cartTotals:w,cartNeedsShipping:v,billingData:i,shippingAddress:d,selectedShippingMethods:_,paymentRequirements:S}),{addErrorNotice:N}=Object(E.a)();Object(r.useEffect)(()=>{C.current={cart:k,cartTotals:w,cartNeedsShipping:v,billingData:i,shippingAddress:d,selectedShippingMethods:_,paymentRequirements:S}},[k,w,v,i,d,_,S]);const P=Object(r.useCallback)(async()=>{let c={};const r=e=>{c={...c,[e.name]:e}};for(let e=0;e<f.length;e++){const c=f[e],n=t[c];if(n)try{const e=!!a||await Promise.resolve(n.canMakePayment(C.current));if(e){if("object"==typeof e&&null!==e&&e.error)throw new Error(e.error.message);r(n)}}catch(e){if(b.CURRENT_USER_IS_ADMIN||a){const t=Object(u.sprintf)(
22
  /* translators: %s the id of the payment method being registered (bank transfer, Stripe...) */
23
- Object(u.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),n.paymentMethodId);N(`${t} ${e}`,{context:o,id:`wc-${n.paymentMethodId}-registration-error`})}}}e(c),s(!0)},[N,e,a,o,f,t]),R=Object(m.a)(P,500,{leading:!0});return Object(r.useEffect)(()=>{y||R()},[R,k,_,i,y]),n},k=e=>({type:e}),w=e=>({type:n.ERROR,errorMessage:e}),y=e=>{let{errorMessage:t,paymentMethodData:c}=e;return{type:n.FAILED,errorMessage:t,paymentMethodData:c}},v=e=>{let{paymentMethodData:t}=e;return{type:n.SUCCESS,paymentMethodData:t}},S=e=>({type:s.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),C=e=>({type:s.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),N=e=>({type:s.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),P=(e,t)=>({type:s.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var R=c(50),x=c(107),T=c(251);var A=c(254),I=c(112);const M=Object(r.createContext)(l),D=()=>Object(r.useContext)(M),L=e=>{let{children:t}=e;const{isProcessing:c,isIdle:s,isCalculating:l,hasError:u}=Object(R.b)(),{isEditor:p,getPreviewData:m}=Object(g.b)(),{setValidationErrors:j}=Object(I.b)(),{addErrorNotice:D,removeNotice:L}=Object(E.a)(),{isSuccessResponse:B,isErrorResponse:F,isFailResponse:V,noticeContexts:U}=Object(_.c)(),[z,H]=Object(r.useReducer)(x.b,{}),{onPaymentProcessing:G}=(e=>Object(r.useMemo)(()=>({onPaymentProcessing:Object(T.a)("payment_processing",e)}),[e]))(H),q=Object(r.useRef)(z);Object(r.useEffect)(()=>{q.current=z},[z]);const[$,Y]=Object(r.useReducer)(i,a),{dispatchActions:W,setPaymentStatus:X}=(e=>{const{setBillingData:t}=Object(O.b)(),{setShippingAddress:c}=Object(h.b)();return{dispatchActions:Object(r.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(S(t))},setRegisteredExpressPaymentMethods:t=>{e(C(t))},setShouldSavePayment:t=>{e(N(t))},setActivePaymentMethod:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(P(t,c))}}),[e]),setPaymentStatus:Object(r.useCallback)(()=>({pristine:()=>e(k(n.PRISTINE)),started:()=>e(k(n.STARTED)),processing:()=>e(k(n.PROCESSING)),completed:()=>e(k(n.COMPLETE)),error:t=>e(w(t)),failed:function(c,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(y({errorMessage:c||"",paymentMethodData:r||{}}))},success:function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof n&&null!=n&&n.address&&c(n.address),e(v({paymentMethodData:r}))}}),[e,t,c])}})(Y),K=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:c}=Object(_.c)(),r=new Set([...Object(b.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return f(e,t,Array.from(r),c.PAYMENTS)})(W.setRegisteredPaymentMethods),J=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:c}=Object(_.c)();return f(e,t,Object.keys(t),c.EXPRESS_PAYMENTS)})(W.setRegisteredExpressPaymentMethods),Q=Object(r.useMemo)(()=>p?m("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(b.getSetting)("customerPaymentMethods",{}),c=Object.keys(t),r={};return c.forEach(c=>{const o=t[c].filter(t=>{var c;let{method:{gateway:r}}=t;return r in e&&(null===(c=e[r].supports)||void 0===c?void 0:c.showSavedCards)});o.length&&(r[c]=o)}),r}($.paymentMethods):{},[p,m,K,$.paymentMethods]),Z=Object(r.useCallback)(e=>{e?D(e,{id:"wc-express-payment-error",context:U.EXPRESS_PAYMENTS}):L("wc-express-payment-error",U.EXPRESS_PAYMENTS)},[D,U.EXPRESS_PAYMENTS,L]),ee=Object.keys($.expressPaymentMethods).includes($.activePaymentMethod),te=Object(r.useMemo)(()=>({isPristine:$.currentStatus===n.PRISTINE,isStarted:$.currentStatus===n.STARTED,isProcessing:$.currentStatus===n.PROCESSING,isFinished:[n.ERROR,n.FAILED,n.SUCCESS].includes($.currentStatus),hasError:$.currentStatus===n.ERROR,hasFailed:$.currentStatus===n.FAILED,isSuccessful:$.currentStatus===n.SUCCESS,isDoingExpressPayment:$.currentStatus!==n.PRISTINE&&ee}),[$.currentStatus,ee]);Object(r.useEffect)(()=>{const e=Object.keys($.paymentMethods);if(!K||!e.length)return;const t=[...e,...Object.keys($.expressPaymentMethods)];if($.activePaymentMethod&&t.includes($.activePaymentMethod))return;X().pristine();const c=Object.keys(Q).flatMap(e=>Q[e])[0]||void 0;if(c){const e=c.tokenId,t=c.method.gateway,r=`wc-${t}-payment-token`;W.setActivePaymentMethod(t,{token:e,payment_method:t,[r]:e.toString(),isSavedToken:!0})}else W.setActivePaymentMethod(Object.keys($.paymentMethods)[0])},[K,$.paymentMethods,$.expressPaymentMethods,W,X,$.activePaymentMethod,Q]),Object(r.useEffect)(()=>{!c||u||l||te.isFinished||X().processing()},[c,u,l,te.isFinished,X]),Object(r.useEffect)(()=>{s&&!te.isSuccessful&&X().pristine()},[s,te.isSuccessful,X]),Object(r.useEffect)(()=>{u&&te.isSuccessful&&X().pristine()},[u,te.isSuccessful,X]),Object(r.useEffect)(()=>{te.isProcessing&&(L("wc-payment-error",U.PAYMENTS),Object(A.b)(q.current,"payment_processing",{}).then(e=>{let t,c;var r,o,n,s,a,l;if(e.forEach(e=>{B(e)&&(t=e),(F(e)||V(e))&&(c=e)}),t&&!c)X().success(null===(r=t)||void 0===r||null===(o=r.meta)||void 0===o?void 0:o.paymentMethodData,null===(n=t)||void 0===n||null===(s=n.meta)||void 0===s?void 0:s.billingData,null===(a=t)||void 0===a||null===(l=a.meta)||void 0===l?void 0:l.shippingData);else if(c&&V(c)){var i,u,d,p,b,m;c.message&&c.message.length&&D(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=c)||void 0===m?void 0:m.messageContext)||U.PAYMENTS}),X().failed(null===(i=c)||void 0===i?void 0:i.message,null===(u=c)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=c)||void 0===p||null===(b=p.meta)||void 0===b?void 0:b.billingData)}else if(c){var g,h;c.message&&c.message.length&&D(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(h=c)||void 0===h?void 0:h.messageContext)||U.PAYMENTS}),X().error(c.message),j(null===(g=c)||void 0===g?void 0:g.validationErrors)}else X().success()}))},[te.isProcessing,j,X,L,U.PAYMENTS,B,V,F,D]);const ce="object"==typeof $.paymentMethodData&&Object(o.d)($.paymentMethodData,"token")?$.paymentMethodData.token+"":"",re={setPaymentStatus:X,currentStatus:te,paymentStatuses:n,paymentMethodData:$.paymentMethodData,errorMessage:$.errorMessage,activePaymentMethod:$.activePaymentMethod,activeSavedToken:ce,setActivePaymentMethod:W.setActivePaymentMethod,onPaymentProcessing:G,customerPaymentMethods:Q,paymentMethods:$.paymentMethods,expressPaymentMethods:$.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:J,setExpressPaymentError:Z,isExpressPaymentMethodActive:ee,shouldSavePayment:$.shouldSavePaymentMethod,setShouldSavePayment:W.setShouldSavePayment};return Object(r.createElement)(M.Provider,{value:re},t)}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0),o=(c(10),c(112));c(160);const n=e=>{let{errorMessage:t="",propertyName:c="",elementId:n=""}=e;const{getValidationError:s,getValidationErrorId:a}=Object(o.b)();if(!t||"string"!=typeof t){const e=s(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:a(n)},t))}},function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM20 4v13.17L18.83 16H4V4h16zM6 12h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"}));t.a=n},,,,,,,,,,,function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=n},,,function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(18);const a=Object(n.createElement)(e=>{let{className:t,size:c,...r}=e;return Object(n.createElement)(s.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:c,height:c},r),Object(n.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=a},,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(14),a=c(2);c(211),t.a=e=>{let{image:t={},fallbackAlt:c=""}=e;const r=t.thumbnail?{src:t.thumbnail,alt:Object(s.decodeEntities)(t.alt)||c||"Product Image"}:{src:a.PLACEHOLDER_IMG_SRC,alt:""};return Object(n.createElement)("img",o()({className:"wc-block-components-product-image"},r,{alt:r.alt}))}},function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(109);t.a=()=>Object(r.createElement)(n.a,{className:"wc-block-components-product-backorder-badge"},Object(o.__)("Available on backorder","woo-gutenberg-products-block"))},function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(109);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(r.createElement)(n.a,{className:"wc-block-components-product-low-stock-badge"},Object(o.sprintf)(
24
  /* translators: %d stock amount (number of items in stock for product) */
25
  Object(o.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},function(e,t,c){"use strict";c.d(t,"a",(function(){return k}));var r=c(0),o=c(181),n=c(2),s=c(114),a=c(189),l=c(67),i=c(56),u=c(50),d=c(1),p=c(11),b=c.n(p),m=c(248),g=c(28);const h=(e,t,c)=>{const r=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${c}-new-payment-method`;return r.push({key:o,value:t}),r},O=(e,t)=>{b.a.setNonce&&"function"==typeof b.a.setNonce&&b.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))};var j=c(112),E=c(36),_=c(47),f=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:c,redirectUrl:o,isProcessing:n,isBeforeProcessing:s,isComplete:p,orderNotes:f,shouldCreateAccount:k,extensionData:w}=Object(u.b)(),{hasValidationErrors:y}=Object(j.b)(),{shippingErrorStatus:v}=Object(l.b)(),{billingData:S,shippingAddress:C}=Object(i.b)(),{cartNeedsPayment:N,receiveCart:P}=Object(E.a)(),{activePaymentMethod:R,isExpressPaymentMethodActive:x,currentStatus:T,paymentMethodData:A,expressPaymentMethods:I,paymentMethods:M,shouldSavePayment:D}=Object(a.b)(),{addErrorNotice:L,removeNotice:B,setIsSuppressed:F}=Object(_.a)(),V=Object(r.useRef)(S),U=Object(r.useRef)(C),z=Object(r.useRef)(o),[H,G]=Object(r.useState)(!1),q=Object(r.useMemo)(()=>{var e;const t={...I,...M};return null==t||null===(e=t[R])||void 0===e?void 0:e.paymentMethodId},[R,I,M]),$=y&&!x||T.hasError||v.hasError,Y=!e&&!$&&(T.isSuccessful||!N)&&n;Object(r.useEffect)(()=>{F(x)},[x,F]),Object(r.useEffect)(()=>{$===e||!n&&!s||x||c.setHasError($)},[$,e,n,s,x,c]),Object(r.useEffect)(()=>{V.current=S,U.current=C,z.current=o},[S,C,o]);const W=Object(r.useCallback)(()=>!y&&(T.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!v.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[y,T.hasError,v.hasError]);Object(r.useEffect)(()=>{let e;return x||(e=t(W,0)),()=>{x||e()}},[t,W,x]),Object(r.useEffect)(()=>{z.current&&(window.location.href=z.current)},[p]);const X=Object(r.useCallback)(async()=>{if(H)return;G(!0),B("checkout");const e=N?{payment_method:q,payment_data:h(A,D,R)}:{},t={billing_address:Object(m.a)(V.current),shipping_address:Object(m.a)(U.current),customer_note:f,should_create_account:k,...e,extensions:{...w}};b()({path:"/wc/store/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(O(e.headers,c),!e.ok)throw new Error(e);return e.json()}).then(e=>{c.setAfterProcessing(e),G(!1)}).catch(e=>{try{null!=e&&e.headers&&O(e.headers,c),e.json().then(e=>{var t,r,o;null!==(t=e.data)&&void 0!==t&&t.cart&&P(e.data.cart),L(Object(g.b)(e),{id:"checkout"}),null==e||null===(r=e.additional_errors)||void 0===r||null===(o=r.forEach)||void 0===o||o.call(r,e=>{L(e.message,{id:e.error_code})}),c.setAfterProcessing(e)})}catch{var t;L(Object(d.sprintf)(// Translators: %s Error text.
26
  Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout"})}c.setHasError(!0),G(!1)})},[H,B,f,k,N,q,A,D,R,w,c,L,P]);return Object(r.useEffect)(()=>{Y&&!H&&X()},[X,Y,H]),null};const k=e=>{let{children:t,isCart:c=!1,redirectUrl:d}=e;return Object(r.createElement)(u.a,{redirectUrl:d,isCart:c},Object(r.createElement)(i.a,null,Object(r.createElement)(l.a,null,Object(r.createElement)(a.a,null,t,Object(r.createElement)(s.a,{renderError:n.CURRENT_USER_IS_ADMIN?null:()=>null},Object(r.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(r.createElement)(f,null)))))}},function(e,t,c){"use strict";var r=c(0),o=c(6),n=c(14);c(214);var s=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(r.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",c=t?"wc-block-components-product-details__"+Object(o.kebabCase)(t):"";return Object(r.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"wc-block-components-product-details__name"},Object(n.decodeEntities)(t),":")," "),Object(r.createElement)("span",{className:"wc-block-components-product-details__value"},Object(n.decodeEntities)(e.display||e.value)))}))):null},a=c(129),l=c(25),i=e=>{let{className:t,shortDescription:c="",fullDescription:o=""}=e;const n=c||o;return n?Object(r.createElement)(a.a,{className:t,source:n,maxLength:15,countType:l.o.wordCountType||"words"}):null};c(213),t.a=e=>{let{shortDescription:t="",fullDescription:c="",itemData:o=[],variation:n=[]}=e;return Object(r.createElement)("div",{className:"wc-block-components-product-metadata"},Object(r.createElement)(i,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:c}),Object(r.createElement)(s,{details:o}),Object(r.createElement)(s,{details:n.map(e=>{let{attribute:t="",value:c}=e;return{key:t,value:c}})}))}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return x}));var r=c(1),o=c(35),n=c(0),s=c(4),a=c.n(s),l=c(18),i=Object(n.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),u=c(205),d=c(399),p=Object(n.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(n.createElement)("path",{d:"M0 0h24v24H0z"}),Object(n.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"}),Object(n.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"}))),b=c(43),m=c(85);c(228);const g={bank:i,bill:u.a,card:d.a,checkPayment:p};var h=e=>{let{icon:t="",text:c=""}=e;const r=!!t,o=Object(n.useCallback)(e=>r&&Object(m.c)(e)&&Object(m.d)(g,e),[r]),s=a()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":r});return Object(n.createElement)("span",{className:s},o(t)?Object(n.createElement)(b.a,{srcElement:g[t]}):t,c)},O=c(184),j=c(2),E=c(65),_=c.n(E),f=c(66),k=c(193),w=c(36),y=c(183),v=c(44),S=c(50),C=c(189),N=c(67),P=c(56);const R=(e,t)=>{const c=[],o=(t,c)=>{const r=c+"_tax",o=Object(m.d)(e,c)&&Object(m.c)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:o,valueWithTax:o+(Object(m.d)(e,r)&&Object(m.c)(e[r])?parseInt(e[r],10):0)}};return c.push(o(Object(r.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(o(Object(r.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(o(Object(r.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(r.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(o(Object(r.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c},x=()=>{const{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:l,onCheckoutAfterProcessingWithSuccess:i,onCheckoutAfterProcessingWithError:u,onSubmit:d,customerId:p}=Object(S.b)(),{currentStatus:b,activePaymentMethod:m,onPaymentProcessing:g,setExpressPaymentError:E,shouldSavePayment:x}=Object(C.b)(),{shippingErrorStatus:T,shippingErrorTypes:A,shippingRates:I,shippingRatesLoading:M,selectedRates:D,setSelectedRates:L,isSelectingRate:B,onShippingRateSuccess:F,onShippingRateFail:V,onShippingRateSelectSuccess:U,onShippingRateSelectFail:z,needsShipping:H}=Object(N.b)(),{billingData:G,shippingAddress:q,setShippingAddress:$}=Object(P.b)(),{cartItems:Y,cartFees:W,cartTotals:X,extensions:K}=Object(w.a)(),{appliedCoupons:J}=Object(y.a)(),{noticeContexts:Q,responseTypes:Z}=Object(v.c)(),ee=Object(n.useRef)(R(X,H)),te=Object(n.useRef)({label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(X.total_price,10)});Object(n.useEffect)(()=>{ee.current=R(X,H),te.current={label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(X.total_price,10)}},[X,H]);const ce=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";_()("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"}),E(e)}),[E]);return{activePaymentMethod:m,billing:{appliedCoupons:J,billingData:G,cartTotal:te.current,cartTotalItems:ee.current,currency:Object(o.getCurrencyFromPriceResponse)(X),customerId:p,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:Y,cartFees:W,extensions:K},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s},components:{LoadingMask:f.a,PaymentMethodIcons:O.a,PaymentMethodLabel:h,ValidationInputError:k.a},emitResponse:{noticeContexts:Q,responseTypes:Z},eventRegistration:{onCheckoutAfterProcessingWithError:u,onCheckoutAfterProcessingWithSuccess:i,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:l,onPaymentProcessing:g,onShippingRateFail:V,onShippingRateSelectFail:z,onShippingRateSelectSuccess:U,onShippingRateSuccess:F},onSubmit:d,paymentStatus:b,setExpressPaymentError:ce,shippingData:{isSelectingRate:B,needsShipping:H,selectedRates:D,setSelectedRates:L,setShippingAddress:$,shippingAddress:q,shippingRates:I,shippingRatesLoading:M},shippingStatus:{shippingErrorStatus:T,shippingErrorTypes:A},shouldSavePayment:x}}},function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"a",(function(){return i}));var r=c(0),o=(c(10),c(9)),n=c(4),s=c.n(n);const a=Object(r.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),l=()=>Object(r.useContext)(a),i=e=>{let{children:t,className:c=""}=e;const[n,l]=(()=>{const[e,{width:t}]=Object(o.useResizeObserver)();let c="";return t>700?c="is-large":t>520?c="is-medium":t>400?c="is-small":t&&(c="is-mobile"),[e,c]})(),i={hasContainerWidth:""!==l,containerClassName:l,isMobile:"is-mobile"===l,isSmall:"is-small"===l,isMedium:"is-medium"===l,isLarge:"is-large"===l};return Object(r.createElement)(a.Provider,{value:i},Object(r.createElement)("div",{className:s()(c,l)},n,t))}},function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(1),a=c(8),l=c(4),i=c.n(l),u=c(112),d=c(193),p=c(9),b=c(85),m=c(30);c(170);var g=Object(a.forwardRef)((e,t)=>{let{className:c,id:r,type:s="text",ariaLabel:a,ariaDescribedBy:l,label:u,screenReaderLabel:d,disabled:p,help:b,autoCapitalize:g="off",autoComplete:h="off",value:O="",onChange:j,required:E=!1,onBlur:_=(()=>{}),feedback:f,...k}=e;const[w,y]=Object(n.useState)(!1);return Object(n.createElement)("div",{className:i()("wc-block-components-text-input",c,{"is-active":w||O})},Object(n.createElement)("input",o()({type:s,id:r,value:O,ref:t,autoCapitalize:g,autoComplete:h,onChange:e=>{j(e.target.value)},onFocus:()=>y(!0),onBlur:e=>{_(e.target.value),y(!1)},"aria-label":a||u,disabled:p,"aria-describedby":b&&!l?r+"__help":l,required:E},k)),Object(n.createElement)(m.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:r},htmlFor:r}),!!b&&Object(n.createElement)("p",{id:r+"__help",className:"wc-block-components-text-input__help"},b),f)});t.a=Object(p.withInstanceId)(e=>{let{className:t,instanceId:c,id:r,ariaDescribedBy:l,errorId:p,focusOnMount:m=!1,onChange:h,showError:O=!0,errorMessage:j="",value:E="",..._}=e;const[f,k]=Object(a.useState)(!0),w=Object(a.useRef)(null),{getValidationError:y,hideValidationError:v,setValidationErrors:S,clearValidationError:C,getValidationErrorId:N}=Object(u.b)(),P=void 0!==r?r:"textinput-"+c,R=void 0!==p?p:P,x=Object(a.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=w.current||null;if(!t)return;t.value=t.value.trim();const c=t.checkValidity();c?C(R):S({[R]:{message:t.validationMessage||Object(s.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[C,R,S]);Object(a.useEffect)(()=>{var e;f&&m&&(null===(e=w.current)||void 0===e||e.focus()),k(!1)},[m,f,k]),Object(a.useEffect)(()=>{var e,t;(null===(e=w.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==w.current&&x(!0)},[E,x]),Object(a.useEffect)(()=>()=>{C(R)},[C,R]);const T=y(R)||{};Object(b.c)(j)&&""!==j&&(T.message=j);const A=T.message&&!T.hidden,I=O&&A&&N(R)?N(R):l;return Object(n.createElement)(g,o()({className:i()(t,{"has-error":A}),"aria-invalid":!0===A,id:P,onBlur:()=>{x(!1)},feedback:O&&Object(n.createElement)(d.a,{errorMessage:j,propertyName:R}),ref:w,onChange:e=>{v(R),h(e)},ariaDescribedBy:I,value:E},_))})},,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return a}));const r=window.CustomEvent||null,o=(e,t)=>{let{bubbles:c=!1,cancelable:o=!1,element:n,detail:s={}}=t;if(!r)return;n||(n=document.body);const a=new r(e,{bubbles:c,cancelable:o,detail:s});n.dispatchEvent(a)};let n;const s=()=>{n&&clearTimeout(n),n=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const n=()=>{o(t,{bubbles:c,cancelable:r})};return jQuery(document).on(e,n),()=>jQuery(document).off(e,n)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"c",(function(){return a})),c.d(t,"a",(function(){return l}));var r=c(2),o=c(98),n=c(15);const s=e=>{let{country:t="",state:c="",city:r="",postcode:o=""}=e;return{country:t.trim(),state:c.trim(),city:r.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},a=e=>{let{email:t=""}=e;return Object(n.isEmail)(t)?t.trim():""},l=e=>{const t=Object.keys(r.defaultAddressFields),c=Object(o.a)(t,{},e.country),n=Object.assign({},e);return c.forEach(t=>{let{key:c="",hidden:r=!1}=t;r&&((e,t)=>e in t)(c,e)&&(n[c]="")}),n}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(107);const o=(e,t)=>function(c){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=r.a.addEventCallback(e,c,o);return t(n),()=>{t(r.a.removeEventCallback(e,n.id))}}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return s}));const r=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=c(44);const n=async(e,t,c)=>{const o=r(e,t),n=[];for(const e of o)try{const t=await Promise.resolve(e.callback(c));"object"==typeof t&&n.push(t)}catch(e){console.error(e)}return!n.length||n},s=async(e,t,c)=>{const n=[],s=r(e,t);for(const e of s)try{const t=await Promise.resolve(e.callback(c));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return n.push(t),n;n.push(t)}catch(e){return console.error(e),n.push({type:"error"}),n}return n}},,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(0),o=c(13),n=c(12),s=c(6);const a=e=>{let{clientId:t,registeredBlocks:c,defaultTemplate:a=[]}=e;const l=Object(r.useRef)(c),i=Object(r.useRef)(a),{insertBlock:u,replaceInnerBlocks:d}=Object(o.useDispatch)("core/block-editor"),{innerBlocks:p,registeredBlockTypes:b}=Object(o.useSelect)(e=>({innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:l.current.map(e=>Object(n.getBlockType)(e))}),[t,l.current]),m=Object(r.useCallback)((e,c)=>{const r=Object(n.createBlock)(e.name);u(r,c,t,!1)},[t,u]),g=Object(r.useMemo)(()=>b.filter(e=>e&&(e=>{var t,c,r;let{attributes:o}=e;return Boolean((null===(t=o.lock)||void 0===t?void 0:t.remove)||(null===(c=o.lock)||void 0===c||null===(r=c.default)||void 0===r?void 0:r.remove))})(e)),[b]);Object(r.useLayoutEffect)(()=>{if(t){if(0===p.length&&i.current.length>0){const e=Object(n.createBlocksFromInnerBlocksTemplate)(i.current);if(!Object(s.isEqual)(e,p))return void d(t,e)}g.forEach(e=>{if(p.find(t=>{let{name:c}=t;return c===e.name}))return;const t=i.current.findIndex(t=>{let[c]=t;return c===e.name});switch(t){case-1:m(e,p.length);break;case 0:m(e,0);break;default:const c=i.current[t-1],r=p.findIndex(e=>{let{name:t}=e;return t===c[0]});m(e,-1===r?t:r+1)}})}},[t,p,g,d,m])}},function(e,t,c){"use strict";c.d(t,"a",(function(){return d}));var r=c(0),o=c(3),n=c(1),s=c(2);const a=[];var l=c(5),i=c.n(l),u=e=>Object(r.createElement)("div",i()({className:"wc-block-welcome-guide__image",style:{display:"flex",justifyContent:"center",alignItems:"center"}},e),Object(r.createElement)("svg",{height:"120",viewBox:"0 0 170 120",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("g",{filter:"url(#filter0_ddd)"},Object(r.createElement)("rect",{x:"5.5",y:"18",width:"159",height:"96",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"24.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"94.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"})),Object(r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.8908 42H125.078C129.899 42 133.802 45.9231 133.802 50.7692V80C133.802 84.8462 129.899 88.7692 125.078 88.7692H97.756L101.506 98L85.0135 88.7692H48.929C44.1076 88.7692 40.2045 84.8462 40.2045 80V50.7692C40.1662 45.9615 44.0693 42 48.8908 42Z",fill:"#7F54B3"}),Object(r.createElement)("path",{d:"M44.8709 50.723C45.4039 50.0175 46.2033 49.6462 47.2693 49.5719C49.2108 49.4234 50.3149 50.3145 50.5814 52.2453C51.7615 60.0056 53.0559 66.5778 54.4264 71.9617L62.7637 56.4782C63.5251 55.0673 64.4768 54.3246 65.6189 54.2504C67.294 54.139 68.3219 55.1786 68.7406 57.3694C69.6924 62.3077 70.9106 66.5035 72.3573 70.0681C73.3471 60.6369 75.0222 53.8419 77.3825 49.6462C77.9535 48.6065 78.7911 48.0867 79.8951 48.0124C80.7707 47.9382 81.5702 48.1981 82.2935 48.755C83.0168 49.312 83.3975 50.0175 83.4736 50.8715C83.5117 51.5398 83.3975 52.0968 83.0929 52.6538C81.6082 55.3272 80.39 59.82 79.4002 66.0579C78.4484 72.1102 78.1058 76.8258 78.3342 80.2047C78.4104 81.133 78.2581 81.9499 77.8774 82.6553C77.4205 83.4722 76.7353 83.9178 75.8597 83.9921C74.8699 84.0663 73.842 83.6207 72.8522 82.6182C69.3117 79.0908 66.4945 73.8183 64.4388 66.8006C61.9642 71.5533 60.1369 75.1178 58.9567 77.4942C56.7106 81.69 54.8071 83.8435 53.2082 83.9549C52.1803 84.0292 51.3047 83.1752 50.5433 81.3929C48.6017 76.5288 46.5079 67.1347 44.2618 53.2107C44.1476 52.2453 44.3379 51.3913 44.8709 50.723Z",fill:"white"}),Object(r.createElement)("path",{d:"M126.922 56.5426C125.536 54.1968 123.495 52.7819 120.761 52.2234C120.029 52.0745 119.336 52 118.681 52C114.985 52 111.981 53.8617 109.632 57.5851C107.63 60.75 106.629 64.25 106.629 68.0851C106.629 70.9521 107.245 73.4096 108.477 75.4574C109.863 77.8032 111.904 79.2181 114.638 79.7766C115.37 79.9255 116.063 80 116.717 80C120.453 80 123.456 78.1383 125.767 74.4149C127.769 71.2128 128.77 67.7128 128.77 63.8777C128.77 60.9734 128.154 58.5532 126.922 56.5426ZM122.07 66.8564C121.531 69.3138 120.568 71.1383 119.143 72.367C118.027 73.3351 116.987 73.7447 116.024 73.5585C115.1 73.3723 114.33 72.5904 113.752 71.1383C113.29 69.984 113.059 68.8298 113.059 67.75C113.059 66.8192 113.136 65.8883 113.329 65.0319C113.675 63.5053 114.33 62.016 115.37 60.6011C116.64 58.7766 117.988 58.0319 119.374 58.2925C120.299 58.4787 121.069 59.2606 121.646 60.7128C122.108 61.867 122.339 63.0213 122.339 64.1011C122.339 65.0691 122.224 66 122.07 66.8564Z",fill:"white"}),Object(r.createElement)("path",{d:"M102.767 56.5426C101.381 54.1968 99.3018 52.7819 96.6063 52.2234C95.8747 52.0745 95.1816 52 94.5269 52C90.8303 52 87.8267 53.8617 85.4778 57.5851C83.4755 60.75 82.4743 64.25 82.4743 68.0851C82.4743 70.9521 83.0904 73.4096 84.3226 75.4574C85.7089 77.8032 87.7497 79.2181 90.4837 79.7766C91.2153 79.9255 91.9085 80 92.5631 80C96.2983 80 99.3018 78.1383 101.612 74.4149C103.615 71.2128 104.616 67.7128 104.616 63.8777C104.616 60.9734 104 58.5532 102.767 56.5426ZM97.9155 66.8564C97.3765 69.3138 96.4138 71.1383 94.989 72.367C93.8723 73.3351 92.8326 73.7447 91.87 73.5585C90.9458 73.3723 90.1757 72.5904 89.5981 71.1383C89.136 69.984 88.9049 68.8298 88.9049 67.75C88.9049 66.8192 88.9819 65.8883 89.1745 65.0319C89.521 63.5053 90.1757 62.016 91.2153 60.6011C92.4861 58.7766 93.8338 58.0319 95.2201 58.2925C96.1442 58.4787 96.9144 59.2606 97.492 60.7128C97.9541 61.867 98.1851 63.0213 98.1851 64.1011C98.1851 65.0691 98.1081 66 97.9155 66.8564Z",fill:"white"}),Object(r.createElement)("defs",null,Object(r.createElement)("filter",{id:"filter0_ddd",x:"0.5",y:"0",width:"169",height:"120",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(r.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"2.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect1_dropShadow",result:"effect2_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"2"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),Object(r.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect3_dropShadow",result:"shape"})))));function d(e){let{blockName:t}=e;const[c,l]=(e=>{const[t,c]=((e,t)=>{const[c,o]=Object(r.useState)(()=>{const c=window.localStorage.getItem(e);if(c)try{return JSON.parse(c)}catch{console.error(`Value for key '${e}' could not be retrieved from localStorage because it can't be parsed.`)}return t});return Object(r.useEffect)(()=>{try{window.localStorage.setItem(e,JSON.stringify(c))}catch{console.error(`Value for key '${e}' could not be saved in localStorage because it can't be converted into a string.`)}},[e,c]),[c,o]})("wc-blocks_dismissed_compatibility_notices",a),[o,n]=Object(r.useState)(!1),s=t.includes(e);return Object(r.useEffect)(()=>{n(!s)},[s]),[o,()=>{const r=new Set(t);r.add(e),c([...r])}]})(t);return Object(s.isWpVersion)("5.4","<=")||!c?null:Object(r.createElement)(o.Guide,{className:"wc-block-welcome-guide",contentLabel:Object(n.__)("Compatibility notice","woo-gutenberg-products-block"),onFinish:()=>l(),finishButtonText:Object(n.__)("Got it!","woo-gutenberg-products-block"),pages:[{image:Object(r.createElement)(u,null),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"wc-block-welcome-guide__heading"},Object(n.__)("Compatibility notice","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(n.__)("This block may not be compatible with <em>all</em> checkout extensions and integrations.","woo-gutenberg-products-block"),{em:Object(r.createElement)("em",null)})),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(n.__)("We recommend reviewing our <a>expanding list</a> of compatible extensions prior to using this block on a live store.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:"https://docs.woocommerce.com/document/cart-checkout-blocks-support-status/",target:"_blank",rel:"noopener noreferrer"})})))}]})}},,,,,,,,,,,,,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-fields-block","version":"1.0.0","title":"Checkout Fields","description":"Column containing checkout address fields.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-totals-block","version":"1.0.0","title":"Checkout Totals","description":"Column containing the checkout totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-address-block","version":"1.0.0","title":"Shipping Address","description":"Collect your customer\'s shipping address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-terms-block","version":"1.0.0","title":"Terms and Conditions","description":"Ensure customers agree to your terms and conditions and privacy policy.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-contact-information-block","version":"1.0.0","title":"Contact Information","description":"Collect your customer\'s contact information.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-billing-address-block","version":"1.0.0","title":"Billing Address","description":"Collect your customer\'s billing address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-actions-block","version":"1.0.0","title":"Actions","description":"Allow customers to place their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-note-block","version":"1.0.0","title":"Order Note","description":"Allow customers to add a note to their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/checkout-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-payment-block","version":"1.0.0","title":"Payment Options","description":"Payment options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-methods-block","version":"1.0.0","title":"Shipping Options","description":"Shipping options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(r.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=n},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},Object(r.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M2 .75h12c.69 0 1.25.56 1.25 1.25v12c0 .69-.56 1.25-1.25 1.25H2c-.69 0-1.25-.56-1.25-1.25V2C.75 1.31 1.31.75 2 .75z"}),Object(r.createElement)("path",{fill:"currentColor",d:"M12 6H4V4.75h8zM12 9H4V7.75h8zM10 12H4v-1.25h6z"})));t.a=n},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(12);const o=["core/paragraph","core/image","core/separator"],n=e=>[...Object(r.getBlockTypes)().filter(t=>((null==t?void 0:t.parent)||[]).includes(e)).map(e=>{let{name:t}=e;return t}),...o]},function(e,t,c){"use strict";var r=c(0),o=c(4),n=c.n(o),s=(c(10),c(241));c(210),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)(s.a,{className:n()("wc-block-components-sidebar-layout",c)},t)}},function(e,t,c){"use strict";var r=c(0),o=c(8),n=c(4),s=c.n(n);const a=Object(o.forwardRef)((e,t)=>{let{children:c,className:o=""}=e;return Object(r.createElement)("div",{ref:t,className:s()("wc-block-components-main",o)},c)});t.a=a},,,function(e,t,c){"use strict";var r=c(0),o=c(8),n=c(4),s=c.n(n);const a=Object(o.forwardRef)((e,t)=>{let{children:c,className:o=""}=e;return Object(r.createElement)("div",{ref:t,className:s()("wc-block-components-sidebar",o)},c)});t.a=a},function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},Object(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"}),Object(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"}),Object(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"}));t.a=n},,,,,function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(66),s=c(185),a=c(19),l=c(2);c(216);const i={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:c,isRemovingCoupon:u,removeCoupon:d,values:p}=e;const{total_discount:b,total_discount_tax:m}=p,g=parseInt(b,10);if(!g&&0===t.length)return null;const h=parseInt(m,10),O=Object(l.getSetting)("displayCartPricesIncludingTax",!1)?g+h:g,j=Object(a.__experimentalApplyCheckoutFilter)({arg:i,filterName:"coupons",defaultValue:t});return Object(r.createElement)(a.TotalsItem,{className:"wc-block-components-totals-discount",currency:c,description:0!==j.length&&Object(r.createElement)(n.a,{screenReaderLabel:Object(o.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},Object(r.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},j.map(e=>Object(r.createElement)(s.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(o.sprintf)(
20
  /* translators: %s text of the chip to remove. */
21
  Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const O={"aria-label":t,disabled:r,onClick:s,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||s()}},j=p?O:{},E=p?{"aria-hidden":!0}:O;return Object(n.createElement)(d,o()({},g,j,{className:a()(c,"is-removable"),element:p?"button":g.element,screenReaderText:m,text:b}),Object(n.createElement)(h,o()({className:"wc-block-components-chip__remove"},E),Object(n.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",srcElement:u.a,size:16})))}},,function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return a}));var r=c(40),o=c(189);const n=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:n,expressPaymentMethodsInitialized:s}=Object(o.b)(),a=Object(r.a)(t),l=Object(r.a)(c);return{paymentMethods:e?l:a,isInitialized:e?s:n}},s=()=>n(!1),a=()=>n(!0)},,function(e,t,c){"use strict";c.d(t,"b",(function(){return D})),c.d(t,"a",(function(){return L}));var r=c(0),o=c(85);let n,s;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(n||(n={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(s||(s={}));const a={currentStatus:n.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},l={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:n,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,paymentMethodData:c,shouldSavePaymentMethod:r=!1,errorMessage:o="",paymentMethods:l={},paymentMethod:i=""}=arguments.length>1?arguments[1]:void 0;switch(t){case n.PRISTINE:return{...a,...e,errorMessage:"",currentStatus:n.PRISTINE};case n.STARTED:return{...e,currentStatus:n.STARTED};case n.ERROR:return e.currentStatus!==n.ERROR?{...e,currentStatus:n.ERROR,errorMessage:o||e.errorMessage}:e;case n.FAILED:return e.currentStatus!==n.FAILED?{...e,currentStatus:n.FAILED,paymentMethodData:c||e.paymentMethodData,errorMessage:o||e.errorMessage}:e;case n.SUCCESS:return e.currentStatus!==n.SUCCESS?{...e,currentStatus:n.SUCCESS,paymentMethodData:c||e.paymentMethodData}:e;case n.PROCESSING:return e.currentStatus!==n.PROCESSING?{...e,currentStatus:n.PROCESSING,errorMessage:""}:e;case n.COMPLETE:return e.currentStatus!==n.COMPLETE?{...e,currentStatus:n.COMPLETE}:e;case s.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:l};case s.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:l};case s.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:r};case s.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:i,paymentMethodData:c||e.paymentMethodData}}},u=c(1),d=c(39),p=c(40),b=c(2),m=c(116),g=c(49),h=c(67),O=c(56),j=c(36),E=c(47),_=c(44);const f=(e,t,c,o)=>{const[n,s]=Object(r.useState)(!1),{isEditor:a}=Object(g.b)(),{selectedRates:l}=Object(h.b)(),{billingData:i,shippingAddress:d}=Object(O.b)(),_=Object(p.a)(l),f=Object(p.a)(c),k=Object(j.a)(),{cartTotals:w,cartIsLoading:y,cartNeedsShipping:v,paymentRequirements:S}=k,C=Object(r.useRef)({cart:k,cartTotals:w,cartNeedsShipping:v,billingData:i,shippingAddress:d,selectedShippingMethods:_,paymentRequirements:S}),{addErrorNotice:N}=Object(E.a)();Object(r.useEffect)(()=>{C.current={cart:k,cartTotals:w,cartNeedsShipping:v,billingData:i,shippingAddress:d,selectedShippingMethods:_,paymentRequirements:S}},[k,w,v,i,d,_,S]);const P=Object(r.useCallback)(async()=>{let c={};const r=e=>{c={...c,[e.name]:e}};for(let e=0;e<f.length;e++){const c=f[e],n=t[c];if(n)try{const e=!!a||await Promise.resolve(n.canMakePayment(C.current));if(e){if("object"==typeof e&&null!==e&&e.error)throw new Error(e.error.message);r(n)}}catch(e){if(b.CURRENT_USER_IS_ADMIN||a){const t=Object(u.sprintf)(
22
  /* translators: %s the id of the payment method being registered (bank transfer, Stripe...) */
23
+ Object(u.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),n.paymentMethodId);N(`${t} ${e}`,{context:o,id:`wc-${n.paymentMethodId}-registration-error`})}}}e(c),s(!0)},[N,e,a,o,f,t]),R=Object(m.a)(P,500,{leading:!0});return Object(r.useEffect)(()=>{y||R()},[R,k,_,i,y]),n},k=e=>({type:e}),w=e=>({type:n.ERROR,errorMessage:e}),y=e=>{let{errorMessage:t,paymentMethodData:c}=e;return{type:n.FAILED,errorMessage:t,paymentMethodData:c}},v=e=>{let{paymentMethodData:t}=e;return{type:n.SUCCESS,paymentMethodData:t}},S=e=>({type:s.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),C=e=>({type:s.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),N=e=>({type:s.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),P=(e,t)=>({type:s.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var R=c(50),x=c(107),T=c(251);var A=c(254),I=c(112);const M=Object(r.createContext)(l),D=()=>Object(r.useContext)(M),L=e=>{let{children:t}=e;const{isProcessing:c,isIdle:s,isCalculating:l,hasError:u}=Object(R.b)(),{isEditor:p,getPreviewData:m}=Object(g.b)(),{setValidationErrors:j}=Object(I.b)(),{addErrorNotice:D,removeNotice:L}=Object(E.a)(),{isSuccessResponse:B,isErrorResponse:F,isFailResponse:V,noticeContexts:U}=Object(_.c)(),[z,H]=Object(r.useReducer)(x.b,{}),{onPaymentProcessing:G}=(e=>Object(r.useMemo)(()=>({onPaymentProcessing:Object(T.a)("payment_processing",e)}),[e]))(H),q=Object(r.useRef)(z);Object(r.useEffect)(()=>{q.current=z},[z]);const[$,Y]=Object(r.useReducer)(i,a),{dispatchActions:W,setPaymentStatus:X}=(e=>{const{setBillingData:t}=Object(O.b)(),{setShippingAddress:c}=Object(h.b)();return{dispatchActions:Object(r.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(S(t))},setRegisteredExpressPaymentMethods:t=>{e(C(t))},setShouldSavePayment:t=>{e(N(t))},setActivePaymentMethod:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(P(t,c))}}),[e]),setPaymentStatus:Object(r.useCallback)(()=>({pristine:()=>e(k(n.PRISTINE)),started:()=>e(k(n.STARTED)),processing:()=>e(k(n.PROCESSING)),completed:()=>e(k(n.COMPLETE)),error:t=>e(w(t)),failed:function(c,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(y({errorMessage:c||"",paymentMethodData:r||{}}))},success:function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof n&&null!=n&&n.address&&c(n.address),e(v({paymentMethodData:r}))}}),[e,t,c])}})(Y),K=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:c}=Object(_.c)(),r=new Set([...Object(b.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return f(e,t,Array.from(r),c.PAYMENTS)})(W.setRegisteredPaymentMethods),J=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:c}=Object(_.c)();return f(e,t,Object.keys(t),c.EXPRESS_PAYMENTS)})(W.setRegisteredExpressPaymentMethods),Q=Object(r.useMemo)(()=>p?m("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(b.getSetting)("customerPaymentMethods",{}),c=Object.keys(t),r={};return c.forEach(c=>{const o=t[c].filter(t=>{var c;let{method:{gateway:r}}=t;return r in e&&(null===(c=e[r].supports)||void 0===c?void 0:c.showSavedCards)});o.length&&(r[c]=o)}),r}($.paymentMethods):{},[p,m,K,$.paymentMethods]),Z=Object(r.useCallback)(e=>{e?D(e,{id:"wc-express-payment-error",context:U.EXPRESS_PAYMENTS}):L("wc-express-payment-error",U.EXPRESS_PAYMENTS)},[D,U.EXPRESS_PAYMENTS,L]),ee=Object.keys($.expressPaymentMethods).includes($.activePaymentMethod),te=Object(r.useMemo)(()=>({isPristine:$.currentStatus===n.PRISTINE,isStarted:$.currentStatus===n.STARTED,isProcessing:$.currentStatus===n.PROCESSING,isFinished:[n.ERROR,n.FAILED,n.SUCCESS].includes($.currentStatus),hasError:$.currentStatus===n.ERROR,hasFailed:$.currentStatus===n.FAILED,isSuccessful:$.currentStatus===n.SUCCESS,isDoingExpressPayment:$.currentStatus!==n.PRISTINE&&ee}),[$.currentStatus,ee]);Object(r.useEffect)(()=>{const e=Object.keys($.paymentMethods);if(!K||!e.length)return;const t=[...e,...Object.keys($.expressPaymentMethods)];if($.activePaymentMethod&&t.includes($.activePaymentMethod))return;X().pristine();const c=Object.keys(Q).flatMap(e=>Q[e])[0]||void 0;if(c){const e=c.tokenId.toString(),t=c.method.gateway,r=`wc-${t}-payment-token`;W.setActivePaymentMethod(t,{token:e,payment_method:t,[r]:e,isSavedToken:!0})}else W.setActivePaymentMethod(Object.keys($.paymentMethods)[0])},[K,$.paymentMethods,$.expressPaymentMethods,W,X,$.activePaymentMethod,Q]),Object(r.useEffect)(()=>{!c||u||l||te.isFinished||X().processing()},[c,u,l,te.isFinished,X]),Object(r.useEffect)(()=>{s&&!te.isSuccessful&&X().pristine()},[s,te.isSuccessful,X]),Object(r.useEffect)(()=>{u&&te.isSuccessful&&X().pristine()},[u,te.isSuccessful,X]),Object(r.useEffect)(()=>{te.isProcessing&&(L("wc-payment-error",U.PAYMENTS),Object(A.b)(q.current,"payment_processing",{}).then(e=>{let t,c;var r,o,n,s,a,l;if(e.forEach(e=>{B(e)&&(t=e),(F(e)||V(e))&&(c=e)}),t&&!c)X().success(null===(r=t)||void 0===r||null===(o=r.meta)||void 0===o?void 0:o.paymentMethodData,null===(n=t)||void 0===n||null===(s=n.meta)||void 0===s?void 0:s.billingData,null===(a=t)||void 0===a||null===(l=a.meta)||void 0===l?void 0:l.shippingData);else if(c&&V(c)){var i,u,d,p,b,m;c.message&&c.message.length&&D(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=c)||void 0===m?void 0:m.messageContext)||U.PAYMENTS}),X().failed(null===(i=c)||void 0===i?void 0:i.message,null===(u=c)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=c)||void 0===p||null===(b=p.meta)||void 0===b?void 0:b.billingData)}else if(c){var g,h;c.message&&c.message.length&&D(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(h=c)||void 0===h?void 0:h.messageContext)||U.PAYMENTS}),X().error(c.message),j(null===(g=c)||void 0===g?void 0:g.validationErrors)}else X().success()}))},[te.isProcessing,j,X,L,U.PAYMENTS,B,V,F,D]);const ce="object"==typeof $.paymentMethodData&&Object(o.d)($.paymentMethodData,"token")?$.paymentMethodData.token+"":"",re={setPaymentStatus:X,currentStatus:te,paymentStatuses:n,paymentMethodData:$.paymentMethodData,errorMessage:$.errorMessage,activePaymentMethod:$.activePaymentMethod,activeSavedToken:ce,setActivePaymentMethod:W.setActivePaymentMethod,onPaymentProcessing:G,customerPaymentMethods:Q,paymentMethods:$.paymentMethods,expressPaymentMethods:$.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:J,setExpressPaymentError:Z,isExpressPaymentMethodActive:ee,shouldSavePayment:$.shouldSavePaymentMethod,setShouldSavePayment:W.setShouldSavePayment};return Object(r.createElement)(M.Provider,{value:re},t)}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0),o=(c(10),c(112));c(160);const n=e=>{let{errorMessage:t="",propertyName:c="",elementId:n=""}=e;const{getValidationError:s,getValidationErrorId:a}=Object(o.b)();if(!t||"string"!=typeof t){const e=s(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:a(n)},t))}},function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM20 4v13.17L18.83 16H4V4h16zM6 12h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"}));t.a=n},,,,,,,,,,,function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=n},,,function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(18);const a=Object(n.createElement)(e=>{let{className:t,size:c,...r}=e;return Object(n.createElement)(s.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:c,height:c},r),Object(n.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=a},,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(14),a=c(2);c(211),t.a=e=>{let{image:t={},fallbackAlt:c=""}=e;const r=t.thumbnail?{src:t.thumbnail,alt:Object(s.decodeEntities)(t.alt)||c||"Product Image"}:{src:a.PLACEHOLDER_IMG_SRC,alt:""};return Object(n.createElement)("img",o()({className:"wc-block-components-product-image"},r,{alt:r.alt}))}},function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(109);t.a=()=>Object(r.createElement)(n.a,{className:"wc-block-components-product-backorder-badge"},Object(o.__)("Available on backorder","woo-gutenberg-products-block"))},function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(109);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(r.createElement)(n.a,{className:"wc-block-components-product-low-stock-badge"},Object(o.sprintf)(
24
  /* translators: %d stock amount (number of items in stock for product) */
25
  Object(o.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},function(e,t,c){"use strict";c.d(t,"a",(function(){return k}));var r=c(0),o=c(181),n=c(2),s=c(114),a=c(189),l=c(67),i=c(56),u=c(50),d=c(1),p=c(11),b=c.n(p),m=c(248),g=c(28);const h=(e,t,c)=>{const r=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${c}-new-payment-method`;return r.push({key:o,value:t}),r},O=(e,t)=>{b.a.setNonce&&"function"==typeof b.a.setNonce&&b.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))};var j=c(112),E=c(36),_=c(47),f=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:c,redirectUrl:o,isProcessing:n,isBeforeProcessing:s,isComplete:p,orderNotes:f,shouldCreateAccount:k,extensionData:w}=Object(u.b)(),{hasValidationErrors:y}=Object(j.b)(),{shippingErrorStatus:v}=Object(l.b)(),{billingData:S,shippingAddress:C}=Object(i.b)(),{cartNeedsPayment:N,receiveCart:P}=Object(E.a)(),{activePaymentMethod:R,isExpressPaymentMethodActive:x,currentStatus:T,paymentMethodData:A,expressPaymentMethods:I,paymentMethods:M,shouldSavePayment:D}=Object(a.b)(),{addErrorNotice:L,removeNotice:B,setIsSuppressed:F}=Object(_.a)(),V=Object(r.useRef)(S),U=Object(r.useRef)(C),z=Object(r.useRef)(o),[H,G]=Object(r.useState)(!1),q=Object(r.useMemo)(()=>{var e;const t={...I,...M};return null==t||null===(e=t[R])||void 0===e?void 0:e.paymentMethodId},[R,I,M]),$=y&&!x||T.hasError||v.hasError,Y=!e&&!$&&(T.isSuccessful||!N)&&n;Object(r.useEffect)(()=>{F(x)},[x,F]),Object(r.useEffect)(()=>{$===e||!n&&!s||x||c.setHasError($)},[$,e,n,s,x,c]),Object(r.useEffect)(()=>{V.current=S,U.current=C,z.current=o},[S,C,o]);const W=Object(r.useCallback)(()=>!y&&(T.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!v.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[y,T.hasError,v.hasError]);Object(r.useEffect)(()=>{let e;return x||(e=t(W,0)),()=>{x||e()}},[t,W,x]),Object(r.useEffect)(()=>{z.current&&(window.location.href=z.current)},[p]);const X=Object(r.useCallback)(async()=>{if(H)return;G(!0),B("checkout");const e=N?{payment_method:q,payment_data:h(A,D,R)}:{},t={billing_address:Object(m.a)(V.current),shipping_address:Object(m.a)(U.current),customer_note:f,should_create_account:k,...e,extensions:{...w}};b()({path:"/wc/store/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(O(e.headers,c),!e.ok)throw new Error(e);return e.json()}).then(e=>{c.setAfterProcessing(e),G(!1)}).catch(e=>{try{null!=e&&e.headers&&O(e.headers,c),e.json().then(e=>{var t,r,o;null!==(t=e.data)&&void 0!==t&&t.cart&&P(e.data.cart),L(Object(g.b)(e),{id:"checkout"}),null==e||null===(r=e.additional_errors)||void 0===r||null===(o=r.forEach)||void 0===o||o.call(r,e=>{L(e.message,{id:e.error_code})}),c.setAfterProcessing(e)})}catch{var t;L(Object(d.sprintf)(// Translators: %s Error text.
26
  Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout"})}c.setHasError(!0),G(!1)})},[H,B,f,k,N,q,A,D,R,w,c,L,P]);return Object(r.useEffect)(()=>{Y&&!H&&X()},[X,Y,H]),null};const k=e=>{let{children:t,isCart:c=!1,redirectUrl:d}=e;return Object(r.createElement)(u.a,{redirectUrl:d,isCart:c},Object(r.createElement)(i.a,null,Object(r.createElement)(l.a,null,Object(r.createElement)(a.a,null,t,Object(r.createElement)(s.a,{renderError:n.CURRENT_USER_IS_ADMIN?null:()=>null},Object(r.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(r.createElement)(f,null)))))}},function(e,t,c){"use strict";var r=c(0),o=c(6),n=c(14);c(214);var s=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(r.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",c=t?"wc-block-components-product-details__"+Object(o.kebabCase)(t):"";return Object(r.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"wc-block-components-product-details__name"},Object(n.decodeEntities)(t),":")," "),Object(r.createElement)("span",{className:"wc-block-components-product-details__value"},Object(n.decodeEntities)(e.display||e.value)))}))):null},a=c(129),l=c(25),i=e=>{let{className:t,shortDescription:c="",fullDescription:o=""}=e;const n=c||o;return n?Object(r.createElement)(a.a,{className:t,source:n,maxLength:15,countType:l.o.wordCountType||"words"}):null};c(213),t.a=e=>{let{shortDescription:t="",fullDescription:c="",itemData:o=[],variation:n=[]}=e;return Object(r.createElement)("div",{className:"wc-block-components-product-metadata"},Object(r.createElement)(i,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:c}),Object(r.createElement)(s,{details:o}),Object(r.createElement)(s,{details:n.map(e=>{let{attribute:t="",value:c}=e;return{key:t,value:c}})}))}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return x}));var r=c(1),o=c(35),n=c(0),s=c(4),a=c.n(s),l=c(18),i=Object(n.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),u=c(205),d=c(399),p=Object(n.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(n.createElement)("path",{d:"M0 0h24v24H0z"}),Object(n.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"}),Object(n.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"}))),b=c(43),m=c(85);c(228);const g={bank:i,bill:u.a,card:d.a,checkPayment:p};var h=e=>{let{icon:t="",text:c=""}=e;const r=!!t,o=Object(n.useCallback)(e=>r&&Object(m.c)(e)&&Object(m.d)(g,e),[r]),s=a()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":r});return Object(n.createElement)("span",{className:s},o(t)?Object(n.createElement)(b.a,{srcElement:g[t]}):t,c)},O=c(184),j=c(2),E=c(65),_=c.n(E),f=c(66),k=c(193),w=c(36),y=c(183),v=c(44),S=c(50),C=c(189),N=c(67),P=c(56);const R=(e,t)=>{const c=[],o=(t,c)=>{const r=c+"_tax",o=Object(m.d)(e,c)&&Object(m.c)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:o,valueWithTax:o+(Object(m.d)(e,r)&&Object(m.c)(e[r])?parseInt(e[r],10):0)}};return c.push(o(Object(r.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(o(Object(r.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(o(Object(r.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(r.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(o(Object(r.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c},x=()=>{const{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:l,onCheckoutAfterProcessingWithSuccess:i,onCheckoutAfterProcessingWithError:u,onSubmit:d,customerId:p}=Object(S.b)(),{currentStatus:b,activePaymentMethod:m,onPaymentProcessing:g,setExpressPaymentError:E,shouldSavePayment:x}=Object(C.b)(),{shippingErrorStatus:T,shippingErrorTypes:A,shippingRates:I,shippingRatesLoading:M,selectedRates:D,setSelectedRates:L,isSelectingRate:B,onShippingRateSuccess:F,onShippingRateFail:V,onShippingRateSelectSuccess:U,onShippingRateSelectFail:z,needsShipping:H}=Object(N.b)(),{billingData:G,shippingAddress:q,setShippingAddress:$}=Object(P.b)(),{cartItems:Y,cartFees:W,cartTotals:X,extensions:K}=Object(w.a)(),{appliedCoupons:J}=Object(y.a)(),{noticeContexts:Q,responseTypes:Z}=Object(v.c)(),ee=Object(n.useRef)(R(X,H)),te=Object(n.useRef)({label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(X.total_price,10)});Object(n.useEffect)(()=>{ee.current=R(X,H),te.current={label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(X.total_price,10)}},[X,H]);const ce=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";_()("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"}),E(e)}),[E]);return{activePaymentMethod:m,billing:{appliedCoupons:J,billingData:G,cartTotal:te.current,cartTotalItems:ee.current,currency:Object(o.getCurrencyFromPriceResponse)(X),customerId:p,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:Y,cartFees:W,extensions:K},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s},components:{LoadingMask:f.a,PaymentMethodIcons:O.a,PaymentMethodLabel:h,ValidationInputError:k.a},emitResponse:{noticeContexts:Q,responseTypes:Z},eventRegistration:{onCheckoutAfterProcessingWithError:u,onCheckoutAfterProcessingWithSuccess:i,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:l,onPaymentProcessing:g,onShippingRateFail:V,onShippingRateSelectFail:z,onShippingRateSelectSuccess:U,onShippingRateSuccess:F},onSubmit:d,paymentStatus:b,setExpressPaymentError:ce,shippingData:{isSelectingRate:B,needsShipping:H,selectedRates:D,setSelectedRates:L,setShippingAddress:$,shippingAddress:q,shippingRates:I,shippingRatesLoading:M},shippingStatus:{shippingErrorStatus:T,shippingErrorTypes:A},shouldSavePayment:x}}},function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"a",(function(){return i}));var r=c(0),o=(c(10),c(9)),n=c(4),s=c.n(n);const a=Object(r.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),l=()=>Object(r.useContext)(a),i=e=>{let{children:t,className:c=""}=e;const[n,l]=(()=>{const[e,{width:t}]=Object(o.useResizeObserver)();let c="";return t>700?c="is-large":t>520?c="is-medium":t>400?c="is-small":t&&(c="is-mobile"),[e,c]})(),i={hasContainerWidth:""!==l,containerClassName:l,isMobile:"is-mobile"===l,isSmall:"is-small"===l,isMedium:"is-medium"===l,isLarge:"is-large"===l};return Object(r.createElement)(a.Provider,{value:i},Object(r.createElement)("div",{className:s()(c,l)},n,t))}},function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(1),a=c(8),l=c(4),i=c.n(l),u=c(112),d=c(193),p=c(9),b=c(85),m=c(30);c(170);var g=Object(a.forwardRef)((e,t)=>{let{className:c,id:r,type:s="text",ariaLabel:a,ariaDescribedBy:l,label:u,screenReaderLabel:d,disabled:p,help:b,autoCapitalize:g="off",autoComplete:h="off",value:O="",onChange:j,required:E=!1,onBlur:_=(()=>{}),feedback:f,...k}=e;const[w,y]=Object(n.useState)(!1);return Object(n.createElement)("div",{className:i()("wc-block-components-text-input",c,{"is-active":w||O})},Object(n.createElement)("input",o()({type:s,id:r,value:O,ref:t,autoCapitalize:g,autoComplete:h,onChange:e=>{j(e.target.value)},onFocus:()=>y(!0),onBlur:e=>{_(e.target.value),y(!1)},"aria-label":a||u,disabled:p,"aria-describedby":b&&!l?r+"__help":l,required:E},k)),Object(n.createElement)(m.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:r},htmlFor:r}),!!b&&Object(n.createElement)("p",{id:r+"__help",className:"wc-block-components-text-input__help"},b),f)});t.a=Object(p.withInstanceId)(e=>{let{className:t,instanceId:c,id:r,ariaDescribedBy:l,errorId:p,focusOnMount:m=!1,onChange:h,showError:O=!0,errorMessage:j="",value:E="",..._}=e;const[f,k]=Object(a.useState)(!0),w=Object(a.useRef)(null),{getValidationError:y,hideValidationError:v,setValidationErrors:S,clearValidationError:C,getValidationErrorId:N}=Object(u.b)(),P=void 0!==r?r:"textinput-"+c,R=void 0!==p?p:P,x=Object(a.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=w.current||null;if(!t)return;t.value=t.value.trim();const c=t.checkValidity();c?C(R):S({[R]:{message:t.validationMessage||Object(s.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[C,R,S]);Object(a.useEffect)(()=>{var e;f&&m&&(null===(e=w.current)||void 0===e||e.focus()),k(!1)},[m,f,k]),Object(a.useEffect)(()=>{var e,t;(null===(e=w.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==w.current&&x(!0)},[E,x]),Object(a.useEffect)(()=>()=>{C(R)},[C,R]);const T=y(R)||{};Object(b.c)(j)&&""!==j&&(T.message=j);const A=T.message&&!T.hidden,I=O&&A&&N(R)?N(R):l;return Object(n.createElement)(g,o()({className:i()(t,{"has-error":A}),"aria-invalid":!0===A,id:P,onBlur:()=>{x(!1)},feedback:O&&Object(n.createElement)(d.a,{errorMessage:j,propertyName:R}),ref:w,onChange:e=>{v(R),h(e)},ariaDescribedBy:I,value:E},_))})},,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return a}));const r=window.CustomEvent||null,o=(e,t)=>{let{bubbles:c=!1,cancelable:o=!1,element:n,detail:s={}}=t;if(!r)return;n||(n=document.body);const a=new r(e,{bubbles:c,cancelable:o,detail:s});n.dispatchEvent(a)};let n;const s=()=>{n&&clearTimeout(n),n=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const n=()=>{o(t,{bubbles:c,cancelable:r})};return jQuery(document).on(e,n),()=>jQuery(document).off(e,n)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"c",(function(){return a})),c.d(t,"a",(function(){return l}));var r=c(2),o=c(98),n=c(15);const s=e=>{let{country:t="",state:c="",city:r="",postcode:o=""}=e;return{country:t.trim(),state:c.trim(),city:r.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},a=e=>{let{email:t=""}=e;return Object(n.isEmail)(t)?t.trim():""},l=e=>{const t=Object.keys(r.defaultAddressFields),c=Object(o.a)(t,{},e.country),n=Object.assign({},e);return c.forEach(t=>{let{key:c="",hidden:r=!1}=t;r&&((e,t)=>e in t)(c,e)&&(n[c]="")}),n}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(107);const o=(e,t)=>function(c){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=r.a.addEventCallback(e,c,o);return t(n),()=>{t(r.a.removeEventCallback(e,n.id))}}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return s}));const r=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=c(44);const n=async(e,t,c)=>{const o=r(e,t),n=[];for(const e of o)try{const t=await Promise.resolve(e.callback(c));"object"==typeof t&&n.push(t)}catch(e){console.error(e)}return!n.length||n},s=async(e,t,c)=>{const n=[],s=r(e,t);for(const e of s)try{const t=await Promise.resolve(e.callback(c));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return n.push(t),n;n.push(t)}catch(e){return console.error(e),n.push({type:"error"}),n}return n}},,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(0),o=c(13),n=c(12),s=c(6);const a=e=>{let{clientId:t,registeredBlocks:c,defaultTemplate:a=[]}=e;const l=Object(r.useRef)(c),i=Object(r.useRef)(a),{insertBlock:u,replaceInnerBlocks:d}=Object(o.useDispatch)("core/block-editor"),{innerBlocks:p,registeredBlockTypes:b}=Object(o.useSelect)(e=>({innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:l.current.map(e=>Object(n.getBlockType)(e))}),[t,l.current]),m=Object(r.useCallback)((e,c)=>{const r=Object(n.createBlock)(e.name);u(r,c,t,!1)},[t,u]),g=Object(r.useMemo)(()=>b.filter(e=>e&&(e=>{var t,c,r;let{attributes:o}=e;return Boolean((null===(t=o.lock)||void 0===t?void 0:t.remove)||(null===(c=o.lock)||void 0===c||null===(r=c.default)||void 0===r?void 0:r.remove))})(e)),[b]);Object(r.useLayoutEffect)(()=>{if(t){if(0===p.length&&i.current.length>0){const e=Object(n.createBlocksFromInnerBlocksTemplate)(i.current);if(!Object(s.isEqual)(e,p))return void d(t,e)}g.forEach(e=>{if(p.find(t=>{let{name:c}=t;return c===e.name}))return;const t=i.current.findIndex(t=>{let[c]=t;return c===e.name});switch(t){case-1:m(e,p.length);break;case 0:m(e,0);break;default:const c=i.current[t-1],r=p.findIndex(e=>{let{name:t}=e;return t===c[0]});m(e,-1===r?t:r+1)}})}},[t,p,g,d,m])}},function(e,t,c){"use strict";c.d(t,"a",(function(){return d}));var r=c(0),o=c(3),n=c(1),s=c(2);const a=[];var l=c(5),i=c.n(l),u=e=>Object(r.createElement)("div",i()({className:"wc-block-welcome-guide__image",style:{display:"flex",justifyContent:"center",alignItems:"center"}},e),Object(r.createElement)("svg",{height:"120",viewBox:"0 0 170 120",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("g",{filter:"url(#filter0_ddd)"},Object(r.createElement)("rect",{x:"5.5",y:"18",width:"159",height:"96",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"24.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"94.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"})),Object(r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.8908 42H125.078C129.899 42 133.802 45.9231 133.802 50.7692V80C133.802 84.8462 129.899 88.7692 125.078 88.7692H97.756L101.506 98L85.0135 88.7692H48.929C44.1076 88.7692 40.2045 84.8462 40.2045 80V50.7692C40.1662 45.9615 44.0693 42 48.8908 42Z",fill:"#7F54B3"}),Object(r.createElement)("path",{d:"M44.8709 50.723C45.4039 50.0175 46.2033 49.6462 47.2693 49.5719C49.2108 49.4234 50.3149 50.3145 50.5814 52.2453C51.7615 60.0056 53.0559 66.5778 54.4264 71.9617L62.7637 56.4782C63.5251 55.0673 64.4768 54.3246 65.6189 54.2504C67.294 54.139 68.3219 55.1786 68.7406 57.3694C69.6924 62.3077 70.9106 66.5035 72.3573 70.0681C73.3471 60.6369 75.0222 53.8419 77.3825 49.6462C77.9535 48.6065 78.7911 48.0867 79.8951 48.0124C80.7707 47.9382 81.5702 48.1981 82.2935 48.755C83.0168 49.312 83.3975 50.0175 83.4736 50.8715C83.5117 51.5398 83.3975 52.0968 83.0929 52.6538C81.6082 55.3272 80.39 59.82 79.4002 66.0579C78.4484 72.1102 78.1058 76.8258 78.3342 80.2047C78.4104 81.133 78.2581 81.9499 77.8774 82.6553C77.4205 83.4722 76.7353 83.9178 75.8597 83.9921C74.8699 84.0663 73.842 83.6207 72.8522 82.6182C69.3117 79.0908 66.4945 73.8183 64.4388 66.8006C61.9642 71.5533 60.1369 75.1178 58.9567 77.4942C56.7106 81.69 54.8071 83.8435 53.2082 83.9549C52.1803 84.0292 51.3047 83.1752 50.5433 81.3929C48.6017 76.5288 46.5079 67.1347 44.2618 53.2107C44.1476 52.2453 44.3379 51.3913 44.8709 50.723Z",fill:"white"}),Object(r.createElement)("path",{d:"M126.922 56.5426C125.536 54.1968 123.495 52.7819 120.761 52.2234C120.029 52.0745 119.336 52 118.681 52C114.985 52 111.981 53.8617 109.632 57.5851C107.63 60.75 106.629 64.25 106.629 68.0851C106.629 70.9521 107.245 73.4096 108.477 75.4574C109.863 77.8032 111.904 79.2181 114.638 79.7766C115.37 79.9255 116.063 80 116.717 80C120.453 80 123.456 78.1383 125.767 74.4149C127.769 71.2128 128.77 67.7128 128.77 63.8777C128.77 60.9734 128.154 58.5532 126.922 56.5426ZM122.07 66.8564C121.531 69.3138 120.568 71.1383 119.143 72.367C118.027 73.3351 116.987 73.7447 116.024 73.5585C115.1 73.3723 114.33 72.5904 113.752 71.1383C113.29 69.984 113.059 68.8298 113.059 67.75C113.059 66.8192 113.136 65.8883 113.329 65.0319C113.675 63.5053 114.33 62.016 115.37 60.6011C116.64 58.7766 117.988 58.0319 119.374 58.2925C120.299 58.4787 121.069 59.2606 121.646 60.7128C122.108 61.867 122.339 63.0213 122.339 64.1011C122.339 65.0691 122.224 66 122.07 66.8564Z",fill:"white"}),Object(r.createElement)("path",{d:"M102.767 56.5426C101.381 54.1968 99.3018 52.7819 96.6063 52.2234C95.8747 52.0745 95.1816 52 94.5269 52C90.8303 52 87.8267 53.8617 85.4778 57.5851C83.4755 60.75 82.4743 64.25 82.4743 68.0851C82.4743 70.9521 83.0904 73.4096 84.3226 75.4574C85.7089 77.8032 87.7497 79.2181 90.4837 79.7766C91.2153 79.9255 91.9085 80 92.5631 80C96.2983 80 99.3018 78.1383 101.612 74.4149C103.615 71.2128 104.616 67.7128 104.616 63.8777C104.616 60.9734 104 58.5532 102.767 56.5426ZM97.9155 66.8564C97.3765 69.3138 96.4138 71.1383 94.989 72.367C93.8723 73.3351 92.8326 73.7447 91.87 73.5585C90.9458 73.3723 90.1757 72.5904 89.5981 71.1383C89.136 69.984 88.9049 68.8298 88.9049 67.75C88.9049 66.8192 88.9819 65.8883 89.1745 65.0319C89.521 63.5053 90.1757 62.016 91.2153 60.6011C92.4861 58.7766 93.8338 58.0319 95.2201 58.2925C96.1442 58.4787 96.9144 59.2606 97.492 60.7128C97.9541 61.867 98.1851 63.0213 98.1851 64.1011C98.1851 65.0691 98.1081 66 97.9155 66.8564Z",fill:"white"}),Object(r.createElement)("defs",null,Object(r.createElement)("filter",{id:"filter0_ddd",x:"0.5",y:"0",width:"169",height:"120",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(r.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"2.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect1_dropShadow",result:"effect2_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"2"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),Object(r.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect3_dropShadow",result:"shape"})))));function d(e){let{blockName:t}=e;const[c,l]=(e=>{const[t,c]=((e,t)=>{const[c,o]=Object(r.useState)(()=>{const c=window.localStorage.getItem(e);if(c)try{return JSON.parse(c)}catch{console.error(`Value for key '${e}' could not be retrieved from localStorage because it can't be parsed.`)}return t});return Object(r.useEffect)(()=>{try{window.localStorage.setItem(e,JSON.stringify(c))}catch{console.error(`Value for key '${e}' could not be saved in localStorage because it can't be converted into a string.`)}},[e,c]),[c,o]})("wc-blocks_dismissed_compatibility_notices",a),[o,n]=Object(r.useState)(!1),s=t.includes(e);return Object(r.useEffect)(()=>{n(!s)},[s]),[o,()=>{const r=new Set(t);r.add(e),c([...r])}]})(t);return Object(s.isWpVersion)("5.4","<=")||!c?null:Object(r.createElement)(o.Guide,{className:"wc-block-welcome-guide",contentLabel:Object(n.__)("Compatibility notice","woo-gutenberg-products-block"),onFinish:()=>l(),finishButtonText:Object(n.__)("Got it!","woo-gutenberg-products-block"),pages:[{image:Object(r.createElement)(u,null),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"wc-block-welcome-guide__heading"},Object(n.__)("Compatibility notice","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(n.__)("This block may not be compatible with <em>all</em> checkout extensions and integrations.","woo-gutenberg-products-block"),{em:Object(r.createElement)("em",null)})),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(n.__)("We recommend reviewing our <a>expanding list</a> of compatible extensions prior to using this block on a live store.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:"https://docs.woocommerce.com/document/cart-checkout-blocks-support-status/",target:"_blank",rel:"noopener noreferrer"})})))}]})}},,,,,,,,,,,,,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-fields-block","version":"1.0.0","title":"Checkout Fields","description":"Column containing checkout address fields.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-totals-block","version":"1.0.0","title":"Checkout Totals","description":"Column containing the checkout totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-address-block","version":"1.0.0","title":"Shipping Address","description":"Collect your customer\'s shipping address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-terms-block","version":"1.0.0","title":"Terms and Conditions","description":"Ensure customers agree to your terms and conditions and privacy policy.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-contact-information-block","version":"1.0.0","title":"Contact Information","description":"Collect your customer\'s contact information.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-billing-address-block","version":"1.0.0","title":"Billing Address","description":"Collect your customer\'s billing address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-actions-block","version":"1.0.0","title":"Actions","description":"Allow customers to place their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-note-block","version":"1.0.0","title":"Order Note","description":"Allow customers to add a note to their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/checkout-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-payment-block","version":"1.0.0","title":"Payment Options","description":"Payment options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-methods-block","version":"1.0.0","title":"Shipping Options","description":"Shipping options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(r.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=n},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},Object(r.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M2 .75h12c.69 0 1.25.56 1.25 1.25v12c0 .69-.56 1.25-1.25 1.25H2c-.69 0-1.25-.56-1.25-1.25V2C.75 1.31 1.31.75 2 .75z"}),Object(r.createElement)("path",{fill:"currentColor",d:"M12 6H4V4.75h8zM12 9H4V7.75h8zM10 12H4v-1.25h6z"})));t.a=n},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(12);const o=["core/paragraph","core/image","core/separator"],n=e=>[...Object(r.getBlockTypes)().filter(t=>((null==t?void 0:t.parent)||[]).includes(e)).map(e=>{let{name:t}=e;return t}),...o]},function(e,t,c){"use strict";var r=c(0),o=c(4),n=c.n(o),s=(c(10),c(241));c(210),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)(s.a,{className:n()("wc-block-components-sidebar-layout",c)},t)}},function(e,t,c){"use strict";var r=c(0),o=c(8),n=c(4),s=c.n(n);const a=Object(o.forwardRef)((e,t)=>{let{children:c,className:o=""}=e;return Object(r.createElement)("div",{ref:t,className:s()("wc-block-components-main",o)},c)});t.a=a},,,function(e,t,c){"use strict";var r=c(0),o=c(8),n=c(4),s=c.n(n);const a=Object(o.forwardRef)((e,t)=>{let{children:c,className:o=""}=e;return Object(r.createElement)("div",{ref:t,className:s()("wc-block-components-sidebar",o)},c)});t.a=a},function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},Object(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"}),Object(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"}),Object(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"}));t.a=n},,,,,function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(66),s=c(185),a=c(19),l=c(2);c(216);const i={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:c,isRemovingCoupon:u,removeCoupon:d,values:p}=e;const{total_discount:b,total_discount_tax:m}=p,g=parseInt(b,10);if(!g&&0===t.length)return null;const h=parseInt(m,10),O=Object(l.getSetting)("displayCartPricesIncludingTax",!1)?g+h:g,j=Object(a.__experimentalApplyCheckoutFilter)({arg:i,filterName:"coupons",defaultValue:t});return Object(r.createElement)(a.TotalsItem,{className:"wc-block-components-totals-discount",currency:c,description:0!==j.length&&Object(r.createElement)(n.a,{screenReaderLabel:Object(o.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},Object(r.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},j.map(e=>Object(r.createElement)(s.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(o.sprintf)(
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: gutenberg, woocommerce, woo commerce, products, blocks, woocommerce blocks
4
  Requires at least: 5.8
5
  Tested up to: 5.8
6
  Requires PHP: 7.0
7
- Stable tag: 6.7.0
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -85,6 +85,12 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/
85
 
86
  == Changelog ==
87
 
 
 
 
 
 
 
88
  = 6.7.0 - 2022-01-03 =
89
 
90
  #### Enhancements
4
  Requires at least: 5.8
5
  Tested up to: 5.8
6
  Requires PHP: 7.0
7
+ Stable tag: 6.7.1
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
85
 
86
  == Changelog ==
87
 
88
+ = 6.7.1 - 2022-01-07 =
89
+
90
+ #### Bug Fixes
91
+
92
+ - Convert token to string when setting the active payment method. ([5535](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/5535))
93
+
94
  = 6.7.0 - 2022-01-03 =
95
 
96
  #### Enhancements
src/Package.php CHANGED
@@ -106,7 +106,7 @@ class Package {
106
  NewPackage::class,
107
  function ( $container ) {
108
  // leave for automated version bumping.
109
- $version = '6.7.0';
110
  return new NewPackage(
111
  $version,
112
  dirname( __DIR__ ),
106
  NewPackage::class,
107
  function ( $container ) {
108
  // leave for automated version bumping.
109
+ $version = '6.7.1';
110
  return new NewPackage(
111
  $version,
112
  dirname( __DIR__ ),
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit445ed1c63c182bd7b2e3121a4cb08a40::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit5147cf7c90bd4261647138a13dee6eb4::getLoader();
vendor/autoload_packages.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jp445ed1c63c182bd7b2e3121a4cb08a40;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp5147cf7c90bd4261647138a13dee6eb4;
9
 
10
  // phpcs:ignore
11
 
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit445ed1c63c182bd7b2e3121a4cb08a40
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit445ed1c63c182bd7b2e3121a4cb08a40
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit445ed1c63c182bd7b2e3121a4cb08a40', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
27
- spl_autoload_unregister(array('ComposerAutoloaderInit445ed1c63c182bd7b2e3121a4cb08a40', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInit445ed1c63c182bd7b2e3121a4cb08a40::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit5147cf7c90bd4261647138a13dee6eb4
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit5147cf7c90bd4261647138a13dee6eb4', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit5147cf7c90bd4261647138a13dee6eb4', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit5147cf7c90bd4261647138a13dee6eb4::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit445ed1c63c182bd7b2e3121a4cb08a40
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'C' =>
@@ -41,9 +41,9 @@ class ComposerStaticInit445ed1c63c182bd7b2e3121a4cb08a40
41
  public static function getInitializer(ClassLoader $loader)
42
  {
43
  return \Closure::bind(function () use ($loader) {
44
- $loader->prefixLengthsPsr4 = ComposerStaticInit445ed1c63c182bd7b2e3121a4cb08a40::$prefixLengthsPsr4;
45
- $loader->prefixDirsPsr4 = ComposerStaticInit445ed1c63c182bd7b2e3121a4cb08a40::$prefixDirsPsr4;
46
- $loader->classMap = ComposerStaticInit445ed1c63c182bd7b2e3121a4cb08a40::$classMap;
47
 
48
  }, null, ClassLoader::class);
49
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit5147cf7c90bd4261647138a13dee6eb4
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'C' =>
41
  public static function getInitializer(ClassLoader $loader)
42
  {
43
  return \Closure::bind(function () use ($loader) {
44
+ $loader->prefixLengthsPsr4 = ComposerStaticInit5147cf7c90bd4261647138a13dee6eb4::$prefixLengthsPsr4;
45
+ $loader->prefixDirsPsr4 = ComposerStaticInit5147cf7c90bd4261647138a13dee6eb4::$prefixDirsPsr4;
46
+ $loader->classMap = ComposerStaticInit5147cf7c90bd4261647138a13dee6eb4::$classMap;
47
 
48
  }, null, ClassLoader::class);
49
  }
vendor/composer/installed.php CHANGED
@@ -5,7 +5,7 @@
5
  'type' => 'wordpress-plugin',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
- 'reference' => '15e57ab14dad9b994565916902843ccd30f900d1',
9
  'name' => 'woocommerce/woocommerce-blocks',
10
  'dev' => false,
11
  ),
@@ -46,7 +46,7 @@
46
  'type' => 'wordpress-plugin',
47
  'install_path' => __DIR__ . '/../../',
48
  'aliases' => array(),
49
- 'reference' => '15e57ab14dad9b994565916902843ccd30f900d1',
50
  'dev_requirement' => false,
51
  ),
52
  ),
5
  'type' => 'wordpress-plugin',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
+ 'reference' => 'e1d979f1fa6485f5bc4e41c380581a1ebaf48043',
9
  'name' => 'woocommerce/woocommerce-blocks',
10
  'dev' => false,
11
  ),
46
  'type' => 'wordpress-plugin',
47
  'install_path' => __DIR__ . '/../../',
48
  'aliases' => array(),
49
+ 'reference' => 'e1d979f1fa6485f5bc4e41c380581a1ebaf48043',
50
  'dev_requirement' => false,
51
  ),
52
  ),
vendor/composer/jetpack_autoload_psr4.php CHANGED
@@ -11,11 +11,11 @@ return array(
11
  'path' => array( $vendorDir . '/composer/installers/src/Composer/Installers' )
12
  ),
13
  'Automattic\\WooCommerce\\Blocks\\Tests\\' => array(
14
- 'version' => '6.7.0.0',
15
  'path' => array( $baseDir . '/tests/php' )
16
  ),
17
  'Automattic\\WooCommerce\\Blocks\\' => array(
18
- 'version' => '6.7.0.0',
19
  'path' => array( $baseDir . '/src' )
20
  ),
21
  'Automattic\\Jetpack\\Autoloader\\' => array(
11
  'path' => array( $vendorDir . '/composer/installers/src/Composer/Installers' )
12
  ),
13
  'Automattic\\WooCommerce\\Blocks\\Tests\\' => array(
14
+ 'version' => '6.7.1.0',
15
  'path' => array( $baseDir . '/tests/php' )
16
  ),
17
  'Automattic\\WooCommerce\\Blocks\\' => array(
18
+ 'version' => '6.7.1.0',
19
  'path' => array( $baseDir . '/src' )
20
  ),
21
  'Automattic\\Jetpack\\Autoloader\\' => array(
vendor/jetpack-autoloader/class-autoloader-handler.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jp445ed1c63c182bd7b2e3121a4cb08a40;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp5147cf7c90bd4261647138a13dee6eb4;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-autoloader-locator.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jp445ed1c63c182bd7b2e3121a4cb08a40;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp5147cf7c90bd4261647138a13dee6eb4;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-autoloader.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jp445ed1c63c182bd7b2e3121a4cb08a40;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp5147cf7c90bd4261647138a13dee6eb4;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-container.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jp445ed1c63c182bd7b2e3121a4cb08a40;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp5147cf7c90bd4261647138a13dee6eb4;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-hook-manager.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jp445ed1c63c182bd7b2e3121a4cb08a40;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp5147cf7c90bd4261647138a13dee6eb4;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-latest-autoloader-guard.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jp445ed1c63c182bd7b2e3121a4cb08a40;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp5147cf7c90bd4261647138a13dee6eb4;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-manifest-reader.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jp445ed1c63c182bd7b2e3121a4cb08a40;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp5147cf7c90bd4261647138a13dee6eb4;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-path-processor.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jp445ed1c63c182bd7b2e3121a4cb08a40;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp5147cf7c90bd4261647138a13dee6eb4;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-php-autoloader.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jp445ed1c63c182bd7b2e3121a4cb08a40;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp5147cf7c90bd4261647138a13dee6eb4;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-plugin-locator.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jp445ed1c63c182bd7b2e3121a4cb08a40;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp5147cf7c90bd4261647138a13dee6eb4;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-plugins-handler.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jp445ed1c63c182bd7b2e3121a4cb08a40;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp5147cf7c90bd4261647138a13dee6eb4;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-shutdown-handler.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jp445ed1c63c182bd7b2e3121a4cb08a40;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp5147cf7c90bd4261647138a13dee6eb4;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-version-loader.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jp445ed1c63c182bd7b2e3121a4cb08a40;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp5147cf7c90bd4261647138a13dee6eb4;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-version-selector.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jp445ed1c63c182bd7b2e3121a4cb08a40;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp5147cf7c90bd4261647138a13dee6eb4;
9
 
10
  // phpcs:ignore
11
 
woocommerce-gutenberg-products-block.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce Blocks
4
  * Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block
5
  * Description: WooCommerce blocks for the Gutenberg editor.
6
- * Version: 6.7.0
7
  * Author: Automattic
8
  * Author URI: https://woocommerce.com
9
  * Text Domain: woo-gutenberg-products-block
3
  * Plugin Name: WooCommerce Blocks
4
  * Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block
5
  * Description: WooCommerce blocks for the Gutenberg editor.
6
+ * Version: 6.7.1
7
  * Author: Automattic
8
  * Author URI: https://woocommerce.com
9
  * Text Domain: woo-gutenberg-products-block