@arco-design/mobile-react 2.36.1 → 2.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.en-US.md +2 -2
  3. package/README.md +2 -2
  4. package/cjs/_helpers/hooks.d.ts +1 -1
  5. package/cjs/_helpers/hooks.js +1 -1
  6. package/cjs/_helpers/react-dom.d.ts +5 -5
  7. package/cjs/_helpers/react-dom.js +49 -32
  8. package/cjs/_helpers/render.js +6 -3
  9. package/cjs/action-sheet/index.d.ts +3 -2
  10. package/cjs/action-sheet/index.js +2 -2
  11. package/cjs/carousel/index.js +8 -7
  12. package/cjs/checkbox/checkbox.d.ts +1 -1
  13. package/cjs/checkbox/group.d.ts +1 -1
  14. package/cjs/checkbox/hooks/useMergeProps.d.ts +1 -1
  15. package/cjs/checkbox/index.d.ts +2 -2
  16. package/cjs/context-provider/index.d.ts +8 -2
  17. package/cjs/count-down/hooks.js +2 -2
  18. package/cjs/dialog/index.d.ts +8 -3
  19. package/cjs/dialog/methods.d.ts +6 -2
  20. package/cjs/dropdown-menu/helper.d.ts +2 -2
  21. package/cjs/ellipsis/components/native-ellipsis.d.ts +2 -3
  22. package/cjs/ellipsis/components/native-ellipsis.js +1 -2
  23. package/cjs/form/form-item.d.ts +33 -2
  24. package/cjs/form/form-item.js +142 -121
  25. package/cjs/form/index.js +3 -1
  26. package/cjs/form/linked-container.d.ts +1 -1
  27. package/cjs/form/linked-container.js +4 -0
  28. package/cjs/form/style/css/index.css +4 -1
  29. package/cjs/form/style/index.less +6 -1
  30. package/cjs/form/type.d.ts +29 -6
  31. package/cjs/form/type.js +10 -2
  32. package/cjs/form/useForm.d.ts +2 -17
  33. package/cjs/form/useForm.js +98 -17
  34. package/cjs/form/utils.d.ts +2 -0
  35. package/cjs/form/utils.js +42 -2
  36. package/cjs/image-preview/index.d.ts +2 -2
  37. package/cjs/index-bar/group.js +3 -1
  38. package/cjs/index-bar/index.d.ts +2 -2
  39. package/cjs/index-bar/utils.d.ts +1 -1
  40. package/cjs/input/index.js +1 -1
  41. package/cjs/masking/index.d.ts +2 -2
  42. package/cjs/notify/index.d.ts +8 -8
  43. package/cjs/notify/index.js +2 -2
  44. package/cjs/picker-view/components/cascader.js +3 -1
  45. package/cjs/picker-view/components/picker-cell.js +1 -1
  46. package/cjs/picker-view/index.js +3 -1
  47. package/cjs/popup/index.d.ts +2 -2
  48. package/cjs/popup-swiper/index.d.ts +2 -2
  49. package/cjs/pull-refresh/hooks.d.ts +2 -2
  50. package/cjs/radio/group.d.ts +1 -1
  51. package/cjs/radio/group.js +1 -1
  52. package/cjs/radio/index.d.ts +2 -2
  53. package/cjs/radio/radio.d.ts +1 -1
  54. package/cjs/radio/type.d.ts +2 -2
  55. package/cjs/skeleton/elements.js +9 -3
  56. package/cjs/slider/hooks/index.d.ts +1 -1
  57. package/cjs/slider/hooks/useSliderEvents.d.ts +1 -1
  58. package/cjs/stepper/hooks/useValue.d.ts +2 -1
  59. package/cjs/steps/index.d.ts +1 -1
  60. package/cjs/tabs/type.d.ts +2 -2
  61. package/cjs/toast/index.d.ts +12 -12
  62. package/cjs/toast/index.js +1 -1
  63. package/dist/index.js +3070 -411
  64. package/dist/index.min.js +4 -4
  65. package/dist/style.css +4 -1
  66. package/dist/style.min.css +1 -1
  67. package/esm/_helpers/hooks.d.ts +1 -1
  68. package/esm/_helpers/hooks.js +1 -1
  69. package/esm/_helpers/react-dom.d.ts +5 -5
  70. package/esm/_helpers/react-dom.js +49 -30
  71. package/esm/_helpers/render.js +6 -3
  72. package/esm/action-sheet/index.d.ts +3 -2
  73. package/esm/action-sheet/index.js +2 -2
  74. package/esm/carousel/index.js +8 -7
  75. package/esm/checkbox/checkbox.d.ts +1 -1
  76. package/esm/checkbox/group.d.ts +1 -1
  77. package/esm/checkbox/hooks/useMergeProps.d.ts +1 -1
  78. package/esm/checkbox/index.d.ts +2 -2
  79. package/esm/context-provider/index.d.ts +8 -2
  80. package/esm/count-down/hooks.js +2 -2
  81. package/esm/dialog/index.d.ts +8 -3
  82. package/esm/dialog/methods.d.ts +6 -2
  83. package/esm/dropdown-menu/helper.d.ts +2 -2
  84. package/esm/ellipsis/components/native-ellipsis.d.ts +2 -3
  85. package/esm/ellipsis/components/native-ellipsis.js +1 -1
  86. package/esm/form/form-item.d.ts +33 -2
  87. package/esm/form/form-item.js +143 -122
  88. package/esm/form/index.js +3 -1
  89. package/esm/form/linked-container.d.ts +1 -1
  90. package/esm/form/linked-container.js +4 -0
  91. package/esm/form/style/css/index.css +4 -1
  92. package/esm/form/style/index.less +6 -1
  93. package/esm/form/type.d.ts +29 -6
  94. package/esm/form/type.js +8 -1
  95. package/esm/form/useForm.d.ts +2 -17
  96. package/esm/form/useForm.js +97 -17
  97. package/esm/form/utils.d.ts +2 -0
  98. package/esm/form/utils.js +31 -1
  99. package/esm/image-preview/index.d.ts +2 -2
  100. package/esm/index-bar/group.js +3 -1
  101. package/esm/index-bar/index.d.ts +2 -2
  102. package/esm/index-bar/utils.d.ts +1 -1
  103. package/esm/input/index.js +1 -1
  104. package/esm/masking/index.d.ts +2 -2
  105. package/esm/notify/index.d.ts +8 -8
  106. package/esm/notify/index.js +2 -2
  107. package/esm/picker-view/components/cascader.js +3 -1
  108. package/esm/picker-view/components/picker-cell.js +1 -1
  109. package/esm/picker-view/index.js +3 -1
  110. package/esm/popup/index.d.ts +2 -2
  111. package/esm/popup-swiper/index.d.ts +2 -2
  112. package/esm/pull-refresh/hooks.d.ts +2 -2
  113. package/esm/radio/group.d.ts +1 -1
  114. package/esm/radio/group.js +1 -1
  115. package/esm/radio/index.d.ts +2 -2
  116. package/esm/radio/radio.d.ts +1 -1
  117. package/esm/radio/type.d.ts +2 -2
  118. package/esm/skeleton/elements.js +9 -3
  119. package/esm/slider/hooks/index.d.ts +1 -1
  120. package/esm/slider/hooks/useSliderEvents.d.ts +1 -1
  121. package/esm/stepper/hooks/useValue.d.ts +2 -1
  122. package/esm/steps/index.d.ts +1 -1
  123. package/esm/tabs/type.d.ts +2 -2
  124. package/esm/toast/index.d.ts +12 -12
  125. package/esm/toast/index.js +1 -1
  126. package/esnext/_helpers/hooks.js +1 -1
  127. package/esnext/_helpers/react-dom.d.ts +5 -5
  128. package/esnext/_helpers/react-dom.js +47 -28
  129. package/esnext/_helpers/render.js +3 -2
  130. package/esnext/action-sheet/index.d.ts +3 -2
  131. package/esnext/action-sheet/index.js +1 -1
  132. package/esnext/carousel/index.js +7 -5
  133. package/esnext/context-provider/index.d.ts +8 -2
  134. package/esnext/context-provider/index.js +1 -1
  135. package/esnext/count-down/hooks.js +2 -2
  136. package/esnext/dialog/index.d.ts +8 -3
  137. package/esnext/dialog/methods.d.ts +6 -2
  138. package/esnext/dropdown-menu/helper.d.ts +1 -1
  139. package/esnext/ellipsis/components/native-ellipsis.d.ts +2 -3
  140. package/esnext/ellipsis/components/native-ellipsis.js +1 -1
  141. package/esnext/form/form-item.d.ts +33 -2
  142. package/esnext/form/form-item.js +85 -71
  143. package/esnext/form/index.js +2 -1
  144. package/esnext/form/linked-container.d.ts +1 -1
  145. package/esnext/form/linked-container.js +3 -0
  146. package/esnext/form/style/css/index.css +4 -1
  147. package/esnext/form/style/index.less +6 -1
  148. package/esnext/form/type.d.ts +29 -6
  149. package/esnext/form/type.js +7 -0
  150. package/esnext/form/useForm.d.ts +2 -17
  151. package/esnext/form/useForm.js +72 -13
  152. package/esnext/form/utils.d.ts +2 -0
  153. package/esnext/form/utils.js +26 -0
  154. package/esnext/image-preview/index.d.ts +2 -2
  155. package/esnext/index-bar/group.js +5 -1
  156. package/esnext/index-bar/index.d.ts +2 -2
  157. package/esnext/input/index.js +1 -1
  158. package/esnext/masking/index.d.ts +2 -2
  159. package/esnext/notify/index.d.ts +8 -8
  160. package/esnext/notify/index.js +2 -2
  161. package/esnext/picker-view/components/cascader.js +5 -1
  162. package/esnext/picker-view/components/picker-cell.js +1 -1
  163. package/esnext/picker-view/index.js +5 -1
  164. package/esnext/popup/index.d.ts +2 -2
  165. package/esnext/popup-swiper/index.d.ts +2 -2
  166. package/esnext/pull-refresh/hooks.d.ts +2 -2
  167. package/esnext/radio/group.js +3 -1
  168. package/esnext/radio/type.d.ts +2 -2
  169. package/esnext/skeleton/elements.js +15 -3
  170. package/esnext/slider/hooks/useSliderEvents.d.ts +1 -1
  171. package/esnext/tabs/type.d.ts +2 -2
  172. package/esnext/toast/index.d.ts +12 -12
  173. package/esnext/toast/index.js +1 -1
  174. package/package.json +3 -3
  175. package/umd/_helpers/hooks.d.ts +1 -1
  176. package/umd/_helpers/hooks.js +1 -1
  177. package/umd/_helpers/react-dom.d.ts +5 -5
  178. package/umd/_helpers/react-dom.js +53 -35
  179. package/umd/_helpers/render.js +6 -3
  180. package/umd/action-sheet/index.d.ts +3 -2
  181. package/umd/action-sheet/index.js +2 -2
  182. package/umd/carousel/index.js +8 -7
  183. package/umd/checkbox/checkbox.d.ts +1 -1
  184. package/umd/checkbox/group.d.ts +1 -1
  185. package/umd/checkbox/hooks/useMergeProps.d.ts +1 -1
  186. package/umd/checkbox/index.d.ts +2 -2
  187. package/umd/context-provider/index.d.ts +8 -2
  188. package/umd/count-down/hooks.js +2 -2
  189. package/umd/dialog/index.d.ts +8 -3
  190. package/umd/dialog/methods.d.ts +6 -2
  191. package/umd/dropdown-menu/helper.d.ts +2 -2
  192. package/umd/ellipsis/components/native-ellipsis.d.ts +2 -3
  193. package/umd/ellipsis/components/native-ellipsis.js +1 -2
  194. package/umd/form/form-item.d.ts +33 -2
  195. package/umd/form/form-item.js +142 -121
  196. package/umd/form/index.js +3 -1
  197. package/umd/form/linked-container.d.ts +1 -1
  198. package/umd/form/linked-container.js +4 -0
  199. package/umd/form/style/css/index.css +4 -1
  200. package/umd/form/style/index.less +6 -1
  201. package/umd/form/type.d.ts +29 -6
  202. package/umd/form/type.js +9 -1
  203. package/umd/form/useForm.d.ts +2 -17
  204. package/umd/form/useForm.js +98 -21
  205. package/umd/form/utils.d.ts +2 -0
  206. package/umd/form/utils.js +40 -5
  207. package/umd/image-preview/index.d.ts +2 -2
  208. package/umd/index-bar/group.js +3 -1
  209. package/umd/index-bar/index.d.ts +2 -2
  210. package/umd/index-bar/utils.d.ts +1 -1
  211. package/umd/input/index.js +1 -1
  212. package/umd/masking/index.d.ts +2 -2
  213. package/umd/notify/index.d.ts +8 -8
  214. package/umd/notify/index.js +2 -2
  215. package/umd/picker-view/components/cascader.js +3 -1
  216. package/umd/picker-view/components/picker-cell.js +1 -1
  217. package/umd/picker-view/index.js +3 -1
  218. package/umd/popup/index.d.ts +2 -2
  219. package/umd/popup-swiper/index.d.ts +2 -2
  220. package/umd/pull-refresh/hooks.d.ts +2 -2
  221. package/umd/radio/group.d.ts +1 -1
  222. package/umd/radio/group.js +1 -1
  223. package/umd/radio/index.d.ts +2 -2
  224. package/umd/radio/radio.d.ts +1 -1
  225. package/umd/radio/type.d.ts +2 -2
  226. package/umd/skeleton/elements.js +9 -3
  227. package/umd/slider/hooks/index.d.ts +1 -1
  228. package/umd/slider/hooks/useSliderEvents.d.ts +1 -1
  229. package/umd/stepper/hooks/useValue.d.ts +2 -1
  230. package/umd/steps/index.d.ts +1 -1
  231. package/umd/tabs/type.d.ts +2 -2
  232. package/umd/toast/index.d.ts +12 -12
  233. package/umd/toast/index.js +1 -1
package/dist/index.js CHANGED
@@ -112,7 +112,7 @@
112
112
  * ```
113
113
  */
114
114
 
115
- function isArray$1(obj) {
115
+ function isArray$2(obj) {
116
116
  return opt.call(obj) === '[object Array]';
117
117
  }
118
118
  /**
@@ -130,7 +130,7 @@
130
130
  * ```
131
131
  */
132
132
 
133
- function isObject$2(obj) {
133
+ function isObject$3(obj) {
134
134
  return opt.call(obj) === '[object Object]';
135
135
  }
136
136
  /**
@@ -204,7 +204,7 @@
204
204
  * ```
205
205
  */
206
206
 
207
- function isFunction(obj) {
207
+ function isFunction$1(obj) {
208
208
  return Object.prototype.toString.call(obj).toLowerCase() === '[object function]';
209
209
  }
210
210
  /**
@@ -223,7 +223,7 @@
223
223
  */
224
224
 
225
225
  function isEmptyArray(obj) {
226
- return isArray$1(obj) && !(obj === null || obj === void 0 ? void 0 : obj.length);
226
+ return isArray$2(obj) && !(obj === null || obj === void 0 ? void 0 : obj.length);
227
227
  }
228
228
  /**
229
229
  * 深比较两个对象是否相等
@@ -247,7 +247,7 @@
247
247
  return obj === sub;
248
248
  }
249
249
 
250
- if (isFunction(obj) && isFunction(sub)) {
250
+ if (isFunction$1(obj) && isFunction$1(sub)) {
251
251
  return obj === sub || obj.toString() === sub.toString();
252
252
  }
253
253
 
@@ -300,9 +300,9 @@
300
300
 
301
301
  if (isString(v)) {
302
302
  classNames.push(v);
303
- } else if (isArray$1(v)) {
303
+ } else if (isArray$2(v)) {
304
304
  classNames = classNames.concat(v);
305
- } else if (isObject$2(v)) {
305
+ } else if (isObject$3(v)) {
306
306
  Object.keys(v).forEach(function (k) {
307
307
  if (v[k]) {
308
308
  classNames.push(k);
@@ -1656,7 +1656,6 @@
1656
1656
  LoadMore: {
1657
1657
  loadMoreText: '加载更多',
1658
1658
  loadingText: '正在努力加载中...',
1659
- prepareText: '上拉/点击加载更多',
1660
1659
  noDataText: '没有更多数据了',
1661
1660
  failLoadText: '加载失败,点击重试',
1662
1661
  prepareScrollText: '上拉',
@@ -1719,36 +1718,36 @@
1719
1718
  boolean: defaultMessageTemplate$1
1720
1719
  },
1721
1720
  number: {
1722
- min: '`%s` 小于 `%s`',
1723
- max: '`%s` 大于 `%s`',
1724
- equal: '`%s` 不等于 `%s`',
1725
- range: '`%s` 不在 `%s ~ %s` 范围中 ',
1726
- positive: '`%s` 不是正数',
1727
- negative: '`%s`不是负数'
1721
+ min: '`%s` 不可小于 `%s`',
1722
+ max: '`%s` 不可大于 `%s`',
1723
+ equal: '`%s` 应该等于 `%s`',
1724
+ range: '`%s` 应该在 `%s ~ %s` 范围中',
1725
+ positive: '`%s` 不可小于 0',
1726
+ negative: '`%s` 不可大于 0'
1728
1727
  },
1729
1728
  string: {
1730
- max: '%s 超过 %s 个字符',
1731
- min: '%s 少于 %s 个字符',
1732
- len: '%s 字符个数应为 %s',
1733
- equal: '%s 不等于 `%s`',
1734
- match: '`%s` 不匹配 %s 模式',
1729
+ max: '%s 不可超过 %s 个字符',
1730
+ min: '%s 不可少于 %s 个字符',
1731
+ len: '%s 字符个数应等于 %s',
1732
+ equal: '%s 应该等于 `%s`',
1733
+ match: '`%s` 应匹配 %s 模式',
1735
1734
  uppercase: '%s 需全为大写字符',
1736
1735
  lowercase: '%s 需全为小写字符',
1737
- whitespace: '%s 不能为连续空格'
1736
+ whitespace: '%s 不可全为空格'
1738
1737
  },
1739
1738
  array: {
1740
- max: '%s 数组长度大于 %s',
1741
- min: '%s 数组长度小于 %s',
1742
- len: '%s 数组长度需为 %s',
1743
- includes: '%s 不包含 %s',
1744
- deepEqual: '%s 不完全等于 %s'
1739
+ max: '%s 数组长度不可大于 %s',
1740
+ min: '%s 数组长度不可小于 %s',
1741
+ len: '%s 数组长度需等于 %s',
1742
+ includes: '%s 应该包含 %s',
1743
+ deepEqual: '%s 应该完全等于 %s'
1745
1744
  },
1746
1745
  object: {
1747
- deepEqual: '%s 不完全等于 %s',
1748
- hasKeys: '%s 不包含必要字段 %s'
1746
+ deepEqual: '%s 应该完全等于 %s',
1747
+ hasKeys: '%s 需包含必要字段 %s'
1749
1748
  },
1750
1749
  boolean: {
1751
- equal: '%s 不等于 `%s`'
1750
+ equal: '%s 应该等于 `%s`'
1752
1751
  },
1753
1752
  pickerDefaultHint: '请选择'
1754
1753
  },
@@ -1756,8 +1755,8 @@
1756
1755
  backBtnAriaLabel: '返回'
1757
1756
  },
1758
1757
  Uploader: {
1759
- uploadBtn: '点击上传',
1760
- retryUpload: '点击重试'
1758
+ uploadBtn: '上传',
1759
+ retryUpload: '重试'
1761
1760
  }
1762
1761
  };
1763
1762
  var zhCN = localeConfig;
@@ -1975,7 +1974,7 @@
1975
1974
  Object.keys(originMT).forEach(function (key) {
1976
1975
  var originValue = originMT[key];
1977
1976
  var curValue = newMT === null || newMT === void 0 ? void 0 : newMT[key];
1978
- targetMT[key] = isObject$2(originValue) ? __assign$2(__assign$2({}, originValue), curValue) : curValue || originValue;
1977
+ targetMT[key] = isObject$3(originValue) ? __assign$2(__assign$2({}, originValue), curValue) : curValue || originValue;
1979
1978
  });
1980
1979
  }
1981
1980
 
@@ -3695,7 +3694,7 @@
3695
3694
  Object.keys(this.rules).forEach(function (key) {
3696
3695
  var spPromiseGroup = [];
3697
3696
 
3698
- if (isArray$1(_this.rules[key])) {
3697
+ if (isArray$2(_this.rules[key])) {
3699
3698
  for (var i = 0; i < _this.rules[key].length; i++) {
3700
3699
  var rule = _this.rules[key][i];
3701
3700
 
@@ -4650,7 +4649,7 @@
4650
4649
  clickTimes = _a[0],
4651
4650
  setClickTimes = _a[1];
4652
4651
 
4653
- var eventRef = React.useRef();
4652
+ var eventRef = React.useRef(undefined);
4654
4653
  React.useEffect(function () {
4655
4654
  var timer = setTimeout(function () {
4656
4655
  if (clickTimes === 1) onClick(eventRef.current);
@@ -4702,63 +4701,81 @@
4702
4701
  };
4703
4702
  }
4704
4703
 
4705
- function isObject$1(obj) {
4704
+ function isObject$2(obj) {
4706
4705
  return Object.prototype.toString.call(obj) === '[object Object]';
4707
- }
4706
+ } // Cast ReactDOM to a version that might have createRoot and other properties
4708
4707
 
4709
- var CopyReactDOM = __assign$3({}, ReactDOM__namespace);
4710
4708
 
4709
+ var typedReactDOM = ReactDOM__namespace;
4711
4710
  var copyRender;
4712
- var version = CopyReactDOM.version,
4713
- reactRender = CopyReactDOM.render,
4714
- unmountComponentAtNode = CopyReactDOM.unmountComponentAtNode;
4715
- var isReact18 = Number((version || '').split('.')[0]) > 17;
4716
4711
 
4717
4712
  var updateUsingClientEntryPoint = function updateUsingClientEntryPoint(skipWarning) {
4718
4713
  // https://github.com/facebook/react/blob/17806594cc28284fe195f918e8d77de3516848ec/packages/react-dom/npm/client.js#L10
4719
4714
  // Avoid console warning
4720
- var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = CopyReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
4715
+ var secretInternals = typedReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
4721
4716
 
4722
- if (isObject$1(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)) {
4723
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skipWarning;
4717
+ if (isObject$2(secretInternals)) {
4718
+ secretInternals.usingClientEntryPoint = skipWarning;
4724
4719
  }
4725
4720
  };
4726
4721
 
4727
- var createRoot;
4728
-
4729
- try {
4730
- createRoot = CopyReactDOM.createRoot;
4731
- } catch (_) {}
4722
+ var createRootFn = typedReactDOM.createRoot;
4732
4723
 
4733
- if (isReact18 && createRoot) {
4734
- copyRender = function copyRender(app, container) {
4724
+ var getRender = function getRender(createRootFunction) {
4725
+ return function (app, container) {
4735
4726
  updateUsingClientEntryPoint(true);
4736
- var root = createRoot(container);
4727
+ var root = createRootFunction(container);
4737
4728
  updateUsingClientEntryPoint(false);
4738
4729
  root.render(app);
4739
-
4740
- root._unmount = function () {
4741
- setTimeout(function () {
4742
- var _a;
4743
-
4744
- (_a = root === null || root === void 0 ? void 0 : root.unmount) === null || _a === void 0 ? void 0 : _a.call(root);
4745
- });
4730
+ return {
4731
+ render: function render(elementToRender) {
4732
+ root.render(elementToRender);
4733
+ },
4734
+ _unmount: function _unmount() {
4735
+ setTimeout(function () {
4736
+ if (root && typeof root.unmount === 'function') {
4737
+ root.unmount();
4738
+ }
4739
+ });
4740
+ }
4746
4741
  };
4747
-
4748
- return root;
4749
4742
  };
4750
- } else {
4743
+ };
4744
+
4745
+ if (createRootFn) {
4746
+ // React 18
4747
+ copyRender = getRender(createRootFn);
4748
+ } else if (typeof typedReactDOM.render === 'function' && typeof typedReactDOM.unmountComponentAtNode === 'function') {
4749
+ // React 16/17
4751
4750
  copyRender = function copyRender(app, container) {
4752
- reactRender(app, container);
4751
+ typedReactDOM.render(app, container); // Use non-null assertion
4752
+
4753
4753
  return {
4754
- render: function render(comment) {
4755
- reactRender(comment, container);
4754
+ render: function render(elementToRender) {
4755
+ typedReactDOM.render(elementToRender, container); // Use non-null assertion
4756
4756
  },
4757
4757
  _unmount: function _unmount() {
4758
- unmountComponentAtNode(container);
4758
+ typedReactDOM.unmountComponentAtNode(container); // Use non-null assertion
4759
4759
  }
4760
4760
  };
4761
4761
  };
4762
+ } else {
4763
+ copyRender = function copyRender(app, container, createRootFunction) {
4764
+ var defaultCb = function defaultCb() {
4765
+ // Fallback if no rendering method is found
4766
+ console.error('ArcoDesign: ReactDOM.createRoot() or ReactDOM.render() not found. ' + 'This usually means you are using an unsupported version of React, ' + 'or ReactDOM is not properly initialized. ' + 'ArcoDesign Mobile React requires React 16, 17, 18, or 19.');
4767
+ return {
4768
+ render: function render(_element) {},
4769
+ _unmount: function _unmount() {}
4770
+ };
4771
+ };
4772
+
4773
+ if (createRootFunction) {
4774
+ return getRender(createRootFunction)(app, container);
4775
+ }
4776
+
4777
+ return defaultCb();
4778
+ };
4762
4779
  }
4763
4780
 
4764
4781
  var render = copyRender;
@@ -4775,14 +4792,15 @@
4775
4792
  this.render = function (props) {
4776
4793
  var CustomApp = _this.app;
4777
4794
 
4778
- var propsWithContext = __assign$3(__assign$3({}, props), {
4795
+ var propsWithContext = __assign$3({
4779
4796
  context: _this.context
4780
- });
4797
+ }, props);
4781
4798
 
4782
4799
  if (_this.root) {
4783
4800
  _this.root.render( /*#__PURE__*/React__default["default"].createElement(CustomApp, __assign$3({}, propsWithContext)));
4784
4801
  } else {
4785
- _this.root = render( /*#__PURE__*/React__default["default"].createElement(CustomApp, __assign$3({}, propsWithContext)), _this.container);
4802
+ var createRoot = (_this.context || {}).createRoot;
4803
+ _this.root = render( /*#__PURE__*/React__default["default"].createElement(CustomApp, __assign$3({}, propsWithContext)), _this.container, createRoot);
4786
4804
  }
