From 25320fe521fed045e0a5e695180762ae04b48015 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Sun, 7 Sep 2025 12:49:09 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=8E=A8=E7=BF=BB=E8=88=8A?= =?UTF-8?q?=E6=9E=B6=E6=A7=8B,=20=E9=80=B2=E5=85=A5=20Vite=20=E7=9B=9B?= =?UTF-8?q?=E4=B8=96=EF=BC=81=20*=20=E6=89=80=E6=9C=89=E7=9A=84=20CDN=20?= =?UTF-8?q?=E4=BE=9D=E8=B3=B4=E5=B7=B2=E5=85=A8=E9=83=A8=20npm=20=E5=8C=96?= =?UTF-8?q?=20*=20Webpack=3F=20=E4=B8=80=E9=82=8A=E5=8E=BB!=20Vite=20?= =?UTF-8?q?=E5=A4=AA=E5=A5=BD=E7=94=A8=E5=95=A6!=20*=20=E5=B0=87=20Imports?= =?UTF-8?q?.ts=20=E5=89=94=E9=99=A4=20*=20=E7=A7=BB=E9=99=A4=E4=BA=86?= =?UTF-8?q?=E5=A4=A7=E9=87=8F=E7=9A=84=E9=9D=9C=E6=85=8B=E6=96=87=E4=BB=B6?= =?UTF-8?q?=20*=20=E5=B0=87=20index.html=20=E7=9A=84=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BB=A3=E7=A2=BC=E5=88=86=E9=9B=A2=20*=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=20deno=20task=20*=20=E7=A7=BB=E9=99=A4=E4=BA=86=E5=8B=95?= =?UTF-8?q?=E6=85=8B=E7=B7=A8=E8=AD=AF=E9=A0=81=E9=9D=A2=E7=9A=84=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20*=20./static=20=E5=BC=95=E7=94=A8=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E8=AE=8A=E6=9B=B4=E7=82=BA=20npm=20=E5=8C=85=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + client/Data.ts | 4 +- client/Imports.ts | 30 - client/deno.jsonc | 29 + client/index.html | 101 +- client/index.ts | 30 + client/static/crypto-es-3.1.0.static.mjs | 35 - client/static/crypto-es@3.1.0/aes.mjs | 134 - client/static/crypto-es@3.1.0/blowfish.mjs | 1200 - client/static/crypto-es@3.1.0/cipher-core.mjs | 636 - client/static/crypto-es@3.1.0/core.mjs | 584 - client/static/crypto-es@3.1.0/enc-base64.mjs | 104 - .../static/crypto-es@3.1.0/enc-base64url.mjs | 102 - client/static/crypto-es@3.1.0/enc-utf16.mjs | 57 - client/static/crypto-es@3.1.0/evpkdf.mjs | 91 - client/static/crypto-es@3.1.0/format-hex.mjs | 22 - client/static/crypto-es@3.1.0/md5.mjs | 201 - client/static/crypto-es@3.1.0/mode-cfb.mjs | 48 - .../crypto-es@3.1.0/mode-ctr-gladman.mjs | 68 - client/static/crypto-es@3.1.0/mode-ctr.mjs | 39 - client/static/crypto-es@3.1.0/mode-ecb.mjs | 30 - client/static/crypto-es@3.1.0/mode-ofb.mjs | 40 - .../static/crypto-es@3.1.0/pad-ansix923.mjs | 25 - .../static/crypto-es@3.1.0/pad-iso10126.mjs | 22 - .../static/crypto-es@3.1.0/pad-iso97971.mjs | 22 - .../static/crypto-es@3.1.0/pad-nopadding.mjs | 12 - .../crypto-es@3.1.0/pad-zeropadding.mjs | 24 - client/static/crypto-es@3.1.0/pbkdf2.mjs | 99 - .../static/crypto-es@3.1.0/rabbit-legacy.mjs | 126 - client/static/crypto-es@3.1.0/rabbit.mjs | 123 - client/static/crypto-es@3.1.0/rc4.mjs | 93 - client/static/crypto-es@3.1.0/ripemd160.mjs | 497 - client/static/crypto-es@3.1.0/sha1.mjs | 95 - client/static/crypto-es@3.1.0/sha224.mjs | 60 - client/static/crypto-es@3.1.0/sha256.mjs | 126 - client/static/crypto-es@3.1.0/sha3.mjs | 170 - client/static/crypto-es@3.1.0/sha384.mjs | 60 - client/static/crypto-es@3.1.0/sha512.mjs | 300 - client/static/crypto-es@3.1.0/tripledes.mjs | 822 - client/static/crypto-es@3.1.0/x64-core.mjs | 132 - client/static/jquery-3.7.1.min.js | 2 - client/static/mdui-2.1.4.css | 1 - client/static/mdui-2.1.4.global.min.js | 22 - client/static/react-dom-esm-18.3.1.static.js | 5 - client/static/react-dom@18.3.1/react-dom.mjs | 24 - client/static/react-esm-18.3.1.static.js | 3 - client/static/react@18.3.1/react.mjs | 16 - client/static/scheduler@0.23.2/scheduler.mjs | 17 - client/static/splitjs-1.6.5.min.js | 3 - client/style.css | 69 + client/typedef/csstype@3.1.3.d.ts | 21297 ---------------- client/typedef/mdui-jsx.d.ts | 3350 --- client/typedef/prop-types@15.7.15.d.ts | 131 - client/typedef/react@18.3.18-global.d.ts | 161 - client/typedef/react@18.3.18.d.ts | 4586 ---- client/ui/App.tsx | 61 +- client/ui/Avatar.jsx | 2 - client/ui/chat/ChatFragment.jsx | 2 +- client/ui/chat/Message.jsx | 2 - client/ui/chat/MessageContainer.jsx | 2 - client/ui/chat/SystemMessage.jsx | 2 - client/ui/dialog/LoginDialog.tsx | 13 +- client/ui/main/ContactsListItem.jsx | 2 - client/ui/main/RecentsListItem.jsx | 2 - client/ui/snackbar.js | 3 - client/ui/useEventListener.js | 2 +- client/vite.config.ts | 15 + deno.jsonc | 12 +- server/api/BaseApi.ts | 2 +- server/api/UserApi.ts | 11 + server/compiler/io.js | 263 - server/compiler/transform.ts | 46 - server/config.ts | 10 +- server/main.ts | 10 +- 74 files changed, 217 insertions(+), 36326 deletions(-) delete mode 100644 client/Imports.ts create mode 100644 client/deno.jsonc create mode 100644 client/index.ts delete mode 100644 client/static/crypto-es-3.1.0.static.mjs delete mode 100644 client/static/crypto-es@3.1.0/aes.mjs delete mode 100644 client/static/crypto-es@3.1.0/blowfish.mjs delete mode 100644 client/static/crypto-es@3.1.0/cipher-core.mjs delete mode 100644 client/static/crypto-es@3.1.0/core.mjs delete mode 100644 client/static/crypto-es@3.1.0/enc-base64.mjs delete mode 100644 client/static/crypto-es@3.1.0/enc-base64url.mjs delete mode 100644 client/static/crypto-es@3.1.0/enc-utf16.mjs delete mode 100644 client/static/crypto-es@3.1.0/evpkdf.mjs delete mode 100644 client/static/crypto-es@3.1.0/format-hex.mjs delete mode 100644 client/static/crypto-es@3.1.0/md5.mjs delete mode 100644 client/static/crypto-es@3.1.0/mode-cfb.mjs delete mode 100644 client/static/crypto-es@3.1.0/mode-ctr-gladman.mjs delete mode 100644 client/static/crypto-es@3.1.0/mode-ctr.mjs delete mode 100644 client/static/crypto-es@3.1.0/mode-ecb.mjs delete mode 100644 client/static/crypto-es@3.1.0/mode-ofb.mjs delete mode 100644 client/static/crypto-es@3.1.0/pad-ansix923.mjs delete mode 100644 client/static/crypto-es@3.1.0/pad-iso10126.mjs delete mode 100644 client/static/crypto-es@3.1.0/pad-iso97971.mjs delete mode 100644 client/static/crypto-es@3.1.0/pad-nopadding.mjs delete mode 100644 client/static/crypto-es@3.1.0/pad-zeropadding.mjs delete mode 100644 client/static/crypto-es@3.1.0/pbkdf2.mjs delete mode 100644 client/static/crypto-es@3.1.0/rabbit-legacy.mjs delete mode 100644 client/static/crypto-es@3.1.0/rabbit.mjs delete mode 100644 client/static/crypto-es@3.1.0/rc4.mjs delete mode 100644 client/static/crypto-es@3.1.0/ripemd160.mjs delete mode 100644 client/static/crypto-es@3.1.0/sha1.mjs delete mode 100644 client/static/crypto-es@3.1.0/sha224.mjs delete mode 100644 client/static/crypto-es@3.1.0/sha256.mjs delete mode 100644 client/static/crypto-es@3.1.0/sha3.mjs delete mode 100644 client/static/crypto-es@3.1.0/sha384.mjs delete mode 100644 client/static/crypto-es@3.1.0/sha512.mjs delete mode 100644 client/static/crypto-es@3.1.0/tripledes.mjs delete mode 100644 client/static/crypto-es@3.1.0/x64-core.mjs delete mode 100644 client/static/jquery-3.7.1.min.js delete mode 100644 client/static/mdui-2.1.4.css delete mode 100644 client/static/mdui-2.1.4.global.min.js delete mode 100644 client/static/react-dom-esm-18.3.1.static.js delete mode 100644 client/static/react-dom@18.3.1/react-dom.mjs delete mode 100644 client/static/react-esm-18.3.1.static.js delete mode 100644 client/static/react@18.3.1/react.mjs delete mode 100644 client/static/scheduler@0.23.2/scheduler.mjs delete mode 100644 client/static/splitjs-1.6.5.min.js create mode 100644 client/style.css delete mode 100644 client/typedef/csstype@3.1.3.d.ts delete mode 100644 client/typedef/mdui-jsx.d.ts delete mode 100644 client/typedef/prop-types@15.7.15.d.ts delete mode 100644 client/typedef/react@18.3.18-global.d.ts delete mode 100644 client/typedef/react@18.3.18.d.ts delete mode 100644 client/ui/snackbar.js create mode 100644 client/vite.config.ts delete mode 100644 server/compiler/io.js delete mode 100644 server/compiler/transform.ts diff --git a/.gitignore b/.gitignore index ce573a7..33ac004 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ thewhitesilk_config.json thewhitesilk_data/ deno.lock +node_modules/ \ No newline at end of file diff --git a/client/Data.ts b/client/Data.ts index 829d27b..072ed8f 100644 --- a/client/Data.ts +++ b/client/Data.ts @@ -1,9 +1,9 @@ -import { CryptoES } from './Imports.ts' +import * as CryptoES from 'crypto-es' const dataIsEmpty = !localStorage.tws_data || localStorage.tws_data == '' const aes = { - enc: (m: string, k: string) => CryptoES.AES.encrypt(m, k).toString(CryptoES.Utf8), + enc: (m: string, k: string) => CryptoES.AES.encrypt(m, k).toString(CryptoES.HexFormatter), dec: (m: string, k: string) => CryptoES.AES.decrypt(m, k).toString(CryptoES.Utf8), } diff --git a/client/Imports.ts b/client/Imports.ts deleted file mode 100644 index 277073b..0000000 --- a/client/Imports.ts +++ /dev/null @@ -1,30 +0,0 @@ -// @ts-types="./typedef/react@18.3.18.d.ts" -import * as React from './static/react-esm-18.3.1.static.js' -import * as ReactDOM from './static/react-dom-esm-18.3.1.static.js' -import * as CryptoES from './static/crypto-es-3.1.0.static.mjs' - -import type { Dialog } from 'https://unpkg.com/mdui@2.1.4/components/dialog/index.d.ts' -import type { TextField } from 'https://unpkg.com/mdui@2.1.4/components/text-field/index.d.ts' -import type { Button } from 'https://unpkg.com/mdui@2.1.4/components/button/index.d.ts' -import type { NavigationRail } from 'https://unpkg.com/mdui@2.1.4/components/navigation-rail/navigation-rail.d.ts' - -declare global { - namespace React { - namespace JSX { - interface IntrinsicAttributes { - id?: string - } - } - } -} - -export { - React, - ReactDOM, - CryptoES, - - Dialog as MduiDialog, - TextField as MduiTextField, - Button as MduiButton, - NavigationRail as MduiNavigationRail, -} diff --git a/client/deno.jsonc b/client/deno.jsonc new file mode 100644 index 0000000..e9629ec --- /dev/null +++ b/client/deno.jsonc @@ -0,0 +1,29 @@ +{ + "tasks": { + "dev": "deno run -A --node-modules-dir npm:vite", + "build": "deno run -A --node-modules-dir npm:vite build", + "preview": "deno run -A --node-modules-dir npm:vite preview", + "serve": "deno run --allow-net --allow-read jsr:@std/http@1/file-server dist/" + }, + "compilerOptions": { + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "jsx": "react-jsx", + "jsxImportSource": "react", + "jsxImportSourceTypes": "@types/react" + }, + "imports": { + "@deno/vite-plugin": "npm:@deno/vite-plugin@1.0.5", + "@types/react": "npm:@types/react@18.3.1", + "@types/react-dom": "npm:@types/react-dom@18.3.1", + "@vitejs/plugin-react": "npm:@vitejs/plugin-react@4.7.0", + "react": "npm:react@18.3.1", + "react-dom": "npm:react-dom@18.3.1", + "vite": "npm:vite@7.0.6", + + "chalk": "npm:chalk@5.4.1", + + "mdui": "npm:mdui@2.1.4", + "split.js": "npm:split.js@1.3.2", + "crypto-es": "npm:crypto-es@3.1.0" + } +} diff --git a/client/index.html b/client/index.html index dffd93b..b620792 100644 --- a/client/index.html +++ b/client/index.html @@ -7,88 +7,12 @@ - - - - - TheWhiteSilk - + @@ -103,28 +27,7 @@ - - + \ No newline at end of file diff --git a/client/index.ts b/client/index.ts new file mode 100644 index 0000000..af08d0f --- /dev/null +++ b/client/index.ts @@ -0,0 +1,30 @@ +import 'mdui/mdui.css' +import 'mdui' +import { $ } from "mdui/jq" +import { breakpoint, Dialog } from "mdui" + +import * as ReactDOM from 'react-dom' + +// deno-lint-ignore no-window no-window-prefix +new URL(location.href).searchParams.get('debug') == 'true' && window.addEventListener('error', ({ message, filename, lineno, colno, error }) => { + const m = $("#ErrorDialog_Message") + const d = $("#ErrorDialog").get(0) as Dialog + const s = d.open + d.open = true + m.html((s ? `${m.html()}

` : '') + `${message} (${filename || 'unknown'}:${lineno}:${colno})`) +}) + +import App from './ui/App.tsx' + +ReactDOM.createRoot(document.getElementById('app')).render(React.createElement(App, null)) + +const onResize = () => { + document.body.style.setProperty('--whitesilk-widget-message-maxwidth', breakpoint().down('md') ? "80%" : "70%") + // deno-lint-ignore no-window + document.body.style.setProperty('--whitesilk-window-width', window.innerWidth + 'px') + // deno-lint-ignore no-window + document.body.style.setProperty('--whitesilk-window-height', window.innerHeight + 'px') +} +// deno-lint-ignore no-window no-window-prefix +window.addEventListener('resize', onResize) +onResize() diff --git a/client/static/crypto-es-3.1.0.static.mjs b/client/static/crypto-es-3.1.0.static.mjs deleted file mode 100644 index 1bcd618..0000000 --- a/client/static/crypto-es-3.1.0.static.mjs +++ /dev/null @@ -1,35 +0,0 @@ -import { Base, BufferedBlockAlgorithm, HMAC, Hasher, Hex, Latin1, Utf8, WordArray } from "./crypto-es@3.1.0/core.mjs"; -import { X64Word, X64WordArray } from "./crypto-es@3.1.0/x64-core.mjs"; -import { Base64 } from "./crypto-es@3.1.0/enc-base64.mjs"; -import { HmacMD5, MD5, MD5Algo } from "./crypto-es@3.1.0/md5.mjs"; -import { EvpKDF, EvpKDFAlgo } from "./crypto-es@3.1.0/evpkdf.mjs"; -import { BlockCipher, BlockCipherMode, CBC, Cipher, CipherParams, OpenSSLFormatter, OpenSSLKdf, PasswordBasedCipher, Pkcs7, SerializableCipher, StreamCipher } from "./crypto-es@3.1.0/cipher-core.mjs"; -import { Utf16, Utf16BE, Utf16LE } from "./crypto-es@3.1.0/enc-utf16.mjs"; -import { Base64url } from "./crypto-es@3.1.0/enc-base64url.mjs"; -import { HmacSHA1, SHA1, SHA1Algo } from "./crypto-es@3.1.0/sha1.mjs"; -import { HmacSHA256, SHA256, SHA256Algo } from "./crypto-es@3.1.0/sha256.mjs"; -import { HmacSHA224, SHA224, SHA224Algo } from "./crypto-es@3.1.0/sha224.mjs"; -import { HmacSHA512, SHA512, SHA512Algo } from "./crypto-es@3.1.0/sha512.mjs"; -import { HmacSHA384, SHA384, SHA384Algo } from "./crypto-es@3.1.0/sha384.mjs"; -import { HmacSHA3, SHA3, SHA3Algo } from "./crypto-es@3.1.0/sha3.mjs"; -import { HmacRIPEMD160, RIPEMD160, RIPEMD160Algo } from "./crypto-es@3.1.0/ripemd160.mjs"; -import { PBKDF2, PBKDF2Algo } from "./crypto-es@3.1.0/pbkdf2.mjs"; -import { AES, AESAlgo } from "./crypto-es@3.1.0/aes.mjs"; -import { DES, DESAlgo, TripleDES, TripleDESAlgo } from "./crypto-es@3.1.0/tripledes.mjs"; -import { Rabbit, RabbitAlgo } from "./crypto-es@3.1.0/rabbit.mjs"; -import { RabbitLegacy, RabbitLegacyAlgo } from "./crypto-es@3.1.0/rabbit-legacy.mjs"; -import { RC4, RC4Algo, RC4Drop, RC4DropAlgo } from "./crypto-es@3.1.0/rc4.mjs"; -import { Blowfish, BlowfishAlgo } from "./crypto-es@3.1.0/blowfish.mjs"; -import { CFB } from "./crypto-es@3.1.0/mode-cfb.mjs"; -import { CTR } from "./crypto-es@3.1.0/mode-ctr.mjs"; -import { CTRGladman } from "./crypto-es@3.1.0/mode-ctr-gladman.mjs"; -import { ECB } from "./crypto-es@3.1.0/mode-ecb.mjs"; -import { OFB } from "./crypto-es@3.1.0/mode-ofb.mjs"; -import { AnsiX923 } from "./crypto-es@3.1.0/pad-ansix923.mjs"; -import { Iso10126 } from "./crypto-es@3.1.0/pad-iso10126.mjs"; -import { ZeroPadding } from "./crypto-es@3.1.0/pad-zeropadding.mjs"; -import { Iso97971 } from "./crypto-es@3.1.0/pad-iso97971.mjs"; -import { NoPadding } from "./crypto-es@3.1.0/pad-nopadding.mjs"; -import { HexFormatter } from "./crypto-es@3.1.0/format-hex.mjs"; - -export { AES, AESAlgo, AnsiX923, Base, Base64, Base64url, BlockCipher, BlockCipherMode, Blowfish, BlowfishAlgo, BufferedBlockAlgorithm, CBC, CFB, CTR, CTRGladman, Cipher, CipherParams, DES, DESAlgo, ECB, EvpKDF, EvpKDFAlgo, HMAC, Hasher, Hex, HexFormatter, HmacMD5, HmacRIPEMD160, HmacSHA1, HmacSHA224, HmacSHA256, HmacSHA3, HmacSHA384, HmacSHA512, Iso10126, Iso97971, Latin1, MD5, MD5Algo, NoPadding, OFB, OpenSSLFormatter, OpenSSLKdf, PBKDF2, PBKDF2Algo, PasswordBasedCipher, Pkcs7, RC4, RC4Algo, RC4Drop, RC4DropAlgo, RIPEMD160, RIPEMD160Algo, Rabbit, RabbitAlgo, RabbitLegacy, RabbitLegacyAlgo, SHA1, SHA1Algo, SHA224, SHA224Algo, SHA256, SHA256Algo, SHA3, SHA384, SHA384Algo, SHA3Algo, SHA512, SHA512Algo, SerializableCipher, StreamCipher, TripleDES, TripleDESAlgo, Utf16, Utf16BE, Utf16LE, Utf8, WordArray, X64Word, X64WordArray, ZeroPadding }; \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/aes.mjs b/client/static/crypto-es@3.1.0/aes.mjs deleted file mode 100644 index 19e703e..0000000 --- a/client/static/crypto-es@3.1.0/aes.mjs +++ /dev/null @@ -1,134 +0,0 @@ -import { BlockCipher } from "./cipher-core.mjs"; - -//#region src/aes.ts -const _SBOX = []; -const INV_SBOX = []; -const _SUB_MIX_0 = []; -const _SUB_MIX_1 = []; -const _SUB_MIX_2 = []; -const _SUB_MIX_3 = []; -const INV_SUB_MIX_0 = []; -const INV_SUB_MIX_1 = []; -const INV_SUB_MIX_2 = []; -const INV_SUB_MIX_3 = []; -const RCON = [ - 0, - 1, - 2, - 4, - 8, - 16, - 32, - 64, - 128, - 27, - 54 -]; -/** -* AES block cipher algorithm. -*/ -var AESAlgo = class extends BlockCipher { - /** Number of rounds for this key size */ - _nRounds; - /** Previous key for optimization */ - _keyPriorReset; - /** Key schedule for encryption */ - _keySchedule; - /** Inverse key schedule for decryption */ - _invKeySchedule; - /** Key size in 32-bit words */ - static keySize = 256 / 32; - _doReset() { - let t; - if (this._nRounds && this._keyPriorReset === this._key) return; - this._keyPriorReset = this._key; - const key = this._keyPriorReset; - const keyWords = key.words; - const keySize = key.sigBytes / 4; - this._nRounds = keySize + 6; - const nRounds = this._nRounds; - const ksRows = (nRounds + 1) * 4; - this._keySchedule = []; - const keySchedule = this._keySchedule; - for (let ksRow = 0; ksRow < ksRows; ksRow += 1) if (ksRow < keySize) keySchedule[ksRow] = keyWords[ksRow]; - else { - t = keySchedule[ksRow - 1]; - if (!(ksRow % keySize)) { - t = t << 8 | t >>> 24; - t = _SBOX[t >>> 24] << 24 | _SBOX[t >>> 16 & 255] << 16 | _SBOX[t >>> 8 & 255] << 8 | _SBOX[t & 255]; - t ^= RCON[ksRow / keySize | 0] << 24; - } else if (keySize > 6 && ksRow % keySize === 4) t = _SBOX[t >>> 24] << 24 | _SBOX[t >>> 16 & 255] << 16 | _SBOX[t >>> 8 & 255] << 8 | _SBOX[t & 255]; - keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; - } - this._invKeySchedule = []; - const invKeySchedule = this._invKeySchedule; - for (let invKsRow = 0; invKsRow < ksRows; invKsRow += 1) { - const ksRow = ksRows - invKsRow; - if (invKsRow % 4) t = keySchedule[ksRow]; - else t = keySchedule[ksRow - 4]; - if (invKsRow < 4 || ksRow <= 4) invKeySchedule[invKsRow] = t; - else invKeySchedule[invKsRow] = INV_SUB_MIX_0[_SBOX[t >>> 24]] ^ INV_SUB_MIX_1[_SBOX[t >>> 16 & 255]] ^ INV_SUB_MIX_2[_SBOX[t >>> 8 & 255]] ^ INV_SUB_MIX_3[_SBOX[t & 255]]; - } - } - encryptBlock(M, offset) { - this._doCryptBlock(M, offset, this._keySchedule, _SUB_MIX_0, _SUB_MIX_1, _SUB_MIX_2, _SUB_MIX_3, _SBOX); - } - decryptBlock(M, offset) { - const _M = M; - let t = _M[offset + 1]; - _M[offset + 1] = _M[offset + 3]; - _M[offset + 3] = t; - this._doCryptBlock(_M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); - t = _M[offset + 1]; - _M[offset + 1] = _M[offset + 3]; - _M[offset + 3] = t; - } - _doCryptBlock(M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { - const _M = M; - const nRounds = this._nRounds; - let s0 = _M[offset] ^ keySchedule[0]; - let s1 = _M[offset + 1] ^ keySchedule[1]; - let s2 = _M[offset + 2] ^ keySchedule[2]; - let s3 = _M[offset + 3] ^ keySchedule[3]; - let ksRow = 4; - for (let round = 1; round < nRounds; round += 1) { - const t0$1 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[s1 >>> 16 & 255] ^ SUB_MIX_2[s2 >>> 8 & 255] ^ SUB_MIX_3[s3 & 255] ^ keySchedule[ksRow]; - ksRow += 1; - const t1$1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[s2 >>> 16 & 255] ^ SUB_MIX_2[s3 >>> 8 & 255] ^ SUB_MIX_3[s0 & 255] ^ keySchedule[ksRow]; - ksRow += 1; - const t2$1 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[s3 >>> 16 & 255] ^ SUB_MIX_2[s0 >>> 8 & 255] ^ SUB_MIX_3[s1 & 255] ^ keySchedule[ksRow]; - ksRow += 1; - const t3$1 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[s0 >>> 16 & 255] ^ SUB_MIX_2[s1 >>> 8 & 255] ^ SUB_MIX_3[s2 & 255] ^ keySchedule[ksRow]; - ksRow += 1; - s0 = t0$1; - s1 = t1$1; - s2 = t2$1; - s3 = t3$1; - } - const t0 = (SBOX[s0 >>> 24] << 24 | SBOX[s1 >>> 16 & 255] << 16 | SBOX[s2 >>> 8 & 255] << 8 | SBOX[s3 & 255]) ^ keySchedule[ksRow]; - ksRow += 1; - const t1 = (SBOX[s1 >>> 24] << 24 | SBOX[s2 >>> 16 & 255] << 16 | SBOX[s3 >>> 8 & 255] << 8 | SBOX[s0 & 255]) ^ keySchedule[ksRow]; - ksRow += 1; - const t2 = (SBOX[s2 >>> 24] << 24 | SBOX[s3 >>> 16 & 255] << 16 | SBOX[s0 >>> 8 & 255] << 8 | SBOX[s1 & 255]) ^ keySchedule[ksRow]; - ksRow += 1; - const t3 = (SBOX[s3 >>> 24] << 24 | SBOX[s0 >>> 16 & 255] << 16 | SBOX[s1 >>> 8 & 255] << 8 | SBOX[s2 & 255]) ^ keySchedule[ksRow]; - ksRow += 1; - _M[offset] = t0; - _M[offset + 1] = t1; - _M[offset + 2] = t2; - _M[offset + 3] = t3; - } -}; -/** -* Shortcut functions to the cipher's object interface. -* -* @example -* -* var ciphertext = AES.encrypt(message, key, cfg); -* var plaintext = AES.decrypt(ciphertext, key, cfg); -*/ -const AES = BlockCipher._createHelper(AESAlgo); - -//#endregion -export { AES, AESAlgo }; -//# sourceMappingURL=aes.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/blowfish.mjs b/client/static/crypto-es@3.1.0/blowfish.mjs deleted file mode 100644 index 86eea91..0000000 --- a/client/static/crypto-es@3.1.0/blowfish.mjs +++ /dev/null @@ -1,1200 +0,0 @@ -import { BlockCipher } from "./cipher-core.mjs"; - -//#region src/blowfish.ts -const N = 16; -const ORIG_P = [ - 608135816, - 2242054355, - 320440878, - 57701188, - 2752067618, - 698298832, - 137296536, - 3964562569, - 1160258022, - 953160567, - 3193202383, - 887688300, - 3232508343, - 3380367581, - 1065670069, - 3041331479, - 2450970073, - 2306472731 -]; -const ORIG_S = [ - [ - 3509652390, - 2564797868, - 805139163, - 3491422135, - 3101798381, - 1780907670, - 3128725573, - 4046225305, - 614570311, - 3012652279, - 134345442, - 2240740374, - 1667834072, - 1901547113, - 2757295779, - 4103290238, - 227898511, - 1921955416, - 1904987480, - 2182433518, - 2069144605, - 3260701109, - 2620446009, - 720527379, - 3318853667, - 677414384, - 3393288472, - 3101374703, - 2390351024, - 1614419982, - 1822297739, - 2954791486, - 3608508353, - 3174124327, - 2024746970, - 1432378464, - 3864339955, - 2857741204, - 1464375394, - 1676153920, - 1439316330, - 715854006, - 3033291828, - 289532110, - 2706671279, - 2087905683, - 3018724369, - 1668267050, - 732546397, - 1947742710, - 3462151702, - 2609353502, - 2950085171, - 1814351708, - 2050118529, - 680887927, - 999245976, - 1800124847, - 3300911131, - 1713906067, - 1641548236, - 4213287313, - 1216130144, - 1575780402, - 4018429277, - 3917837745, - 3693486850, - 3949271944, - 596196993, - 3549867205, - 258830323, - 2213823033, - 772490370, - 2760122372, - 1774776394, - 2652871518, - 566650946, - 4142492826, - 1728879713, - 2882767088, - 1783734482, - 3629395816, - 2517608232, - 2874225571, - 1861159788, - 326777828, - 3124490320, - 2130389656, - 2716951837, - 967770486, - 1724537150, - 2185432712, - 2364442137, - 1164943284, - 2105845187, - 998989502, - 3765401048, - 2244026483, - 1075463327, - 1455516326, - 1322494562, - 910128902, - 469688178, - 1117454909, - 936433444, - 3490320968, - 3675253459, - 1240580251, - 122909385, - 2157517691, - 634681816, - 4142456567, - 3825094682, - 3061402683, - 2540495037, - 79693498, - 3249098678, - 1084186820, - 1583128258, - 426386531, - 1761308591, - 1047286709, - 322548459, - 995290223, - 1845252383, - 2603652396, - 3431023940, - 2942221577, - 3202600964, - 3727903485, - 1712269319, - 422464435, - 3234572375, - 1170764815, - 3523960633, - 3117677531, - 1434042557, - 442511882, - 3600875718, - 1076654713, - 1738483198, - 4213154764, - 2393238008, - 3677496056, - 1014306527, - 4251020053, - 793779912, - 2902807211, - 842905082, - 4246964064, - 1395751752, - 1040244610, - 2656851899, - 3396308128, - 445077038, - 3742853595, - 3577915638, - 679411651, - 2892444358, - 2354009459, - 1767581616, - 3150600392, - 3791627101, - 3102740896, - 284835224, - 4246832056, - 1258075500, - 768725851, - 2589189241, - 3069724005, - 3532540348, - 1274779536, - 3789419226, - 2764799539, - 1660621633, - 3471099624, - 4011903706, - 913787905, - 3497959166, - 737222580, - 2514213453, - 2928710040, - 3937242737, - 1804850592, - 3499020752, - 2949064160, - 2386320175, - 2390070455, - 2415321851, - 4061277028, - 2290661394, - 2416832540, - 1336762016, - 1754252060, - 3520065937, - 3014181293, - 791618072, - 3188594551, - 3933548030, - 2332172193, - 3852520463, - 3043980520, - 413987798, - 3465142937, - 3030929376, - 4245938359, - 2093235073, - 3534596313, - 375366246, - 2157278981, - 2479649556, - 555357303, - 3870105701, - 2008414854, - 3344188149, - 4221384143, - 3956125452, - 2067696032, - 3594591187, - 2921233993, - 2428461, - 544322398, - 577241275, - 1471733935, - 610547355, - 4027169054, - 1432588573, - 1507829418, - 2025931657, - 3646575487, - 545086370, - 48609733, - 2200306550, - 1653985193, - 298326376, - 1316178497, - 3007786442, - 2064951626, - 458293330, - 2589141269, - 3591329599, - 3164325604, - 727753846, - 2179363840, - 146436021, - 1461446943, - 4069977195, - 705550613, - 3059967265, - 3887724982, - 4281599278, - 3313849956, - 1404054877, - 2845806497, - 146425753, - 1854211946 - ], - [ - 1266315497, - 3048417604, - 3681880366, - 3289982499, - 290971e4, - 1235738493, - 2632868024, - 2414719590, - 3970600049, - 1771706367, - 1449415276, - 3266420449, - 422970021, - 1963543593, - 2690192192, - 3826793022, - 1062508698, - 1531092325, - 1804592342, - 2583117782, - 2714934279, - 4024971509, - 1294809318, - 4028980673, - 1289560198, - 2221992742, - 1669523910, - 35572830, - 157838143, - 1052438473, - 1016535060, - 1802137761, - 1753167236, - 1386275462, - 3080475397, - 2857371447, - 1040679964, - 2145300060, - 2390574316, - 1461121720, - 2956646967, - 4031777805, - 4028374788, - 33600511, - 2920084762, - 1018524850, - 629373528, - 3691585981, - 3515945977, - 2091462646, - 2486323059, - 586499841, - 988145025, - 935516892, - 3367335476, - 2599673255, - 2839830854, - 265290510, - 3972581182, - 2759138881, - 3795373465, - 1005194799, - 847297441, - 406762289, - 1314163512, - 1332590856, - 1866599683, - 4127851711, - 750260880, - 613907577, - 1450815602, - 3165620655, - 3734664991, - 3650291728, - 3012275730, - 3704569646, - 1427272223, - 778793252, - 1343938022, - 2676280711, - 2052605720, - 1946737175, - 3164576444, - 3914038668, - 3967478842, - 3682934266, - 1661551462, - 3294938066, - 4011595847, - 840292616, - 3712170807, - 616741398, - 312560963, - 711312465, - 1351876610, - 322626781, - 1910503582, - 271666773, - 2175563734, - 1594956187, - 70604529, - 3617834859, - 1007753275, - 1495573769, - 4069517037, - 2549218298, - 2663038764, - 504708206, - 2263041392, - 3941167025, - 2249088522, - 1514023603, - 1998579484, - 1312622330, - 694541497, - 2582060303, - 2151582166, - 1382467621, - 776784248, - 2618340202, - 3323268794, - 2497899128, - 2784771155, - 503983604, - 4076293799, - 907881277, - 423175695, - 432175456, - 1378068232, - 4145222326, - 3954048622, - 3938656102, - 3820766613, - 2793130115, - 2977904593, - 26017576, - 3274890735, - 3194772133, - 1700274565, - 1756076034, - 4006520079, - 3677328699, - 720338349, - 1533947780, - 354530856, - 688349552, - 3973924725, - 1637815568, - 332179504, - 3949051286, - 53804574, - 2852348879, - 3044236432, - 1282449977, - 3583942155, - 3416972820, - 4006381244, - 1617046695, - 2628476075, - 3002303598, - 1686838959, - 431878346, - 2686675385, - 1700445008, - 1080580658, - 1009431731, - 832498133, - 3223435511, - 2605976345, - 2271191193, - 2516031870, - 1648197032, - 4164389018, - 2548247927, - 300782431, - 375919233, - 238389289, - 3353747414, - 2531188641, - 2019080857, - 1475708069, - 455242339, - 2609103871, - 448939670, - 3451063019, - 1395535956, - 2413381860, - 1841049896, - 1491858159, - 885456874, - 4264095073, - 4001119347, - 1565136089, - 3898914787, - 1108368660, - 540939232, - 1173283510, - 2745871338, - 3681308437, - 4207628240, - 3343053890, - 4016749493, - 1699691293, - 1103962373, - 3625875870, - 2256883143, - 3830138730, - 1031889488, - 3479347698, - 1535977030, - 4236805024, - 3251091107, - 2132092099, - 1774941330, - 1199868427, - 1452454533, - 157007616, - 2904115357, - 342012276, - 595725824, - 1480756522, - 206960106, - 497939518, - 591360097, - 863170706, - 2375253569, - 3596610801, - 1814182875, - 2094937945, - 3421402208, - 1082520231, - 3463918190, - 2785509508, - 435703966, - 3908032597, - 1641649973, - 2842273706, - 3305899714, - 1510255612, - 2148256476, - 2655287854, - 3276092548, - 4258621189, - 236887753, - 3681803219, - 274041037, - 1734335097, - 3815195456, - 3317970021, - 1899903192, - 1026095262, - 4050517792, - 356393447, - 2410691914, - 3873677099, - 3682840055 - ], - [ - 3913112168, - 2491498743, - 4132185628, - 2489919796, - 1091903735, - 1979897079, - 3170134830, - 3567386728, - 3557303409, - 857797738, - 1136121015, - 1342202287, - 507115054, - 2535736646, - 337727348, - 3213592640, - 1301675037, - 2528481711, - 1895095763, - 1721773893, - 3216771564, - 62756741, - 2142006736, - 835421444, - 2531993523, - 1442658625, - 3659876326, - 2882144922, - 676362277, - 1392781812, - 170690266, - 3921047035, - 1759253602, - 3611846912, - 1745797284, - 664899054, - 1329594018, - 3901205900, - 3045908486, - 2062866102, - 2865634940, - 3543621612, - 3464012697, - 1080764994, - 553557557, - 3656615353, - 3996768171, - 991055499, - 499776247, - 1265440854, - 648242737, - 3940784050, - 980351604, - 3713745714, - 1749149687, - 3396870395, - 4211799374, - 3640570775, - 1161844396, - 3125318951, - 1431517754, - 545492359, - 4268468663, - 3499529547, - 1437099964, - 2702547544, - 3433638243, - 2581715763, - 2787789398, - 1060185593, - 1593081372, - 2418618748, - 4260947970, - 69676912, - 2159744348, - 86519011, - 2512459080, - 3838209314, - 1220612927, - 3339683548, - 133810670, - 1090789135, - 1078426020, - 1569222167, - 845107691, - 3583754449, - 4072456591, - 1091646820, - 628848692, - 1613405280, - 3757631651, - 526609435, - 236106946, - 48312990, - 2942717905, - 3402727701, - 1797494240, - 859738849, - 992217954, - 4005476642, - 2243076622, - 3870952857, - 3732016268, - 765654824, - 3490871365, - 2511836413, - 1685915746, - 3888969200, - 1414112111, - 2273134842, - 3281911079, - 4080962846, - 172450625, - 2569994100, - 980381355, - 4109958455, - 2819808352, - 2716589560, - 2568741196, - 3681446669, - 3329971472, - 1835478071, - 660984891, - 3704678404, - 4045999559, - 3422617507, - 3040415634, - 1762651403, - 1719377915, - 3470491036, - 2693910283, - 3642056355, - 3138596744, - 1364962596, - 2073328063, - 1983633131, - 926494387, - 3423689081, - 2150032023, - 4096667949, - 1749200295, - 3328846651, - 309677260, - 2016342300, - 1779581495, - 3079819751, - 111262694, - 1274766160, - 443224088, - 298511866, - 1025883608, - 3806446537, - 1145181785, - 168956806, - 3641502830, - 3584813610, - 1689216846, - 3666258015, - 3200248200, - 1692713982, - 2646376535, - 4042768518, - 1618508792, - 1610833997, - 3523052358, - 4130873264, - 2001055236, - 3610705100, - 2202168115, - 4028541809, - 2961195399, - 1006657119, - 2006996926, - 3186142756, - 1430667929, - 3210227297, - 1314452623, - 4074634658, - 4101304120, - 2273951170, - 1399257539, - 3367210612, - 3027628629, - 1190975929, - 2062231137, - 2333990788, - 2221543033, - 2438960610, - 1181637006, - 548689776, - 2362791313, - 3372408396, - 3104550113, - 3145860560, - 296247880, - 1970579870, - 3078560182, - 3769228297, - 1714227617, - 3291629107, - 3898220290, - 166772364, - 1251581989, - 493813264, - 448347421, - 195405023, - 2709975567, - 677966185, - 3703036547, - 1463355134, - 2715995803, - 1338867538, - 1343315457, - 2802222074, - 2684532164, - 233230375, - 2599980071, - 2000651841, - 3277868038, - 1638401717, - 4028070440, - 3237316320, - 6314154, - 819756386, - 300326615, - 590932579, - 1405279636, - 3267499572, - 3150704214, - 2428286686, - 3959192993, - 3461946742, - 1862657033, - 1266418056, - 963775037, - 2089974820, - 2263052895, - 1917689273, - 448879540, - 3550394620, - 3981727096, - 150775221, - 3627908307, - 1303187396, - 508620638, - 2975983352, - 2726630617, - 1817252668, - 1876281319, - 1457606340, - 908771278, - 3720792119, - 3617206836, - 2455994898, - 1729034894, - 1080033504 - ], - [ - 976866871, - 3556439503, - 2881648439, - 1522871579, - 1555064734, - 1336096578, - 3548522304, - 2579274686, - 3574697629, - 3205460757, - 3593280638, - 3338716283, - 3079412587, - 564236357, - 2993598910, - 1781952180, - 1464380207, - 3163844217, - 3332601554, - 1699332808, - 1393555694, - 1183702653, - 3581086237, - 1288719814, - 691649499, - 2847557200, - 2895455976, - 3193889540, - 2717570544, - 1781354906, - 1676643554, - 2592534050, - 3230253752, - 1126444790, - 2770207658, - 2633158820, - 2210423226, - 2615765581, - 2414155088, - 3127139286, - 673620729, - 2805611233, - 1269405062, - 4015350505, - 3341807571, - 4149409754, - 1057255273, - 2012875353, - 2162469141, - 2276492801, - 2601117357, - 993977747, - 3918593370, - 2654263191, - 753973209, - 36408145, - 2530585658, - 25011837, - 3520020182, - 2088578344, - 530523599, - 2918365339, - 1524020338, - 1518925132, - 3760827505, - 3759777254, - 1202760957, - 3985898139, - 3906192525, - 674977740, - 4174734889, - 2031300136, - 2019492241, - 3983892565, - 4153806404, - 3822280332, - 352677332, - 2297720250, - 60907813, - 90501309, - 3286998549, - 1016092578, - 2535922412, - 2839152426, - 457141659, - 509813237, - 4120667899, - 652014361, - 1966332200, - 2975202805, - 55981186, - 2327461051, - 676427537, - 3255491064, - 2882294119, - 3433927263, - 1307055953, - 942726286, - 933058658, - 2468411793, - 3933900994, - 4215176142, - 1361170020, - 2001714738, - 2830558078, - 3274259782, - 1222529897, - 1679025792, - 2729314320, - 3714953764, - 1770335741, - 151462246, - 3013232138, - 1682292957, - 1483529935, - 471910574, - 1539241949, - 458788160, - 3436315007, - 1807016891, - 3718408830, - 978976581, - 1043663428, - 3165965781, - 1927990952, - 4200891579, - 2372276910, - 3208408903, - 3533431907, - 1412390302, - 2931980059, - 4132332400, - 1947078029, - 3881505623, - 4168226417, - 2941484381, - 1077988104, - 1320477388, - 886195818, - 18198404, - 3786409e3, - 2509781533, - 112762804, - 3463356488, - 1866414978, - 891333506, - 18488651, - 661792760, - 1628790961, - 3885187036, - 3141171499, - 876946877, - 2693282273, - 1372485963, - 791857591, - 2686433993, - 3759982718, - 3167212022, - 3472953795, - 2716379847, - 445679433, - 3561995674, - 3504004811, - 3574258232, - 54117162, - 3331405415, - 2381918588, - 3769707343, - 4154350007, - 1140177722, - 4074052095, - 668550556, - 3214352940, - 367459370, - 261225585, - 2610173221, - 4209349473, - 3468074219, - 3265815641, - 314222801, - 3066103646, - 3808782860, - 282218597, - 3406013506, - 3773591054, - 379116347, - 1285071038, - 846784868, - 2669647154, - 3771962079, - 3550491691, - 2305946142, - 453669953, - 1268987020, - 3317592352, - 3279303384, - 3744833421, - 2610507566, - 3859509063, - 266596637, - 3847019092, - 517658769, - 3462560207, - 3443424879, - 370717030, - 4247526661, - 2224018117, - 4143653529, - 4112773975, - 2788324899, - 2477274417, - 1456262402, - 2901442914, - 1517677493, - 1846949527, - 2295493580, - 3734397586, - 2176403920, - 1280348187, - 1908823572, - 3871786941, - 846861322, - 1172426758, - 3287448474, - 3383383037, - 1655181056, - 3139813346, - 901632758, - 1897031941, - 2986607138, - 3066810236, - 3447102507, - 1393639104, - 373351379, - 950779232, - 625454576, - 3124240540, - 4148612726, - 2007998917, - 544563296, - 2244738638, - 2330496472, - 2058025392, - 1291430526, - 424198748, - 50039436, - 29584100, - 3605783033, - 2429876329, - 2791104160, - 1057563949, - 3255363231, - 3075367218, - 3463963227, - 1469046755, - 985887462 - ] -]; -const blowfishCtx = { - pbox: [], - sbox: [] -}; -function f(ctx, x) { - const a = x >> 24 & 255; - const b = x >> 16 & 255; - const c = x >> 8 & 255; - const d = x & 255; - let y = ctx.sbox[0][a] + ctx.sbox[1][b]; - y = y ^ ctx.sbox[2][c]; - y = y + ctx.sbox[3][d]; - return y; -} -function blowfishEncrypt(ctx, left, right) { - let Xl = left; - let Xr = right; - let temp; - for (let i = 0; i < N; ++i) { - Xl = Xl ^ ctx.pbox[i]; - Xr = f(ctx, Xl) ^ Xr; - temp = Xl; - Xl = Xr; - Xr = temp; - } - temp = Xl; - Xl = Xr; - Xr = temp; - Xr = Xr ^ ctx.pbox[N]; - Xl = Xl ^ ctx.pbox[N + 1]; - return { - left: Xl, - right: Xr - }; -} -function blowfishDecrypt(ctx, left, right) { - let Xl = left; - let Xr = right; - let temp; - for (let i = N + 1; i > 1; --i) { - Xl = Xl ^ ctx.pbox[i]; - Xr = f(ctx, Xl) ^ Xr; - temp = Xl; - Xl = Xr; - Xr = temp; - } - temp = Xl; - Xl = Xr; - Xr = temp; - Xr = Xr ^ ctx.pbox[1]; - Xl = Xl ^ ctx.pbox[0]; - return { - left: Xl, - right: Xr - }; -} -/** -* Initialization ctx's pbox and sbox. -* -* @param {Object} ctx The object has pbox and sbox. -* @param {Array} key An array of 32-bit words. -* @param {int} keysize The length of the key. -* -* @example -* -* blowfishInit(BLOWFISH_CTX, key, 128/32); -*/ -function blowfishInit(ctx, key, keysize) { - for (let Row = 0; Row < 4; Row++) { - ctx.sbox[Row] = []; - for (let Col = 0; Col < 256; Col++) ctx.sbox[Row][Col] = ORIG_S[Row][Col]; - } - let keyIndex = 0; - for (let index = 0; index < N + 2; index++) { - ctx.pbox[index] = ORIG_P[index] ^ key[keyIndex]; - keyIndex++; - if (keyIndex >= keysize) keyIndex = 0; - } - let data1 = 0; - let data2 = 0; - let res = { - left: 0, - right: 0 - }; - for (let i = 0; i < N + 2; i += 2) { - res = blowfishEncrypt(ctx, data1, data2); - data1 = res.left; - data2 = res.right; - ctx.pbox[i] = data1; - ctx.pbox[i + 1] = data2; - } - for (let i = 0; i < 4; i++) for (let j = 0; j < 256; j += 2) { - res = blowfishEncrypt(ctx, data1, data2); - data1 = res.left; - data2 = res.right; - ctx.sbox[i][j] = data1; - ctx.sbox[i][j + 1] = data2; - } - return true; -} -/** -* Blowfish block cipher algorithm. -*/ -var BlowfishAlgo = class extends BlockCipher { - static keySize = 128 / 32; - static ivSize = 64 / 32; - _keyPriorReset; - constructor(xformMode, key, cfg) { - super(xformMode, key, cfg); - this.blockSize = 64 / 32; - } - _doReset() { - if (this._keyPriorReset === this._key) return; - const key = this._keyPriorReset = this._key; - const keyWords = key.words; - const keySize = key.sigBytes / 4; - blowfishInit(blowfishCtx, keyWords, keySize); - } - encryptBlock(M, offset) { - const res = blowfishEncrypt(blowfishCtx, M[offset], M[offset + 1]); - M[offset] = res.left; - M[offset + 1] = res.right; - } - decryptBlock(M, offset) { - const res = blowfishDecrypt(blowfishCtx, M[offset], M[offset + 1]); - M[offset] = res.left; - M[offset + 1] = res.right; - } -}; -/** -* Shortcut functions to the cipher's object interface. -* -* @example -* -* var ciphertext = Blowfish.encrypt(message, key, cfg); -* var plaintext = Blowfish.decrypt(ciphertext, key, cfg); -*/ -const Blowfish = BlockCipher._createHelper(BlowfishAlgo); - -//#endregion -export { Blowfish, BlowfishAlgo }; -//# sourceMappingURL=blowfish.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/cipher-core.mjs b/client/static/crypto-es@3.1.0/cipher-core.mjs deleted file mode 100644 index 8800812..0000000 --- a/client/static/crypto-es@3.1.0/cipher-core.mjs +++ /dev/null @@ -1,636 +0,0 @@ -import { Base, BufferedBlockAlgorithm, Hex, WordArray } from "./core.mjs"; -import { Base64 } from "./enc-base64.mjs"; -import { EvpKDFAlgo } from "./evpkdf.mjs"; - -//#region src/cipher-core.ts -/** -* Abstract base cipher template. -* Provides the foundation for all encryption and decryption algorithms. -* -* @property keySize - This cipher's key size in words (default: 4 = 128 bits) -* @property ivSize - This cipher's IV size in words (default: 4 = 128 bits) -* @property _ENC_XFORM_MODE - A constant representing encryption mode -* @property _DEC_XFORM_MODE - A constant representing decryption mode -*/ -var Cipher = class Cipher extends BufferedBlockAlgorithm { - /** Encryption mode constant */ - static _ENC_XFORM_MODE = 1; - /** Decryption mode constant */ - static _DEC_XFORM_MODE = 2; - /** Default key size in words (128 bits) */ - static keySize = 128 / 32; - /** Default IV size in words (128 bits) */ - static ivSize = 128 / 32; - /** Configuration options */ - cfg; - /** Transform mode (encryption or decryption) */ - _xformMode; - /** The key */ - _key; - /** Block size in words */ - blockSize = 128 / 32; - /** - * Initializes a newly created cipher. - * - * @param xformMode - Either the encryption or decryption transformation mode constant - * @param key - The key - * @param cfg - Configuration options to use for this operation - * @example - * ```javascript - * const cipher = new AESAlgo( - * Cipher._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray } - * ); - * ``` - */ - constructor(xformMode, key, cfg) { - super(); - this.cfg = Object.assign({}, cfg); - this._xformMode = xformMode; - this._key = key; - } - /** - * Creates this cipher in encryption mode. - * - * @param key - The key - * @param cfg - Configuration options to use for this operation - * @returns A cipher instance - * @static - * @example - * ```javascript - * const cipher = AESAlgo.createEncryptor(keyWordArray, { iv: ivWordArray }); - * ``` - */ - static createEncryptor(key, cfg) { - return this.create(Cipher._ENC_XFORM_MODE, key, cfg); - } - /** - * Creates this cipher in decryption mode. - * - * @param key - The key - * @param cfg - Configuration options to use for this operation - * @returns A cipher instance - * @static - * @example - * ```javascript - * const cipher = AESAlgo.createDecryptor(keyWordArray, { iv: ivWordArray }); - * ``` - */ - static createDecryptor(key, cfg) { - return this.create(Cipher._DEC_XFORM_MODE, key, cfg); - } - static create(...args) { - if (args.length >= 2 && typeof args[0] === "number") { - const [xformMode, key, cfg] = args; - const instance = new this(xformMode, key, cfg); - instance.reset(); - return instance; - } else return new this(...args); - } - /** - * Creates shortcut functions to a cipher's object interface. - * - * @param SubCipher - The cipher to create a helper for - * @returns An object with encrypt and decrypt shortcut functions - * @static - * @example - * ```javascript - * const AES = Cipher._createHelper(AESAlgo); - * ``` - */ - static _createHelper(SubCipher) { - const selectCipherStrategy = (key) => { - if (typeof key === "string") return PasswordBasedCipher; - return SerializableCipher; - }; - return { - encrypt(message, key, cfg) { - return selectCipherStrategy(key).encrypt(SubCipher, message, key, cfg); - }, - decrypt(ciphertext, key, cfg) { - return selectCipherStrategy(key).decrypt(SubCipher, ciphertext, key, cfg); - } - }; - } - /** - * Resets this cipher to its initial state. - * - * @example - * ```javascript - * cipher.reset(); - * ``` - */ - reset() { - super.reset(); - this._doReset(); - } - /** - * Adds data to be encrypted or decrypted. - * - * @param dataUpdate - The data to encrypt or decrypt - * @returns The data after processing - * @example - * ```javascript - * const encrypted = cipher.process('data'); - * const encrypted = cipher.process(wordArray); - * ``` - */ - process(dataUpdate) { - this._append(dataUpdate); - return this._process(); - } - /** - * Finalizes the encryption or decryption process. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param dataUpdate - The final data to encrypt or decrypt - * @returns The data after final processing - * @example - * ```javascript - * const encrypted = cipher.finalize(); - * const encrypted = cipher.finalize('data'); - * const encrypted = cipher.finalize(wordArray); - * ``` - */ - finalize(dataUpdate) { - if (dataUpdate) this._append(dataUpdate); - const finalProcessedData = this._doFinalize(); - return finalProcessedData; - } -}; -/** -* Abstract base stream cipher template. -* Stream ciphers process data one unit at a time rather than in blocks. -* -* @property blockSize - The number of 32-bit words this cipher operates on (default: 1 = 32 bits) -*/ -var StreamCipher = class extends Cipher { - blockSize = 1; - constructor(xformMode, key, cfg) { - super(xformMode, key, cfg); - this.blockSize = 1; - } - _doFinalize() { - const finalProcessedBlocks = this._process(true); - return finalProcessedBlocks; - } -}; -/** -* Abstract base block cipher mode template. -* Defines how multiple blocks are processed together. -*/ -var BlockCipherMode = class extends Base { - /** The cipher instance */ - _cipher; - /** The initialization vector */ - _iv; - /** The previous block (for chaining modes) */ - _prevBlock; - /** - * Initializes a newly created mode. - * - * @param cipher - A block cipher instance - * @param iv - The IV words - * @example - * ```javascript - * const mode = new CBCMode(cipher, iv.words); - * ``` - */ - constructor(cipher, iv) { - super(); - this._cipher = cipher; - this._iv = iv; - } - /** - * Creates this mode for encryption. - * - * @param cipher - A block cipher instance - * @param iv - The IV words - * @returns The mode instance - * @static - * @example - * ```javascript - * const mode = CBC.createEncryptor(cipher, iv.words); - * ``` - */ - static createEncryptor(cipher, iv) { - return this.Encryptor.create(cipher, iv); - } - /** - * Creates this mode for decryption. - * - * @param cipher - A block cipher instance - * @param iv - The IV words - * @returns The mode instance - * @static - * @example - * ```javascript - * const mode = CBC.createDecryptor(cipher, iv.words); - * ``` - */ - static createDecryptor(cipher, iv) { - return this.Decryptor.create(cipher, iv); - } - /** - * Process a block of data - * Must be implemented by concrete modes - */ - processBlock(_words, _offset) {} -}; -/** -* XOR blocks for cipher block chaining -* @private -*/ -function xorBlock(words, offset, blockSize) { - const _words = words; - let block; - const iv = this._iv; - if (iv) { - block = iv; - this._iv = void 0; - } else block = this._prevBlock; - if (block) for (let i = 0; i < blockSize; i += 1) _words[offset + i] ^= block[i]; -} -/** -* CBC Encryptor -*/ -var CBCEncryptor = class extends BlockCipherMode { - /** - * Processes the data block at offset. - * - * @param words - The data words to operate on - * @param offset - The offset where the block starts - * @example - * ```javascript - * mode.processBlock(data.words, offset); - * ``` - */ - processBlock(words, offset) { - const cipher = this._cipher; - const blockSize = cipher.blockSize; - xorBlock.call(this, words, offset, blockSize); - cipher.encryptBlock(words, offset); - this._prevBlock = words.slice(offset, offset + blockSize); - } -}; -/** -* CBC Decryptor -*/ -var CBCDecryptor = class extends BlockCipherMode { - /** - * Processes the data block at offset. - * - * @param words - The data words to operate on - * @param offset - The offset where the block starts - * @example - * ```javascript - * mode.processBlock(data.words, offset); - * ``` - */ - processBlock(words, offset) { - const cipher = this._cipher; - const blockSize = cipher.blockSize; - const thisBlock = words.slice(offset, offset + blockSize); - cipher.decryptBlock(words, offset); - xorBlock.call(this, words, offset, blockSize); - this._prevBlock = thisBlock; - } -}; -/** -* Cipher Block Chaining mode. -* Each block is XORed with the previous ciphertext block before encryption. -*/ -var CBC = class extends BlockCipherMode { - /** CBC Encryptor */ - static Encryptor = CBCEncryptor; - /** CBC Decryptor */ - static Decryptor = CBCDecryptor; -}; -/** -* PKCS #5/7 padding strategy. -* Pads data with bytes all of the same value as the count of padding bytes. -*/ -const Pkcs7 = { - pad(data, blockSize) { - const blockSizeBytes = blockSize * 4; - const nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; - const paddingWord = nPaddingBytes << 24 | nPaddingBytes << 16 | nPaddingBytes << 8 | nPaddingBytes; - const paddingWords = []; - for (let i = 0; i < nPaddingBytes; i += 4) paddingWords.push(paddingWord); - const padding = WordArray.create(paddingWords, nPaddingBytes); - data.concat(padding); - }, - unpad(data) { - const nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255; - data.sigBytes -= nPaddingBytes; - } -}; -/** -* Abstract base block cipher template. -* Block ciphers process data in fixed-size blocks. -* -* @property blockSize - The number of 32-bit words this cipher operates on (default: 4 = 128 bits) -*/ -var BlockCipher = class extends Cipher { - /** Block mode instance */ - _mode; - /** - * Initializes a newly created block cipher. - * - * @param xformMode - Transform mode - * @param key - The key - * @param cfg - Configuration options - */ - constructor(xformMode, key, cfg) { - super(xformMode, key, Object.assign({ - mode: CBC, - padding: Pkcs7 - }, cfg)); - this.blockSize = 128 / 32; - } - reset() { - super.reset(); - const { cfg } = this; - const { iv, mode } = cfg; - let modeCreator; - if (this._xformMode === this.constructor._ENC_XFORM_MODE) modeCreator = mode?.createEncryptor; - else { - modeCreator = mode?.createDecryptor; - this._minBufferSize = 1; - } - if (modeCreator && mode) { - this._mode = modeCreator.call(mode, this, iv?.words); - this._mode.__creator = modeCreator; - } - } - _doProcessBlock(words, offset) { - this._mode?.processBlock(words, offset); - } - _doFinalize() { - let finalProcessedBlocks; - const { padding } = this.cfg; - if (this._xformMode === this.constructor._ENC_XFORM_MODE) { - if (padding) padding.pad(this._data, this.blockSize); - finalProcessedBlocks = this._process(true); - } else { - finalProcessedBlocks = this._process(true); - if (padding) padding.unpad(finalProcessedBlocks); - } - return finalProcessedBlocks; - } -}; -/** -* A collection of cipher parameters. -* Encapsulates all the parameters used in a cipher operation. -* -* @property ciphertext - The raw ciphertext -* @property key - The key to this ciphertext -* @property iv - The IV used in the ciphering operation -* @property salt - The salt used with a key derivation function -* @property algorithm - The cipher algorithm -* @property mode - The block mode used in the ciphering operation -* @property padding - The padding scheme used in the ciphering operation -* @property blockSize - The block size of the cipher -* @property formatter - The default formatting strategy -*/ -var CipherParams = class CipherParams extends Base { - ciphertext; - key; - iv; - salt; - algorithm; - mode; - padding; - blockSize; - formatter; - /** - * Initializes a newly created cipher params object. - * - * @param cipherParams - An object with any of the possible cipher parameters - * @example - * ```javascript - * const cipherParams = new CipherParams({ - * ciphertext: ciphertextWordArray, - * key: keyWordArray, - * iv: ivWordArray, - * salt: saltWordArray, - * algorithm: AESAlgo, - * mode: CBC, - * padding: Pkcs7, - * blockSize: 4, - * formatter: OpenSSLFormatter - * }); - * ``` - */ - constructor(cipherParams) { - super(); - if (cipherParams) this.mixIn(cipherParams); - if (!this.formatter) this.formatter = OpenSSLFormatter; - } - static create(...args) { - const [cipherParams] = args; - return new CipherParams(cipherParams); - } - /** - * Converts this cipher params object to a string. - * - * @param formatter - The formatting strategy to use - * @returns The stringified cipher params - * @throws Error if neither the formatter nor the default formatter is set - * @example - * ```javascript - * const string = cipherParams.toString(); - * const string = cipherParams.toString(OpenSSLFormatter); - * ``` - */ - toString(formatter) { - const fmt = formatter || this.formatter; - if (!fmt) throw new Error("cipher params formatter required"); - return fmt.stringify(this); - } -}; -/** -* OpenSSL formatting strategy. -* Formats cipher params in OpenSSL-compatible format. -*/ -const OpenSSLFormatter = { - stringify(cipherParams) { - let wordArray; - const { ciphertext, salt } = cipherParams; - if (salt && ciphertext) wordArray = WordArray.create([1398893684, 1701076831]).concat(salt).concat(ciphertext); - else if (ciphertext) wordArray = ciphertext; - else wordArray = new WordArray(); - return wordArray.toString(Base64); - }, - parse(openSSLStr) { - let salt; - const ciphertext = Base64.parse(openSSLStr); - const ciphertextWords = ciphertext.words; - if (ciphertextWords[0] === 1398893684 && ciphertextWords[1] === 1701076831) { - salt = WordArray.create(ciphertextWords.slice(2, 4)); - ciphertextWords.splice(0, 4); - ciphertext.sigBytes -= 16; - } - return CipherParams.create({ - ciphertext, - salt - }); - } -}; -/** -* A cipher wrapper that returns ciphertext as a serializable cipher params object. -* Handles the serialization and deserialization of cipher operations. -*/ -var SerializableCipher = class extends Base { - /** Configuration options */ - static cfg = { format: OpenSSLFormatter }; - /** - * Encrypts a message. - * - * @param cipher - The cipher algorithm to use - * @param message - The message to encrypt - * @param key - The key - * @param cfg - Configuration options to use for this operation - * @returns A cipher params object - * @static - * @example - * ```javascript - * const ciphertextParams = SerializableCipher.encrypt(AESAlgo, message, key); - * const ciphertextParams = SerializableCipher.encrypt(AESAlgo, message, key, { iv: iv }); - * ``` - */ - static encrypt(cipher, message, key, cfg) { - const _cfg = Object.assign({}, this.cfg, cfg); - const encryptor = cipher.createEncryptor(key, _cfg); - const ciphertext = encryptor.finalize(message); - const cipherCfg = encryptor.cfg; - return CipherParams.create({ - ciphertext, - key, - iv: cipherCfg.iv, - algorithm: cipher, - mode: cipherCfg.mode, - padding: cipherCfg.padding, - blockSize: encryptor.blockSize, - formatter: _cfg.format || OpenSSLFormatter - }); - } - /** - * Decrypts serialized ciphertext. - * - * @param cipher - The cipher algorithm to use - * @param ciphertext - The ciphertext to decrypt - * @param key - The key - * @param cfg - Configuration options to use for this operation - * @returns The plaintext - * @static - * @example - * ```javascript - * const plaintext = SerializableCipher.decrypt(AESAlgo, formattedCiphertext, key, { iv: iv }); - * const plaintext = SerializableCipher.decrypt(AESAlgo, ciphertextParams, key, { iv: iv }); - * ``` - */ - static decrypt(cipher, ciphertext, key, cfg) { - const _cfg = Object.assign({}, this.cfg, cfg); - const _ciphertext = this._parse(ciphertext, _cfg.format); - const plaintext = cipher.createDecryptor(key, _cfg).finalize(_ciphertext.ciphertext); - return plaintext; - } - /** - * Converts serialized ciphertext to CipherParams. - * - * @param ciphertext - The ciphertext - * @param format - The formatting strategy to use to parse serialized ciphertext - * @returns The unserialized ciphertext - * @static - * @private - */ - static _parse(ciphertext, format) { - if (typeof ciphertext === "string") { - if (!format) throw new Error("Format required to parse string"); - return format.parse(ciphertext, this); - } - if (ciphertext instanceof CipherParams) return ciphertext; - return new CipherParams(ciphertext); - } -}; -/** -* OpenSSL key derivation function. -* Derives a key and IV from a password using the OpenSSL method. -*/ -const OpenSSLKdf = { execute(password, keySize, ivSize, salt, hasher) { - let _salt; - if (!salt) _salt = WordArray.random(64 / 8); - else if (typeof salt === "string") _salt = Hex.parse(salt); - else _salt = salt; - let key; - if (!hasher) key = EvpKDFAlgo.create({ keySize: keySize + ivSize }).compute(password, _salt); - else key = EvpKDFAlgo.create({ - keySize: keySize + ivSize, - hasher - }).compute(password, _salt); - const iv = WordArray.create(key.words.slice(keySize), ivSize * 4); - key.sigBytes = keySize * 4; - return CipherParams.create({ - key, - iv, - salt: _salt - }); -} }; -/** -* A serializable cipher wrapper that derives the key from a password. -* Returns ciphertext as a serializable cipher params object. -*/ -var PasswordBasedCipher = class extends SerializableCipher { - /** Configuration options */ - static cfg = Object.assign({}, SerializableCipher.cfg, { kdf: OpenSSLKdf }); - /** - * Encrypts a message using a password. - * - * @param cipher - The cipher algorithm to use - * @param message - The message to encrypt - * @param password - The password - * @param cfg - Configuration options to use for this operation - * @returns A cipher params object - * @static - * @example - * ```javascript - * const ciphertextParams = PasswordBasedCipher.encrypt(AESAlgo, message, 'password'); - * ``` - */ - static encrypt(cipher, message, password, cfg) { - const _cfg = Object.assign({}, this.cfg, cfg); - if (!_cfg.kdf) throw new Error("KDF required for password-based encryption"); - const derivedParams = _cfg.kdf.execute(password, cipher.keySize || cipher.keySize, cipher.ivSize || cipher.ivSize, _cfg.salt, _cfg.hasher); - _cfg.iv = derivedParams.iv; - const ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, _cfg); - ciphertext.salt = derivedParams.salt; - return ciphertext; - } - /** - * Decrypts serialized ciphertext using a password. - * - * @param cipher - The cipher algorithm to use - * @param ciphertext - The ciphertext to decrypt - * @param password - The password - * @param cfg - Configuration options to use for this operation - * @returns The plaintext - * @static - * @example - * ```javascript - * const plaintext = PasswordBasedCipher.decrypt(AESAlgo, formattedCiphertext, 'password'); - * ``` - */ - static decrypt(cipher, ciphertext, password, cfg) { - const _cfg = Object.assign({}, this.cfg, cfg); - const _ciphertext = this._parse(ciphertext, _cfg.format); - if (!_cfg.kdf) throw new Error("KDF required for password-based decryption"); - const derivedParams = _cfg.kdf.execute(password, cipher.keySize || cipher.keySize, cipher.ivSize || cipher.ivSize, _ciphertext.salt, _cfg.hasher); - _cfg.iv = derivedParams.iv; - const plaintext = SerializableCipher.decrypt.call(this, cipher, _ciphertext, derivedParams.key, _cfg); - return plaintext; - } -}; - -//#endregion -export { BlockCipher, BlockCipherMode, CBC, Cipher, CipherParams, OpenSSLFormatter, OpenSSLKdf, PasswordBasedCipher, Pkcs7, SerializableCipher, StreamCipher }; -//# sourceMappingURL=cipher-core.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/core.mjs b/client/static/crypto-es@3.1.0/core.mjs deleted file mode 100644 index 3ce1158..0000000 --- a/client/static/crypto-es@3.1.0/core.mjs +++ /dev/null @@ -1,584 +0,0 @@ -//#region src/core.ts -const crypto = (typeof globalThis !== "undefined" ? globalThis : void 0)?.crypto || (typeof global !== "undefined" ? global : void 0)?.crypto || (typeof window !== "undefined" ? window : void 0)?.crypto || (typeof self !== "undefined" ? self : void 0)?.crypto || (typeof frames !== "undefined" ? frames : void 0)?.[0]?.crypto; -/** -* Random word array generator function -*/ -let randomWordArray; -if (crypto) randomWordArray = (nBytes) => { - const words = []; - for (let i = 0; i < nBytes; i += 4) words.push(crypto.getRandomValues(new Uint32Array(1))[0]); - return new WordArray(words, nBytes); -}; -else randomWordArray = (nBytes) => { - const words = []; - const r = (m_w) => { - let _m_w = m_w; - let _m_z = 987654321; - const mask = 4294967295; - return () => { - _m_z = 36969 * (_m_z & 65535) + (_m_z >> 16) & mask; - _m_w = 18e3 * (_m_w & 65535) + (_m_w >> 16) & mask; - let result = (_m_z << 16) + _m_w & mask; - result /= 4294967296; - result += .5; - return result * (Math.random() > .5 ? 1 : -1); - }; - }; - let rcache; - for (let i = 0; i < nBytes; i += 4) { - const _r = r((rcache || Math.random()) * 4294967296); - rcache = _r() * 987654071; - words.push(_r() * 4294967296 | 0); - } - return new WordArray(words, nBytes); -}; -/** -* Base class for inheritance. -* Provides basic object-oriented programming utilities. -*/ -var Base = class { - /** - * Creates a new instance of this class with the provided arguments. - * This is a factory method that provides an alternative to using 'new'. - * - * @param args - Arguments to pass to the constructor - * @returns A new instance of this class - * @static - * @example - * ```javascript - * const instance = MyType.create(arg1, arg2); - * ``` - */ - static create(...args) { - return new this(...args); - } - /** - * Copies properties from the provided object into this instance. - * Performs a shallow merge of properties. - * - * @param properties - The properties to mix in - * @returns This instance for method chaining - * @example - * ```javascript - * instance.mixIn({ field: 'value', another: 123 }); - * ``` - */ - mixIn(properties) { - return Object.assign(this, properties); - } - /** - * Creates a deep copy of this object. - * - * @returns A clone of this instance - * @example - * ```javascript - * const clone = instance.clone(); - * ``` - */ - clone() { - const clone = new this.constructor(); - Object.assign(clone, this); - return clone; - } -}; -/** -* An array of 32-bit words. -* This is the core data structure used throughout the library for representing binary data. -* -* @property words - The array of 32-bit words -* @property sigBytes - The number of significant bytes in this word array -*/ -var WordArray = class extends Base { - /** The array of 32-bit words */ - words; - /** The number of significant bytes in this word array */ - sigBytes; - /** - * Initializes a newly created word array. - * Can accept various input formats including regular arrays, typed arrays, and ArrayBuffers. - * - * @param words - An array of 32-bit words, typed array, or ArrayBuffer - * @param sigBytes - The number of significant bytes in the words (defaults to words.length * 4) - * @example - * ```javascript - * const wordArray = new WordArray(); - * const wordArray = new WordArray([0x00010203, 0x04050607]); - * const wordArray = new WordArray([0x00010203, 0x04050607], 6); - * const wordArray = new WordArray(new Uint8Array([1, 2, 3, 4])); - * ``` - */ - constructor(words = [], sigBytes) { - super(); - if (words instanceof ArrayBuffer) { - const typedArray = new Uint8Array(words); - this._initFromUint8Array(typedArray); - return; - } - if (ArrayBuffer.isView(words)) { - let uint8Array; - if (words instanceof Uint8Array) uint8Array = words; - else uint8Array = new Uint8Array(words.buffer, words.byteOffset, words.byteLength); - this._initFromUint8Array(uint8Array); - return; - } - this.words = words; - this.sigBytes = sigBytes !== void 0 ? sigBytes : this.words.length * 4; - } - /** - * Initialize from Uint8Array - * @private - */ - _initFromUint8Array(typedArray) { - const typedArrayByteLength = typedArray.byteLength; - const words = []; - for (let i = 0; i < typedArrayByteLength; i += 1) words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8; - this.words = words; - this.sigBytes = typedArrayByteLength; - } - /** - * Creates a word array filled with cryptographically strong random bytes. - * Uses Web Crypto API if available, falls back to Math.random() if not. - * - * @param nBytes - The number of random bytes to generate - * @returns The random word array - * @static - * @example - * ```javascript - * const randomBytes = WordArray.random(16); // Generate 16 random bytes - * ``` - */ - static random = randomWordArray; - /** - * Converts this word array to a string using the specified encoding. - * - * @param encoder - The encoding strategy to use (defaults to Hex) - * @returns The stringified word array - * @example - * ```javascript - * const hexString = wordArray.toString(); - * const base64String = wordArray.toString(Base64); - * const utf8String = wordArray.toString(Utf8); - * ``` - */ - toString(encoder = Hex) { - return encoder.stringify(this); - } - /** - * Concatenates a word array to this word array. - * Modifies this word array in place. - * - * @param wordArray - The word array to append - * @returns This word array for method chaining - * @example - * ```javascript - * wordArray1.concat(wordArray2); - * const combined = wordArray1.concat(wordArray2).concat(wordArray3); - * ``` - */ - concat(wordArray) { - const thisWords = this.words; - const thatWords = wordArray.words; - const thisSigBytes = this.sigBytes; - const thatSigBytes = wordArray.sigBytes; - this.clamp(); - if (thisSigBytes % 4) for (let i = 0; i < thatSigBytes; i += 1) { - const thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255; - thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8; - } - else for (let i = 0; i < thatSigBytes; i += 4) thisWords[thisSigBytes + i >>> 2] = thatWords[i >>> 2]; - this.sigBytes += thatSigBytes; - return this; - } - /** - * Removes insignificant bits from the end of the word array. - * This ensures the word array only contains the exact number of significant bytes. - * - * @example - * ```javascript - * wordArray.clamp(); - * ``` - */ - clamp() { - const { words, sigBytes } = this; - words[sigBytes >>> 2] &= 4294967295 << 32 - sigBytes % 4 * 8; - words.length = Math.ceil(sigBytes / 4); - } - /** - * Creates a copy of this word array. - * - * @returns The cloned word array - * @example - * ```javascript - * const clone = wordArray.clone(); - * ``` - */ - clone() { - const clone = super.clone(); - clone.words = this.words.slice(0); - return clone; - } -}; -/** -* Hex encoding strategy. -* Converts between word arrays and hexadecimal strings. -*/ -const Hex = { - stringify(wordArray) { - const { words, sigBytes } = wordArray; - const hexChars = []; - for (let i = 0; i < sigBytes; i += 1) { - const bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255; - hexChars.push((bite >>> 4).toString(16)); - hexChars.push((bite & 15).toString(16)); - } - return hexChars.join(""); - }, - parse(hexStr) { - const hexStrLength = hexStr.length; - const words = []; - for (let i = 0; i < hexStrLength; i += 2) words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4; - return new WordArray(words, hexStrLength / 2); - } -}; -/** -* Latin1 encoding strategy. -* Converts between word arrays and Latin-1 (ISO-8859-1) strings. -*/ -const Latin1 = { - stringify(wordArray) { - const { words, sigBytes } = wordArray; - const latin1Chars = []; - for (let i = 0; i < sigBytes; i += 1) { - const bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255; - latin1Chars.push(String.fromCharCode(bite)); - } - return latin1Chars.join(""); - }, - parse(latin1Str) { - const latin1StrLength = latin1Str.length; - const words = []; - for (let i = 0; i < latin1StrLength; i += 1) words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8; - return new WordArray(words, latin1StrLength); - } -}; -/** -* UTF-8 encoding strategy. -* Converts between word arrays and UTF-8 strings. -*/ -const Utf8 = { - stringify(wordArray) { - try { - return decodeURIComponent(escape(Latin1.stringify(wordArray))); - } catch (e) { - throw new Error("Malformed UTF-8 data"); - } - }, - parse(utf8Str) { - return Latin1.parse(unescape(encodeURIComponent(utf8Str))); - } -}; -/** -* Abstract buffered block algorithm template. -* Provides a base implementation for algorithms that process data in fixed-size blocks. -* -* @property _minBufferSize - The number of blocks that should be kept unprocessed in the buffer -*/ -var BufferedBlockAlgorithm = class extends Base { - /** The number of blocks that should be kept unprocessed in the buffer */ - _minBufferSize = 0; - /** The data buffer */ - _data; - /** The number of bytes in the data buffer */ - _nDataBytes; - constructor() { - super(); - } - /** - * Resets this block algorithm's data buffer to its initial state. - * - * @example - * ```javascript - * bufferedBlockAlgorithm.reset(); - * ``` - */ - reset() { - this._data = new WordArray(); - this._nDataBytes = 0; - } - /** - * Adds new data to this block algorithm's buffer. - * - * @param data - The data to append (strings are converted to WordArray using UTF-8) - * @example - * ```javascript - * bufferedBlockAlgorithm._append('data'); - * bufferedBlockAlgorithm._append(wordArray); - * ``` - */ - _append(data) { - let m_data; - if (typeof data === "string") m_data = Utf8.parse(data); - else m_data = data; - this._data.concat(m_data); - this._nDataBytes += m_data.sigBytes; - } - /** - * Processes available data blocks. - * This method invokes _doProcessBlock(dataWords, offset), which must be implemented by a concrete subtype. - * - * @param doFlush - Whether all blocks and partial blocks should be processed - * @returns The processed data - * @example - * ```javascript - * const processedData = bufferedBlockAlgorithm._process(); - * const processedData = bufferedBlockAlgorithm._process(true); // Flush - * ``` - */ - _process(doFlush) { - let processedWords; - const data = this._data; - const dataWords = data.words; - const dataSigBytes = data.sigBytes; - const blockSizeBytes = this.blockSize * 4; - let nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) nBlocksReady = Math.ceil(nBlocksReady); - else nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - const nWordsReady = nBlocksReady * this.blockSize; - const nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); - if (nWordsReady) { - for (let offset = 0; offset < nWordsReady; offset += this.blockSize) this._doProcessBlock(dataWords, offset); - processedWords = dataWords.splice(0, nWordsReady); - data.sigBytes -= nBytesReady; - } - return new WordArray(processedWords || [], nBytesReady); - } - /** - * Creates a copy of this object. - * - * @returns The clone - * @example - * ```javascript - * const clone = bufferedBlockAlgorithm.clone(); - * ``` - */ - clone() { - const clone = super.clone(); - clone._data = this._data.clone(); - return clone; - } -}; -/** -* Abstract hasher template. -* Base class for all hash algorithm implementations. -* -* @property blockSize - The number of 32-bit words this hasher operates on (default: 16 = 512 bits) -*/ -var Hasher = class extends BufferedBlockAlgorithm { - /** The number of 32-bit words this hasher operates on */ - blockSize = 512 / 32; - /** Configuration options */ - cfg; - /** The hash result */ - _hash; - /** - * Initializes a newly created hasher. - * - * @param cfg - Configuration options - */ - constructor(cfg) { - super(); - this.cfg = Object.assign({}, cfg); - this.reset(); - } - /** - * Creates a shortcut function to a hasher's object interface. - * - * @param SubHasher - The hasher class to create a helper for - * @returns The shortcut function - * @static - * @example - * ```javascript - * const SHA256 = Hasher._createHelper(SHA256Algo); - * ``` - */ - static _createHelper(SubHasher) { - return (message, cfg) => { - return new SubHasher(cfg).finalize(message); - }; - } - /** - * Creates a shortcut function to the HMAC's object interface. - * - * @param SubHasher - The hasher class to use in this HMAC helper - * @returns The shortcut function - * @static - * @example - * ```javascript - * const HmacSHA256 = Hasher._createHmacHelper(SHA256Algo); - * ``` - */ - static _createHmacHelper(SubHasher) { - return (message, key) => { - return new HMAC(SubHasher, key).finalize(message); - }; - } - /** - * Resets this hasher to its initial state. - * - * @example - * ```javascript - * hasher.reset(); - * ``` - */ - reset() { - super.reset(); - this._doReset(); - } - /** - * Updates this hasher with a message. - * - * @param messageUpdate - The message to append - * @returns This hasher instance for method chaining - * @example - * ```javascript - * hasher.update('message'); - * hasher.update(wordArray); - * ``` - */ - update(messageUpdate) { - this._append(messageUpdate); - this._process(); - return this; - } - /** - * Finalizes the hash computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param messageUpdate - An optional final message update - * @returns The computed hash - * @example - * ```javascript - * const hash = hasher.finalize(); - * const hash = hasher.finalize('message'); - * const hash = hasher.finalize(wordArray); - * ``` - */ - finalize(messageUpdate) { - if (messageUpdate) this._append(messageUpdate); - const hash = this._doFinalize(); - return hash; - } -}; -/** -* Base class for 32-bit hash algorithms. -* Hash algorithms that operate on 32-bit words should extend this class. -*/ -var Hasher32 = class extends Hasher {}; -/** -* Base class for 64-bit hash algorithms. -* Hash algorithms that operate on 64-bit words should extend this class. -*/ -var Hasher64 = class extends Hasher {}; -/** -* HMAC (Hash-based Message Authentication Code) algorithm. -* Provides message authentication using a cryptographic hash function and a secret key. -*/ -var HMAC = class HMAC extends Base { - /** The inner hasher instance */ - _hasher; - /** The outer key */ - _oKey; - /** The inner key */ - _iKey; - /** - * Initializes a newly created HMAC. - * - * @param SubHasher - The hash algorithm class to use - * @param key - The secret key - * @example - * ```javascript - * const hmac = new HMAC(SHA256Algo, 'secret key'); - * ``` - */ - constructor(SubHasher, key) { - super(); - const hasher = new SubHasher(); - this._hasher = hasher; - let _key; - if (typeof key === "string") _key = Utf8.parse(key); - else _key = key; - const hasherBlockSize = hasher.blockSize; - const hasherBlockSizeBytes = hasherBlockSize * 4; - if (_key.sigBytes > hasherBlockSizeBytes) _key = hasher.finalize(_key); - _key.clamp(); - const oKey = _key.clone(); - this._oKey = oKey; - const iKey = _key.clone(); - this._iKey = iKey; - const oKeyWords = oKey.words; - const iKeyWords = iKey.words; - for (let i = 0; i < hasherBlockSize; i += 1) { - oKeyWords[i] ^= 1549556828; - iKeyWords[i] ^= 909522486; - } - oKey.sigBytes = hasherBlockSizeBytes; - iKey.sigBytes = hasherBlockSizeBytes; - this.reset(); - } - static create(...args) { - const [SubHasher, key] = args; - return new HMAC(SubHasher, key); - } - /** - * Resets this HMAC to its initial state. - * - * @example - * ```javascript - * hmac.reset(); - * ``` - */ - reset() { - const hasher = this._hasher; - hasher.reset(); - hasher.update(this._iKey); - } - /** - * Updates this HMAC with a message. - * - * @param messageUpdate - The message to append - * @returns This HMAC instance for method chaining - * @example - * ```javascript - * hmac.update('message'); - * hmac.update(wordArray); - * ``` - */ - update(messageUpdate) { - this._hasher.update(messageUpdate); - return this; - } - /** - * Finalizes the HMAC computation. - * Note that the finalize operation is effectively a destructive, read-once operation. - * - * @param messageUpdate - An optional final message update - * @returns The computed HMAC - * @example - * ```javascript - * const hmacValue = hmac.finalize(); - * const hmacValue = hmac.finalize('message'); - * const hmacValue = hmac.finalize(wordArray); - * ``` - */ - finalize(messageUpdate) { - const hasher = this._hasher; - const innerHash = hasher.finalize(messageUpdate); - hasher.reset(); - const hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); - return hmac; - } -}; - -//#endregion -export { Base, BufferedBlockAlgorithm, HMAC, Hasher, Hasher32, Hasher64, Hex, Latin1, Utf8, WordArray }; -//# sourceMappingURL=core.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/enc-base64.mjs b/client/static/crypto-es@3.1.0/enc-base64.mjs deleted file mode 100644 index 702adad..0000000 --- a/client/static/crypto-es@3.1.0/enc-base64.mjs +++ /dev/null @@ -1,104 +0,0 @@ -import { WordArray } from "./core.mjs"; - -//#region src/enc-base64.ts -/** -* Parses a Base64 string to a WordArray. -* Helper function for Base64 decoding. -* -* @param base64Str - The Base64 string to parse -* @param base64StrLength - The length of the Base64 string -* @param reverseMap - The reverse character map for decoding -* @returns The decoded WordArray -*/ -const parseLoop = (base64Str, base64StrLength, reverseMap) => { - const words = []; - let nBytes = 0; - for (let i = 0; i < base64StrLength; i += 1) if (i % 4) { - const bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2; - const bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2; - const bitsCombined = bits1 | bits2; - words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8; - nBytes += 1; - } - return WordArray.create(words, nBytes); -}; -/** -* Base64 encoding strategy implementation. -* @private -*/ -var Base64Impl = class { - /** The Base64 character map */ - _map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - /** The reverse character map for decoding */ - _reverseMap; - /** - * Converts a word array to a Base64 string. - * - * @param wordArray - The word array to convert - * @returns The Base64 string representation - * @example - * ```javascript - * const base64String = Base64.stringify(wordArray); - * ``` - */ - stringify(wordArray) { - const { words, sigBytes } = wordArray; - const map = this._map; - wordArray.clamp(); - const base64Chars = []; - for (let i = 0; i < sigBytes; i += 3) { - const byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 255; - const byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255; - const byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255; - const triplet = byte1 << 16 | byte2 << 8 | byte3; - for (let j = 0; j < 4 && i + j * .75 < sigBytes; j += 1) base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63)); - } - const paddingChar = map.charAt(64); - if (paddingChar) while (base64Chars.length % 4) base64Chars.push(paddingChar); - return base64Chars.join(""); - } - /** - * Converts a Base64 string to a word array. - * - * @param base64Str - The Base64 string to parse - * @returns The word array representation - * @example - * ```javascript - * const wordArray = Base64.parse(base64String); - * ``` - */ - parse(base64Str) { - let base64StrLength = base64Str.length; - const map = this._map; - let reverseMap = this._reverseMap; - if (!reverseMap) { - this._reverseMap = []; - reverseMap = this._reverseMap; - for (let j = 0; j < map.length; j += 1) reverseMap[map.charCodeAt(j)] = j; - } - const paddingChar = map.charAt(64); - if (paddingChar) { - const paddingIndex = base64Str.indexOf(paddingChar); - if (paddingIndex !== -1) base64StrLength = paddingIndex; - } - return parseLoop(base64Str, base64StrLength, reverseMap); - } -}; -/** -* Base64 encoding strategy. -* Converts between WordArrays and Base64 strings. -* -* @example -* ```javascript -* // Encoding -* const base64String = Base64.stringify(wordArray); -* -* // Decoding -* const wordArray = Base64.parse(base64String); -* ``` -*/ -const Base64 = new Base64Impl(); - -//#endregion -export { Base64, parseLoop }; -//# sourceMappingURL=enc-base64.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/enc-base64url.mjs b/client/static/crypto-es@3.1.0/enc-base64url.mjs deleted file mode 100644 index ce4337a..0000000 --- a/client/static/crypto-es@3.1.0/enc-base64url.mjs +++ /dev/null @@ -1,102 +0,0 @@ -import { parseLoop } from "./enc-base64.mjs"; - -//#region src/enc-base64url.ts -/** -* Base64url encoding strategy implementation. -* @private -*/ -var Base64urlImpl = class { - /** Standard Base64 character map */ - _map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - /** URL-safe Base64 character map (no padding) */ - _safeMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; - /** Reverse character map for decoding */ - _reverseMap; - /** - * Converts a word array to a Base64url string. - * - * @param wordArray - The word array to convert - * @param urlSafe - Whether to use URL-safe encoding (default: true) - * @returns The Base64url string representation - * @example - * ```javascript - * // URL-safe encoding (default) - * const base64urlString = Base64url.stringify(wordArray); - * - * // Standard Base64 encoding - * const base64String = Base64url.stringify(wordArray, false); - * ``` - */ - stringify(wordArray, urlSafe = true) { - const { words, sigBytes } = wordArray; - const map = urlSafe ? this._safeMap : this._map; - wordArray.clamp(); - const base64Chars = []; - for (let i = 0; i < sigBytes; i += 3) { - const byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 255; - const byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255; - const byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255; - const triplet = byte1 << 16 | byte2 << 8 | byte3; - for (let j = 0; j < 4 && i + j * .75 < sigBytes; j += 1) base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63)); - } - const paddingChar = map.charAt(64); - if (paddingChar) while (base64Chars.length % 4) base64Chars.push(paddingChar); - return base64Chars.join(""); - } - /** - * Converts a Base64url string to a word array. - * - * @param base64Str - The Base64url string to parse - * @param urlSafe - Whether to use URL-safe decoding (default: true) - * @returns The word array representation - * @example - * ```javascript - * // URL-safe decoding (default) - * const wordArray = Base64url.parse(base64urlString); - * - * // Standard Base64 decoding - * const wordArray = Base64url.parse(base64String, false); - * ``` - */ - parse(base64Str, urlSafe = true) { - let base64StrLength = base64Str.length; - const map = urlSafe ? this._safeMap : this._map; - let reverseMap = this._reverseMap; - if (!reverseMap) { - this._reverseMap = []; - reverseMap = this._reverseMap; - for (let j = 0; j < map.length; j += 1) reverseMap[map.charCodeAt(j)] = j; - } - const paddingChar = map.charAt(64); - if (paddingChar) { - const paddingIndex = base64Str.indexOf(paddingChar); - if (paddingIndex !== -1) base64StrLength = paddingIndex; - } - return parseLoop(base64Str, base64StrLength, reverseMap); - } -}; -/** -* Base64url encoding strategy. -* Provides URL-safe Base64 encoding/decoding that can be used in URLs without escaping. -* -* The URL-safe variant: -* - Uses '-' instead of '+' -* - Uses '_' instead of '/' -* - Omits padding '=' characters -* -* @example -* ```javascript -* // URL-safe encoding (default) -* const urlSafeString = Base64url.stringify(wordArray); -* const wordArray = Base64url.parse(urlSafeString); -* -* // Standard Base64 encoding -* const base64String = Base64url.stringify(wordArray, false); -* const wordArray = Base64url.parse(base64String, false); -* ``` -*/ -const Base64url = new Base64urlImpl(); - -//#endregion -export { Base64url }; -//# sourceMappingURL=enc-base64url.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/enc-utf16.mjs b/client/static/crypto-es@3.1.0/enc-utf16.mjs deleted file mode 100644 index 27569b4..0000000 --- a/client/static/crypto-es@3.1.0/enc-utf16.mjs +++ /dev/null @@ -1,57 +0,0 @@ -import { WordArray } from "./core.mjs"; - -//#region src/enc-utf16.ts -/** -* Swaps endian of a word -* @param word - The word to swap -* @returns The word with swapped endian -*/ -const swapEndian = (word) => word << 8 & 4278255360 | word >>> 8 & 16711935; -/** -* UTF-16 BE encoding strategy. -*/ -const Utf16BE = { - stringify(wordArray) { - const { words, sigBytes } = wordArray; - const utf16Chars = []; - for (let i = 0; i < sigBytes; i += 2) { - const codePoint = words[i >>> 2] >>> 16 - i % 4 * 8 & 65535; - utf16Chars.push(String.fromCharCode(codePoint)); - } - return utf16Chars.join(""); - }, - parse(utf16Str) { - const utf16StrLength = utf16Str.length; - const words = []; - for (let i = 0; i < utf16StrLength; i += 1) words[i >>> 1] |= utf16Str.charCodeAt(i) << 16 - i % 2 * 16; - return WordArray.create(words, utf16StrLength * 2); - } -}; -/** -* UTF-16 encoding strategy (defaults to UTF-16 BE). -*/ -const Utf16 = Utf16BE; -/** -* UTF-16 LE encoding strategy. -*/ -const Utf16LE = { - stringify(wordArray) { - const { words, sigBytes } = wordArray; - const utf16Chars = []; - for (let i = 0; i < sigBytes; i += 2) { - const codePoint = swapEndian(words[i >>> 2] >>> 16 - i % 4 * 8 & 65535); - utf16Chars.push(String.fromCharCode(codePoint)); - } - return utf16Chars.join(""); - }, - parse(utf16Str) { - const utf16StrLength = utf16Str.length; - const words = []; - for (let i = 0; i < utf16StrLength; i += 1) words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << 16 - i % 2 * 16); - return WordArray.create(words, utf16StrLength * 2); - } -}; - -//#endregion -export { Utf16, Utf16BE, Utf16LE }; -//# sourceMappingURL=enc-utf16.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/evpkdf.mjs b/client/static/crypto-es@3.1.0/evpkdf.mjs deleted file mode 100644 index 1a56ae3..0000000 --- a/client/static/crypto-es@3.1.0/evpkdf.mjs +++ /dev/null @@ -1,91 +0,0 @@ -import { Base, WordArray } from "./core.mjs"; -import { MD5Algo } from "./md5.mjs"; - -//#region src/evpkdf.ts -/** -* This key derivation function is meant to conform with EVP_BytesToKey. -* www.openssl.org/docs/crypto/EVP_BytesToKey.html -*/ -var EvpKDFAlgo = class extends Base { - cfg; - /** - * Initializes a newly created key derivation function. - * - * @param {Object} cfg (Optional) The configuration options to use for the derivation. - * - * @example - * - * const kdf = new EvpKDFAlgo(); - * const kdf = new EvpKDFAlgo({ keySize: 8 }); - * const kdf = new EvpKDFAlgo({ keySize: 8, iterations: 1000 }); - */ - constructor(cfg) { - super(); - /** - * Configuration options. - * - * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) - * @property {Hasher} hasher The hash algorithm to use. Default: MD5 - * @property {number} iterations The number of iterations to perform. Default: 1 - */ - this.cfg = Object.assign({}, { - keySize: 128 / 32, - hasher: MD5Algo, - iterations: 1 - }, cfg); - } - /** - * Derives a key from a password. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * - * @return {WordArray} The derived key. - * - * @example - * - * const key = kdf.compute(password, salt); - */ - compute(password, salt) { - let block; - const { cfg } = this; - const hasher = new cfg.hasher(); - const derivedKey = WordArray.create(); - const derivedKeyWords = derivedKey.words; - const { keySize, iterations } = cfg; - while (derivedKeyWords.length < keySize) { - if (block) hasher.update(block); - block = hasher.update(password).finalize(salt); - hasher.reset(); - for (let i = 1; i < iterations; i += 1) { - block = hasher.finalize(block); - hasher.reset(); - } - derivedKey.concat(block); - } - derivedKey.sigBytes = keySize * 4; - return derivedKey; - } -}; -/** -* Derives a key from a password. -* -* @param {WordArray|string} password The password. -* @param {WordArray|string} salt A salt. -* @param {Object} cfg (Optional) The configuration options to use for this computation. -* -* @return {WordArray} The derived key. -* -* @static -* -* @example -* -* var key = EvpKDF(password, salt); -* var key = EvpKDF(password, salt, { keySize: 8 }); -* var key = EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); -*/ -const EvpKDF = (password, salt, cfg) => new EvpKDFAlgo(cfg).compute(password, salt); - -//#endregion -export { EvpKDF, EvpKDFAlgo }; -//# sourceMappingURL=evpkdf.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/format-hex.mjs b/client/static/crypto-es@3.1.0/format-hex.mjs deleted file mode 100644 index 2e2e608..0000000 --- a/client/static/crypto-es@3.1.0/format-hex.mjs +++ /dev/null @@ -1,22 +0,0 @@ -import { Hex } from "./core.mjs"; -import { CipherParams } from "./cipher-core.mjs"; - -//#region src/format-hex.ts -/** -* Hex formatter for cipher params. -* Converts cipher params to/from hexadecimal strings. -*/ -const HexFormatter = { - stringify(cipherParams) { - if (!cipherParams.ciphertext) throw new Error("Ciphertext is required"); - return cipherParams.ciphertext.toString(Hex); - }, - parse(input) { - const ciphertext = Hex.parse(input); - return CipherParams.create({ ciphertext }); - } -}; - -//#endregion -export { HexFormatter }; -//# sourceMappingURL=format-hex.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/md5.mjs b/client/static/crypto-es@3.1.0/md5.mjs deleted file mode 100644 index b3cc876..0000000 --- a/client/static/crypto-es@3.1.0/md5.mjs +++ /dev/null @@ -1,201 +0,0 @@ -import { Hasher, Hasher32, WordArray } from "./core.mjs"; - -//#region src/md5.ts -const T = /* @__PURE__ */ (() => { - const a = []; - for (let i = 0; i < 64; i += 1) a[i] = Math.abs(Math.sin(i + 1)) * 4294967296 | 0; - return a; -})(); -/** -* MD5 round function F -*/ -const FF = (a, b, c, d, x, s, t) => { - const n = a + (b & c | ~b & d) + x + t; - return (n << s | n >>> 32 - s) + b; -}; -/** -* MD5 round function G -*/ -const GG = (a, b, c, d, x, s, t) => { - const n = a + (b & d | c & ~d) + x + t; - return (n << s | n >>> 32 - s) + b; -}; -/** -* MD5 round function H -*/ -const HH = (a, b, c, d, x, s, t) => { - const n = a + (b ^ c ^ d) + x + t; - return (n << s | n >>> 32 - s) + b; -}; -/** -* MD5 round function I -*/ -const II = (a, b, c, d, x, s, t) => { - const n = a + (c ^ (b | ~d)) + x + t; - return (n << s | n >>> 32 - s) + b; -}; -/** -* MD5 hash algorithm. -*/ -var MD5Algo = class extends Hasher32 { - _doReset() { - this._hash = new WordArray([ - 1732584193, - 4023233417, - 2562383102, - 271733878 - ]); - } - _doProcessBlock(M, offset) { - const _M = M; - for (let i = 0; i < 16; i += 1) { - const offset_i = offset + i; - const M_offset_i = M[offset_i]; - _M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360; - } - const H = this._hash.words; - const M_offset_0 = _M[offset + 0]; - const M_offset_1 = _M[offset + 1]; - const M_offset_2 = _M[offset + 2]; - const M_offset_3 = _M[offset + 3]; - const M_offset_4 = _M[offset + 4]; - const M_offset_5 = _M[offset + 5]; - const M_offset_6 = _M[offset + 6]; - const M_offset_7 = _M[offset + 7]; - const M_offset_8 = _M[offset + 8]; - const M_offset_9 = _M[offset + 9]; - const M_offset_10 = _M[offset + 10]; - const M_offset_11 = _M[offset + 11]; - const M_offset_12 = _M[offset + 12]; - const M_offset_13 = _M[offset + 13]; - const M_offset_14 = _M[offset + 14]; - const M_offset_15 = _M[offset + 15]; - let a = H[0]; - let b = H[1]; - let c = H[2]; - let d = H[3]; - a = FF(a, b, c, d, M_offset_0, 7, T[0]); - d = FF(d, a, b, c, M_offset_1, 12, T[1]); - c = FF(c, d, a, b, M_offset_2, 17, T[2]); - b = FF(b, c, d, a, M_offset_3, 22, T[3]); - a = FF(a, b, c, d, M_offset_4, 7, T[4]); - d = FF(d, a, b, c, M_offset_5, 12, T[5]); - c = FF(c, d, a, b, M_offset_6, 17, T[6]); - b = FF(b, c, d, a, M_offset_7, 22, T[7]); - a = FF(a, b, c, d, M_offset_8, 7, T[8]); - d = FF(d, a, b, c, M_offset_9, 12, T[9]); - c = FF(c, d, a, b, M_offset_10, 17, T[10]); - b = FF(b, c, d, a, M_offset_11, 22, T[11]); - a = FF(a, b, c, d, M_offset_12, 7, T[12]); - d = FF(d, a, b, c, M_offset_13, 12, T[13]); - c = FF(c, d, a, b, M_offset_14, 17, T[14]); - b = FF(b, c, d, a, M_offset_15, 22, T[15]); - a = GG(a, b, c, d, M_offset_1, 5, T[16]); - d = GG(d, a, b, c, M_offset_6, 9, T[17]); - c = GG(c, d, a, b, M_offset_11, 14, T[18]); - b = GG(b, c, d, a, M_offset_0, 20, T[19]); - a = GG(a, b, c, d, M_offset_5, 5, T[20]); - d = GG(d, a, b, c, M_offset_10, 9, T[21]); - c = GG(c, d, a, b, M_offset_15, 14, T[22]); - b = GG(b, c, d, a, M_offset_4, 20, T[23]); - a = GG(a, b, c, d, M_offset_9, 5, T[24]); - d = GG(d, a, b, c, M_offset_14, 9, T[25]); - c = GG(c, d, a, b, M_offset_3, 14, T[26]); - b = GG(b, c, d, a, M_offset_8, 20, T[27]); - a = GG(a, b, c, d, M_offset_13, 5, T[28]); - d = GG(d, a, b, c, M_offset_2, 9, T[29]); - c = GG(c, d, a, b, M_offset_7, 14, T[30]); - b = GG(b, c, d, a, M_offset_12, 20, T[31]); - a = HH(a, b, c, d, M_offset_5, 4, T[32]); - d = HH(d, a, b, c, M_offset_8, 11, T[33]); - c = HH(c, d, a, b, M_offset_11, 16, T[34]); - b = HH(b, c, d, a, M_offset_14, 23, T[35]); - a = HH(a, b, c, d, M_offset_1, 4, T[36]); - d = HH(d, a, b, c, M_offset_4, 11, T[37]); - c = HH(c, d, a, b, M_offset_7, 16, T[38]); - b = HH(b, c, d, a, M_offset_10, 23, T[39]); - a = HH(a, b, c, d, M_offset_13, 4, T[40]); - d = HH(d, a, b, c, M_offset_0, 11, T[41]); - c = HH(c, d, a, b, M_offset_3, 16, T[42]); - b = HH(b, c, d, a, M_offset_6, 23, T[43]); - a = HH(a, b, c, d, M_offset_9, 4, T[44]); - d = HH(d, a, b, c, M_offset_12, 11, T[45]); - c = HH(c, d, a, b, M_offset_15, 16, T[46]); - b = HH(b, c, d, a, M_offset_2, 23, T[47]); - a = II(a, b, c, d, M_offset_0, 6, T[48]); - d = II(d, a, b, c, M_offset_7, 10, T[49]); - c = II(c, d, a, b, M_offset_14, 15, T[50]); - b = II(b, c, d, a, M_offset_5, 21, T[51]); - a = II(a, b, c, d, M_offset_12, 6, T[52]); - d = II(d, a, b, c, M_offset_3, 10, T[53]); - c = II(c, d, a, b, M_offset_10, 15, T[54]); - b = II(b, c, d, a, M_offset_1, 21, T[55]); - a = II(a, b, c, d, M_offset_8, 6, T[56]); - d = II(d, a, b, c, M_offset_15, 10, T[57]); - c = II(c, d, a, b, M_offset_6, 15, T[58]); - b = II(b, c, d, a, M_offset_13, 21, T[59]); - a = II(a, b, c, d, M_offset_4, 6, T[60]); - d = II(d, a, b, c, M_offset_11, 10, T[61]); - c = II(c, d, a, b, M_offset_2, 15, T[62]); - b = II(b, c, d, a, M_offset_9, 21, T[63]); - H[0] = H[0] + a | 0; - H[1] = H[1] + b | 0; - H[2] = H[2] + c | 0; - H[3] = H[3] + d | 0; - } - _doFinalize() { - const data = this._data; - const dataWords = data.words; - const nBitsTotal = this._nDataBytes * 8; - const nBitsLeft = data.sigBytes * 8; - dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; - const nBitsTotalH = Math.floor(nBitsTotal / 4294967296); - const nBitsTotalL = nBitsTotal; - dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = (nBitsTotalH << 8 | nBitsTotalH >>> 24) & 16711935 | (nBitsTotalH << 24 | nBitsTotalH >>> 8) & 4278255360; - dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotalL << 8 | nBitsTotalL >>> 24) & 16711935 | (nBitsTotalL << 24 | nBitsTotalL >>> 8) & 4278255360; - data.sigBytes = (dataWords.length + 1) * 4; - this._process(); - const hash = this._hash; - const H = hash.words; - for (let i = 0; i < 4; i += 1) { - const H_i = H[i]; - H[i] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360; - } - return hash; - } - clone() { - const clone = super.clone.call(this); - clone._hash = this._hash.clone(); - return clone; - } -}; -/** -* Shortcut function to the hasher's object interface. -* -* @param message - The message to hash. -* @returns The hash. -* -* @example -* ```js -* const hash = MD5('message'); -* const hash = MD5(wordArray); -* ``` -*/ -const MD5 = Hasher._createHelper(MD5Algo); -/** -* Shortcut function to the HMAC's object interface. -* -* @param message - The message to hash. -* @param key - The secret key. -* @returns The HMAC. -* -* @example -* ```js -* const hmac = HmacMD5(message, key); -* ``` -*/ -const HmacMD5 = Hasher._createHmacHelper(MD5Algo); - -//#endregion -export { HmacMD5, MD5, MD5Algo }; -//# sourceMappingURL=md5.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/mode-cfb.mjs b/client/static/crypto-es@3.1.0/mode-cfb.mjs deleted file mode 100644 index 651585c..0000000 --- a/client/static/crypto-es@3.1.0/mode-cfb.mjs +++ /dev/null @@ -1,48 +0,0 @@ -import { BlockCipherMode } from "./cipher-core.mjs"; - -//#region src/mode-cfb.ts -function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { - const _words = words; - let keystream; - const iv = this._iv; - if (iv) { - keystream = iv.slice(0); - this._iv = void 0; - } else keystream = this._prevBlock; - cipher.encryptBlock(keystream, 0); - for (let i = 0; i < blockSize; i += 1) _words[offset + i] ^= keystream[i]; -} -/** -* CFB Encryptor -*/ -var CFBEncryptor = class extends BlockCipherMode { - processBlock(words, offset) { - const cipher = this._cipher; - const blockSize = cipher.blockSize; - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); - this._prevBlock = words.slice(offset, offset + blockSize); - } -}; -/** -* CFB Decryptor -*/ -var CFBDecryptor = class extends BlockCipherMode { - processBlock(words, offset) { - const cipher = this._cipher; - const blockSize = cipher.blockSize; - const thisBlock = words.slice(offset, offset + blockSize); - generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); - this._prevBlock = thisBlock; - } -}; -/** -* Cipher Feedback block mode. -*/ -var CFB = class extends BlockCipherMode { - static Encryptor = CFBEncryptor; - static Decryptor = CFBDecryptor; -}; - -//#endregion -export { CFB }; -//# sourceMappingURL=mode-cfb.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/mode-ctr-gladman.mjs b/client/static/crypto-es@3.1.0/mode-ctr-gladman.mjs deleted file mode 100644 index 588b182..0000000 --- a/client/static/crypto-es@3.1.0/mode-ctr-gladman.mjs +++ /dev/null @@ -1,68 +0,0 @@ -import { BlockCipherMode } from "./cipher-core.mjs"; - -//#region src/mode-ctr-gladman.ts -const incWord = (word) => { - let _word = word; - if ((word >> 24 & 255) === 255) { - let b1 = word >> 16 & 255; - let b2 = word >> 8 & 255; - let b3 = word & 255; - if (b1 === 255) { - b1 = 0; - if (b2 === 255) { - b2 = 0; - if (b3 === 255) b3 = 0; - else b3 += 1; - } else b2 += 1; - } else b1 += 1; - _word = 0; - _word += b1 << 16; - _word += b2 << 8; - _word += b3; - } else _word += 1 << 24; - return _word; -}; -const incCounter = (counter) => { - const _counter = counter; - _counter[0] = incWord(_counter[0]); - if (_counter[0] === 0) _counter[1] = incWord(_counter[1]); - return _counter; -}; -/** -* CTRGladman Encryptor/Decryptor (same operation) -*/ -var CTRGladmanMode = class extends BlockCipherMode { - /** Counter for CTR Gladman mode */ - _counter; - processBlock(words, offset) { - const _words = words; - const cipher = this._cipher; - const blockSize = cipher.blockSize; - const iv = this._iv; - let counter = this._counter; - if (iv) { - this._counter = iv.slice(0); - counter = this._counter; - this._iv = void 0; - } - incCounter(counter); - const keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); - for (let i = 0; i < blockSize; i += 1) _words[offset + i] ^= keystream[i]; - } -}; -/** @preserve -* Counter block mode compatible with Dr Brian Gladman fileenc.c -* derived from CTR mode -* Jan Hruby jhruby.web@gmail.com -*/ -var CTRGladman = class extends BlockCipherMode { - /** Counter for CTR Gladman mode */ - _counter; - static Encryptor = CTRGladmanMode; - static Decryptor = CTRGladmanMode; -}; - -//#endregion -export { CTRGladman }; -//# sourceMappingURL=mode-ctr-gladman.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/mode-ctr.mjs b/client/static/crypto-es@3.1.0/mode-ctr.mjs deleted file mode 100644 index c11227d..0000000 --- a/client/static/crypto-es@3.1.0/mode-ctr.mjs +++ /dev/null @@ -1,39 +0,0 @@ -import { BlockCipherMode } from "./cipher-core.mjs"; - -//#region src/mode-ctr.ts -/** -* CTR Encryptor/Decryptor (same operation) -*/ -var CTRMode = class extends BlockCipherMode { - /** Counter for CTR mode */ - _counter; - processBlock(words, offset) { - const _words = words; - const cipher = this._cipher; - const blockSize = cipher.blockSize; - const iv = this._iv; - let counter = this._counter; - if (iv) { - this._counter = iv.slice(0); - counter = this._counter; - this._iv = void 0; - } - const keystream = counter.slice(0); - cipher.encryptBlock(keystream, 0); - counter[blockSize - 1] = counter[blockSize - 1] + 1 | 0; - for (let i = 0; i < blockSize; i += 1) _words[offset + i] ^= keystream[i]; - } -}; -/** -* Counter block mode. -*/ -var CTR = class extends BlockCipherMode { - /** Counter for CTR mode */ - _counter; - static Encryptor = CTRMode; - static Decryptor = CTRMode; -}; - -//#endregion -export { CTR }; -//# sourceMappingURL=mode-ctr.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/mode-ecb.mjs b/client/static/crypto-es@3.1.0/mode-ecb.mjs deleted file mode 100644 index d3fae74..0000000 --- a/client/static/crypto-es@3.1.0/mode-ecb.mjs +++ /dev/null @@ -1,30 +0,0 @@ -import { BlockCipherMode } from "./cipher-core.mjs"; - -//#region src/mode-ecb.ts -/** -* ECB Encryptor -*/ -var ECBEncryptor = class extends BlockCipherMode { - processBlock(words, offset) { - this._cipher.encryptBlock(words, offset); - } -}; -/** -* ECB Decryptor -*/ -var ECBDecryptor = class extends BlockCipherMode { - processBlock(words, offset) { - this._cipher.decryptBlock(words, offset); - } -}; -/** -* Electronic Codebook block mode. -*/ -var ECB = class extends BlockCipherMode { - static Encryptor = ECBEncryptor; - static Decryptor = ECBDecryptor; -}; - -//#endregion -export { ECB }; -//# sourceMappingURL=mode-ecb.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/mode-ofb.mjs b/client/static/crypto-es@3.1.0/mode-ofb.mjs deleted file mode 100644 index c63ec49..0000000 --- a/client/static/crypto-es@3.1.0/mode-ofb.mjs +++ /dev/null @@ -1,40 +0,0 @@ -import { BlockCipherMode } from "./cipher-core.mjs"; - -//#region src/mode-ofb.ts -/** -* OFB Encryptor/Decryptor (same operation) -*/ -var OFBMode = class extends BlockCipherMode { - /** Keystream for OFB mode */ - _keystream; - processBlock(words, offset) { - const _words = words; - const cipher = this._cipher; - const blockSize = cipher.blockSize; - const iv = this._iv; - let keystream = this._keystream; - if (iv) { - this._keystream = iv.slice(0); - keystream = this._keystream; - this._iv = void 0; - } else if (!keystream) { - this._keystream = new Array(blockSize).fill(0); - keystream = this._keystream; - } - cipher.encryptBlock(keystream, 0); - for (let i = 0; i < blockSize; i += 1) _words[offset + i] ^= keystream[i]; - } -}; -/** -* Output Feedback block mode. -*/ -var OFB = class extends BlockCipherMode { - /** Keystream for OFB mode */ - _keystream; - static Encryptor = OFBMode; - static Decryptor = OFBMode; -}; - -//#endregion -export { OFB }; -//# sourceMappingURL=mode-ofb.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/pad-ansix923.mjs b/client/static/crypto-es@3.1.0/pad-ansix923.mjs deleted file mode 100644 index e02176e..0000000 --- a/client/static/crypto-es@3.1.0/pad-ansix923.mjs +++ /dev/null @@ -1,25 +0,0 @@ -//#region src/pad-ansix923.ts -/** -* ANSI X.923 padding strategy. -*/ -const AnsiX923 = { - pad(data, blockSize) { - const _data = data; - const dataSigBytes = _data.sigBytes; - const blockSizeBytes = blockSize * 4; - const nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; - const lastBytePos = dataSigBytes + nPaddingBytes - 1; - _data.clamp(); - _data.words[lastBytePos >>> 2] |= nPaddingBytes << 24 - lastBytePos % 4 * 8; - _data.sigBytes += nPaddingBytes; - }, - unpad(data) { - const _data = data; - const nPaddingBytes = _data.words[_data.sigBytes - 1 >>> 2] & 255; - _data.sigBytes -= nPaddingBytes; - } -}; - -//#endregion -export { AnsiX923 }; -//# sourceMappingURL=pad-ansix923.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/pad-iso10126.mjs b/client/static/crypto-es@3.1.0/pad-iso10126.mjs deleted file mode 100644 index 7465403..0000000 --- a/client/static/crypto-es@3.1.0/pad-iso10126.mjs +++ /dev/null @@ -1,22 +0,0 @@ -import { WordArray } from "./core.mjs"; - -//#region src/pad-iso10126.ts -/** -* ISO 10126 padding strategy. -*/ -const Iso10126 = { - pad(data, blockSize) { - const blockSizeBytes = blockSize * 4; - const nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; - data.concat(WordArray.random(nPaddingBytes - 1)).concat(WordArray.create([nPaddingBytes << 24], 1)); - }, - unpad(data) { - const _data = data; - const nPaddingBytes = _data.words[_data.sigBytes - 1 >>> 2] & 255; - _data.sigBytes -= nPaddingBytes; - } -}; - -//#endregion -export { Iso10126 }; -//# sourceMappingURL=pad-iso10126.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/pad-iso97971.mjs b/client/static/crypto-es@3.1.0/pad-iso97971.mjs deleted file mode 100644 index 0cb32b8..0000000 --- a/client/static/crypto-es@3.1.0/pad-iso97971.mjs +++ /dev/null @@ -1,22 +0,0 @@ -import { WordArray } from "./core.mjs"; -import { ZeroPadding } from "./pad-zeropadding.mjs"; - -//#region src/pad-iso97971.ts -/** -* ISO/IEC 9797-1 Padding Method 2. -*/ -const Iso97971 = { - pad(data, blockSize) { - data.concat(WordArray.create([2147483648], 1)); - ZeroPadding.pad(data, blockSize); - }, - unpad(data) { - const _data = data; - ZeroPadding.unpad(_data); - _data.sigBytes -= 1; - } -}; - -//#endregion -export { Iso97971 }; -//# sourceMappingURL=pad-iso97971.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/pad-nopadding.mjs b/client/static/crypto-es@3.1.0/pad-nopadding.mjs deleted file mode 100644 index 5f26dcd..0000000 --- a/client/static/crypto-es@3.1.0/pad-nopadding.mjs +++ /dev/null @@ -1,12 +0,0 @@ -//#region src/pad-nopadding.ts -/** -* A noop padding strategy. -*/ -const NoPadding = { - pad(_data, _blockSize) {}, - unpad(_data) {} -}; - -//#endregion -export { NoPadding }; -//# sourceMappingURL=pad-nopadding.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/pad-zeropadding.mjs b/client/static/crypto-es@3.1.0/pad-zeropadding.mjs deleted file mode 100644 index f5d4e17..0000000 --- a/client/static/crypto-es@3.1.0/pad-zeropadding.mjs +++ /dev/null @@ -1,24 +0,0 @@ -//#region src/pad-zeropadding.ts -/** -* Zero padding strategy. -*/ -const ZeroPadding = { - pad(data, blockSize) { - const _data = data; - const blockSizeBytes = blockSize * 4; - _data.clamp(); - _data.sigBytes += blockSizeBytes - (data.sigBytes % blockSizeBytes || blockSizeBytes); - }, - unpad(data) { - const _data = data; - const dataWords = _data.words; - for (let i = _data.sigBytes - 1; i >= 0; i -= 1) if (dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 255) { - _data.sigBytes = i + 1; - break; - } - } -}; - -//#endregion -export { ZeroPadding }; -//# sourceMappingURL=pad-zeropadding.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/pbkdf2.mjs b/client/static/crypto-es@3.1.0/pbkdf2.mjs deleted file mode 100644 index 5fa3651..0000000 --- a/client/static/crypto-es@3.1.0/pbkdf2.mjs +++ /dev/null @@ -1,99 +0,0 @@ -import { Base, HMAC, WordArray } from "./core.mjs"; -import { SHA256Algo } from "./sha256.mjs"; - -//#region src/pbkdf2.ts -/** -* Password-Based Key Derivation Function 2 algorithm. -*/ -var PBKDF2Algo = class extends Base { - cfg; - /** - * Initializes a newly created key derivation function. - * - * @param {Object} cfg (Optional) The configuration options to use for the derivation. - * - * @example - * - * const kdf = new PBKDF2Algo(); - * const kdf = new PBKDF2Algo({ keySize: 8 }); - * const kdf = new PBKDF2Algo({ keySize: 8, iterations: 1000 }); - */ - constructor(cfg) { - super(); - /** - * Configuration options. - * - * The default `hasher` and `interations` is different from CryptoJs to enhance security: - * https://github.com/entronad/crypto-es/security/advisories/GHSA-mpj8-q39x-wq5h - * - * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) - * @property {Hasher} hasher The hasher to use. Default: SHA256 - * @property {number} iterations The number of iterations to perform. Default: 250000 - */ - this.cfg = Object.assign({}, { - keySize: 128 / 32, - hasher: SHA256Algo, - iterations: 25e4 - }, cfg); - } - /** - * Computes the Password-Based Key Derivation Function 2. - * - * @param {WordArray|string} password The password. - * @param {WordArray|string} salt A salt. - * - * @return {WordArray} The derived key. - * - * @example - * - * const key = kdf.compute(password, salt); - */ - compute(password, salt) { - const { cfg } = this; - const hmac = HMAC.create(cfg.hasher, password); - const derivedKey = WordArray.create(); - const blockIndex = WordArray.create([1]); - const derivedKeyWords = derivedKey.words; - const blockIndexWords = blockIndex.words; - const { keySize, iterations } = cfg; - while (derivedKeyWords.length < keySize) { - const block = hmac.update(salt).finalize(blockIndex); - hmac.reset(); - const blockWords = block.words; - const blockWordsLength = blockWords.length; - let intermediate = block; - for (let i = 1; i < iterations; i += 1) { - intermediate = hmac.finalize(intermediate); - hmac.reset(); - const intermediateWords = intermediate.words; - for (let j = 0; j < blockWordsLength; j += 1) blockWords[j] ^= intermediateWords[j]; - } - derivedKey.concat(block); - blockIndexWords[0] += 1; - } - derivedKey.sigBytes = keySize * 4; - return derivedKey; - } -}; -/** -* Computes the Password-Based Key Derivation Function 2. -* -* @param {WordArray|string} password The password. -* @param {WordArray|string} salt A salt. -* @param {Object} cfg (Optional) The configuration options to use for this computation. -* -* @return {WordArray} The derived key. -* -* @static -* -* @example -* -* var key = PBKDF2(password, salt); -* var key = PBKDF2(password, salt, { keySize: 8 }); -* var key = PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); -*/ -const PBKDF2 = (password, salt, cfg) => new PBKDF2Algo(cfg).compute(password, salt); - -//#endregion -export { PBKDF2, PBKDF2Algo }; -//# sourceMappingURL=pbkdf2.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/rabbit-legacy.mjs b/client/static/crypto-es@3.1.0/rabbit-legacy.mjs deleted file mode 100644 index 0955bc9..0000000 --- a/client/static/crypto-es@3.1.0/rabbit-legacy.mjs +++ /dev/null @@ -1,126 +0,0 @@ -import { StreamCipher } from "./cipher-core.mjs"; - -//#region src/rabbit-legacy.ts -const S = []; -const C_ = []; -const G = []; -function nextState() { - const X = this._X; - const C = this._C; - for (let i = 0; i < 8; i += 1) C_[i] = C[i]; - C[0] = C[0] + 1295307597 + this._b | 0; - C[1] = C[1] + 3545052371 + (C[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0; - C[2] = C[2] + 886263092 + (C[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0; - C[3] = C[3] + 1295307597 + (C[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0; - C[4] = C[4] + 3545052371 + (C[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0; - C[5] = C[5] + 886263092 + (C[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0; - C[6] = C[6] + 1295307597 + (C[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0; - C[7] = C[7] + 3545052371 + (C[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0; - this._b = C[7] >>> 0 < C_[7] >>> 0 ? 1 : 0; - for (let i = 0; i < 8; i += 1) { - const gx = X[i] + C[i]; - const ga = gx & 65535; - const gb = gx >>> 16; - const gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb; - const gl = ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0); - G[i] = gh ^ gl; - } - X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0; - X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0; - X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0; - X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0; - X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0; - X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0; - X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0; - X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0; -} -/** -* Rabbit stream cipher algorithm. -* -* This is a legacy version that neglected to convert the key to little-endian. -* This error doesn't affect the cipher's security, -* but it does affect its compatibility with other implementations. -*/ -var RabbitLegacyAlgo = class extends StreamCipher { - _X; - _C; - _b; - static ivSize = 64 / 32; - constructor(xformMode, key, cfg) { - super(xformMode, key, cfg); - this.blockSize = 128 / 32; - } - _doReset() { - const K = this._key.words; - const { iv } = this.cfg; - this._X = [ - K[0], - K[3] << 16 | K[2] >>> 16, - K[1], - K[0] << 16 | K[3] >>> 16, - K[2], - K[1] << 16 | K[0] >>> 16, - K[3], - K[2] << 16 | K[1] >>> 16 - ]; - const X = this._X; - this._C = [ - K[2] << 16 | K[2] >>> 16, - K[0] & 4294901760 | K[1] & 65535, - K[3] << 16 | K[3] >>> 16, - K[1] & 4294901760 | K[2] & 65535, - K[0] << 16 | K[0] >>> 16, - K[2] & 4294901760 | K[3] & 65535, - K[1] << 16 | K[1] >>> 16, - K[3] & 4294901760 | K[0] & 65535 - ]; - const C = this._C; - this._b = 0; - for (let i = 0; i < 4; i += 1) nextState.call(this); - for (let i = 0; i < 8; i += 1) C[i] ^= X[i + 4 & 7]; - if (iv) { - const IV = iv.words; - const IV_0 = IV[0]; - const IV_1 = IV[1]; - const i0 = (IV_0 << 8 | IV_0 >>> 24) & 16711935 | (IV_0 << 24 | IV_0 >>> 8) & 4278255360; - const i2 = (IV_1 << 8 | IV_1 >>> 24) & 16711935 | (IV_1 << 24 | IV_1 >>> 8) & 4278255360; - const i1 = i0 >>> 16 | i2 & 4294901760; - const i3 = i2 << 16 | i0 & 65535; - C[0] ^= i0; - C[1] ^= i1; - C[2] ^= i2; - C[3] ^= i3; - C[4] ^= i0; - C[5] ^= i1; - C[6] ^= i2; - C[7] ^= i3; - for (let i = 0; i < 4; i += 1) nextState.call(this); - } - } - _doProcessBlock(M, offset) { - const _M = M; - const X = this._X; - nextState.call(this); - S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16; - S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16; - S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16; - S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16; - for (let i = 0; i < 4; i += 1) { - S[i] = (S[i] << 8 | S[i] >>> 24) & 16711935 | (S[i] << 24 | S[i] >>> 8) & 4278255360; - _M[offset + i] ^= S[i]; - } - } -}; -/** -* Shortcut functions to the cipher's object interface. -* -* @example -* -* var ciphertext = RabbitLegacy.encrypt(message, key, cfg); -* var plaintext = RabbitLegacy.decrypt(ciphertext, key, cfg); -*/ -const RabbitLegacy = StreamCipher._createHelper(RabbitLegacyAlgo); - -//#endregion -export { RabbitLegacy, RabbitLegacyAlgo }; -//# sourceMappingURL=rabbit-legacy.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/rabbit.mjs b/client/static/crypto-es@3.1.0/rabbit.mjs deleted file mode 100644 index 83b32ad..0000000 --- a/client/static/crypto-es@3.1.0/rabbit.mjs +++ /dev/null @@ -1,123 +0,0 @@ -import { StreamCipher } from "./cipher-core.mjs"; - -//#region src/rabbit.ts -const S = []; -const C_ = []; -const G = []; -function nextState() { - const X = this._X; - const C = this._C; - for (let i = 0; i < 8; i += 1) C_[i] = C[i]; - C[0] = C[0] + 1295307597 + this._b | 0; - C[1] = C[1] + 3545052371 + (C[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0; - C[2] = C[2] + 886263092 + (C[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0; - C[3] = C[3] + 1295307597 + (C[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0; - C[4] = C[4] + 3545052371 + (C[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0; - C[5] = C[5] + 886263092 + (C[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0; - C[6] = C[6] + 1295307597 + (C[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0; - C[7] = C[7] + 3545052371 + (C[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0; - this._b = C[7] >>> 0 < C_[7] >>> 0 ? 1 : 0; - for (let i = 0; i < 8; i += 1) { - const gx = X[i] + C[i]; - const ga = gx & 65535; - const gb = gx >>> 16; - const gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb; - const gl = ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0); - G[i] = gh ^ gl; - } - X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0; - X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0; - X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0; - X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0; - X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0; - X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0; - X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0; - X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0; -} -/** -* Rabbit stream cipher algorithm -*/ -var RabbitAlgo = class extends StreamCipher { - _X; - _C; - _b; - static ivSize = 64 / 32; - constructor(xformMode, key, cfg) { - super(xformMode, key, cfg); - this.blockSize = 128 / 32; - } - _doReset() { - const K = this._key.words; - const { iv } = this.cfg; - for (let i = 0; i < 4; i += 1) K[i] = (K[i] << 8 | K[i] >>> 24) & 16711935 | (K[i] << 24 | K[i] >>> 8) & 4278255360; - this._X = [ - K[0], - K[3] << 16 | K[2] >>> 16, - K[1], - K[0] << 16 | K[3] >>> 16, - K[2], - K[1] << 16 | K[0] >>> 16, - K[3], - K[2] << 16 | K[1] >>> 16 - ]; - const X = this._X; - this._C = [ - K[2] << 16 | K[2] >>> 16, - K[0] & 4294901760 | K[1] & 65535, - K[3] << 16 | K[3] >>> 16, - K[1] & 4294901760 | K[2] & 65535, - K[0] << 16 | K[0] >>> 16, - K[2] & 4294901760 | K[3] & 65535, - K[1] << 16 | K[1] >>> 16, - K[3] & 4294901760 | K[0] & 65535 - ]; - const C = this._C; - this._b = 0; - for (let i = 0; i < 4; i += 1) nextState.call(this); - for (let i = 0; i < 8; i += 1) C[i] ^= X[i + 4 & 7]; - if (iv) { - const IV = iv.words; - const IV_0 = IV[0]; - const IV_1 = IV[1]; - const i0 = (IV_0 << 8 | IV_0 >>> 24) & 16711935 | (IV_0 << 24 | IV_0 >>> 8) & 4278255360; - const i2 = (IV_1 << 8 | IV_1 >>> 24) & 16711935 | (IV_1 << 24 | IV_1 >>> 8) & 4278255360; - const i1 = i0 >>> 16 | i2 & 4294901760; - const i3 = i2 << 16 | i0 & 65535; - C[0] ^= i0; - C[1] ^= i1; - C[2] ^= i2; - C[3] ^= i3; - C[4] ^= i0; - C[5] ^= i1; - C[6] ^= i2; - C[7] ^= i3; - for (let i = 0; i < 4; i += 1) nextState.call(this); - } - } - _doProcessBlock(M, offset) { - const _M = M; - const X = this._X; - nextState.call(this); - S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16; - S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16; - S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16; - S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16; - for (let i = 0; i < 4; i += 1) { - S[i] = (S[i] << 8 | S[i] >>> 24) & 16711935 | (S[i] << 24 | S[i] >>> 8) & 4278255360; - _M[offset + i] ^= S[i]; - } - } -}; -/** -* Shortcut functions to the cipher's object interface. -* -* @example -* -* var ciphertext = Rabbit.encrypt(message, key, cfg); -* var plaintext = Rabbit.decrypt(ciphertext, key, cfg); -*/ -const Rabbit = StreamCipher._createHelper(RabbitAlgo); - -//#endregion -export { Rabbit, RabbitAlgo }; -//# sourceMappingURL=rabbit.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/rc4.mjs b/client/static/crypto-es@3.1.0/rc4.mjs deleted file mode 100644 index faa3949..0000000 --- a/client/static/crypto-es@3.1.0/rc4.mjs +++ /dev/null @@ -1,93 +0,0 @@ -import { StreamCipher } from "./cipher-core.mjs"; - -//#region src/rc4.ts -/** -* RC4 stream cipher algorithm. -*/ -var RC4Algo = class extends StreamCipher { - static keySize = 256 / 32; - static ivSize = 0; - _S; - _i; - _j; - generateKeystreamWord() { - const S = this._S; - let i = this._i; - let j = this._j; - let keystreamWord = 0; - for (let n = 0; n < 4; n += 1) { - i = (i + 1) % 256; - j = (j + S[i]) % 256; - const t = S[i]; - S[i] = S[j]; - S[j] = t; - keystreamWord |= S[(S[i] + S[j]) % 256] << 24 - n * 8; - } - this._i = i; - this._j = j; - return keystreamWord; - } - _doReset() { - const key = this._key; - const keyWords = key.words; - const keySigBytes = key.sigBytes; - this._S = []; - const S = this._S; - for (let i = 0; i < 256; i += 1) S[i] = i; - for (let i = 0, j = 0; i < 256; i += 1) { - const keyByteIndex = i % keySigBytes; - const keyByte = keyWords[keyByteIndex >>> 2] >>> 24 - keyByteIndex % 4 * 8 & 255; - j = (j + S[i] + keyByte) % 256; - const t = S[i]; - S[i] = S[j]; - S[j] = t; - } - this._j = 0; - this._i = this._j; - } - _doProcessBlock(M, offset) { - const _M = M; - _M[offset] ^= this.generateKeystreamWord(); - } -}; -/** -* Shortcut functions to the cipher's object interface. -* -* @example -* -* var ciphertext = RC4.encrypt(message, key, cfg); -* var plaintext = RC4.decrypt(ciphertext, key, cfg); -*/ -const RC4 = StreamCipher._createHelper(RC4Algo); -/** -* Modified RC4 stream cipher algorithm. -*/ -var RC4DropAlgo = class extends RC4Algo { - constructor(xformMode, key, cfg) { - super(xformMode, key, cfg); - /** - * Configuration options. - * - * @property {number} drop The number of keystream words to drop. Default 192 - */ - if (this.cfg.drop === void 0) this.cfg.drop = 192; - } - _doReset() { - super._doReset(); - const dropCount = this.cfg.drop || 192; - for (let i = dropCount; i > 0; i -= 1) this.generateKeystreamWord(); - } -}; -/** -* Shortcut functions to the cipher's object interface. -* -* @example -* -* var ciphertext = RC4Drop.encrypt(message, key, cfg); -* var plaintext = RC4Drop.decrypt(ciphertext, key, cfg); -*/ -const RC4Drop = StreamCipher._createHelper(RC4DropAlgo); - -//#endregion -export { RC4, RC4Algo, RC4Drop, RC4DropAlgo }; -//# sourceMappingURL=rc4.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/ripemd160.mjs b/client/static/crypto-es@3.1.0/ripemd160.mjs deleted file mode 100644 index 8d075af..0000000 --- a/client/static/crypto-es@3.1.0/ripemd160.mjs +++ /dev/null @@ -1,497 +0,0 @@ -import { Hasher, Hasher32, WordArray } from "./core.mjs"; - -//#region src/ripemd160.ts -const _zl = WordArray.create([ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 7, - 4, - 13, - 1, - 10, - 6, - 15, - 3, - 12, - 0, - 9, - 5, - 2, - 14, - 11, - 8, - 3, - 10, - 14, - 4, - 9, - 15, - 8, - 1, - 2, - 7, - 0, - 6, - 13, - 11, - 5, - 12, - 1, - 9, - 11, - 10, - 0, - 8, - 12, - 4, - 13, - 3, - 7, - 15, - 14, - 5, - 6, - 2, - 4, - 0, - 5, - 9, - 7, - 12, - 2, - 10, - 14, - 1, - 3, - 8, - 11, - 6, - 15, - 13 -]); -const _zr = WordArray.create([ - 5, - 14, - 7, - 0, - 9, - 2, - 11, - 4, - 13, - 6, - 15, - 8, - 1, - 10, - 3, - 12, - 6, - 11, - 3, - 7, - 0, - 13, - 5, - 10, - 14, - 15, - 8, - 12, - 4, - 9, - 1, - 2, - 15, - 5, - 1, - 3, - 7, - 14, - 6, - 9, - 11, - 8, - 12, - 2, - 10, - 0, - 4, - 13, - 8, - 6, - 4, - 1, - 3, - 11, - 15, - 0, - 5, - 12, - 2, - 13, - 9, - 7, - 10, - 14, - 12, - 15, - 10, - 4, - 1, - 5, - 8, - 7, - 6, - 2, - 13, - 14, - 0, - 3, - 9, - 11 -]); -const _sl = WordArray.create([ - 11, - 14, - 15, - 12, - 5, - 8, - 7, - 9, - 11, - 13, - 14, - 15, - 6, - 7, - 9, - 8, - 7, - 6, - 8, - 13, - 11, - 9, - 7, - 15, - 7, - 12, - 15, - 9, - 11, - 7, - 13, - 12, - 11, - 13, - 6, - 7, - 14, - 9, - 13, - 15, - 14, - 8, - 13, - 6, - 5, - 12, - 7, - 5, - 11, - 12, - 14, - 15, - 14, - 15, - 9, - 8, - 9, - 14, - 5, - 6, - 8, - 6, - 5, - 12, - 9, - 15, - 5, - 11, - 6, - 8, - 13, - 12, - 5, - 12, - 13, - 14, - 11, - 8, - 5, - 6 -]); -const _sr = WordArray.create([ - 8, - 9, - 9, - 11, - 13, - 15, - 15, - 5, - 7, - 7, - 8, - 11, - 14, - 14, - 12, - 6, - 9, - 13, - 15, - 7, - 12, - 8, - 9, - 11, - 7, - 7, - 12, - 7, - 6, - 15, - 13, - 11, - 9, - 7, - 15, - 11, - 8, - 6, - 6, - 14, - 12, - 13, - 5, - 14, - 13, - 13, - 7, - 5, - 15, - 5, - 8, - 11, - 14, - 14, - 6, - 14, - 6, - 9, - 12, - 9, - 12, - 5, - 15, - 8, - 8, - 5, - 12, - 9, - 12, - 5, - 14, - 6, - 8, - 13, - 6, - 5, - 15, - 13, - 11, - 11 -]); -const _hl = WordArray.create([ - 0, - 1518500249, - 1859775393, - 2400959708, - 2840853838 -]); -const _hr = WordArray.create([ - 1352829926, - 1548603684, - 1836072691, - 2053994217, - 0 -]); -/** -* RIPEMD160 round function 1 -*/ -const f1 = (x, y, z) => x ^ y ^ z; -/** -* RIPEMD160 round function 2 -*/ -const f2 = (x, y, z) => x & y | ~x & z; -/** -* RIPEMD160 round function 3 -*/ -const f3 = (x, y, z) => (x | ~y) ^ z; -/** -* RIPEMD160 round function 4 -*/ -const f4 = (x, y, z) => x & z | y & ~z; -/** -* RIPEMD160 round function 5 -*/ -const f5 = (x, y, z) => x ^ (y | ~z); -/** -* Rotate left helper -*/ -const rotl = (x, n) => x << n | x >>> 32 - n; -/** -* RIPEMD160 hash algorithm. -*/ -var RIPEMD160Algo = class extends Hasher32 { - _doReset() { - this._hash = WordArray.create([ - 1732584193, - 4023233417, - 2562383102, - 271733878, - 3285377520 - ]); - } - _doProcessBlock(M, offset) { - const _M = M; - for (let i = 0; i < 16; i += 1) { - const offset_i = offset + i; - const M_offset_i = _M[offset_i]; - _M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360; - } - const H = this._hash.words; - const hl = _hl.words; - const hr = _hr.words; - const zl = _zl.words; - const zr = _zr.words; - const sl = _sl.words; - const sr = _sr.words; - let al = H[0]; - let bl = H[1]; - let cl = H[2]; - let dl = H[3]; - let el = H[4]; - let ar = H[0]; - let br = H[1]; - let cr = H[2]; - let dr = H[3]; - let er = H[4]; - let t; - for (let i = 0; i < 80; i += 1) { - t = al + _M[offset + zl[i]] | 0; - if (i < 16) t += f1(bl, cl, dl) + hl[0]; - else if (i < 32) t += f2(bl, cl, dl) + hl[1]; - else if (i < 48) t += f3(bl, cl, dl) + hl[2]; - else if (i < 64) t += f4(bl, cl, dl) + hl[3]; - else t += f5(bl, cl, dl) + hl[4]; - t |= 0; - t = rotl(t, sl[i]); - t = t + el | 0; - al = el; - el = dl; - dl = rotl(cl, 10); - cl = bl; - bl = t; - t = ar + _M[offset + zr[i]] | 0; - if (i < 16) t += f5(br, cr, dr) + hr[0]; - else if (i < 32) t += f4(br, cr, dr) + hr[1]; - else if (i < 48) t += f3(br, cr, dr) + hr[2]; - else if (i < 64) t += f2(br, cr, dr) + hr[3]; - else t += f1(br, cr, dr) + hr[4]; - t |= 0; - t = rotl(t, sr[i]); - t = t + er | 0; - ar = er; - er = dr; - dr = rotl(cr, 10); - cr = br; - br = t; - } - t = H[1] + cl + dr | 0; - H[1] = H[2] + dl + er | 0; - H[2] = H[3] + el + ar | 0; - H[3] = H[4] + al + br | 0; - H[4] = H[0] + bl + cr | 0; - H[0] = t; - } - _doFinalize() { - const data = this._data; - const dataWords = data.words; - const nBitsTotal = this._nDataBytes * 8; - const nBitsLeft = data.sigBytes * 8; - dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; - dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotal << 8 | nBitsTotal >>> 24) & 16711935 | (nBitsTotal << 24 | nBitsTotal >>> 8) & 4278255360; - data.sigBytes = (dataWords.length + 1) * 4; - this._process(); - const hash = this._hash; - const H = hash.words; - for (let i = 0; i < 5; i += 1) { - const H_i = H[i]; - H[i] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360; - } - return hash; - } - clone() { - const clone = super.clone.call(this); - clone._hash = this._hash.clone(); - return clone; - } -}; -/** -* Shortcut function to the hasher's object interface. -* -* @param message - The message to hash. -* @returns The hash. -* -* @example -* ```js -* const hash = RIPEMD160('message'); -* const hash = RIPEMD160(wordArray); -* ``` -*/ -const RIPEMD160 = Hasher._createHelper(RIPEMD160Algo); -/** -* Shortcut function to the HMAC's object interface. -* -* @param message - The message to hash. -* @param key - The secret key. -* @returns The HMAC. -* -* @example -* ```js -* const hmac = HmacRIPEMD160(message, key); -* ``` -*/ -const HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160Algo); - -//#endregion -export { HmacRIPEMD160, RIPEMD160, RIPEMD160Algo }; -//# sourceMappingURL=ripemd160.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/sha1.mjs b/client/static/crypto-es@3.1.0/sha1.mjs deleted file mode 100644 index 8df81a2..0000000 --- a/client/static/crypto-es@3.1.0/sha1.mjs +++ /dev/null @@ -1,95 +0,0 @@ -import { Hasher, Hasher32, WordArray } from "./core.mjs"; - -//#region src/sha1.ts -const W = []; -/** -* SHA-1 hash algorithm. -*/ -var SHA1Algo = class extends Hasher32 { - _doReset() { - this._hash = new WordArray([ - 1732584193, - 4023233417, - 2562383102, - 271733878, - 3285377520 - ]); - } - _doProcessBlock(M, offset) { - const H = this._hash.words; - let a = H[0]; - let b = H[1]; - let c = H[2]; - let d = H[3]; - let e = H[4]; - for (let i = 0; i < 80; i += 1) { - if (i < 16) W[i] = M[offset + i] | 0; - else { - const n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; - W[i] = n << 1 | n >>> 31; - } - let t = (a << 5 | a >>> 27) + e + W[i]; - if (i < 20) t += (b & c | ~b & d) + 1518500249; - else if (i < 40) t += (b ^ c ^ d) + 1859775393; - else if (i < 60) t += (b & c | b & d | c & d) - 1894007588; - else t += (b ^ c ^ d) - 899497514; - e = d; - d = c; - c = b << 30 | b >>> 2; - b = a; - a = t; - } - H[0] = H[0] + a | 0; - H[1] = H[1] + b | 0; - H[2] = H[2] + c | 0; - H[3] = H[3] + d | 0; - H[4] = H[4] + e | 0; - } - _doFinalize() { - const data = this._data; - const dataWords = data.words; - const nBitsTotal = this._nDataBytes * 8; - const nBitsLeft = data.sigBytes * 8; - dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; - dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 4294967296); - dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - this._process(); - return this._hash; - } - clone() { - const clone = super.clone.call(this); - clone._hash = this._hash.clone(); - return clone; - } -}; -/** -* Shortcut function to the hasher's object interface. -* -* @param message - The message to hash. -* @returns The hash. -* -* @example -* ```js -* const hash = SHA1('message'); -* const hash = SHA1(wordArray); -* ``` -*/ -const SHA1 = Hasher._createHelper(SHA1Algo); -/** -* Shortcut function to the HMAC's object interface. -* -* @param message - The message to hash. -* @param key - The secret key. -* @returns The HMAC. -* -* @example -* ```js -* const hmac = HmacSHA1(message, key); -* ``` -*/ -const HmacSHA1 = Hasher._createHmacHelper(SHA1Algo); - -//#endregion -export { HmacSHA1, SHA1, SHA1Algo }; -//# sourceMappingURL=sha1.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/sha224.mjs b/client/static/crypto-es@3.1.0/sha224.mjs deleted file mode 100644 index 82fba54..0000000 --- a/client/static/crypto-es@3.1.0/sha224.mjs +++ /dev/null @@ -1,60 +0,0 @@ -import { WordArray } from "./core.mjs"; -import { SHA256Algo } from "./sha256.mjs"; - -//#region src/sha224.ts -/** -* SHA-224 hash algorithm. -*/ -var SHA224Algo = class extends SHA256Algo { - _doReset() { - this._hash = new WordArray([ - 3238371032, - 914150663, - 812702999, - 4144912697, - 4290775857, - 1750603025, - 1694076839, - 3204075428 - ]); - } - _doFinalize() { - const hash = super._doFinalize.call(this); - hash.sigBytes -= 4; - return hash; - } - clone() { - const clone = super.clone.call(this); - return clone; - } -}; -/** -* Shortcut function to the hasher's object interface. -* -* @param message - The message to hash. -* @returns The hash. -* -* @example -* ```js -* const hash = SHA224('message'); -* const hash = SHA224(wordArray); -* ``` -*/ -const SHA224 = SHA256Algo._createHelper(SHA224Algo); -/** -* Shortcut function to the HMAC's object interface. -* -* @param message - The message to hash. -* @param key - The secret key. -* @returns The HMAC. -* -* @example -* ```js -* const hmac = HmacSHA224(message, key); -* ``` -*/ -const HmacSHA224 = SHA256Algo._createHmacHelper(SHA224Algo); - -//#endregion -export { HmacSHA224, SHA224, SHA224Algo }; -//# sourceMappingURL=sha224.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/sha256.mjs b/client/static/crypto-es@3.1.0/sha256.mjs deleted file mode 100644 index f6ebee0..0000000 --- a/client/static/crypto-es@3.1.0/sha256.mjs +++ /dev/null @@ -1,126 +0,0 @@ -import { Hasher, Hasher32, WordArray } from "./core.mjs"; - -//#region src/sha256.ts -const { H, K } = /* @__PURE__ */ (() => { - const _H = []; - const _K = []; - const isPrime = (n$1) => { - const sqrtN = Math.sqrt(n$1); - for (let factor = 2; factor <= sqrtN; factor += 1) if (!(n$1 % factor)) return false; - return true; - }; - const getFractionalBits = (n$1) => (n$1 - (n$1 | 0)) * 4294967296 | 0; - let n = 2; - let nPrime = 0; - while (nPrime < 64) { - if (isPrime(n)) { - if (nPrime < 8) _H[nPrime] = getFractionalBits(n ** (1 / 2)); - _K[nPrime] = getFractionalBits(n ** (1 / 3)); - nPrime += 1; - } - n += 1; - } - return { - H: _H, - K: _K - }; -})(); -const W = []; -/** -* SHA-256 hash algorithm. -*/ -var SHA256Algo = class extends Hasher32 { - _doReset() { - this._hash = new WordArray(H.slice(0)); - } - _doProcessBlock(M, offset) { - const _H = this._hash.words; - let a = _H[0]; - let b = _H[1]; - let c = _H[2]; - let d = _H[3]; - let e = _H[4]; - let f = _H[5]; - let g = _H[6]; - let h = _H[7]; - for (let i = 0; i < 64; i += 1) { - if (i < 16) W[i] = M[offset + i] | 0; - else { - const gamma0x = W[i - 15]; - const gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3; - const gamma1x = W[i - 2]; - const gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10; - W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; - } - const ch = e & f ^ ~e & g; - const maj = a & b ^ a & c ^ b & c; - const sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22); - const sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25); - const t1 = h + sigma1 + ch + K[i] + W[i]; - const t2 = sigma0 + maj; - h = g; - g = f; - f = e; - e = d + t1 | 0; - d = c; - c = b; - b = a; - a = t1 + t2 | 0; - } - _H[0] = _H[0] + a | 0; - _H[1] = _H[1] + b | 0; - _H[2] = _H[2] + c | 0; - _H[3] = _H[3] + d | 0; - _H[4] = _H[4] + e | 0; - _H[5] = _H[5] + f | 0; - _H[6] = _H[6] + g | 0; - _H[7] = _H[7] + h | 0; - } - _doFinalize() { - const data = this._data; - const dataWords = data.words; - const nBitsTotal = this._nDataBytes * 8; - const nBitsLeft = data.sigBytes * 8; - dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; - dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 4294967296); - dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - this._process(); - return this._hash; - } - clone() { - const clone = super.clone.call(this); - clone._hash = this._hash.clone(); - return clone; - } -}; -/** -* Shortcut function to the hasher's object interface. -* -* @param message - The message to hash. -* @returns The hash. -* -* @example -* ```js -* const hash = SHA256('message'); -* const hash = SHA256(wordArray); -* ``` -*/ -const SHA256 = Hasher._createHelper(SHA256Algo); -/** -* Shortcut function to the HMAC's object interface. -* -* @param message - The message to hash. -* @param key - The secret key. -* @returns The HMAC. -* -* @example -* ```js -* const hmac = HmacSHA256(message, key); -* ``` -*/ -const HmacSHA256 = Hasher._createHmacHelper(SHA256Algo); - -//#endregion -export { HmacSHA256, SHA256, SHA256Algo }; -//# sourceMappingURL=sha256.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/sha3.mjs b/client/static/crypto-es@3.1.0/sha3.mjs deleted file mode 100644 index 6017736..0000000 --- a/client/static/crypto-es@3.1.0/sha3.mjs +++ /dev/null @@ -1,170 +0,0 @@ -import { Hasher, Hasher32, WordArray } from "./core.mjs"; -import { X64Word } from "./x64-core.mjs"; - -//#region src/sha3.ts -const RHO_OFFSETS = []; -const PI_INDEXES = []; -const ROUND_CONSTANTS = []; -const T = /* @__PURE__ */ (() => { - const a = []; - for (let i = 0; i < 25; i += 1) a[i] = X64Word.create(); - return a; -})(); -/** -* SHA-3 hash algorithm. -*/ -var SHA3Algo = class extends Hasher32 { - _state = []; - /** - * Initializes a newly created hasher. - * - * @param cfg - Configuration options. - * @property {number} outputLength - The desired number of bits in the output hash. - * Only values permitted are: 224, 256, 384, 512. - * Default: 512 - */ - constructor(cfg) { - super(Object.assign({ outputLength: 512 }, cfg)); - } - _doReset() { - this._state = []; - for (let i = 0; i < 25; i += 1) this._state[i] = new X64Word(); - this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; - } - _doProcessBlock(M, offset) { - if (this._state.length === 0) this._doReset(); - const state = this._state; - const nBlockSizeLanes = this.blockSize / 2; - for (let i = 0; i < nBlockSizeLanes; i += 1) { - let M2i = M[offset + 2 * i]; - let M2i1 = M[offset + 2 * i + 1]; - M2i = (M2i << 8 | M2i >>> 24) & 16711935 | (M2i << 24 | M2i >>> 8) & 4278255360; - M2i1 = (M2i1 << 8 | M2i1 >>> 24) & 16711935 | (M2i1 << 24 | M2i1 >>> 8) & 4278255360; - const lane = state[i]; - lane.high ^= M2i1; - lane.low ^= M2i; - } - for (let round = 0; round < 24; round += 1) { - for (let x = 0; x < 5; x += 1) { - let tMsw = 0; - let tLsw = 0; - for (let y = 0; y < 5; y += 1) { - const lane$1 = state[x + 5 * y]; - tMsw ^= lane$1.high; - tLsw ^= lane$1.low; - } - const Tx = T[x]; - Tx.high = tMsw; - Tx.low = tLsw; - } - for (let x = 0; x < 5; x += 1) { - const Tx4 = T[(x + 4) % 5]; - const Tx1 = T[(x + 1) % 5]; - const Tx1Msw = Tx1.high; - const Tx1Lsw = Tx1.low; - const tMsw = Tx4.high ^ (Tx1Msw << 1 | Tx1Lsw >>> 31); - const tLsw = Tx4.low ^ (Tx1Lsw << 1 | Tx1Msw >>> 31); - for (let y = 0; y < 5; y += 1) { - const lane$1 = state[x + 5 * y]; - lane$1.high ^= tMsw; - lane$1.low ^= tLsw; - } - } - for (let laneIndex = 1; laneIndex < 25; laneIndex += 1) { - let tMsw; - let tLsw; - const lane$1 = state[laneIndex]; - const laneMsw = lane$1.high; - const laneLsw = lane$1.low; - const rhoOffset = RHO_OFFSETS[laneIndex]; - if (rhoOffset < 32) { - tMsw = laneMsw << rhoOffset | laneLsw >>> 32 - rhoOffset; - tLsw = laneLsw << rhoOffset | laneMsw >>> 32 - rhoOffset; - } else { - tMsw = laneLsw << rhoOffset - 32 | laneMsw >>> 64 - rhoOffset; - tLsw = laneMsw << rhoOffset - 32 | laneLsw >>> 64 - rhoOffset; - } - const TPiLane = T[PI_INDEXES[laneIndex]]; - TPiLane.high = tMsw; - TPiLane.low = tLsw; - } - const T0 = T[0]; - const state0 = state[0]; - T0.high = state0.high; - T0.low = state0.low; - for (let x = 0; x < 5; x += 1) for (let y = 0; y < 5; y += 1) { - const laneIndex = x + 5 * y; - const lane$1 = state[laneIndex]; - const TLane = T[laneIndex]; - const Tx1Lane = T[(x + 1) % 5 + 5 * y]; - const Tx2Lane = T[(x + 2) % 5 + 5 * y]; - lane$1.high = TLane.high ^ ~Tx1Lane.high & Tx2Lane.high; - lane$1.low = TLane.low ^ ~Tx1Lane.low & Tx2Lane.low; - } - const lane = state[0]; - const roundConstant = ROUND_CONSTANTS[round]; - lane.high ^= roundConstant.high; - lane.low ^= roundConstant.low; - } - } - _doFinalize() { - const data = this._data; - const dataWords = data.words; - const nBitsLeft = data.sigBytes * 8; - const blockSizeBits = this.blockSize * 32; - dataWords[nBitsLeft >>> 5] |= 1 << 24 - nBitsLeft % 32; - dataWords[(Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits >>> 5) - 1] |= 128; - data.sigBytes = dataWords.length * 4; - this._process(); - const state = this._state; - const outputLengthBytes = this.cfg.outputLength / 8; - const outputLengthLanes = outputLengthBytes / 8; - const hashWords = []; - for (let i = 0; i < outputLengthLanes; i += 1) { - const lane = state[i]; - let laneMsw = lane.high; - let laneLsw = lane.low; - laneMsw = (laneMsw << 8 | laneMsw >>> 24) & 16711935 | (laneMsw << 24 | laneMsw >>> 8) & 4278255360; - laneLsw = (laneLsw << 8 | laneLsw >>> 24) & 16711935 | (laneLsw << 24 | laneLsw >>> 8) & 4278255360; - hashWords.push(laneLsw); - hashWords.push(laneMsw); - } - return new WordArray(hashWords, outputLengthBytes); - } - clone() { - const clone = super.clone.call(this); - clone._state = []; - for (let i = 0; i < this._state.length; i += 1) clone._state[i] = this._state[i].clone(); - return clone; - } -}; -/** -* Shortcut function to the hasher's object interface. -* -* @param message - The message to hash. -* @returns The hash. -* -* @example -* ```js -* const hash = SHA3('message'); -* const hash = SHA3(wordArray); -* ``` -*/ -const SHA3 = Hasher._createHelper(SHA3Algo); -/** -* Shortcut function to the HMAC's object interface. -* -* @param message - The message to hash. -* @param key - The secret key. -* @returns The HMAC. -* -* @example -* ```js -* const hmac = HmacSHA3(message, key); -* ``` -*/ -const HmacSHA3 = Hasher._createHmacHelper(SHA3Algo); - -//#endregion -export { HmacSHA3, SHA3, SHA3Algo }; -//# sourceMappingURL=sha3.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/sha384.mjs b/client/static/crypto-es@3.1.0/sha384.mjs deleted file mode 100644 index a56cf68..0000000 --- a/client/static/crypto-es@3.1.0/sha384.mjs +++ /dev/null @@ -1,60 +0,0 @@ -import { X64Word, X64WordArray } from "./x64-core.mjs"; -import { SHA512Algo } from "./sha512.mjs"; - -//#region src/sha384.ts -/** -* SHA-384 hash algorithm. -*/ -var SHA384Algo = class extends SHA512Algo { - _doReset() { - this._hash = new X64WordArray([ - new X64Word(3418070365, 3238371032), - new X64Word(1654270250, 914150663), - new X64Word(2438529370, 812702999), - new X64Word(355462360, 4144912697), - new X64Word(1731405415, 4290775857), - new X64Word(2394180231, 1750603025), - new X64Word(3675008525, 1694076839), - new X64Word(1203062813, 3204075428) - ]); - } - _doFinalize() { - const hash = super._doFinalize.call(this); - hash.sigBytes -= 16; - return hash; - } - clone() { - const clone = super.clone.call(this); - return clone; - } -}; -/** -* Shortcut function to the hasher's object interface. -* -* @param message - The message to hash. -* @returns The hash. -* -* @example -* ```js -* const hash = SHA384('message'); -* const hash = SHA384(wordArray); -* ``` -*/ -const SHA384 = SHA512Algo._createHelper(SHA384Algo); -/** -* Shortcut function to the HMAC's object interface. -* -* @param message - The message to hash. -* @param key - The secret key. -* @returns The HMAC. -* -* @example -* ```js -* const hmac = HmacSHA384(message, key); -* ``` -*/ -const HmacSHA384 = SHA512Algo._createHmacHelper(SHA384Algo); - -//#endregion -export { HmacSHA384, SHA384, SHA384Algo }; -//# sourceMappingURL=sha384.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/sha512.mjs b/client/static/crypto-es@3.1.0/sha512.mjs deleted file mode 100644 index 8608d60..0000000 --- a/client/static/crypto-es@3.1.0/sha512.mjs +++ /dev/null @@ -1,300 +0,0 @@ -import { Hasher, Hasher64 } from "./core.mjs"; -import { X64Word, X64WordArray } from "./x64-core.mjs"; - -//#region src/sha512.ts -const K = [ - new X64Word(1116352408, 3609767458), - new X64Word(1899447441, 602891725), - new X64Word(3049323471, 3964484399), - new X64Word(3921009573, 2173295548), - new X64Word(961987163, 4081628472), - new X64Word(1508970993, 3053834265), - new X64Word(2453635748, 2937671579), - new X64Word(2870763221, 3664609560), - new X64Word(3624381080, 2734883394), - new X64Word(310598401, 1164996542), - new X64Word(607225278, 1323610764), - new X64Word(1426881987, 3590304994), - new X64Word(1925078388, 4068182383), - new X64Word(2162078206, 991336113), - new X64Word(2614888103, 633803317), - new X64Word(3248222580, 3479774868), - new X64Word(3835390401, 2666613458), - new X64Word(4022224774, 944711139), - new X64Word(264347078, 2341262773), - new X64Word(604807628, 2007800933), - new X64Word(770255983, 1495990901), - new X64Word(1249150122, 1856431235), - new X64Word(1555081692, 3175218132), - new X64Word(1996064986, 2198950837), - new X64Word(2554220882, 3999719339), - new X64Word(2821834349, 766784016), - new X64Word(2952996808, 2566594879), - new X64Word(3210313671, 3203337956), - new X64Word(3336571891, 1034457026), - new X64Word(3584528711, 2466948901), - new X64Word(113926993, 3758326383), - new X64Word(338241895, 168717936), - new X64Word(666307205, 1188179964), - new X64Word(773529912, 1546045734), - new X64Word(1294757372, 1522805485), - new X64Word(1396182291, 2643833823), - new X64Word(1695183700, 2343527390), - new X64Word(1986661051, 1014477480), - new X64Word(2177026350, 1206759142), - new X64Word(2456956037, 344077627), - new X64Word(2730485921, 1290863460), - new X64Word(2820302411, 3158454273), - new X64Word(3259730800, 3505952657), - new X64Word(3345764771, 106217008), - new X64Word(3516065817, 3606008344), - new X64Word(3600352804, 1432725776), - new X64Word(4094571909, 1467031594), - new X64Word(275423344, 851169720), - new X64Word(430227734, 3100823752), - new X64Word(506948616, 1363258195), - new X64Word(659060556, 3750685593), - new X64Word(883997877, 3785050280), - new X64Word(958139571, 3318307427), - new X64Word(1322822218, 3812723403), - new X64Word(1537002063, 2003034995), - new X64Word(1747873779, 3602036899), - new X64Word(1955562222, 1575990012), - new X64Word(2024104815, 1125592928), - new X64Word(2227730452, 2716904306), - new X64Word(2361852424, 442776044), - new X64Word(2428436474, 593698344), - new X64Word(2756734187, 3733110249), - new X64Word(3204031479, 2999351573), - new X64Word(3329325298, 3815920427), - new X64Word(3391569614, 3928383900), - new X64Word(3515267271, 566280711), - new X64Word(3940187606, 3454069534), - new X64Word(4118630271, 4000239992), - new X64Word(116418474, 1914138554), - new X64Word(174292421, 2731055270), - new X64Word(289380356, 3203993006), - new X64Word(460393269, 320620315), - new X64Word(685471733, 587496836), - new X64Word(852142971, 1086792851), - new X64Word(1017036298, 365543100), - new X64Word(1126000580, 2618297676), - new X64Word(1288033470, 3409855158), - new X64Word(1501505948, 4234509866), - new X64Word(1607167915, 987167468), - new X64Word(1816402316, 1246189591) -]; -const W = /* @__PURE__ */ (() => { - const a = []; - for (let i = 0; i < 80; i += 1) a[i] = new X64Word(); - return a; -})(); -/** -* SHA-512 hash algorithm. -*/ -var SHA512Algo = class extends Hasher64 { - constructor(cfg) { - super(cfg); - this.blockSize = 1024 / 32; - } - _doReset() { - this._hash = new X64WordArray([ - new X64Word(1779033703, 4089235720), - new X64Word(3144134277, 2227873595), - new X64Word(1013904242, 4271175723), - new X64Word(2773480762, 1595750129), - new X64Word(1359893119, 2917565137), - new X64Word(2600822924, 725511199), - new X64Word(528734635, 4215389547), - new X64Word(1541459225, 327033209) - ]); - } - _doProcessBlock(M, offset) { - const H = this._hash.words; - const H0 = H[0]; - const H1 = H[1]; - const H2 = H[2]; - const H3 = H[3]; - const H4 = H[4]; - const H5 = H[5]; - const H6 = H[6]; - const H7 = H[7]; - const H0h = H0.high; - let H0l = H0.low; - const H1h = H1.high; - let H1l = H1.low; - const H2h = H2.high; - let H2l = H2.low; - const H3h = H3.high; - let H3l = H3.low; - const H4h = H4.high; - let H4l = H4.low; - const H5h = H5.high; - let H5l = H5.low; - const H6h = H6.high; - let H6l = H6.low; - const H7h = H7.high; - let H7l = H7.low; - let ah = H0h; - let al = H0l; - let bh = H1h; - let bl = H1l; - let ch = H2h; - let cl = H2l; - let dh = H3h; - let dl = H3l; - let eh = H4h; - let el = H4l; - let fh = H5h; - let fl = H5l; - let gh = H6h; - let gl = H6l; - let hh = H7h; - let hl = H7l; - for (let i = 0; i < 80; i += 1) { - let Wil; - let Wih; - const Wi = W[i]; - if (i < 16) { - Wi.high = M[offset + i * 2] | 0; - Wih = Wi.high; - Wi.low = M[offset + i * 2 + 1] | 0; - Wil = Wi.low; - } else { - const gamma0x = W[i - 15]; - const gamma0xh = gamma0x.high; - const gamma0xl = gamma0x.low; - const gamma0h = (gamma0xh >>> 1 | gamma0xl << 31) ^ (gamma0xh >>> 8 | gamma0xl << 24) ^ gamma0xh >>> 7; - const gamma0l = (gamma0xl >>> 1 | gamma0xh << 31) ^ (gamma0xl >>> 8 | gamma0xh << 24) ^ (gamma0xl >>> 7 | gamma0xh << 25); - const gamma1x = W[i - 2]; - const gamma1xh = gamma1x.high; - const gamma1xl = gamma1x.low; - const gamma1h = (gamma1xh >>> 19 | gamma1xl << 13) ^ (gamma1xh << 3 | gamma1xl >>> 29) ^ gamma1xh >>> 6; - const gamma1l = (gamma1xl >>> 19 | gamma1xh << 13) ^ (gamma1xl << 3 | gamma1xh >>> 29) ^ (gamma1xl >>> 6 | gamma1xh << 26); - const Wi7 = W[i - 7]; - const Wi7h = Wi7.high; - const Wi7l = Wi7.low; - const Wi16 = W[i - 16]; - const Wi16h = Wi16.high; - const Wi16l = Wi16.low; - Wil = gamma0l + Wi7l; - Wih = gamma0h + Wi7h + (Wil >>> 0 < gamma0l >>> 0 ? 1 : 0); - Wil += gamma1l; - Wih = Wih + gamma1h + (Wil >>> 0 < gamma1l >>> 0 ? 1 : 0); - Wil += Wi16l; - Wih = Wih + Wi16h + (Wil >>> 0 < Wi16l >>> 0 ? 1 : 0); - Wi.high = Wih; - Wi.low = Wil; - } - const chh = eh & fh ^ ~eh & gh; - const chl = el & fl ^ ~el & gl; - const majh = ah & bh ^ ah & ch ^ bh & ch; - const majl = al & bl ^ al & cl ^ bl & cl; - const sigma0h = (ah >>> 28 | al << 4) ^ (ah << 30 | al >>> 2) ^ (ah << 25 | al >>> 7); - const sigma0l = (al >>> 28 | ah << 4) ^ (al << 30 | ah >>> 2) ^ (al << 25 | ah >>> 7); - const sigma1h = (eh >>> 14 | el << 18) ^ (eh >>> 18 | el << 14) ^ (eh << 23 | el >>> 9); - const sigma1l = (el >>> 14 | eh << 18) ^ (el >>> 18 | eh << 14) ^ (el << 23 | eh >>> 9); - const Ki = K[i]; - const Kih = Ki.high; - const Kil = Ki.low; - let t1l = hl + sigma1l; - let t1h = hh + sigma1h + (t1l >>> 0 < hl >>> 0 ? 1 : 0); - t1l += chl; - t1h = t1h + chh + (t1l >>> 0 < chl >>> 0 ? 1 : 0); - t1l += Kil; - t1h = t1h + Kih + (t1l >>> 0 < Kil >>> 0 ? 1 : 0); - t1l += Wil; - t1h = t1h + Wih + (t1l >>> 0 < Wil >>> 0 ? 1 : 0); - const t2l = sigma0l + majl; - const t2h = sigma0h + majh + (t2l >>> 0 < sigma0l >>> 0 ? 1 : 0); - hh = gh; - hl = gl; - gh = fh; - gl = fl; - fh = eh; - fl = el; - el = dl + t1l | 0; - eh = dh + t1h + (el >>> 0 < dl >>> 0 ? 1 : 0) | 0; - dh = ch; - dl = cl; - ch = bh; - cl = bl; - bh = ah; - bl = al; - al = t1l + t2l | 0; - ah = t1h + t2h + (al >>> 0 < t1l >>> 0 ? 1 : 0) | 0; - } - H0.low = H0l + al; - H0l = H0.low; - H0.high = H0h + ah + (H0l >>> 0 < al >>> 0 ? 1 : 0); - H1.low = H1l + bl; - H1l = H1.low; - H1.high = H1h + bh + (H1l >>> 0 < bl >>> 0 ? 1 : 0); - H2.low = H2l + cl; - H2l = H2.low; - H2.high = H2h + ch + (H2l >>> 0 < cl >>> 0 ? 1 : 0); - H3.low = H3l + dl; - H3l = H3.low; - H3.high = H3h + dh + (H3l >>> 0 < dl >>> 0 ? 1 : 0); - H4.low = H4l + el; - H4l = H4.low; - H4.high = H4h + eh + (H4l >>> 0 < el >>> 0 ? 1 : 0); - H5.low = H5l + fl; - H5l = H5.low; - H5.high = H5h + fh + (H5l >>> 0 < fl >>> 0 ? 1 : 0); - H6.low = H6l + gl; - H6l = H6.low; - H6.high = H6h + gh + (H6l >>> 0 < gl >>> 0 ? 1 : 0); - H7.low = H7l + hl; - H7l = H7.low; - H7.high = H7h + hh + (H7l >>> 0 < hl >>> 0 ? 1 : 0); - } - _doFinalize() { - const data = this._data; - const dataWords = data.words; - const nBitsTotal = this._nDataBytes * 8; - const nBitsLeft = data.sigBytes * 8; - dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32; - dataWords[(nBitsLeft + 128 >>> 10 << 5) + 30] = Math.floor(nBitsTotal / 4294967296); - dataWords[(nBitsLeft + 128 >>> 10 << 5) + 31] = nBitsTotal; - data.sigBytes = dataWords.length * 4; - this._process(); - const hash = this._hash.toX32(); - return hash; - } - clone() { - const clone = super.clone.call(this); - clone._hash = this._hash.clone(); - return clone; - } -}; -/** -* Shortcut function to the hasher's object interface. -* -* @param message - The message to hash. -* @returns The hash. -* -* @example -* ```js -* const hash = SHA512('message'); -* const hash = SHA512(wordArray); -* ``` -*/ -const SHA512 = Hasher._createHelper(SHA512Algo); -/** -* Shortcut function to the HMAC's object interface. -* -* @param message - The message to hash. -* @param key - The secret key. -* @returns The HMAC. -* -* @example -* ```js -* const hmac = HmacSHA512(message, key); -* ``` -*/ -const HmacSHA512 = Hasher._createHmacHelper(SHA512Algo); - -//#endregion -export { HmacSHA512, SHA512, SHA512Algo }; -//# sourceMappingURL=sha512.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/tripledes.mjs b/client/static/crypto-es@3.1.0/tripledes.mjs deleted file mode 100644 index d35bc44..0000000 --- a/client/static/crypto-es@3.1.0/tripledes.mjs +++ /dev/null @@ -1,822 +0,0 @@ -import { WordArray } from "./core.mjs"; -import { BlockCipher } from "./cipher-core.mjs"; - -//#region src/tripledes.ts -const PC1 = [ - 57, - 49, - 41, - 33, - 25, - 17, - 9, - 1, - 58, - 50, - 42, - 34, - 26, - 18, - 10, - 2, - 59, - 51, - 43, - 35, - 27, - 19, - 11, - 3, - 60, - 52, - 44, - 36, - 63, - 55, - 47, - 39, - 31, - 23, - 15, - 7, - 62, - 54, - 46, - 38, - 30, - 22, - 14, - 6, - 61, - 53, - 45, - 37, - 29, - 21, - 13, - 5, - 28, - 20, - 12, - 4 -]; -const PC2 = [ - 14, - 17, - 11, - 24, - 1, - 5, - 3, - 28, - 15, - 6, - 21, - 10, - 23, - 19, - 12, - 4, - 26, - 8, - 16, - 7, - 27, - 20, - 13, - 2, - 41, - 52, - 31, - 37, - 47, - 55, - 30, - 40, - 51, - 45, - 33, - 48, - 44, - 49, - 39, - 56, - 34, - 53, - 46, - 42, - 50, - 36, - 29, - 32 -]; -const BIT_SHIFTS = [ - 1, - 2, - 4, - 6, - 8, - 10, - 12, - 14, - 15, - 17, - 19, - 21, - 23, - 25, - 27, - 28 -]; -const SBOX_P = [ - { - 0: 8421888, - 268435456: 32768, - 536870912: 8421378, - 805306368: 2, - 1073741824: 512, - 1342177280: 8421890, - 1610612736: 8389122, - 1879048192: 8388608, - 2147483648: 514, - 2415919104: 8389120, - 2684354560: 33280, - 2952790016: 8421376, - 3221225472: 32770, - 3489660928: 8388610, - 3758096384: 0, - 4026531840: 33282, - 134217728: 0, - 402653184: 8421890, - 671088640: 33282, - 939524096: 32768, - 1207959552: 8421888, - 1476395008: 512, - 1744830464: 8421378, - 2013265920: 2, - 2281701376: 8389120, - 2550136832: 33280, - 2818572288: 8421376, - 3087007744: 8389122, - 3355443200: 8388610, - 3623878656: 32770, - 3892314112: 514, - 4160749568: 8388608, - 1: 32768, - 268435457: 2, - 536870913: 8421888, - 805306369: 8388608, - 1073741825: 8421378, - 1342177281: 33280, - 1610612737: 512, - 1879048193: 8389122, - 2147483649: 8421890, - 2415919105: 8421376, - 2684354561: 8388610, - 2952790017: 33282, - 3221225473: 514, - 3489660929: 8389120, - 3758096385: 32770, - 4026531841: 0, - 134217729: 8421890, - 402653185: 8421376, - 671088641: 8388608, - 939524097: 512, - 1207959553: 32768, - 1476395009: 8388610, - 1744830465: 2, - 2013265921: 33282, - 2281701377: 32770, - 2550136833: 8389122, - 2818572289: 514, - 3087007745: 8421888, - 3355443201: 8389120, - 3623878657: 0, - 3892314113: 33280, - 4160749569: 8421378 - }, - { - 0: 1074282512, - 16777216: 16384, - 33554432: 524288, - 50331648: 1074266128, - 67108864: 1073741840, - 83886080: 1074282496, - 100663296: 1073758208, - 117440512: 16, - 134217728: 540672, - 150994944: 1073758224, - 167772160: 1073741824, - 184549376: 540688, - 201326592: 524304, - 218103808: 0, - 234881024: 16400, - 251658240: 1074266112, - 8388608: 1073758208, - 25165824: 540688, - 41943040: 16, - 58720256: 1073758224, - 75497472: 1074282512, - 92274688: 1073741824, - 109051904: 524288, - 125829120: 1074266128, - 142606336: 524304, - 159383552: 0, - 176160768: 16384, - 192937984: 1074266112, - 209715200: 1073741840, - 226492416: 540672, - 243269632: 1074282496, - 260046848: 16400, - 268435456: 0, - 285212672: 1074266128, - 301989888: 1073758224, - 318767104: 1074282496, - 335544320: 1074266112, - 352321536: 16, - 369098752: 540688, - 385875968: 16384, - 402653184: 16400, - 419430400: 524288, - 436207616: 524304, - 452984832: 1073741840, - 469762048: 540672, - 486539264: 1073758208, - 503316480: 1073741824, - 520093696: 1074282512, - 276824064: 540688, - 293601280: 524288, - 310378496: 1074266112, - 327155712: 16384, - 343932928: 1073758208, - 360710144: 1074282512, - 377487360: 16, - 394264576: 1073741824, - 411041792: 1074282496, - 427819008: 1073741840, - 444596224: 1073758224, - 461373440: 524304, - 478150656: 0, - 494927872: 16400, - 511705088: 1074266128, - 528482304: 540672 - }, - { - 0: 260, - 1048576: 0, - 2097152: 67109120, - 3145728: 65796, - 4194304: 65540, - 5242880: 67108868, - 6291456: 67174660, - 7340032: 67174400, - 8388608: 67108864, - 9437184: 67174656, - 10485760: 65792, - 11534336: 67174404, - 12582912: 67109124, - 13631488: 65536, - 14680064: 4, - 15728640: 256, - 524288: 67174656, - 1572864: 67174404, - 2621440: 0, - 3670016: 67109120, - 4718592: 67108868, - 5767168: 65536, - 6815744: 65540, - 7864320: 260, - 8912896: 4, - 9961472: 256, - 11010048: 67174400, - 12058624: 65796, - 13107200: 65792, - 14155776: 67109124, - 15204352: 67174660, - 16252928: 67108864, - 16777216: 67174656, - 17825792: 65540, - 18874368: 65536, - 19922944: 67109120, - 20971520: 256, - 22020096: 67174660, - 23068672: 67108868, - 24117248: 0, - 25165824: 67109124, - 26214400: 67108864, - 27262976: 4, - 28311552: 65792, - 29360128: 67174400, - 30408704: 260, - 31457280: 65796, - 32505856: 67174404, - 17301504: 67108864, - 18350080: 260, - 19398656: 67174656, - 20447232: 0, - 21495808: 65540, - 22544384: 67109120, - 23592960: 256, - 24641536: 67174404, - 25690112: 65536, - 26738688: 67174660, - 27787264: 65796, - 28835840: 67108868, - 29884416: 67109124, - 30932992: 67174400, - 31981568: 4, - 33030144: 65792 - }, - { - 0: 2151682048, - 65536: 2147487808, - 131072: 4198464, - 196608: 2151677952, - 262144: 0, - 327680: 4198400, - 393216: 2147483712, - 458752: 4194368, - 524288: 2147483648, - 589824: 4194304, - 655360: 64, - 720896: 2147487744, - 786432: 2151678016, - 851968: 4160, - 917504: 4096, - 983040: 2151682112, - 32768: 2147487808, - 98304: 64, - 163840: 2151678016, - 229376: 2147487744, - 294912: 4198400, - 360448: 2151682112, - 425984: 0, - 491520: 2151677952, - 557056: 4096, - 622592: 2151682048, - 688128: 4194304, - 753664: 4160, - 819200: 2147483648, - 884736: 4194368, - 950272: 4198464, - 1015808: 2147483712, - 1048576: 4194368, - 1114112: 4198400, - 1179648: 2147483712, - 1245184: 0, - 1310720: 4160, - 1376256: 2151678016, - 1441792: 2151682048, - 1507328: 2147487808, - 1572864: 2151682112, - 1638400: 2147483648, - 1703936: 2151677952, - 1769472: 4198464, - 1835008: 2147487744, - 1900544: 4194304, - 1966080: 64, - 2031616: 4096, - 1081344: 2151677952, - 1146880: 2151682112, - 1212416: 0, - 1277952: 4198400, - 1343488: 4194368, - 1409024: 2147483648, - 1474560: 2147487808, - 1540096: 64, - 1605632: 2147483712, - 1671168: 4096, - 1736704: 2147487744, - 1802240: 2151678016, - 1867776: 4160, - 1933312: 2151682048, - 1998848: 4194304, - 2064384: 4198464 - }, - { - 0: 128, - 4096: 17039360, - 8192: 262144, - 12288: 536870912, - 16384: 537133184, - 20480: 16777344, - 24576: 553648256, - 28672: 262272, - 32768: 16777216, - 36864: 537133056, - 40960: 536871040, - 45056: 553910400, - 49152: 553910272, - 53248: 0, - 57344: 17039488, - 61440: 553648128, - 2048: 17039488, - 6144: 553648256, - 10240: 128, - 14336: 17039360, - 18432: 262144, - 22528: 537133184, - 26624: 553910272, - 30720: 536870912, - 34816: 537133056, - 38912: 0, - 43008: 553910400, - 47104: 16777344, - 51200: 536871040, - 55296: 553648128, - 59392: 16777216, - 63488: 262272, - 65536: 262144, - 69632: 128, - 73728: 536870912, - 77824: 553648256, - 81920: 16777344, - 86016: 553910272, - 90112: 537133184, - 94208: 16777216, - 98304: 553910400, - 102400: 553648128, - 106496: 17039360, - 110592: 537133056, - 114688: 262272, - 118784: 536871040, - 122880: 0, - 126976: 17039488, - 67584: 553648256, - 71680: 16777216, - 75776: 17039360, - 79872: 537133184, - 83968: 536870912, - 88064: 17039488, - 92160: 128, - 96256: 553910272, - 100352: 262272, - 104448: 553910400, - 108544: 0, - 112640: 553648128, - 116736: 16777344, - 120832: 262144, - 124928: 537133056, - 129024: 536871040 - }, - { - 0: 268435464, - 256: 8192, - 512: 270532608, - 768: 270540808, - 1024: 268443648, - 1280: 2097152, - 1536: 2097160, - 1792: 268435456, - 2048: 0, - 2304: 268443656, - 2560: 2105344, - 2816: 8, - 3072: 270532616, - 3328: 2105352, - 3584: 8200, - 3840: 270540800, - 128: 270532608, - 384: 270540808, - 640: 8, - 896: 2097152, - 1152: 2105352, - 1408: 268435464, - 1664: 268443648, - 1920: 8200, - 2176: 2097160, - 2432: 8192, - 2688: 268443656, - 2944: 270532616, - 3200: 0, - 3456: 270540800, - 3712: 2105344, - 3968: 268435456, - 4096: 268443648, - 4352: 270532616, - 4608: 270540808, - 4864: 8200, - 5120: 2097152, - 5376: 268435456, - 5632: 268435464, - 5888: 2105344, - 6144: 2105352, - 6400: 0, - 6656: 8, - 6912: 270532608, - 7168: 8192, - 7424: 268443656, - 7680: 270540800, - 7936: 2097160, - 4224: 8, - 4480: 2105344, - 4736: 2097152, - 4992: 268435464, - 5248: 268443648, - 5504: 8200, - 5760: 270540808, - 6016: 270532608, - 6272: 270540800, - 6528: 270532616, - 6784: 8192, - 7040: 2105352, - 7296: 2097160, - 7552: 0, - 7808: 268435456, - 8064: 268443656 - }, - { - 0: 1048576, - 16: 33555457, - 32: 1024, - 48: 1049601, - 64: 34604033, - 80: 0, - 96: 1, - 112: 34603009, - 128: 33555456, - 144: 1048577, - 160: 33554433, - 176: 34604032, - 192: 34603008, - 208: 1025, - 224: 1049600, - 240: 33554432, - 8: 34603009, - 24: 0, - 40: 33555457, - 56: 34604032, - 72: 1048576, - 88: 33554433, - 104: 33554432, - 120: 1025, - 136: 1049601, - 152: 33555456, - 168: 34603008, - 184: 1048577, - 200: 1024, - 216: 34604033, - 232: 1, - 248: 1049600, - 256: 33554432, - 272: 1048576, - 288: 33555457, - 304: 34603009, - 320: 1048577, - 336: 33555456, - 352: 34604032, - 368: 1049601, - 384: 1025, - 400: 34604033, - 416: 1049600, - 432: 1, - 448: 0, - 464: 34603008, - 480: 33554433, - 496: 1024, - 264: 1049600, - 280: 33555457, - 296: 34603009, - 312: 1, - 328: 33554432, - 344: 1048576, - 360: 1025, - 376: 34604032, - 392: 33554433, - 408: 34603008, - 424: 0, - 440: 34604033, - 456: 1049601, - 472: 1024, - 488: 33555456, - 504: 1048577 - }, - { - 0: 134219808, - 1: 131072, - 2: 134217728, - 3: 32, - 4: 131104, - 5: 134350880, - 6: 134350848, - 7: 2048, - 8: 134348800, - 9: 134219776, - 10: 133120, - 11: 134348832, - 12: 2080, - 13: 0, - 14: 134217760, - 15: 133152, - 2147483648: 2048, - 2147483649: 134350880, - 2147483650: 134219808, - 2147483651: 134217728, - 2147483652: 134348800, - 2147483653: 133120, - 2147483654: 133152, - 2147483655: 32, - 2147483656: 134217760, - 2147483657: 2080, - 2147483658: 131104, - 2147483659: 134350848, - 2147483660: 0, - 2147483661: 134348832, - 2147483662: 134219776, - 2147483663: 131072, - 16: 133152, - 17: 134350848, - 18: 32, - 19: 2048, - 20: 134219776, - 21: 134217760, - 22: 134348832, - 23: 131072, - 24: 0, - 25: 131104, - 26: 134348800, - 27: 134219808, - 28: 134350880, - 29: 133120, - 30: 2080, - 31: 134217728, - 2147483664: 131072, - 2147483665: 2048, - 2147483666: 134348832, - 2147483667: 133152, - 2147483668: 32, - 2147483669: 134348800, - 2147483670: 134217728, - 2147483671: 134219808, - 2147483672: 134350880, - 2147483673: 134217760, - 2147483674: 134219776, - 2147483675: 0, - 2147483676: 133120, - 2147483677: 2080, - 2147483678: 131104, - 2147483679: 134350848 - } -]; -const SBOX_MASK = [ - 4160749569, - 528482304, - 33030144, - 2064384, - 129024, - 8064, - 504, - 2147483679 -]; -function exchangeLR(offset, mask) { - if (this._lBlock === void 0 || this._rBlock === void 0) throw new Error("Block values not initialized"); - const t = (this._lBlock >>> offset ^ this._rBlock) & mask; - this._rBlock ^= t; - this._lBlock ^= t << offset; -} -function exchangeRL(offset, mask) { - if (this._lBlock === void 0 || this._rBlock === void 0) throw new Error("Block values not initialized"); - const t = (this._rBlock >>> offset ^ this._lBlock) & mask; - this._lBlock ^= t; - this._rBlock ^= t << offset; -} -/** -* DES block cipher algorithm. -*/ -var DESAlgo = class extends BlockCipher { - /** Key size in 32-bit words */ - static keySize = 64 / 32; - /** IV size in 32-bit words */ - static ivSize = 64 / 32; - /** Subkeys for encryption */ - _subKeys; - /** Inverse subkeys for decryption */ - _invSubKeys; - /** Left block for processing */ - _lBlock; - /** Right block for processing */ - _rBlock; - constructor(xformMode, key, cfg) { - super(xformMode, key, cfg); - this.blockSize = 64 / 32; - } - _doReset() { - const key = this._key; - const keyWords = key.words; - const keyBits = []; - for (let i = 0; i < 56; i += 1) { - const keyBitPos = PC1[i] - 1; - keyBits[i] = keyWords[keyBitPos >>> 5] >>> 31 - keyBitPos % 32 & 1; - } - this._subKeys = []; - const subKeys = this._subKeys; - for (let nSubKey = 0; nSubKey < 16; nSubKey += 1) { - subKeys[nSubKey] = []; - const subKey = subKeys[nSubKey]; - const bitShift = BIT_SHIFTS[nSubKey]; - for (let i = 0; i < 24; i += 1) { - subKey[i / 6 | 0] |= keyBits[(PC2[i] - 1 + bitShift) % 28] << 31 - i % 6; - subKey[4 + (i / 6 | 0)] |= keyBits[28 + (PC2[i + 24] - 1 + bitShift) % 28] << 31 - i % 6; - } - subKey[0] = subKey[0] << 1 | subKey[0] >>> 31; - for (let i = 1; i < 7; i += 1) subKey[i] >>>= (i - 1) * 4 + 3; - subKey[7] = subKey[7] << 5 | subKey[7] >>> 27; - } - this._invSubKeys = []; - const invSubKeys = this._invSubKeys; - for (let i = 0; i < 16; i += 1) invSubKeys[i] = subKeys[15 - i]; - } - encryptBlock(M, offset) { - this._doCryptBlock(M, offset, this._subKeys); - } - decryptBlock(M, offset) { - this._doCryptBlock(M, offset, this._invSubKeys); - } - _doCryptBlock(M, offset, subKeys) { - const _M = M; - this._lBlock = M[offset]; - this._rBlock = M[offset + 1]; - exchangeLR.call(this, 4, 252645135); - exchangeLR.call(this, 16, 65535); - exchangeRL.call(this, 2, 858993459); - exchangeRL.call(this, 8, 16711935); - exchangeLR.call(this, 1, 1431655765); - for (let round = 0; round < 16; round += 1) { - const subKey = subKeys[round]; - const lBlock = this._lBlock; - const rBlock = this._rBlock; - let f = 0; - for (let i = 0; i < 8; i += 1) f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; - this._lBlock = rBlock; - this._rBlock = lBlock ^ f; - } - const t = this._lBlock; - this._lBlock = this._rBlock; - this._rBlock = t; - exchangeLR.call(this, 1, 1431655765); - exchangeRL.call(this, 8, 16711935); - exchangeRL.call(this, 2, 858993459); - exchangeLR.call(this, 16, 65535); - exchangeLR.call(this, 4, 252645135); - _M[offset] = this._lBlock; - _M[offset + 1] = this._rBlock; - } -}; -/** -* Shortcut functions to the cipher's object interface. -* -* @example -* -* var ciphertext = DES.encrypt(message, key, cfg); -* var plaintext = DES.decrypt(ciphertext, key, cfg); -*/ -const DES = BlockCipher._createHelper(DESAlgo); -/** -* Triple-DES block cipher algorithm. -*/ -var TripleDESAlgo = class extends BlockCipher { - /** Key size in 32-bit words */ - static keySize = 192 / 32; - /** IV size in 32-bit words */ - static ivSize = 64 / 32; - /** First DES instance */ - _des1; - /** Second DES instance */ - _des2; - /** Third DES instance */ - _des3; - _doReset() { - const key = this._key; - const keyWords = key.words; - if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192."); - const key1 = keyWords.slice(0, 2); - const key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4); - const key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6); - this._des1 = DESAlgo.createEncryptor(WordArray.create(key1)); - this._des2 = DESAlgo.createEncryptor(WordArray.create(key2)); - this._des3 = DESAlgo.createEncryptor(WordArray.create(key3)); - } - encryptBlock(M, offset) { - this._des1.encryptBlock(M, offset); - this._des2.decryptBlock(M, offset); - this._des3.encryptBlock(M, offset); - } - decryptBlock(M, offset) { - this._des3.decryptBlock(M, offset); - this._des2.encryptBlock(M, offset); - this._des1.decryptBlock(M, offset); - } -}; -/** -* Shortcut functions to the cipher's object interface. -* -* @example -* -* var ciphertext = TripleDES.encrypt(message, key, cfg); -* var plaintext = TripleDES.decrypt(ciphertext, key, cfg); -*/ -const TripleDES = BlockCipher._createHelper(TripleDESAlgo); - -//#endregion -export { DES, DESAlgo, TripleDES, TripleDESAlgo }; -//# sourceMappingURL=tripledes.mjs.map \ No newline at end of file diff --git a/client/static/crypto-es@3.1.0/x64-core.mjs b/client/static/crypto-es@3.1.0/x64-core.mjs deleted file mode 100644 index 2e3fd26..0000000 --- a/client/static/crypto-es@3.1.0/x64-core.mjs +++ /dev/null @@ -1,132 +0,0 @@ -import { Base, WordArray } from "./core.mjs"; - -//#region src/x64-core.ts -/** -* A 64-bit word representation. -* Stores a 64-bit value as two 32-bit words due to JavaScript's number limitations. -* -* @property high - The high 32 bits -* @property low - The low 32 bits -*/ -var X64Word = class extends Base { - /** The high 32 bits of the 64-bit word */ - high; - /** The low 32 bits of the 64-bit word */ - low; - /** - * Initializes a newly created 64-bit word. - * - * @param high - The high 32 bits (default: 0) - * @param low - The low 32 bits (default: 0) - * @example - * ```javascript - * const x64Word = new X64Word(0x00010203, 0x04050607); - * const x64Word = X64Word.create(0x00010203, 0x04050607); - * ``` - */ - constructor(high = 0, low = 0) { - super(); - this.high = high; - this.low = low; - } - /** - * Creates a copy of this word. - * - * @returns The cloned 64-bit word - * @example - * ```javascript - * const clone = x64Word.clone(); - * ``` - */ - clone() { - const clone = super.clone(); - clone.high = this.high; - clone.low = this.low; - return clone; - } -}; -/** -* An array of 64-bit words. -* This is used for algorithms that operate on 64-bit words, such as SHA-512. -* -* @property words - The array of X64Word objects -* @property sigBytes - The number of significant bytes in this word array -*/ -var X64WordArray = class X64WordArray extends Base { - /** The array of X64Word objects */ - words; - /** The number of significant bytes in this word array */ - sigBytes; - /** - * Initializes a newly created 64-bit word array. - * - * @param words - An array of X64Word objects - * @param sigBytes - The number of significant bytes in the words (defaults to words.length * 8) - * @example - * ```javascript - * const wordArray = new X64WordArray(); - * - * const wordArray = new X64WordArray([ - * new X64Word(0x00010203, 0x04050607), - * new X64Word(0x18191a1b, 0x1c1d1e1f) - * ]); - * - * const wordArray = new X64WordArray([ - * new X64Word(0x00010203, 0x04050607), - * new X64Word(0x18191a1b, 0x1c1d1e1f) - * ], 10); - * ``` - */ - constructor(words = [], sigBytes = words.length * 8) { - super(); - this.words = words; - this.sigBytes = sigBytes; - } - static create(...args) { - const [words, sigBytes] = args; - return new X64WordArray(words, sigBytes); - } - /** - * Converts this 64-bit word array to a 32-bit word array. - * Each 64-bit word is split into two 32-bit words (high and low). - * - * @returns This word array's data as a 32-bit word array - * @example - * ```javascript - * const x32WordArray = x64WordArray.toX32(); - * ``` - */ - toX32() { - const x64Words = this.words; - const x64WordsLength = x64Words.length; - const x32Words = []; - for (let i = 0; i < x64WordsLength; i += 1) { - const x64Word = x64Words[i]; - x32Words.push(x64Word.high); - x32Words.push(x64Word.low); - } - return WordArray.create(x32Words, this.sigBytes); - } - /** - * Creates a deep copy of this word array. - * Clones both the array and each X64Word object within it. - * - * @returns The cloned X64WordArray - * @example - * ```javascript - * const clone = x64WordArray.clone(); - * ``` - */ - clone() { - const clone = super.clone(); - clone.words = this.words.slice(0); - const { words } = clone; - const wordsLength = words.length; - for (let i = 0; i < wordsLength; i += 1) words[i] = words[i].clone(); - return clone; - } -}; - -//#endregion -export { X64Word, X64WordArray }; -//# sourceMappingURL=x64-core.mjs.map \ No newline at end of file diff --git a/client/static/jquery-3.7.1.min.js b/client/static/jquery-3.7.1.min.js deleted file mode 100644 index 7f37b5d..0000000 --- a/client/static/jquery-3.7.1.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",le.option=!!xe.lastChild;var ke={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0li,.mdui-prose ul>li{padding-left:.375em}.mdui-prose ol>li>p,.mdui-prose ul>li>p{margin-top:.75em;margin-bottom:.75em}.mdui-prose ol>li>:first-child,.mdui-prose ul>li>:first-child{margin-top:1.25em}.mdui-prose ol>li>:last-child,.mdui-prose ul>li>:last-child{margin-bottom:1.25em}.mdui-prose ol>li::marker{font-weight:400;color:rgb(var(--mdui-color-on-surface-variant))}.mdui-prose ul>li::marker{color:rgb(var(--mdui-color-on-surface-variant))}.mdui-prose ol ol,.mdui-prose ol ul,.mdui-prose ul ol,.mdui-prose ul ul{margin-top:.75em;margin-bottom:.75em}.mdui-prose fieldset,.mdui-prose img{border:none}.mdui-prose figure,.mdui-prose img,.mdui-prose video{margin-top:2em;margin-bottom:2em;max-width:100%}.mdui-prose figure>*{margin-top:0;margin-bottom:0}.mdui-prose figcaption{font-size:.875em;line-height:1.4286;margin-top:.8571em;color:rgb(var(--mdui-color-on-surface-variant))}.mdui-prose figcaption:empty::before{z-index:-1;cursor:text;content:attr(placeholder);color:rgb(var(--mdui-color-on-surface-variant))}.mdui-prose table{margin-top:2em;margin-bottom:2em;border:.0625rem solid rgb(var(--mdui-color-surface-variant));border-radius:var(--mdui-shape-corner-large)}.mdui-table{width:100%;overflow-x:auto;margin-top:2em;margin-bottom:2em;border:.0625rem solid rgb(var(--mdui-color-surface-variant));border-radius:var(--mdui-shape-corner-large)}.mdui-table table{margin-top:0;margin-bottom:0;border:none;border-radius:0}.mdui-prose table,.mdui-table table{width:100%;text-align:left;border-collapse:collapse;border-spacing:0}.mdui-prose td,.mdui-prose th,.mdui-table td,.mdui-table th{border-top:.0625rem solid rgb(var(--mdui-color-surface-variant))}.mdui-prose td:not(:first-child),.mdui-prose th:not(:first-child),.mdui-table td:not(:first-child),.mdui-table th:not(:first-child){border-left:.0625rem solid rgb(var(--mdui-color-surface-variant))}.mdui-prose td:not(:last-child),.mdui-prose th:not(:last-child),.mdui-table td:not(:last-child),.mdui-table th:not(:last-child){border-right:.0625rem solid rgb(var(--mdui-color-surface-variant))}.mdui-prose tfoot td,.mdui-prose tfoot th,.mdui-prose thead td,.mdui-prose thead th,.mdui-table tfoot td,.mdui-table tfoot th,.mdui-table thead td,.mdui-table thead th{position:relative;vertical-align:middle;padding:1.125rem 1rem;font-weight:var(--mdui-typescale-title-medium-weight);letter-spacing:var(--mdui-typescale-title-medium-tracking);line-height:var(--mdui-typescale-title-medium-line-height);color:rgb(var(--mdui-color-on-surface-variant));box-shadow:var(--mdui-elevation-level1)}.mdui-prose tbody td,.mdui-prose tbody th,.mdui-table tbody td,.mdui-table tbody th{padding:.875rem 1rem}.mdui-prose tbody th,.mdui-table tbody th{vertical-align:middle;font-weight:inherit}.mdui-prose tbody td,.mdui-table tbody td{vertical-align:baseline}.mdui-prose tbody:first-child tr:first-child td,.mdui-prose thead:first-child tr:first-child th,.mdui-table tbody:first-child tr:first-child td,.mdui-table thead:first-child tr:first-child th{border-top:0}:root{--mdui-shape-corner-none:0;--mdui-shape-corner-extra-small:0.25rem;--mdui-shape-corner-small:0.5rem;--mdui-shape-corner-medium:0.75rem;--mdui-shape-corner-large:1rem;--mdui-shape-corner-extra-large:1.75rem;--mdui-shape-corner-full:1000rem}:root{--mdui-state-layer-hover:0.08;--mdui-state-layer-focus:0.12;--mdui-state-layer-pressed:0.12;--mdui-state-layer-dragged:0.16}:root{--mdui-typescale-display-large-weight:400;--mdui-typescale-display-medium-weight:400;--mdui-typescale-display-small-weight:400;--mdui-typescale-display-large-line-height:4rem;--mdui-typescale-display-medium-line-height:3.25rem;--mdui-typescale-display-small-line-height:2.75rem;--mdui-typescale-display-large-size:3.5625rem;--mdui-typescale-display-medium-size:2.8125rem;--mdui-typescale-display-small-size:2.25rem;--mdui-typescale-display-large-tracking:0rem;--mdui-typescale-display-medium-tracking:0rem;--mdui-typescale-display-small-tracking:0rem;--mdui-typescale-headline-large-weight:400;--mdui-typescale-headline-medium-weight:400;--mdui-typescale-headline-small-weight:400;--mdui-typescale-headline-large-line-height:2.5rem;--mdui-typescale-headline-medium-line-height:2.25rem;--mdui-typescale-headline-small-line-height:2rem;--mdui-typescale-headline-large-size:2rem;--mdui-typescale-headline-medium-size:1.75rem;--mdui-typescale-headline-small-size:1.5rem;--mdui-typescale-headline-large-tracking:0rem;--mdui-typescale-headline-medium-tracking:0rem;--mdui-typescale-headline-small-tracking:0rem;--mdui-typescale-title-large-weight:400;--mdui-typescale-title-medium-weight:500;--mdui-typescale-title-small-weight:500;--mdui-typescale-title-large-line-height:1.75rem;--mdui-typescale-title-medium-line-height:1.5rem;--mdui-typescale-title-small-line-height:1.25rem;--mdui-typescale-title-large-size:1.375rem;--mdui-typescale-title-medium-size:1rem;--mdui-typescale-title-small-size:0.875rem;--mdui-typescale-title-large-tracking:0rem;--mdui-typescale-title-medium-tracking:0.009375rem;--mdui-typescale-title-small-tracking:0.00625rem;--mdui-typescale-label-large-weight:500;--mdui-typescale-label-medium-weight:500;--mdui-typescale-label-small-weight:500;--mdui-typescale-label-large-line-height:1.25rem;--mdui-typescale-label-medium-line-height:1rem;--mdui-typescale-label-small-line-height:0.375rem;--mdui-typescale-label-large-size:0.875rem;--mdui-typescale-label-medium-size:0.75rem;--mdui-typescale-label-small-size:0.6875rem;--mdui-typescale-label-large-tracking:0.00625rem;--mdui-typescale-label-medium-tracking:0.03125rem;--mdui-typescale-label-small-tracking:0.03125rem;--mdui-typescale-body-large-weight:400;--mdui-typescale-body-medium-weight:400;--mdui-typescale-body-small-weight:400;--mdui-typescale-body-large-line-height:1.5rem;--mdui-typescale-body-medium-line-height:1.25rem;--mdui-typescale-body-small-line-height:1rem;--mdui-typescale-body-large-size:1rem;--mdui-typescale-body-medium-size:0.875rem;--mdui-typescale-body-small-size:0.75rem;--mdui-typescale-body-large-tracking:0.009375rem;--mdui-typescale-body-medium-tracking:0.015625rem;--mdui-typescale-body-small-tracking:0.025rem}.mdui-lock-screen{overflow:hidden!important} \ No newline at end of file diff --git a/client/static/mdui-2.1.4.global.min.js b/client/static/mdui-2.1.4.global.min.js deleted file mode 100644 index 5567254..0000000 --- a/client/static/mdui-2.1.4.global.min.js +++ /dev/null @@ -1,22 +0,0 @@ -/*! - * mdui 2.1.4 (https://www.mdui.org) - * Copyright 2016-2025 zdhxiong - * Licensed under MIT - */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).mdui={})}(this,(function(e){"use strict";function t(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function i(e={},o={}){const n=["__proto__","constructor","prototype"];Object.keys(o).filter((e=>n.indexOf(e)<0)).forEach((n=>{void 0===e[n]?e[n]=o[n]:t(o[n])&&t(e[n])&&Object.keys(o[n]).length>0&&i(e[n],o[n])}))}const o={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function n(){const e="undefined"!=typeof document?document:{};return i(e,o),e}const r={document:o,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function s(){const e="undefined"!=typeof window?window:{};return i(e,r),e}const a=(e,t)=>e?.nodeName.toLowerCase()===t.toLowerCase(),l=e=>"function"==typeof e,c=e=>"string"==typeof e,d=e=>"number"==typeof e,h=e=>"boolean"==typeof e,u=e=>void 0===e,p=e=>null===e,m=e=>"undefined"!=typeof Window&&e instanceof Window,f=e=>"undefined"!=typeof Document&&e instanceof Document,v=e=>"undefined"!=typeof Element&&e instanceof Element,g=e=>!l(e)&&!m(e)&&d(e.length),b=e=>"object"==typeof e&&null!==e,y=e=>f(e)?e.documentElement:e,w=e=>e.replace(/-([a-z])/g,((e,t)=>t.toUpperCase())),k=e=>e?e.replace(/^./,e[0].toLowerCase()).replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())):e,C=()=>!1,x=()=>!0,$=(e,t)=>{for(let i=0;i{const i=Object.keys(e);for(let o=0;o{this[t]=e})),this.length=e.length,this):this}}const S=(e=n())=>/complete|interactive/.test(e.readyState),E=e=>n().createElement(e),T=(e,t)=>e.appendChild(t),D=e=>e.parentNode?e.parentNode.removeChild(e):e,A=(e,t)=>{const i=E(t);return i.innerHTML=e,[].slice.call(i.childNodes)},M=(()=>{const e=function(t){if(!t)return new I;if(t instanceof I)return t;if(l(t)){const i=n();return S(i)?t.call(i,e):i.addEventListener("DOMContentLoaded",(()=>t.call(i,e)),{once:!0}),new I([i])}if(c(t)){const e=t.trim();if(e.startsWith("<")&&e.endsWith(">")){let t="div";return R({li:"ul",tr:"tbody",td:"tr",th:"tr",tbody:"table",option:"select"},((i,o)=>{if(e.startsWith(`<${i}`))return t=o,!1})),new I(A(e,t))}const i=n();return new I(i.querySelectorAll(t))}return!g(t)||(i=t,"undefined"!=typeof Node&&i instanceof Node)?new I([t]):new I(t);var i};return e.fn=I.prototype,e})(),P=(e,t)=>($(t,(t=>{e.push(t)})),e),L=e=>[...new Set(e)];M.fn.get=function(e){return void 0===e?[].slice.call(this):this[e>=0?e:e+this.length]},M.fn.add=function(e){return new I(L(P(this.get(),M(e).get())))};const _=(e,t,i)=>{const o=e.getAttribute(t);return p(o)?i:o},B=(e,t)=>{e.removeAttribute(t)},O=(e,t,i)=>{p(i)?B(e,t):e.setAttribute(t,i)};M.fn.each=function(e){return $(this,((t,i)=>e.call(t,i,t)))},$(["add","remove","toggle"],(e=>{M.fn[`${e}Class`]=function(t){return"remove"!==e||arguments.length?this.each(((i,o)=>{if(!v(o))return;const n=(l(t)?t.call(o,i,_(o,"class","")):t).split(" ").filter((e=>e));$(n,(t=>{o.classList[e](t)}))})):this.each(((e,t)=>{O(t,"class","")}))}})),$(["insertBefore","insertAfter"],((e,t)=>{M.fn[e]=function(e){const i=t?M(this.get().reverse()):this,o=M(e),n=[];return o.each(((e,o)=>{o.parentNode&&i.each(((i,r)=>{const s=e?r.cloneNode(!0):r,a=t?o.nextSibling:o;n.push(s),o.parentNode.insertBefore(s,a)}))})),M(t?n.reverse():n)}}));function z(e,t){return g(e)?$(e,((e,i)=>t.call(e,i,e))):R(e,t)}function N(e,t){const i=s();let o;const n=[];return z(e,((e,r)=>{o=t.call(i,r,e),null!=o&&n.push(o)})),[].concat(...n)}$(["before","after"],((e,t)=>{M.fn[e]=function(...e){return 1===t&&(e=e.reverse()),this.each(((i,o)=>{const n=l(e[0])?[e[0].call(o,i,o.innerHTML)]:e;$(n,(e=>{let n;n=(e=>c(e)&&!(e.startsWith("<")&&e.endsWith(">")))(e)?M(A(e,"div")):i&&v(e)?M(e.cloneNode(!0)):M(e),n[t?"insertAfter":"insertBefore"](o)}))}))}})),M.fn.map=function(e){return new I(N(this,((t,i)=>e.call(t,i,t))))},M.fn.clone=function(){return this.map((function(){return this.cloneNode(!0)}))},M.fn.is=function(e){let t=!1;if(l(e))return this.each(((i,o)=>{e.call(o,i,o)&&(t=!0)})),t;if(c(e))return this.each(((i,o)=>{f(o)||m(o)||o.matches.call(o,e)&&(t=!0)})),t;const i=M(e);return this.each(((e,o)=>{i.each(((e,i)=>{o===i&&(t=!0)}))})),t},M.fn.remove=function(e){return this.each(((t,i)=>{e&&!M(i).is(e)||D(i)}))},$(["prepend","append"],((e,t)=>{M.fn[e]=function(...e){return this.each(((i,o)=>{const n=o.childNodes,r=n.length,s=r?n[t?r-1:0]:E("div");r||T(o,s);let a=l(e[0])?[e[0].call(o,i,o.innerHTML)]:e;i&&(a=a.map((e=>c(e)?e:M(e).clone()))),M(s)[t?"after":"before"](...a),r||D(s)}))}})),$(["appendTo","prependTo"],((e,t)=>{M.fn[e]=function(e){const i=[],o=M(e).map(((e,o)=>{const n=o.childNodes,r=n.length;if(r)return n[t?0:r-1];const s=E("div");return T(o,s),i.push(s),s})),n=this[t?"insertBefore":"insertAfter"](o);return M(i).remove(),n}}));const F=(e,t)=>s().getComputedStyle(e).getPropertyValue(k(t)),V=e=>"border-box"===F(e,"box-sizing"),H=(e,t,i)=>{const o="width"===t?["Left","Right"]:["Top","Bottom"];return[0,1].reduce(((t,n,r)=>{let s=i+o[r];return"border"===i&&(s+="Width"),t+parseFloat(F(e,s)||"0")}),0)},U=(e,t)=>{if("width"===t||"height"===t){const i=e.getBoundingClientRect()[t];return V(e)?`${i}px`:i-H(e,t,"border")-H(e,t,"padding")+"px"}return F(e,t)},K=["animation-iteration-count","column-count","fill-opacity","flex-grow","flex-shrink","font-weight","grid-area","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","line-height","opacity","order","orphans","widows","z-index","zoom"];$(["attr","prop","css"],((e,t)=>{const i=(e,i)=>0===t?_(e,i):1===t?e[i]:U(e,i);M.fn[e]=function(o,n){if(b(o))return R(o,((t,i)=>{this[e](t,i)})),this;if(1===arguments.length){const e=this[0];return v(e)?i(e,o):void 0}return this.each(((e,r)=>{((e,i,o)=>{if(u(o))return;if(0===t)return O(e,i,o);if(1===t)return void(e[i]=o);i=k(i),e.style.setProperty(i,d(o)?`${o}${i.startsWith("--")||K.includes(i)?"":"px"}`:o)})(r,o,l(n)?n.call(r,e,i(r,o)):n)}))}})),M.fn.children=function(e){const t=[];return this.each(((i,o)=>{$(o.childNodes,(i=>{v(i)&&(e&&!M(i).is(e)||t.push(i))}))})),new I(L(t))},M.fn.slice=function(...e){return new I([].slice.apply(this,e))},M.fn.eq=function(e){const t=-1===e?this.slice(e):this.slice(e,+e+1);return new I(t)};const q=(e,t,i,o,n)=>{const r=[];let s;return e.each(((e,a)=>{for(s=a[i];s&&v(s);){if(2===t){if(o&&M(s).is(o))break;n&&!M(s).is(n)||r.push(s)}else{if(0===t){o&&!M(s).is(o)||r.push(s);break}o&&!M(s).is(o)||r.push(s)}s=s[i]}})),new I(L(r))};$(["","s","sUntil"],((e,t)=>{M.fn[`parent${e}`]=function(e,i){const o=t?M(this.get().reverse()):this;return q(o,t,"parentNode",e,i)}})),M.fn.closest=function(e){if(this.is(e))return this;const t=[];return this.parents().each(((i,o)=>{if(M(o).is(e))return t.push(o),!1})),new I(t)};const j=new WeakMap,W=e=>j.get(e)??{},G=(e,t)=>{const i=W(e),o=w(t);return o in i?i[o]:void 0},Y=(e,t)=>{const i=W(e);R(t,((e,t)=>{i[w(e)]=t})),j.set(e,i)},X=(e,t,i)=>{Y(e,{[t]:i})},J=/^(?:{[\w\W]*\}|\[[\w\W]*\])$/,Z=(e,t,i)=>{if(u(i)&&1===e.nodeType&&(i=e.dataset[t],c(i)))try{i=(e=>"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:J.test(e)?JSON.parse(e):e))(i)}catch(e){}return i};M.fn.data=function(e,t){if(u(e)){if(!this.length)return;const e=this[0],t=W(e);return 1!==e.nodeType||R(e.dataset,(i=>{t[i]=Z(e,i,t[i])})),t}return b(e)?this.each((function(){Y(this,e)})):2===arguments.length&&u(t)?this:u(t)?this.length?Z(this[0],w(e),G(this[0],e)):void 0:this.each((function(){X(this,e,t)}))},M.fn.empty=function(){return this.each(((e,t)=>{t.innerHTML=""}))},M.fn.extend=function(e){return R(e,((e,t)=>{M.fn[e]=t})),this},M.fn.filter=function(e){if(l(e))return this.map(((t,i)=>e.call(i,t,i)?i:void 0));if(c(e))return this.map(((t,i)=>M(i).is(e)?i:void 0));const t=M(e);return this.map(((e,i)=>t.get().includes(i)?i:void 0))},M.fn.find=function(e){const t=[];return this.each(((i,o)=>{P(t,M(o.querySelectorAll(e)).get())})),new I(t)},M.fn.first=function(){return this.eq(0)};const Q=(e,t)=>e!==t&&y(e).contains(t);M.fn.has=function(e){const t=c(e)?this.find(e):M(e),{length:i}=t;return this.map((function(){for(let e=0;e{const s=i=>H(e,t.toLowerCase(),i)*r;return 2===o&&n&&(i+=s("margin")),V(e)?(0===o&&(i-=s("border")),1===o&&(i-=s("border"),i-=s("padding"))):(0===o&&(i+=s("padding")),2===o&&(i+=s("border"),i+=s("padding"))),i},te=(e,t,i,o)=>{const r=n(),s=`client${t}`,a=`scroll${t}`,l=`offset${t}`,c=`inner${t}`;if(m(e))return 2===i?e[c]:y(r)[s];if(f(e)){const t=y(e);return Math.max(e.body[a],t[a],e.body[l],t[l],t[s])}const d=parseFloat(F(e,t.toLowerCase())||"0");return ee(e,t,d,i,o,1)};$(["Width","Height"],(e=>{$([`inner${e}`,e.toLowerCase(),`outer${e}`],((t,i)=>{M.fn[t]=function(t,o){const n=arguments.length&&(i<2||!h(t)),r=!0===t||!0===o;return n?this.each(((o,n)=>((e,t,i,o,n,r)=>{let s=l(r)?r.call(e,t,te(e,i,o,n)):r;if(null==s)return;const a=M(e),d=i.toLowerCase();if(c(s)&&["auto","inherit",""].includes(s))return void a.css(d,s);const h=s.toString().replace(/\b[0-9.]*/,""),u=parseFloat(s);s=ee(e,i,u,o,n,-1)+(h||"px"),a.css(d,s)})(n,o,e,i,r,t))):this.length?te(this[0],e,i,r):void 0}}))})),M.fn.hide=function(){return this.each(((e,t)=>{t.style.display="none"}))},$(["val","html","text"],((e,t)=>{const i=["value","innerHTML","textContent"][t],o=e=>{if(2===t)return N(e,(e=>y(e)[i])).join("");if(!e.length)return;const o=e[0],n=M(o);return 0===t&&n.is("select[multiple]")?N(n.find("option:checked"),(e=>e.value)):o[i]};M.fn[e]=function(e){return arguments.length?this.each(((n,r)=>{const s=M(r),a=l(e)?e.call(r,n,o(s)):e;0===t&&Array.isArray(a)?s.is("select[multiple]")?N(s.find("option"),(e=>e.selected=a.includes(e.value))):r.checked=a.includes(r.value):((e,o)=>{if(u(o)){if(0!==t)return;o=""}1===t&&v(o)&&(o=o.outerHTML),e[i]=o})(r,a)})):o(this)}})),M.fn.index=function(e){return arguments.length?c(e)?M(e).get().indexOf(this[0]):this.get().indexOf(M(e)[0]):this.eq(0).parent().children().get().indexOf(this[0])},M.fn.last=function(){return this.eq(-1)},$(["","All","Until"],((e,t)=>{M.fn[`next${e}`]=function(e,i){return q(this,t,"nextElementSibling",e,i)}})),M.fn.not=function(e){const t=this.filter(e);return this.map(((e,i)=>t.index(i)>-1?void 0:i))};const ie=s().CustomEvent;class oe extends ie{constructor(e,t){super(e,t),this.data=t.data,this.namespace=t.namespace}}const ne=new WeakMap;let re=1;const se=e=>(ne.has(e)||ne.set(e,++re),ne.get(e)),ae=new Map,le=e=>{const t=se(e);return ae.get(t)||ae.set(t,[]).get(t)},ce=e=>{const t=e.split(".");return{type:t[0],namespace:t.slice(1).sort().join(" ")}},de=e=>new RegExp("(?:^| )"+e.replace(" "," .* ?")+"(?: |$)"),he=(e,t,i,o)=>{const n=le(e),r=t=>{delete n[t.id],e.removeEventListener(t.type,t.proxy,!1)};t?t.split(" ").forEach((t=>{t&&((e,t,i,o)=>{const n=ce(t);return le(e).filter((e=>e&&(!n.type||e.type===n.type)&&(!n.namespace||de(n.namespace).test(e.namespace))&&(!i||se(e.func)===se(i))&&(!o||e.selector===o)))})(e,t,i,o).forEach((e=>{r(e)}))})):n.forEach((e=>{r(e)}))};function ue(e,...t){return $(t,(t=>{R(t,((t,i)=>{u(i)||(e[t]=i)}))})),e}M.fn.off=function(e,t,i){return b(e)?(R(e,((e,i)=>{this.off(e,t,i)})),this):((!1===t||l(t))&&(i=t,t=void 0),!1===i&&(i=C),this.each((function(){he(this,e,i,t)})))},M.fn.offsetParent=function(){const e=n();return this.map((function(){let t=this.offsetParent;for(;t&&"static"===M(t).css("position");)t=t.offsetParent;return t||e.documentElement}))};const pe=(e,t)=>parseFloat(e.css(t));M.fn.position=function(){if(!this.length)return;const e=this.eq(0);let t,i={left:0,top:0};if("fixed"===e.css("position"))t=e[0].getBoundingClientRect();else{t=e.offset();const o=e.offsetParent();i=o.offset(),i.top+=pe(o,"border-top-width"),i.left+=pe(o,"border-left-width")}return{top:t.top-i.top-pe(e,"margin-top"),left:t.left-i.left-pe(e,"margin-left")}};const me=e=>{if(!e.getClientRects().length)return{top:0,left:0};const{top:t,left:i}=e.getBoundingClientRect(),{pageYOffset:o,pageXOffset:n}=e.ownerDocument.defaultView;return{top:t+o,left:i+n}};M.fn.offset=function(e){if(!arguments.length){if(!this.length)return;return me(this[0])}return this.each((function(t){((e,t,i)=>{const o=M(e),n=o.css("position");"static"===n&&o.css("position","relative");const r=me(e),s=o.css("top"),a=o.css("left");let c,d;if("absolute"!==n&&"fixed"!==n||!(s+a).includes("auto"))c=parseFloat(s),d=parseFloat(a);else{const e=o.position();c=e.top,d=e.left}const h=l(t)?t.call(e,i,ue({},r)):t;o.css({top:null!=h.top?h.top-r.top+c:void 0,left:null!=h.left?h.left-r.left+d:void 0})})(this,e,t)}))},M.fn.on=function(e,t,i,o,n){if(b(e))return c(t)||(i=i||t,t=void 0),R(e,((e,o)=>{this.on(e,t,i,o,n)})),this;if(null==i&&null==o?(o=t,i=t=void 0):null==o&&(c(t)?(o=i,i=void 0):(o=i,i=t,t=void 0)),!1===o)o=C;else if(!o)return this;if(n){const e=this,i=o;o=function(n,...r){return e.off(n.type,t,o),i.call(this,n,...r)}}return this.each((function(){((e,t,i,o,n)=>{let r=!1;b(o)&&o.useCapture&&(r=!0),t.split(" ").forEach((t=>{if(!t)return;const s=ce(t),a=(e,t)=>{!1===i.apply(t,null===e.detail?[e]:[e].concat(e.detail))&&(e.preventDefault(),e.stopPropagation())},l=t=>{t.namespace&&!de(t.namespace).test(s.namespace)||(t.data=o,n?M(e).find(n).get().reverse().forEach((e=>{(e===t.target||Q(e,t.target))&&a(t,e)})):a(t,e))},c={type:s.type,namespace:s.namespace,func:i,selector:n,id:le(e).length,proxy:l};le(e).push(c),e.addEventListener(c.type,l,r)}))})(this,e,o,i,t)}))},M.fn.one=function(e,t,i,o){return this.on(e,t,i,o,!0)},$(["","All","Until"],((e,t)=>{M.fn[`prev${e}`]=function(e,i){const o=t?M(this.get().reverse()):this;return q(o,t,"previousElementSibling",e,i)}})),M.fn.removeAttr=function(e){const t=e.split(" ").filter((e=>e));return this.each((function(){$(t,(e=>{B(this,e)}))}))};const fe=(e,t)=>{if(u(t))return(e=>{j.delete(e)})(e);((e,t)=>{const i=W(e);$(t,(e=>{const t=w(e);delete i[t]})),j.set(e,i)})(e,c(t)?t.split(" ").filter((e=>e)):t)};M.fn.removeData=function(e){return this.each(((t,i)=>{fe(i,e)}))},M.fn.removeProp=function(e){return this.each(((t,i)=>{try{delete i[e]}catch(e){}}))},M.fn.replaceWith=function(e){return this.each(((t,i)=>{let o=e;l(o)?o=o.call(i,t,i.innerHTML):t&&!c(o)&&(o=M(o).clone()),M(i).before(o)})),this.remove()},M.fn.replaceAll=function(e){return M(e).map(((e,t)=>(M(t).replaceWith(e?this.clone():this),this.get())))};const ve=e=>{if(!b(e)&&!Array.isArray(e))return"";const t=[],i=(e,o)=>{let n;b(o)?R(o,((t,r)=>{n=Array.isArray(o)&&!b(r)?"":t,i(`${e}[${n}]`,r)})):(n=null==o||""===o?"=":`=${encodeURIComponent(o)}`,t.push(encodeURIComponent(e)+n))};return Array.isArray(e)?$(e,(({name:e,value:t})=>i(e,t))):R(e,i),t.join("&")},ge=new WeakMap,be=e=>[...[...e.elements],...ge.get(e)||[]].sort(((e,t)=>e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),ye=e=>{const t=[];return e.each(((e,i)=>{const o=i instanceof HTMLFormElement?be(i):[i];M(o).each(((e,i)=>{const o=M(i),n=i.type,r=i.nodeName.toLowerCase();"fieldset"===r||!i.name||i.disabled||!["input","select","textarea","keygen","mdui-checkbox","mdui-radio-group","mdui-switch","mdui-text-field","mdui-select","mdui-slider","mdui-range-slider","mdui-segmented-button-group"].includes(r)||["submit","button","image","reset","file"].includes(n)||["radio","checkbox"].includes(n)&&!i.checked||["mdui-checkbox","mdui-switch"].includes(r)&&!i.checked||t.push({name:i.name,value:o.val()})}))})),t};M.fn.serializeArray=function(){return ye(this).map((e=>Array.isArray(e.value)?e.value.map((t=>({name:e.name,value:t}))):e)).flat()},M.fn.serialize=function(){return ve(this.serializeArray())},M.fn.serializeObject=function(){const e={};return ye(this).forEach((t=>{const{name:i,value:o}=t;if(Object.prototype.hasOwnProperty.call(e,i)){const t=e[i];Array.isArray(t)||(e[i]=[t]),Array.isArray(o)?e[i].push(...o):e[i].push(o)}else e[i]=o})),e};const we={};M.fn.show=function(){return this.each(((e,t)=>{"none"===t.style.display&&(t.style.display=""),"none"===U(t,"display")&&(t.style.display=(e=>{const t=n();let i,o;return we[e]||(i=E(e),T(t.body,i),o=U(i,"display"),D(i),"none"===o&&(o="block"),we[e]=o),we[e]})(t.nodeName))}))},M.fn.siblings=function(e){return this.prevAll(e).add(this.nextAll(e))},M.fn.toggle=function(){return this.each(((e,t)=>{"none"===U(t,"display")?M(t).show():M(t).hide()}))},M.fn.trigger=function(e,t=null,i){const{type:o,namespace:n}=ce(e),r=new oe(o,{detail:t,data:null,namespace:n,bubbles:!0,cancelable:!1,composed:!0,...i});return this.each(((e,t)=>{t.dispatchEvent(r)}))};const ke="ajaxSuccess",Ce="ajaxError",xe="ajaxComplete",$e={},Re=(e,t)=>`${e}&${t}`.replace(/[&?]{1,2}/,"?"),Ie=e=>{const t=n(),i=s();let o=!1;const r={},a={},l=(e=>{const t={url:"",method:"GET",data:"",processData:!0,async:!0,cache:!0,username:"",password:"",headers:{},xhrFields:{},statusCode:{},dataType:"",contentType:"application/x-www-form-urlencoded",timeout:0,global:!0};return R($e,((e,i)=>{["beforeSend","success","error","complete","statusCode"].includes(e)||u(i)||(t[e]=i)})),ue({},t,e)})(e),d=l.method.toUpperCase();let{data:h,url:p}=l;p=p||i.location.toString();const{processData:m,async:f,cache:v,username:g,password:b,headers:y,xhrFields:w,statusCode:k,dataType:C,contentType:x,timeout:I,global:S}=l,E=(e=>["GET","HEAD"].includes(e))(d);!h||!E&&!m||c(h)||h instanceof ArrayBuffer||h instanceof Blob||h instanceof Document||h instanceof FormData||(h=ve(h)),h&&E&&(p=Re(p,h),h=null);const T=(e,i,...n)=>{let s,c;S&&M(t).trigger(e,"success"===i?a:r),i in $e&&(s=$e[i](...n)),l[i]&&(c=l[i](...n)),"beforeSend"===i&&[s,c].includes(!1)&&(o=!0)};return(()=>{let e;return new Promise(((t,n)=>{const c=e=>n(new Error(e));E&&!v&&(p=Re(p,`_=${Date.now()}`));const m=new XMLHttpRequest;let S;if(m.open(d,p,f,g,b),(x||h&&!E&&!1!==x)&&m.setRequestHeader("Content-Type",x),"json"===C&&m.setRequestHeader("Accept","application/json, text/javascript"),R(y,((e,t)=>{u(t)||m.setRequestHeader(e,t+"")})),(e=>{const t=s();return/^([\w-]+:)?\/\/([^/]+)/.test(e)&&RegExp.$2!==t.location.host})(p)||m.setRequestHeader("X-Requested-With","XMLHttpRequest"),R(w,((e,t)=>{m[e]=t})),r.xhr=a.xhr=m,r.options=a.options=l,m.onload=()=>{S&&clearTimeout(S);const i=(o=m.status)>=200&&o<300||[0,304].includes(o);var o;let n;if(i)if(e=204===m.status||"HEAD"===d?"nocontent":304===m.status?"notmodified":"success","json"===C||!C&&(m.getResponseHeader("content-type")||"").includes("json")){try{n="HEAD"===d?void 0:JSON.parse(m.responseText),a.response=n}catch(t){e="parsererror",T(Ce,"error",m,e),c(e)}"parsererror"!==e&&(T(ke,"success",n,e,m),t(n))}else n="HEAD"===d?void 0:"text"===m.responseType||""===m.responseType?m.responseText:m.response,a.response=n,T(ke,"success",n,e,m),t(n);else e="error",T(Ce,"error",m,e),c(e);$([$e.statusCode??{},k],(t=>{t[m.status]&&(i?t[m.status](n,e,m):t[m.status](m,e))})),T(xe,"complete",m,e)},m.onerror=()=>{S&&clearTimeout(S),T(Ce,"error",m,m.statusText),T(xe,"complete",m,"error"),c(m.statusText)},m.onabort=()=>{let e="abort";S&&(e="timeout",clearTimeout(S)),T(Ce,"error",m,e),T(xe,"complete",m,e),c(e)},T("ajaxStart","beforeSend",m,l),o)return c("cancel");I>0&&(S=i.setTimeout((()=>m.abort()),I)),m.send(h)}))})()};M.ajax=Ie;function Se(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}M.ajaxSetup=e=>ue($e,e),M.contains=Q,M.data=function(e,t,i){return b(t)?(Y(e,t),t):u(i)?u(t)?W(e):G(e,t):(X(e,t,i),i)},M.each=z,M.extend=function(e,...t){return t.length?ue(e,...t):(R(e,((e,t)=>{this[e]=t})),this)},M.map=N,M.merge=P,M.param=ve,M.removeData=fe,M.unique=L,"function"==typeof SuppressedError&&SuppressedError;const Ee=globalThis,Te=Ee.ShadowRoot&&(void 0===Ee.ShadyCSS||Ee.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,De=Symbol(),Ae=new WeakMap;let Me=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==De)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Te&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=Ae.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ae.set(t,e))}return e}toString(){return this.cssText}};const Pe=(e,...t)=>{const i=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 Me(i,e,De)},Le=Te?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(e=>new Me("string"==typeof e?e:e+"",void 0,De))(t)})(e):e,{is:_e,defineProperty:Be,getOwnPropertyDescriptor:Oe,getOwnPropertyNames:ze,getOwnPropertySymbols:Ne,getPrototypeOf:Fe}=Object,Ve=globalThis,He=Ve.trustedTypes,Ue=He?He.emptyScript:"",Ke=Ve.reactiveElementPolyfillSupport,qe=(e,t)=>e,je={toAttribute(e,t){switch(t){case Boolean:e=e?Ue: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}},We=(e,t)=>!_e(e,t),Ge={attribute:!0,type:String,converter:je,reflect:!1,useDefault:!1,hasChanged:We};Symbol.metadata??=Symbol("metadata"),Ve.litPropertyMetadata??=new WeakMap;let Ye=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Ge){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(e,i,t);void 0!==o&&Be(this.prototype,e,o)}}static getPropertyDescriptor(e,t,i){const{get:o,set:n}=Oe(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:o,set(t){const r=o?.call(this);n?.call(this,t),this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ge}static _$Ei(){if(this.hasOwnProperty(qe("elementProperties")))return;const e=Fe(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(qe("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(qe("properties"))){const e=this.properties,t=[...ze(e),...Ne(e)];for(const i of t)this.createProperty(i,e[i])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,i]of t)this.elementProperties.set(e,i)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const i=this._$Eu(e,t);void 0!==i&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}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(Le(e))}else void 0!==e&&t.push(Le(e));return t}static _$Eu(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(Te)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const i of t){const t=document.createElement("style"),o=Ee.litNonce;void 0!==o&&t.setAttribute("nonce",o),t.textContent=i.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){const i=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,i);if(void 0!==o&&!0===i.reflect){const n=(void 0!==i.converter?.toAttribute?i.converter:je).toAttribute(t,i.type);this._$Em=e,null==n?this.removeAttribute(o):this.setAttribute(o,n),this._$Em=null}}_$AK(e,t){const i=this.constructor,o=i._$Eh.get(e);if(void 0!==o&&this._$Em!==o){const e=i.getPropertyOptions(o),n="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:je;this._$Em=o,this[o]=n.fromAttribute(t,e.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(e,t,i){if(void 0!==e){const o=this.constructor,n=this[e];if(i??=o.getPropertyOptions(e),!((i.hasChanged??We)(n,t)||i.useDefault&&i.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:o,wrapped:n},r){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,r??t??this[e]),!0!==n||void 0!==r)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),!0===o&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,i]of e){const{wrapped:e}=i,o=this[t];!0!==e||this._$AL.has(t)||void 0===o||this.C(t,void 0,i,o)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(e){}firstUpdated(e){}};Ye.elementStyles=[],Ye.shadowRootOptions={mode:"open"},Ye[qe("elementProperties")]=new Map,Ye[qe("finalized")]=new Map,Ke?.({ReactiveElement:Ye}),(Ve.reactiveElementVersions??=[]).push("2.1.0");const Xe=globalThis,Je=Xe.trustedTypes,Ze=Je?Je.createPolicy("lit-html",{createHTML:e=>e}):void 0,Qe="$lit$",et=`lit$${Math.random().toFixed(9).slice(2)}$`,tt="?"+et,it=`<${tt}>`,ot=document,nt=()=>ot.createComment(""),rt=e=>null===e||"object"!=typeof e&&"function"!=typeof e,st=Array.isArray,at="[ \t\n\f\r]",lt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ct=/-->/g,dt=/>/g,ht=RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ut=/'/g,pt=/"/g,mt=/^(?:script|style|textarea|title)$/i,ft=(e=>(t,...i)=>({_$litType$:e,strings:t,values:i}))(1),vt=Symbol.for("lit-noChange"),gt=Symbol.for("lit-nothing"),bt=new WeakMap,yt=ot.createTreeWalker(ot,129);function wt(e,t){if(!st(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Ze?Ze.createHTML(t):t}const kt=(e,t)=>{const i=e.length-1,o=[];let n,r=2===t?"":3===t?"":"",s=lt;for(let t=0;t"===l[0]?(s=n??lt,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?ht:'"'===l[3]?pt:ut):s===pt||s===ut?s=ht:s===ct||s===dt?s=lt:(s=ht,n=void 0);const h=s===ht&&e[t+1].startsWith("/>")?" ":"";r+=s===lt?i+it:c>=0?(o.push(a),i.slice(0,c)+Qe+i.slice(c)+et+h):i+et+(-2===c?t:h)}return[wt(e,r+(e[i]||"")+(2===t?"":3===t?"":"")),o]};class Ct{constructor({strings:e,_$litType$:t},i){let o;this.parts=[];let n=0,r=0;const s=e.length-1,a=this.parts,[l,c]=kt(e,t);if(this.el=Ct.createElement(l,i),yt.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(o=yt.nextNode())&&a.length0){o.textContent=Je?Je.emptyScript:"";for(let i=0;ist(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==gt&&rt(this._$AH)?this._$AA.nextSibling.data=e:this.T(ot.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:i}=e,o="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=Ct.createElement(wt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(t);else{const e=new $t(o,this),i=e.u(this.options);e.p(t),this.T(i),this._$AH=e}}_$AC(e){let t=bt.get(e.strings);return void 0===t&&bt.set(e.strings,t=new Ct(e)),t}k(e){st(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,o=0;for(const n of e)o===t.length?t.push(i=new Rt(this.O(nt()),this.O(nt()),this,this.options)):i=t[o],i._$AI(n),o++;o2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=gt}_$AI(e,t=this,i,o){const n=this.strings;let r=!1;if(void 0===n)e=xt(this,e,t,0),r=!rt(e)||e!==this._$AH&&e!==vt,r&&(this._$AH=e);else{const o=e;let s,a;for(e=n[0],s=0;s{const o=i?.renderBefore??t;let n=o._$litPart$;if(void 0===n){const e=i?.renderBefore??null;o._$litPart$=n=new Rt(t.insertBefore(nt(),e),e,void 0,i??{})}return n._$AI(e),n})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return vt}};Pt._$litElement$=!0,Pt.finalized=!0,Mt.litElementHydrateSupport?.({LitElement:Pt});const Lt=Mt.litElementPolyfillSupport;Lt?.({LitElement:Pt}),(Mt.litElementVersions??=[]).push("4.2.0");const _t=e=>(t,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)},Bt={attribute:!0,type:String,converter:je,reflect:!1,hasChanged:We},Ot=(e=Bt,t,i)=>{const{kind:o,metadata:n}=i;let r=globalThis.litPropertyMetadata.get(n);if(void 0===r&&globalThis.litPropertyMetadata.set(n,r=new Map),"setter"===o&&((e=Object.create(e)).wrapped=!0),r.set(i.name,e),"accessor"===o){const{name:o}=i;return{set(i){const n=t.get.call(this);t.set.call(this,i),this.requestUpdate(o,n,e)},init(t){return void 0!==t&&this.C(o,void 0,e,t),t}}}if("setter"===o){const{name:o}=i;return function(i){const n=this[o];t.call(this,i),this.requestUpdate(o,n,e)}}throw Error("Unsupported decorator location: "+o)};function zt(e){return(t,i)=>"object"==typeof i?Ot(e,t,i):((e,t,i)=>{const o=t.hasOwnProperty(i);return t.constructor.createProperty(i,e),o?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)}function Nt(e){return zt({...e,state:!0,attribute:!1})}function Ft(e){return(t,i)=>{const{slot:o,selector:n}=e??{},r="slot"+(o?`[name=${o}]`:":not([name])");return((e,t,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,i),i))(t,i,{get(){const t=this.renderRoot?.querySelector(r),i=t?.assignedElements(e)??[];return void 0===n?i:i.filter((e=>e.matches(n)))}})}}const Vt=e=>e??gt,Ht=1,Ut=2,Kt=3,qt=4,jt=e=>(...t)=>({_$litDirective$:e,values:t});let Wt=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 Gt="important",Yt=" !"+Gt,Xt=jt(class extends Wt{constructor(e){if(super(e),e.type!==Ht||"style"!==e.name||e.strings?.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.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?i.removeProperty(e):i[e]=null);for(const e in t){const o=t[e];if(null!=o){this.ft.add(e);const t="string"==typeof o&&o.endsWith(Yt);e.includes("-")||t?i.setProperty(e,t?o.slice(0,-11):o,t?Gt:""):i[e]=o}}return vt}});class Jt extends Pt{emit(e,t){const i=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i)}}class Zt{constructor(e,...t){this.slotNames=[],(this.host=e).addController(this),this.slotNames=t,this.onSlotChange=this.onSlotChange.bind(this)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.onSlotChange),S()||M((()=>{this.host.requestUpdate()}))}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.onSlotChange)}test(e){return"[default]"===e?this.hasDefaultSlot():this.hasNamedSlot(e)}hasDefaultSlot(){return[...this.host.childNodes].some((e=>{if(e.nodeType===e.TEXT_NODE&&""!==e.textContent.trim())return!0;if(e.nodeType===e.ELEMENT_NODE){if(!e.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(e){return null!==this.host.querySelector(`:scope > [slot="${e}"]`)}onSlotChange(e){const t=e.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()}}const Qt=ft`${gt}`,ei=Pe`:host{box-sizing:border-box}:host *,:host ::after,:host ::before{box-sizing:inherit}:host :focus,:host :focus-visible,:host(:focus),:host(:focus-visible){outline:0}[hidden]{display:none!important}`;let ti=class extends Wt{constructor(e){if(super(e),this.it=gt,e.type!==Ut)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===gt||null==e)return this._t=void 0,this.it=e;if(e===vt)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};ti.directiveName="unsafeHTML",ti.resultType=1;class ii extends ti{}ii.directiveName="unsafeSVG",ii.resultType=2;const oi=jt(ii),ni=e=>void 0===e.strings,ri={},si=(e,t)=>{const i=e._$AN;if(void 0===i)return!1;for(const e of i)e._$AO?.(t,!1),si(e,t);return!0},ai=e=>{let t,i;do{if(void 0===(t=e._$AM))break;i=t._$AN,i.delete(e),e=t}while(0===i?.size)},li=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),hi(t)}};function ci(e){void 0!==this._$AN?(ai(this),this._$AM=e,li(this)):this._$AM=e}function di(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{e.type==Ut&&(e._$AP??=di,e._$AQ??=ci)};class ui extends Wt{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),li(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(si(this,e),ai(this))}setValue(e){if(ni(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 pi{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}}class mi{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??=new Promise((e=>this.Z=e))}resume(){this.Z?.(),this.Y=this.Z=void 0}}const fi=e=>!(e=>null===e||"object"!=typeof e&&"function"!=typeof e)(e)&&"function"==typeof e.then,vi=1073741823;const gi=jt(class extends ui{constructor(){super(...arguments),this._$Cwt=vi,this._$Cbt=[],this._$CK=new pi(this),this._$CX=new mi}render(...e){return e.find((e=>!fi(e)))??vt}update(e,t){const i=this._$Cbt;let o=i.length;this._$Cbt=t;const n=this._$CK,r=this._$CX;this.isConnected||this.disconnected();for(let e=0;ethis._$Cwt);e++){const s=t[e];if(!fi(s))return this._$Cwt=e,s;e{for(;r.get();)await r.get();const t=n.deref();if(void 0!==t){const i=t._$Cbt.indexOf(s);i>-1&&i`:(()=>{if(this.name){const[e,t]=this.name.split("--"),i=new Map([["outlined","Material Icons Outlined"],["filled","Material Icons"],["rounded","Material Icons Round"],["sharp","Material Icons Sharp"],["two-tone","Material Icons Two Tone"]]);return ft`${e}`}return this.src?ft`${gi(Ie({url:this.src}).then(oi))}`:ft``})()}},e.Icon.styles=[ei,bi],Se([zt({reflect:!0})],e.Icon.prototype,"name",void 0),Se([zt({reflect:!0})],e.Icon.prototype,"src",void 0),e.Icon=Se([_t("mdui-icon")],e.Icon);const yi=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;white-space:nowrap;vertical-align:middle;border-radius:var(--shape-corner);-webkit-user-select:none;user-select:none;width:2.5rem;height:2.5rem;background-color:rgb(var(--mdui-color-primary-container));color:rgb(var(--mdui-color-on-primary-container));font-size:var(--mdui-typescale-title-medium-size);font-weight:var(--mdui-typescale-title-medium-weight);letter-spacing:var(--mdui-typescale-title-medium-tracking);line-height:var(--mdui-typescale-title-medium-line-height)}img{width:100%;height:100%}::slotted(mdui-icon),mdui-icon{font-size:1.5em}`;e.Avatar=class extends Jt{constructor(){super(...arguments),this.hasSlotController=new Zt(this,"[default]")}render(){return this.hasSlotController.test("[default]")?ft``:this.src?ft`${Vt(this.label)}`:this.icon?ft``:Qt}},e.Avatar.styles=[ei,yi],Se([zt({reflect:!0})],e.Avatar.prototype,"src",void 0),Se([zt({reflect:!0})],e.Avatar.prototype,"fit",void 0),Se([zt({reflect:!0})],e.Avatar.prototype,"icon",void 0),Se([zt({reflect:!0})],e.Avatar.prototype,"label",void 0),e.Avatar=Se([_t("mdui-avatar")],e.Avatar);const wi=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:var(--shape-corner);padding-left:.25rem;padding-right:.25rem;color:rgb(var(--mdui-color-on-error));background-color:rgb(var(--mdui-color-error));height:1rem;min-width:1rem;font-size:var(--mdui-typescale-label-small-size);font-weight:var(--mdui-typescale-label-small-weight);letter-spacing:var(--mdui-typescale-label-small-tracking);line-height:var(--mdui-typescale-label-small-line-height)}:host([variant=small]){min-width:0;padding:0;width:.375rem;height:.375rem}`;e.Badge=class extends Jt{constructor(){super(...arguments),this.variant="large"}render(){return"small"===this.variant?Qt:ft``}},e.Badge.styles=[ei,wi],Se([zt({reflect:!0})],e.Badge.prototype,"variant",void 0),e.Badge=Se([_t("mdui-badge")],e.Badge);const ki=e=>null!==e&&"false"!==e.toLowerCase();class Ci{constructor(e,t){this.defined=!1,(this.host=e).addController(this),this.relatedElements=t.relatedElements,this.needDomReady=t.needDomReady||!!t.relatedElements,this.onSlotChange=this.onSlotChange.bind(this)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.onSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.onSlotChange)}isDefined(){return!!this.defined||(this.defined=(!this.needDomReady||S())&&!this.getUndefinedLocalNames().length,this.defined)}async whenDefined(){if(this.defined)return Promise.resolve();const e=n();this.needDomReady&&!S(e)&&await new Promise((t=>{e.addEventListener("DOMContentLoaded",(()=>t()),{once:!0})}));const t=this.getUndefinedLocalNames();if(t.length){const e=[];t.forEach((t=>{e.push(customElements.whenDefined(t))})),await Promise.all(e)}this.defined=!0}getScopeLocalNameSelector(){const e=this.relatedElements;return e?Array.isArray(e)?e.map((e=>`${e}:not(:defined)`)).join(","):Object.keys(e).filter((t=>!e[t])).map((e=>`${e}:not(:defined)`)).join(","):null}getGlobalLocalNameSelector(){const e=this.relatedElements;return!e||Array.isArray(e)?null:Object.keys(e).filter((t=>e[t])).map((e=>`${e}:not(:defined)`)).join(",")}getUndefinedLocalNames(){const e=this.getScopeLocalNameSelector(),t=this.getGlobalLocalNameSelector(),i=[...e?[...this.host.querySelectorAll(e)]:[],...t?[...n().querySelectorAll(t)]:[]].map((e=>e.localName));return L(i)}onSlotChange(){const e=this.getScopeLocalNameSelector();if(e){this.host.querySelectorAll(e).length&&(this.defined=!1)}}}function xi(e,t=!1){return(i,o)=>{const{update:n}=i;e in i&&(i.update=function(i){if(i.has(e)){const n=i.get(e),r=this[e];n!==r&&(t&&!this.hasUpdated||this[o](n,r))}n.call(this,i)})}}const $i=new WeakMap,Ri=e=>{class t extends e{constructor(...e){super(...e),this.scrollBehaviorDefinedController=new Ci(this,{needDomReady:!0}),this.lastScrollTopThreshold=0,this.lastScrollTopNoThreshold=0,this.isParentLayout=!1,this.onListeningScroll=this.onListeningScroll.bind(this)}get scrollPaddingPosition(){throw new Error("Must implement scrollPaddingPosition getter")}async onScrollTargetChange(e,t){const i=this.hasUpdated;if(await this.scrollBehaviorDefinedController.whenDefined(),i&&(this.setContainerPadding("remove",e),this.setContainerPadding("add",t)),!this.scrollBehavior)return;const o=this.getListening(e);o&&o.removeEventListener("scroll",this.onListeningScroll);const n=this.getListening(t);n&&(this.updateScrollTop(n),n.addEventListener("scroll",this.onListeningScroll))}async onScrollBehaviorChange(){await this.scrollBehaviorDefinedController.whenDefined();const e=this.getListening(this.scrollTarget);e&&(this.scrollBehavior?(this.updateScrollTop(e),e.addEventListener("scroll",this.onListeningScroll)):e.removeEventListener("scroll",this.onListeningScroll))}connectedCallback(){super.connectedCallback(),this.scrollBehaviorDefinedController.whenDefined().then((()=>{this.isParentLayout=a(this.parentElement,"mdui-layout"),this.setContainerPadding("add",this.scrollTarget)}))}disconnectedCallback(){super.disconnectedCallback(),this.scrollBehaviorDefinedController.whenDefined().then((()=>{this.setContainerPadding("remove",this.scrollTarget)}))}hasScrollBehavior(e){const t=this.scrollBehavior?.split(" ")??[];return Array.isArray(e)?!!t.filter((t=>e.includes(t))).length:t.includes(e)}runScrollThreshold(e,t){}runScrollNoThreshold(e,t){}setContainerPadding(e,t){const i=this.getContainer(t);if(!i||this.isParentLayout)return;const o=this.scrollPaddingPosition,n="top"===o?"paddingTop":"paddingBottom";if("add"===e||"update"===e){const t=["fixed","absolute"].includes(M(this).css("position"))?this.offsetHeight:null;if(M(i).css({[n]:t}),"add"===e&&null!==t){const e=$i.get(i)??{top:[],bottom:[]};e[o].push(this),$i.set(i,e)}}if("remove"===e){const e=$i.get(i);if(!e)return;const t=e[o].indexOf(this);t>-1&&(e[o].splice(t,1),$i.set(i,e)),e[o].length||M(i).css({[n]:null})}}onListeningScroll(){const e=this.getListening(this.scrollTarget);window.requestAnimationFrame((()=>this.onScroll(e)))}onScroll(e){const t=e.scrollY??e.scrollTop;this.lastScrollTopNoThreshold!==t&&(this.runScrollNoThreshold(t(this.scrollThreshold||0)&&(this.runScrollThreshold(t++Ii;let Ei,Ti;const Di=(e,t)=>{const i=M(e),o=Si(),n={unobserve:()=>{i.each(((e,t)=>{const i=Ei.get(t),n=i.coArr.findIndex((e=>e.key===o));-1!==n&&i.coArr.splice(n,1),i.coArr.length?Ei.set(t,i):(Ti.unobserve(t),Ei.delete(t))}))}};return Ei||(Ei=new WeakMap,Ti=new ResizeObserver((e=>{e.forEach((e=>{const t=e.target,i=Ei.get(t);i.entry=e,i.coArr.forEach((t=>{t.callback.call(n,e,n)}))}))}))),i.each(((e,i)=>{const r=Ei.get(i)??{coArr:[]};r.coArr.length&&r.entry&&t.call(n,r.entry,n),r.coArr.push({callback:t,key:o}),Ei.set(i,r),Ti.observe(i)})),n};class Ai{constructor(){this.states=[]}registerMain(e){this.$main=M(e)}unregisterMain(){this.$main=void 0}registerItem(e){const t={element:e};this.states.push(t),t.observeResize=Di(t.element,(()=>{this.updateLayout(t.element,{width:this.isNoWidth(t)?0:void 0})})),this.items=void 0,this.resort(),this.updateLayout()}unregisterItem(e){const t=this.states.findIndex((t=>t.element===e));if(t<0)return;const i=this.states[t];i.observeResize?.unobserve(),this.items=void 0,this.states.splice(t,1),this.states[t]&&this.updateLayout(this.states[t].element)}getItems(){if(!this.items){const e=this.states.map((e=>e.element));this.items=e.sort(((e,t)=>{const i=e.compareDocumentPosition(t);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}return this.items}getMain(){return this.$main?this.$main[0]:void 0}getItemsAndMain(){return[...this.getItems(),this.getMain()].filter((e=>e))}updateOrder(){this.resort(),this.updateLayout()}updateLayout(e,t){const i=e?{element:e,width:t?.width,height:t?.height}:void 0,o=i?this.states.findIndex((e=>e.element===i.element)):0;if(o<0)return;Object.assign(this.states[o],i),this.states.forEach(((e,t)=>{if(t0?this.states[t-1]:void 0,r=n?.top??0,s=n?.right??0,a=n?.bottom??0,l=n?.left??0;switch(Object.assign(e,{top:r,right:s,bottom:a,left:l}),i){case"top":case"bottom":e[i]+=e.height??e.element.offsetHeight;break;case"right":case"left":e[i]+=(this.isNoWidth(e)?0:e.width)??e.element.offsetWidth}e.height=e.width=void 0,M(e.element).css({position:"absolute",top:"bottom"===i?null:r,right:"left"===i?null:s,bottom:"top"===i?null:a,left:"right"===i?null:l})}));const n=this.states[this.states.length-1];this.$main&&this.$main.css({paddingTop:n.top,paddingRight:n.right,paddingBottom:n.bottom,paddingLeft:n.left})}resort(){const e=this.getItems();this.states.sort(((t,i)=>{const o=t.element.order??0,n=i.element.order??0;return o>n?1:oe.indexOf(i.element)?1:e.indexOf(t.element)(Mi.has(e)||Mi.set(e,new Ai),Mi.get(e));class Li extends Jt{constructor(){super(...arguments),this.isParentLayout=!1}get layoutPlacement(){throw new Error("Must implement placement getter!")}onOrderChange(){this.layoutManager?.updateOrder()}connectedCallback(){super.connectedCallback();const e=this.parentElement;this.isParentLayout=a(e,"mdui-layout"),this.isParentLayout&&(this.layoutManager=Pi(e),this.layoutManager.registerItem(this))}disconnectedCallback(){super.disconnectedCallback(),this.layoutManager&&this.layoutManager.unregisterItem(this)}}Se([zt({type:Number,reflect:!0})],Li.prototype,"order",void 0),Se([xi("order",!0)],Li.prototype,"onOrderChange",null);const _i=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;right:0;bottom:0;left:0;display:flex;flex:0 0 auto;align-items:center;justify-content:flex-start;border-radius:var(--shape-corner) var(--shape-corner) 0 0;z-index:var(--z-index);transition:bottom var(--mdui-motion-duration-long2) var(--mdui-motion-easing-emphasized);padding:0 1rem;height:5rem;background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2)}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([hide]:not([hide=false i])){transition-duration:var(--mdui-motion-duration-short4);bottom:-5.625rem}::slotted(:not(:first-child)){margin-left:.5rem}::slotted(mdui-fab){box-shadow:var(--mdui-elevation-level0)}:host([fab-detach]:not([fab-detach=false i])) ::slotted(mdui-fab){position:absolute;transition:bottom var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard);right:1rem;bottom:.75rem}:host([fab-detach][hide][scroll-behavior~=hide]:not([hide=false i],[fab-detach=false i])) ::slotted(mdui-fab){transition-duration:var(--mdui-motion-duration-short4);bottom:1rem;box-shadow:var(--mdui-elevation-level2)}:host([fab-detach][hide][scroll-behavior~=hide][scroll-target]:not([fab-detach=false i],[hide=false i],[scroll-target=''])) ::slotted(mdui-fab){bottom:6.625rem}:host([hide]:not([hide=false i])) ::slotted(:not(mdui-fab)),:host([hide]:not([hide=false i],[fab-detach])) ::slotted(mdui-fab),:host([hide][fab-detach=false i]:not([hide=false i])) ::slotted(mdui-fab){transform:translateY(8.75rem);transition:transform var(--mdui-motion-duration-0) var(--mdui-motion-easing-emphasized-accelerate) var(--mdui-motion-duration-short4)}::slotted(:first-child){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-short1)}::slotted(:nth-child(2)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-short3)}::slotted(:nth-child(3)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-short4)}::slotted(:nth-child(4)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-medium1)}::slotted(:nth-child(5)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-medium2)}::slotted(:nth-child(6)){transition:transform var(--mdui-motion-duration-short3) var(--mdui-motion-easing-emphasized-decelerate) var(--mdui-motion-duration-medium3)}`;e.BottomAppBar=class extends(Ri(Li)){constructor(){super(...arguments),this.hide=!1,this.fabDetach=!1}get scrollPaddingPosition(){return"bottom"}get layoutPlacement(){return"bottom"}firstUpdated(e){super.firstUpdated(e),this.addEventListener("transitionend",(e=>{e.target===this&&this.emit(this.hide?"hidden":"shown")}))}render(){return ft``}runScrollThreshold(e){if(!e&&!this.hide){this.emit("hide",{cancelable:!0})&&(this.hide=!0)}if(e&&this.hide){this.emit("show",{cancelable:!0})&&(this.hide=!1)}}},e.BottomAppBar.styles=[ei,_i],Se([zt({type:Boolean,reflect:!0,converter:ki})],e.BottomAppBar.prototype,"hide",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"fab-detach"})],e.BottomAppBar.prototype,"fabDetach",void 0),Se([zt({reflect:!0,attribute:"scroll-behavior"})],e.BottomAppBar.prototype,"scrollBehavior",void 0),e.BottomAppBar=Se([_t("mdui-bottom-app-bar")],e.BottomAppBar);const Bi=()=>new Oi;class Oi{}const zi=new WeakMap,Ni=jt(class extends ui{render(e){return gt}update(e,[t]){const i=t!==this.G;return i&&void 0!==this.G&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),gt}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){const t=this.ht??globalThis;let i=zi.get(t);void 0===i&&(i=new WeakMap,zi.set(t,i)),void 0!==i.get(this.G)&&this.G.call(this.ht,void 0),i.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?zi.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});function Fi(e){if("string"==typeof e||"number"==typeof e)return""+e;let t="";if(Array.isArray(e))for(let i,o=0;o{const t=M(e).attr("form");if(t){return e.getRootNode().getElementById(t)}return e.closest("form")},name:e=>e.name,value:e=>e.value,defaultValue:e=>e.defaultValue,setValue:(e,t)=>e.value=t,disabled:e=>e.disabled,reportValidity:e=>!l(e.reportValidity)||e.reportValidity(),...t},this.onFormData=this.onFormData.bind(this),this.onFormSubmit=this.onFormSubmit.bind(this),this.onFormReset=this.onFormReset.bind(this),this.reportFormValidity=this.reportFormValidity.bind(this)}hostConnected(){this.definedController.whenDefined().then((()=>{this.form=this.options.form(this.host),this.form&&this.attachForm(this.form)}))}hostDisconnected(){this.detachForm()}hostUpdated(){this.definedController.whenDefined().then((()=>{const e=this.options.form(this.host);e||this.detachForm(),e&&this.form!==e&&(this.detachForm(),this.attachForm(e))}))}getForm(){return this.form??null}reset(e){this.doAction("reset",e)}submit(e){this.doAction("submit",e)}attachForm(e){e?(this.form=e,ge.has(this.form)?ge.get(this.form).add(this.host):ge.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.onFormData),this.form.addEventListener("submit",this.onFormSubmit),this.form.addEventListener("reset",this.onFormReset),Vi.has(this.form)||(Vi.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){this.form&&(ge.get(this.form).delete(this.host),this.form.removeEventListener("formdata",this.onFormData),this.form.removeEventListener("submit",this.onFormSubmit),this.form.removeEventListener("reset",this.onFormReset),Vi.has(this.form)&&!ge.get(this.form).size&&(this.form.reportValidity=Vi.get(this.form),Vi.delete(this.form)))}doAction(e,t){if(!this.form)return;const i=M(``}isButton(){return!this.href}}Qi.styles=[ei,Zi],Se([zt({type:Boolean,reflect:!0,converter:ki})],Qi.prototype,"disabled",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],Qi.prototype,"loading",void 0),Se([zt({reflect:!0})],Qi.prototype,"name",void 0),Se([zt({reflect:!0})],Qi.prototype,"value",void 0),Se([zt({reflect:!0})],Qi.prototype,"type",void 0),Se([zt({reflect:!0})],Qi.prototype,"form",void 0),Se([zt({reflect:!0,attribute:"formaction"})],Qi.prototype,"formAction",void 0),Se([zt({reflect:!0,attribute:"formenctype"})],Qi.prototype,"formEnctype",void 0),Se([zt({reflect:!0,attribute:"formmethod"})],Qi.prototype,"formMethod",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"formnovalidate"})],Qi.prototype,"formNoValidate",void 0),Se([zt({reflect:!0,attribute:"formtarget"})],Qi.prototype,"formTarget",void 0);const eo=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);min-width:3rem;height:2.5rem;color:rgb(var(--mdui-color-primary));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.button{width:100%;padding:0 1rem}:host([full-width]:not([full-width=false i])){display:block}:host([variant=elevated]){box-shadow:var(--mdui-elevation-level1);background-color:rgb(var(--mdui-color-surface-container-low));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=filled]){color:rgb(var(--mdui-color-on-primary));background-color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-primary)}:host([variant=tonal]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var( - --mdui-color-on-secondary-container - )}:host([variant=outlined]){border:.0625rem solid rgb(var(--mdui-color-outline));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=text]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=outlined][focus-visible]){border-color:rgb(var(--mdui-color-primary))}:host([variant=elevated][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=filled][hover]),:host([variant=tonal][hover]){box-shadow:var(--mdui-elevation-level1)}:host([disabled]:not([disabled=false i])),:host([loading]:not([loading=false i])){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])){color:rgba(var(--mdui-color-on-surface),38%);box-shadow:var(--mdui-elevation-level0)}:host([variant=elevated][disabled]:not([disabled=false i])),:host([variant=filled][disabled]:not([disabled=false i])),:host([variant=tonal][disabled]:not([disabled=false i])){background-color:rgba(var(--mdui-color-on-surface),12%)}:host([variant=outlined][disabled]:not([disabled=false i])){border-color:rgba(var(--mdui-color-on-surface),12%)}.label{display:inline-flex;padding-right:.5rem;padding-left:.5rem}.end-icon,.icon{display:inline-flex;font-size:1.28571429em}.end-icon mdui-icon,.icon mdui-icon,::slotted([slot=end-icon]),::slotted([slot=icon]){font-size:inherit}mdui-circular-progress{display:inline-flex;width:1.125rem;height:1.125rem}:host([variant=filled]) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-primary))}:host([variant=tonal]) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-secondary-container))}:host([disabled]:not([disabled=false i])) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;e.Button=class extends Qi{constructor(){super(...arguments),this.variant="filled",this.fullWidth=!1,this.rippleRef=Bi()}get rippleElement(){return this.rippleRef.value}render(){return ft`${this.isButton()?this.renderButton({className:"button",part:"button",content:this.renderInner()}):this.disabled||this.loading?ft`${this.renderInner()}`:this.renderAnchor({className:"button",part:"button",content:this.renderInner()})}`}renderIcon(){return this.loading?this.renderLoading():ft`${this.icon?ft``:Qt}`}renderLabel(){return ft``}renderEndIcon(){return ft`${this.endIcon?ft``:Qt}`}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon()]}},e.Button.styles=[Qi.styles,eo],Se([zt({reflect:!0})],e.Button.prototype,"variant",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"full-width"})],e.Button.prototype,"fullWidth",void 0),Se([zt({reflect:!0})],e.Button.prototype,"icon",void 0),Se([zt({reflect:!0,attribute:"end-icon"})],e.Button.prototype,"endIcon",void 0),e.Button=Se([_t("mdui-button")],e.Button);const to=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;font-size:1.5rem;width:2.5rem;height:2.5rem}:host([variant=standard]){color:rgb(var(--mdui-color-on-surface-variant));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=filled]){color:rgb(var(--mdui-color-primary));background-color:rgb(var(--mdui-color-surface-container-highest));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=tonal]){color:rgb(var(--mdui-color-on-surface-variant));background-color:rgb(var(--mdui-color-surface-container-highest));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=outlined]){border:.0625rem solid rgb(var(--mdui-color-outline));color:rgb(var(--mdui-color-on-surface-variant));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}:host([variant=outlined][pressed]){color:rgb(var(--mdui-color-on-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([variant=standard][selected]:not([selected=false i])){color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=filled]:not([selectable])),:host([variant=filled][selectable=false i]),:host([variant=filled][selected]:not([selected=false i])){color:rgb(var(--mdui-color-on-primary));background-color:rgb(var(--mdui-color-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-primary)}:host([variant=tonal]:not([selectable])),:host([variant=tonal][selectable=false i]),:host([variant=tonal][selected]:not([selected=false i])){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var( - --mdui-color-on-secondary-container - )}:host([variant=outlined][selected]:not([selected=false i])){border:none;color:rgb(var(--mdui-color-inverse-on-surface));background-color:rgb(var(--mdui-color-inverse-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-inverse-on-surface)}:host([variant=filled][disabled]:not([disabled=false i])),:host([variant=outlined][disabled]:not([disabled=false i])),:host([variant=tonal][disabled]:not([disabled=false i])){background-color:rgba(var(--mdui-color-on-surface),.12);border-color:rgba(var(--mdui-color-on-surface),.12)}:host([disabled]:not([disabled=false i])),:host([loading]:not([loading=false i])){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])){color:rgba(var(--mdui-color-on-surface),.38)!important}.button{float:left;width:100%}:host([loading]:not([loading=false i])) .button,:host([loading]:not([loading=false i])) mdui-ripple{opacity:0}.icon,.selected-icon mdui-icon,::slotted(*){font-size:inherit}mdui-circular-progress{display:flex;position:absolute;top:calc(50% - 1.5rem / 2);left:calc(50% - 1.5rem / 2);width:1.5rem;height:1.5rem}:host([variant=filled]:not([disabled])) mdui-circular-progress,:host([variant=filled][disabled=false i]) mdui-circular-progress{stroke:rgb(var(--mdui-color-on-primary))}:host([disabled]:not([disabled=false i])) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;e.ButtonIcon=class extends Qi{constructor(){super(...arguments),this.variant="standard",this.selectable=!1,this.selected=!1,this.rippleRef=Bi(),this.hasSlotController=new Zt(this,"[default]","selected-icon")}get rippleElement(){return this.rippleRef.value}onSelectedChange(){this.emit("change")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",(()=>{this.selectable&&!this.disabled&&(this.selected=!this.selected)}))}render(){return ft`${this.isButton()?this.renderButton({className:"button",part:"button",content:this.renderIcon()}):this.disabled||this.loading?ft`${this.renderIcon()}`:this.renderAnchor({className:"button",part:"button",content:this.renderIcon()})} ${this.renderLoading()}`}renderIcon(){const e=()=>this.hasSlotController.test("[default]")?ft``:this.icon?ft``:Qt;return this.selected?(()=>this.hasSlotController.test("selected-icon")||this.selectedIcon?ft``:e())():e()}},e.ButtonIcon.styles=[Qi.styles,to],Se([zt({reflect:!0})],e.ButtonIcon.prototype,"variant",void 0),Se([zt({reflect:!0})],e.ButtonIcon.prototype,"icon",void 0),Se([zt({reflect:!0,attribute:"selected-icon"})],e.ButtonIcon.prototype,"selectedIcon",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.ButtonIcon.prototype,"selectable",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.ButtonIcon.prototype,"selected",void 0),Se([xi("selected",!0)],e.ButtonIcon.prototype,"onSelectedChange",null),e.ButtonIcon=Se([_t("mdui-button-icon")],e.ButtonIcon);const io=Pe`:host{--shape-corner:var(--mdui-shape-corner-medium);position:relative;display:inline-block;overflow:hidden;border-radius:var(--shape-corner);-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([clickable]:not([clickable=false i])){cursor:pointer}:host([variant=elevated]){background-color:rgb(var(--mdui-color-surface-container-low));box-shadow:var(--mdui-elevation-level1)}:host([variant=filled]){background-color:rgb(var(--mdui-color-surface-container-highest))}:host([variant=outlined]){background-color:rgb(var(--mdui-color-surface));border:.0625rem solid rgb(var(--mdui-color-outline))}:host([variant=elevated][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=filled][hover]),:host([variant=outlined][hover]){box-shadow:var(--mdui-elevation-level1)}:host([variant=elevated][dragged]),:host([variant=filled][dragged]),:host([variant=outlined][dragged]){box-shadow:var(--mdui-elevation-level3)}:host([disabled]:not([disabled=false i])){opacity:.38;cursor:default;-webkit-user-select:none;user-select:none}:host([variant=elevated][disabled]:not([disabled=false i])){background-color:rgb(var(--mdui-color-surface-variant));box-shadow:var(--mdui-elevation-level0)}:host([variant=filled][disabled]:not([disabled=false i])){background-color:rgb(var(--mdui-color-surface));box-shadow:var(--mdui-elevation-level1)}:host([variant=outlined][disabled]:not([disabled=false i])){box-shadow:var(--mdui-elevation-level0);border-color:rgba(var(--mdui-color-outline),.32)}.link{position:relative;display:inline-block;width:100%;height:100%;color:inherit;font-size:inherit;letter-spacing:inherit;text-decoration:none;touch-action:manipulation;-webkit-user-drag:none}`;e.Card=class extends(Ki(Ji(Wi(Jt)))){constructor(){super(...arguments),this.variant="elevated",this.clickable=!1,this.disabled=!1,this.rippleRef=Bi()}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled||!this.href&&!this.clickable}get focusElement(){return this.href&&!this.disabled?this.renderRoot.querySelector("._a"):this}get focusDisabled(){return this.rippleDisabled}render(){return ft`${this.href&&!this.disabled?this.renderAnchor({className:"link",content:ft``}):ft``}`}},e.Card.styles=[ei,io],Se([zt({reflect:!0})],e.Card.prototype,"variant",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Card.prototype,"clickable",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Card.prototype,"disabled",void 0),e.Card=Se([_t("mdui-card")],e.Card);const oo=jt(class extends Wt{constructor(e){if(super(e),e.type!==Kt&&e.type!==Ht&&e.type!==qt)throw Error("The `live` directive is not allowed on child or event bindings");if(!ni(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===vt||t===gt)return t;const i=e.element,o=e.name;if(e.type===Kt){if(t===i[o])return vt}else if(e.type===qt){if(!!t===i.hasAttribute(o))return vt}else if(e.type===Ht&&i.getAttribute(o)===t+"")return vt;return((e,t=ri)=>{e._$AH=t})(e),t}});function no(e="value"){return(t,i)=>{const o=t.constructor,n=o.prototype.attributeChangedCallback;o.prototype.attributeChangedCallback=function(t,r,s){const a=o.getPropertyOptions(e);if(t===(c(a.attribute)?a.attribute:e)){const t=a.converter||je,o=(l(t)?t:t?.fromAttribute??je.fromAttribute)(s,a.type);this[e]!==o&&(this[i]=o)}n.call(this,t,r,s)}}}const ro=Pe`:host{display:inline-block;width:1em;height:1em;line-height:1;font-size:1.5rem}`,so=e=>ft`${oi(e)}`;let ao=class extends Pt{render(){return so('')}};ao.styles=ro,ao=Se([_t("mdui-icon-check-box-outline-blank")],ao);let lo=class extends Pt{render(){return so('')}};lo.styles=ro,lo=Se([_t("mdui-icon-check-box")],lo);let co=class extends Pt{render(){return so('')}};co.styles=ro,co=Se([_t("mdui-icon-indeterminate-check-box")],co);const ho=Pe`:host{position:relative;display:inline-flex;cursor:pointer;-webkit-tap-highlight-color:transparent;border-radius:.125rem;font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}label{display:inline-flex;align-items:center;width:100%;cursor:inherit;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none}input{position:absolute;padding:0;opacity:0;pointer-events:none;width:1.125rem;height:1.125rem;margin:0 0 0 .6875rem}.icon{display:flex;position:absolute;opacity:1;transform:scale(1);color:rgb(var(--mdui-color-on-surface));font-size:1.5rem;transition:color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.checked-icon,.indeterminate-icon{opacity:0;transform:scale(.5);transition-property:color,opacity,transform;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard)}.icon .i,::slotted([slot=checked-icon]),::slotted([slot=indeterminate-icon]),::slotted([slot=unchecked-icon]){color:inherit;font-size:inherit}i{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;border-radius:50%;width:2.5rem;height:2.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.label{display:flex;width:100%;padding-top:.625rem;padding-bottom:.625rem;color:rgb(var(--mdui-color-on-surface));transition:color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}:host([checked]:not([checked=false i])) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([checked]:not([checked=false i])) .icon{color:rgb(var(--mdui-color-primary))}:host([checked]:not([checked=false i])) .indeterminate-icon{opacity:0;transform:scale(.5)}:host([checked]:not([checked=false i])) .checked-icon{opacity:1;transform:scale(1)}:host([indeterminate]:not([indeterminate=false i])) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([indeterminate]:not([indeterminate=false i])) .icon{color:rgb(var(--mdui-color-primary))}:host([indeterminate]:not([indeterminate=false i])) .checked-icon{opacity:0;transform:scale(.5)}:host([indeterminate]:not([indeterminate=false i])) .indeterminate-icon{opacity:1;transform:scale(1)}.invalid i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}.invalid .icon{color:rgb(var(--mdui-color-error))}.invalid .label{color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])) .icon{color:rgba(var(--mdui-color-on-surface),38%)}:host([disabled]:not([disabled=false i])) .label{color:rgba(var(--mdui-color-on-surface),38%)}:host([disabled][checked]:not([disabled=false i],[checked=false i])) .unchecked-icon,:host([disabled][indeterminate]:not([disabled=false i],[indeterminate=false i])) .unchecked-icon{opacity:0}`;e.Checkbox=class extends(Ji(Wi(Jt))){constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.indeterminate=!1,this.required=!1,this.name="",this.value="on",this.invalid=!1,this.inputRef=Bi(),this.rippleRef=Bi(),this.formController=new Ui(this,{value:e=>e.checked?e.value:void 0,defaultValue:e=>e.defaultChecked,setValue:(e,t)=>e.checked=t})}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}async onDisabledChange(){await this.updateComplete,this.invalid=!this.inputRef.value.checkValidity()}async onCheckedChange(){await this.updateComplete;const e=this.formController.getForm();e&&Hi.get(e)?.has(this)?(this.invalid=!1,Hi.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){if(this.invalid=!this.inputRef.value.reportValidity(),this.invalid){this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.blur(),this.focus())}return!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return ft``}onChange(){this.checked=this.inputRef.value.checked,this.indeterminate=!1,this.emit("change")}},e.Checkbox.styles=[ei,ho],Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Checkbox.prototype,"disabled",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Checkbox.prototype,"checked",void 0),Se([no("checked")],e.Checkbox.prototype,"defaultChecked",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Checkbox.prototype,"indeterminate",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Checkbox.prototype,"required",void 0),Se([zt({reflect:!0})],e.Checkbox.prototype,"form",void 0),Se([zt({reflect:!0})],e.Checkbox.prototype,"name",void 0),Se([zt({reflect:!0})],e.Checkbox.prototype,"value",void 0),Se([zt({reflect:!0,attribute:"unchecked-icon"})],e.Checkbox.prototype,"uncheckedIcon",void 0),Se([zt({reflect:!0,attribute:"checked-icon"})],e.Checkbox.prototype,"checkedIcon",void 0),Se([zt({reflect:!0,attribute:"indeterminate-icon"})],e.Checkbox.prototype,"indeterminateIcon",void 0),Se([Nt()],e.Checkbox.prototype,"invalid",void 0),Se([xi("disabled",!0),xi("indeterminate",!0),xi("required",!0)],e.Checkbox.prototype,"onDisabledChange",null),Se([xi("checked",!0)],e.Checkbox.prototype,"onCheckedChange",null),e.Checkbox=Se([_t("mdui-checkbox")],e.Checkbox);let uo=class extends Pt{render(){return so('')}};uo.styles=ro,uo=Se([_t("mdui-icon-check")],uo);let po=class extends Pt{render(){return so('')}};po.styles=ro,po=Se([_t("mdui-icon-clear")],po);const mo=Pe`:host{--shape-corner:var(--mdui-shape-corner-small);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;border-radius:var(--shape-corner);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);height:2rem;background-color:rgb(var(--mdui-color-surface));border:.0625rem solid rgb(var(--mdui-color-outline));color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height);--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}.button{padding-right:.4375rem;padding-left:.4375rem}:host([variant=input]) .button{padding-right:.1875rem;padding-left:.1875rem}:host([selected]:not([selected=false i])) .button{padding-right:.5rem;padding-left:.5rem}:host([selected][variant=input]:not([selected=false i])) .button{padding-right:.25rem;padding-left:.25rem}:host([elevated]:not([elevated=false i])) .button{padding-right:.5rem;padding-left:.5rem}:host([variant=assist]){color:rgb(var(--mdui-color-on-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([elevated]:not([elevated=false i])){border-width:0;background-color:rgb(var(--mdui-color-surface-container-low));box-shadow:var(--mdui-elevation-level1)}:host([selected]:not([selected=false i])){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));border-width:0;--mdui-comp-ripple-state-layer-color:var( - --mdui-color-on-secondary-container - )}:host([disabled]:not([disabled=false i])),:host([loading]:not([loading=false i])){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])){border-color:rgba(var(--mdui-color-on-surface),12%);color:rgba(var(--mdui-color-on-surface),38%);box-shadow:var(--mdui-elevation-level0)}:host([disabled][elevated]:not([disabled=false i],[elevated=false i])),:host([disabled][selected]:not([disabled=false i],[selected=false i])){background-color:rgba(var(--mdui-color-on-surface),12%)}:host([selected][hover]:not([selected=false i])){box-shadow:var(--mdui-elevation-level1)}:host([elevated][hover]:not([elevated=false i])){color:rgb(var(--mdui-color-on-secondary-container));box-shadow:var(--mdui-elevation-level2)}:host([variant=filter][hover]),:host([variant=input][hover]),:host([variant=suggestion][hover]){color:rgb(var(--mdui-color-on-surface-variant))}:host([variant=filter][focus-visible]),:host([variant=input][focus-visible]),:host([variant=suggestion][focus-visible]){border-color:rgb(var(--mdui-color-on-surface-variant))}:host([dragged]),:host([dragged][hover]){box-shadow:var(--mdui-elevation-level4)}.button{overflow:visible}.label{display:inline-flex;padding-right:.5rem;padding-left:.5rem}.end-icon,.icon,.selected-icon{display:inline-flex;font-size:1.28571429em;color:rgb(var(--mdui-color-on-surface-variant))}:host([variant=assist]) .end-icon,:host([variant=assist]) .icon,:host([variant=assist]) .selected-icon{color:rgb(var(--mdui-color-primary))}:host([selected]:not([selected=false i])) .end-icon,:host([selected]:not([selected=false i])) .icon,:host([selected]:not([selected=false i])) .selected-icon{color:rgb(var(--mdui-color-on-secondary-container))}:host([disabled]:not([disabled=false i])) .end-icon,:host([disabled]:not([disabled=false i])) .icon,:host([disabled]:not([disabled=false i])) .selected-icon{opacity:.38;color:rgb(var(--mdui-color-on-surface))}.end-icon .i,.icon .i,.selected-icon .i,::slotted([slot=end-icon]),::slotted([slot=icon]),::slotted([slot=selected-icon]){font-size:inherit}:host([variant=input]) .has-icon .icon,:host([variant=input]) .has-icon .selected-icon,:host([variant=input]) .has-icon mdui-circular-progress{margin-left:.25rem}:host([variant=input]) .has-end-icon .end-icon{margin-right:.25rem}mdui-circular-progress{display:inline-flex;width:1.125rem;height:1.125rem}:host([disabled]:not([disabled=false i])) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}::slotted(mdui-avatar[slot=end-icon]),::slotted(mdui-avatar[slot=icon]),::slotted(mdui-avatar[slot=selected-icon]){width:1.5rem;height:1.5rem}:host([disabled]:not([disabled=false i])) ::slotted(mdui-avatar[slot=end-icon]),:host([disabled]:not([disabled=false i])) ::slotted(mdui-avatar[slot=icon]),:host([disabled]:not([disabled=false i])) ::slotted(mdui-avatar[slot=selected-icon]){opacity:.38}::slotted(mdui-avatar[slot=icon]),::slotted(mdui-avatar[slot=selected-icon]){margin-left:-.25rem;margin-right:-.125rem}::slotted(mdui-avatar[slot=end-icon]){margin-right:-.25rem;margin-left:-.125rem}.delete-icon{display:inline-flex;font-size:1.28571429em;transition:background-color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);border-radius:var(--mdui-shape-corner-full);margin-right:-.25rem;margin-left:-.25rem;padding:.25rem;color:rgb(var(--mdui-color-on-surface-variant))}.delete-icon:hover{background-color:rgba(var(--mdui-color-on-surface-variant),12%)}.has-end-icon .delete-icon{margin-left:.25rem}:host([variant=assiat]) .delete-icon{color:rgb(var(--mdui-color-primary))}:host([variant=input]) .delete-icon{margin-right:.0625rem}:host([disabled]:not([disabled=false i])) .delete-icon{color:rgba(var(--mdui-color-on-surface),38%)}.delete-icon .i,::slotted([slot=delete-icon]){font-size:inherit}::slotted(mdui-avatar[slot=delete-icon]){width:1.125rem;height:1.125rem}`;e.Chip=class extends Qi{constructor(){super(),this.variant="assist",this.elevated=!1,this.selectable=!1,this.selected=!1,this.deletable=!1,this.rippleRef=Bi(),this.hasSlotController=new Zt(this,"icon","selected-icon","end-icon"),this.onClick=this.onClick.bind(this),this.onKeyDown=this.onKeyDown.bind(this)}get rippleElement(){return this.rippleRef.value}onSelectedChange(){this.emit("change")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown)}render(){const e=this.icon||this.hasSlotController.test("icon"),t=this.endIcon||this.hasSlotController.test("end-icon"),i=this.selectedIcon||["assist","filter"].includes(this.variant)||e||this.hasSlotController.test("selected-icon"),o=Fi({button:!0,"has-icon":this.loading||!this.selected&&e||this.selected&&i,"has-end-icon":t});return ft`${this.isButton()?this.renderButton({className:o,part:"button",content:this.renderInner()}):this.disabled||this.loading?ft`${this.renderInner()}`:this.renderAnchor({className:o,part:"button",content:this.renderInner()})}`}onClick(){this.disabled||this.loading||this.selectable&&(this.selected=!this.selected)}onKeyDown(e){this.disabled||this.loading||(this.selectable&&" "===e.key&&(e.preventDefault(),this.selected=!this.selected),this.deletable&&["Delete","Backspace"].includes(e.key)&&this.emit("delete"))}onDelete(e){e.stopPropagation(),this.emit("delete")}renderIcon(){if(this.loading)return this.renderLoading();const e=()=>this.icon?ft``:Qt;return this.selected?ft`${(()=>this.selectedIcon?ft``:"assist"===this.variant||"filter"===this.variant?ft``:e())()}`:ft`${e()}`}renderLabel(){return ft``}renderEndIcon(){return ft`${this.endIcon?ft``:Qt}`}renderDeleteIcon(){return this.deletable?ft`${this.deleteIcon?ft``:ft``}`:Qt}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon(),this.renderDeleteIcon()]}},e.Chip.styles=[Qi.styles,mo],Se([zt({reflect:!0})],e.Chip.prototype,"variant",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Chip.prototype,"elevated",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Chip.prototype,"selectable",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Chip.prototype,"selected",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Chip.prototype,"deletable",void 0),Se([zt({reflect:!0})],e.Chip.prototype,"icon",void 0),Se([zt({reflect:!0,attribute:"selected-icon"})],e.Chip.prototype,"selectedIcon",void 0),Se([zt({reflect:!0,attribute:"end-icon"})],e.Chip.prototype,"endIcon",void 0),Se([zt({reflect:!0,attribute:"delete-icon"})],e.Chip.prototype,"deleteIcon",void 0),Se([xi("selected",!0)],e.Chip.prototype,"onSelectedChange",null),e.Chip=Se([_t("mdui-chip")],e.Chip);const fo=(e,t)=>{if(e.length!==t.length)return!1;const i=[...e].sort(),o=[...t].sort();return i.every(((e,t)=>e===o[t]))},vo=Pe`:host{display:block}`;e.Collapse=class extends Jt{constructor(){super(...arguments),this.accordion=!1,this.disabled=!1,this.activeKeys=[],this.isInitial=!0,this.definedController=new Ci(this,{relatedElements:["mdui-collapse-item"]})}async onActiveKeysChange(){await this.definedController.whenDefined();const e=this.accordion?this.items.find((e=>this.activeKeys.includes(e.key)))?.value:this.items.filter((e=>this.activeKeys.includes(e.key))).map((e=>e.value));this.setValue(e),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),this.accordion){const e=this.value;if(e){const t=this.items.find((t=>t.value===e));this.setActiveKeys(t?[t.key]:[])}else this.setActiveKeys([])}else{const e=this.value;if(e.length){const t=this.items.filter((t=>e.includes(t.value))).map((e=>e.key));this.setActiveKeys(t)}else this.setActiveKeys([])}this.updateItems()}render(){return ft``}setActiveKeys(e){fo(this.activeKeys,e)||(this.activeKeys=e)}setValue(e){this.accordion||u(this.value)||u(e)?this.value=e:fo(this.value,e)||(this.value=e)}onClick(e){if(this.disabled)return;if(e.button)return;const t=e.target.closest("mdui-collapse-item");if(!t||t.disabled)return;const i=e.composedPath();if((!t.trigger||i.find((e=>v(e)&&M(e).is(t.trigger))))&&i.find((e=>v(e)&&e.part.contains("header")))){if(this.accordion)this.activeKeys.includes(t.key)?this.setActiveKeys([]):this.setActiveKeys([t.key]);else{const e=[...this.activeKeys];e.includes(t.key)?e.splice(e.indexOf(t.key),1):e.push(t.key),this.setActiveKeys(e)}this.isInitial=!1,this.updateItems()}}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems()}updateItems(){this.items.forEach((e=>{e.active=this.activeKeys.includes(e.key),e.isInitial=this.isInitial}))}},e.Collapse.styles=[ei,vo],Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Collapse.prototype,"accordion",void 0),Se([zt()],e.Collapse.prototype,"value",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Collapse.prototype,"disabled",void 0),Se([Nt()],e.Collapse.prototype,"activeKeys",void 0),Se([Ft({selector:"mdui-collapse-item",flatten:!0})],e.Collapse.prototype,"items",void 0),Se([xi("activeKeys",!0)],e.Collapse.prototype,"onActiveKeysChange",null),Se([xi("value")],e.Collapse.prototype,"onValueChange",null),e.Collapse=Se([_t("mdui-collapse")],e.Collapse);const go=Pe`:host{display:flex;flex-direction:column}.header{display:block}.body{display:block;overflow:hidden;transition:height var(--mdui-motion-duration-short4) var(--mdui-motion-easing-emphasized)}.body.opened{overflow:visible}.body.active{transition-duration:var(--mdui-motion-duration-medium4)}`;function bo(e,t,i){return e?t(e):i?.(e)}function yo(e,t,i){return e?new Promise((o=>{if(i.duration===1/0)throw new Error("Promise-based animations must be finite.");d(i.duration)&&isNaN(i.duration)&&(i.duration=0),""===i.easing&&(i.easing="linear");const n=e.animate(t,i);n.addEventListener("cancel",o,{once:!0}),n.addEventListener("finish",o,{once:!0})})):Promise.resolve()}function wo(e){return e?Promise.all(e.getAnimations().map((e=>new Promise((t=>{const i=requestAnimationFrame(t);e.addEventListener("cancel",(()=>i),{once:!0}),e.addEventListener("finish",(()=>i),{once:!0}),e.cancel()}))))):Promise.resolve()}function ko(e){const t=s(),i=e.localName;return"-1"!==e.getAttribute("tabindex")&&(!e.hasAttribute("disabled")&&((!e.hasAttribute("aria-disabled")||"false"===e.getAttribute("aria-disabled"))&&(!("input"===i&&"radio"===e.getAttribute("type")&&!e.hasAttribute("checked"))&&(null!==e.offsetParent&&("hidden"!==t.getComputedStyle(e).visibility&&(!("audio"!==i&&"video"!==i||!e.hasAttribute("controls"))||(!!e.hasAttribute("tabindex")||(!(!e.hasAttribute("contenteditable")||"false"===e.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(i)))))))))}e.CollapseItem=class extends Jt{constructor(){super(...arguments),this.disabled=!1,this.active=!1,this.state="closed",this.isInitial=!0,this.key=Si(),this.bodyRef=Bi()}onActiveChange(){this.isInitial?(this.state=this.active?"opened":"closed",this.hasUpdated&&this.updateBodyHeight()):(this.state=this.active?"open":"close",this.emit(this.state),this.updateBodyHeight())}firstUpdated(e){super.firstUpdated(e),this.updateBodyHeight()}render(){return ft`${this.header}`}onTransitionEnd(e){e.target===this.bodyRef.value&&(this.state=this.active?"opened":"closed",this.emit(this.state),this.updateBodyHeight())}updateBodyHeight(){const e=this.bodyRef.value.scrollHeight;"close"===this.state&&(M(this.bodyRef.value).height(e),this.bodyRef.value.clientLeft),M(this.bodyRef.value).height("opened"===this.state?"auto":"open"===this.state?e:0)}},e.CollapseItem.styles=[ei,go],Se([zt({reflect:!0})],e.CollapseItem.prototype,"value",void 0),Se([zt({reflect:!0})],e.CollapseItem.prototype,"header",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.CollapseItem.prototype,"disabled",void 0),Se([zt()],e.CollapseItem.prototype,"trigger",void 0),Se([Nt()],e.CollapseItem.prototype,"active",void 0),Se([Nt()],e.CollapseItem.prototype,"state",void 0),Se([xi("active")],e.CollapseItem.prototype,"onActiveChange",null),e.CollapseItem=Se([_t("mdui-collapse-item")],e.CollapseItem);let Co=[];class xo{constructor(e){this.tabDirection="forward",this.element=e,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){Co.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Co=Co.filter((e=>e!==this.element)),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Co[Co.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:e,end:t}=function(e){const t=[];return function e(i){i instanceof HTMLElement&&(t.push(i),null!==i.shadowRoot&&"open"===i.shadowRoot.mode&&e(i.shadowRoot)),[...i.children].forEach((t=>e(t)))}(e),{start:t.find((e=>ko(e)))??null,end:t.reverse().find((e=>ko(e)))??null}}(this.element),i="forward"===this.tabDirection?e:t;"function"==typeof i?.focus&&i.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(e){"Tab"===e.key&&e.shiftKey&&(this.tabDirection="backward"),requestAnimationFrame((()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}}const $o=(e,t)=>{const i=`--mdui-motion-easing-${t}`;return M(e).css(i).trim()},Ro=(e,t)=>{const i=`--mdui-motion-duration-${t}`,o=M(e).css(i).trim().toLowerCase();return o.endsWith("ms")?parseFloat(o):1e3*parseFloat(o)};let Io;const So=e=>{if(u(document))return 0;if(void 0===Io){const e=M("
").css({width:"100%",height:"200px"}),t=M("
").css({position:"absolute",top:"0",left:"0",pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}).append(e).appendTo(document.body),i=e[0].offsetWidth;t.css("overflow","scroll");let o=e[0].offsetWidth;i===o&&(o=t[0].clientWidth),t.remove(),Io=i-o}return Io},Eo=new WeakMap,To="mdui-lock-screen",Do=(e,t)=>{const i=n();t??=i.documentElement,Eo.has(t)||Eo.set(t,new Set);Eo.get(t).add(e);const o=M(t);(e=>e.scrollHeight>e.clientHeight)(t)&&o.css("width",`calc(100% - ${So()}px)`),o.addClass(To)},Ao=(e,t)=>{const i=n();t??=i.documentElement;const o=Eo.get(t);o&&(o.delete(e),0===o.size&&(Eo.delete(t),M(t).removeClass(To).width("")))},Mo="lit-localize-status",Po=(e,t,i)=>{let o=e[0];for(let n=1;n{return"string"!=typeof(t=e)&&"strTag"in t?Po(e.strings,e.values):e;var t};let _o=Lo,Bo=!1;class Oo{constructor(){this.settled=!1,this.promise=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}resolve(e){this.settled=!0,this._resolve(e)}reject(e){this.settled=!0,this._reject(e)}}const zo=[];for(let e=0;e<256;e++)zo[e]=(e>>4&15).toString(16)+(15&e).toString(16);const No="",Fo="h",Vo="s";function Ho(e,t){return(t?Fo:Vo)+function(e){let t=0,i=8997,o=0,n=33826,r=0,s=40164,a=0,l=52210;for(let c=0;c>>16,i=65535&t,r+=o>>>16,n=65535&o,l=a+(r>>>16)&65535,s=65535&r;return zo[l>>8]+zo[255&l]+zo[s>>8]+zo[255&s]+zo[n>>8]+zo[255&n]+zo[i>>8]+zo[255&i]}("string"==typeof e?e:e.join(No))}const Uo=new WeakMap,Ko=new Map;function qo(e,t,i){if(e){const o=i?.id??function(e){const t="string"==typeof e?e:e.strings;let i=Ko.get(t);void 0===i&&(i=Ho(t,"string"!=typeof e&&!("strTag"in e)),Ko.set(t,i));return i}(t),n=e[o];if(n){if("string"==typeof n)return n;if("strTag"in n)return Po(n.strings,t.values,n.values);{let e=Uo.get(n);return void 0===e&&(e=n.values,Uo.set(n,e)),{...n,values:e.map((e=>t.values[e]))}}}}return Lo(t)}function jo(e){window.dispatchEvent(new CustomEvent(Mo,{detail:e}))}let Wo,Go,Yo,Xo,Jo,Zo="",Qo=new Oo;Qo.resolve();let en=0;const tn=e=>(function(e){if(Bo)throw new Error("lit-localize can only be configured once");_o=e,Bo=!0}(((e,t)=>qo(Jo,e,t))),Zo=Go=e.sourceLocale,Yo=new Set(e.targetLocales),Yo.add(e.sourceLocale),Xo=e.loadLocale,{getLocale:on,setLocale:nn}),on=()=>Zo,nn=e=>{if(e===(Wo??Zo))return Qo.promise;if(!Yo||!Xo)throw new Error("Internal error");if(!Yo.has(e))throw new Error("Invalid locale code");en++;const t=en;Wo=e,Qo.settled&&(Qo=new Oo),jo({status:"loading",loadingLocale:e});return(e===Go?Promise.resolve({templates:void 0}):Xo(e)).then((i=>{en===t&&(Zo=e,Wo=void 0,Jo=i.templates,jo({status:"ready",readyLocale:e}),Qo.resolve())}),(i=>{en===t&&(jo({status:"error",errorLocale:e,errorMessage:i.toString()}),Qo.reject(i))})),Qo.promise},rn=["ar-eg","az-az","be-by","bg-bg","bn-bd","ca-es","cs-cz","da-dk","de-de","el-gr","en-gb","es-es","et-ee","fa-ir","fi-fi","fr-be","fr-ca","fr-fr","ga-ie","gl-es","he-il","hi-in","hr-hr","hu-hu","hy-am","id-id","is-is","it-it","ja-jp","ka-ge","kk-kz","km-kh","kmr-iq","kn-in","ko-kr","lt-lt","lv-lv","mk-mk","ml-in","mn-mn","ms-my","nb-no","ne-np","nl-be","nl-nl","pl-pl","pt-br","pt-pt","ro-ro","ru-ru","sk-sk","sl-si","sr-rs","sv-se","ta-in","th-th","tr-tr","uk-ua","ur-pk","vi-vn","zh-cn","zh-hk","zh-tw"],sn="You must call `loadLocale` first to set up the localized template.";let an,ln;let cn=!1;const dn=new Map,hn=(e,t)=>{if(!cn){cn=!0;s().addEventListener(Mo,(e=>{"ready"===e.detail.status&&dn.forEach((e=>{e.forEach((e=>e()))}))}))}const i=dn.get(e)||[];i.push(t),dn.set(e,i)},un=e=>{dn.delete(e)},pn=Pe`:host{--shape-corner:var(--mdui-shape-corner-extra-large);--z-index:2300;position:fixed;z-index:var(--z-index);display:none;align-items:center;justify-content:center;inset:0;padding:3rem}::slotted(mdui-top-app-bar[slot=header]){position:absolute;border-top-left-radius:var(--mdui-shape-corner-extra-large);border-top-right-radius:var(--mdui-shape-corner-extra-large);background-color:rgb(var(--mdui-color-surface-container-high))}:host([fullscreen]:not([fullscreen=false i])){--shape-corner:var(--mdui-shape-corner-none);padding:0}:host([fullscreen]:not([fullscreen=false i])) ::slotted(mdui-top-app-bar[slot=header]){border-top-left-radius:var(--mdui-shape-corner-none);border-top-right-radius:var(--mdui-shape-corner-none)}.overlay{position:fixed;inset:0;background-color:rgba(var(--mdui-color-scrim),.4)}.panel{--mdui-color-background:var(--mdui-color-surface-container-high);position:relative;display:flex;flex-direction:column;max-height:100%;border-radius:var(--shape-corner);outline:0;transform-origin:top;min-width:17.5rem;max-width:35rem;padding:1.5rem;background-color:rgb(var(--mdui-color-surface-container-high));box-shadow:var(--mdui-elevation-level3)}:host([fullscreen]:not([fullscreen=false i])) .panel{width:100%;max-width:100%;height:100%;max-height:100%;box-shadow:var(--mdui-elevation-level0)}.header{display:flex;flex-direction:column}.has-icon .header{align-items:center}.icon{display:flex;color:rgb(var(--mdui-color-secondary));font-size:1.5rem}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit}.headline{display:flex;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-headline-small-size);font-weight:var(--mdui-typescale-headline-small-weight);letter-spacing:var(--mdui-typescale-headline-small-tracking);line-height:var(--mdui-typescale-headline-small-line-height)}.icon+.headline{padding-top:1rem}.body{overflow:auto}.header+.body{margin-top:1rem}.description{display:flex;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([fullscreen]:not([fullscreen=false i])) .description{color:rgb(var(--mdui-color-on-surface))}.has-description.has-default .description{margin-bottom:1rem}.action{display:flex;justify-content:flex-end;padding-top:1.5rem}.action::slotted(:not(:first-child)){margin-left:.5rem}:host([stacked-actions]:not([stacked-actions=false i])) .action{flex-direction:column;align-items:end}:host([stacked-actions]:not([stacked-actions=false i])) .action::slotted(:not(:first-child)){margin-left:0;margin-top:.5rem}`;e.Dialog=class extends Jt{constructor(){super(...arguments),this.open=!1,this.fullscreen=!1,this.closeOnEsc=!1,this.closeOnOverlayClick=!1,this.stackedActions=!1,this.overlayRef=Bi(),this.panelRef=Bi(),this.bodyRef=Bi(),this.hasSlotController=new Zt(this,"header","icon","headline","description","action","[default]"),this.definedController=new Ci(this,{relatedElements:["mdui-top-app-bar"]})}async onOpenChange(){const e=this.hasUpdated;if(!this.open&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=Array.from(this.panelRef.value.querySelectorAll(".header, .body, .actions")),i=$o(this,"linear"),o=$o(this,"emphasized-decelerate"),n=$o(this,"emphasized-accelerate"),r=()=>Promise.all([wo(this.overlayRef.value),wo(this.panelRef.value),...t.map((e=>wo(e)))]);if(this.open){if(e){if(!this.emit("open",{cancelable:!0}))return}this.style.display="flex";const n=this.topAppBarElements??[];if(n.length){const e=n[0];e.scrollTarget||(e.scrollTarget=this.bodyRef.value),this.bodyRef.value.style.marginTop="0"}this.originalTrigger=document.activeElement,this.modalHelper.activate(),Do(this),await r(),requestAnimationFrame((()=>{const e=this.querySelector("[autofocus]");e?e.focus({preventScroll:!0}):this.panelRef.value.focus({preventScroll:!0})}));const s=Ro(this,"medium4");await Promise.all([yo(this.overlayRef.value,[{opacity:0},{opacity:1,offset:.3},{opacity:1}],{duration:e?s:0,easing:i}),yo(this.panelRef.value,[{transform:"translateY(-1.875rem) scaleY(0)"},{transform:"translateY(0) scaleY(1)"}],{duration:e?s:0,easing:o}),yo(this.panelRef.value,[{opacity:0},{opacity:1,offset:.1},{opacity:1}],{duration:e?s:0,easing:i}),...t.map((t=>yo(t,[{opacity:0},{opacity:0,offset:.2},{opacity:1,offset:.8},{opacity:1}],{duration:e?s:0,easing:i})))]),e&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;this.modalHelper.deactivate(),await r();const e=Ro(this,"short4");await Promise.all([yo(this.overlayRef.value,[{opacity:1},{opacity:0}],{duration:e,easing:i}),yo(this.panelRef.value,[{transform:"translateY(0) scaleY(1)"},{transform:"translateY(-1.875rem) scaleY(0.6)"}],{duration:e,easing:n}),yo(this.panelRef.value,[{opacity:1},{opacity:1,offset:.75},{opacity:0}],{duration:e,easing:i}),...t.map((t=>yo(t,[{opacity:1},{opacity:0,offset:.75},{opacity:0}],{duration:e,easing:i})))]),this.style.display="none",Ao(this);const o=this.originalTrigger;"function"==typeof o?.focus&&setTimeout((()=>o.focus())),this.emit("closed")}}disconnectedCallback(){super.disconnectedCallback(),Ao(this),un(this)}firstUpdated(e){super.firstUpdated(e),this.modalHelper=new xo(this),this.addEventListener("keydown",(e=>{this.open&&this.closeOnEsc&&"Escape"===e.key&&(e.stopPropagation(),this.open=!1)}))}render(){const e=this.hasSlotController.test("action"),t=this.hasSlotController.test("[default]"),i=!!this.icon||this.hasSlotController.test("icon"),o=!!this.headline||this.hasSlotController.test("headline"),n=!!this.description||this.hasSlotController.test("description"),r=i||o||this.hasSlotController.test("header"),s=n||t;return ft`
${bo(r,(()=>ft`${bo(i,(()=>this.renderIcon()))} ${bo(o,(()=>this.renderHeadline()))}`))} ${bo(s,(()=>ft`
${bo(n,(()=>this.renderDescription()))}
`))} ${bo(e,(()=>ft``))}
`}onOverlayClick(){this.emit("overlay-click"),this.closeOnOverlayClick&&(this.open=!1)}renderIcon(){return ft`${this.icon?ft``:Qt}`}renderHeadline(){return ft`${this.headline}`}renderDescription(){return ft`${this.description}`}},e.Dialog.styles=[ei,pn],Se([zt({reflect:!0})],e.Dialog.prototype,"icon",void 0),Se([zt({reflect:!0})],e.Dialog.prototype,"headline",void 0),Se([zt({reflect:!0})],e.Dialog.prototype,"description",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Dialog.prototype,"open",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Dialog.prototype,"fullscreen",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"close-on-esc"})],e.Dialog.prototype,"closeOnEsc",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"close-on-overlay-click"})],e.Dialog.prototype,"closeOnOverlayClick",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"stacked-actions"})],e.Dialog.prototype,"stackedActions",void 0),Se([Ft({slot:"header",selector:"mdui-top-app-bar",flatten:!0})],e.Dialog.prototype,"topAppBarElements",void 0),Se([xi("open")],e.Dialog.prototype,"onOpenChange",null),e.Dialog=Se([_t("mdui-dialog")],e.Dialog);const mn=Pe`:host{display:block;height:.0625rem;background-color:rgb(var(--mdui-color-surface-variant))}:host([inset]:not([inset=false i])){margin-left:1rem}:host([middle]:not([middle=false i])){margin-left:1rem;margin-right:1rem}:host([vertical]:not([vertical=false i])){height:100%;width:.0625rem}`;function fn(){return"undefined"!=typeof window}function vn(e){return bn(e)?(e.nodeName||"").toLowerCase():"#document"}function gn(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function bn(e){return!!fn()&&(e instanceof Node||e instanceof gn(e).Node)}function yn(e){return!(!fn()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof gn(e).ShadowRoot)}function wn(e){const{overflow:t,overflowX:i,overflowY:o,display:n}=function(e){return gn(e).getComputedStyle(e)}(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+i)&&!["inline","contents"].includes(n)}function kn(e){if("html"===vn(e))return e;const t=e.assignedSlot||e.parentNode||yn(e)&&e.host||function(e){var t;return null==(t=(bn(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}(e);return yn(t)?t.host:t}function Cn(e){const t=kn(e);return function(e){return["html","body","#document"].includes(vn(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:(i=t,fn()&&(i instanceof HTMLElement||i instanceof gn(i).HTMLElement)&&wn(t)?t:Cn(t));var i}function xn(e,t,i){var o;void 0===t&&(t=[]),void 0===i&&(i=!0);const n=Cn(e),r=n===(null==(o=e.ownerDocument)?void 0:o.body),s=gn(n);if(r){const e=function(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}(s);return t.concat(s,s.visualViewport||[],wn(n)?n:[],e&&i?xn(e):[])}return t.concat(n,xn(n,[],i))}e.Divider=class extends Jt{constructor(){super(...arguments),this.vertical=!1,this.inset=!1,this.middle=!1}render(){return ft``}},e.Divider.styles=[ei,mn],Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Divider.prototype,"vertical",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Divider.prototype,"inset",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Divider.prototype,"middle",void 0),e.Divider=Se([_t("mdui-divider")],e.Divider);const $n=Pe`:host{--z-index:2100;display:contents}.panel{display:block;position:fixed;z-index:var(--z-index)}`;e.Dropdown=class extends Jt{constructor(){super(),this.open=!1,this.disabled=!1,this.trigger="click",this.placement="auto",this.stayOpenOnClick=!1,this.openDelay=150,this.closeDelay=150,this.openOnPointer=!1,this.panelRef=Bi(),this.definedController=new Ci(this,{relatedElements:[""]}),this.onDocumentClick=this.onDocumentClick.bind(this),this.onDocumentKeydown=this.onDocumentKeydown.bind(this),this.onWindowScroll=this.onWindowScroll.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onFocus=this.onFocus.bind(this),this.onClick=this.onClick.bind(this),this.onContextMenu=this.onContextMenu.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onPanelClick=this.onPanelClick.bind(this)}get triggerElement(){return this.triggerElements[0]}async onPositionChange(){this.open&&(await this.definedController.whenDefined(),this.updatePositioner())}async onOpenChange(){const e=this.hasUpdated;if(!this.open&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=$o(this,"linear"),i=$o(this,"emphasized-decelerate"),o=$o(this,"emphasized-accelerate");if(this.open){if(e){if(!this.emit("open",{cancelable:!0}))return}const o=this.panelElements.find((e=>l(e.focus)));setTimeout((()=>{o?.focus()}));const n=Ro(this,"medium4");await wo(this.panelRef.value),this.panelRef.value.hidden=!1,this.updatePositioner(),await Promise.all([yo(this.panelRef.value,[{transform:`${this.getCssScaleName()}(0.45)`},{transform:`${this.getCssScaleName()}(1)`}],{duration:e?n:0,easing:i}),yo(this.panelRef.value,[{opacity:0},{opacity:1,offset:.125},{opacity:1}],{duration:e?n:0,easing:t})]),e&&this.emit("opened")}else{if(!this.emit("close",{cancelable:!0}))return;!this.hasTrigger("focus")&&l(this.triggerElement?.focus)&&(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&this.triggerElement.focus();const e=Ro(this,"short4");await wo(this.panelRef.value),await Promise.all([yo(this.panelRef.value,[{transform:`${this.getCssScaleName()}(1)`},{transform:`${this.getCssScaleName()}(0.45)`}],{duration:e,easing:o}),yo(this.panelRef.value,[{opacity:1},{opacity:1,offset:.875},{opacity:0}],{duration:e,easing:t})]),this.panelRef.value&&(this.panelRef.value.hidden=!0),this.emit("closed")}}connectedCallback(){super.connectedCallback(),this.definedController.whenDefined().then((()=>{document.addEventListener("pointerdown",this.onDocumentClick),document.addEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors=xn(this.triggerElement),this.overflowAncestors.forEach((e=>{e.addEventListener("scroll",this.onWindowScroll)})),this.observeResize=Di(this.triggerElement,(()=>{this.updatePositioner()}))}))}disconnectedCallback(){!this.open&&this.panelRef.value&&(this.panelRef.value.hidden=!0),super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),document.removeEventListener("keydown",this.onDocumentKeydown),this.overflowAncestors?.forEach((e=>{e.removeEventListener("scroll",this.onWindowScroll)})),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("mouseleave",this.onMouseLeave),this.definedController.whenDefined().then((()=>{this.triggerElement.addEventListener("focus",this.onFocus),this.triggerElement.addEventListener("click",this.onClick),this.triggerElement.addEventListener("contextmenu",this.onContextMenu),this.triggerElement.addEventListener("mouseenter",this.onMouseEnter)}))}render(){return ft``}getCssScaleName(){return"horizontal"===this.animateDirection?"scaleX":"scaleY"}onDocumentClick(e){if(this.disabled||!this.open)return;const t=e.composedPath();t.includes(this)||(this.open=!1),this.hasTrigger("contextmenu")&&!this.hasTrigger("click")&&t.includes(this.triggerElement)&&(this.open=!1)}onDocumentKeydown(e){!this.disabled&&this.open&&("Escape"!==e.key?"Tab"===e.key&&(!this.hasTrigger("focus")&&l(this.triggerElement?.focus)&&e.preventDefault(),this.open=!1):this.open=!1)}onWindowScroll(){window.requestAnimationFrame((()=>this.onPositionChange()))}hasTrigger(e){return this.trigger.split(" ").includes(e)}onFocus(){this.disabled||this.open||!this.hasTrigger("focus")||(this.open=!0)}onClick(e){this.disabled||e.button||!this.hasTrigger("click")||this.open&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.pointerOffsetX=e.offsetX,this.pointerOffsetY=e.offsetY,this.open=!this.open)}onPanelClick(e){this.disabled||this.stayOpenOnClick||!M(e.target).is("mdui-menu-item")||(this.open=!1)}onContextMenu(e){!this.disabled&&this.hasTrigger("contextmenu")&&(e.preventDefault(),this.pointerOffsetX=e.offsetX,this.pointerOffsetY=e.offsetY,this.open=!0)}onMouseEnter(){!this.disabled&&this.hasTrigger("hover")&&(window.clearTimeout(this.closeTimeout),this.openDelay?this.openTimeout=window.setTimeout((()=>{this.open=!0}),this.openDelay):this.open=!0)}onMouseLeave(){!this.disabled&&this.hasTrigger("hover")&&(window.clearTimeout(this.openTimeout),this.closeTimeout=window.setTimeout((()=>{this.open=!1}),this.closeDelay||50))}updatePositioner(){const e=M(this.panelRef.value),t=M(window),i=this.panelElements,o=Math.max(...i?.map((e=>e.offsetWidth))??[]),n=i?.map((e=>e.offsetHeight)).reduce(((e,t)=>e+t),0),r=this.triggerElement.getBoundingClientRect(),s=this.openOnPointer?{top:this.pointerOffsetY+r.top,left:this.pointerOffsetX+r.left,width:0,height:0}:r;let a,l,c,d,h=this.placement;if("auto"===h){const e=t.width(),i=t.height();let r,a;r=i-s.top-s.height>n+8?"bottom":s.top>n+8?"top":e-s.left-s.width>o+8?"right":s.left>o+8?"left":"bottom",a=["top","bottom"].includes(r)?e-s.left>o+8?"start":s.left+s.width/2>o/2+8&&e-s.left-s.width/2>o/2+8?void 0:s.left+s.width>o+8?"end":"start":i-s.top>n+8?"start":s.top+s.height/2>n/2+8&&i-s.top-s.height/2>n/2+8?void 0:s.top+s.height>n+8?"end":"start",h=a?[r,a].join("-"):r}const[u,p]=h.split("-");switch(this.animateDirection=["top","bottom"].includes(u)?"vertical":"horizontal",u){case"top":l="bottom",c=s.top-n;break;case"bottom":l="top",c=s.top+s.height;break;default:switch(l="center",p){case"start":c=s.top;break;case"end":c=s.top+s.height-n;break;default:c=s.top+s.height/2-n/2}}switch(u){case"left":a="right",d=s.left-o;break;case"right":a="left",d=s.left+s.width;break;default:switch(a="center",p){case"start":d=s.left;break;case"end":d=s.left+s.width-o;break;default:d=s.left+s.width/2-o/2}}e.css({top:c,left:d,transformOrigin:[a,l].join(" ")})}},e.Dropdown.styles=[ei,$n],Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Dropdown.prototype,"open",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Dropdown.prototype,"disabled",void 0),Se([zt({reflect:!0})],e.Dropdown.prototype,"trigger",void 0),Se([zt({reflect:!0})],e.Dropdown.prototype,"placement",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"stay-open-on-click"})],e.Dropdown.prototype,"stayOpenOnClick",void 0),Se([zt({type:Number,reflect:!0,attribute:"open-delay"})],e.Dropdown.prototype,"openDelay",void 0),Se([zt({type:Number,reflect:!0,attribute:"close-delay"})],e.Dropdown.prototype,"closeDelay",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"open-on-pointer"})],e.Dropdown.prototype,"openOnPointer",void 0),Se([Ft({slot:"trigger",flatten:!0})],e.Dropdown.prototype,"triggerElements",void 0),Se([Ft({flatten:!0})],e.Dropdown.prototype,"panelElements",void 0),Se([xi("placement",!0),xi("openOnPointer",!0)],e.Dropdown.prototype,"onPositionChange",null),Se([xi("open")],e.Dropdown.prototype,"onOpenChange",null),e.Dropdown=Se([_t("mdui-dropdown")],e.Dropdown);const Rn=(e=0)=>new Promise((t=>setTimeout(t,e))),In=Pe`:host{--shape-corner-small:var(--mdui-shape-corner-small);--shape-corner-normal:var(--mdui-shape-corner-large);--shape-corner-large:var(--mdui-shape-corner-extra-large);position:relative;display:inline-block;flex-shrink:0;overflow:hidden;text-align:center;border-radius:var(--shape-corner-normal);cursor:pointer;-webkit-tap-highlight-color:transparent;transition-property:box-shadow;transition-timing-function:var(--mdui-motion-easing-emphasized);transition-duration:var(--mdui-motion-duration-medium4);width:3.5rem;height:3.5rem;box-shadow:var(--mdui-elevation-level3);font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.button{padding:0 1rem}:host([size=small]) .button{padding:0 .5rem}:host([size=large]) .button{padding:0 1.875rem}:host([lowered]){box-shadow:var(--mdui-elevation-level1)}:host([focus-visible]){box-shadow:var(--mdui-elevation-level3)}:host([lowered][focus-visible]){box-shadow:var(--mdui-elevation-level1)}:host([pressed]){box-shadow:var(--mdui-elevation-level3)}:host([lowered][pressed]){box-shadow:var(--mdui-elevation-level1)}:host([hover]){box-shadow:var(--mdui-elevation-level4)}:host([lowered][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=primary]){color:rgb(var(--mdui-color-on-primary-container));background-color:rgb(var(--mdui-color-primary-container));--mdui-comp-ripple-state-layer-color:var( - --mdui-color-on-primary-container - )}:host([variant=surface]){color:rgb(var(--mdui-color-primary));background-color:rgb(var(--mdui-color-surface-container-high));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=surface][lowered]){background-color:rgb(var(--mdui-color-surface-container-low))}:host([variant=secondary]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var( - --mdui-color-on-secondary-container - )}:host([variant=tertiary]){color:rgb(var(--mdui-color-on-tertiary-container));background-color:rgb(var(--mdui-color-tertiary-container));--mdui-comp-ripple-state-layer-color:var( - --mdui-color-on-tertiary-container - )}:host([size=small]){border-radius:var(--shape-corner-small);width:2.5rem;height:2.5rem}:host([size=large]){border-radius:var(--shape-corner-large);width:6rem;height:6rem}:host([disabled]:not([disabled=false i])),:host([loading]:not([loading=false i])){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])){color:rgba(var(--mdui-color-on-surface),38%);background-color:rgba(var(--mdui-color-on-surface),12%);box-shadow:var(--mdui-elevation-level0)}:host([extended]:not([extended=false i])){width:auto}.label{display:inline-flex;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear) var(--mdui-motion-duration-short2);padding-left:.25rem;padding-right:.25rem}.has-icon .label{margin-left:.5rem}:host([size=small]) .has-icon .label{margin-left:.25rem}:host([size=large]) .has-icon .label{margin-left:1rem}:host(:not([extended])) .label,:host([extended=false i]) .label{opacity:0;transition-delay:0s;transition-duration:var(--mdui-motion-duration-short1)}:host([size=large]) .label{font-size:1.5em}.icon{display:inline-flex;font-size:1.71428571em}:host([size=large]) .icon{font-size:2.57142857em}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit}mdui-circular-progress{display:inline-flex;width:1.5rem;height:1.5rem}:host([size=large]) mdui-circular-progress{width:2.25rem;height:2.25rem}:host([disabled]:not([disabled=false i])) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;e.Fab=class extends Qi{constructor(){super(...arguments),this.variant="primary",this.size="normal",this.extended=!1,this.rippleRef=Bi(),this.hasSlotController=new Zt(this,"icon"),this.definedController=new Ci(this,{relatedElements:[""]})}get rippleElement(){return this.rippleRef.value}async onExtendedChange(){const e=this.hasUpdated;this.extended?this.style.width=`${this.scrollWidth}px`:this.style.width="",await this.definedController.whenDefined(),await this.updateComplete,this.extended&&!e&&(this.style.width=`${this.scrollWidth}px`),e||(await Rn(),this.style.transitionProperty="box-shadow, width, bottom, transform")}render(){const e=Fi({button:!0,"has-icon":this.icon||this.hasSlotController.test("icon")});return ft`${this.isButton()?this.renderButton({className:e,part:"button",content:this.renderInner()}):this.disabled||this.loading?ft`${this.renderInner()}`:this.renderAnchor({className:e,part:"button",content:this.renderInner()})}`}renderLabel(){return ft``}renderIcon(){return this.loading?this.renderLoading():ft`${this.icon?ft``:Qt}`}renderInner(){return[this.renderIcon(),this.renderLabel()]}},e.Fab.styles=[Qi.styles,In],Se([zt({reflect:!0})],e.Fab.prototype,"variant",void 0),Se([zt({reflect:!0})],e.Fab.prototype,"size",void 0),Se([zt({reflect:!0})],e.Fab.prototype,"icon",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Fab.prototype,"extended",void 0),Se([xi("extended")],e.Fab.prototype,"onExtendedChange",null),e.Fab=Se([_t("mdui-fab")],e.Fab);const Sn=Pe`:host{position:relative;display:flex;flex:1 1 auto;overflow:hidden}:host([full-height]:not([full-height=false i])){height:100%}`;e.Layout=class extends Jt{constructor(){super(...arguments),this.fullHeight=!1}render(){return ft``}},e.Layout.styles=[ei,Sn],Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"full-height"})],e.Layout.prototype,"fullHeight",void 0),e.Layout=Se([_t("mdui-layout")],e.Layout);const En=Pe`:host{display:flex;z-index:1}`;e.LayoutItem=class extends Li{constructor(){super(...arguments),this.placement="top"}get layoutPlacement(){return this.placement}onPlacementChange(){this.layoutManager?.updateLayout(this)}render(){return ft``}},e.LayoutItem.styles=[ei,En],Se([zt({reflect:!0})],e.LayoutItem.prototype,"placement",void 0),Se([xi("placement",!0)],e.LayoutItem.prototype,"onPlacementChange",null),e.LayoutItem=Se([_t("mdui-layout-item")],e.LayoutItem);const Tn=Pe`:host{flex:1 0 auto;max-width:100%;overflow:auto}`;e.LayoutMain=class extends Jt{connectedCallback(){super.connectedCallback();const e=this.parentElement;a(e,"mdui-layout")&&(this.layoutManager=Pi(e),this.layoutManager.registerMain(this))}disconnectedCallback(){super.disconnectedCallback(),this.layoutManager&&this.layoutManager.unregisterMain()}render(){return ft``}},e.LayoutMain.styles=[ei,Tn],e.LayoutMain=Se([_t("mdui-layout-main")],e.LayoutMain);const Dn=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);position:relative;display:inline-block;width:100%;overflow:hidden;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container-highest));height:.25rem}.determinate,.indeterminate{background-color:rgb(var(--mdui-color-primary))}.determinate{height:100%;transition:width var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard)}.indeterminate::before{position:absolute;top:0;bottom:0;left:0;background-color:inherit;animation:mdui-comp-progress-indeterminate 2s var(--mdui-motion-easing-linear) infinite;content:' '}.indeterminate::after{position:absolute;top:0;bottom:0;left:0;background-color:inherit;animation:mdui-comp-progress-indeterminate-short 2s var(--mdui-motion-easing-linear) infinite;content:' '}@keyframes mdui-comp-progress-indeterminate{0%{left:0;width:0}50%{left:30%;width:70%}75%{left:100%;width:0}}@keyframes mdui-comp-progress-indeterminate-short{0%{left:0;width:0}50%{left:0;width:0}75%{left:0;width:25%}100%{left:100%;width:0}}`;e.LinearProgress=class extends Jt{constructor(){super(...arguments),this.max=1}render(){if(!u(this.value)){const e=this.value;return ft`
`}return ft`
`}},e.LinearProgress.styles=[ei,Dn],Se([zt({type:Number,reflect:!0})],e.LinearProgress.prototype,"max",void 0),Se([zt({type:Number})],e.LinearProgress.prototype,"value",void 0),e.LinearProgress=Se([_t("mdui-linear-progress")],e.LinearProgress);const An=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);--shape-corner-rounded:var(--mdui-shape-corner-extra-large);position:relative;display:block;border-radius:var(--shape-corner);--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([rounded]:not([rounded=false i])),:host([rounded]:not([rounded=false i])) mdui-ripple{border-radius:var(--shape-corner-rounded)}:host([active]:not([active=false i])){background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var( - --mdui-color-on-secondary-container - )}:host([disabled]:not([disabled=false i])){pointer-events:none}.container{cursor:pointer;-webkit-user-select:none;user-select:none;text-decoration:none;color:inherit;-webkit-tap-highlight-color:transparent}:host([disabled]:not([disabled=false i])) .container{cursor:default;opacity:.38}:host([nonclickable]:not([href],[nonclickable=false i])) .container{cursor:auto;-webkit-user-select:auto;user-select:auto}.preset{display:flex;align-items:center;padding:.5rem 1.5rem .5rem 1rem;min-height:3.5rem}:host([alignment=start]) .preset{align-items:flex-start}:host([alignment=end]) .preset{align-items:flex-end}.body{display:flex;flex:1 1 100%;flex-direction:column;justify-content:center;min-width:0}.headline{display:block;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}:host([active]:not([active=false i])) .headline{color:rgb(var(--mdui-color-on-secondary-container))}.description{display:none;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([disabled]:not([disabled=false i])) .description,:host([focused]) .description,:host([hover]) .description,:host([pressed]) .description{color:rgb(var(--mdui-color-on-surface))}.has-description .description{display:block}:host([description-line='1']) .description,:host([headline-line='1']) .headline{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([description-line='2']) .description,:host([description-line='3']) .description,:host([headline-line='2']) .headline,:host([headline-line='3']) .headline{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}:host([description-line='2']) .description,:host([headline-line='2']) .headline{-webkit-line-clamp:2}:host([description-line='3']) .description,:host([headline-line='3']) .headline{-webkit-line-clamp:3}.end-icon,.icon{display:flex;flex:0 0 auto;font-size:var(--mdui-typescale-label-small-size);font-weight:var(--mdui-typescale-label-small-weight);letter-spacing:var(--mdui-typescale-label-small-tracking);line-height:var(--mdui-typescale-label-small-line-height);color:rgb(var(--mdui-color-on-surface-variant))}:host([disabled]:not([disabled=false i])) .end-icon,:host([disabled]:not([disabled=false i])) .icon,:host([focused]) .end-icon,:host([focused]) .icon,:host([hover]) .end-icon,:host([hover]) .icon,:host([pressed]) .end-icon,:host([pressed]) .icon{color:rgb(var(--mdui-color-on-surface))}:host([active]:not([active=false i])) .end-icon,:host([active]:not([active=false i])) .icon{color:rgb(var(--mdui-color-on-secondary-container))}.end-icon mdui-icon,.icon mdui-icon,.is-end-icon ::slotted([slot=end-icon]),.is-icon ::slotted([slot=icon]){font-size:1.5rem}.has-icon .icon{margin-right:1rem}.has-icon ::slotted(mdui-checkbox[slot=icon]),.has-icon ::slotted(mdui-radio[slot=icon]){margin-left:-.5rem}.has-end-icon .end-icon{margin-left:1rem}.has-end-icon ::slotted(mdui-checkbox[slot=end-icon]),.has-end-icon ::slotted(mdui-radio[slot=end-icon]){margin-right:-.5rem}`;e.ListItem=class extends(Ki(Ji(Wi(Jt)))){constructor(){super(...arguments),this.disabled=!1,this.active=!1,this.nonclickable=!1,this.rounded=!1,this.alignment="center",this.rippleRef=Bi(),this.itemRef=Bi(),this.hasSlotController=new Zt(this,"[default]","description","icon","end-icon","custom")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.focusDisabled}get focusElement(){return this.href&&!this.disabled?this.itemRef.value:this}get focusDisabled(){return this.href?this.disabled:this.disabled||this.nonclickable}render(){const e=e=>a(e,"mdui-icon")||(e=>e?.nodeName.toLowerCase()??"")(e).startsWith("mdui-icon-"),t=Fi({container:!0,preset:!this.hasSlotController.test("custom"),"has-icon":this.icon||this.hasSlotController.test("icon"),"has-end-icon":this.endIcon||this.hasSlotController.test("end-icon"),"has-description":this.description||this.hasSlotController.test("description"),"is-icon":e(this.iconElements[0]),"is-end-icon":e(this.endIconElements[0])});return ft`${this.href&&!this.disabled?this.renderAnchor({className:t,content:this.renderInner(),part:"container",refDirective:Ni(this.itemRef)}):ft`
${this.renderInner()}
`}`}renderInner(){const e=this.hasSlotController.test("[default]");return ft`${this.icon?ft``:Qt}
${e?ft``:ft`
${this.headline}
`}${this.description}
${this.endIcon?ft``:Qt}
`}},e.ListItem.styles=[ei,An],Se([zt({reflect:!0})],e.ListItem.prototype,"headline",void 0),Se([zt({type:Number,reflect:!0,attribute:"headline-line"})],e.ListItem.prototype,"headlineLine",void 0),Se([zt({reflect:!0})],e.ListItem.prototype,"description",void 0),Se([zt({type:Number,reflect:!0,attribute:"description-line"})],e.ListItem.prototype,"descriptionLine",void 0),Se([zt({reflect:!0})],e.ListItem.prototype,"icon",void 0),Se([zt({reflect:!0,attribute:"end-icon"})],e.ListItem.prototype,"endIcon",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.ListItem.prototype,"disabled",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.ListItem.prototype,"active",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.ListItem.prototype,"nonclickable",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.ListItem.prototype,"rounded",void 0),Se([zt({reflect:!0})],e.ListItem.prototype,"alignment",void 0),Se([Ft({slot:"icon",flatten:!0})],e.ListItem.prototype,"iconElements",void 0),Se([Ft({slot:"end-icon",flatten:!0})],e.ListItem.prototype,"endIconElements",void 0),e.ListItem=Se([_t("mdui-list-item")],e.ListItem);const Mn=Pe`:host{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:default;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-label-small-size);font-weight:var(--mdui-typescale-label-small-weight);letter-spacing:var(--mdui-typescale-label-small-tracking);line-height:var(--mdui-typescale-label-small-line-height);padding-left:1rem;padding-right:1.5rem;height:3.5rem;line-height:3.5rem}`;e.ListSubheader=class extends Jt{render(){return ft``}},e.ListSubheader.styles=[ei,Mn],e.ListSubheader=Se([_t("mdui-list-subheader")],e.ListSubheader);const Pn=Pe`:host{display:block;padding:.5rem 0}::slotted(mdui-divider[middle]){margin-left:1rem;margin-right:1.5rem}`;e.List=class extends Jt{render(){return ft``}},e.List.styles=[ei,Pn],e.List=Se([_t("mdui-list")],e.List);let Ln=class extends Pt{render(){return so('')}};Ln.styles=ro,Ln=Se([_t("mdui-icon-arrow-right")],Ln);const _n=Pe`:host{position:relative;display:block}:host([selected]){background-color:rgba(var(--mdui-color-primary),12%)}:host([disabled]:not([disabled=false i])){pointer-events:none}.container{cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host([disabled]:not([disabled=false i])) .container{cursor:default;opacity:.38}.preset{display:flex;align-items:center;text-decoration:none;height:3rem;padding:0 .75rem}.preset.dense{height:2rem}.label-container{flex:1 1 100%;min-width:0}.label{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking)}.end-icon,.end-text,.icon,.selected-icon{display:none;flex:0 0 auto;color:rgb(var(--mdui-color-on-surface-variant))}.has-end-icon .end-icon,.has-end-text .end-text,.has-icon .icon,.has-icon .selected-icon{display:flex}.end-icon,.icon,.selected-icon{font-size:1.5rem}.end-icon::slotted(mdui-avatar),.icon::slotted(mdui-avatar),.selected-icon::slotted(mdui-avatar){width:1.5rem;height:1.5rem}.dense .end-icon,.dense .icon,.dense .selected-icon{font-size:1.125rem}.dense .end-icon::slotted(mdui-avatar),.dense .icon::slotted(mdui-avatar),.dense .selected-icon::slotted(mdui-avatar){width:1.125rem;height:1.125rem}.end-icon .i,.icon .i,.selected-icon .i,::slotted([slot=end-icon]),::slotted([slot=icon]),::slotted([slot=selected-icon]){font-size:inherit}.end-text{font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.icon,.selected-icon{margin-right:.75rem}.end-icon,.end-text{margin-left:.75rem}.arrow-right{color:rgb(var(--mdui-color-on-surface))}.submenu{--shape-corner:var(--mdui-shape-corner-extra-small);display:block;position:absolute;z-index:1;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);min-width:7rem;max-width:17.5rem;padding-top:.5rem;padding-bottom:.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.submenu::slotted(mdui-divider){margin-top:.5rem;margin-bottom:.5rem}`;e.MenuItem=class extends(Ki(Ji(Wi(Jt)))){constructor(){super(),this.disabled=!1,this.submenuOpen=!1,this.selected=!1,this.dense=!1,this.focusable=!1,this.key=Si(),this.rippleRef=Bi(),this.containerRef=Bi(),this.submenuRef=Bi(),this.hasSlotController=new Zt(this,"[default]","icon","end-icon","end-text","submenu","custom"),this.definedController=new Ci(this,{relatedElements:[""]}),this.onOuterClick=this.onOuterClick.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this)}get focusDisabled(){return this.disabled||!this.focusable}get focusElement(){return this.href&&!this.disabled?this.containerRef.value:this}get rippleDisabled(){return this.disabled}get rippleElement(){return this.rippleRef.value}get hasSubmenu(){return this.hasSlotController.test("submenu")}async onOpenChange(){const e=this.hasUpdated;if(!this.submenuOpen&&!e)return;await this.definedController.whenDefined(),e||await this.updateComplete;const t=$o(this,"linear"),i=$o(this,"emphasized-decelerate"),o=$o(this,"emphasized-accelerate");if(this.submenuOpen){if(e){if(!this.emit("submenu-open",{cancelable:!0}))return}const o=Ro(this,"medium4");await wo(this.submenuRef.value),this.submenuRef.value.hidden=!1,this.updateSubmenuPositioner(),await Promise.all([yo(this.submenuRef.value,[{transform:"scaleY(0.45)"},{transform:"scaleY(1)"}],{duration:e?o:0,easing:i}),yo(this.submenuRef.value,[{opacity:0},{opacity:1,offset:.125},{opacity:1}],{duration:e?o:0,easing:t})]),e&&this.emit("submenu-opened")}else{if(!this.emit("submenu-close",{cancelable:!0}))return;const e=Ro(this,"short4");await wo(this.submenuRef.value),await Promise.all([yo(this.submenuRef.value,[{transform:"scaleY(1)"},{transform:"scaleY(0.45)"}],{duration:e,easing:o}),yo(this.submenuRef.value,[{opacity:1},{opacity:1,offset:.875},{opacity:0}],{duration:e,easing:t})]),this.submenuRef.value&&(this.submenuRef.value.hidden=!0),this.emit("submenu-closed")}}connectedCallback(){super.connectedCallback(),this.definedController.whenDefined().then((()=>{document.addEventListener("pointerdown",this.onOuterClick)}))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onOuterClick)}firstUpdated(e){super.firstUpdated(e),this.definedController.whenDefined().then((()=>{this.addEventListener("focus",this.onFocus),this.addEventListener("blur",this.onBlur),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeydown),this.addEventListener("mouseenter",this.onMouseEnter),this.addEventListener("mouseleave",this.onMouseLeave)}))}render(){const e=this.hasSubmenu,t=this.hasSlotController.test("custom"),i=this.hasSlotController.test("end-icon"),o=!this.endIcon&&e&&!i,n=this.endIcon||e||i,r=!u(this.icon)||"single"===this.selects||"multiple"===this.selects||this.hasSlotController.test("icon"),s=!!this.endText||this.hasSlotController.test("end-text"),a=Fi({container:!0,dense:this.dense,preset:!t,"has-icon":r,"has-end-text":s,"has-end-icon":n});return ft`${this.href&&!this.disabled?this.renderAnchor({part:"container",className:a,content:this.renderInner(o,r),refDirective:Ni(this.containerRef),tabIndex:this.focusable?0:-1}):ft`
${this.renderInner(o,r)}
`} ${bo(e,(()=>ft``))}`}onOuterClick(e){this.disabled||!this.submenuOpen||this===e.target||M.contains(this,e.target)||(this.submenuOpen=!1)}hasTrigger(e){return!!this.submenuTrigger&&this.submenuTrigger.split(" ").includes(e)}onFocus(){!this.disabled&&!this.submenuOpen&&this.hasTrigger("focus")&&this.hasSubmenu&&(this.submenuOpen=!0)}onBlur(){!this.disabled&&this.submenuOpen&&this.hasTrigger("focus")&&this.hasSubmenu&&(this.submenuOpen=!1)}onClick(e){this.disabled||e.button||this.hasTrigger("click")&&e.target===this&&this.hasSubmenu&&(this.submenuOpen&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.submenuOpen=!this.submenuOpen))}onKeydown(e){!this.disabled&&this.hasSubmenu&&(this.submenuOpen||"Enter"!==e.key||(e.stopPropagation(),this.submenuOpen=!0),this.submenuOpen&&"Escape"===e.key&&(e.stopPropagation(),this.submenuOpen=!1))}onMouseEnter(){!this.disabled&&this.hasTrigger("hover")&&this.hasSubmenu&&(window.clearTimeout(this.submenuCloseTimeout),this.submenuOpenDelay?this.submenuOpenTimeout=window.setTimeout((()=>{this.submenuOpen=!0}),this.submenuOpenDelay):this.submenuOpen=!0)}onMouseLeave(){!this.disabled&&this.hasTrigger("hover")&&this.hasSubmenu&&(window.clearTimeout(this.submenuOpenTimeout),this.submenuCloseTimeout=window.setTimeout((()=>{this.submenuOpen=!1}),this.submenuCloseDelay||50))}updateSubmenuPositioner(){const e=M(window),t=M(this.submenuRef.value),i=this.getBoundingClientRect(),o=t.innerWidth(),n=t.innerHeight();let r="bottom",s="right";e.height()-i.top>n+8?r="bottom":i.top+i.height>n+8&&(r="top"),e.width()-i.left-i.width>o+8?s="right":i.left>o+8&&(s="left"),M(this.submenuRef.value).css({top:"bottom"===r?0:i.height-n,left:"right"===s?i.width:-o,transformOrigin:["right"===s?0:"100%","bottom"===r?0:"100%"].join(" ")})}renderInner(e,t){return ft`${this.selected?ft`${this.selectedIcon?ft``:ft``}`:ft`${t?ft``:Qt}`}
${this.endText}${e?ft``:ft`${this.endIcon?ft``:Qt}`}
`}},e.MenuItem.styles=[ei,_n],Se([zt({reflect:!0})],e.MenuItem.prototype,"value",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.MenuItem.prototype,"disabled",void 0),Se([zt({reflect:!0})],e.MenuItem.prototype,"icon",void 0),Se([zt({reflect:!0,attribute:"end-icon"})],e.MenuItem.prototype,"endIcon",void 0),Se([zt({reflect:!0,attribute:"end-text"})],e.MenuItem.prototype,"endText",void 0),Se([zt({reflect:!0,attribute:"selected-icon"})],e.MenuItem.prototype,"selectedIcon",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"submenu-open"})],e.MenuItem.prototype,"submenuOpen",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.MenuItem.prototype,"selected",void 0),Se([Nt()],e.MenuItem.prototype,"dense",void 0),Se([Nt()],e.MenuItem.prototype,"selects",void 0),Se([Nt()],e.MenuItem.prototype,"submenuTrigger",void 0),Se([Nt()],e.MenuItem.prototype,"submenuOpenDelay",void 0),Se([Nt()],e.MenuItem.prototype,"submenuCloseDelay",void 0),Se([Nt()],e.MenuItem.prototype,"focusable",void 0),Se([xi("submenuOpen")],e.MenuItem.prototype,"onOpenChange",null),e.MenuItem=Se([_t("mdui-menu-item")],e.MenuItem);const Bn=Pe`:host{--shape-corner:var(--mdui-shape-corner-extra-small);position:relative;display:block;border-radius:var(--shape-corner);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);min-width:7rem;max-width:17.5rem;padding-top:.5rem;padding-bottom:.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}::slotted(mdui-divider){margin-top:.5rem;margin-bottom:.5rem}`;e.Menu=class extends Jt{constructor(){super(...arguments),this.dense=!1,this.submenuTrigger="click hover",this.submenuOpenDelay=200,this.submenuCloseDelay=200,this.selectedKeys=[],this.isInitial=!0,this.lastActiveItems=[],this.definedController=new Ci(this,{relatedElements:["mdui-menu-item"]})}get items(){return M(this.childrenItems).find("mdui-menu-item").add(this.childrenItems).get()}get itemsEnabled(){return this.items.filter((e=>!e.disabled))}get isSingle(){return"single"===this.selects}get isMultiple(){return"multiple"===this.selects}get isSelectable(){return this.isSingle||this.isMultiple}get isSubmenu(){return!M(this).parent().length}get lastActiveItem(){const e=this.lastActiveItems.length?this.lastActiveItems.length-1:0;return this.lastActiveItems[e]}set lastActiveItem(e){const t=this.lastActiveItems.length?this.lastActiveItems.length-1:0;this.lastActiveItems[t]=e}async onSlotChange(){await this.definedController.whenDefined(),this.items.forEach((e=>{e.dense=this.dense,e.selects=this.selects,e.submenuTrigger=this.submenuTrigger,e.submenuOpenDelay=this.submenuOpenDelay,e.submenuCloseDelay=this.submenuCloseDelay}))}async onSelectsChange(){this.isSelectable?this.isSingle&&this.setSelectedKeys(this.selectedKeys.slice(0,1)):this.setSelectedKeys([]),await this.onSelectedKeysChange()}async onSelectedKeysChange(){await this.definedController.whenDefined();const e=this.itemsEnabled.filter((e=>this.selectedKeys.includes(e.key))).map((e=>e.value)),t=this.isMultiple?e:e[0]||void 0;this.setValue(t),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),!this.isSelectable)return void this.updateSelected();const e=(this.isSingle||c(this.value)?[this.value]:this.value).filter((e=>e));if(e.length)if(this.isSingle){const t=this.itemsEnabled.find((t=>t.value===e[0]));this.setSelectedKeys(t?[t.key]:[])}else this.isMultiple&&this.setSelectedKeys(this.itemsEnabled.filter((t=>e.includes(t.value))).map((e=>e.key)));else this.setSelectedKeys([]);this.updateSelected(),this.updateFocusable()}focus(e){this.lastActiveItem&&this.focusOne(this.lastActiveItem,e)}blur(){this.lastActiveItem&&this.lastActiveItem.blur()}firstUpdated(e){super.firstUpdated(e),this.definedController.whenDefined().then((()=>{this.updateFocusable(),this.lastActiveItem=this.items.find((e=>e.focusable))})),this.addEventListener("submenu-open",(e=>{const t=M(e.target),i=t.children("mdui-menu-item:not([disabled])").get(),o=t.parents("mdui-menu-item").length+1;i.length&&(this.lastActiveItems[o]=i[0],this.updateFocusable(),this.focusOne(this.lastActiveItems[o]))})),this.addEventListener("submenu-close",(e=>{const t=M(e.target).parents("mdui-menu-item").length+1;this.lastActiveItems.length-1===t&&(this.lastActiveItems.pop(),this.updateFocusable(),this.lastActiveItems[t-1]&&this.focusOne(this.lastActiveItems[t-1]))}))}render(){return ft``}setSelectedKeys(e){fo(this.selectedKeys,e)||(this.selectedKeys=e)}setValue(e){this.isSingle||u(this.value)||u(e)?this.value=e:fo(this.value,e)||(this.value=e)}getSiblingsItems(e,t=!1){return M(e).parent().children("mdui-menu-item"+(t?":not([disabled])":"")).get()}updateFocusable(){if(this.lastActiveItem)this.items.forEach((e=>{e.focusable=e.key===this.lastActiveItem.key}));else if(this.selectedKeys.length){if(this.isSingle)this.items.forEach((e=>{e.focusable=this.selectedKeys.includes(e.key)}));else if(this.isMultiple){const e=this.items.find((e=>e.focusable));e?.key&&this.selectedKeys.includes(e.key)||this.itemsEnabled.filter((e=>this.selectedKeys.includes(e.key))).forEach(((e,t)=>e.focusable=!t))}}else this.itemsEnabled.forEach(((e,t)=>{e.focusable=!t}))}updateSelected(){this.items.forEach((e=>{e.selected=this.selectedKeys.includes(e.key)}))}selectOne(e){if(this.isMultiple){const t=[...this.selectedKeys];t.includes(e.key)?t.splice(t.indexOf(e.key),1):t.push(e.key),this.setSelectedKeys(t)}this.isSingle&&(this.selectedKeys.includes(e.key)?this.setSelectedKeys([]):this.setSelectedKeys([e.key])),this.isInitial=!1,this.updateSelected()}async focusableOne(e){this.items.forEach((t=>t.focusable=t.key===e.key)),await Rn()}focusOne(e,t){e.focus(t)}async onClick(e){if(!this.definedController.isDefined())return;if(this.isSubmenu)return;if(e.button)return;const t=e.target.closest("mdui-menu-item");t&&!t.disabled&&(this.lastActiveItem=t,this.isSelectable&&t.value&&this.selectOne(t),await this.focusableOne(t),this.focusOne(t))}async onKeyDown(e){if(!this.definedController.isDefined())return;if(this.isSubmenu)return;const t=e.target;if("Enter"===e.key&&(e.preventDefault(),t.click())," "===e.key&&(e.preventDefault(),this.isSelectable&&t.value&&(this.selectOne(t),await this.focusableOne(t),this.focusOne(t))),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){const i=this.getSiblingsItems(t,!0),o=i.find((e=>e.focusable));let n=o?i.indexOf(o):0;if(i.length>0)return e.preventDefault(),"ArrowDown"===e.key?n++:"ArrowUp"===e.key?n--:"Home"===e.key?n=0:"End"===e.key&&(n=i.length-1),n<0&&(n=i.length-1),n>i.length-1&&(n=0),this.lastActiveItem=i[n],await this.focusableOne(i[n]),void this.focusOne(i[n])}}},e.Menu.styles=[ei,Bn],Se([zt({reflect:!0})],e.Menu.prototype,"selects",void 0),Se([zt()],e.Menu.prototype,"value",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Menu.prototype,"dense",void 0),Se([zt({reflect:!0,attribute:"submenu-trigger"})],e.Menu.prototype,"submenuTrigger",void 0),Se([zt({type:Number,reflect:!0,attribute:"submenu-open-delay"})],e.Menu.prototype,"submenuOpenDelay",void 0),Se([zt({type:Number,reflect:!0,attribute:"submenu-close-delay"})],e.Menu.prototype,"submenuCloseDelay",void 0),Se([Nt()],e.Menu.prototype,"selectedKeys",void 0),Se([Ft({flatten:!0,selector:"mdui-menu-item"})],e.Menu.prototype,"childrenItems",void 0),Se([xi("dense"),xi("selects"),xi("submenuTrigger"),xi("submenuOpenDelay"),xi("submenuCloseDelay")],e.Menu.prototype,"onSlotChange",null),Se([xi("selects",!0)],e.Menu.prototype,"onSelectsChange",null),Se([xi("selectedKeys",!0)],e.Menu.prototype,"onSelectedKeysChange",null),Se([xi("value")],e.Menu.prototype,"onValueChange",null),e.Menu=Se([_t("mdui-menu")],e.Menu);const On=Pe`:host{--shape-corner-indicator:var(--mdui-shape-corner-full);position:relative;z-index:0;flex:1;overflow:hidden;min-width:3rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}.container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;padding-top:.75rem;padding-bottom:.75rem}.container:not(.initial){transition:padding var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}mdui-ripple{z-index:1;left:50%;transform:translateX(-50%);width:4rem;height:2rem;margin-top:.75rem;border-radius:var(--mdui-shape-corner-full)}mdui-ripple:not(.initial){transition:margin-top var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.indicator{position:relative;display:flex;align-items:center;justify-content:center;background-color:transparent;border-radius:var(--shape-corner-indicator);height:2rem;width:2rem}:not(.initial) .indicator{transition:background-color var(--mdui-motion-duration-short1) var(--mdui-motion-easing-standard),width var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}::slotted([slot=badge]){position:absolute;transform:translate(50%,-50%)}::slotted([slot=badge][variant=small]){transform:translate(.5625rem,-.5625rem)}.active-icon,.icon{color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}.active-icon mdui-icon,.icon mdui-icon,::slotted([slot=active]),::slotted([slot=icon]){font-size:inherit}.icon{display:flex}.active-icon{display:none}.label{display:flex;align-items:center;height:1rem;color:rgb(var(--mdui-color-on-surface-variant));margin-top:.25rem;margin-bottom:.25rem;font-size:var(--mdui-typescale-label-medium-size);font-weight:var(--mdui-typescale-label-medium-weight);letter-spacing:var(--mdui-typescale-label-medium-tracking);line-height:var(--mdui-typescale-label-medium-line-height)}:not(.initial) .label{transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear)}:host(:not([active])) mdui-ripple.label-visibility-selected,mdui-ripple.label-visibility-unlabeled{margin-top:1.5rem}.container.label-visibility-unlabeled,:host(:not([active])) .container.label-visibility-selected{padding-top:1.5rem;padding-bottom:0}.container.label-visibility-unlabeled .label,:host(:not([active])) .container.label-visibility-selected .label{opacity:0}:host([active]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([active]) .indicator{width:4rem;background-color:rgb(var(--mdui-color-secondary-container))}:host([active]) .active-icon,:host([active]) .icon{color:rgb(var(--mdui-color-on-secondary-container))}:host([active]) .has-active-icon .active-icon{display:flex}:host([active]) .has-active-icon .icon{display:none}:host([active]) .label{color:rgb(var(--mdui-color-on-surface))}`;e.NavigationBarItem=class extends(Ki(Ji(Wi(Jt)))){constructor(){super(...arguments),this.isInitial=!0,this.active=!1,this.disabled=!1,this.key=Si(),this.rippleRef=Bi(),this.hasSlotController=new Zt(this,"active-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.href?this.renderRoot?.querySelector("._a"):this}get focusDisabled(){return this.disabled}render(){const e=Fi({"label-visibility-selected":"selected"===this.labelVisibility,"label-visibility-labeled":"labeled"===this.labelVisibility,"label-visibility-unlabeled":"unlabeled"===this.labelVisibility,initial:this.isInitial}),t=Fi([{container:!0,"has-active-icon":this.activeIcon||this.hasSlotController.test("active-icon")},e]);return ft`${this.href?this.renderAnchor({part:"container",className:t,content:this.renderInner()}):ft`
${this.renderInner()}
`}`}renderInner(){return ft`
${this.activeIcon?ft``:Qt}${this.icon?ft``:Qt}
`}},e.NavigationBarItem.styles=[ei,On],Se([zt({reflect:!0})],e.NavigationBarItem.prototype,"icon",void 0),Se([zt({reflect:!0,attribute:"active-icon"})],e.NavigationBarItem.prototype,"activeIcon",void 0),Se([zt({reflect:!0})],e.NavigationBarItem.prototype,"value",void 0),Se([Nt()],e.NavigationBarItem.prototype,"labelVisibility",void 0),Se([Nt()],e.NavigationBarItem.prototype,"isInitial",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.NavigationBarItem.prototype,"active",void 0),Se([Nt()],e.NavigationBarItem.prototype,"disabled",void 0),e.NavigationBarItem=Se([_t("mdui-navigation-bar-item")],e.NavigationBarItem);const zn=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;right:0;bottom:0;left:0;display:flex;flex:0 0 auto;overflow:hidden;border-radius:var(--shape-corner) var(--shape-corner) 0 0;z-index:var(--z-index);transition-property:transform;transition-duration:var(--mdui-motion-duration-long2);transition-timing-function:var(--mdui-motion-easing-emphasized);height:5rem;background-color:rgb(var(--mdui-color-surface));box-shadow:var(--mdui-elevation-level2)}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([hide]:not([hide=false i])){transform:translateY(5.625rem);transition-duration:var(--mdui-motion-duration-short4)}`;e.NavigationBar=class extends(Ri(Li)){constructor(){super(...arguments),this.hide=!1,this.labelVisibility="auto",this.activeKey=0,this.isInitial=!0,this.definedController=new Ci(this,{relatedElements:["mdui-navigation-bar-item"]})}get scrollPaddingPosition(){return"bottom"}get layoutPlacement(){return"bottom"}async onActiveKeyChange(){await this.definedController.whenDefined();const e=this.items.find((e=>e.key===this.activeKey));this.value=e?.value,this.isInitial||this.emit("change")}async onValueChange(){this.isInitial=!this.hasUpdated,await this.definedController.whenDefined();const e=this.items.find((e=>e.value===this.value));this.activeKey=e?.key??0,this.updateItems()}async onLabelVisibilityChange(){await this.definedController.whenDefined(),this.updateItems()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("transitionend",(e=>{e.target===this&&this.emit(this.hide?"hidden":"shown")}))}render(){return ft``}runScrollThreshold(e){if(!e&&!this.hide){this.emit("hide",{cancelable:!0})&&(this.hide=!0)}if(e&&this.hide){this.emit("show",{cancelable:!0})&&(this.hide=!1)}}onClick(e){if(e.button)return;const t=e.target.closest("mdui-navigation-bar-item");t&&(this.activeKey=t.key,this.isInitial=!1,this.updateItems())}updateItems(){const e=this.items,t="auto"===this.labelVisibility?e.length<=3?"labeled":"selected":this.labelVisibility;e.forEach((e=>{e.active=this.activeKey===e.key,e.labelVisibility=t,e.isInitial=this.isInitial}))}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems()}},e.NavigationBar.styles=[ei,zn],Se([zt({type:Boolean,reflect:!0,converter:ki})],e.NavigationBar.prototype,"hide",void 0),Se([zt({reflect:!0,attribute:"label-visibility"})],e.NavigationBar.prototype,"labelVisibility",void 0),Se([zt({reflect:!0})],e.NavigationBar.prototype,"value",void 0),Se([zt({reflect:!0,attribute:"scroll-behavior"})],e.NavigationBar.prototype,"scrollBehavior",void 0),Se([Nt()],e.NavigationBar.prototype,"activeKey",void 0),Se([Ft({selector:"mdui-navigation-bar-item",flatten:!0})],e.NavigationBar.prototype,"items",void 0),Se([xi("activeKey",!0)],e.NavigationBar.prototype,"onActiveKeyChange",null),Se([xi("value")],e.NavigationBar.prototype,"onValueChange",null),Se([xi("labelVisibility",!0)],e.NavigationBar.prototype,"onLabelVisibilityChange",null),e.NavigationBar=Se([_t("mdui-navigation-bar")],e.NavigationBar);const Nn=e=>{const t=s(),i=n(),o=t.getComputedStyle(i.documentElement),r=v(e)?M(e).innerWidth():d(e)?e:M(t).innerWidth(),a=e=>{const t=o.getPropertyValue(`--mdui-breakpoint-${e}`).toLowerCase();return parseFloat(t)};return{up:e=>r>=a(e),down:e=>r{switch(e){case"xs":return"sm";case"sm":return"md";case"md":return"lg";case"lg":return"xl";case"xl":return"xxl"}})(e))},not(e){return!this.only(e)},between(e,t){return this.up(e)&&this.down(t)}}},Fn=Pe`:host{--shape-corner:var(--mdui-shape-corner-large);--z-index:2200;display:none;position:fixed;top:0;bottom:0;left:0;z-index:1;width:22.5rem}:host([placement=right]){left:initial;right:0}:host([mobile]),:host([modal]:not([modal=false i])){top:0!important;right:0;bottom:0!important;width:initial;z-index:var(--z-index)}:host([placement=right][mobile]),:host([placement=right][modal]:not([modal=false i])){left:0}:host([contained]:not([contained=false i])){position:absolute}.overlay{position:absolute;inset:0;z-index:inherit;background-color:rgba(var(--mdui-color-scrim),.4)}.panel{display:block;position:absolute;top:0;bottom:0;left:0;width:100%;overflow:auto;z-index:inherit;background-color:rgb(var(--mdui-color-surface));box-shadow:var(--mdui-elevation-level0)}:host([placement=right]) .panel{left:initial;right:0}:host([mobile]) .panel,:host([modal]:not([modal=false i])) .panel{border-radius:0 var(--shape-corner) var(--shape-corner) 0;max-width:80%;width:22.5rem;background-color:rgb(var(--mdui-color-surface-container-low));box-shadow:var(--mdui-elevation-level1)}:host([placement=right][mobile]) .panel,:host([placement=right][modal]:not([modal=false i])) .panel{border-radius:var(--shape-corner) 0 0 var(--shape-corner)}`;e.NavigationDrawer=class extends Li{constructor(){super(...arguments),this.open=!1,this.modal=!1,this.closeOnEsc=!1,this.closeOnOverlayClick=!1,this.placement="left",this.contained=!1,this.mobile=!1,this.overlayRef=Bi(),this.panelRef=Bi(),this.definedController=new Ci(this,{needDomReady:!0})}get layoutPlacement(){return this.placement}get lockTarget(){return this.contained||this.isParentLayout?this.parentElement:document.documentElement}get isModal(){return this.mobile||this.modal}async onContainedChange(){await this.definedController.whenDefined(),this.observeResize?.unobserve(),this.setObserveResize()}onPlacementChange(){this.isParentLayout&&this.layoutManager.updateLayout(this)}async onMobileChange(){!this.open||this.isParentLayout||this.contained||(await this.definedController.whenDefined(),this.isModal?(Do(this,this.lockTarget),await this.getLockTargetAnimate(!1,0)):(Ao(this,this.lockTarget),await this.getLockTargetAnimate(!0,0)))}async onOpenChange(){let e=this.panelRef.value,t=this.overlayRef.value;const i="right"===this.placement,o=$o(this,"linear"),n=$o(this,"emphasized"),r=(e,t)=>{M(this.layoutManager.getItemsAndMain()).css("transition",p(e)?null:`all ${e}ms ${t}`)},s=async()=>{const i=[];if(this.isModal?i.push(t,e):this.isParentLayout||i.push(this.lockTarget),this.isParentLayout){const e=this.layoutManager.getItemsAndMain(),t=e.indexOf(this);i.push(...e.slice(t))}this.isModal||i.includes(this)||i.push(this),await Promise.all(i.map((e=>wo(e))))};if(this.open){const a=this.hasUpdated;if(a||(await this.updateComplete,e=this.panelRef.value,t=this.overlayRef.value),a){if(!this.emit("open",{cancelable:!0}))return}await this.definedController.whenDefined(),this.style.display="block",this.originalTrigger=document.activeElement,this.isModal&&(this.modalHelper.activate(),this.contained||Do(this,this.lockTarget)),await s(),requestAnimationFrame((()=>{const t=this.querySelector("[autofocus]");t?t.focus({preventScroll:!0}):e.focus({preventScroll:!0})}));const l=Ro(this,"long2"),c=[];if(this.isModal?c.push(yo(t,[{opacity:0},{opacity:1,offset:.3},{opacity:1}],{duration:a?l:0,easing:o})):this.isParentLayout||c.push(this.getLockTargetAnimate(!0,a?l:0)),this.isParentLayout&&a&&(r(l,n),this.layoutManager.updateLayout(this)),c.push(yo(this.isModal?e:this,[{transform:`translateX(${i?"":"-"}100%)`},{transform:"translateX(0)"}],{duration:a?l:0,easing:n})),await Promise.all(c),!this.open)return;this.isParentLayout&&a&&r(null),a&&this.emit("opened")}else if(this.hasUpdated){if(!this.emit("close",{cancelable:!0}))return;await this.definedController.whenDefined(),this.isModal&&this.modalHelper.deactivate(),await s();const a=Ro(this,"short4"),c=[];if(this.isModal?c.push(yo(t,[{opacity:1},{opacity:0}],{duration:a,easing:o})):this.isParentLayout||c.push(this.getLockTargetAnimate(!1,a)),this.isParentLayout&&(r(a,n),this.layoutManager.updateLayout(this,{width:0})),c.push(yo(this.isModal?e:this,[{transform:"translateX(0)"},{transform:`translateX(${i?"":"-"}100%)`}],{duration:a,easing:n})),await Promise.all(c),this.open)return;this.isParentLayout&&r(null),this.style.display="none",this.isModal&&!this.contained&&Ao(this,this.lockTarget);const d=this.originalTrigger;l(d?.focus)&&setTimeout((()=>d.focus())),this.emit("closed")}}connectedCallback(){super.connectedCallback(),this.modalHelper=new xo(this),this.definedController.whenDefined().then((()=>{this.setObserveResize()}))}disconnectedCallback(){super.disconnectedCallback(),Ao(this,this.lockTarget),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",(e=>{this.open&&this.closeOnEsc&&"Escape"===e.key&&this.isModal&&(e.stopPropagation(),this.open=!1)}))}render(){return ft`${bo(this.isModal,(()=>ft`
`))}`}setObserveResize(){this.observeResize=Di(this.contained?this.parentElement:document.documentElement,(()=>{const e=this.contained?this.parentElement:void 0;this.mobile=Nn(e).down("md"),this.isParentLayout&&this.layoutManager.updateLayout(this,{width:this.isModal?0:void 0})}))}onOverlayClick(){this.emit("overlay-click"),this.closeOnOverlayClick&&(this.open=!1)}getLockTargetAnimate(e,t){const i="right"===this.placement?"paddingRight":"paddingLeft",o=M(this.panelRef.value).innerWidth()+"px";return yo(this.lockTarget,[{[i]:e?0:o},{[i]:e?o:0}],{duration:t,easing:$o(this,"emphasized"),fill:"forwards"})}},e.NavigationDrawer.styles=[ei,Fn],Se([zt({type:Boolean,reflect:!0,converter:ki})],e.NavigationDrawer.prototype,"open",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.NavigationDrawer.prototype,"modal",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"close-on-esc"})],e.NavigationDrawer.prototype,"closeOnEsc",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"close-on-overlay-click"})],e.NavigationDrawer.prototype,"closeOnOverlayClick",void 0),Se([zt({reflect:!0})],e.NavigationDrawer.prototype,"placement",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.NavigationDrawer.prototype,"contained",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.NavigationDrawer.prototype,"mobile",void 0),Se([xi("contained",!0)],e.NavigationDrawer.prototype,"onContainedChange",null),Se([xi("placement",!0)],e.NavigationDrawer.prototype,"onPlacementChange",null),Se([xi("mobile",!0),xi("modal",!0)],e.NavigationDrawer.prototype,"onMobileChange",null),Se([xi("open")],e.NavigationDrawer.prototype,"onOpenChange",null),e.NavigationDrawer=Se([_t("mdui-navigation-drawer")],e.NavigationDrawer);const Vn=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;top:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;border-radius:0 var(--shape-corner) var(--shape-corner) 0;z-index:var(--z-index);width:5rem;background-color:rgb(var(--mdui-color-surface));padding:.375rem .75rem}:host([contained]:not([contained=false i])){position:absolute}:host([divider]:not([divider=false i])){border-right:.0625rem solid rgb(var(--mdui-color-surface-variant));width:5.0625rem}:host([placement=right]){left:initial;right:0;border-radius:var(--shape-corner) 0 0 var(--shape-corner)}:host([placement=right][divider]:not([divider=false i])){border-right:none;border-left:.0625rem solid rgb(var(--mdui-color-surface-variant))}.bottom,.items,.top{display:flex;flex-direction:column;align-items:center;width:100%}.top{margin-bottom:1.75rem}.bottom{margin-top:1.75rem}::slotted([slot=bottom]),::slotted([slot=top]),::slotted(mdui-navigation-rail-item){margin-top:.375rem;margin-bottom:.375rem}:host([alignment=start]) .top-spacer{flex-grow:0}:host([alignment=start]) .bottom-spacer{flex-grow:1}:host([alignment=end]) .top-spacer{flex-grow:1}:host([alignment=end]) .bottom-spacer{flex-grow:0}:host([alignment=center]){justify-content:center}:host([alignment=center]) .bottom,:host([alignment=center]) .top{position:absolute}:host([alignment=center]) .top{top:.375rem}:host([alignment=center]) .bottom{bottom:.375rem}`;e.NavigationRail=class extends Li{constructor(){super(...arguments),this.placement="left",this.alignment="start",this.contained=!1,this.divider=!1,this.activeKey=0,this.hasSlotController=new Zt(this,"top","bottom"),this.definedController=new Ci(this,{relatedElements:["mdui-navigation-rail-item"]}),this.isInitial=!0}get layoutPlacement(){return this.placement}get parentTarget(){return this.contained||this.isParentLayout?this.parentElement:document.body}get isRight(){return"right"===this.placement}get paddingValue(){return["fixed","absolute"].includes(M(this).css("position"))?this.offsetWidth:void 0}async onActiveKeyChange(){await this.definedController.whenDefined();const e=this.items.find((e=>e.key===this.activeKey));this.value=e?.value,this.isInitial||this.emit("change")}async onValueChange(){this.isInitial=!this.hasUpdated,await this.definedController.whenDefined();const e=this.items.find((e=>e.value===this.value));this.activeKey=e?.key??0,this.updateItems()}async onContainedChange(){this.isParentLayout||(await this.definedController.whenDefined(),M(document.body).css({paddingLeft:this.contained||this.isRight?null:this.paddingValue,paddingRight:this.contained||!this.isRight?null:this.paddingValue}),M(this.parentElement).css({paddingLeft:this.contained&&!this.isRight?this.paddingValue:null,paddingRight:this.contained&&this.isRight?this.paddingValue:null}))}async onPlacementChange(){await this.definedController.whenDefined(),this.layoutManager?.updateLayout(this),this.items.forEach((e=>{e.placement=this.placement})),this.isParentLayout||M(this.parentTarget).css({paddingLeft:this.isRight?null:this.paddingValue,paddingRight:this.isRight?this.paddingValue:null})}connectedCallback(){super.connectedCallback(),this.isParentLayout||this.definedController.whenDefined().then((()=>{M(this.parentTarget).css({paddingLeft:this.isRight?null:this.paddingValue,paddingRight:this.isRight?this.paddingValue:null})}))}disconnectedCallback(){super.disconnectedCallback(),!this.isParentLayout&&this.definedController.isDefined()&&M(this.parentTarget).css({paddingLeft:this.isRight?void 0:null,paddingRight:this.isRight?null:void 0})}render(){const e=this.hasSlotController.test("top"),t=this.hasSlotController.test("bottom");return ft`${bo(e,(()=>ft``))} ${bo(t,(()=>ft``))}`}onClick(e){if(e.button)return;const t=e.target.closest("mdui-navigation-rail-item");t&&(this.activeKey=t.key,this.isInitial=!1,this.updateItems())}updateItems(){this.items.forEach((e=>{e.active=this.activeKey===e.key,e.placement=this.placement,e.isInitial=this.isInitial}))}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems()}},e.NavigationRail.styles=[ei,Vn],Se([zt({reflect:!0})],e.NavigationRail.prototype,"value",void 0),Se([zt({reflect:!0})],e.NavigationRail.prototype,"placement",void 0),Se([zt({reflect:!0})],e.NavigationRail.prototype,"alignment",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.NavigationRail.prototype,"contained",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.NavigationRail.prototype,"divider",void 0),Se([Nt()],e.NavigationRail.prototype,"activeKey",void 0),Se([Ft({selector:"mdui-navigation-rail-item",flatten:!0})],e.NavigationRail.prototype,"items",void 0),Se([xi("activeKey",!0)],e.NavigationRail.prototype,"onActiveKeyChange",null),Se([xi("value")],e.NavigationRail.prototype,"onValueChange",null),Se([xi("contained",!0)],e.NavigationRail.prototype,"onContainedChange",null),Se([xi("placement",!0)],e.NavigationRail.prototype,"onPlacementChange",null),e.NavigationRail=Se([_t("mdui-navigation-rail")],e.NavigationRail);const Hn=Pe`:host{--shape-corner-indicator:var(--mdui-shape-corner-full);position:relative;z-index:0;width:100%;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface-variant)}.container{display:flex;flex-direction:column;align-items:center;justify-content:center;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;height:3.5rem}.container:not(.initial){transition:padding var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}mdui-ripple{z-index:1;width:3.5rem;height:2rem;border-radius:var(--mdui-shape-corner-full)}.container:not(.has-label)+mdui-ripple{height:3.5rem}.indicator{position:relative;display:flex;align-items:center;justify-content:center;background-color:transparent;border-radius:var(--shape-corner-indicator);height:2rem;width:2rem}:not(.initial) .indicator{transition:background-color var(--mdui-motion-duration-short1) var(--mdui-motion-easing-standard),width var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard),height var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}::slotted([slot=badge]){position:absolute;transform:translate(50%,-50%)}.placement-right::slotted([slot=badge]){transform:translate(-50%,-50%)}::slotted([slot=badge][variant=small]){transform:translate(.5625rem,-.5625rem)}.placement-right::slotted([slot=badge][variant=small]){transform:translate(-.5625rem,-.5625rem)}.active-icon,.icon{color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}.active-icon mdui-icon,.icon mdui-icon,::slotted([slot=active-icon]),::slotted([slot=icon]){font-size:inherit}.icon{display:flex}.active-icon{display:none}.label{display:flex;align-items:center;height:1rem;color:rgb(var(--mdui-color-on-surface-variant));margin-top:.25rem;margin-bottom:.25rem;font-size:var(--mdui-typescale-label-medium-size);font-weight:var(--mdui-typescale-label-medium-weight);letter-spacing:var(--mdui-typescale-label-medium-tracking);line-height:var(--mdui-typescale-label-medium-line-height)}:not(.initial) .label{transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear)}:host([active]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([active]) .indicator{width:3.5rem;background-color:rgb(var(--mdui-color-secondary-container))}:host([active]) :not(.has-label) .indicator{height:3.5rem}:host([active]) .active-icon,:host([active]) .icon{color:rgb(var(--mdui-color-on-secondary-container))}:host([active]) .has-active-icon .active-icon{display:flex}:host([active]) .has-active-icon .icon{display:none}:host([active]) .label{color:rgb(var(--mdui-color-on-surface))}`;e.NavigationRailItem=class extends(Ki(Ji(Wi(Jt)))){constructor(){super(...arguments),this.active=!1,this.isInitial=!0,this.placement="left",this.disabled=!1,this.key=Si(),this.rippleRef=Bi(),this.hasSlotController=new Zt(this,"[default]","active-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.href?this.renderRoot?.querySelector("._a"):this}get focusDisabled(){return this.disabled}render(){const e=this.hasSlotController.test("[default]"),t=Fi({container:!0,"has-label":e,"has-active-icon":this.activeIcon||this.hasSlotController.test("active-icon"),initial:this.isInitial});return ft`${this.href?this.renderAnchor({part:"container",className:t,content:this.renderInner(e)}):ft`
${this.renderInner(e)}
`}`}renderInner(e){return ft`
${this.activeIcon?ft``:Qt}${this.icon?ft``:Qt}
${e?ft``:gt}`}},e.NavigationRailItem.styles=[ei,Hn],Se([zt({reflect:!0})],e.NavigationRailItem.prototype,"icon",void 0),Se([zt({reflect:!0,attribute:"active-icon"})],e.NavigationRailItem.prototype,"activeIcon",void 0),Se([zt({reflect:!0})],e.NavigationRailItem.prototype,"value",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.NavigationRailItem.prototype,"active",void 0),Se([Nt()],e.NavigationRailItem.prototype,"isInitial",void 0),Se([Nt()],e.NavigationRailItem.prototype,"placement",void 0),Se([Nt()],e.NavigationRailItem.prototype,"disabled",void 0),e.NavigationRailItem=Se([_t("mdui-navigation-rail-item")],e.NavigationRailItem);let Un=class extends Pt{render(){return so('')}};Un.styles=ro,Un=Se([_t("mdui-icon-circle")],Un);let Kn=class extends Pt{render(){return so('')}};Kn.styles=ro,Kn=Se([_t("mdui-icon-radio-button-unchecked")],Kn);const qn=Pe`:host{position:relative;display:inline-flex;align-items:center;cursor:pointer;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none;border-radius:.125rem;font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.icon{display:flex;position:absolute;font-size:1.5rem}:not(.initial) .icon{transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard)}.unchecked-icon{transition-property:color;color:rgb(var(--mdui-color-on-surface-variant))}:host([focused]) .unchecked-icon,:host([hover]) .unchecked-icon,:host([pressed]) .unchecked-icon{color:rgb(var(--mdui-color-on-surface))}.checked-icon{opacity:0;transform:scale(.2);transition-property:color,opacity,transform;color:rgb(var(--mdui-color-primary))}.icon .i,::slotted([slot=checked-icon]),::slotted([slot=unchecked-icon]){color:inherit;font-size:inherit}i{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;border-radius:50%;width:2.5rem;height:2.5rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.label{display:flex;width:100%;padding-top:.625rem;padding-bottom:.625rem;color:rgb(var(--mdui-color-on-surface))}.label:not(.initial){transition:color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}:host([checked]:not([checked=false i])) i{--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([checked]:not([checked=false i])) .icon{color:rgb(var(--mdui-color-primary))}:host([checked]:not([checked=false i])) .checked-icon{opacity:1;transform:scale(.5)}i.invalid{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}i.invalid .icon{color:rgb(var(--mdui-color-error))}.label.invalid{color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])),:host([group-disabled]){cursor:default;pointer-events:none}:host([disabled]:not([disabled=false i])) .icon,:host([group-disabled]) .icon{color:rgba(var(--mdui-color-on-surface),38%)}:host([disabled]:not([disabled=false i])) .label,:host([group-disabled]) .label{color:rgba(var(--mdui-color-on-surface),38%)}`;e.Radio=class extends(Ji(Wi(Jt))){constructor(){super(...arguments),this.value="",this.disabled=!1,this.checked=!1,this.invalid=!1,this.groupDisabled=!1,this.focusable=!0,this.isInitial=!0,this.rippleRef=Bi()}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.isDisabled()}get focusElement(){return this}get focusDisabled(){return this.isDisabled()||!this.focusable}onCheckedChange(){this.emit("change")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",(()=>{this.isDisabled()||(this.checked=!0)}))}render(){const e=Gi({invalid:this.invalid,initial:this.isInitial});return ft`${this.uncheckedIcon?ft``:ft``}${this.checkedIcon?ft``:ft``}`}isDisabled(){return this.disabled||this.groupDisabled}},e.Radio.styles=[ei,qn],Se([zt({reflect:!0})],e.Radio.prototype,"value",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Radio.prototype,"disabled",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Radio.prototype,"checked",void 0),Se([zt({reflect:!0,attribute:"unchecked-icon"})],e.Radio.prototype,"uncheckedIcon",void 0),Se([zt({reflect:!0,attribute:"checked-icon"})],e.Radio.prototype,"checkedIcon",void 0),Se([Nt()],e.Radio.prototype,"invalid",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"group-disabled"})],e.Radio.prototype,"groupDisabled",void 0),Se([Nt()],e.Radio.prototype,"focusable",void 0),Se([Nt()],e.Radio.prototype,"isInitial",void 0),Se([xi("checked",!0)],e.Radio.prototype,"onCheckedChange",null),e.Radio=Se([_t("mdui-radio")],e.Radio);const jn=Pe`:host{display:inline-block}fieldset{border:none;padding:0;margin:0;min-width:0}input{position:absolute;padding:0;opacity:0;pointer-events:none;width:1.25rem;height:1.25rem;margin:0 0 0 .625rem}`;function*Wn(e,t){if(void 0!==e){let i=0;for(const o of e)yield t(o,i++)}}e.RadioGroup=class extends Jt{constructor(){super(...arguments),this.disabled=!1,this.name="",this.value="",this.defaultValue="",this.required=!1,this.invalid=!1,this.isInitial=!0,this.inputRef=Bi(),this.formController=new Ui(this),this.definedController=new Ci(this,{relatedElements:["mdui-radio"]})}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get items(){return M(this).find("mdui-radio").get()}get itemsEnabled(){return M(this).find("mdui-radio:not([disabled])").get()}async onValueChange(){this.isInitial=!1,await this.definedController.whenDefined(),this.emit("input"),this.emit("change"),this.updateItems(),this.updateRadioFocusable(),await this.updateComplete;const e=this.formController.getForm();e&&Hi.get(e)?.has(this)?(this.invalid=!1,Hi.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}async onInvalidChange(){await this.definedController.whenDefined(),this.updateItems()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){if(this.invalid=!this.inputRef.value.reportValidity(),this.invalid){this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.inputRef.value.blur(),this.inputRef.value.focus())}return!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return ft`
`}updateRadioFocusable(){const e=this.items,t=e.find((e=>e.checked));t?e.forEach((e=>{e.focusable=e===t})):this.itemsEnabled.forEach(((e,t)=>{e.focusable=!t}))}async onClick(e){await this.definedController.whenDefined();const t=e.target.closest("mdui-radio");t&&!t.disabled&&(this.value=t.value,await this.updateComplete,t.focus())}async onKeyDown(e){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key))return;e.preventDefault(),await this.definedController.whenDefined();const t=this.itemsEnabled,i=t.find((e=>e.checked))??t[0],o=" "===e.key?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1;let n=t.indexOf(i)+o;n<0&&(n=t.length-1),n>t.length-1&&(n=0),this.value=t[n].value,await this.updateComplete,t[n].focus()}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems(),this.updateRadioFocusable()}onCheckedChange(e){e.stopPropagation()}updateItems(){this.items.forEach((e=>{e.checked=e.value===this.value,e.invalid=this.invalid,e.groupDisabled=this.disabled,e.isInitial=this.isInitial}))}},e.RadioGroup.styles=[ei,jn],Se([zt({type:Boolean,reflect:!0,converter:ki})],e.RadioGroup.prototype,"disabled",void 0),Se([zt({reflect:!0})],e.RadioGroup.prototype,"form",void 0),Se([zt({reflect:!0})],e.RadioGroup.prototype,"name",void 0),Se([zt({reflect:!0})],e.RadioGroup.prototype,"value",void 0),Se([no()],e.RadioGroup.prototype,"defaultValue",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.RadioGroup.prototype,"required",void 0),Se([Nt()],e.RadioGroup.prototype,"invalid",void 0),Se([xi("value",!0)],e.RadioGroup.prototype,"onValueChange",null),Se([xi("invalid",!0),xi("disabled")],e.RadioGroup.prototype,"onInvalidChange",null),e.RadioGroup=Se([_t("mdui-radio-group")],e.RadioGroup);const Gn=Pe`:host{position:relative;display:block;width:100%;-webkit-tap-highlight-color:transparent;height:2.5rem;padding:0 1.25rem}label{position:relative;display:block;width:100%;height:100%}input[type=range]{position:absolute;inset:0;z-index:4;height:100%;cursor:pointer;opacity:0;appearance:none;width:calc(100% + 20rem * 2 / 16);margin:0 -1.25rem;padding:0 .75rem}:host([disabled]:not([disabled=false i])) input[type=range]{cursor:not-allowed}.track-active,.track-inactive{position:absolute;top:50%;height:.25rem;margin-top:-.125rem}.track-inactive{left:-.125rem;right:-.125rem;border-radius:var(--mdui-shape-corner-full);background-color:rgb(var(--mdui-color-surface-container-highest))}.invalid .track-inactive{background-color:rgba(var(--mdui-color-error),.12)}:host([disabled]:not([disabled=false i])) .track-inactive{background-color:rgba(var(--mdui-color-on-surface),.12)}.track-active{background-color:rgb(var(--mdui-color-primary))}.invalid .track-active{background-color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])) .track-active{background-color:rgba(var(--mdui-color-on-surface),.38)}.handle{position:absolute;top:50%;transform:translate(-50%);cursor:pointer;z-index:2;width:2.5rem;height:2.5rem;margin-top:-1.25rem;--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}.invalid .handle{--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}.handle .elevation,.handle::before{position:absolute;display:block;content:' ';left:.625rem;top:.625rem;width:1.25rem;height:1.25rem;border-radius:var(--mdui-shape-corner-full)}.handle .elevation{background-color:rgb(var(--mdui-color-primary));box-shadow:var(--mdui-elevation-level1)}.invalid .handle .elevation{background-color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])) .handle .elevation{background-color:rgba(var(--mdui-color-on-surface),.38);box-shadow:var(--mdui-elevation-level0)}.handle::before{background-color:rgb(var(--mdui-color-background))}.handle mdui-ripple{border-radius:var(--mdui-shape-corner-full)}.label{position:absolute;left:50%;transform:translateX(-50%) scale(0);transform-origin:center bottom;display:flex;align-items:center;justify-content:center;cursor:default;white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none;transition:transform var(--mdui-motion-duration-short2) var(--mdui-motion-easing-standard);bottom:2.5rem;min-width:1.75rem;height:1.75rem;padding:.375rem .5rem;border-radius:var(--mdui-shape-corner-full);color:rgb(var(--mdui-color-on-primary));font-size:var(--mdui-typescale-label-medium-size);font-weight:var(--mdui-typescale-label-medium-weight);letter-spacing:var(--mdui-typescale-label-medium-tracking);line-height:var(--mdui-typescale-label-medium-line-height);background-color:rgb(var(--mdui-color-primary))}.invalid .label{color:rgb(var(--mdui-color-on-error));background-color:rgb(var(--mdui-color-error))}.label::after{content:' ';position:absolute;z-index:-1;transform:rotate(45deg);width:.875rem;height:.875rem;bottom:-.125rem;background-color:rgb(var(--mdui-color-primary))}.invalid .label::after{background-color:rgb(var(--mdui-color-error))}.label-visible{transform:translateX(-50%) scale(1);transition:transform var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.tickmark{position:absolute;top:50%;transform:translate(-50%);width:.125rem;height:.125rem;margin-top:-.0625rem;border-radius:var(--mdui-shape-corner-full);background-color:rgba(var(--mdui-color-on-surface-variant),.38)}.invalid .tickmark{background-color:rgba(var(--mdui-color-error),.38)}.tickmark.active{background-color:rgba(var(--mdui-color-on-primary),.38)}.invalid .tickmark.active{background-color:rgba(var(--mdui-color-on-error),.38)}:host([disabled]:not([disabled=false i])) .tickmark{background-color:rgba(var(--mdui-color-on-surface),.38)}`;class Yn extends(Ji(Wi(Jt))){constructor(){super(...arguments),this.min=0,this.max=100,this.step=1,this.tickmarks=!1,this.nolabel=!1,this.disabled=!1,this.name="",this.invalid=!1,this.labelVisible=!1,this.inputRef=Bi(),this.trackActiveRef=Bi(),this.labelFormatter=e=>e.toString()}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get rippleDisabled(){return this.disabled}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}onDisabledChange(){this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){if(this.invalid=!this.inputRef.value.reportValidity(),this.invalid){this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.blur(),this.focus())}return!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}fixValue(e){const{min:t,max:i,step:o}=this;e=Math.min(Math.max(e,t),i);let n=t+Math.round((e-t)/o)*o;return n>i&&(n-=o),n}getCandidateValues(){return Array.from({length:this.max-this.min+1},((e,t)=>t+this.min)).filter((e=>!((e-this.min)%this.step)))}renderLabel(e){return bo(!this.nolabel,(()=>ft`
${this.labelFormatter(e)}
`))}onChange(){this.emit("change")}}Yn.styles=[ei,Gn],Se([zt({type:Number,reflect:!0})],Yn.prototype,"min",void 0),Se([zt({type:Number,reflect:!0})],Yn.prototype,"max",void 0),Se([zt({type:Number,reflect:!0})],Yn.prototype,"step",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],Yn.prototype,"tickmarks",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],Yn.prototype,"nolabel",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],Yn.prototype,"disabled",void 0),Se([zt({reflect:!0})],Yn.prototype,"form",void 0),Se([zt({reflect:!0})],Yn.prototype,"name",void 0),Se([Nt()],Yn.prototype,"invalid",void 0),Se([Nt()],Yn.prototype,"labelVisible",void 0),Se([zt({attribute:!1})],Yn.prototype,"labelFormatter",void 0),Se([xi("disabled",!0)],Yn.prototype,"onDisabledChange",null),e.RangeSlider=class extends Yn{constructor(){super(...arguments),this.defaultValue=[],this.currentHandle="start",this.rippleStartRef=Bi(),this.rippleEndRef=Bi(),this.handleStartRef=Bi(),this.handleEndRef=Bi(),this.formController=new Ui(this),this._value=[],this.getRippleIndex=()=>this.hoverHandle?"start"===this.hoverHandle?0:1:"start"===this.currentHandle?0:1}get value(){return this._value}set value(e){const t=[...this._value];this._value=[this.fixValue(e[0]),this.fixValue(e[1])],this.requestUpdate("value",t),this.updateComplete.then((()=>{this.updateStyle();const e=this.formController.getForm();e&&Hi.get(e)?.has(this)?(this.invalid=!1,Hi.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}))}get rippleElement(){return[this.rippleStartRef.value,this.rippleEndRef.value]}connectedCallback(){super.connectedCallback(),this.value.length||(this.value=[this.min,this.max]),this.value[0]=this.fixValue(this.value[0]),this.value[1]=this.fixValue(this.value[1]),this.defaultValue.length||(this.defaultValue=[...this.value])}firstUpdated(e){super.firstUpdated(e);const t=e=>{const t=M(this),i=parseFloat(t.css("padding-left")),o=parseFloat(t.css("padding-right")),n=(e.offsetX-i)/(this.clientWidth-i-o);return(this.max-this.min)*n+this.min>(this.value[1]-this.value[0])/2+this.value[0]?"end":"start"},i=()=>{this.disabled||(this.labelVisible=!0)},o=()=>{this.disabled||(this.labelVisible=!1)};this.addEventListener("touchstart",i),this.addEventListener("mousedown",i),this.addEventListener("touchend",o),this.addEventListener("mouseup",o),this.addEventListener("pointerdown",(e=>{this.currentHandle=t(e)})),this.addEventListener("pointermove",(e=>{const i=t(e);this.hoverHandle!==i&&(this.endHover(e),this.hoverHandle=i,this.startHover(e))})),this.updateStyle()}render(){return ft``}updateStyle(){const e=e=>(e-this.min)/(this.max-this.min)*100,t=e(this.value[0]),i=e(this.value[1]);this.trackActiveRef.value.style.width=i-t+"%",this.trackActiveRef.value.style.left=`${t}%`,this.handleStartRef.value.style.left=`${t}%`,this.handleEndRef.value.style.left=`${i}%`}onInput(){const e="start"===this.currentHandle,t=parseFloat(this.inputRef.value.value),i=this.value[0],o=this.value[1],n=()=>{this.updateStyle()};e?t<=o?(this.value=[t,o],n()):i!==o&&(this.value=[o,o],n()):t>=i?(this.value=[i,t],n()):i!==o&&(this.value=[i,i],n())}},e.RangeSlider.styles=[Yn.styles],Se([no()],e.RangeSlider.prototype,"defaultValue",void 0),Se([Nt()],e.RangeSlider.prototype,"currentHandle",void 0),Se([zt({type:Array,attribute:!1})],e.RangeSlider.prototype,"value",null),e.RangeSlider=Se([_t("mdui-range-slider")],e.RangeSlider);const Xn=Pe`:host{position:relative;display:inline-flex;flex-grow:1;flex-shrink:0;float:left;height:100%;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:transparent;border:.0625rem solid rgb(var(--mdui-color-outline))}.button{width:100%;padding:0 .75rem}:host([invalid]){color:rgb(var(--mdui-color-error));border-color:rgb(var(--mdui-color-error))}:host([invalid]) .button{background-color:rgb(var(--mdui-color-error-container))}:host([selected]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var( - --mdui-color-on-secondary-container - )}:host([disabled]:not([disabled=false i])),:host([group-disabled]){cursor:default;pointer-events:none;color:rgba(var(--mdui-color-on-surface),38%);border-color:rgba(var(--mdui-color-on-surface),12%)}:host([loading]:not([loading=false i])){cursor:default;pointer-events:none}:host(:not(.mdui-segmented-button-first)){margin-left:-.0625rem}:host(.mdui-segmented-button-first){border-radius:var(--shape-corner) 0 0 var(--shape-corner)}:host(.mdui-segmented-button-last){border-radius:0 var(--shape-corner) var(--shape-corner) 0}.end-icon,.icon,.selected-icon{display:inline-flex;font-size:1.28571429em}.end-icon .i,.icon .i,.selected-icon .i,::slotted([slot=end-icon]),::slotted([slot=icon]),::slotted([slot=selected-icon]){font-size:inherit}mdui-circular-progress{width:1.125rem;height:1.125rem}:host([disabled]:not([disabled=false i])) mdui-circular-progress{opacity:.38}.label{display:inline-flex}.has-icon .label{padding-left:.5rem}.has-end-icon .label{padding-right:.5rem}`;e.SegmentedButton=class extends Qi{constructor(){super(...arguments),this.selected=!1,this.invalid=!1,this.groupDisabled=!1,this.key=Si(),this.rippleRef=Bi(),this.hasSlotController=new Zt(this,"[default]","icon","end-icon")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.isDisabled()||this.loading}get focusDisabled(){return this.isDisabled()||this.loading}render(){const e=Fi({button:!0,"has-icon":this.icon||this.selected||this.loading||this.hasSlotController.test("icon"),"has-end-icon":this.endIcon||this.hasSlotController.test("end-icon")});return ft`${this.isButton()?this.renderButton({className:e,part:"button",content:this.renderInner()}):this.isDisabled()||this.loading?ft`${this.renderInner()}`:this.renderAnchor({className:e,part:"button",content:this.renderInner()})}`}isDisabled(){return this.disabled||this.groupDisabled}renderIcon(){return this.loading?this.renderLoading():this.selected?ft`${this.selectedIcon?ft``:ft``}`:ft`${this.icon?ft``:Qt}`}renderLabel(){return this.hasSlotController.test("[default]")?ft``:Qt}renderEndIcon(){return ft`${this.endIcon?ft``:Qt}`}renderInner(){return[this.renderIcon(),this.renderLabel(),this.renderEndIcon()]}},e.SegmentedButton.styles=[Qi.styles,Xn],Se([zt({reflect:!0})],e.SegmentedButton.prototype,"icon",void 0),Se([zt({reflect:!0,attribute:"end-icon"})],e.SegmentedButton.prototype,"endIcon",void 0),Se([zt({reflect:!0,attribute:"selected-icon"})],e.SegmentedButton.prototype,"selectedIcon",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.SegmentedButton.prototype,"selected",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.SegmentedButton.prototype,"invalid",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"group-disabled"})],e.SegmentedButton.prototype,"groupDisabled",void 0),e.SegmentedButton=Se([_t("mdui-segmented-button")],e.SegmentedButton);const Jn=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);position:relative;display:inline-flex;vertical-align:middle;height:2.5rem;font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height);color:rgb(var(--mdui-color-on-surface));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([full-width]:not([full-width=false i])){display:flex;flex-wrap:nowrap}input,select{position:absolute;width:100%;height:100%;padding:0;opacity:0;pointer-events:none}`;e.SegmentedButtonGroup=class extends Jt{constructor(){super(...arguments),this.fullWidth=!1,this.disabled=!1,this.required=!1,this.name="",this.value="",this.defaultValue="",this.selectedKeys=[],this.invalid=!1,this.isInitial=!0,this.inputRef=Bi(),this.formController=new Ui(this),this.definedController=new Ci(this,{relatedElements:["mdui-segmented-button"]})}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get items(){return M(this).find("mdui-segmented-button").get()}get itemsEnabled(){return M(this).find("mdui-segmented-button:not([disabled])").get()}get isSingle(){return"single"===this.selects}get isMultiple(){return"multiple"===this.selects}get isSelectable(){return this.isSingle||this.isMultiple}async onSelectsChange(){this.isSelectable?this.isSingle&&this.setSelectedKeys(this.selectedKeys.slice(0,1)):this.setSelectedKeys([]),await this.onSelectedKeysChange()}async onSelectedKeysChange(){await this.definedController.whenDefined();const e=this.itemsEnabled.filter((e=>this.selectedKeys.includes(e.key))).map((e=>e.value)),t=this.isMultiple?e:e[0]||"";this.setValue(t),this.isInitial||this.emit("change")}async onValueChange(){if(this.isInitial=!this.hasUpdated,await this.definedController.whenDefined(),!this.isSelectable)return void this.updateItems();const e=(this.isSingle||c(this.value)?[this.value]:this.value).filter((e=>e));if(e.length)if(this.isSingle){const t=this.itemsEnabled.find((t=>t.value===e[0]));this.setSelectedKeys(t?[t.key]:[])}else this.isMultiple&&this.setSelectedKeys(this.itemsEnabled.filter((t=>e.includes(t.value))).map((e=>e.key)));else this.setSelectedKeys([]);if(this.updateItems(),!this.isInitial){const e=this.formController.getForm();e&&Hi.get(e)?.has(this)?(this.invalid=!1,Hi.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}}async onInvalidChange(){await this.definedController.whenDefined(),this.updateItems()}connectedCallback(){super.connectedCallback(),this.value=this.isMultiple&&c(this.value)?this.value?[this.value]:[]:this.value,this.defaultValue="multiple"===this.selects?[]:""}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){if(this.invalid=!this.inputRef.value.reportValidity(),this.invalid){this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.inputRef.value.blur(),this.inputRef.value.focus())}return!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return ft`${bo(this.isSelectable&&this.isSingle,(()=>ft``))}${bo(this.isSelectable&&this.isMultiple,(()=>ft``))}`}selectOne(e){if(this.isMultiple){const t=[...this.selectedKeys];t.includes(e.key)?t.splice(t.indexOf(e.key),1):t.push(e.key),this.setSelectedKeys(t)}this.isSingle&&(this.selectedKeys.includes(e.key)?this.setSelectedKeys([]):this.setSelectedKeys([e.key])),this.isInitial=!1,this.updateItems()}async onClick(e){if(e.button)return;await this.definedController.whenDefined();const t=e.target.closest("mdui-segmented-button");t&&!t.disabled&&this.isSelectable&&t.value&&this.selectOne(t)}async onInputKeyDown(e){if(["Enter"," "].includes(e.key)){if(e.preventDefault(),await this.definedController.whenDefined(),this.isSingle){const t=e.target;t.checked=!t.checked,this.selectOne(this.itemsEnabled[0]),this.itemsEnabled[0].focus()}this.isMultiple&&(this.selectOne(this.itemsEnabled[0]),this.itemsEnabled[0].focus())}}async onSlotChange(){await this.definedController.whenDefined(),this.updateItems(!0)}setSelectedKeys(e){fo(this.selectedKeys,e)||(this.selectedKeys=e)}setValue(e){this.isSingle?this.value=e:fo(this.value,e)||(this.value=e)}updateItems(e=!1){const t=this.items;t.forEach(((i,o)=>{i.invalid=this.invalid,i.groupDisabled=this.disabled,i.selected=this.selectedKeys.includes(i.key),e&&(i.classList.toggle("mdui-segmented-button-first",0===o),i.classList.toggle("mdui-segmented-button-last",o===t.length-1))}))}},e.SegmentedButtonGroup.styles=[ei,Jn],Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"full-width"})],e.SegmentedButtonGroup.prototype,"fullWidth",void 0),Se([zt({reflect:!0})],e.SegmentedButtonGroup.prototype,"selects",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.SegmentedButtonGroup.prototype,"disabled",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.SegmentedButtonGroup.prototype,"required",void 0),Se([zt({reflect:!0})],e.SegmentedButtonGroup.prototype,"form",void 0),Se([zt({reflect:!0})],e.SegmentedButtonGroup.prototype,"name",void 0),Se([zt()],e.SegmentedButtonGroup.prototype,"value",void 0),Se([no()],e.SegmentedButtonGroup.prototype,"defaultValue",void 0),Se([Nt()],e.SegmentedButtonGroup.prototype,"selectedKeys",void 0),Se([Nt()],e.SegmentedButtonGroup.prototype,"invalid",void 0),Se([xi("selects",!0)],e.SegmentedButtonGroup.prototype,"onSelectsChange",null),Se([xi("selectedKeys",!0)],e.SegmentedButtonGroup.prototype,"onSelectedKeysChange",null),Se([xi("value")],e.SegmentedButtonGroup.prototype,"onValueChange",null),Se([xi("invalid",!0),xi("disabled")],e.SegmentedButtonGroup.prototype,"onInvalidChange",null),e.SegmentedButtonGroup=Se([_t("mdui-segmented-button-group")],e.SegmentedButtonGroup);let Zn=class extends Pt{render(){return so('')}};Zn.styles=ro,Zn=Se([_t("mdui-icon-cancel--outlined")],Zn);let Qn=class extends Pt{render(){return so('')}};Qn.styles=ro,Qn=Se([_t("mdui-icon-error")],Qn);let er=class extends Pt{render(){return so('')}};er.styles=ro,er=Se([_t("mdui-icon-visibility-off")],er);let tr=class extends Pt{render(){return so('')}};tr.styles=ro,tr=Se([_t("mdui-icon-visibility")],tr);const ir=Pe`:host{display:inline-block;width:100%}:host([disabled]:not([disabled=false i])){pointer-events:none}:host([type=hidden]){display:none}.container{position:relative;display:flex;align-items:center;height:100%;padding:.125rem .125rem .125rem 1rem;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard)}.container.has-icon{padding-left:.75rem}.container.has-action,.container.has-right-icon,.container.has-suffix{padding-right:.75rem}:host([variant=filled]) .container{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-surface-variant));background-color:rgb(var(--mdui-color-surface-container-highest));border-radius:var(--mdui-shape-corner-extra-small) var(--mdui-shape-corner-extra-small) 0 0}:host([variant=outlined]) .container{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-outline));border-radius:var(--mdui-shape-corner-extra-small)}:host([variant=filled]) .container.invalid,:host([variant=filled]) .container.invalid-style{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-error))}:host([variant=outlined]) .container.invalid,:host([variant=outlined]) .container.invalid-style{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-error))}:host([variant=filled]:hover) .container{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-surface))}:host([variant=outlined]:hover) .container{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-on-surface))}:host([variant=filled]:hover) .container.invalid,:host([variant=filled]:hover) .container.invalid-style{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-error-container))}:host([variant=outlined]:hover) .container.invalid,:host([variant=outlined]:hover) .container.invalid-style{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-on-error-container))}:host([variant=filled][focused-style]) .container,:host([variant=filled][focused]) .container{box-shadow:inset 0 -.125rem 0 0 rgb(var(--mdui-color-primary))}:host([variant=outlined][focused-style]) .container,:host([variant=outlined][focused]) .container{box-shadow:inset 0 0 0 .125rem rgb(var(--mdui-color-primary))}:host([variant=filled][focused-style]) .container.invalid,:host([variant=filled][focused-style]) .container.invalid-style,:host([variant=filled][focused]) .container.invalid,:host([variant=filled][focused]) .container.invalid-style{box-shadow:inset 0 -.125rem 0 0 rgb(var(--mdui-color-error))}:host([variant=outlined][focused-style]) .container.invalid,:host([variant=outlined][focused-style]) .container.invalid-style,:host([variant=outlined][focused]) .container.invalid,:host([variant=outlined][focused]) .container.invalid-style{box-shadow:inset 0 0 0 .125rem rgb(var(--mdui-color-error))}:host([variant=filled][disabled]:not([disabled=false i])) .container{box-shadow:inset 0 -.0625rem 0 0 rgba(var(--mdui-color-on-surface),38%);background-color:rgba(var(--mdui-color-on-surface),4%)}:host([variant=outlined][disabled]:not([disabled=false i])) .container{box-shadow:inset 0 0 0 .125rem rgba(var(--mdui-color-on-surface),12%)}.action,.icon,.prefix,.right-icon,.suffix{display:flex;-webkit-user-select:none;user-select:none;color:rgb(var(--mdui-color-on-surface-variant))}:host([disabled]:not([disabled=false i])) .action,:host([disabled]:not([disabled=false i])) .icon,:host([disabled]:not([disabled=false i])) .prefix,:host([disabled]:not([disabled=false i])) .right-icon,:host([disabled]:not([disabled=false i])) .suffix{color:rgba(var(--mdui-color-on-surface),38%)}.invalid .right-icon,.invalid-style .right-icon{color:rgb(var(--mdui-color-error))}:host(:hover) .invalid .right-icon,:host(:hover) .invalid-style .right-icon{color:rgb(var(--mdui-color-on-error-container))}:host([focused-style]) .invalid .right-icon,:host([focused-style]) .invalid-style .right-icon,:host([focused]) .invalid .right-icon,:host([focused]) .invalid-style .right-icon{color:rgb(var(--mdui-color-error))}.action,.icon,.right-icon{font-size:1.5rem}.action mdui-button-icon,.icon mdui-button-icon,.right-icon mdui-button-icon,::slotted(mdui-button-icon[slot]){margin-left:-.5rem;margin-right:-.5rem}.action .i,.icon .i,.right-icon .i,::slotted([slot$=icon]){font-size:inherit}.has-icon .icon{margin-right:1rem}.has-prefix .prefix{padding-right:.125rem}.has-action .action{margin-left:.75rem}.has-suffix .suffix{padding-right:.25rem;padding-left:.125rem}.has-right-icon .right-icon{margin-left:.75rem}.prefix,.suffix{display:none;font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}:host([variant=filled][label]) .prefix,:host([variant=filled][label]) .suffix{padding-top:1rem}.has-value .prefix,.has-value .suffix,:host([focused-style]) .prefix,:host([focused-style]) .suffix,:host([focused]) .prefix,:host([focused]) .suffix{display:flex}.input-container{display:flex;width:100%;height:100%}.label{position:absolute;pointer-events:none;max-width:calc(100% - 1rem);display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;transition:all var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard);top:1rem;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}.invalid .label,.invalid-style .label{color:rgb(var(--mdui-color-error))}:host([variant=outlined]) .label{padding:0 .25rem;margin:0 -.25rem}:host([variant=outlined]:hover) .label{color:rgb(var(--mdui-color-on-surface))}:host([variant=filled]:hover) .invalid .label,:host([variant=filled]:hover) .invalid-style .label,:host([variant=outlined]:hover) .invalid .label,:host([variant=outlined]:hover) .invalid-style .label{color:rgb(var(--mdui-color-on-error-container))}:host([variant=filled][focused-style]) .label,:host([variant=filled][focused]) .label,:host([variant=outlined][focused-style]) .label,:host([variant=outlined][focused]) .label{color:rgb(var(--mdui-color-primary))}:host([variant=filled]) .has-value .label,:host([variant=filled][focused-style]) .label,:host([variant=filled][focused]) .label,:host([variant=filled][type=date]) .label,:host([variant=filled][type=datetime-local]) .label,:host([variant=filled][type=month]) .label,:host([variant=filled][type=time]) .label,:host([variant=filled][type=week]) .label{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height);top:.25rem}:host([variant=outlined]) .has-value .label,:host([variant=outlined][focused-style]) .label,:host([variant=outlined][focused]) .label,:host([variant=outlined][type=date]) .label,:host([variant=outlined][type=datetime-local]) .label,:host([variant=outlined][type=month]) .label,:host([variant=outlined][type=time]) .label,:host([variant=outlined][type=week]) .label{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height);top:-.5rem;left:.75rem;background-color:rgb(var(--mdui-color-background))}:host([variant=filled][focused-style]) .invalid .label,:host([variant=filled][focused-style]) .invalid-style .label,:host([variant=filled][focused]) .invalid .label,:host([variant=filled][focused]) .invalid-style .label,:host([variant=outlined][focused-style]) .invalid .label,:host([variant=outlined][focused-style]) .invalid-style .label,:host([variant=outlined][focused]) .invalid .label,:host([variant=outlined][focused]) .invalid-style .label{color:rgb(var(--mdui-color-error))}:host([variant=filled][disabled]:not([disabled=false i])) .label,:host([variant=outlined][disabled]:not([disabled=false i])) .label{color:rgba(var(--mdui-color-on-surface),38%)}.input{display:block;width:100%;border:none;outline:0;background:0 0;appearance:none;resize:none;cursor:inherit;font-family:inherit;padding:.875rem .875rem .875rem 0;font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height);color:rgb(var(--mdui-color-on-surface));caret-color:rgb(var(--mdui-color-primary))}.has-action .input,.has-right-icon .input{padding-right:.25rem}.has-suffix .input{padding-right:0}.input.hide-input{opacity:0;height:0;min-height:0;width:0;padding:0!important;overflow:hidden}.input::placeholder{color:rgb(var(--mdui-color-on-surface-variant))}.invalid .input,.invalid-style .input{caret-color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])) .input{color:rgba(var(--mdui-color-on-surface),38%)}:host([end-aligned]:not([end-aligned=false i])) .input{text-align:right}textarea.input{padding-top:0;margin-top:.875rem}:host([variant=filled]) .label+.input{padding-top:1.375rem;padding-bottom:.375rem}:host([variant=filled]) .label+textarea.input{padding-top:0;margin-top:1.375rem}.supporting{display:flex;justify-content:space-between;padding:.25rem 1rem;color:rgb(var(--mdui-color-on-surface-variant))}.supporting.invalid,.supporting.invalid-style{color:rgb(var(--mdui-color-error))}.helper{display:block;opacity:1;transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}:host([disabled]:not([disabled=false i])) .helper{color:rgba(var(--mdui-color-on-surface),38%)}:host([helper-on-focus]:not([helper-on-focus=false i])) .helper{opacity:0}:host([helper-on-focus][focused-style]:not([helper-on-focus=false i])) .helper,:host([helper-on-focus][focused]:not([helper-on-focus=false i])) .helper{opacity:1}.error{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}.counter{flex-wrap:nowrap;padding-left:1rem;font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}::-ms-reveal{display:none}.input[type=number]::-webkit-inner-spin-button,.input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;display:none}.input[type=number]{-moz-appearance:textfield}.input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}`;e.TextField=class extends(Wi(Jt)){constructor(){super(...arguments),this.variant="filled",this.type="text",this.name="",this.value="",this.defaultValue="",this.helperOnFocus=!1,this.clearable=!1,this.endAligned=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.autosize=!1,this.counter=!1,this.togglePassword=!1,this.spellcheck=!1,this.invalid=!1,this.invalidStyle=!1,this.focusedStyle=!1,this.isPasswordVisible=!1,this.hasValue=!1,this.error="",this.inputRef=Bi(),this.formController=new Ui(this),this.hasSlotController=new Zt(this,"icon","end-icon","helper","input"),this.readonlyButClearable=!1}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get valueAsNumber(){return this.inputRef.value?.valueAsNumber??parseFloat(this.value)}set valueAsNumber(e){const t=document.createElement("input");t.type="number",t.valueAsNumber=e,this.value=t.value}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}get isFocusedStyle(){return this.focused||this.focusedStyle}get isTextarea(){return this.rows&&this.rows>1||this.autosize}onDisabledChange(){this.inputRef.value.disabled=this.disabled,this.invalid=!this.inputRef.value.checkValidity()}async onValueChange(){if(this.hasValue=!["",null].includes(this.value),this.hasUpdated){await this.updateComplete,this.setTextareaHeight();const e=this.formController.getForm();e&&Hi.get(e)?.has(this)?(this.invalid=!1,Hi.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}}onRowsChange(){this.setTextareaHeight()}async onMaxRowsChange(){if(!this.autosize)return;this.hasUpdated||await this.updateComplete;const e=M(this.inputRef.value);e.css("max-height",parseFloat(e.css("line-height"))*(this.maxRows??1)+parseFloat(e.css("padding-top"))+parseFloat(e.css("padding-bottom")))}async onMinRowsChange(){if(!this.autosize)return;this.hasUpdated||await this.updateComplete;const e=M(this.inputRef.value);e.css("min-height",parseFloat(e.css("line-height"))*(this.minRows??1)+parseFloat(e.css("padding-top"))+parseFloat(e.css("padding-bottom")))}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this.setTextareaHeight(),this.observeResize=Di(this.inputRef.value,(()=>this.setTextareaHeight()))}))}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve(),un(this)}select(){this.inputRef.value.select()}setSelectionRange(e,t,i="none"){this.inputRef.value.setSelectionRange(e,t,i)}setRangeText(e,t,i,o="preserve"){this.inputRef.value.setRangeText(e,t,i,o),this.value!==this.inputRef.value.value&&(this.value=this.inputRef.value.value,this.setTextareaHeight(),this.emit("input"),this.emit("change"))}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.inputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),this.focus()),!this.invalid}setCustomValidity(e){this.setCustomValidityInternal(e),un(this)}render(){const e=!!this.icon||this.hasSlotController.test("icon"),t=!!this.endIcon||this.hasSlotController.test("end-icon"),i=this.invalid||this.invalidStyle,o="password"===this.type&&this.togglePassword&&!this.disabled,n=this.clearable&&!this.disabled&&(!this.readonly||this.readonlyButClearable)&&("number"==typeof this.value||this.value.length>0),r=!!this.prefix||this.hasSlotController.test("prefix"),s=!!this.suffix||this.hasSlotController.test("suffix"),a=!!this.helper||this.hasSlotController.test("helper"),l=i&&!(!this.error&&!this.inputRef.value.validationMessage),c=this.counter&&!!this.maxlength,d=this.hasSlotController.test("input"),h={invalid:this.invalid,"invalid-style":this.invalidStyle},u=Gi({container:!0,"has-value":this.hasValue,"has-icon":e,"has-right-icon":t||i,"has-action":n||o,"has-prefix":r,"has-suffix":s,"is-firefox":navigator.userAgent.includes("Firefox"),...h});return ft`
${this.renderPrefix()}
${this.renderLabel()} ${this.isTextarea?this.renderTextArea(d):this.renderInput(d)} ${bo(d,(()=>ft``))}
${this.renderSuffix()}${this.renderClearButton(n)} ${this.renderTogglePasswordButton(o)} ${this.renderRightIcon(i)}
${bo(l||a||c,(()=>ft`
${this.renderHelper(l,a)} ${this.renderCounter(c)}
`))}`}setCustomValidityInternal(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity(),this.requestUpdate()}onChange(){this.value=this.inputRef.value.value,this.isTextarea&&this.setTextareaHeight(),this.emit("change")}onClear(e){this.value="",this.emit("clear"),this.emit("input"),this.emit("change"),this.focus(),e.stopPropagation()}onInput(e){e.stopPropagation(),this.value=this.inputRef.value.value,this.isTextarea&&this.setTextareaHeight(),this.emit("input")}onInvalid(e){e.preventDefault()}onKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||setTimeout((()=>{e.defaultPrevented||this.formController.submit()}))}onTextAreaKeyUp(){if(this.pattern){const e=new RegExp(this.pattern);this.value&&!this.value.match(e)?(this.setCustomValidityInternal(this.getPatternErrorMsg()),hn(this,(()=>{this.setCustomValidityInternal(this.getPatternErrorMsg())}))):(this.setCustomValidityInternal(""),un(this))}}onTogglePassword(){this.isPasswordVisible=!this.isPasswordVisible}getPatternErrorMsg(){return _o("Please match the requested format.",{id:"components.textField.patternError"})}setTextareaHeight(){this.autosize?(this.inputRef.value.style.height="auto",this.inputRef.value.style.height=`${this.inputRef.value.scrollHeight}px`):this.inputRef.value.style.height=void 0}renderLabel(){return this.label?ft``:Qt}renderPrefix(){return ft`${this.icon?ft``:Qt}${this.prefix}`}renderSuffix(){return ft`${this.suffix}`}renderRightIcon(e){return e?ft`${this.errorIcon?ft``:ft``}`:ft`${this.endIcon?ft``:Qt}`}renderClearButton(e){return bo(e,(()=>ft`${this.clearIcon?ft``:ft``}`))}renderTogglePasswordButton(e){return bo(e,(()=>ft`${this.isPasswordVisible?ft`${this.showPasswordIcon?ft``:ft``}`:ft`${this.hidePasswordIcon?ft``:ft``}`}`))}renderInput(e){return ft``}renderTextArea(e){return ft``}renderHelper(e,t){return e?ft`
${this.error||this.inputRef.value.validationMessage}
`:t?ft`${this.helper}`:ft``}renderCounter(e){return e?ft`
${this.value.length}/${this.maxlength}
`:Qt}},e.TextField.styles=[ei,ir],Se([zt({reflect:!0})],e.TextField.prototype,"variant",void 0),Se([zt({reflect:!0})],e.TextField.prototype,"type",void 0),Se([zt({reflect:!0})],e.TextField.prototype,"name",void 0),Se([zt()],e.TextField.prototype,"value",void 0),Se([no()],e.TextField.prototype,"defaultValue",void 0),Se([zt({reflect:!0})],e.TextField.prototype,"label",void 0),Se([zt({reflect:!0})],e.TextField.prototype,"placeholder",void 0),Se([zt({reflect:!0})],e.TextField.prototype,"helper",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"helper-on-focus"})],e.TextField.prototype,"helperOnFocus",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.TextField.prototype,"clearable",void 0),Se([zt({reflect:!0,attribute:"clear-icon"})],e.TextField.prototype,"clearIcon",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"end-aligned"})],e.TextField.prototype,"endAligned",void 0),Se([zt({reflect:!0})],e.TextField.prototype,"prefix",void 0),Se([zt({reflect:!0})],e.TextField.prototype,"suffix",void 0),Se([zt({reflect:!0})],e.TextField.prototype,"icon",void 0),Se([zt({reflect:!0,attribute:"end-icon"})],e.TextField.prototype,"endIcon",void 0),Se([zt({reflect:!0,attribute:"error-icon"})],e.TextField.prototype,"errorIcon",void 0),Se([zt({reflect:!0})],e.TextField.prototype,"form",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.TextField.prototype,"readonly",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.TextField.prototype,"disabled",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.TextField.prototype,"required",void 0),Se([zt({type:Number,reflect:!0})],e.TextField.prototype,"rows",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.TextField.prototype,"autosize",void 0),Se([zt({type:Number,reflect:!0,attribute:"min-rows"})],e.TextField.prototype,"minRows",void 0),Se([zt({type:Number,reflect:!0,attribute:"max-rows"})],e.TextField.prototype,"maxRows",void 0),Se([zt({type:Number,reflect:!0})],e.TextField.prototype,"minlength",void 0),Se([zt({type:Number,reflect:!0})],e.TextField.prototype,"maxlength",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.TextField.prototype,"counter",void 0),Se([zt({type:Number,reflect:!0})],e.TextField.prototype,"min",void 0),Se([zt({type:Number,reflect:!0})],e.TextField.prototype,"max",void 0),Se([zt({type:Number,reflect:!0})],e.TextField.prototype,"step",void 0),Se([zt({reflect:!0})],e.TextField.prototype,"pattern",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"toggle-password"})],e.TextField.prototype,"togglePassword",void 0),Se([zt({reflect:!0,attribute:"show-password-icon"})],e.TextField.prototype,"showPasswordIcon",void 0),Se([zt({reflect:!0,attribute:"hide-password-icon"})],e.TextField.prototype,"hidePasswordIcon",void 0),Se([zt({reflect:!0})],e.TextField.prototype,"autocapitalize",void 0),Se([zt({reflect:!0})],e.TextField.prototype,"autocorrect",void 0),Se([zt({reflect:!0})],e.TextField.prototype,"autocomplete",void 0),Se([zt({reflect:!0})],e.TextField.prototype,"enterkeyhint",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.TextField.prototype,"spellcheck",void 0),Se([zt({reflect:!0})],e.TextField.prototype,"inputmode",void 0),Se([Nt()],e.TextField.prototype,"invalid",void 0),Se([Nt()],e.TextField.prototype,"invalidStyle",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"focused-style"})],e.TextField.prototype,"focusedStyle",void 0),Se([Nt()],e.TextField.prototype,"isPasswordVisible",void 0),Se([Nt()],e.TextField.prototype,"hasValue",void 0),Se([Nt()],e.TextField.prototype,"error",void 0),Se([xi("disabled",!0)],e.TextField.prototype,"onDisabledChange",null),Se([xi("value")],e.TextField.prototype,"onValueChange",null),Se([xi("rows",!0)],e.TextField.prototype,"onRowsChange",null),Se([xi("maxRows")],e.TextField.prototype,"onMaxRowsChange",null),Se([xi("minRows")],e.TextField.prototype,"onMinRowsChange",null),e.TextField=Se([_t("mdui-text-field")],e.TextField);const or=Pe`:host{display:inline-block;width:100%}.hidden-input{display:none}.text-field{cursor:pointer}.chips{display:flex;flex-wrap:wrap;margin:-.5rem -.25rem;min-height:2.5rem}:host([variant=filled][label]) .chips{margin:0 -.25rem -1rem -.25rem}.chip{margin:.25rem}mdui-menu{max-width:none}`;e.Select=class extends(Wi(Jt)){constructor(){super(...arguments),this.variant="filled",this.multiple=!1,this.name="",this.value="",this.defaultValue="",this.clearable=!1,this.placement="auto",this.endAligned=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.invalid=!1,this.menuRef=Bi(),this.textFieldRef=Bi(),this.hiddenInputRef=Bi(),this.formController=new Ui(this),this.hasSlotController=new Zt(this,"icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"),this.definedController=new Ci(this,{relatedElements:["mdui-menu-item"]})}get validity(){return this.hiddenInputRef.value.validity}get validationMessage(){return this.hiddenInputRef.value.validationMessage}get focusElement(){return this.textFieldRef.value}get focusDisabled(){return this.disabled}connectedCallback(){super.connectedCallback(),this.value=this.multiple&&c(this.value)?this.value?[this.value]:[]:this.value,this.defaultValue=this.multiple?[]:"",this.definedController.whenDefined().then((()=>{this.requestUpdate()})),this.updateComplete.then((()=>{this.observeResize=Di(this.textFieldRef.value,(()=>this.resizeMenu()))}))}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve()}checkValidity(){const e=this.hiddenInputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){return this.invalid=!this.hiddenInputRef.value.reportValidity(),this.invalid&&(this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),this.focus()),!this.invalid}setCustomValidity(e){this.hiddenInputRef.value.setCustomValidity(e),this.invalid=!this.hiddenInputRef.value.checkValidity()}render(){const e=this.multiple?!!this.value.length:!!this.value;return ft`${this.multiple?ft``:ft``}`${e}:text-field__${e}`)).join(",")}" readonly="readonly" .readonlyButClearable="${!0}" .variant="${this.variant}" .name="${this.name}" .value="${this.multiple?this.value.length?" ":"":this.getMenuItemLabelByValue(this.value)}" .label="${this.label}" .placeholder="${this.placeholder}" .helper="${this.helper}" .error="${this.hiddenInputRef.value?.validationMessage}" .clearable="${this.clearable}" .clearIcon="${this.clearIcon}" .endAligned="${this.endAligned}" .prefix="${this.prefix}" .suffix="${this.suffix}" .icon="${this.icon}" .endIcon="${this.endIcon}" .errorIcon="${this.errorIcon}" .form="${this.form}" .disabled="${this.disabled}" .required="${this.required}" .invalidStyle="${this.invalid}" @clear="${this.onClear}" @change="${e=>e.stopPropagation()}" @keydown="${this.onTextFieldKeyDown}">${Wn(["icon","end-icon","error-icon","prefix","suffix","clear-button","clear-icon","helper"],(e=>this.hasSlotController.test(e)?ft``:gt))} ${bo(this.multiple&&this.value.length,(()=>ft`
${Wn(this.value,(e=>ft``${e}:chip__${e}`)).join(",")}" variant="input" deletable tabindex="-1" @delete="${()=>this.onDeleteOneValue(e)}">${this.getMenuItemLabelByValue(e)}`))}
`))}
`}getMenuItemLabelByValue(e){return this.menuItems.length&&this.menuItems.find((t=>t.value===e))?.textContent?.trim()||e}resizeMenu(){this.menuRef.value.style.width=`${this.textFieldRef.value.clientWidth}px`}async onDropdownOpen(){this.textFieldRef.value.focusedStyle=!0}onDropdownClose(){this.textFieldRef.value.focusedStyle=!1,(this.contains(document.activeElement)||this.contains(document.activeElement?.assignedSlot??null))&&setTimeout((()=>{this.focus()}))}async onValueChange(e){const t=e.target;this.value=this.multiple?t.value.map((e=>e??"")):t.value??"",await this.updateComplete;const i=this.formController.getForm();i&&Hi.get(i)?.has(this)?(this.invalid=!1,Hi.get(i).delete(this)):this.invalid=!this.hiddenInputRef.value.checkValidity()}onDeleteOneValue(e){const t=[...this.value];t.includes(e)&&t.splice(t.indexOf(e),1),this.value=t}onClear(){this.value=this.multiple?[]:""}onTextFieldKeyDown(e){"Enter"===e.key&&(e.preventDefault(),this.textFieldRef.value.click())}},e.Select.styles=[ei,or],Se([zt({reflect:!0})],e.Select.prototype,"variant",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Select.prototype,"multiple",void 0),Se([zt({reflect:!0})],e.Select.prototype,"name",void 0),Se([zt()],e.Select.prototype,"value",void 0),Se([no()],e.Select.prototype,"defaultValue",void 0),Se([zt({reflect:!0})],e.Select.prototype,"label",void 0),Se([zt({reflect:!0})],e.Select.prototype,"placeholder",void 0),Se([zt({reflect:!0})],e.Select.prototype,"helper",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Select.prototype,"clearable",void 0),Se([zt({reflect:!0,attribute:"clear-icon"})],e.Select.prototype,"clearIcon",void 0),Se([zt({reflect:!0})],e.Select.prototype,"placement",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"end-aligned"})],e.Select.prototype,"endAligned",void 0),Se([zt({reflect:!0})],e.Select.prototype,"prefix",void 0),Se([zt({reflect:!0})],e.Select.prototype,"suffix",void 0),Se([zt({reflect:!0})],e.Select.prototype,"icon",void 0),Se([zt({reflect:!0,attribute:"end-icon"})],e.Select.prototype,"endIcon",void 0),Se([zt({reflect:!0,attribute:"error-icon"})],e.Select.prototype,"errorIcon",void 0),Se([zt({reflect:!0})],e.Select.prototype,"form",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Select.prototype,"readonly",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Select.prototype,"disabled",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Select.prototype,"required",void 0),Se([Nt()],e.Select.prototype,"invalid",void 0),Se([Ft({flatten:!0,selector:"mdui-menu-item"})],e.Select.prototype,"menuItems",void 0),e.Select=Se([_t("mdui-select")],e.Select);const nr=Pe`.track-active{left:-.125rem;border-radius:var(--mdui-shape-corner-full) 0 0 var(--mdui-shape-corner-full)}`;e.Slider=class extends Yn{constructor(){super(...arguments),this.value=0,this.defaultValue=0,this.rippleRef=Bi(),this.handleRef=Bi(),this.formController=new Ui(this)}get rippleElement(){return this.rippleRef.value}async onValueChange(){this.value=this.fixValue(this.value);const e=this.formController.getForm();e&&Hi.get(e)?.has(this)?(this.invalid=!1,Hi.get(e).delete(this)):(await this.updateComplete,this.invalid=!this.inputRef.value.checkValidity()),this.updateStyle()}connectedCallback(){super.connectedCallback(),this.value=this.fixValue(this.value)}firstUpdated(e){super.firstUpdated(e);const t=()=>{this.disabled||(this.labelVisible=!0)},i=()=>{this.disabled||(this.labelVisible=!1)};this.addEventListener("touchstart",t),this.addEventListener("mousedown",t),this.addEventListener("touchend",i),this.addEventListener("mouseup",i),this.updateStyle()}render(){return ft``}updateStyle(){const e=(this.value-this.min)/(this.max-this.min)*100;this.trackActiveRef.value.style.width=`${e}%`,this.handleRef.value.style.left=`${e}%`}onInput(){this.value=parseFloat(this.inputRef.value.value),this.updateStyle()}},e.Slider.styles=[Yn.styles,nr],Se([zt({type:Number})],e.Slider.prototype,"value",void 0),Se([no()],e.Slider.prototype,"defaultValue",void 0),Se([xi("value",!0)],e.Slider.prototype,"onValueChange",null),e.Slider=Se([_t("mdui-slider")],e.Slider);const rr=Pe`:host{--shape-corner:var(--mdui-shape-corner-extra-small);--z-index:2400;position:fixed;z-index:var(--z-index);display:none;align-items:center;flex-wrap:wrap;border-radius:var(--shape-corner);transform:scaleY(0);transition:transform 0s var(--mdui-motion-easing-linear) var(--mdui-motion-duration-short4);min-width:20rem;max-width:36rem;padding:.25rem 0;box-shadow:var(--mdui-elevation-level3);background-color:rgb(var(--mdui-color-inverse-surface));color:rgb(var(--mdui-color-inverse-on-surface));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}:host([placement^=top]){transform-origin:top}:host([placement^=bottom]){transform-origin:bottom}:host([placement=bottom-start]:not([mobile])),:host([placement=top-start]:not([mobile])){left:1rem}:host([placement=bottom-end]:not([mobile])),:host([placement=top-end]:not([mobile])){right:1rem}:host([placement=bottom]:not([mobile])),:host([placement=top]:not([mobile])){left:50%;transform:scaleY(0) translateX(-50%)}:host([mobile]){min-width:0;left:1rem;right:1rem}:host([open]){transform:scaleY(1);transition:top var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard),bottom var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard),transform var(--mdui-motion-duration-medium4) var(--mdui-motion-easing-emphasized-decelerate)}:host([placement=bottom][open]:not([mobile])),:host([placement=top][open]:not([mobile])){transform:scaleY(1) translateX(-50%)}.message{display:block;margin:.625rem 1rem}:host([message-line='1']) .message{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host([message-line='2']) .message{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}.action-group{display:flex;align-items:center;margin-left:auto;padding-right:.5rem}.action,.close-button{display:inline-flex;align-items:center;justify-content:center}.action{color:rgb(var(--mdui-color-inverse-primary));font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking)}.action mdui-button,::slotted(mdui-button[slot=action][variant=outlined]),::slotted(mdui-button[slot=action][variant=text]){color:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;--mdui-comp-ripple-state-layer-color:var(--mdui-color-inverse-primary)}.action mdui-button::part(button){padding:0 .5rem}.close-button{margin:0 -.25rem 0 .25rem;font-size:1.5rem;color:rgb(var(--mdui-color-inverse-on-surface))}.close-button mdui-button-icon,::slotted(mdui-button-icon[slot=close-button][variant=outlined]),::slotted(mdui-button-icon[slot=close-button][variant=standard]){font-size:inherit;color:inherit;--mdui-comp-ripple-state-layer-color:var(--mdui-color-inverse-on-surface)}.close-button .i,::slotted([slot=close-icon]){font-size:inherit}`,sr=[];let ar=!1;e.Snackbar=class extends Jt{constructor(){super(),this.open=!1,this.placement="bottom",this.actionLoading=!1,this.closeable=!1,this.autoCloseDelay=5e3,this.closeOnOutsideClick=!1,this.mobile=!1,this.onDocumentClick=this.onDocumentClick.bind(this)}async onOpenChange(){const e=$o(this,"linear"),t=Array.from(this.renderRoot.querySelectorAll(".message, .action-group"));if(this.open){const i=this.hasUpdated;if(i||await this.updateComplete,i){if(!this.emit("open",{cancelable:!0}))return}window.clearTimeout(this.closeTimeout),this.autoCloseDelay&&(this.closeTimeout=window.setTimeout((()=>{this.open=!1}),this.autoCloseDelay)),this.style.display="flex",await Promise.all([wo(this),...t.map((e=>wo(e)))]),sr.push({height:this.clientHeight,snackbar:this}),await this.reorderStack(this);const o=Ro(this,"medium4");return await Promise.all([yo(this,[{opacity:0},{opacity:1,offset:.5},{opacity:1}],{duration:i?o:0,easing:e,fill:"forwards"}),...t.map((t=>yo(t,[{opacity:0},{opacity:0,offset:.2},{opacity:1,offset:.8},{opacity:1}],{duration:i?o:0,easing:e})))]),void(i&&this.emit("opened"))}if(!this.open&&this.hasUpdated){if(!this.emit("close",{cancelable:!0}))return;window.clearTimeout(this.closeTimeout),await Promise.all([wo(this),...t.map((e=>wo(e)))]);const i=Ro(this,"short4");await Promise.all([yo(this,[{opacity:1},{opacity:0}],{duration:i,easing:e,fill:"forwards"}),...t.map((t=>yo(t,[{opacity:1},{opacity:0,offset:.75},{opacity:0}],{duration:i,easing:e})))]),this.style.display="none",this.emit("closed");const o=sr.findIndex((e=>e.snackbar===this));return sr.splice(o,1),void(sr[o]&&await this.reorderStack(sr[o].snackbar))}}async onStackChange(){await this.reorderStack(this)}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.onDocumentClick),this.mobile=Nn().down("sm"),this.observeResize=Di(document.documentElement,(async()=>{const e=Nn().down("sm");this.mobile!==e&&(this.mobile=e,ar||(ar=!0,await this.reorderStack(),ar=!1))}))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),window.clearTimeout(this.closeTimeout),this.open&&(this.open=!1),this.observeResize?.unobserve()}render(){return ft`
${this.action?ft`${this.action}`:Qt}${bo(this.closeable,(()=>ft`${this.closeIcon?ft``:ft``}`))}
`}async reorderStack(e){for(let t=e?sr.findIndex((t=>t.snackbar===e)):0;t{if(e.placement.startsWith(i)){const o=sr.filter(((e,o)=>oe+t.height),0);e.style[i]=`calc(${n}px + ${o.length+1}rem)`,e.style["top"===i?"bottom":"top"]="auto"}})):["top","top-start","top-end","bottom","bottom-start","bottom-end"].forEach((i=>{if(e.placement===i){const o=sr.filter(((e,o)=>oe+t.height),0);e.style[i.startsWith("top")?"top":"bottom"]=`calc(${n}px + ${o.length+1}rem)`,e.style[i.startsWith("top")?"bottom":"top"]="auto"}}))}}onDocumentClick(e){if(!this.open||!this.closeOnOutsideClick)return;const t=e.target;this.contains(t)||this===t||(this.open=!1)}onActionClick(e){e.stopPropagation(),this.emit("action-click")}onCloseClick(){this.open=!1}},e.Snackbar.styles=[ei,rr],Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Snackbar.prototype,"open",void 0),Se([zt({reflect:!0})],e.Snackbar.prototype,"placement",void 0),Se([zt({reflect:!0,attribute:"action"})],e.Snackbar.prototype,"action",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"action-loading"})],e.Snackbar.prototype,"actionLoading",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Snackbar.prototype,"closeable",void 0),Se([zt({reflect:!0,attribute:"close-icon"})],e.Snackbar.prototype,"closeIcon",void 0),Se([zt({type:Number,reflect:!0,attribute:"message-line"})],e.Snackbar.prototype,"messageLine",void 0),Se([zt({type:Number,reflect:!0,attribute:"auto-close-delay"})],e.Snackbar.prototype,"autoCloseDelay",void 0),Se([zt({type:Boolean,reflect:!0,attribute:"close-on-outside-click",converter:ki})],e.Snackbar.prototype,"closeOnOutsideClick",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Snackbar.prototype,"mobile",void 0),Se([xi("open")],e.Snackbar.prototype,"onOpenChange",null),Se([xi("placement",!0),xi("messageLine",!0)],e.Snackbar.prototype,"onStackChange",null),e.Snackbar=Se([_t("mdui-snackbar")],e.Snackbar);const lr=Pe`:host{--shape-corner:var(--mdui-shape-corner-full);--shape-corner-thumb:var(--mdui-shape-corner-full);position:relative;display:inline-block;cursor:pointer;-webkit-tap-highlight-color:transparent;height:2.5rem}:host([disabled]:not([disabled=false i])){cursor:default;pointer-events:none}label{display:inline-flex;align-items:center;width:100%;height:100%;white-space:nowrap;cursor:inherit;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none}.track{position:relative;display:flex;align-items:center;border-radius:var(--shape-corner);transition-property:background-color,border-width;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard);height:2rem;width:3.25rem;border:.125rem solid rgb(var(--mdui-color-outline));background-color:rgb(var(--mdui-color-surface-container-highest))}:host([checked]:not([checked=false i])) .track{background-color:rgb(var(--mdui-color-primary));border-width:0}.invalid .track{background-color:rgb(var(--mdui-color-error-container));border-color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])) .track{background-color:rgba(var(--mdui-color-surface-container-highest),.12);border-color:rgba(var(--mdui-color-on-surface),.12)}:host([disabled][checked]:not([disabled=false i],[checked=false i])) .track{background-color:rgba(var(--mdui-color-on-surface),.12)}input{position:absolute;padding:0;opacity:0;pointer-events:none;width:1.25rem;height:1.25rem;margin:0 0 0 .625rem}mdui-ripple{border-radius:50%;transition-property:left,top;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard);width:2.5rem;height:2.5rem}.thumb{position:absolute;display:flex;align-items:center;justify-content:center;border-radius:var(--shape-corner-thumb);transition-property:width,height,left,background-color;transition-duration:var(--mdui-motion-duration-short4);transition-timing-function:var(--mdui-motion-easing-standard);height:1rem;width:1rem;left:.375rem;background-color:rgb(var(--mdui-color-outline));--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}.thumb mdui-ripple{left:-.75rem;top:-.75rem}.has-unchecked-icon .thumb{height:1.5rem;width:1.5rem;left:.125rem}.has-unchecked-icon .thumb mdui-ripple{left:-.5rem;top:-.5rem}:host([focus-visible]) .thumb,:host([hover]) .thumb,:host([pressed]) .thumb{background-color:rgb(var(--mdui-color-on-surface-variant))}:host([checked]:not([checked=false i])) .thumb{height:1.5rem;width:1.5rem;left:1.5rem;background-color:rgb(var(--mdui-color-on-primary));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([checked]:not([checked=false i])) .thumb mdui-ripple{left:-.5rem;top:-.5rem}:host([pressed]) .thumb{height:1.75rem;width:1.75rem;left:0}:host([pressed]) .thumb mdui-ripple{left:-.375rem;top:-.375rem}:host([pressed][checked]:not([checked=false i])) .thumb{left:1.375rem}:host([focus-visible][checked]:not([checked=false i])) .thumb,:host([hover][checked]:not([checked=false i])) .thumb,:host([pressed][checked]:not([checked=false i])) .thumb{background-color:rgb(var(--mdui-color-primary-container))}.invalid .thumb{background-color:rgb(var(--mdui-color-error));--mdui-comp-ripple-state-layer-color:var(--mdui-color-error)}:host([focus-visible]) .invalid .thumb,:host([hover]) .invalid .thumb,:host([pressed]) .invalid .thumb{background-color:rgb(var(--mdui-color-error))}:host([disabled]:not([disabled=false i])) .thumb{background-color:rgba(var(--mdui-color-on-surface),.38)}:host([disabled][checked]:not([disabled=false i],[checked=false i])) .thumb{background-color:rgb(var(--mdui-color-surface))}.checked-icon,.unchecked-icon{display:flex;position:absolute;transition-property:opacity,transform;font-size:1rem}.unchecked-icon{opacity:1;transform:scale(1);transition-delay:var(--mdui-motion-duration-short1);transition-duration:var(--mdui-motion-duration-short3);transition-timing-function:var(--mdui-motion-easing-linear);color:rgb(var(--mdui-color-surface-container-highest))}:host([checked]:not([checked=false i])) .unchecked-icon{opacity:0;transform:scale(.92);transition-delay:0s;transition-duration:var(--mdui-motion-duration-short1)}:host([disabled]:not([disabled=false i])) .unchecked-icon{color:rgba(var(--mdui-color-surface-container-highest),.38)}.checked-icon{opacity:0;transform:scale(.92);transition-delay:0s;transition-duration:var(--mdui-motion-duration-short1);transition-timing-function:var(--mdui-motion-easing-linear);color:rgb(var(--mdui-color-on-primary-container))}:host([checked]:not([checked=false i])) .checked-icon{opacity:1;transform:scale(1);transition-delay:var(--mdui-motion-duration-short1);transition-duration:var(--mdui-motion-duration-short3)}.invalid .checked-icon{color:rgb(var(--mdui-color-error-container))}:host([disabled]:not([disabled=false i])) .checked-icon{color:rgba(var(--mdui-color-on-surface),.38)}.checked-icon .i,.unchecked-icon .i,::slotted([slot=checked-icon]),::slotted([slot=unchecked-icon]){font-size:inherit;color:inherit}`;e.Switch=class extends(Ji(Wi(Jt))){constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.required=!1,this.name="",this.value="on",this.invalid=!1,this.rippleRef=Bi(),this.inputRef=Bi(),this.formController=new Ui(this,{value:e=>e.checked?e.value:void 0,defaultValue:e=>e.defaultChecked,setValue:(e,t)=>e.checked=t}),this.hasSlotController=new Zt(this,"unchecked-icon")}get validity(){return this.inputRef.value.validity}get validationMessage(){return this.inputRef.value.validationMessage}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return this.disabled}get focusElement(){return this.inputRef.value}get focusDisabled(){return this.disabled}async onDisabledChange(){await this.updateComplete,this.invalid=!this.inputRef.value.checkValidity()}async onCheckedChange(){await this.updateComplete;const e=this.formController.getForm();e&&Hi.get(e)?.has(this)?(this.invalid=!1,Hi.get(e).delete(this)):this.invalid=!this.inputRef.value.checkValidity()}checkValidity(){const e=this.inputRef.value.checkValidity();return e||this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1}),e}reportValidity(){if(this.invalid=!this.inputRef.value.reportValidity(),this.invalid){this.emit("invalid",{bubbles:!1,cancelable:!0,composed:!1})||(this.blur(),this.focus())}return!this.invalid}setCustomValidity(e){this.inputRef.value.setCustomValidity(e),this.invalid=!this.inputRef.value.checkValidity()}render(){return ft``}onChange(){this.checked=this.inputRef.value.checked,this.emit("change")}},e.Switch.styles=[ei,lr],Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Switch.prototype,"disabled",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Switch.prototype,"checked",void 0),Se([no("checked")],e.Switch.prototype,"defaultChecked",void 0),Se([zt({reflect:!0,attribute:"unchecked-icon"})],e.Switch.prototype,"uncheckedIcon",void 0),Se([zt({reflect:!0,attribute:"checked-icon"})],e.Switch.prototype,"checkedIcon",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Switch.prototype,"required",void 0),Se([zt({reflect:!0})],e.Switch.prototype,"form",void 0),Se([zt({reflect:!0})],e.Switch.prototype,"name",void 0),Se([zt({reflect:!0})],e.Switch.prototype,"value",void 0),Se([Nt()],e.Switch.prototype,"invalid",void 0),Se([xi("disabled",!0),xi("required",!0)],e.Switch.prototype,"onDisabledChange",null),Se([xi("checked",!0)],e.Switch.prototype,"onCheckedChange",null),e.Switch=Se([_t("mdui-switch")],e.Switch);const cr=Pe`:host{position:relative;--mdui-comp-ripple-state-layer-color:var(--mdui-color-on-surface)}:host([active]){--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}.container{display:flex;justify-content:center;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;height:100%}.preset{flex-direction:column;min-height:3rem;padding:.625rem 1rem}:host([inline]:not([inline=false i])) .preset{flex-direction:row}.icon-container,.label-container{position:relative;display:flex;align-items:center;justify-content:center}.icon-container ::slotted([slot=badge]){position:absolute;transform:translate(50%,-50%)}.icon-container ::slotted([slot=badge][variant=small]){transform:translate(.5625rem,-.5625rem)}.label-container ::slotted([slot=badge]){position:absolute;left:100%;bottom:100%;transform:translate(-.75rem,.625rem)}.label-container ::slotted([slot=badge][variant=small]){transform:translate(-.375rem,.375rem)}.icon,.label{display:flex;color:rgb(var(--mdui-color-on-surface-variant))}:host([focused]) .icon,:host([focused]) .label,:host([hover]) .icon,:host([hover]) .label,:host([pressed]) .icon,:host([pressed]) .label{color:rgb(var(--mdui-color-on-surface))}:host([active]) .icon,:host([active]) .label{color:rgb(var(--mdui-color-primary))}:host([active]) .variant-secondary .icon,:host([active]) .variant-secondary .label{color:rgb(var(--mdui-color-on-surface))}.icon{font-size:1.5rem}.label{font-size:var(--mdui-typescale-title-small-size);font-weight:var(--mdui-typescale-title-small-weight);letter-spacing:var(--mdui-typescale-title-small-tracking);line-height:var(--mdui-typescale-title-small-line-height)}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit;color:inherit}`;e.Tab=class extends(Ji(Wi(Jt))){constructor(){super(...arguments),this.inline=!1,this.active=!1,this.variant="primary",this.key=Si(),this.rippleRef=Bi(),this.hasSlotController=new Zt(this,"icon","custom")}get rippleElement(){return this.rippleRef.value}get rippleDisabled(){return!1}get focusElement(){return this}get focusDisabled(){return!1}render(){const e=this.icon||this.hasSlotController.test("icon"),t=this.hasSlotController.test("custom"),i=()=>ft``;return ft`
${bo(e||this.icon,i)}${this.icon?ft``:Qt}
${bo(!e,i)}
`}},e.Tab.styles=[ei,cr],Se([zt({reflect:!0})],e.Tab.prototype,"value",void 0),Se([zt({reflect:!0})],e.Tab.prototype,"icon",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Tab.prototype,"inline",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Tab.prototype,"active",void 0),Se([Nt()],e.Tab.prototype,"variant",void 0),e.Tab=Se([_t("mdui-tab")],e.Tab);const dr=Pe`:host{display:block;overflow-y:auto;flex:1 1 auto}:host(:not([active])){display:none}`;e.TabPanel=class extends Jt{constructor(){super(...arguments),this.active=!1}render(){return ft``}},e.TabPanel.styles=[ei,dr],Se([zt({reflect:!0})],e.TabPanel.prototype,"value",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.TabPanel.prototype,"active",void 0),e.TabPanel=Se([_t("mdui-tab-panel")],e.TabPanel);const hr=Pe`:host{position:relative;display:flex}:host([placement^=top]){flex-direction:column}:host([placement^=bottom]){flex-direction:column-reverse}:host([placement^=left]){flex-direction:row}:host([placement^=right]){flex-direction:row-reverse}.container{position:relative;display:flex;flex:0 0 auto;overflow-x:auto;background-color:rgb(var(--mdui-color-surface))}:host([placement^=bottom]) .container,:host([placement^=top]) .container{flex-direction:row}:host([placement^=left]) .container,:host([placement^=right]) .container{flex-direction:column}:host([placement$='-start']) .container{justify-content:flex-start}:host([placement=bottom]) .container,:host([placement=left]) .container,:host([placement=right]) .container,:host([placement=top]) .container{justify-content:center}:host([placement$='-end']) .container{justify-content:flex-end}.container::after{content:' ';position:absolute;background-color:rgb(var(--mdui-color-surface-variant))}:host([placement^=bottom]) .container::after,:host([placement^=top]) .container::after{left:0;width:100%;height:.0625rem}:host([placement^=top]) .container::after{bottom:0}:host([placement^=bottom]) .container::after{top:0}:host([placement^=left]) .container::after,:host([placement^=right]) .container::after{top:0;height:100%;width:.0625rem}:host([placement^=left]) .container::after{right:0}:host([placement^=right]) .container::after{left:0}.indicator{position:absolute;z-index:1;background-color:rgb(var(--mdui-color-primary))}.container:not(.initial) .indicator{transition-duration:var(--mdui-motion-duration-medium2);transition-timing-function:var(--mdui-motion-easing-standard-decelerate)}:host([placement^=bottom]) .indicator,:host([placement^=top]) .indicator{transition-property:transform,left,width}:host([placement^=left]) .indicator,:host([placement^=right]) .indicator{transition-property:transform,top,height}:host([placement^=top]) .indicator{bottom:0}:host([placement^=bottom]) .indicator{top:0}:host([placement^=left]) .indicator{right:0}:host([placement^=right]) .indicator{left:0}:host([placement^=bottom][variant=primary]) .indicator,:host([placement^=top][variant=primary]) .indicator{height:.1875rem}:host([placement^=bottom][variant=secondary]) .indicator,:host([placement^=top][variant=secondary]) .indicator{height:.125rem}:host([placement^=left][variant=primary]) .indicator,:host([placement^=right][variant=primary]) .indicator{width:.1875rem}:host([placement^=left][variant=secondary]) .indicator,:host([placement^=right][variant=secondary]) .indicator{width:.125rem}:host([placement^=top][variant=primary]) .indicator{border-top-left-radius:.1875rem;border-top-right-radius:.1875rem}:host([placement^=bottom][variant=primary]) .indicator{border-bottom-right-radius:.1875rem;border-bottom-left-radius:.1875rem}:host([placement^=left][variant=primary]) .indicator{border-top-left-radius:.1875rem;border-bottom-left-radius:.1875rem}:host([placement^=right][variant=primary]) .indicator{border-top-right-radius:.1875rem;border-bottom-right-radius:.1875rem}:host([full-width]:not([full-width=false i])) ::slotted(mdui-tab){flex:1}`;e.Tabs=class extends Jt{constructor(){super(...arguments),this.variant="primary",this.placement="top-start",this.fullWidth=!1,this.activeKey=0,this.isInitial=!0,this.containerRef=Bi(),this.indicatorRef=Bi(),this.definedController=new Ci(this,{relatedElements:["mdui-tab","mdui-tab-panel"]})}async onActiveKeyChange(){await this.definedController.whenDefined(),this.value=this.tabs.find((e=>e.key===this.activeKey))?.value,this.updateActive(),this.isInitial||this.emit("change")}async onValueChange(){this.isInitial=!this.hasUpdated,await this.definedController.whenDefined();const e=this.tabs.find((e=>e.value===this.value));this.activeKey=e?.key??0}async onIndicatorChange(){await this.updateComplete,this.updateIndicator()}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this.observeResize=Di(this.containerRef.value,(()=>this.updateIndicator()))}))}disconnectedCallback(){super.disconnectedCallback(),this.observeResize?.unobserve()}render(){return ft`
`}async onSlotChange(){await this.definedController.whenDefined(),this.updateActive()}async onClick(e){if(e.button)return;await this.definedController.whenDefined();const t=e.target.closest("mdui-tab");t&&(this.activeKey=t.key,this.isInitial=!1,this.updateActive())}updateActive(){this.activeTab=this.tabs.map((e=>(e.active=this.activeKey===e.key,e))).find((e=>e.active)),this.panels.forEach((e=>e.active=e.value===this.activeTab?.value)),this.updateIndicator()}updateIndicator(){const e=this.activeTab,t=M(this.indicatorRef.value),i=this.placement.startsWith("left")||this.placement.startsWith("right");if(!e)return void t.css({transform:i?"scaleY(0)":"scaleX(0)"});const o=M(e),n=e.offsetTop,r=e.offsetLeft,s=i?{transform:"scaleY(1)",width:"",left:""}:{transform:"scaleX(1)",height:"",top:""};let a={};if("primary"===this.variant){const t=o.find(':scope > [slot="custom"]'),s=t.length?t.get():M(e.renderRoot).find('slot[name="custom"]').children().get();if(i){const e=Math.min(...s.map((e=>e.offsetTop)))+n;a={top:e,height:Math.max(...s.map((e=>e.offsetTop+e.offsetHeight)))+n-e}}else{const e=Math.min(...s.map((e=>e.offsetLeft)))+r;a={left:e,width:Math.max(...s.map((e=>e.offsetLeft+e.offsetWidth)))+r-e}}}"secondary"===this.variant&&(a=i?{top:n,height:e.offsetHeight}:{left:r,width:e.offsetWidth}),t.css({...s,...a})}},e.Tabs.styles=[ei,hr],Se([zt({reflect:!0})],e.Tabs.prototype,"variant",void 0),Se([zt({reflect:!0})],e.Tabs.prototype,"value",void 0),Se([zt({reflect:!0})],e.Tabs.prototype,"placement",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki,attribute:"full-width"})],e.Tabs.prototype,"fullWidth",void 0),Se([Nt()],e.Tabs.prototype,"activeKey",void 0),Se([Nt()],e.Tabs.prototype,"isInitial",void 0),Se([Ft({selector:"mdui-tab",flatten:!0})],e.Tabs.prototype,"tabs",void 0),Se([Ft({selector:"mdui-tab-panel",slot:"panel",flatten:!0})],e.Tabs.prototype,"panels",void 0),Se([xi("activeKey",!0)],e.Tabs.prototype,"onActiveKeyChange",null),Se([xi("value")],e.Tabs.prototype,"onValueChange",null),Se([xi("variant",!0),xi("placement",!0),xi("fullWidth",!0)],e.Tabs.prototype,"onIndicatorChange",null),e.Tabs=Se([_t("mdui-tabs")],e.Tabs);class ur{constructor(e,t){this.isHover=!1,this.uniqueID=Si(),this.enterEventName=`mouseenter.${this.uniqueID}.hoverController`,this.leaveEventName=`mouseleave.${this.uniqueID}.hoverController`,this.mouseEnterItems=[],this.mouseLeaveItems=[],(this.host=e).addController(this),this.elementRef=t}hostConnected(){this.host.updateComplete.then((()=>{M(this.elementRef.value).on(this.enterEventName,(()=>{this.isHover=!0;for(let e=this.mouseEnterItems.length-1;e>=0;e--){const t=this.mouseEnterItems[e];t.callback(),t.one&&this.mouseEnterItems.splice(e,1)}})).on(this.leaveEventName,(()=>{this.isHover=!1;for(let e=this.mouseLeaveItems.length-1;e>=0;e--){const t=this.mouseLeaveItems[e];t.callback(),t.one&&this.mouseLeaveItems.splice(e,1)}}))}))}hostDisconnected(){M(this.elementRef.value).off(this.enterEventName).off(this.leaveEventName)}onMouseEnter(e,t=!1){this.mouseEnterItems.push({callback:e,one:t})}onMouseLeave(e,t=!1){this.mouseLeaveItems.push({callback:e,one:t})}}const pr=Pe`:host{--shape-corner-plain:var(--mdui-shape-corner-extra-small);--shape-corner-rich:var(--mdui-shape-corner-medium);--z-index:2500;display:contents}.popup{position:fixed;display:flex;flex-direction:column;z-index:var(--z-index);border-radius:var(--shape-corner-plain);background-color:rgb(var(--mdui-color-inverse-surface));padding:0 .5rem;min-width:1.75rem;max-width:20rem}:host([variant=rich]) .popup{border-radius:var(--shape-corner-rich);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);padding:.75rem 1rem .5rem 1rem}.headline{display:flex;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-title-small-size);font-weight:var(--mdui-typescale-title-small-weight);letter-spacing:var(--mdui-typescale-title-small-tracking);line-height:var(--mdui-typescale-title-small-line-height)}.content{display:flex;padding:.25rem 0;color:rgb(var(--mdui-color-inverse-on-surface));font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}:host([variant=rich]) .content{color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}.action{display:flex;justify-content:flex-start;padding-top:.5rem}.action ::slotted(:not(:last-child)){margin-right:.5rem}`;e.Tooltip=class extends Jt{constructor(){super(),this.variant="plain",this.placement="auto",this.openDelay=150,this.closeDelay=150,this.trigger="hover focus",this.disabled=!1,this.open=!1,this.popupRef=Bi(),this.hasSlotController=new Zt(this,"headline","action"),this.hoverController=new ur(this,this.popupRef),this.definedController=new Ci(this,{needDomReady:!0}),this.onDocumentClick=this.onDocumentClick.bind(this),this.onWindowScroll=this.onWindowScroll.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this)}get target(){return[...this.children].find((e=>"style"!==e.tagName.toLowerCase()&&"content"!==e.getAttribute("slot")))}async onPositionChange(){this.open&&(await this.definedController.whenDefined(),this.updatePositioner())}async onOpenChange(){const e=this.hasUpdated,t=Ro(this,"short4"),i=$o(this,"standard");if(this.open){if(await this.definedController.whenDefined(),M(`mdui-tooltip[variant="${this.variant}"]`).filter(((e,t)=>t!==this)).prop("open",!1),e||await this.updateComplete,e){if(!this.emit("open",{cancelable:!0}))return}return await wo(this.popupRef.value),this.popupRef.value.hidden=!1,this.updatePositioner(),await yo(this.popupRef.value,[{transform:"scale(0)"},{transform:"scale(1)"}],{duration:e?t:0,easing:i}),void(e&&this.emit("opened"))}if(!this.open&&e){if(!this.emit("close",{cancelable:!0}))return;await wo(this.popupRef.value),await yo(this.popupRef.value,[{transform:"scale(1)"},{transform:"scale(0)"}],{duration:t,easing:i}),this.popupRef.value.hidden=!0,this.emit("closed")}}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.onDocumentClick),this.definedController.whenDefined().then((()=>{this.overflowAncestors=xn(this.target),this.overflowAncestors.forEach((e=>{e.addEventListener("scroll",this.onWindowScroll)})),this.observeResize=Di(this.target,(()=>{this.updatePositioner()}))}))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentClick),this.overflowAncestors?.forEach((e=>{e.removeEventListener("scroll",this.onWindowScroll)})),this.observeResize?.unobserve()}firstUpdated(e){super.firstUpdated(e),this.definedController.whenDefined().then((()=>{const e=this.target;e.addEventListener("focus",this.onFocus),e.addEventListener("blur",this.onBlur),e.addEventListener("pointerdown",this.onClick),e.addEventListener("keydown",this.onKeydown),e.addEventListener("mouseenter",this.onMouseEnter),e.addEventListener("mouseleave",this.onMouseLeave)}))}render(){const e=this.isRich()&&(this.headline||this.hasSlotController.test("headline")),t=this.isRich()&&this.hasSlotController.test("action");return ft``}isRich(){return"rich"===this.variant}requestClose(){this.hoverController.isHover?this.hoverController.onMouseLeave((()=>{this.hasTrigger("hover")?this.hoverTimeout=window.setTimeout((()=>{this.open=!1}),this.closeDelay||50):this.open=!1}),!0):this.open=!1}hasTrigger(e){return this.trigger.split(" ").includes(e)}onFocus(){this.disabled||this.open||!this.hasTrigger("focus")||(this.open=!0)}onBlur(){!this.disabled&&this.open&&this.hasTrigger("focus")&&this.requestClose()}onClick(e){this.disabled||e.button||!this.hasTrigger("click")||this.open&&(this.hasTrigger("hover")||this.hasTrigger("focus"))||(this.open=!this.open)}onKeydown(e){!this.disabled&&this.open&&"Escape"===e.key&&(e.stopPropagation(),this.requestClose())}onMouseEnter(){this.disabled||this.open||!this.hasTrigger("hover")||(this.openDelay?(window.clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>{this.open=!0}),this.openDelay)):this.open=!0)}onMouseLeave(){window.clearTimeout(this.hoverTimeout),!this.disabled&&this.open&&this.hasTrigger("hover")&&(this.hoverTimeout=window.setTimeout((()=>{this.requestClose()}),this.closeDelay||50))}onDocumentClick(e){if(this.disabled||!this.open)return;e.composedPath().includes(this)||this.requestClose()}onWindowScroll(){window.requestAnimationFrame((()=>this.updatePositioner()))}updatePositioner(){const e=M(this.popupRef.value),t=this.isRich()?0:4,i=this.target.getBoundingClientRect(),o=i.top,n=i.left,r=i.height,s=i.width,a=this.popupRef.value.offsetHeight,l=this.popupRef.value.offsetWidth,c=l+t+4,d=a+t+4;let h,u,p,m,f=this.placement;if("auto"===f){const e=M(window),t=o>d,i=e.height()-o-r>d,a=n>c,l=e.width()-n-s>c;this.isRich()?(f="bottom-right",i&&l?f="bottom-right":i&&a?f="bottom-left":t&&l?f="top-right":t&&a?f="top-left":i?f="bottom":t?f="top":l?f="right":a&&(f="left")):(f="top",t?f="top":i?f="bottom":a?f="left":l&&(f="right"))}const[v,g]=f.split("-");switch(v){case"top":u="bottom",p=o-a-t;break;case"bottom":u="top",p=o+r+t;break;default:switch(u="center",g){case"start":p=o;break;case"end":p=o+r-a;break;default:p=o+r/2-a/2}}switch(v){case"left":h="right",m=n-l-t;break;case"right":h="left",m=n+s+t;break;default:switch(h="center",g){case"start":m=n;break;case"end":m=n+s-l;break;case"left":h="right",m=n-l-t;break;case"right":h="left",m=n+s+t;break;default:m=n+s/2-l/2}}e.css({top:p,left:m,transformOrigin:[h,u].join(" ")})}},e.Tooltip.styles=[ei,pr],Se([zt({reflect:!0})],e.Tooltip.prototype,"variant",void 0),Se([zt({reflect:!0})],e.Tooltip.prototype,"placement",void 0),Se([zt({type:Number,reflect:!0,attribute:"open-delay"})],e.Tooltip.prototype,"openDelay",void 0),Se([zt({type:Number,reflect:!0,attribute:"close-delay"})],e.Tooltip.prototype,"closeDelay",void 0),Se([zt({reflect:!0})],e.Tooltip.prototype,"headline",void 0),Se([zt({reflect:!0})],e.Tooltip.prototype,"content",void 0),Se([zt({reflect:!0})],e.Tooltip.prototype,"trigger",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Tooltip.prototype,"disabled",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.Tooltip.prototype,"open",void 0),Se([xi("placement",!0),xi("content",!0)],e.Tooltip.prototype,"onPositionChange",null),Se([xi("open")],e.Tooltip.prototype,"onOpenChange",null),e.Tooltip=Se([_t("mdui-tooltip")],e.Tooltip);const mr=Pe`:host{display:block;width:100%;flex-shrink:initial!important;overflow:hidden;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-title-large-size);font-weight:var(--mdui-typescale-title-large-weight);letter-spacing:var(--mdui-typescale-title-large-tracking);line-height:var(--mdui-typescale-title-large-line-height);line-height:2.5rem}.label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:1;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear)}.label.variant-center-aligned{text-align:center}.label.variant-large:not(.shrink),.label.variant-medium:not(.shrink){opacity:0}.label.variant-large.shrink,.label.variant-medium.shrink{transition-delay:var(--mdui-motion-duration-short2)}.label-large{display:none;position:absolute;width:100%;left:0;margin-right:0;padding:0 1rem;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear)}.label-large.variant-large,.label-large.variant-medium{display:block}.label-large.variant-medium{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;bottom:.75rem;font-size:var(--mdui-typescale-headline-small-size);font-weight:var(--mdui-typescale-headline-small-weight);letter-spacing:var(--mdui-typescale-headline-small-tracking);line-height:var(--mdui-typescale-headline-small-line-height)}.label-large.variant-large{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;bottom:1.25rem;font-size:var(--mdui-typescale-headline-medium-size);font-weight:var(--mdui-typescale-headline-medium-weight);letter-spacing:var(--mdui-typescale-headline-medium-tracking);line-height:var(--mdui-typescale-headline-medium-line-height)}.label-large.variant-large:not(.shrink),.label-large.variant-medium:not(.shrink){opacity:1;transition-delay:var(--mdui-motion-duration-short2)}.label-large.variant-large.shrink,.label-large.variant-medium.shrink{opacity:0;z-index:-1}`;e.TopAppBarTitle=class extends Jt{constructor(){super(...arguments),this.variant="small",this.shrink=!1,this.hasSlotController=new Zt(this,"label-large"),this.labelLargeRef=Bi(),this.defaultSlotRef=Bi()}render(){const e=this.hasSlotController.test("label-large"),t=Gi({shrink:this.shrink,"variant-center-aligned":"center-aligned"===this.variant,"variant-small":"small"===this.variant,"variant-medium":"medium"===this.variant,"variant-large":"large"===this.variant});return ft`${e?ft``:ft`
`}`}onSlotChange(e){e||(this.labelLargeRef.value.innerHTML=(e=>{const t=e.assignedNodes({flatten:!0});let i="";return[...t].forEach((e=>{e.nodeType===Node.ELEMENT_NODE&&(i+=e.outerHTML),e.nodeType===Node.TEXT_NODE&&(i+=e.textContent)})),i})(this.defaultSlotRef.value))}},e.TopAppBarTitle.styles=[ei,mr],Se([Nt()],e.TopAppBarTitle.prototype,"variant",void 0),Se([Nt()],e.TopAppBarTitle.prototype,"shrink",void 0),e.TopAppBarTitle=Se([_t("mdui-top-app-bar-title")],e.TopAppBarTitle);const fr=Pe`:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;top:0;right:0;left:0;display:flex;flex:0 0 auto;align-items:flex-start;justify-content:flex-start;border-bottom-left-radius:var(--shape-corner);border-bottom-right-radius:var(--shape-corner);z-index:var(--z-index);transition:top var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard),height var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard),box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear),background-color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);padding:.75rem .5rem;height:4rem;background-color:rgb(var(--mdui-color-surface))}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([scroll-behavior~=shrink]){transition-duration:var(--mdui-motion-duration-short4)}:host([scrolling]){background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2)}::slotted(mdui-button-icon){color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}::slotted(mdui-button-icon:first-child){color:rgb(var(--mdui-color-on-surface))}::slotted(mdui-avatar){width:1.875rem;height:1.875rem;margin-top:.3125rem;margin-bottom:.3125rem}::slotted(*){flex-shrink:0}::slotted(:not(:last-child)){margin-right:.5rem}:host([variant=medium]){height:7rem}:host([variant=large]){height:9.5rem}:host([hide]:not([hide=false i])){transition-duration:var(--mdui-motion-duration-short4);top:-4.625rem}:host([hide][variant=medium]:not([hide=false i])){top:-7.625rem}:host([hide][variant=large]:not([hide=false i])){top:-10.125rem}:host([shrink][variant=large]:not([shrink=false i])),:host([shrink][variant=medium]:not([shrink=false i])){transition-duration:var(--mdui-motion-duration-short4);height:4rem}`;function vr(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}e.TopAppBar=class extends(Ri(Li)){constructor(){super(...arguments),this.variant="small",this.hide=!1,this.shrink=!1,this.scrolling=!1,this.definedController=new Ci(this,{relatedElements:["mdui-top-app-bar-title"]})}get scrollPaddingPosition(){return"top"}get layoutPlacement(){return"top"}async onVariantChange(){this.hasUpdated?this.addEventListener("transitionend",(async()=>{await this.scrollBehaviorDefinedController.whenDefined(),this.setContainerPadding("update",this.scrollTarget)}),{once:!0}):await this.updateComplete,await this.definedController.whenDefined(),this.titleElements.forEach((e=>{e.variant=this.variant}))}async onShrinkChange(){this.hasUpdated||await this.updateComplete,await this.definedController.whenDefined(),this.titleElements.forEach((e=>{e.shrink=this.shrink}))}firstUpdated(e){super.firstUpdated(e),this.addEventListener("transitionend",(e=>{e.target===this&&this.emit(this.hide?"hidden":"shown")}))}render(){return ft``}runScrollNoThreshold(e,t){this.hasScrollBehavior("shrink")&&e&&t<8&&(this.shrink=!1)}runScrollThreshold(e,t){if(this.hasScrollBehavior("elevate")&&(this.scrolling=!!t),this.hasScrollBehavior("shrink")&&(e||(this.shrink=!0)),this.hasScrollBehavior("hide")){if(!e&&!this.hide){this.emit("hide",{cancelable:!0})&&(this.hide=!0)}if(e&&this.hide){this.emit("show",{cancelable:!0})&&(this.hide=!1)}}}},e.TopAppBar.styles=[ei,fr],Se([zt({reflect:!0})],e.TopAppBar.prototype,"variant",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.TopAppBar.prototype,"hide",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.TopAppBar.prototype,"shrink",void 0),Se([zt({reflect:!0,attribute:"scroll-behavior"})],e.TopAppBar.prototype,"scrollBehavior",void 0),Se([zt({type:Boolean,reflect:!0,converter:ki})],e.TopAppBar.prototype,"scrolling",void 0),Se([Ft({selector:"mdui-top-app-bar-title",flatten:!0})],e.TopAppBar.prototype,"titleElements",void 0),Se([xi("variant")],e.TopAppBar.prototype,"onVariantChange",null),Se([xi("shrink")],e.TopAppBar.prototype,"onShrinkChange",null),e.TopAppBar=Se([_t("mdui-top-app-bar")],e.TopAppBar);const gr={};function br(e,t){if(u(gr[e])&&(gr[e]=[]),u(t))return gr[e];gr[e].push(t)}function yr(e){if(u(gr[e]))return;if(!gr[e].length)return;gr[e].shift()()}const wr={onClick:x},kr="mdui.functions.dialog.";let Cr;const xr=t=>{const i=new e.Dialog,o=M(i),n=["headline","description","icon","closeOnEsc","closeOnOverlayClick","stackedActions"],r=["onOpen","onOpened","onClose","onClosed","onOverlayClick"];return Object.entries(t).forEach((([e,t])=>{if(n.includes(e))i[e]=t;else if(r.includes(e)){const n=k(e.slice(2));o.on(n,(e=>{e.target===i&&t.call(i,i)}))}})),t.body&&o.append(t.body),t.actions&&t.actions.forEach((e=>{const t=Object.assign({},wr,e);M(`${t.text}`).appendTo(o).on("click",(function(){const e=t.onClick.call(i,i);vr(e)?(this.loading=!0,e.then((()=>{i.open=!1})).finally((()=>{this.loading=!1}))):!1!==e&&(i.open=!1)}))})),o.appendTo("body").on("closed",(e=>{e.target===i&&(o.remove(),t.queue&&(Cr=void 0,yr(kr+t.queue)))})),t.queue?Cr?br(kr+t.queue,(()=>{i.open=!0,Cr=i})):(setTimeout((()=>{i.open=!0})),Cr=i):setTimeout((()=>{i.open=!0})),i},$r=()=>_o("OK",{id:"functions.alert.confirmText"}),Rr=()=>_o("OK",{id:"functions.confirm.confirmText"}),Ir=()=>_o("Cancel",{id:"functions.confirm.cancelText"});function Sr(e){return e<0?-1:0===e?0:1}function Er(e,t,i){return(1-i)*e+i*t}function Tr(e,t,i){return it?t:i}function Dr(e){return(e%=360)<0&&(e+=360),e}function Ar(e){return(e%=360)<0&&(e+=360),e}function Mr(e,t){return 180-Math.abs(Math.abs(e-t)-180)}function Pr(e,t){return[e[0]*t[0][0]+e[1]*t[0][1]+e[2]*t[0][2],e[0]*t[1][0]+e[1]*t[1][1]+e[2]*t[1][2],e[0]*t[2][0]+e[1]*t[2][1]+e[2]*t[2][2]]}const Lr=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],_r=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],Br=[95.047,100,108.883];function Or(e,t,i){return(255<<24|(255&e)<<16|(255&t)<<8|255&i)>>>0}function zr(e){return Or(Wr(e[0]),Wr(e[1]),Wr(e[2]))}function Nr(e){return e>>16&255}function Fr(e){return e>>8&255}function Vr(e){return 255&e}function Hr(e,t,i){const o=_r,n=o[0][0]*e+o[0][1]*t+o[0][2]*i,r=o[1][0]*e+o[1][1]*t+o[1][2]*i,s=o[2][0]*e+o[2][1]*t+o[2][2]*i;return Or(Wr(n),Wr(r),Wr(s))}function Ur(e){const t=function(e){return Pr([jr(Nr(e)),jr(Fr(e)),jr(Vr(e))],Lr)}(e)[1];return 116*Gr(t/100)-16}function Kr(e){return 100*Yr((e+16)/116)}function qr(e){return 116*Gr(e/100)-16}function jr(e){const t=e/255;return t<=.040449936?t/12.92*100:100*Math.pow((t+.055)/1.055,2.4)}function Wr(e){const t=e/100;let i=0;return i=t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,o=0,n=255,(r=Math.round(255*i))n?n:r;var o,n,r}function Gr(e){const t=24389/27;return e>216/24389?Math.pow(e,1/3):(t*e+16)/116}function Yr(e){const t=e*e*e;return t>216/24389?t:(116*e-16)/(24389/27)}class Xr{static make(e=function(){return Br}(),t=200/Math.PI*Kr(50)/100,i=50,o=2,n=!1){const r=e,s=.401288*r[0]+.650173*r[1]+-.051461*r[2],a=-.250268*r[0]+1.204414*r[1]+.045854*r[2],l=-.002079*r[0]+.048952*r[1]+.953127*r[2],c=.8+o/10,d=c>=.9?Er(.59,.69,10*(c-.9)):Er(.525,.59,10*(c-.8));let h=n?1:c*(1-1/3.6*Math.exp((-t-42)/92));h=h>1?1:h<0?0:h;const u=c,p=[h*(100/s)+1-h,h*(100/a)+1-h,h*(100/l)+1-h],m=1/(5*t+1),f=m*m*m*m,v=1-f,g=f*t+.1*v*v*Math.cbrt(5*t),b=Kr(i)/e[1],y=1.48+Math.sqrt(b),w=.725/Math.pow(b,.2),k=w,C=[Math.pow(g*p[0]*s/100,.42),Math.pow(g*p[1]*a/100,.42),Math.pow(g*p[2]*l/100,.42)],x=[400*C[0]/(C[0]+27.13),400*C[1]/(C[1]+27.13),400*C[2]/(C[2]+27.13)];return new Xr(b,(2*x[0]+x[1]+.05*x[2])*w,w,k,d,u,p,g,Math.pow(g,.25),y)}constructor(e,t,i,o,n,r,s,a,l,c){this.n=e,this.aw=t,this.nbb=i,this.ncb=o,this.c=n,this.nc=r,this.rgbD=s,this.fl=a,this.fLRoot=l,this.z=c}}Xr.DEFAULT=Xr.make();class Jr{constructor(e,t,i,o,n,r,s,a,l){this.hue=e,this.chroma=t,this.j=i,this.q=o,this.m=n,this.s=r,this.jstar=s,this.astar=a,this.bstar=l}distance(e){const t=this.jstar-e.jstar,i=this.astar-e.astar,o=this.bstar-e.bstar,n=Math.sqrt(t*t+i*i+o*o);return 1.41*Math.pow(n,.63)}static fromInt(e){return Jr.fromIntInViewingConditions(e,Xr.DEFAULT)}static fromIntInViewingConditions(e,t){const i=(65280&e)>>8,o=255&e,n=jr((16711680&e)>>16),r=jr(i),s=jr(o),a=.41233895*n+.35762064*r+.18051042*s,l=.2126*n+.7152*r+.0722*s,c=.01932141*n+.11916382*r+.95034478*s,d=.401288*a+.650173*l-.051461*c,h=-.250268*a+1.204414*l+.045854*c,u=-.002079*a+.048952*l+.953127*c,p=t.rgbD[0]*d,m=t.rgbD[1]*h,f=t.rgbD[2]*u,v=Math.pow(t.fl*Math.abs(p)/100,.42),g=Math.pow(t.fl*Math.abs(m)/100,.42),b=Math.pow(t.fl*Math.abs(f)/100,.42),y=400*Sr(p)*v/(v+27.13),w=400*Sr(m)*g/(g+27.13),k=400*Sr(f)*b/(b+27.13),C=(11*y+-12*w+k)/11,x=(y+w-2*k)/9,$=(20*y+20*w+21*k)/20,R=(40*y+20*w+k)/20,I=180*Math.atan2(x,C)/Math.PI,S=I<0?I+360:I>=360?I-360:I,E=S*Math.PI/180,T=R*t.nbb,D=100*Math.pow(T/t.aw,t.c*t.z),A=4/t.c*Math.sqrt(D/100)*(t.aw+4)*t.fLRoot,M=S<20.14?S+360:S,P=5e4/13*(.25*(Math.cos(M*Math.PI/180+2)+3.8))*t.nc*t.ncb*Math.sqrt(C*C+x*x)/($+.305),L=Math.pow(P,.9)*Math.pow(1.64-Math.pow(.29,t.n),.73),_=L*Math.sqrt(D/100),B=_*t.fLRoot,O=50*Math.sqrt(L*t.c/(t.aw+4)),z=(1+100*.007)*D/(1+.007*D),N=1/.0228*Math.log(1+.0228*B),F=N*Math.cos(E),V=N*Math.sin(E);return new Jr(S,_,D,A,B,O,z,F,V)}static fromJch(e,t,i){return Jr.fromJchInViewingConditions(e,t,i,Xr.DEFAULT)}static fromJchInViewingConditions(e,t,i,o){const n=4/o.c*Math.sqrt(e/100)*(o.aw+4)*o.fLRoot,r=t*o.fLRoot,s=t/Math.sqrt(e/100),a=50*Math.sqrt(s*o.c/(o.aw+4)),l=i*Math.PI/180,c=(1+100*.007)*e/(1+.007*e),d=1/.0228*Math.log(1+.0228*r),h=d*Math.cos(l),u=d*Math.sin(l);return new Jr(i,t,e,n,r,a,c,h,u)}static fromUcs(e,t,i){return Jr.fromUcsInViewingConditions(e,t,i,Xr.DEFAULT)}static fromUcsInViewingConditions(e,t,i,o){const n=t,r=i,s=Math.sqrt(n*n+r*r),a=(Math.exp(.0228*s)-1)/.0228/o.fLRoot;let l=Math.atan2(r,n)*(180/Math.PI);l<0&&(l+=360);const c=e/(1-.007*(e-100));return Jr.fromJchInViewingConditions(c,a,l,o)}toInt(){return this.viewed(Xr.DEFAULT)}viewed(e){const t=0===this.chroma||0===this.j?0:this.chroma/Math.sqrt(this.j/100),i=Math.pow(t/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),o=this.hue*Math.PI/180,n=.25*(Math.cos(o+2)+3.8),r=e.aw*Math.pow(this.j/100,1/e.c/e.z),s=n*(5e4/13)*e.nc*e.ncb,a=r/e.nbb,l=Math.sin(o),c=Math.cos(o),d=23*(a+.305)*i/(23*s+11*i*c+108*i*l),h=d*c,u=d*l,p=(460*a+451*h+288*u)/1403,m=(460*a-891*h-261*u)/1403,f=(460*a-220*h-6300*u)/1403,v=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),g=Sr(p)*(100/e.fl)*Math.pow(v,1/.42),b=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),y=Sr(m)*(100/e.fl)*Math.pow(b,1/.42),w=Math.max(0,27.13*Math.abs(f)/(400-Math.abs(f))),k=Sr(f)*(100/e.fl)*Math.pow(w,1/.42),C=g/e.rgbD[0],x=y/e.rgbD[1],$=k/e.rgbD[2];return Hr(1.86206786*C-1.01125463*x+.14918677*$,.38752654*C+.62144744*x-.00897398*$,-.0158415*C-.03412294*x+1.04996444*$)}static fromXyzInViewingConditions(e,t,i,o){const n=.401288*e+.650173*t-.051461*i,r=-.250268*e+1.204414*t+.045854*i,s=-.002079*e+.048952*t+.953127*i,a=o.rgbD[0]*n,l=o.rgbD[1]*r,c=o.rgbD[2]*s,d=Math.pow(o.fl*Math.abs(a)/100,.42),h=Math.pow(o.fl*Math.abs(l)/100,.42),u=Math.pow(o.fl*Math.abs(c)/100,.42),p=400*Sr(a)*d/(d+27.13),m=400*Sr(l)*h/(h+27.13),f=400*Sr(c)*u/(u+27.13),v=(11*p+-12*m+f)/11,g=(p+m-2*f)/9,b=(20*p+20*m+21*f)/20,y=(40*p+20*m+f)/20,w=180*Math.atan2(g,v)/Math.PI,k=w<0?w+360:w>=360?w-360:w,C=k*Math.PI/180,x=y*o.nbb,$=100*Math.pow(x/o.aw,o.c*o.z),R=4/o.c*Math.sqrt($/100)*(o.aw+4)*o.fLRoot,I=k<20.14?k+360:k,S=5e4/13*(1/4*(Math.cos(I*Math.PI/180+2)+3.8))*o.nc*o.ncb*Math.sqrt(v*v+g*g)/(b+.305),E=Math.pow(S,.9)*Math.pow(1.64-Math.pow(.29,o.n),.73),T=E*Math.sqrt($/100),D=T*o.fLRoot,A=50*Math.sqrt(E*o.c/(o.aw+4)),M=(1+100*.007)*$/(1+.007*$),P=Math.log(1+.0228*D)/.0228,L=P*Math.cos(C),_=P*Math.sin(C);return new Jr(k,T,$,R,D,A,M,L,_)}xyzInViewingConditions(e){const t=0===this.chroma||0===this.j?0:this.chroma/Math.sqrt(this.j/100),i=Math.pow(t/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),o=this.hue*Math.PI/180,n=.25*(Math.cos(o+2)+3.8),r=e.aw*Math.pow(this.j/100,1/e.c/e.z),s=n*(5e4/13)*e.nc*e.ncb,a=r/e.nbb,l=Math.sin(o),c=Math.cos(o),d=23*(a+.305)*i/(23*s+11*i*c+108*i*l),h=d*c,u=d*l,p=(460*a+451*h+288*u)/1403,m=(460*a-891*h-261*u)/1403,f=(460*a-220*h-6300*u)/1403,v=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),g=Sr(p)*(100/e.fl)*Math.pow(v,1/.42),b=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),y=Sr(m)*(100/e.fl)*Math.pow(b,1/.42),w=Math.max(0,27.13*Math.abs(f)/(400-Math.abs(f))),k=Sr(f)*(100/e.fl)*Math.pow(w,1/.42),C=g/e.rgbD[0],x=y/e.rgbD[1],$=k/e.rgbD[2];return[1.86206786*C-1.01125463*x+.14918677*$,.38752654*C+.62144744*x-.00897398*$,-.0158415*C-.03412294*x+1.04996444*$]}}class Zr{static sanitizeRadians(e){return(e+8*Math.PI)%(2*Math.PI)}static trueDelinearized(e){const t=e/100;let i=0;return i=t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,255*i}static chromaticAdaptation(e){const t=Math.pow(Math.abs(e),.42);return 400*Sr(e)*t/(t+27.13)}static hueOf(e){const t=Pr(e,Zr.SCALED_DISCOUNT_FROM_LINRGB),i=Zr.chromaticAdaptation(t[0]),o=Zr.chromaticAdaptation(t[1]),n=Zr.chromaticAdaptation(t[2]),r=(11*i+-12*o+n)/11,s=(i+o-2*n)/9;return Math.atan2(s,r)}static areInCyclicOrder(e,t,i){return Zr.sanitizeRadians(t-e)100.01||y[1]>100.01||y[2]>100.01?0:zr(y);o-=(x-i)*o/(2*x)}return 0}static solveToInt(e,t,i){if(t<1e-4||i<1e-4||i>99.9999)return function(e){const t=Wr(Kr(e));return Or(t,t,t)}(i);const o=(e=Ar(e))/180*Math.PI,n=Kr(i),r=Zr.findResultByJ(o,t,n);if(0!==r)return r;return zr(Zr.bisectToLimit(n,o))}static solveToCam(e,t,i){return Jr.fromInt(Zr.solveToInt(e,t,i))}}Zr.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]],Zr.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]],Zr.Y_FROM_LINRGB=[.2126,.7152,.0722],Zr.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];class Qr{static from(e,t,i){return new Qr(Zr.solveToInt(e,t,i))}static fromInt(e){return new Qr(e)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(e){this.setInternalState(Zr.solveToInt(e,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(e){this.setInternalState(Zr.solveToInt(this.internalHue,e,this.internalTone))}get tone(){return this.internalTone}set tone(e){this.setInternalState(Zr.solveToInt(this.internalHue,this.internalChroma,e))}constructor(e){this.argb=e;const t=Jr.fromInt(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=Ur(e),this.argb=e}setInternalState(e){const t=Jr.fromInt(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=Ur(e),this.argb=e}inViewingConditions(e){const t=Jr.fromInt(this.toInt()).xyzInViewingConditions(e),i=Jr.fromXyzInViewingConditions(t[0],t[1],t[2],Xr.make());return Qr.from(i.hue,i.chroma,qr(t[1]))}}class es{static harmonize(e,t){const i=Qr.fromInt(e),o=Qr.fromInt(t),n=Mr(i.hue,o.hue),r=Math.min(.5*n,15),s=Ar(i.hue+r*(a=i.hue,Ar(o.hue-a)<=180?1:-1));var a;return Qr.from(s,i.chroma,i.tone).toInt()}static hctHue(e,t,i){const o=es.cam16Ucs(e,t,i),n=Jr.fromInt(o),r=Jr.fromInt(e);return Qr.from(n.hue,r.chroma,Ur(e)).toInt()}static cam16Ucs(e,t,i){const o=Jr.fromInt(e),n=Jr.fromInt(t),r=o.jstar,s=o.astar,a=o.bstar,l=r+(n.jstar-r)*i,c=s+(n.astar-s)*i,d=a+(n.bstar-a)*i;return Jr.fromUcs(l,c,d).toInt()}}class ts{static ratioOfTones(e,t){return e=Tr(0,100,e),t=Tr(0,100,t),ts.ratioOfYs(Kr(e),Kr(t))}static ratioOfYs(e,t){const i=e>t?e:t;return(i+5)/((i===t?e:t)+5)}static lighter(e,t){if(e<0||e>100)return-1;const i=Kr(e),o=t*(i+5)-5,n=ts.ratioOfYs(o,i),r=Math.abs(n-t);if(n.04)return-1;const s=qr(o)+.4;return s<0||s>100?-1:s}static darker(e,t){if(e<0||e>100)return-1;const i=Kr(e),o=(i+5)/t-5,n=ts.ratioOfYs(i,o),r=Math.abs(n-t);if(n.04)return-1;const s=qr(o)-.4;return s<0||s>100?-1:s}static lighterUnsafe(e,t){const i=ts.lighter(e,t);return i<0?100:i}static darkerUnsafe(e,t){const i=ts.darker(e,t);return i<0?0:i}}class is{static isDisliked(e){const t=Math.round(e.hue)>=90&&Math.round(e.hue)<=111,i=Math.round(e.chroma)>16,o=Math.round(e.tone)<65;return t&&i&&o}static fixIfDisliked(e){return is.isDisliked(e)?Qr.from(e.hue,e.chroma,70):e}}class os{static fromPalette(e){return new os(e.name??"",e.palette,e.tone,e.isBackground??!1,e.background,e.secondBackground,e.contrastCurve,e.toneDeltaPair)}constructor(e,t,i,o,n,r,s,a){if(this.name=e,this.palette=t,this.tone=i,this.isBackground=o,this.background=n,this.secondBackground=r,this.contrastCurve=s,this.toneDeltaPair=a,this.hctCache=new Map,!n&&r)throw new Error(`Color ${e} has secondBackgrounddefined, but background is not defined.`);if(!n&&s)throw new Error(`Color ${e} has contrastCurvedefined, but background is not defined.`);if(n&&!s)throw new Error(`Color ${e} has backgrounddefined, but contrastCurve is not defined.`)}getArgb(e){return this.getHct(e).toInt()}getHct(e){const t=this.hctCache.get(e);if(null!=t)return t;const i=this.getTone(e),o=this.palette(e).getHct(i);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(e,o),o}getTone(e){const t=e.contrastLevel<0;if(this.toneDeltaPair){const i=this.toneDeltaPair(e),o=i.roleA,n=i.roleB,r=i.delta,s=i.polarity,a=i.stayTogether,l=this.background(e).getTone(e),c="nearer"===s||"lighter"===s&&!e.isDark||"darker"===s&&e.isDark,d=c?o:n,h=c?n:o,u=this.name===d.name,p=e.isDark?1:-1,m=d.contrastCurve.get(e.contrastLevel),f=h.contrastCurve.get(e.contrastLevel),v=d.tone(e);let g=ts.ratioOfTones(l,v)>=m?v:os.foregroundTone(l,m);const b=h.tone(e);let y=ts.ratioOfTones(l,b)>=f?b:os.foregroundTone(l,f);return t&&(g=os.foregroundTone(l,m),y=os.foregroundTone(l,f)),(y-g)*p>=r||(y=Tr(0,100,g+r*p),(y-g)*p>=r||(g=Tr(0,100,y-r*p))),50<=g&&g<60?p>0?(g=60,y=Math.max(y,g+r*p)):(g=49,y=Math.min(y,g+r*p)):50<=y&&y<60&&(a?p>0?(g=60,y=Math.max(y,g+r*p)):(g=49,y=Math.min(y,g+r*p)):y=p>0?60:49),u?g:y}{let i=this.tone(e);if(null==this.background)return i;const o=this.background(e).getTone(e),n=this.contrastCurve.get(e.contrastLevel);if(ts.ratioOfTones(o,i)>=n||(i=os.foregroundTone(o,n)),t&&(i=os.foregroundTone(o,n)),this.isBackground&&50<=i&&i<60&&(i=ts.ratioOfTones(49,o)>=n?49:60),this.secondBackground){const[t,o]=[this.background,this.secondBackground],[r,s]=[t(e).getTone(e),o(e).getTone(e)],[a,l]=[Math.max(r,s),Math.min(r,s)];if(ts.ratioOfTones(a,i)>=n&&ts.ratioOfTones(l,i)>=n)return i;const c=ts.lighter(a,n),d=ts.darker(l,n),h=[];-1!==c&&h.push(c),-1!==d&&h.push(d);return os.tonePrefersLightForeground(r)||os.tonePrefersLightForeground(s)?c<0?100:c:1===h.length?h[0]:d<0?0:d}return i}}static foregroundTone(e,t){const i=ts.lighterUnsafe(e,t),o=ts.darkerUnsafe(e,t),n=ts.ratioOfTones(i,e),r=ts.ratioOfTones(o,e);if(os.tonePrefersLightForeground(e)){const e=Math.abs(n-r)<.1&&n=t||n>=r||e?i:o}return r>=t||r>=n?o:i}static tonePrefersLightForeground(e){return Math.round(e)<60}static toneAllowsLightForeground(e){return Math.round(e)<=49}static enableLightForeground(e){return os.tonePrefersLightForeground(e)&&!os.toneAllowsLightForeground(e)?49:e}}class ns{static fromInt(e){const t=Qr.fromInt(e);return ns.fromHct(t)}static fromHct(e){return new ns(e.hue,e.chroma,e)}static fromHueAndChroma(e,t){const i=new rs(e,t).create();return new ns(e,t,i)}constructor(e,t,i){this.hue=e,this.chroma=t,this.keyColor=i,this.cache=new Map}tone(e){let t=this.cache.get(e);return void 0===t&&(t=Qr.from(this.hue,this.chroma,e).toInt(),this.cache.set(e,t)),t}getHct(e){return Qr.fromInt(this.tone(e))}}class rs{constructor(e,t){this.hue=e,this.requestedChroma=t,this.chromaCache=new Map,this.maxChromaValue=200}create(){let e=0,t=100;for(;e=this.requestedChroma-.01)if(Math.abs(e-50)e.primaryPalette,tone:e=>e.primaryPalette.keyColor.tone}),hs.secondaryPaletteKeyColor=os.fromPalette({name:"secondary_palette_key_color",palette:e=>e.secondaryPalette,tone:e=>e.secondaryPalette.keyColor.tone}),hs.tertiaryPaletteKeyColor=os.fromPalette({name:"tertiary_palette_key_color",palette:e=>e.tertiaryPalette,tone:e=>e.tertiaryPalette.keyColor.tone}),hs.neutralPaletteKeyColor=os.fromPalette({name:"neutral_palette_key_color",palette:e=>e.neutralPalette,tone:e=>e.neutralPalette.keyColor.tone}),hs.neutralVariantPaletteKeyColor=os.fromPalette({name:"neutral_variant_palette_key_color",palette:e=>e.neutralVariantPalette,tone:e=>e.neutralVariantPalette.keyColor.tone}),hs.background=os.fromPalette({name:"background",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0}),hs.onBackground=os.fromPalette({name:"on_background",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>hs.background,contrastCurve:new ss(3,3,4.5,7)}),hs.surface=os.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0}),hs.surfaceDim=os.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:new ss(87,87,80,75).get(e.contrastLevel),isBackground:!0}),hs.surfaceBright=os.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ss(24,24,29,34).get(e.contrastLevel):98,isBackground:!0}),hs.surfaceContainerLowest=os.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ss(4,4,2,0).get(e.contrastLevel):100,isBackground:!0}),hs.surfaceContainerLow=os.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ss(10,10,11,12).get(e.contrastLevel):new ss(96,96,96,95).get(e.contrastLevel),isBackground:!0}),hs.surfaceContainer=os.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ss(12,12,16,20).get(e.contrastLevel):new ss(94,94,92,90).get(e.contrastLevel),isBackground:!0}),hs.surfaceContainerHigh=os.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ss(17,17,21,25).get(e.contrastLevel):new ss(92,92,88,85).get(e.contrastLevel),isBackground:!0}),hs.surfaceContainerHighest=os.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new ss(22,22,26,30).get(e.contrastLevel):new ss(90,90,84,80).get(e.contrastLevel),isBackground:!0}),hs.onSurface=os.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>hs.highestSurface(e),contrastCurve:new ss(4.5,7,11,21)}),hs.surfaceVariant=os.fromPalette({name:"surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:90,isBackground:!0}),hs.onSurfaceVariant=os.fromPalette({name:"on_surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?80:30,background:e=>hs.highestSurface(e),contrastCurve:new ss(3,4.5,7,11)}),hs.inverseSurface=os.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:20}),hs.inverseOnSurface=os.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?20:95,background:e=>hs.inverseSurface,contrastCurve:new ss(4.5,7,11,21)}),hs.outline=os.fromPalette({name:"outline",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?60:50,background:e=>hs.highestSurface(e),contrastCurve:new ss(1.5,3,4.5,7)}),hs.outlineVariant=os.fromPalette({name:"outline_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:80,background:e=>hs.highestSurface(e),contrastCurve:new ss(1,1,3,4.5)}),hs.shadow=os.fromPalette({name:"shadow",palette:e=>e.neutralPalette,tone:e=>0}),hs.scrim=os.fromPalette({name:"scrim",palette:e=>e.neutralPalette,tone:e=>0}),hs.surfaceTint=os.fromPalette({name:"surface_tint",palette:e=>e.primaryPalette,tone:e=>e.isDark?80:40,isBackground:!0}),hs.primary=os.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>ds(e)?e.isDark?100:0:e.isDark?80:40,isBackground:!0,background:e=>hs.highestSurface(e),contrastCurve:new ss(3,4.5,7,7),toneDeltaPair:e=>new as(hs.primaryContainer,hs.primary,10,"nearer",!1)}),hs.onPrimary=os.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,tone:e=>ds(e)?e.isDark?10:90:e.isDark?20:100,background:e=>hs.primary,contrastCurve:new ss(4.5,7,11,21)}),hs.primaryContainer=os.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>cs(e)?e.sourceColorHct.tone:ds(e)?e.isDark?85:25:e.isDark?30:90,isBackground:!0,background:e=>hs.highestSurface(e),contrastCurve:new ss(1,1,3,4.5),toneDeltaPair:e=>new as(hs.primaryContainer,hs.primary,10,"nearer",!1)}),hs.onPrimaryContainer=os.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,tone:e=>cs(e)?os.foregroundTone(hs.primaryContainer.tone(e),4.5):ds(e)?e.isDark?0:100:e.isDark?90:30,background:e=>hs.primaryContainer,contrastCurve:new ss(3,4.5,7,11)}),hs.inversePrimary=os.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>e.isDark?40:80,background:e=>hs.inverseSurface,contrastCurve:new ss(3,4.5,7,7)}),hs.secondary=os.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>hs.highestSurface(e),contrastCurve:new ss(3,4.5,7,7),toneDeltaPair:e=>new as(hs.secondaryContainer,hs.secondary,10,"nearer",!1)}),hs.onSecondary=os.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,tone:e=>ds(e)?e.isDark?10:100:e.isDark?20:100,background:e=>hs.secondary,contrastCurve:new ss(4.5,7,11,21)}),hs.secondaryContainer=os.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>{const t=e.isDark?30:90;return ds(e)?e.isDark?30:85:cs(e)?function(e,t,i,o){let n=i,r=Qr.from(e,t,i);if(r.chromas.chroma)break;if(Math.abs(s.chroma-t)<.4)break;Math.abs(s.chroma-t)hs.highestSurface(e),contrastCurve:new ss(1,1,3,4.5),toneDeltaPair:e=>new as(hs.secondaryContainer,hs.secondary,10,"nearer",!1)}),hs.onSecondaryContainer=os.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,tone:e=>ds(e)?e.isDark?90:10:cs(e)?os.foregroundTone(hs.secondaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>hs.secondaryContainer,contrastCurve:new ss(3,4.5,7,11)}),hs.tertiary=os.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>ds(e)?e.isDark?90:25:e.isDark?80:40,isBackground:!0,background:e=>hs.highestSurface(e),contrastCurve:new ss(3,4.5,7,7),toneDeltaPair:e=>new as(hs.tertiaryContainer,hs.tertiary,10,"nearer",!1)}),hs.onTertiary=os.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,tone:e=>ds(e)?e.isDark?10:90:e.isDark?20:100,background:e=>hs.tertiary,contrastCurve:new ss(4.5,7,11,21)}),hs.tertiaryContainer=os.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>{if(ds(e))return e.isDark?60:49;if(!cs(e))return e.isDark?30:90;const t=e.tertiaryPalette.getHct(e.sourceColorHct.tone);return is.fixIfDisliked(t).tone},isBackground:!0,background:e=>hs.highestSurface(e),contrastCurve:new ss(1,1,3,4.5),toneDeltaPair:e=>new as(hs.tertiaryContainer,hs.tertiary,10,"nearer",!1)}),hs.onTertiaryContainer=os.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>ds(e)?e.isDark?0:100:cs(e)?os.foregroundTone(hs.tertiaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>hs.tertiaryContainer,contrastCurve:new ss(3,4.5,7,11)}),hs.error=os.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>hs.highestSurface(e),contrastCurve:new ss(3,4.5,7,7),toneDeltaPair:e=>new as(hs.errorContainer,hs.error,10,"nearer",!1)}),hs.onError=os.fromPalette({name:"on_error",palette:e=>e.errorPalette,tone:e=>e.isDark?20:100,background:e=>hs.error,contrastCurve:new ss(4.5,7,11,21)}),hs.errorContainer=os.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.isDark?30:90,isBackground:!0,background:e=>hs.highestSurface(e),contrastCurve:new ss(1,1,3,4.5),toneDeltaPair:e=>new as(hs.errorContainer,hs.error,10,"nearer",!1)}),hs.onErrorContainer=os.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,tone:e=>ds(e)?e.isDark?90:10:e.isDark?90:30,background:e=>hs.errorContainer,contrastCurve:new ss(3,4.5,7,11)}),hs.primaryFixed=os.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>ds(e)?40:90,isBackground:!0,background:e=>hs.highestSurface(e),contrastCurve:new ss(1,1,3,4.5),toneDeltaPair:e=>new as(hs.primaryFixed,hs.primaryFixedDim,10,"lighter",!0)}),hs.primaryFixedDim=os.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>ds(e)?30:80,isBackground:!0,background:e=>hs.highestSurface(e),contrastCurve:new ss(1,1,3,4.5),toneDeltaPair:e=>new as(hs.primaryFixed,hs.primaryFixedDim,10,"lighter",!0)}),hs.onPrimaryFixed=os.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,tone:e=>ds(e)?100:10,background:e=>hs.primaryFixedDim,secondBackground:e=>hs.primaryFixed,contrastCurve:new ss(4.5,7,11,21)}),hs.onPrimaryFixedVariant=os.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,tone:e=>ds(e)?90:30,background:e=>hs.primaryFixedDim,secondBackground:e=>hs.primaryFixed,contrastCurve:new ss(3,4.5,7,11)}),hs.secondaryFixed=os.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>ds(e)?80:90,isBackground:!0,background:e=>hs.highestSurface(e),contrastCurve:new ss(1,1,3,4.5),toneDeltaPair:e=>new as(hs.secondaryFixed,hs.secondaryFixedDim,10,"lighter",!0)}),hs.secondaryFixedDim=os.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>ds(e)?70:80,isBackground:!0,background:e=>hs.highestSurface(e),contrastCurve:new ss(1,1,3,4.5),toneDeltaPair:e=>new as(hs.secondaryFixed,hs.secondaryFixedDim,10,"lighter",!0)}),hs.onSecondaryFixed=os.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>10,background:e=>hs.secondaryFixedDim,secondBackground:e=>hs.secondaryFixed,contrastCurve:new ss(4.5,7,11,21)}),hs.onSecondaryFixedVariant=os.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,tone:e=>ds(e)?25:30,background:e=>hs.secondaryFixedDim,secondBackground:e=>hs.secondaryFixed,contrastCurve:new ss(3,4.5,7,11)}),hs.tertiaryFixed=os.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>ds(e)?40:90,isBackground:!0,background:e=>hs.highestSurface(e),contrastCurve:new ss(1,1,3,4.5),toneDeltaPair:e=>new as(hs.tertiaryFixed,hs.tertiaryFixedDim,10,"lighter",!0)}),hs.tertiaryFixedDim=os.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>ds(e)?30:80,isBackground:!0,background:e=>hs.highestSurface(e),contrastCurve:new ss(1,1,3,4.5),toneDeltaPair:e=>new as(hs.tertiaryFixed,hs.tertiaryFixedDim,10,"lighter",!0)}),hs.onTertiaryFixed=os.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>ds(e)?100:10,background:e=>hs.tertiaryFixedDim,secondBackground:e=>hs.tertiaryFixed,contrastCurve:new ss(4.5,7,11,21)}),hs.onTertiaryFixedVariant=os.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,tone:e=>ds(e)?90:30,background:e=>hs.tertiaryFixedDim,secondBackground:e=>hs.tertiaryFixed,contrastCurve:new ss(3,4.5,7,11)});class us{static of(e){return new us(e,!1)}static contentOf(e){return new us(e,!0)}static fromColors(e){return us.createPaletteFromColors(!1,e)}static contentFromColors(e){return us.createPaletteFromColors(!0,e)}static createPaletteFromColors(e,t){const i=new us(t.primary,e);if(t.secondary){const o=new us(t.secondary,e);i.a2=o.a1}if(t.tertiary){const o=new us(t.tertiary,e);i.a3=o.a1}if(t.error){const o=new us(t.error,e);i.error=o.a1}if(t.neutral){const o=new us(t.neutral,e);i.n1=o.n1}if(t.neutralVariant){const o=new us(t.neutralVariant,e);i.n2=o.n2}return i}constructor(e,t){const i=Qr.fromInt(e),o=i.hue,n=i.chroma;t?(this.a1=ns.fromHueAndChroma(o,n),this.a2=ns.fromHueAndChroma(o,n/3),this.a3=ns.fromHueAndChroma(o+60,n/2),this.n1=ns.fromHueAndChroma(o,Math.min(n/12,4)),this.n2=ns.fromHueAndChroma(o,Math.min(n/6,8))):(this.a1=ns.fromHueAndChroma(o,Math.max(48,n)),this.a2=ns.fromHueAndChroma(o,16),this.a3=ns.fromHueAndChroma(o+60,24),this.n1=ns.fromHueAndChroma(o,4),this.n2=ns.fromHueAndChroma(o,8)),this.error=ns.fromHueAndChroma(25,84)}}class ps{fromInt(e){return function(e){const t=jr(Nr(e)),i=jr(Fr(e)),o=jr(Vr(e)),n=Lr,r=n[0][0]*t+n[0][1]*i+n[0][2]*o,s=n[1][0]*t+n[1][1]*i+n[1][2]*o,a=n[2][0]*t+n[2][1]*i+n[2][2]*o,l=s/Br[1],c=a/Br[2],d=Gr(r/Br[0]),h=Gr(l);return[116*h-16,500*(d-h),200*(h-Gr(c))]}(e)}toInt(e){return function(e,t,i){const o=Br,n=(e+16)/116,r=n-i/200,s=Yr(t/500+n),a=Yr(n),l=Yr(r);return Hr(s*o[0],a*o[1],l*o[2])}(e[0],e[1],e[2])}distance(e,t){const i=e[0]-t[0],o=e[1]-t[1],n=e[2]-t[2];return i*i+o*o+n*n}}class ms{static quantize(e,t,i){const o=new Map,n=new Array,r=new Array,s=new ps;let a=0;for(let t=0;t0&&(c=Math.min(c,t.length));const d=new Array;for(let e=0;e0)for(let e=0;e=4*a)continue;const t=s.distance(i,d[e]);t3&&(t++,u[e]=h)}}if(0===t&&0!==e)break;const i=new Array(c).fill(0),o=new Array(c).fill(0),r=new Array(c).fill(0);for(let e=0;e>24&255)<255||t.set(o,(t.get(o)??0)+1)}return t}}const gs=33,bs=35937,ys="red",ws="green",ks="blue";class Cs{constructor(e=[],t=[],i=[],o=[],n=[],r=[]){this.weights=e,this.momentsR=t,this.momentsG=i,this.momentsB=o,this.moments=n,this.cubes=r}quantize(e,t){this.constructHistogram(e),this.computeMoments();const i=this.createBoxes(t);return this.createResult(i.resultCount)}constructHistogram(e){this.weights=Array.from({length:bs}).fill(0),this.momentsR=Array.from({length:bs}).fill(0),this.momentsG=Array.from({length:bs}).fill(0),this.momentsB=Array.from({length:bs}).fill(0),this.moments=Array.from({length:bs}).fill(0);const t=vs.quantize(e);for(const[e,i]of t.entries()){const t=Nr(e),o=Fr(e),n=Vr(e),r=3,s=1+(t>>r),a=1+(o>>r),l=1+(n>>r),c=this.getIndex(s,a,l);this.weights[c]=(this.weights[c]??0)+i,this.momentsR[c]+=i*t,this.momentsG[c]+=i*o,this.momentsB[c]+=i*n,this.moments[c]+=i*(t*t+o*o+n*n)}}computeMoments(){for(let e=1;enew xs));const t=Array.from({length:e}).fill(0);this.cubes[0].r0=0,this.cubes[0].g0=0,this.cubes[0].b0=0,this.cubes[0].r1=32,this.cubes[0].g1=32,this.cubes[0].b1=32;let i=e,o=0;for(let n=1;n1?this.variance(this.cubes[o]):0,t[n]=this.cubes[n].vol>1?this.variance(this.cubes[n]):0):(t[o]=0,n--),o=0;let e=t[0];for(let i=1;i<=n;i++)t[i]>e&&(e=t[i],o=i);if(e<=0){i=n+1;break}}return new $s(e,i)}createResult(e){const t=[];for(let i=0;i0){const i=255<<24|(255&Math.round(this.volume(e,this.momentsR)/o))<<16|(255&Math.round(this.volume(e,this.momentsG)/o))<<8|255&Math.round(this.volume(e,this.momentsB)/o);t.push(i)}}return t}variance(e){const t=this.volume(e,this.momentsR),i=this.volume(e,this.momentsG),o=this.volume(e,this.momentsB);return this.moments[this.getIndex(e.r1,e.g1,e.b1)]-this.moments[this.getIndex(e.r1,e.g1,e.b0)]-this.moments[this.getIndex(e.r1,e.g0,e.b1)]+this.moments[this.getIndex(e.r1,e.g0,e.b0)]-this.moments[this.getIndex(e.r0,e.g1,e.b1)]+this.moments[this.getIndex(e.r0,e.g1,e.b0)]+this.moments[this.getIndex(e.r0,e.g0,e.b1)]-this.moments[this.getIndex(e.r0,e.g0,e.b0)]-(t*t+i*i+o*o)/this.volume(e,this.weights)}cut(e,t){const i=this.volume(e,this.momentsR),o=this.volume(e,this.momentsG),n=this.volume(e,this.momentsB),r=this.volume(e,this.weights),s=this.maximize(e,ys,e.r0+1,e.r1,i,o,n,r),a=this.maximize(e,ws,e.g0+1,e.g1,i,o,n,r),l=this.maximize(e,ks,e.b0+1,e.b1,i,o,n,r);let c;const d=s.maximum,h=a.maximum,u=l.maximum;if(d>=h&&d>=u){if(s.cutLocation<0)return!1;c=ys}else c=h>=d&&h>=u?ws:ks;switch(t.r1=e.r1,t.g1=e.g1,t.b1=e.b1,c){case ys:e.r1=s.cutLocation,t.r0=e.r1,t.g0=e.g0,t.b0=e.b0;break;case ws:e.g1=a.cutLocation,t.r0=e.r0,t.g0=e.g1,t.b0=e.b0;break;case ks:e.b1=l.cutLocation,t.r0=e.r0,t.g0=e.g0,t.b0=e.b1;break;default:throw new Error("unexpected direction "+c)}return e.vol=(e.r1-e.r0)*(e.g1-e.g0)*(e.b1-e.b0),t.vol=(t.r1-t.r0)*(t.g1-t.g0)*(t.b1-t.b0),!0}maximize(e,t,i,o,n,r,s,a){const l=this.bottom(e,t,this.momentsR),c=this.bottom(e,t,this.momentsG),d=this.bottom(e,t,this.momentsB),h=this.bottom(e,t,this.weights);let u=0,p=-1,m=0,f=0,v=0,g=0;for(let b=i;bu&&(u=y,p=b))}return new Rs(p,u)}volume(e,t){return t[this.getIndex(e.r1,e.g1,e.b1)]-t[this.getIndex(e.r1,e.g1,e.b0)]-t[this.getIndex(e.r1,e.g0,e.b1)]+t[this.getIndex(e.r1,e.g0,e.b0)]-t[this.getIndex(e.r0,e.g1,e.b1)]+t[this.getIndex(e.r0,e.g1,e.b0)]+t[this.getIndex(e.r0,e.g0,e.b1)]-t[this.getIndex(e.r0,e.g0,e.b0)]}bottom(e,t,i){switch(t){case ys:return-i[this.getIndex(e.r0,e.g1,e.b1)]+i[this.getIndex(e.r0,e.g1,e.b0)]+i[this.getIndex(e.r0,e.g0,e.b1)]-i[this.getIndex(e.r0,e.g0,e.b0)];case ws:return-i[this.getIndex(e.r1,e.g0,e.b1)]+i[this.getIndex(e.r1,e.g0,e.b0)]+i[this.getIndex(e.r0,e.g0,e.b1)]-i[this.getIndex(e.r0,e.g0,e.b0)];case ks:return-i[this.getIndex(e.r1,e.g1,e.b0)]+i[this.getIndex(e.r1,e.g0,e.b0)]+i[this.getIndex(e.r0,e.g1,e.b0)]-i[this.getIndex(e.r0,e.g0,e.b0)];default:throw new Error("unexpected direction $direction")}}top(e,t,i,o){switch(t){case ys:return o[this.getIndex(i,e.g1,e.b1)]-o[this.getIndex(i,e.g1,e.b0)]-o[this.getIndex(i,e.g0,e.b1)]+o[this.getIndex(i,e.g0,e.b0)];case ws:return o[this.getIndex(e.r1,i,e.b1)]-o[this.getIndex(e.r1,i,e.b0)]-o[this.getIndex(e.r0,i,e.b1)]+o[this.getIndex(e.r0,i,e.b0)];case ks:return o[this.getIndex(e.r1,e.g1,i)]-o[this.getIndex(e.r1,e.g0,i)]-o[this.getIndex(e.r0,e.g1,i)]+o[this.getIndex(e.r0,e.g0,i)];default:throw new Error("unexpected direction $direction")}}getIndex(e,t,i){return(e<<10)+(e<<6)+e+(t<<5)+t+i}}class xs{constructor(e=0,t=0,i=0,o=0,n=0,r=0,s=0){this.r0=e,this.r1=t,this.g0=i,this.g1=o,this.b0=n,this.b1=r,this.vol=s}}class $s{constructor(e,t){this.requestedCount=e,this.resultCount=t}}class Rs{constructor(e,t){this.cutLocation=e,this.maximum=t}}class Is{static quantize(e,t){const i=(new Cs).quantize(e,t);return ms.quantize(e,i,t)}}class Ss{get primary(){return this.props.primary}get onPrimary(){return this.props.onPrimary}get primaryContainer(){return this.props.primaryContainer}get onPrimaryContainer(){return this.props.onPrimaryContainer}get secondary(){return this.props.secondary}get onSecondary(){return this.props.onSecondary}get secondaryContainer(){return this.props.secondaryContainer}get onSecondaryContainer(){return this.props.onSecondaryContainer}get tertiary(){return this.props.tertiary}get onTertiary(){return this.props.onTertiary}get tertiaryContainer(){return this.props.tertiaryContainer}get onTertiaryContainer(){return this.props.onTertiaryContainer}get error(){return this.props.error}get onError(){return this.props.onError}get errorContainer(){return this.props.errorContainer}get onErrorContainer(){return this.props.onErrorContainer}get background(){return this.props.background}get onBackground(){return this.props.onBackground}get surface(){return this.props.surface}get onSurface(){return this.props.onSurface}get surfaceVariant(){return this.props.surfaceVariant}get onSurfaceVariant(){return this.props.onSurfaceVariant}get outline(){return this.props.outline}get outlineVariant(){return this.props.outlineVariant}get shadow(){return this.props.shadow}get scrim(){return this.props.scrim}get inverseSurface(){return this.props.inverseSurface}get inverseOnSurface(){return this.props.inverseOnSurface}get inversePrimary(){return this.props.inversePrimary}static light(e){return Ss.lightFromCorePalette(us.of(e))}static dark(e){return Ss.darkFromCorePalette(us.of(e))}static lightContent(e){return Ss.lightFromCorePalette(us.contentOf(e))}static darkContent(e){return Ss.darkFromCorePalette(us.contentOf(e))}static lightFromCorePalette(e){return new Ss({primary:e.a1.tone(40),onPrimary:e.a1.tone(100),primaryContainer:e.a1.tone(90),onPrimaryContainer:e.a1.tone(10),secondary:e.a2.tone(40),onSecondary:e.a2.tone(100),secondaryContainer:e.a2.tone(90),onSecondaryContainer:e.a2.tone(10),tertiary:e.a3.tone(40),onTertiary:e.a3.tone(100),tertiaryContainer:e.a3.tone(90),onTertiaryContainer:e.a3.tone(10),error:e.error.tone(40),onError:e.error.tone(100),errorContainer:e.error.tone(90),onErrorContainer:e.error.tone(10),background:e.n1.tone(99),onBackground:e.n1.tone(10),surface:e.n1.tone(99),onSurface:e.n1.tone(10),surfaceVariant:e.n2.tone(90),onSurfaceVariant:e.n2.tone(30),outline:e.n2.tone(50),outlineVariant:e.n2.tone(80),shadow:e.n1.tone(0),scrim:e.n1.tone(0),inverseSurface:e.n1.tone(20),inverseOnSurface:e.n1.tone(95),inversePrimary:e.a1.tone(80)})}static darkFromCorePalette(e){return new Ss({primary:e.a1.tone(80),onPrimary:e.a1.tone(20),primaryContainer:e.a1.tone(30),onPrimaryContainer:e.a1.tone(90),secondary:e.a2.tone(80),onSecondary:e.a2.tone(20),secondaryContainer:e.a2.tone(30),onSecondaryContainer:e.a2.tone(90),tertiary:e.a3.tone(80),onTertiary:e.a3.tone(20),tertiaryContainer:e.a3.tone(30),onTertiaryContainer:e.a3.tone(90),error:e.error.tone(80),onError:e.error.tone(20),errorContainer:e.error.tone(30),onErrorContainer:e.error.tone(80),background:e.n1.tone(10),onBackground:e.n1.tone(90),surface:e.n1.tone(10),onSurface:e.n1.tone(90),surfaceVariant:e.n2.tone(30),onSurfaceVariant:e.n2.tone(80),outline:e.n2.tone(60),outlineVariant:e.n2.tone(30),shadow:e.n1.tone(0),scrim:e.n1.tone(0),inverseSurface:e.n1.tone(90),inverseOnSurface:e.n1.tone(20),inversePrimary:e.a1.tone(40)})}constructor(e){this.props=e}toJSON(){return{...this.props}}}const Es={desired:4,fallbackColorARGB:4282549748,filter:!0};function Ts(e,t){return e.score>t.score?-1:e.score=15;e--){d.length=0;for(const{hct:t}of c){if(d.find((i=>Mr(t.hue,i.hue)=i)break}if(d.length>=i)break}const h=[];0===d.length&&h.push(o);for(const e of d)h.push(e.toInt());return h}}function As(e){const t=3===(e=e.replace("#","")).length,i=6===e.length,o=8===e.length;if(!t&&!i&&!o)throw new Error("unexpected hex "+e);let n=0,r=0,s=0;return t?(n=Ms(e.slice(0,1).repeat(2)),r=Ms(e.slice(1,2).repeat(2)),s=Ms(e.slice(2,3).repeat(2))):i?(n=Ms(e.slice(0,2)),r=Ms(e.slice(2,4)),s=Ms(e.slice(4,6))):o&&(n=Ms(e.slice(2,4)),r=Ms(e.slice(4,6)),s=Ms(e.slice(6,8))),(255<<24|(255&n)<<16|(255&r)<<8|255&s)>>>0}function Ms(e){return parseInt(e,16)}Ds.TARGET_CHROMA=48,Ds.WEIGHT_PROPORTION=.7,Ds.WEIGHT_CHROMA_ABOVE=.3,Ds.WEIGHT_CHROMA_BELOW=.1,Ds.CUTOFF_CHROMA=5,Ds.CUTOFF_EXCITED_PROPORTION=.01;const Ps=()=>_o("OK",{id:"functions.prompt.confirmText"}),Ls=()=>_o("Cancel",{id:"functions.prompt.cancelText"}),_s=["light","dark"],Bs="mdui-custom-color-scheme-";let Os=0;const zs=e=>{const t=M(e);let i=t.get().map((e=>Array.from(e.classList))).flat();i=L(i).filter((e=>e.startsWith(Bs))),t.removeClass(i.join(" "));const o=i.filter((e=>0===M(`.${e}`).length));M(o.map((e=>`#${e}`)).join(",")).remove()},Ns=(e,t)=>{const i=n(),o=M(t?.target||i.documentElement),r={light:Ss.light(e).toJSON(),dark:Ss.dark(e).toJSON()},s=us.of(e);Object.assign(r.light,{"surface-dim":s.n1.tone(87),"surface-bright":s.n1.tone(98),"surface-container-lowest":s.n1.tone(100),"surface-container-low":s.n1.tone(96),"surface-container":s.n1.tone(94),"surface-container-high":s.n1.tone(92),"surface-container-highest":s.n1.tone(90),"surface-tint-color":r.light.primary}),Object.assign(r.dark,{"surface-dim":s.n1.tone(6),"surface-bright":s.n1.tone(24),"surface-container-lowest":s.n1.tone(4),"surface-container-low":s.n1.tone(10),"surface-container":s.n1.tone(12),"surface-container-high":s.n1.tone(17),"surface-container-highest":s.n1.tone(22),"surface-tint-color":r.dark.primary}),(t?.customColors||[]).map((t=>{const i=k(t.name),o=function(e,t){let i=t.value;const o=i,n=e;i=es.harmonize(o,n);const r=us.of(i).a1;return{color:t,value:i,light:{color:r.tone(40),onColor:r.tone(100),colorContainer:r.tone(90),onColorContainer:r.tone(10)},dark:{color:r.tone(80),onColor:r.tone(20),colorContainer:r.tone(30),onColorContainer:r.tone(90)}}}(e,{name:i,value:As(t.value),blend:!0});_s.forEach((e=>{r[e][i]=o[e].color,r[e][`on-${i}`]=o[e].onColor,r[e][`${i}-container`]=o[e].colorContainer,r[e][`on-${i}-container`]=o[e].onColorContainer}))}));const a=(e,t)=>Object.entries(r[e]).map((([e,i])=>t(k(e),(e=>[Nr(e),Fr(e),Vr(e)].join(", "))(i)))).join(""),l=Bs+`${e}-${Os++}`,c=`.${l} {\n ${a("light",((e,t)=>`--mdui-color-${e}-light: ${t};`))}\n ${a("dark",((e,t)=>`--mdui-color-${e}-dark: ${t};`))}\n ${a("light",(e=>`--mdui-color-${e}: var(--mdui-color-${e}-light);`))}\n\n color: rgb(var(--mdui-color-on-background));\n background-color: rgb(var(--mdui-color-background));\n}\n\n.mdui-theme-dark .${l},\n.mdui-theme-dark.${l} {\n ${a("dark",(e=>`--mdui-color-${e}: var(--mdui-color-${e}-dark);`))}\n}\n\n@media (prefers-color-scheme: dark) {\n .mdui-theme-auto .${l},\n .mdui-theme-auto.${l} {\n ${a("dark",(e=>`--mdui-color-${e}: var(--mdui-color-${e}-dark);`))}\n }\n}`;zs(o),M(i.head).append(``),o.addClass(l)},Fs="mdui.functions.snackbar.";let Vs;e.$=M,e.alert=e=>{const t=Object.assign({},{confirmText:$r(),onConfirm:x},e),i=["headline","description","icon","closeOnEsc","closeOnOverlayClick","queue","onOpen","onOpened","onClose","onClosed","onOverlayClick"];return new Promise(((o,n)=>{let r=!1;const s=xr({...Object.fromEntries(i.filter((e=>!u(t[e]))).map((e=>[e,t[e]]))),actions:[{text:t.confirmText,onClick:e=>{const i=t.onConfirm.call(e,e);return vr(i)?i.then((()=>{r=!0})):!1!==i&&(r=!0),i}}]});e.confirmText||hn(s,(()=>{M(s).find('[slot="action"]').text($r())})),M(s).on("close",(e=>{e.target===s&&(r?o():n(),un(s))}))}))},e.breakpoint=Nn,e.confirm=e=>{const t=Object.assign({},{confirmText:Rr(),cancelText:Ir(),onConfirm:x,onCancel:x},e),i=["headline","description","icon","closeOnEsc","closeOnOverlayClick","stackedActions","queue","onOpen","onOpened","onClose","onClosed","onOverlayClick"];return new Promise(((o,n)=>{let r=!1;const s=xr({...Object.fromEntries(i.filter((e=>!u(t[e]))).map((e=>[e,t[e]]))),actions:[{text:t.cancelText,onClick:e=>t.onCancel.call(e,e)},{text:t.confirmText,onClick:e=>{const i=t.onConfirm.call(e,e);return vr(i)?i.then((()=>{r=!0})):!1!==i&&(r=!0),i}}]});e.confirmText||hn(s,(()=>{M(s).find('[slot="action"]').last().text(Rr())})),e.cancelText||hn(s,(()=>{M(s).find('[slot="action"]').first().text(Ir())})),M(s).on("close",(e=>{e.target===s&&(r?o():n(),un(s))}))}))},e.dialog=xr,e.getColorFromImage=async e=>{const t=M(e),i=await async function(e){const t=await new Promise(((t,i)=>{const o=document.createElement("canvas"),n=o.getContext("2d");if(!n)return void i(new Error("Could not get canvas context"));const r=()=>{o.width=e.width,o.height=e.height,n.drawImage(e,0,0);let i=[0,0,e.width,e.height];const r=e.dataset.area;r&&/^\d+(\s*,\s*\d+){3}$/.test(r)&&(i=r.split(/\s*,\s*/).map((e=>parseInt(e,10))));const[s,a,l,c]=i;t(n.getImageData(s,a,l,c).data)},s=()=>{i(new Error("Image load failed"))};e.complete?r():(e.onload=r,e.onerror=s)})),i=[];for(let e=0;e{if(!an)throw new Error(sn);return an()},e.getTheme=(e=document.documentElement)=>{const t=M(e)[0],i=["light","dark","auto"],o="mdui-theme-";return Array.from(t.classList).find((e=>i.map((e=>o+e)).includes(e)))?.slice(11)??"light"},e.loadLocale=e=>{(e=>{const t=s(),i=tn({sourceLocale:"en-us",targetLocales:rn,loadLocale:e});an=i.getLocale,ln=i.setLocale,t.addEventListener(Mo,(e=>{t.dispatchEvent(new CustomEvent("mdui-localize-status",{detail:e.detail}))}))})(e)},e.observeResize=Di,e.prompt=t=>{const i=Object.assign({},{confirmText:Ps(),cancelText:Ls(),onConfirm:x,onCancel:x,validator:x,textFieldOptions:{}},t),o=["headline","description","icon","closeOnEsc","closeOnOverlayClick","stackedActions","queue","onOpen","onOpened","onClose","onClosed","onOverlayClick"],n=new e.TextField;return Object.entries(i.textFieldOptions).forEach((([e,t])=>{n[e]=t})),new Promise(((e,r)=>{let s=!1;const a=xr({...Object.fromEntries(o.filter((e=>!u(i[e]))).map((e=>[e,i[e]]))),body:n,actions:[{text:i.cancelText,onClick:e=>i.onCancel.call(e,n.value,e)},{text:i.confirmText,onClick:e=>{if(n.setCustomValidity(""),!n.reportValidity())return!1;const t=i.validator.call(n,n.value);return h(t)&&!t?(n.setCustomValidity(" "),!1):c(t)?(n.setCustomValidity(t),!1):vr(t)?new Promise(((e,i)=>{t.then(e).catch((e=>{n.setCustomValidity(e),i(e)}))})):(()=>{const t=i.onConfirm.call(e,n.value,e);return vr(t)?t.then((()=>{s=!0})):!1!==t&&(s=!0),t})()}}]});t.confirmText||hn(a,(()=>{M(a).find('[slot="action"]').last().text(Ps())})),t.cancelText||hn(a,(()=>{M(a).find('[slot="action"]').first().text(Ls())})),M(a).on("close",(t=>{t.target===a&&(s?e(n.value):r(),un(a))}))}))},e.removeColorScheme=(e=document.documentElement)=>{zs(e)},e.setColorScheme=(e,t)=>{const i=As(e);Ns(i,t)},e.setLocale=e=>{if(!ln)throw new Error(sn);return ln(e)},e.setTheme=(e,t=document.documentElement)=>{const i=M(t),o="mdui-theme-";i.removeClass(["light","dark","auto"].map((e=>o+e)).join(" ")).addClass(o+e)},e.snackbar=t=>{const i=new e.Snackbar,o=M(i);return Object.entries(t).forEach((([e,n])=>{if("message"===e)i.innerHTML=n;else if(["onClick","onActionClick","onOpen","onOpened","onClose","onClosed"].includes(e)){const r=k(e.slice(2));o.on(r,(o=>{if(o.target===i)if("onActionClick"===e){const e=(t.onActionClick??x).call(i,i);vr(e)?(i.actionLoading=!0,e.then((()=>{i.open=!1})).finally((()=>{i.actionLoading=!1}))):!1!==e&&(i.open=!1)}else n.call(i,i)}))}else i[e]=n})),o.appendTo("body").on("closed",(e=>{e.target===i&&(o.remove(),t.queue&&(Vs=void 0,yr(Fs+t.queue)))})),t.queue?Vs?br(Fs+t.queue,(()=>{i.open=!0,Vs=i})):(setTimeout((()=>{i.open=!0})),Vs=i):setTimeout((()=>{i.open=!0})),i},e.throttle=(e,t=0)=>{const i=s();let o,n;return function(...r){return void 0===o&&(o=i.setTimeout((()=>{n=e.apply(this,r),o=void 0}),t)),n}}})); diff --git a/client/static/react-dom-esm-18.3.1.static.js b/client/static/react-dom-esm-18.3.1.static.js deleted file mode 100644 index 130ea5f..0000000 --- a/client/static/react-dom-esm-18.3.1.static.js +++ /dev/null @@ -1,5 +0,0 @@ -/* esm.sh - react-dom@18.3.1 */ -import "./react@18.3.1/react.mjs"; -import "./scheduler@0.23.2/scheduler.mjs"; -export * from "./react-dom@18.3.1/react-dom.mjs"; -export { default } from "./react-dom@18.3.1/react-dom.mjs"; \ No newline at end of file diff --git a/client/static/react-dom@18.3.1/react-dom.mjs b/client/static/react-dom@18.3.1/react-dom.mjs deleted file mode 100644 index 9879ef7..0000000 --- a/client/static/react-dom@18.3.1/react-dom.mjs +++ /dev/null @@ -1,24 +0,0 @@ -/* esm.sh - react-dom@18.3.1 */ -import*as __0$ from"../react@18.3.1/react.mjs";import*as __1$ from"../scheduler@0.23.2/scheduler.mjs";var require=n=>{const e=m=>typeof m.default<"u"?m.default:m,c=m=>Object.assign({__esModule:true},m);switch(n){case"react":return e(__0$);case"scheduler":return e(__1$);default:console.error('module "'+n+'" not found');return null;}}; -var va=Object.create;var lu=Object.defineProperty;var ya=Object.getOwnPropertyDescriptor;var ga=Object.getOwnPropertyNames;var wa=Object.getPrototypeOf,Sa=Object.prototype.hasOwnProperty;var iu=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,t)=>(typeof require<"u"?require:n)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var uu=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports);var ka=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let l of ga(n))!Sa.call(e,l)&&l!==t&&lu(e,l,{get:()=>n[l],enumerable:!(r=ya(n,l))||r.enumerable});return e};var Ea=(e,n,t)=>(t=e!=null?va(wa(e)):{},ka(n||!e||!e.__esModule?lu(t,"default",{value:e,enumerable:!0}):t,e));var fa=uu(fe=>{"use strict";var Ca=iu("react"),ae=iu("scheduler");function v(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),El=Object.prototype.hasOwnProperty,xa=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ou={},su={};function Na(e){return El.call(su,e)?!0:El.call(ou,e)?!1:xa.test(e)?su[e]=!0:(ou[e]=!0,!1)}function _a(e,n,t,r){if(t!==null&&t.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return r?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function za(e,n,t,r){if(n===null||typeof n>"u"||_a(e,n,t,r))return!0;if(r)return!1;if(t!==null)switch(t.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function ee(e,n,t,r,l,i,u){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=i,this.removeEmptyString=u}var Y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Y[e]=new ee(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];Y[n]=new ee(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Y[e]=new ee(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Y[e]=new ee(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Y[e]=new ee(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Y[e]=new ee(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Y[e]=new ee(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Y[e]=new ee(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Y[e]=new ee(e,5,!1,e.toLowerCase(),null,!1,!1)});var mi=/[\-:]([a-z])/g;function hi(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(mi,hi);Y[n]=new ee(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(mi,hi);Y[n]=new ee(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(mi,hi);Y[n]=new ee(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Y[e]=new ee(e,1,!1,e.toLowerCase(),null,!1,!1)});Y.xlinkHref=new ee("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Y[e]=new ee(e,1,!1,e.toLowerCase(),null,!0,!0)});function vi(e,n,t,r){var l=Y.hasOwnProperty(n)?Y[n]:null;(l!==null?l.type!==0:r||!(2o||l[u]!==i[o]){var s=` -`+l[u].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=u&&0<=o);break}}}finally{nl=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?it(e):""}function Pa(e){switch(e.tag){case 5:return it(e.type);case 16:return it("Lazy");case 13:return it("Suspense");case 19:return it("SuspenseList");case 0:case 2:case 15:return e=tl(e.type,!1),e;case 11:return e=tl(e.type.render,!1),e;case 1:return e=tl(e.type,!0),e;default:return""}}function _l(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Nn:return"Fragment";case xn:return"Portal";case Cl:return"Profiler";case yi:return"StrictMode";case xl:return"Suspense";case Nl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vo:return(e.displayName||"Context")+".Consumer";case ho:return(e._context.displayName||"Context")+".Provider";case gi:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wi:return n=e.displayName||null,n!==null?n:_l(e.type)||"Memo";case He:n=e._payload,e=e._init;try{return _l(e(n))}catch{}}return null}function La(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _l(n);case 8:return n===yi?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function tn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function go(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ta(e){var n=go(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var l=t.get,i=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(u){r=""+u,i.call(this,u)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(u){r=""+u},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function At(e){e._valueTracker||(e._valueTracker=Ta(e))}function wo(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=go(e)?e.checked?"true":"false":e.value),e=r,e!==t?(n.setValue(e),!0):!1}function mr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function zl(e,n){var t=n.checked;return F({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function cu(e,n){var t=n.defaultValue==null?"":n.defaultValue,r=n.checked!=null?n.checked:n.defaultChecked;t=tn(n.value!=null?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function So(e,n){n=n.checked,n!=null&&vi(e,"checked",n,!1)}function Pl(e,n){So(e,n);var t=tn(n.value),r=n.type;if(t!=null)r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Ll(e,n.type,t):n.hasOwnProperty("defaultValue")&&Ll(e,n.type,tn(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function fu(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!(r!=="submit"&&r!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function Ll(e,n,t){(n!=="number"||mr(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var ut=Array.isArray;function In(e,n,t,r){if(e=e.options,n){n={};for(var l=0;l"+n.valueOf().toString()+"",n=Bt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function wt(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=n;return}}e.textContent=n}var at={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ma=["Webkit","ms","Moz","O"];Object.keys(at).forEach(function(e){Ma.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),at[n]=at[e]})});function xo(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||at.hasOwnProperty(e)&&at[e]?(""+n).trim():n+"px"}function No(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var r=t.indexOf("--")===0,l=xo(t,n[t],r);t==="float"&&(t="cssFloat"),r?e.setProperty(t,l):e[t]=l}}var Da=F({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Dl(e,n){if(n){if(Da[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(v(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(v(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(v(61))}if(n.style!=null&&typeof n.style!="object")throw Error(v(62))}}function Ol(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rl=null;function Si(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fl=null,jn=null,Un=null;function mu(e){if(e=jt(e)){if(typeof Fl!="function")throw Error(v(280));var n=e.stateNode;n&&(n=Hr(n),Fl(e.stateNode,e.type,n))}}function _o(e){jn?Un?Un.push(e):Un=[e]:jn=e}function zo(){if(jn){var e=jn,n=Un;if(Un=jn=null,mu(e),n)for(e=0;e>>=0,e===0?32:31-(Wa(e)/Qa|0)|0}var Ht=64,Wt=4194304;function ot(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function gr(e,n){var t=e.pendingLanes;if(t===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,u=t&268435455;if(u!==0){var o=u&~l;o!==0?r=ot(o):(i&=u,i!==0&&(r=ot(i)))}else u=t&~l,u!==0?r=ot(u):i!==0&&(r=ot(i));if(r===0)return 0;if(n!==0&&n!==r&&!(n&l)&&(l=r&-r,i=n&-n,l>=i||l===16&&(i&4194240)!==0))return n;if(r&4&&(r|=t&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=r;0t;t++)n.push(e);return n}function Ft(e,n,t){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Ee(n),e[n]=t}function Xa(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ft),Cu=" ",xu=!1;function Yo(e,n){switch(e){case"keyup":return Ec.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _n=!1;function xc(e,n){switch(e){case"compositionend":return Xo(n);case"keypress":return n.which!==32?null:(xu=!0,Cu);case"textInput":return e=n.data,e===Cu&&xu?null:e;default:return null}}function Nc(e,n){if(_n)return e==="compositionend"||!Pi&&Yo(e,n)?(e=$o(),ir=Ni=Ke=null,_n=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:t,offset:n-e};e=r}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=zu(t)}}function qo(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?qo(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function bo(){for(var e=window,n=mr();n instanceof e.HTMLIFrameElement;){try{var t=typeof n.contentWindow.location.href=="string"}catch{t=!1}if(t)e=n.contentWindow;else break;n=mr(e.document)}return n}function Li(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Rc(e){var n=bo(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&qo(t.ownerDocument.documentElement,t)){if(r!==null&&Li(t)){if(n=r.start,e=r.end,e===void 0&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if(e=(n=t.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var l=t.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=Pu(t,i);var u=Pu(t,r);l&&u&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(n=n.createRange(),n.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(n),e.extend(u.node,u.offset)):(n.setEnd(u.node,u.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,zn=null,Bl=null,pt=null,Hl=!1;function Lu(e,n,t){var r=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;Hl||zn==null||zn!==mr(r)||(r=zn,"selectionStart"in r&&Li(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),pt&&Nt(pt,r)||(pt=r,r=kr(Bl,"onSelect"),0Tn||(e.current=Xl[Tn],Xl[Tn]=null,Tn--)}function L(e,n){Tn++,Xl[Tn]=e.current,e.current=n}var rn={},J=un(rn),re=un(!1),hn=rn;function Wn(e,n){var t=e.type.contextTypes;if(!t)return rn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in t)l[i]=n[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=l),l}function le(e){return e=e.childContextTypes,e!=null}function Cr(){M(re),M(J)}function Uu(e,n,t){if(J.current!==rn)throw Error(v(168));L(J,n),L(re,t)}function ss(e,n,t){var r=e.stateNode;if(n=n.childContextTypes,typeof r.getChildContext!="function")return t;r=r.getChildContext();for(var l in r)if(!(l in n))throw Error(v(108,La(e)||"Unknown",l));return F({},t,r)}function xr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rn,hn=J.current,L(J,e),L(re,re.current),!0}function Vu(e,n,t){var r=e.stateNode;if(!r)throw Error(v(169));t?(e=ss(e,n,hn),r.__reactInternalMemoizedMergedChildContext=e,M(re),M(J),L(J,e)):M(re),L(re,t)}var Me=null,Wr=!1,pl=!1;function as(e){Me===null?Me=[e]:Me.push(e)}function Qc(e){Wr=!0,as(e)}function on(){if(!pl&&Me!==null){pl=!0;var e=0,n=P;try{var t=Me;for(P=1;e>=u,l-=u,De=1<<32-Ee(n)+l|t<N?(H=x,x=null):H=x.sibling;var z=p(c,x,f[N],y);if(z===null){x===null&&(x=H);break}e&&x&&z.alternate===null&&n(c,x),a=i(z,a,N),C===null?E=z:C.sibling=z,C=z,x=H}if(N===f.length)return t(c,x),D&&sn(c,N),E;if(x===null){for(;NN?(H=x,x=null):H=x.sibling;var Ae=p(c,x,z.value,y);if(Ae===null){x===null&&(x=H);break}e&&x&&Ae.alternate===null&&n(c,x),a=i(Ae,a,N),C===null?E=Ae:C.sibling=Ae,C=Ae,x=H}if(z.done)return t(c,x),D&&sn(c,N),E;if(x===null){for(;!z.done;N++,z=f.next())z=h(c,z.value,y),z!==null&&(a=i(z,a,N),C===null?E=z:C.sibling=z,C=z);return D&&sn(c,N),E}for(x=r(c,x);!z.done;N++,z=f.next())z=g(x,c,N,z.value,y),z!==null&&(e&&z.alternate!==null&&x.delete(z.key===null?N:z.key),a=i(z,a,N),C===null?E=z:C.sibling=z,C=z);return e&&x.forEach(function(ha){return n(c,ha)}),D&&sn(c,N),E}function j(c,a,f,y){if(typeof f=="object"&&f!==null&&f.type===Nn&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case Vt:e:{for(var E=f.key,C=a;C!==null;){if(C.key===E){if(E=f.type,E===Nn){if(C.tag===7){t(c,C.sibling),a=l(C,f.props.children),a.return=c,c=a;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===He&&Hu(E)===C.type){t(c,C.sibling),a=l(C,f.props),a.ref=nt(c,C,f),a.return=c,c=a;break e}t(c,C);break}else n(c,C);C=C.sibling}f.type===Nn?(a=mn(f.props.children,c.mode,y,f.key),a.return=c,c=a):(y=pr(f.type,f.key,f.props,null,c.mode,y),y.ref=nt(c,a,f),y.return=c,c=y)}return u(c);case xn:e:{for(C=f.key;a!==null;){if(a.key===C)if(a.tag===4&&a.stateNode.containerInfo===f.containerInfo&&a.stateNode.implementation===f.implementation){t(c,a.sibling),a=l(a,f.children||[]),a.return=c,c=a;break e}else{t(c,a);break}else n(c,a);a=a.sibling}a=kl(f,c.mode,y),a.return=c,c=a}return u(c);case He:return C=f._init,j(c,a,C(f._payload),y)}if(ut(f))return S(c,a,f,y);if(Jn(f))return k(c,a,f,y);er(c,f)}return typeof f=="string"&&f!==""||typeof f=="number"?(f=""+f,a!==null&&a.tag===6?(t(c,a.sibling),a=l(a,f),a.return=c,c=a):(t(c,a),a=Sl(f,c.mode,y),a.return=c,c=a),u(c)):t(c,a)}return j}var $n=ps(!0),ms=ps(!1),zr=un(null),Pr=null,On=null,Oi=null;function Ri(){Oi=On=Pr=null}function Fi(e){var n=zr.current;M(zr),e._currentValue=n}function Jl(e,n,t){for(;e!==null;){var r=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,r!==null&&(r.childLanes|=n)):r!==null&&(r.childLanes&n)!==n&&(r.childLanes|=n),e===t)break;e=e.return}}function An(e,n){Pr=e,Oi=On=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&n&&(te=!0),e.firstContext=null)}function ve(e){var n=e._currentValue;if(Oi!==e)if(e={context:e,memoizedValue:n,next:null},On===null){if(Pr===null)throw Error(v(308));On=e,Pr.dependencies={lanes:0,firstContext:e}}else On=On.next=e;return n}var fn=null;function Ii(e){fn===null?fn=[e]:fn.push(e)}function hs(e,n,t,r){var l=n.interleaved;return l===null?(t.next=t,Ii(n)):(t.next=l.next,l.next=t),n.interleaved=t,je(e,r)}function je(e,n){e.lanes|=n;var t=e.alternate;for(t!==null&&(t.lanes|=n),t=e,e=e.return;e!==null;)e.childLanes|=n,t=e.alternate,t!==null&&(t.childLanes|=n),t=e,e=e.return;return t.tag===3?t.stateNode:null}var We=!1;function ji(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vs(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Re(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function qe(e,n,t){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,_&2){var l=r.pending;return l===null?n.next=n:(n.next=l.next,l.next=n),r.pending=n,je(e,t)}return l=r.interleaved,l===null?(n.next=n,Ii(r)):(n.next=l.next,l.next=n),r.interleaved=n,je(e,t)}function or(e,n,t){if(n=n.updateQueue,n!==null&&(n=n.shared,(t&4194240)!==0)){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,Ei(e,t)}}function Wu(e,n){var t=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,t===r)){var l=null,i=null;if(t=t.firstBaseUpdate,t!==null){do{var u={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};i===null?l=i=u:i=i.next=u,t=t.next}while(t!==null);i===null?l=i=n:i=i.next=n}else l=i=n;t={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=t;return}e=t.lastBaseUpdate,e===null?t.firstBaseUpdate=n:e.next=n,t.lastBaseUpdate=n}function Lr(e,n,t,r){var l=e.updateQueue;We=!1;var i=l.firstBaseUpdate,u=l.lastBaseUpdate,o=l.shared.pending;if(o!==null){l.shared.pending=null;var s=o,d=s.next;s.next=null,u===null?i=d:u.next=d,u=s;var m=e.alternate;m!==null&&(m=m.updateQueue,o=m.lastBaseUpdate,o!==u&&(o===null?m.firstBaseUpdate=d:o.next=d,m.lastBaseUpdate=s))}if(i!==null){var h=l.baseState;u=0,m=d=s=null,o=i;do{var p=o.lane,g=o.eventTime;if((r&p)===p){m!==null&&(m=m.next={eventTime:g,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var S=e,k=o;switch(p=n,g=t,k.tag){case 1:if(S=k.payload,typeof S=="function"){h=S.call(g,h,p);break e}h=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=k.payload,p=typeof S=="function"?S.call(g,h,p):S,p==null)break e;h=F({},h,p);break e;case 2:We=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,p=l.effects,p===null?l.effects=[o]:p.push(o))}else g={eventTime:g,lane:p,tag:o.tag,payload:o.payload,callback:o.callback,next:null},m===null?(d=m=g,s=h):m=m.next=g,u|=p;if(o=o.next,o===null){if(o=l.shared.pending,o===null)break;p=o,o=p.next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}while(!0);if(m===null&&(s=h),l.baseState=s,l.firstBaseUpdate=d,l.lastBaseUpdate=m,n=l.shared.interleaved,n!==null){l=n;do u|=l.lane,l=l.next;while(l!==n)}else i===null&&(l.shared.lanes=0);gn|=u,e.lanes=u,e.memoizedState=h}}function Qu(e,n,t){if(e=n.effects,n.effects=null,e!==null)for(n=0;nt?t:4,e(!0);var r=hl.transition;hl.transition={};try{e(!1),n()}finally{P=t,hl.transition=r}}function Os(){return ye().memoizedState}function Xc(e,n,t){var r=en(e);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},Rs(e))Fs(n,t);else if(t=hs(e,n,t,r),t!==null){var l=b();Ce(t,e,r,l),Is(t,n,r)}}function Gc(e,n,t){var r=en(e),l={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(Rs(e))Fs(n,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=n.lastRenderedReducer,i!==null))try{var u=n.lastRenderedState,o=i(u,t);if(l.hasEagerState=!0,l.eagerState=o,xe(o,u)){var s=n.interleaved;s===null?(l.next=l,Ii(n)):(l.next=s.next,s.next=l),n.interleaved=l;return}}catch{}finally{}t=hs(e,n,l,r),t!==null&&(l=b(),Ce(t,e,r,l),Is(t,n,r))}}function Rs(e){var n=e.alternate;return e===R||n!==null&&n===R}function Fs(e,n){mt=Mr=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function Is(e,n,t){if(t&4194240){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,Ei(e,t)}}var Dr={readContext:ve,useCallback:X,useContext:X,useEffect:X,useImperativeHandle:X,useInsertionEffect:X,useLayoutEffect:X,useMemo:X,useReducer:X,useRef:X,useState:X,useDebugValue:X,useDeferredValue:X,useTransition:X,useMutableSource:X,useSyncExternalStore:X,useId:X,unstable_isNewReconciler:!1},Zc={readContext:ve,useCallback:function(e,n){return _e().memoizedState=[e,n===void 0?null:n],e},useContext:ve,useEffect:Ku,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,ar(4194308,4,Ps.bind(null,n,e),t)},useLayoutEffect:function(e,n){return ar(4194308,4,e,n)},useInsertionEffect:function(e,n){return ar(4,2,e,n)},useMemo:function(e,n){var t=_e();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=_e();return n=t!==void 0?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=Xc.bind(null,R,e),[r.memoizedState,e]},useRef:function(e){var n=_e();return e={current:e},n.memoizedState=e},useState:$u,useDebugValue:$i,useDeferredValue:function(e){return _e().memoizedState=e},useTransition:function(){var e=$u(!1),n=e[0];return e=Yc.bind(null,e[1]),_e().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=R,l=_e();if(D){if(t===void 0)throw Error(v(407));t=t()}else{if(t=n(),Q===null)throw Error(v(349));yn&30||Ss(r,n,t)}l.memoizedState=t;var i={value:t,getSnapshot:n};return l.queue=i,Ku(Es.bind(null,r,i,e),[e]),r.flags|=2048,Ot(9,ks.bind(null,r,i,t,n),void 0,null),t},useId:function(){var e=_e(),n=Q.identifierPrefix;if(D){var t=Oe,r=De;t=(r&~(1<<32-Ee(r)-1)).toString(32)+t,n=":"+n+"R"+t,t=Mt++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(t,{is:r.is}):(e=u.createElement(t),t==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,t),e[ze]=n,e[Pt]=r,Ks(e,n,!1,!1),n.stateNode=e;e:{switch(u=Ol(t,r),t){case"dialog":T("cancel",e),T("close",e),l=r;break;case"iframe":case"object":case"embed":T("load",e),l=r;break;case"video":case"audio":for(l=0;lXn&&(n.flags|=128,r=!0,tt(i,!1),n.lanes=4194304)}else{if(!r)if(e=Tr(u),e!==null){if(n.flags|=128,r=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),tt(i,!0),i.tail===null&&i.tailMode==="hidden"&&!u.alternate&&!D)return G(n),null}else 2*U()-i.renderingStartTime>Xn&&t!==1073741824&&(n.flags|=128,r=!0,tt(i,!1),n.lanes=4194304);i.isBackwards?(u.sibling=n.child,n.child=u):(t=i.last,t!==null?t.sibling=u:n.child=u,i.last=u)}return i.tail!==null?(n=i.tail,i.rendering=n,i.tail=n.sibling,i.renderingStartTime=U(),n.sibling=null,t=O.current,L(O,r?t&1|2:t&1),n):(G(n),null);case 22:case 23:return Ji(),r=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(n.flags|=8192),r&&n.mode&1?ue&1073741824&&(G(n),n.subtreeFlags&6&&(n.flags|=8192)):G(n),null;case 24:return null;case 25:return null}throw Error(v(156,n.tag))}function lf(e,n){switch(Mi(n),n.tag){case 1:return le(n.type)&&Cr(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Kn(),M(re),M(J),Ai(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return Vi(n),null;case 13:if(M(O),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(v(340));Qn()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return M(O),null;case 4:return Kn(),null;case 10:return Fi(n.type._context),null;case 22:case 23:return Ji(),null;case 24:return null;default:return null}}var tr=!1,Z=!1,uf=typeof WeakSet=="function"?WeakSet:Set,w=null;function Rn(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){I(e,n,r)}else t.current=null}function ui(e,n,t){try{t()}catch(r){I(e,n,r)}}var ro=!1;function of(e,n){if(Wl=wr,e=bo(),Li(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{t.nodeType,i.nodeType}catch{t=null;break e}var u=0,o=-1,s=-1,d=0,m=0,h=e,p=null;n:for(;;){for(var g;h!==t||l!==0&&h.nodeType!==3||(o=u+l),h!==i||r!==0&&h.nodeType!==3||(s=u+r),h.nodeType===3&&(u+=h.nodeValue.length),(g=h.firstChild)!==null;)p=h,h=g;for(;;){if(h===e)break n;if(p===t&&++d===l&&(o=u),p===i&&++m===r&&(s=u),(g=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=g}t=o===-1||s===-1?null:{start:o,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(Ql={focusedElem:e,selectionRange:t},wr=!1,w=n;w!==null;)if(n=w,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,w=e;else for(;w!==null;){n=w;try{var S=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var k=S.memoizedProps,j=S.memoizedState,c=n.stateNode,a=c.getSnapshotBeforeUpdate(n.elementType===n.type?k:we(n.type,k),j);c.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var f=n.stateNode.containerInfo;f.nodeType===1?f.textContent="":f.nodeType===9&&f.documentElement&&f.removeChild(f.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(v(163))}}catch(y){I(n,n.return,y)}if(e=n.sibling,e!==null){e.return=n.return,w=e;break}w=n.return}return S=ro,ro=!1,S}function ht(e,n,t){var r=n.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&ui(n,t,i)}l=l.next}while(l!==r)}}function Kr(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function oi(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function Gs(e){var n=e.alternate;n!==null&&(e.alternate=null,Gs(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[ze],delete n[Pt],delete n[Yl],delete n[Hc],delete n[Wc])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Zs(e){return e.tag===5||e.tag===3||e.tag===4}function lo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zs(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function si(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=Er));else if(r!==4&&(e=e.child,e!==null))for(si(e,n,t),e=e.sibling;e!==null;)si(e,n,t),e=e.sibling}function ai(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ai(e,n,t),e=e.sibling;e!==null;)ai(e,n,t),e=e.sibling}var $=null,Se=!1;function Be(e,n,t){for(t=t.child;t!==null;)Js(e,n,t),t=t.sibling}function Js(e,n,t){if(Pe&&typeof Pe.onCommitFiberUnmount=="function")try{Pe.onCommitFiberUnmount(Ur,t)}catch{}switch(t.tag){case 5:Z||Rn(t,n);case 6:var r=$,l=Se;$=null,Be(e,n,t),$=r,Se=l,$!==null&&(Se?(e=$,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):$.removeChild(t.stateNode));break;case 18:$!==null&&(Se?(e=$,t=t.stateNode,e.nodeType===8?dl(e.parentNode,t):e.nodeType===1&&dl(e,t),Ct(e)):dl($,t.stateNode));break;case 4:r=$,l=Se,$=t.stateNode.containerInfo,Se=!0,Be(e,n,t),$=r,Se=l;break;case 0:case 11:case 14:case 15:if(!Z&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,u=i.destroy;i=i.tag,u!==void 0&&(i&2||i&4)&&ui(t,n,u),l=l.next}while(l!==r)}Be(e,n,t);break;case 1:if(!Z&&(Rn(t,n),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(o){I(t,n,o)}Be(e,n,t);break;case 21:Be(e,n,t);break;case 22:t.mode&1?(Z=(r=Z)||t.memoizedState!==null,Be(e,n,t),Z=r):Be(e,n,t);break;default:Be(e,n,t)}}function io(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new uf),n.forEach(function(r){var l=vf.bind(null,e,r);t.has(r)||(t.add(r),r.then(l,l))})}}function ge(e,n){var t=n.deletions;if(t!==null)for(var r=0;rl&&(l=u),r&=~i}if(r=l,r=U()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*af(r/1960))-r,10e?16:e,Ye===null)var r=!1;else{if(e=Ye,Ye=null,Fr=0,_&6)throw Error(v(331));var l=_;for(_|=4,w=e.current;w!==null;){var i=w,u=i.child;if(w.flags&16){var o=i.deletions;if(o!==null){for(var s=0;sU()-Gi?pn(e,0):Xi|=t),ie(e,n)}function ia(e,n){n===0&&(e.mode&1?(n=Wt,Wt<<=1,!(Wt&130023424)&&(Wt=4194304)):n=1);var t=b();e=je(e,n),e!==null&&(Ft(e,n,t),ie(e,t))}function hf(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),ia(e,t)}function vf(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(v(314))}r!==null&&r.delete(n),ia(e,t)}var ua;ua=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||re.current)te=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return te=!1,tf(e,n,t);te=!!(e.flags&131072)}else te=!1,D&&n.flags&1048576&&cs(n,_r,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;cr(e,n),e=n.pendingProps;var l=Wn(n,J.current);An(n,t),l=Hi(null,n,r,e,l,t);var i=Wi();return n.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,le(r)?(i=!0,xr(n)):i=!1,n.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,ji(n),l.updater=$r,n.stateNode=l,l._reactInternals=n,bl(n,r,e,t),n=ti(null,n,r,!0,i,t)):(n.tag=0,D&&i&&Ti(n),q(null,n,l,t),n=n.child),n;case 16:r=n.elementType;e:{switch(cr(e,n),e=n.pendingProps,l=r._init,r=l(r._payload),n.type=r,l=n.tag=gf(r),e=we(r,e),l){case 0:n=ni(null,n,r,e,t);break e;case 1:n=eo(null,n,r,e,t);break e;case 11:n=qu(null,n,r,e,t);break e;case 14:n=bu(null,n,r,we(r.type,e),t);break e}throw Error(v(306,r,""))}return n;case 0:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:we(r,l),ni(e,n,r,l,t);case 1:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:we(r,l),eo(e,n,r,l,t);case 3:e:{if(Ws(n),e===null)throw Error(v(387));r=n.pendingProps,i=n.memoizedState,l=i.element,vs(e,n),Lr(n,r,null,t);var u=n.memoizedState;if(r=u.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},n.updateQueue.baseState=i,n.memoizedState=i,n.flags&256){l=Yn(Error(v(423)),n),n=no(e,n,r,t,l);break e}else if(r!==l){l=Yn(Error(v(424)),n),n=no(e,n,r,t,l);break e}else for(oe=Je(n.stateNode.containerInfo.firstChild),se=n,D=!0,ke=null,t=ms(n,null,r,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Qn(),r===l){n=Ue(e,n,t);break e}q(e,n,r,t)}n=n.child}return n;case 5:return ys(n),e===null&&Zl(n),r=n.type,l=n.pendingProps,i=e!==null?e.memoizedProps:null,u=l.children,$l(r,l)?u=null:i!==null&&$l(r,i)&&(n.flags|=32),Hs(e,n),q(e,n,u,t),n.child;case 6:return e===null&&Zl(n),null;case 13:return Qs(e,n,t);case 4:return Ui(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=$n(n,null,r,t):q(e,n,r,t),n.child;case 11:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:we(r,l),qu(e,n,r,l,t);case 7:return q(e,n,n.pendingProps,t),n.child;case 8:return q(e,n,n.pendingProps.children,t),n.child;case 12:return q(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,l=n.pendingProps,i=n.memoizedProps,u=l.value,L(zr,r._currentValue),r._currentValue=u,i!==null)if(xe(i.value,u)){if(i.children===l.children&&!re.current){n=Ue(e,n,t);break e}}else for(i=n.child,i!==null&&(i.return=n);i!==null;){var o=i.dependencies;if(o!==null){u=i.child;for(var s=o.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=Re(-1,t&-t),s.tag=2;var d=i.updateQueue;if(d!==null){d=d.shared;var m=d.pending;m===null?s.next=s:(s.next=m.next,m.next=s),d.pending=s}}i.lanes|=t,s=i.alternate,s!==null&&(s.lanes|=t),Jl(i.return,t,n),o.lanes|=t;break}s=s.next}}else if(i.tag===10)u=i.type===n.type?null:i.child;else if(i.tag===18){if(u=i.return,u===null)throw Error(v(341));u.lanes|=t,o=u.alternate,o!==null&&(o.lanes|=t),Jl(u,t,n),u=i.sibling}else u=i.child;if(u!==null)u.return=i;else for(u=i;u!==null;){if(u===n){u=null;break}if(i=u.sibling,i!==null){i.return=u.return,u=i;break}u=u.return}i=u}q(e,n,l.children,t),n=n.child}return n;case 9:return l=n.type,r=n.pendingProps.children,An(n,t),l=ve(l),r=r(l),n.flags|=1,q(e,n,r,t),n.child;case 14:return r=n.type,l=we(r,n.pendingProps),l=we(r.type,l),bu(e,n,r,l,t);case 15:return As(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:we(r,l),cr(e,n),n.tag=1,le(r)?(e=!0,xr(n)):e=!1,An(n,t),js(n,r,l),bl(n,r,l,t),ti(null,n,r,!0,e,t);case 19:return $s(e,n,t);case 22:return Bs(e,n,t)}throw Error(v(156,n.tag))};function oa(e,n){return Ro(e,n)}function yf(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function me(e,n,t,r){return new yf(e,n,t,r)}function bi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gf(e){if(typeof e=="function")return bi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===gi)return 11;if(e===wi)return 14}return 2}function nn(e,n){var t=e.alternate;return t===null?(t=me(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function pr(e,n,t,r,l,i){var u=2;if(r=e,typeof e=="function")bi(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case Nn:return mn(t.children,l,i,n);case yi:u=8,l|=8;break;case Cl:return e=me(12,t,n,l|2),e.elementType=Cl,e.lanes=i,e;case xl:return e=me(13,t,n,l),e.elementType=xl,e.lanes=i,e;case Nl:return e=me(19,t,n,l),e.elementType=Nl,e.lanes=i,e;case yo:return Xr(t,l,i,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ho:u=10;break e;case vo:u=9;break e;case gi:u=11;break e;case wi:u=14;break e;case He:u=16,r=null;break e}throw Error(v(130,e==null?e:typeof e,""))}return n=me(u,t,n,l),n.elementType=e,n.type=r,n.lanes=i,n}function mn(e,n,t,r){return e=me(7,e,r,n),e.lanes=t,e}function Xr(e,n,t,r){return e=me(22,e,r,n),e.elementType=yo,e.lanes=t,e.stateNode={isHidden:!1},e}function Sl(e,n,t){return e=me(6,e,null,n),e.lanes=t,e}function kl(e,n,t){return n=me(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function wf(e,n,t,r,l){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ll(0),this.expirationTimes=ll(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ll(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function eu(e,n,t,r,l,i,u,o,s){return e=new wf(e,n,t,o,s),n===1?(n=1,i===!0&&(n|=8)):n=0,i=me(3,null,null,n),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},ji(i),e}function Sf(e,n,t){var r=3{"use strict";function da(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(da)}catch(e){console.error(e)}}da(),pa.exports=fa()});var br=Ea(ma()),{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Pf,createPortal:Lf,createRoot:Tf,findDOMNode:Mf,flushSync:Df,hydrate:Of,hydrateRoot:Rf,render:Ff,unmountComponentAtNode:If,unstable_batchedUpdates:jf,unstable_renderSubtreeIntoContainer:Uf,version:Vf}=br,Af=br.default??br;export{Pf as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Lf as createPortal,Tf as createRoot,Af as default,Mf as findDOMNode,Df as flushSync,Of as hydrate,Rf as hydrateRoot,Ff as render,If as unmountComponentAtNode,jf as unstable_batchedUpdates,Uf as unstable_renderSubtreeIntoContainer,Vf as version}; -/*! Bundled license information: - -react-dom/cjs/react-dom.production.min.js: - (** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) -*/ -//# sourceMappingURL=react-dom.mjs.map \ No newline at end of file diff --git a/client/static/react-esm-18.3.1.static.js b/client/static/react-esm-18.3.1.static.js deleted file mode 100644 index 55d03d7..0000000 --- a/client/static/react-esm-18.3.1.static.js +++ /dev/null @@ -1,3 +0,0 @@ -/* esm.sh - react@18.3.1 */ -export * from "./react@18.3.1/react.mjs"; -export { default } from "./react@18.3.1/react.mjs"; diff --git a/client/static/react@18.3.1/react.mjs b/client/static/react@18.3.1/react.mjs deleted file mode 100644 index e212bd1..0000000 --- a/client/static/react@18.3.1/react.mjs +++ /dev/null @@ -1,16 +0,0 @@ -/* esm.sh - react@18.3.1 */ -var U=Object.create;var k=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var B=(e,t,n,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of A(t))!z.call(e,o)&&o!==n&&k(e,o,{get:()=>t[o],enumerable:!(u=q(t,o))||u.enumerable});return e};var H=(e,t,n)=>(n=e!=null?U(M(e)):{},B(t||!e||!e.__esModule?k(n,"default",{value:e,enumerable:!0}):n,e));var L=w(r=>{"use strict";var y=Symbol.for("react.element"),W=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),K=Symbol.for("react.provider"),Q=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),ee=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),b=Symbol.iterator;function re(e){return e===null||typeof e!="object"?null:(e=b&&e[b]||e["@@iterator"],typeof e=="function"?e:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,I={};function p(e,t,n){this.props=e,this.context=t,this.refs=I,this.updater=n||x}p.prototype.isReactComponent={};p.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};p.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function g(){}g.prototype=p.prototype;function S(e,t,n){this.props=e,this.context=t,this.refs=I,this.updater=n||x}var E=S.prototype=new g;E.constructor=S;O(E,p.prototype);E.isPureReactComponent=!0;var $=Array.isArray,P=Object.prototype.hasOwnProperty,R={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function D(e,t,n){var u,o={},s=null,f=null;if(t!=null)for(u in t.ref!==void 0&&(f=t.ref),t.key!==void 0&&(s=""+t.key),t)P.call(t,u)&&!T.hasOwnProperty(u)&&(o[u]=t[u]);var i=arguments.length-2;if(i===1)o.children=n;else if(1{"use strict";N.exports=L()});var h=H(F()),{Children:le,Component:ae,Fragment:pe,Profiler:ye,PureComponent:de,StrictMode:_e,Suspense:me,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:he,act:ve,cloneElement:Se,createContext:Ee,createElement:Re,createFactory:Ce,createRef:ke,forwardRef:we,isValidElement:be,lazy:$e,memo:je,startTransition:xe,unstable_act:Oe,useCallback:Ie,useContext:ge,useDebugValue:Pe,useDeferredValue:Te,useEffect:De,useId:Ve,useImperativeHandle:Le,useInsertionEffect:Ne,useLayoutEffect:Fe,useMemo:Ue,useReducer:qe,useRef:Ae,useState:Me,useSyncExternalStore:ze,useTransition:Be,version:He}=h,We=h.default??h;export{le as Children,ae as Component,pe as Fragment,ye as Profiler,de as PureComponent,_e as StrictMode,me as Suspense,he as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ve as act,Se as cloneElement,Ee as createContext,Re as createElement,Ce as createFactory,ke as createRef,We as default,we as forwardRef,be as isValidElement,$e as lazy,je as memo,xe as startTransition,Oe as unstable_act,Ie as useCallback,ge as useContext,Pe as useDebugValue,Te as useDeferredValue,De as useEffect,Ve as useId,Le as useImperativeHandle,Ne as useInsertionEffect,Fe as useLayoutEffect,Ue as useMemo,qe as useReducer,Ae as useRef,Me as useState,ze as useSyncExternalStore,Be as useTransition,He as version}; -/*! Bundled license information: - -react/cjs/react.production.min.js: - (** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) -*/ -//# sourceMappingURL=react.mjs.map \ No newline at end of file diff --git a/client/static/scheduler@0.23.2/scheduler.mjs b/client/static/scheduler@0.23.2/scheduler.mjs deleted file mode 100644 index 599708d..0000000 --- a/client/static/scheduler@0.23.2/scheduler.mjs +++ /dev/null @@ -1,17 +0,0 @@ -/* esm.sh - scheduler@0.23.2 */ -var __setImmediate$ = (cb, ...args) => ( { $t: setTimeout(cb, 0, ...args), [Symbol.dispose](){ clearTimeout(this.t) } }); -var V=Object.create;var B=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty;var D=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports);var ee=(e,n,t,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of X(n))!$.call(e,i)&&i!==t&&B(e,i,{get:()=>n[i],enumerable:!(l=U(n,i))||l.enumerable});return e};var ne=(e,n,t)=>(t=e!=null?V(Z(e)):{},ee(n||!e||!e.__esModule?B(t,"default",{value:e,enumerable:!0}):t,e));var K=D(r=>{"use strict";function L(e,n){var t=e.length;e.push(n);e:for(;0>>1,i=e[l];if(0>>1;lg(I,t))bg(m,I)?(e[l]=m,e[b]=t,l=b):(e[l]=I,e[f]=t,l=f);else if(bg(m,t))e[l]=m,e[b]=t,l=b;else break e}}return n}function g(e,n){var t=e.sortIndex-n.sortIndex;return t!==0?t:e.id-n.id}typeof performance=="object"&&typeof performance.now=="function"?(q=performance,r.unstable_now=function(){return q.now()}):(C=Date,O=C.now(),r.unstable_now=function(){return C.now()-O});var q,C,O,s=[],c=[],te=1,a=null,u=3,P=!1,_=!1,v=!1,z=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,W=typeof __setImmediate$<"u"?__setImmediate$:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(e){for(var n=o(c);n!==null;){if(n.callback===null)k(c);else if(n.startTime<=e)k(c),n.sortIndex=n.expirationTime,L(s,n);else break;n=o(c)}}function j(e){if(v=!1,N(e),!_)if(o(s)!==null)_=!0,M(F);else{var n=o(c);n!==null&&R(j,n.startTime-e)}}function F(e,n){_=!1,v&&(v=!1,A(d),d=-1),P=!0;var t=u;try{for(N(n),a=o(s);a!==null&&(!(a.expirationTime>n)||e&&!J());){var l=a.callback;if(typeof l=="function"){a.callback=null,u=a.priorityLevel;var i=l(a.expirationTime<=n);n=r.unstable_now(),typeof i=="function"?a.callback=i:a===o(s)&&k(s),N(n)}else k(s);a=o(s)}if(a!==null)var y=!0;else{var f=o(c);f!==null&&R(j,f.startTime-n),y=!1}return y}finally{a=null,u=t,P=!1}}var w=!1,h=null,d=-1,G=5,H=-1;function J(){return!(r.unstable_now()-He||125l?(e.sortIndex=t,L(c,e),o(s)===null&&e===o(c)&&(v?(A(d),d=-1):v=!0,R(j,t-l))):(e.sortIndex=i,L(s,e),_||P||(_=!0,M(F))),e};r.unstable_shouldYield=J;r.unstable_wrapCallback=function(e){var n=u;return function(){var t=u;u=n;try{return e.apply(this,arguments)}finally{u=t}}}});var S=D((ie,Q)=>{"use strict";Q.exports=K()});var x=ne(S()),{unstable_now:ue,unstable_IdlePriority:ae,unstable_ImmediatePriority:oe,unstable_LowPriority:se,unstable_NormalPriority:ce,unstable_Profiling:fe,unstable_UserBlockingPriority:be,unstable_cancelCallback:_e,unstable_continueExecution:pe,unstable_forceFrameRate:ve,unstable_getCurrentPriorityLevel:de,unstable_getFirstCallbackNode:ye,unstable_next:me,unstable_pauseExecution:ge,unstable_requestPaint:he,unstable_runWithPriority:ke,unstable_scheduleCallback:Pe,unstable_shouldYield:we,unstable_wrapCallback:xe}=x,Ie=x.default??x;export{Ie as default,ae as unstable_IdlePriority,oe as unstable_ImmediatePriority,se as unstable_LowPriority,ce as unstable_NormalPriority,fe as unstable_Profiling,be as unstable_UserBlockingPriority,_e as unstable_cancelCallback,pe as unstable_continueExecution,ve as unstable_forceFrameRate,de as unstable_getCurrentPriorityLevel,ye as unstable_getFirstCallbackNode,me as unstable_next,ue as unstable_now,ge as unstable_pauseExecution,he as unstable_requestPaint,ke as unstable_runWithPriority,Pe as unstable_scheduleCallback,we as unstable_shouldYield,xe as unstable_wrapCallback}; -/*! Bundled license information: - -scheduler/cjs/scheduler.production.min.js: - (** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) -*/ -//# sourceMappingURL=scheduler.mjs.map \ No newline at end of file diff --git a/client/static/splitjs-1.6.5.min.js b/client/static/splitjs-1.6.5.min.js deleted file mode 100644 index e9785a6..0000000 --- a/client/static/splitjs-1.6.5.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! Split.js - v1.6.5 */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Split=t()}(this,(function(){"use strict";var e="undefined"!=typeof window?window:null,t=null===e,n=t?void 0:e.document,i=function(){return!1},r=t?"calc":["","-webkit-","-moz-","-o-"].filter((function(e){var t=n.createElement("div");return t.style.cssText="width:"+e+"calc(9px)",!!t.style.length})).shift()+"calc",s=function(e){return"string"==typeof e||e instanceof String},o=function(e){if(s(e)){var t=n.querySelector(e);if(!t)throw new Error("Selector "+e+" did not match a DOM element");return t}return e},a=function(e,t,n){var i=e[t];return void 0!==i?i:n},u=function(e,t,n,i){if(t){if("end"===i)return 0;if("center"===i)return e/2}else if(n){if("start"===i)return 0;if("center"===i)return e/2}return e},l=function(e,t){var i=n.createElement("div");return i.className="gutter gutter-"+t,i},c=function(e,t,n){var i={};return s(t)?i[e]=t:i[e]=r+"("+t+"% - "+n+"px)",i},h=function(e,t){var n;return(n={})[e]=t+"px",n};return function(r,s){if(void 0===s&&(s={}),t)return{};var f,d,v,m,g,p,y=r;Array.from&&(y=Array.from(y));var z=o(y[0]).parentNode,S=getComputedStyle?getComputedStyle(z):null,b=S?S.flexDirection:null,E=a(s,"sizes")||y.map((function(){return 100/y.length})),_=a(s,"minSize",100),L=Array.isArray(_)?_:y.map((function(){return _})),w=a(s,"maxSize",1/0),x=Array.isArray(w)?w:y.map((function(){return w})),O=a(s,"expandToMin",!1),A=a(s,"gutterSize",10),k=a(s,"gutterAlign","center"),C=a(s,"snapOffset",30),M=Array.isArray(C)?C:y.map((function(){return C})),U=a(s,"dragInterval",1),D=a(s,"direction","horizontal"),B=a(s,"cursor","horizontal"===D?"col-resize":"row-resize"),T=a(s,"gutter",l),j=a(s,"elementStyle",c),F=a(s,"gutterStyle",h);function R(e,t,n,i){var r=j(f,t,n,i);Object.keys(r).forEach((function(t){e.style[t]=r[t]}))}function N(){return p.map((function(e){return e.size}))}function q(e){return"touches"in e?e.touches[0][d]:e[d]}function H(e){var t=p[this.a],n=p[this.b],i=t.size+n.size;t.size=e/this.size*i,n.size=i-e/this.size*i,R(t.element,t.size,this._b,t.i),R(n.element,n.size,this._c,n.i)}function I(e){var t,n=p[this.a],r=p[this.b];this.dragging&&(t=q(e)-this.start+(this._b-this.dragOffset),U>1&&(t=Math.round(t/U)*U),t<=n.minSize+n.snapOffset+this._b?t=n.minSize+this._b:t>=this.size-(r.minSize+r.snapOffset+this._c)&&(t=this.size-(r.minSize+this._c)),t>=n.maxSize-n.snapOffset+this._b?t=n.maxSize+this._b:t<=this.size-(r.maxSize-r.snapOffset+this._c)&&(t=this.size-(r.maxSize+this._c)),H.call(this,t),a(s,"onDrag",i)(N()))}function W(){var e=p[this.a].element,t=p[this.b].element,n=e.getBoundingClientRect(),i=t.getBoundingClientRect();this.size=n[f]+i[f]+this._b+this._c,this.start=n[v],this.end=n[m]}function X(e){var t=function(e){if(!getComputedStyle)return null;var t=getComputedStyle(e);if(!t)return null;var n=e[g];return 0===n?null:n-="horizontal"===D?parseFloat(t.paddingLeft)+parseFloat(t.paddingRight):parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)}(z);if(null===t)return e;if(L.reduce((function(e,t){return e+t}),0)>t)return e;var n=0,i=[],r=e.map((function(r,s){var o=t*r/100,a=u(A,0===s,s===e.length-1,k),l=L[s]+a;return o0&&i[r]-n>0){var o=Math.min(n,i[r]-n);n-=o,s=e-o}return s/t*100}))}function Y(){var t=p[this.a].element,r=p[this.b].element;this.dragging&&a(s,"onDragEnd",i)(N()),this.dragging=!1,e.removeEventListener("mouseup",this.stop),e.removeEventListener("touchend",this.stop),e.removeEventListener("touchcancel",this.stop),e.removeEventListener("mousemove",this.move),e.removeEventListener("touchmove",this.move),this.stop=null,this.move=null,t.removeEventListener("selectstart",i),t.removeEventListener("dragstart",i),r.removeEventListener("selectstart",i),r.removeEventListener("dragstart",i),t.style.userSelect="",t.style.webkitUserSelect="",t.style.MozUserSelect="",t.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",this.gutter.style.cursor="",this.parent.style.cursor="",n.body.style.cursor=""}function G(t){if(!("button"in t)||0===t.button){var r=p[this.a].element,o=p[this.b].element;this.dragging||a(s,"onDragStart",i)(N()),t.preventDefault(),this.dragging=!0,this.move=I.bind(this),this.stop=Y.bind(this),e.addEventListener("mouseup",this.stop),e.addEventListener("touchend",this.stop),e.addEventListener("touchcancel",this.stop),e.addEventListener("mousemove",this.move),e.addEventListener("touchmove",this.move),r.addEventListener("selectstart",i),r.addEventListener("dragstart",i),o.addEventListener("selectstart",i),o.addEventListener("dragstart",i),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",this.gutter.style.cursor=B,this.parent.style.cursor=B,n.body.style.cursor=B,W.call(this),this.dragOffset=q(t)-this.end}}"horizontal"===D?(f="width",d="clientX",v="left",m="right",g="clientWidth"):"vertical"===D&&(f="height",d="clientY",v="top",m="bottom",g="clientHeight"),E=X(E);var J=[];function K(e){var t=e.i===J.length,n=t?J[e.i-1]:J[e.i];W.call(n);var i=t?n.size-e.minSize-n._c:e.minSize+n._b;H.call(n,i)}return(p=y.map((function(e,t){var n,i={element:o(e),size:E[t],minSize:L[t],maxSize:x[t],snapOffset:M[t],i:t};if(t>0&&((n={a:t-1,b:t,dragging:!1,direction:D,parent:z})._b=u(A,t-1==0,!1,k),n._c=u(A,!1,t===y.length-1,k),"row-reverse"===b||"column-reverse"===b)){var r=n.a;n.a=n.b,n.b=r}if(t>0){var s=T(t,D,i.element);!function(e,t,n){var i=F(f,t,n);Object.keys(i).forEach((function(t){e.style[t]=i[t]}))}(s,A,t),n._a=G.bind(n),s.addEventListener("mousedown",n._a),s.addEventListener("touchstart",n._a),z.insertBefore(s,i.element),n.gutter=s}return R(i.element,i.size,u(A,0===t,t===y.length-1,k),t),t>0&&J.push(n),i}))).forEach((function(e){var t=e.element.getBoundingClientRect()[f];t0){var i=J[n-1],r=p[i.a],s=p[i.b];r.size=t[n-1],s.size=e,R(r.element,r.size,i._b,r.i),R(s.element,s.size,i._c,s.i)}}))},getSizes:N,collapse:function(e){K(p[e])},destroy:function(e,t){J.forEach((function(n){if(!0!==t?n.parent.removeChild(n.gutter):(n.gutter.removeEventListener("mousedown",n._a),n.gutter.removeEventListener("touchstart",n._a)),!0!==e){var i=j(f,n.a.size,n._b);Object.keys(i).forEach((function(e){p[n.a].element.style[e]="",p[n.b].element.style[e]=""}))}}))},parent:z,pairs:J}}})); -//# sourceMappingURL=split.min.js.map diff --git a/client/style.css b/client/style.css new file mode 100644 index 0000000..0162e80 --- /dev/null +++ b/client/style.css @@ -0,0 +1,69 @@ +/* 滑条*/ +.no-scroll-bar::-webkit-scrollbar { + width: 0px !important; +} + +/* https://blog.csdn.net/qq_39347364/article/details/111996581*/ +*::-webkit-scrollbar { + width: 7px; + height: 10px; +} + +*::-webkit-scrollbar-track { + width: 6px; + background: rgba(#101f1c, 0.1); + -webkit-border-radius: 2em; + -moz-border-radius: 2em; + border-radius: 2em; +} + +*::-webkit-scrollbar-thumb { + background-color: rgba(144, 147, 153, 0.5); + background-clip: padding-box; + min-height: 28px; + -webkit-border-radius: 2em; + -moz-border-radius: 2em; + border-radius: 2em; + transition: background-color 0.3s; + cursor: pointer; +} + +*::-webkit-scrollbar-thumb:hover { + background-color: rgba(144, 147, 153, 0.3); +} + +/* 使用系统字体 在部分系统表现很好*/ +/* 我们至今仍未能知道桌面端浏览器字体的秘密*/ +*:not(.material-icons, .mdui-icon, mdui-icon, .fa, .google-symbols) { + font-family: -apple-system, system-ui, -webkit-system-font !important; +} + +body { + display: flex; + margin: 0 0 0 0; + height: 100%; +} + +html { + margin: 0 0 0 0; + height: 100%; +} + +/* 防止小尺寸图片模糊*/ +* { + image-rendering: -moz-crisp-edges; + image-rendering: -o-crisp-edges; + image-rendering: -webkit-optimize-contrast; + image-rendering: crisp-edges; + -ms-interpolation-mode: nearest-neighbor; +} + +.gutter { + background-color: rgb(var(--mdui-color-surface-variant)); + background-repeat: no-repeat; + background-position: 50%; +} + +.gutter.gutter-horizontal { + cursor: col-resize; +} diff --git a/client/typedef/csstype@3.1.3.d.ts b/client/typedef/csstype@3.1.3.d.ts deleted file mode 100644 index b466d21..0000000 --- a/client/typedef/csstype@3.1.3.d.ts +++ /dev/null @@ -1,21297 +0,0 @@ -export {}; - -export type PropertyValue = TValue extends Array - ? Array - : TValue extends infer TUnpacked & {} - ? TUnpacked - : TValue; - -export type Fallback = { [P in keyof T]: T[P] | readonly NonNullable[] }; - -export interface StandardLonghandProperties { - /** - * The **`accent-color`** CSS property sets the accent color for user-interface controls generated by some elements. - * - * **Syntax**: `auto | ` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **93** | **92** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/accent-color - */ - accentColor?: Property.AccentColor | undefined; - /** - * The CSS **`align-content`** property sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. - * - * **Syntax**: `normal | | | ? ` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **28** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-content - */ - alignContent?: Property.AlignContent | undefined; - /** - * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area. - * - * **Syntax**: `normal | stretch | | [ ? ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-items - */ - alignItems?: Property.AlignItems | undefined; - /** - * The **`align-self`** CSS property overrides a grid or flex item's `align-items` value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis. - * - * **Syntax**: `auto | normal | stretch | | ? ` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **10** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-self - */ - alignSelf?: Property.AlignSelf | undefined; - /** - * The **`align-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their block axis. - * - * **Syntax**: `[ normal | | | ? ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-tracks - */ - alignTracks?: Property.AlignTracks | undefined; - /** - * The **`animation-composition`** CSS property specifies the composite operation to use when multiple animations affect the same property simultaneously. - * - * **Syntax**: `#` - * - * **Initial value**: `replace` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :----: | :--: | :-: | - * | **112** | **115** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-composition - */ - animationComposition?: Property.AnimationComposition | undefined; - /** - * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `