@vonage/vivid 5.5.0 → 5.7.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.
- package/LICENSE.md +201 -0
- package/accordion/definition.cjs +5 -0
- package/accordion/definition.js +5 -0
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +14 -3
- package/accordion-item/definition.cjs +1 -1
- package/accordion-item/definition.js +1 -1
- package/alert/definition.cjs +4 -12
- package/alert/definition.js +5 -13
- package/alert/index.cjs +11 -11
- package/alert/index.js +33 -37
- package/audio-player/definition.cjs +4 -0
- package/audio-player/definition.js +4 -0
- package/audio-player/index.cjs +1 -1
- package/audio-player/index.js +8 -2
- package/avatar/definition.cjs +1 -1
- package/avatar/definition.js +1 -1
- package/avatar/index.cjs +1 -1
- package/avatar/index.js +4 -4
- package/banner/definition.cjs +2 -4
- package/banner/definition.js +2 -4
- package/banner/index.cjs +2 -2
- package/banner/index.js +1 -1
- package/breadcrumb/definition.cjs +1 -0
- package/breadcrumb/definition.js +1 -0
- package/breadcrumb/index.cjs +1 -1
- package/breadcrumb/index.js +1 -0
- package/breadcrumb-item/definition.cjs +1 -1
- package/breadcrumb-item/definition.js +1 -1
- package/breadcrumb-item/index.cjs +4 -4
- package/breadcrumb-item/index.js +4 -4
- package/bundled/affix.js +1 -1
- package/bundled/anchored.cjs +1 -1
- package/bundled/anchored.js +6 -6
- package/bundled/attribute-binding-behaviour.cjs +1 -1
- package/bundled/attribute-binding-behaviour.js +3 -1
- package/bundled/base-color-picker.cjs +1 -1
- package/bundled/base-color-picker.js +9 -3
- package/bundled/base-progress.cjs +1 -1
- package/bundled/base-progress.js +3 -0
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +14 -10
- package/bundled/calendar-picker.template.cjs +1 -1
- package/bundled/calendar-picker.template.js +3 -1
- package/bundled/definition.cjs +1 -1
- package/bundled/definition.js +21 -21
- package/bundled/definition10.cjs +7 -7
- package/bundled/definition10.js +27 -17
- package/bundled/definition11.cjs +2 -2
- package/bundled/definition11.js +5 -5
- package/bundled/definition12.cjs +3 -3
- package/bundled/definition12.js +2 -1
- package/bundled/definition13.cjs +1 -1
- package/bundled/definition13.js +1 -1
- package/bundled/definition17.cjs +1 -1
- package/bundled/definition17.js +4 -1
- package/bundled/definition18.cjs +1 -1
- package/bundled/definition18.js +18 -7
- package/bundled/definition19.cjs +6 -6
- package/bundled/definition19.js +103 -68
- package/bundled/definition2.cjs +8 -9
- package/bundled/definition2.js +67 -75
- package/bundled/definition20.cjs +1 -1
- package/bundled/definition20.js +4 -4
- package/bundled/definition22.cjs +1 -1
- package/bundled/definition22.js +2 -1
- package/bundled/definition3.cjs +2 -2
- package/bundled/definition3.js +2 -1
- package/bundled/definition5.cjs +1 -1
- package/bundled/definition5.js +10 -4
- package/bundled/definition6.cjs +2 -2
- package/bundled/definition6.js +2 -1
- package/bundled/definition7.cjs +1 -1
- package/bundled/definition7.js +8 -5
- package/bundled/definition8.cjs +1 -1
- package/bundled/definition8.js +6 -5
- package/bundled/definition9.cjs +6 -6
- package/bundled/definition9.js +545 -488
- package/bundled/delegates-aria.cjs +1 -1
- package/bundled/delegates-aria.js +3 -1
- package/bundled/form-associated.cjs +1 -1
- package/bundled/form-associated.js +11 -3
- package/bundled/host-semantics.js +4 -4
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +21 -3
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +137 -67
- package/bundled/mixins.cjs +4 -4
- package/bundled/mixins.js +10 -7
- package/bundled/picker-field.template.cjs +1 -1
- package/bundled/picker-field.template.js +1 -0
- package/bundled/scrollIntoView.cjs +1 -1
- package/bundled/scrollIntoView.js +4 -1
- package/bundled/text-field.cjs +1 -1
- package/bundled/text-field.js +1 -1
- package/bundled/time-selection-picker.template.cjs +11 -11
- package/bundled/time-selection-picker.template.js +4 -1
- package/bundled/vivid-element.cjs +4 -4
- package/bundled/vivid-element.js +529 -492
- package/calendar/definition.cjs +2 -0
- package/calendar/definition.js +2 -0
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +2 -0
- package/calendar-event/definition.cjs +1 -1
- package/calendar-event/definition.js +1 -1
- package/calendar-event/index.cjs +2 -2
- package/calendar-event/index.js +5 -5
- package/card/definition.cjs +1 -1
- package/card/definition.js +1 -1
- package/card/index.cjs +1 -1
- package/card/index.js +1 -1
- package/checkbox/definition.cjs +2 -1
- package/checkbox/definition.js +2 -1
- package/color-picker/definition.cjs +6 -1
- package/color-picker/definition.js +6 -1
- package/color-picker/index.cjs +1 -1
- package/color-picker/index.js +6 -1
- package/combobox/definition.cjs +17 -6
- package/combobox/definition.js +17 -6
- package/combobox/index.cjs +14 -9
- package/combobox/index.js +48 -36
- package/contextual-help/definition.cjs +1 -1
- package/contextual-help/definition.js +1 -1
- package/custom-elements.json +6985 -542
- package/data-grid/definition.cjs +106 -8
- package/data-grid/definition.js +106 -8
- package/data-grid/index.cjs +52 -38
- package/data-grid/index.js +313 -242
- package/date-range-picker/definition.cjs +2 -0
- package/date-range-picker/definition.js +2 -0
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +5 -1
- package/dial-pad/definition.cjs +10 -1
- package/dial-pad/definition.js +10 -1
- package/dial-pad/index.cjs +2 -2
- package/dial-pad/index.js +37 -13
- package/dialog/definition.cjs +2 -1
- package/dialog/definition.js +2 -1
- package/dialog/index.cjs +1 -1
- package/dialog/index.js +2 -1
- package/fab/definition.cjs +2 -1
- package/fab/definition.js +2 -1
- package/fab/index.cjs +1 -1
- package/fab/index.js +6 -5
- package/file-picker/definition.cjs +7 -2
- package/file-picker/definition.js +7 -2
- package/file-picker/index.cjs +6 -6
- package/file-picker/index.js +82 -73
- package/icon/definition.cjs +12 -21
- package/icon/definition.js +13 -22
- package/index.cjs +21 -0
- package/index.js +1 -1
- package/lib/data-grid/locale.d.ts +5 -0
- package/lib/date-picker/date-picker.d.ts +38 -38
- package/lib/date-range-picker/date-range-picker.d.ts +20 -20
- package/lib/date-time-picker/date-time-picker.d.ts +40 -40
- package/lib/icon/icon.d.ts +0 -1
- package/lib/menu/menu.d.ts +4 -4
- package/lib/rich-text-editor/definition.d.ts +3 -2
- package/lib/rich-text-editor/locale.d.ts +29 -3
- package/lib/rich-text-editor/popover.d.ts +19 -0
- package/lib/rich-text-editor/rich-text-editor.d.ts +16 -45
- package/lib/rich-text-editor/rich-text-editor.template.d.ts +2 -2
- package/lib/rich-text-editor/rte/config.d.ts +18 -0
- package/lib/rich-text-editor/rte/document.d.ts +28 -0
- package/lib/rich-text-editor/rte/exports.d.ts +23 -0
- package/lib/rich-text-editor/rte/feature.d.ts +46 -0
- package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +33 -0
- package/lib/rich-text-editor/rte/features/internal/foreign-html.d.ts +11 -0
- package/lib/rich-text-editor/rte/features/internal/history.d.ts +10 -0
- package/lib/rich-text-editor/rte/features/internal/text-style.d.ts +18 -0
- package/lib/rich-text-editor/rte/html-parser.d.ts +24 -0
- package/lib/rich-text-editor/rte/html-serializer.d.ts +30 -0
- package/lib/rich-text-editor/rte/instance.d.ts +57 -0
- package/lib/rich-text-editor/rte/utils/default-textblock.d.ts +2 -0
- package/lib/rich-text-editor/rte/utils/impl.d.ts +1 -0
- package/lib/rich-text-editor/rte/utils/textblock-attrs.d.ts +29 -0
- package/lib/rich-text-editor/rte/utils/textblock-marks.d.ts +10 -0
- package/lib/rich-text-editor/rte/utils/ui.d.ts +109 -0
- package/lib/simple-color-picker/simple-color-picker.d.ts +4 -4
- package/lib/text-area/text-area.d.ts +1 -1
- package/lib/text-field/text-field.d.ts +1 -1
- package/lib/time-picker/time-picker.d.ts +20 -20
- package/lib/toggletip/toggletip.d.ts +4 -4
- package/lib/tooltip/tooltip.d.ts +4 -4
- package/locales/de-DE.cjs +42 -4
- package/locales/de-DE.js +42 -4
- package/locales/en-GB.cjs +43 -5
- package/locales/en-GB.js +43 -5
- package/locales/en-US.cjs +43 -5
- package/locales/en-US.js +43 -5
- package/locales/ja-JP.cjs +43 -5
- package/locales/ja-JP.js +43 -5
- package/locales/zh-CN.cjs +43 -5
- package/locales/zh-CN.js +43 -5
- package/menu/definition.cjs +2 -1
- package/menu/definition.js +2 -1
- package/nav-disclosure/definition.cjs +1 -1
- package/nav-disclosure/definition.js +1 -1
- package/nav-disclosure/index.cjs +1 -1
- package/nav-disclosure/index.js +1 -1
- package/nav-item/definition.cjs +1 -1
- package/nav-item/definition.js +1 -1
- package/nav-item/index.cjs +1 -1
- package/nav-item/index.js +5 -5
- package/number-field/definition.cjs +5 -3
- package/number-field/definition.js +5 -3
- package/number-field/index.cjs +5 -3
- package/number-field/index.js +34 -32
- package/package.json +76 -62
- package/pagination/definition.cjs +2 -0
- package/pagination/definition.js +2 -0
- package/pagination/index.cjs +1 -1
- package/pagination/index.js +2 -0
- package/radio/definition.cjs +5 -1
- package/radio/definition.js +5 -1
- package/range-slider/definition.cjs +3 -2
- package/range-slider/definition.js +3 -2
- package/range-slider/index.cjs +1 -1
- package/range-slider/index.js +4 -2
- package/rich-text-editor/definition.cjs +17942 -1074
- package/rich-text-editor/definition.js +17926 -1079
- package/rich-text-editor/index.cjs +29 -130
- package/rich-text-editor/index.js +5565 -2474
- package/searchable-select/definition.cjs +7 -3
- package/searchable-select/definition.js +7 -3
- package/searchable-select/index.cjs +5 -5
- package/searchable-select/index.js +11 -7
- package/select/definition.cjs +17 -2
- package/select/definition.js +17 -2
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +1 -1
- package/selectable-box/index.cjs +3 -3
- package/selectable-box/index.js +1 -1
- package/shared/patterns/anchored.d.ts +8 -8
- package/shared/patterns/char-count/char-count.d.ts +1 -1
- package/shared/patterns/localized.d.ts +386 -0
- package/shared/picker-field/mixins/calendar-picker.d.ts +10 -10
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +10 -10
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +20 -20
- package/shared/picker-field/mixins/single-date-picker.d.ts +28 -28
- package/shared/picker-field/mixins/single-value-picker.d.ts +8 -8
- package/shared/picker-field/mixins/time-selection-picker.d.ts +20 -20
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +20 -20
- package/shared/utils/promise.d.ts +7 -0
- package/simple-color-picker/definition.cjs +4 -1
- package/simple-color-picker/definition.js +4 -1
- package/simple-color-picker/index.cjs +3 -3
- package/simple-color-picker/index.js +4 -1
- package/slider/definition.cjs +8 -2
- package/slider/definition.js +8 -2
- package/split-button/definition.cjs +1 -1
- package/split-button/definition.js +1 -1
- package/split-button/index.cjs +1 -1
- package/split-button/index.js +1 -1
- package/styles/core/all.css +5 -1
- package/styles/core/theme.css +5 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/definition.cjs +2 -1
- package/switch/definition.js +2 -1
- package/switch/index.cjs +2 -2
- package/switch/index.js +11 -10
- package/tab/definition.cjs +1 -1
- package/tab/definition.js +1 -1
- package/tabs/definition.cjs +2 -0
- package/tabs/definition.js +2 -0
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +2 -0
- package/tag/definition.cjs +1 -1
- package/tag/definition.js +1 -1
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/text-area/definition.cjs +13 -7
- package/text-area/definition.js +13 -7
- package/text-area/index.cjs +6 -6
- package/text-area/index.js +20 -14
- package/text-field/definition.cjs +16 -6
- package/text-field/definition.js +16 -6
- package/toggletip/definition.cjs +5 -1
- package/toggletip/definition.js +5 -1
- package/tooltip/definition.cjs +4 -1
- package/tooltip/definition.js +4 -1
- package/tree-view/definition.cjs +28 -6
- package/tree-view/definition.js +28 -6
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +28 -6
- package/unbundled/_commonjsHelpers.cjs +0 -26
- package/unbundled/_commonjsHelpers.js +1 -26
- package/unbundled/attribute-binding-behaviour.cjs +1 -0
- package/unbundled/attribute-binding-behaviour.js +1 -0
- package/unbundled/base-color-picker.cjs +9 -3
- package/unbundled/base-color-picker.js +9 -3
- package/unbundled/base-progress.cjs +3 -0
- package/unbundled/base-progress.js +3 -0
- package/unbundled/button.cjs +14 -10
- package/unbundled/button.js +14 -10
- package/unbundled/calendar-picker.template.cjs +3 -1
- package/unbundled/calendar-picker.template.js +3 -1
- package/unbundled/definition.cjs +2 -1
- package/unbundled/definition.js +2 -1
- package/unbundled/definition2.cjs +5 -2
- package/unbundled/definition2.js +5 -2
- package/unbundled/definition3.cjs +2 -1
- package/unbundled/definition3.js +2 -1
- package/unbundled/definition4.cjs +2 -1
- package/unbundled/definition4.js +2 -1
- package/unbundled/definition5.cjs +3 -2
- package/unbundled/definition5.js +4 -3
- package/unbundled/delegates-aria.cjs +1 -0
- package/unbundled/delegates-aria.js +1 -0
- package/unbundled/form-associated.cjs +4 -0
- package/unbundled/form-associated.js +4 -0
- package/unbundled/listbox.cjs +16 -1
- package/unbundled/listbox.js +16 -1
- package/unbundled/localized.cjs +36 -0
- package/unbundled/localized.js +37 -2
- package/unbundled/mixins.cjs +2 -0
- package/unbundled/mixins.js +2 -0
- package/unbundled/picker-field.template.cjs +1 -0
- package/unbundled/picker-field.template.js +1 -0
- package/unbundled/scrollIntoView.cjs +1 -0
- package/unbundled/scrollIntoView.js +1 -0
- package/unbundled/text-field.cjs +1 -1
- package/unbundled/text-field.js +1 -1
- package/unbundled/time-selection-picker.template.cjs +4 -1
- package/unbundled/time-selection-picker.template.js +4 -1
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/definition.cjs +54 -44
- package/video-player/definition.js +51 -41
- package/video-player/index.cjs +28 -28
- package/video-player/index.js +1449 -1443
- package/vivid.api.json +6463 -6099
- package/lib/rich-text-editor/facades/prose-mirror-vivid.schema.d.ts +0 -4
- package/lib/rich-text-editor/facades/vivid-prose-mirror.facade.d.ts +0 -18
- package/lib/rich-text-editor/image-placeholder/definition.d.ts +0 -2
- package/lib/rich-text-editor/image-placeholder/image-placeholder.d.ts +0 -7
- package/lib/rich-text-editor/image-placeholder/image-placeholder.template.d.ts +0 -4
- package/lib/rich-text-editor/menubar/consts.d.ts +0 -18
- package/lib/rich-text-editor/menubar/definition.d.ts +0 -2
- package/lib/rich-text-editor/menubar/menubar.d.ts +0 -386
- package/lib/rich-text-editor/menubar/menubar.template.d.ts +0 -4
package/bundled/vivid-element.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
let
|
|
1
|
+
let F;
|
|
2
2
|
const ft = "fast-kernel";
|
|
3
3
|
try {
|
|
4
4
|
if (document.currentScript)
|
|
5
|
-
|
|
5
|
+
F = document.currentScript.getAttribute(ft);
|
|
6
6
|
else {
|
|
7
7
|
const i = document.getElementsByTagName("script");
|
|
8
|
-
|
|
8
|
+
F = i[i.length - 1].getAttribute(ft);
|
|
9
9
|
}
|
|
10
10
|
} catch {
|
|
11
|
-
|
|
11
|
+
F = "isolate";
|
|
12
12
|
}
|
|
13
13
|
let N;
|
|
14
|
-
switch (
|
|
14
|
+
switch (F) {
|
|
15
15
|
case "share":
|
|
16
16
|
N = Object.freeze({
|
|
17
17
|
updateQueue: 1,
|
|
@@ -38,31 +38,12 @@ switch (I) {
|
|
|
38
38
|
});
|
|
39
39
|
break;
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const E = (i) => typeof i == "function", B = (i) => typeof i == "string", pe = () => {
|
|
42
42
|
};
|
|
43
43
|
var tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
44
|
-
function
|
|
44
|
+
function ci(i) {
|
|
45
45
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
46
46
|
}
|
|
47
|
-
function hi(i) {
|
|
48
|
-
if (i.__esModule) return i;
|
|
49
|
-
var t = i.default;
|
|
50
|
-
if (typeof t == "function") {
|
|
51
|
-
var e = function s() {
|
|
52
|
-
return this instanceof s ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
|
|
53
|
-
};
|
|
54
|
-
e.prototype = t.prototype;
|
|
55
|
-
} else e = {};
|
|
56
|
-
return Object.defineProperty(e, "__esModule", { value: !0 }), Object.keys(i).forEach(function(s) {
|
|
57
|
-
var n = Object.getOwnPropertyDescriptor(i, s);
|
|
58
|
-
Object.defineProperty(e, s, n.get ? n : {
|
|
59
|
-
enumerable: !0,
|
|
60
|
-
get: function() {
|
|
61
|
-
return i[s];
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
}), e;
|
|
65
|
-
}
|
|
66
47
|
(function() {
|
|
67
48
|
if (!(typeof globalThis < "u"))
|
|
68
49
|
if (typeof tt < "u")
|
|
@@ -76,21 +57,34 @@ function hi(i) {
|
|
|
76
57
|
t.globalThis = t;
|
|
77
58
|
}
|
|
78
59
|
})();
|
|
79
|
-
|
|
60
|
+
(function() {
|
|
61
|
+
"requestIdleCallback" in globalThis || (globalThis.requestIdleCallback = function(e, s) {
|
|
62
|
+
const n = Date.now();
|
|
63
|
+
return setTimeout(() => {
|
|
64
|
+
e({
|
|
65
|
+
didTimeout: s?.timeout ? Date.now() - n >= s.timeout : !1,
|
|
66
|
+
timeRemaining: () => 0
|
|
67
|
+
});
|
|
68
|
+
}, 1);
|
|
69
|
+
}, globalThis.cancelIdleCallback = function(e) {
|
|
70
|
+
clearTimeout(e);
|
|
71
|
+
});
|
|
72
|
+
})();
|
|
73
|
+
const Ht = {
|
|
80
74
|
configurable: !1,
|
|
81
75
|
enumerable: !1,
|
|
82
76
|
writable: !1
|
|
83
77
|
};
|
|
84
|
-
globalThis.FAST === void 0 && Reflect.defineProperty(globalThis, "FAST", Object.assign({ value: /* @__PURE__ */ Object.create(null) },
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
78
|
+
globalThis.FAST === void 0 && Reflect.defineProperty(globalThis, "FAST", Object.assign({ value: /* @__PURE__ */ Object.create(null) }, Ht));
|
|
79
|
+
const v = globalThis.FAST;
|
|
80
|
+
if (v.getById === void 0) {
|
|
87
81
|
const i = /* @__PURE__ */ Object.create(null);
|
|
88
|
-
Reflect.defineProperty(
|
|
82
|
+
Reflect.defineProperty(v, "getById", Object.assign({ value(t, e) {
|
|
89
83
|
let s = i[t];
|
|
90
84
|
return s === void 0 && (s = e ? i[t] = e() : null), s;
|
|
91
|
-
} },
|
|
85
|
+
} }, Ht));
|
|
92
86
|
}
|
|
93
|
-
|
|
87
|
+
v.error === void 0 && Object.assign(v, {
|
|
94
88
|
warn() {
|
|
95
89
|
},
|
|
96
90
|
error(i) {
|
|
@@ -99,7 +93,7 @@ y.error === void 0 && Object.assign(y, {
|
|
|
99
93
|
addMessages() {
|
|
100
94
|
}
|
|
101
95
|
});
|
|
102
|
-
const
|
|
96
|
+
const di = Object.freeze([]);
|
|
103
97
|
function Pt() {
|
|
104
98
|
const i = /* @__PURE__ */ new Map();
|
|
105
99
|
return Object.freeze({
|
|
@@ -131,7 +125,7 @@ function zt() {
|
|
|
131
125
|
function x(i) {
|
|
132
126
|
i.prototype.toJSON = pe;
|
|
133
127
|
}
|
|
134
|
-
const
|
|
128
|
+
const y = Object.freeze({
|
|
135
129
|
/**
|
|
136
130
|
* Not aspected.
|
|
137
131
|
*/
|
|
@@ -161,7 +155,7 @@ const g = Object.freeze({
|
|
|
161
155
|
*/
|
|
162
156
|
event: 6
|
|
163
157
|
}), pt = (i) => i, be = globalThis.trustedTypes ? globalThis.trustedTypes.createPolicy("fast-html", { createHTML: pt }) : { createHTML: pt };
|
|
164
|
-
let
|
|
158
|
+
let D = Object.freeze({
|
|
165
159
|
createHTML(i) {
|
|
166
160
|
return be.createHTML(i);
|
|
167
161
|
},
|
|
@@ -169,12 +163,12 @@ let H = Object.freeze({
|
|
|
169
163
|
return s;
|
|
170
164
|
}
|
|
171
165
|
});
|
|
172
|
-
const ge =
|
|
166
|
+
const ge = D, T = Object.freeze({
|
|
173
167
|
/**
|
|
174
168
|
* Gets the dom policy used by the templating system.
|
|
175
169
|
*/
|
|
176
170
|
get policy() {
|
|
177
|
-
return
|
|
171
|
+
return D;
|
|
178
172
|
},
|
|
179
173
|
/**
|
|
180
174
|
* Sets the dom policy used by the templating system.
|
|
@@ -184,12 +178,12 @@ const ge = H, T = Object.freeze({
|
|
|
184
178
|
* called by the application developer at the start of their program.
|
|
185
179
|
*/
|
|
186
180
|
setPolicy(i) {
|
|
187
|
-
if (
|
|
188
|
-
throw
|
|
181
|
+
if (D !== ge)
|
|
182
|
+
throw v.error(
|
|
189
183
|
1201
|
|
190
184
|
/* Message.onlySetDOMPolicyOnce */
|
|
191
185
|
);
|
|
192
|
-
|
|
186
|
+
D = i;
|
|
193
187
|
},
|
|
194
188
|
/**
|
|
195
189
|
* Sets an attribute value on an element.
|
|
@@ -214,7 +208,7 @@ const ge = H, T = Object.freeze({
|
|
|
214
208
|
setBooleanAttribute(i, t, e) {
|
|
215
209
|
e ? i.setAttribute(t, "") : i.removeAttribute(t);
|
|
216
210
|
}
|
|
217
|
-
}), Ut =
|
|
211
|
+
}), Ut = v.getById(N.updateQueue, () => {
|
|
218
212
|
const i = [], t = [], e = globalThis.requestAnimationFrame;
|
|
219
213
|
let s = !0;
|
|
220
214
|
function n() {
|
|
@@ -231,23 +225,23 @@ const ge = H, T = Object.freeze({
|
|
|
231
225
|
throw i.length = 0, l;
|
|
232
226
|
}
|
|
233
227
|
}
|
|
234
|
-
function
|
|
228
|
+
function o() {
|
|
235
229
|
let l = 0;
|
|
236
230
|
for (; l < i.length; )
|
|
237
231
|
if (r(i[l]), l++, l > 1024) {
|
|
238
|
-
for (let
|
|
239
|
-
i[
|
|
232
|
+
for (let a = 0, h = i.length - l; a < h; a++)
|
|
233
|
+
i[a] = i[a + l];
|
|
240
234
|
i.length -= l, l = 0;
|
|
241
235
|
}
|
|
242
236
|
i.length = 0;
|
|
243
237
|
}
|
|
244
238
|
function c(d) {
|
|
245
|
-
i.push(d), i.length < 2 && (s ? e(
|
|
239
|
+
i.push(d), i.length < 2 && (s ? e(o) : o());
|
|
246
240
|
}
|
|
247
241
|
return Object.freeze({
|
|
248
242
|
enqueue: c,
|
|
249
243
|
next: () => new Promise(c),
|
|
250
|
-
process:
|
|
244
|
+
process: o,
|
|
251
245
|
setMode: (d) => s = d
|
|
252
246
|
});
|
|
253
247
|
});
|
|
@@ -315,7 +309,7 @@ class rt {
|
|
|
315
309
|
e[n].handleChange(s, t);
|
|
316
310
|
}
|
|
317
311
|
}
|
|
318
|
-
class
|
|
312
|
+
class qt {
|
|
319
313
|
/**
|
|
320
314
|
* Creates an instance of PropertyChangeNotifier for the specified subject.
|
|
321
315
|
* @param subject - The object that subscribers will receive notifications for.
|
|
@@ -361,65 +355,65 @@ const J = Object.freeze({
|
|
|
361
355
|
* They can/will be GC'd together.
|
|
362
356
|
*/
|
|
363
357
|
coupled: 1
|
|
364
|
-
}),
|
|
358
|
+
}), g = v.getById(N.observable, () => {
|
|
365
359
|
const i = Ut.enqueue, t = /(:|&&|\|\||if|\?\.)/, e = /* @__PURE__ */ new WeakMap();
|
|
366
360
|
let s, n = (l) => {
|
|
367
|
-
throw
|
|
361
|
+
throw v.error(
|
|
368
362
|
1101
|
|
369
363
|
/* Message.needsArrayObservation */
|
|
370
364
|
);
|
|
371
365
|
};
|
|
372
366
|
function r(l) {
|
|
373
|
-
var
|
|
374
|
-
let h = (
|
|
375
|
-
return h === void 0 && (Array.isArray(l) ? h = n(l) : e.set(l, h = new
|
|
367
|
+
var a;
|
|
368
|
+
let h = (a = l.$fastController) !== null && a !== void 0 ? a : e.get(l);
|
|
369
|
+
return h === void 0 && (Array.isArray(l) ? h = n(l) : e.set(l, h = new qt(l))), h;
|
|
376
370
|
}
|
|
377
|
-
const
|
|
371
|
+
const o = zt();
|
|
378
372
|
class c {
|
|
379
|
-
constructor(
|
|
380
|
-
this.name =
|
|
381
|
-
}
|
|
382
|
-
getValue(
|
|
383
|
-
return s !== void 0 && s.watch(
|
|
384
|
-
}
|
|
385
|
-
setValue(
|
|
386
|
-
const u = this.field,
|
|
387
|
-
if (
|
|
388
|
-
|
|
389
|
-
const
|
|
390
|
-
|
|
373
|
+
constructor(a) {
|
|
374
|
+
this.name = a, this.field = `_${a}`, this.callback = `${a}Changed`;
|
|
375
|
+
}
|
|
376
|
+
getValue(a) {
|
|
377
|
+
return s !== void 0 && s.watch(a, this.name), a[this.field];
|
|
378
|
+
}
|
|
379
|
+
setValue(a, h) {
|
|
380
|
+
const u = this.field, b = a[u];
|
|
381
|
+
if (b !== h) {
|
|
382
|
+
a[u] = h;
|
|
383
|
+
const k = a[this.callback];
|
|
384
|
+
E(k) && k.call(a, b, h), r(a).notify(this.name);
|
|
391
385
|
}
|
|
392
386
|
}
|
|
393
387
|
}
|
|
394
388
|
class d extends rt {
|
|
395
|
-
constructor(
|
|
396
|
-
super(
|
|
389
|
+
constructor(a, h, u = !1) {
|
|
390
|
+
super(a, h), this.expression = a, this.isVolatileBinding = u, this.needsRefresh = !0, this.needsQueue = !0, this.isAsync = !0, this.first = this, this.last = null, this.propertySource = void 0, this.propertyName = void 0, this.notifier = void 0, this.next = void 0;
|
|
397
391
|
}
|
|
398
|
-
setMode(
|
|
399
|
-
this.isAsync = this.needsQueue =
|
|
392
|
+
setMode(a) {
|
|
393
|
+
this.isAsync = this.needsQueue = a;
|
|
400
394
|
}
|
|
401
|
-
bind(
|
|
402
|
-
this.controller =
|
|
403
|
-
const h = this.observe(
|
|
404
|
-
return !
|
|
395
|
+
bind(a) {
|
|
396
|
+
this.controller = a;
|
|
397
|
+
const h = this.observe(a.source, a.context);
|
|
398
|
+
return !a.isBound && this.requiresUnbind(a) && a.onUnbind(this), h;
|
|
405
399
|
}
|
|
406
|
-
requiresUnbind(
|
|
407
|
-
return
|
|
400
|
+
requiresUnbind(a) {
|
|
401
|
+
return a.sourceLifetime !== J.coupled || this.first !== this.last || this.first.propertySource !== a.source;
|
|
408
402
|
}
|
|
409
|
-
unbind(
|
|
403
|
+
unbind(a) {
|
|
410
404
|
this.dispose();
|
|
411
405
|
}
|
|
412
|
-
observe(
|
|
406
|
+
observe(a, h) {
|
|
413
407
|
this.needsRefresh && this.last !== null && this.dispose();
|
|
414
408
|
const u = s;
|
|
415
409
|
s = this.needsRefresh ? this : void 0, this.needsRefresh = this.isVolatileBinding;
|
|
416
|
-
let
|
|
410
|
+
let b;
|
|
417
411
|
try {
|
|
418
|
-
|
|
412
|
+
b = this.expression(a, h);
|
|
419
413
|
} finally {
|
|
420
414
|
s = u;
|
|
421
415
|
}
|
|
422
|
-
return
|
|
416
|
+
return b;
|
|
423
417
|
}
|
|
424
418
|
// backwards compat with v1 kernel
|
|
425
419
|
disconnect() {
|
|
@@ -427,22 +421,22 @@ const J = Object.freeze({
|
|
|
427
421
|
}
|
|
428
422
|
dispose() {
|
|
429
423
|
if (this.last !== null) {
|
|
430
|
-
let
|
|
431
|
-
for (;
|
|
432
|
-
|
|
424
|
+
let a = this.first;
|
|
425
|
+
for (; a !== void 0; )
|
|
426
|
+
a.notifier.unsubscribe(this, a.propertyName), a = a.next;
|
|
433
427
|
this.last = null, this.needsRefresh = this.needsQueue = this.isAsync;
|
|
434
428
|
}
|
|
435
429
|
}
|
|
436
|
-
watch(
|
|
437
|
-
const u = this.last,
|
|
438
|
-
if (
|
|
430
|
+
watch(a, h) {
|
|
431
|
+
const u = this.last, b = r(a), k = u === null ? this.first : {};
|
|
432
|
+
if (k.propertySource = a, k.propertyName = h, k.notifier = b, b.subscribe(this, h), u !== null) {
|
|
439
433
|
if (!this.needsRefresh) {
|
|
440
434
|
let ut;
|
|
441
|
-
s = void 0, ut = u.propertySource[u.propertyName], s = this,
|
|
435
|
+
s = void 0, ut = u.propertySource[u.propertyName], s = this, a === ut && (this.needsRefresh = !0);
|
|
442
436
|
}
|
|
443
|
-
u.next =
|
|
437
|
+
u.next = k;
|
|
444
438
|
}
|
|
445
|
-
this.last =
|
|
439
|
+
this.last = k;
|
|
446
440
|
}
|
|
447
441
|
handleChange() {
|
|
448
442
|
this.needsQueue ? (this.needsQueue = !1, i(this)) : this.isAsync || this.call();
|
|
@@ -451,9 +445,9 @@ const J = Object.freeze({
|
|
|
451
445
|
this.last !== null && (this.needsQueue = this.isAsync, this.notify(this));
|
|
452
446
|
}
|
|
453
447
|
*records() {
|
|
454
|
-
let
|
|
455
|
-
for (;
|
|
456
|
-
yield
|
|
448
|
+
let a = this.first;
|
|
449
|
+
for (; a !== void 0; )
|
|
450
|
+
yield a, a = a.next;
|
|
457
451
|
}
|
|
458
452
|
}
|
|
459
453
|
return x(d), Object.freeze({
|
|
@@ -474,8 +468,8 @@ const J = Object.freeze({
|
|
|
474
468
|
* @param source - The object to record the change against.
|
|
475
469
|
* @param propertyName - The property to track as changed.
|
|
476
470
|
*/
|
|
477
|
-
track(l,
|
|
478
|
-
s && s.watch(l,
|
|
471
|
+
track(l, a) {
|
|
472
|
+
s && s.watch(l, a);
|
|
479
473
|
},
|
|
480
474
|
/**
|
|
481
475
|
* Notifies watchers that the currently executing property getter or function is volatile
|
|
@@ -489,8 +483,8 @@ const J = Object.freeze({
|
|
|
489
483
|
* @param source - the object to notify of changes.
|
|
490
484
|
* @param args - The change args to pass to subscribers.
|
|
491
485
|
*/
|
|
492
|
-
notify(l,
|
|
493
|
-
r(l).notify(
|
|
486
|
+
notify(l, a) {
|
|
487
|
+
r(l).notify(a);
|
|
494
488
|
},
|
|
495
489
|
/**
|
|
496
490
|
* Defines an observable property on an object or prototype.
|
|
@@ -498,14 +492,14 @@ const J = Object.freeze({
|
|
|
498
492
|
* @param nameOrAccessor - The name of the property to define as observable;
|
|
499
493
|
* or a custom accessor that specifies the property name and accessor implementation.
|
|
500
494
|
*/
|
|
501
|
-
defineProperty(l,
|
|
502
|
-
B(
|
|
495
|
+
defineProperty(l, a) {
|
|
496
|
+
B(a) && (a = new c(a)), o(l).push(a), Reflect.defineProperty(l, a.name, {
|
|
503
497
|
enumerable: !0,
|
|
504
498
|
get() {
|
|
505
|
-
return
|
|
499
|
+
return a.getValue(this);
|
|
506
500
|
},
|
|
507
501
|
set(h) {
|
|
508
|
-
|
|
502
|
+
a.setValue(this, h);
|
|
509
503
|
}
|
|
510
504
|
});
|
|
511
505
|
},
|
|
@@ -514,7 +508,7 @@ const J = Object.freeze({
|
|
|
514
508
|
* including its prototype chain.
|
|
515
509
|
* @param target - The target object to search for accessor on.
|
|
516
510
|
*/
|
|
517
|
-
getAccessors:
|
|
511
|
+
getAccessors: o,
|
|
518
512
|
/**
|
|
519
513
|
* Creates a {@link ExpressionNotifier} that can watch the
|
|
520
514
|
* provided {@link Expression} for changes.
|
|
@@ -522,8 +516,8 @@ const J = Object.freeze({
|
|
|
522
516
|
* @param initialSubscriber - An initial subscriber to changes in the binding value.
|
|
523
517
|
* @param isVolatileBinding - Indicates whether the binding's dependency list must be re-evaluated on every value evaluation.
|
|
524
518
|
*/
|
|
525
|
-
binding(l,
|
|
526
|
-
return new d(l,
|
|
519
|
+
binding(l, a, h = this.isVolatileBinding(l)) {
|
|
520
|
+
return new d(l, a, h);
|
|
527
521
|
},
|
|
528
522
|
/**
|
|
529
523
|
* Determines whether a binding expression is volatile and needs to have its dependency list re-evaluated
|
|
@@ -535,17 +529,17 @@ const J = Object.freeze({
|
|
|
535
529
|
}
|
|
536
530
|
});
|
|
537
531
|
});
|
|
538
|
-
function
|
|
539
|
-
|
|
532
|
+
function hi(i, t) {
|
|
533
|
+
g.defineProperty(i, t);
|
|
540
534
|
}
|
|
541
|
-
function
|
|
535
|
+
function ui(i, t, e) {
|
|
542
536
|
return Object.assign({}, e, {
|
|
543
537
|
get() {
|
|
544
|
-
return
|
|
538
|
+
return g.trackVolatile(), e.get.apply(this);
|
|
545
539
|
}
|
|
546
540
|
});
|
|
547
541
|
}
|
|
548
|
-
const bt =
|
|
542
|
+
const bt = v.getById(N.contextEvent, () => {
|
|
549
543
|
let i = null;
|
|
550
544
|
return {
|
|
551
545
|
get() {
|
|
@@ -555,7 +549,7 @@ const bt = y.getById(N.contextEvent, () => {
|
|
|
555
549
|
i = t;
|
|
556
550
|
}
|
|
557
551
|
};
|
|
558
|
-
}),
|
|
552
|
+
}), O = Object.freeze({
|
|
559
553
|
/**
|
|
560
554
|
* A default execution context.
|
|
561
555
|
*/
|
|
@@ -563,7 +557,7 @@ const bt = y.getById(N.contextEvent, () => {
|
|
|
563
557
|
index: 0,
|
|
564
558
|
length: 0,
|
|
565
559
|
get event() {
|
|
566
|
-
return
|
|
560
|
+
return O.getEvent();
|
|
567
561
|
},
|
|
568
562
|
eventDetail() {
|
|
569
563
|
return this.event.detail;
|
|
@@ -600,10 +594,10 @@ class lt {
|
|
|
600
594
|
}
|
|
601
595
|
class ye extends lt {
|
|
602
596
|
createObserver(t) {
|
|
603
|
-
return
|
|
597
|
+
return g.binding(this.evaluate, t, this.isVolatile);
|
|
604
598
|
}
|
|
605
599
|
}
|
|
606
|
-
function
|
|
600
|
+
function Wt(i, t, e = g.isVolatileBinding(i)) {
|
|
607
601
|
return new ye(i, t, e);
|
|
608
602
|
}
|
|
609
603
|
class Qt extends lt {
|
|
@@ -680,7 +674,7 @@ class m {
|
|
|
680
674
|
}
|
|
681
675
|
m.supportsAdoptedStyleSheets = Array.isArray(document.adoptedStyleSheets) && "replace" in CSSStyleSheet.prototype;
|
|
682
676
|
const yt = /fe-b\$\$start\$\$(\d+)\$\$(.+)\$\$fe-b/, vt = /fe-b\$\$end\$\$(\d+)\$\$(.+)\$\$fe-b/, mt = /fe-repeat\$\$start\$\$(\d+)\$\$fe-repeat/, wt = /fe-repeat\$\$end\$\$(\d+)\$\$fe-repeat/, St = /^(?:.{0,1000})fe-eb\$\$start\$\$(.+?)\$\$fe-eb/, Ct = /fe-eb\$\$end\$\$(.{0,1000})\$\$fe-eb(?:.{0,1000})$/;
|
|
683
|
-
function
|
|
677
|
+
function kt(i) {
|
|
684
678
|
return i && i.nodeType === Node.COMMENT_NODE;
|
|
685
679
|
}
|
|
686
680
|
const w = Object.freeze({
|
|
@@ -711,10 +705,10 @@ const w = Object.freeze({
|
|
|
711
705
|
return wt.test(i);
|
|
712
706
|
},
|
|
713
707
|
isElementBoundaryStartMarker(i) {
|
|
714
|
-
return
|
|
708
|
+
return kt(i) && St.test(i.data.trim());
|
|
715
709
|
},
|
|
716
710
|
isElementBoundaryEndMarker(i) {
|
|
717
|
-
return
|
|
711
|
+
return kt(i) && Ct.test(i.data);
|
|
718
712
|
},
|
|
719
713
|
/**
|
|
720
714
|
* Returns the indexes of the ViewBehaviorFactories affecting
|
|
@@ -765,17 +759,17 @@ const w = Object.freeze({
|
|
|
765
759
|
* Parses element Id from element boundary markers
|
|
766
760
|
*/
|
|
767
761
|
parseElementBoundaryStartMarker(i) {
|
|
768
|
-
return
|
|
762
|
+
return $t(St, i.trim());
|
|
769
763
|
},
|
|
770
764
|
parseElementBoundaryEndMarker(i) {
|
|
771
|
-
return
|
|
765
|
+
return $t(Ct, i);
|
|
772
766
|
}
|
|
773
767
|
});
|
|
774
768
|
function Tt(i, t) {
|
|
775
769
|
const e = i.exec(t);
|
|
776
770
|
return e === null ? e : parseInt(e[1]);
|
|
777
771
|
}
|
|
778
|
-
function
|
|
772
|
+
function $t(i, t) {
|
|
779
773
|
const e = i.exec(t);
|
|
780
774
|
return e === null ? e : e[1];
|
|
781
775
|
}
|
|
@@ -787,7 +781,7 @@ const z = Symbol.for("fe-hydration");
|
|
|
787
781
|
function U(i) {
|
|
788
782
|
return i[z] === z;
|
|
789
783
|
}
|
|
790
|
-
const ct = `fast-${Math.random().toString(36).substring(2, 8)}`,
|
|
784
|
+
const ct = `fast-${Math.random().toString(36).substring(2, 8)}`, H = `${ct}{`, R = `}${ct}`, ve = R.length;
|
|
791
785
|
let me = 0;
|
|
792
786
|
const L = () => `${ct}-${++me}`, Kt = Object.freeze({
|
|
793
787
|
/**
|
|
@@ -797,7 +791,7 @@ const L = () => `${ct}-${++me}`, Kt = Object.freeze({
|
|
|
797
791
|
* @remarks
|
|
798
792
|
* Used internally by binding directives.
|
|
799
793
|
*/
|
|
800
|
-
interpolation: (i) => `${
|
|
794
|
+
interpolation: (i) => `${H}${i}${R}`,
|
|
801
795
|
/**
|
|
802
796
|
* Creates a placeholder that manifests itself as an attribute on an
|
|
803
797
|
* element.
|
|
@@ -806,14 +800,14 @@ const L = () => `${ct}-${++me}`, Kt = Object.freeze({
|
|
|
806
800
|
* @remarks
|
|
807
801
|
* Used internally by attribute directives such as `ref`, `slotted`, and `children`.
|
|
808
802
|
*/
|
|
809
|
-
attribute: (i) => `${L()}="${
|
|
803
|
+
attribute: (i) => `${L()}="${H}${i}${R}"`,
|
|
810
804
|
/**
|
|
811
805
|
* Creates a placeholder that manifests itself as a marker within the DOM structure.
|
|
812
806
|
* @param index - The directive index to create the placeholder for.
|
|
813
807
|
* @remarks
|
|
814
808
|
* Used internally by structural directives such as `repeat`.
|
|
815
809
|
*/
|
|
816
|
-
comment: (i) => `<!--${
|
|
810
|
+
comment: (i) => `<!--${H}${i}${R}-->`
|
|
817
811
|
}), K = Object.freeze({
|
|
818
812
|
/**
|
|
819
813
|
* Parses text content or HTML attribute content, separating out the static strings
|
|
@@ -824,24 +818,24 @@ const L = () => `${ct}-${++me}`, Kt = Object.freeze({
|
|
|
824
818
|
* directives or null if no directives are found in the string.
|
|
825
819
|
*/
|
|
826
820
|
parse(i, t) {
|
|
827
|
-
const e = i.split(
|
|
821
|
+
const e = i.split(H);
|
|
828
822
|
if (e.length === 1)
|
|
829
823
|
return null;
|
|
830
824
|
const s = [];
|
|
831
825
|
for (let n = 0, r = e.length; n < r; ++n) {
|
|
832
|
-
const
|
|
826
|
+
const o = e[n], c = o.indexOf(R);
|
|
833
827
|
let d;
|
|
834
828
|
if (c === -1)
|
|
835
|
-
d =
|
|
829
|
+
d = o;
|
|
836
830
|
else {
|
|
837
|
-
const l =
|
|
838
|
-
s.push(t[l]), d =
|
|
831
|
+
const l = o.substring(0, c);
|
|
832
|
+
s.push(t[l]), d = o.substring(c + ve);
|
|
839
833
|
}
|
|
840
834
|
d !== "" && s.push(d);
|
|
841
835
|
}
|
|
842
836
|
return s;
|
|
843
837
|
}
|
|
844
|
-
}), et = Pt(),
|
|
838
|
+
}), et = Pt(), $ = Object.freeze({
|
|
845
839
|
/**
|
|
846
840
|
* Gets the directive definition associated with the instance.
|
|
847
841
|
* @param instance - The directive instance to retrieve the definition for.
|
|
@@ -869,21 +863,21 @@ const L = () => `${ct}-${++me}`, Kt = Object.freeze({
|
|
|
869
863
|
*/
|
|
870
864
|
assignAspect(i, t) {
|
|
871
865
|
if (!t) {
|
|
872
|
-
i.aspectType =
|
|
866
|
+
i.aspectType = y.content;
|
|
873
867
|
return;
|
|
874
868
|
}
|
|
875
869
|
switch (i.sourceAspect = t, t[0]) {
|
|
876
870
|
case ":":
|
|
877
|
-
i.targetAspect = t.substring(1), i.aspectType = i.targetAspect === "classList" ?
|
|
871
|
+
i.targetAspect = t.substring(1), i.aspectType = i.targetAspect === "classList" ? y.tokenList : y.property;
|
|
878
872
|
break;
|
|
879
873
|
case "?":
|
|
880
|
-
i.targetAspect = t.substring(1), i.aspectType =
|
|
874
|
+
i.targetAspect = t.substring(1), i.aspectType = y.booleanAttribute;
|
|
881
875
|
break;
|
|
882
876
|
case "@":
|
|
883
|
-
i.targetAspect = t.substring(1), i.aspectType =
|
|
877
|
+
i.targetAspect = t.substring(1), i.aspectType = y.event;
|
|
884
878
|
break;
|
|
885
879
|
default:
|
|
886
|
-
i.targetAspect = t, i.aspectType =
|
|
880
|
+
i.targetAspect = t, i.aspectType = y.attribute;
|
|
887
881
|
break;
|
|
888
882
|
}
|
|
889
883
|
}
|
|
@@ -937,73 +931,73 @@ function Ce(i, t, e) {
|
|
|
937
931
|
acceptNode(l) {
|
|
938
932
|
return s.comparePoint(l, 0) === 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
|
|
939
933
|
}
|
|
940
|
-
}),
|
|
934
|
+
}), o = {}, c = {};
|
|
941
935
|
let d = r.currentNode = i;
|
|
942
936
|
for (; d !== null; ) {
|
|
943
937
|
switch (d.nodeType) {
|
|
944
938
|
case Node.ELEMENT_NODE: {
|
|
945
|
-
|
|
939
|
+
ke(d, e, o);
|
|
946
940
|
break;
|
|
947
941
|
}
|
|
948
942
|
case Node.COMMENT_NODE: {
|
|
949
|
-
Te(d, r, e,
|
|
943
|
+
Te(d, r, e, o, c);
|
|
950
944
|
break;
|
|
951
945
|
}
|
|
952
946
|
}
|
|
953
947
|
d = r.nextNode();
|
|
954
948
|
}
|
|
955
|
-
return s.detach(), { targets:
|
|
949
|
+
return s.detach(), { targets: o, boundaries: c };
|
|
956
950
|
}
|
|
957
|
-
function
|
|
951
|
+
function ke(i, t, e) {
|
|
958
952
|
var s;
|
|
959
953
|
const n = (s = w.parseAttributeBinding(i)) !== null && s !== void 0 ? s : w.parseEnumeratedAttributeBinding(i);
|
|
960
954
|
if (n !== null) {
|
|
961
955
|
for (const r of n) {
|
|
962
956
|
if (!t[r])
|
|
963
957
|
throw new Xt(`HydrationView was unable to successfully target factory on ${i.nodeName} inside ${i.getRootNode().host.nodeName}. This likely indicates a template mismatch between SSR rendering and hydration.`, t, i);
|
|
964
|
-
|
|
958
|
+
q(t[r], i, e);
|
|
965
959
|
}
|
|
966
960
|
i.removeAttribute(w.attributeMarkerName);
|
|
967
961
|
}
|
|
968
962
|
}
|
|
969
963
|
function Te(i, t, e, s, n) {
|
|
970
964
|
if (w.isElementBoundaryStartMarker(i)) {
|
|
971
|
-
|
|
965
|
+
$e(i, t);
|
|
972
966
|
return;
|
|
973
967
|
}
|
|
974
968
|
if (w.isContentBindingStartMarker(i.data)) {
|
|
975
969
|
const r = w.parseContentBindingStartMarker(i.data);
|
|
976
970
|
if (r === null)
|
|
977
971
|
return;
|
|
978
|
-
const [
|
|
979
|
-
let
|
|
972
|
+
const [o, c] = r, d = e[o], l = [];
|
|
973
|
+
let a = t.nextSibling();
|
|
980
974
|
i.data = "";
|
|
981
|
-
const h =
|
|
982
|
-
for (;
|
|
983
|
-
if (dt(
|
|
984
|
-
const u = w.parseContentBindingEndMarker(
|
|
975
|
+
const h = a;
|
|
976
|
+
for (; a !== null; ) {
|
|
977
|
+
if (dt(a)) {
|
|
978
|
+
const u = w.parseContentBindingEndMarker(a.data);
|
|
985
979
|
if (u && u[1] === c)
|
|
986
980
|
break;
|
|
987
981
|
}
|
|
988
|
-
l.push(
|
|
982
|
+
l.push(a), a = t.nextSibling();
|
|
989
983
|
}
|
|
990
|
-
if (
|
|
984
|
+
if (a === null) {
|
|
991
985
|
const u = i.getRootNode();
|
|
992
986
|
throw new Error(`Error hydrating Comment node inside "${Se(u) ? u.host.nodeName : u.nodeName}".`);
|
|
993
987
|
}
|
|
994
|
-
if (
|
|
995
|
-
|
|
988
|
+
if (a.data = "", l.length === 1 && Yt(l[0]))
|
|
989
|
+
q(d, l[0], s);
|
|
996
990
|
else {
|
|
997
|
-
|
|
991
|
+
a !== h && a.previousSibling !== null && (n[d.targetNodeId] = {
|
|
998
992
|
first: h,
|
|
999
|
-
last:
|
|
993
|
+
last: a.previousSibling
|
|
1000
994
|
});
|
|
1001
|
-
const u =
|
|
1002
|
-
|
|
995
|
+
const u = a.parentNode.insertBefore(document.createTextNode(""), a);
|
|
996
|
+
q(d, u, s);
|
|
1003
997
|
}
|
|
1004
998
|
}
|
|
1005
999
|
}
|
|
1006
|
-
function
|
|
1000
|
+
function $e(i, t) {
|
|
1007
1001
|
const e = w.parseElementBoundaryStartMarker(i.data);
|
|
1008
1002
|
let s = t.nextSibling();
|
|
1009
1003
|
for (; s !== null; ) {
|
|
@@ -1015,13 +1009,13 @@ function ke(i, t) {
|
|
|
1015
1009
|
s = t.nextSibling();
|
|
1016
1010
|
}
|
|
1017
1011
|
}
|
|
1018
|
-
function
|
|
1012
|
+
function q(i, t, e) {
|
|
1019
1013
|
if (i.targetNodeId === void 0)
|
|
1020
1014
|
throw new Error("Factory could not be target to the node");
|
|
1021
1015
|
e[i.targetNodeId] = t;
|
|
1022
1016
|
}
|
|
1023
1017
|
var te;
|
|
1024
|
-
function
|
|
1018
|
+
function at(i, t) {
|
|
1025
1019
|
const e = i.parentNode;
|
|
1026
1020
|
let s = i, n;
|
|
1027
1021
|
for (; s !== t; ) {
|
|
@@ -1039,7 +1033,7 @@ class ee {
|
|
|
1039
1033
|
* The current event within an event handler.
|
|
1040
1034
|
*/
|
|
1041
1035
|
get event() {
|
|
1042
|
-
return
|
|
1036
|
+
return O.getEvent();
|
|
1043
1037
|
}
|
|
1044
1038
|
/**
|
|
1045
1039
|
* Indicates whether the current item within a repeat context
|
|
@@ -1139,7 +1133,7 @@ class X extends ee {
|
|
|
1139
1133
|
* Once a view has been disposed, it cannot be inserted or bound again.
|
|
1140
1134
|
*/
|
|
1141
1135
|
dispose() {
|
|
1142
|
-
|
|
1136
|
+
at(this.firstChild, this.lastChild), this.unbind();
|
|
1143
1137
|
}
|
|
1144
1138
|
onUnbind(t) {
|
|
1145
1139
|
this.unbindables.push(t);
|
|
@@ -1156,7 +1150,7 @@ class X extends ee {
|
|
|
1156
1150
|
if (s === null) {
|
|
1157
1151
|
this.source = t, this.context = e, this.behaviors = s = new Array(this.factories.length);
|
|
1158
1152
|
const n = this.factories;
|
|
1159
|
-
for (let r = 0,
|
|
1153
|
+
for (let r = 0, o = n.length; r < o; ++r) {
|
|
1160
1154
|
const c = n[r].createBehavior();
|
|
1161
1155
|
c.bind(this), s[r] = c;
|
|
1162
1156
|
}
|
|
@@ -1185,15 +1179,15 @@ class X extends ee {
|
|
|
1185
1179
|
*/
|
|
1186
1180
|
static disposeContiguousBatch(t) {
|
|
1187
1181
|
if (t.length !== 0) {
|
|
1188
|
-
|
|
1182
|
+
at(t[0].firstChild, t[t.length - 1].lastChild);
|
|
1189
1183
|
for (let e = 0, s = t.length; e < s; ++e)
|
|
1190
1184
|
t[e].unbind();
|
|
1191
1185
|
}
|
|
1192
1186
|
}
|
|
1193
1187
|
}
|
|
1194
1188
|
x(X);
|
|
1195
|
-
|
|
1196
|
-
|
|
1189
|
+
g.defineProperty(X.prototype, "index");
|
|
1190
|
+
g.defineProperty(X.prototype, "length");
|
|
1197
1191
|
const A = {
|
|
1198
1192
|
unhydrated: "unhydrated",
|
|
1199
1193
|
hydrating: "hydrating",
|
|
@@ -1262,41 +1256,41 @@ class Be extends ee {
|
|
|
1262
1256
|
if (n === null) {
|
|
1263
1257
|
this.source = t, this.context = e;
|
|
1264
1258
|
try {
|
|
1265
|
-
const { targets:
|
|
1266
|
-
this._targets =
|
|
1267
|
-
} catch (
|
|
1268
|
-
if (
|
|
1259
|
+
const { targets: o, boundaries: c } = Ce(this.firstChild, this.lastChild, this.factories);
|
|
1260
|
+
this._targets = o, this._bindingViewBoundaries = c;
|
|
1261
|
+
} catch (o) {
|
|
1262
|
+
if (o instanceof Xt) {
|
|
1269
1263
|
let c = this.sourceTemplate.html;
|
|
1270
|
-
typeof c != "string" && (c = c.innerHTML),
|
|
1264
|
+
typeof c != "string" && (c = c.innerHTML), o.templateString = c;
|
|
1271
1265
|
}
|
|
1272
|
-
throw
|
|
1266
|
+
throw o;
|
|
1273
1267
|
}
|
|
1274
1268
|
this.behaviors = n = new Array(this.factories.length);
|
|
1275
1269
|
const r = this.factories;
|
|
1276
|
-
for (let
|
|
1277
|
-
const d = r[
|
|
1278
|
-
if (d.targetNodeId === "h" && this.hostBindingTarget &&
|
|
1270
|
+
for (let o = 0, c = r.length; o < c; ++o) {
|
|
1271
|
+
const d = r[o];
|
|
1272
|
+
if (d.targetNodeId === "h" && this.hostBindingTarget && q(d, this.hostBindingTarget, this._targets), d.targetNodeId in this.targets) {
|
|
1279
1273
|
const l = d.createBehavior();
|
|
1280
|
-
l.bind(this), n[
|
|
1274
|
+
l.bind(this), n[o] = l;
|
|
1281
1275
|
} else {
|
|
1282
1276
|
let l = this.sourceTemplate.html;
|
|
1283
1277
|
typeof l != "string" && (l = l.innerHTML);
|
|
1284
|
-
const
|
|
1278
|
+
const a = ((s = this.firstChild) === null || s === void 0 ? void 0 : s.getRootNode()).host, h = a?.nodeName || "unknown", u = d, b = [
|
|
1285
1279
|
`HydrationView was unable to successfully target bindings inside "<${h.toLowerCase()}>".`,
|
|
1286
1280
|
`
|
|
1287
1281
|
Mismatch Details:`,
|
|
1288
1282
|
` - Expected target node ID: "${d.targetNodeId}"`,
|
|
1289
1283
|
` - Available target IDs: [${Object.keys(this.targets).join(", ") || "none"}]`
|
|
1290
1284
|
];
|
|
1291
|
-
throw d.targetTagName &&
|
|
1285
|
+
throw d.targetTagName && b.push(` - Expected tag name: "${d.targetTagName}"`), u.sourceAspect && b.push(` - Source aspect: "${u.sourceAspect}"`), u.aspectType !== void 0 && b.push(` - Aspect type: ${u.aspectType}`), b.push(`
|
|
1292
1286
|
This usually means:`, " 1. The server-rendered HTML doesn't match the client template", " 2. The hydration markers are missing or corrupted", " 3. The DOM structure was modified before hydration", `
|
|
1293
|
-
Template: ${l.slice(0, 200)}${l.length > 200 ? "..." : ""}`), new Ne(
|
|
1287
|
+
Template: ${l.slice(0, 200)}${l.length > 200 ? "..." : ""}`), new Ne(b.join(`
|
|
1294
1288
|
`), d, Zt(this.firstChild, this.lastChild).cloneContents(), l);
|
|
1295
1289
|
}
|
|
1296
1290
|
}
|
|
1297
1291
|
} else {
|
|
1298
1292
|
this.source !== null && this.evaluateUnbindables(), this.isBound = !1, this.source = t, this.context = e;
|
|
1299
|
-
for (let r = 0,
|
|
1293
|
+
for (let r = 0, o = n.length; r < o; ++r)
|
|
1300
1294
|
n[r].bind(this);
|
|
1301
1295
|
}
|
|
1302
1296
|
this.isBound = !0, this._hydrationStage = A.hydrated;
|
|
@@ -1309,7 +1303,7 @@ Template: ${l.slice(0, 200)}${l.length > 200 ? "..." : ""}`), new Ne(p.join(`
|
|
|
1309
1303
|
* Once a view has been disposed, it cannot be inserted or bound again.
|
|
1310
1304
|
*/
|
|
1311
1305
|
dispose() {
|
|
1312
|
-
|
|
1306
|
+
at(this.firstChild, this.lastChild), this.unbind();
|
|
1313
1307
|
}
|
|
1314
1308
|
onUnbind(t) {
|
|
1315
1309
|
this.unbindables.push(t);
|
|
@@ -1346,29 +1340,29 @@ function Ae(i, t, e, s) {
|
|
|
1346
1340
|
}
|
|
1347
1341
|
function Me(i, t, e) {
|
|
1348
1342
|
var s;
|
|
1349
|
-
const n = `${this.id}-t`, r = (s = i[n]) !== null && s !== void 0 ? s : i[n] = { v: 0, cv: /* @__PURE__ */ Object.create(null) },
|
|
1343
|
+
const n = `${this.id}-t`, r = (s = i[n]) !== null && s !== void 0 ? s : i[n] = { v: 0, cv: /* @__PURE__ */ Object.create(null) }, o = r.cv;
|
|
1350
1344
|
let c = r.v;
|
|
1351
1345
|
const d = i[t];
|
|
1352
1346
|
if (e != null && e.length) {
|
|
1353
1347
|
const l = e.split(/\s+/);
|
|
1354
|
-
for (let
|
|
1355
|
-
const u = l[
|
|
1356
|
-
u !== "" && (
|
|
1348
|
+
for (let a = 0, h = l.length; a < h; ++a) {
|
|
1349
|
+
const u = l[a];
|
|
1350
|
+
u !== "" && (o[u] = c, d.add(u));
|
|
1357
1351
|
}
|
|
1358
1352
|
}
|
|
1359
1353
|
if (r.v = c + 1, c !== 0) {
|
|
1360
1354
|
c -= 1;
|
|
1361
|
-
for (const l in
|
|
1362
|
-
|
|
1355
|
+
for (const l in o)
|
|
1356
|
+
o[l] === c && d.remove(l);
|
|
1363
1357
|
}
|
|
1364
1358
|
}
|
|
1365
|
-
const
|
|
1366
|
-
[
|
|
1367
|
-
[
|
|
1368
|
-
[
|
|
1369
|
-
[
|
|
1370
|
-
[
|
|
1371
|
-
[
|
|
1359
|
+
const Oe = {
|
|
1360
|
+
[y.attribute]: T.setAttribute,
|
|
1361
|
+
[y.booleanAttribute]: T.setBooleanAttribute,
|
|
1362
|
+
[y.property]: (i, t, e) => i[t] = e,
|
|
1363
|
+
[y.content]: Ae,
|
|
1364
|
+
[y.tokenList]: Me,
|
|
1365
|
+
[y.event]: () => {
|
|
1372
1366
|
}
|
|
1373
1367
|
};
|
|
1374
1368
|
class M {
|
|
@@ -1377,7 +1371,7 @@ class M {
|
|
|
1377
1371
|
* @param dataBinding - The binding configuration to apply.
|
|
1378
1372
|
*/
|
|
1379
1373
|
constructor(t) {
|
|
1380
|
-
this.dataBinding = t, this.updateTarget = null, this.aspectType =
|
|
1374
|
+
this.dataBinding = t, this.updateTarget = null, this.aspectType = y.content;
|
|
1381
1375
|
}
|
|
1382
1376
|
/**
|
|
1383
1377
|
* Creates HTML to be used within a template.
|
|
@@ -1392,9 +1386,9 @@ class M {
|
|
|
1392
1386
|
createBehavior() {
|
|
1393
1387
|
var t;
|
|
1394
1388
|
if (this.updateTarget === null) {
|
|
1395
|
-
const e =
|
|
1389
|
+
const e = Oe[this.aspectType], s = (t = this.dataBinding.policy) !== null && t !== void 0 ? t : this.policy;
|
|
1396
1390
|
if (!e)
|
|
1397
|
-
throw
|
|
1391
|
+
throw v.error(
|
|
1398
1392
|
1205
|
|
1399
1393
|
/* Message.unsupportedBindingBehavior */
|
|
1400
1394
|
);
|
|
@@ -1407,14 +1401,14 @@ class M {
|
|
|
1407
1401
|
var e;
|
|
1408
1402
|
const s = t.targets[this.targetNodeId], n = U(t) && t.hydrationStage && t.hydrationStage !== A.hydrated;
|
|
1409
1403
|
switch (this.aspectType) {
|
|
1410
|
-
case
|
|
1404
|
+
case y.event:
|
|
1411
1405
|
s[this.data] = t, s.addEventListener(this.targetAspect, this, this.dataBinding.options);
|
|
1412
1406
|
break;
|
|
1413
|
-
case
|
|
1407
|
+
case y.content:
|
|
1414
1408
|
t.onUnbind(this);
|
|
1415
1409
|
default:
|
|
1416
1410
|
const r = (e = s[this.data]) !== null && e !== void 0 ? e : s[this.data] = this.dataBinding.createObserver(this, this);
|
|
1417
|
-
if (r.target = s, r.controller = t, n && (this.aspectType ===
|
|
1411
|
+
if (r.target = s, r.controller = t, n && (this.aspectType === y.attribute || this.aspectType === y.booleanAttribute)) {
|
|
1418
1412
|
r.bind(t);
|
|
1419
1413
|
break;
|
|
1420
1414
|
}
|
|
@@ -1431,9 +1425,9 @@ class M {
|
|
|
1431
1425
|
handleEvent(t) {
|
|
1432
1426
|
const e = t.currentTarget[this.data];
|
|
1433
1427
|
if (e.isBound) {
|
|
1434
|
-
|
|
1428
|
+
O.setEvent(t);
|
|
1435
1429
|
const s = this.dataBinding.evaluate(e.source, e.context);
|
|
1436
|
-
|
|
1430
|
+
O.setEvent(null), s !== !0 && t.preventDefault();
|
|
1437
1431
|
}
|
|
1438
1432
|
}
|
|
1439
1433
|
/** @internal */
|
|
@@ -1442,31 +1436,31 @@ class M {
|
|
|
1442
1436
|
this.updateTarget(s, this.targetAspect, e.bind(n), n);
|
|
1443
1437
|
}
|
|
1444
1438
|
}
|
|
1445
|
-
|
|
1446
|
-
const ie = (i, t) => `${i}.${t}`, Bt = {},
|
|
1439
|
+
$.define(M, { aspected: !0 });
|
|
1440
|
+
const ie = (i, t) => `${i}.${t}`, Bt = {}, C = {
|
|
1447
1441
|
index: 0,
|
|
1448
1442
|
node: null
|
|
1449
1443
|
};
|
|
1450
1444
|
function xt(i) {
|
|
1451
|
-
i.startsWith("fast-") ||
|
|
1445
|
+
i.startsWith("fast-") || v.warn(1204, { name: i });
|
|
1452
1446
|
}
|
|
1453
|
-
const
|
|
1447
|
+
const Ee = new Proxy(document.createElement("div"), {
|
|
1454
1448
|
get(i, t) {
|
|
1455
1449
|
xt(t);
|
|
1456
1450
|
const e = Reflect.get(i, t);
|
|
1457
|
-
return
|
|
1451
|
+
return E(e) ? e.bind(i) : e;
|
|
1458
1452
|
},
|
|
1459
1453
|
set(i, t, e) {
|
|
1460
1454
|
return xt(t), Reflect.set(i, t, e);
|
|
1461
1455
|
}
|
|
1462
1456
|
});
|
|
1463
|
-
class
|
|
1457
|
+
class Re {
|
|
1464
1458
|
constructor(t, e, s) {
|
|
1465
1459
|
this.fragment = t, this.directives = e, this.policy = s, this.proto = null, this.nodeIds = /* @__PURE__ */ new Set(), this.descriptors = {}, this.factories = [];
|
|
1466
1460
|
}
|
|
1467
1461
|
addFactory(t, e, s, n, r) {
|
|
1468
|
-
var
|
|
1469
|
-
this.nodeIds.has(s) || (this.nodeIds.add(s), this.addTargetDescriptor(e, s, n)), t.id = (
|
|
1462
|
+
var o, c;
|
|
1463
|
+
this.nodeIds.has(s) || (this.nodeIds.add(s), this.addTargetDescriptor(e, s, n)), t.id = (o = t.id) !== null && o !== void 0 ? o : L(), t.targetNodeId = s, t.targetTagName = r, t.policy = (c = t.policy) !== null && c !== void 0 ? c : this.policy, this.factories.push(t);
|
|
1470
1464
|
}
|
|
1471
1465
|
freeze() {
|
|
1472
1466
|
return this.proto = Object.create(null, this.descriptors), this;
|
|
@@ -1478,16 +1472,16 @@ class _e {
|
|
|
1478
1472
|
n[e])
|
|
1479
1473
|
return;
|
|
1480
1474
|
if (!n[t]) {
|
|
1481
|
-
const
|
|
1475
|
+
const o = t.lastIndexOf("."), c = t.substring(0, o), d = parseInt(t.substring(o + 1));
|
|
1482
1476
|
this.addTargetDescriptor(c, t, d);
|
|
1483
1477
|
}
|
|
1484
1478
|
let r = Bt[e];
|
|
1485
1479
|
if (!r) {
|
|
1486
|
-
const
|
|
1480
|
+
const o = `_${e}`;
|
|
1487
1481
|
Bt[e] = r = {
|
|
1488
1482
|
get() {
|
|
1489
1483
|
var c;
|
|
1490
|
-
return (c = this[
|
|
1484
|
+
return (c = this[o]) !== null && c !== void 0 ? c : this[o] = this[t].childNodes[s];
|
|
1491
1485
|
}
|
|
1492
1486
|
};
|
|
1493
1487
|
}
|
|
@@ -1495,46 +1489,46 @@ class _e {
|
|
|
1495
1489
|
}
|
|
1496
1490
|
createView(t) {
|
|
1497
1491
|
const e = this.fragment.cloneNode(!0), s = Object.create(this.proto);
|
|
1498
|
-
s.r = e, s.h = t ??
|
|
1492
|
+
s.r = e, s.h = t ?? Ee;
|
|
1499
1493
|
for (const n of this.nodeIds)
|
|
1500
1494
|
s[n];
|
|
1501
1495
|
return new X(e, this.factories, s);
|
|
1502
1496
|
}
|
|
1503
1497
|
}
|
|
1504
1498
|
function se(i, t, e, s, n, r = !1) {
|
|
1505
|
-
const
|
|
1506
|
-
for (let d = 0, l =
|
|
1507
|
-
const
|
|
1508
|
-
let
|
|
1509
|
-
u === null ? r && (
|
|
1499
|
+
const o = e.attributes, c = i.directives;
|
|
1500
|
+
for (let d = 0, l = o.length; d < l; ++d) {
|
|
1501
|
+
const a = o[d], h = a.value, u = K.parse(h, c);
|
|
1502
|
+
let b = null;
|
|
1503
|
+
u === null ? r && (b = new M(Gt(() => h, i.policy)), $.assignAspect(b, a.name)) : b = ht.aggregate(u, i.policy), b !== null && (e.removeAttributeNode(a), d--, l--, i.addFactory(b, t, s, n, e.tagName));
|
|
1510
1504
|
}
|
|
1511
1505
|
}
|
|
1512
|
-
function
|
|
1506
|
+
function Ie(i, t, e, s, n) {
|
|
1513
1507
|
const r = K.parse(t.textContent, i.directives);
|
|
1514
1508
|
if (r === null)
|
|
1515
|
-
return
|
|
1516
|
-
let
|
|
1509
|
+
return C.node = t.nextSibling, C.index = n + 1, C;
|
|
1510
|
+
let o, c = o = t;
|
|
1517
1511
|
for (let d = 0, l = r.length; d < l; ++d) {
|
|
1518
|
-
const
|
|
1519
|
-
d !== 0 && (n++, s = ie(e, n),
|
|
1512
|
+
const a = r[d];
|
|
1513
|
+
d !== 0 && (n++, s = ie(e, n), o = c.parentNode.insertBefore(document.createTextNode(""), c.nextSibling)), B(a) ? o.textContent = a : (o.textContent = " ", $.assignAspect(a), i.addFactory(a, e, s, n, null)), c = o;
|
|
1520
1514
|
}
|
|
1521
|
-
return
|
|
1515
|
+
return C.index = n + 1, C.node = c.nextSibling, C;
|
|
1522
1516
|
}
|
|
1523
1517
|
function ne(i, t, e) {
|
|
1524
1518
|
let s = 0, n = t.firstChild;
|
|
1525
1519
|
for (; n; ) {
|
|
1526
|
-
const r =
|
|
1520
|
+
const r = _e(i, e, n, s);
|
|
1527
1521
|
n = r.node, s = r.index;
|
|
1528
1522
|
}
|
|
1529
1523
|
}
|
|
1530
|
-
function
|
|
1524
|
+
function _e(i, t, e, s) {
|
|
1531
1525
|
const n = ie(t, s);
|
|
1532
1526
|
switch (e.nodeType) {
|
|
1533
1527
|
case 1:
|
|
1534
1528
|
se(i, t, e, n, s), ne(i, e, n);
|
|
1535
1529
|
break;
|
|
1536
1530
|
case 3:
|
|
1537
|
-
return
|
|
1531
|
+
return Ie(i, e, t, n, s);
|
|
1538
1532
|
case 8:
|
|
1539
1533
|
const r = K.parse(e.data, i.directives);
|
|
1540
1534
|
r !== null && i.addFactory(
|
|
@@ -1547,7 +1541,7 @@ function je(i, t, e, s) {
|
|
|
1547
1541
|
);
|
|
1548
1542
|
break;
|
|
1549
1543
|
}
|
|
1550
|
-
return
|
|
1544
|
+
return C.index = s + 1, C.node = e.nextSibling, C;
|
|
1551
1545
|
}
|
|
1552
1546
|
function Le(i, t) {
|
|
1553
1547
|
return i && i.nodeType == 8 && K.parse(i.data, t) !== null;
|
|
@@ -1569,12 +1563,12 @@ const At = "TEMPLATE", ht = {
|
|
|
1569
1563
|
let s;
|
|
1570
1564
|
if (B(i)) {
|
|
1571
1565
|
s = document.createElement(At), s.innerHTML = e.createHTML(i);
|
|
1572
|
-
const
|
|
1573
|
-
|
|
1566
|
+
const o = s.content.firstElementChild;
|
|
1567
|
+
o !== null && o.tagName === At && (s = o);
|
|
1574
1568
|
} else
|
|
1575
1569
|
s = i;
|
|
1576
1570
|
!s.content.firstChild && !s.content.lastChild && s.content.appendChild(document.createComment(""));
|
|
1577
|
-
const n = document.adoptNode(s.content), r = new
|
|
1571
|
+
const n = document.adoptNode(s.content), r = new Re(n, t, e);
|
|
1578
1572
|
return se(
|
|
1579
1573
|
r,
|
|
1580
1574
|
"",
|
|
@@ -1595,7 +1589,7 @@ const At = "TEMPLATE", ht = {
|
|
|
1595
1589
|
n,
|
|
1596
1590
|
/* root */
|
|
1597
1591
|
"r"
|
|
1598
|
-
),
|
|
1592
|
+
), C.node = null, r.freeze();
|
|
1599
1593
|
},
|
|
1600
1594
|
/**
|
|
1601
1595
|
* Sets the default compilation strategy that will be used by the ViewTemplate whenever
|
|
@@ -1616,24 +1610,24 @@ const At = "TEMPLATE", ht = {
|
|
|
1616
1610
|
if (i.length === 1)
|
|
1617
1611
|
return i[0];
|
|
1618
1612
|
let e, s = !1, n;
|
|
1619
|
-
const r = i.length,
|
|
1613
|
+
const r = i.length, o = i.map((l) => B(l) ? () => l : (e = l.sourceAspect || e, s = s || l.dataBinding.isVolatile, n = n || l.dataBinding.policy, l.dataBinding.evaluate)), c = (l, a) => {
|
|
1620
1614
|
let h = "";
|
|
1621
1615
|
for (let u = 0; u < r; ++u)
|
|
1622
|
-
h +=
|
|
1616
|
+
h += o[u](l, a);
|
|
1623
1617
|
return h;
|
|
1624
|
-
}, d = new M(
|
|
1625
|
-
return
|
|
1618
|
+
}, d = new M(Wt(c, n ?? t, s));
|
|
1619
|
+
return $.assignAspect(d, e), d;
|
|
1626
1620
|
}
|
|
1627
1621
|
}, Ve = (
|
|
1628
1622
|
/* eslint-disable-next-line no-control-regex, max-len */
|
|
1629
1623
|
/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/
|
|
1630
|
-
),
|
|
1624
|
+
), je = /* @__PURE__ */ Object.create(null);
|
|
1631
1625
|
class V {
|
|
1632
1626
|
/**
|
|
1633
1627
|
* Creates an instance of InlineTemplateDirective.
|
|
1634
1628
|
* @param template - The template to inline.
|
|
1635
1629
|
*/
|
|
1636
|
-
constructor(t, e =
|
|
1630
|
+
constructor(t, e = je) {
|
|
1637
1631
|
this.html = t, this.factories = e;
|
|
1638
1632
|
}
|
|
1639
1633
|
/**
|
|
@@ -1648,11 +1642,11 @@ class V {
|
|
|
1648
1642
|
}
|
|
1649
1643
|
}
|
|
1650
1644
|
V.empty = new V("");
|
|
1651
|
-
|
|
1652
|
-
function
|
|
1645
|
+
$.define(V);
|
|
1646
|
+
function Fe(i, t, e, s = $.getForInstance(i)) {
|
|
1653
1647
|
if (s.aspected) {
|
|
1654
1648
|
const n = Ve.exec(t);
|
|
1655
|
-
n !== null &&
|
|
1649
|
+
n !== null && $.assignAspect(i, n[2]);
|
|
1656
1650
|
}
|
|
1657
1651
|
return i.createHTML(e);
|
|
1658
1652
|
}
|
|
@@ -1695,12 +1689,12 @@ class Y {
|
|
|
1695
1689
|
*/
|
|
1696
1690
|
withPolicy(t) {
|
|
1697
1691
|
if (this.result)
|
|
1698
|
-
throw
|
|
1692
|
+
throw v.error(
|
|
1699
1693
|
1208
|
|
1700
1694
|
/* Message.cannotSetTemplatePolicyAfterCompilation */
|
|
1701
1695
|
);
|
|
1702
1696
|
if (this.policy)
|
|
1703
|
-
throw
|
|
1697
|
+
throw v.error(
|
|
1704
1698
|
1207
|
|
1705
1699
|
/* Message.onlySetTemplatePolicyOnce */
|
|
1706
1700
|
);
|
|
@@ -1732,23 +1726,23 @@ class Y {
|
|
|
1732
1726
|
*/
|
|
1733
1727
|
static create(t, e, s) {
|
|
1734
1728
|
let n = "";
|
|
1735
|
-
const r = /* @__PURE__ */ Object.create(null),
|
|
1729
|
+
const r = /* @__PURE__ */ Object.create(null), o = (c) => {
|
|
1736
1730
|
var d;
|
|
1737
1731
|
const l = (d = c.id) !== null && d !== void 0 ? d : c.id = L();
|
|
1738
1732
|
return r[l] = c, l;
|
|
1739
1733
|
};
|
|
1740
1734
|
for (let c = 0, d = t.length - 1; c < d; ++c) {
|
|
1741
1735
|
const l = t[c];
|
|
1742
|
-
let
|
|
1743
|
-
if (n += l,
|
|
1744
|
-
|
|
1745
|
-
else if (
|
|
1746
|
-
|
|
1747
|
-
else if (!(h =
|
|
1748
|
-
const u =
|
|
1749
|
-
|
|
1736
|
+
let a = e[c], h;
|
|
1737
|
+
if (n += l, E(a))
|
|
1738
|
+
a = new M(Wt(a));
|
|
1739
|
+
else if (a instanceof lt)
|
|
1740
|
+
a = new M(a);
|
|
1741
|
+
else if (!(h = $.getForInstance(a))) {
|
|
1742
|
+
const u = a;
|
|
1743
|
+
a = new M(Gt(() => u));
|
|
1750
1744
|
}
|
|
1751
|
-
n +=
|
|
1745
|
+
n += Fe(a, l, o, h);
|
|
1752
1746
|
}
|
|
1753
1747
|
return new Y(n + t[t.length - 1], r, s);
|
|
1754
1748
|
}
|
|
@@ -1757,18 +1751,18 @@ x(Y);
|
|
|
1757
1751
|
const re = (i, ...t) => {
|
|
1758
1752
|
if (Array.isArray(i) && Array.isArray(i.raw))
|
|
1759
1753
|
return Y.create(i, t);
|
|
1760
|
-
throw
|
|
1754
|
+
throw v.error(
|
|
1761
1755
|
1206
|
|
1762
1756
|
/* Message.directCallToHTMLTagNotAllowed */
|
|
1763
1757
|
);
|
|
1764
1758
|
};
|
|
1765
1759
|
re.partial = (i) => new V(i);
|
|
1766
|
-
const Mt = "boolean",
|
|
1760
|
+
const Mt = "boolean", Ot = "reflect", ae = Object.freeze({
|
|
1767
1761
|
/**
|
|
1768
1762
|
* Locates all attribute configurations associated with a type.
|
|
1769
1763
|
*/
|
|
1770
1764
|
locate: zt()
|
|
1771
|
-
}),
|
|
1765
|
+
}), De = {
|
|
1772
1766
|
toView(i) {
|
|
1773
1767
|
return i ? "true" : "false";
|
|
1774
1768
|
},
|
|
@@ -1776,20 +1770,20 @@ const Mt = "boolean", Et = "reflect", oe = Object.freeze({
|
|
|
1776
1770
|
return !(i == null || i === "false" || i === !1 || i === 0);
|
|
1777
1771
|
}
|
|
1778
1772
|
};
|
|
1779
|
-
function
|
|
1773
|
+
function Et(i) {
|
|
1780
1774
|
if (i == null)
|
|
1781
1775
|
return null;
|
|
1782
1776
|
const t = i * 1;
|
|
1783
1777
|
return isNaN(t) ? null : t;
|
|
1784
1778
|
}
|
|
1785
|
-
const
|
|
1779
|
+
const fi = {
|
|
1786
1780
|
toView(i) {
|
|
1787
|
-
const t =
|
|
1781
|
+
const t = Et(i);
|
|
1788
1782
|
return t && t.toString();
|
|
1789
1783
|
},
|
|
1790
|
-
fromView:
|
|
1784
|
+
fromView: Et
|
|
1791
1785
|
};
|
|
1792
|
-
class
|
|
1786
|
+
class W {
|
|
1793
1787
|
/**
|
|
1794
1788
|
* Creates an instance of AttributeDefinition.
|
|
1795
1789
|
* @param Owner - The class constructor that owns this attribute.
|
|
@@ -1799,8 +1793,8 @@ class q {
|
|
|
1799
1793
|
* @param converter - A {@link ValueConverter} that integrates with the property getter/setter
|
|
1800
1794
|
* to convert values to and from a DOM string.
|
|
1801
1795
|
*/
|
|
1802
|
-
constructor(t, e, s = e.toLowerCase(), n =
|
|
1803
|
-
this.guards = /* @__PURE__ */ new Set(), this.Owner = t, this.name = e, this.attribute = s, this.mode = n, this.converter = r, this.fieldName = `_${e}`, this.callbackName = `${e}Changed`, this.hasCallback = this.callbackName in t.prototype, n === Mt && r === void 0 && (this.converter =
|
|
1796
|
+
constructor(t, e, s = e.toLowerCase(), n = Ot, r) {
|
|
1797
|
+
this.guards = /* @__PURE__ */ new Set(), this.Owner = t, this.name = e, this.attribute = s, this.mode = n, this.converter = r, this.fieldName = `_${e}`, this.callbackName = `${e}Changed`, this.hasCallback = this.callbackName in t.prototype, n === Mt && r === void 0 && (this.converter = De);
|
|
1804
1798
|
}
|
|
1805
1799
|
/**
|
|
1806
1800
|
* Sets the value of the attribute/property on the source element.
|
|
@@ -1816,7 +1810,7 @@ class q {
|
|
|
1816
1810
|
* @param source - The source element to access.
|
|
1817
1811
|
*/
|
|
1818
1812
|
getValue(t) {
|
|
1819
|
-
return
|
|
1813
|
+
return g.track(t, this.name), t[this.fieldName];
|
|
1820
1814
|
}
|
|
1821
1815
|
/** @internal */
|
|
1822
1816
|
onAttributeChangedCallback(t, e) {
|
|
@@ -1828,7 +1822,7 @@ class q {
|
|
|
1828
1822
|
s.add(t);
|
|
1829
1823
|
const n = t[this.fieldName];
|
|
1830
1824
|
switch (e) {
|
|
1831
|
-
case
|
|
1825
|
+
case Ot:
|
|
1832
1826
|
const r = this.converter;
|
|
1833
1827
|
T.setAttribute(t, this.attribute, r !== void 0 ? r.toView(n) : n);
|
|
1834
1828
|
break;
|
|
@@ -1847,22 +1841,22 @@ class q {
|
|
|
1847
1841
|
*/
|
|
1848
1842
|
static collect(t, ...e) {
|
|
1849
1843
|
const s = [];
|
|
1850
|
-
e.push(
|
|
1844
|
+
e.push(ae.locate(t));
|
|
1851
1845
|
for (let n = 0, r = e.length; n < r; ++n) {
|
|
1852
|
-
const
|
|
1853
|
-
if (
|
|
1854
|
-
for (let c = 0, d =
|
|
1855
|
-
const l =
|
|
1856
|
-
B(l) ? s.push(new
|
|
1846
|
+
const o = e[n];
|
|
1847
|
+
if (o !== void 0)
|
|
1848
|
+
for (let c = 0, d = o.length; c < d; ++c) {
|
|
1849
|
+
const l = o[c];
|
|
1850
|
+
B(l) ? s.push(new W(t, l)) : s.push(new W(t, l.property, l.attribute, l.mode, l.converter));
|
|
1857
1851
|
}
|
|
1858
1852
|
}
|
|
1859
1853
|
return s;
|
|
1860
1854
|
}
|
|
1861
1855
|
}
|
|
1862
|
-
function
|
|
1856
|
+
function He(i, t) {
|
|
1863
1857
|
let e;
|
|
1864
1858
|
function s(n, r) {
|
|
1865
|
-
arguments.length > 1 && (e.property = r),
|
|
1859
|
+
arguments.length > 1 && (e.property = r), ae.locate(n.constructor).push(e);
|
|
1866
1860
|
}
|
|
1867
1861
|
if (arguments.length > 1) {
|
|
1868
1862
|
e = {}, s(i, t);
|
|
@@ -1872,47 +1866,47 @@ function De(i, t) {
|
|
|
1872
1866
|
}
|
|
1873
1867
|
var Pe = function(i, t, e, s) {
|
|
1874
1868
|
function n(r) {
|
|
1875
|
-
return r instanceof e ? r : new e(function(
|
|
1876
|
-
|
|
1869
|
+
return r instanceof e ? r : new e(function(o) {
|
|
1870
|
+
o(r);
|
|
1877
1871
|
});
|
|
1878
1872
|
}
|
|
1879
|
-
return new (e || (e = Promise))(function(r,
|
|
1880
|
-
function c(
|
|
1873
|
+
return new (e || (e = Promise))(function(r, o) {
|
|
1874
|
+
function c(a) {
|
|
1881
1875
|
try {
|
|
1882
|
-
l(s.next(
|
|
1876
|
+
l(s.next(a));
|
|
1883
1877
|
} catch (h) {
|
|
1884
|
-
|
|
1878
|
+
o(h);
|
|
1885
1879
|
}
|
|
1886
1880
|
}
|
|
1887
|
-
function d(
|
|
1881
|
+
function d(a) {
|
|
1888
1882
|
try {
|
|
1889
|
-
l(s.throw(
|
|
1883
|
+
l(s.throw(a));
|
|
1890
1884
|
} catch (h) {
|
|
1891
|
-
|
|
1885
|
+
o(h);
|
|
1892
1886
|
}
|
|
1893
1887
|
}
|
|
1894
|
-
function l(
|
|
1895
|
-
|
|
1888
|
+
function l(a) {
|
|
1889
|
+
a.done ? r(a.value) : n(a.value).then(c, d);
|
|
1896
1890
|
}
|
|
1897
1891
|
l((s = s.apply(i, t || [])).next());
|
|
1898
1892
|
});
|
|
1899
1893
|
};
|
|
1900
|
-
const
|
|
1894
|
+
const Rt = { mode: "open" }, It = {}, it = /* @__PURE__ */ new Set(), I = v.getById(N.elementRegistry, () => Pt()), ze = {
|
|
1901
1895
|
deferAndHydrate: "defer-and-hydrate"
|
|
1902
1896
|
};
|
|
1903
|
-
class
|
|
1897
|
+
class p {
|
|
1904
1898
|
constructor(t, e = t.definition) {
|
|
1905
1899
|
var s;
|
|
1906
1900
|
this.platformDefined = !1, B(e) && (e = { name: e }), this.type = t, this.name = e.name, this.template = e.template, this.templateOptions = e.templateOptions, this.registry = (s = e.registry) !== null && s !== void 0 ? s : customElements;
|
|
1907
|
-
const n = t.prototype, r =
|
|
1908
|
-
for (let l = 0,
|
|
1901
|
+
const n = t.prototype, r = W.collect(t, e.attributes), o = new Array(r.length), c = {}, d = {};
|
|
1902
|
+
for (let l = 0, a = r.length; l < a; ++l) {
|
|
1909
1903
|
const h = r[l];
|
|
1910
|
-
|
|
1904
|
+
o[l] = h.attribute, c[h.name] = h, d[h.attribute] = h, g.defineProperty(n, h);
|
|
1911
1905
|
}
|
|
1912
1906
|
Reflect.defineProperty(t, "observedAttributes", {
|
|
1913
|
-
value:
|
|
1907
|
+
value: o,
|
|
1914
1908
|
enumerable: !0
|
|
1915
|
-
}), this.attributes = r, this.propertyLookup = c, this.attributeLookup = d, this.shadowOptions = e.shadowOptions === void 0 ?
|
|
1909
|
+
}), this.attributes = r, this.propertyLookup = c, this.attributeLookup = d, this.shadowOptions = e.shadowOptions === void 0 ? Rt : e.shadowOptions === null ? void 0 : Object.assign(Object.assign({}, Rt), e.shadowOptions), this.elementOptions = e.elementOptions === void 0 ? It : Object.assign(Object.assign({}, It), e.elementOptions), this.styles = m.normalize(e.styles), I.register(this), g.defineProperty(p.isRegistered, this.name), p.isRegistered[this.name] = this.type;
|
|
1916
1910
|
}
|
|
1917
1911
|
/**
|
|
1918
1912
|
* Indicates if this element has been defined in at least one registry.
|
|
@@ -1938,8 +1932,8 @@ class f {
|
|
|
1938
1932
|
* that describes the element to define.
|
|
1939
1933
|
*/
|
|
1940
1934
|
static compose(t, e) {
|
|
1941
|
-
return it.has(t) ||
|
|
1942
|
-
}, e) : new
|
|
1935
|
+
return it.has(t) || I.getByType(t) ? new p(class extends t {
|
|
1936
|
+
}, e) : new p(t, e);
|
|
1943
1937
|
}
|
|
1944
1938
|
/**
|
|
1945
1939
|
* Registers a FASTElement base type.
|
|
@@ -1960,27 +1954,27 @@ class f {
|
|
|
1960
1954
|
*/
|
|
1961
1955
|
static composeAsync(t, e) {
|
|
1962
1956
|
return new Promise((s) => {
|
|
1963
|
-
(it.has(t) ||
|
|
1957
|
+
(it.has(t) || I.getByType(t)) && s(new p(class extends t {
|
|
1964
1958
|
}, e));
|
|
1965
|
-
const n = new
|
|
1966
|
-
|
|
1959
|
+
const n = new p(t, e);
|
|
1960
|
+
g.getNotifier(n).subscribe({
|
|
1967
1961
|
handleChange: () => {
|
|
1968
|
-
var r,
|
|
1969
|
-
(
|
|
1962
|
+
var r, o;
|
|
1963
|
+
(o = (r = n.lifecycleCallbacks) === null || r === void 0 ? void 0 : r.templateDidUpdate) === null || o === void 0 || o.call(r, n.name), s(n);
|
|
1970
1964
|
}
|
|
1971
1965
|
}, "template");
|
|
1972
1966
|
});
|
|
1973
1967
|
}
|
|
1974
1968
|
}
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1969
|
+
p.isRegistered = {};
|
|
1970
|
+
p.getByType = I.getByType;
|
|
1971
|
+
p.getForInstance = I.getForInstance;
|
|
1972
|
+
p.registerAsync = (i) => Pe(void 0, void 0, void 0, function* () {
|
|
1979
1973
|
return new Promise((t) => {
|
|
1980
|
-
|
|
1974
|
+
p.isRegistered[i] && t(p.isRegistered[i]), g.getNotifier(p.isRegistered).subscribe({ handleChange: () => t(p.isRegistered[i]) }, i);
|
|
1981
1975
|
});
|
|
1982
1976
|
});
|
|
1983
|
-
|
|
1977
|
+
g.defineProperty(p.prototype, "template");
|
|
1984
1978
|
class Ue extends MutationObserver {
|
|
1985
1979
|
/**
|
|
1986
1980
|
* Creates an instance of UnobservableMutationObserver.
|
|
@@ -1999,7 +1993,7 @@ class Ue extends MutationObserver {
|
|
|
1999
1993
|
this.observedNodes.delete(t), this.observedNodes.size < 1 && this.disconnect();
|
|
2000
1994
|
}
|
|
2001
1995
|
}
|
|
2002
|
-
const
|
|
1996
|
+
const pi = Object.freeze({
|
|
2003
1997
|
/**
|
|
2004
1998
|
* Creates a ViewBehaviorOrchestrator.
|
|
2005
1999
|
* @param source - The source to to associate behaviors with.
|
|
@@ -2010,18 +2004,18 @@ const gi = Object.freeze({
|
|
|
2010
2004
|
let s = null, n = !1;
|
|
2011
2005
|
return {
|
|
2012
2006
|
source: i,
|
|
2013
|
-
context:
|
|
2007
|
+
context: O.default,
|
|
2014
2008
|
targets: e,
|
|
2015
2009
|
get isBound() {
|
|
2016
2010
|
return n;
|
|
2017
2011
|
},
|
|
2018
|
-
addBehaviorFactory(r,
|
|
2019
|
-
var c, d, l,
|
|
2012
|
+
addBehaviorFactory(r, o) {
|
|
2013
|
+
var c, d, l, a;
|
|
2020
2014
|
const h = r;
|
|
2021
|
-
h.id = (c = h.id) !== null && c !== void 0 ? c : L(), h.targetNodeId = (d = h.targetNodeId) !== null && d !== void 0 ? d : L(), h.targetTagName = (l =
|
|
2015
|
+
h.id = (c = h.id) !== null && c !== void 0 ? c : L(), h.targetNodeId = (d = h.targetNodeId) !== null && d !== void 0 ? d : L(), h.targetTagName = (l = o.tagName) !== null && l !== void 0 ? l : null, h.policy = (a = h.policy) !== null && a !== void 0 ? a : T.policy, this.addTarget(h.targetNodeId, o), this.addBehavior(h.createBehavior());
|
|
2022
2016
|
},
|
|
2023
|
-
addTarget(r,
|
|
2024
|
-
e[r] =
|
|
2017
|
+
addTarget(r, o) {
|
|
2018
|
+
e[r] = o;
|
|
2025
2019
|
},
|
|
2026
2020
|
addBehavior(r) {
|
|
2027
2021
|
t.push(r), n && r.bind(this);
|
|
@@ -2030,24 +2024,24 @@ const gi = Object.freeze({
|
|
|
2030
2024
|
s === null && (s = []), s.push(r);
|
|
2031
2025
|
},
|
|
2032
2026
|
connectedCallback(r) {
|
|
2033
|
-
n || (n = !0, t.forEach((
|
|
2027
|
+
n || (n = !0, t.forEach((o) => o.bind(this)));
|
|
2034
2028
|
},
|
|
2035
2029
|
disconnectedCallback(r) {
|
|
2036
|
-
n && (n = !1, s !== null && s.forEach((
|
|
2030
|
+
n && (n = !1, s !== null && s.forEach((o) => o.unbind(this)));
|
|
2037
2031
|
}
|
|
2038
2032
|
};
|
|
2039
2033
|
}
|
|
2040
|
-
}),
|
|
2034
|
+
}), qe = {
|
|
2041
2035
|
bubbles: !0,
|
|
2042
2036
|
composed: !0,
|
|
2043
2037
|
cancelable: !0
|
|
2044
|
-
}, P = "isConnected",
|
|
2045
|
-
function
|
|
2038
|
+
}, P = "isConnected", oe = /* @__PURE__ */ new WeakMap();
|
|
2039
|
+
function _(i) {
|
|
2046
2040
|
var t, e;
|
|
2047
|
-
return (e = (t = i.shadowRoot) !== null && t !== void 0 ? t :
|
|
2041
|
+
return (e = (t = i.shadowRoot) !== null && t !== void 0 ? t : oe.get(i)) !== null && e !== void 0 ? e : null;
|
|
2048
2042
|
}
|
|
2049
|
-
let
|
|
2050
|
-
class
|
|
2043
|
+
let _t;
|
|
2044
|
+
class S extends qt {
|
|
2051
2045
|
/**
|
|
2052
2046
|
* Creates a Controller to control the specified element.
|
|
2053
2047
|
* @param element - The element to be controlled by this controller.
|
|
@@ -2057,10 +2051,10 @@ class C extends Wt {
|
|
|
2057
2051
|
*/
|
|
2058
2052
|
constructor(t, e) {
|
|
2059
2053
|
super(t), this.boundObservables = null, this.needsInitialization = !0, this.hasExistingShadowRoot = !1, this._template = null, this.stage = 3, this.guardBehaviorConnection = !1, this.behaviors = null, this.behaviorsConnected = !1, this._mainStyles = null, this.$fastController = this, this.view = null, this.source = t, this.definition = e, this.shadowOptions = e.shadowOptions;
|
|
2060
|
-
const s =
|
|
2054
|
+
const s = g.getAccessors(t);
|
|
2061
2055
|
if (s.length > 0) {
|
|
2062
2056
|
const n = this.boundObservables = /* @__PURE__ */ Object.create(null);
|
|
2063
|
-
for (let r = 0,
|
|
2057
|
+
for (let r = 0, o = s.length; r < o; ++r) {
|
|
2064
2058
|
const c = s[r].name, d = t[c];
|
|
2065
2059
|
d !== void 0 && (delete t[c], n[c] = d);
|
|
2066
2060
|
}
|
|
@@ -2071,14 +2065,14 @@ class C extends Wt {
|
|
|
2071
2065
|
* connected to the document.
|
|
2072
2066
|
*/
|
|
2073
2067
|
get isConnected() {
|
|
2074
|
-
return
|
|
2068
|
+
return g.track(this, P), this.stage === 1;
|
|
2075
2069
|
}
|
|
2076
2070
|
/**
|
|
2077
2071
|
* The context the expression is evaluated against.
|
|
2078
2072
|
*/
|
|
2079
2073
|
get context() {
|
|
2080
2074
|
var t, e;
|
|
2081
|
-
return (e = (t = this.view) === null || t === void 0 ? void 0 : t.context) !== null && e !== void 0 ? e :
|
|
2075
|
+
return (e = (t = this.view) === null || t === void 0 ? void 0 : t.context) !== null && e !== void 0 ? e : O.default;
|
|
2082
2076
|
}
|
|
2083
2077
|
/**
|
|
2084
2078
|
* Indicates whether the controller is bound.
|
|
@@ -2110,6 +2104,9 @@ class C extends Wt {
|
|
|
2110
2104
|
set template(t) {
|
|
2111
2105
|
this._template !== t && (this._template = t, this.needsInitialization || this.renderTemplate(t));
|
|
2112
2106
|
}
|
|
2107
|
+
/**
|
|
2108
|
+
* The shadow root options for the component.
|
|
2109
|
+
*/
|
|
2113
2110
|
get shadowOptions() {
|
|
2114
2111
|
return this._shadowRootOptions;
|
|
2115
2112
|
}
|
|
@@ -2117,7 +2114,7 @@ class C extends Wt {
|
|
|
2117
2114
|
if (this._shadowRootOptions === void 0 && t !== void 0) {
|
|
2118
2115
|
this._shadowRootOptions = t;
|
|
2119
2116
|
let e = this.source.shadowRoot;
|
|
2120
|
-
e ? this.hasExistingShadowRoot = !0 : (e = this.source.attachShadow(t), t.mode === "closed" &&
|
|
2117
|
+
e ? this.hasExistingShadowRoot = !0 : (e = this.source.attachShadow(t), t.mode === "closed" && oe.set(this.source, e));
|
|
2121
2118
|
}
|
|
2122
2119
|
}
|
|
2123
2120
|
/**
|
|
@@ -2174,11 +2171,11 @@ class C extends Wt {
|
|
|
2174
2171
|
return;
|
|
2175
2172
|
const s = this.source;
|
|
2176
2173
|
if (t instanceof HTMLElement)
|
|
2177
|
-
((e =
|
|
2174
|
+
((e = _(s)) !== null && e !== void 0 ? e : this.source).append(t);
|
|
2178
2175
|
else if (!t.isAttachedTo(s)) {
|
|
2179
2176
|
const n = t.behaviors;
|
|
2180
2177
|
if (t.addStylesTo(s), n !== null)
|
|
2181
|
-
for (let r = 0,
|
|
2178
|
+
for (let r = 0, o = n.length; r < o; ++r)
|
|
2182
2179
|
this.addBehavior(n[r]);
|
|
2183
2180
|
}
|
|
2184
2181
|
}
|
|
@@ -2192,11 +2189,11 @@ class C extends Wt {
|
|
|
2192
2189
|
return;
|
|
2193
2190
|
const s = this.source;
|
|
2194
2191
|
if (t instanceof HTMLElement)
|
|
2195
|
-
((e =
|
|
2192
|
+
((e = _(s)) !== null && e !== void 0 ? e : s).removeChild(t);
|
|
2196
2193
|
else if (t.isAttachedTo(s)) {
|
|
2197
2194
|
const n = t.behaviors;
|
|
2198
2195
|
if (t.removeStylesFrom(s), n !== null)
|
|
2199
|
-
for (let r = 0,
|
|
2196
|
+
for (let r = 0, o = n.length; r < o; ++r)
|
|
2200
2197
|
this.removeBehavior(n[r]);
|
|
2201
2198
|
}
|
|
2202
2199
|
}
|
|
@@ -2204,18 +2201,24 @@ class C extends Wt {
|
|
|
2204
2201
|
* Runs connected lifecycle behavior on the associated element.
|
|
2205
2202
|
*/
|
|
2206
2203
|
connect() {
|
|
2207
|
-
this.stage === 3 && (this.stage = 0, this.bindObservables(), this.connectBehaviors(), this.needsInitialization ? (this.renderTemplate(this.template), this.addStyles(this.mainStyles), this.needsInitialization = !1) : this.view !== null && this.view.bind(this.source), this.stage = 1,
|
|
2204
|
+
this.stage === 3 && (this.stage = 0, this.bindObservables(), this.connectBehaviors(), this.needsInitialization ? (this.renderTemplate(this.template), this.addStyles(this.mainStyles), this.needsInitialization = !1) : this.view !== null && this.view.bind(this.source), this.stage = 1, g.notify(this, P));
|
|
2208
2205
|
}
|
|
2206
|
+
/**
|
|
2207
|
+
* Binds any observables that were set before upgrade.
|
|
2208
|
+
*/
|
|
2209
2209
|
bindObservables() {
|
|
2210
2210
|
if (this.boundObservables !== null) {
|
|
2211
2211
|
const t = this.source, e = this.boundObservables, s = Object.keys(e);
|
|
2212
2212
|
for (let n = 0, r = s.length; n < r; ++n) {
|
|
2213
|
-
const
|
|
2214
|
-
t[
|
|
2213
|
+
const o = s[n];
|
|
2214
|
+
t[o] = e[o];
|
|
2215
2215
|
}
|
|
2216
2216
|
this.boundObservables = null;
|
|
2217
2217
|
}
|
|
2218
2218
|
}
|
|
2219
|
+
/**
|
|
2220
|
+
* Connects any existing behaviors on the associated element.
|
|
2221
|
+
*/
|
|
2219
2222
|
connectBehaviors() {
|
|
2220
2223
|
if (this.behaviorsConnected === !1) {
|
|
2221
2224
|
const t = this.behaviors;
|
|
@@ -2228,6 +2231,9 @@ class C extends Wt {
|
|
|
2228
2231
|
this.behaviorsConnected = !0;
|
|
2229
2232
|
}
|
|
2230
2233
|
}
|
|
2234
|
+
/**
|
|
2235
|
+
* Disconnects any behaviors on the associated element.
|
|
2236
|
+
*/
|
|
2231
2237
|
disconnectBehaviors() {
|
|
2232
2238
|
if (this.behaviorsConnected === !0) {
|
|
2233
2239
|
const t = this.behaviors;
|
|
@@ -2241,7 +2247,7 @@ class C extends Wt {
|
|
|
2241
2247
|
* Runs disconnected lifecycle behavior on the associated element.
|
|
2242
2248
|
*/
|
|
2243
2249
|
disconnect() {
|
|
2244
|
-
this.stage === 1 && (this.stage = 2,
|
|
2250
|
+
this.stage === 1 && (this.stage = 2, g.notify(this, P), this.view !== null && this.view.unbind(), this.disconnectBehaviors(), this.stage = 3);
|
|
2245
2251
|
}
|
|
2246
2252
|
/**
|
|
2247
2253
|
* Runs the attribute changed callback for the associated element.
|
|
@@ -2262,11 +2268,18 @@ class C extends Wt {
|
|
|
2262
2268
|
* Only emits events if connected.
|
|
2263
2269
|
*/
|
|
2264
2270
|
emit(t, e, s) {
|
|
2265
|
-
return this.stage === 1 ? this.source.dispatchEvent(new CustomEvent(t, Object.assign(Object.assign({ detail: e },
|
|
2271
|
+
return this.stage === 1 ? this.source.dispatchEvent(new CustomEvent(t, Object.assign(Object.assign({ detail: e }, qe), s))) : !1;
|
|
2266
2272
|
}
|
|
2273
|
+
/**
|
|
2274
|
+
* Renders the provided template to the element.
|
|
2275
|
+
*
|
|
2276
|
+
* @param template - The template to render.
|
|
2277
|
+
* @remarks
|
|
2278
|
+
* If `null` is provided, any existing view will be removed.
|
|
2279
|
+
*/
|
|
2267
2280
|
renderTemplate(t) {
|
|
2268
2281
|
var e;
|
|
2269
|
-
const s = this.source, n = (e =
|
|
2282
|
+
const s = this.source, n = (e = _(s)) !== null && e !== void 0 ? e : s;
|
|
2270
2283
|
if (this.view !== null)
|
|
2271
2284
|
this.view.dispose(), this.view = null;
|
|
2272
2285
|
else if (!this.needsInitialization || this.hasExistingShadowRoot) {
|
|
@@ -2289,21 +2302,21 @@ class C extends Wt {
|
|
|
2289
2302
|
const s = t.$fastController;
|
|
2290
2303
|
if (s !== void 0 && !e)
|
|
2291
2304
|
return s;
|
|
2292
|
-
const n =
|
|
2305
|
+
const n = p.getForInstance(t);
|
|
2293
2306
|
if (n === void 0)
|
|
2294
|
-
throw
|
|
2307
|
+
throw v.error(
|
|
2295
2308
|
1401
|
|
2296
2309
|
/* Message.missingElementDefinition */
|
|
2297
2310
|
);
|
|
2298
|
-
return
|
|
2311
|
+
return g.getNotifier(n).subscribe({
|
|
2299
2312
|
handleChange: () => {
|
|
2300
|
-
|
|
2313
|
+
S.forCustomElement(t, !0), t.$fastController.connect();
|
|
2301
2314
|
}
|
|
2302
|
-
}, "template"),
|
|
2315
|
+
}, "template"), g.getNotifier(n).subscribe({
|
|
2303
2316
|
handleChange: () => {
|
|
2304
|
-
|
|
2317
|
+
S.forCustomElement(t, !0), t.$fastController.connect();
|
|
2305
2318
|
}
|
|
2306
|
-
}, "shadowOptions"), t.$fastController = new
|
|
2319
|
+
}, "shadowOptions"), t.$fastController = new _t(t, n);
|
|
2307
2320
|
}
|
|
2308
2321
|
/**
|
|
2309
2322
|
* Sets the strategy that ElementController.forCustomElement uses to construct
|
|
@@ -2311,14 +2324,14 @@ class C extends Wt {
|
|
|
2311
2324
|
* @param strategy - The strategy to use.
|
|
2312
2325
|
*/
|
|
2313
2326
|
static setStrategy(t) {
|
|
2314
|
-
|
|
2327
|
+
_t = t;
|
|
2315
2328
|
}
|
|
2316
2329
|
}
|
|
2317
|
-
x(
|
|
2318
|
-
|
|
2330
|
+
x(S);
|
|
2331
|
+
S.setStrategy(S);
|
|
2319
2332
|
function Q(i) {
|
|
2320
2333
|
var t;
|
|
2321
|
-
return "adoptedStyleSheets" in i ? i : (t =
|
|
2334
|
+
return "adoptedStyleSheets" in i ? i : (t = _(i)) !== null && t !== void 0 ? t : i.getRootNode();
|
|
2322
2335
|
}
|
|
2323
2336
|
class Z {
|
|
2324
2337
|
constructor(t) {
|
|
@@ -2338,8 +2351,8 @@ class Z {
|
|
|
2338
2351
|
}
|
|
2339
2352
|
}
|
|
2340
2353
|
Z.styleSheetCache = /* @__PURE__ */ new Map();
|
|
2341
|
-
let
|
|
2342
|
-
const Qe = () => `fast-${++
|
|
2354
|
+
let We = 0;
|
|
2355
|
+
const Qe = () => `fast-${++We}`;
|
|
2343
2356
|
function Lt(i) {
|
|
2344
2357
|
return i === document ? document.body : i;
|
|
2345
2358
|
}
|
|
@@ -2382,92 +2395,111 @@ if (m.supportsAdoptedStyleSheets) {
|
|
|
2382
2395
|
m.setDefaultStrategy(Z);
|
|
2383
2396
|
} else
|
|
2384
2397
|
m.setDefaultStrategy(Ge);
|
|
2385
|
-
const
|
|
2386
|
-
class
|
|
2398
|
+
const j = "defer-hydration", st = "needs-hydration";
|
|
2399
|
+
class f extends S {
|
|
2400
|
+
/**
|
|
2401
|
+
* {@inheritdoc ElementController.shadowOptions}
|
|
2402
|
+
*/
|
|
2403
|
+
get shadowOptions() {
|
|
2404
|
+
return super.shadowOptions;
|
|
2405
|
+
}
|
|
2406
|
+
set shadowOptions(t) {
|
|
2407
|
+
super.shadowOptions = t, (this.hasExistingShadowRoot || t !== void 0 && !this.template) && this.definition.templateOptions === ze.deferAndHydrate && (this.source.toggleAttribute(j, !0), this.source.toggleAttribute(st, !0));
|
|
2408
|
+
}
|
|
2409
|
+
/**
|
|
2410
|
+
* Adds the current element instance to the hydrating instances map
|
|
2411
|
+
*/
|
|
2412
|
+
addHydratingInstance() {
|
|
2413
|
+
if (!f.hydratingInstances)
|
|
2414
|
+
return;
|
|
2415
|
+
const t = this.definition.name;
|
|
2416
|
+
let e = f.hydratingInstances.get(t);
|
|
2417
|
+
e || (e = /* @__PURE__ */ new Set(), f.hydratingInstances.set(t, e)), e.add(this.source);
|
|
2418
|
+
}
|
|
2387
2419
|
/**
|
|
2388
2420
|
* Configure lifecycle callbacks for hydration events
|
|
2389
2421
|
*/
|
|
2390
2422
|
static config(t) {
|
|
2391
|
-
return
|
|
2423
|
+
return f.lifecycleCallbacks = t, this;
|
|
2392
2424
|
}
|
|
2393
2425
|
static hydrationObserverHandler(t) {
|
|
2394
2426
|
for (const e of t)
|
|
2395
|
-
|
|
2427
|
+
e.target.hasAttribute(j) || (f.hydrationObserver.unobserve(e.target), e.target.$fastController.connect());
|
|
2396
2428
|
}
|
|
2397
2429
|
/**
|
|
2398
|
-
* Checks
|
|
2430
|
+
* Checks to see if hydration is complete and if so, invokes the hydrationComplete callback.
|
|
2431
|
+
* Then resets the ElementController strategy to the default so that future elements
|
|
2432
|
+
* don't use the HydratableElementController.
|
|
2433
|
+
*
|
|
2434
|
+
* @param deadline - the idle deadline object
|
|
2399
2435
|
*/
|
|
2400
|
-
static checkHydrationComplete() {
|
|
2401
|
-
var
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2436
|
+
static checkHydrationComplete(t) {
|
|
2437
|
+
var e, s, n;
|
|
2438
|
+
if (t.didTimeout) {
|
|
2439
|
+
f.idleCallbackId = requestIdleCallback(f.checkHydrationComplete, { timeout: 50 });
|
|
2440
|
+
return;
|
|
2441
|
+
}
|
|
2442
|
+
((e = f.hydratingInstances) === null || e === void 0 ? void 0 : e.size) === 0 && ((n = (s = f.lifecycleCallbacks) === null || s === void 0 ? void 0 : s.hydrationComplete) === null || n === void 0 || n.call(s), S.setStrategy(S));
|
|
2407
2443
|
}
|
|
2444
|
+
/**
|
|
2445
|
+
* Runs connected lifecycle behavior on the associated element.
|
|
2446
|
+
*/
|
|
2408
2447
|
connect() {
|
|
2409
|
-
var t, e, s, n, r
|
|
2410
|
-
if (this.needsHydration
|
|
2411
|
-
|
|
2412
|
-
attributeFilter: [
|
|
2448
|
+
var t, e, s, n, r;
|
|
2449
|
+
if (this.needsHydration = (t = this.needsHydration) !== null && t !== void 0 ? t : this.source.hasAttribute(st), this.needsHydration && ((s = (e = f.lifecycleCallbacks) === null || e === void 0 ? void 0 : e.elementWillHydrate) === null || s === void 0 || s.call(e, this.definition.name)), this.source.hasAttribute(j)) {
|
|
2450
|
+
this.addHydratingInstance(), f.hydrationObserver.observe(this.source, {
|
|
2451
|
+
attributeFilter: [j]
|
|
2413
2452
|
});
|
|
2414
2453
|
return;
|
|
2415
2454
|
}
|
|
2416
2455
|
if (!this.needsHydration) {
|
|
2417
|
-
super.connect();
|
|
2456
|
+
super.connect(), this.removeHydratingInstance();
|
|
2418
2457
|
return;
|
|
2419
2458
|
}
|
|
2420
|
-
if (this.stage
|
|
2459
|
+
if (this.stage === 3) {
|
|
2460
|
+
if (this.stage = 0, this.bindObservables(), this.connectBehaviors(), this.template)
|
|
2461
|
+
if (U(this.template)) {
|
|
2462
|
+
const o = this.source, c = (n = _(o)) !== null && n !== void 0 ? n : o;
|
|
2463
|
+
let d = c.firstChild, l = c.lastChild;
|
|
2464
|
+
o.shadowRoot === null && (w.isElementBoundaryStartMarker(d) && (d.data = "", d = d.nextSibling), w.isElementBoundaryEndMarker(l) && (l.data = "", l = l.previousSibling)), this.view = this.template.hydrate(d, l, o), (r = this.view) === null || r === void 0 || r.bind(this.source);
|
|
2465
|
+
} else
|
|
2466
|
+
this.renderTemplate(this.template);
|
|
2467
|
+
this.addStyles(this.mainStyles), this.stage = 1, this.source.removeAttribute(st), this.needsInitialization = this.needsHydration = !1, this.removeHydratingInstance(), g.notify(this, P);
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2470
|
+
/**
|
|
2471
|
+
* Removes the current element instance from the hydrating instances map
|
|
2472
|
+
*/
|
|
2473
|
+
removeHydratingInstance() {
|
|
2474
|
+
var t, e;
|
|
2475
|
+
if (!f.hydratingInstances)
|
|
2421
2476
|
return;
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
if (this.template)
|
|
2425
|
-
if (U(this.template)) {
|
|
2426
|
-
let l = d.firstChild, o = d.lastChild;
|
|
2427
|
-
c.shadowRoot === null && (w.isElementBoundaryStartMarker(l) && (l.data = "", l = l.nextSibling), w.isElementBoundaryEndMarker(o) && (o.data = "", o = o.previousSibling)), this.view = this.template.hydrate(l, o, c), (n = this.view) === null || n === void 0 || n.bind(this.source);
|
|
2428
|
-
} else
|
|
2429
|
-
this.renderTemplate(this.template);
|
|
2430
|
-
this.addStyles(this.mainStyles), this.stage = 1, this.source.removeAttribute(F), this.needsInitialization = this.needsHydration = !1, b.notify(this, P), (a = (r = v.lifecycleCallbacks) === null || r === void 0 ? void 0 : r.elementDidHydrate) === null || a === void 0 || a.call(r, this.definition.name), v.checkHydrationComplete();
|
|
2477
|
+
const s = this.definition.name, n = f.hydratingInstances.get(s);
|
|
2478
|
+
(e = (t = f.lifecycleCallbacks) === null || t === void 0 ? void 0 : t.elementDidHydrate) === null || e === void 0 || e.call(t, this.definition.name), n && (n.delete(this.source), n.size || f.hydratingInstances.delete(s), f.idleCallbackId && cancelIdleCallback(f.idleCallbackId), f.idleCallbackId = requestIdleCallback(f.checkHydrationComplete, { timeout: 50 }));
|
|
2431
2479
|
}
|
|
2480
|
+
/**
|
|
2481
|
+
* Unregisters the hydration observer when the element is disconnected.
|
|
2482
|
+
*/
|
|
2432
2483
|
disconnect() {
|
|
2433
|
-
super.disconnect(),
|
|
2484
|
+
super.disconnect(), f.hydrationObserver.unobserve(this.source);
|
|
2434
2485
|
}
|
|
2486
|
+
/**
|
|
2487
|
+
* Sets the ElementController strategy to HydratableElementController.
|
|
2488
|
+
* @remarks
|
|
2489
|
+
* This method is typically called during application startup to enable
|
|
2490
|
+
* hydration support for FAST elements.
|
|
2491
|
+
*/
|
|
2435
2492
|
static install() {
|
|
2436
|
-
|
|
2493
|
+
S.setStrategy(f);
|
|
2437
2494
|
}
|
|
2438
2495
|
}
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
return r instanceof e ? r : new e(function(a) {
|
|
2443
|
-
a(r);
|
|
2444
|
-
});
|
|
2445
|
-
}
|
|
2446
|
-
return new (e || (e = Promise))(function(r, a) {
|
|
2447
|
-
function c(o) {
|
|
2448
|
-
try {
|
|
2449
|
-
l(s.next(o));
|
|
2450
|
-
} catch (h) {
|
|
2451
|
-
a(h);
|
|
2452
|
-
}
|
|
2453
|
-
}
|
|
2454
|
-
function d(o) {
|
|
2455
|
-
try {
|
|
2456
|
-
l(s.throw(o));
|
|
2457
|
-
} catch (h) {
|
|
2458
|
-
a(h);
|
|
2459
|
-
}
|
|
2460
|
-
}
|
|
2461
|
-
function l(o) {
|
|
2462
|
-
o.done ? r(o.value) : n(o.value).then(c, d);
|
|
2463
|
-
}
|
|
2464
|
-
l((s = s.apply(i, t || [])).next());
|
|
2465
|
-
});
|
|
2466
|
-
};
|
|
2496
|
+
f.hydrationObserver = new Ue(f.hydrationObserverHandler);
|
|
2497
|
+
f.idleCallbackId = null;
|
|
2498
|
+
f.hydratingInstances = /* @__PURE__ */ new Map();
|
|
2467
2499
|
function de(i) {
|
|
2468
2500
|
const t = class extends i {
|
|
2469
2501
|
constructor() {
|
|
2470
|
-
super(),
|
|
2502
|
+
super(), S.forCustomElement(this);
|
|
2471
2503
|
}
|
|
2472
2504
|
$emit(e, s, n) {
|
|
2473
2505
|
return this.$fastController.emit(e, s, n);
|
|
@@ -2482,81 +2514,87 @@ function de(i) {
|
|
|
2482
2514
|
this.$fastController.onAttributeChangedCallback(e, s, n);
|
|
2483
2515
|
}
|
|
2484
2516
|
};
|
|
2485
|
-
return
|
|
2517
|
+
return p.registerBaseType(t), t;
|
|
2518
|
+
}
|
|
2519
|
+
function Je(i, t) {
|
|
2520
|
+
return E(i) ? p.compose(i, t) : p.compose(this, i);
|
|
2486
2521
|
}
|
|
2487
2522
|
function Ke(i, t) {
|
|
2488
|
-
return
|
|
2523
|
+
return E(i) ? new Promise((e) => {
|
|
2524
|
+
p.composeAsync(i, t).then((s) => {
|
|
2525
|
+
e(s);
|
|
2526
|
+
});
|
|
2527
|
+
}).then((e) => e.define().type) : new Promise((e) => {
|
|
2528
|
+
p.composeAsync(this, i).then((s) => {
|
|
2529
|
+
e(s);
|
|
2530
|
+
});
|
|
2531
|
+
}).then((e) => e.define().type);
|
|
2489
2532
|
}
|
|
2490
2533
|
function Xe(i, t) {
|
|
2491
|
-
return
|
|
2492
|
-
return O(i) ? (yield f.composeAsync(i, t)).define().type : (yield f.composeAsync(this, i)).define().type;
|
|
2493
|
-
});
|
|
2494
|
-
}
|
|
2495
|
-
function Ye(i, t) {
|
|
2496
|
-
return O(i) ? f.compose(i, t).define().type : f.compose(this, i).define().type;
|
|
2534
|
+
return E(i) ? p.compose(i, t).define().type : p.compose(this, i).define().type;
|
|
2497
2535
|
}
|
|
2498
|
-
function
|
|
2536
|
+
function Ye(i) {
|
|
2499
2537
|
return de(i);
|
|
2500
2538
|
}
|
|
2501
|
-
const
|
|
2539
|
+
const Ze = Object.assign(de(HTMLElement), {
|
|
2502
2540
|
/**
|
|
2503
2541
|
* Creates a new FASTElement base class inherited from the
|
|
2504
2542
|
* provided base type.
|
|
2505
2543
|
* @param BaseType - The base element type to inherit from.
|
|
2506
2544
|
*/
|
|
2507
|
-
from:
|
|
2545
|
+
from: Ye,
|
|
2508
2546
|
/**
|
|
2509
2547
|
* Defines a platform custom element based on the provided type and definition.
|
|
2510
2548
|
* @param type - The custom element type to define.
|
|
2511
2549
|
* @param nameOrDef - The name of the element to define or a definition object
|
|
2512
2550
|
* that describes the element to define.
|
|
2513
2551
|
*/
|
|
2514
|
-
define:
|
|
2552
|
+
define: Xe,
|
|
2515
2553
|
/**
|
|
2516
2554
|
* Defines metadata for a FASTElement which can be used to later define the element.
|
|
2517
2555
|
* @public
|
|
2518
2556
|
*/
|
|
2519
|
-
compose:
|
|
2557
|
+
compose: Je,
|
|
2520
2558
|
/**
|
|
2521
2559
|
* Defines metadata for a FASTElement which can be used after it has been resolved to define the element.
|
|
2522
2560
|
* @alpha
|
|
2523
2561
|
*/
|
|
2524
|
-
defineAsync:
|
|
2562
|
+
defineAsync: Ke
|
|
2525
2563
|
});
|
|
2526
|
-
function
|
|
2564
|
+
function ti(i, t) {
|
|
2527
2565
|
return i instanceof Function ? i(t) : i;
|
|
2528
2566
|
}
|
|
2529
|
-
const Vt = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Map(),
|
|
2567
|
+
const Vt = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Map(), bi = (i) => (t = "vwc") => {
|
|
2530
2568
|
const e = (n) => `${t}-${n}`, s = (n) => {
|
|
2531
2569
|
const r = e(n.name);
|
|
2532
|
-
let
|
|
2533
|
-
if (
|
|
2570
|
+
let o = n.type;
|
|
2571
|
+
if (o.componentName = n.name, Vt.has(r))
|
|
2534
2572
|
return;
|
|
2535
|
-
nt.has(
|
|
2536
|
-
}), Vt.add(r), nt.set(
|
|
2537
|
-
for (const
|
|
2538
|
-
s(
|
|
2573
|
+
nt.has(o) && nt.get(o) !== r && (o = class extends o {
|
|
2574
|
+
}), Vt.add(r), nt.set(o, r);
|
|
2575
|
+
for (const a of n.dependencies)
|
|
2576
|
+
s(a);
|
|
2539
2577
|
const c = new Map([
|
|
2540
2578
|
[n.type, r],
|
|
2541
2579
|
...n.dependencies.map(
|
|
2542
|
-
(
|
|
2580
|
+
(a) => [a.type, e(a.name)]
|
|
2543
2581
|
)
|
|
2544
2582
|
]), l = {
|
|
2545
|
-
tagFor: (
|
|
2546
|
-
if (!c.has(
|
|
2583
|
+
tagFor: (a, h) => {
|
|
2584
|
+
if (!c.has(a))
|
|
2547
2585
|
throw new Error(
|
|
2548
|
-
`Could not get tag for ${
|
|
2586
|
+
`Could not get tag for ${a.name} as it is not a dependency of ${n.name}.`
|
|
2549
2587
|
);
|
|
2550
|
-
const u = c.get(
|
|
2588
|
+
const u = c.get(a);
|
|
2551
2589
|
return h ? u : re.partial(u);
|
|
2552
2590
|
},
|
|
2553
|
-
tagForNonDependency(
|
|
2554
|
-
return e(
|
|
2591
|
+
tagForNonDependency(a) {
|
|
2592
|
+
return e(a);
|
|
2555
2593
|
}
|
|
2556
2594
|
};
|
|
2557
|
-
|
|
2595
|
+
p.compose(o, {
|
|
2558
2596
|
...n.options,
|
|
2559
|
-
template:
|
|
2597
|
+
template: ti(
|
|
2560
2598
|
n.template,
|
|
2561
2599
|
l
|
|
2562
2600
|
),
|
|
@@ -2564,42 +2602,42 @@ const Vt = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Map(), yi = (i) =
|
|
|
2564
2602
|
}).define();
|
|
2565
2603
|
};
|
|
2566
2604
|
s(i);
|
|
2567
|
-
},
|
|
2605
|
+
}, gi = (i, t, e, s, n) => ({
|
|
2568
2606
|
name: i,
|
|
2569
2607
|
type: t,
|
|
2570
2608
|
template: e,
|
|
2571
2609
|
dependencies: s,
|
|
2572
2610
|
options: n
|
|
2573
|
-
}),
|
|
2574
|
-
let t =
|
|
2575
|
-
return t || (t = [],
|
|
2576
|
-
},
|
|
2611
|
+
}), jt = /* @__PURE__ */ new WeakMap(), he = (i) => {
|
|
2612
|
+
let t = jt.get(i);
|
|
2613
|
+
return t || (t = [], jt.set(i, t)), t;
|
|
2614
|
+
}, yi = (i, t) => {
|
|
2577
2615
|
he(i).push(t);
|
|
2578
|
-
},
|
|
2616
|
+
}, ei = (i, t) => {
|
|
2579
2617
|
he(i).forEach((e) => e(i, t));
|
|
2580
|
-
},
|
|
2581
|
-
if (
|
|
2618
|
+
}, ii = (i) => i === "delegate", Ft = (i) => `vvd${i.charAt(0).toUpperCase()}${i.slice(1)}`, ue = (i, t) => {
|
|
2619
|
+
if (ii(i._vividAriaBehaviour)) {
|
|
2582
2620
|
const e = i[t];
|
|
2583
|
-
i[`_${t}`] = null, i.removeAttribute(
|
|
2621
|
+
i[`_${t}`] = null, i.removeAttribute(ot(t)), i[`_${t}`] = e, i[t] !== null ? i.dataset[Ft(t)] = i[t] : delete i.dataset[Ft(t)];
|
|
2584
2622
|
} else
|
|
2585
2623
|
T.setAttribute(
|
|
2586
2624
|
i,
|
|
2587
|
-
|
|
2625
|
+
ot(t),
|
|
2588
2626
|
i[t]
|
|
2589
2627
|
);
|
|
2590
|
-
}, G = /* @__PURE__ */ new WeakMap(),
|
|
2628
|
+
}, G = /* @__PURE__ */ new WeakMap(), si = (i, t) => {
|
|
2591
2629
|
const e = G.get(i);
|
|
2592
2630
|
e ? e.add(t) : G.set(i, /* @__PURE__ */ new Set([t]));
|
|
2593
|
-
},
|
|
2594
|
-
i.isConnected ? ue(i, t) :
|
|
2595
|
-
},
|
|
2631
|
+
}, ni = (i, t) => {
|
|
2632
|
+
i.isConnected ? ue(i, t) : si(i, t);
|
|
2633
|
+
}, ri = (i) => {
|
|
2596
2634
|
const t = G.get(i);
|
|
2597
2635
|
if (t) {
|
|
2598
2636
|
for (const e of t)
|
|
2599
2637
|
ue(i, e);
|
|
2600
2638
|
G.delete(i);
|
|
2601
2639
|
}
|
|
2602
|
-
},
|
|
2640
|
+
}, Dt = [
|
|
2603
2641
|
"role",
|
|
2604
2642
|
"ariaAtomic",
|
|
2605
2643
|
"ariaAutoComplete",
|
|
@@ -2643,57 +2681,57 @@ const Vt = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Map(), yi = (i) =
|
|
|
2643
2681
|
"ariaValueText",
|
|
2644
2682
|
"ariaRelevant"
|
|
2645
2683
|
// Non-standard
|
|
2646
|
-
],
|
|
2684
|
+
], ot = (i) => i.replace("aria", "aria-").toLowerCase(), ai = (i) => {
|
|
2647
2685
|
class t extends i {
|
|
2648
2686
|
constructor(...s) {
|
|
2649
2687
|
super(...s), this._vividAriaBehaviour = "default";
|
|
2650
|
-
for (const n of
|
|
2688
|
+
for (const n of Dt)
|
|
2651
2689
|
this[`_${n}`] = null;
|
|
2652
2690
|
}
|
|
2653
2691
|
connectedCallback() {
|
|
2654
|
-
super.connectedCallback(),
|
|
2692
|
+
super.connectedCallback(), ri(this);
|
|
2655
2693
|
}
|
|
2656
2694
|
}
|
|
2657
|
-
for (const e of
|
|
2658
|
-
|
|
2659
|
-
attribute:
|
|
2695
|
+
for (const e of Dt)
|
|
2696
|
+
He({
|
|
2697
|
+
attribute: ot(e),
|
|
2660
2698
|
mode: "fromView"
|
|
2661
2699
|
})(t.prototype, e), t.prototype[`${e}Changed`] = function() {
|
|
2662
|
-
|
|
2700
|
+
ni(this, e), this._vividAriaBehaviour !== "default" && ei(this, e);
|
|
2663
2701
|
};
|
|
2664
2702
|
return t;
|
|
2665
2703
|
};
|
|
2666
|
-
function
|
|
2704
|
+
function oi() {
|
|
2667
2705
|
const i = /* @__PURE__ */ new WeakMap();
|
|
2668
2706
|
return (t) => (i.has(t) || i.set(t, []), i.get(t));
|
|
2669
2707
|
}
|
|
2670
|
-
const fe =
|
|
2708
|
+
const fe = oi(), vi = (i) => (t, e) => {
|
|
2671
2709
|
fe(t.constructor).push({
|
|
2672
2710
|
newPropertyName: e,
|
|
2673
2711
|
...i
|
|
2674
2712
|
});
|
|
2675
|
-
},
|
|
2713
|
+
}, li = (i) => {
|
|
2676
2714
|
class t extends i {
|
|
2677
2715
|
#t(s) {
|
|
2678
2716
|
let n = !1, r = !1;
|
|
2679
|
-
const
|
|
2680
|
-
|
|
2681
|
-
) ===
|
|
2682
|
-
handleChange(
|
|
2717
|
+
const o = (a) => r && s.fromDeprecated(
|
|
2718
|
+
a[s.deprecatedPropertyName]
|
|
2719
|
+
) === a[s.newPropertyName], c = (a) => n && s.toDeprecated && s.toDeprecated(a[s.newPropertyName]) === a[s.deprecatedPropertyName], d = {
|
|
2720
|
+
handleChange(a, h) {
|
|
2683
2721
|
if (h === s.newPropertyName) {
|
|
2684
|
-
if (n = !0, !s.toDeprecated || a
|
|
2722
|
+
if (n = !0, !s.toDeprecated || o(a))
|
|
2685
2723
|
return;
|
|
2686
|
-
|
|
2724
|
+
a[s.deprecatedPropertyName] = s.toDeprecated(a[s.newPropertyName]);
|
|
2687
2725
|
}
|
|
2688
2726
|
if (h === s.deprecatedPropertyName) {
|
|
2689
|
-
if (r = !0, c(
|
|
2727
|
+
if (r = !0, c(a))
|
|
2690
2728
|
return;
|
|
2691
|
-
|
|
2692
|
-
|
|
2729
|
+
a[s.newPropertyName] = s.fromDeprecated(
|
|
2730
|
+
a[s.deprecatedPropertyName]
|
|
2693
2731
|
);
|
|
2694
2732
|
}
|
|
2695
2733
|
}
|
|
2696
|
-
}, l =
|
|
2734
|
+
}, l = g.getNotifier(this);
|
|
2697
2735
|
l.subscribe(d, s.newPropertyName), l.subscribe(d, s.deprecatedPropertyName);
|
|
2698
2736
|
}
|
|
2699
2737
|
constructor(...s) {
|
|
@@ -2704,9 +2742,9 @@ const fe = li(), wi = (i) => (t, e) => {
|
|
|
2704
2742
|
}
|
|
2705
2743
|
return t;
|
|
2706
2744
|
};
|
|
2707
|
-
class
|
|
2745
|
+
class mi extends ai(li(Ze)) {
|
|
2708
2746
|
static {
|
|
2709
|
-
this.VIVID_VERSION = "5.
|
|
2747
|
+
this.VIVID_VERSION = "5.7.0";
|
|
2710
2748
|
}
|
|
2711
2749
|
/**
|
|
2712
2750
|
* Add data-vvd-component attribute with component name globally,
|
|
@@ -2719,40 +2757,39 @@ class Si extends ai(ci(ti)) {
|
|
|
2719
2757
|
}
|
|
2720
2758
|
}
|
|
2721
2759
|
export {
|
|
2722
|
-
hi as A,
|
|
2723
2760
|
lt as B,
|
|
2724
2761
|
T as D,
|
|
2725
|
-
E,
|
|
2726
|
-
|
|
2762
|
+
O as E,
|
|
2763
|
+
$ as H,
|
|
2727
2764
|
Kt as M,
|
|
2728
|
-
|
|
2765
|
+
g as O,
|
|
2729
2766
|
we as S,
|
|
2730
2767
|
Ut as U,
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2768
|
+
mi as V,
|
|
2769
|
+
He as a,
|
|
2770
|
+
pi as b,
|
|
2771
|
+
bi as c,
|
|
2772
|
+
gi as d,
|
|
2773
|
+
di as e,
|
|
2774
|
+
E as f,
|
|
2775
|
+
Wt as g,
|
|
2739
2776
|
re as h,
|
|
2740
2777
|
B as i,
|
|
2741
|
-
|
|
2742
|
-
|
|
2778
|
+
ot as j,
|
|
2779
|
+
Dt as k,
|
|
2743
2780
|
rt as l,
|
|
2744
2781
|
U as m,
|
|
2745
|
-
|
|
2746
|
-
|
|
2782
|
+
fi as n,
|
|
2783
|
+
hi as o,
|
|
2747
2784
|
A as p,
|
|
2748
2785
|
X as q,
|
|
2749
|
-
|
|
2750
|
-
|
|
2786
|
+
vi as r,
|
|
2787
|
+
yi as s,
|
|
2751
2788
|
w as t,
|
|
2752
2789
|
Gt as u,
|
|
2753
|
-
|
|
2790
|
+
ui as v,
|
|
2754
2791
|
m as w,
|
|
2755
2792
|
pe as x,
|
|
2756
|
-
|
|
2793
|
+
ci as y,
|
|
2757
2794
|
tt as z
|
|
2758
2795
|
};
|