4787
4805
  };
4788
4806
 
@@ -5581,7 +5599,7 @@
5581
5599
  var NAN = 0 / 0;
5582
5600
 
5583
5601
  /** `Object#toString` result references. */
5584
- var symbolTag = '[object Symbol]';
5602
+ var symbolTag$2 = '[object Symbol]';
5585
5603
 
5586
5604
  /** Used to match leading and trailing whitespace. */
5587
5605
  var reTrim = /^\s+|\s+$/g;
@@ -5599,23 +5617,23 @@
5599
5617
  var freeParseInt = parseInt;
5600
5618
 
5601
5619
  /** Detect free variable `global` from Node.js. */
5602
- var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
5620
+ var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
5603
5621
 
5604
5622
  /** Detect free variable `self`. */
5605
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
5623
+ var freeSelf$1 = typeof self == 'object' && self && self.Object === Object && self;
5606
5624
 
5607
5625
  /** Used as a reference to the global object. */
5608
- var root$1 = freeGlobal || freeSelf || Function('return this')();
5626
+ var root$2 = freeGlobal$1 || freeSelf$1 || Function('return this')();
5609
5627
 
5610
5628
  /** Used for built-in method references. */
5611
- var objectProto = Object.prototype;
5629
+ var objectProto$d = Object.prototype;
5612
5630
 
5613
5631
  /**
5614
5632
  * Used to resolve the
5615
5633
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
5616
5634
  * of values.
5617
5635
  */
5618
- var objectToString = objectProto.toString;
5636
+ var objectToString$1 = objectProto$d.toString;
5619
5637
 
5620
5638
  /* Built-in method references for those with the same name as other `lodash` methods. */
5621
5639
  var nativeMax = Math.max,
@@ -5638,7 +5656,7 @@
5638
5656
  * // => Logs the number of milliseconds it took for the deferred invocation.
5639
5657
  */
5640
5658
  var now = function() {
5641
- return root$1.Date.now();
5659
+ return root$2.Date.now();
5642
5660
  };
5643
5661
 
5644
5662
  /**
@@ -5711,7 +5729,7 @@
5711
5729
  throw new TypeError(FUNC_ERROR_TEXT);
5712
5730
  }
5713
5731
  wait = toNumber(wait) || 0;
5714
- if (isObject(options)) {
5732
+ if (isObject$1(options)) {
5715
5733
  leading = !!options.leading;
5716
5734
  maxing = 'maxWait' in options;
5717
5735
  maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
@@ -5868,7 +5886,7 @@
5868
5886
  if (typeof func != 'function') {
5869
5887
  throw new TypeError(FUNC_ERROR_TEXT);
5870
5888
  }
5871
- if (isObject(options)) {
5889
+ if (isObject$1(options)) {
5872
5890
  leading = 'leading' in options ? !!options.leading : leading;
5873
5891
  trailing = 'trailing' in options ? !!options.trailing : trailing;
5874
5892
  }
@@ -5904,7 +5922,7 @@
5904
5922
  * _.isObject(null);
5905
5923
  * // => false
5906
5924
  */
