this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["single-product"]=function(e){function t(t){for(var n,a,i=t[0],s=t[1],u=t[2],d=0,p=[];d0,"is-skip-level":0===c&&0!==t.parent,"is-variable":m>0});if(!t.breadcrumbs.length)return Object(u.createElement)(G.a,s()({},e,{className:H()(f,{"is-selected":i}),isSelected:i,item:t,onSelect:function(){return function(){b(t)()}},isLoading:a||O,countLabel:t.variations.length>0?Object(l.sprintf)( /* translators: %1$d is the number of variations of a product product. */ Object(l.__)("%1$d variations",'woocommerce'),t.variations.length):null,name:"products-".concat(n),"aria-label":Object(l.sprintf)( /* translators: %1$s is the product name, %2$d is the number of variations of that product. */ Object(l._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.variations.length,'woocommerce'),t.name,t.variations.length)}));var g=Object(d.isEmpty)(t.variation)?e:F(F({},e),{},{item:F(F({},e.item),{},{name:t.variation}),"aria-label":"".concat(t.breadcrumbs[0],": ").concat(t.variation)});return Object(u.createElement)(p.c,s()({},g,{className:f,name:"variations-".concat(n)}))}:null),onSearch:b,messages:q,isHierarchical:!0})};Q.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=E(Object(_.a)(D(Object(b.withInstanceId)(Q))))},15:function(e,t){e.exports=window.wp.apiFetch},150:function(e,t,r){"use strict";var n=r(0),o=r(28),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=c},153:function(e,t){},158:function(e,t,r){"use strict";var n=r(0),o=r(28),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(n.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(n.createElement)("g",{mask:"url(#external-mask)"},Object(n.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=c},159:function(e,t,r){"use strict";r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return a})),r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return s}));var n=r(26),o=r(37),c=function(e,t){if(o.n>2)return Object(n.registerBlockType)(e,t)},a=function(e,t){if(o.n>1)return Object(n.registerBlockType)(e,t)},i=function(){return o.n>2},s=function(){return o.n>1}},191:function(e,t){e.exports=window.wp.warning},21:function(e,t){e.exports=window.wp.compose},214:function(e,t){},218:function(e,t){},22:function(e,t){e.exports=window.regeneratorRuntime},23:function(e,t){e.exports=window.wp.url},24:function(e,t){e.exports=window.wc.wcBlocksData},25:function(e,t){e.exports=window.wp.htmlEntities},26:function(e,t){e.exports=window.wp.blocks},28:function(e,t){e.exports=window.wp.primitives},3:function(e,t){e.exports=window.wc.wcSettings},302:function(e,t,r){"use strict";var n=r(9),o=r.n(n),c=r(29),a=r.n(c),i=r(8),s=r.n(i),u=r(16),l=r.n(u),d=r(0),p=r(22),b=r.n(p),m=r(37),f=r(39),g=r(222),w=r(42),h=["selected"];t.a=function(e){return function(t){var r=t.selected,n=l()(t,h),c=Object(d.useState)(!0),i=s()(c,2),u=i[0],p=i[1],O=Object(d.useState)(null),v=s()(O,2),j=v[0],y=v[1],k=Object(d.useState)([]),E=s()(k,2),_=E[0],P=E[1],S=m.o.productCount>100,x=function(){var e=a()(b.a.mark((function e(t){var r;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(w.a)(t);case 2:r=e.sent,y(r),p(!1);case 5:case"end":return e.stop()}}),e)})));return function(_x){return e.apply(this,arguments)}}();Object(d.useEffect)((function(){Object(f.h)({selected:r}).then((function(e){P(e),p(!1)})).catch(x)}),[r]);var C=Object(g.a)((function(e){Object(f.h)({selected:r,search:e}).then((function(e){P(e),p(!1)})).catch(x)}),400),B=s()(C,1)[0],N=Object(d.useCallback)((function(e){p(!0),B(e)}),[p,B]);return Object(d.createElement)(e,o()({},n,{selected:r,error:j,products:_,isLoading:u,onSearch:S?N:null}))}}},31:function(e,t){e.exports=window.moment},34:function(e,t){e.exports=window.wp.isShallowEqual},36:function(e,t){e.exports=window.wp.dataControls},37:function(e,t,r){"use strict";r.d(t,"o",(function(){return c})),r.d(t,"m",(function(){return a})),r.d(t,"l",(function(){return i})),r.d(t,"n",(function(){return s})),r.d(t,"j",(function(){return u})),r.d(t,"e",(function(){return l})),r.d(t,"f",(function(){return d})),r.d(t,"g",(function(){return p})),r.d(t,"k",(function(){return b})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return f})),r.d(t,"h",(function(){return g})),r.d(t,"a",(function(){return w})),r.d(t,"i",(function(){return h})),r.d(t,"b",(function(){return O}));var n,o=r(3),c=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=c.pluginUrl+"images/",i=c.pluginUrl+"build/",s=c.buildPhase,u=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,l=o.STORE_PAGES.checkout.id,d=o.STORE_PAGES.checkout.permalink,p=o.STORE_PAGES.privacy.permalink,b=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),m=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id),f=o.STORE_PAGES.cart.permalink,g=(o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),Object(o.getSetting)("shippingCountries",{})),w=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),O=Object(o.getSetting)("allowedStates",{})},39:function(e,t,r){"use strict";r.d(t,"h",(function(){return b})),r.d(t,"e",(function(){return m})),r.d(t,"b",(function(){return f})),r.d(t,"i",(function(){return g})),r.d(t,"f",(function(){return w})),r.d(t,"c",(function(){return h})),r.d(t,"d",(function(){return O})),r.d(t,"g",(function(){return v})),r.d(t,"a",(function(){return j}));var n=r(5),o=r.n(n),c=r(23),a=r(15),i=r.n(a),s=r(7),u=r(3),l=r(37);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t100,u={per_page:s?100:0,catalog_visibility:"any",search:o,orderby:"title",order:"asc"},d=[Object(c.addQueryArgs)("/wc/store/products",p(p({},u),i))];return s&&r.length&&d.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r,per_page:0})),d}({selected:r,search:o,queryArgs:void 0===a?{}:a});return Promise.all(u.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id").map((function(e){return p(p({},e),{},{parent:0})}))})).catch((function(e){throw e}))},m=function(e){return i()({path:"/wc/store/products/".concat(e)})},f=function(){return i()({path:"wc/store/products/attributes"})},g=function(e){return i()({path:"wc/store/products/attributes/".concat(e,"/terms")})},w=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,o=Object(u.getSetting)("limitTags",!1),a=[Object(c.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:n})];return o&&r.length&&a.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:r})),a}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id")}))},h=function(e){return i()({path:Object(c.addQueryArgs)("wc/store/products/categories",p({per_page:0},e))})},O=function(e){return i()({path:"wc/store/products/categories/".concat(e)})},v=function(e){return i()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},j=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},4:function(e,t){e.exports=window.wp.components},42:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return u}));var n=r(29),o=r.n(n),c=r(22),a=r.n(c),i=r(1),s=function(){var e=o()(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(_x){return e.apply(this,arguments)}}(),u=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.",'woocommerce')}},45:function(e,t){e.exports=window.wc.wcBlocksSharedContext},46:function(e,t){e.exports=window.wp.keycodes},47:function(e,t){e.exports=window.wc.priceFormat},48:function(e,t){e.exports=window.wp.escapeHtml},481:function(e,t,r){"use strict";var n=r(9),o=r.n(n),c=r(29),a=r.n(c),i=r(17),s=r.n(i),u=r(18),l=r.n(u),d=r(13),p=r.n(d),b=r(19),m=r.n(b),f=r(20),g=r.n(f),w=r(10),h=r.n(w),O=r(5),v=r.n(O),j=r(0),y=r(22),k=r.n(y),E=r(21),_=r(39),P=r(42);var S=Object(E.createHigherOrderComponent)((function(e){return function(t){m()(i,t);var r,n,c=(r=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h()(r);if(n){var o=h()(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return g()(this,e)});function i(){var e;s()(this,i);for(var t=arguments.length,r=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;r({productId:t})}})},h=function(e){var t=e.isEditing,r=e.setIsEditing;return Object(i.createElement)(b.BlockControls,null,Object(i.createElement)(s.ToolbarGroup,{controls:[{icon:"edit",title:Object(n.__)("Edit",'woocommerce'),onClick:function(){return r(!t)},isActive:t}]}))},O=r(14),v=r(45),j=r(26),y=r(66),k=r(28),E=Object(i.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(i.createElement)("path",{d:"M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm-2-9c-5 0-9 4-9 9H0l4 4 4-4H5a7 7 0 113 5.7l-1.5 1.4A9 9 0 1012 3z"})),_=r(33),P=r.n(_),S=Object(i.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(i.createElement)("path",{d:"M21 4H3a2 2 0 00-2 2v13c0 1.1.9 2 2 2h18a2 2 0 002-2V6a2 2 0 00-2-2zM3 19V6h8v13H3zm18 0h-8V6h8v13zm-7-9.5h6V11h-6zm0 2.5h6v1.5h-6zm0 2.5h6V16h-6z"})),x=r(877),C="woocommerce/single-product",B=Object(n.__)("Single Product",'woocommerce'),N=Object(i.createElement)(y.a,{srcElement:S}),R=Object(n.__)("Display a single product.",'woocommerce'),A=[["core/columns",{},[["core/column",{},[["woocommerce/product-image",{showSaleBadge:!1}]]],["core/column",{},[["woocommerce/product-sale-badge"],["woocommerce/product-title",{headingLevel:2}],["woocommerce/product-rating"],["woocommerce/product-price"],["woocommerce/product-summary"],["woocommerce/product-stock-indicator"],["woocommerce/product-add-to-cart",{showFormElements:!0}],["woocommerce/product-sku"],["woocommerce/product-category-list"],["woocommerce/product-tag-list"]]]]]],z=["core/columns","core/column"].concat(P()(Object.keys(Object(x.a)(C)))),I=function(e){var t=e.isLoading,r=e.product,o=e.clientId,c=Object(O.useDispatch)("core/block-editor").replaceInnerBlocks,u=Object(i.useCallback)((function(){c(o,function e(t){return t.map((function(t){var r=a()(t,3),n=r[0],o=r[1],c=void 0===o?{}:o,i=r[2],s=void 0===i?[]:i,u=s?e(s):[];return Object(j.createBlock)(n,c,u)}))}(A),!1)}),[o,c]);return Object(i.createElement)(v.InnerBlockLayoutContextProvider,{parentName:C,parentClassName:"wc-block-single-product wc-block-layout"},Object(i.createElement)(v.ProductDataContextProvider,{product:r,isLoading:t},Object(i.createElement)(b.InspectorControls,null,Object(i.createElement)(s.PanelBody,{title:Object(n.__)("Layout",'woocommerce'),initialOpen:!0},Object(i.createElement)(s.Button,{label:Object(n.__)("Reset layout to default",'woocommerce'),onClick:u,isTertiary:!0,className:"wc-block-single-product__reset-layout"},Object(i.createElement)(y.a,{srcElement:E})," ",Object(n.__)("Reset layout",'woocommerce')))),Object(i.createElement)("div",{className:"wc-block-single-product wc-block-layout"},Object(i.createElement)(b.InnerBlocks,{template:A,allowedBlocks:z,templateLock:!1,renderAppender:!1}))))},L=Object(u.a)((function(e){var t=e.className,r=e.attributes,o=e.setAttributes,c=e.error,u=e.getProduct,m=e.product,g=e.isLoading,O=e.clientId,v=r.productId,j=r.isPreview,y=Object(i.useState)(!v),k=a()(y,2),E=k[0],_=k[1];return j?p:c?Object(i.createElement)(f,{error:c,isLoading:g,getProduct:u}):Object(i.createElement)("div",{className:t},Object(i.createElement)(l.a,{header:Object(n.__)("Single Product Block Error",'woocommerce')},Object(i.createElement)(h,{setIsEditing:_,isEditing:E}),E?Object(i.createElement)(s.Placeholder,{icon:N,label:B,className:"wc-block-single-product"},R,Object(i.createElement)("div",{className:"wc-block-single-product__selection"},Object(i.createElement)(w,{attributes:r,setAttributes:o}),Object(i.createElement)(s.Button,{isSecondary:!0,onClick:function(){_(!1)}},Object(n.__)("Done",'woocommerce')))):Object(i.createElement)(i.Fragment,null,Object(i.createElement)(b.InspectorControls,null,Object(i.createElement)(s.PanelBody,{title:Object(n.__)("Product",'woocommerce'),initialOpen:!1},Object(i.createElement)(w,{attributes:r,setAttributes:o}))),Object(i.createElement)(d.a,{productId:v}),Object(i.createElement)(I,{clientId:O,product:m,isLoading:g}))))})),M=r(6),D=r.n(M),T={title:B,icon:{src:N,foreground:"#96588a"},category:"woocommerce",keywords:[Object(n.__)("WooCommerce",'woocommerce')],description:R,supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{isPreview:{type:"boolean",default:!1,save:!1},productId:{type:"number"}},edit:L,save:function(e){var t=e.attributes;return Object(i.createElement)("div",{className:D()("is-loading",t.className)},Object(i.createElement)(b.InnerBlocks.Content,null))}};Object(o.c)(C,T)},86:function(e,t){e.exports=window.wc.wcBlocksSharedHocs},87:function(e,t){e.exports=window.ReactDOM},877:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(60),o=r(0),c=r(37);r.p=c.l,Object(n.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)((function(){return Promise.all([r.e(0),r.e(12)]).then(r.bind(null,482))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)((function(){return Promise.all([r.e(1),r.e(2),r.e(4),r.e(11)]).then(r.bind(null,901))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)((function(){return Promise.all([r.e(1),r.e(2),r.e(18)]).then(r.bind(null,902))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)((function(){return r.e(13).then(r.bind(null,483))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)((function(){return Promise.all([r.e(0),r.e(1),r.e(3),r.e(9)]).then(r.bind(null,484))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)((function(){return r.e(16).then(r.bind(null,486))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)((function(){return r.e(4).then(r.bind(null,304))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)((function(){return r.e(14).then(r.bind(null,487))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)((function(){return r.e(10).then(r.bind(null,488))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)((function(){return r.e(17).then(r.bind(null,489))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)((function(){return r.e(15).then(r.bind(null,490))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)((function(){return Promise.all([r.e(0),r.e(1),r.e(2),r.e(3),r.e(8)]).then(r.bind(null,903))}))});var a=function(e){return Object(n.getRegisteredBlockComponents)(e)}},89:function(e,t){e.exports=window.wp.viewport},91:function(e,t){e.exports=window.wp.autop},96:function(e,t){e.exports=window.wp.date}});