uawdijnntqw1x1x1
IP : 216.73.216.109
Hostname : premium160.web-hosting.com
Kernel : Linux premium160.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
batcwwjx
/
www
/
wp-content
/
plugins
/
woocommerce
/
assets
/
client
/
blocks
/
product-reviews.js
/
/
(()=>{"use strict";const e=window.wp.blocks,t=window.wp.data,o=window.wp.editor,r=window.wc.wcTypes;class i{blocks=new Map;initialized=!1;attemptedRegisteredBlocks=new Set;constructor(){this.initializeSubscriptions()}static getInstance(){return i.instance||(i.instance=new i),i.instance}initializeSubscriptions(){if(this.initialized)return;const e=(0,t.subscribe)((()=>{const r=(0,t.select)(o.store);if(!r)return;const i=r.getCurrentPostType();if(i)if("post"===i||"page"===i)e(),this.blocks.forEach((e=>{if(e.isAvailableOnPostEditor){const t=e.variationName||e.blockName;this.hasAttemptedRegistration(t)||this.registerBlock(e)}})),this.initialized=!0;else{e();const i=String(r.getEditedPostSlug());this.currentTemplateId=i,this.handleTemplateChange(void 0),(0,t.subscribe)((()=>{const e=this.currentTemplateId;this.currentTemplateId=String(r.getEditedPostSlug()),e!==this.currentTemplateId&&this.handleTemplateChange(e)}),o.store),this.initialized=!0}}))}handleTemplateChange(e){(this.currentTemplateId?.includes("single-product")||e?.includes("single-product"))&&this.blocks.forEach((e=>{this.unregisterBlock(e),this.registerBlock(e)}))}hasAttemptedRegistration(e){return this.attemptedRegisteredBlocks.has(e)}unregisterBlock(t){const{blockName:o,isVariationBlock:r,variationName:i}=t;try{r&&i?((0,e.unregisterBlockVariation)(o,i),this.attemptedRegisteredBlocks.delete(i)):((0,e.unregisterBlockType)(o),this.attemptedRegisteredBlocks.delete(o))}catch(e){console.debug(`Failed to unregister block ${o}:`,e)}}registerBlock(o){const{blockName:i,settings:n,isVariationBlock:s,variationName:a,isAvailableOnPostEditor:c}=o;try{const o=a||i;if(this.hasAttemptedRegistration(o))return;const l=(0,t.select)("core/edit-site");if(!l&&!c)return;if(s)(0,e.registerBlockVariation)(i,n);else{const t=(0,r.isEmpty)(n?.ancestor)?["woocommerce/single-product"]:n?.ancestor,o=l&&this.currentTemplateId?.includes("single-product");(0,e.registerBlockType)(i,{...n,ancestor:o?void 0:t})}this.attemptedRegisteredBlocks.add(o)}catch(e){console.error(`Failed to register block ${i}:`,e)}}registerBlockConfig(e){const t=e.variationName||e.blockName;this.blocks.set(t,e),this.registerBlock(e)}}const n=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-reviews","icon":"admin-comments","title":"Product Reviews","description":"Display a product\'s reviews","category":"woocommerce","textdomain":"woocommerce","attributes":{"tagName":{"type":"string","default":"div"}},"supports":{"interactivity":true,"align":["wide","full"],"html":false,"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"usesContext":["postId","postType"],"viewScriptModule":"woocommerce/product-reviews"}'),s=window.wp.blockEditor,a=window.ReactJSXRuntime,c=window.wp.components,l=window.wp.i18n,d=[["woocommerce/product-reviews-title"],["woocommerce/product-review-template",{},[["core/columns",{},[["core/column",{width:"40px"},[["core/avatar",{size:40,style:{border:{radius:"20px"}}}]]],["core/column",{},[["core/group",{tagName:"div",layout:{type:"flex",flexWrap:"nowrap",justifyContent:"space-between"}},[["woocommerce/product-review-author-name",{fontSize:"small"}],["woocommerce/product-review-rating"]]],["core/group",{layout:{type:"flex"},style:{spacing:{margin:{top:"0px",bottom:"0px"}}}},[["woocommerce/product-review-date",{fontSize:"small"}]]],["woocommerce/product-review-content"]]]]]]],["woocommerce/product-reviews-pagination"],["woocommerce/product-review-form"]],u={article:(0,l.__)("The <article> element should represent a self-contained, syndicatable portion of the document.","woocommerce"),aside:(0,l.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.","woocommerce"),div:(0,l.__)("The <div> element should only be used if the block is a design element with no semantic meaning.","woocommerce"),footer:(0,l.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).","woocommerce"),header:(0,l.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids.","woocommerce"),main:(0,l.__)("The <main> element should be used for the primary content of your document only.","woocommerce"),nav:(0,l.__)("The <nav> element should be used to identify groups of links that are intended to be used for website or page content navigation.","woocommerce"),section:(0,l.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.","woocommerce")};(e=>{const t=e.name;if(!t)return void console.error("registerProductBlockType: Block name is required for registration");const o=(({name:e,...t})=>t)(e),{isVariationBlock:r,variationName:n,isAvailableOnPostEditor:s,...a}={...o,...{isAvailableOnPostEditor:!0}||{}},c={blockName:t,settings:{...a},isVariationBlock:null!=r&&r,variationName:null!=n?n:void 0,isAvailableOnPostEditor:null!=s&&s};i.getInstance().registerBlockConfig(c)})({...n,edit:({attributes:e,setAttributes:o,clientId:r,context:i})=>{const{tagName:n="div"}=e,m=(0,s.useBlockProps)(),p=(0,s.useInnerBlocksProps)(m,{template:d}),{hasInvalidContext:h,warningElement:g}=(({clientId:e,postType:o,blockName:r})=>({hasInvalidContext:(0,t.useSelect)((t=>t(s.store).getBlockParentsByBlockName(e,"core/post-template").length>0&&"product"!==o),[e,o]),warningElement:(0,a.jsx)("div",{...(0,s.useBlockProps)(),children:(0,a.jsx)(s.Warning,{children:(0,l.sprintf)(/* translators: %s: block name */ /* translators: %s: block name */ (0,l.__)("The %s block requires a product context. When used in a Query Loop, the Query Loop must be configured to display products.","woocommerce"),r)})})}))({clientId:r,postType:i.postType,blockName:(0,l.__)("Product Reviews","woocommerce")});return h?g:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.InspectorControls,{group:"advanced",children:(0,a.jsx)(c.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,l.__)("HTML element","woocommerce"),options:[{label:(0,l.__)("Default (<div>)","woocommerce"),value:"div"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}],value:n,onChange:e=>o({tagName:e}),help:u[n]})}),(0,a.jsx)(n,{...p})]})},save:function({attributes:{tagName:e="div"}}){const t=s.useBlockProps.save(),o=s.useInnerBlocksProps.save(t);return(0,a.jsx)(e,{...o})},deprecated:[{save:()=>null}]}),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["product-reviews"]={}})();
/home/batcwwjx/www/wp-content/plugins/woocommerce/assets/client/blocks/product-reviews.js