@luna_ui/luna 0.2.7 → 0.3.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 +84 -2
- package/dist/event-utils-Cd5f3Njd.d.ts +142 -0
- package/dist/event-utils.d.ts +1 -141
- package/dist/index-CyEkcO3_.d.ts +261 -0
- package/dist/index.d.ts +3 -252
- package/dist/index.js +1 -1
- package/dist/jsx-dev-runtime.js +1 -1
- package/dist/jsx-runtime.d.ts +3 -1
- package/dist/jsx-runtime.js +1 -1
- package/dist/{src-CkFAs6hv.js → src-D_3vg6h3.js} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -105,7 +105,7 @@ createEffect(() => {
|
|
|
105
105
|
### Components
|
|
106
106
|
|
|
107
107
|
```tsx
|
|
108
|
-
import { For, Show } from '@luna_ui/luna';
|
|
108
|
+
import { For, Show, Switch, Match } from '@luna_ui/luna';
|
|
109
109
|
|
|
110
110
|
// For: list rendering
|
|
111
111
|
<For each={items}>
|
|
@@ -113,8 +113,48 @@ import { For, Show } from '@luna_ui/luna';
|
|
|
113
113
|
</For>
|
|
114
114
|
|
|
115
115
|
// Show: conditional rendering
|
|
116
|
+
// ⚠️ Children must be a function for proper lifecycle support
|
|
116
117
|
<Show when={() => isVisible()}>
|
|
117
|
-
<
|
|
118
|
+
{() => <MyComponent />}
|
|
119
|
+
</Show>
|
|
120
|
+
|
|
121
|
+
// Switch/Match: multiple conditions
|
|
122
|
+
<Switch fallback={<p>Default</p>}>
|
|
123
|
+
<Match when={() => value() === 'a'}>{() => <ComponentA />}</Match>
|
|
124
|
+
<Match when={() => value() === 'b'}>{() => <ComponentB />}</Match>
|
|
125
|
+
</Switch>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Lifecycle Hooks
|
|
129
|
+
|
|
130
|
+
```tsx
|
|
131
|
+
import { onMount, onCleanup } from '@luna_ui/luna';
|
|
132
|
+
|
|
133
|
+
function Timer() {
|
|
134
|
+
const [count, setCount] = createSignal(0);
|
|
135
|
+
|
|
136
|
+
// Run after component mounts
|
|
137
|
+
onMount(() => {
|
|
138
|
+
console.log('Timer mounted');
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
// Cleanup when component unmounts
|
|
142
|
+
onCleanup(() => {
|
|
143
|
+
console.log('Timer cleanup');
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
return <p>Count: {count()}</p>;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// ⚠️ Important: For onCleanup to work inside Show/For/Switch,
|
|
150
|
+
// children must be passed as a function:
|
|
151
|
+
<Show when={isVisible}>
|
|
152
|
+
{() => <Timer />} {/* ✅ Correct */}
|
|
153
|
+
</Show>
|
|
154
|
+
|
|
155
|
+
// This won't trigger cleanup properly:
|
|
156
|
+
<Show when={isVisible}>
|
|
157
|
+
<Timer /> {/* ❌ Wrong - Timer runs outside owner scope */}
|
|
118
158
|
</Show>
|
|
119
159
|
```
|
|
120
160
|
|
|
@@ -140,6 +180,48 @@ import { For, Show } from '@luna_ui/luna';
|
|
|
140
180
|
<form onSubmit={(e) => { e.preventDefault(); submit(); }}>
|
|
141
181
|
```
|
|
142
182
|
|
|
183
|
+
### Context (Provider)
|
|
184
|
+
|
|
185
|
+
```tsx
|
|
186
|
+
import { createContext, useContext, Provider } from '@luna_ui/luna';
|
|
187
|
+
|
|
188
|
+
// Create a context with default value
|
|
189
|
+
const ThemeContext = createContext('light');
|
|
190
|
+
|
|
191
|
+
function App() {
|
|
192
|
+
return (
|
|
193
|
+
// ⚠️ Children must be a function for proper context access
|
|
194
|
+
<Provider context={ThemeContext} value="dark">
|
|
195
|
+
{() => <ThemedComponent />}
|
|
196
|
+
</Provider>
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function ThemedComponent() {
|
|
201
|
+
const theme = useContext(ThemeContext);
|
|
202
|
+
return <div>Current theme: {theme}</div>;
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Portal
|
|
207
|
+
|
|
208
|
+
```tsx
|
|
209
|
+
import { Portal } from '@luna_ui/luna';
|
|
210
|
+
|
|
211
|
+
function Modal() {
|
|
212
|
+
return (
|
|
213
|
+
// ⚠️ Children must be a function for proper lifecycle support
|
|
214
|
+
<Portal mount="#modal-root">
|
|
215
|
+
{() => (
|
|
216
|
+
<div class="modal">
|
|
217
|
+
<h2>Modal Content</h2>
|
|
218
|
+
</div>
|
|
219
|
+
)}
|
|
220
|
+
</Portal>
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
143
225
|
## License
|
|
144
226
|
|
|
145
227
|
MIT
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
//#region src/event-utils.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Event utilities for common event handling patterns
|
|
4
|
+
*
|
|
5
|
+
* These utilities are tree-shakeable - only import what you use.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import { getTargetValue, getDataId, stopEvent } from "@luna_ui/luna/event-utils";
|
|
9
|
+
*
|
|
10
|
+
* on=events().input(fn(e) {
|
|
11
|
+
* const value = getTargetValue(e);
|
|
12
|
+
* setValue(value);
|
|
13
|
+
* })
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Get value from input/textarea/select element
|
|
17
|
+
*/
|
|
18
|
+
declare function getTargetValue(e: Event): string;
|
|
19
|
+
/**
|
|
20
|
+
* Get checked state from checkbox/radio input
|
|
21
|
+
*/
|
|
22
|
+
declare function getTargetChecked(e: Event): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Get selected index from select element
|
|
25
|
+
*/
|
|
26
|
+
declare function getSelectedIndex(e: Event): number;
|
|
27
|
+
/**
|
|
28
|
+
* Get client position (relative to viewport) from mouse/pointer/touch event
|
|
29
|
+
*/
|
|
30
|
+
declare function getClientPos(e: MouseEvent | PointerEvent | TouchEvent): {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Get offset position (relative to target element) from mouse/pointer event
|
|
36
|
+
*/
|
|
37
|
+
declare function getOffsetPos(e: MouseEvent | PointerEvent): {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Get page position (relative to document) from mouse/pointer/touch event
|
|
43
|
+
*/
|
|
44
|
+
declare function getPagePos(e: MouseEvent | PointerEvent | TouchEvent): {
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Get movement delta from mouse/pointer event
|
|
50
|
+
*/
|
|
51
|
+
declare function getMovement(e: MouseEvent | PointerEvent): {
|
|
52
|
+
dx: number;
|
|
53
|
+
dy: number;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Get data attribute from event target or closest ancestor
|
|
57
|
+
*/
|
|
58
|
+
declare function getDataAttr(e: Event, key: string): string | null;
|
|
59
|
+
/**
|
|
60
|
+
* Get data-id from closest ancestor (common pattern for list items)
|
|
61
|
+
*/
|
|
62
|
+
declare function getDataId(e: Event): string | null;
|
|
63
|
+
/**
|
|
64
|
+
* Get all data attributes from event target as object
|
|
65
|
+
*/
|
|
66
|
+
declare function getDataset(e: Event): DOMStringMap;
|
|
67
|
+
/**
|
|
68
|
+
* Check if event target matches a CSS selector
|
|
69
|
+
*/
|
|
70
|
+
declare function matchesSelector(e: Event, selector: string): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Get closest ancestor matching selector from event target
|
|
73
|
+
*/
|
|
74
|
+
declare function getClosest<T extends Element = HTMLElement>(e: Event, selector: string): T | null;
|
|
75
|
+
/**
|
|
76
|
+
* Prevent default behavior
|
|
77
|
+
*/
|
|
78
|
+
declare function preventDefault(e: Event): void;
|
|
79
|
+
/**
|
|
80
|
+
* Stop event propagation
|
|
81
|
+
*/
|
|
82
|
+
declare function stopPropagation(e: Event): void;
|
|
83
|
+
/**
|
|
84
|
+
* Prevent default and stop propagation (convenience)
|
|
85
|
+
*/
|
|
86
|
+
declare function stopEvent(e: Event): void;
|
|
87
|
+
/**
|
|
88
|
+
* Check if IME is composing (for input/keyboard events)
|
|
89
|
+
* Use this to avoid handling partial IME input
|
|
90
|
+
*/
|
|
91
|
+
declare function isComposing(e: Event): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Check if modifier key is pressed
|
|
94
|
+
*/
|
|
95
|
+
declare function hasModifier(e: KeyboardEvent | MouseEvent, modifier: "ctrl" | "alt" | "shift" | "meta"): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Check if Cmd (Mac) or Ctrl (Windows/Linux) is pressed
|
|
98
|
+
*/
|
|
99
|
+
declare function hasCmdOrCtrl(e: KeyboardEvent | MouseEvent): boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Get keyboard key with normalized names
|
|
102
|
+
*/
|
|
103
|
+
declare function getKey(e: KeyboardEvent): string;
|
|
104
|
+
/**
|
|
105
|
+
* Check if Enter key was pressed (outside IME composition)
|
|
106
|
+
*/
|
|
107
|
+
declare function isEnterKey(e: KeyboardEvent): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Check if Escape key was pressed
|
|
110
|
+
*/
|
|
111
|
+
declare function isEscapeKey(e: KeyboardEvent): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Get wheel delta (normalized across browsers)
|
|
114
|
+
*/
|
|
115
|
+
declare function getWheelDelta(e: WheelEvent): {
|
|
116
|
+
deltaX: number;
|
|
117
|
+
deltaY: number;
|
|
118
|
+
deltaZ: number;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Get which mouse button was pressed
|
|
122
|
+
* 0 = primary (left), 1 = auxiliary (middle), 2 = secondary (right)
|
|
123
|
+
*/
|
|
124
|
+
declare function getButton(e: MouseEvent): number;
|
|
125
|
+
/**
|
|
126
|
+
* Check if primary (left) mouse button was pressed
|
|
127
|
+
*/
|
|
128
|
+
declare function isPrimaryButton(e: MouseEvent): boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Check if secondary (right) mouse button was pressed
|
|
131
|
+
*/
|
|
132
|
+
declare function isSecondaryButton(e: MouseEvent): boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Get files from drag event
|
|
135
|
+
*/
|
|
136
|
+
declare function getDroppedFiles(e: DragEvent): FileList | null;
|
|
137
|
+
/**
|
|
138
|
+
* Get text data from drag/clipboard event
|
|
139
|
+
*/
|
|
140
|
+
declare function getTextData(e: DragEvent | ClipboardEvent): string;
|
|
141
|
+
//#endregion
|
|
142
|
+
export { isSecondaryButton as C, stopPropagation as D, stopEvent as E, isPrimaryButton as S, preventDefault as T, hasCmdOrCtrl as _, getDataId as a, isEnterKey as b, getKey as c, getPagePos as d, getSelectedIndex as f, getWheelDelta as g, getTextData as h, getDataAttr as i, getMovement as l, getTargetValue as m, getClientPos as n, getDataset as o, getTargetChecked as p, getClosest as r, getDroppedFiles as s, getButton as t, getOffsetPos as u, hasModifier as v, matchesSelector as w, isEscapeKey as x, isComposing as y };
|
package/dist/event-utils.d.ts
CHANGED
|
@@ -1,142 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Event utilities for common event handling patterns
|
|
4
|
-
*
|
|
5
|
-
* These utilities are tree-shakeable - only import what you use.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* import { getTargetValue, getDataId, stopEvent } from "@luna_ui/luna/event-utils";
|
|
9
|
-
*
|
|
10
|
-
* on=events().input(fn(e) {
|
|
11
|
-
* const value = getTargetValue(e);
|
|
12
|
-
* setValue(value);
|
|
13
|
-
* })
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* Get value from input/textarea/select element
|
|
17
|
-
*/
|
|
18
|
-
declare function getTargetValue(e: Event): string;
|
|
19
|
-
/**
|
|
20
|
-
* Get checked state from checkbox/radio input
|
|
21
|
-
*/
|
|
22
|
-
declare function getTargetChecked(e: Event): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Get selected index from select element
|
|
25
|
-
*/
|
|
26
|
-
declare function getSelectedIndex(e: Event): number;
|
|
27
|
-
/**
|
|
28
|
-
* Get client position (relative to viewport) from mouse/pointer/touch event
|
|
29
|
-
*/
|
|
30
|
-
declare function getClientPos(e: MouseEvent | PointerEvent | TouchEvent): {
|
|
31
|
-
x: number;
|
|
32
|
-
y: number;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Get offset position (relative to target element) from mouse/pointer event
|
|
36
|
-
*/
|
|
37
|
-
declare function getOffsetPos(e: MouseEvent | PointerEvent): {
|
|
38
|
-
x: number;
|
|
39
|
-
y: number;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Get page position (relative to document) from mouse/pointer/touch event
|
|
43
|
-
*/
|
|
44
|
-
declare function getPagePos(e: MouseEvent | PointerEvent | TouchEvent): {
|
|
45
|
-
x: number;
|
|
46
|
-
y: number;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Get movement delta from mouse/pointer event
|
|
50
|
-
*/
|
|
51
|
-
declare function getMovement(e: MouseEvent | PointerEvent): {
|
|
52
|
-
dx: number;
|
|
53
|
-
dy: number;
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* Get data attribute from event target or closest ancestor
|
|
57
|
-
*/
|
|
58
|
-
declare function getDataAttr(e: Event, key: string): string | null;
|
|
59
|
-
/**
|
|
60
|
-
* Get data-id from closest ancestor (common pattern for list items)
|
|
61
|
-
*/
|
|
62
|
-
declare function getDataId(e: Event): string | null;
|
|
63
|
-
/**
|
|
64
|
-
* Get all data attributes from event target as object
|
|
65
|
-
*/
|
|
66
|
-
declare function getDataset(e: Event): DOMStringMap;
|
|
67
|
-
/**
|
|
68
|
-
* Check if event target matches a CSS selector
|
|
69
|
-
*/
|
|
70
|
-
declare function matchesSelector(e: Event, selector: string): boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Get closest ancestor matching selector from event target
|
|
73
|
-
*/
|
|
74
|
-
declare function getClosest<T extends Element = HTMLElement>(e: Event, selector: string): T | null;
|
|
75
|
-
/**
|
|
76
|
-
* Prevent default behavior
|
|
77
|
-
*/
|
|
78
|
-
declare function preventDefault(e: Event): void;
|
|
79
|
-
/**
|
|
80
|
-
* Stop event propagation
|
|
81
|
-
*/
|
|
82
|
-
declare function stopPropagation(e: Event): void;
|
|
83
|
-
/**
|
|
84
|
-
* Prevent default and stop propagation (convenience)
|
|
85
|
-
*/
|
|
86
|
-
declare function stopEvent(e: Event): void;
|
|
87
|
-
/**
|
|
88
|
-
* Check if IME is composing (for input/keyboard events)
|
|
89
|
-
* Use this to avoid handling partial IME input
|
|
90
|
-
*/
|
|
91
|
-
declare function isComposing(e: Event): boolean;
|
|
92
|
-
/**
|
|
93
|
-
* Check if modifier key is pressed
|
|
94
|
-
*/
|
|
95
|
-
declare function hasModifier(e: KeyboardEvent | MouseEvent, modifier: "ctrl" | "alt" | "shift" | "meta"): boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Check if Cmd (Mac) or Ctrl (Windows/Linux) is pressed
|
|
98
|
-
*/
|
|
99
|
-
declare function hasCmdOrCtrl(e: KeyboardEvent | MouseEvent): boolean;
|
|
100
|
-
/**
|
|
101
|
-
* Get keyboard key with normalized names
|
|
102
|
-
*/
|
|
103
|
-
declare function getKey(e: KeyboardEvent): string;
|
|
104
|
-
/**
|
|
105
|
-
* Check if Enter key was pressed (outside IME composition)
|
|
106
|
-
*/
|
|
107
|
-
declare function isEnterKey(e: KeyboardEvent): boolean;
|
|
108
|
-
/**
|
|
109
|
-
* Check if Escape key was pressed
|
|
110
|
-
*/
|
|
111
|
-
declare function isEscapeKey(e: KeyboardEvent): boolean;
|
|
112
|
-
/**
|
|
113
|
-
* Get wheel delta (normalized across browsers)
|
|
114
|
-
*/
|
|
115
|
-
declare function getWheelDelta(e: WheelEvent): {
|
|
116
|
-
deltaX: number;
|
|
117
|
-
deltaY: number;
|
|
118
|
-
deltaZ: number;
|
|
119
|
-
};
|
|
120
|
-
/**
|
|
121
|
-
* Get which mouse button was pressed
|
|
122
|
-
* 0 = primary (left), 1 = auxiliary (middle), 2 = secondary (right)
|
|
123
|
-
*/
|
|
124
|
-
declare function getButton(e: MouseEvent): number;
|
|
125
|
-
/**
|
|
126
|
-
* Check if primary (left) mouse button was pressed
|
|
127
|
-
*/
|
|
128
|
-
declare function isPrimaryButton(e: MouseEvent): boolean;
|
|
129
|
-
/**
|
|
130
|
-
* Check if secondary (right) mouse button was pressed
|
|
131
|
-
*/
|
|
132
|
-
declare function isSecondaryButton(e: MouseEvent): boolean;
|
|
133
|
-
/**
|
|
134
|
-
* Get files from drag event
|
|
135
|
-
*/
|
|
136
|
-
declare function getDroppedFiles(e: DragEvent): FileList | null;
|
|
137
|
-
/**
|
|
138
|
-
* Get text data from drag/clipboard event
|
|
139
|
-
*/
|
|
140
|
-
declare function getTextData(e: DragEvent | ClipboardEvent): string;
|
|
141
|
-
//#endregion
|
|
1
|
+
import { C as isSecondaryButton, D as stopPropagation, E as stopEvent, S as isPrimaryButton, T as preventDefault, _ as hasCmdOrCtrl, a as getDataId, b as isEnterKey, c as getKey, d as getPagePos, f as getSelectedIndex, g as getWheelDelta, h as getTextData, i as getDataAttr, l as getMovement, m as getTargetValue, n as getClientPos, o as getDataset, p as getTargetChecked, r as getClosest, s as getDroppedFiles, t as getButton, u as getOffsetPos, v as hasModifier, w as matchesSelector, x as isEscapeKey, y as isComposing } from "./event-utils-Cd5f3Njd.js";
|
|
142
2
|
export { getButton, getClientPos, getClosest, getDataAttr, getDataId, getDataset, getDroppedFiles, getKey, getMovement, getOffsetPos, getPagePos, getSelectedIndex, getTargetChecked, getTargetValue, getTextData, getWheelDelta, hasCmdOrCtrl, hasModifier, isComposing, isEnterKey, isEscapeKey, isPrimaryButton, isSecondaryButton, matchesSelector, preventDefault, stopEvent, stopPropagation };
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
//#region ../../target/js/release/build/platform/js/api/moonbit.d.ts
|
|
2
|
+
|
|
3
|
+
type Unit = undefined;
|
|
4
|
+
type Bool = boolean;
|
|
5
|
+
/**
|
|
6
|
+
* A signed integer in 32-bit two's complement format.
|
|
7
|
+
*/
|
|
8
|
+
type Int = number;
|
|
9
|
+
type String = string;
|
|
10
|
+
type UnboxedOption<T> = /* Some */T | /* None */undefined;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region ../../target/js/release/build/platform/js/api/api.d.ts
|
|
13
|
+
declare function portalToElementWithShadow(mount: any, children: any): any;
|
|
14
|
+
declare function portalWithShadow(children: any): any;
|
|
15
|
+
declare function portalToSelector(selector: String, children: any): any;
|
|
16
|
+
declare function portalToBody(children: any): any;
|
|
17
|
+
declare function stateError(state: any): String;
|
|
18
|
+
declare function stateValue(state: any): any;
|
|
19
|
+
declare function stateIsFailure(state: any): Bool;
|
|
20
|
+
declare function stateIsSuccess(state: any): Bool;
|
|
21
|
+
declare function stateIsPending(state: any): Bool;
|
|
22
|
+
declare function resourceError(res: any): String;
|
|
23
|
+
declare function resourceValue(res: any): any;
|
|
24
|
+
declare function resourceIsFailure(res: any): Bool;
|
|
25
|
+
declare function resourceIsSuccess(res: any): Bool;
|
|
26
|
+
declare function resourceIsPending(res: any): Bool;
|
|
27
|
+
declare function resourceRefetch(res: any): Unit;
|
|
28
|
+
declare function resourcePeek(res: any): any;
|
|
29
|
+
declare function resourceGet(res: any): any;
|
|
30
|
+
declare function useContext(ctx: any): any;
|
|
31
|
+
declare function provide(ctx: any, value: any, f: () => any): any;
|
|
32
|
+
declare function createContext(default_value: any): any;
|
|
33
|
+
declare function routerGetBase(router: any): String;
|
|
34
|
+
declare function routerGetMatch(router: any): UnboxedOption<any>;
|
|
35
|
+
declare function routerGetPath(router: any): String;
|
|
36
|
+
declare function routerReplace(router: any, path: String): Unit;
|
|
37
|
+
declare function routerNavigate(router: any, path: String): Unit;
|
|
38
|
+
declare function createRouter(routes: any, base$46$opt: UnboxedOption<String>): any;
|
|
39
|
+
declare function routePageFull(path: String, component: String, title: String, meta: any): any;
|
|
40
|
+
declare function routePageTitled(path: String, component: String, title: String): any;
|
|
41
|
+
declare function routePage(path: String, component: String): any;
|
|
42
|
+
declare function events(): any;
|
|
43
|
+
declare function mathmlNs(): String;
|
|
44
|
+
declare function svgNs(): String;
|
|
45
|
+
declare function createElementNs(ns: String, tag: String, attrs: any, children: any): any;
|
|
46
|
+
declare function createElement(tag: String, attrs: any, children: any): any;
|
|
47
|
+
declare function Fragment$1(children: any): any;
|
|
48
|
+
declare function jsxs(tag: String, attrs: any, children: any): any;
|
|
49
|
+
declare function jsx(tag: String, attrs: any, children: any): any;
|
|
50
|
+
declare function show(cond: () => Bool, render: () => any): any;
|
|
51
|
+
declare function mount(root: any, node: any): Unit;
|
|
52
|
+
declare function render(root: any, node: any): Unit;
|
|
53
|
+
declare function textDyn(get_content: () => String): any;
|
|
54
|
+
declare function text(content: String): any;
|
|
55
|
+
declare function forEach(items: () => any, render_item: (_arg0: any, _arg1: Int) => any): any;
|
|
56
|
+
declare function onMount(fn_: () => Unit): Unit;
|
|
57
|
+
declare function hasOwner(): Bool;
|
|
58
|
+
declare function runWithOwner(owner: any, f: () => any): any;
|
|
59
|
+
declare function getOwner(): UnboxedOption<any>;
|
|
60
|
+
declare function createRoot(f: (_arg0: () => Unit) => any): any;
|
|
61
|
+
declare function onCleanup(cleanup: () => Unit): Unit;
|
|
62
|
+
declare function batch(f: () => any): any;
|
|
63
|
+
declare function runUntracked(f: () => any): any;
|
|
64
|
+
declare function batchEnd(): Unit;
|
|
65
|
+
declare function batchStart(): Unit;
|
|
66
|
+
declare function renderEffect(fn_: () => Unit): () => Unit;
|
|
67
|
+
declare function effect(fn_: () => Unit): () => Unit;
|
|
68
|
+
declare function combine(a: any, b: any, f: (_arg0: any, _arg1: any) => any): () => any;
|
|
69
|
+
declare function map(sig: any, f: (_arg0: any) => any): () => any;
|
|
70
|
+
declare function subscribe(sig: any, callback: (_arg0: any) => Unit): () => Unit;
|
|
71
|
+
declare function peek(sig: any): any;
|
|
72
|
+
declare function update(sig: any, f: (_arg0: any) => any): Unit;
|
|
73
|
+
declare function set(sig: any, value: any): Unit;
|
|
74
|
+
declare function get(sig: any): any;
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/index.d.ts
|
|
77
|
+
/**
|
|
78
|
+
* Represents a node created by Luna's reactive system.
|
|
79
|
+
* This is an opaque type - the actual structure is managed by MoonBit.
|
|
80
|
+
*/
|
|
81
|
+
type LunaNode = unknown;
|
|
82
|
+
type Accessor<T> = () => T;
|
|
83
|
+
type Setter<T> = (value: T | ((prev: T) => T)) => void;
|
|
84
|
+
type Signal<T> = [Accessor<T>, Setter<T>];
|
|
85
|
+
interface ForProps<T> {
|
|
86
|
+
each: Accessor<T[]> | T[];
|
|
87
|
+
fallback?: LunaNode;
|
|
88
|
+
children: (item: T, index: Accessor<number>) => LunaNode;
|
|
89
|
+
}
|
|
90
|
+
interface ShowProps<T> {
|
|
91
|
+
when: T | Accessor<T>;
|
|
92
|
+
fallback?: LunaNode;
|
|
93
|
+
/** Must be a function to ensure proper lifecycle (onCleanup/onMount) support */
|
|
94
|
+
children: (() => LunaNode) | ((item: NonNullable<T>) => LunaNode);
|
|
95
|
+
}
|
|
96
|
+
interface IndexProps<T> {
|
|
97
|
+
each: Accessor<T[]> | T[];
|
|
98
|
+
fallback?: LunaNode;
|
|
99
|
+
children: (item: Accessor<T>, index: number) => LunaNode;
|
|
100
|
+
}
|
|
101
|
+
interface Context<T> {
|
|
102
|
+
id: number;
|
|
103
|
+
default_value: () => T;
|
|
104
|
+
providers: unknown[];
|
|
105
|
+
}
|
|
106
|
+
interface ProviderProps<T> {
|
|
107
|
+
context: Context<T>;
|
|
108
|
+
value: T;
|
|
109
|
+
/** Must be a function to ensure proper context access and lifecycle (onCleanup/onMount) support */
|
|
110
|
+
children: () => LunaNode;
|
|
111
|
+
}
|
|
112
|
+
interface MatchProps<T> {
|
|
113
|
+
when: T | Accessor<T>;
|
|
114
|
+
/** Must be a function to ensure proper lifecycle (onCleanup/onMount) support */
|
|
115
|
+
children: (() => LunaNode) | ((item: NonNullable<T>) => LunaNode);
|
|
116
|
+
}
|
|
117
|
+
interface SwitchProps {
|
|
118
|
+
fallback?: LunaNode;
|
|
119
|
+
children: LunaNode[];
|
|
120
|
+
}
|
|
121
|
+
interface PortalProps {
|
|
122
|
+
mount?: Element | string;
|
|
123
|
+
useShadow?: boolean;
|
|
124
|
+
/** Must be a function to ensure proper lifecycle (onCleanup/onMount) support */
|
|
125
|
+
children: () => LunaNode;
|
|
126
|
+
}
|
|
127
|
+
interface ResourceAccessor<T> {
|
|
128
|
+
(): T | undefined;
|
|
129
|
+
loading: boolean;
|
|
130
|
+
error: string | undefined;
|
|
131
|
+
state: 'pending' | 'ready' | 'errored' | 'unresolved';
|
|
132
|
+
latest: T | undefined;
|
|
133
|
+
}
|
|
134
|
+
type SetStoreFunction<T> = (...args: any[]) => void;
|
|
135
|
+
/**
|
|
136
|
+
* Creates a reactive signal (SolidJS-style)
|
|
137
|
+
*/
|
|
138
|
+
declare function createSignal<T>(initialValue: T): Signal<T>;
|
|
139
|
+
/**
|
|
140
|
+
* Creates a reactive effect (SolidJS-style)
|
|
141
|
+
* Deferred execution via microtask - runs after rendering completes
|
|
142
|
+
*/
|
|
143
|
+
declare function createEffect(fn: () => void): () => void;
|
|
144
|
+
/**
|
|
145
|
+
* Creates a render effect (SolidJS-style)
|
|
146
|
+
* Immediate/synchronous execution - runs during rendering
|
|
147
|
+
*/
|
|
148
|
+
declare function createRenderEffect(fn: () => void): () => void;
|
|
149
|
+
/**
|
|
150
|
+
* Creates a memoized computed value (SolidJS-style)
|
|
151
|
+
*/
|
|
152
|
+
declare function createMemo<T>(fn: () => T): Accessor<T>;
|
|
153
|
+
/**
|
|
154
|
+
* Explicit dependency tracking helper (SolidJS-style)
|
|
155
|
+
* Wraps a function to explicitly specify which signals to track
|
|
156
|
+
*
|
|
157
|
+
* @template T
|
|
158
|
+
* @template U
|
|
159
|
+
* @param {(() => T) | Array<() => any>} deps - Signal accessor(s) to track
|
|
160
|
+
* @param {(input: T, prevInput?: T, prevValue?: U) => U} fn - Function to run with dependency values
|
|
161
|
+
* @param {{ defer?: boolean }} [options] - Options (defer: don't run on initial)
|
|
162
|
+
* @returns {(prevValue?: U) => U | undefined}
|
|
163
|
+
*/
|
|
164
|
+
declare function on(deps: any, fn: any, options?: {}): (injectedPrevValue: any) => any;
|
|
165
|
+
/**
|
|
166
|
+
* Merge multiple props objects, with later objects taking precedence (SolidJS-style)
|
|
167
|
+
* Event handlers and refs are merged, other props are overwritten
|
|
168
|
+
*
|
|
169
|
+
* @template T
|
|
170
|
+
* @param {...T} sources - Props objects to merge
|
|
171
|
+
* @returns {T}
|
|
172
|
+
*/
|
|
173
|
+
declare function mergeProps(...sources: any[]): {};
|
|
174
|
+
/**
|
|
175
|
+
* Split props into multiple objects based on key lists (SolidJS-style)
|
|
176
|
+
*
|
|
177
|
+
* @template T
|
|
178
|
+
* @template K
|
|
179
|
+
* @param {T} props - Props object to split
|
|
180
|
+
* @param {...K[]} keys - Arrays of keys to extract
|
|
181
|
+
* @returns {[Pick<T, K>, Omit<T, K>]}
|
|
182
|
+
*/
|
|
183
|
+
declare function splitProps(props: any, ...keys: any[]): any[];
|
|
184
|
+
/**
|
|
185
|
+
* Creates a resource for async data (SolidJS-style)
|
|
186
|
+
*/
|
|
187
|
+
declare function createResource<T>(fetcher: (resolve: (v: T) => void, reject: (e: string) => void) => void): [ResourceAccessor<T>, {
|
|
188
|
+
refetch: () => void;
|
|
189
|
+
}];
|
|
190
|
+
/**
|
|
191
|
+
* Creates a deferred resource (SolidJS-style)
|
|
192
|
+
*/
|
|
193
|
+
declare function createDeferred<T>(): [ResourceAccessor<T>, (value: T) => void, (error: string) => void];
|
|
194
|
+
/**
|
|
195
|
+
* Debounces a signal (returns SolidJS-style signal)
|
|
196
|
+
*/
|
|
197
|
+
declare function debounced<T>(signal: Signal<T>, delayMs: number): Signal<T>;
|
|
198
|
+
/**
|
|
199
|
+
* JSX-compatible Fragment component.
|
|
200
|
+
* Wraps children in a LunaNode fragment for use in JSX.
|
|
201
|
+
* Also supports direct array call for backwards compatibility: Fragment([...])
|
|
202
|
+
*/
|
|
203
|
+
declare function Fragment(propsOrChildren: {
|
|
204
|
+
children?: any;
|
|
205
|
+
} | any[]): any;
|
|
206
|
+
/**
|
|
207
|
+
* For component for list rendering (SolidJS-style)
|
|
208
|
+
*/
|
|
209
|
+
declare function For<T>(props: ForProps<T>): any;
|
|
210
|
+
/**
|
|
211
|
+
* Show component for conditional rendering (SolidJS-style)
|
|
212
|
+
*/
|
|
213
|
+
declare function Show<T>(props: ShowProps<T>): any;
|
|
214
|
+
/**
|
|
215
|
+
* Index component for index-based list rendering (SolidJS-style)
|
|
216
|
+
*/
|
|
217
|
+
declare function Index<T>(props: IndexProps<T>): any;
|
|
218
|
+
/**
|
|
219
|
+
* Provider component for Context (SolidJS-style)
|
|
220
|
+
* Children must be a function: {() => <Child />}
|
|
221
|
+
*/
|
|
222
|
+
declare function Provider<T>(props: ProviderProps<T>): any;
|
|
223
|
+
/**
|
|
224
|
+
* Switch component for conditional rendering with multiple branches (SolidJS-style)
|
|
225
|
+
* Reactively updates when conditions change.
|
|
226
|
+
*/
|
|
227
|
+
declare function Switch(props: SwitchProps): any;
|
|
228
|
+
/**
|
|
229
|
+
* Match component for use inside Switch (SolidJS-style)
|
|
230
|
+
*/
|
|
231
|
+
declare function Match<T>(props: MatchProps<T>): {
|
|
232
|
+
__isMatch: true;
|
|
233
|
+
when: () => boolean;
|
|
234
|
+
condition: () => T;
|
|
235
|
+
children: () => any;
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Portal component for rendering outside the component tree (SolidJS-style)
|
|
239
|
+
* Children must be a function: {() => <Child />}
|
|
240
|
+
*/
|
|
241
|
+
declare function Portal(props: PortalProps): any;
|
|
242
|
+
/**
|
|
243
|
+
* Creates a reactive store with nested property tracking (SolidJS-style)
|
|
244
|
+
*/
|
|
245
|
+
declare function createStore<T extends object>(initialValue: T): [T, SetStoreFunction<T>];
|
|
246
|
+
/**
|
|
247
|
+
* Produce helper for immer-style mutations (SolidJS-style)
|
|
248
|
+
* @template T
|
|
249
|
+
* @param {(draft: T) => void} fn - Mutation function
|
|
250
|
+
* @returns {(state: T) => T} - Function that applies mutations to a copy
|
|
251
|
+
*/
|
|
252
|
+
declare function produce(fn: any): (state: any) => any;
|
|
253
|
+
/**
|
|
254
|
+
* Reconcile helper for efficient array/object updates (SolidJS-style)
|
|
255
|
+
* @template T
|
|
256
|
+
* @param {T} value - New value to reconcile
|
|
257
|
+
* @returns {(state: T) => T} - Function that returns the new value
|
|
258
|
+
*/
|
|
259
|
+
declare function reconcile(value: any): () => any;
|
|
260
|
+
//#endregion
|
|
261
|
+
export { jsxs as $, debounced as A, runWithOwner as At, combine as B, text as Bt, createDeferred as C, routePageTitled as Ct, createResource as D, routerNavigate as Dt, createRenderEffect as E, routerGetPath as Et, splitProps as F, stateIsPending as Ft, createRouter as G, createElement as H, update as Ht, Fragment$1 as I, stateIsSuccess as It, forEach as J, effect as K, batch as L, stateValue as Lt, on as M, show as Mt, produce as N, stateError as Nt, createSignal as O, routerReplace as Ot, reconcile as P, stateIsFailure as Pt, jsx as Q, batchEnd as R, subscribe as Rt, SwitchProps as S, routePageFull as St, createMemo as T, routerGetMatch as Tt, createElementNs as U, useContext as Ut, createContext as V, textDyn as Vt, createRoot as W, getOwner as X, get as Y, hasOwner as Z, Setter as _, resourceIsSuccess as _t, Fragment as a, peek as at, Signal as b, resourceValue as bt, LunaNode as c, portalToSelector as ct, Portal as d, render as dt, map as et, PortalProps as f, renderEffect as ft, SetStoreFunction as g, resourceIsPending as gt, ResourceAccessor as h, resourceIsFailure as ht, ForProps as i, onMount as it, mergeProps as j, set as jt, createStore as k, runUntracked as kt, Match as l, portalWithShadow as lt, ProviderProps as m, resourceGet as mt, Context as n, mount as nt, Index as o, portalToBody as ot, Provider as p, resourceError as pt, events as q, For as r, onCleanup as rt, IndexProps as s, portalToElementWithShadow as st, Accessor as t, mathmlNs as tt, MatchProps as u, provide as ut, Show as v, resourcePeek as vt, createEffect as w, routerGetBase as wt, Switch as x, routePage as xt, ShowProps as y, resourceRefetch as yt, batchStart as z, svgNs as zt };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,252 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type Unit = undefined;
|
|
6
|
-
type Bool = boolean;
|
|
7
|
-
/**
|
|
8
|
-
* A signed integer in 32-bit two's complement format.
|
|
9
|
-
*/
|
|
10
|
-
type Int = number;
|
|
11
|
-
type String = string;
|
|
12
|
-
type UnboxedOption<T> = /* Some */T | /* None */undefined;
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region ../../target/js/release/build/platform/js/api/api.d.ts
|
|
15
|
-
declare function portalToElementWithShadow(mount: any, children: any): any;
|
|
16
|
-
declare function portalWithShadow(children: any): any;
|
|
17
|
-
declare function portalToSelector(selector: String, children: any): any;
|
|
18
|
-
declare function portalToBody(children: any): any;
|
|
19
|
-
declare function stateError(state: any): String;
|
|
20
|
-
declare function stateValue(state: any): any;
|
|
21
|
-
declare function stateIsFailure(state: any): Bool;
|
|
22
|
-
declare function stateIsSuccess(state: any): Bool;
|
|
23
|
-
declare function stateIsPending(state: any): Bool;
|
|
24
|
-
declare function resourceError(res: any): String;
|
|
25
|
-
declare function resourceValue(res: any): any;
|
|
26
|
-
declare function resourceIsFailure(res: any): Bool;
|
|
27
|
-
declare function resourceIsSuccess(res: any): Bool;
|
|
28
|
-
declare function resourceIsPending(res: any): Bool;
|
|
29
|
-
declare function resourceRefetch(res: any): Unit;
|
|
30
|
-
declare function resourcePeek(res: any): any;
|
|
31
|
-
declare function resourceGet(res: any): any;
|
|
32
|
-
declare function useContext(ctx: any): any;
|
|
33
|
-
declare function provide(ctx: any, value: any, f: () => any): any;
|
|
34
|
-
declare function createContext(default_value: any): any;
|
|
35
|
-
declare function routerGetBase(router: any): String;
|
|
36
|
-
declare function routerGetMatch(router: any): UnboxedOption<any>;
|
|
37
|
-
declare function routerGetPath(router: any): String;
|
|
38
|
-
declare function routerReplace(router: any, path: String): Unit;
|
|
39
|
-
declare function routerNavigate(router: any, path: String): Unit;
|
|
40
|
-
declare function createRouter(routes: any, base$46$opt: UnboxedOption<String>): any;
|
|
41
|
-
declare function routePageFull(path: String, component: String, title: String, meta: any): any;
|
|
42
|
-
declare function routePageTitled(path: String, component: String, title: String): any;
|
|
43
|
-
declare function routePage(path: String, component: String): any;
|
|
44
|
-
declare function events(): any;
|
|
45
|
-
declare function mathmlNs(): String;
|
|
46
|
-
declare function svgNs(): String;
|
|
47
|
-
declare function createElementNs(ns: String, tag: String, attrs: any, children: any): any;
|
|
48
|
-
declare function createElement(tag: String, attrs: any, children: any): any;
|
|
49
|
-
declare function Fragment$1(children: any): any;
|
|
50
|
-
declare function jsxs(tag: String, attrs: any, children: any): any;
|
|
51
|
-
declare function jsx(tag: String, attrs: any, children: any): any;
|
|
52
|
-
declare function show(cond: () => Bool, render: () => any): any;
|
|
53
|
-
declare function mount(root: any, node: any): Unit;
|
|
54
|
-
declare function render(root: any, node: any): Unit;
|
|
55
|
-
declare function textDyn(get_content: () => String): any;
|
|
56
|
-
declare function text(content: String): any;
|
|
57
|
-
declare function forEach(items: () => any, render_item: (_arg0: any, _arg1: Int) => any): any;
|
|
58
|
-
declare function onMount(fn_: () => Unit): Unit;
|
|
59
|
-
declare function hasOwner(): Bool;
|
|
60
|
-
declare function runWithOwner(owner: any, f: () => any): any;
|
|
61
|
-
declare function getOwner(): UnboxedOption<any>;
|
|
62
|
-
declare function createRoot(f: (_arg0: () => Unit) => any): any;
|
|
63
|
-
declare function onCleanup(cleanup: () => Unit): Unit;
|
|
64
|
-
declare function batch(f: () => any): any;
|
|
65
|
-
declare function runUntracked(f: () => any): any;
|
|
66
|
-
declare function batchEnd(): Unit;
|
|
67
|
-
declare function batchStart(): Unit;
|
|
68
|
-
declare function renderEffect(fn_: () => Unit): () => Unit;
|
|
69
|
-
declare function effect(fn_: () => Unit): () => Unit;
|
|
70
|
-
declare function combine(a: any, b: any, f: (_arg0: any, _arg1: any) => any): () => any;
|
|
71
|
-
declare function map(sig: any, f: (_arg0: any) => any): () => any;
|
|
72
|
-
declare function subscribe(sig: any, callback: (_arg0: any) => Unit): () => Unit;
|
|
73
|
-
declare function peek(sig: any): any;
|
|
74
|
-
declare function update(sig: any, f: (_arg0: any) => any): Unit;
|
|
75
|
-
declare function set(sig: any, value: any): Unit;
|
|
76
|
-
declare function get(sig: any): any;
|
|
77
|
-
//#endregion
|
|
78
|
-
//#region src/index.d.ts
|
|
79
|
-
type Accessor<T> = () => T;
|
|
80
|
-
type Setter<T> = (value: T | ((prev: T) => T)) => void;
|
|
81
|
-
type Signal<T> = [Accessor<T>, Setter<T>];
|
|
82
|
-
interface ForProps<T> {
|
|
83
|
-
each: Accessor<T[]> | T[];
|
|
84
|
-
fallback?: any;
|
|
85
|
-
children: (item: T, index: Accessor<number>) => any;
|
|
86
|
-
}
|
|
87
|
-
interface ShowProps<T> {
|
|
88
|
-
when: T | Accessor<T>;
|
|
89
|
-
fallback?: any;
|
|
90
|
-
children: any | ((item: T) => any);
|
|
91
|
-
}
|
|
92
|
-
interface IndexProps<T> {
|
|
93
|
-
each: Accessor<T[]> | T[];
|
|
94
|
-
fallback?: any;
|
|
95
|
-
children: (item: Accessor<T>, index: number) => any;
|
|
96
|
-
}
|
|
97
|
-
interface Context<T> {
|
|
98
|
-
id: number;
|
|
99
|
-
default_value: () => T;
|
|
100
|
-
providers: any[];
|
|
101
|
-
}
|
|
102
|
-
interface ProviderProps<T> {
|
|
103
|
-
context: Context<T>;
|
|
104
|
-
value: T;
|
|
105
|
-
children: any | (() => any);
|
|
106
|
-
}
|
|
107
|
-
interface MatchProps<T> {
|
|
108
|
-
when: T | Accessor<T>;
|
|
109
|
-
children: any | ((item: T) => any);
|
|
110
|
-
}
|
|
111
|
-
interface SwitchProps {
|
|
112
|
-
fallback?: any;
|
|
113
|
-
children: any[];
|
|
114
|
-
}
|
|
115
|
-
interface PortalProps {
|
|
116
|
-
mount?: Element | string;
|
|
117
|
-
useShadow?: boolean;
|
|
118
|
-
children: any | (() => any);
|
|
119
|
-
}
|
|
120
|
-
interface ResourceAccessor<T> {
|
|
121
|
-
(): T | undefined;
|
|
122
|
-
loading: boolean;
|
|
123
|
-
error: string | undefined;
|
|
124
|
-
state: 'pending' | 'ready' | 'errored' | 'unresolved';
|
|
125
|
-
latest: T | undefined;
|
|
126
|
-
}
|
|
127
|
-
type SetStoreFunction<T> = (...args: any[]) => void;
|
|
128
|
-
/**
|
|
129
|
-
* Creates a reactive signal (SolidJS-style)
|
|
130
|
-
*/
|
|
131
|
-
declare function createSignal<T>(initialValue: T): Signal<T>;
|
|
132
|
-
/**
|
|
133
|
-
* Creates a reactive effect (SolidJS-style)
|
|
134
|
-
* Deferred execution via microtask - runs after rendering completes
|
|
135
|
-
*/
|
|
136
|
-
declare function createEffect(fn: () => void): () => void;
|
|
137
|
-
/**
|
|
138
|
-
* Creates a render effect (SolidJS-style)
|
|
139
|
-
* Immediate/synchronous execution - runs during rendering
|
|
140
|
-
*/
|
|
141
|
-
declare function createRenderEffect(fn: () => void): () => void;
|
|
142
|
-
/**
|
|
143
|
-
* Creates a memoized computed value (SolidJS-style)
|
|
144
|
-
*/
|
|
145
|
-
declare function createMemo<T>(fn: () => T): Accessor<T>;
|
|
146
|
-
/**
|
|
147
|
-
* Explicit dependency tracking helper (SolidJS-style)
|
|
148
|
-
* Wraps a function to explicitly specify which signals to track
|
|
149
|
-
*
|
|
150
|
-
* @template T
|
|
151
|
-
* @template U
|
|
152
|
-
* @param {(() => T) | Array<() => any>} deps - Signal accessor(s) to track
|
|
153
|
-
* @param {(input: T, prevInput?: T, prevValue?: U) => U} fn - Function to run with dependency values
|
|
154
|
-
* @param {{ defer?: boolean }} [options] - Options (defer: don't run on initial)
|
|
155
|
-
* @returns {(prevValue?: U) => U | undefined}
|
|
156
|
-
*/
|
|
157
|
-
declare function on(deps: any, fn: any, options?: {}): (injectedPrevValue: any) => any;
|
|
158
|
-
/**
|
|
159
|
-
* Merge multiple props objects, with later objects taking precedence (SolidJS-style)
|
|
160
|
-
* Event handlers and refs are merged, other props are overwritten
|
|
161
|
-
*
|
|
162
|
-
* @template T
|
|
163
|
-
* @param {...T} sources - Props objects to merge
|
|
164
|
-
* @returns {T}
|
|
165
|
-
*/
|
|
166
|
-
declare function mergeProps(...sources: any[]): {};
|
|
167
|
-
/**
|
|
168
|
-
* Split props into multiple objects based on key lists (SolidJS-style)
|
|
169
|
-
*
|
|
170
|
-
* @template T
|
|
171
|
-
* @template K
|
|
172
|
-
* @param {T} props - Props object to split
|
|
173
|
-
* @param {...K[]} keys - Arrays of keys to extract
|
|
174
|
-
* @returns {[Pick<T, K>, Omit<T, K>]}
|
|
175
|
-
*/
|
|
176
|
-
declare function splitProps(props: any, ...keys: any[]): any[];
|
|
177
|
-
/**
|
|
178
|
-
* Creates a resource for async data (SolidJS-style)
|
|
179
|
-
*/
|
|
180
|
-
declare function createResource<T>(fetcher: (resolve: (v: T) => void, reject: (e: string) => void) => void): [ResourceAccessor<T>, {
|
|
181
|
-
refetch: () => void;
|
|
182
|
-
}];
|
|
183
|
-
/**
|
|
184
|
-
* Creates a deferred resource (SolidJS-style)
|
|
185
|
-
*/
|
|
186
|
-
declare function createDeferred<T>(): [ResourceAccessor<T>, (value: T) => void, (error: string) => void];
|
|
187
|
-
/**
|
|
188
|
-
* Debounces a signal (returns SolidJS-style signal)
|
|
189
|
-
*/
|
|
190
|
-
declare function debounced<T>(signal: Signal<T>, delayMs: number): Signal<T>;
|
|
191
|
-
/**
|
|
192
|
-
* JSX-compatible Fragment component.
|
|
193
|
-
* Wraps children in a DomNode fragment for use in JSX.
|
|
194
|
-
* Also supports direct array call for backwards compatibility: Fragment([...])
|
|
195
|
-
*/
|
|
196
|
-
declare function Fragment(propsOrChildren: {
|
|
197
|
-
children?: any;
|
|
198
|
-
} | any[]): any;
|
|
199
|
-
/**
|
|
200
|
-
* For component for list rendering (SolidJS-style)
|
|
201
|
-
*/
|
|
202
|
-
declare function For<T>(props: ForProps<T>): any;
|
|
203
|
-
/**
|
|
204
|
-
* Show component for conditional rendering (SolidJS-style)
|
|
205
|
-
*/
|
|
206
|
-
declare function Show<T>(props: ShowProps<T>): any;
|
|
207
|
-
/**
|
|
208
|
-
* Index component for index-based list rendering (SolidJS-style)
|
|
209
|
-
*/
|
|
210
|
-
declare function Index<T>(props: IndexProps<T>): any;
|
|
211
|
-
/**
|
|
212
|
-
* Provider component for Context (SolidJS-style)
|
|
213
|
-
*/
|
|
214
|
-
declare function Provider<T>(props: ProviderProps<T>): any;
|
|
215
|
-
/**
|
|
216
|
-
* Switch component for conditional rendering with multiple branches (SolidJS-style)
|
|
217
|
-
* Reactively updates when conditions change.
|
|
218
|
-
*/
|
|
219
|
-
declare function Switch(props: SwitchProps): any;
|
|
220
|
-
/**
|
|
221
|
-
* Match component for use inside Switch (SolidJS-style)
|
|
222
|
-
*/
|
|
223
|
-
declare function Match<T>(props: MatchProps<T>): {
|
|
224
|
-
__isMatch: true;
|
|
225
|
-
when: () => boolean;
|
|
226
|
-
condition: () => T;
|
|
227
|
-
children: () => any;
|
|
228
|
-
};
|
|
229
|
-
/**
|
|
230
|
-
* Portal component for rendering outside the component tree (SolidJS-style)
|
|
231
|
-
*/
|
|
232
|
-
declare function Portal(props: PortalProps): any;
|
|
233
|
-
/**
|
|
234
|
-
* Creates a reactive store with nested property tracking (SolidJS-style)
|
|
235
|
-
*/
|
|
236
|
-
declare function createStore<T extends object>(initialValue: T): [T, SetStoreFunction<T>];
|
|
237
|
-
/**
|
|
238
|
-
* Produce helper for immer-style mutations (SolidJS-style)
|
|
239
|
-
* @template T
|
|
240
|
-
* @param {(draft: T) => void} fn - Mutation function
|
|
241
|
-
* @returns {(state: T) => T} - Function that applies mutations to a copy
|
|
242
|
-
*/
|
|
243
|
-
declare function produce(fn: any): (state: any) => any;
|
|
244
|
-
/**
|
|
245
|
-
* Reconcile helper for efficient array/object updates (SolidJS-style)
|
|
246
|
-
* @template T
|
|
247
|
-
* @param {T} value - New value to reconcile
|
|
248
|
-
* @returns {(state: T) => T} - Function that returns the new value
|
|
249
|
-
*/
|
|
250
|
-
declare function reconcile(value: any): () => any;
|
|
251
|
-
//#endregion
|
|
252
|
-
export { Accessor, Context, For, ForProps, Fragment, Index, IndexProps, Match, MatchProps, Portal, PortalProps, Provider, ProviderProps, ResourceAccessor, SetStoreFunction, Setter, Show, ShowProps, Signal, Switch, SwitchProps, batch, batchEnd, batchStart, combine, createContext, createDeferred, createEffect, createElement, createElementNs, createMemo, createRenderEffect, createResource, createRoot, createRouter, createSignal, createStore, debounced, effect, events, forEach, Fragment$1 as fragment, get, getButton, getClientPos, getClosest, getDataAttr, getDataId, getDataset, getDroppedFiles, getKey, getMovement, getOffsetPos, getOwner, getPagePos, getSelectedIndex, getTargetChecked, getTargetValue, getTextData, getWheelDelta, hasCmdOrCtrl, hasModifier, hasOwner, isComposing, isEnterKey, isEscapeKey, isPrimaryButton, isSecondaryButton, jsx, jsxs, map, matchesSelector, mathmlNs, mergeProps, mount, on, onCleanup, onMount, peek, portalToBody, portalToElementWithShadow, portalToSelector, portalWithShadow, preventDefault, produce, provide, reconcile, render, renderEffect, resourceError, resourceGet, resourceIsFailure, resourceIsPending, resourceIsSuccess, resourcePeek, resourceRefetch, resourceValue, routePage, routePageFull, routePageTitled, routerGetBase, routerGetMatch, routerGetPath, routerNavigate, routerReplace, runUntracked, runUntracked as untrack, runWithOwner, set, show, splitProps, stateError, stateIsFailure, stateIsPending, stateIsSuccess, stateValue, stopEvent, stopPropagation, subscribe, svgNs, text, textDyn, update, useContext };
|
|
1
|
+
import { C as isSecondaryButton, D as stopPropagation, E as stopEvent, S as isPrimaryButton, T as preventDefault, _ as hasCmdOrCtrl, a as getDataId, b as isEnterKey, c as getKey, d as getPagePos, f as getSelectedIndex, g as getWheelDelta, h as getTextData, i as getDataAttr, l as getMovement, m as getTargetValue, n as getClientPos, o as getDataset, p as getTargetChecked, r as getClosest, s as getDroppedFiles, t as getButton, u as getOffsetPos, v as hasModifier, w as matchesSelector, x as isEscapeKey, y as isComposing } from "./event-utils-Cd5f3Njd.js";
|
|
2
|
+
import { $ as jsxs, A as debounced, At as runWithOwner, B as combine, Bt as text, C as createDeferred, Ct as routePageTitled, D as createResource, Dt as routerNavigate, E as createRenderEffect, Et as routerGetPath, F as splitProps, Ft as stateIsPending, G as createRouter, H as createElement, Ht as update, I as Fragment$1, It as stateIsSuccess, J as forEach, K as effect, L as batch, Lt as stateValue, M as on, Mt as show, N as produce, Nt as stateError, O as createSignal, Ot as routerReplace, P as reconcile, Pt as stateIsFailure, Q as jsx, R as batchEnd, Rt as subscribe, S as SwitchProps, St as routePageFull, T as createMemo, Tt as routerGetMatch, U as createElementNs, Ut as useContext, V as createContext, Vt as textDyn, W as createRoot, X as getOwner, Y as get, Z as hasOwner, _ as Setter, _t as resourceIsSuccess, a as Fragment, at as peek, b as Signal, bt as resourceValue, c as LunaNode, ct as portalToSelector, d as Portal, dt as render, et as map, f as PortalProps, ft as renderEffect, g as SetStoreFunction, gt as resourceIsPending, h as ResourceAccessor, ht as resourceIsFailure, i as ForProps, it as onMount, j as mergeProps, jt as set, k as createStore, kt as runUntracked, l as Match, lt as portalWithShadow, m as ProviderProps, mt as resourceGet, n as Context, nt as mount, o as Index, ot as portalToBody, p as Provider, pt as resourceError, q as events, r as For, rt as onCleanup, s as IndexProps, st as portalToElementWithShadow, t as Accessor, tt as mathmlNs, u as MatchProps, ut as provide, v as Show, vt as resourcePeek, w as createEffect, wt as routerGetBase, x as Switch, xt as routePage, y as ShowProps, yt as resourceRefetch, z as batchStart, zt as svgNs } from "./index-CyEkcO3_.js";
|
|
3
|
+
export { Accessor, Context, For, ForProps, Fragment, Index, IndexProps, LunaNode, Match, MatchProps, Portal, PortalProps, Provider, ProviderProps, ResourceAccessor, SetStoreFunction, Setter, Show, ShowProps, Signal, Switch, SwitchProps, batch, batchEnd, batchStart, combine, createContext, createDeferred, createEffect, createElement, createElementNs, createMemo, createRenderEffect, createResource, createRoot, createRouter, createSignal, createStore, debounced, effect, events, forEach, Fragment$1 as fragment, get, getButton, getClientPos, getClosest, getDataAttr, getDataId, getDataset, getDroppedFiles, getKey, getMovement, getOffsetPos, getOwner, getPagePos, getSelectedIndex, getTargetChecked, getTargetValue, getTextData, getWheelDelta, hasCmdOrCtrl, hasModifier, hasOwner, isComposing, isEnterKey, isEscapeKey, isPrimaryButton, isSecondaryButton, jsx, jsxs, map, matchesSelector, mathmlNs, mergeProps, mount, on, onCleanup, onMount, peek, portalToBody, portalToElementWithShadow, portalToSelector, portalWithShadow, preventDefault, produce, provide, reconcile, render, renderEffect, resourceError, resourceGet, resourceIsFailure, resourceIsPending, resourceIsSuccess, resourcePeek, resourceRefetch, resourceValue, routePage, routePageFull, routePageTitled, routerGetBase, routerGetMatch, routerGetPath, routerNavigate, routerReplace, runUntracked, runUntracked as untrack, runWithOwner, set, show, splitProps, stateError, stateIsFailure, stateIsPending, stateIsSuccess, stateValue, stopEvent, stopPropagation, subscribe, svgNs, text, textDyn, update, useContext };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as ee,A as te,B as e,C as t,Ct as n,D as r,Dt as i,E as a,Et as o,F as s,G as c,H as l,I as u,J as d,K as f,L as p,M as m,N as h,O as g,Ot as _,P as v,Q as y,R as b,S as x,St as S,T as C,Tt as w,U as T,V as E,W as D,X as O,Y as k,Z as A,_ as j,_t as M,a as N,at as P,b as F,bt as I,c as L,ct as R,d as z,dt as B,et as V,f as H,ft as U,g as W,gt as G,h as K,ht as q,i as J,it as Y,j as X,k as Z,kt as Q,l as ne,lt as $,m as re,mt as ie,n as ae,nt as oe,o as se,ot as ce,p as le,pt as ue,q as de,r as fe,rt as pe,s as me,st as he,t as ge,tt as _e,u as ve,ut as ye,v as be,vt as xe,w as Se,wt as Ce,x as we,xt as Te,y as Ee,yt as De,z as Oe}from"./src-
|
|
1
|
+
import{$ as ee,A as te,B as e,C as t,Ct as n,D as r,Dt as i,E as a,Et as o,F as s,G as c,H as l,I as u,J as d,K as f,L as p,M as m,N as h,O as g,Ot as _,P as v,Q as y,R as b,S as x,St as S,T as C,Tt as w,U as T,V as E,W as D,X as O,Y as k,Z as A,_ as j,_t as M,a as N,at as P,b as F,bt as I,c as L,ct as R,d as z,dt as B,et as V,f as H,ft as U,g as W,gt as G,h as K,ht as q,i as J,it as Y,j as X,k as Z,kt as Q,l as ne,lt as $,m as re,mt as ie,n as ae,nt as oe,o as se,ot as ce,p as le,pt as ue,q as de,r as fe,rt as pe,s as me,st as he,t as ge,tt as _e,u as ve,ut as ye,v as be,vt as xe,w as Se,wt as Ce,x as we,xt as Te,y as Ee,yt as De,z as Oe}from"./src-D_3vg6h3.js";import{C as ke,D as Ae,E as je,S as Me,T as Ne,_ as Pe,a as Fe,b as Ie,c as Le,d as Re,f as ze,g as Be,h as Ve,i as He,l as Ue,m as We,n as Ge,o as Ke,p as qe,r as Je,s as Ye,t as Xe,u as Ze,v as Qe,w as $e,x as et,y as tt}from"./event-utils-C_M2XBNj.js";export{ge as For,ae as Fragment,fe as Index,J as Match,N as Portal,se as Provider,me as Show,L as Switch,x as batch,t as batchEnd,Se as batchStart,C as combine,a as createContext,ne as createDeferred,ve as createEffect,r as createElement,g as createElementNs,z as createMemo,H as createRenderEffect,le as createResource,Z as createRoot,te as createRouter,re as createSignal,K as createStore,W as debounced,X as effect,m as events,h as forEach,v as fragment,s as get,Xe as getButton,Ge as getClientPos,Je as getClosest,He as getDataAttr,Fe as getDataId,Ke as getDataset,Ye as getDroppedFiles,Le as getKey,Ue as getMovement,Ze as getOffsetPos,u as getOwner,Re as getPagePos,ze as getSelectedIndex,qe as getTargetChecked,We as getTargetValue,Ve as getTextData,Be as getWheelDelta,Pe as hasCmdOrCtrl,Qe as hasModifier,p as hasOwner,tt as isComposing,Ie as isEnterKey,et as isEscapeKey,Me as isPrimaryButton,ke as isSecondaryButton,b as jsx,Oe as jsxs,e as map,$e as matchesSelector,E as mathmlNs,j as mergeProps,l as mount,be as on,T as onCleanup,D as onMount,c as peek,f as portalToBody,de as portalToElementWithShadow,d as portalToSelector,k as portalWithShadow,Ne as preventDefault,Ee as produce,O as provide,F as reconcile,y as render,A as renderEffect,ee as resourceError,V as resourceGet,_e as resourceIsFailure,oe as resourceIsPending,pe as resourceIsSuccess,Y as resourcePeek,P as resourceRefetch,ce as resourceValue,he as routePage,R as routePageFull,$ as routePageTitled,ye as routerGetBase,B as routerGetMatch,U as routerGetPath,ue as routerNavigate,ie as routerReplace,q as runUntracked,q as untrack,G as runWithOwner,M as set,xe as show,we as splitProps,De as stateError,I as stateIsFailure,Te as stateIsPending,S as stateIsSuccess,n as stateValue,je as stopEvent,Ae as stopPropagation,Ce as subscribe,w as svgNs,o as text,i as textDyn,_ as update,Q as useContext};
|
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./src-
|
|
1
|
+
import"./src-D_3vg6h3.js";import{Fragment as e,jsx as t,jsxDEV as n,jsxs as r}from"./jsx-runtime.js";export{e as Fragment,t as jsx,n as jsxDEV,r as jsxs};
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { c as LunaNode } from "./index-CyEkcO3_.js";
|
|
2
|
+
|
|
1
3
|
//#region src/jsx-runtime.d.ts
|
|
2
4
|
type MaybeAccessor<T> = T | (() => T);
|
|
3
5
|
interface HTMLAttributes {
|
|
@@ -66,7 +68,7 @@ declare function Fragment({
|
|
|
66
68
|
}): unknown;
|
|
67
69
|
declare const jsxDEV: typeof jsx;
|
|
68
70
|
declare namespace JSX {
|
|
69
|
-
type Element =
|
|
71
|
+
type Element = LunaNode;
|
|
70
72
|
interface IntrinsicElements {
|
|
71
73
|
a: HTMLAttributes;
|
|
72
74
|
abbr: HTMLAttributes;
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e,Dt as t,Et as n,n as r}from"./src-
|
|
1
|
+
import{D as e,Dt as t,Et as n,n as r}from"./src-D_3vg6h3.js";function i(e){return typeof e==`string`?e:typeof e!=`object`||!e?``:Object.entries(e).map(([e,t])=>`${e.replace(/([A-Z])/g,`-$1`).toLowerCase()}: ${t}`).join(`; `)}function a(e){if(!e)return[];let t=[];for(let[n,r]of Object.entries(e)){if(n===`children`)continue;let e=n,a;if(n===`className`&&(e=`class`),n===`style`){a={$tag:0,_0:i(r)},t.push({_0:e,_1:a});continue}if(n===`ref`&&typeof r==`function`){e=`__ref`,a={$tag:2,_0:r},t.push({_0:e,_1:a});continue}if(n.startsWith(`on`)&&typeof r==`function`){e=n.slice(2).toLowerCase(),a={$tag:2,_0:r},t.push({_0:e,_1:a});continue}a=typeof r==`function`?{$tag:1,_0:r}:{$tag:0,_0:String(r)},t.push({_0:e,_1:a})}return t}function o(e){if(!e)return[];let r;return r=Array.isArray(e)?e:[e],r.flat().map(e=>typeof e==`string`?n(e):typeof e==`number`?n(String(e)):typeof e==`function`&&e.length===0?t(()=>String(e())):e).filter(Boolean)}function s(t,n){let{children:r,...i}=n||{},s=a(i),c=o(r);if(typeof t==`string`)return e(t,s,c);if(typeof t==`function`)return t({...i,children:r});throw Error(`Invalid JSX type: ${t}`)}const c=s;function l({children:e}){return r(o(e))}const u=s;export{l as Fragment,s as jsx,u as jsxDEV,c as jsxs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={$tag:0};function t(e){this._0=e}t.prototype.$tag=1;var n=class extends Error{};function r(){throw new n}function i(e,t){if(t<0||t>=e.length)throw Error(`Index out of bounds`)}function a(e,t){let n=Array(e);return n.fill(t),n}function o(e){this._0=e}o.prototype.$tag=0;function s(e){this._0=e}s.prototype.$tag=1;const c={$tag:1},l={$tag:0},u=(e,t)=>e.toString(t),d=(e,t)=>{e.push(t)},f={$tag:0};function ee(e){this._0=e}ee.prototype.$tag=1;function te(e){this._0=e}te.prototype.$tag=2;function ne(e){this._0=e}ne.prototype.$tag=3;function re(e){this._0=e}re.prototype.$tag=4;const ie=e=>e.slice(0),p=(e,t)=>{e.length=t},ae=e=>e.pop(),oe=(e,t,n)=>e.splice(t,n),m=(e,t)=>e[t],h=(e,t,n)=>e[t](...n),se=e=>e==null,ce=()=>({}),g=(e,t,n)=>{e[t]=n},le=()=>null,ue=e=>Object.fromEntries(e.map(e=>[e._0,e._1])),de={$tag:0};function _(e){this._0=e}_.prototype.$tag=1;const fe={$tag:0};function pe(e){this._0=e}pe.prototype.$tag=1;const me={$tag:0};function he(e){this._0=e}he.prototype.$tag=1;const ge=(e,t)=>setTimeout(e,t),_e=e=>clearTimeout(e),v=()=>document,ve=(e,t)=>e.createElement(t),ye=(e,t,n)=>e.createElementNS(t,n),be=(e,t)=>e.createTextNode(t),xe=e=>queueMicrotask(e),Se={$tag:0};function y(e){this._0=e}y.prototype.$tag=1;const b={$tag:0};function Ce(e){this._0=e}Ce.prototype.$tag=1;function we(e){this._0=e}we.prototype.$tag=2;function Te(e){this._0=e}Te.prototype.$tag=0;function Ee(e){this._0=e}Ee.prototype.$tag=1;function x(e){this._0=e}x.prototype.$tag=2;function De(e){this._0=e}De.prototype.$tag=3;const Oe=(e,t)=>document.createElementNS(e,t),ke=(e,t,n)=>e.addEventListener(t,n),Ae=(e,t)=>e===t,je=(e,t,n)=>{if(typeof e.moveBefore==`function`)try{return e.moveBefore(t,n),t}catch{return e.insertBefore(t,n)}else return e.insertBefore(t,n)},Me=(e,t)=>{if(typeof e.moveBefore==`function`)try{return e.moveBefore(t,null),t}catch{return e.insertBefore(t,null)}else return e.insertBefore(t,null)},Ne=(e,t)=>e.nextSibling===t,Pe=(e,t)=>{try{t.parentNode===e?e.removeChild(t):t.parentNode&&t.parentNode.removeChild(t)}catch{}},Fe={$tag:0};function Ie(e){this._0=e}Ie.prototype.$tag=1;function Le(e){this._0=e}Le.prototype.$tag=0;function Re(e){this._0=e}Re.prototype.$tag=1;function ze(e){this._0=e}ze.prototype.$tag=2;const S={$tag:0};function Be(e){this._0=e}Be.prototype.$tag=1;const Ve=()=>window.location.pathname,He=()=>window.location.search,Ue=e=>window.history.pushState(null,``,e),We=e=>window.history.replaceState(null,``,e),Ge=e=>window.addEventListener(`popstate`,()=>e()),Ke=e=>queueMicrotask(e);function C(e,t,n,r){this._0=e,this._1=t,this._2=n,this._3=r}C.prototype.$tag=0;function qe(e,t,n){this._0=e,this._1=t,this._2=n}qe.prototype.$tag=1;function Je(e,t){this._0=e,this._1=t}Je.prototype.$tag=2;function Ye(e,t){this._0=e,this._1=t}Ye.prototype.$tag=3;const Xe=()=>void 0,Ze={method_0:jt,method_1:Mt,method_2:Ut,method_3:mt},Qe={val:0},w={current_subscriber:void 0,current_owner:void 0,current_cleanups:e,batch_depth:0,pending_effects:[],pending_ids:[]},$e={val:0};function et(e){return r()}function tt(e){return r()}function nt(e){return r()}function rt(e){return r()}function it(e){r()}function at(e){return r()}function ot(e,t){return e===0?t===0:t===1}function st(e,t){return et(`${e}\n at ${A(t)}\n`)}function ct(e,t){return tt(`${e}\n at ${A(t)}\n`)}function lt(e,t){return nt(`${e}\n at ${A(t)}\n`)}function ut(e,t){return rt(`${e}\n at ${A(t)}\n`)}function dt(e,t){it(`${e}\n at ${A(t)}\n`)}function ft(e,t){return at(`${e}\n at ${A(t)}\n`)}function pt(e){return{val:``}}function mt(e,t){let n=e;n.val=`${n.val}${String.fromCodePoint(t)}`}function ht(e,t){return(((Math.imul(e-55296|0,1024)|0)+t|0)-56320|0)+65536|0}function gt(e,t){return!ot(e,t)}function _t(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function vt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function yt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function bt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function xt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function St(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function Ct(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function T(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function wt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function Tt(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let o=a(256,r),s=r-1|0,c=0;for(;;){let e=c;if(e<s){let n=t.str,a=t.start+e|0,s=n.charCodeAt(a)&255;i(o,s),o[s]=(r-1|0)-e|0,c=e+1|0;continue}else break}let l=0;for(;;){let a=l;if(a<=(n-r|0)){let n=r-1|0,s=0;for(;;){let r=s;if(r<=n){let n=a+r|0,i=e.str,o=e.start+n|0,c=i.charCodeAt(o),l=t.str,u=t.start+r|0;if(c!==l.charCodeAt(u))break;s=r+1|0;continue}else return a}let c=(a+r|0)-1|0,u=e.str,d=e.start+c|0,f=u.charCodeAt(d)&255;i(o,f),l=a+o[f]|0;continue}else break}return}else return;else return 0}function Et(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let i=t.str,a=t.start+0|0,o=i.charCodeAt(a),s=n-r|0,c=0;for(;c<=s;){for(;;){let t;if(c<=s){let n=c,r=e.str,i=e.start+n|0;t=r.charCodeAt(i)!==o}else t=!1;if(t){c=c+1|0;continue}else break}if(c<=s){let n=1;for(;;){let i=n;if(i<r){let r=c+i|0,a=e.str,o=e.start+r|0,s=a.charCodeAt(o),l=t.str,u=t.start+i|0;if(s!==l.charCodeAt(u))break;n=i+1|0;continue}else return c}c=c+1|0}}return}else return;else return 0}function E(e,t){return(t.end-t.start|0)<=4?Et(e,t):Tt(e,t)}function Dt(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let o=a(256,r),s=r-1|0;for(;;){let e=s;if(e>0){let n=t.str,r=t.start+e|0,a=n.charCodeAt(r)&255;i(o,a),o[a]=e,s=e-1|0;continue}else break}let c=n-r|0;for(;;){let n=c;if(n>=0){let a=0;for(;;){let i=a;if(i<r){let r=n+i|0,o=e.str,s=e.start+r|0,c=o.charCodeAt(s),l=t.str,u=t.start+i|0;if(c!==l.charCodeAt(u))break;a=i+1|0;continue}else return n}let s=e.str,l=e.start+n|0,u=s.charCodeAt(l)&255;i(o,u),c=n-o[u]|0;continue}else break}return}else return;else return n}function Ot(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let i=t.str,a=t.start+0|0,o=i.charCodeAt(a),s=n-r|0;for(;s>=0;){for(;;){let t;if(s>=0){let n=s,r=e.str,i=e.start+n|0;t=r.charCodeAt(i)!==o}else t=!1;if(t){s=s-1|0;continue}else break}if(s>=0){let n=1;for(;;){let i=n;if(i<r){let r=s+i|0,a=e.str,o=e.start+r|0,c=a.charCodeAt(o),l=t.str,u=t.start+i|0;if(c!==l.charCodeAt(u))break;n=i+1|0;continue}else return s}s=s-1|0}}return}else return;else return n}function D(e,t){return(t.end-t.start|0)<=4?Ot(e,t):Dt(e,t)}function O(e,t,n){let r;return r=n===void 0?e.end-e.start|0:n,t>=0&&t<=r&&r<=(e.end-e.start|0)?{str:e.str,start:e.start+t|0,end:e.start+r|0}:ut(`Invalid index for View`,`@moonbitlang/core/builtin:stringview.mbt:111:5-111:36`)}function kt(e){let t=E(e,{str:`:`,start:0,end:1});if(t!==void 0){let n=t;return n>0&&(n+1|0)<(e.end-e.start|0)?{_0:O(e,0,n),_1:O(e,n+1|0,void 0)}:void 0}}function At(e){_L:if(zt(e,1,0,e.length))if(e.charCodeAt(0)===64){let t=Ht(e,1,0,e.length),n;n=t===void 0?e.length:t;let i={str:e,start:n,end:e.length},a=E(i,{str:`:`,start:0,end:1});if(a===void 0)return r();{let e=a,t=O(i,0,e),n=D(i,{str:`-`,start:0,end:1});if(n===void 0)return r();{let a=n;if((a+1|0)<(i.end-i.start|0)){let n=kt(O(i,a+1|0,void 0));if(n===void 0)return r();{let o=n,s=o._0,c=o._1,l=O(i,0,a);_L$2:{let n=D(l,{str:`:`,start:0,end:1});if(n===void 0)break _L$2;{let i=D(O(l,0,n),{str:`:`,start:0,end:1});if(i===void 0)break _L$2;{let n=i;if((n+1|0)<(l.end-l.start|0)){let i=kt(O(l,n+1|0,void 0));if(i===void 0)return r();{let a=i,o=a._0,u=a._1;return n>(e+1|0)?{pkg:t,filename:O(l,e+1|0,n),start_line:o,start_column:u,end_line:s,end_column:c}:r()}}else return r()}}}return r()}}else return r()}}}else break _L;else break _L;return r()}function jt(e,t){let n=e;n.val=`${n.val}${t}`}function k(e,t,n){let r=e.length,i;if(n===void 0)i=r;else{let e=n;i=e<0?r+e|0:e}let a=t<0?r+t|0:t;if(a>=0&&a<=i&&i<=r){let t;if(a<r){let n=e.charCodeAt(a);t=56320<=n&&n<=57343}else t=!1;if(t)return new o(l);let n;if(i<r){let t=e.charCodeAt(i);n=56320<=t&&t<=57343}else n=!1;return n?new o(l):new s({str:e,start:a,end:i})}else return new o(c)}function Mt(e,t,n,i){let a;_L:{_L$2:{let e=k(t,n,n+i|0);if(e.$tag===1)a=e._0;else{e._0;break _L$2}break _L}a=r()}Ut(e,a)}function Nt(e){let t=pt(0);return on(e,{self:t,method_table:Ze}),t.val}function A(e){let t=pt(0);return pn(e,{self:t,method_table:Ze}),t.val}function Pt(e,t){return u(e,t)}function j(e){return e.str.substring(e.start,e.end)}function Ft(e){return e()}function It(e){return e()}function Lt(e){return t=>{for(;;){let n=Ft(e);if(n===void 0)return 1;if(t(n)!==1)return 0}}}function Rt(e){return t=>{for(;;){let n=It(e);if(n===-1)return 1;if(t(n)!==1)return 0}}}function M(e){let t=pt(Math.imul(e.end-e.start|0,4)|0),n=e.end-e.start|0,r=0;for(;;){let i=r;if(i<n){let n=e.buf[e.start+i|0];mt(t,n),r=i+1|0;continue}else break}return t.val}function zt(e,t,n,r){let i;i=r===void 0?e.length:r;let a=n,o=0;for(;;){let n=a,r=o;if(n<i&&r<t){let t=e.charCodeAt(n);if(55296<=t&&t<=56319&&(n+1|0)<i){let t=n+1|0,i=e.charCodeAt(t);if(56320<=i&&i<=57343){a=n+2|0,o=r+1|0;continue}else dt(`invalid surrogate pair`,`@moonbitlang/core/builtin:string.mbt:491:9-491:40`)}a=n+1|0,o=r+1|0;continue}else return r>=t}}function Bt(e,t,n,r){let i=0,a=r;for(;(a-1|0)>=n&&i<t;){let t=a-1|0,n=e.charCodeAt(t);a=56320<=n&&n<=57343?a-2|0:a-1|0,i=i+1|0}return i<t||a<n?void 0:a}function Vt(e,t,n,r){if(n>=0&&n<=r){let i=n,a=0;for(;i<r&&a<t;){let t=i,n=e.charCodeAt(t);i=55296<=n&&n<=56319?i+2|0:i+1|0,a=a+1|0}return a<t||i>=r?void 0:i}else return ft(`Invalid start index`,`@moonbitlang/core/builtin:string.mbt:366:5-366:33`)}function Ht(e,t,n,r){let i;return i=r===void 0?e.length:r,t>=0?Vt(e,t,n,i):Bt(e,-t|0,n,i)}function Ut(e,t){let n=e;n.val=`${n.val}${j(t)}`}function Wt(e,t){let n=D(e,t);return n===void 0?!1:n===((e.end-e.start|0)-(t.end-t.start|0)|0)}function N(e,t){return Wt({str:e,start:0,end:e.length},t)}function Gt(e,t){let n=E(e,t);return n===void 0?!1:n===0}function P(e,t){return Gt({str:e,start:0,end:e.length},t)}function Kt(e){return[]}function F(e,t){d(e,t)}function I(e,t){d(e,t)}function qt(e,t){d(e,t)}function Jt(e,t){d(e,t)}function Yt(e,t){d(e,t)}function Xt(e,t){d(e,t)}function Zt(e,t){d(e,t)}function Qt(e,t){d(e,t)}function $t(e,t){d(e,t)}function L(e,t){d(e,t)}function R(e,t){d(e,t)}function z(e,t){d(e,t)}function en(e){let t=e.length,n={val:0};return()=>{if(n.val<t){let r=n.val,i=e.charCodeAt(r);if(55296<=i&&i<=56319&&(n.val+1|0)<t){let t=n.val+1|0,r=e.charCodeAt(t);if(56320<=r&&r<=57343){let e=ht(i,r);return n.val=n.val+2|0,e}}return n.val=n.val+1|0,i}else return-1}}function tn(e){return Rt(en(e))}function nn(e,t){return e(t)}function rn(e){return String.fromCodePoint(e)}function an(e){let t=tn(e),n={val:Kt(e.length)},i={val:f};t(e=>{let t=n.val;return z(t,e),n.val=t,1});let a=i.val;switch(a.$tag){case 0:break;case 1:a._0;break;case 2:return a._0;case 3:r();break;default:r()}return n.val}function on(e,t){t.method_table.method_0(t.self,Pt(e,10))}function sn(e){let t={val:0};return()=>{if(t.val<(e.end-e.start|0)){let n=e.buf[e.start+t.val|0];return t.val=t.val+1|0,n}else return}}function cn(e){return sn({buf:e,start:0,end:e.length})}function B(e){return Lt(cn(e))}function V(e,t){return gt(nn(e,e=>t(e)?0:1),1)}function ln(e,t){let n=Array(e),r=0;for(;;){let i=r;if(i<e){n[i]=t,r=i+1|0;continue}else break}return n}function un(e,t,n){let a=e.length;if(t>=0&&t<a){i(e,t),e[t]=n;return}else{r();return}}function dn(e,t,n){let a=e.length;if(t>=0&&t<a){i(e,t),e[t]=n;return}else{r();return}}function fn(e,t){let n=e.pkg,r=E(n,{str:`/`,start:0,end:1}),i;if(r===void 0)i={_0:n,_1:void 0};else{let e=r,t=E(O(n,e+1|0,void 0),{str:`/`,start:0,end:1});if(t===void 0)i={_0:n,_1:void 0};else{let r=t,a=(e+1|0)+r|0;i={_0:O(n,0,a),_1:O(n,a+1|0,void 0)}}}let a=i._0,o=i._1;if(o!==void 0){let e=o;t.method_table.method_2(t.self,e),t.method_table.method_3(t.self,47)}t.method_table.method_2(t.self,e.filename),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.start_line),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.start_column),t.method_table.method_3(t.self,45),t.method_table.method_2(t.self,e.end_line),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.end_column),t.method_table.method_3(t.self,64),t.method_table.method_2(t.self,a)}function pn(e,t){fn(At(e),t)}function mn(e,t,n){let r=e.length,i;if(n===void 0)i=r;else{let e=n;i=e<0?r+e|0:e}let a=t<0?r+t|0:t;return a>=0&&a<=i&&i<=r?{buf:e,start:a,end:i}:lt(`View index out of bounds`,`@moonbitlang/core/builtin:arrayview.mbt:200:5-200:38`)}function hn(e,t){p(e,t)}function gn(e,t){p(e,t)}function _n(e,t){p(e,t)}function vn(e,t){p(e,t)}function yn(e,t){p(e,t)}function bn(e){return ae(e)}function xn(e){return e.length===0?-1:bn(e)}function Sn(e,t){if(t>=0&&t<e.length){i(e,t);let n=e[t];return oe(e,t,1),n}else return st(`index out of bounds: the len is from 0 to ${Nt(e.length)} but the index is ${Nt(t)}`,`@moonbitlang/core/builtin:arraycore_js.mbt:241:5-243:6`)}function Cn(e,t){if(t>=0&&t<e.length){i(e,t);let n=e[t];return oe(e,t,1),n}else return ct(`index out of bounds: the len is from 0 to ${Nt(e.length)} but the index is ${Nt(t)}`,`@moonbitlang/core/builtin:arraycore_js.mbt:241:5-243:6`)}function wn(e){return ie(e)}function Tn(e){gn(e,0)}function En(e){_n(e,0)}function Dn(e){yn(e,0)}function On(e){return se(e)?de:new _(e)}function kn(e){return se(e)?fe:new pe(e)}function An(e){return se(e)?me:new he(e)}function jn(e,t,n){return{mode:e,delegatesFocus:t,slotAssignment:n}}function Mn(e,t){return h(e,`attachShadow`,[ue([{_0:`mode`,_1:t.mode},{_0:`delegatesFocus`,_1:t.delegatesFocus},{_0:`slotAssignment`,_1:t.slotAssignment}])])}function Nn(e){return m(e,`nodeType`)}function H(e){return On(m(e,`parentNode`))}function Pn(e){return On(m(e,`firstChild`))}function U(e,t){return h(e,`appendChild`,[t])}function W(e,t){return h(e,`removeChild`,[t])}function Fn(e,t,n){if(n.$tag===1){let r=n._0;return h(e,`insertBefore`,[t,r])}else return h(e,`insertBefore`,[t,le()])}function In(e,t){g(e,`textContent`,t)}function Ln(e,t){g(e,`className`,t)}function Rn(e,t,n){h(e,`setAttribute`,[t,n])}function zn(e,t){h(e,`removeAttribute`,[t])}function Bn(e,t){return kn(h(e,`querySelector`,[t]))}function Vn(e){return An(m(e,`body`))}function Hn(e){return h(e,`createDocumentFragment`,[])}function Un(e,t){return h(e,`createComment`,[t])}function G(){let e=Qe.val;return Qe.val=e+1|0,e}function Wn(e){let t=e.length-1|0;for(;;){let n=t;if(n>=0){yt(e,n)(),t=n-1|0;continue}else break}En(e)}function Gn(e){let t=w.current_cleanups;return w.current_cleanups=e,t}function Kn(e,n){let r=Gn(new t(e));n(),w.current_cleanups=r}function qn(e,t){let n=w.current_subscriber;w.current_subscriber=e;let r=t();return w.current_subscriber=n,r}function Jn(e,t){let n=w.current_subscriber;w.current_subscriber=e,t(),w.current_subscriber=n}function Yn(e,t){let n=G(),r={val:void 0},i={id:n,run:()=>{if(!t.active)return;Wn(t.cleanups);let n=r.val;n!==void 0&&Jn(n,()=>{Kn(t.cleanups,e)})}};return r.val=i,{_0:i,_1:()=>{t.active=!1,Wn(t.cleanups)}}}function Xn(e){let t=w.current_owner;t!==void 0&&F(t.disposers,e)}function K(e){let t=Yn(e,{active:!0,cleanups:[]}),n=t._0,r=t._1,i=n.run;return i(),Xn(r),r}function Zn(e){let t=w.current_subscriber;if(t!==void 0){let n=t;V(B(e.subscribers),e=>e.id===n.id)||I(e.subscribers,n)}return e.value}function Qn(e){let t=w.current_subscriber;if(t!==void 0){let n=t;V(B(e.subscribers),e=>e.id===n.id)||I(e.subscribers,n)}return e.value}function $n(e){let t=w.current_subscriber;if(t!==void 0){let n=t;V(B(e.subscribers),e=>e.id===n.id)||I(e.subscribers,n)}return e.value}function er(e){let t=w.current_subscriber;if(t!==void 0){let n=t;V(B(e.subscribers),e=>e.id===n.id)||I(e.subscribers,n)}return e.value}function tr(e){return{value:e,subscribers:[]}}function nr(e){return{value:e,subscribers:[]}}function rr(e){return{value:e,subscribers:[]}}function ir(e){return{value:e,subscribers:[]}}function ar(e){return tr(e)}function or(e){return nr(e)}function sr(e){return rr(e)}function cr(e){return ir(e)}function lr(e){let t=w.pending_ids,n=t.length,r=0;for(;;){let i=r;if(i<n){if(t[i]===e)return!0;r=i+1|0;continue}else break}return!1}function q(e){if(w.batch_depth>0){if(lr(e.id))return;Yt(w.pending_ids,e.id),I(w.pending_effects,e);return}else{let t=e.run;t();return}}function ur(e){let t=e.subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];q(n),r=e+1|0;continue}else return}}function dr(e){let t=e.subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];q(n),r=e+1|0;continue}else return}}function fr(e){let t=e.subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];q(n),r=e+1|0;continue}else return}}function pr(e){let t=e.subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];q(n),r=e+1|0;continue}else return}}function mr(e,t){e.value=t,ur(e)}function J(e,t){e.value=t,dr(e)}function hr(e,t){e.value=t,fr(e)}function gr(e,t){e.value=t,pr(e)}function _r(e){let t={active:!0,cleanups:[]},n=Yn(e,t),r=n._0,i=n._1;return xe(()=>{if(t.active){let e=r.run;e();return}else return}),Xn(i),i}function vr(e,t){e.value=t(e.value),ur(e)}function yr(e){let t=G(),n={value:Se,dirty:!0,subscribers:[]},r={val:void 0};return r.val={id:t,run:()=>{if(!n.dirty){n.dirty=!0;let e=n.subscribers,t=e.length,r=0;for(;;){let n=r;if(n<t){let t=e[n];q(t),r=n+1|0;continue}else return}}}},()=>{let t=w.current_subscriber;if(t!==void 0){let e=t;V(B(n.subscribers),t=>t.id===e.id)||I(n.subscribers,e)}if(n.dirty){let t=r.val;t===void 0||(n.value=new y(qn(t,e)),n.dirty=!1)}let i=n.value;if(i.$tag===1)return i._0;{let t=e();return n.value=new y(t),t}}}function br(e,t){let n=e.subscribers,r=n.length,i=0,a=0;for(;;){let e=i,o=a;if(e<r){let r=n[e];if(r.id!==t){n[o]=r,i=e+1|0,a=o+1|0;continue}i=e+1|0;continue}else{hn(n,o);return}}}function xr(e,t){let n=G(),r={val:!0},i={id:n,run:()=>{if(r.val){t(e.value);return}else return}};return I(e.subscribers,i),()=>{r.val=!1,br(e,n)}}function Sr(e){return e.$tag===0}function Cr(e){return e.$tag===1}function wr(e){return e.$tag===2}function Tr(e){if(e.$tag===1){let t=e._0;return new y(t)}else return Se}function Er(e){if(e.$tag===2)return e._0}function Dr(e){return er(e.state)}function Or(e){return e.state.value}function kr(e){let t=e.state;return Sr(t.value)}function Ar(e){let t=e.state;return Cr(t.value)}function jr(e){let t=e.state;return wr(t.value)}function Mr(e){let t=e.state;return Tr(t.value)}function Nr(e){let t=e.state;return Er(t.value)}function Pr(e){let t=e.refetch_;t()}function Fr(e){let t=or(b),n=e=>{J(t,new Ce(e))},r=e=>{J(t,new we(e))},i=()=>{J(t,b),e(n,r)};return i(),{state:t,refetch_:i}}function Ir(){let e=or(b);return{_0:{state:e,refetch_:()=>{J(e,b)}},_1:t=>{J(e,new Ce(t))},_2:t=>{J(e,new we(t))}}}function Lr(e){let t=$e.val;return $e.val=t+1|0,{id:t,default_value:()=>e,providers:[]}}function Rr(e,t){let n=t;for(;;){let t=n;if(t===void 0)return!1;{let r=t;if(r.id===e)return!r.disposed;n=r.parent;continue}}}function zr(e,t){let n=e.providers.length-1|0;for(;;){let r=n;if(r>=0){let i=bt(e.providers,r),a=i._0,o=i._1;if(Rr(a,t))return o;n=r-1|0;continue}else break}}function Br(e,t){let n=w.current_owner;w.current_owner=e;let r=t();return w.current_owner=n,r}function Vr(e,t){let n=w.current_owner;w.current_owner=e,t(),w.current_owner=n}function Hr(e,t){let n=w.current_owner;w.current_owner=e;let r=t();return w.current_owner=n,r}function Ur(e,t){let n=w.current_owner;w.current_owner=e;let r=t();return w.current_owner=n,r}function Wr(e){if(e.disposed)return;e.disposed=!0;let t=e.children.length-1|0;for(;;){let n=t;if(n>=0){Wr(vt(e.children,n)),t=n-1|0;continue}else break}let n=e.disposers.length-1|0;for(;;){let t=n;if(t>=0){yt(e.disposers,t)(),n=t-1|0;continue}else break}let r=e.cleanups.length-1|0;for(;;){let t=r;if(t>=0){yt(e.cleanups,t)(),r=t-1|0;continue}else break}Tn(e.children),En(e.disposers),En(e.cleanups);let i=e.parent;if(i!==void 0){let t=i.children,n=t.length,r=0,a=0;for(;;){let i=r,o=a;if(i<n){let n=t[i];if(n.id!==e.id){t[o]=n,r=i+1|0,a=o+1|0;continue}r=i+1|0;continue}else{gn(t,o);return}}}}function Gr(e){let t={id:G(),parent:e,children:[],cleanups:[],disposers:[],disposed:!1};return e===void 0||Xt(e.children,t),t}function Kr(e){let t=Gr(w.current_owner),n=()=>{Wr(t)};return Br(t,()=>e(n))}function qr(e,t,n){let r=w.current_owner,i=Gr(r),a=i.id;return Zt(e.providers,{_0:a,_1:()=>t}),F(i.cleanups,()=>{let t=e.providers,n=t.length,r=0,i=0;for(;;){let e=r,o=i;if(e<n){let n=t[e];if(n._0!==a){t[o]=n,r=e+1|0,i=o+1|0;continue}r=e+1|0;continue}else{vn(t,o);return}}}),Br(i,n)}function Jr(e,t,n){return w.current_owner===void 0?Kr(r=>qr(e,t,n)):qr(e,t,n)}function Yr(e){let t=w.current_owner,n=zr(e,t);if(n===void 0){let t=e.default_value;return t()}else return n()}function Xr(e){let t=w.current_subscriber;w.current_subscriber=void 0;let n=e();return w.current_subscriber=t,n}function Zr(e){let t=w.current_subscriber;w.current_subscriber=void 0,e(),w.current_subscriber=t}function Qr(){w.batch_depth=w.batch_depth+1|0}function $r(){for(;;)if(w.pending_effects.length>0){let e=Sn(w.pending_effects,0);Cn(w.pending_ids,0);let t=e.run;t();continue}else return}function ei(){if(w.batch_depth=w.batch_depth-1|0,w.batch_depth===0){$r();return}else return}function ti(e){Qr();let t=e();return ei(),t}function ni(e){let t=w.current_cleanups;if(t.$tag===1){let n=t._0;F(n,e);return}else{let t=w.current_owner;if(t===void 0)return;F(t.cleanups,e);return}}function ri(e){let t=Gr(w.current_owner);return{_0:Ur(t,e),_1:()=>{Wr(t)}}}function ii(e,t){return yr(()=>t(Zn(e)))}function ai(e,t,n){return yr(()=>n(Zn(e),Zn(t)))}function Y(e,t){let n=[],r=an(e),i=[],a=r.length,o=0;for(;;){let e=o;if(e<a){let a=r[e];a===t?(L(n,M({buf:i,start:0,end:i.length})),Dn(i)):z(i,a),o=e+1|0;continue}else break}return L(n,M({buf:i,start:0,end:i.length})),n}function oi(e){let t=be(v(),e());return K(()=>{In(t,e())}),new Ee(t)}function si(e,t,n){if(t===`className`){Ln(e,n);return}else if(t===`value`){g(e,`value`,n);return}else if(t===`checked`){g(e,`checked`,n===`true`);return}else if(t===`disabled`)if(n===`true`){Rn(e,`disabled`,``);return}else{zn(e,`disabled`);return}else{Rn(e,t,n);return}}function ci(e,t){Rn(e,`style`,t)}function li(e,t,n){switch(n.$tag){case 0:{let r=n._0;if(t===`style`){ci(e,r);return}else{si(e,t,r);return}}case 1:{let r=n._0;K(()=>{let n=r();if(t===`style`){ci(e,n);return}else{si(e,t,n);return}});return}default:{let r=n._0;if(t===`__ref`){r(e);return}else{ke(e,t,r);return}}}}function ui(e){return{inner:e}}function X(e){switch(e.$tag){case 0:return e._0.inner;case 1:return e._0;case 2:return e._0;default:return e._0}}function di(e,t,n,r){let i=Oe(e,t),a=n.length,o=0;for(;;){let e=o;if(e<a){let t=n[e],r=t._0,a=t._1;li(i,r,a),o=e+1|0;continue}else break}let s=r.length,c=0;for(;;){let e=c;if(e<s){let t=r[e];U(i,X(t)),c=e+1|0;continue}else break}return new Te(ui(i))}function fi(e,t,n){let r=ve(v(),e),i=t.length,a=0;for(;;){let e=a;if(e<i){let n=t[e],i=n._0,o=n._1;li(r,i,o),a=e+1|0;continue}else break}let o=n.length,s=0;for(;;){let e=s;if(e<o){let t=n[e];U(r,X(t)),s=e+1|0;continue}else break}return new Te(ui(r))}function pi(e,t){U(e,X(t))}function mi(e){In(e,``)}function hi(e,t){mi(e),pi(e,t)}function gi(e){if(Nn(e)===11){let t=[];for(;;){let n=Pn(e);if(n.$tag===1){let r=n._0;Qt(t,r),W(e,r);continue}else break}return t}else return[e]}function _i(e){switch(e.length){case 0:return new x(Hn(v()));case 1:return _t(e,0);default:{let t=Hn(v()),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];U(t,X(n)),r=i+1|0;continue}else break}return new x(t)}}}function vi(e){let t=e._2,n=e._1,r=e._0,i={val:[]},a=()=>{let e=ri(()=>t()),n=e._0;r.val=e._1,i.val=gi(X(n))};return n===void 0?a():Vr(n,a),i.val}function yi(e,t){let n=Un(v(),`show`),r=w.current_owner,i={val:void 0},a={_0:i,_1:r,_2:t},o=e()?vi(a):[],s={val:o};if(K(()=>{let t=e(),r=s.val.length>0;if(t===!0)if(r===!1){let e=H(n);if(e.$tag===1){let t=e._0,r=vi(a),i=r.length,o=0;for(;;){let e=o;if(e<i){let i=r[e];Fn(t,i,new _(n)),o=e+1|0;continue}else break}s.val=r;return}else return}else return;else if(r===!0){let e=i.val;e===void 0||(e(),i.val=void 0);let t=s.val,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e],i=H(n);if(i.$tag===1){let e=i._0;W(e,n)}r=e+1|0;continue}else break}s.val=[];return}else return}),o.length>0){let e=[],t=o.length,r=0;for(;;){let n=r;if(n<t){let t=o[n];Jt(e,new x(t)),r=n+1|0;continue}else break}return Jt(e,new x(n)),_i(e)}else return new x(n)}function bi(e,t){return Ae(e,t)}function xi(e,t){let n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];if(bi(n.item,t))return i;r=i+1|0;continue}else break}return-1}function Si(e,t,n){if(n.$tag===1){let r=n._0;return je(e,t,r)}else return Me(e,t)}function Ci(e,t,n,r,i){let a=n.length;if(a===0){let n=t.length,r=0;for(;;){let i=r;if(i<n){let n=t[i],a=n.dispose;a(),Pe(e,n.dom),r=i+1|0;continue}else break}return[]}let o=[],s=0;for(;;){let e=s;if(e<a){qt(o,{item:xt(n,0),dom:i,dispose:()=>{}}),s=e+1|0;continue}else break}let c=ln(t.length,!1),l=i,u=a-1|0;for(;;){let i=u;if(i>=0){let a=xt(n,i),s=xi(t,a);if(s>=0){let n=St(t,s);un(c,s,!0),Ne(n.dom,l)||Si(e,n.dom,new _(l)),l=n.dom,dn(o,i,n)}else{let t=r(a,i),n=t._0,s=t._1;Fn(e,n,new _(l)),l=n,dn(o,i,{item:a,dom:n,dispose:s})}u=i-1|0;continue}else break}let d=t.length,f=0;for(;;){let n=f;if(n<d){let r=t[n];if(!Ct(c,n)){let t=r.dispose;t(),Pe(e,r.dom)}f=n+1|0;continue}else break}return o}function wi(e,t,n,r){let i=H(t);if(i.$tag===1){let a=i._0;e.val=Ci(a,e.val,n,r,t);return}else return}function Ti(e,t,n){return{item:e,dom:t,dispose:n}}function Ei(e){let t=e._2,n=e._1,r=e._0,i=ri(()=>r(n,t)),a=i._0,o=i._1;return{_0:X(a),_1:o}}function Di(e,t){let n=v(),r=Un(n,`for`),i={val:[]},a={val:!0},o=w.current_owner,s=(e,n)=>{let r={_0:t,_1:e,_2:n};return o===void 0?Ei(r):Hr(o,()=>Ei(r))},c=Hn(n),l=e(),u=l.length,d=0;for(;;){let e=d;if(e<u){let t=l[e],n=s(t,e),r=n._0,a=n._1;qt(i.val,Ti(t,r,a)),U(c,r),d=e+1|0;continue}else break}return U(c,r),K(()=>{let t=e();if(a.val){a.val=!1;return}wi(i,r,t,s)}),new x(c)}function Oi(e){return new Ee(be(v(),e))}function ki(e){return new x(e)}function Ai(){return ce()}function ji(e){return Oi(e)}function Mi(e){return oi(e)}function Ni(e,t,n){return fi(e,t,n)}function Pi(e,t,n){return fi(e,t,n)}function Fi(e,t){let n=tr(e.value),r={val:Fe};return xr(e,e=>{let i=r.val;if(i.$tag===1){let e=i._0;_e(e)}r.val=new Ie(ge(()=>{mr(n,e)},t))}),n}function Ii(e){switch(e.$tag){case 0:return e._0;case 1:return e._0;default:return e._0}}function Li(){return{mount:fe,use_shadow:!1,is_svg:!1}}function Ri(e){return{mount:new pe(e),use_shadow:!1,is_svg:!1}}function zi(){return{mount:fe,use_shadow:!0,is_svg:!1}}function Bi(e,t){let n=v(),r=e.mount,i;if(r.$tag===1)i=r._0;else{let e=Vn(n);i=e.$tag===1?e._0:ve(n,`div`)}let a=e.is_svg?ye(n,`http://www.w3.org/2000/svg`,`g`):ve(n,`div`),o;e.use_shadow?(U(Mn(i,jn(`open`,!1,`named`)),a),o=a):(U(i,a),o=a);let s=[],c=t.length,l=0;for(;;){let e=l;if(e<c){let n=t[e],r=Ii(n);U(o,r),Qt(s,r),l=e+1|0;continue}else break}return ni(()=>{let e=s.length,t=0;for(;;){let n=t;if(n<e){let e=s[n],r=H(e);if(r.$tag===1){let t=r._0;W(t,e)}t=n+1|0;continue}else break}let n=H(a);if(n.$tag===1){let e=n._0;W(e,a);return}else return}),new ze(Un(n,`portal`))}function Vi(e){return Bi(Li(),e)}function Hi(e,t){let n=Bn(v(),e),r;if(n.$tag===1){let e=n._0;r=Ri(e)}else r=Li();return Bi(r,t)}function Ui(e){return Bi(zi(),e)}function Wi(e,t){return Bi({mount:new pe(e),use_shadow:!0,is_svg:!1},t)}function Gi(e){if(e!==``){let t=[],n=Y(e,38),r=n.length,i=0;for(;;){let e=i;if(e<r){let r=n[e],a=Y(r,61);if(a.length===2)R(t,{_0:T(a,0),_1:T(a,1)});else{let e;e=a.length===1?T(a,0)!==``:!1,e&&R(t,{_0:T(a,0),_1:``})}i=e+1|0;continue}else break}return t}else return[]}function Ki(e){let t=an(e),n=-1,r=t.length,i=0;for(;;){let e=i;if(e<r){if(t[e]===63){n=e;break}i=e+1|0;continue}else break}return n===-1?{_0:e,_1:[]}:{_0:M(mn(t,0,n)),_1:Gi(M(mn(t,n+1|0,void 0)))}}function qi(e){return P(e,{str:`[`,start:0,end:1})&&N(e,{str:`]`,start:0,end:1})&&!P(e,{str:`[...`,start:0,end:4})&&!P(e,{str:`[[...`,start:0,end:5})}function Ji(e){if(e.length===0)return``;let t=pt(0),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];i>0&&jt(t,`/`),jt(t,n),r=i+1|0;continue}else break}return t.val}function Yi(e){let t=Y(e,47),n=[],r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];r!==``&&L(n,r),i=e+1|0;continue}else break}return n}function Xi(e,t){let n=rn(t);return P(e,{str:n,start:0,end:n.length})}function Zi(e,t){let n=Yi(t.pattern),r=Yi(e),i=t.catch_all;if(i===void 0){if(n.length!==r.length)return S;let e=[],i=0,a=n.length,o=0;for(;;){let s=o;if(s<a){let a=n[s],c=T(r,s);if(Xi(a,58)||qi(a))if(i<t.param_names.length)R(e,{_0:T(t.param_names,i),_1:c}),i=i+1|0;else return S;else if(a!==c)return S;o=s+1|0;continue}else break}return new Be(e)}else{let e=i,a=n.length-1|0,o=r.length;if(e.optional){if(o<a)return S}else if(o<=a)return S;let s=[],c=0,l=0;for(;;){let e=l;if(e<a){let i=T(n,e),a=T(r,e);if(Xi(i,58)||qi(i))if(c<t.param_names.length)R(s,{_0:T(t.param_names,c),_1:a}),c=c+1|0;else return S;else if(i!==a)return S;l=e+1|0;continue}else break}let u=[],d=a;for(;;){let e=d;if(e<o){L(u,T(r,e)),d=e+1|0;continue}else break}let f=Ji(u);return R(s,{_0:e.name,_1:f}),new Be(s)}}function Qi(e,t){let n=Ki(e),r=n._0,i=n._1,a=t.length,o=0;for(;;){let e=o;if(e<a){let n=t[e],a=Zi(r,n);if(a.$tag===1)return{route:n,params:a._0,query:i,path:r};o=e+1|0;continue}else break}}function $i(e){if(e===``||e===`/`)return`/`;let t=an(e),n=[],r=!1,i=t.length,a=0;for(;;){let e=a;if(e<i){let i=t[e];i===47?(r||z(n,i),r=!0):(z(n,i),r=!1),a=e+1|0;continue}else break}let o=n.length;return o>1&&wt(n,o-1|0)===47&&xn(n),M({buf:n,start:0,end:n.length})}function ea(e){let t=[],n=Y(e,47),r=n.length,i=0;for(;;){let e=i;if(e<r){_L:{let r=n[e];if(P(r,{str:`:`,start:0,end:1})&&r.length>1){let e;_L$2:{_L$3:{let t=k(r,1,void 0),n;if(t.$tag===1)n=t._0;else{t._0;break _L$3}e=j(n);break _L$2}break _L}L(t,e)}else if(P(r,{str:`[`,start:0,end:1})&&!P(r,{str:`[...`,start:0,end:4})&&!P(r,{str:`[[...`,start:0,end:5})&&N(r,{str:`]`,start:0,end:1})&&r.length>2){let e;_L$2:{_L$3:{let t=k(r,1,r.length-1|0),n;if(t.$tag===1)n=t._0;else{t._0;break _L$3}e=j(n);break _L$2}break _L}L(t,e)}break _L}i=e+1|0;continue}else break}return t}function ta(e){let t=Y(e,47);if(t.length===0)return;let n=T(t,t.length-1|0);if(P(n,{str:`[[...`,start:0,end:5})&&N(n,{str:`]]`,start:0,end:2})&&n.length>7){let e;_L:{_L$2:{let t=k(n,5,n.length-2|0),r;if(t.$tag===1)r=t._0;else{t._0;break _L$2}e=j(r);break _L}return}return{name:e,optional:!0}}if(P(n,{str:`[...`,start:0,end:4})&&N(n,{str:`]`,start:0,end:1})&&n.length>5){let e;_L:{_L$2:{let t=k(n,4,n.length-1|0),r;if(t.$tag===1)r=t._0;else{t._0;break _L$2}e=j(r);break _L}return}return{name:e,optional:!1}}}function na(e,t,n,r){let i=e.length,a=0;for(;;){let o=a;if(o<i){let i=e[o];switch(i.$tag){case 0:{let e=i,a=e._0,o=e._1,s=e._2,c=e._3,l=$i(`${t}${a}`),u=ea(l),d=ta(l);$t(r,{pattern:l,param_names:u,component:o,layouts:wn(n),kind:0,title:s,meta:c,catch_all:d});break}case 2:{let e=i,n=e._0,a=e._1,o=$i(`${t}${n}`);$t(r,{pattern:o,param_names:ea(o),component:a,layouts:[],kind:1,title:``,meta:[],catch_all:ta(o)});break}case 3:{let e=i,n=e._0,a=e._1,o=$i(`${t}${n}`);$t(r,{pattern:o,param_names:ea(o),component:a,layouts:[],kind:2,title:``,meta:[],catch_all:ta(o)});break}default:{let e=i,a=e._0,o=e._1,s=e._2,c=$i(`${t}${a}`),l=wn(n);L(l,s),na(o,c,l,r)}}a=o+1|0;continue}else return}}function ra(e,t){let n=[];return na(e,t,[],n),n}function ia(){let e=Ve(),t=He();return t===``?e:`${e}${t}`}function aa(e){let t=ia();hr(e.current_path,t),gr(e.current_match,Qi(t,e.routes))}function oa(e,t){let n=ra(e,t),r=ia(),i=Qi(r,n),a={routes:n,base:t,current_path:sr(r),current_match:cr(i)};return Ge(()=>{aa(a)}),a}function sa(e,t){hr(e.current_path,t),gr(e.current_match,Qi(t,e.routes))}function ca(e,t){Ue(t),sa(e,t)}function la(e,t){We(t),sa(e,t)}function ua(e){return Qn(e.current_path)}function da(e){return $n(e.current_match)}function fa(e){return ar(e)}function pa(e){return Zn(e)}function Z(e,t){mr(e,t)}function ma(e,t){vr(e,t)}function ha(e){return e.value}function ga(e,t){return xr(e,t)}function _a(e,t){return ii(e,t)}function va(e){return yr(e)}function ya(e,t,n){return ai(e,t,n)}function ba(e){return _r(e)}function xa(e){return K(e)}function Sa(){Qr()}function Ca(){ei()}function wa(e){return Xr(e)}function Ta(e){return ti(e)}function Ea(e){ni(e)}function Da(e){return Kr(e)}function Oa(){let e=w.current_owner;if(e!==void 0)return e}function ka(e,t){return Br(e,t)}function Aa(){return w.current_owner!==void 0}function ja(e){let t=w.current_owner;Ke(()=>{if(t===void 0){Zr(e);return}else{let n=t;Vr(n,()=>{Zr(()=>{let t=[];Kn(t,e);let r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];F(n.cleanups,r),i=e+1|0;continue}else return}})});return}})}function Ma(e,t){return Di(e,t)}function Na(e){return ji(e)}function Pa(e){return Mi(e)}function Fa(e,t){hi(e,t)}function Ia(e,t){pi(e,t)}function La(e,t){return yi(e,t)}function Ra(e,t,n){return Ni(e,t,n)}function za(e,t,n){return Pi(e,t,n)}function Q(e){return _i(e)}function Ba(e,t,n){return fi(e,t,n)}function Va(e,t,n,r){return di(e,t,n,r)}function Ha(){return`http://www.w3.org/2000/svg`}function Ua(){return`http://www.w3.org/1998/Math/MathML`}function Wa(){return Ai()}function Ga(e,t){return Fi(e,t)}function Ka(e,t){return new C(e,t,``,[])}function qa(e,t,n){return new C(e,t,n,[])}function Ja(e,t,n,r){return new C(e,t,n,r)}function Ya(e,t){return oa(e,t)}function Xa(e,t){let n;return n=t===void 0?``:t,Ya(e,n)}function Za(e,t){ca(e,t)}function Qa(e,t){la(e,t)}function $a(e){return ua(e)}function eo(e){return da(e)}function to(e){return e.base}function no(e){return Lr(e)}function ro(e,t,n){return Jr(e,t,n)}function io(e){return Yr(e)}function ao(e){return Fr(e)}function oo(){let e=Ir();return{_0:e._0,_1:e._1,_2:e._2}}function so(e){return Dr(e)}function co(e){return Or(e)}function lo(e){Pr(e)}function uo(e){return kr(e)}function fo(e){return Ar(e)}function po(e){return jr(e)}function mo(e){let t=Mr(e);return t.$tag===1?t._0:Xe()}function ho(e){let t=Nr(e);return t===void 0?``:t}function go(e){return Sr(e)}function _o(e){return Cr(e)}function vo(e){return wr(e)}function yo(e){let t=Tr(e);return t.$tag===1?t._0:Xe()}function bo(e){let t=Er(e);return t===void 0?``:t}function xo(e){return new ze(X(e))}function $(e){return ki(Ii(e))}function So(e){let t=Array(e.length),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];t[i]=xo(n),r=i+1|0;continue}else break}return $(Vi(t))}function Co(e,t){let n=Array(t.length),r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];n[e]=xo(r),i=e+1|0;continue}else break}return $(Hi(e,n))}function wo(e){let t=Array(e.length),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];t[i]=xo(n),r=i+1|0;continue}else break}return $(Ui(t))}function To(e,t){let n=Array(t.length),r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];n[e]=xo(r),i=e+1|0;continue}else break}return $(Wi(e,n))}function Eo(e){let t=fa(e);return[()=>pa(t),e=>{typeof e==`function`?ma(t,e):Z(t,e)}]}function Do(e){return ba(e)}function Oo(e){return xa(e)}function ko(e){return va(e)}function Ao(e,t,n={}){let{defer:r=!1}=n,i=Array.isArray(e),a,o,s=!0;return n=>{let c=i?e.map(e=>e()):e();if(r&&s){s=!1,a=c;return}let l=t(c,a,n??o);return a=c,o=l,s=!1,l}}function jo(...e){let t={};for(let n of e)if(n)for(let e of Object.keys(n)){let r=n[e];if(e.startsWith(`on`)&&typeof r==`function`){let n=t[e];typeof n==`function`?t[e]=(...e)=>{n(...e),r(...e)}:t[e]=r}else if(e===`ref`&&typeof r==`function`){let n=t[e];typeof n==`function`?t[e]=e=>{n(e),r(e)}:t[e]=r}else if(e===`class`||e===`className`){let n=t[e];n?t[e]=`${n} ${r}`:t[e]=r}else e===`style`&&typeof r==`object`&&typeof t[e]==`object`?t[e]={...t[e],...r}:t[e]=r}return t}function Mo(e,...t){let n=[],r={...e};for(let e of t){let t={};for(let n of e)n in r&&(t[n]=r[n],delete r[n]);n.push(t)}return n.push(r),n}function No(e){let t=ao(e),n=()=>yo(so(t));return Object.defineProperties(n,{loading:{get:()=>uo(t)},error:{get:()=>ho(t)},state:{get:()=>uo(t)?`pending`:fo(t)?`ready`:po(t)?`errored`:`unresolved`},latest:{get:()=>co(t)}}),[n,{refetch:()=>lo(t)}]}function Po(){let e=oo(),t=e._0,n=e._1,r=e._2,i=()=>yo(so(t));return Object.defineProperties(i,{loading:{get:()=>uo(t)},error:{get:()=>ho(t)}}),[i,n,r]}function Fo(e,t){let[n]=e,r=fa(n()),i=Ga(r,t);return[()=>pa(i),e=>Z(r,e)]}function Io(e,...t){if(typeof e==`function`){let n=e(...t);return Array.isArray(n)?Q(n):n}return Array.isArray(e)?Q(e):e}function Lo(e){if(Array.isArray(e))return Q(e);let{children:t}=e||{};return Q(t?Array.isArray(t)?t:[t]:[])}function Ro(e){let{each:t,fallback:n,children:r}=e;return t?Ma(typeof t==`function`?t:()=>t,(e,t)=>r(e,()=>t)):n??null}function zo(e){let{when:t,children:n}=e,r=typeof t==`function`?t:()=>t;return La(()=>!!r(),()=>Io(n,r()))}function Bo(e){let{each:t,fallback:n,children:r}=e;if(!t)return n??null;let i=typeof t==`function`?t:()=>t;return i().length===0&&n?n:Ma(i,(e,t)=>r(()=>i()[t],t))}function Vo(e){let{context:t,value:n,children:r}=e;return ro(t,n,()=>typeof r==`function`?r():r)}function Ho(e){let{fallback:t,children:n}=e,r;r=n?Array.isArray(n)?n.flat():[n]:[];let i=r.filter(e=>e&&e.__isMatch);if(i.length===0)return t??null;let a=ko(()=>{for(let e=0;e<i.length;e++)if(i[e].when())return e;return-1}),o=[];for(let e=0;e<i.length;e++){let t=i[e],n=e;o.push(La(()=>a()===n,t.children))}return t&&o.push(La(()=>a()===-1,()=>Io(t))),Q(o)}function Uo(e){let{when:t,children:n}=e,r=typeof t==`function`?t:()=>t;return{__isMatch:!0,when:()=>!!r(),condition:r,children:()=>Io(n,r())}}function Wo(e){let{mount:t,useShadow:n=!1,children:r}=e,i=typeof r==`function`?[r()]:Array.isArray(r)?r:[r];if(n){if(typeof t==`string`){let e=document.querySelector(t);if(e)return To(e,i)}else if(t)return To(t,i);return wo(i)}return typeof t==`string`?Co(t,i):So(i)}function Go(e){let t=new Map,n=structuredClone(e);function r(e){let r=e.join(`.`);if(!t.has(r)){let a=i(n,e);t.set(r,fa(a))}return t.get(r)}function i(e,t){let n=e;for(let e of t){if(n==null)return;n=n[e]}return n}function a(e,t,n){if(t.length===0)return;let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(r[n]==null){let i=t[e+1];r[n]=typeof i==`number`||/^\d+$/.test(i)?[]:{}}r=r[n]}r[t[t.length-1]]=n}function o(e){let r=e.join(`.`);Sa();try{for(let[e,a]of t.entries())(e===r||e.startsWith(r+`.`))&&Z(a,i(n,e.split(`.`)))}finally{Ca()}}function s(e,t=[]){return typeof e!=`object`||!e?e:new Proxy(e,{get(e,n){if(typeof n==`symbol`)return e[n];let i=[...t,n];pa(r(i));let a=e[n];return typeof a==`object`&&a?s(a,i):a},set(e,n,r){let i=[...t,n];return e[n]=r,o(i),!0}})}function c(...e){if(e.length===0)return;let r=[],s=0;for(;s<e.length-1&&typeof e[s]==`string`;)r.push(e[s]),s++;let c=e[s];if(r.length===0&&typeof c==`object`&&c){Object.assign(n,c);for(let[e,r]of t.entries())Z(r,i(n,e.split(`.`)));return}let l=i(n,r),u;u=typeof c==`function`?c(l):Array.isArray(c)?c:typeof c==`object`&&c&&typeof l==`object`&&l&&!Array.isArray(l)?{...l,...c}:c,a(n,r,u),o(r)}return[s(n),c]}function Ko(e){return t=>{let n=structuredClone(t);return e(n),n}}function qo(e){return()=>e}export{ho as $,Xa as A,_a as B,Ca as C,yo as Ct,Ba as D,Pa as Dt,no as E,Na as Et,pa as F,ha as G,Ia as H,Oa as I,Co as J,So as K,Aa as L,Wa as M,Ma as N,Va as O,ma as Ot,Q as P,Fa as Q,Ra as R,Ta as S,_o as St,ya as T,Ha as Tt,Ea as U,Ua as V,ja as W,ro as X,wo as Y,xa as Z,jo as _,Z as _t,Wo as a,lo as at,qo as b,vo as bt,Ho as c,Ja as ct,ko as d,eo as dt,so as et,Oo as f,$a as ft,Fo as g,ka as gt,Go as h,wa as ht,Uo as i,co as it,ba as j,Da as k,io as kt,Po as l,qa as lt,Eo as m,Qa as mt,Lo as n,uo as nt,Vo as o,mo as ot,No as p,Za as pt,To as q,Bo as r,fo as rt,zo as s,Ka as st,Ro as t,po as tt,Do as u,to as ut,Ao as v,La as vt,Sa as w,ga as wt,Mo as x,go as xt,Ko as y,bo as yt,za as z};
|
|
1
|
+
const e={$tag:0};function t(e){this._0=e}t.prototype.$tag=1;var n=class extends Error{};function r(){throw new n}function i(e,t){if(t<0||t>=e.length)throw Error(`Index out of bounds`)}function a(e,t){let n=Array(e);return n.fill(t),n}function o(e){this._0=e}o.prototype.$tag=0;function s(e){this._0=e}s.prototype.$tag=1;const c={$tag:1},l={$tag:0},u=(e,t)=>e.toString(t),d=(e,t)=>{e.push(t)},f={$tag:0};function ee(e){this._0=e}ee.prototype.$tag=1;function te(e){this._0=e}te.prototype.$tag=2;function ne(e){this._0=e}ne.prototype.$tag=3;function re(e){this._0=e}re.prototype.$tag=4;const ie=e=>e.slice(0),p=(e,t)=>{e.length=t},ae=e=>e.pop(),oe=(e,t,n)=>e.splice(t,n),m=(e,t)=>e[t],h=(e,t,n)=>e[t](...n),se=e=>e==null,ce=()=>({}),g=(e,t,n)=>{e[t]=n},le=()=>null,ue=e=>Object.fromEntries(e.map(e=>[e._0,e._1])),de={$tag:0};function _(e){this._0=e}_.prototype.$tag=1;const fe={$tag:0};function pe(e){this._0=e}pe.prototype.$tag=1;const me={$tag:0};function he(e){this._0=e}he.prototype.$tag=1;const ge=(e,t)=>setTimeout(e,t),_e=e=>clearTimeout(e),v=()=>document,ve=(e,t)=>e.createElement(t),ye=(e,t,n)=>e.createElementNS(t,n),be=(e,t)=>e.createTextNode(t),xe=e=>queueMicrotask(e),Se={$tag:0};function y(e){this._0=e}y.prototype.$tag=1;const b={$tag:0};function Ce(e){this._0=e}Ce.prototype.$tag=1;function we(e){this._0=e}we.prototype.$tag=2;function Te(e){this._0=e}Te.prototype.$tag=0;function Ee(e){this._0=e}Ee.prototype.$tag=1;function x(e){this._0=e}x.prototype.$tag=2;function De(e){this._0=e}De.prototype.$tag=3;const Oe=(e,t)=>document.createElementNS(e,t),ke=(e,t,n)=>e.addEventListener(t,n),Ae=(e,t)=>e===t,je=(e,t,n)=>{if(typeof e.moveBefore==`function`)try{return e.moveBefore(t,n),t}catch{return e.insertBefore(t,n)}else return e.insertBefore(t,n)},Me=(e,t)=>{if(typeof e.moveBefore==`function`)try{return e.moveBefore(t,null),t}catch{return e.insertBefore(t,null)}else return e.insertBefore(t,null)},Ne=(e,t)=>e.nextSibling===t,Pe=(e,t)=>{try{t.parentNode===e?e.removeChild(t):t.parentNode&&t.parentNode.removeChild(t)}catch{}},Fe={$tag:0};function Ie(e){this._0=e}Ie.prototype.$tag=1;function Le(e){this._0=e}Le.prototype.$tag=0;function Re(e){this._0=e}Re.prototype.$tag=1;function ze(e){this._0=e}ze.prototype.$tag=2;const S={$tag:0};function Be(e){this._0=e}Be.prototype.$tag=1;const Ve=()=>window.location.pathname,He=()=>window.location.search,Ue=e=>window.history.pushState(null,``,e),We=e=>window.history.replaceState(null,``,e),Ge=e=>window.addEventListener(`popstate`,()=>e()),Ke=e=>queueMicrotask(e);function C(e,t,n,r){this._0=e,this._1=t,this._2=n,this._3=r}C.prototype.$tag=0;function qe(e,t,n){this._0=e,this._1=t,this._2=n}qe.prototype.$tag=1;function Je(e,t){this._0=e,this._1=t}Je.prototype.$tag=2;function Ye(e,t){this._0=e,this._1=t}Ye.prototype.$tag=3;const Xe=()=>void 0,Ze={method_0:jt,method_1:Mt,method_2:Ut,method_3:mt},Qe={val:0},w={current_subscriber:void 0,current_owner:void 0,current_cleanups:e,batch_depth:0,pending_effects:[],pending_ids:[]},$e={val:0};function et(e){return r()}function tt(e){return r()}function nt(e){return r()}function rt(e){return r()}function it(e){r()}function at(e){return r()}function ot(e,t){return e===0?t===0:t===1}function st(e,t){return et(`${e}\n at ${A(t)}\n`)}function ct(e,t){return tt(`${e}\n at ${A(t)}\n`)}function lt(e,t){return nt(`${e}\n at ${A(t)}\n`)}function ut(e,t){return rt(`${e}\n at ${A(t)}\n`)}function dt(e,t){it(`${e}\n at ${A(t)}\n`)}function ft(e,t){return at(`${e}\n at ${A(t)}\n`)}function pt(e){return{val:``}}function mt(e,t){let n=e;n.val=`${n.val}${String.fromCodePoint(t)}`}function ht(e,t){return(((Math.imul(e-55296|0,1024)|0)+t|0)-56320|0)+65536|0}function gt(e,t){return!ot(e,t)}function _t(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function vt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function yt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function bt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function xt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function St(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function Ct(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function T(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function wt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function Tt(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let o=a(256,r),s=r-1|0,c=0;for(;;){let e=c;if(e<s){let n=t.str,a=t.start+e|0,s=n.charCodeAt(a)&255;i(o,s),o[s]=(r-1|0)-e|0,c=e+1|0;continue}else break}let l=0;for(;;){let a=l;if(a<=(n-r|0)){let n=r-1|0,s=0;for(;;){let r=s;if(r<=n){let n=a+r|0,i=e.str,o=e.start+n|0,c=i.charCodeAt(o),l=t.str,u=t.start+r|0;if(c!==l.charCodeAt(u))break;s=r+1|0;continue}else return a}let c=(a+r|0)-1|0,u=e.str,d=e.start+c|0,f=u.charCodeAt(d)&255;i(o,f),l=a+o[f]|0;continue}else break}return}else return;else return 0}function Et(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let i=t.str,a=t.start+0|0,o=i.charCodeAt(a),s=n-r|0,c=0;for(;c<=s;){for(;;){let t;if(c<=s){let n=c,r=e.str,i=e.start+n|0;t=r.charCodeAt(i)!==o}else t=!1;if(t){c=c+1|0;continue}else break}if(c<=s){let n=1;for(;;){let i=n;if(i<r){let r=c+i|0,a=e.str,o=e.start+r|0,s=a.charCodeAt(o),l=t.str,u=t.start+i|0;if(s!==l.charCodeAt(u))break;n=i+1|0;continue}else return c}c=c+1|0}}return}else return;else return 0}function E(e,t){return(t.end-t.start|0)<=4?Et(e,t):Tt(e,t)}function Dt(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let o=a(256,r),s=r-1|0;for(;;){let e=s;if(e>0){let n=t.str,r=t.start+e|0,a=n.charCodeAt(r)&255;i(o,a),o[a]=e,s=e-1|0;continue}else break}let c=n-r|0;for(;;){let n=c;if(n>=0){let a=0;for(;;){let i=a;if(i<r){let r=n+i|0,o=e.str,s=e.start+r|0,c=o.charCodeAt(s),l=t.str,u=t.start+i|0;if(c!==l.charCodeAt(u))break;a=i+1|0;continue}else return n}let s=e.str,l=e.start+n|0,u=s.charCodeAt(l)&255;i(o,u),c=n-o[u]|0;continue}else break}return}else return;else return n}function Ot(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let i=t.str,a=t.start+0|0,o=i.charCodeAt(a),s=n-r|0;for(;s>=0;){for(;;){let t;if(s>=0){let n=s,r=e.str,i=e.start+n|0;t=r.charCodeAt(i)!==o}else t=!1;if(t){s=s-1|0;continue}else break}if(s>=0){let n=1;for(;;){let i=n;if(i<r){let r=s+i|0,a=e.str,o=e.start+r|0,c=a.charCodeAt(o),l=t.str,u=t.start+i|0;if(c!==l.charCodeAt(u))break;n=i+1|0;continue}else return s}s=s-1|0}}return}else return;else return n}function D(e,t){return(t.end-t.start|0)<=4?Ot(e,t):Dt(e,t)}function O(e,t,n){let r;return r=n===void 0?e.end-e.start|0:n,t>=0&&t<=r&&r<=(e.end-e.start|0)?{str:e.str,start:e.start+t|0,end:e.start+r|0}:ut(`Invalid index for View`,`@moonbitlang/core/builtin:stringview.mbt:111:5-111:36`)}function kt(e){let t=E(e,{str:`:`,start:0,end:1});if(t!==void 0){let n=t;return n>0&&(n+1|0)<(e.end-e.start|0)?{_0:O(e,0,n),_1:O(e,n+1|0,void 0)}:void 0}}function At(e){_L:if(zt(e,1,0,e.length))if(e.charCodeAt(0)===64){let t=Ht(e,1,0,e.length),n;n=t===void 0?e.length:t;let i={str:e,start:n,end:e.length},a=E(i,{str:`:`,start:0,end:1});if(a===void 0)return r();{let e=a,t=O(i,0,e),n=D(i,{str:`-`,start:0,end:1});if(n===void 0)return r();{let a=n;if((a+1|0)<(i.end-i.start|0)){let n=kt(O(i,a+1|0,void 0));if(n===void 0)return r();{let o=n,s=o._0,c=o._1,l=O(i,0,a);_L$2:{let n=D(l,{str:`:`,start:0,end:1});if(n===void 0)break _L$2;{let i=D(O(l,0,n),{str:`:`,start:0,end:1});if(i===void 0)break _L$2;{let n=i;if((n+1|0)<(l.end-l.start|0)){let i=kt(O(l,n+1|0,void 0));if(i===void 0)return r();{let a=i,o=a._0,u=a._1;return n>(e+1|0)?{pkg:t,filename:O(l,e+1|0,n),start_line:o,start_column:u,end_line:s,end_column:c}:r()}}else return r()}}}return r()}}else return r()}}}else break _L;else break _L;return r()}function jt(e,t){let n=e;n.val=`${n.val}${t}`}function k(e,t,n){let r=e.length,i;if(n===void 0)i=r;else{let e=n;i=e<0?r+e|0:e}let a=t<0?r+t|0:t;if(a>=0&&a<=i&&i<=r){let t;if(a<r){let n=e.charCodeAt(a);t=56320<=n&&n<=57343}else t=!1;if(t)return new o(l);let n;if(i<r){let t=e.charCodeAt(i);n=56320<=t&&t<=57343}else n=!1;return n?new o(l):new s({str:e,start:a,end:i})}else return new o(c)}function Mt(e,t,n,i){let a;_L:{_L$2:{let e=k(t,n,n+i|0);if(e.$tag===1)a=e._0;else{e._0;break _L$2}break _L}a=r()}Ut(e,a)}function Nt(e){let t=pt(0);return on(e,{self:t,method_table:Ze}),t.val}function A(e){let t=pt(0);return pn(e,{self:t,method_table:Ze}),t.val}function Pt(e,t){return u(e,t)}function j(e){return e.str.substring(e.start,e.end)}function Ft(e){return e()}function It(e){return e()}function Lt(e){return t=>{for(;;){let n=Ft(e);if(n===void 0)return 1;if(t(n)!==1)return 0}}}function Rt(e){return t=>{for(;;){let n=It(e);if(n===-1)return 1;if(t(n)!==1)return 0}}}function M(e){let t=pt(Math.imul(e.end-e.start|0,4)|0),n=e.end-e.start|0,r=0;for(;;){let i=r;if(i<n){let n=e.buf[e.start+i|0];mt(t,n),r=i+1|0;continue}else break}return t.val}function zt(e,t,n,r){let i;i=r===void 0?e.length:r;let a=n,o=0;for(;;){let n=a,r=o;if(n<i&&r<t){let t=e.charCodeAt(n);if(55296<=t&&t<=56319&&(n+1|0)<i){let t=n+1|0,i=e.charCodeAt(t);if(56320<=i&&i<=57343){a=n+2|0,o=r+1|0;continue}else dt(`invalid surrogate pair`,`@moonbitlang/core/builtin:string.mbt:491:9-491:40`)}a=n+1|0,o=r+1|0;continue}else return r>=t}}function Bt(e,t,n,r){let i=0,a=r;for(;(a-1|0)>=n&&i<t;){let t=a-1|0,n=e.charCodeAt(t);a=56320<=n&&n<=57343?a-2|0:a-1|0,i=i+1|0}return i<t||a<n?void 0:a}function Vt(e,t,n,r){if(n>=0&&n<=r){let i=n,a=0;for(;i<r&&a<t;){let t=i,n=e.charCodeAt(t);i=55296<=n&&n<=56319?i+2|0:i+1|0,a=a+1|0}return a<t||i>=r?void 0:i}else return ft(`Invalid start index`,`@moonbitlang/core/builtin:string.mbt:366:5-366:33`)}function Ht(e,t,n,r){let i;return i=r===void 0?e.length:r,t>=0?Vt(e,t,n,i):Bt(e,-t|0,n,i)}function Ut(e,t){let n=e;n.val=`${n.val}${j(t)}`}function Wt(e,t){let n=D(e,t);return n===void 0?!1:n===((e.end-e.start|0)-(t.end-t.start|0)|0)}function N(e,t){return Wt({str:e,start:0,end:e.length},t)}function Gt(e,t){let n=E(e,t);return n===void 0?!1:n===0}function P(e,t){return Gt({str:e,start:0,end:e.length},t)}function Kt(e){return[]}function F(e,t){d(e,t)}function I(e,t){d(e,t)}function qt(e,t){d(e,t)}function Jt(e,t){d(e,t)}function Yt(e,t){d(e,t)}function Xt(e,t){d(e,t)}function Zt(e,t){d(e,t)}function Qt(e,t){d(e,t)}function $t(e,t){d(e,t)}function L(e,t){d(e,t)}function R(e,t){d(e,t)}function z(e,t){d(e,t)}function en(e){let t=e.length,n={val:0};return()=>{if(n.val<t){let r=n.val,i=e.charCodeAt(r);if(55296<=i&&i<=56319&&(n.val+1|0)<t){let t=n.val+1|0,r=e.charCodeAt(t);if(56320<=r&&r<=57343){let e=ht(i,r);return n.val=n.val+2|0,e}}return n.val=n.val+1|0,i}else return-1}}function tn(e){return Rt(en(e))}function nn(e,t){return e(t)}function rn(e){return String.fromCodePoint(e)}function an(e){let t=tn(e),n={val:Kt(e.length)},i={val:f};t(e=>{let t=n.val;return z(t,e),n.val=t,1});let a=i.val;switch(a.$tag){case 0:break;case 1:a._0;break;case 2:return a._0;case 3:r();break;default:r()}return n.val}function on(e,t){t.method_table.method_0(t.self,Pt(e,10))}function sn(e){let t={val:0};return()=>{if(t.val<(e.end-e.start|0)){let n=e.buf[e.start+t.val|0];return t.val=t.val+1|0,n}else return}}function cn(e){return sn({buf:e,start:0,end:e.length})}function B(e){return Lt(cn(e))}function V(e,t){return gt(nn(e,e=>t(e)?0:1),1)}function ln(e,t){let n=Array(e),r=0;for(;;){let i=r;if(i<e){n[i]=t,r=i+1|0;continue}else break}return n}function un(e,t,n){let a=e.length;if(t>=0&&t<a){i(e,t),e[t]=n;return}else{r();return}}function dn(e,t,n){let a=e.length;if(t>=0&&t<a){i(e,t),e[t]=n;return}else{r();return}}function fn(e,t){let n=e.pkg,r=E(n,{str:`/`,start:0,end:1}),i;if(r===void 0)i={_0:n,_1:void 0};else{let e=r,t=E(O(n,e+1|0,void 0),{str:`/`,start:0,end:1});if(t===void 0)i={_0:n,_1:void 0};else{let r=t,a=(e+1|0)+r|0;i={_0:O(n,0,a),_1:O(n,a+1|0,void 0)}}}let a=i._0,o=i._1;if(o!==void 0){let e=o;t.method_table.method_2(t.self,e),t.method_table.method_3(t.self,47)}t.method_table.method_2(t.self,e.filename),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.start_line),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.start_column),t.method_table.method_3(t.self,45),t.method_table.method_2(t.self,e.end_line),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.end_column),t.method_table.method_3(t.self,64),t.method_table.method_2(t.self,a)}function pn(e,t){fn(At(e),t)}function mn(e,t,n){let r=e.length,i;if(n===void 0)i=r;else{let e=n;i=e<0?r+e|0:e}let a=t<0?r+t|0:t;return a>=0&&a<=i&&i<=r?{buf:e,start:a,end:i}:lt(`View index out of bounds`,`@moonbitlang/core/builtin:arrayview.mbt:200:5-200:38`)}function hn(e,t){p(e,t)}function gn(e,t){p(e,t)}function _n(e,t){p(e,t)}function vn(e,t){p(e,t)}function yn(e,t){p(e,t)}function bn(e){return ae(e)}function xn(e){return e.length===0?-1:bn(e)}function Sn(e,t){if(t>=0&&t<e.length){i(e,t);let n=e[t];return oe(e,t,1),n}else return st(`index out of bounds: the len is from 0 to ${Nt(e.length)} but the index is ${Nt(t)}`,`@moonbitlang/core/builtin:arraycore_js.mbt:241:5-243:6`)}function Cn(e,t){if(t>=0&&t<e.length){i(e,t);let n=e[t];return oe(e,t,1),n}else return ct(`index out of bounds: the len is from 0 to ${Nt(e.length)} but the index is ${Nt(t)}`,`@moonbitlang/core/builtin:arraycore_js.mbt:241:5-243:6`)}function wn(e){return ie(e)}function Tn(e){gn(e,0)}function En(e){_n(e,0)}function Dn(e){yn(e,0)}function On(e){return se(e)?de:new _(e)}function kn(e){return se(e)?fe:new pe(e)}function An(e){return se(e)?me:new he(e)}function jn(e,t,n){return{mode:e,delegatesFocus:t,slotAssignment:n}}function Mn(e,t){return h(e,`attachShadow`,[ue([{_0:`mode`,_1:t.mode},{_0:`delegatesFocus`,_1:t.delegatesFocus},{_0:`slotAssignment`,_1:t.slotAssignment}])])}function Nn(e){return m(e,`nodeType`)}function H(e){return On(m(e,`parentNode`))}function Pn(e){return On(m(e,`firstChild`))}function U(e,t){return h(e,`appendChild`,[t])}function W(e,t){return h(e,`removeChild`,[t])}function Fn(e,t,n){if(n.$tag===1){let r=n._0;return h(e,`insertBefore`,[t,r])}else return h(e,`insertBefore`,[t,le()])}function In(e,t){g(e,`textContent`,t)}function Ln(e,t){g(e,`className`,t)}function Rn(e,t,n){h(e,`setAttribute`,[t,n])}function zn(e,t){h(e,`removeAttribute`,[t])}function Bn(e,t){return kn(h(e,`querySelector`,[t]))}function Vn(e){return An(m(e,`body`))}function Hn(e){return h(e,`createDocumentFragment`,[])}function Un(e,t){return h(e,`createComment`,[t])}function G(){let e=Qe.val;return Qe.val=e+1|0,e}function Wn(e){let t=e.length-1|0;for(;;){let n=t;if(n>=0){yt(e,n)(),t=n-1|0;continue}else break}En(e)}function Gn(e){let t=w.current_cleanups;return w.current_cleanups=e,t}function Kn(e,n){let r=Gn(new t(e));n(),w.current_cleanups=r}function qn(e,t){let n=w.current_subscriber;w.current_subscriber=e;let r=t();return w.current_subscriber=n,r}function Jn(e,t){let n=w.current_subscriber;w.current_subscriber=e,t(),w.current_subscriber=n}function Yn(e,t){let n=G(),r={val:void 0},i={id:n,run:()=>{if(!t.active)return;Wn(t.cleanups);let n=r.val;n!==void 0&&Jn(n,()=>{Kn(t.cleanups,e)})}};return r.val=i,{_0:i,_1:()=>{t.active=!1,Wn(t.cleanups)}}}function Xn(e){let t=w.current_owner;t!==void 0&&F(t.disposers,e)}function K(e){let t=Yn(e,{active:!0,cleanups:[]}),n=t._0,r=t._1,i=n.run;return i(),Xn(r),r}function Zn(e){let t=w.current_subscriber;if(t!==void 0){let n=t;V(B(e.subscribers),e=>e.id===n.id)||I(e.subscribers,n)}return e.value}function Qn(e){let t=w.current_subscriber;if(t!==void 0){let n=t;V(B(e.subscribers),e=>e.id===n.id)||I(e.subscribers,n)}return e.value}function $n(e){let t=w.current_subscriber;if(t!==void 0){let n=t;V(B(e.subscribers),e=>e.id===n.id)||I(e.subscribers,n)}return e.value}function er(e){let t=w.current_subscriber;if(t!==void 0){let n=t;V(B(e.subscribers),e=>e.id===n.id)||I(e.subscribers,n)}return e.value}function tr(e){return{value:e,subscribers:[]}}function nr(e){return{value:e,subscribers:[]}}function rr(e){return{value:e,subscribers:[]}}function ir(e){return{value:e,subscribers:[]}}function ar(e){return tr(e)}function or(e){return nr(e)}function sr(e){return rr(e)}function cr(e){return ir(e)}function lr(e){let t=w.pending_ids,n=t.length,r=0;for(;;){let i=r;if(i<n){if(t[i]===e)return!0;r=i+1|0;continue}else break}return!1}function q(e){if(w.batch_depth>0){if(lr(e.id))return;Yt(w.pending_ids,e.id),I(w.pending_effects,e);return}else{let t=e.run;t();return}}function ur(e){let t=e.subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];q(n),r=e+1|0;continue}else return}}function dr(e){let t=e.subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];q(n),r=e+1|0;continue}else return}}function fr(e){let t=e.subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];q(n),r=e+1|0;continue}else return}}function pr(e){let t=e.subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];q(n),r=e+1|0;continue}else return}}function mr(e,t){e.value=t,ur(e)}function J(e,t){e.value=t,dr(e)}function hr(e,t){e.value=t,fr(e)}function gr(e,t){e.value=t,pr(e)}function _r(e){let t={active:!0,cleanups:[]},n=Yn(e,t),r=n._0,i=n._1;return xe(()=>{if(t.active){let e=r.run;e();return}else return}),Xn(i),i}function vr(e,t){e.value=t(e.value),ur(e)}function yr(e){let t=G(),n={value:Se,dirty:!0,subscribers:[]},r={val:void 0};return r.val={id:t,run:()=>{if(!n.dirty){n.dirty=!0;let e=n.subscribers,t=e.length,r=0;for(;;){let n=r;if(n<t){let t=e[n];q(t),r=n+1|0;continue}else return}}}},()=>{let t=w.current_subscriber;if(t!==void 0){let e=t;V(B(n.subscribers),t=>t.id===e.id)||I(n.subscribers,e)}if(n.dirty){let t=r.val;t===void 0||(n.value=new y(qn(t,e)),n.dirty=!1)}let i=n.value;if(i.$tag===1)return i._0;{let t=e();return n.value=new y(t),t}}}function br(e,t){let n=e.subscribers,r=n.length,i=0,a=0;for(;;){let e=i,o=a;if(e<r){let r=n[e];if(r.id!==t){n[o]=r,i=e+1|0,a=o+1|0;continue}i=e+1|0;continue}else{hn(n,o);return}}}function xr(e,t){let n=G(),r={val:!0},i={id:n,run:()=>{if(r.val){t(e.value);return}else return}};return I(e.subscribers,i),()=>{r.val=!1,br(e,n)}}function Sr(e){return e.$tag===0}function Cr(e){return e.$tag===1}function wr(e){return e.$tag===2}function Tr(e){if(e.$tag===1){let t=e._0;return new y(t)}else return Se}function Er(e){if(e.$tag===2)return e._0}function Dr(e){return er(e.state)}function Or(e){return e.state.value}function kr(e){let t=e.state;return Sr(t.value)}function Ar(e){let t=e.state;return Cr(t.value)}function jr(e){let t=e.state;return wr(t.value)}function Mr(e){let t=e.state;return Tr(t.value)}function Nr(e){let t=e.state;return Er(t.value)}function Pr(e){let t=e.refetch_;t()}function Fr(e){let t=or(b),n=e=>{J(t,new Ce(e))},r=e=>{J(t,new we(e))},i=()=>{J(t,b),e(n,r)};return i(),{state:t,refetch_:i}}function Ir(){let e=or(b);return{_0:{state:e,refetch_:()=>{J(e,b)}},_1:t=>{J(e,new Ce(t))},_2:t=>{J(e,new we(t))}}}function Lr(e){let t=$e.val;return $e.val=t+1|0,{id:t,default_value:()=>e,providers:[]}}function Rr(e,t){let n=t;for(;;){let t=n;if(t===void 0)return!1;{let r=t;if(r.id===e)return!r.disposed;n=r.parent;continue}}}function zr(e,t){let n=e.providers.length-1|0;for(;;){let r=n;if(r>=0){let i=bt(e.providers,r),a=i._0,o=i._1;if(Rr(a,t))return o;n=r-1|0;continue}else break}}function Br(e,t){let n=w.current_owner;w.current_owner=e;let r=t();return w.current_owner=n,r}function Vr(e,t){let n=w.current_owner;w.current_owner=e,t(),w.current_owner=n}function Hr(e,t){let n=w.current_owner;w.current_owner=e;let r=t();return w.current_owner=n,r}function Ur(e,t){let n=w.current_owner;w.current_owner=e;let r=t();return w.current_owner=n,r}function Wr(e){if(e.disposed)return;e.disposed=!0;let t=e.children.length-1|0;for(;;){let n=t;if(n>=0){Wr(vt(e.children,n)),t=n-1|0;continue}else break}let n=e.disposers.length-1|0;for(;;){let t=n;if(t>=0){yt(e.disposers,t)(),n=t-1|0;continue}else break}let r=e.cleanups.length-1|0;for(;;){let t=r;if(t>=0){yt(e.cleanups,t)(),r=t-1|0;continue}else break}Tn(e.children),En(e.disposers),En(e.cleanups);let i=e.parent;if(i!==void 0){let t=i.children,n=t.length,r=0,a=0;for(;;){let i=r,o=a;if(i<n){let n=t[i];if(n.id!==e.id){t[o]=n,r=i+1|0,a=o+1|0;continue}r=i+1|0;continue}else{gn(t,o);return}}}}function Gr(e){let t={id:G(),parent:e,children:[],cleanups:[],disposers:[],disposed:!1};return e===void 0||Xt(e.children,t),t}function Kr(e){let t=Gr(w.current_owner),n=()=>{Wr(t)};return Br(t,()=>e(n))}function qr(e,t,n){let r=w.current_owner,i=Gr(r),a=i.id;return Zt(e.providers,{_0:a,_1:()=>t}),F(i.cleanups,()=>{let t=e.providers,n=t.length,r=0,i=0;for(;;){let e=r,o=i;if(e<n){let n=t[e];if(n._0!==a){t[o]=n,r=e+1|0,i=o+1|0;continue}r=e+1|0;continue}else{vn(t,o);return}}}),Br(i,n)}function Jr(e,t,n){return w.current_owner===void 0?Kr(r=>qr(e,t,n)):qr(e,t,n)}function Yr(e){let t=w.current_owner,n=zr(e,t);if(n===void 0){let t=e.default_value;return t()}else return n()}function Xr(e){let t=w.current_subscriber;w.current_subscriber=void 0;let n=e();return w.current_subscriber=t,n}function Zr(e){let t=w.current_subscriber;w.current_subscriber=void 0,e(),w.current_subscriber=t}function Qr(){w.batch_depth=w.batch_depth+1|0}function $r(){for(;;)if(w.pending_effects.length>0){let e=Sn(w.pending_effects,0);Cn(w.pending_ids,0);let t=e.run;t();continue}else return}function ei(){if(w.batch_depth=w.batch_depth-1|0,w.batch_depth===0){$r();return}else return}function ti(e){Qr();let t=e();return ei(),t}function ni(e){let t=w.current_cleanups;if(t.$tag===1){let n=t._0;F(n,e);return}else{let t=w.current_owner;if(t===void 0)return;F(t.cleanups,e);return}}function ri(e){let t=Gr(w.current_owner);return{_0:Ur(t,e),_1:()=>{Wr(t)}}}function ii(e,t){return yr(()=>t(Zn(e)))}function ai(e,t,n){return yr(()=>n(Zn(e),Zn(t)))}function Y(e,t){let n=[],r=an(e),i=[],a=r.length,o=0;for(;;){let e=o;if(e<a){let a=r[e];a===t?(L(n,M({buf:i,start:0,end:i.length})),Dn(i)):z(i,a),o=e+1|0;continue}else break}return L(n,M({buf:i,start:0,end:i.length})),n}function oi(e){let t=be(v(),e());return K(()=>{In(t,e())}),new Ee(t)}function si(e,t,n){if(t===`className`){Ln(e,n);return}else if(t===`value`){g(e,`value`,n);return}else if(t===`checked`){g(e,`checked`,n===`true`);return}else if(t===`disabled`)if(n===`true`){Rn(e,`disabled`,``);return}else{zn(e,`disabled`);return}else{Rn(e,t,n);return}}function ci(e,t){Rn(e,`style`,t)}function li(e,t,n){switch(n.$tag){case 0:{let r=n._0;if(t===`style`){ci(e,r);return}else{si(e,t,r);return}}case 1:{let r=n._0;K(()=>{let n=r();if(t===`style`){ci(e,n);return}else{si(e,t,n);return}});return}default:{let r=n._0;if(t===`__ref`){r(e);return}else{ke(e,t,r);return}}}}function ui(e){return{inner:e}}function X(e){switch(e.$tag){case 0:return e._0.inner;case 1:return e._0;case 2:return e._0;default:return e._0}}function di(e,t,n,r){let i=Oe(e,t),a=n.length,o=0;for(;;){let e=o;if(e<a){let t=n[e],r=t._0,a=t._1;li(i,r,a),o=e+1|0;continue}else break}let s=r.length,c=0;for(;;){let e=c;if(e<s){let t=r[e];U(i,X(t)),c=e+1|0;continue}else break}return new Te(ui(i))}function fi(e,t,n){let r=ve(v(),e),i=t.length,a=0;for(;;){let e=a;if(e<i){let n=t[e],i=n._0,o=n._1;li(r,i,o),a=e+1|0;continue}else break}let o=n.length,s=0;for(;;){let e=s;if(e<o){let t=n[e];U(r,X(t)),s=e+1|0;continue}else break}return new Te(ui(r))}function pi(e,t){U(e,X(t))}function mi(e){In(e,``)}function hi(e,t){mi(e),pi(e,t)}function gi(e){if(Nn(e)===11){let t=[];for(;;){let n=Pn(e);if(n.$tag===1){let r=n._0;Qt(t,r),W(e,r);continue}else break}return t}else return[e]}function _i(e){switch(e.length){case 0:return new x(Hn(v()));case 1:return _t(e,0);default:{let t=Hn(v()),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];U(t,X(n)),r=i+1|0;continue}else break}return new x(t)}}}function vi(e){let t=e._2,n=e._1,r=e._0,i={val:[]},a=()=>{let e=ri(()=>t()),n=e._0;r.val=e._1,i.val=gi(X(n))};return n===void 0?a():Vr(n,a),i.val}function yi(e,t){let n=Un(v(),`show`),r=w.current_owner,i={val:void 0},a={_0:i,_1:r,_2:t},o=e()?vi(a):[],s={val:o};if(K(()=>{let t=e(),r=s.val.length>0;if(t===!0)if(r===!1){let e=H(n);if(e.$tag===1){let t=e._0,r=vi(a),i=r.length,o=0;for(;;){let e=o;if(e<i){let i=r[e];Fn(t,i,new _(n)),o=e+1|0;continue}else break}s.val=r;return}else return}else return;else if(r===!0){let e=i.val;e===void 0||(e(),i.val=void 0);let t=s.val,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e],i=H(n);if(i.$tag===1){let e=i._0;W(e,n)}r=e+1|0;continue}else break}s.val=[];return}else return}),o.length>0){let e=[],t=o.length,r=0;for(;;){let n=r;if(n<t){let t=o[n];Jt(e,new x(t)),r=n+1|0;continue}else break}return Jt(e,new x(n)),_i(e)}else return new x(n)}function bi(e,t){return Ae(e,t)}function xi(e,t){let n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];if(bi(n.item,t))return i;r=i+1|0;continue}else break}return-1}function Si(e,t,n){if(n.$tag===1){let r=n._0;return je(e,t,r)}else return Me(e,t)}function Ci(e,t,n,r,i){let a=n.length;if(a===0){let n=t.length,r=0;for(;;){let i=r;if(i<n){let n=t[i],a=n.dispose;a(),Pe(e,n.dom),r=i+1|0;continue}else break}return[]}let o=[],s=0;for(;;){let e=s;if(e<a){qt(o,{item:xt(n,0),dom:i,dispose:()=>{}}),s=e+1|0;continue}else break}let c=ln(t.length,!1),l=i,u=a-1|0;for(;;){let i=u;if(i>=0){let a=xt(n,i),s=xi(t,a);if(s>=0){let n=St(t,s);un(c,s,!0),Ne(n.dom,l)||Si(e,n.dom,new _(l)),l=n.dom,dn(o,i,n)}else{let t=r(a,i),n=t._0,s=t._1;Fn(e,n,new _(l)),l=n,dn(o,i,{item:a,dom:n,dispose:s})}u=i-1|0;continue}else break}let d=t.length,f=0;for(;;){let n=f;if(n<d){let r=t[n];if(!Ct(c,n)){let t=r.dispose;t(),Pe(e,r.dom)}f=n+1|0;continue}else break}return o}function wi(e,t,n,r){let i=H(t);if(i.$tag===1){let a=i._0;e.val=Ci(a,e.val,n,r,t);return}else return}function Ti(e,t,n){return{item:e,dom:t,dispose:n}}function Ei(e){let t=e._2,n=e._1,r=e._0,i=ri(()=>r(n,t)),a=i._0,o=i._1;return{_0:X(a),_1:o}}function Di(e,t){let n=v(),r=Un(n,`for`),i={val:[]},a={val:!0},o=w.current_owner,s=(e,n)=>{let r={_0:t,_1:e,_2:n};return o===void 0?Ei(r):Hr(o,()=>Ei(r))},c=Hn(n),l=e(),u=l.length,d=0;for(;;){let e=d;if(e<u){let t=l[e],n=s(t,e),r=n._0,a=n._1;qt(i.val,Ti(t,r,a)),U(c,r),d=e+1|0;continue}else break}return U(c,r),K(()=>{let t=e();if(a.val){a.val=!1;return}wi(i,r,t,s)}),new x(c)}function Oi(e){return new Ee(be(v(),e))}function ki(e){return new x(e)}function Ai(){return ce()}function ji(e){return Oi(e)}function Mi(e){return oi(e)}function Ni(e,t,n){return fi(e,t,n)}function Pi(e,t,n){return fi(e,t,n)}function Fi(e,t){let n=tr(e.value),r={val:Fe};return xr(e,e=>{let i=r.val;if(i.$tag===1){let e=i._0;_e(e)}r.val=new Ie(ge(()=>{mr(n,e)},t))}),n}function Ii(e){switch(e.$tag){case 0:return e._0;case 1:return e._0;default:return e._0}}function Li(){return{mount:fe,use_shadow:!1,is_svg:!1}}function Ri(e){return{mount:new pe(e),use_shadow:!1,is_svg:!1}}function zi(){return{mount:fe,use_shadow:!0,is_svg:!1}}function Bi(e,t){let n=v(),r=e.mount,i;if(r.$tag===1)i=r._0;else{let e=Vn(n);i=e.$tag===1?e._0:ve(n,`div`)}let a=e.is_svg?ye(n,`http://www.w3.org/2000/svg`,`g`):ve(n,`div`),o;e.use_shadow?(U(Mn(i,jn(`open`,!1,`named`)),a),o=a):(U(i,a),o=a);let s=[],c=t.length,l=0;for(;;){let e=l;if(e<c){let n=t[e],r=Ii(n);U(o,r),Qt(s,r),l=e+1|0;continue}else break}return ni(()=>{let e=s.length,t=0;for(;;){let n=t;if(n<e){let e=s[n],r=H(e);if(r.$tag===1){let t=r._0;W(t,e)}t=n+1|0;continue}else break}let n=H(a);if(n.$tag===1){let e=n._0;W(e,a);return}else return}),new ze(Un(n,`portal`))}function Vi(e){return Bi(Li(),e)}function Hi(e,t){let n=Bn(v(),e),r;if(n.$tag===1){let e=n._0;r=Ri(e)}else r=Li();return Bi(r,t)}function Ui(e){return Bi(zi(),e)}function Wi(e,t){return Bi({mount:new pe(e),use_shadow:!0,is_svg:!1},t)}function Gi(e){if(e!==``){let t=[],n=Y(e,38),r=n.length,i=0;for(;;){let e=i;if(e<r){let r=n[e],a=Y(r,61);if(a.length===2)R(t,{_0:T(a,0),_1:T(a,1)});else{let e;e=a.length===1?T(a,0)!==``:!1,e&&R(t,{_0:T(a,0),_1:``})}i=e+1|0;continue}else break}return t}else return[]}function Ki(e){let t=an(e),n=-1,r=t.length,i=0;for(;;){let e=i;if(e<r){if(t[e]===63){n=e;break}i=e+1|0;continue}else break}return n===-1?{_0:e,_1:[]}:{_0:M(mn(t,0,n)),_1:Gi(M(mn(t,n+1|0,void 0)))}}function qi(e){return P(e,{str:`[`,start:0,end:1})&&N(e,{str:`]`,start:0,end:1})&&!P(e,{str:`[...`,start:0,end:4})&&!P(e,{str:`[[...`,start:0,end:5})}function Ji(e){if(e.length===0)return``;let t=pt(0),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];i>0&&jt(t,`/`),jt(t,n),r=i+1|0;continue}else break}return t.val}function Yi(e){let t=Y(e,47),n=[],r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];r!==``&&L(n,r),i=e+1|0;continue}else break}return n}function Xi(e,t){let n=rn(t);return P(e,{str:n,start:0,end:n.length})}function Zi(e,t){let n=Yi(t.pattern),r=Yi(e),i=t.catch_all;if(i===void 0){if(n.length!==r.length)return S;let e=[],i=0,a=n.length,o=0;for(;;){let s=o;if(s<a){let a=n[s],c=T(r,s);if(Xi(a,58)||qi(a))if(i<t.param_names.length)R(e,{_0:T(t.param_names,i),_1:c}),i=i+1|0;else return S;else if(a!==c)return S;o=s+1|0;continue}else break}return new Be(e)}else{let e=i,a=n.length-1|0,o=r.length;if(e.optional){if(o<a)return S}else if(o<=a)return S;let s=[],c=0,l=0;for(;;){let e=l;if(e<a){let i=T(n,e),a=T(r,e);if(Xi(i,58)||qi(i))if(c<t.param_names.length)R(s,{_0:T(t.param_names,c),_1:a}),c=c+1|0;else return S;else if(i!==a)return S;l=e+1|0;continue}else break}let u=[],d=a;for(;;){let e=d;if(e<o){L(u,T(r,e)),d=e+1|0;continue}else break}let f=Ji(u);return R(s,{_0:e.name,_1:f}),new Be(s)}}function Qi(e,t){let n=Ki(e),r=n._0,i=n._1,a=t.length,o=0;for(;;){let e=o;if(e<a){let n=t[e],a=Zi(r,n);if(a.$tag===1)return{route:n,params:a._0,query:i,path:r};o=e+1|0;continue}else break}}function $i(e){if(e===``||e===`/`)return`/`;let t=an(e),n=[],r=!1,i=t.length,a=0;for(;;){let e=a;if(e<i){let i=t[e];i===47?(r||z(n,i),r=!0):(z(n,i),r=!1),a=e+1|0;continue}else break}let o=n.length;return o>1&&wt(n,o-1|0)===47&&xn(n),M({buf:n,start:0,end:n.length})}function ea(e){let t=[],n=Y(e,47),r=n.length,i=0;for(;;){let e=i;if(e<r){_L:{let r=n[e];if(P(r,{str:`:`,start:0,end:1})&&r.length>1){let e;_L$2:{_L$3:{let t=k(r,1,void 0),n;if(t.$tag===1)n=t._0;else{t._0;break _L$3}e=j(n);break _L$2}break _L}L(t,e)}else if(P(r,{str:`[`,start:0,end:1})&&!P(r,{str:`[...`,start:0,end:4})&&!P(r,{str:`[[...`,start:0,end:5})&&N(r,{str:`]`,start:0,end:1})&&r.length>2){let e;_L$2:{_L$3:{let t=k(r,1,r.length-1|0),n;if(t.$tag===1)n=t._0;else{t._0;break _L$3}e=j(n);break _L$2}break _L}L(t,e)}break _L}i=e+1|0;continue}else break}return t}function ta(e){let t=Y(e,47);if(t.length===0)return;let n=T(t,t.length-1|0);if(P(n,{str:`[[...`,start:0,end:5})&&N(n,{str:`]]`,start:0,end:2})&&n.length>7){let e;_L:{_L$2:{let t=k(n,5,n.length-2|0),r;if(t.$tag===1)r=t._0;else{t._0;break _L$2}e=j(r);break _L}return}return{name:e,optional:!0}}if(P(n,{str:`[...`,start:0,end:4})&&N(n,{str:`]`,start:0,end:1})&&n.length>5){let e;_L:{_L$2:{let t=k(n,4,n.length-1|0),r;if(t.$tag===1)r=t._0;else{t._0;break _L$2}e=j(r);break _L}return}return{name:e,optional:!1}}}function na(e,t,n,r){let i=e.length,a=0;for(;;){let o=a;if(o<i){let i=e[o];switch(i.$tag){case 0:{let e=i,a=e._0,o=e._1,s=e._2,c=e._3,l=$i(`${t}${a}`),u=ea(l),d=ta(l);$t(r,{pattern:l,param_names:u,component:o,layouts:wn(n),kind:0,title:s,meta:c,catch_all:d});break}case 2:{let e=i,n=e._0,a=e._1,o=$i(`${t}${n}`);$t(r,{pattern:o,param_names:ea(o),component:a,layouts:[],kind:1,title:``,meta:[],catch_all:ta(o)});break}case 3:{let e=i,n=e._0,a=e._1,o=$i(`${t}${n}`);$t(r,{pattern:o,param_names:ea(o),component:a,layouts:[],kind:2,title:``,meta:[],catch_all:ta(o)});break}default:{let e=i,a=e._0,o=e._1,s=e._2,c=$i(`${t}${a}`),l=wn(n);L(l,s),na(o,c,l,r)}}a=o+1|0;continue}else return}}function ra(e,t){let n=[];return na(e,t,[],n),n}function ia(){let e=Ve(),t=He();return t===``?e:`${e}${t}`}function aa(e){let t=ia();hr(e.current_path,t),gr(e.current_match,Qi(t,e.routes))}function oa(e,t){let n=ra(e,t),r=ia(),i=Qi(r,n),a={routes:n,base:t,current_path:sr(r),current_match:cr(i)};return Ge(()=>{aa(a)}),a}function sa(e,t){hr(e.current_path,t),gr(e.current_match,Qi(t,e.routes))}function ca(e,t){Ue(t),sa(e,t)}function la(e,t){We(t),sa(e,t)}function ua(e){return Qn(e.current_path)}function da(e){return $n(e.current_match)}function fa(e){return ar(e)}function pa(e){return Zn(e)}function Z(e,t){mr(e,t)}function ma(e,t){vr(e,t)}function ha(e){return e.value}function ga(e,t){return xr(e,t)}function _a(e,t){return ii(e,t)}function va(e){return yr(e)}function ya(e,t,n){return ai(e,t,n)}function ba(e){return _r(e)}function xa(e){return K(e)}function Sa(){Qr()}function Ca(){ei()}function wa(e){return Xr(e)}function Ta(e){return ti(e)}function Ea(e){ni(e)}function Da(e){return Kr(e)}function Oa(){let e=w.current_owner;if(e!==void 0)return e}function ka(e,t){return Br(e,t)}function Aa(){return w.current_owner!==void 0}function ja(e){let t=w.current_owner;Ke(()=>{if(t===void 0){Zr(e);return}else{let n=t;Vr(n,()=>{Zr(()=>{let t=[];Kn(t,e);let r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];F(n.cleanups,r),i=e+1|0;continue}else return}})});return}})}function Ma(e,t){return Di(e,t)}function Na(e){return ji(e)}function Pa(e){return Mi(e)}function Fa(e,t){hi(e,t)}function Ia(e,t){pi(e,t)}function La(e,t){return yi(e,t)}function Ra(e,t,n){return Ni(e,t,n)}function za(e,t,n){return Pi(e,t,n)}function Q(e){return _i(e)}function Ba(e,t,n){return fi(e,t,n)}function Va(e,t,n,r){return di(e,t,n,r)}function Ha(){return`http://www.w3.org/2000/svg`}function Ua(){return`http://www.w3.org/1998/Math/MathML`}function Wa(){return Ai()}function Ga(e,t){return Fi(e,t)}function Ka(e,t){return new C(e,t,``,[])}function qa(e,t,n){return new C(e,t,n,[])}function Ja(e,t,n,r){return new C(e,t,n,r)}function Ya(e,t){return oa(e,t)}function Xa(e,t){let n;return n=t===void 0?``:t,Ya(e,n)}function Za(e,t){ca(e,t)}function Qa(e,t){la(e,t)}function $a(e){return ua(e)}function eo(e){return da(e)}function to(e){return e.base}function no(e){return Lr(e)}function ro(e,t,n){return Jr(e,t,n)}function io(e){return Yr(e)}function ao(e){return Fr(e)}function oo(){let e=Ir();return{_0:e._0,_1:e._1,_2:e._2}}function so(e){return Dr(e)}function co(e){return Or(e)}function lo(e){Pr(e)}function uo(e){return kr(e)}function fo(e){return Ar(e)}function po(e){return jr(e)}function mo(e){let t=Mr(e);return t.$tag===1?t._0:Xe()}function ho(e){let t=Nr(e);return t===void 0?``:t}function go(e){return Sr(e)}function _o(e){return Cr(e)}function vo(e){return wr(e)}function yo(e){let t=Tr(e);return t.$tag===1?t._0:Xe()}function bo(e){let t=Er(e);return t===void 0?``:t}function xo(e){return new ze(X(e))}function $(e){return ki(Ii(e))}function So(e){let t=Array(e.length),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];t[i]=xo(n),r=i+1|0;continue}else break}return $(Vi(t))}function Co(e,t){let n=Array(t.length),r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];n[e]=xo(r),i=e+1|0;continue}else break}return $(Hi(e,n))}function wo(e){let t=Array(e.length),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];t[i]=xo(n),r=i+1|0;continue}else break}return $(Ui(t))}function To(e,t){let n=Array(t.length),r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];n[e]=xo(r),i=e+1|0;continue}else break}return $(Wi(e,n))}function Eo(e){let t=fa(e);return[()=>pa(t),e=>{typeof e==`function`?ma(t,e):Z(t,e)}]}function Do(e){return ba(e)}function Oo(e){return xa(e)}function ko(e){return va(e)}function Ao(e,t,n={}){let{defer:r=!1}=n,i=Array.isArray(e),a,o,s=!0;return n=>{let c=i?e.map(e=>e()):e();if(r&&s){s=!1,a=c;return}let l=t(c,a,n??o);return a=c,o=l,s=!1,l}}function jo(...e){let t={};for(let n of e)if(n)for(let e of Object.keys(n)){let r=n[e];if(e.startsWith(`on`)&&typeof r==`function`){let n=t[e];typeof n==`function`?t[e]=(...e)=>{n(...e),r(...e)}:t[e]=r}else if(e===`ref`&&typeof r==`function`){let n=t[e];typeof n==`function`?t[e]=e=>{n(e),r(e)}:t[e]=r}else if(e===`class`||e===`className`){let n=t[e];n?t[e]=`${n} ${r}`:t[e]=r}else e===`style`&&typeof r==`object`&&typeof t[e]==`object`?t[e]={...t[e],...r}:t[e]=r}return t}function Mo(e,...t){let n=[],r={...e};for(let e of t){let t={};for(let n of e)n in r&&(t[n]=r[n],delete r[n]);n.push(t)}return n.push(r),n}function No(e){let t=ao(e),n=()=>yo(so(t));return Object.defineProperties(n,{loading:{get:()=>uo(t)},error:{get:()=>ho(t)},state:{get:()=>uo(t)?`pending`:fo(t)?`ready`:po(t)?`errored`:`unresolved`},latest:{get:()=>co(t)}}),[n,{refetch:()=>lo(t)}]}function Po(){let e=oo(),t=e._0,n=e._1,r=e._2,i=()=>yo(so(t));return Object.defineProperties(i,{loading:{get:()=>uo(t)},error:{get:()=>ho(t)}}),[i,n,r]}function Fo(e,t){let[n]=e,r=fa(n()),i=Ga(r,t);return[()=>pa(i),e=>Z(r,e)]}function Io(e,...t){if(typeof e==`function`){let n=e(...t);return Array.isArray(n)?Q(n):n}return Array.isArray(e)?Q(e):e}function Lo(e){if(Array.isArray(e))return Q(e);let{children:t}=e||{};return Q(t?Array.isArray(t)?t:[t]:[])}function Ro(e){let{each:t,fallback:n,children:r}=e;return t?Ma(typeof t==`function`?t:()=>t,(e,t)=>r(e,()=>t)):n??null}function zo(e){let{when:t,children:n}=e,r=typeof t==`function`?t:()=>t;return La(()=>!!r(),()=>Io(n,r()))}function Bo(e){let{each:t,fallback:n,children:r}=e;if(!t)return n??null;let i=typeof t==`function`?t:()=>t;return i().length===0&&n?n:Ma(i,(e,t)=>r(()=>i()[t],t))}function Vo(e){let{context:t,value:n,children:r}=e;return ro(t,n,r)}function Ho(e){let{fallback:t,children:n}=e,r;r=n?Array.isArray(n)?n.flat():[n]:[];let i=r.filter(e=>e&&e.__isMatch);if(i.length===0)return t??null;let a=ko(()=>{for(let e=0;e<i.length;e++)if(i[e].when())return e;return-1}),o=[];for(let e=0;e<i.length;e++){let t=i[e],n=e;o.push(La(()=>a()===n,t.children))}return t&&o.push(La(()=>a()===-1,()=>Io(t))),Q(o)}function Uo(e){let{when:t,children:n}=e,r=typeof t==`function`?t:()=>t;return{__isMatch:!0,when:()=>!!r(),condition:r,children:()=>Io(n,r())}}function Wo(e){let{mount:t,useShadow:n=!1,children:r}=e,i=[r()];if(n){if(typeof t==`string`){let e=document.querySelector(t);if(e)return To(e,i)}else if(t)return To(t,i);return wo(i)}return typeof t==`string`?Co(t,i):So(i)}function Go(e){let t=new Map,n=structuredClone(e);function r(e){let r=e.join(`.`);if(!t.has(r)){let a=i(n,e);t.set(r,fa(a))}return t.get(r)}function i(e,t){let n=e;for(let e of t){if(n==null)return;n=n[e]}return n}function a(e,t,n){if(t.length===0)return;let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(r[n]==null){let i=t[e+1];r[n]=typeof i==`number`||/^\d+$/.test(i)?[]:{}}r=r[n]}r[t[t.length-1]]=n}function o(e){let r=e.join(`.`);Sa();try{for(let[e,a]of t.entries())(e===r||e.startsWith(r+`.`))&&Z(a,i(n,e.split(`.`)))}finally{Ca()}}function s(e,t=[]){return typeof e!=`object`||!e?e:new Proxy(e,{get(e,n){if(typeof n==`symbol`)return e[n];let i=[...t,n];pa(r(i));let a=e[n];return typeof a==`object`&&a?s(a,i):a},set(e,n,r){let i=[...t,n];return e[n]=r,o(i),!0}})}function c(...e){if(e.length===0)return;let r=[],s=0;for(;s<e.length-1&&typeof e[s]==`string`;)r.push(e[s]),s++;let c=e[s];if(r.length===0&&typeof c==`object`&&c){Object.assign(n,c);for(let[e,r]of t.entries())Z(r,i(n,e.split(`.`)));return}let l=i(n,r),u;u=typeof c==`function`?c(l):Array.isArray(c)?c:typeof c==`object`&&c&&typeof l==`object`&&l&&!Array.isArray(l)?{...l,...c}:c,a(n,r,u),o(r)}return[s(n),c]}function Ko(e){return t=>{let n=structuredClone(t);return e(n),n}}function qo(e){return()=>e}export{ho as $,Xa as A,_a as B,Ca as C,yo as Ct,Ba as D,Pa as Dt,no as E,Na as Et,pa as F,ha as G,Ia as H,Oa as I,Co as J,So as K,Aa as L,Wa as M,Ma as N,Va as O,ma as Ot,Q as P,Fa as Q,Ra as R,Ta as S,_o as St,ya as T,Ha as Tt,Ea as U,Ua as V,ja as W,ro as X,wo as Y,xa as Z,jo as _,Z as _t,Wo as a,lo as at,qo as b,vo as bt,Ho as c,Ja as ct,ko as d,eo as dt,so as et,Oo as f,$a as ft,Fo as g,ka as gt,Go as h,wa as ht,Uo as i,co as it,ba as j,Da as k,io as kt,Po as l,qa as lt,Eo as m,Qa as mt,Lo as n,uo as nt,Vo as o,mo as ot,No as p,Za as pt,To as q,Bo as r,fo as rt,zo as s,Ka as st,Ro as t,po as tt,Do as u,to as ut,Ao as v,La as vt,Sa as w,ga as wt,Mo as x,go as xt,Ko as y,bo as yt,za as z};
|