5907
- function isObject(value) {
5925
+ function isObject$1(value) {
5908
5926
  var type = typeof value;
5909
5927
  return !!value && (type == 'object' || type == 'function');
5910
5928
  }
@@ -5933,7 +5951,7 @@
5933
5951
  * _.isObjectLike(null);
5934
5952
  * // => false
5935
5953
  */
5936
- function isObjectLike(value) {
5954
+ function isObjectLike$1(value) {
5937
5955
  return !!value && typeof value == 'object';
5938
5956
  }
5939
5957
 
@@ -5956,7 +5974,7 @@
5956
5974
  */
5957
5975
  function isSymbol(value) {
5958
5976
  return typeof value == 'symbol' ||
5959
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
5977
+ (isObjectLike$1(value) && objectToString$1.call(value) == symbolTag$2);
5960
5978
  }
5961
5979
 
5962
5980
  /**
@@ -5989,9 +6007,9 @@
5989
6007
  if (isSymbol(value)) {
5990
6008
  return NAN;
5991
6009
  }
5992
- if (isObject(value)) {
6010
+ if (isObject$1(value)) {
5993
6011
  var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
5994
- value = isObject(other) ? (other + '') : other;
6012
+ value = isObject$1(other) ? (other + '') : other;
5995
6013
  }
5996
6014
  if (typeof value != 'string') {
5997
6015
  return value === 0 ? value : +value;
@@ -9202,14 +9220,14 @@
9202
9220
  }, subTitle) : null) : null, /*#__PURE__*/React__default["default"].createElement("div", {
9203
9221
  className: prefixCls + "-action-sheet-list"
9204
9222
  }, (items || []).map(function (item, index) {
9205
- return /*#__PURE__*/React__default["default"].createElement("div", {
9223
+ return item.content ? /*#__PURE__*/React__default["default"].createElement("div", {
9206
9224
  className: cls(prefixCls + "-action-sheet-item", item.className, item.status || 'normal'),
9207
9225
  key: index,
9208
9226
  style: item.style,
9209
9227
  onClick: function onClick(e) {
9210
9228
  return handleItemClick(e, item);
9211
9229
  }
9212
- }, item.content);
9230
+ }, item.content) : null;
9213
9231
  })), cancelText ? /*#__PURE__*/React__default["default"].createElement("div", {
9214
9232
  className: prefixCls + "-action-sheet-item cancel-item",
9215
9233
  onClick: function onClick(e) {
@@ -10947,12 +10965,6 @@
10947
10965
 
10948
10966
  stopPropagation && e.stopPropagation();
10949
10967
 
10950
- if (bouncingRef.current) {
10951
- bouncingRef.current = false;
10952
- jumpTo(index, false);
10953
- return;
10954
- }
10955
-
10956
10968
  if (!touchStartedRef.current) {
10957
10969
  return;
10958
10970
  }
@@ -10964,7 +10976,14 @@
10964
10976
  return;
10965
10977
  }
10966
10978
 
10967
- touchMovedRef.current = false;
10979
+ touchMovedRef.current = false; // bugfix: 回弹判断逻辑需在touchMovedRef标识重置逻辑之后,否则会在触发回弹后导致标识无法重置引起滑动判断问题
10980
+ // @en bugfix: The logic for the bounce judgment needs to be after the touchMovedRef reset logic, otherwise it will cause the problem of slide judgment after the bounce is triggered.
10981
+
10982
+ if (bouncingRef.current) {
10983
+ bouncingRef.current = false;
10984
+ jumpTo(index, false);
10985
+ return;
10986
+ }
10968
10987
 
10969
10988
  if (posAdjustingRef.current || touchStoppedRef.current) {
10970
10989
  return;
@@ -12317,12 +12336,12 @@
12317
12336
  var inBrowser = typeof window !== 'undefined'; // 判断根元素
12318
12337
  // @en Determine the root element
12319
12338
 
12320
- var root = inBrowser ? window : global; // 根据id清除对应的animationFrame
12339
+ var root$1 = inBrowser ? window : global; // 根据id清除对应的animationFrame
12321
12340
  // @en Clear the corresponding animationFrame according to the id
12322
12341
 
12323
12342
  function cancelRaf(id) {
12324
- var cancelAnimationFrame = root.cancelAnimationFrame || root.clearTimeout;
12325
- cancelAnimationFrame.call(root, id);
12343
+ var cancelAnimationFrame = root$1.cancelAnimationFrame || root$1.clearTimeout;
12344
+ cancelAnimationFrame.call(root$1, id);
12326
12345
  } // 计算现在时间
12327
12346
  // @en Calculate the current time
12328
12347
 
@@ -12340,8 +12359,8 @@
12340
12359
 
12341
12360
 
12342
12361
  function raf(fn) {
12343
- var requestAnimationFrame = root.requestAnimationFrame || rafPolyfill;
12344
- return requestAnimationFrame.call(root, fn);
12362
+ var requestAnimationFrame = root$1.requestAnimationFrame || rafPolyfill;
12363
+ return requestAnimationFrame.call(root$1, fn);
12345
12364
  } // 补0成需要的格式
12346
12365
  // @en Fill 0 into the required format
12347
12366
 
@@ -12459,8 +12478,8 @@
12459
12478
 
12460
12479
  var useCountDown = function useCountDown(options) {
12461
12480
  var taskIdRef = React.useRef(0);
12462
- var endTimeRef = React.useRef();
12463
- var countingRef = React.useRef();
12481
+ var endTimeRef = React.useRef(undefined);
12482
+ var countingRef = React.useRef(undefined);
12464
12483
 
12465
12484
  var _a = useRefState(options.time),
12466
12485
  remain = _a[0],
@@ -12768,7 +12787,7 @@
12768
12787
  var rowCount = Math.max(rows % 2 === 0 ? rows + 1 : rows, 3);
12769
12788
  var isTouchMoveRef = React.useRef(false);
12770
12789
  var isTouchStopped = React.useRef(false);
12771
- var unmountCallbackRef = React.useRef();
12790
+ var unmountCallbackRef = React.useRef(undefined);
12772
12791
  var timeRef = React.useRef(null);
12773
12792
  var colStyle = React.useMemo(function () {
12774
12793
  return getStyleWithVendor(__assign$3(__assign$3({
@@ -13217,14 +13236,16 @@
13217
13236
  rows: rows,
13218
13237
  hideEmptyCols: hideEmptyCols,
13219
13238
  ref: function ref(cellRef) {
13220
- return cellRef && (pickerCellsRef.current[index] = cellRef);
13239
+ if (cellRef) {
13240
+ pickerCellsRef.current[index] = cellRef;
13241
+ }
13221
13242
  },
13222
13243
  touchToStop: touchToStop
13223
13244
  });
13224
13245
  }));
13225
13246
  });
13226
13247
 
13227
- var isArray = function isArray(dt) {
13248
+ var isArray$1 = function isArray(dt) {
13228
13249
  return dt ? Array.isArray(dt[0]) : false;
13229
13250
  };
13230
13251
 
@@ -13281,7 +13302,7 @@
13281
13302
  var innerData = React.useMemo(function () {
13282
13303
  var newData;
13283
13304
 
13284
- if (isArray(data)) {
13305
+ if (isArray$1(data)) {
13285
13306
  if (isStrOrNum(data)) {
13286
13307
  newData = data.map(function (item) {
13287
13308
  return item.map(function (cell) {
@@ -13449,7 +13470,9 @@
13449
13470
  rows: rows,
13450
13471
  hideEmptyCols: hideEmptyCols,
13451
13472
  ref: function ref(cellRef) {
13452
- return cellRef && (pickerCellsRef.current[index] = cellRef);
13473
+ if (cellRef) {
13474
+ pickerCellsRef.current[index] = cellRef;
13475
+ }
13453
13476
  },
13454
13477
  touchToStop: touchToStop
13455
13478
  });
@@ -14930,7 +14953,7 @@
14930
14953
  * */
14931
14954
 
14932
14955
  function isCascadeArray(options) {
14933
- return typeof options[0] === 'object' && !isArray$1(options[0]);
14956
+ return typeof options[0] === 'object' && !isArray$2(options[0]);
14934
14957
  }
14935
14958
  /**
14936
14959
  * 格式化传入的数组
@@ -16542,8 +16565,6 @@
16542
16565
  }, ellipsisNode) : null);
16543
16566
  }
16544
16567
 
16545
- var NativeEllipsis$1 = /*#__PURE__*/React__default["default"].memo(NativeEllipsis);
16546
-
16547
16568
  /**
16548
16569
  * 文本缩略组件,支持多行缩略、富文本、自定义缩略符、尾字符过滤等。如果传入的文本内容中包含换行符号`\n`,建议将`\n`替换为`<br/>`,并设置`dangerouslyUseInnerHTML=true`。
16549
16570
  * @en Text ellipsis component supports multi-line abbreviations, rich text, custom abbreviations, tail character filtering, etc. If the incoming text contains newline characters `\n`, it is recommended to replace `\n` with `<br/>`, and set `dangerouslyUseInnerHTML=true`.
@@ -16590,7 +16611,7 @@
16590
16611
  return /*#__PURE__*/React__default["default"].createElement("div", {
16591
16612
  className: cls(prefixCls + "-ellipsis", className),
16592
16613
  ref: domRef
16593
- }, useNativeEllipsis ? /*#__PURE__*/React__default["default"].createElement(NativeEllipsis$1, {
16614
+ }, useNativeEllipsis ? /*#__PURE__*/React__default["default"].createElement(NativeEllipsis, {
16594
16615
  prefixCls: prefixCls + "-ellipsis",
16595
16616
  ellipsis: ellipsis,
16596
16617
  dangerouslyUseInnerHTML: dangerouslyUseInnerHTML,
@@ -17791,156 +17812,2798 @@
17791
17812
 
17792
17813
  });
17793
17814
 
17794
- var defaultFunc = function defaultFunc() {};
17815
+ // 注意:自动识别form关联组件的依据,请勿轻易改变代码结构
17816
+ // Notice: Automatically identify the basis of the associated component of the form, DO NOT change the code structure.
17817
+ var FormInternalComponentType;
17795
17818
 
17796
- var defaultFormDataMethods = {
17797
- getFieldValue: function getFieldValue(name) {
17798
- return name;
17799
- },
17800
- getFieldsValue: function getFieldsValue(_names) {
17801
- return {};
17802
- },
17803
- getFieldError: function getFieldError(_name) {
17804
- return [];
17805
- },
17806
- setFieldValue: function setFieldValue(_name, _value) {
17807
- return true;
17808
- },
17809
- setFieldsValue: function setFieldsValue(_values) {
17810
- return true;
17811
- },
17812
- registerField: function registerField(_name, _self) {
17813
- return function () {};
17814
- },
17815
- resetFields: defaultFunc,
17816
- validateFields: defaultFunc,
17817
- submit: defaultFunc,
17818
- getInternalHooks: function getInternalHooks() {
17819
- return {
17820
- registerField: defaultFunc,
17821
- setInitialValues: defaultFunc,
17822
- setCallbacks: defaultFunc
17823
- };
17824
- }
17825
- }; // 在field的静态的状态下设置
17819
+ (function (FormInternalComponentType) {
17820
+ FormInternalComponentType["Input"] = "Input";
17821
+ FormInternalComponentType["Textarea"] = "Textarea";
17822
+ FormInternalComponentType["Checkbox"] = "Checkbox";
17823
+ FormInternalComponentType["CheckboxGroup"] = "CheckboxGroup";
17824
+ FormInternalComponentType["DatePicker"] = "DatePicker";
17825
+ FormInternalComponentType["Picker"] = "Picker";
17826
+ FormInternalComponentType["Radio"] = "Radio";
17827
+ FormInternalComponentType["RadioGroup"] = "RadioGroup";
17828
+ FormInternalComponentType["Slider"] = "Slider";
17829
+ FormInternalComponentType["Switch"] = "Switch";
17830
+ FormInternalComponentType["ImagePicker"] = "ImagePicker";
17831
+ FormInternalComponentType["Rate"] = "Rate";
17832
+ FormInternalComponentType["Stepper"] = "Stepper";
17833
+ })(FormInternalComponentType || (FormInternalComponentType = {}));
17826
17834
 
17827
- var FormData =
17828
- /** @class */
17829
- function () {
17830
- function FormData() {
17831
- var _this = this;
17835
+ var ValidateStatus;
17832
17836
 
17833
- this._formData = {}; // 数据源
17837
+ (function (ValidateStatus) {
17838
+ ValidateStatus["Init"] = "init";
17839
+ ValidateStatus["Error"] = "error";
17840
+ ValidateStatus["Warning"] = "warning";
17841
+ ValidateStatus["Validating"] = "validating";
17842
+ ValidateStatus["Success"] = "success";
17843
+ })(ValidateStatus || (ValidateStatus = {}));
17834
17844
 
17835
- this._fieldsList = {}; // 字段列表
17845
+ var ValueChangeType;
17836
17846
 
17837
- this._initialValues = {}; // 初始值
17847
+ (function (ValueChangeType) {
17848
+ /* form update */
17849
+ ValueChangeType[ValueChangeType["Update"] = 0] = "Update";
17850
+ /* form clear */
17838
17851
 
17839
- this._callbacks = {};
17852
+ ValueChangeType[ValueChangeType["Reset"] = 1] = "Reset";
17853
+ })(ValueChangeType || (ValueChangeType = {}));
17840
17854
 
17841
- this.setFieldsValue = function (values) {
17842
- var oldValues = Object.keys(values).reduce(function (acc, key) {
17843
- var _a;
17855
+ /**
17856
+ * Removes all key-value entries from the list cache.
17857
+ *
17858
+ * @private
17859
+ * @name clear
17860
+ * @memberOf ListCache
17861
+ */
17862
+ function listCacheClear() {
17863
+ this.__data__ = [];
17864
+ this.size = 0;
17865
+ }
17844
17866
 
17845
- return __assign$3(__assign$3({}, acc), (_a = {}, _a[key] = _this.getFieldValue(key), _a));
17846
- }, {});
17847
- _this._formData = __assign$3(__assign$3({}, _this._formData), values);
17848
- var onValuesChange = _this._callbacks.onValuesChange;
17849
- onValuesChange && onValuesChange(values, _this._formData);
17867
+ var _listCacheClear = listCacheClear;
17850
17868
 
17851
- _this.notifyField(values, oldValues);
17869
+ /**
17870
+ * Performs a
17871
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
17872
+ * comparison between two values to determine if they are equivalent.
17873
+ *
17874
+ * @static
17875
+ * @memberOf _
17876
+ * @since 4.0.0
17877
+ * @category Lang
17878
+ * @param {*} value The value to compare.
17879
+ * @param {*} other The other value to compare.
17880
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
17881
+ * @example
17882
+ *
17883
+ * var object = { 'a': 1 };
17884
+ * var other = { 'a': 1 };
17885
+ *
17886
+ * _.eq(object, object);
17887
+ * // => true
17888
+ *
17889
+ * _.eq(object, other);
17890
+ * // => false
17891
+ *
17892
+ * _.eq('a', 'a');
17893
+ * // => true
17894
+ *
17895
+ * _.eq('a', Object('a'));
17896
+ * // => false
17897
+ *
17898
+ * _.eq(NaN, NaN);
17899
+ * // => true
17900
+ */
17901
+ function eq(value, other) {
17902
+ return value === other || (value !== value && other !== other);
17903
+ }
17852
17904
 
17853
- return true;
17854
- };
17905
+ var eq_1 = eq;
17855
17906
 
17856
- this.setFieldValue = function (name, value) {
17857
- var _a, _b, _c, _d;
17907
+ /**
17908
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
17909
+ *
17910
+ * @private
17911
+ * @param {Array} array The array to inspect.
17912
+ * @param {*} key The key to search for.
17913
+ * @returns {number} Returns the index of the matched value, else `-1`.
17914
+ */
17915
+ function assocIndexOf(array, key) {
17916
+ var length = array.length;
17917
+ while (length--) {
17918
+ if (eq_1(array[length][0], key)) {
17919
+ return length;
17920
+ }
17921
+ }
17922
+ return -1;
17923
+ }
17858
17924
 
17859
- var oldValues = (_a = {}, _a[name] = _this.getFieldValue(name), _a);
17860
- _this._formData = __assign$3(__assign$3({}, _this._formData), (_b = {}, _b[name] = value, _b));
17861
- var onValuesChange = _this._callbacks.onValuesChange;
17862
- onValuesChange && onValuesChange((_c = {}, _c[name] = value, _c), _this._formData);
17925
+ var _assocIndexOf = assocIndexOf;
17863
17926
 
17864
- _this.notifyField((_d = {}, _d[name] = value, _d), oldValues);
17927
+ /** Used for built-in method references. */
17928
+ var arrayProto = Array.prototype;
17865
17929
 
17866
- return true;
17867
- };
17930
+ /** Built-in value references. */
17931
+ var splice = arrayProto.splice;
17868
17932
 
17869
- this.notifyField = function (values, oldValues) {
17870
- Object.keys(values).map(function (fieldName) {
17871
- var _a;
17933
+ /**
17934
+ * Removes `key` and its value from the list cache.
17935
+ *
17936
+ * @private
17937
+ * @name delete
17938
+ * @memberOf ListCache
17939
+ * @param {string} key The key of the value to remove.
17940
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
17941
+ */
17942
+ function listCacheDelete(key) {
17943
+ var data = this.__data__,
17944
+ index = _assocIndexOf(data, key);
17872
17945
 
17873
- var fieldObj = ((_a = _this._fieldsList) === null || _a === void 0 ? void 0 : _a[fieldName]) || null;
17946
+ if (index < 0) {
17947
+ return false;
17948
+ }
17949
+ var lastIndex = data.length - 1;
17950
+ if (index == lastIndex) {
17951
+ data.pop();
17952
+ } else {
17953
+ splice.call(data, index, 1);
17954
+ }
17955
+ --this.size;
17956
+ return true;
17957
+ }
17874
17958
 
17875
- if (fieldObj) {
17876
- fieldObj.onValueChange(values[fieldName], oldValues[fieldName]);
17877
- }
17878
- });
17879
- };
17959
+ var _listCacheDelete = listCacheDelete;
17880
17960
 
17881
- this.getFieldsValue = function (names) {
17882
- if (names) {
17883
- return names.map(function (name) {
17884
- return _this.getFieldValue(name);
17885
- });
17886
- }
17961
+ /**
17962
+ * Gets the list cache value for `key`.
17963
+ *
17964
+ * @private
17965
+ * @name get
17966
+ * @memberOf ListCache
17967
+ * @param {string} key The key of the value to get.
17968
+ * @returns {*} Returns the entry value.
17969
+ */
17970
+ function listCacheGet(key) {
17971
+ var data = this.__data__,
17972
+ index = _assocIndexOf(data, key);
17887
17973
 
17888
- return _this._formData;
17889
- };
17974
+ return index < 0 ? undefined : data[index][1];
17975
+ }
17890
17976
 
17891
- this.getFieldValue = function (name) {
17892
- var _a;
17977
+ var _listCacheGet = listCacheGet;
17893
17978
 
17894
- return (_a = _this._formData) === null || _a === void 0 ? void 0 : _a[name];
17895
- };
17979
+ /**
17980
+ * Checks if a list cache value for `key` exists.
17981
+ *
17982
+ * @private
17983
+ * @name has
17984
+ * @memberOf ListCache
17985
+ * @param {string} key The key of the entry to check.
17986
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
17987
+ */
17988
+ function listCacheHas(key) {
17989
+ return _assocIndexOf(this.__data__, key) > -1;
17990
+ }
17896
17991
 
17897
- this.getFieldError = function (name) {
17898
- var _a;
17992
+ var _listCacheHas = listCacheHas;
17899
17993
 
17900
- var field = ((_a = _this._fieldsList) === null || _a === void 0 ? void 0 : _a[name]) || null;
17994
+ /**
17995
+ * Sets the list cache `key` to `value`.
17996
+ *
17997
+ * @private
17998
+ * @name set
17999
+ * @memberOf ListCache
18000
+ * @param {string} key The key of the value to set.
18001
+ * @param {*} value The value to set.
18002
+ * @returns {Object} Returns the list cache instance.
18003
+ */
18004
+ function listCacheSet(key, value) {
18005
+ var data = this.__data__,
18006
+ index = _assocIndexOf(data, key);
17901
18007
 
17902
- if (field) {
17903
- return field.getFieldError();
17904
- }
18008
+ if (index < 0) {
18009
+ ++this.size;
18010
+ data.push([key, value]);
18011
+ } else {
18012
+ data[index][1] = value;
18013
+ }
18014
+ return this;
18015
+ }
17905
18016
 
17906
- return [];
17907
- };
18017
+ var _listCacheSet = listCacheSet;
17908
18018
 
17909
- this.getFieldsError = function (names) {
17910
- var fields = names || Object.keys(_this._fieldsList);
17911
- return fields.reduce(function (pre, name) {
17912
- var _a;
18019
+ /**
18020
+ * Creates an list cache object.
18021
+ *
18022
+ * @private
18023
+ * @constructor
18024
+ * @param {Array} [entries] The key-value pairs to cache.
18025
+ */
18026
+ function ListCache(entries) {
18027
+ var index = -1,
18028
+ length = entries == null ? 0 : entries.length;
17913
18029
 
17914
- var theField = (_a = _this._fieldsList) === null || _a === void 0 ? void 0 : _a[name];
18030
+ this.clear();
18031
+ while (++index < length) {
18032
+ var entry = entries[index];
18033
+ this.set(entry[0], entry[1]);
18034
+ }
18035
+ }
17915
18036
 
17916
- if (theField) {
17917
- pre[name] = theField === null || theField === void 0 ? void 0 : theField.getFieldError();
17918
- }
18037
+ // Add methods to `ListCache`.
18038
+ ListCache.prototype.clear = _listCacheClear;
18039
+ ListCache.prototype['delete'] = _listCacheDelete;
18040
+ ListCache.prototype.get = _listCacheGet;
18041
+ ListCache.prototype.has = _listCacheHas;
18042
+ ListCache.prototype.set = _listCacheSet;
17919
18043
 
17920
- return pre;
17921
- }, {});
17922
- };
18044
+ var _ListCache = ListCache;
17923
18045
 
17924
- this.isFieldTouched = function (name) {
17925
- var _a;
18046
+ /**
18047
+ * Removes all key-value entries from the stack.
18048
+ *
18049
+ * @private
18050
+ * @name clear
18051
+ * @memberOf Stack
18052
+ */
18053
+ function stackClear() {
18054
+ this.__data__ = new _ListCache;
18055
+ this.size = 0;
18056
+ }
17926
18057
 
17927
- var field = ((_a = _this._fieldsList) === null || _a === void 0 ? void 0 : _a[name]) || null;
18058
+ var _stackClear = stackClear;
17928
18059
 
17929
- if (field) {
17930
- return field.isFieldTouched();
17931
- }
18060
+ /**
18061
+ * Removes `key` and its value from the stack.
18062
+ *
18063
+ * @private
18064
+ * @name delete
18065
+ * @memberOf Stack
18066
+ * @param {string} key The key of the value to remove.
18067
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
18068
+ */
18069
+ function stackDelete(key) {
18070
+ var data = this.__data__,
18071
+ result = data['delete'](key);
17932
18072
 
17933
- return false;
17934
- };
18073
+ this.size = data.size;
18074
+ return result;
18075
+ }
17935
18076
 
17936
- this.registerField = function (name, self) {
17937
- var _a, _b;
18077
+ var _stackDelete = stackDelete;
17938
18078
 
17939
- _this._fieldsList[name] = self;
17940
- var initialValue = self.props.initialValue;
18079
+ /**
18080
+ * Gets the stack value for `key`.
18081
+ *
18082
+ * @private
18083
+ * @name get
18084
+ * @memberOf Stack
18085
+ * @param {string} key The key of the value to get.
18086
+ * @returns {*} Returns the entry value.
18087
+ */
18088
+ function stackGet(key) {
18089
+ return this.__data__.get(key);
18090
+ }
17941
18091
 
17942
- if (initialValue !== undefined && name) {
17943
- _this._initialValues = __assign$3(__assign$3({}, _this._initialValues), (_a = {}, _a[name] = initialValue, _a));
18092
+ var _stackGet = stackGet;
18093
+
18094
+ /**
18095
+ * Checks if a stack value for `key` exists.
18096
+ *
18097
+ * @private
18098
+ * @name has
18099
+ * @memberOf Stack
18100
+ * @param {string} key The key of the entry to check.
18101
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
18102
+ */
18103
+ function stackHas(key) {
18104
+ return this.__data__.has(key);
18105
+ }
18106
+
18107
+ var _stackHas = stackHas;
18108
+
18109
+ /** Detect free variable `global` from Node.js. */
18110
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
18111
+
18112
+ var _freeGlobal = freeGlobal;
18113
+
18114
+ /** Detect free variable `self`. */
18115
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
18116
+
18117
+ /** Used as a reference to the global object. */
18118
+ var root = _freeGlobal || freeSelf || Function('return this')();
18119
+
18120
+ var _root = root;
18121
+
18122
+ /** Built-in value references. */
18123
+ var Symbol = _root.Symbol;
18124
+
18125
+ var _Symbol = Symbol;
18126
+
18127
+ /** Used for built-in method references. */
18128
+ var objectProto$c = Object.prototype;
18129
+
18130
+ /** Used to check objects for own properties. */
18131
+ var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
18132
+
18133
+ /**
18134
+ * Used to resolve the
18135
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
18136
+ * of values.
18137
+ */
18138
+ var nativeObjectToString$1 = objectProto$c.toString;
18139
+
18140
+ /** Built-in value references. */
18141
+ var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
18142
+
18143
+ /**
18144
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
18145
+ *
18146
+ * @private
18147
+ * @param {*} value The value to query.
18148
+ * @returns {string} Returns the raw `toStringTag`.
18149
+ */
18150
+ function getRawTag(value) {
18151
+ var isOwn = hasOwnProperty$9.call(value, symToStringTag$1),
18152
+ tag = value[symToStringTag$1];
18153
+
18154
+ try {
18155
+ value[symToStringTag$1] = undefined;
18156
+ var unmasked = true;
18157
+ } catch (e) {}
18158
+
18159
+ var result = nativeObjectToString$1.call(value);
18160
+ if (unmasked) {
18161
+ if (isOwn) {
18162
+ value[symToStringTag$1] = tag;
18163
+ } else {
18164
+ delete value[symToStringTag$1];
18165
+ }
18166
+ }
18167
+ return result;
18168
+ }
18169
+
18170
+ var _getRawTag = getRawTag;
18171
+
18172
+ /** Used for built-in method references. */
18173
+ var objectProto$b = Object.prototype;
18174
+
18175
+ /**
18176
+ * Used to resolve the
18177
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
18178
+ * of values.
18179
+ */
18180
+ var nativeObjectToString = objectProto$b.toString;
18181
+
18182
+ /**
18183
+ * Converts `value` to a string using `Object.prototype.toString`.
18184
+ *
18185
+ * @private
18186
+ * @param {*} value The value to convert.
18187
+ * @returns {string} Returns the converted string.
18188
+ */
18189
+ function objectToString(value) {
18190
+ return nativeObjectToString.call(value);
18191
+ }
18192
+
18193
+ var _objectToString = objectToString;
18194
+
18195
+ /** `Object#toString` result references. */
18196
+ var nullTag = '[object Null]',
18197
+ undefinedTag = '[object Undefined]';
18198
+
18199
+ /** Built-in value references. */
18200
+ var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
18201
+
18202
+ /**
18203
+ * The base implementation of `getTag` without fallbacks for buggy environments.
18204
+ *
18205
+ * @private
18206
+ * @param {*} value The value to query.
18207
+ * @returns {string} Returns the `toStringTag`.
18208
+ */
18209
+ function baseGetTag(value) {
18210
+ if (value == null) {
18211
+ return value === undefined ? undefinedTag : nullTag;
18212
+ }
18213
+ return (symToStringTag && symToStringTag in Object(value))
18214
+ ? _getRawTag(value)
18215
+ : _objectToString(value);
18216
+ }
18217
+
18218
+ var _baseGetTag = baseGetTag;
18219
+
18220
+ /**
18221
+ * Checks if `value` is the
18222
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
18223
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
18224
+ *
18225
+ * @static
18226
+ * @memberOf _
18227
+ * @since 0.1.0
18228
+ * @category Lang
18229
+ * @param {*} value The value to check.
18230
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
18231
+ * @example
18232
+ *
18233
+ * _.isObject({});
18234
+ * // => true
18235
+ *
18236
+ * _.isObject([1, 2, 3]);
18237
+ * // => true
18238
+ *
18239
+ * _.isObject(_.noop);
18240
+ * // => true
18241
+ *
18242
+ * _.isObject(null);
18243
+ * // => false
18244
+ */
18245
+ function isObject(value) {
18246
+ var type = typeof value;
18247
+ return value != null && (type == 'object' || type == 'function');
18248
+ }
18249
+
18250
+ var isObject_1 = isObject;
18251
+
18252
+ /** `Object#toString` result references. */
18253
+ var asyncTag = '[object AsyncFunction]',
18254
+ funcTag$2 = '[object Function]',
18255
+ genTag$1 = '[object GeneratorFunction]',
18256
+ proxyTag = '[object Proxy]';
18257
+
18258
+ /**
18259
+ * Checks if `value` is classified as a `Function` object.
18260
+ *
18261
+ * @static
18262
+ * @memberOf _
18263
+ * @since 0.1.0
18264
+ * @category Lang
18265
+ * @param {*} value The value to check.
18266
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
18267
+ * @example
18268
+ *
18269
+ * _.isFunction(_);
18270
+ * // => true
18271
+ *
18272
+ * _.isFunction(/abc/);
18273
+ * // => false
18274
+ */
18275
+ function isFunction(value) {
18276
+ if (!isObject_1(value)) {
18277
+ return false;
18278
+ }
18279
+ // The use of `Object#toString` avoids issues with the `typeof` operator
18280
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
18281
+ var tag = _baseGetTag(value);
18282
+ return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
18283
+ }
18284
+
18285
+ var isFunction_1 = isFunction;
18286
+
18287
+ /** Used to detect overreaching core-js shims. */
18288
+ var coreJsData = _root['__core-js_shared__'];
18289
+
18290
+ var _coreJsData = coreJsData;
18291
+
18292
+ /** Used to detect methods masquerading as native. */
18293
+ var maskSrcKey = (function() {
18294
+ var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
18295
+ return uid ? ('Symbol(src)_1.' + uid) : '';
18296
+ }());
18297
+
18298
+ /**
18299
+ * Checks if `func` has its source masked.
18300
+ *
18301
+ * @private
18302
+ * @param {Function} func The function to check.
18303
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
18304
+ */
18305
+ function isMasked(func) {
18306
+ return !!maskSrcKey && (maskSrcKey in func);
18307
+ }
18308
+
18309
+ var _isMasked = isMasked;
18310
+
18311
+ /** Used for built-in method references. */
18312
+ var funcProto$1 = Function.prototype;
18313
+
18314
+ /** Used to resolve the decompiled source of functions. */
18315
+ var funcToString$1 = funcProto$1.toString;
18316
+
18317
+ /**
18318
+ * Converts `func` to its source code.
18319
+ *
18320
+ * @private
18321
+ * @param {Function} func The function to convert.
18322
+ * @returns {string} Returns the source code.
18323
+ */
18324
+ function toSource(func) {
18325
+ if (func != null) {
18326
+ try {
18327
+ return funcToString$1.call(func);
18328
+ } catch (e) {}
18329
+ try {
18330
+ return (func + '');
18331
+ } catch (e) {}
18332
+ }
18333
+ return '';
18334
+ }
18335
+
18336
+ var _toSource = toSource;
18337
+
18338
+ /**
18339
+ * Used to match `RegExp`
18340
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
18341
+ */
18342
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
18343
+
18344
+ /** Used to detect host constructors (Safari). */
18345
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
18346
+
18347
+ /** Used for built-in method references. */
18348
+ var funcProto = Function.prototype,
18349
+ objectProto$a = Object.prototype;
18350
+
18351
+ /** Used to resolve the decompiled source of functions. */
18352
+ var funcToString = funcProto.toString;
18353
+
18354
+ /** Used to check objects for own properties. */
18355
+ var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
18356
+
18357
+ /** Used to detect if a method is native. */
18358
+ var reIsNative = RegExp('^' +
18359
+ funcToString.call(hasOwnProperty$8).replace(reRegExpChar, '\\$&')
18360
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
18361
+ );
18362
+
18363
+ /**
18364
+ * The base implementation of `_.isNative` without bad shim checks.
18365
+ *
18366
+ * @private
18367
+ * @param {*} value The value to check.
18368
+ * @returns {boolean} Returns `true` if `value` is a native function,
18369
+ * else `false`.
18370
+ */
18371
+ function baseIsNative(value) {
18372
+ if (!isObject_1(value) || _isMasked(value)) {
18373
+ return false;
18374
+ }
18375
+ var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
18376
+ return pattern.test(_toSource(value));
18377
+ }
18378
+
18379
+ var _baseIsNative = baseIsNative;
18380
+
18381
+ /**
18382
+ * Gets the value at `key` of `object`.
18383
+ *
18384
+ * @private
18385
+ * @param {Object} [object] The object to query.
18386
+ * @param {string} key The key of the property to get.
18387
+ * @returns {*} Returns the property value.
18388
+ */
18389
+ function getValue(object, key) {
18390
+ return object == null ? undefined : object[key];
18391
+ }
18392
+
18393
+ var _getValue = getValue;
18394
+
18395
+ /**
18396
+ * Gets the native function at `key` of `object`.
18397
+ *
18398
+ * @private
18399
+ * @param {Object} object The object to query.
18400
+ * @param {string} key The key of the method to get.
18401
+ * @returns {*} Returns the function if it's native, else `undefined`.
18402
+ */
18403
+ function getNative(object, key) {
18404
+ var value = _getValue(object, key);
18405
+ return _baseIsNative(value) ? value : undefined;
18406
+ }
18407
+
18408
+ var _getNative = getNative;
18409
+
18410
+ /* Built-in method references that are verified to be native. */
18411
+ var Map$1 = _getNative(_root, 'Map');
18412
+
18413
+ var _Map = Map$1;
18414
+
18415
+ /* Built-in method references that are verified to be native. */
18416
+ var nativeCreate = _getNative(Object, 'create');
18417
+
18418
+ var _nativeCreate = nativeCreate;
18419
+
18420
+ /**
18421
+ * Removes all key-value entries from the hash.
18422
+ *
18423
+ * @private
18424
+ * @name clear
18425
+ * @memberOf Hash
18426
+ */
18427
+ function hashClear() {
18428
+ this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
18429
+ this.size = 0;
18430
+ }
18431
+
18432
+ var _hashClear = hashClear;
18433
+
18434
+ /**
18435
+ * Removes `key` and its value from the hash.
18436
+ *
18437
+ * @private
18438
+ * @name delete
18439
+ * @memberOf Hash
18440
+ * @param {Object} hash The hash to modify.
18441
+ * @param {string} key The key of the value to remove.
18442
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
18443
+ */
18444
+ function hashDelete(key) {
18445
+ var result = this.has(key) && delete this.__data__[key];
18446
+ this.size -= result ? 1 : 0;
18447
+ return result;
18448
+ }
18449
+
18450
+ var _hashDelete = hashDelete;
18451
+
18452
+ /** Used to stand-in for `undefined` hash values. */
18453
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
18454
+
18455
+ /** Used for built-in method references. */
18456
+ var objectProto$9 = Object.prototype;
18457
+
18458
+ /** Used to check objects for own properties. */
18459
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
18460
+
18461
+ /**
18462
+ * Gets the hash value for `key`.
18463
+ *
18464
+ * @private
18465
+ * @name get
18466
+ * @memberOf Hash
18467
+ * @param {string} key The key of the value to get.
18468
+ * @returns {*} Returns the entry value.
18469
+ */
18470
+ function hashGet(key) {
18471
+ var data = this.__data__;
18472
+ if (_nativeCreate) {
18473
+ var result = data[key];
18474
+ return result === HASH_UNDEFINED$1 ? undefined : result;
18475
+ }
18476
+ return hasOwnProperty$7.call(data, key) ? data[key] : undefined;
18477
+ }
18478
+
18479
+ var _hashGet = hashGet;
18480
+
18481
+ /** Used for built-in method references. */
18482
+ var objectProto$8 = Object.prototype;
18483
+
18484
+ /** Used to check objects for own properties. */
18485
+ var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
18486
+
18487
+ /**
18488
+ * Checks if a hash value for `key` exists.
18489
+ *
18490
+ * @private
18491
+ * @name has
18492
+ * @memberOf Hash
18493
+ * @param {string} key The key of the entry to check.
18494
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
18495
+ */
18496
+ function hashHas(key) {
18497
+ var data = this.__data__;
18498
+ return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$6.call(data, key);
18499
+ }
18500
+
18501
+ var _hashHas = hashHas;
18502
+
18503
+ /** Used to stand-in for `undefined` hash values. */
18504
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
18505
+
18506
+ /**
18507
+ * Sets the hash `key` to `value`.
18508
+ *
18509
+ * @private
18510
+ * @name set
18511
+ * @memberOf Hash
18512
+ * @param {string} key The key of the value to set.
18513
+ * @param {*} value The value to set.
18514
+ * @returns {Object} Returns the hash instance.
18515
+ */
18516
+ function hashSet(key, value) {
18517
+ var data = this.__data__;
18518
+ this.size += this.has(key) ? 0 : 1;
18519
+ data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
18520
+ return this;
18521
+ }
18522
+
18523
+ var _hashSet = hashSet;
18524
+
18525
+ /**
18526
+ * Creates a hash object.
18527
+ *
18528
+ * @private
18529
+ * @constructor
18530
+ * @param {Array} [entries] The key-value pairs to cache.
18531
+ */
18532
+ function Hash(entries) {
18533
+ var index = -1,
18534
+ length = entries == null ? 0 : entries.length;
18535
+
18536
+ this.clear();
18537
+ while (++index < length) {
18538
+ var entry = entries[index];
18539
+ this.set(entry[0], entry[1]);
18540
+ }
18541
+ }
18542
+
18543
+ // Add methods to `Hash`.
18544
+ Hash.prototype.clear = _hashClear;
18545
+ Hash.prototype['delete'] = _hashDelete;
18546
+ Hash.prototype.get = _hashGet;
18547
+ Hash.prototype.has = _hashHas;
18548
+ Hash.prototype.set = _hashSet;
18549
+
18550
+ var _Hash = Hash;
18551
+
18552
+ /**
18553
+ * Removes all key-value entries from the map.
18554
+ *
18555
+ * @private
18556
+ * @name clear
18557
+ * @memberOf MapCache
18558
+ */
18559
+ function mapCacheClear() {
18560
+ this.size = 0;
18561
+ this.__data__ = {
18562
+ 'hash': new _Hash,
18563
+ 'map': new (_Map || _ListCache),
18564
+ 'string': new _Hash
18565
+ };
18566
+ }
18567
+
18568
+ var _mapCacheClear = mapCacheClear;
18569
+
18570
+ /**
18571
+ * Checks if `value` is suitable for use as unique object key.
18572
+ *
18573
+ * @private
18574
+ * @param {*} value The value to check.
18575
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
18576
+ */
18577
+ function isKeyable(value) {
18578
+ var type = typeof value;
18579
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
18580
+ ? (value !== '__proto__')
18581
+ : (value === null);
18582
+ }
18583
+
18584
+ var _isKeyable = isKeyable;
18585
+
18586
+ /**
18587
+ * Gets the data for `map`.
18588
+ *
18589
+ * @private
18590
+ * @param {Object} map The map to query.
18591
+ * @param {string} key The reference key.
18592
+ * @returns {*} Returns the map data.
18593
+ */
18594
+ function getMapData(map, key) {
18595
+ var data = map.__data__;
18596
+ return _isKeyable(key)
18597
+ ? data[typeof key == 'string' ? 'string' : 'hash']
18598
+ : data.map;
18599
+ }
18600
+
18601
+ var _getMapData = getMapData;
18602
+
18603
+ /**
18604
+ * Removes `key` and its value from the map.
18605
+ *
18606
+ * @private
18607
+ * @name delete
18608
+ * @memberOf MapCache
18609
+ * @param {string} key The key of the value to remove.
18610
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
18611
+ */
18612
+ function mapCacheDelete(key) {
18613
+ var result = _getMapData(this, key)['delete'](key);
18614
+ this.size -= result ? 1 : 0;
18615
+ return result;
18616
+ }
18617
+
18618
+ var _mapCacheDelete = mapCacheDelete;
18619
+
18620
+ /**
18621
+ * Gets the map value for `key`.
18622
+ *
18623
+ * @private
18624
+ * @name get
18625
+ * @memberOf MapCache
18626
+ * @param {string} key The key of the value to get.
18627
+ * @returns {*} Returns the entry value.
18628
+ */
18629
+ function mapCacheGet(key) {
18630
+ return _getMapData(this, key).get(key);
18631
+ }
18632
+
18633
+ var _mapCacheGet = mapCacheGet;
18634
+
18635
+ /**
18636
+ * Checks if a map value for `key` exists.
18637
+ *
18638
+ * @private
18639
+ * @name has
18640
+ * @memberOf MapCache
18641
+ * @param {string} key The key of the entry to check.
18642
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
18643
+ */
18644
+ function mapCacheHas(key) {
18645
+ return _getMapData(this, key).has(key);
18646
+ }
18647
+
18648
+ var _mapCacheHas = mapCacheHas;
18649
+
18650
+ /**
18651
+ * Sets the map `key` to `value`.
18652
+ *
18653
+ * @private
18654
+ * @name set
18655
+ * @memberOf MapCache
18656
+ * @param {string} key The key of the value to set.
18657
+ * @param {*} value The value to set.
18658
+ * @returns {Object} Returns the map cache instance.
18659
+ */
18660
+ function mapCacheSet(key, value) {
18661
+ var data = _getMapData(this, key),
18662
+ size = data.size;
18663
+
18664
+ data.set(key, value);
18665
+ this.size += data.size == size ? 0 : 1;
18666
+ return this;
18667
+ }
18668
+
18669
+ var _mapCacheSet = mapCacheSet;
18670
+
18671
+ /**
18672
+ * Creates a map cache object to store key-value pairs.
18673
+ *
18674
+ * @private
18675
+ * @constructor
18676
+ * @param {Array} [entries] The key-value pairs to cache.
18677
+ */
18678
+ function MapCache(entries) {
18679
+ var index = -1,
18680
+ length = entries == null ? 0 : entries.length;
18681
+
18682
+ this.clear();
18683
+ while (++index < length) {
18684
+ var entry = entries[index];
18685
+ this.set(entry[0], entry[1]);
18686
+ }
18687
+ }
18688
+
18689
+ // Add methods to `MapCache`.
18690
+ MapCache.prototype.clear = _mapCacheClear;
18691
+ MapCache.prototype['delete'] = _mapCacheDelete;
18692
+ MapCache.prototype.get = _mapCacheGet;
18693
+ MapCache.prototype.has = _mapCacheHas;
18694
+ MapCache.prototype.set = _mapCacheSet;
18695
+
18696
+ var _MapCache = MapCache;
18697
+
18698
+ /** Used as the size to enable large array optimizations. */
18699
+ var LARGE_ARRAY_SIZE = 200;
18700
+
18701
+ /**
18702
+ * Sets the stack `key` to `value`.
18703
+ *
18704
+ * @private
18705
+ * @name set
18706
+ * @memberOf Stack
18707
+ * @param {string} key The key of the value to set.
18708
+ * @param {*} value The value to set.
18709
+ * @returns {Object} Returns the stack cache instance.
18710
+ */
18711
+ function stackSet(key, value) {
18712
+ var data = this.__data__;
18713
+ if (data instanceof _ListCache) {
18714
+ var pairs = data.__data__;
18715
+ if (!_Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
18716
+ pairs.push([key, value]);
18717
+ this.size = ++data.size;
18718
+ return this;
18719
+ }
18720
+ data = this.__data__ = new _MapCache(pairs);
18721
+ }
18722
+ data.set(key, value);
18723
+ this.size = data.size;
18724
+ return this;
18725
+ }
18726
+
18727
+ var _stackSet = stackSet;
18728
+
18729
+ /**
18730
+ * Creates a stack cache object to store key-value pairs.
18731
+ *
18732
+ * @private
18733
+ * @constructor
18734
+ * @param {Array} [entries] The key-value pairs to cache.
18735
+ */
18736
+ function Stack(entries) {
18737
+ var data = this.__data__ = new _ListCache(entries);
18738
+ this.size = data.size;
18739
+ }
18740
+
18741
+ // Add methods to `Stack`.
18742
+ Stack.prototype.clear = _stackClear;
18743
+ Stack.prototype['delete'] = _stackDelete;
18744
+ Stack.prototype.get = _stackGet;
18745
+ Stack.prototype.has = _stackHas;
18746
+ Stack.prototype.set = _stackSet;
18747
+
18748
+ var _Stack = Stack;
18749
+
18750
+ /**
18751
+ * A specialized version of `_.forEach` for arrays without support for
18752
+ * iteratee shorthands.
18753
+ *
18754
+ * @private
18755
+ * @param {Array} [array] The array to iterate over.
18756
+ * @param {Function} iteratee The function invoked per iteration.
18757
+ * @returns {Array} Returns `array`.
18758
+ */
18759
+ function arrayEach(array, iteratee) {
18760
+ var index = -1,
18761
+ length = array == null ? 0 : array.length;
18762
+
18763
+ while (++index < length) {
18764
+ if (iteratee(array[index], index, array) === false) {
18765
+ break;
18766
+ }
18767
+ }
18768
+ return array;
18769
+ }
18770
+
18771
+ var _arrayEach = arrayEach;
18772
+
18773
+ var defineProperty = (function() {
18774
+ try {
18775
+ var func = _getNative(Object, 'defineProperty');
18776
+ func({}, '', {});
18777
+ return func;
18778
+ } catch (e) {}
18779
+ }());
18780
+
18781
+ var _defineProperty$1 = defineProperty;
18782
+
18783
+ /**
18784
+ * The base implementation of `assignValue` and `assignMergeValue` without
18785
+ * value checks.
18786
+ *
18787
+ * @private
18788
+ * @param {Object} object The object to modify.
18789
+ * @param {string} key The key of the property to assign.
18790
+ * @param {*} value The value to assign.
18791
+ */
18792
+ function baseAssignValue(object, key, value) {
18793
+ if (key == '__proto__' && _defineProperty$1) {
18794
+ _defineProperty$1(object, key, {
18795
+ 'configurable': true,
18796
+ 'enumerable': true,
18797
+ 'value': value,
18798
+ 'writable': true
18799
+ });
18800
+ } else {
18801
+ object[key] = value;
18802
+ }
18803
+ }
18804
+
18805
+ var _baseAssignValue = baseAssignValue;
18806
+
18807
+ /** Used for built-in method references. */
18808
+ var objectProto$7 = Object.prototype;
18809
+
18810
+ /** Used to check objects for own properties. */
18811
+ var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
18812
+
18813
+ /**
18814
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
18815
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
18816
+ * for equality comparisons.
18817
+ *
18818
+ * @private
18819
+ * @param {Object} object The object to modify.
18820
+ * @param {string} key The key of the property to assign.
18821
+ * @param {*} value The value to assign.
18822
+ */
18823
+ function assignValue(object, key, value) {
18824
+ var objValue = object[key];
18825
+ if (!(hasOwnProperty$5.call(object, key) && eq_1(objValue, value)) ||
18826
+ (value === undefined && !(key in object))) {
18827
+ _baseAssignValue(object, key, value);
18828
+ }
18829
+ }
18830
+
18831
+ var _assignValue = assignValue;
18832
+
18833
+ /**
18834
+ * Copies properties of `source` to `object`.
18835
+ *
18836
+ * @private
18837
+ * @param {Object} source The object to copy properties from.
18838
+ * @param {Array} props The property identifiers to copy.
18839
+ * @param {Object} [object={}] The object to copy properties to.
18840
+ * @param {Function} [customizer] The function to customize copied values.
18841
+ * @returns {Object} Returns `object`.
18842
+ */
18843
+ function copyObject(source, props, object, customizer) {
18844
+ var isNew = !object;
18845
+ object || (object = {});
18846
+
18847
+ var index = -1,
18848
+ length = props.length;
18849
+
18850
+ while (++index < length) {
18851
+ var key = props[index];
18852
+
18853
+ var newValue = customizer
18854
+ ? customizer(object[key], source[key], key, object, source)
18855
+ : undefined;
18856
+
18857
+ if (newValue === undefined) {
18858
+ newValue = source[key];
18859
+ }
18860
+ if (isNew) {
18861
+ _baseAssignValue(object, key, newValue);
18862
+ } else {
18863
+ _assignValue(object, key, newValue);
18864
+ }
18865
+ }
18866
+ return object;
18867
+ }
18868
+
18869
+ var _copyObject = copyObject;
18870
+
18871
+ /**
18872
+ * The base implementation of `_.times` without support for iteratee shorthands
18873
+ * or max array length checks.
18874
+ *
18875
+ * @private
18876
+ * @param {number} n The number of times to invoke `iteratee`.
18877
+ * @param {Function} iteratee The function invoked per iteration.
18878
+ * @returns {Array} Returns the array of results.
18879
+ */
18880
+ function baseTimes(n, iteratee) {
18881
+ var index = -1,
18882
+ result = Array(n);
18883
+
18884
+ while (++index < n) {
18885
+ result[index] = iteratee(index);
18886
+ }
18887
+ return result;
18888
+ }
18889
+
18890
+ var _baseTimes = baseTimes;
18891
+
18892
+ /**
18893
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
18894
+ * and has a `typeof` result of "object".
18895
+ *
18896
+ * @static
18897
+ * @memberOf _
18898
+ * @since 4.0.0
18899
+ * @category Lang
18900
+ * @param {*} value The value to check.
18901
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
18902
+ * @example
18903
+ *
18904
+ * _.isObjectLike({});
18905
+ * // => true
18906
+ *
18907
+ * _.isObjectLike([1, 2, 3]);
18908
+ * // => true
18909
+ *
18910
+ * _.isObjectLike(_.noop);
18911
+ * // => false
18912
+ *
18913
+ * _.isObjectLike(null);
18914
+ * // => false
18915
+ */
18916
+ function isObjectLike(value) {
18917
+ return value != null && typeof value == 'object';
18918
+ }
18919
+
18920
+ var isObjectLike_1 = isObjectLike;
18921
+
18922
+ /** `Object#toString` result references. */
18923
+ var argsTag$2 = '[object Arguments]';
18924
+
18925
+ /**
18926
+ * The base implementation of `_.isArguments`.
18927
+ *
18928
+ * @private
18929
+ * @param {*} value The value to check.
18930
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
18931
+ */
18932
+ function baseIsArguments(value) {
18933
+ return isObjectLike_1(value) && _baseGetTag(value) == argsTag$2;
18934
+ }
18935
+
18936
+ var _baseIsArguments = baseIsArguments;
18937
+
18938
+ /** Used for built-in method references. */
18939
+ var objectProto$6 = Object.prototype;
18940
+
18941
+ /** Used to check objects for own properties. */
18942
+ var hasOwnProperty$4 = objectProto$6.hasOwnProperty;
18943
+
18944
+ /** Built-in value references. */
18945
+ var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
18946
+
18947
+ /**
18948
+ * Checks if `value` is likely an `arguments` object.
18949
+ *
18950
+ * @static
18951
+ * @memberOf _
18952
+ * @since 0.1.0
18953
+ * @category Lang
18954
+ * @param {*} value The value to check.
18955
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
18956
+ * else `false`.
18957
+ * @example
18958
+ *
18959
+ * _.isArguments(function() { return arguments; }());
18960
+ * // => true
18961
+ *
18962
+ * _.isArguments([1, 2, 3]);
18963
+ * // => false
18964
+ */
18965
+ var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
18966
+ return isObjectLike_1(value) && hasOwnProperty$4.call(value, 'callee') &&
18967
+ !propertyIsEnumerable$1.call(value, 'callee');
18968
+ };
18969
+
18970
+ var isArguments_1 = isArguments;
18971
+
18972
+ /**
18973
+ * Checks if `value` is classified as an `Array` object.
18974
+ *
18975
+ * @static
18976
+ * @memberOf _
18977
+ * @since 0.1.0
18978
+ * @category Lang
18979
+ * @param {*} value The value to check.
18980
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
18981
+ * @example
18982
+ *
18983
+ * _.isArray([1, 2, 3]);
18984
+ * // => true
18985
+ *
18986
+ * _.isArray(document.body.children);
18987
+ * // => false
18988
+ *
18989
+ * _.isArray('abc');
18990
+ * // => false
18991
+ *
18992
+ * _.isArray(_.noop);
18993
+ * // => false
18994
+ */
18995
+ var isArray = Array.isArray;
18996
+
18997
+ var isArray_1 = isArray;
18998
+
18999
+ /**
19000
+ * This method returns `false`.
19001
+ *
19002
+ * @static
19003
+ * @memberOf _
19004
+ * @since 4.13.0
19005
+ * @category Util
19006
+ * @returns {boolean} Returns `false`.
19007
+ * @example
19008
+ *
19009
+ * _.times(2, _.stubFalse);
19010
+ * // => [false, false]
19011
+ */
19012
+ function stubFalse() {
19013
+ return false;
19014
+ }
19015
+
19016
+ var stubFalse_1 = stubFalse;
19017
+
19018
+ var isBuffer_1 = createCommonjsModule(function (module, exports) {
19019
+ /** Detect free variable `exports`. */
19020
+ var freeExports = exports && !exports.nodeType && exports;
19021
+
19022
+ /** Detect free variable `module`. */
19023
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
19024
+
19025
+ /** Detect the popular CommonJS extension `module.exports`. */
19026
+ var moduleExports = freeModule && freeModule.exports === freeExports;
19027
+
19028
+ /** Built-in value references. */
19029
+ var Buffer = moduleExports ? _root.Buffer : undefined;
19030
+
19031
+ /* Built-in method references for those with the same name as other `lodash` methods. */
19032
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
19033
+
19034
+ /**
19035
+ * Checks if `value` is a buffer.
19036
+ *
19037
+ * @static
19038
+ * @memberOf _
19039
+ * @since 4.3.0
19040
+ * @category Lang
19041
+ * @param {*} value The value to check.
19042
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
19043
+ * @example
19044
+ *
19045
+ * _.isBuffer(new Buffer(2));
19046
+ * // => true
19047
+ *
19048
+ * _.isBuffer(new Uint8Array(2));
19049
+ * // => false
19050
+ */
19051
+ var isBuffer = nativeIsBuffer || stubFalse_1;
19052
+
19053
+ module.exports = isBuffer;
19054
+ });
19055
+
19056
+ /** Used as references for various `Number` constants. */
19057
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
19058
+
19059
+ /** Used to detect unsigned integer values. */
19060
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
19061
+
19062
+ /**
19063
+ * Checks if `value` is a valid array-like index.
19064
+ *
19065
+ * @private
19066
+ * @param {*} value The value to check.
19067
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
19068
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
19069
+ */
19070
+ function isIndex(value, length) {
19071
+ var type = typeof value;
19072
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
19073
+
19074
+ return !!length &&
19075
+ (type == 'number' ||
19076
+ (type != 'symbol' && reIsUint.test(value))) &&
19077
+ (value > -1 && value % 1 == 0 && value < length);
19078
+ }
19079
+
19080
+ var _isIndex = isIndex;
19081
+
19082
+ /** Used as references for various `Number` constants. */
19083
+ var MAX_SAFE_INTEGER = 9007199254740991;
19084
+
19085
+ /**
19086
+ * Checks if `value` is a valid array-like length.
19087
+ *
19088
+ * **Note:** This method is loosely based on
19089
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
19090
+ *
19091
+ * @static
19092
+ * @memberOf _
19093
+ * @since 4.0.0
19094
+ * @category Lang
19095
+ * @param {*} value The value to check.
19096
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
19097
+ * @example
19098
+ *
19099
+ * _.isLength(3);
19100
+ * // => true
19101
+ *
19102
+ * _.isLength(Number.MIN_VALUE);
19103
+ * // => false
19104
+ *
19105
+ * _.isLength(Infinity);
19106
+ * // => false
19107
+ *
19108
+ * _.isLength('3');
19109
+ * // => false
19110
+ */
19111
+ function isLength(value) {
19112
+ return typeof value == 'number' &&
19113
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
19114
+ }
19115
+
19116
+ var isLength_1 = isLength;
19117
+
19118
+ /** `Object#toString` result references. */
19119
+ var argsTag$1 = '[object Arguments]',
19120
+ arrayTag$1 = '[object Array]',
19121
+ boolTag$2 = '[object Boolean]',
19122
+ dateTag$2 = '[object Date]',
19123
+ errorTag$1 = '[object Error]',
19124
+ funcTag$1 = '[object Function]',
19125
+ mapTag$4 = '[object Map]',
19126
+ numberTag$2 = '[object Number]',
19127
+ objectTag$2 = '[object Object]',
19128
+ regexpTag$2 = '[object RegExp]',
19129
+ setTag$4 = '[object Set]',
19130
+ stringTag$2 = '[object String]',
19131
+ weakMapTag$2 = '[object WeakMap]';
19132
+
19133
+ var arrayBufferTag$2 = '[object ArrayBuffer]',
19134
+ dataViewTag$3 = '[object DataView]',
19135
+ float32Tag$2 = '[object Float32Array]',
19136
+ float64Tag$2 = '[object Float64Array]',
19137
+ int8Tag$2 = '[object Int8Array]',
19138
+ int16Tag$2 = '[object Int16Array]',
19139
+ int32Tag$2 = '[object Int32Array]',
19140
+ uint8Tag$2 = '[object Uint8Array]',
19141
+ uint8ClampedTag$2 = '[object Uint8ClampedArray]',
19142
+ uint16Tag$2 = '[object Uint16Array]',
19143
+ uint32Tag$2 = '[object Uint32Array]';
19144
+
19145
+ /** Used to identify `toStringTag` values of typed arrays. */
19146
+ var typedArrayTags = {};
19147
+ typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] =
19148
+ typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] =
19149
+ typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] =
19150
+ typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] =
19151
+ typedArrayTags[uint32Tag$2] = true;
19152
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
19153
+ typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] =
19154
+ typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] =
19155
+ typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] =
19156
+ typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] =
19157
+ typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$2] =
19158
+ typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] =
19159
+ typedArrayTags[weakMapTag$2] = false;
19160
+
19161
+ /**
19162
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
19163
+ *
19164
+ * @private
19165
+ * @param {*} value The value to check.
19166
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
19167
+ */
19168
+ function baseIsTypedArray(value) {
19169
+ return isObjectLike_1(value) &&
19170
+ isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
19171
+ }
19172
+
19173
+ var _baseIsTypedArray = baseIsTypedArray;
19174
+
19175
+ /**
19176
+ * The base implementation of `_.unary` without support for storing metadata.
19177
+ *
19178
+ * @private
19179
+ * @param {Function} func The function to cap arguments for.
19180
+ * @returns {Function} Returns the new capped function.
19181
+ */
19182
+ function baseUnary(func) {
19183
+ return function(value) {
19184
+ return func(value);
19185
+ };
19186
+ }
19187
+
19188
+ var _baseUnary = baseUnary;
19189
+
19190
+ var _nodeUtil = createCommonjsModule(function (module, exports) {
19191
+ /** Detect free variable `exports`. */
19192
+ var freeExports = exports && !exports.nodeType && exports;
19193
+
19194
+ /** Detect free variable `module`. */
19195
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
19196
+
19197
+ /** Detect the popular CommonJS extension `module.exports`. */
19198
+ var moduleExports = freeModule && freeModule.exports === freeExports;
19199
+
19200
+ /** Detect free variable `process` from Node.js. */
19201
+ var freeProcess = moduleExports && _freeGlobal.process;
19202
+
19203
+ /** Used to access faster Node.js helpers. */
19204
+ var nodeUtil = (function() {
19205
+ try {
19206
+ // Use `util.types` for Node.js 10+.
19207
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
19208
+
19209
+ if (types) {
19210
+ return types;
19211
+ }
19212
+
19213
+ // Legacy `process.binding('util')` for Node.js < 10.
19214
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
19215
+ } catch (e) {}
19216
+ }());
19217
+
19218
+ module.exports = nodeUtil;
19219
+ });
19220
+
19221
+ /* Node.js helper references. */
19222
+ var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
19223
+
19224
+ /**
19225
+ * Checks if `value` is classified as a typed array.
19226
+ *
19227
+ * @static
19228
+ * @memberOf _
19229
+ * @since 3.0.0
19230
+ * @category Lang
19231
+ * @param {*} value The value to check.
19232
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
19233
+ * @example
19234
+ *
19235
+ * _.isTypedArray(new Uint8Array);
19236
+ * // => true
19237
+ *
19238
+ * _.isTypedArray([]);
19239
+ * // => false
19240
+ */
19241
+ var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
19242
+
19243
+ var isTypedArray_1 = isTypedArray;
19244
+
19245
+ /** Used for built-in method references. */
19246
+ var objectProto$5 = Object.prototype;
19247
+
19248
+ /** Used to check objects for own properties. */
19249
+ var hasOwnProperty$3 = objectProto$5.hasOwnProperty;
19250
+
19251
+ /**
19252
+ * Creates an array of the enumerable property names of the array-like `value`.
19253
+ *
19254
+ * @private
19255
+ * @param {*} value The value to query.
19256
+ * @param {boolean} inherited Specify returning inherited property names.
19257
+ * @returns {Array} Returns the array of property names.
19258
+ */
19259
+ function arrayLikeKeys(value, inherited) {
19260
+ var isArr = isArray_1(value),
19261
+ isArg = !isArr && isArguments_1(value),
19262
+ isBuff = !isArr && !isArg && isBuffer_1(value),
19263
+ isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),
19264
+ skipIndexes = isArr || isArg || isBuff || isType,
19265
+ result = skipIndexes ? _baseTimes(value.length, String) : [],
19266
+ length = result.length;
19267
+
19268
+ for (var key in value) {
19269
+ if ((inherited || hasOwnProperty$3.call(value, key)) &&
19270
+ !(skipIndexes && (
19271
+ // Safari 9 has enumerable `arguments.length` in strict mode.
19272
+ key == 'length' ||
19273
+ // Node.js 0.10 has enumerable non-index properties on buffers.
19274
+ (isBuff && (key == 'offset' || key == 'parent')) ||
19275
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
19276
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
19277
+ // Skip index properties.
19278
+ _isIndex(key, length)
19279
+ ))) {
19280
+ result.push(key);
19281
+ }
19282
+ }
19283
+ return result;
19284
+ }
19285
+
19286
+ var _arrayLikeKeys = arrayLikeKeys;
19287
+
19288
+ /** Used for built-in method references. */
19289
+ var objectProto$4 = Object.prototype;
19290
+
19291
+ /**
19292
+ * Checks if `value` is likely a prototype object.
19293
+ *
19294
+ * @private
19295
+ * @param {*} value The value to check.
19296
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
19297
+ */
19298
+ function isPrototype(value) {
19299
+ var Ctor = value && value.constructor,
19300
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$4;
19301
+
19302
+ return value === proto;
19303
+ }
19304
+
19305
+ var _isPrototype = isPrototype;
19306
+
19307
+ /**
19308
+ * Creates a unary function that invokes `func` with its argument transformed.
19309
+ *
19310
+ * @private
19311
+ * @param {Function} func The function to wrap.
19312
+ * @param {Function} transform The argument transform.
19313
+ * @returns {Function} Returns the new function.
19314
+ */
19315
+ function overArg(func, transform) {
19316
+ return function(arg) {
19317
+ return func(transform(arg));
19318
+ };
19319
+ }
19320
+
19321
+ var _overArg = overArg;
19322
+
19323
+ /* Built-in method references for those with the same name as other `lodash` methods. */
19324
+ var nativeKeys = _overArg(Object.keys, Object);
19325
+
19326
+ var _nativeKeys = nativeKeys;
19327
+
19328
+ /** Used for built-in method references. */
19329
+ var objectProto$3 = Object.prototype;
19330
+
19331
+ /** Used to check objects for own properties. */
19332
+ var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
19333
+
19334
+ /**
19335
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
19336
+ *
19337
+ * @private
19338
+ * @param {Object} object The object to query.
19339
+ * @returns {Array} Returns the array of property names.
19340
+ */
19341
+ function baseKeys(object) {
19342
+ if (!_isPrototype(object)) {
19343
+ return _nativeKeys(object);
19344
+ }
19345
+ var result = [];
19346
+ for (var key in Object(object)) {
19347
+ if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
19348
+ result.push(key);
19349
+ }
19350
+ }
19351
+ return result;
19352
+ }
19353
+
19354
+ var _baseKeys = baseKeys;
19355
+
19356
+ /**
19357
+ * Checks if `value` is array-like. A value is considered array-like if it's
19358
+ * not a function and has a `value.length` that's an integer greater than or
19359
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
19360
+ *
19361
+ * @static
19362
+ * @memberOf _
19363
+ * @since 4.0.0
19364
+ * @category Lang
19365
+ * @param {*} value The value to check.
19366
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
19367
+ * @example
19368
+ *
19369
+ * _.isArrayLike([1, 2, 3]);
19370
+ * // => true
19371
+ *
19372
+ * _.isArrayLike(document.body.children);
19373
+ * // => true
19374
+ *
19375
+ * _.isArrayLike('abc');
19376
+ * // => true
19377
+ *
19378
+ * _.isArrayLike(_.noop);
19379
+ * // => false
19380
+ */
19381
+ function isArrayLike(value) {
19382
+ return value != null && isLength_1(value.length) && !isFunction_1(value);
19383
+ }
19384
+
19385
+ var isArrayLike_1 = isArrayLike;
19386
+
19387
+ /**
19388
+ * Creates an array of the own enumerable property names of `object`.
19389
+ *
19390
+ * **Note:** Non-object values are coerced to objects. See the
19391
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
19392
+ * for more details.
19393
+ *
19394
+ * @static
19395
+ * @since 0.1.0
19396
+ * @memberOf _
19397
+ * @category Object
19398
+ * @param {Object} object The object to query.
19399
+ * @returns {Array} Returns the array of property names.
19400
+ * @example
19401
+ *
19402
+ * function Foo() {
19403
+ * this.a = 1;
19404
+ * this.b = 2;
19405
+ * }
19406
+ *
19407
+ * Foo.prototype.c = 3;
19408
+ *
19409
+ * _.keys(new Foo);
19410
+ * // => ['a', 'b'] (iteration order is not guaranteed)
19411
+ *
19412
+ * _.keys('hi');
19413
+ * // => ['0', '1']
19414
+ */
19415
+ function keys(object) {
19416
+ return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object);
19417
+ }
19418
+
19419
+ var keys_1 = keys;
19420
+
19421
+ /**
19422
+ * The base implementation of `_.assign` without support for multiple sources
19423
+ * or `customizer` functions.
19424
+ *
19425
+ * @private
19426
+ * @param {Object} object The destination object.
19427
+ * @param {Object} source The source object.
19428
+ * @returns {Object} Returns `object`.
19429
+ */
19430
+ function baseAssign(object, source) {
19431
+ return object && _copyObject(source, keys_1(source), object);
19432
+ }
19433
+
19434
+ var _baseAssign = baseAssign;
19435
+
19436
+ /**
19437
+ * This function is like
19438
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
19439
+ * except that it includes inherited enumerable properties.
19440
+ *
19441
+ * @private
19442
+ * @param {Object} object The object to query.
19443
+ * @returns {Array} Returns the array of property names.
19444
+ */
19445
+ function nativeKeysIn(object) {
19446
+ var result = [];
19447
+ if (object != null) {
19448
+ for (var key in Object(object)) {
19449
+ result.push(key);
19450
+ }
19451
+ }
19452
+ return result;
19453
+ }
19454
+
19455
+ var _nativeKeysIn = nativeKeysIn;
19456
+
19457
+ /** Used for built-in method references. */
19458
+ var objectProto$2 = Object.prototype;
19459
+
19460
+ /** Used to check objects for own properties. */
19461
+ var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
19462
+
19463
+ /**
19464
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
19465
+ *
19466
+ * @private
19467
+ * @param {Object} object The object to query.
19468
+ * @returns {Array} Returns the array of property names.
19469
+ */
19470
+ function baseKeysIn(object) {
19471
+ if (!isObject_1(object)) {
19472
+ return _nativeKeysIn(object);
19473
+ }
19474
+ var isProto = _isPrototype(object),
19475
+ result = [];
19476
+
19477
+ for (var key in object) {
19478
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty$1.call(object, key)))) {
19479
+ result.push(key);
19480
+ }
19481
+ }
19482
+ return result;
19483
+ }
19484
+
19485
+ var _baseKeysIn = baseKeysIn;
19486
+
19487
+ /**
19488
+ * Creates an array of the own and inherited enumerable property names of `object`.
19489
+ *
19490
+ * **Note:** Non-object values are coerced to objects.
19491
+ *
19492
+ * @static
19493
+ * @memberOf _
19494
+ * @since 3.0.0
19495
+ * @category Object
19496
+ * @param {Object} object The object to query.
19497
+ * @returns {Array} Returns the array of property names.
19498
+ * @example
19499
+ *
19500
+ * function Foo() {
19501
+ * this.a = 1;
19502
+ * this.b = 2;
19503
+ * }
19504
+ *
19505
+ * Foo.prototype.c = 3;
19506
+ *
19507
+ * _.keysIn(new Foo);
19508
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
19509
+ */
19510
+ function keysIn(object) {
19511
+ return isArrayLike_1(object) ? _arrayLikeKeys(object, true) : _baseKeysIn(object);
19512
+ }
19513
+
19514
+ var keysIn_1 = keysIn;
19515
+
19516
+ /**
19517
+ * The base implementation of `_.assignIn` without support for multiple sources
19518
+ * or `customizer` functions.
19519
+ *
19520
+ * @private
19521
+ * @param {Object} object The destination object.
19522
+ * @param {Object} source The source object.
19523
+ * @returns {Object} Returns `object`.
19524
+ */
19525
+ function baseAssignIn(object, source) {
19526
+ return object && _copyObject(source, keysIn_1(source), object);
19527
+ }
19528
+
19529
+ var _baseAssignIn = baseAssignIn;
19530
+
19531
+ var _cloneBuffer = createCommonjsModule(function (module, exports) {
19532
+ /** Detect free variable `exports`. */
19533
+ var freeExports = exports && !exports.nodeType && exports;
19534
+
19535
+ /** Detect free variable `module`. */
19536
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
19537
+
19538
+ /** Detect the popular CommonJS extension `module.exports`. */
19539
+ var moduleExports = freeModule && freeModule.exports === freeExports;
19540
+
19541
+ /** Built-in value references. */
19542
+ var Buffer = moduleExports ? _root.Buffer : undefined,
19543
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
19544
+
19545
+ /**
19546
+ * Creates a clone of `buffer`.
19547
+ *
19548
+ * @private
19549
+ * @param {Buffer} buffer The buffer to clone.
19550
+ * @param {boolean} [isDeep] Specify a deep clone.
19551
+ * @returns {Buffer} Returns the cloned buffer.
19552
+ */
19553
+ function cloneBuffer(buffer, isDeep) {
19554
+ if (isDeep) {
19555
+ return buffer.slice();
19556
+ }
19557
+ var length = buffer.length,
19558
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
19559
+
19560
+ buffer.copy(result);
19561
+ return result;
19562
+ }
19563
+
19564
+ module.exports = cloneBuffer;
19565
+ });
19566
+
19567
+ /**
19568
+ * Copies the values of `source` to `array`.
19569
+ *
19570
+ * @private
19571
+ * @param {Array} source The array to copy values from.
19572
+ * @param {Array} [array=[]] The array to copy values to.
19573
+ * @returns {Array} Returns `array`.
19574
+ */
19575
+ function copyArray(source, array) {
19576
+ var index = -1,
19577
+ length = source.length;
19578
+
19579
+ array || (array = Array(length));
19580
+ while (++index < length) {
19581
+ array[index] = source[index];
19582
+ }
19583
+ return array;
19584
+ }
19585
+
19586
+ var _copyArray = copyArray;
19587
+
19588
+ /**
19589
+ * A specialized version of `_.filter` for arrays without support for
19590
+ * iteratee shorthands.
19591
+ *
19592
+ * @private
19593
+ * @param {Array} [array] The array to iterate over.
19594
+ * @param {Function} predicate The function invoked per iteration.
19595
+ * @returns {Array} Returns the new filtered array.
19596
+ */
19597
+ function arrayFilter(array, predicate) {
19598
+ var index = -1,
19599
+ length = array == null ? 0 : array.length,
19600
+ resIndex = 0,
19601
+ result = [];
19602
+
19603
+ while (++index < length) {
19604
+ var value = array[index];
19605
+ if (predicate(value, index, array)) {
19606
+ result[resIndex++] = value;
19607
+ }
19608
+ }
19609
+ return result;
19610
+ }
19611
+
19612
+ var _arrayFilter = arrayFilter;
19613
+
19614
+ /**
19615
+ * This method returns a new empty array.
19616
+ *
19617
+ * @static
19618
+ * @memberOf _
19619
+ * @since 4.13.0
19620
+ * @category Util
19621
+ * @returns {Array} Returns the new empty array.
19622
+ * @example
19623
+ *
19624
+ * var arrays = _.times(2, _.stubArray);
19625
+ *
19626
+ * console.log(arrays);
19627
+ * // => [[], []]
19628
+ *
19629
+ * console.log(arrays[0] === arrays[1]);
19630
+ * // => false
19631
+ */
19632
+ function stubArray() {
19633
+ return [];
19634
+ }
19635
+
19636
+ var stubArray_1 = stubArray;
19637
+
19638
+ /** Used for built-in method references. */
19639
+ var objectProto$1 = Object.prototype;
19640
+
19641
+ /** Built-in value references. */
19642
+ var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
19643
+
19644
+ /* Built-in method references for those with the same name as other `lodash` methods. */
19645
+ var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
19646
+
19647
+ /**
19648
+ * Creates an array of the own enumerable symbols of `object`.
19649
+ *
19650
+ * @private
19651
+ * @param {Object} object The object to query.
19652
+ * @returns {Array} Returns the array of symbols.
19653
+ */
19654
+ var getSymbols = !nativeGetSymbols$1 ? stubArray_1 : function(object) {
19655
+ if (object == null) {
19656
+ return [];
19657
+ }
19658
+ object = Object(object);
19659
+ return _arrayFilter(nativeGetSymbols$1(object), function(symbol) {
19660
+ return propertyIsEnumerable.call(object, symbol);
19661
+ });
19662
+ };
19663
+
19664
+ var _getSymbols = getSymbols;
19665
+
19666
+ /**
19667
+ * Copies own symbols of `source` to `object`.
19668
+ *
19669
+ * @private
19670
+ * @param {Object} source The object to copy symbols from.
19671
+ * @param {Object} [object={}] The object to copy symbols to.
19672
+ * @returns {Object} Returns `object`.
19673
+ */
19674
+ function copySymbols(source, object) {
19675
+ return _copyObject(source, _getSymbols(source), object);
19676
+ }
19677
+
19678
+ var _copySymbols = copySymbols;
19679
+
19680
+ /**
19681
+ * Appends the elements of `values` to `array`.
19682
+ *
19683
+ * @private
19684
+ * @param {Array} array The array to modify.
19685
+ * @param {Array} values The values to append.
19686
+ * @returns {Array} Returns `array`.
19687
+ */
19688
+ function arrayPush(array, values) {
19689
+ var index = -1,
19690
+ length = values.length,
19691
+ offset = array.length;
19692
+
19693
+ while (++index < length) {
19694
+ array[offset + index] = values[index];
19695
+ }
19696
+ return array;
19697
+ }
19698
+
19699
+ var _arrayPush = arrayPush;
19700
+
19701
+ /** Built-in value references. */
19702
+ var getPrototype = _overArg(Object.getPrototypeOf, Object);
19703
+
19704
+ var _getPrototype = getPrototype;
19705
+
19706
+ /* Built-in method references for those with the same name as other `lodash` methods. */
19707
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
19708
+
19709
+ /**
19710
+ * Creates an array of the own and inherited enumerable symbols of `object`.
19711
+ *
19712
+ * @private
19713
+ * @param {Object} object The object to query.
19714
+ * @returns {Array} Returns the array of symbols.
19715
+ */
19716
+ var getSymbolsIn = !nativeGetSymbols ? stubArray_1 : function(object) {
19717
+ var result = [];
19718
+ while (object) {
19719
+ _arrayPush(result, _getSymbols(object));
19720
+ object = _getPrototype(object);
19721
+ }
19722
+ return result;
19723
+ };
19724
+
19725
+ var _getSymbolsIn = getSymbolsIn;
19726
+
19727
+ /**
19728
+ * Copies own and inherited symbols of `source` to `object`.
19729
+ *
19730
+ * @private
19731
+ * @param {Object} source The object to copy symbols from.
19732
+ * @param {Object} [object={}] The object to copy symbols to.
19733
+ * @returns {Object} Returns `object`.
19734
+ */
19735
+ function copySymbolsIn(source, object) {
19736
+ return _copyObject(source, _getSymbolsIn(source), object);
19737
+ }
19738
+
19739
+ var _copySymbolsIn = copySymbolsIn;
19740
+
19741
+ /**
19742
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
19743
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
19744
+ * symbols of `object`.
19745
+ *
19746
+ * @private
19747
+ * @param {Object} object The object to query.
19748
+ * @param {Function} keysFunc The function to get the keys of `object`.
19749
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
19750
+ * @returns {Array} Returns the array of property names and symbols.
19751
+ */
19752
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
19753
+ var result = keysFunc(object);
19754
+ return isArray_1(object) ? result : _arrayPush(result, symbolsFunc(object));
19755
+ }
19756
+
19757
+ var _baseGetAllKeys = baseGetAllKeys;
19758
+
19759
+ /**
19760
+ * Creates an array of own enumerable property names and symbols of `object`.
19761
+ *
19762
+ * @private
19763
+ * @param {Object} object The object to query.
19764
+ * @returns {Array} Returns the array of property names and symbols.
19765
+ */
19766
+ function getAllKeys(object) {
19767
+ return _baseGetAllKeys(object, keys_1, _getSymbols);
19768
+ }
19769
+
19770
+ var _getAllKeys = getAllKeys;
19771
+
19772
+ /**
19773
+ * Creates an array of own and inherited enumerable property names and
19774
+ * symbols of `object`.
19775
+ *
19776
+ * @private
19777
+ * @param {Object} object The object to query.
19778
+ * @returns {Array} Returns the array of property names and symbols.
19779
+ */
19780
+ function getAllKeysIn(object) {
19781
+ return _baseGetAllKeys(object, keysIn_1, _getSymbolsIn);
19782
+ }
19783
+
19784
+ var _getAllKeysIn = getAllKeysIn;
19785
+
19786
+ /* Built-in method references that are verified to be native. */
19787
+ var DataView = _getNative(_root, 'DataView');
19788
+
19789
+ var _DataView = DataView;
19790
+
19791
+ /* Built-in method references that are verified to be native. */
19792
+ var Promise$1 = _getNative(_root, 'Promise');
19793
+
19794
+ var _Promise = Promise$1;
19795
+
19796
+ /* Built-in method references that are verified to be native. */
19797
+ var Set = _getNative(_root, 'Set');
19798
+
19799
+ var _Set = Set;
19800
+
19801
+ /* Built-in method references that are verified to be native. */
19802
+ var WeakMap$1 = _getNative(_root, 'WeakMap');
19803
+
19804
+ var _WeakMap = WeakMap$1;
19805
+
19806
+ /** `Object#toString` result references. */
19807
+ var mapTag$3 = '[object Map]',
19808
+ objectTag$1 = '[object Object]',
19809
+ promiseTag = '[object Promise]',
19810
+ setTag$3 = '[object Set]',
19811
+ weakMapTag$1 = '[object WeakMap]';
19812
+
19813
+ var dataViewTag$2 = '[object DataView]';
19814
+
19815
+ /** Used to detect maps, sets, and weakmaps. */
19816
+ var dataViewCtorString = _toSource(_DataView),
19817
+ mapCtorString = _toSource(_Map),
19818
+ promiseCtorString = _toSource(_Promise),
19819
+ setCtorString = _toSource(_Set),
19820
+ weakMapCtorString = _toSource(_WeakMap);
19821
+
19822
+ /**
19823
+ * Gets the `toStringTag` of `value`.
19824
+ *
19825
+ * @private
19826
+ * @param {*} value The value to query.
19827
+ * @returns {string} Returns the `toStringTag`.
19828
+ */
19829
+ var getTag = _baseGetTag;
19830
+
19831
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
19832
+ if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag$2) ||
19833
+ (_Map && getTag(new _Map) != mapTag$3) ||
19834
+ (_Promise && getTag(_Promise.resolve()) != promiseTag) ||
19835
+ (_Set && getTag(new _Set) != setTag$3) ||
19836
+ (_WeakMap && getTag(new _WeakMap) != weakMapTag$1)) {
19837
+ getTag = function(value) {
19838
+ var result = _baseGetTag(value),
19839
+ Ctor = result == objectTag$1 ? value.constructor : undefined,
19840
+ ctorString = Ctor ? _toSource(Ctor) : '';
19841
+
19842
+ if (ctorString) {
19843
+ switch (ctorString) {
19844
+ case dataViewCtorString: return dataViewTag$2;
19845
+ case mapCtorString: return mapTag$3;
19846
+ case promiseCtorString: return promiseTag;
19847
+ case setCtorString: return setTag$3;
19848
+ case weakMapCtorString: return weakMapTag$1;
19849
+ }
19850
+ }
19851
+ return result;
19852
+ };
19853
+ }
19854
+
19855
+ var _getTag = getTag;
19856
+
19857
+ /** Used for built-in method references. */
19858
+ var objectProto = Object.prototype;
19859
+
19860
+ /** Used to check objects for own properties. */
19861
+ var hasOwnProperty = objectProto.hasOwnProperty;
19862
+
19863
+ /**
19864
+ * Initializes an array clone.
19865
+ *
19866
+ * @private
19867
+ * @param {Array} array The array to clone.
19868
+ * @returns {Array} Returns the initialized clone.
19869
+ */
19870
+ function initCloneArray(array) {
19871
+ var length = array.length,
19872
+ result = new array.constructor(length);
19873
+
19874
+ // Add properties assigned by `RegExp#exec`.
19875
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
19876
+ result.index = array.index;
19877
+ result.input = array.input;
19878
+ }
19879
+ return result;
19880
+ }
19881
+
19882
+ var _initCloneArray = initCloneArray;
19883
+
19884
+ /** Built-in value references. */
19885
+ var Uint8Array = _root.Uint8Array;
19886
+
19887
+ var _Uint8Array = Uint8Array;
19888
+
19889
+ /**
19890
+ * Creates a clone of `arrayBuffer`.
19891
+ *
19892
+ * @private
19893
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
19894
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
19895
+ */
19896
+ function cloneArrayBuffer(arrayBuffer) {
19897
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
19898
+ new _Uint8Array(result).set(new _Uint8Array(arrayBuffer));
19899
+ return result;
19900
+ }
19901
+
19902
+ var _cloneArrayBuffer = cloneArrayBuffer;
19903
+
19904
+ /**
19905
+ * Creates a clone of `dataView`.
19906
+ *
19907
+ * @private
19908
+ * @param {Object} dataView The data view to clone.
19909
+ * @param {boolean} [isDeep] Specify a deep clone.
19910
+ * @returns {Object} Returns the cloned data view.
19911
+ */
19912
+ function cloneDataView(dataView, isDeep) {
19913
+ var buffer = isDeep ? _cloneArrayBuffer(dataView.buffer) : dataView.buffer;
19914
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
19915
+ }
19916
+
19917
+ var _cloneDataView = cloneDataView;
19918
+
19919
+ /** Used to match `RegExp` flags from their coerced string values. */
19920
+ var reFlags = /\w*$/;
19921
+
19922
+ /**
19923
+ * Creates a clone of `regexp`.
19924
+ *
19925
+ * @private
19926
+ * @param {Object} regexp The regexp to clone.
19927
+ * @returns {Object} Returns the cloned regexp.
19928
+ */
19929
+ function cloneRegExp(regexp) {
19930
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
19931
+ result.lastIndex = regexp.lastIndex;
19932
+ return result;
19933
+ }
19934
+
19935
+ var _cloneRegExp = cloneRegExp;
19936
+
19937
+ /** Used to convert symbols to primitives and strings. */
19938
+ var symbolProto = _Symbol ? _Symbol.prototype : undefined,
19939
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
19940
+
19941
+ /**
19942
+ * Creates a clone of the `symbol` object.
19943
+ *
19944
+ * @private
19945
+ * @param {Object} symbol The symbol object to clone.
19946
+ * @returns {Object} Returns the cloned symbol object.
19947
+ */
19948
+ function cloneSymbol(symbol) {
19949
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
19950
+ }
19951
+
19952
+ var _cloneSymbol = cloneSymbol;
19953
+
19954
+ /**
19955
+ * Creates a clone of `typedArray`.
19956
+ *
19957
+ * @private
19958
+ * @param {Object} typedArray The typed array to clone.
19959
+ * @param {boolean} [isDeep] Specify a deep clone.
19960
+ * @returns {Object} Returns the cloned typed array.
19961
+ */
19962
+ function cloneTypedArray(typedArray, isDeep) {
19963
+ var buffer = isDeep ? _cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
19964
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
19965
+ }
19966
+
19967
+ var _cloneTypedArray = cloneTypedArray;
19968
+
19969
+ /** `Object#toString` result references. */
19970
+ var boolTag$1 = '[object Boolean]',
19971
+ dateTag$1 = '[object Date]',
19972
+ mapTag$2 = '[object Map]',
19973
+ numberTag$1 = '[object Number]',
19974
+ regexpTag$1 = '[object RegExp]',
19975
+ setTag$2 = '[object Set]',
19976
+ stringTag$1 = '[object String]',
19977
+ symbolTag$1 = '[object Symbol]';
19978
+
19979
+ var arrayBufferTag$1 = '[object ArrayBuffer]',
19980
+ dataViewTag$1 = '[object DataView]',
19981
+ float32Tag$1 = '[object Float32Array]',
19982
+ float64Tag$1 = '[object Float64Array]',
19983
+ int8Tag$1 = '[object Int8Array]',
19984
+ int16Tag$1 = '[object Int16Array]',
19985
+ int32Tag$1 = '[object Int32Array]',
19986
+ uint8Tag$1 = '[object Uint8Array]',
19987
+ uint8ClampedTag$1 = '[object Uint8ClampedArray]',
19988
+ uint16Tag$1 = '[object Uint16Array]',
19989
+ uint32Tag$1 = '[object Uint32Array]';
19990
+
19991
+ /**
19992
+ * Initializes an object clone based on its `toStringTag`.
19993
+ *
19994
+ * **Note:** This function only supports cloning values with tags of
19995
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
19996
+ *
19997
+ * @private
19998
+ * @param {Object} object The object to clone.
19999
+ * @param {string} tag The `toStringTag` of the object to clone.
20000
+ * @param {boolean} [isDeep] Specify a deep clone.
20001
+ * @returns {Object} Returns the initialized clone.
20002
+ */
20003
+ function initCloneByTag(object, tag, isDeep) {
20004
+ var Ctor = object.constructor;
20005
+ switch (tag) {
20006
+ case arrayBufferTag$1:
20007
+ return _cloneArrayBuffer(object);
20008
+
20009
+ case boolTag$1:
20010
+ case dateTag$1:
20011
+ return new Ctor(+object);
20012
+
20013
+ case dataViewTag$1:
20014
+ return _cloneDataView(object, isDeep);
20015
+
20016
+ case float32Tag$1: case float64Tag$1:
20017
+ case int8Tag$1: case int16Tag$1: case int32Tag$1:
20018
+ case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
20019
+ return _cloneTypedArray(object, isDeep);
20020
+
20021
+ case mapTag$2:
20022
+ return new Ctor;
20023
+
20024
+ case numberTag$1:
20025
+ case stringTag$1:
20026
+ return new Ctor(object);
20027
+
20028
+ case regexpTag$1:
20029
+ return _cloneRegExp(object);
20030
+
20031
+ case setTag$2:
20032
+ return new Ctor;
20033
+
20034
+ case symbolTag$1:
20035
+ return _cloneSymbol(object);
20036
+ }
20037
+ }
20038
+
20039
+ var _initCloneByTag = initCloneByTag;
20040
+
20041
+ /** Built-in value references. */
20042
+ var objectCreate = Object.create;
20043
+
20044
+ /**
20045
+ * The base implementation of `_.create` without support for assigning
20046
+ * properties to the created object.
20047
+ *
20048
+ * @private
20049
+ * @param {Object} proto The object to inherit from.
20050
+ * @returns {Object} Returns the new object.
20051
+ */
20052
+ var baseCreate = (function() {
20053
+ function object() {}
20054
+ return function(proto) {
20055
+ if (!isObject_1(proto)) {
20056
+ return {};
20057
+ }
20058
+ if (objectCreate) {
20059
+ return objectCreate(proto);
20060
+ }
20061
+ object.prototype = proto;
20062
+ var result = new object;
20063
+ object.prototype = undefined;
20064
+ return result;
20065
+ };
20066
+ }());
20067
+
20068
+ var _baseCreate = baseCreate;
20069
+
20070
+ /**
20071
+ * Initializes an object clone.
20072
+ *
20073
+ * @private
20074
+ * @param {Object} object The object to clone.
20075
+ * @returns {Object} Returns the initialized clone.
20076
+ */
20077
+ function initCloneObject(object) {
20078
+ return (typeof object.constructor == 'function' && !_isPrototype(object))
20079
+ ? _baseCreate(_getPrototype(object))
20080
+ : {};
20081
+ }
20082
+
20083
+ var _initCloneObject = initCloneObject;
20084
+
20085
+ /** `Object#toString` result references. */
20086
+ var mapTag$1 = '[object Map]';
20087
+
20088
+ /**
20089
+ * The base implementation of `_.isMap` without Node.js optimizations.
20090
+ *
20091
+ * @private
20092
+ * @param {*} value The value to check.
20093
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
20094
+ */
20095
+ function baseIsMap(value) {
20096
+ return isObjectLike_1(value) && _getTag(value) == mapTag$1;
20097
+ }
20098
+
20099
+ var _baseIsMap = baseIsMap;
20100
+
20101
+ /* Node.js helper references. */
20102
+ var nodeIsMap = _nodeUtil && _nodeUtil.isMap;
20103
+
20104
+ /**
20105
+ * Checks if `value` is classified as a `Map` object.
20106
+ *
20107
+ * @static
20108
+ * @memberOf _
20109
+ * @since 4.3.0
20110
+ * @category Lang
20111
+ * @param {*} value The value to check.
20112
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
20113
+ * @example
20114
+ *
20115
+ * _.isMap(new Map);
20116
+ * // => true
20117
+ *
20118
+ * _.isMap(new WeakMap);
20119
+ * // => false
20120
+ */
20121
+ var isMap = nodeIsMap ? _baseUnary(nodeIsMap) : _baseIsMap;
20122
+
20123
+ var isMap_1 = isMap;
20124
+
20125
+ /** `Object#toString` result references. */
20126
+ var setTag$1 = '[object Set]';
20127
+
20128
+ /**
20129
+ * The base implementation of `_.isSet` without Node.js optimizations.
20130
+ *
20131
+ * @private
20132
+ * @param {*} value The value to check.
20133
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
20134
+ */
20135
+ function baseIsSet(value) {
20136
+ return isObjectLike_1(value) && _getTag(value) == setTag$1;
20137
+ }
20138
+
20139
+ var _baseIsSet = baseIsSet;
20140
+
20141
+ /* Node.js helper references. */
20142
+ var nodeIsSet = _nodeUtil && _nodeUtil.isSet;
20143
+
20144
+ /**
20145
+ * Checks if `value` is classified as a `Set` object.
20146
+ *
20147
+ * @static
20148
+ * @memberOf _
20149
+ * @since 4.3.0
20150
+ * @category Lang
20151
+ * @param {*} value The value to check.
20152
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
20153
+ * @example
20154
+ *
20155
+ * _.isSet(new Set);
20156
+ * // => true
20157
+ *
20158
+ * _.isSet(new WeakSet);
20159
+ * // => false
20160
+ */
20161
+ var isSet = nodeIsSet ? _baseUnary(nodeIsSet) : _baseIsSet;
20162
+
20163
+ var isSet_1 = isSet;
20164
+
20165
+ /** Used to compose bitmasks for cloning. */
20166
+ var CLONE_DEEP_FLAG$1 = 1,
20167
+ CLONE_FLAT_FLAG = 2,
20168
+ CLONE_SYMBOLS_FLAG$1 = 4;
20169
+
20170
+ /** `Object#toString` result references. */
20171
+ var argsTag = '[object Arguments]',
20172
+ arrayTag = '[object Array]',
20173
+ boolTag = '[object Boolean]',
20174
+ dateTag = '[object Date]',
20175
+ errorTag = '[object Error]',
20176
+ funcTag = '[object Function]',
20177
+ genTag = '[object GeneratorFunction]',
20178
+ mapTag = '[object Map]',
20179
+ numberTag = '[object Number]',
20180
+ objectTag = '[object Object]',
20181
+ regexpTag = '[object RegExp]',
20182
+ setTag = '[object Set]',
20183
+ stringTag = '[object String]',
20184
+ symbolTag = '[object Symbol]',
20185
+ weakMapTag = '[object WeakMap]';
20186
+
20187
+ var arrayBufferTag = '[object ArrayBuffer]',
20188
+ dataViewTag = '[object DataView]',
20189
+ float32Tag = '[object Float32Array]',
20190
+ float64Tag = '[object Float64Array]',
20191
+ int8Tag = '[object Int8Array]',
20192
+ int16Tag = '[object Int16Array]',
20193
+ int32Tag = '[object Int32Array]',
20194
+ uint8Tag = '[object Uint8Array]',
20195
+ uint8ClampedTag = '[object Uint8ClampedArray]',
20196
+ uint16Tag = '[object Uint16Array]',
20197
+ uint32Tag = '[object Uint32Array]';
20198
+
20199
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
20200
+ var cloneableTags = {};
20201
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
20202
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
20203
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
20204
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
20205
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
20206
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
20207
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
20208
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
20209
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
20210
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
20211
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
20212
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
20213
+ cloneableTags[weakMapTag] = false;
20214
+
20215
+ /**
20216
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
20217
+ * traversed objects.
20218
+ *
20219
+ * @private
20220
+ * @param {*} value The value to clone.
20221
+ * @param {boolean} bitmask The bitmask flags.
20222
+ * 1 - Deep clone
20223
+ * 2 - Flatten inherited properties
20224
+ * 4 - Clone symbols
20225
+ * @param {Function} [customizer] The function to customize cloning.
20226
+ * @param {string} [key] The key of `value`.
20227
+ * @param {Object} [object] The parent object of `value`.
20228
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
20229
+ * @returns {*} Returns the cloned value.
20230
+ */
20231
+ function baseClone(value, bitmask, customizer, key, object, stack) {
20232
+ var result,
20233
+ isDeep = bitmask & CLONE_DEEP_FLAG$1,
20234
+ isFlat = bitmask & CLONE_FLAT_FLAG,
20235
+ isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
20236
+
20237
+ if (customizer) {
20238
+ result = object ? customizer(value, key, object, stack) : customizer(value);
20239
+ }
20240
+ if (result !== undefined) {
20241
+ return result;
20242
+ }
20243
+ if (!isObject_1(value)) {
20244
+ return value;
20245
+ }
20246
+ var isArr = isArray_1(value);
20247
+ if (isArr) {
20248
+ result = _initCloneArray(value);
20249
+ if (!isDeep) {
20250
+ return _copyArray(value, result);
20251
+ }
20252
+ } else {
20253
+ var tag = _getTag(value),
20254
+ isFunc = tag == funcTag || tag == genTag;
20255
+
20256
+ if (isBuffer_1(value)) {
20257
+ return _cloneBuffer(value, isDeep);
20258
+ }
20259
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
20260
+ result = (isFlat || isFunc) ? {} : _initCloneObject(value);
20261
+ if (!isDeep) {
20262
+ return isFlat
20263
+ ? _copySymbolsIn(value, _baseAssignIn(result, value))
20264
+ : _copySymbols(value, _baseAssign(result, value));
20265
+ }
20266
+ } else {
20267
+ if (!cloneableTags[tag]) {
20268
+ return object ? value : {};
20269
+ }
20270
+ result = _initCloneByTag(value, tag, isDeep);
20271
+ }
20272
+ }
20273
+ // Check for circular references and return its corresponding clone.
20274
+ stack || (stack = new _Stack);
20275
+ var stacked = stack.get(value);
20276
+ if (stacked) {
20277
+ return stacked;
20278
+ }
20279
+ stack.set(value, result);
20280
+
20281
+ if (isSet_1(value)) {
20282
+ value.forEach(function(subValue) {
20283
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
20284
+ });
20285
+ } else if (isMap_1(value)) {
20286
+ value.forEach(function(subValue, key) {
20287
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
20288
+ });
20289
+ }
20290
+
20291
+ var keysFunc = isFull
20292
+ ? (isFlat ? _getAllKeysIn : _getAllKeys)
20293
+ : (isFlat ? keysIn_1 : keys_1);
20294
+
20295
+ var props = isArr ? undefined : keysFunc(value);
20296
+ _arrayEach(props || value, function(subValue, key) {
20297
+ if (props) {
20298
+ key = subValue;
20299
+ subValue = value[key];
20300
+ }
20301
+ // Recursively populate clone (susceptible to call stack limits).
20302
+ _assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
20303
+ });
20304
+ return result;
20305
+ }
20306
+
20307
+ var _baseClone = baseClone;
20308
+
20309
+ /** Used to compose bitmasks for cloning. */
20310
+ var CLONE_DEEP_FLAG = 1,
20311
+ CLONE_SYMBOLS_FLAG = 4;
20312
+
20313
+ /**
20314
+ * This method is like `_.cloneWith` except that it recursively clones `value`.
20315
+ *
20316
+ * @static
20317
+ * @memberOf _
20318
+ * @since 4.0.0
20319
+ * @category Lang
20320
+ * @param {*} value The value to recursively clone.
20321
+ * @param {Function} [customizer] The function to customize cloning.
20322
+ * @returns {*} Returns the deep cloned value.
20323
+ * @see _.cloneWith
20324
+ * @example
20325
+ *
20326
+ * function customizer(value) {
20327
+ * if (_.isElement(value)) {
20328
+ * return value.cloneNode(true);
20329
+ * }
20330
+ * }
20331
+ *
20332
+ * var el = _.cloneDeepWith(document.body, customizer);
20333
+ *
20334
+ * console.log(el === document.body);
20335
+ * // => false
20336
+ * console.log(el.nodeName);
20337
+ * // => 'BODY'
20338
+ * console.log(el.childNodes.length);
20339
+ * // => 20
20340
+ */
20341
+ function cloneDeepWith(value, customizer) {
20342
+ customizer = typeof customizer == 'function' ? customizer : undefined;
20343
+ return _baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
20344
+ }
20345
+
20346
+ var cloneDeepWith_1 = cloneDeepWith;
20347
+
20348
+ var isFieldRequired = function isFieldRequired(rules) {
20349
+ if (rules === void 0) {
20350
+ rules = [];
20351
+ }
20352
+
20353
+ return (rules || []).some(function (rule) {
20354
+ return rule === null || rule === void 0 ? void 0 : rule.required;
20355
+ });
20356
+ };
20357
+ var getErrorAndWarnings = function getErrorAndWarnings(result) {
20358
+ var errors = [];
20359
+ var warnings = [];
20360
+ var errorTypes = [];
20361
+ result.map(function (_a) {
20362
+ var _b = _a.message,
20363
+ message = _b === void 0 ? [] : _b,
20364
+ _c = _a.validateLevel,
20365
+ validateLevel = _c === void 0 ? 'error' : _c,
20366
+ resultErrorTypes = _a.errorTypes;
20367
+
20368
+ if (!(message === null || message === void 0 ? void 0 : message.length)) {
20369
+ return;
20370
+ }
20371
+
20372
+ if (validateLevel === 'warning') {
20373
+ warnings = __spreadArrays$1(warnings, message);
20374
+ } else {
20375
+ errors = __spreadArrays$1(errors, message);
20376
+ errorTypes = __spreadArrays$1(errorTypes, resultErrorTypes);
20377
+ }
20378
+ });
20379
+ return {
20380
+ warnings: warnings,
20381
+ errors: errors,
20382
+ errorTypes: errorTypes
20383
+ };
20384
+ };
20385
+ var getDefaultValueForInterComponent = function getDefaultValueForInterComponent(componentType) {
20386
+ switch (componentType) {
20387
+ case FormInternalComponentType.Input:
20388
+ case FormInternalComponentType.Textarea:
20389
+ return undefined;
20390
+
20391
+ case FormInternalComponentType.CheckboxGroup:
20392
+ return [];
20393
+
20394
+ case FormInternalComponentType.RadioGroup:
20395
+ return null;
20396
+
20397
+ case FormInternalComponentType.Slider:
20398
+ case FormInternalComponentType.Rate:
20399
+ return 0;
20400
+
20401
+ default:
20402
+ return undefined;
20403
+ }
20404
+ };
20405
+ function deepClone(value) {
20406
+ return cloneDeepWith_1(value, function (val) {
20407
+ if (!isObject$3(val) && !isArray$2(val)) {
20408
+ return val;
20409
+ }
20410
+ });
20411
+ }
20412
+
20413
+ var defaultFunc = function defaultFunc() {};
20414
+
20415
+ var defaultFormDataMethods = {
20416
+ getFieldValue: function getFieldValue(name) {
20417
+ return name;
20418
+ },
20419
+ getFieldsValue: function getFieldsValue(_names) {
20420
+ return {};
20421
+ },
20422
+ getFieldError: function getFieldError(_name) {
20423
+ return [];
20424
+ },
20425
+ setFieldValue: function setFieldValue(_name, _value) {
20426
+ return true;
20427
+ },
20428
+ setFieldsValue: function setFieldsValue(_values) {
20429
+ return true;
20430
+ },
20431
+ registerField: function registerField(_name, _self) {
20432
+ return function () {};
20433
+ },
20434
+ resetFields: defaultFunc,
20435
+ validateFields: defaultFunc,
20436
+ submit: defaultFunc,
20437
+ getInternalHooks: function getInternalHooks() {
20438
+ return {
20439
+ registerField: defaultFunc,
20440
+ setInitialValues: defaultFunc,
20441
+ setCallbacks: defaultFunc,
20442
+ getInitialValue: defaultFunc,
20443
+ setInitialValue: defaultFunc,
20444
+ innerSetFieldsValue: defaultFunc,
20445
+ innerSetFieldValue: defaultFunc
20446
+ };
20447
+ }
20448
+ }; // 在field的静态的状态下设置
20449
+
20450
+ var FormData =
20451
+ /** @class */
20452
+ function () {
20453
+ function FormData() {
20454
+ var _this = this;
20455
+
20456
+ this._formData = {}; // 数据源
20457
+
20458
+ this._fieldsList = {}; // 字段列表
20459
+
20460
+ this._initialValues = {}; // 初始值
20461
+
20462
+ this._callbacks = {};
20463
+
20464
+ this.commonSetFieldsValue = function (values, changeType) {
20465
+ var oldValues = Object.keys(values).reduce(function (acc, key) {
20466
+ var _a;
20467
+
20468
+ return __assign$3(__assign$3({}, acc), (_a = {}, _a[key] = _this.getFieldValue(key), _a));
20469
+ }, {});
20470
+ _this._formData = __assign$3(__assign$3({}, _this._formData), values);
20471
+
20472
+ _this.notifyField(values, oldValues, changeType);
20473
+ };
20474
+
20475
+ this.setFieldsValue = function (values) {
20476
+ _this.commonSetFieldsValue(values);
20477
+
20478
+ var onValuesChange = _this._callbacks.onValuesChange;
20479
+ onValuesChange === null || onValuesChange === void 0 ? void 0 : onValuesChange(values, _this._formData);
20480
+ return true;
20481
+ };
20482
+
20483
+ this.innerSetFieldsValue = function (values, changeType) {
20484
+ _this.commonSetFieldsValue(values, changeType);
20485
+
20486
+ var _a = _this._callbacks,
20487
+ onValuesChange = _a.onValuesChange,
20488
+ onChange = _a.onChange;
20489
+ onValuesChange === null || onValuesChange === void 0 ? void 0 : onValuesChange(values, _this._formData);
20490
+ onChange === null || onChange === void 0 ? void 0 : onChange(values, _this._formData);
20491
+ return true;
20492
+ };
20493
+
20494
+ this.commonSetFieldValue = function (name, value, changeType) {
20495
+ var _a, _b, _c;
20496
+
20497
+ var oldValues = (_a = {}, _a[name] = _this.getFieldValue(name), _a);
20498
+ _this._formData = __assign$3(__assign$3({}, _this._formData), (_b = {}, _b[name] = value, _b));
20499
+
20500
+ _this.notifyField((_c = {}, _c[name] = value, _c), oldValues, changeType);
20501
+ };
20502
+
20503
+ this.setFieldValue = function (name, value) {
20504
+ var _a;
20505
+
20506
+ _this.commonSetFieldValue(name, value);
20507
+
20508
+ var onValuesChange = _this._callbacks.onValuesChange;
20509
+ onValuesChange && onValuesChange((_a = {}, _a[name] = value, _a), _this.getFieldsValue());
20510
+ return true;
20511
+ };
20512
+
20513
+ this.innerSetFieldValue = function (name, value, changeType) {
20514
+ var _a, _b;
20515
+
20516
+ _this.commonSetFieldValue(name, value, changeType);
20517
+
20518
+ var _c = _this._callbacks,
20519
+ onValuesChange = _c.onValuesChange,
20520
+ onChange = _c.onChange;
20521
+ onValuesChange && onValuesChange((_a = {}, _a[name] = value, _a), _this._formData);
20522
+ onChange && onChange((_b = {}, _b[name] = value, _b), _this._formData);
20523
+ return true;
20524
+ };
20525
+
20526
+ this.notifyField = function (values, oldValues, changeType) {
20527
+ if (changeType === void 0) {
20528
+ changeType = ValueChangeType.Update;
20529
+ }
20530
+
20531
+ Object.keys(values).map(function (fieldName) {
20532
+ var _a;
20533
+
20534
+ var fieldObj = ((_a = _this._fieldsList) === null || _a === void 0 ? void 0 : _a[fieldName]) || null;
20535
+
20536
+ if (fieldObj) {
20537
+ fieldObj.onValueChange(values[fieldName], oldValues[fieldName], {
20538
+ changeType: changeType
20539
+ });
20540
+ }
20541
+ });
20542
+ };
20543
+
20544
+ this.getFieldsValue = function (names) {
20545
+ if (names) {
20546
+ return names.map(function (name) {
20547
+ return _this.getFieldValue(name);
20548
+ });
20549
+ }
20550
+
20551
+ return deepClone(_this._formData);
20552
+ };
20553
+
20554
+ this.getFieldValue = function (name) {
20555
+ var _a;
20556
+
20557
+ return deepClone((_a = _this._formData) === null || _a === void 0 ? void 0 : _a[name]);
20558
+ };
20559
+
20560
+ this.getFieldError = function (name) {
20561
+ var _a;
20562
+
20563
+ var field = ((_a = _this._fieldsList) === null || _a === void 0 ? void 0 : _a[name]) || null;
20564
+
20565
+ if (field) {
20566
+ return field.getFieldError();
20567
+ }
20568
+
20569
+ return [];
20570
+ };
20571
+
20572
+ this.getFieldsError = function (names) {
20573
+ var fields = names || Object.keys(_this._fieldsList);
20574
+ return fields.reduce(function (pre, name) {
20575
+ var _a;
20576
+
20577
+ var theField = (_a = _this._fieldsList) === null || _a === void 0 ? void 0 : _a[name];
20578
+
20579
+ if (theField) {
20580
+ pre[name] = theField === null || theField === void 0 ? void 0 : theField.getFieldError();
20581
+ }
20582
+
20583
+ return pre;
20584
+ }, {});
20585
+ };
20586
+
20587
+ this.isFieldTouched = function (name) {
20588
+ var _a;
20589
+
20590
+ var field = ((_a = _this._fieldsList) === null || _a === void 0 ? void 0 : _a[name]) || null;
20591
+
20592
+ if (field) {
20593
+ return field.isFieldTouched();
20594
+ }
20595
+
20596
+ return false;
20597
+ };
20598
+
20599
+ this.registerField = function (name, self) {
20600
+ var _a, _b;
20601
+
20602
+ _this._fieldsList[name] = self;
20603
+ var initialValue = self.props.initialValue;
20604
+
20605
+ if (initialValue !== undefined && name) {
20606
+ _this._initialValues = __assign$3(__assign$3({}, _this._initialValues), (_a = {}, _a[name] = initialValue, _a));
17944
20607
 
17945
20608
  _this.setFieldsValue(__assign$3(__assign$3({}, _this._formData), (_b = {}, _b[name] = initialValue, _b)));
17946
20609
  }
@@ -17954,13 +20617,43 @@
17954
20617
  };
17955
20618
 
17956
20619
  this.setInitialValues = function (initVal) {
17957
- _this._initialValues = __assign$3({}, initVal || {});
20620
+ _this._initialValues = deepClone(initVal || {});
17958
20621
 
17959
20622
  _this.setFieldsValue(initVal);
17960
20623
  };
17961
20624
 
20625
+ this.setInitialValue = function (fieldName, value) {
20626
+ if (!fieldName) {
20627
+ return;
20628
+ }
20629
+
20630
+ _this._initialValues[fieldName] = value;
20631
+
20632
+ _this.setFieldValue(fieldName, value);
20633
+ };
20634
+
20635
+ this.getInitialValue = function (fieldName) {
20636
+ return _this._initialValues[fieldName];
20637
+ };
20638
+
17962
20639
  this.resetFields = function () {
17963
- _this.setFieldsValue(_this._initialValues);
20640
+ var oldValues = __assign$3({}, _this._formData);
20641
+
20642
+ var initialValues = {};
20643
+ Object.keys(_this._formData).forEach(function (fieldName) {
20644
+ var _a;
20645
+
20646
+ var fieldObj = ((_a = _this._fieldsList) === null || _a === void 0 ? void 0 : _a[fieldName]) || null;
20647
+
20648
+ if (fieldObj) {
20649
+ initialValues[fieldName] = fieldObj.getInitialValue();
20650
+ }
20651
+ });
20652
+ var onValuesChange = _this._callbacks.onValuesChange;
20653
+ onValuesChange && onValuesChange(initialValues, _this._formData);
20654
+ _this._formData = initialValues;
20655
+
20656
+ _this.notifyField(initialValues, oldValues, ValueChangeType.Reset);
17964
20657
  };
17965
20658
 
17966
20659
  this.validateFields = function () {
@@ -17992,7 +20685,7 @@
17992
20685
  this.submit = function () {
17993
20686
  _this.validateFields().then(function (result) {
17994
20687
  var onSubmit = _this._callbacks.onSubmit;
17995
- onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(_this._formData, result);
20688
+ onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(_this.getFieldsValue(), result);
17996
20689
  }).catch(function (e) {
17997
20690
  var onSubmitFailed = _this._callbacks.onSubmitFailed;
17998
20691
 
@@ -18000,7 +20693,7 @@
18000
20693
  return;
18001
20694
  }
18002
20695
 
18003
- onSubmitFailed(_this._formData, e);
20696
+ onSubmitFailed(_this.getFieldsValue(), e);
18004
20697
  });
18005
20698
  };
18006
20699
 
@@ -18029,7 +20722,11 @@
18029
20722
  return {
18030
20723
  registerField: _this.registerField,
18031
20724
  setInitialValues: _this.setInitialValues,
18032
- setCallbacks: _this.setCallbacks
20725
+ setCallbacks: _this.setCallbacks,
20726
+ getInitialValue: _this.getInitialValue,
20727
+ setInitialValue: _this.setInitialValue,
20728
+ innerSetFieldsValue: _this.innerSetFieldsValue,
20729
+ innerSetFieldValue: _this.innerSetFieldValue
18033
20730
  };
18034
20731
  };
18035
20732
  }
