@vonage/vivid 5.12.0 → 5.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/definition19.cjs +63 -44
- package/bundled/definition19.js +322 -246
- package/bundled/definition2.cjs +1 -1
- package/bundled/definition2.js +1 -1
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +16 -13
- package/bundled/slottable-request.cjs +4 -4
- package/bundled/slottable-request.js +70 -70
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +1 -1
- package/custom-elements.json +2640 -2580
- package/data-grid/definition.cjs +37 -13
- package/data-grid/definition.js +37 -13
- package/data-grid/index.cjs +38 -32
- package/data-grid/index.js +201 -178
- package/icon/definition.cjs +1 -1
- package/icon/definition.js +1 -1
- package/lib/accordion/accordion.template.d.ts +2 -2
- package/lib/accordion/index.d.ts +1 -0
- package/lib/accordion-item/accordion-item.d.ts +98 -67
- package/lib/accordion-item/accordion-item.template.d.ts +3 -3
- package/lib/accordion-item/index.d.ts +1 -0
- package/lib/action-group/action-group.d.ts +95 -64
- package/lib/action-group/action-group.template.d.ts +2 -2
- package/lib/action-group/index.d.ts +1 -0
- package/lib/alert/alert.d.ts +192 -130
- package/lib/alert/alert.template.d.ts +3 -3
- package/lib/alert/index.d.ts +1 -0
- package/lib/audio-player/audio-player.d.ts +97 -67
- package/lib/audio-player/audio-player.template.d.ts +2 -2
- package/lib/audio-player/index.d.ts +1 -0
- package/lib/avatar/avatar.d.ts +105 -117
- package/lib/avatar/avatar.template.d.ts +1 -1
- package/lib/avatar/index.d.ts +1 -0
- package/lib/badge/badge.d.ts +98 -67
- package/lib/badge/badge.template.d.ts +3 -3
- package/lib/badge/index.d.ts +1 -0
- package/lib/banner/banner.d.ts +286 -193
- package/lib/banner/banner.template.d.ts +3 -3
- package/lib/banner/index.d.ts +1 -0
- package/lib/breadcrumb/breadcrumb.d.ts +93 -62
- package/lib/breadcrumb/breadcrumb.template.d.ts +2 -2
- package/lib/breadcrumb/index.d.ts +1 -0
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +103 -115
- package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +3 -3
- package/lib/breadcrumb-item/index.d.ts +1 -0
- package/lib/button/button.d.ts +297 -247
- package/lib/button/button.template.d.ts +3 -3
- package/lib/button/index.d.ts +1 -0
- package/lib/calendar/calendar.d.ts +2 -2
- package/lib/calendar/calendar.template.d.ts +2 -2
- package/lib/calendar/helpers/calendar.event-context.d.ts +1 -1
- package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +1 -1
- package/lib/calendar/index.d.ts +1 -0
- package/lib/calendar-event/calendar-event.d.ts +95 -64
- package/lib/calendar-event/calendar-event.template.d.ts +2 -2
- package/lib/calendar-event/index.d.ts +1 -0
- package/lib/card/card.d.ts +105 -117
- package/lib/card/card.template.d.ts +2 -2
- package/lib/card/index.d.ts +1 -0
- package/lib/checkbox/checkbox.d.ts +628 -437
- package/lib/checkbox/checkbox.template.d.ts +3 -3
- package/lib/checkbox/index.d.ts +1 -0
- package/lib/color-picker/color-picker.d.ts +726 -506
- package/lib/color-picker/color-picker.template.d.ts +2 -2
- package/lib/color-picker/definition.d.ts +1 -1
- package/lib/color-picker/index.d.ts +1 -0
- package/lib/combobox/combobox.d.ts +741 -520
- package/lib/combobox/combobox.template.d.ts +3 -3
- package/lib/combobox/index.d.ts +1 -0
- package/lib/contextual-help/contextual-help.d.ts +1 -1
- package/lib/contextual-help/contextual-help.template.d.ts +3 -3
- package/lib/contextual-help/index.d.ts +1 -0
- package/lib/country/country-code-to-flag-icon.d.ts +1 -1
- package/lib/country/country.template.d.ts +3 -3
- package/lib/country/index.d.ts +1 -0
- package/lib/data-grid/data-grid-cell.d.ts +190 -128
- package/lib/data-grid/data-grid-cell.template.d.ts +3 -3
- package/lib/data-grid/data-grid-row.d.ts +95 -64
- package/lib/data-grid/data-grid-row.template.d.ts +3 -3
- package/lib/data-grid/data-grid.d.ts +1 -1
- package/lib/data-grid/data-grid.template.d.ts +3 -3
- package/lib/data-grid/index.d.ts +1 -0
- package/lib/data-grid/locale.d.ts +1 -1
- package/lib/date-picker/date-picker.d.ts +1045 -792
- package/lib/date-picker/date-picker.template.d.ts +2 -2
- package/lib/date-picker/index.d.ts +1 -0
- package/lib/date-range-picker/date-range-picker.d.ts +538 -411
- package/lib/date-range-picker/date-range-picker.template.d.ts +2 -2
- package/lib/date-range-picker/index.d.ts +1 -0
- package/lib/date-time-picker/date-time-picker.d.ts +1026 -772
- package/lib/date-time-picker/date-time-picker.template.d.ts +2 -2
- package/lib/date-time-picker/index.d.ts +1 -0
- package/lib/dial-pad/dial-pad.d.ts +95 -64
- package/lib/dial-pad/dial-pad.template.d.ts +2 -2
- package/lib/dial-pad/index.d.ts +1 -0
- package/lib/dialog/dialog.d.ts +189 -127
- package/lib/dialog/dialog.template.d.ts +3 -3
- package/lib/dialog/index.d.ts +1 -0
- package/lib/divider/divider.d.ts +94 -63
- package/lib/divider/divider.template.d.ts +2 -2
- package/lib/divider/index.d.ts +1 -0
- package/lib/elevation/elevation.template.d.ts +2 -2
- package/lib/elevation/index.d.ts +1 -0
- package/lib/empty-state/empty-state.d.ts +2 -2
- package/lib/empty-state/empty-state.template.d.ts +3 -3
- package/lib/empty-state/index.d.ts +1 -0
- package/lib/fab/fab.d.ts +98 -67
- package/lib/fab/fab.template.d.ts +3 -3
- package/lib/fab/index.d.ts +1 -0
- package/lib/file-picker/__mocks__/data-transfer.d.ts +21 -0
- package/lib/file-picker/file-picker.d.ts +736 -515
- package/lib/file-picker/file-picker.template.d.ts +3 -3
- package/lib/file-picker/index.d.ts +1 -0
- package/lib/header/header.d.ts +93 -62
- package/lib/header/header.template.d.ts +3 -3
- package/lib/header/index.d.ts +1 -0
- package/lib/icon/icon.d.ts +2 -2
- package/lib/icon/icon.template.d.ts +3 -3
- package/lib/icon/index.d.ts +1 -0
- package/lib/layout/index.d.ts +1 -0
- package/lib/layout/layout.d.ts +2 -2
- package/lib/layout/layout.template.d.ts +2 -2
- package/lib/menu/index.d.ts +1 -0
- package/lib/menu/menu.d.ts +195 -133
- package/lib/menu/menu.template.d.ts +3 -3
- package/lib/menu-item/index.d.ts +1 -0
- package/lib/menu-item/menu-item.d.ts +191 -129
- package/lib/menu-item/menu-item.template.d.ts +2 -2
- package/lib/nav/index.d.ts +1 -0
- package/lib/nav/nav.d.ts +93 -62
- package/lib/nav/nav.template.d.ts +2 -2
- package/lib/nav-disclosure/index.d.ts +1 -0
- package/lib/nav-disclosure/nav-disclosure.d.ts +191 -129
- package/lib/nav-disclosure/nav-disclosure.template.d.ts +3 -3
- package/lib/nav-item/index.d.ts +1 -0
- package/lib/nav-item/nav-item.d.ts +200 -181
- package/lib/nav-item/nav-item.template.d.ts +3 -3
- package/lib/note/index.d.ts +1 -0
- package/lib/note/note.d.ts +97 -66
- package/lib/note/note.template.d.ts +3 -3
- package/lib/number-field/index.d.ts +1 -0
- package/lib/number-field/number-field.d.ts +929 -646
- package/lib/number-field/number-field.template.d.ts +3 -3
- package/lib/option/index.d.ts +1 -0
- package/lib/option/option.d.ts +191 -129
- package/lib/option/option.template.d.ts +3 -3
- package/lib/pagination/index.d.ts +1 -0
- package/lib/pagination/pagination.d.ts +98 -67
- package/lib/pagination/pagination.template.d.ts +3 -3
- package/lib/popover/definition.d.ts +1 -1
- package/lib/popover/index.d.ts +1 -0
- package/lib/popover/popover.d.ts +190 -128
- package/lib/popover/popover.template.d.ts +2 -2
- package/lib/popup/index.d.ts +1 -0
- package/lib/popup/popup.d.ts +1 -1
- package/lib/popup/popup.template.d.ts +3 -3
- package/lib/progress/index.d.ts +1 -0
- package/lib/progress/progress.d.ts +94 -63
- package/lib/progress/progress.template.d.ts +2 -2
- package/lib/progress-ring/index.d.ts +1 -0
- package/lib/progress-ring/progress-ring.d.ts +94 -63
- package/lib/progress-ring/progress-ring.template.d.ts +2 -2
- package/lib/radio/index.d.ts +1 -0
- package/lib/radio/radio.d.ts +340 -242
- package/lib/radio/radio.template.d.ts +2 -2
- package/lib/radio-group/index.d.ts +1 -0
- package/lib/radio-group/radio-group.d.ts +99 -68
- package/lib/radio-group/radio-group.template.d.ts +3 -3
- package/lib/range-slider/index.d.ts +1 -0
- package/lib/range-slider/range-slider.d.ts +313 -218
- package/lib/range-slider/range-slider.template.d.ts +3 -3
- package/lib/rich-text-editor/definition.d.ts +1 -1
- package/lib/rich-text-editor/index.d.ts +1 -0
- package/lib/rich-text-editor/popover.d.ts +1 -1
- package/lib/rich-text-editor/rich-text-editor.d.ts +99 -68
- package/lib/rich-text-editor/rich-text-editor.template.d.ts +2 -2
- package/lib/rich-text-editor/rte/__tests__/async-generator.d.ts +5 -0
- package/lib/rich-text-editor/rte/__tests__/doc-factories.d.ts +106 -0
- package/lib/rich-text-editor/rte/__tests__/font-sizes.d.ts +2 -0
- package/lib/rich-text-editor/rte/__tests__/promise.d.ts +5 -0
- package/lib/rich-text-editor/rte/__tests__/test-utils.d.ts +68 -0
- package/lib/rich-text-editor/rte/config.d.ts +4 -4
- package/lib/rich-text-editor/rte/feature.d.ts +10 -12
- package/lib/rich-text-editor/rte/features/alignment.d.ts +19 -0
- package/lib/rich-text-editor/rte/features/atom.d.ts +9 -0
- package/lib/rich-text-editor/rte/features/base.d.ts +33 -0
- package/lib/rich-text-editor/rte/features/bold.d.ts +17 -0
- package/lib/rich-text-editor/rte/features/drop-handler.d.ts +21 -0
- package/lib/rich-text-editor/rte/features/file-handler.d.ts +25 -0
- package/lib/rich-text-editor/rte/features/font-size-picker.d.ts +46 -0
- package/lib/rich-text-editor/rte/features/hard-break.d.ts +10 -0
- package/lib/rich-text-editor/rte/features/inline-image.d.ts +43 -0
- package/lib/rich-text-editor/rte/features/input-rule.d.ts +10 -0
- package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +6 -6
- package/lib/rich-text-editor/rte/features/internal/core.d.ts +37 -0
- package/lib/rich-text-editor/rte/features/internal/cursor-fix.d.ts +16 -0
- package/lib/rich-text-editor/rte/features/internal/foreign-html.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/history.d.ts +2 -2
- package/lib/rich-text-editor/rte/features/internal/input-rules.d.ts +4 -4
- package/lib/rich-text-editor/rte/features/italic.d.ts +17 -0
- package/lib/rich-text-editor/rte/features/link.d.ts +33 -0
- package/lib/rich-text-editor/rte/features/list.d.ts +24 -0
- package/lib/rich-text-editor/rte/features/monospace.d.ts +22 -0
- package/lib/rich-text-editor/rte/features/placeholder.d.ts +23 -0
- package/lib/rich-text-editor/rte/features/strikethrough.d.ts +17 -0
- package/lib/rich-text-editor/rte/features/suggest.d.ts +14 -0
- package/lib/rich-text-editor/rte/features/text-block-picker.d.ts +18 -0
- package/lib/rich-text-editor/rte/features/text-color-picker.d.ts +31 -0
- package/lib/rich-text-editor/rte/features/toolbar-button.d.ts +13 -0
- package/lib/rich-text-editor/rte/features/toolbar.d.ts +37 -0
- package/lib/rich-text-editor/rte/features/underline.d.ts +17 -0
- package/lib/rich-text-editor/rte/html-parser.d.ts +3 -3
- package/lib/rich-text-editor/rte/html-serializer.d.ts +3 -3
- package/lib/rich-text-editor/rte/instance.d.ts +8 -7
- package/lib/rich-text-editor/rte/public-interface.d.ts +13 -0
- package/lib/rich-text-editor/rte/utils/default-textblock.d.ts +2 -2
- package/lib/rich-text-editor/rte/utils/feature-state.d.ts +1 -1
- package/lib/rich-text-editor/rte/utils/text-before-cursor.d.ts +1 -1
- package/lib/rich-text-editor/rte/utils/ui.d.ts +8 -8
- package/lib/rich-text-editor/rte/view.d.ts +3 -6
- package/lib/rich-text-view/definition.d.ts +1 -1
- package/lib/rich-text-view/index.d.ts +2 -0
- package/lib/rich-text-view/rich-text-view.d.ts +1 -1
- package/lib/rich-text-view/rich-text-view.template.d.ts +2 -2
- package/lib/searchable-select/index.d.ts +1 -0
- package/lib/searchable-select/option-tag.d.ts +96 -65
- package/lib/searchable-select/option-tag.template.d.ts +3 -3
- package/lib/searchable-select/searchable-select.d.ts +929 -646
- package/lib/searchable-select/searchable-select.template.d.ts +3 -3
- package/lib/select/index.d.ts +1 -0
- package/lib/select/locale.d.ts +3 -0
- package/lib/select/select.d.ts +1240 -579
- package/lib/select/select.template.d.ts +3 -3
- package/lib/selectable-box/index.d.ts +1 -0
- package/lib/selectable-box/selectable-box.d.ts +94 -63
- package/lib/selectable-box/selectable-box.template.d.ts +2 -2
- package/lib/side-drawer/index.d.ts +1 -0
- package/lib/side-drawer/side-drawer.template.d.ts +2 -2
- package/lib/simple-color-picker/definition.d.ts +1 -1
- package/lib/simple-color-picker/index.d.ts +1 -0
- package/lib/simple-color-picker/simple-color-picker.d.ts +216 -153
- package/lib/simple-color-picker/simple-color-picker.template.d.ts +2 -2
- package/lib/slider/index.d.ts +1 -0
- package/lib/slider/slider.d.ts +299 -205
- package/lib/slider/slider.template.d.ts +4 -4
- package/lib/split-button/index.d.ts +1 -0
- package/lib/split-button/split-button.d.ts +288 -195
- package/lib/split-button/split-button.template.d.ts +3 -3
- package/lib/status/index.d.ts +1 -0
- package/lib/status/status.d.ts +98 -67
- package/lib/status/status.template.d.ts +3 -3
- package/lib/switch/index.d.ts +1 -0
- package/lib/switch/switch.d.ts +207 -142
- package/lib/switch/switch.template.d.ts +2 -2
- package/lib/tab/index.d.ts +1 -0
- package/lib/tab/tab.d.ts +288 -195
- package/lib/tab/tab.template.d.ts +3 -3
- package/lib/tab-panel/index.d.ts +1 -0
- package/lib/tab-panel/tab-panel.d.ts +93 -62
- package/lib/tab-panel/tab-panel.template.d.ts +2 -2
- package/lib/table/index.d.ts +1 -0
- package/lib/table/table-body.template.d.ts +3 -3
- package/lib/table/table-cell.d.ts +93 -62
- package/lib/table/table-cell.template.d.ts +3 -3
- package/lib/table/table-head.template.d.ts +3 -3
- package/lib/table/table-header-cell.d.ts +93 -62
- package/lib/table/table-header-cell.template.d.ts +3 -3
- package/lib/table/table-row.d.ts +93 -62
- package/lib/table/table-row.template.d.ts +3 -3
- package/lib/table/table.template.d.ts +3 -3
- package/lib/tabs/index.d.ts +1 -0
- package/lib/tabs/tabs.d.ts +2 -2
- package/lib/tabs/tabs.template.d.ts +2 -2
- package/lib/tag/index.d.ts +1 -0
- package/lib/tag/tag.d.ts +288 -195
- package/lib/tag/tag.template.d.ts +3 -3
- package/lib/tag-group/index.d.ts +1 -0
- package/lib/tag-group/tag-group.d.ts +93 -62
- package/lib/tag-group/tag-group.template.d.ts +2 -2
- package/lib/tag-name-map.d.ts +1 -1
- package/lib/text-area/index.d.ts +1 -0
- package/lib/text-area/text-area.d.ts +832 -581
- package/lib/text-area/text-area.template.d.ts +3 -3
- package/lib/text-field/index.d.ts +1 -0
- package/lib/text-field/text-field.d.ts +931 -649
- package/lib/text-field/text-field.template.d.ts +3 -3
- package/lib/time-picker/index.d.ts +1 -0
- package/lib/time-picker/time-picker.d.ts +486 -359
- package/lib/time-picker/time-picker.template.d.ts +3 -3
- package/lib/toggletip/index.d.ts +1 -0
- package/lib/toggletip/toggletip.d.ts +197 -135
- package/lib/toggletip/toggletip.template.d.ts +3 -3
- package/lib/tooltip/index.d.ts +1 -0
- package/lib/tooltip/tooltip.d.ts +101 -70
- package/lib/tooltip/tooltip.template.d.ts +3 -3
- package/lib/tree-item/index.d.ts +1 -0
- package/lib/tree-item/tree-item.d.ts +190 -128
- package/lib/tree-item/tree-item.template.d.ts +3 -3
- package/lib/tree-view/index.d.ts +1 -0
- package/lib/tree-view/tree-view.d.ts +93 -62
- package/lib/tree-view/tree-view.template.d.ts +2 -2
- package/lib/video-player/index.d.ts +1 -0
- package/lib/video-player/video-player.d.ts +96 -65
- package/lib/video-player/video-player.template.d.ts +1 -1
- package/lib/video-player/vivid-video-svg.d.ts +1 -1
- package/lib/visually-hidden/definition.d.ts +1 -1
- package/lib/visually-hidden/index.d.ts +1 -0
- package/lib/visually-hidden/visually-hidden.template.d.ts +1 -1
- package/locales/de-DE.cjs +3 -0
- package/locales/de-DE.d.ts +1 -1
- package/locales/de-DE.js +3 -0
- package/locales/en-GB.cjs +3 -0
- package/locales/en-GB.d.ts +1 -1
- package/locales/en-GB.js +3 -0
- package/locales/en-US.cjs +3 -0
- package/locales/en-US.d.ts +1 -1
- package/locales/en-US.js +3 -0
- package/locales/ja-JP.cjs +3 -0
- package/locales/ja-JP.d.ts +1 -1
- package/locales/ja-JP.js +3 -0
- package/locales/zh-CN.cjs +3 -0
- package/locales/zh-CN.d.ts +1 -1
- package/locales/zh-CN.js +3 -0
- package/package.json +6 -6
- package/rich-text-editor/definition.cjs +2 -4
- package/rich-text-editor/definition.js +3 -5
- package/rich-text-editor/index.cjs +7 -7
- package/rich-text-editor/index.js +975 -977
- package/rich-text-view/index.js +1 -1
- package/select/definition.cjs +104 -5
- package/select/definition.js +104 -5
- package/shared/aria/aria-change-subscription.d.ts +1 -1
- package/shared/aria/aria-mixin.d.ts +94 -63
- package/shared/aria/attribute-removal.d.ts +1 -1
- package/shared/aria/delegate-aria-behavior.d.ts +2 -2
- package/shared/aria/delegates-aria.d.ts +96 -65
- package/shared/aria/host-semantics-behavior.d.ts +2 -2
- package/shared/aria/host-semantics.d.ts +97 -66
- package/shared/color-picker/base-color-picker.d.ts +114 -82
- package/shared/datetime/dateRange.d.ts +1 -1
- package/shared/datetime/dateTimeStr.d.ts +4 -4
- package/shared/datetime/month.d.ts +1 -1
- package/shared/datetime/presentationDate.d.ts +2 -2
- package/shared/datetime/presentationDateRange.d.ts +2 -2
- package/shared/datetime/presentationDateTime.d.ts +2 -2
- package/shared/datetime/presentationTime.d.ts +1 -1
- package/shared/datetime/year.d.ts +1 -1
- package/shared/deprecation/replaced-props.d.ts +95 -60
- package/shared/design-system/createRegisterFunction.d.ts +1 -1
- package/shared/design-system/defineVividComponent.d.ts +1 -1
- package/shared/feedback/feedback-message.d.ts +96 -65
- package/shared/feedback/mixins.d.ts +200 -138
- package/shared/foundation/button/button.d.ts +202 -139
- package/shared/foundation/button/button.template.d.ts +2 -2
- package/shared/foundation/form-associated/form-associated.d.ts +213 -147
- package/shared/foundation/listbox/listbox.d.ts +1 -1
- package/shared/foundation/test-utilities/fixture.d.ts +18 -0
- package/shared/foundation/vivid-element/vivid-element.d.ts +194 -131
- package/shared/localization/Locale.d.ts +31 -29
- package/shared/localization/index.d.ts +1 -1
- package/shared/patterns/affix.d.ts +195 -133
- package/shared/patterns/anchored.d.ts +202 -140
- package/shared/patterns/char-count/char-count.d.ts +99 -68
- package/shared/patterns/chevron.d.ts +2 -2
- package/shared/patterns/form-elements/form-element.d.ts +114 -488
- package/shared/patterns/form-elements/with-contextual-help.d.ts +117 -903
- package/shared/patterns/form-elements/with-error-text.d.ts +120 -906
- package/shared/patterns/form-elements/with-success-text.d.ts +97 -66
- package/shared/patterns/linkable.d.ts +106 -117
- package/shared/patterns/localized.d.ts +197 -135
- package/shared/patterns/trapped-focus.d.ts +95 -64
- package/shared/picker-field/mixins/calendar-picker.d.ts +251 -188
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +271 -208
- package/shared/picker-field/mixins/calendar-segments/calendarGrid.d.ts +3 -3
- package/shared/picker-field/mixins/calendar-segments/monthPickerGrid.d.ts +2 -2
- package/shared/picker-field/mixins/calendar-segments/segment.d.ts +2 -2
- package/shared/picker-field/mixins/inline-time-picker/columns.d.ts +2 -2
- package/shared/picker-field/mixins/inline-time-picker/index.d.ts +1 -0
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +95 -64
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.template.d.ts +3 -3
- package/shared/picker-field/mixins/inline-time-picker/picker-option.d.ts +1 -1
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +277 -1102
- package/shared/picker-field/mixins/single-date-picker.d.ts +274 -1953
- package/shared/picker-field/mixins/single-value-picker.d.ts +236 -173
- package/shared/picker-field/mixins/time-selection-picker.d.ts +257 -1046
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +486 -360
- package/shared/picker-field/picker-field.d.ts +735 -514
- package/shared/picker-field/picker-field.template.d.ts +2 -2
- package/shared/templating/attribute-binding-behaviour.d.ts +1 -1
- package/shared/templating/render-in-light-dom.d.ts +2 -2
- package/shared/utils/closest-of-type.d.ts +2 -0
- package/shared/utils/direct-children-of-type.d.ts +2 -0
- package/shared/utils/dom-traversal-types.d.ts +3 -0
- package/shared/utils/first-of-type.d.ts +2 -0
- package/shared/utils/last-of-type.d.ts +2 -0
- package/shared/utils/nested-children-of-type.d.ts +2 -0
- package/shared/utils/next-of-type.d.ts +2 -0
- package/shared/utils/numberConverter.d.ts +1 -1
- package/shared/utils/prev-of-type.d.ts +2 -0
- package/shared/utils/promise.d.ts +2 -2
- package/shared/utils/siblings-of-type.d.ts +2 -0
- package/styles/core/all.css +2 -2
- package/styles/core/theme.css +2 -2
- 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/unbundled/slottable-request.cjs +7 -5
- package/unbundled/slottable-request.js +7 -6
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/vivid.api.json +727 -38
|
@@ -635,7 +635,7 @@ function $(s, t, e, n) {
|
|
|
635
635
|
let o = $(l.content, t - r - 1, e, l);
|
|
636
636
|
return o && s.replaceChild(i, l.copy(o));
|
|
637
637
|
}
|
|
638
|
-
function
|
|
638
|
+
function gt(s, t, e) {
|
|
639
639
|
if (e.openStart > s.depth)
|
|
640
640
|
throw new D("Inserted content deeper than insertion position");
|
|
641
641
|
if (s.depth - e.openStart != t.depth - e.openEnd)
|
|
@@ -652,7 +652,7 @@ function tt(s, t, e, n) {
|
|
|
652
652
|
let l = s.parent, o = l.content;
|
|
653
653
|
return w(l, o.cut(0, s.parentOffset).append(e.content).append(o.cut(t.parentOffset)));
|
|
654
654
|
} else {
|
|
655
|
-
let { start: l, end: o } =
|
|
655
|
+
let { start: l, end: o } = yt(e, s);
|
|
656
656
|
return w(r, nt(s, l, o, t, n));
|
|
657
657
|
}
|
|
658
658
|
else return w(r, N(s, t, n));
|
|
@@ -691,7 +691,7 @@ function N(s, t, e) {
|
|
|
691
691
|
}
|
|
692
692
|
return S(t, null, e, n), new c(n);
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function yt(s, t) {
|
|
695
695
|
let e = t.depth - s.openStart, i = t.node(e).copy(s.content);
|
|
696
696
|
for (let r = e - 1; r >= 0; r--)
|
|
697
697
|
i = t.node(r).copy(c.from(i));
|
|
@@ -885,7 +885,7 @@ class b {
|
|
|
885
885
|
return t.blockRange(this);
|
|
886
886
|
for (let n = this.depth - (this.parent.inlineContent || this.pos == t.pos ? 1 : 0); n >= 0; n--)
|
|
887
887
|
if (t.pos <= this.end(n) && (!e || e(this.node(n))))
|
|
888
|
-
return new
|
|
888
|
+
return new wt(this, t, n);
|
|
889
889
|
return null;
|
|
890
890
|
}
|
|
891
891
|
/**
|
|
@@ -934,7 +934,7 @@ class b {
|
|
|
934
934
|
@internal
|
|
935
935
|
*/
|
|
936
936
|
static resolveCached(t, e) {
|
|
937
|
-
let n =
|
|
937
|
+
let n = W.get(t);
|
|
938
938
|
if (n)
|
|
939
939
|
for (let r = 0; r < n.elts.length; r++) {
|
|
940
940
|
let l = n.elts[r];
|
|
@@ -942,18 +942,18 @@ class b {
|
|
|
942
942
|
return l;
|
|
943
943
|
}
|
|
944
944
|
else
|
|
945
|
-
|
|
945
|
+
W.set(t, n = new xt());
|
|
946
946
|
let i = n.elts[n.i] = b.resolve(t, e);
|
|
947
|
-
return n.i = (n.i + 1) %
|
|
947
|
+
return n.i = (n.i + 1) % mt, i;
|
|
948
948
|
}
|
|
949
949
|
}
|
|
950
|
-
class
|
|
950
|
+
class xt {
|
|
951
951
|
constructor() {
|
|
952
952
|
this.elts = [], this.i = 0;
|
|
953
953
|
}
|
|
954
954
|
}
|
|
955
|
-
const
|
|
956
|
-
class
|
|
955
|
+
const mt = 12, W = /* @__PURE__ */ new WeakMap();
|
|
956
|
+
class wt {
|
|
957
957
|
/**
|
|
958
958
|
Construct a node range. `$from` and `$to` should point into the
|
|
959
959
|
same node until at least the given `depth`, since a node range
|
|
@@ -993,7 +993,7 @@ class mt {
|
|
|
993
993
|
return this.$to.indexAfter(this.depth);
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
|
-
const
|
|
996
|
+
const kt = /* @__PURE__ */ Object.create(null);
|
|
997
997
|
class x {
|
|
998
998
|
/**
|
|
999
999
|
@internal
|
|
@@ -1112,7 +1112,7 @@ class x {
|
|
|
1112
1112
|
attributes, and marks.
|
|
1113
1113
|
*/
|
|
1114
1114
|
hasMarkup(t, e, n) {
|
|
1115
|
-
return this.type == t && M(this.attrs, e || t.defaultAttrs ||
|
|
1115
|
+
return this.type == t && M(this.attrs, e || t.defaultAttrs || kt) && u.sameSet(this.marks, n || u.none);
|
|
1116
1116
|
}
|
|
1117
1117
|
/**
|
|
1118
1118
|
Create a new node with the same markup as this node, containing
|
|
@@ -1155,7 +1155,7 @@ class x {
|
|
|
1155
1155
|
[`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.
|
|
1156
1156
|
*/
|
|
1157
1157
|
replace(t, e, n) {
|
|
1158
|
-
return
|
|
1158
|
+
return gt(this.resolve(t), this.resolve(e), n);
|
|
1159
1159
|
}
|
|
1160
1160
|
/**
|
|
1161
1161
|
Find the node directly after the given position.
|
|
@@ -1418,13 +1418,13 @@ class k {
|
|
|
1418
1418
|
@internal
|
|
1419
1419
|
*/
|
|
1420
1420
|
static parse(t, e) {
|
|
1421
|
-
let n = new
|
|
1421
|
+
let n = new St(t, e);
|
|
1422
1422
|
if (n.next == null)
|
|
1423
1423
|
return k.empty;
|
|
1424
1424
|
let i = rt(n);
|
|
1425
1425
|
n.next && n.err("Unexpected trailing text");
|
|
1426
|
-
let r = vt(
|
|
1427
|
-
return
|
|
1426
|
+
let r = Mt(vt(i));
|
|
1427
|
+
return Nt(r, n), r;
|
|
1428
1428
|
}
|
|
1429
1429
|
/**
|
|
1430
1430
|
Match a node type, returning a match after that node if
|
|
@@ -1570,7 +1570,7 @@ class k {
|
|
|
1570
1570
|
}
|
|
1571
1571
|
}
|
|
1572
1572
|
k.empty = new k(!0);
|
|
1573
|
-
class
|
|
1573
|
+
class St {
|
|
1574
1574
|
constructor(t, e) {
|
|
1575
1575
|
this.string = t, this.nodeTypes = e, this.inline = null, this.pos = 0, this.tokens = t.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
|
|
1576
1576
|
}
|
|
@@ -1587,19 +1587,19 @@ class kt {
|
|
|
1587
1587
|
function rt(s) {
|
|
1588
1588
|
let t = [];
|
|
1589
1589
|
do
|
|
1590
|
-
t.push(
|
|
1590
|
+
t.push(Et(s));
|
|
1591
1591
|
while (s.eat("|"));
|
|
1592
1592
|
return t.length == 1 ? t[0] : { type: "choice", exprs: t };
|
|
1593
1593
|
}
|
|
1594
|
-
function
|
|
1594
|
+
function Et(s) {
|
|
1595
1595
|
let t = [];
|
|
1596
1596
|
do
|
|
1597
|
-
t.push(
|
|
1597
|
+
t.push(bt(s));
|
|
1598
1598
|
while (s.next && s.next != ")" && s.next != "|");
|
|
1599
1599
|
return t.length == 1 ? t[0] : { type: "seq", exprs: t };
|
|
1600
1600
|
}
|
|
1601
|
-
function
|
|
1602
|
-
let t =
|
|
1601
|
+
function bt(s) {
|
|
1602
|
+
let t = Tt(s);
|
|
1603
1603
|
for (; ; )
|
|
1604
1604
|
if (s.eat("+"))
|
|
1605
1605
|
t = { type: "plus", expr: t };
|
|
@@ -1608,21 +1608,21 @@ function Et(s) {
|
|
|
1608
1608
|
else if (s.eat("?"))
|
|
1609
1609
|
t = { type: "opt", expr: t };
|
|
1610
1610
|
else if (s.eat("{"))
|
|
1611
|
-
t =
|
|
1611
|
+
t = Ct(s, t);
|
|
1612
1612
|
else
|
|
1613
1613
|
break;
|
|
1614
1614
|
return t;
|
|
1615
1615
|
}
|
|
1616
|
-
function
|
|
1616
|
+
function L(s) {
|
|
1617
1617
|
/\D/.test(s.next) && s.err("Expected number, got '" + s.next + "'");
|
|
1618
1618
|
let t = Number(s.next);
|
|
1619
1619
|
return s.pos++, t;
|
|
1620
1620
|
}
|
|
1621
|
-
function bt(s, t) {
|
|
1622
|
-
let e = W(s), n = e;
|
|
1623
|
-
return s.eat(",") && (s.next != "}" ? n = W(s) : n = -1), s.eat("}") || s.err("Unclosed braced range"), { type: "range", min: e, max: n, expr: t };
|
|
1624
|
-
}
|
|
1625
1621
|
function Ct(s, t) {
|
|
1622
|
+
let e = L(s), n = e;
|
|
1623
|
+
return s.eat(",") && (s.next != "}" ? n = L(s) : n = -1), s.eat("}") || s.err("Unclosed braced range"), { type: "range", min: e, max: n, expr: t };
|
|
1624
|
+
}
|
|
1625
|
+
function Ot(s, t) {
|
|
1626
1626
|
let e = s.nodeTypes, n = e[t];
|
|
1627
1627
|
if (n)
|
|
1628
1628
|
return [n];
|
|
@@ -1633,18 +1633,18 @@ function Ct(s, t) {
|
|
|
1633
1633
|
}
|
|
1634
1634
|
return i.length == 0 && s.err("No node type or group '" + t + "' found"), i;
|
|
1635
1635
|
}
|
|
1636
|
-
function
|
|
1636
|
+
function Tt(s) {
|
|
1637
1637
|
if (s.eat("(")) {
|
|
1638
1638
|
let t = rt(s);
|
|
1639
1639
|
return s.eat(")") || s.err("Missing closing paren"), t;
|
|
1640
1640
|
} else if (/\W/.test(s.next))
|
|
1641
1641
|
s.err("Unexpected token '" + s.next + "'");
|
|
1642
1642
|
else {
|
|
1643
|
-
let t =
|
|
1643
|
+
let t = Ot(s, s.next).map((e) => (s.inline == null ? s.inline = e.isInline : s.inline != e.isInline && s.err("Mixing inline and block content"), { type: "name", value: e }));
|
|
1644
1644
|
return s.pos++, t.length == 1 ? t[0] : { type: "choice", exprs: t };
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
|
-
function
|
|
1647
|
+
function vt(s) {
|
|
1648
1648
|
let t = [[]];
|
|
1649
1649
|
return i(r(s, 0), e()), t;
|
|
1650
1650
|
function e() {
|
|
@@ -1715,7 +1715,7 @@ function j(s, t) {
|
|
|
1715
1715
|
}
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
|
-
function
|
|
1718
|
+
function Mt(s) {
|
|
1719
1719
|
let t = /* @__PURE__ */ Object.create(null);
|
|
1720
1720
|
return e(j(s, 0));
|
|
1721
1721
|
function e(n) {
|
|
@@ -1740,7 +1740,7 @@ function vt(s) {
|
|
|
1740
1740
|
return r;
|
|
1741
1741
|
}
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function Nt(s, t) {
|
|
1744
1744
|
for (let e = 0, n = [s]; e < n.length; e++) {
|
|
1745
1745
|
let i = n[e], r = !i.validEnd, l = [];
|
|
1746
1746
|
for (let o = 0; o < i.next.length; o++) {
|
|
@@ -1788,7 +1788,7 @@ function at(s, t) {
|
|
|
1788
1788
|
let e = /* @__PURE__ */ Object.create(null);
|
|
1789
1789
|
if (t)
|
|
1790
1790
|
for (let n in t)
|
|
1791
|
-
e[n] = new
|
|
1791
|
+
e[n] = new Rt(s, n, t[n]);
|
|
1792
1792
|
return e;
|
|
1793
1793
|
}
|
|
1794
1794
|
class R {
|
|
@@ -1970,7 +1970,7 @@ class R {
|
|
|
1970
1970
|
return n;
|
|
1971
1971
|
}
|
|
1972
1972
|
}
|
|
1973
|
-
function
|
|
1973
|
+
function At(s, t, e) {
|
|
1974
1974
|
let n = e.split("|");
|
|
1975
1975
|
return (i) => {
|
|
1976
1976
|
let r = i === null ? "null" : typeof i;
|
|
@@ -1978,9 +1978,9 @@ function Nt(s, t, e) {
|
|
|
1978
1978
|
throw new RangeError(`Expected value of type ${n} for attribute ${t} on type ${s}, got ${r}`);
|
|
1979
1979
|
};
|
|
1980
1980
|
}
|
|
1981
|
-
class
|
|
1981
|
+
class Rt {
|
|
1982
1982
|
constructor(t, e, n) {
|
|
1983
|
-
this.hasDefault = Object.prototype.hasOwnProperty.call(n, "default"), this.default = n.default, this.validate = typeof n.validate == "string" ?
|
|
1983
|
+
this.hasDefault = Object.prototype.hasOwnProperty.call(n, "default"), this.default = n.default, this.validate = typeof n.validate == "string" ? At(t, e, n.validate) : n.validate;
|
|
1984
1984
|
}
|
|
1985
1985
|
get isRequired() {
|
|
1986
1986
|
return !this.hasDefault;
|
|
@@ -2041,7 +2041,7 @@ class J {
|
|
|
2041
2041
|
return this.excluded.indexOf(t) > -1;
|
|
2042
2042
|
}
|
|
2043
2043
|
}
|
|
2044
|
-
class
|
|
2044
|
+
class Lt {
|
|
2045
2045
|
/**
|
|
2046
2046
|
Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
|
|
2047
2047
|
*/
|
|
@@ -2126,10 +2126,10 @@ function U(s, t) {
|
|
|
2126
2126
|
}
|
|
2127
2127
|
return e;
|
|
2128
2128
|
}
|
|
2129
|
-
function
|
|
2129
|
+
function zt(s) {
|
|
2130
2130
|
return s.tag != null;
|
|
2131
2131
|
}
|
|
2132
|
-
function
|
|
2132
|
+
function It(s) {
|
|
2133
2133
|
return s.style != null;
|
|
2134
2134
|
}
|
|
2135
2135
|
class B {
|
|
@@ -2141,9 +2141,9 @@ class B {
|
|
|
2141
2141
|
this.schema = t, this.rules = e, this.tags = [], this.styles = [];
|
|
2142
2142
|
let n = this.matchedStyles = [];
|
|
2143
2143
|
e.forEach((i) => {
|
|
2144
|
-
if (
|
|
2144
|
+
if (zt(i))
|
|
2145
2145
|
this.tags.push(i);
|
|
2146
|
-
else if (
|
|
2146
|
+
else if (It(i)) {
|
|
2147
2147
|
let r = /[^=]*/.exec(i.style)[0];
|
|
2148
2148
|
n.indexOf(r) < 0 && n.push(r), this.styles.push(i);
|
|
2149
2149
|
}
|
|
@@ -2179,7 +2179,7 @@ class B {
|
|
|
2179
2179
|
matchTag(t, e, n) {
|
|
2180
2180
|
for (let i = n ? this.tags.indexOf(n) + 1 : 0; i < this.tags.length; i++) {
|
|
2181
2181
|
let r = this.tags[i];
|
|
2182
|
-
if (
|
|
2182
|
+
if (Bt(t, r.tag) && (r.namespace === void 0 || t.namespaceURI == r.namespace) && (!r.context || e.matchesContext(r.context))) {
|
|
2183
2183
|
if (r.getAttrs) {
|
|
2184
2184
|
let l = r.getAttrs(t);
|
|
2185
2185
|
if (l === !1)
|
|
@@ -2280,7 +2280,7 @@ const ft = {
|
|
|
2280
2280
|
table: !0,
|
|
2281
2281
|
tfoot: !0,
|
|
2282
2282
|
ul: !0
|
|
2283
|
-
},
|
|
2283
|
+
}, Dt = {
|
|
2284
2284
|
head: !0,
|
|
2285
2285
|
noscript: !0,
|
|
2286
2286
|
object: !0,
|
|
@@ -2367,9 +2367,9 @@ class G {
|
|
|
2367
2367
|
let i = this.localPreserveWS, r = this.top;
|
|
2368
2368
|
(t.tagName == "PRE" || /pre/.test(t.style && t.style.whiteSpace)) && (this.localPreserveWS = !0);
|
|
2369
2369
|
let l = t.nodeName.toLowerCase(), o;
|
|
2370
|
-
ct.hasOwnProperty(l) && this.parser.normalizeLists &&
|
|
2370
|
+
ct.hasOwnProperty(l) && this.parser.normalizeLists && Pt(t);
|
|
2371
2371
|
let h = this.options.ruleFromNode && this.options.ruleFromNode(t) || (o = this.parser.matchTag(t, this, n));
|
|
2372
|
-
t: if (h ? h.ignore :
|
|
2372
|
+
t: if (h ? h.ignore : Dt.hasOwnProperty(l))
|
|
2373
2373
|
this.findInside(t), this.ignoreFallback(t, e);
|
|
2374
2374
|
else if (!h || h.skip || h.closeParent) {
|
|
2375
2375
|
h && h.closeParent ? this.open = Math.max(0, this.open - 1) : h && h.skip.nodeType && (t = h.skip);
|
|
@@ -2606,13 +2606,13 @@ class G {
|
|
|
2606
2606
|
}
|
|
2607
2607
|
}
|
|
2608
2608
|
}
|
|
2609
|
-
function
|
|
2609
|
+
function Pt(s) {
|
|
2610
2610
|
for (let t = s.firstChild, e = null; t; t = t.nextSibling) {
|
|
2611
2611
|
let n = t.nodeType == 1 ? t.nodeName.toLowerCase() : null;
|
|
2612
2612
|
n && ct.hasOwnProperty(n) && e ? (e.appendChild(t), t = e) : n == "li" ? e = t : n && (e = null);
|
|
2613
2613
|
}
|
|
2614
2614
|
}
|
|
2615
|
-
function
|
|
2615
|
+
function Bt(s, t) {
|
|
2616
2616
|
return (s.matches || s.msMatchesSelector || s.webkitMatchesSelector || s.mozMatchesSelector).call(s, t);
|
|
2617
2617
|
}
|
|
2618
2618
|
function H(s) {
|
|
@@ -2755,11 +2755,11 @@ function I(s) {
|
|
|
2755
2755
|
return s.document || window.document;
|
|
2756
2756
|
}
|
|
2757
2757
|
const Y = /* @__PURE__ */ new WeakMap();
|
|
2758
|
-
function
|
|
2758
|
+
function Ft(s) {
|
|
2759
2759
|
let t = Y.get(s);
|
|
2760
|
-
return t === void 0 && Y.set(s, t =
|
|
2760
|
+
return t === void 0 && Y.set(s, t = Jt(s)), t;
|
|
2761
2761
|
}
|
|
2762
|
-
function
|
|
2762
|
+
function Jt(s) {
|
|
2763
2763
|
let t = null;
|
|
2764
2764
|
function e(n) {
|
|
2765
2765
|
if (n && typeof n == "object")
|
|
@@ -2785,7 +2785,7 @@ function v(s, t, e, n) {
|
|
|
2785
2785
|
let i = t[0], r;
|
|
2786
2786
|
if (typeof i != "string")
|
|
2787
2787
|
throw new RangeError("Invalid array passed to renderSpec");
|
|
2788
|
-
if (n && (r =
|
|
2788
|
+
if (n && (r = Ft(n)) && r.indexOf(t) > -1)
|
|
2789
2789
|
throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");
|
|
2790
2790
|
let l = i.indexOf(" ");
|
|
2791
2791
|
l > 0 && (e = i.slice(0, l), i = i.slice(l + 1));
|
|
@@ -2805,8 +2805,8 @@ function v(s, t, e, n) {
|
|
|
2805
2805
|
throw new RangeError("Content hole must be the only child of its parent node");
|
|
2806
2806
|
return { dom: h, contentDOM: h };
|
|
2807
2807
|
} else {
|
|
2808
|
-
let { dom:
|
|
2809
|
-
if (h.appendChild(
|
|
2808
|
+
let { dom: dt, contentDOM: q } = v(s, y, e, n);
|
|
2809
|
+
if (h.appendChild(dt), q) {
|
|
2810
2810
|
if (o)
|
|
2811
2811
|
throw new RangeError("Multiple content holes");
|
|
2812
2812
|
o = q;
|
|
@@ -2815,7 +2815,7 @@ function v(s, t, e, n) {
|
|
|
2815
2815
|
}
|
|
2816
2816
|
return { dom: h, contentDOM: o };
|
|
2817
2817
|
}
|
|
2818
|
-
const
|
|
2818
|
+
const jt = (s) => s.sort((t, e) => {
|
|
2819
2819
|
const n = t.priority - e.priority;
|
|
2820
2820
|
return n !== 0 ? n : t.featureName === e.featureName ? 0 : t.featureName > e.featureName ? 1 : -1;
|
|
2821
2821
|
}).map((t) => t.value), qt = {
|
|
@@ -2823,7 +2823,7 @@ const Jt = Symbol("rte-internal-impl"), jt = (s) => s.sort((t, e) => {
|
|
|
2823
2823
|
high: -10,
|
|
2824
2824
|
default: 0
|
|
2825
2825
|
};
|
|
2826
|
-
class
|
|
2826
|
+
class Wt {
|
|
2827
2827
|
}
|
|
2828
2828
|
class Ut {
|
|
2829
2829
|
/**
|
|
@@ -2865,16 +2865,15 @@ class Ut {
|
|
|
2865
2865
|
getPublicInterface(t) {
|
|
2866
2866
|
}
|
|
2867
2867
|
}
|
|
2868
|
-
const Vt = (s) => {
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
super(), this[Jt] = new s(...i);
|
|
2868
|
+
const pt = /* @__PURE__ */ new WeakMap(), Vt = (s) => pt.get(s), Gt = (s) => {
|
|
2869
|
+
class t extends Wt {
|
|
2870
|
+
constructor(...n) {
|
|
2871
|
+
super(), pt.set(this, new s(...n));
|
|
2873
2872
|
}
|
|
2874
2873
|
}
|
|
2875
|
-
return
|
|
2876
|
-
},
|
|
2877
|
-
function
|
|
2874
|
+
return t;
|
|
2875
|
+
}, Ht = Symbol("rte-internal-impl"), Qt = Symbol.for("slottable-request-remove");
|
|
2876
|
+
function Xt(s, t, e, n) {
|
|
2878
2877
|
const i = new CustomEvent("slottable-request", {
|
|
2879
2878
|
bubbles: !1,
|
|
2880
2879
|
composed: !1,
|
|
@@ -2895,13 +2894,14 @@ export {
|
|
|
2895
2894
|
g as S,
|
|
2896
2895
|
J as a,
|
|
2897
2896
|
B as b,
|
|
2898
|
-
|
|
2897
|
+
Lt as c,
|
|
2899
2898
|
Ut as d,
|
|
2900
2899
|
qt as e,
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2900
|
+
Gt as f,
|
|
2901
|
+
Vt as g,
|
|
2902
|
+
wt as h,
|
|
2903
|
+
Ht as i,
|
|
2904
|
+
Xt as j,
|
|
2905
|
+
Qt as r,
|
|
2906
2906
|
jt as s
|
|
2907
2907
|
};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
Mismatch Details:`,` - Expected target node ID: "${d.targetNodeId}"`,` - Available target IDs: [${Object.keys(this.targets).join(", ")||"none"}]`];throw d.targetTagName&&g.push(` - Expected tag name: "${d.targetTagName}"`),u.sourceAspect&&g.push(` - Source aspect: "${u.sourceAspect}"`),u.aspectType!==void 0&&g.push(` - Aspect type: ${u.aspectType}`),g.push(`
|
|
3
3
|
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",`
|
|
4
4
|
Template: ${l.slice(0,200)}${l.length>200?"...":""}`),new Ee(g.join(`
|
|
5
|
-
`),d,ie(this.firstChild,this.lastChild).cloneContents(),l)}}}else{this.source!==null&&this.evaluateUnbindables(),this.isBound=!1,this.source=t,this.context=e;for(let r=0,o=n.length;r<o;++r)n[r].bind(this)}this.isBound=!0,this._hydrationStage=B.hydrated}unbind(){!this.isBound||this.source===null||(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}dispose(){lt(this.firstChild,this.lastChild),this.unbind()}onUnbind(t){this.unbindables.push(t)}evaluateUnbindables(){const t=this.unbindables;for(let e=0,s=t.length;e<s;++e)t[e].unbind(this);t.length=0}}se=Q;O(Re);function _e(i){return i.create!==void 0}function Ie(i,t,e,s){if(e==null&&(e=""),_e(e)){i.textContent="";let n=i.$fastView;if(n===void 0)if(L(s)&&L(e)&&s.bindingViewBoundaries[this.targetNodeId]!==void 0&&s.hydrationStage!==B.hydrated){const r=s.bindingViewBoundaries[this.targetNodeId];n=e.hydrate(r.first,r.last)}else n=e.create();else i.$fastTemplate!==e&&(n.isComposed&&(n.remove(),n.unbind()),n=e.create());n.isComposed?n.needsBindOnly&&(n.needsBindOnly=!1,n.bind(s.source,s.context)):(n.isComposed=!0,n.bind(s.source,s.context),n.insertBefore(i),i.$fastView=n,i.$fastTemplate=e)}else{const n=i.$fastView;n!==void 0&&n.isComposed&&(n.isComposed=!1,n.remove(),n.needsBindOnly?n.needsBindOnly=!1:n.unbind()),i.textContent=e}}function Le(i,t,e){var s;const n=`${this.id}-t`,r=(s=i[n])!==null&&s!==void 0?s:i[n]={v:0,cv:Object.create(null)},o=r.cv;let c=r.v;const d=i[t];if(e!=null&&e.length){const l=e.split(/\s+/);for(let a=0,h=l.length;a<h;++a){const u=l[a];u!==""&&(o[u]=c,d.add(u))}}if(r.v=c+1,c!==0){c-=1;for(const l in o)o[l]===c&&d.remove(l)}}const Ve={[y.attribute]:k.setAttribute,[y.booleanAttribute]:k.setBooleanAttribute,[y.property]:(i,t,e)=>i[t]=e,[y.content]:Ie,[y.tokenList]:Le,[y.event]:()=>{}};class E{constructor(t){this.dataBinding=t,this.updateTarget=null,this.aspectType=y.content}createHTML(t){return pt.interpolation(t(this))}createBehavior(){var t;if(this.updateTarget===null){const e=Ve[this.aspectType],s=(t=this.dataBinding.policy)!==null&&t!==void 0?t:this.policy;if(!e)throw v.error(1205);this.data=`${this.id}-d`,this.updateTarget=s.protect(this.targetTagName,this.aspectType,this.targetAspect,e)}return this}bind(t){var e;const s=t.targets[this.targetNodeId],n=L(t)&&t.hydrationStage&&t.hydrationStage!==B.hydrated;switch(this.aspectType){case y.event:s[this.data]=t,s.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case y.content:t.onUnbind(this);default:const r=(e=s[this.data])!==null&&e!==void 0?e:s[this.data]=this.dataBinding.createObserver(this,this);if(r.target=s,r.controller=t,n&&(this.aspectType===y.attribute||this.aspectType===y.booleanAttribute)){r.bind(t);break}this.updateTarget(s,this.targetAspect,r.bind(t),t);break}}unbind(t){const s=t.targets[this.targetNodeId].$fastView;s!==void 0&&s.isComposed&&(s.unbind(),s.needsBindOnly=!0)}handleEvent(t){const e=t.currentTarget[this.data];if(e.isBound){A.setEvent(t);const s=this.dataBinding.evaluate(e.source,e.context);A.setEvent(null),s!==!0&&t.preventDefault()}}handleChange(t,e){const s=e.target,n=e.controller;this.updateTarget(s,this.targetAspect,e.bind(n),n)}}T.define(E,{aspected:!0});const re=(i,t)=>`${i}.${t}`,Rt={},C={index:0,node:null};function _t(i){i.startsWith("fast-")||v.warn(1204,{name:i})}const je=new Proxy(document.createElement("div"),{get(i,t){_t(t);const e=Reflect.get(i,t);return M(e)?e.bind(i):e},set(i,t,e){return _t(t),Reflect.set(i,t,e)}});class Fe{constructor(t,e,s){this.fragment=t,this.directives=e,this.policy=s,this.proto=null,this.nodeIds=new Set,this.descriptors={},this.factories=[]}addFactory(t,e,s,n,r){var o,c;this.nodeIds.has(s)||(this.nodeIds.add(s),this.addTargetDescriptor(e,s,n)),t.id=(o=t.id)!==null&&o!==void 0?o:V(),t.targetNodeId=s,t.targetTagName=r,t.policy=(c=t.policy)!==null&&c!==void 0?c:this.policy,this.factories.push(t)}freeze(){return this.proto=Object.create(null,this.descriptors),this}addTargetDescriptor(t,e,s){const n=this.descriptors;if(e==="r"||e==="h"||n[e])return;if(!n[t]){const o=t.lastIndexOf("."),c=t.substring(0,o),d=parseInt(t.substring(o+1));this.addTargetDescriptor(c,t,d)}let r=Rt[e];if(!r){const o=`_${e}`;Rt[e]=r={get(){var c;return(c=this[o])!==null&&c!==void 0?c:this[o]=this[t].childNodes[s]}}}n[e]=r}createView(t){const e=this.fragment.cloneNode(!0),s=Object.create(this.proto);s.r=e,s.h=t??je;for(const n of this.nodeIds)s[n];return new F(e,this.factories,s)}}function ae(i,t,e,s,n,r=!1){const o=e.attributes,c=i.directives;for(let d=0,l=o.length;d<l;++d){const a=o[d],h=a.value,u=et.parse(h,c);let g=null;u===null?r&&(g=new E(ut(()=>h,i.policy)),T.assignAspect(g,a.name)):g=gt.aggregate(u,i.policy),g!==null&&(e.removeAttributeNode(a),d--,l--,i.addFactory(g,t,s,n,e.tagName))}}function De(i,t,e,s,n){const r=et.parse(t.textContent,i.directives);if(r===null)return C.node=t.nextSibling,C.index=n+1,C;let o,c=o=t;for(let d=0,l=r.length;d<l;++d){const a=r[d];d!==0&&(n++,s=re(e,n),o=c.parentNode.insertBefore(document.createTextNode(""),c.nextSibling)),N(a)?o.textContent=a:(o.textContent=" ",T.assignAspect(a),i.addFactory(a,e,s,n,null)),c=o}return C.index=n+1,C.node=c.nextSibling,C}function oe(i,t,e){let s=0,n=t.firstChild;for(;n;){const r=He(i,e,n,s);n=r.node,s=r.index}}function He(i,t,e,s){const n=re(t,s);switch(e.nodeType){case 1:ae(i,t,e,n,s),oe(i,e,n);break;case 3:return De(i,e,t,n,s);case 8:const r=et.parse(e.data,i.directives);r!==null&&i.addFactory(gt.aggregate(r),t,n,s,null);break}return C.index=s+1,C.node=e.nextSibling,C}function Pe(i,t){return i&&i.nodeType==8&&et.parse(i.data,t)!==null}const It="TEMPLATE",gt={compile(i,t,e=k.policy){let s;if(N(i)){s=document.createElement(It),s.innerHTML=e.createHTML(i);const o=s.content.firstElementChild;o!==null&&o.tagName===It&&(s=o)}else s=i;!s.content.firstChild&&!s.content.lastChild&&s.content.appendChild(document.createComment(""));const n=document.adoptNode(s.content),r=new Fe(n,t,e);return ae(r,"",s,"h",0,!0),(Pe(n.firstChild,t)||n.childNodes.length===1&&Object.keys(t).length>0)&&n.insertBefore(document.createComment(""),n.firstChild),oe(r,n,"r"),C.node=null,r.freeze()},setDefaultStrategy(i){this.compile=i},aggregate(i,t=k.policy){if(i.length===1)return i[0];let e,s=!1,n;const r=i.length,o=i.map(l=>N(l)?()=>l:(e=l.sourceAspect||e,s=s||l.dataBinding.isVolatile,n=n||l.dataBinding.policy,l.dataBinding.evaluate)),c=(l,a)=>{let h="";for(let u=0;u<r;++u)h+=o[u](l,a);return h},d=new E(ht(c,n??t,s));return T.assignAspect(d,e),d}},ze=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,Ue=Object.create(null);class j{constructor(t,e=Ue){this.html=t,this.factories=e}createHTML(t){const e=this.factories;for(const s in e)t(e[s]);return this.html}}j.empty=new j("");T.define(j);function We(i,t,e,s=T.getForInstance(i)){if(s.aspected){const n=ze.exec(t);n!==null&&T.assignAspect(i,n[2])}return i.createHTML(e)}class it{constructor(t,e={},s){this.policy=s,this.result=null,this.html=t,this.factories=e}compile(){return this.result===null&&(this.result=gt.compile(this.html,this.factories,this.policy)),this.result}create(t){return this.compile().createView(t)}inline(){return new j(N(this.html)?this.html:this.html.innerHTML,this.factories)}withPolicy(t){if(this.result)throw v.error(1208);if(this.policy)throw v.error(1207);return this.policy=t,this}render(t,e,s){const n=this.create(s);return n.bind(t),n.appendTo(e),n}static create(t,e,s){let n="";const r=Object.create(null),o=c=>{var d;const l=(d=c.id)!==null&&d!==void 0?d:c.id=V();return r[l]=c,l};for(let c=0,d=t.length-1;c<d;++c){const l=t[c];let a=e[c],h;if(n+=l,M(a))a=new E(ht(a));else if(a instanceof tt)a=new E(a);else if(!(h=T.getForInstance(a))){const u=a;a=new E(ut(()=>u))}n+=We(a,l,o,h)}return new it(n+t[t.length-1],r,s)}}O(it);const yt=(i,...t)=>{if(Array.isArray(i)&&Array.isArray(i.raw))return it.create(i,t);throw v.error(1206)};yt.partial=i=>new j(i);const Lt="boolean",Vt="reflect",le=Object.freeze({locate:Jt()}),qe={toView(i){return i?"true":"false"},fromView(i){return!(i==null||i==="false"||i===!1||i===0)}};function jt(i){if(i==null)return null;const t=i*1;return isNaN(t)?null:t}const Qe={toView(i){const t=jt(i);return t&&t.toString()},fromView:jt};class J{constructor(t,e,s=e.toLowerCase(),n=Vt,r){this.guards=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===Lt&&r===void 0&&(this.converter=qe)}setValue(t,e){const s=t[this.fieldName],n=this.converter;n!==void 0&&(e=n.fromView(e)),s!==e&&(t[this.fieldName]=e,this.tryReflectToAttribute(t),this.hasCallback&&t[this.callbackName](s,e),t.$fastController.notify(this.name))}getValue(t){return b.track(t,this.name),t[this.fieldName]}onAttributeChangedCallback(t,e){this.guards.has(t)||(this.guards.add(t),this.setValue(t,e),this.guards.delete(t))}tryReflectToAttribute(t){const e=this.mode,s=this.guards;s.has(t)||e==="fromView"||dt.enqueue(()=>{s.add(t);const n=t[this.fieldName];switch(e){case Vt:const r=this.converter;k.setAttribute(t,this.attribute,r!==void 0?r.toView(n):n);break;case Lt:k.setBooleanAttribute(t,this.attribute,n);break}s.delete(t)})}static collect(t,...e){const s=[];e.push(le.locate(t));for(let n=0,r=e.length;n<r;++n){const o=e[n];if(o!==void 0)for(let c=0,d=o.length;c<d;++c){const l=o[c];N(l)?s.push(new J(t,l)):s.push(new J(t,l.property,l.attribute,l.mode,l.converter))}}return s}}function ce(i,t){let e;function s(n,r){arguments.length>1&&(e.property=r),le.locate(n.constructor).push(e)}if(arguments.length>1){e={},s(i,t);return}return e=i===void 0?{}:i,s}var Ge=function(i,t,e,s){function n(r){return r instanceof e?r:new e(function(o){o(r)})}return new(e||(e=Promise))(function(r,o){function c(a){try{l(s.next(a))}catch(h){o(h)}}function d(a){try{l(s.throw(a))}catch(h){o(h)}}function l(a){a.done?r(a.value):n(a.value).then(c,d)}l((s=s.apply(i,t||[])).next())})};const Ft={mode:"open"},Dt={},rt=new Set,_=v.getById(x.elementRegistry,()=>Gt()),Je={deferAndHydrate:"defer-and-hydrate"};class p{constructor(t,e=t.definition){var s;this.platformDefined=!1,N(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;const n=t.prototype,r=J.collect(t,e.attributes),o=new Array(r.length),c={},d={};for(let l=0,a=r.length;l<a;++l){const h=r[l];o[l]=h.attribute,c[h.name]=h,d[h.attribute]=h,b.defineProperty(n,h)}Reflect.defineProperty(t,"observedAttributes",{value:o,enumerable:!0}),this.attributes=r,this.propertyLookup=c,this.attributeLookup=d,this.shadowOptions=e.shadowOptions===void 0?Ft:e.shadowOptions===null?void 0:Object.assign(Object.assign({},Ft),e.shadowOptions),this.elementOptions=e.elementOptions===void 0?Dt:Object.assign(Object.assign({},Dt),e.elementOptions),this.styles=m.normalize(e.styles),_.register(this),b.defineProperty(p.isRegistered,this.name),p.isRegistered[this.name]=this.type}get isDefined(){return this.platformDefined}define(t=this.registry){var e,s;const n=this.type;return t.get(this.name)||(this.platformDefined=!0,t.define(this.name,n,this.elementOptions),(s=(e=this.lifecycleCallbacks)===null||e===void 0?void 0:e.elementDidDefine)===null||s===void 0||s.call(e,this.name)),this}static compose(t,e){return rt.has(t)||_.getByType(t)?new p(class extends t{},e):new p(t,e)}static registerBaseType(t){rt.add(t)}static composeAsync(t,e){return new Promise(s=>{(rt.has(t)||_.getByType(t))&&s(new p(class extends t{},e));const n=new p(t,e);b.getNotifier(n).subscribe({handleChange:()=>{var r,o;(o=(r=n.lifecycleCallbacks)===null||r===void 0?void 0:r.templateDidUpdate)===null||o===void 0||o.call(r,n.name),s(n)}},"template")})}}p.isRegistered={};p.getByType=_.getByType;p.getForInstance=_.getForInstance;p.registerAsync=i=>Ge(void 0,void 0,void 0,function*(){return new Promise(t=>{p.isRegistered[i]&&t(p.isRegistered[i]),b.getNotifier(p.isRegistered).subscribe({handleChange:()=>t(p.isRegistered[i])},i)})});b.defineProperty(p.prototype,"template");class Ke extends MutationObserver{constructor(t){function e(s){this.callback.call(null,s.filter(n=>this.observedNodes.has(n.target)))}super(e),this.callback=t,this.observedNodes=new Set}observe(t,e){this.observedNodes.add(t),super.observe(t,e)}unobserve(t){this.observedNodes.delete(t),this.observedNodes.size<1&&this.disconnect()}}const Xe=Object.freeze({create(i){const t=[],e={};let s=null,n=!1;return{source:i,context:A.default,targets:e,get isBound(){return n},addBehaviorFactory(r,o){var c,d,l,a;const h=r;h.id=(c=h.id)!==null&&c!==void 0?c:V(),h.targetNodeId=(d=h.targetNodeId)!==null&&d!==void 0?d:V(),h.targetTagName=(l=o.tagName)!==null&&l!==void 0?l:null,h.policy=(a=h.policy)!==null&&a!==void 0?a:k.policy,this.addTarget(h.targetNodeId,o),this.addBehavior(h.createBehavior())},addTarget(r,o){e[r]=o},addBehavior(r){t.push(r),n&&r.bind(this)},onUnbind(r){s===null&&(s=[]),s.push(r)},connectedCallback(r){n||(n=!0,t.forEach(o=>o.bind(this)))},disconnectedCallback(r){n&&(n=!1,s!==null&&s.forEach(o=>o.unbind(this)))}}}}),Ye={bubbles:!0,composed:!0,cancelable:!0},W="isConnected",de=new WeakMap;function I(i){var t,e;return(e=(t=i.shadowRoot)!==null&&t!==void 0?t:de.get(i))!==null&&e!==void 0?e:null}let Ht;class S extends Kt{constructor(t,e){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;const s=b.getAccessors(t);if(s.length>0){const n=this.boundObservables=Object.create(null);for(let r=0,o=s.length;r<o;++r){const c=s[r].name,d=t[c];d!==void 0&&(delete t[c],n[c]=d)}}}get isConnected(){return b.track(this,W),this.stage===1}get context(){var t,e;return(e=(t=this.view)===null||t===void 0?void 0:t.context)!==null&&e!==void 0?e:A.default}get isBound(){var t,e;return(e=(t=this.view)===null||t===void 0?void 0:t.isBound)!==null&&e!==void 0?e:!1}get sourceLifetime(){var t;return(t=this.view)===null||t===void 0?void 0:t.sourceLifetime}get template(){var t;if(this._template===null){const e=this.definition;this.source.resolveTemplate?this._template=this.source.resolveTemplate():e.template&&(this._template=(t=e.template)!==null&&t!==void 0?t:null)}return this._template}set template(t){this._template!==t&&(this._template=t,this.needsInitialization||this.renderTemplate(t))}get shadowOptions(){return this._shadowRootOptions}set shadowOptions(t){if(this._shadowRootOptions===void 0&&t!==void 0){this._shadowRootOptions=t;let e=this.source.shadowRoot;e?this.hasExistingShadowRoot=!0:(e=this.source.attachShadow(t),t.mode==="closed"&&de.set(this.source,e))}}get mainStyles(){var t;if(this._mainStyles===null){const e=this.definition;this.source.resolveStyles?this._mainStyles=this.source.resolveStyles():e.styles&&(this._mainStyles=(t=e.styles)!==null&&t!==void 0?t:null)}return this._mainStyles}set mainStyles(t){this._mainStyles!==t&&(this._mainStyles!==null&&this.removeStyles(this._mainStyles),this._mainStyles=t,this.needsInitialization||this.addStyles(t))}onUnbind(t){var e;(e=this.view)===null||e===void 0||e.onUnbind(t)}addBehavior(t){var e,s;const n=(e=this.behaviors)!==null&&e!==void 0?e:this.behaviors=new Map,r=(s=n.get(t))!==null&&s!==void 0?s:0;r===0?(n.set(t,1),t.addedCallback&&t.addedCallback(this),t.connectedCallback&&!this.guardBehaviorConnection&&(this.stage===1||this.stage===0)&&t.connectedCallback(this)):n.set(t,r+1)}removeBehavior(t,e=!1){const s=this.behaviors;if(s===null)return;const n=s.get(t);n!==void 0&&(n===1||e?(s.delete(t),t.disconnectedCallback&&this.stage!==3&&t.disconnectedCallback(this),t.removedCallback&&t.removedCallback(this)):s.set(t,n-1))}addStyles(t){var e;if(!t)return;const s=this.source;if(t instanceof HTMLElement)((e=I(s))!==null&&e!==void 0?e:this.source).append(t);else if(!t.isAttachedTo(s)){const n=t.behaviors;if(t.addStylesTo(s),n!==null)for(let r=0,o=n.length;r<o;++r)this.addBehavior(n[r])}}removeStyles(t){var e;if(!t)return;const s=this.source;if(t instanceof HTMLElement)((e=I(s))!==null&&e!==void 0?e:s).removeChild(t);else if(t.isAttachedTo(s)){const n=t.behaviors;if(t.removeStylesFrom(s),n!==null)for(let r=0,o=n.length;r<o;++r)this.removeBehavior(n[r])}}connect(){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,b.notify(this,W))}bindObservables(){if(this.boundObservables!==null){const t=this.source,e=this.boundObservables,s=Object.keys(e);for(let n=0,r=s.length;n<r;++n){const o=s[n];t[o]=e[o]}this.boundObservables=null}}connectBehaviors(){if(this.behaviorsConnected===!1){const t=this.behaviors;if(t!==null){this.guardBehaviorConnection=!0;for(const e of t.keys())e.connectedCallback&&e.connectedCallback(this);this.guardBehaviorConnection=!1}this.behaviorsConnected=!0}}disconnectBehaviors(){if(this.behaviorsConnected===!0){const t=this.behaviors;if(t!==null)for(const e of t.keys())e.disconnectedCallback&&e.disconnectedCallback(this);this.behaviorsConnected=!1}}disconnect(){this.stage===1&&(this.stage=2,b.notify(this,W),this.view!==null&&this.view.unbind(),this.disconnectBehaviors(),this.stage=3)}onAttributeChangedCallback(t,e,s){const n=this.definition.attributeLookup[t];n!==void 0&&n.onAttributeChangedCallback(this.source,s)}emit(t,e,s){return this.stage===1?this.source.dispatchEvent(new CustomEvent(t,Object.assign(Object.assign({detail:e},Ye),s))):!1}renderTemplate(t){var e;const s=this.source,n=(e=I(s))!==null&&e!==void 0?e:s;if(this.view!==null)this.view.dispose(),this.view=null;else if(!this.needsInitialization||this.hasExistingShadowRoot){this.hasExistingShadowRoot=!1;for(let r=n.firstChild;r!==null;r=n.firstChild)n.removeChild(r)}t&&(this.view=t.render(s,n,s),this.view.sourceLifetime=Z.coupled)}static forCustomElement(t,e=!1){const s=t.$fastController;if(s!==void 0&&!e)return s;const n=p.getForInstance(t);if(n===void 0)throw v.error(1401);return b.getNotifier(n).subscribe({handleChange:()=>{S.forCustomElement(t,!0),t.$fastController.connect()}},"template"),b.getNotifier(n).subscribe({handleChange:()=>{S.forCustomElement(t,!0),t.$fastController.connect()}},"shadowOptions"),t.$fastController=new Ht(t,n)}static setStrategy(t){Ht=t}}O(S);S.setStrategy(S);function K(i){var t;return"adoptedStyleSheets"in i?i:(t=I(i))!==null&&t!==void 0?t:i.getRootNode()}class st{constructor(t){const e=st.styleSheetCache;this.sheets=t.map(s=>{if(s instanceof CSSStyleSheet)return s;let n=e.get(s);return n===void 0&&(n=new CSSStyleSheet,n.replaceSync(s),e.set(s,n)),n})}addStylesTo(t){he(K(t),this.sheets)}removeStylesFrom(t){ue(K(t),this.sheets)}}st.styleSheetCache=new Map;let Ze=0;const ti=()=>`fast-${++Ze}`;function Pt(i){return i===document?document.body:i}class ei{constructor(t){this.styles=t,this.styleClass=ti()}addStylesTo(t){t=Pt(K(t));const e=this.styles,s=this.styleClass;for(let n=0;n<e.length;n++){const r=document.createElement("style");r.innerHTML=e[n],r.className=s,t.append(r)}}removeStylesFrom(t){t=Pt(K(t));const e=t.querySelectorAll(`.${this.styleClass}`);for(let s=0,n=e.length;s<n;++s)t.removeChild(e[s])}}let he=(i,t)=>{i.adoptedStyleSheets=[...i.adoptedStyleSheets,...t]},ue=(i,t)=>{i.adoptedStyleSheets=i.adoptedStyleSheets.filter(e=>t.indexOf(e)===-1)};if(m.supportsAdoptedStyleSheets){try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),he=(i,t)=>{i.adoptedStyleSheets.push(...t)},ue=(i,t)=>{for(const e of t){const s=i.adoptedStyleSheets.indexOf(e);s!==-1&&i.adoptedStyleSheets.splice(s,1)}}}catch{}m.setDefaultStrategy(st)}else m.setDefaultStrategy(ei);const D="defer-hydration",at="needs-hydration";class f extends S{get shadowOptions(){return super.shadowOptions}set shadowOptions(t){super.shadowOptions=t,(this.hasExistingShadowRoot||t!==void 0&&!this.template)&&this.definition.templateOptions===Je.deferAndHydrate&&(this.source.toggleAttribute(D,!0),this.source.toggleAttribute(at,!0))}addHydratingInstance(){if(!f.hydratingInstances)return;const t=this.definition.name;let e=f.hydratingInstances.get(t);e||(e=new Set,f.hydratingInstances.set(t,e)),e.add(this.source)}static config(t){return f.lifecycleCallbacks=t,this}static hydrationObserverHandler(t){for(const e of t)e.target.hasAttribute(D)||(f.hydrationObserver.unobserve(e.target),e.target.$fastController.connect())}static checkHydrationComplete(t){var e,s,n;if(t.didTimeout){f.idleCallbackId=requestIdleCallback(f.checkHydrationComplete,{timeout:50});return}((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))}connect(){var t,e,s,n,r;if(this.needsHydration=(t=this.needsHydration)!==null&&t!==void 0?t:this.source.hasAttribute(at),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(D)){this.addHydratingInstance(),f.hydrationObserver.observe(this.source,{attributeFilter:[D]});return}if(!this.needsHydration){super.connect(),this.removeHydratingInstance();return}if(this.stage===3){if(this.stage=0,this.bindObservables(),this.connectBehaviors(),this.template)if(L(this.template)){const o=this.source,c=(n=I(o))!==null&&n!==void 0?n:o;let d=c.firstChild,l=c.lastChild;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)}else this.renderTemplate(this.template);this.addStyles(this.mainStyles),this.stage=1,this.source.removeAttribute(at),this.needsInitialization=this.needsHydration=!1,this.removeHydratingInstance(),b.notify(this,W)}}removeHydratingInstance(){var t,e;if(!f.hydratingInstances)return;const s=this.definition.name,n=f.hydratingInstances.get(s);(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}))}disconnect(){super.disconnect(),f.hydrationObserver.unobserve(this.source)}static install(){S.setStrategy(f)}}f.hydrationObserver=new Ke(f.hydrationObserverHandler);f.idleCallbackId=null;f.hydratingInstances=new Map;function fe(i){const t=class extends i{constructor(){super(),S.forCustomElement(this)}$emit(e,s,n){return this.$fastController.emit(e,s,n)}connectedCallback(){this.$fastController.connect()}disconnectedCallback(){this.$fastController.disconnect()}attributeChangedCallback(e,s,n){this.$fastController.onAttributeChangedCallback(e,s,n)}};return p.registerBaseType(t),t}function ii(i,t){return M(i)?p.compose(i,t):p.compose(this,i)}function si(i,t){return M(i)?new Promise(e=>{p.composeAsync(i,t).then(s=>{e(s)})}).then(e=>e.define().type):new Promise(e=>{p.composeAsync(this,i).then(s=>{e(s)})}).then(e=>e.define().type)}function ni(i,t){return M(i)?p.compose(i,t).define().type:p.compose(this,i).define().type}function ri(i){return fe(i)}const ai=Object.assign(fe(HTMLElement),{from:ri,define:ni,compose:ii,defineAsync:si});function oi(i,t){return i instanceof Function?i(t):i}const zt=new Set,ot=new Map,li=i=>(t="vwc")=>{const e=n=>`${t}-${n}`,s=n=>{const r=e(n.name);let o=n.type;if(o.componentName=n.name,zt.has(r))return;ot.has(o)&&ot.get(o)!==r&&(o=class extends o{}),zt.add(r),ot.set(o,r);for(const a of n.dependencies)s(a);const c=new Map([[n.type,r],...n.dependencies.map(a=>[a.type,e(a.name)])]),l={tagFor:(a,h)=>{if(!c.has(a))throw new Error(`Could not get tag for ${a.name} as it is not a dependency of ${n.name}.`);const u=c.get(a);return h?u:yt.partial(u)},tagForNonDependency(a){return e(a)}};p.compose(o,{...n.options,template:oi(n.template,l),name:`${t}-${n.name}`}).define()};s(i)},ci=(i,t,e,s,n)=>({name:i,type:t,template:e,dependencies:s,options:n}),Ut=new WeakMap,pe=i=>{let t=Ut.get(i);return t||(t=[],Ut.set(i,t)),t},di=(i,t)=>{pe(i).push(t)},hi=(i,t)=>{pe(i).forEach(e=>e(i,t))},ui=i=>i==="delegate",Wt=i=>`vvd${i.charAt(0).toUpperCase()}${i.slice(1)}`,be=(i,t)=>{if(ui(i._vividAriaBehaviour)){const e=i[t];i[`_${t}`]=null,i.removeAttribute(Y(t)),i[`_${t}`]=e,i[t]!==null?i.dataset[Wt(t)]=i[t]:delete i.dataset[Wt(t)]}else k.setAttribute(i,Y(t),i[t])},X=new WeakMap,fi=(i,t)=>{const e=X.get(i);e?e.add(t):X.set(i,new Set([t]))},pi=(i,t)=>{i.isConnected?be(i,t):fi(i,t)},bi=i=>{const t=X.get(i);if(t){for(const e of t)be(i,e);X.delete(i)}},ct=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColIndexText","ariaColSpan","ariaCurrent","ariaDescription","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowIndexText","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText","ariaRelevant"],Y=i=>i.replace("aria","aria-").toLowerCase(),gi=i=>{class t extends i{constructor(...s){super(...s),this._vividAriaBehaviour="default";for(const n of ct)this[`_${n}`]=null}connectedCallback(){super.connectedCallback(),bi(this)}}for(const e of ct)ce({attribute:Y(e),mode:"fromView"})(t.prototype,e),t.prototype[`${e}Changed`]=function(){pi(this,e),this._vividAriaBehaviour!=="default"&&hi(this,e)};return t};function yi(){const i=new WeakMap;return t=>(i.has(t)||i.set(t,[]),i.get(t))}const ge=yi(),vi=i=>(t,e)=>{ge(t.constructor).push({newPropertyName:e,...i})},mi=i=>{class t extends i{#t(s){let n=!1,r=!1;const o=a=>r&&s.fromDeprecated(a[s.deprecatedPropertyName])===a[s.newPropertyName],c=a=>n&&s.toDeprecated&&s.toDeprecated(a[s.newPropertyName])===a[s.deprecatedPropertyName],d={handleChange(a,h){if(h===s.newPropertyName){if(n=!0,!s.toDeprecated||o(a))return;a[s.deprecatedPropertyName]=s.toDeprecated(a[s.newPropertyName])}if(h===s.deprecatedPropertyName){if(r=!0,c(a))return;a[s.newPropertyName]=s.fromDeprecated(a[s.deprecatedPropertyName])}}},l=b.getNotifier(this);l.subscribe(d,s.newPropertyName),l.subscribe(d,s.deprecatedPropertyName)}constructor(...s){super(...s);for(const n of ge(this.constructor))this.#t(n)}}return t};class wi extends gi(mi(ai)){static{this.VIVID_VERSION="5.12.0"}connectedCallback(){super.connectedCallback();const t=this.constructor.componentName;this.setAttribute("data-vvd-component",t)}}exports.Binding=tt;exports.DOM=k;exports.ElementStyles=m;exports.ExecutionContext=A;exports.HTMLDirective=T;exports.HTMLView=F;exports.HydrationMarkup=w;exports.HydrationStage=B;exports.Markup=pt;exports.Observable=b;exports.StatelessAttachedAttributeDirective=Zt;exports.SubscriberSet=q;exports.Updates=dt;exports.ViewBehaviorOrchestrator=Xe;exports.VividElement=wi;exports.ariaAttributeName=Y;exports.ariaMixinProperties=ct;exports.attr=ce;exports.commonjsGlobal=P;exports.createRegisterFunction=li;exports.defineVividComponent=ci;exports.emptyArray=me;exports.getAugmentedNamespace=ve;exports.getDefaultExportFromCjs=ye;exports.html=yt;exports.isFunction=M;exports.isHydratable=L;exports.isString=N;exports.noop=qt;exports.nullableNumberConverter=Qe;exports.observable=Ce;exports.oneTime=ut;exports.oneWay=ht;exports.replaces=vi;exports.subscribeToAriaPropertyChanges=di;exports.volatile=ke;
|
|
5
|
+
`),d,ie(this.firstChild,this.lastChild).cloneContents(),l)}}}else{this.source!==null&&this.evaluateUnbindables(),this.isBound=!1,this.source=t,this.context=e;for(let r=0,o=n.length;r<o;++r)n[r].bind(this)}this.isBound=!0,this._hydrationStage=B.hydrated}unbind(){!this.isBound||this.source===null||(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}dispose(){lt(this.firstChild,this.lastChild),this.unbind()}onUnbind(t){this.unbindables.push(t)}evaluateUnbindables(){const t=this.unbindables;for(let e=0,s=t.length;e<s;++e)t[e].unbind(this);t.length=0}}se=Q;O(Re);function _e(i){return i.create!==void 0}function Ie(i,t,e,s){if(e==null&&(e=""),_e(e)){i.textContent="";let n=i.$fastView;if(n===void 0)if(L(s)&&L(e)&&s.bindingViewBoundaries[this.targetNodeId]!==void 0&&s.hydrationStage!==B.hydrated){const r=s.bindingViewBoundaries[this.targetNodeId];n=e.hydrate(r.first,r.last)}else n=e.create();else i.$fastTemplate!==e&&(n.isComposed&&(n.remove(),n.unbind()),n=e.create());n.isComposed?n.needsBindOnly&&(n.needsBindOnly=!1,n.bind(s.source,s.context)):(n.isComposed=!0,n.bind(s.source,s.context),n.insertBefore(i),i.$fastView=n,i.$fastTemplate=e)}else{const n=i.$fastView;n!==void 0&&n.isComposed&&(n.isComposed=!1,n.remove(),n.needsBindOnly?n.needsBindOnly=!1:n.unbind()),i.textContent=e}}function Le(i,t,e){var s;const n=`${this.id}-t`,r=(s=i[n])!==null&&s!==void 0?s:i[n]={v:0,cv:Object.create(null)},o=r.cv;let c=r.v;const d=i[t];if(e!=null&&e.length){const l=e.split(/\s+/);for(let a=0,h=l.length;a<h;++a){const u=l[a];u!==""&&(o[u]=c,d.add(u))}}if(r.v=c+1,c!==0){c-=1;for(const l in o)o[l]===c&&d.remove(l)}}const Ve={[y.attribute]:k.setAttribute,[y.booleanAttribute]:k.setBooleanAttribute,[y.property]:(i,t,e)=>i[t]=e,[y.content]:Ie,[y.tokenList]:Le,[y.event]:()=>{}};class E{constructor(t){this.dataBinding=t,this.updateTarget=null,this.aspectType=y.content}createHTML(t){return pt.interpolation(t(this))}createBehavior(){var t;if(this.updateTarget===null){const e=Ve[this.aspectType],s=(t=this.dataBinding.policy)!==null&&t!==void 0?t:this.policy;if(!e)throw v.error(1205);this.data=`${this.id}-d`,this.updateTarget=s.protect(this.targetTagName,this.aspectType,this.targetAspect,e)}return this}bind(t){var e;const s=t.targets[this.targetNodeId],n=L(t)&&t.hydrationStage&&t.hydrationStage!==B.hydrated;switch(this.aspectType){case y.event:s[this.data]=t,s.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case y.content:t.onUnbind(this);default:const r=(e=s[this.data])!==null&&e!==void 0?e:s[this.data]=this.dataBinding.createObserver(this,this);if(r.target=s,r.controller=t,n&&(this.aspectType===y.attribute||this.aspectType===y.booleanAttribute)){r.bind(t);break}this.updateTarget(s,this.targetAspect,r.bind(t),t);break}}unbind(t){const s=t.targets[this.targetNodeId].$fastView;s!==void 0&&s.isComposed&&(s.unbind(),s.needsBindOnly=!0)}handleEvent(t){const e=t.currentTarget[this.data];if(e.isBound){A.setEvent(t);const s=this.dataBinding.evaluate(e.source,e.context);A.setEvent(null),s!==!0&&t.preventDefault()}}handleChange(t,e){const s=e.target,n=e.controller;this.updateTarget(s,this.targetAspect,e.bind(n),n)}}T.define(E,{aspected:!0});const re=(i,t)=>`${i}.${t}`,Rt={},C={index:0,node:null};function _t(i){i.startsWith("fast-")||v.warn(1204,{name:i})}const je=new Proxy(document.createElement("div"),{get(i,t){_t(t);const e=Reflect.get(i,t);return M(e)?e.bind(i):e},set(i,t,e){return _t(t),Reflect.set(i,t,e)}});class Fe{constructor(t,e,s){this.fragment=t,this.directives=e,this.policy=s,this.proto=null,this.nodeIds=new Set,this.descriptors={},this.factories=[]}addFactory(t,e,s,n,r){var o,c;this.nodeIds.has(s)||(this.nodeIds.add(s),this.addTargetDescriptor(e,s,n)),t.id=(o=t.id)!==null&&o!==void 0?o:V(),t.targetNodeId=s,t.targetTagName=r,t.policy=(c=t.policy)!==null&&c!==void 0?c:this.policy,this.factories.push(t)}freeze(){return this.proto=Object.create(null,this.descriptors),this}addTargetDescriptor(t,e,s){const n=this.descriptors;if(e==="r"||e==="h"||n[e])return;if(!n[t]){const o=t.lastIndexOf("."),c=t.substring(0,o),d=parseInt(t.substring(o+1));this.addTargetDescriptor(c,t,d)}let r=Rt[e];if(!r){const o=`_${e}`;Rt[e]=r={get(){var c;return(c=this[o])!==null&&c!==void 0?c:this[o]=this[t].childNodes[s]}}}n[e]=r}createView(t){const e=this.fragment.cloneNode(!0),s=Object.create(this.proto);s.r=e,s.h=t??je;for(const n of this.nodeIds)s[n];return new F(e,this.factories,s)}}function ae(i,t,e,s,n,r=!1){const o=e.attributes,c=i.directives;for(let d=0,l=o.length;d<l;++d){const a=o[d],h=a.value,u=et.parse(h,c);let g=null;u===null?r&&(g=new E(ut(()=>h,i.policy)),T.assignAspect(g,a.name)):g=gt.aggregate(u,i.policy),g!==null&&(e.removeAttributeNode(a),d--,l--,i.addFactory(g,t,s,n,e.tagName))}}function De(i,t,e,s,n){const r=et.parse(t.textContent,i.directives);if(r===null)return C.node=t.nextSibling,C.index=n+1,C;let o,c=o=t;for(let d=0,l=r.length;d<l;++d){const a=r[d];d!==0&&(n++,s=re(e,n),o=c.parentNode.insertBefore(document.createTextNode(""),c.nextSibling)),N(a)?o.textContent=a:(o.textContent=" ",T.assignAspect(a),i.addFactory(a,e,s,n,null)),c=o}return C.index=n+1,C.node=c.nextSibling,C}function oe(i,t,e){let s=0,n=t.firstChild;for(;n;){const r=He(i,e,n,s);n=r.node,s=r.index}}function He(i,t,e,s){const n=re(t,s);switch(e.nodeType){case 1:ae(i,t,e,n,s),oe(i,e,n);break;case 3:return De(i,e,t,n,s);case 8:const r=et.parse(e.data,i.directives);r!==null&&i.addFactory(gt.aggregate(r),t,n,s,null);break}return C.index=s+1,C.node=e.nextSibling,C}function Pe(i,t){return i&&i.nodeType==8&&et.parse(i.data,t)!==null}const It="TEMPLATE",gt={compile(i,t,e=k.policy){let s;if(N(i)){s=document.createElement(It),s.innerHTML=e.createHTML(i);const o=s.content.firstElementChild;o!==null&&o.tagName===It&&(s=o)}else s=i;!s.content.firstChild&&!s.content.lastChild&&s.content.appendChild(document.createComment(""));const n=document.adoptNode(s.content),r=new Fe(n,t,e);return ae(r,"",s,"h",0,!0),(Pe(n.firstChild,t)||n.childNodes.length===1&&Object.keys(t).length>0)&&n.insertBefore(document.createComment(""),n.firstChild),oe(r,n,"r"),C.node=null,r.freeze()},setDefaultStrategy(i){this.compile=i},aggregate(i,t=k.policy){if(i.length===1)return i[0];let e,s=!1,n;const r=i.length,o=i.map(l=>N(l)?()=>l:(e=l.sourceAspect||e,s=s||l.dataBinding.isVolatile,n=n||l.dataBinding.policy,l.dataBinding.evaluate)),c=(l,a)=>{let h="";for(let u=0;u<r;++u)h+=o[u](l,a);return h},d=new E(ht(c,n??t,s));return T.assignAspect(d,e),d}},ze=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,Ue=Object.create(null);class j{constructor(t,e=Ue){this.html=t,this.factories=e}createHTML(t){const e=this.factories;for(const s in e)t(e[s]);return this.html}}j.empty=new j("");T.define(j);function We(i,t,e,s=T.getForInstance(i)){if(s.aspected){const n=ze.exec(t);n!==null&&T.assignAspect(i,n[2])}return i.createHTML(e)}class it{constructor(t,e={},s){this.policy=s,this.result=null,this.html=t,this.factories=e}compile(){return this.result===null&&(this.result=gt.compile(this.html,this.factories,this.policy)),this.result}create(t){return this.compile().createView(t)}inline(){return new j(N(this.html)?this.html:this.html.innerHTML,this.factories)}withPolicy(t){if(this.result)throw v.error(1208);if(this.policy)throw v.error(1207);return this.policy=t,this}render(t,e,s){const n=this.create(s);return n.bind(t),n.appendTo(e),n}static create(t,e,s){let n="";const r=Object.create(null),o=c=>{var d;const l=(d=c.id)!==null&&d!==void 0?d:c.id=V();return r[l]=c,l};for(let c=0,d=t.length-1;c<d;++c){const l=t[c];let a=e[c],h;if(n+=l,M(a))a=new E(ht(a));else if(a instanceof tt)a=new E(a);else if(!(h=T.getForInstance(a))){const u=a;a=new E(ut(()=>u))}n+=We(a,l,o,h)}return new it(n+t[t.length-1],r,s)}}O(it);const yt=(i,...t)=>{if(Array.isArray(i)&&Array.isArray(i.raw))return it.create(i,t);throw v.error(1206)};yt.partial=i=>new j(i);const Lt="boolean",Vt="reflect",le=Object.freeze({locate:Jt()}),qe={toView(i){return i?"true":"false"},fromView(i){return!(i==null||i==="false"||i===!1||i===0)}};function jt(i){if(i==null)return null;const t=i*1;return isNaN(t)?null:t}const Qe={toView(i){const t=jt(i);return t&&t.toString()},fromView:jt};class J{constructor(t,e,s=e.toLowerCase(),n=Vt,r){this.guards=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===Lt&&r===void 0&&(this.converter=qe)}setValue(t,e){const s=t[this.fieldName],n=this.converter;n!==void 0&&(e=n.fromView(e)),s!==e&&(t[this.fieldName]=e,this.tryReflectToAttribute(t),this.hasCallback&&t[this.callbackName](s,e),t.$fastController.notify(this.name))}getValue(t){return b.track(t,this.name),t[this.fieldName]}onAttributeChangedCallback(t,e){this.guards.has(t)||(this.guards.add(t),this.setValue(t,e),this.guards.delete(t))}tryReflectToAttribute(t){const e=this.mode,s=this.guards;s.has(t)||e==="fromView"||dt.enqueue(()=>{s.add(t);const n=t[this.fieldName];switch(e){case Vt:const r=this.converter;k.setAttribute(t,this.attribute,r!==void 0?r.toView(n):n);break;case Lt:k.setBooleanAttribute(t,this.attribute,n);break}s.delete(t)})}static collect(t,...e){const s=[];e.push(le.locate(t));for(let n=0,r=e.length;n<r;++n){const o=e[n];if(o!==void 0)for(let c=0,d=o.length;c<d;++c){const l=o[c];N(l)?s.push(new J(t,l)):s.push(new J(t,l.property,l.attribute,l.mode,l.converter))}}return s}}function ce(i,t){let e;function s(n,r){arguments.length>1&&(e.property=r),le.locate(n.constructor).push(e)}if(arguments.length>1){e={},s(i,t);return}return e=i===void 0?{}:i,s}var Ge=function(i,t,e,s){function n(r){return r instanceof e?r:new e(function(o){o(r)})}return new(e||(e=Promise))(function(r,o){function c(a){try{l(s.next(a))}catch(h){o(h)}}function d(a){try{l(s.throw(a))}catch(h){o(h)}}function l(a){a.done?r(a.value):n(a.value).then(c,d)}l((s=s.apply(i,t||[])).next())})};const Ft={mode:"open"},Dt={},rt=new Set,_=v.getById(x.elementRegistry,()=>Gt()),Je={deferAndHydrate:"defer-and-hydrate"};class p{constructor(t,e=t.definition){var s;this.platformDefined=!1,N(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;const n=t.prototype,r=J.collect(t,e.attributes),o=new Array(r.length),c={},d={};for(let l=0,a=r.length;l<a;++l){const h=r[l];o[l]=h.attribute,c[h.name]=h,d[h.attribute]=h,b.defineProperty(n,h)}Reflect.defineProperty(t,"observedAttributes",{value:o,enumerable:!0}),this.attributes=r,this.propertyLookup=c,this.attributeLookup=d,this.shadowOptions=e.shadowOptions===void 0?Ft:e.shadowOptions===null?void 0:Object.assign(Object.assign({},Ft),e.shadowOptions),this.elementOptions=e.elementOptions===void 0?Dt:Object.assign(Object.assign({},Dt),e.elementOptions),this.styles=m.normalize(e.styles),_.register(this),b.defineProperty(p.isRegistered,this.name),p.isRegistered[this.name]=this.type}get isDefined(){return this.platformDefined}define(t=this.registry){var e,s;const n=this.type;return t.get(this.name)||(this.platformDefined=!0,t.define(this.name,n,this.elementOptions),(s=(e=this.lifecycleCallbacks)===null||e===void 0?void 0:e.elementDidDefine)===null||s===void 0||s.call(e,this.name)),this}static compose(t,e){return rt.has(t)||_.getByType(t)?new p(class extends t{},e):new p(t,e)}static registerBaseType(t){rt.add(t)}static composeAsync(t,e){return new Promise(s=>{(rt.has(t)||_.getByType(t))&&s(new p(class extends t{},e));const n=new p(t,e);b.getNotifier(n).subscribe({handleChange:()=>{var r,o;(o=(r=n.lifecycleCallbacks)===null||r===void 0?void 0:r.templateDidUpdate)===null||o===void 0||o.call(r,n.name),s(n)}},"template")})}}p.isRegistered={};p.getByType=_.getByType;p.getForInstance=_.getForInstance;p.registerAsync=i=>Ge(void 0,void 0,void 0,function*(){return new Promise(t=>{p.isRegistered[i]&&t(p.isRegistered[i]),b.getNotifier(p.isRegistered).subscribe({handleChange:()=>t(p.isRegistered[i])},i)})});b.defineProperty(p.prototype,"template");class Ke extends MutationObserver{constructor(t){function e(s){this.callback.call(null,s.filter(n=>this.observedNodes.has(n.target)))}super(e),this.callback=t,this.observedNodes=new Set}observe(t,e){this.observedNodes.add(t),super.observe(t,e)}unobserve(t){this.observedNodes.delete(t),this.observedNodes.size<1&&this.disconnect()}}const Xe=Object.freeze({create(i){const t=[],e={};let s=null,n=!1;return{source:i,context:A.default,targets:e,get isBound(){return n},addBehaviorFactory(r,o){var c,d,l,a;const h=r;h.id=(c=h.id)!==null&&c!==void 0?c:V(),h.targetNodeId=(d=h.targetNodeId)!==null&&d!==void 0?d:V(),h.targetTagName=(l=o.tagName)!==null&&l!==void 0?l:null,h.policy=(a=h.policy)!==null&&a!==void 0?a:k.policy,this.addTarget(h.targetNodeId,o),this.addBehavior(h.createBehavior())},addTarget(r,o){e[r]=o},addBehavior(r){t.push(r),n&&r.bind(this)},onUnbind(r){s===null&&(s=[]),s.push(r)},connectedCallback(r){n||(n=!0,t.forEach(o=>o.bind(this)))},disconnectedCallback(r){n&&(n=!1,s!==null&&s.forEach(o=>o.unbind(this)))}}}}),Ye={bubbles:!0,composed:!0,cancelable:!0},W="isConnected",de=new WeakMap;function I(i){var t,e;return(e=(t=i.shadowRoot)!==null&&t!==void 0?t:de.get(i))!==null&&e!==void 0?e:null}let Ht;class S extends Kt{constructor(t,e){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;const s=b.getAccessors(t);if(s.length>0){const n=this.boundObservables=Object.create(null);for(let r=0,o=s.length;r<o;++r){const c=s[r].name,d=t[c];d!==void 0&&(delete t[c],n[c]=d)}}}get isConnected(){return b.track(this,W),this.stage===1}get context(){var t,e;return(e=(t=this.view)===null||t===void 0?void 0:t.context)!==null&&e!==void 0?e:A.default}get isBound(){var t,e;return(e=(t=this.view)===null||t===void 0?void 0:t.isBound)!==null&&e!==void 0?e:!1}get sourceLifetime(){var t;return(t=this.view)===null||t===void 0?void 0:t.sourceLifetime}get template(){var t;if(this._template===null){const e=this.definition;this.source.resolveTemplate?this._template=this.source.resolveTemplate():e.template&&(this._template=(t=e.template)!==null&&t!==void 0?t:null)}return this._template}set template(t){this._template!==t&&(this._template=t,this.needsInitialization||this.renderTemplate(t))}get shadowOptions(){return this._shadowRootOptions}set shadowOptions(t){if(this._shadowRootOptions===void 0&&t!==void 0){this._shadowRootOptions=t;let e=this.source.shadowRoot;e?this.hasExistingShadowRoot=!0:(e=this.source.attachShadow(t),t.mode==="closed"&&de.set(this.source,e))}}get mainStyles(){var t;if(this._mainStyles===null){const e=this.definition;this.source.resolveStyles?this._mainStyles=this.source.resolveStyles():e.styles&&(this._mainStyles=(t=e.styles)!==null&&t!==void 0?t:null)}return this._mainStyles}set mainStyles(t){this._mainStyles!==t&&(this._mainStyles!==null&&this.removeStyles(this._mainStyles),this._mainStyles=t,this.needsInitialization||this.addStyles(t))}onUnbind(t){var e;(e=this.view)===null||e===void 0||e.onUnbind(t)}addBehavior(t){var e,s;const n=(e=this.behaviors)!==null&&e!==void 0?e:this.behaviors=new Map,r=(s=n.get(t))!==null&&s!==void 0?s:0;r===0?(n.set(t,1),t.addedCallback&&t.addedCallback(this),t.connectedCallback&&!this.guardBehaviorConnection&&(this.stage===1||this.stage===0)&&t.connectedCallback(this)):n.set(t,r+1)}removeBehavior(t,e=!1){const s=this.behaviors;if(s===null)return;const n=s.get(t);n!==void 0&&(n===1||e?(s.delete(t),t.disconnectedCallback&&this.stage!==3&&t.disconnectedCallback(this),t.removedCallback&&t.removedCallback(this)):s.set(t,n-1))}addStyles(t){var e;if(!t)return;const s=this.source;if(t instanceof HTMLElement)((e=I(s))!==null&&e!==void 0?e:this.source).append(t);else if(!t.isAttachedTo(s)){const n=t.behaviors;if(t.addStylesTo(s),n!==null)for(let r=0,o=n.length;r<o;++r)this.addBehavior(n[r])}}removeStyles(t){var e;if(!t)return;const s=this.source;if(t instanceof HTMLElement)((e=I(s))!==null&&e!==void 0?e:s).removeChild(t);else if(t.isAttachedTo(s)){const n=t.behaviors;if(t.removeStylesFrom(s),n!==null)for(let r=0,o=n.length;r<o;++r)this.removeBehavior(n[r])}}connect(){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,b.notify(this,W))}bindObservables(){if(this.boundObservables!==null){const t=this.source,e=this.boundObservables,s=Object.keys(e);for(let n=0,r=s.length;n<r;++n){const o=s[n];t[o]=e[o]}this.boundObservables=null}}connectBehaviors(){if(this.behaviorsConnected===!1){const t=this.behaviors;if(t!==null){this.guardBehaviorConnection=!0;for(const e of t.keys())e.connectedCallback&&e.connectedCallback(this);this.guardBehaviorConnection=!1}this.behaviorsConnected=!0}}disconnectBehaviors(){if(this.behaviorsConnected===!0){const t=this.behaviors;if(t!==null)for(const e of t.keys())e.disconnectedCallback&&e.disconnectedCallback(this);this.behaviorsConnected=!1}}disconnect(){this.stage===1&&(this.stage=2,b.notify(this,W),this.view!==null&&this.view.unbind(),this.disconnectBehaviors(),this.stage=3)}onAttributeChangedCallback(t,e,s){const n=this.definition.attributeLookup[t];n!==void 0&&n.onAttributeChangedCallback(this.source,s)}emit(t,e,s){return this.stage===1?this.source.dispatchEvent(new CustomEvent(t,Object.assign(Object.assign({detail:e},Ye),s))):!1}renderTemplate(t){var e;const s=this.source,n=(e=I(s))!==null&&e!==void 0?e:s;if(this.view!==null)this.view.dispose(),this.view=null;else if(!this.needsInitialization||this.hasExistingShadowRoot){this.hasExistingShadowRoot=!1;for(let r=n.firstChild;r!==null;r=n.firstChild)n.removeChild(r)}t&&(this.view=t.render(s,n,s),this.view.sourceLifetime=Z.coupled)}static forCustomElement(t,e=!1){const s=t.$fastController;if(s!==void 0&&!e)return s;const n=p.getForInstance(t);if(n===void 0)throw v.error(1401);return b.getNotifier(n).subscribe({handleChange:()=>{S.forCustomElement(t,!0),t.$fastController.connect()}},"template"),b.getNotifier(n).subscribe({handleChange:()=>{S.forCustomElement(t,!0),t.$fastController.connect()}},"shadowOptions"),t.$fastController=new Ht(t,n)}static setStrategy(t){Ht=t}}O(S);S.setStrategy(S);function K(i){var t;return"adoptedStyleSheets"in i?i:(t=I(i))!==null&&t!==void 0?t:i.getRootNode()}class st{constructor(t){const e=st.styleSheetCache;this.sheets=t.map(s=>{if(s instanceof CSSStyleSheet)return s;let n=e.get(s);return n===void 0&&(n=new CSSStyleSheet,n.replaceSync(s),e.set(s,n)),n})}addStylesTo(t){he(K(t),this.sheets)}removeStylesFrom(t){ue(K(t),this.sheets)}}st.styleSheetCache=new Map;let Ze=0;const ti=()=>`fast-${++Ze}`;function Pt(i){return i===document?document.body:i}class ei{constructor(t){this.styles=t,this.styleClass=ti()}addStylesTo(t){t=Pt(K(t));const e=this.styles,s=this.styleClass;for(let n=0;n<e.length;n++){const r=document.createElement("style");r.innerHTML=e[n],r.className=s,t.append(r)}}removeStylesFrom(t){t=Pt(K(t));const e=t.querySelectorAll(`.${this.styleClass}`);for(let s=0,n=e.length;s<n;++s)t.removeChild(e[s])}}let he=(i,t)=>{i.adoptedStyleSheets=[...i.adoptedStyleSheets,...t]},ue=(i,t)=>{i.adoptedStyleSheets=i.adoptedStyleSheets.filter(e=>t.indexOf(e)===-1)};if(m.supportsAdoptedStyleSheets){try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),he=(i,t)=>{i.adoptedStyleSheets.push(...t)},ue=(i,t)=>{for(const e of t){const s=i.adoptedStyleSheets.indexOf(e);s!==-1&&i.adoptedStyleSheets.splice(s,1)}}}catch{}m.setDefaultStrategy(st)}else m.setDefaultStrategy(ei);const D="defer-hydration",at="needs-hydration";class f extends S{get shadowOptions(){return super.shadowOptions}set shadowOptions(t){super.shadowOptions=t,(this.hasExistingShadowRoot||t!==void 0&&!this.template)&&this.definition.templateOptions===Je.deferAndHydrate&&(this.source.toggleAttribute(D,!0),this.source.toggleAttribute(at,!0))}addHydratingInstance(){if(!f.hydratingInstances)return;const t=this.definition.name;let e=f.hydratingInstances.get(t);e||(e=new Set,f.hydratingInstances.set(t,e)),e.add(this.source)}static config(t){return f.lifecycleCallbacks=t,this}static hydrationObserverHandler(t){for(const e of t)e.target.hasAttribute(D)||(f.hydrationObserver.unobserve(e.target),e.target.$fastController.connect())}static checkHydrationComplete(t){var e,s,n;if(t.didTimeout){f.idleCallbackId=requestIdleCallback(f.checkHydrationComplete,{timeout:50});return}((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))}connect(){var t,e,s,n,r;if(this.needsHydration=(t=this.needsHydration)!==null&&t!==void 0?t:this.source.hasAttribute(at),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(D)){this.addHydratingInstance(),f.hydrationObserver.observe(this.source,{attributeFilter:[D]});return}if(!this.needsHydration){super.connect(),this.removeHydratingInstance();return}if(this.stage===3){if(this.stage=0,this.bindObservables(),this.connectBehaviors(),this.template)if(L(this.template)){const o=this.source,c=(n=I(o))!==null&&n!==void 0?n:o;let d=c.firstChild,l=c.lastChild;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)}else this.renderTemplate(this.template);this.addStyles(this.mainStyles),this.stage=1,this.source.removeAttribute(at),this.needsInitialization=this.needsHydration=!1,this.removeHydratingInstance(),b.notify(this,W)}}removeHydratingInstance(){var t,e;if(!f.hydratingInstances)return;const s=this.definition.name,n=f.hydratingInstances.get(s);(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}))}disconnect(){super.disconnect(),f.hydrationObserver.unobserve(this.source)}static install(){S.setStrategy(f)}}f.hydrationObserver=new Ke(f.hydrationObserverHandler);f.idleCallbackId=null;f.hydratingInstances=new Map;function fe(i){const t=class extends i{constructor(){super(),S.forCustomElement(this)}$emit(e,s,n){return this.$fastController.emit(e,s,n)}connectedCallback(){this.$fastController.connect()}disconnectedCallback(){this.$fastController.disconnect()}attributeChangedCallback(e,s,n){this.$fastController.onAttributeChangedCallback(e,s,n)}};return p.registerBaseType(t),t}function ii(i,t){return M(i)?p.compose(i,t):p.compose(this,i)}function si(i,t){return M(i)?new Promise(e=>{p.composeAsync(i,t).then(s=>{e(s)})}).then(e=>e.define().type):new Promise(e=>{p.composeAsync(this,i).then(s=>{e(s)})}).then(e=>e.define().type)}function ni(i,t){return M(i)?p.compose(i,t).define().type:p.compose(this,i).define().type}function ri(i){return fe(i)}const ai=Object.assign(fe(HTMLElement),{from:ri,define:ni,compose:ii,defineAsync:si});function oi(i,t){return i instanceof Function?i(t):i}const zt=new Set,ot=new Map,li=i=>(t="vwc")=>{const e=n=>`${t}-${n}`,s=n=>{const r=e(n.name);let o=n.type;if(o.componentName=n.name,zt.has(r))return;ot.has(o)&&ot.get(o)!==r&&(o=class extends o{}),zt.add(r),ot.set(o,r);for(const a of n.dependencies)s(a);const c=new Map([[n.type,r],...n.dependencies.map(a=>[a.type,e(a.name)])]),l={tagFor:(a,h)=>{if(!c.has(a))throw new Error(`Could not get tag for ${a.name} as it is not a dependency of ${n.name}.`);const u=c.get(a);return h?u:yt.partial(u)},tagForNonDependency(a){return e(a)}};p.compose(o,{...n.options,template:oi(n.template,l),name:`${t}-${n.name}`}).define()};s(i)},ci=(i,t,e,s,n)=>({name:i,type:t,template:e,dependencies:s,options:n}),Ut=new WeakMap,pe=i=>{let t=Ut.get(i);return t||(t=[],Ut.set(i,t)),t},di=(i,t)=>{pe(i).push(t)},hi=(i,t)=>{pe(i).forEach(e=>e(i,t))},ui=i=>i==="delegate",Wt=i=>`vvd${i.charAt(0).toUpperCase()}${i.slice(1)}`,be=(i,t)=>{if(ui(i._vividAriaBehaviour)){const e=i[t];i[`_${t}`]=null,i.removeAttribute(Y(t)),i[`_${t}`]=e,i[t]!==null?i.dataset[Wt(t)]=i[t]:delete i.dataset[Wt(t)]}else k.setAttribute(i,Y(t),i[t])},X=new WeakMap,fi=(i,t)=>{const e=X.get(i);e?e.add(t):X.set(i,new Set([t]))},pi=(i,t)=>{i.isConnected?be(i,t):fi(i,t)},bi=i=>{const t=X.get(i);if(t){for(const e of t)be(i,e);X.delete(i)}},ct=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColIndexText","ariaColSpan","ariaCurrent","ariaDescription","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowIndexText","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText","ariaRelevant"],Y=i=>i.replace("aria","aria-").toLowerCase(),gi=i=>{class t extends i{constructor(...s){super(...s),this._vividAriaBehaviour="default";for(const n of ct)this[`_${n}`]=null}connectedCallback(){super.connectedCallback(),bi(this)}}for(const e of ct)ce({attribute:Y(e),mode:"fromView"})(t.prototype,e),t.prototype[`${e}Changed`]=function(){pi(this,e),this._vividAriaBehaviour!=="default"&&hi(this,e)};return t};function yi(){const i=new WeakMap;return t=>(i.has(t)||i.set(t,[]),i.get(t))}const ge=yi(),vi=i=>(t,e)=>{ge(t.constructor).push({newPropertyName:e,...i})},mi=i=>{class t extends i{#t(s){let n=!1,r=!1;const o=a=>r&&s.fromDeprecated(a[s.deprecatedPropertyName])===a[s.newPropertyName],c=a=>n&&s.toDeprecated&&s.toDeprecated(a[s.newPropertyName])===a[s.deprecatedPropertyName],d={handleChange(a,h){if(h===s.newPropertyName){if(n=!0,!s.toDeprecated||o(a))return;a[s.deprecatedPropertyName]=s.toDeprecated(a[s.newPropertyName])}if(h===s.deprecatedPropertyName){if(r=!0,c(a))return;a[s.newPropertyName]=s.fromDeprecated(a[s.deprecatedPropertyName])}}},l=b.getNotifier(this);l.subscribe(d,s.newPropertyName),l.subscribe(d,s.deprecatedPropertyName)}constructor(...s){super(...s);for(const n of ge(this.constructor))this.#t(n)}}return t};class wi extends gi(mi(ai)){static{this.VIVID_VERSION="5.14.0"}connectedCallback(){super.connectedCallback();const t=this.constructor.componentName;this.setAttribute("data-vvd-component",t)}}exports.Binding=tt;exports.DOM=k;exports.ElementStyles=m;exports.ExecutionContext=A;exports.HTMLDirective=T;exports.HTMLView=F;exports.HydrationMarkup=w;exports.HydrationStage=B;exports.Markup=pt;exports.Observable=b;exports.StatelessAttachedAttributeDirective=Zt;exports.SubscriberSet=q;exports.Updates=dt;exports.ViewBehaviorOrchestrator=Xe;exports.VividElement=wi;exports.ariaAttributeName=Y;exports.ariaMixinProperties=ct;exports.attr=ce;exports.commonjsGlobal=P;exports.createRegisterFunction=li;exports.defineVividComponent=ci;exports.emptyArray=me;exports.getAugmentedNamespace=ve;exports.getDefaultExportFromCjs=ye;exports.html=yt;exports.isFunction=M;exports.isHydratable=L;exports.isString=N;exports.noop=qt;exports.nullableNumberConverter=Qe;exports.observable=Ce;exports.oneTime=ut;exports.oneWay=ht;exports.replaces=vi;exports.subscribeToAriaPropertyChanges=di;exports.volatile=ke;
|
package/bundled/vivid-element.js
CHANGED
|
@@ -2763,7 +2763,7 @@ const fe = oi(), mi = (i) => (t, e) => {
|
|
|
2763
2763
|
};
|
|
2764
2764
|
class wi extends ai(li(Ze)) {
|
|
2765
2765
|
static {
|
|
2766
|
-
this.VIVID_VERSION = "5.
|
|
2766
|
+
this.VIVID_VERSION = "5.14.0";
|
|
2767
2767
|
}
|
|
2768
2768
|
/**
|
|
2769
2769
|
* Add data-vvd-component attribute with component name globally,
|