1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9086],{69086:(t,e,r)=>{r.d(e,{A:()=>m});var o=r(14232);function a(){}function n(t){return!!(t||"").match(/\d/)}function i(t){return t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function s(t,e){void 0===e&&(e=!0);var r="-"===t[0],o=r&&e,a=(t=t.replace("-","")).split(".");return{beforeDecimal:a[0],afterDecimal:a[1]||"",hasNagation:r,addNegation:o}}function u(t,e,r){for(var o="",a=r?"0":"",n=0;n<=e-1;n++)o+=t[n]||a;return o}function l(t,e){return Array(e+1).join(t)}function p(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 c(t,e,r){return Math.min(Math.max(t,e),r)}function f(t){return Math.max(t.selectionStart,t.selectionEnd)}var h=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,a=r.value,n=r.numAsString;if(void 0===n&&(n=""),t!==e){this.validateProps();var i=this.formatNumString(n),s=null==e.value?i:this.formatValueProp(),u=this.removeFormatting(s),l=parseFloat(u),p=parseFloat(n);(isNaN(l)&&isNaN(p)||l===p)&&i===a&&(null!==o||s===a)||this.updateValue({formattedValue:s,numAsString:u,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),a="-"===t[0];a&&(t=t.replace("-","")),r&&0===e&&(t=t.split(r)[0]);var n=(t=(t.match(o)||[]).join("").replace(r,".")).indexOf(".");return -1!==n&&(t=t.substring(0,n)+"."+t.substring(n+1,t.length).replace(RegExp(i(r),"g"),"")),a&&(t="-"+t),t},e.prototype.getNumberRegex=function(t,e){var r=this.props,o=r.format,a=r.decimalScale,n=r.customNumerals,s=this.getSeparators().decimalSeparator;return RegExp("[0-9"+(n?n.join(""):"")+"]"+(!s||0===a||e||o?"":"|"+i(s)),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 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 Error("\n Mask "+t+" should not contain numeric character;\n ")},e.prototype.setPatchedCaretPosition=function(t,e,r){p(t,e),this.caretPositionTimeout=setTimeout(function(){t.value===r&&p(t,e)},0)},e.prototype.correctCaretPosition=function(t,e,r){var o=this.props,a=o.prefix,i=o.suffix,s=o.format;if(""===t)return 0;if(e=c(e,0,t.length),!s){var u="-"===t[0];return c(e,a.length+ +!!u,t.length-i.length)}if("function"==typeof s||"#"===s[e]&&n(t[e])||"#"===s[e-1]&&n(t[e-1]))return e;var l=s.indexOf("#");e=c(e,l,s.lastIndexOf("#")+1);for(var p=s.substring(e,s.length).indexOf("#"),f=e,h=e+(-1===p?0:p);f>l&&("#"!==s[f]||!n(t[f]));)f-=1;
1return!n(t[h])||"left"===r&&e!==l||e-f<h-e?n(t[f])?f+1:f:h},e.prototype.getCaretPosition=function(t,e,r){var o,a,n=this.props.format,i=this.state.value,s=this.getNumberRegex(!0),u=(t.match(s)||[]).join(""),l=(e.match(s)||[]).join("");for(a=0,o=0;a<r;a++){var p=t[a]||"",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 n||i||(o=e.length),o=this.correctCaretPosition(e,o)},e.prototype.removePrefixAndSuffix=function(t){var e=this.props,r=e.format,o=e.prefix,a=e.suffix;if(!r&&t){var n="-"===t[0];n&&(t=t.substring(1,t.length));var i=(t=o&&0===t.indexOf(o)?t.substring(o.length,t.length):t).lastIndexOf(a);t=a&&-1!==i&&i===t.length-a.length?t.substring(0,i):t,n&&(t="-"+t)}return t},e.prototype.removePatternFormatting=function(t){for(var e=this.props.format.split("#").filter(function(t){return""!==t}),r=0,o="",a=0,n=e.length;a<=n;a++){var i=e[a]||"",s=a===n?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},e.prototype.formatWithPattern=function(t){for(var e=this.props.format,r=0,o=e.split(""),a=0,n=e.length;a<n;a++)"#"===e[a]&&(o[a]=t[r]||this.getMaskAtIndex(r),r+=1);return o.join("")},e.prototype.formatAsNumber=function(t){var e,r,o,a=this.props,n=a.decimalScale,i=a.fixedDecimalScale,l=a.prefix,p=a.suffix,c=a.allowNegative,f=a.thousandsGroupStyle,h=this.getSeparators(),m=h.thousandSeparator,g=h.decimalSeparator,d=-1!==t.indexOf(".")||n&&i,v=s(t,c),S=v.beforeDecimal,y=v.afterDecimal,x=v.addNegation;return void 0!==n&&(y=u(y,n,i)),m&&(e=S,r=function(t){switch(t){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}}(f),o=-1===(o=e.search(/[1-9]/))?e.length:o,S=e.substring(0,o)+e.substring(o,e.length).replace(r,"$1"+m)),l&&(S=l+S),p&&(y+=p),x&&(S="-"+S),t=S+(d&&g||"")+y},e.prototype.formatNumString=function(t){void 0===t&&(t="");var e=this.props,r=e.format,o=e.allowEmptyFormatting,a=e.customNumerals,n=t;if(a&&10===a.length){var i=RegExp("["+a.join("")+"]","g");n=t.replace(i,function(t){return a.indexOf(t).toString()})}return""!==t||o?"-"!==t||r?"string"==typeof r?this.formatWithPattern(n):"function"==typeof r?r(n):this.formatAsNumber(n):"-":""},e.prototype.formatValueProp=function(t){var e=this.props,r=e.format,o=e.decimalScale,a=e.fixedDecimalScale,n=e.allowEmptyFormatting,i=this.props,p=i.value,c=i.isNumericString,f=!(p=null==p?t:p)&&0!==p;return(f&&n&&(p=""),f&&!n)?"":("number"==typeof p&&(p=function(t){var e="-"===(t+="")[0]?"-":"";e&&(t=t.substring(1));var r=t.split(/[eE]/g),o=r[0],a=r[1];if(!(a=Number(a)))return e+o;o=o.replace(".","");var n=1+a,i=o.length;return n<0?o="0."+l("0",Math.abs(n))+o:n>=i?o+=l("0",n-i):o=(o.substring(0,n)||"0")+"."+o.substring(n),e+o}(p),c=!0),"Infinity"===p&&c&&(p=""),c&&!r&&"number"==typeof o&&(p=function(t,e,r){if(-1!==["","-"].indexOf(t))return t;var o=-1!==t.indexOf(".")&&e,a=s(t),n=a.beforeDecimal,i=a.afterDecimal,l=a.hasNagation,p=parseFloat("0."+(i||"0")),c=(i.length<=e?"0."+i:p.toFixed(e)).split(".");return(l?"-":"")+n.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?".":"")+u(c[1]||"",Math.min(e,i.length),r)}(p,o,a)),c?this.formatNumString(p):this.formatInput(p))},e.prototype.formatNegation=function(t){void 0===t&&(t="");var e=this.props.allowNegative,r=RegExp("(-)(.)*(-)"),o=/(-)/.test(t),a=r.test(t);return t=t.replace(/-/g,""),o&&!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,a=r.prefix,n=r.suffix,i=r.decimalScale,s=r.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"==typeof o&&"#"!==o[t]||!o&&(!!(t<a.length)||!!(t>=e.length-n.length)||!!i&&!!s&&e[t]===u)},e.prototype.correctInputValue=function(t,e,r){var o=this,a=this.props,n=a.format,i=a.allowNegative,u=a.prefix,l=a.suffix,p=a.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,a=t.length,n=e.length;t[r]===e[r]&&r<a;)r++;for(;t[a-1-o]===e[n-1-o]&&n-o>r&&a-o>r;)o++;return{start:r,end:a-o}}(e,r),y=S.start,x=S.end;if(!n&&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 N=n?0:u.length,w=e.length-(n?0:l.length);if(r.length>e.length||!r.length||y===x||0===d&&v===e.length||0===y&&x===e.length||d===N&&v===w)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),C={},D=[];
1[].concat(F).forEach(function(t,r){o.isCharacterAFormat(r+y,e)?C[r]=t:r>P.length-1&&D.push(t)}),Object.keys(C).forEach(function(t){D.length>t?D.splice(t,0,C[t]):D.push(C[t])}),r=e.substr(0,y)+D.join("")}if(!n){var V=this.removeFormatting(r),A=s(V,i),E=A.beforeDecimal,O=A.afterDecimal,j=A.addNegation,I=t<r.indexOf(h)+1;if(V.length<m.length&&I&&""===E&&!parseFloat(O))return j?"-":""}return r},e.prototype.updateValue=function(t){var e=t.formattedValue,r=t.input,o=t.setCaretPosition;void 0===o&&(o=!0);var a=t.source,n=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=f(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:n,source:a}))},e.prototype.onChange=function(t){var e=t.target,r=e.value,o=this.state,a=this.props,n=a.isAllowed,i=o.value||"",s=f(e);r=this.correctInputValue(s,i,r);var u=this.formatInput(r)||"",l=this.removeFormatting(u),p=n(this.getValueObject(u,l));p||(u=i),this.updateValue({formattedValue:u,numAsString:l,inputValue:r,input:e,event:t,source:"event"}),p&&a.onChange(t)},e.prototype.onBlur=function(t){var e=this.props,r=this.state,o=e.format,a=e.onBlur,n=e.allowLeadingZeros,i=r.numAsString,s=r.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout),!o){isNaN(parseFloat(i))&&(i=""),n||(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",a=r[1]||"";return(e?"-":"")+o+(a?"."+a:"")}(i));var u=this.formatNumString(i);if(u!==s){this.updateValue({formattedValue:u,numAsString:i,input:t.target,setCaretPosition:!1,event:t,source:"event"}),a(t);return}}a(t)},e.prototype.onKeyDown=function(t){var e,r=t.target,o=t.key,a=r.selectionStart,n=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=this.getNumberRegex(!1,void 0!==u&&l),g=/-/,d="string"==typeof f;if(this.selectionBeforeInput={selectionStart:a,selectionEnd:n},"ArrowLeft"===o||"Backspace"===o?e=a-1:"ArrowRight"===o?e=a+1:"Delete"===o&&(e=a),void 0===e||a!==n)return void h(t);var v=e,S=d?f.indexOf("#"):p.length,y=d?f.lastIndexOf("#")+1:i.length-c.length;if("ArrowLeft"===o||"ArrowRight"===o)v=this.correctCaretPosition(i,e,"ArrowLeft"===o?"left":"right");else if("Delete"!==o||m.test(i[e])||g.test(i[e])){if("Backspace"===o&&!m.test(i[e])){if(a<=S+1&&"-"===i[0]&&void 0===f){var x=i.substring(1);this.updateValue({formattedValue:x,caretPos:v,input:r,event:t,source:"event"})}else if(!g.test(i[e])){for(;!m.test(i[v-1])&&v>S;)v--;v=this.correctCaretPosition(i,v,"left")}}}else for(;!m.test(i[v])&&v<y;)v++;(v!==e||e<S||e>y)&&(t.preventDefault(),this.setPatchedCaretPosition(r,v,i)),t.isUnitTestRun&&this.setPatchedCaretPosition(r,v,i),h(t)},e.prototype.onMouseUp=function(t){var e=t.target,r=e.selectionStart,o=e.selectionEnd,a=e.value;if(void 0===a&&(a=""),r===o){var n=this.correctCaretPosition(a,r);n!==r&&this.setPatchedCaretPosition(e,n,a)}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,a=r.selectionEnd,n=r.value;void 0===n&&(n="");var i=e.correctCaretPosition(n,o);i!==o&&(0!==o||a!==n.length)&&e.setPatchedCaretPosition(r,i,n),e.props.onFocus(t)},0)},e.prototype.render=function(){var t=this.props,e=t.type,r=t.displayType,a=t.customInput,n=t.renderText,i=t.getInputRef,s=t.format;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;var u=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","thous
1andSeparator","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=Object.assign({inputMode:l.mounted&&(s||"u">typeof navigator&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform)))?"numeric":void 0},u,{type:e,value:p,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});return"text"===r?n?n(p,u)||null:o.createElement("span",Object.assign({},u,{ref:i}),p):a?o.createElement(a,Object.assign({},c,{ref:i})):o.createElement("input",Object.assign({},c,{ref:i}))},e}(o.Component);h.defaultProps={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}};let m=h}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.