File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/price-filter-frontend.js.tar
httpdocs/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/price-filter-frontend.js 0000644 00000131146 15155002600 0036141 0 ustar 00 var/www/vhosts/uyarreklam.com.tr !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=257)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},112:function(e,t,r){"use strict";var n=r(0),o=r(146),i=r(4),a=r.n(i);r(218);const c=e=>({thousandSeparator:null==e?void 0:e.thousandSeparator,decimalSeparator:null==e?void 0:e.decimalSeparator,fixedDecimalScale:!0,prefix:null==e?void 0:e.prefix,suffix:null==e?void 0:e.suffix,isNumericString:!0});t.a=({className:e,value:t,currency:r,onValueChange:i,displayType:s="text",...u})=>{var l;const p="string"==typeof t?parseInt(t,10):t;if(!Number.isFinite(p))return null;const f=p/10**r.minorUnit;if(!Number.isFinite(f))return null;const m=a()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",e),d=null!==(l=u.decimalScale)&&void 0!==l?l:null==r?void 0:r.minorUnit,b={...u,...c(r),decimalScale:d,value:void 0,currency:void 0,onValueChange:void 0},g=i?e=>{const t=+e.value*10**r.minorUnit;i(t)}:()=>{};return Object(n.createElement)(o.a,{className:m,displayType:s,...b,value:f,onValueChange:g})}},12:function(e,t,r){var n=r(39);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},13:function(e,t){e.exports=window.wp.isShallowEqual},135:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(0),o=r(43),i=r(19),a=r(44),c=r(26),s=r(30),u=r(52),l=r(21);const p=({queryAttribute:e,queryPrices:t,queryStock:r,queryRating:p,queryState:f,isEditor:m=!1})=>{let d=Object(l.a)();d=`${d}-collection-data`;const[b]=Object(s.a)(d),[g,h]=Object(s.b)("calculate_attribute_counts",[],d),[v,O]=Object(s.b)("calculate_price_range",null,d),[y,j]=Object(s.b)("calculate_stock_status_counts",null,d),[w,_]=Object(s.b)("calculate_rating_counts",null,d),S=Object(c.a)(e||{}),x=Object(c.a)(t),E=Object(c.a)(r),k=Object(c.a)(p);Object(n.useEffect)((()=>{"object"==typeof S&&Object.keys(S).length&&(g.find((e=>Object(i.b)(S,"taxonomy")&&e.taxonomy===S.taxonomy))||h([...g,S]))}),[S,g,h]),Object(n.useEffect)((()=>{v!==x&&void 0!==x&&O(x)}),[x,O,v]),Object(n.useEffect)((()=>{y!==E&&void 0!==E&&j(E)}),[E,j,y]),Object(n.useEffect)((()=>{w!==k&&void 0!==k&&_(k)}),[k,_,w]);const[N,P]=Object(n.useState)(m),[F]=Object(o.a)(N,200);N||P(!0);const C=Object(n.useMemo)((()=>(e=>{const t=e;return Array.isArray(e.calculate_attribute_counts)&&(t.calculate_attribute_counts=Object(a.a)(e.calculate_attribute_counts.map((({taxonomy:e,queryType:t})=>({taxonomy:e,query_type:t})))).asc(["taxonomy","query_type"])),t})(b)),[b]);return Object(u.a)({namespace:"/wc/store/v1",resourceName:"products/collection-data",query:{...f,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...C},shouldSelect:F})}},14:function(e,t){e.exports=window.wp.url},146:function(e,t,r){"use strict";var n=r(8),o=r.n(n);function i(){}function a(e){return!!(e||"").match(/\d/)}function c(e){return null==e}function s(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function u(e,t){void 0===t&&(t=!0);var r="-"===e[0],n=r&&t,o=(e=e.replace("-","")).split(".");return{beforeDecimal:o[0],afterDecimal:o[1]||"",hasNagation:r,addNegation:n}}function l(e,t,r){for(var n="",o=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||o;return n}function p(e,t){return Array(t+1).join(e)}function f(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function m(e,t,r){return Math.min(Math.max(e,t),r)}function d(e){return Math.max(e.selectionStart,e.selectionEnd)}var b={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:i,onChange:i,onKeyDown:i,onMouseUp:i,onFocus:i,onBlur:i,isAllowed:function(){return!0}},g=function(e){function t(t){e.call(this,t);var r=t.defaultValue;this.validateProps();var n=this.formatValueProp(r);this.state={value:n,numAsString:this.removeFormatting(n),mounted:!1},this.selectionBeforeInput={selectionStart:0,selectionEnd:0},this.onChange=this.onChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.componentDidMount=function(){this.setState({mounted:!0})},t.prototype.componentDidUpdate=function(e){this.updateValueIfRequired(e)},t.prototype.componentWillUnmount=function(){clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout)},t.prototype.updateValueIfRequired=function(e){var t=this,r=t.props,n=t.state,o=t.focusedElm,i=n.value,a=n.numAsString;if(void 0===a&&(a=""),e!==r){this.validateProps();var s=this.formatNumString(a),u=c(r.value)?s:this.formatValueProp(),l=this.removeFormatting(u),p=parseFloat(l),f=parseFloat(a);(isNaN(p)&&isNaN(f)||p===f)&&s===i&&(null!==o||u===i)||this.updateValue({formattedValue:u,numAsString:l,input:o,source:"prop",event:null})}},t.prototype.getFloatString=function(e){void 0===e&&(e="");var t=this.props.decimalScale,r=this.getSeparators().decimalSeparator,n=this.getNumberRegex(!0),o="-"===e[0];o&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var i=(e=(e.match(n)||[]).join("").replace(r,".")).indexOf(".");return-1!==i&&(e=e.substring(0,i)+"."+e.substring(i+1,e.length).replace(new RegExp(s(r),"g"),"")),o&&(e="-"+e),e},t.prototype.getNumberRegex=function(e,t){var r=this.props,n=r.format,o=r.decimalScale,i=r.customNumerals,a=this.getSeparators().decimalSeparator;return new RegExp("[0-9"+(i?i.join(""):"")+"]"+(!a||0===o||t||n?"":"|"+s(a)),e?"g":void 0)},t.prototype.getSeparators=function(){var e=this.props.decimalSeparator,t=this.props,r=t.thousandSeparator,n=t.allowedDecimalSeparators;return!0===r&&(r=","),n||(n=[e,"."]),{decimalSeparator:e,thousandSeparator:r,allowedDecimalSeparators:n}},t.prototype.getMaskAtIndex=function(e){var t=this.props.mask;return void 0===t&&(t=" "),"string"==typeof t?t:t[e]||" "},t.prototype.getValueObject=function(e,t){var r=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(r)?void 0:r}},t.prototype.validateProps=function(){var e=this.props.mask,t=this.getSeparators(),r=t.decimalSeparator,n=t.thousandSeparator;if(r===n)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+n+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+r+" (default value for decimalSeparator is .)\n ");if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask "+e+" should not contain numeric character;\n ")},t.prototype.setPatchedCaretPosition=function(e,t,r){f(e,t),this.caretPositionTimeout=setTimeout((function(){e.value===r&&f(e,t)}),0)},t.prototype.correctCaretPosition=function(e,t,r){var n=this.props,o=n.prefix,i=n.suffix,c=n.format;if(""===e)return 0;if(t=m(t,0,e.length),!c){var s="-"===e[0];return m(t,o.length+(s?1:0),e.length-i.length)}if("function"==typeof c)return t;if("#"===c[t]&&a(e[t]))return t;if("#"===c[t-1]&&a(e[t-1]))return t;var u=c.indexOf("#");t=m(t,u,c.lastIndexOf("#")+1);for(var l=c.substring(t,c.length).indexOf("#"),p=t,f=t+(-1===l?0:l);p>u&&("#"!==c[p]||!a(e[p]));)p-=1;return!a(e[f])||"left"===r&&t!==u||t-p<f-t?a(e[p])?p+1:p:f},t.prototype.getCaretPosition=function(e,t,r){var n,o,i=this.props.format,a=this.state.value,c=this.getNumberRegex(!0),s=(e.match(c)||[]).join(""),u=(t.match(c)||[]).join("");for(n=0,o=0;o<r;o++){var l=e[o]||"",p=t[n]||"";if((l.match(c)||l===p)&&("0"!==l||!p.match(c)||"0"===p||s.length===u.length)){for(;l!==t[n]&&n<t.length;)n++;n++}}return"string"!=typeof i||a||(n=t.length),this.correctCaretPosition(t,n)},t.prototype.removePrefixAndSuffix=function(e){var t=this.props,r=t.format,n=t.prefix,o=t.suffix;if(!r&&e){var i="-"===e[0];i&&(e=e.substring(1,e.length));var a=(e=n&&0===e.indexOf(n)?e.substring(n.length,e.length):e).lastIndexOf(o);e=o&&-1!==a&&a===e.length-o.length?e.substring(0,a):e,i&&(e="-"+e)}return e},t.prototype.removePatternFormatting=function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),r=0,n="",o=0,i=t.length;o<=i;o++){var a=t[o]||"",c=o===i?e.length:e.indexOf(a,r);if(-1===c){n=e;break}n+=e.substring(r,c),r=c+a.length}return(n.match(this.getNumberRegex(!0))||[]).join("")},t.prototype.removeFormatting=function(e){var t=this.props,r=t.format,n=t.removeFormatting;return e?(r?e="string"==typeof r?this.removePatternFormatting(e):"function"==typeof n?n(e):(e.match(this.getNumberRegex(!0))||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e},t.prototype.formatWithPattern=function(e){for(var t=this.props.format,r=0,n=t.split(""),o=0,i=t.length;o<i;o++)"#"===t[o]&&(n[o]=e[r]||this.getMaskAtIndex(r),r+=1);return n.join("")},t.prototype.formatAsNumber=function(e){var t=this.props,r=t.decimalScale,n=t.fixedDecimalScale,o=t.prefix,i=t.suffix,a=t.allowNegative,c=t.thousandsGroupStyle,s=this.getSeparators(),p=s.thousandSeparator,f=s.decimalSeparator,m=-1!==e.indexOf(".")||r&&n,d=u(e,a),b=d.beforeDecimal,g=d.afterDecimal,h=d.addNegation;return void 0!==r&&(g=l(g,r,n)),p&&(b=function(e,t,r){var n=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}(r),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(n,"$1"+t)}(b,p,c)),o&&(b=o+b),i&&(g+=i),h&&(b="-"+b),b+(m&&f||"")+g},t.prototype.formatNumString=function(e){void 0===e&&(e="");var t=this.props,r=t.format,n=t.allowEmptyFormatting,o=t.customNumerals,i=e;if(o&&10===o.length){var a=new RegExp("["+o.join("")+"]","g");i=e.replace(a,(function(e){return o.indexOf(e).toString()}))}return""!==e||n?"-"!==e||r?"string"==typeof r?this.formatWithPattern(i):"function"==typeof r?r(i):this.formatAsNumber(i):"-":""},t.prototype.formatValueProp=function(e){var t=this.props,r=t.format,n=t.decimalScale,o=t.fixedDecimalScale,i=t.allowEmptyFormatting,a=this.props,s=a.value,f=a.isNumericString,m=!(s=c(s)?e:s)&&0!==s;return m&&i&&(s=""),m&&!i?"":("number"==typeof s&&(s=function(e){var t="-"===(e+="")[0]?"-":"";t&&(e=e.substring(1));var r=e.split(/[eE]/g),n=r[0],o=r[1];if(!(o=Number(o)))return t+n;var i=1+o,a=(n=n.replace(".","")).length;return i<0?n="0."+p("0",Math.abs(i))+n:i>=a?n+=p("0",i-a):n=(n.substring(0,i)||"0")+"."+n.substring(i),t+n}(s),f=!0),"Infinity"===s&&f&&(s=""),f&&!r&&"number"==typeof n&&(s=function(e,t,r){if(-1!==["","-"].indexOf(e))return e;var n=-1!==e.indexOf(".")&&t,o=u(e),i=o.beforeDecimal,a=o.afterDecimal,c=o.hasNagation,s=parseFloat("0."+(a||"0")),p=(a.length<=t?"0."+a:s.toFixed(t)).split(".");return(c?"-":"")+i.split("").reverse().reduce((function(e,t,r){return e.length>r?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),p[0])+(n?".":"")+l(p[1]||"",Math.min(t,a.length),r)}(s,n,o)),f?this.formatNumString(s):this.formatInput(s))},t.prototype.formatNegation=function(e){void 0===e&&(e="");var t=this.props.allowNegative,r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),o=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e},t.prototype.formatInput=function(e){return void 0===e&&(e=""),this.props.format||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)},t.prototype.isCharacterAFormat=function(e,t){var r=this.props,n=r.format,o=r.prefix,i=r.suffix,a=r.decimalScale,c=r.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"==typeof n&&"#"!==n[e]||!(n||!(e<o.length||e>=t.length-i.length||a&&c&&t[e]===s))},t.prototype.correctInputValue=function(e,t,r){var n=this,o=this.props,i=o.format,a=o.allowNegative,c=o.prefix,s=o.suffix,l=o.decimalScale,p=this.getSeparators(),f=p.allowedDecimalSeparators,m=p.decimalSeparator,d=this.state.numAsString||"",b=this.selectionBeforeInput,g=b.selectionStart,h=b.selectionEnd,v=function(e,t){for(var r=0,n=0,o=e.length,i=t.length;e[r]===t[r]&&r<o;)r++;for(;e[o-1-n]===t[i-1-n]&&i-n>r&&o-n>r;)n++;return{start:r,end:o-n}}(t,r),O=v.start,y=v.end;if(!i&&O===y&&-1!==f.indexOf(r[g])){var j=0===l?"":m;return r.substr(0,g)+j+r.substr(g+1,r.length)}var w=i?0:c.length,_=t.length-(i?0:s.length);if(r.length>t.length||!r.length||O===y||0===g&&h===t.length||0===O&&y===t.length||g===w&&h===_)return r;var S=t.substr(O,y-O);if([].concat(S).find((function(e,r){return n.isCharacterAFormat(r+O,t)}))){var x=t.substr(O),E={},k=[];[].concat(x).forEach((function(e,r){n.isCharacterAFormat(r+O,t)?E[r]=e:r>S.length-1&&k.push(e)})),Object.keys(E).forEach((function(e){k.length>e?k.splice(e,0,E[e]):k.push(E[e])})),r=t.substr(0,O)+k.join("")}if(!i){var N=this.removeFormatting(r),P=u(N,a),F=P.beforeDecimal,C=P.afterDecimal,A=P.addNegation,R=e<r.indexOf(m)+1;if(N.length<d.length&&R&&""===F&&!parseFloat(C))return A?"-":""}return r},t.prototype.updateValue=function(e){var t=e.formattedValue,r=e.input,n=e.setCaretPosition;void 0===n&&(n=!0);var o=e.source,i=e.event,a=e.numAsString,c=e.caretPos,s=this.props.onValueChange,u=this.state.value;if(r){if(void 0===c&&n){var l=e.inputValue||r.value,p=d(r);r.value=t,c=this.getCaretPosition(l,t,p)}r.value=t,n&&this.setPatchedCaretPosition(r,c,t)}void 0===a&&(a=this.removeFormatting(t)),t!==u&&(this.setState({value:t,numAsString:a}),s(this.getValueObject(t,a),{event:i,source:o}))},t.prototype.onChange=function(e){var t=e.target,r=t.value,n=this.state,o=this.props,i=o.isAllowed,a=n.value||"",c=d(t);r=this.correctInputValue(c,a,r);var s=this.formatInput(r)||"",u=this.removeFormatting(s),l=i(this.getValueObject(s,u));l||(s=a),this.updateValue({formattedValue:s,numAsString:u,inputValue:r,input:t,event:e,source:"event"}),l&&o.onChange(e)},t.prototype.onBlur=function(e){var t=this.props,r=this.state,n=t.format,o=t.onBlur,i=t.allowLeadingZeros,a=r.numAsString,c=r.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout),!n){isNaN(parseFloat(a))&&(a=""),i||(a=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",o=r[1]||"";return(t?"-":"")+n+(o?"."+o:"")}(a));var s=this.formatNumString(a);if(s!==c)return this.updateValue({formattedValue:s,numAsString:a,input:e.target,setCaretPosition:!1,event:e,source:"event"}),void o(e)}o(e)},t.prototype.onKeyDown=function(e){var t,r=e.target,n=e.key,o=r.selectionStart,i=r.selectionEnd,a=r.value;void 0===a&&(a="");var c=this.props,s=c.decimalScale,u=c.fixedDecimalScale,l=c.prefix,p=c.suffix,f=c.format,m=c.onKeyDown,d=void 0!==s&&u,b=this.getNumberRegex(!1,d),g=new RegExp("-"),h="string"==typeof f;if(this.selectionBeforeInput={selectionStart:o,selectionEnd:i},"ArrowLeft"===n||"Backspace"===n?t=o-1:"ArrowRight"===n?t=o+1:"Delete"===n&&(t=o),void 0!==t&&o===i){var v=t,O=h?f.indexOf("#"):l.length,y=h?f.lastIndexOf("#")+1:a.length-p.length;if("ArrowLeft"===n||"ArrowRight"===n){var j="ArrowLeft"===n?"left":"right";v=this.correctCaretPosition(a,t,j)}else if("Delete"!==n||b.test(a[t])||g.test(a[t])){if("Backspace"===n&&!b.test(a[t]))if(o<=O+1&&"-"===a[0]&&void 0===f){var w=a.substring(1);this.updateValue({formattedValue:w,caretPos:v,input:r,event:e,source:"event"})}else if(!g.test(a[t])){for(;!b.test(a[v-1])&&v>O;)v--;v=this.correctCaretPosition(a,v,"left")}}else for(;!b.test(a[v])&&v<y;)v++;(v!==t||t<O||t>y)&&(e.preventDefault(),this.setPatchedCaretPosition(r,v,a)),e.isUnitTestRun&&this.setPatchedCaretPosition(r,v,a),m(e)}else m(e)},t.prototype.onMouseUp=function(e){var t=e.target,r=t.selectionStart,n=t.selectionEnd,o=t.value;if(void 0===o&&(o=""),r===n){var i=this.correctCaretPosition(o,r);i!==r&&this.setPatchedCaretPosition(t,i,o)}this.props.onMouseUp(e)},t.prototype.onFocus=function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var r=e.target,n=r.selectionStart,o=r.selectionEnd,i=r.value;void 0===i&&(i="");var a=t.correctCaretPosition(i,n);a===n||0===n&&o===i.length||t.setPatchedCaretPosition(r,a,i),t.props.onFocus(e)}),0)},t.prototype.render=function(){var e=this.props,t=e.type,r=e.displayType,n=e.customInput,i=e.renderText,a=e.getInputRef,c=e.format,s=(e.thousandSeparator,e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle,e.decimalScale,e.fixedDecimalScale,e.prefix,e.suffix,e.removeFormatting,e.mask,e.defaultValue,e.isNumericString,e.allowNegative,e.allowEmptyFormatting,e.allowLeadingZeros,e.onValueChange,e.isAllowed,e.customNumerals,e.onChange,e.onKeyDown,e.onMouseUp,e.onFocus,e.onBlur,e.value,function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&-1===t.indexOf(n)&&(r[n]=e[n]);return r}(e,["type","displayType","customInput","renderText","getInputRef","format","thousandSeparator","decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","decimalScale","fixedDecimalScale","prefix","suffix","removeFormatting","mask","defaultValue","isNumericString","allowNegative","allowEmptyFormatting","allowLeadingZeros","onValueChange","isAllowed","customNumerals","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value"])),u=this.state,l=u.value,p=u.mounted&&function(e){return e||"undefined"!=typeof navigator&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(c)?"numeric":void 0,f=Object.assign({inputMode:p},s,{type:t,value:l,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===r)return i?i(l,s)||null:o.a.createElement("span",Object.assign({},s,{ref:a}),l);if(n){var m=n;return o.a.createElement(m,Object.assign({},f,{ref:a}))}return o.a.createElement("input",Object.assign({},f,{ref:a}))},t}(o.a.Component);g.defaultProps=b,t.a=g},155:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(28),o=r(156);const i=e=>({heading:Object(n.a)(null==e?void 0:e.heading)?e.heading:"",headingLevel:Object(n.a)(null==e?void 0:e.headingLevel)&&parseInt(e.headingLevel,10)||o.attributes.headingLevel.default,showFilterButton:"true"===(null==e?void 0:e.showFilterButton),showInputFields:"false"!==(null==e?void 0:e.showInputFields),inlineInput:"true"===(null==e?void 0:e.inlineInput)})},156:function(e){e.exports=JSON.parse('{"name":"woocommerce/price-filter","version":"1.0.0","title":"Filter by Price Controls","description":"Enable customers to filter the product grid by choosing a price range.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"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":2,"$schema":"https://schemas.wp.org/trunk/block.json"}')},158:function(e,t,r){"use strict";var n=r(0),o=r(53),i=r(30),a=r(135),c=r(1),s=r(4),u=r.n(s),l=r(112),p=r(19),f=r(43);r(228);const m=(e,t,r,n=1,o=!1)=>{let[i,a]=e;const c=e=>Number.isFinite(e);return c(i)||(i=t||0),c(a)||(a=r||n),c(t)&&t>i&&(i=t),c(r)&&r<=i&&(i=r-n),c(t)&&t>=a&&(a=t+n),c(r)&&r<a&&(a=r),!o&&i>=a&&(i=a-n),o&&a<=i&&(a=i+n),[i,a]};var d=r(62);const b=({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 h=r(61),v=({minPrice:e,maxPrice:t,minConstraint:r,maxConstraint:o,onChange:i,step:a,currency:s,showInputFields:v=!0,showFilterButton:O=!1,inlineInput:y=!0,isLoading:j=!1,isUpdating:w=!1,isEditor:_=!1,onSubmit:S=(()=>{})})=>{const x=Object(n.useRef)(null),E=Object(n.useRef)(null),k=a||10**s.minorUnit,[N,P]=Object(n.useState)(e),[F,C]=Object(n.useState)(t),A=Object(n.useRef)(null),[R,T]=Object(n.useState)(0);Object(n.useEffect)((()=>{P(e)}),[e]),Object(n.useEffect)((()=>{C(t)}),[t]),Object(n.useLayoutEffect)((()=>{var e;y&&A.current&&T(null===(e=A.current)||void 0===e?void 0:e.offsetWidth)}),[y,T]);const B=Object(n.useMemo)((()=>isFinite(r)&&isFinite(o)),[r,o]),M=Object(n.useMemo)((()=>isFinite(e)&&isFinite(t)&&B?{"--low":(e-r)/(o-r)*100+"%","--high":(t-r)/(o-r)*100+"%"}:{"--low":"0%","--high":"100%"}),[e,t,r,o,B]),U=Object(n.useCallback)((e=>{if(j||!B||!x.current||!E.current)return;const t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=x.current.offsetWidth,i=+x.current.value,a=E.current.offsetWidth,c=+E.current.value,s=n*(i/o),u=a*(c/o);Math.abs(r-s)>Math.abs(r-u)?(x.current.style.zIndex="20",E.current.style.zIndex="21"):(x.current.style.zIndex="21",E.current.style.zIndex="20")}),[j,o,B]),D=Object(n.useCallback)((n=>{const a=n.target.classList.contains("wc-block-price-filter__range-input--min"),c=+n.target.value,s=a?[Math.round(c/k)*k,t]:[e,Math.round(c/k)*k],u=m(s,r,o,k,a);i(u)}),[i,e,t,r,o,k]),V=Object(n.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(N>=F){const e=m([0,F],null,null,k,t);return i([parseInt(e[0],10),parseInt(e[1],10)])}const r=m([N,F],null,null,k,t);i(r)}),[i,k,N,F]),I=Object(f.b)(S,600),L=u()("wc-block-price-filter","wc-block-components-price-slider",v&&"wc-block-price-filter--has-input-fields",v&&"wc-block-components-price-slider--has-input-fields",O&&"wc-block-price-filter--has-filter-button",O&&"wc-block-components-price-slider--has-filter-button",!B&&"is-disabled",(y||R<=300)&&"wc-block-components-price-slider--is-input-inline"),q=Object(p.a)(x.current)?x.current.ownerDocument.activeElement:void 0,G=q&&q===x.current?k:1,K=q&&q===E.current?k:1,W=String(N/10**s.minorUnit),Q=String(F/10**s.minorUnit),Y=y&&R>300,$=Object(n.createElement)("div",{className:u()("wc-block-price-filter__range-input-wrapper","wc-block-components-price-slider__range-input-wrapper",{"is-loading":j&&w}),onMouseMove:U,onFocus:U},B&&Object(n.createElement)("div",{"aria-hidden":v},Object(n.createElement)("div",{className:"wc-block-price-filter__range-input-progress wc-block-components-price-slider__range-input-progress",style:M}),Object(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":Object(c.__)("Filter products by minimum price","woocommerce"),"aria-valuetext":W,value:Number.isFinite(e)?e:r,onChange:D,step:G,min:r,max:o,ref:x,disabled:j&&!B,tabIndex:v?-1:0}),Object(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":Object(c.__)("Filter products by maximum price","woocommerce"),"aria-valuetext":Q,value:Number.isFinite(t)?t:o,onChange:D,step:K,min:r,max:o,ref:E,disabled:j,tabIndex:v?-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}`,Z={currency:s,decimalScale:0},J={...Z,displayType:"input",allowNegative:!1,disabled:j||!B,onBlur:V};return Object(n.createElement)("div",{className:L,ref:A},(!Y||!v)&&$,v&&Object(n.createElement)("div",{className:"wc-block-price-filter__controls wc-block-components-price-slider__controls"},w?Object(n.createElement)("div",{className:"input-loading"}):Object(n.createElement)(l.a,{...J,className:z("min"),"aria-label":Object(c.__)("Filter products by minimum price","woocommerce"),isAllowed:g({minConstraint:r,minorUnit:s.minorUnit,currentMaxValue:F}),onValueChange:e=>{e!==N&&P(e)},value:N}),Y&&$,w?Object(n.createElement)("div",{className:"input-loading"}):Object(n.createElement)(l.a,{...J,className:z("max"),"aria-label":Object(c.__)("Filter products by maximum price","woocommerce"),isAllowed:b({maxConstraint:o,minorUnit:s.minorUnit}),onValueChange:e=>{e!==F&&C(e)},value:F})),!v&&!w&&Number.isFinite(e)&&Number.isFinite(t)&&Object(n.createElement)("div",{className:"wc-block-price-filter__range-text wc-block-components-price-slider__range-text"},Object(n.createElement)(l.a,{...Z,value:e}),Object(n.createElement)(l.a,{...Z,value:t})),Object(n.createElement)("div",{className:"wc-block-components-price-slider__actions"},(_||!w&&(e!==r||t!==o))&&Object(n.createElement)(h.a,{onClick:()=>{i([r,o]),I()},screenReaderLabel:Object(c.__)("Reset price filter","woocommerce")}),O&&Object(n.createElement)(d.a,{className:"wc-block-price-filter__button wc-block-components-price-slider__button",isLoading:w,disabled:j||!B,onClick:S,screenReaderLabel:Object(c.__)("Apply price filter","woocommerce")})))},O=r(60),y=r(38),j=r(2),w=r(14),_=r(67),S=r(63),x=r(28);const E="ROUND_UP",k="ROUND_DOWN",N=(e,t,r)=>{const n=10*10**t;let i=null;const a=parseFloat(e);isNaN(a)||(r===E?i=Math.ceil(a/n)*n:r===k&&(i=Math.floor(a/n)*n));const c=Object(o.a)(i,Number.isFinite);return Number.isFinite(i)?i:c};r(227);var P=r(47);function F(e,t){return Number(e)*10**t}t.a=({attributes:e,isEditor:t=!1})=>{const r=Object(P.b)(),c=Object(j.getSettingWithCoercion)("hasFilterableProducts",!1,S.a),s=Object(j.getSettingWithCoercion)("isRenderingPhpTemplate",!1,S.a),[u,l]=Object(n.useState)(!1),m=Object(_.d)("min_price"),d=Object(_.d)("max_price"),[b]=Object(i.a)(),{results:g,isLoading:h}=Object(a.a)({queryPrices:!0,queryState:b,isEditor:t}),C=Object(y.getCurrencyFromPriceResponse)(Object(p.b)(g,"price_range")?g.price_range:void 0),[A,R]=Object(i.b)("min_price"),[T,B]=Object(i.b)("max_price"),[M,U]=Object(n.useState)(F(m,C.minorUnit)||null),[D,V]=Object(n.useState)(F(d,C.minorUnit)||null),{minConstraint:I,maxConstraint:L}=(({minPrice:e,maxPrice:t,minorUnit:r})=>({minConstraint:N(e||"",r,k),maxConstraint:N(t||"",r,E)}))({minPrice:Object(p.b)(g,"price_range")&&Object(p.b)(g.price_range,"min_price")&&Object(x.a)(g.price_range.min_price)?g.price_range.min_price:void 0,maxPrice:Object(p.b)(g,"price_range")&&Object(p.b)(g.price_range,"max_price")&&Object(x.a)(g.price_range.max_price)?g.price_range.max_price:void 0,minorUnit:C.minorUnit});Object(n.useEffect)((()=>{u||(R(F(m,C.minorUnit)),B(F(d,C.minorUnit)),l(!0))}),[C.minorUnit,u,d,m,B,R]);const[q,G]=Object(n.useState)(h),K=Object(n.useCallback)(((e,t)=>{const r=t>=Number(L)?void 0:t,n=e<=Number(I)?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=Object(w.removeQueryArgs)(e,...Object.keys(t));return Object(w.addQueryArgs)(n,r)}(window.location.href,{min_price:n/10**C.minorUnit,max_price:r/10**C.minorUnit});window.location.href!==e&&Object(_.c)(e)}R(n),B(r)}),[I,L,R,B,C.minorUnit]),W=Object(f.b)(K,500),Q=Object(n.useCallback)((t=>{G(!0),t[0]!==M&&U(t[0]),t[1]!==D&&V(t[1]),s&&u&&!e.showFilterButton&&W(t[0],t[1])}),[M,D,U,V,s,u,W,e.showFilterButton]);Object(n.useEffect)((()=>{e.showFilterButton||s||W(M,D)}),[M,D,e.showFilterButton,W,s]);const Y=Object(o.a)(A),$=Object(o.a)(T),z=Object(o.a)(I),Z=Object(o.a)(L);if(Object(n.useEffect)((()=>{(!Number.isFinite(M)||A!==Y&&A!==M||I!==z&&I!==M)&&U(Number.isFinite(A)?A:I),(!Number.isFinite(D)||T!==$&&T!==D||L!==Z&&L!==D)&&V(Number.isFinite(T)?T:L)}),[M,D,A,T,I,L,z,Z,Y,$]),!c)return r(!1),null;if(!h&&(null===I||null===L||I===L))return r(!1),null;const J=`h${e.headingLevel}`;r(!0),!h&&q&&G(!1);const X=Object(n.createElement)(J,{className:"wc-block-price-filter__title"},e.heading),H=h&&q?Object(n.createElement)(O.a,null,X):X;return Object(n.createElement)(n.Fragment,null,!t&&e.heading&&H,Object(n.createElement)("div",{className:"wc-block-price-slider"},Object(n.createElement)(v,{minConstraint:I,maxConstraint:L,minPrice:M,maxPrice:D,currency:C,showInputFields:e.showInputFields,inlineInput:e.inlineInput,showFilterButton:e.showFilterButton,onChange:Q,onSubmit:()=>K(M,D),isLoading:h,isUpdating:q,isEditor:t})))}},16:function(e,t,r){"use strict";var n=r(12),o=r.n(n),i=r(0),a=r(1),c=r(29),s=({imageUrl:e=`${c.n}/block-error.svg`,header:t=Object(a.__)("Oops!","woocommerce"),text:r=Object(a.__)("There was an error loading the content.","woocommerce"),errorMessage:n,errorMessagePrefix:o=Object(a.__)("Error:","woocommerce"),button:s,showErrorBlock:u=!0})=>u?Object(i.createElement)("div",{className:"wc-block-error wc-block-components-error"},e&&Object(i.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:e,alt:""}),Object(i.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},t&&Object(i.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},t),r&&Object(i.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),n&&Object(i.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},o?o+" ":"",n),s&&Object(i.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},s))):null;r(41);class u extends i.Component{constructor(...e){super(...e),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(i.createElement)(i.Fragment,null,Object(i.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,showErrorBlock:n=!0,text:o,errorMessagePrefix:a,renderError:c,button:u}=this.props,{errorMessage:l,hasError:p}=this.state;return p?"function"==typeof c?c({errorMessage:l}):Object(i.createElement)(s,{showErrorBlock:n,errorMessage:r?l:null,header:e,imageUrl:t,text:o,errorMessagePrefix:a,button:u}):this.props.children}}t.a=u},18:function(e,t,r){"use strict";var n=r(0),o=r(4),i=r.n(o);t.a=({label:e,screenReaderLabel:t,wrapperElement:r,wrapperProps:o={}})=>{let a;const c=null!=e,s=null!=t;return!c&&s?(a=r||"span",o={...o,className:i()(o.className,"screen-reader-text")},Object(n.createElement)(a,{...o},t)):(a=r||n.Fragment,c&&s&&e!==t?Object(n.createElement)(a,{...o},Object(n.createElement)("span",{"aria-hidden":"true"},e),Object(n.createElement)("span",{className:"screen-reader-text"},t)):Object(n.createElement)(a,{...o},e))}},19:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(37);const o=e=>!Object(n.a)(e)&&e instanceof Object&&e.constructor===Object;function i(e,t){return o(e)&&t in e}},2:function(e,t){e.exports=window.wc.wcSettings},21:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0);const o=Object(n.createContext)("page"),i=()=>Object(n.useContext)(o);o.Provider},218:function(e,t){},227:function(e,t){},228:function(e,t){},257:function(e,t,r){e.exports=r(258)},258:function(e,t,r){"use strict";r.r(t);var n=r(49),o=r(158),i=r(155);Object(n.a)({selector:".wp-block-woocommerce-price-filter",Block:o.a,getProps:e=>({attributes:Object(i.a)(e.dataset),isEditor:!1})})},26:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),o=r(13),i=r.n(o);function a(e){const t=Object(n.useRef)(e);return i()(e,t.current)||(t.current=e),t.current}},27:function(e,t){function r(t){return e.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},28:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e},29:function(e,t,r){"use strict";r.d(t,"p",(function(){return i})),r.d(t,"n",(function(){return a})),r.d(t,"m",(function(){return c})),r.d(t,"o",(function(){return s})),r.d(t,"k",(function(){return u})),r.d(t,"d",(function(){return l})),r.d(t,"h",(function(){return p})),r.d(t,"l",(function(){return f})),r.d(t,"c",(function(){return m})),r.d(t,"g",(function(){return d})),r.d(t,"f",(function(){return b})),r.d(t,"a",(function(){return v})),r.d(t,"b",(function(){return O})),r.d(t,"i",(function(){return y})),r.d(t,"j",(function(){return j})),r.d(t,"e",(function(){return w}));var n,o=r(2);const i=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=i.pluginUrl+"images/",c=i.pluginUrl+"build/",s=i.buildPhase,u=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,l=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),p=o.STORE_PAGES.privacy.permalink,f=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),m=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),d=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),b=Object(o.getSetting)("localPickupEnabled",!1),g=Object(o.getSetting)("countries",{}),h=Object(o.getSetting)("countryData",{}),v=Object.fromEntries(Object.keys(h).filter((e=>!0===h[e].allowBilling)).map((e=>[e,g[e]||""]))),O=Object.fromEntries(Object.keys(h).filter((e=>!0===h[e].allowBilling)).map((e=>[e,h[e].states||[]]))),y=Object.fromEntries(Object.keys(h).filter((e=>!0===h[e].allowShipping)).map((e=>[e,g[e]||""]))),j=Object.fromEntries(Object.keys(h).filter((e=>!0===h[e].allowShipping)).map((e=>[e,h[e].states||[]]))),w=Object.fromEntries(Object.keys(h).map((e=>[e,h[e].locale||[]])))},3:function(e,t){e.exports=window.wc.wcBlocksData},30:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return m}));var n=r(3),o=r(5),i=r(0),a=r(13),c=r.n(a),s=r(26),u=r(53),l=r(21);const p=e=>{const t=Object(l.a)();e=e||t;const r=Object(o.useSelect)((t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)),[e]),{setValueForQueryContext:a}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[r,Object(i.useCallback)((t=>{a(e,t)}),[e,a])]},f=(e,t,r)=>{const a=Object(l.a)();r=r||a;const c=Object(o.useSelect)((o=>o(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)),[r,e]),{setQueryValue:s}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[c,Object(i.useCallback)((t=>{s(r,e,t)}),[r,e,s])]},m=(e,t)=>{const r=Object(l.a)();t=t||r;const[n,o]=p(t),a=Object(s.a)(n),f=Object(s.a)(e),m=Object(u.a)(f),d=Object(i.useRef)(!1);return Object(i.useEffect)((()=>{c()(m,f)||(o(Object.assign({},a,f)),d.current=!0)}),[a,f,m,o]),d.current?[n,o]:[e,o]}},37:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>null===e},38:function(e,t){e.exports=window.wc.priceFormat},39:function(e,t,r){var n=r(27).default,o=r(40);e.exports=function(e){var t=o(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},4:function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var c in n)r.call(n,c)&&n[c]&&e.push(c);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},40:function(e,t,r){var n=r(27).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},41:function(e,t){},43:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return o}));var n=r(8);function o(e,t,r){var o=this,i=Object(n.useRef)(null),a=Object(n.useRef)(0),c=Object(n.useRef)(null),s=Object(n.useRef)([]),u=Object(n.useRef)(),l=Object(n.useRef)(),p=Object(n.useRef)(e),f=Object(n.useRef)(!0);Object(n.useEffect)((function(){p.current=e}),[e]);var m=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var d=!!(r=r||{}).leading,b=!("trailing"in r)||!!r.trailing,g="maxWait"in r,h=g?Math.max(+r.maxWait||0,t):null;Object(n.useEffect)((function(){return f.current=!0,function(){f.current=!1}}),[]);var v=Object(n.useMemo)((function(){var e=function(e){var t=s.current,r=u.current;return s.current=u.current=null,a.current=e,l.current=p.current.apply(r,t)},r=function(e,t){m&&cancelAnimationFrame(c.current),c.current=m?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!f.current)return!1;var r=e-i.current;return!i.current||r>=t||r<0||g&&e-a.current>=h},v=function(t){return c.current=null,b&&s.current?e(t):(s.current=u.current=null,l.current)},O=function e(){var o=Date.now();if(n(o))return v(o);if(f.current){var c=t-(o-i.current),s=g?Math.min(c,h-(o-a.current)):c;r(e,s)}},y=function(){var p=Date.now(),m=n(p);if(s.current=[].slice.call(arguments),u.current=o,i.current=p,m){if(!c.current&&f.current)return a.current=i.current,r(O,t),d?e(i.current):l.current;if(g)return r(O,t),e(i.current)}return c.current||r(O,t),l.current};return y.cancel=function(){c.current&&(m?cancelAnimationFrame(c.current):clearTimeout(c.current)),a.current=0,s.current=i.current=u.current=c.current=null},y.isPending=function(){return!!c.current},y.flush=function(){return c.current?v(Date.now()):l.current},y}),[d,g,t,h,b,m]);return v}function i(e,t){return e===t}function a(e){return"function"==typeof e?function(){return e}:e}function c(e,t,r){var c,s,u=r&&r.equalityFn||i,l=(c=Object(n.useState)(a(e)),s=c[1],[c[0],Object(n.useCallback)((function(e){return s(a(e))}),[])]),p=l[0],f=l[1],m=o(Object(n.useCallback)((function(e){return f(e)}),[f]),t,r),d=Object(n.useRef)(e);return u(d.current,e)||(m(e),d.current=e),[p,m]}},44:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e){return function(t,r,n){return e(t,r,n)*n}},o=function(e,t){if(e)throw Error("Invalid sort config: "+t)},i=function(e){var t=e||{},r=t.asc,i=t.desc,a=r?1:-1,c=r||i;return o(!c,"Expected `asc` or `desc` property"),o(r&&i,"Ambiguous object with `asc` and `desc` config properties"),{order:a,sortBy:c,comparer:e.comparer&&n(e.comparer)}};function a(e,t,r){if(void 0===e||!0===e)return function(e,n){return t(e,n,r)};if("string"==typeof e)return o(e.includes("."),"String syntax not allowed for nested properties."),function(n,o){return t(n[e],o[e],r)};if("function"==typeof e)return function(n,o){return t(e(n),e(o),r)};if(Array.isArray(e)){var n=function(e){return function t(r,n,o,a,c,s,u){var l,p;if("string"==typeof r)l=s[r],p=u[r];else{if("function"!=typeof r){var f=i(r);return t(f.sortBy,n,o,f.order,f.comparer||e,s,u)}l=r(s),p=r(u)}var m=c(l,p,a);return(0===m||null==l&&null==p)&&n.length>o?t(n[o],n,o+1,a,c,s,u):m}}(t);return function(o,i){return n(e[0],e,1,r,t,o,i)}}var c=i(e);return a(c.sortBy,c.comparer||t,c.order)}var c=function(e,t,r,n){return Array.isArray(t)?(Array.isArray(r)&&r.length<2&&(r=r[0]),t.sort(a(r,n,e))):t};function s(e){var t=n(e.comparer);return function(r){var n=Array.isArray(r)&&!e.inPlaceSorting?r.slice():r;return{asc:function(e){return c(1,n,e,t)},desc:function(e){return c(-1,n,e,t)},by:function(e){return c(1,n,e,t)}}}}var u=function(e,t,r){return null==e?r:null==t?-r:typeof e!=typeof t?typeof e<typeof t?-1:1:e<t?-1:e>t?1:0},l=s({comparer:u});s({comparer:u,inPlaceSorting:!0})},47:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(0);const o=Object(n.createContext)({}),i=()=>{const{wrapper:e}=Object(n.useContext)(o);return t=>{e&&e.current&&(e.current.hidden=!t)}}},49:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0),o=r(16);const i=[".wp-block-woocommerce-cart"],a=({Block:e,containers:t,getProps:r=(()=>({})),getErrorBoundaryProps:i=(()=>({}))})=>{0!==t.length&&Array.prototype.forEach.call(t,((t,a)=>{const c=r(t,a),s=i(t,a),u={...t.dataset,...c.attributes||{}};(({Block:e,container:t,attributes:r={},props:i={},errorBoundaryProps:a={}})=>{Object(n.render)(Object(n.createElement)(o.a,{...a},Object(n.createElement)(n.Suspense,{fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},e&&Object(n.createElement)(e,{...i,attributes:r}))),t,(()=>{t.classList&&t.classList.remove("is-loading")}))})({Block:e,container:t,props:c,attributes:u,errorBoundaryProps:s})}))},c=e=>{const t=document.body.querySelectorAll(i.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:c}=e;(({Block:e,getProps:t,getErrorBoundaryProps:r,selector:n,wrappers:o})=>{const i=document.body.querySelectorAll(n);o&&o.length>0&&Array.prototype.filter.call(i,(e=>!((e,t)=>Array.prototype.some.call(t,(t=>t.contains(e)&&!t.isSameNode(e))))(e,o))),a({Block:e,containers:i,getProps:t,getErrorBoundaryProps:r})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:c,wrappers:t}),Array.prototype.forEach.call(t,(t=>{t.addEventListener("wc-blocks_render_blocks_frontend",(()=>{(({Block:e,getProps:t,getErrorBoundaryProps:r,selector:n,wrapper:o})=>{const i=o.querySelectorAll(n);a({Block:e,containers:i,getProps:t,getErrorBoundaryProps:r})})({...e,wrapper:t})}))}))}},5:function(e,t){e.exports=window.wp.data},52:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(3),o=r(5),i=r(0),a=r(26);const c=e=>{const{namespace:t,resourceName:r,resourceValues:c=[],query:s={},shouldSelect:u=!0}=e;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");const l=Object(i.useRef)({results:[],isLoading:!0}),p=Object(a.a)(s),f=Object(a.a)(c),m=(()=>{const[,e]=Object(i.useState)();return Object(i.useCallback)((t=>{e((()=>{throw t}))}),[])})(),d=Object(o.useSelect)((e=>{if(!u)return null;const o=e(n.COLLECTIONS_STORE_KEY),i=[t,r,p,f],a=o.getCollectionError(...i);if(a){if(!(a instanceof Error))throw new Error("TypeError: `error` object is not an instance of Error constructor");m(a)}return{results:o.getCollection(...i),isLoading:!o.hasFinishedResolution("getCollection",i)}}),[t,r,f,p,u]);return null!==d&&(l.current=d),l.current}},53:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)((()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)}),[e,t]),r.current}},60:function(e,t,r){"use strict";var n=r(0);r(90),t.a=({children:e})=>Object(n.createElement)("div",{className:"wc-block-filter-title-placeholder"},e)},61:function(e,t,r){"use strict";var n=r(0),o=r(1),i=r(4),a=r.n(i),c=r(18);r(91),t.a=({className:e,
/* translators: Reset button text for filters. */
label:t=Object(o.__)("Reset","woocommerce"),onClick:r,screenReaderLabel:i=Object(o.__)("Reset filter","woocommerce")})=>Object(n.createElement)("button",{className:a()("wc-block-components-filter-reset-button",e),onClick:r},Object(n.createElement)(c.a,{label:t,screenReaderLabel:i}))},62:function(e,t,r){"use strict";var n=r(0),o=r(1),i=r(4),a=r.n(i),c=r(18);r(92),t.a=({className:e,isLoading:t,disabled:r,
/* translators: Submit button text for filters. */
label:i=Object(o.__)("Apply","woocommerce"),onClick:s,screenReaderLabel:u=Object(o.__)("Apply filter","woocommerce")})=>Object(n.createElement)("button",{type:"submit",className:a()("wp-block-button__link","wc-block-filter-submit-button","wc-block-components-filter-submit-button",{"is-loading":t},e),disabled:r,onClick:s},Object(n.createElement)(c.a,{label:i,screenReaderLabel:u}))},63:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>"boolean"==typeof e},67:function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return s})),r.d(t,"d",(function(){return u})),r.d(t,"c",(function(){return l})),r.d(t,"e",(function(){return p}));var n=r(14),o=r(2),i=r(63);const a=Object(o.getSettingWithCoercion)("isRenderingPhpTemplate",!1,i.a),c="query_type_",s="filter_";function u(e){return window?Object(n.getQueryArg)(window.location.href,e):null}function l(e){a?((e=e.replace(/(?:query-(?:\d+-)?page=(\d+))|(?:page\/(\d+))/g,"")).endsWith("?")&&(e=e.slice(0,-1)),window.location.href=e):window.history.replaceState({},"",e)}const p=e=>{const t=Object(n.getQueryArgs)(e);return Object(n.addQueryArgs)(e,t)}},8:function(e,t){e.exports=window.React},90:function(e,t){},91:function(e,t){},92:function(e,t){}});