1 line
75 KiB
JSON
1 line
75 KiB
JSON
{"ast":null,"code":"import React, { createRef, Component } from 'react';\nimport { DomHandler, classNames } from 'primereact/utils';\nimport { InputText } from 'primereact/inputtext';\nimport { tip } from 'primereact/tooltip';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar InputMask = /*#__PURE__*/function (_Component) {\n _inherits(InputMask, _Component);\n\n var _super = _createSuper(InputMask);\n\n function InputMask(props) {\n var _this;\n\n _classCallCheck(this, InputMask);\n\n _this = _super.call(this, props);\n _this.onFocus = _this.onFocus.bind(_assertThisInitialized(_this));\n _this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this));\n _this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this));\n _this.onKeyPress = _this.onKeyPress.bind(_assertThisInitialized(_this));\n _this.onInput = _this.onInput.bind(_assertThisInitialized(_this));\n _this.handleInputChange = _this.handleInputChange.bind(_assertThisInitialized(_this));\n _this.inputRef = /*#__PURE__*/createRef(_this.props.inputRef);\n return _this;\n }\n\n _createClass(InputMask, [{\n key: \"caret\",\n value: function caret(first, last) {\n var range, begin, end;\n var inputEl = this.inputRef && this.inputRef.current;\n\n if (!inputEl || !inputEl.offsetParent || inputEl !== document.activeElement) {\n return;\n }\n\n if (typeof first === 'number') {\n begin = first;\n end = typeof last === 'number' ? last : begin;\n\n if (inputEl.setSelectionRange) {\n inputEl.setSelectionRange(begin, end);\n } else if (inputEl['createTextRange']) {\n range = inputEl['createTextRange']();\n range.collapse(true);\n range.moveEnd('character', end);\n range.moveStart('character', begin);\n range.select();\n }\n } else {\n if (inputEl.setSelectionRange) {\n begin = inputEl.selectionStart;\n end = inputEl.selectionEnd;\n } else if (document['selection'] && document['selection'].createRange) {\n range = document['selection'].createRange();\n begin = 0 - range.duplicate().moveStart('character', -100000);\n end = begin + range.text.length;\n }\n\n return {\n begin: begin,\n end: end\n };\n }\n }\n }, {\n key: \"isCompleted\",\n value: function isCompleted() {\n for (var i = this.firstNonMaskPos; i <= this.lastRequiredNonMaskPos; i++) {\n if (this.tests[i] && this.buffer[i] === this.getPlaceholder(i)) {\n return false;\n }\n }\n\n return true;\n }\n }, {\n key: \"getPlaceholder\",\n value: function getPlaceholder(i) {\n if (i < this.props.slotChar.length) {\n return this.props.slotChar.charAt(i);\n }\n\n return this.props.slotChar.charAt(0);\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.props.unmask ? this.getUnmaskedValue() : this.inputRef && this.inputRef.current && this.inputRef.current.value;\n }\n }, {\n key: \"seekNext\",\n value: function seekNext(pos) {\n while (++pos < this.len && !this.tests[pos]) {}\n\n return pos;\n }\n }, {\n key: \"seekPrev\",\n value: function seekPrev(pos) {\n while (--pos >= 0 && !this.tests[pos]) {}\n\n return pos;\n }\n }, {\n key: \"shiftL\",\n value: function shiftL(begin, end) {\n var i, j;\n\n if (begin < 0) {\n return;\n }\n\n for (i = begin, j = this.seekNext(end); i < this.len; i++) {\n if (this.tests[i]) {\n if (j < this.len && this.tests[i].test(this.buffer[j])) {\n this.buffer[i] = this.buffer[j];\n this.buffer[j] = this.getPlaceholder(j);\n } else {\n break;\n }\n\n j = this.seekNext(j);\n }\n }\n\n this.writeBuffer();\n this.caret(Math.max(this.firstNonMaskPos, begin));\n }\n }, {\n key: \"shiftR\",\n value: function shiftR(pos) {\n var i, c, j, t;\n\n for (i = pos, c = this.getPlaceholder(pos); i < this.len; i++) {\n if (this.tests[i]) {\n j = this.seekNext(i);\n t = this.buffer[i];\n this.buffer[i] = c;\n\n if (j < this.len && this.tests[j].test(t)) {\n c = t;\n } else {\n break;\n }\n }\n }\n }\n }, {\n key: \"handleAndroidInput\",\n value: function handleAndroidInput(e) {\n var curVal = this.inputRef.current.value;\n var pos = this.caret();\n\n if (this.oldVal && this.oldVal.length && this.oldVal.length > curVal.length) {\n // a deletion or backspace happened\n this.checkVal(true);\n\n while (pos.begin > 0 && !this.tests[pos.begin - 1]) {\n pos.begin--;\n }\n\n if (pos.begin === 0) {\n while (pos.begin < this.firstNonMaskPos && !this.tests[pos.begin]) {\n pos.begin++;\n }\n }\n\n this.caret(pos.begin, pos.begin);\n } else {\n this.checkVal(true);\n\n while (pos.begin < this.len && !this.tests[pos.begin]) {\n pos.begin++;\n }\n\n this.caret(pos.begin, pos.begin);\n }\n\n if (this.props.onComplete && this.isCompleted()) {\n this.props.onComplete({\n originalEvent: e,\n value: this.getValue()\n });\n }\n }\n }, {\n key: \"onBlur\",\n value: function onBlur(e) {\n this.focus = false;\n this.checkVal();\n this.updateModel(e);\n this.updateFilledState();\n\n if (this.props.onBlur) {\n this.props.onBlur(e);\n }\n\n if (this.inputRef.current.value !== this.focusText) {\n var event = document.createEvent('HTMLEvents');\n event.initEvent('change', true, false);\n this.inputRef.current.dispatchEvent(event);\n }\n }\n }, {\n key: \"onKeyDown\",\n value: function onKeyDown(e) {\n if (this.props.readOnly) {\n return;\n }\n\n var k = e.which || e.keyCode,\n pos,\n begin,\n end;\n var iPhone = /iphone/i.test(DomHandler.getUserAgent());\n this.oldVal = this.inputRef.current.value; //backspace, delete, and escape get special treatment\n\n if (k === 8 || k === 46 || iPhone && k === 127) {\n pos = this.caret();\n begin = pos.begin;\n end = pos.end;\n\n if (end - begin === 0) {\n begin = k !== 46 ? this.seekPrev(begin) : end = this.seekNext(begin - 1);\n end = k === 46 ? this.seekNext(end) : end;\n }\n\n this.clearBuffer(begin, end);\n this.shiftL(begin, end - 1);\n this.updateModel(e);\n e.preventDefault();\n } else if (k === 13) {\n // enter\n this.onBlur(e);\n this.updateModel(e);\n } else if (k === 27) {\n // escape\n this.inputRef.current.value = this.focusText;\n this.caret(0, this.checkVal());\n this.updateModel(e);\n e.preventDefault();\n }\n }\n }, {\n key: \"onKeyPress\",\n value: function onKeyPress(e) {\n var _this2 = this;\n\n if (this.props.readOnly) {\n return;\n }\n\n var k = e.which || e.keyCode,\n pos = this.caret(),\n p,\n c,\n next,\n completed;\n\n if (e.ctrlKey || e.altKey || e.metaKey || k < 32) {\n //Ignore\n return;\n } else if (k && k !== 13) {\n if (pos.end - pos.begin !== 0) {\n this.clearBuffer(pos.begin, pos.end);\n this.shiftL(pos.begin, pos.end - 1);\n }\n\n p = this.seekNext(pos.begin - 1);\n\n if (p < this.len) {\n c = String.fromCharCode(k);\n\n if (this.tests[p].test(c)) {\n this.shiftR(p);\n this.buffer[p] = c;\n this.writeBuffer();\n next = this.seekNext(p);\n\n if (/android/i.test(DomHandler.getUserAgent())) {\n //Path for CSP Violation on FireFox OS 1.1\n var proxy = function proxy() {\n _this2.caret(next);\n };\n\n setTimeout(proxy, 0);\n } else {\n this.caret(next);\n }\n\n if (pos.begin <= this.lastRequiredNonMaskPos) {\n completed = this.isCompleted();\n }\n }\n }\n\n e.preventDefault();\n }\n\n this.updateModel(e);\n\n if (this.props.onComplete && completed) {\n this.props.onComplete({\n originalEvent: e,\n value: this.getValue()\n });\n }\n }\n }, {\n key: \"clearBuffer\",\n value: function clearBuffer(start, end) {\n var i;\n\n for (i = start; i < end && i < this.len; i++) {\n if (this.tests[i]) {\n this.buffer[i] = this.getPlaceholder(i);\n }\n }\n }\n }, {\n key: \"writeBuffer\",\n value: function writeBuffer() {\n this.inputRef.current.value = this.buffer.join('');\n }\n }, {\n key: \"checkVal\",\n value: function checkVal(allow) {\n this.isValueChecked = true; //try to place characters where they belong\n\n var test = this.inputRef.current.value,\n lastMatch = -1,\n i,\n c,\n pos;\n\n for (i = 0, pos = 0; i < this.len; i++) {\n if (this.tests[i]) {\n this.buffer[i] = this.getPlaceholder(i);\n\n while (pos++ < test.length) {\n c = test.charAt(pos - 1);\n\n if (this.tests[i].test(c)) {\n this.buffer[i] = c;\n lastMatch = i;\n break;\n }\n }\n\n if (pos > test.length) {\n this.clearBuffer(i + 1, this.len);\n break;\n }\n } else {\n if (this.buffer[i] === test.charAt(pos)) {\n pos++;\n }\n\n if (i < this.partialPosition) {\n lastMatch = i;\n }\n }\n }\n\n if (allow) {\n this.writeBuffer();\n } else if (lastMatch + 1 < this.partialPosition) {\n if (this.props.autoClear || this.buffer.join('') === this.defaultBuffer) {\n // Invalid value. Remove it and replace it with the\n // mask, which is the default behavior.\n if (this.inputRef.current.value) this.inputRef.current.value = '';\n this.clearBuffer(0, this.len);\n } else {\n // Invalid value, but we opt to show the value to the\n // user and allow them to correct their mistake.\n this.writeBuffer();\n }\n } else {\n this.writeBuffer();\n this.inputRef.current.value = this.inputRef.current.value.substring(0, lastMatch + 1);\n }\n\n return this.partialPosition ? i : this.firstNonMaskPos;\n }\n }, {\n key: \"onFocus\",\n value: function onFocus(e) {\n var _this3 = this;\n\n if (this.props.readOnly) {\n return;\n }\n\n this.focus = true;\n clearTimeout(this.caretTimeoutId);\n var pos;\n this.focusText = this.inputRef.current.value;\n pos = this.checkVal();\n this.caretTimeoutId = setTimeout(function () {\n if (_this3.inputRef.current !== document.activeElement) {\n return;\n }\n\n _this3.writeBuffer();\n\n if (pos === _this3.props.mask.replace(\"?\", \"\").length) {\n _this3.caret(0, pos);\n } else {\n _this3.caret(pos);\n }\n\n _this3.updateFilledState();\n }, 10);\n\n if (this.props.onFocus) {\n this.props.onFocus(e);\n }\n }\n }, {\n key: \"onInput\",\n value: function onInput(event) {\n if (this.androidChrome) this.handleAndroidInput(event);else this.handleInputChange(event);\n }\n }, {\n key: \"handleInputChange\",\n value: function handleInputChange(e) {\n if (this.props.readOnly) {\n return;\n }\n\n var pos = this.checkVal(true);\n this.caret(pos);\n this.updateModel(e);\n\n if (this.props.onComplete && this.isCompleted()) {\n this.props.onComplete({\n originalEvent: e,\n value: this.getValue()\n });\n }\n }\n }, {\n key: \"getUnmaskedValue\",\n value: function getUnmaskedValue() {\n var unmaskedBuffer = [];\n\n for (var i = 0; i < this.buffer.length; i++) {\n var c = this.buffer[i];\n\n if (this.tests[i] && c !== this.getPlaceholder(i)) {\n unmaskedBuffer.push(c);\n }\n }\n\n return unmaskedBuffer.join('');\n }\n }, {\n key: \"updateModel\",\n value: function updateModel(e) {\n if (this.props.onChange) {\n var val = this.props.unmask ? this.getUnmaskedValue() : e && e.target.value;\n this.props.onChange({\n originalEvent: e,\n value: this.defaultBuffer !== val ? val : '',\n stopPropagation: function stopPropagation() {},\n preventDefault: function preventDefault() {},\n target: {\n name: this.props.name,\n id: this.props.id,\n value: this.defaultBuffer !== val ? val : ''\n }\n });\n }\n }\n }, {\n key: \"updateFilledState\",\n value: function updateFilledState() {\n if (this.inputRef && this.inputRef.current && this.inputRef.current.value && this.inputRef.current.value.length > 0) DomHandler.addClass(this.inputRef.current, 'p-filled');else DomHandler.removeClass(this.inputRef.current, 'p-filled');\n }\n }, {\n key: \"updateValue\",\n value: function updateValue(allow) {\n var _this4 = this;\n\n var pos;\n\n if (this.inputRef && this.inputRef.current) {\n if (this.props.value == null) {\n this.inputRef.current.value = '';\n } else {\n this.inputRef.current.value = this.props.value;\n pos = this.checkVal(allow);\n setTimeout(function () {\n if (_this4.inputRef && _this4.inputRef.current) {\n _this4.writeBuffer();\n\n return _this4.checkVal(allow);\n }\n }, 10);\n }\n\n this.focusText = this.inputRef.current.value;\n }\n\n this.updateFilledState();\n return pos;\n }\n }, {\n key: \"isValueUpdated\",\n value: function isValueUpdated() {\n return this.props.unmask ? this.props.value !== this.getUnmaskedValue() : this.defaultBuffer !== this.inputRef.current.value && this.inputRef.current.value !== this.props.value;\n }\n }, {\n key: \"init\",\n value: function init() {\n if (this.props.mask) {\n this.tests = [];\n this.partialPosition = this.props.mask.length;\n this.len = this.props.mask.length;\n this.firstNonMaskPos = null;\n this.defs = {\n '9': '[0-9]',\n 'a': '[A-Za-z]',\n '*': '[A-Za-z0-9]'\n };\n var ua = DomHandler.getUserAgent();\n this.androidChrome = /chrome/i.test(ua) && /android/i.test(ua);\n var maskTokens = this.props.mask.split('');\n\n for (var i = 0; i < maskTokens.length; i++) {\n var c = maskTokens[i];\n\n if (c === '?') {\n this.len--;\n this.partialPosition = i;\n } else if (this.defs[c]) {\n this.tests.push(new RegExp(this.defs[c]));\n\n if (this.firstNonMaskPos === null) {\n this.firstNonMaskPos = this.tests.length - 1;\n }\n\n if (i < this.partialPosition) {\n this.lastRequiredNonMaskPos = this.tests.length - 1;\n }\n } else {\n this.tests.push(null);\n }\n }\n\n this.buffer = [];\n\n for (var _i = 0; _i < maskTokens.length; _i++) {\n var _c = maskTokens[_i];\n\n if (_c !== '?') {\n if (this.defs[_c]) this.buffer.push(this.getPlaceholder(_i));else this.buffer.push(_c);\n }\n }\n\n this.defaultBuffer = this.buffer.join('');\n }\n }\n }, {\n key: \"updateInputRef\",\n value: function updateInputRef() {\n var ref = this.props.inputRef;\n\n if (ref) {\n if (typeof ref === 'function') {\n ref(this.inputRef.current);\n } else {\n ref.current = this.inputRef.current;\n }\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.updateInputRef();\n this.init();\n this.updateValue();\n\n if (this.props.tooltip) {\n this.renderTooltip();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (prevProps.tooltip !== this.props.tooltip || prevProps.tooltipOptions !== this.props.tooltipOptions) {\n if (this.tooltip) this.tooltip.update(_objectSpread({\n content: this.props.tooltip\n }, this.props.tooltipOptions || {}));else this.renderTooltip();\n }\n\n if (this.isValueUpdated()) {\n this.updateValue();\n }\n\n if (prevProps.mask !== this.props.mask) {\n this.init();\n this.caret(this.updateValue(true));\n this.updateModel();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.tooltip) {\n this.tooltip.destroy();\n this.tooltip = null;\n }\n }\n }, {\n key: \"renderTooltip\",\n value: function renderTooltip() {\n this.tooltip = tip({\n target: this.inputRef.current,\n content: this.props.tooltip,\n options: this.props.tooltipOptions\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var inputMaskClassName = classNames('p-inputmask', this.props.className);\n return /*#__PURE__*/React.createElement(InputText, {\n id: this.props.id,\n ref: this.inputRef,\n type: this.props.type,\n name: this.props.name,\n style: this.props.style,\n className: inputMaskClassName,\n placeholder: this.props.placeholder,\n size: this.props.size,\n maxLength: this.props.maxLength,\n tabIndex: this.props.tabIndex,\n disabled: this.props.disabled,\n readOnly: this.props.readOnly,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n onKeyDown: this.onKeyDown,\n onKeyPress: this.onKeyPress,\n onInput: this.onInput,\n onPaste: this.handleInputChange,\n required: this.props.required,\n \"aria-labelledby\": this.props.ariaLabelledBy\n });\n }\n }]);\n\n return InputMask;\n}(Component);\n\n_defineProperty(InputMask, \"defaultProps\", {\n id: null,\n inputRef: null,\n value: null,\n type: 'text',\n mask: null,\n slotChar: '_',\n autoClear: true,\n unmask: false,\n style: null,\n className: null,\n placeholder: null,\n size: null,\n maxLength: null,\n tabIndex: null,\n disabled: false,\n readOnly: false,\n name: null,\n required: false,\n tooltip: null,\n tooltipOptions: null,\n ariaLabelledBy: null,\n onComplete: null,\n onChange: null,\n onFocus: null,\n onBlur: null\n});\n\nexport { InputMask };","map":{"version":3,"names":["React","createRef","Component","DomHandler","classNames","InputText","tip","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_createClass","protoProps","staticProps","prototype","_assertThisInitialized","self","ReferenceError","_setPrototypeOf","o","p","setPrototypeOf","__proto__","_inherits","subClass","superClass","create","constructor","value","_typeof","obj","Symbol","iterator","_possibleConstructorReturn","call","_getPrototypeOf","getPrototypeOf","_defineProperty","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","push","apply","_objectSpread","arguments","source","forEach","getOwnPropertyDescriptors","defineProperties","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","result","NewTarget","Reflect","construct","sham","Proxy","Boolean","valueOf","e","InputMask","_Component","_super","_this","onFocus","bind","onBlur","onKeyDown","onKeyPress","onInput","handleInputChange","inputRef","caret","first","last","range","begin","end","inputEl","current","offsetParent","document","activeElement","setSelectionRange","collapse","moveEnd","moveStart","select","selectionStart","selectionEnd","createRange","duplicate","text","isCompleted","firstNonMaskPos","lastRequiredNonMaskPos","tests","buffer","getPlaceholder","slotChar","charAt","getValue","unmask","getUnmaskedValue","seekNext","pos","len","seekPrev","shiftL","j","test","writeBuffer","Math","max","shiftR","c","t","handleAndroidInput","curVal","oldVal","checkVal","onComplete","originalEvent","focus","updateModel","updateFilledState","focusText","event","createEvent","initEvent","dispatchEvent","readOnly","k","which","keyCode","iPhone","getUserAgent","clearBuffer","preventDefault","_this2","next","completed","ctrlKey","altKey","metaKey","String","fromCharCode","proxy","setTimeout","start","join","allow","isValueChecked","lastMatch","partialPosition","autoClear","defaultBuffer","substring","_this3","clearTimeout","caretTimeoutId","mask","replace","androidChrome","unmaskedBuffer","onChange","val","stopPropagation","name","id","addClass","removeClass","updateValue","_this4","isValueUpdated","init","defs","ua","maskTokens","split","RegExp","_i","_c","updateInputRef","ref","componentDidMount","tooltip","renderTooltip","componentDidUpdate","prevProps","tooltipOptions","update","content","componentWillUnmount","destroy","options","render","inputMaskClassName","className","createElement","type","style","placeholder","size","maxLength","tabIndex","disabled","onPaste","required","ariaLabelledBy"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/primereact/inputmask/inputmask.esm.js"],"sourcesContent":["import React, { createRef, Component } from 'react';\nimport { DomHandler, classNames } from 'primereact/utils';\nimport { InputText } from 'primereact/inputtext';\nimport { tip } from 'primereact/tooltip';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nvar InputMask = /*#__PURE__*/function (_Component) {\n _inherits(InputMask, _Component);\n\n var _super = _createSuper(InputMask);\n\n function InputMask(props) {\n var _this;\n\n _classCallCheck(this, InputMask);\n\n _this = _super.call(this, props);\n _this.onFocus = _this.onFocus.bind(_assertThisInitialized(_this));\n _this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this));\n _this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this));\n _this.onKeyPress = _this.onKeyPress.bind(_assertThisInitialized(_this));\n _this.onInput = _this.onInput.bind(_assertThisInitialized(_this));\n _this.handleInputChange = _this.handleInputChange.bind(_assertThisInitialized(_this));\n _this.inputRef = /*#__PURE__*/createRef(_this.props.inputRef);\n return _this;\n }\n\n _createClass(InputMask, [{\n key: \"caret\",\n value: function caret(first, last) {\n var range, begin, end;\n var inputEl = this.inputRef && this.inputRef.current;\n\n if (!inputEl || !inputEl.offsetParent || inputEl !== document.activeElement) {\n return;\n }\n\n if (typeof first === 'number') {\n begin = first;\n end = typeof last === 'number' ? last : begin;\n\n if (inputEl.setSelectionRange) {\n inputEl.setSelectionRange(begin, end);\n } else if (inputEl['createTextRange']) {\n range = inputEl['createTextRange']();\n range.collapse(true);\n range.moveEnd('character', end);\n range.moveStart('character', begin);\n range.select();\n }\n } else {\n if (inputEl.setSelectionRange) {\n begin = inputEl.selectionStart;\n end = inputEl.selectionEnd;\n } else if (document['selection'] && document['selection'].createRange) {\n range = document['selection'].createRange();\n begin = 0 - range.duplicate().moveStart('character', -100000);\n end = begin + range.text.length;\n }\n\n return {\n begin: begin,\n end: end\n };\n }\n }\n }, {\n key: \"isCompleted\",\n value: function isCompleted() {\n for (var i = this.firstNonMaskPos; i <= this.lastRequiredNonMaskPos; i++) {\n if (this.tests[i] && this.buffer[i] === this.getPlaceholder(i)) {\n return false;\n }\n }\n\n return true;\n }\n }, {\n key: \"getPlaceholder\",\n value: function getPlaceholder(i) {\n if (i < this.props.slotChar.length) {\n return this.props.slotChar.charAt(i);\n }\n\n return this.props.slotChar.charAt(0);\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.props.unmask ? this.getUnmaskedValue() : this.inputRef && this.inputRef.current && this.inputRef.current.value;\n }\n }, {\n key: \"seekNext\",\n value: function seekNext(pos) {\n while (++pos < this.len && !this.tests[pos]) {\n }\n\n return pos;\n }\n }, {\n key: \"seekPrev\",\n value: function seekPrev(pos) {\n while (--pos >= 0 && !this.tests[pos]) {\n }\n\n return pos;\n }\n }, {\n key: \"shiftL\",\n value: function shiftL(begin, end) {\n var i, j;\n\n if (begin < 0) {\n return;\n }\n\n for (i = begin, j = this.seekNext(end); i < this.len; i++) {\n if (this.tests[i]) {\n if (j < this.len && this.tests[i].test(this.buffer[j])) {\n this.buffer[i] = this.buffer[j];\n this.buffer[j] = this.getPlaceholder(j);\n } else {\n break;\n }\n\n j = this.seekNext(j);\n }\n }\n\n this.writeBuffer();\n this.caret(Math.max(this.firstNonMaskPos, begin));\n }\n }, {\n key: \"shiftR\",\n value: function shiftR(pos) {\n var i, c, j, t;\n\n for (i = pos, c = this.getPlaceholder(pos); i < this.len; i++) {\n if (this.tests[i]) {\n j = this.seekNext(i);\n t = this.buffer[i];\n this.buffer[i] = c;\n\n if (j < this.len && this.tests[j].test(t)) {\n c = t;\n } else {\n break;\n }\n }\n }\n }\n }, {\n key: \"handleAndroidInput\",\n value: function handleAndroidInput(e) {\n var curVal = this.inputRef.current.value;\n var pos = this.caret();\n\n if (this.oldVal && this.oldVal.length && this.oldVal.length > curVal.length) {\n // a deletion or backspace happened\n this.checkVal(true);\n\n while (pos.begin > 0 && !this.tests[pos.begin - 1]) {\n pos.begin--;\n }\n\n if (pos.begin === 0) {\n while (pos.begin < this.firstNonMaskPos && !this.tests[pos.begin]) {\n pos.begin++;\n }\n }\n\n this.caret(pos.begin, pos.begin);\n } else {\n this.checkVal(true);\n\n while (pos.begin < this.len && !this.tests[pos.begin]) {\n pos.begin++;\n }\n\n this.caret(pos.begin, pos.begin);\n }\n\n if (this.props.onComplete && this.isCompleted()) {\n this.props.onComplete({\n originalEvent: e,\n value: this.getValue()\n });\n }\n }\n }, {\n key: \"onBlur\",\n value: function onBlur(e) {\n this.focus = false;\n this.checkVal();\n this.updateModel(e);\n this.updateFilledState();\n\n if (this.props.onBlur) {\n this.props.onBlur(e);\n }\n\n if (this.inputRef.current.value !== this.focusText) {\n var event = document.createEvent('HTMLEvents');\n event.initEvent('change', true, false);\n this.inputRef.current.dispatchEvent(event);\n }\n }\n }, {\n key: \"onKeyDown\",\n value: function onKeyDown(e) {\n if (this.props.readOnly) {\n return;\n }\n\n var k = e.which || e.keyCode,\n pos,\n begin,\n end;\n var iPhone = /iphone/i.test(DomHandler.getUserAgent());\n this.oldVal = this.inputRef.current.value; //backspace, delete, and escape get special treatment\n\n if (k === 8 || k === 46 || iPhone && k === 127) {\n pos = this.caret();\n begin = pos.begin;\n end = pos.end;\n\n if (end - begin === 0) {\n begin = k !== 46 ? this.seekPrev(begin) : end = this.seekNext(begin - 1);\n end = k === 46 ? this.seekNext(end) : end;\n }\n\n this.clearBuffer(begin, end);\n this.shiftL(begin, end - 1);\n this.updateModel(e);\n e.preventDefault();\n } else if (k === 13) {\n // enter\n this.onBlur(e);\n this.updateModel(e);\n } else if (k === 27) {\n // escape\n this.inputRef.current.value = this.focusText;\n this.caret(0, this.checkVal());\n this.updateModel(e);\n e.preventDefault();\n }\n }\n }, {\n key: \"onKeyPress\",\n value: function onKeyPress(e) {\n var _this2 = this;\n\n if (this.props.readOnly) {\n return;\n }\n\n var k = e.which || e.keyCode,\n pos = this.caret(),\n p,\n c,\n next,\n completed;\n\n if (e.ctrlKey || e.altKey || e.metaKey || k < 32) {\n //Ignore\n return;\n } else if (k && k !== 13) {\n if (pos.end - pos.begin !== 0) {\n this.clearBuffer(pos.begin, pos.end);\n this.shiftL(pos.begin, pos.end - 1);\n }\n\n p = this.seekNext(pos.begin - 1);\n\n if (p < this.len) {\n c = String.fromCharCode(k);\n\n if (this.tests[p].test(c)) {\n this.shiftR(p);\n this.buffer[p] = c;\n this.writeBuffer();\n next = this.seekNext(p);\n\n if (/android/i.test(DomHandler.getUserAgent())) {\n //Path for CSP Violation on FireFox OS 1.1\n var proxy = function proxy() {\n _this2.caret(next);\n };\n\n setTimeout(proxy, 0);\n } else {\n this.caret(next);\n }\n\n if (pos.begin <= this.lastRequiredNonMaskPos) {\n completed = this.isCompleted();\n }\n }\n }\n\n e.preventDefault();\n }\n\n this.updateModel(e);\n\n if (this.props.onComplete && completed) {\n this.props.onComplete({\n originalEvent: e,\n value: this.getValue()\n });\n }\n }\n }, {\n key: \"clearBuffer\",\n value: function clearBuffer(start, end) {\n var i;\n\n for (i = start; i < end && i < this.len; i++) {\n if (this.tests[i]) {\n this.buffer[i] = this.getPlaceholder(i);\n }\n }\n }\n }, {\n key: \"writeBuffer\",\n value: function writeBuffer() {\n this.inputRef.current.value = this.buffer.join('');\n }\n }, {\n key: \"checkVal\",\n value: function checkVal(allow) {\n this.isValueChecked = true; //try to place characters where they belong\n\n var test = this.inputRef.current.value,\n lastMatch = -1,\n i,\n c,\n pos;\n\n for (i = 0, pos = 0; i < this.len; i++) {\n if (this.tests[i]) {\n this.buffer[i] = this.getPlaceholder(i);\n\n while (pos++ < test.length) {\n c = test.charAt(pos - 1);\n\n if (this.tests[i].test(c)) {\n this.buffer[i] = c;\n lastMatch = i;\n break;\n }\n }\n\n if (pos > test.length) {\n this.clearBuffer(i + 1, this.len);\n break;\n }\n } else {\n if (this.buffer[i] === test.charAt(pos)) {\n pos++;\n }\n\n if (i < this.partialPosition) {\n lastMatch = i;\n }\n }\n }\n\n if (allow) {\n this.writeBuffer();\n } else if (lastMatch + 1 < this.partialPosition) {\n if (this.props.autoClear || this.buffer.join('') === this.defaultBuffer) {\n // Invalid value. Remove it and replace it with the\n // mask, which is the default behavior.\n if (this.inputRef.current.value) this.inputRef.current.value = '';\n this.clearBuffer(0, this.len);\n } else {\n // Invalid value, but we opt to show the value to the\n // user and allow them to correct their mistake.\n this.writeBuffer();\n }\n } else {\n this.writeBuffer();\n this.inputRef.current.value = this.inputRef.current.value.substring(0, lastMatch + 1);\n }\n\n return this.partialPosition ? i : this.firstNonMaskPos;\n }\n }, {\n key: \"onFocus\",\n value: function onFocus(e) {\n var _this3 = this;\n\n if (this.props.readOnly) {\n return;\n }\n\n this.focus = true;\n clearTimeout(this.caretTimeoutId);\n var pos;\n this.focusText = this.inputRef.current.value;\n pos = this.checkVal();\n this.caretTimeoutId = setTimeout(function () {\n if (_this3.inputRef.current !== document.activeElement) {\n return;\n }\n\n _this3.writeBuffer();\n\n if (pos === _this3.props.mask.replace(\"?\", \"\").length) {\n _this3.caret(0, pos);\n } else {\n _this3.caret(pos);\n }\n\n _this3.updateFilledState();\n }, 10);\n\n if (this.props.onFocus) {\n this.props.onFocus(e);\n }\n }\n }, {\n key: \"onInput\",\n value: function onInput(event) {\n if (this.androidChrome) this.handleAndroidInput(event);else this.handleInputChange(event);\n }\n }, {\n key: \"handleInputChange\",\n value: function handleInputChange(e) {\n if (this.props.readOnly) {\n return;\n }\n\n var pos = this.checkVal(true);\n this.caret(pos);\n this.updateModel(e);\n\n if (this.props.onComplete && this.isCompleted()) {\n this.props.onComplete({\n originalEvent: e,\n value: this.getValue()\n });\n }\n }\n }, {\n key: \"getUnmaskedValue\",\n value: function getUnmaskedValue() {\n var unmaskedBuffer = [];\n\n for (var i = 0; i < this.buffer.length; i++) {\n var c = this.buffer[i];\n\n if (this.tests[i] && c !== this.getPlaceholder(i)) {\n unmaskedBuffer.push(c);\n }\n }\n\n return unmaskedBuffer.join('');\n }\n }, {\n key: \"updateModel\",\n value: function updateModel(e) {\n if (this.props.onChange) {\n var val = this.props.unmask ? this.getUnmaskedValue() : e && e.target.value;\n this.props.onChange({\n originalEvent: e,\n value: this.defaultBuffer !== val ? val : '',\n stopPropagation: function stopPropagation() {},\n preventDefault: function preventDefault() {},\n target: {\n name: this.props.name,\n id: this.props.id,\n value: this.defaultBuffer !== val ? val : ''\n }\n });\n }\n }\n }, {\n key: \"updateFilledState\",\n value: function updateFilledState() {\n if (this.inputRef && this.inputRef.current && this.inputRef.current.value && this.inputRef.current.value.length > 0) DomHandler.addClass(this.inputRef.current, 'p-filled');else DomHandler.removeClass(this.inputRef.current, 'p-filled');\n }\n }, {\n key: \"updateValue\",\n value: function updateValue(allow) {\n var _this4 = this;\n\n var pos;\n\n if (this.inputRef && this.inputRef.current) {\n if (this.props.value == null) {\n this.inputRef.current.value = '';\n } else {\n this.inputRef.current.value = this.props.value;\n pos = this.checkVal(allow);\n setTimeout(function () {\n if (_this4.inputRef && _this4.inputRef.current) {\n _this4.writeBuffer();\n\n return _this4.checkVal(allow);\n }\n }, 10);\n }\n\n this.focusText = this.inputRef.current.value;\n }\n\n this.updateFilledState();\n return pos;\n }\n }, {\n key: \"isValueUpdated\",\n value: function isValueUpdated() {\n return this.props.unmask ? this.props.value !== this.getUnmaskedValue() : this.defaultBuffer !== this.inputRef.current.value && this.inputRef.current.value !== this.props.value;\n }\n }, {\n key: \"init\",\n value: function init() {\n if (this.props.mask) {\n this.tests = [];\n this.partialPosition = this.props.mask.length;\n this.len = this.props.mask.length;\n this.firstNonMaskPos = null;\n this.defs = {\n '9': '[0-9]',\n 'a': '[A-Za-z]',\n '*': '[A-Za-z0-9]'\n };\n var ua = DomHandler.getUserAgent();\n this.androidChrome = /chrome/i.test(ua) && /android/i.test(ua);\n var maskTokens = this.props.mask.split('');\n\n for (var i = 0; i < maskTokens.length; i++) {\n var c = maskTokens[i];\n\n if (c === '?') {\n this.len--;\n this.partialPosition = i;\n } else if (this.defs[c]) {\n this.tests.push(new RegExp(this.defs[c]));\n\n if (this.firstNonMaskPos === null) {\n this.firstNonMaskPos = this.tests.length - 1;\n }\n\n if (i < this.partialPosition) {\n this.lastRequiredNonMaskPos = this.tests.length - 1;\n }\n } else {\n this.tests.push(null);\n }\n }\n\n this.buffer = [];\n\n for (var _i = 0; _i < maskTokens.length; _i++) {\n var _c = maskTokens[_i];\n\n if (_c !== '?') {\n if (this.defs[_c]) this.buffer.push(this.getPlaceholder(_i));else this.buffer.push(_c);\n }\n }\n\n this.defaultBuffer = this.buffer.join('');\n }\n }\n }, {\n key: \"updateInputRef\",\n value: function updateInputRef() {\n var ref = this.props.inputRef;\n\n if (ref) {\n if (typeof ref === 'function') {\n ref(this.inputRef.current);\n } else {\n ref.current = this.inputRef.current;\n }\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.updateInputRef();\n this.init();\n this.updateValue();\n\n if (this.props.tooltip) {\n this.renderTooltip();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (prevProps.tooltip !== this.props.tooltip || prevProps.tooltipOptions !== this.props.tooltipOptions) {\n if (this.tooltip) this.tooltip.update(_objectSpread({\n content: this.props.tooltip\n }, this.props.tooltipOptions || {}));else this.renderTooltip();\n }\n\n if (this.isValueUpdated()) {\n this.updateValue();\n }\n\n if (prevProps.mask !== this.props.mask) {\n this.init();\n this.caret(this.updateValue(true));\n this.updateModel();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.tooltip) {\n this.tooltip.destroy();\n this.tooltip = null;\n }\n }\n }, {\n key: \"renderTooltip\",\n value: function renderTooltip() {\n this.tooltip = tip({\n target: this.inputRef.current,\n content: this.props.tooltip,\n options: this.props.tooltipOptions\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var inputMaskClassName = classNames('p-inputmask', this.props.className);\n return /*#__PURE__*/React.createElement(InputText, {\n id: this.props.id,\n ref: this.inputRef,\n type: this.props.type,\n name: this.props.name,\n style: this.props.style,\n className: inputMaskClassName,\n placeholder: this.props.placeholder,\n size: this.props.size,\n maxLength: this.props.maxLength,\n tabIndex: this.props.tabIndex,\n disabled: this.props.disabled,\n readOnly: this.props.readOnly,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n onKeyDown: this.onKeyDown,\n onKeyPress: this.onKeyPress,\n onInput: this.onInput,\n onPaste: this.handleInputChange,\n required: this.props.required,\n \"aria-labelledby\": this.props.ariaLabelledBy\n });\n }\n }]);\n\n return InputMask;\n}(Component);\n\n_defineProperty(InputMask, \"defaultProps\", {\n id: null,\n inputRef: null,\n value: null,\n type: 'text',\n mask: null,\n slotChar: '_',\n autoClear: true,\n unmask: false,\n style: null,\n className: null,\n placeholder: null,\n size: null,\n maxLength: null,\n tabIndex: null,\n disabled: false,\n readOnly: false,\n name: null,\n required: false,\n tooltip: null,\n tooltipOptions: null,\n ariaLabelledBy: null,\n onComplete: null,\n onChange: null,\n onFocus: null,\n onBlur: null\n});\n\nexport { InputMask };\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,SAA3B,QAA4C,OAA5C;AACA,SAASC,UAA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