From c05d5853eb10aa1da68bfd15309f039e66172e58 Mon Sep 17 00:00:00 2001 From: ScarletRedMan Date: Sun, 26 Nov 2023 21:00:02 +0700 Subject: [PATCH] Added AddUser component --- .../generated/jar-resources/Flow.d.ts | 75 + .../frontend/generated/jar-resources/Flow.js | 356 ++++ .../generated/jar-resources/Flow.js.map | 1 + .../jar-resources/FlowBootstrap.d.ts | 1 + .../generated/jar-resources/FlowBootstrap.js | 262 +++ .../generated/jar-resources/FlowClient.d.ts | 1 + .../generated/jar-resources/FlowClient.js | 1055 +++++++++++ .../jar-resources/buttonFunctions.js | 12 + .../jar-resources/comboBoxConnector.js | 284 +++ .../jar-resources/contextMenuConnector.js | 141 ++ .../contextMenuTargetConnector.js | 70 + .../jar-resources/datepickerConnector.js | 159 ++ .../jar-resources/dnd-polyfill-loader.js | 7 + .../generated/jar-resources/dndConnector.js | 112 ++ .../jar-resources/flow-component-directive.js | 67 + .../jar-resources/flow-component-renderer.js | 212 +++ .../generated/jar-resources/gridConnector.js | 1218 ++++++++++++ .../generated/jar-resources/index.d.ts | 1 + .../frontend/generated/jar-resources/index.js | 2 + .../generated/jar-resources/index.js.map | 1 + .../generated/jar-resources/lit-renderer.ts | 110 ++ .../jar-resources/menubarConnector.js | 111 ++ .../jar-resources/messageListConnector.js | 41 + .../jar-resources/selectConnector.js | 36 + .../generated/jar-resources/theme-util.js | 150 ++ .../generated/jar-resources/tooltip.ts | 11 + .../jar-resources/vaadin-big-decimal-field.js | 71 + .../vaadin-dev-tools/License.d.ts | 14 + .../assets/vaadin-accordion-eed3b794.js | 1 + .../vaadin-accordion-heading-c0acdd6d.js | 3 + .../assets/vaadin-accordion-panel-616e55d6.js | 3 + .../assets/vaadin-app-layout-e56de2e9.js | 1 + .../assets/vaadin-avatar-7599297d.js | 1 + .../vaadin-big-decimal-field-e51def24.js | 1 + .../assets/vaadin-board-828ebdea.js | 1 + .../assets/vaadin-board-row-c70d0c55.js | 3 + .../assets/vaadin-button-2511ad84.js | 1 + .../assets/vaadin-chart-5192dc15.js | 1 + .../assets/vaadin-checkbox-4e68df64.js | 1 + .../assets/vaadin-checkbox-group-a7c65bf2.js | 1 + .../assets/vaadin-combo-box-96451ddd.js | 1 + .../assets/vaadin-confirm-dialog-4d718829.js | 1 + .../assets/vaadin-cookie-consent-46c09f8b.js | 1 + .../assets/vaadin-crud-8d161a22.js | 1 + .../assets/vaadin-custom-field-42c85b9e.js | 1 + .../assets/vaadin-date-picker-f2001167.js | 1 + .../vaadin-date-time-picker-c8c047a7.js | 1 + .../assets/vaadin-details-bf336660.js | 1 + .../assets/vaadin-details-summary-351a1448.js | 1 + .../assets/vaadin-dialog-53253a08.js | 1 + .../assets/vaadin-email-field-d7a35f04.js | 1 + .../assets/vaadin-form-layout-47744b1d.js | 1 + .../assets/vaadin-grid-0a4791c2.js | 1 + .../assets/vaadin-grid-pro-ff415555.js | 1 + .../vaadin-horizontal-layout-3193943f.js | 1 + .../assets/vaadin-icon-601f36ed.js | 1 + .../assets/vaadin-integer-field-85078932.js | 1 + .../assets/vaadin-list-box-d7a8433b.js | 1 + .../assets/vaadin-login-form-638996c6.js | 1 + .../assets/vaadin-login-overlay-f8a5db8a.js | 1 + .../assets/vaadin-map-d40a0116.js | 1 + .../assets/vaadin-menu-bar-3f5ab096.js | 1 + .../assets/vaadin-message-input-996ac37c.js | 1 + .../assets/vaadin-message-list-70a435ba.js | 1 + .../vaadin-multi-select-combo-box-a3373557.js | 1 + .../assets/vaadin-notification-bd6eb776.js | 1 + .../assets/vaadin-number-field-cb3ee8b2.js | 1 + .../assets/vaadin-password-field-d289cb18.js | 1 + .../assets/vaadin-progress-bar-309ecf1f.js | 1 + .../assets/vaadin-radio-group-88b5afd8.js | 1 + .../vaadin-rich-text-editor-8cd892f2.js | 1 + .../assets/vaadin-scroller-35e68818.js | 1 + .../assets/vaadin-select-df6e9947.js | 1 + .../assets/vaadin-side-nav-ba80d91d.js | 1 + .../assets/vaadin-side-nav-item-34918f92.js | 3 + .../assets/vaadin-split-layout-80c92131.js | 1 + .../assets/vaadin-spreadsheet-59d8c5ef.js | 1 + .../assets/vaadin-tab-aaf32809.js | 2 + .../assets/vaadin-tabs-d9a5e24e.js | 1 + .../assets/vaadin-tabsheet-dd99ed9a.js | 1 + .../assets/vaadin-text-area-83627ebc.js | 1 + .../assets/vaadin-text-field-0b3db014.js | 1 + .../assets/vaadin-time-picker-715ec415.js | 1 + .../assets/vaadin-upload-d3c162ed.js | 1 + .../assets/vaadin-vertical-layout-ad4174c4.js | 1 + .../assets/vaadin-virtual-list-96896203.js | 1 + .../vaadin-dev-tools/component-picker.d.ts | 35 + .../vaadin-dev-tools/component-util.d.ts | 9 + .../vaadin-dev-tools/connection.d.ts | 30 + .../jar-resources/vaadin-dev-tools/shim.d.ts | 20 + .../vaadin-dev-tools/styles.d.ts | 1 + .../vaadin-dev-tools/theme-editor/api.d.ts | 55 + .../components/class-name-editor.d.ts | 16 + .../components/component-overlay-manager.d.ts | 27 + .../components/component-resolver.d.ts | 20 + .../editors/base-property-editor.d.ts | 49 + .../editors/checkbox-property-editor.d.ts | 7 + .../components/editors/color-picker.d.ts | 31 + .../editors/color-property-editor.d.ts | 15 + .../editors/range-property-editor.d.ts | 15 + .../editors/text-property-editor.d.ts | 6 + .../components/property-list.d.ts | 21 + .../components/scope-selector.d.ts | 18 + .../theme-editor/detector.d.ts | 5 + .../vaadin-dev-tools/theme-editor/editor.d.ts | 57 + .../theme-editor/history.d.ts | 23 + .../vaadin-dev-tools/theme-editor/icons.d.ts | 8 + .../metadata/components/defaults.d.ts | 102 + .../metadata/components/generic.d.ts | 2 + .../metadata/components/presets.d.ts | 8 + .../theme-editor/metadata/model.d.ts | 37 + .../theme-editor/metadata/registry.d.ts | 11 + .../vaadin-dev-tools/theme-editor/model.d.ts | 46 + .../theme-editor/preview.d.ts | 11 + .../vaadin-dev-tools/theme-editor/styles.d.ts | 3 + .../vaadin-dev-tools-info.d.ts | 9 + .../vaadin-dev-tools-log.d.ts | 8 + .../vaadin-dev-tools/vaadin-dev-tools.d.ts | 149 ++ .../vaadin-dev-tools/vaadin-dev-tools.js | 1676 +++++++++++++++++ .../vaadin-dev-tools.test.d.ts | 1 + .../vaadin-grid-flow-selection-column.js | 97 + .../jar-resources/vaadin-mobile-drag-drop.js | 63 + .../vaadin-time-picker/helpers.js | 183 ++ .../vaadin-time-picker/timepickerConnector.js | 178 ++ .../jar-resources/virtualListConnector.js | 150 ++ .../loadbalancer/web/component/AddUsers.java | 104 + 126 files changed, 7954 insertions(+) create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/Flow.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/Flow.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/Flow.js.map create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/FlowBootstrap.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/FlowBootstrap.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/FlowClient.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/FlowClient.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/buttonFunctions.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/comboBoxConnector.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/contextMenuConnector.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/contextMenuTargetConnector.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/datepickerConnector.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/dnd-polyfill-loader.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/dndConnector.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/flow-component-directive.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/flow-component-renderer.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/gridConnector.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/index.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/index.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/index.js.map create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/lit-renderer.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/menubarConnector.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/messageListConnector.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/selectConnector.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/theme-util.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/tooltip.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-big-decimal-field.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/License.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-eed3b794.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-heading-c0acdd6d.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-panel-616e55d6.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-app-layout-e56de2e9.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-avatar-7599297d.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-big-decimal-field-e51def24.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-board-828ebdea.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-board-row-c70d0c55.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-button-2511ad84.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-chart-5192dc15.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-checkbox-4e68df64.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-checkbox-group-a7c65bf2.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-combo-box-96451ddd.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-confirm-dialog-4d718829.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-cookie-consent-46c09f8b.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-crud-8d161a22.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-custom-field-42c85b9e.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-date-picker-f2001167.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-date-time-picker-c8c047a7.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-details-bf336660.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-details-summary-351a1448.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-dialog-53253a08.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-email-field-d7a35f04.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-form-layout-47744b1d.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-grid-0a4791c2.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-grid-pro-ff415555.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-horizontal-layout-3193943f.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-icon-601f36ed.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-integer-field-85078932.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-list-box-d7a8433b.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-login-form-638996c6.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-login-overlay-f8a5db8a.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-map-d40a0116.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-menu-bar-3f5ab096.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-message-input-996ac37c.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-message-list-70a435ba.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-multi-select-combo-box-a3373557.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-notification-bd6eb776.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-number-field-cb3ee8b2.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-password-field-d289cb18.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-progress-bar-309ecf1f.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-radio-group-88b5afd8.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-rich-text-editor-8cd892f2.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-scroller-35e68818.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-select-df6e9947.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-side-nav-ba80d91d.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-side-nav-item-34918f92.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-split-layout-80c92131.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-spreadsheet-59d8c5ef.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tab-aaf32809.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tabs-d9a5e24e.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tabsheet-dd99ed9a.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-text-area-83627ebc.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-text-field-0b3db014.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-time-picker-715ec415.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-upload-d3c162ed.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-vertical-layout-ad4174c4.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-virtual-list-96896203.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/component-picker.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/component-util.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/connection.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/shim.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/styles.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/api.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/class-name-editor.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/component-overlay-manager.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/component-resolver.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/base-property-editor.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/checkbox-property-editor.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/color-picker.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/color-property-editor.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/range-property-editor.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/text-property-editor.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/property-list.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/scope-selector.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/detector.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/editor.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/history.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/icons.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/defaults.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/generic.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/presets.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/model.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/registry.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/model.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/preview.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/styles.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools-info.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools-log.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.test.d.ts create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-mobile-drag-drop.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-time-picker/helpers.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js create mode 100644 LoadBalancerWeb/frontend/generated/jar-resources/virtualListConnector.js create mode 100644 LoadBalancerWeb/src/main/java/ru/dragonestia/loadbalancer/web/component/AddUsers.java diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/Flow.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/Flow.d.ts new file mode 100644 index 0000000..a6b01df --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/Flow.d.ts @@ -0,0 +1,75 @@ +export interface FlowConfig { + imports?: () => void; +} +interface AppConfig { + productionMode: boolean; + appId: string; + uidl: any; +} +interface AppInitResponse { + appConfig: AppConfig; + pushScript?: string; +} +interface Router { + render: (ctx: NavigationParameters, shouldUpdateHistory: boolean) => Promise; +} +interface HTMLRouterContainer extends HTMLElement { + onBeforeEnter?: (ctx: NavigationParameters, cmd: PreventAndRedirectCommands, router: Router) => void | Promise; + onBeforeLeave?: (ctx: NavigationParameters, cmd: PreventCommands, router: Router) => void | Promise; + serverConnected?: (cancel: boolean, url?: NavigationParameters) => void; + serverPaused?: () => void; +} +interface FlowRoute { + action: (params: NavigationParameters) => Promise; + path: string; +} +export interface NavigationParameters { + pathname: string; + search: string; +} +export interface PreventCommands { + prevent: () => any; +} +export interface PreventAndRedirectCommands extends PreventCommands { + redirect: (route: string) => any; +} +/** + * Client API for flow UI operations. + */ +export declare class Flow { + config: FlowConfig; + response?: AppInitResponse; + pathname: string; + container: HTMLRouterContainer; + private isActive; + private baseRegex; + private appShellTitle; + private navigation; + constructor(config?: FlowConfig); + /** + * Return a `route` object for vaadin-router in an one-element array. + * + * The `FlowRoute` object `path` property handles any route, + * and the `action` returns the flow container without updating the content, + * delaying the actual Flow server call to the `onBeforeEnter` phase. + * + * This is a specific API for its use with `vaadin-router`. + */ + get serverSideRoutes(): [FlowRoute]; + loadingStarted(): void; + loadingFinished(): void; + private get action(); + private flowLeave; + private flowNavigate; + private getFlowRoutePath; + private getFlowRouteQuery; + private flowInit; + private loadScript; + private injectAppIdScript; + private flowInitClient; + private flowInitUi; + private addConnectionIndicator; + private offlineStubAction; + private isFlowClientLoaded; +} +export {}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/Flow.js b/LoadBalancerWeb/frontend/generated/jar-resources/Flow.js new file mode 100644 index 0000000..999afb2 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/Flow.js @@ -0,0 +1,356 @@ +import { ConnectionIndicator, ConnectionState } from '@vaadin/common-frontend'; +class FlowUiInitializationError extends Error { +} +// flow uses body for keeping references +const flowRoot = window.document.body; +const $wnd = window; +/** + * Client API for flow UI operations. + */ +export class Flow { + constructor(config) { + this.response = undefined; + this.pathname = ''; + // flag used to inform Testbench whether a server route is in progress + this.isActive = false; + this.baseRegex = /^\//; + this.navigation = ''; + flowRoot.$ = flowRoot.$ || []; + this.config = config || {}; + // TB checks for the existence of window.Vaadin.Flow in order + // to consider that TB needs to wait for `initFlow()`. + $wnd.Vaadin = $wnd.Vaadin || {}; + $wnd.Vaadin.Flow = $wnd.Vaadin.Flow || {}; + $wnd.Vaadin.Flow.clients = { + TypeScript: { + isActive: () => this.isActive + } + }; + // Regular expression used to remove the app-context + const elm = document.head.querySelector('base'); + this.baseRegex = new RegExp(`^${ + // IE11 does not support document.baseURI + (document.baseURI || (elm && elm.href) || '/').replace(/^https?:\/\/[^/]+/i, '')}`); + this.appShellTitle = document.title; + // Put a vaadin-connection-indicator in the dom + this.addConnectionIndicator(); + } + /** + * Return a `route` object for vaadin-router in an one-element array. + * + * The `FlowRoute` object `path` property handles any route, + * and the `action` returns the flow container without updating the content, + * delaying the actual Flow server call to the `onBeforeEnter` phase. + * + * This is a specific API for its use with `vaadin-router`. + */ + get serverSideRoutes() { + return [ + { + path: '(.*)', + action: this.action + } + ]; + } + loadingStarted() { + // Make Testbench know that server request is in progress + this.isActive = true; + $wnd.Vaadin.connectionState.loadingStarted(); + } + loadingFinished() { + // Make Testbench know that server request has finished + this.isActive = false; + $wnd.Vaadin.connectionState.loadingFinished(); + if ($wnd.Vaadin.listener) { + // Listeners registered, do not register again. + return; + } + $wnd.Vaadin.listener = {}; + // Listen for click on router-links -> 'link' navigation trigger + // and on nodes -> 'client' navigation trigger. + // Use capture phase to detect prevented / stopped events. + document.addEventListener('click', (_e) => { + if (_e.target) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + if (_e.target.hasAttribute('router-link')) { + this.navigation = 'link'; + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + } + else if (_e.composedPath().some((node) => node.nodeName === 'A')) { + this.navigation = 'client'; + } + } + }, { + capture: true + }); + } + get action() { + // Return a function which is bound to the flow instance, thus we can use + // the syntax `...serverSideRoutes` in vaadin-router. + return async (params) => { + // Store last action pathname so as we can check it in events + this.pathname = params.pathname; + if ($wnd.Vaadin.connectionState.online) { + try { + await this.flowInit(); + } + catch (error) { + if (error instanceof FlowUiInitializationError) { + // error initializing Flow: assume connection lost + $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST; + return this.offlineStubAction(); + } + else { + throw error; + } + } + } + else { + // insert an offline stub + return this.offlineStubAction(); + } + // When an action happens, navigation will be resolved `onBeforeEnter` + this.container.onBeforeEnter = (ctx, cmd) => this.flowNavigate(ctx, cmd); + // For covering the 'server -> client' use case + this.container.onBeforeLeave = (ctx, cmd) => this.flowLeave(ctx, cmd); + return this.container; + }; + } + // Send a remote call to `JavaScriptBootstrapUI` to check + // whether navigation has to be cancelled. + async flowLeave(ctx, cmd) { + // server -> server, viewing offline stub, or browser is offline + const { connectionState } = $wnd.Vaadin; + if (this.pathname === ctx.pathname || !this.isFlowClientLoaded() || connectionState.offline) { + return Promise.resolve({}); + } + // 'server -> client' + return new Promise((resolve) => { + this.loadingStarted(); + // The callback to run from server side to cancel navigation + this.container.serverConnected = (cancel) => { + resolve(cmd && cancel ? cmd.prevent() : {}); + this.loadingFinished(); + }; + // Call server side to check whether we can leave the view + flowRoot.$server.leaveNavigation(this.getFlowRoutePath(ctx), this.getFlowRouteQuery(ctx)); + }); + } + // Send the remote call to `JavaScriptBootstrapUI` to render the flow + // route specified by the context + async flowNavigate(ctx, cmd) { + if (this.response) { + return new Promise((resolve) => { + this.loadingStarted(); + // The callback to run from server side once the view is ready + this.container.serverConnected = (cancel, redirectContext) => { + if (cmd && cancel) { + resolve(cmd.prevent()); + } + else if (cmd && cmd.redirect && redirectContext) { + resolve(cmd.redirect(redirectContext.pathname)); + } + else { + this.container.style.display = ''; + resolve(this.container); + } + this.loadingFinished(); + }; + this.container.serverPaused = () => { + this.loadingFinished(); + }; + // Call server side to navigate to the given route + flowRoot.$server.connectClient(this.getFlowRoutePath(ctx), this.getFlowRouteQuery(ctx), this.appShellTitle, history.state, this.navigation); + // Default to history navigation trigger. + // Link and client cases are handled by click listener in loadingFinished(). + this.navigation = 'history'; + }); + } + else { + // No server response => offline or erroneous connection + return Promise.resolve(this.container); + } + } + getFlowRoutePath(context) { + return decodeURIComponent(context.pathname).replace(this.baseRegex, ''); + } + getFlowRouteQuery(context) { + return (context.search && context.search.substring(1)) || ''; + } + // import flow client modules and initialize UI in server side. + async flowInit() { + // Do not start flow twice + if (!this.isFlowClientLoaded()) { + // show flow progress indicator + this.loadingStarted(); + // Initialize server side UI + this.response = await this.flowInitUi(); + const { pushScript, appConfig } = this.response; + if (typeof pushScript === 'string') { + await this.loadScript(pushScript); + } + const { appId } = appConfig; + // Load bootstrap script with server side parameters + const bootstrapMod = await import('./FlowBootstrap'); + await bootstrapMod.init(this.response); + // Load custom modules defined by user + if (typeof this.config.imports === 'function') { + this.injectAppIdScript(appId); + await this.config.imports(); + } + // we use a custom tag for the flow app container + const tag = `flow-container-${appId.toLowerCase()}`; + const serverCreatedContainer = document.querySelector(tag); + if (serverCreatedContainer) { + this.container = serverCreatedContainer; + } + else { + this.container = document.createElement(tag); + this.container.id = appId; + } + flowRoot.$[appId] = this.container; + // Load flow-client module + const clientMod = await import('./FlowClient'); + await this.flowInitClient(clientMod); + // hide flow progress indicator + this.loadingFinished(); + } + // It might be that components created from server expect that their content has been rendered. + // Appending eagerly the container we avoid these kind of errors. + // Note that the client router will move this container to the outlet if the navigation succeed + if (this.container && !this.container.isConnected) { + this.container.style.display = 'none'; + document.body.appendChild(this.container); + } + return this.response; + } + async loadScript(url) { + return new Promise((resolve, reject) => { + const script = document.createElement('script'); + script.onload = () => resolve(); + script.onerror = reject; + script.src = url; + document.body.appendChild(script); + }); + } + injectAppIdScript(appId) { + const appIdWithoutHashCode = appId.substring(0, appId.lastIndexOf('-')); + const scriptAppId = document.createElement('script'); + scriptAppId.type = 'module'; + scriptAppId.setAttribute('data-app-id', appIdWithoutHashCode); + document.body.append(scriptAppId); + } + // After the flow-client javascript module has been loaded, this initializes flow UI + // in the browser. + async flowInitClient(clientMod) { + clientMod.init(); + // client init is async, we need to loop until initialized + return new Promise((resolve) => { + const intervalId = setInterval(() => { + // client `isActive() == true` while initializing or processing + const initializing = Object.keys($wnd.Vaadin.Flow.clients) + .filter((key) => key !== 'TypeScript') + .reduce((prev, id) => prev || $wnd.Vaadin.Flow.clients[id].isActive(), false); + if (!initializing) { + clearInterval(intervalId); + resolve(); + } + }, 5); + }); + } + // Returns the `appConfig` object + async flowInitUi() { + // appConfig was sent in the index.html request + const initial = $wnd.Vaadin && $wnd.Vaadin.TypeScript && $wnd.Vaadin.TypeScript.initial; + if (initial) { + $wnd.Vaadin.TypeScript.initial = undefined; + return Promise.resolve(initial); + } + // send a request to the `JavaScriptBootstrapHandler` + return new Promise((resolve, reject) => { + const xhr = new XMLHttpRequest(); + const httpRequest = xhr; + const requestPath = `?v-r=init&location=${encodeURIComponent(this.getFlowRoutePath(location))}&query=${encodeURIComponent(this.getFlowRouteQuery(location))}`; + httpRequest.open('GET', requestPath); + httpRequest.onerror = () => reject(new FlowUiInitializationError(`Invalid server response when initializing Flow UI. + ${httpRequest.status} + ${httpRequest.responseText}`)); + httpRequest.onload = () => { + const contentType = httpRequest.getResponseHeader('content-type'); + if (contentType && contentType.indexOf('application/json') !== -1) { + resolve(JSON.parse(httpRequest.responseText)); + } + else { + httpRequest.onerror(); + } + }; + httpRequest.send(); + }); + } + // Create shared connection state store and connection indicator + addConnectionIndicator() { + // add connection indicator to DOM + ConnectionIndicator.create(); + // Listen to browser online/offline events and update the loading indicator accordingly. + // Note: if flow-client is loaded, it instead handles the state transitions. + $wnd.addEventListener('online', () => { + if (!this.isFlowClientLoaded()) { + // Send an HTTP HEAD request for sw.js to verify server reachability. + // We do not expect sw.js to be cached, so the request goes to the + // server rather than being served from local cache. + // Require network-level failure to revert the state to CONNECTION_LOST + // (HTTP error code is ok since it still verifies server's presence). + $wnd.Vaadin.connectionState.state = ConnectionState.RECONNECTING; + const http = new XMLHttpRequest(); + http.open('HEAD', 'sw.js'); + http.onload = () => { + $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTED; + }; + http.onerror = () => { + $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST; + }; + // Postpone request to reduce potential net::ERR_INTERNET_DISCONNECTED + // errors that sometimes occurs even if browser says it is online + setTimeout(() => http.send(), 50); + } + }); + $wnd.addEventListener('offline', () => { + if (!this.isFlowClientLoaded()) { + $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST; + } + }); + } + async offlineStubAction() { + const offlineStub = document.createElement('iframe'); + const offlineStubPath = './offline-stub.html'; + offlineStub.setAttribute('src', offlineStubPath); + offlineStub.setAttribute('style', 'width: 100%; height: 100%; border: 0'); + this.response = undefined; + let onlineListener; + const removeOfflineStubAndOnlineListener = () => { + if (onlineListener !== undefined) { + $wnd.Vaadin.connectionState.removeStateChangeListener(onlineListener); + onlineListener = undefined; + } + }; + offlineStub.onBeforeEnter = (ctx, _cmds, router) => { + onlineListener = () => { + if ($wnd.Vaadin.connectionState.online) { + removeOfflineStubAndOnlineListener(); + router.render(ctx, false); + } + }; + $wnd.Vaadin.connectionState.addStateChangeListener(onlineListener); + }; + offlineStub.onBeforeLeave = (_ctx, _cmds, _router) => { + removeOfflineStubAndOnlineListener(); + }; + return offlineStub; + } + isFlowClientLoaded() { + return this.response !== undefined; + } +} +//# sourceMappingURL=Flow.js.map \ No newline at end of file diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/Flow.js.map b/LoadBalancerWeb/frontend/generated/jar-resources/Flow.js.map new file mode 100644 index 0000000..beea948 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/Flow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Flow.js","sourceRoot":"","sources":["../../../../src/main/frontend/Flow.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,eAAe,EAGhB,MAAM,yBAAyB,CAAC;AAMjC,MAAM,yBAA0B,SAAQ,KAAK;CAAG;AA+ChD,wCAAwC;AACxC,MAAM,QAAQ,GAAa,MAAM,CAAC,QAAQ,CAAC,IAAW,CAAC;AACvD,MAAM,IAAI,GAAG,MAOE,CAAC;AAEhB;;GAEG;AACH,MAAM,OAAO,IAAI;IAef,YAAY,MAAmB;QAb/B,aAAQ,GAAqB,SAAS,CAAC;QACvC,aAAQ,GAAG,EAAE,CAAC;QAId,sEAAsE;QAC9D,aAAQ,GAAG,KAAK,CAAC;QAEjB,cAAS,GAAG,KAAK,CAAC;QAGlB,eAAU,GAAW,EAAE,CAAC;QAG9B,QAAQ,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,EAAE,CAAC;QAE3B,6DAA6D;QAC7D,sDAAsD;QACtD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;QAChC,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;QAC1C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,GAAG;YACzB,UAAU,EAAE;gBACV,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ;aAC9B;SACF,CAAC;QAEF,oDAAoD;QACpD,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAChD,IAAI,CAAC,SAAS,GAAG,IAAI,MAAM,CACzB,IAAI;QACF,yCAAyC;QACzC,CAAC,QAAQ,CAAC,OAAO,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CACjF,EAAE,CACH,CAAC;QACF,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC;QACpC,+CAA+C;QAC/C,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAChC,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,gBAAgB;QAClB,OAAO;YACL;gBACE,IAAI,EAAE,MAAM;gBACZ,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB;SACF,CAAC;IACJ,CAAC;IAED,cAAc;QACZ,yDAAyD;QACzD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,cAAc,EAAE,CAAC;IAC/C,CAAC;IAED,eAAe;QACb,uDAAuD;QACvD,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,eAAe,EAAE,CAAC;QAE9C,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;YACxB,+CAA+C;YAC/C,OAAO;SACR;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAC;QAC1B,gEAAgE;QAChE,mDAAmD;QACnD,0DAA0D;QAC1D,QAAQ,CAAC,gBAAgB,CACvB,OAAO,EACP,CAAC,EAAE,EAAE,EAAE;YACL,IAAI,EAAE,CAAC,MAAM,EAAE;gBACb,6DAA6D;gBAC7D,aAAa;gBACb,IAAI,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE;oBACzC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;oBACzB,6DAA6D;oBAC7D,aAAa;iBACd;qBAAM,IAAI,EAAE,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,GAAG,CAAC,EAAE;oBAClE,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;iBAC5B;aACF;QACH,CAAC,EACD;YACE,OAAO,EAAE,IAAI;SACd,CACF,CAAC;IACJ,CAAC;IAED,IAAY,MAAM;QAChB,yEAAyE;QACzE,qDAAqD;QACrD,OAAO,KAAK,EAAE,MAA4B,EAAE,EAAE;YAC5C,6DAA6D;YAC7D,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;YAEhC,IAAI,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE;gBACtC,IAAI;oBACF,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;iBACvB;gBAAC,OAAO,KAAK,EAAE;oBACd,IAAI,KAAK,YAAY,yBAAyB,EAAE;wBAC9C,kDAAkD;wBAClD,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,eAAe,CAAC;wBACpE,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;qBACjC;yBAAM;wBACL,MAAM,KAAK,CAAC;qBACb;iBACF;aACF;iBAAM;gBACL,yBAAyB;gBACzB,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;aACjC;YAED,sEAAsE;YACtE,IAAI,CAAC,SAAS,CAAC,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YACzE,+CAA+C;YAC/C,IAAI,CAAC,SAAS,CAAC,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YACtE,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC;IAED,yDAAyD;IACzD,0CAA0C;IAClC,KAAK,CAAC,SAAS,CAAC,GAAyB,EAAE,GAAqB;QACtE,gEAAgE;QAChE,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;QACxC,IAAI,IAAI,CAAC,QAAQ,KAAK,GAAG,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,eAAe,CAAC,OAAO,EAAE;YAC3F,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;SAC5B;QACD,qBAAqB;QACrB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,4DAA4D;YAC5D,IAAI,CAAC,SAAS,CAAC,eAAe,GAAG,CAAC,MAAM,EAAE,EAAE;gBAC1C,OAAO,CAAC,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;gBAC5C,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,CAAC,CAAC;YAEF,0DAA0D;YAC1D,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC;QAC5F,CAAC,CAAC,CAAC;IACL,CAAC;IAED,qEAAqE;IACrE,iCAAiC;IACzB,KAAK,CAAC,YAAY,CAAC,GAAyB,EAAE,GAAgC;QACpF,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC7B,IAAI,CAAC,cAAc,EAAE,CAAC;gBACtB,8DAA8D;gBAC9D,IAAI,CAAC,SAAS,CAAC,eAAe,GAAG,CAAC,MAAM,EAAE,eAAsC,EAAE,EAAE;oBAClF,IAAI,GAAG,IAAI,MAAM,EAAE;wBACjB,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;qBACxB;yBAAM,IAAI,GAAG,IAAI,GAAG,CAAC,QAAQ,IAAI,eAAe,EAAE;wBACjD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;qBACjD;yBAAM;wBACL,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;wBAClC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;qBACzB;oBACD,IAAI,CAAC,eAAe,EAAE,CAAC;gBACzB,CAAC,CAAC;gBAEF,IAAI,CAAC,SAAS,CAAC,YAAY,GAAG,GAAG,EAAE;oBACjC,IAAI,CAAC,eAAe,EAAE,CAAC;gBACzB,CAAC,CAAC;gBAEF,kDAAkD;gBAClD,QAAQ,CAAC,OAAO,CAAC,aAAa,CAC5B,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAC1B,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAC3B,IAAI,CAAC,aAAa,EAClB,OAAO,CAAC,KAAK,EACb,IAAI,CAAC,UAAU,CAChB,CAAC;gBACF,yCAAyC;gBACzC,4EAA4E;gBAC5E,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;YAC9B,CAAC,CAAC,CAAC;SACJ;aAAM;YACL,wDAAwD;YACxD,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACxC;IACH,CAAC;IAEO,gBAAgB,CAAC,OAAwC;QAC/D,OAAO,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAC1E,CAAC;IACO,iBAAiB,CAAC,OAAwC;QAChE,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/D,CAAC;IAED,+DAA+D;IACvD,KAAK,CAAC,QAAQ;QACpB,0BAA0B;QAC1B,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE;YAC9B,+BAA+B;YAC/B,IAAI,CAAC,cAAc,EAAE,CAAC;YAEtB,4BAA4B;YAC5B,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;YAExC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC;YAEhD,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;gBAClC,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;aACnC;YACD,MAAM,EAAE,KAAK,EAAE,GAAG,SAAS,CAAC;YAE5B,oDAAoD;YACpD,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;YACrD,MAAM,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAEvC,sCAAsC;YACtC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,KAAK,UAAU,EAAE;gBAC7C,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;gBAC9B,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;aAC7B;YAED,iDAAiD;YACjD,MAAM,GAAG,GAAG,kBAAkB,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;YACpD,MAAM,sBAAsB,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;YAC3D,IAAI,sBAAsB,EAAE;gBAC1B,IAAI,CAAC,SAAS,GAAG,sBAAqC,CAAC;aACxD;iBAAM;gBACL,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;gBAC7C,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,KAAK,CAAC;aAC3B;YACD,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;YAEnC,0BAA0B;YAC1B,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;YAC/C,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;YAErC,+BAA+B;YAC/B,IAAI,CAAC,eAAe,EAAE,CAAC;SACxB;QAED,+FAA+F;QAC/F,iEAAiE;QACjE,+FAA+F;QAC/F,IAAI,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE;YACjD,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;YACtC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC3C;QACD,OAAO,IAAI,CAAC,QAAS,CAAC;IACxB,CAAC;IAEO,KAAK,CAAC,UAAU,CAAC,GAAW;QAClC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YAChD,MAAM,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;YAChC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC;YACxB,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;YACjB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,iBAAiB,CAAC,KAAa;QACrC,MAAM,oBAAoB,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QACxE,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACrD,WAAW,CAAC,IAAI,GAAG,QAAQ,CAAC;QAC5B,WAAW,CAAC,YAAY,CAAC,aAAa,EAAE,oBAAoB,CAAC,CAAC;QAC9D,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACpC,CAAC;IAED,oFAAoF;IACpF,kBAAkB;IACV,KAAK,CAAC,cAAc,CAAC,SAAc;QACzC,SAAS,CAAC,IAAI,EAAE,CAAC;QACjB,0DAA0D;QAC1D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;gBAClC,+DAA+D;gBAC/D,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;qBACvD,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,YAAY,CAAC;qBACrC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAAC;gBAChF,IAAI,CAAC,YAAY,EAAE;oBACjB,aAAa,CAAC,UAAU,CAAC,CAAC;oBAC1B,OAAO,EAAE,CAAC;iBACX;YACH,CAAC,EAAE,CAAC,CAAC,CAAC;QACR,CAAC,CAAC,CAAC;IACL,CAAC;IAED,iCAAiC;IACzB,KAAK,CAAC,UAAU;QACtB,+CAA+C;QAC/C,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC;QACxF,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC;YAC3C,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;SACjC;QAED,qDAAqD;QACrD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;YACjC,MAAM,WAAW,GAAG,GAAU,CAAC;YAC/B,MAAM,WAAW,GAAG,sBAAsB,kBAAkB,CAC1D,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAChC,UAAU,kBAAkB,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;YAElE,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;YAErC,WAAW,CAAC,OAAO,GAAG,GAAG,EAAE,CACzB,MAAM,CACJ,IAAI,yBAAyB,CAC3B;UACF,WAAW,CAAC,MAAM;UAClB,WAAW,CAAC,YAAY,EAAE,CACzB,CACF,CAAC;YAEJ,WAAW,CAAC,MAAM,GAAG,GAAG,EAAE;gBACxB,MAAM,WAAW,GAAG,WAAW,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;gBAClE,IAAI,WAAW,IAAI,WAAW,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,EAAE;oBACjE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;iBAC/C;qBAAM;oBACL,WAAW,CAAC,OAAO,EAAE,CAAC;iBACvB;YACH,CAAC,CAAC;YACF,WAAW,CAAC,IAAI,EAAE,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,gEAAgE;IACxD,sBAAsB;QAC5B,kCAAkC;QAClC,mBAAmB,CAAC,MAAM,EAAE,CAAC;QAE7B,wFAAwF;QACxF,4EAA4E;QAC5E,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,GAAG,EAAE;YACnC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE;gBAC9B,qEAAqE;gBACrE,kEAAkE;gBAClE,oDAAoD;gBACpD,uEAAuE;gBACvE,qEAAqE;gBACrE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,YAAY,CAAC;gBACjE,MAAM,IAAI,GAAG,IAAI,cAAc,EAAE,CAAC;gBAClC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAC3B,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE;oBACjB,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,SAAS,CAAC;gBAChE,CAAC,CAAC;gBACF,IAAI,CAAC,OAAO,GAAG,GAAG,EAAE;oBAClB,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,eAAe,CAAC;gBACtE,CAAC,CAAC;gBACF,sEAAsE;gBACtE,iEAAiE;gBACjE,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;aACnC;QACH,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE;YACpC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE;gBAC9B,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,eAAe,CAAC;aACrE;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,iBAAiB;QAC7B,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAwB,CAAC;QAC5E,MAAM,eAAe,GAAG,qBAAqB,CAAC;QAC9C,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;QACjD,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,sCAAsC,CAAC,CAAC;QAC1E,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAE1B,IAAI,cAAyD,CAAC;QAC9D,MAAM,kCAAkC,GAAG,GAAG,EAAE;YAC9C,IAAI,cAAc,KAAK,SAAS,EAAE;gBAChC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,yBAAyB,CAAC,cAAc,CAAC,CAAC;gBACtE,cAAc,GAAG,SAAS,CAAC;aAC5B;QACH,CAAC,CAAC;QAEF,WAAW,CAAC,aAAa,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YACjD,cAAc,GAAG,GAAG,EAAE;gBACpB,IAAI,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE;oBACtC,kCAAkC,EAAE,CAAC;oBACrC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;iBAC3B;YACH,CAAC,CAAC;YACF,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,sBAAsB,CAAC,cAAc,CAAC,CAAC;QACrE,CAAC,CAAC;QACF,WAAW,CAAC,aAAa,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YACnD,kCAAkC,EAAE,CAAC;QACvC,CAAC,CAAC;QACF,OAAO,WAAW,CAAC;IACrB,CAAC;IAEO,kBAAkB;QACxB,OAAO,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC;IACrC,CAAC;CACF","sourcesContent":["import {\n ConnectionIndicator,\n ConnectionState,\n ConnectionStateChangeListener,\n ConnectionStateStore\n} from '@vaadin/common-frontend';\n\nexport interface FlowConfig {\n imports?: () => void;\n}\n\nclass FlowUiInitializationError extends Error {}\n\ninterface AppConfig {\n productionMode: boolean;\n appId: string;\n uidl: any;\n}\n\ninterface AppInitResponse {\n appConfig: AppConfig;\n pushScript?: string;\n}\n\ninterface Router {\n render: (ctx: NavigationParameters, shouldUpdateHistory: boolean) => Promise;\n}\n\ninterface HTMLRouterContainer extends HTMLElement {\n onBeforeEnter?: (ctx: NavigationParameters, cmd: PreventAndRedirectCommands, router: Router) => void | Promise;\n onBeforeLeave?: (ctx: NavigationParameters, cmd: PreventCommands, router: Router) => void | Promise;\n serverConnected?: (cancel: boolean, url?: NavigationParameters) => void;\n serverPaused?: () => void;\n}\n\ninterface FlowRoute {\n action: (params: NavigationParameters) => Promise;\n path: string;\n}\n\ninterface FlowRoot {\n $: any;\n $server: any;\n}\n\nexport interface NavigationParameters {\n pathname: string;\n search: string;\n}\n\nexport interface PreventCommands {\n prevent: () => any;\n}\n\nexport interface PreventAndRedirectCommands extends PreventCommands {\n redirect: (route: string) => any;\n}\n\n// flow uses body for keeping references\nconst flowRoot: FlowRoot = window.document.body as any;\nconst $wnd = window as any as {\n Vaadin: {\n Flow: any;\n TypeScript: any;\n connectionState: ConnectionStateStore;\n listener: any;\n };\n} & EventTarget;\n\n/**\n * Client API for flow UI operations.\n */\nexport class Flow {\n config: FlowConfig;\n response?: AppInitResponse = undefined;\n pathname = '';\n\n container!: HTMLRouterContainer;\n\n // flag used to inform Testbench whether a server route is in progress\n private isActive = false;\n\n private baseRegex = /^\\//;\n private appShellTitle: string;\n\n private navigation: string = '';\n\n constructor(config?: FlowConfig) {\n flowRoot.$ = flowRoot.$ || [];\n this.config = config || {};\n\n // TB checks for the existence of window.Vaadin.Flow in order\n // to consider that TB needs to wait for `initFlow()`.\n $wnd.Vaadin = $wnd.Vaadin || {};\n $wnd.Vaadin.Flow = $wnd.Vaadin.Flow || {};\n $wnd.Vaadin.Flow.clients = {\n TypeScript: {\n isActive: () => this.isActive\n }\n };\n\n // Regular expression used to remove the app-context\n const elm = document.head.querySelector('base');\n this.baseRegex = new RegExp(\n `^${\n // IE11 does not support document.baseURI\n (document.baseURI || (elm && elm.href) || '/').replace(/^https?:\\/\\/[^/]+/i, '')\n }`\n );\n this.appShellTitle = document.title;\n // Put a vaadin-connection-indicator in the dom\n this.addConnectionIndicator();\n }\n\n /**\n * Return a `route` object for vaadin-router in an one-element array.\n *\n * The `FlowRoute` object `path` property handles any route,\n * and the `action` returns the flow container without updating the content,\n * delaying the actual Flow server call to the `onBeforeEnter` phase.\n *\n * This is a specific API for its use with `vaadin-router`.\n */\n get serverSideRoutes(): [FlowRoute] {\n return [\n {\n path: '(.*)',\n action: this.action\n }\n ];\n }\n\n loadingStarted() {\n // Make Testbench know that server request is in progress\n this.isActive = true;\n $wnd.Vaadin.connectionState.loadingStarted();\n }\n\n loadingFinished() {\n // Make Testbench know that server request has finished\n this.isActive = false;\n $wnd.Vaadin.connectionState.loadingFinished();\n\n if ($wnd.Vaadin.listener) {\n // Listeners registered, do not register again.\n return;\n }\n $wnd.Vaadin.listener = {};\n // Listen for click on router-links -> 'link' navigation trigger\n // and on nodes -> 'client' navigation trigger.\n // Use capture phase to detect prevented / stopped events.\n document.addEventListener(\n 'click',\n (_e) => {\n if (_e.target) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (_e.target.hasAttribute('router-link')) {\n this.navigation = 'link';\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n } else if (_e.composedPath().some((node) => node.nodeName === 'A')) {\n this.navigation = 'client';\n }\n }\n },\n {\n capture: true\n }\n );\n }\n\n private get action(): (params: NavigationParameters) => Promise {\n // Return a function which is bound to the flow instance, thus we can use\n // the syntax `...serverSideRoutes` in vaadin-router.\n return async (params: NavigationParameters) => {\n // Store last action pathname so as we can check it in events\n this.pathname = params.pathname;\n\n if ($wnd.Vaadin.connectionState.online) {\n try {\n await this.flowInit();\n } catch (error) {\n if (error instanceof FlowUiInitializationError) {\n // error initializing Flow: assume connection lost\n $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST;\n return this.offlineStubAction();\n } else {\n throw error;\n }\n }\n } else {\n // insert an offline stub\n return this.offlineStubAction();\n }\n\n // When an action happens, navigation will be resolved `onBeforeEnter`\n this.container.onBeforeEnter = (ctx, cmd) => this.flowNavigate(ctx, cmd);\n // For covering the 'server -> client' use case\n this.container.onBeforeLeave = (ctx, cmd) => this.flowLeave(ctx, cmd);\n return this.container;\n };\n }\n\n // Send a remote call to `JavaScriptBootstrapUI` to check\n // whether navigation has to be cancelled.\n private async flowLeave(ctx: NavigationParameters, cmd?: PreventCommands): Promise {\n // server -> server, viewing offline stub, or browser is offline\n const { connectionState } = $wnd.Vaadin;\n if (this.pathname === ctx.pathname || !this.isFlowClientLoaded() || connectionState.offline) {\n return Promise.resolve({});\n }\n // 'server -> client'\n return new Promise((resolve) => {\n this.loadingStarted();\n // The callback to run from server side to cancel navigation\n this.container.serverConnected = (cancel) => {\n resolve(cmd && cancel ? cmd.prevent() : {});\n this.loadingFinished();\n };\n\n // Call server side to check whether we can leave the view\n flowRoot.$server.leaveNavigation(this.getFlowRoutePath(ctx), this.getFlowRouteQuery(ctx));\n });\n }\n\n // Send the remote call to `JavaScriptBootstrapUI` to render the flow\n // route specified by the context\n private async flowNavigate(ctx: NavigationParameters, cmd?: PreventAndRedirectCommands): Promise {\n if (this.response) {\n return new Promise((resolve) => {\n this.loadingStarted();\n // The callback to run from server side once the view is ready\n this.container.serverConnected = (cancel, redirectContext?: NavigationParameters) => {\n if (cmd && cancel) {\n resolve(cmd.prevent());\n } else if (cmd && cmd.redirect && redirectContext) {\n resolve(cmd.redirect(redirectContext.pathname));\n } else {\n this.container.style.display = '';\n resolve(this.container);\n }\n this.loadingFinished();\n };\n\n this.container.serverPaused = () => {\n this.loadingFinished();\n };\n\n // Call server side to navigate to the given route\n flowRoot.$server.connectClient(\n this.getFlowRoutePath(ctx),\n this.getFlowRouteQuery(ctx),\n this.appShellTitle,\n history.state,\n this.navigation\n );\n // Default to history navigation trigger.\n // Link and client cases are handled by click listener in loadingFinished().\n this.navigation = 'history';\n });\n } else {\n // No server response => offline or erroneous connection\n return Promise.resolve(this.container);\n }\n }\n\n private getFlowRoutePath(context: NavigationParameters | Location): string {\n return decodeURIComponent(context.pathname).replace(this.baseRegex, '');\n }\n private getFlowRouteQuery(context: NavigationParameters | Location): string {\n return (context.search && context.search.substring(1)) || '';\n }\n\n // import flow client modules and initialize UI in server side.\n private async flowInit(): Promise {\n // Do not start flow twice\n if (!this.isFlowClientLoaded()) {\n // show flow progress indicator\n this.loadingStarted();\n\n // Initialize server side UI\n this.response = await this.flowInitUi();\n\n const { pushScript, appConfig } = this.response;\n\n if (typeof pushScript === 'string') {\n await this.loadScript(pushScript);\n }\n const { appId } = appConfig;\n\n // Load bootstrap script with server side parameters\n const bootstrapMod = await import('./FlowBootstrap');\n await bootstrapMod.init(this.response);\n\n // Load custom modules defined by user\n if (typeof this.config.imports === 'function') {\n this.injectAppIdScript(appId);\n await this.config.imports();\n }\n\n // we use a custom tag for the flow app container\n const tag = `flow-container-${appId.toLowerCase()}`;\n const serverCreatedContainer = document.querySelector(tag);\n if (serverCreatedContainer) {\n this.container = serverCreatedContainer as HTMLElement;\n } else {\n this.container = document.createElement(tag);\n this.container.id = appId;\n }\n flowRoot.$[appId] = this.container;\n\n // Load flow-client module\n const clientMod = await import('./FlowClient');\n await this.flowInitClient(clientMod);\n\n // hide flow progress indicator\n this.loadingFinished();\n }\n\n // It might be that components created from server expect that their content has been rendered.\n // Appending eagerly the container we avoid these kind of errors.\n // Note that the client router will move this container to the outlet if the navigation succeed\n if (this.container && !this.container.isConnected) {\n this.container.style.display = 'none';\n document.body.appendChild(this.container);\n }\n return this.response!;\n }\n\n private async loadScript(url: string): Promise {\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.onload = () => resolve();\n script.onerror = reject;\n script.src = url;\n document.body.appendChild(script);\n });\n }\n\n private injectAppIdScript(appId: string) {\n const appIdWithoutHashCode = appId.substring(0, appId.lastIndexOf('-'));\n const scriptAppId = document.createElement('script');\n scriptAppId.type = 'module';\n scriptAppId.setAttribute('data-app-id', appIdWithoutHashCode);\n document.body.append(scriptAppId);\n }\n\n // After the flow-client javascript module has been loaded, this initializes flow UI\n // in the browser.\n private async flowInitClient(clientMod: any): Promise {\n clientMod.init();\n // client init is async, we need to loop until initialized\n return new Promise((resolve) => {\n const intervalId = setInterval(() => {\n // client `isActive() == true` while initializing or processing\n const initializing = Object.keys($wnd.Vaadin.Flow.clients)\n .filter((key) => key !== 'TypeScript')\n .reduce((prev, id) => prev || $wnd.Vaadin.Flow.clients[id].isActive(), false);\n if (!initializing) {\n clearInterval(intervalId);\n resolve();\n }\n }, 5);\n });\n }\n\n // Returns the `appConfig` object\n private async flowInitUi(): Promise {\n // appConfig was sent in the index.html request\n const initial = $wnd.Vaadin && $wnd.Vaadin.TypeScript && $wnd.Vaadin.TypeScript.initial;\n if (initial) {\n $wnd.Vaadin.TypeScript.initial = undefined;\n return Promise.resolve(initial);\n }\n\n // send a request to the `JavaScriptBootstrapHandler`\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n const httpRequest = xhr as any;\n const requestPath = `?v-r=init&location=${encodeURIComponent(\n this.getFlowRoutePath(location)\n )}&query=${encodeURIComponent(this.getFlowRouteQuery(location))}`;\n\n httpRequest.open('GET', requestPath);\n\n httpRequest.onerror = () =>\n reject(\n new FlowUiInitializationError(\n `Invalid server response when initializing Flow UI.\n ${httpRequest.status}\n ${httpRequest.responseText}`\n )\n );\n\n httpRequest.onload = () => {\n const contentType = httpRequest.getResponseHeader('content-type');\n if (contentType && contentType.indexOf('application/json') !== -1) {\n resolve(JSON.parse(httpRequest.responseText));\n } else {\n httpRequest.onerror();\n }\n };\n httpRequest.send();\n });\n }\n\n // Create shared connection state store and connection indicator\n private addConnectionIndicator() {\n // add connection indicator to DOM\n ConnectionIndicator.create();\n\n // Listen to browser online/offline events and update the loading indicator accordingly.\n // Note: if flow-client is loaded, it instead handles the state transitions.\n $wnd.addEventListener('online', () => {\n if (!this.isFlowClientLoaded()) {\n // Send an HTTP HEAD request for sw.js to verify server reachability.\n // We do not expect sw.js to be cached, so the request goes to the\n // server rather than being served from local cache.\n // Require network-level failure to revert the state to CONNECTION_LOST\n // (HTTP error code is ok since it still verifies server's presence).\n $wnd.Vaadin.connectionState.state = ConnectionState.RECONNECTING;\n const http = new XMLHttpRequest();\n http.open('HEAD', 'sw.js');\n http.onload = () => {\n $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTED;\n };\n http.onerror = () => {\n $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST;\n };\n // Postpone request to reduce potential net::ERR_INTERNET_DISCONNECTED\n // errors that sometimes occurs even if browser says it is online\n setTimeout(() => http.send(), 50);\n }\n });\n $wnd.addEventListener('offline', () => {\n if (!this.isFlowClientLoaded()) {\n $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST;\n }\n });\n }\n\n private async offlineStubAction() {\n const offlineStub = document.createElement('iframe') as HTMLRouterContainer;\n const offlineStubPath = './offline-stub.html';\n offlineStub.setAttribute('src', offlineStubPath);\n offlineStub.setAttribute('style', 'width: 100%; height: 100%; border: 0');\n this.response = undefined;\n\n let onlineListener: ConnectionStateChangeListener | undefined;\n const removeOfflineStubAndOnlineListener = () => {\n if (onlineListener !== undefined) {\n $wnd.Vaadin.connectionState.removeStateChangeListener(onlineListener);\n onlineListener = undefined;\n }\n };\n\n offlineStub.onBeforeEnter = (ctx, _cmds, router) => {\n onlineListener = () => {\n if ($wnd.Vaadin.connectionState.online) {\n removeOfflineStubAndOnlineListener();\n router.render(ctx, false);\n }\n };\n $wnd.Vaadin.connectionState.addStateChangeListener(onlineListener);\n };\n offlineStub.onBeforeLeave = (_ctx, _cmds, _router) => {\n removeOfflineStubAndOnlineListener();\n };\n return offlineStub;\n }\n\n private isFlowClientLoaded(): boolean {\n return this.response !== undefined;\n }\n}\n"]} \ No newline at end of file diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/FlowBootstrap.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/FlowBootstrap.d.ts new file mode 100644 index 0000000..0398d57 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/FlowBootstrap.d.ts @@ -0,0 +1 @@ +export const init: (appInitResponse: any) => void; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/FlowBootstrap.js b/LoadBalancerWeb/frontend/generated/jar-resources/FlowBootstrap.js new file mode 100644 index 0000000..a8d9485 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/FlowBootstrap.js @@ -0,0 +1,262 @@ +/* This is a copy of the regular `BootstrapHandler.js` in the flow-server + module, but with the following modifications: + - The main function is exported as an ES module for lazy initialization. + - Application configuration is passed as a parameter instead of using + replacement placeholders as in the regular bootstrapping. + - It reuses `Vaadin.Flow.clients` if exists. + - Fixed lint errors. + */ +const init = function (appInitResponse) { + window.Vaadin = window.Vaadin || {}; + window.Vaadin.Flow = window.Vaadin.Flow || {}; + + var apps = {}; + var widgetsets = {}; + + var log; + if (typeof window.console === undefined || !window.location.search.match(/[&?]debug(&|$)/)) { + /* If no console.log present, just use a no-op */ + log = function () {}; + } else if (typeof window.console.log === 'function') { + /* If it's a function, use it with apply */ + log = function () { + window.console.log.apply(window.console, arguments); + }; + } else { + /* In IE, its a native function for which apply is not defined, but it works + without a proper 'this' reference */ + log = window.console.log; + } + + var isInitializedInDom = function (appId) { + var appDiv = document.getElementById(appId); + if (!appDiv) { + return false; + } + for (var i = 0; i < appDiv.childElementCount; i++) { + var className = appDiv.childNodes[i].className; + /* If the app div contains a child with the class + 'v-app-loading' we have only received the HTML + but not yet started the widget set + (UIConnector removes the v-app-loading div). */ + if (className && className.indexOf('v-app-loading') != -1) { + return false; + } + } + return true; + }; + + /* + * Needed for Testbench compatibility, but prevents any Vaadin 7 app from + * bootstrapping unless the legacy vaadinBootstrap.js file is loaded before + * this script. + */ + window.Vaadin = window.Vaadin || {}; + window.Vaadin.Flow = window.Vaadin.Flow || {}; + + /* + * Needed for wrapping custom javascript functionality in the components (i.e. connectors) + */ + window.Vaadin.Flow.tryCatchWrapper = function (originalFunction, component) { + return function () { + try { + // eslint-disable-next-line + const result = originalFunction.apply(this, arguments); + return result; + } catch (error) { + console.error( + `There seems to be an error in ${component}: +${error.message} +Please submit an issue to https://github.com/vaadin/flow-components/issues/new/choose` + ); + } + }; + }; + + if (!window.Vaadin.Flow.initApplication) { + window.Vaadin.Flow.clients = window.Vaadin.Flow.clients || {}; + + window.Vaadin.Flow.initApplication = function (appId, config) { + var testbenchId = appId.replace(/-\d+$/, ''); + + if (apps[appId]) { + if ( + window.Vaadin && + window.Vaadin.Flow && + window.Vaadin.Flow.clients && + window.Vaadin.Flow.clients[testbenchId] && + window.Vaadin.Flow.clients[testbenchId].initializing + ) { + throw new Error('Application ' + appId + ' is already being initialized'); + } + if (isInitializedInDom(appId)) { + throw new Error('Application ' + appId + ' already initialized'); + } + } + + log('init application', appId, config); + + window.Vaadin.Flow.clients[testbenchId] = { + isActive: function () { + return true; + }, + initializing: true, + productionMode: mode + }; + + var getConfig = function (name) { + var value = config[name]; + return value; + }; + + /* Export public data */ + var app = { + getConfig: getConfig + }; + apps[appId] = app; + + if (!window.name) { + window.name = appId + '-' + Math.random(); + } + + var widgetset = 'client'; + widgetsets[widgetset] = { + pendingApps: [] + }; + if (widgetsets[widgetset].callback) { + log('Starting from bootstrap', appId); + widgetsets[widgetset].callback(appId); + } else { + log('Setting pending startup', appId); + widgetsets[widgetset].pendingApps.push(appId); + } + + return app; + }; + window.Vaadin.Flow.getAppIds = function () { + var ids = []; + for (var id in apps) { + if (Object.prototype.hasOwnProperty.call(apps, id)) { + ids.push(id); + } + } + return ids; + }; + window.Vaadin.Flow.getApp = function (appId) { + return apps[appId]; + }; + window.Vaadin.Flow.registerWidgetset = function (widgetset, callback) { + log('Widgetset registered', widgetset); + var ws = widgetsets[widgetset]; + if (ws && ws.pendingApps) { + ws.callback = callback; + for (var i = 0; i < ws.pendingApps.length; i++) { + var appId = ws.pendingApps[i]; + log('Starting from register widgetset', appId); + callback(appId); + } + ws.pendingApps = null; + } + }; + window.Vaadin.Flow.getBrowserDetailsParameters = function () { + var params = {}; + + /* Screen height and width */ + params['v-sh'] = window.screen.height; + params['v-sw'] = window.screen.width; + /* Browser window dimensions */ + params['v-wh'] = window.innerHeight; + params['v-ww'] = window.innerWidth; + /* Body element dimensions */ + params['v-bh'] = document.body.clientHeight; + params['v-bw'] = document.body.clientWidth; + + /* Current time */ + var date = new Date(); + params['v-curdate'] = date.getTime(); + + /* Current timezone offset (including DST shift) */ + var tzo1 = date.getTimezoneOffset(); + + /* Compare the current tz offset with the first offset from the end + of the year that differs --- if less that, we are in DST, otherwise + we are in normal time */ + var dstDiff = 0; + var rawTzo = tzo1; + for (var m = 12; m > 0; m--) { + date.setUTCMonth(m); + var tzo2 = date.getTimezoneOffset(); + if (tzo1 != tzo2) { + dstDiff = tzo1 > tzo2 ? tzo1 - tzo2 : tzo2 - tzo1; + rawTzo = tzo1 > tzo2 ? tzo1 : tzo2; + break; + } + } + + /* Time zone offset */ + params['v-tzo'] = tzo1; + + /* DST difference */ + params['v-dstd'] = dstDiff; + + /* Time zone offset without DST */ + params['v-rtzo'] = rawTzo; + + /* DST in effect? */ + params['v-dston'] = tzo1 != rawTzo; + + /* Time zone id (if available) */ + try { + params['v-tzid'] = Intl.DateTimeFormat().resolvedOptions().timeZone; + } catch (err) { + params['v-tzid'] = ''; + } + + /* Window name */ + if (window.name) { + params['v-wn'] = window.name; + } + + /* Detect touch device support */ + var supportsTouch = false; + try { + document.createEvent('TouchEvent'); + supportsTouch = true; + } catch (e) { + /* Chrome and IE10 touch detection */ + supportsTouch = 'ontouchstart' in window || typeof navigator.msMaxTouchPoints !== 'undefined'; + } + params['v-td'] = supportsTouch; + + /* Device Pixel Ratio */ + params['v-pr'] = window.devicePixelRatio; + + if (navigator.platform) { + params['v-np'] = navigator.platform; + } + + /* Stringify each value (they are parsed on the server side) */ + Object.keys(params).forEach(function (key) { + var value = params[key]; + if (typeof value !== 'undefined') { + params[key] = value.toString(); + } + }); + return params; + }; + } + + log('Flow bootstrap loaded'); + if (appInitResponse.appConfig.productionMode && typeof window.__gwtStatsEvent != 'function') { + window.Vaadin.Flow.gwtStatsEvents = []; + window.__gwtStatsEvent = function (event) { + window.Vaadin.Flow.gwtStatsEvents.push(event); + return true; + }; + } + var config = appInitResponse.appConfig; + var mode = appInitResponse.appConfig.productionMode; + window.Vaadin.Flow.initApplication(config.appId, config); +}; + +export { init }; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/FlowClient.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/FlowClient.d.ts new file mode 100644 index 0000000..7b21f90 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/FlowClient.d.ts @@ -0,0 +1 @@ +export const init: () => void; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/FlowClient.js b/LoadBalancerWeb/frontend/generated/jar-resources/FlowClient.js new file mode 100644 index 0000000..a7c332e --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/FlowClient.js @@ -0,0 +1,1055 @@ +export function init() { +function client(){var Jb='',Kb=0,Lb='gwt.codesvr=',Mb='gwt.hosted=',Nb='gwt.hybrid',Ob='client',Pb='#',Qb='?',Rb='/',Sb=1,Tb='img',Ub='clear.cache.gif',Vb='baseUrl',Wb='script',Xb='client.nocache.js',Yb='base',Zb='//',$b='meta',_b='name',ac='gwt:property',bc='content',cc='=',dc='gwt:onPropertyErrorFn',ec='Bad handler "',fc='" for "gwt:onPropertyErrorFn"',gc='gwt:onLoadErrorFn',hc='" for "gwt:onLoadErrorFn"',ic='user.agent',jc='webkit',kc='safari',lc='msie',mc=10,nc=11,oc='ie10',pc=9,qc='ie9',rc=8,sc='ie8',tc='gecko',uc='gecko1_8',vc=2,wc=3,xc=4,yc='Single-script hosted mode not yet implemented. See issue ',zc='http://code.google.com/p/google-web-toolkit/issues/detail?id=2079',Ac='317F6C883693AF40245410D84E629AA9',Bc=':1',Cc=':',Dc='DOMContentLoaded',Ec=50;var l=Jb,m=Kb,n=Lb,o=Mb,p=Nb,q=Ob,r=Pb,s=Qb,t=Rb,u=Sb,v=Tb,w=Ub,A=Vb,B=Wb,C=Xb,D=Yb,F=Zb,G=$b,H=_b,I=ac,J=bc,K=cc,L=dc,M=ec,N=fc,O=gc,P=hc,Q=ic,R=jc,S=kc,T=lc,U=mc,V=nc,W=oc,X=pc,Y=qc,Z=rc,$=sc,_=tc,ab=uc,bb=vc,cb=wc,db=xc,eb=yc,fb=zc,gb=Ac,hb=Bc,ib=Cc,jb=Dc,kb=Ec;var lb=window,mb=document,nb,ob,pb=l,qb={},rb=[],sb=[],tb=[],ub=m,vb,wb;if(!lb.__gwt_stylesLoaded){lb.__gwt_stylesLoaded={}}if(!lb.__gwt_scriptsLoaded){lb.__gwt_scriptsLoaded={}}function xb(){var b=false;try{var c=lb.location.search;return (c.indexOf(n)!=-1||(c.indexOf(o)!=-1||lb.external&&lb.external.gwtOnLoad))&&c.indexOf(p)==-1}catch(a){}xb=function(){return b};return b} +function yb(){if(nb&&ob){nb(vb,q,pb,ub)}} +function zb(){function e(a){var b=a.lastIndexOf(r);if(b==-1){b=a.length}var c=a.indexOf(s);if(c==-1){c=a.length}var d=a.lastIndexOf(t,Math.min(c,b));return d>=m?a.substring(m,d+u):l} +function f(a){if(a.match(/^\w+:\/\//)){}else{var b=mb.createElement(v);b.src=a+w;a=e(b.src)}return a} +function g(){var a=Cb(A);if(a!=null){return a}return l} +function h(){var a=mb.getElementsByTagName(B);for(var b=m;bm){return a[a.length-u].href}return l} +function j(){var a=mb.location;return a.href==a.protocol+F+a.host+a.pathname+a.search+a.hash} +var k=g();if(k==l){k=h()}if(k==l){k=i()}if(k==l&&j()){k=e(mb.location.href)}k=f(k);return k} +function Ab(){var b=document.getElementsByTagName(G);for(var c=m,d=b.length;c=m){f=g.substring(m,i);h=g.substring(i+u)}else{f=g;h=l}qb[f]=h}}else if(f==L){g=e.getAttribute(J);if(g){try{wb=eval(g)}catch(a){alert(M+g+N)}}}else if(f==O){g=e.getAttribute(J);if(g){try{vb=eval(g)}catch(a){alert(M+g+P)}}}}}} +var Bb=function(a,b){return b in rb[a]};var Cb=function(a){var b=qb[a];return b==null?null:b};function Db(a,b){var c=tb;for(var d=m,e=a.length-u;d=U&&b=X&&b=Z&&b=V}())return ab;return S};rb[Q]={'gecko1_8':m,'ie10':u,'ie8':bb,'ie9':cb,'safari':db};client.onScriptLoad=function(a){client=null;nb=a;yb()};if(xb()){alert(eb+fb);return}zb();Ab();try{var Fb;Db([ab],gb);Db([S],gb+hb);Fb=tb[Eb(Q)];var Gb=Fb.indexOf(ib);if(Gb!=-1){ub=Number(Fb.substring(Gb+u))}}catch(a){return}var Hb;function Ib(){if(!ob){ob=true;yb();if(mb.removeEventListener){mb.removeEventListener(jb,Ib,false)}if(Hb){clearInterval(Hb)}}} +if(mb.addEventListener){mb.addEventListener(jb,function(){Ib()},false)}var Hb=setInterval(function(){if(/loaded|complete/.test(mb.readyState)){Ib()}},kb)} +client();(function () {var $gwt_version = "2.9.0";var $wnd = window;var $doc = $wnd.document;var $moduleName, $moduleBase;var $stats = $wnd.__gwtStatsEvent ? function(a) {$wnd.__gwtStatsEvent(a)} : null;var $strongName = '317F6C883693AF40245410D84E629AA9';function I(){} +function Ui(){} +function Qi(){} +function $i(){} +function nc(){} +function uc(){} +function Bj(){} +function Mj(){} +function Qj(){} +function xk(){} +function zk(){} +function Bk(){} +function Wk(){} +function _k(){} +function el(){} +function gl(){} +function ql(){} +function ym(){} +function Am(){} +function Cm(){} +function $m(){} +function an(){} +function ar(){} +function cr(){} +function er(){} +function gr(){} +function Fr(){} +function Jr(){} +function bo(){} +function lo(){} +function Wp(){} +function Us(){} +function Ys(){} +function _s(){} +function _w(){} +function ut(){} +function du(){} +function Yu(){} +function av(){} +function pv(){} +function zx(){} +function Bx(){} +function ny(){} +function ry(){} +function xz(){} +function fA(){} +function lB(){} +function NB(){} +function NF(){} +function YF(){} +function $F(){} +function cD(){} +function IE(){} +function aG(){} +function rG(){} +function dz(){az()} +function T(a){S=a;Jb()} +function nj(a,b){a.c=b} +function oj(a,b){a.d=b} +function pj(a,b){a.e=b} +function qj(a,b){a.f=b} +function rj(a,b){a.g=b} +function sj(a,b){a.h=b} +function uj(a,b){a.j=b} +function vj(a,b){a.k=b} +function wj(a,b){a.l=b} +function xj(a,b){a.m=b} +function yj(a,b){a.n=b} +function zj(a,b){a.o=b} +function Aj(a,b){a.p=b} +function Et(a,b){a.b=b} +function qG(a,b){a.a=b} +function bc(a){this.a=a} +function dc(a){this.a=a} +function Oj(a){this.a=a} +function hk(a){this.a=a} +function jk(a){this.a=a} +function Uk(a){this.a=a} +function Zk(a){this.a=a} +function cl(a){this.a=a} +function kl(a){this.a=a} +function ml(a){this.a=a} +function ol(a){this.a=a} +function sl(a){this.a=a} +function ul(a){this.a=a} +function Yl(a){this.a=a} +function Em(a){this.a=a} +function Im(a){this.a=a} +function Um(a){this.a=a} +function cn(a){this.a=a} +function Cn(a){this.a=a} +function Fn(a){this.a=a} +function Gn(a){this.a=a} +function Mn(a){this.a=a} +function Yn(a){this.a=a} +function $n(a){this.a=a} +function eo(a){this.a=a} +function go(a){this.a=a} +function io(a){this.a=a} +function mo(a){this.a=a} +function so(a){this.a=a} +function Mo(a){this.a=a} +function bp(a){this.a=a} +function Fp(a){this.a=a} +function Up(a){this.a=a} +function Yp(a){this.a=a} +function $p(a){this.a=a} +function Mp(a){this.b=a} +function Hq(a){this.a=a} +function Jq(a){this.a=a} +function Lq(a){this.a=a} +function Uq(a){this.a=a} +function Xq(a){this.a=a} +function Lr(a){this.a=a} +function Sr(a){this.a=a} +function Ur(a){this.a=a} +function gs(a){this.a=a} +function ks(a){this.a=a} +function ts(a){this.a=a} +function Bs(a){this.a=a} +function Ds(a){this.a=a} +function Fs(a){this.a=a} +function Hs(a){this.a=a} +function Js(a){this.a=a} +function Ks(a){this.a=a} +function Ss(a){this.a=a} +function es(a){this.c=a} +function Ft(a){this.c=a} +function jt(a){this.a=a} +function st(a){this.a=a} +function wt(a){this.a=a} +function It(a){this.a=a} +function Kt(a){this.a=a} +function Xt(a){this.a=a} +function bu(a){this.a=a} +function wu(a){this.a=a} +function Au(a){this.a=a} +function $u(a){this.a=a} +function Av(a){this.a=a} +function Ev(a){this.a=a} +function Iv(a){this.a=a} +function Kv(a){this.a=a} +function Pv(a){this.a=a} +function Fx(a){this.a=a} +function Hx(a){this.a=a} +function Vx(a){this.a=a} +function Zx(a){this.a=a} +function Ex(a){this.b=a} +function by(a){this.a=a} +function py(a){this.a=a} +function vy(a){this.a=a} +function xy(a){this.a=a} +function By(a){this.a=a} +function Iy(a){this.a=a} +function Ky(a){this.a=a} +function My(a){this.a=a} +function Oy(a){this.a=a} +function Qy(a){this.a=a} +function Xy(a){this.a=a} +function Zy(a){this.a=a} +function oz(a){this.a=a} +function rz(a){this.a=a} +function zz(a){this.a=a} +function Bz(a){this.e=a} +function dA(a){this.a=a} +function hA(a){this.a=a} +function jA(a){this.a=a} +function FA(a){this.a=a} +function UA(a){this.a=a} +function WA(a){this.a=a} +function YA(a){this.a=a} +function hB(a){this.a=a} +function jB(a){this.a=a} +function zB(a){this.a=a} +function TB(a){this.a=a} +function $C(a){this.a=a} +function aD(a){this.a=a} +function dD(a){this.a=a} +function UD(a){this.a=a} +function qF(a){this.a=a} +function dF(a){this.c=a} +function SE(a){this.b=a} +function uG(a){this.a=a} +function ck(a){throw a} +function Hi(a){return a.e} +function Vi(){Uo();Yo()} +function Uo(){Uo=Qi;To=[]} +function R(){this.a=xb()} +function jj(){this.a=++ij} +function wB(a){Yz(a.a,a.b)} +function Os(a,b){IB(a.a,b)} +function Ow(a,b){Aw(b,a)} +function Ew(a,b){Xw(b,a)} +function Kw(a,b){Ww(b,a)} +function Pz(a,b){Ru(b,a)} +function tu(a,b){b.jb(a)} +function MC(b,a){b.log(a)} +function NC(b,a){b.warn(a)} +function GC(b,a){b.data=a} +function KC(b,a){b.debug(a)} +function LC(b,a){b.error(a)} +function kp(a,b){a.push(b)} +function kr(a){a.i||lr(a.a)} +function kb(){ab.call(this)} +function jD(){ab.call(this)} +function hD(){kb.call(this)} +function _D(){kb.call(this)} +function kF(){kb.call(this)} +function $r(a){Zr(a)&&as(a)} +function hc(a){gc();fc.I(a)} +function xm(a){return cm(a)} +function Yb(a){return a.G()} +function Q(a){return xb()-a.a} +function Qk(a){Hk();this.a=a} +function ek(a){S=a;!!a&&Jb()} +function az(){az=Qi;_y=mz()} +function pb(){pb=Qi;ob=new I} +function Qb(){Qb=Qi;Pb=new lo} +function nt(){nt=Qi;mt=new ut} +function Gz(){Gz=Qi;Fz=new fA} +function tj(a,b){a.i=b;$j=!b} +function Z(a,b){a.e=b;W(a,b)} +function Zz(a,b,c){a.Rb(c,b)} +function Pl(a,b,c){Kl(a,c,b)} +function vm(a,b,c){a.set(b,c)} +function Ql(a,b){a.a.add(b.d)} +function px(a,b){b.forEach(a)} +function AC(b,a){b.display=a} +function YC(b,a){return a in b} +function oD(a){return DG(a),a} +function PD(a){return DG(a),a} +function fD(a){lb.call(this,a)} +function SD(a){lb.call(this,a)} +function TD(a){lb.call(this,a)} +function bE(a){lb.call(this,a)} +function aE(a){nb.call(this,a)} +function aA(a){_z.call(this,a)} +function CA(a){_z.call(this,a)} +function RA(a){_z.call(this,a)} +function gD(a){fD.call(this,a)} +function EE(a){fD.call(this,a)} +function dE(a){SD.call(this,a)} +function KE(a){lb.call(this,a)} +function BE(){dD.call(this,'')} +function CE(){dD.call(this,'')} +function Ki(){Ii==null&&(Ii=[])} +function Db(){Db=Qi;!!(gc(),fc)} +function GE(){GE=Qi;FE=new cD} +function Sy(a){Qw(a.b,a.a,a.c)} +function tD(a){sD(a);return a.i} +function Eq(a,b){return a.a>b.a} +function Wc(a,b){return $c(a,b)} +function xc(a,b){return BD(a,b)} +function HE(a){return Ic(a,5).e} +function XC(a){return Object(a)} +function pn(a,b){a.d?rn(b):Rk()} +function gu(a,b){a.c.forEach(b)} +function dB(a,b){a.e||a.c.add(b)} +function XF(a,b){Ic(a,103).ac(b)} +function fG(a,b){bG(a);a.a.ic(b)} +function GF(a,b,c){b.hb(a.a[c])} +function lG(a,b,c){b.hb(HE(c))} +function lx(a,b,c){fB(bx(a,c,b))} +function vF(a,b){while(a.jc(b));} +function qm(a,b){rB(new Sm(b,a))} +function Hw(a,b){rB(new Xx(b,a))} +function Iw(a,b){rB(new _x(b,a))} +function Mw(a,b){return mw(b.a,a)} +function Hz(a,b){return Vz(a.a,b)} +function tA(a,b){return Vz(a.a,b)} +function HA(a,b){return Vz(a.a,b)} +function ox(a,b){return wl(a.b,b)} +function Wi(b,a){return b.exec(a)} +function Ub(a){return !!a.b||!!a.g} +function Kz(a){$z(a.a);return a.g} +function Oz(a){$z(a.a);return a.c} +function _v(b,a){Uv();delete b[a]} +function Hl(a,b){return Nc(a.b[b])} +function Ok(a,b){++Gk;b.db(a,Dk)} +function Sj(a,b){this.b=a;this.a=b} +function Gm(a,b){this.b=a;this.a=b} +function Km(a,b){this.a=a;this.b=b} +function Mm(a,b){this.a=a;this.b=b} +function Om(a,b){this.a=a;this.b=b} +function Qm(a,b){this.a=a;this.b=b} +function Sm(a,b){this.a=a;this.b=b} +function il(a,b){this.a=a;this.b=b} +function Dl(a,b){this.a=a;this.b=b} +function Fl(a,b){this.a=a;this.b=b} +function Ul(a,b){this.a=a;this.b=b} +function Wl(a,b){this.a=a;this.b=b} +function Jn(a,b){this.a=a;this.b=b} +function On(a,b){this.b=a;this.a=b} +function Qn(a,b){this.b=a;this.a=b} +function ir(a,b){this.b=a;this.a=b} +function wo(a,b){this.b=a;this.c=b} +function Or(a,b){this.a=a;this.b=b} +function Qr(a,b){this.a=a;this.b=b} +function Zt(a,b){this.a=a;this.b=b} +function _t(a,b){this.a=a;this.b=b} +function uu(a,b){this.a=a;this.b=b} +function yu(a,b){this.a=a;this.b=b} +function Cu(a,b){this.a=a;this.b=b} +function Cv(a,b){this.a=a;this.b=b} +function Lt(a,b){this.b=a;this.a=b} +function Jx(a,b){this.b=a;this.a=b} +function Lx(a,b){this.b=a;this.a=b} +function Rx(a,b){this.b=a;this.a=b} +function Xx(a,b){this.b=a;this.a=b} +function _x(a,b){this.b=a;this.a=b} +function jy(a,b){this.a=a;this.b=b} +function ly(a,b){this.a=a;this.b=b} +function Dy(a,b){this.a=a;this.b=b} +function Vy(a,b){this.a=a;this.b=b} +function hz(a,b){this.a=a;this.b=b} +function jz(a,b){this.b=a;this.a=b} +function Go(a,b){wo.call(this,a,b)} +function Sp(a,b){wo.call(this,a,b)} +function LD(){lb.call(this,null)} +function Ob(){yb!=0&&(yb=0);Cb=-1} +function Pt(){this.a=new $wnd.Map} +function MB(){this.c=new $wnd.Map} +function xB(a,b){this.a=a;this.b=b} +function AB(a,b){this.a=a;this.b=b} +function lA(a,b){this.a=a;this.b=b} +function $A(a,b){this.a=a;this.b=b} +function WF(a,b){this.a=a;this.b=b} +function oG(a,b){this.a=a;this.b=b} +function vG(a,b){this.b=a;this.a=b} +function sA(a,b){this.d=a;this.e=b} +function jC(a,b){wo.call(this,a,b)} +function rC(a,b){wo.call(this,a,b)} +function UF(a,b){wo.call(this,a,b)} +function mq(a,b){eq(a,(Dq(),Bq),b)} +function Lo(a,b){return Jo(b,Ko(a))} +function Yc(a){return typeof a===UG} +function lz(a){a.length=0;return a} +function bd(a){GG(a==null);return a} +function Nb(a){$wnd.clearTimeout(a)} +function aj(a){$wnd.clearTimeout(a)} +function PC(b,a){b.clearTimeout(a)} +function OC(b,a){b.clearInterval(a)} +function cz(a,b){gB(b);_y.delete(a)} +function sE(a,b){return a.substr(b)} +function QD(a){return ad((DG(a),a))} +function dt(a,b,c,d){ct(a,b.d,c,d)} +function Gw(a,b,c){Uw(a,b);vw(c.e)} +function jG(a,b,c){XF(b,c);return b} +function yE(a,b){a.a+=''+b;return a} +function zE(a,b){a.a+=''+b;return a} +function AE(a,b){a.a+=''+b;return a} +function xG(a,b,c){a.splice(b,0,c)} +function tq(a,b){eq(a,(Dq(),Cq),b.a)} +function Ol(a,b){return a.a.has(b.d)} +function H(a,b){return _c(a)===_c(b)} +function lE(a,b){return a.indexOf(b)} +function VC(a){return a&&a.valueOf()} +function WC(a){return a&&a.valueOf()} +function mF(a){return a!=null?O(a):0} +function _c(a){return a==null?null:a} +function oF(){oF=Qi;nF=new qF(null)} +function rv(){rv=Qi;qv=new $wnd.Map} +function Uv(){Uv=Qi;Tv=new $wnd.Map} +function nD(){nD=Qi;lD=false;mD=true} +function _i(a){$wnd.clearInterval(a)} +function _j(a){$j&&KC($wnd.console,a)} +function bk(a){$j&&LC($wnd.console,a)} +function fk(a){$j&&MC($wnd.console,a)} +function gk(a){$j&&NC($wnd.console,a)} +function Sn(a){$j&&LC($wnd.console,a)} +function Sq(a){this.a=a;$i.call(this)} +function Hr(a){this.a=a;$i.call(this)} +function rs(a){this.a=a;$i.call(this)} +function Rs(a){this.a=new MB;this.c=a} +function mz(){return new $wnd.WeakMap} +function Yz(a,b){return a.a.delete(b)} +function lu(a,b){return a.h.delete(b)} +function nu(a,b){return a.b.delete(b)} +function mx(a,b,c){return bx(a,c.a,b)} +function tG(a,b,c){return jG(a.a,b,c)} +function kG(a,b,c){qG(a,tG(b,a.a,c))} +function U(a){a.h=zc(_h,XG,28,0,0,1)} +function iq(a){!!a.b&&rq(a,(Dq(),Aq))} +function nq(a){!!a.b&&rq(a,(Dq(),Bq))} +function wq(a){!!a.b&&rq(a,(Dq(),Cq))} +function Lk(a){ko((Qb(),Pb),new ol(a))} +function ap(a){ko((Qb(),Pb),new bp(a))} +function pp(a){ko((Qb(),Pb),new Fp(a))} +function vr(a){ko((Qb(),Pb),new Ur(a))} +function sx(a){ko((Qb(),Pb),new Qy(a))} +function DE(a){dD.call(this,(DG(a),a))} +function ab(){U(this);V(this);this.D()} +function ZE(){this.a=zc(Yh,XG,1,0,5,1)} +function xE(a){return a==null?$G:Ti(a)} +function pF(a,b){return a.a!=null?a.a:b} +function nx(a,b){return im(a.b.root,b)} +function CC(a,b,c,d){return uC(a,b,c,d)} +function Sc(a,b){return a!=null&&Hc(a,b)} +function JG(a){return a.$H||(a.$H=++IG)} +function nr(a){return SH in a?a[SH]:-1} +function Ym(a){return ''+Zm(Wm.mb()-a,3)} +function $z(a){var b;b=nB;!!b&&aB(b,a.b)} +function Lw(a,b){var c;c=mw(b,a);fB(c)} +function ms(a,b){b.a.b==(Fo(),Eo)&&os(a)} +function vA(a,b){$z(a.a);a.c.forEach(b)} +function IA(a,b){$z(a.a);a.b.forEach(b)} +function eB(a){if(a.d||a.e){return}cB(a)} +function os(a){if(a.a){Xi(a.a);a.a=null}} +function AG(a){if(!a){throw Hi(new hD)}} +function GG(a){if(!a){throw Hi(new LD)}} +function BG(a){if(!a){throw Hi(new kF)}} +function NG(){NG=Qi;KG=new I;MG=new I} +function Uc(a){return typeof a==='number'} +function Xc(a){return typeof a==='string'} +function tb(a){return a==null?null:a.name} +function DC(a,b){return a.appendChild(b)} +function EC(b,a){return b.appendChild(a)} +function nE(a,b){return a.lastIndexOf(b)} +function mE(a,b,c){return a.indexOf(b,c)} +function tE(a,b,c){return a.substr(b,c-b)} +function Sk(a,b,c){Hk();return a.set(c,b)} +function kc(a){gc();return parseInt(a)||-1} +function Tc(a){return typeof a==='boolean'} +function vo(a){return a.b!=null?a.b:''+a.c} +function sD(a){if(a.i!=null){return}FD(a)} +function Jc(a){GG(a==null||Tc(a));return a} +function Kc(a){GG(a==null||Uc(a));return a} +function Lc(a){GG(a==null||Yc(a));return a} +function Pc(a){GG(a==null||Xc(a));return a} +function Tk(a){Hk();Gk==0?a.H():Fk.push(a)} +function rB(a){oB==null&&(oB=[]);oB.push(a)} +function sB(a){qB==null&&(qB=[]);qB.push(a)} +function nA(a,b){Bz.call(this,a);this.a=b} +function iG(a,b){dG.call(this,a);this.a=b} +function _z(a){this.a=new $wnd.Set;this.b=a} +function Jl(){this.a=new $wnd.Map;this.b=[]} +function Fy(a,b){qx(a.a,a.c,a.d,a.b,Pc(b))} +function Un(a,b){Vn(a,b,Ic(lk(a.a,td),8).m)} +function Nq(a,b){b.a.b==(Fo(),Eo)&&Qq(a,-1)} +function Xb(a,b){a.b=Zb(a.b,[b,false]);Vb(a)} +function HC(b,a){return b.createElement(a)} +function ej(a,b){return $wnd.setTimeout(a,b)} +function oE(a,b,c){return a.lastIndexOf(b,c)} +function dj(a,b){return $wnd.setInterval(a,b)} +function pD(a,b){return DG(a),_c(a)===_c(b)} +function jE(a,b){return DG(a),_c(a)===_c(b)} +function $c(a,b){return a&&b&&a instanceof b} +function Eb(a,b,c){return a.apply(b,c);var d} +function BC(d,a,b,c){d.setProperty(a,b,c)} +function As(a,b,c){a.set(c,($z(b.a),Pc(b.g)))} +function $q(a,b,c){a.hb(YD(Lz(Ic(c.e,13),b)))} +function Fq(a,b,c){wo.call(this,a,b);this.a=c} +function Nx(a,b,c){this.c=a;this.b=b;this.a=c} +function Px(a,b,c){this.b=a;this.c=b;this.a=c} +function uv(a,b,c){this.b=a;this.c=b;this.g=c} +function Rv(a,b,c){this.b=a;this.a=b;this.c=c} +function Tx(a,b,c){this.a=a;this.b=b;this.c=c} +function dy(a,b,c){this.a=a;this.b=b;this.c=c} +function fy(a,b,c){this.a=a;this.b=b;this.c=c} +function hy(a,b,c){this.a=a;this.b=b;this.c=c} +function ty(a,b,c){this.c=a;this.b=b;this.a=c} +function zy(a,b,c){this.b=a;this.a=b;this.c=c} +function Ty(a,b,c){this.b=a;this.a=b;this.c=c} +function Hp(a,b,c){this.a=a;this.c=b;this.b=c} +function qo(){this.b=(Fo(),Co);this.a=new MB} +function Hk(){Hk=Qi;Fk=[];Dk=new Wk;Ek=new _k} +function $D(){$D=Qi;ZD=zc(Th,XG,25,256,0,1)} +function wv(a){a.c?OC($wnd,a.d):PC($wnd,a.d)} +function eu(a,b){a.b.add(b);return new Cu(a,b)} +function fu(a,b){a.h.add(b);return new yu(a,b)} +function FC(c,a,b){return c.insertBefore(a,b)} +function zC(b,a){return b.getPropertyValue(a)} +function sb(a){return a==null?null:a.message} +function bj(a,b){return RG(function(){a.L(b)})} +function Mv(a,b){return Nv(new Pv(a),b,19,true)} +function VE(a,b){a.a[a.a.length]=b;return true} +function WE(a,b){CG(b,a.a.length);return a.a[b]} +function Ic(a,b){GG(a==null||Hc(a,b));return a} +function Oc(a,b){GG(a==null||$c(a,b));return a} +function SC(a){if(a==null){return 0}return +a} +function zD(a,b){var c;c=wD(a,b);c.e=2;return c} +function Rz(a,b){a.d=true;Iz(a,b);sB(new hA(a))} +function gB(a){a.e=true;cB(a);a.c.clear();bB(a)} +function pk(a,b,c){ok(a,b,c.cb());a.b.set(b,c)} +function Tl(a,b,c){return a.set(c,($z(b.a),b.g))} +function tF(a){oF();return !a?nF:new qF(DG(a))} +function Xo(a){return $wnd.Vaadin.Flow.getApp(a)} +function fs(a,b){$wnd.navigator.sendBeacon(a,b)} +function is(a,b){var c;c=ad(PD(Kc(b.a)));ns(a,c)} +function HB(a,b,c,d){var e;e=JB(a,b,c);e.push(d)} +function FB(a,b){a.a==null&&(a.a=[]);a.a.push(b)} +function yq(a,b){this.a=a;this.b=b;$i.call(this)} +function Ct(a,b){this.a=a;this.b=b;$i.call(this)} +function lb(a){U(this);this.g=a;V(this);this.D()} +function rt(a){nt();this.c=[];this.a=mt;this.d=a} +function fj(a){a.onreadystatechange=function(){}} +function Pk(a){++Gk;pn(Ic(lk(a.a,se),56),new gl)} +function mk(a,b,c){a.a.delete(c);a.a.set(c,b.cb())} +function xC(a,b,c,d){a.removeEventListener(b,c,d)} +function Gu(a,b){var c;c=b;return Ic(a.a.get(c),6)} +function iF(a){return new iG(null,hF(a,a.length))} +function Vc(a){return a!=null&&Zc(a)&&!(a.mc===Ui)} +function Bc(a){return Array.isArray(a)&&a.mc===Ui} +function Rc(a){return !Array.isArray(a)&&a.mc===Ui} +function Zc(a){return typeof a===SG||typeof a===UG} +function yC(b,a){return b.getPropertyPriority(a)} +function hF(a,b){return wF(b,a.length),new HF(a,b)} +function sm(a,b,c){return a.push(Hz(c,new Qm(c,b)))} +function xD(a,b,c){var d;d=wD(a,b);JD(c,d);return d} +function wD(a,b){var c;c=new uD;c.f=a;c.d=b;return c} +function Zb(a,b){!a&&(a=[]);a[a.length]=b;return a} +function DG(a){if(a==null){throw Hi(new _D)}return a} +function Mc(a){GG(a==null||Array.isArray(a));return a} +function vw(a){var b;b=a.a;ou(a,null);ou(a,b);ov(a)} +function ak(a){$wnd.setTimeout(function(){a.M()},0)} +function Lb(a){$wnd.setTimeout(function(){throw a},0)} +function Jb(){Db();if(zb){return}zb=true;Kb(false)} +function bG(a){if(!a.b){cG(a);a.c=true}else{bG(a.b)}} +function BF(a,b){DG(b);while(a.c=0){a.a=new rs(a);Zi(a.a,b)}} +function QG(){if(LG==256){KG=MG;MG=new I;LG=0}++LG} +function gc(){gc=Qi;var a,b;b=!mc();a=new uc;fc=b?new nc:a} +function jm(a){var b;b=a.f;while(!!b&&!b.a){b=b.f}return b} +function mu(a,b){_c(b.W(a))===_c((nD(),mD))&&a.b.delete(b)} +function Gv(a,b){qz(b).forEach(Ri(Kv.prototype.hb,Kv,[a]))} +function wC(a,b){Rc(a)?a.V(b):(a.handleEvent(b),undefined)} +function wm(a,b,c,d,e){a.splice.apply(a,[b,c,d].concat(e))} +function wn(a,b,c){this.b=a;this.d=b;this.c=c;this.a=new R} +function RC(c,a,b){return c.setTimeout(RG(a.Vb).bind(a),b)} +function Ho(){Fo();return Dc(xc(Ce,1),XG,59,0,[Co,Do,Eo])} +function Gq(){Dq();return Dc(xc(Qe,1),XG,62,0,[Aq,Bq,Cq])} +function sC(){qC();return Dc(xc(wh,1),XG,42,0,[oC,nC,pC])} +function VF(){TF();return Dc(xc(ti,1),XG,47,0,[QF,RF,SF])} +function eG(a,b){var c;return hG(a,new ZE,(c=new uG(b),c))} +function EG(a,b){if(a<0||a>b){throw Hi(new fD(RI+a+SI+b))}} +function CG(a,b){if(a<0||a>=b){throw Hi(new fD(RI+a+SI+b))}} +function FG(a,b){if(a<0||a>=b){throw Hi(new EE(RI+a+SI+b))}} +function _q(a){Yj('applyDefaultTheme',(nD(),a?true:false))} +function wz(a){if(!uz){return a}return $wnd.Polymer.dom(a)} +function DD(a){if(a._b()){return null}var b=a.h;return Ni[b]} +function pt(a){a.a=mt;if(!a.b){return}as(Ic(lk(a.d,nf),18))} +function QC(c,a,b){return c.setInterval(RG(a.Vb).bind(a),b)} +function Pw(a,b,c){return a.push(Jz(JA(ju(b.e,1),c),b.b[c]))} +function Tp(){Rp();return Dc(xc(Je,1),XG,51,0,[Op,Np,Qp,Pp])} +function kC(){iC();return Dc(xc(vh,1),XG,43,0,[hC,fC,gC,eC])} +function tz(a,b,c,d){return a.splice.apply(a,[b,c].concat(d))} +function yn(a,b,c){this.a=a;this.c=b;this.b=c;$i.call(this)} +function An(a,b,c){this.a=a;this.c=b;this.b=c;$i.call(this)} +function iD(a,b){U(this);this.f=b;this.g=a;V(this);this.D()} +function vB(a){this.a=a;this.b=[];this.c=new $wnd.Set;cB(this)} +function up(a){$wnd.vaadinPush.atmosphere.unsubscribeUrl(a)} +function Po(a){a?($wnd.location=a):$wnd.location.reload(false)} +function Qc(a){return a.kc||Array.isArray(a)&&xc(ed,1)||ed} +function Kp(a,b,c){return tE(a.b,b,$wnd.Math.min(a.b.length,c))} +function QB(a,b,c,d){return SB(new $wnd.XMLHttpRequest,a,b,c,d)} +function Dv(a,b){qz(b).forEach(Ri(Iv.prototype.hb,Iv,[a.a]))} +function Iz(a,b){if(!a.b&&a.c&&lF(b,a.g)){return}Sz(a,b,true)} +function cF(a){BG(a.a2){_B(a[0],'OS major');_B(a[1],EI)}} +function Cl(a,b){var c;if(b.length!=0){c=new yz(b);a.e.set(Og,c)}} +function Qt(a,b){var c,d;for(c=0;c-1} +function nm(a,b){$wnd.customElements.whenDefined(a).then(function(){b.M()})} +function MA(a,b){sA.call(this,a,b);this.b=new $wnd.Map;this.a=new RA(this)} +function nb(a){U(this);V(this);this.e=a;W(this,a);this.g=a==null?$G:Ti(a)} +function mb(a){U(this);this.g=!a?null:$(a,a.C());this.f=a;V(this);this.D()} +function Ar(a){this.j=new $wnd.Set;this.g=[];this.c=new Hr(this);this.i=a} +function LF(){this.b=', ';this.d='[';this.e=']';this.c=this.d+(''+this.e)} +function yz(a){this.a=new $wnd.Set;a.forEach(Ri(zz.prototype.hb,zz,[this.a]))} +function Sw(a){var b;b=wz(a);while(b.firstChild){b.removeChild(b.firstChild)}} +function hG(a,b,c){var d;bG(a);d=new rG;d.a=b;a.a.ic(new vG(d,c));return d.a} +function zc(a,b,c,d,e,f){var g;g=Ac(e,d);e!=10&&Dc(xc(a,f),b,c,e,g);return g} +function xA(a,b,c,d){var e,f;e=d;f=tz(a.c,b,c,e);Xz(a.a,new Dz(a,b,f,d,false))} +function kq(a){Qq(Ic(lk(a.c,Ye),55),Ic(lk(a.c,td),8).e);eq(a,(Dq(),Aq),null)} +function M(a){return Xc(a)?ci:Uc(a)?Mh:Tc(a)?Jh:Rc(a)?a.kc:Bc(a)?a.kc:Qc(a)} +function yG(a,b){return yc(b)!=10&&Dc(M(b),b.lc,b.__elementTypeId$,yc(b),a),a} +function yc(a){return a.__elementTypeCategory$==null?10:a.__elementTypeCategory$} +function lp(a){switch(a.f.c){case 0:case 1:return true;default:return false;}} +function zs(a){var b;if(a==null){return false}b=Pc(a);return !jE('DISABLED',b)} +function cv(a,b){var c,d,e;e=ad(WC(a[mI]));d=ju(b,e);c=a['key'];return JA(d,c)} +function Bo(a,b){var c;DG(b);c=a[':'+b];zG(!!c,Dc(xc(Yh,1),XG,1,5,[b]));return c} +function Io(a,b,c){jE(c.substr(0,a.length),a)&&(c=b+(''+sE(c,a.length)));return c} +function XE(a,b,c){for(;ca||a>b){throw Hi(new gD('fromIndex: 0, toIndex: '+a+', length: '+b))}} +function eE(a,b,c){if(a==null){debugger;throw Hi(new jD)}this.a=eH;this.d=a;this.b=b;this.c=c} +function Qu(a,b,c,d,e){if(!Eu(a,b)){debugger;throw Hi(new jD)}ft(Ic(lk(a.c,Df),32),b,c,d,e)} +function Pu(a,b,c,d,e,f){if(!Eu(a,b)){debugger;throw Hi(new jD)}et(Ic(lk(a.c,Df),32),b,c,d,e,f)} +function Dw(a,b,c,d){var e,f,g;g=c[fI];e="path='"+wb(g)+"'";f=new jy(a,g);uw(a,b,d,f,null,e)} +function Lu(a,b){var c;if(b!=a.e){c=b.a;!!c&&(Uv(),!!c[lI])&&$v((Uv(),c[lI]));Tu(a,b);b.f=null}} +function uC(e,a,b,c){var d=!b?null:vC(b);e.addEventListener(a,d,c);return new IC(e,a,d,c)} +function nw(a,b,c,d){var e;e=ju(d,a);IA(e,Ri(Jx.prototype.db,Jx,[b,c]));return HA(e,new Lx(b,c))} +function Tw(a,b){var c;c=Ic(b.d.get(a),44);b.d.delete(a);if(!c){debugger;throw Hi(new jD)}c.Gb()} +function Wu(a,b){var c;if(Sc(a,27)){c=Ic(a,27);ad((DG(b),b))==2?wA(c,($z(c.a),c.c.length)):uA(c)}} +function _b(b,c){Qb();function d(){var a=RG(Yb)(b);a&&$wnd.setTimeout(d,c)} +$wnd.setTimeout(d,c)} +function CB(b,c,d){return RG(function(){var a=Array.prototype.slice.call(arguments);d.Cb(b,c,a)})} +function Qq(a,b){$j&&MC($wnd.console,'Setting heartbeat interval to '+b+'sec.');a.a=b;Oq(a)} +function lq(a,b,c){mp(b)&&Ns(Ic(lk(a.c,zf),15));qq(c)||fq(a,'Invalid JSON from server: '+c,null)} +function Dq(){Dq=Qi;Aq=new Fq('HEARTBEAT',0,0);Bq=new Fq('PUSH',1,1);Cq=new Fq('XHR',2,2)} +function Fo(){Fo=Qi;Co=new Go('INITIALIZING',0);Do=new Go('RUNNING',1);Eo=new Go('TERMINATED',2)} +function mn(a,b){var c,d;c=new Fn(a);d=new $wnd.Function(a);vn(a,new Mn(d),new On(b,c),new Qn(b,c))} +function qt(a){if(mt!=a.a||a.c.length==0){return}a.b=true;a.a=new st(a);ko((Qb(),Pb),new wt(a))} +function At(a){this.a=a;uC($wnd,'beforeunload',new It(this),false);Ms(Ic(lk(a,zf),15),new Kt(this))} +function Vb(a){if(!a.i){a.i=true;!a.f&&(a.f=new bc(a));_b(a.f,1);!a.h&&(a.h=new dc(a));_b(a.h,50)}} +function Bt(b){if(b.readyState!=1){return false}try{b.send();return true}catch(a){return false}} +function sr(a,b){if(b==-1){return true}if(b==a.f+1){return true}if(a.f==-1){return true}return false} +function gp(c,a){var b=c.getConfig(a);if(b===null||b===undefined){return null}else{return b+''}} +function fp(c,a){var b=c.getConfig(a);if(b===null||b===undefined){return null}else{return YD(b)}} +function UC(c){return $wnd.JSON.stringify(c,function(a,b){if(a=='$H'){return undefined}return b},0)} +function vC(b){var c=b.handler;if(!c){c=RG(function(a){wC(b,a)});c.listener=b;b.handler=c}return c} +function Jo(a,b){var c;if(a==null){return null}c=Io('context://',b,a);c=Io('base://','',c);return c} +function Gi(a){var b;if(Sc(a,5)){return a}b=a&&a.__java$exception;if(!b){b=new rb(a);hc(b)}return b} +function Dc(a,b,c,d,e){e.kc=a;e.lc=b;e.mc=Ui;e.__elementTypeId$=c;e.__elementTypeCategory$=d;return e} +function ct(a,b,c,d){var e;e={};e[mH]=_H;e[aI]=Object(b);e[_H]=c;!!d&&(e['data']=d,undefined);gt(a,e)} +function op(a,b,c){kE(b,'true')||kE(b,'false')?(a.a[c]=kE(b,'true'),undefined):(a.a[c]=b,undefined)} +function dC(a,b,c){var d,e;b<0?(e=0):(e=b);c<0||c>a.length?(d=a.length):(d=c);return a.substr(e,d-e)} +function Ut(a,b){var c;c=!!b.a&&!pD((nD(),lD),Kz(JA(ju(b,0),eI)));if(!c||!b.f){return c}return Ut(a,b.f)} +function mj(a,b){var c;c='/'.length;if(!jE(b.substr(b.length-c,c),'/')){debugger;throw Hi(new jD)}a.b=b} +function Nk(a,b){var c;c=new $wnd.Map;b.forEach(Ri(il.prototype.db,il,[a,c]));c.size==0||Tk(new ml(c))} +function ac(b,c){Qb();var d=$wnd.setInterval(function(){var a=RG(Yb)(b);!a&&$wnd.clearInterval(d)},c)} +function fw(a,b){var c;if(b.d.has(a)){debugger;throw Hi(new jD)}c=CC(b.b,a,new By(b),false);b.d.set(a,c)} +function Lz(a,b){var c;$z(a.a);if(a.c){c=($z(a.a),a.g);if(c==null){return b}return QD(Kc(c))}else{return b}} +function ep(c,a){var b=c.getConfig(a);if(b===null||b===undefined){return false}else{return nD(),b?true:false}} +function Y(a){var b,c,d,e;for(b=(a.h==null&&(a.h=(gc(),e=fc.J(a),ic(e))),a.h),c=0,d=b.length;c-129&&a<128){b=a+128;c=($D(),ZD)[b];!c&&(c=ZD[b]=new UD(a));return c}return new UD(a)} +function qw(a){var b,c;b=iu(a.e,24);for(c=0;c<($z(b.a),b.c.length);c++){gw(a,Ic(b.c[c],6))}return tA(b,new Zx(a))} +function Hu(a,b){var c,d,e;e=qz(a.a);for(c=0;c0){c=Ic(a.b.splice(0,1)[0],13);Rl(c,b)||Ru(Ic(lk(a.c,Xf),10),c);tB()}} +function bm(a,b){var c;am==null&&(am=mz());c=Oc(am.get(a),$wnd.Set);if(c==null){c=new $wnd.Set;am.set(a,c)}c.add(b)} +function KB(a,b){var c,d;d=Oc(a.c.get(b),$wnd.Map);if(d==null){return []}c=Mc(d.get(null));if(c==null){return []}return c} +function sn(a,b,c){var d;d=Mc(c.get(a));if(d==null){d=[];d.push(b);c.set(a,d);return true}else{d.push(b);return false}} +function om(a){while(a.parentNode&&(a=a.parentNode)){if(a.toString()==='[object ShadowRoot]'){return true}}return false} +function Qs(a){if(a.b){throw Hi(new TD('Trying to start a new request while another is active'))}a.b=true;Os(a,new Us)} +function uD(){++rD;this.i=null;this.g=null;this.f=null;this.d=null;this.b=null;this.h=null;this.a=null} +function qu(a,b){this.c=new $wnd.Map;this.h=new $wnd.Set;this.b=new $wnd.Set;this.e=new $wnd.Map;this.d=a;this.g=b} +function TF(){TF=Qi;QF=new UF('CONCURRENT',0);RF=new UF('IDENTITY_FINISH',1);SF=new UF('UNORDERED',2)} +function Wo(a){var b,c,d,e;b=(e=new Bj,e.a=a,$o(e,Xo(a)),e);c=new Gj(b);To.push(c);d=Xo(a).getConfig('uidl');Fj(c,d)} +function Rl(a,b){var c,d;c=Oc(b.get(a.e.e.d),$wnd.Map);if(c!=null&&c.has(a.f)){d=c.get(a.f);Rz(a,d);return true}return false} +function kw(a,b){var c,d;c=iu(b,11);for(d=0;d<($z(c.a),c.c.length);d++){wz(a).classList.add(Pc(c.c[d]))}return tA(c,new Iy(a))} +function LB(a){var b,c;if(a.a!=null){try{for(c=0;c>>0,b.toString(16))}return a.toString()} +function gm(a){var b;if(am==null){return}b=Oc(am.get(a),$wnd.Set);if(b!=null){am.delete(a);b.forEach(Ri(Cm.prototype.hb,Cm,[]))}} +function fq(a,b,c){var d,e;c&&(e=c.b);Wn(Ic(lk(a.c,ye),22),'',b,'',null,null);d=Ic(lk(a.c,De),12);d.b!=(Fo(),Eo)&&po(d,Eo)} +function Lj(a,b,c){var d;if(a==c.d){d=new $wnd.Function('callback','callback();');d.call(null,b);return nD(),true}return nD(),false} +function Yv(a,b){if(typeof a.get===UG){var c=a.get(b);if(typeof c===SG&&typeof c[xH]!==aH){return {nodeId:c[xH]}}}return null} +function Ko(a){var b,c;b=Ic(lk(a.a,td),8).b;c='/'.length;if(!jE(b.substr(b.length-c,c),'/')){debugger;throw Hi(new jD)}return b} +function JA(a,b){var c;c=Ic(a.b.get(b),13);if(!c){c=new Tz(b,a,jE('innerHTML',b)&&a.d==1);a.b.set(b,c);Xz(a.a,new nA(a,c))}return c} +function $v(c){Uv();var b=c['}p'].promises;b!==undefined&&b.forEach(function(a){a[1](Error('Client is resynchronizing'))})} +function Xj(){return /iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==='MacIntel'&&navigator.maxTouchPoints>1} +function Wj(){this.a=new bC($wnd.navigator.userAgent);this.a.b?'ontouchstart' in window:this.a.f?!!navigator.msMaxTouchPoints:Vj()} +function qn(a){this.b=new $wnd.Set;this.a=new $wnd.Map;this.d=!!($wnd.HTMLImports&&$wnd.HTMLImports.whenReady);this.c=a;jn(this)} +function xq(a){this.c=a;oo(Ic(lk(a,De),12),new Hq(this));uC($wnd,'offline',new Jq(this),false);uC($wnd,'online',new Lq(this),false)} +function iC(){iC=Qi;hC=new jC('STYLESHEET',0);fC=new jC('JAVASCRIPT',1);gC=new jC('JS_MODULE',2);eC=new jC('DYNAMIC_IMPORT',3)} +function ht(a,b,c,d,e){var f;f={};f[mH]='mSync';f[aI]=XC(b.d);f['feature']=Object(c);f['property']=d;f[uH]=e==null?null:e;gt(a,f)} +function cB(a){var b;a.d=true;bB(a);a.e||rB(new hB(a));if(a.c.size!=0){b=a.c;a.c=new $wnd.Set;b.forEach(Ri(lB.prototype.hb,lB,[]))}} +function pw(a){var b;if(!a.b){debugger;throw Hi(new kD('Cannot bind shadow root to a Node'))}b=ju(a.e,20);hw(a);return HA(b,new Xy(a))} +function sw(a){var b;b=Pc(Kz(JA(ju(a,0),'tag')));if(b==null){debugger;throw Hi(new kD('New child must have a tag'))}return HC($doc,b)} +function $l(a){return typeof a.update==UG&&a.updateComplete instanceof Promise&&typeof a.shouldUpdate==UG&&typeof a.firstUpdated==UG} +function RD(a){var b;b=ND(a);if(b>3.4028234663852886E38){return Infinity}else if(b<-3.4028234663852886E38){return -Infinity}return b} +function qD(a){if(a>=48&&a<48+$wnd.Math.min(10,10)){return a-48}if(a>=97&&a<97){return a-97+10}if(a>=65&&a<65){return a-65+10}return -1} +function ID(a,b){var c=0;while(!b[c]||b[c]==''){c++}var d=b[c++];for(;c0){$wnd.Error.stackTraceLimit=Error.stackTraceLimit=64;return true}return 'stack' in new Error} +function Al(a,b){var c,d;d=ju(a,1);if(!a.a){nm(Pc(Kz(JA(ju(a,0),'tag'))),new Dl(a,b));return}for(c=0;cd&&Cc(b,d,null);return b} +function iu(a,b){var c,d;d=b;c=Ic(a.c.get(d),33);if(!c){c=new yA(b,a);a.c.set(d,c)}if(!Sc(c,27)){debugger;throw Hi(new jD)}return Ic(c,27)} +function ju(a,b){var c,d;d=b;c=Ic(a.c.get(d),33);if(!c){c=new MA(b,a);a.c.set(d,c)}if(!Sc(c,41)){debugger;throw Hi(new jD)}return Ic(c,41)} +function kE(a,b){DG(a);if(b==null){return false}if(jE(a,b)){return true}return a.length==b.length&&jE(a.toLowerCase(),b.toLowerCase())} +function Rp(){Rp=Qi;Op=new Sp('CONNECT_PENDING',0);Np=new Sp('CONNECTED',1);Qp=new Sp('DISCONNECT_PENDING',2);Pp=new Sp('DISCONNECTED',3)} +function rq(a,b){if(a.b!=b){return}a.b=null;a.a=0;Zj('connected');$j&&($wnd.console.log('Re-established connection to server'),undefined)} +function ft(a,b,c,d,e){var f;f={};f[mH]='attachExistingElementById';f[aI]=XC(b.d);f[bI]=Object(c);f[cI]=Object(d);f['attachId']=e;gt(a,f)} +function Mk(a){$j&&($wnd.console.log('Finished loading eager dependencies, loading lazy.'),undefined);a.forEach(Ri(ql.prototype.db,ql,[]))} +function Mu(a){vA(iu(a.e,24),Ri(Yu.prototype.hb,Yu,[]));gu(a.e,Ri(av.prototype.db,av,[]));a.a.forEach(Ri($u.prototype.db,$u,[a]));a.d=true} +function PG(a){NG();var b,c,d;c=':'+a;d=MG[c];if(d!=null){return ad((DG(d),d))}d=KG[c];b=d==null?OG(a):ad((DG(d),d));QG();MG[c]=b;return b} +function O(a){return Xc(a)?PG(a):Uc(a)?ad((DG(a),a)):Tc(a)?(DG(a),a)?1231:1237:Rc(a)?a.s():Bc(a)?JG(a):!!a&&!!a.hashCode?a.hashCode():JG(a)} +function ok(a,b,c){if(a.a.has(b)){debugger;throw Hi(new kD((sD(b),'Registry already has a class of type '+b.i+' registered')))}a.a.set(b,c)} +function mv(a,b){lv();var c;if(a.g.f){debugger;throw Hi(new kD('Binding state node while processing state tree changes'))}c=nv(a);c.Jb(a,b,jv)} +function Dz(a,b,c,d,e){this.e=a;if(c==null){debugger;throw Hi(new jD)}if(d==null){debugger;throw Hi(new jD)}this.c=b;this.d=c;this.a=d;this.b=e} +function Pq(a){Xi(a.c);$j&&($wnd.console.debug('Sending heartbeat request...'),undefined);QB(a.d,null,'text/plain; charset=utf-8',new Uq(a))} +function Vw(a,b){var c,d;d=JA(b,wI);$z(d.a);d.c||Rz(d,a.getAttribute(wI));c=JA(b,xI);om(a)&&($z(c.a),!c.c)&&!!a.style&&Rz(c,a.style.display)} +function yl(a,b,c,d){var e,f;if(!d){f=Ic(lk(a.g.c,Vd),58);e=Ic(f.a.get(c),25);if(!e){f.b[b]=c;f.a.set(c,YD(b));return YD(b)}return e}return d} +function gx(a,b){var c,d;while(b!=null){for(c=a.length-1;c>-1;c--){d=Ic(a[c],6);if(b.isSameNode(d.a)){return d.d}}b=wz(b.parentNode)}return -1} +function Bl(a,b,c){var d;if(zl(a.a,c)){d=Ic(a.e.get(Og),77);if(!d||!d.a.has(c)){return}Jz(JA(b,c),a.a[c]).M()}else{KA(b,c)||Rz(JA(b,c),null)}} +function Kl(a,b,c){var d,e;e=Gu(Ic(lk(a.c,Xf),10),ad((DG(b),b)));if(e.c.has(1)){d=new $wnd.Map;IA(ju(e,1),Ri(Yl.prototype.db,Yl,[d]));c.set(b,d)}} +function JB(a,b,c){var d,e;e=Oc(a.c.get(b),$wnd.Map);if(e==null){e=new $wnd.Map;a.c.set(b,e)}d=Mc(e.get(c));if(d==null){d=[];e.set(c,d)}return d} +function fx(a){var b;dw==null&&(dw=new $wnd.Map);b=Lc(dw.get(a));if(b==null){b=Lc(new $wnd.Function(_H,sI,'return ('+a+')'));dw.set(a,b)}return b} +function Br(){if($wnd.performance&&$wnd.performance.timing){return (new Date).getTime()-$wnd.performance.timing.responseStart}else{return -1}} +function Ov(a,b,c,d){var e,f,g,h,i;i=Nc(a.cb());h=d.d;for(g=0;g=1&&_B(a[0],'OS major');if(a.length>=2){b=lE(a[1],vE(45));if(b>-1){c=a[1].substr(0,b-0);_B(c,EI)}else{_B(a[1],EI)}}} +function X(a,b,c){var d,e,f,g,h;Y(a);for(e=(a.i==null&&(a.i=zc(ei,XG,5,0,0,1)),a.i),f=0,g=e.length;f0?FB(a,new OB(a,b,c)):(d=JB(a,b,null),d.push(c));return new NB} +function fm(a,b){var c,d,e,f,g;f=a.f;d=a.e.e;g=jm(d);if(!g){gk(yH+d.d+zH);return}c=cm(($z(a.a),a.g));if(pm(g.a)){e=lm(g,d,f);e!=null&&vm(g.a,e,c);return}b[f]=c} +function Oq(a){if(a.a>0){_j('Scheduling heartbeat in '+a.a+' seconds');Yi(a.c,a.a*1000)}else{$j&&($wnd.console.debug('Disabling heartbeat'),undefined);Xi(a.c)}} +function uw(a,b,c,d,e,f){var g,h;if(!Zw(a.e,b,e,f)){return}g=Nc(d.cb());if($w(g,b,e,f,a)){if(!c){h=Ic(lk(b.g.c,Xd),50);h.a.add(b.d);Ml(h)}ou(b,g);ov(b)}c||tB()} +function vs(a){var b,c,d,e;b=JA(ju(Ic(lk(a.a,Xf),10).e,5),'parameters');e=($z(b.a),Ic(b.g,6));d=ju(e,6);c=new $wnd.Map;IA(d,Ri(Hs.prototype.db,Hs,[c]));return c} +function Ru(a,b){var c,d;if(!b){debugger;throw Hi(new jD)}d=b.e;c=d.e;if(Nl(Ic(lk(a.c,Xd),50),b)||!Ju(a,c)){return}ht(Ic(lk(a.c,Df),32),c,d.d,b.f,($z(b.a),b.g))} +function fn(){var a,b,c,d;b=$doc.head.childNodes;c=b.length;for(d=0;d=0;d--){if(jE(a[d].d,b)||jE(a[d].d,c)){a.length>=d+1&&a.splice(0,d+1);break}}return a} +function et(a,b,c,d,e,f){var g;g={};g[mH]='attachExistingElement';g[aI]=XC(b.d);g[bI]=Object(c);g[cI]=Object(d);g['attachTagName']=e;g['attachIndex']=Object(f);gt(a,g)} +function pm(a){var b=typeof $wnd.Polymer===UG&&$wnd.Polymer.Element&&a instanceof $wnd.Polymer.Element;var c=a.constructor.polymerElementVersion!==undefined;return b||c} +function Nv(a,b,c,d){var e,f,g,h;h=iu(b,c);$z(h.a);if(h.c.length>0){f=Nc(a.cb());for(e=0;e<($z(h.a),h.c.length);e++){g=Pc(h.c[e]);Vv(f,g,b,d)}}return tA(h,new Rv(a,b,d))} +function ex(a,b){var c,d,e,f,g;c=wz(b).childNodes;for(e=0;e but none was found. Appending instead."),undefined);FC($doc.head,a,b)} +function ND(a){MD==null&&(MD=new RegExp('^\\s*[+-]?(NaN|Infinity|((\\d+\\.?\\d*)|(\\.\\d+))([eE][+-]?\\d+)?[dDfF]?)\\s*$'));if(!MD.test(a)){throw Hi(new dE(NI+a+'"'))}return parseFloat(a)} +function uE(a){var b,c,d;c=a.length;d=0;while(dd&&(FG(b-1,a.length),a.charCodeAt(b-1)<=32)){--b}return d>0||b=65536){b=55296+(a-65536>>10&1023)&65535;c=56320+(a-65536&1023)&65535;return String.fromCharCode(b)+(''+String.fromCharCode(c))}else{return String.fromCharCode(a&65535)}} +function Ib(a){a&&Sb((Qb(),Pb));--yb;if(yb<0){debugger;throw Hi(new kD('Negative entryDepth value at exit '+yb))}if(a){if(yb!=0){debugger;throw Hi(new kD('Depth not 0'+yb))}if(Cb!=-1){Nb(Cb);Cb=-1}}} +function vx(a,b,c,d){var e,f,g,h,i,j,k;e=false;for(h=0;h2000){Bb=a;Cb=$wnd.setTimeout(Ob,10)}}if(yb++==0){Rb((Qb(),Pb));return true}return false} +function Dj(f,b,c){var d=f;var e=$wnd.Vaadin.Flow.clients[b];e.isActive=RG(function(){return d.U()});e.getVersionInfo=RG(function(a){return {'flow':c}});e.debug=RG(function(){var a=d.a;return a.ab().Hb().Eb()})} +function Lp(a){var b,c,d;if(a.a>=a.b.length){debugger;throw Hi(new jD)}if(a.a==0){c=''+a.b.length+'|';b=4095-c.length;d=c+tE(a.b,0,$wnd.Math.min(a.b.length,b));a.a+=b}else{d=Kp(a,a.a,a.a+4095);a.a+=4095}return d} +function rr(a){var b,c,d,e;if(a.g.length==0){return false}e=-1;for(b=0;b=f&&(FG(b,a.length),a.charCodeAt(b)!=32)){--b}if(b==f){return}d=a.substr(b+1,c-(b+1));e=rE(d,'\\.');XB(e)} +function Ot(a,b){var c,d,e,f,g,h;if(!b){debugger;throw Hi(new jD)}for(d=(g=ZC(b),g),e=0,f=d.length;e=0;d--){AE((g.a+=i,g),Pc(c[d]));i='.'}return g.a} +function sp(a,b){var c,d,e,f,g;if(wp()){pp(b.a)}else{f=(Ic(lk(a.d,td),8).i?(e='VAADIN/static/push/vaadinPush-min.js'):(e='VAADIN/static/push/vaadinPush.js'),e);$j&&MC($wnd.console,'Loading '+f);d=Ic(lk(a.d,se),56);g=Ic(lk(a.d,td),8).k+f;c=new Hp(a,f,b);nn(d,g,c,false,rH)}} +function EB(a,b){var c,d,e,f,g,h;if(TC(b)==1){c=b;h=ad(WC(c[0]));switch(h){case 0:{g=ad(WC(c[1]));d=(f=g,Ic(a.a.get(f),6)).a;return d}case 1:return e=Mc(c[1]),e;case 2:return CB(ad(WC(c[1])),ad(WC(c[2])),Ic(lk(a.c,Df),32));default:throw Hi(new SD(CI+UC(c)));}}else{return b}} +function or(a,b){var c,d,e,f,g;$j&&($wnd.console.log('Handling dependencies'),undefined);c=new $wnd.Map;for(e=(qC(),Dc(xc(wh,1),XG,42,0,[oC,nC,pC])),f=0,g=e.length;fa.a){a.a==0?$j&&MC($wnd.console,'Updating client-to-server id to '+b+' based on server'):gk('Server expects next client-to-server id to be '+b+' but we were going to use '+a.a+'. Will use '+b+'.');a.a=b}} +function tn(a,b,c){a.onload=RG(function(){a.onload=null;a.onerror=null;a.onreadystatechange=null;b.fb(c)});a.onerror=RG(function(){a.onload=null;a.onerror=null;a.onreadystatechange=null;b.eb(c)});a.onreadystatechange=function(){('loaded'===a.readyState||'complete'===a.readyState)&&a.onload(arguments[0])}} +function on(a,b,c){var d,e,f;f=Oo(b);d=new Fn(f);if(a.b.has(f)){!!c&&c.fb(d);return}if(sn(f,c,a.a)){e=$doc.createElement('link');e.rel=FH;e.type='text/css';e.href=f;if((!Uj&&(Uj=new Wj),Uj).a.j||Xj()){ac((Qb(),new wn(a,f,d)),10)}else{tn(e,new Jn(a,f),d);(!Uj&&(Uj=new Wj),Uj).a.i&&Yi(new yn(a,f,d),5000)}en(e)}} +function Xw(a,b){var c,d,e,f,g,h;c=a.f;d=b.style;$z(a.a);if(a.c){h=($z(a.a),Pc(a.g));e=false;if(h.indexOf('!important')!=-1){f=HC($doc,b.tagName);g=f.style;g.cssText=c+': '+h+';';if(jE('important',yC(f.style,c))){BC(d,c,zC(f.style,c),'important');e=true}}e||(d.setProperty(c,h),undefined)}else{d.removeProperty(c)}} +function aq(a){var b,c,d,e;Mz((c=ju(Ic(lk(Ic(lk(a.c,xf),35).a,Xf),10).e,9),JA(c,QH)))!=null&&Yj('reconnectingText',Mz((d=ju(Ic(lk(Ic(lk(a.c,xf),35).a,Xf),10).e,9),JA(d,QH))));Mz((e=ju(Ic(lk(Ic(lk(a.c,xf),35).a,Xf),10).e,9),JA(e,RH)))!=null&&Yj('offlineText',Mz((b=ju(Ic(lk(Ic(lk(a.c,xf),35).a,Xf),10).e,9),JA(b,RH))))} +function hm(a,b){var c,d,e,f,g;c=wz(a).children;e=-1;for(f=0;f0){k=yw(a,b);d=!k?null:wz(k.a).nextSibling}else{d=null}for(g=0;g0){e=i.length;while(e>0&&i[e-1]==''){--e}e0&&(FG(0,a.length),a.charCodeAt(0)==45||(FG(0,a.length),a.charCodeAt(0)==43))?1:0;for(b=e;b2147483647){throw Hi(new dE(NI+a+'"'))}return f} +function Zw(a,b,c,d){var e,f,g,h,i;i=iu(a,24);for(f=0;f<($z(i.a),i.c.length);f++){e=Ic(i.c[f],6);if(e==b){continue}if(jE((h=ju(b,0),UC(Nc(Kz(JA(h,fI))))),(g=ju(e,0),UC(Nc(Kz(JA(g,fI))))))){gk('There is already a request to attach element addressed by the '+d+". The existing request's node id='"+e.d+"'. Cannot attach the same element twice.");Qu(b.g,a,b.d,e.d,c);return false}}return true} +function Wr(a){var b,c,d;d=Ic(lk(a.c,Hf),34);if(d.c.length==0&&a.d!=1){return}c=d.c;d.c=[];d.b=false;d.a=mt;if(c.length==0&&a.d!=1){$j&&($wnd.console.warn('All RPCs filtered out, not sending anything to the server'),undefined);return}b={};if(a.d==1){a.d=2;$j&&($wnd.console.log('Resynchronizing from server'),undefined);b[TH]=Object(true)}Zj('loading');Qs(Ic(lk(a.c,zf),15));_r(a,Yr(a,c,b))} +function wc(a,b){var c;switch(yc(a)){case 6:return Xc(b);case 7:return Uc(b);case 8:return Tc(b);case 3:return Array.isArray(b)&&(c=yc(b),!(c>=14&&c<=16));case 11:return b!=null&&Yc(b);case 12:return b!=null&&(typeof b===SG||typeof b==UG);case 0:return Hc(b,a.__elementTypeId$);case 2:return Zc(b)&&!(b.mc===Ui);case 1:return Zc(b)&&!(b.mc===Ui)||Hc(b,a.__elementTypeId$);default:return true;}} +function wl(b,c){if(document.body.$&&document.body.$.hasOwnProperty&&document.body.$.hasOwnProperty(c)){return document.body.$[c]}else if(b.shadowRoot){return b.shadowRoot.getElementById(c)}else if(b.getElementById){return b.getElementById(c)}else if(c&&c.match('^[a-zA-Z0-9-_]*$')){return b.querySelector('#'+c)}else{return Array.from(b.querySelectorAll('[id]')).find(function(a){return a.id==c})}} +function rp(a,b){var c,d;if(!mp(a)){throw Hi(new TD('This server to client push connection should not be used to send client to server messages'))}if(a.f==(Rp(),Np)){d=Qo(b);fk('Sending push ('+a.g+') message to server: '+d);if(jE(a.g,KH)){c=new Mp(d);while(c.a=Lz((d=ju(Ic(lk(Ic(lk(a.c,xf),35).a,Xf),10).e,9),JA(d,'reconnectAttempts')),10000)?cq(a):sq(a,c)} +function xl(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r;j=null;g=wz(a.a).childNodes;o=new $wnd.Map;e=!b;i=-1;for(m=0;m=f){debugger;throw Hi(new jD)}return g.length==0?null:g}else{return a}} +function hx(a,b,c,d,e){var f,g,h;h=Gu(e,ad(a));if(!h.c.has(1)){return}if(!cx(h,b)){debugger;throw Hi(new kD('Host element is not a parent of the node whose property has changed. This is an implementation error. Most likely it means that there are several StateTrees on the same page (might be possible with portlets) and the target StateTree should not be passed into the method as an argument but somehow detected from the host element. Another option is that host element is calculated incorrectly.'))}f=ju(h,1);g=JA(f,c);Jz(g,d).M()} +function Tn(a,b,c,d){var e,f,g,h,i,j;h=$doc;j=h.createElement('div');j.className='v-system-error';if(a!=null){f=h.createElement('div');f.className='caption';f.textContent=a;j.appendChild(f);$j&&LC($wnd.console,a)}if(b!=null){i=h.createElement('div');i.className='message';i.textContent=b;j.appendChild(i);$j&&LC($wnd.console,b)}if(c!=null){g=h.createElement('div');g.className='details';g.textContent=c;j.appendChild(g);$j&&LC($wnd.console,c)}if(d!=null){e=h.querySelector(d);!!e&&DC(Nc(pF(tF(e.shadowRoot),e)),j)}else{EC(h.body,j)}return j} +function $o(a,b){var c,d,e;c=gp(b,'serviceUrl');Aj(a,ep(b,'webComponentMode'));if(c==null){vj(a,Oo('.'));mj(a,Oo(gp(b,HH)))}else{a.k=c;mj(a,Oo(c+(''+gp(b,HH))))}zj(a,fp(b,'v-uiId').a);pj(a,fp(b,'heartbeatInterval').a);sj(a,fp(b,'maxMessageSuspendTimeout').a);wj(a,(d=b.getConfig(IH),d?d.vaadinVersion:null));e=b.getConfig(IH);dp();xj(a,b.getConfig('sessExpMsg'));tj(a,!ep(b,'debug'));uj(a,ep(b,'requestTiming'));oj(a,b.getConfig('webcomponents'));nj(a,ep(b,'devToolsEnabled'));rj(a,gp(b,'liveReloadUrl'));qj(a,gp(b,'liveReloadBackend'));yj(a,gp(b,'springBootLiveReloadPort'))} +function qc(a,b){var c,d,e,f,g,h,i,j,k;j='';if(b.length==0){return a.K(eH,cH,-1,-1)}k=uE(b);jE(k.substr(0,3),'at ')&&(k=k.substr(3));k=k.replace(/\[.*?\]/g,'');g=k.indexOf('(');if(g==-1){g=k.indexOf('@');if(g==-1){j=k;k=''}else{j=uE(k.substr(g+1));k=uE(k.substr(0,g))}}else{c=k.indexOf(')',g);j=k.substr(g+1,c-(g+1));k=uE(k.substr(0,g))}g=lE(k,vE(46));g!=-1&&(k=k.substr(g+1));(k.length==0||jE(k,'Anonymous function'))&&(k=cH);h=nE(j,vE(58));e=oE(j,vE(58),h-1);i=-1;d=-1;f=eH;if(h!=-1&&e!=-1){f=j.substr(0,e);i=kc(j.substr(e+1,h-(e+1)));d=kc(j.substr(h+1))}return a.K(f,k,i,d)} +function wk(a,b){this.a=new $wnd.Map;this.b=new $wnd.Map;ok(this,yd,a);ok(this,td,b);ok(this,se,new qn(this));ok(this,Ee,new Mo(this));ok(this,Sd,new Qk(this));ok(this,ye,new Yn(this));pk(this,De,new xk);ok(this,Xf,new Uu(this));ok(this,zf,new Rs(this));ok(this,lf,new Ar(this));ok(this,nf,new es(this));ok(this,Hf,new rt(this));ok(this,Df,new jt(this));ok(this,Sf,new Xt(this));pk(this,Of,new zk);pk(this,Vd,new Bk);ok(this,Xd,new Sl(this));ok(this,Ye,new Rq(this));ok(this,Oe,new xq(this));ok(this,Nf,new At(this));ok(this,vf,new ys(this));ok(this,xf,new Js(this));ok(this,rf,new ps(this))} +function wb(b){var c=function(a){return typeof a!=aH};var d=function(a){return a.replace(/\r\n/g,'')};if(c(b.outerHTML))return d(b.outerHTML);c(b.innerHTML)&&b.cloneNode&&$doc.createElement('div').appendChild(b.cloneNode(true)).innerHTML;if(c(b.nodeType)&&b.nodeType==3){return "'"+b.data.replace(/ /g,'\u25AB').replace(/\u00A0/,'\u25AA')+"'"}if(typeof c(b.htmlText)&&b.collapse){var e=b.htmlText;if(e){return 'IETextRange ['+d(e)+']'}else{var f=b.duplicate();f.pasteHTML('|');var g='IETextRange '+d(b.parentElement().outerHTML);f.moveStart('character',-1);f.pasteHTML('');return g}}return b.toString?b.toString():'[JavaScriptObject]'} +function um(a,b,c){var d,e,f;f=[];if(a.c.has(1)){if(!Sc(b,41)){debugger;throw Hi(new kD('Received an inconsistent NodeFeature for a node that has a ELEMENT_PROPERTIES feature. It should be NodeMap, but it is: '+b))}e=Ic(b,41);IA(e,Ri(Om.prototype.db,Om,[f,c]));f.push(HA(e,new Km(f,c)))}else if(a.c.has(16)){if(!Sc(b,27)){debugger;throw Hi(new kD('Received an inconsistent NodeFeature for a node that has a TEMPLATE_MODELLIST feature. It should be NodeList, but it is: '+b))}d=Ic(b,27);f.push(tA(d,new Em(c)))}if(f.length==0){debugger;throw Hi(new kD('Node should have ELEMENT_PROPERTIES or TEMPLATE_MODELLIST feature'))}f.push(fu(a,new Im(f)))} +function $w(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o;l=e.e;o=Pc(Kz(JA(ju(b,0),'tag')));h=false;if(!a){h=true;$j&&NC($wnd.console,yI+d+" is not found. The requested tag name is '"+o+"'")}else if(!(!!a&&kE(o,a.tagName))){h=true;gk(yI+d+" has the wrong tag name '"+a.tagName+"', the requested tag name is '"+o+"'")}if(h){Qu(l.g,l,b.d,-1,c);return false}if(!l.c.has(20)){return true}k=ju(l,20);m=Ic(Kz(JA(k,tI)),6);if(!m){return true}j=iu(m,2);g=null;for(i=0;i<($z(j.a),j.c.length);i++){n=Ic(j.c[i],6);f=n.a;if(K(f,a)){g=YD(n.d);break}}if(g){$j&&NC($wnd.console,yI+d+" has been already attached previously via the node id='"+g+"'");Qu(l.g,l,b.d,g.a,c);return false}return true} +function Tt(b,c,d,e){var f,g,h,i,j,k,l,m,n;if(c.length!=d.length+1){debugger;throw Hi(new jD)}try{j=new ($wnd.Function.bind.apply($wnd.Function,[null].concat(c)));j.apply(Rt(b,e,new bu(b)),d)}catch(a){a=Gi(a);if(Sc(a,7)){i=a;$j&&ak(new hk(i));$j&&($wnd.console.error('Exception is thrown during JavaScript execution. Stacktrace will be dumped separately.'),undefined);if(!Ic(lk(b.a,td),8).i){g=new DE('[');h='';for(l=c,m=0,n=l.length;m=0){g=b.substr(f+3);g=qE(g,JI,'$1');this.a=RD(g)}}else if(this.l){g=sE(b,b.indexOf('webkit/')+7);g=qE(g,KI,'$1');this.a=RD(g)}else if(this.k){g=sE(b,b.indexOf(GI)+8);g=qE(g,KI,'$1');this.a=RD(g);this.a>7&&(this.a=7)}else this.c&&(this.a=0)}catch(a){a=Gi(a);if(Sc(a,7)){c=a;GE();'Browser engine version parsing failed for: '+b+' '+c.C()}else throw Hi(a)}try{if(this.f){if(b.indexOf('msie')!=-1){if(this.k);else{e=sE(b,b.indexOf('msie ')+5);e=dC(e,0,lE(e,vE(59)));aC(e)}}else{f=b.indexOf('rv:');if(f>=0){g=b.substr(f+3);g=qE(g,JI,'$1');aC(g)}}}else if(this.d){d=b.indexOf(' firefox/')+9;aC(dC(b,d,d+5))}else if(this.b){YB(b)}else if(this.j){d=b.indexOf(' version/');if(d>=0){d+=9;aC(dC(b,d,d+5))}}else if(this.i){d=b.indexOf(' version/');d!=-1?(d+=9):(d=b.indexOf('opera/')+6);aC(dC(b,d,d+5))}else if(this.c){d=b.indexOf(' edge/')+6;b.indexOf(' edg/')!=-1?(d=b.indexOf(' edg/')+5):b.indexOf(HI)!=-1?(d=b.indexOf(HI)+6):b.indexOf(II)!=-1&&(d=b.indexOf(II)+8);aC(dC(b,d,d+8))}}catch(a){a=Gi(a);if(Sc(a,7)){c=a;GE();'Browser version parsing failed for: '+b+' '+c.C()}else throw Hi(a)}if(b.indexOf('windows ')!=-1){b.indexOf('windows phone')!=-1}else if(b.indexOf('android')!=-1){VB(b)}else if(b.indexOf('linux')!=-1);else if(b.indexOf('macintosh')!=-1||b.indexOf('mac osx')!=-1||b.indexOf('mac os x')!=-1){this.g=b.indexOf('ipad')!=-1;this.h=b.indexOf('iphone')!=-1;(this.g||this.h)&&ZB(b)}else b.indexOf('; cros ')!=-1&&WB(b)} +var SG='object',TG='[object Array]',UG='function',VG='java.lang',WG='com.google.gwt.core.client',XG={4:1},YG='__noinit__',ZG={4:1,7:1,9:1,5:1},$G='null',_G='com.google.gwt.core.client.impl',aH='undefined',bH='Working array length changed ',cH='anonymous',dH='fnStack',eH='Unknown',fH='must be non-negative',gH='must be positive',hH='com.google.web.bindery.event.shared',iH='com.vaadin.client',jH='url',kH={66:1},lH={30:1},mH='type',nH={46:1},oH={24:1},pH={19:1},qH={26:1},rH='text/javascript',sH='constructor',tH='properties',uH='value',vH='com.vaadin.client.flow.reactive',wH={14:1},xH='nodeId',yH='Root node for node ',zH=' could not be found',AH=' is not an Element',BH={64:1},CH={81:1},DH={45:1},EH='script',FH='stylesheet',GH='com.vaadin.flow.shared',HH='contextRootUrl',IH='versionInfo',JH='v-uiId=',KH='websocket',LH='transport',MH='application/json; charset=UTF-8',NH='VAADIN/push',OH='com.vaadin.client.communication',PH={89:1},QH='dialogText',RH='dialogTextGaveUp',SH='syncId',TH='resynchronize',UH='Received message with server id ',VH='clientId',WH='Vaadin-Security-Key',XH='Vaadin-Push-ID',YH='sessionExpired',ZH='pushServletMapping',_H='event',aI='node',bI='attachReqId',cI='attachAssignedId',dI='com.vaadin.client.flow',eI='bound',fI='payload',gI='subTemplate',hI={44:1},iI='Node is null',jI='Node is not created for this tree',kI='Node id is not registered with this tree',lI='$server',mI='feat',nI='remove',oI='com.vaadin.client.flow.binding',pI='trailing',qI='intermediate',rI='elemental.util',sI='element',tI='shadowRoot',uI='The HTML node for the StateNode with id=',vI='An error occurred when Flow tried to find a state node matching the element ',wI='hidden',xI='styleDisplay',yI='Element addressed by the ',zI='dom-repeat',AI='dom-change',BI='com.vaadin.client.flow.nodefeature',CI='Unsupported complex type in ',DI='com.vaadin.client.gwt.com.google.web.bindery.event.shared',EI='OS minor',FI=' headlesschrome/',GI='trident/',HI=' edga/',II=' edgios/',JI='(\\.[0-9]+).+',KI='([0-9]+\\.[0-9]+).*',LI='com.vaadin.flow.shared.ui',MI='java.io',NI='For input string: "',OI='java.util',QI='java.util.stream',RI='Index: ',SI=', Size: ',TI='user.agent';var _,Ni,Ii,Fi=-1;$wnd.goog=$wnd.goog||{};$wnd.goog.global=$wnd.goog.global||$wnd;Oi();Pi(1,null,{},I);_.q=function J(a){return H(this,a)};_.r=function L(){return this.kc};_.s=function N(){return JG(this)};_.t=function P(){var a;return tD(M(this))+'@'+(a=O(this)>>>0,a.toString(16))};_.equals=function(a){return this.q(a)};_.hashCode=function(){return this.s()};_.toString=function(){return this.t()};var Ec,Fc,Gc;Pi(67,1,{67:1},uD);_.Wb=function vD(a){var b;b=new uD;b.e=4;a>1?(b.c=BD(this,a-1)):(b.c=this);return b};_.Xb=function AD(){sD(this);return this.b};_.Yb=function CD(){return tD(this)};_.Zb=function ED(){sD(this);return this.g};_.$b=function GD(){return (this.e&4)!=0};_._b=function HD(){return (this.e&1)!=0};_.t=function KD(){return ((this.e&2)!=0?'interface ':(this.e&1)!=0?'':'class ')+(sD(this),this.i)};_.e=0;var rD=1;var Yh=xD(VG,'Object',1);var Lh=xD(VG,'Class',67);Pi(94,1,{},R);_.a=0;var cd=xD(WG,'Duration',94);var S=null;Pi(5,1,{4:1,5:1});_.v=function bb(a){return new Error(a)};_.w=function db(){return this.e};_.A=function eb(){var a;return a=Ic(eG(gG(iF((this.i==null&&(this.i=zc(ei,XG,5,0,0,1)),this.i)),new IE),PF(new $F,new YF,new aG,Dc(xc(ti,1),XG,47,0,[(TF(),RF)]))),90),YE(a,zc(Yh,XG,1,a.a.length,5,1))};_.B=function fb(){return this.f};_.C=function gb(){return this.g};_.D=function hb(){Z(this,cb(this.v($(this,this.g))));hc(this)};_.t=function jb(){return $(this,this.C())};_.e=YG;_.j=true;var ei=xD(VG,'Throwable',5);Pi(7,5,{4:1,7:1,5:1});var Ph=xD(VG,'Exception',7);Pi(9,7,ZG,mb);var $h=xD(VG,'RuntimeException',9);Pi(53,9,ZG,nb);var Uh=xD(VG,'JsException',53);Pi(119,53,ZG);var gd=xD(_G,'JavaScriptExceptionBase',119);Pi(31,119,{31:1,4:1,7:1,9:1,5:1},rb);_.C=function ub(){return qb(this),this.c};_.F=function vb(){return _c(this.b)===_c(ob)?null:this.b};var ob;var dd=xD(WG,'JavaScriptException',31);var ed=xD(WG,'JavaScriptObject$',0);Pi(305,1,{});var fd=xD(WG,'Scheduler',305);var yb=0,zb=false,Ab,Bb=0,Cb=-1;Pi(129,305,{});_.e=false;_.i=false;var Pb;var kd=xD(_G,'SchedulerImpl',129);Pi(130,1,{},bc);_.G=function cc(){this.a.e=true;Tb(this.a);this.a.e=false;return this.a.i=Ub(this.a)};var hd=xD(_G,'SchedulerImpl/Flusher',130);Pi(131,1,{},dc);_.G=function ec(){this.a.e&&_b(this.a.f,1);return this.a.i};var jd=xD(_G,'SchedulerImpl/Rescuer',131);var fc;Pi(315,1,{});var od=xD(_G,'StackTraceCreator/Collector',315);Pi(120,315,{},nc);_.I=function oc(a){var b={},j;var c=[];a[dH]=c;var d=arguments.callee.caller;while(d){var e=(gc(),d.name||(d.name=jc(d.toString())));c.push(e);var f=':'+e;var g=b[f];if(g){var h,i;for(h=0,i=g.length;h0){hn(this.b,this.c);return false}else if(a==0){gn(this.b,this.c);return true}else if(Q(this.a)>60000){gn(this.b,this.c);return false}else{return true}};var he=xD(iH,'ResourceLoader/1',185);Pi(186,40,{},yn);_.M=function zn(){this.a.b.has(this.c)||gn(this.a,this.b)};var ie=xD(iH,'ResourceLoader/2',186);Pi(190,40,{},An);_.M=function Bn(){this.a.b.has(this.c)?hn(this.a,this.b):gn(this.a,this.b)};var je=xD(iH,'ResourceLoader/3',190);Pi(191,1,oH,Cn);_.eb=function Dn(a){gn(this.a,a)};_.fb=function En(a){hn(this.a,a)};var ke=xD(iH,'ResourceLoader/4',191);Pi(61,1,{},Fn);var le=xD(iH,'ResourceLoader/ResourceLoadEvent',61);Pi(98,1,oH,Gn);_.eb=function Hn(a){gn(this.a,a)};_.fb=function In(a){hn(this.a,a)};var ne=xD(iH,'ResourceLoader/SimpleLoadListener',98);Pi(184,1,oH,Jn);_.eb=function Kn(a){gn(this.a,a)};_.fb=function Ln(a){var b;if((!Uj&&(Uj=new Wj),Uj).a.b||(!Uj&&(Uj=new Wj),Uj).a.f||(!Uj&&(Uj=new Wj),Uj).a.c){b=un(this.b);if(b==0){gn(this.a,a);return}}hn(this.a,a)};var oe=xD(iH,'ResourceLoader/StyleSheetLoadListener',184);Pi(187,1,lH,Mn);_.cb=function Nn(){return this.a.call(null)};var pe=xD(iH,'ResourceLoader/lambda$0$Type',187);Pi(188,1,pH,On);_.M=function Pn(){this.b.fb(this.a)};var qe=xD(iH,'ResourceLoader/lambda$1$Type',188);Pi(189,1,pH,Qn);_.M=function Rn(){this.b.eb(this.a)};var re=xD(iH,'ResourceLoader/lambda$2$Type',189);Pi(22,1,{22:1},Yn);var ye=xD(iH,'SystemErrorHandler',22);Pi(160,1,{},$n);_.nb=function _n(a,b){var c;c=b;Sn(c.C())};_.ob=function ao(a){var b;fk('Received xhr HTTP session resynchronization message: '+a.responseText);nk(this.a.a);po(Ic(lk(this.a.a,De),12),(Fo(),Do));b=Dr(Er(a.responseText));qr(Ic(lk(this.a.a,lf),21),b);zj(Ic(lk(this.a.a,td),8),b['uiId']);ko((Qb(),Pb),new eo(this))};var ve=xD(iH,'SystemErrorHandler/1',160);Pi(161,1,{},bo);_.hb=function co(a){Xn(Pc(a))};var te=xD(iH,'SystemErrorHandler/1/0methodref$recreateNodes$Type',161);Pi(162,1,{},eo);_.H=function fo(){fG(iF(Ic(lk(this.a.a.a,td),8).d),new bo)};var ue=xD(iH,'SystemErrorHandler/1/lambda$0$Type',162);Pi(158,1,{},go);_.V=function ho(a){Po(this.a)};var we=xD(iH,'SystemErrorHandler/lambda$0$Type',158);Pi(159,1,{},io);_.V=function jo(a){Zn(this.a,a)};var xe=xD(iH,'SystemErrorHandler/lambda$1$Type',159);Pi(133,129,{},lo);_.a=0;var Ae=xD(iH,'TrackingScheduler',133);Pi(134,1,{},mo);_.H=function no(){this.a.a--};var ze=xD(iH,'TrackingScheduler/lambda$0$Type',134);Pi(12,1,{12:1},qo);var De=xD(iH,'UILifecycle',12);Pi(166,322,{},so);_.O=function to(a){Ic(a,89).pb(this)};_.P=function uo(){return ro};var ro=null;var Be=xD(iH,'UILifecycle/StateChangeEvent',166);Pi(20,1,{4:1,29:1,20:1});_.q=function yo(a){return this===a};_.s=function zo(){return JG(this)};_.t=function Ao(){return this.b!=null?this.b:''+this.c};_.c=0;var Nh=xD(VG,'Enum',20);Pi(59,20,{59:1,4:1,29:1,20:1},Go);var Co,Do,Eo;var Ce=yD(iH,'UILifecycle/UIState',59,Ho);Pi(321,1,XG);var uh=xD(GH,'VaadinUriResolver',321);Pi(49,321,{49:1,4:1},Mo);_.qb=function No(a){return Lo(this,a)};var Ee=xD(iH,'URIResolver',49);var So=false,To;Pi(113,1,{},bp);_.H=function cp(){Zo(this.a)};var Fe=xD('com.vaadin.client.bootstrap','Bootstrapper/lambda$0$Type',113);Pi(99,1,{},tp);_.rb=function vp(){return Ic(lk(this.d,lf),21).f};_.sb=function xp(a){this.f=(Rp(),Pp);Wn(Ic(lk(Ic(lk(this.d,Oe),16).c,ye),22),'','Client unexpectedly disconnected. Ensure client timeout is disabled.','',null,null)};_.tb=function yp(a){this.f=(Rp(),Op);Ic(lk(this.d,Oe),16);$j&&($wnd.console.log('Push connection closed'),undefined)};_.ub=function zp(a){this.f=(Rp(),Pp);dq(Ic(lk(this.d,Oe),16),'Push connection using '+a[LH]+' failed!')};_.vb=function Ap(a){var b,c;c=a['responseBody'];b=Dr(Er(c));if(!b){lq(Ic(lk(this.d,Oe),16),this,c);return}else{fk('Received push ('+this.g+') message: '+c);qr(Ic(lk(this.d,lf),21),b)}};_.wb=function Bp(a){fk('Push connection established using '+a[LH]);qp(this,a)};_.xb=function Cp(a,b){this.f==(Rp(),Np)&&(this.f=Op);oq(Ic(lk(this.d,Oe),16),this)};_.yb=function Dp(a){fk('Push connection re-established using '+a[LH]);qp(this,a)};_.zb=function Ep(){gk('Push connection using primary method ('+this.a[LH]+') failed. Trying with '+this.a['fallbackTransport'])};var Ne=xD(OH,'AtmospherePushConnection',99);Pi(242,1,{},Fp);_.H=function Gp(){hp(this.a)};var Ge=xD(OH,'AtmospherePushConnection/0methodref$connect$Type',242);Pi(244,1,oH,Hp);_.eb=function Ip(a){pq(Ic(lk(this.a.d,Oe),16),a.a)};_.fb=function Jp(a){if(wp()){fk(this.c+' loaded');pp(this.b.a)}else{pq(Ic(lk(this.a.d,Oe),16),a.a)}};var He=xD(OH,'AtmospherePushConnection/1',244);Pi(239,1,{},Mp);_.a=0;var Ie=xD(OH,'AtmospherePushConnection/FragmentedMessage',239);Pi(51,20,{51:1,4:1,29:1,20:1},Sp);var Np,Op,Pp,Qp;var Je=yD(OH,'AtmospherePushConnection/State',51,Tp);Pi(241,1,PH,Up);_.pb=function Vp(a){np(this.a,a)};var Ke=xD(OH,'AtmospherePushConnection/lambda$0$Type',241);Pi(240,1,qH,Wp);_.H=function Xp(){};var Le=xD(OH,'AtmospherePushConnection/lambda$1$Type',240);Pi(353,$wnd.Function,{},Yp);_.db=function Zp(a,b){op(this.a,Pc(a),Pc(b))};Pi(243,1,qH,$p);_.H=function _p(){pp(this.a)};var Me=xD(OH,'AtmospherePushConnection/lambda$3$Type',243);var Oe=zD(OH,'ConnectionStateHandler');Pi(213,1,{16:1},xq);_.a=0;_.b=null;var Ue=xD(OH,'DefaultConnectionStateHandler',213);Pi(215,40,{},yq);_.M=function zq(){this.a.d=null;bq(this.a,this.b)};var Pe=xD(OH,'DefaultConnectionStateHandler/1',215);Pi(62,20,{62:1,4:1,29:1,20:1},Fq);_.a=0;var Aq,Bq,Cq;var Qe=yD(OH,'DefaultConnectionStateHandler/Type',62,Gq);Pi(214,1,PH,Hq);_.pb=function Iq(a){jq(this.a,a)};var Re=xD(OH,'DefaultConnectionStateHandler/lambda$0$Type',214);Pi(216,1,{},Jq);_.V=function Kq(a){cq(this.a)};var Se=xD(OH,'DefaultConnectionStateHandler/lambda$1$Type',216);Pi(217,1,{},Lq);_.V=function Mq(a){kq(this.a)};var Te=xD(OH,'DefaultConnectionStateHandler/lambda$2$Type',217);Pi(55,1,{55:1},Rq);_.a=-1;var Ye=xD(OH,'Heartbeat',55);Pi(210,40,{},Sq);_.M=function Tq(){Pq(this.a)};var Ve=xD(OH,'Heartbeat/1',210);Pi(212,1,{},Uq);_.nb=function Vq(a,b){!b?hq(Ic(lk(this.a.b,Oe),16),a):gq(Ic(lk(this.a.b,Oe),16),b);Oq(this.a)};_.ob=function Wq(a){iq(Ic(lk(this.a.b,Oe),16));Oq(this.a)};var We=xD(OH,'Heartbeat/2',212);Pi(211,1,PH,Xq);_.pb=function Yq(a){Nq(this.a,a)};var Xe=xD(OH,'Heartbeat/lambda$0$Type',211);Pi(168,1,{},ar);_.hb=function br(a){Yj('firstDelay',YD(Ic(a,25).a))};var Ze=xD(OH,'LoadingIndicatorConfigurator/0methodref$setFirstDelay$Type',168);Pi(169,1,{},cr);_.hb=function dr(a){Yj('secondDelay',YD(Ic(a,25).a))};var $e=xD(OH,'LoadingIndicatorConfigurator/1methodref$setSecondDelay$Type',169);Pi(170,1,{},er);_.hb=function fr(a){Yj('thirdDelay',YD(Ic(a,25).a))};var _e=xD(OH,'LoadingIndicatorConfigurator/2methodref$setThirdDelay$Type',170);Pi(171,1,DH,gr);_.lb=function hr(a){_q(Nz(Ic(a.e,13)))};var af=xD(OH,'LoadingIndicatorConfigurator/lambda$3$Type',171);Pi(172,1,DH,ir);_.lb=function jr(a){$q(this.b,this.a,a)};_.a=0;var bf=xD(OH,'LoadingIndicatorConfigurator/lambda$4$Type',172);Pi(21,1,{21:1},Ar);_.a=0;_.b='init';_.d=false;_.e=0;_.f=-1;_.h=null;_.l=0;var lf=xD(OH,'MessageHandler',21);Pi(177,1,qH,Fr);_.H=function Gr(){!vz&&$wnd.Polymer!=null&&jE($wnd.Polymer.version.substr(0,'1.'.length),'1.')&&(vz=true,$j&&($wnd.console.log('Polymer micro is now loaded, using Polymer DOM API'),undefined),uz=new xz,undefined)};var cf=xD(OH,'MessageHandler/0methodref$updateApiImplementation$Type',177);Pi(176,40,{},Hr);_.M=function Ir(){mr(this.a)};var df=xD(OH,'MessageHandler/1',176);Pi(341,$wnd.Function,{},Jr);_.hb=function Kr(a){kr(Ic(a,6))};Pi(60,1,{60:1},Lr);var ef=xD(OH,'MessageHandler/PendingUIDLMessage',60);Pi(178,1,qH,Mr);_.H=function Nr(){xr(this.a,this.d,this.b,this.c)};_.c=0;var ff=xD(OH,'MessageHandler/lambda$1$Type',178);Pi(180,1,wH,Or);_.gb=function Pr(){sB(new Qr(this.a,this.b))};var gf=xD(OH,'MessageHandler/lambda$3$Type',180);Pi(179,1,wH,Qr);_.gb=function Rr(){ur(this.a,this.b)};var hf=xD(OH,'MessageHandler/lambda$4$Type',179);Pi(182,1,wH,Sr);_.gb=function Tr(){vr(this.a)};var jf=xD(OH,'MessageHandler/lambda$5$Type',182);Pi(181,1,{},Ur);_.H=function Vr(){this.a.forEach(Ri(Jr.prototype.hb,Jr,[]))};var kf=xD(OH,'MessageHandler/lambda$6$Type',181);Pi(18,1,{18:1},es);_.a=0;_.d=0;var nf=xD(OH,'MessageSender',18);Pi(174,1,qH,gs);_.H=function hs(){Xr(this.a)};var mf=xD(OH,'MessageSender/lambda$0$Type',174);Pi(163,1,DH,ks);_.lb=function ls(a){is(this.a,a)};var of=xD(OH,'PollConfigurator/lambda$0$Type',163);Pi(73,1,{73:1},ps);_.Ab=function qs(){var a;a=Ic(lk(this.b,Xf),10);Ou(a,a.e,'ui-poll',null)};_.a=null;var rf=xD(OH,'Poller',73);Pi(165,40,{},rs);_.M=function ss(){var a;a=Ic(lk(this.a.b,Xf),10);Ou(a,a.e,'ui-poll',null)};var pf=xD(OH,'Poller/1',165);Pi(164,1,PH,ts);_.pb=function us(a){ms(this.a,a)};var qf=xD(OH,'Poller/lambda$0$Type',164);Pi(48,1,{48:1},ys);var vf=xD(OH,'PushConfiguration',48);Pi(223,1,DH,Bs);_.lb=function Cs(a){xs(this.a,a)};var sf=xD(OH,'PushConfiguration/0methodref$onPushModeChange$Type',223);Pi(224,1,wH,Ds);_.gb=function Es(){ds(Ic(lk(this.a.a,nf),18),true)};var tf=xD(OH,'PushConfiguration/lambda$1$Type',224);Pi(225,1,wH,Fs);_.gb=function Gs(){ds(Ic(lk(this.a.a,nf),18),false)};var uf=xD(OH,'PushConfiguration/lambda$2$Type',225);Pi(347,$wnd.Function,{},Hs);_.db=function Is(a,b){As(this.a,Ic(a,13),Pc(b))};Pi(35,1,{35:1},Js);var xf=xD(OH,'ReconnectConfiguration',35);Pi(167,1,qH,Ks);_.H=function Ls(){aq(this.a)};var wf=xD(OH,'ReconnectConfiguration/lambda$0$Type',167);Pi(15,1,{15:1},Rs);_.b=false;var zf=xD(OH,'RequestResponseTracker',15);Pi(175,1,{},Ss);_.H=function Ts(){Ps(this.a)};var yf=xD(OH,'RequestResponseTracker/lambda$0$Type',175);Pi(238,322,{},Us);_.O=function Vs(a){bd(a);null.nc()};_.P=function Ws(){return null};var Af=xD(OH,'RequestStartingEvent',238);Pi(222,322,{},Ys);_.O=function Zs(a){Ic(a,326).a.b=false};_.P=function $s(){return Xs};var Xs;var Bf=xD(OH,'ResponseHandlingEndedEvent',222);Pi(279,322,{},_s);_.O=function at(a){bd(a);null.nc()};_.P=function bt(){return null};var Cf=xD(OH,'ResponseHandlingStartedEvent',279);Pi(32,1,{32:1},jt);_.Bb=function kt(a,b,c){ct(this,a,b,c)};_.Cb=function lt(a,b,c){var d;d={};d[mH]='channel';d[aI]=Object(a);d['channel']=Object(b);d['args']=c;gt(this,d)};var Df=xD(OH,'ServerConnector',32);Pi(34,1,{34:1},rt);_.b=false;var mt;var Hf=xD(OH,'ServerRpcQueue',34);Pi(204,1,pH,st);_.M=function tt(){pt(this.a)};var Ef=xD(OH,'ServerRpcQueue/0methodref$doFlush$Type',204);Pi(203,1,pH,ut);_.M=function vt(){nt()};var Ff=xD(OH,'ServerRpcQueue/lambda$0$Type',203);Pi(205,1,{},wt);_.H=function xt(){this.a.a.M()};var Gf=xD(OH,'ServerRpcQueue/lambda$2$Type',205);Pi(71,1,{71:1},At);_.b=false;var Nf=xD(OH,'XhrConnection',71);Pi(221,40,{},Ct);_.M=function Dt(){Bt(this.b)&&this.a.b&&Yi(this,250)};var If=xD(OH,'XhrConnection/1',221);Pi(218,1,{},Ft);_.nb=function Gt(a,b){var c;c=new Lt(a,this.a);if(!b){vq(Ic(lk(this.c.a,Oe),16),c);return}else{tq(Ic(lk(this.c.a,Oe),16),c)}};_.ob=function Ht(a){var b,c;fk('Server visit took '+Ym(this.b)+'ms');c=a.responseText;b=Dr(Er(c));if(!b){uq(Ic(lk(this.c.a,Oe),16),new Lt(a,this.a));return}wq(Ic(lk(this.c.a,Oe),16));$j&&MC($wnd.console,'Received xhr message: '+c);qr(Ic(lk(this.c.a,lf),21),b)};_.b=0;var Jf=xD(OH,'XhrConnection/XhrResponseHandler',218);Pi(219,1,{},It);_.V=function Jt(a){this.a.b=true};var Kf=xD(OH,'XhrConnection/lambda$0$Type',219);Pi(220,1,{326:1},Kt);var Lf=xD(OH,'XhrConnection/lambda$1$Type',220);Pi(102,1,{},Lt);var Mf=xD(OH,'XhrConnectionError',102);Pi(57,1,{57:1},Pt);var Of=xD(dI,'ConstantPool',57);Pi(84,1,{84:1},Xt);_.Db=function Yt(){return Ic(lk(this.a,td),8).a};var Sf=xD(dI,'ExecuteJavaScriptProcessor',84);Pi(207,1,kH,Zt);_.W=function $t(a){var b;return sB(new _t(this.a,(b=this.b,b))),nD(),true};var Pf=xD(dI,'ExecuteJavaScriptProcessor/lambda$0$Type',207);Pi(206,1,wH,_t);_.gb=function au(){St(this.a,this.b)};var Qf=xD(dI,'ExecuteJavaScriptProcessor/lambda$1$Type',206);Pi(208,1,pH,bu);_.M=function cu(){Wt(this.a)};var Rf=xD(dI,'ExecuteJavaScriptProcessor/lambda$2$Type',208);Pi(296,1,{},du);var Tf=xD(dI,'NodeUnregisterEvent',296);Pi(6,1,{6:1},qu);_.Eb=function ru(){return hu(this)};_.Fb=function su(){return this.g};_.d=0;_.i=false;var Wf=xD(dI,'StateNode',6);Pi(334,$wnd.Function,{},uu);_.db=function vu(a,b){ku(this.a,this.b,Ic(a,33),Kc(b))};Pi(335,$wnd.Function,{},wu);_.hb=function xu(a){tu(this.a,Ic(a,104))};var xh=zD('elemental.events','EventRemover');Pi(151,1,hI,yu);_.Gb=function zu(){lu(this.a,this.b)};var Uf=xD(dI,'StateNode/lambda$2$Type',151);Pi(336,$wnd.Function,{},Au);_.hb=function Bu(a){mu(this.a,Ic(a,66))};Pi(152,1,hI,Cu);_.Gb=function Du(){nu(this.a,this.b)};var Vf=xD(dI,'StateNode/lambda$4$Type',152);Pi(10,1,{10:1},Uu);_.Hb=function Vu(){return this.e};_.Ib=function Xu(a,b,c,d){var e;if(Ju(this,a)){e=Nc(c);it(Ic(lk(this.c,Df),32),a,b,e,d)}};_.d=false;_.f=false;var Xf=xD(dI,'StateTree',10);Pi(339,$wnd.Function,{},Yu);_.hb=function Zu(a){gu(Ic(a,6),Ri(av.prototype.db,av,[]))};Pi(340,$wnd.Function,{},$u);_.db=function _u(a,b){var c;Lu(this.a,(c=Ic(a,6),Kc(b),c))};Pi(325,$wnd.Function,{},av);_.db=function bv(a,b){Wu(Ic(a,33),Kc(b))};var jv,kv;Pi(173,1,{},pv);var Yf=xD(oI,'Binder/BinderContextImpl',173);var Zf=zD(oI,'BindingStrategy');Pi(79,1,{79:1},uv);_.g=0;var qv;var ag=xD(oI,'Debouncer',79);Pi(324,1,{});_.c=false;_.d=0;var Bh=xD(rI,'Timer',324);Pi(299,324,{},Av);var $f=xD(oI,'Debouncer/1',299);Pi(300,324,{},Cv);var _f=xD(oI,'Debouncer/2',300);Pi(368,$wnd.Function,{},Ev);_.db=function Fv(a,b){var c;Dv(this,(c=Oc(a,$wnd.Map),Nc(b),c))};Pi(369,$wnd.Function,{},Iv);_.hb=function Jv(a){Gv(this.a,Oc(a,$wnd.Map))};Pi(370,$wnd.Function,{},Kv);_.hb=function Lv(a){Hv(this.a,Ic(a,79))};Pi(293,1,lH,Pv);_.cb=function Qv(){return aw(this.a)};var bg=xD(oI,'ServerEventHandlerBinder/lambda$0$Type',293);Pi(294,1,BH,Rv);_.ib=function Sv(a){Ov(this.b,this.a,this.c,a)};_.c=false;var cg=xD(oI,'ServerEventHandlerBinder/lambda$1$Type',294);var Tv;Pi(245,1,{303:1},_w);_.Jb=function ax(a,b,c){iw(this,a,b,c)};_.Kb=function dx(a){return sw(a)};_.Mb=function ix(a,b){var c,d,e;d=Object.keys(a);e=new Ty(d,a,b);c=Ic(b.e.get(eg),76);!c?Qw(e.b,e.a,e.c):(c.a=e)};_.Nb=function jx(r,s){var t=this;var u=s._propertiesChanged;u&&(s._propertiesChanged=function(a,b,c){RG(function(){t.Mb(b,r)})();u.apply(this,arguments)});var v=r.Fb();var w=s.ready;s.ready=function(){w.apply(this,arguments);gm(s);var q=function(){var o=s.root.querySelector(zI);if(o){s.removeEventListener(AI,q)}else{return}if(!o.constructor.prototype.$propChangedModified){o.constructor.prototype.$propChangedModified=true;var p=o.constructor.prototype._propertiesChanged;o.constructor.prototype._propertiesChanged=function(a,b,c){p.apply(this,arguments);var d=Object.getOwnPropertyNames(b);var e='items.';var f;for(f=0;f0){var i=h.substr(0,g);var j=h.substr(g+1);var k=a.items[i];if(k&&k.nodeId){var l=k.nodeId;var m=k[j];var n=this.__dataHost;while(!n.localName||n.__dataHost){n=n.__dataHost}RG(function(){hx(l,n,j,m,v)})()}}}}}}};s.root&&s.root.querySelector(zI)?q():s.addEventListener(AI,q)}};_.Lb=function kx(a){if(a.c.has(0)){return true}return !!a.g&&K(a,a.g.e)};var cw,dw;var Jg=xD(oI,'SimpleElementBindingStrategy',245);Pi(358,$wnd.Function,{},zx);_.hb=function Ax(a){Ic(a,44).Gb()};Pi(362,$wnd.Function,{},Bx);_.hb=function Cx(a){Ic(a,19).M()};Pi(100,1,{},Dx);var dg=xD(oI,'SimpleElementBindingStrategy/BindingContext',100);Pi(76,1,{76:1},Ex);var eg=xD(oI,'SimpleElementBindingStrategy/InitialPropertyUpdate',76);Pi(246,1,{},Fx);_.Ob=function Gx(a){Ew(this.a,a)};var fg=xD(oI,'SimpleElementBindingStrategy/lambda$0$Type',246);Pi(247,1,{},Hx);_.Ob=function Ix(a){Fw(this.a,a)};var gg=xD(oI,'SimpleElementBindingStrategy/lambda$1$Type',247);Pi(354,$wnd.Function,{},Jx);_.db=function Kx(a,b){var c;lx(this.b,this.a,(c=Ic(a,13),Pc(b),c))};Pi(256,1,CH,Lx);_.kb=function Mx(a){mx(this.b,this.a,a)};var hg=xD(oI,'SimpleElementBindingStrategy/lambda$11$Type',256);Pi(257,1,DH,Nx);_.lb=function Ox(a){Yw(this.c,this.b,this.a)};var ig=xD(oI,'SimpleElementBindingStrategy/lambda$12$Type',257);Pi(258,1,wH,Px);_.gb=function Qx(){Gw(this.b,this.c,this.a)};var jg=xD(oI,'SimpleElementBindingStrategy/lambda$13$Type',258);Pi(259,1,qH,Rx);_.H=function Sx(){this.b.Ob(this.a)};var kg=xD(oI,'SimpleElementBindingStrategy/lambda$14$Type',259);Pi(260,1,qH,Tx);_.H=function Ux(){this.a[this.b]=cm(this.c)};var lg=xD(oI,'SimpleElementBindingStrategy/lambda$15$Type',260);Pi(262,1,BH,Vx);_.ib=function Wx(a){Hw(this.a,a)};var mg=xD(oI,'SimpleElementBindingStrategy/lambda$16$Type',262);Pi(261,1,wH,Xx);_.gb=function Yx(){zw(this.b,this.a)};var ng=xD(oI,'SimpleElementBindingStrategy/lambda$17$Type',261);Pi(264,1,BH,Zx);_.ib=function $x(a){Iw(this.a,a)};var og=xD(oI,'SimpleElementBindingStrategy/lambda$18$Type',264);Pi(263,1,wH,_x);_.gb=function ay(){Jw(this.b,this.a)};var pg=xD(oI,'SimpleElementBindingStrategy/lambda$19$Type',263);Pi(248,1,{},by);_.Ob=function cy(a){Kw(this.a,a)};var qg=xD(oI,'SimpleElementBindingStrategy/lambda$2$Type',248);Pi(265,1,pH,dy);_.M=function ey(){Bw(this.a,this.b,this.c,false)};var rg=xD(oI,'SimpleElementBindingStrategy/lambda$20$Type',265);Pi(266,1,pH,fy);_.M=function gy(){Bw(this.a,this.b,this.c,false)};var sg=xD(oI,'SimpleElementBindingStrategy/lambda$21$Type',266);Pi(267,1,pH,hy);_.M=function iy(){Dw(this.a,this.b,this.c,false)};var tg=xD(oI,'SimpleElementBindingStrategy/lambda$22$Type',267);Pi(268,1,lH,jy);_.cb=function ky(){return nx(this.a,this.b)};var ug=xD(oI,'SimpleElementBindingStrategy/lambda$23$Type',268);Pi(269,1,lH,ly);_.cb=function my(){return ox(this.a,this.b)};var vg=xD(oI,'SimpleElementBindingStrategy/lambda$24$Type',269);Pi(355,$wnd.Function,{},ny);_.db=function oy(a,b){var c;gB((c=Ic(a,74),Pc(b),c))};Pi(356,$wnd.Function,{},py);_.hb=function qy(a){px(this.a,Oc(a,$wnd.Map))};Pi(357,$wnd.Function,{},ry);_.db=function sy(a,b){var c;(c=Ic(a,44),Pc(b),c).Gb()};Pi(249,1,{104:1},ty);_.jb=function uy(a){Rw(this.c,this.b,this.a)};var wg=xD(oI,'SimpleElementBindingStrategy/lambda$3$Type',249);Pi(359,$wnd.Function,{},vy);_.db=function wy(a,b){var c;Lw(this.a,(c=Ic(a,13),Pc(b),c))};Pi(270,1,CH,xy);_.kb=function yy(a){Mw(this.a,a)};var xg=xD(oI,'SimpleElementBindingStrategy/lambda$31$Type',270);Pi(271,1,qH,zy);_.H=function Ay(){Nw(this.b,this.a,this.c)};var yg=xD(oI,'SimpleElementBindingStrategy/lambda$32$Type',271);Pi(272,1,{},By);_.V=function Cy(a){Ow(this.a,a)};var zg=xD(oI,'SimpleElementBindingStrategy/lambda$33$Type',272);Pi(360,$wnd.Function,{},Dy);_.hb=function Ey(a){Pw(this.a,this.b,Pc(a))};Pi(273,1,{},Gy);_.hb=function Hy(a){Fy(this,a)};var Ag=xD(oI,'SimpleElementBindingStrategy/lambda$35$Type',273);Pi(274,1,BH,Iy);_.ib=function Jy(a){rx(this.a,a)};var Bg=xD(oI,'SimpleElementBindingStrategy/lambda$37$Type',274);Pi(275,1,lH,Ky);_.cb=function Ly(){return this.a.b};var Cg=xD(oI,'SimpleElementBindingStrategy/lambda$38$Type',275);Pi(361,$wnd.Function,{},My);_.hb=function Ny(a){this.a.push(Ic(a,6))};Pi(251,1,wH,Oy);_.gb=function Py(){sx(this.a)};var Dg=xD(oI,'SimpleElementBindingStrategy/lambda$4$Type',251);Pi(250,1,{},Qy);_.H=function Ry(){tx(this.a)};var Eg=xD(oI,'SimpleElementBindingStrategy/lambda$5$Type',250);Pi(253,1,pH,Ty);_.M=function Uy(){Sy(this)};var Fg=xD(oI,'SimpleElementBindingStrategy/lambda$6$Type',253);Pi(252,1,lH,Vy);_.cb=function Wy(){return this.a[this.b]};var Gg=xD(oI,'SimpleElementBindingStrategy/lambda$7$Type',252);Pi(255,1,CH,Xy);_.kb=function Yy(a){rB(new Zy(this.a))};var Hg=xD(oI,'SimpleElementBindingStrategy/lambda$8$Type',255);Pi(254,1,wH,Zy);_.gb=function $y(){hw(this.a)};var Ig=xD(oI,'SimpleElementBindingStrategy/lambda$9$Type',254);Pi(276,1,{303:1},dz);_.Jb=function ez(a,b,c){bz(a,b)};_.Kb=function fz(a){return $doc.createTextNode('')};_.Lb=function gz(a){return a.c.has(7)};var _y;var Mg=xD(oI,'TextBindingStrategy',276);Pi(277,1,qH,hz);_.H=function iz(){az();GC(this.a,Pc(Kz(this.b)))};var Kg=xD(oI,'TextBindingStrategy/lambda$0$Type',277);Pi(278,1,{104:1},jz);_.jb=function kz(a){cz(this.b,this.a)};var Lg=xD(oI,'TextBindingStrategy/lambda$1$Type',278);Pi(333,$wnd.Function,{},oz);_.hb=function pz(a){this.a.add(a)};Pi(337,$wnd.Function,{},rz);_.db=function sz(a,b){this.a.push(a)};var uz,vz=false;Pi(285,1,{},xz);var Ng=xD('com.vaadin.client.flow.dom','PolymerDomApiImpl',285);Pi(77,1,{77:1},yz);var Og=xD('com.vaadin.client.flow.model','UpdatableModelProperties',77);Pi(367,$wnd.Function,{},zz);_.hb=function Az(a){this.a.add(Pc(a))};Pi(86,1,{});_.Pb=function Cz(){return this.e};var nh=xD(vH,'ReactiveValueChangeEvent',86);Pi(52,86,{52:1},Dz);_.Pb=function Ez(){return Ic(this.e,27)};_.b=false;_.c=0;var Pg=xD(BI,'ListSpliceEvent',52);Pi(13,1,{13:1,304:1},Tz);_.Qb=function Uz(a){return Wz(this.a,a)};_.b=false;_.c=false;_.d=false;var Fz;var Yg=xD(BI,'MapProperty',13);Pi(85,1,{});var mh=xD(vH,'ReactiveEventRouter',85);Pi(231,85,{},aA);_.Rb=function bA(a,b){Ic(a,45).lb(Ic(b,78))};_.Sb=function cA(a){return new dA(a)};var Rg=xD(BI,'MapProperty/1',231);Pi(232,1,DH,dA);_.lb=function eA(a){eB(this.a)};var Qg=xD(BI,'MapProperty/1/0methodref$onValueChange$Type',232);Pi(230,1,pH,fA);_.M=function gA(){Gz()};var Sg=xD(BI,'MapProperty/lambda$0$Type',230);Pi(233,1,wH,hA);_.gb=function iA(){this.a.d=false};var Tg=xD(BI,'MapProperty/lambda$1$Type',233);Pi(234,1,wH,jA);_.gb=function kA(){this.a.d=false};var Ug=xD(BI,'MapProperty/lambda$2$Type',234);Pi(235,1,pH,lA);_.M=function mA(){Pz(this.a,this.b)};var Vg=xD(BI,'MapProperty/lambda$3$Type',235);Pi(87,86,{87:1},nA);_.Pb=function oA(){return Ic(this.e,41)};var Wg=xD(BI,'MapPropertyAddEvent',87);Pi(78,86,{78:1},pA);_.Pb=function qA(){return Ic(this.e,13)};var Xg=xD(BI,'MapPropertyChangeEvent',78);Pi(33,1,{33:1});_.d=0;var Zg=xD(BI,'NodeFeature',33);Pi(27,33,{33:1,27:1,304:1},yA);_.Qb=function zA(a){return Wz(this.a,a)};_.Tb=function AA(a){var b,c,d;c=[];for(b=0;b=0?':'+this.c:'')+')'};_.c=0;var _h=xD(VG,'StackTraceElement',28);Gc={4:1,110:1,29:1,2:1};var ci=xD(VG,'String',2);Pi(68,83,{110:1},BE,CE,DE);var ai=xD(VG,'StringBuilder',68);Pi(123,69,ZG,EE);var bi=xD(VG,'StringIndexOutOfBoundsException',123);Pi(474,1,{});var FE;Pi(105,1,kH,IE);_.W=function JE(a){return HE(a)};var di=xD(VG,'Throwable/lambda$0$Type',105);Pi(93,9,ZG,KE);var fi=xD(VG,'UnsupportedOperationException',93);Pi(319,1,{103:1});_.ac=function LE(a){throw Hi(new KE('Add not supported on this collection'))};_.t=function ME(){var a,b,c;c=new LF;for(b=this.bc();b.ec();){a=b.fc();KF(c,a===this?'(this Collection)':a==null?$G:Ti(a))}return !c.a?c.c:c.e.length==0?c.a.a:c.a.a+(''+c.e)};var gi=xD(OI,'AbstractCollection',319);Pi(320,319,{103:1,90:1});_.dc=function NE(a,b){throw Hi(new KE('Add not supported on this list'))};_.ac=function OE(a){this.dc(this.cc(),a);return true};_.q=function PE(a){var b,c,d,e,f;if(a===this){return true}if(!Sc(a,39)){return false}f=Ic(a,90);if(this.a.length!=f.a.length){return false}e=new dF(f);for(c=new dF(this);c.a { + if (!button.__hasDisableOnClickListener) { + button.addEventListener('click', disableOnClickListener); + button.__hasDisableOnClickListener = true; + } + } +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/comboBoxConnector.js b/LoadBalancerWeb/frontend/generated/jar-resources/comboBoxConnector.js new file mode 100644 index 0000000..1168c0f --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/comboBoxConnector.js @@ -0,0 +1,284 @@ +import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js'; +import { timeOut } from '@polymer/polymer/lib/utils/async.js'; +import { ComboBoxPlaceholder } from '@vaadin/combo-box/src/vaadin-combo-box-placeholder.js'; + +(function () { + const tryCatchWrapper = function (callback) { + return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Combo Box'); + }; + + window.Vaadin.Flow.comboBoxConnector = { + initLazy: (comboBox) => + tryCatchWrapper(function (comboBox) { + // Check whether the connector was already initialized for the ComboBox + if (comboBox.$connector) { + return; + } + + comboBox.$connector = {}; + + // holds pageIndex -> callback pairs of subsequent indexes (current active range) + const pageCallbacks = {}; + let cache = {}; + let lastFilter = ''; + const placeHolder = new window.Vaadin.ComboBoxPlaceholder(); + + const serverFacade = (() => { + // Private variables + let lastFilterSentToServer = ''; + let dataCommunicatorResetNeeded = false; + + // Public methods + const needsDataCommunicatorReset = () => (dataCommunicatorResetNeeded = true); + const getLastFilterSentToServer = () => lastFilterSentToServer; + const requestData = (startIndex, endIndex, params) => { + const count = endIndex - startIndex; + const filter = params.filter; + + comboBox.$server.setRequestedRange(startIndex, count, filter); + lastFilterSentToServer = filter; + if (dataCommunicatorResetNeeded) { + comboBox.$server.resetDataCommunicator(); + dataCommunicatorResetNeeded = false; + } + }; + + return { + needsDataCommunicatorReset, + getLastFilterSentToServer, + requestData + }; + })(); + + const clearPageCallbacks = (pages = Object.keys(pageCallbacks)) => { + // Flush and empty the existing requests + pages.forEach((page) => { + pageCallbacks[page]([], comboBox.size); + delete pageCallbacks[page]; + + // Empty the comboBox's internal cache without invoking observers by filling + // the filteredItems array with placeholders (comboBox will request for data when it + // encounters a placeholder) + const pageStart = parseInt(page) * comboBox.pageSize; + const pageEnd = pageStart + comboBox.pageSize; + const end = Math.min(pageEnd, comboBox.filteredItems.length); + for (let i = pageStart; i < end; i++) { + comboBox.filteredItems[i] = placeHolder; + } + }); + }; + + comboBox.dataProvider = function (params, callback) { + if (params.pageSize != comboBox.pageSize) { + throw 'Invalid pageSize'; + } + + if (comboBox._clientSideFilter) { + // For clientside filter we first make sure we have all data which we also + // filter based on comboBox.filter. While later we only filter clientside data. + + if (cache[0]) { + performClientSideFilter(cache[0], params.filter, callback); + return; + } else { + // If client side filter is enabled then we need to first ask all data + // and filter it on client side, otherwise next time when user will + // input another filter, eg. continue to type, the local cache will be only + // what was received for the first filter, which may not be the whole + // data from server (keep in mind that client side filter is enabled only + // when the items count does not exceed one page). + params.filter = ''; + } + } + + const filterChanged = params.filter !== lastFilter; + if (filterChanged) { + cache = {}; + lastFilter = params.filter; + this._filterDebouncer = Debouncer.debounce(this._filterDebouncer, timeOut.after(500), () => { + if (serverFacade.getLastFilterSentToServer() === params.filter) { + // Fixes the case when the filter changes + // to something else and back to the original value + // within debounce timeout, and the + // DataCommunicator thinks it doesn't need to send data + serverFacade.needsDataCommunicatorReset(); + } + if (params.filter !== lastFilter) { + throw new Error("Expected params.filter to be '" + lastFilter + "' but was '" + params.filter + "'"); + } + // Remove the debouncer before clearing page callbacks. + // This makes sure that they are executed. + this._filterDebouncer = undefined; + // Call the method again after debounce. + clearPageCallbacks(); + comboBox.dataProvider(params, callback); + }); + return; + } + + // Postpone the execution of new callbacks if there is an active debouncer. + // They will be executed when the page callbacks are cleared within the debouncer. + if (this._filterDebouncer) { + pageCallbacks[params.page] = callback; + return; + } + + if (cache[params.page]) { + // This may happen after skipping pages by scrolling fast + commitPage(params.page, callback); + } else { + pageCallbacks[params.page] = callback; + const maxRangeCount = Math.max(params.pageSize * 2, 500); // Max item count in active range + const activePages = Object.keys(pageCallbacks).map((page) => parseInt(page)); + const rangeMin = Math.min(...activePages); + const rangeMax = Math.max(...activePages); + + if (activePages.length * params.pageSize > maxRangeCount) { + if (params.page === rangeMin) { + clearPageCallbacks([String(rangeMax)]); + } else { + clearPageCallbacks([String(rangeMin)]); + } + comboBox.dataProvider(params, callback); + } else if (rangeMax - rangeMin + 1 !== activePages.length) { + // Wasn't a sequential page index, clear the cache so combo-box will request for new pages + clearPageCallbacks(); + } else { + // The requested page was sequential, extend the requested range + const startIndex = params.pageSize * rangeMin; + const endIndex = params.pageSize * (rangeMax + 1); + + serverFacade.requestData(startIndex, endIndex, params); + } + } + }; + + comboBox.$connector.clear = tryCatchWrapper((start, length) => { + const firstPageToClear = Math.floor(start / comboBox.pageSize); + const numberOfPagesToClear = Math.ceil(length / comboBox.pageSize); + + for (let i = firstPageToClear; i < firstPageToClear + numberOfPagesToClear; i++) { + delete cache[i]; + } + }); + + comboBox.$connector.filter = tryCatchWrapper(function (item, filter) { + filter = filter ? filter.toString().toLowerCase() : ''; + return comboBox._getItemLabel(item, comboBox.itemLabelPath).toString().toLowerCase().indexOf(filter) > -1; + }); + + comboBox.$connector.set = tryCatchWrapper(function (index, items, filter) { + if (filter != serverFacade.getLastFilterSentToServer()) { + return; + } + + if (index % comboBox.pageSize != 0) { + throw 'Got new data to index ' + index + ' which is not aligned with the page size of ' + comboBox.pageSize; + } + + if (index === 0 && items.length === 0 && pageCallbacks[0]) { + // Makes sure that the dataProvider callback is called even when server + // returns empty data set (no items match the filter). + cache[0] = []; + return; + } + + const firstPageToSet = index / comboBox.pageSize; + const updatedPageCount = Math.ceil(items.length / comboBox.pageSize); + + for (let i = 0; i < updatedPageCount; i++) { + let page = firstPageToSet + i; + let slice = items.slice(i * comboBox.pageSize, (i + 1) * comboBox.pageSize); + + cache[page] = slice; + } + }); + + comboBox.$connector.updateData = tryCatchWrapper(function (items) { + const itemsMap = new Map(items.map((item) => [item.key, item])); + + comboBox.filteredItems = comboBox.filteredItems.map((item) => { + return itemsMap.get(item.key) || item; + }); + }); + + comboBox.$connector.updateSize = tryCatchWrapper(function (newSize) { + if (!comboBox._clientSideFilter) { + // FIXME: It may be that this size set is unnecessary, since when + // providing data to combobox via callback we may use data's size. + // However, if this size reflect the whole data size, including + // data not fetched yet into client side, and combobox expect it + // to be set as such, the at least, we don't need it in case the + // filter is clientSide only, since it'll increase the height of + // the popup at only at first user filter to this size, while the + // filtered items count are less. + comboBox.size = newSize; + } + }); + + comboBox.$connector.reset = tryCatchWrapper(function () { + clearPageCallbacks(); + cache = {}; + comboBox.clearCache(); + }); + + comboBox.$connector.confirm = tryCatchWrapper(function (id, filter) { + if (filter != serverFacade.getLastFilterSentToServer()) { + return; + } + + // We're done applying changes from this batch, resolve pending + // callbacks + let activePages = Object.getOwnPropertyNames(pageCallbacks); + for (let i = 0; i < activePages.length; i++) { + let page = activePages[i]; + + if (cache[page]) { + commitPage(page, pageCallbacks[page]); + } + } + + // Let server know we're done + comboBox.$server.confirmUpdate(id); + }); + + const commitPage = tryCatchWrapper(function (page, callback) { + let data = cache[page]; + + if (comboBox._clientSideFilter) { + performClientSideFilter(data, comboBox.filter, callback); + } else { + // Remove the data if server-side filtering, but keep it for client-side + // filtering + delete cache[page]; + + // FIXME: It may be that we ought to provide data.length instead of + // comboBox.size and remove updateSize function. + callback(data, comboBox.size); + } + }); + + // Perform filter on client side (here) using the items from specified page + // and submitting the filtered items to specified callback. + // The filter used is the one from combobox, not the lastFilter stored since + // that may not reflect user's input. + const performClientSideFilter = tryCatchWrapper(function (page, filter, callback) { + let filteredItems = page; + + if (filter) { + filteredItems = page.filter((item) => comboBox.$connector.filter(item, filter)); + } + + callback(filteredItems, filteredItems.length); + }); + + // Prevent setting the custom value as the 'value'-prop automatically + comboBox.addEventListener( + 'custom-value-set', + tryCatchWrapper((e) => e.preventDefault()) + ); + })(comboBox) + }; +})(); + +window.Vaadin.ComboBoxPlaceholder = ComboBoxPlaceholder; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/contextMenuConnector.js b/LoadBalancerWeb/frontend/generated/jar-resources/contextMenuConnector.js new file mode 100644 index 0000000..8ac5779 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/contextMenuConnector.js @@ -0,0 +1,141 @@ +(function () { + function tryCatchWrapper(callback) { + return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Context Menu'); + } + + function getContainer(appId, nodeId) { + try { + return window.Vaadin.Flow.clients[appId].getByNodeId(nodeId); + } catch (error) { + console.error('Could not get node %s from app %s', nodeId, appId); + console.error(error); + } + } + + /** + * Initializes the connector for a context menu element. + * + * @param {HTMLElement} contextMenu + * @param {string} appId + */ + function initLazy(contextMenu, appId) { + if (contextMenu.$connector) { + return; + } + + contextMenu.$connector = { + /** + * Generates and assigns the items to the context menu. + * + * @param {number} nodeId + */ + generateItems: tryCatchWrapper((nodeId) => { + const items = generateItemsTree(appId, nodeId); + + contextMenu.items = items; + }) + }; + } + + /** + * Generates an items tree compatible with the context-menu web component + * by traversing the given Flow DOM tree of context menu item nodes + * whose root node is identified by the `nodeId` argument. + * + * The app id is required to access the store of Flow DOM nodes. + * + * @param {string} appId + * @param {number} nodeId + */ + function generateItemsTree(appId, nodeId) { + const container = getContainer(appId, nodeId); + if (!container) { + return; + } + + return Array.from(container.children).map((child) => { + const item = { + component: child, + checked: child._checked, + keepOpen: child._keepOpen, + theme: child.__theme + }; + // Do not hardcode tag name to allow `vaadin-menu-bar-item` + if (child._hasVaadinItemMixin && child._containerNodeId) { + item.children = generateItemsTree(appId, child._containerNodeId); + } + child._item = item; + return item; + }); + } + + /** + * Sets the checked state for a context menu item. + * + * This method is supposed to be called when the context menu item is closed, + * so there is no need for triggering a re-render eagarly. + * + * @param {HTMLElement} component + * @param {boolean} checked + */ + function setChecked(component, checked) { + if (component._item) { + component._item.checked = checked; + + // Set the attribute in the connector to show the checkmark + // without having to re-render the whole menu while opened. + if (component._item.keepOpen) { + component.toggleAttribute('menu-item-checked', checked); + } + } + } + + /** + * Sets the keep open state for a context menu item. + * + * @param {HTMLElement} component + * @param {boolean} keepOpen + */ + function setKeepOpen(component, keepOpen) { + if (component._item) { + component._item.keepOpen = keepOpen; + } + } + + /** + * Sets the theme for a context menu item. + * + * This method is supposed to be called when the context menu item is closed, + * so there is no need for triggering a re-render eagarly. + * + * @param {HTMLElement} component + * @param {string | undefined | null} theme + */ + function setTheme(component, theme) { + if (component._item) { + component._item.theme = theme; + } + } + + window.Vaadin.Flow.contextMenuConnector = { + initLazy(...args) { + return tryCatchWrapper(initLazy)(...args); + }, + + generateItemsTree(...args) { + return tryCatchWrapper(generateItemsTree)(...args); + }, + + setChecked(...args) { + return tryCatchWrapper(setChecked)(...args); + }, + + setKeepOpen(...args) { + return tryCatchWrapper(setKeepOpen)(...args); + }, + + setTheme(...args) { + return tryCatchWrapper(setTheme)(...args); + } + }; +})(); diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/contextMenuTargetConnector.js b/LoadBalancerWeb/frontend/generated/jar-resources/contextMenuTargetConnector.js new file mode 100644 index 0000000..9e2b3bb --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/contextMenuTargetConnector.js @@ -0,0 +1,70 @@ +import * as Gestures from '@vaadin/component-base/src/gestures.js'; + +(function () { + function tryCatchWrapper(callback) { + return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Context Menu Target'); + } + + function init(target) { + if (target.$contextMenuTargetConnector) { + return; + } + + target.$contextMenuTargetConnector = { + openOnHandler: tryCatchWrapper(function (e) { + e.preventDefault(); + e.stopPropagation(); + this.$contextMenuTargetConnector.openEvent = e; + let detail = {}; + if (target.getContextMenuBeforeOpenDetail) { + detail = target.getContextMenuBeforeOpenDetail(e); + } + target.dispatchEvent( + new CustomEvent('vaadin-context-menu-before-open', { + detail: detail + }) + ); + }), + + updateOpenOn: tryCatchWrapper(function (eventType) { + this.removeListener(); + this.openOnEventType = eventType; + + customElements.whenDefined('vaadin-context-menu').then( + tryCatchWrapper(() => { + if (Gestures.gestures[eventType]) { + Gestures.addListener(target, eventType, this.openOnHandler); + } else { + target.addEventListener(eventType, this.openOnHandler); + } + }) + ); + }), + + removeListener: tryCatchWrapper(function () { + if (this.openOnEventType) { + if (Gestures.gestures[this.openOnEventType]) { + Gestures.removeListener(target, this.openOnEventType, this.openOnHandler); + } else { + target.removeEventListener(this.openOnEventType, this.openOnHandler); + } + } + }), + + openMenu: tryCatchWrapper(function (contextMenu) { + contextMenu.open(this.openEvent); + }), + + removeConnector: tryCatchWrapper(function () { + this.removeListener(); + target.$contextMenuTargetConnector = undefined; + }) + }; + } + + window.Vaadin.Flow.contextMenuTargetConnector = { + init(...args) { + return tryCatchWrapper(init)(...args); + } + }; +})(); diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/datepickerConnector.js b/LoadBalancerWeb/frontend/generated/jar-resources/datepickerConnector.js new file mode 100644 index 0000000..403deb1 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/datepickerConnector.js @@ -0,0 +1,159 @@ +import dateFnsFormat from 'date-fns/format'; +import dateFnsParse from 'date-fns/parse'; +import dateFnsIsValid from 'date-fns/isValid'; +import { extractDateParts, parseDate as _parseDate } from '@vaadin/date-picker/src/vaadin-date-picker-helper.js'; + +(function () { + const tryCatchWrapper = function (callback) { + return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Date Picker'); + }; + + window.Vaadin.Flow.datepickerConnector = { + initLazy: (datepicker) => + tryCatchWrapper(function (datepicker) { + // Check whether the connector was already initialized for the datepicker + if (datepicker.$connector) { + return; + } + + datepicker.$connector = {}; + + const createLocaleBasedDateFormat = function (locale) { + try { + // Check whether the locale is supported or not + new Date().toLocaleDateString(locale); + } catch (e) { + console.warn('The locale is not supported, using default format setting (ISO 8601).'); + return 'yyyy-MM-dd'; + } + + // format test date and convert to date-fns pattern + const testDate = new Date(Date.UTC(1234, 4, 6)); + let pattern = testDate.toLocaleDateString(locale, { timeZone: 'UTC' }); + pattern = pattern + // escape date-fns pattern letters by enclosing them in single quotes + .replace(/([a-zA-Z]+)/g, "'$1'") + // insert date placeholder + .replace('06', 'dd') + .replace('6', 'd') + // insert month placeholder + .replace('05', 'MM') + .replace('5', 'M') + // insert year placeholder + .replace('1234', 'yyyy'); + const isValidPattern = pattern.includes('d') && pattern.includes('M') && pattern.includes('y'); + if (!isValidPattern) { + console.warn('The locale is not supported, using default format setting (ISO 8601).'); + return 'yyyy-MM-dd'; + } + + return pattern; + }; + + const createFormatterAndParser = tryCatchWrapper(function (formats) { + if (!formats || formats.length === 0) { + throw new Error('Array of custom date formats is null or empty'); + } + + function getShortYearFormat(format) { + if (format.includes('yyyy') && !format.includes('yyyyy')) { + return format.replace('yyyy', 'yy'); + } + if (format.includes('YYYY') && !format.includes('YYYYY')) { + return format.replace('YYYY', 'YY'); + } + return undefined; + } + + function isShortYearFormat(format) { + if (format.includes('y')) { + return !format.includes('yyy'); + } + if (format.includes('Y')) { + return !format.includes('YYY'); + } + return false; + } + + function formatDate(dateParts) { + const format = formats[0]; + const date = _parseDate(`${dateParts.year}-${dateParts.month + 1}-${dateParts.day}`); + + return dateFnsFormat(date, format); + } + + function parseDate(dateString) { + const referenceDate = _getReferenceDate(); + for (let format of formats) { + // We first try to match the date with the shorter version. + const shortYearFormat = getShortYearFormat(format); + if (shortYearFormat) { + const shortYearFormatDate = dateFnsParse(dateString, shortYearFormat, referenceDate); + if (dateFnsIsValid(shortYearFormatDate)) { + let yearValue = shortYearFormatDate.getFullYear(); + // The last parsed year check handles the case where a four-digit year is parsed, then formatted + // as a two-digit year, and then parsed again. In this case we want to keep the century of the + // originally parsed year, instead of using the century of the reference date. + if ( + datepicker.$connector._lastParsedYear && + yearValue === datepicker.$connector._lastParsedYear % 100 + ) { + yearValue = datepicker.$connector._lastParsedYear; + } + return { + day: shortYearFormatDate.getDate(), + month: shortYearFormatDate.getMonth(), + year: yearValue + }; + } + } + const date = dateFnsParse(dateString, format, referenceDate); + + if (dateFnsIsValid(date)) { + let yearValue = date.getFullYear(); + if ( + datepicker.$connector._lastParsedYear && + yearValue % 100 === datepicker.$connector._lastParsedYear % 100 && + isShortYearFormat(format) + ) { + yearValue = datepicker.$connector._lastParsedYear; + } else { + datepicker.$connector._lastParsedYear = yearValue; + } + return { + day: date.getDate(), + month: date.getMonth(), + year: yearValue + }; + } + } + datepicker.$connector._lastParsedYear = undefined; + return false; + } + + return { + formatDate: formatDate, + parseDate: parseDate + }; + }); + + function _getReferenceDate() { + const { referenceDate } = datepicker.i18n; + return referenceDate ? new Date(referenceDate.year, referenceDate.month, referenceDate.day) : new Date(); + } + + datepicker.$connector.updateI18n = tryCatchWrapper(function (locale, i18n) { + // Either use custom formats specified in I18N, or create format from locale + const hasCustomFormats = i18n && i18n.dateFormats && i18n.dateFormats.length > 0; + if (i18n && i18n.referenceDate) { + i18n.referenceDate = extractDateParts(new Date(i18n.referenceDate)); + } + const usedFormats = hasCustomFormats ? i18n.dateFormats : [createLocaleBasedDateFormat(locale)]; + const formatterAndParser = createFormatterAndParser(usedFormats); + + // Merge current web component I18N settings with new I18N settings and the formatting and parsing functions + datepicker.i18n = Object.assign({}, datepicker.i18n, i18n, formatterAndParser); + }); + })(datepicker) + }; +})(); diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/dnd-polyfill-loader.js b/LoadBalancerWeb/frontend/generated/jar-resources/dnd-polyfill-loader.js new file mode 100644 index 0000000..f4db1d4 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/dnd-polyfill-loader.js @@ -0,0 +1,7 @@ +if ( + (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) || + (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1) +) { + window.Vaadin.__forceApplyMobileDragDrop = true; + import('./vaadin-mobile-drag-drop.js'); +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/dndConnector.js b/LoadBalancerWeb/frontend/generated/jar-resources/dndConnector.js new file mode 100644 index 0000000..770967c --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/dndConnector.js @@ -0,0 +1,112 @@ +import './dnd-polyfill-loader.js'; + +window.Vaadin = window.Vaadin || {}; +window.Vaadin.Flow = window.Vaadin.Flow || {}; +window.Vaadin.Flow.dndConnector = { + __ondragenterListener: function (event) { + // TODO filter by data type + // TODO prevent dropping on itself (by default) + const effect = event.currentTarget['__dropEffect']; + if (!event.currentTarget.hasAttribute('disabled')) { + if (effect) { + event.dataTransfer.dropEffect = effect; + } + + if (effect && effect !== 'none') { + /* #7108: if drag moves on top of drop target's children, first another ondragenter event + * is fired and then a ondragleave event. This happens again once the drag + * moves on top of another children, or back on top of the drop target element. + * Thus need to "cancel" the following ondragleave, to not remove class name. + * Drop event will happen even when dropped to a child element. */ + if (event.currentTarget.classList.contains('v-drag-over-target')) { + event.currentTarget['__skip-leave'] = true; + } else { + event.currentTarget.classList.add('v-drag-over-target'); + } + // enables browser specific pseudo classes (at least FF) + event.preventDefault(); + event.stopPropagation(); // don't let parents know + } + } + }, + + __ondragoverListener: function (event) { + // TODO filter by data type + // TODO filter by effectAllowed != dropEffect due to Safari & IE11 ? + if (!event.currentTarget.hasAttribute('disabled')) { + const effect = event.currentTarget['__dropEffect']; + if (effect) { + event.dataTransfer.dropEffect = effect; + } + // allows the drop && don't let parents know + event.preventDefault(); + event.stopPropagation(); + } + }, + + __ondragleaveListener: function (event) { + if (event.currentTarget['__skip-leave']) { + event.currentTarget['__skip-leave'] = false; + } else { + event.currentTarget.classList.remove('v-drag-over-target'); + } + // #7109 need to stop or any parent drop target might not get highlighted, + // as ondragenter for it is fired before the child gets dragleave. + event.stopPropagation(); + }, + + __ondropListener: function (event) { + const effect = event.currentTarget['__dropEffect']; + if (effect) { + event.dataTransfer.dropEffect = effect; + } + event.currentTarget.classList.remove('v-drag-over-target'); + // prevent browser handling && don't let parents know + event.preventDefault(); + event.stopPropagation(); + }, + + updateDropTarget: function (element) { + if (element['__active']) { + element.addEventListener('dragenter', this.__ondragenterListener, false); + element.addEventListener('dragover', this.__ondragoverListener, false); + element.addEventListener('dragleave', this.__ondragleaveListener, false); + element.addEventListener('drop', this.__ondropListener, false); + } else { + element.removeEventListener('dragenter', this.__ondragenterListener, false); + element.removeEventListener('dragover', this.__ondragoverListener, false); + element.removeEventListener('dragleave', this.__ondragleaveListener, false); + element.removeEventListener('drop', this.__ondropListener, false); + element.classList.remove('v-drag-over-target'); + } + }, + + /** DRAG SOURCE METHODS: */ + + __dragstartListener: function (event) { + event.stopPropagation(); + event.dataTransfer.setData('text/plain', ''); + if (event.currentTarget.hasAttribute('disabled')) { + event.preventDefault(); + } else { + if (event.currentTarget['__effectAllowed']) { + event.dataTransfer.effectAllowed = event.currentTarget['__effectAllowed']; + } + event.currentTarget.classList.add('v-dragged'); + } + }, + + __dragendListener: function (event) { + event.currentTarget.classList.remove('v-dragged'); + }, + + updateDragSource: function (element) { + if (element['draggable']) { + element.addEventListener('dragstart', this.__dragstartListener, false); + element.addEventListener('dragend', this.__dragendListener, false); + } else { + element.removeEventListener('dragstart', this.__dragstartListener, false); + element.removeEventListener('dragend', this.__dragendListener, false); + } + } +}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/flow-component-directive.js b/LoadBalancerWeb/frontend/generated/jar-resources/flow-component-directive.js new file mode 100644 index 0000000..47cce41 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/flow-component-directive.js @@ -0,0 +1,67 @@ +import { noChange } from 'lit'; +import { directive, PartType } from 'lit/directive.js'; +import { AsyncDirective } from 'lit/async-directive.js'; + +class FlowComponentDirective extends AsyncDirective { + constructor(partInfo) { + super(partInfo); + if (partInfo.type !== PartType.CHILD) { + throw new Error(`${this.constructor.directiveName}() can only be used in child bindings`); + } + } + + update(part, [appid, nodeid]) { + this.updateContent(part, appid, nodeid); + return noChange; + } + + updateContent(part, appid, nodeid) { + const { parentNode, startNode } = part; + + const hasNewNodeId = nodeid !== undefined && nodeid !== null; + const newNode = hasNewNodeId ? this.getNewNode(appid, nodeid) : null; + const oldNode = this.getOldNode(part); + + clearTimeout(this.__nodeRetryTimeout); + + if (hasNewNodeId && !newNode) { + // If the node is not found, try again later. + this.__nodeRetryTimeout = setTimeout(() => this.updateContent(part, appid, nodeid)); + } else if (oldNode === newNode) { + return; + } else if (oldNode && newNode) { + parentNode.replaceChild(newNode, oldNode); + } else if (oldNode) { + parentNode.removeChild(oldNode); + } else if (newNode) { + startNode.after(newNode); + } + } + + getNewNode(appid, nodeid) { + return window.Vaadin.Flow.clients[appid].getByNodeId(nodeid); + } + + getOldNode(part) { + const { startNode, endNode } = part; + if (startNode.nextSibling === endNode) { + return; + } + return startNode.nextSibling; + } + + disconnected() { + clearTimeout(this.__nodeRetryTimeout); + } +} + +/** + * Renders the given flow component node. + * + * WARNING: This directive is not intended for public use. + * + * @param {string} appid + * @param {number} nodeid + * @private + */ +export const flowComponentDirective = directive(FlowComponentDirective); diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/flow-component-renderer.js b/LoadBalancerWeb/frontend/generated/jar-resources/flow-component-renderer.js new file mode 100644 index 0000000..5ac00c5 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/flow-component-renderer.js @@ -0,0 +1,212 @@ +import '@polymer/polymer/lib/elements/dom-if.js'; +import { html } from '@polymer/polymer/lib/utils/html-tag.js'; +import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js'; +import { idlePeriod } from '@polymer/polymer/lib/utils/async.js'; +import { PolymerElement } from '@polymer/polymer/polymer-element.js'; +import { flowComponentDirective } from './flow-component-directive.js'; +import { render, html as litHtml } from 'lit'; + +/** + * Returns the requested node from the Flow client. + * @param {string} appid + * @param {number} nodeid + * @returns {Element | null} The element if found, null otherwise. + */ +function getNodeInternal(appid, nodeid) { + return window.Vaadin.Flow.clients[appid].getByNodeId(nodeid); +} + +/** + * Returns the requested node in a form suitable for Lit template interpolation. + * @param {string} appid + * @param {number} nodeid + * @returns {any} a Lit directive + */ +function getNode(appid, nodeid) { + return flowComponentDirective(appid, nodeid); +} + +/** + * Sets the nodes defined by the given node ids as the child nodes of the + * given root element. + * @param {string} appid + * @param {number[]} nodeIds + * @param {Element} root + */ +function setChildNodes(appid, nodeIds, root) { + render(litHtml`${nodeIds.map(id => getNodeInternal(appid, id))}`, root); +} + +/** + * SimpleElementBindingStrategy::addChildren uses insertBefore to add child + * elements to the container. When the children are manually placed under + * another element, the call to insertBefore can occasionally fail due to + * an invalid reference node. + * + * This is a temporary workaround which patches the container's native API + * to not fail when called with invalid arguments. + */ +function patchVirtualContainer(container) { + const originalInsertBefore = container.insertBefore; + + container.insertBefore = function (newNode, referenceNode) { + if (referenceNode && referenceNode.parentNode === this) { + return originalInsertBefore.call(this, newNode, referenceNode); + } else { + return originalInsertBefore.call(this, newNode, null); + } + }; +} + +window.Vaadin ||= {}; +window.Vaadin.FlowComponentHost ||= { patchVirtualContainer, getNode, setChildNodes }; + +class FlowComponentRenderer extends PolymerElement { + static get template() { + return html` + + + `; + } + + static get is() { + return 'flow-component-renderer'; + } + static get properties() { + return { + nodeid: Number, + appid: String, + }; + } + static get observers() { + return ['_attachRenderedComponentIfAble(appid, nodeid)']; + } + + ready() { + super.ready(); + this.addEventListener('click', function (event) { + if ( + this.firstChild && + typeof this.firstChild.click === 'function' && + event.target === this + ) { + event.stopPropagation(); + this.firstChild.click(); + } + }); + this.addEventListener('animationend', this._onAnimationEnd); + } + + _asyncAttachRenderedComponentIfAble() { + this._debouncer = Debouncer.debounce(this._debouncer, idlePeriod, () => + this._attachRenderedComponentIfAble() + ); + } + + _attachRenderedComponentIfAble() { + if (!this.nodeid || !this.appid) { + return; + } + const renderedComponent = this._getRenderedComponent(); + if (this.firstChild) { + if (!renderedComponent) { + this._asyncAttachRenderedComponentIfAble(); + } else if (this.firstChild !== renderedComponent) { + this.replaceChild(renderedComponent, this.firstChild); + this._defineFocusTarget(); + this.onComponentRendered(); + } else { + this._defineFocusTarget(); + this.onComponentRendered(); + } + } else { + if (renderedComponent) { + this.appendChild(renderedComponent); + this._defineFocusTarget(); + this.onComponentRendered(); + } else { + this._asyncAttachRenderedComponentIfAble(); + } + } + } + + _getRenderedComponent() { + try { + return window.Vaadin.Flow.clients[this.appid].getByNodeId(this.nodeid); + } catch (error) { + console.error( + 'Could not get node %s from app %s', + this.nodeid, + this.appid + ); + console.error(error); + } + return null; + } + + onComponentRendered() { + // subclasses can override this method to execute custom logic on resize + } + + /* Setting the `focus-target` attribute to the first focusable descendant + starting from the firstChild necessary for the focus to be delegated + within the flow-component-renderer when used inside a vaadin-grid cell */ + _defineFocusTarget() { + var focusable = this._getFirstFocusableDescendant(this.firstChild); + if (focusable !== null) { + focusable.setAttribute('focus-target', 'true'); + } + } + + _getFirstFocusableDescendant(node) { + if (this._isFocusable(node)) { + return node; + } + if (node.hasAttribute && (node.hasAttribute('disabled') || node.hasAttribute('hidden'))) { + return null; + } + if (!node.children) { + return null; + } + for (var i = 0; i < node.children.length; i++) { + var focusable = this._getFirstFocusableDescendant(node.children[i]); + if (focusable !== null) { + return focusable; + } + } + return null; + } + + _isFocusable(node) { + if ( + node.hasAttribute && + typeof node.hasAttribute === 'function' && + (node.hasAttribute('disabled') || node.hasAttribute('hidden')) + ) { + return false; + } + + return node.tabIndex === 0; + } + + _onAnimationEnd(e) { + // ShadyCSS applies scoping suffixes to animation names + // To ensure that child is attached once element is unhidden + // for when it was filtered out from, eg, ComboBox + // https://github.com/vaadin/vaadin-flow-components/issues/437 + if (e.animationName.indexOf('flow-component-renderer-appear') === 0) { + this._attachRenderedComponentIfAble(); + } + } +} +window.customElements.define(FlowComponentRenderer.is, FlowComponentRenderer); diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/gridConnector.js b/LoadBalancerWeb/frontend/generated/jar-resources/gridConnector.js new file mode 100644 index 0000000..90e64ac --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/gridConnector.js @@ -0,0 +1,1218 @@ +import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js'; +import { timeOut, animationFrame } from '@polymer/polymer/lib/utils/async.js'; +import { Grid } from '@vaadin/grid/src/vaadin-grid.js'; +import { ItemCache } from '@vaadin/grid/src/vaadin-grid-data-provider-mixin.js'; +import { isFocusable } from '@vaadin/grid/src/vaadin-grid-active-item-mixin.js'; + +(function () { + const tryCatchWrapper = function (callback) { + return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Grid'); + }; + + let isItemCacheInitialized = false; + + window.Vaadin.Flow.gridConnector = { + initLazy: (grid) => + tryCatchWrapper(function (grid) { + // Check whether the connector was already initialized for the grid + if (grid.$connector) { + return; + } + + // Make sure ItemCache patching is done only once, but delay it for when + // a server grid is initialized + if (!isItemCacheInitialized) { + isItemCacheInitialized = true; + ItemCache.prototype.ensureSubCacheForScaledIndexOriginal = ItemCache.prototype.ensureSubCacheForScaledIndex; + ItemCache.prototype.ensureSubCacheForScaledIndex = tryCatchWrapper(function (scaledIndex) { + if (!this.grid.$connector) { + this.ensureSubCacheForScaledIndexOriginal(scaledIndex); + return; + } + + const isCached = this.grid.$connector.hasCacheForParentKey(this.grid.getItemId(this.items[scaledIndex])); + if (isCached) { + // The sub-cache items are already in the connector's cache. Skip the debouncing process. + this.ensureSubCacheForScaledIndexOriginal(scaledIndex); + } else if (!this.itemCaches[scaledIndex]) { + // The items need to be fetched from the server. + this.grid.$connector.beforeEnsureSubCacheForScaledIndex(this, scaledIndex); + } + }); + + ItemCache.prototype.isLoadingOriginal = ItemCache.prototype.isLoading; + ItemCache.prototype.isLoading = tryCatchWrapper(function () { + if (!this.grid.$connector) { + return this.isLoadingOriginal(); + } + + return this.grid.$connector.hasEnsureSubCacheQueue() || this.isLoadingOriginal(); + }); + + ItemCache.prototype.getCacheByKey = tryCatchWrapper(function (key) { + // Start looking in this cache + for (let index in this.items) { + if (this.grid.getItemId(this.items[index]) === key) { + return this.itemCaches[index]; + } + } + // Look through sub-caches + for (let index of Object.keys(this.itemCaches)) { + const cache = this.itemCaches[index].getCacheByKey(key); + if (cache) { + return cache; + } + } + return undefined; + }); + } + + const rootPageCallbacks = {}; + const treePageCallbacks = {}; + const cache = {}; + + /* parentRequestDelay - optimizes parent requests by batching several requests + * into one request. Delay in milliseconds. Disable by setting to 0. + * parentRequestBatchMaxSize - maximum size of the batch. + */ + const parentRequestDelay = 50; + const parentRequestBatchMaxSize = 20; + + let parentRequestQueue = []; + let parentRequestDebouncer; + let ensureSubCacheQueue = []; + let ensureSubCacheDebouncer; + + const rootRequestDelay = 150; + let rootRequestDebouncer; + + let lastRequestedRanges = {}; + const root = 'null'; + lastRequestedRanges[root] = [0, 0]; + + const validSelectionModes = ['SINGLE', 'NONE', 'MULTI']; + let selectedKeys = {}; + let selectionMode = 'SINGLE'; + + let sorterDirectionsSetFromServer = false; + + grid.size = 0; // To avoid NaN here and there before we get proper data + grid.itemIdPath = 'key'; + + grid.$connector = {}; + + grid.$connector.hasCacheForParentKey = tryCatchWrapper((parentKey) => cache[parentKey] !== undefined && cache[parentKey].size !== undefined); + + grid.$connector.hasEnsureSubCacheQueue = tryCatchWrapper(() => ensureSubCacheQueue.length > 0); + + grid.$connector.hasParentRequestQueue = tryCatchWrapper(() => parentRequestQueue.length > 0); + + grid.$connector.hasRootRequestQueue = tryCatchWrapper(() => { + return Object.keys(rootPageCallbacks).length > 0 || (!!rootRequestDebouncer && rootRequestDebouncer.isActive()); + }); + + grid.$connector.beforeEnsureSubCacheForScaledIndex = tryCatchWrapper(function (targetCache, scaledIndex) { + // add call to queue + ensureSubCacheQueue.push({ + cache: targetCache, + scaledIndex: scaledIndex, + itemkey: grid.getItemId(targetCache.items[scaledIndex]) + }); + + ensureSubCacheDebouncer = Debouncer.debounce(ensureSubCacheDebouncer, animationFrame, () => { + while (ensureSubCacheQueue.length) { + grid.$connector.flushEnsureSubCache(); + } + }); + }); + + grid.$connector.doSelection = tryCatchWrapper(function (items, userOriginated) { + if (selectionMode === 'NONE' || !items.length || (userOriginated && grid.hasAttribute('disabled'))) { + return; + } + if (selectionMode === 'SINGLE') { + selectedKeys = {}; + } + + items.forEach((item) => { + if (item) { + selectedKeys[item.key] = item; + item.selected = true; + if (userOriginated) { + grid.$server.select(item.key); + } + } + + // FYI: In single selection mode, the server can send items = [null] + // which means a "Deselect All" command. + const isSelectedItemDifferentOrNull = !grid.activeItem || !item || item.key != grid.activeItem.key; + if (!userOriginated && selectionMode === 'SINGLE' && isSelectedItemDifferentOrNull) { + grid.activeItem = item; + } + }); + + grid.selectedItems = Object.values(selectedKeys); + }); + + grid.$connector.doDeselection = tryCatchWrapper(function (items, userOriginated) { + if (selectionMode === 'NONE' || !items.length || (userOriginated && grid.hasAttribute('disabled'))) { + return; + } + + const updatedSelectedItems = grid.selectedItems.slice(); + while (items.length) { + const itemToDeselect = items.shift(); + for (let i = 0; i < updatedSelectedItems.length; i++) { + const selectedItem = updatedSelectedItems[i]; + if (itemToDeselect && itemToDeselect.key === selectedItem.key) { + updatedSelectedItems.splice(i, 1); + break; + } + } + if (itemToDeselect) { + delete selectedKeys[itemToDeselect.key]; + delete itemToDeselect.selected; + if (userOriginated) { + grid.$server.deselect(itemToDeselect.key); + } + } + } + grid.selectedItems = updatedSelectedItems; + }); + + grid.__activeItemChanged = tryCatchWrapper(function (newVal, oldVal) { + if (selectionMode != 'SINGLE') { + return; + } + if (!newVal) { + if (oldVal && selectedKeys[oldVal.key]) { + if (grid.__deselectDisallowed) { + grid.activeItem = oldVal; + } else { + grid.$connector.doDeselection([oldVal], true); + } + } + } else if (!selectedKeys[newVal.key]) { + grid.$connector.doSelection([newVal], true); + } + }); + grid._createPropertyObserver('activeItem', '__activeItemChanged', true); + + grid.__activeItemChangedDetails = tryCatchWrapper(function (newVal, oldVal) { + if (grid.__disallowDetailsOnClick) { + return; + } + // when grid is attached, newVal is not set and oldVal is undefined + // do nothing + if (newVal == null && oldVal === undefined) { + return; + } + if (newVal && !newVal.detailsOpened) { + grid.$server.setDetailsVisible(newVal.key); + } else { + grid.$server.setDetailsVisible(null); + } + }); + grid._createPropertyObserver('activeItem', '__activeItemChangedDetails', true); + + grid.$connector._getSameLevelPage = tryCatchWrapper(function (parentKey, currentCache, currentCacheItemIndex) { + const currentParentKey = currentCache.parentItem ? grid.getItemId(currentCache.parentItem) : root; + if (currentParentKey === parentKey) { + // Level match found + return grid._getPageForIndex(currentCacheItemIndex); + } + const { parentCache } = currentCache; + if (!parentCache) { + // There is no parent cache to match level + return null; + } + const parentCacheItemIndex = Object.entries(parentCache.itemCaches).find( + ([index, cache]) => cache === currentCache + )[0]; + // Traverse the tree upwards until a match is found or the end is reached + return this._getSameLevelPage(parentKey, parentCache, parentCacheItemIndex); + }); + + grid.$connector.flushEnsureSubCache = tryCatchWrapper(function () { + const pendingFetch = ensureSubCacheQueue.shift(); + if (pendingFetch) { + pendingFetch.cache.ensureSubCacheForScaledIndexOriginal(pendingFetch.scaledIndex); + return true; + } + return false; + }); + + grid.$connector.flushParentRequests = tryCatchWrapper(function () { + let pendingFetches = parentRequestQueue.splice(0, parentRequestBatchMaxSize); + + if (pendingFetches.length) { + grid.$server.setParentRequestedRanges(pendingFetches); + return true; + } + return false; + }); + + grid.$connector.beforeParentRequest = tryCatchWrapper(function (firstIndex, size, parentKey) { + // add request in queue + parentRequestQueue.push({ + firstIndex: firstIndex, + size: size, + parentKey: parentKey + }); + + parentRequestDebouncer = Debouncer.debounce(parentRequestDebouncer, timeOut.after(parentRequestDelay), () => { + while (parentRequestQueue.length) { + grid.$connector.flushParentRequests(); + } + }); + }); + + grid.$connector.fetchPage = tryCatchWrapper(function (fetch, page, parentKey) { + // Determine what to fetch based on scroll position and not only + // what grid asked for + + // The buffer size could be multiplied by some constant defined by the user, + // if he needs to reduce the number of items sent to the Grid to improve performance + // or to increase it to make Grid smoother when scrolling + const visibleRows = grid._getRenderedRows(); + let start = visibleRows.length > 0 ? visibleRows[0].index : 0; + let end = visibleRows.length > 0 ? visibleRows[visibleRows.length - 1].index : 0; + let buffer = end - start; + + let firstNeededIndex = Math.max(0, start - buffer); + let lastNeededIndex = Math.min(end + buffer, grid._effectiveSize); + + let firstNeededPage = page; + let lastNeededPage = page; + for (let idx = firstNeededIndex; idx <= lastNeededIndex; idx++) { + const { cache, scaledIndex } = grid._cache.getCacheAndIndex(idx); + // Try to match level by going up in hierarchy. The page range should include + // pages that contain either of the following: + // - visible items of the current cache + // - same level parents of visible descendant items + // If the parent items are not considered, Flow would remove the hidden parent + // items from the current level cache. This can lead to an infinite loop when using + // scrollToIndex feature. + const sameLevelPage = grid.$connector._getSameLevelPage(parentKey, cache, scaledIndex); + if (sameLevelPage === null) { + continue; + } + firstNeededPage = Math.min(firstNeededPage, sameLevelPage); + lastNeededPage = Math.max(lastNeededPage, sameLevelPage); + } + + let firstPage = Math.max(0, firstNeededPage); + let lastPage = + parentKey !== root ? lastNeededPage : Math.min(lastNeededPage, Math.floor(grid.size / grid.pageSize)); + let lastRequestedRange = lastRequestedRanges[parentKey]; + if (!lastRequestedRange) { + lastRequestedRange = [-1, -1]; + } + if (lastRequestedRange[0] != firstPage || lastRequestedRange[1] != lastPage) { + lastRequestedRange = [firstPage, lastPage]; + lastRequestedRanges[parentKey] = lastRequestedRange; + let count = lastPage - firstPage + 1; + fetch(firstPage * grid.pageSize, count * grid.pageSize); + } + }); + + grid.dataProvider = tryCatchWrapper(function (params, callback) { + if (params.pageSize != grid.pageSize) { + throw 'Invalid pageSize'; + } + + let page = params.page; + + if (params.parentItem) { + let parentUniqueKey = grid.getItemId(params.parentItem); + if (!treePageCallbacks[parentUniqueKey]) { + treePageCallbacks[parentUniqueKey] = {}; + } + + let itemCache = grid._cache.getCacheByKey(parentUniqueKey); + if (cache[parentUniqueKey] && cache[parentUniqueKey][page] && itemCache) { + // workaround: sometimes grid-element gives page index that overflows + page = Math.min(page, Math.floor(cache[parentUniqueKey].size / grid.pageSize)); + + // Ensure grid isn't in loading state when the callback executes + ensureSubCacheQueue = []; + // Resolve the callback from cache + callback(cache[parentUniqueKey][page], cache[parentUniqueKey].size); + } else { + treePageCallbacks[parentUniqueKey][page] = callback; + + grid.$connector.fetchPage( + (firstIndex, size) => grid.$connector.beforeParentRequest(firstIndex, size, params.parentItem.key), + page, + parentUniqueKey + ); + } + } else { + // workaround: sometimes grid-element gives page index that overflows + page = Math.min(page, Math.floor(grid.size / grid.pageSize)); + + // size is controlled by the server (data communicator), so if the + // size is zero, we know that there is no data to fetch. + // This also prevents an empty grid getting stuck in a loading state. + // The connector does not cache empty pages, so if the grid requests + // data again, there would be no cache entry, causing a request to + // the server. However, the data communicator will never respond, + // as it assumes that the data is already cached. + if (grid.size === 0) { + callback([], 0); + return; + } + + if (cache[root] && cache[root][page]) { + callback(cache[root][page]); + } else { + rootPageCallbacks[page] = callback; + + rootRequestDebouncer = Debouncer.debounce( + rootRequestDebouncer, + timeOut.after(grid._hasData ? rootRequestDelay : 0), + () => { + grid.$connector.fetchPage( + (firstIndex, size) => grid.$server.setRequestedRange(firstIndex, size), + page, + root + ); + } + ); + } + } + }); + + const sorterChangeListener = tryCatchWrapper(function (_, oldValue) { + if (oldValue !== undefined && !sorterDirectionsSetFromServer) { + grid.$server.sortersChanged( + grid._sorters.map(function (sorter) { + return { + path: sorter.path, + direction: sorter.direction + }; + }) + ); + } + }); + + grid.$connector.setSorterDirections = tryCatchWrapper(function (directions) { + sorterDirectionsSetFromServer = true; + setTimeout( + tryCatchWrapper(() => { + try { + const sorters = Array.from(grid.querySelectorAll('vaadin-grid-sorter')); + + // Sorters for hidden columns are removed from DOM but stored in the web component. + // We need to ensure that all the sorters are reset when using `grid.sort(null)`. + grid._sorters.forEach((sorter) => { + if (!sorters.includes(sorter)) { + sorters.push(sorter); + } + }); + + sorters.forEach((sorter) => { + if (!directions.filter((d) => d.column === sorter.getAttribute('path'))[0]) { + sorter.direction = null; + } + }); + + // Apply directions in correct order, depending on configured multi-sort priority. + // For the default "prepend" mode, directions need to be applied in reverse, in + // order for the sort indicators to match the order on the server. For "append" + // just keep the order passed from the server. + if (grid.multiSortPriority !== 'append') { + directions = directions.reverse(); + } + directions.forEach(({ column, direction }) => { + sorters.forEach((sorter) => { + if (sorter.getAttribute('path') === column && sorter.direction !== direction) { + sorter.direction = direction; + } + }); + }); + } finally { + sorterDirectionsSetFromServer = false; + } + }) + ); + }); + grid._createPropertyObserver('_previousSorters', sorterChangeListener); + + grid._updateItem = tryCatchWrapper(function (row, item) { + Grid.prototype._updateItem.call(grid, row, item); + + // There might be inactive component renderers on hidden rows that still refer to the + // same component instance as one of the renderers on a visible row. Making the + // inactive/hidden renderer attach the component might steal it from a visible/active one. + if (!row.hidden) { + // make sure that component renderers are updated + Array.from(row.children).forEach((cell) => { + if (cell._content && cell._content.__templateInstance && cell._content.__templateInstance.children) { + Array.from(cell._content.__templateInstance.children).forEach((content) => { + if (content._attachRenderedComponentIfAble) { + content._attachRenderedComponentIfAble(); + } + // In hierarchy column of tree grid, the component renderer is inside its content, + // this updates it renderer from innerContent + if (content.children) { + Array.from(content.children).forEach((innerContent) => { + if (innerContent._attachRenderedComponentIfAble) { + innerContent._attachRenderedComponentIfAble(); + } + }); + } + }); + } + }); + } + // since no row can be selected when selection mode is NONE + // if selectionMode is set to NONE, remove aria-selected attribute from the row + if (selectionMode === validSelectionModes[1]) { + // selectionMode === NONE + row.removeAttribute('aria-selected'); + Array.from(row.children).forEach((cell) => cell.removeAttribute('aria-selected')); + } + }); + + const itemExpandedChanged = tryCatchWrapper(function (item, expanded) { + // method available only for the TreeGrid server-side component + if (item == undefined || grid.$server.updateExpandedState == undefined) { + return; + } + let parentKey = grid.getItemId(item); + grid.$server.updateExpandedState(parentKey, expanded); + }); + + // Patch grid.expandItem and grid.collapseItem to have + // itemExpandedChanged run when either happens. + grid.expandItem = tryCatchWrapper(function (item) { + itemExpandedChanged(item, true); + Grid.prototype.expandItem.call(grid, item); + }); + + grid.collapseItem = tryCatchWrapper(function (item) { + itemExpandedChanged(item, false); + Grid.prototype.collapseItem.call(grid, item); + }); + + const itemsUpdated = function (items) { + if (!items || !Array.isArray(items)) { + throw 'Attempted to call itemsUpdated with an invalid value: ' + JSON.stringify(items); + } + let detailsOpenedItems = Array.from(grid.detailsOpenedItems); + let updatedSelectedItem = false; + for (let i = 0; i < items.length; ++i) { + const item = items[i]; + if (!item) { + continue; + } + if (item.detailsOpened) { + if (grid._getItemIndexInArray(item, detailsOpenedItems) < 0) { + detailsOpenedItems.push(item); + } + } else if (grid._getItemIndexInArray(item, detailsOpenedItems) >= 0) { + detailsOpenedItems.splice(grid._getItemIndexInArray(item, detailsOpenedItems), 1); + } + if (selectedKeys[item.key]) { + selectedKeys[item.key] = item; + item.selected = true; + updatedSelectedItem = true; + } + } + grid.detailsOpenedItems = detailsOpenedItems; + if (updatedSelectedItem) { + // Replace the objects in the grid.selectedItems array without replacing the array + // itself in order to avoid an unnecessary re-render of the grid. + grid.selectedItems.splice(0, grid.selectedItems.length, ...Object.values(selectedKeys)); + } + }; + + /** + * Updates the cache for the given page for grid or tree-grid. + * + * @param page index of the page to update + * @param parentKey the key of the parent item for the page + * @returns an array of the updated items for the page, or undefined if no items were cached for the page + */ + const updateGridCache = function (page, parentKey) { + let items; + if ((parentKey || root) !== root) { + items = cache[parentKey][page]; + let itemCache = grid._cache.getCacheByKey(parentKey); + if (itemCache) { + const callbacksForParentKey = treePageCallbacks[parentKey]; + const callback = callbacksForParentKey && callbacksForParentKey[page]; + _updateGridCache(page, items, callback, itemCache); + } + } else { + items = cache[root][page]; + _updateGridCache(page, items, rootPageCallbacks[page], grid._cache); + } + return items; + }; + + const _updateGridCache = function (page, items, callback, levelcache) { + // Force update unless there's a callback waiting + if (!callback) { + let rangeStart = page * grid.pageSize; + let rangeEnd = rangeStart + grid.pageSize; + if (!items) { + if (levelcache && levelcache.items) { + for (let idx = rangeStart; idx < rangeEnd; idx++) { + delete levelcache.items[idx]; + } + } + } else { + if (levelcache && levelcache.items) { + for (let idx = rangeStart; idx < rangeEnd; idx++) { + if (levelcache.items[idx]) { + levelcache.items[idx] = items[idx - rangeStart]; + } + } + } + } + } + }; + + /** + * Updates all visible grid rows in DOM. + */ + const updateAllGridRowsInDomBasedOnCache = function () { + updateGridEffectiveSize(); + grid.__updateVisibleRows(); + }; + + /** + * Updates the 's internal cache size and effective size. + */ + const updateGridEffectiveSize = function () { + grid._cache.updateSize(); + grid._effectiveSize = grid._cache.effectiveSize; + }; + + /** + * Update the given items in DOM if currently visible. + * + * @param array items the items to update in DOM + */ + const updateGridItemsInDomBasedOnCache = function (items) { + if (!items || !grid.$ || grid.$.items.childElementCount === 0) { + return; + } + + const itemKeys = items.map((item) => item.key); + const indexes = grid + ._getRenderedRows() + .filter((row) => row._item && itemKeys.includes(row._item.key)) + .map((row) => row.index); + if (indexes.length > 0) { + grid.__updateVisibleRows(indexes[0], indexes[indexes.length - 1]); + } + }; + + grid.$connector.set = tryCatchWrapper(function (index, items, parentKey) { + if (index % grid.pageSize != 0) { + throw 'Got new data to index ' + index + ' which is not aligned with the page size of ' + grid.pageSize; + } + let pkey = parentKey || root; + + const firstPage = index / grid.pageSize; + const updatedPageCount = Math.ceil(items.length / grid.pageSize); + + for (let i = 0; i < updatedPageCount; i++) { + let page = firstPage + i; + let slice = items.slice(i * grid.pageSize, (i + 1) * grid.pageSize); + if (!cache[pkey]) { + cache[pkey] = {}; + } + cache[pkey][page] = slice; + + grid.$connector.doSelection(slice.filter((item) => item.selected)); + grid.$connector.doDeselection(slice.filter((item) => !item.selected && selectedKeys[item.key])); + + const updatedItems = updateGridCache(page, pkey); + if (updatedItems) { + itemsUpdated(updatedItems); + updateGridItemsInDomBasedOnCache(updatedItems); + } + } + }); + + const itemToCacheLocation = function (item) { + let parent = item.parentUniqueKey || root; + if (cache[parent]) { + for (let page in cache[parent]) { + for (let index in cache[parent][page]) { + if (grid.getItemId(cache[parent][page][index]) === grid.getItemId(item)) { + return { page: page, index: index, parentKey: parent }; + } + } + } + } + return null; + }; + + /** + * Updates the given items for a hierarchical grid. + * + * @param updatedItems the updated items array + */ + grid.$connector.updateHierarchicalData = tryCatchWrapper(function (updatedItems) { + let pagesToUpdate = []; + // locate and update the items in cache + // find pages that need updating + for (let i = 0; i < updatedItems.length; i++) { + let cacheLocation = itemToCacheLocation(updatedItems[i]); + if (cacheLocation) { + cache[cacheLocation.parentKey][cacheLocation.page][cacheLocation.index] = updatedItems[i]; + let key = cacheLocation.parentKey + ':' + cacheLocation.page; + if (!pagesToUpdate[key]) { + pagesToUpdate[key] = { + parentKey: cacheLocation.parentKey, + page: cacheLocation.page + }; + } + } + } + // IE11 doesn't work with the transpiled version of the forEach. + let keys = Object.keys(pagesToUpdate); + for (let i = 0; i < keys.length; i++) { + let pageToUpdate = pagesToUpdate[keys[i]]; + const affectedUpdatedItems = updateGridCache(pageToUpdate.page, pageToUpdate.parentKey); + if (affectedUpdatedItems) { + itemsUpdated(affectedUpdatedItems); + updateGridItemsInDomBasedOnCache(affectedUpdatedItems); + } + } + }); + + /** + * Updates the given items for a non-hierarchical grid. + * + * @param updatedItems the updated items array + */ + grid.$connector.updateFlatData = tryCatchWrapper(function (updatedItems) { + // update (flat) caches + for (let i = 0; i < updatedItems.length; i++) { + let cacheLocation = itemToCacheLocation(updatedItems[i]); + if (cacheLocation) { + // update connector cache + cache[cacheLocation.parentKey][cacheLocation.page][cacheLocation.index] = updatedItems[i]; + + // update grid's cache + const index = parseInt(cacheLocation.page) * grid.pageSize + parseInt(cacheLocation.index); + if (grid._cache.items[index]) { + grid._cache.items[index] = updatedItems[i]; + } + } + } + itemsUpdated(updatedItems); + + updateGridItemsInDomBasedOnCache(updatedItems); + }); + + grid.$connector.clearExpanded = tryCatchWrapper(function () { + grid.expandedItems = []; + ensureSubCacheQueue = []; + parentRequestQueue = []; + }); + + grid.$connector.clear = tryCatchWrapper(function (index, length, parentKey) { + let pkey = parentKey || root; + if (!cache[pkey] || Object.keys(cache[pkey]).length === 0) { + return; + } + if (index % grid.pageSize != 0) { + throw ( + 'Got cleared data for index ' + index + ' which is not aligned with the page size of ' + grid.pageSize + ); + } + + let firstPage = Math.floor(index / grid.pageSize); + let updatedPageCount = Math.ceil(length / grid.pageSize); + + for (let i = 0; i < updatedPageCount; i++) { + let page = firstPage + i; + let items = cache[pkey][page]; + grid.$connector.doDeselection(items.filter((item) => selectedKeys[item.key])); + items.forEach((item) => grid.closeItemDetails(item)); + delete cache[pkey][page]; + const updatedItems = updateGridCache(page, parentKey); + if (updatedItems) { + itemsUpdated(updatedItems); + } + updateGridItemsInDomBasedOnCache(items); + } + let cacheToClear = grid._cache; + if (parentKey) { + cacheToClear = grid._cache.getCacheByKey(pkey); + } + const endIndex = index + updatedPageCount * grid.pageSize; + for (let itemIndex = index; itemIndex < endIndex; itemIndex++) { + delete cacheToClear.items[itemIndex]; + delete cacheToClear.itemCaches[itemIndex]; + } + updateGridEffectiveSize(); + }); + + grid.$connector.reset = tryCatchWrapper(function () { + grid.size = 0; + deleteObjectContents(cache); + deleteObjectContents(grid._cache.items); + deleteObjectContents(lastRequestedRanges); + if (ensureSubCacheDebouncer) { + ensureSubCacheDebouncer.cancel(); + } + if (parentRequestDebouncer) { + parentRequestDebouncer.cancel(); + } + if (rootRequestDebouncer) { + rootRequestDebouncer.cancel(); + } + ensureSubCacheDebouncer = undefined; + parentRequestDebouncer = undefined; + ensureSubCacheQueue = []; + parentRequestQueue = []; + updateAllGridRowsInDomBasedOnCache(); + }); + + const deleteObjectContents = (obj) => Object.keys(obj).forEach((key) => delete obj[key]); + + grid.$connector.updateSize = (newSize) => (grid.size = newSize); + + grid.$connector.updateUniqueItemIdPath = (path) => (grid.itemIdPath = path); + + grid.$connector.expandItems = tryCatchWrapper(function (items) { + let newExpandedItems = Array.from(grid.expandedItems); + items.filter((item) => !grid._isExpanded(item)).forEach((item) => newExpandedItems.push(item)); + grid.expandedItems = newExpandedItems; + }); + + grid.$connector.collapseItems = tryCatchWrapper(function (items) { + let newExpandedItems = Array.from(grid.expandedItems); + items.forEach((item) => { + let index = grid._getItemIndexInArray(item, newExpandedItems); + if (index >= 0) { + newExpandedItems.splice(index, 1); + } + }); + grid.expandedItems = newExpandedItems; + items.forEach((item) => grid.$connector.removeFromQueue(item)); + }); + + grid.$connector.removeFromQueue = tryCatchWrapper(function (item) { + let itemId = grid.getItemId(item); + // The treePageCallbacks for the itemId are about to be discarded -> + // Resolve the callbacks with an empty array to not leave grid in loading state + Object.values(treePageCallbacks[itemId] || {}).forEach((callback) => callback([])); + + delete treePageCallbacks[itemId]; + ensureSubCacheQueue = ensureSubCacheQueue.filter((item) => item.itemkey !== itemId); + parentRequestQueue = parentRequestQueue.filter((item) => item.parentKey !== itemId); + }); + + grid.$connector.confirmParent = tryCatchWrapper(function (id, parentKey, levelSize) { + // Create connector cache if it doesn't exist + if (!cache[parentKey]) { + cache[parentKey] = {}; + } + // Update connector cache size + const hasSizeChanged = cache[parentKey].size !== levelSize; + cache[parentKey].size = levelSize; + if (levelSize === 0) { + cache[parentKey][0] = []; + } + + // If grid has outstanding requests for this parent, then resolve them + // and let grid update the effective size and re-render. + let outstandingRequests = Object.getOwnPropertyNames(treePageCallbacks[parentKey] || {}); + for (let i = 0; i < outstandingRequests.length; i++) { + let page = outstandingRequests[i]; + + let lastRequestedRange = lastRequestedRanges[parentKey] || [0, 0]; + + const callback = treePageCallbacks[parentKey][page]; + if ( + (cache[parentKey] && cache[parentKey][page]) || + page < lastRequestedRange[0] || + page > lastRequestedRange[1] + ) { + delete treePageCallbacks[parentKey][page]; + let items = cache[parentKey][page] || new Array(levelSize); + callback(items, levelSize); + } else if (callback && levelSize === 0) { + // The parent item has 0 child items => resolve the callback with an empty array + delete treePageCallbacks[parentKey][page]; + callback([], levelSize); + } + } + + // If size has changed, and there are no outstanding requests, then + // manually update the size of the grid cache and update the effective + // size, effectively re-rendering the grid. This is necessary when + // individual items are refreshed on the server, in which case there + // is no loading request from the grid itself. In that case, if + // children were added or removed, the grid will not be aware of it + // unless we manually update the size. + if (hasSizeChanged && outstandingRequests.length === 0) { + const itemCache = grid._cache.getCacheByKey(parentKey); + if (itemCache) { + itemCache.size = levelSize; + } + updateGridEffectiveSize(); + } + + // Let server know we're done + grid.$server.confirmParentUpdate(id, parentKey); + + if (!grid.loading) { + grid.__confirmParentUpdateDebouncer = Debouncer.debounce( + grid.__confirmParentUpdateDebouncer, + animationFrame, + () => grid.__updateVisibleRows() + ); + } + }); + + grid.$connector.confirm = tryCatchWrapper(function (id) { + // We're done applying changes from this batch, resolve outstanding + // callbacks + let outstandingRequests = Object.getOwnPropertyNames(rootPageCallbacks); + for (let i = 0; i < outstandingRequests.length; i++) { + let page = outstandingRequests[i]; + let lastRequestedRange = lastRequestedRanges[root] || [0, 0]; + + const lastAvailablePage = grid.size ? Math.ceil(grid.size / grid.pageSize) - 1 : 0; + // It's possible that the lastRequestedRange includes a page that's beyond lastAvailablePage if the grid's size got reduced during an ongoing data request + const lastRequestedRangeEnd = Math.min(lastRequestedRange[1], lastAvailablePage); + // Resolve if we have data or if we don't expect to get data + const callback = rootPageCallbacks[page]; + if ((cache[root] && cache[root][page]) || page < lastRequestedRange[0] || +page > lastRequestedRangeEnd) { + delete rootPageCallbacks[page]; + + if (cache[root][page]) { + // Cached data is available, resolve the callback + callback(cache[root][page]); + } else { + // No cached data, resolve the callback with an empty array + callback(new Array(grid.pageSize)); + // Request grid for content update + grid.requestContentUpdate(); + } + + } else if (callback && grid.size === 0) { + // The grid has 0 items => resolve the callback with an empty array + delete rootPageCallbacks[page]; + callback([]); + } + } + + if (Object.keys(rootPageCallbacks).length) { + // There are still unresolved callbacks waiting for data to the root level, + // which means that the range grid requested items for was only partially filled. + // + // This can happen for example if you preload some items without knowing exactly + // how many items the grid web component is going to request. + // + // Clear the last requested range for the root level to unblock + // any possible data requests for the same range in fetchPage. + delete lastRequestedRanges[root]; + } + + // Let server know we're done + grid.$server.confirmUpdate(id); + }); + + grid.$connector.ensureHierarchy = tryCatchWrapper(function () { + for (let parentKey in cache) { + if (parentKey !== root) { + delete cache[parentKey]; + } + } + deleteObjectContents(lastRequestedRanges); + + grid._cache.itemCaches = {}; + + updateAllGridRowsInDomBasedOnCache(); + }); + + grid.$connector.setSelectionMode = tryCatchWrapper(function (mode) { + if ((typeof mode === 'string' || mode instanceof String) && validSelectionModes.indexOf(mode) >= 0) { + selectionMode = mode; + selectedKeys = {}; + grid.$connector.updateMultiSelectable(); + } else { + throw 'Attempted to set an invalid selection mode'; + } + }); + + /* + * Manage aria-multiselectable attribute depending on the selection mode. + * see more: https://github.com/vaadin/web-components/issues/1536 + * or: https://www.w3.org/TR/wai-aria-1.1/#aria-multiselectable + * For selection mode SINGLE, set the aria-multiselectable attribute to false + */ + grid.$connector.updateMultiSelectable = tryCatchWrapper(function () { + if (!grid.$) { + return; + } + + if (selectionMode === validSelectionModes[0]) { + grid.$.table.setAttribute('aria-multiselectable', false); + // For selection mode NONE, remove the aria-multiselectable attribute + } else if (selectionMode === validSelectionModes[1]) { + grid.$.table.removeAttribute('aria-multiselectable'); + // For selection mode MULTI, set aria-multiselectable to true + } else { + grid.$.table.setAttribute('aria-multiselectable', true); + } + }); + + // Have the multi-selectable state updated on attach + grid._createPropertyObserver('isAttached', () => grid.$connector.updateMultiSelectable()); + + const singleTimeRenderer = (renderer) => { + return (root) => { + if (renderer) { + renderer(root); + renderer = null; + } + }; + }; + + grid.$connector.setHeaderRenderer = tryCatchWrapper(function (column, options) { + const { content, showSorter, sorterPath } = options; + + if (content === null) { + column.headerRenderer = null; + return; + } + + column.headerRenderer = singleTimeRenderer((root) => { + // Clear previous contents + root.innerHTML = ''; + // Render sorter + let contentRoot = root; + if (showSorter) { + const sorter = document.createElement('vaadin-grid-sorter'); + sorter.setAttribute('path', sorterPath); + const ariaLabel = content instanceof Node ? content.textContent : content; + if (ariaLabel) { + sorter.setAttribute('aria-label', `Sort by ${ariaLabel}`); + } + root.appendChild(sorter); + + // Use sorter as content root + contentRoot = sorter; + } + // Add content + if (content instanceof Node) { + contentRoot.appendChild(content); + } else { + contentRoot.textContent = content; + } + }); + }); + + grid.__applySorters = () => { + // Update the _previousSorters in vaadin-grid-sort-mixin so that the __applySorters + // method in the mixin will skip calling clearCache(). + // + // In Flow Grid's case, we never want to clear the cache eagerly when the sorter elements + // change due to one of the following reasons: + // + // 1. Sorted by user: The items in the new sort order need to be fetched from the server, + // and we want to avoid a heavy re-render before the updated items have actually been fetched. + // + // 2. Sorted programmatically on the server: The items in the new sort order have already + // been fetched and applied to the grid. The sorter element states are updated programmatically + // to reflect the new sort order, but there's no need to re-render the grid rows. + grid._previousSorters = grid._mapSorters(); + + // Call the original __applySorters method in vaadin-grid-sort-mixin + Grid.prototype.__applySorters.call(grid); + }; + + grid.$connector.setFooterRenderer = tryCatchWrapper(function (column, options) { + const { content } = options; + + if (content === null) { + column.footerRenderer = null; + return; + } + + column.footerRenderer = singleTimeRenderer((root) => { + // Clear previous contents + root.innerHTML = ''; + // Add content + if (content instanceof Node) { + root.appendChild(content); + } else { + root.textContent = content; + } + }); + }); + + grid.addEventListener( + 'vaadin-context-menu-before-open', + tryCatchWrapper(function (e) { + const { key, columnId } = e.detail; + grid.$server.updateContextMenuTargetItem(key, columnId); + }) + ); + + grid.getContextMenuBeforeOpenDetail = tryCatchWrapper(function (event) { + // For `contextmenu` events, we need to access the source event, + // when using open on click we just use the click event itself + const sourceEvent = event.detail.sourceEvent || event; + const eventContext = grid.getEventContext(sourceEvent); + const key = (eventContext.item && eventContext.item.key) || ''; + const columnId = (eventContext.column && eventContext.column.id) || ''; + return { key, columnId }; + }); + + grid.addEventListener( + 'click', + tryCatchWrapper((e) => _fireClickEvent(e, 'item-click')) + ); + grid.addEventListener( + 'dblclick', + tryCatchWrapper((e) => _fireClickEvent(e, 'item-double-click')) + ); + + grid.addEventListener( + 'column-resize', + tryCatchWrapper((e) => { + const cols = grid._getColumnsInOrder().filter((col) => !col.hidden); + + cols.forEach((col) => { + col.dispatchEvent(new CustomEvent('column-drag-resize')); + }); + + grid.dispatchEvent( + new CustomEvent('column-drag-resize', { + detail: { + resizedColumnKey: e.detail.resizedColumn._flowId + } + }) + ); + }) + ); + + grid.addEventListener( + 'column-reorder', + tryCatchWrapper((e) => { + const columns = grid._columnTree + .slice(0) + .pop() + .filter((c) => c._flowId) + .sort((b, a) => b._order - a._order) + .map((c) => c._flowId); + + grid.dispatchEvent( + new CustomEvent('column-reorder-all-columns', { + detail: { columns } + }) + ); + }) + ); + + grid.addEventListener( + 'cell-focus', + tryCatchWrapper((e) => { + const eventContext = grid.getEventContext(e); + const expectedSectionValues = ['header', 'body', 'footer']; + + if (expectedSectionValues.indexOf(eventContext.section) === -1) { + return; + } + + grid.dispatchEvent( + new CustomEvent('grid-cell-focus', { + detail: { + itemKey: eventContext.item ? eventContext.item.key : null, + + internalColumnId: eventContext.column ? eventContext.column._flowId : null, + + section: eventContext.section + } + }) + ); + }) + ); + + function _fireClickEvent(event, eventName) { + // Click event was handled by the component inside grid, do nothing. + if (event.defaultPrevented) { + return; + } + + const target = event.target; + + if (isFocusable(target) || target instanceof HTMLLabelElement) { + return; + } + + const eventContext = grid.getEventContext(event); + const section = eventContext.section; + + if (eventContext.item && section !== 'details') { + event.itemKey = eventContext.item.key; + // if you have a details-renderer, getEventContext().column is undefined + if (eventContext.column) { + event.internalColumnId = eventContext.column._flowId; + } + grid.dispatchEvent(new CustomEvent(eventName, { detail: event })); + } + } + + grid.cellClassNameGenerator = tryCatchWrapper(function (column, rowData) { + const style = rowData.item.style; + if (!style) { + return; + } + return (style.row || '') + ' ' + ((column && style[column._flowId]) || ''); + }); + + grid.cellPartNameGenerator = tryCatchWrapper(function (column, rowData) { + const part = rowData.item.part; + if (!part) { + return; + } + return (part.row || '') + ' ' + ((column && part[column._flowId]) || ''); + }); + + grid.dropFilter = tryCatchWrapper((rowData) => rowData.item && !rowData.item.dropDisabled); + + grid.dragFilter = tryCatchWrapper((rowData) => rowData.item && !rowData.item.dragDisabled); + + grid.addEventListener( + 'grid-dragstart', + tryCatchWrapper((e) => { + if (grid._isSelected(e.detail.draggedItems[0])) { + // Dragging selected (possibly multiple) items + if (grid.__selectionDragData) { + Object.keys(grid.__selectionDragData).forEach((type) => { + e.detail.setDragData(type, grid.__selectionDragData[type]); + }); + } else { + (grid.__dragDataTypes || []).forEach((type) => { + e.detail.setDragData(type, e.detail.draggedItems.map((item) => item.dragData[type]).join('\n')); + }); + } + + if (grid.__selectionDraggedItemsCount > 1) { + e.detail.setDraggedItemsCount(grid.__selectionDraggedItemsCount); + } + } else { + // Dragging just one (non-selected) item + (grid.__dragDataTypes || []).forEach((type) => { + e.detail.setDragData(type, e.detail.draggedItems[0].dragData[type]); + }); + } + }) + ); + })(grid) + }; +})(); diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/index.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/index.d.ts new file mode 100644 index 0000000..d4e6e0d --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/index.d.ts @@ -0,0 +1 @@ +export * from './Flow'; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/index.js b/LoadBalancerWeb/frontend/generated/jar-resources/index.js new file mode 100644 index 0000000..6c14827 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/index.js @@ -0,0 +1,2 @@ +export * from './Flow'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/index.js.map b/LoadBalancerWeb/frontend/generated/jar-resources/index.js.map new file mode 100644 index 0000000..c662ab4 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/frontend/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC","sourcesContent":["export * from './Flow';\n"]} \ No newline at end of file diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/lit-renderer.ts b/LoadBalancerWeb/frontend/generated/jar-resources/lit-renderer.ts new file mode 100644 index 0000000..7df7297 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/lit-renderer.ts @@ -0,0 +1,110 @@ +/* eslint-disable no-restricted-syntax */ +/* eslint-disable max-params */ +import { html, render } from 'lit'; + +type RenderRoot = HTMLElement & { __litRenderer?: Renderer; _$litPart$?: any }; + +type ItemModel = { item: any; index: number }; + +type Renderer = ((root: RenderRoot, rendererOwner: HTMLElement, model: ItemModel) => void) & { __rendererId?: string }; + +type Component = HTMLElement & { [key: string]: Renderer | undefined }; + +const _window = window as any; +_window.Vaadin = _window.Vaadin || {}; + +/** + * Assigns the component a renderer function which uses Lit to render + * the given template expression inside the render root element. + * + * @param component The host component to which the renderer runction is to be set + * @param rendererName The name of the renderer function + * @param templateExpression The content of the template literal passed to Lit for rendering. + * @param returnChannel A channel to the server. + * Calling it will end up invoking a handler in the server-side LitRenderer. + * @param clientCallables A list of function names that can be called from within the template literal. + * @param propertyNamespace LitRenderer-specific namespace for properties. + * Needed to avoid property name collisions between renderers. + */ +_window.Vaadin.setLitRenderer = ( + component: Component, + rendererName: string, + templateExpression: string, + returnChannel: (name: string, itemKey: string, args: any[]) => void, + clientCallables: string[], + propertyNamespace: string, +) => { + // Dynamically created function that renders the templateExpression + // inside the given root element using Lit + const renderFunction = Function(` + "use strict"; + + const [render, html, returnChannel] = arguments; + + return (root, model, itemKey) => { + const { item, index } = model; + ${clientCallables + .map((clientCallable) => { + // Map all the client-callables as inline functions so they can be accessed from the template literal + return ` + const ${clientCallable} = (...args) => { + if (itemKey !== undefined) { + returnChannel('${clientCallable}', itemKey, args[0] instanceof Event ? [] : [...args]); + } + }`; + }) + .join('')} + + render(html\`${templateExpression}\`, root) + } + `)(render, html, returnChannel); + + const renderer: Renderer = (root, _, model) => { + const { item } = model; + // Clean up the root element of any existing content + // (and Lit's _$litPart$ property) from other renderers + // TODO: Remove once https://github.com/vaadin/web-components/issues/2235 is done + if (root.__litRenderer !== renderer) { + root.innerHTML = ''; + delete root._$litPart$; + root.__litRenderer = renderer; + } + + // Map a new item that only includes the properties defined by + // this specific LitRenderer instance. The renderer instance specific + // "propertyNamespace" prefix is stripped from the property name at this point: + // + // item: { key: "2", lr_3_lastName: "Tyler"} + // -> + // mappedItem: { lastName: "Tyler" } + const mappedItem: { [key: string]: any } = {}; + for (const key in item) { + if (key.startsWith(propertyNamespace)) { + mappedItem[key.replace(propertyNamespace, '')] = item[key]; + } + } + + renderFunction(root, { ...model, item: mappedItem }, item.key); + }; + + renderer.__rendererId = propertyNamespace; + component[rendererName] = renderer; +}; + +/** + * Removes the renderer function with the given name from the component + * if the propertyNamespace matches the renderer's id. + * + * @param component The host component whose renderer function is to be removed + * @param rendererName The name of the renderer function + * @param rendererId The rendererId of the function to be removed + */ +_window.Vaadin.unsetLitRenderer = (component: Component, rendererName: string, rendererId: string) => { + // The check for __rendererId property is necessary since the renderer function + // may get overridden by another renderer, for example, by one coming from + // vaadin-template-renderer. We don't want LitRenderer registration cleanup to + // unintentionally remove the new renderer. + if (component[rendererName]?.__rendererId === rendererId) { + component[rendererName] = undefined; + } +}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/menubarConnector.js b/LoadBalancerWeb/frontend/generated/jar-resources/menubarConnector.js new file mode 100644 index 0000000..b7daa4f --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/menubarConnector.js @@ -0,0 +1,111 @@ +/* + * Copyright 2000-2023 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +import './contextMenuConnector.js'; + +(function () { + const tryCatchWrapper = function (callback) { + return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Menu Bar'); + }; + + /** + * Initializes the connector for a menu bar element. + * + * @param {HTMLElement} menubar + * @param {string} appId + */ + function initLazy(menubar, appId) { + if (menubar.$connector) { + return; + } + + const observer = new MutationObserver((records) => { + const hasChangedAttributes = records.some((entry) => { + const oldValue = entry.oldValue; + const newValue = entry.target.getAttribute(entry.attributeName); + return oldValue !== newValue; + }); + + if (hasChangedAttributes) { + menubar.$connector.generateItems(); + } + }); + + menubar.$connector = { + /** + * Generates and assigns the items to the menu bar. + * + * When the method is called without providing a node id, + * the previously generated items tree will be used. + * That can be useful if you only want to sync the disabled and hidden properties of root items. + * + * @param {number | undefined} nodeId + */ + generateItems: tryCatchWrapper((nodeId) => { + if (!menubar.shadowRoot) { + // workaround for https://github.com/vaadin/flow/issues/5722 + setTimeout(() => menubar.$connector.generateItems(nodeId)); + return; + } + + if (nodeId) { + menubar.__generatedItems = window.Vaadin.Flow.contextMenuConnector.generateItemsTree(appId, nodeId); + } + + let items = menubar.__generatedItems || []; + + // Propagate disabled state from items to parent buttons + items.forEach((item) => (item.disabled = item.component.disabled)); + + // Remove hidden items entirely from the array. Just hiding them + // could cause the overflow button to be rendered without items. + // + // The items-prop needs to be set even when all items are visible + // to update the disabled state and re-render buttons. + items = items.filter((item) => !item.component.hidden); + + // Observe for hidden and disabled attributes in case they are changed by Flow. + // When a change occurs, the observer will re-generate items on top of the existing tree + // to sync the new attribute values with the corresponding properties in the items array. + items.forEach((item) => { + observer.observe(item.component, { + attributeFilter: ['hidden', 'disabled'], + attributeOldValue: true + }); + }); + + menubar.items = items; + + // Propagate click events from the menu buttons to the item components + menubar._buttons.forEach((button) => { + if (button.item && button.item.component) { + button.addEventListener('click', (e) => { + if (e.composedPath().indexOf(button.item.component) === -1) { + button.item.component.click(); + e.stopPropagation(); + } + }); + } + }); + }) + }; + } + + window.Vaadin.Flow.menubarConnector = { + initLazy(...args) { + return tryCatchWrapper(initLazy)(...args); + } + }; +})(); diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/messageListConnector.js b/LoadBalancerWeb/frontend/generated/jar-resources/messageListConnector.js new file mode 100644 index 0000000..89efc1e --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/messageListConnector.js @@ -0,0 +1,41 @@ +/* + * Copyright 2000-2023 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +(function () { + const tryCatchWrapper = function (callback) { + return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Message List'); + }; + + window.Vaadin.Flow.messageListConnector = { + setItems: (list, items, locale) => + tryCatchWrapper(function (list, items, locale) { + const formatter = new Intl.DateTimeFormat(locale, { + year: 'numeric', + month: 'short', + day: 'numeric', + hour: 'numeric', + minute: 'numeric' + }); + list.items = items.map((item) => + item.time + ? Object.assign(item, { + time: formatter.format(new Date(item.time)) + }) + : item + ); + })(list, items, locale) + }; +})(); diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/selectConnector.js b/LoadBalancerWeb/frontend/generated/jar-resources/selectConnector.js new file mode 100644 index 0000000..52fc0a2 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/selectConnector.js @@ -0,0 +1,36 @@ +(function () { + const tryCatchWrapper = function (callback) { + return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Select'); + }; + + window.Vaadin.Flow.selectConnector = { + initLazy: (select) => + tryCatchWrapper(function (select) { + const _findListBoxElement = tryCatchWrapper(function () { + for (let i = 0; i < select.childElementCount; i++) { + const child = select.children[i]; + if ('VAADIN-SELECT-LIST-BOX' === child.tagName.toUpperCase()) { + return child; + } + } + }); + + // do not init this connector twice for the given select + if (select.$connector) { + return; + } + + select.$connector = {}; + + select.renderer = tryCatchWrapper(function (root) { + const listBox = _findListBoxElement(); + if (listBox) { + if (root.firstChild) { + root.removeChild(root.firstChild); + } + root.appendChild(listBox); + } + }); + })(select) + }; +})(); diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/theme-util.js b/LoadBalancerWeb/frontend/generated/jar-resources/theme-util.js new file mode 100644 index 0000000..5e4ed19 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/theme-util.js @@ -0,0 +1,150 @@ +import stripCssComments from 'strip-css-comments'; + +// Safari 15 - 16.3, polyfilled +const polyfilledSafari = CSSStyleSheet.toString().includes('document.createElement'); + +const createLinkReferences = (css, target) => { + // Unresolved urls are written as '@import url(text);' or '@import "text";' to the css + // media query can be present on @media tag or on @import directive after url + // Note that with Vite production build there is no space between @import and "text" + // [0] is the full match + // [1] matches the media query + // [2] matches the url + // [3] matches the quote char surrounding in '@import "..."' + // [4] matches the url in '@import "..."' + // [5] matches media query on @import statement + const importMatcher = + /(?:@media\s(.+?))?(?:\s{)?\@import\s*(?:url\(\s*['"]?(.+?)['"]?\s*\)|(["'])((?:\\.|[^\\])*?)\3)([^;]*);(?:})?/g; + + // Only cleanup if comment exist + if (/\/\*(.|[\r\n])*?\*\//gm.exec(css) != null) { + // clean up comments + css = stripCssComments(css); + } + + var match; + var styleCss = css; + + // For each external url import add a link reference + while ((match = importMatcher.exec(css)) !== null) { + styleCss = styleCss.replace(match[0], ''); + const link = document.createElement('link'); + link.rel = 'stylesheet'; + link.href = match[2] || match[4]; + const media = match[1] || match[5]; + if (media) { + link.media = media; + } + // For target document append to head else append to target + if (target === document) { + document.head.appendChild(link); + } else { + target.appendChild(link); + } + } + return styleCss; +}; + +const addAdoptedStyleSafariPolyfill = (sheet, target, first) => { + if (first) { + target.adoptedStyleSheets = [sheet, ...target.adoptedStyleSheets]; + } else { + target.adoptedStyleSheets = [...target.adoptedStyleSheets, sheet]; + } + return () => { + target.adoptedStyleSheets = target.adoptedStyleSheets.filter((ss) => ss !== sheet); + }; +}; + +const addAdoptedStyle = (cssText, target, first) => { + const sheet = new CSSStyleSheet(); + sheet.replaceSync(cssText); + if (polyfilledSafari) { + return addAdoptedStyleSafariPolyfill(sheet, target, first); + } + if (first) { + target.adoptedStyleSheets.splice(0, 0, sheet); + } else { + target.adoptedStyleSheets.push(sheet); + } + return () => { + target.adoptedStyleSheets.splice(target.adoptedStyleSheets.indexOf(sheet), 1); + }; +}; + +const addStyleTag = (cssText, referenceComment) => { + const styleTag = document.createElement('style'); + styleTag.type = 'text/css'; + styleTag.textContent = cssText; + + let beforeThis = undefined; + if (referenceComment) { + const comments = Array.from(document.head.childNodes).filter(elem => elem.nodeType === Node.COMMENT_NODE); + const container = comments.find(comment => comment.data.trim() === referenceComment); + if (container) { + beforeThis = container; + } + } + document.head.insertBefore(styleTag, beforeThis); + return () => { + styleTag.remove(); + }; +}; + +// target: Document | ShadowRoot +export const injectGlobalCss = (css, referenceComment, target, first) => { + if (target === document) { + const hash = getHash(css); + if (window.Vaadin.theme.injectedGlobalCss.indexOf(hash) !== -1) { + return; + } + window.Vaadin.theme.injectedGlobalCss.push(hash); + } + const cssText = createLinkReferences(css, target); + + // We avoid mixing style tags and adoptedStyleSheets to make override order clear + if (target === document) { + return addStyleTag(cssText, referenceComment); + } + + return addAdoptedStyle(cssText, target, first); +}; + +window.Vaadin = window.Vaadin || {}; +window.Vaadin.theme = window.Vaadin.theme || {}; +window.Vaadin.theme.injectedGlobalCss = []; + +/** + * Calculate a 32 bit FNV-1a hash + * Found here: https://gist.github.com/vaiorabbit/5657561 + * Ref.: http://isthe.com/chongo/tech/comp/fnv/ + * + * @param {string} str the input value + * @returns {string} 32 bit (as 8 byte hex string) + */ +function hashFnv32a(str) { + /*jshint bitwise:false */ + let i, + l, + hval = 0x811c9dc5; + + for (i = 0, l = str.length; i < l; i++) { + hval ^= str.charCodeAt(i); + hval += (hval << 1) + (hval << 4) + (hval << 7) + (hval << 8) + (hval << 24); + } + + // Convert to 8 digit hex string + return ('0000000' + (hval >>> 0).toString(16)).substr(-8); +} + +/** + * Calculate a 64 bit hash for the given input. + * Double hash is used to significantly lower the collision probability. + * + * @param {string} input value to get hash for + * @returns {string} 64 bit (as 16 byte hex string) + */ +function getHash(input) { + let h1 = hashFnv32a(input); // returns 32 bit (as 8 byte hex string) + return h1 + hashFnv32a(h1 + input); +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/tooltip.ts b/LoadBalancerWeb/frontend/generated/jar-resources/tooltip.ts new file mode 100644 index 0000000..e5849ac --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/tooltip.ts @@ -0,0 +1,11 @@ +import { Tooltip } from '@vaadin/tooltip/src/vaadin-tooltip.js'; + +const _window = window as any; +_window.Vaadin = _window.Vaadin || {}; +_window.Vaadin.Flow = _window.Vaadin.Flow || {}; + +_window.Vaadin.Flow.tooltip = { + setDefaultHideDelay: (hideDelay: number) => Tooltip.setDefaultHideDelay(hideDelay), + setDefaultFocusDelay: (focusDelay: number) => Tooltip.setDefaultFocusDelay(focusDelay), + setDefaultHoverDelay: (hoverDelay: number) => Tooltip.setDefaultHoverDelay(hoverDelay), +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-big-decimal-field.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-big-decimal-field.js new file mode 100644 index 0000000..9abc6b3 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-big-decimal-field.js @@ -0,0 +1,71 @@ +/* + * Copyright 2000-2023 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +(function () { + let memoizedTemplate; + + customElements.whenDefined('vaadin-text-field').then(() => { + class BigDecimalFieldElement extends customElements.get('vaadin-text-field') { + static get template() { + if (!memoizedTemplate) { + memoizedTemplate = super.template.cloneNode(true); + memoizedTemplate.innerHTML += ``; + } + return memoizedTemplate; + } + + static get is() { + return 'vaadin-big-decimal-field'; + } + + static get properties() { + return { + _decimalSeparator: { + type: String, + value: '.', + observer: '__decimalSeparatorChanged' + } + }; + } + + ready() { + super.ready(); + this.inputElement.setAttribute('inputmode', 'decimal'); + } + + __decimalSeparatorChanged(separator, oldSeparator) { + this.allowedCharPattern = '[-+\\d' + separator + ']'; + + if (this.value && oldSeparator) { + this.value = this.value.split(oldSeparator).join(separator); + } + } + } + + customElements.define(BigDecimalFieldElement.is, BigDecimalFieldElement); + }); +})(); diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/License.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/License.d.ts new file mode 100644 index 0000000..58b9a98 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/License.d.ts @@ -0,0 +1,14 @@ +export interface Product { + name: string; + version: string; +} +export interface ProductAndMessage { + message: string; + messageHtml?: string; + product: Product; +} +export declare const findAll: (element: Element | ShadowRoot | Document, tags: string[]) => Element[]; +export declare const licenseCheckOk: (data: Product) => void; +export declare const licenseCheckFailed: (data: ProductAndMessage) => void; +export declare const licenseCheckNoKey: (data: ProductAndMessage) => void; +export declare const licenseInit: () => void; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-eed3b794.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-eed3b794.js new file mode 100644 index 0000000..2f944b3 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-eed3b794.js @@ -0,0 +1 @@ +import{t as a,s as o,i}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-accordion",displayName:"Accordion",elements:[{selector:"vaadin-accordion > vaadin-accordion-panel > vaadin-accordion-heading",displayName:"Heading",properties:[a.textColor,a.fontSize,o.padding]},{selector:"vaadin-accordion > vaadin-accordion-panel > vaadin-accordion-heading::part(toggle)",displayName:"Toggle",properties:[i.iconColor,i.iconSize]},{selector:"vaadin-accordion > vaadin-accordion-panel",displayName:"Panel",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius]}]};export{p as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-heading-c0acdd6d.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-heading-c0acdd6d.js new file mode 100644 index 0000000..c616edd --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-heading-c0acdd6d.js @@ -0,0 +1,3 @@ +import{html as e}from"lit";import{t as o,s as a,i}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-accordion-heading",displayName:"Accordion Heading",description:e`You are trying to style selected heading only, if you wish to style all panel headings of given + accordion please pick vaadin-accordion instead.`,notAccessibleDescription:e`If you wish to style all panel headings of current accordion please pick + vaadin-accordion instead.`,elements:[{selector:"vaadin-accordion-heading",displayName:"Heading",properties:[o.textColor,o.fontSize,a.padding]},{selector:"vaadin-accordion-heading::part(toggle)",displayName:"Toggle",properties:[i.iconColor,i.iconSize]}]};export{p as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-panel-616e55d6.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-panel-616e55d6.js new file mode 100644 index 0000000..a2e4073 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-accordion-panel-616e55d6.js @@ -0,0 +1,3 @@ +import{s as o}from"../vaadin-dev-tools.js";import{html as e}from"lit";import"construct-style-sheets-polyfill";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-accordion-panel",displayName:"Accordion Panel",description:e`You are styling selected panel only, if you wish to style all panel of given accordion please pick + vaadin-accordion instead.`,notAccessibleDescription:e`If you wish to style all panels of current accordion please pick + vaadin-accordion instead.`,elements:[{selector:"vaadin-accordion-panel",displayName:"Panel",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius]}]};export{l as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-app-layout-e56de2e9.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-app-layout-e56de2e9.js new file mode 100644 index 0000000..f1b9365 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-app-layout-e56de2e9.js @@ -0,0 +1 @@ +import{s as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-app-layout",displayName:"App Layout",elements:[{selector:"vaadin-app-layout",displayName:"Layout",properties:[a.backgroundColor]},{selector:"vaadin-app-layout::part(drawer)",displayName:"Drawer",properties:[a.backgroundColor,a.padding]},{selector:"vaadin-app-layout::part(navbar)",displayName:"Navbar",properties:[a.backgroundColor,a.padding]}]};export{d as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-avatar-7599297d.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-avatar-7599297d.js new file mode 100644 index 0000000..cfe86b8 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-avatar-7599297d.js @@ -0,0 +1 @@ +import{s as a,E as r,p as t,t as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-avatar",displayName:"Avatar",elements:[{selector:"vaadin-avatar",displayName:"Root element",properties:[a.backgroundColor,a.borderColor,a.borderWidth,{propertyName:"--vaadin-avatar-size",displayName:"Size",editorType:r.range,presets:t.lumoSize,icon:"square"}]},{selector:"vaadin-avatar::part(abbr)",displayName:"Abbreviation",properties:[e.textColor,e.fontWeight]}]};export{l as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-big-decimal-field-e51def24.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-big-decimal-field-e51def24.js new file mode 100644 index 0000000..280078d --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-big-decimal-field-e51def24.js @@ -0,0 +1 @@ +import{inputFieldProperties as e,labelProperties as i,helperTextProperties as r,errorMessageProperties as a}from"./vaadin-text-field-0b3db014.js";import{standardButtonProperties as t}from"./vaadin-button-2511ad84.js";import"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const g={tagName:"vaadin-big-decimal-field",displayName:"BigDecimal Field",elements:[{selector:"vaadin-big-decimal-field::part(input-field)",displayName:"Input field",properties:e},{selector:"vaadin-big-decimal-field::part(label)",displayName:"Label",properties:i},{selector:"vaadin-big-decimal-field::part(helper-text)",displayName:"Helper text",properties:r},{selector:"vaadin-big-decimal-field::part(error-message)",displayName:"Error message",properties:a},{selector:"vaadin-big-decimal-field::part(clear-button)",displayName:"Clear button",properties:t}]};export{g as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-board-828ebdea.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-board-828ebdea.js new file mode 100644 index 0000000..1995b12 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-board-828ebdea.js @@ -0,0 +1 @@ +import{s as r}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-board",displayName:"Board",elements:[{selector:"vaadin-board",displayName:"Layout",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius,r.padding]},{selector:"vaadin-board vaadin-board-row",displayName:"Row",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius,r.padding]}]};export{p as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-board-row-c70d0c55.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-board-row-c70d0c55.js new file mode 100644 index 0000000..11af7de --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-board-row-c70d0c55.js @@ -0,0 +1,3 @@ +import{s as o}from"../vaadin-dev-tools.js";import{html as r}from"lit";import"construct-style-sheets-polyfill";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-board-row",description:r`You are styling selected row only, if you wish to style all rows of given board please pick + vaadin-board instead.`,notAccessibleDescription:r`If you wish to style all rows of current board please pick + vaadin-board instead.`,displayName:"Board Row",elements:[{selector:"vaadin-board-row",displayName:"Layout",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,o.padding]}]};export{l as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-button-2511ad84.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-button-2511ad84.js new file mode 100644 index 0000000..1f210a0 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-button-2511ad84.js @@ -0,0 +1 @@ +import{c as t,s as e,E as r,p as o,f as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const s=[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,{propertyName:"--lumo-button-size",displayName:"Size",editorType:r.range,presets:o.lumoSize,icon:"square"},a.paddingInline],u={tagName:"vaadin-button",displayName:"Button",elements:[{selector:"vaadin-button",displayName:"Root element",properties:s},{selector:"vaadin-button::part(label)",displayName:"Label",properties:t}]};export{u as default,s as standardButtonProperties}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-chart-5192dc15.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-chart-5192dc15.js new file mode 100644 index 0000000..6e5972d --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-chart-5192dc15.js @@ -0,0 +1 @@ +import{a as r,E as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-chart",displayName:"Chart",elements:[{selector:"vaadin-chart",displayName:"Root element",properties:r},{selector:"vaadin-chart",displayName:"Data series",properties:[{propertyName:"--vaadin-charts-color-0",displayName:"Color 0",editorType:o.color},{propertyName:"--vaadin-charts-color-1",displayName:"Color 1",editorType:o.color},{propertyName:"--vaadin-charts-color-2",displayName:"Color 2",editorType:o.color},{propertyName:"--vaadin-charts-color-3",displayName:"Color 3",editorType:o.color},{propertyName:"--vaadin-charts-color-4",displayName:"Color 4",editorType:o.color},{propertyName:"--vaadin-charts-color-5",displayName:"Color 5",editorType:o.color},{propertyName:"--vaadin-charts-color-6",displayName:"Color 6",editorType:o.color},{propertyName:"--vaadin-charts-color-7",displayName:"Color 7",editorType:o.color},{propertyName:"--vaadin-charts-color-8",displayName:"Color 8",editorType:o.color},{propertyName:"--vaadin-charts-color-9",displayName:"Color 9",editorType:o.color}]}]};export{d as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-checkbox-4e68df64.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-checkbox-4e68df64.js new file mode 100644 index 0000000..ee5ef74 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-checkbox-4e68df64.js @@ -0,0 +1 @@ +import{E as r,p as t,s as e,i as a,t as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const c={selector:"vaadin-checkbox",displayName:"Checkbox",properties:[{propertyName:"--vaadin-checkbox-size",displayName:"Checkbox size",defaultValue:"var(--lumo-font-size-l)",editorType:r.range,presets:t.lumoFontSize,icon:"square"}]},s={selector:"vaadin-checkbox::part(checkbox)",displayName:"Checkbox box",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius]},i={selector:"vaadin-checkbox[checked]::part(checkbox)",stateAttribute:"checked",displayName:"Checkbox box (when checked)",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius]},p={selector:"vaadin-checkbox::part(checkbox)::after",displayName:"Checkmark",properties:[a.iconColor]},l={selector:"vaadin-checkbox label",displayName:"Label",properties:[o.textColor,o.fontSize,o.fontWeight,o.fontStyle]},x={tagName:"vaadin-checkbox",displayName:"Checkbox",elements:[c,s,i,p,l]};export{s as checkboxElement,i as checkedCheckboxElement,p as checkmarkElement,x as default,c as hostElement,l as labelElement}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-checkbox-group-a7c65bf2.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-checkbox-group-a7c65bf2.js new file mode 100644 index 0000000..7f5a5a6 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-checkbox-group-a7c65bf2.js @@ -0,0 +1 @@ +import{s as e}from"../vaadin-dev-tools.js";import{labelProperties as i,helperTextProperties as m,errorMessageProperties as d}from"./vaadin-text-field-0b3db014.js";import{hostElement as a,checkboxElement as t,checkedCheckboxElement as c,checkmarkElement as l,labelElement as p}from"./vaadin-checkbox-4e68df64.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const C={tagName:"vaadin-checkbox-group",displayName:"Checkbox Group",elements:[{selector:"vaadin-checkbox-group",displayName:"Root element",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-checkbox-group::part(label)",displayName:"Label",properties:i},{selector:"vaadin-checkbox-group::part(helper-text)",displayName:"Helper text",properties:m},{selector:"vaadin-checkbox-group::part(error-message)",displayName:"Error message",properties:d},{...a,selector:`vaadin-checkbox-group ${a.selector}`,displayName:"Checkboxes"},{...t,selector:`vaadin-checkbox-group ${t.selector}`,displayName:"Checkmark boxes"},{...c,selector:`vaadin-checkbox-group ${c.selector}`,displayName:"Checkmark boxes (when checked)",stateElementSelector:"vaadin-checkbox-group vaadin-checkbox"},{...l,selector:`vaadin-checkbox-group ${l.selector}`,displayName:"Checkmarks"},{...p,selector:`vaadin-checkbox-group ${p.selector}`,displayName:"Checkbox labels"}],setupElement(s){const r=document.createElement("vaadin-checkbox"),o=document.createElement("label");o.textContent="Some label",o.setAttribute("slot","label"),r.append(o),s.append(r)}};export{C as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-combo-box-96451ddd.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-combo-box-96451ddd.js new file mode 100644 index 0000000..74a9f7a --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-combo-box-96451ddd.js @@ -0,0 +1 @@ +import{inputFieldProperties as s,labelProperties as l,helperTextProperties as p,errorMessageProperties as m}from"./vaadin-text-field-0b3db014.js";import{i as a,s as r,t as i,b as n,h as b}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const u={tagName:"vaadin-combo-box",displayName:"Combo Box",elements:[{selector:"vaadin-combo-box::part(input-field)",displayName:"Input field",properties:s},{selector:"vaadin-combo-box::part(toggle-button)",displayName:"Toggle button",properties:[a.iconColor,a.iconSize]},{selector:"vaadin-combo-box::part(label)",displayName:"Label",properties:l},{selector:"vaadin-combo-box::part(helper-text)",displayName:"Helper text",properties:p},{selector:"vaadin-combo-box::part(error-message)",displayName:"Error message",properties:m},{selector:"vaadin-combo-box-overlay::part(overlay)",displayName:"Overlay",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius,r.padding]},{selector:"vaadin-combo-box-overlay vaadin-combo-box-item",displayName:"Overlay items",properties:[i.textColor,i.fontSize,i.fontWeight]},{selector:"vaadin-combo-box-overlay vaadin-combo-box-item::part(checkmark)::before",displayName:"Overlay item checkmark",properties:[a.iconColor,a.iconSize]}],async setupElement(o){o.overlayClass=o.getAttribute("class")},openOverlay:o=>{const e=o.element,t=e.$.overlay;n(e,e,t)},hideOverlay:o=>{const e=o.element,t=e.$.overlay;b(e,e,t)}};export{u as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-confirm-dialog-4d718829.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-confirm-dialog-4d718829.js new file mode 100644 index 0000000..896740a --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-confirm-dialog-4d718829.js @@ -0,0 +1 @@ +import{a,c as e}from"../vaadin-dev-tools.js";import{standardButtonProperties as o}from"./vaadin-button-2511ad84.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-confirm-dialog",displayName:"Confirm Dialog",elements:[{selector:"vaadin-confirm-dialog-overlay::part(backdrop)",displayName:"Modality curtain (backdrop)",properties:a},{selector:"vaadin-confirm-dialog-overlay::part(overlay)",displayName:"Dialog surface",properties:a},{selector:"vaadin-confirm-dialog-overlay::part(header)",displayName:"Header",properties:[...a,...e]},{selector:"vaadin-confirm-dialog-overlay::part(content)",displayName:"Content",properties:a},{selector:"vaadin-confirm-dialog-overlay::part(message)",displayName:"Message",properties:e},{selector:"vaadin-confirm-dialog-overlay::part(footer)",displayName:"Footer",properties:a},{selector:'vaadin-confirm-dialog-overlay > [slot="confirm-button"]',displayName:"Confirm button",properties:o},{selector:'vaadin-confirm-dialog-overlay > [slot="confirm-button"]::part(label)',displayName:"Confirm button label",properties:e},{selector:'vaadin-confirm-dialog-overlay > [slot="reject-button"]',displayName:"Reject button",properties:o},{selector:'vaadin-confirm-dialog-overlay > [slot="reject-button"]::part(label)',displayName:"Reject button label",properties:e},{selector:'vaadin-confirm-dialog-overlay > [slot="cancel-button"]',displayName:"Cancel button",properties:o},{selector:'vaadin-confirm-dialog-overlay > [slot="cancel-button"]::part(label)',displayName:"Cancel button label",properties:e}]};export{d as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-cookie-consent-46c09f8b.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-cookie-consent-46c09f8b.js new file mode 100644 index 0000000..a2136c9 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-cookie-consent-46c09f8b.js @@ -0,0 +1 @@ +import{a as e,c as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-cookie-consent",displayName:"Cookie Consent",elements:[{selector:"div.cc-banner",displayName:"Banner",properties:e},{selector:"div.cc-banner span.cc-message",displayName:"Message",properties:a},{selector:"div.cc-banner a.cc-btn",displayName:"Button",properties:[...e,...a]}]};export{p as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-crud-8d161a22.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-crud-8d161a22.js new file mode 100644 index 0000000..08ba2be --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-crud-8d161a22.js @@ -0,0 +1 @@ +import{s as r,i as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const n={tagName:"vaadin-crud",displayName:"CRUD",elements:[{selector:"vaadin-crud",displayName:"Root element",properties:[r.borderColor,r.borderWidth]},{selector:"vaadin-crud::part(toolbar)",displayName:"Toolbar below grid",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.padding]},{selector:"vaadin-crud::part(editor)",displayName:"Editor panel",properties:[r.backgroundColor]},{selector:"vaadin-crud vaadin-crud-edit",displayName:"Edit button in grid",properties:[r.backgroundColor,r.borderColor,r.borderWidth]},{selector:"vaadin-crud vaadin-crud-edit::part(icon)::before",displayName:"Edit button in grid icon",properties:[o.iconColor,o.iconSize]}]};export{n as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-custom-field-42c85b9e.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-custom-field-42c85b9e.js new file mode 100644 index 0000000..f75a586 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-custom-field-42c85b9e.js @@ -0,0 +1 @@ +import{labelProperties as e,helperTextProperties as r,errorMessageProperties as t}from"./vaadin-text-field-0b3db014.js";import"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-custom-field",displayName:"Custom Field",elements:[{selector:"vaadin-custom-field::part(label)",displayName:"Label",properties:e},{selector:"vaadin-custom-field::part(helper-text)",displayName:"Helper text",properties:r},{selector:"vaadin-custom-field::part(error-message)",displayName:"Error message",properties:t}]};export{d as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-date-picker-f2001167.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-date-picker-f2001167.js new file mode 100644 index 0000000..86d98f3 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-date-picker-f2001167.js @@ -0,0 +1 @@ +import{inputFieldProperties as i,labelProperties as p,helperTextProperties as l,errorMessageProperties as d}from"./vaadin-text-field-0b3db014.js";import{i as o,s as r,t as e,b as n,h as s}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const b={tagName:"vaadin-date-picker",displayName:"Date Picker",elements:[{selector:"vaadin-date-picker::part(input-field)",displayName:"Input field",properties:i},{selector:"vaadin-date-picker::part(toggle-button)",displayName:"Toggle button",properties:[o.iconColor,o.iconSize]},{selector:"vaadin-date-picker::part(label)",displayName:"Label",properties:p},{selector:"vaadin-date-picker::part(helper-text)",displayName:"Helper text",properties:l},{selector:"vaadin-date-picker::part(error-message)",displayName:"Error message",properties:d},{selector:"vaadin-date-picker-overlay::part(overlay)",displayName:"Overlay content",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius,r.padding]},{selector:"vaadin-date-picker-overlay vaadin-month-calendar::part(month-header)",displayName:"Month header",properties:[e.textColor,e.fontSize,e.fontWeight,e.fontStyle]},{selector:"vaadin-date-picker-overlay vaadin-month-calendar::part(weekday)",displayName:"Weekday",properties:[e.textColor,e.fontSize,e.fontWeight,e.fontStyle]},{selector:"vaadin-date-picker-overlay vaadin-month-calendar::part(date)",displayName:"Day",properties:[e.textColor,e.fontSize,e.fontWeight,e.fontStyle,r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius]},{selector:"vaadin-date-picker-overlay vaadin-date-picker-year::part(year-number)",displayName:"Year number",properties:[e.textColor,e.fontSize,e.fontWeight,e.fontStyle]}],openOverlay:t=>{if(!t||!t.element)return;const a=t.element;n(a,a,a)},hideOverlay:t=>{const a=t.element;s(a,a,a)}};export{b as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-date-time-picker-c8c047a7.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-date-time-picker-c8c047a7.js new file mode 100644 index 0000000..dc405fc --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-date-time-picker-c8c047a7.js @@ -0,0 +1 @@ +import{labelProperties as e,helperTextProperties as r,errorMessageProperties as t}from"./vaadin-text-field-0b3db014.js";import"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-date-time-picker",displayName:"Date Time Picker",elements:[{selector:"vaadin-date-time-picker::part(label)",displayName:"Label",properties:e},{selector:"vaadin-date-time-picker::part(helper-text)",displayName:"Helper text",properties:r},{selector:"vaadin-date-time-picker::part(error-message)",displayName:"Error message",properties:t}]};export{d as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-details-bf336660.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-details-bf336660.js new file mode 100644 index 0000000..13808e8 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-details-bf336660.js @@ -0,0 +1 @@ +import{a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-details",displayName:"Details",elements:[{selector:"vaadin-details",displayName:"Root element",properties:a}]};export{p as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-details-summary-351a1448.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-details-summary-351a1448.js new file mode 100644 index 0000000..d5ec476 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-details-summary-351a1448.js @@ -0,0 +1 @@ +import{t as a,s as t,i as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-details-summary",displayName:"Details Summary",elements:[{selector:"vaadin-details-summary",displayName:"Summary",properties:[a.textColor,a.fontSize,t.padding]},{selector:"vaadin-details-summary::part(toggle)",displayName:"Toggle",properties:[e.iconColor,e.iconSize]}]};export{l as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-dialog-53253a08.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-dialog-53253a08.js new file mode 100644 index 0000000..5ba0aaa --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-dialog-53253a08.js @@ -0,0 +1 @@ +import{a,c as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-dialog",displayName:"Dialog",elements:[{selector:"vaadin-dialog-overlay::part(backdrop)",displayName:"Modality curtain (backdrop)",properties:a},{selector:"vaadin-dialog-overlay::part(overlay)",displayName:"Dialog surface",properties:a},{selector:"vaadin-dialog-overlay::part(header)",displayName:"Header",properties:a},{selector:"vaadin-dialog-overlay::part(title)",displayName:"Title",properties:e},{selector:"vaadin-dialog-overlay::part(content)",displayName:"Content",properties:a},{selector:"vaadin-dialog-overlay::part(footer)",displayName:"Footer",properties:a}]};export{d as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-email-field-d7a35f04.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-email-field-d7a35f04.js new file mode 100644 index 0000000..8f4260b --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-email-field-d7a35f04.js @@ -0,0 +1 @@ +import{inputFieldProperties as e,labelProperties as r,helperTextProperties as a,errorMessageProperties as i}from"./vaadin-text-field-0b3db014.js";import{standardButtonProperties as t}from"./vaadin-button-2511ad84.js";import"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const c={tagName:"vaadin-email-field",displayName:"Email Field",elements:[{selector:"vaadin-email-field::part(input-field)",displayName:"Input field",properties:e},{selector:"vaadin-email-field::part(label)",displayName:"Label",properties:r},{selector:"vaadin-email-field::part(helper-text)",displayName:"Helper text",properties:a},{selector:"vaadin-email-field::part(error-message)",displayName:"Error message",properties:i},{selector:"vaadin-email-field::part(clear-button)",displayName:"Clear button",properties:t}]};export{c as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-form-layout-47744b1d.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-form-layout-47744b1d.js new file mode 100644 index 0000000..52601d6 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-form-layout-47744b1d.js @@ -0,0 +1 @@ +import{s as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-form-layout",displayName:"Form Layout",elements:[{selector:"vaadin-form-layout",displayName:"Layout",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,o.padding]}]};export{d as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-grid-0a4791c2.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-grid-0a4791c2.js new file mode 100644 index 0000000..2c1f878 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-grid-0a4791c2.js @@ -0,0 +1 @@ +import{s as o,t as e,i}from"../vaadin-dev-tools.js";import{checkboxElement as t,checkedCheckboxElement as a}from"./vaadin-checkbox-4e68df64.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const r=[e.textColor,e.fontSize,e.fontWeight,e.fontStyle,o.backgroundColor],g={tagName:"vaadin-grid",displayName:"Grid",elements:[{selector:"vaadin-grid",displayName:"Root element",properties:[o.borderColor,o.borderWidth]},{selector:"vaadin-grid::part(header-cell)",displayName:"Header row cell",properties:[e.textColor,{...e.fontSize,propertyName:"--lumo-font-size-s"},e.fontStyle,o.backgroundColor]},{selector:"vaadin-grid::part(body-cell)",displayName:"Body cell",properties:r},{selector:"vaadin-grid::part(even-row-cell)",displayName:"Cell in even row",properties:r},{selector:"vaadin-grid::part(odd-row-cell)",displayName:"Cell in odd row",properties:r},{selector:"vaadin-grid::part(selected-row-cell)",displayName:"Cell in selected row",properties:r},{selector:"vaadin-grid vaadin-grid-cell-content > vaadin-checkbox::part(checkbox)",displayName:"Row selection checkbox",properties:t.properties},{selector:"vaadin-grid vaadin-grid-cell-content > vaadin-checkbox[checked]::part(checkbox)",displayName:"Row selection checkbox (when checked)",properties:a.properties},{selector:"vaadin-grid vaadin-grid-cell-content > vaadin-checkbox::part(checkbox)::after",displayName:"Row selection checkbox checkmark",properties:[i.iconColor]},{selector:"vaadin-grid vaadin-grid-tree-toggle::part(toggle)",displayName:"Expand icon (for tree grid)",properties:[i.iconColor]}]};export{r as cellProperties,g as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-grid-pro-ff415555.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-grid-pro-ff415555.js new file mode 100644 index 0000000..d86084c --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-grid-pro-ff415555.js @@ -0,0 +1 @@ +import{s as r,t as o,i as a,E as t,p}from"../vaadin-dev-tools.js";import{checkboxElement as d,checkedCheckboxElement as l}from"./vaadin-checkbox-4e68df64.js";import{cellProperties as e}from"./vaadin-grid-0a4791c2.js";import{inputFieldProperties as i}from"./vaadin-text-field-0b3db014.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const x={tagName:"vaadin-grid-pro",displayName:"Grid Pro",elements:[{selector:"vaadin-grid-pro",displayName:"Root element",properties:[r.borderColor,r.borderWidth]},{selector:"vaadin-grid-pro::part(header-cell)",displayName:"Header row cell",properties:[o.textColor,{...o.fontSize,propertyName:"--lumo-font-size-s"},o.fontStyle,r.backgroundColor]},{selector:"vaadin-grid-pro::part(body-cell)",displayName:"Body cell",properties:e},{selector:"vaadin-grid-pro::part(even-row-cell)",displayName:"Cell in even row",properties:e},{selector:"vaadin-grid-pro::part(odd-row-cell)",displayName:"Cell in odd row",properties:e},{selector:"vaadin-grid-pro::part(selected-row-cell)",displayName:"Cell in selected row",properties:e},{selector:"vaadin-grid-pro vaadin-grid-cell-content > vaadin-checkbox::part(checkbox)",displayName:"Row selection checkbox",properties:d.properties},{selector:"vaadin-grid-pro vaadin-grid-cell-content > vaadin-checkbox[checked]::part(checkbox)",displayName:"Row selection checkbox (when checked)",properties:l.properties},{selector:"vaadin-grid-pro vaadin-grid-cell-content > vaadin-checkbox::part(checkbox)::after",displayName:"Row selection checkbox checkmark",properties:[a.iconColor]},{selector:"vaadin-grid-pro vaadin-grid-pro-edit-text-field",displayName:"Text field editor",properties:i},{selector:"vaadin-grid-pro vaadin-grid-pro-edit-checkbox",displayName:"Checkbox editor",properties:[{propertyName:"--vaadin-checkbox-size",displayName:"Checkbox size",defaultValue:"var(--lumo-font-size-l)",editorType:t.range,presets:p.lumoFontSize,icon:"square"}]},{selector:"vaadin-grid-pro vaadin-grid-pro-edit-select",displayName:"Select editor",properties:i}]};export{x as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-horizontal-layout-3193943f.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-horizontal-layout-3193943f.js new file mode 100644 index 0000000..45b5680 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-horizontal-layout-3193943f.js @@ -0,0 +1 @@ +import{s as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-horizontal-layout",displayName:"Horizontal Layout",elements:[{selector:"vaadin-horizontal-layout",displayName:"Layout",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,o.padding,o.gap]}]};export{d as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-icon-601f36ed.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-icon-601f36ed.js new file mode 100644 index 0000000..609b215 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-icon-601f36ed.js @@ -0,0 +1 @@ +import{i as r,s as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const s={tagName:"vaadin-icon",displayName:"Icon",elements:[{selector:"vaadin-icon",displayName:"Icon",properties:[r.iconColor,r.iconSize,o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius]}]};export{s as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-integer-field-85078932.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-integer-field-85078932.js new file mode 100644 index 0000000..8e467ae --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-integer-field-85078932.js @@ -0,0 +1 @@ +import{inputFieldProperties as t,labelProperties as i,helperTextProperties as a,errorMessageProperties as o}from"./vaadin-text-field-0b3db014.js";import{i as e}from"../vaadin-dev-tools.js";import{standardButtonProperties as p}from"./vaadin-button-2511ad84.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const u={tagName:"vaadin-integer-field",displayName:"Integer Field",elements:[{selector:"vaadin-integer-field::part(input-field)",displayName:"Input field",properties:t},{selector:"vaadin-integer-field::part(label)",displayName:"Label",properties:i},{selector:"vaadin-integer-field::part(helper-text)",displayName:"Helper text",properties:a},{selector:"vaadin-integer-field::part(error-message)",displayName:"Error message",properties:o},{selector:"vaadin-integer-field::part(clear-button)",displayName:"Clear button",properties:p},{selector:"vaadin-integer-field::part(decrease-button)",displayName:"Decrease button",properties:[e.iconColor,e.iconSize]},{selector:"vaadin-integer-field::part(increase-button)",displayName:"Increase button",properties:[e.iconColor,e.iconSize]}],setupElement(r){r.stepButtonsVisible=!0}};export{u as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-list-box-d7a8433b.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-list-box-d7a8433b.js new file mode 100644 index 0000000..798a740 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-list-box-d7a8433b.js @@ -0,0 +1 @@ +import{s as o,f as r}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-list-box",displayName:"List Box",elements:[{selector:"vaadin-list-box",displayName:"Root element",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,r.paddingInline]},{selector:"vaadin-list-box > hr",displayName:"Divider",properties:[o.backgroundColor]},{selector:"vaadin-list-box > vaadin-item",displayName:"Item",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,r.paddingInline]}]};export{l as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-login-form-638996c6.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-login-form-638996c6.js new file mode 100644 index 0000000..d3ed02e --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-login-form-638996c6.js @@ -0,0 +1 @@ +import{a as e,c as r,d as a}from"../vaadin-dev-tools.js";import{inputFieldProperties as i,labelProperties as t,helperTextProperties as p,errorMessageProperties as s}from"./vaadin-text-field-0b3db014.js";import{standardButtonProperties as o}from"./vaadin-button-2511ad84.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const u={tagName:"vaadin-login-form",displayName:"Login",elements:[{selector:"vaadin-login-form",displayName:"Login form root component",properties:e},{selector:"vaadin-login-form vaadin-login-form-wrapper",displayName:"Login form",properties:e},{selector:"vaadin-login-form vaadin-login-form-wrapper::part(form-title)",displayName:"Form title",properties:r},{selector:"vaadin-login-form vaadin-login-form-wrapper::part(error-message)",displayName:"Error message section",properties:e},{selector:"vaadin-login-form vaadin-login-form-wrapper::part(error-message-title)",displayName:"Error message heading",properties:r},{selector:"vaadin-login-form vaadin-login-form-wrapper::part(error-message-description)",displayName:"Error message description",properties:r},{selector:"vaadin-login-form vaadin-login-form-wrapper [required]::part(input-field)",displayName:"Input field",properties:i},{selector:"vaadin-login-form vaadin-login-form-wrapper [required]::part(label)",displayName:"Label",properties:t},{selector:"vaadin-login-form vaadin-login-form-wrapper [required]::part(helper-text)",displayName:"Helper text",properties:p},{selector:"vaadin-login-form vaadin-login-form-wrapper [required]::part(error-message)",displayName:"Error message",properties:s},{selector:"vaadin-login-form vaadin-password-field::part(reveal-button)",displayName:"Reveal button",properties:a},{selector:'vaadin-login-form vaadin-button[theme~="submit"]',displayName:"Log In Button",properties:o},{selector:'vaadin-login-form vaadin-button[theme~="submit"]::part(label)',displayName:"Log In Button Label",properties:r},{selector:'vaadin-login-form [slot="forgot-password"]',displayName:"Forgot password button",properties:o},{selector:'vaadin-login-form [slot="forgot-password"]::part(label)',displayName:"Forgot password button label",properties:r}]};export{u as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-login-overlay-f8a5db8a.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-login-overlay-f8a5db8a.js new file mode 100644 index 0000000..4a80307 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-login-overlay-f8a5db8a.js @@ -0,0 +1 @@ +import{s as o,a,c as r,d as i}from"../vaadin-dev-tools.js";import{inputFieldProperties as p,labelProperties as l,helperTextProperties as t,errorMessageProperties as n}from"./vaadin-text-field-0b3db014.js";import{standardButtonProperties as e}from"./vaadin-button-2511ad84.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const c={tagName:"vaadin-login-overlay",displayName:"Login Overlay",elements:[{selector:"vaadin-login-overlay-wrapper::part(backdrop)",displayName:"Overlay backdrop / modality curtain",properties:[o.backgroundColor]},{selector:"vaadin-login-overlay-wrapper::part(card)",displayName:"Overlay card",properties:a},{selector:"vaadin-login-overlay-wrapper::part(brand)",displayName:"Card header",properties:a},{selector:"vaadin-login-overlay-wrapper::part(title)",displayName:"Title",properties:r},{selector:"vaadin-login-overlay-wrapper::part(description)",displayName:"Description",properties:r},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper",displayName:"Login form",properties:a},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper::part(form-title)",displayName:"Form title",properties:r},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper::part(error-message)",displayName:"Error message section",properties:a},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper::part(error-message-title)",displayName:"Error message heading",properties:r},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper::part(error-message-description)",displayName:"Error message description",properties:r},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper [required]::part(input-field)",displayName:"Input field",properties:p},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper [required]::part(label)",displayName:"Input field label",properties:l},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper [required]::part(helper-text)",displayName:"Input field helper text",properties:t},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-login-form-wrapper [required]::part(error-message)",displayName:"Input field error message",properties:n},{selector:"vaadin-login-overlay-wrapper vaadin-login-form vaadin-password-field::part(reveal-button)",displayName:"Password field reveal button",properties:i},{selector:'vaadin-login-overlay-wrapper vaadin-login-form vaadin-button[theme~="submit"]',displayName:"Log In Button",properties:e},{selector:'vaadin-login-overlay-wrapper vaadin-login-form vaadin-button[theme~="submit"]::part(label)',displayName:"Log In Button Label",properties:r},{selector:'vaadin-login-overlay-wrapper vaadin-login-form [slot="forgot-password"]',displayName:"Forgot password button",properties:e},{selector:'vaadin-login-overlay-wrapper vaadin-login-form [slot="forgot-password"]::part(label)',displayName:"Forgot password button label",properties:r}]};export{c as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-map-d40a0116.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-map-d40a0116.js new file mode 100644 index 0000000..e52beed --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-map-d40a0116.js @@ -0,0 +1 @@ +import{s as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-map",displayName:"Map",elements:[{selector:"vaadin-map",displayName:"Root element",properties:[a.backgroundColor,a.borderColor,a.borderWidth,a.borderRadius,a.padding]}]};export{d as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-menu-bar-3f5ab096.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-menu-bar-3f5ab096.js new file mode 100644 index 0000000..a579cc9 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-menu-bar-3f5ab096.js @@ -0,0 +1 @@ +import{s as o,E as a,p as i,f as s,t as n,e as d}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const v={tagName:"vaadin-menu-bar",displayName:"Menu Bar",elements:[{selector:"vaadin-menu-bar vaadin-menu-bar-button",displayName:"Buttons",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,{propertyName:"--lumo-button-size",displayName:"Size",editorType:a.range,presets:i.lumoSize,icon:"square"},s.paddingInline]},{selector:"vaadin-menu-bar vaadin-menu-bar-button vaadin-menu-bar-item",displayName:"Button labels",properties:[n.textColor,n.fontSize,n.fontWeight]},{selector:"vaadin-menu-bar-overlay::part(overlay)",displayName:"Overlay",properties:[o.backgroundColor,o.borderColor,o.borderWidth,o.borderRadius,o.padding]},{selector:"vaadin-menu-bar-overlay vaadin-menu-bar-item",displayName:"Menu Items",properties:[n.textColor,n.fontSize,n.fontWeight]}],async setupElement(t){t.overlayClass=t.getAttribute("class");const r=document.createElement("vaadin-menu-bar-item");t.items=[{component:r,children:[{text:"Sub item"}]}],await new Promise(e=>setTimeout(e,10))},async cleanupElement(t){t._close()},openOverlay(t){t.element.querySelector("vaadin-menu-bar-button").click();const r=t.element.shadowRoot.querySelector("vaadin-menu-bar-submenu");if(!r)return;const e=r.$.overlay;e&&(e._storedModeless=e.modeless,e.modeless=!0,document._themeEditorDocClickListener=d(r,e),document.addEventListener("click",document._themeEditorDocClickListener),document.documentElement.removeEventListener("click",r.__itemsOutsideClickListener))},hideOverlay(t){const r=t.element.shadowRoot.querySelector("vaadin-menu-bar-submenu");if(!r)return;const e=r.$.overlay;e&&(e.close(),e.modeless=e._storedModeless,delete e._storedModeless,document.removeEventListener("click",document._themeEditorDocClickListener),document.documentElement.addEventListener("click",r.__itemsOutsideClickListener),delete document._themeEditorDocClickListener)}};export{v as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-message-input-996ac37c.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-message-input-996ac37c.js new file mode 100644 index 0000000..c8b1dfa --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-message-input-996ac37c.js @@ -0,0 +1 @@ +import{s as e,E as a,p as r,f as t}from"../vaadin-dev-tools.js";import{inputFieldProperties as i}from"./vaadin-text-field-0b3db014.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const u={tagName:"vaadin-message-input",displayName:"Message Input",elements:[{selector:"vaadin-message-input vaadin-text-area::part(input-field)",displayName:"Text area",properties:i},{selector:"vaadin-message-input vaadin-button",displayName:"Button",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,{propertyName:"--lumo-button-size",displayName:"Size",editorType:a.range,presets:r.lumoSize,icon:"square"},t.paddingInline]}]};export{u as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-message-list-70a435ba.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-message-list-70a435ba.js new file mode 100644 index 0000000..0b75bca --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-message-list-70a435ba.js @@ -0,0 +1 @@ +import{s as e,t as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-message-list",displayName:"Message List",elements:[{selector:"vaadin-message-list",displayName:"Root element",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-message-list::part(list)",displayName:"Internal list layout",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-message-list vaadin-message",displayName:"Message item",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-message-list vaadin-message::part(name)",displayName:"Name",properties:[a.textColor,a.fontSize,a.fontWeight,a.fontStyle]},{selector:"vaadin-message-list vaadin-message::part(time)",displayName:"Time",properties:[a.textColor,a.fontSize,a.fontWeight,a.fontStyle]},{selector:"vaadin-message-list vaadin-message::part(message)",displayName:"Text",properties:[a.textColor,a.fontSize,a.fontWeight,a.fontStyle]},{selector:"vaadin-message-list vaadin-message > vaadin-avatar",displayName:"Avatar",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-message-list vaadin-message > vaadin-avatar::part(abbr)",displayName:"Avatar abbreviation",properties:[a.textColor,a.fontSize,a.fontWeight,a.fontStyle]}]};export{l as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-multi-select-combo-box-a3373557.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-multi-select-combo-box-a3373557.js new file mode 100644 index 0000000..40ae7b5 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-multi-select-combo-box-a3373557.js @@ -0,0 +1 @@ +import{inputFieldProperties as i,labelProperties as l,helperTextProperties as s,errorMessageProperties as p}from"./vaadin-text-field-0b3db014.js";import{i as t,s as e,t as r,g as m,j as c}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const h={tagName:"vaadin-multi-select-combo-box",displayName:"Multi-Select Combo Box",elements:[{selector:"vaadin-multi-select-combo-box::part(input-field)",displayName:"Input field",properties:i},{selector:"vaadin-multi-select-combo-box::part(toggle-button)",displayName:"Toggle button",properties:[t.iconColor,t.iconSize]},{selector:"vaadin-multi-select-combo-box::part(label)",displayName:"Label",properties:l},{selector:"vaadin-multi-select-combo-box::part(helper-text)",displayName:"Helper text",properties:s},{selector:"vaadin-multi-select-combo-box::part(error-message)",displayName:"Error message",properties:p},{selector:"vaadin-multi-select-combo-box-overlay::part(overlay)",displayName:"Overlay",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-multi-select-combo-box-overlay vaadin-multi-select-combo-box-item",displayName:"Overlay items",properties:[r.textColor,r.fontSize,r.fontWeight]},{selector:"vaadin-multi-select-combo-box-overlay vaadin-multi-select-combo-box-item::part(checkmark)::before",displayName:"Overlay item checkmark",properties:[t.iconColor,t.iconSize]},{selector:"vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip",displayName:"Chip",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip",displayName:"Chip label",properties:[r.textColor,r.fontSize,r.fontWeight]},{selector:"vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip::part(remove-button)",displayName:"Chip remove button",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip::part(remove-button)::before",displayName:"Chip remove button icon",properties:[t.iconColor,t.iconSize]}],async setupElement(o){o.overlayClass=o.getAttribute("class"),o.items=[{label:"Item",value:"value"}],o.value="value",o.opened=!0,await new Promise(a=>setTimeout(a,10))},async cleanupElement(o){o.opened=!1},openOverlay:m,hideOverlay:c};export{h as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-notification-bd6eb776.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-notification-bd6eb776.js new file mode 100644 index 0000000..8bf2010 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-notification-bd6eb776.js @@ -0,0 +1 @@ +import{a,c as t}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const s={tagName:"vaadin-notification",displayName:"Notification",elements:[{selector:"vaadin-notification-card::part(overlay)",displayName:"Notification card",properties:a},{selector:"vaadin-notification-card::part(content)",displayName:"Content",properties:t}]};export{s as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-number-field-cb3ee8b2.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-number-field-cb3ee8b2.js new file mode 100644 index 0000000..d781cdf --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-number-field-cb3ee8b2.js @@ -0,0 +1 @@ +import{inputFieldProperties as t,labelProperties as i,helperTextProperties as a,errorMessageProperties as o}from"./vaadin-text-field-0b3db014.js";import{i as e}from"../vaadin-dev-tools.js";import{standardButtonProperties as p}from"./vaadin-button-2511ad84.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const f={tagName:"vaadin-number-field",displayName:"Number Field",elements:[{selector:"vaadin-number-field::part(input-field)",displayName:"Input field",properties:t},{selector:"vaadin-number-field::part(label)",displayName:"Label",properties:i},{selector:"vaadin-number-field::part(helper-text)",displayName:"Helper text",properties:a},{selector:"vaadin-number-field::part(error-message)",displayName:"Error message",properties:o},{selector:"vaadin-number-field::part(clear-button)",displayName:"Clear button",properties:p},{selector:"vaadin-number-field::part(increase-button)",displayName:"Increase button",properties:[e.iconColor,e.iconSize]},{selector:"vaadin-number-field::part(decrease-button)",displayName:"Decrease button",properties:[e.iconColor,e.iconSize]}],setupElement(r){r.stepButtonsVisible=!0}};export{f as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-password-field-d289cb18.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-password-field-d289cb18.js new file mode 100644 index 0000000..799f2bf --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-password-field-d289cb18.js @@ -0,0 +1 @@ +import{inputFieldProperties as r,labelProperties as a,helperTextProperties as t,errorMessageProperties as i}from"./vaadin-text-field-0b3db014.js";import{i as e}from"../vaadin-dev-tools.js";import{standardButtonProperties as s}from"./vaadin-button-2511ad84.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const v={tagName:"vaadin-password-field",displayName:"Password Field",elements:[{selector:"vaadin-password-field::part(input-field)",displayName:"Input field",properties:r},{selector:"vaadin-password-field::part(label)",displayName:"Label",properties:a},{selector:"vaadin-password-field::part(helper-text)",displayName:"Helper text",properties:t},{selector:"vaadin-password-field::part(error-message)",displayName:"Error message",properties:i},{selector:"vaadin-password-field::part(clear-button)",displayName:"Clear button",properties:s},{selector:"vaadin-password-field::part(reveal-button)",displayName:"Reveal button",properties:[e.iconColor,e.iconSize]}]};export{v as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-progress-bar-309ecf1f.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-progress-bar-309ecf1f.js new file mode 100644 index 0000000..4d70d5d --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-progress-bar-309ecf1f.js @@ -0,0 +1 @@ +import{s as r}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const i={tagName:"vaadin-progress-bar",displayName:"Progress Bar",elements:[{selector:"vaadin-progress-bar::part(bar)",displayName:"Bar",properties:[r.backgroundColor]},{selector:"vaadin-progress-bar::part(value)",displayName:"Value",properties:[r.backgroundColor]}]};export{i as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-radio-group-88b5afd8.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-radio-group-88b5afd8.js new file mode 100644 index 0000000..bceb08a --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-radio-group-88b5afd8.js @@ -0,0 +1 @@ +import{s as e,E as i,p as d,i as p,t as r}from"../vaadin-dev-tools.js";import{labelProperties as s,helperTextProperties as l,errorMessageProperties as n}from"./vaadin-text-field-0b3db014.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const N={tagName:"vaadin-radio-group",displayName:"Radio Button Group",elements:[{selector:"vaadin-radio-group",displayName:"Group",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-radio-group::part(label)",displayName:"Label",properties:s},{selector:"vaadin-radio-group::part(helper-text)",displayName:"Helper text",properties:l},{selector:"vaadin-radio-group::part(error-message)",displayName:"Error message",properties:n},{selector:"vaadin-radio-group vaadin-radio-button",displayName:"Radio buttons",properties:[{propertyName:"--vaadin-radio-button-size",displayName:"Radio button size",defaultValue:"var(--lumo-font-size-l)",editorType:i.range,presets:d.lumoFontSize,icon:"square"}]},{selector:"vaadin-radio-group vaadin-radio-button::part(radio)",displayName:"Radio part",properties:[e.backgroundColor,e.borderColor,e.borderWidth]},{selector:"vaadin-radio-group vaadin-radio-button[checked]::part(radio)",stateAttribute:"checked",stateElementSelector:"vaadin-radio-group vaadin-radio-button",displayName:"Radio part (when checked)",properties:[e.backgroundColor,e.borderColor,e.borderWidth]},{selector:"vaadin-radio-group vaadin-radio-button::part(radio)::after",displayName:"Selection indicator",properties:[{...p.iconColor,propertyName:"border-color"}]},{selector:"vaadin-radio-group vaadin-radio-button label",displayName:"Label",properties:[r.textColor,r.fontSize,r.fontWeight,r.fontStyle]}],setupElement(t){const a=document.createElement("vaadin-radio-button"),o=document.createElement("label");o.textContent="Some label",o.setAttribute("slot","label"),a.append(o),t.append(a)}};export{N as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-rich-text-editor-8cd892f2.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-rich-text-editor-8cd892f2.js new file mode 100644 index 0000000..9ca6304 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-rich-text-editor-8cd892f2.js @@ -0,0 +1 @@ +import{s as r,t as o}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-rich-text-editor",displayName:"Rich Text Editor",elements:[{selector:"vaadin-rich-text-editor",displayName:"Editor",properties:[r.backgroundColor,r.borderRadius,r.borderWidth,r.borderColor,r.padding]},{selector:"vaadin-rich-text-editor::part(toolbar)",displayName:"Toolbar",properties:[r.backgroundColor,r.borderRadius,r.borderWidth,r.borderColor,r.padding]},{selector:"vaadin-rich-text-editor::part(toolbar-button)",displayName:"Toolbar Buttons",properties:[{...o.textColor,displayName:"Color"},{...o.textColor,displayName:"Highlight Color",propertyName:"--lumo-primary-color"}]},{selector:"vaadin-rich-text-editor::part(content)",displayName:"Content",properties:[r.backgroundColor,r.borderRadius,r.borderWidth,r.borderColor,r.padding]}]};export{l as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-scroller-35e68818.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-scroller-35e68818.js new file mode 100644 index 0000000..ffa8bbd --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-scroller-35e68818.js @@ -0,0 +1 @@ +import{s as r}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-scroller",displayName:"Scroller",elements:[{selector:"vaadin-scroller",displayName:"Scroller",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius,r.padding]}]};export{d as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-select-df6e9947.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-select-df6e9947.js new file mode 100644 index 0000000..e576e4f --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-select-df6e9947.js @@ -0,0 +1 @@ +import{s as e,f as i,t as a,i as o,b as l,h as s}from"../vaadin-dev-tools.js";import{labelProperties as p,helperTextProperties as d,errorMessageProperties as n}from"./vaadin-text-field-0b3db014.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const f={tagName:"vaadin-select",displayName:"Select",elements:[{selector:"vaadin-select::part(input-field)",displayName:"Field",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,i.height,i.paddingInline]},{selector:"vaadin-select vaadin-select-value-button>vaadin-select-item",displayName:"Field text",properties:[a.textColor,a.fontSize,a.fontWeight]},{selector:"vaadin-select::part(toggle-button)",displayName:"Field toggle button",properties:[o.iconColor,o.iconSize]},{selector:"vaadin-select::part(label)",displayName:"Label",properties:p},{selector:"vaadin-select::part(helper-text)",displayName:"Helper text",properties:d},{selector:"vaadin-select::part(error-message)",displayName:"Error message",properties:n},{selector:"vaadin-select-overlay::part(overlay)",displayName:"Overlay",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-select-overlay vaadin-select-item",displayName:"Overlay items",properties:[a.textColor,a.fontSize,a.fontWeight]},{selector:"vaadin-select-overlay vaadin-select-item::part(checkmark)::before",displayName:"Overlay item checkmark",properties:[o.iconColor,o.iconSize]}],async setupElement(t){t.overlayClass=t.getAttribute("class")},openOverlay:t=>{const r=t.element;l(r,r,r)},hideOverlay:t=>{const r=t.element;r.opened=!1,s(r,r,r)}};export{f as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-side-nav-ba80d91d.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-side-nav-ba80d91d.js new file mode 100644 index 0000000..1b32110 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-side-nav-ba80d91d.js @@ -0,0 +1 @@ +import{s as e,t as i,i as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-side-nav",displayName:"Side Navigation",elements:[{selector:"vaadin-side-nav",displayName:"Root element",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:'vaadin-side-nav > [slot="label"]',displayName:"Label",properties:[i.textColor,i.fontSize,i.fontWeight,i.fontStyle]},{selector:'vaadin-side-nav vaadin-side-nav-item > [slot="prefix"]',displayName:"Nav item icon",properties:[a.iconSize,a.iconColor]},{selector:'vaadin-side-nav vaadin-side-nav-item[active] > [slot="prefix"]',displayName:"Nav item icon (active)",properties:[a.iconSize,a.iconColor]},{selector:"vaadin-side-nav vaadin-side-nav-item::part(item)",displayName:"Nav item",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding,i.textColor,i.fontSize,i.fontWeight,i.fontStyle]},{selector:"vaadin-side-nav vaadin-side-nav-item[active]::part(item)",displayName:"Nav item (active)",properties:[i.textColor,i.fontSize,i.fontWeight,i.fontStyle,e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-side-nav vaadin-side-nav-item::part(toggle-button)::before",displayName:"Expand/collapse icon",properties:[a.iconSize,a.iconColor]},{selector:"vaadin-side-nav vaadin-side-nav-item[active]::part(toggle-button)::before",displayName:"Expand/collapse icon (active)",properties:[a.iconSize,a.iconColor]}]};export{p as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-side-nav-item-34918f92.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-side-nav-item-34918f92.js new file mode 100644 index 0000000..7019263 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-side-nav-item-34918f92.js @@ -0,0 +1,3 @@ +import{i,s as e,t as o}from"../vaadin-dev-tools.js";import{html as t}from"lit";import"construct-style-sheets-polyfill";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-side-nav-item",displayName:"Side Navigation Item",description:t`You are styling selected item only, if you wish to style all items of given SideNav component please + pick vaadin-side-nav instead.`,notAccessibleDescription:t`If you wish to style all items of current SideNav component please pick + vaadin-side-nav instead.`,elements:[{selector:'vaadin-side-nav-item > [slot="prefix"]',displayName:"Nav item icon",properties:[i.iconSize,i.iconColor]},{selector:'vaadin-side-nav-item[active] > [slot="prefix"]',displayName:"Nav item icon (active)",properties:[i.iconSize,i.iconColor]},{selector:"vaadin-side-nav-item::part(item)",displayName:"Nav item",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding,o.textColor,o.fontSize,o.fontWeight,o.fontStyle]},{selector:"vaadin-side-nav-item[active]::part(item)",displayName:"Nav item (active)",properties:[o.textColor,o.fontSize,o.fontWeight,o.fontStyle,e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-side-nav-item::part(toggle-button)::before",displayName:"Expand/collapse icon",properties:[i.iconSize,i.iconColor]},{selector:"vaadin-side-nav-item[active]::part(toggle-button)::before",displayName:"Expand/collapse icon (active)",properties:[i.iconSize,i.iconColor]}]};export{l as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-split-layout-80c92131.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-split-layout-80c92131.js new file mode 100644 index 0000000..7fda6b6 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-split-layout-80c92131.js @@ -0,0 +1 @@ +import{s as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-split-layout",displayName:"Split Layout",elements:[{selector:"vaadin-split-layout",displayName:"Layout",properties:[a.backgroundColor,a.borderColor,a.borderWidth,a.borderRadius]},{selector:"vaadin-split-layout::part(splitter)",displayName:"Splitter bar",properties:[a.backgroundColor]},{selector:"vaadin-split-layout::part(handle)::after",displayName:"Splitter handle",properties:[a.backgroundColor]}]};export{l as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-spreadsheet-59d8c5ef.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-spreadsheet-59d8c5ef.js new file mode 100644 index 0000000..19d3064 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-spreadsheet-59d8c5ef.js @@ -0,0 +1 @@ +import{s as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const s={tagName:"vaadin-spreadsheet",displayName:"Spreadsheet",elements:[{selector:"vaadin-spreadsheet",displayName:"Spreadsheet",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]}]};export{s as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tab-aaf32809.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tab-aaf32809.js new file mode 100644 index 0000000..b8943fc --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tab-aaf32809.js @@ -0,0 +1,2 @@ +import{t as e,s as t}from"../vaadin-dev-tools.js";import{html as a}from"lit";import"construct-style-sheets-polyfill";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const p={tagName:"vaadin-tab",displayName:"Tab",description:a`You are styling selected tab only, if you wish to style all tabs please pick + vaadin-tabs instead.`,notAccessibleDescription:a`If you wish to style all tabs please pick vaadin-tabs instead.`,elements:[{selector:"vaadin-tab",displayName:"Tab item",properties:[e.textColor,e.fontSize,e.fontWeight,t.backgroundColor,t.padding]},{selector:"vaadin-tab[selected]",displayName:"Tab item (selected)",properties:[e.textColor,e.fontSize,e.fontWeight,t.backgroundColor,t.padding]},{selector:"vaadin-tab::before",displayName:"Selection indicator",properties:[t.backgroundColor]}]};export{p as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tabs-d9a5e24e.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tabs-d9a5e24e.js new file mode 100644 index 0000000..7f3a94f --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tabs-d9a5e24e.js @@ -0,0 +1 @@ +import{s as a,t as e,i as t}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-tabs",displayName:"Tabs",elements:[{selector:"vaadin-tabs",displayName:"Tabs",properties:[a.padding]},{selector:"vaadin-tabs vaadin-tab",displayName:"Tab item",properties:[e.textColor,e.fontSize,e.fontWeight,a.backgroundColor,a.padding]},{selector:"vaadin-tabs > vaadin-tab[selected]",displayName:"Tab item (selected)",properties:[e.textColor,e.fontSize,e.fontWeight,a.backgroundColor,a.padding]},{selector:"vaadin-tabs > vaadin-tab::before",displayName:"Selection indicator",properties:[a.backgroundColor]},{selector:"vaadin-tabs::part(back-button)",displayName:"Back button",properties:[t.iconColor,t.iconSize]},{selector:"vaadin-tabs::part(forward-button)",displayName:"Forward button",properties:[t.iconColor,t.iconSize]}]};export{d as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tabsheet-dd99ed9a.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tabsheet-dd99ed9a.js new file mode 100644 index 0000000..93775d6 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-tabsheet-dd99ed9a.js @@ -0,0 +1 @@ +import{s as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-tabsheet",displayName:"Tab Sheet",elements:[{selector:"vaadin-tabsheet",displayName:"TabSheet",properties:[e.padding,e.backgroundColor,e.borderWidth,e.borderColor,e.borderRadius]}]};export{d as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-text-area-83627ebc.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-text-area-83627ebc.js new file mode 100644 index 0000000..0910f71 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-text-area-83627ebc.js @@ -0,0 +1 @@ +import{inputFieldProperties as e,labelProperties as r,helperTextProperties as t,errorMessageProperties as a}from"./vaadin-text-field-0b3db014.js";import{standardButtonProperties as p}from"./vaadin-button-2511ad84.js";import"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const c={tagName:"vaadin-text-area",displayName:"Text Area",elements:[{selector:"vaadin-text-area::part(input-field)",displayName:"Input field",properties:e},{selector:"vaadin-text-area::part(label)",displayName:"Label",properties:r},{selector:"vaadin-text-area::part(helper-text)",displayName:"Helper text",properties:t},{selector:"vaadin-text-area::part(error-message)",displayName:"Error message",properties:a},{selector:"vaadin-text-area::part(clear-button)",displayName:"Clear button",properties:p}]};export{c as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-text-field-0b3db014.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-text-field-0b3db014.js new file mode 100644 index 0000000..a1e29f0 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-text-field-0b3db014.js @@ -0,0 +1 @@ +import{d as o,s as t,f as r,t as e}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const i=[t.backgroundColor,t.borderColor,t.borderWidth,t.borderRadius,r.height,r.paddingInline,e.textColor,e.fontSize,e.fontWeight],a=[e.textColor,e.fontSize,e.fontWeight],s=[e.textColor,e.fontSize,e.fontWeight],p=[e.textColor,e.fontSize,e.fontWeight],c={tagName:"vaadin-text-field",displayName:"Text Field",elements:[{selector:"vaadin-text-field::part(input-field)",displayName:"Input field",properties:i},{selector:"vaadin-text-field::part(label)",displayName:"Label",properties:a},{selector:"vaadin-text-field::part(helper-text)",displayName:"Helper text",properties:s},{selector:"vaadin-text-field::part(error-message)",displayName:"Error message",properties:p},{selector:"vaadin-text-field::part(clear-button)",displayName:"Clear button",properties:o}]};export{c as default,p as errorMessageProperties,s as helperTextProperties,i as inputFieldProperties,a as labelProperties}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-time-picker-715ec415.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-time-picker-715ec415.js new file mode 100644 index 0000000..aba8582 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-time-picker-715ec415.js @@ -0,0 +1 @@ +import{inputFieldProperties as o,labelProperties as p,helperTextProperties as s,errorMessageProperties as l}from"./vaadin-text-field-0b3db014.js";import{i as r,s as e,t as a,g as m,j as d}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const b={tagName:"vaadin-time-picker",displayName:"Time Picker",elements:[{selector:"vaadin-time-picker::part(input-field)",displayName:"Input field",properties:o},{selector:"vaadin-time-picker::part(toggle-button)",displayName:"Toggle button",properties:[r.iconColor,r.iconSize]},{selector:"vaadin-time-picker::part(label)",displayName:"Label",properties:p},{selector:"vaadin-time-picker::part(helper-text)",displayName:"Helper text",properties:s},{selector:"vaadin-time-picker::part(error-message)",displayName:"Error message",properties:l},{selector:"vaadin-time-picker-overlay::part(overlay)",displayName:"Overlay",properties:[e.backgroundColor,e.borderColor,e.borderWidth,e.borderRadius,e.padding]},{selector:"vaadin-time-picker-overlay vaadin-time-picker-item",displayName:"Overlay items",properties:[a.textColor,a.fontSize,a.fontWeight]},{selector:"vaadin-time-picker-overlay vaadin-time-picker-item::part(checkmark)::before",displayName:"Overlay item checkmark",properties:[r.iconColor,r.iconSize]}],async setupElement(i){i.overlayClass=i.getAttribute("class"),i.value="00:00",await new Promise(t=>setTimeout(t,10))},openOverlay:m,hideOverlay:d};export{b as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-upload-d3c162ed.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-upload-d3c162ed.js new file mode 100644 index 0000000..c9e0ee0 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-upload-d3c162ed.js @@ -0,0 +1 @@ +import{standardButtonProperties as e}from"./vaadin-button-2511ad84.js";import{t as o,s as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const n={tagName:"vaadin-upload",displayName:"Upload",elements:[{selector:"vaadin-upload > vaadin-button",displayName:"Upload button",properties:e},{selector:"vaadin-upload > vaadin-button::part(label)",displayName:"Upload button text",properties:[o.textColor,o.fontSize,o.fontWeight]},{selector:"vaadin-upload::part(drop-label)",displayName:"Drop label",properties:[o.textColor,o.fontSize,o.fontWeight]},{selector:"vaadin-upload vaadin-upload-file-list::part(list)",displayName:"File list",properties:[a.backgroundColor,a.borderColor,a.borderWidth,a.borderRadius,a.padding]},{selector:"vaadin-upload vaadin-upload-file",displayName:"File element",properties:[o.textColor,o.fontSize,o.fontWeight,a.backgroundColor,a.borderColor,a.borderWidth,a.borderRadius,a.padding]},{selector:"vaadin-upload vaadin-upload-file > vaadin-progress-bar::part(value)",displayName:"Progress bar",properties:[a.backgroundColor]}]};export{n as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-vertical-layout-ad4174c4.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-vertical-layout-ad4174c4.js new file mode 100644 index 0000000..50779ac --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-vertical-layout-ad4174c4.js @@ -0,0 +1 @@ +import{s as a}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const d={tagName:"vaadin-vertical-layout",displayName:"Vertical Layout",elements:[{selector:"vaadin-vertical-layout",displayName:"Layout",properties:[a.backgroundColor,a.borderColor,a.borderWidth,a.borderRadius,a.padding,a.gap]}]};export{d as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-virtual-list-96896203.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-virtual-list-96896203.js new file mode 100644 index 0000000..62b33c9 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/assets/vaadin-virtual-list-96896203.js @@ -0,0 +1 @@ +import{s as r}from"../vaadin-dev-tools.js";import"construct-style-sheets-polyfill";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"lit/static-html.js";const l={tagName:"vaadin-virtual-list",displayName:"Virtual List",elements:[{selector:"vaadin-virtual-list",displayName:"List",properties:[r.backgroundColor,r.borderColor,r.borderWidth,r.borderRadius]}]};export{l as default}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/component-picker.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/component-picker.d.ts new file mode 100644 index 0000000..878e192 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/component-picker.d.ts @@ -0,0 +1,35 @@ +import { LitElement, PropertyValues, TemplateResult } from 'lit'; +import { ComponentReference } from './component-util.js'; +import './shim.js'; +import { Shim } from './shim.js'; +export interface PickerOptions { + infoTemplate: TemplateResult; + pickCallback: (component: ComponentReference) => void; +} +export type PickerProvider = () => ComponentPicker; +/** + * When active, shows a component picker that allows the user to select an element with a server side counterpart. + */ +export declare class ComponentPicker extends LitElement { + active: boolean; + options?: PickerOptions; + components: ComponentReference[]; + selected: number; + highlighted?: HTMLElement; + overlayElement: HTMLElement; + shim: Shim; + static styles: import("lit").CSSResult[]; + constructor(); + connectedCallback(): void; + disconnectedCallback(): void; + render(): TemplateResult<1> | null; + open(options: PickerOptions): void; + close(): void; + update(changedProperties: PropertyValues): void; + mouseMoveEvent(e: MouseEvent): void; + shimKeydown(e: CustomEvent): void; + shimMove(e: CustomEvent): void; + shimClick(_e: CustomEvent): void; + pickSelectedComponent(): void; + highlight(componentRef: ComponentReference | undefined): void; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/component-util.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/component-util.d.ts new file mode 100644 index 0000000..6320a6e --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/component-util.d.ts @@ -0,0 +1,9 @@ +export type ComponentReference = { + nodeId: number; + uiId: number; + element?: HTMLElement; + highlightElement?: HTMLElement; +}; +export declare function getComponents(element: HTMLElement): ComponentReference[]; +export declare function getComponent(element: HTMLElement): ComponentReference; +export declare function deepContains(container: HTMLElement, node: Node): boolean; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/connection.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/connection.d.ts new file mode 100644 index 0000000..e27ef9e --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/connection.d.ts @@ -0,0 +1,30 @@ +import { Product } from './License'; +import { ComponentReference } from './component-util'; +export declare enum ConnectionStatus { + ACTIVE = "active", + INACTIVE = "inactive", + UNAVAILABLE = "unavailable", + ERROR = "error" +} +export declare class Connection extends Object { + static HEARTBEAT_INTERVAL: number; + status: ConnectionStatus; + webSocket?: WebSocket; + constructor(url?: string); + onHandshake(): void; + onReload(): void; + onUpdate(_path: string, _content: string): void; + onConnectionError(_: string): void; + onStatusChange(_: ConnectionStatus): void; + onMessage(message: any): void; + handleMessage(msg: any): void; + handleError(msg: any): void; + setActive(yes: boolean): void; + setStatus(status: ConnectionStatus): void; + send(command: string, data: any): void; + setFeature(featureId: string, enabled: boolean): void; + sendTelemetry(browserData: any): void; + sendLicenseCheck(product: Product): void; + sendShowComponentCreateLocation(component: ComponentReference): void; + sendShowComponentAttachLocation(component: ComponentReference): void; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/shim.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/shim.d.ts new file mode 100644 index 0000000..f823742 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/shim.d.ts @@ -0,0 +1,20 @@ +import { LitElement } from 'lit'; +/** + * Blocks interaction with all elements on the page. Forwards mouse and key events as custom shim-* events. + */ +export declare class Shim extends LitElement { + highlighted?: HTMLElement; + static shadowRootOptions: { + delegatesFocus: boolean; + mode: ShadowRootMode; + slotAssignment?: SlotAssignmentMode | undefined; + customElements?: CustomElementRegistry | undefined; + registry?: CustomElementRegistry | undefined; + }; + static styles: import("lit").CSSResult[]; + render(): import("lit").TemplateResult<1>; + onClick(e: MouseEvent): void; + onMouseMove(e: MouseEvent): void; + onKeyDown(e: KeyboardEvent): void; + getTargetElement(e: MouseEvent): HTMLElement; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/styles.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/styles.d.ts new file mode 100644 index 0000000..b7a2e03 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/styles.d.ts @@ -0,0 +1 @@ +export declare const popupStyles: import("lit").CSSResult; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/api.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/api.d.ts new file mode 100644 index 0000000..7656e21 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/api.d.ts @@ -0,0 +1,55 @@ +import { Connection } from '../connection'; +import { ComponentReference } from '../component-util'; +export declare enum Commands { + response = "themeEditorResponse", + loadComponentMetadata = "themeEditorComponentMetadata", + setLocalClassName = "themeEditorLocalClassName", + setCssRules = "themeEditorRules", + loadRules = "themeEditorLoadRules", + history = "themeEditorHistory", + openCss = "themeEditorOpenCss", + markAsUsed = "themeEditorMarkAsUsed" +} +export declare enum ResponseCode { + ok = "ok", + error = "error" +} +export interface BaseResponse { + requestId: string; + code: ResponseCode; +} +export interface LoadComponentMetadataResponse extends BaseResponse { + accessible?: boolean; + className?: string; + suggestedClassName?: string; +} +export interface LoadPreviewResponse extends BaseResponse { + css: string; +} +export interface ServerCssRule { + selector: string; + properties: { + [key: string]: string; + }; +} +export interface LoadRulesResponse extends BaseResponse { + rules: ServerCssRule[]; +} +export declare class ThemeEditorApi { + private wrappedConnection; + private pendingRequests; + private requestCounter; + private globalUiId; + constructor(wrappedConnection: Connection); + private sendRequest; + private handleResponse; + loadComponentMetadata(componentRef: ComponentReference): Promise; + setLocalClassName(componentRef: ComponentReference, className: string): Promise; + setCssRules(rules: ServerCssRule[]): Promise; + loadRules(selectors: string[]): Promise; + markAsUsed(): Promise; + undo(requestId: string): Promise; + redo(requestId: string): Promise; + openCss(selector: string): Promise; + private getGlobalUiId; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/class-name-editor.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/class-name-editor.d.ts new file mode 100644 index 0000000..786f004 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/class-name-editor.d.ts @@ -0,0 +1,16 @@ +import { LitElement, PropertyValues } from 'lit'; +import './editors/base-property-editor'; +export declare class ClassNameChangeEvent extends CustomEvent<{ + value: string; +}> { + constructor(value: string); +} +export declare class ClassNameEditor extends LitElement { + static get styles(): import("lit").CSSResult[]; + className: string; + private editedClassName; + private invalid; + protected update(changedProperties: PropertyValues): void; + render(): import("lit").TemplateResult<1>; + private handleInputChange; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/component-overlay-manager.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/component-overlay-manager.d.ts new file mode 100644 index 0000000..5e8bb75 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/component-overlay-manager.d.ts @@ -0,0 +1,27 @@ +import { ComponentReference } from '../../component-util'; +import { ComponentMetadata } from '../metadata/model'; +export declare class ComponentOverlayManager { + currentActiveComponent: ComponentReference | null; + currentActiveComponentMetaData: ComponentMetadata | null; + componentPicked: (component: ComponentReference, metaData: ComponentMetadata) => Promise; + showOverlay: () => void; + hideOverlay: () => void; + reset: () => void; +} +export declare const componentOverlayManager: ComponentOverlayManager; +export declare const defaultShowOverlay: (component: ComponentReference) => void; +export declare const defaultHideOverlay: (component: ComponentReference) => void; +export declare const showOverlayMixin: (element: any, overlayMixinElement: any, overlay: any) => void; +/** + * Hide overlay of given element + * @param element + * @param overlayMixinElement + * @param overlay + */ +export declare const hideOverlayMixin: (element: any, overlayMixinElement: any, overlay: any) => void; +/** + * Creates a click event that checks the clicked target. If clicked target is dev-tools or the element itself overlay becomes visible otherwise becomes hidden. + * @param element + * @param overlayMixinElement + */ +export declare const createDocumentClickEvent: (element: HTMLElement, overlayMixinElement: any) => (e: MouseEvent) => void; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/component-resolver.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/component-resolver.d.ts new file mode 100644 index 0000000..225e45f --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/component-resolver.d.ts @@ -0,0 +1,20 @@ +/** + * Resolves HTMLElement that should be considered instead of directly picked element. + * + * Used with overlays that have different HTMLElements visible than present in node tree. + * + * Resolvers cannot be added to component metadata as component metadata is dynamically imported after being picked. + * + * Using Polymer __dataHost property to get base Vaadin component. + * + * TODO: Refactor required after moving to Lit components + */ +declare class ComponentResolver { + resolveElement(element: HTMLElement): HTMLElement; +} +declare class ComponentHighlightResolver { + resolveElement(element: HTMLElement): HTMLElement; +} +export declare const componentResolver: ComponentResolver; +export declare const componentHighlightResolver: ComponentHighlightResolver; +export {}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/base-property-editor.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/base-property-editor.d.ts new file mode 100644 index 0000000..0946c9f --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/base-property-editor.d.ts @@ -0,0 +1,49 @@ +import { CSSResultGroup, LitElement, PropertyValues, TemplateResult } from 'lit'; +import { ComponentElementMetadata, CssPropertyMetadata } from '../../metadata/model'; +import { ComponentTheme, ThemePropertyValue } from '../../model'; +export declare class ThemePropertyValueChangeEvent extends CustomEvent<{ + element: ComponentElementMetadata; + property: CssPropertyMetadata; + value: string; +}> { + constructor(element: ComponentElementMetadata, property: CssPropertyMetadata, value: string); +} +export declare abstract class BasePropertyEditor extends LitElement { + static get styles(): CSSResultGroup; + elementMetadata: ComponentElementMetadata; + propertyMetadata: CssPropertyMetadata; + theme: ComponentTheme; + protected propertyValue?: ThemePropertyValue; + protected value: string; + protected update(changedProperties: PropertyValues): void; + render(): TemplateResult<1>; + protected abstract renderEditor(): TemplateResult; + protected updateValueFromTheme(): void; + protected dispatchChange(value: string): void; +} +export declare class PropertyPresets { + private _values; + private _rawValues; + get values(): string[]; + get rawValues(): { + [key: string]: string; + }; + constructor(propertyMetadata?: CssPropertyMetadata); + tryMapToRawValue(presetOrValue: string): string; + tryMapToPreset(value: string): string; + findPreset(rawValue: string): string | undefined; +} +export declare class TextInputChangeEvent extends CustomEvent<{ + value: string; +}> { + constructor(value: string); +} +export declare class TextInput extends LitElement { + static get styles(): import("lit").CSSResult; + value: string; + showClearButton: boolean; + protected update(changedProperties: PropertyValues): void; + render(): TemplateResult<1>; + private handleInputChange; + private handleClearClick; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/checkbox-property-editor.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/checkbox-property-editor.d.ts new file mode 100644 index 0000000..0319234 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/checkbox-property-editor.d.ts @@ -0,0 +1,7 @@ +import { TemplateResult } from 'lit'; +import { BasePropertyEditor } from './base-property-editor'; +export declare class CheckboxPropertyEditor extends BasePropertyEditor { + static get styles(): import("lit").CSSResultGroup[]; + handleInputChange(e: Event): void; + protected renderEditor(): TemplateResult; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/color-picker.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/color-picker.d.ts new file mode 100644 index 0000000..b820f69 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/color-picker.d.ts @@ -0,0 +1,31 @@ +import { LitElement, PropertyValues } from 'lit'; +export declare class ColorPickerChangeEvent extends CustomEvent<{ + value: string; +}> { + constructor(value: string); +} +export declare class ColorPicker extends LitElement { + static get styles(): import("lit").CSSResult[]; + value: string; + presets?: string[]; + private toggle; + private overlay; + private commitValue; + protected update(changedProperties: PropertyValues): void; + protected firstUpdated(): void; + render(): import("lit").TemplateResult<1>; + private open; + private renderOverlayContent; + private handleColorChange; + private handleOverlayEscape; + private handleOverlayClose; +} +export declare class ColorPickerOverlayContent extends LitElement { + value: string; + presets?: string[]; + static get styles(): import("lit").CSSResult[]; + render(): import("lit").TemplateResult<1>; + renderSwatches(): import("lit").TemplateResult<1> | undefined; + private handlePickerChange; + private selectPreset; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/color-property-editor.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/color-property-editor.d.ts new file mode 100644 index 0000000..e0f2510 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/color-property-editor.d.ts @@ -0,0 +1,15 @@ +import { PropertyValues, TemplateResult } from 'lit'; +import './color-picker'; +import { BasePropertyEditor } from './base-property-editor'; +export declare class ColorPropertyEditor extends BasePropertyEditor { + static get styles(): import("lit").CSSResultGroup[]; + private presets; + protected update(changedProperties: PropertyValues): void; + protected renderEditor(): TemplateResult; + private handleInputChange; + private handleColorPickerChange; + private handleColorPickerCommit; + private handleColorPickerCancel; + protected dispatchChange(value: string): void; + protected updateValueFromTheme(): void; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/range-property-editor.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/range-property-editor.d.ts new file mode 100644 index 0000000..84d1ca1 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/range-property-editor.d.ts @@ -0,0 +1,15 @@ +import { PropertyValues, TemplateResult } from 'lit'; +import { BasePropertyEditor } from './base-property-editor'; +export declare class RangePropertyEditor extends BasePropertyEditor { + static get styles(): import("lit").CSSResultGroup[]; + private selectedPresetIndex; + private presets; + protected update(changedProperties: PropertyValues): void; + protected renderEditor(): TemplateResult; + private handleSliderInput; + private handleSliderChange; + private handleValueChange; + protected dispatchChange(value: string): void; + protected updateValueFromTheme(): void; + private updateSliderValue; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/text-property-editor.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/text-property-editor.d.ts new file mode 100644 index 0000000..261ae80 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/editors/text-property-editor.d.ts @@ -0,0 +1,6 @@ +import { TemplateResult } from 'lit'; +import { BasePropertyEditor, TextInputChangeEvent } from './base-property-editor'; +export declare class TextPropertyEditor extends BasePropertyEditor { + handleInputChange(e: TextInputChangeEvent): void; + protected renderEditor(): TemplateResult; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/property-list.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/property-list.d.ts new file mode 100644 index 0000000..12e4616 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/property-list.d.ts @@ -0,0 +1,21 @@ +import { LitElement } from 'lit'; +import { ComponentElementMetadata, ComponentMetadata } from '../metadata/model'; +import { ComponentTheme } from '../model'; +import './editors/checkbox-property-editor'; +import './editors/text-property-editor'; +import './editors/range-property-editor'; +import './editors/color-property-editor'; +export declare class OpenCssEvent extends CustomEvent<{ + element: ComponentElementMetadata; +}> { + constructor(element: ComponentElementMetadata); +} +export declare class PropertyList extends LitElement { + static get styles(): import("lit").CSSResult; + metadata: ComponentMetadata; + theme: ComponentTheme; + render(): import("lit").TemplateResult<1>; + private renderSection; + private handleOpenCss; + private renderPropertyEditor; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/scope-selector.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/scope-selector.d.ts new file mode 100644 index 0000000..75deb5f --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/components/scope-selector.d.ts @@ -0,0 +1,18 @@ +import { LitElement, PropertyValues } from 'lit'; +import { ComponentMetadata } from '../metadata/model'; +import { ThemeScope } from '../model'; +export declare class ScopeChangeEvent extends CustomEvent<{ + value: ThemeScope; +}> { + constructor(value: ThemeScope); +} +export declare class ScopeSelector extends LitElement { + static get styles(): import("lit").CSSResult; + value: ThemeScope; + metadata?: ComponentMetadata; + private select?; + protected update(changedProperties: PropertyValues): void; + render(): import("lit").TemplateResult<1>; + private selectRenderer; + private handleValueChange; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/detector.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/detector.d.ts new file mode 100644 index 0000000..10cf349 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/detector.d.ts @@ -0,0 +1,5 @@ +import { ComponentTheme } from './model'; +import { ComponentMetadata } from './metadata/model'; +import { ComponentReference } from '../component-util'; +export declare function detectTheme(metadata: ComponentMetadata): Promise; +export declare function detectElementDisplayName(component: ComponentReference): string | null; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/editor.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/editor.d.ts new file mode 100644 index 0000000..5bc416a --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/editor.d.ts @@ -0,0 +1,57 @@ +import { LitElement, PropertyValues, TemplateResult } from 'lit'; +import { PickerProvider } from '../component-picker'; +import { ThemeEditorState } from './model'; +import { Connection } from '../connection'; +import './components/class-name-editor'; +import './components/scope-selector'; +import './components/property-list'; +import '../component-picker.js'; +import { OpenCssEvent } from './components/property-list'; +export declare class ThemeEditor extends LitElement { + expanded: boolean; + themeEditorState: ThemeEditorState; + pickerProvider: PickerProvider; + connection: Connection; + private api; + private history; + private historyActions?; + private context; + /** + * Base theme detected from existing CSS files for the selected component + */ + private baseTheme; + /** + * Currently edited theme modifications for the selected component since the + * last reload + */ + private editedTheme; + /** + * The effective theme for the selected component, including base theme and + * previously saved modifications + */ + private effectiveTheme; + private markedAsUsed; + private undoRedoListener; + static get styles(): import("lit").CSSResult; + protected firstUpdated(): void; + protected update(changedProperties: PropertyValues): void; + disconnectedCallback(): void; + render(): TemplateResult<1>; + renderMissingThemeNotice(): TemplateResult<1>; + renderPropertyList(): TemplateResult<1> | null; + handleShowComponent(): void; + handleOpenCss(event: OpenCssEvent): Promise; + renderPicker(): TemplateResult<1>; + renderLocalClassNameEditor(): TemplateResult<1> | null; + private handleClassNameChange; + private pickComponent; + private handleScopeChange; + private handlePropertyChange; + private handleUndo; + private handleRedo; + private ensureLocalClassName; + private refreshComponentAndTheme; + private refreshTheme; + private highlightElement; + private removeElementHighlight; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/history.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/history.d.ts new file mode 100644 index 0000000..f4fa92a --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/history.d.ts @@ -0,0 +1,23 @@ +import { ThemeEditorApi } from './api'; +type HistoryCustomizerFn = () => void; +export interface HistoryEntry { + requestId: string; + execute?: HistoryCustomizerFn; + rollback?: HistoryCustomizerFn; +} +export interface ThemeEditorHistoryActions { + allowUndo: boolean; + allowRedo: boolean; +} +export declare class ThemeEditorHistory { + private api; + constructor(api: ThemeEditorApi); + get allowUndo(): boolean; + get allowRedo(): boolean; + get allowedActions(): ThemeEditorHistoryActions; + push(requestId: string, execute?: HistoryCustomizerFn, rollback?: HistoryCustomizerFn): ThemeEditorHistoryActions; + undo(): Promise; + redo(): Promise; + static clear(): void; +} +export {}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/icons.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/icons.d.ts new file mode 100644 index 0000000..c96fdca --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/icons.d.ts @@ -0,0 +1,8 @@ +export declare const icons: { + crosshair: import("lit").TemplateResult<2>; + square: import("lit").TemplateResult<2>; + font: import("lit").TemplateResult<2>; + undo: import("lit").TemplateResult<2>; + redo: import("lit").TemplateResult<2>; + cross: import("lit").TemplateResult<2>; +}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/defaults.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/defaults.d.ts new file mode 100644 index 0000000..15334ab --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/defaults.d.ts @@ -0,0 +1,102 @@ +import { CssPropertyMetadata, EditorType } from '../model'; +export declare const textProperties: { + textColor: { + propertyName: string; + displayName: string; + editorType: EditorType; + presets: string[]; + }; + fontSize: { + propertyName: string; + displayName: string; + editorType: EditorType; + presets: string[]; + icon: string; + }; + fontWeight: { + propertyName: string; + displayName: string; + editorType: EditorType; + checkedValue: string; + }; + fontStyle: { + propertyName: string; + displayName: string; + editorType: EditorType; + checkedValue: string; + }; +}; +export declare const shapeProperties: { + backgroundColor: { + propertyName: string; + displayName: string; + editorType: EditorType; + }; + borderColor: { + propertyName: string; + displayName: string; + editorType: EditorType; + }; + borderWidth: { + propertyName: string; + displayName: string; + editorType: EditorType; + presets: string[]; + icon: string; + }; + borderRadius: { + propertyName: string; + displayName: string; + editorType: EditorType; + presets: string[]; + icon: string; + }; + padding: { + propertyName: string; + displayName: string; + editorType: EditorType; + presets: string[]; + icon: string; + }; + gap: { + propertyName: string; + displayName: string; + editorType: EditorType; + presets: string[]; + icon: string; + }; +}; +export declare const fieldProperties: { + height: { + propertyName: string; + displayName: string; + editorType: EditorType; + presets: string[]; + icon: string; + }; + paddingInline: { + propertyName: string; + displayName: string; + editorType: EditorType; + presets: string[]; + icon: string; + }; +}; +export declare const iconProperties: { + iconColor: { + propertyName: string; + displayName: string; + editorType: EditorType; + presets: string[]; + }; + iconSize: { + propertyName: string; + displayName: string; + editorType: EditorType; + presets: string[]; + icon: string; + }; +}; +export declare const standardShapeProperties: CssPropertyMetadata[]; +export declare const standardTextProperties: CssPropertyMetadata[]; +export declare const standardIconProperties: CssPropertyMetadata[]; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/generic.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/generic.d.ts new file mode 100644 index 0000000..9a1515e --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/generic.d.ts @@ -0,0 +1,2 @@ +import { ComponentMetadata } from '../model'; +export declare function createGenericMetadata(tagName: string): ComponentMetadata; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/presets.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/presets.d.ts new file mode 100644 index 0000000..a220131 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/components/presets.d.ts @@ -0,0 +1,8 @@ +export declare const presets: { + lumoSize: string[]; + lumoSpace: string[]; + lumoBorderRadius: string[]; + lumoFontSize: string[]; + lumoTextColor: string[]; + basicBorderSize: string[]; +}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/model.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/model.d.ts new file mode 100644 index 0000000..366d066 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/model.d.ts @@ -0,0 +1,37 @@ +import { TemplateResult } from 'lit'; +import { ComponentReference } from '../../component-util'; +export declare enum EditorType { + text = "text", + checkbox = "checkbox", + range = "range", + color = "color" +} +export interface CssPropertyMetadata { + propertyName: string; + displayName: string; + defaultValue?: string; + description?: string; + editorType?: EditorType; + presets?: string[]; + icon?: string; + checkedValue?: string; +} +export interface ComponentElementMetadata { + selector: string; + stateAttribute?: string; + stateElementSelector?: string; + displayName: string; + description?: string; + properties: CssPropertyMetadata[]; +} +export interface ComponentMetadata { + tagName: string; + displayName: string; + description?: TemplateResult; + notAccessibleDescription?: TemplateResult; + elements: ComponentElementMetadata[]; + setupElement?: (element: any) => Promise; + cleanupElement?: (element: any) => Promise; + openOverlay?: (component: ComponentReference) => void; + hideOverlay?: (component: ComponentReference) => void; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/registry.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/registry.d.ts new file mode 100644 index 0000000..21b0bac --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/registry.d.ts @@ -0,0 +1,11 @@ +import { ComponentReference } from '../../component-util'; +import { ComponentMetadata } from './model'; +type ModuleLoader = (modulePath: string) => Promise; +export declare class MetadataRegistry { + private loader; + private metadata; + constructor(loader?: ModuleLoader); + getMetadata(component: ComponentReference): Promise; +} +export declare const metadataRegistry: MetadataRegistry; +export {}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/model.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/model.d.ts new file mode 100644 index 0000000..8f16962 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/model.d.ts @@ -0,0 +1,46 @@ +import { ComponentElementMetadata, ComponentMetadata } from './metadata/model'; +import { ServerCssRule } from './api'; +import { ComponentReference } from '../component-util'; +export declare enum ThemeEditorState { + disabled = "disabled", + enabled = "enabled", + missing_theme = "missing_theme" +} +export declare enum ThemeScope { + local = "local", + global = "global" +} +export interface SelectorScope { + themeScope: ThemeScope; + localClassName?: string; +} +export interface ThemeContext { + scope: ThemeScope; + metadata?: ComponentMetadata; + component: ComponentReference; + accessible?: boolean; + localClassName?: string; + suggestedClassName?: string; +} +export interface ThemePropertyValue { + elementSelector: string; + propertyName: string; + value: string; + modified: boolean; +} +export declare class ComponentTheme { + private _metadata; + private _properties; + constructor(metadata: ComponentMetadata); + get metadata(): ComponentMetadata; + get properties(): ThemePropertyValue[]; + getPropertyValue(elementSelector: string, propertyName: string): ThemePropertyValue; + updatePropertyValue(elementSelector: string, propertyName: string, value: string, modified?: boolean): void; + addPropertyValues(values: ThemePropertyValue[]): void; + getPropertyValuesForElement(elementSelector: string): ThemePropertyValue[]; + static combine(...themes: ComponentTheme[]): ComponentTheme; + static fromServerRules(metadata: ComponentMetadata, scope: SelectorScope, rules: ServerCssRule[]): ComponentTheme; +} +export declare function createScopedSelector(element: ComponentElementMetadata, scope: SelectorScope): string; +export declare function generateThemeRule(element: ComponentElementMetadata, scope: SelectorScope, propertyName: string, value: string): ServerCssRule; +export declare function generateThemeRuleCss(rule: ServerCssRule): string; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/preview.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/preview.d.ts new file mode 100644 index 0000000..4dd99c0 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/preview.d.ts @@ -0,0 +1,11 @@ +declare class ThemePreview { + private _stylesheet?; + private _localClassNameMap; + get stylesheet(): CSSStyleSheet; + add(css: string): void; + clear(): void; + previewLocalClassName(element?: HTMLElement, className?: string): void; + private ensureStylesheet; +} +export declare const themePreview: ThemePreview; +export {}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/styles.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/styles.d.ts new file mode 100644 index 0000000..8a8ce9b --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/styles.d.ts @@ -0,0 +1,3 @@ +import { CSSResult } from 'lit'; +export declare function injectGlobalCss(css: CSSResult): void; +export declare const editorRowStyles: CSSResult; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools-info.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools-info.d.ts new file mode 100644 index 0000000..34615f8 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools-info.d.ts @@ -0,0 +1,9 @@ +import { LitElement } from 'lit'; +export declare class InfoTab extends LitElement { + private _devTools; + private serverInfo; + protected createRenderRoot(): Element | ShadowRoot; + render(): import("lit").TemplateResult<1>; + handleMessage(message: any): boolean; + copyInfoToClipboard(): void; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools-log.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools-log.d.ts new file mode 100644 index 0000000..4359929 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools-log.d.ts @@ -0,0 +1,8 @@ +import { LitElement } from 'lit'; +import { VaadinDevTools } from './vaadin-dev-tools.js'; +export declare class VaadinDevToolsLog extends LitElement { + _devTools: VaadinDevTools; + protected createRenderRoot(): Element | ShadowRoot; + activate(): void; + render(): import("lit").TemplateResult<1>; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.d.ts new file mode 100644 index 0000000..00e9a39 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.d.ts @@ -0,0 +1,149 @@ +import 'construct-style-sheets-polyfill'; +import { LitElement, PropertyValueMap, TemplateResult } from 'lit'; +import './theme-editor/editor'; +import { ThemeEditorState } from './theme-editor/model'; +import { Product } from './License'; +import { ConnectionStatus } from './connection'; +import './vaadin-dev-tools-log'; +import './vaadin-dev-tools-info'; +/** + * Plugin API for the dev tools window. + */ +export interface DevToolsInterface { + send(command: string, data: any): void; + addTab(id: string, tag: string): void; +} +export interface MessageHandler { + handleMessage(message: ServerMessage): boolean; +} +export interface ServerMessage { + /** + * The command + */ + command: string; + /** + * the data for the command + */ + data: any; +} +/** + * To create and register a plugin, use e.g. + * @example + * export class MyTab extends LitElement implements MessageHandler { + * render() { + * return html`
Here I am
`; + * } + * } + * customElements.define('my-tab', MyTab); + * + * const plugin: DevToolsPlugin = { + * init: function (devToolsInterface: DevToolsInterface): void { + * devToolsInterface.addTab('Tab title', 'my-tab') + * } + * }; + * + * (window as any).Vaadin.devToolsPlugins.push(plugin); + */ +export interface DevToolsPlugin { + /** + * Called once to initialize the plugin. + * + * @param devToolsInterface provides methods to interact with the dev tools + */ + init(devToolsInterface: DevToolsInterface): void; +} +interface Feature { + id: string; + title: string; + moreInfoLink: string; + requiresServerRestart: boolean; + enabled: boolean; +} +export declare enum MessageType { + LOG = "log", + INFORMATION = "information", + WARNING = "warning", + ERROR = "error" +} +interface Message { + id: number; + type: MessageType; + message: string; + details?: string; + link?: string; + persistentId?: string; + dontShowAgain: boolean; + deleted: boolean; +} +export declare class VaadinDevTools extends LitElement { + static MAX_LOG_ROWS: number; + unhandledMessages: ServerMessage[]; + static get styles(): import("lit").CSSResult[]; + static DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE: string; + static ACTIVE_KEY_IN_SESSION_STORAGE: string; + static TRIGGERED_KEY_IN_SESSION_STORAGE: string; + static TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE: string; + static AUTO_DEMOTE_NOTIFICATION_DELAY: number; + static HOTSWAP_AGENT: string; + static JREBEL: string; + static SPRING_BOOT_DEVTOOLS: string; + static BACKEND_DISPLAY_NAME: Record; + static get isActive(): boolean; + static notificationDismissed(persistentId: string): boolean; + url?: string; + liveReloadDisabled?: boolean; + backend?: string; + springBootLiveReloadPort?: number; + expanded: boolean; + messages: Message[]; + splashMessage?: string; + notifications: Message[]; + frontendStatus: ConnectionStatus; + javaStatus: ConnectionStatus; + private tabs; + private activeTab; + private features; + unreadErrors: boolean; + private root; + private componentPicker; + componentPickActive: boolean; + themeEditorState: ThemeEditorState; + private javaConnection?; + private frontendConnection?; + private nextMessageId; + private disableEventListener?; + private transitionDuration; + elementTelemetry(): void; + openWebSocketConnection(): void; + tabHandleMessage(tabElement: HTMLElement, message: ServerMessage): boolean; + handleFrontendMessage(message: ServerMessage): void; + getDedicatedWebSocketUrl(): string | undefined; + getSpringBootWebSocketUrl(location: any): string; + constructor(); + connectedCallback(): void; + initPlugin(plugin: DevToolsPlugin): Promise; + format(o: any): string; + catchErrors(): void; + disconnectedCallback(): void; + toggleExpanded(): void; + showSplashMessage(msg: string | undefined): void; + demoteSplashMessage(): void; + checkLicense(productInfo: Product): void; + log(type: MessageType, message: string, details?: string, link?: string): void; + showNotification(type: MessageType, message: string, details?: string, link?: string, persistentId?: string): void; + dismissNotification(id: number): void; + findNotificationIndex(id: number): number; + toggleDontShowAgain(id: number): void; + setActive(yes: boolean): void; + getStatusColor(status: ConnectionStatus | undefined): "none" | "var(--dev-tools-green-color)" | "var(--dev-tools-grey-color)" | "var(--dev-tools-yellow-hsl)" | "var(--dev-tools-red-color)"; + renderMessage(messageObject: Message): TemplateResult<1>; + render(): TemplateResult<1>; + protected updated(_changedProperties: PropertyValueMap | Map): void; + renderCode(): TemplateResult<1>; + private renderFeatures; + disableJavaLiveReload(): void; + enableJavaLiveReload(): void; + renderThemeEditor(): TemplateResult<1>; + toggleFeatureFlag(e: Event, feature: Feature): void; +} +export {}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js new file mode 100644 index 0000000..27f8ce4 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js @@ -0,0 +1,1676 @@ +import"construct-style-sheets-polyfill";import{svg as B,css as y,LitElement as T,html as h,render as Se,nothing as dt}from"lit";import{property as v,state as w,customElement as k,query as ee}from"lit/decorators.js";import{classMap as et}from"lit/directives/class-map.js";import{literal as te,html as ct}from"lit/static-html.js";const ht="modulepreload",pt=function(s){return"/"+s},$e={},d=function(e,t,o){if(!t||t.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(t.map(n=>{if(n=pt(n),n in $e)return;$e[n]=!0;const r=n.endsWith(".css"),l=r?'[rel="stylesheet"]':"";if(!!o)for(let g=i.length-1;g>=0;g--){const x=i[g];if(x.href===n&&(!r||x.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${l}`))return;const p=document.createElement("link");if(p.rel=r?"stylesheet":ht,r||(p.as="script",p.crossOrigin=""),p.href=n,document.head.appendChild(p),r)return new Promise((g,x)=>{p.addEventListener("load",g),p.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>e()).catch(n=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=n,window.dispatchEvent(r),!r.defaultPrevented)throw n})};function a(s,e,t,o){var i=arguments.length,n=i<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,e,t,o);else for(var l=s.length-1;l>=0;l--)(r=s[l])&&(n=(i<3?r(n):i>3?r(e,t,n):r(e,t))||n);return i>3&&n&&Object.defineProperty(e,t,n),n}function ut(s){var t;const e=[];for(;s&&s.parentNode;){const o=we(s);if(o.nodeId!==-1){if((t=o.element)!=null&&t.tagName.startsWith("FLOW-CONTAINER-"))break;e.push(o)}s=s.parentElement?s.parentElement:s.parentNode.host}return e.reverse()}function we(s){const e=window.Vaadin;if(e&&e.Flow){const{clients:t}=e.Flow,o=Object.keys(t);for(const i of o){const n=t[i];if(n.getNodeId){const r=n.getNodeId(s);if(r>=0)return{nodeId:r,uiId:n.getUIId(),element:s}}}}return{nodeId:-1,uiId:-1,element:void 0}}function vt(s,e){if(s.contains(e))return!0;let t=e;const o=e.ownerDocument;for(;t&&t!==o&&t!==s;)t=t.parentNode||(t instanceof ShadowRoot?t.host:null);return t===s}const mt=(s,e)=>{const t=s[e];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((o,i)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+e)))})};var b;(function(s){s.text="text",s.checkbox="checkbox",s.range="range",s.color="color"})(b||(b={}));const N={lumoSize:["--lumo-size-xs","--lumo-size-s","--lumo-size-m","--lumo-size-l","--lumo-size-xl"],lumoSpace:["--lumo-space-xs","--lumo-space-s","--lumo-space-m","--lumo-space-l","--lumo-space-xl"],lumoBorderRadius:["0","--lumo-border-radius-m","--lumo-border-radius-l"],lumoFontSize:["--lumo-font-size-xxs","--lumo-font-size-xs","--lumo-font-size-s","--lumo-font-size-m","--lumo-font-size-l","--lumo-font-size-xl","--lumo-font-size-xxl","--lumo-font-size-xxxl"],lumoTextColor:["--lumo-header-text-color","--lumo-body-text-color","--lumo-secondary-text-color","--lumo-tertiary-text-color","--lumo-disabled-text-color","--lumo-primary-text-color","--lumo-error-text-color","--lumo-success-text-color"],basicBorderSize:["0px","1px","2px","3px"]},gt=Object.freeze(Object.defineProperty({__proto__:null,presets:N},Symbol.toStringTag,{value:"Module"})),O={textColor:{propertyName:"color",displayName:"Text color",editorType:b.color,presets:N.lumoTextColor},fontSize:{propertyName:"font-size",displayName:"Font size",editorType:b.range,presets:N.lumoFontSize,icon:"font"},fontWeight:{propertyName:"font-weight",displayName:"Bold",editorType:b.checkbox,checkedValue:"bold"},fontStyle:{propertyName:"font-style",displayName:"Italic",editorType:b.checkbox,checkedValue:"italic"}},I={backgroundColor:{propertyName:"background-color",displayName:"Background color",editorType:b.color},borderColor:{propertyName:"border-color",displayName:"Border color",editorType:b.color},borderWidth:{propertyName:"border-width",displayName:"Border width",editorType:b.range,presets:N.basicBorderSize,icon:"square"},borderRadius:{propertyName:"border-radius",displayName:"Border radius",editorType:b.range,presets:N.lumoBorderRadius,icon:"square"},padding:{propertyName:"padding",displayName:"Padding",editorType:b.range,presets:N.lumoSpace,icon:"square"},gap:{propertyName:"gap",displayName:"Spacing",editorType:b.range,presets:N.lumoSpace,icon:"square"}},ft={height:{propertyName:"height",displayName:"Size",editorType:b.range,presets:N.lumoSize,icon:"square"},paddingInline:{propertyName:"padding-inline",displayName:"Padding",editorType:b.range,presets:N.lumoSpace,icon:"square"}},_e={iconColor:{propertyName:"color",displayName:"Icon color",editorType:b.color,presets:N.lumoTextColor},iconSize:{propertyName:"font-size",displayName:"Icon size",editorType:b.range,presets:N.lumoFontSize,icon:"font"}},yt=[I.backgroundColor,I.borderColor,I.borderWidth,I.borderRadius,I.padding],bt=[O.textColor,O.fontSize,O.fontWeight,O.fontStyle],wt=[_e.iconColor,_e.iconSize],_t=Object.freeze(Object.defineProperty({__proto__:null,fieldProperties:ft,iconProperties:_e,shapeProperties:I,standardIconProperties:wt,standardShapeProperties:yt,standardTextProperties:bt,textProperties:O},Symbol.toStringTag,{value:"Module"}));function tt(s){const e=s.charAt(0).toUpperCase()+s.slice(1);return{tagName:s,displayName:e,elements:[{selector:s,displayName:"Element",properties:[I.backgroundColor,I.borderColor,I.borderWidth,I.borderRadius,I.padding,O.textColor,O.fontSize,O.fontWeight,O.fontStyle]}]}}const xt=Object.freeze(Object.defineProperty({__proto__:null,createGenericMetadata:tt},Symbol.toStringTag,{value:"Module"})),Et=s=>mt(Object.assign({"./components/defaults.ts":()=>d(()=>Promise.resolve().then(()=>_t),void 0),"./components/generic.ts":()=>d(()=>Promise.resolve().then(()=>xt),void 0),"./components/presets.ts":()=>d(()=>Promise.resolve().then(()=>gt),void 0),"./components/vaadin-accordion-heading.ts":()=>d(()=>import("./assets/vaadin-accordion-heading-c0acdd6d.js"),[]),"./components/vaadin-accordion-panel.ts":()=>d(()=>import("./assets/vaadin-accordion-panel-616e55d6.js"),[]),"./components/vaadin-accordion.ts":()=>d(()=>import("./assets/vaadin-accordion-eed3b794.js"),[]),"./components/vaadin-app-layout.ts":()=>d(()=>import("./assets/vaadin-app-layout-e56de2e9.js"),[]),"./components/vaadin-avatar.ts":()=>d(()=>import("./assets/vaadin-avatar-7599297d.js"),[]),"./components/vaadin-big-decimal-field.ts":()=>d(()=>import("./assets/vaadin-big-decimal-field-e51def24.js"),["assets/vaadin-big-decimal-field-e51def24.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-board-row.ts":()=>d(()=>import("./assets/vaadin-board-row-c70d0c55.js"),[]),"./components/vaadin-board.ts":()=>d(()=>import("./assets/vaadin-board-828ebdea.js"),[]),"./components/vaadin-button.ts":()=>d(()=>import("./assets/vaadin-button-2511ad84.js"),[]),"./components/vaadin-chart.ts":()=>d(()=>import("./assets/vaadin-chart-5192dc15.js"),[]),"./components/vaadin-checkbox-group.ts":()=>d(()=>import("./assets/vaadin-checkbox-group-a7c65bf2.js"),["assets/vaadin-checkbox-group-a7c65bf2.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-checkbox-4e68df64.js"]),"./components/vaadin-checkbox.ts":()=>d(()=>import("./assets/vaadin-checkbox-4e68df64.js"),[]),"./components/vaadin-combo-box.ts":()=>d(()=>import("./assets/vaadin-combo-box-96451ddd.js"),["assets/vaadin-combo-box-96451ddd.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-confirm-dialog.ts":()=>d(()=>import("./assets/vaadin-confirm-dialog-4d718829.js"),["assets/vaadin-confirm-dialog-4d718829.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-cookie-consent.ts":()=>d(()=>import("./assets/vaadin-cookie-consent-46c09f8b.js"),[]),"./components/vaadin-crud.ts":()=>d(()=>import("./assets/vaadin-crud-8d161a22.js"),[]),"./components/vaadin-custom-field.ts":()=>d(()=>import("./assets/vaadin-custom-field-42c85b9e.js"),["assets/vaadin-custom-field-42c85b9e.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-date-picker.ts":()=>d(()=>import("./assets/vaadin-date-picker-f2001167.js"),["assets/vaadin-date-picker-f2001167.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-date-time-picker.ts":()=>d(()=>import("./assets/vaadin-date-time-picker-c8c047a7.js"),["assets/vaadin-date-time-picker-c8c047a7.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-details-summary.ts":()=>d(()=>import("./assets/vaadin-details-summary-351a1448.js"),[]),"./components/vaadin-details.ts":()=>d(()=>import("./assets/vaadin-details-bf336660.js"),[]),"./components/vaadin-dialog.ts":()=>d(()=>import("./assets/vaadin-dialog-53253a08.js"),[]),"./components/vaadin-email-field.ts":()=>d(()=>import("./assets/vaadin-email-field-d7a35f04.js"),["assets/vaadin-email-field-d7a35f04.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-form-layout.ts":()=>d(()=>import("./assets/vaadin-form-layout-47744b1d.js"),[]),"./components/vaadin-grid-pro.ts":()=>d(()=>import("./assets/vaadin-grid-pro-ff415555.js"),["assets/vaadin-grid-pro-ff415555.js","assets/vaadin-checkbox-4e68df64.js","assets/vaadin-grid-0a4791c2.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-grid.ts":()=>d(()=>import("./assets/vaadin-grid-0a4791c2.js"),["assets/vaadin-grid-0a4791c2.js","assets/vaadin-checkbox-4e68df64.js"]),"./components/vaadin-horizontal-layout.ts":()=>d(()=>import("./assets/vaadin-horizontal-layout-3193943f.js"),[]),"./components/vaadin-icon.ts":()=>d(()=>import("./assets/vaadin-icon-601f36ed.js"),[]),"./components/vaadin-integer-field.ts":()=>d(()=>import("./assets/vaadin-integer-field-85078932.js"),["assets/vaadin-integer-field-85078932.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-list-box.ts":()=>d(()=>import("./assets/vaadin-list-box-d7a8433b.js"),[]),"./components/vaadin-login-form.ts":()=>d(()=>import("./assets/vaadin-login-form-638996c6.js"),["assets/vaadin-login-form-638996c6.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-login-overlay.ts":()=>d(()=>import("./assets/vaadin-login-overlay-f8a5db8a.js"),["assets/vaadin-login-overlay-f8a5db8a.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-map.ts":()=>d(()=>import("./assets/vaadin-map-d40a0116.js"),[]),"./components/vaadin-menu-bar.ts":()=>d(()=>import("./assets/vaadin-menu-bar-3f5ab096.js"),[]),"./components/vaadin-message-input.ts":()=>d(()=>import("./assets/vaadin-message-input-996ac37c.js"),["assets/vaadin-message-input-996ac37c.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-message-list.ts":()=>d(()=>import("./assets/vaadin-message-list-70a435ba.js"),[]),"./components/vaadin-multi-select-combo-box.ts":()=>d(()=>import("./assets/vaadin-multi-select-combo-box-a3373557.js"),["assets/vaadin-multi-select-combo-box-a3373557.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-notification.ts":()=>d(()=>import("./assets/vaadin-notification-bd6eb776.js"),[]),"./components/vaadin-number-field.ts":()=>d(()=>import("./assets/vaadin-number-field-cb3ee8b2.js"),["assets/vaadin-number-field-cb3ee8b2.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-password-field.ts":()=>d(()=>import("./assets/vaadin-password-field-d289cb18.js"),["assets/vaadin-password-field-d289cb18.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-progress-bar.ts":()=>d(()=>import("./assets/vaadin-progress-bar-309ecf1f.js"),[]),"./components/vaadin-radio-group.ts":()=>d(()=>import("./assets/vaadin-radio-group-88b5afd8.js"),["assets/vaadin-radio-group-88b5afd8.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-rich-text-editor.ts":()=>d(()=>import("./assets/vaadin-rich-text-editor-8cd892f2.js"),[]),"./components/vaadin-scroller.ts":()=>d(()=>import("./assets/vaadin-scroller-35e68818.js"),[]),"./components/vaadin-select.ts":()=>d(()=>import("./assets/vaadin-select-df6e9947.js"),["assets/vaadin-select-df6e9947.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-side-nav-item.ts":()=>d(()=>import("./assets/vaadin-side-nav-item-34918f92.js"),[]),"./components/vaadin-side-nav.ts":()=>d(()=>import("./assets/vaadin-side-nav-ba80d91d.js"),[]),"./components/vaadin-split-layout.ts":()=>d(()=>import("./assets/vaadin-split-layout-80c92131.js"),[]),"./components/vaadin-spreadsheet.ts":()=>d(()=>import("./assets/vaadin-spreadsheet-59d8c5ef.js"),[]),"./components/vaadin-tab.ts":()=>d(()=>import("./assets/vaadin-tab-aaf32809.js"),[]),"./components/vaadin-tabs.ts":()=>d(()=>import("./assets/vaadin-tabs-d9a5e24e.js"),[]),"./components/vaadin-tabsheet.ts":()=>d(()=>import("./assets/vaadin-tabsheet-dd99ed9a.js"),[]),"./components/vaadin-text-area.ts":()=>d(()=>import("./assets/vaadin-text-area-83627ebc.js"),["assets/vaadin-text-area-83627ebc.js","assets/vaadin-text-field-0b3db014.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-text-field.ts":()=>d(()=>import("./assets/vaadin-text-field-0b3db014.js"),[]),"./components/vaadin-time-picker.ts":()=>d(()=>import("./assets/vaadin-time-picker-715ec415.js"),["assets/vaadin-time-picker-715ec415.js","assets/vaadin-text-field-0b3db014.js"]),"./components/vaadin-upload.ts":()=>d(()=>import("./assets/vaadin-upload-d3c162ed.js"),["assets/vaadin-upload-d3c162ed.js","assets/vaadin-button-2511ad84.js"]),"./components/vaadin-vertical-layout.ts":()=>d(()=>import("./assets/vaadin-vertical-layout-ad4174c4.js"),[]),"./components/vaadin-virtual-list.ts":()=>d(()=>import("./assets/vaadin-virtual-list-96896203.js"),[])}),`./components/${s}.ts`);class kt{constructor(e=Et){this.loader=e,this.metadata={}}async getMetadata(e){var i;const t=(i=e.element)==null?void 0:i.localName;if(!t)return null;if(!t.startsWith("vaadin-"))return tt(t);let o=this.metadata[t];if(o)return o;try{o=(await this.loader(t)).default,this.metadata[t]=o}catch{console.warn(`Failed to load metadata for component: ${t}`)}return o||null}}const Ct=new kt,ie={crosshair:B` + + + + + + + +`,square:B` + + +`,font:B` + + + + + + +`,undo:B` + + +`,redo:B` + + +`,cross:B` + + + +`};var G;(function(s){s.disabled="disabled",s.enabled="enabled",s.missing_theme="missing_theme"})(G||(G={}));var _;(function(s){s.local="local",s.global="global"})(_||(_={}));function ve(s,e){return`${s}|${e}`}class V{constructor(e){this._properties={},this._metadata=e}get metadata(){return this._metadata}get properties(){return Object.values(this._properties)}getPropertyValue(e,t){return this._properties[ve(e,t)]||null}updatePropertyValue(e,t,o,i){if(!o){delete this._properties[ve(e,t)];return}let n=this.getPropertyValue(e,t);n?(n.value=o,n.modified=i||!1):(n={elementSelector:e,propertyName:t,value:o,modified:i||!1},this._properties[ve(e,t)]=n)}addPropertyValues(e){e.forEach(t=>{this.updatePropertyValue(t.elementSelector,t.propertyName,t.value,t.modified)})}getPropertyValuesForElement(e){return this.properties.filter(t=>t.elementSelector===e)}static combine(...e){if(e.length<2)throw new Error("Must provide at least two themes");const t=new V(e[0].metadata);return e.forEach(o=>t.addPropertyValues(o.properties)),t}static fromServerRules(e,t,o){const i=new V(e);return e.elements.forEach(n=>{const r=j(n,t),l=o.find(c=>c.selector===r.replace(/ > /g,">"));l&&n.properties.forEach(c=>{const p=l.properties[c.propertyName];p&&i.updatePropertyValue(n.selector,c.propertyName,p,!0)})}),i}}function j(s,e){const t=s.selector;if(e.themeScope===_.global)return t;if(!e.localClassName)throw new Error("Can not build local scoped selector without instance class name");const o=t.match(/^[\w\d-_]+/),i=o&&o[0];if(!i)throw new Error(`Selector does not start with a tag name: ${t}`);return`${i}.${e.localClassName}${t.substring(i.length,t.length)}`}function St(s,e,t,o){const i=j(s,e),n={[t]:o};return t==="border-width"&&(parseInt(o)>0?n["border-style"]="solid":n["border-style"]=""),{selector:i,properties:n}}function Tt(s){const e=Object.entries(s.properties).map(([t,o])=>`${t}: ${o};`).join(" ");return`${s.selector} { ${e} }`}let oe,Oe="";function Te(s){oe||(oe=new CSSStyleSheet,document.adoptedStyleSheets=[...document.adoptedStyleSheets,oe]),Oe+=s.cssText,oe.replaceSync(Oe)}const ot=y` + .editor-row { + display: flex; + align-items: baseline; + padding: var(--theme-editor-section-horizontal-padding); + gap: 10px; + } + + .editor-row > .label { + flex: 0 0 auto; + width: 120px; + } + + .editor-row > .editor { + flex: 1 1 0; + } +`,Le="__vaadin-theme-editor-measure-element",Pe=/((::before)|(::after))$/,Ve=/::part\(([\w\d_-]+)\)$/;Te(y` + .__vaadin-theme-editor-measure-element { + position: absolute; + top: 0; + left: 0; + visibility: hidden; + } +`);async function At(s){const e=new V(s),t=document.createElement(s.tagName);t.classList.add(Le),document.body.append(t),s.setupElement&&await s.setupElement(t);const o={themeScope:_.local,localClassName:Le};try{s.elements.forEach(i=>{Me(t,i,o,!0);let n=j(i,o);const r=n.match(Pe);n=n.replace(Pe,"");const l=n.match(Ve),c=n.replace(Ve,"");let p=document.querySelector(c);if(p&&l){const z=`[part~="${l[1]}"]`;p=p.shadowRoot.querySelector(z)}if(!p)return;p.style.transition="none";const g=r?r[1]:null,x=getComputedStyle(p,g);i.properties.forEach(D=>{const z=x.getPropertyValue(D.propertyName)||D.defaultValue||"";e.updatePropertyValue(i.selector,D.propertyName,z)}),Me(t,i,o,!1)})}finally{try{s.cleanupElement&&await s.cleanupElement(t)}finally{t.remove()}}return e}function Me(s,e,t,o){if(e.stateAttribute){if(e.stateElementSelector){const i=j({...e,selector:e.stateElementSelector},t);s=document.querySelector(i)}s&&(o?s.setAttribute(e.stateAttribute,""):s.removeAttribute(e.stateAttribute))}}function De(s){return s.trim()}function Rt(s){const e=s.element;if(!e)return null;const t=e.querySelector("label");if(t&&t.textContent)return De(t.textContent);const o=e.textContent;return o?De(o):null}class It{constructor(){this._localClassNameMap=new Map}get stylesheet(){return this.ensureStylesheet(),this._stylesheet}add(e){this.ensureStylesheet(),this._stylesheet.replaceSync(e)}clear(){this.ensureStylesheet(),this._stylesheet.replaceSync("")}previewLocalClassName(e,t){if(!e)return;const o=this._localClassNameMap.get(e);o&&(e.classList.remove(o),e.overlayClass=null),t?(e.classList.add(t),e.overlayClass=t,this._localClassNameMap.set(e,t)):this._localClassNameMap.delete(e)}ensureStylesheet(){this._stylesheet||(this._stylesheet=new CSSStyleSheet,this._stylesheet.replaceSync(""),document.adoptedStyleSheets=[...document.adoptedStyleSheets,this._stylesheet])}}const U=new It;var R;(function(s){s.response="themeEditorResponse",s.loadComponentMetadata="themeEditorComponentMetadata",s.setLocalClassName="themeEditorLocalClassName",s.setCssRules="themeEditorRules",s.loadRules="themeEditorLoadRules",s.history="themeEditorHistory",s.openCss="themeEditorOpenCss",s.markAsUsed="themeEditorMarkAsUsed"})(R||(R={}));var xe;(function(s){s.ok="ok",s.error="error"})(xe||(xe={}));class Nt{constructor(e){this.pendingRequests={},this.requestCounter=0,this.wrappedConnection=e;const t=this.wrappedConnection.onMessage;this.wrappedConnection.onMessage=o=>{o.command===R.response?this.handleResponse(o.data):t.call(this.wrappedConnection,o)}}sendRequest(e,t){const o=(this.requestCounter++).toString(),i=t.uiId??this.getGlobalUiId();return new Promise((n,r)=>{this.wrappedConnection.send(e,{...t,requestId:o,uiId:i}),this.pendingRequests[o]={resolve:n,reject:r}})}handleResponse(e){const t=this.pendingRequests[e.requestId];if(!t){console.warn("Received response for unknown request");return}delete this.pendingRequests[e.requestId],e.code===xe.ok?t.resolve(e):t.reject(e)}loadComponentMetadata(e){return this.sendRequest(R.loadComponentMetadata,{nodeId:e.nodeId})}setLocalClassName(e,t){return this.sendRequest(R.setLocalClassName,{nodeId:e.nodeId,className:t})}setCssRules(e){return this.sendRequest(R.setCssRules,{rules:e})}loadRules(e){return this.sendRequest(R.loadRules,{selectors:e})}markAsUsed(){return this.sendRequest(R.markAsUsed,{})}undo(e){return this.sendRequest(R.history,{undo:e})}redo(e){return this.sendRequest(R.history,{redo:e})}openCss(e){return this.sendRequest(R.openCss,{selector:e})}getGlobalUiId(){if(this.globalUiId===void 0){const e=window.Vaadin;if(e&&e.Flow){const{clients:t}=e.Flow,o=Object.keys(t);for(const i of o){const n=t[i];if(n.getNodeId){this.globalUiId=n.getUIId();break}}}}return this.globalUiId??-1}}const E={index:-1,entries:[]};class $t{constructor(e){this.api=e}get allowUndo(){return E.index>=0}get allowRedo(){return E.index +
+ ${this.propertyMetadata.displayName} + ${(e=this.propertyValue)!=null&&e.modified?h``:null} +
+
${this.renderEditor()}
+ + `}updateValueFromTheme(){var e;this.propertyValue=this.theme.getPropertyValue(this.elementMetadata.selector,this.propertyMetadata.propertyName),this.value=((e=this.propertyValue)==null?void 0:e.value)||""}dispatchChange(e){this.dispatchEvent(new Ot(this.elementMetadata,this.propertyMetadata,e))}}a([v({})],A.prototype,"elementMetadata",void 0);a([v({})],A.prototype,"propertyMetadata",void 0);a([v({})],A.prototype,"theme",void 0);a([w()],A.prototype,"propertyValue",void 0);a([w()],A.prototype,"value",void 0);class ne{get values(){return this._values}get rawValues(){return this._rawValues}constructor(e){if(this._values=[],this._rawValues={},e){const t=e.propertyName,o=e.presets??[];this._values=(o||[]).map(n=>n.startsWith("--")?`var(${n})`:n);const i=document.createElement("div");i.style.borderStyle="solid",i.style.visibility="hidden",document.body.append(i);try{this._values.forEach(n=>{i.style.setProperty(t,n);const r=getComputedStyle(i);this._rawValues[n]=r.getPropertyValue(t).trim()})}finally{i.remove()}}}tryMapToRawValue(e){return this._rawValues[e]??e}tryMapToPreset(e){return this.findPreset(e)??e}findPreset(e){const t=e&&e.trim();return this.values.find(o=>this._rawValues[o]===t)}}class ze extends CustomEvent{constructor(e){super("change",{detail:{value:e}})}}let re=class extends T{constructor(){super(...arguments),this.value="",this.showClearButton=!1}static get styles(){return y` + :host { + display: inline-block; + width: 100%; + position: relative; + } + + input { + width: 100%; + box-sizing: border-box; + padding: 0.25rem 0.375rem; + color: inherit; + background: rgba(0, 0, 0, 0.2); + border-radius: 0.25rem; + border: none; + } + + button { + display: none; + position: absolute; + right: 4px; + top: 4px; + padding: 0; + line-height: 0; + border: none; + background: none; + color: var(--dev-tools-text-color); + } + + button svg { + width: 16px; + height: 16px; + } + + button:not(:disabled):hover { + color: var(--dev-tools-text-color-emphasis); + } + + :host(.show-clear-button) input { + padding-right: 20px; + } + + :host(.show-clear-button) button { + display: block; + } + `}update(e){super.update(e),e.has("showClearButton")&&(this.showClearButton?this.classList.add("show-clear-button"):this.classList.remove("show-clear-button"))}render(){return h` + + + `}handleInputChange(e){const t=e.target;this.dispatchEvent(new ze(t.value))}handleClearClick(){this.dispatchEvent(new ze(""))}};a([v({})],re.prototype,"value",void 0);a([v({})],re.prototype,"showClearButton",void 0);re=a([k("vaadin-dev-tools-theme-text-input")],re);class Lt extends CustomEvent{constructor(e){super("class-name-change",{detail:{value:e}})}}let J=class extends T{constructor(){super(...arguments),this.editedClassName="",this.invalid=!1}static get styles(){return[ot,y` + .editor-row { + padding-top: 0; + } + + .editor-row .editor .error { + display: inline-block; + color: var(--dev-tools-red-color); + margin-top: 4px; + } + `]}update(e){super.update(e),e.has("className")&&(this.editedClassName=this.className,this.invalid=!1)}render(){return h`
+
CSS class name
+
+ + ${this.invalid?h`
Please enter a valid CSS class name`:null} +
+
`}handleInputChange(e){this.editedClassName=e.detail.value;const t=/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/;this.invalid=!this.editedClassName.match(t),!this.invalid&&this.editedClassName!==this.className&&this.dispatchEvent(new Lt(this.editedClassName))}};a([v({})],J.prototype,"className",void 0);a([w()],J.prototype,"editedClassName",void 0);a([w()],J.prototype,"invalid",void 0);J=a([k("vaadin-dev-tools-theme-class-name-editor")],J);class Pt extends CustomEvent{constructor(e){super("scope-change",{detail:{value:e}})}}Te(y` + vaadin-select-overlay[theme~='vaadin-dev-tools-theme-scope-selector'] { + --lumo-primary-color-50pct: rgba(255, 255, 255, 0.5); + z-index: 100000 !important; + } + + vaadin-select-overlay[theme~='vaadin-dev-tools-theme-scope-selector']::part(overlay) { + background: #333; + } + + vaadin-select-overlay[theme~='vaadin-dev-tools-theme-scope-selector'] vaadin-item { + color: rgba(255, 255, 255, 0.8); + } + + vaadin-select-overlay[theme~='vaadin-dev-tools-theme-scope-selector'] vaadin-item::part(content) { + font-size: 13px; + } + + vaadin-select-overlay[theme~='vaadin-dev-tools-theme-scope-selector'] vaadin-item .title { + color: rgba(255, 255, 255, 0.95); + font-weight: bold; + } + + vaadin-select-overlay[theme~='vaadin-dev-tools-theme-scope-selector'] vaadin-item::part(checkmark) { + margin: 6px; + } + + vaadin-select-overlay[theme~='vaadin-dev-tools-theme-scope-selector'] vaadin-item::part(checkmark)::before { + color: rgba(255, 255, 255, 0.95); + } + + vaadin-select-overlay[theme~='vaadin-dev-tools-theme-scope-selector'] vaadin-item:hover { + background: rgba(255, 255, 255, 0.1); + } +`);let X=class extends T{constructor(){super(...arguments),this.value=_.local}static get styles(){return y` + vaadin-select { + --lumo-primary-color-50pct: rgba(255, 255, 255, 0.5); + width: 100px; + } + + vaadin-select::part(input-field) { + background: rgba(0, 0, 0, 0.2); + } + + vaadin-select vaadin-select-value-button, + vaadin-select::part(toggle-button) { + color: var(--dev-tools-text-color); + } + + vaadin-select:hover vaadin-select-value-button, + vaadin-select:hover::part(toggle-button) { + color: var(--dev-tools-text-color-emphasis); + } + + vaadin-select vaadin-select-item { + font-size: 13px; + } + `}update(e){var t;super.update(e),e.has("metadata")&&((t=this.select)==null||t.requestContentUpdate())}render(){return h` `}selectRenderer(e){var i;const t=((i=this.metadata)==null?void 0:i.displayName)||"Component",o=`${t}s`;Se(h` + + + Local +
+ Edit styles for this ${t} +
+ + Global +
+ Edit styles for all ${o} +
+
+ `,e)}handleValueChange(e){const t=e.detail.value;t!==this.value&&this.dispatchEvent(new Pt(t))}};a([v({})],X.prototype,"value",void 0);a([v({})],X.prototype,"metadata",void 0);a([ee("vaadin-select")],X.prototype,"select",void 0);X=a([k("vaadin-dev-tools-theme-scope-selector")],X);let Ue=class extends A{static get styles(){return[A.styles,y` + .editor-row { + align-items: center; + } + `]}handleInputChange(e){const o=e.target.checked?this.propertyMetadata.checkedValue:"";this.dispatchChange(o||"")}renderEditor(){const e=this.value===this.propertyMetadata.checkedValue;return h` `}};Ue=a([k("vaadin-dev-tools-theme-checkbox-property-editor")],Ue);let He=class extends A{handleInputChange(e){this.dispatchChange(e.detail.value)}renderEditor(){var e;return h` + + `}};He=a([k("vaadin-dev-tools-theme-text-property-editor")],He);let ae=class extends A{constructor(){super(...arguments),this.selectedPresetIndex=-1,this.presets=new ne}static get styles(){return[A.styles,y` + :host { + --preset-count: 3; + --slider-bg: #fff; + --slider-border: #333; + } + + .editor-row { + align-items: center; + } + + .editor-row > .editor { + display: flex; + align-items: center; + gap: 1rem; + } + + .editor-row .input { + flex: 0 0 auto; + width: 80px; + } + + .slider-wrapper { + flex: 1 1 0; + display: flex; + align-items: center; + gap: 0.5rem; + } + + .icon { + width: 20px; + height: 20px; + color: #aaa; + } + + .icon.prefix > svg { + transform: scale(0.75); + } + + .slider { + flex: 1 1 0; + -webkit-appearance: none; + background: linear-gradient(to right, #666, #666 2px, transparent 2px); + background-size: calc((100% - 13px) / (var(--preset-count) - 1)) 8px; + background-position: 5px 50%; + background-repeat: repeat-x; + } + + .slider::-webkit-slider-runnable-track { + width: 100%; + box-sizing: border-box; + height: 16px; + background-image: linear-gradient(#666, #666); + background-size: calc(100% - 12px) 2px; + background-repeat: no-repeat; + background-position: 6px 50%; + } + + .slider::-moz-range-track { + width: 100%; + box-sizing: border-box; + height: 16px; + background-image: linear-gradient(#666, #666); + background-size: calc(100% - 12px) 2px; + background-repeat: no-repeat; + background-position: 6px 50%; + } + + .slider::-webkit-slider-thumb { + -webkit-appearance: none; + height: 16px; + width: 16px; + border: 2px solid var(--slider-border); + border-radius: 50%; + background: var(--slider-bg); + cursor: pointer; + } + + .slider::-moz-range-thumb { + height: 16px; + width: 16px; + border: 2px solid var(--slider-border); + border-radius: 50%; + background: var(--slider-bg); + cursor: pointer; + } + + .custom-value { + opacity: 0.5; + } + + .custom-value:hover, + .custom-value:focus-within { + opacity: 1; + } + + .custom-value:not(:hover, :focus-within) { + --slider-bg: #333; + --slider-border: #666; + } + `]}update(e){e.has("propertyMetadata")&&(this.presets=new ne(this.propertyMetadata)),super.update(e)}renderEditor(){var o;const e={"slider-wrapper":!0,"custom-value":this.selectedPresetIndex<0},t=this.presets.values.length;return h` +
+ ${null} + + ${null} +
+ + `}handleSliderInput(e){const t=e.target,o=parseInt(t.value),i=this.presets.values[o];this.selectedPresetIndex=o,this.value=this.presets.rawValues[i]}handleSliderChange(){this.dispatchChange(this.value)}handleValueChange(e){this.value=e.detail.value,this.updateSliderValue(),this.dispatchChange(this.value)}dispatchChange(e){const t=this.presets.tryMapToPreset(e);super.dispatchChange(t)}updateValueFromTheme(){var e;super.updateValueFromTheme(),this.value=this.presets.tryMapToRawValue(((e=this.propertyValue)==null?void 0:e.value)||""),this.updateSliderValue()}updateSliderValue(){const e=this.presets.findPreset(this.value);this.selectedPresetIndex=e?this.presets.values.indexOf(e):-1}};a([w()],ae.prototype,"selectedPresetIndex",void 0);a([w()],ae.prototype,"presets",void 0);ae=a([k("vaadin-dev-tools-theme-range-property-editor")],ae);const W=(s,e=0,t=1)=>s>t?t:sMath.round(t*s)/t,st=({h:s,s:e,v:t,a:o})=>{const i=(200-e)*t/100;return{h:C(s),s:C(i>0&&i<200?e*t/100/(i<=100?i:200-i)*100:0),l:C(i/2),a:C(o,2)}},Ee=s=>{const{h:e,s:t,l:o}=st(s);return`hsl(${e}, ${t}%, ${o}%)`},me=s=>{const{h:e,s:t,l:o,a:i}=st(s);return`hsla(${e}, ${t}%, ${o}%, ${i})`},Vt=({h:s,s:e,v:t,a:o})=>{s=s/360*6,e=e/100,t=t/100;const i=Math.floor(s),n=t*(1-e),r=t*(1-(s-i)*e),l=t*(1-(1-s+i)*e),c=i%6;return{r:C([t,r,n,n,l,t][c]*255),g:C([l,t,t,r,n,n][c]*255),b:C([n,n,l,t,t,r][c]*255),a:C(o,2)}},Mt=s=>{const{r:e,g:t,b:o,a:i}=Vt(s);return`rgba(${e}, ${t}, ${o}, ${i})`},Dt=s=>{const t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(s);return t?zt({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},zt=({r:s,g:e,b:t,a:o})=>{const i=Math.max(s,e,t),n=i-Math.min(s,e,t),r=n?i===s?(e-t)/n:i===e?2+(t-s)/n:4+(s-e)/n:0;return{h:C(60*(r<0?r+6:r)),s:C(i?n/i*100:0),v:C(i/255*100),a:o}},Ut=(s,e)=>{if(s===e)return!0;for(const t in s)if(s[t]!==e[t])return!1;return!0},Ht=(s,e)=>s.replace(/\s/g,"")===e.replace(/\s/g,""),Be={},it=s=>{let e=Be[s];return e||(e=document.createElement("template"),e.innerHTML=s,Be[s]=e),e},Ae=(s,e,t)=>{s.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:t}))};let q=!1;const ke=s=>"touches"in s,Bt=s=>q&&!ke(s)?!1:(q||(q=ke(s)),!0),qe=(s,e)=>{const t=ke(e)?e.touches[0]:e,o=s.el.getBoundingClientRect();Ae(s.el,"move",s.getMove({x:W((t.pageX-(o.left+window.pageXOffset))/o.width),y:W((t.pageY-(o.top+window.pageYOffset))/o.height)}))},qt=(s,e)=>{const t=e.keyCode;t>40||s.xy&&t<37||t<33||(e.preventDefault(),Ae(s.el,"move",s.getMove({x:t===39?.01:t===37?-.01:t===34?.05:t===33?-.05:t===35?1:t===36?-1:0,y:t===40?.01:t===38?-.01:0},!0)))};class Re{constructor(e,t,o,i){const n=it(`
`);e.appendChild(n.content.cloneNode(!0));const r=e.querySelector(`[part=${t}]`);r.addEventListener("mousedown",this),r.addEventListener("touchstart",this),r.addEventListener("keydown",this),this.el=r,this.xy=i,this.nodes=[r.firstChild,r]}set dragging(e){const t=e?document.addEventListener:document.removeEventListener;t(q?"touchmove":"mousemove",this),t(q?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!Bt(e)||!q&&e.button!=0)return;this.el.focus(),qe(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),qe(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":qt(this,e);break}}style(e){e.forEach((t,o)=>{for(const i in t)this.nodes[o].style.setProperty(i,t[i])})}}class Ft extends Re{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:`${e/360*100}%`,color:Ee({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${C(e)}`)}getMove(e,t){return{h:t?W(this.h+e.x*360,0,360):360*e.x}}}class Gt extends Re{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:`${100-e.v}%`,left:`${e.s}%`,color:Ee(e)},{"background-color":Ee({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${C(e.s)}%, Brightness ${C(e.v)}%`)}getMove(e,t){return{s:t?W(this.hsva.s+e.x*100,0,100):e.x*100,v:t?W(this.hsva.v-e.y*100,0,100):Math.round(100-e.y*100)}}}const jt=':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',Wt="[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}",Kt="[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}",se=Symbol("same"),ge=Symbol("color"),Fe=Symbol("hsva"),fe=Symbol("update"),Ge=Symbol("parts"),le=Symbol("css"),de=Symbol("sliders");let Yt=class extends HTMLElement{static get observedAttributes(){return["color"]}get[le](){return[jt,Wt,Kt]}get[de](){return[Gt,Ft]}get color(){return this[ge]}set color(e){if(!this[se](e)){const t=this.colorModel.toHsva(e);this[fe](t),this[ge]=e}}constructor(){super();const e=it(``),t=this.attachShadow({mode:"open"});t.appendChild(e.content.cloneNode(!0)),t.addEventListener("move",this),this[Ge]=this[de].map(o=>new o(t))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,t,o){const i=this.colorModel.fromAttr(o);this[se](i)||(this.color=i)}handleEvent(e){const t=this[Fe],o={...t,...e.detail};this[fe](o);let i;!Ut(o,t)&&!this[se](i=this.colorModel.fromHsva(o))&&(this[ge]=i,Ae(this,"color-changed",{value:i}))}[se](e){return this.color&&this.colorModel.equal(e,this.color)}[fe](e){this[Fe]=e,this[Ge].forEach(t=>t.update(e))}};class Jt extends Re{constructor(e){super(e,"alpha",'aria-label="Alpha" aria-valuemin="0" aria-valuemax="1"',!1)}update(e){this.hsva=e;const t=me({...e,a:0}),o=me({...e,a:1}),i=e.a*100;this.style([{left:`${i}%`,color:me(e)},{"--gradient":`linear-gradient(90deg, ${t}, ${o}`}]);const n=C(i);this.el.setAttribute("aria-valuenow",`${n}`),this.el.setAttribute("aria-valuetext",`${n}%`)}getMove(e,t){return{a:t?W(this.hsva.a+e.x):e.x}}}const Xt=`[part=alpha]{flex:0 0 24px}[part=alpha]::after{display:block;content:"";position:absolute;top:0;left:0;right:0;bottom:0;border-radius:inherit;background-image:var(--gradient);box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part^=alpha]{background-color:#fff;background-image:url('data:image/svg+xml,')}[part=alpha-pointer]{top:50%}`;class Zt extends Yt{get[le](){return[...super[le],Xt]}get[de](){return[...super[de],Jt]}}const Qt={defaultColor:"rgba(0, 0, 0, 1)",toHsva:Dt,fromHsva:Mt,equal:Ht,fromAttr:s=>s};class eo extends Zt{get colorModel(){return Qt}}/** + * @license + * Copyright (c) 2017 - 2023 Vaadin Ltd. + * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ + */function to(s){const e=[];for(;s;){if(s.nodeType===Node.DOCUMENT_NODE){e.push(s);break}if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){e.push(s),s=s.host;continue}if(s.assignedSlot){s=s.assignedSlot;continue}s=s.parentNode}return e}const ye={start:"top",end:"bottom"},be={start:"left",end:"right"},je=new ResizeObserver(s=>{setTimeout(()=>{s.forEach(e=>{e.target.__overlay&&e.target.__overlay._updatePosition()})})}),oo=s=>class extends s{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1},requiredVerticalSpace:{type:Number,value:0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.addEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes=to(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(t=>{t.addEventListener("scroll",this.__onScroll,!0)})}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(t=>{t.removeEventListener("scroll",this.__onScroll,!0)}),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(t,o){if(this.__removeUpdatePositionEventListeners(),o&&(o.__overlay=null,je.unobserve(o),t&&(this.__addUpdatePositionEventListeners(),o.__overlay=this,je.observe(o))),t){const i=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(n=>{this.__margins[n]=parseInt(i[n],10)})),this.setAttribute("dir",i.direction),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition())}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened)return;const t=this.positionTarget.getBoundingClientRect(),o=this.__shouldAlignStartVertically(t);this.style.justifyContent=o?"flex-start":"flex-end";const i=this.__isRTL,n=this.__shouldAlignStartHorizontally(t,i),r=!i&&n||i&&!n;this.style.alignItems=r?"flex-start":"flex-end";const l=this.getBoundingClientRect(),c=this.__calculatePositionInOneDimension(t,l,this.noVerticalOverlap,ye,this,o),p=this.__calculatePositionInOneDimension(t,l,this.noHorizontalOverlap,be,this,n);Object.assign(this.style,c,p),this.toggleAttribute("bottom-aligned",!o),this.toggleAttribute("top-aligned",o),this.toggleAttribute("end-aligned",!r),this.toggleAttribute("start-aligned",r)}__shouldAlignStartHorizontally(t,o){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const n=Math.min(window.innerWidth,document.documentElement.clientWidth),r=!o&&this.horizontalAlign==="start"||o&&this.horizontalAlign==="end";return this.__shouldAlignStart(t,i,n,this.__margins,r,this.noHorizontalOverlap,be)}__shouldAlignStartVertically(t){const o=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight),n=this.verticalAlign==="top";return this.__shouldAlignStart(t,o,i,this.__margins,n,this.noVerticalOverlap,ye)}__shouldAlignStart(t,o,i,n,r,l,c){const p=i-t[l?c.end:c.start]-n[c.end],g=t[l?c.start:c.end]-n[c.start],x=r?p:g,z=x>(r?g:p)||x>o;return r===z}__adjustBottomProperty(t,o,i){let n;if(t===o.end){if(o.end===ye.end){const r=Math.min(window.innerHeight,document.documentElement.clientHeight);if(i>r&&this.__oldViewportHeight){const l=this.__oldViewportHeight-r;n=i-l}this.__oldViewportHeight=r}if(o.end===be.end){const r=Math.min(window.innerWidth,document.documentElement.clientWidth);if(i>r&&this.__oldViewportWidth){const l=this.__oldViewportWidth-r;n=i-l}this.__oldViewportWidth=r}}return n}__calculatePositionInOneDimension(t,o,i,n,r,l){const c=l?n.start:n.end,p=l?n.end:n.start,g=parseFloat(r.style[c]||getComputedStyle(r)[c]),x=this.__adjustBottomProperty(c,n,g),D=o[l?n.start:n.end]-t[i===l?n.end:n.start],z=x?`${x}px`:`${g+D*(l?-1:1)}px`;return{[c]:z,[p]:""}}};class so extends CustomEvent{constructor(e){super("color-picker-change",{detail:{value:e}})}}const nt=y` + :host { + --preview-size: 24px; + --preview-color: rgba(0, 0, 0, 0); + } + + .preview { + --preview-bg-size: calc(var(--preview-size) / 2); + --preview-bg-pos: calc(var(--preview-size) / 4); + + width: var(--preview-size); + height: var(--preview-size); + padding: 0; + position: relative; + overflow: hidden; + background: none; + border: solid 2px #888; + border-radius: 4px; + box-sizing: content-box; + } + + .preview::before, + .preview::after { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + + .preview::before { + content: ''; + background: white; + background-image: linear-gradient(45deg, #666 25%, transparent 25%), + linear-gradient(45deg, transparent 75%, #666 75%), linear-gradient(45deg, transparent 75%, #666 75%), + linear-gradient(45deg, #666 25%, transparent 25%); + background-size: var(--preview-bg-size) var(--preview-bg-size); + background-position: 0 0, 0 0, calc(var(--preview-bg-pos) * -1) calc(var(--preview-bg-pos) * -1), + var(--preview-bg-pos) var(--preview-bg-pos); + } + + .preview::after { + content: ''; + background-color: var(--preview-color); + } +`;let Z=class extends T{constructor(){super(...arguments),this.commitValue=!1}static get styles(){return[nt,y` + #toggle { + display: block; + } + `]}update(e){super.update(e),e.has("value")&&this.overlay&&this.overlay.requestContentUpdate()}firstUpdated(){this.overlay=document.createElement("vaadin-dev-tools-color-picker-overlay"),this.overlay.renderer=this.renderOverlayContent.bind(this),this.overlay.owner=this,this.overlay.positionTarget=this.toggle,this.overlay.noVerticalOverlap=!0,this.overlay.addEventListener("vaadin-overlay-escape-press",this.handleOverlayEscape.bind(this)),this.overlay.addEventListener("vaadin-overlay-close",this.handleOverlayClose.bind(this)),this.append(this.overlay)}render(){const e=this.value||"rgba(0, 0, 0, 0)";return h` `}open(){this.commitValue=!1,this.overlay.opened=!0,this.overlay.style.zIndex="1000000";const e=this.overlay.shadowRoot.querySelector('[part="overlay"]');e.style.background="#333"}renderOverlayContent(e){const o=getComputedStyle(this.toggle,"::after").getPropertyValue("background-color");Se(h`
+ +
`,e)}handleColorChange(e){this.commitValue=!0,this.dispatchEvent(new so(e.detail.value)),e.detail.close&&(this.overlay.opened=!1,this.handleOverlayClose())}handleOverlayEscape(){this.commitValue=!1}handleOverlayClose(){const e=this.commitValue?"color-picker-commit":"color-picker-cancel";this.dispatchEvent(new CustomEvent(e))}};a([v({})],Z.prototype,"value",void 0);a([v({})],Z.prototype,"presets",void 0);a([ee("#toggle")],Z.prototype,"toggle",void 0);Z=a([k("vaadin-dev-tools-color-picker")],Z);let ce=class extends T{static get styles(){return[nt,y` + :host { + display: block; + padding: 12px; + } + + .picker::part(saturation), + .picker::part(hue) { + margin-bottom: 10px; + } + + .picker::part(hue), + .picker::part(alpha) { + flex: 0 0 20px; + } + + .picker::part(saturation), + .picker::part(hue), + .picker::part(alpha) { + border-radius: 3px; + } + + .picker::part(saturation-pointer), + .picker::part(hue-pointer), + .picker::part(alpha-pointer) { + width: 20px; + height: 20px; + } + + .swatches { + display: grid; + grid-template-columns: repeat(6, var(--preview-size)); + grid-column-gap: 10px; + grid-row-gap: 6px; + margin-top: 16px; + } + `]}render(){return h`
+ + ${this.renderSwatches()} +
`}renderSwatches(){if(!this.presets||this.presets.length===0)return;const e=this.presets.map(t=>h` `);return h`
${e}
`}handlePickerChange(e){this.dispatchEvent(new CustomEvent("color-changed",{detail:{value:e.detail.value}}))}selectPreset(e){this.dispatchEvent(new CustomEvent("color-changed",{detail:{value:e,close:!0}}))}};a([v({})],ce.prototype,"value",void 0);a([v({})],ce.prototype,"presets",void 0);ce=a([k("vaadin-dev-tools-color-picker-overlay-content")],ce);customElements.whenDefined("vaadin-overlay").then(()=>{const s=customElements.get("vaadin-overlay");class e extends oo(s){}customElements.define("vaadin-dev-tools-color-picker-overlay",e)});customElements.define("vaadin-dev-tools-rgba-string-color-picker",eo);let We=class extends A{constructor(){super(...arguments),this.presets=new ne}static get styles(){return[A.styles,y` + .editor-row { + align-items: center; + } + + .editor-row > .editor { + display: flex; + align-items: center; + gap: 0.5rem; + } + `]}update(e){e.has("propertyMetadata")&&(this.presets=new ne(this.propertyMetadata)),super.update(e)}renderEditor(){var e;return h` + + + `}handleInputChange(e){this.value=e.detail.value,this.dispatchChange(this.value)}handleColorPickerChange(e){this.value=e.detail.value}handleColorPickerCommit(){this.dispatchChange(this.value)}handleColorPickerCancel(){this.updateValueFromTheme()}dispatchChange(e){const t=this.presets.tryMapToPreset(e);super.dispatchChange(t)}updateValueFromTheme(){var e;super.updateValueFromTheme(),this.value=this.presets.tryMapToRawValue(((e=this.propertyValue)==null?void 0:e.value)||"")}};We=a([k("vaadin-dev-tools-theme-color-property-editor")],We);class io extends CustomEvent{constructor(e){super("open-css",{detail:{element:e}})}}let he=class extends T{static get styles(){return y` + .section .header { + display: flex; + align-items: baseline; + justify-content: space-between; + padding: 0.4rem var(--theme-editor-section-horizontal-padding); + color: var(--dev-tools-text-color-emphasis); + background-color: rgba(0, 0, 0, 0.2); + } + + .section .property-list .property-editor:not(:last-child) { + border-bottom: solid 1px rgba(0, 0, 0, 0.2); + } + + .section .header .open-css { + all: initial; + font-family: inherit; + font-size: var(--dev-tools-font-size-small); + line-height: 1; + white-space: nowrap; + background-color: rgba(255, 255, 255, 0.12); + color: var(--dev-tools-text-color); + font-weight: 600; + padding: 0.25rem 0.375rem; + border-radius: 0.25rem; + } + + .section .header .open-css:hover { + color: var(--dev-tools-text-color-emphasis); + } + `}render(){const e=this.metadata.elements.map(t=>this.renderSection(t));return h`
${e}
`}renderSection(e){const t=e.properties.map(o=>this.renderPropertyEditor(e,o));return h` +
+
+ ${e.displayName} + +
+
${t}
+
+ `}handleOpenCss(e){this.dispatchEvent(new io(e))}renderPropertyEditor(e,t){let o;switch(t.editorType){case b.checkbox:o=te`vaadin-dev-tools-theme-checkbox-property-editor`;break;case b.range:o=te`vaadin-dev-tools-theme-range-property-editor`;break;case b.color:o=te`vaadin-dev-tools-theme-color-property-editor`;break;default:o=te`vaadin-dev-tools-theme-text-property-editor`}return ct` <${o} + class="property-editor" + .elementMetadata=${e} + .propertyMetadata=${t} + .theme=${this.theme} + data-testid=${t.propertyName} + > + `}};a([v({})],he.prototype,"metadata",void 0);a([v({})],he.prototype,"theme",void 0);he=a([k("vaadin-dev-tools-theme-property-list")],he);let pe=class extends T{render(){return h`
`}onClick(e){const t=this.getTargetElement(e);this.dispatchEvent(new CustomEvent("shim-click",{detail:{target:t}}))}onMouseMove(e){const t=this.getTargetElement(e);this.dispatchEvent(new CustomEvent("shim-mousemove",{detail:{target:t}}))}onKeyDown(e){this.dispatchEvent(new CustomEvent("shim-keydown",{detail:{originalEvent:e}}))}getTargetElement(e){this.style.display="none";const t=document.elementFromPoint(e.clientX,e.clientY);return this.style.display="",t}};pe.shadowRootOptions={...T.shadowRootOptions,delegatesFocus:!0};pe.styles=[y` + div { + pointer-events: auto; + background: rgba(255, 255, 255, 0); + position: fixed; + inset: 0px; + z-index: 1000000; + } + `];pe=a([k("vaadin-dev-tools-shim")],pe);const rt=y` + .popup { + width: auto; + position: fixed; + background-color: var(--dev-tools-background-color-active-blurred); + color: var(--dev-tools-text-color-primary); + padding: 0.1875rem 0.75rem 0.1875rem 1rem; + background-clip: padding-box; + border-radius: var(--dev-tools-border-radius); + overflow: hidden; + margin: 0.5rem; + width: 30rem; + max-width: calc(100% - 1rem); + max-height: calc(100vh - 1rem); + flex-shrink: 1; + background-color: var(--dev-tools-background-color-active); + color: var(--dev-tools-text-color); + transition: var(--dev-tools-transition-duration); + transform-origin: bottom right; + display: flex; + flex-direction: column; + box-shadow: var(--dev-tools-box-shadow); + outline: none; + } +`,no={resolve:s=>P(o=>o.classList.contains("cc-banner"),s)?document.querySelector("vaadin-cookie-consent"):void 0},ro={resolve:s=>{const t=P(o=>o.localName==="vaadin-login-overlay-wrapper",s);return t?t.__dataHost:void 0}},ao={resolve:s=>s.localName==="vaadin-dialog-overlay"?s.__dataHost:void 0},lo={resolve:s=>{const t=P(o=>o.localName==="vaadin-confirm-dialog-overlay",s);return t?t.__dataHost:void 0}},co={resolve:s=>{const t=P(o=>o.localName==="vaadin-notification-card",s);return t?t.__dataHost:void 0}},ho={resolve:s=>s.localName!=="vaadin-menu-bar-item"?void 0:P(t=>t.localName==="vaadin-menu-bar",s)},Ke=[no,ro,ao,lo,co,ho],po={resolve:s=>P(t=>t.classList.contains("cc-banner"),s)},uo={resolve:s=>{var o;const t=P(i=>{var n;return((n=i.shadowRoot)==null?void 0:n.querySelector("[part=overlay]"))!=null},s);return(o=t==null?void 0:t.shadowRoot)==null?void 0:o.querySelector("[part=overlay]")}},vo={resolve:s=>{var o;const t=P(i=>i.localName==="vaadin-login-overlay-wrapper",s);return(o=t==null?void 0:t.shadowRoot)==null?void 0:o.querySelector("[part=card]")}},Ye=[vo,po,uo],P=function(s,e){return s(e)?e:e.parentNode&&e.parentNode instanceof HTMLElement?P(s,e.parentNode):void 0};class mo{resolveElement(e){for(const t in Ke){let o=e;if((o=Ke[t].resolve(e))!==void 0)return o}return e}}class go{resolveElement(e){for(const t in Ye){let o=e;if((o=Ye[t].resolve(e))!==void 0)return o}return e}}const fo=new mo,yo=new go;let M=class extends T{constructor(){super(),this.active=!1,this.components=[],this.selected=0,this.mouseMoveEvent=this.mouseMoveEvent.bind(this)}connectedCallback(){super.connectedCallback();const e=new CSSStyleSheet;e.replaceSync(` + .vaadin-dev-tools-highlight-overlay { + pointer-events: none; + position: absolute; + z-index: 10000; + background: rgba(158,44,198,0.25); + }`),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e],this.overlayElement=document.createElement("div"),this.overlayElement.classList.add("vaadin-dev-tools-highlight-overlay"),this.addEventListener("mousemove",this.mouseMoveEvent)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("mousemove",this.mouseMoveEvent)}render(){var e;return this.active?(this.style.display="block",h` + + + + `):(this.style.display="none",null)}open(e){this.options=e,this.active=!0,this.dispatchEvent(new CustomEvent("component-picker-opened",{}))}close(){this.active=!1,this.dispatchEvent(new CustomEvent("component-picker-closed",{}))}update(e){if(super.update(e),(e.has("selected")||e.has("components"))&&this.highlight(this.components[this.selected]),e.has("active")){const t=e.get("active"),o=this.active;!t&&o?requestAnimationFrame(()=>this.shim.focus()):t&&!o&&this.highlight(void 0)}}mouseMoveEvent(e){var o;if(!this.active){this.style.display="none";return}const t=(o=this.shadowRoot)==null?void 0:o.querySelector(".component-picker-info");if(t){const i=t.getBoundingClientRect();e.x>i.x&&e.xi.y&&e.y<=i.y+i.height?t.style.opacity="0.05":t.style.opacity="1.0"}}shimKeydown(e){const t=e.detail.originalEvent;if(t.key==="Escape")this.close(),e.stopPropagation(),e.preventDefault();else if(t.key==="ArrowUp"){let o=this.selected-1;o<0&&(o=this.components.length-1),this.selected=o}else t.key==="ArrowDown"?this.selected=(this.selected+1)%this.components.length:t.key==="Enter"&&(this.pickSelectedComponent(),e.stopPropagation(),e.preventDefault())}shimMove(e){const t=fo.resolveElement(e.detail.target);this.components=ut(t),this.selected=this.components.length-1,this.components[this.selected].highlightElement=yo.resolveElement(e.detail.target)}shimClick(e){this.pickSelectedComponent()}pickSelectedComponent(){const e=this.components[this.selected];if(e&&this.options)try{this.options.pickCallback(e)}catch(t){console.error("Pick callback failed",t)}this.close()}highlight(e){let t=(e==null?void 0:e.highlightElement)??(e==null?void 0:e.element);if(this.highlighted!==t)if(t){const o=t.getBoundingClientRect(),i=getComputedStyle(t);this.overlayElement.style.top=`${o.top}px`,this.overlayElement.style.left=`${o.left}px`,this.overlayElement.style.width=`${o.width}px`,this.overlayElement.style.height=`${o.height}px`,this.overlayElement.style.borderRadius=i.borderRadius,document.body.append(this.overlayElement)}else this.overlayElement.remove();this.highlighted=t}};M.styles=[rt,y` + .component-picker-info { + left: 1em; + bottom: 1em; + } + + .component-picker-components-info { + right: 3em; + bottom: 1em; + } + + .component-picker-components-info .selected { + font-weight: bold; + } + `];a([w()],M.prototype,"active",void 0);a([w()],M.prototype,"components",void 0);a([w()],M.prototype,"selected",void 0);a([ee("vaadin-dev-tools-shim")],M.prototype,"shim",void 0);M=a([k("vaadin-dev-tools-component-picker")],M);const bo=Object.freeze(Object.defineProperty({__proto__:null,get ComponentPicker(){return M}},Symbol.toStringTag,{value:"Module"}));class wo{constructor(){this.currentActiveComponent=null,this.currentActiveComponentMetaData=null,this.componentPicked=async(e,t)=>{await this.hideOverlay(),this.currentActiveComponent=e,this.currentActiveComponentMetaData=t},this.showOverlay=()=>{!this.currentActiveComponent||!this.currentActiveComponentMetaData||this.currentActiveComponentMetaData.openOverlay&&this.currentActiveComponentMetaData.openOverlay(this.currentActiveComponent)},this.hideOverlay=()=>{!this.currentActiveComponent||!this.currentActiveComponentMetaData||this.currentActiveComponentMetaData.hideOverlay&&this.currentActiveComponentMetaData.hideOverlay(this.currentActiveComponent)},this.reset=()=>{this.currentActiveComponent=null,this.currentActiveComponentMetaData=null}}}const H=new wo,Xo=s=>{const t=s.element.$.comboBox,o=t.$.overlay;_o(s.element,t,o)},Zo=s=>{const e=s.element,t=e.$.comboBox,o=t.$.overlay;xo(e,t,o)},_o=(s,e,t)=>{s.opened=!0,t._storedModeless=t.modeless,t.modeless=!0,document._themeEditorDocClickListener=Eo(s,e),document.addEventListener("click",document._themeEditorDocClickListener),e.removeEventListener("focusout",e._boundOnFocusout)},xo=(s,e,t)=>{s.opened=!1,!(!e||!t)&&(t.modeless=t._storedModeless,delete t._storedModeless,e.addEventListener("focusout",e._boundOnFocusout),document.removeEventListener("click",document._themeEditorDocClickListener),delete document._themeEditorDocClickListener)},Eo=(s,e)=>t=>{const o=t.target;o!=null&&(e.opened=!ko(o,s))};function ko(s,e){if(!s||!s.tagName)return!0;if(s.tagName.startsWith("VAADIN-DEV"))return!1;let t=s,o={nodeId:-1,uiId:-1,element:void 0};for(;t&&t.parentNode&&(o=we(t),o.nodeId===-1);)t=t.parentElement?t.parentElement:t.parentNode.host;const i=we(e);return!(o.nodeId!==-1&&i.nodeId===o.nodeId)}Te(y` + .vaadin-theme-editor-highlight { + outline: solid 2px #9e2cc6; + outline-offset: 3px; + } +`);let L=class extends T{constructor(){super(...arguments),this.expanded=!1,this.themeEditorState=G.enabled,this.context=null,this.baseTheme=null,this.editedTheme=null,this.effectiveTheme=null,this.markedAsUsed=!1}static get styles(){return y` + :host { + animation: fade-in var(--dev-tools-transition-duration) ease-in; + --theme-editor-section-horizontal-padding: 0.75rem; + display: flex; + flex-direction: column; + max-height: 400px; + } + + .notice { + padding: var(--theme-editor-section-horizontal-padding); + } + + .notice a { + color: var(--dev-tools-text-color-emphasis); + } + + .hint vaadin-icon { + color: var(--dev-tools-green-color); + font-size: var(--lumo-icon-size-m); + } + + .hint { + display: flex; + align-items: center; + gap: var(--theme-editor-section-horizontal-padding); + } + + .header { + flex: 0 0 auto; + border-bottom: solid 1px rgba(0, 0, 0, 0.2); + } + + .header .picker-row { + padding: var(--theme-editor-section-horizontal-padding); + display: flex; + gap: 20px; + align-items: center; + justify-content: space-between; + } + + .picker { + flex: 1 1 0; + min-width: 0; + display: flex; + align-items: center; + } + + .picker button { + min-width: 0; + display: inline-flex; + align-items: center; + padding: 0; + line-height: 20px; + border: none; + background: none; + color: var(--dev-tools-text-color); + } + + .picker button:not(:disabled):hover { + color: var(--dev-tools-text-color-emphasis); + } + + .picker svg, + .picker .component-type { + flex: 0 0 auto; + margin-right: 4px; + } + + .picker .instance-name { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + color: #e5a2fce5; + } + + .picker .instance-name-quote { + color: #e5a2fce5; + } + + .picker .no-selection { + font-style: italic; + } + + .actions { + display: flex; + align-items: center; + gap: 8px; + } + + .property-list { + flex: 1 1 auto; + overflow-y: auto; + } + + .link-button { + all: initial; + font-family: inherit; + font-size: var(--dev-tools-font-size-small); + line-height: 1; + white-space: nowrap; + color: inherit; + font-weight: 600; + text-decoration: underline; + } + + .link-button:focus, + .link-button:hover { + color: var(--dev-tools-text-color-emphasis); + } + + .icon-button { + padding: 0; + line-height: 0; + border: none; + background: none; + color: var(--dev-tools-text-color); + } + + .icon-button:disabled { + opacity: 0.5; + } + + .icon-button:not(:disabled):hover { + color: var(--dev-tools-text-color-emphasis); + } + `}firstUpdated(){this.api=new Nt(this.connection),this.history=new $t(this.api),this.historyActions=this.history.allowedActions,this.undoRedoListener=e=>{var o,i;const t=e.key==="Z"||e.key==="z";t&&(e.ctrlKey||e.metaKey)&&e.shiftKey?(o=this.historyActions)!=null&&o.allowRedo&&this.handleRedo():t&&(e.ctrlKey||e.metaKey)&&(i=this.historyActions)!=null&&i.allowUndo&&this.handleUndo()},document.addEventListener("vaadin-theme-updated",()=>{U.clear(),this.refreshTheme()}),document.addEventListener("keydown",this.undoRedoListener),this.dispatchEvent(new CustomEvent("before-open"))}update(e){var t,o;super.update(e),e.has("expanded")&&(this.expanded?(this.highlightElement((t=this.context)==null?void 0:t.component.element),H.showOverlay()):(H.hideOverlay(),this.removeElementHighlight((o=this.context)==null?void 0:o.component.element)))}disconnectedCallback(){var e;super.disconnectedCallback(),this.removeElementHighlight((e=this.context)==null?void 0:e.component.element),H.hideOverlay(),H.reset(),document.removeEventListener("keydown",this.undoRedoListener),this.dispatchEvent(new CustomEvent("after-close"))}render(){var e,t,o;return this.themeEditorState===G.missing_theme?this.renderMissingThemeNotice():h` +
+
+ ${this.renderPicker()} +
+ ${(e=this.context)!=null&&e.metadata?h` `:null} + + +
+
+ ${this.renderLocalClassNameEditor()} +
+ ${this.renderPropertyList()} + `}renderMissingThemeNotice(){return h` +
+ `}renderPropertyList(){if(!this.context)return null;if(!this.context.metadata){const t=this.context.component.element.localName;return h` +
Styling <${t}> components is not supported at the moment.
+ `}if(this.context.scope===_.local&&!this.context.accessible){const t=this.context.metadata.displayName;return h` + ${this.context.metadata.notAccessibleDescription&&this.context.scope===_.local?h`
+ +
${this.context.metadata.notAccessibleDescription}
+
`:""} +
+ The selected ${t} cannot be styled locally. Currently, Theme Editor only supports styling + instances that are assigned to a local variable, like so: +
Button saveButton = new Button("Save");
+ If you want to modify the code so that it satisfies this requirement, + + to open it in your IDE. Alternatively you can choose to style all ${t}s by selecting "Global" from + the scope dropdown above. +
+ `}return h` ${this.context.metadata.description&&this.context.scope===_.local?h`
+ +
${this.context.metadata.description}
+
`:""} + `}handleShowComponent(){if(!this.context)return;const e=this.context.component,t={nodeId:e.nodeId,uiId:e.uiId};this.connection.sendShowComponentCreateLocation(t)}async handleOpenCss(e){if(!this.context)return;await this.ensureLocalClassName();const t={themeScope:this.context.scope,localClassName:this.context.localClassName},o=j(e.detail.element,t);await this.api.openCss(o)}renderPicker(){var t;let e;if((t=this.context)!=null&&t.metadata){const o=this.context.scope===_.local?this.context.metadata.displayName:`All ${this.context.metadata.displayName}s`,i=h`${o}`,n=this.context.scope===_.local?Rt(this.context.component):null,r=n?h` "${n}"`:null;e=h`${i} ${r}`}else e=h`Pick an element to get started`;return h` +
+ +
+ `}renderLocalClassNameEditor(){var o;const e=((o=this.context)==null?void 0:o.scope)===_.local&&this.context.accessible;if(!this.context||!e)return null;const t=this.context.localClassName||this.context.suggestedClassName;return h` + `}async handleClassNameChange(e){if(!this.context)return;const t=this.context.localClassName,o=e.detail.value;if(t){const i=this.context.component.element;this.context.localClassName=o;const n=await this.api.setLocalClassName(this.context.component,o);this.historyActions=this.history.push(n.requestId,()=>U.previewLocalClassName(i,o),()=>U.previewLocalClassName(i,t))}else this.context={...this.context,suggestedClassName:o}}async pickComponent(){var e;H.hideOverlay(),this.removeElementHighlight((e=this.context)==null?void 0:e.component.element),this.pickerProvider().open({infoTemplate:h` +
+

Locate the component to style

+

Use the mouse cursor to highlight components in the UI.

+

Use arrow down/up to cycle through and highlight specific components under the cursor.

+

Click the primary mouse button to select the component.

+
+ `,pickCallback:async t=>{var i;const o=await Ct.getMetadata(t);if(!o){this.context={component:t,scope:((i=this.context)==null?void 0:i.scope)||_.local},this.baseTheme=null,this.editedTheme=null,this.effectiveTheme=null;return}await H.componentPicked(t,o),this.highlightElement(t.element),this.refreshComponentAndTheme(t,o),H.showOverlay()}})}handleScopeChange(e){this.context&&this.refreshTheme({...this.context,scope:e.detail.value})}async handlePropertyChange(e){if(!this.context||!this.baseTheme||!this.editedTheme)return;const{element:t,property:o,value:i}=e.detail;this.editedTheme.updatePropertyValue(t.selector,o.propertyName,i,!0),this.effectiveTheme=V.combine(this.baseTheme,this.editedTheme),await this.ensureLocalClassName();const n={themeScope:this.context.scope,localClassName:this.context.localClassName},r=St(t,n,o.propertyName,i);try{const l=await this.api.setCssRules([r]);this.historyActions=this.history.push(l.requestId);const c=Tt(r);U.add(c)}catch(l){console.error("Failed to update property value",l)}}async handleUndo(){this.historyActions=await this.history.undo(),await this.refreshComponentAndTheme()}async handleRedo(){this.historyActions=await this.history.redo(),await this.refreshComponentAndTheme()}async ensureLocalClassName(){if(!this.context||this.context.scope===_.global||this.context.localClassName)return;if(!this.context.localClassName&&!this.context.suggestedClassName)throw new Error("Cannot assign local class name for the component because it does not have a suggested class name");const e=this.context.component.element,t=this.context.suggestedClassName;this.context.localClassName=t;const o=await this.api.setLocalClassName(this.context.component,t);this.historyActions=this.history.push(o.requestId,()=>U.previewLocalClassName(e,t),()=>U.previewLocalClassName(e))}async refreshComponentAndTheme(e,t){var i,n,r;if(e=e||((i=this.context)==null?void 0:i.component),t=t||((n=this.context)==null?void 0:n.metadata),!e||!t)return;const o=await this.api.loadComponentMetadata(e);this.markedAsUsed||this.api.markAsUsed().then(()=>{this.markedAsUsed=!0}),U.previewLocalClassName(e.element,o.className),await this.refreshTheme({scope:((r=this.context)==null?void 0:r.scope)||_.local,metadata:t,component:e,localClassName:o.className,suggestedClassName:o.suggestedClassName,accessible:o.accessible})}async refreshTheme(e){const t=e||this.context;if(!t||!t.metadata)return;if(t.scope===_.local&&!t.accessible){this.context=t,this.baseTheme=null,this.editedTheme=null,this.effectiveTheme=null;return}let i=new V(t.metadata);if(!(t.scope===_.local&&!t.localClassName)){const l={themeScope:t.scope,localClassName:t.localClassName},c=t.metadata.elements.map(g=>j(g,l)),p=await this.api.loadRules(c);i=V.fromServerRules(t.metadata,l,p.rules)}const r=await At(t.metadata);this.context=t,this.baseTheme=r,this.editedTheme=i,this.effectiveTheme=V.combine(r,this.editedTheme)}highlightElement(e){e&&e.classList.add("vaadin-theme-editor-highlight")}removeElementHighlight(e){e&&e.classList.remove("vaadin-theme-editor-highlight")}};a([v({})],L.prototype,"expanded",void 0);a([v({})],L.prototype,"themeEditorState",void 0);a([v({})],L.prototype,"pickerProvider",void 0);a([v({})],L.prototype,"connection",void 0);a([w()],L.prototype,"historyActions",void 0);a([w()],L.prototype,"context",void 0);a([w()],L.prototype,"effectiveTheme",void 0);L=a([k("vaadin-dev-tools-theme-editor")],L);const Ie=1e3,Ne=(s,e)=>{const t=Array.from(s.querySelectorAll(e.join(", "))),o=Array.from(s.querySelectorAll("*")).filter(i=>i.shadowRoot).flatMap(i=>Ne(i.shadowRoot,e));return[...t,...o]};let Je=!1;const Q=(s,e)=>{Je||(window.addEventListener("message",i=>{i.data==="validate-license"&&window.location.reload()},!1),Je=!0);const t=s._overlayElement;if(t){if(t.shadowRoot){const i=t.shadowRoot.querySelector("slot:not([name])");if(i&&i.assignedElements().length>0){Q(i.assignedElements()[0],e);return}}Q(t,e);return}const o=e.messageHtml?e.messageHtml:`${e.message}

Component: ${e.product.name} ${e.product.version}

`.replace(/https:([^ ]*)/g,"https:$1");s.isConnected&&(s.outerHTML=`
${o}
`)},Y={},Xe={},K={},at={},$=s=>`${s.name}_${s.version}`,Ze=s=>{const{cvdlName:e,version:t}=s.constructor,o={name:e,version:t},i=s.tagName.toLowerCase();Y[e]=Y[e]??[],Y[e].push(i);const n=K[$(o)];n&&setTimeout(()=>Q(s,n),Ie),K[$(o)]||at[$(o)]||Xe[$(o)]||(Xe[$(o)]=!0,window.Vaadin.devTools.checkLicense(o))},Co=s=>{at[$(s)]=!0,console.debug("License check ok for",s)},lt=s=>{const e=s.product.name;K[$(s.product)]=s,console.error("License check failed for",e);const t=Y[e];(t==null?void 0:t.length)>0&&Ne(document,t).forEach(o=>{setTimeout(()=>Q(o,K[$(s.product)]),Ie)})},So=s=>{const e=s.message,t=s.product.name;s.messageHtml=`No license found. Go here to start a trial or retrieve your license.`,K[$(s.product)]=s,console.error("No license found when checking",t);const o=Y[t];(o==null?void 0:o.length)>0&&Ne(document,o).forEach(i=>{setTimeout(()=>Q(i,K[$(s.product)]),Ie)})},To=()=>{window.Vaadin.devTools.createdCvdlElements.forEach(s=>{Ze(s)}),window.Vaadin.devTools.createdCvdlElements={push:s=>{Ze(s)}}};var m;(function(s){s.ACTIVE="active",s.INACTIVE="inactive",s.UNAVAILABLE="unavailable",s.ERROR="error"})(m||(m={}));class F extends Object{constructor(e){super(),this.status=m.UNAVAILABLE,e&&(this.webSocket=new WebSocket(e),this.webSocket.onmessage=t=>this.handleMessage(t),this.webSocket.onerror=t=>this.handleError(t),this.webSocket.onclose=t=>{this.status!==m.ERROR&&this.setStatus(m.UNAVAILABLE),this.webSocket=void 0}),setInterval(()=>{this.webSocket&&self.status!==m.ERROR&&this.status!==m.UNAVAILABLE&&this.webSocket.send("")},F.HEARTBEAT_INTERVAL)}onHandshake(){}onReload(){}onUpdate(e,t){}onConnectionError(e){}onStatusChange(e){}onMessage(e){console.error("Unknown message received from the live reload server:",e)}handleMessage(e){let t;if(e.data!=="X"){try{t=JSON.parse(e.data)}catch(o){this.handleError(`[${o.name}: ${o.message}`);return}t.command==="hello"?(this.setStatus(m.ACTIVE),this.onHandshake()):t.command==="reload"?this.status===m.ACTIVE&&this.onReload():t.command==="update"?this.status===m.ACTIVE&&this.onUpdate(t.path,t.content):t.command==="license-check-ok"?Co(t.data):t.command==="license-check-failed"?lt(t.data):t.command==="license-check-nokey"?So(t.data):this.onMessage(t)}}handleError(e){console.error(e),this.setStatus(m.ERROR),e instanceof Event&&this.webSocket?this.onConnectionError(`Error in WebSocket connection to ${this.webSocket.url}`):this.onConnectionError(e)}setActive(e){!e&&this.status===m.ACTIVE?this.setStatus(m.INACTIVE):e&&this.status===m.INACTIVE&&this.setStatus(m.ACTIVE)}setStatus(e){this.status!==e&&(this.status=e,this.onStatusChange(e))}send(e,t){const o=JSON.stringify({command:e,data:t});this.webSocket?this.webSocket.readyState!==WebSocket.OPEN?this.webSocket.addEventListener("open",()=>this.webSocket.send(o)):this.webSocket.send(o):console.error(`Unable to send message ${e}. No websocket is available`)}setFeature(e,t){this.send("setFeature",{featureId:e,enabled:t})}sendTelemetry(e){this.send("reportTelemetry",{browserData:e})}sendLicenseCheck(e){this.send("checkLicense",e)}sendShowComponentCreateLocation(e){this.send("showComponentCreateLocation",e)}sendShowComponentAttachLocation(e){this.send("showComponentAttachLocation",e)}}F.HEARTBEAT_INTERVAL=18e4;let Ce=class extends T{createRenderRoot(){return this}activate(){this._devTools.unreadErrors=!1,this.updateComplete.then(()=>{const e=this.renderRoot.querySelector(".message-tray .message:last-child");e&&e.scrollIntoView()})}render(){return h`
+ ${this._devTools.messages.map(e=>this._devTools.renderMessage(e))} +
`}};a([v({type:Object})],Ce.prototype,"_devTools",void 0);Ce=a([k("vaadin-dev-tools-log")],Ce);var Ao=function(){var s=document.getSelection();if(!s.rangeCount)return function(){};for(var e=document.activeElement,t=[],o=0;o"u"){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var x=Qe[e.format]||Qe.default;window.clipboardData.setData(x,s)}else g.clipboardData.clearData(),g.clipboardData.setData(e.format,s);e.onCopy&&(g.preventDefault(),e.onCopy(g.clipboardData))}),document.body.appendChild(l),n.selectNodeContents(l),r.addRange(n);var p=document.execCommand("copy");if(!p)throw new Error("copy command was unsuccessful");c=!0}catch(g){t&&console.error("unable to copy using execCommand: ",g),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",s),e.onCopy&&e.onCopy(window.clipboardData),c=!0}catch(x){t&&console.error("unable to copy using clipboardData: ",x),t&&console.error("falling back to prompt"),o=Io("message"in e?e.message:Ro),window.prompt(o,s)}}finally{r&&(typeof r.removeRange=="function"?r.removeRange(n):r.removeAllRanges()),l&&document.body.removeChild(l),i()}return c}let ue=class extends T{constructor(){super(...arguments),this.serverInfo={versions:[]}}createRenderRoot(){return this}render(){return h`
+ +
+ ${this.serverInfo.versions.map(e=>h` +
${e.name}
+
${e.version}
+ `)} +
Browser
+
${navigator.userAgent}
+
+ Live reload + +
+
+ Java ${this._devTools.javaStatus} + ${this._devTools.backend?`(${u.BACKEND_DISPLAY_NAME[this._devTools.backend]})`:""} +
+
+ Front end ${this._devTools.frontendStatus} +
+
+
`}handleMessage(e){return(e==null?void 0:e.command)==="serverInfo"?(this.serverInfo=e.data,!0):!1}copyInfoToClipboard(){const e=this.renderRoot.querySelectorAll(".info-tray dt, .info-tray dd"),t=Array.from(e).map(o=>(o.localName==="dd"?": ":` +`)+o.textContent.trim()).join("").replace(/^\n/,"");No(t),this._devTools.showNotification(S.INFORMATION,"Environment information copied to clipboard",void 0,void 0,"versionInfoCopied")}};a([v({type:Object})],ue.prototype,"_devTools",void 0);a([w()],ue.prototype,"serverInfo",void 0);ue=a([k("vaadin-dev-tools-info")],ue);var f,S;(function(s){s.LOG="log",s.INFORMATION="information",s.WARNING="warning",s.ERROR="error"})(S||(S={}));let u=f=class extends T{static get styles(){return[y` + :host { + --dev-tools-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, + 'Helvetica Neue', sans-serif; + --dev-tools-font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', + monospace; + + --dev-tools-font-size: 0.8125rem; + --dev-tools-font-size-small: 0.75rem; + + --dev-tools-text-color: rgba(255, 255, 255, 0.8); + --dev-tools-text-color-secondary: rgba(255, 255, 255, 0.65); + --dev-tools-text-color-emphasis: rgba(255, 255, 255, 0.95); + --dev-tools-text-color-active: rgba(255, 255, 255, 1); + + --dev-tools-background-color-inactive: rgba(45, 45, 45, 0.25); + --dev-tools-background-color-active: rgba(45, 45, 45, 0.98); + --dev-tools-background-color-active-blurred: rgba(45, 45, 45, 0.85); + + --dev-tools-border-radius: 0.5rem; + --dev-tools-box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 4px 12px -2px rgba(0, 0, 0, 0.4); + + --dev-tools-blue-hsl: 206, 100%, 70%; + --dev-tools-blue-color: hsl(var(--dev-tools-blue-hsl)); + --dev-tools-green-hsl: 145, 80%, 42%; + --dev-tools-green-color: hsl(var(--dev-tools-green-hsl)); + --dev-tools-grey-hsl: 0, 0%, 50%; + --dev-tools-grey-color: hsl(var(--dev-tools-grey-hsl)); + --dev-tools-yellow-hsl: 38, 98%, 64%; + --dev-tools-yellow-color: hsl(var(--dev-tools-yellow-hsl)); + --dev-tools-red-hsl: 355, 100%, 68%; + --dev-tools-red-color: hsl(var(--dev-tools-red-hsl)); + + /* Needs to be in ms, used in JavaScript as well */ + --dev-tools-transition-duration: 180ms; + + all: initial; + + direction: ltr; + cursor: default; + font: normal 400 var(--dev-tools-font-size) / 1.125rem var(--dev-tools-font-family); + color: var(--dev-tools-text-color); + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + color-scheme: dark; + + position: fixed; + z-index: 20000; + pointer-events: none; + bottom: 0; + right: 0; + width: 100%; + height: 100%; + display: flex; + flex-direction: column-reverse; + align-items: flex-end; + } + + .dev-tools { + pointer-events: auto; + display: flex; + align-items: center; + position: fixed; + z-index: inherit; + right: 0.5rem; + bottom: 0.5rem; + min-width: 1.75rem; + height: 1.75rem; + max-width: 1.75rem; + border-radius: 0.5rem; + padding: 0.375rem; + box-sizing: border-box; + background-color: var(--dev-tools-background-color-inactive); + box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05); + color: var(--dev-tools-text-color); + transition: var(--dev-tools-transition-duration); + white-space: nowrap; + line-height: 1rem; + } + + .dev-tools:hover, + .dev-tools.active { + background-color: var(--dev-tools-background-color-active); + box-shadow: var(--dev-tools-box-shadow); + } + + .dev-tools.active { + max-width: calc(100% - 1rem); + } + + .dev-tools .dev-tools-icon { + flex: none; + pointer-events: none; + display: inline-block; + width: 1rem; + height: 1rem; + fill: #fff; + transition: var(--dev-tools-transition-duration); + margin: 0; + } + + .dev-tools.active .dev-tools-icon { + opacity: 0; + position: absolute; + transform: scale(0.5); + } + + .dev-tools .status-blip { + flex: none; + display: block; + width: 6px; + height: 6px; + border-radius: 50%; + z-index: 20001; + background: var(--dev-tools-grey-color); + position: absolute; + top: -1px; + right: -1px; + } + + .dev-tools .status-description { + overflow: hidden; + text-overflow: ellipsis; + padding: 0 0.25rem; + } + + .dev-tools.error { + background-color: hsla(var(--dev-tools-red-hsl), 0.15); + animation: bounce 0.5s; + animation-iteration-count: 2; + } + + .switch { + display: inline-flex; + align-items: center; + } + + .switch input { + opacity: 0; + width: 0; + height: 0; + position: absolute; + } + + .switch .slider { + display: block; + flex: none; + width: 28px; + height: 18px; + border-radius: 9px; + background-color: rgba(255, 255, 255, 0.3); + transition: var(--dev-tools-transition-duration); + margin-right: 0.5rem; + } + + .switch:focus-within .slider, + .switch .slider:hover { + background-color: rgba(255, 255, 255, 0.35); + transition: none; + } + + .switch input:focus-visible ~ .slider { + box-shadow: 0 0 0 2px var(--dev-tools-background-color-active), 0 0 0 4px var(--dev-tools-blue-color); + } + + .switch .slider::before { + content: ''; + display: block; + margin: 2px; + width: 14px; + height: 14px; + background-color: #fff; + transition: var(--dev-tools-transition-duration); + border-radius: 50%; + } + + .switch input:checked + .slider { + background-color: var(--dev-tools-green-color); + } + + .switch input:checked + .slider::before { + transform: translateX(10px); + } + + .switch input:disabled + .slider::before { + background-color: var(--dev-tools-grey-color); + } + + .window.hidden { + opacity: 0; + transform: scale(0); + position: absolute; + } + + .window.visible { + transform: none; + opacity: 1; + pointer-events: auto; + } + + .window.visible ~ .dev-tools { + opacity: 0; + pointer-events: none; + } + + .window.visible ~ .dev-tools .dev-tools-icon, + .window.visible ~ .dev-tools .status-blip { + transition: none; + opacity: 0; + } + + .window { + border-radius: var(--dev-tools-border-radius); + overflow: auto; + margin: 0.5rem; + min-width: 30rem; + max-width: calc(100% - 1rem); + max-height: calc(100vh - 1rem); + flex-shrink: 1; + background-color: var(--dev-tools-background-color-active); + color: var(--dev-tools-text-color); + transition: var(--dev-tools-transition-duration); + transform-origin: bottom right; + display: flex; + flex-direction: column; + box-shadow: var(--dev-tools-box-shadow); + outline: none; + } + + .window-toolbar { + display: flex; + flex: none; + align-items: center; + padding: 0.375rem; + white-space: nowrap; + order: 1; + background-color: rgba(0, 0, 0, 0.2); + gap: 0.5rem; + } + + .tab { + color: var(--dev-tools-text-color-secondary); + font: inherit; + font-size: var(--dev-tools-font-size-small); + font-weight: 500; + line-height: 1; + padding: 0.25rem 0.375rem; + background: none; + border: none; + margin: 0; + border-radius: 0.25rem; + transition: var(--dev-tools-transition-duration); + } + + .tab:hover, + .tab.active { + color: var(--dev-tools-text-color-active); + } + + .tab.active { + background-color: rgba(255, 255, 255, 0.12); + } + + .tab.unreadErrors::after { + content: '•'; + color: hsl(var(--dev-tools-red-hsl)); + font-size: 1.5rem; + position: absolute; + transform: translate(0, -50%); + } + + .ahreflike { + font-weight: 500; + color: var(--dev-tools-text-color-secondary); + text-decoration: underline; + cursor: pointer; + } + + .ahreflike:hover { + color: var(--dev-tools-text-color-emphasis); + } + + .button { + all: initial; + font-family: inherit; + font-size: var(--dev-tools-font-size-small); + line-height: 1; + white-space: nowrap; + background-color: rgba(0, 0, 0, 0.2); + color: inherit; + font-weight: 600; + padding: 0.25rem 0.375rem; + border-radius: 0.25rem; + } + + .button:focus, + .button:hover { + color: var(--dev-tools-text-color-emphasis); + } + + .minimize-button { + flex: none; + width: 1rem; + height: 1rem; + color: inherit; + background-color: transparent; + border: 0; + padding: 0; + margin: 0 0 0 auto; + opacity: 0.8; + } + + .minimize-button:hover { + opacity: 1; + } + + .minimize-button svg { + max-width: 100%; + } + + .message.information { + --dev-tools-notification-color: var(--dev-tools-blue-color); + } + + .message.warning { + --dev-tools-notification-color: var(--dev-tools-yellow-color); + } + + .message.error { + --dev-tools-notification-color: var(--dev-tools-red-color); + } + + .message { + display: flex; + padding: 0.1875rem 0.75rem 0.1875rem 2rem; + background-clip: padding-box; + } + + .message.log { + padding-left: 0.75rem; + } + + .message-content { + margin-right: 0.5rem; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; + } + + .message-heading { + position: relative; + display: flex; + align-items: center; + margin: 0.125rem 0; + } + + .message.log { + color: var(--dev-tools-text-color-secondary); + } + + .message:not(.log) .message-heading { + font-weight: 500; + } + + .message.has-details .message-heading { + color: var(--dev-tools-text-color-emphasis); + font-weight: 600; + } + + .message-heading::before { + position: absolute; + margin-left: -1.5rem; + display: inline-block; + text-align: center; + font-size: 0.875em; + font-weight: 600; + line-height: calc(1.25em - 2px); + width: 14px; + height: 14px; + box-sizing: border-box; + border: 1px solid transparent; + border-radius: 50%; + } + + .message.information .message-heading::before { + content: 'i'; + border-color: currentColor; + color: var(--dev-tools-notification-color); + } + + .message.warning .message-heading::before, + .message.error .message-heading::before { + content: '!'; + color: var(--dev-tools-background-color-active); + background-color: var(--dev-tools-notification-color); + } + + .features-tray { + padding: 0.75rem; + flex: auto; + overflow: auto; + animation: fade-in var(--dev-tools-transition-duration) ease-in; + user-select: text; + } + + .features-tray p { + margin-top: 0; + color: var(--dev-tools-text-color-secondary); + } + + .features-tray .feature { + display: flex; + align-items: center; + gap: 1rem; + padding-bottom: 0.5em; + } + + .message .message-details { + font-weight: 400; + color: var(--dev-tools-text-color-secondary); + margin: 0.25rem 0; + } + + .message .message-details[hidden] { + display: none; + } + + .message .message-details p { + display: inline; + margin: 0; + margin-right: 0.375em; + word-break: break-word; + } + + .message .persist { + color: var(--dev-tools-text-color-secondary); + white-space: nowrap; + margin: 0.375rem 0; + display: flex; + align-items: center; + position: relative; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + } + + .message .persist::before { + content: ''; + width: 1em; + height: 1em; + border-radius: 0.2em; + margin-right: 0.375em; + background-color: rgba(255, 255, 255, 0.3); + } + + .message .persist:hover::before { + background-color: rgba(255, 255, 255, 0.4); + } + + .message .persist.on::before { + background-color: rgba(255, 255, 255, 0.9); + } + + .message .persist.on::after { + content: ''; + order: -1; + position: absolute; + width: 0.75em; + height: 0.25em; + border: 2px solid var(--dev-tools-background-color-active); + border-width: 0 0 2px 2px; + transform: translate(0.05em, -0.05em) rotate(-45deg) scale(0.8, 0.9); + } + + .message .dismiss-message { + font-weight: 600; + align-self: stretch; + display: flex; + align-items: center; + padding: 0 0.25rem; + margin-left: 0.5rem; + color: var(--dev-tools-text-color-secondary); + } + + .message .dismiss-message:hover { + color: var(--dev-tools-text-color); + } + + .notification-tray { + display: flex; + flex-direction: column-reverse; + align-items: flex-end; + margin: 0.5rem; + flex: none; + } + + .window.hidden + .notification-tray { + margin-bottom: 3rem; + } + + .notification-tray .message { + pointer-events: auto; + background-color: var(--dev-tools-background-color-active); + color: var(--dev-tools-text-color); + max-width: 30rem; + box-sizing: border-box; + border-radius: var(--dev-tools-border-radius); + margin-top: 0.5rem; + transition: var(--dev-tools-transition-duration); + transform-origin: bottom right; + animation: slideIn var(--dev-tools-transition-duration); + box-shadow: var(--dev-tools-box-shadow); + padding-top: 0.25rem; + padding-bottom: 0.25rem; + } + + .notification-tray .message.animate-out { + animation: slideOut forwards var(--dev-tools-transition-duration); + } + + .notification-tray .message .message-details { + max-height: 10em; + overflow: hidden; + } + + .message-tray { + flex: auto; + overflow: auto; + max-height: 20rem; + user-select: text; + } + + .message-tray .message { + animation: fade-in var(--dev-tools-transition-duration) ease-in; + padding-left: 2.25rem; + } + + .message-tray .message.warning { + background-color: hsla(var(--dev-tools-yellow-hsl), 0.09); + } + + .message-tray .message.error { + background-color: hsla(var(--dev-tools-red-hsl), 0.09); + } + + .message-tray .message.error .message-heading { + color: hsl(var(--dev-tools-red-hsl)); + } + + .message-tray .message.warning .message-heading { + color: hsl(var(--dev-tools-yellow-hsl)); + } + + .message-tray .message + .message { + border-top: 1px solid rgba(255, 255, 255, 0.07); + } + + .message-tray .dismiss-message, + .message-tray .persist { + display: none; + } + + .info-tray { + padding: 0.75rem; + position: relative; + flex: auto; + overflow: auto; + animation: fade-in var(--dev-tools-transition-duration) ease-in; + user-select: text; + } + + .info-tray dl { + margin: 0; + display: grid; + grid-template-columns: max-content 1fr; + column-gap: 0.75rem; + position: relative; + } + + .info-tray dt { + grid-column: 1; + color: var(--dev-tools-text-color-emphasis); + } + + .info-tray dt:not(:first-child)::before { + content: ''; + width: 100%; + position: absolute; + height: 1px; + background-color: rgba(255, 255, 255, 0.1); + margin-top: -0.375rem; + } + + .info-tray dd { + grid-column: 2; + margin: 0; + } + + .info-tray :is(dt, dd):not(:last-child) { + margin-bottom: 0.75rem; + } + + .info-tray dd + dd { + margin-top: -0.5rem; + } + + .info-tray .live-reload-status::before { + content: '•'; + color: var(--status-color); + width: 0.75rem; + display: inline-block; + font-size: 1rem; + line-height: 0.5rem; + } + + .info-tray .copy { + position: fixed; + z-index: 1; + top: 0.5rem; + right: 0.5rem; + } + + .info-tray .switch { + vertical-align: -4px; + } + + @keyframes slideIn { + from { + transform: translateX(100%); + opacity: 0; + } + to { + transform: translateX(0%); + opacity: 1; + } + } + + @keyframes slideOut { + from { + transform: translateX(0%); + opacity: 1; + } + to { + transform: translateX(100%); + opacity: 0; + } + } + + @keyframes fade-in { + 0% { + opacity: 0; + } + } + + @keyframes bounce { + 0% { + transform: scale(0.8); + } + 50% { + transform: scale(1.5); + background-color: hsla(var(--dev-tools-red-hsl), 1); + } + 100% { + transform: scale(1); + } + } + + @supports (backdrop-filter: blur(1px)) { + .dev-tools, + .window, + .notification-tray .message { + backdrop-filter: blur(8px); + } + .dev-tools:hover, + .dev-tools.active, + .window, + .notification-tray .message { + background-color: var(--dev-tools-background-color-active-blurred); + } + } + `,rt]}static get isActive(){const e=window.sessionStorage.getItem(f.ACTIVE_KEY_IN_SESSION_STORAGE);return e===null||e!=="false"}static notificationDismissed(e){const t=window.localStorage.getItem(f.DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE);return t!==null&&t.includes(e)}elementTelemetry(){let e={};try{const t=localStorage.getItem("vaadin.statistics.basket");if(!t)return;e=JSON.parse(t)}catch{return}this.frontendConnection&&this.frontendConnection.sendTelemetry(e)}openWebSocketConnection(){this.frontendStatus=m.UNAVAILABLE,this.javaStatus=m.UNAVAILABLE;const e=c=>this.log(S.ERROR,c),t=()=>{this.showSplashMessage("Reloading…");const c=window.sessionStorage.getItem(f.TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE),p=c?parseInt(c,10)+1:1;window.sessionStorage.setItem(f.TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE,p.toString()),window.sessionStorage.setItem(f.TRIGGERED_KEY_IN_SESSION_STORAGE,"true"),window.location.reload()},o=(c,p)=>{let g=document.head.querySelector(`style[data-file-path='${c}']`);g?(this.log(S.INFORMATION,"Hot update of "+c),g.textContent=p,document.dispatchEvent(new CustomEvent("vaadin-theme-updated"))):t()},i=new F(this.getDedicatedWebSocketUrl());i.onHandshake=()=>{this.log(S.LOG,"Vaadin development mode initialized"),f.isActive||i.setActive(!1),this.elementTelemetry()},i.onConnectionError=e,i.onReload=t,i.onUpdate=o,i.onStatusChange=c=>{this.frontendStatus=c},i.onMessage=c=>this.handleFrontendMessage(c),this.frontendConnection=i;let n;this.backend===f.SPRING_BOOT_DEVTOOLS&&this.springBootLiveReloadPort?(n=new F(this.getSpringBootWebSocketUrl(window.location)),n.onHandshake=()=>{f.isActive||n.setActive(!1)},n.onReload=t,n.onConnectionError=e):this.backend===f.JREBEL||this.backend===f.HOTSWAP_AGENT?n=i:n=new F(void 0);const r=n.onStatusChange;n.onStatusChange=c=>{r(c),this.javaStatus=c};const l=n.onHandshake;n.onHandshake=()=>{l(),this.backend&&this.log(S.INFORMATION,`Java live reload available: ${f.BACKEND_DISPLAY_NAME[this.backend]}`)},this.javaConnection=n,this.backend||this.showNotification(S.WARNING,"Java live reload unavailable","Live reload for Java changes is currently not set up. Find out how to make use of this functionality to boost your workflow.","https://vaadin.com/docs/latest/flow/configuration/live-reload","liveReloadUnavailable")}tabHandleMessage(e,t){const o=e;return o.handleMessage&&o.handleMessage.call(e,t)}handleFrontendMessage(e){for(const t of this.tabs)if(t.element&&this.tabHandleMessage(t.element,e))return;if((e==null?void 0:e.command)==="featureFlags")this.features=e.data.features;else if((e==null?void 0:e.command)==="themeEditorState"){const t=!!window.Vaadin.Flow;this.themeEditorState=e.data,t&&this.themeEditorState!==G.disabled&&(this.tabs.push({id:"theme-editor",title:"Theme Editor (Preview)",render:()=>this.renderThemeEditor()}),this.requestUpdate())}else this.unhandledMessages.push(e)}getDedicatedWebSocketUrl(){function e(o){const i=document.createElement("div");return i.innerHTML=``,i.firstChild.href}if(this.url===void 0)return;const t=e(this.url);if(!t.startsWith("http://")&&!t.startsWith("https://")){console.error("The protocol of the url should be http or https for live reload to work.");return}return`${t.replace(/^http/,"ws")}?v-r=push&debug_window`}getSpringBootWebSocketUrl(e){const{hostname:t}=e,o=e.protocol==="https:"?"wss":"ws";if(t.endsWith("gitpod.io")){const i=t.replace(/.*?-/,"");return`${o}://${this.springBootLiveReloadPort}-${i}`}else return`${o}://${t}:${this.springBootLiveReloadPort}`}constructor(){super(),this.unhandledMessages=[],this.expanded=!1,this.messages=[],this.notifications=[],this.frontendStatus=m.UNAVAILABLE,this.javaStatus=m.UNAVAILABLE,this.tabs=[{id:"log",title:"Log",render:"vaadin-dev-tools-log"},{id:"info",title:"Info",render:"vaadin-dev-tools-info"},{id:"features",title:"Feature Flags",render:()=>this.renderFeatures()}],this.activeTab="log",this.features=[],this.unreadErrors=!1,this.componentPickActive=!1,this.themeEditorState=G.disabled,this.nextMessageId=1,this.transitionDuration=0,window.Vaadin.Flow&&this.tabs.push({id:"code",title:"Code",render:()=>this.renderCode()})}connectedCallback(){if(super.connectedCallback(),this.catchErrors(),this.disableEventListener=i=>this.demoteSplashMessage(),document.body.addEventListener("focus",this.disableEventListener),document.body.addEventListener("click",this.disableEventListener),window.sessionStorage.getItem(f.TRIGGERED_KEY_IN_SESSION_STORAGE)){const i=new Date,n=`${`0${i.getHours()}`.slice(-2)}:${`0${i.getMinutes()}`.slice(-2)}:${`0${i.getSeconds()}`.slice(-2)}`;this.showSplashMessage(`Page reloaded at ${n}`),window.sessionStorage.removeItem(f.TRIGGERED_KEY_IN_SESSION_STORAGE)}this.transitionDuration=parseInt(window.getComputedStyle(this).getPropertyValue("--dev-tools-transition-duration"),10);const t=window;t.Vaadin=t.Vaadin||{},t.Vaadin.devTools=Object.assign(this,t.Vaadin.devTools),document.documentElement.addEventListener("vaadin-overlay-outside-click",i=>{const n=i,r=n.target.owner;if(r?vt(this,r):!1)return;n.detail.sourceEvent.composedPath().includes(this)&&i.preventDefault()});const o=window.Vaadin;o.devToolsPlugins&&(Array.from(o.devToolsPlugins).forEach(i=>this.initPlugin(i)),o.devToolsPlugins={push:i=>this.initPlugin(i)}),this.openWebSocketConnection(),To()}async initPlugin(e){const t=this;e.init({addTab:(o,i)=>{t.tabs.push({id:o,title:o,render:i})},send:function(o,i){t.frontendConnection.send(o,i)}})}format(e){return e.toString()}catchErrors(){const e=window.Vaadin.ConsoleErrors;e&&e.forEach(t=>{this.log(S.ERROR,t.map(o=>this.format(o)).join(" "))}),window.Vaadin.ConsoleErrors={push:t=>{this.log(S.ERROR,t.map(o=>this.format(o)).join(" "))}}}disconnectedCallback(){this.disableEventListener&&(document.body.removeEventListener("focus",this.disableEventListener),document.body.removeEventListener("click",this.disableEventListener)),super.disconnectedCallback()}toggleExpanded(){this.notifications.slice().forEach(e=>this.dismissNotification(e.id)),this.expanded=!this.expanded,this.expanded&&this.root.focus()}showSplashMessage(e){this.splashMessage=e,this.splashMessage&&(this.expanded?this.demoteSplashMessage():setTimeout(()=>{this.demoteSplashMessage()},f.AUTO_DEMOTE_NOTIFICATION_DELAY))}demoteSplashMessage(){this.splashMessage&&this.log(S.LOG,this.splashMessage),this.showSplashMessage(void 0)}checkLicense(e){this.frontendConnection?this.frontendConnection.sendLicenseCheck(e):lt({message:"Internal error: no connection",product:e})}log(e,t,o,i){const n=this.nextMessageId;for(this.nextMessageId+=1,this.messages.push({id:n,type:e,message:t,details:o,link:i,dontShowAgain:!1,deleted:!1});this.messages.length>f.MAX_LOG_ROWS;)this.messages.shift();this.requestUpdate(),this.updateComplete.then(()=>{const r=this.renderRoot.querySelector(".message-tray .message:last-child");this.expanded&&r?(setTimeout(()=>r.scrollIntoView({behavior:"smooth"}),this.transitionDuration),this.unreadErrors=!1):e===S.ERROR&&(this.unreadErrors=!0)})}showNotification(e,t,o,i,n){if(n===void 0||!f.notificationDismissed(n)){if(this.notifications.filter(c=>c.persistentId===n).filter(c=>!c.deleted).length>0)return;const l=this.nextMessageId;this.nextMessageId+=1,this.notifications.push({id:l,type:e,message:t,details:o,link:i,persistentId:n,dontShowAgain:!1,deleted:!1}),i===void 0&&setTimeout(()=>{this.dismissNotification(l)},f.AUTO_DEMOTE_NOTIFICATION_DELAY),this.requestUpdate()}else this.log(e,t,o,i)}dismissNotification(e){const t=this.findNotificationIndex(e);if(t!==-1&&!this.notifications[t].deleted){const o=this.notifications[t];if(o.dontShowAgain&&o.persistentId&&!f.notificationDismissed(o.persistentId)){let i=window.localStorage.getItem(f.DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE);i=i===null?o.persistentId:`${i},${o.persistentId}`,window.localStorage.setItem(f.DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE,i)}o.deleted=!0,this.log(o.type,o.message,o.details,o.link),setTimeout(()=>{const i=this.findNotificationIndex(e);i!==-1&&(this.notifications.splice(i,1),this.requestUpdate())},this.transitionDuration)}}findNotificationIndex(e){let t=-1;return this.notifications.some((o,i)=>o.id===e?(t=i,!0):!1),t}toggleDontShowAgain(e){const t=this.findNotificationIndex(e);if(t!==-1&&!this.notifications[t].deleted){const o=this.notifications[t];o.dontShowAgain=!o.dontShowAgain,this.requestUpdate()}}setActive(e){var t,o;(t=this.frontendConnection)==null||t.setActive(e),(o=this.javaConnection)==null||o.setActive(e),window.sessionStorage.setItem(f.ACTIVE_KEY_IN_SESSION_STORAGE,e?"true":"false")}getStatusColor(e){return e===m.ACTIVE?"var(--dev-tools-green-color)":e===m.INACTIVE?"var(--dev-tools-grey-color)":e===m.UNAVAILABLE?"var(--dev-tools-yellow-hsl)":e===m.ERROR?"var(--dev-tools-red-color)":"none"}renderMessage(e){return h` +
+
+
${e.message}
+
+ ${e.persistentId?h`
this.toggleDontShowAgain(e.id)} + > + Don’t show again +
`:""} +
+
this.dismissNotification(e.id)}>Dismiss
+
+ `}render(){return h`
e.key==="Escape"&&this.expanded&&this.toggleExpanded()} + > +
+ ${this.tabs.map(e=>h` `)} + +
+
+
+ +
${this.notifications.map(e=>this.renderMessage(e))}
+ {this.componentPickActive=!0}} + @component-picker-closed=${()=>{this.componentPickActive=!1}} + > +
this.toggleExpanded()} + > + ${this.unreadErrors?h` + + + + + + `:h``} + + + ${this.splashMessage?h`${this.splashMessage}
`:dt} + `}updated(e){var n;super.updated(e);const t=this.renderRoot.querySelector("#tabContainer"),o=[];if(this.tabs.forEach(r=>{r.element||(typeof r.render=="function"?r.element=document.createElement("div"):(r.element=document.createElement(r.render),r.element._devTools=this),o.push(r.element))}),(t==null?void 0:t.childElementCount)!==this.tabs.length){for(let r=0;rr&&t.children[r]===l.element||t.insertBefore(l.element,t.children[r])}for(;(t==null?void 0:t.childElementCount)>this.tabs.length;)(n=t.lastElementChild)==null||n.remove()}for(const r of this.tabs){typeof r.render=="function"?Se(r.render(),r.element):r.element.requestUpdate&&r.element.requestUpdate();const l=r.id===this.activeTab;r.element.hidden=!l}for(const r of o)for(var i=0;i +
+ + +
+ + `}renderFeatures(){return h`
+ ${this.features.map(e=>h`
+ + Learn more +
`)} +
`}disableJavaLiveReload(){var e;(e=this.javaConnection)==null||e.setActive(!1)}enableJavaLiveReload(){var e;(e=this.javaConnection)==null||e.setActive(!0)}renderThemeEditor(){return h` this.componentPicker} + .connection=${this.frontendConnection} + @before-open=${this.disableJavaLiveReload} + @after-close=${this.enableJavaLiveReload} + >`}toggleFeatureFlag(e,t){const o=e.target.checked;this.frontendConnection?(this.frontendConnection.setFeature(t.id,o),this.showNotification(S.INFORMATION,`“${t.title}” ${o?"enabled":"disabled"}`,t.requiresServerRestart?"This feature requires a server restart":void 0,void 0,`feature${t.id}${o?"Enabled":"Disabled"}`)):this.log(S.ERROR,`Unable to toggle feature ${t.title}: No server connection available`)}};u.MAX_LOG_ROWS=1e3;u.DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE="vaadin.live-reload.dismissedNotifications";u.ACTIVE_KEY_IN_SESSION_STORAGE="vaadin.live-reload.active";u.TRIGGERED_KEY_IN_SESSION_STORAGE="vaadin.live-reload.triggered";u.TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE="vaadin.live-reload.triggeredCount";u.AUTO_DEMOTE_NOTIFICATION_DELAY=5e3;u.HOTSWAP_AGENT="HOTSWAP_AGENT";u.JREBEL="JREBEL";u.SPRING_BOOT_DEVTOOLS="SPRING_BOOT_DEVTOOLS";u.BACKEND_DISPLAY_NAME={HOTSWAP_AGENT:"HotswapAgent",JREBEL:"JRebel",SPRING_BOOT_DEVTOOLS:"Spring Boot Devtools"};a([v({type:String})],u.prototype,"url",void 0);a([v({type:Boolean,attribute:!0})],u.prototype,"liveReloadDisabled",void 0);a([v({type:String})],u.prototype,"backend",void 0);a([v({type:Number})],u.prototype,"springBootLiveReloadPort",void 0);a([v({type:Boolean,attribute:!1})],u.prototype,"expanded",void 0);a([v({type:Array,attribute:!1})],u.prototype,"messages",void 0);a([v({type:String,attribute:!1})],u.prototype,"splashMessage",void 0);a([v({type:Array,attribute:!1})],u.prototype,"notifications",void 0);a([v({type:String,attribute:!1})],u.prototype,"frontendStatus",void 0);a([v({type:String,attribute:!1})],u.prototype,"javaStatus",void 0);a([w()],u.prototype,"tabs",void 0);a([w()],u.prototype,"activeTab",void 0);a([w()],u.prototype,"features",void 0);a([w()],u.prototype,"unreadErrors",void 0);a([ee(".window")],u.prototype,"root",void 0);a([ee("vaadin-dev-tools-component-picker")],u.prototype,"componentPicker",void 0);a([w()],u.prototype,"componentPickActive",void 0);a([w()],u.prototype,"themeEditorState",void 0);u=f=a([k("vaadin-dev-tools")],u);export{b as E,yt as a,_o as b,bt as c,wt as d,Eo as e,ft as f,Xo as g,xo as h,_e as i,Zo as j,N as p,I as s,O as t}; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.test.d.ts b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.test.d.ts new file mode 100644 index 0000000..7788851 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.test.d.ts @@ -0,0 +1 @@ +import './vaadin-dev-tools'; diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js new file mode 100644 index 0000000..606580a --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js @@ -0,0 +1,97 @@ +import '@vaadin/grid/vaadin-grid-column.js'; +import { GridColumn } from '@vaadin/grid/src/vaadin-grid-column.js'; +import { GridSelectionColumnBaseMixin } from '@vaadin/grid/src/vaadin-grid-selection-column-base-mixin.js'; + +class GridFlowSelectionColumn extends GridSelectionColumnBaseMixin(GridColumn) { + + static get is() { + return 'vaadin-grid-flow-selection-column'; + } + + static get properties() { + return { + /** + * Override property to enable auto-width + */ + autoWidth: { + type: Boolean, + value: true + }, + + /** + * Override property to set custom width + */ + width: { + type: String, + value: '56px' + } + }; + } + + /** + * Override method from `GridSelectionColumnBaseMixin` to add ID to select all + * checkbox + * + * @override + */ + _defaultHeaderRenderer(root, _column) { + super._defaultHeaderRenderer(root, _column); + const checkbox = root.firstElementChild; + if (checkbox) { + checkbox.id = 'selectAllCheckbox'; + } + } + + + /** + * Override a method from `GridSelectionColumnBaseMixin` to handle the user + * selecting all items. + * + * @protected + * @override + */ + _selectAll() { + this.selectAll = true; + this.$server.selectAll(); + } + + /** + * Override a method from `GridSelectionColumnBaseMixin` to handle the user + * deselecting all items. + * + * @protected + * @override + */ + _deselectAll() { + this.selectAll = false; + this.$server.deselectAll(); + } + + /** + * Override a method from `GridSelectionColumnBaseMixin` to handle the user + * selecting an item. + * + * @param {Object} item the item to select + * @protected + * @override + */ + _selectItem(item) { + this._grid.$connector.doSelection([item], true); + } + + /** + * Override a method from `GridSelectionColumnBaseMixin` to handle the user + * deselecting an item. + * + * @param {Object} item the item to deselect + * @protected + * @override + */ + _deselectItem(item) { + this._grid.$connector.doDeselection([item], true); + // Optimistically update select all state + this.selectAll = false; + } +} + +customElements.define(GridFlowSelectionColumn.is, GridFlowSelectionColumn); diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-mobile-drag-drop.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-mobile-drag-drop.js new file mode 100644 index 0000000..e698b4e --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-mobile-drag-drop.js @@ -0,0 +1,63 @@ +import MobileDragDrop from 'mobile-drag-drop/index.js'; + +(function () { + window.Vaadin = window.Vaadin || {}; + + // Inspired by https://github.com/timruffles/mobile-drag-drop/issues/115#issuecomment-375469457 + function tryFindDraggableTarget(event) { + if (window.Vaadin.__mobilePolyfillTouchStartPath) { + const cp = window.Vaadin.__mobilePolyfillTouchStartPath; + for (const o of cp) { + let el = o; + do { + if (el.getAttribute && el.getAttribute('draggable') === 'true') { + return el; + } + } while ((el = el.parentNode) && el !== document.body); + } + } + } + + function elementFromPoint(x, y) { + for (const o of this._path) { + if (o.elementFromPoint) { + let el = o.elementFromPoint(x, y); + if (el) { + while (el.shadowRoot) { + const fromPoint = el.shadowRoot.elementFromPoint(x, y); + if (el === fromPoint) { + return el; + } else { + el = fromPoint; + } + } + return el; + } + } + } + } + + function dragStartConditionOverride(event) { + this._path = event.composedPath(); + return true; + } + + const config = { + tryFindDraggableTarget, + dragStartConditionOverride, + holdToDrag: 300, + forceApply: window.Vaadin.__forceApplyMobileDragDrop + }; + if (!window.ShadyDOM) { + config.elementFromPoint = elementFromPoint; + } + + if (MobileDragDrop.polyfill(config)) { + document.addEventListener('touchstart', (e) => { + window.Vaadin.__mobilePolyfillTouchStartPath = e.composedPath(); + }); + document.addEventListener('touchmove', (e) => { + delete window.Vaadin.__mobilePolyfillTouchStartPath; + }); + } +})(); diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-time-picker/helpers.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-time-picker/helpers.js new file mode 100644 index 0000000..dd3c328 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-time-picker/helpers.js @@ -0,0 +1,183 @@ +// map from unicode eastern arabic number characters to arabic numbers +const EASTERN_ARABIC_DIGIT_MAP = { + '\\u0660': '0', + '\\u0661': '1', + '\\u0662': '2', + '\\u0663': '3', + '\\u0664': '4', + '\\u0665': '5', + '\\u0666': '6', + '\\u0667': '7', + '\\u0668': '8', + '\\u0669': '9' +}; + +/** + * Escapes the given string so it can be safely used in a regexp. + * + * @param {string} string + * @return {string} + */ +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); +} + +/** + * Parses eastern arabic number characters to arabic numbers (0-9) + * + * @param {string} digits + * @return {string} + */ +function parseEasternArabicDigits(digits) { + return digits.replace(/[\u0660-\u0669]/g, function (char) { + const unicode = '\\u0' + char.charCodeAt(0).toString(16); + return EASTERN_ARABIC_DIGIT_MAP[unicode]; + }); +} + +/** + * @param {string} locale + * @param {Date} testTime + * @return {string | null} + */ +function getAmOrPmString(locale, testTime) { + const testTimeString = testTime.toLocaleTimeString(locale); + + // AM/PM string is anything from one letter in eastern arabic to standard two letters, + // to having space in between, dots ... + // cannot disqualify whitespace since some locales use a. m. / p. m. + // TODO when more scripts support is added (than Arabic), need to exclude those numbers too + const amOrPmRegExp = /[^\d\u0660-\u0669]/; + + const matches = + // In most locales, the time ends with AM/PM: + testTimeString.match(new RegExp(`${amOrPmRegExp.source}+$`, 'g')) || + // In some locales, the time starts with AM/PM e.g in Chinese: + testTimeString.match(new RegExp(`^${amOrPmRegExp.source}+`, 'g')); + + return matches && matches[0].trim(); +} + +/** + * @param {string} locale + * @return {string | null} + */ +export function getSeparator(locale) { + let timeString = TEST_PM_TIME.toLocaleTimeString(locale); + + // Since the next regex picks first non-number-whitespace, + // need to discard possible PM from beginning (eg. chinese locale) + const pmString = getPmString(locale); + if (pmString && timeString.startsWith(pmString)) { + timeString = timeString.replace(pmString, ''); + } + + const matches = timeString.match(/[^\u0660-\u0669\s\d]/); + return matches && matches[0]; +} + +/** + * Searches for either an AM or PM token in the given time string + * depending on what is provided in `amOrPmString`. + * + * The search is case and space insensitive. + * + * @example + * `searchAmOrPmToken('1 P M', 'PM')` => `'P M'` + * + * @example + * `searchAmOrPmToken('1 a.m.', 'A. M.')` => `a.m.` + * + * @param {string} timeString + * @param {string} amOrPmString + * @return {string | null} + */ +export function searchAmOrPmToken(timeString, amOrPmString) { + if (!amOrPmString) return null; + + // Create a regexp string for searching for AM/PM without space-sensitivity. + const tokenRegExpString = amOrPmString.split(/\s*/).map(escapeRegExp).join('\\s*'); + + // Create a regexp without case-sensitivity. + const tokenRegExp = new RegExp(tokenRegExpString, 'i'); + + // Match the regexp against the time string. + const tokenMatches = timeString.match(tokenRegExp); + if (tokenMatches) { + return tokenMatches[0]; + } +} + +export const TEST_PM_TIME = new Date('August 19, 1975 23:15:30'); + +export const TEST_AM_TIME = new Date('August 19, 1975 05:15:30'); + +/** + * @param {string} locale + * @return {string} + */ +export function getPmString(locale) { + return getAmOrPmString(locale, TEST_PM_TIME); +} + +/** + * @param {string} locale + * @return {string} + */ +export function getAmString(locale) { + return getAmOrPmString(locale, TEST_AM_TIME); +} + +/** + * @param {string} digits + * @return {number} + */ +export function parseDigitsIntoInteger(digits) { + return parseInt(parseEasternArabicDigits(digits)); +} + +/** + * @param {string} milliseconds + * @return {number} + */ +export function parseMillisecondsIntoInteger(milliseconds) { + milliseconds = parseEasternArabicDigits(milliseconds); + // digits are either .1 .01 or .001 so need to "shift" + if (milliseconds.length === 1) { + milliseconds += '00'; + } else if (milliseconds.length === 2) { + milliseconds += '0'; + } + return parseInt(milliseconds); +} + +/** + * @param {string} timeString + * @param {number} milliseconds + * @param {string} amString + * @param {string} pmString + * @return {string} + */ +export function formatMilliseconds(timeString, milliseconds, amString, pmString) { + // might need to inject milliseconds between seconds and AM/PM + let cleanedTimeString = timeString; + if (timeString.endsWith(amString)) { + cleanedTimeString = timeString.replace(' ' + amString, ''); + } else if (timeString.endsWith(pmString)) { + cleanedTimeString = timeString.replace(' ' + pmString, ''); + } + if (milliseconds) { + let millisecondsString = milliseconds < 10 ? '0' : ''; + millisecondsString += milliseconds < 100 ? '0' : ''; + millisecondsString += milliseconds; + cleanedTimeString += '.' + millisecondsString; + } else { + cleanedTimeString += '.000'; + } + if (timeString.endsWith(amString)) { + cleanedTimeString = cleanedTimeString + ' ' + amString; + } else if (timeString.endsWith(pmString)) { + cleanedTimeString = cleanedTimeString + ' ' + pmString; + } + return cleanedTimeString; +} diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js new file mode 100644 index 0000000..b41daf9 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js @@ -0,0 +1,178 @@ +import { + TEST_PM_TIME, + formatMilliseconds, + parseMillisecondsIntoInteger, + parseDigitsIntoInteger, + getAmString, + getPmString, + getSeparator, + searchAmOrPmToken +} from './helpers.js'; + +(function () { + const tryCatchWrapper = function (callback) { + return window.Vaadin.Flow.tryCatchWrapper(callback, 'Vaadin Time Picker'); + }; + + // Execute callback when predicate returns true. + // Try again later if predicate returns false. + function when(predicate, callback, timeout = 0) { + if (predicate()) { + callback(); + } else { + setTimeout(() => when(predicate, callback, 200), timeout); + } + } + + window.Vaadin.Flow.timepickerConnector = { + initLazy: (timepicker) => + tryCatchWrapper(function (timepicker) { + // Check whether the connector was already initialized for the timepicker + if (timepicker.$connector) { + return; + } + + timepicker.$connector = {}; + + timepicker.$connector.setLocale = tryCatchWrapper(function (locale) { + // capture previous value if any + let previousValueObject; + if (timepicker.value && timepicker.value !== '') { + previousValueObject = timepicker.i18n.parseTime(timepicker.value); + } + + try { + // Check whether the locale is supported by the browser or not + TEST_PM_TIME.toLocaleTimeString(locale); + } catch (e) { + locale = 'en-US'; + // FIXME should do a callback for server to throw an exception ? + throw new Error( + 'vaadin-time-picker: The locale ' + + locale + + ' is not supported, falling back to default locale setting(en-US).' + ); + } + + // 1. 24 or 12 hour clock, if latter then what are the am/pm strings ? + const pmString = getPmString(locale); + const amString = getAmString(locale); + + // 2. What is the separator ? + const separator = getSeparator(locale); + + const includeSeconds = function () { + return timepicker.step && timepicker.step < 60; + }; + + const includeMilliSeconds = function () { + return timepicker.step && timepicker.step < 1; + }; + + let cachedTimeString; + let cachedTimeObject; + + timepicker.i18n = { + formatTime: tryCatchWrapper(function (timeObject) { + if (!timeObject) return; + + const timeToBeFormatted = new Date(); + timeToBeFormatted.setHours(timeObject.hours); + timeToBeFormatted.setMinutes(timeObject.minutes); + timeToBeFormatted.setSeconds(timeObject.seconds !== undefined ? timeObject.seconds : 0); + + // the web component expects the correct granularity used for the time string, + // thus need to format the time object in correct granularity by passing the format options + let localeTimeString = timeToBeFormatted.toLocaleTimeString(locale, { + hour: 'numeric', + minute: 'numeric', + second: includeSeconds() ? 'numeric' : undefined + }); + + // milliseconds not part of the time format API + if (includeMilliSeconds()) { + localeTimeString = formatMilliseconds(localeTimeString, timeObject.milliseconds, amString, pmString); + } + + return localeTimeString; + }), + + parseTime: tryCatchWrapper(function (timeString) { + if (timeString && timeString === cachedTimeString && cachedTimeObject) { + return cachedTimeObject; + } + + if (!timeString) { + // when nothing is returned, the component shows the invalid state for the input + return; + } + + const amToken = searchAmOrPmToken(timeString, amString); + const pmToken = searchAmOrPmToken(timeString, pmString); + + const numbersOnlyTimeString = timeString + .replace(amToken || '', '') + .replace(pmToken || '', '') + .trim(); + + // A regexp that allows to find the numbers with optional separator and continuing searching after it. + const numbersRegExp = new RegExp('([\\d\\u0660-\\u0669]){1,2}(?:' + separator + ')?', 'g'); + + let hours = numbersRegExp.exec(numbersOnlyTimeString); + if (hours) { + hours = parseDigitsIntoInteger(hours[0].replace(separator, '')); + // handle 12 am -> 0 + // do not do anything if am & pm are not used or if those are the same, + // as with locale bg-BG there is always ч. at the end of the time + if (amToken !== pmToken) { + if (hours === 12 && amToken) { + hours = 0; + } + if (hours !== 12 && pmToken) { + hours += 12; + } + } + const minutes = numbersRegExp.exec(numbersOnlyTimeString); + const seconds = minutes && numbersRegExp.exec(numbersOnlyTimeString); + // detecting milliseconds from input, expects am/pm removed from end, eg. .0 or .00 or .000 + const millisecondRegExp = /[[\.][\d\u0660-\u0669]{1,3}$/; + // reset to end or things can explode + let milliseconds = seconds && includeMilliSeconds() && millisecondRegExp.exec(numbersOnlyTimeString); + // handle case where last numbers are seconds and . is the separator (invalid regexp match) + if (milliseconds && milliseconds['index'] <= seconds['index']) { + milliseconds = undefined; + } + // hours is a number at this point, others are either arrays or null + // the string in [0] from the arrays includes the separator too + cachedTimeObject = hours !== undefined && { + hours: hours, + minutes: minutes ? parseDigitsIntoInteger(minutes[0].replace(separator, '')) : 0, + seconds: seconds ? parseDigitsIntoInteger(seconds[0].replace(separator, '')) : 0, + milliseconds: + minutes && seconds && milliseconds + ? parseMillisecondsIntoInteger(milliseconds[0].replace('.', '')) + : 0 + }; + cachedTimeString = timeString; + return cachedTimeObject; + } + }) + }; + + if (previousValueObject) { + when( + () => timepicker.$, + () => { + const newValue = timepicker.i18n.formatTime(previousValueObject); + // FIXME works but uses private API, needs fixes in web component + if (timepicker.inputElement.value !== newValue) { + timepicker.inputElement.value = newValue; + timepicker.$.comboBox.value = newValue; + } + } + ); + } + }); + })(timepicker) + }; +})(); diff --git a/LoadBalancerWeb/frontend/generated/jar-resources/virtualListConnector.js b/LoadBalancerWeb/frontend/generated/jar-resources/virtualListConnector.js new file mode 100644 index 0000000..9089923 --- /dev/null +++ b/LoadBalancerWeb/frontend/generated/jar-resources/virtualListConnector.js @@ -0,0 +1,150 @@ +import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js'; +import { timeOut } from '@polymer/polymer/lib/utils/async.js'; + +window.Vaadin.Flow.virtualListConnector = { + initLazy: function (list) { + // Check whether the connector was already initialized for the virtual list + if (list.$connector) { + return; + } + + const extraItemsBuffer = 20; + + let lastRequestedRange = [0, 0]; + + list.$connector = {}; + list.$connector.placeholderItem = { __placeholder: true }; + + const updateRequestedItem = function () { + /* + * TODO virtual list seems to do a small index adjustment after scrolling + * has stopped. This causes a redundant request to be sent to make a + * corresponding minimal change to the buffer. We should avoid these + * requests by making the logic skip doing a request if the available + * buffer is within some tolerance compared to the requested buffer. + */ + const visibleIndexes = [...list.children] + .filter((el) => '__virtualListIndex' in el) + .map((el) => el.__virtualListIndex); + const firstNeededItem = Math.min(...visibleIndexes); + const lastNeededItem = Math.max(...visibleIndexes); + + let first = Math.max(0, firstNeededItem - extraItemsBuffer); + let last = Math.min(lastNeededItem + extraItemsBuffer, list.items.length); + + if (lastRequestedRange[0] != first || lastRequestedRange[1] != last) { + lastRequestedRange = [first, last]; + const count = 1 + last - first; + list.$server.setRequestedRange(first, count); + } + }; + + const scheduleUpdateRequest = function () { + list.__requestDebounce = Debouncer.debounce(list.__requestDebounce, timeOut.after(50), updateRequestedItem); + }; + + requestAnimationFrame(() => updateRequestedItem); + + // Add an observer function that will invoke on virtualList.renderer property + // change and then patches it with a wrapper renderer + list.patchVirtualListRenderer = function () { + if (!list.renderer || list.renderer.__virtualListConnectorPatched) { + // The list either doesn't have a renderer yet or it's already been patched + return; + } + + const originalRenderer = list.renderer; + + const renderer = (root, list, model) => { + root.__virtualListIndex = model.index; + + if (model.item === undefined) { + if (list.$connector.placeholderElement) { + // ComponentRenderer + if (!root.__hasComponentRendererPlaceholder) { + // The root was previously rendered by the ComponentRenderer. Clear and add a placeholder. + root.innerHTML = ''; + delete root._$litPart$; + root.appendChild(list.$connector.placeholderElement.cloneNode(true)); + root.__hasComponentRendererPlaceholder = true; + } + } else { + // LitRenderer + originalRenderer.call(list, root, list, { + ...model, + item: list.$connector.placeholderItem + }); + } + } else { + if (root.__hasComponentRendererPlaceholder) { + // The root was previously populated with a placeholder. Clear it. + root.innerHTML = ''; + root.__hasComponentRendererPlaceholder = false; + } + + originalRenderer.call(list, root, list, model); + } + + /* + * Check if we need to do anything once things have settled down. + * This method is called multiple times in sequence for the same user + * action, but we only want to do the check once. + */ + scheduleUpdateRequest(); + }; + renderer.__virtualListConnectorPatched = true; + renderer.__rendererId = originalRenderer.__rendererId; + + list.renderer = renderer; + }; + + list._createPropertyObserver('renderer', 'patchVirtualListRenderer', true); + list.patchVirtualListRenderer(); + + list.items = []; + + list.$connector.set = function (index, items) { + list.items.splice(index, items.length, ...items); + list.items = [...list.items]; + }; + + list.$connector.clear = function (index, length) { + // How many items, starting from "index", should be set as undefined + const clearCount = Math.min(length, list.items.length - index); + list.$connector.set(index, [...Array(clearCount)]); + }; + + list.$connector.updateData = function (items) { + const updatedItemsMap = items.reduce((map, item) => { + map[item.key] = item; + return map; + }, {}); + + list.items = list.items.map((item) => { + // Items can be undefined if they are outside the viewport + if (!item) { + return item; + } + // Replace existing item with updated item, + // return existing item as fallback if it was not updated + return updatedItemsMap[item.key] || item; + }); + }; + + list.$connector.updateSize = function (newSize) { + const delta = newSize - list.items.length; + if (delta > 0) { + list.items = [...list.items, ...Array(delta)]; + } else if (delta < 0) { + list.items = list.items.slice(0, newSize); + } + }; + + list.$connector.setPlaceholderItem = function (placeholderItem = {}, appId) { + placeholderItem.__placeholder = true; + list.$connector.placeholderItem = placeholderItem; + const nodeId = Object.entries(placeholderItem).find(([key]) => key.endsWith('_nodeid')); + list.$connector.placeholderElement = nodeId ? Vaadin.Flow.clients[appId].getByNodeId(nodeId[1]) : null; + }; + } +}; diff --git a/LoadBalancerWeb/src/main/java/ru/dragonestia/loadbalancer/web/component/AddUsers.java b/LoadBalancerWeb/src/main/java/ru/dragonestia/loadbalancer/web/component/AddUsers.java new file mode 100644 index 0000000..0765435 --- /dev/null +++ b/LoadBalancerWeb/src/main/java/ru/dragonestia/loadbalancer/web/component/AddUsers.java @@ -0,0 +1,104 @@ +package ru.dragonestia.loadbalancer.web.component; + +import com.vaadin.flow.component.Unit; +import com.vaadin.flow.component.button.Button; +import com.vaadin.flow.component.button.ButtonVariant; +import com.vaadin.flow.component.checkbox.Checkbox; +import com.vaadin.flow.component.details.Details; +import com.vaadin.flow.component.html.Div; +import com.vaadin.flow.component.html.H2; +import com.vaadin.flow.component.icon.Icon; +import com.vaadin.flow.component.icon.VaadinIcon; +import com.vaadin.flow.component.orderedlayout.VerticalLayout; +import com.vaadin.flow.component.textfield.TextField; +import lombok.Getter; +import ru.dragonestia.loadbalancer.web.model.Bucket; +import ru.dragonestia.loadbalancer.web.model.User; + +import java.util.List; + +public class AddUsers extends Details { + + private final Bucket bucket; + private final Checkbox ignoreSlots; + private final VerticalLayout usersLayout; + + public AddUsers(Bucket bucket) { + super(new H2("Add users")); + + this.bucket = bucket; + usersLayout = new VerticalLayout(); + + add(addUserToTransacionButton()); + add(usersLayout); + usersLayout.add(new UserEntry(false)); + add(ignoreSlots = new Checkbox("Ignore slot limitation", false)); + add(createAddUsersButton()); + } + + public void clear() { + ignoreSlots.setValue(false); + usersLayout.removeAll(); + usersLayout.add(new UserEntry(false)); + } + + public List readAllUsers() { + return usersLayout.getChildren() + .filter(component -> component instanceof UserEntry) + .map(component -> (UserEntry) component) + .map(user -> user.getUserIdentifierField().getValue()) + .map(String::trim) + .filter(user -> !user.isEmpty()) + .map(User::new) + .toList(); + } + + private Button addUserToTransacionButton() { + var button = new Button("Add user to transaction"); + button.addClickListener(event -> { + usersLayout.add(new UserEntry(true)); + }); + button.setPrefixComponent(new Icon(VaadinIcon.PLUS)); + return button; + } + + private Button createAddUsersButton() { + var button = new Button("Commit", event -> onClick()); + button.addThemeVariants(ButtonVariant.LUMO_SUCCESS, ButtonVariant.LUMO_PRIMARY); + return button; + } + + private void onClick() { + //TODO: save data + + clear(); + } + + @Getter + public static class UserEntry extends Div { + + private final TextField userIdentifierField; + + public UserEntry(boolean canBeDeleted) { + add(userIdentifierField = createUserIdentifierField(canBeDeleted)); + } + + private TextField createUserIdentifierField(boolean canBeDeleted) { + var field = new TextField("User identifier"); + field.setPlaceholder("example-user-identifier"); + field.setHelperText("It can be UUID, username, numeric ids, etc"); + field.setMinWidth(20, Unit.REM); + + if (canBeDeleted) { + var removeButton = new Button(new Icon(VaadinIcon.TRASH), event -> { + removeFromParent(); + }); + removeButton.addThemeVariants(ButtonVariant.LUMO_PRIMARY, ButtonVariant.LUMO_ERROR); + + field.setSuffixComponent(removeButton); + } + + return field; + } + } +}