@vonage/vivid 3.0.0-next.3 → 3.0.0-next.30

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 (143) hide show
  1. package/README.md +49 -4
  2. package/accordion/index.js +61 -0
  3. package/accordion-item/index.js +133 -0
  4. package/action-group/index.js +49 -0
  5. package/badge/index.js +27 -22
  6. package/banner/index.js +148 -0
  7. package/breadcrumb/index.js +41 -150
  8. package/breadcrumb-item/index.js +18 -8
  9. package/button/index.js +40 -663
  10. package/calendar/index.js +1550 -0
  11. package/calendar-event/index.js +117 -0
  12. package/card/index.js +134 -0
  13. package/checkbox/index.js +176 -0
  14. package/elevation/index.js +4 -38
  15. package/fab/index.js +101 -0
  16. package/focus/index.js +20 -3
  17. package/header/index.js +68 -0
  18. package/icon/index.js +40 -5
  19. package/index.d.ts +1 -0
  20. package/index.js +50 -14
  21. package/layout/index.js +5 -5
  22. package/lib/accordion/accordion.d.ts +9 -0
  23. package/lib/accordion/accordion.template.d.ts +4 -0
  24. package/lib/accordion/index.d.ts +2 -0
  25. package/lib/accordion-item/accordion-item.d.ts +13 -0
  26. package/lib/accordion-item/accordion-item.template.d.ts +4 -0
  27. package/lib/accordion-item/index.d.ts +4 -0
  28. package/lib/action-group/action-group.d.ts +10 -0
  29. package/lib/action-group/action-group.template.d.ts +4 -0
  30. package/lib/action-group/index.d.ts +2 -0
  31. package/lib/badge/badge.d.ts +8 -8
  32. package/lib/badge/index.d.ts +1 -1
  33. package/lib/banner/banner.d.ts +20 -0
  34. package/lib/banner/banner.template.d.ts +4 -0
  35. package/lib/banner/index.d.ts +3 -0
  36. package/lib/breadcrumb/breadcrumb.template.d.ts +4 -0
  37. package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  38. package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +0 -1
  39. package/lib/breadcrumb-item/index.d.ts +2 -0
  40. package/lib/button/button.d.ts +9 -8
  41. package/lib/button/index.d.ts +2 -19
  42. package/lib/calendar/calendar.d.ts +13 -0
  43. package/lib/calendar/calendar.template.d.ts +4 -0
  44. package/lib/calendar/helpers/calendar.date-functions.d.ts +2 -0
  45. package/lib/calendar/helpers/calendar.event-context.d.ts +6 -0
  46. package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +9 -0
  47. package/lib/calendar/index.d.ts +2 -0
  48. package/lib/calendar-event/calendar-event.d.ts +14 -0
  49. package/lib/calendar-event/calendar-event.template.d.ts +4 -0
  50. package/lib/calendar-event/index.d.ts +2 -0
  51. package/lib/card/card.d.ts +10 -0
  52. package/lib/card/card.template.d.ts +4 -0
  53. package/lib/card/index.d.ts +4 -0
  54. package/lib/checkbox/checkbox.d.ts +5 -0
  55. package/lib/checkbox/checkbox.template.d.ts +4 -0
  56. package/lib/checkbox/index.d.ts +4 -0
  57. package/lib/components.d.ts +23 -5
  58. package/lib/elevation/elevation.d.ts +2 -1
  59. package/lib/elevation/index.d.ts +1 -1
  60. package/lib/enums.d.ts +14 -7
  61. package/lib/fab/fab.d.ts +13 -0
  62. package/lib/fab/fab.template.d.ts +4 -0
  63. package/lib/fab/index.d.ts +4 -0
  64. package/lib/focus/index.d.ts +1 -1
  65. package/lib/header/header.d.ts +5 -0
  66. package/lib/header/header.template.d.ts +4 -0
  67. package/lib/header/index.d.ts +3 -0
  68. package/lib/icon/icon.d.ts +4 -5
  69. package/lib/layout/index.d.ts +1 -1
  70. package/lib/layout/layout.d.ts +3 -3
  71. package/lib/note/index.d.ts +2 -0
  72. package/lib/note/note.d.ts +10 -0
  73. package/lib/note/note.template.d.ts +5 -0
  74. package/lib/popup/index.d.ts +4 -0
  75. package/lib/popup/popup.d.ts +17 -0
  76. package/lib/popup/popup.template.d.ts +4 -0
  77. package/lib/progress/index.d.ts +2 -0
  78. package/lib/progress/progress.d.ts +9 -0
  79. package/lib/progress/progress.template.d.ts +5 -0
  80. package/lib/progress-ring/index.d.ts +2 -0
  81. package/lib/progress-ring/progress-ring.d.ts +7 -0
  82. package/lib/progress-ring/progress-ring.template.d.ts +4 -0
  83. package/lib/side-drawer/index.d.ts +2 -0
  84. package/lib/side-drawer/side-drawer.d.ts +7 -0
  85. package/lib/side-drawer/side-drawer.template.d.ts +4 -0
  86. package/lib/sidenav/index.d.ts +2 -0
  87. package/lib/sidenav/sidenav.d.ts +3 -0
  88. package/lib/sidenav/sidenav.template.d.ts +4 -0
  89. package/lib/sidenav-item/index.d.ts +1 -0
  90. package/lib/sidenav-item/sidenav-item.d.ts +4 -5
  91. package/lib/text/index.d.ts +2 -0
  92. package/lib/text/text.d.ts +10 -0
  93. package/lib/text/text.template.d.ts +4 -0
  94. package/lib/text-anchor/text-anchor.d.ts +4 -1
  95. package/lib/text-field/index.d.ts +4 -0
  96. package/lib/text-field/text-field.d.ts +23 -0
  97. package/lib/text-field/text-field.template.d.ts +5 -0
  98. package/lib/tooltip/index.d.ts +3 -0
  99. package/lib/tooltip/tooltip.d.ts +8 -0
  100. package/lib/tooltip/tooltip.template.d.ts +4 -0
  101. package/note/index.js +68 -0
  102. package/package.json +36 -6
  103. package/popup/index.js +2110 -0
  104. package/progress/index.js +107 -0
  105. package/progress-ring/index.js +82 -0
  106. package/shared/_has.js +58 -0
  107. package/shared/affix.js +10 -25
  108. package/shared/anchor.js +10 -3
  109. package/shared/aria-global.js +20 -20
  110. package/shared/base-progress.js +70 -0
  111. package/shared/breadcrumb-item.js +2 -2
  112. package/shared/button.js +195 -0
  113. package/shared/calendar-event.js +26 -0
  114. package/shared/enums.js +79 -0
  115. package/shared/es.object.assign.js +69 -0
  116. package/shared/export.js +972 -0
  117. package/shared/focus.js +5 -0
  118. package/shared/focus2.js +11 -0
  119. package/shared/form-associated.js +547 -0
  120. package/shared/icon.js +1389 -0
  121. package/shared/index.js +4940 -1426
  122. package/shared/index2.js +27 -4901
  123. package/shared/iterators.js +61 -0
  124. package/shared/object-keys.js +13 -0
  125. package/shared/patterns/affix.d.ts +3 -4
  126. package/shared/patterns/focus.d.ts +3 -0
  127. package/shared/patterns/index.d.ts +1 -0
  128. package/shared/slotted.js +119 -0
  129. package/shared/text-anchor.js +12 -0
  130. package/shared/text-anchor.template.js +16 -6
  131. package/shared/to-string.js +51 -0
  132. package/shared/web.dom-collections.iterator.js +46 -1059
  133. package/shared/when.js +15 -0
  134. package/side-drawer/index.js +82 -0
  135. package/sidenav/index.js +17 -0
  136. package/sidenav-item/index.js +24 -61
  137. package/styles/themes/dark.css +16 -4
  138. package/styles/themes/light.css +16 -4
  139. package/text/index.js +48 -0
  140. package/text-anchor/index.js +13 -13
  141. package/text-field/index.js +411 -0
  142. package/tooltip/index.js +70 -0
  143. package/shared/index3.js +0 -21
