{"version":3,"sources":["webpack:///./node_modules/rc-form/lib/utils.js","webpack:///./node_modules/rc-form/lib/createBaseForm.js","webpack:///./node_modules/rc-form/node_modules/warning/warning.js","webpack:///./node_modules/rc-form/lib/createFormField.js","webpack:///./node_modules/rc-form/lib/createDOMForm.js","webpack:///./node_modules/rc-form/node_modules/create-react-class/index.js","webpack:///./node_modules/rc-form/node_modules/create-react-class/factory.js","webpack:///./node_modules/rc-form/node_modules/fbjs/lib/emptyObject.js","webpack:///./node_modules/rc-form/node_modules/fbjs/lib/invariant.js","webpack:///./node_modules/rc-form/lib/createFieldsStore.js","webpack:///./node_modules/rc-form/lib/createForm.js"],"names":["Object","defineProperty","exports","value","_extends3","_interopRequireDefault","argumentContainer","Container","WrappedComponent","displayName","name","getDisplayName","_hoistNonReactStatics2","identity","obj","flattenArray","arr","Array","prototype","concat","apply","treeTraverse","flattenFields","maybeNestedFields","isLeafNode","errorMessage","fields","undefined","path","node","normalizeValidateRules","validate","rules","validateTrigger","validateRules","map","item","newItem","trigger","push","getValidateTriggers","filter","length","reduce","pre","curr","getValueFromEvent","e","target","type","checked","getErrorStrs","errors","message","getParams","ns","opt","cb","names","options","callback","isArray","isEmptyObject","keys","hasRules","some","startsWith","str","prefix","lastIndexOf","_warning2","__esModule","arguments","tree","forEach","subTree","index","subTreeKey","_objectWithoutProperties3","_defineProperty3","_extends6","_toConsumableArray3","_react2","_createReactClass2","_unsafeLifecyclesPolyfill2","_asyncValidator2","_get2","_set2","_eq2","_createFieldsStore2","_utils","option","mixins","validateMessages","onFieldsChange","onValuesChange","_option$mapProps","mapProps","mapPropsToFields","fieldNameProp","fieldMetaProp","fieldDataProp","_option$formPropName","formPropName","formName","withRef","Form","getInitialState","_this","this","props","fieldsStore","instances","cachedBind","clearedFieldMetaCache","renderFields","domFields","key","_fieldsStore","submitting","componentDidMount","cleanUpUselessFields","componentWillReceiveProps","nextProps","updateFields","componentDidUpdate","onCollectCommon","action","args","fieldMeta","getFieldMeta","originalProps","_fieldMeta$originalPr","getFieldValue","valuesAll","getAllValues","valuesAllSet","getForm","field","getField","touched","onCollect","name_","_len","_key","_onCollectCommon","setFieldsAsDirty","newField","dirty","setFields","onCollectValidate","_len2","_key2","_onCollectCommon2","validateFieldsInternal","firstFields","validateFirst","getCacheBind","fn","cache","oriFn","bind","getFieldDecorator","fieldOption","_this2","getFieldProps","fieldElem","ref","cloneElement","getFieldValuePropValue","_this3","usersFieldOption","Error","valuePropName","_fieldOption$validate","initialValue","inputProps","saveRef","validateTriggers","indexOf","meta","setFieldMeta","getFieldInstance","getRules","actionRules","_this4","flattenRegisteredFields","changedFields","acc","getNestedAllFields","forceUpdate","setFieldsValue","changedValues","fieldsMeta","values","newFields","allValues","_","component","_fieldMeta","preserve","clearField","recoverClearedField","hasOwnProperty","call","current","_this5","removedList","getAllFieldsName","resetFields","_this6","_ref","_this7","fieldNames","_ref$options","allRules","allFields","alreadyErrors","force","validating","f","getFieldsValue","validator","messages","errorsGroup","errorFieldName","fieldName","ruleFieldName","every","_ref2","restPath","slice","test","expired","nowAllFields","fieldErrors","nowField","_ref3","validateFields","_this8","pending","Promise","resolve","reject","_getParams","oldCb","getValidFieldsFullName","getValidFieldsName","console","error","isSubmitting","state","submit","_this9","setState","render","_props","wrappedComponentRef","restProps","formProps","createElement","module","warning","_classCallCheck3","isFormField","Field","_reactDom2","_domScrollIntoView2","_has2","_createBaseForm2","_createForm","computedStyle","el","prop","getComputedStyle","window","style","currentStyle","replace","word","letter","toUpperCase","mixin","validateFieldsAndScroll","validNames","firstNode","firstTop","instance","findDOMNode","top","getBoundingClientRect","c","container","n","nodeName","toLowerCase","overflowY","scrollHeight","clientHeight","parentNode","ownerDocument","getScrollableContainer","onlyScrollIfNeeded","scroll","React","factory","ReactNoopUpdateQueue","Component","updater","isValidElement","_assign","emptyObject","_invariant","ReactComponent","injectedMixins","ReactClassInterface","statics","propTypes","contextTypes","childContextTypes","getDefaultProps","getChildContext","componentWillMount","shouldComponentUpdate","componentWillUpdate","componentWillUnmount","UNSAFE_componentWillMount","UNSAFE_componentWillReceiveProps","UNSAFE_componentWillUpdate","updateComponent","ReactClassStaticInterface","getDerivedStateFromProps","RESERVED_SPEC_KEYS","Constructor","i","mixSpecIntoComponent","createMergedResultFunction","property","specPolicy","mixStaticSpecIntoComponent","autobind","validateMethodOverride","isAlreadyDefined","ReactClassMixin","spec","proto","autoBindPairs","__reactAutoBindPairs","isReactClassMethod","createChainedFunction","mergeIntoWithNoDuplicateKeys","one","two","a","b","bindAutoBindMethod","method","IsMountedPreMixin","__isMounted","IsMountedPostMixin","replaceState","newState","enqueueReplaceState","isMounted","ReactClassComponent","context","pairs","autoBindKey","bindAutoBindMethods","refs","initialState","methodName","constructor","defaultProps","condition","format","d","argIndex","framesToPop","_createClass3","FieldsStore","_createFormField","_createFormField2","partOf","internalFlattenFields","_initialiseProps","validFieldsName","nowFields","nowValues","getValueFromFields","normalize","nowValue","hidden","maybePartialName","maybePartialNames","fullName","partialName","getValueProps","fieldValue","getNotCollectedFields","member","getter","fullNames","isArrayValue","suffixNameStartIndex","setFieldsInitialValue","initialValues","flattenedInitialValues","getNestedFields","getNestedField","getFieldsError","getFieldError","getFieldMember","isFieldValidating","isFieldsValidating","isFieldTouched","isFieldsTouched","_createBaseForm"],"mappings":"2FAEAA,OAAOC,eAAeC,EAAS,aAAc,CAC3CC,OAAO,IAGT,IAEIC,EAAYC,EAFA,EAAQ,IAIxBH,EAAQI,kBA4BR,SAA2BC,EAAWC,GAIpC,OAFAD,EAAUE,YAAc,QAN1B,SAAwBD,GACtB,OAAOA,EAAiBC,aAAeD,EAAiBE,MAAQ,mBAK9BC,CAAeH,GAAoB,IACrED,EAAUC,iBAAmBA,GACtB,EAAII,EAAgC,SAAGL,EAAWC,IA/B3DN,EAAQW,SAkCR,SAAkBC,GAChB,OAAOA,GAlCTZ,EAAQa,aAqCR,SAAsBC,GACpB,OAAOC,MAAMC,UAAUC,OAAOC,MAAM,GAAIJ,IArC1Cd,EAAQmB,a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eACjCC,cAAe9S,KAAKE,YAAY4S,cAChCE,kBAAmBhT,KAAKE,YAAY8S,kBACpCC,mBAAoBjT,KAAKE,YAAY+S,mBACrCE,gBAAiBnT,KAAKE,YAAYiT,gBAClCD,eAAgBlT,KAAKE,YAAYgT,eACjCrK,aAAc7I,KAAK6I,aACnBE,OAAQ/I,KAAK+I,OACbd,eAAgBjI,KAAKiI,eACrB7B,YAAapG,KAAKoG,eASxB/M,EAAiB,QAJjB,SAAoByD,GAClB,OAAO,EAAIkN,EAA0B,SAAGlN,EAAS,CAAC+N","file":"npm.rc-form.c920b4ddeb9b68365139.js","sourcesContent":["'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nexports.argumentContainer = argumentContainer;\nexports.identity = identity;\nexports.flattenArray = flattenArray;\nexports.treeTraverse = treeTraverse;\nexports.flattenFields = flattenFields;\nexports.normalizeValidateRules = normalizeValidateRules;\nexports.getValidateTriggers = getValidateTriggers;\nexports.getValueFromEvent = getValueFromEvent;\nexports.getErrorStrs = getErrorStrs;\nexports.getParams = getParams;\nexports.isEmptyObject = isEmptyObject;\nexports.hasRules = hasRules;\nexports.startsWith = startsWith;\n\nvar _hoistNonReactStatics = require('hoist-non-react-statics');\n\nvar _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'WrappedComponent';\n}\n\nfunction argumentContainer(Container, WrappedComponent) {\n /* eslint no-param-reassign:0 */\n Container.displayName = 'Form(' + getDisplayName(WrappedComponent) + ')';\n Container.WrappedComponent = WrappedComponent;\n return (0, _hoistNonReactStatics2['default'])(Container, WrappedComponent);\n}\n\nfunction identity(obj) {\n return obj;\n}\n\nfunction flattenArray(arr) {\n return Array.prototype.concat.apply([], arr);\n}\n\nfunction treeTraverse() {\n var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var tree = arguments[1];\n var isLeafNode = arguments[2];\n var errorMessage = arguments[3];\n var callback = arguments[4];\n\n if (isLeafNode(path, tree)) {\n callback(path, tree);\n } else if (tree === undefined || tree === null) {\n // Do nothing\n } else if (Array.isArray(tree)) {\n tree.forEach(function (subTree, index) {\n return treeTraverse(path + '[' + index + ']', subTree, isLeafNode, errorMessage, callback);\n });\n } else {\n // It's object and not a leaf node\n if (typeof tree !== 'object') {\n (0, _warning2['default'])(false, errorMessage);\n return;\n }\n Object.keys(tree).forEach(function (subTreeKey) {\n var subTree = tree[subTreeKey];\n treeTraverse('' + path + (path ? '.' : '') + subTreeKey, subTree, isLeafNode, errorMessage, callback);\n });\n }\n}\n\nfunction flattenFields(maybeNestedFields, isLeafNode, errorMessage) {\n var fields = {};\n treeTraverse(undefined, maybeNestedFields, isLeafNode, errorMessage, function (path, node) {\n fields[path] = node;\n });\n return fields;\n}\n\nfunction normalizeValidateRules(validate, rules, validateTrigger) {\n var validateRules = validate.map(function (item) {\n var newItem = (0, _extends3['default'])({}, item, {\n trigger: item.trigger || []\n });\n if (typeof newItem.trigger === 'string') {\n newItem.trigger = [newItem.trigger];\n }\n return newItem;\n });\n if (rules) {\n validateRules.push({\n trigger: validateTrigger ? [].concat(validateTrigger) : [],\n rules: rules\n });\n }\n return validateRules;\n}\n\nfunction getValidateTriggers(validateRules) {\n return validateRules.filter(function (item) {\n return !!item.rules && item.rules.length;\n }).map(function (item) {\n return item.trigger;\n }).reduce(function (pre, curr) {\n return pre.concat(curr);\n }, []);\n}\n\nfunction getValueFromEvent(e) {\n // To support custom element\n if (!e || !e.target) {\n return e;\n }\n var target = e.target;\n\n return target.type === 'checkbox' ? target.checked : target.value;\n}\n\nfunction getErrorStrs(errors) {\n if (errors) {\n return errors.map(function (e) {\n if (e && e.message) {\n return e.message;\n }\n return e;\n });\n }\n return errors;\n}\n\nfunction getParams(ns, opt, cb) {\n var names = ns;\n var options = opt;\n var callback = cb;\n if (cb === undefined) {\n if (typeof names === 'function') {\n callback = names;\n options = {};\n names = undefined;\n } else if (Array.isArray(names)) {\n if (typeof options === 'function') {\n callback = options;\n options = {};\n } else {\n options = options || {};\n }\n } else {\n callback = options;\n options = names || {};\n names = undefined;\n }\n }\n return {\n names: names,\n options: options,\n callback: callback\n };\n}\n\nfunction isEmptyObject(obj) {\n return Object.keys(obj).length === 0;\n}\n\nfunction hasRules(validate) {\n if (validate) {\n return validate.some(function (item) {\n return item.rules && item.rules.length;\n });\n }\n return false;\n}\n\nfunction startsWith(str, prefix) {\n return str.lastIndexOf(prefix, 0) === 0;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');\n\nvar _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);\n\nvar _defineProperty2 = require('babel-runtime/helpers/defineProperty');\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _extends5 = require('babel-runtime/helpers/extends');\n\nvar _extends6 = _interopRequireDefault(_extends5);\n\nvar _toConsumableArray2 = require('babel-runtime/helpers/toConsumableArray');\n\nvar _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _createReactClass = require('create-react-class');\n\nvar _createReactClass2 = _interopRequireDefault(_createReactClass);\n\nvar _unsafeLifecyclesPolyfill = require('rc-util/lib/unsafeLifecyclesPolyfill');\n\nvar _unsafeLifecyclesPolyfill2 = _interopRequireDefault(_unsafeLifecyclesPolyfill);\n\nvar _asyncValidator = require('async-validator');\n\nvar _asyncValidator2 = _interopRequireDefault(_asyncValidator);\n\nvar _warning = require('warning');\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _get = require('lodash/get');\n\nvar _get2 = _interopRequireDefault(_get);\n\nvar _set = require('lodash/set');\n\nvar _set2 = _interopRequireDefault(_set);\n\nvar _eq = require('lodash/eq');\n\nvar _eq2 = _interopRequireDefault(_eq);\n\nvar _createFieldsStore = require('./createFieldsStore');\n\nvar _createFieldsStore2 = _interopRequireDefault(_createFieldsStore);\n\nvar _utils = require('./utils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n/* eslint-disable react/prefer-es6-class */\n/* eslint-disable prefer-promise-reject-errors */\n\nvar DEFAULT_TRIGGER = 'onChange';\n\nfunction createBaseForm() {\n var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var mixins = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var validateMessages = option.validateMessages,\n onFieldsChange = option.onFieldsChange,\n onValuesChange = option.onValuesChange,\n _option$mapProps = option.mapProps,\n mapProps = _option$mapProps === undefined ? _utils.identity : _option$mapProps,\n mapPropsToFields = option.mapPropsToFields,\n fieldNameProp = option.fieldNameProp,\n fieldMetaProp = option.fieldMetaProp,\n fieldDataProp = option.fieldDataProp,\n _option$formPropName = option.formPropName,\n formPropName = _option$formPropName === undefined ? 'form' : _option$formPropName,\n formName = option.name,\n withRef = option.withRef;\n\n\n return function decorate(WrappedComponent) {\n var Form = (0, _createReactClass2['default'])({\n displayName: 'Form',\n\n mixins: mixins,\n\n getInitialState: function getInitialState() {\n var _this = this;\n\n var fields = mapPropsToFields && mapPropsToFields(this.props);\n this.fieldsStore = (0, _createFieldsStore2['default'])(fields || {});\n\n this.instances = {};\n this.cachedBind = {};\n this.clearedFieldMetaCache = {};\n\n this.renderFields = {};\n this.domFields = {};\n\n // HACK: https://github.com/ant-design/ant-design/issues/6406\n ['getFieldsValue', 'getFieldValue', 'setFieldsInitialValue', 'getFieldsError', 'getFieldError', 'isFieldValidating', 'isFieldsValidating', 'isFieldsTouched', 'isFieldTouched'].forEach(function (key) {\n _this[key] = function () {\n var _fieldsStore;\n\n if (process.env.NODE_ENV !== 'production') {\n (0, _warning2['default'])(false, 'you should not use `ref` on enhanced form, please use `wrappedComponentRef`. ' + 'See: https://github.com/react-component/form#note-use-wrappedcomponentref-instead-of-withref-after-rc-form140');\n }\n return (_fieldsStore = _this.fieldsStore)[key].apply(_fieldsStore, arguments);\n };\n });\n\n return {\n submitting: false\n };\n },\n componentDidMount: function componentDidMount() {\n this.cleanUpUselessFields();\n },\n componentWillReceiveProps: function componentWillReceiveProps(nextProps) {\n if (mapPropsToFields) {\n this.fieldsStore.updateFields(mapPropsToFields(nextProps));\n }\n },\n componentDidUpdate: function componentDidUpdate() {\n this.cleanUpUselessFields();\n },\n onCollectCommon: function onCollectCommon(name, action, args) {\n var fieldMeta = this.fieldsStore.getFieldMeta(name);\n if (fieldMeta[action]) {\n fieldMeta[action].apply(fieldMeta, (0, _toConsumableArray3['default'])(args));\n } else if (fieldMeta.originalProps && fieldMeta.originalProps[action]) {\n var _fieldMeta$originalPr;\n\n (_fieldMeta$originalPr = fieldMeta.originalProps)[action].apply(_fieldMeta$originalPr, (0, _toConsumableArray3['default'])(args));\n }\n var value = fieldMeta.getValueFromEvent ? fieldMeta.getValueFromEvent.apply(fieldMeta, (0, _toConsumableArray3['default'])(args)) : _utils.getValueFromEvent.apply(undefined, (0, _toConsumableArray3['default'])(args));\n if (onValuesChange && value !== this.fieldsStore.getFieldValue(name)) {\n var valuesAll = this.fieldsStore.getAllValues();\n var valuesAllSet = {};\n valuesAll[name] = value;\n Object.keys(valuesAll).forEach(function (key) {\n return (0, _set2['default'])(valuesAllSet, key, valuesAll[key]);\n });\n onValuesChange((0, _extends6['default'])((0, _defineProperty3['default'])({}, formPropName, this.getForm()), this.props), (0, _set2['default'])({}, name, value), valuesAllSet);\n }\n var field = this.fieldsStore.getField(name);\n return { name: name, field: (0, _extends6['default'])({}, field, { value: value, touched: true }), fieldMeta: fieldMeta };\n },\n onCollect: function onCollect(name_, action) {\n for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n var _onCollectCommon = this.onCollectCommon(name_, action, args),\n name = _onCollectCommon.name,\n field = _onCollectCommon.field,\n fieldMeta = _onCollectCommon.fieldMeta;\n\n var validate = fieldMeta.validate;\n\n\n this.fieldsStore.setFieldsAsDirty();\n\n var newField = (0, _extends6['default'])({}, field, {\n dirty: (0, _utils.hasRules)(validate)\n });\n this.setFields((0, _defineProperty3['default'])({}, name, newField));\n },\n onCollectValidate: function onCollectValidate(name_, action) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n var _onCollectCommon2 = this.onCollectCommon(name_, action, args),\n field = _onCollectCommon2.field,\n fieldMeta = _onCollectCommon2.fieldMeta;\n\n var newField = (0, _extends6['default'])({}, field, {\n dirty: true\n });\n\n this.fieldsStore.setFieldsAsDirty();\n\n this.validateFieldsInternal([newField], {\n action: action,\n options: {\n firstFields: !!fieldMeta.validateFirst\n }\n });\n },\n getCacheBind: function getCacheBind(name, action, fn) {\n if (!this.cachedBind[name]) {\n this.cachedBind[name] = {};\n }\n var cache = this.cachedBind[name];\n if (!cache[action] || cache[action].oriFn !== fn) {\n cache[action] = {\n fn: fn.bind(this, name, action),\n oriFn: fn\n };\n }\n return cache[action].fn;\n },\n getFieldDecorator: function getFieldDecorator(name, fieldOption) {\n var _this2 = this;\n\n var props = this.getFieldProps(name, fieldOption);\n return function (fieldElem) {\n // We should put field in record if it is rendered\n _this2.renderFields[name] = true;\n\n var fieldMeta = _this2.fieldsStore.getFieldMeta(name);\n var originalProps = fieldElem.props;\n if (process.env.NODE_ENV !== 'production') {\n var valuePropName = fieldMeta.valuePropName;\n (0, _warning2['default'])(!(valuePropName in originalProps), '`getFieldDecorator` will override `' + valuePropName + '`, ' + ('so please don\\'t set `' + valuePropName + '` directly ') + 'and use `setFieldsValue` to set it.');\n var defaultValuePropName = 'default' + valuePropName[0].toUpperCase() + valuePropName.slice(1);\n (0, _warning2['default'])(!(defaultValuePropName in originalProps), '`' + defaultValuePropName + '` is invalid ' + ('for `getFieldDecorator` will set `' + valuePropName + '`,') + ' please use `option.initialValue` instead.');\n }\n fieldMeta.originalProps = originalProps;\n fieldMeta.ref = fieldElem.ref;\n return _react2['default'].cloneElement(fieldElem, (0, _extends6['default'])({}, props, _this2.fieldsStore.getFieldValuePropValue(fieldMeta)));\n };\n },\n getFieldProps: function getFieldProps(name) {\n var _this3 = this;\n\n var usersFieldOption = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!name) {\n throw new Error('Must call `getFieldProps` with valid name string!');\n }\n if (process.env.NODE_ENV !== 'production') {\n (0, _warning2['default'])(this.fieldsStore.isValidNestedFieldName(name), 'One field name cannot be part of another, e.g. `a` and `a.b`. Check field: ' + name);\n (0, _warning2['default'])(!('exclusive' in usersFieldOption), '`option.exclusive` of `getFieldProps`|`getFieldDecorator` had been remove.');\n }\n\n delete this.clearedFieldMetaCache[name];\n\n var fieldOption = (0, _extends6['default'])({\n name: name,\n trigger: DEFAULT_TRIGGER,\n valuePropName: 'value',\n validate: []\n }, usersFieldOption);\n\n var rules = fieldOption.rules,\n trigger = fieldOption.trigger,\n _fieldOption$validate = fieldOption.validateTrigger,\n validateTrigger = _fieldOption$validate === undefined ? trigger : _fieldOption$validate,\n validate = fieldOption.validate;\n\n\n var fieldMeta = this.fieldsStore.getFieldMeta(name);\n if ('initialValue' in fieldOption) {\n fieldMeta.initialValue = fieldOption.initialValue;\n }\n\n var inputProps = (0, _extends6['default'])({}, this.fieldsStore.getFieldValuePropValue(fieldOption), {\n ref: this.getCacheBind(name, name + '__ref', this.saveRef)\n });\n if (fieldNameProp) {\n inputProps[fieldNameProp] = formName ? formName + '_' + name : name;\n }\n\n var validateRules = (0, _utils.normalizeValidateRules)(validate, rules, validateTrigger);\n var validateTriggers = (0, _utils.getValidateTriggers)(validateRules);\n validateTriggers.forEach(function (action) {\n if (inputProps[action]) return;\n inputProps[action] = _this3.getCacheBind(name, action, _this3.onCollectValidate);\n });\n\n // make sure that the value will be collect\n if (trigger && validateTriggers.indexOf(trigger) === -1) {\n inputProps[trigger] = this.getCacheBind(name, trigger, this.onCollect);\n }\n\n var meta = (0, _extends6['default'])({}, fieldMeta, fieldOption, {\n validate: validateRules\n });\n this.fieldsStore.setFieldMeta(name, meta);\n if (fieldMetaProp) {\n inputProps[fieldMetaProp] = meta;\n }\n\n if (fieldDataProp) {\n inputProps[fieldDataProp] = this.fieldsStore.getField(name);\n }\n\n // This field is rendered, record it\n this.renderFields[name] = true;\n\n return inputProps;\n },\n getFieldInstance: function getFieldInstance(name) {\n return this.instances[name];\n },\n getRules: function getRules(fieldMeta, action) {\n var actionRules = fieldMeta.validate.filter(function (item) {\n return !action || item.trigger.indexOf(action) >= 0;\n }).map(function (item) {\n return item.rules;\n });\n return (0, _utils.flattenArray)(actionRules);\n },\n setFields: function setFields(maybeNestedFields, callback) {\n var _this4 = this;\n\n var fields = this.fieldsStore.flattenRegisteredFields(maybeNestedFields);\n this.fieldsStore.setFields(fields);\n if (onFieldsChange) {\n var changedFields = Object.keys(fields).reduce(function (acc, name) {\n return (0, _set2['default'])(acc, name, _this4.fieldsStore.getField(name));\n }, {});\n onFieldsChange((0, _extends6['default'])((0, _defineProperty3['default'])({}, formPropName, this.getForm()), this.props), changedFields, this.fieldsStore.getNestedAllFields());\n }\n this.forceUpdate(callback);\n },\n setFieldsValue: function setFieldsValue(changedValues, callback) {\n var fieldsMeta = this.fieldsStore.fieldsMeta;\n\n var values = this.fieldsStore.flattenRegisteredFields(changedValues);\n var newFields = Object.keys(values).reduce(function (acc, name) {\n var isRegistered = fieldsMeta[name];\n if (process.env.NODE_ENV !== 'production') {\n (0, _warning2['default'])(isRegistered, 'Cannot use `setFieldsValue` until ' + 'you use `getFieldDecorator` or `getFieldProps` to register it.');\n }\n if (isRegistered) {\n var value = values[name];\n acc[name] = {\n value: value\n };\n }\n return acc;\n }, {});\n this.setFields(newFields, callback);\n if (onValuesChange) {\n var allValues = this.fieldsStore.getAllValues();\n onValuesChange((0, _extends6['default'])((0, _defineProperty3['default'])({}, formPropName, this.getForm()), this.props), changedValues, allValues);\n }\n },\n saveRef: function saveRef(name, _, component) {\n if (!component) {\n var _fieldMeta = this.fieldsStore.getFieldMeta(name);\n if (!_fieldMeta.preserve) {\n // after destroy, delete data\n this.clearedFieldMetaCache[name] = {\n field: this.fieldsStore.getField(name),\n meta: _fieldMeta\n };\n this.clearField(name);\n }\n delete this.domFields[name];\n return;\n }\n this.domFields[name] = true;\n this.recoverClearedField(name);\n var fieldMeta = this.fieldsStore.getFieldMeta(name);\n if (fieldMeta) {\n var ref = fieldMeta.ref;\n if (ref) {\n if (typeof ref === 'string') {\n throw new Error('can not set ref string for ' + name);\n } else if (typeof ref === 'function') {\n ref(component);\n } else if (Object.prototype.hasOwnProperty.call(ref, 'current')) {\n ref.current = component;\n }\n }\n }\n this.instances[name] = component;\n },\n cleanUpUselessFields: function cleanUpUselessFields() {\n var _this5 = this;\n\n var fieldList = this.fieldsStore.getAllFieldsName();\n var removedList = fieldList.filter(function (field) {\n var fieldMeta = _this5.fieldsStore.getFieldMeta(field);\n return !_this5.renderFields[field] && !_this5.domFields[field] && !fieldMeta.preserve;\n });\n if (removedList.length) {\n removedList.forEach(this.clearField);\n }\n this.renderFields = {};\n },\n clearField: function clearField(name) {\n this.fieldsStore.clearField(name);\n delete this.instances[name];\n delete this.cachedBind[name];\n },\n resetFields: function resetFields(ns) {\n var _this6 = this;\n\n var newFields = this.fieldsStore.resetFields(ns);\n if (Object.keys(newFields).length > 0) {\n this.setFields(newFields);\n }\n if (ns) {\n var names = Array.isArray(ns) ? ns : [ns];\n names.forEach(function (name) {\n return delete _this6.clearedFieldMetaCache[name];\n });\n } else {\n this.clearedFieldMetaCache = {};\n }\n },\n recoverClearedField: function recoverClearedField(name) {\n if (this.clearedFieldMetaCache[name]) {\n this.fieldsStore.setFields((0, _defineProperty3['default'])({}, name, this.clearedFieldMetaCache[name].field));\n this.fieldsStore.setFieldMeta(name, this.clearedFieldMetaCache[name].meta);\n delete this.clearedFieldMetaCache[name];\n }\n },\n validateFieldsInternal: function validateFieldsInternal(fields, _ref, callback) {\n var _this7 = this;\n\n var fieldNames = _ref.fieldNames,\n action = _ref.action,\n _ref$options = _ref.options,\n options = _ref$options === undefined ? {} : _ref$options;\n\n var allRules = {};\n var allValues = {};\n var allFields = {};\n var alreadyErrors = {};\n fields.forEach(function (field) {\n var name = field.name;\n if (options.force !== true && field.dirty === false) {\n if (field.errors) {\n (0, _set2['default'])(alreadyErrors, name, { errors: field.errors });\n }\n return;\n }\n var fieldMeta = _this7.fieldsStore.getFieldMeta(name);\n var newField = (0, _extends6['default'])({}, field);\n newField.errors = undefined;\n newField.validating = true;\n newField.dirty = true;\n allRules[name] = _this7.getRules(fieldMeta, action);\n allValues[name] = newField.value;\n allFields[name] = newField;\n });\n this.setFields(allFields);\n // in case normalize\n Object.keys(allValues).forEach(function (f) {\n allValues[f] = _this7.fieldsStore.getFieldValue(f);\n });\n if (callback && (0, _utils.isEmptyObject)(allFields)) {\n callback((0, _utils.isEmptyObject)(alreadyErrors) ? null : alreadyErrors, this.fieldsStore.getFieldsValue(fieldNames));\n return;\n }\n var validator = new _asyncValidator2['default'](allRules);\n if (validateMessages) {\n validator.messages(validateMessages);\n }\n validator.validate(allValues, options, function (errors) {\n var errorsGroup = (0, _extends6['default'])({}, alreadyErrors);\n if (errors && errors.length) {\n errors.forEach(function (e) {\n var errorFieldName = e.field;\n var fieldName = errorFieldName;\n\n // Handle using array validation rule.\n // ref: https://github.com/ant-design/ant-design/issues/14275\n Object.keys(allRules).some(function (ruleFieldName) {\n var rules = allRules[ruleFieldName] || [];\n\n // Exist if match rule\n if (ruleFieldName === errorFieldName) {\n fieldName = ruleFieldName;\n return true;\n }\n\n // Skip if not match array type\n if (rules.every(function (_ref2) {\n var type = _ref2.type;\n return type !== 'array';\n }) || errorFieldName.indexOf(ruleFieldName + '.') !== 0) {\n return false;\n }\n\n // Exist if match the field name\n var restPath = errorFieldName.slice(ruleFieldName.length + 1);\n if (/^\\d+$/.test(restPath)) {\n fieldName = ruleFieldName;\n return true;\n }\n\n return false;\n });\n\n var field = (0, _get2['default'])(errorsGroup, fieldName);\n if (typeof field !== 'object' || Array.isArray(field)) {\n (0, _set2['default'])(errorsGroup, fieldName, { errors: [] });\n }\n var fieldErrors = (0, _get2['default'])(errorsGroup, fieldName.concat('.errors'));\n fieldErrors.push(e);\n });\n }\n var expired = [];\n var nowAllFields = {};\n Object.keys(allRules).forEach(function (name) {\n var fieldErrors = (0, _get2['default'])(errorsGroup, name);\n var nowField = _this7.fieldsStore.getField(name);\n // avoid concurrency problems\n if (!(0, _eq2['default'])(nowField.value, allValues[name])) {\n expired.push({\n name: name\n });\n } else {\n nowField.errors = fieldErrors && fieldErrors.errors;\n nowField.value = allValues[name];\n nowField.validating = false;\n nowField.dirty = false;\n nowAllFields[name] = nowField;\n }\n });\n _this7.setFields(nowAllFields);\n if (callback) {\n if (expired.length) {\n expired.forEach(function (_ref3) {\n var name = _ref3.name;\n\n var fieldErrors = [{\n message: name + ' need to revalidate',\n field: name\n }];\n (0, _set2['default'])(errorsGroup, name, {\n expired: true,\n errors: fieldErrors\n });\n });\n }\n\n callback((0, _utils.isEmptyObject)(errorsGroup) ? null : errorsGroup, _this7.fieldsStore.getFieldsValue(fieldNames));\n }\n });\n },\n validateFields: function validateFields(ns, opt, cb) {\n var _this8 = this;\n\n var pending = new Promise(function (resolve, reject) {\n var _getParams = (0, _utils.getParams)(ns, opt, cb),\n names = _getParams.names,\n options = _getParams.options;\n\n var _getParams2 = (0, _utils.getParams)(ns, opt, cb),\n callback = _getParams2.callback;\n\n if (!callback || typeof callback === 'function') {\n var oldCb = callback;\n callback = function callback(errors, values) {\n if (oldCb) {\n oldCb(errors, values);\n }\n if (errors) {\n reject({ errors: errors, values: values });\n } else {\n resolve(values);\n }\n };\n }\n var fieldNames = names ? _this8.fieldsStore.getValidFieldsFullName(names) : _this8.fieldsStore.getValidFieldsName();\n var fields = fieldNames.filter(function (name) {\n var fieldMeta = _this8.fieldsStore.getFieldMeta(name);\n return (0, _utils.hasRules)(fieldMeta.validate);\n }).map(function (name) {\n var field = _this8.fieldsStore.getField(name);\n field.value = _this8.fieldsStore.getFieldValue(name);\n return field;\n });\n if (!fields.length) {\n callback(null, _this8.fieldsStore.getFieldsValue(fieldNames));\n return;\n }\n if (!('firstFields' in options)) {\n options.firstFields = fieldNames.filter(function (name) {\n var fieldMeta = _this8.fieldsStore.getFieldMeta(name);\n return !!fieldMeta.validateFirst;\n });\n }\n _this8.validateFieldsInternal(fields, {\n fieldNames: fieldNames,\n options: options\n }, callback);\n });\n pending['catch'](function (e) {\n // eslint-disable-next-line no-console\n if (console.error && process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error(e);\n }\n return e;\n });\n return pending;\n },\n isSubmitting: function isSubmitting() {\n if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') {\n (0, _warning2['default'])(false, '`isSubmitting` is deprecated. ' + \"Actually, it's more convenient to handle submitting status by yourself.\");\n }\n return this.state.submitting;\n },\n submit: function submit(callback) {\n var _this9 = this;\n\n if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') {\n (0, _warning2['default'])(false, '`submit` is deprecated. ' + \"Actually, it's more convenient to handle submitting status by yourself.\");\n }\n var fn = function fn() {\n _this9.setState({\n submitting: false\n });\n };\n this.setState({\n submitting: true\n });\n callback(fn);\n },\n render: function render() {\n var _props = this.props,\n wrappedComponentRef = _props.wrappedComponentRef,\n restProps = (0, _objectWithoutProperties3['default'])(_props, ['wrappedComponentRef']); // eslint-disable-line\n\n var formProps = (0, _defineProperty3['default'])({}, formPropName, this.getForm());\n if (withRef) {\n if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') {\n (0, _warning2['default'])(false, '`withRef` is deprecated, please use `wrappedComponentRef` instead. ' + 'See: https://github.com/react-component/form#note-use-wrappedcomponentref-instead-of-withref-after-rc-form140');\n }\n formProps.ref = 'wrappedComponent';\n } else if (wrappedComponentRef) {\n formProps.ref = wrappedComponentRef;\n }\n var props = mapProps.call(this, (0, _extends6['default'])({}, formProps, restProps));\n return _react2['default'].createElement(WrappedComponent, props);\n }\n });\n\n return (0, _utils.argumentContainer)((0, _unsafeLifecyclesPolyfill2['default'])(Form), WrappedComponent);\n };\n}\n\nexports['default'] = createBaseForm;\nmodule.exports = exports['default'];","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require(\"babel-runtime/helpers/extends\");\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _classCallCheck2 = require(\"babel-runtime/helpers/classCallCheck\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nexports.isFormField = isFormField;\nexports[\"default\"] = createFormField;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar Field = function Field(fields) {\n (0, _classCallCheck3[\"default\"])(this, Field);\n\n (0, _extends3[\"default\"])(this, fields);\n};\n\nfunction isFormField(obj) {\n return obj instanceof Field;\n}\n\nfunction createFormField(field) {\n if (isFormField(field)) {\n return field;\n }\n return new Field(field);\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends2 = require('babel-runtime/helpers/extends');\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _reactDom = require('react-dom');\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _domScrollIntoView = require('dom-scroll-into-view');\n\nvar _domScrollIntoView2 = _interopRequireDefault(_domScrollIntoView);\n\nvar _has = require('lodash/has');\n\nvar _has2 = _interopRequireDefault(_has);\n\nvar _createBaseForm = require('./createBaseForm');\n\nvar _createBaseForm2 = _interopRequireDefault(_createBaseForm);\n\nvar _createForm = require('./createForm');\n\nvar _utils = require('./utils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction computedStyle(el, prop) {\n var getComputedStyle = window.getComputedStyle;\n var style =\n // If we have getComputedStyle\n getComputedStyle ?\n // Query it\n // TODO: From CSS-Query notes, we might need (node, null) for FF\n getComputedStyle(el) :\n\n // Otherwise, we are in IE and use currentStyle\n el.currentStyle;\n if (style) {\n return style[\n // Switch to camelCase for CSSOM\n // DEV: Grabbed from jQuery\n // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194\n // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597\n prop.replace(/-(\\w)/gi, function (word, letter) {\n return letter.toUpperCase();\n })];\n }\n return undefined;\n}\n\nfunction getScrollableContainer(n) {\n var node = n;\n var nodeName = void 0;\n /* eslint no-cond-assign:0 */\n while ((nodeName = node.nodeName.toLowerCase()) !== 'body') {\n var overflowY = computedStyle(node, 'overflowY');\n // https://stackoverflow.com/a/36900407/3040605\n if (node !== n && (overflowY === 'auto' || overflowY === 'scroll') && node.scrollHeight > node.clientHeight) {\n return node;\n }\n node = node.parentNode;\n }\n return nodeName === 'body' ? node.ownerDocument : node;\n}\n\nvar mixin = {\n getForm: function getForm() {\n return (0, _extends3['default'])({}, _createForm.mixin.getForm.call(this), {\n validateFieldsAndScroll: this.validateFieldsAndScroll\n });\n },\n validateFieldsAndScroll: function validateFieldsAndScroll(ns, opt, cb) {\n var _this = this;\n\n var _getParams = (0, _utils.getParams)(ns, opt, cb),\n names = _getParams.names,\n callback = _getParams.callback,\n options = _getParams.options;\n\n var newCb = function newCb(error, values) {\n if (error) {\n var validNames = _this.fieldsStore.getValidFieldsName();\n var firstNode = void 0;\n var firstTop = void 0;\n\n validNames.forEach(function (name) {\n if ((0, _has2['default'])(error, name)) {\n var instance = _this.getFieldInstance(name);\n if (instance) {\n var node = _reactDom2['default'].findDOMNode(instance);\n var top = node.getBoundingClientRect().top;\n if (node.type !== 'hidden' && (firstTop === undefined || firstTop > top)) {\n firstTop = top;\n firstNode = node;\n }\n }\n }\n });\n\n if (firstNode) {\n var c = options.container || getScrollableContainer(firstNode);\n (0, _domScrollIntoView2['default'])(firstNode, c, (0, _extends3['default'])({\n onlyScrollIfNeeded: true\n }, options.scroll));\n }\n }\n\n if (typeof callback === 'function') {\n callback(error, values);\n }\n };\n\n return this.validateFields(names, options, newCb);\n }\n};\n\nfunction createDOMForm(option) {\n return (0, _createBaseForm2['default'])((0, _extends3['default'])({}, option), [mixin]);\n}\n\nexports['default'] = createDOMForm;\nmodule.exports = exports['default'];","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar React = require('react');\nvar factory = require('./factory');\n\nif (typeof React === 'undefined') {\n throw Error(\n 'create-react-class could not find the React object. If you are using script tags, ' +\n 'make sure that React is being loaded before create-react-class.'\n );\n}\n\n// Hack to grab NoopUpdateQueue from isomorphic React\nvar ReactNoopUpdateQueue = new React.Component().updater;\n\nmodule.exports = factory(\n React.Component,\n React.isValidElement,\n ReactNoopUpdateQueue\n);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar emptyObject = require('fbjs/lib/emptyObject');\nvar _invariant = require('fbjs/lib/invariant');\n\nif (process.env.NODE_ENV !== 'production') {\n var warning = require('fbjs/lib/warning');\n}\n\nvar MIXINS_KEY = 'mixins';\n\n// Helper function to allow the creation of anonymous functions which do not\n// have .name set to the name of the variable being assigned to.\nfunction identity(fn) {\n return fn;\n}\n\nvar ReactPropTypeLocationNames;\nif (process.env.NODE_ENV !== 'production') {\n ReactPropTypeLocationNames = {\n prop: 'prop',\n context: 'context',\n childContext: 'child context'\n };\n} else {\n ReactPropTypeLocationNames = {};\n}\n\nfunction factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {\n /**\n * Policies that describe methods in `ReactClassInterface`.\n */\n\n var injectedMixins = [];\n\n /**\n * Composite components are higher-level components that compose other composite\n * or host components.\n *\n * To create a new type of `ReactClass`, pass a specification of\n * your new class to `React.createClass`. The only requirement of your class\n * specification is that you implement a `render` method.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return