@dso-toolkit/core 58.3.0 → 59.0.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 (121) hide show
  1. package/dist/cjs/_commonjsHelpers-68cdf74f.js +7 -0
  2. package/dist/cjs/_commonjsHelpers-68cdf74f.js.map +1 -0
  3. package/dist/cjs/dso-alert_5.cjs.entry.js +497 -46
  4. package/dist/cjs/dso-alert_5.cjs.entry.js.map +1 -1
  5. package/dist/cjs/dso-annotation-output_3.cjs.entry.js +6 -2
  6. package/dist/cjs/dso-annotation-output_3.cjs.entry.js.map +1 -1
  7. package/dist/cjs/dso-modal.cjs.entry.js +1 -1
  8. package/dist/cjs/dso-modal.cjs.entry.js.map +1 -1
  9. package/dist/cjs/dso-table.cjs.entry.js +1 -1
  10. package/dist/cjs/dso-table.cjs.entry.js.map +1 -1
  11. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  12. package/dist/cjs/dso-tooltip.cjs.entry.js +1 -1
  13. package/dist/cjs/dso-tooltip.cjs.entry.js.map +1 -1
  14. package/dist/cjs/dsot-document-component-demo.cjs.entry.js +1688 -41
  15. package/dist/cjs/dsot-document-component-demo.cjs.entry.js.map +1 -1
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/collection/collection-manifest.json +1 -1
  18. package/dist/collection/components/document-component/document-component.css +687 -13
  19. package/dist/collection/components/document-component/document-component.js +31 -7
  20. package/dist/collection/components/document-component/document-component.js.map +1 -1
  21. package/dist/collection/components/document-component/document-component.models.js +2 -0
  22. package/dist/collection/components/document-component/document-component.models.js.map +1 -0
  23. package/dist/collection/components/document-component-demo/document-component.demo.css +11 -0
  24. package/dist/collection/components/document-component-demo/document-component.demo.js +235 -0
  25. package/dist/collection/components/document-component-demo/document-component.demo.js.map +1 -0
  26. package/dist/collection/components/modal/modal.css +3 -3
  27. package/dist/collection/components/ozon-content/nodes/al.node.js +24 -7
  28. package/dist/collection/components/ozon-content/nodes/al.node.js.map +1 -1
  29. package/dist/collection/components/ozon-content/nodes/ext-ref.node.js +3 -1
  30. package/dist/collection/components/ozon-content/nodes/ext-ref.node.js.map +1 -1
  31. package/dist/collection/components/ozon-content/nodes/nieuwe-tekst.node.js +1 -1
  32. package/dist/collection/components/ozon-content/nodes/nieuwe-tekst.node.js.map +1 -1
  33. package/dist/collection/components/ozon-content/nodes/opschrift.node.js +9 -1
  34. package/dist/collection/components/ozon-content/nodes/opschrift.node.js.map +1 -1
  35. package/dist/collection/components/ozon-content/nodes/table.node/table.node.js +1 -2
  36. package/dist/collection/components/ozon-content/nodes/table.node/table.node.js.map +1 -1
  37. package/dist/collection/components/ozon-content/nodes/verwijderde-tekst.node.js +1 -1
  38. package/dist/collection/components/ozon-content/nodes/verwijderde-tekst.node.js.map +1 -1
  39. package/dist/collection/components/ozon-content/ozon-content-context.interface.js.map +1 -1
  40. package/dist/collection/components/ozon-content/ozon-content-mapper.js +11 -9
  41. package/dist/collection/components/ozon-content/ozon-content-mapper.js.map +1 -1
  42. package/dist/collection/components/ozon-content/ozon-content-node-context.interface.js.map +1 -1
  43. package/dist/collection/components/ozon-content/ozon-content.css +1100 -35
  44. package/dist/collection/components/ozon-content/ozon-content.interfaces.js.map +1 -1
  45. package/dist/collection/components/ozon-content/ozon-content.js +17 -83
  46. package/dist/collection/components/ozon-content/ozon-content.js.map +1 -1
  47. package/dist/collection/components/table/table.css +669 -97
  48. package/dist/collection/components/tooltip/tooltip.css +0 -8
  49. package/dist/components/document-component.js +6 -2
  50. package/dist/components/document-component.js.map +1 -1
  51. package/dist/components/dso-modal.js +1 -1
  52. package/dist/components/dso-modal.js.map +1 -1
  53. package/dist/components/dso-table.js +1 -1
  54. package/dist/components/dso-table.js.map +1 -1
  55. package/dist/components/dsot-document-component-demo.js +1694 -45
  56. package/dist/components/dsot-document-component-demo.js.map +1 -1
  57. package/dist/components/index.d.ts +1 -1
  58. package/dist/components/ozon-content.js +500 -50
  59. package/dist/components/ozon-content.js.map +1 -1
  60. package/dist/components/tooltip.js +1 -1
  61. package/dist/components/tooltip.js.map +1 -1
  62. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  63. package/dist/dso-toolkit/dso-toolkit.esm.js.map +1 -1
  64. package/dist/dso-toolkit/p-2401e7f9.entry.js +2 -0
  65. package/dist/dso-toolkit/p-2401e7f9.entry.js.map +1 -0
  66. package/dist/dso-toolkit/p-2ab99812.entry.js +2 -0
  67. package/dist/dso-toolkit/{p-a63c82a4.entry.js.map → p-2ab99812.entry.js.map} +1 -1
  68. package/dist/dso-toolkit/p-432df09a.entry.js +2 -0
  69. package/dist/dso-toolkit/p-432df09a.entry.js.map +1 -0
  70. package/dist/dso-toolkit/p-4573c419.js +2 -0
  71. package/dist/dso-toolkit/p-4573c419.js.map +1 -0
  72. package/dist/dso-toolkit/p-47e77e24.entry.js +2 -0
  73. package/dist/dso-toolkit/p-47e77e24.entry.js.map +1 -0
  74. package/dist/dso-toolkit/p-ab1f0511.entry.js +2 -0
  75. package/dist/dso-toolkit/p-ab1f0511.entry.js.map +1 -0
  76. package/dist/dso-toolkit/p-ad44136d.entry.js +2 -0
  77. package/dist/dso-toolkit/p-ad44136d.entry.js.map +1 -0
  78. package/dist/esm/_commonjsHelpers-1c8beb5f.js +5 -0
  79. package/dist/esm/_commonjsHelpers-1c8beb5f.js.map +1 -0
  80. package/dist/esm/dso-alert_5.entry.js +498 -47
  81. package/dist/esm/dso-alert_5.entry.js.map +1 -1
  82. package/dist/esm/dso-annotation-output_3.entry.js +6 -2
  83. package/dist/esm/dso-annotation-output_3.entry.js.map +1 -1
  84. package/dist/esm/dso-modal.entry.js +1 -1
  85. package/dist/esm/dso-modal.entry.js.map +1 -1
  86. package/dist/esm/dso-table.entry.js +1 -1
  87. package/dist/esm/dso-table.entry.js.map +1 -1
  88. package/dist/esm/dso-toolkit.js +1 -1
  89. package/dist/esm/dso-tooltip.entry.js +1 -1
  90. package/dist/esm/dso-tooltip.entry.js.map +1 -1
  91. package/dist/esm/dsot-document-component-demo.entry.js +1689 -42
  92. package/dist/esm/dsot-document-component-demo.entry.js.map +1 -1
  93. package/dist/esm/loader.js +1 -1
  94. package/dist/types/components/document-component/document-component.d.ts +6 -1
  95. package/dist/types/components/document-component/document-component.models.d.ts +14 -0
  96. package/dist/types/components/document-component-demo/document-component.demo.d.ts +64 -0
  97. package/dist/types/components/ozon-content/nodes/al.node.d.ts +1 -1
  98. package/dist/types/components/ozon-content/ozon-content-context.interface.d.ts +3 -2
  99. package/dist/types/components/ozon-content/ozon-content-mapper.d.ts +0 -1
  100. package/dist/types/components/ozon-content/ozon-content-node-context.interface.d.ts +3 -2
  101. package/dist/types/components/ozon-content/ozon-content.d.ts +4 -25
  102. package/dist/types/components/ozon-content/ozon-content.interfaces.d.ts +1 -4
  103. package/dist/types/components.d.ts +41 -25
  104. package/package.json +8 -2
  105. package/dist/collection/components/document-component/document-component.demo.js +0 -112
  106. package/dist/collection/components/document-component/document-component.demo.js.map +0 -1
  107. package/dist/collection/components/document-component/document-component.types.js +0 -2
  108. package/dist/collection/components/document-component/document-component.types.js.map +0 -1
  109. package/dist/dso-toolkit/p-42ba2c81.entry.js +0 -2
  110. package/dist/dso-toolkit/p-42ba2c81.entry.js.map +0 -1
  111. package/dist/dso-toolkit/p-48d76094.entry.js +0 -2
  112. package/dist/dso-toolkit/p-48d76094.entry.js.map +0 -1
  113. package/dist/dso-toolkit/p-5c5e43d3.entry.js +0 -2
  114. package/dist/dso-toolkit/p-5c5e43d3.entry.js.map +0 -1
  115. package/dist/dso-toolkit/p-8af61320.entry.js +0 -2
  116. package/dist/dso-toolkit/p-8af61320.entry.js.map +0 -1
  117. package/dist/dso-toolkit/p-9a3f154b.entry.js +0 -2
  118. package/dist/dso-toolkit/p-9a3f154b.entry.js.map +0 -1
  119. package/dist/dso-toolkit/p-a63c82a4.entry.js +0 -2
  120. package/dist/types/components/document-component/document-component.demo.d.ts +0 -40
  121. package/dist/types/components/document-component/document-component.types.d.ts +0 -8
@@ -1,63 +1,1701 @@
1
- import { r as registerInstance, h, F as Fragment } from './index-f82ed648.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-f82ed648.js';
2
+ import { c as commonjsGlobal } from './_commonjsHelpers-1c8beb5f.js';
3
+
4
+ /**
5
+ * lodash (Custom Build) <https://lodash.com/>
6
+ * Build: `lodash modularize exports="npm" -o ./`
7
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
8
+ * Released under MIT license <https://lodash.com/license>
9
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
10
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
11
+ */
12
+
13
+ /** Used as references for various `Number` constants. */
14
+ var INFINITY$1 = 1 / 0,
15
+ MAX_SAFE_INTEGER$1 = 9007199254740991,
16
+ MAX_INTEGER$1 = 1.7976931348623157e+308,
17
+ NAN$1 = 0 / 0;
18
+
19
+ /** `Object#toString` result references. */
20
+ var argsTag = '[object Arguments]',
21
+ funcTag$1 = '[object Function]',
22
+ genTag$1 = '[object GeneratorFunction]',
23
+ mapTag = '[object Map]',
24
+ objectTag = '[object Object]',
25
+ promiseTag = '[object Promise]',
26
+ setTag = '[object Set]',
27
+ stringTag = '[object String]',
28
+ symbolTag$1 = '[object Symbol]',
29
+ weakMapTag = '[object WeakMap]';
30
+
31
+ var dataViewTag = '[object DataView]';
32
+
33
+ /**
34
+ * Used to match `RegExp`
35
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
36
+ */
37
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
38
+
39
+ /** Used to match leading and trailing whitespace. */
40
+ var reTrim$1 = /^\s+|\s+$/g;
41
+
42
+ /** Used to detect bad signed hexadecimal string values. */
43
+ var reIsBadHex$1 = /^[-+]0x[0-9a-f]+$/i;
44
+
45
+ /** Used to detect binary string values. */
46
+ var reIsBinary$1 = /^0b[01]+$/i;
47
+
48
+ /** Used to detect host constructors (Safari). */
49
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
50
+
51
+ /** Used to detect octal string values. */
52
+ var reIsOctal$1 = /^0o[0-7]+$/i;
53
+
54
+ /** Used to detect unsigned integer values. */
55
+ var reIsUint$1 = /^(?:0|[1-9]\d*)$/;
56
+
57
+ /** Used to compose unicode character classes. */
58
+ var rsAstralRange = '\\ud800-\\udfff',
59
+ rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
60
+ rsComboSymbolsRange = '\\u20d0-\\u20f0',
61
+ rsVarRange = '\\ufe0e\\ufe0f';
62
+
63
+ /** Used to compose unicode capture groups. */
64
+ var rsAstral = '[' + rsAstralRange + ']',
65
+ rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
66
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
67
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
68
+ rsNonAstral = '[^' + rsAstralRange + ']',
69
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
70
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
71
+ rsZWJ = '\\u200d';
72
+
73
+ /** Used to compose unicode regexes. */
74
+ var reOptMod = rsModifier + '?',
75
+ rsOptVar = '[' + rsVarRange + ']?',
76
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
77
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
78
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
79
+
80
+ /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
81
+ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
82
+
83
+ /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
84
+ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
85
+
86
+ /** Built-in method references without a dependency on `root`. */
87
+ var freeParseInt$1 = parseInt;
88
+
89
+ /** Detect free variable `global` from Node.js. */
90
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
91
+
92
+ /** Detect free variable `self`. */
93
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
94
+
95
+ /** Used as a reference to the global object. */
96
+ var root = freeGlobal || freeSelf || Function('return this')();
97
+
98
+ /**
99
+ * A specialized version of `_.map` for arrays without support for iteratee
100
+ * shorthands.
101
+ *
102
+ * @private
103
+ * @param {Array} [array] The array to iterate over.
104
+ * @param {Function} iteratee The function invoked per iteration.
105
+ * @returns {Array} Returns the new mapped array.
106
+ */
107
+ function arrayMap(array, iteratee) {
108
+ var index = -1,
109
+ length = array ? array.length : 0,
110
+ result = Array(length);
111
+
112
+ while (++index < length) {
113
+ result[index] = iteratee(array[index], index, array);
114
+ }
115
+ return result;
116
+ }
117
+
118
+ /**
119
+ * Converts an ASCII `string` to an array.
120
+ *
121
+ * @private
122
+ * @param {string} string The string to convert.
123
+ * @returns {Array} Returns the converted array.
124
+ */
125
+ function asciiToArray(string) {
126
+ return string.split('');
127
+ }
128
+
129
+ /**
130
+ * The base implementation of `_.times` without support for iteratee shorthands
131
+ * or max array length checks.
132
+ *
133
+ * @private
134
+ * @param {number} n The number of times to invoke `iteratee`.
135
+ * @param {Function} iteratee The function invoked per iteration.
136
+ * @returns {Array} Returns the array of results.
137
+ */
138
+ function baseTimes(n, iteratee) {
139
+ var index = -1,
140
+ result = Array(n);
141
+
142
+ while (++index < n) {
143
+ result[index] = iteratee(index);
144
+ }
145
+ return result;
146
+ }
147
+
148
+ /**
149
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
150
+ * array of `object` property values corresponding to the property names
151
+ * of `props`.
152
+ *
153
+ * @private
154
+ * @param {Object} object The object to query.
155
+ * @param {Array} props The property names to get values for.
156
+ * @returns {Object} Returns the array of property values.
157
+ */
158
+ function baseValues(object, props) {
159
+ return arrayMap(props, function(key) {
160
+ return object[key];
161
+ });
162
+ }
163
+
164
+ /**
165
+ * Gets the value at `key` of `object`.
166
+ *
167
+ * @private
168
+ * @param {Object} [object] The object to query.
169
+ * @param {string} key The key of the property to get.
170
+ * @returns {*} Returns the property value.
171
+ */
172
+ function getValue(object, key) {
173
+ return object == null ? undefined : object[key];
174
+ }
175
+
176
+ /**
177
+ * Checks if `string` contains Unicode symbols.
178
+ *
179
+ * @private
180
+ * @param {string} string The string to inspect.
181
+ * @returns {boolean} Returns `true` if a symbol is found, else `false`.
182
+ */
183
+ function hasUnicode(string) {
184
+ return reHasUnicode.test(string);
185
+ }
186
+
187
+ /**
188
+ * Checks if `value` is a host object in IE < 9.
189
+ *
190
+ * @private
191
+ * @param {*} value The value to check.
192
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
193
+ */
194
+ function isHostObject(value) {
195
+ // Many host objects are `Object` objects that can coerce to strings
196
+ // despite having improperly defined `toString` methods.
197
+ var result = false;
198
+ if (value != null && typeof value.toString != 'function') {
199
+ try {
200
+ result = !!(value + '');
201
+ } catch (e) {}
202
+ }
203
+ return result;
204
+ }
205
+
206
+ /**
207
+ * Converts `iterator` to an array.
208
+ *
209
+ * @private
210
+ * @param {Object} iterator The iterator to convert.
211
+ * @returns {Array} Returns the converted array.
212
+ */
213
+ function iteratorToArray(iterator) {
214
+ var data,
215
+ result = [];
216
+
217
+ while (!(data = iterator.next()).done) {
218
+ result.push(data.value);
219
+ }
220
+ return result;
221
+ }
222
+
223
+ /**
224
+ * Converts `map` to its key-value pairs.
225
+ *
226
+ * @private
227
+ * @param {Object} map The map to convert.
228
+ * @returns {Array} Returns the key-value pairs.
229
+ */
230
+ function mapToArray(map) {
231
+ var index = -1,
232
+ result = Array(map.size);
233
+
234
+ map.forEach(function(value, key) {
235
+ result[++index] = [key, value];
236
+ });
237
+ return result;
238
+ }
239
+
240
+ /**
241
+ * Creates a unary function that invokes `func` with its argument transformed.
242
+ *
243
+ * @private
244
+ * @param {Function} func The function to wrap.
245
+ * @param {Function} transform The argument transform.
246
+ * @returns {Function} Returns the new function.
247
+ */
248
+ function overArg(func, transform) {
249
+ return function(arg) {
250
+ return func(transform(arg));
251
+ };
252
+ }
253
+
254
+ /**
255
+ * Converts `set` to an array of its values.
256
+ *
257
+ * @private
258
+ * @param {Object} set The set to convert.
259
+ * @returns {Array} Returns the values.
260
+ */
261
+ function setToArray(set) {
262
+ var index = -1,
263
+ result = Array(set.size);
264
+
265
+ set.forEach(function(value) {
266
+ result[++index] = value;
267
+ });
268
+ return result;
269
+ }
270
+
271
+ /**
272
+ * Converts `string` to an array.
273
+ *
274
+ * @private
275
+ * @param {string} string The string to convert.
276
+ * @returns {Array} Returns the converted array.
277
+ */
278
+ function stringToArray(string) {
279
+ return hasUnicode(string)
280
+ ? unicodeToArray(string)
281
+ : asciiToArray(string);
282
+ }
283
+
284
+ /**
285
+ * Converts a Unicode `string` to an array.
286
+ *
287
+ * @private
288
+ * @param {string} string The string to convert.
289
+ * @returns {Array} Returns the converted array.
290
+ */
291
+ function unicodeToArray(string) {
292
+ return string.match(reUnicode) || [];
293
+ }
294
+
295
+ /** Used for built-in method references. */
296
+ var funcProto = Function.prototype,
297
+ objectProto$1 = Object.prototype;
298
+
299
+ /** Used to detect overreaching core-js shims. */
300
+ var coreJsData = root['__core-js_shared__'];
301
+
302
+ /** Used to detect methods masquerading as native. */
303
+ var maskSrcKey = (function() {
304
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
305
+ return uid ? ('Symbol(src)_1.' + uid) : '';
306
+ }());
307
+
308
+ /** Used to resolve the decompiled source of functions. */
309
+ var funcToString = funcProto.toString;
310
+
311
+ /** Used to check objects for own properties. */
312
+ var hasOwnProperty = objectProto$1.hasOwnProperty;
313
+
314
+ /**
315
+ * Used to resolve the
316
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
317
+ * of values.
318
+ */
319
+ var objectToString$1 = objectProto$1.toString;
320
+
321
+ /** Used to detect if a method is native. */
322
+ var reIsNative = RegExp('^' +
323
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
324
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
325
+ );
326
+
327
+ /** Built-in value references. */
328
+ var Symbol = root.Symbol,
329
+ iteratorSymbol = Symbol ? Symbol.iterator : undefined,
330
+ propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
331
+
332
+ /* Built-in method references for those with the same name as other `lodash` methods. */
333
+ var nativeFloor$1 = Math.floor,
334
+ nativeKeys = overArg(Object.keys, Object),
335
+ nativeRandom$1 = Math.random;
336
+
337
+ /* Built-in method references that are verified to be native. */
338
+ var DataView = getNative(root, 'DataView'),
339
+ Map = getNative(root, 'Map'),
340
+ Promise$1 = getNative(root, 'Promise'),
341
+ Set = getNative(root, 'Set'),
342
+ WeakMap = getNative(root, 'WeakMap');
343
+
344
+ /** Used to detect maps, sets, and weakmaps. */
345
+ var dataViewCtorString = toSource(DataView),
346
+ mapCtorString = toSource(Map),
347
+ promiseCtorString = toSource(Promise$1),
348
+ setCtorString = toSource(Set),
349
+ weakMapCtorString = toSource(WeakMap);
350
+
351
+ /**
352
+ * Creates an array of the enumerable property names of the array-like `value`.
353
+ *
354
+ * @private
355
+ * @param {*} value The value to query.
356
+ * @param {boolean} inherited Specify returning inherited property names.
357
+ * @returns {Array} Returns the array of property names.
358
+ */
359
+ function arrayLikeKeys(value, inherited) {
360
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
361
+ // Safari 9 makes `arguments.length` enumerable in strict mode.
362
+ var result = (isArray(value) || isArguments(value))
363
+ ? baseTimes(value.length, String)
364
+ : [];
365
+
366
+ var length = result.length,
367
+ skipIndexes = !!length;
368
+
369
+ for (var key in value) {
370
+ if ((inherited || hasOwnProperty.call(value, key)) &&
371
+ !(skipIndexes && (key == 'length' || isIndex$1(key, length)))) {
372
+ result.push(key);
373
+ }
374
+ }
375
+ return result;
376
+ }
377
+
378
+ /**
379
+ * The base implementation of `_.clamp` which doesn't coerce arguments.
380
+ *
381
+ * @private
382
+ * @param {number} number The number to clamp.
383
+ * @param {number} [lower] The lower bound.
384
+ * @param {number} upper The upper bound.
385
+ * @returns {number} Returns the clamped number.
386
+ */
387
+ function baseClamp(number, lower, upper) {
388
+ if (number === number) {
389
+ if (upper !== undefined) {
390
+ number = number <= upper ? number : upper;
391
+ }
392
+ if (lower !== undefined) {
393
+ number = number >= lower ? number : lower;
394
+ }
395
+ }
396
+ return number;
397
+ }
398
+
399
+ /**
400
+ * The base implementation of `getTag`.
401
+ *
402
+ * @private
403
+ * @param {*} value The value to query.
404
+ * @returns {string} Returns the `toStringTag`.
405
+ */
406
+ function baseGetTag(value) {
407
+ return objectToString$1.call(value);
408
+ }
409
+
410
+ /**
411
+ * The base implementation of `_.isNative` without bad shim checks.
412
+ *
413
+ * @private
414
+ * @param {*} value The value to check.
415
+ * @returns {boolean} Returns `true` if `value` is a native function,
416
+ * else `false`.
417
+ */
418
+ function baseIsNative(value) {
419
+ if (!isObject$1(value) || isMasked(value)) {
420
+ return false;
421
+ }
422
+ var pattern = (isFunction$1(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
423
+ return pattern.test(toSource(value));
424
+ }
425
+
426
+ /**
427
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
428
+ *
429
+ * @private
430
+ * @param {Object} object The object to query.
431
+ * @returns {Array} Returns the array of property names.
432
+ */
433
+ function baseKeys(object) {
434
+ if (!isPrototype(object)) {
435
+ return nativeKeys(object);
436
+ }
437
+ var result = [];
438
+ for (var key in Object(object)) {
439
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
440
+ result.push(key);
441
+ }
442
+ }
443
+ return result;
444
+ }
445
+
446
+ /**
447
+ * The base implementation of `_.random` without support for returning
448
+ * floating-point numbers.
449
+ *
450
+ * @private
451
+ * @param {number} lower The lower bound.
452
+ * @param {number} upper The upper bound.
453
+ * @returns {number} Returns the random number.
454
+ */
455
+ function baseRandom$1(lower, upper) {
456
+ return lower + nativeFloor$1(nativeRandom$1() * (upper - lower + 1));
457
+ }
458
+
459
+ /**
460
+ * Copies the values of `source` to `array`.
461
+ *
462
+ * @private
463
+ * @param {Array} source The array to copy values from.
464
+ * @param {Array} [array=[]] The array to copy values to.
465
+ * @returns {Array} Returns `array`.
466
+ */
467
+ function copyArray(source, array) {
468
+ var index = -1,
469
+ length = source.length;
470
+
471
+ array || (array = Array(length));
472
+ while (++index < length) {
473
+ array[index] = source[index];
474
+ }
475
+ return array;
476
+ }
477
+
478
+ /**
479
+ * Gets the native function at `key` of `object`.
480
+ *
481
+ * @private
482
+ * @param {Object} object The object to query.
483
+ * @param {string} key The key of the method to get.
484
+ * @returns {*} Returns the function if it's native, else `undefined`.
485
+ */
486
+ function getNative(object, key) {
487
+ var value = getValue(object, key);
488
+ return baseIsNative(value) ? value : undefined;
489
+ }
490
+
491
+ /**
492
+ * Gets the `toStringTag` of `value`.
493
+ *
494
+ * @private
495
+ * @param {*} value The value to query.
496
+ * @returns {string} Returns the `toStringTag`.
497
+ */
498
+ var getTag = baseGetTag;
499
+
500
+ // Fallback for data views, maps, sets, and weak maps in IE 11,
501
+ // for data views in Edge < 14, and promises in Node.js.
502
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
503
+ (Map && getTag(new Map) != mapTag) ||
504
+ (Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
505
+ (Set && getTag(new Set) != setTag) ||
506
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
507
+ getTag = function(value) {
508
+ var result = objectToString$1.call(value),
509
+ Ctor = result == objectTag ? value.constructor : undefined,
510
+ ctorString = Ctor ? toSource(Ctor) : undefined;
511
+
512
+ if (ctorString) {
513
+ switch (ctorString) {
514
+ case dataViewCtorString: return dataViewTag;
515
+ case mapCtorString: return mapTag;
516
+ case promiseCtorString: return promiseTag;
517
+ case setCtorString: return setTag;
518
+ case weakMapCtorString: return weakMapTag;
519
+ }
520
+ }
521
+ return result;
522
+ };
523
+ }
524
+
525
+ /**
526
+ * Checks if `value` is a valid array-like index.
527
+ *
528
+ * @private
529
+ * @param {*} value The value to check.
530
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
531
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
532
+ */
533
+ function isIndex$1(value, length) {
534
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
535
+ return !!length &&
536
+ (typeof value == 'number' || reIsUint$1.test(value)) &&
537
+ (value > -1 && value % 1 == 0 && value < length);
538
+ }
539
+
540
+ /**
541
+ * Checks if the given arguments are from an iteratee call.
542
+ *
543
+ * @private
544
+ * @param {*} value The potential iteratee value argument.
545
+ * @param {*} index The potential iteratee index or key argument.
546
+ * @param {*} object The potential iteratee object argument.
547
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
548
+ * else `false`.
549
+ */
550
+ function isIterateeCall$1(value, index, object) {
551
+ if (!isObject$1(object)) {
552
+ return false;
553
+ }
554
+ var type = typeof index;
555
+ if (type == 'number'
556
+ ? (isArrayLike$1(object) && isIndex$1(index, object.length))
557
+ : (type == 'string' && index in object)
558
+ ) {
559
+ return eq$1(object[index], value);
560
+ }
561
+ return false;
562
+ }
563
+
564
+ /**
565
+ * Checks if `func` has its source masked.
566
+ *
567
+ * @private
568
+ * @param {Function} func The function to check.
569
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
570
+ */
571
+ function isMasked(func) {
572
+ return !!maskSrcKey && (maskSrcKey in func);
573
+ }
574
+
575
+ /**
576
+ * Checks if `value` is likely a prototype object.
577
+ *
578
+ * @private
579
+ * @param {*} value The value to check.
580
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
581
+ */
582
+ function isPrototype(value) {
583
+ var Ctor = value && value.constructor,
584
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$1;
585
+
586
+ return value === proto;
587
+ }
588
+
589
+ /**
590
+ * Converts `func` to its source code.
591
+ *
592
+ * @private
593
+ * @param {Function} func The function to process.
594
+ * @returns {string} Returns the source code.
595
+ */
596
+ function toSource(func) {
597
+ if (func != null) {
598
+ try {
599
+ return funcToString.call(func);
600
+ } catch (e) {}
601
+ try {
602
+ return (func + '');
603
+ } catch (e) {}
604
+ }
605
+ return '';
606
+ }
607
+
608
+ /**
609
+ * Gets `n` random elements at unique keys from `collection` up to the
610
+ * size of `collection`.
611
+ *
612
+ * @static
613
+ * @memberOf _
614
+ * @since 4.0.0
615
+ * @category Collection
616
+ * @param {Array|Object} collection The collection to sample.
617
+ * @param {number} [n=1] The number of elements to sample.
618
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
619
+ * @returns {Array} Returns the random elements.
620
+ * @example
621
+ *
622
+ * _.sampleSize([1, 2, 3], 2);
623
+ * // => [3, 1]
624
+ *
625
+ * _.sampleSize([1, 2, 3], 4);
626
+ * // => [2, 3, 1]
627
+ */
628
+ function sampleSize(collection, n, guard) {
629
+ var index = -1,
630
+ result = toArray(collection),
631
+ length = result.length,
632
+ lastIndex = length - 1;
633
+
634
+ if ((guard ? isIterateeCall$1(collection, n, guard) : n === undefined)) {
635
+ n = 1;
636
+ } else {
637
+ n = baseClamp(toInteger(n), 0, length);
638
+ }
639
+ while (++index < n) {
640
+ var rand = baseRandom$1(index, lastIndex),
641
+ value = result[rand];
642
+
643
+ result[rand] = result[index];
644
+ result[index] = value;
645
+ }
646
+ result.length = n;
647
+ return result;
648
+ }
649
+
650
+ /**
651
+ * Performs a
652
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
653
+ * comparison between two values to determine if they are equivalent.
654
+ *
655
+ * @static
656
+ * @memberOf _
657
+ * @since 4.0.0
658
+ * @category Lang
659
+ * @param {*} value The value to compare.
660
+ * @param {*} other The other value to compare.
661
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
662
+ * @example
663
+ *
664
+ * var object = { 'a': 1 };
665
+ * var other = { 'a': 1 };
666
+ *
667
+ * _.eq(object, object);
668
+ * // => true
669
+ *
670
+ * _.eq(object, other);
671
+ * // => false
672
+ *
673
+ * _.eq('a', 'a');
674
+ * // => true
675
+ *
676
+ * _.eq('a', Object('a'));
677
+ * // => false
678
+ *
679
+ * _.eq(NaN, NaN);
680
+ * // => true
681
+ */
682
+ function eq$1(value, other) {
683
+ return value === other || (value !== value && other !== other);
684
+ }
685
+
686
+ /**
687
+ * Checks if `value` is likely an `arguments` object.
688
+ *
689
+ * @static
690
+ * @memberOf _
691
+ * @since 0.1.0
692
+ * @category Lang
693
+ * @param {*} value The value to check.
694
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
695
+ * else `false`.
696
+ * @example
697
+ *
698
+ * _.isArguments(function() { return arguments; }());
699
+ * // => true
700
+ *
701
+ * _.isArguments([1, 2, 3]);
702
+ * // => false
703
+ */
704
+ function isArguments(value) {
705
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
706
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
707
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString$1.call(value) == argsTag);
708
+ }
709
+
710
+ /**
711
+ * Checks if `value` is classified as an `Array` object.
712
+ *
713
+ * @static
714
+ * @memberOf _
715
+ * @since 0.1.0
716
+ * @category Lang
717
+ * @param {*} value The value to check.
718
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
719
+ * @example
720
+ *
721
+ * _.isArray([1, 2, 3]);
722
+ * // => true
723
+ *
724
+ * _.isArray(document.body.children);
725
+ * // => false
726
+ *
727
+ * _.isArray('abc');
728
+ * // => false
729
+ *
730
+ * _.isArray(_.noop);
731
+ * // => false
732
+ */
733
+ var isArray = Array.isArray;
734
+
735
+ /**
736
+ * Checks if `value` is array-like. A value is considered array-like if it's
737
+ * not a function and has a `value.length` that's an integer greater than or
738
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
739
+ *
740
+ * @static
741
+ * @memberOf _
742
+ * @since 4.0.0
743
+ * @category Lang
744
+ * @param {*} value The value to check.
745
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
746
+ * @example
747
+ *
748
+ * _.isArrayLike([1, 2, 3]);
749
+ * // => true
750
+ *
751
+ * _.isArrayLike(document.body.children);
752
+ * // => true
753
+ *
754
+ * _.isArrayLike('abc');
755
+ * // => true
756
+ *
757
+ * _.isArrayLike(_.noop);
758
+ * // => false
759
+ */
760
+ function isArrayLike$1(value) {
761
+ return value != null && isLength$1(value.length) && !isFunction$1(value);
762
+ }
763
+
764
+ /**
765
+ * This method is like `_.isArrayLike` except that it also checks if `value`
766
+ * is an object.
767
+ *
768
+ * @static
769
+ * @memberOf _
770
+ * @since 4.0.0
771
+ * @category Lang
772
+ * @param {*} value The value to check.
773
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
774
+ * else `false`.
775
+ * @example
776
+ *
777
+ * _.isArrayLikeObject([1, 2, 3]);
778
+ * // => true
779
+ *
780
+ * _.isArrayLikeObject(document.body.children);
781
+ * // => true
782
+ *
783
+ * _.isArrayLikeObject('abc');
784
+ * // => false
785
+ *
786
+ * _.isArrayLikeObject(_.noop);
787
+ * // => false
788
+ */
789
+ function isArrayLikeObject(value) {
790
+ return isObjectLike$1(value) && isArrayLike$1(value);
791
+ }
792
+
793
+ /**
794
+ * Checks if `value` is classified as a `Function` object.
795
+ *
796
+ * @static
797
+ * @memberOf _
798
+ * @since 0.1.0
799
+ * @category Lang
800
+ * @param {*} value The value to check.
801
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
802
+ * @example
803
+ *
804
+ * _.isFunction(_);
805
+ * // => true
806
+ *
807
+ * _.isFunction(/abc/);
808
+ * // => false
809
+ */
810
+ function isFunction$1(value) {
811
+ // The use of `Object#toString` avoids issues with the `typeof` operator
812
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
813
+ var tag = isObject$1(value) ? objectToString$1.call(value) : '';
814
+ return tag == funcTag$1 || tag == genTag$1;
815
+ }
816
+
817
+ /**
818
+ * Checks if `value` is a valid array-like length.
819
+ *
820
+ * **Note:** This method is loosely based on
821
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
822
+ *
823
+ * @static
824
+ * @memberOf _
825
+ * @since 4.0.0
826
+ * @category Lang
827
+ * @param {*} value The value to check.
828
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
829
+ * @example
830
+ *
831
+ * _.isLength(3);
832
+ * // => true
833
+ *
834
+ * _.isLength(Number.MIN_VALUE);
835
+ * // => false
836
+ *
837
+ * _.isLength(Infinity);
838
+ * // => false
839
+ *
840
+ * _.isLength('3');
841
+ * // => false
842
+ */
843
+ function isLength$1(value) {
844
+ return typeof value == 'number' &&
845
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;
846
+ }
847
+
848
+ /**
849
+ * Checks if `value` is the
850
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
851
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
852
+ *
853
+ * @static
854
+ * @memberOf _
855
+ * @since 0.1.0
856
+ * @category Lang
857
+ * @param {*} value The value to check.
858
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
859
+ * @example
860
+ *
861
+ * _.isObject({});
862
+ * // => true
863
+ *
864
+ * _.isObject([1, 2, 3]);
865
+ * // => true
866
+ *
867
+ * _.isObject(_.noop);
868
+ * // => true
869
+ *
870
+ * _.isObject(null);
871
+ * // => false
872
+ */
873
+ function isObject$1(value) {
874
+ var type = typeof value;
875
+ return !!value && (type == 'object' || type == 'function');
876
+ }
877
+
878
+ /**
879
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
880
+ * and has a `typeof` result of "object".
881
+ *
882
+ * @static
883
+ * @memberOf _
884
+ * @since 4.0.0
885
+ * @category Lang
886
+ * @param {*} value The value to check.
887
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
888
+ * @example
889
+ *
890
+ * _.isObjectLike({});
891
+ * // => true
892
+ *
893
+ * _.isObjectLike([1, 2, 3]);
894
+ * // => true
895
+ *
896
+ * _.isObjectLike(_.noop);
897
+ * // => false
898
+ *
899
+ * _.isObjectLike(null);
900
+ * // => false
901
+ */
902
+ function isObjectLike$1(value) {
903
+ return !!value && typeof value == 'object';
904
+ }
905
+
906
+ /**
907
+ * Checks if `value` is classified as a `String` primitive or object.
908
+ *
909
+ * @static
910
+ * @since 0.1.0
911
+ * @memberOf _
912
+ * @category Lang
913
+ * @param {*} value The value to check.
914
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
915
+ * @example
916
+ *
917
+ * _.isString('abc');
918
+ * // => true
919
+ *
920
+ * _.isString(1);
921
+ * // => false
922
+ */
923
+ function isString(value) {
924
+ return typeof value == 'string' ||
925
+ (!isArray(value) && isObjectLike$1(value) && objectToString$1.call(value) == stringTag);
926
+ }
927
+
928
+ /**
929
+ * Checks if `value` is classified as a `Symbol` primitive or object.
930
+ *
931
+ * @static
932
+ * @memberOf _
933
+ * @since 4.0.0
934
+ * @category Lang
935
+ * @param {*} value The value to check.
936
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
937
+ * @example
938
+ *
939
+ * _.isSymbol(Symbol.iterator);
940
+ * // => true
941
+ *
942
+ * _.isSymbol('abc');
943
+ * // => false
944
+ */
945
+ function isSymbol$1(value) {
946
+ return typeof value == 'symbol' ||
947
+ (isObjectLike$1(value) && objectToString$1.call(value) == symbolTag$1);
948
+ }
949
+
950
+ /**
951
+ * Converts `value` to an array.
952
+ *
953
+ * @static
954
+ * @since 0.1.0
955
+ * @memberOf _
956
+ * @category Lang
957
+ * @param {*} value The value to convert.
958
+ * @returns {Array} Returns the converted array.
959
+ * @example
960
+ *
961
+ * _.toArray({ 'a': 1, 'b': 2 });
962
+ * // => [1, 2]
963
+ *
964
+ * _.toArray('abc');
965
+ * // => ['a', 'b', 'c']
966
+ *
967
+ * _.toArray(1);
968
+ * // => []
969
+ *
970
+ * _.toArray(null);
971
+ * // => []
972
+ */
973
+ function toArray(value) {
974
+ if (!value) {
975
+ return [];
976
+ }
977
+ if (isArrayLike$1(value)) {
978
+ return isString(value) ? stringToArray(value) : copyArray(value);
979
+ }
980
+ if (iteratorSymbol && value[iteratorSymbol]) {
981
+ return iteratorToArray(value[iteratorSymbol]());
982
+ }
983
+ var tag = getTag(value),
984
+ func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
985
+
986
+ return func(value);
987
+ }
988
+
989
+ /**
990
+ * Converts `value` to a finite number.
991
+ *
992
+ * @static
993
+ * @memberOf _
994
+ * @since 4.12.0
995
+ * @category Lang
996
+ * @param {*} value The value to convert.
997
+ * @returns {number} Returns the converted number.
998
+ * @example
999
+ *
1000
+ * _.toFinite(3.2);
1001
+ * // => 3.2
1002
+ *
1003
+ * _.toFinite(Number.MIN_VALUE);
1004
+ * // => 5e-324
1005
+ *
1006
+ * _.toFinite(Infinity);
1007
+ * // => 1.7976931348623157e+308
1008
+ *
1009
+ * _.toFinite('3.2');
1010
+ * // => 3.2
1011
+ */
1012
+ function toFinite$1(value) {
1013
+ if (!value) {
1014
+ return value === 0 ? value : 0;
1015
+ }
1016
+ value = toNumber$1(value);
1017
+ if (value === INFINITY$1 || value === -INFINITY$1) {
1018
+ var sign = (value < 0 ? -1 : 1);
1019
+ return sign * MAX_INTEGER$1;
1020
+ }
1021
+ return value === value ? value : 0;
1022
+ }
1023
+
1024
+ /**
1025
+ * Converts `value` to an integer.
1026
+ *
1027
+ * **Note:** This method is loosely based on
1028
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
1029
+ *
1030
+ * @static
1031
+ * @memberOf _
1032
+ * @since 4.0.0
1033
+ * @category Lang
1034
+ * @param {*} value The value to convert.
1035
+ * @returns {number} Returns the converted integer.
1036
+ * @example
1037
+ *
1038
+ * _.toInteger(3.2);
1039
+ * // => 3
1040
+ *
1041
+ * _.toInteger(Number.MIN_VALUE);
1042
+ * // => 0
1043
+ *
1044
+ * _.toInteger(Infinity);
1045
+ * // => 1.7976931348623157e+308
1046
+ *
1047
+ * _.toInteger('3.2');
1048
+ * // => 3
1049
+ */
1050
+ function toInteger(value) {
1051
+ var result = toFinite$1(value),
1052
+ remainder = result % 1;
1053
+
1054
+ return result === result ? (remainder ? result - remainder : result) : 0;
1055
+ }
1056
+
1057
+ /**
1058
+ * Converts `value` to a number.
1059
+ *
1060
+ * @static
1061
+ * @memberOf _
1062
+ * @since 4.0.0
1063
+ * @category Lang
1064
+ * @param {*} value The value to process.
1065
+ * @returns {number} Returns the number.
1066
+ * @example
1067
+ *
1068
+ * _.toNumber(3.2);
1069
+ * // => 3.2
1070
+ *
1071
+ * _.toNumber(Number.MIN_VALUE);
1072
+ * // => 5e-324
1073
+ *
1074
+ * _.toNumber(Infinity);
1075
+ * // => Infinity
1076
+ *
1077
+ * _.toNumber('3.2');
1078
+ * // => 3.2
1079
+ */
1080
+ function toNumber$1(value) {
1081
+ if (typeof value == 'number') {
1082
+ return value;
1083
+ }
1084
+ if (isSymbol$1(value)) {
1085
+ return NAN$1;
1086
+ }
1087
+ if (isObject$1(value)) {
1088
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
1089
+ value = isObject$1(other) ? (other + '') : other;
1090
+ }
1091
+ if (typeof value != 'string') {
1092
+ return value === 0 ? value : +value;
1093
+ }
1094
+ value = value.replace(reTrim$1, '');
1095
+ var isBinary = reIsBinary$1.test(value);
1096
+ return (isBinary || reIsOctal$1.test(value))
1097
+ ? freeParseInt$1(value.slice(2), isBinary ? 2 : 8)
1098
+ : (reIsBadHex$1.test(value) ? NAN$1 : +value);
1099
+ }
1100
+
1101
+ /**
1102
+ * Creates an array of the own enumerable property names of `object`.
1103
+ *
1104
+ * **Note:** Non-object values are coerced to objects. See the
1105
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1106
+ * for more details.
1107
+ *
1108
+ * @static
1109
+ * @since 0.1.0
1110
+ * @memberOf _
1111
+ * @category Object
1112
+ * @param {Object} object The object to query.
1113
+ * @returns {Array} Returns the array of property names.
1114
+ * @example
1115
+ *
1116
+ * function Foo() {
1117
+ * this.a = 1;
1118
+ * this.b = 2;
1119
+ * }
1120
+ *
1121
+ * Foo.prototype.c = 3;
1122
+ *
1123
+ * _.keys(new Foo);
1124
+ * // => ['a', 'b'] (iteration order is not guaranteed)
1125
+ *
1126
+ * _.keys('hi');
1127
+ * // => ['0', '1']
1128
+ */
1129
+ function keys(object) {
1130
+ return isArrayLike$1(object) ? arrayLikeKeys(object) : baseKeys(object);
1131
+ }
1132
+
1133
+ /**
1134
+ * Creates an array of the own enumerable string keyed property values of `object`.
1135
+ *
1136
+ * **Note:** Non-object values are coerced to objects.
1137
+ *
1138
+ * @static
1139
+ * @since 0.1.0
1140
+ * @memberOf _
1141
+ * @category Object
1142
+ * @param {Object} object The object to query.
1143
+ * @returns {Array} Returns the array of property values.
1144
+ * @example
1145
+ *
1146
+ * function Foo() {
1147
+ * this.a = 1;
1148
+ * this.b = 2;
1149
+ * }
1150
+ *
1151
+ * Foo.prototype.c = 3;
1152
+ *
1153
+ * _.values(new Foo);
1154
+ * // => [1, 2] (iteration order is not guaranteed)
1155
+ *
1156
+ * _.values('hi');
1157
+ * // => ['h', 'i']
1158
+ */
1159
+ function values(object) {
1160
+ return object ? baseValues(object, keys(object)) : [];
1161
+ }
1162
+
1163
+ var lodash_samplesize = sampleSize;
1164
+
1165
+ /**
1166
+ * lodash (Custom Build) <https://lodash.com/>
1167
+ * Build: `lodash modularize exports="npm" -o ./`
1168
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
1169
+ * Released under MIT license <https://lodash.com/license>
1170
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1171
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1172
+ */
1173
+
1174
+ /** Used as references for various `Number` constants. */
1175
+ var INFINITY = 1 / 0,
1176
+ MAX_SAFE_INTEGER = 9007199254740991,
1177
+ MAX_INTEGER = 1.7976931348623157e+308,
1178
+ NAN = 0 / 0;
1179
+
1180
+ /** `Object#toString` result references. */
1181
+ var funcTag = '[object Function]',
1182
+ genTag = '[object GeneratorFunction]',
1183
+ symbolTag = '[object Symbol]';
1184
+
1185
+ /** Used to match leading and trailing whitespace. */
1186
+ var reTrim = /^\s+|\s+$/g;
1187
+
1188
+ /** Used to detect bad signed hexadecimal string values. */
1189
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
1190
+
1191
+ /** Used to detect binary string values. */
1192
+ var reIsBinary = /^0b[01]+$/i;
1193
+
1194
+ /** Used to detect octal string values. */
1195
+ var reIsOctal = /^0o[0-7]+$/i;
1196
+
1197
+ /** Used to detect unsigned integer values. */
1198
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
1199
+
1200
+ /** Built-in method references without a dependency on `root`. */
1201
+ var freeParseFloat = parseFloat,
1202
+ freeParseInt = parseInt;
1203
+
1204
+ /** Used for built-in method references. */
1205
+ var objectProto = Object.prototype;
1206
+
1207
+ /**
1208
+ * Used to resolve the
1209
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
1210
+ * of values.
1211
+ */
1212
+ var objectToString = objectProto.toString;
1213
+
1214
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1215
+ var nativeFloor = Math.floor,
1216
+ nativeMin = Math.min,
1217
+ nativeRandom = Math.random;
1218
+
1219
+ /**
1220
+ * The base implementation of `_.random` without support for returning
1221
+ * floating-point numbers.
1222
+ *
1223
+ * @private
1224
+ * @param {number} lower The lower bound.
1225
+ * @param {number} upper The upper bound.
1226
+ * @returns {number} Returns the random number.
1227
+ */
1228
+ function baseRandom(lower, upper) {
1229
+ return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
1230
+ }
1231
+
1232
+ /**
1233
+ * Checks if `value` is a valid array-like index.
1234
+ *
1235
+ * @private
1236
+ * @param {*} value The value to check.
1237
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1238
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1239
+ */
1240
+ function isIndex(value, length) {
1241
+ length = length == null ? MAX_SAFE_INTEGER : length;
1242
+ return !!length &&
1243
+ (typeof value == 'number' || reIsUint.test(value)) &&
1244
+ (value > -1 && value % 1 == 0 && value < length);
1245
+ }
1246
+
1247
+ /**
1248
+ * Checks if the given arguments are from an iteratee call.
1249
+ *
1250
+ * @private
1251
+ * @param {*} value The potential iteratee value argument.
1252
+ * @param {*} index The potential iteratee index or key argument.
1253
+ * @param {*} object The potential iteratee object argument.
1254
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
1255
+ * else `false`.
1256
+ */
1257
+ function isIterateeCall(value, index, object) {
1258
+ if (!isObject(object)) {
1259
+ return false;
1260
+ }
1261
+ var type = typeof index;
1262
+ if (type == 'number'
1263
+ ? (isArrayLike(object) && isIndex(index, object.length))
1264
+ : (type == 'string' && index in object)
1265
+ ) {
1266
+ return eq(object[index], value);
1267
+ }
1268
+ return false;
1269
+ }
1270
+
1271
+ /**
1272
+ * Performs a
1273
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1274
+ * comparison between two values to determine if they are equivalent.
1275
+ *
1276
+ * @static
1277
+ * @memberOf _
1278
+ * @since 4.0.0
1279
+ * @category Lang
1280
+ * @param {*} value The value to compare.
1281
+ * @param {*} other The other value to compare.
1282
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1283
+ * @example
1284
+ *
1285
+ * var object = { 'a': 1 };
1286
+ * var other = { 'a': 1 };
1287
+ *
1288
+ * _.eq(object, object);
1289
+ * // => true
1290
+ *
1291
+ * _.eq(object, other);
1292
+ * // => false
1293
+ *
1294
+ * _.eq('a', 'a');
1295
+ * // => true
1296
+ *
1297
+ * _.eq('a', Object('a'));
1298
+ * // => false
1299
+ *
1300
+ * _.eq(NaN, NaN);
1301
+ * // => true
1302
+ */
1303
+ function eq(value, other) {
1304
+ return value === other || (value !== value && other !== other);
1305
+ }
1306
+
1307
+ /**
1308
+ * Checks if `value` is array-like. A value is considered array-like if it's
1309
+ * not a function and has a `value.length` that's an integer greater than or
1310
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1311
+ *
1312
+ * @static
1313
+ * @memberOf _
1314
+ * @since 4.0.0
1315
+ * @category Lang
1316
+ * @param {*} value The value to check.
1317
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1318
+ * @example
1319
+ *
1320
+ * _.isArrayLike([1, 2, 3]);
1321
+ * // => true
1322
+ *
1323
+ * _.isArrayLike(document.body.children);
1324
+ * // => true
1325
+ *
1326
+ * _.isArrayLike('abc');
1327
+ * // => true
1328
+ *
1329
+ * _.isArrayLike(_.noop);
1330
+ * // => false
1331
+ */
1332
+ function isArrayLike(value) {
1333
+ return value != null && isLength(value.length) && !isFunction(value);
1334
+ }
1335
+
1336
+ /**
1337
+ * Checks if `value` is classified as a `Function` object.
1338
+ *
1339
+ * @static
1340
+ * @memberOf _
1341
+ * @since 0.1.0
1342
+ * @category Lang
1343
+ * @param {*} value The value to check.
1344
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
1345
+ * @example
1346
+ *
1347
+ * _.isFunction(_);
1348
+ * // => true
1349
+ *
1350
+ * _.isFunction(/abc/);
1351
+ * // => false
1352
+ */
1353
+ function isFunction(value) {
1354
+ // The use of `Object#toString` avoids issues with the `typeof` operator
1355
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
1356
+ var tag = isObject(value) ? objectToString.call(value) : '';
1357
+ return tag == funcTag || tag == genTag;
1358
+ }
1359
+
1360
+ /**
1361
+ * Checks if `value` is a valid array-like length.
1362
+ *
1363
+ * **Note:** This method is loosely based on
1364
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1365
+ *
1366
+ * @static
1367
+ * @memberOf _
1368
+ * @since 4.0.0
1369
+ * @category Lang
1370
+ * @param {*} value The value to check.
1371
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1372
+ * @example
1373
+ *
1374
+ * _.isLength(3);
1375
+ * // => true
1376
+ *
1377
+ * _.isLength(Number.MIN_VALUE);
1378
+ * // => false
1379
+ *
1380
+ * _.isLength(Infinity);
1381
+ * // => false
1382
+ *
1383
+ * _.isLength('3');
1384
+ * // => false
1385
+ */
1386
+ function isLength(value) {
1387
+ return typeof value == 'number' &&
1388
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
1389
+ }
1390
+
1391
+ /**
1392
+ * Checks if `value` is the
1393
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
1394
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
1395
+ *
1396
+ * @static
1397
+ * @memberOf _
1398
+ * @since 0.1.0
1399
+ * @category Lang
1400
+ * @param {*} value The value to check.
1401
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
1402
+ * @example
1403
+ *
1404
+ * _.isObject({});
1405
+ * // => true
1406
+ *
1407
+ * _.isObject([1, 2, 3]);
1408
+ * // => true
1409
+ *
1410
+ * _.isObject(_.noop);
1411
+ * // => true
1412
+ *
1413
+ * _.isObject(null);
1414
+ * // => false
1415
+ */
1416
+ function isObject(value) {
1417
+ var type = typeof value;
1418
+ return !!value && (type == 'object' || type == 'function');
1419
+ }
1420
+
1421
+ /**
1422
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
1423
+ * and has a `typeof` result of "object".
1424
+ *
1425
+ * @static
1426
+ * @memberOf _
1427
+ * @since 4.0.0
1428
+ * @category Lang
1429
+ * @param {*} value The value to check.
1430
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1431
+ * @example
1432
+ *
1433
+ * _.isObjectLike({});
1434
+ * // => true
1435
+ *
1436
+ * _.isObjectLike([1, 2, 3]);
1437
+ * // => true
1438
+ *
1439
+ * _.isObjectLike(_.noop);
1440
+ * // => false
1441
+ *
1442
+ * _.isObjectLike(null);
1443
+ * // => false
1444
+ */
1445
+ function isObjectLike(value) {
1446
+ return !!value && typeof value == 'object';
1447
+ }
1448
+
1449
+ /**
1450
+ * Checks if `value` is classified as a `Symbol` primitive or object.
1451
+ *
1452
+ * @static
1453
+ * @memberOf _
1454
+ * @since 4.0.0
1455
+ * @category Lang
1456
+ * @param {*} value The value to check.
1457
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
1458
+ * @example
1459
+ *
1460
+ * _.isSymbol(Symbol.iterator);
1461
+ * // => true
1462
+ *
1463
+ * _.isSymbol('abc');
1464
+ * // => false
1465
+ */
1466
+ function isSymbol(value) {
1467
+ return typeof value == 'symbol' ||
1468
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
1469
+ }
1470
+
1471
+ /**
1472
+ * Converts `value` to a finite number.
1473
+ *
1474
+ * @static
1475
+ * @memberOf _
1476
+ * @since 4.12.0
1477
+ * @category Lang
1478
+ * @param {*} value The value to convert.
1479
+ * @returns {number} Returns the converted number.
1480
+ * @example
1481
+ *
1482
+ * _.toFinite(3.2);
1483
+ * // => 3.2
1484
+ *
1485
+ * _.toFinite(Number.MIN_VALUE);
1486
+ * // => 5e-324
1487
+ *
1488
+ * _.toFinite(Infinity);
1489
+ * // => 1.7976931348623157e+308
1490
+ *
1491
+ * _.toFinite('3.2');
1492
+ * // => 3.2
1493
+ */
1494
+ function toFinite(value) {
1495
+ if (!value) {
1496
+ return value === 0 ? value : 0;
1497
+ }
1498
+ value = toNumber(value);
1499
+ if (value === INFINITY || value === -INFINITY) {
1500
+ var sign = (value < 0 ? -1 : 1);
1501
+ return sign * MAX_INTEGER;
1502
+ }
1503
+ return value === value ? value : 0;
1504
+ }
1505
+
1506
+ /**
1507
+ * Converts `value` to a number.
1508
+ *
1509
+ * @static
1510
+ * @memberOf _
1511
+ * @since 4.0.0
1512
+ * @category Lang
1513
+ * @param {*} value The value to process.
1514
+ * @returns {number} Returns the number.
1515
+ * @example
1516
+ *
1517
+ * _.toNumber(3.2);
1518
+ * // => 3.2
1519
+ *
1520
+ * _.toNumber(Number.MIN_VALUE);
1521
+ * // => 5e-324
1522
+ *
1523
+ * _.toNumber(Infinity);
1524
+ * // => Infinity
1525
+ *
1526
+ * _.toNumber('3.2');
1527
+ * // => 3.2
1528
+ */
1529
+ function toNumber(value) {
1530
+ if (typeof value == 'number') {
1531
+ return value;
1532
+ }
1533
+ if (isSymbol(value)) {
1534
+ return NAN;
1535
+ }
1536
+ if (isObject(value)) {
1537
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
1538
+ value = isObject(other) ? (other + '') : other;
1539
+ }
1540
+ if (typeof value != 'string') {
1541
+ return value === 0 ? value : +value;
1542
+ }
1543
+ value = value.replace(reTrim, '');
1544
+ var isBinary = reIsBinary.test(value);
1545
+ return (isBinary || reIsOctal.test(value))
1546
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
1547
+ : (reIsBadHex.test(value) ? NAN : +value);
1548
+ }
1549
+
1550
+ /**
1551
+ * Produces a random number between the inclusive `lower` and `upper` bounds.
1552
+ * If only one argument is provided a number between `0` and the given number
1553
+ * is returned. If `floating` is `true`, or either `lower` or `upper` are
1554
+ * floats, a floating-point number is returned instead of an integer.
1555
+ *
1556
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
1557
+ * floating-point values which can produce unexpected results.
1558
+ *
1559
+ * @static
1560
+ * @memberOf _
1561
+ * @since 0.7.0
1562
+ * @category Number
1563
+ * @param {number} [lower=0] The lower bound.
1564
+ * @param {number} [upper=1] The upper bound.
1565
+ * @param {boolean} [floating] Specify returning a floating-point number.
1566
+ * @returns {number} Returns the random number.
1567
+ * @example
1568
+ *
1569
+ * _.random(0, 5);
1570
+ * // => an integer between 0 and 5
1571
+ *
1572
+ * _.random(5);
1573
+ * // => also an integer between 0 and 5
1574
+ *
1575
+ * _.random(5, true);
1576
+ * // => a floating-point number between 0 and 5
1577
+ *
1578
+ * _.random(1.2, 5.2);
1579
+ * // => a floating-point number between 1.2 and 5.2
1580
+ */
1581
+ function random(lower, upper, floating) {
1582
+ if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
1583
+ upper = floating = undefined;
1584
+ }
1585
+ if (floating === undefined) {
1586
+ if (typeof upper == 'boolean') {
1587
+ floating = upper;
1588
+ upper = undefined;
1589
+ }
1590
+ else if (typeof lower == 'boolean') {
1591
+ floating = lower;
1592
+ lower = undefined;
1593
+ }
1594
+ }
1595
+ if (lower === undefined && upper === undefined) {
1596
+ lower = 0;
1597
+ upper = 1;
1598
+ }
1599
+ else {
1600
+ lower = toFinite(lower);
1601
+ if (upper === undefined) {
1602
+ upper = lower;
1603
+ lower = 0;
1604
+ } else {
1605
+ upper = toFinite(upper);
1606
+ }
1607
+ }
1608
+ if (lower > upper) {
1609
+ var temp = lower;
1610
+ lower = upper;
1611
+ upper = temp;
1612
+ }
1613
+ if (floating || lower % 1 || upper % 1) {
1614
+ var rand = nativeRandom();
1615
+ return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
1616
+ }
1617
+ return baseRandom(lower, upper);
1618
+ }
1619
+
1620
+ var lodash_random = random;
1621
+
1622
+ const documentComponentDemoCss = ".sc-dsot-document-component-demo-h{display:block;margin:0 8px;border-left:1px dashed transparent;border-right:1px dashed transparent}[show-canvas].sc-dsot-document-component-demo-h{border-left:1px dashed pink;border-right:1px dashed pink}";
2
1623
 
