From 734e2a6ff57038b848eaa108b9b4e86ae91e0e02 Mon Sep 17 00:00:00 2001 From: AlphaX-Projects <77661270+AlphaX-Projects@users.noreply.github.com> Date: Thu, 27 Jul 2023 17:31:16 +0200 Subject: [PATCH] Update q-chat and remove errors --- .../core/components/ChatGifs/ChatGifs.js | 4 +- .../components/ChatGifs/ChatGifsExplore.js | 18 +- .../core/components/ChatGroupInvites.js | 2 +- .../core/components/ChatGroupSettings.js | 18 +- .../core/components/ChatGroupsManagement.js | 26 +- plugins/plugins/core/components/ChatHead.js | 63 +- .../plugins/core/components/ChatLeaveGroup.js | 17 +- .../plugins/core/components/ChatMessage.js | 2 +- plugins/plugins/core/components/ChatModals.js | 60 +- plugins/plugins/core/components/ChatPage.js | 31 +- .../plugins/core/components/ChatRightPanel.js | 4 +- .../plugins/core/components/ChatScroller.js | 35 +- .../core/components/ChatSearchResults.js | 72 + plugins/plugins/core/components/ChatSelect.js | 1 + .../core/components/ChatSideNavHeads.js | 3 +- .../core/components/ChatTextEditor copy.js | 51 +- .../plugins/core/components/ChatTextEditor.js | 16 +- .../core/components/ChatWelcomePage.js | 33 +- .../plugins/core/components/ImageComponent.js | 47 +- .../plugins/core/components/LevelFounder.js | 42 +- plugins/plugins/core/components/NameMenu.js | 33 +- plugins/plugins/core/components/TimeAgo.js | 6 +- plugins/plugins/core/components/TipUser.js | 158 +- plugins/plugins/core/components/ToolTip.js | 1 + .../core/components/UserInfo/UserInfo.js | 4 - .../plugins/core/components/WrapperModal.js | 51 +- .../core/components/qortal-info-view.js | 1 - .../plugins/core/messaging/q-chat/q-chat.js | 9654 ----------------- .../core/messaging/q-chat/q-chat.src.js | 22 +- 29 files changed, 445 insertions(+), 10030 deletions(-) create mode 100644 plugins/plugins/core/components/ChatSearchResults.js delete mode 100644 plugins/plugins/core/messaging/q-chat/q-chat.js diff --git a/plugins/plugins/core/components/ChatGifs/ChatGifs.js b/plugins/plugins/core/components/ChatGifs/ChatGifs.js index b018f9c0..35d511e3 100644 --- a/plugins/plugins/core/components/ChatGifs/ChatGifs.js +++ b/plugins/plugins/core/components/ChatGifs/ChatGifs.js @@ -5,12 +5,12 @@ import * as zip from '@zip.js/zip.js'; import '@material/mwc-icon'; import ShortUniqueId from 'short-unique-id'; import {publishData} from '../../../utils/publish-image.js'; -import {translate, get} from 'lit-translate'; import {gifExplorerStyles} from './ChatGifs-css.js'; import { bytesToMegabytes } from '../../../utils/bytesToMegabytes.js'; import './ChatGifsExplore.js'; import '../ImageComponent.js'; import '@vaadin/tooltip'; +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' const parentEpml = new Epml({type: 'WINDOW', source: window.parent}); @@ -993,4 +993,4 @@ setOpenGifModal: { attribute: false } } -window.customElements.define('chat-gifs', ChatGifs); +window.customElements.define('chat-gifs', ChatGifs) diff --git a/plugins/plugins/core/components/ChatGifs/ChatGifsExplore.js b/plugins/plugins/core/components/ChatGifs/ChatGifsExplore.js index 009297fd..a456dac3 100644 --- a/plugins/plugins/core/components/ChatGifs/ChatGifsExplore.js +++ b/plugins/plugins/core/components/ChatGifs/ChatGifsExplore.js @@ -1,8 +1,8 @@ -import { LitElement, html, css } from 'lit'; -import { Epml } from '../../../../epml.js'; -import { chatGifsExploreStyles } from './ChatGifsExplore-css.js'; -import { translate, get } from 'lit-translate'; -import '@material/mwc-icon'; +import { LitElement, html, css } from 'lit' +import { Epml } from '../../../../epml.js' +import { chatGifsExploreStyles } from './ChatGifsExplore-css.js' +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' +import '@material/mwc-icon' const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }); @@ -69,9 +69,9 @@ class ChatGifsExplore extends LitElement { this.elementObserver(); } getApiKey() { - const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]; - let apiKey = myNode.apiKey; - return apiKey; + const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node] + let apiKey = myNode.apiKey + return apiKey } async searchCollections() { @@ -169,4 +169,4 @@ class ChatGifsExplore extends LitElement { } -window.customElements.define('chat-gifs-explore', ChatGifsExplore); +window.customElements.define('chat-gifs-explore', ChatGifsExplore) diff --git a/plugins/plugins/core/components/ChatGroupInvites.js b/plugins/plugins/core/components/ChatGroupInvites.js index 27cc0a26..dbb19579 100644 --- a/plugins/plugins/core/components/ChatGroupInvites.js +++ b/plugins/plugins/core/components/ChatGroupInvites.js @@ -1,6 +1,5 @@ import { LitElement, html, css } from "lit" import { render } from "lit/html.js" -import { get, translate } from "lit-translate" import { Epml } from "../../../epml" import snackbar from "./snackbar.js" import "@material/mwc-button" @@ -8,6 +7,7 @@ import "@material/mwc-dialog" import "@polymer/paper-spinner/paper-spinner-lite.js" import "@material/mwc-icon" import "./WrapperModal" +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' const parentEpml = new Epml({ type: "WINDOW", source: window.parent }) diff --git a/plugins/plugins/core/components/ChatGroupSettings.js b/plugins/plugins/core/components/ChatGroupSettings.js index ac50df20..76af8645 100644 --- a/plugins/plugins/core/components/ChatGroupSettings.js +++ b/plugins/plugins/core/components/ChatGroupSettings.js @@ -1,13 +1,13 @@ -import { LitElement, html, css } from 'lit'; -import { render } from 'lit/html.js'; -import { get, translate } from 'lit-translate'; -import { Epml } from '../../../epml'; +import { LitElement, html, css } from 'lit' +import { render } from 'lit/html.js' +import { Epml } from '../../../epml' import snackbar from './snackbar.js' -import '@material/mwc-button'; -import '@material/mwc-dialog'; +import '@material/mwc-button' +import '@material/mwc-dialog' import '@polymer/paper-spinner/paper-spinner-lite.js' -import '@material/mwc-icon'; -import './WrapperModal'; +import '@material/mwc-icon' +import './WrapperModal' +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) @@ -25,7 +25,7 @@ class ChatGroupSettings extends LitElement { } constructor() { - super(); + super() this.isLoading = false; this.isOpenLeaveModal = false this.leaveGroupObj = {} diff --git a/plugins/plugins/core/components/ChatGroupsManagement.js b/plugins/plugins/core/components/ChatGroupsManagement.js index a6950b77..a2553052 100644 --- a/plugins/plugins/core/components/ChatGroupsManagement.js +++ b/plugins/plugins/core/components/ChatGroupsManagement.js @@ -1,19 +1,19 @@ -import { LitElement, html, css } from 'lit'; -import { render } from 'lit/html.js'; -import { get, translate } from 'lit-translate'; -import { Epml } from '../../../epml'; +import { LitElement, html, css } from 'lit' +import { render } from 'lit/html.js' +import { Epml } from '../../../epml' import snackbar from './snackbar.js' -import '@material/mwc-button'; -import '@material/mwc-dialog'; +import '@material/mwc-button' +import '@material/mwc-dialog' import '@polymer/paper-spinner/paper-spinner-lite.js' -import '@material/mwc-icon'; -import './WrapperModal'; +import '@material/mwc-icon' +import './WrapperModal' import '@vaadin/tabs' -import '@vaadin/tabs/theme/material/vaadin-tabs.js'; -import '@vaadin/avatar'; -import '@vaadin/grid'; -import '@vaadin/grid/vaadin-grid-filter-column.js'; -import { columnBodyRenderer } from '@vaadin/grid/lit.js'; +import '@vaadin/tabs/theme/material/vaadin-tabs.js' +import '@vaadin/avatar' +import '@vaadin/grid' +import '@vaadin/grid/vaadin-grid-filter-column.js' +import { columnBodyRenderer } from '@vaadin/grid/lit.js' +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) diff --git a/plugins/plugins/core/components/ChatHead.js b/plugins/plugins/core/components/ChatHead.js index 61a30fb2..6ea78b2e 100644 --- a/plugins/plugins/core/components/ChatHead.js +++ b/plugins/plugins/core/components/ChatHead.js @@ -1,18 +1,20 @@ import { LitElement, html, css } from 'lit' import { render } from 'lit/html.js' import { Epml } from '../../../epml.js' -import localForage from "localforage"; -import { translate} from 'lit-translate'; - +import localForage from "localforage" +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' import '@material/mwc-icon' const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) + const chatLastSeen = localForage.createInstance({ name: "chat-last-seen", -}); +}) + class ChatHead extends LitElement { static get properties() { return { + theme: { type: String, reflect: true }, selectedAddress: { type: Object }, config: { type: Object }, chatInfo: { type: Object }, @@ -53,10 +55,7 @@ class ChatHead extends LitElement { color: var(--chat-group); } - - .about { - display: flex; align-items: center; justify-content: space-between; @@ -109,12 +108,13 @@ class ChatHead extends LitElement { this.imageFetches = 0 this.lastReadMessageTimestamp = 0 this.loggedInAddress = window.parent.reduxStore.getState().app.selectedAddress.address + this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light' } createImage(imageUrl) { - const imageHTMLRes = new Image(); - imageHTMLRes.src = imageUrl; - imageHTMLRes.style= "width:40px; height:40px; float: left; border-radius:50%"; + const imageHTMLRes = new Image() + imageHTMLRes.src = imageUrl + imageHTMLRes.style= "width:40px; height:40px; float: left; border-radius:50%" imageHTMLRes.onclick= () => { this.openDialogImage = true; } @@ -124,29 +124,25 @@ class ChatHead extends LitElement { imageHTMLRes.onerror = () => { if (this.imageFetches < 4) { setTimeout(() => { - this.imageFetches = this.imageFetches + 1; - imageHTMLRes.src = imageUrl; - }, 750); + this.imageFetches = this.imageFetches + 1 + imageHTMLRes.src = imageUrl + }, 750) } else { - - this.isImageLoaded = false } }; - return imageHTMLRes; + return imageHTMLRes } - - render() { - let avatarImg = ''; + let avatarImg = '' let backupAvatarImg = '' let isUnread = false if(this.chatInfo.name){ - const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]; - const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port; - const avatarUrl = `${nodeUrl}/arbitrary/THUMBNAIL/${this.chatInfo.name}/qortal_avatar?async=true&apiKey=${myNode.apiKey}`; + const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node] + const nodeUrl = myNode.protocol + '://' + myNode.domain + ':' + myNode.port + const avatarUrl = `${nodeUrl}/arbitrary/THUMBNAIL/${this.chatInfo.name}/qortal_avatar?async=true&apiKey=${myNode.apiKey}` avatarImg= this.createImage(avatarUrl) } @@ -189,6 +185,19 @@ class ChatHead extends LitElement { } async firstUpdated() { + this.changeTheme() + + window.addEventListener('storage', () => { + const checkTheme = localStorage.getItem('qortalTheme') + + if (checkTheme === 'dark') { + this.theme = 'dark' + } else { + this.theme = 'light' + } + document.querySelector('html').setAttribute('theme', this.theme) + }) + let configLoaded = false this.lastReadMessageTimestamp = await chatLastSeen.getItem(this.chatInfo.url) || 0 parentEpml.ready().then(() => { @@ -217,6 +226,16 @@ class ChatHead extends LitElement { parentEpml.imReady() } + changeTheme() { + const checkTheme = localStorage.getItem('qortalTheme') + if (checkTheme === 'dark') { + this.theme = 'dark' + } else { + this.theme = 'light' + } + document.querySelector('html').setAttribute('theme', this.theme) + } + shouldUpdate(changedProperties) { if(changedProperties.has('activeChatHeadUrl')){ return true diff --git a/plugins/plugins/core/components/ChatLeaveGroup.js b/plugins/plugins/core/components/ChatLeaveGroup.js index be249818..1cd2c38d 100644 --- a/plugins/plugins/core/components/ChatLeaveGroup.js +++ b/plugins/plugins/core/components/ChatLeaveGroup.js @@ -1,13 +1,14 @@ -import { LitElement, html, css } from 'lit'; -import { render } from 'lit/html.js'; -import { get, translate } from 'lit-translate'; -import { Epml } from '../../../epml'; +import { LitElement, html, css } from 'lit' +import { render } from 'lit/html.js' +import { Epml } from '../../../epml' import snackbar from './snackbar.js' -import '@material/mwc-button'; -import '@material/mwc-dialog'; +import '@material/mwc-button' +import '@material/mwc-dialog' import '@polymer/paper-spinner/paper-spinner-lite.js' -import '@material/mwc-icon'; -import './WrapperModal'; +import '@material/mwc-icon' +import './WrapperModal' +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' + const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) class ChatLeaveGroup extends LitElement { diff --git a/plugins/plugins/core/components/ChatMessage.js b/plugins/plugins/core/components/ChatMessage.js index 502ee87e..49c76c2e 100644 --- a/plugins/plugins/core/components/ChatMessage.js +++ b/plugins/plugins/core/components/ChatMessage.js @@ -1,7 +1,7 @@ import { LitElement, html, css } from 'lit' import { render } from 'lit/html.js' import { Epml } from '../../../epml.js' - +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) diff --git a/plugins/plugins/core/components/ChatModals.js b/plugins/plugins/core/components/ChatModals.js index 0778bd10..2074c911 100644 --- a/plugins/plugins/core/components/ChatModals.js +++ b/plugins/plugins/core/components/ChatModals.js @@ -1,10 +1,10 @@ -import { LitElement, html, css } from 'lit'; -import { render } from 'lit/html.js'; -import { get, translate } from 'lit-translate'; -import { Epml } from '../../../epml'; +import { LitElement, html, css } from 'lit' +import { render } from 'lit/html.js' +import { Epml } from '../../../epml' import snackbar from './snackbar.js' -import '@material/mwc-button'; -import '@material/mwc-dialog'; +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' +import '@material/mwc-button' +import '@material/mwc-dialog' const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) @@ -18,15 +18,15 @@ class ChatModals extends LitElement { hidePrivateMessageModal: {type: Function}, hideBlockUserModal: {type: Function}, toblockaddress: { type: String, attribute: true }, - chatBlockedAdresses: { type: Array }, + chatBlockedAdresses: { type: Array } } } constructor() { - super(); - this.isLoading = false; - this.hidePrivateMessageModal = () => {}; - this.hideBlockUserModal = () => {}; + super() + this.isLoading = false + this.hidePrivateMessageModal = () => {} + this.hideBlockUserModal = () => {} this.chatBlockedAdresses = [] } @@ -105,13 +105,13 @@ class ChatModals extends LitElement { } else { this.sendMessage() } - }; + } async sendMessage() { - this.isLoading = true; - const _recipient = this.shadowRoot.getElementById('sendTo').value; - const messageBox = this.shadowRoot.getElementById('messageBox'); - const messageText = messageBox.value; + this.isLoading = true + const _recipient = this.shadowRoot.getElementById('sendTo').value + const messageBox = this.shadowRoot.getElementById('messageBox') + const messageText = messageBox.value let recipient; const validateName = async (receiverName) => { @@ -127,7 +127,7 @@ class ChatModals extends LitElement { myRes = myNameRes } - return myRes; + return myRes } const myNameRes = await validateName(_recipient) @@ -138,8 +138,8 @@ class ChatModals extends LitElement { recipient = myNameRes.owner } - let _reference = new Uint8Array(64); - window.crypto.getRandomValues(_reference); + let _reference = new Uint8Array(64) + window.crypto.getRandomValues(_reference) let sendTimestamp = Date.now() @@ -200,17 +200,17 @@ class ChatModals extends LitElement { const _computePow = async (chatBytes) => { - const _chatBytesArray = Object.keys(chatBytes).map(function (key) { return chatBytes[key]; }); + const _chatBytesArray = Object.keys(chatBytes).map(function (key) { return chatBytes[key]; }) const chatBytesArray = new Uint8Array(_chatBytesArray) const chatBytesHash = new window.parent.Sha256().process(chatBytesArray).finish().result - const hashPtr = window.parent.sbrk(32, window.parent.heap); - const hashAry = new Uint8Array(window.parent.memory.buffer, hashPtr, 32); - hashAry.set(chatBytesHash); + const hashPtr = window.parent.sbrk(32, window.parent.heap) + const hashAry = new Uint8Array(window.parent.memory.buffer, hashPtr, 32) + hashAry.set(chatBytesHash) - const difficulty = this.balance < 4 ? 18 : 8; + const difficulty = this.balance < 4 ? 18 : 8 const workBufferLength = 8 * 1024 * 1024; - const workBufferPtr = window.parent.sbrk(workBufferLength, window.parent.heap); + const workBufferPtr = window.parent.sbrk(workBufferLength, window.parent.heap) let nonce = window.parent.computePow(hashPtr, workBufferPtr, workBufferLength, difficulty) @@ -250,9 +250,9 @@ class ChatModals extends LitElement { } getApiKey() { - const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]; - let apiKey = myNode.apiKey; - return apiKey; + const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node] + let apiKey = myNode.apiKey + return apiKey } getChatBlockedList() { @@ -263,7 +263,7 @@ class ChatModals extends LitElement { localStorage.removeItem("ChatBlockedAddresses") - var obj = []; + var obj = [] fetch(blockedAddressesUrl).then(response => { return response.json() @@ -412,4 +412,4 @@ class ChatModals extends LitElement { } } -customElements.define('chat-modals', ChatModals); \ No newline at end of file +customElements.define('chat-modals', ChatModals) \ No newline at end of file diff --git a/plugins/plugins/core/components/ChatPage.js b/plugins/plugins/core/components/ChatPage.js index c996d325..c11f2aa8 100644 --- a/plugins/plugins/core/components/ChatPage.js +++ b/plugins/plugins/core/components/ChatPage.js @@ -35,7 +35,7 @@ import './ChatSideNavHeads.js' import './ChatLeaveGroup.js' import './ChatGroupSettings.js' import './ChatRightPanel.js' -import './ChatSeachResults.js' +import './ChatSearchResults.js' import './ChatGifs/ChatGifs.js' import '@material/mwc-button' @@ -44,10 +44,6 @@ import '@material/mwc-icon' import '@polymer/paper-dialog/paper-dialog.js' import '@polymer/paper-spinner/paper-spinner-lite.js' -registerTranslateConfig({ - loader: lang => fetch(`/language/${lang}.json`).then(res => res.json()) -}) - const chatLastSeen = localForage.createInstance({ name: "chat-last-seen", }) @@ -57,6 +53,7 @@ const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) class ChatPage extends LitElement { static get properties() { return { + theme: { type: String, reflect: true }, selectedAddress: { type: Object }, config: { type: Object }, messages: { type: Array }, @@ -1350,6 +1347,7 @@ class ChatPage extends LitElement { left: 0, offsetHeight: 0 } + this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light' } setOpenGifModal(value) { @@ -2377,10 +2375,20 @@ class ChatPage extends LitElement { } async firstUpdated() { + this.changeTheme() + window.addEventListener('storage', () => { const checkLanguage = localStorage.getItem('qortalLanguage') - use(checkLanguage) + const checkTheme = localStorage.getItem('qortalTheme') + this.userLanguage = checkLanguage + + if (checkTheme === 'dark') { + this.theme = 'dark' + } else { + this.theme = 'light' + } + document.querySelector('html').setAttribute('theme', this.theme) }) parentEpml.ready().then(() => { @@ -2406,6 +2414,16 @@ class ChatPage extends LitElement { } + changeTheme() { + const checkTheme = localStorage.getItem('qortalTheme') + if (checkTheme === 'dark') { + this.theme = 'dark' + } else { + this.theme = 'light' + } + document.querySelector('html').setAttribute('theme', this.theme) + } + async updated(changedProperties) { if (changedProperties && changedProperties.has('userLanguage')) { const userLang = changedProperties.get('userLanguage') @@ -3926,7 +3944,6 @@ class ChatPage extends LitElement { } pasteToTextBox(textarea) { - // Return focus to the window window.focus() diff --git a/plugins/plugins/core/components/ChatRightPanel.js b/plugins/plugins/core/components/ChatRightPanel.js index a63bc8c5..fac86ebf 100644 --- a/plugins/plugins/core/components/ChatRightPanel.js +++ b/plugins/plugins/core/components/ChatRightPanel.js @@ -1,6 +1,5 @@ import { LitElement, html, css } from "lit"; import { render } from "lit/html.js"; -import { get, translate } from "lit-translate"; import { Epml } from "../../../epml"; import { getUserNameFromAddress } from "../../utils/getUserNameFromAddress"; import snackbar from "./snackbar.js"; @@ -13,6 +12,9 @@ import '@vaadin/button'; import "./WrapperModal"; import "./TipUser" import "./UserInfo/UserInfo"; +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' + +const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) class ChatRightPanel extends LitElement { static get properties() { diff --git a/plugins/plugins/core/components/ChatScroller.js b/plugins/plugins/core/components/ChatScroller.js index 80f5426d..f2d06735 100644 --- a/plugins/plugins/core/components/ChatScroller.js +++ b/plugins/plugins/core/components/ChatScroller.js @@ -29,10 +29,6 @@ import '@vaadin/icon' import '@vaadin/icons' import '@vaadin/tooltip' -registerTranslateConfig({ - loader: lang => fetch(`/language/${lang}.json`).then(res => res.json()) -}) - const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) let toggledMessage = {} @@ -172,6 +168,7 @@ function processText(input) { class ChatScroller extends LitElement { static get properties() { return { + theme: { type: String, reflect: true }, getNewMessage: { attribute: false }, getOldMessage: { attribute: false }, escapeHTML: { attribute: false }, @@ -216,6 +213,7 @@ class ChatScroller extends LitElement { this.openTipUser = false this.openUserInfo = false this.listSeenMessages = [] + this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light' } addSeenMessage(val) { @@ -259,7 +257,6 @@ class ChatScroller extends LitElement { return messageArray }, []) - return html` ${this.isLoadingMessages ? html`
@@ -337,8 +334,20 @@ class ChatScroller extends LitElement { } async firstUpdated() { - this.emojiPicker.on('emoji', selection => { + this.changeTheme() + window.addEventListener('storage', () => { + const checkTheme = localStorage.getItem('qortalTheme') + + if (checkTheme === 'dark') { + this.theme = 'dark' + } else { + this.theme = 'light' + } + document.querySelector('html').setAttribute('theme', this.theme) + }) + + this.emojiPicker.on('emoji', selection => { this.sendMessage({ type: 'reaction', editedMessageObj: toggledMessage, @@ -355,6 +364,16 @@ class ChatScroller extends LitElement { this.viewElement.scrollTop = this.viewElement.scrollHeight + 50 } + changeTheme() { + const checkTheme = localStorage.getItem('qortalTheme') + if (checkTheme === 'dark') { + this.theme = 'dark' + } else { + this.theme = 'light' + } + document.querySelector('html').setAttribute('theme', this.theme) + } + _getOldMessage(_scrollElement) { this.getOldMessage(_scrollElement) } @@ -447,7 +466,7 @@ class MessageTemplate extends LitElement { goToRepliedMessage: { attribute: false }, listSeenMessages: { type: Array }, addSeenMessage: { attribute: false }, - chatId: { type: String }, + chatId: { type: String } } } @@ -1220,7 +1239,7 @@ class ChatMenu extends LitElement { setOpenPrivateMessage: { attribute: false }, setOpenTipUser: { attribute: false }, setUserName: { attribute: false }, - gif: { type: Boolean }, + gif: { type: Boolean } } } diff --git a/plugins/plugins/core/components/ChatSearchResults.js b/plugins/plugins/core/components/ChatSearchResults.js new file mode 100644 index 00000000..b8b19cb5 --- /dev/null +++ b/plugins/plugins/core/components/ChatSearchResults.js @@ -0,0 +1,72 @@ +import { LitElement, html } from 'lit' +import { render } from 'lit/html.js' +import { Epml } from '../../../epml.js' +import { chatSearchResultsStyles } from './ChatSearchResults-css.js' +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' +import '@vaadin/icon' +import '@vaadin/icons' + +const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) + +export class ChatSearchResults extends LitElement { + static get properties() { + return { + onClickFunc: { attribute: false }, + closeFunc: { attribute: false }, + searchResults: { type: Array }, + isOpen: { type: Boolean }, + loading: { type: Boolean } + } + } + + static styles = [chatSearchResultsStyles] + + render() { + return html` +
+ this.closeFunc()} + icon="vaadin:close-small" + slot="icon" + class="close-icon" + > + + ${this.loading ? ( + html` +
+ +
+ ` + ) : ( + html` +

${translate("chatpage.cchange36")}

+
+
+ ${this.searchResults.length === 0 ? ( + html`

${translate("chatpage.cchange37")}

` + ) : ( + html` + ${this.searchResults.map((result) => { + return ( + html` +
{ + this.shadowRoot.querySelector(".chat-result-card").classList.add("active"); + this.onClickFunc(result); + }}> +

+ ${result.name} +

+
+ ` + )} + )} + ` + )} +
+ ` + )} +
+ ` + } +} +customElements.define('chat-search-results', ChatSearchResults) diff --git a/plugins/plugins/core/components/ChatSelect.js b/plugins/plugins/core/components/ChatSelect.js index 4ea0fe03..99cb28d0 100644 --- a/plugins/plugins/core/components/ChatSelect.js +++ b/plugins/plugins/core/components/ChatSelect.js @@ -1,4 +1,5 @@ import { LitElement, html, css } from 'lit' +import { render } from 'lit/html.js' import { Epml } from '../../../epml.js' import '@material/mwc-icon' diff --git a/plugins/plugins/core/components/ChatSideNavHeads.js b/plugins/plugins/core/components/ChatSideNavHeads.js index b0798399..f9b8bd44 100644 --- a/plugins/plugins/core/components/ChatSideNavHeads.js +++ b/plugins/plugins/core/components/ChatSideNavHeads.js @@ -1,6 +1,7 @@ import { LitElement, html, css } from 'lit' +import { render } from 'lit/html.js' import { Epml } from '../../../epml.js' - +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' import '@material/mwc-icon' const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) diff --git a/plugins/plugins/core/components/ChatTextEditor copy.js b/plugins/plugins/core/components/ChatTextEditor copy.js index dfc572bc..c7a3ecdc 100644 --- a/plugins/plugins/core/components/ChatTextEditor copy.js +++ b/plugins/plugins/core/components/ChatTextEditor copy.js @@ -1,11 +1,12 @@ -import { LitElement, html, css } from "lit"; -import { get } from 'lit-translate'; -import { escape, unescape } from 'html-escaper'; -import { EmojiPicker } from 'emoji-picker-js'; -import { inputKeyCodes } from '../../utils/keyCodes.js'; -import { Epml } from '../../../epml.js'; +import { LitElement, html, css } from "lit" +import { escape, unescape } from 'html-escaper' +import { EmojiPicker } from 'emoji-picker-js' +import { inputKeyCodes } from '../../utils/keyCodes.js' +import { Epml } from '../../../epml.js' +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' + +const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) -const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }); class ChatTextEditor extends LitElement { static get properties() { return { @@ -298,13 +299,13 @@ class ChatTextEditor extends LitElement { } window.addEventListener('storage', () => { - const checkTheme = localStorage.getItem('qortalTheme'); - const chatbar = this.shadowRoot.getElementById(this.iframeId).contentWindow.document.getElementById('chatbarId'); + const checkTheme = localStorage.getItem('qortalTheme') + const chatbar = this.shadowRoot.getElementById(this.iframeId).contentWindow.document.getElementById('chatbarId') if (checkTheme === 'dark') { - this.theme = 'dark'; + this.theme = 'dark' chatbar.style.cssText = "color:#ffffff;" } else { - this.theme = 'light'; + this.theme = 'light' chatbar.style.cssText = "color:#080808;" } }) @@ -323,18 +324,18 @@ class ChatTextEditor extends LitElement { boxShadow: 'rgba(4, 4, 5, 0.15) 0px 0px 0px 1px, rgba(0, 0, 0, 0.24) 0px 8px 16px 0px', zIndex: 100 - }); + }) this.emojiPicker.on('emoji', selection => { - const emojiHtmlString = `${selection.emoji}`; + const emojiHtmlString = `${selection.emoji}` this.chatEditor.insertEmoji(emojiHtmlString); - }); + }) - this.emojiPickerHandler.addEventListener('click', () => this.emojiPicker.togglePicker(this.emojiPickerHandler)); + this.emojiPickerHandler.addEventListener('click', () => this.emojiPicker.togglePicker(this.emojiPickerHandler)) - await this.updateComplete; - this.initChatEditor(); + await this.updateComplete + this.initChatEditor() } async updated(changedProperties) { @@ -348,12 +349,12 @@ class ChatTextEditor extends LitElement { } } if (changedProperties && changedProperties.has('placeholder')) { - const captionEditor = this.shadowRoot.getElementById(this.iframeId).contentWindow.document.getElementById('chatbarId'); - captionEditor.setAttribute('data-placeholder', this.placeholder); + const captionEditor = this.shadowRoot.getElementById(this.iframeId).contentWindow.document.getElementById('chatbarId') + captionEditor.setAttribute('data-placeholder', this.placeholder) } if (changedProperties && changedProperties.has("imageFile")) { - this.chatMessageInput = "newChat"; + this.chatMessageInput = "newChat" } } @@ -365,12 +366,12 @@ class ChatTextEditor extends LitElement { sendMessageFunc(props) { if (this.chatMessageSize > 1000 ) { - parentEpml.request('showSnackBar', get("chatpage.cchange29")); - return; + parentEpml.request('showSnackBar', get("chatpage.cchange29")) + return }; - this.chatMessageSize = 0; - this.chatEditor.updateMirror(); - this._sendMessage(props); + this.chatMessageSize = 0 + this.chatEditor.updateMirror() + this._sendMessage(props) } getMessageSize(message){ diff --git a/plugins/plugins/core/components/ChatTextEditor.js b/plugins/plugins/core/components/ChatTextEditor.js index 105811da..123df641 100644 --- a/plugins/plugins/core/components/ChatTextEditor.js +++ b/plugins/plugins/core/components/ChatTextEditor.js @@ -1,13 +1,13 @@ import { LitElement, html, css } from "lit"; -import { get, translate } from 'lit-translate'; - -import { EmojiPicker } from 'emoji-picker-js'; -import { Epml } from '../../../epml.js'; +import { render } from 'lit/html.js' +import { EmojiPicker } from 'emoji-picker-js' +import { Epml } from '../../../epml.js' import '@material/mwc-icon' import '@material/mwc-checkbox' -// import { addAutoLoadImageChat } from "../../../../qortal-ui-core/src/redux/app/app-actions.js"; +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' + +const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) -const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }); class ChatTextEditor extends LitElement { static get properties() { return { @@ -589,11 +589,11 @@ mwc-checkbox::shadow .mdc-checkbox::after, mwc-checkbox::shadow .mdc-checkbox::b const checkTheme = localStorage.getItem('qortalTheme'); const chatbar = this.shadowRoot.querySelector('.element') if (checkTheme === 'dark') { - this.theme = 'dark'; + this.theme = 'dark' chatbar.style.cssText = "color:#ffffff;" } else { - this.theme = 'light'; + this.theme = 'light' chatbar.style.cssText = "color:#080808;" } diff --git a/plugins/plugins/core/components/ChatWelcomePage.js b/plugins/plugins/core/components/ChatWelcomePage.js index 9ba5f212..18ec1637 100644 --- a/plugins/plugins/core/components/ChatWelcomePage.js +++ b/plugins/plugins/core/components/ChatWelcomePage.js @@ -3,16 +3,16 @@ import { render } from 'lit/html.js' import { Epml } from '../../../epml.js' import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' -registerTranslateConfig({ - loader: lang => fetch(`/language/${lang}.json`).then(res => res.json()) -}) - import '@material/mwc-icon' import '@material/mwc-button' import '@material/mwc-dialog' import '@polymer/paper-spinner/paper-spinner-lite.js' import '@vaadin/grid' +registerTranslateConfig({ + loader: lang => fetch(`/language/${lang}.json`).then(res => res.json()) +}) + const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) class ChatWelcomePage extends LitElement { @@ -258,10 +258,16 @@ class ChatWelcomePage extends LitElement { firstUpdated() { this.changeTheme() + this.changeLanguage() + + this.clearConsole() + setInterval(() => { + this.clearConsole() + }, 60000) const stopKeyEventPropagation = (e) => { - e.stopPropagation(); - return false; + e.stopPropagation() + return false } this.shadowRoot.getElementById('sendTo').addEventListener('keydown', stopKeyEventPropagation); @@ -290,8 +296,6 @@ class ChatWelcomePage extends LitElement { document.querySelector('html').setAttribute('theme', this.theme) }) - let configLoaded = false - parentEpml.ready().then(() => { parentEpml.subscribe('selected_address', async selectedAddress => { this.selectedAddress = {} @@ -309,19 +313,22 @@ class ChatWelcomePage extends LitElement { parentEpml.imReady() } + clearConsole() { + console.clear() + } + changeTheme() { const checkTheme = localStorage.getItem('qortalTheme') if (checkTheme === 'dark') { - this.theme = 'dark'; + this.theme = 'dark' } else { - this.theme = 'light'; + this.theme = 'light' } - document.querySelector('html').setAttribute('theme', this.theme); + document.querySelector('html').setAttribute('theme', this.theme) } changeLanguage() { const checkLanguage = localStorage.getItem('qortalLanguage') - if (checkLanguage === null || checkLanguage.length === 0) { localStorage.setItem('qortalLanguage', 'us') use('us') @@ -343,7 +350,7 @@ class ChatWelcomePage extends LitElement { } else { this.sendMessage(); } - }; + } async sendMessage() { this.isLoading = true; diff --git a/plugins/plugins/core/components/ImageComponent.js b/plugins/plugins/core/components/ImageComponent.js index af03aadc..cb35702c 100644 --- a/plugins/plugins/core/components/ImageComponent.js +++ b/plugins/plugins/core/components/ImageComponent.js @@ -1,6 +1,6 @@ -import { LitElement, html, css } from 'lit'; -import { translate, get } from 'lit-translate'; -import { render } from 'lit/html.js'; +import { LitElement, html, css } from 'lit' +import { render } from 'lit/html.js' +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' export class ImageComponent extends LitElement { @@ -48,52 +48,51 @@ border: 1px solid var(--mdc-theme-primary ); } constructor() { - super(); - this.attempts = 0; - this.maxAttempts = 5; + super() + this.attempts = 0 + this.maxAttempts = 5 } getApiKey() { - const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]; - let apiKey = myNode.apiKey; - return apiKey; + const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node] + let apiKey = myNode.apiKey + return apiKey } async _fetchImage() { this.attempts++; - if (this.attempts > this.maxAttempts) return; + if (this.attempts > this.maxAttempts) return await new Promise((res) => { setTimeout(() => { - res(); + res() }, 1000) - }); + }) try { - const response = await fetch(this.gif.url); - const data = await response.json(); - console.log({data}); + const response = await fetch(this.gif.url) + const data = await response.json() if (data.ok) { - this.error = false; + this.error = false this.gif = { ...this.gif, url: data.src }; this.requestUpdate(); } else if (!data.ok || data.error) { - this.error = true; + this.error = true } else { - this.error = false; + this.error = false } } catch (error) { - this.error = true; - console.error(error); - this._fetchImage(); + this.error = true + console.error(error) + this._fetchImage() } } render() { if (this.error && this.attempts <= this.maxAttempts) { setTimeout(() => { - this._fetchImage(); - }, 1000); + this._fetchImage() + }, 1000) } return html` ${this.gif && !this.error @@ -124,4 +123,4 @@ alt=${this.alt} } } -customElements.define('image-component', ImageComponent); +customElements.define('image-component', ImageComponent) diff --git a/plugins/plugins/core/components/LevelFounder.js b/plugins/plugins/core/components/LevelFounder.js index bab9cd8e..ade53a0f 100644 --- a/plugins/plugins/core/components/LevelFounder.js +++ b/plugins/plugins/core/components/LevelFounder.js @@ -3,11 +3,6 @@ import { render } from 'lit/html.js' import { Epml } from '../../../epml.js' import snackbar from './snackbar.js' import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' - -registerTranslateConfig({ - loader: lang => fetch(`/language/${lang}.json`).then(res => res.json()) -}) - import '@polymer/paper-tooltip/paper-tooltip.js' const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) @@ -15,8 +10,8 @@ const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) class LevelFounder extends LitElement { static get properties() { return { - checkleveladdress: { type: String, attribute: true }, - selectedAddress: { type: Object }, + checkleveladdress: { type: String }, + selectedAddress: { type: String }, config: { type: Object }, memberInfo: { type: Array } } @@ -106,16 +101,8 @@ class LevelFounder extends LitElement { } firstUpdated() { - this.changeLanguage() this.checkAddressInfo() - window.addEventListener('storage', () => { - const checkLanguage = localStorage.getItem('qortalLanguage') - use(checkLanguage) - }) - - let configLoaded = false - parentEpml.ready().then(() => { parentEpml.subscribe('selected_address', async selectedAddress => { this.selectedAddress = {} @@ -127,17 +114,6 @@ class LevelFounder extends LitElement { parentEpml.imReady() } - changeLanguage() { - const checkLanguage = localStorage.getItem('qortalLanguage') - - if (checkLanguage === null || checkLanguage.length === 0) { - localStorage.setItem('qortalLanguage', 'us') - use('us') - } else { - use(checkLanguage) - } - } - async checkAddressInfo() { let toCheck = this.checkleveladdress const memberInfo = await parentEpml.request('apiCall', { @@ -147,23 +123,23 @@ class LevelFounder extends LitElement { } renderFounder() { - let adressfounder = this.memberInfo.flags; + let adressfounder = this.memberInfo.flags if (adressfounder === 1) { return html ` F FOUNDER ` } else { - return null; + return html `` } } renderLevel() { - let adresslevel = this.memberInfo.level; + let adresslevel = this.memberInfo.level return adresslevel ? html ` ${`badge-${adresslevel}`} - ${translate("mintingpage.mchange27")} ${adresslevel} + ${translate("mintingpage.mchange27")} ${adresslevel} ` : '' } @@ -174,9 +150,9 @@ class LevelFounder extends LitElement { } getApiKey() { - const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]; - let apiKey = myNode.apiKey; - return apiKey; + const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node] + let apiKey = myNode.apiKey + return apiKey } } diff --git a/plugins/plugins/core/components/NameMenu.js b/plugins/plugins/core/components/NameMenu.js index fc37ee4b..c4359637 100644 --- a/plugins/plugins/core/components/NameMenu.js +++ b/plugins/plugins/core/components/NameMenu.js @@ -3,11 +3,6 @@ import { render } from 'lit/html.js' import { Epml } from '../../../epml.js' import snackbar from './snackbar.js' import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' - -registerTranslateConfig({ - loader: lang => fetch(`/language/${lang}.json`).then(res => res.json()) -}) - import '@material/mwc-snackbar' import '@material/mwc-button' import '@material/mwc-dialog' @@ -250,17 +245,12 @@ class NameMenu extends LitElement { } firstUpdated() { - this.getChatBlockedAdresses(); + this.getChatBlockedAdresses() setInterval(() => { - this.getChatBlockedAdresses(); + this.getChatBlockedAdresses() }, 60000) - window.addEventListener('storage', () => { - const checkLanguage = localStorage.getItem('qortalLanguage'); - use(checkLanguage); - }) - window.onclick = function(event) { if (!event.target.matches('.block')) { var dropdowns = document.getElementsByClassName('dropdown-content'); @@ -275,12 +265,12 @@ class NameMenu extends LitElement { } const stopKeyEventPropagation = (e) => { - e.stopPropagation(); - return false; + e.stopPropagation() + return false } - this.shadowRoot.getElementById('sendTo').addEventListener('keydown', stopKeyEventPropagation); - this.shadowRoot.getElementById('messageBox').addEventListener('keydown', stopKeyEventPropagation); + this.shadowRoot.getElementById('sendTo').addEventListener('keydown', stopKeyEventPropagation) + this.shadowRoot.getElementById('messageBox').addEventListener('keydown', stopKeyEventPropagation) const getDataFromURL = () => { let tempUrl = document.location.href @@ -309,17 +299,6 @@ class NameMenu extends LitElement { parentEpml.imReady() } - changeLanguage() { - const checkLanguage = localStorage.getItem('qortalLanguage') - - if (checkLanguage === null || checkLanguage.length === 0) { - localStorage.setItem('qortalLanguage', 'us') - use('us') - } else { - use(checkLanguage) - } - } - myMenu() { this.shadowRoot.getElementById('myDropdown').classList.toggle('showList') this.shadowRoot.querySelector('#blockNameDialog').close() diff --git a/plugins/plugins/core/components/TimeAgo.js b/plugins/plugins/core/components/TimeAgo.js index 66164179..180c6a06 100644 --- a/plugins/plugins/core/components/TimeAgo.js +++ b/plugins/plugins/core/components/TimeAgo.js @@ -24,11 +24,11 @@ class TimeAgo extends LitElement { } }); - this.shadowRoot.querySelector('time-ago').setAttribute('title', ''); + this.shadowRoot.querySelector('time-ago').setAttribute('title', '') } constructor() { - super(); + super() this.timestamp = 0 this.timeIso = '' this.format = '' @@ -41,7 +41,7 @@ class TimeAgo extends LitElement { } renderTime(timestamp) { - timestamp === undefined ? this.timeIso = '' : this.timeIso = new Date(timestamp).toISOString(); + timestamp === undefined ? this.timeIso = '' : this.timeIso = new Date(timestamp).toISOString() } firstUpdated() { diff --git a/plugins/plugins/core/components/TipUser.js b/plugins/plugins/core/components/TipUser.js index eabbc102..d7b79b7f 100644 --- a/plugins/plugins/core/components/TipUser.js +++ b/plugins/plugins/core/components/TipUser.js @@ -1,10 +1,10 @@ -import { LitElement, html } from 'lit'; -import { render } from 'lit/html.js'; -import { get, translate } from 'lit-translate'; -import { tipUserStyles } from './TipUser-css.js'; -import { Epml } from '../../../epml'; -import '@vaadin/button'; -import '@polymer/paper-progress/paper-progress.js'; +import { LitElement, html } from 'lit' +import { render } from 'lit/html.js' +import { tipUserStyles } from './TipUser-css.js' +import { Epml } from '../../../epml' +import '@vaadin/button' +import '@polymer/paper-progress/paper-progress.js' +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' const parentEpml = new Epml({ type: "WINDOW", source: window.parent }); @@ -34,15 +34,15 @@ export class TipUser extends LitElement { static styles = [tipUserStyles] async firstUpdated() { - await this.fetchWalletDetails(); + await this.fetchWalletDetails() } updated(changedProperties) { if (changedProperties && changedProperties.has("closeTipUser")) { if (this.closeTipUser) { - this.shadowRoot.getElementById("amountInput").value = ""; - this.errorMessage = ""; - this.successMessage = ""; + this.shadowRoot.getElementById("amountInput").value = "" + this.errorMessage = "" + this.successMessage = "" } } } @@ -52,7 +52,7 @@ export class TipUser extends LitElement { type: "api", url: `/addresses/lastreference/${this.myAddress.address}`, }) - return myRef; + return myRef } renderSuccessText() { @@ -64,9 +64,9 @@ export class TipUser extends LitElement { } getApiKey() { - const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]; - let apiKey = myNode.apiKey; - return apiKey; + const myNode = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node] + let apiKey = myNode.apiKey + return apiKey } async fetchWalletDetails() { @@ -78,85 +78,85 @@ export class TipUser extends LitElement { let snack4string = get("chatpage.cchange48") parentEpml.request('showSnackBar', `${snack4string}`) } else { - this.walletBalance = Number(res).toFixed(8); + this.walletBalance = Number(res).toFixed(8) } }) } async sendQort() { - const amount = this.shadowRoot.getElementById("amountInput").value; - let recipient = this.userName; - this.sendMoneyLoading = true; - this.btnDisable = true; + const amount = this.shadowRoot.getElementById("amountInput").value + let recipient = this.userName + this.sendMoneyLoading = true + this.btnDisable = true if (parseFloat(amount) + parseFloat(0.001) > parseFloat(this.walletBalance)) { - this.sendMoneyLoading = false; - this.btnDisable = false; - let snack1string = get("chatpage.cchange51"); - parentEpml.request('showSnackBar', `${snack1string}`); - return false; + this.sendMoneyLoading = false + this.btnDisable = false + let snack1string = get("chatpage.cchange51") + parentEpml.request('showSnackBar', `${snack1string}`) + return false } if (parseFloat(amount) <= 0) { - this.sendMoneyLoading = false; - this.btnDisable = false; - let snack2string = get("chatpage.cchange52"); - parentEpml.request('showSnackBar', `${snack2string}`); - return false; + this.sendMoneyLoading = false + this.btnDisable = false + let snack2string = get("chatpage.cchange52") + parentEpml.request('showSnackBar', `${snack2string}`) + return false } if (recipient.length === 0) { - this.sendMoneyLoading = false; - this.btnDisable = false; - let snack3string = get("chatpage.cchange53"); - parentEpml.request('showSnackBar', `${snack3string}`); - return false; + this.sendMoneyLoading = false + this.btnDisable = false + let snack3string = get("chatpage.cchange53") + parentEpml.request('showSnackBar', `${snack3string}`) + return false } const validateName = async (receiverName) => { - let myRes; + let myRes let myNameRes = await parentEpml.request('apiCall', { type: 'api', url: `/names/${receiverName}`, }) if (myNameRes.error === 401) { - myRes = false; + myRes = false } else { - myRes = myNameRes; + myRes = myNameRes } return myRes; } const validateAddress = async (receiverAddress) => { - let myAddress = await window.parent.validateAddress(receiverAddress); - return myAddress; + let myAddress = await window.parent.validateAddress(receiverAddress) + return myAddress } const validateReceiver = async (recipient) => { - let lastRef = await this.getLastRef(); - let isAddress; + let lastRef = await this.getLastRef() + let isAddress try { - isAddress = await validateAddress(recipient); + isAddress = await validateAddress(recipient) } catch (err) { - isAddress = false; + isAddress = false } if (isAddress) { - let myTransaction = await makeTransactionRequest(recipient, lastRef); - getTxnRequestResponse(myTransaction); + let myTransaction = await makeTransactionRequest(recipient, lastRef) + getTxnRequestResponse(myTransaction) } else { - let myNameRes = await validateName(recipient); + let myNameRes = await validateName(recipient) if (myNameRes !== false) { let myNameAddress = myNameRes.owner let myTransaction = await makeTransactionRequest(myNameAddress, lastRef) getTxnRequestResponse(myTransaction) } else { console.error(this.renderReceiverText()) - this.errorMessage = this.renderReceiverText(); - this.sendMoneyLoading = false; - this.btnDisable = false; + this.errorMessage = this.renderReceiverText() + this.sendMoneyLoading = false + this.btnDisable = false } } } @@ -169,23 +169,23 @@ export class TipUser extends LitElement { }); if (getNames?.length > 0 ) { - return getNames[0].name; + return getNames[0].name } else { - return ''; + return '' } } catch (error) { - return ""; + return "" } } const makeTransactionRequest = async (receiver, lastRef) => { - let myReceiver = receiver; - let mylastRef = lastRef; - let dialogamount = get("transactions.amount"); - let dialogAddress = get("login.address"); - let dialogName = get("login.name"); - let dialogto = get("transactions.to"); - let recipientName = await getName(myReceiver); + let myReceiver = receiver + let mylastRef = lastRef + let dialogamount = get("transactions.amount") + let dialogAddress = get("login.address") + let dialogName = get("login.name") + let dialogto = get("transactions.to") + let recipientName = await getName(myReceiver) let myTxnrequest = await parentEpml.request('transaction', { type: 2, nonce: this.myAddress.nonce, @@ -201,33 +201,33 @@ export class TipUser extends LitElement { dialogName }, }) - return myTxnrequest; + return myTxnrequest } const getTxnRequestResponse = (txnResponse) => { if (txnResponse.success === false && txnResponse.message) { - this.errorMessage = txnResponse.message; - this.sendMoneyLoading = false; - this.btnDisable = false; - throw new Error(txnResponse); + this.errorMessage = txnResponse.message + this.sendMoneyLoading = false + this.btnDisable = false + throw new Error(txnResponse) } else if (txnResponse.success === true && !txnResponse.data.error) { - this.shadowRoot.getElementById('amountInput').value = ''; - this.errorMessage = ''; - this.successMessage = this.renderSuccessText(); - this.sendMoneyLoading = false; - this.btnDisable = false; + this.shadowRoot.getElementById('amountInput').value = '' + this.errorMessage = '' + this.successMessage = this.renderSuccessText() + this.sendMoneyLoading = false + this.btnDisable = false setTimeout(() => { - this.setOpenTipUser(false); - this.successMessage = ""; - }, 3000); + this.setOpenTipUser(false) + this.successMessage = "" + }, 3000) } else { - this.errorMessage = txnResponse.data.message; - this.sendMoneyLoading = false; - this.btnDisable = false; - throw new Error(txnResponse); + this.errorMessage = txnResponse.data.message + this.sendMoneyLoading = false + this.btnDisable = false + throw new Error(txnResponse) } } - validateReceiver(recipient); + validateReceiver(recipient) } render() { @@ -274,4 +274,4 @@ export class TipUser extends LitElement { `; } } -customElements.define('tip-user', TipUser); +customElements.define('tip-user', TipUser) diff --git a/plugins/plugins/core/components/ToolTip.js b/plugins/plugins/core/components/ToolTip.js index 2994a00e..d70f25fd 100644 --- a/plugins/plugins/core/components/ToolTip.js +++ b/plugins/plugins/core/components/ToolTip.js @@ -1,5 +1,6 @@ import { LitElement, html, css } from 'lit' import { Epml } from '../../../epml.js' +import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) diff --git a/plugins/plugins/core/components/UserInfo/UserInfo.js b/plugins/plugins/core/components/UserInfo/UserInfo.js index 09ad6b3b..6a44e408 100644 --- a/plugins/plugins/core/components/UserInfo/UserInfo.js +++ b/plugins/plugins/core/components/UserInfo/UserInfo.js @@ -8,10 +8,6 @@ import { cropAddress } from '../../../utils/cropAddress.js' import '@polymer/paper-progress/paper-progress.js' import '@vaadin/button' -registerTranslateConfig({ - loader: lang => fetch(`/language/${lang}.json`).then(res => res.json()) -}) - const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }) export class UserInfo extends LitElement { diff --git a/plugins/plugins/core/components/WrapperModal.js b/plugins/plugins/core/components/WrapperModal.js index bcb85e5b..e4d5f162 100644 --- a/plugins/plugins/core/components/WrapperModal.js +++ b/plugins/plugins/core/components/WrapperModal.js @@ -1,33 +1,32 @@ -import { LitElement, html } from 'lit'; -import { render } from 'lit/html.js'; +import { LitElement, html } from 'lit' +import { render } from 'lit/html.js' import { wrapperModalStyles } from './WrapperModal-css.js' export class WrapperModal extends LitElement { - static get properties() { - return { - customStyle: {type: String}, - onClickFunc: { attribute: false }, - zIndex: {type: Number} + static get properties() { + return { + customStyle: {type: String}, + onClickFunc: { attribute: false }, + zIndex: {type: Number} + } } - } - static styles = [wrapperModalStyles] + static styles = [wrapperModalStyles] - render() { - return html` -
-
{ - this.onClickFunc(); - }}> -
- -
- `; - } + render() { + return html` +
+
{ this.onClickFunc() }} + > +
+ +
+ ` + } } -customElements.define('wrapper-modal', WrapperModal); +customElements.define('wrapper-modal', WrapperModal) diff --git a/plugins/plugins/core/components/qortal-info-view.js b/plugins/plugins/core/components/qortal-info-view.js index 080e71aa..c212e8c7 100644 --- a/plugins/plugins/core/components/qortal-info-view.js +++ b/plugins/plugins/core/components/qortal-info-view.js @@ -1,7 +1,6 @@ import { LitElement, html, css } from 'lit' import { render } from 'lit/html.js' import { use, get, translate, translateUnsafeHTML, registerTranslateConfig } from 'lit-translate' - import '@polymer/paper-dialog/paper-dialog.js' import '@material/mwc-button' import '@material/mwc-icon' diff --git a/plugins/plugins/core/messaging/q-chat/q-chat.js b/plugins/plugins/core/messaging/q-chat/q-chat.js deleted file mode 100644 index 18e1257f..00000000 --- a/plugins/plugins/core/messaging/q-chat/q-chat.js +++ /dev/null @@ -1,9654 +0,0 @@ -!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";const e=window,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),o=new WeakMap;let n=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const i=this.t;if(t&&void 0===e){const t=void 0!==i&&1===i.length;t&&(e=o.get(i)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),t&&o.set(i,e))}return e}toString(){return this.cssText}};const s=(e,...t)=>{const o=1===e.length?e[0]:t.reduce(((t,i,o)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[o+1]),e[0]);return new n(o,e,i)},r=t?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(e=>new n("string"==typeof e?e:e+"",void 0,i))(t)})(e):e;var a;const l=window,h=l.trustedTypes,m=h?h.emptyScript:"",c=l.reactiveElementPolyfillSupport,d={toAttribute(e,t){switch(t){case Boolean:e=e?m:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},p=(e,t)=>t!==e&&(t==t||e==e),j={attribute:!0,type:String,converter:d,reflect:!1,hasChanged:p};let P=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;this.finalize(),(null!==(t=this.h)&&void 0!==t?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,i)=>{const o=this._$Ep(i,t);void 0!==o&&(this._$Ev.set(o,i),e.push(o))})),e}static createProperty(e,t=j){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const i="symbol"==typeof e?Symbol():"__"+e,o=this.getPropertyDescriptor(e,i,t);void 0!==o&&Object.defineProperty(this.prototype,e,o)}}static getPropertyDescriptor(e,t,i){return{get(){return this[t]},set(o){const n=this[e];this[t]=o,this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||j}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),void 0!==e.h&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of t)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(r(e))}else void 0!==e&&t.push(r(e));return t}static _$Ep(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(e=this.constructor.h)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,i;(null!==(t=this._$ES)&&void 0!==t?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(i=e.hostConnected)||void 0===i||i.call(e))}removeController(e){var t;null===(t=this._$ES)||void 0===t||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])}))}createRenderRoot(){var i;const o=null!==(i=this.shadowRoot)&&void 0!==i?i:this.attachShadow(this.constructor.shadowRootOptions);return((i,o)=>{t?i.adoptedStyleSheets=o.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):o.forEach((t=>{const o=document.createElement("style"),n=e.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=t.cssText,i.appendChild(o)}))})(o,this.constructor.elementStyles),o}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EO(e,t,i=j){var o;const n=this.constructor._$Ep(e,i);if(void 0!==n&&!0===i.reflect){const s=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:d).toAttribute(t,i.type);this._$El=e,null==s?this.removeAttribute(n):this.setAttribute(n,s),this._$El=null}}_$AK(e,t){var i;const o=this.constructor,n=o._$Ev.get(e);if(void 0!==n&&this._$El!==n){const e=o.getPropertyOptions(n),s="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null===(i=e.converter)||void 0===i?void 0:i.fromAttribute)?e.converter:d;this._$El=n,this[n]=s.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,i){let o=!0;void 0!==e&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||p)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===i.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((e,t)=>this[t]=e)),this._$Ei=void 0);let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(i)):this._$Ek()}catch(e){throw t=!1,this._$Ek(),e}t&&this._$AE(i)}willUpdate(e){}_$AE(e){var t;null===(t=this._$ES)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$EO(t,this[t],e))),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};var w;P.finalized=!0,P.elementProperties=new Map,P.elementStyles=[],P.shadowRootOptions={mode:"open"},null==c||c({ReactiveElement:P}),(null!==(a=l.reactiveElementVersions)&&void 0!==a?a:l.reactiveElementVersions=[]).push("1.6.1");const u=window,f=u.trustedTypes,M=f?f.createPolicy("lit-html",{createHTML:e=>e}):void 0,Z="$lit$",K=`lit$${(Math.random()+"").slice(9)}$`,y="?"+K,g=`<${y}>`,D=document,x=()=>D.createComment(""),b=e=>null===e||"object"!=typeof e&&"function"!=typeof e,v=Array.isArray,Y=e=>v(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]),S="[ \t\n\f\r]",T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,X=/-->/g,E=/>/g,k=RegExp(`>|${S}(?:([^\\s"'>=/]+)(${S}*=${S}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),z=/'/g,G=/"/g,A=/^(?:script|style|textarea|title)$/i,O=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),C=O(1),N=O(2),V=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),_=new WeakMap,I=D.createTreeWalker(D,129,null,!1),H=(e,t)=>{const i=e.length-1,o=[];let n,s=2===t?"":"",r=T;for(let t=0;t"===l[0]?(r=null!=n?n:T,h=-1):void 0===l[1]?h=-2:(h=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?k:'"'===l[3]?G:z):r===G||r===z?r=k:r===X||r===E?r=T:(r=k,n=void 0);const c=r===k&&e[t+1].startsWith("/>")?" ":"";s+=r===T?i+g:h>=0?(o.push(a),i.slice(0,h)+Z+i.slice(h)+K+c):i+K+(-2===h?(o.push(void 0),t):c)}const a=s+(e[i]||"")+(2===t?"":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==M?M.createHTML(a):a,o]};let U=class e{constructor({strings:t,_$litType$:i},o){let n;this.parts=[];let s=0,r=0;const a=t.length-1,l=this.parts,[h,m]=H(t,i);if(this.el=e.createElement(h,o),I.currentNode=this.el.content,2===i){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(n=I.nextNode())&&l.length0){n.textContent=f?f.emptyScript:"";for(let i=0;i2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=W}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,i,o){const n=this.strings;let s=!1;if(void 0===n)e=R(this,e,t,0),s=!b(e)||e!==this._$AH&&e!==V,s&&(this._$AH=e);else{const o=e;let r,a;for(e=n[0],r=0;r{var o,n;const s=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:t;let r=s._$litPart$;if(void 0===r){const e=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;s._$litPart$=r=new J(t.insertBefore(x(),e),e,void 0,null!=i?i:{})}return r._$AI(e),r};var ne,se;let re=class extends P{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const i=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=i.firstChild),i}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=oe(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}render(){return V}};re.finalized=!0,re._$litElement$=!0,null===(ne=globalThis.litElementHydrateSupport)||void 0===ne||ne.call(globalThis,{LitElement:re});const ae=globalThis.litElementPolyfillSupport;function le(e=!1){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(e){}if(e){const e=`[Passive Events Support] "passive" option is ${t?"":"not "}supported by your browser.`;t?console.info(e):console.warn(e)}return t}function he(e){return["touchstart","touchmove","touchenter","touchend","touchleave","wheel","mousewheel"].includes(e)}null==ae||ae({LitElement:re}),(null!==(se=globalThis.litElementVersions)&&void 0!==se?se:globalThis.litElementVersions=[]).push("3.3.2");class me{static prepareOutgoingData(e){return JSON.stringify(e)}constructor(e){if(!e)throw new Error("Source must be spcified");if(!this.constructor.type)throw new Error("Type not defined");if(this.constructor.name||console.warn("No name provided"),this.constructor.description||console.warn("No description provided"),!this.sendMessage)throw new Error("A new target requires a sendMessage method")}}const ce={},de={};class pe{static registerPlugin(e,t){return e.init(pe,t),pe}static registerTargetType(e,t){if(e in de)throw new Error("Target type has already been registered");if(!(t.prototype instanceof me))throw new Error("Target constructors must inherit from the Target base class");return de[e]=t,pe}static registerEpmlMessageType(e,t){return ce[e]=t,pe}registerPlugin(e){return e.init(this),this}static handleMessage(e,t){const i=pe.prepareIncomingData(e);"EpmlMessageType"in i&&ce[i.EpmlMessageType](i,t,this)}static prepareIncomingData(e){return"string"!=typeof e?e:JSON.parse(e)}static createTargets(e){Array.isArray(e)||(e=[e]);const t=[];for(const i of e)void 0===i.allowObjects&&(i.allowObjects=!1),t.push(...pe.createTarget(i));return t}static createTarget(e){if(!de[e.type])throw new Error(`Target type '${e.type}' not registered`);let t=new de[e.type](e.source);Array.isArray(t)||(t=[t]);for(const i of t)i.allowObjects=e.allowObjects;return t}constructor(e){this.targets=this.constructor.createTargets(e)}}var je=(e,t)=>{for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t};const Pe=15,we="EPML_READY_STATE_CHECK",ue="EPML_READY_STATE_CHECK_RESPONSE",fe={},Me={init:(e,t)=>{if(e.prototype.ready)throw new Error("Epml.prototype.ready is already defined");if(e.prototype.imReady)throw new Error("Epml.prototype.imReady is already defined");e.prototype.ready=ye,e.prototype.resetReadyCheck=ge,e.prototype.imReady=Ke,e.registerEpmlMessageType(we,Ze),e.registerEpmlMessageType(ue,xe)}};function Ze(e,t){t._i_am_ready&&t.sendMessage({EpmlMessageType:ue,requestID:e.requestID})}function Ke(){for(const e of this.targets)e._i_am_ready=!0}function ye(){return this._ready_plugin=this._ready_plugin||{},this._ready_plugin.pendingReadyResolves=this._ready_plugin.pendingReadyResolves?this._ready_plugin.pendingReadyResolves:[],this._pending_ready_checking||(this._pending_ready_checking=!0,De.call(this,this.targets).then((()=>{this._ready_plugin.pendingReadyResolves.forEach((e=>e()))}))),new Promise((e=>{this._ready_plugin.isReady?e():this._ready_plugin.pendingReadyResolves.push(e)}))}function ge(){this._ready_plugin=this._ready_plugin||{},this._ready_plugin.isReady=!1}function De(e){return this._ready_plugin=this._ready_plugin||{},this._ready_plugin.pendingReadyResolves=[],Promise.all(e.map((e=>new Promise(((t,i)=>{const o=je(),n=setInterval((()=>{e.sendMessage({EpmlMessageType:we,requestID:o})}),Pe);fe[o]=()=>{clearInterval(n),t()}}))))).then((()=>{this._ready_plugin.isReady=!0}))}function xe(e,t){t._ready_plugin=t._ready_plugin||{},t._ready_plugin._is_ready=!0,fe[e.requestID]()}const be=new Map;class ve extends me{static get sources(){return Array.from(be.keys())}static get targets(){return Array.from(be.values())}static getTargetFromSource(e){return be.get(e)}static hasTarget(e){return be.has(e)}static get type(){return"WINDOW"}static get name(){return"Content window plugin"}static get description(){return"Allows Epml to communicate with iframes and popup windows."}static test(e){return"object"==typeof e&&e===e.self}isFrom(e){}constructor(e){if(super(e),be.has(e))return be.get(e);if(!this.constructor.test(e))throw new Error("Source can not be used with target");this._source=e,this._sourceOrigin="*",be.set(e,this)}get source(){return this._source}sendMessage(e){e=me.prepareOutgoingData(e),this._source.postMessage(e,this._sourceOrigin)}}var Ye={init:function(e){!function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else{if(!e.attachEvent)throw new Error("Could not bind event.");e.attachEvent("on"+t,i)}}(window,"message",(t=>{ve.hasTarget(t.source)&&e.handleMessage(t.data,ve.getTargetFromSource(t.source))})),e.registerTargetType(ve.type,ve)}};const Se="REQUEST",Te="REQUEST_RESPONSE",Xe=new Map,Ee={},ke={init:(e,t)=>{if(e.prototype.request)throw new Error("Epml.prototype.request is already defined");if(e.prototype.route)throw new Error("Empl.prototype.route is already defined");e.prototype.request=ze,e.prototype.route=Oe,e.registerEpmlMessageType(Se,Ae),e.registerEpmlMessageType(Te,Ge)}},ze=function(e,t,i){return Promise.all(this.targets.map((o=>{const n=je(),s={EpmlMessageType:Se,requestOrResponse:"request",requestID:n,requestType:e,data:t};return o.sendMessage(s),new Promise(((e,t)=>{let o;i&&(o=setTimeout((()=>{delete Ee[n],t(new Error("Request timed out"))}),i)),Ee[n]=(...t)=>{o&&clearTimeout(o),e(...t)}}))}))).then((e=>{if(1===this.targets.length)return e[0]}))};function Ge(e,t,i){if(e.requestID in Ee){const t=e.data;Ee[e.requestID](t)}else console.warn("requestID not found in pendingRequests")}function Ae(e,t){if(!Xe.has(t))return void console.warn("Route does not exist - missing target");const i=Xe.get(t)[e.requestType];i?i(e,t):console.warn("Route does not exist")}function Oe(e,t){if(this.routes||(this.routes={}),!this.routes[e])for(const i of this.targets){Xe.has(i)||Xe.set(i,{});Xe.get(i)[e]=(e,i)=>{Promise.resolve(t(e)).catch((e=>e instanceof Error?e.message:e)).then((t=>{i.sendMessage({data:t,EpmlMessageType:Te,requestOrResponse:"request",requestID:e.requestID})}))}}}const Ce="PROXY_MESSAGE",Ne=new class{constructor(e){this._map=e||new Map,this._revMap=new Map,this._map.forEach(((e,t)=>{this._revMap.set(t,e)}))}values(){return this._map.values()}entries(){return this._map.entries()}push(e,t){this._map.set(e,t),this._revMap.set(t,e)}getByKey(e){return this._map.get(e)}getByValue(e){return this._revMap.get(e)}hasKey(e){return this._map.has(e)}hasValue(e){return this._revMap.has(e)}deleteByKey(e){const t=this._map.get(e);this._map.delete(e),this._revMap.delete(t)}deleteByValue(e){const t=this._revMap.get(e);this._map.delete(t),this._revMap.delete(e)}};class Ve extends me{static get proxySources(){return Ne}static get sources(){for(const[e,t]of Ne)for(const[e]of t);Array.from(Ne.entries()).map(((e,t)=>({proxy:e,target:Array.from(t.keys())[0]})))}static get targets(){return Array.from(Ne.values())}static getTargetFromSource(e){return Ne.getByValue(e)}static hasTarget(e){return Ne.hasValue(e)}static get type(){return"PROXY"}static get name(){return"Proxy target"}static get description(){return"Uses other target, and proxies requests, allowing things like iframes to communicate through their host"}static test(e){return"object"==typeof e&&e.proxy instanceof this.Epml}isFrom(e){}constructor(e){if(super(e),this.constructor.proxySources.push(e.id,this),!this.constructor.test(e))throw new Error("Source can not be used with target");this._source=e}get source(){return this._source}sendMessage(e){const t=je();e=me.prepareOutgoingData(e),e={EpmlMessageType:Ce,state:"TRANSIT",requestID:t,target:this._source.target,message:e,id:this._source.id},this._source.proxy.targets[0].sendMessage(e)}}const We=Ve.proxySources;let _e;var Ie={init:function(e){Object.defineProperty(Ve,"Epml",{get:()=>e}),_e=e,e.registerTargetType(Ve.type,Ve),e.registerProxyInstance=Ue,e.registerEpmlMessageType(Ce,He)}};function He(e,t){if("TRANSIT"===e.state){const t=We.getByKey(e.target);if(!t)return void console.warn(`Target ${e.target} not registered.`);e.state="DELIVERY",t.targets.forEach((t=>t.sendMessage(e)))}else if("DELIVERY"===e.state){if(!We.getByKey(e.target))return void console.warn(`Target ${e.target} not registered.`);const t=We.getByKey(e.target);_e.handleMessage(e.message,t)}}function Ue(e,t){We.hasKey(e)&&console.warn(`${e} is already defined. Overwriting...`),We.push(e,t)}new Map;const Re="STREAM_UPDATE",Fe={};class Je{static get streams(){return Fe}constructor(e,t=(()=>{})){if(this._name=e,this.targets=[],this._subscriptionFn=t,e in Fe)return console.warn(`Stream with name ${e} already exists! Returning it instead`),Fe[e];Fe[e]=this}async subscribe(e){e in this.targets&&console.info("Target is already subscribed to this stream");const t=await this._subscriptionFn();this._sendMessage(t,e),this.targets.push(e)}_sendMessage(e,t){t.sendMessage({data:me.prepareOutgoingData(e),EpmlMessageType:Re,streamName:this._name})}emit(e){this.targets.forEach((t=>this._sendMessage(e,t)))}}const Le="JOIN_STREAM",Be={},Qe={init:(e,t)=>{if(e.prototype.subscribe)throw new Error("Epml.prototype.subscribe is already defined");if(e.prototype.createStream)throw new Error("Empl.prototype.createStream is already defined");e.prototype.subscribe=qe,e.registerEpmlMessageType(Le,$e),e.registerEpmlMessageType(Re,et)}},$e=function(e,t){const i=e.data.name,o=Je.streams[i];o?o.subscribe(t):console.warn(`No stream with name ${i}`,this)},qe=function(e,t){this.targets.forEach((t=>{t.sendMessage({EpmlMessageType:Le,data:{name:e}})})),Be[e]=Be[e]||[],Be[e].push(t)},et=function(e,t){Be[e.streamName].forEach((t=>t(e.data)))};pe.registerPlugin(ke),pe.registerPlugin(Me),pe.registerPlugin(Ye),pe.registerPlugin(Qe),pe.registerPlugin(Ie),pe.allowProxying=!0;const tt="langChanged";function it(e,t,i){return Object.entries(nt(t||{})).reduce(((e,[t,i])=>e.replace(new RegExp(`{{[  ]*${t}[  ]*}}`,"gm"),String(nt(i)))),e)}function ot(e,t){const i=e.split(".");let o=t.strings;for(;null!=o&&i.length>0;)o=o[i.shift()];return null!=o?o.toString():null}function nt(e){return"function"==typeof e?e():e}let st={loader:()=>Promise.resolve({}),empty:e=>`[${e}]`,lookup:ot,interpolate:it,translationCache:{}};function rt(e){return st=Object.assign(Object.assign({},st),e)}function at(e,t,i=st){var o;o={previousStrings:i.strings,previousLang:i.lang,lang:i.lang=e,strings:i.strings=t},window.dispatchEvent(new CustomEvent(tt,{detail:o}))}async function lt(e,t=st){const i=await t.loader(e,t);t.translationCache={},at(e,i,t)}function ht(e,t,i=st){let o=i.translationCache[e]||(i.translationCache[e]=i.lookup(e,i)||i.empty(e,i));return null!=(t=null!=t?nt(t):null)?i.interpolate(o,t,i):o}const mt=1,ct=2,dt=e=>(...t)=>({_$litDirective$:e,values:t});let pt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};const{I:jt}=te,Pt={HTML:1,SVG:2},wt=(e,t)=>void 0===t?void 0!==(null==e?void 0:e._$litType$):(null==e?void 0:e._$litType$)===t,ut=()=>document.createComment(""),ft=(e,t,i)=>{var o;const n=e._$AA.parentNode,s=void 0===t?e._$AB:t._$AA;if(void 0===i){const t=n.insertBefore(ut(),s),o=n.insertBefore(ut(),s);i=new jt(t,o,e,e.options)}else{const t=i._$AB.nextSibling,r=i._$AM,a=r!==e;if(a){let t;null===(o=i._$AQ)||void 0===o||o.call(i,e),i._$AM=e,void 0!==i._$AP&&(t=e._$AU)!==r._$AU&&i._$AP(t)}if(t!==s||a){let e=i._$AA;for(;e!==t;){const t=e.nextSibling;n.insertBefore(e,s),e=t}}}return i},Mt=(e,t,i=e)=>(e._$AI(t,i),e),Zt={},Kt=e=>{var t;null===(t=e._$AP)||void 0===t||t.call(e,!1,!0);let i=e._$AA;const o=e._$AB.nextSibling;for(;i!==o;){const e=i.nextSibling;i.remove(),i=e}},yt=(e,t)=>{var i,o;const n=e._$AN;if(void 0===n)return!1;for(const e of n)null===(o=(i=e)._$AO)||void 0===o||o.call(i,t,!1),yt(e,t);return!0},gt=e=>{let t,i;do{if(void 0===(t=e._$AM))break;i=t._$AN,i.delete(e),e=t}while(0===(null==i?void 0:i.size))},Dt=e=>{for(let t;t=e._$AM;e=t){let i=t._$AN;if(void 0===i)t._$AN=i=new Set;else if(i.has(e))break;i.add(e),vt(t)}};function xt(e){void 0!==this._$AN?(gt(this),this._$AM=e,Dt(this)):this._$AM=e}function bt(e,t=!1,i=0){const o=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(t)if(Array.isArray(o))for(let e=i;e{var t,i,o,n;e.type==ct&&(null!==(t=(o=e)._$AP)&&void 0!==t||(o._$AP=bt),null!==(i=(n=e)._$AQ)&&void 0!==i||(n._$AQ=xt))};let Yt=class extends pt{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),Dt(this),this.isConnected=e._$AU}_$AO(e,t=!0){var i,o;e!==this.isConnected&&(this.isConnected=e,e?null===(i=this.reconnected)||void 0===i||i.call(this):null===(o=this.disconnected)||void 0===o||o.call(this)),t&&(yt(this,e),gt(this))}setValue(e){if((e=>void 0===e.strings)(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};class St extends Yt{constructor(){super(...arguments),this.langChangedSubscription=null,this.getValue=()=>""}renderValue(e){return this.getValue=e,this.subscribe(),this.getValue()}langChanged(e){this.setValue(this.getValue(e))}subscribe(){null==this.langChangedSubscription&&(this.langChangedSubscription=function(e,t){const i=t=>e(t.detail);return window.addEventListener(tt,i,t),()=>window.removeEventListener(tt,i)}(this.langChanged.bind(this)))}unsubscribe(){null!=this.langChangedSubscription&&this.langChangedSubscription()}disconnected(){this.unsubscribe()}reconnected(){this.subscribe()}}const Tt=dt(class extends St{render(e,t,i){return this.renderValue((()=>ht(e,t,i)))}});let Xt=class extends pt{constructor(e){if(super(e),this.et=W,e.type!==ct)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===W||null==e)return this.ft=void 0,this.et=e;if(e===V)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Xt.directiveName="unsafeHTML",Xt.resultType=1;const Et=dt(Xt),kt=s` - * { - --mdc-theme-primary: rgb(3, 169, 244); - --mdc-theme-secondary: var(--mdc-theme-primary); - --paper-input-container-focus-color: var(--mdc-theme-primary); - --mdc-theme-surface: var(--white); - --mdc-dialog-content-ink-color: var(--black); - --lumo-primary-text-color: rgb(0, 167, 245); - --lumo-primary-color-50pct: rgba(0, 167, 245, 0.5); - --lumo-primary-color-10pct: rgba(0, 167, 245, 0.1); - --lumo-primary-color: hsl(199, 100%, 48%); - --lumo-base-color: var(--white); - --lumo-body-text-color: var(--black); - --_lumo-grid-border-color: var(--border); - --_lumo-grid-secondary-border-color: var(--border2); - --mdc-dialog-min-width: 750px; - } - - paper-spinner-lite { - height: 24px; - width: 24px; - --paper-spinner-color: var(--mdc-theme-primary); - --paper-spinner-stroke-width: 2px; - } - - *, - *:before, - *:after { - box-sizing: border-box; - } - - ul { - list-style: none; - padding: 0; - } - - .container { - margin: 0 auto; - width: 100%; - background: var(--white); - } - - .people-list { - width: 20vw; - float: left; - height: 100vh; - overflow-y: hidden; - border-right: 3px #ddd solid; - } - - .people-list .blockedusers { - z-index: 1; - position: absolute; - bottom: 0; - width: 20vw; - background: var(--white); - border-right: 3px #ddd solid; - display: flex; - justify-content: space-between; - gap: 15px; - flex-direction: column; - padding: 5px 30px 0 30px; - } - - .groups-button-container { - position: relative; - } - - .groups-button { - width: 100%; - background-color: rgb(116, 69, 240); - border: none; - color: white; - font-weight: bold; - font-family: 'Roboto'; - letter-spacing: 0.8px; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - border-radius: 5px; - gap: 10px; - padding: 5px 8px; - transition: all 0.1s ease-in-out; - } - - .groups-button-notif { - position: absolute; - top: -10px; - right: -8px; - width: 25px; - border-radius: 50%; - height: 25px; - font-weight: bold; - display: flex; - align-items: center; - justify-content: center; - font-family: Montserrat, sans-serif; - font-size: 16px; - font-weight: bold; - color: black; - background-color: rgb(51, 213, 0); - user-select: none; - transition: all 0.3s ease-in-out 0s; - } - - .groups-button-notif:hover { - cursor: auto; - box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px; - } - - .groups-button-notif:hover + .groups-button-notif-number { - display: block; - opacity: 1; - animation: fadeIn 0.6s; -} - -@keyframes fadeIn { - from { - opacity: 0; - top: -10px; - } - - to { - opacity: 1; - top: -60px; - } -} - - .groups-button-notif-number { - position: absolute; - transform: translateX(-50%); - left: 50%; - width: 150px; - text-align: center; - border-radius: 3px; - padding: 5px 10px; - background-color: white; - color: black; - font-family: Roboto, sans-serif; - letter-spacing: 0.3px; - font-weight: 300; - display: none; - opacity: 0; - top: -60px; - box-shadow: rgb(216 216 216 / 25%) 0px 6px 12px -2px, rgb(0 0 0 / 30%) 0px 3px 7px -3px; - } - - .groups-button:hover { - cursor: pointer; - filter: brightness(120%); - } - - .people-list .search { - padding-top: 20px; - padding-left: 20px; - padding-right: 20px; - } - - .center { - margin: 0; - position: absolute; - padding-top: 12px; - left: 50%; - -ms-transform: translateX(-50%); - transform: translateX(-50%); - } - - .people-list .create-chat { - border-radius: 5px; - border: none; - display: inline-block; - padding: 14px; - color: #fff; - background: var(--tradehead); - width: 100%; - font-size: 15px; - text-align: center; - cursor: pointer; - } - - .people-list .create-chat:hover { - opacity: .8; - box-shadow: 0 3px 5px rgba(0, 0, 0, .2); - } - - .people-list ul { - padding: 0px 0px 60px 0px; - height: 85vh; - overflow-y: auto; - overflow-x: hidden; - } - - .people-list ul::-webkit-scrollbar-track { - background-color: whitesmoke; - border-radius: 7px; - } - - .people-list ul::-webkit-scrollbar { - width: 6px; - border-radius: 7px; - background-color: whitesmoke; - } - - .people-list ul::-webkit-scrollbar-thumb { - background-color: rgb(180, 176, 176); - border-radius: 7px; - transition: all 0.3s ease-in-out; - } - - .chat { - width: 80vw; - height: 100vh; - float: left; - background: var(--white); - border-top-right-radius: 5px; - border-bottom-right-radius: 5px; - color: #434651; - box-sizing: border-box; - } - - .chat .new-message-bar { - display: flex; - flex: 0 1 auto; - align-items: center; - justify-content: space-between; - padding: 0px 25px; - font-size: 14px; - font-weight: 500; - top: 0; - position: absolute; - left: 20vw; - right: 0; - z-index: 5; - background: var(--tradehead); - color: var(--white); - border-radius: 0 0 8px 8px; - min-height: 25px; - transition: opacity .15s; - text-transform: capitalize; - opacity: .85; - cursor: pointer; - } - - .chat .new-message-bar:hover { - opacity: .75; - transform: translateY(-1px); - box-shadow: 0 3px 7px rgba(0, 0, 0, .2); - } - - .hide-new-message-bar { - display: none !important; - } - - .chat .chat-history { - position: absolute; - top: 0; - right: 0; - bottom: 100%; - left: 20vw; - border-bottom: 2px solid var(--white); - overflow-y: hidden; - height: 100vh; - box-sizing: border-box; - } - - .chat .chat-message { - padding: 10px; - height: 10%; - display: inline-block; - width: 100%; - background-color: #eee; - } - - .chat .chat-message textarea { - width: 90%; - border: none; - font-size: 16px; - padding: 10px 20px; - border-radius: 5px; - resize: none; - } - - .chat .chat-message button { - float: right; - color: #94c2ed; - font-size: 16px; - text-transform: uppercase; - border: none; - cursor: pointer; - font-weight: bold; - background: #f2f5f8; - padding: 10px; - margin-top: 4px; - margin-right: 4px; - } - - .chat .chat-message button:hover { - color: #75b1e8; - } - - .online, - .offline, - .me { - margin-right: 3px; - font-size: 10px; - } - - .clearfix:after { - visibility: hidden; - display: block; - font-size: 0; - content: " "; - clear: both; - height: 0; - } - - .red { - --mdc-theme-primary: red; - } - - h2 { - margin:0; - } - - h2, h3, h4, h5 { - color: var(--black); - font-weight: 400; - } - - [hidden] { - display: hidden !important; - visibility: none !important; - } - - .details { - display: flex; - font-size: 18px; - } - - .title { - font-weight:600; - font-size:12px; - line-height: 32px; - opacity: 0.66; - } - - .textarea { - width: 100%; - border: none; - display: inline-block; - font-size: 16px; - padding: 10px 20px; - border-radius: 5px; - height: 120px; - resize: none; - background: #eee; - } - - .dialog-container { - position: relative; - display: flex; - align-items: center; - flex-direction: column; - padding: 0 10px; - gap: 10px; - height: 100%; - } - - .dialog-header { - color: var(--chat-bubble-msg-color); - } - - .dialog-subheader { - color: var(--chat-bubble-msg-color); - } - - .modal-button-row { - display: flex; - align-items: center; - justify-content: space-between; - width: 100%; - } - - .modal-button { - font-family: Roboto, sans-serif; - font-size: 16px; - color: var(--mdc-theme-primary); - background-color: transparent; - padding: 8px 10px; - border-radius: 5px; - border: none; - transition: all 0.3s ease-in-out; - } - - .modal-button-red { - font-family: Roboto, sans-serif; - font-size: 16px; - color: #F44336; - background-color: transparent; - padding: 8px 10px; - border-radius: 5px; - border: none; - transition: all 0.3s ease-in-out; - } - - .modal-button-red:hover { - cursor: pointer; - background-color: #f4433663; - } - - .modal-button:hover { - cursor: pointer; - background-color: #03a8f475; - } - - .name-input { - width: 100%; - outline: 0; - border-width: 0 0 2px; - border-color: var(--mdc-theme-primary); - background-color: transparent; - padding: 10px; - font-family: Roboto, sans-serif; - font-size: 15px; - color: var(--chat-bubble-msg-color); - box-sizing: border-box; - } - - .name-input::selection { - background-color: var(--mdc-theme-primary); - color: white; - } - - .name-input::placeholder { - opacity: 0.9; - color: var(--black); - } - - .search-field { - width: 100%; - position: relative; - } - - .search-icon { - position: absolute; - right: 3px; - color: var(--chat-bubble-msg-color); - transition: all 0.3s ease-in-out; - background: none; - border-radius: 50%; - padding: 6px 3px; - font-size: 21px; - } - - .search-icon:hover { - cursor: pointer; - background: #d7d7d75c; - } - - .search-results-div { - position: absolute; - top: 25px; - right: 25px; - } - - .user-verified { - position: absolute; - top: 0; - right: 5px; - display: flex; - align-items: center; - gap: 10px; - color: #04aa2e; - font-size: 13px; - } -`;var zt=null;try{var Gt="undefined"!=typeof module&&"function"==typeof module.require&&module.require("worker_threads")||"function"==typeof __non_webpack_require__&&__non_webpack_require__("worker_threads")||"function"==typeof require&&require("worker_threads");zt=Gt.Worker}catch(pY){}function At(e,t,i){var o=void 0===t?null:t,n=function(e,t){return Buffer.from(e,"base64").toString(t?"utf16":"utf8")}(e,void 0!==i&&i),s=n.indexOf("\n",10)+1,r=n.substring(s)+(o?"//# sourceMappingURL="+o:"");return function(e){return new zt(r,Object.assign({},e,{eval:!0}))}}function Ot(e,t,i){var o=void 0===t?null:t,n=function(e,t){var i=atob(e);if(t){for(var o=new Uint8Array(i.length),n=0,s=i.length;n{const o=new Map;for(let n=t;n<=i;n++)o.set(e[n],n);return o},_t=dt(class extends pt{constructor(e){if(super(e),e.type!==ct)throw Error("repeat() can only be used in text expressions")}dt(e,t,i){let o;void 0===i?i=t:void 0!==t&&(o=t);const n=[],s=[];let r=0;for(const t of e)n[r]=o?o(t,r):r,s[r]=i(t,r),r++;return{values:s,keys:n}}render(e,t,i){return this.dt(e,t,i).values}update(e,[t,i,o]){var n;const s=(e=>e._$AH)(e),{values:r,keys:a}=this.dt(t,i,o);if(!Array.isArray(s))return this.ht=a,r;const l=null!==(n=this.ht)&&void 0!==n?n:this.ht=[],h=[];let m,c,d=0,p=s.length-1,j=0,P=r.length-1;for(;d<=p&&j<=P;)if(null===s[d])d++;else if(null===s[p])p--;else if(l[d]===a[j])h[j]=Mt(s[d],r[j]),d++,j++;else if(l[p]===a[P])h[P]=Mt(s[p],r[P]),p--,P--;else if(l[d]===a[P])h[P]=Mt(s[d],r[P]),ft(e,h[P+1],s[d]),d++,P--;else if(l[p]===a[j])h[j]=Mt(s[p],r[j]),ft(e,s[d],s[p]),p--,j++;else if(void 0===m&&(m=Wt(a,j,P),c=Wt(l,d,p)),m.has(l[d]))if(m.has(l[p])){const t=c.get(a[j]),i=void 0!==t?s[t]:null;if(null===i){const t=ft(e,s[d]);Mt(t,r[j]),h[j]=t}else h[j]=Mt(i,r[j]),ft(e,s[d],i),s[t]=null;j++}else Kt(s[p]),p--;else Kt(s[d]),d++;for(;j<=P;){const t=ft(e,h[P+1]);Mt(t,r[j]),h[j++]=t}for(;d<=p;){const e=s[d++];null!==e&&Kt(e)}return this.ht=a,((e,t=Zt)=>{e._$AH=t})(e,h),V}});var It=function(e,t){return It=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},It(e,t)};function Ht(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}It(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var Ut=function(){return Ut=Object.assign||function(e){for(var t,i=1,o=arguments.length;i=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,i,r):n(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}function Ft(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],o=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}const Jt=e=>t=>"function"==typeof t?((e,t)=>(customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:i,elements:o}=t;return{kind:i,elements:o,finisher(t){customElements.define(e,t)}}})(e,t),Lt=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(i){i.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(i){i.createProperty(t.key,e)}};function Bt(e){return(t,i)=>void 0!==i?((e,t,i)=>{t.constructor.createProperty(i,e)})(e,t,i):Lt(e,t)}function Qt(e){return Bt({...e,state:!0})}const $t=({finisher:e,descriptor:t})=>(i,o)=>{var n;if(void 0===o){const o=null!==(n=i.originalKey)&&void 0!==n?n:i.key,s=null!=t?{kind:"method",placement:"prototype",key:o,descriptor:t(i.key)}:{...i,key:o};return null!=e&&(s.finisher=function(t){e(t,o)}),s}{const n=i.constructor;void 0!==t&&Object.defineProperty(i,o,t(o)),null==e||e(n,o)}};function qt(e){return $t({finisher:(t,i)=>{Object.assign(t.prototype[i],e)}})}function ei(e,t){return $t({descriptor:i=>{const o={get(){var t,i;return null!==(i=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(t){const t="symbol"==typeof i?Symbol():"__"+i;o.get=function(){var i,o;return void 0===this[t]&&(this[t]=null!==(o=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(e))&&void 0!==o?o:null),this[t]}}return o}})}function ti(e){return $t({descriptor:t=>({async get(){var t;return await this.updateComplete,null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e)},enumerable:!0,configurable:!0})})}var ii;null===(ii=window.HTMLSlotElement)||void 0===ii||ii.prototype.assignedElements;const oi=s`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`;let ni=class extends re{render(){return C``}};function si(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}function ri(e){return{addClass:t=>{e.classList.add(t)},removeClass:t=>{e.classList.remove(t)},hasClass:t=>e.classList.contains(t)}}ni.styles=[oi],ni=Rt([Jt("mwc-icon")],ni);const ai=()=>{},li={get passive(){return!1}};document.addEventListener("x",ai,li),document.removeEventListener("x",ai);class hi extends re{click(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();super.click()}createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}}var mi=function(){function e(e){void 0===e&&(e={}),this.adapter=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),ci={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},di={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},pi={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};var ji=["touchstart","pointerdown","mousedown","keydown"],Pi=["touchend","pointerup","mouseup","contextmenu"],wi=[],ui=function(e){function t(i){var o=e.call(this,Ut(Ut({},t.defaultAdapter),i))||this;return o.activationAnimationHasEnded=!1,o.activationTimer=0,o.fgDeactivationRemovalTimer=0,o.fgScale="0",o.frame={width:0,height:0},o.initialSize=0,o.layoutFrame=0,o.maxRadius=0,o.unboundedCoords={left:0,top:0},o.activationState=o.defaultActivationState(),o.activationTimerCallback=function(){o.activationAnimationHasEnded=!0,o.runDeactivationUXLogicIfReady()},o.activateHandler=function(e){o.activateImpl(e)},o.deactivateHandler=function(){o.deactivateImpl()},o.focusHandler=function(){o.handleFocus()},o.blurHandler=function(){o.handleBlur()},o.resizeHandler=function(){o.layout()},o}return Ht(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ci},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return di},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return pi},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){var e=this,i=this.supportsPressRipple();if(this.registerRootHandlers(i),i){var o=t.cssClasses,n=o.ROOT,s=o.UNBOUNDED;requestAnimationFrame((function(){e.adapter.addClass(n),e.adapter.isUnbounded()&&(e.adapter.addClass(s),e.layoutInternal())}))}},t.prototype.destroy=function(){var e=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(t.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(t.cssClasses.FG_DEACTIVATION));var i=t.cssClasses,o=i.ROOT,n=i.UNBOUNDED;requestAnimationFrame((function(){e.adapter.removeClass(o),e.adapter.removeClass(n),e.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},t.prototype.activate=function(e){this.activateImpl(e)},t.prototype.deactivate=function(){this.deactivateImpl()},t.prototype.layout=function(){var e=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){e.layoutInternal(),e.layoutFrame=0}))},t.prototype.setUnbounded=function(e){var i=t.cssClasses.UNBOUNDED;e?this.adapter.addClass(i):this.adapter.removeClass(i)},t.prototype.handleFocus=function(){var e=this;requestAnimationFrame((function(){return e.adapter.addClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.handleBlur=function(){var e=this;requestAnimationFrame((function(){return e.adapter.removeClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},t.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},t.prototype.registerRootHandlers=function(e){var t,i;if(e){try{for(var o=Ft(ji),n=o.next();!n.done;n=o.next()){var s=n.value;this.adapter.registerInteractionHandler(s,this.activateHandler)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},t.prototype.registerDeactivationHandlers=function(e){var t,i;if("keydown"===e.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var o=Ft(Pi),n=o.next();!n.done;n=o.next()){var s=n.value;this.adapter.registerDocumentInteractionHandler(s,this.deactivateHandler)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}},t.prototype.deregisterRootHandlers=function(){var e,t;try{for(var i=Ft(ji),o=i.next();!o.done;o=i.next()){var n=o.value;this.adapter.deregisterInteractionHandler(n,this.activateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},t.prototype.deregisterDeactivationHandlers=function(){var e,t;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var i=Ft(Pi),o=i.next();!o.done;o=i.next()){var n=o.value;this.adapter.deregisterDocumentInteractionHandler(n,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},t.prototype.removeCssVars=function(){var e=this,i=t.strings;Object.keys(i).forEach((function(t){0===t.indexOf("VAR_")&&e.adapter.updateCssVariable(i[t],null)}))},t.prototype.activateImpl=function(e){var t=this;if(!this.adapter.isSurfaceDisabled()){var i=this.activationState;if(!i.isActivated){var o=this.previousActivationEvent;if(!(o&&void 0!==e&&o.type!==e.type))i.isActivated=!0,i.isProgrammatic=void 0===e,i.activationEvent=e,i.wasActivatedByPointer=!i.isProgrammatic&&(void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type)),void 0!==e&&wi.length>0&&wi.some((function(e){return t.adapter.containsEventTarget(e)}))?this.resetActivationState():(void 0!==e&&(wi.push(e.target),this.registerDeactivationHandlers(e)),i.wasElementMadeActive=this.checkElementMadeActive(e),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){wi=[],i.wasElementMadeActive||void 0===e||" "!==e.key&&32!==e.keyCode||(i.wasElementMadeActive=t.checkElementMadeActive(e),i.wasElementMadeActive&&t.animateActivation()),i.wasElementMadeActive||(t.activationState=t.defaultActivationState())})))}}},t.prototype.checkElementMadeActive=function(e){return void 0===e||"keydown"!==e.type||this.adapter.isSurfaceActive()},t.prototype.animateActivation=function(){var e=this,i=t.strings,o=i.VAR_FG_TRANSLATE_START,n=i.VAR_FG_TRANSLATE_END,s=t.cssClasses,r=s.FG_DEACTIVATION,a=s.FG_ACTIVATION,l=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var h="",m="";if(!this.adapter.isUnbounded()){var c=this.getFgTranslationCoordinates(),d=c.startPoint,p=c.endPoint;h=d.x+"px, "+d.y+"px",m=p.x+"px, "+p.y+"px"}this.adapter.updateCssVariable(o,h),this.adapter.updateCssVariable(n,m),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(r),this.adapter.computeBoundingRect(),this.adapter.addClass(a),this.activationTimer=setTimeout((function(){e.activationTimerCallback()}),l)},t.prototype.getFgTranslationCoordinates=function(){var e,t=this.activationState,i=t.activationEvent;return e=t.wasActivatedByPointer?function(e,t,i){if(!e)return{x:0,y:0};var o,n,s=t.x,r=t.y,a=s+i.left,l=r+i.top;if("touchstart"===e.type){var h=e;o=h.changedTouches[0].pageX-a,n=h.changedTouches[0].pageY-l}else{var m=e;o=m.pageX-a,n=m.pageY-l}return{x:o,y:n}}(i,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2},{startPoint:e={x:e.x-this.initialSize/2,y:e.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},t.prototype.runDeactivationUXLogicIfReady=function(){var e=this,i=t.cssClasses.FG_DEACTIVATION,o=this.activationState,n=o.hasDeactivationUXRun,s=o.isActivated;(n||!s)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(i),this.fgDeactivationRemovalTimer=setTimeout((function(){e.adapter.removeClass(i)}),pi.FG_DEACTIVATION_MS))},t.prototype.rmBoundedActivationClasses=function(){var e=t.cssClasses.FG_ACTIVATION;this.adapter.removeClass(e),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},t.prototype.resetActivationState=function(){var e=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return e.previousActivationEvent=void 0}),t.numbers.TAP_DELAY_MS)},t.prototype.deactivateImpl=function(){var e=this,t=this.activationState;if(t.isActivated){var i=Ut({},t);t.isProgrammatic?(requestAnimationFrame((function(){e.animateDeactivation(i)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){e.activationState.hasDeactivationUXRun=!0,e.animateDeactivation(i),e.resetActivationState()})))}},t.prototype.animateDeactivation=function(e){var t=e.wasActivatedByPointer,i=e.wasElementMadeActive;(t||i)&&this.runDeactivationUXLogicIfReady()},t.prototype.layoutInternal=function(){var e=this;this.frame=this.adapter.computeBoundingRect();var i=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?i:Math.sqrt(Math.pow(e.frame.width,2)+Math.pow(e.frame.height,2))+t.numbers.PADDING;var o=Math.floor(i*t.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&o%2!=0?this.initialSize=o-1:this.initialSize=o,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},t.prototype.updateLayoutCssVars=function(){var e=t.strings,i=e.VAR_FG_SIZE,o=e.VAR_LEFT,n=e.VAR_TOP,s=e.VAR_FG_SCALE;this.adapter.updateCssVariable(i,this.initialSize+"px"),this.adapter.updateCssVariable(s,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(o,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(n,this.unboundedCoords.top+"px"))},t}(mi),fi=ui;const Mi=dt(class extends pt{constructor(e){var t;if(super(e),e.type!==mt||"class"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){var i,o;if(void 0===this.it){this.it=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!(null===(i=this.nt)||void 0===i?void 0:i.has(e))&&this.it.add(e);return this.render(t)}const n=e.element.classList;this.it.forEach((e=>{e in t||(n.remove(e),this.it.delete(e))}));for(const e in t){const i=!!t[e];i===this.it.has(e)||(null===(o=this.nt)||void 0===o?void 0:o.has(e))||(i?(n.add(e),this.it.add(e)):(n.remove(e),this.it.delete(e)))}return V}}),Zi="important",Ki=" !"+Zi,yi=dt(class extends pt{constructor(e){var t;if(super(e),e.type!==mt||"style"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,i)=>{const o=e[i];return null==o?t:t+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`}),"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.ut){this.ut=new Set;for(const e in t)this.ut.add(e);return this.render(t)}this.ut.forEach((e=>{null==t[e]&&(this.ut.delete(e),e.includes("-")?i.removeProperty(e):i[e]="")}));for(const e in t){const o=t[e];if(null!=o){this.ut.add(e);const t="string"==typeof o&&o.endsWith(Ki);e.includes("-")||t?i.setProperty(e,t?o.slice(0,-11):o,t?Zi:""):i[e]=o}}return V}});class gi extends hi{constructor(){super(...arguments),this.primary=!1,this.accent=!1,this.unbounded=!1,this.disabled=!1,this.activated=!1,this.selected=!1,this.internalUseStateLayerCustomProperties=!1,this.hovering=!1,this.bgFocused=!1,this.fgActivation=!1,this.fgDeactivation=!1,this.fgScale="",this.fgSize="",this.translateStart="",this.translateEnd="",this.leftPos="",this.topPos="",this.mdcFoundationClass=fi}get isActive(){return si(this.parentElement||this,":active")}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:e=>{switch(e){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!0;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!0;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!0}},removeClass:e=>{switch(e){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!1;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!1;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!1}},containsEventTarget:()=>!0,registerInteractionHandler:()=>{},deregisterInteractionHandler:()=>{},registerDocumentInteractionHandler:()=>{},deregisterDocumentInteractionHandler:()=>{},registerResizeHandler:()=>{},deregisterResizeHandler:()=>{},updateCssVariable:(e,t)=>{switch(e){case"--mdc-ripple-fg-scale":this.fgScale=t;break;case"--mdc-ripple-fg-size":this.fgSize=t;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=t;break;case"--mdc-ripple-fg-translate-start":this.translateStart=t;break;case"--mdc-ripple-left":this.leftPos=t;break;case"--mdc-ripple-top":this.topPos=t}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(e){this.waitForFoundation((()=>{this.mdcFoundation.activate(e)}))}endPress(){this.waitForFoundation((()=>{this.mdcFoundation.deactivate()}))}startFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleFocus()}))}endFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleBlur()}))}startHover(){this.hovering=!0}endHover(){this.hovering=!1}waitForFoundation(e){this.mdcFoundation?e():this.updateComplete.then(e)}update(e){e.has("disabled")&&this.disabled&&this.endHover(),super.update(e)}render(){const e=this.activated&&(this.primary||!this.accent),t=this.selected&&(this.primary||!this.accent),i={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":e,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":t,"mdc-ripple-surface--accent--selected":this.accent&&this.selected,"mdc-ripple-surface--disabled":this.disabled,"mdc-ripple-surface--hover":this.hovering,"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--selected":this.selected,"mdc-ripple-upgraded--background-focused":this.bgFocused,"mdc-ripple-upgraded--foreground-activation":this.fgActivation,"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation,"mdc-ripple-upgraded--unbounded":this.unbounded,"mdc-ripple-surface--internal-use-state-layer-custom-properties":this.internalUseStateLayerCustomProperties};return C` -
`}}Rt([ei(".mdc-ripple-surface")],gi.prototype,"mdcRoot",void 0),Rt([Bt({type:Boolean})],gi.prototype,"primary",void 0),Rt([Bt({type:Boolean})],gi.prototype,"accent",void 0),Rt([Bt({type:Boolean})],gi.prototype,"unbounded",void 0),Rt([Bt({type:Boolean})],gi.prototype,"disabled",void 0),Rt([Bt({type:Boolean})],gi.prototype,"activated",void 0),Rt([Bt({type:Boolean})],gi.prototype,"selected",void 0),Rt([Bt({type:Boolean})],gi.prototype,"internalUseStateLayerCustomProperties",void 0),Rt([Qt()],gi.prototype,"hovering",void 0),Rt([Qt()],gi.prototype,"bgFocused",void 0),Rt([Qt()],gi.prototype,"fgActivation",void 0),Rt([Qt()],gi.prototype,"fgDeactivation",void 0),Rt([Qt()],gi.prototype,"fgScale",void 0),Rt([Qt()],gi.prototype,"fgSize",void 0),Rt([Qt()],gi.prototype,"translateStart",void 0),Rt([Qt()],gi.prototype,"translateEnd",void 0),Rt([Qt()],gi.prototype,"leftPos",void 0),Rt([Qt()],gi.prototype,"topPos",void 0);const Di=s`.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`;let xi=class extends gi{};function bi(e,t,i){if(void 0!==t)return function(e,t,i){const o=e.constructor;if(!i){const e=`__${t}`;if(!(i=o.getPropertyDescriptor(t,e)))throw new Error("@ariaProperty must be used after a @property decorator")}const n=i;let s="";if(!n.set)throw new Error(`@ariaProperty requires a setter for ${t}`);if(e.dispatchWizEvent)return i;const r={configurable:!0,enumerable:!0,set(e){if(""===s){const e=o.getPropertyOptions(t);s="string"==typeof e.attribute?e.attribute:t}this.hasAttribute(s)&&this.removeAttribute(s),n.set.call(this,e)}};return n.get&&(r.get=function(){return n.get.call(this)}),r}(e,t,i);throw new Error("@ariaProperty only supports TypeScript Decorators")}xi.styles=[Di],xi=Rt([Jt("mwc-ripple")],xi);class vi{constructor(e){this.startPress=t=>{e().then((e=>{e&&e.startPress(t)}))},this.endPress=()=>{e().then((e=>{e&&e.endPress()}))},this.startFocus=()=>{e().then((e=>{e&&e.startFocus()}))},this.endFocus=()=>{e().then((e=>{e&&e.endFocus()}))},this.startHover=()=>{e().then((e=>{e&&e.startHover()}))},this.endHover=()=>{e().then((e=>{e&&e.endHover()}))}}}const Yi=e=>null!=e?e:W;class Si extends re{constructor(){super(...arguments),this.raised=!1,this.unelevated=!1,this.outlined=!1,this.dense=!1,this.disabled=!1,this.trailingIcon=!1,this.fullwidth=!1,this.icon="",this.label="",this.expandContent=!1,this.shouldRenderRipple=!1,this.rippleHandlers=new vi((()=>(this.shouldRenderRipple=!0,this.ripple)))}renderOverlay(){return C``}renderRipple(){const e=this.raised||this.unelevated;return this.shouldRenderRipple?C``:""}focus(){const e=this.buttonElement;e&&(this.rippleHandlers.startFocus(),e.focus())}blur(){const e=this.buttonElement;e&&(this.rippleHandlers.endFocus(),e.blur())}getRenderClasses(){return{"mdc-button--raised":this.raised,"mdc-button--unelevated":this.unelevated,"mdc-button--outlined":this.outlined,"mdc-button--dense":this.dense}}render(){return C` - `}renderIcon(){return C` - - ${this.icon} - `}handleRippleActivate(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}}Si.shadowRootOptions={mode:"open",delegatesFocus:!0},Rt([bi,Bt({type:String,attribute:"aria-haspopup"})],Si.prototype,"ariaHasPopup",void 0),Rt([Bt({type:Boolean,reflect:!0})],Si.prototype,"raised",void 0),Rt([Bt({type:Boolean,reflect:!0})],Si.prototype,"unelevated",void 0),Rt([Bt({type:Boolean,reflect:!0})],Si.prototype,"outlined",void 0),Rt([Bt({type:Boolean})],Si.prototype,"dense",void 0),Rt([Bt({type:Boolean,reflect:!0})],Si.prototype,"disabled",void 0),Rt([Bt({type:Boolean,attribute:"trailingicon"})],Si.prototype,"trailingIcon",void 0),Rt([Bt({type:Boolean,reflect:!0})],Si.prototype,"fullwidth",void 0),Rt([Bt({type:String})],Si.prototype,"icon",void 0),Rt([Bt({type:String})],Si.prototype,"label",void 0),Rt([Bt({type:Boolean})],Si.prototype,"expandContent",void 0),Rt([ei("#button")],Si.prototype,"buttonElement",void 0),Rt([ti("mwc-ripple")],Si.prototype,"ripple",void 0),Rt([Qt()],Si.prototype,"shouldRenderRipple",void 0),Rt([qt({passive:!0})],Si.prototype,"handleRippleActivate",null);const Ti=s`.mdc-button{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase)}.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:transparent}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{display:none}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc( 100% + 4px );width:calc( 100% + 4px );display:block}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring::after,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring::after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring::after,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring::after{border-color:CanvasText}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:transparent}.mdc-button{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button:not(:disabled){color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-button:disabled{color:rgba(0, 0, 0, 0.38)}.mdc-button .mdc-button__icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.mdc-button .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button--raised,.mdc-button--unelevated{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button--raised:not(:disabled),.mdc-button--unelevated:not(:disabled){background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee)}.mdc-button--raised:disabled,.mdc-button--unelevated:disabled{background-color:rgba(0, 0, 0, 0.12)}.mdc-button--raised:not(:disabled),.mdc-button--unelevated:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary, #fff)}.mdc-button--raised:disabled,.mdc-button--unelevated:disabled{color:rgba(0, 0, 0, 0.38)}.mdc-button--raised .mdc-button__icon,.mdc-button--unelevated .mdc-button__icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.mdc-button--raised .mdc-button__ripple,.mdc-button--unelevated .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button--outlined{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small, 4px);padding:0 15px 0 15px;border-width:1px}.mdc-button--outlined:not(:disabled){color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-button--outlined:disabled{color:rgba(0, 0, 0, 0.38)}.mdc-button--outlined .mdc-button__icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.mdc-button--outlined .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button--outlined:not(:disabled){border-color:rgba(0, 0, 0, 0.12)}.mdc-button--outlined:disabled{border-color:rgba(0, 0, 0, 0.12)}.mdc-button--outlined.mdc-button--icon-trailing{padding:0 11px 0 15px}.mdc-button--outlined.mdc-button--icon-leading{padding:0 15px 0 11px}.mdc-button--outlined .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:1px}.mdc-button--outlined .mdc-button__touch{left:calc(-1 * 1px);width:calc(100% + 2 * 1px)}.mdc-button--raised{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 1px 5px 0px rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--raised:hover,.mdc-button--raised:focus{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2),0px 4px 5px 0px rgba(0, 0, 0, 0.14),0px 1px 10px 0px rgba(0,0,0,.12)}.mdc-button--raised:active{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}.mdc-button--raised:disabled{box-shadow:0px 0px 0px 0px rgba(0, 0, 0, 0.2),0px 0px 0px 0px rgba(0, 0, 0, 0.14),0px 0px 0px 0px rgba(0,0,0,.12)}:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:transparent;vertical-align:top}:host([fullwidth]){width:100%}:host([raised]),:host([unelevated]){--mdc-ripple-color:#fff;--mdc-ripple-focus-opacity:0.24;--mdc-ripple-hover-opacity:0.08;--mdc-ripple-press-opacity:0.24}.trailing-icon ::slotted(*),.trailing-icon .mdc-button__icon,.leading-icon ::slotted(*),.leading-icon .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .trailing-icon ::slotted(*),[dir=rtl] .trailing-icon .mdc-button__icon,[dir=rtl] .leading-icon ::slotted(*),[dir=rtl] .leading-icon .mdc-button__icon,.trailing-icon ::slotted(*[dir=rtl]),.trailing-icon .mdc-button__icon[dir=rtl],.leading-icon ::slotted(*[dir=rtl]),.leading-icon .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.trailing-icon ::slotted(*),.trailing-icon .mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .trailing-icon ::slotted(*),[dir=rtl] .trailing-icon .mdc-button__icon,.trailing-icon ::slotted(*[dir=rtl]),.trailing-icon .mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}.slot-container{display:inline-flex;align-items:center;justify-content:center}.slot-container.flex{flex:auto}.mdc-button{flex:auto;overflow:hidden;padding-left:8px;padding-left:var(--mdc-button-horizontal-padding, 8px);padding-right:8px;padding-right:var(--mdc-button-horizontal-padding, 8px)}.mdc-button--raised{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mdc-button--raised:focus{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow-focus, var(--mdc-button-raised-box-shadow-hover, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12)))}.mdc-button--raised:hover{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow-hover, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mdc-button--raised:active{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow-active, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mdc-button--raised:disabled{box-shadow:0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow-disabled, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mdc-button--raised,.mdc-button--unelevated{padding-left:16px;padding-left:var(--mdc-button-horizontal-padding, 16px);padding-right:16px;padding-right:var(--mdc-button-horizontal-padding, 16px)}.mdc-button--outlined{border-width:1px;border-width:var(--mdc-button-outline-width, 1px);padding-left:calc(16px - 1px);padding-left:calc(var(--mdc-button-horizontal-padding, 16px) - var(--mdc-button-outline-width, 1px));padding-right:calc(16px - 1px);padding-right:calc(var(--mdc-button-horizontal-padding, 16px) - var(--mdc-button-outline-width, 1px))}.mdc-button--outlined:not(:disabled){border-color:rgba(0, 0, 0, 0.12);border-color:var(--mdc-button-outline-color, rgba(0, 0, 0, 0.12))}.mdc-button--outlined .ripple{top:calc(-1 * 1px);top:calc(-1 * var(--mdc-button-outline-width, 1px));left:calc(-1 * 1px);left:calc(-1 * var(--mdc-button-outline-width, 1px));right:initial;right:initial;border-width:1px;border-width:var(--mdc-button-outline-width, 1px);border-style:solid;border-color:transparent}[dir=rtl] .mdc-button--outlined .ripple,.mdc-button--outlined .ripple[dir=rtl]{left:initial;left:initial;right:calc(-1 * 1px);right:calc(-1 * var(--mdc-button-outline-width, 1px))}.mdc-button--dense{height:28px;margin-top:0;margin-bottom:0}.mdc-button--dense .mdc-button__touch{height:100%}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-button{color:rgba(0, 0, 0, 0.38);color:var(--mdc-button-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-button--raised,:host([disabled]) .mdc-button--unelevated{background-color:rgba(0, 0, 0, 0.12);background-color:var(--mdc-button-disabled-fill-color, rgba(0, 0, 0, 0.12))}:host([disabled]) .mdc-button--outlined{border-color:rgba(0, 0, 0, 0.12);border-color:var(--mdc-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}`;let Xi=class extends Si{};Xi.styles=[Ti],Xi=Rt([Jt("mwc-button")],Xi),(()=>{var e,t,i;const o=Symbol(),n=Symbol(),s=Symbol(),r=Symbol(),a=Symbol(),l=Symbol(),h=Symbol(),m=Symbol(),c=Symbol(),d=Symbol(),p=Symbol(),j=Symbol(),P=Symbol();class w{constructor(){this[e]=[],this[t]=[],this[i]=new Set}destructor(){this[c](this[s]);const e=this;e[o]=null,e[s]=null,e[n]=null}get top(){const e=this[o];return e[e.length-1]||null}push(e){e&&e!==this.top&&(this.remove(e),this[l](e),this[o].push(e))}remove(e){const t=this[o].indexOf(e);return-1!==t&&(this[o].splice(t,1),t===this[o].length&&this[l](this.top),!0)}pop(){const e=this.top;return e&&this.remove(e),e}has(e){return-1!==this[o].indexOf(e)}[(e=o,t=s,i=n,l)](e){const t=this[n],i=this[s];if(!e)return this[c](i),t.clear(),void(this[s]=[]);const o=this[d](e);if(o[o.length-1].parentNode!==document.body)throw Error("Non-connected element cannot be a blocking element");this[s]=o;const r=this[p](e);if(!i.length)return void this[m](o,r,t);let a=i.length-1,l=o.length-1;for(;a>0&&l>0&&i[a]===o[l];)a--,l--;i[a]!==o[l]&&this[h](i[a],o[l]),a>0&&this[c](i.slice(0,a)),l>0&&this[m](o.slice(0,l),r,null)}[h](e,t){const i=e[r];this[j](e)&&!e.inert&&(e.inert=!0,i.add(e)),i.has(t)&&(t.inert=!1,i.delete(t)),t[a]=e[a],t[r]=i,e[a]=void 0,e[r]=void 0}[c](e){for(const t of e){t[a].disconnect(),t[a]=void 0;const e=t[r];for(const t of e)t.inert=!1;t[r]=void 0}}[m](e,t,i){for(const o of e){const e=o.parentNode,n=e.children,s=new Set;for(let e=0;e(t,i)=>{if(t.constructor._observers){if(!t.constructor.hasOwnProperty("_observers")){const e=t.constructor._observers;t.constructor._observers=new Map,e.forEach(((e,i)=>t.constructor._observers.set(i,e)))}}else{t.constructor._observers=new Map;const e=t.updated;t.updated=function(t){e.call(this,t),t.forEach(((e,t)=>{const i=this.constructor._observers.get(t);void 0!==i&&i.call(this,this[t],e)}))}}t.constructor._observers.set(i,e)},_i=document.$blockingElements;class Ii extends hi{constructor(){super(...arguments),this.hideActions=!1,this.stacked=!1,this.heading="",this.scrimClickAction="close",this.escapeKeyAction="close",this.open=!1,this.defaultAction="close",this.actionAttribute="dialogAction",this.initialFocusAttribute="dialogInitialFocus",this.initialSupressDefaultPressSelector="",this.mdcFoundationClass=Ni,this.boundHandleClick=null,this.boundHandleKeydown=null,this.boundHandleDocumentKeydown=null}set suppressDefaultPressSelector(e){this.mdcFoundation?this.mdcFoundation.setSuppressDefaultPressSelector(e):this.initialSupressDefaultPressSelector=e}get suppressDefaultPressSelector(){return this.mdcFoundation?this.mdcFoundation.getSuppressDefaultPressSelector():this.initialSupressDefaultPressSelector}get primaryButton(){let e=this.primarySlot.assignedNodes();e=e.filter((e=>e instanceof HTMLElement));const t=e[0];return t||null}emitNotification(e,t){const i=new CustomEvent(e,{detail:t?{action:t}:{}});this.dispatchEvent(i)}getInitialFocusEl(){const e=`[${this.initialFocusAttribute}]`,t=this.querySelector(e);if(t)return t;const i=this.primarySlot.assignedNodes({flatten:!0}),o=this.searchNodeTreesForAttribute(i,this.initialFocusAttribute);if(o)return o;const n=this.secondarySlot.assignedNodes({flatten:!0}),s=this.searchNodeTreesForAttribute(n,this.initialFocusAttribute);if(s)return s;const r=this.contentSlot.assignedNodes({flatten:!0});return this.searchNodeTreesForAttribute(r,this.initialFocusAttribute)}searchNodeTreesForAttribute(e,t){for(const i of e)if(i instanceof HTMLElement){if(i.hasAttribute(t))return i;{const e=i.querySelector(`[${t}]`);if(e)return e}}return null}createAdapter(){return Object.assign(Object.assign({},ri(this.mdcRoot)),{addBodyClass:()=>document.body.style.overflow="hidden",removeBodyClass:()=>document.body.style.overflow="",areButtonsStacked:()=>this.stacked,clickDefaultButton:()=>{const e=this.primaryButton;e&&e.click()},eventTargetMatches:(e,t)=>!!e&&si(e,t),getActionFromEvent:e=>{if(!e.target)return"";const t=function(e,t){if(e.closest)return e.closest(t);for(var i=e;i;){if(si(i,t))return i;i=i.parentElement}return null}(e.target,`[${this.actionAttribute}]`);return t&&t.getAttribute(this.actionAttribute)},getInitialFocusEl:()=>this.getInitialFocusEl(),isContentScrollable:()=>{const e=this.contentElement;return!!e&&e.scrollHeight>e.offsetHeight},notifyClosed:e=>this.emitNotification("closed",e),notifyClosing:e=>{this.closingDueToDisconnect||(this.open=!1),this.emitNotification("closing",e)},notifyOpened:()=>this.emitNotification("opened"),notifyOpening:()=>{this.open=!0,this.emitNotification("opening")},reverseButtons:()=>{},releaseFocus:()=>{_i.remove(this)},trapFocus:e=>{this.isConnected&&(_i.push(this),e&&e.focus())},registerContentEventHandler:(e,t)=>{this.contentElement.addEventListener(e,t)},deregisterContentEventHandler:(e,t)=>{this.contentElement.removeEventListener(e,t)},isScrollableContentAtTop:()=>{const e=this.contentElement;return!!e&&0===e.scrollTop},isScrollableContentAtBottom:()=>{const e=this.contentElement;return!!e&&Math.ceil(e.scrollHeight-e.scrollTop)===e.clientHeight},registerWindowEventHandler:(e,t)=>{window.addEventListener(e,t,Vi())},deregisterWindowEventHandler:(e,t)=>{window.removeEventListener(e,t,Vi())}})}render(){const e={[Gi.STACKED]:this.stacked};let t=C``;this.heading&&(t=this.renderHeading());const i={"mdc-dialog__actions":!this.hideActions};return C` -
-
-
- ${t} -
- -
-
- - - - - - -
-
-
-
-
`}renderHeading(){return C` -

${this.heading}

`}firstUpdated(){super.firstUpdated(),this.mdcFoundation.setAutoStackButtons(!0),this.initialSupressDefaultPressSelector?this.suppressDefaultPressSelector=this.initialSupressDefaultPressSelector:this.suppressDefaultPressSelector=[this.suppressDefaultPressSelector,"mwc-textarea","mwc-menu mwc-list-item","mwc-select mwc-list-item"].join(", "),this.boundHandleClick=this.mdcFoundation.handleClick.bind(this.mdcFoundation),this.boundHandleKeydown=this.mdcFoundation.handleKeydown.bind(this.mdcFoundation),this.boundHandleDocumentKeydown=this.mdcFoundation.handleDocumentKeydown.bind(this.mdcFoundation)}connectedCallback(){super.connectedCallback(),this.open&&this.mdcFoundation&&!this.mdcFoundation.isOpen()&&(this.setEventListeners(),this.mdcFoundation.open())}disconnectedCallback(){super.disconnectedCallback(),this.open&&this.mdcFoundation&&(this.removeEventListeners(),this.closingDueToDisconnect=!0,this.mdcFoundation.close(this.currentAction||this.defaultAction),this.closingDueToDisconnect=!1,this.currentAction=void 0,_i.remove(this))}forceLayout(){this.mdcFoundation.layout()}focus(){const e=this.getInitialFocusEl();e&&e.focus()}blur(){if(!this.shadowRoot)return;const e=this.shadowRoot.activeElement;if(e)e instanceof HTMLElement&&e.blur();else{const e=this.getRootNode(),t=e instanceof Document?e.activeElement:null;t instanceof HTMLElement&&t.blur()}}setEventListeners(){this.boundHandleClick&&this.mdcRoot.addEventListener("click",this.boundHandleClick),this.boundHandleKeydown&&this.mdcRoot.addEventListener("keydown",this.boundHandleKeydown,Vi()),this.boundHandleDocumentKeydown&&document.addEventListener("keydown",this.boundHandleDocumentKeydown,Vi())}removeEventListeners(){this.boundHandleClick&&this.mdcRoot.removeEventListener("click",this.boundHandleClick),this.boundHandleKeydown&&this.mdcRoot.removeEventListener("keydown",this.boundHandleKeydown),this.boundHandleDocumentKeydown&&document.removeEventListener("keydown",this.boundHandleDocumentKeydown)}close(){this.open=!1}show(){this.open=!0}}Rt([ei(".mdc-dialog")],Ii.prototype,"mdcRoot",void 0),Rt([ei('slot[name="primaryAction"]')],Ii.prototype,"primarySlot",void 0),Rt([ei('slot[name="secondaryAction"]')],Ii.prototype,"secondarySlot",void 0),Rt([ei("#contentSlot")],Ii.prototype,"contentSlot",void 0),Rt([ei(".mdc-dialog__content")],Ii.prototype,"contentElement",void 0),Rt([ei(".mdc-container")],Ii.prototype,"conatinerElement",void 0),Rt([Bt({type:Boolean})],Ii.prototype,"hideActions",void 0),Rt([Bt({type:Boolean}),Wi((function(){this.forceLayout()}))],Ii.prototype,"stacked",void 0),Rt([Bt({type:String})],Ii.prototype,"heading",void 0),Rt([Bt({type:String}),Wi((function(e){this.mdcFoundation.setScrimClickAction(e)}))],Ii.prototype,"scrimClickAction",void 0),Rt([Bt({type:String}),Wi((function(e){this.mdcFoundation.setEscapeKeyAction(e)}))],Ii.prototype,"escapeKeyAction",void 0),Rt([Bt({type:Boolean,reflect:!0}),Wi((function(e){this.mdcFoundation&&this.isConnected&&(e?(this.setEventListeners(),this.mdcFoundation.open()):(this.removeEventListeners(),this.mdcFoundation.close(this.currentAction||this.defaultAction),this.currentAction=void 0))}))],Ii.prototype,"open",void 0),Rt([Bt()],Ii.prototype,"defaultAction",void 0),Rt([Bt()],Ii.prototype,"actionAttribute",void 0),Rt([Bt()],Ii.prototype,"initialFocusAttribute",void 0);const Hi=s`.mdc-dialog .mdc-dialog__surface{background-color:#fff;background-color:var(--mdc-theme-surface, #fff)}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0,0,0,.32)}.mdc-dialog .mdc-dialog__surface-scrim{background-color:rgba(0,0,0,.32)}.mdc-dialog .mdc-dialog__title{color:rgba(0,0,0,.87)}.mdc-dialog .mdc-dialog__content{color:rgba(0,0,0,.6)}.mdc-dialog .mdc-dialog__close{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-dialog .mdc-dialog__close:hover .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close.mdc-ripple-surface--hover .mdc-icon-button__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded--background-focused .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):focus .mdc-icon-button__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded) .mdc-icon-button__ripple::after{transition:opacity 150ms linear}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):active .mdc-icon-button__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions,.mdc-dialog.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:rgba(0,0,0,.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:1px solid rgba(0,0,0,.12);margin-bottom:0}.mdc-dialog.mdc-dialog-scroll-divider-header.mdc-dialog--fullscreen .mdc-dialog__header{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 1px 5px 0px rgba(0,0,0,.12)}.mdc-dialog .mdc-dialog__surface{border-radius:4px;border-radius:var(--mdc-shape-medium, 4px)}.mdc-dialog__surface{box-shadow:0px 11px 15px -7px rgba(0, 0, 0, 0.2),0px 24px 38px 3px rgba(0, 0, 0, 0.14),0px 9px 46px 8px rgba(0,0,0,.12)}.mdc-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1.25rem;font-size:var(--mdc-typography-headline6-font-size, 1.25rem);line-height:2rem;line-height:var(--mdc-typography-headline6-line-height, 2rem);font-weight:500;font-weight:var(--mdc-typography-headline6-font-weight, 500);letter-spacing:0.0125em;letter-spacing:var(--mdc-typography-headline6-letter-spacing, 0.0125em);text-decoration:inherit;text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline6-text-transform, inherit)}.mdc-dialog__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:0.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, 0.03125em);text-decoration:inherit;text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform, inherit)}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:7;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(max-width: 600px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(0.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid transparent;display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors: active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid transparent}@media screen and (forced-colors: active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}@media screen and (forced-colors: active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1;z-index:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}#actions:not(.mdc-dialog__actions){display:none}.mdc-dialog__surface{box-shadow:var(--mdc-dialog-box-shadow, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}@media(min-width: 560px){.mdc-dialog .mdc-dialog__surface{max-width:560px;max-width:var(--mdc-dialog-max-width, 560px)}}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0, 0, 0, 0.32);background-color:var(--mdc-dialog-scrim-color, rgba(0, 0, 0, 0.32))}.mdc-dialog .mdc-dialog__title{color:rgba(0, 0, 0, 0.87);color:var(--mdc-dialog-heading-ink-color, rgba(0, 0, 0, 0.87))}.mdc-dialog .mdc-dialog__content{color:rgba(0, 0, 0, 0.6);color:var(--mdc-dialog-content-ink-color, rgba(0, 0, 0, 0.6))}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions{border-color:rgba(0, 0, 0, 0.12);border-color:var(--mdc-dialog-scroll-divider-color, rgba(0, 0, 0, 0.12))}.mdc-dialog .mdc-dialog__surface{min-width:280px;min-width:var(--mdc-dialog-min-width, 280px)}.mdc-dialog .mdc-dialog__surface{max-height:var(--mdc-dialog-max-height, calc(100% - 32px))}#actions ::slotted(*){margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] #actions ::slotted(*),#actions ::slotted(*[dir=rtl]){margin-left:0;margin-right:8px}[dir=rtl] #actions ::slotted(*),#actions ::slotted(*[dir=rtl]){text-align:left}.mdc-dialog--stacked #actions{flex-direction:column-reverse}.mdc-dialog--stacked #actions *:not(:last-child) ::slotted(*){flex-basis:.000000001px;margin-top:12px}`;let Ui=class extends Ii{};Ui.styles=[Hi],Ui=Rt([Jt("mwc-dialog")],Ui);const Ri=!(window.ShadyDOM&&window.ShadyDOM.inUse);let Fi,Ji;function Li(e){Fi=(!e||!e.shimcssproperties)&&(Ri||Boolean(!navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)")))}window.ShadyCSS&&void 0!==window.ShadyCSS.cssBuild&&(Ji=window.ShadyCSS.cssBuild);const Bi=Boolean(window.ShadyCSS&&window.ShadyCSS.disableRuntime);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?Fi=window.ShadyCSS.nativeCss:window.ShadyCSS?(Li(window.ShadyCSS),window.ShadyCSS=void 0):Li(window.WebComponents&&window.WebComponents.flags);const Qi=Fi;class $i{constructor(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""}}function qi(e){return eo(function(e){let t=new $i;t.start=0,t.end=e.length;let i=t;for(let o=0,n=e.length;o{":root"===e.selector&&(e.selector="html"),this.transformRule(e)})),e.textContent=uo(t),t}transformRules(e,t){this._currentElement=t,Mo(e,(e=>{this.transformRule(e)})),this._currentElement=null}transformRule(e){e.cssText=this.transformCssText(e.parsedCssText,e),":root"===e.selector&&(e.selector=":host > *")}transformCssText(e,t){return e=e.replace(ho,((e,i,o,n)=>this._produceCssProperties(e,i,o,n,t))),this._consumeCssProperties(e,t)}_getInitialValueForProperty(e){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(e)}_fallbacksFromPreviousRules(e){let t=e;for(;t.parent;)t=t.parent;const i={};let o=!1;return Mo(t,(t=>{o=o||t===e,o||t.selector===e.selector&&Object.assign(i,this._cssTextToMap(t.parsedCssText))})),i}_consumeCssProperties(e,t){let i=null;for(;i=mo.exec(e);){let o=i[0],n=i[1],s=i.index,r=s+o.indexOf("@apply"),a=s+o.length,l=e.slice(0,r),h=e.slice(a),m=t?this._fallbacksFromPreviousRules(t):{};Object.assign(m,this._cssTextToMap(l));let c=this._atApplyToCssProperties(n,m);e=`${l}${c}${h}`,mo.lastIndex=s+c.length}return e}_atApplyToCssProperties(e,t){e=e.replace(bo,"");let i=[],o=this._map.get(e);if(o||(this._map.set(e,{}),o=this._map.get(e)),o){let n,s,r;this._currentElement&&(o.dependants[this._currentElement]=!0);const a=o.properties;for(n in a)r=t&&t[n],s=[n,": var(",e,So,n],r&&s.push(",",r.replace(Yo,"")),s.push(")"),Yo.test(a[n])&&s.push(" !important"),i.push(s.join(""))}return i.join("; ")}_replaceInitialOrInherit(e,t){let i=vo.exec(t);return i&&(t=i[1]?this._getInitialValueForProperty(e):"apply-shim-inherit"),t}_cssTextToMap(e,t=!1){let i,o,n=e.split(";"),s={};for(let e,r,a=0;a1&&(i=r[0].trim(),o=r.slice(1).join(":"),t&&(o=this._replaceInitialOrInherit(i,o)),s[i]=o));return s}_invalidateMixinEntry(e){if(Xo)for(let t in e.dependants)t!==this._currentElement&&Xo(t)}_produceCssProperties(e,t,i,o,n){if(i&&Zo(i,((e,t)=>{t&&this._map.get(t)&&(o=`@apply ${t};`)})),!o)return e;let s=this._consumeCssProperties(""+o,n),r=e.slice(0,e.indexOf("--")),a=this._cssTextToMap(s,!0),l=a,h=this._map.get(t),m=h&&h.properties;m?l=Object.assign(Object.create(m),a):this._map.set(t,l);let c,d,p=[],j=!1;for(c in l)d=a[c],void 0===d&&(d="initial"),m&&!(c in m)&&(j=!0),p.push(`${t}${So}${c}: ${d}`);return j&&this._invalidateMixinEntry(h),h&&(h.properties=l),i&&(r=`${e};${r}`),`${r}${p.join("; ")};`}}Eo.prototype.detectMixin=Eo.prototype.detectMixin,Eo.prototype.transformStyle=Eo.prototype.transformStyle,Eo.prototype.transformCustomStyle=Eo.prototype.transformCustomStyle,Eo.prototype.transformRules=Eo.prototype.transformRules,Eo.prototype.transformRule=Eo.prototype.transformRule,Eo.prototype.transformTemplate=Eo.prototype.transformTemplate,Eo.prototype._separator=So,Object.defineProperty(Eo.prototype,"invalidCallback",{get:()=>Xo,set(e){Xo=e}});const ko={},zo="_applyShimCurrentVersion",Go="_applyShimNextVersion",Ao="_applyShimValidatingVersion",Oo=Promise.resolve();function Co(e){let t=ko[e];t&&function(e){e[zo]=e[zo]||0,e[Ao]=e[Ao]||0,e[Go]=(e[Go]||0)+1}(t)}function No(e){return e[zo]===e[Go]}let Vo,Wo=null,_o=window.HTMLImports&&window.HTMLImports.whenReady||null;function Io(e){requestAnimationFrame((function(){_o?_o(e):(Wo||(Wo=new Promise((e=>{Vo=e})),"complete"===document.readyState?Vo():document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&Vo()}))),Wo.then((function(){e&&e()})))}))}const Ho="__seenByShadyCSS",Uo="__shadyCSSCachedStyle";let Ro=null,Fo=null,Jo=class{constructor(){this.customStyles=[],this.enqueued=!1,Io((()=>{window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()}))}enqueueDocumentValidation(){!this.enqueued&&Fo&&(this.enqueued=!0,Io(Fo))}addCustomStyle(e){e[Ho]||(e[Ho]=!0,this.customStyles.push(e),this.enqueueDocumentValidation())}getStyleForCustomStyle(e){if(e[Uo])return e[Uo];let t;return t=e.getStyle?e.getStyle():e,t}processStyles(){const e=this.customStyles;for(let t=0;tRo,set(e){Ro=e}},validateCallback:{get:()=>Fo,set(e){let t=!1;Fo||(t=!0),Fo=e,t&&this.enqueueDocumentValidation()}}});const Lo=new Eo;class Bo{constructor(){this.customStyleInterface=null,Lo.invalidCallback=Co}ensure(){this.customStyleInterface||window.ShadyCSS.CustomStyleInterface&&(this.customStyleInterface=window.ShadyCSS.CustomStyleInterface,this.customStyleInterface.transformCallback=e=>{Lo.transformCustomStyle(e)},this.customStyleInterface.validateCallback=()=>{requestAnimationFrame((()=>{this.customStyleInterface.enqueued&&this.flushCustomStyles()}))})}prepareTemplate(e,t){if(this.ensure(),go(e))return;ko[t]=e;let i=Lo.transformTemplate(e,t);e._styleAst=i}flushCustomStyles(){if(this.ensure(),!this.customStyleInterface)return;let e=this.customStyleInterface.processStyles();if(this.customStyleInterface.enqueued){for(let t=0;t-1?i=t:(o=t,i=e.getAttribute&&e.getAttribute("is")||""):(i=e.is,o=e.extends),{is:i,typeExtension:o}}(e),i=ko[t];if((!i||!go(i))&&i&&!No(i)){(function(e){return!No(e)&&e[Ao]===e[Go]})(i)||(this.prepareTemplate(i,t),function(e){e[Ao]=e[Go],e._validating||(e._validating=!0,Oo.then((function(){e[zo]=e[Go],e._validating=!1})))}(i));let o=e.shadowRoot;if(o){let e=o.querySelector("style");e&&(e.__cssRules=i._styleAst,e.textContent=uo(i._styleAst))}}}styleDocument(e){this.ensure(),this.styleSubtree(document.body,e)}}if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){const e=new Bo;let t=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate(t,i,o){e.flushCustomStyles(),e.prepareTemplate(t,i)},prepareTemplateStyles(e,t,i){window.ShadyCSS.prepareTemplate(e,t,i)},prepareTemplateDom(e,t){},styleSubtree(t,i){e.flushCustomStyles(),e.styleSubtree(t,i)},styleElement(t){e.flushCustomStyles(),e.styleElement(t)},styleDocument(t){e.flushCustomStyles(),e.styleDocument(t)},getComputedStyleValue:(e,t)=>xo(e,t),flushCustomStyles(){e.flushCustomStyles()},nativeCss:Qi,nativeShadow:Ri,cssBuild:Ji,disableRuntime:Bi},t&&(window.ShadyCSS.CustomStyleInterface=t)}window.ShadyCSS.ApplyShim=Lo,window.JSCompiler_renameProperty=function(e,t){return e};let Qo,$o,qo=/(url\()([^)]*)(\))/g,en=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function tn(e,t){if(e&&en.test(e))return e;if("//"===e)return e;if(void 0===Qo){Qo=!1;try{const e=new URL("b","http://a");e.pathname="c%20d",Qo="http://a/c%20d"===e.href}catch(e){}}if(t||(t=document.baseURI||window.location.href),Qo)try{return new URL(e,t).href}catch(t){return e}return $o||($o=document.implementation.createHTMLDocument("temp"),$o.base=$o.createElement("base"),$o.head.appendChild($o.base),$o.anchor=$o.createElement("a"),$o.body.appendChild($o.anchor)),$o.base.href=t,$o.anchor.href=e,$o.anchor.href||e}function on(e,t){return e.replace(qo,(function(e,i,o,n){return i+"'"+tn(o.replace(/["']/g,""),t)+"'"+n}))}function nn(e){return e.substring(0,e.lastIndexOf("/")+1)}const sn=!window.ShadyDOM||!window.ShadyDOM.inUse;Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss);const rn=sn&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const e=new CSSStyleSheet;e.replaceSync("");const t=document.createElement("div");return t.attachShadow({mode:"open"}),t.shadowRoot.adoptedStyleSheets=[e],t.shadowRoot.adoptedStyleSheets[0]===e}catch(e){return!1}})();let an=window.Polymer&&window.Polymer.rootPath||nn(document.baseURI||window.location.href),ln=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,hn=window.Polymer&&window.Polymer.setPassiveTouchGestures||!1,mn=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,cn=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,dn=window.Polymer&&window.Polymer.legacyOptimizations||!1,pn=window.Polymer&&window.Polymer.legacyWarnings||!1,jn=window.Polymer&&window.Polymer.syncInitialRender||!1,Pn=window.Polymer&&window.Polymer.legacyUndefined||!1,wn=window.Polymer&&window.Polymer.orderedComputed||!1,un=!0;let fn=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Mn=window.Polymer&&window.Polymer.fastDomIf||!1,Zn=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,Kn=window.Polymer&&window.Polymer.legacyNoObservedAttributes||!1,yn=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,gn=0;const Dn=function(e){let t=e.__mixinApplications;t||(t=new WeakMap,e.__mixinApplications=t);let i=gn++;return function(o){let n=o.__mixinSet;if(n&&n[i])return o;let s=t,r=s.get(o);if(!r){r=e(o),s.set(o,r);let t=Object.create(r.__mixinSet||n||null);t[i]=!0,r.__mixinSet=t}return r}};let xn={},bn={};function vn(e,t){xn[e]=bn[e.toLowerCase()]=t}function Yn(e){return xn[e]||bn[e.toLowerCase()]}class Sn extends HTMLElement{static get observedAttributes(){return["id"]}static import(e,t){if(e){let i=Yn(e);return i&&t?i.querySelector(t):i}return null}attributeChangedCallback(e,t,i,o){t!==i&&this.register()}get assetpath(){if(!this.__assetpath){const e=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,t=tn(this.getAttribute("assetpath")||"",e.baseURI);this.__assetpath=nn(t)}return this.__assetpath}register(e){if(e=e||this.id){if(mn&&void 0!==Yn(e))throw vn(e,null),new Error(`strictTemplatePolicy: dom-module ${e} re-registered`);this.id=e,vn(e,this),(t=this).querySelector("style")&&console.warn("dom-module %s has style outside template",t.id)}var t}}Sn.prototype.modules=xn,customElements.define("dom-module",Sn);const Tn="link[rel=import][type~=css]",Xn="include",En="shady-unscoped";function kn(e){return Sn.import(e)}function zn(e){const t=on((e.body?e.body:e).textContent,e.baseURI),i=document.createElement("style");return i.textContent=t,i}function Gn(e){const t=e.trim().split(/\s+/),i=[];for(let e=0;eShadyDOM.patch(e):e=>e;function Wn(e){return e.indexOf(".")>=0}function _n(e){let t=e.indexOf(".");return-1===t?e:e.slice(0,t)}function In(e,t){return 0===e.indexOf(t+".")}function Hn(e,t){return 0===t.indexOf(e+".")}function Un(e,t,i){return t+i.slice(e.length)}function Rn(e){if(Array.isArray(e)){let t=[];for(let i=0;i1){for(let e=0;ee[1].toUpperCase())))}function es(e){return Bn[e]||(Bn[e]=e.replace($n,"-$1").toLowerCase())}let ts=0,is=0,ns=[],ss=0,rs=!1,as=document.createTextNode("");new window.MutationObserver((function(){rs=!1;const e=ns.length;for(let t=0;t{throw e}))}}ns.splice(0,e),is+=e})).observe(as,{characterData:!0});const ls={after:e=>({run:t=>window.setTimeout(t,e),cancel(e){window.clearTimeout(e)}}),run:(e,t)=>window.setTimeout(e,t),cancel(e){window.clearTimeout(e)}},hs={run:e=>(rs||(rs=!0,as.textContent=ss++),ns.push(e),ts++),cancel(e){const t=e-is;if(t>=0){if(!ns[t])throw new Error("invalid async handle: "+e);ns[t]=null}}},ms=hs,cs=Dn((e=>class extends e{static createProperties(e){const t=this.prototype;for(let i in e)i in t||t._createPropertyAccessor(i)}static attributeNameForProperty(e){return e.toLowerCase()}static typeForProperty(e){}_createPropertyAccessor(e,t){this._addPropertyToAttributeMap(e),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[e]||(this.__dataHasAccessor[e]=!0,this._definePropertyAccessor(e,t))}_addPropertyToAttributeMap(e){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let t=this.__dataAttributes[e];return t||(t=this.constructor.attributeNameForProperty(e),this.__dataAttributes[t]=e),t}_definePropertyAccessor(e,t){Object.defineProperty(this,e,{get(){return this.__data[e]},set:t?function(){}:function(t){this._setPendingProperty(e,t,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let e in this.__dataHasAccessor)this.hasOwnProperty(e)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[e]=this[e],delete this[e])}_initializeInstanceProperties(e){Object.assign(this,e)}_setProperty(e,t){this._setPendingProperty(e,t)&&this._invalidateProperties()}_getProperty(e){return this.__data[e]}_setPendingProperty(e,t,i){let o=this.__data[e],n=this._shouldPropertyChange(e,t,o);return n&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(e in this.__dataOld)&&(this.__dataOld[e]=o),this.__data[e]=t,this.__dataPending[e]=t),n}_isPropertyPending(e){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(e))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,ms.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const e=this.__data,t=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(e,t,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(e,t,i)),this.__dataCounter--}_shouldPropertiesChange(e,t,i){return Boolean(t)}_propertiesChanged(e,t,i){}_shouldPropertyChange(e,t,i){return i!==t&&(i==i||t==t)}attributeChangedCallback(e,t,i,o){t!==i&&this._attributeToProperty(e,i),super.attributeChangedCallback&&super.attributeChangedCallback(e,t,i,o)}_attributeToProperty(e,t,i){if(!this.__serializing){const o=this.__dataAttributes,n=o&&o[e]||e;this[n]=this._deserializeValue(t,i||this.constructor.typeForProperty(n))}}_propertyToAttribute(e,t,i){this.__serializing=!0,i=arguments.length<3?this[e]:i,this._valueToNodeAttribute(this,i,t||this.constructor.attributeNameForProperty(e)),this.__serializing=!1}_valueToNodeAttribute(e,t,i){const o=this._serializeValue(t);"class"!==i&&"name"!==i&&"slot"!==i||(e=Vn(e)),void 0===o?e.removeAttribute(i):e.setAttribute(i,""===o&&window.trustedTypes?window.trustedTypes.emptyScript:o)}_serializeValue(e){return"boolean"==typeof e?e?"":void 0:null!=e?e.toString():void 0}_deserializeValue(e,t){switch(t){case Boolean:return null!==e;case Number:return Number(e);default:return e}}})),ds={};let ps=HTMLElement.prototype;for(;ps;){let e=Object.getOwnPropertyNames(ps);for(let t=0;ttrustedTypes.isHTML(e)||trustedTypes.isScript(e)||trustedTypes.isScriptURL(e):()=>!1;const Ps=Dn((e=>{const t=cs(e);return class extends t{static createPropertiesForAttributes(){let e=this.observedAttributes;for(let t=0;t{const e=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:e=>e});return(t,i,o)=>{const n=i.getAttribute(o);e&&o.startsWith("on-")?t.setAttribute(o,e.createScript(n,o)):t.setAttribute(o,n)}})();function Ks(e){let t=e.getAttribute("is");if(t&&ws[t]){let i=e;for(i.removeAttribute("is"),e=i.ownerDocument.createElement(t),i.parentNode.replaceChild(e,i),e.appendChild(i);i.attributes.length;){const{name:t}=i.attributes[0];Zs(e,i,t),i.removeAttribute(t)}}return e}function ys(e,t){let i=t.parentInfo&&ys(e,t.parentInfo);if(!i)return e;for(let e=i.firstChild,o=0;e;e=e.nextSibling)if(t.parentIndex===o++)return e}function gs(e,t,i,o){o.id&&(t[o.id]=i)}function Ds(e,t,i){if(i.events&&i.events.length)for(let o,n=0,s=i.events;nclass extends e{static _parseTemplate(e,t){if(!e._templateInfo){let i=e._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(t),i.stripWhiteSpace=t&&t.stripWhiteSpace||e.hasAttribute&&e.hasAttribute("strip-whitespace"),this._parseTemplateContent(e,i,{parent:null})}return e._templateInfo}static _parseTemplateContent(e,t,i){return this._parseTemplateNode(e.content,t,i)}static _parseTemplateNode(e,t,i){let o=!1,n=e;return"template"!=n.localName||n.hasAttribute("preserve-content")?"slot"===n.localName&&(t.hasInsertionPoint=!0):o=this._parseTemplateNestedTemplate(n,t,i)||o,Ms(n),n.firstChild&&this._parseTemplateChildNodes(n,t,i),n.hasAttributes&&n.hasAttributes()&&(o=this._parseTemplateNodeAttributes(n,t,i)||o),o||i.noted}static _parseTemplateChildNodes(e,t,i){if("script"!==e.localName&&"style"!==e.localName)for(let o,n=e.firstChild,s=0;n;n=o){if("template"==n.localName&&(n=Ks(n)),o=n.nextSibling,n.nodeType===Node.TEXT_NODE){let i=o;for(;i&&i.nodeType===Node.TEXT_NODE;)n.textContent+=i.textContent,o=i.nextSibling,e.removeChild(i),i=o;if(t.stripWhiteSpace&&!n.textContent.trim()){e.removeChild(n);continue}}let r={parentIndex:s,parentInfo:i};this._parseTemplateNode(n,t,r)&&(r.infoIndex=t.nodeInfoList.push(r)-1),n.parentNode&&s++}}static _parseTemplateNestedTemplate(e,t,i){let o=e,n=this._parseTemplate(o,t);return(n.content=o.content.ownerDocument.createDocumentFragment()).appendChild(o.content),i.templateInfo=n,!0}static _parseTemplateNodeAttributes(e,t,i){let o=!1,n=Array.from(e.attributes);for(let s,r=n.length-1;s=n[r];r--)o=this._parseTemplateNodeAttribute(e,t,i,s.name,s.value)||o;return o}static _parseTemplateNodeAttribute(e,t,i,o,n){return"on-"===o.slice(0,3)?(e.removeAttribute(o),i.events=i.events||[],i.events.push({name:o.slice(3),value:n}),!0):"id"===o&&(i.id=n,!0)}static _contentForTemplate(e){let t=e._templateInfo;return t&&t.content||e.content}_stampTemplate(e,t){e&&!e.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(e);let i=(t=t||this.constructor._parseTemplate(e)).nodeInfoList,o=t.content||e.content,n=document.importNode(o,!0);n.__noInsertionPoint=!t.hasInsertionPoint;let s=n.nodeList=new Array(i.length);n.$={};for(let e,o=0,r=i.length;o!e.literal)).length+(o.dynamicFn?1:0)}for(let e in o)t[e]||n.push(e);return{counts:i,ready:n,total:s}}(e);for(;o=s.shift();){t.set(o,t.size);const e=i[o];e&&e.forEach((e=>{const t=e.info.methodInfo;--r,0==--n[t]&&s.push(t)}))}if(0!==r){const t=e;console.warn(`Computed graph for ${t.localName} incomplete; circular?`)}e.constructor.__orderedComputedDeps=t}return t}(e),r=[];for(let e in t)Is(e,n,r,s,o);let a;for(;a=r.shift();)Hs(e,"",t,i,a)&&Is(a.methodInfo,n,r,s,o);Object.assign(i,e.__dataOld),Object.assign(t,e.__dataPending),e.__dataPending=null}else{let s=t;for(;ks(e,n,s,i,o);)Object.assign(i,e.__dataOld),Object.assign(t,e.__dataPending),s=e.__dataPending,e.__dataPending=null}}const _s=(e,t,i)=>{let o=0,n=t.length-1,s=-1;for(;o<=n;){const r=o+n>>1,a=i.get(t[r].methodInfo)-i.get(e.methodInfo);if(a<0)o=r+1;else{if(!(a>0)){s=r;break}n=r-1}}s<0&&(s=n+1),t.splice(s,0,e)},Is=(e,t,i,o,n)=>{const s=t[n?_n(e):e];if(s)for(let t=0;th.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let o=i[t];t=Un(h.source,l.target,t),a._setPendingPropertyOrPath(t,o,!1,!0)&&e._enqueueClient(a)}else{let r=n.evaluator._evaluateBinding(e,h,t,i,o,s);r!==Ys&&function(e,t,i,o,n){n=function(e,t,i,o){if(i.isCompound){let n=e.__dataCompoundStorage[i.target];n[o.compoundIndex]=t,t=n.join("")}"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==e.localName&&"textarea"!==e.localName)||(t=null==t?"":t));return t}(t,n,i,o),ln&&(n=ln(n,i.target,i.kind,t));if("attribute"==i.kind)e._valueToNodeAttribute(t,n,i.target);else{let o=i.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[o]?t[Ss.READ_ONLY]&&t[Ss.READ_ONLY][o]||t._setPendingProperty(o,n)&&e._enqueueClient(t):e._setUnmanagedPropertyToNode(t,o,n)}}(e,a,l,h,r)}}function Js(e,t){if(t.isCompound){let i=e.__dataCompoundStorage||(e.__dataCompoundStorage={}),o=t.parts,n=new Array(o.length);for(let e=0;e="0"&&o<="9"&&(o="#"),o){case"'":case'"':i.value=t.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(t),i.literal=!0}return i.literal||(i.rootProperty=_n(t),i.structured=Wn(t),i.structured&&(i.wildcard=".*"==t.slice(-2),i.wildcard&&(i.name=t.slice(0,-2)))),i}function sr(e,t,i){let o=Jn(e,i);return void 0===o&&(o=t[i]),o}function rr(e,t,i,o){const n={indexSplices:o};Pn&&!e._overrideLegacyUndefined&&(t.splices=n),e.notifyPath(i+".splices",n),e.notifyPath(i+".length",t.length),Pn&&!e._overrideLegacyUndefined&&(n.indexSplices=[])}function ar(e,t,i,o,n,s){rr(e,t,i,[{index:o,addedCount:n,removed:s,object:t,type:"splice"}])}const lr=Dn((e=>{const t=bs(Ps(e));return class extends t{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return Ss}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(hr.length){let e=hr[hr.length-1];e._enqueueClient(this),this.__dataHost=e}}_initializeProtoProperties(e){this.__data=Object.create(e),this.__dataPending=Object.create(e),this.__dataOld={}}_initializeInstanceProperties(e){let t=this[Ss.READ_ONLY];for(let i in e)t&&t[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=e[i])}_addPropertyEffect(e,t,i){this._createPropertyAccessor(e,t==Ss.READ_ONLY);let o=Es(this,t,!0)[e];o||(o=this[t][e]=[]),o.push(i)}_removePropertyEffect(e,t,i){let o=Es(this,t,!0)[e],n=o.indexOf(i);n>=0&&o.splice(n,1)}_hasPropertyEffect(e,t){let i=this[t];return Boolean(i&&i[e])}_hasReadOnlyEffect(e){return this._hasPropertyEffect(e,Ss.READ_ONLY)}_hasNotifyEffect(e){return this._hasPropertyEffect(e,Ss.NOTIFY)}_hasReflectEffect(e){return this._hasPropertyEffect(e,Ss.REFLECT)}_hasComputedEffect(e){return this._hasPropertyEffect(e,Ss.COMPUTE)}_setPendingPropertyOrPath(e,t,i,o){if(o||_n(Array.isArray(e)?e[0]:e)!==e){if(!o){let i=Jn(this,e);if(!(e=Ln(this,e,t))||!super._shouldPropertyChange(e,t,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(e,t,i))return function(e,t,i){let o=e.__dataLinkedPaths;if(o){let n;for(let s in o){let r=o[s];Hn(s,t)?(n=Un(s,r,t),e._setPendingPropertyOrPath(n,i,!0,!0)):Hn(r,t)&&(n=Un(r,s,t),e._setPendingPropertyOrPath(n,i,!0,!0))}}}(this,e,t),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[e])return this._setPendingProperty(e,t,i);this[e]=t}return!1}_setUnmanagedPropertyToNode(e,t,i){i===e[t]&&"object"!=typeof i||("className"===t&&(e=Vn(e)),e[t]=i)}_setPendingProperty(e,t,i){let o=this.__dataHasPaths&&Wn(e),n=o?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(e,t,n[e])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),e in this.__dataOld||(this.__dataOld[e]=this.__data[e]),o?this.__dataTemp[e]=t:this.__data[e]=t,this.__dataPending[e]=t,(o||this[Ss.NOTIFY]&&this[Ss.NOTIFY][e])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[e]=i),!0)}_setProperty(e,t){this._setPendingProperty(e,t,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(e){this.__dataPendingClients=this.__dataPendingClients||[],e!==this&&this.__dataPendingClients.push(e)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let e=this.__dataPendingClients;if(e){this.__dataPendingClients=null;for(let t=0;t{ks(this,e.propertyEffects,t,i,o,e.nodeList);for(let n=e.firstChild;n;n=n.nextSibling)this._runEffectsForTemplate(n,t,i,o)};e.runEffects?e.runEffects(n,t,o):n(t,o)}linkPaths(e,t){e=Rn(e),t=Rn(t),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[e]=t}unlinkPaths(e){e=Rn(e),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[e]}notifySplices(e,t){let i={path:""};rr(this,Jn(this,e,i),i.path,t)}get(e,t){return Jn(t||this,e)}set(e,t,i){i?Ln(i,e,t):this[Ss.READ_ONLY]&&this[Ss.READ_ONLY][e]||this._setPendingPropertyOrPath(e,t,!0)&&this._invalidateProperties()}push(e,...t){let i={path:""},o=Jn(this,e,i),n=o.length,s=o.push(...t);return t.length&&ar(this,o,i.path,n,t.length,[]),s}pop(e){let t={path:""},i=Jn(this,e,t),o=Boolean(i.length),n=i.pop();return o&&ar(this,i,t.path,i.length,0,[n]),n}splice(e,t,i,...o){let n,s={path:""},r=Jn(this,e,s);return t<0?t=r.length-Math.floor(-t):t&&(t=Math.floor(t)),n=2===arguments.length?r.splice(t):r.splice(t,i,...o),(o.length||n.length)&&ar(this,r,s.path,t,o.length,n),n}shift(e){let t={path:""},i=Jn(this,e,t),o=Boolean(i.length),n=i.shift();return o&&ar(this,i,t.path,0,0,[n]),n}unshift(e,...t){let i={path:""},o=Jn(this,e,i),n=o.unshift(...t);return t.length&&ar(this,o,i.path,0,t.length,[]),n}notifyPath(e,t){let i;if(1==arguments.length){let o={path:""};t=Jn(this,e,o),i=o.path}else i=Array.isArray(e)?Rn(e):e;this._setPendingPropertyOrPath(i,t,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(e,t){var i;this._addPropertyEffect(e,Ss.READ_ONLY),t&&(this["_set"+(i=e,i[0].toUpperCase()+i.substring(1))]=function(t){this._setProperty(e,t)})}_createPropertyObserver(e,t,i){let o={property:e,method:t,dynamicFn:Boolean(i)};this._addPropertyEffect(e,Ss.OBSERVE,{fn:As,info:o,trigger:{name:e}}),i&&this._addPropertyEffect(t,Ss.OBSERVE,{fn:As,info:o,trigger:{name:t}})}_createMethodObserver(e,t){let i=or(e);if(!i)throw new Error("Malformed observer expression '"+e+"'");Bs(this,i,Ss.OBSERVE,Qs,null,t)}_createNotifyingProperty(e){this._addPropertyEffect(e,Ss.NOTIFY,{fn:Ns,info:{eventName:es(e)+"-changed",property:e}})}_createReflectedProperty(e){let t=this.constructor.attributeNameForProperty(e);"-"===t[0]?console.warn("Property "+e+" cannot be reflected to attribute "+t+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(e,Ss.REFLECT,{fn:Vs,info:{attrName:t}})}_createComputedProperty(e,t,i){let o=or(t);if(!o)throw new Error("Malformed computed expression '"+t+"'");const n=Bs(this,o,Ss.COMPUTE,Hs,e,i);Es(this,Ts)[e]=n}_marshalArgs(e,t,i){const o=this.__data,n=[];for(let s=0,r=e.length;s1)return Ys;n[s]=h}return n}static addPropertyEffect(e,t,i){this.prototype._addPropertyEffect(e,t,i)}static createPropertyObserver(e,t,i){this.prototype._createPropertyObserver(e,t,i)}static createMethodObserver(e,t){this.prototype._createMethodObserver(e,t)}static createNotifyingProperty(e){this.prototype._createNotifyingProperty(e)}static createReadOnlyProperty(e,t){this.prototype._createReadOnlyProperty(e,t)}static createReflectedProperty(e){this.prototype._createReflectedProperty(e)}static createComputedProperty(e,t,i){this.prototype._createComputedProperty(e,t,i)}static bindTemplate(e){return this.prototype._bindTemplate(e)}_bindTemplate(e,t){let i=this.constructor._parseTemplate(e),o=this.__preBoundTemplateInfo==i;if(!o)for(let e in i.propertyEffects)this._createPropertyAccessor(e);if(t)if(i=Object.create(i),i.wasPreBound=o,this.__templateInfo){const t=e._parentTemplateInfo||this.__templateInfo,o=t.lastChild;i.parent=t,t.lastChild=i,i.previousSibling=o,o?o.nextSibling=i:t.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(e,t,i){(e.hostProps=e.hostProps||{})[t]=!0;let o=e.propertyEffects=e.propertyEffects||{};(o[t]=o[t]||[]).push(i)}_stampTemplate(e,t){t=t||this._bindTemplate(e,!0),hr.push(this);let i=super._stampTemplate(e,t);if(hr.pop(),t.nodeList=i.nodeList,!t.wasPreBound){let e=t.childNodes=[];for(let t=i.firstChild;t;t=t.nextSibling)e.push(t)}return i.templateInfo=t,function(e,t){let{nodeList:i,nodeInfoList:o}=t;if(o.length)for(let t=0;tn&&o.push({literal:e.slice(n,i.index)});let s=i[1][0],r=Boolean(i[2]),a=i[3].trim(),l=!1,h="",m=-1;"{"==s&&(m=a.indexOf("::"))>0&&(h=a.substring(m+2),a=a.substring(0,m),l=!0);let c=or(a),d=[];if(c){let{args:e,methodName:i}=c;for(let t=0;t{const t=cs(e);function i(e){const t=Object.getPrototypeOf(e);return t.prototype instanceof n?t:null}function o(e){if(!e.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",e))){let t=null;if(e.hasOwnProperty(JSCompiler_renameProperty("properties",e))){const i=e.properties;i&&(t=function(e){const t={};for(let i in e){const o=e[i];t[i]="function"==typeof o?{type:o}:o}return t}(i))}e.__ownProperties=t}return e.__ownProperties}class n extends t{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){this.prototype;const e=this._properties;this.__observedAttributes=e?Object.keys(e).map((e=>this.prototype._addPropertyToAttributeMap(e))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const e=i(this);e&&e.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const e=o(this);e&&this.createProperties(e)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const e=i(this);this.__properties=Object.assign({},e&&e._properties,o(this))}return this.__properties}static typeForProperty(e){const t=this._properties[e];return t&&t.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return n})),cr=window.ShadyCSS&&window.ShadyCSS.cssBuild,dr=Dn((e=>{const t=mr(lr(e));function i(e,t,i,o){i.computed&&(i.readOnly=!0),i.computed&&(e._hasReadOnlyEffect(t)?console.warn(`Cannot redefine computed property '${t}'.`):e._createComputedProperty(t,i.computed,o)),i.readOnly&&!e._hasReadOnlyEffect(t)?e._createReadOnlyProperty(t,!i.computed):!1===i.readOnly&&e._hasReadOnlyEffect(t)&&console.warn(`Cannot make readOnly property '${t}' non-readOnly.`),i.reflectToAttribute&&!e._hasReflectEffect(t)?e._createReflectedProperty(t):!1===i.reflectToAttribute&&e._hasReflectEffect(t)&&console.warn(`Cannot make reflected property '${t}' non-reflected.`),i.notify&&!e._hasNotifyEffect(t)?e._createNotifyingProperty(t):!1===i.notify&&e._hasNotifyEffect(t)&&console.warn(`Cannot make notify property '${t}' non-notify.`),i.observer&&e._createPropertyObserver(t,i.observer,o[i.observer]),e._addPropertyToAttributeMap(t)}function o(e,t,i,o){if(!cr){const n=t.content.querySelectorAll("style"),s=On(t),r=function(e){let t=kn(e);return t?Cn(t):[]}(i),a=t.content.firstElementChild;for(let i=0;i{t+=e.textContent,e.parentNode.removeChild(e)})),e._styleSheet=new CSSStyleSheet,e._styleSheet.replaceSync(t)}}}return class extends t{static get polymerElementVersion(){return"3.5.1"}static _finalizeClass(){t._finalizeClass.call(this);const e=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;e&&this.createObservers(e,this._properties),this._prepareTemplate()}static _prepareTemplate(){let e=this.template;e&&("string"==typeof e?(console.error("template getter must return HTMLTemplateElement"),e=null):dn||(e=e.cloneNode(!0))),this.prototype._template=e}static createProperties(e){for(let t in e)i(this.prototype,t,e[t],e)}static createObservers(e,t){const i=this.prototype;for(let o=0;o{this._timer=null,jr.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),jr.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}static debounce(t,i,o){return t instanceof e?t._cancelAsync():t=new e,t.setConfig(i,o),t}},jr=new Set;const Pr=function(e){jr.add(e)},wr=function(){const e=Boolean(jr.size);return jr.forEach((e=>{try{e.flush()}catch(e){setTimeout((()=>{throw e}))}})),e};let ur="string"==typeof document.head.style.touchAction,fr="__polymerGestures",Mr="__polymerGesturesHandled",Zr="__polymerGesturesTouchAction",Kr=["mousedown","mousemove","mouseup","click"],yr=[0,1,4,2],gr=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(e){return!1}}();function Dr(e){return Kr.indexOf(e)>-1}let xr=!1;function br(e){if(!Dr(e)&&"touchend"!==e)return ur&&xr&&hn?{passive:!0}:void 0}!function(){try{let e=Object.defineProperty({},"passive",{get(){xr=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}}();let vr=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);const Yr=[],Sr={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0},Tr={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function Xr(e){let t=Array.prototype.slice.call(e.labels||[]);if(!t.length){t=[];try{let i=e.getRootNode();if(e.id){let o=i.querySelectorAll(`label[for = '${e.id}']`);for(let e=0;e-1}if(o[e]===Gr.mouse.target)return}if(t)return;e.preventDefault(),e.stopPropagation()}};function kr(e){let t=vr?["click"]:Kr;for(let i,o=0;oe.composedPath&&e.composedPath()||[],Nr={},Vr=[];function Wr(e){const t=Cr(e);return t.length>0?t[0]:e.target}function _r(e){let t,i=e.type,o=e.currentTarget[fr];if(!o)return;let n=o[i];if(n){if(!e[Mr]&&(e[Mr]={},"touch"===i.slice(0,5))){let t=e.changedTouches[0];if("touchstart"===i&&1===e.touches.length&&(Gr.touch.id=t.identifier),Gr.touch.id!==t.identifier)return;ur||"touchstart"!==i&&"touchmove"!==i||function(e){let t=e.changedTouches[0],i=e.type;if("touchstart"===i)Gr.touch.x=t.clientX,Gr.touch.y=t.clientY,Gr.touch.scrollDecided=!1;else if("touchmove"===i){if(Gr.touch.scrollDecided)return;Gr.touch.scrollDecided=!0;let i=function(e){let t="auto",i=Cr(e);for(let e,o=0;on:"pan-y"===i&&(o=n>s)),o?e.preventDefault():Jr("track")}}(e)}if(t=e[Mr],!t.skip){for(let i,o=0;o-1&&i.reset&&i.reset();for(let o,s=0;s{e.style.touchAction=t})),e[Zr]=t}function Fr(e,t,i){let o=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(o.detail=i,Vn(e).dispatchEvent(o),o.defaultPrevented){let e=i.preventer||i.sourceEvent;e&&e.preventDefault&&e.preventDefault()}}function Jr(e){let t=function(e){for(let t,i=0;i=5||n>=5}function Qr(e,t,i){if(!t)return;let o,n=e.moves[e.moves.length-2],s=e.moves[e.moves.length-1],r=s.x-e.x,a=s.y-e.y,l=0;n&&(o=s.x-n.x,l=s.y-n.y),Fr(t,"track",{state:e.state,x:i.clientX,y:i.clientY,dx:r,dy:a,ddx:o,ddy:l,sourceEvent:i,hover:function(){return function(e,t){let i=document.elementFromPoint(e,t),o=i;for(;o&&o.shadowRoot&&!window.ShadyDOM;){let n=o;if(o=o.shadowRoot.elementFromPoint(e,t),n===o)break;o&&(i=o)}return i}(i.clientX,i.clientY)}})}function $r(e,t,i){let o=Math.abs(t.clientX-e.x),n=Math.abs(t.clientY-e.y),s=Wr(i||t);!s||Tr[s.localName]&&s.hasAttribute("disabled")||(isNaN(o)||isNaN(n)||o<=25&&n<=25||function(e){if("click"===e.type){if(0===e.detail)return!0;let t=Wr(e);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return!0;let i=t.getBoundingClientRect(),o=e.pageX,n=e.pageY;return!(o>=i.left&&o<=i.right&&n>=i.top&&n<=i.bottom)}return!1}(t))&&(e.prevent||Fr(s,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:i}))}Ur({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){Or(this.info)},mousedown:function(e){if(!zr(e))return;let t=Wr(e),i=this;Ar(this.info,(function(e){zr(e)||(Lr("up",t,e),Or(i.info))}),(function(e){zr(e)&&Lr("up",t,e),Or(i.info)})),Lr("down",t,e)},touchstart:function(e){Lr("down",Wr(e),e.changedTouches[0],e)},touchend:function(e){Lr("up",Wr(e),e.changedTouches[0],e)}}),Ur({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(e){this.moves.length>2&&this.moves.shift(),this.moves.push(e)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Or(this.info)},mousedown:function(e){if(!zr(e))return;let t=Wr(e),i=this,o=function(e){let o=e.clientX,n=e.clientY;Br(i.info,o,n)&&(i.info.state=i.info.started?"mouseup"===e.type?"end":"track":"start","start"===i.info.state&&Jr("tap"),i.info.addMove({x:o,y:n}),zr(e)||(i.info.state="end",Or(i.info)),t&&Qr(i.info,t,e),i.info.started=!0)};Ar(this.info,o,(function(e){i.info.started&&o(e),Or(i.info)})),this.info.x=e.clientX,this.info.y=e.clientY},touchstart:function(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchmove:function(e){let t=Wr(e),i=e.changedTouches[0],o=i.clientX,n=i.clientY;Br(this.info,o,n)&&("start"===this.info.state&&Jr("tap"),this.info.addMove({x:o,y:n}),Qr(this.info,t,i),this.info.state="track",this.info.started=!0)},touchend:function(e){let t=Wr(e),i=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Qr(this.info,t,i))}}),Ur({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown:function(e){zr(e)&&(this.info.x=e.clientX,this.info.y=e.clientY)},click:function(e){zr(e)&&$r(this.info,e)},touchstart:function(e){const t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchend:function(e){$r(this.info,e.changedTouches[0],e)}});const qr=Dn((e=>class extends e{_addEventListenerToNode(e,t,i){Ir(e,t,i)||super._addEventListenerToNode(e,t,i)}_removeEventListenerFromNode(e,t,i){Hr(e,t,i)||super._removeEventListenerFromNode(e,t,i)}})),ea=/:host\(:dir\((ltr|rtl)\)\)/g,ta=/([\s\w-#\.\[\]\*]*):dir\((ltr|rtl)\)/g,ia=/:dir\((?:ltr|rtl)\)/,oa=Boolean(window.ShadyDOM&&window.ShadyDOM.inUse),na=[];let sa=null,ra="";function aa(){ra=document.documentElement.getAttribute("dir")}function la(e){if(!e.__autoDirOptOut){e.setAttribute("dir",ra)}}function ha(){aa(),ra=document.documentElement.getAttribute("dir");for(let e=0;e{oa||sa||(aa(),sa=new MutationObserver(ha),sa.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}));const t=Ps(e);class i extends t{static _processStyleText(e,i){return e=t._processStyleText.call(this,e,i),!oa&&ia.test(e)&&(e=this._replaceDirInCssText(e),this.__activateDir=!0),e}static _replaceDirInCssText(e){let t=e;return t=t.replace(ea,':host([dir="$1"])'),t=t.replace(ta,':host([dir="$2"]) $1'),t}constructor(){super(),this.__autoDirOptOut=!1}ready(){super.ready(),this.__autoDirOptOut=this.hasAttribute("dir")}connectedCallback(){t.prototype.connectedCallback&&super.connectedCallback(),this.constructor.__activateDir&&(sa&&sa.takeRecords().length&&ha(),na.push(this),la(this))}disconnectedCallback(){if(t.prototype.disconnectedCallback&&super.disconnectedCallback(),this.constructor.__activateDir){const e=na.indexOf(this);e>-1&&na.splice(e,1)}}}return i.__activateDir=!1,i}));let ca=!1,da=[],pa=[];function ja(){ca=!0,requestAnimationFrame((function(){ca=!1,function(e){for(;e.length;)Pa(e.shift())}(da),setTimeout((function(){!function(e){for(let t=0,i=e.length;t{throw e}))}}function wa(){document.body.removeAttribute("unresolved")}function ua(e,t,i){return{index:e,removed:t,addedCount:i}}"interactive"===document.readyState||"complete"===document.readyState?wa():window.addEventListener("DOMContentLoaded",wa);const fa=0,Ma=1,Za=2,Ka=3;function ya(e,t,i,o,n,s){let r,a=0,l=0,h=Math.min(i-t,s-n);if(0==t&&0==n&&(a=function(e,t,i){for(let o=0;o0||i>0;){if(0==t){n.push(Za),i--;continue}if(0==i){n.push(Ka),t--;continue}let s,r=e[t-1][i-1],a=e[t-1][i],l=e[t][i-1];s=axa(e)?Vn(e).assignedNodes({flatten:!0}):[e])).reduce(((e,t)=>e.concat(t)),[])}constructor(e,t){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=e,this.callback=t,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){xa(this._target)?this._listenSlots([this._target]):Vn(this._target).children&&(this._listenSlots(Vn(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(e=>{this._processMutations(e)})):(this._nativeChildrenObserver=new MutationObserver((e=>{this._processMutations(e)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){xa(this._target)?this._unlistenSlots([this._target]):Vn(this._target).children&&(this._unlistenSlots(Vn(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,hs.run((()=>this.flush())))}_processMutations(e){this._processSlotMutations(e),this.flush()}_processSlotMutations(e){if(e)for(let t=0;t{"activeElement"!=t&&(e.prototype[t]=Xa.prototype[t])})),Ea(e.prototype,["classList"]),za=e,Object.defineProperties(ka.prototype,{localTarget:{get(){const e=this.event.currentTarget,t=e&&Ga(e).getOwnerRoot(),i=this.path;for(let e=0;e{for(;e;){const t=Object.getOwnPropertyDescriptor(e,"observedAttributes");if(t)return t.get;e=Object.getPrototypeOf(e.prototype).constructor}return()=>[]};Dn((e=>{const t=dr(e);let i=Va(t);return class extends t{constructor(){super(),this.__isUpgradeDisabled}static get observedAttributes(){return i.call(this).concat(Na)}_initializeProperties(){this.hasAttribute(Na)?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(e){return super._canApplyPropertyDefault(e)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(e))}attributeChangedCallback(e,t,i,o){e==Na?this.__isUpgradeDisabled&&null==i&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,Vn(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(e,t,i,o)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}}));const Wa="disable-upgrade";let _a=window.ShadyCSS;const Ia=Dn((e=>{const t=qr(dr(e)),i=cr?t:ma(t),o=Va(i),n={x:"pan-x",y:"pan-y",none:"none",all:"auto"};class s extends i{constructor(){super(),this.isAttached,this.__boundListeners,this._debouncers,this.__isUpgradeDisabled,this.__needsAttributesAtConnected,this._legacyForceObservedAttributes}static get importMeta(){return this.prototype.importMeta}created(){}__attributeReaction(e,t,i){(this.__dataAttributes&&this.__dataAttributes[e]||e===Wa)&&this.attributeChangedCallback(e,t,i,null)}setAttribute(e,t){if(Kn&&!this._legacyForceObservedAttributes){const i=this.getAttribute(e);super.setAttribute(e,t),this.__attributeReaction(e,i,String(t))}else super.setAttribute(e,t)}removeAttribute(e){if(Kn&&!this._legacyForceObservedAttributes){const t=this.getAttribute(e);super.removeAttribute(e),this.__attributeReaction(e,t,null)}else super.removeAttribute(e)}static get observedAttributes(){return Kn&&!this.prototype._legacyForceObservedAttributes?(this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))||(this.__observedAttributes=[],this.prototype),this.__observedAttributes):o.call(this).concat(Wa)}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(e){return super._canApplyPropertyDefault(e)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(e))}connectedCallback(){this.__needsAttributesAtConnected&&this._takeAttributes(),this.__isUpgradeDisabled||(super.connectedCallback(),this.isAttached=!0,this.attached())}attached(){}disconnectedCallback(){this.__isUpgradeDisabled||(super.disconnectedCallback(),this.isAttached=!1,this.detached())}detached(){}attributeChangedCallback(e,t,i,o){t!==i&&(e==Wa?this.__isUpgradeDisabled&&null==i&&(this._initializeProperties(),this.__isUpgradeDisabled=!1,Vn(this).isConnected&&this.connectedCallback()):(super.attributeChangedCallback(e,t,i,o),this.attributeChanged(e,t,i)))}attributeChanged(e,t,i){}_initializeProperties(){if(dn&&this.hasAttribute(Wa))this.__isUpgradeDisabled=!0;else{let e=Object.getPrototypeOf(this);e.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",e))||(this._registered(),e.__hasRegisterFinished=!0),super._initializeProperties(),this.root=this,this.created(),Kn&&!this._legacyForceObservedAttributes&&(this.hasAttributes()?this._takeAttributes():this.parentNode||(this.__needsAttributesAtConnected=!0)),this._applyListeners()}}_takeAttributes(){const e=this.attributes;for(let t=0,i=e.length;t{if(!Ca(e,n))return;const t=Array.from(Aa.nativeMethods.querySelectorAll.call(e,"*"));t.push(e);for(let e=0;e{for(let t=0;t0?ls.after(i):hs,t.bind(this))}isDebouncerActive(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];return!(!t||!t.isActive())}flushDebouncer(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];t&&t.flush()}cancelDebouncer(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];t&&t.cancel()}async(e,t){return t>0?ls.run(e.bind(this),t):~hs.run(e.bind(this))}cancelAsync(e){e<0?hs.cancel(~e):ls.cancel(e)}create(e,t){let i=document.createElement(e);if(t)if(i.setProperties)i.setProperties(t);else for(let e in t)i[e]=t[e];return i}elementMatches(e,t){return Ta(t||this,e)}toggleAttribute(e,t){let i=this;return 3===arguments.length&&(i=arguments[2]),1==arguments.length&&(t=!i.hasAttribute(e)),t?(Vn(i).setAttribute(e,""),!0):(Vn(i).removeAttribute(e),!1)}toggleClass(e,t,i){i=i||this,1==arguments.length&&(t=!i.classList.contains(e)),t?i.classList.add(e):i.classList.remove(e)}transform(e,t){(t=t||this).style.webkitTransform=e,t.style.transform=e}translate3d(e,t,i,o){o=o||this,this.transform("translate3d("+e+","+t+","+i+")",o)}arrayDelete(e,t){let i;if(Array.isArray(e)){if(i=e.indexOf(t),i>=0)return e.splice(i,1)}else{if(i=Jn(this,e).indexOf(t),i>=0)return this.splice(e,i,1)}return null}_logger(e,t){switch(Array.isArray(t)&&1===t.length&&Array.isArray(t[0])&&(t=t[0]),e){case"log":case"warn":case"error":console[e](...t)}}_log(...e){this._logger("log",e)}_warn(...e){this._logger("warn",e)}_error(...e){this._logger("error",e)}_logf(e,...t){return["[%s::%s]",this.is,e,...t]}}return s.prototype.is="",s})),Ha={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,listeners:!0,hostAttributes:!0},Ua={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,behaviors:!0,_noAccessors:!0},Ra=Object.assign({listeners:!0,hostAttributes:!0,properties:!0,observers:!0},Ua);function Fa(e,t,i,o){!function(e,t,i){const o=e._noAccessors,n=Object.getOwnPropertyNames(e);for(let s=0;s=0;o--){let n=e[o];n?Array.isArray(n)?Ja(n,t):t.indexOf(n)<0&&(!i||i.indexOf(n)<0)&&t.unshift(n):console.warn("behavior is null, check for missing or 404 import")}return t}function La(e,t){for(const i in t){const o=e[i],n=t[i];e[i]=!("value"in n)&&o&&"value"in o?Object.assign({value:o.value},n):n}}const Ba=Ia(HTMLElement);function Qa(e,t,i){let o;const n={};class s extends t{static _finalizeClass(){if(this.hasOwnProperty(JSCompiler_renameProperty("generatedFrom",this))){if(o)for(let e,t=0;t=0;t--){const i=e[t];for(let e in i)this._ensureAttribute(e,i[e])}super._ensureAttributes()}ready(){super.ready();let e=n.ready;if(e)for(let t=0;t{o&&function(e,t,i){for(let o=0;oclass extends e{_shouldPropertyChange(e,t,i){return qa(this,e,t,i,!0)}})),tl=Dn((e=>class extends e{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(e,t,i){return qa(this,e,t,i,this.mutableData)}}));el._mutablePropertyChange=qa;let il=null;function ol(){return il}ol.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:ol,writable:!0}});const nl=lr(ol),sl=el(nl);const rl=lr(class{});function al(e,t){for(let i=0;i{e.model=this,i(e)}));else{let o=this.__dataHost.__dataHost;o&&o._addEventListenerToNode(e,t,i)}}_showHideChildren(e){al(e,this.children)}_setUnmanagedPropertyToNode(e,t,i){e.__hideTemplateChildren__&&e.nodeType==Node.TEXT_NODE&&"textContent"==t?e.__polymerTextContent__=i:super._setUnmanagedPropertyToNode(e,t,i)}get parentModel(){let e=this.__parentModel;if(!e){let t;e=this;do{e=e.__dataHost.__dataHost}while((t=e.__templatizeOptions)&&!t.parentModel);this.__parentModel=e}return e}dispatchEvent(e){return!0}}ll.prototype.__dataHost,ll.prototype.__templatizeOptions,ll.prototype._methodHost,ll.prototype.__templatizeOwner,ll.prototype.__hostProps;const hl=el(ll);function ml(e){let t=e.__dataHost;return t&&t._methodHost||t}function cl(e,t,i){let o=i.mutableData?hl:ll;Pl.mixin&&(o=Pl.mixin(o));let n=class extends o{};return n.prototype.__templatizeOptions=i,n.prototype._bindTemplate(e),function(e,t,i,o){let n=i.hostProps||{};for(let t in o.instanceProps){delete n[t];let i=o.notifyInstanceProp;i&&e.prototype._addPropertyEffect(t,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:jl(t,i)})}if(o.forwardHostProp&&t.__dataHost)for(let t in n)i.hasHostProps||(i.hasHostProps=!0),e.prototype._addPropertyEffect(t,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(e,t,i){e.__dataHost._setPendingPropertyOrPath("_host_"+t,i[t],!0,!0)}})}(n,e,t,i),n}function dl(e,t,i,o){let n=i.forwardHostProp;if(n&&t.hasHostProps){const s="template"==e.localName;let r=t.templatizeTemplateClass;if(!r){if(s){let e=i.mutableData?sl:nl;class o extends e{}r=t.templatizeTemplateClass=o}else{const i=e.constructor;class o extends i{}r=t.templatizeTemplateClass=o}let a=t.hostProps;for(let e in a)r.prototype._addPropertyEffect("_host_"+e,r.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:pl(e,n)}),r.prototype._createNotifyingProperty("_host_"+e);pn&&o&&function(e,t,i){const o=i.constructor._properties,{propertyEffects:n}=e,{instanceProps:s}=t;for(let e in n)if(!(o[e]||s&&s[e])){const t=n[e];for(let i=0;i can only be templatized once");e.__templatizeOwner=t;let o=(t?t.constructor:ll)._parseTemplate(e),n=o.templatizeInstanceClass;n||(n=cl(e,o,i),o.templatizeInstanceClass=n);const s=ml(e);dl(e,o,i,s);let r=class extends n{};return r.prototype._methodHost=s,r.prototype.__dataHost=e,r.prototype.__templatizeOwner=t,r.prototype.__hostProps=o.hostProps,r}let wl=!1;function ul(){if(dn&&!sn){if(!wl){wl=!0;const e=document.createElement("style");e.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(e)}return!0}return!1}const fl=qr(tl(lr(HTMLElement)));customElements.define("dom-bind",class extends fl{static get observedAttributes(){return["mutable-data"]}constructor(){if(super(),mn)throw new Error("strictTemplatePolicy: dom-bind not allowed");this.root=null,this.$=null,this.__children=null}attributeChangedCallback(e,t,i,o){this.mutableData=!0}connectedCallback(){ul()||(this.style.display="none"),this.render()}disconnectedCallback(){this.__removeChildren()}__insertChildren(){Vn(Vn(this).parentNode).insertBefore(this.root,this)}__removeChildren(){if(this.__children)for(let e=0;e{if(e=this.querySelector("template"),!e)throw new Error("dom-bind requires a