@thebase/ui 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +49 -8
- package/bin/create-baseui-app.mjs +268 -0
- package/dist/baseui.esm.js +1 -1
- package/dist/baseui.min.js +1 -1
- package/dist/baseui.registry.json +2 -2
- package/dist/runtime/block-N5MIBOMO.js +1 -0
- package/dist/runtime/chunk-23NN352E.js +1 -0
- package/dist/runtime/chunk-6X7NT7KH.js +2 -0
- package/dist/runtime/chunk-7R5G6FRT.js +1 -0
- package/dist/runtime/chunk-7R75J74M.js +1 -0
- package/dist/runtime/chunk-EAFZBBCI.js +10 -0
- package/dist/runtime/chunk-GF2LJCG5.js +1 -0
- package/dist/runtime/chunk-HKUJH2VC.js +1 -0
- package/dist/runtime/chunk-KX3KYRT7.js +1 -0
- package/dist/runtime/chunk-MAWHENWJ.js +1 -0
- package/dist/runtime/chunk-OESZ7FEN.js +1 -0
- package/dist/runtime/chunk-P3WV3MLS.js +35 -0
- package/dist/runtime/chunk-SGGMD6DA.js +5 -0
- package/dist/runtime/chunk-URTGZHMG.js +3 -0
- package/dist/runtime/chunk-XLIC2WFB.js +1 -0
- package/dist/runtime/clipboard-6EHVQ6GB.js +4 -0
- package/dist/runtime/commonmark-FAT3C7WA.js +1 -0
- package/dist/runtime/core-IEFFKRMW.js +1 -0
- package/dist/runtime/cursor-3BFXMKNC.js +1 -0
- package/dist/runtime/diff-ALMDXB3Z.js +1 -0
- package/dist/runtime/gfm-JUXF3E6O.js +5 -0
- package/dist/runtime/history-OU6CQBOY.js +1 -0
- package/dist/runtime/indent-RP5Y5HNK.js +1 -0
- package/dist/runtime/lib-TTIE4EGJ.js +1 -0
- package/dist/runtime/listener-JBODN3BE.js +1 -0
- package/dist/runtime/marked.min.js +69 -0
- package/dist/runtime/mermaid.esm.min.mjs +3593 -0
- package/dist/runtime/milkdown-editor.js +1 -0
- package/dist/runtime/prosemirror-text-editor.js +1 -0
- package/dist/runtime/slash-I56NP4SS.js +1 -0
- package/dist/runtime/streaming-WPAF6YN6.js +3 -0
- package/dist/runtime/tooltip-XDWVKIO5.js +1 -0
- package/dist/runtime/upload-MYBCHYBD.js +1 -0
- package/dist/runtime/y-webrtc-WDTQEBWZ.js +1 -0
- package/dist/runtime/yjs-SRZJJJEG.js +1 -0
- package/docs/blocks.md +4 -2
- package/docs/icons.md +4 -2
- package/docs/installation.md +36 -28
- package/docs/owl-components.md +7 -5
- package/docs/theming.md +2 -2
- package/docs/usage-guide.md +64 -60
- package/package.json +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [v0.0.5] - 2026-09-02
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- `package.json` `files` was missing `dist/runtime`, so the vendored runtime chunks (marked, mermaid, milkdown-editor, prosemirror-text-editor, and their split chunk files) never shipped to npm/CDN. Dynamic imports of `dist/runtime/prosemirror-text-editor.js` (and the other lazy runtime assets) 404'd for CDN consumers. Added `dist/runtime` to `files`.
|
|
9
|
+
|
|
5
10
|
## [v0.0.4] - 2026-09-01
|
|
6
11
|
|
|
7
12
|
Initial documented release. BaseUI is a self-contained component library (Owl v2 + Bootstrap 5 + GrapesJS page-builder tooling) with a shadcn-aligned component set, a live docs/examples app, and vendored runtime assets.
|
package/README.md
CHANGED
|
@@ -1,15 +1,56 @@
|
|
|
1
1
|
# The Base UI
|
|
2
2
|
|
|
3
|
-
The Base UI is a CDN-installable UI kit built with Bootstrap 5 styling and Owl-enhanced behavior.
|
|
3
|
+
The Base UI is a CDN-installable UI kit built with Bootstrap 5 styling and Owl-enhanced behavior. The primary way to consume it is as **pure Owl components** (`<Button/>`-style imports into your own Owl app); the static `b-ui` markup adapter is the alternative for plain static HTML, server-rendered pages, and Base HUB website pages that have no Owl app of their own.
|
|
4
|
+
|
|
5
|
+
Its strong points: **no build step** — every component runs straight from a CDN `<script>`/import map, nothing to compile; **modular component design** — each component is a self-contained unit you import or mark up individually, not a monolith; **vanilla JavaScript/TypeScript** — no framework lock-in, no JSX, no compiler-specific syntax to learn; and this combination makes it well suited to building **WYSIWYG website builders**, where components must mount, unmount, and re-render dynamically from user-driven markup or drag-and-drop edits rather than a fixed build-time component tree.
|
|
6
|
+
|
|
7
|
+
Both APIs load straight from a CDN — jsDelivr or unpkg — no build step, no self-hosting required. The snippets below use the `@latest` tag for readability; pin an exact version instead (e.g. `@0.0.4`) for any production page, since `@latest` can change what your page loads the moment a new version ships. Pure Owl usage:
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/baseui.min.css">
|
|
11
|
+
<script type="importmap">
|
|
12
|
+
{
|
|
13
|
+
"imports": {
|
|
14
|
+
"@base/owl": "https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/baseui.esm.js",
|
|
15
|
+
"@base/component": "https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/baseui.esm.js",
|
|
16
|
+
"@base/theme": "https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/baseui.esm.js",
|
|
17
|
+
"@base/templates": "https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/baseui.templates.xml"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
21
|
+
<script type="module">
|
|
22
|
+
import { Component, mount, xml } from "@base/owl";
|
|
23
|
+
import { Button, Card, CardBody, CardHeader, CardTitle } from "@base/component";
|
|
24
|
+
|
|
25
|
+
const templates = await fetch(import.meta.resolve("@base/templates")).then((r) => r.text());
|
|
26
|
+
|
|
27
|
+
class Root extends Component {
|
|
28
|
+
static components = { Button, Card, CardBody, CardHeader, CardTitle };
|
|
29
|
+
static template = xml`
|
|
30
|
+
<Card>
|
|
31
|
+
<CardHeader><CardTitle>Hello</CardTitle></CardHeader>
|
|
32
|
+
<CardBody>
|
|
33
|
+
<Button variant="'default'" label="'Save'" onClick="() => console.log('saved')"/>
|
|
34
|
+
</CardBody>
|
|
35
|
+
</Card>`;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
await mount(Root, document.getElementById("app"), { templates });
|
|
39
|
+
</script>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
[unpkg](https://unpkg.com/@thebase/ui@latest/) mirrors the same files as an alternative CDN — swap any `cdn.jsdelivr.net/npm` URL above for `unpkg.com` (e.g. `https://unpkg.com/@thebase/ui@latest/dist/baseui.esm.js`) if jsDelivr is unreachable in your environment. See [Pure Owl Components](docs/owl-components.md) for the full API, npm/bundler usage, and mixing with the static adapter.
|
|
43
|
+
|
|
44
|
+
If you have no Owl app, use the static `b-ui` markup adapter instead — one stylesheet and one script tag, no import map:
|
|
4
45
|
|
|
5
46
|
```html
|
|
6
|
-
<link rel="stylesheet" href="/dist/baseui.min.css">
|
|
7
|
-
<script src="/dist/baseui.min.js" defer></script>
|
|
47
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/baseui.min.css">
|
|
48
|
+
<script src="https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/baseui.min.js" defer></script>
|
|
8
49
|
```
|
|
9
50
|
|
|
10
|
-
`dist/baseui.min.js` is fully self-contained: Bootstrap's JS bundle, the Owl runtime, every pure Owl component class, and the theme helper are all embedded ahead of/alongside BaseUI's own code inside this one file, in load order (Bootstrap, then Owl, then BaseUI), so nothing else needs to load first. `dist/baseui.esm.js` is the same thing for native `import`/module usage. There is no more separate `baseui.owl.*`/`baseui.components.esm.js`/`baseui.theme.esm.js` — this one file is the whole public API. (`dist/bootstrap.bundle.min.js` still ships standalone, unmodified, in case a project wants vendored Bootstrap JS on its own — BaseUI itself never needs it loaded separately.)
|
|
51
|
+
`dist/baseui.min.js` is fully self-contained: Bootstrap's JS bundle, the Owl runtime, every pure Owl component class, and the theme helper are all embedded ahead of/alongside BaseUI's own code inside this one file, in load order (Bootstrap, then Owl, then BaseUI), so nothing else needs to load first. `dist/baseui.esm.js` is the same thing for native `import`/module usage — it backs both the pure Owl and static APIs above. There is no more separate `baseui.owl.*`/`baseui.components.esm.js`/`baseui.theme.esm.js` — this one file is the whole public API. (`dist/bootstrap.bundle.min.js` still ships standalone, unmodified, in case a project wants vendored Bootstrap JS on its own — BaseUI itself never needs it loaded separately.)
|
|
11
52
|
|
|
12
|
-
BaseUI
|
|
53
|
+
BaseUI exposes every component (73 in the current registry) as a real Owl component class — see [Pure Owl Components](docs/owl-components.md) for the complete API, npm/bundler usage, and mixing with the static adapter.
|
|
13
54
|
|
|
14
55
|
For app-level theme controls, import `createThemeController`/`BaseUITheme` as `@base/theme` in browser import maps (pointing at the same `dist/baseui.esm.js`) or straight from `@thebase/ui` in npm/bundler apps, to create persisted light/dark toggles like the documentation pages use.
|
|
15
56
|
|
|
@@ -39,9 +80,9 @@ Use these documents as the canonical project map:
|
|
|
39
80
|
The links above work as-is when browsing this repo. `docs/*.md` and `docs/components/` also ship inside the published npm package (see `files` in `package.json`), so the same docs are reachable straight from a CDN without cloning the repo — no HTML rendering, just the raw Markdown source:
|
|
40
81
|
|
|
41
82
|
```text
|
|
42
|
-
https://unpkg.com/@thebase/ui@
|
|
43
|
-
https://unpkg.com/@thebase/ui@
|
|
44
|
-
https://cdn.jsdelivr.net/npm/@thebase/ui@
|
|
83
|
+
https://unpkg.com/@thebase/ui@latest/docs/usage-guide.md
|
|
84
|
+
https://unpkg.com/@thebase/ui@latest/docs/components/button.md
|
|
85
|
+
https://cdn.jsdelivr.net/npm/@thebase/ui@latest/docs/usage-guide.md
|
|
45
86
|
```
|
|
46
87
|
|
|
47
88
|
Drop the version (`@thebase/ui/docs/...`) to always resolve to latest, or pin a version the way the rest of this README recommends pinning `dist/` assets. `docs/v2/` (the vendored general Owl framework reference) and `docs/component-authoring.md` (BaseUI's own component-authoring contract) are intentionally **not** published — they're development-time references for working inside this repo, not something a consumer needs to use the library.
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
|
|
6
|
+
const ownPackageJson = JSON.parse(
|
|
7
|
+
readFileSync(new URL("../package.json", import.meta.url), "utf8"),
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
/** Turns any folder/app name into a valid npm package name (lowercase, dash-separated). */
|
|
11
|
+
function toPackageName(name) {
|
|
12
|
+
return name
|
|
13
|
+
.trim()
|
|
14
|
+
.toLowerCase()
|
|
15
|
+
.replace(/[^a-z0-9-]+/g, "-")
|
|
16
|
+
.replace(/^-+|-+$/g, "") || "baseui-app";
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Builds the fixed set of Vite + BaseUI scaffold files for a project named `appName`. */
|
|
20
|
+
function buildTemplateFiles(appName, baseuiVersion) {
|
|
21
|
+
const title = appName
|
|
22
|
+
.split(/[-_]/)
|
|
23
|
+
.filter(Boolean)
|
|
24
|
+
.map((word) => word[0].toUpperCase() + word.slice(1))
|
|
25
|
+
.join(" ");
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
"package.json": JSON.stringify(
|
|
29
|
+
{
|
|
30
|
+
name: appName,
|
|
31
|
+
private: true,
|
|
32
|
+
version: "0.0.1",
|
|
33
|
+
type: "module",
|
|
34
|
+
scripts: {
|
|
35
|
+
dev: "vite",
|
|
36
|
+
build: "vite build",
|
|
37
|
+
preview: "vite preview",
|
|
38
|
+
},
|
|
39
|
+
dependencies: {
|
|
40
|
+
"@thebase/ui": `^${baseuiVersion}`,
|
|
41
|
+
},
|
|
42
|
+
devDependencies: {
|
|
43
|
+
vite: "^8.2.1",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
null,
|
|
47
|
+
2,
|
|
48
|
+
) + "\n",
|
|
49
|
+
|
|
50
|
+
"vite.config.js": `import { defineConfig } from "vite";
|
|
51
|
+
|
|
52
|
+
export default defineConfig({
|
|
53
|
+
server: { open: true },
|
|
54
|
+
});
|
|
55
|
+
`,
|
|
56
|
+
|
|
57
|
+
".gitignore": `node_modules/\ndist/\n`,
|
|
58
|
+
|
|
59
|
+
"index.html": `<!doctype html>
|
|
60
|
+
<html lang="en" b-theme="light">
|
|
61
|
+
<head>
|
|
62
|
+
<meta charset="utf-8" />
|
|
63
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
64
|
+
<title>${title}</title>
|
|
65
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
66
|
+
</head>
|
|
67
|
+
<body class="bg-body text-body">
|
|
68
|
+
<div id="app"></div>
|
|
69
|
+
<script type="module" src="/src/main.js"></script>
|
|
70
|
+
</body>
|
|
71
|
+
</html>
|
|
72
|
+
`,
|
|
73
|
+
|
|
74
|
+
"public/favicon.svg": `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
|
75
|
+
fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
76
|
+
<rect width="24" height="24" rx="5" fill="#0f172a" stroke="none" />
|
|
77
|
+
<path d="M8 12h8" />
|
|
78
|
+
<path d="M12 8v8" />
|
|
79
|
+
</svg>
|
|
80
|
+
`,
|
|
81
|
+
|
|
82
|
+
"src/style.css": `/* App-specific styles layered on top of @thebase/ui/baseui.css go here. */\n`,
|
|
83
|
+
|
|
84
|
+
"src/main.js": `import "@thebase/ui/baseui.css";
|
|
85
|
+
import { mount } from "@thebase/ui";
|
|
86
|
+
import baseuiTemplates from "@thebase/ui/dist/baseui.templates.xml?raw";
|
|
87
|
+
import appTemplates from "./App.xml?raw";
|
|
88
|
+
import { App } from "./App.js";
|
|
89
|
+
import "./style.css";
|
|
90
|
+
|
|
91
|
+
/** Both files are full <templates>...</templates> documents; strip each one's outer wrapper
|
|
92
|
+
* before joining them, otherwise the merged string has two root elements and Owl's XML
|
|
93
|
+
* parser throws. */
|
|
94
|
+
const stripTemplatesWrapper = (xml) =>
|
|
95
|
+
xml.replace(/^\\s*<templates[^>]*>/, "").replace(/<\\/templates>\\s*$/, "");
|
|
96
|
+
|
|
97
|
+
const templates = \`<templates>\${stripTemplatesWrapper(baseuiTemplates)}\${stripTemplatesWrapper(appTemplates)}</templates>\`;
|
|
98
|
+
|
|
99
|
+
await mount(App, document.getElementById("app"), { templates });
|
|
100
|
+
`,
|
|
101
|
+
|
|
102
|
+
"src/App.js": `import { Component, useState } from "@thebase/ui";
|
|
103
|
+
import { Button, Card, CardBody, CardHeader, CardTitle } from "@thebase/ui";
|
|
104
|
+
|
|
105
|
+
/** Root screen of the app: owns top-level state and composes BaseUI components. */
|
|
106
|
+
export class App extends Component {
|
|
107
|
+
static template = "app.Root";
|
|
108
|
+
static components = { Button, Card, CardBody, CardHeader, CardTitle };
|
|
109
|
+
|
|
110
|
+
setup() {
|
|
111
|
+
this.state = useState({ count: 0 });
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
`,
|
|
115
|
+
|
|
116
|
+
"src/App.xml": `<templates xml:space="preserve">
|
|
117
|
+
<t t-name="app.Root">
|
|
118
|
+
<div class="container py-4">
|
|
119
|
+
<Card>
|
|
120
|
+
<CardHeader><CardTitle>${title}</CardTitle></CardHeader>
|
|
121
|
+
<CardBody>
|
|
122
|
+
<p>Edit <code>src/App.js</code> and <code>src/App.xml</code> to get started.</p>
|
|
123
|
+
<Button variant="'default'" label="'Count: ' + state.count" onClick="() => state.count++"/>
|
|
124
|
+
</CardBody>
|
|
125
|
+
</Card>
|
|
126
|
+
</div>
|
|
127
|
+
</t>
|
|
128
|
+
</templates>
|
|
129
|
+
`,
|
|
130
|
+
|
|
131
|
+
"README.md": `# ${title}
|
|
132
|
+
|
|
133
|
+
Scaffolded with \`@thebase/ui\`'s CLI (Vite + BaseUI, pure Owl API).
|
|
134
|
+
|
|
135
|
+
\`\`\`sh
|
|
136
|
+
npm install
|
|
137
|
+
npm run dev
|
|
138
|
+
\`\`\`
|
|
139
|
+
`,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** Writes each template file under targetDir, skipping any that already exist (convert mode is additive/non-destructive). */
|
|
144
|
+
function writeFiles(targetDir, files, { overwrite }) {
|
|
145
|
+
const written = [];
|
|
146
|
+
const skipped = [];
|
|
147
|
+
for (const [relPath, content] of Object.entries(files)) {
|
|
148
|
+
const fullPath = path.join(targetDir, relPath);
|
|
149
|
+
if (existsSync(fullPath) && !overwrite) {
|
|
150
|
+
skipped.push(relPath);
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
mkdirSync(path.dirname(fullPath), { recursive: true });
|
|
154
|
+
writeFileSync(fullPath, content);
|
|
155
|
+
written.push(relPath);
|
|
156
|
+
}
|
|
157
|
+
return { written, skipped };
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function runInstall(targetDir) {
|
|
161
|
+
console.log("\nInstalling dependencies (npm install)...");
|
|
162
|
+
const result = spawnSync("npm", ["install"], { cwd: targetDir, stdio: "inherit" });
|
|
163
|
+
if (result.status !== 0) {
|
|
164
|
+
console.warn("\nnpm install did not finish cleanly — run it manually in the project folder.");
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function parseFlags(argv) {
|
|
169
|
+
const flags = { install: true };
|
|
170
|
+
const positional = [];
|
|
171
|
+
for (let i = 0; i < argv.length; i++) {
|
|
172
|
+
const arg = argv[i];
|
|
173
|
+
if (arg === "--no-install") flags.install = false;
|
|
174
|
+
else if (arg === "--force") flags.force = true;
|
|
175
|
+
else if (arg === "--version") flags.version = argv[++i];
|
|
176
|
+
else positional.push(arg);
|
|
177
|
+
}
|
|
178
|
+
return { flags, positional };
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function cmdCreate(argv) {
|
|
182
|
+
const { flags, positional } = parseFlags(argv);
|
|
183
|
+
const rawName = positional[0];
|
|
184
|
+
if (!rawName) {
|
|
185
|
+
console.error("Usage: create-baseui-app create <app-name> [--version <x.y.z>] [--no-install] [--force]");
|
|
186
|
+
process.exit(1);
|
|
187
|
+
}
|
|
188
|
+
const appName = toPackageName(rawName);
|
|
189
|
+
const targetDir = path.resolve(process.cwd(), rawName);
|
|
190
|
+
|
|
191
|
+
if (existsSync(targetDir) && readdirSync(targetDir).length > 0 && !flags.force) {
|
|
192
|
+
console.error(`Directory "${rawName}" already exists and is not empty. Use --force to write into it anyway.`);
|
|
193
|
+
process.exit(1);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const baseuiVersion = flags.version || ownPackageJson.version;
|
|
197
|
+
const files = buildTemplateFiles(appName, baseuiVersion);
|
|
198
|
+
const { written } = writeFiles(targetDir, files, { overwrite: flags.force ?? false });
|
|
199
|
+
|
|
200
|
+
console.log(`Scaffolded a Vite + BaseUI app in ${targetDir}`);
|
|
201
|
+
written.forEach((f) => console.log(` create ${f}`));
|
|
202
|
+
|
|
203
|
+
if (flags.install) runInstall(targetDir);
|
|
204
|
+
|
|
205
|
+
console.log(`\nNext steps:\n cd ${rawName}${flags.install ? "" : "\n npm install"}\n npm run dev`);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
function cmdConvert(argv) {
|
|
209
|
+
const { flags, positional } = parseFlags(argv);
|
|
210
|
+
const targetDir = path.resolve(process.cwd(), positional[0] || ".");
|
|
211
|
+
|
|
212
|
+
if (!existsSync(targetDir)) {
|
|
213
|
+
console.error(`Directory "${targetDir}" does not exist.`);
|
|
214
|
+
process.exit(1);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const existingPackageJsonPath = path.join(targetDir, "package.json");
|
|
218
|
+
const appName = toPackageName(path.basename(targetDir));
|
|
219
|
+
const baseuiVersion = flags.version || ownPackageJson.version;
|
|
220
|
+
const files = buildTemplateFiles(appName, baseuiVersion);
|
|
221
|
+
|
|
222
|
+
if (existsSync(existingPackageJsonPath)) {
|
|
223
|
+
const existing = JSON.parse(readFileSync(existingPackageJsonPath, "utf8"));
|
|
224
|
+
existing.type ??= "module";
|
|
225
|
+
existing.scripts = { dev: "vite", build: "vite build", preview: "vite preview", ...existing.scripts };
|
|
226
|
+
existing.dependencies = { ...existing.dependencies, "@thebase/ui": `^${baseuiVersion}` };
|
|
227
|
+
existing.devDependencies = { ...existing.devDependencies, vite: existing.devDependencies?.vite || "^8.2.1" };
|
|
228
|
+
delete files["package.json"];
|
|
229
|
+
writeFileSync(existingPackageJsonPath, JSON.stringify(existing, null, 2) + "\n");
|
|
230
|
+
console.log(` merge package.json`);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const { written, skipped } = writeFiles(targetDir, files, { overwrite: false });
|
|
234
|
+
|
|
235
|
+
console.log(`Converted ${targetDir} into a Vite + BaseUI project.`);
|
|
236
|
+
written.forEach((f) => console.log(` create ${f}`));
|
|
237
|
+
skipped.forEach((f) => console.log(` skip ${f} (already exists)`));
|
|
238
|
+
|
|
239
|
+
if (skipped.includes("index.html")) {
|
|
240
|
+
console.log(
|
|
241
|
+
"\nindex.html already existed and was left untouched — make sure it has a <div id=\"app\"></div> " +
|
|
242
|
+
'and a <script type="module" src="/src/main.js"></script> tag so the scaffolded app mounts.',
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (flags.install) runInstall(targetDir);
|
|
247
|
+
|
|
248
|
+
console.log(`\nNext steps:\n npm run dev`);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
function printHelp() {
|
|
252
|
+
console.log(`@thebase/ui project CLI
|
|
253
|
+
|
|
254
|
+
Usage:
|
|
255
|
+
create-baseui-app create <app-name> [--version <x.y.z>] [--no-install] [--force]
|
|
256
|
+
Scaffold a new Vite + BaseUI project in ./<app-name>.
|
|
257
|
+
|
|
258
|
+
create-baseui-app convert [path] [--version <x.y.z>] [--no-install]
|
|
259
|
+
Turn an existing (non-npm) folder into a Vite + BaseUI project, in place.
|
|
260
|
+
Never overwrites files that already exist; only fills in what's missing.
|
|
261
|
+
`);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
const [, , command, ...rest] = process.argv;
|
|
265
|
+
|
|
266
|
+
if (command === "create") cmdCreate(rest);
|
|
267
|
+
else if (command === "convert") cmdConvert(rest);
|
|
268
|
+
else printHelp();
|
package/dist/baseui.esm.js
CHANGED
|
@@ -12,7 +12,7 @@ var hi=Object.defineProperty;var Ap=(t,e,s)=>e in t?hi(t,e,{enumerable:!0,config
|
|
|
12
12
|
`),i=r.filter(p=>p.trim()).map(p=>p.match(/^\s*/)?.[0].length||0),a=i.length?Math.min(...i):0;return r.map(p=>p.slice(a)).join(`
|
|
13
13
|
`)}function tp(t,e=0){let s=" ".repeat(e),r=[];for(let i of t.childNodes){if(i.nodeType===Node.TEXT_NODE){let l=i.textContent.trim();l&&r.push(`${s}${l}`);continue}if(i.nodeType!==Node.ELEMENT_NODE)continue;let a=[...i.attributes].map(l=>` ${l.name}="${l.value}"`).join("");if(![...i.childNodes].some(l=>l.nodeType===Node.ELEMENT_NODE||l.nodeType===Node.TEXT_NODE&&l.textContent.trim())){r.push(`${s}<${i.localName}${a}>${i.textContent.trim()}</${i.localName}>`);continue}r.push(`${s}<${i.localName}${a}>`),r.push(...tp(i,e+1)),r.push(`${s}</${i.localName}>`)}return r}async function ep(t){if(!t?.trim())return"";let{expandSelfClosingTags:e,extractTagCaseMap:s,normalizeOwlPreviewMarkup:r}=await Promise.resolve().then(()=>(va(),Xn)),i=document.createElement("div");return i.innerHTML=e(t),r(i,s(t)),tp(i).join(`
|
|
14
14
|
`)}function sp(t){t.querySelectorAll('[b-block="dashboard-01"], [b-block^="sidebar-"]').forEach(e=>{let s=e.querySelector("[b-block-sidebar-toggle], button[aria-label='Toggle sidebar']"),r=e.querySelector("[b-block-sidebar]");!s||!r||(e.setAttribute("b-att-sidebar",e.getAttribute("b-att-sidebar")||"open"),s.setAttribute("b-block-sidebar-toggle",""),s.setAttribute("aria-expanded",e.getAttribute("b-att-sidebar")==="open"?"true":"false"),s.addEventListener("click",()=>{let i=e.getAttribute("b-att-sidebar")!=="open";e.setAttribute("b-att-sidebar",i?"open":"collapsed"),s.setAttribute("aria-expanded",i?"true":"false")}))}),t.querySelectorAll('[b-block^="sidebar-"] [b-block-subnav]').forEach(e=>{let s=e.previousElementSibling;s&&(s.setAttribute("b-block-subnav-toggle",""),s.setAttribute("aria-expanded","true"),e.setAttribute("b-att-state","open"),s.addEventListener("click",r=>{r.preventDefault();let i=e.getAttribute("b-att-state")!=="open";e.setAttribute("b-att-state",i?"open":"collapsed"),s.setAttribute("aria-expanded",i?"true":"false")}))})}var op=b(()=>{});var rp={};Ca(rp,{Accordion:()=>Hs,AccordionContent:()=>Ks,AccordionItem:()=>Ws,AccordionTrigger:()=>Tt,Alert:()=>ye,AlertAction:()=>xe,AlertDescription:()=>Se,AlertDialog:()=>ts,AlertDialogAction:()=>ls,AlertDialogCancel:()=>ps,AlertDialogContent:()=>ss,AlertDialogDescription:()=>ns,AlertDialogFooter:()=>rs,AlertDialogHeader:()=>os,AlertDialogMedia:()=>as,AlertDialogTitle:()=>is,AlertDialogTrigger:()=>es,AlertTitle:()=>ve,AspectRatio:()=>sr,Attachment:()=>Mo,AttachmentAction:()=>Ho,AttachmentActions:()=>_o,AttachmentContent:()=>Po,AttachmentDescription:()=>Do,AttachmentDropzone:()=>Vo,AttachmentGroup:()=>Ko,AttachmentMedia:()=>zo,AttachmentTitle:()=>Fo,AttachmentTrigger:()=>Wo,Avatar:()=>Zo,Badge:()=>pt,BaseUIComponents:()=>Dr,BlockViewer:()=>Gt,Breadcrumb:()=>Gs,BreadcrumbEllipsis:()=>qt,BreadcrumbItem:()=>Js,BreadcrumbLink:()=>Qs,BreadcrumbList:()=>Ys,BreadcrumbPage:()=>to,BreadcrumbSeparator:()=>Ut,Bubble:()=>or,Button:()=>K,ButtonGroup:()=>ir,ButtonGroupSeparator:()=>nr,ButtonGroupText:()=>pr,Calendar:()=>No,Card:()=>lt,CardBody:()=>ct,CardDescription:()=>ae,CardFooter:()=>oe,CardHeader:()=>se,CardTitle:()=>re,Carousel:()=>Io,CarouselNext:()=>To,CarouselPrevious:()=>$o,CarouselSlide:()=>Ro,Chart:()=>Bo,Checkbox:()=>Te,ClipboardButton:()=>jt,Collapsible:()=>Vs,CollapsibleContent:()=>Xs,CollapsibleTrigger:()=>Zs,Combobox:()=>Oo,Command:()=>jo,ContextMenu:()=>Ps,ContextMenuContent:()=>Ds,ContextMenuItem:()=>_s,ContextMenuTrigger:()=>Fs,DataTable:()=>Kt,DatePicker:()=>ko,Dialog:()=>ue,DialogClose:()=>fe,DialogContent:()=>It,DialogDescription:()=>ge,DialogFooter:()=>he,DialogHeader:()=>be,DialogTitle:()=>me,DialogTrigger:()=>de,Direction:()=>rr,Drawer:()=>cs,DrawerClose:()=>fs,DrawerContent:()=>ds,DrawerDescription:()=>gs,DrawerFooter:()=>hs,DrawerHeader:()=>bs,DrawerTitle:()=>ms,DrawerTrigger:()=>us,DropdownMenu:()=>bt,DropdownMenuCheckboxItem:()=>Rt,DropdownMenuContent:()=>mt,DropdownMenuGroup:()=>Ts,DropdownMenuItem:()=>gt,DropdownMenuLabel:()=>Us,DropdownMenuRadioGroup:()=>qs,DropdownMenuRadioItem:()=>$t,DropdownMenuSeparator:()=>Ms,DropdownMenuShortcut:()=>zs,DropdownMenuSub:()=>ft,DropdownMenuSubContent:()=>yt,DropdownMenuSubTrigger:()=>ot,DropdownMenuTrigger:()=>ht,Empty:()=>we,EmptyContent:()=>Ne,EmptyDescription:()=>Le,EmptyHeader:()=>Ae,EmptyMedia:()=>Ee,EmptyTitle:()=>Ce,Field:()=>Ct,FieldContent:()=>ur,FieldDescription:()=>Nt,FieldError:()=>kt,FieldGroup:()=>Et,FieldLabel:()=>Lt,FieldLegend:()=>cr,FieldSeparator:()=>br,FieldSet:()=>lr,FieldTitle:()=>dr,Form:()=>Yt,HoverCard:()=>Bs,HoverCardContent:()=>Rs,HoverCardTrigger:()=>Is,Icon:()=>N,Input:()=>ie,InputGroup:()=>_e,InputGroupAddon:()=>He,InputGroupButton:()=>We,InputGroupInput:()=>Ve,InputGroupText:()=>Ke,InputGroupTextarea:()=>Ze,InputOtp:()=>Xe,Item:()=>ar,Kbd:()=>Be,Label:()=>hr,Markdown:()=>Zt,MarkdownTree:()=>Xt,MarkdownTreeNode:()=>Fr,Marker:()=>Ie,Menubar:()=>ao,Message:()=>Xo,MessageScroller:()=>Go,NativeSelect:()=>$e,NavigationMenu:()=>oo,NavigationMenuItem:()=>ro,Pagination:()=>eo,PaginationItem:()=>so,Popover:()=>ks,PopoverContent:()=>js,PopoverTrigger:()=>Os,Progress:()=>er,Pwa:()=>yr,PwaBody:()=>Er,PwaClose:()=>Nr,PwaContent:()=>Sr,PwaDescription:()=>Ar,PwaFooter:()=>Lr,PwaHeader:()=>xr,PwaSteps:()=>Cr,PwaTitle:()=>wr,PwaTrigger:()=>vr,Questionnaire:()=>Yo,QuestionnaireNext:()=>tr,QuestionnairePrevious:()=>Qo,QuestionnaireStep:()=>Jo,RadioGroup:()=>Ue,RadioGroupItem:()=>qe,Resizable:()=>Uo,ScrollArea:()=>qo,Select:()=>Ge,SelectContent:()=>Je,SelectItem:()=>Qe,SelectTrigger:()=>Ye,Separator:()=>ke,Sheet:()=>vs,SheetClose:()=>Ls,SheetContent:()=>xs,SheetDescription:()=>Cs,SheetFooter:()=>As,SheetHeader:()=>ws,SheetTitle:()=>Es,SheetTrigger:()=>Ss,Shell:()=>_t,ShellContent:()=>Wt,ShellHeader:()=>wo,ShellMain:()=>xo,ShellNav:()=>So,ShellSidebar:()=>Ht,ShellSidebarHeader:()=>vo,ShellUserMenu:()=>Ao,Sidebar:()=>at,SidebarClose:()=>zt,SidebarContent:()=>St,SidebarFooter:()=>no,SidebarGroup:()=>xt,SidebarGroupAction:()=>Pt,SidebarGroupCollapsible:()=>Ft,SidebarGroupContent:()=>bo,SidebarGroupLabel:()=>wt,SidebarHeader:()=>io,SidebarInput:()=>co,SidebarInset:()=>po,SidebarMenu:()=>it,SidebarMenuAction:()=>Dt,SidebarMenuBadge:()=>mo,SidebarMenuButton:()=>rt,SidebarMenuItem:()=>At,SidebarMenuSkeleton:()=>go,SidebarMenuSub:()=>ho,SidebarMenuSubButton:()=>yo,SidebarMenuSubItem:()=>fo,SidebarProvider:()=>Ur,SidebarRail:()=>lo,SidebarSeparator:()=>uo,SidebarTrigger:()=>Mt,Skeleton:()=>ut,Slider:()=>ze,Spinner:()=>Oe,Switch:()=>Me,TabContent:()=>Bt,TabTrigger:()=>ce,Table:()=>Eo,Tabs:()=>ne,TabsContainer:()=>pe,TabsList:()=>le,TextEditor:()=>kr,Textarea:()=>Re,ThemeButton:()=>nt,Toast:()=>vt,Toggle:()=>mr,ToggleGroup:()=>gr,ToggleGroupItem:()=>fr,Tooltip:()=>$s,Typography:()=>je,createNamedIcon:()=>Ia,findMarkdownTreeNode:()=>xa,iconComponentName:()=>Ja});var ap=b(()=>{m();Jr();Jr();sa(Dr)});function dc(){return document.querySelector("[b-block-code-template]")}function bc(t){return t.match(/<templates[^>]*>([\s\S]*)<\/templates>/)?.[1]||t}function hc(t){for(let e of t.querySelectorAll?.("[b-block] [b-icon], [b-block] [b-ui='icon']")||[])!e.hasAttribute("b-icon-base-url")&&!e.hasAttribute("b-att-base-url")&&e.setAttribute("b-icon-base-url",uc)}var wa,lc,cc,uc,Gt,ip=b(()=>{m();Zr();jr();Y();ei();op();wa=Vt({storageKey:"baseui-example-theme",toggleSelector:"",labelSelector:""}),lc=[{key:"docs",label:"Docs",href:"/docs"},{key:"icons",label:"Icons",href:"/docs/icons"},{key:"examples",label:"Examples",href:"/examples/index.html"},{key:"blocks",label:"Blocks",href:"/blocks"}],cc={desktop:"",tablet:"768px",mobile:"390px"},uc="/dist/icons/lucide";Gt=class extends n{setup(){this.navItems=this.props.navItems||lc,this.previewFrame=S("previewFrame"),this.embedRoot=S("embedRoot"),this.code=Qn(),this.state=f({mode:"preview",viewport:"desktop",copyLabel:"Copy code",embed:new URLSearchParams(globalThis.location.search).get("embed")==="1",codeVariant:"owl",staticTemplate:"",staticTemplateStatus:"idle"}),k(()=>this.mountPreview()),D(()=>this.mountStaticBaseUI())}get activeCode(){return this.state.codeVariant==="template"?this.state.staticTemplateStatus==="ready"?this.state.staticTemplate:"Converting to a static template...":this.code}async setCodeVariant(e){if(this.state.codeVariant=e,e==="template"&&this.state.staticTemplateStatus==="idle"){this.state.staticTemplateStatus="loading";let s=await ep(this.code);this.state.staticTemplate=s,this.state.staticTemplateStatus="ready"}}get title(){return document.body.dataset.blockTitle||document.title||"Block"}get description(){return document.body.dataset.blockDescription||"Preview and copy this BaseUI block."}get previewStyle(){let e=cc[this.state.viewport]||"";return e?`max-width:${e}`:""}setMode(e){this.state.mode=e}setViewport(e){this.state.viewport=e}async copyCode(){await globalThis.navigator?.clipboard?.writeText(this.activeCode),this.state.copyLabel="Copied"}mountPreview(){this.state.embed&&(document.body.className="m-0");let e=this.state.embed?this.embedRoot.el:this.previewFrame.el,s=dc();if(!(!e||!s)){if(s.tagName==="SCRIPT"){this.mountOwlPreview(e,s);return}e.replaceChildren(s.content.cloneNode(!0)),this.mountStaticBaseUI(e),sp(e)}}async mountOwlPreview(e,s){e.replaceChildren();let r=await Promise.resolve().then(()=>(ap(),rp));class i extends n{setup(){this.state=f({collapsed:!1})}}o(i,"components",r),o(i,"template","examples.SidebarBlock");let a=[await Hr("/dist/baseui.templates.xml"),s.textContent].map(bc).join(`
|
|
15
|
-
`);await oa(i,e,{templates:`<templates>${a}</templates>`}),wa.set(wa.current(),{skipStorage:!0})}mountStaticBaseUI(e=document){hc(e),globalThis.BaseUI?.mountAll(e),wa.set(wa.current(),{skipStorage:!0})}};o(Gt,"template","baseui.BlockViewer"),o(Gt,"components",{Button:K,Icon:N,ThemeButton:nt}),o(Gt,"props",{navItems:{type:Array,optional:!0}})});var Ot,yr,vr,Sr,xr,wr,Ar,Er,Cr,Lr,Nr,np=b(()=>{m();Vr();U();Ot={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},yr=class extends n{setup(){this.pwaState=f({open:$(this.props)}),A({pwa:this.pwaState,setPwaOpen:e=>this.setOpen(e)}),R(e=>{T(e)&&(this.pwaState.open=$(e))})}setOpen(e){T(this.props)||(this.pwaState.open=e),this.props.onOpenChange?.(e)}};o(yr,"template","baseui.Pwa"),o(yr,"props",{open:{type:Boolean,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});vr=class extends n{onClick(){this.env.setPwaOpen(!0)}};o(vr,"template","baseui.PwaTrigger"),o(vr,"props",Ot);Sr=class extends n{setup(){this.rootRef=S("root"),G(e=>{if(!e)return;let s=document.activeElement;return Tr(this.rootRef.el)[0]?.focus(),()=>s?.focus?.()},()=>[this.env.pwa.open])}get open(){return this.env.pwa.open}onKeyDown(e){e.key==="Escape"&&this.env.setPwaOpen(!1)}onBackdropClick(e){e.target===this.rootRef.el&&this.env.setPwaOpen(!1)}};o(Sr,"template","baseui.PwaContent"),o(Sr,"props",Ot);xr=class extends n{};o(xr,"template","baseui.PwaHeader"),o(xr,"props",Ot);wr=class extends n{};o(wr,"template","baseui.PwaTitle"),o(wr,"props",Ot);Ar=class extends n{};o(Ar,"template","baseui.PwaDescription"),o(Ar,"props",Ot);Er=class extends n{};o(Er,"template","baseui.PwaBody"),o(Er,"props",Ot);Cr=class extends n{get steps(){return Array.isArray(this.props.steps)?this.props.steps:[]}};o(Cr,"template","baseui.PwaSteps"),o(Cr,"props",{...Ot,steps:{type:Array,optional:!0}});Lr=class extends n{};o(Lr,"template","baseui.PwaFooter"),o(Lr,"props",Ot);Nr=class extends n{onClick(){this.env.setPwaOpen(!1)}};o(Nr,"template","baseui.PwaClose"),o(Nr,"props",Ot)});function cp(t,e){return typeof t=="string"?t:e}function mc(t){return{title:t.submitted&&t.title.trim().length>0&&t.title.trim().length<5?"Bug title must be at least 5 characters.":"",description:t.submitted&&t.description.length>0&&t.description.length<20?"Description must be at least 20 characters.":""}}var pp,lp,Yt,up=b(()=>{m();jr();U();Ya();pp="",lp="";Yt=class extends n{setup(){this.state=f({title:cp(this.props.title,pp),description:cp(this.props.description,lp),submitted:!1})}get classNames(){return W("baseui-form",this.props.className)}get titlePlaceholder(){return this.props.titlePlaceholder||"Login button not working on mobile"}get descriptionPlaceholder(){return this.props.descriptionPlaceholder||"I'm having an issue with the login button on mobile."}get maxDescriptionLength(){return this.props.maxDescriptionLength||100}get descriptionLength(){return this.state.description.length}get errors(){return mc(this.state)}get titleInvalid(){return!!this.errors.title}get descriptionInvalid(){return!!this.errors.description}reset(){this.state.title=pp,this.state.description=lp,this.state.submitted=!1}submit(e){e.preventDefault(),this.state.submitted=!0,!this.titleInvalid&&!this.descriptionInvalid&&this.props.onSubmit?.({title:this.state.title.trim(),description:this.state.description})}};o(Yt,"template","baseui.Form"),o(Yt,"components",{Button:K,Field:Ct,FieldDescription:Nt,FieldError:kt,FieldGroup:Et,FieldLabel:Lt}),o(Yt,"props",{title:{type:String,optional:!0},description:{type:String,optional:!0},titlePlaceholder:{type:String,optional:!0},descriptionPlaceholder:{type:String,optional:!0},maxDescriptionLength:{type:Number,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onSubmit:{type:Function,optional:!0}})});function gc(){return li??(li=import("./runtime/prosemirror-text-editor.js")),li}async function Aa(t){return(await gc()).createProseMirrorTextEditor(t)}var li,ci=b(()=>{});var kr,dp=b(()=>{m();ci();kr=class extends n{setup(){this.editorRef=S("editor"),this.editorHandle=null,this.state=f({content:"",status:"loading",error:""}),Qt(()=>this.load(this.props)),R(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),k(()=>this.mountEditor()),D(()=>this.mountEditor()),Wr(()=>this.destroyEditor())}get classNames(){let e=["baseui-text-editor"];return this.props.className&&e.push(this.props.className),e.join(" ")}get editorLabel(){return this.props.collaborative?"Collaborative rich text editor":"Rich text editor"}shouldReload(e){return e.content!==this.props.content||e.src!==this.props.src}shouldRestartEditor(e){return e.collaborative!==this.props.collaborative||e.room!==this.props.room||e.password!==this.props.password||e.signaling!==this.props.signaling}async load(e){this.destroyEditor(),this.state.status="loading",this.state.error="";let s=e.content??"";if(e.src)try{let r=await fetch(e.src);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);s=await r.text()}catch(r){this.state.status="error",this.state.error=r.message||String(r);return}this.state.content=s,this.state.status="ready"}async mountEditor(){let e=this.editorRef.el;if(!(!e||this.editorHandle||this.state.status!=="ready"))try{this.editorHandle=await Aa({root:e,value:this.state.content,placeholder:this.props.placeholder,collaborative:!!this.props.collaborative,room:this.props.room||"baseui-text-editor",password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(s,r,i)=>{this.state.content=s,this.props.onChange?.(s,r,i)}})}catch(s){this.state.status="error",this.state.error=s.message||String(s)}}destroyEditor(){this.editorHandle?.destroy?.(),this.editorHandle=null}};o(kr,"template","baseui.TextEditor"),o(kr,"props",{content:{type:String,optional:!0},src:{type:String,optional:!0},placeholder:{type:String,optional:!0},collaborative:{type:Boolean,optional:!0},room:{type:String,optional:!0},password:{type:String,optional:!0},signaling:{type:Array,optional:!0},user:{type:Object,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var Dr={};Ca(Dr,{Accordion:()=>Hs,AccordionContent:()=>Ks,AccordionItem:()=>Ws,AccordionTrigger:()=>Tt,Alert:()=>ye,AlertAction:()=>xe,AlertDescription:()=>Se,AlertDialog:()=>ts,AlertDialogAction:()=>ls,AlertDialogCancel:()=>ps,AlertDialogContent:()=>ss,AlertDialogDescription:()=>ns,AlertDialogFooter:()=>rs,AlertDialogHeader:()=>os,AlertDialogMedia:()=>as,AlertDialogTitle:()=>is,AlertDialogTrigger:()=>es,AlertTitle:()=>ve,AspectRatio:()=>sr,Attachment:()=>Mo,AttachmentAction:()=>Ho,AttachmentActions:()=>_o,AttachmentContent:()=>Po,AttachmentDescription:()=>Do,AttachmentDropzone:()=>Vo,AttachmentGroup:()=>Ko,AttachmentMedia:()=>zo,AttachmentTitle:()=>Fo,AttachmentTrigger:()=>Wo,Avatar:()=>Zo,Badge:()=>pt,BlockViewer:()=>Gt,Breadcrumb:()=>Gs,BreadcrumbEllipsis:()=>qt,BreadcrumbItem:()=>Js,BreadcrumbLink:()=>Qs,BreadcrumbList:()=>Ys,BreadcrumbPage:()=>to,BreadcrumbSeparator:()=>Ut,Bubble:()=>or,Button:()=>K,ButtonGroup:()=>ir,ButtonGroupSeparator:()=>nr,ButtonGroupText:()=>pr,Calendar:()=>No,Card:()=>lt,CardBody:()=>ct,CardDescription:()=>ae,CardFooter:()=>oe,CardHeader:()=>se,CardTitle:()=>re,Carousel:()=>Io,CarouselNext:()=>To,CarouselPrevious:()=>$o,CarouselSlide:()=>Ro,Chart:()=>Bo,Checkbox:()=>Te,ClipboardButton:()=>jt,Collapsible:()=>Vs,CollapsibleContent:()=>Xs,CollapsibleTrigger:()=>Zs,Combobox:()=>Oo,Command:()=>jo,ContextMenu:()=>Ps,ContextMenuContent:()=>Ds,ContextMenuItem:()=>_s,ContextMenuTrigger:()=>Fs,DataTable:()=>Kt,DatePicker:()=>ko,Dialog:()=>ue,DialogClose:()=>fe,DialogContent:()=>It,DialogDescription:()=>ge,DialogFooter:()=>he,DialogHeader:()=>be,DialogTitle:()=>me,DialogTrigger:()=>de,Direction:()=>rr,Drawer:()=>cs,DrawerClose:()=>fs,DrawerContent:()=>ds,DrawerDescription:()=>gs,DrawerFooter:()=>hs,DrawerHeader:()=>bs,DrawerTitle:()=>ms,DrawerTrigger:()=>us,DropdownMenu:()=>bt,DropdownMenuCheckboxItem:()=>Rt,DropdownMenuContent:()=>mt,DropdownMenuGroup:()=>Ts,DropdownMenuItem:()=>gt,DropdownMenuLabel:()=>Us,DropdownMenuRadioGroup:()=>qs,DropdownMenuRadioItem:()=>$t,DropdownMenuSeparator:()=>Ms,DropdownMenuShortcut:()=>zs,DropdownMenuSub:()=>ft,DropdownMenuSubContent:()=>yt,DropdownMenuSubTrigger:()=>ot,DropdownMenuTrigger:()=>ht,Empty:()=>we,EmptyContent:()=>Ne,EmptyDescription:()=>Le,EmptyHeader:()=>Ae,EmptyMedia:()=>Ee,EmptyTitle:()=>Ce,Field:()=>Ct,FieldContent:()=>ur,FieldDescription:()=>Nt,FieldError:()=>kt,FieldGroup:()=>Et,FieldLabel:()=>Lt,FieldLegend:()=>cr,FieldSeparator:()=>br,FieldSet:()=>lr,FieldTitle:()=>dr,Form:()=>Yt,HoverCard:()=>Bs,HoverCardContent:()=>Rs,HoverCardTrigger:()=>Is,Icon:()=>N,Input:()=>ie,InputGroup:()=>_e,InputGroupAddon:()=>He,InputGroupButton:()=>We,InputGroupInput:()=>Ve,InputGroupText:()=>Ke,InputGroupTextarea:()=>Ze,InputOtp:()=>Xe,Item:()=>ar,Kbd:()=>Be,Label:()=>hr,Markdown:()=>Zt,MarkdownTree:()=>Xt,MarkdownTreeNode:()=>Fr,Marker:()=>Ie,Menubar:()=>ao,Message:()=>Xo,MessageScroller:()=>Go,NativeSelect:()=>$e,NavigationMenu:()=>oo,NavigationMenuItem:()=>ro,Pagination:()=>eo,PaginationItem:()=>so,Popover:()=>ks,PopoverContent:()=>js,PopoverTrigger:()=>Os,Progress:()=>er,Pwa:()=>yr,PwaBody:()=>Er,PwaClose:()=>Nr,PwaContent:()=>Sr,PwaDescription:()=>Ar,PwaFooter:()=>Lr,PwaHeader:()=>xr,PwaSteps:()=>Cr,PwaTitle:()=>wr,PwaTrigger:()=>vr,Questionnaire:()=>Yo,QuestionnaireNext:()=>tr,QuestionnairePrevious:()=>Qo,QuestionnaireStep:()=>Jo,RadioGroup:()=>Ue,RadioGroupItem:()=>qe,Resizable:()=>Uo,ScrollArea:()=>qo,Select:()=>Ge,SelectContent:()=>Je,SelectItem:()=>Qe,SelectTrigger:()=>Ye,Separator:()=>ke,Sheet:()=>vs,SheetClose:()=>Ls,SheetContent:()=>xs,SheetDescription:()=>Cs,SheetFooter:()=>As,SheetHeader:()=>ws,SheetTitle:()=>Es,SheetTrigger:()=>Ss,Shell:()=>_t,ShellContent:()=>Wt,ShellHeader:()=>wo,ShellMain:()=>xo,ShellNav:()=>So,ShellSidebar:()=>Ht,ShellSidebarHeader:()=>vo,ShellUserMenu:()=>Ao,Sidebar:()=>at,SidebarClose:()=>zt,SidebarContent:()=>St,SidebarFooter:()=>no,SidebarGroup:()=>xt,SidebarGroupAction:()=>Pt,SidebarGroupCollapsible:()=>Ft,SidebarGroupContent:()=>bo,SidebarGroupLabel:()=>wt,SidebarHeader:()=>io,SidebarInput:()=>co,SidebarInset:()=>po,SidebarMenu:()=>it,SidebarMenuAction:()=>Dt,SidebarMenuBadge:()=>mo,SidebarMenuButton:()=>rt,SidebarMenuItem:()=>At,SidebarMenuSkeleton:()=>go,SidebarMenuSub:()=>ho,SidebarMenuSubButton:()=>yo,SidebarMenuSubItem:()=>fo,SidebarProvider:()=>Ur,SidebarRail:()=>lo,SidebarSeparator:()=>uo,SidebarTrigger:()=>Mt,Skeleton:()=>ut,Slider:()=>ze,Spinner:()=>Oe,Switch:()=>Me,TabContent:()=>Bt,TabTrigger:()=>ce,Table:()=>Eo,Tabs:()=>ne,TabsContainer:()=>pe,TabsList:()=>le,TextEditor:()=>kr,Textarea:()=>Re,ThemeButton:()=>nt,Toast:()=>vt,Toggle:()=>mr,ToggleGroup:()=>gr,ToggleGroupItem:()=>fr,Tooltip:()=>$s,Typography:()=>je,createNamedIcon:()=>Ia,findMarkdownTreeNode:()=>xa,iconComponentName:()=>Ja});var Jr=b(()=>{jr();Ai();Ta();Ua();Ei();Li();Ni();Oi();Bi();Ii();Pa();Ri();$i();Ti();Ui();qi();Mi();zi();Pi();Fi();Di();_i();Hi();Wi();Ki();Vi();Zi();Gi();Ji();Qi();Wa();tn();Va();en();on();rn();an();nn();pn();ha();un();dn();bn();hn();mn();gn();fn();yn();vn();Sn();xn();En();Cn();Ln();Nn();kn();On();jn();Bn();In();Rn();$n();Ya();Y();Tn();Un();ei();Pn();Fn();Yn();Jn();ip();np();up();dp()});y();var yi="0.0.4";m();Jr();y();Vr();function fc(t){let{open:e,close:s,destroy:r}=ba(t,{closeSelector:"[b-alert-dialog-cancel], [b-alert-dialog-action], [b-alert-dialog-close]",trapFocus:!0});return t.setAttribute("role","alertdialog"),t.BaseUIAlertDialog={open:e,close:s},{destroy:()=>{r(),delete t.BaseUIAlertDialog}}}c.register("alert-dialog",{type:"owl",mount:fc});y();q();var ui={default:"baseui-alert-default",destructive:"baseui-alert-destructive",info:"baseui-alert-default",success:"alert-success",warning:"alert-warning",danger:"baseui-alert-destructive"};function yc(t){t.classList.add("alert","baseui-alert",ui[t.getAttribute("b-att-variant")||"default"]||ui.default),t.setAttribute("role",t.getAttribute("role")||"alert");let e=null;if(!!t.getAttribute("b-att-dismissible")){if(t.classList.add("alert-dismissible","fade","show"),!t.querySelector('[data-bs-dismiss="alert"]')){let r=document.createElement("button");r.type="button",r.className="btn-close",r.setAttribute("data-bs-dismiss","alert"),r.setAttribute("aria-label","Close"),t.appendChild(r)}e=new(x()).Alert(t)}return{destroy:()=>{e?.dispose(),t.classList.remove("alert","baseui-alert","alert-dismissible","fade","show",...Object.values(ui))}}}c.register("alert",{type:"static",mount:yc});y();q();function vc(t){let e=[...t.querySelectorAll("[b-accordion-item]")],s=t.getAttribute("b-att-multiple")==="true",r=new Map,i=new Map,a=new Map,p=(l,u)=>{let d=l.querySelector("[b-accordion-trigger]");l.setAttribute("b-att-state",u?"open":"closed"),d?.setAttribute("aria-expanded",String(u)),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:u}}))};return t.setAttribute("role","presentation"),e.forEach((l,u)=>{let d=l.querySelector("[b-accordion-trigger]"),h=l.querySelector("[b-accordion-panel]");if(!h)return;let g=h.id||`baseui-accordion-panel-${u}`;h.id=g;let v=l.getAttribute("b-att-state")==="open";h.classList.add("collapse"),v&&h.classList.add("show");let w=new(x()).Collapse(h,{toggle:!1});a.set(l,w);let j=()=>p(l,!0),C=()=>p(l,!1);h.addEventListener("shown.bs.collapse",j),h.addEventListener("hidden.bs.collapse",C),i.set(l,{onShown:j,onHidden:C}),d?.setAttribute("aria-expanded",String(v)),d?.setAttribute("aria-controls",g);let B=()=>{let F=h.classList.contains("show");!s&&!F&&e.forEach(E=>{if(E===l)return;let H=a.get(E),X=E.querySelector("[b-accordion-panel]");H&&X?.classList.contains("show")&&H.hide()}),F?w.hide():w.show()};r.set(l,B),d?.addEventListener("click",B)}),{destroy:()=>{e.forEach(l=>{let u=l.querySelector("[b-accordion-trigger]"),d=l.querySelector("[b-accordion-panel]");u?.removeEventListener("click",r.get(l));let h=i.get(l);d&&h&&(d.removeEventListener("shown.bs.collapse",h.onShown),d.removeEventListener("hidden.bs.collapse",h.onHidden)),a.get(l)?.dispose()}),r.clear(),i.clear(),a.clear()}}}c.register("accordion",{type:"owl",mount:vc});y();function Sc(t){let e=t.getAttribute("b-att-ratio")||`${t.getAttribute("b-att-width")||16} / ${t.getAttribute("b-att-height")||9}`;return t.classList.add("baseui-aspect-ratio"),t.style.setProperty("--baseui-aspect-ratio",e),{destroy:()=>t.classList.remove("baseui-aspect-ratio")}}c.register("aspect-ratio",{type:"static",mount:Sc});y();te();var xc=["idle","uploading","processing","error","done"],wc=["default","sm","xs"],Ac=["content","title","description","actions"];function bp(t,e){t.classList.add(`baseui-attachment-${e}`),t.setAttribute("data-slot",`attachment-${e}`)}function Ec(t){let e=t.querySelector("input[type='file']"),s=t.querySelector("[b-attachment-list]"),r=xc.includes(t.getAttribute("b-att-state"))?t.getAttribute("b-att-state"):"done",i=wc.includes(t.getAttribute("b-att-size"))?t.getAttribute("b-att-size"):"default",a=t.getAttribute("b-att-orientation")==="vertical"?"vertical":"horizontal";t.classList.add("baseui-attachment"),t.classList.add(`baseui-attachment-${r}`,`baseui-attachment-${i}`,`baseui-attachment-${a}`),t.setAttribute("data-state",r),t.setAttribute("data-size",i),t.setAttribute("data-orientation",a),t.setAttribute("data-slot","attachment"),e&&t.classList.add("baseui-attachment-picker"),t.querySelectorAll("[b-attachment-media]").forEach(l=>{let u=l.getAttribute("b-att-variant")==="image"?"image":"icon";bp(l,"media"),l.classList.add(`baseui-attachment-media-${u}`),l.setAttribute("data-variant",u)}),Ac.forEach(l=>t.querySelectorAll(`[b-attachment-${l}]`).forEach(u=>bp(u,l))),t.querySelectorAll("[b-attachment-action]").forEach(l=>{let u=P[l.getAttribute("b-att-variant")]||P.ghost,d=M[l.getAttribute("b-att-size")]||M["icon-xs"];l.classList.add("btn","baseui-button",u,d,"baseui-button-icon","baseui-attachment-action"),l.setAttribute("data-slot","attachment-action"),!l.getAttribute("type")&&l.tagName==="BUTTON"&&l.setAttribute("type","button")}),t.querySelectorAll("[b-attachment-trigger]").forEach(l=>{l.classList.add("baseui-attachment-trigger"),l.setAttribute("data-slot","attachment-trigger"),!l.getAttribute("type")&&l.tagName==="BUTTON"&&l.setAttribute("type","button")}),e?.classList.add("form-control");let p=()=>{s&&(s.innerHTML=[...e.files].map(l=>`<li>${l.name}</li>`).join("")),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:[...e.files]}}))};return e?.addEventListener("change",p),{destroy:()=>e?.removeEventListener("change",p)}}function Cc(t){return t.classList.add("baseui-attachment-group"),t.setAttribute("data-slot","attachment-group"),{destroy:()=>t.classList.remove("baseui-attachment-group")}}function Lc(t){let e=t.querySelector("input[type='file']");t.classList.add("baseui-attachment-dropzone"),t.setAttribute("data-slot","attachment-dropzone");let s=()=>e?.click(),r=u=>{u.preventDefault(),t.classList.add("baseui-attachment-dropzone-dragging")},i=()=>t.classList.remove("baseui-attachment-dropzone-dragging"),a=u=>{u.length&&t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:u}}))},p=u=>{u.preventDefault(),t.classList.remove("baseui-attachment-dropzone-dragging"),a([...u.dataTransfer?.files??[]])},l=()=>{a([...e?.files??[]]),e&&(e.value="")};return t.addEventListener("click",s),t.addEventListener("dragover",r),t.addEventListener("dragleave",i),t.addEventListener("drop",p),e?.addEventListener("change",l),{destroy:()=>{t.removeEventListener("click",s),t.removeEventListener("dragover",r),t.removeEventListener("dragleave",i),t.removeEventListener("drop",p),e?.removeEventListener("change",l)}}}c.register("attachment",{type:"owl",mount:Ec});c.register("attachment-group",{type:"static",mount:Cc});c.register("attachment-dropzone",{type:"static",mount:Lc});y();function Nc(t){t.classList.add("baseui-avatar");let e=t.querySelector("img"),s=t.querySelector("[b-avatar-fallback]");if(e&&s){let r=()=>{e.hidden=!0,s.hidden=!1};return s.hidden=!!e.getAttribute("src"),e.addEventListener("error",r),{destroy:()=>e.removeEventListener("error",r)}}return{}}c.register("avatar",{type:"static",mount:Nc});y();$a();function kc(t){let e=ee[t.getAttribute("b-att-variant")||"secondary"]||ee.secondary;return t.classList.add("badge",e),t.getAttribute("b-att-pill")==="true"&&t.classList.add("rounded-pill"),{destroy:()=>t.classList.remove("badge","rounded-pill",...Object.values(ee))}}c.register("badge",{type:"static",mount:kc});y();st();function hp(t){return[...t.children].filter(e=>!e.matches("[b-breadcrumb-separator], .baseui-breadcrumb-separator"))}function gp(t,e,s){return z(t,e,{size:s}),t}function Oc(){let t=document.createElement("li"),e=document.createElement("span");return t.setAttribute("b-breadcrumb-separator",""),t.setAttribute("data-slot","breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),t.className="baseui-breadcrumb-separator",e.className="baseui-breadcrumb-separator-icon",t.append(gp(e,"chevron-right","var(--b3_5)")),t}function jc(t){t.classList.add("baseui-breadcrumb-separator"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true")}function Bc(t){if(t.classList.add("baseui-breadcrumb-ellipsis"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-ellipsis"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),!t.querySelector(".baseui-icon")){let e=document.createElement("span");e.className="baseui-breadcrumb-ellipsis-icon",t.prepend(gp(e,"ellipsis","var(--b4)"))}if(!t.querySelector(".visually-hidden")){let e=document.createElement("span");e.className="visually-hidden",e.textContent="More",t.append(e)}}function mp(t){t.classList.add("baseui-breadcrumb-page"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-page"),t.setAttribute("role",t.getAttribute("role")||"link"),t.setAttribute("aria-disabled","true"),t.setAttribute("aria-current","page")}function Ic(t){let e=t.querySelector("ol, ul")||t;t.classList.add("baseui-breadcrumb"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb"),t.setAttribute("aria-label",t.getAttribute("aria-label")||"breadcrumb"),e.classList.add("breadcrumb","baseui-breadcrumb-list"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"breadcrumb-list");for(let r of e.querySelectorAll("[b-breadcrumb-separator], .baseui-breadcrumb-separator"))jc(r);for(let r of e.querySelectorAll("[b-breadcrumb-ellipsis], .baseui-breadcrumb-ellipsis"))Bc(r);for(let r of e.querySelectorAll("[b-breadcrumb-page], .baseui-breadcrumb-page"))mp(r);e.querySelector("[b-breadcrumb-separator], .baseui-breadcrumb-separator")||hp(e).slice(0,-1).forEach(i=>i.after(Oc()));let s=hp(e);return s.forEach((r,i)=>{r.classList.add("baseui-breadcrumb-item"),r.setAttribute("data-slot",r.getAttribute("data-slot")||"breadcrumb-item");for(let a of r.querySelectorAll("a"))a.classList.add("baseui-breadcrumb-link"),a.setAttribute("data-slot",a.getAttribute("data-slot")||"breadcrumb-link");if(i===s.length-1){let a=r.querySelector("[b-breadcrumb-page], .baseui-breadcrumb-page");a?mp(a):(r.classList.add("baseui-breadcrumb-page"),r.setAttribute("aria-current",r.getAttribute("aria-current")||"page"))}}),{destroy:()=>{t.classList.remove("baseui-breadcrumb"),e.classList.remove("breadcrumb","baseui-breadcrumb-list");for(let r of e.querySelectorAll("[b-breadcrumb-separator]"))r.remove()}}}c.register("breadcrumb",{type:"owl",mount:Ic});y();function Rc(t){return t.classList.add("baseui-bubble"),t.getAttribute("role")||t.setAttribute("role","listitem"),{destroy:()=>t.classList.remove("baseui-bubble")}}c.register("bubble",{type:"static",mount:Rc});y();st();te();function $c(t){return[...t.childNodes].filter(e=>e.nodeType===Node.TEXT_NODE&&e.textContent.trim()).map(e=>{let s=document.createElement("span");return s.textContent=e.textContent.trim(),e.replaceWith(s),s})}function Tc(t){let e=t.getAttribute("b-att-icon"),s=t.getAttribute("b-att-icon-position")==="end"?"end":"start",r=!!t.textContent.trim(),i=e&&r?$c(t):[],a=null;return t.classList.add("btn","baseui-button",P[t.getAttribute("b-att-variant")||"default"]||"btn-primary"),M[t.getAttribute("b-att-size")]&&t.classList.add(M[t.getAttribute("b-att-size")]),t.dataset.slot="button",e&&(a=document.createElement("span"),a.setAttribute("b-icon",e),a.dataset.icon=`inline-${s}`,z(a,e,{label:""}),t.insertBefore(a,s==="end"?null:t.firstChild),t.dataset.icon=`inline-${s}`,r||(t.dataset.iconOnly="true",t.classList.add("baseui-button-icon"))),{destroy:()=>{a?.remove();for(let p of i)p.replaceWith(document.createTextNode(p.textContent));t.classList.remove("btn","baseui-button","baseui-button-icon",...Object.values(P),...Object.values(M)),t.removeAttribute("data-slot"),t.removeAttribute("data-icon"),t.removeAttribute("data-icon-only")}}}c.register("button",{type:"static",mount:Tc});y();function Uc(t){let e=t.getAttribute("b-att-orientation")==="vertical",s=t.getAttribute("b-att-size"),r=[...t.querySelectorAll("[b-button-group-separator]")],i=[...t.querySelectorAll("[b-button-group-text]")];return t.classList.add("baseui-button-group",e?"btn-group-vertical":"btn-group"),(s==="sm"||s==="lg")&&t.classList.add(`btn-group-${s}`),t.setAttribute("role",t.getAttribute("role")||"group"),r.forEach(a=>{let p=a.getAttribute("b-att-orientation")==="horizontal"?"horizontal":"vertical";a.classList.add("baseui-button-group-separator",`baseui-button-group-separator-${p}`),a.setAttribute("data-orientation",p),a.setAttribute("role","separator")}),i.forEach(a=>{a.classList.add("baseui-button-group-text")}),{destroy:()=>{t.classList.remove("baseui-button-group","btn-group","btn-group-vertical","btn-group-sm","btn-group-lg")}}}c.register("button-group",{type:"static",mount:Uc});y();var qc=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"});function Mc(t){let e=t.getAttribute("b-att-selected")?new Date(`${t.getAttribute("b-att-selected")}T00:00:00`):new Date,s=Number(t.getAttribute("b-att-month")??e.getMonth()+1)-1,r=Number(t.getAttribute("b-att-year")??e.getFullYear()),i=new Date(r,s,1),a=new Date(r,s+1,0).getDate(),p=i.getDay();t.classList.add("baseui-calendar"),t.querySelector("[b-calendar-grid]")||(t.innerHTML=`
|
|
15
|
+
`);await oa(i,e,{templates:`<templates>${a}</templates>`}),wa.set(wa.current(),{skipStorage:!0})}mountStaticBaseUI(e=document){hc(e),globalThis.BaseUI?.mountAll(e),wa.set(wa.current(),{skipStorage:!0})}};o(Gt,"template","baseui.BlockViewer"),o(Gt,"components",{Button:K,Icon:N,ThemeButton:nt}),o(Gt,"props",{navItems:{type:Array,optional:!0}})});var Ot,yr,vr,Sr,xr,wr,Ar,Er,Cr,Lr,Nr,np=b(()=>{m();Vr();U();Ot={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},yr=class extends n{setup(){this.pwaState=f({open:$(this.props)}),A({pwa:this.pwaState,setPwaOpen:e=>this.setOpen(e)}),R(e=>{T(e)&&(this.pwaState.open=$(e))})}setOpen(e){T(this.props)||(this.pwaState.open=e),this.props.onOpenChange?.(e)}};o(yr,"template","baseui.Pwa"),o(yr,"props",{open:{type:Boolean,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});vr=class extends n{onClick(){this.env.setPwaOpen(!0)}};o(vr,"template","baseui.PwaTrigger"),o(vr,"props",Ot);Sr=class extends n{setup(){this.rootRef=S("root"),G(e=>{if(!e)return;let s=document.activeElement;return Tr(this.rootRef.el)[0]?.focus(),()=>s?.focus?.()},()=>[this.env.pwa.open])}get open(){return this.env.pwa.open}onKeyDown(e){e.key==="Escape"&&this.env.setPwaOpen(!1)}onBackdropClick(e){e.target===this.rootRef.el&&this.env.setPwaOpen(!1)}};o(Sr,"template","baseui.PwaContent"),o(Sr,"props",Ot);xr=class extends n{};o(xr,"template","baseui.PwaHeader"),o(xr,"props",Ot);wr=class extends n{};o(wr,"template","baseui.PwaTitle"),o(wr,"props",Ot);Ar=class extends n{};o(Ar,"template","baseui.PwaDescription"),o(Ar,"props",Ot);Er=class extends n{};o(Er,"template","baseui.PwaBody"),o(Er,"props",Ot);Cr=class extends n{get steps(){return Array.isArray(this.props.steps)?this.props.steps:[]}};o(Cr,"template","baseui.PwaSteps"),o(Cr,"props",{...Ot,steps:{type:Array,optional:!0}});Lr=class extends n{};o(Lr,"template","baseui.PwaFooter"),o(Lr,"props",Ot);Nr=class extends n{onClick(){this.env.setPwaOpen(!1)}};o(Nr,"template","baseui.PwaClose"),o(Nr,"props",Ot)});function cp(t,e){return typeof t=="string"?t:e}function mc(t){return{title:t.submitted&&t.title.trim().length>0&&t.title.trim().length<5?"Bug title must be at least 5 characters.":"",description:t.submitted&&t.description.length>0&&t.description.length<20?"Description must be at least 20 characters.":""}}var pp,lp,Yt,up=b(()=>{m();jr();U();Ya();pp="",lp="";Yt=class extends n{setup(){this.state=f({title:cp(this.props.title,pp),description:cp(this.props.description,lp),submitted:!1})}get classNames(){return W("baseui-form",this.props.className)}get titlePlaceholder(){return this.props.titlePlaceholder||"Login button not working on mobile"}get descriptionPlaceholder(){return this.props.descriptionPlaceholder||"I'm having an issue with the login button on mobile."}get maxDescriptionLength(){return this.props.maxDescriptionLength||100}get descriptionLength(){return this.state.description.length}get errors(){return mc(this.state)}get titleInvalid(){return!!this.errors.title}get descriptionInvalid(){return!!this.errors.description}reset(){this.state.title=pp,this.state.description=lp,this.state.submitted=!1}submit(e){e.preventDefault(),this.state.submitted=!0,!this.titleInvalid&&!this.descriptionInvalid&&this.props.onSubmit?.({title:this.state.title.trim(),description:this.state.description})}};o(Yt,"template","baseui.Form"),o(Yt,"components",{Button:K,Field:Ct,FieldDescription:Nt,FieldError:kt,FieldGroup:Et,FieldLabel:Lt}),o(Yt,"props",{title:{type:String,optional:!0},description:{type:String,optional:!0},titlePlaceholder:{type:String,optional:!0},descriptionPlaceholder:{type:String,optional:!0},maxDescriptionLength:{type:Number,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onSubmit:{type:Function,optional:!0}})});function gc(){return li??(li=import("./runtime/prosemirror-text-editor.js")),li}async function Aa(t){return(await gc()).createProseMirrorTextEditor(t)}var li,ci=b(()=>{});var kr,dp=b(()=>{m();ci();kr=class extends n{setup(){this.editorRef=S("editor"),this.editorHandle=null,this.state=f({content:"",status:"loading",error:""}),Qt(()=>this.load(this.props)),R(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),k(()=>this.mountEditor()),D(()=>this.mountEditor()),Wr(()=>this.destroyEditor())}get classNames(){let e=["baseui-text-editor"];return this.props.className&&e.push(this.props.className),e.join(" ")}get editorLabel(){return this.props.collaborative?"Collaborative rich text editor":"Rich text editor"}shouldReload(e){return e.content!==this.props.content||e.src!==this.props.src}shouldRestartEditor(e){return e.collaborative!==this.props.collaborative||e.room!==this.props.room||e.password!==this.props.password||e.signaling!==this.props.signaling}async load(e){this.destroyEditor(),this.state.status="loading",this.state.error="";let s=e.content??"";if(e.src)try{let r=await fetch(e.src);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);s=await r.text()}catch(r){this.state.status="error",this.state.error=r.message||String(r);return}this.state.content=s,this.state.status="ready"}async mountEditor(){let e=this.editorRef.el;if(!(!e||this.editorHandle||this.state.status!=="ready"))try{this.editorHandle=await Aa({root:e,value:this.state.content,placeholder:this.props.placeholder,collaborative:!!this.props.collaborative,room:this.props.room||"baseui-text-editor",password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(s,r,i)=>{this.state.content=s,this.props.onChange?.(s,r,i)}})}catch(s){this.state.status="error",this.state.error=s.message||String(s)}}destroyEditor(){this.editorHandle?.destroy?.(),this.editorHandle=null}};o(kr,"template","baseui.TextEditor"),o(kr,"props",{content:{type:String,optional:!0},src:{type:String,optional:!0},placeholder:{type:String,optional:!0},collaborative:{type:Boolean,optional:!0},room:{type:String,optional:!0},password:{type:String,optional:!0},signaling:{type:Array,optional:!0},user:{type:Object,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var Dr={};Ca(Dr,{Accordion:()=>Hs,AccordionContent:()=>Ks,AccordionItem:()=>Ws,AccordionTrigger:()=>Tt,Alert:()=>ye,AlertAction:()=>xe,AlertDescription:()=>Se,AlertDialog:()=>ts,AlertDialogAction:()=>ls,AlertDialogCancel:()=>ps,AlertDialogContent:()=>ss,AlertDialogDescription:()=>ns,AlertDialogFooter:()=>rs,AlertDialogHeader:()=>os,AlertDialogMedia:()=>as,AlertDialogTitle:()=>is,AlertDialogTrigger:()=>es,AlertTitle:()=>ve,AspectRatio:()=>sr,Attachment:()=>Mo,AttachmentAction:()=>Ho,AttachmentActions:()=>_o,AttachmentContent:()=>Po,AttachmentDescription:()=>Do,AttachmentDropzone:()=>Vo,AttachmentGroup:()=>Ko,AttachmentMedia:()=>zo,AttachmentTitle:()=>Fo,AttachmentTrigger:()=>Wo,Avatar:()=>Zo,Badge:()=>pt,BlockViewer:()=>Gt,Breadcrumb:()=>Gs,BreadcrumbEllipsis:()=>qt,BreadcrumbItem:()=>Js,BreadcrumbLink:()=>Qs,BreadcrumbList:()=>Ys,BreadcrumbPage:()=>to,BreadcrumbSeparator:()=>Ut,Bubble:()=>or,Button:()=>K,ButtonGroup:()=>ir,ButtonGroupSeparator:()=>nr,ButtonGroupText:()=>pr,Calendar:()=>No,Card:()=>lt,CardBody:()=>ct,CardDescription:()=>ae,CardFooter:()=>oe,CardHeader:()=>se,CardTitle:()=>re,Carousel:()=>Io,CarouselNext:()=>To,CarouselPrevious:()=>$o,CarouselSlide:()=>Ro,Chart:()=>Bo,Checkbox:()=>Te,ClipboardButton:()=>jt,Collapsible:()=>Vs,CollapsibleContent:()=>Xs,CollapsibleTrigger:()=>Zs,Combobox:()=>Oo,Command:()=>jo,ContextMenu:()=>Ps,ContextMenuContent:()=>Ds,ContextMenuItem:()=>_s,ContextMenuTrigger:()=>Fs,DataTable:()=>Kt,DatePicker:()=>ko,Dialog:()=>ue,DialogClose:()=>fe,DialogContent:()=>It,DialogDescription:()=>ge,DialogFooter:()=>he,DialogHeader:()=>be,DialogTitle:()=>me,DialogTrigger:()=>de,Direction:()=>rr,Drawer:()=>cs,DrawerClose:()=>fs,DrawerContent:()=>ds,DrawerDescription:()=>gs,DrawerFooter:()=>hs,DrawerHeader:()=>bs,DrawerTitle:()=>ms,DrawerTrigger:()=>us,DropdownMenu:()=>bt,DropdownMenuCheckboxItem:()=>Rt,DropdownMenuContent:()=>mt,DropdownMenuGroup:()=>Ts,DropdownMenuItem:()=>gt,DropdownMenuLabel:()=>Us,DropdownMenuRadioGroup:()=>qs,DropdownMenuRadioItem:()=>$t,DropdownMenuSeparator:()=>Ms,DropdownMenuShortcut:()=>zs,DropdownMenuSub:()=>ft,DropdownMenuSubContent:()=>yt,DropdownMenuSubTrigger:()=>ot,DropdownMenuTrigger:()=>ht,Empty:()=>we,EmptyContent:()=>Ne,EmptyDescription:()=>Le,EmptyHeader:()=>Ae,EmptyMedia:()=>Ee,EmptyTitle:()=>Ce,Field:()=>Ct,FieldContent:()=>ur,FieldDescription:()=>Nt,FieldError:()=>kt,FieldGroup:()=>Et,FieldLabel:()=>Lt,FieldLegend:()=>cr,FieldSeparator:()=>br,FieldSet:()=>lr,FieldTitle:()=>dr,Form:()=>Yt,HoverCard:()=>Bs,HoverCardContent:()=>Rs,HoverCardTrigger:()=>Is,Icon:()=>N,Input:()=>ie,InputGroup:()=>_e,InputGroupAddon:()=>He,InputGroupButton:()=>We,InputGroupInput:()=>Ve,InputGroupText:()=>Ke,InputGroupTextarea:()=>Ze,InputOtp:()=>Xe,Item:()=>ar,Kbd:()=>Be,Label:()=>hr,Markdown:()=>Zt,MarkdownTree:()=>Xt,MarkdownTreeNode:()=>Fr,Marker:()=>Ie,Menubar:()=>ao,Message:()=>Xo,MessageScroller:()=>Go,NativeSelect:()=>$e,NavigationMenu:()=>oo,NavigationMenuItem:()=>ro,Pagination:()=>eo,PaginationItem:()=>so,Popover:()=>ks,PopoverContent:()=>js,PopoverTrigger:()=>Os,Progress:()=>er,Pwa:()=>yr,PwaBody:()=>Er,PwaClose:()=>Nr,PwaContent:()=>Sr,PwaDescription:()=>Ar,PwaFooter:()=>Lr,PwaHeader:()=>xr,PwaSteps:()=>Cr,PwaTitle:()=>wr,PwaTrigger:()=>vr,Questionnaire:()=>Yo,QuestionnaireNext:()=>tr,QuestionnairePrevious:()=>Qo,QuestionnaireStep:()=>Jo,RadioGroup:()=>Ue,RadioGroupItem:()=>qe,Resizable:()=>Uo,ScrollArea:()=>qo,Select:()=>Ge,SelectContent:()=>Je,SelectItem:()=>Qe,SelectTrigger:()=>Ye,Separator:()=>ke,Sheet:()=>vs,SheetClose:()=>Ls,SheetContent:()=>xs,SheetDescription:()=>Cs,SheetFooter:()=>As,SheetHeader:()=>ws,SheetTitle:()=>Es,SheetTrigger:()=>Ss,Shell:()=>_t,ShellContent:()=>Wt,ShellHeader:()=>wo,ShellMain:()=>xo,ShellNav:()=>So,ShellSidebar:()=>Ht,ShellSidebarHeader:()=>vo,ShellUserMenu:()=>Ao,Sidebar:()=>at,SidebarClose:()=>zt,SidebarContent:()=>St,SidebarFooter:()=>no,SidebarGroup:()=>xt,SidebarGroupAction:()=>Pt,SidebarGroupCollapsible:()=>Ft,SidebarGroupContent:()=>bo,SidebarGroupLabel:()=>wt,SidebarHeader:()=>io,SidebarInput:()=>co,SidebarInset:()=>po,SidebarMenu:()=>it,SidebarMenuAction:()=>Dt,SidebarMenuBadge:()=>mo,SidebarMenuButton:()=>rt,SidebarMenuItem:()=>At,SidebarMenuSkeleton:()=>go,SidebarMenuSub:()=>ho,SidebarMenuSubButton:()=>yo,SidebarMenuSubItem:()=>fo,SidebarProvider:()=>Ur,SidebarRail:()=>lo,SidebarSeparator:()=>uo,SidebarTrigger:()=>Mt,Skeleton:()=>ut,Slider:()=>ze,Spinner:()=>Oe,Switch:()=>Me,TabContent:()=>Bt,TabTrigger:()=>ce,Table:()=>Eo,Tabs:()=>ne,TabsContainer:()=>pe,TabsList:()=>le,TextEditor:()=>kr,Textarea:()=>Re,ThemeButton:()=>nt,Toast:()=>vt,Toggle:()=>mr,ToggleGroup:()=>gr,ToggleGroupItem:()=>fr,Tooltip:()=>$s,Typography:()=>je,createNamedIcon:()=>Ia,findMarkdownTreeNode:()=>xa,iconComponentName:()=>Ja});var Jr=b(()=>{jr();Ai();Ta();Ua();Ei();Li();Ni();Oi();Bi();Ii();Pa();Ri();$i();Ti();Ui();qi();Mi();zi();Pi();Fi();Di();_i();Hi();Wi();Ki();Vi();Zi();Gi();Ji();Qi();Wa();tn();Va();en();on();rn();an();nn();pn();ha();un();dn();bn();hn();mn();gn();fn();yn();vn();Sn();xn();En();Cn();Ln();Nn();kn();On();jn();Bn();In();Rn();$n();Ya();Y();Tn();Un();ei();Pn();Fn();Yn();Jn();ip();np();up();dp()});y();var yi="0.0.5";m();Jr();y();Vr();function fc(t){let{open:e,close:s,destroy:r}=ba(t,{closeSelector:"[b-alert-dialog-cancel], [b-alert-dialog-action], [b-alert-dialog-close]",trapFocus:!0});return t.setAttribute("role","alertdialog"),t.BaseUIAlertDialog={open:e,close:s},{destroy:()=>{r(),delete t.BaseUIAlertDialog}}}c.register("alert-dialog",{type:"owl",mount:fc});y();q();var ui={default:"baseui-alert-default",destructive:"baseui-alert-destructive",info:"baseui-alert-default",success:"alert-success",warning:"alert-warning",danger:"baseui-alert-destructive"};function yc(t){t.classList.add("alert","baseui-alert",ui[t.getAttribute("b-att-variant")||"default"]||ui.default),t.setAttribute("role",t.getAttribute("role")||"alert");let e=null;if(!!t.getAttribute("b-att-dismissible")){if(t.classList.add("alert-dismissible","fade","show"),!t.querySelector('[data-bs-dismiss="alert"]')){let r=document.createElement("button");r.type="button",r.className="btn-close",r.setAttribute("data-bs-dismiss","alert"),r.setAttribute("aria-label","Close"),t.appendChild(r)}e=new(x()).Alert(t)}return{destroy:()=>{e?.dispose(),t.classList.remove("alert","baseui-alert","alert-dismissible","fade","show",...Object.values(ui))}}}c.register("alert",{type:"static",mount:yc});y();q();function vc(t){let e=[...t.querySelectorAll("[b-accordion-item]")],s=t.getAttribute("b-att-multiple")==="true",r=new Map,i=new Map,a=new Map,p=(l,u)=>{let d=l.querySelector("[b-accordion-trigger]");l.setAttribute("b-att-state",u?"open":"closed"),d?.setAttribute("aria-expanded",String(u)),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:u}}))};return t.setAttribute("role","presentation"),e.forEach((l,u)=>{let d=l.querySelector("[b-accordion-trigger]"),h=l.querySelector("[b-accordion-panel]");if(!h)return;let g=h.id||`baseui-accordion-panel-${u}`;h.id=g;let v=l.getAttribute("b-att-state")==="open";h.classList.add("collapse"),v&&h.classList.add("show");let w=new(x()).Collapse(h,{toggle:!1});a.set(l,w);let j=()=>p(l,!0),C=()=>p(l,!1);h.addEventListener("shown.bs.collapse",j),h.addEventListener("hidden.bs.collapse",C),i.set(l,{onShown:j,onHidden:C}),d?.setAttribute("aria-expanded",String(v)),d?.setAttribute("aria-controls",g);let B=()=>{let F=h.classList.contains("show");!s&&!F&&e.forEach(E=>{if(E===l)return;let H=a.get(E),X=E.querySelector("[b-accordion-panel]");H&&X?.classList.contains("show")&&H.hide()}),F?w.hide():w.show()};r.set(l,B),d?.addEventListener("click",B)}),{destroy:()=>{e.forEach(l=>{let u=l.querySelector("[b-accordion-trigger]"),d=l.querySelector("[b-accordion-panel]");u?.removeEventListener("click",r.get(l));let h=i.get(l);d&&h&&(d.removeEventListener("shown.bs.collapse",h.onShown),d.removeEventListener("hidden.bs.collapse",h.onHidden)),a.get(l)?.dispose()}),r.clear(),i.clear(),a.clear()}}}c.register("accordion",{type:"owl",mount:vc});y();function Sc(t){let e=t.getAttribute("b-att-ratio")||`${t.getAttribute("b-att-width")||16} / ${t.getAttribute("b-att-height")||9}`;return t.classList.add("baseui-aspect-ratio"),t.style.setProperty("--baseui-aspect-ratio",e),{destroy:()=>t.classList.remove("baseui-aspect-ratio")}}c.register("aspect-ratio",{type:"static",mount:Sc});y();te();var xc=["idle","uploading","processing","error","done"],wc=["default","sm","xs"],Ac=["content","title","description","actions"];function bp(t,e){t.classList.add(`baseui-attachment-${e}`),t.setAttribute("data-slot",`attachment-${e}`)}function Ec(t){let e=t.querySelector("input[type='file']"),s=t.querySelector("[b-attachment-list]"),r=xc.includes(t.getAttribute("b-att-state"))?t.getAttribute("b-att-state"):"done",i=wc.includes(t.getAttribute("b-att-size"))?t.getAttribute("b-att-size"):"default",a=t.getAttribute("b-att-orientation")==="vertical"?"vertical":"horizontal";t.classList.add("baseui-attachment"),t.classList.add(`baseui-attachment-${r}`,`baseui-attachment-${i}`,`baseui-attachment-${a}`),t.setAttribute("data-state",r),t.setAttribute("data-size",i),t.setAttribute("data-orientation",a),t.setAttribute("data-slot","attachment"),e&&t.classList.add("baseui-attachment-picker"),t.querySelectorAll("[b-attachment-media]").forEach(l=>{let u=l.getAttribute("b-att-variant")==="image"?"image":"icon";bp(l,"media"),l.classList.add(`baseui-attachment-media-${u}`),l.setAttribute("data-variant",u)}),Ac.forEach(l=>t.querySelectorAll(`[b-attachment-${l}]`).forEach(u=>bp(u,l))),t.querySelectorAll("[b-attachment-action]").forEach(l=>{let u=P[l.getAttribute("b-att-variant")]||P.ghost,d=M[l.getAttribute("b-att-size")]||M["icon-xs"];l.classList.add("btn","baseui-button",u,d,"baseui-button-icon","baseui-attachment-action"),l.setAttribute("data-slot","attachment-action"),!l.getAttribute("type")&&l.tagName==="BUTTON"&&l.setAttribute("type","button")}),t.querySelectorAll("[b-attachment-trigger]").forEach(l=>{l.classList.add("baseui-attachment-trigger"),l.setAttribute("data-slot","attachment-trigger"),!l.getAttribute("type")&&l.tagName==="BUTTON"&&l.setAttribute("type","button")}),e?.classList.add("form-control");let p=()=>{s&&(s.innerHTML=[...e.files].map(l=>`<li>${l.name}</li>`).join("")),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:[...e.files]}}))};return e?.addEventListener("change",p),{destroy:()=>e?.removeEventListener("change",p)}}function Cc(t){return t.classList.add("baseui-attachment-group"),t.setAttribute("data-slot","attachment-group"),{destroy:()=>t.classList.remove("baseui-attachment-group")}}function Lc(t){let e=t.querySelector("input[type='file']");t.classList.add("baseui-attachment-dropzone"),t.setAttribute("data-slot","attachment-dropzone");let s=()=>e?.click(),r=u=>{u.preventDefault(),t.classList.add("baseui-attachment-dropzone-dragging")},i=()=>t.classList.remove("baseui-attachment-dropzone-dragging"),a=u=>{u.length&&t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:u}}))},p=u=>{u.preventDefault(),t.classList.remove("baseui-attachment-dropzone-dragging"),a([...u.dataTransfer?.files??[]])},l=()=>{a([...e?.files??[]]),e&&(e.value="")};return t.addEventListener("click",s),t.addEventListener("dragover",r),t.addEventListener("dragleave",i),t.addEventListener("drop",p),e?.addEventListener("change",l),{destroy:()=>{t.removeEventListener("click",s),t.removeEventListener("dragover",r),t.removeEventListener("dragleave",i),t.removeEventListener("drop",p),e?.removeEventListener("change",l)}}}c.register("attachment",{type:"owl",mount:Ec});c.register("attachment-group",{type:"static",mount:Cc});c.register("attachment-dropzone",{type:"static",mount:Lc});y();function Nc(t){t.classList.add("baseui-avatar");let e=t.querySelector("img"),s=t.querySelector("[b-avatar-fallback]");if(e&&s){let r=()=>{e.hidden=!0,s.hidden=!1};return s.hidden=!!e.getAttribute("src"),e.addEventListener("error",r),{destroy:()=>e.removeEventListener("error",r)}}return{}}c.register("avatar",{type:"static",mount:Nc});y();$a();function kc(t){let e=ee[t.getAttribute("b-att-variant")||"secondary"]||ee.secondary;return t.classList.add("badge",e),t.getAttribute("b-att-pill")==="true"&&t.classList.add("rounded-pill"),{destroy:()=>t.classList.remove("badge","rounded-pill",...Object.values(ee))}}c.register("badge",{type:"static",mount:kc});y();st();function hp(t){return[...t.children].filter(e=>!e.matches("[b-breadcrumb-separator], .baseui-breadcrumb-separator"))}function gp(t,e,s){return z(t,e,{size:s}),t}function Oc(){let t=document.createElement("li"),e=document.createElement("span");return t.setAttribute("b-breadcrumb-separator",""),t.setAttribute("data-slot","breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),t.className="baseui-breadcrumb-separator",e.className="baseui-breadcrumb-separator-icon",t.append(gp(e,"chevron-right","var(--b3_5)")),t}function jc(t){t.classList.add("baseui-breadcrumb-separator"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true")}function Bc(t){if(t.classList.add("baseui-breadcrumb-ellipsis"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-ellipsis"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),!t.querySelector(".baseui-icon")){let e=document.createElement("span");e.className="baseui-breadcrumb-ellipsis-icon",t.prepend(gp(e,"ellipsis","var(--b4)"))}if(!t.querySelector(".visually-hidden")){let e=document.createElement("span");e.className="visually-hidden",e.textContent="More",t.append(e)}}function mp(t){t.classList.add("baseui-breadcrumb-page"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-page"),t.setAttribute("role",t.getAttribute("role")||"link"),t.setAttribute("aria-disabled","true"),t.setAttribute("aria-current","page")}function Ic(t){let e=t.querySelector("ol, ul")||t;t.classList.add("baseui-breadcrumb"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb"),t.setAttribute("aria-label",t.getAttribute("aria-label")||"breadcrumb"),e.classList.add("breadcrumb","baseui-breadcrumb-list"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"breadcrumb-list");for(let r of e.querySelectorAll("[b-breadcrumb-separator], .baseui-breadcrumb-separator"))jc(r);for(let r of e.querySelectorAll("[b-breadcrumb-ellipsis], .baseui-breadcrumb-ellipsis"))Bc(r);for(let r of e.querySelectorAll("[b-breadcrumb-page], .baseui-breadcrumb-page"))mp(r);e.querySelector("[b-breadcrumb-separator], .baseui-breadcrumb-separator")||hp(e).slice(0,-1).forEach(i=>i.after(Oc()));let s=hp(e);return s.forEach((r,i)=>{r.classList.add("baseui-breadcrumb-item"),r.setAttribute("data-slot",r.getAttribute("data-slot")||"breadcrumb-item");for(let a of r.querySelectorAll("a"))a.classList.add("baseui-breadcrumb-link"),a.setAttribute("data-slot",a.getAttribute("data-slot")||"breadcrumb-link");if(i===s.length-1){let a=r.querySelector("[b-breadcrumb-page], .baseui-breadcrumb-page");a?mp(a):(r.classList.add("baseui-breadcrumb-page"),r.setAttribute("aria-current",r.getAttribute("aria-current")||"page"))}}),{destroy:()=>{t.classList.remove("baseui-breadcrumb"),e.classList.remove("breadcrumb","baseui-breadcrumb-list");for(let r of e.querySelectorAll("[b-breadcrumb-separator]"))r.remove()}}}c.register("breadcrumb",{type:"owl",mount:Ic});y();function Rc(t){return t.classList.add("baseui-bubble"),t.getAttribute("role")||t.setAttribute("role","listitem"),{destroy:()=>t.classList.remove("baseui-bubble")}}c.register("bubble",{type:"static",mount:Rc});y();st();te();function $c(t){return[...t.childNodes].filter(e=>e.nodeType===Node.TEXT_NODE&&e.textContent.trim()).map(e=>{let s=document.createElement("span");return s.textContent=e.textContent.trim(),e.replaceWith(s),s})}function Tc(t){let e=t.getAttribute("b-att-icon"),s=t.getAttribute("b-att-icon-position")==="end"?"end":"start",r=!!t.textContent.trim(),i=e&&r?$c(t):[],a=null;return t.classList.add("btn","baseui-button",P[t.getAttribute("b-att-variant")||"default"]||"btn-primary"),M[t.getAttribute("b-att-size")]&&t.classList.add(M[t.getAttribute("b-att-size")]),t.dataset.slot="button",e&&(a=document.createElement("span"),a.setAttribute("b-icon",e),a.dataset.icon=`inline-${s}`,z(a,e,{label:""}),t.insertBefore(a,s==="end"?null:t.firstChild),t.dataset.icon=`inline-${s}`,r||(t.dataset.iconOnly="true",t.classList.add("baseui-button-icon"))),{destroy:()=>{a?.remove();for(let p of i)p.replaceWith(document.createTextNode(p.textContent));t.classList.remove("btn","baseui-button","baseui-button-icon",...Object.values(P),...Object.values(M)),t.removeAttribute("data-slot"),t.removeAttribute("data-icon"),t.removeAttribute("data-icon-only")}}}c.register("button",{type:"static",mount:Tc});y();function Uc(t){let e=t.getAttribute("b-att-orientation")==="vertical",s=t.getAttribute("b-att-size"),r=[...t.querySelectorAll("[b-button-group-separator]")],i=[...t.querySelectorAll("[b-button-group-text]")];return t.classList.add("baseui-button-group",e?"btn-group-vertical":"btn-group"),(s==="sm"||s==="lg")&&t.classList.add(`btn-group-${s}`),t.setAttribute("role",t.getAttribute("role")||"group"),r.forEach(a=>{let p=a.getAttribute("b-att-orientation")==="horizontal"?"horizontal":"vertical";a.classList.add("baseui-button-group-separator",`baseui-button-group-separator-${p}`),a.setAttribute("data-orientation",p),a.setAttribute("role","separator")}),i.forEach(a=>{a.classList.add("baseui-button-group-text")}),{destroy:()=>{t.classList.remove("baseui-button-group","btn-group","btn-group-vertical","btn-group-sm","btn-group-lg")}}}c.register("button-group",{type:"static",mount:Uc});y();var qc=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"});function Mc(t){let e=t.getAttribute("b-att-selected")?new Date(`${t.getAttribute("b-att-selected")}T00:00:00`):new Date,s=Number(t.getAttribute("b-att-month")??e.getMonth()+1)-1,r=Number(t.getAttribute("b-att-year")??e.getFullYear()),i=new Date(r,s,1),a=new Date(r,s+1,0).getDate(),p=i.getDay();t.classList.add("baseui-calendar"),t.querySelector("[b-calendar-grid]")||(t.innerHTML=`
|
|
16
16
|
<div class="baseui-calendar__header">${qc.format(i)}</div>
|
|
17
17
|
<div class="baseui-calendar__weekdays">${["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(d=>`<span>${d}</span>`).join("")}</div>
|
|
18
18
|
<div b-calendar-grid class="baseui-calendar__grid"></div>
|