PATH:
home
/
lab2454c
/
credityork.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,a,s=t[0],i=t[1],l=t[2],u=0,b=[];u<s.length;u++)a=s[u],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&b.push(o[a][0]),o[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(d&&d(t);b.length;)b.shift()();return c.push.apply(c,l||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,s=1;s<r.length;s++){var i=r[s];0!==o[i]&&(n=!1)}n&&(c.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},o={45:0},c=[];function a(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,a),r.l=!0,r.exports}a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=s.push.bind(s);s.push=t,s=s.slice();for(var l=0;l<s.length;l++)t(s[l]);var d=i;return c.push([491,0]),r()}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},100:function(e,t,r){"use strict";r.d(t,"a",(function(){return y}));var n=r(6),o=r.n(n),c=r(0),a=r(1),s=r(2),i=r(72),l=r(550),d=r(4),u=r.n(d),b=r(12),m=r(18),p=r(37),w=r(549),g=r(15);const h=e=>{let{id:t,label:r,popoverContents:n,remove:o,screenReaderLabel:l,className:d=""}=e;const[m,p]=Object(c.useState)(!1),v=Object(b.useInstanceId)(h);if(l=l||r,!r)return null;r=Object(g.decodeEntities)(r);const O=u()("woocommerce-tag",d,{"has-remove":!!o}),j="woocommerce-tag__label-"+v,_=Object(c.createElement)(c.Fragment,null,Object(c.createElement)("span",{className:"screen-reader-text"},l),Object(c.createElement)("span",{"aria-hidden":"true"},r));return Object(c.createElement)("span",{className:O},n?Object(c.createElement)(s.Button,{className:"woocommerce-tag__text",id:j,onClick:()=>p(!0)},_):Object(c.createElement)("span",{className:"woocommerce-tag__text",id:j},_),n&&m&&Object(c.createElement)(s.Popover,{onClose:()=>p(!1)},n),o&&Object(c.createElement)(s.Button,{className:"woocommerce-tag__remove",onClick:o(t),label:Object(a.sprintf)(// Translators: %s label. Object(a.__)("Remove %s","woocommerce"),r),"aria-describedby":j},Object(c.createElement)(i.a,{icon:w.a,size:20,className:"clear-icon"})))};var v=h;const O=e=>Object(c.createElement)(p.b,e),j=e=>{const{list:t,selected:r,renderItem:n,depth:a=0,onSelect:s,instanceId:i,isSingle:l,search:d,useExpandedPanelId:u}=e,[b]=u;return t?Object(c.createElement)(c.Fragment,null,t.map(t=>{var m,p;const w=null!==(m=t.children)&&void 0!==m&&m.length&&!l?t.children.every(e=>{let{id:t}=e;return r.find(e=>e.id===t)}):!!r.find(e=>{let{id:r}=e;return r===t.id}),g=(null===(p=t.children)||void 0===p?void 0:p.length)&&b===t.id;return Object(c.createElement)(c.Fragment,{key:t.id},Object(c.createElement)("li",null,n({item:t,isSelected:w,onSelect:s,isSingle:l,selected:r,search:d,depth:a,useExpandedPanelId:u,controlId:i})),g?Object(c.createElement)(j,o()({},e,{list:t.children,depth:a+1})):null)})):null},_=e=>{let{isLoading:t,isSingle:r,selected:n,messages:o,onChange:i,onRemove:l}=e;if(t||r||!n)return null;const d=n.length;return Object(c.createElement)("div",{className:"woocommerce-search-list__selected"},Object(c.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(c.createElement)("strong",null,o.selected(d)),d>0?Object(c.createElement)(s.Button,{isLink:!0,isDestructive:!0,onClick:()=>i([]),"aria-label":o.clear},Object(a.__)("Clear all","woocommerce")):null),d>0?Object(c.createElement)("ul",null,n.map((e,t)=>Object(c.createElement)("li",{key:t},Object(c.createElement)(v,{label:e.name,id:e.id,remove:l})))):null)},f=e=>{let{filteredList:t,search:r,onSelect:n,instanceId:o,useExpandedPanelId:s,...d}=e;const{messages:u,renderItem:b,selected:m,isSingle:p}=d,w=b||O;return 0===t.length?Object(c.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(c.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(c.createElement)(i.a,{icon:l.a})),Object(c.createElement)("span",{className:"woocommerce-search-list__not-found-text"},r?Object(a.sprintf)(u.noResults,r):u.noItems)):Object(c.createElement)("ul",{className:"woocommerce-search-list__list"},Object(c.createElement)(j,{useExpandedPanelId:s,list:t,selected:m,renderItem:w,onSelect:n,instanceId:o,isSingle:p,search:r}))},y=e=>{const{className:t="",isCompact:r,isHierarchical:n,isLoading:i,isSingle:l,list:d,messages:p=m.a,onChange:w,onSearch:g,selected:h,type:v="text",debouncedSpeak:O}=e,[j,E]=Object(c.useState)(""),k=Object(c.useState)(-1),R=Object(b.useInstanceId)(y),S=Object(c.useMemo)(()=>({...m.a,...p}),[p]),C=Object(c.useMemo)(()=>Object(m.c)(d,j,n),[d,j,n]);Object(c.useEffect)(()=>{O&&O(S.updated)},[O,S]),Object(c.useEffect)(()=>{"function"==typeof g&&g(j)},[j,g]);const P=Object(c.useCallback)(e=>()=>{l&&w([]);const t=h.findIndex(t=>{let{id:r}=t;return r===e});w([...h.slice(0,t),...h.slice(t+1)])},[l,h,w]),N=Object(c.useCallback)(e=>()=>{Array.isArray(e)?w(e):-1===h.findIndex(t=>{let{id:r}=t;return r===e.id})?w(l?[e]:[...h,e]):P(e.id)()},[l,P,w,h]),I=Object(c.useCallback)(e=>{const[t]=h.filter(t=>!e.find(e=>t.id===e.id));P(t.id)()},[P,h]);return Object(c.createElement)("div",{className:u()("woocommerce-search-list",t,{"is-compact":r,"is-loading":i,"is-token":"token"===v})},"text"===v&&Object(c.createElement)(_,o()({},e,{onRemove:P,messages:S})),Object(c.createElement)("div",{className:"woocommerce-search-list__search"},"text"===v?Object(c.createElement)(s.TextControl,{label:S.search,type:"search",value:j,onChange:e=>E(e)}):Object(c.createElement)(s.FormTokenField,{disabled:i,label:S.search,onChange:I,onInputChange:e=>E(e),suggestions:[],__experimentalValidateInput:()=>!1,value:i?[Object(a.__)("Loading…","woocommerce")]:h.map(e=>({...e,value:e.name})),__experimentalShowHowTo:!1})),i?Object(c.createElement)("div",{className:"woocommerce-search-list__list"},Object(c.createElement)(s.Spinner,null)):Object(c.createElement)(f,o()({},e,{search:j,filteredList:C,messages:S,onSelect:N,instanceId:R,useExpandedPanelId:k})))};Object(s.withSpokenMessages)(y)},104:function(e,t,r){"use strict";var n=r(6),o=r.n(n),c=r(0),a=r(1),s=r(9),i=r(37),l=r(100),d=r(12),u=Object(d.createHigherOrderComponent)(e=>{class t extends c.Component{render(){const{selected:t}=this.props,r=null==t;return Array.isArray(t)?Object(c.createElement)(e,this.props):Object(c.createElement)(e,o()({},this.props,{selected:r?[]:[t]}))}}return t.defaultProps={selected:null},t},"withTransformSingleSelectToMultipleSelect"),b=r(207),m=r(23),p=r.n(m),w=r(26),g=r.n(w),h=r(27),v=r(31),O=Object(d.createHigherOrderComponent)(e=>{class t extends c.Component{constructor(){super(...arguments),p()(this,"state",{error:null,loading:!1,variations:{}}),p()(this,"loadVariations",()=>{const{products:e}=this.props,{loading:t,variations:r}=this.state;if(t)return;const n=this.getExpandedProduct();if(!n||r[n])return;const o=e.find(e=>e.id===n);o.variations&&0!==o.variations.length?(this.setState({loading:!0}),Object(h.g)(n).then(e=>{const t=e.map(e=>({...e,parent:n}));this.setState({variations:{...this.state.variations,[n]:t},loading:!1,error:null})}).catch(async e=>{const t=await Object(v.a)(e);this.setState({variations:{...this.state.variations,[n]:null},loading:!1,error:t})})):this.setState({variations:{...this.state.variations,[n]:null},loading:!1,error:null})})}componentDidMount(){const{selected:e,showVariations:t}=this.props;e&&t&&this.loadVariations()}componentDidUpdate(e){const{isLoading:t,selected:r,showVariations:n}=this.props;n&&(!g()(e.selected,r)||e.isLoading&&!t)&&this.loadVariations()}isProductId(e){const{products:t}=this.props;return t.some(t=>t.id===e)}findParentProduct(e){var t;const{products:r}=this.props;return null===(t=r.filter(t=>t.variations&&t.variations.find(t=>{let{id:r}=t;return r===e}))[0])||void 0===t?void 0:t.id}getExpandedProduct(){const{isLoading:e,selected:t,showVariations:r}=this.props;if(!r)return null;let n=t&&t.length?t[0]:null;return n?this.prevSelectedItem=n:this.prevSelectedItem&&(e||this.isProductId(this.prevSelectedItem)||(n=this.prevSelectedItem)),!e&&n?this.isProductId(n)?n:this.findParentProduct(n):null}render(){const{error:t,isLoading:r}=this.props,{error:n,loading:a,variations:s}=this.state;return Object(c.createElement)(e,o()({},this.props,{error:n||t,expandedProduct:this.getExpandedProduct(),isLoading:r,variations:s,variationsLoading:a}))}}return p()(t,"defaultProps",{selected:[],showVariations:!1}),t},"withProductVariations"),j=r(35),_=r(4),f=r.n(_),y=r(76);r(145);const E={list:Object(a.__)("Products","woocommerce"),noItems:Object(a.__)("Your store doesn't have any products.","woocommerce"),search:Object(a.__)("Search for a product to display","woocommerce"),updated:Object(a.__)("Product search results updated.","woocommerce")},k=e=>{let{expandedProduct:t,error:r,instanceId:n,isCompact:d,isLoading:u,onChange:b,onSearch:m,products:p,renderItem:w,selected:g,showVariations:h,variations:v,variationsLoading:O}=e;if(r)return Object(c.createElement)(j.a,{error:r});const _=[...p,...v&&v[t]?v[t]:[]];return Object(c.createElement)(l.a,{className:"woocommerce-products",list:_,isCompact:d,isLoading:u,isSingle:!0,selected:_.filter(e=>{let{id:t}=e;return g.includes(t)}),onChange:b,renderItem:w||(h?e=>{const{item:t,search:r,depth:l=0,isSelected:d,onSelect:b}=e,m=t.variations&&Array.isArray(t.variations)?t.variations.length:0,p=f()("woocommerce-search-product__item","woocommerce-search-list__item","depth-"+l,"has-count",{"is-searching":r.length>0,"is-skip-level":0===l&&0!==t.parent,"is-variable":m>0});if(!t.breadcrumbs.length)return Object(c.createElement)(y.a,o()({},e,{className:f()(p,{"is-selected":d}),isSelected:d,item:t,onSelect:()=>()=>{b(t)()},isLoading:u||O,countLabel:t.variations.length>0?Object(a.sprintf)( /* translators: %1$d is the number of variations of a product product. */ Object(a.__)("%1$d variations","woocommerce"),t.variations.length):null,name:"products-"+n,"aria-label":Object(a.sprintf)( /* translators: %1$s is the product name, %2$d is the number of variations of that product. */ Object(a._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.variations.length,"woocommerce"),t.name,t.variations.length)}));const w=Object(s.isEmpty)(t.variation)?e:{...e,item:{...e.item,name:t.variation},"aria-label":`${t.breadcrumbs[0]}: ${t.variation}`};return Object(c.createElement)(i.a,o()({},w,{className:p,name:"variations-"+n}))}:null),onSearch:m,messages:E,isHierarchical:!0})};k.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=u(Object(b.a)(O(Object(d.withInstanceId)(k))))},11:function(e,t){e.exports=window.wp.primitives},116:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return d}));var n=r(0),o=r(1),c=r(5),a=r(3),s=r(2);const i=(e,t,r)=>Object(n.createElement)(c.BlockControls,null,Object(n.createElement)(s.ToolbarGroup,{controls:[{icon:"edit",title:r,onClick:()=>t({editMode:!e}),isActive:e}]})),l=(e,t)=>{const r=Object(a.getSetting)("showAvatars",!0),c=Object(a.getSetting)("reviewRatingsEnabled",!0);return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.ToggleControl,{label:Object(o.__)("Product rating","woocommerce"),checked:e.showReviewRating,onChange:()=>t({showReviewRating:!e.showReviewRating})}),e.showReviewRating&&!c&&Object(n.createElement)(s.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(n.createInterpolateElement)(Object(o.__)("Product rating is disabled in your <a>store settings</a>.","woocommerce"),{a:Object(n.createElement)("a",{href:Object(a.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(n.createElement)(s.ToggleControl,{label:Object(o.__)("Reviewer name","woocommerce"),checked:e.showReviewerName,onChange:()=>t({showReviewerName:!e.showReviewerName})}),Object(n.createElement)(s.ToggleControl,{label:Object(o.__)("Image","woocommerce"),checked:e.showReviewImage,onChange:()=>t({showReviewImage:!e.showReviewImage})}),Object(n.createElement)(s.ToggleControl,{label:Object(o.__)("Review date","woocommerce"),checked:e.showReviewDate,onChange:()=>t({showReviewDate:!e.showReviewDate})}),Object(n.createElement)(s.ToggleControl,{label:Object(o.__)("Review content","woocommerce"),checked:e.showReviewContent,onChange:()=>t({showReviewContent:!e.showReviewContent})}),e.showReviewImage&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.__experimentalToggleGroupControl,{label:Object(o.__)("Review image","woocommerce"),value:e.imageType,onChange:e=>t({imageType:e})},Object(n.createElement)(s.__experimentalToggleGroupControlOption,{value:"reviewer",label:Object(o.__)("Reviewer photo","woocommerce")}),Object(n.createElement)(s.__experimentalToggleGroupControlOption,{value:"product",label:Object(o.__)("Product","woocommerce")})),"reviewer"===e.imageType&&!r&&Object(n.createElement)(s.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(n.createInterpolateElement)(Object(o.__)("Reviewer photo is disabled in your <a>site settings</a>.","woocommerce"),{a:Object(n.createElement)("a",{href:Object(a.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},d=(e,t)=>Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.ToggleControl,{label:Object(o.__)("Order by","woocommerce"),checked:e.showOrderby,onChange:()=>t({showOrderby:!e.showOrderby})}),Object(n.createElement)(s.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:e=>t({orderby:e})}),Object(n.createElement)(s.RangeControl,{label:Object(o.__)("Starting Number of Reviews","woocommerce"),value:e.reviewsOnPageLoad,onChange:e=>t({reviewsOnPageLoad:e}),max:20,min:1}),Object(n.createElement)(s.ToggleControl,{label:Object(o.__)("Load more","woocommerce"),checked:e.showLoadMore,onChange:()=>t({showLoadMore:!e.showLoadMore})}),e.showLoadMore&&Object(n.createElement)(s.RangeControl,{label:Object(o.__)("Load More Reviews","woocommerce"),value:e.reviewsOnLoadMore,onChange:e=>t({reviewsOnLoadMore:e}),max:20,min:1}))},12:function(e,t){e.exports=window.wp.compose},124:function(e,t){},130:function(e,t,r){"use strict";var n=r(0),o=r(4),c=r.n(o),a=r(30),s=r(12);r(180),t.a=Object(s.withInstanceId)(e=>{let{className:t,instanceId:r,label:o="",onChange:s,options:i,screenReaderLabel:l,value:d=""}=e;const u="wc-block-components-sort-select__select-"+r;return Object(n.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(a.a,{label:o,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:u}}),Object(n.createElement)("select",{id:u,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:s,value:d},i&&i.map(e=>Object(n.createElement)("option",{key:e.key,value:e.key},e.label))))})},135:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(1),o=r(19);const 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:"#", /* translators: An example person name used for the block previews. */ reviewer:Object(n.__)("Alice","woocommerce"),review:`<p>${Object(n.__)("I bought this product last week and I'm very happy with it.","woocommerce")}</p>\n`,reviewer_avatar_urls:{48:o.o.defaultAvatar,96:o.o.defaultAvatar},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:"#", /* translators: An example person name used for the block previews. */ reviewer:Object(n.__)("Bob","woocommerce"),review:`<p>${Object(n.__)("This product is awesome, I love it!","woocommerce")}</p>\n`,reviewer_avatar_urls:{48:o.o.defaultAvatar,96:o.o.defaultAvatar},rating:null,verified:!1}]}}},145:function(e,t){},15:function(e,t){e.exports=window.wp.htmlEntities},16:function(e,t){e.exports=window.wp.apiFetch},161: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}}},162:function(e,t,r){"use strict";var n=r(6),o=r.n(n),c=r(0),a=r(5),s=(r(181),r(60));t.a=e=>{let{attributes:t}=e;return Object(c.createElement)("div",o()({},a.useBlockProps.save({className:Object(s.a)(t)}),Object(s.b)(t)))}},169:function(e,t,r){"use strict";var n=r(0),o=r(1),c=r(9),a=r(2),s=r(5),i=r(3),l=r(79),d=r(30);r(213);var u=e=>{let{onClick:t,label:r=Object(o.__)("Load more","woocommerce"),screenReaderLabel:c=Object(o.__)("Load more","woocommerce")}=e;return Object(n.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(n.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(n.createElement)(d.a,{label:r,screenReaderLabel:c})))},b=r(130);r(210);var m=e=>{let{onChange:t,readOnly:r,value:c}=e;return Object(n.createElement)(b.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",label:Object(o.__)("Order by","woocommerce"),onChange:t,options:[{key:"most-recent",label:Object(o.__)("Most recent","woocommerce")},{key:"highest-rating",label:Object(o.__)("Highest rating","woocommerce")},{key:"lowest-rating",label:Object(o.__)("Lowest rating","woocommerce")}],readOnly:r,screenReaderLabel:Object(o.__)("Order reviews by","woocommerce"),value:c})},p=r(4),w=r.n(p),g=r(23),h=r.n(g),v=r(198),O=r.n(v);const j=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";const n=O()(e,{suffix:r,limit:t});return n.html},_=(e,t,r)=>(t<=r?e.start=e.middle+1:e.end=e.middle-1,e),f=(e,t,r,n)=>{const o=((e,t,r)=>{let n={start:0,middle:0,end:e.length};for(;n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=j(e,n.middle),n=_(n,t.clientHeight,r);return n.middle})(e,t,r);return j(e,o-n.length,n)},y={className:"read-more-content",ellipsis:"…",lessText:Object(o.__)("Read less","woocommerce"),maxLines:3,moreText:Object(o.__)("Read more","woocommerce")};class E extends n.Component{constructor(e){super(e),this.state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},this.reviewContent=Object(n.createRef)(),this.reviewSummary=Object(n.createRef)(),this.getButton=this.getButton.bind(this),this.onClick=this.onClick.bind(this)}componentDidMount(){this.setSummary()}componentDidUpdate(e){e.maxLines===this.props.maxLines&&e.children===this.props.children||this.setState({clampEnabled:null,summary:"."},this.setSummary)}setSummary(){if(this.props.children){const{maxLines:e,ellipsis:t}=this.props;if(!this.reviewSummary.current||!this.reviewContent.current)return;const r=(this.reviewSummary.current.clientHeight+1)*e+1,n=this.reviewContent.current.clientHeight+1>r;this.setState({clampEnabled:n}),n&&this.setState({summary:f(this.reviewContent.current.innerHTML,this.reviewSummary.current,r,t)})}}getButton(){const{isExpanded:e}=this.state,{className:t,lessText:r,moreText:o}=this.props,c=e?r:o;if(c)return Object(n.createElement)("a",{href:"#more",className:t+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}onClick(e){e.preventDefault();const{isExpanded:t}=this.state;this.setState({isExpanded:!t})}render(){const{className:e}=this.props,{content:t,summary:r,clampEnabled:o,isExpanded:c}=this.state;return t?!1===o?Object(n.createElement)("div",{className:e},Object(n.createElement)("div",{ref:this.reviewContent},t)):Object(n.createElement)("div",{className:e},(!c||null===o)&&Object(n.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:r}}),(c||null===o)&&Object(n.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},t),this.getButton()):null}}h()(E,"defaultProps",y);var k=E;r(212);var R=e=>{let{attributes:t,review:r={}}=e;const{imageType:c,showReviewDate:a,showReviewerName:s,showReviewImage:i,showReviewRating:l,showReviewContent:d,showProductName:u}=t,{rating:b}=r,m=!(Object.keys(r).length>0),p=Number.isFinite(b)&&l;return Object(n.createElement)("li",{className:w()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":m,"wc-block-components-review-list-item__item--has-image":i}),"aria-hidden":m},(u||a||s||i||p)&&Object(n.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},i&&function(e,t,r){var c,a;return r||!e?Object(n.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"}):Object(n.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(n.createElement)("img",{"aria-hidden":"true",alt:(null===(c=e.product_image)||void 0===c?void 0:c.alt)||"",src:(null===(a=e.product_image)||void 0===a?void 0:a.thumbnail)||""}):Object(n.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[96]||""}),e.verified&&Object(n.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(o.__)("Verified buyer","woocommerce")},Object(o.__)("Verified buyer","woocommerce")))}(r,c,m),(u||s||p||a)&&Object(n.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},p&&function(e){const{rating:t}=e,r={width:t/5*100+"%"},c=Object(o.sprintf)( /* translators: %f is referring to the average rating value */ Object(o.__)("Rated %f out of 5","woocommerce"),t),a={__html:Object(o.sprintf)( /* translators: %s is referring to the average rating value */ Object(o.__)("Rated %s out of 5","woocommerce"),Object(o.sprintf)('<strong class="rating">%f</strong>',t))};return Object(n.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(n.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":c},Object(n.createElement)("span",{style:r,dangerouslySetInnerHTML:a})))}(r),u&&function(e){return Object(n.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(n.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(r),s&&function(e){const{reviewer:t=""}=e;return Object(n.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},t)}(r),a&&function(e){const{date_created:t,formatted_date_created:r}=e;return Object(n.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(r))),d&&function(e){return Object(n.createElement)(k,{maxLines:10,moreText:Object(o.__)("Read full review","woocommerce"),lessText:Object(o.__)("Hide full review","woocommerce"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(n.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(r))};r(211);var S=e=>{let{attributes:t,reviews:r}=e;const o=Object(i.getSetting)("showAvatars",!0),c=Object(i.getSetting)("reviewRatingsEnabled",!0),a=(o||"product"===t.imageType)&&t.showReviewImage,s=c&&t.showReviewRating,l={...t,showReviewImage:a,showReviewRating:s};return Object(n.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(n.createElement)(R,{attributes:l}):r.map((e,t)=>Object(n.createElement)(R,{key:e.id||t,attributes:l,review:e})))},C=r(6),P=r.n(C),N=r(26),I=r.n(N),x=r(60),L=r(31);class T extends n.Component{render(){const{attributes:e,error:t,isLoading:r,noReviewsPlaceholder:c,reviews:s,totalReviews:d}=this.props;if(t)return Object(n.createElement)(l.a,{className:"wc-block-featured-product-error",error:t,isLoading:r});if(0===s.length&&!r)return Object(n.createElement)(c,{attributes:e});const b=Object(i.getSetting)("reviewRatingsEnabled",!0);return Object(n.createElement)(a.Disabled,null,e.showOrderby&&b&&Object(n.createElement)(m,{readOnly:!0,value:e.orderby,onChange:()=>null}),Object(n.createElement)(S,{attributes:e,reviews:s}),e.showLoadMore&&d>s.length&&Object(n.createElement)(u,{screenReaderLabel:Object(o.__)("Load more reviews","woocommerce")}))}}var A=(e=>{class t extends n.Component{constructor(){super(...arguments),h()(this,"isPreview",!!this.props.attributes.previewReviews),h()(this,"delayedAppendReviews",this.props.delayFunction(this.appendReviews)),h()(this,"isMounted",!1),h()(this,"state",{error:null,loading:!0,reviews:this.isPreview?this.props.attributes.previewReviews:[],totalReviews:this.isPreview?this.props.attributes.previewReviews.length:0}),h()(this,"setError",async e=>{if(!this.isMounted)return;const{onReviewsLoadError:t}=this.props,r=await Object(L.a)(e);this.setState({reviews:[],loading:!1,error:r}),t(r)})}componentDidMount(){this.isMounted=!0,this.replaceReviews()}componentDidUpdate(e){e.reviewsToDisplay<this.props.reviewsToDisplay?this.delayedAppendReviews():this.shouldReplaceReviews(e,this.props)&&this.replaceReviews()}shouldReplaceReviews(e,t){return e.orderby!==t.orderby||e.order!==t.order||e.productId!==t.productId||!I()(e.categoryIds,t.categoryIds)}componentWillUnmount(){this.isMounted=!1,this.delayedAppendReviews.cancel&&this.delayedAppendReviews.cancel()}getArgs(e){const{categoryIds:t,order:r,orderby:n,productId:o,reviewsToDisplay:c}=this.props,a={order:r,orderby:n,per_page:c-e,offset:e};if(t){const e=Array.isArray(t)?t:JSON.parse(t);a.category_id=Array.isArray(e)?e.join(","):e}return o&&(a.product_id=o),a}replaceReviews(){if(this.isPreview)return;const{onReviewsReplaced:e}=this.props;this.updateListOfReviews().then(e)}appendReviews(){if(this.isPreview)return;const{onReviewsAppended:e,reviewsToDisplay:t}=this.props,{reviews:r}=this.state;t<=r.length||this.updateListOfReviews(r).then(e)}updateListOfReviews(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const{reviewsToDisplay:t}=this.props,{totalReviews:r}=this.state,n=Math.min(r,t)-e.length;return this.setState({loading:!0,reviews:e.concat(Array(n).fill({}))}),Object(x.c)(this.getArgs(e.length)).then(t=>{let{reviews:r,totalReviews:n}=t;return this.isMounted&&this.setState({reviews:e.filter(e=>Object.keys(e).length).concat(r),totalReviews:n,loading:!1,error:null}),{newReviews:r}}).catch(this.setError)}render(){const{reviewsToDisplay:t}=this.props,{error:r,loading:o,reviews:c,totalReviews:a}=this.state;return Object(n.createElement)(e,P()({},this.props,{error:r,isLoading:o,reviews:c.slice(0,t),totalReviews:a}))}}h()(t,"defaultProps",{delayFunction:e=>e,onReviewsAppended:()=>{},onReviewsLoadError:()=>{},onReviewsReplaced:()=>{}});const{displayName:r=e.name||"Component"}=e;return t.displayName=`WithReviews( ${r} )`,t})(T);t.a=e=>{let{attributes:t,icon:r,name:i,noReviewsPlaceholder:l}=e;const{categoryIds:d,productId:u,reviewsOnPageLoad:b,showProductName:m,showReviewDate:p,showReviewerName:w,showReviewContent:g,showReviewImage:h,showReviewRating:v}=t,{order:O,orderby:j}=Object(x.d)(t.orderby),_=!(g||v||p||w||h||m),f=Object(s.useBlockProps)({className:Object(x.a)(t)});return _?Object(n.createElement)(a.Placeholder,{icon:r,label:i},Object(o.__)("The content for this block is hidden due to block settings.","woocommerce")):Object(n.createElement)("div",f,Object(n.createElement)(A,{attributes:t,categoryIds:d,delayFunction:e=>Object(c.debounce)(e,400),noReviewsPlaceholder:l,orderby:j,order:O,productId:u,reviewsToDisplay:b}))}},17:function(e,t){e.exports=window.wp.url},18:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return l})),r.d(t,"b",(function(){return d}));var n=r(0),o=r(9),c=r(1);const a={clear:Object(c.__)("Clear all selected items","woocommerce"),noItems:Object(c.__)("No items found.","woocommerce"), /* Translators: %s search term */ noResults:Object(c.__)("No results for %s","woocommerce"),search:Object(c.__)("Search for items","woocommerce"),selected:e=>Object(c.sprintf)( /* translators: Number of items selected from list. */ Object(c._n)("%d item selected","%d items selected",e,"woocommerce"),e),updated:Object(c.__)("Search results updated.","woocommerce")},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const r=Object(o.groupBy)(e,"parent"),n=Object(o.keyBy)(t,"id"),c=["0"],a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=a(n[e.parent]);return[...t,e.name]},s=e=>e.map(e=>{const t=r[e.id];return c.push(""+e.id),{...e,breadcrumbs:a(n[e.parent]),children:t&&t.length?s(t):[]}}),i=s(r[0]||[]);return Object.entries(r).forEach(e=>{let[t,r]=e;c.includes(t)||i.push(...s(r||[]))}),i},i=(e,t,r)=>{if(!t)return r?s(e):e;const n=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),o=e.map(e=>!!n.test(e.name)&&e).filter(Boolean);return r?s(o,e):o},l=(e,t)=>{if(!t)return e;const r=new RegExp(`(${t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")})`,"ig");return e.split(r).map((e,t)=>r.test(e)?Object(n.createElement)("strong",{key:t},e):Object(n.createElement)(n.Fragment,{key:t},e))},d=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},180:function(e,t){},181:function(e,t){},19: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 s})),r.d(t,"n",(function(){return i})),r.d(t,"j",(function(){return l})),r.d(t,"e",(function(){return d})),r.d(t,"g",(function(){return u})),r.d(t,"k",(function(){return b})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return p})),r.d(t,"h",(function(){return w})),r.d(t,"a",(function(){return g})),r.d(t,"i",(function(){return h})),r.d(t,"b",(function(){return v})),r.d(t,"f",(function(){return O}));var n,o=r(3);const c=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=c.pluginUrl+"images/",s=c.pluginUrl+"build/",i=c.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,d=o.STORE_PAGES.checkout.id,u=(o.STORE_PAGES.checkout.permalink,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),p=o.STORE_PAGES.cart.permalink,w=(o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),Object(o.getSetting)("shippingCountries",{})),g=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),v=Object(o.getSetting)("allowedStates",{}),O=Object(o.getSetting)("localPickupEnabled",!1)},2:function(e,t){e.exports=window.wp.components},207:function(e,t,r){"use strict";var n=r(6),o=r.n(n),c=r(0),a=r(19),s=r(27),i=r(122),l=r(31);t.a=e=>t=>{let{selected:r,...n}=t;const[d,u]=Object(c.useState)(!0),[b,m]=Object(c.useState)(null),[p,w]=Object(c.useState)([]),g=a.o.productCount>100,h=async e=>{const t=await Object(l.a)(e);m(t),u(!1)},v=Object(c.useRef)(r);Object(c.useEffect)(()=>{Object(s.h)({selected:v.current}).then(e=>{w(e),u(!1)}).catch(h)},[v]);const O=Object(i.a)(e=>{Object(s.h)({selected:r,search:e}).then(e=>{w(e),u(!1)}).catch(h)},400),j=Object(c.useCallback)(e=>{u(!0),O(e)},[u,O]);return Object(c.createElement)(e,o()({},n,{selected:r,error:b,products:p,isLoading:d,onSearch:g?j:null}))}},210:function(e,t){},211:function(e,t){},212:function(e,t){},213:function(e,t){},26:function(e,t){e.exports=window.wp.isShallowEqual},27:function(e,t,r){"use strict";r.d(t,"h",(function(){return l})),r.d(t,"e",(function(){return d})),r.d(t,"b",(function(){return u})),r.d(t,"i",(function(){return b})),r.d(t,"f",(function(){return m})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return w})),r.d(t,"g",(function(){return g})),r.d(t,"a",(function(){return h}));var n=r(17),o=r(16),c=r.n(o),a=r(9),s=r(3),i=r(19);const l=e=>{let{selected:t=[],search:r="",queryArgs:o={}}=e;const s=(e=>{let{selected:t=[],search:r="",queryArgs:o={}}=e;const c=i.o.productCount>100,a={per_page:c?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},s=[Object(n.addQueryArgs)("/wc/store/v1/products",{...a,...o})];return c&&t.length&&s.push(Object(n.addQueryArgs)("/wc/store/v1/products",{catalog_visibility:"any",include:t,per_page:0})),s})({selected:t,search:r,queryArgs:o});return Promise.all(s.map(e=>c()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},d=e=>c()({path:"/wc/store/v1/products/"+e}),u=()=>c()({path:"wc/store/v1/products/attributes"}),b=e=>c()({path:`wc/store/v1/products/attributes/${e}/terms`}),m=e=>{let{selected:t=[],search:r}=e;const o=(e=>{let{selected:t=[],search:r}=e;const o=Object(s.getSetting)("limitTags",!1),c=[Object(n.addQueryArgs)("wc/store/v1/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:r})];return o&&t.length&&c.push(Object(n.addQueryArgs)("wc/store/v1/products/tags",{include:t})),c})({selected:t,search:r});return Promise.all(o.map(e=>c()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id"))},p=e=>c()({path:Object(n.addQueryArgs)("wc/store/v1/products/categories",{per_page:0,...e})}),w=e=>c()({path:"wc/store/v1/products/categories/"+e}),g=e=>c()({path:Object(n.addQueryArgs)("wc/store/v1/products",{per_page:0,type:"variation",parent:e})}),h=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},28:function(e,t){e.exports=window.React},3:function(e,t){e.exports=window.wc.wcSettings},30:function(e,t,r){"use strict";var n=r(0),o=r(4),c=r.n(o);t.a=e=>{let t,{label:r,screenReaderLabel:o,wrapperElement:a,wrapperProps:s={}}=e;const i=null!=r,l=null!=o;return!i&&l?(t=a||"span",s={...s,className:c()(s.className,"screen-reader-text")},Object(n.createElement)(t,s,o)):(t=a||n.Fragment,i&&l&&r!==o?Object(n.createElement)(t,s,Object(n.createElement)("span",{"aria-hidden":"true"},r),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,s,r))}},31:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=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"}}},34:function(e,t){e.exports=window.wp.escapeHtml},342:function(e,t,r){"use strict";var n=r(6),o=r.n(n),c=r(23),a=r.n(c),s=r(0),i=r(12),l=r(27),d=r(31);const u=Object(i.createHigherOrderComponent)(e=>class extends s.Component{constructor(){super(...arguments),a()(this,"state",{error:null,loading:!1,product:"preview"===this.props.attributes.productId?this.props.attributes.previewProduct:null}),a()(this,"loadProduct",()=>{const{productId:e}=this.props.attributes;"preview"!==e&&(e?(this.setState({loading:!0}),Object(l.e)(e).then(e=>{this.setState({product:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(d.a)(e);this.setState({product:null,loading:!1,error:t})})):this.setState({product:null,loading:!1,error:null}))})}componentDidMount(){this.loadProduct()}componentDidUpdate(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}render(){const{error:t,loading:r,product:n}=this.state;return Object(s.createElement)(e,o()({},this.props,{error:t,getProduct:this.loadProduct,isLoading:r,product:n}))}},"withProduct");t.a=u},35:function(e,t,r){"use strict";var n=r(0),o=r(1),c=r(34);t.a=e=>{let{error:t}=e;return Object(n.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?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)(t))):"api"===r?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)(t))):t:Object(o.__)("An error has prevented the block from being updated.","woocommerce")})(t))}},37:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(6),o=r.n(n),c=r(0),a=r(4),s=r.n(a),i=r(2);function l(e,t,r){const n=new Set(t.map(e=>e[r]));return e.filter(e=>!n.has(e[r]))}var d=r(15),u=r(18);const b=e=>{let{label:t}=e;return Object(c.createElement)("span",{className:"woocommerce-search-list__item-count"},t)},m=e=>{const{item:t,search:r}=e,n=t.breadcrumbs&&t.breadcrumbs.length;return Object(c.createElement)("span",{className:"woocommerce-search-list__item-label"},n?Object(c.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(u.b)(t.breadcrumbs)):null,Object(c.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(u.d)(Object(d.decodeEntities)(t.name),r)))},p=e=>{var t,r;let{countLabel:n,className:a,depth:d=0,controlId:p="",item:w,isSelected:g,isSingle:h,onSelect:v,search:O="",selected:j,useExpandedPanelId:_,...f}=e;const[y,E]=_,k=null!=n&&void 0!==w.count&&null!==w.count,R=!(null===(t=w.breadcrumbs)||void 0===t||!t.length),S=!(null===(r=w.children)||void 0===r||!r.length),C=y===w.id,P=s()(["woocommerce-search-list__item","depth-"+d,a],{"has-breadcrumbs":R,"has-children":S,"has-count":k,"is-expanded":C,"is-radio-button":h}),N=f.name||"search-list-item-"+p,I=`${N}-${w.id}`,x=Object(c.useCallback)(()=>{E(C?-1:Number(w.id))},[C,w.id,E]);return S?Object(c.createElement)("div",{className:P,onClick:x,onKeyDown:e=>"Enter"===e.key||" "===e.key?x():null,role:"treeitem",tabIndex:0},h?Object(c.createElement)(c.Fragment,null,Object(c.createElement)("input",o()({type:"radio",id:I,name:N,value:w.value,onChange:v(w),onClick:e=>e.stopPropagation(),checked:g,className:"woocommerce-search-list__item-input"},f)),Object(c.createElement)(m,{item:w,search:O}),k?Object(c.createElement)(b,{label:n||w.count}):null):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(i.CheckboxControl,o()({className:"woocommerce-search-list__item-input",checked:g},!g&&w.children.some(e=>j.find(t=>t.id===e.id))?{indeterminate:!0}:{},{label:Object(u.d)(w.name,O),onChange:()=>{g?v(l(j,w.children,"id"))():v(function(e,t,r){const n=l(t,e,"id");return[...e,...n]}(j,w.children))()},onClick:e=>e.stopPropagation()})),k?Object(c.createElement)(b,{label:n||w.count}):null)):Object(c.createElement)("label",{htmlFor:I,className:P},h?Object(c.createElement)("input",o()({type:"radio",id:I,name:N,value:w.value,onChange:v(w),checked:g,className:"woocommerce-search-list__item-input"},f)):Object(c.createElement)("input",o()({type:"checkbox",id:I,name:N,value:w.value,onChange:v(w),checked:g,className:"woocommerce-search-list__item-input"},f)),Object(c.createElement)(m,{item:w,search:O}),k?Object(c.createElement)(b,{label:n||w.count}):null)};t.b=p},491:function(e,t,r){e.exports=r(527)},5:function(e,t){e.exports=window.wp.blockEditor},527:function(e,t,r){"use strict";r.r(t);var n=r(0),o=r(1),c=r(8),a=r(72),s=r(327),i=(r(181),r(6)),l=r.n(i),d=r(5),u=r(2),b=r(37),m=r(104),p=r(169),w=r(79),g=r(342),h=r(15),v=Object(g.a)(e=>{let{error:t,getProduct:r,isLoading:c,product:i}=e;if(t)return Object(n.createElement)(w.a,{className:"wc-block-featured-product-error",error:t,isLoading:c,onRetry:r});const l=!i||c?Object(n.createElement)(u.Spinner,null):Object(o.sprintf)( /* translators: %s is the product name. */ Object(o.__)("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"),Object(h.decodeEntities)(i.name));return Object(n.createElement)(u.Placeholder,{className:"wc-block-reviews-by-product",icon:Object(n.createElement)(a.a,{icon:s.a,className:"block-editor-block-icon"}),label:Object(o.__)("Reviews by Product","woocommerce")},l)}),O=r(116),j=Object(u.withSpokenMessages)(e=>{let{attributes:t,debouncedSpeak:r,setAttributes:c}=e;const{editMode:i,productId:w}=t,g=e=>{const{item:t=0}=e;return Object(n.createElement)(b.a,l()({},e,{countLabel:Object(o.sprintf)( /* translators: %d is the review count. */ Object(o._n)("%d review","%d reviews",t.review_count,"woocommerce"),t.review_count),"aria-label":Object(o.sprintf)( /* translators: %1$s is the item name, and %2$d is the number of reviews for the item. */ Object(o._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woocommerce"),t.name,t.review_count)}))};if(!w||i)return Object(n.createElement)(u.Placeholder,{icon:Object(n.createElement)(a.a,{icon:s.a,className:"block-editor-block-icon"}),label:Object(o.__)("Reviews by Product","woocommerce"),className:"wc-block-reviews-by-product"},Object(o.__)("Show reviews of your product to build trust","woocommerce"),Object(n.createElement)("div",{className:"wc-block-reviews__selection"},Object(n.createElement)(m.a,{selected:t.productId||0,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e[0]?e[0].id:0;c({productId:t})},queryArgs:{orderby:"comment_count",order:"desc"},renderItem:g}),Object(n.createElement)(u.Button,{isPrimary:!0,onClick:()=>{c({editMode:!1}),r(Object(o.__)("Showing Reviews by Product block preview.","woocommerce"))}},Object(o.__)("Done","woocommerce"))));const h=Object(o.__)("Edit selected product","woocommerce");return Object(n.createElement)(n.Fragment,null,Object(O.a)(i,c,h),Object(n.createElement)(d.InspectorControls,{key:"inspector"},Object(n.createElement)(u.PanelBody,{title:Object(o.__)("Product","woocommerce"),initialOpen:!1},Object(n.createElement)(m.a,{selected:t.productId||0,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e[0]?e[0].id:0;c({productId:t})},renderItem:g,isCompact:!0})),Object(n.createElement)(u.PanelBody,{title:Object(o.__)("Content","woocommerce")},Object(O.b)(t,c)),Object(n.createElement)(u.PanelBody,{title:Object(o.__)("List Settings","woocommerce")},Object(O.c)(t,c))),Object(n.createElement)(p.a,{attributes:t,icon:Object(n.createElement)(a.a,{icon:s.a,className:"block-editor-block-icon"}),name:Object(o.__)("Reviews by Product","woocommerce"),noReviewsPlaceholder:v}))}),_=r(161),f=r(162),y=r(135);Object(c.registerBlockType)("woocommerce/reviews-by-product",{apiVersion:2,title:Object(o.__)("Reviews by Product","woocommerce"),icon:{src:Object(n.createElement)(a.a,{icon:s.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woocommerce")],description:Object(o.__)("Display reviews for your products.","woocommerce"),supports:{html:!1,color:{background:!1},typography:{fontSize:!0}},example:{...y.a,attributes:{...y.a.attributes,productId:1}},attributes:{..._.a,productId:{type:"number"}},edit:e=>Object(n.createElement)(j,e),save:f.a})},60:function(e,t,r){"use strict";r.d(t,"d",(function(){return i})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return u}));var n=r(16),o=r.n(n),c=r(4),a=r.n(c),s=r(3);const i=e=>{if(Object(s.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"}},l=e=>o()({path:"/wc/store/v1/products/reviews?"+Object.entries(e).map(e=>e.join("=")).join("&"),parse:!1}).then(e=>e.json().then(t=>({reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}))),d=e=>{const{className:t,categoryIds:r,productId:n,showReviewDate:o,showReviewerName:c,showReviewContent:s,showProductName:i,showReviewImage:l,showReviewRating:d}=e;let u="wc-block-all-reviews";return n&&(u="wc-block-reviews-by-product"),Array.isArray(r)&&(u="wc-block-reviews-by-category"),a()(u,t,{"has-image":l,"has-name":c,"has-date":o,"has-rating":d,"has-content":s,"has-product-name":i})},u=e=>{const{categoryIds:t,imageType:r,orderby:n,productId:o,reviewsOnPageLoad:c,reviewsOnLoadMore:a,showLoadMore:s,showOrderby:i}=e,l={"data-image-type":r,"data-orderby":n,"data-reviews-on-page-load":c,"data-reviews-on-load-more":a,"data-show-load-more":s,"data-show-orderby":i};return o&&(l["data-product-id"]=o),Array.isArray(t)&&(l["data-category-ids"]=t.join(",")),l}},76:function(e,t,r){"use strict";var n=r(6),o=r.n(n),c=r(0),a=r(2),s=r(37),i=r(4),l=r.n(i);t.a=e=>{let{className:t,item:r,isSelected:n,isLoading:i,onSelect:d,disabled:u,...b}=e;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.a,o()({},b,{key:r.id,className:t,isSelected:n,item:r,onSelect:d,disabled:u})),n&&i&&Object(c.createElement)("div",{key:"loading",className:l()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(c.createElement)(a.Spinner,null)))}},79:function(e,t,r){"use strict";var n=r(0),o=r(1),c=r(72),a=r(202),s=r(4),i=r.n(s),l=r(2),d=r(35);r(124),t.a=e=>{let{className:t,error:r,isLoading:s=!1,onRetry:u}=e;return Object(n.createElement)(l.Placeholder,{icon:Object(n.createElement)(c.a,{icon:a.a}),label:Object(o.__)("Sorry, an error occurred","woocommerce"),className:i()("wc-block-api-error",t)},Object(n.createElement)(d.a,{error:r}),u&&Object(n.createElement)(n.Fragment,null,s?Object(n.createElement)(l.Spinner,null):Object(n.createElement)(l.Button,{isSecondary:!0,onClick:u},Object(o.__)("Retry","woocommerce"))))}},8:function(e,t){e.exports=window.wp.blocks},9:function(e,t){e.exports=window.lodash}});
[+]
..
[+]
product-details
[-] filter-wrapper.asset.php
[edit]
[-] rating-filter-frontend.js
[edit]
[-] checkout.js
[edit]
[-] product-on-sale.js
[edit]
[+]
add-to-cart-form
[-] rating-filter-wrapper-frontend.js
[edit]
[-] all-products.asset.php
[edit]
[-] product-sku-frontend.js
[edit]
[-] wc-payment-method-cod.asset.php
[edit]
[-] product-image.js
[edit]
[-] product-categories.asset.php
[edit]
[-] mini-cart-component-frontend.asset.php
[edit]
[+]
store-notices
[-] wc-blocks-google-analytics.js
[edit]
[-] active-filters.js
[edit]
[-] product-new.asset.php
[edit]
[-] wc-blocks-style.css
[edit]
[-] product-query.js
[edit]
[-] wc-payment-method-paypal.js
[edit]
[-] wc-blocks-vendors-style.css
[edit]
[-] reviews-by-product.asset.php
[edit]
[-] wc-payment-method-bacs.js
[edit]
[-] wc-blocks.js
[edit]
[-] wc-blocks-vendors-style-rtl.css
[edit]
[+]
price-filter
[-] active-filters.asset.php
[edit]
[-] product-on-sale.asset.php
[edit]
[+]
all-products
[-] product-rating-frontend.js
[edit]
[-] catalog-sorting.js
[edit]
[-] wc-blocks.asset.php
[edit]
[+]
single-product
[-] mini-cart-frontend.asset.php
[edit]
[-] active-filters-frontend.asset.php
[edit]
[-] featured-category.js
[edit]
[-] products-by-attribute.asset.php
[edit]
[-] cart.asset.php
[edit]
[+]
product-tag
[-] wc-blocks-registry.js
[edit]
[-] wc-settings.js
[edit]
[-] all-products.js
[edit]
[+]
featured-product
[-] price-format.js
[edit]
[-] checkout-frontend.js
[edit]
[-] attribute-filter-wrapper-frontend.js
[edit]
[-] blocks-checkout.asset.php
[edit]
[-] wc-blocks-vendors.js
[edit]
[-] featured-product.js
[edit]
[-] product-price-frontend.js
[edit]
[-] price-filter.js
[edit]
[-] product-add-to-cart--product-button--product-image--product-price--product-rating--product-sale-bad--49d3ecb2.js
[edit]
[-] product-search.asset.php
[edit]
[-] wc-payment-method-cheque.js
[edit]
[+]
product-image-gallery
[-] legacy-template.asset.php
[edit]
[-] wc-shipping-method-pickup-location.asset.php
[edit]
[+]
checkout
[-] catalog-sorting.asset.php
[edit]
[-] product-category.js
[edit]
[-] filter-wrapper-frontend.js
[edit]
[+]
products-by-attribute
[+]
stock-filter
[-] products-by-attribute.js
[edit]
[-] attribute-filter-frontend.asset.php
[edit]
[-] product-image-frontend.js
[edit]
[+]
mini-cart-contents-block
[-] product-summary-frontend.js
[edit]
[+]
inner-blocks
[-] product-button--product-image--product-price--product-rating--product-sale-badge--product-sku--product-title.js
[edit]
[-] stock-filter-frontend.js
[edit]
[-] product-button.js
[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-payment-method-cheque.asset.php
[edit]
[+]
related-products
[-] handpicked-products.asset.php
[edit]
[-] product-results-count.js
[edit]
[-] customer-account.asset.php
[edit]
[-] attribute-filter-frontend.js
[edit]
[-] all-reviews.js
[edit]
[-] checkout.asset.php
[edit]
[-] product-sale-badge.js
[edit]
[-] general-style.css
[edit]
[-] wc-settings.asset.php
[edit]
[-] product-search.js
[edit]
[-] product-button-frontend.js
[edit]
[-] wc-payment-method-bacs.asset.php
[edit]
[-] reviews-frontend.js
[edit]
[+]
filter-wrapper
[-] active-filters-frontend.js
[edit]
[-] product-results-count.asset.php
[edit]
[-] product-add-to-cart-frontend.js
[edit]
[+]
product-reviews
[-] product-rating.js
[edit]
[-] customer-account.js
[edit]
[-] woo-directives-runtime.js
[edit]
[-] product-sku.js
[edit]
[+]
product-meta
[-] price-filter-frontend.js
[edit]
[+]
checkout-blocks
[-] mini-cart-frontend.js
[edit]
[-] wc-blocks-middleware.asset.php
[edit]
[-] handpicked-products.js
[edit]
[+]
attribute-filter
[-] attribute-filter.js
[edit]
[-] wc-payment-method-cod.js
[edit]
[-] featured-category.asset.php
[edit]
[-] rating-filter.js
[edit]
[-] product-price.js
[edit]
[-] woo-directives-vendors.asset.php
[edit]
[-] wc-blocks-middleware.js
[edit]
[-] all-products-frontend.js
[edit]
[-] product-button--product-image--product-price--product-rating--product-sale-badge--product-sku--prod--5bce0384.js
[edit]
[-] product-new.js
[edit]
[-] wc-blocks-google-analytics.asset.php
[edit]
[-] all-reviews.asset.php
[edit]
[-] product-top-rated.js
[edit]
[-] product-summary.js
[edit]
[-] active-filters-wrapper-frontend.js
[edit]
[-] mini-cart.js
[edit]
[-] product-query.asset.php
[edit]
[-] wc-blocks-data.js
[edit]
[-] rating-filter.asset.php
[edit]
[+]
breadcrumbs
[-] product-tag.js
[edit]
[-] all-products-frontend.asset.php
[edit]
[-] product-best-sellers.asset.php
[edit]
[-] product-title-frontend.js
[edit]
[-] featured-product.asset.php
[edit]
[-] cart-frontend.asset.php
[edit]
[-] wc-shipping-method-pickup-location.js
[edit]
[-] product-add-to-cart--product-button--product-image--product-rating--product-title.js
[edit]
[-] wc-blocks-editor-style-rtl.css
[edit]
[-] store-notices.js
[edit]
[-] single-product.js
[edit]
[-] cart-frontend.js
[edit]
[+]
product-categories
[-] breadcrumbs.asset.php
[edit]
[-] reviews-by-product.js
[edit]
[-] filter-wrapper.js
[edit]
[+]
cart-blocks
[+]
vendors--cart-blocks
[-] wc-blocks-shared-hocs.js
[edit]
[-] wc-blocks-data.asset.php
[edit]
[-] product-title.js
[edit]
[-] reviews-frontend.asset.php
[edit]
[+]
product-results-count
[-] cart.js
[edit]
[-] wc-blocks-editor-style.css
[edit]
[+]
handpicked-products
[+]
catalog-sorting
[-] mini-cart-contents.js
[edit]
[-] product-top-rated.asset.php
[edit]
[-] filter-wrapper-frontend.asset.php
[edit]
[-] price-format.asset.php
[edit]
[-] mini-cart-component-frontend.js
[edit]
[-] wc-blocks-style-rtl.css
[edit]
[+]
product-category
[-] mini-cart.asset.php
[edit]
[-] stock-filter.asset.php
[edit]
[-] stock-filter-frontend.asset.php
[edit]
[-] product-category.asset.php
[edit]
[+]
active-filters
[-] product-best-sellers.js
[edit]
[-] product-stock-indicator.js
[edit]
[-] product-stock-indicator-frontend.js
[edit]
[-] product-categories.js
[edit]
[+]
product-best-sellers
[-] general-style-rtl.css
[edit]
[-] stock-filter-wrapper-frontend.js
[edit]
[-] product-tag.asset.php
[edit]
[-] mini-cart-contents.asset.php
[edit]
[-] stock-filter.js
[edit]
[+]
rating-filter
[+]
featured-category
[-] breadcrumbs.js
[edit]
[-] wc-payment-method-paypal.asset.php
[edit]
[-] legacy-template.js
[edit]
[-] wc-blocks-shared-context.js
[edit]
[-] store-notices.asset.php
[edit]
[-] reviews-by-category.asset.php
[edit]
[+]
vendors--checkout-blocks
[-] price-filter-wrapper-frontend.js
[edit]
[-] price-filter.asset.php
[edit]
[+]
vendors--attribute-filter-wrapper--cart-blocks
[-] vendors--attribute-filter-wrapper--rating-filter-wrapper--stock-filter-wrapper-frontend.js
[edit]
[-] single-product.asset.php
[edit]
[-] woo-directives-vendors.js
[edit]
[-] blocks-checkout.js
[edit]
[+]
customer-account
[-] product-add-to-cart.js
[edit]
[-] wc-blocks-shared-hocs.asset.php
[edit]
[-] rating-filter-frontend.asset.php
[edit]
[-] wc-blocks-shared-context.asset.php
[edit]
[-] product-sale-badge-frontend.js
[edit]