@limetech/lime-elements 39.13.2 → 39.14.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 (186) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/{_assignValue-D2D1zedG.js → _assignValue-DpsLUlF4.js} +25 -2
  3. package/dist/cjs/{_baseForOwn-QM0kHQT5.js → _baseEach-C570gT5Y.js} +43 -1
  4. package/dist/cjs/{_baseIsEqual-D6hrjmx4.js → _baseIsEqual-aOPReRWl.js} +1 -0
  5. package/dist/cjs/{_baseIteratee-iGEZ9pZY.js → _baseIteratee-DggA4e7a.js} +3 -1
  6. package/dist/cjs/_commonjsHelpers-CFO10eej.js +7 -0
  7. package/dist/cjs/_getAllKeysIn-BQIV8aw7.js +118 -0
  8. package/dist/cjs/_isIterateeCall-CPWXFS_s.js +72 -0
  9. package/dist/cjs/cloneDeep-CxFNKF1Y.js +619 -0
  10. package/dist/cjs/{isArrayLikeObject-CTP6Ak01.js → difference-Bfsq4sXB.js} +93 -5
  11. package/dist/cjs/{focus-trigger-element-NnpJ5nTp.js → focus-trigger-element-Brw8VubX.js} +1 -1
  12. package/dist/cjs/{format-D04vDIBj.js → format-D4jZb7Ls.js} +1 -1
  13. package/dist/cjs/{index-mbfaT7TB.js → index-BgFEL6FF.js} +1 -1
  14. package/dist/cjs/{isEmpty-DCC_l2Xp.js → isEmpty-EBCFxX1S.js} +1 -1
  15. package/dist/cjs/{isEqual-BsHLqE-x.js → isEqual-bXyw7kXo.js} +1 -1
  16. package/dist/cjs/lime-elements.cjs.js +1 -1
  17. package/dist/cjs/limel-badge.cjs.entry.js +2 -2
  18. package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js +2 -3
  19. package/dist/cjs/limel-chip_2.cjs.entry.js +3 -3
  20. package/dist/cjs/limel-circular-progress.cjs.entry.js +2 -2
  21. package/dist/cjs/limel-code-editor.cjs.entry.js +1 -1
  22. package/dist/cjs/limel-date-picker.cjs.entry.js +3 -3
  23. package/dist/cjs/limel-dialog.cjs.entry.js +2 -2
  24. package/dist/cjs/limel-file-dropzone_2.cjs.entry.js +5 -44
  25. package/dist/cjs/limel-file-viewer.cjs.entry.js +2 -2
  26. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +12 -74
  27. package/dist/cjs/limel-form.cjs.entry.js +38541 -50295
  28. package/dist/cjs/limel-markdown.cjs.entry.js +3 -3
  29. package/dist/cjs/limel-picker.cjs.entry.js +1 -0
  30. package/dist/cjs/limel-popover_2.cjs.entry.js +2 -3
  31. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +13 -478
  32. package/dist/cjs/limel-tab-bar.cjs.entry.js +4 -83
  33. package/dist/cjs/limel-table.cjs.entry.js +17 -272
  34. package/dist/cjs/loader.cjs.js +1 -1
  35. package/dist/cjs/{markdown-parser-DCnW9yak.js → markdown-parser-BIa99LAc.js} +2 -2
  36. package/dist/cjs/{moment-DCqC7BZP.js → moment-CqRdiK10.js} +1 -1
  37. package/dist/cjs/pickBy-kLjYLoam.js +201 -0
  38. package/dist/cjs/{sv-jO-ewmqh.js → sv-BSR4W58y.js} +1 -1
  39. package/dist/collection/components/form/adapters/widget-adapter.js +23 -30
  40. package/dist/collection/components/form/fields/array-field.js +39 -6
  41. package/dist/collection/components/form/fields/field-helpers.js +4 -4
  42. package/dist/collection/components/form/fields/object-field.js +4 -2
  43. package/dist/collection/components/form/fields/schema-field.js +33 -70
  44. package/dist/collection/components/form/form.css +19 -19
  45. package/dist/collection/components/form/form.js +40 -72
  46. package/dist/collection/components/form/form.test-schemas.js +308 -0
  47. package/dist/collection/components/form/row/row-context.js +2 -0
  48. package/dist/collection/components/form/row/row.js +2 -2
  49. package/dist/collection/components/form/templates/array-context.js +2 -0
  50. package/dist/collection/components/form/templates/array-field-collapsible-item.js +4 -4
  51. package/dist/collection/components/form/templates/array-field-item.js +47 -0
  52. package/dist/collection/components/form/templates/array-field-simple-item.js +6 -7
  53. package/dist/collection/components/form/templates/array-field.js +38 -94
  54. package/dist/collection/components/form/templates/index.js +1 -0
  55. package/dist/collection/components/form/templates/object-field.js +15 -11
  56. package/dist/collection/components/form/validation-display.js +75 -0
  57. package/dist/collection/components/form/validator.js +10 -0
  58. package/dist/collection/components/form/widgets/code-editor.js +1 -1
  59. package/dist/collection/components/form/widgets/select.js +2 -1
  60. package/dist/collection/components/picker/picker.js +1 -0
  61. package/dist/collection/components/table/table.js +12 -12
  62. package/dist/esm/{_assignValue-DkGAX8ec.js → _assignValue-DOEO9byf.js} +24 -2
  63. package/dist/esm/{_baseForOwn-CfpQNnvA.js → _baseEach-CL_-rBMy.js} +42 -2
  64. package/dist/esm/{_baseIsEqual-BvHnKRmD.js → _baseIsEqual-BfXMsuGh.js} +2 -2
  65. package/dist/esm/{_baseIteratee-DFBCJcMA.js → _baseIteratee-kS1-0_xD.js} +3 -3
  66. package/dist/esm/_commonjsHelpers-B85MJLTf.js +5 -0
  67. package/dist/esm/_getAllKeysIn-BKpeslPJ.js +113 -0
  68. package/dist/esm/_isIterateeCall-CTcCv8Mb.js +69 -0
  69. package/dist/esm/cloneDeep-BXAw5H-1.js +609 -0
  70. package/dist/esm/{isArrayLikeObject-D7yRwRv4.js → difference-DMAjHh-t.js} +91 -7
  71. package/dist/esm/{focus-trigger-element-6aEStEKM.js → focus-trigger-element-DubROLkE.js} +1 -1
  72. package/dist/esm/{format-BMPGHLQ8.js → format-hTrthuPP.js} +1 -1
  73. package/dist/esm/{index-DJJymEnS.js → index-t4DgGbWS.js} +1 -1
  74. package/dist/esm/{isArrayLike-bWHU4ebg.js → isArrayLike-D1QkaJU2.js} +1 -1
  75. package/dist/esm/{isEmpty-tfwtR2ai.js → isEmpty-DrFXbHWO.js} +2 -2
  76. package/dist/esm/{isEqual-BkQ4Z_9r.js → isEqual-CpaoJ_AF.js} +1 -1
  77. package/dist/esm/lime-elements.js +1 -1
  78. package/dist/esm/limel-badge.entry.js +2 -2
  79. package/dist/esm/limel-breadcrumbs_7.entry.js +2 -3
  80. package/dist/esm/limel-chip_2.entry.js +4 -4
  81. package/dist/esm/limel-circular-progress.entry.js +2 -2
  82. package/dist/esm/limel-code-editor.entry.js +1 -1
  83. package/dist/esm/limel-date-picker.entry.js +3 -3
  84. package/dist/esm/limel-dialog.entry.js +3 -3
  85. package/dist/esm/limel-file-dropzone_2.entry.js +4 -43
  86. package/dist/esm/limel-file-viewer.entry.js +2 -2
  87. package/dist/esm/limel-flatpickr-adapter.entry.js +8 -70
  88. package/dist/esm/limel-form.entry.js +38553 -50307
  89. package/dist/esm/limel-markdown.entry.js +3 -3
  90. package/dist/esm/limel-picker.entry.js +1 -0
  91. package/dist/esm/limel-popover_2.entry.js +2 -3
  92. package/dist/esm/limel-prosemirror-adapter.entry.js +12 -477
  93. package/dist/esm/limel-tab-bar.entry.js +4 -83
  94. package/dist/esm/limel-table.entry.js +14 -269
  95. package/dist/esm/loader.js +1 -1
  96. package/dist/esm/{markdown-parser-CXYHPPe2.js → markdown-parser-D7vLKElE.js} +2 -2
  97. package/dist/esm/{moment-DhvPC9Jt.js → moment-DQRNe8qq.js} +1 -1
  98. package/dist/esm/pickBy-BEA90LIZ.js +195 -0
  99. package/dist/esm/{sv-84mf7Xsv.js → sv-CY-6-yEp.js} +1 -1
  100. package/dist/lime-elements/lime-elements.esm.js +1 -1
  101. package/dist/lime-elements/p-1cb2d781.entry.js +13 -0
  102. package/dist/lime-elements/{p-bd77c457.entry.js → p-2160ff6e.entry.js} +1 -1
  103. package/dist/lime-elements/{p-00d6ccd6.entry.js → p-25ae3a55.entry.js} +5 -5
  104. package/dist/lime-elements/{p-be0cbddb.entry.js → p-374ec191.entry.js} +1 -1
  105. package/dist/lime-elements/p-3a662d7e.entry.js +1 -0
  106. package/dist/lime-elements/{p-f0f5eda1.entry.js → p-41be4893.entry.js} +1 -1
  107. package/dist/lime-elements/{p-c84911e6.entry.js → p-4ad193a2.entry.js} +1 -1
  108. package/dist/lime-elements/{p-dd7a2361.entry.js → p-4ce682cf.entry.js} +3 -3
  109. package/dist/lime-elements/{p-eeae0ef6.entry.js → p-5ee484a7.entry.js} +4 -4
  110. package/dist/lime-elements/{p-b1d6553c.entry.js → p-77abb595.entry.js} +1 -1
  111. package/dist/lime-elements/p-8065425a.entry.js +1 -0
  112. package/dist/lime-elements/{p-77ba0f66.entry.js → p-8299af78.entry.js} +1 -1
  113. package/dist/lime-elements/{p-87c5e951.entry.js → p-8c7a7003.entry.js} +1 -1
  114. package/dist/lime-elements/{p-ce20d720.entry.js → p-97c401f1.entry.js} +1 -1
  115. package/dist/lime-elements/p-9a378cf0.entry.js +1 -0
  116. package/dist/lime-elements/p-B3zCFNAw.js +1 -0
  117. package/dist/lime-elements/p-B6bNnxRu.js +1 -0
  118. package/dist/lime-elements/p-B85MJLTf.js +1 -0
  119. package/dist/lime-elements/p-BCMRfUKp.js +1 -0
  120. package/dist/lime-elements/p-BbU4FGNT.js +1 -0
  121. package/dist/lime-elements/p-Bp0tNo1s.js +1 -0
  122. package/dist/lime-elements/{p-DpyWBa_Z.js → p-Bt64o80S.js} +1 -1
  123. package/dist/lime-elements/{p-BqiDn_Sf.js → p-BvDmWgCs.js} +1 -1
  124. package/dist/lime-elements/p-CMjGNANG.js +1 -0
  125. package/dist/lime-elements/p-DFWcgJ_i.js +1 -0
  126. package/dist/lime-elements/{p-B4YDb6f3.js → p-DJvGLFul.js} +1 -1
  127. package/dist/lime-elements/p-DTXIk0fN.js +1 -0
  128. package/dist/lime-elements/{p-BgPHaiMH.js → p-D_uMnX5g.js} +1 -1
  129. package/dist/lime-elements/{p-g3InYy9F.js → p-DdYOzHlg.js} +1 -1
  130. package/dist/lime-elements/{p-ndpPJpml.js → p-DsDkl4Sy.js} +1 -1
  131. package/dist/lime-elements/p-UGKt6Ywx.js +1 -0
  132. package/dist/lime-elements/p-afcf580c.entry.js +16 -0
  133. package/dist/lime-elements/p-b57b08b6.entry.js +1 -0
  134. package/dist/lime-elements/p-v6b303K5.js +1 -0
  135. package/dist/lime-elements/p-xQsJdKrq.js +1 -0
  136. package/dist/lime-elements/{p-BYx8mudw.js → p-zo6O9LC9.js} +2 -2
  137. package/dist/types/components/form/adapters/widget-adapter.d.ts +3 -2
  138. package/dist/types/components/form/fields/array-field.d.ts +11 -19
  139. package/dist/types/components/form/fields/object-field.d.ts +2 -2
  140. package/dist/types/components/form/fields/schema-field.d.ts +5 -18
  141. package/dist/types/components/form/form.d.ts +4 -8
  142. package/dist/types/components/form/form.test-schemas.d.ts +30 -0
  143. package/dist/types/components/form/row/row-context.d.ts +2 -0
  144. package/dist/types/components/form/templates/array-context.d.ts +7 -0
  145. package/dist/types/components/form/templates/array-field-collapsible-item.d.ts +7 -11
  146. package/dist/types/components/form/templates/array-field-item.d.ts +6 -0
  147. package/dist/types/components/form/templates/array-field-simple-item.d.ts +7 -9
  148. package/dist/types/components/form/templates/array-field.d.ts +7 -8
  149. package/dist/types/components/form/templates/index.d.ts +1 -0
  150. package/dist/types/components/form/templates/object-field.d.ts +6 -1
  151. package/dist/types/components/form/templates/types.d.ts +2 -4
  152. package/dist/types/components/form/validation-display.d.ts +60 -0
  153. package/dist/types/components/form/validator.d.ts +6 -0
  154. package/dist/types/components/form/widgets/code-editor.d.ts +1 -1
  155. package/dist/types/components/form/widgets/types.d.ts +1 -1
  156. package/dist/types/components/table/table.d.ts +8 -8
  157. package/package.json +4 -2
  158. package/dist/cjs/_baseAssignValue-BJgt6T7z.js +0 -27
  159. package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +0 -10
  160. package/dist/cjs/_getPrototype-BK9cL-57.js +0 -8
  161. package/dist/cjs/negate-Bg3SqQh6.js +0 -42
  162. package/dist/collection/components/form/fields/types.js +0 -1
  163. package/dist/collection/components/form/schema-cache.js +0 -66
  164. package/dist/esm/_baseAssignValue-C8Uwn8zr.js +0 -25
  165. package/dist/esm/_commonjsHelpers-BFTU3MAI.js +0 -7
  166. package/dist/esm/_getPrototype-jV9gkkJy.js +0 -6
  167. package/dist/esm/negate-ooVD-6_a.js +0 -40
  168. package/dist/lime-elements/p-45dfcaf3.entry.js +0 -1
  169. package/dist/lime-elements/p-5db2d069.entry.js +0 -1
  170. package/dist/lime-elements/p-9728aa4a.entry.js +0 -1
  171. package/dist/lime-elements/p-BFTU3MAI.js +0 -1
  172. package/dist/lime-elements/p-BlJd1RC5.js +0 -1
  173. package/dist/lime-elements/p-C6SEjICu.js +0 -1
  174. package/dist/lime-elements/p-CqEHNkif.js +0 -1
  175. package/dist/lime-elements/p-Cs5T63LB.js +0 -1
  176. package/dist/lime-elements/p-Cw1B5fXE.js +0 -1
  177. package/dist/lime-elements/p-DKxusNKT.js +0 -1
  178. package/dist/lime-elements/p-DrjUjEz3.js +0 -1
  179. package/dist/lime-elements/p-DzlmgobW.js +0 -1
  180. package/dist/lime-elements/p-ZcW3uvZL.js +0 -1
  181. package/dist/lime-elements/p-a4a09ce9.entry.js +0 -7
  182. package/dist/lime-elements/p-ad9cb573.entry.js +0 -1
  183. package/dist/lime-elements/p-c4e2885d.entry.js +0 -16
  184. package/dist/lime-elements/p-ooVD-6_a.js +0 -1
  185. package/dist/types/components/form/fields/types.d.ts +0 -41
  186. package/dist/types/components/form/schema-cache.d.ts +0 -17