@@ -18060,74 +20757,6 @@
18060
20757
  layout: 'horizontal'
18061
20758
  });
18062
20759
 
18063
- // 注意:自动识别form关联组件的依据,请勿轻易改变代码结构
18064
- // Notice: Automatically identify the basis of the associated component of the form, DO NOT change the code structure.
18065
- var FormInternalComponentType;
18066
-
18067
- (function (FormInternalComponentType) {
18068
- FormInternalComponentType["Input"] = "Input";
18069
- FormInternalComponentType["Textarea"] = "Textarea";
18070
- FormInternalComponentType["Checkbox"] = "Checkbox";
18071
- FormInternalComponentType["CheckboxGroup"] = "CheckboxGroup";
18072
- FormInternalComponentType["DatePicker"] = "DatePicker";
18073
- FormInternalComponentType["Picker"] = "Picker";
18074
- FormInternalComponentType["Radio"] = "Radio";
18075
- FormInternalComponentType["RadioGroup"] = "RadioGroup";
18076
- FormInternalComponentType["Slider"] = "Slider";
18077
- FormInternalComponentType["Switch"] = "Switch";
18078
- FormInternalComponentType["ImagePicker"] = "ImagePicker";
18079
- FormInternalComponentType["Rate"] = "Rate";
18080
- FormInternalComponentType["Stepper"] = "Stepper";
18081
- })(FormInternalComponentType || (FormInternalComponentType = {}));
18082
-
18083
- var ValidateStatus;
18084
-
18085
- (function (ValidateStatus) {
18086
- ValidateStatus["Init"] = "init";
18087
- ValidateStatus["Error"] = "error";
18088
- ValidateStatus["Warning"] = "warning";
18089
- ValidateStatus["Validating"] = "validating";
18090
- ValidateStatus["Success"] = "success";
18091
- })(ValidateStatus || (ValidateStatus = {}));
18092
-
18093
- var isFieldRequired = function isFieldRequired(rules) {
18094
- if (rules === void 0) {
18095
- rules = [];
18096
- }
18097
-
18098
- return (rules || []).some(function (rule) {
18099
- return rule === null || rule === void 0 ? void 0 : rule.required;
18100
- });
18101
- };
18102
- var getErrorAndWarnings = function getErrorAndWarnings(result) {
18103
- var errors = [];
18104
- var warnings = [];
18105
- var errorTypes = [];
18106
- result.map(function (_a) {
18107
- var _b = _a.message,
18108
- message = _b === void 0 ? [] : _b,
18109
- _c = _a.validateLevel,
18110
- validateLevel = _c === void 0 ? 'error' : _c,
18111
- resultErrorTypes = _a.errorTypes;
18112
-
18113
- if (!(message === null || message === void 0 ? void 0 : message.length)) {
18114
- return;
18115
- }
18116
-
18117
- if (validateLevel === 'warning') {
18118
- warnings = __spreadArrays$1(warnings, message);
18119
- } else {
18120
- errors = __spreadArrays$1(errors, message);
18121
- errorTypes = __spreadArrays$1(errorTypes, resultErrorTypes);
18122
- }
18123
- });
18124
- return {
18125
- warnings: warnings,
18126
- errors: errors,
18127
- errorTypes: errorTypes
18128
- };
18129
- };
18130
-
18131
20760
  function DefaultPickerLinkedContainer(_a) {
18132
20761
  var value = _a.value;
18133
20762
 
@@ -18152,6 +20781,10 @@
18152
20781
 
18153
20782
  var className = prefixCls + "-form-picker-link-container";
18154
20783
  var dateTimeStr = React.useMemo(function () {
20784
+ if (ts === undefined) {
20785
+ return '';
20786
+ }
20787
+
18155
20788
  if (typeof ts === 'number') {
18156
20789
  return formatDateTimeStr(ts, types);
18157
20790
  }
@@ -18188,14 +20821,12 @@
18188
20821
  __extends$1(FormItemInner, _super);
18189
20822
 
18190
20823
  function FormItemInner(props, context) {
18191
- var _a;
18192
-
18193
20824
  var _this = _super.call(this, props) || this;
18194
20825
 
18195
20826
  _this._errors = [];
18196
20827
  _this._touched = false;
18197
20828
 
18198
- _this.onValueChange = function (curValue, preValue) {
20829
+ _this.onValueChange = function (curValue, preValue, info) {
18199
20830
  _this._touched = true;
18200
20831
  var shouldUpdate = _this.props.shouldUpdate;
18201
20832
 
@@ -18207,9 +20838,33 @@
18207
20838
  return;
18208
20839
  }
18209
20840
 
20841
+ if ((info === null || info === void 0 ? void 0 : info.changeType) === ValueChangeType.Reset) {
20842
+ _this.props.onValidateStatusChange({
20843
+ errors: [],
20844
+ warnings: [],
20845
+ errorTypes: []
20846
+ });
20847
+
20848
+ _this._errors = [];
20849
+ }
20850
+
18210
20851
  _this.forceUpdate();
18211
20852
  };
18212
20853
 
20854
+ _this.getInitialValue = function () {
20855
+ var _a, _b;
20856
+
20857
+ var _c = _this.props,
20858
+ children = _c.children,
20859
+ displayType = _c.displayType;
20860
+
20861
+ var getInitialValue = _this.context.form.getInternalHooks().getInitialValue;
20862
+
20863
+ var childrenType = displayType || ((_a = children.type) === null || _a === void 0 ? void 0 : _a.displayName); // get user-defined initialValue or if not defined
20864
+
20865
+ return (_b = getInitialValue(_this.props.field)) !== null && _b !== void 0 ? _b : getDefaultValueForInterComponent(childrenType);
20866
+ };
20867
+
18213
20868
  _this.getFieldError = function () {
18214
20869
  return _this._errors;
18215
20870
  };
@@ -18218,7 +20873,17 @@
18218
20873
  return _this._touched;
18219
20874
  };
18220
20875
 
18221
- _this.validateField = function () {
20876
+ _this.getAllRuleValidateTriggers = function () {
20877
+ var _a;
20878
+
20879
+ return ((_a = _this.props.rules) === null || _a === void 0 ? void 0 : _a.map(function (rule) {
20880
+ return rule.validateTrigger;
20881
+ }).flat().filter(function (v) {
20882
+ return !!v;
20883
+ })) || [];
20884
+ };
20885
+
20886
+ _this.validateField = function (validateTrigger) {
18222
20887
  var _a;
18223
20888
 
18224
20889
  var validateMessages = _this.context.validateMessages;
@@ -18227,12 +20892,18 @@
18227
20892
  field = _b.field,
18228
20893
  rules = _b.rules,
18229
20894
  onValidateStatusChange = _b.onValidateStatusChange;
18230
- var value = getFieldValue(field);
20895
+ var value = getFieldValue(field); // rules: if validateTrigger is not defined, all rules will be validated
20896
+ // if validateTrigger is defined, only rules with validateTrigger or without rule.validateTrigger will be validated
18231
20897
 
18232
- if ((rules === null || rules === void 0 ? void 0 : rules.length) && field) {
20898
+ var curRules = validateTrigger ? rules === null || rules === void 0 ? void 0 : rules.filter(function (rule) {
20899
+ var triggerList = [].concat(rule.validateTrigger || validateTrigger);
20900
+ return triggerList.includes(validateTrigger);
20901
+ }) : rules;
20902
+
20903
+ if ((curRules === null || curRules === void 0 ? void 0 : curRules.length) && field) {
18233
20904
  var fieldDom_1 = _this.props.getFormItemRef();
18234
20905
 
18235
- var fieldValidator_1 = new Validator((_a = {}, _a[field] = rules, _a), {
20906
+ var fieldValidator_1 = new Validator((_a = {}, _a[field] = curRules, _a), {
18236
20907
  validateMessages: validateMessages
18237
20908
  });
18238
20909
  return new es6Promise.Promise(function (resolve) {
@@ -18271,20 +20942,25 @@
18271
20942
  };
18272
20943
 
18273
20944
  _this.setFieldData = function (value) {
18274
- var field = _this.props.field;
18275
- var setFieldValue = _this.context.form.setFieldValue;
18276
- setFieldValue(field, value);
20945
+ var _a = _this.props,
20946
+ field = _a.field,
20947
+ _b = _a.trigger,
20948
+ trigger = _b === void 0 ? 'onChange' : _b;
20949
+
20950
+ var innerSetFieldValue = _this.context.form.getInternalHooks().innerSetFieldValue;
18277
20951
 
18278
- _this.validateField();
20952
+ innerSetFieldValue(field, value);
20953
+
20954
+ _this.validateField(trigger);
18279
20955
  };
18280
20956
 
18281
- _this.innerTriggerFunction = function (_, value) {
20957
+ _this.innerTriggerFunctionWithValueFirst = function (value) {
18282
20958
  var _a, _b;
18283
20959
 
18284
20960
  var args = [];
18285
20961
 
18286
- for (var _i = 2; _i < arguments.length; _i++) {
18287
- args[_i - 2] = arguments[_i];
20962
+ for (var _i = 1; _i < arguments.length; _i++) {
20963
+ args[_i - 1] = arguments[_i];
18288
20964
  }
18289
20965
 
18290
20966
  _this.setFieldData(value);
@@ -18295,29 +20971,23 @@
18295
20971
  trigger = _d === void 0 ? 'onChange' : _d;
18296
20972
 
18297
20973
  if (trigger && ((_a = children.props) === null || _a === void 0 ? void 0 : _a[trigger])) {
18298
- (_b = children.props) === null || _b === void 0 ? void 0 : _b[trigger].apply(_b, __spreadArrays$1([_, value], args));
20974
+ (_b = children.props) === null || _b === void 0 ? void 0 : _b[trigger].apply(_b, __spreadArrays$1([value], args));
18299
20975
  }
18300
20976
  };
18301
20977
 
18302
- _this.innerTriggerFunctionWithValueFirst = function (value) {
20978
+ _this.innerOnInputFunction = function (_, value) {
18303
20979
  var _a, _b;
18304
20980
 
18305
20981
  var args = [];
18306
20982
 
18307
- for (var _i = 1; _i < arguments.length; _i++) {
18308
- args[_i - 1] = arguments[_i];
20983
+ for (var _i = 2; _i < arguments.length; _i++) {
20984
+ args[_i - 2] = arguments[_i];
18309
20985
  }
18310
20986
 
18311
20987
  _this.setFieldData(value);
18312
20988
 
18313
- var _c = _this.props,
18314
- children = _c.children,
18315
- _d = _c.trigger,
18316
- trigger = _d === void 0 ? 'onChange' : _d;
18317
-
18318
- if (trigger && ((_a = children.props) === null || _a === void 0 ? void 0 : _a[trigger])) {
18319
- (_b = children.props) === null || _b === void 0 ? void 0 : _b[trigger].apply(_b, __spreadArrays$1([value], args));
18320
- }
20989
+ var children = _this.props.children;
20990
+ (_b = (_a = children.props) === null || _a === void 0 ? void 0 : _a.onInput) === null || _b === void 0 ? void 0 : _b.call.apply(_b, __spreadArrays$1([_a, _, value], args));
18321
20991
  };
18322
20992
 
18323
20993
  _this.innerClearFunction = function () {
@@ -18341,8 +21011,8 @@
18341
21011
  _this.destroyField = function () {};
18342
21012
 
18343
21013
  if ((props === null || props === void 0 ? void 0 : props.initialValue) && props.field) {
18344
- var setInitialValues = context.form.getInternalHooks().setInitialValues;
18345
- setInitialValues((_a = {}, _a[props.field] = props.initialValue, _a));
21014
+ var setInitialValue = context.form.getInternalHooks().setInitialValue;
21015
+ setInitialValue(props.field, props.initialValue);
18346
21016
  }
18347
21017
 
18348
21018
  return _this;
@@ -18358,110 +21028,89 @@
18358
21028
  };
18359
21029
 
18360
21030
  FormItemInner.prototype.renderChildren = function () {
18361
- var _a;
18362
-
18363
21031
  var _this = this;
18364
21032
 
18365
- var _b, _c, _d;
21033
+ var _a, _b, _c;
18366
21034
 
18367
- var _e = this.props,
18368
- children = _e.children,
18369
- field = _e.field,
18370
- _f = _e.trigger,
18371
- trigger = _f === void 0 ? 'onChange' : _f,
18372
- _g = _e.triggerPropsField,
18373
- triggerPropsField = _g === void 0 ? 'value' : _g,
18374
- displayType = _e.displayType;
21035
+ var _d = this.props,
21036
+ children = _d.children,
21037
+ field = _d.field,
21038
+ _e = _d.trigger,
21039
+ trigger = _e === void 0 ? 'onChange' : _e,
21040
+ _f = _d.triggerPropsField,
21041
+ triggerPropsField = _f === void 0 ? 'value' : _f,
21042
+ displayType = _d.displayType,
21043
+ disabled = _d.disabled;
18375
21044
  var getFieldValue = this.context.form.getFieldValue;
18376
- var props = (_a = {}, _a[triggerPropsField] = getFieldValue(field), _a.disabled = this.props.disabled, _a);
18377
- var childrenType = displayType || ((_b = children.type) === null || _b === void 0 ? void 0 : _b.displayName);
21045
+ var childrenProps = {
21046
+ disabled: disabled
21047
+ }; // inject validateTriggers of rules
21048
+
21049
+ this.getAllRuleValidateTriggers().forEach(function (triggerName) {
21050
+ childrenProps[triggerName] = function (e) {
21051
+ var _a, _b;
21052
+
21053
+ _this.validateField(triggerName);
21054
+
21055
+ (_b = (_a = children === null || children === void 0 ? void 0 : children.props) === null || _a === void 0 ? void 0 : _a[triggerName]) === null || _b === void 0 ? void 0 : _b.call(_a, e);
21056
+ };
21057
+ });
21058
+ var childrenType = displayType || ((_a = children.type) === null || _a === void 0 ? void 0 : _a.displayName);
18378
21059
 
18379
21060
  switch (childrenType) {
18380
21061
  case FormInternalComponentType.Input:
18381
21062
  case FormInternalComponentType.Textarea:
18382
- props = {
18383
- value: getFieldValue(field) || '',
18384
- onInput: this.innerTriggerFunction,
18385
- onClear: this.innerClearFunction,
18386
- disabled: this.props.disabled
18387
- };
18388
- break;
18389
-
18390
- case FormInternalComponentType.Checkbox:
18391
- case FormInternalComponentType.Radio:
18392
- case FormInternalComponentType.Slider:
18393
- case FormInternalComponentType.RadioGroup:
18394
- case FormInternalComponentType.CheckboxGroup:
18395
- props = {
18396
- value: getFieldValue(field),
18397
- onChange: this.innerTriggerFunctionWithValueFirst,
18398
- disabled: this.props.disabled
18399
- };
21063
+ childrenProps.value = getFieldValue(field) || '';
21064
+ childrenProps.onInput = this.innerOnInputFunction;
21065
+ childrenProps.onClear = this.innerClearFunction;
18400
21066
  break;
18401
21067
 
18402
21068
  case FormInternalComponentType.DatePicker:
18403
- props = {
18404
- currentTs: getFieldValue(field),
18405
- onChange: this.innerTriggerFunctionWithValueFirst,
18406
- disabled: this.props.disabled,
18407
- renderLinkedContainer: ((_c = children.props) === null || _c === void 0 ? void 0 : _c.renderLinkedContainer) || function (ts, types) {
18408
- return /*#__PURE__*/React__default["default"].createElement(DefaultDatePickerLinkedContainer, {
18409
- ts: ts,
18410
- types: types
18411
- });
18412
- }
21069
+ childrenProps.currentTs = getFieldValue(field);
21070
+ childrenProps.onChange = this.innerTriggerFunctionWithValueFirst;
21071
+
21072
+ childrenProps.renderLinkedContainer = ((_b = children.props) === null || _b === void 0 ? void 0 : _b.renderLinkedContainer) || function (ts, types) {
21073
+ return /*#__PURE__*/React__default["default"].createElement(DefaultDatePickerLinkedContainer, {
21074
+ ts: ts,
21075
+ types: types
21076
+ });
18413
21077
  };
21078
+
18414
21079
  break;
18415
21080
 
18416
21081
  case FormInternalComponentType.Picker:
18417
- props = {
18418
- value: getFieldValue(field),
18419
- onChange: this.innerTriggerFunctionWithValueFirst,
18420
- disabled: this.props.disabled,
18421
- renderLinkedContainer: ((_d = children.props) === null || _d === void 0 ? void 0 : _d.renderLinkedContainer) || function (val) {
18422
- return /*#__PURE__*/React__default["default"].createElement(DefaultPickerLinkedContainer, {
18423
- value: val
18424
- });
18425
- }
21082
+ childrenProps.value = getFieldValue(field) || '';
21083
+ childrenProps.onChange = this.innerTriggerFunctionWithValueFirst;
21084
+
21085
+ childrenProps.renderLinkedContainer = ((_c = children.props) === null || _c === void 0 ? void 0 : _c.renderLinkedContainer) || function (val) {
21086
+ return /*#__PURE__*/React__default["default"].createElement(DefaultPickerLinkedContainer, {
21087
+ value: val
21088
+ });
18426
21089
  };
21090
+
18427
21091
  break;
18428
21092
 
18429
21093
  case FormInternalComponentType.Switch:
18430
- props = {
18431
- checked: Boolean(getFieldValue(field)),
18432
- onChange: this.innerTriggerFunctionWithValueFirst,
18433
- disabled: this.props.disabled
18434
- };
21094
+ childrenProps.checked = Boolean(getFieldValue(field));
21095
+ childrenProps.onChange = this.innerTriggerFunctionWithValueFirst;
18435
21096
  break;
18436
21097
 
18437
21098
  case FormInternalComponentType.ImagePicker:
18438
- props = {
18439
- images: getFieldValue(field),
18440
- onChange: this.innerTriggerFunctionWithValueFirst,
18441
- disabled: this.props.disabled
18442
- };
21099
+ childrenProps.images = getFieldValue(field);
21100
+ childrenProps.onChange = this.innerTriggerFunctionWithValueFirst;
18443
21101
  break;
18444
21102
 
18445
21103
  default:
18446
- var originTrigger_1 = children.props[trigger]; // inject the validated result
18447
-
18448
- props.error = this._errors;
18449
-
18450
- props[trigger] = function (newValue) {
18451
- var args = [];
18452
-
18453
- for (var _i = 1; _i < arguments.length; _i++) {
18454
- args[_i - 1] = arguments[_i];
18455
- }
18456
-
18457
- _this.setFieldData(newValue);
21104
+ if (triggerPropsField) {
21105
+ childrenProps[triggerPropsField] = getFieldValue(field);
21106
+ } // inject the validated result
18458
21107
 
18459
- originTrigger_1 && originTrigger_1.apply(void 0, __spreadArrays$1([newValue], args));
18460
- };
18461
21108
 
21109
+ childrenProps.error = this._errors;
21110
+ childrenProps[trigger] = this.innerTriggerFunctionWithValueFirst;
18462
21111
  }
18463
21112
 
18464
- return /*#__PURE__*/React__default["default"].cloneElement(children, props);
21113
+ return /*#__PURE__*/React__default["default"].cloneElement(children, childrenProps);
18465
21114
  };
18466
21115
 
18467
21116
  FormItemInner.prototype.render = function () {
@@ -18572,6 +21221,7 @@
18572
21221
  formInstance = props.form,
18573
21222
  children = props.children,
18574
21223
  onValuesChange = props.onValuesChange,
21224
+ onChange = props.onChange,
18575
21225
  onSubmit = props.onSubmit,
18576
21226
  onSubmitFailed = props.onSubmitFailed,
18577
21227
  disabled = props.disabled;
@@ -18586,7 +21236,8 @@
18586
21236
  setCallbacks({
18587
21237
  onValuesChange: onValuesChange,
18588
21238
  onSubmit: onSubmit,
18589
- onSubmitFailed: onSubmitFailed
21239
+ onSubmitFailed: onSubmitFailed,
21240
+ onChange: onChange
18590
21241
  });
18591
21242
 
18592
21243
  if (!initRef.current) {
@@ -22419,7 +25070,9 @@
22419
25070
  stickyStyle: "absolute",
22420
25071
  getScrollContainer: getScrollContainer,
22421
25072
  ref: function ref(stickyRef) {
22422
- return stickyRef && updateRef(groupIndex, stickyRef);
25073
+ if (stickyRef) {
25074
+ updateRef(groupIndex, stickyRef);
25075
+ }
22423
25076
  }
22424
25077
  }, titleDom) : titleDom;
22425
25078
  };
@@ -23117,7 +25770,7 @@
23117
25770
  function renderInput(_a) {
23118
25771
  var prefixCls = _a.prefixCls;
23119
25772
  var prefix = prefixCls + "-input";
23120
- return renderWrapper(prefix, type, /*#__PURE__*/React__default["default"].createElement("input", __assign$3({}, nativeProps, {
25773
+ return renderWrapper(prefix, type + " single-line", /*#__PURE__*/React__default["default"].createElement("input", __assign$3({}, nativeProps, {
23121
25774
  id: id,
23122
25775
  name: name,
23123
25776
  maxLength: maxLength,
@@ -24041,8 +26694,8 @@
24041
26694
  getContainer = props.getContainer;
24042
26695
  var domRef = React.useRef(null);
24043
26696
  var innerRef = React.useRef(null);
24044
- var closeTimerRef = React.useRef();
24045
- var onCloseTimeRef = React.useRef();
26697
+ var closeTimerRef = React.useRef(undefined);
26698
+ var onCloseTimeRef = React.useRef(undefined);
24046
26699
 
24047
26700
  var _f = React.useState(!visible),
24048
26701
  hasTrans = _f[0],
@@ -24736,10 +27389,10 @@
24736
27389
  setDirectionState = _k[2];
24737
27390
 
24738
27391
  var getOffset = React.useCallback(function (dir) {
24739
- return getDefaultValue(isObject$2(edgeOffset) ? edgeOffset[dir] : edgeOffset, defaultEdgeOffset[dir]);
27392
+ return getDefaultValue(isObject$3(edgeOffset) ? edgeOffset[dir] : edgeOffset, defaultEdgeOffset[dir]);
24740
27393
  }, [edgeOffset]);
24741
27394
  var getAutoDirection = React.useCallback(function (dir) {
24742
- return getDefaultValue(isObject$2(useAutoDirection) ? useAutoDirection[dir] : useAutoDirection, defaultAutoDirection);
27395
+ return getDefaultValue(isObject$3(useAutoDirection) ? useAutoDirection[dir] : useAutoDirection, defaultAutoDirection);
24743
27396
  }, [useAutoDirection]);
24744
27397
  React.useEffect(function () {
24745
27398
  setDirectionState(direction);
@@ -25199,7 +27852,7 @@
25199
27852
  var closeTimer = React.useRef(0);
25200
27853
  /** 垂直方向自适应 */
25201
27854
 
25202
- var autoVerticalDirection = getDefaultValue(isObject$2(useAutoDirection) ? useAutoDirection.vertical : useAutoDirection, defaultAutoDirection);
27855
+ var autoVerticalDirection = getDefaultValue(isObject$3(useAutoDirection) ? useAutoDirection.vertical : useAutoDirection, defaultAutoDirection);
25203
27856
 
25204
27857
  var popoverDisappear = function popoverDisappear() {
25205
27858
  onVisibleChange(false);
@@ -26665,7 +29318,7 @@
26665
29318
  layout: layout,
26666
29319
  disabled: disabled,
26667
29320
  icons: icons,
26668
- value: groupValue === void 0 ? [] : [groupValue],
29321
+ value: groupValue === void 0 || groupValue === null ? [] : [groupValue],
26669
29322
  onChange: handleChange
26670
29323
  }
26671
29324
  }, children, !children && options && options.map(function (option) {
@@ -27927,7 +30580,7 @@
27927
30580
  });
27928
30581
 
27929
30582
  var getWidth = function getWidth(idx) {
27930
- if (isArray$1(width)) {
30583
+ if (isArray$2(width)) {
27931
30584
  return width[idx];
27932
30585
  }
27933
30586
 
@@ -27951,7 +30604,9 @@
27951
30604
  backgroundColor: backgroundColor
27952
30605
  },
27953
30606
  ref: function ref(el) {
27954
- return el && (lineDomRefs.current[idx] = el);
30607
+ if (el) {
30608
+ lineDomRefs.current[idx] = el;
30609
+ }
27955
30610
  }
27956
30611
  }, isGradientAnimation && offsets !== undefined && /*#__PURE__*/React__default["default"].createElement("div", {
27957
30612
  className: prefixCls + "-skeleton-animation-item",
@@ -28037,7 +30692,9 @@
28037
30692
  backgroundColor: backgroundColor
28038
30693
  },
28039
30694
  ref: function ref(el) {
28040
- return el && (iconDomRefs.current[idx] = el);
30695
+ if (el) {
30696
+ iconDomRefs.current[idx] = el;
30697
+ }
28041
30698
  }
28042
30699
  }, isGradientAnimation && iconOffsets !== undefined && /*#__PURE__*/React__default["default"].createElement("div", {
28043
30700
  className: prefixCls + "-skeleton-animation-item",
@@ -28050,7 +30707,9 @@
28050
30707
  backgroundColor: backgroundColor
28051
30708
  },
28052
30709
  ref: function ref(el) {
28053
- return el && (textDomRefs.current[idx] = el);
30710
+ if (el) {
30711
+ textDomRefs.current[idx] = el;
30712
+ }
28054
30713
  }
28055
30714
  }, isGradientAnimation && textOffsets !== undefined && /*#__PURE__*/React__default["default"].createElement("div", {
28056
30715
  className: prefixCls + "-skeleton-animation-item",
@@ -30600,7 +33259,7 @@
30600
33259
  direction = _h === void 0 ? 'center' : _h,
30601
33260
  typeIconMap = props.typeIconMap,
30602
33261
  initialBodyOverflow = props.initialBodyOverflow;
30603
- var closeTimerRef = React.useRef();
33262
+ var closeTimerRef = React.useRef(undefined);
30604
33263
  var domRef = React.useRef(null);
30605
33264
  var wrapDomRef = React.useRef(null);
30606
33265
  var isInitialMount = React.useRef(false);