@@ -0,0 +1,1550 @@
1
+ import { e as emptyArray, O as Observable, S as SubscriberSet, D as DOM, H as HTMLDirective, g as HTMLView, F as FoundationElement, c as __classPrivateFieldGet, _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
2
+ import { s as styleInject } from '../shared/style-inject.es.js';
3
+ import '../shared/web.dom-collections.iterator.js';
4
+ import { C as CalendarEvent } from '../shared/calendar-event.js';
5
+ import '../shared/es.object.assign.js';
6
+ import { b as _has, _ as _curry1, a as _curry2 } from '../shared/_has.js';
7
+ import '../shared/export.js';
8
+ import '../shared/object-keys.js';
9
+ import '../shared/iterators.js';
10
+
11
+ /** @internal */
12
+ function newSplice(index, removed, addedCount) {
13
+ return {
14
+ index: index,
15
+ removed: removed,
16
+ addedCount: addedCount,
17
+ };
18
+ }
19
+ const EDIT_LEAVE = 0;
20
+ const EDIT_UPDATE = 1;
21
+ const EDIT_ADD = 2;
22
+ const EDIT_DELETE = 3;
23
+ // Note: This function is *based* on the computation of the Levenshtein
24
+ // "edit" distance. The one change is that "updates" are treated as two
25
+ // edits - not one. With Array splices, an update is really a delete
26
+ // followed by an add. By retaining this, we optimize for "keeping" the
27
+ // maximum array items in the original array. For example:
28
+ //
29
+ // 'xxxx123' -> '123yyyy'
30
+ //
31
+ // With 1-edit updates, the shortest path would be just to update all seven
32
+ // characters. With 2-edit updates, we delete 4, leave 3, and add 4. This
33
+ // leaves the substring '123' intact.
34
+ function calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd) {
35
+ // "Deletion" columns
36
+ const rowCount = oldEnd - oldStart + 1;
37
+ const columnCount = currentEnd - currentStart + 1;
38
+ const distances = new Array(rowCount);
39
+ let north;
40
+ let west;
41
+ // "Addition" rows. Initialize null column.
42
+ for (let i = 0; i < rowCount; ++i) {
43
+ distances[i] = new Array(columnCount);
44
+ distances[i][0] = i;
45
+ }
46
+ // Initialize null row
47
+ for (let j = 0; j < columnCount; ++j) {
48
+ distances[0][j] = j;
49
+ }
50
+ for (let i = 1; i < rowCount; ++i) {
51
+ for (let j = 1; j < columnCount; ++j) {
52
+ if (current[currentStart + j - 1] === old[oldStart + i - 1]) {
53
+ distances[i][j] = distances[i - 1][j - 1];
54
+ }
55
+ else {
56
+ north = distances[i - 1][j] + 1;
57
+ west = distances[i][j - 1] + 1;
58
+ distances[i][j] = north < west ? north : west;
59
+ }
60
+ }
61
+ }
62
+ return distances;
63
+ }
64
+ // This starts at the final weight, and walks "backward" by finding
65
+ // the minimum previous weight recursively until the origin of the weight
66
+ // matrix.
67
+ function spliceOperationsFromEditDistances(distances) {
68
+ let i = distances.length - 1;
69
+ let j = distances[0].length - 1;
70
+ let current = distances[i][j];
71
+ const edits = [];
72
+ while (i > 0 || j > 0) {
73
+ if (i === 0) {
74
+ edits.push(EDIT_ADD);
75
+ j--;
76
+ continue;
77
+ }
78
+ if (j === 0) {
79
+ edits.push(EDIT_DELETE);
80
+ i--;
81
+ continue;
82
+ }
83
+ const northWest = distances[i - 1][j - 1];
84
+ const west = distances[i - 1][j];
85
+ const north = distances[i][j - 1];
86
+ let min;
87
+ if (west < north) {
88
+ min = west < northWest ? west : northWest;
89
+ }
90
+ else {
91
+ min = north < northWest ? north : northWest;
92
+ }
93
+ if (min === northWest) {
94
+ if (northWest === current) {
95
+ edits.push(EDIT_LEAVE);
96
+ }
97
+ else {
98
+ edits.push(EDIT_UPDATE);
99
+ current = northWest;
100
+ }
101
+ i--;
102
+ j--;
103
+ }
104
+ else if (min === west) {
105
+ edits.push(EDIT_DELETE);
106
+ i--;
107
+ current = west;
108
+ }
109
+ else {
110
+ edits.push(EDIT_ADD);
111
+ j--;
112
+ current = north;
113
+ }
114
+ }
115
+ edits.reverse();
116
+ return edits;
117
+ }
118
+ function sharedPrefix(current, old, searchLength) {
119
+ for (let i = 0; i < searchLength; ++i) {
120
+ if (current[i] !== old[i]) {
121
+ return i;
122
+ }
123
+ }
124
+ return searchLength;
125
+ }
126
+ function sharedSuffix(current, old, searchLength) {
127
+ let index1 = current.length;
128
+ let index2 = old.length;
129
+ let count = 0;
130
+ while (count < searchLength && current[--index1] === old[--index2]) {
131
+ count++;
132
+ }
133
+ return count;
134
+ }
135
+ function intersect(start1, end1, start2, end2) {
136
+ // Disjoint
137
+ if (end1 < start2 || end2 < start1) {
138
+ return -1;
139
+ }
140
+ // Adjacent
141
+ if (end1 === start2 || end2 === start1) {
142
+ return 0;
143
+ }
144
+ // Non-zero intersect, span1 first
145
+ if (start1 < start2) {
146
+ if (end1 < end2) {
147
+ return end1 - start2; // Overlap
148
+ }
149
+ return end2 - start2; // Contained
150
+ }
151
+ // Non-zero intersect, span2 first
152
+ if (end2 < end1) {
153
+ return end2 - start1; // Overlap
154
+ }
155
+ return end1 - start1; // Contained
156
+ }
157
+ /**
158
+ * Splice Projection functions:
159
+ *
160
+ * A splice map is a representation of how a previous array of items
161
+ * was transformed into a new array of items. Conceptually it is a list of
162
+ * tuples of
163
+ *
164
+ * <index, removed, addedCount>
165
+ *
166
+ * which are kept in ascending index order of. The tuple represents that at
167
+ * the |index|, |removed| sequence of items were removed, and counting forward
168
+ * from |index|, |addedCount| items were added.
169
+ */
170
+ /**
171
+ * @internal
172
+ * @remarks
173
+ * Lacking individual splice mutation information, the minimal set of
174
+ * splices can be synthesized given the previous state and final state of an
175
+ * array. The basic approach is to calculate the edit distance matrix and
176
+ * choose the shortest path through it.
177
+ *
178
+ * Complexity: O(l * p)
179
+ * l: The length of the current array
180
+ * p: The length of the old array
181
+ */
182
+ function calcSplices(current, currentStart, currentEnd, old, oldStart, oldEnd) {
183
+ let prefixCount = 0;
184
+ let suffixCount = 0;
185
+ const minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);
186
+ if (currentStart === 0 && oldStart === 0) {
187
+ prefixCount = sharedPrefix(current, old, minLength);
188
+ }
189
+ if (currentEnd === current.length && oldEnd === old.length) {
190
+ suffixCount = sharedSuffix(current, old, minLength - prefixCount);
191
+ }
192
+ currentStart += prefixCount;
193
+ oldStart += prefixCount;
194
+ currentEnd -= suffixCount;
195
+ oldEnd -= suffixCount;
196
+ if (currentEnd - currentStart === 0 && oldEnd - oldStart === 0) {
197
+ return emptyArray;
198
+ }
199
+ if (currentStart === currentEnd) {
200
+ const splice = newSplice(currentStart, [], 0);
201
+ while (oldStart < oldEnd) {
202
+ splice.removed.push(old[oldStart++]);
203
+ }
204
+ return [splice];
205
+ }
206
+ else if (oldStart === oldEnd) {
207
+ return [newSplice(currentStart, [], currentEnd - currentStart)];
208
+ }
209
+ const ops = spliceOperationsFromEditDistances(calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd));
210
+ const splices = [];
211
+ let splice = void 0;
212
+ let index = currentStart;
213
+ let oldIndex = oldStart;
214
+ for (let i = 0; i < ops.length; ++i) {
215
+ switch (ops[i]) {
216
+ case EDIT_LEAVE:
217
+ if (splice !== void 0) {
218
+ splices.push(splice);
219
+ splice = void 0;
220
+ }
221
+ index++;
222
+ oldIndex++;
223
+ break;
224
+ case EDIT_UPDATE:
225
+ if (splice === void 0) {
226
+ splice = newSplice(index, [], 0);
227
+ }
228
+ splice.addedCount++;
229
+ index++;
230
+ splice.removed.push(old[oldIndex]);
231
+ oldIndex++;
232
+ break;
233
+ case EDIT_ADD:
234
+ if (splice === void 0) {
235
+ splice = newSplice(index, [], 0);
236
+ }
237
+ splice.addedCount++;
238
+ index++;
239
+ break;
240
+ case EDIT_DELETE:
241
+ if (splice === void 0) {
242
+ splice = newSplice(index, [], 0);
243
+ }
244
+ splice.removed.push(old[oldIndex]);
245
+ oldIndex++;
246
+ break;
247
+ // no default
248
+ }
249
+ }
250
+ if (splice !== void 0) {
251
+ splices.push(splice);
252
+ }
253
+ return splices;
254
+ }
255
+ const $push = Array.prototype.push;
256
+ function mergeSplice(splices, index, removed, addedCount) {
257
+ const splice = newSplice(index, removed, addedCount);
258
+ let inserted = false;
259
+ let insertionOffset = 0;
260
+ for (let i = 0; i < splices.length; i++) {
261
+ const current = splices[i];
262
+ current.index += insertionOffset;
263
+ if (inserted) {
264
+ continue;
265
+ }
266
+ const intersectCount = intersect(splice.index, splice.index + splice.removed.length, current.index, current.index + current.addedCount);
267
+ if (intersectCount >= 0) {
268
+ // Merge the two splices
269
+ splices.splice(i, 1);
270
+ i--;
271
+ insertionOffset -= current.addedCount - current.removed.length;
272
+ splice.addedCount += current.addedCount - intersectCount;
273
+ const deleteCount = splice.removed.length + current.removed.length - intersectCount;
274
+ if (!splice.addedCount && !deleteCount) {
275
+ // merged splice is a noop. discard.
276
+ inserted = true;
277
+ }
278
+ else {
279
+ let currentRemoved = current.removed;
280
+ if (splice.index < current.index) {
281
+ // some prefix of splice.removed is prepended to current.removed.
282
+ const prepend = splice.removed.slice(0, current.index - splice.index);
283
+ $push.apply(prepend, currentRemoved);
284
+ currentRemoved = prepend;
285
+ }
286
+ if (splice.index + splice.removed.length >
287
+ current.index + current.addedCount) {
288
+ // some suffix of splice.removed is appended to current.removed.
289
+ const append = splice.removed.slice(current.index + current.addedCount - splice.index);
290
+ $push.apply(currentRemoved, append);
291
+ }
292
+ splice.removed = currentRemoved;
293
+ if (current.index < splice.index) {
294
+ splice.index = current.index;
295
+ }
296
+ }
297
+ }
298
+ else if (splice.index < current.index) {
299
+ // Insert splice here.
300
+ inserted = true;
301
+ splices.splice(i, 0, splice);
302
+ i++;
303
+ const offset = splice.addedCount - splice.removed.length;
304
+ current.index += offset;
305
+ insertionOffset += offset;
306
+ }
307
+ }
308
+ if (!inserted) {
309
+ splices.push(splice);
310
+ }
311
+ }
312
+ function createInitialSplices(changeRecords) {
313
+ const splices = [];
314
+ for (let i = 0, ii = changeRecords.length; i < ii; i++) {
315
+ const record = changeRecords[i];
316
+ mergeSplice(splices, record.index, record.removed, record.addedCount);
317
+ }
318
+ return splices;
319
+ }
320
+ /** @internal */
321
+ function projectArraySplices(array, changeRecords) {
322
+ let splices = [];
323
+ const initialSplices = createInitialSplices(changeRecords);
324
+ for (let i = 0, ii = initialSplices.length; i < ii; ++i) {
325
+ const splice = initialSplices[i];
326
+ if (splice.addedCount === 1 && splice.removed.length === 1) {
327
+ if (splice.removed[0] !== array[splice.index]) {
328
+ splices.push(splice);
329
+ }
330
+ continue;
331
+ }
332
+ splices = splices.concat(calcSplices(array, splice.index, splice.index + splice.addedCount, splice.removed, 0, splice.removed.length));
333
+ }
334
+ return splices;
335
+ }
336
+
337
+ let arrayObservationEnabled = false;
338
+ function adjustIndex(changeRecord, array) {
339
+ let index = changeRecord.index;
340
+ const arrayLength = array.length;
341
+ if (index > arrayLength) {
342
+ index = arrayLength - changeRecord.addedCount;
343
+ }
344
+ else if (index < 0) {
345
+ index =
346
+ arrayLength + changeRecord.removed.length + index - changeRecord.addedCount;
347
+ }
348
+ if (index < 0) {
349
+ index = 0;
350
+ }
351
+ changeRecord.index = index;
352
+ return changeRecord;
353
+ }
354
+ class ArrayObserver extends SubscriberSet {
355
+ constructor(source) {
356
+ super(source);
357
+ this.oldCollection = void 0;
358
+ this.splices = void 0;
359
+ this.needsQueue = true;
360
+ this.call = this.flush;
361
+ Reflect.defineProperty(source, "$fastController", {
362
+ value: this,
363
+ enumerable: false,
364
+ });
365
+ }
366
+ subscribe(subscriber) {
367
+ this.flush();
368
+ super.subscribe(subscriber);
369
+ }
370
+ addSplice(splice) {
371
+ if (this.splices === void 0) {
372
+ this.splices = [splice];
373
+ }
374
+ else {
375
+ this.splices.push(splice);
376
+ }
377
+ if (this.needsQueue) {
378
+ this.needsQueue = false;
379
+ DOM.queueUpdate(this);
380
+ }
381
+ }
382
+ reset(oldCollection) {
383
+ this.oldCollection = oldCollection;
384
+ if (this.needsQueue) {
385
+ this.needsQueue = false;
386
+ DOM.queueUpdate(this);
387
+ }
388
+ }
389
+ flush() {
390
+ const splices = this.splices;
391
+ const oldCollection = this.oldCollection;
392
+ if (splices === void 0 && oldCollection === void 0) {
393
+ return;
394
+ }
395
+ this.needsQueue = true;
396
+ this.splices = void 0;
397
+ this.oldCollection = void 0;
398
+ const finalSplices = oldCollection === void 0
399
+ ? projectArraySplices(this.source, splices)
400
+ : calcSplices(this.source, 0, this.source.length, oldCollection, 0, oldCollection.length);
401
+ this.notify(finalSplices);
402
+ }
403
+ }
404
+ /* eslint-disable prefer-rest-params */
405
+ /* eslint-disable @typescript-eslint/explicit-function-return-type */
406
+ /**
407
+ * Enables the array observation mechanism.
408
+ * @remarks
409
+ * Array observation is enabled automatically when using the
410
+ * {@link RepeatDirective}, so calling this API manually is
411
+ * not typically necessary.
412
+ * @public
413
+ */
414
+ function enableArrayObservation() {
415
+ if (arrayObservationEnabled) {
416
+ return;
417
+ }
418
+ arrayObservationEnabled = true;
419
+ Observable.setArrayObserverFactory((collection) => {
420
+ return new ArrayObserver(collection);
421
+ });
422
+ const proto = Array.prototype;
423
+ // Don't patch Array if it has already been patched
424
+ // by another copy of fast-element.
425
+ if (proto.$fastPatch) {
426
+ return;
427
+ }
428
+ Reflect.defineProperty(proto, "$fastPatch", {
429
+ value: 1,
430
+ enumerable: false,
431
+ });
432
+ const pop = proto.pop;
433
+ const push = proto.push;
434
+ const reverse = proto.reverse;
435
+ const shift = proto.shift;
436
+ const sort = proto.sort;
437
+ const splice = proto.splice;
438
+ const unshift = proto.unshift;
439
+ proto.pop = function () {
440
+ const notEmpty = this.length > 0;
441
+ const methodCallResult = pop.apply(this, arguments);
442
+ const o = this.$fastController;
443
+ if (o !== void 0 && notEmpty) {
444
+ o.addSplice(newSplice(this.length, [methodCallResult], 0));
445
+ }
446
+ return methodCallResult;
447
+ };
448
+ proto.push = function () {
449
+ const methodCallResult = push.apply(this, arguments);
450
+ const o = this.$fastController;
451
+ if (o !== void 0) {
452
+ o.addSplice(adjustIndex(newSplice(this.length - arguments.length, [], arguments.length), this));
453
+ }
454
+ return methodCallResult;
455
+ };
456
+ proto.reverse = function () {
457
+ let oldArray;
458
+ const o = this.$fastController;
459
+ if (o !== void 0) {
460
+ o.flush();
461
+ oldArray = this.slice();
462
+ }
463
+ const methodCallResult = reverse.apply(this, arguments);
464
+ if (o !== void 0) {
465
+ o.reset(oldArray);
466
+ }
467
+ return methodCallResult;
468
+ };
469
+ proto.shift = function () {
470
+ const notEmpty = this.length > 0;
471
+ const methodCallResult = shift.apply(this, arguments);
472
+ const o = this.$fastController;
473
+ if (o !== void 0 && notEmpty) {
474
+ o.addSplice(newSplice(0, [methodCallResult], 0));
475
+ }
476
+ return methodCallResult;
477
+ };
478
+ proto.sort = function () {
479
+ let oldArray;
480
+ const o = this.$fastController;
481
+ if (o !== void 0) {
482
+ o.flush();
483
+ oldArray = this.slice();
484
+ }
485
+ const methodCallResult = sort.apply(this, arguments);
486
+ if (o !== void 0) {
487
+ o.reset(oldArray);
488
+ }
489
+ return methodCallResult;
490
+ };
491
+ proto.splice = function () {
492
+ const methodCallResult = splice.apply(this, arguments);
493
+ const o = this.$fastController;
494
+ if (o !== void 0) {
495
+ o.addSplice(adjustIndex(newSplice(+arguments[0], methodCallResult, arguments.length > 2 ? arguments.length - 2 : 0), this));
496
+ }
497
+ return methodCallResult;
498
+ };
499
+ proto.unshift = function () {
500
+ const methodCallResult = unshift.apply(this, arguments);
501
+ const o = this.$fastController;
502
+ if (o !== void 0) {
503
+ o.addSplice(adjustIndex(newSplice(0, [], arguments.length), this));
504
+ }
505
+ return methodCallResult;
506
+ };
507
+ }
508
+ /* eslint-enable prefer-rest-params */
509
+ /* eslint-enable @typescript-eslint/explicit-function-return-type */
510
+
511
+ const defaultRepeatOptions = Object.freeze({
512
+ positioning: false,
513
+ recycle: true,
514
+ });
515
+ function bindWithoutPositioning(view, items, index, context) {
516
+ view.bind(items[index], context);
517
+ }
518
+ function bindWithPositioning(view, items, index, context) {
519
+ const childContext = Object.create(context);
520
+ childContext.index = index;
521
+ childContext.length = items.length;
522
+ view.bind(items[index], childContext);
523
+ }
524
+ /**
525
+ * A behavior that renders a template for each item in an array.
526
+ * @public
527
+ */
528
+ class RepeatBehavior {
529
+ /**
530
+ * Creates an instance of RepeatBehavior.
531
+ * @param location - The location in the DOM to render the repeat.
532
+ * @param itemsBinding - The array to render.
533
+ * @param isItemsBindingVolatile - Indicates whether the items binding has volatile dependencies.
534
+ * @param templateBinding - The template to render for each item.
535
+ * @param isTemplateBindingVolatile - Indicates whether the template binding has volatile dependencies.
536
+ * @param options - Options used to turn on special repeat features.
537
+ */
538
+ constructor(location, itemsBinding, isItemsBindingVolatile, templateBinding, isTemplateBindingVolatile, options) {
539
+ this.location = location;
540
+ this.itemsBinding = itemsBinding;
541
+ this.templateBinding = templateBinding;
542
+ this.options = options;
543
+ this.source = null;
544
+ this.views = [];
545
+ this.items = null;
546
+ this.itemsObserver = null;
547
+ this.originalContext = void 0;
548
+ this.childContext = void 0;
549
+ this.bindView = bindWithoutPositioning;
550
+ this.itemsBindingObserver = Observable.binding(itemsBinding, this, isItemsBindingVolatile);
551
+ this.templateBindingObserver = Observable.binding(templateBinding, this, isTemplateBindingVolatile);
552
+ if (options.positioning) {
553
+ this.bindView = bindWithPositioning;
554
+ }
555
+ }
556
+ /**
557
+ * Bind this behavior to the source.
558
+ * @param source - The source to bind to.
559
+ * @param context - The execution context that the binding is operating within.
560
+ */
561
+ bind(source, context) {
562
+ this.source = source;
563
+ this.originalContext = context;
564
+ this.childContext = Object.create(context);
565
+ this.childContext.parent = source;
566
+ this.childContext.parentContext = this.originalContext;
567
+ this.items = this.itemsBindingObserver.observe(source, this.originalContext);
568
+ this.template = this.templateBindingObserver.observe(source, this.originalContext);
569
+ this.observeItems(true);
570
+ this.refreshAllViews();
571
+ }
572
+ /**
573
+ * Unbinds this behavior from the source.
574
+ * @param source - The source to unbind from.
575
+ */
576
+ unbind() {
577
+ this.source = null;
578
+ this.items = null;
579
+ if (this.itemsObserver !== null) {
580
+ this.itemsObserver.unsubscribe(this);
581
+ }
582
+ this.unbindAllViews();
583
+ this.itemsBindingObserver.disconnect();
584
+ this.templateBindingObserver.disconnect();
585
+ }
586
+ /** @internal */
587
+ handleChange(source, args) {
588
+ if (source === this.itemsBinding) {
589
+ this.items = this.itemsBindingObserver.observe(this.source, this.originalContext);
590
+ this.observeItems();
591
+ this.refreshAllViews();
592
+ }
593
+ else if (source === this.templateBinding) {
594
+ this.template = this.templateBindingObserver.observe(this.source, this.originalContext);
595
+ this.refreshAllViews(true);
596
+ }
597
+ else {
598
+ this.updateViews(args);
599
+ }
600
+ }
601
+ observeItems(force = false) {
602
+ if (!this.items) {
603
+ this.items = emptyArray;
604
+ return;
605
+ }
606
+ const oldObserver = this.itemsObserver;
607
+ const newObserver = (this.itemsObserver = Observable.getNotifier(this.items));
608
+ const hasNewObserver = oldObserver !== newObserver;
609
+ if (hasNewObserver && oldObserver !== null) {
610
+ oldObserver.unsubscribe(this);
611
+ }
612
+ if (hasNewObserver || force) {
613
+ newObserver.subscribe(this);
614
+ }
615
+ }
616
+ updateViews(splices) {
617
+ const childContext = this.childContext;
618
+ const views = this.views;
619
+ const totalRemoved = [];
620
+ const bindView = this.bindView;
621
+ let removeDelta = 0;
622
+ for (let i = 0, ii = splices.length; i < ii; ++i) {
623
+ const splice = splices[i];
624
+ const removed = splice.removed;
625
+ totalRemoved.push(...views.splice(splice.index + removeDelta, removed.length));
626
+ removeDelta -= splice.addedCount;
627
+ }
628
+ const items = this.items;
629
+ const template = this.template;
630
+ for (let i = 0, ii = splices.length; i < ii; ++i) {
631
+ const splice = splices[i];
632
+ let addIndex = splice.index;
633
+ const end = addIndex + splice.addedCount;
634
+ for (; addIndex < end; ++addIndex) {
635
+ const neighbor = views[addIndex];
636
+ const location = neighbor ? neighbor.firstChild : this.location;
637
+ const view = this.options.recycle && totalRemoved.length > 0
638
+ ? totalRemoved.shift()
639
+ : template.create();
640
+ views.splice(addIndex, 0, view);
641
+ bindView(view, items, addIndex, childContext);
642
+ view.insertBefore(location);
643
+ }
644
+ }
645
+ for (let i = 0, ii = totalRemoved.length; i < ii; ++i) {
646
+ totalRemoved[i].dispose();
647
+ }
648
+ if (this.options.positioning) {
649
+ for (let i = 0, ii = views.length; i < ii; ++i) {
650
+ const currentContext = views[i].context;
651
+ currentContext.length = ii;
652
+ currentContext.index = i;
653
+ }
654
+ }
655
+ }
656
+ refreshAllViews(templateChanged = false) {
657
+ const items = this.items;
658
+ const childContext = this.childContext;
659
+ const template = this.template;
660
+ const location = this.location;
661
+ const bindView = this.bindView;
662
+ let itemsLength = items.length;
663
+ let views = this.views;
664
+ let viewsLength = views.length;
665
+ if (itemsLength === 0 || templateChanged) {
666
+ // all views need to be removed
667
+ HTMLView.disposeContiguousBatch(views);
668
+ viewsLength = 0;
669
+ }
670
+ if (viewsLength === 0) {
671
+ // all views need to be created
672
+ this.views = views = new Array(itemsLength);
673
+ for (let i = 0; i < itemsLength; ++i) {
674
+ const view = template.create();
675
+ bindView(view, items, i, childContext);
676
+ views[i] = view;
677
+ view.insertBefore(location);
678
+ }
679
+ }
680
+ else {
681
+ // attempt to reuse existing views with new data
682
+ let i = 0;
683
+ for (; i < itemsLength; ++i) {
684
+ if (i < viewsLength) {
685
+ const view = views[i];
686
+ bindView(view, items, i, childContext);
687
+ }
688
+ else {
689
+ const view = template.create();
690
+ bindView(view, items, i, childContext);
691
+ views.push(view);
692
+ view.insertBefore(location);
693
+ }
694
+ }
695
+ const removed = views.splice(i, viewsLength - i);
696
+ for (i = 0, itemsLength = removed.length; i < itemsLength; ++i) {
697
+ removed[i].dispose();
698
+ }
699
+ }
700
+ }
701
+ unbindAllViews() {
702
+ const views = this.views;
703
+ for (let i = 0, ii = views.length; i < ii; ++i) {
704
+ views[i].unbind();
705
+ }
706
+ }
707
+ }
708
+ /**
709
+ * A directive that configures list rendering.
710
+ * @public
711
+ */
712
+ class RepeatDirective extends HTMLDirective {
713
+ /**
714
+ * Creates an instance of RepeatDirective.
715
+ * @param itemsBinding - The binding that provides the array to render.
716
+ * @param templateBinding - The template binding used to obtain a template to render for each item in the array.
717
+ * @param options - Options used to turn on special repeat features.
718
+ */
719
+ constructor(itemsBinding, templateBinding, options) {
720
+ super();
721
+ this.itemsBinding = itemsBinding;
722
+ this.templateBinding = templateBinding;
723
+ this.options = options;
724
+ /**
725
+ * Creates a placeholder string based on the directive's index within the template.
726
+ * @param index - The index of the directive within the template.
727
+ */
728
+ this.createPlaceholder = DOM.createBlockPlaceholder;
729
+ enableArrayObservation();
730
+ this.isItemsBindingVolatile = Observable.isVolatileBinding(itemsBinding);
731
+ this.isTemplateBindingVolatile = Observable.isVolatileBinding(templateBinding);
732
+ }
733
+ /**
734
+ * Creates a behavior for the provided target node.
735
+ * @param target - The node instance to create the behavior for.
736
+ */
737
+ createBehavior(target) {
738
+ return new RepeatBehavior(target, this.itemsBinding, this.isItemsBindingVolatile, this.templateBinding, this.isTemplateBindingVolatile, this.options);
739
+ }
740
+ }
741
+ /**
742
+ * A directive that enables list rendering.
743
+ * @param itemsBinding - The array to render.
744
+ * @param templateOrTemplateBinding - The template or a template binding used obtain a template
745
+ * to render for each item in the array.
746
+ * @param options - Options used to turn on special repeat features.
747
+ * @public
748
+ */
749
+ function repeat(itemsBinding, templateOrTemplateBinding, options = defaultRepeatOptions) {
750
+ const templateBinding = typeof templateOrTemplateBinding === "function"
751
+ ? templateOrTemplateBinding
752
+ : () => templateOrTemplateBinding;
753
+ return new RepeatDirective(itemsBinding, templateBinding, options);
754
+ }
755
+
756
+ /**
757
+ * Tests whether or not an object is an array.
758
+ *
759
+ * @private
760
+ * @param {*} val The object to test.
761
+ * @return {Boolean} `true` if `val` is an array, `false` otherwise.
762
+ * @example
763
+ *
764
+ * _isArray([]); //=> true
765
+ * _isArray(null); //=> false
766
+ * _isArray({}); //=> false
767
+ */
768
+ var _isArray = Array.isArray || function _isArray(val) {
769
+ return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';
770
+ };
771
+
772
+ function _isString(x) {
773
+ return Object.prototype.toString.call(x) === '[object String]';
774
+ }
775
+
776
+ var toString = Object.prototype.toString;
777
+
778
+ var _isArguments =
779
+ /*#__PURE__*/
780
+ function () {
781
+ return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {
782
+ return toString.call(x) === '[object Arguments]';
783
+ } : function _isArguments(x) {
784
+ return _has('callee', x);
785
+ };
786
+ }();
787
+
788
+ var _isArguments$1 = _isArguments;
789
+
790
+ var hasEnumBug = !
791
+ /*#__PURE__*/
792
+ {
793
+ toString: null
794
+ }.propertyIsEnumerable('toString');
795
+ var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug
796
+
797
+ var hasArgsEnumBug =
798
+ /*#__PURE__*/
799
+ function () {
800
+
801
+ return arguments.propertyIsEnumerable('length');
802
+ }();
803
+
804
+ var contains = function contains(list, item) {
805
+ var idx = 0;
806
+
807
+ while (idx < list.length) {
808
+ if (list[idx] === item) {
809
+ return true;
810
+ }
811
+
812
+ idx += 1;
813
+ }
814
+
815
+ return false;
816
+ };
817
+ /**
818
+ * Returns a list containing the names of all the enumerable own properties of
819
+ * the supplied object.
820
+ * Note that the order of the output array is not guaranteed to be consistent
821
+ * across different JS platforms.
822
+ *
823
+ * @func
824
+ * @memberOf R
825
+ * @since v0.1.0
826
+ * @category Object
827
+ * @sig {k: v} -> [k]
828
+ * @param {Object} obj The object to extract properties from
829
+ * @return {Array} An array of the object's own properties.
830
+ * @see R.keysIn, R.values
831
+ * @example
832
+ *
833
+ * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']
834
+ */
835
+
836
+
837
+ var keys = typeof Object.keys === 'function' && !hasArgsEnumBug ?
838
+ /*#__PURE__*/
839
+ _curry1(function keys(obj) {
840
+ return Object(obj) !== obj ? [] : Object.keys(obj);
841
+ }) :
842
+ /*#__PURE__*/
843
+ _curry1(function keys(obj) {
844
+ if (Object(obj) !== obj) {
845
+ return [];
846
+ }
847
+
848
+ var prop, nIdx;
849
+ var ks = [];
850
+
851
+ var checkArgsLength = hasArgsEnumBug && _isArguments$1(obj);
852
+
853
+ for (prop in obj) {
854
+ if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {
855
+ ks[ks.length] = prop;
856
+ }
857
+ }
858
+
859
+ if (hasEnumBug) {
860
+ nIdx = nonEnumerableProps.length - 1;
861
+
862
+ while (nIdx >= 0) {
863
+ prop = nonEnumerableProps[nIdx];
864
+
865
+ if (_has(prop, obj) && !contains(ks, prop)) {
866
+ ks[ks.length] = prop;
867
+ }
868
+
869
+ nIdx -= 1;
870
+ }
871
+ }
872
+
873
+ return ks;
874
+ });
875
+ var keys$1 = keys;
876
+
877
+ /**
878
+ * Gives a single-word string description of the (native) type of a value,
879
+ * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not
880
+ * attempt to distinguish user Object types any further, reporting them all as
881
+ * 'Object'.
882
+ *
883
+ * @func
884
+ * @memberOf R
885
+ * @since v0.8.0
886
+ * @category Type
887
+ * @sig (* -> {*}) -> String
888
+ * @param {*} val The value to test
889
+ * @return {String}
890
+ * @example
891
+ *
892
+ * R.type({}); //=> "Object"
893
+ * R.type(1); //=> "Number"
894
+ * R.type(false); //=> "Boolean"
895
+ * R.type('s'); //=> "String"
896
+ * R.type(null); //=> "Null"
897
+ * R.type([]); //=> "Array"
898
+ * R.type(/[A-z]/); //=> "RegExp"
899
+ * R.type(() => {}); //=> "Function"
900
+ * R.type(undefined); //=> "Undefined"
901
+ */
902
+
903
+ var type =
904
+ /*#__PURE__*/
905
+ _curry1(function type(val) {
906
+ return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);
907
+ });
908
+
909
+ var type$1 = type;
910
+
911
+ /**
912
+ * A function that returns the `!` of its argument. It will return `true` when
913
+ * passed false-y value, and `false` when passed a truth-y one.
914
+ *
915
+ * @func
916
+ * @memberOf R
917
+ * @since v0.1.0
918
+ * @category Logic
919
+ * @sig * -> Boolean
920
+ * @param {*} a any value
921
+ * @return {Boolean} the logical inverse of passed argument.
922
+ * @see R.complement
923
+ * @example
924
+ *
925
+ * R.not(true); //=> false
926
+ * R.not(false); //=> true
927
+ * R.not(0); //=> true
928
+ * R.not(1); //=> false
929
+ */
930
+
931
+ var not =
932
+ /*#__PURE__*/
933
+ _curry1(function not(a) {
934
+ return !a;
935
+ });
936
+
937
+ var not$1 = not;
938
+
939
+ function _arrayFromIterator(iter) {
940
+ var list = [];
941
+ var next;
942
+
943
+ while (!(next = iter.next()).done) {
944
+ list.push(next.value);
945
+ }
946
+
947
+ return list;
948
+ }
949
+
950
+ function _includesWith(pred, x, list) {
951
+ var idx = 0;
952
+ var len = list.length;
953
+
954
+ while (idx < len) {
955
+ if (pred(x, list[idx])) {
956
+ return true;
957
+ }
958
+
959
+ idx += 1;
960
+ }
961
+
962
+ return false;
963
+ }
964
+
965
+ function _functionName(f) {
966
+ // String(x => x) evaluates to "x => x", so the pattern may not match.
967
+ var match = String(f).match(/^function (\w*)/);
968
+ return match == null ? '' : match[1];
969
+ }
970
+
971
+ // Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
972
+ function _objectIs(a, b) {
973
+ // SameValue algorithm
974
+ if (a === b) {
975
+ // Steps 1-5, 7-10
976
+ // Steps 6.b-6.e: +0 != -0
977
+ return a !== 0 || 1 / a === 1 / b;
978
+ } else {
979
+ // Step 6.a: NaN == NaN
980
+ return a !== a && b !== b;
981
+ }
982
+ }
983
+
984
+ var _objectIs$1 = typeof Object.is === 'function' ? Object.is : _objectIs;
985
+
986
+ /**
987
+ * private _uniqContentEquals function.
988
+ * That function is checking equality of 2 iterator contents with 2 assumptions
989
+ * - iterators lengths are the same
990
+ * - iterators values are unique
991
+ *
992
+ * false-positive result will be returned for comparision of, e.g.
993
+ * - [1,2,3] and [1,2,3,4]
994
+ * - [1,1,1] and [1,2,3]
995
+ * */
996
+
997
+ function _uniqContentEquals(aIterator, bIterator, stackA, stackB) {
998
+ var a = _arrayFromIterator(aIterator);
999
+
1000
+ var b = _arrayFromIterator(bIterator);
1001
+
1002
+ function eq(_a, _b) {
1003
+ return _equals(_a, _b, stackA.slice(), stackB.slice());
1004
+ } // if *a* array contains any element that is not included in *b*
1005
+
1006
+
1007
+ return !_includesWith(function (b, aItem) {
1008
+ return !_includesWith(eq, aItem, b);
1009
+ }, b, a);
1010
+ }
1011
+
1012
+ function _equals(a, b, stackA, stackB) {
1013
+ if (_objectIs$1(a, b)) {
1014
+ return true;
1015
+ }
1016
+
1017
+ var typeA = type$1(a);
1018
+
1019
+ if (typeA !== type$1(b)) {
1020
+ return false;
1021
+ }
1022
+
1023
+ if (a == null || b == null) {
1024
+ return false;
1025
+ }
1026
+
1027
+ if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {
1028
+ return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);
1029
+ }
1030
+
1031
+ if (typeof a.equals === 'function' || typeof b.equals === 'function') {
1032
+ return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);
1033
+ }
1034
+
1035
+ switch (typeA) {
1036
+ case 'Arguments':
1037
+ case 'Array':
1038
+ case 'Object':
1039
+ if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') {
1040
+ return a === b;
1041
+ }
1042
+
1043
+ break;
1044
+
1045
+ case 'Boolean':
1046
+ case 'Number':
1047
+ case 'String':
1048
+ if (!(typeof a === typeof b && _objectIs$1(a.valueOf(), b.valueOf()))) {
1049
+ return false;
1050
+ }
1051
+
1052
+ break;
1053
+
1054
+ case 'Date':
1055
+ if (!_objectIs$1(a.valueOf(), b.valueOf())) {
1056
+ return false;
1057
+ }
1058
+
1059
+ break;
1060
+
1061
+ case 'Error':
1062
+ return a.name === b.name && a.message === b.message;
1063
+
1064
+ case 'RegExp':
1065
+ if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {
1066
+ return false;
1067
+ }
1068
+
1069
+ break;
1070
+ }
1071
+
1072
+ var idx = stackA.length - 1;
1073
+
1074
+ while (idx >= 0) {
1075
+ if (stackA[idx] === a) {
1076
+ return stackB[idx] === b;
1077
+ }
1078
+
1079
+ idx -= 1;
1080
+ }
1081
+
1082
+ switch (typeA) {
1083
+ case 'Map':
1084
+ if (a.size !== b.size) {
1085
+ return false;
1086
+ }
1087
+
1088
+ return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));
1089
+
1090
+ case 'Set':
1091
+ if (a.size !== b.size) {
1092
+ return false;
1093
+ }
1094
+
1095
+ return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));
1096
+
1097
+ case 'Arguments':
1098
+ case 'Array':
1099
+ case 'Object':
1100
+ case 'Boolean':
1101
+ case 'Number':
1102
+ case 'String':
1103
+ case 'Date':
1104
+ case 'Error':
1105
+ case 'RegExp':
1106
+ case 'Int8Array':
1107
+ case 'Uint8Array':
1108
+ case 'Uint8ClampedArray':
1109
+ case 'Int16Array':
1110
+ case 'Uint16Array':
1111
+ case 'Int32Array':
1112
+ case 'Uint32Array':
1113
+ case 'Float32Array':
1114
+ case 'Float64Array':
1115
+ case 'ArrayBuffer':
1116
+ break;
1117
+
1118
+ default:
1119
+ // Values of other types are only equal if identical.
1120
+ return false;
1121
+ }
1122
+
1123
+ var keysA = keys$1(a);
1124
+
1125
+ if (keysA.length !== keys$1(b).length) {
1126
+ return false;
1127
+ }
1128
+
1129
+ var extendedStackA = stackA.concat([a]);
1130
+ var extendedStackB = stackB.concat([b]);
1131
+ idx = keysA.length - 1;
1132
+
1133
+ while (idx >= 0) {
1134
+ var key = keysA[idx];
1135
+
1136
+ if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {
1137
+ return false;
1138
+ }
1139
+
1140
+ idx -= 1;
1141
+ }
1142
+
1143
+ return true;
1144
+ }
1145
+
1146
+ /**
1147
+ * Returns `true` if its arguments are equivalent, `false` otherwise. Handles
1148
+ * cyclical data structures.
1149
+ *
1150
+ * Dispatches symmetrically to the `equals` methods of both arguments, if
1151
+ * present.
1152
+ *
1153
+ * @func
1154
+ * @memberOf R
1155
+ * @since v0.15.0
1156
+ * @category Relation
1157
+ * @sig a -> b -> Boolean
1158
+ * @param {*} a
1159
+ * @param {*} b
1160
+ * @return {Boolean}
1161
+ * @example
1162
+ *
1163
+ * R.equals(1, 1); //=> true
1164
+ * R.equals(1, '1'); //=> false
1165
+ * R.equals([1, 2, 3], [1, 2, 3]); //=> true
1166
+ *
1167
+ * const a = {}; a.v = a;
1168
+ * const b = {}; b.v = b;
1169
+ * R.equals(a, b); //=> true
1170
+ */
1171
+
1172
+ var equals =
1173
+ /*#__PURE__*/
1174
+ _curry2(function equals(a, b) {
1175
+ return _equals(a, b, [], []);
1176
+ });
1177
+
1178
+ var equals$1 = equals;
1179
+
1180
+ function _isObject(x) {
1181
+ return Object.prototype.toString.call(x) === '[object Object]';
1182
+ }
1183
+
1184
+ /**
1185
+ * Returns the empty value of its argument's type. Ramda defines the empty
1186
+ * value of Array (`[]`), Object (`{}`), String (`''`), and Arguments. Other
1187
+ * types are supported if they define `<Type>.empty`,
1188
+ * `<Type>.prototype.empty` or implement the
1189
+ * [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid).
1190
+ *
1191
+ * Dispatches to the `empty` method of the first argument, if present.
1192
+ *
1193
+ * @func
1194
+ * @memberOf R
1195
+ * @since v0.3.0
1196
+ * @category Function
1197
+ * @sig a -> a
1198
+ * @param {*} x
1199
+ * @return {*}
1200
+ * @example
1201
+ *
1202
+ * R.empty(Just(42)); //=> Nothing()
1203
+ * R.empty([1, 2, 3]); //=> []
1204
+ * R.empty('unicorns'); //=> ''
1205
+ * R.empty({x: 1, y: 2}); //=> {}
1206
+ */
1207
+
1208
+ var empty =
1209
+ /*#__PURE__*/
1210
+ _curry1(function empty(x) {
1211
+ return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : _isArray(x) ? [] : _isString(x) ? '' : _isObject(x) ? {} : _isArguments$1(x) ? function () {
1212
+ return arguments;
1213
+ }() : void 0 // else
1214
+ ;
1215
+ });
1216
+
1217
+ var empty$1 = empty;
1218
+
1219
+ /**
1220
+ * Returns `true` if the given value is its type's empty value; `false`
1221
+ * otherwise.
1222
+ *
1223
+ * @func
1224
+ * @memberOf R
1225
+ * @since v0.1.0
1226
+ * @category Logic
1227
+ * @sig a -> Boolean
1228
+ * @param {*} x
1229
+ * @return {Boolean}
1230
+ * @see R.empty
1231
+ * @example
1232
+ *
1233
+ * R.isEmpty([1, 2, 3]); //=> false
1234
+ * R.isEmpty([]); //=> true
1235
+ * R.isEmpty(''); //=> true
1236
+ * R.isEmpty(null); //=> false
1237
+ * R.isEmpty({}); //=> true
1238
+ * R.isEmpty({length: 0}); //=> false
1239
+ */
1240
+
1241
+ var isEmpty =
1242
+ /*#__PURE__*/
1243
+ _curry1(function isEmpty(x) {
1244
+ return x != null && equals$1(x, empty$1(x));
1245
+ });
1246
+
1247
+ var isEmpty$1 = isEmpty;
1248
+
1249
+ var css_248z = "/*\n Do not edit directly\n Generated on Wed, 27 Apr 2022 11:58:36 GMT\n*/\nol {\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n[role=grid i] {\n position: relative;\n z-index: 0;\n display: grid;\n margin: auto;\n grid-template-areas: \". column-headers\" \"row-headers calendar\";\n grid-template-columns: min-content auto;\n inline-size: max(100%, 500px);\n min-inline-size: 880px;\n}\n\n.row-headers {\n display: grid;\n grid-area: row-headers;\n grid-template-rows: repeat(24, 1fr);\n margin-inline-end: 2px;\n}\n.row-headers > [role=rowheader i] {\n display: flex;\n align-items: flex-end;\n justify-content: flex-end;\n}\n.row-headers > [role=rowheader i] > time {\n font: 400 ultra-condensed 12px / 16px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n font-size: small;\n line-height: 1;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.calendar-row {\n display: contents;\n}\n\n.calendar-grid-presentation {\n display: grid;\n overflow: hidden;\n background-color: var(--vvd-color-surface-2dp);\n border-radius: 6px;\n counter-reset: listing;\n filter: var(--vvd-shadow-surface-2dp);\n gap: 1px;\n grid-area: calendar;\n grid-auto-flow: column;\n grid-template: repeat(24, 1fr)/repeat(7, 1fr);\n}\n\n.hours {\n display: contents;\n}\n.hours > [role=listitem i] {\n position: relative;\n grid-column: 1/8;\n grid-row: var(--row);\n min-block-size: 48px;\n pointer-events: none;\n}\n.hours > [role=listitem i]:not(:first-child)::after {\n position: absolute;\n border-block-end: var(--vvd-color-neutral-20) 1px solid;\n content: \"\";\n inline-size: 100%;\n margin-block-start: -1px;\n}\n.hours > [role=listitem i]:nth-child(24n+1) {\n --row: 1;\n}\n.hours > [role=listitem i]:nth-child(24n+2) {\n --row: 2;\n}\n.hours > [role=listitem i]:nth-child(24n+3) {\n --row: 3;\n}\n.hours > [role=listitem i]:nth-child(24n+4) {\n --row: 4;\n}\n.hours > [role=listitem i]:nth-child(24n+5) {\n --row: 5;\n}\n.hours > [role=listitem i]:nth-child(24n+6) {\n --row: 6;\n}\n.hours > [role=listitem i]:nth-child(24n+7) {\n --row: 7;\n}\n.hours > [role=listitem i]:nth-child(24n+8) {\n --row: 8;\n}\n.hours > [role=listitem i]:nth-child(24n+9) {\n --row: 9;\n}\n.hours > [role=listitem i]:nth-child(24n+10) {\n --row: 10;\n}\n.hours > [role=listitem i]:nth-child(24n+11) {\n --row: 11;\n}\n.hours > [role=listitem i]:nth-child(24n+12) {\n --row: 12;\n}\n.hours > [role=listitem i]:nth-child(24n+13) {\n --row: 13;\n}\n.hours > [role=listitem i]:nth-child(24n+14) {\n --row: 14;\n}\n.hours > [role=listitem i]:nth-child(24n+15) {\n --row: 15;\n}\n.hours > [role=listitem i]:nth-child(24n+16) {\n --row: 16;\n}\n.hours > [role=listitem i]:nth-child(24n+17) {\n --row: 17;\n}\n.hours > [role=listitem i]:nth-child(24n+18) {\n --row: 18;\n}\n.hours > [role=listitem i]:nth-child(24n+19) {\n --row: 19;\n}\n.hours > [role=listitem i]:nth-child(24n+20) {\n --row: 20;\n}\n.hours > [role=listitem i]:nth-child(24n+21) {\n --row: 21;\n}\n.hours > [role=listitem i]:nth-child(24n+22) {\n --row: 22;\n}\n.hours > [role=listitem i]:nth-child(24n+23) {\n --row: 23;\n}\n.hours > [role=listitem i]:nth-child(24n+24) {\n --row: 24;\n}\n\n[role=gridcell i] {\n display: grid;\n gap: 1px;\n grid-auto-flow: column;\n}\n\n[role=gridcell i],\n[role=columnheader i],\n[role=columnheader i] [role=button i] {\n position: relative;\n}\n[role=gridcell i]::before,\n[role=columnheader i]::before,\n[role=columnheader i] [role=button i]::before {\n position: absolute;\n z-index: -1;\n background-color: var(--vvd-color-info-10);\n content: \"\";\n}\n@supports (inset: 0) {\n [role=gridcell i]::before,\n[role=columnheader i]::before,\n[role=columnheader i] [role=button i]::before {\n inset: 0;\n }\n}\n@supports not (inset: 0) {\n [role=gridcell i]::before,\n[role=columnheader i]::before,\n[role=columnheader i] [role=button i]::before {\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n[role=gridcell i]:focus,\n[role=columnheader i]:focus,\n[role=columnheader i] [role=button i]:focus {\n outline: none;\n}\n[role=gridcell i]:not(:focus-visible)::before,\n[role=columnheader i]:not(:focus-visible)::before,\n[role=columnheader i] [role=button i]:not(:focus-visible)::before {\n display: none;\n}\n\n.columns {\n display: contents;\n}\n.columns > [role=gridcell i] {\n position: relative;\n grid-column: var(--column);\n grid-row: 1/25;\n}\n.columns > [role=gridcell i]:nth-child(1) {\n --column: 1;\n}\n.columns > [role=gridcell i]:nth-child(2) {\n --column: 2;\n}\n.columns > [role=gridcell i]:nth-child(3) {\n --column: 3;\n}\n.columns > [role=gridcell i]:nth-child(4) {\n --column: 4;\n}\n.columns > [role=gridcell i]:nth-child(5) {\n --column: 5;\n}\n.columns > [role=gridcell i]:nth-child(6) {\n --column: 6;\n}\n.columns > [role=gridcell i]:nth-child(7) {\n --column: 7;\n}\n.columns > [role=gridcell i]:not(:first-child)::after {\n position: absolute;\n block-size: 100%;\n border-inline-end: var(--vvd-color-neutral-20) 1px solid;\n content: \"\";\n margin-inline-start: -1px;\n}\n\n.column-headers {\n display: grid;\n grid-area: column-headers;\n grid-template-columns: repeat(7, 1fr);\n}\n.column-headers [role=columnheader i] h2 {\n font: 500 condensed 20px / 28px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n display: grid;\n align-items: baseline;\n margin: 0;\n grid-template-columns: 1fr auto 1fr;\n}\n.column-headers [role=columnheader i] h2 > em {\n font: inherit;\n inline-size: min-content;\n}\n@supports (inset: 0) {\n .column-headers [role=columnheader i] h2 > em {\n inset-inline-start: 0;\n }\n}\n@supports not (inset: 0) {\n .column-headers [role=columnheader i] h2 > em {\n left: 0;\n }\n}\n.column-headers [role=columnheader i] h2 > small {\n font: 400 ultra-condensed 12px / 16px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n text-transform: uppercase;\n}";
1250
+ styleInject(css_248z);
1251
+
1252
+ const ARROW_UP = 'ArrowUp';
1253
+ const ARROW_RIGHT = 'ArrowRight';
1254
+ const ARROW_DOWN = 'ArrowDown';
1255
+ const ARROW_LEFT = 'ArrowLeft';
1256
+ function isCellOrHeader(el) {
1257
+ return el instanceof HTMLElement && (el.matches('[role="gridcell"i]') || el.matches('[role="columnheader"i]'));
1258
+ }
1259
+
1260
+ const getCellOrHeader = f => f.matches('[role="columnheader"i]') ? '[role="gridcell"i]' : '[role="columnheader"i]';
1261
+
1262
+ function getNextFocusableGridElement(key, activeElement) {
1263
+ if (activeElement.parentNode instanceof HTMLElement) {
1264
+ switch (key) {
1265
+ case ARROW_RIGHT:
1266
+ return activeElement.nextElementSibling || activeElement.parentNode.firstElementChild;
1267
+
1268
+ case ARROW_LEFT:
1269
+ return activeElement.previousElementSibling || activeElement.parentNode.lastElementChild;
1270
+
1271
+ case ARROW_UP:
1272
+ case ARROW_DOWN:
1273
+ {
1274
+ const {
1275
+ children
1276
+ } = activeElement.parentNode;
1277
+ const i = Array.from(children).indexOf(activeElement);
1278
+ return this.shadowRoot.querySelector(`${getCellOrHeader(activeElement)}:nth-child(${i + 1})`);
1279
+ }
1280
+ }
1281
+ }
1282
+ }
1283
+ function getHeaderDescendantGridCell(key, activeElement) {
1284
+ if (key !== ARROW_DOWN) {
1285
+ return;
1286
+ }
1287
+
1288
+ const header = activeElement.closest('[role="columnheader"i]');
1289
+ const columnHeaders = this.shadowRoot.querySelectorAll('[role="columnheader"i]');
1290
+ const i = Array.from(columnHeaders).indexOf(header);
1291
+ return this.shadowRoot.querySelector(`[role="gridcell"i]:nth-child(${i + 1})`);
1292
+ }
1293
+
1294
+ function getDay(el) {
1295
+ const cellOrHeader = el.closest('[role="gridcell"i], [role="columnheader"i]');
1296
+
1297
+ if (cellOrHeader) {
1298
+ const {
1299
+ parentElement
1300
+ } = cellOrHeader;
1301
+
1302
+ if (parentElement) {
1303
+ return parentElement.children && Array.from(parentElement.children).indexOf(cellOrHeader);
1304
+ }
1305
+ }
1306
+ }
1307
+
1308
+ function getHour(e, el, hours) {
1309
+ const rowHeaderOrCell = el.closest('[role="rowheader"], [role="gridcell"i]');
1310
+
1311
+ if (rowHeaderOrCell) {
1312
+ const DOMRect = rowHeaderOrCell.getBoundingClientRect();
1313
+ const offsetY = e.clientY - DOMRect.y;
1314
+ const hourHeight = DOMRect.height / hours;
1315
+ const hour = offsetY / hourHeight;
1316
+ return Math.round((hour + Number.EPSILON) * 100) / 100;
1317
+ }
1318
+ }
1319
+
1320
+ const getEventContext = function getEventContext(e) {
1321
+ if (!(e instanceof KeyboardEvent || e instanceof MouseEvent)) {
1322
+ throw new Error('Invalid event. Event must be instance of KeyboardEvent or MouseEvent');
1323
+ }
1324
+
1325
+ const [el] = e.composedPath();
1326
+
1327
+ if (!(el && el instanceof HTMLElement && this.shadowRoot.contains(el))) {
1328
+ throw new Error('Invalid event. Event must contain a target object which is a direct descendant of calendar');
1329
+ }
1330
+
1331
+ const day = getDay(el);
1332
+ let hour;
1333
+
1334
+ if (e instanceof MouseEvent) {
1335
+ hour = getHour(e, el, this._hours);
1336
+ }
1337
+
1338
+ const context = Object.assign(Object.assign({}, day != undefined && {
1339
+ day
1340
+ }), hour != undefined && {
1341
+ hour
1342
+ });
1343
+ return not$1(isEmpty$1(context)) ? context : null;
1344
+ };
1345
+
1346
+ var _Calendar_instances, _Calendar_activeCalendarEvent_get;
1347
+ class Calendar extends FoundationElement {
1348
+ constructor() {
1349
+ super(...arguments);
1350
+
1351
+ _Calendar_instances.add(this);
1352
+
1353
+ this.hour12 = false;
1354
+ this._hours = 24;
1355
+ this._days = 7;
1356
+ this.hoursAsDatetime = Array.from({
1357
+ length: this._hours - 1
1358
+ }).fill(new Date(new Date().setHours(0, 0, 0))).map((d, i) => new Date(d.setHours(++i)));
1359
+
1360
+ this._generateDaysArr = dateArr => {
1361
+ if (dateArr.length == this._days) {
1362
+ return dateArr;
1363
+ }
1364
+
1365
+ const lastDate = new Date(dateArr[dateArr.length - 1]);
1366
+ lastDate.setDate(lastDate.getDate() + 1);
1367
+ return this._generateDaysArr([...dateArr, lastDate]);
1368
+ };
1369
+
1370
+ this.getEventContext = getEventContext;
1371
+ }
1372
+
1373
+ getCalendarEventContainingCell(calendarEvent) {
1374
+ const slotName = calendarEvent.getAttribute('slot');
1375
+ const gridCell = this.shadowRoot.querySelector(`slot[name="${slotName}"i]`);
1376
+ return gridCell.parentElement;
1377
+ }
1378
+
1379
+ arrowKeysInteractions(key) {
1380
+ const {
1381
+ activeElement
1382
+ } = this.shadowRoot;
1383
+ let focusNext;
1384
+
1385
+ if (isCellOrHeader(activeElement)) {
1386
+ focusNext = getNextFocusableGridElement.call(this, key, activeElement);
1387
+ } else if (__classPrivateFieldGet(this, _Calendar_instances, "a", _Calendar_activeCalendarEvent_get)) {
1388
+ focusNext = this.getCalendarEventContainingCell(__classPrivateFieldGet(this, _Calendar_instances, "a", _Calendar_activeCalendarEvent_get));
1389
+ } else if (activeElement === null || activeElement === void 0 ? void 0 : activeElement.matches('em[role="button"i]')) {
1390
+ focusNext = getHeaderDescendantGridCell.call(this, key, activeElement);
1391
+ } else {
1392
+ focusNext = this.shadowRoot.querySelector('[role="columnheader"i]');
1393
+ }
1394
+
1395
+ this.activateElement(focusNext);
1396
+ }
1397
+
1398
+ activateElement(el) {
1399
+ const onBlur = ({
1400
+ target
1401
+ }) => target.setAttribute('tabindex', '-1');
1402
+
1403
+ el === null || el === void 0 ? void 0 : el.addEventListener('blur', onBlur, {
1404
+ once: true
1405
+ });
1406
+ el === null || el === void 0 ? void 0 : el.setAttribute('tabindex', '0');
1407
+ el === null || el === void 0 ? void 0 : el.focus();
1408
+ }
1409
+
1410
+ onKeydown({
1411
+ key
1412
+ }) {
1413
+ const isArrow = [ARROW_UP, ARROW_RIGHT, ARROW_DOWN, ARROW_LEFT].some(predefinedKey => predefinedKey == key);
1414
+
1415
+ if (isArrow) {
1416
+ this.arrowKeysInteractions(key);
1417
+ }
1418
+
1419
+ return !isArrow;
1420
+ }
1421
+
1422
+ }
1423
+ _Calendar_instances = new WeakSet(), _Calendar_activeCalendarEvent_get = function _Calendar_activeCalendarEvent_get() {
1424
+ const {
1425
+ activeElement
1426
+ } = document;
1427
+ return activeElement instanceof CalendarEvent ? activeElement : null;
1428
+ };
1429
+
1430
+ __decorate([attr, __metadata("design:type", Object)], Calendar.prototype, "datetime", void 0);
1431
+
1432
+ __decorate([attr({
1433
+ attribute: 'start-day'
1434
+ }), __metadata("design:type", String)], Calendar.prototype, "startDay", void 0);
1435
+
1436
+ __decorate([attr, __metadata("design:type", Object)], Calendar.prototype, "locales", void 0);
1437
+
1438
+ __decorate([attr({
1439
+ mode: 'boolean'
1440
+ }), __metadata("design:type", Object)], Calendar.prototype, "hour12", void 0);
1441
+
1442
+ function getValidDateString(date) {
1443
+ const twoDigit = num => `0${num}`.slice(-2);
1444
+
1445
+ return `${date.getFullYear()}-${twoDigit(date.getMonth() + 1)}-${twoDigit(date.getDate())}`;
1446
+ }
1447
+ const weekdaysMap = new Map([['sunday', 0], ['monday', 1]]);
1448
+ function getFirstDateOfTheWeek(date = new Date(), startDay) {
1449
+ date = new Date(date);
1450
+ let num = weekdaysMap.get(startDay);
1451
+ num !== null && num !== void 0 ? num : num = 1;
1452
+ const day = date.getDate() - (date.getDay() + 7 - num) % 7;
1453
+ return new Date(date.setDate(day));
1454
+ }
1455
+
1456
+ let _2 = t => t,
1457
+ _t,
1458
+ _t2,
1459
+ _t3,
1460
+ _t4,
1461
+ _t5,
1462
+ _t6,
1463
+ _t7;
1464
+
1465
+ const HoursTemplate = () => {
1466
+ return html(_t || (_t = _2`
1467
+ <div class="row-headers" role="presentation">
1468
+ ${0}
1469
+ </div>`), repeat(x => x.hoursAsDatetime, html(_t2 || (_t2 = _2`<span role="rowheader">
1470
+ <time datetime="${0}">
1471
+ ${0}
1472
+ </time>
1473
+ </span>`), (x, c) => new Intl.DateTimeFormat(c.parent.locales, {
1474
+ hour: 'numeric',
1475
+ minute: 'numeric',
1476
+ hour12: false
1477
+ }).format(x), (x, c) => new Intl.DateTimeFormat(c.parent.locales, {
1478
+ hour: 'numeric',
1479
+ hour12: c.parent.hour12
1480
+ }).format(x))));
1481
+ };
1482
+
1483
+ const DaysTemplate = () => {
1484
+ return html(_t3 || (_t3 = _2`
1485
+ <div class="column-headers" role="row">
1486
+ ${0}
1487
+ </div>`), repeat(x => x._generateDaysArr([getFirstDateOfTheWeek(x.datetime, x.startDay)]), html(_t4 || (_t4 = _2`
1488
+ <div role="columnheader" tabindex="-1">
1489
+ <time datetime=${0}>
1490
+ <h2>
1491
+ <!-- TODO add to column aria-labelledby or describedby to count
1492
+ events and related day e.g. "3 events, Sunday, March 8" -->
1493
+ <em tabindex="0" role="button" aria-label=${0}>
1494
+ ${0}
1495
+ </em>
1496
+ <small aria-hidden="true">
1497
+ ${0}
1498
+ </small>
1499
+ </h2>
1500
+ </time>
1501
+ </div>`), x => getValidDateString(x), (x, c) => new Intl.DateTimeFormat(c.parent.locales, {
1502
+ weekday: 'long',
1503
+ month: 'long',
1504
+ day: 'numeric'
1505
+ }).format(x), (x, c) => new Intl.DateTimeFormat(c.parent.locales, {
1506
+ day: '2-digit'
1507
+ }).format(x), (x, c) => new Intl.DateTimeFormat(c.parent.locales, {
1508
+ weekday: 'short'
1509
+ }).format(x))));
1510
+ };
1511
+
1512
+ const ColumnTemplate = html(_t5 || (_t5 = _2`
1513
+ <div role="gridcell" tabindex="-1">
1514
+ <slot name="day-${0}"></slot>
1515
+ </div>
1516
+ `), (_, c) => c.index);
1517
+ const CalendarTemplate = () => html(_t6 || (_t6 = _2`
1518
+ <div role="grid" @keydown=${0}>
1519
+ ${0}
1520
+ <div role="row" class="calendar-row">
1521
+ ${0}
1522
+ <div class="calendar-grid-presentation" role="presentation">
1523
+ <div class="hours" role="list">
1524
+ ${0}
1525
+ </div>
1526
+ <div class="columns" role="presentation">
1527
+ ${0}
1528
+ </div>
1529
+ <slot></slot>
1530
+ </div>
1531
+ </div>
1532
+ </div>
1533
+ `), (x, c) => x.onKeydown(c.event), DaysTemplate, HoursTemplate, repeat(x => Array.from({
1534
+ length: x.hoursAsDatetime.length + 1
1535
+ }), html(_t7 || (_t7 = _2`
1536
+ <div role="listitem"></div>`))), repeat(x => Array.from(Array(x._days)), ColumnTemplate, {
1537
+ positioning: true
1538
+ }));
1539
+
1540
+ const vividCalendar = Calendar.compose({
1541
+ baseName: 'calendar',
1542
+ template: CalendarTemplate,
1543
+ styles: css_248z,
1544
+ shadowOptions: {
1545
+ delegatesFocus: true
1546
+ }
1547
+ });
1548
+ designSystem.register(vividCalendar());
1549
+
1550
+ export { vividCalendar };