3
1624
  const DocumentComponentDemo = class {
4
1625
  constructor(hostRef) {
5
1626
  registerInstance(this, hostRef);
1627
+ this.dsotOzonContentAnchorClick = createEvent(this, "dsotOzonContentAnchorClick", 7);
6
1628
  this.DocumentComponent = ({ path }) => {
7
1629
  var _a;
8
1630
  const documentComponent = path.at(-1);
9
1631
  const { DocumentComponent } = this;
10
- return (h("ul", null, (_a = documentComponent === null || documentComponent === void 0 ? void 0 : documentComponent._embedded) === null || _a === void 0 ? void 0 : _a.ontwerpTekststructuurDocumentComponenten.map((d, i) => (h("li", { key: d.documentTechnischId }, h("dso-document-component", { annotated: i % 3 === 2, bevatOntwerpInformatie: !!d.bevatOntwerpInformatie, filtered: this.isOpen(d) ? this.isFiltered(d) : this.hasFilteredChildren(d), genesteOntwerpInformatie: this.hasNestedDraft(d), gereserveerd: d.gereserveerd, heading: "h2", inhoud: d.inhoud, label: d.labelXml, openAnnotation: this.isOpenedAnnotation(d), notApplicable: this.isNotApplicable(d) || path.some((p) => this.isNotApplicable(p)), nummer: d.nummerXml, onDsoAnnotationToggle: () => this.handleAnnotationToggle(d), onDsoOpenToggle: (e) => this.handleOpenToggle(e, d), open: this.isOpen(d), opschrift: d.opschrift, type: d.type, vervallen: d.vervallen, wijzigactie: d.wijzigactie }, this.isOpenedAnnotation(d) && (h("dso-annotation-output", { slot: "annotation", open: true, identifier: "test", onDsoClose: () => this.handleAnnotationToggle(d) }, h("span", { slot: "title" }, "Annotaties"), h("dso-slide-toggle", { checked: this.isCheckedSlideToggle(d), onDsoActiveChange: () => this.handleSelectableChange(d) }, "Delfzijl"))), this.showContent(d) && h(DocumentComponent, { path: [...path, d] })))))));
1632
+ return (h("ul", null, documentComponent &&
1633
+ ((_a = this.getEmbeddedDocumentComponents(documentComponent)) === null || _a === void 0 ? void 0 : _a.map((d, i) => (h("li", { key: d.documentTechnischId }, h("dso-document-component", { annotated: i % 3 === 2, bevatOntwerpInformatie: !!d.bevatOntwerpInformatie, filtered: this.isOpen(d) ? this.isFiltered(d) : this.hasFilteredChildren(d), genesteOntwerpInformatie: this.hasNestedDraft(d), gereserveerd: d.gereserveerd, heading: "h2", inhoud: d.inhoud, label: d.labelXml, openAnnotation: this.isOpenedAnnotation(d), notApplicable: this.isNotApplicable(d) || path.some((p) => this.isNotApplicable(p)), nummer: d.nummerXml, onDsoAnnotationToggle: () => this.handleAnnotationToggle(d), onDsoOpenToggle: (e) => this.handleOpenToggle(e, d), onDsoOzonContentAnchorClick: (e) => this.handleOzonContentAnchorClick(e), open: this.isOpen(d), opschrift: d.opschrift, type: d.type, vervallen: d.vervallen, wijzigactie: d.wijzigactie }, this.isOpenedAnnotation(d) && (h("dso-annotation-output", { slot: "annotation", open: true, identifier: "test", onDsoClose: () => this.handleAnnotationToggle(d) }, h("span", { slot: "title" }, "Annotaties"), h("dso-slide-toggle", { checked: this.isCheckedSlideToggle(d), onDsoActiveChange: () => this.handleSelectableChange(d) }, "Delfzijl"))), this.showContent(d) && h(DocumentComponent, { path: [...path, d] }))))))));
11
1634
  };
1635
+ this.showCanvas = false;
1636
+ this.jsonFile = undefined;
1637
+ this.openDefault = false;
12
1638
  this.response = undefined;
13
- this.open = [];
1639
+ this.openOrClosed = [];
14
1640
  this.openedAnnotation = [];
15
1641
  this.filtered = [];
16
1642
  this.notApplicable = [];
17
1643
  this.activeAnnotationSelectables = [];
18
1644
  }
19
- fixData(documentComponent) {
1645
+ async jsonFileWatcher() {
1646
+ this.openOrClosed = [];
1647
+ await this.loadData();
1648
+ }
1649
+ async openDefaultWatcher() {
1650
+ this.openOrClosed = [];
1651
+ await this.loadData();
1652
+ }
1653
+ async componentDidLoad() {
1654
+ await this.loadData();
1655
+ }
1656
+ getEmbeddedDocumentComponents(documentComponent) {
1657
+ var _a, _b, _c;
1658
+ return ((_b = (_a = documentComponent === null || documentComponent === void 0 ? void 0 : documentComponent._embedded) === null || _a === void 0 ? void 0 : _a.ontwerpTekststructuurDocumentComponenten) !== null && _b !== void 0 ? _b : (_c = documentComponent === null || documentComponent === void 0 ? void 0 : documentComponent._embedded) === null || _c === void 0 ? void 0 : _c.tekststructuurDocumentComponenten);
1659
+ }
1660
+ concatEmbeddedDocumentComponents(documentComponent) {
20
1661
  var _a;
21
- return Object.assign(Object.assign({}, documentComponent), { nummerXml: documentComponent.type === "LID" && !((_a = documentComponent.nummerXml) === null || _a === void 0 ? void 0 : _a.startsWith("<?"))
22
- ? `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Nummer xmlns="https://standaarden.overheid.nl/stop/imop/tekst/">${documentComponent.nummerXml}</Nummer>`
23
- : documentComponent.nummerXml, _embedded: documentComponent._embedded && {
24
- ontwerpTekststructuurDocumentComponenten: documentComponent._embedded.ontwerpTekststructuurDocumentComponenten.map((d) => this.fixData(d)),
25
- } });
26
- }
27
- componentDidLoad() {
28
- fetch("ozon-response.json")
29
- .then((response) => response.json())
30
- .then((result) => {
31
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
32
- this.response = this.fixData(result);
33
- /* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */
34
- this.filtered = [
35
- (_e = (_d = (_c = (_b = (_a = this.response) === null || _a === void 0 ? void 0 : _a._embedded) === null || _b === void 0 ? void 0 : _b.ontwerpTekststructuurDocumentComponenten[0]._embedded) === null || _c === void 0 ? void 0 : _c.ontwerpTekststructuurDocumentComponenten[10]._embedded) === null || _d === void 0 ? void 0 : _d.ontwerpTekststructuurDocumentComponenten[2]._embedded) === null || _e === void 0 ? void 0 : _e.ontwerpTekststructuurDocumentComponenten[0],
36
- (_j = (_h = (_g = (_f = this.response) === null || _f === void 0 ? void 0 : _f._embedded) === null || _g === void 0 ? void 0 : _g.ontwerpTekststructuurDocumentComponenten[0]._embedded) === null || _h === void 0 ? void 0 : _h.ontwerpTekststructuurDocumentComponenten[10]._embedded) === null || _j === void 0 ? void 0 : _j.ontwerpTekststructuurDocumentComponenten[0],
37
- ];
38
- this.notApplicable = [
39
- (_m = (_l = (_k = this.response) === null || _k === void 0 ? void 0 : _k._embedded) === null || _l === void 0 ? void 0 : _l.ontwerpTekststructuurDocumentComponenten[0]._embedded) === null || _m === void 0 ? void 0 : _m.ontwerpTekststructuurDocumentComponenten[4],
40
- (_r = (_q = (_p = (_o = this.response) === null || _o === void 0 ? void 0 : _o._embedded) === null || _p === void 0 ? void 0 : _p.ontwerpTekststructuurDocumentComponenten[0]._embedded) === null || _q === void 0 ? void 0 : _q.ontwerpTekststructuurDocumentComponenten[4]._embedded) === null || _r === void 0 ? void 0 : _r.ontwerpTekststructuurDocumentComponenten[0],
41
- (_v = (_u = (_t = (_s = this.response) === null || _s === void 0 ? void 0 : _s._embedded) === null || _t === void 0 ? void 0 : _t.ontwerpTekststructuurDocumentComponenten[0]._embedded) === null || _u === void 0 ? void 0 : _u.ontwerpTekststructuurDocumentComponenten[9]._embedded) === null || _v === void 0 ? void 0 : _v.ontwerpTekststructuurDocumentComponenten[1],
42
- ];
43
- /* eslint-enable @typescript-eslint/no-non-null-asserted-optional-chain */
44
- });
45
- }
46
- handleOpenToggle(e, documentComponent) {
47
- const isOpen = this.isOpen(documentComponent);
48
- if (e.detail.open && !isOpen) {
49
- this.open = [...this.open, documentComponent];
1662
+ const embeddedDocuments = [...((_a = this.getEmbeddedDocumentComponents(documentComponent)) !== null && _a !== void 0 ? _a : [])];
1663
+ for (const d of embeddedDocuments) {
1664
+ embeddedDocuments.push(...this.concatEmbeddedDocumentComponents(d));
50
1665
  }
51
- else if (!e.detail.open && isOpen) {
52
- this.open = this.open.filter((d) => d !== documentComponent);
1666
+ return embeddedDocuments;
1667
+ }
1668
+ selectRandomDocumentComponents(documentComponent, exclude = []) {
1669
+ const documentComponents = this.concatEmbeddedDocumentComponents(documentComponent).filter((d) => !exclude.includes(d));
1670
+ const size = lodash_random(0, Math.floor(documentComponents.length / 10));
1671
+ return lodash_samplesize(documentComponents, size);
1672
+ }
1673
+ async loadData() {
1674
+ var _a;
1675
+ if (!this.jsonFile) {
1676
+ this.response = undefined;
1677
+ return;
1678
+ }
1679
+ const data = await fetch(this.jsonFile).then((r) => r.json());
1680
+ const lichaam = (_a = this.getEmbeddedDocumentComponents(data)) === null || _a === void 0 ? void 0 : _a.find((documentComponent) => documentComponent.type === "LICHAAM");
1681
+ if (lichaam) {
1682
+ this.response = lichaam;
1683
+ this.notApplicable = this.selectRandomDocumentComponents(lichaam);
1684
+ this.filtered = this.selectRandomDocumentComponents(lichaam, this.notApplicable);
53
1685
  }
54
1686
  }
1687
+ handleOpenToggle(_e, documentComponent) {
1688
+ const isOpenOrClosed = this.openOrClosed.includes(documentComponent);
1689
+ this.openOrClosed = !isOpenOrClosed
1690
+ ? [...this.openOrClosed, documentComponent]
1691
+ : this.openOrClosed.filter((d) => d !== documentComponent);
1692
+ }
55
1693
  handleAnnotationToggle(documentComponent) {
56
1694
  this.openedAnnotation = this.isOpenedAnnotation(documentComponent)
57
1695
  ? this.openedAnnotation.filter((d) => d !== documentComponent)
58
1696
  : [...this.openedAnnotation, documentComponent];
59
1697
  if (!this.isOpen(documentComponent)) {
60
- this.open = [...this.open, documentComponent];
1698
+ this.openOrClosed = [...this.openOrClosed, documentComponent];
61
1699
  }
62
1700
  }
63
1701
  handleSelectableChange(documentComponent) {
@@ -65,16 +1703,21 @@ const DocumentComponentDemo = class {
65
1703
  ? this.activeAnnotationSelectables.filter((d) => d !== documentComponent)
66
1704
  : [...this.activeAnnotationSelectables, documentComponent];
67
1705
  }
1706
+ handleOzonContentAnchorClick(e) {
1707
+ this.dsotOzonContentAnchorClick.emit(e.detail);
1708
+ }
68
1709
  isCheckedSlideToggle(documentComponent) {
69
1710
  return this.activeAnnotationSelectables.includes(documentComponent);
70
1711
  }
71
1712
  hasFilteredChildren(documentComponent) {
72
1713
  var _a, _b;
73
1714
  return (this.filtered.includes(documentComponent) ||
74
- ((_b = (_a = documentComponent._embedded) === null || _a === void 0 ? void 0 : _a.ontwerpTekststructuurDocumentComponenten.some((d) => this.hasFilteredChildren(d))) !== null && _b !== void 0 ? _b : false));
1715
+ ((_b = (_a = this.getEmbeddedDocumentComponents(documentComponent)) === null || _a === void 0 ? void 0 : _a.some((d) => this.hasFilteredChildren(d))) !== null && _b !== void 0 ? _b : false));
75
1716
  }
76
1717
  isOpen(documentComponent) {
77
- return documentComponent.type === "LID" || this.open.includes(documentComponent);
1718
+ return documentComponent.type === "LID" || this.openDefault
1719
+ ? !this.openOrClosed.includes(documentComponent)
1720
+ : this.openOrClosed.includes(documentComponent);
78
1721
  }
79
1722
  isOpenedAnnotation(documentComponent) {
80
1723
  return this.openedAnnotation.includes(documentComponent);
@@ -87,19 +1730,23 @@ const DocumentComponentDemo = class {
87
1730
  }
88
1731
  hasNestedDraft(documentComponent) {
89
1732
  var _a, _b;
90
- return ((_b = (_a = documentComponent._embedded) === null || _a === void 0 ? void 0 : _a.ontwerpTekststructuurDocumentComponenten.some((d) => !!d.bevatOntwerpInformatie || this.hasNestedDraft(d))) !== null && _b !== void 0 ? _b : false);
1733
+ return ((_b = (_a = this.getEmbeddedDocumentComponents(documentComponent)) === null || _a === void 0 ? void 0 : _a.some((d) => !!d.bevatOntwerpInformatie || this.hasNestedDraft(d))) !== null && _b !== void 0 ? _b : false);
91
1734
  }
92
1735
  showContent(documentComponent) {
93
1736
  var _a;
94
1737
  return (this.isOpen(documentComponent) &&
95
- !!(((_a = documentComponent._embedded) === null || _a === void 0 ? void 0 : _a.ontwerpTekststructuurDocumentComponenten.length) || documentComponent.inhoud));
1738
+ !!(((_a = this.getEmbeddedDocumentComponents(documentComponent)) === null || _a === void 0 ? void 0 : _a.length) || documentComponent.inhoud));
96
1739
  }
97
1740
  render() {
98
- var _a, _b;
99
1741
  const { DocumentComponent } = this;
100
- return (h("div", { style: { margin: "0 8px", borderLeft: "1px dashed pink", borderRight: "1px dashed pink" } }, h("dso-responsive-element", { class: "dso-document-components" }, (_b = (_a = this.response) === null || _a === void 0 ? void 0 : _a._embedded) === null || _b === void 0 ? void 0 : _b.ontwerpTekststructuurDocumentComponenten.map((d) => (h(Fragment, null, h(DocumentComponent, { path: [d] }), h("hr", null)))))));
1742
+ return (h("dso-responsive-element", { class: "dso-document-components" }, this.response && h(DocumentComponent, { path: [this.response] })));
101
1743
  }
1744
+ static get watchers() { return {
1745
+ "jsonFile": ["jsonFileWatcher"],
1746
+ "openDefault": ["openDefaultWatcher"]
1747
+ }; }
102
1748
  };
1749
+ DocumentComponentDemo.style = documentComponentDemoCss;
103
1750
 
104
1751
  export { DocumentComponentDemo as dsot_document_component_demo };
105
1752