(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[7],{"6AVX":function(e,t,r){"use strict";var n=r("MX0m"),a=r.n(n),o=r("q1tI"),i=r.n(o),s=(r("YFqc"),r("aZ9c")),u=r("4gQ6"),l=i.a.createElement;t.a=Object(u.a)((function(e){var t=e.product,r=e.brand,n=e.cover,o=e.altImage,u=e.imageTitle,c=e.description,f=e.price;return l(i.a.Fragment,null,l("div",{className:"jsx-189506316 card__product"},l("div",{className:"jsx-189506316 card__product-area"},l("span",null!==n?{style:{backgroundImage:"url(".concat(n,")")},role:"img","aria-label":o,title:u,className:"jsx-189506316 row row-figure"}:{className:"jsx-189506316 row"}),l("div",{className:"jsx-189506316 row row-content"},l("h3",{className:"jsx-189506316 title"},r," ",t),l("span",{dangerouslySetInnerHTML:{__html:"".concat(c)},className:"jsx-189506316 description"}),l("span",{className:"jsx-189506316 price"},"\u0e23\u0e32\u0e04\u0e32 ",l(s.a,{value:f,displayType:"text",thousandSeparator:!0})," \u0e1a\u0e32\u0e17")))),l(a.a,{id:"189506316"},[".card__product.jsx-189506316{background:#fff;display:block;width:100%;position:relative;overflow:hidden;border-radius:2px;-webkit-backface-visibility:hidden;}",".card__product-area.jsx-189506316{height:480px;display:grid;grid-template-columns:1fr;grid-template-rows:1fr 140px;box-sizing:border-box;padding:20px;}",".card__product-area.jsx-189506316 .row.jsx-189506316{position:relative;}",".card__product-area.jsx-189506316 .row-figure.jsx-189506316{display:block;background-position:center;background-size:80%;background-repeat:no-repeat;}",".card__product-area.jsx-189506316 .row-content.jsx-189506316{text-align:center;}",".row-content.jsx-189506316 .title.jsx-189506316{display:block;height:24px;font-weight:400;font-size:21px;line-height:1.22em;font-family:'Kanit',sans-serif;margin-bottom:20px;overflow:hidden;}",".row-content.jsx-189506316 .description.jsx-189506316{display:block;margin-bottom:20px;height:42px;overflow:hidden;}",".row-content.jsx-189506316 .price.jsx-189506316{font-size:15px;font-weight:500;line-height:1.22em;font-family:'Kanit',sans-serif;margin-bottom:20px;color:#666;}"]))}))},aZ9c:function(e,t,r){"use strict";var n=r("q1tI"),a=r.n(n);function o(e,t){for(var r=0;r1&&void 0!==arguments[1])||arguments[1],r="-"===e[0],n=r&&t,a=(e=e.replace("-","")).split("."),o=a[0],i=a[1]||"";return{beforeDecimal:o,afterDecimal:i,hasNagation:r,addNegation:n}}function v(e,t,r){for(var n="",a=r?"0":"",o=0;o<=t-1;o++)n+=e[o]||a;return n}function y(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 x(e,t,r){return Math.min(Math.max(e,t),r)}function b(e){return Math.max(e.selectionStart,e.selectionEnd)}var S={thousandSeparator:p.oneOfType([p.string,p.oneOf([!0])]),decimalSeparator:p.string,allowedDecimalSeparators:p.arrayOf(p.string),thousandsGroupStyle:p.oneOf(["thousand","lakh","wan"]),decimalScale:p.number,fixedDecimalScale:p.bool,displayType:p.oneOf(["input","text"]),prefix:p.string,suffix:p.string,format:p.oneOfType([p.string,p.func]),removeFormatting:p.func,mask:p.oneOfType([p.string,p.arrayOf(p.string)]),value:p.oneOfType([p.number,p.string]),defaultValue:p.oneOfType([p.number,p.string]),isNumericString:p.bool,customInput:p.elementType,allowNegative:p.bool,allowEmptyFormatting:p.bool,allowLeadingZeros:p.bool,onValueChange:p.func,onKeyDown:p.func,onMouseUp:p.func,onChange:p.func,onFocus:p.func,onBlur:p.func,type:p.oneOf(["text","tel","password"]),isAllowed:p.func,renderText:p.func,getInputRef:p.oneOfType([p.func,p.shape({current:p.any})])},w={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:h,onChange:h,onKeyDown:h,onMouseUp:h,onFocus:h,onBlur:h,isAllowed:function(){return!0}},k=function(e){function t(e){var r,n,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,r=!(a=s(t).call(this,e))||"object"!==typeof a&&"function"!==typeof a?l(n):a;var o=e.defaultValue;r.validateProps();var i=r.formatValueProp(o);return r.state={value:i,numAsString:r.removeFormatting(i)},r.selectionBeforeInput={selectionStart:0,selectionEnd:0},r.onChange=r.onChange.bind(l(r)),r.onKeyDown=r.onKeyDown.bind(l(r)),r.onMouseUp=r.onMouseUp.bind(l(r)),r.onFocus=r.onFocus.bind(l(r)),r.onBlur=r.onBlur.bind(l(r)),r}var r,n,c;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,e),r=t,(n=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,r=this.state,n=this.focusedElm,a=r.value,o=r.numAsString,i=void 0===o?"":o;if(e!==t){this.validateProps();var s=this.formatNumString(i),u=void 0===t.value?s:this.formatValueProp(),l=this.removeFormatting(u),c=parseFloat(l),f=parseFloat(i);(isNaN(c)&&isNaN(f)||c===f)&&s===a&&(null!==n||u===a)||this.updateValue({formattedValue:u,numAsString:l,input:n})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,r=this.getSeparators(),n=r.decimalSeparator,a=this.getNumberRegex(!0),o="-"===e[0];o&&(e=e.replace("-","")),n&&0===t&&(e=e.split(n)[0]);var i=(e=(e.match(a)||[]).join("").replace(n,".")).indexOf(".");return-1!==i&&(e="".concat(e.substring(0,i),".").concat(e.substring(i+1,e.length).replace(new RegExp(g(n),"g"),""))),o&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var r=this.props,n=r.format,a=r.decimalScale,o=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!o||0===a||t||n?"":"|"+g(o)),e?"g":void 0)}},{key:"getSeparators",value: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}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,r=void 0===t?" ":t;return"string"===typeof r?r:r[e]||" "}},{key:"getValueObject",value:function(e,t){var r=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(r)?void 0:r}}},{key:"validateProps",value: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: ".concat(n,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(r," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,r){y(e,t),setTimeout((function(){e.value===r&&y(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,r){var n=this.props,a=n.prefix,o=n.suffix,i=n.format;if(""===e)return 0;if(t=x(t,0,e.length),!i){var s="-"===e[0];return x(t,a.length+(s?1:0),e.length-o.length)}if("function"===typeof i)return t;if("#"===i[t]&&d(e[t]))return t;if("#"===i[t-1]&&d(e[t-1]))return t;var u=i.indexOf("#");t=x(t,u,i.lastIndexOf("#")+1);for(var l=i.substring(t,i.length).indexOf("#"),c=t,f=t+(-1===l?0:l);c>u&&("#"!==i[c]||!d(e[c]));)c-=1;return!d(e[f])||"left"===r&&t!==u||t-c0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,r=t.format,n=t.allowEmptyFormatting,a=e;return a=""!==e||n?"-"!==e||r?"string"===typeof r?this.formatWithPattern(a):"function"===typeof r?r(a):this.formatAsNumber(a):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,r=t.format,n=t.decimalScale,a=t.fixedDecimalScale,o=t.allowEmptyFormatting,i=this.props,s=i.value,u=void 0===s?e:s,l=i.isNumericString,c=!u&&0!==u;return c&&o&&(u=""),c&&!o?"":("number"===typeof u&&(u=u.toString(),l=!0),"Infinity"===u&&l&&(u=""),l&&!r&&"number"===typeof n&&(u=function(e,t,r){if(-1!==["","-"].indexOf(e))return e;var n=-1!==e.indexOf(".")&&t,a=m(e),o=a.beforeDecimal,i=a.afterDecimal,s=a.hasNagation,u=parseFloat("0.".concat(i||"0")).toFixed(t).split("."),l=o.split("").reverse().reduce((function(e,t,r){return e.length>r?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0]),c=v(u[1]||"",Math.min(t,i.length),r),f=n?".":"";return"".concat(s?"-":"").concat(l).concat(f).concat(c)}(u,n,a)),l?this.formatNumString(u):this.formatInput(u))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),o=n.test(e);return e=e.replace(/-/g,""),a&&!o&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var r=this.props,n=r.format,a=r.prefix,o=r.suffix,i=r.decimalScale,s=r.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"===typeof n&&"#"!==n[e]||!(n||!(e=t.length-o.length||i&&s&&t[e]===u))}},{key:"checkIfFormatGotDeleted",value:function(e,t,r){for(var n=e;nr&&a-n>r;)n++;return{start:r,end:a-n}}(t,r),y=v.start,x=v.end;if(!a&&y===x&&-1!==c.indexOf(r[d])){var b=0===u?"":f;return r.substr(0,d)+b+r.substr(d+1,r.length)}var S=a?0:i.length,w=t.length-(a?0:s.length);if(r.length>t.length||!r.length||y===x||0===d&&g===t.length||d===S&&g===w)return r;if(this.checkIfFormatGotDeleted(y,x,t)&&(r=t),!a){var k=this.removeFormatting(r),O=m(k,o),P=O.beforeDecimal,N=O.afterDecimal,j=O.addNegation,F=eb;)x--;x=this.correctCaretPosition(s,x,"left")}}else for(;!m.test(s[x])&&xS)&&(e.preventDefault(),this.setPatchedCaretPosition(r,x,s)),e.isUnitTestRun&&this.setPatchedCaretPosition(r,x,s),d(e)}else d(e)}},{key:"onMouseUp",value:function(e){var t=e.target,r=t.selectionStart,n=t.selectionEnd,a=t.value,o=void 0===a?"":a;if(r===n){var i=this.correctCaretPosition(o,r);i!==r&&this.setPatchedCaretPosition(t,i,o)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var r=e.target,n=r.selectionStart,a=r.selectionEnd,o=r.value,i=void 0===o?"":o,s=t.correctCaretPosition(i,n);s===n||0===n&&a===i.length||t.setPatchedCaretPosition(r,s,i),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e=this.props,t=e.type,r=e.displayType,n=e.customInput,o=e.renderText,s=e.getInputRef,u=this.state.value,l=function(e,t){var r={};return Object.keys(e).forEach((function(n){t[n]||(r[n]=e[n])})),r}(this.props,S),c=i({inputMode:"numeric"},l,{type:t,value:u,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===r)return o?o(u)||null:a.a.createElement("span",i({},l,{ref:s}),u);if(n){var f=n;return a.a.createElement(f,i({},c,{ref:s}))}return a.a.createElement("input",i({},c,{ref:s}))}}])&&o(r.prototype,n),c&&o(r,c),t}(a.a.Component);k.propTypes=S,k.defaultProps=w,t.a=k}}]);