{"version":3,"sources":["../../node_modules/tslib/tslib.es6.js","../../src/app/components/inputnumber/inputnumber.ts"],"names":["Object","create","__read","o","n","m","Symbol","iterator","r","e","i","call","ar","next","done","push","value","error","INPUTNUMBER_VALUE_ACCESSOR","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","InputNumber","multi","el","cd","this","showButtons","format","buttonLayout","incrementButtonIcon","decrementButtonIcon","step","onInput","EventEmitter","onFocus","onBlur","onKeyDown","onModelChange","onModelTouched","groupChar","prefixChar","suffixChar","_modeOption","_useGroupingOption","defineProperty","prototype","_localeOption","localeOption","updateConstructParser","_localeMatcherOption","localeMatcherOption","modeOption","_currencyOption","currencyOption","_currencyDisplayOption","currencyDisplayOption","useGroupingOption","_minFractionDigitsOption","minFractionDigitsOption","_maxFractionDigitsOption","maxFractionDigitsOption","_prefixOption","prefixOption","_suffixOption","suffixOption","ngOnInit","constructParser","initialized","getOptions","localeMatcher","style","mode","currency","currencyDisplay","useGrouping","minimumFractionDigits","minFractionDigits","maximumFractionDigits","maxFractionDigits","numberFormat","Intl","NumberFormat","locale","numerals","arguments","length","concat","__spread","reverse","index","Map","map","d","_numeral","RegExp","join","_decimal","getDecimalExpression","_group","getGroupingExpression","_minusSign","getMinusSignExpression","_currency","getCurrencyExpression","_suffix","getSuffixExpression","_prefix","getPrefixExpression","_index","get","escapeRegExp","text","replace","formatter","trim","charAt","prefix","split","suffix","formatValue","formattedValue","toString","parseValue","filteredText","parsedValue","isNaN","repeat","event","interval","dir","_this","clearTimer","timer","setTimeout","spin","currentValue","input","nativeElement","newValue","validateValue","maxlength","updateInput","updateModel","handleOnInput","onUpButtonMouseDown","focus","preventDefault","onUpButtonMouseUp","onUpButtonMouseLeave","onUpButtonKeyDown","keyCode","onUpButtonKeyUp","onDownButtonMouseDown","onDownButtonMouseUp","onDownButtonMouseLeave","onDownButtonKeyUp","onDownButtonKeyDown","onUserInput","isSpecialChar","target","lastValue","onInputKeyDown","shiftKey","altKey","selectionStart","selectionEnd","inputValue","newValueStr","which","isNumeralChar","setAttribute","deleteChar","decimalCharIndex","search","lastIndex","test","slice","setSelectionRange","updateValue","deleteRange","emit","onInputKeyPress","code","char","String","fromCharCode","isDecimalSign","isMinusSign","insert","onPaste","data","clipboardData","window","getData","filteredData","sign","minusCharIndex","insertText","resolvedOptions","operation","start","end","initCursor","valueLength","onInputClick","resetRegex","valueStr","insertedValueStr","isValueChanged","originalEvent","min","max","currentLength","newLength","startValue","startExpr","sRegex","tExpr","tRegex","prevChar","nextChar","diff","isGroupChar","onInputFocus","focused","onInputBlur","writeValue","markForCheck","registerOnChange","fn","registerOnTouched","setDisabledState","val","disabled","clearInterval","Component","args","selector","template","changeDetection","ChangeDetectionStrategy","OnPush","providers","encapsulation","ViewEncapsulation","None","host","[class.p-inputwrapper-filled]","[class.p-inputwrapper-focus]","ElementRef","ChangeDetectorRef","Input","ViewChild","Output","NgModule","imports","CommonModule","InputTextModule","ButtonModule","exports","declarations"],"mappings":";;;;;;;;;;;;;;oFAyG6BA,OAAOC,gBAwBpBC,EAAOC,EAAGC,GACtB,IAAIC,EAAsB,mBAAXC,QAAyBH,EAAEG,OAAOC,UACjD,IAAKF,EAAG,OAAOF,EACf,IAAmBK,EAAYC,EAA3BC,EAAIL,EAAEM,KAAKR,GAAOS,EAAK,GAC3B,IACI,WAAc,IAANR,GAAgBA,KAAM,MAAQI,EAAIE,EAAEG,QAAQC,MAAMF,EAAGG,KAAKP,EAAEQ,OAExE,MAAOC,GAASR,EAAI,CAAEQ,MAAOA,WAEzB,IACQT,IAAMA,EAAEM,OAAST,EAAIK,EAAU,SAAIL,EAAEM,KAAKD,WAExC,GAAID,EAAG,MAAMA,EAAEQ,OAE7B,OAAOL,EAoDcZ,OAAOC,WC5LnBiB,EAAkC,CAC3CC,QAASC,EAAAA,kBACTC,YAAaC,EAAAA,YAAW,WAAM,OAAAC,KAC9BC,OAAO,gBAwPP,SAAAD,EAAmBE,EAAwBC,GAAxBC,KAAAF,GAAAA,EAAwBE,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A,2BASAA,EAAAA,iCASAA,EAAAA,iCASAA,EAAAA,sBASAA,EAAAA,sBASAA,EAAAA,eAouBL,iCALCG,EAAAA,SAAQlB,KAAA,CAAC,CACNmB,QAAS,CAACC,EAAAA,aAAaC,EAAAA,gBAAiBC,EAAAA,cACxCC,QAAS,CAAC9O,GACV+O,aAAc,CAAC/O","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","\nimport {NgModule,Component,ChangeDetectionStrategy, Input, ElementRef, ViewChild, OnInit, EventEmitter, Output, forwardRef, ViewEncapsulation, ChangeDetectorRef} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {InputTextModule} from 'primeng/inputtext';\nimport { ButtonModule } from 'primeng/button';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\n\nexport const INPUTNUMBER_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InputNumber),\n multi: true\n};\n@Component({\n selector: 'p-inputNumber',\n template: `\n \n \n \n \n \n \n \n \n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [INPUTNUMBER_VALUE_ACCESSOR],\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./inputnumber.css'],\n host: {\n '[class.p-inputwrapper-filled]': 'filled',\n '[class.p-inputwrapper-focus]': 'focused'\n }\n})\nexport class InputNumber implements OnInit,ControlValueAccessor {\n\n @Input() showButtons: boolean = false;\n\n @Input() format: boolean = true;\n\n @Input() buttonLayout: string = \"stacked\";\n\n @Input() disabled: boolean;\n\n @Input() inputId: string;\n\n @Input() styleClass: string;\n\n @Input() style: any;\n\n @Input() placeholder: string;\n\n @Input() size: number;\n\n @Input() maxlength: number;\n\n @Input() tabindex: string;\n\n @Input() title: string;\n\n @Input() ariaLabel: string;\n\n @Input() ariaRequired: boolean;\n\n @Input() name: string;\n\n @Input() required: boolean;\n\n @Input() autocomplete: string;\n\n @Input() min: number;\n\n @Input() max: number;\n\n @Input() incrementButtonClass: string;\n\n @Input() decrementButtonClass: string;\n\n @Input() incrementButtonIcon: string = 'pi pi-angle-up';\n\n @Input() decrementButtonIcon: string = 'pi pi-angle-down';\n\n @Input() step: number = 1;\n\n @Input() inputStyle: any;\n\n @Input() inputStyleClass: string;\n\n @ViewChild('input') input: ElementRef;\n\n @Output() onInput: EventEmitter = new EventEmitter();\n\n @Output() onFocus: EventEmitter = new EventEmitter();\n\n @Output() onBlur: EventEmitter = new EventEmitter();\n\n @Output() onKeyDown: EventEmitter = new EventEmitter();\n\n value: number;\n\n onModelChange: Function = () => {};\n\n onModelTouched: Function = () => {};\n\n focused: boolean;\n\n initialized: boolean;\n\n groupChar: string = '';\n\n prefixChar: string = '';\n\n suffixChar: string = '';\n\n isSpecialChar: boolean;\n\n timer: any;\n\n lastValue: string;\n\n _numeral: any;\n\n numberFormat: any;\n\n _decimal: any;\n\n _group: any;\n\n _minusSign: any;\n\n _currency: any;\n\n _prefix: any;\n\n _suffix: any;\n\n _index: any;\n\n _localeOption: string;\n\n _localeMatcherOption: string;\n\n _modeOption: string = \"decimal\";\n\n _currencyOption: string;\n\n _currencyDisplayOption: string;\n\n _useGroupingOption: boolean = true;\n\n _minFractionDigitsOption: number;\n\n _maxFractionDigitsOption: number;\n\n _prefixOption: string;\n\n _suffixOption: string;\n\n @Input() get locale(): string {\n return this._localeOption;\n }\n\n set locale(localeOption: string) {\n this._localeOption = localeOption;\n this.updateConstructParser();\n }\n\n @Input() get localeMatcher(): string {\n return this._localeMatcherOption;\n }\n\n set localeMatcher(localeMatcherOption: string) {\n this._localeMatcherOption = localeMatcherOption;\n this.updateConstructParser();\n }\n\n @Input() get mode(): string {\n return this._modeOption;\n }\n\n set mode(modeOption: string) {\n this._modeOption = modeOption;\n this.updateConstructParser();\n }\n\n @Input() get currency(): string {\n return this._currencyOption;\n }\n\n set currency(currencyOption: string) {\n this._currencyOption = currencyOption;\n this.updateConstructParser();\n }\n\n @Input() get currencyDisplay(): string {\n return this._currencyDisplayOption;\n }\n\n set currencyDisplay(currencyDisplayOption: string) {\n this._currencyDisplayOption = currencyDisplayOption;\n this.updateConstructParser();\n }\n\n @Input() get useGrouping(): boolean {\n return this._useGroupingOption;\n }\n\n set useGrouping(useGroupingOption: boolean) {\n this._useGroupingOption = useGroupingOption;\n this.updateConstructParser();\n }\n\n @Input() get minFractionDigits(): number {\n return this._minFractionDigitsOption;\n }\n\n set minFractionDigits(minFractionDigitsOption: number) {\n this._minFractionDigitsOption = minFractionDigitsOption;\n this.updateConstructParser();\n }\n\n @Input() get maxFractionDigits(): number {\n return this._maxFractionDigitsOption;\n }\n\n set maxFractionDigits(maxFractionDigitsOption: number) {\n this._maxFractionDigitsOption = maxFractionDigitsOption;\n this.updateConstructParser();\n }\n\n @Input() get prefix(): string {\n return this._prefixOption;\n }\n\n set prefix(prefixOption: string) {\n this._prefixOption = prefixOption;\n this.updateConstructParser();\n }\n\n @Input() get suffix(): string {\n return this._suffixOption;\n }\n\n set suffix(suffixOption: string) {\n this._suffixOption = suffixOption;\n this.updateConstructParser();\n }\n\n constructor(public el: ElementRef, private cd: ChangeDetectorRef) { }\n\n ngOnInit() {\n this.constructParser();\n\n this.initialized = true;\n }\n\n getOptions() {\n return {\n localeMatcher: this.localeMatcher,\n style: this.mode,\n currency: this.currency,\n currencyDisplay: this.currencyDisplay,\n useGrouping: this.useGrouping,\n minimumFractionDigits: this.minFractionDigits,\n maximumFractionDigits: this.maxFractionDigits\n };\n }\n\n constructParser() {\n this.numberFormat = new Intl.NumberFormat(this.locale, this.getOptions());\n const numerals = [...new Intl.NumberFormat(this.locale, {useGrouping: false}).format(9876543210)].reverse();\n const index = new Map(numerals.map((d, i) => [d, i]));\n this._numeral = new RegExp(`[${numerals.join('')}]`, 'g');\n this._decimal = this.getDecimalExpression();\n this._group = this.getGroupingExpression();\n this._minusSign = this.getMinusSignExpression();\n this._currency = this.getCurrencyExpression();\n this._suffix = this.getSuffixExpression();\n this._prefix = this.getPrefixExpression();\n this._index = d => index.get(d);\n }\n\n updateConstructParser() {\n if (this.initialized) {\n this.constructParser();\n }\n }\n\n escapeRegExp(text) {\n return text.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n }\n\n getDecimalExpression() {\n const formatter = new Intl.NumberFormat(this.locale, {useGrouping: false});\n return new RegExp(`[${formatter.format(1.1).trim().replace(this._numeral, '')}]`, 'g');\n }\n\n getGroupingExpression() {\n const formatter = new Intl.NumberFormat(this.locale, {useGrouping: true});\n this.groupChar = formatter.format(1000000).trim().replace(this._numeral, '').charAt(0);\n return new RegExp(`[${this.groupChar}]`, 'g');\n }\n\n getMinusSignExpression() {\n const formatter = new Intl.NumberFormat(this.locale, {useGrouping: false});\n return new RegExp(`[${formatter.format(-1).trim().replace(this._numeral, '')}]`, 'g');\n }\n\n getCurrencyExpression() {\n if (this.currency) {\n const formatter = new Intl.NumberFormat(this.locale, {style: 'currency', currency: this.currency, currencyDisplay: this.currencyDisplay});\n return new RegExp(`[${formatter.format(1).replace(/\\s/g, '').replace(this._numeral, '').replace(this._decimal, '').replace(this._group, '')}]`, 'g');\n }\n\n return new RegExp(`[]`,'g');\n }\n\n getPrefixExpression() {\n if (this.prefix) {\n this.prefixChar = this.prefix;\n }\n else {\n const formatter = new Intl.NumberFormat(this.locale, {style: this.mode, currency: this.currency, currencyDisplay: this.currencyDisplay});\n this.prefixChar = formatter.format(1).split('1')[0];\n }\n\n return new RegExp(`${this.escapeRegExp(this.prefixChar||'')}`, 'g');\n }\n\n getSuffixExpression() {\n if (this.suffix) {\n this.suffixChar = this.suffix;\n }\n else {\n const formatter = new Intl.NumberFormat(this.locale, {style: this.mode, currency: this.currency, currencyDisplay: this.currencyDisplay,\n minimumFractionDigits: 0, maximumFractionDigits: 0});\n this.suffixChar = formatter.format(1).split('1')[1];\n }\n\n return new RegExp(`${this.escapeRegExp(this.suffixChar||'')}`, 'g');\n }\n\n formatValue(value) {\n if (value != null) {\n if (value === '-') { // Minus sign\n return value;\n }\n\n if (this.format) {\n let formatter = new Intl.NumberFormat(this.locale, this.getOptions());\n let formattedValue = formatter.format(value);\n if (this.prefix) {\n formattedValue = this.prefix + formattedValue;\n }\n\n if (this.suffix) {\n formattedValue = formattedValue + this.suffix;\n }\n\n return formattedValue;\n }\n\n return value.toString();\n }\n\n return '';\n }\n\n parseValue(text) {\n let filteredText = text\n .replace(this._suffix, '')\n .replace(this._prefix, '')\n .trim()\n .replace(/\\s/g, '')\n .replace(this._currency, '')\n .replace(this._group, '')\n .replace(this._minusSign, '-')\n .replace(this._decimal, '.')\n .replace(this._numeral, this._index);\n\n if (filteredText) {\n if (filteredText === '-') // Minus sign\n return filteredText;\n\n let parsedValue = +filteredText;\n return isNaN(parsedValue) ? null : parsedValue;\n }\n\n return null;\n }\n\n repeat(event, interval, dir) {\n let i = interval || 500;\n\n this.clearTimer();\n this.timer = setTimeout(() => {\n this.repeat(event, 40, dir);\n }, i);\n\n this.spin(event, dir);\n }\n\n spin(event, dir) {\n let step = this.step * dir;\n let currentValue = this.parseValue(this.input.nativeElement.value) || 0;\n let newValue = this.validateValue(currentValue + step);\n if (this.maxlength && this.maxlength < this.formatValue(newValue).length) {\n return;\n }\n\n this.updateInput(newValue, null, 'spin');\n this.updateModel(event, newValue);\n\n this.handleOnInput(event, currentValue, newValue);\n }\n\n onUpButtonMouseDown(event) {\n this.input.nativeElement.focus();\n this.repeat(event, null, 1);\n event.preventDefault();\n }\n\n onUpButtonMouseUp() {\n this.clearTimer();\n }\n\n onUpButtonMouseLeave() {\n this.clearTimer();\n }\n\n onUpButtonKeyDown(event) {\n if (event.keyCode === 32 || event.keyCode === 13) {\n this.repeat(event, null, 1);\n }\n }\n\n onUpButtonKeyUp() {\n this.clearTimer();\n }\n\n onDownButtonMouseDown(event) {\n this.input.nativeElement.focus();\n this.repeat(event, null, -1);\n event.preventDefault();\n }\n\n onDownButtonMouseUp() {\n this.clearTimer();\n }\n\n onDownButtonMouseLeave() {\n this.clearTimer();\n }\n\n onDownButtonKeyUp() {\n this.clearTimer();\n }\n\n onDownButtonKeyDown(event) {\n if (event.keyCode === 32 || event.keyCode === 13) {\n this.repeat(event, null, -1);\n }\n }\n\n onUserInput(event) {\n if (this.isSpecialChar) {\n event.target.value = this.lastValue;\n }\n this.isSpecialChar = false;\n }\n\n onInputKeyDown(event) {\n this.lastValue = event.target.value;\n if (event.shiftKey || event.altKey) {\n this.isSpecialChar = true;\n return;\n }\n\n let selectionStart = event.target.selectionStart;\n let selectionEnd = event.target.selectionEnd;\n let inputValue = event.target.value;\n let newValueStr = null;\n\n if (event.altKey) {\n event.preventDefault();\n }\n\n switch (event.which) {\n //up\n case 38:\n this.spin(event, 1);\n event.preventDefault();\n break;\n\n //down\n case 40:\n this.spin(event, -1);\n event.preventDefault();\n break;\n\n //left\n case 37:\n if (!this.isNumeralChar(inputValue.charAt(selectionStart - 1))) {\n event.preventDefault();\n }\n break;\n\n //right\n case 39:\n if (!this.isNumeralChar(inputValue.charAt(selectionStart))) {\n event.preventDefault();\n }\n break;\n\n //enter\n case 13:\n let newValue = this.validateValue(this.parseValue(this.input.nativeElement.value));\n this.input.nativeElement.value = this.formatValue(newValue);\n this.input.nativeElement.setAttribute('aria-valuenow', newValue);\n this.updateModel(event, newValue);\n break;\n\n //backspace\n case 8: {\n event.preventDefault();\n\n if (selectionStart === selectionEnd) {\n let deleteChar = inputValue.charAt(selectionStart - 1);\n let decimalCharIndex = inputValue.search(this._decimal);\n this._decimal.lastIndex = 0;\n\n if (this.isNumeralChar(deleteChar)) {\n if (this._group.test(deleteChar)) {\n this._group.lastIndex = 0;\n newValueStr = inputValue.slice(0, selectionStart - 2) + inputValue.slice(selectionStart - 1);\n }\n else if (this._decimal.test(deleteChar)) {\n this._decimal.lastIndex = 0;\n this.input.nativeElement.setSelectionRange(selectionStart - 1, selectionStart - 1);\n }\n else if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {\n newValueStr = inputValue.slice(0, selectionStart - 1) + '0' + inputValue.slice(selectionStart);\n }\n else if (decimalCharIndex > 0 && decimalCharIndex === 1) {\n newValueStr = inputValue.slice(0, selectionStart - 1) + '0' + inputValue.slice(selectionStart);\n newValueStr = this.parseValue(newValueStr) > 0 ? newValueStr : '';\n }\n else {\n newValueStr = inputValue.slice(0, selectionStart - 1) + inputValue.slice(selectionStart);\n }\n }\n\n this.updateValue(event, newValueStr, null, 'delete-single');\n }\n else {\n newValueStr = this.deleteRange(inputValue, selectionStart, selectionEnd);\n this.updateValue(event, newValueStr, null, 'delete-range');\n }\n\n break;\n }\n\n // del\n case 46:\n event.preventDefault();\n\n if (selectionStart === selectionEnd) {\n let deleteChar = inputValue.charAt(selectionStart);\n let decimalCharIndex = inputValue.search(this._decimal);\n this._decimal.lastIndex = 0;\n\n if (this.isNumeralChar(deleteChar)) {\n if (this._group.test(deleteChar)) {\n this._group.lastIndex = 0;\n newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 2);\n }\n else if (this._decimal.test(deleteChar)) {\n this._decimal.lastIndex = 0;\n this.input.nativeElement.setSelectionRange(selectionStart + 1, selectionStart + 1);\n }\n else if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {\n newValueStr = inputValue.slice(0, selectionStart) + '0' + inputValue.slice(selectionStart + 1);\n }\n else if (decimalCharIndex > 0 && decimalCharIndex === 1) {\n newValueStr = inputValue.slice(0, selectionStart) + '0' + inputValue.slice(selectionStart + 1);\n newValueStr = this.parseValue(newValueStr) > 0 ? newValueStr : '';\n }\n else {\n newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 1);\n }\n }\n\n this.updateValue(event, newValueStr, null, 'delete-back-single');\n }\n else {\n newValueStr = this.deleteRange(inputValue, selectionStart, selectionEnd);\n this.updateValue(event, newValueStr, null, 'delete-range');\n }\n break;\n\n default:\n break;\n }\n\n this.onKeyDown.emit(event);\n }\n\n onInputKeyPress(event) {\n event.preventDefault();\n let code = event.which || event.keyCode;\n let char = String.fromCharCode(code);\n const isDecimalSign = this.isDecimalSign(char);\n const isMinusSign = this.isMinusSign(char);\n\n if ((48 <= code && code <= 57) || isMinusSign || isDecimalSign) {\n this.insert(event, char, { isDecimalSign, isMinusSign });\n }\n }\n\n onPaste(event) {\n event.preventDefault();\n let data = (event.clipboardData || window['clipboardData']).getData('Text');\n if (data) {\n let filteredData = this.parseValue(data);\n if (filteredData != null) {\n this.insert(event, filteredData.toString());\n }\n }\n }\n\n isMinusSign(char) {\n if (this._minusSign.test(char)) {\n this._minusSign.lastIndex = 0;\n return true;\n }\n\n return false;\n }\n\n isDecimalSign(char) {\n if (this._decimal.test(char)) {\n this._decimal.lastIndex = 0;\n return true;\n }\n\n return false;\n }\n\n insert(event, text, sign = { isDecimalSign: false, isMinusSign: false }) {\n let selectionStart = this.input.nativeElement.selectionStart;\n let selectionEnd = this.input.nativeElement.selectionEnd;\n let inputValue = this.input.nativeElement.value.trim();\n const decimalCharIndex = inputValue.search(this._decimal);\n this._decimal.lastIndex = 0;\n const minusCharIndex = inputValue.search(this._minusSign);\n this._minusSign.lastIndex = 0;\n let newValueStr;\n\n if (sign.isMinusSign) {\n if (selectionStart === 0) {\n newValueStr = inputValue;\n if (minusCharIndex === -1 || selectionEnd !== 0) {\n newValueStr = this.insertText(inputValue, text, 0, selectionEnd);\n }\n\n this.updateValue(event, newValueStr, text, 'insert');\n }\n }\n else if (sign.isDecimalSign) {\n if (decimalCharIndex > 0 && selectionStart === decimalCharIndex) {\n this.updateValue(event, inputValue, text, 'insert');\n }\n else if (decimalCharIndex > selectionStart && decimalCharIndex < selectionEnd) {\n newValueStr = this.insertText(inputValue, text, selectionStart, selectionEnd);\n this.updateValue(event, newValueStr, text, 'insert');\n }\n }\n else {\n const maxFractionDigits = this.numberFormat.resolvedOptions().maximumFractionDigits;\n const operation = selectionStart !== selectionEnd ? 'range-insert' : 'insert';\n\n if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {\n if ((selectionStart + text.length - (decimalCharIndex + 1)) <= maxFractionDigits) {\n newValueStr = inputValue.slice(0, selectionStart) + text + inputValue.slice(selectionStart + text.length);\n this.updateValue(event, newValueStr, text, operation);\n }\n }\n else {\n newValueStr = this.insertText(inputValue, text, selectionStart, selectionEnd);\n this.updateValue(event, newValueStr, text, operation);\n }\n }\n }\n\n insertText(value, text, start, end) {\n let textSplit = text.split('.');\n\n if (textSplit.length == 2) {\n const decimalCharIndex = value.slice(start, end).search(this._decimal);\n this._decimal.lastIndex = 0;\n return (decimalCharIndex > 0) ? value.slice(0, start) + this.formatValue(text) + value.slice(end) : (value || this.formatValue(text));\n }\n else if ((end - start) === value.length) {\n return this.formatValue(text);\n }\n else if (start === 0) {\n return text + value.slice(end);\n }\n else if (end === value.length) {\n return value.slice(0, start) + text;\n }\n else {\n return value.slice(0, start) + text + value.slice(end);\n }\n }\n\n deleteRange(value, start, end) {\n let newValueStr;\n\n if ((end - start) === value.length)\n newValueStr = '';\n else if (start === 0)\n newValueStr = value.slice(end);\n else if (end === value.length)\n newValueStr = value.slice(0, start);\n else\n newValueStr = value.slice(0, start) + value.slice(end);\n\n return newValueStr;\n }\n\n initCursor() {\n let selectionStart = this.input.nativeElement.selectionStart;\n let inputValue = this.input.nativeElement.value;\n let valueLength = inputValue.length;\n let index = null;\n\n let char = inputValue.charAt(selectionStart);\n if (this.isNumeralChar(char)) {\n return;\n }\n\n //left\n let i = selectionStart - 1;\n while (i >= 0) {\n char = inputValue.charAt(i);\n if (this.isNumeralChar(char)) {\n index = i;\n break;\n }\n else {\n i--;\n }\n }\n\n if (index !== null) {\n this.input.nativeElement.setSelectionRange(index + 1, index + 1);\n }\n else {\n i = selectionStart + 1;\n while (i < valueLength) {\n char = inputValue.charAt(i);\n if (this.isNumeralChar(char)) {\n index = i;\n break;\n }\n else {\n i++;\n }\n }\n\n if (index !== null) {\n this.input.nativeElement.setSelectionRange(index, index);\n }\n }\n }\n\n onInputClick() {\n this.initCursor();\n }\n\n isNumeralChar(char) {\n if (char.length === 1 && (this._numeral.test(char) || this._decimal.test(char) || this._group.test(char) || this._minusSign.test(char))) {\n this.resetRegex();\n return true;\n }\n\n return false;\n }\n\n resetRegex() {\n this._numeral.lastIndex = 0;\n this._decimal.lastIndex = 0;\n this._group.lastIndex = 0;\n this._minusSign.lastIndex = 0;\n }\n\n updateValue(event, valueStr, insertedValueStr, operation) {\n let currentValue = this.input.nativeElement.value;\n let newValue = null;\n\n if (valueStr != null) {\n newValue = this.parseValue(valueStr);\n this.updateInput(newValue, insertedValueStr, operation);\n }\n\n this.handleOnInput(event, currentValue, newValue);\n }\n\n handleOnInput(event, currentValue, newValue) {\n if (this.isValueChanged(currentValue, newValue)) {\n this.onInput.emit({ originalEvent: event, value: newValue });\n }\n }\n\n isValueChanged(currentValue, newValue) {\n if (newValue === null && currentValue !== null) {\n return true;\n }\n\n if (newValue != null) {\n let parsedCurrentValue = (typeof currentValue === 'string') ? this.parseValue(currentValue) : currentValue;\n return newValue !== parsedCurrentValue;\n }\n\n return false;\n }\n\n validateValue(value) {\n if (this.min !== null && value < this.min) {\n return this.min;\n }\n\n if (this.max !== null && value > this.max) {\n return this.max;\n }\n\n if (value === '-') { // Minus sign\n return null;\n }\n\n return value;\n }\n\n updateInput(value, insertedValueStr, operation) {\n insertedValueStr = insertedValueStr || '';\n\n let inputValue = this.input.nativeElement.value;\n let newValue = this.formatValue(value);\n let currentLength = inputValue.length;\n\n if (currentLength === 0) {\n this.input.nativeElement.value = newValue;\n this.input.nativeElement.setSelectionRange(0, 0);\n this.initCursor();\n const prefixLength = (this.prefixChar || '').length;\n const selectionEnd = prefixLength + insertedValueStr.length;\n this.input.nativeElement.setSelectionRange(selectionEnd, selectionEnd);\n }\n else {\n let selectionStart = this.input.nativeElement.selectionStart;\n let selectionEnd = this.input.nativeElement.selectionEnd;\n if (this.maxlength && this.maxlength < newValue.length) {\n return;\n }\n\n this.input.nativeElement.value = newValue;\n let newLength = newValue.length;\n\n if (operation === 'range-insert') {\n const startValue = this.parseValue((inputValue || '').slice(0, selectionStart));\n const startValueStr = startValue !== null ? startValue.toString() : '';\n const startExpr = startValueStr.split('').join(`(${this.groupChar})?`);\n const sRegex = new RegExp(startExpr, 'g');\n sRegex.test(newValue);\n\n const tExpr = insertedValueStr.split('').join(`(${this.groupChar})?`);\n const tRegex = new RegExp(tExpr, 'g');\n tRegex.test(newValue.slice(sRegex.lastIndex));\n\n selectionEnd = sRegex.lastIndex + tRegex.lastIndex;\n this.input.nativeElement.setSelectionRange(selectionEnd, selectionEnd);\n }\n else if (newLength === currentLength) {\n if (operation === 'insert' || operation === 'delete-back-single')\n this.input.nativeElement.setSelectionRange(selectionEnd + 1, selectionEnd + 1);\n else if (operation === 'delete-single')\n this.input.nativeElement.setSelectionRange(selectionEnd - 1, selectionEnd - 1);\n else if (operation === 'delete-range' || operation === 'spin')\n this.input.nativeElement.setSelectionRange(selectionEnd, selectionEnd);\n }\n else if (operation === 'delete-back-single') {\n let prevChar = inputValue.charAt(selectionEnd - 1);\n let nextChar = inputValue.charAt(selectionEnd);\n let diff = currentLength - newLength;\n let isGroupChar = this._group.test(nextChar);\n\n if (isGroupChar && diff === 1) {\n selectionEnd += 1;\n }\n else if (!isGroupChar && this.isNumeralChar(prevChar)) {\n selectionEnd += (-1 * diff) + 1;\n }\n\n this._group.lastIndex = 0;\n this.input.nativeElement.setSelectionRange(selectionEnd, selectionEnd);\n }\n else {\n selectionEnd = selectionEnd + (newLength - currentLength);\n this.input.nativeElement.setSelectionRange(selectionEnd, selectionEnd);\n }\n }\n\n this.input.nativeElement.setAttribute('aria-valuenow', value);\n }\n\n onInputFocus(event) {\n this.focused = true;\n this.onFocus.emit(event);\n }\n\n onInputBlur(event) {\n this.focused = false;\n\n let newValue = this.validateValue(this.parseValue(this.input.nativeElement.value));\n this.input.nativeElement.value = this.formatValue(newValue);\n this.input.nativeElement.setAttribute('aria-valuenow', newValue);\n this.updateModel(event, newValue);\n\n this.onBlur.emit(event);\n }\n\n formattedValue() {\n return this.formatValue(this.value);\n }\n\n updateModel(event, value) {\n if (this.value !== value) {\n this.value = value;\n this.onModelChange(value);\n }\n\n this.onModelTouched();\n }\n\n writeValue(value: any) : void {\n this.value = value;\n this.cd.markForCheck();\n }\n\n registerOnChange(fn: Function): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: Function): void {\n this.onModelTouched = fn;\n }\n\n setDisabledState(val: boolean): void {\n this.disabled = val;\n this.cd.markForCheck();\n }\n\n get filled() {\n return (this.value != null && this.value.toString().length > 0)\n }\n\n clearTimer() {\n if (this.timer) {\n clearInterval(this.timer);\n }\n }\n}\n\n@NgModule({\n imports: [CommonModule,InputTextModule, ButtonModule],\n exports: [InputNumber],\n declarations: [InputNumber]\n})\nexport class InputNumberModule { }\n"]}