????

Your IP : 18.217.237.153


Current Path : C:/inetpub/vhost/lantha.gdtsolutions.vn/wwwtest/wwwroot/static/js/
Upload File :
Current File : C:/inetpub/vhost/lantha.gdtsolutions.vn/wwwtest/wwwroot/static/js/8025.062b1922.chunk.js

"use strict";(self.webpackChunkgdt=self.webpackChunkgdt||[]).push([[8025],{15255:(t,e,r)=>{var n;r.d(e,{A:()=>c});var a=new Uint8Array(16);function o(){if(!n&&!(n="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(a)}const i=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const u=function(t){return"string"===typeof t&&i.test(t)};for(var s=[],l=0;l<256;++l)s.push((l+256).toString(16).substr(1));const f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(s[t[e+0]]+s[t[e+1]]+s[t[e+2]]+s[t[e+3]]+"-"+s[t[e+4]]+s[t[e+5]]+"-"+s[t[e+6]]+s[t[e+7]]+"-"+s[t[e+8]]+s[t[e+9]]+"-"+s[t[e+10]]+s[t[e+11]]+s[t[e+12]]+s[t[e+13]]+s[t[e+14]]+s[t[e+15]]).toLowerCase();if(!u(r))throw TypeError("Stringified UUID is invalid");return r};const c=function(t,e,r){var n=(t=t||{}).random||(t.rng||o)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var a=0;a<16;++a)e[r+a]=n[a];return e}return f(n)}},86803:(t,e,r)=>{var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=s(r(11942)),i=s(r(9950)),u=r(87527);function s(t){return t&&t.__esModule?t:{default:t}}var l={thousandSeparator:o.default.oneOfType([o.default.string,o.default.oneOf([!0])]),thousandSpacing:o.default.oneOf(["2","2s","3","4"]),decimalSeparator:o.default.string,decimalScale:o.default.number,fixedDecimalScale:o.default.bool,displayType:o.default.oneOf(["input","text"]),prefix:o.default.string,suffix:o.default.string,format:o.default.oneOfType([o.default.string,o.default.func]),removeFormatting:o.default.func,mask:o.default.oneOfType([o.default.string,o.default.arrayOf(o.default.string)]),value:o.default.oneOfType([o.default.number,o.default.string]),isNumericString:o.default.bool,customInput:o.default.func,allowNegative:o.default.bool,onValueChange:o.default.func,onKeyDown:o.default.func,onMouseUp:o.default.func,onChange:o.default.func,onFocus:o.default.func,onBlur:o.default.func,type:o.default.oneOf(["text","tel"]),isAllowed:o.default.func,renderText:o.default.func},f={displayType:"input",decimalSeparator:".",thousandSpacing:"3",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,isNumericString:!1,type:"text",onValueChange:u.noop,onChange:u.noop,onKeyDown:u.noop,onMouseUp:u.noop,onFocus:u.noop,onBlur:u.noop,isAllowed:u.returnTrue},c=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));r.validateProps();var n=r.formatValueProp();return r.state={value:n,numAsString:r.removeFormatting(n)},r.onChange=r.onChange.bind(r),r.onKeyDown=r.onKeyDown.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r.onFocus=r.onFocus.bind(r),r.onBlur=r.onBlur.bind(r),r}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),a(e,[{key:"componentDidUpdate",value:function(t){this.updateValueIfRequired(t)}},{key:"updateValueIfRequired",value:function(t){var e=this.props,r=this.state;if(t!==e){this.validateProps();var n=r.value,a=r.numAsString||"",o=void 0===e.value?this.formatNumString(a):this.formatValueProp();o!==n&&this.setState({value:o,numAsString:this.removeFormatting(o)})}}},{key:"getFloatString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=this.getSeparators().decimalSeparator,r=this.getNumberRegex(!0),n="-"===t[0];n&&(t=t.replace("-",""));var a=(t=(t.match(r)||[]).join("").replace(e,".")).indexOf(".");return-1!==a&&(t=t.substring(0,a)+"."+t.substring(a+1,t.length).replace(new RegExp((0,u.escapeRegExp)(e),"g"),"")),n&&(t="-"+t),t}},{key:"getNumberRegex",value:function(t,e){var r=this.props,n=r.format,a=r.decimalScale,o=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!o||0===a||e||n?"":"|"+(0,u.escapeRegExp)(o)),t?"g":void 0)}},{key:"getSeparators",value:function(){var t=this.props,e=t.decimalSeparator,r=t.thousandSpacing,n=this.props.thousandSeparator;return!0===n&&(n=","),{decimalSeparator:e,thousandSeparator:n,thousandSpacing:r}}},{key:"getMaskAtIndex",value:function(t){var e=this.props.mask,r=void 0===e?" ":e;return"string"===typeof r?r:r[t]||" "}},{key:"validateProps",value:function(){var t=this.props.mask,e=this.getSeparators(),r=e.decimalSeparator,n=e.thousandSeparator;if(r===n)throw new Error("\n          Decimal separator can't be same as thousand separator.\n\n          thousandSeparator: "+n+' (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        ")}},{key:"splitDecimal",value:function(t){var e=this.props.allowNegative,r="-"===t[0],n=r&&e,a=(t=t.replace("-","")).split(".");return{beforeDecimal:a[0],afterDecimal:a[1]||"",hasNagation:r,addNegation:n}}},{key:"setPatchedCaretPosition",value:function(t,e,r){(0,u.setCaretPosition)(t,e),setTimeout((function(){t.value===r&&(0,u.setCaretPosition)(t,e)}),0)}},{key:"correctCaretPosition",value:function(t,e,r){var n=this.props,a=n.prefix,o=n.suffix,i=n.format;if(!i){var s="-"===t[0];return Math.min(Math.max(e,a.length+(s?1:0)),t.length-o.length)}if("function"===typeof i)return e;if("#"===i[e]&&(0,u.charIsNumber)(t[e]))return e;if("#"===i[e-1]&&(0,u.charIsNumber)(t[e-1]))return e;var l=i.indexOf("#"),f=i.lastIndexOf("#");e=Math.min(Math.max(e,l),f+1);for(var c=i.substring(e,i.length).indexOf("#"),p=e,h=e+(-1===c?0:c);p>l&&("#"!==i[p]||!(0,u.charIsNumber)(t[p]));)p-=1;return!(0,u.charIsNumber)(t[h])||"left"===r&&e!==l||e-p<h-e?p+1:h}},{key:"getCaretPosition",value:function(t,e,r){var n=this.props.format,a=this.state.value,o=this.getNumberRegex(!0),i=(t.match(o)||[]).join(""),u=(e.match(o)||[]).join(""),s=void 0,l=void 0;for(s=0,l=0;l<r;l++){var f=t[l]||"",c=e[s]||"";if((f.match(o)||f===c)&&("0"!==f||!c.match(o)||"0"===c||i.length===u.length)){for(;f!==e[s]&&s<e.length;)s++;s++}}return"string"!==typeof n||a||(s=e.length),s=this.correctCaretPosition(e,s)}},{key:"removePrefixAndSuffix",value:function(t){var e=this.props,r=e.format,n=e.prefix,a=e.suffix;if(!r&&t){var o="-"===t[0];o&&(t=t.substring(1,t.length));var i=(t=n&&0===t.indexOf(n)?t.substring(n.length,t.length):t).lastIndexOf(a);t=a&&-1!==i&&i===t.length-a.length?t.substring(0,i):t,o&&(t="-"+t)}return t}},{key:"removePatternFormatting",value:function(t){for(var e=this.props.format.split("#").filter((function(t){return""!==t})),r=0,n="",a=0,o=e.length;a<=o;a++){var i=e[a]||"",u=a===o?t.length:t.indexOf(i,r);if(-1===u){n=t;break}n+=t.substring(r,u),r=u+i.length}return(n.match(/\d/g)||[]).join("")}},{key:"removeFormatting",value:function(t){var e=this.props,r=e.format,n=e.removeFormatting;return t?(r?t="string"===typeof r?this.removePatternFormatting(t):"function"===typeof n?n(t):(t.match(/\d/g)||[]).join(""):(t=this.removePrefixAndSuffix(t),t=this.getFloatString(t)),t):t}},{key:"formatWithPattern",value:function(t){for(var e=this.props.format,r=0,n=e.split(""),a=0,o=e.length;a<o;a++)"#"===e[a]&&(n[a]=t[r]||this.getMaskAtIndex(r),r+=1);return n.join("")}},{key:"formatThousand",value:function(t,e,r){var n=void 0;switch(r){case u.thousandGroupSpacing.two:n=/(\d)(?=(\d{2})+(?!\d))/g;break;case u.thousandGroupSpacing.twoScaled:n=/(\d)(?=(((\d{2})+)(\d{1})(?!\d)))/g;break;case u.thousandGroupSpacing.four:n=/(\d)(?=(\d{4})+(?!\d))/g;break;default:n=/(\d)(?=(\d{3})+(?!\d))/g}return t.replace(n,"$1"+e)}},{key:"formatAsNumber",value:function(t){var e=this.props,r=e.decimalScale,n=e.fixedDecimalScale,a=e.prefix,o=e.suffix,i=this.getSeparators(),s=i.thousandSeparator,l=i.decimalSeparator,f=i.thousandSpacing,c=-1!==t.indexOf(".")||r&&n,p=this.splitDecimal(t),h=p.beforeDecimal,d=p.afterDecimal,g=p.addNegation;return void 0!==r&&(d=(0,u.limitToScale)(d,r,n)),s&&(h=this.formatThousand(h,s,f)),a&&(h=a+h),o&&(d+=o),g&&(h="-"+h),t=h+(c&&l||"")+d}},{key:"formatNumString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=this.props.format,r=t;return""===t?r="":"-"!==t||e?r="string"===typeof e?this.formatWithPattern(r):"function"===typeof e?e(r):this.formatAsNumber(r):(r="-",t=""),r}},{key:"formatValueProp",value:function(){var t=this.props,e=t.format,r=t.decimalScale,n=t.fixedDecimalScale,a=this.props,o=a.value,i=a.isNumericString;return void 0===o?"":("number"===typeof o&&(o=o.toString(),i=!0),i&&!e&&"number"===typeof r&&(o=(0,u.roundToPrecision)(o,r,n)),i?this.formatNumString(o):this.formatInput(o))}},{key:"formatNegation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=this.props.allowNegative,r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(t),o=n.test(t);return t=t.replace(/-/g,""),a&&!o&&e&&(t="-"+t),t}},{key:"formatInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.props.format||(t=this.formatNegation(t)),t=this.removeFormatting(t),this.formatNumString(t)}},{key:"isCharacterAFormat",value:function(t,e){var r=this.props,n=r.format,a=r.prefix,o=r.suffix,i=r.decimalScale,u=r.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"===typeof n&&"#"!==n[t]||!(n||!(t<a.length||t>=e.length-o.length||i&&u&&e[t]===s))}},{key:"checkIfFormatGotDeleted",value:function(t,e,r){for(var n=t;n<e;n++)if(this.isCharacterAFormat(n,r))return!0;return!1}},{key:"correctInputValue",value:function(t,e,r){var n=this.props.format,a=this.state.numAsString||"";if(r.length>=e.length||!r.length)return r;var o=t,i=(0,u.splitString)(e,t),s=(0,u.splitString)(r,t),l=i[1].lastIndexOf(s[1]),f=o+(-1!==l?i[1].substring(0,l):"").length;if(this.checkIfFormatGotDeleted(o,f,e)&&(r=e),!n){var c=this.removeFormatting(r),p=this.splitDecimal(c),h=p.beforeDecimal,d=p.afterDecimal,g=p.addNegation;if(c.length<a.length&&""===h&&!parseFloat(d))return g?"-":""}return r}},{key:"onChange",value:function(t){t.persist();var e=t.target,r=e.value,n=this.state,a=this.props,o=a.isAllowed,i=n.value||"",u=Math.max(e.selectionStart,e.selectionEnd);r=this.correctInputValue(u,i,r);var s=this.formatInput(r)||"",l=this.removeFormatting(s),f={formattedValue:s,value:l,floatValue:parseFloat(l)};o(f)||(s=i),e.value=s;var c=this.getCaretPosition(r,s,u);this.setPatchedCaretPosition(e,c,s),s!==i?this.setState({value:s,numAsString:l},(function(){a.onValueChange(f),a.onChange(t)})):a.onChange(t)}},{key:"onBlur",value:function(t){var e=this.props,r=this.state,n=e.format,a=e.onBlur,o=r.numAsString,i=r.value;if(!n){o=(0,u.fixLeadingZero)(o);var s=this.formatNumString(o),l={formattedValue:s,value:o,floatValue:parseFloat(o)};if(s!==i)return t.persist(),void this.setState({value:s,numAsString:o},(function(){e.onValueChange(l),a(t)}))}a(t)}},{key:"onKeyDown",value:function(t){var e=t.target,r=t.key,n=e.selectionEnd,a=e.value,o=e.selectionStart,i=void 0,u=this.props,s=u.decimalScale,l=u.fixedDecimalScale,f=u.prefix,c=u.suffix,p=u.format,h=u.onKeyDown,d=void 0!==s&&l,g=this.getNumberRegex(!1,d),m=new RegExp("-"),v="string"===typeof p;if("ArrowLeft"===r||"Backspace"===r?i=o-1:"ArrowRight"===r?i=o+1:"Delete"===r&&(i=o),void 0!==i&&o===n){var y=i,S=v?p.indexOf("#"):f.length,b=v?p.lastIndexOf("#")+1:a.length-c.length;if("ArrowLeft"===r||"ArrowRight"===r){var x="ArrowLeft"===r?"left":"right";y=this.correctCaretPosition(a,i,x)}else if("Delete"!==r||g.test(a[i])||m.test(a[i])){if("Backspace"===r&&!g.test(a[i])&&!m.test(a[i])){for(;!g.test(a[y-1])&&y>S;)y--;y=this.correctCaretPosition(a,y,"left")}}else for(;!g.test(a[y])&&y<b;)y++;(y!==i||i<S||i>b)&&(t.preventDefault(),this.setPatchedCaretPosition(e,y,a)),t.isUnitTestRun&&this.setPatchedCaretPosition(e,y,a),this.props.onKeyDown(t)}else h(t)}},{key:"onMouseUp",value:function(t){var e=t.target,r=e.selectionStart,n=e.selectionEnd,a=e.value;if(r===n){var o=this.correctCaretPosition(a,r);o!==r&&this.setPatchedCaretPosition(e,o,a)}this.props.onMouseUp(t)}},{key:"onFocus",value:function(t){var e=this;t.persist(),setTimeout((function(){var r=t.target,n=r.selectionStart,a=r.value,o=e.correctCaretPosition(a,n);o!==n&&e.setPatchedCaretPosition(r,o,a),e.props.onFocus(t)}))}},{key:"render",value:function(){var t=this.props,e=t.type,r=t.displayType,a=t.customInput,o=t.renderText,s=this.state.value,f=(0,u.omit)(this.props,l),c=n({},f,{type:e,value:s,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===r)return o?o(s)||null:i.default.createElement("span",f,s);if(a){var p=a;return i.default.createElement(p,c)}return i.default.createElement("input",c)}}]),e}(i.default.Component);c.propTypes=l,c.defaultProps=f,t.exports=c},87527:(t,e)=>{function r(t,e,r){for(var n="",a=r?"0":"",o=0;o<=e-1;o++)n+=t[o]||a;return n}Object.defineProperty(e,"__esModule",{value:!0}),e.noop=function(){},e.returnTrue=function(){return!0},e.charIsNumber=function(t){return!!(t||"").match(/\d/)},e.escapeRegExp=function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},e.fixLeadingZero=function(t){if(!t)return t;var e="-"===t[0];e&&(t=t.substring(1,t.length));var r=t.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(e?"-":"")+n+(a?"."+a:"")},e.splitString=function(t,e){return[t.substring(0,e),t.substring(e)]},e.limitToScale=r,e.roundToPrecision=function(t,e,n){var a=t.split("."),o=parseFloat("0."+(a[1]||"0")).toFixed(e).split("."),i=a[0].split("").reverse().reduce((function(t,e,r){return t.length>r?(Number(t[0])+Number(e)).toString()+t.substring(1,t.length):e+t}),o[0]),u=r(o[1]||"",(a[1]||"").length,n);return i+(u?"."+u:"")},e.omit=function(t,e){var r={};return Object.keys(t).forEach((function(n){e[n]||(r[n]=t[n])})),r},e.setCaretPosition=function(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)}};e.thousandGroupSpacing={two:"2",twoScaled:"2s",three:"3",four:"4"}}}]);