File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/vendors--mini-cart-contents-block.tar
products-table--price-filter-wrapper--product-price-style.js 0000644 00000035576 15154727600 0020170 0 ustar 00 (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{133:function(t,e,r){"use strict";var o=r(9),n=r.n(o);function a(){}function i(t){return!!(t||"").match(/\d/)}function s(t){return null==t}function u(t){return t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function l(t,e){void 0===e&&(e=!0);var r="-"===t[0],o=r&&e,n=(t=t.replace("-","")).split(".");return{beforeDecimal:n[0],afterDecimal:n[1]||"",hasNagation:r,addNegation:o}}function p(t,e,r){for(var o="",n=r?"0":"",a=0;a<=e-1;a++)o+=t[a]||n;return o}function c(t,e){return Array(e+1).join(t)}function f(t,e){if(t.value=t.value,null!==t){if(t.createTextRange){var r=t.createTextRange();return r.move("character",e),r.select(),!0}return t.selectionStart||0===t.selectionStart?(t.focus(),t.setSelectionRange(e,e),!0):(t.focus(),!1)}}function h(t,e,r){return Math.min(Math.max(t,e),r)}function m(t){return Math.max(t.selectionStart,t.selectionEnd)}var g={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:a,onChange:a,onKeyDown:a,onMouseUp:a,onFocus:a,onBlur:a,isAllowed:function(){return!0}},d=function(t){function e(e){t.call(this,e);var r=e.defaultValue;this.validateProps();var o=this.formatValueProp(r);this.state={value:o,numAsString:this.removeFormatting(o),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 t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.componentDidMount=function(){this.setState({mounted:!0})},e.prototype.componentDidUpdate=function(t){this.updateValueIfRequired(t)},e.prototype.componentWillUnmount=function(){clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout)},e.prototype.updateValueIfRequired=function(t){var e=this.props,r=this.state,o=this.focusedElm,n=r.value,a=r.numAsString;if(void 0===a&&(a=""),t!==e){this.validateProps();var i=this.formatNumString(a),u=s(e.value)?i:this.formatValueProp(),l=this.removeFormatting(u),p=parseFloat(l),c=parseFloat(a);(isNaN(p)&&isNaN(c)||p===c)&&i===n&&(null!==o||u===n)||this.updateValue({formattedValue:u,numAsString:l,input:o,source:"prop",event:null})}},e.prototype.getFloatString=function(t){void 0===t&&(t="");var e=this.props.decimalScale,r=this.getSeparators().decimalSeparator,o=this.getNumberRegex(!0),n="-"===t[0];n&&(t=t.replace("-","")),r&&0===e&&(t=t.split(r)[0]);var a=(t=(t.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==a&&(t=t.substring(0,a)+"."+t.substring(a+1,t.length).replace(new RegExp(u(r),"g"),"")),n&&(t="-"+t),t},e.prototype.getNumberRegex=function(t,e){var r=this.props,o=r.format,n=r.decimalScale,a=r.customNumerals,i=this.getSeparators().decimalSeparator;return new RegExp("[0-9"+(a?a.join(""):"")+"]"+(!i||0===n||e||o?"":"|"+u(i)),t?"g":void 0)},e.prototype.getSeparators=function(){var t=this.props.decimalSeparator,e=this.props,r=e.thousandSeparator,o=e.allowedDecimalSeparators;return!0===r&&(r=","),o||(o=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:o}},e.prototype.getMaskAtIndex=function(t){var e=this.props.mask;return void 0===e&&(e=" "),"string"==typeof e?e:e[t]||" "},e.prototype.getValueObject=function(t,e){var r=parseFloat(e);return{formattedValue:t,value:e,floatValue:isNaN(r)?void 0:r}},e.prototype.validateProps=function(){var t=this.props.mask,e=this.getSeparators(),r=e.decimalSeparator,o=e.thousandSeparator;if(r===o)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+o+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+r+" (default value for decimalSeparator is .)\n ");if(t&&("string"===t?t:t.toString()).match(/\d/g))throw new Error("\n Mask "+t+" should not contain numeric character;\n ")},e.prototype.setPatchedCaretPosition=function(t,e,r){f(t,e),this.caretPositionTimeout=setTimeout((function(){t.value===r&&f(t,e)}),0)},e.prototype.correctCaretPosition=function(t,e,r){var o=this.props,n=o.prefix,a=o.suffix,s=o.format;if(""===t)return 0;if(e=h(e,0,t.length),!s){var u="-"===t[0];return h(e,n.length+(u?1:0),t.length-a.length)}if("function"==typeof s)return e;if("#"===s[e]&&i(t[e]))return e;if("#"===s[e-1]&&i(t[e-1]))return e;var l=s.indexOf("#");e=h(e,l,s.lastIndexOf("#")+1);for(var p=s.substring(e,s.length).indexOf("#"),c=e,f=e+(-1===p?0:p);c>l&&("#"!==s[c]||!i(t[c]));)c-=1;return!i(t[f])||"left"===r&&e!==l||e-c<f-e?i(t[c])?c+1:c:f},e.prototype.getCaretPosition=function(t,e,r){var o,n,a=this.props.format,i=this.state.value,s=this.getNumberRegex(!0),u=(t.match(s)||[]).join(""),l=(e.match(s)||[]).join("");for(o=0,n=0;n<r;n++){var p=t[n]||"",c=e[o]||"";if((p.match(s)||p===c)&&("0"!==p||!c.match(s)||"0"===c||u.length===l.length)){for(;p!==e[o]&&o<e.length;)o++;o++}}return"string"!=typeof a||i||(o=e.length),o=this.correctCaretPosition(e,o)},e.prototype.removePrefixAndSuffix=function(t){var e=this.props,r=e.format,o=e.prefix,n=e.suffix;if(!r&&t){var a="-"===t[0];a&&(t=t.substring(1,t.length));var i=(t=o&&0===t.indexOf(o)?t.substring(o.length,t.length):t).lastIndexOf(n);t=n&&-1!==i&&i===t.length-n.length?t.substring(0,i):t,a&&(t="-"+t)}return t},e.prototype.removePatternFormatting=function(t){for(var e=this.props.format.split("#").filter((function(t){return""!==t})),r=0,o="",n=0,a=e.length;n<=a;n++){var i=e[n]||"",s=n===a?t.length:t.indexOf(i,r);if(-1===s){o=t;break}o+=t.substring(r,s),r=s+i.length}return(o.match(this.getNumberRegex(!0))||[]).join("")},e.prototype.removeFormatting=function(t){var e=this.props,r=e.format,o=e.removeFormatting;return t?(r?t="string"==typeof r?this.removePatternFormatting(t):"function"==typeof o?o(t):(t.match(this.getNumberRegex(!0))||[]).join(""):(t=this.removePrefixAndSuffix(t),t=this.getFloatString(t)),t):t},e.prototype.formatWithPattern=function(t){for(var e=this.props.format,r=0,o=e.split(""),n=0,a=e.length;n<a;n++)"#"===e[n]&&(o[n]=t[r]||this.getMaskAtIndex(r),r+=1);return o.join("")},e.prototype.formatAsNumber=function(t){var e=this.props,r=e.decimalScale,o=e.fixedDecimalScale,n=e.prefix,a=e.suffix,i=e.allowNegative,s=e.thousandsGroupStyle,u=this.getSeparators(),c=u.thousandSeparator,f=u.decimalSeparator,h=-1!==t.indexOf(".")||r&&o,m=l(t,i),g=m.beforeDecimal,d=m.afterDecimal,v=m.addNegation;return void 0!==r&&(d=p(d,r,o)),c&&(g=function(t,e,r){var o=function(t){switch(t){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}(r),n=t.search(/[1-9]/);return n=-1===n?t.length:n,t.substring(0,n)+t.substring(n,t.length).replace(o,"$1"+e)}(g,c,s)),n&&(g=n+g),a&&(d+=a),v&&(g="-"+g),t=g+(h&&f||"")+d},e.prototype.formatNumString=function(t){void 0===t&&(t="");var e=this.props,r=e.format,o=e.allowEmptyFormatting,n=e.customNumerals,a=t;if(n&&10===n.length){var i=new RegExp("["+n.join("")+"]","g");a=t.replace(i,(function(t){return n.indexOf(t).toString()}))}return a=""!==t||o?"-"!==t||r?"string"==typeof r?this.formatWithPattern(a):"function"==typeof r?r(a):this.formatAsNumber(a):"-":""},e.prototype.formatValueProp=function(t){var e=this.props,r=e.format,o=e.decimalScale,n=e.fixedDecimalScale,a=e.allowEmptyFormatting,i=this.props,u=i.value,f=i.isNumericString,h=!(u=s(u)?t:u)&&0!==u;return h&&a&&(u=""),h&&!a?"":("number"==typeof u&&(u=function(t){var e="-"===(t+="")[0]?"-":"";e&&(t=t.substring(1));var r=t.split(/[eE]/g),o=r[0],n=r[1];if(!(n=Number(n)))return e+o;var a=1+n,i=(o=o.replace(".","")).length;return a<0?o="0."+c("0",Math.abs(a))+o:a>=i?o+=c("0",a-i):o=(o.substring(0,a)||"0")+"."+o.substring(a),e+o}(u),f=!0),"Infinity"===u&&f&&(u=""),f&&!r&&"number"==typeof o&&(u=function(t,e,r){if(-1!==["","-"].indexOf(t))return t;var o=-1!==t.indexOf(".")&&e,n=l(t),a=n.beforeDecimal,i=n.afterDecimal,s=n.hasNagation,u=parseFloat("0."+(i||"0")),c=(i.length<=e?"0."+i:u.toFixed(e)).split(".");return""+(s?"-":"")+a.split("").reverse().reduce((function(t,e,r){return t.length>r?(Number(t[0])+Number(e)).toString()+t.substring(1,t.length):e+t}),c[0])+(o?".":"")+p(c[1]||"",Math.min(e,i.length),r)}(u,o,n)),f?this.formatNumString(u):this.formatInput(u))},e.prototype.formatNegation=function(t){void 0===t&&(t="");var e=this.props.allowNegative,r=new RegExp("(-)"),o=new RegExp("(-)(.)*(-)"),n=r.test(t),a=o.test(t);return t=t.replace(/-/g,""),n&&!a&&e&&(t="-"+t),t},e.prototype.formatInput=function(t){return void 0===t&&(t=""),this.props.format||(t=this.removePrefixAndSuffix(t),t=this.formatNegation(t)),t=this.removeFormatting(t),this.formatNumString(t)},e.prototype.isCharacterAFormat=function(t,e){var r=this.props,o=r.format,n=r.prefix,a=r.suffix,i=r.decimalScale,s=r.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"==typeof o&&"#"!==o[t]||!(o||!(t<n.length||t>=e.length-a.length||i&&s&&e[t]===u))},e.prototype.correctInputValue=function(t,e,r){var o=this,n=this.props,a=n.format,i=n.allowNegative,s=n.prefix,u=n.suffix,p=n.decimalScale,c=this.getSeparators(),f=c.allowedDecimalSeparators,h=c.decimalSeparator,m=this.state.numAsString||"",g=this.selectionBeforeInput,d=g.selectionStart,v=g.selectionEnd,S=function(t,e){for(var r=0,o=0,n=t.length,a=e.length;t[r]===e[r]&&r<n;)r++;for(;t[n-1-o]===e[a-1-o]&&a-o>r&&n-o>r;)o++;return{start:r,end:n-o}}(e,r),y=S.start,x=S.end;if(!a&&y===x&&-1!==f.indexOf(r[d])){var b=0===p?"":h;return r.substr(0,d)+b+r.substr(d+1,r.length)}var w=a?0:s.length,N=e.length-(a?0:u.length);if(r.length>e.length||!r.length||y===x||0===d&&v===e.length||0===y&&x===e.length||d===w&&v===N)return r;var P=e.substr(y,x-y);if(!![].concat(P).find((function(t,r){return o.isCharacterAFormat(r+y,e)}))){var F=e.substr(y),D={},C=[];[].concat(F).forEach((function(t,r){o.isCharacterAFormat(r+y,e)?D[r]=t:r>P.length-1&&C.push(t)})),Object.keys(D).forEach((function(t){C.length>t?C.splice(t,0,D[t]):C.push(D[t])})),r=e.substr(0,y)+C.join("")}if(!a){var V=this.removeFormatting(r),A=l(V,i),E=A.beforeDecimal,O=A.afterDecimal,R=A.addNegation,j=t<r.indexOf(h)+1;if(V.length<m.length&&j&&""===E&&!parseFloat(O))return R?"-":""}return r},e.prototype.updateValue=function(t){var e=t.formattedValue,r=t.input,o=t.setCaretPosition;void 0===o&&(o=!0);var n=t.source,a=t.event,i=t.numAsString,s=t.caretPos,u=this.props.onValueChange,l=this.state.value;if(r){if(void 0===s&&o){var p=t.inputValue||r.value,c=m(r);r.value=e,s=this.getCaretPosition(p,e,c)}r.value=e,o&&this.setPatchedCaretPosition(r,s,e)}void 0===i&&(i=this.removeFormatting(e)),e!==l&&(this.setState({value:e,numAsString:i}),u(this.getValueObject(e,i),{event:a,source:n}))},e.prototype.onChange=function(t){var e=t.target,r=e.value,o=this.state,n=this.props,a=n.isAllowed,i=o.value||"",s=m(e);r=this.correctInputValue(s,i,r);var u=this.formatInput(r)||"",l=this.removeFormatting(u),p=a(this.getValueObject(u,l));p||(u=i),this.updateValue({formattedValue:u,numAsString:l,inputValue:r,input:e,event:t,source:"event"}),p&&n.onChange(t)},e.prototype.onBlur=function(t){var e=this.props,r=this.state,o=e.format,n=e.onBlur,a=e.allowLeadingZeros,i=r.numAsString,s=r.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout),!o){isNaN(parseFloat(i))&&(i=""),a||(i=function(t){if(!t)return t;var e="-"===t[0];e&&(t=t.substring(1,t.length));var r=t.split("."),o=r[0].replace(/^0+/,"")||"0",n=r[1]||"";return(e?"-":"")+o+(n?"."+n:"")}(i));var u=this.formatNumString(i);if(u!==s)return this.updateValue({formattedValue:u,numAsString:i,input:t.target,setCaretPosition:!1,event:t,source:"event"}),void n(t)}n(t)},e.prototype.onKeyDown=function(t){var e,r=t.target,o=t.key,n=r.selectionStart,a=r.selectionEnd,i=r.value;void 0===i&&(i="");var s=this.props,u=s.decimalScale,l=s.fixedDecimalScale,p=s.prefix,c=s.suffix,f=s.format,h=s.onKeyDown,m=void 0!==u&&l,g=this.getNumberRegex(!1,m),d=new RegExp("-"),v="string"==typeof f;if(this.selectionBeforeInput={selectionStart:n,selectionEnd:a},"ArrowLeft"===o||"Backspace"===o?e=n-1:"ArrowRight"===o?e=n+1:"Delete"===o&&(e=n),void 0!==e&&n===a){var S=e,y=v?f.indexOf("#"):p.length,x=v?f.lastIndexOf("#")+1:i.length-c.length;if("ArrowLeft"===o||"ArrowRight"===o){var b="ArrowLeft"===o?"left":"right";S=this.correctCaretPosition(i,e,b)}else if("Delete"!==o||g.test(i[e])||d.test(i[e])){if("Backspace"===o&&!g.test(i[e]))if(n<=y+1&&"-"===i[0]&&void 0===f){var w=i.substring(1);this.updateValue({formattedValue:w,caretPos:S,input:r,event:t,source:"event"})}else if(!d.test(i[e])){for(;!g.test(i[S-1])&&S>y;)S--;S=this.correctCaretPosition(i,S,"left")}}else for(;!g.test(i[S])&&S<x;)S++;(S!==e||e<y||e>x)&&(t.preventDefault(),this.setPatchedCaretPosition(r,S,i)),t.isUnitTestRun&&this.setPatchedCaretPosition(r,S,i),h(t)}else h(t)},e.prototype.onMouseUp=function(t){var e=t.target,r=e.selectionStart,o=e.selectionEnd,n=e.value;if(void 0===n&&(n=""),r===o){var a=this.correctCaretPosition(n,r);a!==r&&this.setPatchedCaretPosition(e,a,n)}this.props.onMouseUp(t)},e.prototype.onFocus=function(t){var e=this;t.persist(),this.focusedElm=t.target,this.focusTimeout=setTimeout((function(){var r=t.target,o=r.selectionStart,n=r.selectionEnd,a=r.value;void 0===a&&(a="");var i=e.correctCaretPosition(a,o);i===o||0===o&&n===a.length||e.setPatchedCaretPosition(r,i,a),e.props.onFocus(t)}),0)},e.prototype.render=function(){var t=this.props,e=t.type,r=t.displayType,o=t.customInput,a=t.renderText,i=t.getInputRef,s=t.format,u=(t.thousandSeparator,t.decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle,t.decimalScale,t.fixedDecimalScale,t.prefix,t.suffix,t.removeFormatting,t.mask,t.defaultValue,t.isNumericString,t.allowNegative,t.allowEmptyFormatting,t.allowLeadingZeros,t.onValueChange,t.isAllowed,t.customNumerals,t.onChange,t.onKeyDown,t.onMouseUp,t.onFocus,t.onBlur,t.value,function(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&-1===e.indexOf(o)&&(r[o]=t[o]);return r}(t,["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"])),l=this.state,p=l.value,c=l.mounted&&function(t){return t||"undefined"!=typeof navigator&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(s)?"numeric":void 0,f=Object.assign({inputMode:c},u,{type:e,value:p,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===r)return a?a(p,u)||null:n.a.createElement("span",Object.assign({},u,{ref:i}),p);if(o){var h=o;return n.a.createElement(h,Object.assign({},f,{ref:i}))}return n.a.createElement("input",Object.assign({},f,{ref:i}))},e}(n.a.Component);d.defaultProps=g,e.a=d}}]); products-table-style.js 0000644 00000024025 15154727601 0011203 0 ustar 00 (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[128],{164:function(t,n,r){"use strict";var e={globalLocale:"en-US",globalFormat:"$0,0.00",globalRoundingMode:"HALF_EVEN",globalFormatRoundingMode:"HALF_AWAY_FROM_ZERO",globalExchangeRatesApi:{endpoint:void 0,headers:void 0,propertyPath:void 0}};function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return u(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(t,n)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}var a={normalizePrecision:function(t){var n=t.reduce((function(t,n){return Math.max(t.getPrecision(),n.getPrecision())}));return t.map((function(t){return t.getPrecision()!==n?t.convertPrecision(n):t}))},minimum:function(t){var n=i(t),r=n[0],e=n.slice(1),o=r;return e.forEach((function(t){o=o.lessThan(t)?o:t})),o},maximum:function(t){var n=i(t),r=n[0],e=n.slice(1),o=r;return e.forEach((function(t){o=o.greaterThan(t)?o:t})),o}};function c(t){return!isNaN(parseInt(t))&&isFinite(t)}function s(t){return t%2==0}function l(t){return c(t)&&!Number.isInteger(t)}function f(t){return Math.abs(t)%1==.5}function h(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var r in n)t.setRequestHeader(r,n[r]);return t}function d(t){return void 0===t}function g(){var t=function(t,n){var r=function(t){return Math.pow(10,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=t.toString();if(n.indexOf("e-")>0)return parseInt(n.split("e-")[1]);var r=n.split(".")[1];return r?r.length:0}(t))},e=Math.max(r(t),r(n));return Math.round(t*e)*Math.round(n*e)/(e*e)},n={HALF_ODD:function(t){var n=Math.round(t);return f(t)&&s(n)?n-1:n},HALF_EVEN:function(t){var n=Math.round(t);return f(t)?s(n)?n:n-1:n},HALF_UP:function(t){return Math.round(t)},HALF_DOWN:function(t){return f(t)?Math.floor(t):Math.round(t)},HALF_TOWARDS_ZERO:function(t){return f(t)?Math.sign(t)*Math.floor(Math.abs(t)):Math.round(t)},HALF_AWAY_FROM_ZERO:function(t){return f(t)?Math.sign(t)*Math.ceil(Math.abs(t)):Math.round(t)},DOWN:function(t){return Math.floor(t)}};return{add:function(t,n){return t+n},subtract:function(t,n){return t-n},multiply:function(n,r){return l(n)||l(r)?t(n,r):n*r},divide:function(t,n){return t/n},modulo:function(t,n){return t%n},round:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"HALF_EVEN";return n[r](t)}}}var m=g();function p(t){var n=/^(?:(\$|USD)?0(?:(,)0)?(\.)?(0+)?|0(?:(,)0)?(\.)?(0+)?\s?(dollar)?)$/gm.exec(t);return{getMatches:function(){return null!==n?n.slice(1).filter((function(t){return!d(t)})):[]},getMinimumFractionDigits:function(){var t=function(t){return"."===t};return d(this.getMatches().find(t))?0:this.getMatches()[m.add(this.getMatches().findIndex(t),1)].split("").length},getCurrencyDisplay:function(){return{USD:"code",dollar:"name",$:"symbol"}[this.getMatches().find((function(t){return"USD"===t||"dollar"===t||"$"===t}))]},getStyle:function(){return d(this.getCurrencyDisplay(this.getMatches()))?"decimal":"currency"},getUseGrouping:function(){return!d(this.getMatches().find((function(t){return","===t})))}}}function v(t){var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;for(var r in n)t=t.replace("{{".concat(r,"}}"),n[r]);return t},r=function(r,e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(r,e){var o=Object.assign(new XMLHttpRequest,{onreadystatechange:function(){4===o.readyState&&(o.status>=200&&o.status<400?r(JSON.parse(o.responseText)):e(new Error(o.statusText)))},onerror:function(){e(new Error("Network error"))}});o.open("GET",t,!0),h(o,n.headers),o.send()}))}(n(t.endpoint,{from:r,to:e}),{headers:t.headers})};return{getExchangeRate:function(e,i){return(u=t.endpoint,!Boolean(u)||"object"!==o(u)&&"function"!=typeof u||"function"!=typeof u.then?r(e,i):t.endpoint).then((function(r){return function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",e={};return Object.entries(n).forEach((function(n){if("object"===o(n[1])){var i=t(n[1]);Object.entries(i).forEach((function(t){e[n[0]+r+t[0]]=t[1]}))}else e[n[0]]=n[1]})),e}(r)[n(t.propertyPath,{from:e,to:i})]}));var u}}}function y(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Error;if(!t)throw new r(n)}function b(t){y(function(t){return c(t)&&t<=100&&t>=0}(t),"You must provide a numeric value between 0 and 100.",RangeError)}function A(t){y(Number.isInteger(t),"You must provide an integer.",TypeError)}var M=g(),O=Object.assign((function t(n){var r=Object.assign({},{amount:t.defaultAmount,currency:t.defaultCurrency,precision:t.defaultPrecision},n),e=r.amount,o=r.currency,i=r.precision;A(e),A(i);var u=t.globalLocale,a=t.globalFormat,c=t.globalRoundingMode,s=t.globalFormatRoundingMode,l=Object.assign({},t.globalExchangeRatesApi),f=function(n){var r=Object.assign({},Object.assign({},{amount:e,currency:o,precision:i},n),Object.assign({},{locale:this.locale},n));return Object.assign(t({amount:r.amount,currency:r.currency,precision:r.precision}),{locale:r.locale})},h=function(t){y(this.hasSameCurrency(t),"You must provide a Dinero instance with the same currency.",TypeError)};return{getAmount:function(){return e},getCurrency:function(){return o},getLocale:function(){return this.locale||u},setLocale:function(t){return f.call(this,{locale:t})},getPrecision:function(){return i},convertPrecision:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;A(t);var r=this.getPrecision(),e=t>r,o=e?M.multiply:M.divide,i=e?[t,r]:[r,t],u=Math.pow(10,M.subtract.apply(M,i));return f.call(this,{amount:M.round(o(this.getAmount(),u),n),precision:t})},add:function(n){h.call(this,n);var r=t.normalizePrecision([this,n]);return f.call(this,{amount:M.add(r[0].getAmount(),r[1].getAmount()),precision:r[0].getPrecision()})},subtract:function(n){h.call(this,n);var r=t.normalizePrecision([this,n]);return f.call(this,{amount:M.subtract(r[0].getAmount(),r[1].getAmount()),precision:r[0].getPrecision()})},multiply:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return f.call(this,{amount:M.round(M.multiply(this.getAmount(),t),n)})},divide:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return f.call(this,{amount:M.round(M.divide(this.getAmount(),t),n)})},percentage:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return b(t),this.multiply(M.divide(t,100),n)},allocate:function(t){var n=this;!function(t){y(function(t){return t.length>0&&t.every((function(t){return t>=0}))&&t.some((function(t){return t>0}))}(t),"You must provide a non-empty array of numeric values greater than 0.",TypeError)}(t);for(var r=t.reduce((function(t,n){return M.add(t,n)})),e=this.getAmount(),o=t.map((function(t){var o=Math.floor(M.divide(M.multiply(n.getAmount(),t),r));return e=M.subtract(e,o),f.call(n,{amount:o})})),i=0;e>0;)t[i]>0&&(o[i]=o[i].add(f.call(this,{amount:1})),e=M.subtract(e,1)),i+=1;return o},convert:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=r.endpoint,o=void 0===e?l.endpoint:e,i=r.propertyPath,u=void 0===i?l.propertyPath||"rates.{{to}}":i,a=r.headers,s=void 0===a?l.headers:a,h=r.roundingMode,g=void 0===h?c:h,m=Object.assign({},{endpoint:o,propertyPath:u,headers:s,roundingMode:g});return v(m).getExchangeRate(this.getCurrency(),t).then((function(r){return y(!d(r),'No rate was found for the destination currency "'.concat(t,'".'),TypeError),f.call(n,{amount:M.round(M.multiply(n.getAmount(),parseFloat(r)),m.roundingMode),currency:t})}))},equalsTo:function(t){return this.hasSameAmount(t)&&this.hasSameCurrency(t)},lessThan:function(n){h.call(this,n);var r=t.normalizePrecision([this,n]);return r[0].getAmount()<r[1].getAmount()},lessThanOrEqual:function(n){h.call(this,n);var r=t.normalizePrecision([this,n]);return r[0].getAmount()<=r[1].getAmount()},greaterThan:function(n){h.call(this,n);var r=t.normalizePrecision([this,n]);return r[0].getAmount()>r[1].getAmount()},greaterThanOrEqual:function(n){h.call(this,n);var r=t.normalizePrecision([this,n]);return r[0].getAmount()>=r[1].getAmount()},isZero:function(){return 0===this.getAmount()},isPositive:function(){return this.getAmount()>=0},isNegative:function(){return this.getAmount()<0},hasSubUnits:function(){return 0!==M.modulo(this.getAmount(),Math.pow(10,i))},hasCents:function(){return 0!==M.modulo(this.getAmount(),Math.pow(10,i))},hasSameCurrency:function(t){return this.getCurrency()===t.getCurrency()},hasSameAmount:function(n){var r=t.normalizePrecision([this,n]);return r[0].getAmount()===r[1].getAmount()},toFormat:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,r=p(t);return this.toRoundedUnit(r.getMinimumFractionDigits(),n).toLocaleString(this.getLocale(),{currencyDisplay:r.getCurrencyDisplay(),useGrouping:r.getUseGrouping(),minimumFractionDigits:r.getMinimumFractionDigits(),style:r.getStyle(),currency:this.getCurrency()})},toUnit:function(){return M.divide(this.getAmount(),Math.pow(10,i))},toRoundedUnit:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,r=Math.pow(10,t);return M.divide(M.round(M.multiply(this.toUnit(),r),n),r)},toObject:function(){return{amount:e,currency:o,precision:i}},toJSON:function(){return this.toObject()}}}),{defaultAmount:0,defaultCurrency:"USD",defaultPrecision:2},e,a);n.a=O}}]);