{"version":3,"sources":["webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/extends.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/createSuper.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/es/FieldContext.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/es/utils/messages.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/es/utils/validateUtil.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/es/Field.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/es/ListContext.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/es/List.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/es/utils/asyncUtil.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/es/utils/NameMap.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/es/useForm.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/es/FormContext.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/es/Form.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/es/useWatch.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/es/index.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/es/utils/cloneDeep.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/es/utils/typeUtil.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/es/utils/valueUtil.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/objectSpread2.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://crmWeb/../code-generation/platform/dependencies/node_modules/rc-field-form/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"],"names":[],"mappings":"qVAAA,YAAoB,CAClB,MAAO,GAAW,OAAO,OAAS,OAAO,OAAO,OAAS,SAAU,EAAG,CACpE,OAAS,GAAI,EAAG,EAAI,UAAU,OAAQ,IAAK,CACzC,GAAI,GAAI,UAAU,GAClB,OAAS,KAAK,GAAI,KAAI,eAAe,KAAK,EAAG,IAAO,GAAE,GAAK,EAAE,IAE/D,MAAO,IACN,EAAS,MAAM,KAAM,WCP1B,WAAuC,EAAG,EAAG,CAC3C,GAAI,QAAW,MAAO,GACtB,GAAI,GAAI,GACR,OAAS,KAAK,GAAG,GAAI,GAAG,eAAe,KAAK,EAAG,GAAI,CACjD,GAAI,EAAE,QAAQ,IAAM,EAAG,SACvB,EAAE,GAAK,EAAE,GAEX,MAAO,GCNT,WAAk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MAAqB,SAArB,YAA+B,EAAE,cAAgB,QAAU,IAAM,OAAO,UAAY,SAAW,MAAO,IACjH,EAAQ,K,oECNb,WAAqC,EAAG,EAAG,CACzC,GAAI,EAAG,CACL,GAAI,MAAmB,IAAnB,SAAsB,MAAO,QAAiB,EAAG,GACrD,GAAI,GAAI,GAAG,SAAS,KAAK,GAAG,MAAM,EAAG,IACrC,MAAO,eAAkB,EAAE,aAAgB,GAAI,EAAE,YAAY,MAAO,WAAe,UAAc,MAAM,KAAK,GAAK,iBAAqB,2CAA2C,KAAK,GAAK,QAAiB,EAAG,GAAK","file":"nm.rc-field-form.0b5e6eeccca0982bf5f9.js","sourcesContent":["function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.indexOf(n) >= 0) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nfunction _objectWithoutProperties(e, t) {\n if (null == e) return {};\n var o,\n r,\n i = objectWithoutPropertiesLoose(e, t);\n if (Object.getOwnPropertySymbols) {\n var n = Object.getOwnPropertySymbols(e);\n for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n }\n return i;\n}\nexport { _objectWithoutProperties as default };","function _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nexport { _classCallCheck as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);\n }\n}\nfunction _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n}\nexport { _createClass as default };","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nexport { _assertThisInitialized as default };","function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inherits(t, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e && setPrototypeOf(t, e);\n}\nexport { _inherits as default };","function _getPrototypeOf(t) {\n return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, _getPrototypeOf(t);\n}\nexport { _getPrototypeOf as default };","function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n })();\n}\nexport { _isNativeReflectConstruct as default };","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nfunction _possibleConstructorReturn(t, e) {\n if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e;\n if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return assertThisInitialized(t);\n}\nexport { _possibleConstructorReturn as default };","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nimport possibleConstructorReturn from \"./possibleConstructorReturn.js\";\nfunction _createSuper(t) {\n var r = isNativeReflectConstruct();\n return function () {\n var e,\n o = getPrototypeOf(t);\n if (r) {\n var s = getPrototypeOf(this).constructor;\n e = Reflect.construct(o, arguments, s);\n } else e = o.apply(this, arguments);\n return possibleConstructorReturn(this, e);\n };\n}\nexport { _createSuper as default };","import warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nexport var HOOK_MARK = 'RC_FORM_INTERNAL_HOOKS';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nvar warningFunc = function warningFunc() {\n warning(false, 'Can not find FormContext. Please make sure you wrap Field under Form.');\n};\nvar Context = /*#__PURE__*/React.createContext({\n getFieldValue: warningFunc,\n getFieldsValue: warningFunc,\n getFieldError: warningFunc,\n getFieldWarning: warningFunc,\n getFieldsError: warningFunc,\n isFieldsTouched: warningFunc,\n isFieldTouched: warningFunc,\n isFieldValidating: warningFunc,\n isFieldsValidating: warningFunc,\n resetFields: warningFunc,\n setFields: warningFunc,\n setFieldValue: warningFunc,\n setFieldsValue: warningFunc,\n validateFields: warningFunc,\n submit: warningFunc,\n getInternalHooks: function getInternalHooks() {\n warningFunc();\n return {\n dispatch: warningFunc,\n initEntityValue: warningFunc,\n registerField: warningFunc,\n useSubscribe: warningFunc,\n setInitialValues: warningFunc,\n destroyForm: warningFunc,\n setCallbacks: warningFunc,\n registerWatch: warningFunc,\n getFields: warningFunc,\n setValidateMessages: warningFunc,\n setPreserve: warningFunc,\n getInitialValue: warningFunc\n };\n }\n});\nexport default Context;","import _typeof from \"./typeof.js\";\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n };\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nexport { _regeneratorRuntime as default };","function asyncGeneratorStep(n, t, e, r, o, a, c) {\n try {\n var i = n[a](c),\n u = i.value;\n } catch (n) {\n return void e(n);\n }\n i.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n return function () {\n var t = this,\n e = arguments;\n return new Promise(function (r, o) {\n var a = n.apply(t, e);\n function _next(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n);\n }\n function _throw(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n);\n }\n _next(void 0);\n });\n };\n}\nexport { _asyncToGenerator as default };","var typeTemplate = \"'${name}' is not a valid ${type}\";\nexport var defaultValidateMessages = {\n default: \"Validation error on field '${name}'\",\n required: \"'${name}' is required\",\n enum: \"'${name}' must be one of [${enum}]\",\n whitespace: \"'${name}' cannot be empty\",\n date: {\n format: \"'${name}' is invalid for format date\",\n parse: \"'${name}' could not be parsed as date\",\n invalid: \"'${name}' is invalid date\"\n },\n types: {\n string: typeTemplate,\n method: typeTemplate,\n array: typeTemplate,\n object: typeTemplate,\n number: typeTemplate,\n date: typeTemplate,\n boolean: typeTemplate,\n integer: typeTemplate,\n float: typeTemplate,\n regexp: typeTemplate,\n email: typeTemplate,\n url: typeTemplate,\n hex: typeTemplate\n },\n string: {\n len: \"'${name}' must be exactly ${len} characters\",\n min: \"'${name}' must be at least ${min} characters\",\n max: \"'${name}' cannot be longer than ${max} characters\",\n range: \"'${name}' must be between ${min} and ${max} characters\"\n },\n number: {\n len: \"'${name}' must equal ${len}\",\n min: \"'${name}' cannot be less than ${min}\",\n max: \"'${name}' cannot be greater than ${max}\",\n range: \"'${name}' must be between ${min} and ${max}\"\n },\n array: {\n len: \"'${name}' must be exactly ${len} in length\",\n min: \"'${name}' cannot be less than ${min} in length\",\n max: \"'${name}' cannot be greater than ${max} in length\",\n range: \"'${name}' must be between ${min} and ${max} in length\"\n },\n pattern: {\n mismatch: \"'${name}' does not match pattern ${pattern}\"\n }\n};","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _regeneratorRuntime from \"@babel/runtime/helpers/esm/regeneratorRuntime\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/esm/asyncToGenerator\";\nimport RawAsyncValidator from 'async-validator';\nimport * as React from 'react';\nimport warning from \"rc-util/es/warning\";\nimport { defaultValidateMessages } from './messages';\nimport { setValues } from './valueUtil';\n// Remove incorrect original ts define\nvar AsyncValidator = RawAsyncValidator;\n/**\n * Replace with template.\n * `I'm ${name}` + { name: 'bamboo' } = I'm bamboo\n */\nfunction replaceMessage(template, kv) {\n return template.replace(/\\$\\{\\w+\\}/g, function (str) {\n var key = str.slice(2, -1);\n return kv[key];\n });\n}\nvar CODE_LOGIC_ERROR = 'CODE_LOGIC_ERROR';\nfunction validateRule(_x, _x2, _x3, _x4, _x5) {\n return _validateRule.apply(this, arguments);\n}\n/**\n * We use `async-validator` to validate the value.\n * But only check one value in a time to avoid namePath validate issue.\n */\nfunction _validateRule() {\n _validateRule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(name, value, rule, options, messageVariables) {\n var cloneRule, originValidator, subRuleField, validator, messages, result, subResults, kv, fillVariableResult;\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n cloneRule = _objectSpread({}, rule); // Bug of `async-validator`\n // https://github.com/react-component/field-form/issues/316\n // https://github.com/react-component/field-form/issues/313\n delete cloneRule.ruleIndex;\n if (cloneRule.validator) {\n originValidator = cloneRule.validator;\n cloneRule.validator = function () {\n try {\n return originValidator.apply(void 0, arguments);\n } catch (error) {\n console.error(error);\n return Promise.reject(CODE_LOGIC_ERROR);\n }\n };\n }\n // We should special handle array validate\n subRuleField = null;\n if (cloneRule && cloneRule.type === 'array' && cloneRule.defaultField) {\n subRuleField = cloneRule.defaultField;\n delete cloneRule.defaultField;\n }\n validator = new AsyncValidator(_defineProperty({}, name, [cloneRule]));\n messages = setValues({}, defaultValidateMessages, options.validateMessages);\n validator.messages(messages);\n result = [];\n _context2.prev = 9;\n _context2.next = 12;\n return Promise.resolve(validator.validate(_defineProperty({}, name, value), _objectSpread({}, options)));\n case 12:\n _context2.next = 17;\n break;\n case 14:\n _context2.prev = 14;\n _context2.t0 = _context2[\"catch\"](9);\n if (_context2.t0.errors) {\n result = _context2.t0.errors.map(function (_ref4, index) {\n var message = _ref4.message;\n var mergedMessage = message === CODE_LOGIC_ERROR ? messages.default : message;\n return /*#__PURE__*/React.isValidElement(mergedMessage) ?\n /*#__PURE__*/\n // Wrap ReactNode with `key`\n React.cloneElement(mergedMessage, {\n key: \"error_\".concat(index)\n }) : mergedMessage;\n });\n }\n case 17:\n if (!(!result.length && subRuleField)) {\n _context2.next = 22;\n break;\n }\n _context2.next = 20;\n return Promise.all(value.map(function (subValue, i) {\n return validateRule(\"\".concat(name, \".\").concat(i), subValue, subRuleField, options, messageVariables);\n }));\n case 20:\n subResults = _context2.sent;\n return _context2.abrupt(\"return\", subResults.reduce(function (prev, errors) {\n return [].concat(_toConsumableArray(prev), _toConsumableArray(errors));\n }, []));\n case 22:\n // Replace message with variables\n kv = _objectSpread(_objectSpread({}, rule), {}, {\n name: name,\n enum: (rule.enum || []).join(', ')\n }, messageVariables);\n fillVariableResult = result.map(function (error) {\n if (typeof error === 'string') {\n return replaceMessage(error, kv);\n }\n return error;\n });\n return _context2.abrupt(\"return\", fillVariableResult);\n case 25:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, null, [[9, 14]]);\n }));\n return _validateRule.apply(this, arguments);\n}\nexport function validateRules(namePath, value, rules, options, validateFirst, messageVariables) {\n var name = namePath.join('.');\n // Fill rule with context\n var filledRules = rules.map(function (currentRule, ruleIndex) {\n var originValidatorFunc = currentRule.validator;\n var cloneRule = _objectSpread(_objectSpread({}, currentRule), {}, {\n ruleIndex: ruleIndex\n });\n // Replace validator if needed\n if (originValidatorFunc) {\n cloneRule.validator = function (rule, val, callback) {\n var hasPromise = false;\n // Wrap callback only accept when promise not provided\n var wrappedCallback = function wrappedCallback() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n // Wait a tick to make sure return type is a promise\n Promise.resolve().then(function () {\n warning(!hasPromise, 'Your validator function has already return a promise. `callback` will be ignored.');\n if (!hasPromise) {\n callback.apply(void 0, args);\n }\n });\n };\n // Get promise\n var promise = originValidatorFunc(rule, val, wrappedCallback);\n hasPromise = promise && typeof promise.then === 'function' && typeof promise.catch === 'function';\n /**\n * 1. Use promise as the first priority.\n * 2. If promise not exist, use callback with warning instead\n */\n warning(hasPromise, '`callback` is deprecated. Please return a promise instead.');\n if (hasPromise) {\n promise.then(function () {\n callback();\n }).catch(function (err) {\n callback(err || ' ');\n });\n }\n };\n }\n return cloneRule;\n }).sort(function (_ref, _ref2) {\n var w1 = _ref.warningOnly,\n i1 = _ref.ruleIndex;\n var w2 = _ref2.warningOnly,\n i2 = _ref2.ruleIndex;\n if (!!w1 === !!w2) {\n // Let keep origin order\n return i1 - i2;\n }\n if (w1) {\n return 1;\n }\n return -1;\n });\n // Do validate rules\n var summaryPromise;\n if (validateFirst === true) {\n // >>>>> Validate by serialization\n summaryPromise = new Promise( /*#__PURE__*/function () {\n var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve, reject) {\n var i, rule, errors;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n i = 0;\n case 1:\n if (!(i < filledRules.length)) {\n _context.next = 12;\n break;\n }\n rule = filledRules[i];\n _context.next = 5;\n return validateRule(name, value, rule, options, messageVariables);\n case 5:\n errors = _context.sent;\n if (!errors.length) {\n _context.next = 9;\n break;\n }\n reject([{\n errors: errors,\n rule: rule\n }]);\n return _context.abrupt(\"return\");\n case 9:\n i += 1;\n _context.next = 1;\n break;\n case 12:\n /* eslint-enable */\n resolve([]);\n case 13:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function (_x6, _x7) {\n return _ref3.apply(this, arguments);\n };\n }());\n } else {\n // >>>>> Validate by parallel\n var rulePromises = filledRules.map(function (rule) {\n return validateRule(name, value, rule, options, messageVariables).then(function (errors) {\n return {\n errors: errors,\n rule: rule\n };\n });\n });\n summaryPromise = (validateFirst ? finishOnFirstFailed(rulePromises) : finishOnAllFailed(rulePromises)).then(function (errors) {\n // Always change to rejection for Field to catch\n return Promise.reject(errors);\n });\n }\n // Internal catch error to avoid console error log.\n summaryPromise.catch(function (e) {\n return e;\n });\n return summaryPromise;\n}\nfunction finishOnAllFailed(_x8) {\n return _finishOnAllFailed.apply(this, arguments);\n}\nfunction _finishOnAllFailed() {\n _finishOnAllFailed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(rulePromises) {\n return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n return _context3.abrupt(\"return\", Promise.all(rulePromises).then(function (errorsList) {\n var _ref5;\n var errors = (_ref5 = []).concat.apply(_ref5, _toConsumableArray(errorsList));\n return errors;\n }));\n case 1:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }));\n return _finishOnAllFailed.apply(this, arguments);\n}\nfunction finishOnFirstFailed(_x9) {\n return _finishOnFirstFailed.apply(this, arguments);\n}\nfunction _finishOnFirstFailed() {\n _finishOnFirstFailed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(rulePromises) {\n var count;\n return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n while (1) switch (_context4.prev = _context4.next) {\n case 0:\n count = 0;\n return _context4.abrupt(\"return\", new Promise(function (resolve) {\n rulePromises.forEach(function (promise) {\n promise.then(function (ruleError) {\n if (ruleError.errors.length) {\n resolve([ruleError]);\n }\n count += 1;\n if (count === rulePromises.length) {\n resolve([]);\n }\n });\n });\n }));\n case 2:\n case \"end\":\n return _context4.stop();\n }\n }, _callee4);\n }));\n return _finishOnFirstFailed.apply(this, arguments);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nvar _excluded = [\"name\"];\nimport toChildrenArray from \"rc-util/es/Children/toArray\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport FieldContext, { HOOK_MARK } from './FieldContext';\nimport { toArray } from './utils/typeUtil';\nimport { validateRules } from './utils/validateUtil';\nimport { containsNamePath, defaultGetValueFromEvent, getNamePath, getValue } from './utils/valueUtil';\nvar EMPTY_ERRORS = [];\nfunction requireUpdate(shouldUpdate, prev, next, prevValue, nextValue, info) {\n if (typeof shouldUpdate === 'function') {\n return shouldUpdate(prev, next, 'source' in info ? {\n source: info.source\n } : {});\n }\n return prevValue !== nextValue;\n}\n// We use Class instead of Hooks here since it will cost much code by using Hooks.\nvar Field = /*#__PURE__*/function (_React$Component) {\n _inherits(Field, _React$Component);\n var _super = _createSuper(Field);\n /**\n * Follow state should not management in State since it will async update by React.\n * This makes first render of form can not get correct state value.\n */\n\n /**\n * Mark when touched & validated. Currently only used for `dependencies`.\n * Note that we do not think field with `initialValue` is dirty\n * but this will be by `isFieldDirty` func.\n */\n\n // ============================== Subscriptions ==============================\n function Field(props) {\n var _this;\n _classCallCheck(this, Field);\n _this = _super.call(this, props);\n // Register on init\n _this.state = {\n resetCount: 0\n };\n _this.cancelRegisterFunc = null;\n _this.mounted = false;\n _this.touched = false;\n _this.dirty = false;\n _this.validatePromise = null;\n _this.prevValidating = void 0;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.cancelRegister = function () {\n var _this$props = _this.props,\n preserve = _this$props.preserve,\n isListField = _this$props.isListField,\n name = _this$props.name;\n if (_this.cancelRegisterFunc) {\n _this.cancelRegisterFunc(isListField, preserve, getNamePath(name));\n }\n _this.cancelRegisterFunc = null;\n };\n _this.getNamePath = function () {\n var _this$props2 = _this.props,\n name = _this$props2.name,\n fieldContext = _this$props2.fieldContext;\n var _fieldContext$prefixN = fieldContext.prefixName,\n prefixName = _fieldContext$prefixN === void 0 ? [] : _fieldContext$prefixN;\n return name !== undefined ? [].concat(_toConsumableArray(prefixName), _toConsumableArray(name)) : [];\n };\n _this.getRules = function () {\n var _this$props3 = _this.props,\n _this$props3$rules = _this$props3.rules,\n rules = _this$props3$rules === void 0 ? [] : _this$props3$rules,\n fieldContext = _this$props3.fieldContext;\n return rules.map(function (rule) {\n if (typeof rule === 'function') {\n return rule(fieldContext);\n }\n return rule;\n });\n };\n _this.refresh = function () {\n if (!_this.mounted) return;\n /**\n * Clean up current node.\n */\n _this.setState(function (_ref) {\n var resetCount = _ref.resetCount;\n return {\n resetCount: resetCount + 1\n };\n });\n };\n _this.triggerMetaEvent = function (destroy) {\n var onMetaChange = _this.props.onMetaChange;\n onMetaChange === null || onMetaChange === void 0 ? void 0 : onMetaChange(_objectSpread(_objectSpread({}, _this.getMeta()), {}, {\n destroy: destroy\n }));\n };\n _this.onStoreChange = function (prevStore, namePathList, info) {\n var _this$props4 = _this.props,\n shouldUpdate = _this$props4.shouldUpdate,\n _this$props4$dependen = _this$props4.dependencies,\n dependencies = _this$props4$dependen === void 0 ? [] : _this$props4$dependen,\n onReset = _this$props4.onReset;\n var store = info.store;\n var namePath = _this.getNamePath();\n var prevValue = _this.getValue(prevStore);\n var curValue = _this.getValue(store);\n var namePathMatch = namePathList && containsNamePath(namePathList, namePath);\n // `setFieldsValue` is a quick access to update related status\n if (info.type === 'valueUpdate' && info.source === 'external' && prevValue !== curValue) {\n _this.touched = true;\n _this.dirty = true;\n _this.validatePromise = null;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n }\n switch (info.type) {\n case 'reset':\n if (!namePathList || namePathMatch) {\n // Clean up state\n _this.touched = false;\n _this.dirty = false;\n _this.validatePromise = null;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n onReset === null || onReset === void 0 ? void 0 : onReset();\n _this.refresh();\n return;\n }\n break;\n /**\n * In case field with `preserve = false` nest deps like:\n * - A = 1 => show B\n * - B = 1 => show C\n * - Reset A, need clean B, C\n */\n case 'remove':\n {\n if (shouldUpdate) {\n _this.reRender();\n return;\n }\n break;\n }\n case 'setField':\n {\n if (namePathMatch) {\n var data = info.data;\n if ('touched' in data) {\n _this.touched = data.touched;\n }\n if ('validating' in data && !('originRCField' in data)) {\n _this.validatePromise = data.validating ? Promise.resolve([]) : null;\n }\n if ('errors' in data) {\n _this.errors = data.errors || EMPTY_ERRORS;\n }\n if ('warnings' in data) {\n _this.warnings = data.warnings || EMPTY_ERRORS;\n }\n _this.dirty = true;\n _this.triggerMetaEvent();\n _this.reRender();\n return;\n }\n // Handle update by `setField` with `shouldUpdate`\n if (shouldUpdate && !namePath.length && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n return;\n }\n break;\n }\n case 'dependenciesUpdate':\n {\n /**\n * Trigger when marked `dependencies` updated. Related fields will all update\n */\n var dependencyList = dependencies.map(getNamePath);\n // No need for `namePathMath` check and `shouldUpdate` check, since `valueUpdate` will be\n // emitted earlier and they will work there\n // If set it may cause unnecessary twice rerendering\n if (dependencyList.some(function (dependency) {\n return containsNamePath(info.relatedFields, dependency);\n })) {\n _this.reRender();\n return;\n }\n break;\n }\n default:\n // 1. If `namePath` exists in `namePathList`, means it's related value and should update\n // For example \n // If `namePathList` is [['list']] (List value update), Field should be updated\n // If `namePathList` is [['list', 0]] (Field value update), List shouldn't be updated\n // 2.\n // 2.1 If `dependencies` is set, `name` is not set and `shouldUpdate` is not set,\n // don't use `shouldUpdate`. `dependencies` is view as a shortcut if `shouldUpdate`\n // is not provided\n // 2.2 If `shouldUpdate` provided, use customize logic to update the field\n // else to check if value changed\n if (namePathMatch || (!dependencies.length || namePath.length || shouldUpdate) && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n return;\n }\n break;\n }\n if (shouldUpdate === true) {\n _this.reRender();\n }\n };\n _this.validateRules = function (options) {\n // We should fixed namePath & value to avoid developer change then by form function\n var namePath = _this.getNamePath();\n var currentValue = _this.getValue();\n // Force change to async to avoid rule OOD under renderProps field\n var rootPromise = Promise.resolve().then(function () {\n if (!_this.mounted) {\n return [];\n }\n var _this$props5 = _this.props,\n _this$props5$validate = _this$props5.validateFirst,\n validateFirst = _this$props5$validate === void 0 ? false : _this$props5$validate,\n messageVariables = _this$props5.messageVariables;\n var _ref2 = options || {},\n triggerName = _ref2.triggerName;\n var filteredRules = _this.getRules();\n if (triggerName) {\n filteredRules = filteredRules.filter(function (rule) {\n return rule;\n }).filter(function (rule) {\n var validateTrigger = rule.validateTrigger;\n if (!validateTrigger) {\n return true;\n }\n var triggerList = toArray(validateTrigger);\n return triggerList.includes(triggerName);\n });\n }\n var promise = validateRules(namePath, currentValue, filteredRules, options, validateFirst, messageVariables);\n promise.catch(function (e) {\n return e;\n }).then(function () {\n var ruleErrors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : EMPTY_ERRORS;\n if (_this.validatePromise === rootPromise) {\n var _ruleErrors$forEach;\n _this.validatePromise = null;\n // Get errors & warnings\n var nextErrors = [];\n var nextWarnings = [];\n (_ruleErrors$forEach = ruleErrors.forEach) === null || _ruleErrors$forEach === void 0 ? void 0 : _ruleErrors$forEach.call(ruleErrors, function (_ref3) {\n var warningOnly = _ref3.rule.warningOnly,\n _ref3$errors = _ref3.errors,\n errors = _ref3$errors === void 0 ? EMPTY_ERRORS : _ref3$errors;\n if (warningOnly) {\n nextWarnings.push.apply(nextWarnings, _toConsumableArray(errors));\n } else {\n nextErrors.push.apply(nextErrors, _toConsumableArray(errors));\n }\n });\n _this.errors = nextErrors;\n _this.warnings = nextWarnings;\n _this.triggerMetaEvent();\n _this.reRender();\n }\n });\n return promise;\n });\n _this.validatePromise = rootPromise;\n _this.dirty = true;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n // Force trigger re-render since we need sync renderProps with new meta\n _this.reRender();\n return rootPromise;\n };\n _this.isFieldValidating = function () {\n return !!_this.validatePromise;\n };\n _this.isFieldTouched = function () {\n return _this.touched;\n };\n _this.isFieldDirty = function () {\n // Touched or validate or has initialValue\n if (_this.dirty || _this.props.initialValue !== undefined) {\n return true;\n }\n // Form set initialValue\n var fieldContext = _this.props.fieldContext;\n var _fieldContext$getInte = fieldContext.getInternalHooks(HOOK_MARK),\n getInitialValue = _fieldContext$getInte.getInitialValue;\n if (getInitialValue(_this.getNamePath()) !== undefined) {\n return true;\n }\n return false;\n };\n _this.getErrors = function () {\n return _this.errors;\n };\n _this.getWarnings = function () {\n return _this.warnings;\n };\n _this.isListField = function () {\n return _this.props.isListField;\n };\n _this.isList = function () {\n return _this.props.isList;\n };\n _this.isPreserve = function () {\n return _this.props.preserve;\n };\n _this.getMeta = function () {\n // Make error & validating in cache to save perf\n _this.prevValidating = _this.isFieldValidating();\n var meta = {\n touched: _this.isFieldTouched(),\n validating: _this.prevValidating,\n errors: _this.errors,\n warnings: _this.warnings,\n name: _this.getNamePath()\n };\n return meta;\n };\n _this.getOnlyChild = function (children) {\n // Support render props\n if (typeof children === 'function') {\n var meta = _this.getMeta();\n return _objectSpread(_objectSpread({}, _this.getOnlyChild(children(_this.getControlled(), meta, _this.props.fieldContext))), {}, {\n isFunction: true\n });\n }\n // Filed element only\n var childList = toChildrenArray(children);\n if (childList.length !== 1 || ! /*#__PURE__*/React.isValidElement(childList[0])) {\n return {\n child: childList,\n isFunction: false\n };\n }\n return {\n child: childList[0],\n isFunction: false\n };\n };\n _this.getValue = function (store) {\n var getFieldsValue = _this.props.fieldContext.getFieldsValue;\n var namePath = _this.getNamePath();\n return getValue(store || getFieldsValue(true), namePath);\n };\n _this.getControlled = function () {\n var childProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _this$props6 = _this.props,\n trigger = _this$props6.trigger,\n validateTrigger = _this$props6.validateTrigger,\n getValueFromEvent = _this$props6.getValueFromEvent,\n normalize = _this$props6.normalize,\n valuePropName = _this$props6.valuePropName,\n getValueProps = _this$props6.getValueProps,\n fieldContext = _this$props6.fieldContext;\n var mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : fieldContext.validateTrigger;\n var namePath = _this.getNamePath();\n var getInternalHooks = fieldContext.getInternalHooks,\n getFieldsValue = fieldContext.getFieldsValue;\n var _getInternalHooks = getInternalHooks(HOOK_MARK),\n dispatch = _getInternalHooks.dispatch;\n var value = _this.getValue();\n var mergedGetValueProps = getValueProps || function (val) {\n return _defineProperty({}, valuePropName, val);\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var originTriggerFunc = childProps[trigger];\n var control = _objectSpread(_objectSpread({}, childProps), mergedGetValueProps(value));\n // Add trigger\n control[trigger] = function () {\n // Mark as touched\n _this.touched = true;\n _this.dirty = true;\n _this.triggerMetaEvent();\n var newValue;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (getValueFromEvent) {\n newValue = getValueFromEvent.apply(void 0, args);\n } else {\n newValue = defaultGetValueFromEvent.apply(void 0, [valuePropName].concat(args));\n }\n if (normalize) {\n newValue = normalize(newValue, value, getFieldsValue(true));\n }\n dispatch({\n type: 'updateValue',\n namePath: namePath,\n value: newValue\n });\n if (originTriggerFunc) {\n originTriggerFunc.apply(void 0, args);\n }\n };\n // Add validateTrigger\n var validateTriggerList = toArray(mergedValidateTrigger || []);\n validateTriggerList.forEach(function (triggerName) {\n // Wrap additional function of component, so that we can get latest value from store\n var originTrigger = control[triggerName];\n control[triggerName] = function () {\n if (originTrigger) {\n originTrigger.apply(void 0, arguments);\n }\n // Always use latest rules\n var rules = _this.props.rules;\n if (rules && rules.length) {\n // We dispatch validate to root,\n // since it will update related data with other field with same name\n dispatch({\n type: 'validateField',\n namePath: namePath,\n triggerName: triggerName\n });\n }\n };\n });\n return control;\n };\n if (props.fieldContext) {\n var getInternalHooks = props.fieldContext.getInternalHooks;\n var _getInternalHooks2 = getInternalHooks(HOOK_MARK),\n initEntityValue = _getInternalHooks2.initEntityValue;\n initEntityValue(_assertThisInitialized(_this));\n }\n return _this;\n }\n _createClass(Field, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props7 = this.props,\n shouldUpdate = _this$props7.shouldUpdate,\n fieldContext = _this$props7.fieldContext;\n this.mounted = true;\n // Register on init\n if (fieldContext) {\n var getInternalHooks = fieldContext.getInternalHooks;\n var _getInternalHooks3 = getInternalHooks(HOOK_MARK),\n registerField = _getInternalHooks3.registerField;\n this.cancelRegisterFunc = registerField(this);\n }\n // One more render for component in case fields not ready\n if (shouldUpdate === true) {\n this.reRender();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.cancelRegister();\n this.triggerMetaEvent(true);\n this.mounted = false;\n }\n }, {\n key: \"reRender\",\n value: function reRender() {\n if (!this.mounted) return;\n this.forceUpdate();\n }\n }, {\n key: \"render\",\n value: function render() {\n var resetCount = this.state.resetCount;\n var children = this.props.children;\n var _this$getOnlyChild = this.getOnlyChild(children),\n child = _this$getOnlyChild.child,\n isFunction = _this$getOnlyChild.isFunction;\n // Not need to `cloneElement` since user can handle this in render function self\n var returnChildNode;\n if (isFunction) {\n returnChildNode = child;\n } else if ( /*#__PURE__*/React.isValidElement(child)) {\n returnChildNode = /*#__PURE__*/React.cloneElement(child, this.getControlled(child.props));\n } else {\n warning(!child, '`children` of Field is not validate ReactElement.');\n returnChildNode = child;\n }\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: resetCount\n }, returnChildNode);\n }\n }]);\n return Field;\n}(React.Component);\nField.contextType = FieldContext;\nField.defaultProps = {\n trigger: 'onChange',\n valuePropName: 'value'\n};\nfunction WrapperField(_ref5) {\n var name = _ref5.name,\n restProps = _objectWithoutProperties(_ref5, _excluded);\n var fieldContext = React.useContext(FieldContext);\n var namePath = name !== undefined ? getNamePath(name) : undefined;\n var key = 'keep';\n if (!restProps.isListField) {\n key = \"_\".concat((namePath || []).join('_'));\n }\n // Warning if it's a directly list field.\n // We can still support multiple level field preserve.\n if (process.env.NODE_ENV !== 'production' && restProps.preserve === false && restProps.isListField && namePath.length <= 1) {\n warning(false, '`preserve` should not apply on Form.List fields.');\n }\n return /*#__PURE__*/React.createElement(Field, _extends({\n key: key,\n name: namePath\n }, restProps, {\n fieldContext: fieldContext\n }));\n}\nexport default WrapperField;","import * as React from 'react';\nvar ListContext = /*#__PURE__*/React.createContext(null);\nexport default ListContext;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport warning from \"rc-util/es/warning\";\nimport FieldContext from './FieldContext';\nimport Field from './Field';\nimport { move as _move, getNamePath } from './utils/valueUtil';\nimport ListContext from './ListContext';\nvar List = function List(_ref) {\n var name = _ref.name,\n initialValue = _ref.initialValue,\n children = _ref.children,\n rules = _ref.rules,\n validateTrigger = _ref.validateTrigger;\n var context = React.useContext(FieldContext);\n var keyRef = React.useRef({\n keys: [],\n id: 0\n });\n var keyManager = keyRef.current;\n var prefixName = React.useMemo(function () {\n var parentPrefixName = getNamePath(context.prefixName) || [];\n return [].concat(_toConsumableArray(parentPrefixName), _toConsumableArray(getNamePath(name)));\n }, [context.prefixName, name]);\n var fieldContext = React.useMemo(function () {\n return _objectSpread(_objectSpread({}, context), {}, {\n prefixName: prefixName\n });\n }, [context, prefixName]);\n // List context\n var listContext = React.useMemo(function () {\n return {\n getKey: function getKey(namePath) {\n var len = prefixName.length;\n var pathName = namePath[len];\n return [keyManager.keys[pathName], namePath.slice(len + 1)];\n }\n };\n }, [prefixName]);\n // User should not pass `children` as other type.\n if (typeof children !== 'function') {\n warning(false, 'Form.List only accepts function as children.');\n return null;\n }\n var shouldUpdate = function shouldUpdate(prevValue, nextValue, _ref2) {\n var source = _ref2.source;\n if (source === 'internal') {\n return false;\n }\n return prevValue !== nextValue;\n };\n return /*#__PURE__*/React.createElement(ListContext.Provider, {\n value: listContext\n }, /*#__PURE__*/React.createElement(FieldContext.Provider, {\n value: fieldContext\n }, /*#__PURE__*/React.createElement(Field, {\n name: [],\n shouldUpdate: shouldUpdate,\n rules: rules,\n validateTrigger: validateTrigger,\n initialValue: initialValue,\n isList: true\n }, function (_ref3, meta) {\n var _ref3$value = _ref3.value,\n value = _ref3$value === void 0 ? [] : _ref3$value,\n onChange = _ref3.onChange;\n var getFieldValue = context.getFieldValue;\n var getNewValue = function getNewValue() {\n var values = getFieldValue(prefixName || []);\n return values || [];\n };\n /**\n * Always get latest value in case user update fields by `form` api.\n */\n var operations = {\n add: function add(defaultValue, index) {\n // Mapping keys\n var newValue = getNewValue();\n if (index >= 0 && index <= newValue.length) {\n keyManager.keys = [].concat(_toConsumableArray(keyManager.keys.slice(0, index)), [keyManager.id], _toConsumableArray(keyManager.keys.slice(index)));\n onChange([].concat(_toConsumableArray(newValue.slice(0, index)), [defaultValue], _toConsumableArray(newValue.slice(index))));\n } else {\n if (process.env.NODE_ENV !== 'production' && (index < 0 || index > newValue.length)) {\n warning(false, 'The second parameter of the add function should be a valid positive number.');\n }\n keyManager.keys = [].concat(_toConsumableArray(keyManager.keys), [keyManager.id]);\n onChange([].concat(_toConsumableArray(newValue), [defaultValue]));\n }\n keyManager.id += 1;\n },\n remove: function remove(index) {\n var newValue = getNewValue();\n var indexSet = new Set(Array.isArray(index) ? index : [index]);\n if (indexSet.size <= 0) {\n return;\n }\n keyManager.keys = keyManager.keys.filter(function (_, keysIndex) {\n return !indexSet.has(keysIndex);\n });\n // Trigger store change\n onChange(newValue.filter(function (_, valueIndex) {\n return !indexSet.has(valueIndex);\n }));\n },\n move: function move(from, to) {\n if (from === to) {\n return;\n }\n var newValue = getNewValue();\n // Do not handle out of range\n if (from < 0 || from >= newValue.length || to < 0 || to >= newValue.length) {\n return;\n }\n keyManager.keys = _move(keyManager.keys, from, to);\n // Trigger store change\n onChange(_move(newValue, from, to));\n }\n };\n var listValue = value || [];\n if (!Array.isArray(listValue)) {\n listValue = [];\n if (process.env.NODE_ENV !== 'production') {\n warning(false, \"Current value of '\".concat(prefixName.join(' > '), \"' is not an array type.\"));\n }\n }\n return children(listValue.map(function (__, index) {\n var key = keyManager.keys[index];\n if (key === undefined) {\n keyManager.keys[index] = keyManager.id;\n key = keyManager.keys[index];\n keyManager.id += 1;\n }\n return {\n name: index,\n key: key,\n isListField: true\n };\n }), operations, meta);\n })));\n};\nexport default List;","function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nexport { _arrayWithHoles as default };","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nexport { _iterableToArrayLimit as default };","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableRest as default };","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nfunction _slicedToArray(r, e) {\n return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nexport { _slicedToArray as default };","export function allPromiseFinish(promiseList) {\n var hasError = false;\n var count = promiseList.length;\n var results = [];\n if (!promiseList.length) {\n return Promise.resolve([]);\n }\n return new Promise(function (resolve, reject) {\n promiseList.forEach(function (promise, index) {\n promise.catch(function (e) {\n hasError = true;\n return e;\n }).then(function (result) {\n count -= 1;\n results[index] = result;\n if (count > 0) {\n return;\n }\n if (hasError) {\n reject(results);\n }\n resolve(results);\n });\n });\n });\n}","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nvar SPLIT = '__@field_split__';\n/**\n * Convert name path into string to fast the fetch speed of Map.\n */\nfunction normalize(namePath) {\n return namePath.map(function (cell) {\n return \"\".concat(_typeof(cell), \":\").concat(cell);\n })\n // Magic split\n .join(SPLIT);\n}\n/**\n * NameMap like a `Map` but accepts `string[]` as key.\n */\nvar NameMap = /*#__PURE__*/function () {\n function NameMap() {\n _classCallCheck(this, NameMap);\n this.kvs = new Map();\n }\n _createClass(NameMap, [{\n key: \"set\",\n value: function set(key, value) {\n this.kvs.set(normalize(key), value);\n }\n }, {\n key: \"get\",\n value: function get(key) {\n return this.kvs.get(normalize(key));\n }\n }, {\n key: \"update\",\n value: function update(key, updater) {\n var origin = this.get(key);\n var next = updater(origin);\n if (!next) {\n this.delete(key);\n } else {\n this.set(key, next);\n }\n }\n }, {\n key: \"delete\",\n value: function _delete(key) {\n this.kvs.delete(normalize(key));\n }\n // Since we only use this in test, let simply realize this\n }, {\n key: \"map\",\n value: function map(callback) {\n return _toConsumableArray(this.kvs.entries()).map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n var cells = key.split(SPLIT);\n return callback({\n key: cells.map(function (cell) {\n var _cell$match = cell.match(/^([^:]*):(.*)$/),\n _cell$match2 = _slicedToArray(_cell$match, 3),\n type = _cell$match2[1],\n unit = _cell$match2[2];\n return type === 'number' ? Number(unit) : unit;\n }),\n value: value\n });\n });\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n var json = {};\n this.map(function (_ref3) {\n var key = _ref3.key,\n value = _ref3.value;\n json[key.join('.')] = value;\n return null;\n });\n return json;\n }\n }]);\n return NameMap;\n}();\nexport default NameMap;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nvar _excluded = [\"name\", \"errors\"];\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport { HOOK_MARK } from './FieldContext';\nimport { allPromiseFinish } from './utils/asyncUtil';\nimport cloneDeep from './utils/cloneDeep';\nimport { defaultValidateMessages } from './utils/messages';\nimport NameMap from './utils/NameMap';\nimport { cloneByNamePathList, containsNamePath, getNamePath, getValue, matchNamePath, setValue, setValues } from './utils/valueUtil';\nexport var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {\n var _this = this;\n _classCallCheck(this, FormStore);\n this.formHooked = false;\n this.forceRootUpdate = void 0;\n this.subscribable = true;\n this.store = {};\n this.fieldEntities = [];\n this.initialValues = {};\n this.callbacks = {};\n this.validateMessages = null;\n this.preserve = null;\n this.lastValidatePromise = null;\n this.getForm = function () {\n return {\n getFieldValue: _this.getFieldValue,\n getFieldsValue: _this.getFieldsValue,\n getFieldError: _this.getFieldError,\n getFieldWarning: _this.getFieldWarning,\n getFieldsError: _this.getFieldsError,\n isFieldsTouched: _this.isFieldsTouched,\n isFieldTouched: _this.isFieldTouched,\n isFieldValidating: _this.isFieldValidating,\n isFieldsValidating: _this.isFieldsValidating,\n resetFields: _this.resetFields,\n setFields: _this.setFields,\n setFieldValue: _this.setFieldValue,\n setFieldsValue: _this.setFieldsValue,\n validateFields: _this.validateFields,\n submit: _this.submit,\n _init: true,\n getInternalHooks: _this.getInternalHooks\n };\n };\n this.getInternalHooks = function (key) {\n if (key === HOOK_MARK) {\n _this.formHooked = true;\n return {\n dispatch: _this.dispatch,\n initEntityValue: _this.initEntityValue,\n registerField: _this.registerField,\n useSubscribe: _this.useSubscribe,\n setInitialValues: _this.setInitialValues,\n destroyForm: _this.destroyForm,\n setCallbacks: _this.setCallbacks,\n setValidateMessages: _this.setValidateMessages,\n getFields: _this.getFields,\n setPreserve: _this.setPreserve,\n getInitialValue: _this.getInitialValue,\n registerWatch: _this.registerWatch\n };\n }\n warning(false, '`getInternalHooks` is internal usage. Should not call directly.');\n return null;\n };\n this.useSubscribe = function (subscribable) {\n _this.subscribable = subscribable;\n };\n this.prevWithoutPreserves = null;\n this.setInitialValues = function (initialValues, init) {\n _this.initialValues = initialValues || {};\n if (init) {\n var _this$prevWithoutPres;\n var nextStore = setValues({}, initialValues, _this.store);\n // We will take consider prev form unmount fields.\n // When the field is not `preserve`, we need fill this with initialValues instead of store.\n // eslint-disable-next-line array-callback-return\n (_this$prevWithoutPres = _this.prevWithoutPreserves) === null || _this$prevWithoutPres === void 0 ? void 0 : _this$prevWithoutPres.map(function (_ref) {\n var namePath = _ref.key;\n nextStore = setValue(nextStore, namePath, getValue(initialValues, namePath));\n });\n _this.prevWithoutPreserves = null;\n _this.updateStore(nextStore);\n }\n };\n this.destroyForm = function () {\n var prevWithoutPreserves = new NameMap();\n _this.getFieldEntities(true).forEach(function (entity) {\n if (!_this.isMergedPreserve(entity.isPreserve())) {\n prevWithoutPreserves.set(entity.getNamePath(), true);\n }\n });\n _this.prevWithoutPreserves = prevWithoutPreserves;\n };\n this.getInitialValue = function (namePath) {\n var initValue = getValue(_this.initialValues, namePath);\n // Not cloneDeep when without `namePath`\n return namePath.length ? cloneDeep(initValue) : initValue;\n };\n this.setCallbacks = function (callbacks) {\n _this.callbacks = callbacks;\n };\n this.setValidateMessages = function (validateMessages) {\n _this.validateMessages = validateMessages;\n };\n this.setPreserve = function (preserve) {\n _this.preserve = preserve;\n };\n this.watchList = [];\n this.registerWatch = function (callback) {\n _this.watchList.push(callback);\n return function () {\n _this.watchList = _this.watchList.filter(function (fn) {\n return fn !== callback;\n });\n };\n };\n this.notifyWatch = function () {\n var namePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n // No need to cost perf when nothing need to watch\n if (_this.watchList.length) {\n var values = _this.getFieldsValue();\n _this.watchList.forEach(function (callback) {\n callback(values, namePath);\n });\n }\n };\n this.timeoutId = null;\n this.warningUnhooked = function () {\n if (process.env.NODE_ENV !== 'production' && !_this.timeoutId && typeof window !== 'undefined') {\n _this.timeoutId = setTimeout(function () {\n _this.timeoutId = null;\n if (!_this.formHooked) {\n warning(false, 'Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?');\n }\n });\n }\n };\n this.updateStore = function (nextStore) {\n _this.store = nextStore;\n };\n this.getFieldEntities = function () {\n var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n if (!pure) {\n return _this.fieldEntities;\n }\n return _this.fieldEntities.filter(function (field) {\n return field.getNamePath().length;\n });\n };\n this.getFieldsMap = function () {\n var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var cache = new NameMap();\n _this.getFieldEntities(pure).forEach(function (field) {\n var namePath = field.getNamePath();\n cache.set(namePath, field);\n });\n return cache;\n };\n this.getFieldEntitiesForNamePathList = function (nameList) {\n if (!nameList) {\n return _this.getFieldEntities(true);\n }\n var cache = _this.getFieldsMap(true);\n return nameList.map(function (name) {\n var namePath = getNamePath(name);\n return cache.get(namePath) || {\n INVALIDATE_NAME_PATH: getNamePath(name)\n };\n });\n };\n this.getFieldsValue = function (nameList, filterFunc) {\n _this.warningUnhooked();\n if (nameList === true && !filterFunc) {\n return _this.store;\n }\n var fieldEntities = _this.getFieldEntitiesForNamePathList(Array.isArray(nameList) ? nameList : null);\n var filteredNameList = [];\n fieldEntities.forEach(function (entity) {\n var _entity$isListField;\n var namePath = 'INVALIDATE_NAME_PATH' in entity ? entity.INVALIDATE_NAME_PATH : entity.getNamePath();\n // Ignore when it's a list item and not specific the namePath,\n // since parent field is already take in count\n if (!nameList && ((_entity$isListField = entity.isListField) === null || _entity$isListField === void 0 ? void 0 : _entity$isListField.call(entity))) {\n return;\n }\n if (!filterFunc) {\n filteredNameList.push(namePath);\n } else {\n var meta = 'getMeta' in entity ? entity.getMeta() : null;\n if (filterFunc(meta)) {\n filteredNameList.push(namePath);\n }\n }\n });\n return cloneByNamePathList(_this.store, filteredNameList.map(getNamePath));\n };\n this.getFieldValue = function (name) {\n _this.warningUnhooked();\n var namePath = getNamePath(name);\n return getValue(_this.store, namePath);\n };\n this.getFieldsError = function (nameList) {\n _this.warningUnhooked();\n var fieldEntities = _this.getFieldEntitiesForNamePathList(nameList);\n return fieldEntities.map(function (entity, index) {\n if (entity && !('INVALIDATE_NAME_PATH' in entity)) {\n return {\n name: entity.getNamePath(),\n errors: entity.getErrors(),\n warnings: entity.getWarnings()\n };\n }\n return {\n name: getNamePath(nameList[index]),\n errors: [],\n warnings: []\n };\n });\n };\n this.getFieldError = function (name) {\n _this.warningUnhooked();\n var namePath = getNamePath(name);\n var fieldError = _this.getFieldsError([namePath])[0];\n return fieldError.errors;\n };\n this.getFieldWarning = function (name) {\n _this.warningUnhooked();\n var namePath = getNamePath(name);\n var fieldError = _this.getFieldsError([namePath])[0];\n return fieldError.warnings;\n };\n this.isFieldsTouched = function () {\n _this.warningUnhooked();\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var arg0 = args[0],\n arg1 = args[1];\n var namePathList;\n var isAllFieldsTouched = false;\n if (args.length === 0) {\n namePathList = null;\n } else if (args.length === 1) {\n if (Array.isArray(arg0)) {\n namePathList = arg0.map(getNamePath);\n isAllFieldsTouched = false;\n } else {\n namePathList = null;\n isAllFieldsTouched = arg0;\n }\n } else {\n namePathList = arg0.map(getNamePath);\n isAllFieldsTouched = arg1;\n }\n var fieldEntities = _this.getFieldEntities(true);\n var isFieldTouched = function isFieldTouched(field) {\n return field.isFieldTouched();\n };\n // ===== Will get fully compare when not config namePathList =====\n if (!namePathList) {\n return isAllFieldsTouched ? fieldEntities.every(isFieldTouched) : fieldEntities.some(isFieldTouched);\n }\n // Generate a nest tree for validate\n var map = new NameMap();\n namePathList.forEach(function (shortNamePath) {\n map.set(shortNamePath, []);\n });\n fieldEntities.forEach(function (field) {\n var fieldNamePath = field.getNamePath();\n // Find matched entity and put into list\n namePathList.forEach(function (shortNamePath) {\n if (shortNamePath.every(function (nameUnit, i) {\n return fieldNamePath[i] === nameUnit;\n })) {\n map.update(shortNamePath, function (list) {\n return [].concat(_toConsumableArray(list), [field]);\n });\n }\n });\n });\n // Check if NameMap value is touched\n var isNamePathListTouched = function isNamePathListTouched(entities) {\n return entities.some(isFieldTouched);\n };\n var namePathListEntities = map.map(function (_ref2) {\n var value = _ref2.value;\n return value;\n });\n return isAllFieldsTouched ? namePathListEntities.every(isNamePathListTouched) : namePathListEntities.some(isNamePathListTouched);\n };\n this.isFieldTouched = function (name) {\n _this.warningUnhooked();\n return _this.isFieldsTouched([name]);\n };\n this.isFieldsValidating = function (nameList) {\n _this.warningUnhooked();\n var fieldEntities = _this.getFieldEntities();\n if (!nameList) {\n return fieldEntities.some(function (testField) {\n return testField.isFieldValidating();\n });\n }\n var namePathList = nameList.map(getNamePath);\n return fieldEntities.some(function (testField) {\n var fieldNamePath = testField.getNamePath();\n return containsNamePath(namePathList, fieldNamePath) && testField.isFieldValidating();\n });\n };\n this.isFieldValidating = function (name) {\n _this.warningUnhooked();\n return _this.isFieldsValidating([name]);\n };\n this.resetWithFieldInitialValue = function () {\n var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Create cache\n var cache = new NameMap();\n var fieldEntities = _this.getFieldEntities(true);\n fieldEntities.forEach(function (field) {\n var initialValue = field.props.initialValue;\n var namePath = field.getNamePath();\n // Record only if has `initialValue`\n if (initialValue !== undefined) {\n var records = cache.get(namePath) || new Set();\n records.add({\n entity: field,\n value: initialValue\n });\n cache.set(namePath, records);\n }\n });\n // Reset\n var resetWithFields = function resetWithFields(entities) {\n entities.forEach(function (field) {\n var initialValue = field.props.initialValue;\n if (initialValue !== undefined) {\n var namePath = field.getNamePath();\n var formInitialValue = _this.getInitialValue(namePath);\n if (formInitialValue !== undefined) {\n // Warning if conflict with form initialValues and do not modify value\n warning(false, \"Form already set 'initialValues' with path '\".concat(namePath.join('.'), \"'. Field can not overwrite it.\"));\n } else {\n var records = cache.get(namePath);\n if (records && records.size > 1) {\n // Warning if multiple field set `initialValue`and do not modify value\n warning(false, \"Multiple Field with path '\".concat(namePath.join('.'), \"' set 'initialValue'. Can not decide which one to pick.\"));\n } else if (records) {\n var originValue = _this.getFieldValue(namePath);\n // Set `initialValue`\n if (!info.skipExist || originValue === undefined) {\n _this.updateStore(setValue(_this.store, namePath, _toConsumableArray(records)[0].value));\n }\n }\n }\n }\n });\n };\n var requiredFieldEntities;\n if (info.entities) {\n requiredFieldEntities = info.entities;\n } else if (info.namePathList) {\n requiredFieldEntities = [];\n info.namePathList.forEach(function (namePath) {\n var records = cache.get(namePath);\n if (records) {\n var _requiredFieldEntitie;\n (_requiredFieldEntitie = requiredFieldEntities).push.apply(_requiredFieldEntitie, _toConsumableArray(_toConsumableArray(records).map(function (r) {\n return r.entity;\n })));\n }\n });\n } else {\n requiredFieldEntities = fieldEntities;\n }\n resetWithFields(requiredFieldEntities);\n };\n this.resetFields = function (nameList) {\n _this.warningUnhooked();\n var prevStore = _this.store;\n if (!nameList) {\n _this.updateStore(setValues({}, _this.initialValues));\n _this.resetWithFieldInitialValue();\n _this.notifyObservers(prevStore, null, {\n type: 'reset'\n });\n _this.notifyWatch();\n return;\n }\n // Reset by `nameList`\n var namePathList = nameList.map(getNamePath);\n namePathList.forEach(function (namePath) {\n var initialValue = _this.getInitialValue(namePath);\n _this.updateStore(setValue(_this.store, namePath, initialValue));\n });\n _this.resetWithFieldInitialValue({\n namePathList: namePathList\n });\n _this.notifyObservers(prevStore, namePathList, {\n type: 'reset'\n });\n _this.notifyWatch(namePathList);\n };\n this.setFields = function (fields) {\n _this.warningUnhooked();\n var prevStore = _this.store;\n var namePathList = [];\n fields.forEach(function (fieldData) {\n var name = fieldData.name,\n errors = fieldData.errors,\n data = _objectWithoutProperties(fieldData, _excluded);\n var namePath = getNamePath(name);\n namePathList.push(namePath);\n // Value\n if ('value' in data) {\n _this.updateStore(setValue(_this.store, namePath, data.value));\n }\n _this.notifyObservers(prevStore, [namePath], {\n type: 'setField',\n data: fieldData\n });\n });\n _this.notifyWatch(namePathList);\n };\n this.getFields = function () {\n var entities = _this.getFieldEntities(true);\n var fields = entities.map(function (field) {\n var namePath = field.getNamePath();\n var meta = field.getMeta();\n var fieldData = _objectSpread(_objectSpread({}, meta), {}, {\n name: namePath,\n value: _this.getFieldValue(namePath)\n });\n Object.defineProperty(fieldData, 'originRCField', {\n value: true\n });\n return fieldData;\n });\n return fields;\n };\n this.initEntityValue = function (entity) {\n var initialValue = entity.props.initialValue;\n if (initialValue !== undefined) {\n var namePath = entity.getNamePath();\n var prevValue = getValue(_this.store, namePath);\n if (prevValue === undefined) {\n _this.updateStore(setValue(_this.store, namePath, initialValue));\n }\n }\n };\n this.isMergedPreserve = function (fieldPreserve) {\n var mergedPreserve = fieldPreserve !== undefined ? fieldPreserve : _this.preserve;\n return mergedPreserve !== null && mergedPreserve !== void 0 ? mergedPreserve : true;\n };\n this.registerField = function (entity) {\n _this.fieldEntities.push(entity);\n var namePath = entity.getNamePath();\n _this.notifyWatch([namePath]);\n // Set initial values\n if (entity.props.initialValue !== undefined) {\n var prevStore = _this.store;\n _this.resetWithFieldInitialValue({\n entities: [entity],\n skipExist: true\n });\n _this.notifyObservers(prevStore, [entity.getNamePath()], {\n type: 'valueUpdate',\n source: 'internal'\n });\n }\n // un-register field callback\n return function (isListField, preserve) {\n var subNamePath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n _this.fieldEntities = _this.fieldEntities.filter(function (item) {\n return item !== entity;\n });\n // Clean up store value if not preserve\n if (!_this.isMergedPreserve(preserve) && (!isListField || subNamePath.length > 1)) {\n var defaultValue = isListField ? undefined : _this.getInitialValue(namePath);\n if (namePath.length && _this.getFieldValue(namePath) !== defaultValue && _this.fieldEntities.every(function (field) {\n return (\n // Only reset when no namePath exist\n !matchNamePath(field.getNamePath(), namePath)\n );\n })) {\n var _prevStore = _this.store;\n _this.updateStore(setValue(_prevStore, namePath, defaultValue, true));\n // Notify that field is unmount\n _this.notifyObservers(_prevStore, [namePath], {\n type: 'remove'\n });\n // Dependencies update\n _this.triggerDependenciesUpdate(_prevStore, namePath);\n }\n }\n _this.notifyWatch([namePath]);\n };\n };\n this.dispatch = function (action) {\n switch (action.type) {\n case 'updateValue':\n {\n var namePath = action.namePath,\n value = action.value;\n _this.updateValue(namePath, value);\n break;\n }\n case 'validateField':\n {\n var _namePath = action.namePath,\n triggerName = action.triggerName;\n _this.validateFields([_namePath], {\n triggerName: triggerName\n });\n break;\n }\n default:\n // Currently we don't have other action. Do nothing.\n }\n };\n this.notifyObservers = function (prevStore, namePathList, info) {\n if (_this.subscribable) {\n var mergedInfo = _objectSpread(_objectSpread({}, info), {}, {\n store: _this.getFieldsValue(true)\n });\n _this.getFieldEntities().forEach(function (_ref3) {\n var onStoreChange = _ref3.onStoreChange;\n onStoreChange(prevStore, namePathList, mergedInfo);\n });\n } else {\n _this.forceRootUpdate();\n }\n };\n this.triggerDependenciesUpdate = function (prevStore, namePath) {\n var childrenFields = _this.getDependencyChildrenFields(namePath);\n if (childrenFields.length) {\n _this.validateFields(childrenFields);\n }\n _this.notifyObservers(prevStore, childrenFields, {\n type: 'dependenciesUpdate',\n relatedFields: [namePath].concat(_toConsumableArray(childrenFields))\n });\n return childrenFields;\n };\n this.updateValue = function (name, value) {\n var namePath = getNamePath(name);\n var prevStore = _this.store;\n _this.updateStore(setValue(_this.store, namePath, value));\n _this.notifyObservers(prevStore, [namePath], {\n type: 'valueUpdate',\n source: 'internal'\n });\n _this.notifyWatch([namePath]);\n // Dependencies update\n var childrenFields = _this.triggerDependenciesUpdate(prevStore, namePath);\n // trigger callback function\n var onValuesChange = _this.callbacks.onValuesChange;\n if (onValuesChange) {\n var changedValues = cloneByNamePathList(_this.store, [namePath]);\n onValuesChange(changedValues, _this.getFieldsValue());\n }\n _this.triggerOnFieldsChange([namePath].concat(_toConsumableArray(childrenFields)));\n };\n this.setFieldsValue = function (store) {\n _this.warningUnhooked();\n var prevStore = _this.store;\n if (store) {\n var nextStore = setValues(_this.store, store);\n _this.updateStore(nextStore);\n }\n _this.notifyObservers(prevStore, null, {\n type: 'valueUpdate',\n source: 'external'\n });\n _this.notifyWatch();\n };\n this.setFieldValue = function (name, value) {\n _this.setFields([{\n name: name,\n value: value\n }]);\n };\n this.getDependencyChildrenFields = function (rootNamePath) {\n var children = new Set();\n var childrenFields = [];\n var dependencies2fields = new NameMap();\n /**\n * Generate maps\n * Can use cache to save perf if user report performance issue with this\n */\n _this.getFieldEntities().forEach(function (field) {\n var dependencies = field.props.dependencies;\n (dependencies || []).forEach(function (dependency) {\n var dependencyNamePath = getNamePath(dependency);\n dependencies2fields.update(dependencyNamePath, function () {\n var fields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Set();\n fields.add(field);\n return fields;\n });\n });\n });\n var fillChildren = function fillChildren(namePath) {\n var fields = dependencies2fields.get(namePath) || new Set();\n fields.forEach(function (field) {\n if (!children.has(field)) {\n children.add(field);\n var fieldNamePath = field.getNamePath();\n if (field.isFieldDirty() && fieldNamePath.length) {\n childrenFields.push(fieldNamePath);\n fillChildren(fieldNamePath);\n }\n }\n });\n };\n fillChildren(rootNamePath);\n return childrenFields;\n };\n this.triggerOnFieldsChange = function (namePathList, filedErrors) {\n var onFieldsChange = _this.callbacks.onFieldsChange;\n if (onFieldsChange) {\n var fields = _this.getFields();\n /**\n * Fill errors since `fields` may be replaced by controlled fields\n */\n if (filedErrors) {\n var cache = new NameMap();\n filedErrors.forEach(function (_ref4) {\n var name = _ref4.name,\n errors = _ref4.errors;\n cache.set(name, errors);\n });\n fields.forEach(function (field) {\n // eslint-disable-next-line no-param-reassign\n field.errors = cache.get(field.name) || field.errors;\n });\n }\n var changedFields = fields.filter(function (_ref5) {\n var fieldName = _ref5.name;\n return containsNamePath(namePathList, fieldName);\n });\n onFieldsChange(changedFields, fields);\n }\n };\n this.validateFields = function (nameList, options) {\n _this.warningUnhooked();\n var provideNameList = !!nameList;\n var namePathList = provideNameList ? nameList.map(getNamePath) : [];\n // Collect result in promise list\n var promiseList = [];\n _this.getFieldEntities(true).forEach(function (field) {\n // Add field if not provide `nameList`\n if (!provideNameList) {\n namePathList.push(field.getNamePath());\n }\n /**\n * Recursive validate if configured.\n * TODO: perf improvement @zombieJ\n */\n if ((options === null || options === void 0 ? void 0 : options.recursive) && provideNameList) {\n var namePath = field.getNamePath();\n if (\n // nameList[i] === undefined 说明是以 nameList 开头的\n // ['name'] -> ['name','list']\n namePath.every(function (nameUnit, i) {\n return nameList[i] === nameUnit || nameList[i] === undefined;\n })) {\n namePathList.push(namePath);\n }\n }\n // Skip if without rule\n if (!field.props.rules || !field.props.rules.length) {\n return;\n }\n var fieldNamePath = field.getNamePath();\n // Add field validate rule in to promise list\n if (!provideNameList || containsNamePath(namePathList, fieldNamePath)) {\n var promise = field.validateRules(_objectSpread({\n validateMessages: _objectSpread(_objectSpread({}, defaultValidateMessages), _this.validateMessages)\n }, options));\n // Wrap promise with field\n promiseList.push(promise.then(function () {\n return {\n name: fieldNamePath,\n errors: [],\n warnings: []\n };\n }).catch(function (ruleErrors) {\n var _ruleErrors$forEach;\n var mergedErrors = [];\n var mergedWarnings = [];\n (_ruleErrors$forEach = ruleErrors.forEach) === null || _ruleErrors$forEach === void 0 ? void 0 : _ruleErrors$forEach.call(ruleErrors, function (_ref6) {\n var warningOnly = _ref6.rule.warningOnly,\n errors = _ref6.errors;\n if (warningOnly) {\n mergedWarnings.push.apply(mergedWarnings, _toConsumableArray(errors));\n } else {\n mergedErrors.push.apply(mergedErrors, _toConsumableArray(errors));\n }\n });\n if (mergedErrors.length) {\n return Promise.reject({\n name: fieldNamePath,\n errors: mergedErrors,\n warnings: mergedWarnings\n });\n }\n return {\n name: fieldNamePath,\n errors: mergedErrors,\n warnings: mergedWarnings\n };\n }));\n }\n });\n var summaryPromise = allPromiseFinish(promiseList);\n _this.lastValidatePromise = summaryPromise;\n // Notify fields with rule that validate has finished and need update\n summaryPromise.catch(function (results) {\n return results;\n }).then(function (results) {\n var resultNamePathList = results.map(function (_ref7) {\n var name = _ref7.name;\n return name;\n });\n _this.notifyObservers(_this.store, resultNamePathList, {\n type: 'validateFinish'\n });\n _this.triggerOnFieldsChange(resultNamePathList, results);\n });\n var returnPromise = summaryPromise.then(function () {\n if (_this.lastValidatePromise === summaryPromise) {\n return Promise.resolve(_this.getFieldsValue(namePathList));\n }\n return Promise.reject([]);\n }).catch(function (results) {\n var errorList = results.filter(function (result) {\n return result && result.errors.length;\n });\n return Promise.reject({\n values: _this.getFieldsValue(namePathList),\n errorFields: errorList,\n outOfDate: _this.lastValidatePromise !== summaryPromise\n });\n });\n // Do not throw in console\n returnPromise.catch(function (e) {\n return e;\n });\n return returnPromise;\n };\n this.submit = function () {\n _this.warningUnhooked();\n _this.validateFields().then(function (values) {\n var onFinish = _this.callbacks.onFinish;\n if (onFinish) {\n try {\n onFinish(values);\n } catch (err) {\n // Should print error if user `onFinish` callback failed\n console.error(err);\n }\n }\n }).catch(function (e) {\n var onFinishFailed = _this.callbacks.onFinishFailed;\n if (onFinishFailed) {\n onFinishFailed(e);\n }\n });\n };\n this.forceRootUpdate = forceRootUpdate;\n});\nfunction useForm(form) {\n var formRef = React.useRef();\n var _React$useState = React.useState({}),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n forceUpdate = _React$useState2[1];\n if (!formRef.current) {\n if (form) {\n formRef.current = form;\n } else {\n // Create a new FormStore if not provided\n var forceReRender = function forceReRender() {\n forceUpdate({});\n };\n var formStore = new FormStore(forceReRender);\n formRef.current = formStore.getForm();\n }\n }\n return [formRef.current];\n}\nexport default useForm;","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as React from 'react';\nvar FormContext = /*#__PURE__*/React.createContext({\n triggerFormChange: function triggerFormChange() {},\n triggerFormFinish: function triggerFormFinish() {},\n registerForm: function registerForm() {},\n unregisterForm: function unregisterForm() {}\n});\nvar FormProvider = function FormProvider(_ref) {\n var validateMessages = _ref.validateMessages,\n onFormChange = _ref.onFormChange,\n onFormFinish = _ref.onFormFinish,\n children = _ref.children;\n var formContext = React.useContext(FormContext);\n var formsRef = React.useRef({});\n return /*#__PURE__*/React.createElement(FormContext.Provider, {\n value: _objectSpread(_objectSpread({}, formContext), {}, {\n validateMessages: _objectSpread(_objectSpread({}, formContext.validateMessages), validateMessages),\n // =========================================================\n // = Global Form Control =\n // =========================================================\n triggerFormChange: function triggerFormChange(name, changedFields) {\n if (onFormChange) {\n onFormChange(name, {\n changedFields: changedFields,\n forms: formsRef.current\n });\n }\n formContext.triggerFormChange(name, changedFields);\n },\n triggerFormFinish: function triggerFormFinish(name, values) {\n if (onFormFinish) {\n onFormFinish(name, {\n values: values,\n forms: formsRef.current\n });\n }\n formContext.triggerFormFinish(name, values);\n },\n registerForm: function registerForm(name, form) {\n if (name) {\n formsRef.current = _objectSpread(_objectSpread({}, formsRef.current), {}, _defineProperty({}, name, form));\n }\n formContext.registerForm(name, form);\n },\n unregisterForm: function unregisterForm(name) {\n var newForms = _objectSpread({}, formsRef.current);\n delete newForms[name];\n formsRef.current = newForms;\n formContext.unregisterForm(name);\n }\n })\n }, children);\n};\nexport { FormProvider };\nexport default FormContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"name\", \"initialValues\", \"fields\", \"form\", \"preserve\", \"children\", \"component\", \"validateMessages\", \"validateTrigger\", \"onValuesChange\", \"onFieldsChange\", \"onFinish\", \"onFinishFailed\"];\nimport * as React from 'react';\nimport useForm from './useForm';\nimport FieldContext, { HOOK_MARK } from './FieldContext';\nimport FormContext from './FormContext';\nimport { isSimilar } from './utils/valueUtil';\nvar Form = function Form(_ref, ref) {\n var name = _ref.name,\n initialValues = _ref.initialValues,\n fields = _ref.fields,\n form = _ref.form,\n preserve = _ref.preserve,\n children = _ref.children,\n _ref$component = _ref.component,\n Component = _ref$component === void 0 ? 'form' : _ref$component,\n validateMessages = _ref.validateMessages,\n _ref$validateTrigger = _ref.validateTrigger,\n validateTrigger = _ref$validateTrigger === void 0 ? 'onChange' : _ref$validateTrigger,\n onValuesChange = _ref.onValuesChange,\n _onFieldsChange = _ref.onFieldsChange,\n _onFinish = _ref.onFinish,\n onFinishFailed = _ref.onFinishFailed,\n restProps = _objectWithoutProperties(_ref, _excluded);\n var formContext = React.useContext(FormContext);\n // We customize handle event since Context will makes all the consumer re-render:\n // https://reactjs.org/docs/context.html#contextprovider\n var _useForm = useForm(form),\n _useForm2 = _slicedToArray(_useForm, 1),\n formInstance = _useForm2[0];\n var _formInstance$getInte = formInstance.getInternalHooks(HOOK_MARK),\n useSubscribe = _formInstance$getInte.useSubscribe,\n setInitialValues = _formInstance$getInte.setInitialValues,\n setCallbacks = _formInstance$getInte.setCallbacks,\n setValidateMessages = _formInstance$getInte.setValidateMessages,\n setPreserve = _formInstance$getInte.setPreserve,\n destroyForm = _formInstance$getInte.destroyForm;\n // Pass ref with form instance\n React.useImperativeHandle(ref, function () {\n return formInstance;\n });\n // Register form into Context\n React.useEffect(function () {\n formContext.registerForm(name, formInstance);\n return function () {\n formContext.unregisterForm(name);\n };\n }, [formContext, formInstance, name]);\n // Pass props to store\n setValidateMessages(_objectSpread(_objectSpread({}, formContext.validateMessages), validateMessages));\n setCallbacks({\n onValuesChange: onValuesChange,\n onFieldsChange: function onFieldsChange(changedFields) {\n formContext.triggerFormChange(name, changedFields);\n if (_onFieldsChange) {\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n _onFieldsChange.apply(void 0, [changedFields].concat(rest));\n }\n },\n onFinish: function onFinish(values) {\n formContext.triggerFormFinish(name, values);\n if (_onFinish) {\n _onFinish(values);\n }\n },\n onFinishFailed: onFinishFailed\n });\n setPreserve(preserve);\n // Set initial value, init store value when first mount\n var mountRef = React.useRef(null);\n setInitialValues(initialValues, !mountRef.current);\n if (!mountRef.current) {\n mountRef.current = true;\n }\n React.useEffect(function () {\n return destroyForm;\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n // Prepare children by `children` type\n var childrenNode;\n var childrenRenderProps = typeof children === 'function';\n if (childrenRenderProps) {\n var values = formInstance.getFieldsValue(true);\n childrenNode = children(values, formInstance);\n } else {\n childrenNode = children;\n }\n // Not use subscribe when using render props\n useSubscribe(!childrenRenderProps);\n // Listen if fields provided. We use ref to save prev data here to avoid additional render\n var prevFieldsRef = React.useRef();\n React.useEffect(function () {\n if (!isSimilar(prevFieldsRef.current || [], fields || [])) {\n formInstance.setFields(fields || []);\n }\n prevFieldsRef.current = fields;\n }, [fields, formInstance]);\n var formContextValue = React.useMemo(function () {\n return _objectSpread(_objectSpread({}, formInstance), {}, {\n validateTrigger: validateTrigger\n });\n }, [formInstance, validateTrigger]);\n var wrapperNode = /*#__PURE__*/React.createElement(FieldContext.Provider, {\n value: formContextValue\n }, childrenNode);\n if (Component === false) {\n return wrapperNode;\n }\n return /*#__PURE__*/React.createElement(Component, _extends({}, restProps, {\n onSubmit: function onSubmit(event) {\n event.preventDefault();\n event.stopPropagation();\n formInstance.submit();\n },\n onReset: function onReset(event) {\n var _restProps$onReset;\n event.preventDefault();\n formInstance.resetFields();\n (_restProps$onReset = restProps.onReset) === null || _restProps$onReset === void 0 ? void 0 : _restProps$onReset.call(restProps, event);\n }\n }), wrapperNode);\n};\nexport default Form;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { FieldContext } from '.';\nimport warning from \"rc-util/es/warning\";\nimport { HOOK_MARK } from './FieldContext';\nimport { useState, useContext, useEffect, useRef, useMemo } from 'react';\nimport { getNamePath, getValue } from './utils/valueUtil';\nexport function stringify(value) {\n try {\n return JSON.stringify(value);\n } catch (err) {\n return Math.random();\n }\n}\nvar useWatchWarning = process.env.NODE_ENV !== 'production' ? function (namePath) {\n var fullyStr = namePath.join('__RC_FIELD_FORM_SPLIT__');\n var nameStrRef = useRef(fullyStr);\n warning(nameStrRef.current === fullyStr, '`useWatch` is not support dynamic `namePath`. Please provide static instead.');\n} : function () {};\nfunction useWatch() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var _args$ = args[0],\n dependencies = _args$ === void 0 ? [] : _args$,\n form = args[1];\n var _useState = useState(),\n _useState2 = _slicedToArray(_useState, 2),\n value = _useState2[0],\n setValue = _useState2[1];\n var valueStr = useMemo(function () {\n return stringify(value);\n }, [value]);\n var valueStrRef = useRef(valueStr);\n valueStrRef.current = valueStr;\n var fieldContext = useContext(FieldContext);\n var formInstance = form || fieldContext;\n var isValidForm = formInstance && formInstance._init;\n // Warning if not exist form instance\n if (process.env.NODE_ENV !== 'production') {\n warning(args.length === 2 ? form ? isValidForm : true : isValidForm, 'useWatch requires a form instance since it can not auto detect from context.');\n }\n var namePath = getNamePath(dependencies);\n var namePathRef = useRef(namePath);\n namePathRef.current = namePath;\n useWatchWarning(namePath);\n useEffect(function () {\n // Skip if not exist form instance\n if (!isValidForm) {\n return;\n }\n var getFieldsValue = formInstance.getFieldsValue,\n getInternalHooks = formInstance.getInternalHooks;\n var _getInternalHooks = getInternalHooks(HOOK_MARK),\n registerWatch = _getInternalHooks.registerWatch;\n var cancelRegister = registerWatch(function (store) {\n var newValue = getValue(store, namePathRef.current);\n var nextValueStr = stringify(newValue);\n // Compare stringify in case it's nest object\n if (valueStrRef.current !== nextValueStr) {\n valueStrRef.current = nextValueStr;\n setValue(newValue);\n }\n });\n // TODO: We can improve this perf in future\n var initialValue = getValue(getFieldsValue(), namePathRef.current);\n setValue(initialValue);\n return cancelRegister;\n },\n // We do not need re-register since namePath content is the same\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [isValidForm]);\n return value;\n}\nexport default useWatch;","import * as React from 'react';\nimport Field from './Field';\nimport List from './List';\nimport useForm from './useForm';\nimport FieldForm from './Form';\nimport { FormProvider } from './FormContext';\nimport FieldContext from './FieldContext';\nimport ListContext from './ListContext';\nimport useWatch from './useWatch';\nvar InternalForm = /*#__PURE__*/React.forwardRef(FieldForm);\nvar RefForm = InternalForm;\nRefForm.FormProvider = FormProvider;\nRefForm.Field = Field;\nRefForm.List = List;\nRefForm.useForm = useForm;\nRefForm.useWatch = useWatch;\nexport { Field, List, useForm, FormProvider, FieldContext, ListContext, useWatch };\nexport default RefForm;","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nfunction cloneDeep(val) {\n if (Array.isArray(val)) {\n return cloneArrayDeep(val);\n } else if (_typeof(val) === 'object' && val !== null) {\n return cloneObjectDeep(val);\n }\n return val;\n}\nfunction cloneObjectDeep(val) {\n if (Object.getPrototypeOf(val) === Object.prototype) {\n var res = {};\n for (var key in val) {\n res[key] = cloneDeep(val[key]);\n }\n return res;\n }\n return val;\n}\nfunction cloneArrayDeep(val) {\n return val.map(function (item) {\n return cloneDeep(item);\n });\n}\nexport default cloneDeep;","export function toArray(value) {\n if (value === undefined || value === null) {\n return [];\n }\n return Array.isArray(value) ? value : [value];\n}","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport get from \"rc-util/es/utils/get\";\nimport set from \"rc-util/es/utils/set\";\nimport { toArray } from './typeUtil';\nimport cloneDeep from '../utils/cloneDeep';\n/**\n * Convert name to internal supported format.\n * This function should keep since we still thinking if need support like `a.b.c` format.\n * 'a' => ['a']\n * 123 => [123]\n * ['a', 123] => ['a', 123]\n */\nexport function getNamePath(path) {\n return toArray(path);\n}\nexport function getValue(store, namePath) {\n var value = get(store, namePath);\n return value;\n}\nexport function setValue(store, namePath, value) {\n var removeIfUndefined = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var newStore = set(store, namePath, value, removeIfUndefined);\n return newStore;\n}\nexport function cloneByNamePathList(store, namePathList) {\n var newStore = {};\n namePathList.forEach(function (namePath) {\n var value = getValue(store, namePath);\n newStore = setValue(newStore, namePath, value);\n });\n return newStore;\n}\nexport function containsNamePath(namePathList, namePath) {\n return namePathList && namePathList.some(function (path) {\n return matchNamePath(path, namePath);\n });\n}\nfunction isObject(obj) {\n return _typeof(obj) === 'object' && obj !== null && Object.getPrototypeOf(obj) === Object.prototype;\n}\n/**\n * Copy values into store and return a new values object\n * ({ a: 1, b: { c: 2 } }, { a: 4, b: { d: 5 } }) => { a: 4, b: { c: 2, d: 5 } }\n */\nfunction internalSetValues(store, values) {\n var newStore = Array.isArray(store) ? _toConsumableArray(store) : _objectSpread({}, store);\n if (!values) {\n return newStore;\n }\n Object.keys(values).forEach(function (key) {\n var prevValue = newStore[key];\n var value = values[key];\n // If both are object (but target is not array), we use recursion to set deep value\n var recursive = isObject(prevValue) && isObject(value);\n newStore[key] = recursive ? internalSetValues(prevValue, value || {}) : cloneDeep(value); // Clone deep for arrays\n });\n\n return newStore;\n}\nexport function setValues(store) {\n for (var _len = arguments.length, restValues = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n restValues[_key - 1] = arguments[_key];\n }\n return restValues.reduce(function (current, newStore) {\n return internalSetValues(current, newStore);\n }, store);\n}\nexport function matchNamePath(namePath, changedNamePath) {\n if (!namePath || !changedNamePath || namePath.length !== changedNamePath.length) {\n return false;\n }\n return namePath.every(function (nameUnit, i) {\n return changedNamePath[i] === nameUnit;\n });\n}\nexport function isSimilar(source, target) {\n if (source === target) {\n return true;\n }\n if (!source && target || source && !target) {\n return false;\n }\n if (!source || !target || _typeof(source) !== 'object' || _typeof(target) !== 'object') {\n return false;\n }\n var sourceKeys = Object.keys(source);\n var targetKeys = Object.keys(target);\n var keys = new Set([].concat(sourceKeys, targetKeys));\n return _toConsumableArray(keys).every(function (key) {\n var sourceValue = source[key];\n var targetValue = target[key];\n if (typeof sourceValue === 'function' && typeof targetValue === 'function') {\n return true;\n }\n return sourceValue === targetValue;\n });\n}\nexport function defaultGetValueFromEvent(valuePropName) {\n var event = arguments.length <= 1 ? undefined : arguments[1];\n if (event && event.target && _typeof(event.target) === 'object' && valuePropName in event.target) {\n return event.target[valuePropName];\n }\n return event;\n}\n/**\n * Moves an array item from one position in an array to another.\n *\n * Note: This is a pure function so a new array will be returned, instead\n * of altering the array argument.\n *\n * @param array Array in which to move an item. (required)\n * @param moveIndex The index of the item to move. (required)\n * @param toIndex The index to move item at moveIndex to. (required)\n */\nexport function move(array, moveIndex, toIndex) {\n var length = array.length;\n if (moveIndex < 0 || moveIndex >= length || toIndex < 0 || toIndex >= length) {\n return array;\n }\n var item = array[moveIndex];\n var diff = moveIndex - toIndex;\n if (diff > 0) {\n // move left\n return [].concat(_toConsumableArray(array.slice(0, toIndex)), [item], _toConsumableArray(array.slice(toIndex, moveIndex)), _toConsumableArray(array.slice(moveIndex + 1, length)));\n }\n if (diff < 0) {\n // move right\n return [].concat(_toConsumableArray(array.slice(0, moveIndex)), _toConsumableArray(array.slice(moveIndex + 1, toIndex + 1)), [item], _toConsumableArray(array.slice(toIndex + 1, length)));\n }\n return array;\n}","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nexport { _arrayLikeToArray as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nexport { _objectSpread2 as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return arrayLikeToArray(r);\n}\nexport { _arrayWithoutHoles as default };","function _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nexport { _iterableToArray as default };","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableSpread as default };","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nfunction _toConsumableArray(r) {\n return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();\n}\nexport { _toConsumableArray as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nexport { _unsupportedIterableToArray as default };"],"sourceRoot":""}