@dafengzhen/event-bus 0.1.12 → 0.1.13
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 +170 -35
- package/README.zh.md +202 -0
- package/dist/cjs/legacy/index.js +1 -1
- package/dist/cjs/legacy/index.js.map +1 -1
- package/dist/cjs/legacy-dev/index.js +14 -2
- package/dist/cjs/legacy-dev/index.js.map +1 -1
- package/dist/cjs/modern/index.js +1 -1
- package/dist/cjs/modern/index.js.map +1 -1
- package/dist/cjs/modern-dev/index.js +14 -2
- package/dist/cjs/modern-dev/index.js.map +1 -1
- package/dist/esm/legacy/index.js +1 -1
- package/dist/esm/legacy/index.js.map +1 -1
- package/dist/esm/legacy-dev/index.js +14 -2
- package/dist/esm/legacy-dev/index.js.map +1 -1
- package/dist/esm/modern/index.js +1 -1
- package/dist/esm/modern/index.js.map +1 -1
- package/dist/esm/modern-dev/index.js +14 -2
- package/dist/esm/modern-dev/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -5,15 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
[简体中文](./README.zh.md)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
`EventBus` is a lightweight, strongly-typed (TypeScript generics) event bus featuring:
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
- Framework agnostic
|
|
10
|
+
- Exact listeners (`on` / `once` / `off`)
|
|
11
|
+
- Pattern listeners: params, wildcards, and glob segments
|
|
12
|
+
- Middleware pipeline (·) with optional filters; supports `ctx.block()` to stop dispatch
|
|
13
|
+
- Scoped lifetimes via `EventScope` for automatic cleanup
|
|
14
|
+
- Sticky events with replay/consume semantics and bounded retention
|
|
15
|
+
- Safe error handling: exceptions are captured and reported without breaking dispatch
|
|
17
16
|
|
|
18
17
|
## Installation
|
|
19
18
|
|
|
@@ -23,70 +22,206 @@ npm install @dafengzhen/event-bus
|
|
|
23
22
|
|
|
24
23
|
## Basic Usage
|
|
25
24
|
|
|
25
|
+
### Define Event Map
|
|
26
|
+
|
|
26
27
|
```ts
|
|
27
|
-
type
|
|
28
|
+
type MyEvents = {
|
|
28
29
|
'user:login': { id: string };
|
|
29
|
-
'user:logout':
|
|
30
|
-
'
|
|
30
|
+
'user:logout': { id: string };
|
|
31
|
+
'order:created': { orderId: string; amount: number };
|
|
31
32
|
};
|
|
32
33
|
|
|
33
|
-
const bus = new EventBus<
|
|
34
|
+
const bus = new EventBus<MyEvents>();
|
|
35
|
+
```
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
bus.onPattern('user:{id}:update', (_e, _p, params) => console.log(params?.id));
|
|
37
|
+
## Exact Listeners (on / once / off)
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
```ts
|
|
40
|
+
const off = bus.on('user:login', (payload) => {
|
|
41
|
+
console.log('login', payload.id);
|
|
41
42
|
});
|
|
42
43
|
|
|
43
44
|
bus.emit('user:login', { id: 'u1' });
|
|
44
|
-
|
|
45
|
+
|
|
46
|
+
off();
|
|
45
47
|
```
|
|
46
48
|
|
|
47
|
-
|
|
49
|
+
One-time:
|
|
48
50
|
|
|
49
51
|
```ts
|
|
50
|
-
bus.
|
|
51
|
-
|
|
52
|
+
bus.once('user:logout', (payload) => {
|
|
53
|
+
console.log('logout once', payload.id);
|
|
54
|
+
});
|
|
52
55
|
```
|
|
53
56
|
|
|
54
|
-
|
|
57
|
+
### Pattern Listeners
|
|
58
|
+
|
|
59
|
+
A string is treated as a pattern when it contains wildcard/param/glob syntax:
|
|
55
60
|
|
|
56
61
|
```ts
|
|
57
|
-
bus.
|
|
58
|
-
console.log(
|
|
62
|
+
bus.on('user:{id}:**', (event, payload, params) => {
|
|
63
|
+
console.log(event); // e.g. "user:u1:profile:update"
|
|
64
|
+
console.log(params.id); // "u1"
|
|
59
65
|
});
|
|
60
66
|
```
|
|
61
67
|
|
|
62
|
-
|
|
68
|
+
Pattern syntax (split by `separator`, default `:`):
|
|
69
|
+
|
|
70
|
+
- `**` deep wildcard: matches 0..N segments
|
|
71
|
+
- `*` segment wildcard: matches exactly one segment
|
|
72
|
+
- `{name}` param segment: captured into `params.name`
|
|
73
|
+
- glob segment: supports `*`, `?`, and character classes `[abc]` / `[!abc]`
|
|
74
|
+
|
|
75
|
+
Examples:
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
bus.on('order:*', (event) => console.log('any order event:', event));
|
|
79
|
+
bus.on('foo[ab]', (event) => console.log('matches fooa or foob:', event));
|
|
80
|
+
bus.on('user:{id}:profile:?pdate', (event, _, params) => {
|
|
81
|
+
console.log('glob+param', params.id, event);
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Custom Separator
|
|
86
|
+
|
|
87
|
+
Default separator is` :`. Override via options:
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
bus.on('api/{ver}/**', (event, payload, params) => {}, { separator: '/' });
|
|
91
|
+
bus.emit('api/v1/users/create' as any, {
|
|
92
|
+
/* ... */
|
|
93
|
+
});
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Middleware (use)
|
|
97
|
+
|
|
98
|
+
Signature: (ctx, next) => void | Promise<void>
|
|
99
|
+
|
|
100
|
+
- Runs in insertion order
|
|
101
|
+
- Must call `next()` exactly once to continue
|
|
102
|
+
- `ctx.block()` stops the remaining pipeline
|
|
63
103
|
|
|
64
104
|
```ts
|
|
65
105
|
bus.use(async (ctx, next) => {
|
|
66
|
-
|
|
106
|
+
const t0 = performance.now();
|
|
67
107
|
await next();
|
|
108
|
+
console.log('cost(ms)=', performance.now() - t0);
|
|
68
109
|
});
|
|
69
110
|
```
|
|
70
111
|
|
|
71
|
-
|
|
112
|
+
Run only for matching string events:
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
bus.use(
|
|
116
|
+
(ctx, next) => next(),
|
|
117
|
+
{ pattern: 'user:**' }, // 只对 string event 且匹配 pattern 才运行
|
|
118
|
+
);
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Run only when any pattern listener would match:
|
|
72
122
|
|
|
73
123
|
```ts
|
|
74
|
-
bus.use((ctx) => {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
124
|
+
bus.use((ctx, next) => next(), { onlyWhenPatternListenerMatched: true });
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Custom predicate:
|
|
128
|
+
|
|
129
|
+
```ts
|
|
130
|
+
bus.use((ctx, next) => next(), { match: (ctx) => ctx.meta?.traceId != null });
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Emit Context(ctx)
|
|
134
|
+
|
|
135
|
+
Available in middleware and listeners:
|
|
136
|
+
|
|
137
|
+
- `ctx.event`, ctx.payload
|
|
138
|
+
- `ctx.meta` (shallow-cloned from `emit` `metaPatch`)
|
|
139
|
+
- `ctx.params` (params for the current pattern listener; `{}` for exact listeners)
|
|
140
|
+
- `ctx.matched` (frozen, sorted pattern matches)
|
|
141
|
+
- `ctx.block()` / `ctx.blocked`
|
|
142
|
+
|
|
143
|
+
### Sticky for exact (typed) events
|
|
144
|
+
|
|
145
|
+
When `emit(..., { sticky: true })`, the payload will be saved, and future `on(event, ...)` will be replayed immediately:
|
|
146
|
+
|
|
147
|
+
```ts
|
|
148
|
+
bus.emit('user:login', { id: 'u1' }, { sticky: true });
|
|
149
|
+
|
|
150
|
+
bus.on('user:login', (p) => {
|
|
151
|
+
// immediately receives { id: 'u1' }
|
|
78
152
|
});
|
|
79
153
|
```
|
|
80
154
|
|
|
81
|
-
|
|
155
|
+
Retention per exact key is controlled by `stickyExactMax` (default `1`):
|
|
82
156
|
|
|
83
157
|
```ts
|
|
84
|
-
bus
|
|
85
|
-
|
|
86
|
-
|
|
158
|
+
const bus = new EventBus<MyEvents>({ stickyExactMax: 5 });
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Sticky for pattern replay (string event FIFO)
|
|
162
|
+
|
|
163
|
+
String events are additionally stored in a bounded FIFO queue for pattern replay (`stickyMax`, default `200`).
|
|
164
|
+
|
|
165
|
+
- `stickyMode: 'replay'` keeps the sticky entry after replay (default)
|
|
166
|
+
- `stickyMode: 'consume'` removes it after replay
|
|
167
|
+
|
|
168
|
+
```ts
|
|
169
|
+
bus.emit('user:login', { id: 'u1' }, { sticky: true, stickyMode: 'consume' });
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Listeners can override via consumeSticky:
|
|
173
|
+
|
|
174
|
+
```ts
|
|
175
|
+
bus.on('user:login', (p) => {}, { consumeSticky: false });
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Error Handling (onError)
|
|
179
|
+
|
|
180
|
+
Listener/handler errors are captured:
|
|
181
|
+
|
|
182
|
+
- If `onError` is provided: called synchronously
|
|
183
|
+
- Otherwise: logged and rethrown asynchronously (microtask) to avoid breaking dispatch
|
|
184
|
+
|
|
185
|
+
```ts
|
|
186
|
+
const bus = new EventBus<MyEvents>({
|
|
187
|
+
onError: (err) => {
|
|
188
|
+
// e.g. Sentry.captureException(err)
|
|
189
|
+
console.error('EventBus error:', err);
|
|
190
|
+
},
|
|
87
191
|
});
|
|
88
192
|
```
|
|
89
193
|
|
|
194
|
+
### Scopes (EventScope)
|
|
195
|
+
|
|
196
|
+
Use scopes to auto-dispose temporary listeners:
|
|
197
|
+
|
|
198
|
+
```ts
|
|
199
|
+
await bus.withScope(async (scope) => {
|
|
200
|
+
bus.on('user:login', () => console.log('temp'));
|
|
201
|
+
bus.emit('user:login', { id: 'u1' });
|
|
202
|
+
}); // auto cleanup
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
You can also create a scope manually:
|
|
206
|
+
|
|
207
|
+
```ts
|
|
208
|
+
const scope = bus.createScope();
|
|
209
|
+
const off = bus.on('user:login', () => {});
|
|
210
|
+
// scope.registerOff(off) is done automatically internally (there is an active scope when registering)
|
|
211
|
+
scope.destroy();
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Reset / Destroy
|
|
215
|
+
|
|
216
|
+
`reset()` clears listeners, middlewares, and sticky state (keeps pattern compilation cache)
|
|
217
|
+
|
|
218
|
+
`destroy()` fully tears down the instance; all subsequent API calls throw
|
|
219
|
+
|
|
220
|
+
```ts
|
|
221
|
+
bus.reset();
|
|
222
|
+
bus.destroy();
|
|
223
|
+
```
|
|
224
|
+
|
|
90
225
|
## Contributing
|
|
91
226
|
|
|
92
227
|
Pull requests are welcome!
|
package/README.zh.md
CHANGED
|
@@ -5,6 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
[English](./README.md)
|
|
7
7
|
|
|
8
|
+
`EventBus` 是一个轻量、强类型(TypeScript 泛型)的事件总线,支持:
|
|
9
|
+
|
|
10
|
+
- 精确事件监听(`on` / `once` / `off`)
|
|
11
|
+
- 模式监听(Pattern Listener):参数、通配符、glob 字符类
|
|
12
|
+
- 中间件管线(`use`):可按 pattern / predicate 过滤,支持 `ctx.block()` 阻断
|
|
13
|
+
- 作用域生命周期(`EventScope`):自动清理临时监听
|
|
14
|
+
- Sticky 事件:对未来订阅者重放(可设置上限、支持 consume / replay)
|
|
15
|
+
|
|
8
16
|
## 安装
|
|
9
17
|
|
|
10
18
|
```bash
|
|
@@ -13,8 +21,202 @@ npm install @dafengzhen/event-bus
|
|
|
13
21
|
|
|
14
22
|
## 示例
|
|
15
23
|
|
|
24
|
+
### 定义事件类型
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
type MyEvents = {
|
|
28
|
+
'user:login': { id: string };
|
|
29
|
+
'user:logout': { id: string };
|
|
30
|
+
'order:created': { orderId: string; amount: number };
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const bus = new EventBus<MyEvents>();
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 精确事件监听(on / once / off)
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
const off = bus.on('user:login', (payload) => {
|
|
40
|
+
console.log('login', payload.id);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
bus.emit('user:login', { id: 'u1' });
|
|
44
|
+
|
|
45
|
+
off(); // 等价于 bus.off('user:login', listener)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
一次性监听:
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
bus.once('user:logout', (payload) => {
|
|
52
|
+
console.log('logout once', payload.id);
|
|
53
|
+
});
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 模式监听(Pattern)
|
|
57
|
+
|
|
58
|
+
当第一个参数是字符串且 "看起来像 pattern"(包含 `*` / `**` / `{param}` / glob)时,将按 pattern 处理:
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
bus.on('user:{id}:**', (event, payload, params) => {
|
|
62
|
+
console.log(event); // e.g. "user:u1:profile:update"
|
|
63
|
+
console.log(params.id); // "u1"
|
|
64
|
+
});
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
支持的 pattern 语法(按 segment 分割,默认分隔符 `:`):
|
|
68
|
+
|
|
69
|
+
- `**`:深通配(匹配 0..N 段)
|
|
70
|
+
- `*`:段通配(匹配恰好 1 段)
|
|
71
|
+
- `{name}`:参数段(捕获到 params.name)
|
|
72
|
+
- glob 段:`*`、`?`、字符类 `[abc]` / `[!abc]`
|
|
73
|
+
|
|
74
|
+
示例:
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
bus.on('order:*', (event) => console.log('any order event:', event));
|
|
78
|
+
bus.on('foo[ab]', (event) => console.log('matches fooa or foob:', event));
|
|
79
|
+
bus.on('user:{id}:profile:?pdate', (event, _, params) => {
|
|
80
|
+
console.log('glob+param', params.id, event);
|
|
81
|
+
});
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 分隔符(separator)
|
|
85
|
+
|
|
86
|
+
默认按 `:` 分段。可在 `on`/`once`/`use` 的 options 里指定:
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
bus.on('api/{ver}/**', (event, payload, params) => {}, { separator: '/' });
|
|
90
|
+
bus.emit('api/v1/users/create' as any, {
|
|
91
|
+
/* ... */
|
|
92
|
+
});
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### 中间件(use)
|
|
96
|
+
|
|
97
|
+
中间件签名:(ctx, next) => void | Promise<void>
|
|
98
|
+
|
|
99
|
+
- 中间件按注册顺序执行
|
|
100
|
+
- 必须调用 `next()` 才会继续
|
|
101
|
+
- 可调用 `ctx.block()` 直接阻断剩余管线(包括后续 middleware 和 listener)
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
bus.use(async (ctx, next) => {
|
|
105
|
+
const t0 = performance.now();
|
|
106
|
+
await next();
|
|
107
|
+
console.log('cost(ms)=', performance.now() - t0);
|
|
108
|
+
});
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
按 pattern 限制中间件仅对某些字符串事件触发:
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
bus.use(
|
|
115
|
+
(ctx, next) => next(),
|
|
116
|
+
{ pattern: 'user:**' }, // 只对 string event 且匹配 pattern 才运行
|
|
117
|
+
);
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
仅当 "存在任意 pattern listener 能匹配该事件" 时运行:
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
bus.use((ctx, next) => next(), { onlyWhenPatternListenerMatched: true });
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
自定义 match predicate:
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
bus.use((ctx, next) => next(), { match: (ctx) => ctx.meta?.traceId != null });
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Emit Context(ctx)
|
|
133
|
+
|
|
134
|
+
在 middleware 与 listener 中,你可以访问:
|
|
135
|
+
|
|
136
|
+
- `ctx.event`:事件名
|
|
137
|
+
- `ctx.payload`:payload
|
|
138
|
+
- `ctx.meta`:元信息(从 `emit` 的 `metaPatch` 浅拷贝而来)
|
|
139
|
+
- `ctx.params`:当前 pattern listener 的 params(精确 listener 为空对象)
|
|
140
|
+
- `ctx.matched`:本次匹配到的 pattern listeners(冻结、按优先级/注册顺序排序)
|
|
141
|
+
- `ctx.block()` / `ctx.blocked`
|
|
142
|
+
|
|
143
|
+
### 精确事件的 sticky
|
|
144
|
+
|
|
145
|
+
当 `emit(..., { sticky: true })` 时,会把 payload 存起来,未来 `on(event, ...)` 会立刻重放:
|
|
146
|
+
|
|
16
147
|
```ts
|
|
148
|
+
bus.emit('user:login', { id: 'u1' }, { sticky: true });
|
|
149
|
+
|
|
150
|
+
bus.on('user:login', (p) => {
|
|
151
|
+
// 这里会立即收到 { id: 'u1' }
|
|
152
|
+
});
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
`stickyExactMax` 控制每个精确事件最多保留多少条历史(默认 `1`):
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
const bus = new EventBus<MyEvents>({ stickyExactMax: 5 });
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Pattern 的 sticky
|
|
162
|
+
|
|
163
|
+
对于 string 事件,`EventBus` 维护一个 FIFO 队列用于 pattern listener 的重放匹配(默认 `stickyMax=200`):
|
|
164
|
+
|
|
165
|
+
- `stickyMode: 'replay'`:重放后仍保留(默认)
|
|
166
|
+
- `stickyMode: 'consume'`:重放后移除(一次性消费)
|
|
167
|
+
|
|
168
|
+
```ts
|
|
169
|
+
bus.emit('user:login', { id: 'u1' }, { sticky: true, stickyMode: 'consume' });
|
|
170
|
+
```
|
|
17
171
|
|
|
172
|
+
监听侧也可用 `consumeSticky` 覆盖(true/false):
|
|
173
|
+
|
|
174
|
+
```ts
|
|
175
|
+
bus.on('user:login', (p) => {}, { consumeSticky: false });
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### 错误处理(onError)
|
|
179
|
+
|
|
180
|
+
监听器/handler 抛错会被捕获: 若提供 `onError`:同步回调处理错误,否则:`console.error` 并通过异步抛出
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
const bus = new EventBus<MyEvents>({
|
|
184
|
+
onError: (err) => {
|
|
185
|
+
// e.g. Sentry.captureException(err)
|
|
186
|
+
console.error('EventBus error:', err);
|
|
187
|
+
},
|
|
188
|
+
});
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### 作用域(EventScope)
|
|
192
|
+
|
|
193
|
+
`EventScope` 用于批量管理监听生命周期:当 scope destroy 时自动 off:
|
|
194
|
+
|
|
195
|
+
```ts
|
|
196
|
+
await bus.withScope(async (scope) => {
|
|
197
|
+
bus.on('user:login', () => console.log('temp')); // 注册在当前 scope
|
|
198
|
+
bus.emit('user:login', { id: 'u1' });
|
|
199
|
+
}); // scope 自动销毁,监听自动清理
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
你也可以手动创建 scope:
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
const scope = bus.createScope();
|
|
206
|
+
const off = bus.on('user:login', () => {});
|
|
207
|
+
// scope.registerOff(off) 会在内部自动做(注册时有 active scope)
|
|
208
|
+
scope.destroy();
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Reset / Destroy
|
|
212
|
+
|
|
213
|
+
`reset()`:清空 listeners + middlewares + sticky(不清 pattern 编译缓存)
|
|
214
|
+
|
|
215
|
+
`destroy()`:彻底销毁实例,清空所有状态并标记 destroyed;之后调用任何 API 都会抛错
|
|
216
|
+
|
|
217
|
+
```ts
|
|
218
|
+
bus.reset();
|
|
219
|
+
bus.destroy();
|
|
18
220
|
```
|
|
19
221
|
|
|
20
222
|
## 贡献
|
package/dist/cjs/legacy/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function $parcel$exportWildcard(e,t){return Object.keys(t).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})}),e}function $parcel$export(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var $58652fc8c6d493a9$export$71511d61b312f219,$c1e4449832062864$export$71511d61b312f219,$6f584e554366573c$export$71511d61b312f219,$1b736fffd8e2e70e$export$71511d61b312f219,$019e0a5646671a88$export$71511d61b312f219,$7d29c32f5fa2c9e1$export$71511d61b312f219,$fa0f655c340d86c9$export$71511d61b312f219,$df7490387f86953a$export$71511d61b312f219,$8f96f5f34b630580$export$71511d61b312f219,$b17183632a57ec1b$export$71511d61b312f219,$47b21cf860486df7$export$71511d61b312f219,$4e2b73a79b81990c$export$71511d61b312f219,$66edda47360e4a71$export$71511d61b312f219,$ccd3f57dadf590be$export$71511d61b312f219,$90de646d5f25eb4f$exports={};$parcel$export($90de646d5f25eb4f$exports,"EventBus",function(){return $90de646d5f25eb4f$export$5087227eb54526});var $89903c75c4908e8f$exports={};$parcel$export($89903c75c4908e8f$exports,"DispatcherRuntime",function(){return $89903c75c4908e8f$export$9f326478f9d97f00});var $89903c75c4908e8f$export$9f326478f9d97f00=function(){"use strict";function e(){$c1e4449832062864$export$71511d61b312f219(this,e),this.scopeStack=[]}return $6f584e554366573c$export$71511d61b312f219(e,[{key:"getScope",value:function(){return this.scopeStack[this.scopeStack.length-1]}},{key:"runWithScope",value:function(e,t){var r=this;this.scopeStack.push(e);try{var n=t();if(n instanceof Promise)return n.finally(function(){r.scopeStack.pop()});return n}finally{this.scopeStack[this.scopeStack.length-1]===e&&this.scopeStack.pop()}}},{key:"runWithScopeAsync",value:function(e,t){return $58652fc8c6d493a9$export$71511d61b312f219(function(){return $ccd3f57dadf590be$export$71511d61b312f219(this,function(r){return[2,this.runWithScope(e,t)]})}).call(this)}}]),e}(),$b2ce55edba003efb$exports={};$parcel$export($b2ce55edba003efb$exports,"EventScope",function(){return $b2ce55edba003efb$export$7cb1e4e7b2b4a923});"use strict";var $b2ce55edba003efb$var$SCOPE_ID=0,$b2ce55edba003efb$export$7cb1e4e7b2b4a923=function(){"use strict";function e(t,r){$c1e4449832062864$export$71511d61b312f219(this,e),this.bus=t,this.parent=r,this.id=++$b2ce55edba003efb$var$SCOPE_ID,this.children=new Set,this.destroyed=!1,this.offs=[],null==r||r.addChild(this)}return $6f584e554366573c$export$71511d61b312f219(e,[{key:"destroy",value:function(){if(!this.destroyed){this.destroyed=!0;var e=!0,t=!1,r=void 0;try{for(var n,a,i=this.children[Symbol.iterator]();!(e=(a=i.next()).done);e=!0)a.value.destroy()}catch(e){t=!0,r=e}finally{try{e||null==i.return||i.return()}finally{if(t)throw r}}this.children.clear(),this.flushOffs(),null==(n=this.parent)||n.removeChild(this)}}},{key:"emit",value:function(e,t,r){this.assertAlive(),this.bus.emit(e,t,$7d29c32f5fa2c9e1$export$71511d61b312f219($019e0a5646671a88$export$71511d61b312f219({},r),{metaPatch:$7d29c32f5fa2c9e1$export$71511d61b312f219($019e0a5646671a88$export$71511d61b312f219({},null==r?void 0:r.metaPatch),{scope:this})}))}},{key:"emitAsync",value:function(e,t,r){return this.assertAlive(),this.bus.emitAsync(e,t,$7d29c32f5fa2c9e1$export$71511d61b312f219($019e0a5646671a88$export$71511d61b312f219({},r),{metaPatch:$7d29c32f5fa2c9e1$export$71511d61b312f219($019e0a5646671a88$export$71511d61b312f219({},null==r?void 0:r.metaPatch),{scope:this})}))}},{key:"flushOffs",value:function(){var e=this.offs.splice(0),t=!0,r=!1,n=void 0;try{for(var a,i=e[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;try{o()}catch(e){}}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}}},{key:"on",value:function(e,t,r){this.assertAlive();var n=this.bus.on(e,t,r);return this.offs.push(n),n}},{key:"once",value:function(e,t,r){this.assertAlive();var n=this.bus.once(e,t,r);return this.offs.push(n),n}},{key:"registerOff",value:function(e){this.assertAlive(),this.offs.push(e)}},{key:"run",value:function(e){return this.assertAlive(),this.bus.runtime.runWithScope(this,e)}},{key:"runAsync",value:function(e){return $58652fc8c6d493a9$export$71511d61b312f219(function(){return $ccd3f57dadf590be$export$71511d61b312f219(this,function(t){return this.assertAlive(),[2,this.bus.runtime.runWithScopeAsync(this,e)]})}).call(this)}},{key:"use",value:function(e,t){this.assertAlive();var r=this.bus.use(e,t);return this.offs.push(r),r}},{key:"withChild",value:function(e){return $58652fc8c6d493a9$export$71511d61b312f219(function(){var t;return $ccd3f57dadf590be$export$71511d61b312f219(this,function(r){switch(r.label){case 0:this.assertAlive(),t=this.bus.createScope(this),r.label=1;case 1:return r.trys.push([1,,3,4]),[4,e(t)];case 2:return[2,r.sent()];case 3:return t.destroy(),[7];case 4:return[2]}})}).call(this)}},{key:"addChild",value:function(e){this.children.add(e)}},{key:"assertAlive",value:function(){if(this.destroyed)throw Error("EventScope already destroyed.")}},{key:"removeChild",value:function(e){this.children.delete(e)}}]),e}(),$90de646d5f25eb4f$var$TRIE_NODE_ID=0,$90de646d5f25eb4f$var$VISITED_KEY_MULT=1e6,$90de646d5f25eb4f$export$5087227eb54526=function(){"use strict";function e(t){var r,n,a;$c1e4449832062864$export$71511d61b312f219(this,e),this.destroyed=!1,this.listenersByEvent=new Map,this.middlewares=[],this.patternCache=new Map,this.patternTries=new Map,this.seq=0,this.stickyEvents=[],this.stickyExact=new Map,this.onError=null==t?void 0:t.onError,this.runtime=null!=(r=null==t?void 0:t.runtime)?r:new $89903c75c4908e8f$export$9f326478f9d97f00,this.stickyMax=null!=(n=null==t?void 0:t.stickyMax)?n:200,this.stickyExactMax=null!=(a=null==t?void 0:t.stickyExactMax)?a:1}return $6f584e554366573c$export$71511d61b312f219(e,[{key:"clearListeners",value:function(){this.listenersByEvent.clear(),this.patternTries.clear()}},{key:"createScope",value:function(e){return this.assertNotDestroyed(),new $b2ce55edba003efb$export$7cb1e4e7b2b4a923(this,e)}},{key:"destroy",value:function(){this.destroyed||(this.reset(),this.patternCache.clear(),this.destroyed=!0)}},{key:"emit",value:function(e,t,r){var n=this;this.assertNotDestroyed();var a=$fa0f655c340d86c9$export$71511d61b312f219(this.parseEmitArgs(t,r),2),i=a[0],o=a[1];this._emit(e,i,o).catch(function(e){return n.rethrowAsync(e)})}},{key:"emitAsync",value:function(e,t,r){return $58652fc8c6d493a9$export$71511d61b312f219(function(){var n,a,i;return $ccd3f57dadf590be$export$71511d61b312f219(this,function(o){switch(o.label){case 0:return this.assertNotDestroyed(),a=(n=$fa0f655c340d86c9$export$71511d61b312f219(this.parseEmitArgs(t,r),2))[0],i=n[1],[4,this._emit(e,a,i)];case 1:return o.sent(),[2]}})}).call(this)}},{key:"off",value:function(e,t){this.assertNotDestroyed();var r=this.listenersByEvent.get(e);r&&(r.delete(t),0===r.size&&this.listenersByEvent.delete(e))}},{key:"on",value:function(e,t,r){return this.assertNotDestroyed(),this.add(!1,e,t,r,this.runtime.getScope())}},{key:"once",value:function(e,t,r){return this.assertNotDestroyed(),this.add(!0,e,t,r,this.runtime.getScope())}},{key:"reset",value:function(){this.clearListeners(),this.middlewares.length=0,this.stickyExact.clear(),this.stickyEvents.length=0}},{key:"use",value:function(e,t){var r=this;this.assertNotDestroyed();var n=[];if(null==t?void 0:t.pattern){var a,i=null!=(a=t.separator)?a:":",o=this.compilePatternCached(t.pattern,i);n.push(function(e){return"string"==typeof e.event&&!!o.match(e.event)})}(null==t?void 0:t.onlyWhenPatternListenerMatched)&&n.push(function(e){return"string"==typeof e.event&&r.hasAnyPatternMatch(e.event)}),(null==t?void 0:t.match)&&n.push(t.match);var s={fn:e,match:0===n.length?void 0:function(e){return n.every(function(t){return t(e)})}};return this.middlewares.push(s),this.makeOff(function(){return r.removeFromArray(r.middlewares,s)})}},{key:"withScope",value:function(e,t){return $58652fc8c6d493a9$export$71511d61b312f219(function(){var r,n,a,i,o;return $ccd3f57dadf590be$export$71511d61b312f219(this,function(s){switch(s.label){case 0:this.assertNotDestroyed(),n=null!=(r=null==t?void 0:t.parent)?r:this.runtime.getScope(),a=this.createScope(n),s.label=1;case 1:if(s.trys.push([1,,5,6]),!((i=this.runtime.runWithScope(a,function(){return e(a)}))instanceof Promise))return[3,3];return[4,i];case 2:return o=s.sent(),[3,4];case 3:o=i,s.label=4;case 4:return[2,o];case 5:return a.destroy(),[7];case 6:return[2]}})}).call(this)}},{key:"_emit",value:function(e,t,r){return $58652fc8c6d493a9$export$71511d61b312f219(function(){var n,a,i,o,s;return $ccd3f57dadf590be$export$71511d61b312f219(this,function(c){switch(c.label){case 0:return n=!1,(null==r?void 0:r.sticky)&&(i=null!=(a=r.stickyMode)?a:"replay",this.pushStickyExact(e,t,i),"string"==typeof e&&this.pushStickyEvent(e,t,i)),o="string"==typeof e?this.matchPatternListeners(e):[],s={block:function(){n=!0},get blocked(){return n},event:e,matched:Object.freeze(o.map(function(e){var t=e.entry,r=e.params;return{handler:t.handler,once:t.once,params:Object.freeze($019e0a5646671a88$export$71511d61b312f219({},r)),pattern:t.pattern,priority:t.priority}})),meta:$019e0a5646671a88$export$71511d61b312f219({},null==r?void 0:r.metaPatch),params:{},payload:t},[4,this.runMiddlewares(s,o)];case 1:return c.sent(),[2]}})}).call(this)}},{key:"add",value:function(e,t,r,n,a){var i=this,o=null!=($=null==n?void 0:n.separator)?$:":";if("string"==typeof t&&this.looksLikePattern(t,o)){var s=this.addPatternListener(e,String(t),r,n);return a&&a.registerOff(s),s}var c=null==n?void 0:n.consumeSticky;if(!e){this.getListenerSet(t).add(r);var f=this.makeOff(function(){return i.off(t,r)});a&&a.registerOff(f);var u=this.replayExactStickyAll(t,c),l=!0,d=!1,p=void 0;try{for(var $,h,y,v=u[Symbol.iterator]();!(l=(y=v.next()).done);l=!0)h=this,function(){var e=y.value;h.safeCall(function(){return r(e)})}()}catch(e){d=!0,p=e}finally{try{l||null==v.return||v.return()}finally{if(d)throw p}}return f}var b=function(e){try{r(e)}finally{i.off(t,b)}};this.getListenerSet(t).add(b);var m=this.makeOff(function(){return i.off(t,b)});a&&a.registerOff(m);var x=this.replayExactStickyOne(t,c);return void 0!==x&&this.safeCall(function(){return b(x)}),m}},{key:"addPatternListener",value:function(e,t,r,n){var a,i,o,s,c,f,u=this,l=null!=(s=null==n?void 0:n.separator)?s:":",d=this.compilePatternCached(t,l),p=null==n?void 0:n.consumeSticky,$={handler:r,match:d.match,once:e,pattern:t,priority:null!=(c=null==n?void 0:n.priority)?c:d.priority,separator:l,seq:++this.seq};this.trieInsert($,d.compiledSegs);for(var h=0;h<this.stickyEvents.length&&"break"!==(f=this,a=h,i=f.stickyEvents[a],(o=$.match(i.event))?(f.safeCall(function(){return r(i.event,i.payload,o)}),f.shouldConsumeSticky(p,i.mode)?f.stickyEvents.splice(a,1):a++,e)?(f.trieRemove($,d.compiledSegs),h=a,"break"):void(h=a):(h=++a,"continue")););return this.makeOff(function(){return u.trieRemove($,d.compiledSegs)})}},{key:"assertNotDestroyed",value:function(){if(this.destroyed)throw Error("EventBus instance has been destroyed.")}},{key:"compilePattern",value:function(e,t){var r=this;if("**"===e)return{compiledSegs:[{type:"deepWildcard"}],match:function(){return{}},priority:-100};var n=t?e.split(t):[e],a=0,i=n.map(function(e){return"**"===e?(a+=0,{type:"deepWildcard"}):"*"===e?(a+=10,{type:"segWildcard"}):e.startsWith("{")&&e.endsWith("}")&&e.length>2?(a+=80,{key:e.slice(1,-1),type:"param"}):e.includes("*")||e.includes("?")||e.includes("[")?(a+=70,{re:r.globToRegExp(e),src:e,type:"glob"}):(a+=100,{type:"exact",value:e})});return{compiledSegs:i,match:function(e){for(var r=t?e.split(t):[e],n=[{i:0,j:0,params:{}}],a=new Set;n.length;){var o,s=n.pop(),c=s.i,f=s.j,u=s.params;if(f===r.length){for(;(null==(o=i[c])?void 0:o.type)==="deepWildcard";)c++;if(c===i.length)return u;continue}var l=i[c],d=r[f];if(l){if("deepWildcard"===l.type){var p=(c+1)*$90de646d5f25eb4f$var$VISITED_KEY_MULT+f;a.has(p)||(a.add(p),n.push({i:c+1,j:f,params:u})),n.push({i:c,j:f+1,params:u});continue}if("segWildcard"===l.type){n.push({i:c+1,j:f+1,params:u});continue}if("exact"===l.type){l.value===d&&n.push({i:c+1,j:f+1,params:u});continue}if("glob"===l.type){l.re.test(d)&&n.push({i:c+1,j:f+1,params:u});continue}n.push({i:c+1,j:f+1,params:$7d29c32f5fa2c9e1$export$71511d61b312f219($019e0a5646671a88$export$71511d61b312f219({},u),$1b736fffd8e2e70e$export$71511d61b312f219({},l.key,d))})}}return null},priority:a}}},{key:"compilePatternCached",value:function(e,t){var r="".concat(e,"|").concat(t),n=this.patternCache.get(r);return n||(n=this.compilePattern(e,t),this.patternCache.set(r,n)),n}},{key:"createNode",value:function(){return{end:[],exact:new Map,id:++$90de646d5f25eb4f$var$TRIE_NODE_ID}}},{key:"getListenerSet",value:function(e){var t=this.listenersByEvent.get(e);return t||(t=new Set,this.listenersByEvent.set(e,t)),t}},{key:"globToRegExp",value:function(e){for(var t="^",r=0;r<e.length;r++){var n=e[r];if("*"===n){t+=".*";continue}if("?"===n){t+=".";continue}if("["===n){var a=e.indexOf("]",r+1);if(-1===a){t+="\\[";continue}var i=e.slice(r+1,a);if(0===i.length){t+="\\[\\]",r=a;continue}var o=i;"!"===o[0]&&(o="^"+o.slice(1)),o=o.replace(/\\/g,"\\\\").replace(/]/g,"\\]"),t+="[".concat(o,"]"),r=a;continue}/[$()*+.?[\\\]^{|}]/.test(n)?t+="\\"+n:t+=n}return new RegExp(t+="$")}},{key:"hasAnyPatternMatch",value:function(e){var t=!0,r=!1,n=void 0;try{for(var a,i=this.patternTries[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=$fa0f655c340d86c9$export$71511d61b312f219(a.value,2),s=o[0],c=o[1],f=s?e.split(s):[e];if(this.trieHasAnyMatch(c,f))return!0}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return!1}},{key:"invokeDispatch",value:function(e,t){return $58652fc8c6d493a9$export$71511d61b312f219(function(){var r,n,a,i,o,s,c,f;return $ccd3f57dadf590be$export$71511d61b312f219(this,function(u){this.invokeExactListeners(e.event,e.payload,e),r=!0,n=!1,a=void 0;try{for(o=function(){var t=c.value,r=t.entry,n=t.params;if(e.blocked)return{v:void 0};if(e.params=n,i.safeCall(function(){return r.handler(e.event,e.payload,n,e)}),r.once){var a=i.compilePatternCached(r.pattern,r.separator);i.trieRemove(r,a.compiledSegs)}},s=t[Symbol.iterator]();!(r=(c=s.next()).done);r=!0)if(i=this,f=o(),"object"===$66edda47360e4a71$export$71511d61b312f219(f))return[2,f.v]}catch(e){n=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(n)throw a}}return[2]})}).call(this)}},{key:"invokeExactListeners",value:function(e,t,r){var n=this.listenersByEvent.get(e);if(n&&0!==n.size){var a=!0,i=!1,o=void 0;try{for(var s,c,f=Array.from(n)[Symbol.iterator]();!(a=(c=f.next()).done);a=!0)s=this,function(){var e=c.value;r.params={},s.safeCall(function(){return e(t,r)})}()}catch(e){i=!0,o=e}finally{try{a||null==f.return||f.return()}finally{if(i)throw o}}}}},{key:"looksLikeEmitOptions",value:function(e){return!!e&&(void 0===e?"undefined":$66edda47360e4a71$export$71511d61b312f219(e))==="object"&&("sticky"in e||"metaPatch"in e)}},{key:"looksLikePattern",value:function(e,t){var r=t?e.split(t):[e],n=!0,a=!1,i=void 0;try{for(var o,s=r[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;if("*"===c||"**"===c||c.startsWith("{")&&c.endsWith("}")&&c.length>2||this.segmentHasGlobMeta(c))return!0}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return!1}},{key:"makeOff",value:function(e){var t=!1;return function(){t||(t=!0,e())}}},{key:"matchPatternListeners",value:function(e){var t=[],r=!0,n=!1,a=void 0;try{for(var i,o=this.patternTries[Symbol.iterator]();!(r=(i=o.next()).done);r=!0){var s=$fa0f655c340d86c9$export$71511d61b312f219(i.value,2),c=s[0],f=s[1],u=c?e.split(c):[e];this.trieMatchCollect(f,u,t)}}catch(e){n=!0,a=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw a}}var l=new Map,d=!0,p=!1,$=void 0;try{for(var h,y=t[Symbol.iterator]();!(d=(h=y.next()).done);d=!0){var v=h.value,b="".concat(v.entry.seq,"|").concat(v.paramsKey);l.has(b)||l.set(b,{entry:v.entry,params:v.params})}}catch(e){p=!0,$=e}finally{try{d||null==y.return||y.return()}finally{if(p)throw $}}var m=Array.from(l.values());return m.sort(function(e,t){return t.entry.priority!==e.entry.priority?t.entry.priority-e.entry.priority:e.entry.seq-t.entry.seq}),m}},{key:"parseEmitArgs",value:function(e,t){return this.looksLikeEmitOptions(e)?[void 0,e]:[e,t]}},{key:"pushStickyEvent",value:function(e,t,r){this.stickyEvents.push({event:e,mode:r,payload:t});var n=this.stickyEvents.length-this.stickyMax;n>0&&this.stickyEvents.splice(0,n)}},{key:"pushStickyExact",value:function(e,t,r){var n,a=null!=(n=this.stickyExact.get(e))?n:[];a.push({mode:r,payload:t});var i=a.length-this.stickyExactMax;i>0&&a.splice(0,i),this.stickyExact.set(e,a)}},{key:"removeFromArray",value:function(e,t){var r=e.indexOf(t);r>=0&&e.splice(r,1)}},{key:"replayExactStickyAll",value:function(e,t){var r=this.stickyExact.get(e);if(!r||0===r.length)return[];var n=[],a=[],i=!0,o=!1,s=void 0;try{for(var c,f=r[Symbol.iterator]();!(i=(c=f.next()).done);i=!0){var u=c.value;n.push(u.payload),this.shouldConsumeSticky(t,u.mode)||a.push(u)}}catch(e){o=!0,s=e}finally{try{i||null==f.return||f.return()}finally{if(o)throw s}}return 0===a.length?this.stickyExact.delete(e):a.length!==r.length&&this.stickyExact.set(e,a),n}},{key:"replayExactStickyOne",value:function(e,t){var r=this.stickyExact.get(e);if(r&&0!==r.length){var n=r[0];return this.shouldConsumeSticky(t,n.mode)&&(r.shift(),0===r.length?this.stickyExact.delete(e):this.stickyExact.set(e,r)),n.payload}}},{key:"rethrowAsync",value:function(e){queueMicrotask(function(){throw e})}},{key:"runMiddlewares",value:function(e,t){return $58652fc8c6d493a9$export$71511d61b312f219(function(){var r,n,a,i;return $ccd3f57dadf590be$export$71511d61b312f219(this,function(o){switch(o.label){case 0:return r=this,n=this.middlewares.slice(),a=0,[4,(i=function(){return $58652fc8c6d493a9$export$71511d61b312f219(function(){var r,o;return $ccd3f57dadf590be$export$71511d61b312f219(this,function(s){switch(s.label){case 0:if(e.blocked)return[2];if(a>=n.length)return[2,this.invokeDispatch(e,t)];if((r=n[a++]).match&&!r.match(e))return[2,i()];return o=!1,[4,r.fn(e,function(){return $58652fc8c6d493a9$export$71511d61b312f219(function(){return $ccd3f57dadf590be$export$71511d61b312f219(this,function(e){switch(e.label){case 0:if(o)throw Error("next() called multiple times.");return o=!0,[4,i()];case 1:return e.sent(),[2]}})})()})];case 1:return s.sent(),[2]}})}).call(r)})()];case 1:return o.sent(),[2]}})}).call(this)}},{key:"safeCall",value:function(e){try{e()}catch(e){console.error("[EventBus] Listener error:",e),this.onError?this.onError(e):this.rethrowAsync(e)}}},{key:"segmentHasGlobMeta",value:function(e){return e.includes("*")||e.includes("?")||e.includes("[")||e.includes("]")}},{key:"shouldConsumeSticky",value:function(e,t){return null!=e?e:"consume"===t}},{key:"trieHasAnyMatch",value:function(e,t){for(var r=[{i:0,node:e}],n=new Set,a=function(e,t){return e*$90de646d5f25eb4f$var$VISITED_KEY_MULT+t};r.length;){var i=r.pop(),o=i.node,s=i.i;if(s===t.length){if(o.end.length)return!0;if(o.deep){var c=a(o.deep.id,s);n.has(c)||(n.add(c),r.push({i:s,node:o.deep}))}continue}var f=t[s];if(o.deep){var u=a(o.deep.id,s);n.has(u)||(n.add(u),r.push({i:s,node:o.deep})),r.push({i:s+1,node:o.deep})}var l=o.exact.get(f);if(l&&r.push({i:s+1,node:l}),o.star&&r.push({i:s+1,node:o.star}),null==(h=o.globs)?void 0:h.length){var d=!0,p=!1,$=void 0;try{for(var h,y,v,b=o.globs[Symbol.iterator]();!(d=(v=b.next()).done);d=!0){var m=v.value;m.re.test(f)&&r.push({i:s+1,node:m.node})}}catch(e){p=!0,$=e}finally{try{d||null==b.return||b.return()}finally{if(p)throw $}}}var x=!0,k=!1,g=void 0;if(null==(y=o.params)?void 0:y.length)try{for(var _,S=o.params[Symbol.iterator]();!(x=(_=S.next()).done);x=!0){var w=_.value;r.push({i:s+1,node:w.node})}}catch(e){k=!0,g=e}finally{try{x||null==S.return||S.return()}finally{if(k)throw g}}}return!1}},{key:"trieInsert",value:function(e,t){var r=e.separator,n=this.patternTries.get(r);n||(n=this.createNode(),this.patternTries.set(r,n));var a=n,i=!0,o=!1,s=void 0;try{for(var c,f,u=t[Symbol.iterator]();!(i=(f=u.next()).done);i=!0)c=this,function(){var e=f.value;if("exact"===e.type){var t=a.exact.get(e.value);return t||(t=c.createNode(),a.exact.set(e.value,t)),a=t}if("segWildcard"===e.type)return null!=(i=a).star||(i.star=c.createNode()),a=a.star;if("deepWildcard"===e.type){if(!a.deep){var r=c.createNode();r.deep=r,a.deep=r}return a=a.deep}if("glob"===e.type){null!=(o=a).globs||(o.globs=[]);var n,i,o,s=a.globs.find(function(t){return t.src===e.src});return s||(s={node:c.createNode(),re:e.re,src:e.src},a.globs.push(s)),a=s.node}null!=(n=a).params||(n.params=[]);var u=a.params.find(function(t){return t.key===e.key});u||(u={key:e.key,node:c.createNode()},a.params.push(u)),a=u.node}()}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}for(var l=a.end,d=0,p=l.length;d<p;){var $=d+p>>>1,h=l[$];h.priority>e.priority?d=$+1:h.priority<e.priority?p=$:h.seq<=e.seq?d=$+1:p=$}l.splice(d,0,e)}},{key:"trieMatchCollect",value:function(e,t,r){for(var n=[{i:0,node:e,params:{},paramsKey:""}],a=new Set,i=function(e,t){return e*$90de646d5f25eb4f$var$VISITED_KEY_MULT+t};n.length;){var o=n.pop(),s=o.node,c=o.i;if(c===t.length){var f=!0,u=!1,l=void 0;if(s.end.length)try{for(var d,p,$,h=s.end[Symbol.iterator]();!(f=($=h.next()).done);f=!0){var y=$.value;r.push({entry:y,params:o.params,paramsKey:o.paramsKey})}}catch(e){u=!0,l=e}finally{try{f||null==h.return||h.return()}finally{if(u)throw l}}if(s.deep){var v=i(s.deep.id,c);a.has(v)||(a.add(v),n.push({i:c,node:s.deep,params:o.params,paramsKey:o.paramsKey}))}continue}var b=t[c];if(s.deep){var m=i(s.deep.id,c);a.has(m)||(a.add(m),n.push({i:c,node:s.deep,params:o.params,paramsKey:o.paramsKey})),n.push({i:c+1,node:s.deep,params:o.params,paramsKey:o.paramsKey})}var x=s.exact.get(b);if(x&&n.push({i:c+1,node:x,params:o.params,paramsKey:o.paramsKey}),s.star&&n.push({i:c+1,node:s.star,params:o.params,paramsKey:o.paramsKey}),null==(d=s.globs)?void 0:d.length){var k=!0,g=!1,_=void 0;try{for(var S,w=s.globs[Symbol.iterator]();!(k=(S=w.next()).done);k=!0){var E=S.value;E.re.test(b)&&n.push({i:c+1,node:E.node,params:o.params,paramsKey:o.paramsKey})}}catch(e){g=!0,_=e}finally{try{k||null==w.return||w.return()}finally{if(g)throw _}}}var O=!0,P=!1,j=void 0;if(null==(p=s.params)?void 0:p.length)try{for(var A,M=s.params[Symbol.iterator]();!(O=(A=M.next()).done);O=!0){var C=A.value,D=$7d29c32f5fa2c9e1$export$71511d61b312f219($019e0a5646671a88$export$71511d61b312f219({},o.params),$1b736fffd8e2e70e$export$71511d61b312f219({},C.key,b)),W=o.paramsKey+"\0"+C.key+"="+b;n.push({i:c+1,node:C.node,params:D,paramsKey:W})}}catch(e){P=!0,j=e}finally{try{O||null==M.return||M.return()}finally{if(P)throw j}}}}},{key:"trieRemove",value:function(e,t){var r=this.patternTries.get(e.separator);if(r){var n=r,a=!0,i=!1,o=void 0;try{for(var s,c=t[Symbol.iterator]();!(a=(s=c.next()).done);a=!0){var f=function(){var e=s.value;if(!n)return{v:void 0};if("exact"===e.type)return n=n.exact.get(e.value),"continue";if("segWildcard"===e.type)return n=n.star,"continue";if("deepWildcard"===e.type)return n=n.deep,"continue";if("glob"===e.type){var t,r,a=null==(r=n.globs)?void 0:r.find(function(t){return t.src===e.src});return n=null==a?void 0:a.node,"continue"}var i=null==(t=n.params)?void 0:t.find(function(t){return t.key===e.key});n=null==i?void 0:i.node}();if("object"===$66edda47360e4a71$export$71511d61b312f219(f))return f.v}}catch(e){i=!0,o=e}finally{try{a||null==c.return||c.return()}finally{if(i)throw o}}if(n){var u=n.end.indexOf(e);u>=0&&n.end.splice(u,1)}}}}]),e}();function $58652fc8c6d493a9$var$asyncGeneratorStep(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){r(e);return}s.done?t(c):Promise.resolve(c).then(n,a)}function $58652fc8c6d493a9$var$_async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){$58652fc8c6d493a9$var$asyncGeneratorStep(i,n,a,o,s,"next",e)}function s(e){$58652fc8c6d493a9$var$asyncGeneratorStep(i,n,a,o,s,"throw",e)}o(void 0)})}}"use strict";function $c1e4449832062864$var$_class_call_check(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}"use strict";function $6f584e554366573c$var$_defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $6f584e554366573c$var$_create_class(e,t,r){return t&&$6f584e554366573c$var$_defineProperties(e.prototype,t),r&&$6f584e554366573c$var$_defineProperties(e,r),e}"use strict";function $1b736fffd8e2e70e$var$_define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}"use strict";function $019e0a5646671a88$var$_object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){$1b736fffd8e2e70e$export$71511d61b312f219(e,t,r[t])})}return e}"use strict";function $7d29c32f5fa2c9e1$var$ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function $7d29c32f5fa2c9e1$var$_object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$7d29c32f5fa2c9e1$var$ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}"use strict";"use strict";function $df7490387f86953a$var$_array_with_holes(e){if(Array.isArray(e))return e}"use strict";function $8f96f5f34b630580$var$_iterable_to_array_limit(e,t){var r,n,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i=[],o=!0,s=!1;try{for(a=a.call(e);!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,n=e}finally{try{o||null==a.return||a.return()}finally{if(s)throw n}}return i}}"use strict";function $b17183632a57ec1b$var$_non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}"use strict";"use strict";function $4e2b73a79b81990c$var$_array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function $47b21cf860486df7$var$_unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return $4e2b73a79b81990c$export$71511d61b312f219(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $4e2b73a79b81990c$export$71511d61b312f219(e,t)}}function $fa0f655c340d86c9$var$_sliced_to_array(e,t){return $df7490387f86953a$export$71511d61b312f219(e)||$8f96f5f34b630580$export$71511d61b312f219(e,t)||$47b21cf860486df7$export$71511d61b312f219(e,t)||$b17183632a57ec1b$export$71511d61b312f219()}"use strict";function $66edda47360e4a71$var$_type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}"use strict";function $ccd3f57dadf590be$var$_ts_generator(e,t){var r,n,a,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(o,"next",{value:c(0)}),s(o,"throw",{value:c(1)}),s(o,"return",{value:c(2)}),"function"==typeof Symbol&&s(o,Symbol.iterator,{value:function(){return this}}),o;function c(s){return function(c){var f=[s,c];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,f[0]&&(i=0)),i;)try{if(r=1,n&&(a=2&f[0]?n.return:f[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,f[1])).done)return a;switch(n=0,a&&(f=[2&f[0],a.value]),f[0]){case 0:case 1:a=f;break;case 4:return i.label++,{value:f[1],done:!1};case 5:i.label++,n=f[1],f=[0];continue;case 7:f=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===f[0]||2===f[0])){i=0;continue}if(3===f[0]&&(!a||f[1]>a[0]&&f[1]<a[3])){i.label=f[1];break}if(6===f[0]&&i.label<a[1]){i.label=a[1],a=f;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(f);break}a[2]&&i.ops.pop(),i.trys.pop();continue}f=t.call(e,i)}catch(e){f=[6,e],n=0}finally{r=a=0}if(5&f[0])throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}}$parcel$exportWildcard(module.exports,$90de646d5f25eb4f$exports),$parcel$exportWildcard(module.exports,$b2ce55edba003efb$exports),$parcel$exportWildcard(module.exports,$89903c75c4908e8f$exports),$58652fc8c6d493a9$export$71511d61b312f219=$58652fc8c6d493a9$var$_async_to_generator,$c1e4449832062864$export$71511d61b312f219=$c1e4449832062864$var$_class_call_check,$6f584e554366573c$export$71511d61b312f219=$6f584e554366573c$var$_create_class,$1b736fffd8e2e70e$export$71511d61b312f219=$1b736fffd8e2e70e$var$_define_property,$019e0a5646671a88$export$71511d61b312f219=$019e0a5646671a88$var$_object_spread,$7d29c32f5fa2c9e1$export$71511d61b312f219=$7d29c32f5fa2c9e1$var$_object_spread_props,$df7490387f86953a$export$71511d61b312f219=$df7490387f86953a$var$_array_with_holes,$8f96f5f34b630580$export$71511d61b312f219=$8f96f5f34b630580$var$_iterable_to_array_limit,$b17183632a57ec1b$export$71511d61b312f219=$b17183632a57ec1b$var$_non_iterable_rest,$4e2b73a79b81990c$export$71511d61b312f219=$4e2b73a79b81990c$var$_array_like_to_array,$47b21cf860486df7$export$71511d61b312f219=$47b21cf860486df7$var$_unsupported_iterable_to_array,$fa0f655c340d86c9$export$71511d61b312f219=$fa0f655c340d86c9$var$_sliced_to_array,$66edda47360e4a71$export$71511d61b312f219=$66edda47360e4a71$var$_type_of,$ccd3f57dadf590be$export$71511d61b312f219=$ccd3f57dadf590be$var$_ts_generator;
|
|
1
|
+
function $parcel$exportWildcard(e,t){return Object.keys(t).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})}),e}function $parcel$export(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var $58652fc8c6d493a9$export$71511d61b312f219,$c1e4449832062864$export$71511d61b312f219,$6f584e554366573c$export$71511d61b312f219,$1b736fffd8e2e70e$export$71511d61b312f219,$019e0a5646671a88$export$71511d61b312f219,$7d29c32f5fa2c9e1$export$71511d61b312f219,$fa0f655c340d86c9$export$71511d61b312f219,$df7490387f86953a$export$71511d61b312f219,$8f96f5f34b630580$export$71511d61b312f219,$b17183632a57ec1b$export$71511d61b312f219,$47b21cf860486df7$export$71511d61b312f219,$4e2b73a79b81990c$export$71511d61b312f219,$66edda47360e4a71$export$71511d61b312f219,$ccd3f57dadf590be$export$71511d61b312f219,$90de646d5f25eb4f$exports={};$parcel$export($90de646d5f25eb4f$exports,"EventBus",function(){return $90de646d5f25eb4f$export$5087227eb54526});var $89903c75c4908e8f$exports={};$parcel$export($89903c75c4908e8f$exports,"DispatcherRuntime",function(){return $89903c75c4908e8f$export$9f326478f9d97f00});var $89903c75c4908e8f$export$9f326478f9d97f00=function(){"use strict";function e(){$c1e4449832062864$export$71511d61b312f219(this,e),this.scopeStack=[]}return $6f584e554366573c$export$71511d61b312f219(e,[{key:"getScope",value:function(){return this.scopeStack[this.scopeStack.length-1]}},{key:"runWithScope",value:function(e,t){var r=this;this.scopeStack.push(e);try{var n=t();if(n instanceof Promise)return n.finally(function(){r.scopeStack.pop()});return n}finally{this.scopeStack[this.scopeStack.length-1]===e&&this.scopeStack.pop()}}},{key:"runWithScopeAsync",value:function(e,t){return $58652fc8c6d493a9$export$71511d61b312f219(function(){return $ccd3f57dadf590be$export$71511d61b312f219(this,function(r){return[2,this.runWithScope(e,t)]})}).call(this)}}]),e}(),$b2ce55edba003efb$exports={};$parcel$export($b2ce55edba003efb$exports,"EventScope",function(){return $b2ce55edba003efb$export$7cb1e4e7b2b4a923});"use strict";var $b2ce55edba003efb$var$SCOPE_ID=0,$b2ce55edba003efb$export$7cb1e4e7b2b4a923=function(){"use strict";function e(t,r){$c1e4449832062864$export$71511d61b312f219(this,e),this.bus=t,this.parent=r,this.id=++$b2ce55edba003efb$var$SCOPE_ID,this.children=new Set,this.destroyed=!1,this.offs=[],null==r||r.addChild(this)}return $6f584e554366573c$export$71511d61b312f219(e,[{key:"destroy",value:function(){if(!this.destroyed){this.destroyed=!0;var e=!0,t=!1,r=void 0;try{for(var n,a,i=this.children[Symbol.iterator]();!(e=(a=i.next()).done);e=!0)a.value.destroy()}catch(e){t=!0,r=e}finally{try{e||null==i.return||i.return()}finally{if(t)throw r}}this.children.clear(),this.flushOffs(),null==(n=this.parent)||n.removeChild(this)}}},{key:"emit",value:function(e,t,r){this.assertAlive(),this.bus.emit(e,t,$7d29c32f5fa2c9e1$export$71511d61b312f219($019e0a5646671a88$export$71511d61b312f219({},r),{metaPatch:$7d29c32f5fa2c9e1$export$71511d61b312f219($019e0a5646671a88$export$71511d61b312f219({},null==r?void 0:r.metaPatch),{scope:this})}))}},{key:"emitAsync",value:function(e,t,r){return this.assertAlive(),this.bus.emitAsync(e,t,$7d29c32f5fa2c9e1$export$71511d61b312f219($019e0a5646671a88$export$71511d61b312f219({},r),{metaPatch:$7d29c32f5fa2c9e1$export$71511d61b312f219($019e0a5646671a88$export$71511d61b312f219({},null==r?void 0:r.metaPatch),{scope:this})}))}},{key:"flushOffs",value:function(){var e=this.offs.splice(0),t=!0,r=!1,n=void 0;try{for(var a,i=e[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;try{o()}catch(e){}}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}}},{key:"on",value:function(e,t,r){this.assertAlive();var n=this.bus.on(e,t,r);return this.offs.push(n),n}},{key:"once",value:function(e,t,r){this.assertAlive();var n=this.bus.once(e,t,r);return this.offs.push(n),n}},{key:"registerOff",value:function(e){this.assertAlive(),this.offs.push(e)}},{key:"run",value:function(e){return this.assertAlive(),this.bus.runtime.runWithScope(this,e)}},{key:"runAsync",value:function(e){return $58652fc8c6d493a9$export$71511d61b312f219(function(){return $ccd3f57dadf590be$export$71511d61b312f219(this,function(t){return this.assertAlive(),[2,this.bus.runtime.runWithScopeAsync(this,e)]})}).call(this)}},{key:"use",value:function(e,t){this.assertAlive();var r=this.bus.use(e,t);return this.offs.push(r),r}},{key:"withChild",value:function(e){return $58652fc8c6d493a9$export$71511d61b312f219(function(){var t;return $ccd3f57dadf590be$export$71511d61b312f219(this,function(r){switch(r.label){case 0:this.assertAlive(),t=this.bus.createScope(this),r.label=1;case 1:return r.trys.push([1,,3,4]),[4,e(t)];case 2:return[2,r.sent()];case 3:return t.destroy(),[7];case 4:return[2]}})}).call(this)}},{key:"addChild",value:function(e){this.children.add(e)}},{key:"assertAlive",value:function(){if(this.destroyed)throw Error("EventScope already destroyed.")}},{key:"removeChild",value:function(e){this.children.delete(e)}}]),e}(),$90de646d5f25eb4f$var$TRIE_NODE_ID=0,$90de646d5f25eb4f$var$VISITED_KEY_MULT=1e6,$90de646d5f25eb4f$export$5087227eb54526=function(){"use strict";function e(t){var r,n,a;$c1e4449832062864$export$71511d61b312f219(this,e),this.destroyed=!1,this.listenersByEvent=new Map,this.middlewares=[],this.patternCache=new Map,this.patternTries=new Map,this.seq=0,this.stickyEvents=[],this.stickyExact=new Map,this.onError=null==t?void 0:t.onError,this.runtime=null!=(r=null==t?void 0:t.runtime)?r:new $89903c75c4908e8f$export$9f326478f9d97f00,this.stickyMax=null!=(n=null==t?void 0:t.stickyMax)?n:200,this.stickyExactMax=null!=(a=null==t?void 0:t.stickyExactMax)?a:1}return $6f584e554366573c$export$71511d61b312f219(e,[{key:"clearListeners",value:function(){this.listenersByEvent.clear(),this.patternTries.clear()}},{key:"createScope",value:function(e){return this.assertNotDestroyed(),new $b2ce55edba003efb$export$7cb1e4e7b2b4a923(this,e)}},{key:"destroy",value:function(){this.destroyed||(this.reset(),this.patternCache.clear(),this.destroyed=!0)}},{key:"emit",value:function(e,t,r){var n=this;this.assertNotDestroyed();var a=$fa0f655c340d86c9$export$71511d61b312f219(this.parseEmitArgs(t,r),2),i=a[0],o=a[1];this._emit(e,i,o).catch(function(e){return n.rethrowAsync(e)})}},{key:"emitAsync",value:function(e,t,r){return $58652fc8c6d493a9$export$71511d61b312f219(function(){var n,a,i;return $ccd3f57dadf590be$export$71511d61b312f219(this,function(o){switch(o.label){case 0:return this.assertNotDestroyed(),a=(n=$fa0f655c340d86c9$export$71511d61b312f219(this.parseEmitArgs(t,r),2))[0],i=n[1],[4,this._emit(e,a,i)];case 1:return o.sent(),[2]}})}).call(this)}},{key:"off",value:function(e,t){this.assertNotDestroyed();var r=this.listenersByEvent.get(e);r&&(r.delete(t),0===r.size&&this.listenersByEvent.delete(e))}},{key:"on",value:function(e,t,r){return this.assertNotDestroyed(),this.add(!1,e,t,r,this.runtime.getScope())}},{key:"once",value:function(e,t,r){return this.assertNotDestroyed(),this.add(!0,e,t,r,this.runtime.getScope())}},{key:"reset",value:function(){this.clearListeners(),this.middlewares.length=0,this.stickyExact.clear(),this.stickyEvents.length=0}},{key:"use",value:function(e,t){var r=this;this.assertNotDestroyed();var n=[];if(null==t?void 0:t.pattern){var a,i=null!=(a=t.separator)?a:":",o=this.compilePatternCached(t.pattern,i);n.push(function(e){return"string"==typeof e.event&&!!o.match(e.event)})}(null==t?void 0:t.onlyWhenPatternListenerMatched)&&n.push(function(e){return"string"==typeof e.event&&r.hasAnyPatternMatch(e.event)}),(null==t?void 0:t.match)&&n.push(t.match);var s={fn:e,match:0===n.length?void 0:function(e){return n.every(function(t){return t(e)})}};return this.middlewares.push(s),this.makeOff(function(){return r.removeFromArray(r.middlewares,s)})}},{key:"withScope",value:function(e,t){return $58652fc8c6d493a9$export$71511d61b312f219(function(){var r,n,a,i,o;return $ccd3f57dadf590be$export$71511d61b312f219(this,function(s){switch(s.label){case 0:this.assertNotDestroyed(),n=null!=(r=null==t?void 0:t.parent)?r:this.runtime.getScope(),a=this.createScope(n),s.label=1;case 1:if(s.trys.push([1,,5,6]),!((i=this.runtime.runWithScope(a,function(){return e(a)}))instanceof Promise))return[3,3];return[4,i];case 2:return o=s.sent(),[3,4];case 3:o=i,s.label=4;case 4:return[2,o];case 5:return a.destroy(),[7];case 6:return[2]}})}).call(this)}},{key:"_emit",value:function(e,t,r){return $58652fc8c6d493a9$export$71511d61b312f219(function(){var n,a,i,o,s;return $ccd3f57dadf590be$export$71511d61b312f219(this,function(c){switch(c.label){case 0:return n=!1,(null==r?void 0:r.sticky)&&(i=null!=(a=r.stickyMode)?a:"replay",this.pushStickyExact(e,t,i),"string"==typeof e&&this.pushStickyEvent(e,t,i)),o="string"==typeof e?this.matchPatternListeners(e):[],s={block:function(){n=!0},get blocked(){return n},event:e,matched:Object.freeze(o.map(function(e){var t=e.entry,r=e.params;return{handler:t.handler,once:t.once,params:Object.freeze($019e0a5646671a88$export$71511d61b312f219({},r)),pattern:t.pattern,priority:t.priority}})),meta:$019e0a5646671a88$export$71511d61b312f219({},null==r?void 0:r.metaPatch),params:{},payload:t},[4,this.runMiddlewares(s,o)];case 1:return c.sent(),[2]}})}).call(this)}},{key:"add",value:function(e,t,r,n,a){var i=this,o=null!=($=null==n?void 0:n.separator)?$:":";if("string"==typeof t&&this.looksLikePattern(t,o)){var s=this.addPatternListener(e,String(t),r,n);return a&&a.registerOff(s),s}var c=null==n?void 0:n.consumeSticky;if(!e){this.getListenerSet(t).add(r);var f=this.makeOff(function(){return i.off(t,r)});a&&a.registerOff(f);var u=this.replayExactStickyAll(t,c),l=!0,d=!1,p=void 0;try{for(var $,h,y,v=u[Symbol.iterator]();!(l=(y=v.next()).done);l=!0)h=this,function(){var e=y.value;h.safeCall(function(){return r(e)})}()}catch(e){d=!0,p=e}finally{try{l||null==v.return||v.return()}finally{if(d)throw p}}return f}var b=function(e){try{r(e)}finally{i.off(t,b)}};this.getListenerSet(t).add(b);var m=this.makeOff(function(){return i.off(t,b)});a&&a.registerOff(m);var x=this.replayExactStickyOne(t,c);return void 0!==x&&this.safeCall(function(){return b(x)}),m}},{key:"addPatternListener",value:function(e,t,r,n){var a,i,o,s,c,f,u=this,l=null!=(s=null==n?void 0:n.separator)?s:":",d=this.compilePatternCached(t,l),p=null==n?void 0:n.consumeSticky,$={handler:r,match:d.match,once:e,pattern:t,priority:null!=(c=null==n?void 0:n.priority)?c:d.priority,separator:l,seq:++this.seq};this.trieInsert($,d.compiledSegs);for(var h=0;h<this.stickyEvents.length&&"break"!==(f=this,a=h,i=f.stickyEvents[a],(o=$.match(i.event))?(f.safeCall(function(){return r(i.event,i.payload,o)}),f.shouldConsumeSticky(p,i.mode)?f.stickyEvents.splice(a,1):a++,e)?(f.trieRemove($,d.compiledSegs),h=a,"break"):void(h=a):(h=++a,"continue")););return this.makeOff(function(){return u.trieRemove($,d.compiledSegs)})}},{key:"assertNotDestroyed",value:function(){if(this.destroyed)throw Error("EventBus instance has been destroyed.")}},{key:"compilePattern",value:function(e,t){var r=this;if("**"===e)return{compiledSegs:[{type:"deepWildcard"}],match:function(){return{}},priority:-100};var n=t?e.split(t):[e],a=0,i=n.map(function(e){return"**"===e?(a+=0,{type:"deepWildcard"}):"*"===e?(a+=10,{type:"segWildcard"}):e.startsWith("{")&&e.endsWith("}")&&e.length>2?(a+=80,{key:e.slice(1,-1),type:"param"}):e.includes("*")||e.includes("?")||e.includes("[")?(a+=70,{re:r.globToRegExp(e),src:e,type:"glob"}):(a+=100,{type:"exact",value:e})});return{compiledSegs:i,match:function(e){for(var r=t?e.split(t):[e],n=[{i:0,j:0,params:{}}],a=new Set;n.length;){var o,s=n.pop(),c=s.i,f=s.j,u=s.params;if(f===r.length){for(;(null==(o=i[c])?void 0:o.type)==="deepWildcard";)c++;if(c===i.length)return u;continue}var l=i[c],d=r[f];if(l){if("deepWildcard"===l.type){var p=(c+1)*$90de646d5f25eb4f$var$VISITED_KEY_MULT+f;a.has(p)||(a.add(p),n.push({i:c+1,j:f,params:u})),n.push({i:c,j:f+1,params:u});continue}if("segWildcard"===l.type){n.push({i:c+1,j:f+1,params:u});continue}if("exact"===l.type){l.value===d&&n.push({i:c+1,j:f+1,params:u});continue}if("glob"===l.type){l.re.test(d)&&n.push({i:c+1,j:f+1,params:u});continue}n.push({i:c+1,j:f+1,params:$7d29c32f5fa2c9e1$export$71511d61b312f219($019e0a5646671a88$export$71511d61b312f219({},u),$1b736fffd8e2e70e$export$71511d61b312f219({},l.key,d))})}}return null},priority:a}}},{key:"compilePatternCached",value:function(e,t){var r="".concat(e,"|").concat(t),n=this.patternCache.get(r);return n||(n=this.compilePattern(e,t),this.patternCache.set(r,n)),n}},{key:"createNode",value:function(){return{end:[],exact:new Map,id:++$90de646d5f25eb4f$var$TRIE_NODE_ID}}},{key:"getListenerSet",value:function(e){var t=this.listenersByEvent.get(e);return t||(t=new Set,this.listenersByEvent.set(e,t)),t}},{key:"globToRegExp",value:function(e){for(var t="^",r=0;r<e.length;r++){var n=e[r];if("*"===n){t+=".*";continue}if("?"===n){t+=".";continue}if("["===n){var a=e.indexOf("]",r+1);if(-1===a){t+="\\[";continue}var i=e.slice(r+1,a);if(0===i.length){t+="\\[\\]",r=a;continue}var o=i;"!"===o[0]&&(o="^"+o.slice(1)),o=o.replace(/\\/g,"\\\\").replace(/]/g,"\\]"),t+="[".concat(o,"]"),r=a;continue}/[$()*+.?[\\\]^{|}]/.test(n)?t+="\\"+n:t+=n}return new RegExp(t+="$")}},{key:"hasAnyPatternMatch",value:function(e){var t=!0,r=!1,n=void 0;try{for(var a,i=this.patternTries[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=$fa0f655c340d86c9$export$71511d61b312f219(a.value,2),s=o[0],c=o[1],f=s?e.split(s):[e];if(this.trieHasAnyMatch(c,f))return!0}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return!1}},{key:"invokeDispatch",value:function(e,t){return $58652fc8c6d493a9$export$71511d61b312f219(function(){var r,n,a,i,o,s,c,f;return $ccd3f57dadf590be$export$71511d61b312f219(this,function(u){this.invokeExactListeners(e.event,e.payload,e),r=!0,n=!1,a=void 0;try{for(o=function(){var t=c.value,r=t.entry,n=t.params;if(e.blocked)return{v:void 0};if(e.params=n,i.safeCall(function(){return r.handler(e.event,e.payload,n,e)}),r.once){var a=i.compilePatternCached(r.pattern,r.separator);i.trieRemove(r,a.compiledSegs)}},s=t[Symbol.iterator]();!(r=(c=s.next()).done);r=!0)if(i=this,f=o(),"object"===$66edda47360e4a71$export$71511d61b312f219(f))return[2,f.v]}catch(e){n=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(n)throw a}}return[2]})}).call(this)}},{key:"invokeExactListeners",value:function(e,t,r){var n=this.listenersByEvent.get(e);if(n&&0!==n.size){var a=!0,i=!1,o=void 0;try{for(var s,c,f=Array.from(n)[Symbol.iterator]();!(a=(c=f.next()).done);a=!0)s=this,function(){var e=c.value;r.params={},s.safeCall(function(){return e(t,r)})}()}catch(e){i=!0,o=e}finally{try{a||null==f.return||f.return()}finally{if(i)throw o}}}}},{key:"looksLikeEmitOptions",value:function(e){return!!e&&(void 0===e?"undefined":$66edda47360e4a71$export$71511d61b312f219(e))==="object"&&("sticky"in e||"metaPatch"in e)}},{key:"looksLikePattern",value:function(e,t){var r=t?e.split(t):[e],n=!0,a=!1,i=void 0;try{for(var o,s=r[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;if("*"===c||"**"===c||c.startsWith("{")&&c.endsWith("}")&&c.length>2||this.segmentHasGlobMeta(c))return!0}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return!1}},{key:"makeOff",value:function(e){var t=!1;return function(){t||(t=!0,e())}}},{key:"matchPatternListeners",value:function(e){var t=[],r=!0,n=!1,a=void 0;try{for(var i,o=this.patternTries[Symbol.iterator]();!(r=(i=o.next()).done);r=!0){var s=$fa0f655c340d86c9$export$71511d61b312f219(i.value,2),c=s[0],f=s[1],u=c?e.split(c):[e];this.trieMatchCollect(f,u,t)}}catch(e){n=!0,a=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw a}}var l=new Map,d=!0,p=!1,$=void 0;try{for(var h,y=t[Symbol.iterator]();!(d=(h=y.next()).done);d=!0){var v=h.value,b="".concat(v.entry.seq,"|").concat(v.paramsKey);l.has(b)||l.set(b,{entry:v.entry,params:v.params})}}catch(e){p=!0,$=e}finally{try{d||null==y.return||y.return()}finally{if(p)throw $}}var m=Array.from(l.values());return m.sort(function(e,t){return t.entry.priority!==e.entry.priority?t.entry.priority-e.entry.priority:e.entry.seq-t.entry.seq}),m}},{key:"parseEmitArgs",value:function(e,t){return this.looksLikeEmitOptions(e)?[void 0,e]:[e,t]}},{key:"pushStickyEvent",value:function(e,t,r){this.stickyEvents.push({event:e,mode:r,payload:t});var n=this.stickyEvents.length-this.stickyMax;n>0&&this.stickyEvents.splice(0,n)}},{key:"pushStickyExact",value:function(e,t,r){var n,a=null!=(n=this.stickyExact.get(e))?n:[];a.push({mode:r,payload:t});var i=a.length-this.stickyExactMax;i>0&&a.splice(0,i),this.stickyExact.set(e,a)}},{key:"removeFromArray",value:function(e,t){var r=e.indexOf(t);r>=0&&e.splice(r,1)}},{key:"replayExactStickyAll",value:function(e,t){var r=this.stickyExact.get(e);if(!r||0===r.length)return[];var n=[],a=[],i=!0,o=!1,s=void 0;try{for(var c,f=r[Symbol.iterator]();!(i=(c=f.next()).done);i=!0){var u=c.value;n.push(u.payload),this.shouldConsumeSticky(t,u.mode)||a.push(u)}}catch(e){o=!0,s=e}finally{try{i||null==f.return||f.return()}finally{if(o)throw s}}return 0===a.length?this.stickyExact.delete(e):a.length!==r.length&&this.stickyExact.set(e,a),n}},{key:"replayExactStickyOne",value:function(e,t){var r=this.stickyExact.get(e);if(r&&0!==r.length){var n=r[0];return this.shouldConsumeSticky(t,n.mode)&&(r.shift(),0===r.length?this.stickyExact.delete(e):this.stickyExact.set(e,r)),n.payload}}},{key:"rethrowAsync",value:function(e){"u">typeof queueMicrotask?queueMicrotask(function(){throw e}):"u">typeof Promise&&"function"==typeof Promise.resolve?Promise.resolve().then(function(){throw e}):setTimeout(function(){throw e},0)}},{key:"runMiddlewares",value:function(e,t){return $58652fc8c6d493a9$export$71511d61b312f219(function(){var r,n,a,i;return $ccd3f57dadf590be$export$71511d61b312f219(this,function(o){switch(o.label){case 0:return r=this,n=this.middlewares.slice(),a=0,[4,(i=function(){return $58652fc8c6d493a9$export$71511d61b312f219(function(){var r,o;return $ccd3f57dadf590be$export$71511d61b312f219(this,function(s){switch(s.label){case 0:if(e.blocked)return[2];if(a>=n.length)return[2,this.invokeDispatch(e,t)];if((r=n[a++]).match&&!r.match(e))return[2,i()];return o=!1,[4,r.fn(e,function(){return $58652fc8c6d493a9$export$71511d61b312f219(function(){return $ccd3f57dadf590be$export$71511d61b312f219(this,function(e){switch(e.label){case 0:if(o)throw Error("next() called multiple times.");return o=!0,[4,i()];case 1:return e.sent(),[2]}})})()})];case 1:return s.sent(),[2]}})}).call(r)})()];case 1:return o.sent(),[2]}})}).call(this)}},{key:"safeCall",value:function(e){try{e()}catch(e){console.error("[EventBus] Listener error:",e),this.onError?this.onError(e):this.rethrowAsync(e)}}},{key:"segmentHasGlobMeta",value:function(e){return e.includes("*")||e.includes("?")||e.includes("[")||e.includes("]")}},{key:"shouldConsumeSticky",value:function(e,t){return null!=e?e:"consume"===t}},{key:"trieHasAnyMatch",value:function(e,t){for(var r=[{i:0,node:e}],n=new Set,a=function(e,t){return e*$90de646d5f25eb4f$var$VISITED_KEY_MULT+t};r.length;){var i=r.pop(),o=i.node,s=i.i;if(s===t.length){if(o.end.length)return!0;if(o.deep){var c=a(o.deep.id,s);n.has(c)||(n.add(c),r.push({i:s,node:o.deep}))}continue}var f=t[s];if(o.deep){var u=a(o.deep.id,s);n.has(u)||(n.add(u),r.push({i:s,node:o.deep})),r.push({i:s+1,node:o.deep})}var l=o.exact.get(f);if(l&&r.push({i:s+1,node:l}),o.star&&r.push({i:s+1,node:o.star}),null==(h=o.globs)?void 0:h.length){var d=!0,p=!1,$=void 0;try{for(var h,y,v,b=o.globs[Symbol.iterator]();!(d=(v=b.next()).done);d=!0){var m=v.value;m.re.test(f)&&r.push({i:s+1,node:m.node})}}catch(e){p=!0,$=e}finally{try{d||null==b.return||b.return()}finally{if(p)throw $}}}var x=!0,k=!1,g=void 0;if(null==(y=o.params)?void 0:y.length)try{for(var _,S=o.params[Symbol.iterator]();!(x=(_=S.next()).done);x=!0){var w=_.value;r.push({i:s+1,node:w.node})}}catch(e){k=!0,g=e}finally{try{x||null==S.return||S.return()}finally{if(k)throw g}}}return!1}},{key:"trieInsert",value:function(e,t){var r=e.separator,n=this.patternTries.get(r);n||(n=this.createNode(),this.patternTries.set(r,n));var a=n,i=!0,o=!1,s=void 0;try{for(var c,f,u=t[Symbol.iterator]();!(i=(f=u.next()).done);i=!0)c=this,function(){var e=f.value;if("exact"===e.type){var t=a.exact.get(e.value);return t||(t=c.createNode(),a.exact.set(e.value,t)),a=t}if("segWildcard"===e.type)return null!=(i=a).star||(i.star=c.createNode()),a=a.star;if("deepWildcard"===e.type){if(!a.deep){var r=c.createNode();r.deep=r,a.deep=r}return a=a.deep}if("glob"===e.type){null!=(o=a).globs||(o.globs=[]);var n,i,o,s=a.globs.find(function(t){return t.src===e.src});return s||(s={node:c.createNode(),re:e.re,src:e.src},a.globs.push(s)),a=s.node}null!=(n=a).params||(n.params=[]);var u=a.params.find(function(t){return t.key===e.key});u||(u={key:e.key,node:c.createNode()},a.params.push(u)),a=u.node}()}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}for(var l=a.end,d=0,p=l.length;d<p;){var $=d+p>>>1,h=l[$];h.priority>e.priority?d=$+1:h.priority<e.priority?p=$:h.seq<=e.seq?d=$+1:p=$}l.splice(d,0,e)}},{key:"trieMatchCollect",value:function(e,t,r){for(var n=[{i:0,node:e,params:{},paramsKey:""}],a=new Set,i=function(e,t){return e*$90de646d5f25eb4f$var$VISITED_KEY_MULT+t};n.length;){var o=n.pop(),s=o.node,c=o.i;if(c===t.length){var f=!0,u=!1,l=void 0;if(s.end.length)try{for(var d,p,$,h=s.end[Symbol.iterator]();!(f=($=h.next()).done);f=!0){var y=$.value;r.push({entry:y,params:o.params,paramsKey:o.paramsKey})}}catch(e){u=!0,l=e}finally{try{f||null==h.return||h.return()}finally{if(u)throw l}}if(s.deep){var v=i(s.deep.id,c);a.has(v)||(a.add(v),n.push({i:c,node:s.deep,params:o.params,paramsKey:o.paramsKey}))}continue}var b=t[c];if(s.deep){var m=i(s.deep.id,c);a.has(m)||(a.add(m),n.push({i:c,node:s.deep,params:o.params,paramsKey:o.paramsKey})),n.push({i:c+1,node:s.deep,params:o.params,paramsKey:o.paramsKey})}var x=s.exact.get(b);if(x&&n.push({i:c+1,node:x,params:o.params,paramsKey:o.paramsKey}),s.star&&n.push({i:c+1,node:s.star,params:o.params,paramsKey:o.paramsKey}),null==(d=s.globs)?void 0:d.length){var k=!0,g=!1,_=void 0;try{for(var S,w=s.globs[Symbol.iterator]();!(k=(S=w.next()).done);k=!0){var E=S.value;E.re.test(b)&&n.push({i:c+1,node:E.node,params:o.params,paramsKey:o.paramsKey})}}catch(e){g=!0,_=e}finally{try{k||null==w.return||w.return()}finally{if(g)throw _}}}var O=!0,P=!1,j=void 0;if(null==(p=s.params)?void 0:p.length)try{for(var A,M=s.params[Symbol.iterator]();!(O=(A=M.next()).done);O=!0){var C=A.value,D=$7d29c32f5fa2c9e1$export$71511d61b312f219($019e0a5646671a88$export$71511d61b312f219({},o.params),$1b736fffd8e2e70e$export$71511d61b312f219({},C.key,b)),W=o.paramsKey+"\0"+C.key+"="+b;n.push({i:c+1,node:C.node,params:D,paramsKey:W})}}catch(e){P=!0,j=e}finally{try{O||null==M.return||M.return()}finally{if(P)throw j}}}}},{key:"trieRemove",value:function(e,t){var r=this.patternTries.get(e.separator);if(r){var n=r,a=!0,i=!1,o=void 0;try{for(var s,c=t[Symbol.iterator]();!(a=(s=c.next()).done);a=!0){var f=function(){var e=s.value;if(!n)return{v:void 0};if("exact"===e.type)return n=n.exact.get(e.value),"continue";if("segWildcard"===e.type)return n=n.star,"continue";if("deepWildcard"===e.type)return n=n.deep,"continue";if("glob"===e.type){var t,r,a=null==(r=n.globs)?void 0:r.find(function(t){return t.src===e.src});return n=null==a?void 0:a.node,"continue"}var i=null==(t=n.params)?void 0:t.find(function(t){return t.key===e.key});n=null==i?void 0:i.node}();if("object"===$66edda47360e4a71$export$71511d61b312f219(f))return f.v}}catch(e){i=!0,o=e}finally{try{a||null==c.return||c.return()}finally{if(i)throw o}}if(n){var u=n.end.indexOf(e);u>=0&&n.end.splice(u,1)}}}}]),e}();function $58652fc8c6d493a9$var$asyncGeneratorStep(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){r(e);return}s.done?t(c):Promise.resolve(c).then(n,a)}function $58652fc8c6d493a9$var$_async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(e){$58652fc8c6d493a9$var$asyncGeneratorStep(i,n,a,o,s,"next",e)}function s(e){$58652fc8c6d493a9$var$asyncGeneratorStep(i,n,a,o,s,"throw",e)}o(void 0)})}}"use strict";function $c1e4449832062864$var$_class_call_check(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}"use strict";function $6f584e554366573c$var$_defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $6f584e554366573c$var$_create_class(e,t,r){return t&&$6f584e554366573c$var$_defineProperties(e.prototype,t),r&&$6f584e554366573c$var$_defineProperties(e,r),e}"use strict";function $1b736fffd8e2e70e$var$_define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}"use strict";function $019e0a5646671a88$var$_object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){$1b736fffd8e2e70e$export$71511d61b312f219(e,t,r[t])})}return e}"use strict";function $7d29c32f5fa2c9e1$var$ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function $7d29c32f5fa2c9e1$var$_object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$7d29c32f5fa2c9e1$var$ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}"use strict";"use strict";function $df7490387f86953a$var$_array_with_holes(e){if(Array.isArray(e))return e}"use strict";function $8f96f5f34b630580$var$_iterable_to_array_limit(e,t){var r,n,a=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i=[],o=!0,s=!1;try{for(a=a.call(e);!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,n=e}finally{try{o||null==a.return||a.return()}finally{if(s)throw n}}return i}}"use strict";function $b17183632a57ec1b$var$_non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}"use strict";"use strict";function $4e2b73a79b81990c$var$_array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function $47b21cf860486df7$var$_unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return $4e2b73a79b81990c$export$71511d61b312f219(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $4e2b73a79b81990c$export$71511d61b312f219(e,t)}}function $fa0f655c340d86c9$var$_sliced_to_array(e,t){return $df7490387f86953a$export$71511d61b312f219(e)||$8f96f5f34b630580$export$71511d61b312f219(e,t)||$47b21cf860486df7$export$71511d61b312f219(e,t)||$b17183632a57ec1b$export$71511d61b312f219()}"use strict";function $66edda47360e4a71$var$_type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}"use strict";function $ccd3f57dadf590be$var$_ts_generator(e,t){var r,n,a,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(o,"next",{value:c(0)}),s(o,"throw",{value:c(1)}),s(o,"return",{value:c(2)}),"function"==typeof Symbol&&s(o,Symbol.iterator,{value:function(){return this}}),o;function c(s){return function(c){var f=[s,c];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,f[0]&&(i=0)),i;)try{if(r=1,n&&(a=2&f[0]?n.return:f[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,f[1])).done)return a;switch(n=0,a&&(f=[2&f[0],a.value]),f[0]){case 0:case 1:a=f;break;case 4:return i.label++,{value:f[1],done:!1};case 5:i.label++,n=f[1],f=[0];continue;case 7:f=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===f[0]||2===f[0])){i=0;continue}if(3===f[0]&&(!a||f[1]>a[0]&&f[1]<a[3])){i.label=f[1];break}if(6===f[0]&&i.label<a[1]){i.label=a[1],a=f;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(f);break}a[2]&&i.ops.pop(),i.trys.pop();continue}f=t.call(e,i)}catch(e){f=[6,e],n=0}finally{r=a=0}if(5&f[0])throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}}$parcel$exportWildcard(module.exports,$90de646d5f25eb4f$exports),$parcel$exportWildcard(module.exports,$b2ce55edba003efb$exports),$parcel$exportWildcard(module.exports,$89903c75c4908e8f$exports),$58652fc8c6d493a9$export$71511d61b312f219=$58652fc8c6d493a9$var$_async_to_generator,$c1e4449832062864$export$71511d61b312f219=$c1e4449832062864$var$_class_call_check,$6f584e554366573c$export$71511d61b312f219=$6f584e554366573c$var$_create_class,$1b736fffd8e2e70e$export$71511d61b312f219=$1b736fffd8e2e70e$var$_define_property,$019e0a5646671a88$export$71511d61b312f219=$019e0a5646671a88$var$_object_spread,$7d29c32f5fa2c9e1$export$71511d61b312f219=$7d29c32f5fa2c9e1$var$_object_spread_props,$df7490387f86953a$export$71511d61b312f219=$df7490387f86953a$var$_array_with_holes,$8f96f5f34b630580$export$71511d61b312f219=$8f96f5f34b630580$var$_iterable_to_array_limit,$b17183632a57ec1b$export$71511d61b312f219=$b17183632a57ec1b$var$_non_iterable_rest,$4e2b73a79b81990c$export$71511d61b312f219=$4e2b73a79b81990c$var$_array_like_to_array,$47b21cf860486df7$export$71511d61b312f219=$47b21cf860486df7$var$_unsupported_iterable_to_array,$fa0f655c340d86c9$export$71511d61b312f219=$fa0f655c340d86c9$var$_sliced_to_array,$66edda47360e4a71$export$71511d61b312f219=$66edda47360e4a71$var$_type_of,$ccd3f57dadf590be$export$71511d61b312f219=$ccd3f57dadf590be$var$_ts_generator;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|