@devschile/chucao 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -331
- package/dist/chucao/chucao.css +1 -1
- package/dist/chucao/chucao.esm.js +1 -1
- package/dist/chucao/{p-2eeff869.entry.js → p-035c479d.entry.js} +2 -2
- package/dist/chucao/p-CuWheDah.js +3 -0
- package/dist/{esm/index-QBEhw78y.js.map → chucao/p-CuWheDah.js.map} +1 -1
- package/dist/cjs/ch-badge_5.cjs.entry.js +1 -1
- package/dist/cjs/chucao.cjs.js +1 -1
- package/dist/cjs/{index-Do8JpTKQ.js → index-Tiana_FZ.js} +3 -3
- package/dist/cjs/index-Tiana_FZ.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/components/ch-badge.js +1 -1
- package/dist/components/ch-button.js +1 -1
- package/dist/components/ch-card.js +1 -1
- package/dist/components/ch-input.js +1 -1
- package/dist/components/ch-select.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-DXg-7eP0.js +2 -0
- package/dist/components/p-DXg-7eP0.js.map +1 -0
- package/dist/esm/ch-badge_5.entry.js +1 -1
- package/dist/esm/chucao.js +2 -2
- package/dist/esm/{index-QBEhw78y.js → index-CuWheDah.js} +3 -3
- package/dist/esm/index-CuWheDah.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/package.json +1 -1
- package/dist/chucao/p-QBEhw78y.js +0 -3
- package/dist/chucao/p-QBEhw78y.js.map +0 -1
- package/dist/cjs/index-Do8JpTKQ.js.map +0 -1
- package/dist/components/p-BImgfbXx.js +0 -2
- package/dist/components/p-BImgfbXx.js.map +0 -1
- /package/dist/chucao/{p-2eeff869.entry.js.map → p-035c479d.entry.js.map} +0 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Chucao
|
|
4
4
|
|
|
5
|
-
<img src="chucao-
|
|
5
|
+
<img src="chucao-irmirx.png" width="250">
|
|
6
6
|
|
|
7
7
|
Kit de marca + sistema de diseño web de devsChile, listo para reusar en
|
|
8
8
|
proyectos nuevos. Pensado para copiarse y usarse directo, sin depender de
|
|
@@ -14,336 +14,32 @@ piezas externas.
|
|
|
14
14
|
de favicon, renderizados
|
|
15
15
|
- rama `docs`, publicada con GitHub Pages
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
[
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
pnpm install
|
|
45
|
-
pnpm start
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
To build the components for production:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
pnpm run build
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
To run the component tests:
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
pnpm test
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
To run the tests with a coverage report:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
pnpm run test:coverage
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Component tests live next to each component as `<component>.plugin.spec.tsx`
|
|
67
|
-
(e.g. `src/components/ch-badge/ch-badge.plugin.spec.tsx`) and import the
|
|
68
|
-
component's source file directly (e.g. `import './ch-badge.tsx';`). This uses
|
|
69
|
-
`@stencil/vitest`'s experimental `stencilVitestPlugin`, which compiles each
|
|
70
|
-
component on-the-fly instead of testing against pre-built `dist` bundles —
|
|
71
|
-
that's what makes the coverage report in `pnpm run test:coverage` reflect
|
|
72
|
-
real, per-component line/branch/function coverage. Testing against pre-built
|
|
73
|
-
bundles (the previous approach) doesn't give Vitest a way to instrument
|
|
74
|
-
individual source files, so coverage numbers were always 0%; see the
|
|
75
|
-
[`@stencil/vitest` README](https://github.com/stenciljs/vitest#stencil-vitest-plugin)
|
|
76
|
-
for more details, including its known limitation around cross-file class
|
|
77
|
-
inheritance.
|
|
78
|
-
|
|
79
|
-
Coverage uses the `istanbul` provider rather than the default `v8` provider,
|
|
80
|
-
and excludes the generated `constructor` method
|
|
81
|
-
(`coverage.ignoreClassMethods` in `vitest.config.mts`). The `v8` provider maps
|
|
82
|
-
coverage from compiled bytecode back to source via source maps, which
|
|
83
|
-
misattributed an untestable, framework-generated constructor branch (used
|
|
84
|
-
only for server-side hydration) back onto each component's `@Component(...)`
|
|
85
|
-
decorator, showing a bogus "else path not taken" there. `istanbul` instruments
|
|
86
|
-
the original source directly, so the branch numbers now reflect real,
|
|
87
|
-
testable code paths only.
|
|
88
|
-
|
|
89
|
-
Need help with Stencil itself? Check out the
|
|
90
|
-
[docs](https://stenciljs.com/docs/my-first-component).
|
|
91
|
-
|
|
92
|
-
### Project structure
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
src/
|
|
96
|
-
├── components/ Stencil components (one folder per component)
|
|
97
|
-
├── global/ Global stylesheet (utility classes & CSS variables), bundled into every build
|
|
98
|
-
├── tokens/ Design tokens generated by toki — do not edit by hand
|
|
99
|
-
└── index.ts Public entry point (re-exports tokens)
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### Design tokens
|
|
103
|
-
|
|
104
|
-
The files under [`src/tokens`](src/tokens) (`tokens.ts`, `tokens.css`,
|
|
105
|
-
`tokens.d.ts`, `types.ts`) are generated from
|
|
106
|
-
[`chucao-tokens.json`](chucao-tokens.json) by
|
|
107
|
-
[toki](https://github.com/devschile/toki) — **do not edit them by hand**.
|
|
108
|
-
[`src/global/chucao.css`](src/global/chucao.css) (the file bundled into every
|
|
109
|
-
build via `globalStyle`) imports `tokens.css` directly, so there's a single
|
|
110
|
-
source of truth for the generated `:root` custom properties. See
|
|
111
|
-
[`src/tokens/README.md`](src/tokens/README.md) for their naming conventions,
|
|
112
|
-
CSS custom properties and TypeScript usage.
|
|
113
|
-
|
|
114
|
-
### Naming & API conventions
|
|
115
|
-
|
|
116
|
-
When creating new component tags, avoid using `chucao` or `stencil` alone as
|
|
117
|
-
the tag name; instead prefix component tags with `ch-` (e.g. `ch-input`) so
|
|
118
|
-
they don't collide with other libraries on the page.
|
|
119
|
-
|
|
120
|
-
Beyond tag naming, follow these conventions — already used consistently
|
|
121
|
-
across `ch-badge`, `ch-button`, `ch-card`, `ch-input`, and `ch-select` — so
|
|
122
|
-
future components stay consistent as the library grows. See
|
|
123
|
-
[`docs/v1-readiness.md`](docs/v1-readiness.md) for the full readiness
|
|
124
|
-
assessment that identified and documented these conventions.
|
|
125
|
-
|
|
126
|
-
- **Custom events**: prefix with `ch` and use camelCase (`chClick`,
|
|
127
|
-
`chChange`, `chInput`), mirroring the native event they wrap (`click`,
|
|
128
|
-
`change`, `input`).
|
|
129
|
-
- **Variant props**: type them as a string union (e.g.
|
|
130
|
-
`'primary' | 'secondary'`) and export the union as a named type alongside
|
|
131
|
-
the component class (e.g. `ChButtonVariant`, `ChBadgeVariant`), so
|
|
132
|
-
consumers can import and reuse the type.
|
|
133
|
-
- **Standard interactive-component props**: any component that wraps a
|
|
134
|
-
native form control should expose `disabled` (`@Prop() disabled = false;`),
|
|
135
|
-
`required` (`@Prop() required = false;`), `name` (`@Prop() name?: string;`),
|
|
136
|
-
and, when it holds a value, `value` as `@Prop({ mutable: true }) value = ''`
|
|
137
|
-
— reflect each prop straight onto the native element (e.g.
|
|
138
|
-
`<button disabled={this.disabled}>`, `<input disabled={this.disabled} required={this.required} />`).
|
|
139
|
-
This is the pattern `ch-input` and `ch-select` already follow, and that
|
|
140
|
-
`ch-button` was updated to match.
|
|
141
|
-
- **Accessibility**: prefer native, keyboard-accessible elements
|
|
142
|
-
(`<button>`, `<input>`, `<select>`) inside the shadow root instead of
|
|
143
|
-
reimplementing their semantics — this is what gives `ch-button`,
|
|
144
|
-
`ch-input`, and `ch-select` working Tab/Space/Enter navigation for free.
|
|
145
|
-
Because `aria-*` attributes set on the custom element host aren't
|
|
146
|
-
automatically forwarded into the shadow DOM, components that need a
|
|
147
|
-
label expose it explicitly: `ch-input`/`ch-select` accept a `label` prop
|
|
148
|
-
rendered as a `<label>` associated via a generated `id`/`for` pair, and
|
|
149
|
-
`ch-button` accepts a `label` prop applied as `aria-label` on the native
|
|
150
|
-
`<button>` (for icon-only buttons). Interactive elements must also keep a
|
|
151
|
-
visible `:focus-visible` style (see `ch-button.css`) so keyboard users can
|
|
152
|
-
see where focus is.
|
|
153
|
-
|
|
154
|
-
### Using this library
|
|
155
|
-
|
|
156
|
-
There are two strategies to consume Stencil component libraries published to
|
|
157
|
-
npm. You can read more about them in the
|
|
158
|
-
[Stencil docs](https://stenciljs.com/docs/publishing).
|
|
159
|
-
|
|
160
|
-
#### Lazy loading
|
|
161
|
-
|
|
162
|
-
If your project is built with the [`dist`](https://stenciljs.com/docs/distribution)
|
|
163
|
-
output target, import a small bootstrap script that registers all components
|
|
164
|
-
and loads individual component scripts lazily:
|
|
165
|
-
|
|
166
|
-
```html
|
|
167
|
-
<script type="module" src="https://unpkg.com/@devschile/chucao"></script>
|
|
168
|
-
<!--
|
|
169
|
-
To avoid unpkg.com redirects to the actual file, you can also directly import:
|
|
170
|
-
https://unpkg.com/@devschile/chucao@1.0.0/dist/chucao/chucao.esm.js
|
|
171
|
-
-->
|
|
172
|
-
<ch-button>Click me</ch-button>
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
You can also import the script as part of your `node_modules` in your
|
|
176
|
-
application's entry file:
|
|
177
|
-
|
|
178
|
-
```tsx
|
|
179
|
-
import '@devschile/chucao/dist/chucao/chucao.esm.js';
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
#### Standalone
|
|
183
|
-
|
|
184
|
-
If you'd rather import components individually as plain Web Components (e.g.
|
|
185
|
-
in a Svelte/SvelteKit app, which has first-class custom-elements support and
|
|
186
|
-
needs no extra wrapper package), use the
|
|
187
|
-
[`dist-custom-elements`](https://stenciljs.com/docs/custom-elements) output
|
|
188
|
-
target:
|
|
189
|
-
|
|
190
|
-
```tsx
|
|
191
|
-
import '@devschile/chucao/ch-button';
|
|
192
|
-
|
|
193
|
-
function App() {
|
|
194
|
-
return (
|
|
195
|
-
<div>
|
|
196
|
-
<ch-button>Click me</ch-button>
|
|
197
|
-
</div>
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export default App;
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
### Framework wrappers
|
|
205
|
-
|
|
206
|
-
In addition to the framework-agnostic Web Components above, this library
|
|
207
|
-
ships dedicated wrapper packages so components feel native in React and Vue.
|
|
208
|
-
|
|
209
|
-
#### React
|
|
210
|
-
|
|
211
|
-
Components are wrapped with
|
|
212
|
-
[`@stencil/react-output-target`](https://www.npmjs.com/package/@stencil/react-output-target),
|
|
213
|
-
built to `dist-react/` and exposed as `@devschile/chucao/react`. Install the
|
|
214
|
-
runtime peer dependency in your React app:
|
|
215
|
-
|
|
216
|
-
```bash
|
|
217
|
-
pnpm install @stencil/react-output-target
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
```tsx
|
|
221
|
-
import { ChButton } from '@devschile/chucao/react';
|
|
222
|
-
|
|
223
|
-
function App() {
|
|
224
|
-
return <ChButton>Click me</ChButton>;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
export default App;
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
#### Vue
|
|
231
|
-
|
|
232
|
-
Components are wrapped with
|
|
233
|
-
[`@stencil/vue-output-target`](https://www.npmjs.com/package/@stencil/vue-output-target),
|
|
234
|
-
built to `dist-vue/` and exposed as `@devschile/chucao/vue`. Install the
|
|
235
|
-
runtime peer dependency in your Vue app:
|
|
236
|
-
|
|
237
|
-
```bash
|
|
238
|
-
pnpm install @stencil/vue-output-target
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
```vue
|
|
242
|
-
<script setup lang="ts">
|
|
243
|
-
import { ChButton } from '@devschile/chucao/vue';
|
|
244
|
-
</script>
|
|
245
|
-
|
|
246
|
-
<template>
|
|
247
|
-
<ChButton>Click me</ChButton>
|
|
248
|
-
</template>
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
The Vue wrappers automatically register their underlying custom elements on
|
|
252
|
-
import — no separate `@devschile/chucao/loader` import is required.
|
|
253
|
-
|
|
254
|
-
#### Svelte / SvelteKit
|
|
255
|
-
|
|
256
|
-
Svelte doesn't need a dedicated wrapper package — it has first-class support
|
|
257
|
-
for custom elements, so the standalone approach above (importing from
|
|
258
|
-
[`dist-custom-elements`](https://stenciljs.com/docs/custom-elements)) works
|
|
259
|
-
directly:
|
|
260
|
-
|
|
261
|
-
```svelte
|
|
262
|
-
<script lang="ts">
|
|
263
|
-
import '@devschile/chucao/ch-button';
|
|
264
|
-
</script>
|
|
265
|
-
|
|
266
|
-
<ch-button>Click me</ch-button>
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
In SvelteKit, guard the import so it only runs in the browser (custom
|
|
270
|
-
elements rely on the DOM), e.g. inside `onMount` or a `+layout.ts` with
|
|
271
|
-
`browser` from `$app/environment`.
|
|
272
|
-
|
|
273
|
-
## Qué hay en `assets/`
|
|
274
|
-
|
|
275
|
-
```
|
|
276
|
-
assets/
|
|
277
|
-
├── brand/
|
|
278
|
-
│ ├── huemul-icono.png El huemul solo, full color (600×663)
|
|
279
|
-
│ ├── huemul-icono.svg Igual, vector real
|
|
280
|
-
│ ├── huemul-icono-contorno.svg El huemul + contorno blanco, para fondo oscuro, vector real
|
|
281
|
-
│ ├── huemul-icono-trazo.svg Solo el trazo, sin relleno, vector real (extra, no es
|
|
282
|
-
│ │ una de las 3 variantes oficiales de DESIGN.md)
|
|
283
|
-
│ ├── huemul-icono-blanco.png El huemul solo, monocromo blanco (593×665)
|
|
284
|
-
│ ├── huemul-icono-blanco.svg Igual, ver nota abajo sobre este archivo
|
|
285
|
-
│ ├── devschile-wordmark.png "<devschile/>", solo texto (639×153)
|
|
286
|
-
│ └── devschile-wordmark.svg Igual, vector real
|
|
287
|
-
│
|
|
288
|
-
└── favicon/
|
|
289
|
-
├── favicon.ico Multi-resolución (16/32/48), navegadores viejos
|
|
290
|
-
├── favicon-16x16.png
|
|
291
|
-
├── favicon-32x32.png
|
|
292
|
-
├── favicon-48x48.png
|
|
293
|
-
├── apple-touch-icon.png 180×180
|
|
294
|
-
├── android-chrome-192x192.png
|
|
295
|
-
├── android-chrome-512x512.png
|
|
296
|
-
├── favicon.svg
|
|
297
|
-
├── site.webmanifest
|
|
298
|
-
└── huemul-icono-cuadrado.png Base cuadrada (663×663, con relleno
|
|
299
|
-
transparente) sin comprimir — fuente
|
|
300
|
-
limpia para generar otros tamaños
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
Los nombres en `assets/brand/` coinciden a propósito con las rutas que ya usa
|
|
304
|
-
la tabla de `DESIGN.md` (`assets/brand/huemul-icono.png`, etc.), así que el
|
|
305
|
-
markdown no necesita ningún ajuste.
|
|
306
|
-
|
|
307
|
-
### ⚠️ Sobre `huemul-icono-blanco.svg`
|
|
308
|
-
|
|
309
|
-
Es el único `.svg` que sigue siendo _placeholder_: el PNG original embebido tal
|
|
310
|
-
cual dentro de un contenedor `<svg><image href="data:image/png;base64,...">`.
|
|
311
|
-
Sirve para cualquier lugar que pida la extensión `.svg`, pero no es un _path_
|
|
312
|
-
editable ni escala con nitidez real ya que sigue siendo un _raster_.
|
|
313
|
-
|
|
314
|
-
El resto de los `.svg` de `assets/brand/` (`huemul-icono`,
|
|
315
|
-
`huemul-icono-contorno`, `huemul-icono-trazo`, `devschile-wordmark`) **son
|
|
316
|
-
vectorizados reales**, con paths editables.
|
|
317
|
-
Si consigues la variante monocroma blanca en vector, reemplaza
|
|
318
|
-
`huemul-icono-blanco.svg` con eso y esta nota deja de aplicar.
|
|
319
|
-
|
|
320
|
-
### Uso rápido del favicon
|
|
321
|
-
|
|
322
|
-
```html
|
|
323
|
-
<link rel="icon" href="/favicon/favicon.ico" sizes="any" />
|
|
324
|
-
<link rel="icon" type="image/svg+xml" href="/favicon/favicon.svg" />
|
|
325
|
-
<link rel="apple-touch-icon" href="/favicon/apple-touch-icon.png" />
|
|
326
|
-
<link rel="manifest" href="/favicon/site.webmanifest" />
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
## Licencia de los assets de marca
|
|
330
|
-
|
|
331
|
-
Los archivos de `assets/brand/` reproducen el mismo logo oficial de devsChile que está en
|
|
332
|
-
[devschile/media-press](https://github.com/devschile/media-press), bajo
|
|
333
|
-
[CC BY-NC-ND 4.0](http://creativecommons.org/licenses/by-nc-nd/4.0/):
|
|
334
|
-
**atribución, no comercial, sin derivados**. Los PNG son copias directas sin
|
|
335
|
-
modificar, los `.svg` vectoriales (todos salvo `huemul-icono-blanco.svg`) son
|
|
336
|
-
el mismo diseño exportado con paths reales, y el set de favicon es una
|
|
337
|
-
redimensión del icono. Nada cambia el color, la forma ni el trazo del
|
|
338
|
-
isotipo, así que todos caen bajo la misma licencia.
|
|
339
|
-
|
|
340
|
-
Para proyectos de la propia comunidad devsChile esto ya está cubierto (ver
|
|
341
|
-
"Reglas de uso" en `DESIGN.md`). Para cualquier uso comercial, o para
|
|
342
|
-
modificar el logo más allá de lo que hay acá, se necesita permiso explícito de
|
|
343
|
-
los administradores de devsChile. El imagotipo combinado, la versión
|
|
344
|
-
vectorial (`.ai`) y la documentación oficial (guía de estilo, guía de uso,
|
|
345
|
-
troquel de stickers) no se incluyen acá: están en
|
|
346
|
-
[devschile/media-press](https://github.com/devschile/media-press).
|
|
17
|
+
## Qué contiene este repo
|
|
18
|
+
|
|
19
|
+
- **La identidad de marca y el sistema de diseño web**, documentados en
|
|
20
|
+
[`DESIGN.md`](DESIGN.md) — la referencia completa que se usó construyendo
|
|
21
|
+
[pegas.devschile.cl](https://pegas.devschile.cl) y
|
|
22
|
+
[semanario.devschile.cl](https://semanario.devschile.cl). Este proyecto
|
|
23
|
+
agrega los archivos de imagen reales que `DESIGN.md` describe pero no traía.
|
|
24
|
+
- **Los assets de marca** (isotipo, logotipo, favicons) en [`assets/`](assets/)
|
|
25
|
+
— inventario, uso y licencia en [`docs/assets.md`](docs/assets.md).
|
|
26
|
+
- **Una librería de Web Components** framework-agnostic hecha con
|
|
27
|
+
[StencilJS](https://stenciljs.com), publicada en npm como
|
|
28
|
+
`@devschile/chucao` — desarrollo y convenciones en
|
|
29
|
+
[`docs/components.md`](docs/components.md), consumo en
|
|
30
|
+
[`docs/using-the-library.md`](docs/using-the-library.md).
|
|
31
|
+
|
|
32
|
+
## Documentación
|
|
33
|
+
|
|
34
|
+
| Documento | Idioma | Contenido |
|
|
35
|
+
| -------------------------------------------------------- | ------- | ------------------------------------------------------------------------------ |
|
|
36
|
+
| [`DESIGN.md`](DESIGN.md) | Español | Identidad de marca + sistema de diseño web |
|
|
37
|
+
| [`docs/assets.md`](docs/assets.md) | Español | Inventario de `assets/`, uso del favicon, licencia |
|
|
38
|
+
| [`docs/components.md`](docs/components.md) | English | Desarrollo de la librería StencilJS: estructura, tokens, convenciones |
|
|
39
|
+
| [`docs/using-the-library.md`](docs/using-the-library.md) | English | Cómo consumir `@devschile/chucao` (lazy loading, standalone, React/Vue/Svelte) |
|
|
40
|
+
| [`docs/releasing.md`](docs/releasing.md) | English | Cómo publicar releases y desplegar la librería al CDN |
|
|
41
|
+
| [`docs/testing.md`](docs/testing.md) | English | Testing y cobertura de los componentes |
|
|
42
|
+
| [`docs/storybook.md`](docs/storybook.md) | English | Evaluación de desplegar Storybook en el CDN (no adoptado) |
|
|
347
43
|
|
|
348
44
|
## Cómo reusar esto en un proyecto nuevo
|
|
349
45
|
|
package/dist/chucao/chucao.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
:root{--color-background-base:#100a1c;--color-background-top-glow:#201e40;--color-background-bottom-glow:#261226;--color-surface-default:rgba(32, 30, 64, 0.6);--color-surface-hover:rgba(45, 212, 191, 0.08);--color-border-default:rgba(255, 255, 255, 0.08);--color-border-hover:rgba(45, 212, 191, 0.3);--color-accent-default:#2dd4bf;--color-accent-hover:#5ee8d4;--color-status-positive:#4ade80;--color-status-positive-background:rgba(34, 197, 94, 0.18);--color-status-warning:#f87171;--color-status-warning-background:rgba(248, 113, 113, 0.15);--color-text-primary:#ffffff;--color-text-secondary:rgba(255, 255, 255, 0.55);--color-brand-huemul-dark:#85422b;--color-brand-huemul-light:#b45b38;--color-brand-stroke:#1d1d1b;--typography-body:Fira Sans, Droid Sans, Helvetica Neue, sans-serif;--typography-heading:Inconsolata, monospace;--spacing-radius:6px;--layout-max-width:68rem}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:400;font-display:swap;src:url('
|
|
1
|
+
:root{--color-background-base:#100a1c;--color-background-top-glow:#201e40;--color-background-bottom-glow:#261226;--color-surface-default:rgba(32, 30, 64, 0.6);--color-surface-hover:rgba(45, 212, 191, 0.08);--color-border-default:rgba(255, 255, 255, 0.08);--color-border-hover:rgba(45, 212, 191, 0.3);--color-accent-default:#2dd4bf;--color-accent-hover:#5ee8d4;--color-status-positive:#4ade80;--color-status-positive-background:rgba(34, 197, 94, 0.18);--color-status-warning:#f87171;--color-status-warning-background:rgba(248, 113, 113, 0.15);--color-text-primary:#ffffff;--color-text-secondary:rgba(255, 255, 255, 0.55);--color-brand-huemul-dark:#85422b;--color-brand-huemul-light:#b45b38;--color-brand-stroke:#1d1d1b;--typography-body:Fira Sans, Droid Sans, Helvetica Neue, sans-serif;--typography-heading:Inconsolata, monospace;--spacing-radius:6px;--layout-max-width:68rem}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-400-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:600;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-600-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:700;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-700-normal.woff2') format('woff2')}@font-face{font-family:'Inconsolata';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/inconsolata-latin-400-normal.woff2') format('woff2')}:root{--bg:var(--color-background-base);--bg-gradient:radial-gradient(50% 30% ellipse at center top, var(--color-background-top-glow) 0%, rgba(0, 0, 0, 0) 100%),
|
|
2
2
|
radial-gradient(60% 50% ellipse at center bottom, var(--color-background-bottom-glow) 0%, var(--color-background-base) 100%);--surface:var(--color-surface-default);--surface-hover:var(--color-surface-hover);--border:var(--color-border-default);--border-hover:var(--color-border-hover);--text:var(--color-text-primary);--text-muted:var(--color-text-secondary);--accent:var(--color-accent-default);--accent-hover:var(--color-accent-hover);--font-body:var(--typography-body);--font-heading:var(--typography-heading);--radius:var(--spacing-radius)}body{font-family:var(--font-body)}.ch-container{width:100%;max-width:var(--layout-max-width);margin-inline:auto}.ch-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.ch-flex{display:flex}.ch-flex-col{display:flex;flex-direction:column}.ch-items-center{align-items:center}.ch-justify-center{justify-content:center}.ch-justify-between{justify-content:space-between}.ch-gap-sm{gap:0.5rem}.ch-gap-md{gap:1rem}.ch-text-center{text-align:center}.ch-text-primary{color:var(--text)}.ch-text-muted{color:var(--text-muted)}.ch-text-accent{color:var(--accent)}.ch-heading{font-family:var(--font-heading)}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,g as a,b as r}from"./p-
|
|
1
|
+
import{p as e,g as a,b as r}from"./p-CuWheDah.js";export{s as setNonce}from"./p-CuWheDah.js";var t=()=>{const a=import.meta.url;const r={};if(a!==""){r.resourcesUrl=new URL(".",a).href}return e(r)};t().then((async e=>{await a();return r([["p-035c479d",[[769,"ch-badge",{variant:[1]}],[769,"ch-button",{variant:[1],disabled:[4],label:[1]}],[257,"ch-card"],[513,"ch-input",{label:[1],type:[1],value:[1025],placeholder:[1],name:[1],disabled:[4],required:[4]}],[513,"ch-select",{label:[1],options:[16],value:[1025],placeholder:[1],name:[1],disabled:[4],required:[4]}]]]],e)}));
|
|
2
2
|
//# sourceMappingURL=chucao.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,h as r,H as t,c as a}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,h as r,H as t,c as a}from"./p-CuWheDah.js";const o=()=>`:host{display:inline-block}.badge{display:inline-block;padding:0.18rem 0.6rem;border-radius:999px;font-size:0.68rem;font-weight:600;text-transform:uppercase;letter-spacing:0.03em}.badge--default{background:var(--color-surface-hover);color:var(--accent)}.badge--positive{background:var(--color-status-positive-background);color:var(--color-status-positive)}.badge--warning{background:var(--color-status-warning-background);color:var(--color-status-warning)}`;const s=class{constructor(r){e(this,r)}variant="default";render(){return r(t,{key:"9bac1191887568872ad75b1eec3a6084310253db"},r("span",{key:"fae2007c430f102f8ad4e0cc7d97c606dde69eed",class:{badge:true,[`badge--${this.variant}`]:true}},r("slot",{key:"56913dac3a8c18e76a419c22c27c69ca1adc8cc0"})))}};s.style=o();const i=()=>`:host{display:inline-block}.btn{display:inline-flex;align-items:center;gap:0.35rem;border:none;cursor:pointer;font-family:inherit;font-size:inherit}.btn:disabled{opacity:0.5;cursor:not-allowed}.btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.btn--primary{background-color:var(--accent);color:#06210f;font-weight:700;padding:0.25rem 0.8rem;border-radius:999px;transition:background-color 0.2s, transform 0.15s}.btn--primary:hover{background-color:var(--accent-hover);transform:translateY(-1px)}.btn--secondary{background-color:transparent;color:var(--text);font-weight:700;padding:0.25rem 0.8rem;border-radius:999px;border:1px solid var(--border);transition:border-color 0.2s, background-color 0.2s, transform 0.15s}.btn--secondary:hover{border-color:var(--border-hover);background-color:var(--surface-hover);transform:translateY(-1px)}`;const c=class{constructor(r){e(this,r);this.chClick=a(this,"chClick")}variant="primary";disabled=false;label;chClick;handleClick=e=>{this.chClick.emit(e)};render(){return r(t,{key:"ac7192a829924909b5068272786a301ae94f722c"},r("button",{key:"74e32d6dcc873224e48101b13019df73aeac45c9",class:{btn:true,[`btn--${this.variant}`]:true},type:"button",disabled:this.disabled,"aria-label":this.label,onClick:this.handleClick},r("slot",{key:"2aee1cf56fec308e43d2abce2af9752fe7bc6f47"})))}};c.style=i();const d=()=>`:host{display:block}::slotted(p){color:var(--text-muted)}.card{color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.35rem 1.5rem;backdrop-filter:blur(10px);position:relative;overflow:hidden;transition:border-color 0.2s, transform 0.15s, box-shadow 0.2s}.card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--accent);opacity:0;transition:opacity 0.2s}.card:hover{border-color:var(--border-hover);transform:translateX(2px);box-shadow:0 4px 20px rgba(45, 212, 191, 0.06)}.card:hover::before{opacity:1}`;const n=class{constructor(r){e(this,r)}render(){return r(t,{key:"e9685d92d3ffe08fb37088c0743534fd2701ecbb"},r("div",{key:"98317e248251b8d23baea9dd3810fc94953dabc4",class:"card"},r("slot",{key:"842e2fe5f72c74f1a14f20957e2edfd882b71edc"})))}};n.style=d();const l=()=>`:host{display:inline-block;width:100%}.label{display:block;margin-bottom:0.35rem;font-size:0.85rem;font-weight:600;color:var(--text)}.input{box-sizing:border-box;width:100%;padding:0.8rem 1.25rem;border-radius:var(--radius);border:1px solid var(--border);background:var(--surface);color:var(--text);backdrop-filter:blur(10px);font-family:inherit;font-size:inherit;transition:border-color 0.2s, box-shadow 0.2s}.input::placeholder{color:var(--text-muted)}.input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(45, 212, 191, 0.12);outline:none}.input:disabled{opacity:0.5;cursor:not-allowed}`;let b=0;const h=class{constructor(r){e(this,r);this.chInput=a(this,"chInput");this.chChange=a(this,"chChange")}inputId=`ch-input-${++b}`;label;type="text";value="";placeholder;name;disabled=false;required=false;chInput;chChange;handleInput=e=>{this.value=e.target.value;this.chInput.emit(this.value)};handleChange=e=>{this.value=e.target.value;this.chChange.emit(this.value)};render(){return r(t,{key:"83f68aa09efcfcd544012ffde27f116c122ba215"},this.label&&r("label",{key:"d8ca4d52450a024991a3c8f22876483d2031593c",class:"label",htmlFor:this.inputId},this.label),r("input",{key:"fe8c7ce352397b8b0401226501039fc87e8cef57",id:this.label?this.inputId:undefined,class:"input",type:this.type,name:this.name,placeholder:this.placeholder,disabled:this.disabled,required:this.required,value:this.value,onInput:this.handleInput,onChange:this.handleChange}))}};h.style=l();const u=()=>`:host{display:inline-block;width:100%}.label{display:block;margin-bottom:0.35rem;font-size:0.85rem;font-weight:600;color:var(--text)}.select{box-sizing:border-box;width:100%;padding:0.8rem 1.25rem;border-radius:var(--radius);border:1px solid var(--border);background:var(--surface);color:var(--text);backdrop-filter:blur(10px);font-family:inherit;font-size:inherit;cursor:pointer;transition:border-color 0.2s, box-shadow 0.2s}.select:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(45, 212, 191, 0.12);outline:none}.select:disabled{opacity:0.5;cursor:not-allowed}.select option{background:var(--bg);color:var(--text)}`;let f=0;const p=class{constructor(r){e(this,r);this.chChange=a(this,"chChange")}selectId=`ch-select-${++f}`;label;options=[];value;placeholder;name;disabled=false;required=false;chChange;handleChange=e=>{this.value=e.target.value;this.chChange.emit(this.value)};render(){return r(t,{key:"57cb1bebbc8ab5ddc01ca1d568cd6871ad6591a2"},this.label&&r("label",{key:"4f89a32b4dea704c6e4f59d7c070281bffbe6dae",class:"label",htmlFor:this.selectId},this.label),r("select",{key:"f4d5badf61e6d72f3f1c9383a0f1b4093303acd3",id:this.label?this.selectId:undefined,class:"select",name:this.name,disabled:this.disabled,required:this.required,onChange:this.handleChange},this.placeholder&&r("option",{key:"241c5db4c8947c8b6bb0ad855e71e99b7315eb73",value:"",disabled:true,hidden:true,selected:!this.value},this.placeholder),this.options.map((e=>r("option",{value:e.value,disabled:e.disabled,selected:e.value===this.value},e.label)))))}};p.style=u();export{s as ch_badge,c as ch_button,n as ch_card,h as ch_input,p as ch_select};
|
|
2
|
+
//# sourceMappingURL=p-035c479d.entry.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const e="chucao";const t={hotModuleReplacement:false,hydratedSelectorName:"hydrated",lazyLoad:true,prop:true,propChangeCallback:false,updatable:true};const n=()=>{};const o=":root{--color-background-base:#100a1c;--color-background-top-glow:#201e40;--color-background-bottom-glow:#261226;--color-surface-default:rgba(32, 30, 64, 0.6);--color-surface-hover:rgba(45, 212, 191, 0.08);--color-border-default:rgba(255, 255, 255, 0.08);--color-border-hover:rgba(45, 212, 191, 0.3);--color-accent-default:#2dd4bf;--color-accent-hover:#5ee8d4;--color-status-positive:#4ade80;--color-status-positive-background:rgba(34, 197, 94, 0.18);--color-status-warning:#f87171;--color-status-warning-background:rgba(248, 113, 113, 0.15);--color-text-primary:#ffffff;--color-text-secondary:rgba(255, 255, 255, 0.55);--color-brand-huemul-dark:#85422b;--color-brand-huemul-light:#b45b38;--color-brand-stroke:#1d1d1b;--typography-body:Fira Sans, Droid Sans, Helvetica Neue, sans-serif;--typography-heading:Inconsolata, monospace;--spacing-radius:6px;--layout-max-width:68rem}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-400-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:600;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-600-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:700;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-700-normal.woff2') format('woff2')}@font-face{font-family:'Inconsolata';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/inconsolata-latin-400-normal.woff2') format('woff2')}:root{--bg:var(--color-background-base);--bg-gradient:radial-gradient(50% 30% ellipse at center top, var(--color-background-top-glow) 0%, rgba(0, 0, 0, 0) 100%),\n radial-gradient(60% 50% ellipse at center bottom, var(--color-background-bottom-glow) 0%, var(--color-background-base) 100%);--surface:var(--color-surface-default);--surface-hover:var(--color-surface-hover);--border:var(--color-border-default);--border-hover:var(--color-border-hover);--text:var(--color-text-primary);--text-muted:var(--color-text-secondary);--accent:var(--color-accent-default);--accent-hover:var(--color-accent-hover);--font-body:var(--typography-body);--font-heading:var(--typography-heading);--radius:var(--spacing-radius)}body{font-family:var(--font-body)}.ch-container{width:100%;max-width:var(--layout-max-width);margin-inline:auto}.ch-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.ch-flex{display:flex}.ch-flex-col{display:flex;flex-direction:column}.ch-items-center{align-items:center}.ch-justify-center{justify-content:center}.ch-justify-between{justify-content:space-between}.ch-gap-sm{gap:0.5rem}.ch-gap-md{gap:1rem}.ch-text-center{text-align:center}.ch-text-primary{color:var(--text)}.ch-text-muted{color:var(--text-muted)}.ch-text-accent{color:var(--accent)}.ch-heading{font-family:var(--font-heading)}";function r(e,t,n){const o=typeof HTMLElement!=="undefined"?HTMLElement.prototype:null;while(e&&e!==o){const o=Object.getOwnPropertyDescriptor(e,t);if(o&&(!n||o.get))return o;e=Object.getPrototypeOf(e)}return void 0}var l=(e,t)=>{var n;const o=t.t;const l=Object.entries((n=o.o)!=null?n:{});l.map((([n,[o]])=>{if(o&31||o&32){const o=e[n];const l=r(Object.getPrototypeOf(e),n,true)||Object.getOwnPropertyDescriptor(e,n);if(l){Object.defineProperty(e,n,{get(){return l.get.call(this)},set(e){l.set.call(this,e)},configurable:true,enumerable:true})}if(t.l.has(n)){e[n]=t.l.get(n)}else if(o!==void 0){e[n]=o}}}))};var i=e=>{if(e.__stencil__getHostRef){return e.__stencil__getHostRef()}return void 0};var s=(e,n)=>{if(!n)return;e.__stencil__getHostRef=()=>n;n.i=e;if(n.t.u&512&&t.prop){l(e,n)}};var a=(e,t)=>{const n={u:0,$hostElement$:e,t,l:new Map,v:new Map};{n.h=new Promise((e=>n.p=e));e["s-p"]=[];e["s-rc"]=[]}{n.m=[]}const o=n;e.__stencil__getHostRef=()=>o;return o};var c=(e,t)=>t in e;var f=(e,t)=>(0,console.error)(e,t);var u=new Map;var d=(e,t,n)=>{const o=e.$.replace(/-/g,"_");const r=e.S;if(!r){return void 0}const l=u.get(r);if(l){return l[o]}
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${r}.entry.js${""}`).then((e=>{{u.set(r,e)}return e[o]}),(e=>{f(e,t.$hostElement$)}))};var v=new Map;var h="{visibility:hidden}.hydrated{visibility:inherit}";var p="slot-fb{display:contents}slot-fb[hidden]{display:none}";var m=typeof window!=="undefined"?window:{};var y={u:0,j:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)};var b=e=>Promise.resolve(e);var g=(()=>{try{if(!m.document.adoptedStyleSheets){return false}new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false})();var w=g?(()=>!!m.document&&Object.getOwnPropertyDescriptor(m.document.adoptedStyleSheets,"length").writable)():false;var $=false;var S=[];var j=[];var x=(e,t)=>n=>{e.push(n);if(!$){$=true;if(t&&y.u&4){C(O)}else{y.raf(O)}}};var k=e=>{for(let t=0;t<e.length;t++){try{e[t](performance.now())}catch(e){f(e)}}e.length=0};var O=()=>{k(S);{k(j);if($=S.length>0){y.raf(O)}}};var C=e=>b().then(e);var M=x(j,true);function E(e){if(!g)return void 0;const t=new CSSStyleSheet;t.replaceSync(e);return t}var L;function R(e){var t;const n={mode:"open"};const r=this.attachShadow(n);if(L===void 0)L=(t=E(o))!=null?t:null;if(L){if(w){r.adoptedStyleSheets.push(L)}else{r.adoptedStyleSheets=[...r.adoptedStyleSheets,L]}}else if(!g){const e=document.createElement("style");e.innerHTML=o;r.prepend(e)}}var A=(e,t="")=>{{return()=>{}}};var D=(e,t)=>{{return()=>{}}};function H(e){var t,n,o;return(o=(n=(t=e.head)==null?void 0:t.querySelector('meta[name="csp-nonce"]'))==null?void 0:n.getAttribute("content"))!=null?o:void 0}var N=new WeakMap;var U=(e,t,n)=>{let o=v.get(e);if(g&&n){o=o||new CSSStyleSheet;if(typeof o==="string"){o=t}else{o.replaceSync(t)}}else{o=t}v.set(e,o)};var F=(e,t,n)=>{var o,r,l;const i=T(t);const s=v.get(i);if(!m.document){return i}e=e.nodeType===11?e:m.document;if(s){if(typeof s==="string"){e=e.head||e;let n=N.get(e);let l;if(!n){N.set(e,n=new Set)}if(!n.has(i)){l=m.document.createElement("style");l.textContent=s;const a=(o=y.k)!=null?o:H(m.document);if(a!=null){l.setAttribute("nonce",a)}if(!(t.u&1)){if(e.nodeName==="HEAD"){const t=e.querySelectorAll("link[rel=preconnect]");const n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(l,(n==null?void 0:n.parentNode)===e?n:null)}else if("host"in e){if(g){const t=(r=e.defaultView)!=null?r:e.ownerDocument.defaultView;const n=new t.CSSStyleSheet;n.replaceSync(s);if(w){e.adoptedStyleSheets.unshift(n)}else{e.adoptedStyleSheets=[n,...e.adoptedStyleSheets]}}else{const t=e.querySelector("style");if(t&&true){t.textContent=s+t.textContent}else{e.prepend(l)}}}else{e.append(l)}}if(t.u&1){e.insertBefore(l,null)}if(t.u&4){l.textContent+=p}if(n){n.add(i)}}}else{let t=N.get(e);if(!t){N.set(e,t=new Set)}if(!t.has(i)){const n=(l=e.defaultView)!=null?l:e.ownerDocument.defaultView;let o;if(s.constructor===n.CSSStyleSheet){o=s}else{o=new n.CSSStyleSheet;for(let e=0;e<s.cssRules.length;e++){o.insertRule(s.cssRules[e].cssText,e)}}if(w){e.adoptedStyleSheets.push(o)}else{e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]}t.add(i)}}}return i};var P=e=>{const t=e.t;const n=e.$hostElement$;const o=t.u;const r=A("attachStyles",t.$);const l=F(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);if(o&10){n["s-sc"]=l;n.classList.add(l+"-h")}r()};var T=(e,t)=>"sc-"+e.$;var z=e=>{e=typeof e;return e==="object"||e==="function"};var W=(e,t,...n)=>{if(typeof e==="string"){e=Ne(e)}let o=null;let r=null;let l=false;let i=false;const s=[];const a=t=>{for(let n=0;n<t.length;n++){o=t[n];if(Array.isArray(o)){a(o)}else if(o!=null&&typeof o!=="boolean"){if(l=typeof e!=="function"&&!z(o)){o=String(o)}if(l&&i){s[s.length-1].O+=o}else{s.push(l?I(null,o):o)}i=l}}};a(n);if(t){if(t.key){r=t.key}{const e=t.className||t.class;if(e){t.class=typeof e!=="object"?e:Object.keys(e).filter((t=>e[t])).join(" ")}}}const c=I(e,null);c.C=t;if(s.length>0){c.M=s}{c.L=r}return c};var I=(e,t)=>{const n={u:0,R:e,O:t!=null?t:null,A:null,M:null};{n.C=null}{n.L=null}return n};var V={};var q=e=>e&&e.R===V;var G=(e,t,n)=>{if(e!=null&&!z(e)){if(t&4){{return e==="false"?false:e===""||!!e}}if(t&1){return String(e)}return e}return e};var Y=e=>{var t;return(t=i(e))==null?void 0:t.$hostElement$};var Z=(e,t,n)=>{const o=Y(e);return{emit:e=>_(o,t,{bubbles:true,composed:true,cancelable:true,detail:e})}};var _=(e,t,n)=>{const o=y.ce(t,n);e.dispatchEvent(o);return o};var B=(e,t,n,o,r,l,s)=>{if(n===o){return}let a=c(e,t);let f=t.toLowerCase();if(t==="class"){const t=e.classList;const r=K(n);let l=K(o);{t.remove(...r.filter((e=>e&&!l.includes(e))));t.add(...l.filter((e=>e&&!r.includes(e))))}}else if(t==="key");else if(!a&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"){t=t.slice(3)}else if(c(m,f)){t=f.slice(2)}else{t=f[2]+t.slice(3)}if(n||o){const r=t.endsWith(Q);t=t.replace(X,"");if(n){y.rel(e,t,n,r)}if(o){y.ael(e,t,o,r)}}}else if(t[0]==="a"&&t.startsWith("attr:")){const n=t.slice(5);let r;{const t=i(e);if(t&&t.t&&t.t.o){const e=t.t.o[n];if(e&&e[1]){r=e[1]}}}if(!r){r=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}if(o==null||o===false){if(o!==false||e.getAttribute(r)===""){e.removeAttribute(r)}}else{e.setAttribute(r,o===true?"":o)}return}else if(t[0]==="p"&&t.startsWith("prop:")){const n=t.slice(5);try{e[n]=o}catch(e){}return}else{const i=z(o);if((a||i&&o!==null)&&!r){try{if(!e.tagName.includes("-")){const r=o==null?"":o;if(t==="list"){a=false}else if(n==null||e[t]!==r){if(typeof e.__lookupSetter__(t)==="function"){e[t]=r}else{e.setAttribute(t,r)}}}else if(e[t]!==o){e[t]=o}}catch(e){}}if(o==null||o===false){if(o!==false||e.getAttribute(t)===""){{e.removeAttribute(t)}}}else if((!a||l&4||r)&&!i&&e.nodeType===1){o=o===true?"":o;{e.setAttribute(t,o)}}}};var J=/\s/;var K=e=>{if(typeof e==="object"&&e&&"baseVal"in e){e=e.baseVal}if(!e||typeof e!=="string"){return[]}return e.split(J)};var Q="Capture";var X=new RegExp(Q+"$");var ee=(e,t,n,o)=>{const r=t.A.nodeType===11&&t.A.host?t.A.host:t.A;const l=e&&e.C||{};const i=t.C||{};{for(const e of te(Object.keys(l))){if(!(e in i)){B(r,e,l[e],void 0,n,t.u)}}}for(const e of te(Object.keys(i))){B(r,e,l[e],i[e],n,t.u)}};function te(e){return e.includes("ref")?[...e.filter((e=>e!=="ref")),"ref"]:e}var ne;var oe=false;var re=false;var le=(e,t,n)=>{const o=t.M[n];let r=0;let l;let i;if(o.O!=null){l=o.A=m.document.createTextNode(o.O)}else{if(!m.document){throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.")}l=o.A=m.document.createElement(o.R);{ee(null,o,re)}if(o.M){const t=o.R==="template"?l.content:l;for(r=0;r<o.M.length;++r){i=le(e,o,r);if(i){t.appendChild(i)}}}}l["s-hn"]=ne;return l};var ie=e=>{y.u|=1;const t=e.closest(ne.toLowerCase());if(t!=null){const n=Array.from(t.__childNodes||t.childNodes).find((e=>e["s-cr"]));const o=Array.from(e.__childNodes||e.childNodes);for(const e of n?o.reverse():o){if(e["s-sh"]!=null){de(t,e,n!=null?n:null);e["s-sh"]=void 0}}}y.u&=-2};var se=(e,t,n,o,r,l)=>{let i=e;let s;if(i.shadowRoot&&i.tagName===ne){i=i.shadowRoot}if(n.R==="template"){i=i.content}for(;r<=l;++r){if(o[r]){s=le(null,n,r);if(s){o[r].A=s;de(i,s,t)}}}};var ae=(e,t,n)=>{for(let o=t;o<=n;++o){const t=e[o];if(t){const e=t.A;if(e){e.remove()}}}};var ce=(e,t,n,o,r=false)=>{let l=0;let i=0;let s=0;let a=0;let c=t.length-1;let f=t[0];let u=t[c];let d=o.length-1;let v=o[0];let h=o[d];let p;let m;const y=n.R==="template"?e.content:e;while(l<=c&&i<=d){if(f==null){f=t[++l]}else if(u==null){u=t[--c]}else if(v==null){v=o[++i]}else if(h==null){h=o[--d]}else if(fe(f,v,r)){ue(f,v,r);f=t[++l];v=o[++i]}else if(fe(u,h,r)){ue(u,h,r);u=t[--c];h=o[--d]}else if(fe(f,h,r)){ue(f,h,r);de(y,f.A,u.A.nextSibling);f=t[++l];h=o[--d]}else if(fe(u,v,r)){ue(u,v,r);de(y,u.A,f.A);u=t[--c];v=o[++i]}else{s=-1;{for(a=l;a<=c;++a){if(t[a]&&t[a].L!==null&&t[a].L===v.L){s=a;break}}}if(s>=0){m=t[s];if(m.R!==v.R){p=le(t&&t[i],n,s)}else{ue(m,v,r);t[s]=void 0;p=m.A}v=o[++i]}else{p=le(t&&t[i],n,i);v=o[++i]}if(p){{de(f.A.parentNode,p,f.A)}}}}if(l>c){se(e,o[d+1]==null?null:o[d+1].A,n,o,i,d)}else if(i>d){ae(t,l,c)}};var fe=(e,t,n=false)=>{if(e.R===t.R){if(!n){return e.L===t.L}if(n&&!e.L&&t.L){e.L=t.L}return true}return false};var ue=(e,n,o=false)=>{const r=n.A=e.A;const l=e.M;const i=n.M;const s=n.R;const a=n.O;if(a==null){{if(s==="slot"&&!oe){if(e.D!==n.D){n.A["s-sn"]=n.D||"";ie(n.A.parentElement)}}ee(e,n,re)}if(l!==null&&i!==null){ce(r,l,n,i,o)}else if(i!==null){if(e.O!==null){r.textContent=""}se(r,null,n,i,0,i.length-1)}else if(!o&&t.updatable&&l!==null){ae(l,0,l.length-1)}else;}else if(e.O!==a){r.data=a}};var de=(e,t,n,o)=>{if(e.__insertBefore){return e.__insertBefore(t,n)}else{return e==null?void 0:e.insertBefore(t,n)}};var ve=(e,t,n=false)=>{const o=e.$hostElement$;const r=e.t;const l=e.H||I(null,null);const i=q(t);const s=i?t:W(null,null,t);ne=o.tagName;if(n&&s.C){for(const e of Object.keys(s.C)){if(o.hasAttribute(e)&&!["key","ref","style","class"].includes(e)){s.C[e]=o[e]}}}s.R=null;s.u|=4;e.H=s;s.A=l.A=o.shadowRoot||o;oe=!!(r.u&1)&&!(r.u&128);ue(l,s,n)};var he=(e,t)=>{if(t&&!e.N&&t["s-p"]){const n=t["s-p"].push(new Promise((o=>e.N=()=>{t["s-p"].splice(n-1,1);o()})))}};var pe=(e,t)=>{{e.u|=16}if(e.u&4){e.u|=512;return}he(e,e.U);const n=()=>me(e,t);if(t){queueMicrotask((()=>{n()}));return}return M(n)};var me=(e,t)=>{const n=e.$hostElement$;const o=A("scheduleUpdate",e.t.$);const r=e.i;if(!r){throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`)}let l;if(t){{if(e.m.length){e.m.forEach((e=>e(n)))}}l=je(r,"componentWillLoad",void 0,n)}else{l=je(r,"componentWillUpdate",void 0,n)}l=ye(l,(()=>je(r,"componentWillRender",void 0,n)));o();return ye(l,(()=>ge(e,r,t)))};var ye=(e,t)=>be(e)?e.then(t).catch((e=>{console.error(e);t()})):t();var be=e=>e instanceof Promise||e&&e.then&&typeof e.then==="function";var ge=async(e,t,n)=>{var o;const r=e.$hostElement$;const l=A("update",e.t.$);const i=r["s-rc"];if(n){P(e)}const s=A("render",e.t.$);{we(e,t,r,n)}if(i){i.map((e=>e()));r["s-rc"]=void 0}s();l();{const t=(o=r["s-p"])!=null?o:[];const n=()=>$e(e);if(t.length===0){n()}else{Promise.all(t).then(n).catch(n);e.u|=4;t.length=0}}};var we=(e,t,n,o)=>{try{t=t.render();{e.u&=-17}{e.u|=2}{{{ve(e,t,o)}}}}catch(t){f(t,e.$hostElement$)}return null};var $e=e=>{const t=e.t.$;const n=e.$hostElement$;const o=A("postUpdate",t);const r=e.i;const l=e.U;je(r,"componentDidRender",void 0,n);if(!(e.u&64)){e.u|=64;{xe(n)}je(r,"componentDidLoad",void 0,n);o();{e.p(n);if(!l){Se()}}}else{je(r,"componentDidUpdate",void 0,n);o()}{if(e.N){e.N();e.N=void 0}if(e.u&512){C((()=>pe(e,false)))}e.u&=-517}};var Se=t=>{C((()=>_(m,"appload",{detail:{namespace:e}})))};var je=(e,t,n,o)=>{if(e&&e[t]){try{return e[t](n)}catch(e){f(e,o)}}return void 0};var xe=e=>{var n;return e.classList.add((n=t.hydratedSelectorName)!=null?n:"hydrated")};var ke=(e,t)=>i(e).l.get(t);var Oe=(e,t,n,o)=>{const r=i(e);if(!r){return}if(!r){throw new Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`)}const l=r.l.get(t);const s=r.u;const a=r.i;n=G(n,o.o[t][0]);const c=Number.isNaN(l)&&Number.isNaN(n);const f=n!==l&&!c;if((!(s&8)||l===void 0)&&f){r.l.set(t,n);if(s&2){if(a.componentShouldUpdate){const e=a.componentShouldUpdate(n,l,t);if(e===false&&!(s&16)){return}}if(!(s&16)){pe(r,false)}}}};var Ce=(e,n,o)=>{var l,s;const a=e.prototype;if(n.o||t.propChangeCallback){const c=Object.entries((l=n.o)!=null?l:{});c.map((([e,[t]])=>{if(t&31||o&2&&t&32){const{get:l,set:s}=r(a,e)||{};if(l)n.o[e][0]|=2048;if(s)n.o[e][0]|=4096;if(o&1||!l){Object.defineProperty(a,e,{get(){{if((n.o[e][0]&2048)===0){return ke(this,e)}const t=i(this);const o=t?t.i:a;if(!o)return;return o[e]}},configurable:true,enumerable:true})}Object.defineProperty(a,e,{set(r){const l=i(this);if(!l){return}if(s){const o=t&32?this[e]:l.$hostElement$[e];if(typeof o==="undefined"&&l.l.get(e)){r=l.l.get(e)}s.apply(this,[G(r,t)]);r=t&32?this[e]:l.$hostElement$[e];Oe(this,e,r,n);return}{if((o&1)===0||(n.o[e][0]&4096)===0){Oe(this,e,r,n);if(o&1&&!l.i){l.m.push((()=>{if(n.o[e][0]&4096&&l.i[e]!==l.l.get(e)){l.i[e]=r}}))}return}const i=()=>{const o=l.i[e];if(!l.l.get(e)&&o){l.l.set(e,o)}l.i[e]=G(r,t);Oe(this,e,l.i[e],n)};if(l.i){i()}else{l.m.push((()=>{i()}))}}}})}}));if(o&1){const o=new Map;a.attributeChangedCallback=function(e,r,l){y.jmp((()=>{var s;const f=o.get(e);const u=i(this);if(this.hasOwnProperty(f)&&t.lazyLoad){l=this[f];delete this[f]}if(a.hasOwnProperty(f)&&typeof this[f]==="number"&&this[f]==l){return}else if(f==null){const t=u==null?void 0:u.u;if(u&&t&&!(t&8)&&l!==r){const o=u.i;const i=(s=n.F)==null?void 0:s[e];i==null?void 0:i.forEach((n=>{const[[i,s]]=Object.entries(n);if(o[i]!=null&&(t&128||s&1)){o[i].call(o,l,r,e)}}))}return}const d=c.find((([e])=>e===f));const v=d&&d[1][0]&4;const h=v&&l===null&&this[f]===void 0;if(v){l=l===null||l==="false"?false:true}const p=Object.getOwnPropertyDescriptor(a,f);if(!h&&l!=this[f]&&(!p.get||!!p.set)){this[f]=l}}))};e.observedAttributes=Array.from(new Set([...Object.keys((s=n.F)!=null?s:{}),...c.filter((([e,t])=>t[0]&31)).map((([e,t])=>{const n=t[1]||e;o.set(n,e);return n}))]))}}return e};var Me=async(e,n,o,r)=>{let l;try{if((n.u&32)===0){n.u|=32;const r=o.S;if(r){const t=d(o,n);if(t&&"then"in t){const e=D();l=await t;e()}else{l=t}if(!l){throw new Error(`Constructor for "${o.$}#${n.P}" was not found`)}if(!l.isProxied){Ce(l,o,2);l.isProxied=true}const r=A("createInstance",o.$);{n.u|=8}try{new l(n)}catch(t){f(t,e)}{n.u&=-9}r();{Ee(n.i,e)}}else{l=e.constructor;const t=e.localName;customElements.whenDefined(t).then((()=>n.u|=128))}if(l&&l.style){let e;if(typeof l.style==="string"){e=l.style}const n=T(o);if(!v.has(n)||t.hotModuleReplacement){const t=A("registerStyles",o.$);U(n,e,!!(o.u&1));t()}}}const r=n.U;const i=()=>pe(n,true);if(r&&r["s-rc"]){r["s-rc"].push(i)}else{i()}}catch(t){f(t,e);if(n.N){n.N();n.N=void 0}if(n.p){n.p(e)}}};var Ee=(e,t)=>{{je(e,"connectedCallback",void 0,t)}};var Le=e=>{if((y.u&1)===0){const t=i(e);if(!t){return}const n=t.t;const o=A("connectedCallback",n.$);if(!(t.u&1)){t.u|=1;{let n=e;while(n=n.parentNode||n.host){if(n["s-p"]){he(t,t.U=n);break}}}if(n.o){Object.entries(n.o).map((([t,[n]])=>{if(n&31&&Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];delete e[t];e[t]=n}}))}{Me(e,t,n)}}else{if(t==null?void 0:t.i){Ee(t.i,e)}else if(t==null?void 0:t.h){t.h.then((()=>Ee(t.i,e)))}}o()}};var Re=(e,t)=>{{je(e,"disconnectedCallback",void 0,t||e)}};var Ae=async e=>{if((y.u&1)===0){const t=i(e);if(t==null?void 0:t.i){Re(t.i,e)}else if(t==null?void 0:t.h){t.h.then((()=>Re(t.i,e)))}}if(N.has(e)){N.delete(e)}if(e.shadowRoot&&N.has(e.shadowRoot)){N.delete(e.shadowRoot)}};var De=(e,t={})=>{var n;if(!m.document){console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");return}const o=A();const r=[];const l=t.exclude||[];const s=m.customElements;const c=m.document.head;const f=c.querySelector("meta[charset]");const u=m.document.createElement("style");const d=[];let v;let p=true;Object.assign(y,t);y.j=new URL(t.resourcesUrl||"./",m.document.baseURI).href;e.map((e=>{e[1].map((t=>{const n={u:t[0],$:t[1],o:t[2],T:t[3]};{n.o=t[2]}const o=Ne(n.$);const c=class extends HTMLElement{["s-p"];["s-rc"];hasRegisteredEventListeners=false;constructor(e){super(e);e=this;a(e,n);if(n.u&1){{if(!e.shadowRoot){R.call(e,n)}else{if(e.shadowRoot.mode!=="open"){throw new Error(`Unable to re-use existing shadow root for ${n.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}}}}}connectedCallback(){const e=i(this);if(!e){return}if(!this.hasRegisteredEventListeners){this.hasRegisteredEventListeners=true}if(v){clearTimeout(v);v=null}if(p){d.push(this)}else{y.jmp((()=>Le(this)))}}disconnectedCallback(){y.jmp((()=>Ae(this)));y.raf((()=>{var e;const t=i(this);if(!t){return}const n=d.findIndex((e=>e===this));if(n>-1){d.splice(n,1)}if(((e=t==null?void 0:t.H)==null?void 0:e.A)instanceof Node&&!t.H.A.isConnected){delete t.H.A}}))}componentOnReady(){var e;return(e=i(this))==null?void 0:e.h}};n.S=e[0];if(!l.includes(o)&&!s.get(o)){r.push(o);s.define(o,Ce(c,n,1))}}))}));if(r.length>0){{u.textContent+=r.sort()+h}if(u.innerHTML.length){u.setAttribute("data-styles","");const e=(n=y.k)!=null?n:H(m.document);if(e!=null){u.setAttribute("nonce",e)}c.insertBefore(u,f?f.nextSibling:c.firstChild)}}p=false;if(d.length){d.map((e=>e.connectedCallback()))}else{{y.jmp((()=>v=setTimeout(Se,30)))}}o()};var He=e=>y.k=e;function Ne(e){return e}export{V as H,De as b,Z as c,n as g,W as h,b as p,s as r,He as s};
|
|
3
|
+
//# sourceMappingURL=p-CuWheDah.js.map
|