(()=>{var e,t,o,r={3612:(e,t,o)=>{"use strict";const r=window.wp.blocks;var n=o(3627);const i=JSON.parse('{"UU":"woocommerce/product-review-author-name"}');var c=o(4921),s=o(7723);const a=window.wp.data,l=window.wp.coreData,u=window.wp.components,p=window.wp.blockEditor;var d=o(790);o(6302),(0,r.registerBlockType)(i.UU,{icon:n.A,edit:function({attributes:{isLink:e,linkTarget:t,textAlign:o},context:{commentId:r},setAttributes:n}){const i=(0,p.useBlockProps)({className:(0,c.A)({[`has-text-align-${o}`]:o})});let w=(0,a.useSelect)((e=>{const{getEntityRecord:t}=e(l.store),o=t("root","comment",r),n=o?.author_name;if(o&&!n){var i;const e=t("root","user",o.author);return null!==(i=e?.name)&&void 0!==i?i:(0,s.__)("Anonymous","woocommerce")}return null!=n?n:""}),[r]);r&&w||(w=(0,s._x)("Review Author","block title","woocommerce"));const f=e?(0,d.jsx)("a",{href:"#review-author-pseudo-link",onClick:e=>e.preventDefault(),children:w}):w;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(p.InspectorControls,{children:(0,d.jsxs)(u.PanelBody,{title:(0,s.__)("Settings","woocommerce"),children:[(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Link to authors URL","woocommerce"),onChange:()=>n({isLink:!e}),checked:e}),e&&(0,d.jsx)(u.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.__)("Open in new tab","woocommerce"),onChange:e=>n({linkTarget:e?"_blank":"_self"}),checked:"_blank"===t})]})}),(0,d.jsx)(p.BlockControls,{children:(0,d.jsx)(p.AlignmentControl,{value:o,onChange:e=>{"string"==typeof e&&n({textAlign:e})}})}),(0,d.jsx)("div",{...i,children:f})]})}})},6302:()=>{},1609:e=>{"use strict";e.exports=window.React},790:e=>{"use strict";e.exports=window.ReactJSXRuntime},7723:e=>{"use strict";e.exports=window.wp.i18n},5573:e=>{"use strict";e.exports=window.wp.primitives}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return r[e](o,o.exports,i),o.exports}i.m=r,e=[],i.O=(t,o,r,n)=>{if(!o){var c=1/0;for(u=0;u<e.length;u++){for(var[o,r,n]=e[u],s=!0,a=0;a<o.length;a++)(!1&n||c>=n)&&Object.keys(i.O).every((e=>i.O[e](o[a])))?o.splice(a--,1):(s=!1,n<c&&(c=n));if(s){e.splice(u--,1);var l=r();void 0!==l&&(t=l)}}return t}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[o,r,n]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var n=Object.create(null);i.r(n);var c={};t=t||[null,o({}),o([]),o(o)];for(var s=2&r&&e;"object"==typeof s&&!~t.indexOf(s);s=o(s))Object.getOwnPropertyNames(s).forEach((t=>c[t]=()=>e[t]));return c.default=()=>e,i.d(n,c),n},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=8193,(()=>{var e={8193:0};i.O.j=t=>0===e[t];var t=(t,o)=>{var r,n,[c,s,a]=o,l=0;if(c.some((t=>0!==e[t]))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);if(a)var u=a(i)}for(t&&t(o);l<c.length;l++)n=c[l],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(u)},o=globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var c=i.O(void 0,[94],(()=>i(3612)));c=i.O(c),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["product-review-author-name"]=c})();