@@ -0,0 +1,609 @@
1
+ import { k as keys, m as getSymbols, U as Uint8Array, j as isPrototype, h as getTag, n as baseUnary, o as nodeUtil, i as isBuffer, S as Stack, p as getAllKeys } from './_baseIsEqual-BfXMsuGh.js';
2
+ import { b as baseAssignValue, a as assignValue } from './_assignValue-DOEO9byf.js';
3
+ import { k as keysIn, b as getSymbolsIn, g as getPrototype, a as getAllKeysIn } from './_getAllKeysIn-BKpeslPJ.js';
4
+ import { i as isObject, r as root, S as Symbol } from './isObject-BJQylLSL.js';
5
+ import { i as isArray } from './isArray-B8VKuhvH.js';
6
+ import { i as isObjectLike } from './isObjectLike-oiMYqRQ0.js';
7
+
8
+ /** Built-in value references. */
9
+ var objectCreate = Object.create;
10
+
11
+ /**
12
+ * The base implementation of `_.create` without support for assigning
13
+ * properties to the created object.
14
+ *
15
+ * @private
16
+ * @param {Object} proto The object to inherit from.
17
+ * @returns {Object} Returns the new object.
18
+ */
19
+ var baseCreate = (function() {
20
+ function object() {}
21
+ return function(proto) {
22
+ if (!isObject(proto)) {
23
+ return {};
24
+ }
25
+ if (objectCreate) {
26
+ return objectCreate(proto);
27
+ }
28
+ object.prototype = proto;
29
+ var result = new object;
30
+ object.prototype = undefined;
31
+ return result;
32
+ };
33
+ }());
34
+
35
+ /**
36
+ * Copies the values of `source` to `array`.
37
+ *
38
+ * @private
39
+ * @param {Array} source The array to copy values from.
40
+ * @param {Array} [array=[]] The array to copy values to.
41
+ * @returns {Array} Returns `array`.
42
+ */
43
+ function copyArray(source, array) {
44
+ var index = -1,
45
+ length = source.length;
46
+
47
+ array || (array = Array(length));
48
+ while (++index < length) {
49
+ array[index] = source[index];
50
+ }
51
+ return array;
52
+ }
53
+
54
+ /**
55
+ * A specialized version of `_.forEach` for arrays without support for
56
+ * iteratee shorthands.
57
+ *
58
+ * @private
59
+ * @param {Array} [array] The array to iterate over.
60
+ * @param {Function} iteratee The function invoked per iteration.
61
+ * @returns {Array} Returns `array`.
62
+ */
63
+ function arrayEach(array, iteratee) {
64
+ var index = -1,
65
+ length = array == null ? 0 : array.length;
66
+
67
+ while (++index < length) {
68
+ if (iteratee(array[index], index, array) === false) {
69
+ break;
70
+ }
71
+ }
72
+ return array;
73
+ }
74
+
75
+ /**
76
+ * Copies properties of `source` to `object`.
77
+ *
78
+ * @private
79
+ * @param {Object} source The object to copy properties from.
80
+ * @param {Array} props The property identifiers to copy.
81
+ * @param {Object} [object={}] The object to copy properties to.
82
+ * @param {Function} [customizer] The function to customize copied values.
83
+ * @returns {Object} Returns `object`.
84
+ */
85
+ function copyObject(source, props, object, customizer) {
86
+ var isNew = !object;
87
+ object || (object = {});
88
+
89
+ var index = -1,
90
+ length = props.length;
91
+
92
+ while (++index < length) {
93
+ var key = props[index];
94
+
95
+ var newValue = undefined;
96
+
97
+ if (newValue === undefined) {
98
+ newValue = source[key];
99
+ }
100
+ if (isNew) {
101
+ baseAssignValue(object, key, newValue);
102
+ } else {
103
+ assignValue(object, key, newValue);
104
+ }
105
+ }
106
+ return object;
107
+ }
108
+
109
+ /**
110
+ * The base implementation of `_.assign` without support for multiple sources
111
+ * or `customizer` functions.
112
+ *
113
+ * @private
114
+ * @param {Object} object The destination object.
115
+ * @param {Object} source The source object.
116
+ * @returns {Object} Returns `object`.
117
+ */
118
+ function baseAssign(object, source) {
119
+ return object && copyObject(source, keys(source), object);
120
+ }
121
+
122
+ /**
123
+ * The base implementation of `_.assignIn` without support for multiple sources
124
+ * or `customizer` functions.
125
+ *
126
+ * @private
127
+ * @param {Object} object The destination object.
128
+ * @param {Object} source The source object.
129
+ * @returns {Object} Returns `object`.
130
+ */
131
+ function baseAssignIn(object, source) {
132
+ return object && copyObject(source, keysIn(source), object);
133
+ }
134
+
135
+ /** Detect free variable `exports`. */
136
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
137
+
138
+ /** Detect free variable `module`. */
139
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
140
+
141
+ /** Detect the popular CommonJS extension `module.exports`. */
142
+ var moduleExports = freeModule && freeModule.exports === freeExports;
143
+
144
+ /** Built-in value references. */
145
+ var Buffer = moduleExports ? root.Buffer : undefined,
146
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
147
+
148
+ /**
149
+ * Creates a clone of `buffer`.
150
+ *
151
+ * @private
152
+ * @param {Buffer} buffer The buffer to clone.
153
+ * @param {boolean} [isDeep] Specify a deep clone.
154
+ * @returns {Buffer} Returns the cloned buffer.
155
+ */
156
+ function cloneBuffer(buffer, isDeep) {
157
+ if (isDeep) {
158
+ return buffer.slice();
159
+ }
160
+ var length = buffer.length,
161
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
162
+
163
+ buffer.copy(result);
164
+ return result;
165
+ }
166
+
167
+ /**
168
+ * Copies own symbols of `source` to `object`.
169
+ *
170
+ * @private
171
+ * @param {Object} source The object to copy symbols from.
172
+ * @param {Object} [object={}] The object to copy symbols to.
173
+ * @returns {Object} Returns `object`.
174
+ */
175
+ function copySymbols(source, object) {
176
+ return copyObject(source, getSymbols(source), object);
177
+ }
178
+
179
+ /**
180
+ * Copies own and inherited symbols of `source` to `object`.
181
+ *
182
+ * @private
183
+ * @param {Object} source The object to copy symbols from.
184
+ * @param {Object} [object={}] The object to copy symbols to.
185
+ * @returns {Object} Returns `object`.
186
+ */
187
+ function copySymbolsIn(source, object) {
188
+ return copyObject(source, getSymbolsIn(source), object);
189
+ }
190
+
191
+ /** Used for built-in method references. */
192
+ var objectProto = Object.prototype;
193
+
194
+ /** Used to check objects for own properties. */
195
+ var hasOwnProperty = objectProto.hasOwnProperty;
196
+
197
+ /**
198
+ * Initializes an array clone.
199
+ *
200
+ * @private
201
+ * @param {Array} array The array to clone.
202
+ * @returns {Array} Returns the initialized clone.
203
+ */
204
+ function initCloneArray(array) {
205
+ var length = array.length,
206
+ result = new array.constructor(length);
207
+
208
+ // Add properties assigned by `RegExp#exec`.
209
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
210
+ result.index = array.index;
211
+ result.input = array.input;
212
+ }
213
+ return result;
214
+ }
215
+
216
+ /**
217
+ * Creates a clone of `arrayBuffer`.
218
+ *
219
+ * @private
220
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
221
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
222
+ */
223
+ function cloneArrayBuffer(arrayBuffer) {
224
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
225
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
226
+ return result;
227
+ }
228
+
229
+ /**
230
+ * Creates a clone of `dataView`.
231
+ *
232
+ * @private
233
+ * @param {Object} dataView The data view to clone.
234
+ * @param {boolean} [isDeep] Specify a deep clone.
235
+ * @returns {Object} Returns the cloned data view.
236
+ */
237
+ function cloneDataView(dataView, isDeep) {
238
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
239
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
240
+ }
241
+
242
+ /** Used to match `RegExp` flags from their coerced string values. */
243
+ var reFlags = /\w*$/;
244
+
245
+ /**
246
+ * Creates a clone of `regexp`.
247
+ *
248
+ * @private
249
+ * @param {Object} regexp The regexp to clone.
250
+ * @returns {Object} Returns the cloned regexp.
251
+ */
252
+ function cloneRegExp(regexp) {
253
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
254
+ result.lastIndex = regexp.lastIndex;
255
+ return result;
256
+ }
257
+
258
+ /** Used to convert symbols to primitives and strings. */
259
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
260
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
261
+
262
+ /**
263
+ * Creates a clone of the `symbol` object.
264
+ *
265
+ * @private
266
+ * @param {Object} symbol The symbol object to clone.
267
+ * @returns {Object} Returns the cloned symbol object.
268
+ */
269
+ function cloneSymbol(symbol) {
270
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
271
+ }
272
+
273
+ /**
274
+ * Creates a clone of `typedArray`.
275
+ *
276
+ * @private
277
+ * @param {Object} typedArray The typed array to clone.
278
+ * @param {boolean} [isDeep] Specify a deep clone.
279
+ * @returns {Object} Returns the cloned typed array.
280
+ */
281
+ function cloneTypedArray(typedArray, isDeep) {
282
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
283
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
284
+ }
285
+
286
+ /** `Object#toString` result references. */
287
+ var boolTag$1 = '[object Boolean]',
288
+ dateTag$1 = '[object Date]',
289
+ mapTag$2 = '[object Map]',
290
+ numberTag$1 = '[object Number]',
291
+ regexpTag$1 = '[object RegExp]',
292
+ setTag$2 = '[object Set]',
293
+ stringTag$1 = '[object String]',
294
+ symbolTag$1 = '[object Symbol]';
295
+
296
+ var arrayBufferTag$1 = '[object ArrayBuffer]',
297
+ dataViewTag$1 = '[object DataView]',
298
+ float32Tag$1 = '[object Float32Array]',
299
+ float64Tag$1 = '[object Float64Array]',
300
+ int8Tag$1 = '[object Int8Array]',
301
+ int16Tag$1 = '[object Int16Array]',
302
+ int32Tag$1 = '[object Int32Array]',
303
+ uint8Tag$1 = '[object Uint8Array]',
304
+ uint8ClampedTag$1 = '[object Uint8ClampedArray]',
305
+ uint16Tag$1 = '[object Uint16Array]',
306
+ uint32Tag$1 = '[object Uint32Array]';
307
+
308
+ /**
309
+ * Initializes an object clone based on its `toStringTag`.
310
+ *
311
+ * **Note:** This function only supports cloning values with tags of
312
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
313
+ *
314
+ * @private
315
+ * @param {Object} object The object to clone.
316
+ * @param {string} tag The `toStringTag` of the object to clone.
317
+ * @param {boolean} [isDeep] Specify a deep clone.
318
+ * @returns {Object} Returns the initialized clone.
319
+ */
320
+ function initCloneByTag(object, tag, isDeep) {
321
+ var Ctor = object.constructor;
322
+ switch (tag) {
323
+ case arrayBufferTag$1:
324
+ return cloneArrayBuffer(object);
325
+
326
+ case boolTag$1:
327
+ case dateTag$1:
328
+ return new Ctor(+object);
329
+
330
+ case dataViewTag$1:
331
+ return cloneDataView(object, isDeep);
332
+
333
+ case float32Tag$1: case float64Tag$1:
334
+ case int8Tag$1: case int16Tag$1: case int32Tag$1:
335
+ case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
336
+ return cloneTypedArray(object, isDeep);
337
+
338
+ case mapTag$2:
339
+ return new Ctor;
340
+
341
+ case numberTag$1:
342
+ case stringTag$1:
343
+ return new Ctor(object);
344
+
345
+ case regexpTag$1:
346
+ return cloneRegExp(object);
347
+
348
+ case setTag$2:
349
+ return new Ctor;
350
+
351
+ case symbolTag$1:
352
+ return cloneSymbol(object);
353
+ }
354
+ }
355
+
356
+ /**
357
+ * Initializes an object clone.
358
+ *
359
+ * @private
360
+ * @param {Object} object The object to clone.
361
+ * @returns {Object} Returns the initialized clone.
362
+ */
363
+ function initCloneObject(object) {
364
+ return (typeof object.constructor == 'function' && !isPrototype(object))
365
+ ? baseCreate(getPrototype(object))
366
+ : {};
367
+ }
368
+
369
+ /** `Object#toString` result references. */
370
+ var mapTag$1 = '[object Map]';
371
+
372
+ /**
373
+ * The base implementation of `_.isMap` without Node.js optimizations.
374
+ *
375
+ * @private
376
+ * @param {*} value The value to check.
377
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
378
+ */
379
+ function baseIsMap(value) {
380
+ return isObjectLike(value) && getTag(value) == mapTag$1;
381
+ }
382
+
383
+ /* Node.js helper references. */
384
+ var nodeIsMap = nodeUtil && nodeUtil.isMap;
385
+
386
+ /**
387
+ * Checks if `value` is classified as a `Map` object.
388
+ *
389
+ * @static
390
+ * @memberOf _
391
+ * @since 4.3.0
392
+ * @category Lang
393
+ * @param {*} value The value to check.
394
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
395
+ * @example
396
+ *
397
+ * _.isMap(new Map);
398
+ * // => true
399
+ *
400
+ * _.isMap(new WeakMap);
401
+ * // => false
402
+ */
403
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
404
+
405
+ /** `Object#toString` result references. */
406
+ var setTag$1 = '[object Set]';
407
+
408
+ /**
409
+ * The base implementation of `_.isSet` without Node.js optimizations.
410
+ *
411
+ * @private
412
+ * @param {*} value The value to check.
413
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
414
+ */
415
+ function baseIsSet(value) {
416
+ return isObjectLike(value) && getTag(value) == setTag$1;
417
+ }
418
+
419
+ /* Node.js helper references. */
420
+ var nodeIsSet = nodeUtil && nodeUtil.isSet;
421
+
422
+ /**
423
+ * Checks if `value` is classified as a `Set` object.
424
+ *
425
+ * @static
426
+ * @memberOf _
427
+ * @since 4.3.0
428
+ * @category Lang
429
+ * @param {*} value The value to check.
430
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
431
+ * @example
432
+ *
433
+ * _.isSet(new Set);
434
+ * // => true
435
+ *
436
+ * _.isSet(new WeakSet);
437
+ * // => false
438
+ */
439
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
440
+
441
+ /** Used to compose bitmasks for cloning. */
442
+ var CLONE_DEEP_FLAG$1 = 1,
443
+ CLONE_FLAT_FLAG = 2,
444
+ CLONE_SYMBOLS_FLAG$1 = 4;
445
+
446
+ /** `Object#toString` result references. */
447
+ var argsTag = '[object Arguments]',
448
+ arrayTag = '[object Array]',
449
+ boolTag = '[object Boolean]',
450
+ dateTag = '[object Date]',
451
+ errorTag = '[object Error]',
452
+ funcTag = '[object Function]',
453
+ genTag = '[object GeneratorFunction]',
454
+ mapTag = '[object Map]',
455
+ numberTag = '[object Number]',
456
+ objectTag = '[object Object]',
457
+ regexpTag = '[object RegExp]',
458
+ setTag = '[object Set]',
459
+ stringTag = '[object String]',
460
+ symbolTag = '[object Symbol]',
461
+ weakMapTag = '[object WeakMap]';
462
+
463
+ var arrayBufferTag = '[object ArrayBuffer]',
464
+ dataViewTag = '[object DataView]',
465
+ float32Tag = '[object Float32Array]',
466
+ float64Tag = '[object Float64Array]',
467
+ int8Tag = '[object Int8Array]',
468
+ int16Tag = '[object Int16Array]',
469
+ int32Tag = '[object Int32Array]',
470
+ uint8Tag = '[object Uint8Array]',
471
+ uint8ClampedTag = '[object Uint8ClampedArray]',
472
+ uint16Tag = '[object Uint16Array]',
473
+ uint32Tag = '[object Uint32Array]';
474
+
475
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
476
+ var cloneableTags = {};
477
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
478
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
479
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
480
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
481
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
482
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
483
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
484
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
485
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
486
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
487
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
488
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
489
+ cloneableTags[weakMapTag] = false;
490
+
491
+ /**
492
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
493
+ * traversed objects.
494
+ *
495
+ * @private
496
+ * @param {*} value The value to clone.
497
+ * @param {boolean} bitmask The bitmask flags.
498
+ * 1 - Deep clone
499
+ * 2 - Flatten inherited properties
500
+ * 4 - Clone symbols
501
+ * @param {Function} [customizer] The function to customize cloning.
502
+ * @param {string} [key] The key of `value`.
503
+ * @param {Object} [object] The parent object of `value`.
504
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
505
+ * @returns {*} Returns the cloned value.
506
+ */
507
+ function baseClone(value, bitmask, customizer, key, object, stack) {
508
+ var result,
509
+ isDeep = bitmask & CLONE_DEEP_FLAG$1,
510
+ isFlat = bitmask & CLONE_FLAT_FLAG,
511
+ isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
512
+
513
+ if (customizer) {
514
+ result = object ? customizer(value, key, object, stack) : customizer(value);
515
+ }
516
+ if (result !== undefined) {
517
+ return result;
518
+ }
519
+ if (!isObject(value)) {
520
+ return value;
521
+ }
522
+ var isArr = isArray(value);
523
+ if (isArr) {
524
+ result = initCloneArray(value);
525
+ if (!isDeep) {
526
+ return copyArray(value, result);
527
+ }
528
+ } else {
529
+ var tag = getTag(value),
530
+ isFunc = tag == funcTag || tag == genTag;
531
+
532
+ if (isBuffer(value)) {
533
+ return cloneBuffer(value, isDeep);
534
+ }
535
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
536
+ result = (isFlat || isFunc) ? {} : initCloneObject(value);
537
+ if (!isDeep) {
538
+ return isFlat
539
+ ? copySymbolsIn(value, baseAssignIn(result, value))
540
+ : copySymbols(value, baseAssign(result, value));
541
+ }
542
+ } else {
543
+ if (!cloneableTags[tag]) {
544
+ return object ? value : {};
545
+ }
546
+ result = initCloneByTag(value, tag, isDeep);
547
+ }
548
+ }
549
+ // Check for circular references and return its corresponding clone.
550
+ stack || (stack = new Stack);
551
+ var stacked = stack.get(value);
552
+ if (stacked) {
553
+ return stacked;
554
+ }
555
+ stack.set(value, result);
556
+
557
+ if (isSet(value)) {
558
+ value.forEach(function(subValue) {
559
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
560
+ });
561
+ } else if (isMap(value)) {
562
+ value.forEach(function(subValue, key) {
563
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
564
+ });
565
+ }
566
+
567
+ var keysFunc = isFull
568
+ ? (isFlat ? getAllKeysIn : getAllKeys)
569
+ : (isFlat ? keysIn : keys);
570
+
571
+ var props = isArr ? undefined : keysFunc(value);
572
+ arrayEach(props || value, function(subValue, key) {
573
+ if (props) {
574
+ key = subValue;
575
+ subValue = value[key];
576
+ }
577
+ // Recursively populate clone (susceptible to call stack limits).
578
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
579
+ });
580
+ return result;
581
+ }
582
+
583
+ /** Used to compose bitmasks for cloning. */
584
+ var CLONE_DEEP_FLAG = 1,
585
+ CLONE_SYMBOLS_FLAG = 4;
586
+
587
+ /**
588
+ * This method is like `_.clone` except that it recursively clones `value`.
589
+ *
590
+ * @static
591
+ * @memberOf _
592
+ * @since 1.0.0
593
+ * @category Lang
594
+ * @param {*} value The value to recursively clone.
595
+ * @returns {*} Returns the deep cloned value.
596
+ * @see _.clone
597
+ * @example
598
+ *
599
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
600
+ *
601
+ * var deep = _.cloneDeep(objects);
602
+ * console.log(deep[0] === objects[0]);
603
+ * // => false
604
+ */
605
+ function cloneDeep(value) {
606
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
607
+ }
608
+
609
+ export { copyArray as a, cloneBuffer as b, copyObject as c, cloneTypedArray as d, arrayEach as e, baseClone as f, baseCreate as g, cloneDeep as h, initCloneObject as i };