PATH:
home
/
lab2454c
/
sothebankuab.com
/
wp-content
/
plugins
/
woocommerce
/
packages
/
woocommerce-blocks
/
build
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["reviews-by-product"]=function(e){function t(t){for(var n,i,a=t[0],s=t[1],u=t[2],d=0,p=[];d<a.length;d++)i=a[d],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&p.push(o[i][0]),o[i]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(l&&l(t);p.length;)p.shift()();return c.push.apply(c,u||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,a=1;a<r.length;a++){var s=r[a];0!==o[s]&&(n=!1)}n&&(c.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={37:0},c=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=a.push.bind(a);a.push=t,a=a.slice();for(var u=0;u<a.length;u++)t(a[u]);var l=s;return c.push([706,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},104:function(e,t){},105:function(e,t){!function(){e.exports=this.wp.coreData}()},106:function(e,t){},11:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},110:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(20),i=r.n(c),a=r(0),s=r(45),u=r(3),l=r(7),d=r.n(l),p=["className","item","isSelected","isLoading","onSelect","disabled"];t.a=function(e){var t=e.className,r=e.item,n=e.isSelected,c=e.isLoading,l=e.onSelect,b=e.disabled,f=i()(e,p);return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(s.c,o()({},f,{key:r.id,className:t,isSelected:n,item:r,onSelect:l,isSingle:!0,disabled:b})),n&&c&&Object(a.createElement)("div",{key:"loading",className:d()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(a.createElement)(u.Spinner,null)))}},116:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return p}));var n=r(0),o=r(1),c=r(138),i=r(3),a=r(24),s=r(5),u=r(75),l=function(e,t){return Object(n.createElement)(a.BlockControls,null,Object(n.createElement)(i.ToolbarGroup,{controls:[{icon:"edit",title:Object(o.__)("Edit",'woocommerce'),onClick:function(){return t({editMode:!e})},isActive:e}]}))},d=function(e,t){var r=Object(s.getSetting)("showAvatars",!0),a=Object(s.getSetting)("reviewRatingsEnabled",!0);return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Product rating",'woocommerce'),checked:e.showReviewRating,onChange:function(){return t({showReviewRating:!e.showReviewRating})}}),e.showReviewRating&&!a&&Object(n.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(c.a)(Object(o.__)("Product rating is disabled in your <a>store settings</a>.",'woocommerce'),{a:Object(n.createElement)("a",{href:Object(s.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Reviewer name",'woocommerce'),checked:e.showReviewerName,onChange:function(){return t({showReviewerName:!e.showReviewerName})}}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Image",'woocommerce'),checked:e.showReviewImage,onChange:function(){return t({showReviewImage:!e.showReviewImage})}}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Review date",'woocommerce'),checked:e.showReviewDate,onChange:function(){return t({showReviewDate:!e.showReviewDate})}}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Review content",'woocommerce'),checked:e.showReviewContent,onChange:function(){return t({showReviewContent:!e.showReviewContent})}}),e.showReviewImage&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(u.a,{label:Object(o.__)("Review image",'woocommerce'),value:e.imageType,options:[{label:Object(o.__)("Reviewer photo",'woocommerce'),value:"reviewer"},{label:Object(o.__)("Product",'woocommerce'),value:"product"}],onChange:function(e){return t({imageType:e})}}),"reviewer"===e.imageType&&!r&&Object(n.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(c.a)(Object(o.__)("Reviewer photo is disabled in your <a>site settings</a>.",'woocommerce'),{a:Object(n.createElement)("a",{href:Object(s.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},p=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Order by",'woocommerce'),checked:e.showOrderby,onChange:function(){return t({showOrderby:!e.showOrderby})}}),Object(n.createElement)(i.SelectControl,{label:Object(o.__)("Order Product Reviews by",'woocommerce'),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:function(e){return t({orderby:e})}}),Object(n.createElement)(i.RangeControl,{label:Object(o.__)("Starting Number of Reviews",'woocommerce'),value:e.reviewsOnPageLoad,onChange:function(e){return t({reviewsOnPageLoad:e})},max:20,min:1}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Load more",'woocommerce'),checked:e.showLoadMore,onChange:function(){return t({showLoadMore:!e.showLoadMore})}}),e.showLoadMore&&Object(n.createElement)(i.RangeControl,{label:Object(o.__)("Load More Reviews",'woocommerce'),value:e.reviewsOnLoadMore,onChange:function(e){return t({reviewsOnLoadMore:e})},max:20,min:1}))}},125:function(e,t,r){"use strict";var n=r(31),o=r.n(n),c=r(4),i=r.n(c),a=r(10),s=r.n(a),u=r(0),l=r(1),d=r(6),p=(r(2),r(45)),b=r(22),f=r(15),v=r.n(f),w=r(16),h=r.n(w),m=r(17),g=r.n(m),O=r(18),y=r.n(O),j=r(9),_=r.n(j);function k(e){var t=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}}();return function(){var r,n=_()(e);if(t){var o=_()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return y()(this,r)}}var E=Object(b.createHigherOrderComponent)((function(e){var t=function(t){g()(n,t);var r=k(n);function n(){return v()(this,n),r.apply(this,arguments)}return h()(n,[{key:"render",value:function(){var t=this.props.selected,r=null==t;return Object(u.createElement)(e,s()({},this.props,{selected:r?[]:[t]}))}}]),n}(u.Component);return t.defaultProps={selected:null},t}),"withTransformSingleSelectToMultipleSelect"),R=r(259),P=r(30),S=r.n(P),C=r(12),x=r.n(C),L=r(11),N=r.n(L),T=r(36),I=r.n(T),D=r(38),A=r(40);function M(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 B(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach((function(t){i()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function H(e){var t=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}}();return function(){var r,n=_()(e);if(t){var o=_()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return y()(this,r)}}var V=Object(b.createHigherOrderComponent)((function(e){var t=function(t){g()(n,t);var r=H(n);function n(){var e;v()(this,n);for(var t=arguments.length,o=new Array(t),c=0;c<t;c++)o[c]=arguments[c];return e=r.call.apply(r,[this].concat(o)),i()(x()(e),"state",{error:null,loading:!1,variations:{}}),i()(x()(e),"loadVariations",(function(){var t=e.props.products,r=e.state,n=r.loading,o=r.variations;if(!n){var c=e.getExpandedProduct();if(c&&!o[c]){var a=t.find((function(e){return e.id===c}));a.variations&&0!==a.variations.length?(e.setState({loading:!0}),Object(D.g)(c).then((function(t){var r=t.map((function(e){return B(B({},e),{},{parent:c})}));e.setState({variations:B(B({},e.state.variations),{},i()({},c,r)),loading:!1,error:null})})).catch(function(){var t=S()(N.a.mark((function t(r){var n;return N.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(A.a)(r);case 2:n=t.sent,e.setState({variations:B(B({},e.state.variations),{},i()({},c,null)),loading:!1,error:n});case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())):e.setState({variations:B(B({},e.state.variations),{},i()({},c,null)),loading:!1,error:null})}}})),e}return h()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.selected,r=e.showVariations;t&&r&&this.loadVariations()}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.isLoading,n=t.selected;t.showVariations&&(!I()(e.selected,n)||e.isLoading&&!r)&&this.loadVariations()}},{key:"isProductId",value:function(e){return this.props.products.some((function(t){return t.id===e}))}},{key:"findParentProduct",value:function(e){return this.props.products.filter((function(t){return t.variations&&t.variations.find((function(t){return t.id===e}))}))[0].id}},{key:"getExpandedProduct",value:function(){var e=this.props,t=e.isLoading,r=e.selected;if(!e.showVariations)return null;var n=r&&r.length?r[0]:null;return n?this.prevSelectedItem=n:this.prevSelectedItem&&(t||this.isProductId(this.prevSelectedItem)||(n=this.prevSelectedItem)),!t&&n?this.isProductId(n)?n:this.findParentProduct(n):null}},{key:"render",value:function(){var t=this.props,r=t.error,n=t.isLoading,o=this.state,c=o.error,i=o.loading,a=o.variations;return Object(u.createElement)(e,s()({},this.props,{error:c||r,expandedProduct:this.getExpandedProduct(),isLoading:n,variations:a,variationsLoading:i}))}}]),n}(u.Component);return i()(t,"defaultProps",{selected:[],showVariations:!1}),t}),"withProductVariations"),G=r(47),F=r(7),z=r.n(F),U=r(110);r(180);function $(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 q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$(Object(r),!0).forEach((function(t){i()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var W={list:Object(l.__)("Products",'woocommerce'),noItems:Object(l.__)("Your store doesn't have any products.",'woocommerce'),search:Object(l.__)("Search for a product to display",'woocommerce'),updated:Object(l.__)("Product search results updated.",'woocommerce')},Q=function(e){var t=e.expandedProduct,r=e.error,n=e.instanceId,c=e.isCompact,i=e.isLoading,a=e.onChange,b=e.onSearch,f=e.products,v=e.renderItem,w=e.selected,h=e.showVariations,m=e.variations,g=e.variationsLoading,O=function(e){var t=e.item,r=e.search,o=e.depth,c=void 0===o?0:o,a=e.isSelected,b=e.onSelect,f=t.variations&&Array.isArray(t.variations)?t.variations.length:0,v=z()("woocommerce-search-product__item","woocommerce-search-list__item","depth-".concat(c),"has-count",{"is-searching":r.length>0,"is-skip-level":0===c&&0!==t.parent,"is-variable":f>0});if(!t.breadcrumbs.length)return Object(u.createElement)(U.a,s()({},e,{className:z()(v,{"is-selected":a}),isSelected:a,item:t,onSelect:function(){return function(){b(t)()}},isLoading:i||g,countLabel:t.variations.length>0?Object(l.sprintf)(Object(l.__)("%1$d variations",'woocommerce'),t.variations.length):null,name:"products-".concat(n),"aria-label":Object(l.sprintf)(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 w=Object(d.isEmpty)(t.variation)?e:q(q({},e),{},{item:q(q({},e.item),{},{name:t.variation}),"aria-label":"".concat(t.breadcrumbs[0],": ").concat(t.variation)});return Object(u.createElement)(p.c,s()({},w,{className:v,name:"variations-".concat(n)}))};if(r)return Object(u.createElement)(G.a,{error:r});var y=m&&m[t]?m[t]:[],j=[].concat(o()(f),o()(y));return Object(u.createElement)(p.b,{className:"woocommerce-products",list:j,isCompact:c,isLoading:i,isSingle:!0,selected:j.filter((function(e){var t=e.id;return w.includes(t)})),onChange:a,renderItem:v||(h?O:null),onSearch:b,messages:W,isHierarchical:!0})};Q.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1};t.a=E(Object(R.a)(V(Object(b.withInstanceId)(Q))))},127:function(e,t,r){"use strict";var n=r(0),o=r(32),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},129:function(e,t){},130:function(e,t,r){"use strict";var n=r(0),o=(r(2),r(7)),c=r.n(o),i=r(44),a=r(174);r(182);t.a=Object(a.a)((function(e){var t=e.className,r=e.instanceId,o=e.defaultValue,a=e.label,s=e.onChange,u=e.options,l=e.screenReaderLabel,d=e.readOnly,p=e.value,b="wc-block-components-sort-select__select-".concat(r);return Object(n.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(i.a,{label:a,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:b}}),Object(n.createElement)("select",{id:b,className:"wc-block-sort-select__select wc-block-components-sort-select__select",defaultValue:o,onChange:s,readOnly:d,value:p},u.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},137:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(1),o=r(14),c={attributes:{editMode:!1,imageType:"reviewer",orderby:"most-recent",reviewsOnLoadMore:10,reviewsOnPageLoad:10,showLoadMore:!0,showOrderby:!0,showReviewDate:!0,showReviewerName:!0,showReviewImage:!0,showReviewRating:!0,showReviewContent:!0,previewReviews:[{id:1,date_created:"2019-07-15T17:05:04",formatted_date_created:Object(n.__)("July 15, 2019",'woocommerce'),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(n.__)("WordPress Pennant",'woocommerce'),product_permalink:"#",reviewer:Object(n.__)("Alice",'woocommerce'),review:"<p>".concat(Object(n.__)("I bought this product last week and I'm very happy with it.",'woocommerce'),"</p>\n"),reviewer_avatar_urls:{48:o.k+"img/avatar.jpg",96:o.k+"img/avatar.jpg"},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(n.__)("July 12, 2019",'woocommerce'),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(n.__)("WordPress Pennant",'woocommerce'),product_permalink:"#",reviewer:Object(n.__)("Bob",'woocommerce'),review:"<p>".concat(Object(n.__)("This product is awesome, I love it!",'woocommerce'),"</p>\n"),reviewer_avatar_urls:{48:o.k+"img/avatar.jpg",96:o.k+"img/avatar.jpg"},rating:null,verified:!1}]}}},14:function(e,t,r){"use strict";r.d(t,"m",(function(){return c})),r.d(t,"k",(function(){return i})),r.d(t,"l",(function(){return a})),r.d(t,"h",(function(){return u})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return d})),r.d(t,"g",(function(){return p})),r.d(t,"f",(function(){return b})),r.d(t,"j",(function(){return f})),r.d(t,"i",(function(){return v})),r.d(t,"a",(function(){return w})),r.d(t,"b",(function(){return h})),r.d(t,"e",(function(){return m})),r.d(t,"p",(function(){return O})),r.d(t,"q",(function(){return y})),r.d(t,"n",(function(){return j})),r.d(t,"o",(function(){return _}));var n,o=r(5),c=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,restApiRoutes:{},wordCountType:"words"}),i=c.pluginUrl+"assets/",a=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,f=o.STORE_PAGES.terms.permalink,v=o.STORE_PAGES.terms.title,w=o.STORE_PAGES.cart.id,h=o.STORE_PAGES.cart.permalink,m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),g=r(25),O=function(e,t){if(s>2)return Object(g.registerBlockType)(e,t)},y=function(e,t){if(s>1)return Object(g.registerBlockType)(e,t)},j=function(){return s>2},_=function(){return s>1}},165:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0},previewReviews:{type:"array",default:null}}},166:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(0),i=(r(181),r(71));t.a=function(e){var t=e.attributes;return Object(c.createElement)("div",o()({className:Object(i.a)(t)},Object(i.b)(t)))}},170:function(e,t,r){"use strict";var n=r(15),o=r.n(n),c=r(16),i=r.n(c),a=r(17),s=r.n(a),u=r(18),l=r.n(u),d=r(9),p=r.n(d),b=r(0),f=r(1),v=r(8),w=(r(2),r(6)),h=r(3),m=r(5),g=r(93),O=r(44),y=(r(227),function(e){var t=e.onClick,r=e.label,n=e.screenReaderLabel;return Object(b.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(b.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(b.createElement)(O.a,{label:r,screenReaderLabel:n})))});y.defaultProps={label:Object(f.__)("Load more",'woocommerce')};var j=y,_=r(130),k=(r(224),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,o=e.value;return Object(b.createElement)(_.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",defaultValue:t,label:Object(f.__)("Order by",'woocommerce'),onChange:r,options:[{key:"most-recent",label:Object(f.__)("Most recent",'woocommerce')},{key:"highest-rating",label:Object(f.__)("Highest rating",'woocommerce')},{key:"lowest-rating",label:Object(f.__)("Lowest rating",'woocommerce')}],readOnly:n,screenReaderLabel:Object(f.__)("Order reviews by",'woocommerce'),value:o})}),E=r(4),R=r.n(E),P=r(7),S=r.n(P),C=r(12),x=r.n(C),L=r(199),N=r.n(L),T=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=N()(e,{suffix:r,limit:t});return n.html},I=function(e,t,r,n){var o=D(e,t,r);return T(e,o-n.length,n)},D=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=T(e,n.middle),n=A(n,t.clientHeight,r);return n.middle},A=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e};function M(e){var t=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}}();return function(){var r,n=p()(e);if(t){var o=p()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l()(this,r)}}var B=function(e){s()(r,e);var t=M(r);function r(e){var n;return o()(this,r),(n=t.apply(this,arguments)).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},n.reviewSummary=Object(v.createRef)(),n.reviewContent=Object(v.createRef)(),n.getButton=n.getButton.bind(x()(n)),n.onClick=n.onClick.bind(x()(n)),n}return i()(r,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:I(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,n=t.lessText,o=t.moreText,c=e?n:o;if(c)return Object(b.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,n=t.summary,o=t.clampEnabled,c=t.isExpanded;return r?!1===o?Object(b.createElement)("div",{className:e},Object(b.createElement)("div",{ref:this.reviewContent},r)):Object(b.createElement)("div",{className:e},(!c||null===o)&&Object(b.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:n}}),(c||null===o)&&Object(b.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},r),this.getButton()):null}}]),r}(v.Component);B.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(f.__)("Read more",'woocommerce'),lessText:Object(f.__)("Read less",'woocommerce'),className:"read-more-content"};var H=B;r(226);var V=function(e){var t=e.attributes,r=e.review,n=void 0===r?{}:r,o=t.imageType,c=t.showReviewDate,i=t.showReviewerName,a=t.showReviewImage,s=t.showReviewRating,u=t.showReviewContent,l=t.showProductName,d=n.rating,p=!Object.keys(n).length>0,v=Number.isFinite(d)&&s;return Object(b.createElement)("li",{className:S()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":p}),"aria-hidden":p},(l||c||i||a||v)&&Object(b.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},a&&function(e,t,r){var n,o;return r||!e?Object(b.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image",width:"48",height:"48"}):Object(b.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(b.createElement)("img",{"aria-hidden":"true",alt:(null===(n=e.product_image)||void 0===n?void 0:n.alt)||"",src:(null===(o=e.product_image)||void 0===o?void 0:o.thumbnail)||""}):Object(b.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[48]||"",srcSet:e.reviewer_avatar_urls[96]+" 2x"}),e.verified&&Object(b.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(f.__)("Verified buyer",'woocommerce')},Object(f.__)("Verified buyer",'woocommerce')))}(n,o,p),(l||i||v||c)&&Object(b.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},v&&function(e){var t=e.rating,r={width:t/5*100+"%"},n=Object(f.sprintf)(Object(f.__)("Rated %f out of 5",'woocommerce'),t);return Object(b.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(b.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":n},Object(b.createElement)("span",{style:r},n)))}(n),l&&function(e){return Object(b.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(b.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(n),i&&function(e){var t=e.reviewer,r=void 0===t?"":t;return Object(b.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},r)}(n),c&&function(e){var t=e.date_created,r=e.formatted_date_created;return Object(b.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(n))),u&&function(e){return Object(b.createElement)(H,{maxLines:10,moreText:Object(f.__)("Read full review",'woocommerce'),lessText:Object(f.__)("Hide full review",'woocommerce'),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(b.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(n))};r(225);function G(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 F(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G(Object(r),!0).forEach((function(t){R()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var z=function(e){var t=e.attributes,r=e.reviews,n=Object(m.getSetting)("showAvatars",!0),o=Object(m.getSetting)("reviewRatingsEnabled",!0),c=(n||"product"===t.imageType)&&t.showReviewImage,i=o&&t.showReviewRating,a=F(F({},t),{},{showReviewImage:c,showReviewRating:i});return Object(b.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(b.createElement)(V,{attributes:a}):r.map((function(e,t){return Object(b.createElement)(V,{key:e.id||t,attributes:a,review:e})})))},U=r(10),$=r.n(U),q=r(30),W=r.n(q),Q=r(11),J=r.n(Q),Y=r(36),K=r.n(Y),X=r(71),Z=r(40);function ee(e){var t=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}}();return function(){var r,n=p()(e);if(t){var o=p()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l()(this,r)}}function te(e){var t=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}}();return function(){var r,n=p()(e);if(t){var o=p()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l()(this,r)}}var re=function(e){var t=function(t){s()(n,t);var r=ee(n);function n(){var e;o()(this,n);for(var t=arguments.length,c=new Array(t),i=0;i<t;i++)c[i]=arguments[i];return e=r.call.apply(r,[this].concat(c)),R()(x()(e),"isPreview",!!e.props.attributes.previewReviews),R()(x()(e),"delayedAppendReviews",e.props.delayFunction(e.appendReviews)),R()(x()(e),"state",{error:null,loading:!0,reviews:e.isPreview?e.props.attributes.previewReviews:[],totalReviews:e.isPreview?e.props.attributes.previewReviews.length:0}),R()(x()(e),"setError",function(){var t=W()(J.a.mark((function t(r){var n,o;return J.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props.onReviewsLoadError,t.next=3,Object(Z.a)(r);case 3:o=t.sent,e.setState({reviews:[],loading:!1,error:o}),n(o);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return i()(n,[{key:"componentDidMount",value:function(){this.replaceReviews()}},{key:"componentDidUpdate",value:function(e){e.reviewsToDisplay<this.props.reviewsToDisplay?this.delayedAppendReviews():this.shouldReplaceReviews(e,this.props)&&this.replaceReviews()}},{key:"shouldReplaceReviews",value:function(e,t){return e.orderby!==t.orderby||e.order!==t.order||e.productId!==t.productId||!K()(e.categoryIds,t.categoryIds)}},{key:"componentWillUnMount",value:function(){this.delayedAppendReviews.cancel&&this.delayedAppendReviews.cancel()}},{key:"getArgs",value:function(e){var t=this.props,r=t.categoryIds,n=t.order,o=t.orderby,c=t.productId,i={order:n,orderby:o,per_page:t.reviewsToDisplay-e,offset:e};return r&&r.length&&(i.category_id=Array.isArray(r)?r.join(","):r),c&&(i.product_id=c),i}},{key:"replaceReviews",value:function(){if(!this.isPreview){var e=this.props.onReviewsReplaced;this.updateListOfReviews().then(e)}}},{key:"appendReviews",value:function(){if(!this.isPreview){var e=this.props,t=e.onReviewsAppended,r=e.reviewsToDisplay,n=this.state.reviews;r<=n.length||this.updateListOfReviews(n).then(t)}}},{key:"updateListOfReviews",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.reviewsToDisplay,n=this.state.totalReviews,o=Math.min(n,r)-t.length;return this.setState({loading:!0,reviews:t.concat(Array(o).fill({}))}),Object(X.c)(this.getArgs(t.length)).then((function(r){var n=r.reviews,o=r.totalReviews;return e.setState({reviews:t.filter((function(e){return Object.keys(e).length})).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}})).catch(this.setError)}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,n=r.error,o=r.loading,c=r.reviews,i=r.totalReviews;return Object(b.createElement)(e,$()({},this.props,{error:n,isLoading:o,reviews:c.slice(0,t),totalReviews:i}))}}]),n}(v.Component);R()(t,"defaultProps",{delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}});var r=e.displayName,n=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(n," )"),t}(function(e){s()(r,e);var t=te(r);function r(){return o()(this,r),t.apply(this,arguments)}return i()(r,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.error,n=e.isLoading,o=e.noReviewsPlaceholder,c=e.reviews,i=e.totalReviews;if(r)return Object(b.createElement)(g.a,{className:"wc-block-featured-product-error",error:r,isLoading:n});if(0===c.length&&!n)return Object(b.createElement)(o,{attributes:t});var a=Object(m.getSetting)("reviewRatingsEnabled",!0);return Object(b.createElement)(h.Disabled,null,t.showOrderby&&a&&Object(b.createElement)(k,{readOnly:!0,value:t.orderby}),Object(b.createElement)(z,{attributes:t,reviews:c}),t.showLoadMore&&i>c.length&&Object(b.createElement)(j,{screenReaderLabel:Object(f.__)("Load more reviews",'woocommerce')}))}}]),r}(v.Component));function ne(e){var t=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}}();return function(){var r,n=p()(e);if(t){var o=p()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l()(this,r)}}var oe=function(e){s()(r,e);var t=ne(r);function r(){return o()(this,r),t.apply(this,arguments)}return i()(r,[{key:"renderHiddenContentPlaceholder",value:function(){var e=this.props,t=e.icon,r=e.name;return Object(b.createElement)(h.Placeholder,{icon:t,label:r},Object(f.__)("The content for this block is hidden due to block settings.",'woocommerce'))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.noReviewsPlaceholder,n=t.categoryIds,o=t.productId,c=t.reviewsOnPageLoad,i=t.showProductName,a=t.showReviewDate,s=t.showReviewerName,u=t.showReviewContent,l=t.showReviewImage,d=t.showReviewRating,p=Object(X.d)(t.orderby),f=p.order,v=p.orderby;return!(u||d||a||s||l||i)?this.renderHiddenContentPlaceholder():Object(b.createElement)("div",{className:Object(X.a)(t)},Object(b.createElement)(re,{attributes:t,categoryIds:n,delayFunction:function(e){return Object(w.debounce)(e,400)},noReviewsPlaceholder:r,orderby:v,order:f,productId:o,reviewsToDisplay:c}))}}]),r}(v.Component);t.a=oe},180:function(e,t){},181:function(e,t){},182:function(e,t){},19:function(e,t){!function(){e.exports=this.wp.apiFetch}()},21:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},224:function(e,t){},225:function(e,t){},226:function(e,t){},227:function(e,t){},23:function(e,t){!function(){e.exports=this.wp.data}()},24:function(e,t){!function(){e.exports=this.wp.blockEditor}()},25:function(e,t){!function(){e.exports=this.wp.blocks}()},259:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(30),i=r.n(c),a=r(15),s=r.n(a),u=r(16),l=r.n(u),d=r(12),p=r.n(d),b=r(17),f=r.n(b),v=r(18),w=r.n(v),h=r(9),m=r.n(h),g=r(0),O=r(11),y=r.n(O),j=r(6),_=r(22),k=(r(2),r(14)),E=r(38),R=r(40);function P(e){var t=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}}();return function(){var r,n=m()(e);if(t){var o=m()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return w()(this,r)}}var S=Object(_.createHigherOrderComponent)((function(e){var t=function(t){f()(c,t);var r,n=P(c);function c(){var e;return s()(this,c),(e=n.apply(this,arguments)).state={list:[],loading:!0},e.setError=e.setError.bind(p()(e)),e.debouncedOnSearch=Object(j.debounce)(e.onSearch.bind(p()(e)),400),e}return l()(c,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(E.h)({selected:t}).then((function(t){e.setState({list:t,loading:!1})})).catch(this.setError)}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(e){var t=this,r=this.props.selected;Object(E.h)({selected:r,search:e}).then((function(e){t.setState({list:e,loading:!1})})).catch(this.setError)}},{key:"setError",value:(r=i()(y.a.mark((function e(t){var r;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(R.a)(t);case 2:r=e.sent,this.setState({list:[],loading:!1,error:r});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,r=this.state,n=r.error,c=r.list,i=r.loading;return Object(g.createElement)(e,o()({},this.props,{error:n,products:c,isLoading:i,onSearch:k.m.productCount>100?function(e){t.setState({loading:!0}),t.debouncedOnSearch(e)}:null}))}}]),c}(g.Component);return t.defaultProps={selected:[]},t}),"withSearchedProducts");t.a=S},271:function(e,t,r){"use strict";var n=r(0),o=r(32),c=Object(n.createElement)(o.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:"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=c},28:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},29:function(e,t){!function(){e.exports=this.moment}()},3:function(e,t){!function(){e.exports=this.wp.components}()},32:function(e,t){!function(){e.exports=this.wp.primitives}()},33:function(e,t){!function(){e.exports=this.wp.dataControls}()},36:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},38:function(e,t,r){"use strict";r.d(t,"h",(function(){return b})),r.d(t,"e",(function(){return f})),r.d(t,"b",(function(){return v})),r.d(t,"i",(function(){return w})),r.d(t,"f",(function(){return h})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return g})),r.d(t,"g",(function(){return O})),r.d(t,"a",(function(){return y}));var n=r(4),o=r.n(n),c=r(21),i=r(19),a=r.n(i),s=r(6),u=r(5),l=r(14);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;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var b=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,o=void 0===n?"":n,i=e.queryArgs,u=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,o=void 0===n?"":n,i=e.queryArgs,a=void 0===i?[]:i,s=l.m.productCount>100,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),a))];return s&&r.length&&d.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r})),d}({selected:r,search:o,queryArgs:void 0===i?[]:i});return Promise.all(u.map((function(e){return a()({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}))},f=function(e){return a()({path:"/wc/store/products/".concat(e)})},v=function(){return a()({path:"wc/store/products/attributes"})},w=function(e){return a()({path:"wc/store/products/attributes/".concat(e,"/terms")})},h=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),i=[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&&i.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:r})),i}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return a()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id")}))},m=function(e){return a()({path:Object(c.addQueryArgs)("wc/store/products/categories",p({per_page:0},e))})},g=function(e){return a()({path:"wc/store/products/categories/".concat(e)})},O=function(e){return a()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},y=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))}},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return u}));var n=r(30),o=r.n(n),c=r(11),i=r.n(c),a=r(1),s=function(){var e=o()(i.a.mark((function e(t){var r;return i.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(t){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(a.__)("Something went wrong. Please contact us to get assistance.",'woocommerce')}},44:function(e,t,r){"use strict";var n=r(4),o=r.n(n),c=r(0),i=r(7),a=r.n(i);function s(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 u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,s=void 0===i?{}:i,l=null!=r,d=null!=n;return!l&&d?(t=o||"span",s=u(u({},s),{},{className:a()(s.className,"screen-reader-text")}),Object(c.createElement)(t,s,n)):(t=o||c.Fragment,l&&d&&r!==n?Object(c.createElement)(t,s,Object(c.createElement)("span",{"aria-hidden":"true"},r),Object(c.createElement)("span",{className:"screen-reader-text"},n)):Object(c.createElement)(t,s,r))}},451:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(30),i=r.n(c),a=r(15),s=r.n(a),u=r(16),l=r.n(u),d=r(12),p=r.n(d),b=r(17),f=r.n(b),v=r(18),w=r.n(v),h=r(9),m=r.n(h),g=r(4),O=r.n(g),y=r(0),j=r(11),_=r.n(j),k=r(22),E=r(38),R=r(40);function P(e){var t=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}}();return function(){var r,n=m()(e);if(t){var o=m()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return w()(this,r)}}var S=Object(k.createHigherOrderComponent)((function(e){return function(t){f()(n,t);var r=P(n);function n(){var e;s()(this,n);for(var t=arguments.length,o=new Array(t),c=0;c<t;c++)o[c]=arguments[c];return e=r.call.apply(r,[this].concat(o)),O()(p()(e),"state",{error:null,loading:!1,product:"preview"===e.props.attributes.productId?e.props.attributes.previewProduct:null}),O()(p()(e),"loadProduct",(function(){var t=e.props.attributes.productId;"preview"!==t&&(t?(e.setState({loading:!0}),Object(E.e)(t).then((function(t){e.setState({product:t,loading:!1,error:null})})).catch(function(){var t=i()(_.a.mark((function t(r){var n;return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(R.a)(r);case 2:n=t.sent,e.setState({product:null,loading:!1,error:n});case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())):e.setState({product:null,loading:!1,error:null}))})),e}return l()(n,[{key:"componentDidMount",value:function(){this.loadProduct()}},{key:"componentDidUpdate",value:function(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}},{key:"render",value:function(){var t=this.state,r=t.error,n=t.loading,c=t.product;return Object(y.createElement)(e,o()({},this.props,{error:r,getProduct:this.loadProduct,isLoading:n,product:c}))}}]),n}(y.Component)}),"withProduct");t.a=S},46:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},47:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(46));t.a=function(e){var t,r,i,a=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=a).message,i=t.type,r?"general"===i?Object(n.createElement)("span",null,Object(o.__)("The following error was returned",'woocommerce'),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(c.escapeHTML)(r))):"api"===i?Object(n.createElement)("span",null,Object(o.__)("The following error was returned from the API",'woocommerce'),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(c.escapeHTML)(r))):r:Object(o.__)("An unknown error occurred which prevented the block from being updated.",'woocommerce')))}},49:function(e,t){!function(){e.exports=this.wp.keycodes}()},5:function(e,t){!function(){e.exports=this.wc.wcSettings}()},52:function(e,t){!function(){e.exports=this.wp.hooks}()},59:function(e,t,r){"use strict";var n=r(4),o=r.n(n),c=r(20),i=r.n(c),a=r(0),s=["srcElement","size"];function u(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}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,c=i()(e,s);return Object(a.isValidElement)(t)?Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},c)):null}},6:function(e,t){!function(){e.exports=this.lodash}()},62:function(e,t){!function(){e.exports=this.wp.deprecated}()},706:function(e,t,r){e.exports=r(790)},71:function(e,t,r){"use strict";r.d(t,"d",(function(){return s})),r.d(t,"c",(function(){return u})),r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d}));var n=r(19),o=r.n(n),c=r(7),i=r.n(c),a=r(5),s=function(e){if(Object(a.getSetting)("reviewRatingsEnabled",!0)){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},u=function(e){return o()({path:"/wc/store/products/reviews?"+Object.entries(e).map((function(e){return e.join("=")})).join("&"),parse:!1}).then((function(e){return e.json().then((function(t){return{reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}}))}))},l=function(e){var t=e.className,r=e.categoryIds,n=e.productId,o=e.showReviewDate,c=e.showReviewerName,a=e.showReviewContent,s=e.showProductName,u=e.showReviewImage,l=e.showReviewRating,d="wc-block-all-reviews";return n&&(d="wc-block-reviews-by-product"),Array.isArray(r)&&(d="wc-block-reviews-by-category"),i()(d,t,{"has-image":u,"has-name":c,"has-date":o,"has-rating":l,"has-content":a,"has-product-name":s})},d=function(e){var t=e.categoryIds,r=e.imageType,n=e.orderby,o=e.productId,c={"data-image-type":r,"data-orderby":n,"data-reviews-on-page-load":e.reviewsOnPageLoad,"data-reviews-on-load-more":e.reviewsOnLoadMore,"data-show-load-more":e.showLoadMore,"data-show-orderby":e.showOrderby};return o&&(c["data-product-id"]=o),Array.isArray(t)&&(c["data-category-ids"]=t.join(",")),c}},73:function(e,t){!function(){e.exports=this.wp.dom}()},74:function(e,t){!function(){e.exports=this.ReactDOM}()},75:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(15),i=r.n(c),a=r(16),s=r.n(a),u=r(12),l=r.n(u),d=r(17),p=r.n(d),b=r(18),f=r.n(b),v=r(9),w=r.n(v),h=r(0),m=r(6),g=r(7),O=r.n(g),y=r(3),j=r(22);r(106);function _(e){var t=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}}();return function(){var r,n=w()(e);if(t){var o=w()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return f()(this,r)}}var k=function(e){p()(r,e);var t=_(r);function r(){var e;return i()(this,r),(e=t.apply(this,arguments)).onClick=e.onClick.bind(l()(e)),e}return s()(r,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.label,c=r.checked,i=r.instanceId,a=r.className,s=r.help,u=r.options,l=r.value,d="inspector-toggle-button-control-".concat(i);return s&&(e=Object(m.isFunction)(s)?s(c):s),Object(h.createElement)(y.BaseControl,{id:d,help:e,className:O()("components-toggle-button-control",a)},Object(h.createElement)("label",{id:d+"__label",htmlFor:d,className:"components-toggle-button-control__label"},n),Object(h.createElement)(y.ButtonGroup,{"aria-labelledby":d+"__label"},u.map((function(e,r){var c={};return l===e.value?(c.isPrimary=!0,c["aria-pressed"]=!0):(c.isSecondary=!0,c["aria-pressed"]=!1),Object(h.createElement)(y.Button,o()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},c),e.label)}))))}}]),r}(h.Component);t.a=Object(j.withInstanceId)(k)},78:function(e,t){!function(){e.exports=this.wp.viewport}()},790:function(e,t,r){"use strict";r.r(t);var n=r(4),o=r.n(n),c=r(0),i=r(1),a=r(25),s=r(59),u=r(271),l=(r(181),r(10)),d=r.n(l),p=r(24),b=r(3),f=r(45),v=(r(2),r(125)),w=r(170),h=r(93),m=r(451),g=Object(m.a)((function(e){var t=e.error,r=e.getProduct,n=e.isLoading,o=e.product;if(t)return Object(c.createElement)(h.a,{className:"wc-block-featured-product-error",error:t,isLoading:n,onRetry:r});var a=!o||n?Object(c.createElement)(b.Spinner,null):Object(i.sprintf)(Object(i.__)("This block lists reviews for a selected product. %s doesn't have any reviews yet, but they will show up here when it does.",'woocommerce'),o.name);return Object(c.createElement)(b.Placeholder,{className:"wc-block-reviews-by-product",icon:Object(c.createElement)(s.a,{srcElement:u.a,className:"block-editor-block-icon"}),label:Object(i.__)("Reviews by Product",'woocommerce')},a)})),O=r(116),y=Object(b.withSpokenMessages)((function(e){var t=e.attributes,r=e.debouncedSpeak,n=e.setAttributes,o=t.editMode,a=t.productId,l=function(e){var t=e.item,r=void 0===t?0:t;return Object(c.createElement)(f.c,d()({},e,{countLabel:Object(i.sprintf)(Object(i._n)("%d review","%d reviews",r.review_count,'woocommerce'),r.review_count),"aria-label":Object(i.sprintf)(Object(i._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",r.review_count,'woocommerce'),r.name,r.review_count)}))};return!a||o?Object(c.createElement)(b.Placeholder,{icon:Object(c.createElement)(s.a,{icon:u.a,className:"block-editor-block-icon"}),label:Object(i.__)("Reviews by Product",'woocommerce'),className:"wc-block-reviews-by-product"},Object(i.__)("Show reviews of your product to build trust",'woocommerce'),Object(c.createElement)("div",{className:"wc-block-reviews__selection"},Object(c.createElement)(v.a,{selected:t.productId||0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;n({productId:t})},queryArgs:{orderby:"comment_count",order:"desc"},renderItem:l}),Object(c.createElement)(b.Button,{isPrimary:!0,onClick:function(){n({editMode:!1}),r(Object(i.__)("Showing Reviews by Product block preview.",'woocommerce'))}},Object(i.__)("Done",'woocommerce')))):Object(c.createElement)(c.Fragment,null,Object(O.a)(o,n),Object(c.createElement)(p.InspectorControls,{key:"inspector"},Object(c.createElement)(b.PanelBody,{title:Object(i.__)("Product",'woocommerce'),initialOpen:!1},Object(c.createElement)(v.a,{selected:t.productId||0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;n({productId:t})},renderItem:l,isCompact:!0})),Object(c.createElement)(b.PanelBody,{title:Object(i.__)("Content",'woocommerce')},Object(O.b)(t,n)),Object(c.createElement)(b.PanelBody,{title:Object(i.__)("List Settings",'woocommerce')},Object(O.c)(t,n))),Object(c.createElement)(w.a,{attributes:t,icon:Object(c.createElement)(s.a,{icon:u.a,className:"block-editor-block-icon"}),name:Object(i.__)("Reviews by Product",'woocommerce'),noReviewsPlaceholder:g}))})),j=r(165),_=r(166),k=r(137);function E(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 R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Object(a.registerBlockType)("woocommerce/reviews-by-product",{title:Object(i.__)("Reviews by Product",'woocommerce'),icon:{src:Object(c.createElement)(s.a,{srcElement:u.a}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce",'woocommerce')],description:Object(i.__)("Show reviews of your products to build trust.",'woocommerce'),supports:{html:!1},example:R(R({},k.a),{},{attributes:R(R({},k.a.attributes),{},{productId:1})}),attributes:R(R({},j.a),{},{productId:{type:"number"}}),edit:function(e){return Object(c.createElement)(y,e)},save:_.a})},8:function(e,t){!function(){e.exports=this.React}()},85:function(e,t){!function(){e.exports=this.wp.date}()},93:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(59)),i=r(127),a=r(7),s=r.n(a),u=r(3),l=r(47);r(129);t.a=function(e){var t=e.className,r=e.error,a=e.isLoading,d=e.onRetry;return Object(n.createElement)(u.Placeholder,{icon:Object(n.createElement)(c.a,{srcElement:i.a}),label:Object(o.__)("Sorry, an error occurred",'woocommerce'),className:s()("wc-block-api-error",t)},Object(n.createElement)(l.a,{error:r}),d&&Object(n.createElement)(n.Fragment,null,a?Object(n.createElement)(u.Spinner,null):Object(n.createElement)(u.Button,{isSecondary:!0,onClick:d},Object(o.__)("Retry",'woocommerce'))))}}});
[-] checkout.js
[edit]
[-] product-on-sale.js
[edit]
[-] style-rtl.css
[edit]
[-] single-product-frontend.asset.php
[edit]
[-] all-products.asset.php
[edit]
[-] vendors-style.css
[edit]
[-] wc-payment-method-cod.asset.php
[edit]
[-] product-categories.asset.php
[edit]
[+]
atomic-block-components
[-] wc-blocks-google-analytics.js
[edit]
[-] active-filters.js
[edit]
[-] product-new.asset.php
[edit]
[-] wc-shared-hocs.js
[edit]
[-] wc-payment-method-paypal.js
[edit]
[-] reviews-by-product.asset.php
[edit]
[-] wc-payment-method-bacs.js
[edit]
[+]
..
[-] active-filters.asset.php
[edit]
[-] product-on-sale.asset.php
[edit]
[-] active-filters-frontend.asset.php
[edit]
[-] featured-category.js
[edit]
[-] products-by-attribute.asset.php
[edit]
[-] cart.asset.php
[edit]
[-] wc-blocks-registry.js
[edit]
[-] wc-settings.js
[edit]
[-] all-products.js
[edit]
[-] price-format.js
[edit]
[-] checkout-frontend.js
[edit]
[-] blocks-checkout.asset.php
[edit]
[+]
vendors--atomic-block-components
[-] featured-product.js
[edit]
[-] price-filter.js
[edit]
[-] product-search.asset.php
[edit]
[-] wc-payment-method-cheque.js
[edit]
[-] product-category.js
[edit]
[-] products-by-attribute.js
[edit]
[-] attribute-filter-frontend.asset.php
[edit]
[-] editor-rtl.css
[edit]
[-] checkout-frontend.asset.php
[edit]
[-] reviews-by-category.js
[edit]
[-] attribute-filter.asset.php
[edit]
[-] wc-blocks-registry.asset.php
[edit]
[-] price-filter-frontend.asset.php
[edit]
[-] wc-shared-context.asset.php
[edit]
[-] wc-payment-method-cheque.asset.php
[edit]
[-] blocks-checkout-editor.asset.php
[edit]
[-] handpicked-products.asset.php
[edit]
[-] wc-payment-method-stripe.asset.php
[edit]
[-] attribute-filter-frontend.js
[edit]
[-] all-reviews.js
[edit]
[-] checkout.asset.php
[edit]
[-] wc-settings.asset.php
[edit]
[-] product-search.js
[edit]
[-] wc-payment-method-bacs.asset.php
[edit]
[-] reviews-frontend.js
[edit]
[-] blocks.asset.php
[edit]
[-] style.css
[edit]
[-] active-filters-frontend.js
[edit]
[-] price-filter-frontend.js
[edit]
[-] wc-blocks-middleware.asset.php
[edit]
[-] handpicked-products.js
[edit]
[-] attribute-filter.js
[edit]
[-] wc-payment-method-cod.js
[edit]
[-] featured-category.asset.php
[edit]
[-] editor.css
[edit]
[-] wc-blocks-middleware.js
[edit]
[-] all-products-frontend.js
[edit]
[-] product-new.js
[edit]
[-] wc-blocks-google-analytics.asset.php
[edit]
[-] all-reviews.asset.php
[edit]
[-] product-top-rated.js
[edit]
[-] blocks.js
[edit]
[-] wc-blocks-data.js
[edit]
[-] single-product-frontend.js
[edit]
[-] product-tag.js
[edit]
[-] all-products-frontend.asset.php
[edit]
[-] product-best-sellers.asset.php
[edit]
[-] featured-product.asset.php
[edit]
[-] cart-frontend.asset.php
[edit]
[-] single-product.js
[edit]
[-] cart-frontend.js
[edit]
[-] reviews-by-product.js
[edit]
[-] blocks-checkout-editor.js
[edit]
[-] wc-blocks-data.asset.php
[edit]
[-] reviews-frontend.asset.php
[edit]
[-] cart.js
[edit]
[-] product-top-rated.asset.php
[edit]
[-] price-format.asset.php
[edit]
[-] product-category.asset.php
[edit]
[-] product-best-sellers.js
[edit]
[-] product-categories.js
[edit]
[-] product-tag.asset.php
[edit]
[-] vendors-style-rtl.css
[edit]
[-] wc-payment-method-paypal.asset.php
[edit]
[-] wc-shared-hocs.asset.php
[edit]
[-] reviews-by-category.asset.php
[edit]
[-] price-filter.asset.php
[edit]
[-] single-product.asset.php
[edit]
[-] wc-payment-method-stripe.js
[edit]
[-] vendors.js
[edit]
[-] blocks-checkout.js
[edit]
[-] wc-shared-context.js
[edit]