Current Path : /storage/v11800/testtest/public_html/wp-content/plugins/woocommerce/assets/client/blocks/

Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64

Upload File :
Current File : /storage/v11800/testtest/public_html/wp-content/plugins/woocommerce/assets/client/blocks/price-filter-wrapper-frontend.js
(self.webpackChunkwebpackWcBlocksFrontendJsonp=self.webpackChunkwebpackWcBlocksFrontendJsonp||[]).push([[3515],{6179:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(1609);r(1626);const i=({children:e})=>(0,n.createElement)("div",{className:"wc-block-filter-title-placeholder"},e)},4054:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(1609),i=r(7723),o=r(851),c=r(4656);r(8335);const l=({className:e,
/* translators: Reset button text for filters. */
label:t=(0,i.__)("Reset","woocommerce"),onClick:r,screenReaderLabel:l=(0,i.__)("Reset filter","woocommerce")})=>(0,n.createElement)("button",{className:(0,o.A)("wc-block-components-filter-reset-button",e),onClick:r},(0,n.createElement)(c.Label,{label:t,screenReaderLabel:l}))},1745:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(1609),i=r(7723),o=r(851),c=r(4656);r(1504);const l=({className:e,isLoading:t,disabled:r,
/* translators: Submit button text for filters. */
label:l=(0,i.__)("Apply","woocommerce"),onClick:a,screenReaderLabel:s=(0,i.__)("Apply filter","woocommerce")})=>(0,n.createElement)("button",{type:"submit",className:(0,o.A)("wp-block-button__link","wc-block-filter-submit-button","wc-block-components-filter-submit-button",{"is-loading":t},e),disabled:r,onClick:a},(0,n.createElement)(c.Label,{label:l,screenReaderLabel:s}))},1561:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(6087),i=r(4717),o=r(3993),c=r(5574),l=r(1573),a=r(9098),s=r(1380),u=r(6372);const m=({queryAttribute:e,queryPrices:t,queryStock:r,queryRating:m,queryState:d,isEditor:p=!1})=>{let b=(0,u._)();b=`${b}-collection-data`;const[_]=(0,a.dJ)(b),[f,g]=(0,a.xd)("calculate_attribute_counts",[],b),[v,h]=(0,a.xd)("calculate_price_range",null,b),[y,w]=(0,a.xd)("calculate_stock_status_counts",null,b),[k,E]=(0,a.xd)("calculate_rating_counts",null,b),x=(0,l.c)(e||{}),N=(0,l.c)(t),S=(0,l.c)(r),C=(0,l.c)(m);(0,n.useEffect)((()=>{"object"==typeof x&&Object.keys(x).length&&(f.find((e=>(0,o.objectHasProp)(x,"taxonomy")&&e.taxonomy===x.taxonomy))||g([...f,x]))}),[x,f,g]),(0,n.useEffect)((()=>{v!==N&&void 0!==N&&h(N)}),[N,h,v]),(0,n.useEffect)((()=>{y!==S&&void 0!==S&&w(S)}),[S,w,y]),(0,n.useEffect)((()=>{k!==C&&void 0!==C&&E(C)}),[C,E,k]);const[F,A]=(0,n.useState)(p),[R]=(0,i.d7)(F,200);F||A(!0);const U=(0,n.useMemo)((()=>(e=>{const t=e;return Array.isArray(e.calculate_attribute_counts)&&(t.calculate_attribute_counts=(0,c.di)(e.calculate_attribute_counts.map((({taxonomy:e,queryType:t})=>({taxonomy:e,query_type:t})))).asc(["taxonomy","query_type"])),t})(_)),[_]);return(0,s.G)({namespace:"/wc/store/v1",resourceName:"products/collection-data",query:{...d,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...U},shouldSelect:R})}},1380:(e,t,r)=>{"use strict";r.d(t,{G:()=>s});var n=r(7594),i=r(7143),o=r(6087),c=r(1573),l=r(7615),a=r(3993);const s=e=>{const{namespace:t,resourceName:r,resourceValues:s=[],query:u={},shouldSelect:m=!0}=e;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");const d=(0,o.useRef)({results:[],isLoading:!0}),p=(0,c.c)(u),b=(0,c.c)(s),_=(0,l.a)(),f=(0,i.useSelect)((e=>{if(!m)return null;const i=e(n.COLLECTIONS_STORE_KEY),o=[t,r,p,b],c=i.getCollectionError(...o);if(c){if(!(0,a.isError)(c))throw new Error("TypeError: `error` object is not an instance of Error constructor");_(c)}return{results:i.getCollection(...o),isLoading:!i.hasFinishedResolution("getCollection",o)}}),[t,r,b,p,m]);return null!==f&&(d.current=f),d.current}},9098:(e,t,r)=>{"use strict";r.d(t,{dJ:()=>l,xd:()=>a});var n=r(7594),i=r(7143),o=r(6087),c=(r(923),r(6372));const l=e=>{const t=(0,c._)();e=e||t;const r=(0,i.useSelect)((t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)),[e]),{setValueForQueryContext:l}=(0,i.useDispatch)(n.QUERY_STATE_STORE_KEY);return[r,(0,o.useCallback)((t=>{l(e,t)}),[e,l])]},a=(e,t,r)=>{const l=(0,c._)();r=r||l;const a=(0,i.useSelect)((i=>i(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)),[r,e]),{setQueryValue:s}=(0,i.useDispatch)(n.QUERY_STATE_STORE_KEY);return[a,(0,o.useCallback)((t=>{s(r,e,t)}),[r,e,s])]}},6372:(e,t,r)=>{"use strict";r.d(t,{_:()=>o});var n=r(6087);const i=(0,n.createContext)("page"),o=()=>(0,n.useContext)(i);i.Provider},9095:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(6087);function i(e,t){const r=(0,n.useRef)();return(0,n.useEffect)((()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)}),[e,t]),r.current}},1573:(e,t,r)=>{"use strict";r.d(t,{c:()=>c});var n=r(6087),i=r(923),o=r.n(i);function c(e){const t=(0,n.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},3566:(e,t,r)=>{"use strict";r.d(t,{p:()=>l});var n=r(851),i=r(3993),o=r(92),c=r(6032);const l=e=>{const t=(e=>{const t=(0,i.isObject)(e)?e:{style:{}};let r=t.style;return(0,i.isString)(r)&&(r=JSON.parse(r)||{}),(0,i.isObject)(r)||(r={}),{...t,style:r}})(e),r=(0,c.BK)(t),l=(0,c.aR)(t),a=(0,c.fo)(t),s=(0,o.x)(t);return{className:(0,n.A)(s.className,r.className,l.className,a.className),style:{...s.style,...r.style,...l.style,...a.style}}}},7615:(e,t,r)=>{"use strict";r.d(t,{a:()=>i});var n=r(6087);const i=()=>{const[,e]=(0,n.useState)();return(0,n.useCallback)((t=>{e((()=>{throw t}))}),[])}},92:(e,t,r)=>{"use strict";r.d(t,{x:()=>i});var n=r(3993);const i=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}}}},6032:(e,t,r)=>{"use strict";r.d(t,{BK:()=>s,aR:()=>u,fo:()=>m});var n=r(851),i=r(1194),o=r(9786),c=r(3993);function l(e={}){const t={};return(0,o.getCSSRules)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function a(e,t){return e&&t?`has-${(0,i.c)(t)}-${e}`:""}function s(e){var t,r,i,o,s,u,m;const{backgroundColor:d,textColor:p,gradient:b,style:_}=e,f=a("background-color",d),g=a("color",p),v=function(e){if(e)return`has-${e}-gradient-background`}(b),h=v||(null==_||null===(t=_.color)||void 0===t?void 0:t.gradient);return{className:(0,n.A)(g,v,{[f]:!h&&!!f,"has-text-color":p||(null==_||null===(r=_.color)||void 0===r?void 0:r.text),"has-background":d||(null==_||null===(i=_.color)||void 0===i?void 0:i.background)||b||(null==_||null===(o=_.color)||void 0===o?void 0:o.gradient),"has-link-color":(0,c.isObject)(null==_||null===(s=_.elements)||void 0===s?void 0:s.link)?null==_||null===(u=_.elements)||void 0===u||null===(m=u.link)||void 0===m?void 0:m.color:void 0}),style:l({color:(null==_?void 0:_.color)||{}})}}function u(e){var t;const r=(null===(t=e.style)||void 0===t?void 0:t.border)||{};return{className:function(e){var t;const{borderColor:r,style:i}=e,o=r?a("border-color",r):"";return(0,n.A)({"has-border-color":!!r||!(null==i||null===(t=i.border)||void 0===t||!t.color),[o]:!!o})}(e),style:l({border:r})}}function m(e){var t;return{className:void 0,style:l({spacing:(null===(t=e.style)||void 0===t?void 0:t.spacing)||{}})}}},890:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>L});var n=r(1609),i=r(851),o=r(3566),c=r(3993),l=r(9095),a=r(9098),s=r(1561),u=r(6087),m=r(7723),d=r(4656),p=r(4717);r(9505);const b=(e,t,r,n=1,i=!1)=>{let[o,c]=e;const l=e=>Number.isFinite(e);return l(o)||(o=t||0),l(c)||(c=r||n),l(t)&&t>o&&(o=t),l(r)&&r<=o&&(o=r-n),l(t)&&t>=c&&(c=t+n),l(r)&&r<c&&(c=r),!i&&o>=c&&(o=c-n),i&&c<=o&&(c=o+n),[o,c]};var _=r(1745);const f=({maxConstraint:e,minorUnit:t})=>({floatValue:r})=>void 0!==r&&r<=e/10**t&&r>0,g=({minConstraint:e,currentMaxValue:t,minorUnit:r})=>({floatValue:n})=>void 0!==n&&n>=e/10**r&&n<t/10**r;var v=r(4054);const h=({minPrice:e,maxPrice:t,minConstraint:r,maxConstraint:o,onChange:l,step:a,currency:s,showInputFields:h=!0,showFilterButton:y=!1,inlineInput:w=!0,isLoading:k=!1,isUpdating:E=!1,isEditor:x=!1,onSubmit:N=(()=>{})})=>{const S=(0,u.useRef)(null),C=(0,u.useRef)(null),F=a||10**s.minorUnit,[A,R]=(0,u.useState)(e),[U,L]=(0,u.useState)(t),P=(0,u.useRef)(null),[T,I]=(0,u.useState)(0);(0,u.useEffect)((()=>{R(e)}),[e]),(0,u.useEffect)((()=>{L(t)}),[t]),(0,u.useLayoutEffect)((()=>{var e;w&&P.current&&I(null===(e=P.current)||void 0===e?void 0:e.offsetWidth)}),[w,I]);const O=(0,u.useMemo)((()=>isFinite(r)&&isFinite(o)),[r,o]),B=(0,u.useMemo)((()=>isFinite(e)&&isFinite(t)&&O?{"--low":(e-r)/(o-r)*100+"%","--high":(t-r)/(o-r)*100+"%"}:{"--low":"0%","--high":"100%"}),[e,t,r,o,O]),j=(0,u.useCallback)((e=>{if(k||!O||!S.current||!C.current)return;const t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=S.current.offsetWidth,i=+S.current.value,c=C.current.offsetWidth,l=+C.current.value,a=n*(i/o),s=c*(l/o);Math.abs(r-a)>Math.abs(r-s)?(S.current.style.zIndex="20",C.current.style.zIndex="21"):(S.current.style.zIndex="21",C.current.style.zIndex="20")}),[k,o,O]),M=(0,u.useCallback)((n=>{const i=n.target.classList.contains("wc-block-price-filter__range-input--min"),c=+n.target.value,a=i?[Math.round(c/F)*F,t]:[e,Math.round(c/F)*F],s=b(a,r,o,F,i);l(s)}),[l,e,t,r,o,F]),Q=(0,u.useCallback)((e=>{if(e.relatedTarget&&e.relatedTarget.classList&&e.relatedTarget.classList.contains("wc-block-price-filter__amount"))return;const t=e.target.classList.contains("wc-block-price-filter__amount--min");if(A>=U){const e=b([0,U],null,null,F,t);return l([parseInt(e[0],10),parseInt(e[1],10)])}const r=b([A,U],null,null,F,t);l(r)}),[l,F,A,U]),q=(0,p.YQ)(N,600),V=(0,i.A)("wc-block-price-filter","wc-block-components-price-slider",h&&"wc-block-price-filter--has-input-fields",h&&"wc-block-components-price-slider--has-input-fields",y&&"wc-block-price-filter--has-filter-button",y&&"wc-block-components-price-slider--has-filter-button",!O&&"is-disabled",(w||T<=300)&&"wc-block-components-price-slider--is-input-inline"),W=(0,c.isObject)(S.current)?S.current.ownerDocument.activeElement:void 0,Y=W&&W===S.current?F:1,$=W&&W===C.current?F:1,H=String(A/10**s.minorUnit),K=String(U/10**s.minorUnit),z=w&&T>300,D=(0,n.createElement)("div",{className:(0,i.A)("wc-block-price-filter__range-input-wrapper","wc-block-components-price-slider__range-input-wrapper",{"is-loading":k&&E}),onMouseMove:j,onFocus:j},O&&(0,n.createElement)("div",{"aria-hidden":h},(0,n.createElement)("div",{className:"wc-block-price-filter__range-input-progress wc-block-components-price-slider__range-input-progress",style:B}),(0,n.createElement)("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,m.__)("Filter products by minimum price","woocommerce"),"aria-valuetext":H,value:Number.isFinite(e)?e:r,onChange:M,step:Y,min:r,max:o,ref:S,disabled:k&&!O,tabIndex:h?-1:0}),(0,n.createElement)("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,m.__)("Filter products by maximum price","woocommerce"),"aria-valuetext":K,value:Number.isFinite(t)?t:o,onChange:M,step:$,min:r,max:o,ref:C,disabled:k,tabIndex:h?-1:0}))),J=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}`,Z={currency:s,decimalScale:0},G={...Z,displayType:"input",allowNegative:!1,disabled:k||!O,onBlur:Q};return(0,n.createElement)("div",{className:V,ref:P},(!z||!h)&&D,h&&(0,n.createElement)("div",{className:"wc-block-price-filter__controls wc-block-components-price-slider__controls"},E?(0,n.createElement)("div",{className:"input-loading"}):(0,n.createElement)(d.FormattedMonetaryAmount,{...G,className:J("min"),"aria-label":(0,m.__)("Filter products by minimum price","woocommerce"),isAllowed:g({minConstraint:r,minorUnit:s.minorUnit,currentMaxValue:U}),onValueChange:e=>{e!==A&&R(e)},value:A}),z&&D,E?(0,n.createElement)("div",{className:"input-loading"}):(0,n.createElement)(d.FormattedMonetaryAmount,{...G,className:J("max"),"aria-label":(0,m.__)("Filter products by maximum price","woocommerce"),isAllowed:f({maxConstraint:o,minorUnit:s.minorUnit}),onValueChange:e=>{e!==U&&L(e)},value:U})),!h&&!E&&Number.isFinite(e)&&Number.isFinite(t)&&(0,n.createElement)("div",{className:"wc-block-price-filter__range-text wc-block-components-price-slider__range-text"},(0,n.createElement)(d.FormattedMonetaryAmount,{...Z,value:e}),(0,n.createElement)(d.FormattedMonetaryAmount,{...Z,value:t})),(0,n.createElement)("div",{className:"wc-block-components-price-slider__actions"},(x||!E&&(e!==r||t!==o))&&(0,n.createElement)(v.A,{onClick:()=>{l([r,o]),q()},screenReaderLabel:(0,m.__)("Reset price filter","woocommerce")}),y&&(0,n.createElement)(_.A,{className:"wc-block-price-filter__button wc-block-components-price-slider__button",isLoading:E,disabled:k||!O,onClick:N,screenReaderLabel:(0,m.__)("Apply price filter","woocommerce")})))};var y=r(6179),w=r(8529),k=r(5703),E=r(3832),x=r(3366);const N="ROUND_UP",S="ROUND_DOWN",C=(e,t,r)=>{const n=10*10**t;let i=null;const o=parseFloat(e);isNaN(o)||(r===N?i=Math.ceil(o/n)*n:r===S&&(i=Math.floor(o/n)*n));const c=(0,l.Z)(i,Number.isFinite);return Number.isFinite(i)?i:c};r(8836);var F=r(4300);function A(e,t){return Number(e)*10**t}const R=({attributes:e,isEditor:t=!1})=>{const r=(0,F.$Q)(),i=(0,k.getSettingWithCoercion)("hasFilterableProducts",!1,c.isBoolean),o=(0,k.getSettingWithCoercion)("isRenderingPhpTemplate",!1,c.isBoolean),[m,d]=(0,u.useState)(!1),b=(0,x.Vf)("min_price"),_=(0,x.Vf)("max_price"),[f]=(0,a.dJ)(),{results:g,isLoading:v}=(0,s.A)({queryPrices:!0,queryState:f,isEditor:t}),R=(0,w.getCurrencyFromPriceResponse)((0,c.objectHasProp)(g,"price_range")?g.price_range:void 0),[U,L]=(0,a.xd)("min_price"),[P,T]=(0,a.xd)("max_price"),[I,O]=(0,u.useState)(A(b,R.minorUnit)||null),[B,j]=(0,u.useState)(A(_,R.minorUnit)||null),{minConstraint:M,maxConstraint:Q}=(({minPrice:e,maxPrice:t,minorUnit:r})=>({minConstraint:C(e||"",r,S),maxConstraint:C(t||"",r,N)}))({minPrice:(0,c.objectHasProp)(g,"price_range")&&(0,c.objectHasProp)(g.price_range,"min_price")&&(0,c.isString)(g.price_range.min_price)?g.price_range.min_price:void 0,maxPrice:(0,c.objectHasProp)(g,"price_range")&&(0,c.objectHasProp)(g.price_range,"max_price")&&(0,c.isString)(g.price_range.max_price)?g.price_range.max_price:void 0,minorUnit:R.minorUnit});(0,u.useEffect)((()=>{m||(L(A(b,R.minorUnit)),T(A(_,R.minorUnit)),d(!0))}),[R.minorUnit,m,_,b,T,L]);const[q,V]=(0,u.useState)(v),W=(0,u.useCallback)(((e,t)=>{const r=t>=Number(Q)?void 0:t,n=e<=Number(M)?void 0:e;if(window){const e=function(e,t){const r={};for(const[e,n]of Object.entries(t))n?r[e]=n.toString():delete r[e];const n=(0,E.removeQueryArgs)(e,...Object.keys(t));return(0,E.addQueryArgs)(n,r)}(window.location.href,{min_price:n/10**R.minorUnit,max_price:r/10**R.minorUnit});window.location.href!==e&&(0,x.CH)(e)}L(n),T(r)}),[M,Q,L,T,R.minorUnit]),Y=(0,p.YQ)(W,500),$=(0,u.useCallback)((t=>{V(!0),t[0]!==I&&O(t[0]),t[1]!==B&&j(t[1]),o&&m&&!e.showFilterButton&&Y(t[0],t[1])}),[I,B,O,j,o,m,Y,e.showFilterButton]);(0,u.useEffect)((()=>{e.showFilterButton||o||Y(I,B)}),[I,B,e.showFilterButton,Y,o]);const H=(0,l.Z)(U),K=(0,l.Z)(P),z=(0,l.Z)(M),D=(0,l.Z)(Q);if((0,u.useEffect)((()=>{(!Number.isFinite(I)||U!==H&&U!==I||M!==z&&M!==I)&&O(Number.isFinite(U)?U:M),(!Number.isFinite(B)||P!==K&&P!==B||Q!==D&&Q!==B)&&j(Number.isFinite(P)?P:Q)}),[I,B,U,P,M,Q,z,D,H,K]),!i)return r(!1),null;if(!v&&(null===M||null===Q||M===Q))return r(!1),null;const J=`h${e.headingLevel}`;r(!0),!v&&q&&V(!1);const Z=(0,n.createElement)(J,{className:"wc-block-price-filter__title"},e.heading),G=v&&q?(0,n.createElement)(y.A,null,Z):Z;return(0,n.createElement)(n.Fragment,null,!t&&e.heading&&G,(0,n.createElement)("div",{className:"wc-block-price-slider"},(0,n.createElement)(h,{minConstraint:M,maxConstraint:Q,minPrice:I,maxPrice:B,currency:R,showInputFields:e.showInputFields,inlineInput:e.inlineInput,showFilterButton:e.showFilterButton,onChange:$,onSubmit:()=>W(I,B),isLoading:v,isUpdating:q,isEditor:t})))},U=JSON.parse('{"uK":{"F8":{"A":3}}}'),L=e=>{const t=(0,o.p)(e),r=(l=e,{heading:(0,c.isString)(null==l?void 0:l.heading)?l.heading:"",headingLevel:(0,c.isString)(null==l?void 0:l.headingLevel)&&parseInt(l.headingLevel,10)||U.uK.F8.A,showFilterButton:"true"===(null==l?void 0:l.showFilterButton),showInputFields:"false"!==(null==l?void 0:l.showInputFields),inlineInput:"true"===(null==l?void 0:l.inlineInput)});var l;return(0,n.createElement)("div",{className:(0,i.A)((0,c.isString)(e.className)?e.className:"",t.className),style:t.style},(0,n.createElement)(R,{isEditor:!1,attributes:r}))}},3366:(e,t,r)=>{"use strict";r.d(t,{CH:()=>u,Q:()=>m,Vf:()=>s,nD:()=>a,xB:()=>l});var n=r(3832),i=r(5703),o=r(3993);const c=(0,i.getSettingWithCoercion)("isRenderingPhpTemplate",!1,o.isBoolean),l="query_type_",a="filter_";function s(e){return window?(0,n.getQueryArg)(window.location.href,e):null}function u(e){if(c){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 m=e=>{const t=(0,n.getQueryArgs)(e);return(0,n.addQueryArgs)(e,t)}},1626:()=>{},8335:()=>{},1504:()=>{},9505:()=>{},8836:()=>{}}]);

Softgel-Capsule – Affy Pharma Pvt Ltd

Arrange A Callback
[]
1 Step 1
Full Name
Telephone
Departmentyour full name
Postal Address
Message
0 /
Previous
Next
Shopping Basket