@nextclaw/companion 0.1.14-beta.6 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,475 @@
1
1
  # @nextclaw/companion
2
2
 
3
+ ## 0.1.14
4
+
5
+ ### Patch Changes
6
+
7
+ - b99164b: Auto-generated full public beta release batch.
8
+
9
+ Packages:
10
+ - @nextclaw/agent-chat
11
+ - @nextclaw/agent-chat-ui
12
+ - @nextclaw/app-runtime
13
+ - @nextclaw/app-sdk
14
+ - @nextclaw/channel-extension-dingtalk
15
+ - @nextclaw/channel-extension-discord
16
+ - @nextclaw/channel-extension-email
17
+ - @nextclaw/channel-extension-feishu
18
+ - @nextclaw/channel-extension-qq
19
+ - @nextclaw/channel-extension-slack
20
+ - @nextclaw/channel-extension-telegram
21
+ - @nextclaw/channel-extension-wecom
22
+ - @nextclaw/channel-extension-weixin
23
+ - @nextclaw/channel-extension-whatsapp
24
+ - @nextclaw/client-sdk
25
+ - @nextclaw/companion
26
+ - @nextclaw/core
27
+ - @nextclaw/extension-sdk
28
+ - @nextclaw/feishu-core
29
+ - @nextclaw/kernel
30
+ - @nextclaw/mcp
31
+ - @nextclaw/ncp
32
+ - @nextclaw/ncp-agent-runtime
33
+ - @nextclaw/ncp-http-agent-client
34
+ - @nextclaw/ncp-http-agent-server
35
+ - @nextclaw/ncp-mcp
36
+ - @nextclaw/ncp-react
37
+ - @nextclaw/ncp-react-ui
38
+ - @nextclaw/ncp-toolkit
39
+ - @nextclaw/nextclaw-hermes-acp-bridge
40
+ - @nextclaw/nextclaw-narp-runtime-claude-code-sdk
41
+ - @nextclaw/nextclaw-narp-runtime-codex-sdk
42
+ - @nextclaw/nextclaw-narp-stdio-runtime-wrapper
43
+ - @nextclaw/nextclaw-ncp-runtime-adapter-hermes-http
44
+ - @nextclaw/nextclaw-ncp-runtime-claude-code-sdk
45
+ - @nextclaw/nextclaw-ncp-runtime-codex-sdk
46
+ - @nextclaw/nextclaw-ncp-runtime-http-client
47
+ - @nextclaw/nextclaw-ncp-runtime-stdio-client
48
+ - @nextclaw/remote
49
+ - @nextclaw/runtime
50
+ - @nextclaw/server
51
+ - @nextclaw/service
52
+ - @nextclaw/shared
53
+ - @nextclaw/ui
54
+ - nextclaw
55
+
56
+ - 2f4f480: Auto-generated full public beta release batch.
57
+
58
+ Packages:
59
+ - @nextclaw/agent-chat
60
+ - @nextclaw/agent-chat-ui
61
+ - @nextclaw/app-runtime
62
+ - @nextclaw/app-sdk
63
+ - @nextclaw/channel-extension-dingtalk
64
+ - @nextclaw/channel-extension-discord
65
+ - @nextclaw/channel-extension-email
66
+ - @nextclaw/channel-extension-feishu
67
+ - @nextclaw/channel-extension-qq
68
+ - @nextclaw/channel-extension-slack
69
+ - @nextclaw/channel-extension-telegram
70
+ - @nextclaw/channel-extension-wecom
71
+ - @nextclaw/channel-extension-weixin
72
+ - @nextclaw/channel-extension-whatsapp
73
+ - @nextclaw/client-sdk
74
+ - @nextclaw/companion
75
+ - @nextclaw/core
76
+ - @nextclaw/extension-sdk
77
+ - @nextclaw/feishu-core
78
+ - @nextclaw/kernel
79
+ - @nextclaw/mcp
80
+ - @nextclaw/ncp
81
+ - @nextclaw/ncp-agent-runtime
82
+ - @nextclaw/ncp-agent-runtime-next
83
+ - @nextclaw/ncp-http-agent-client
84
+ - @nextclaw/ncp-http-agent-server
85
+ - @nextclaw/ncp-mcp
86
+ - @nextclaw/ncp-react
87
+ - @nextclaw/ncp-react-ui
88
+ - @nextclaw/ncp-toolkit
89
+ - @nextclaw/nextclaw-hermes-acp-bridge
90
+ - @nextclaw/nextclaw-narp-runtime-claude-code-sdk
91
+ - @nextclaw/nextclaw-narp-runtime-codex-sdk
92
+ - @nextclaw/nextclaw-narp-stdio-runtime-wrapper
93
+ - @nextclaw/nextclaw-ncp-runtime-adapter-hermes-http
94
+ - @nextclaw/nextclaw-ncp-runtime-claude-code-sdk
95
+ - @nextclaw/nextclaw-ncp-runtime-codex-sdk
96
+ - @nextclaw/nextclaw-ncp-runtime-http-client
97
+ - @nextclaw/nextclaw-ncp-runtime-stdio-client
98
+ - @nextclaw/remote
99
+ - @nextclaw/runtime
100
+ - @nextclaw/server
101
+ - @nextclaw/service
102
+ - @nextclaw/shared
103
+ - @nextclaw/ui
104
+ - nextclaw
105
+
106
+ - 828495f: Auto-generated full public beta release batch.
107
+
108
+ Packages:
109
+ - @nextclaw/agent-chat
110
+ - @nextclaw/agent-chat-ui
111
+ - @nextclaw/app-runtime
112
+ - @nextclaw/app-sdk
113
+ - @nextclaw/channel-extension-dingtalk
114
+ - @nextclaw/channel-extension-discord
115
+ - @nextclaw/channel-extension-email
116
+ - @nextclaw/channel-extension-feishu
117
+ - @nextclaw/channel-extension-qq
118
+ - @nextclaw/channel-extension-slack
119
+ - @nextclaw/channel-extension-telegram
120
+ - @nextclaw/channel-extension-wecom
121
+ - @nextclaw/channel-extension-weixin
122
+ - @nextclaw/channel-extension-whatsapp
123
+ - @nextclaw/client-sdk
124
+ - @nextclaw/companion
125
+ - @nextclaw/core
126
+ - @nextclaw/extension-sdk
127
+ - @nextclaw/feishu-core
128
+ - @nextclaw/kernel
129
+ - @nextclaw/mcp
130
+ - @nextclaw/ncp
131
+ - @nextclaw/ncp-agent-runtime
132
+ - @nextclaw/ncp-agent-runtime-next
133
+ - @nextclaw/ncp-http-agent-client
134
+ - @nextclaw/ncp-http-agent-server
135
+ - @nextclaw/ncp-mcp
136
+ - @nextclaw/ncp-react
137
+ - @nextclaw/ncp-react-ui
138
+ - @nextclaw/ncp-toolkit
139
+ - @nextclaw/nextclaw-hermes-acp-bridge
140
+ - @nextclaw/nextclaw-narp-runtime-claude-code-sdk
141
+ - @nextclaw/nextclaw-narp-runtime-codex-sdk
142
+ - @nextclaw/nextclaw-narp-stdio-runtime-wrapper
143
+ - @nextclaw/nextclaw-ncp-runtime-adapter-hermes-http
144
+ - @nextclaw/nextclaw-ncp-runtime-claude-code-sdk
145
+ - @nextclaw/nextclaw-ncp-runtime-codex-sdk
146
+ - @nextclaw/nextclaw-ncp-runtime-http-client
147
+ - @nextclaw/nextclaw-ncp-runtime-stdio-client
148
+ - @nextclaw/remote
149
+ - @nextclaw/runtime
150
+ - @nextclaw/server
151
+ - @nextclaw/service
152
+ - @nextclaw/shared
153
+ - @nextclaw/ui
154
+ - nextclaw
155
+
156
+ - 25207de: Auto-generated full public beta release batch.
157
+
158
+ Packages:
159
+ - @nextclaw/agent-chat
160
+ - @nextclaw/agent-chat-ui
161
+ - @nextclaw/app-runtime
162
+ - @nextclaw/app-sdk
163
+ - @nextclaw/channel-extension-dingtalk
164
+ - @nextclaw/channel-extension-discord
165
+ - @nextclaw/channel-extension-email
166
+ - @nextclaw/channel-extension-feishu
167
+ - @nextclaw/channel-extension-qq
168
+ - @nextclaw/channel-extension-slack
169
+ - @nextclaw/channel-extension-telegram
170
+ - @nextclaw/channel-extension-wecom
171
+ - @nextclaw/channel-extension-weixin
172
+ - @nextclaw/channel-extension-whatsapp
173
+ - @nextclaw/client-sdk
174
+ - @nextclaw/companion
175
+ - @nextclaw/core
176
+ - @nextclaw/extension-sdk
177
+ - @nextclaw/feishu-core
178
+ - @nextclaw/kernel
179
+ - @nextclaw/mcp
180
+ - @nextclaw/ncp
181
+ - @nextclaw/ncp-agent-runtime
182
+ - @nextclaw/ncp-agent-runtime-next
183
+ - @nextclaw/ncp-http-agent-client
184
+ - @nextclaw/ncp-http-agent-server
185
+ - @nextclaw/ncp-mcp
186
+ - @nextclaw/ncp-react
187
+ - @nextclaw/ncp-react-ui
188
+ - @nextclaw/ncp-toolkit
189
+ - @nextclaw/nextclaw-hermes-acp-bridge
190
+ - @nextclaw/nextclaw-narp-runtime-claude-code-sdk
191
+ - @nextclaw/nextclaw-narp-runtime-codex-sdk
192
+ - @nextclaw/nextclaw-narp-stdio-runtime-wrapper
193
+ - @nextclaw/nextclaw-ncp-runtime-adapter-hermes-http
194
+ - @nextclaw/nextclaw-ncp-runtime-claude-code-sdk
195
+ - @nextclaw/nextclaw-ncp-runtime-codex-sdk
196
+ - @nextclaw/nextclaw-ncp-runtime-http-client
197
+ - @nextclaw/nextclaw-ncp-runtime-stdio-client
198
+ - @nextclaw/remote
199
+ - @nextclaw/runtime
200
+ - @nextclaw/server
201
+ - @nextclaw/service
202
+ - @nextclaw/shared
203
+ - @nextclaw/ui
204
+ - nextclaw
205
+
206
+ - 854abec: Auto-generated full public beta release batch.
207
+
208
+ Packages:
209
+ - @nextclaw/agent-chat
210
+ - @nextclaw/agent-chat-ui
211
+ - @nextclaw/app-runtime
212
+ - @nextclaw/app-sdk
213
+ - @nextclaw/channel-extension-dingtalk
214
+ - @nextclaw/channel-extension-discord
215
+ - @nextclaw/channel-extension-email
216
+ - @nextclaw/channel-extension-feishu
217
+ - @nextclaw/channel-extension-qq
218
+ - @nextclaw/channel-extension-slack
219
+ - @nextclaw/channel-extension-telegram
220
+ - @nextclaw/channel-extension-wecom
221
+ - @nextclaw/channel-extension-weixin
222
+ - @nextclaw/channel-extension-whatsapp
223
+ - @nextclaw/client-sdk
224
+ - @nextclaw/companion
225
+ - @nextclaw/core
226
+ - @nextclaw/extension-sdk
227
+ - @nextclaw/feishu-core
228
+ - @nextclaw/kernel
229
+ - @nextclaw/mcp
230
+ - @nextclaw/ncp
231
+ - @nextclaw/ncp-agent-runtime
232
+ - @nextclaw/ncp-agent-runtime-next
233
+ - @nextclaw/ncp-http-agent-client
234
+ - @nextclaw/ncp-http-agent-server
235
+ - @nextclaw/ncp-mcp
236
+ - @nextclaw/ncp-react
237
+ - @nextclaw/ncp-react-ui
238
+ - @nextclaw/ncp-toolkit
239
+ - @nextclaw/nextclaw-hermes-acp-bridge
240
+ - @nextclaw/nextclaw-narp-runtime-claude-code-sdk
241
+ - @nextclaw/nextclaw-narp-runtime-codex-sdk
242
+ - @nextclaw/nextclaw-narp-stdio-runtime-wrapper
243
+ - @nextclaw/nextclaw-ncp-runtime-adapter-hermes-http
244
+ - @nextclaw/nextclaw-ncp-runtime-claude-code-sdk
245
+ - @nextclaw/nextclaw-ncp-runtime-codex-sdk
246
+ - @nextclaw/nextclaw-ncp-runtime-http-client
247
+ - @nextclaw/nextclaw-ncp-runtime-stdio-client
248
+ - @nextclaw/remote
249
+ - @nextclaw/runtime
250
+ - @nextclaw/server
251
+ - @nextclaw/service
252
+ - @nextclaw/shared
253
+ - @nextclaw/ui
254
+ - nextclaw
255
+
256
+ - 26163ed: Auto-generated full public beta release batch.
257
+
258
+ Packages:
259
+ - @nextclaw/agent-chat
260
+ - @nextclaw/agent-chat-ui
261
+ - @nextclaw/app-runtime
262
+ - @nextclaw/app-sdk
263
+ - @nextclaw/channel-extension-dingtalk
264
+ - @nextclaw/channel-extension-discord
265
+ - @nextclaw/channel-extension-email
266
+ - @nextclaw/channel-extension-feishu
267
+ - @nextclaw/channel-extension-qq
268
+ - @nextclaw/channel-extension-slack
269
+ - @nextclaw/channel-extension-telegram
270
+ - @nextclaw/channel-extension-wecom
271
+ - @nextclaw/channel-extension-weixin
272
+ - @nextclaw/channel-extension-whatsapp
273
+ - @nextclaw/client-sdk
274
+ - @nextclaw/companion
275
+ - @nextclaw/core
276
+ - @nextclaw/extension-sdk
277
+ - @nextclaw/feishu-core
278
+ - @nextclaw/kernel
279
+ - @nextclaw/mcp
280
+ - @nextclaw/ncp
281
+ - @nextclaw/ncp-agent-runtime
282
+ - @nextclaw/ncp-agent-runtime-next
283
+ - @nextclaw/ncp-http-agent-client
284
+ - @nextclaw/ncp-http-agent-server
285
+ - @nextclaw/ncp-mcp
286
+ - @nextclaw/ncp-react
287
+ - @nextclaw/ncp-react-ui
288
+ - @nextclaw/ncp-toolkit
289
+ - @nextclaw/nextclaw-hermes-acp-bridge
290
+ - @nextclaw/nextclaw-narp-runtime-claude-code-sdk
291
+ - @nextclaw/nextclaw-narp-runtime-codex-sdk
292
+ - @nextclaw/nextclaw-narp-stdio-runtime-wrapper
293
+ - @nextclaw/nextclaw-ncp-runtime-adapter-hermes-http
294
+ - @nextclaw/nextclaw-ncp-runtime-claude-code-sdk
295
+ - @nextclaw/nextclaw-ncp-runtime-codex-sdk
296
+ - @nextclaw/nextclaw-ncp-runtime-http-client
297
+ - @nextclaw/nextclaw-ncp-runtime-stdio-client
298
+ - @nextclaw/remote
299
+ - @nextclaw/runtime
300
+ - @nextclaw/server
301
+ - @nextclaw/service
302
+ - @nextclaw/shared
303
+ - @nextclaw/ui
304
+ - nextclaw
305
+
306
+ - 5535f60: Auto-generated full public beta release batch.
307
+
308
+ Packages:
309
+ - @nextclaw/agent-chat
310
+ - @nextclaw/agent-chat-ui
311
+ - @nextclaw/app-runtime
312
+ - @nextclaw/app-sdk
313
+ - @nextclaw/channel-extension-dingtalk
314
+ - @nextclaw/channel-extension-discord
315
+ - @nextclaw/channel-extension-email
316
+ - @nextclaw/channel-extension-feishu
317
+ - @nextclaw/channel-extension-qq
318
+ - @nextclaw/channel-extension-slack
319
+ - @nextclaw/channel-extension-telegram
320
+ - @nextclaw/channel-extension-wecom
321
+ - @nextclaw/channel-extension-weixin
322
+ - @nextclaw/channel-extension-whatsapp
323
+ - @nextclaw/client-sdk
324
+ - @nextclaw/companion
325
+ - @nextclaw/core
326
+ - @nextclaw/extension-sdk
327
+ - @nextclaw/feishu-core
328
+ - @nextclaw/kernel
329
+ - @nextclaw/mcp
330
+ - @nextclaw/ncp
331
+ - @nextclaw/ncp-agent-runtime
332
+ - @nextclaw/ncp-agent-runtime-next
333
+ - @nextclaw/ncp-http-agent-client
334
+ - @nextclaw/ncp-http-agent-server
335
+ - @nextclaw/ncp-mcp
336
+ - @nextclaw/ncp-react
337
+ - @nextclaw/ncp-react-ui
338
+ - @nextclaw/ncp-toolkit
339
+ - @nextclaw/nextclaw-hermes-acp-bridge
340
+ - @nextclaw/nextclaw-narp-runtime-claude-code-sdk
341
+ - @nextclaw/nextclaw-narp-runtime-codex-sdk
342
+ - @nextclaw/nextclaw-narp-stdio-runtime-wrapper
343
+ - @nextclaw/nextclaw-ncp-runtime-adapter-hermes-http
344
+ - @nextclaw/nextclaw-ncp-runtime-claude-code-sdk
345
+ - @nextclaw/nextclaw-ncp-runtime-codex-sdk
346
+ - @nextclaw/nextclaw-ncp-runtime-http-client
347
+ - @nextclaw/nextclaw-ncp-runtime-stdio-client
348
+ - @nextclaw/remote
349
+ - @nextclaw/runtime
350
+ - @nextclaw/server
351
+ - @nextclaw/service
352
+ - @nextclaw/shared
353
+ - @nextclaw/ui
354
+ - nextclaw
355
+
356
+ - 509b157: Auto-generated full public beta release batch.
357
+
358
+ Packages:
359
+ - @nextclaw/agent-chat
360
+ - @nextclaw/agent-chat-ui
361
+ - @nextclaw/app-runtime
362
+ - @nextclaw/app-sdk
363
+ - @nextclaw/channel-extension-dingtalk
364
+ - @nextclaw/channel-extension-discord
365
+ - @nextclaw/channel-extension-email
366
+ - @nextclaw/channel-extension-feishu
367
+ - @nextclaw/channel-extension-qq
368
+ - @nextclaw/channel-extension-slack
369
+ - @nextclaw/channel-extension-telegram
370
+ - @nextclaw/channel-extension-wecom
371
+ - @nextclaw/channel-extension-weixin
372
+ - @nextclaw/channel-extension-whatsapp
373
+ - @nextclaw/client-sdk
374
+ - @nextclaw/companion
375
+ - @nextclaw/core
376
+ - @nextclaw/extension-sdk
377
+ - @nextclaw/feishu-core
378
+ - @nextclaw/kernel
379
+ - @nextclaw/mcp
380
+ - @nextclaw/ncp
381
+ - @nextclaw/ncp-agent-runtime
382
+ - @nextclaw/ncp-agent-runtime-next
383
+ - @nextclaw/ncp-http-agent-client
384
+ - @nextclaw/ncp-http-agent-server
385
+ - @nextclaw/ncp-mcp
386
+ - @nextclaw/ncp-react
387
+ - @nextclaw/ncp-react-ui
388
+ - @nextclaw/ncp-toolkit
389
+ - @nextclaw/nextclaw-hermes-acp-bridge
390
+ - @nextclaw/nextclaw-narp-runtime-claude-code-sdk
391
+ - @nextclaw/nextclaw-narp-runtime-codex-sdk
392
+ - @nextclaw/nextclaw-narp-stdio-runtime-wrapper
393
+ - @nextclaw/nextclaw-ncp-runtime-adapter-hermes-http
394
+ - @nextclaw/nextclaw-ncp-runtime-claude-code-sdk
395
+ - @nextclaw/nextclaw-ncp-runtime-codex-sdk
396
+ - @nextclaw/nextclaw-ncp-runtime-http-client
397
+ - @nextclaw/nextclaw-ncp-runtime-stdio-client
398
+ - @nextclaw/remote
399
+ - @nextclaw/runtime
400
+ - @nextclaw/server
401
+ - @nextclaw/service
402
+ - @nextclaw/shared
403
+ - @nextclaw/ui
404
+ - nextclaw
405
+
406
+ - Updated dependencies [b99164b]
407
+ - Updated dependencies [2f4f480]
408
+ - Updated dependencies [828495f]
409
+ - Updated dependencies [25207de]
410
+ - Updated dependencies [854abec]
411
+ - Updated dependencies [26163ed]
412
+ - Updated dependencies [5535f60]
413
+ - Updated dependencies [509b157]
414
+ - @nextclaw/client-sdk@0.1.14
415
+
416
+ ## 0.1.14-beta.7
417
+
418
+ ### Patch Changes
419
+
420
+ - Auto-generated full public beta release batch.
421
+
422
+ Packages:
423
+ - @nextclaw/agent-chat
424
+ - @nextclaw/agent-chat-ui
425
+ - @nextclaw/app-runtime
426
+ - @nextclaw/app-sdk
427
+ - @nextclaw/channel-extension-dingtalk
428
+ - @nextclaw/channel-extension-discord
429
+ - @nextclaw/channel-extension-email
430
+ - @nextclaw/channel-extension-feishu
431
+ - @nextclaw/channel-extension-qq
432
+ - @nextclaw/channel-extension-slack
433
+ - @nextclaw/channel-extension-telegram
434
+ - @nextclaw/channel-extension-wecom
435
+ - @nextclaw/channel-extension-weixin
436
+ - @nextclaw/channel-extension-whatsapp
437
+ - @nextclaw/client-sdk
438
+ - @nextclaw/companion
439
+ - @nextclaw/core
440
+ - @nextclaw/extension-sdk
441
+ - @nextclaw/feishu-core
442
+ - @nextclaw/kernel
443
+ - @nextclaw/mcp
444
+ - @nextclaw/ncp
445
+ - @nextclaw/ncp-agent-runtime
446
+ - @nextclaw/ncp-agent-runtime-next
447
+ - @nextclaw/ncp-http-agent-client
448
+ - @nextclaw/ncp-http-agent-server
449
+ - @nextclaw/ncp-mcp
450
+ - @nextclaw/ncp-react
451
+ - @nextclaw/ncp-react-ui
452
+ - @nextclaw/ncp-toolkit
453
+ - @nextclaw/nextclaw-hermes-acp-bridge
454
+ - @nextclaw/nextclaw-narp-runtime-claude-code-sdk
455
+ - @nextclaw/nextclaw-narp-runtime-codex-sdk
456
+ - @nextclaw/nextclaw-narp-stdio-runtime-wrapper
457
+ - @nextclaw/nextclaw-ncp-runtime-adapter-hermes-http
458
+ - @nextclaw/nextclaw-ncp-runtime-claude-code-sdk
459
+ - @nextclaw/nextclaw-ncp-runtime-codex-sdk
460
+ - @nextclaw/nextclaw-ncp-runtime-http-client
461
+ - @nextclaw/nextclaw-ncp-runtime-stdio-client
462
+ - @nextclaw/remote
463
+ - @nextclaw/runtime
464
+ - @nextclaw/server
465
+ - @nextclaw/service
466
+ - @nextclaw/shared
467
+ - @nextclaw/ui
468
+ - nextclaw
469
+
470
+ - Updated dependencies
471
+ - @nextclaw/client-sdk@0.1.14-beta.7
472
+
3
473
  ## 0.1.14-beta.6
4
474
 
5
475
  ### Patch Changes
@@ -1 +1 @@
1
- function e(e){let t=e.trim().replace(/\/+$/,``);if(!t)throw Error(`NextClaw client baseUrl is required.`);return t}function t(t,n){return`${e(t)}${n.startsWith(`/`)?n:`/${n}`}`}function n(e,t){if(!t)return e;let n=typeof t==`string`?t:t.toString();return n?`${e}${e.includes(`?`)?`&`:`?`}${n}`:e}function r(e,n){let r=new URL(t(e,n));return r.protocol===`https:`?r.protocol=`wss:`:r.protocol===`http:`&&(r.protocol=`ws:`),r.toString()}var i=class extends Error{status;code;details;constructor(e){let{code:t,details:n,message:r,status:i}=e;super(r),this.name=`NextClawClientError`,this.status=i,this.code=t,this.details=n}};function a(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function o(e,t){return a(e)?e[t]:void 0}var s=class{baseUrl;fetchImpl;requestTimeoutMs;defaultHeaders;transport;constructor(e){this.options=e;let{baseUrl:t,fetchImpl:n,headers:r,requestTimeoutMs:i,token:a}=e;this.baseUrl=t,this.fetchImpl=n??fetch,this.requestTimeoutMs=Math.max(1e3,i??15e3),this.transport=e.transport,this.defaultHeaders={Accept:`application/json`,...r??{},...a?{Authorization:`Bearer ${a}`}:{}}}request=async(e,r={})=>{let{body:a,headers:o,method:s,query:c,signal:l,timeoutMs:u}=r;if(this.transport)return await this.requestWithTransport(e,r);let d=new AbortController,f=Math.max(1e3,u??this.requestTimeoutMs),p=this.bindAbortSignal(d,l),m=setTimeout(()=>d.abort(),f),h={...this.defaultHeaders,...o??{}},g=this.normalizeRequestBody(a,h);try{let r=await this.fetchImpl(t(this.baseUrl,n(e,this.serializeQuery(c))),{method:s??`GET`,headers:h,body:g,signal:d.signal}),a=await r.json();if(!r.ok){let e=this.extractApiError(a);throw new i({message:e.message,status:r.status,code:e.code,details:e.details})}if(!this.isApiResponse(a))throw new i({message:`Unexpected NextClaw API response shape.`,status:r.status});if(!a.ok)throw new i({message:a.error.message,status:r.status,code:a.error.code,details:a.error.details});return a.data}catch(e){throw e instanceof i?e:e instanceof Error&&e.name===`AbortError`?new i({message:`NextClaw API request timed out after ${f}ms.`}):new i({message:e instanceof Error?e.message:`NextClaw API request failed.`})}finally{l?.removeEventListener(`abort`,p),clearTimeout(m)}};bindAbortSignal=(e,t)=>{let n=()=>e.abort(t?.reason);return t?t.aborted?(e.abort(t.reason),n):(t.addEventListener(`abort`,n,{once:!0}),n):n};requestWithTransport=async(e,t)=>{let{body:n,headers:r,method:s,query:c,signal:l,timeoutMs:u}=t,{transport:d}=this;if(!d)throw new i({message:`NextClaw transport is not configured.`});try{return await d.request({method:s??`GET`,path:e,...n===void 0?{}:{body:n},...c?{query:c}:{},...r?{headers:r}:{},...l?{signal:l}:{},...u===void 0?{}:{timeoutMs:u}})}catch(e){if(e instanceof i)throw e;let t=o(e,`code`),n=o(e,`details`),r=o(e,`status`);throw new i({message:e instanceof Error?e.message:`NextClaw API request failed.`,code:typeof t==`string`?t:void 0,details:a(n)?n:void 0,status:typeof r==`number`?r:void 0})}};get=async(e,t={})=>await this.request(e,{...t,method:`GET`});post=async(e,t,n={})=>await this.request(e,{...n,method:`POST`,...t===void 0?{}:{body:t}});put=async(e,t,n={})=>await this.request(e,{...n,method:`PUT`,...t===void 0?{}:{body:t}});delete=async(e,t={})=>await this.request(e,{...t,method:`DELETE`});upload=async(e,n,r={})=>{let{headers:a,signal:o,timeoutMs:s}=r;if(this.transport?.upload)return await this.transport.upload({path:e,formData:n,...a?{headers:a}:{},...o?{signal:o}:{},...s===void 0?{}:{timeoutMs:s}});let l=new AbortController,u=Math.max(1e3,s??this.requestTimeoutMs),d=()=>l.abort(o?.reason);o&&(o.aborted?l.abort(o.reason):o.addEventListener(`abort`,d,{once:!0}));let f=setTimeout(()=>l.abort(),u);try{let r=await this.fetchImpl(t(this.baseUrl,e),{method:`POST`,headers:{Accept:`application/json`,...c(this.options.token)??{},...this.options.headers??{},...a??{}},body:n,signal:l.signal}),o=await r.json();if(!r.ok){let e=this.extractApiError(o);throw new i({message:e.message,status:r.status,code:e.code,details:e.details})}if(!this.isApiResponse(o)||!o.ok)throw new i({message:`Unexpected NextClaw upload response shape.`,status:r.status});return o.data}catch(e){throw e instanceof i?e:e instanceof Error&&e.name===`AbortError`?new i({message:`NextClaw API upload timed out after ${u}ms.`}):new i({message:e instanceof Error?e.message:`NextClaw API upload failed.`})}finally{o?.removeEventListener(`abort`,d),clearTimeout(f)}};isApiResponse=e=>typeof e==`object`&&!!e&&`ok`in e;extractApiError=e=>{if(this.isApiResponse(e)&&!e.ok)return e.error;if(typeof e==`object`&&e&&`message`in e){let t=e;return{code:typeof t.code==`string`?t.code:`HTTP_ERROR`,message:typeof t.message==`string`?t.message:`NextClaw API request failed.`,details:t.details!==null&&typeof t.details==`object`?t.details:void 0}}return{code:`HTTP_ERROR`,message:`NextClaw API request failed.`}};normalizeRequestBody=(e,t)=>{if(e!==void 0)return e instanceof FormData||e instanceof URLSearchParams||e instanceof Blob||e instanceof ArrayBuffer?e:typeof e==`string`?(!(`Content-Type`in t)&&!(`content-type`in t)&&(t[`Content-Type`]=`application/json`),e):(!(`Content-Type`in t)&&!(`content-type`in t)&&(t[`Content-Type`]=`application/json`),JSON.stringify(e))};serializeQuery=e=>{if(!e)return;if(e instanceof URLSearchParams)return e;let t=new URLSearchParams;for(let[n,r]of Object.entries(e)){let e=Array.isArray(r)?r:[r];for(let r of e)r!=null&&t.append(n,String(r))}return t}};function c(e){return e?{Authorization:`Bearer ${e}`}:null}var l=class{constructor(e,t){this.requestService=e,this.baseUrl=t}list=async()=>(await this.requestService.get(`/api/agents`)).agents;create=async e=>await this.requestService.post(`/api/agents`,e);update=async(e,t)=>await this.requestService.put(`/api/agents/${encodeURIComponent(e)}`,t);delete=async e=>await this.requestService.delete(`/api/agents/${encodeURIComponent(e)}`);resolveAvatarUrl=e=>t(this.baseUrl,`/api/agents/${encodeURIComponent(e)}/avatar`)},u=class{constructor(e){this.requestService=e}fetchMeta=async()=>await this.requestService.get(`/api/app/meta`);fetchBootstrapStatus=async(e={})=>await this.requestService.get(`/api/runtime/bootstrap-status`,e)},d=class{constructor(e){this.requestService=e}fetchStatus=async(e={})=>await this.requestService.get(`/api/auth/status`,{...e.timeoutMs===void 0?{}:{timeoutMs:e.timeoutMs}});setup=async e=>await this.requestService.post(`/api/auth/setup`,e);login=async e=>await this.requestService.post(`/api/auth/login`,e);logout=async()=>await this.requestService.post(`/api/auth/logout`,{});updatePassword=async e=>await this.requestService.put(`/api/auth/password`,e);updateEnabled=async e=>await this.requestService.put(`/api/auth/enabled`,e)},f=class{constructor(e){this.requestService=e}start=async(e,t={})=>await this.requestService.post(`/api/config/channels/${encodeURIComponent(e)}/auth/start`,t);poll=async(e,t)=>await this.requestService.post(`/api/config/channels/${encodeURIComponent(e)}/auth/poll`,t);connect=async(e,t)=>await this.requestService.post(`/api/config/channels/${encodeURIComponent(e)}/auth/connect`,t)},p=class{constructor(e){this.requestService=e}fetch=async()=>await this.requestService.get(`/api/config`);fetchMeta=async()=>await this.requestService.get(`/api/config/meta`);fetchSchema=async()=>await this.requestService.get(`/api/config/schema`);updateModel=async e=>await this.requestService.put(`/api/config/model`,e);updateSearch=async e=>await this.requestService.put(`/api/config/search`,e);updateProvider=async(e,t)=>await this.requestService.put(`/api/config/providers/${e}`,t);createProvider=async(e={})=>await this.requestService.post(`/api/config/providers`,e);deleteProvider=async e=>await this.requestService.delete(`/api/config/providers/${e}`);testProviderConnection=async(e,t)=>await this.requestService.post(`/api/config/providers/${e}/test`,t);startProviderAuth=async(e,t={})=>await this.requestService.post(`/api/config/providers/${e}/auth/start`,t);pollProviderAuth=async(e,t)=>await this.requestService.post(`/api/config/providers/${e}/auth/poll`,t);importProviderAuthFromCli=async e=>await this.requestService.post(`/api/config/providers/${e}/auth/import-cli`,{});updateChannel=async(e,t)=>await this.requestService.put(`/api/config/channels/${encodeURIComponent(e)}`,t);updateRuntime=async e=>await this.requestService.put(`/api/config/runtime`,e);updateSecrets=async e=>await this.requestService.put(`/api/config/secrets`,e);executeAction=async(e,t={})=>await this.requestService.post(`/api/config/actions/${encodeURIComponent(e)}/execute`,t);fetchChatSessionTypes=async()=>await this.requestService.get(`/api/ncp/session-types`);fetchCronJobs=async(e={})=>await this.requestService.get(`/api/cron`,{query:e.all?{all:`1`}:void 0});deleteCronJob=async e=>await this.requestService.delete(`/api/cron/${encodeURIComponent(e)}`);setCronJobEnabled=async(e,t)=>await this.requestService.put(`/api/cron/${encodeURIComponent(e)}/enable`,t);runCronJob=async(e,t={})=>await this.requestService.post(`/api/cron/${encodeURIComponent(e)}/run`,t)},m=class{constructor(e){this.requestService=e}fetchItems=async e=>await this.requestService.get(`${h(e.type)}/items`,{query:g(e)});fetchItem=async(e,t)=>await this.requestService.get(`${h(t)}/items/${encodeURIComponent(e)}`);fetchSkillContent=async e=>await this.requestService.get(`/api/marketplace/skills/items/${encodeURIComponent(e)}/content`);fetchRecommendations=async(e,t={})=>await this.requestService.get(`${h(e)}/recommendations`,{query:{...t.scene?.trim()?{scene:t.scene.trim()}:{},...typeof t.limit==`number`&&Number.isFinite(t.limit)?{limit:Math.max(1,Math.trunc(t.limit))}:{}}});fetchSkillScenes=async()=>await this.requestService.get(`/api/marketplace/skills/scenes`);install=async e=>await this.requestService.post(`${h(_(e.type))}/install`,e);fetchInstalled=async e=>await this.requestService.get(`${h(e)}/installed`);manage=async e=>await this.requestService.post(`${h(_(e.type))}/manage`,e)};function h(e){return e===`skill`?`/api/marketplace/skills`:`/api/marketplace/mcp`}function g(e){let{page:t,pageSize:n,q:r,scene:i,sort:a,tag:o}=e,s={};return r?.trim()&&(s.q=r.trim()),o?.trim()&&(s.tag=o.trim()),i?.trim()&&(s.scene=i.trim()),a&&(s.sort=a),typeof t==`number`&&Number.isFinite(t)&&(s.page=Math.max(1,Math.trunc(t))),typeof n==`number`&&Number.isFinite(n)&&(s.pageSize=Math.max(1,Math.trunc(n))),Object.keys(s).length>0?s:void 0}function _(e){if(!e)throw Error(`Marketplace request type is required.`);return e}var v=class{constructor(e){this.requestService=e}fetchItems=async(e={})=>await this.requestService.get(`/api/marketplace/mcp/items`,{query:y(e)});fetchInstalled=async()=>await this.requestService.get(`/api/marketplace/mcp/installed`);fetchItem=async e=>await this.requestService.get(`/api/marketplace/mcp/items/${encodeURIComponent(e)}`);fetchContent=async e=>await this.requestService.get(`/api/marketplace/mcp/items/${encodeURIComponent(e)}/content`);fetchRecommendations=async(e={})=>await this.requestService.get(`/api/marketplace/mcp/recommendations`,{query:{...e.scene?.trim()?{scene:e.scene.trim()}:{},...typeof e.limit==`number`&&Number.isFinite(e.limit)?{limit:Math.max(1,Math.trunc(e.limit))}:{}}});install=async e=>await this.requestService.post(`/api/marketplace/mcp/install`,e);manage=async e=>await this.requestService.post(`/api/marketplace/mcp/manage`,e);doctor=async e=>await this.requestService.post(`/api/marketplace/mcp/doctor`,{name:e})};function y(e){let{page:t,pageSize:n,q:r,sort:i,tag:a}=e,o={};return r?.trim()&&(o.q=r.trim()),a?.trim()&&(o.tag=a.trim()),i&&(o.sort=i),typeof t==`number`&&Number.isFinite(t)&&(o.page=Math.max(1,Math.trunc(t))),typeof n==`number`&&Number.isFinite(n)&&(o.pageSize=Math.max(1,Math.trunc(n))),Object.keys(o).length>0?o:void 0}var b=class{constructor(e){this.requestService=e}listPanelApps=async()=>await this.requestService.get(`/api/panel-apps`);updatePanelAppPreferences=async(e,t)=>await this.requestService.request(`/api/panel-apps/${encodeURIComponent(e)}/preferences`,{method:`PATCH`,body:t});recordPanelAppOpened=async e=>await this.requestService.post(`/api/panel-apps/${encodeURIComponent(e)}/open`);createBridgeSession=async e=>await this.requestService.post(`/api/panel-app-bridge-sessions`,e);deleteBridgeSession=async e=>await this.requestService.delete(`/api/panel-app-bridge-sessions/${encodeURIComponent(e)}`)},x=class{baseUrl;transport;webSocketFactory;constructor(e){this.options=e,this.baseUrl=e.baseUrl,this.transport=e.transport,this.webSocketFactory=e.webSocketFactory}subscribe=(e,t={})=>{if(this.transport?.subscribe){let t=this.transport.subscribe(e);return{close:()=>{t()}}}let n=null,i=null,a=!1,o=Math.max(200,t.reconnectDelayMs??1e3),s=()=>{i!==null&&(clearTimeout(i),i=null)},c=t=>{e(t)},l=()=>{try{n=this.createSocket(r(this.baseUrl,`/ws`))}catch(e){t.onError?.(e),a||(i=setTimeout(l,o));return}n.onopen=()=>{c({type:`connection.open`})},n.onmessage=e=>{let t=this.parseEvent(e.data);t&&c(t)},n.onerror=e=>{t.onError?.(e),c({type:`connection.error`,payload:{message:`WebSocket error`}})},n.onclose=()=>{c({type:`connection.close`}),n=null,a||(s(),i=setTimeout(l,o))}};return l(),{close:()=>{a=!0,s(),n?.close(),n=null}}};createSocket=e=>{if(this.webSocketFactory)return this.webSocketFactory(e);if(typeof globalThis.WebSocket!=`function`)throw Error(`WebSocket is unavailable. Provide webSocketFactory when creating the client.`);return new globalThis.WebSocket(e)};parseEvent=e=>{if(typeof e!=`string`)return null;try{let t=JSON.parse(e);return t&&typeof t==`object`&&`type`in t?t:null}catch{return null}}},S=class{constructor(e){this.requestService=e}fetchStatus=async()=>await this.requestService.get(`/api/remote/status`);fetchDoctor=async()=>await this.requestService.get(`/api/remote/doctor`);login=async e=>await this.requestService.post(`/api/remote/login`,e);startBrowserAuth=async(e={})=>await this.requestService.post(`/api/remote/auth/start`,e);pollBrowserAuth=async e=>await this.requestService.post(`/api/remote/auth/poll`,e);logout=async()=>await this.requestService.post(`/api/remote/logout`,{});updateAccountProfile=async e=>await this.requestService.put(`/api/remote/account/profile`,e);updateSettings=async e=>await this.requestService.put(`/api/remote/settings`,e);controlService=async e=>await this.requestService.post(`/api/remote/service/${e}`,{})},C=class{constructor(e){this.requestService=e}fetch=async()=>await this.requestService.get(`/api/runtime/control`);startService=async()=>await this.requestService.post(`/api/runtime/control/start-service`,{});restartService=async()=>await this.requestService.post(`/api/runtime/control/restart-service`,{});stopService=async()=>await this.requestService.post(`/api/runtime/control/stop-service`,{})},w=class{constructor(e){this.requestService=e}fetch=async()=>await this.requestService.get(`/api/runtime/update`);check=async()=>await this.requestService.post(`/api/runtime/update/check`,{});download=async()=>await this.requestService.post(`/api/runtime/update/download`,{});apply=async()=>await this.requestService.post(`/api/runtime/update/apply`,{});updatePreferences=async e=>await this.requestService.put(`/api/runtime/update/preferences`,e);updateChannel=async e=>await this.requestService.put(`/api/runtime/update/channel`,{channel:e})},T=class{constructor(e){this.requestService=e}browse=async e=>{let t=typeof e?.path==`string`?e.path.trim():``;return await this.requestService.get(`/api/server-paths/browse`,{query:{...t?{path:t}:{},...e?.includeFiles?{includeFiles:`1`}:{}}})};read=async e=>{let t=e.path.trim(),n=typeof e.basePath==`string`?e.basePath.trim():``;return await this.requestService.get(`/api/server-paths/read`,{query:{path:t,...n?{basePath:n}:{}}})}},E=`x-nextclaw-panel-bridge-session`;function D(e){return e?{[E]:e}:void 0}var O=class{constructor(e){this.requestService=e}listServiceApps=async()=>await this.requestService.get(`/api/service-apps`);getServiceApp=async e=>await this.requestService.get(`/api/service-apps/${encodeURIComponent(e)}`);restartServiceApp=async e=>await this.requestService.post(`/api/service-apps/${encodeURIComponent(e)}/restart`);listServiceActions=async(e={})=>{let t=e.appId?`?${new URLSearchParams({appId:e.appId}).toString()}`:``;return await this.requestService.get(`/api/service-actions${t}`,{headers:D(e.bridgeSessionToken)})};discoverServiceAppActions=async e=>await this.requestService.post(`/api/service-apps/${encodeURIComponent(e)}/actions/discover`,{});invokeServiceAction=async(e,t,n={})=>await this.requestService.post(`/api/service-actions/${encodeURIComponent(e)}/invoke`,{input:t??{}},{headers:D(n.bridgeSessionToken)});grantServiceAction=async(e,t={})=>await this.requestService.post(`/api/service-actions/${encodeURIComponent(e)}/grant`,{},{headers:D(t.bridgeSessionToken)});listServiceActionGrants=async()=>await this.requestService.get(`/api/service-action-grants`);revokeServiceAction=async(e,t={})=>await this.requestService.delete(`/api/service-actions/${encodeURIComponent(e)}/grant`,{headers:D(t.bridgeSessionToken)});revokeServiceActionGrant=async e=>{let t=new URLSearchParams({surface:e.caller.surface,appId:e.caller.appId});return await this.requestService.delete(`/api/service-action-grants/${encodeURIComponent(e.actionId)}?${t.toString()}`)}},k=class{constructor(e,t){this.requestService=e,this.eventBus=t}list=async e=>{let t=new URLSearchParams;return typeof e?.limit==`number`&&Number.isFinite(e.limit)&&t.set(`limit`,String(Math.max(1,Math.trunc(e.limit)))),await this.requestService.get(`/api/ncp/sessions`,{...t.size>0?{query:t}:{}})};get=async e=>await this.requestService.get(`/api/ncp/sessions/${encodeURIComponent(e)}`);listMessages=async(e,t=200)=>await this.requestService.get(`/api/ncp/sessions/${encodeURIComponent(e)}/messages`,{query:{limit:Math.max(1,Math.trunc(t))}});listSkills=async(e,t)=>await this.requestService.get(`/api/ncp/sessions/${encodeURIComponent(e)}/skills`,{query:t?.projectRoot?.trim()?{projectRoot:t.projectRoot.trim()}:void 0});update=async(e,t)=>await this.requestService.put(`/api/ncp/sessions/${encodeURIComponent(e)}`,t);delete=async e=>await this.requestService.delete(`/api/ncp/sessions/${encodeURIComponent(e)}`);uploadAssets=async e=>{let t=new FormData;for(let n of e)t.append(`files`,n);return await this.requestService.upload(`/api/ncp/assets`,t)};subscribe=(e,t={})=>({close:this.eventBus.subscribeAll(t=>{e(t)})})};function A(e){let t=e.trim();if(!t)throw Error(`typed key id is required`);return{id:t}}function j(e){return typeof e==`string`?e.trim():e.id}var M=class{listeners=new Map;globalListeners=new Set;listenerCount=0;onFirstSubscriber;onListenerError;onNoSubscribers;constructor(e={}){this.onFirstSubscriber=e.onFirstSubscriber,this.onListenerError=e.onListenerError,this.onNoSubscribers=e.onNoSubscribers}emit=(e,t,n={})=>{let r={type:j(e),payload:t,...n.emittedAt?{emittedAt:n.emittedAt}:{},...n.source?{source:n.source}:{}};this.emitEnvelope(r)};emitEnvelope=e=>{let t=this.listeners.get(e.type);if(t)for(let n of t)this.safeInvokeListener(e,n);if(this.globalListeners.size!==0)for(let t of this.globalListeners)this.safeInvokeGlobalListener(e,t)};on=(e,t)=>{let n=j(e),r=this.listeners.get(n)??new Set,i=t,a=!r.has(i);return r.add(i),this.listeners.set(n,r),a&&this.registerSubscriber(),()=>{this.off(e,t)}};off=(e,t)=>{let n=j(e),r=this.listeners.get(n);if(!r)return;let i=r.delete(t);r.size===0&&this.listeners.delete(n),i&&this.unregisterSubscriber()};once=(e,t)=>{let n=this.on(e,(e,r)=>{n(),t(e,r)});return n};subscribeAll=e=>{let t=!this.globalListeners.has(e);return this.globalListeners.add(e),t&&this.registerSubscriber(),()=>{this.globalListeners.delete(e)&&this.unregisterSubscriber()}};registerSubscriber=()=>{this.listenerCount+=1,this.listenerCount===1&&this.onFirstSubscriber?.()};unregisterSubscriber=()=>{this.listenerCount=Math.max(0,this.listenerCount-1),this.listenerCount===0&&this.onNoSubscribers?.()};safeInvokeListener=(e,t)=>{try{t(e.payload,e)}catch(t){this.onListenerError?.({type:e.type,payload:e.payload,error:t})}};safeInvokeGlobalListener=(e,t)=>{try{t(e)}catch(t){this.onListenerError?.({type:e.type,payload:e.payload,error:t})}}};function N(e){return A(e)}var P={configUpdated:N(`config.updated`),channelConfigApplyStatus:N(`channel.config.apply-status`),sessionUpdated:N(`session.updated`),sessionRunStatus:N(`session.run-status`),sessionMetadataChanged:N(`session.metadata.changed`),ncpEvent:N(`ncp.event`),sessionSummaryUpsert:N(`session.summary.upsert`),sessionSummaryDelete:N(`session.summary.delete`),configReloadStarted:N(`config.reload.started`),configReloadFinished:N(`config.reload.finished`),error:N(`error`),connectionOpen:N(`connection.open`),connectionClose:N(`connection.close`),connectionError:N(`connection.error`),runtimeUpdateSnapshot:N(`runtime.update.snapshot`)};A(`extension.channel.config.get`),A(`extension.channel.message.submit`),A(`extension.channel.command.list`),A(`extension.channel.command.execute`),A(`extension.response`),A(`agent-run.send`),A(`agent-run.abort`),A(`agent-run.session-message.request`);var F=class{baseUrl;app;agents;auth;channelAuth;config;eventBus;marketplace;mcpMarketplace;panelApps;realtime;remote;runtimeControl;runtimeUpdate;serverPaths;serviceApps;sessions;constructor(t){this.baseUrl=e(t.baseUrl);let n={...t,baseUrl:this.baseUrl},r=new s(n);this.realtime=new x(n);let i=null;this.eventBus=new M({onFirstSubscriber:()=>{i??=this.realtime.subscribe(e=>{this.eventBus.emitEnvelope({type:e.type,payload:`payload`in e?e.payload:void 0,emittedAt:`emittedAt`in e?e.emittedAt:new Date().toISOString(),source:`source`in e?e.source:`realtime`})})},onNoSubscribers:()=>{i?.close(),i=null}}),this.app=new u(r),this.agents=new l(r,this.baseUrl),this.auth=new d(r),this.channelAuth=new f(r),this.config=new p(r),this.marketplace=new m(r),this.mcpMarketplace=new v(r),this.panelApps=new b(r),this.remote=new S(r),this.runtimeControl=new C(r),this.runtimeUpdate=new w(r),this.serverPaths=new T(r),this.serviceApps=new O(r),this.sessions=new k(r,this.eventBus)}};export{F as NextClawClient,i as NextClawClientError,P as eventKeys};
1
+ function e(e){let t=e.trim().replace(/\/+$/,``);if(!t)throw Error(`NextClaw client baseUrl is required.`);return t}function t(t,n){return`${e(t)}${n.startsWith(`/`)?n:`/${n}`}`}function n(e,t){if(!t)return e;let n=typeof t==`string`?t:t.toString();return n?`${e}${e.includes(`?`)?`&`:`?`}${n}`:e}function r(e,n){let r=new URL(t(e,n));return r.protocol===`https:`?r.protocol=`wss:`:r.protocol===`http:`&&(r.protocol=`ws:`),r.toString()}var i=class extends Error{status;code;details;constructor(e){let{code:t,details:n,message:r,status:i}=e;super(r),this.name=`NextClawClientError`,this.status=i,this.code=t,this.details=n}};function a(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function o(e,t){return a(e)?e[t]:void 0}var s=class{baseUrl;fetchImpl;requestTimeoutMs;defaultHeaders;transport;constructor(e){this.options=e;let{baseUrl:t,fetchImpl:n,headers:r,requestTimeoutMs:i,token:a}=e;this.baseUrl=t,this.fetchImpl=n??fetch,this.requestTimeoutMs=Math.max(1e3,i??15e3),this.transport=e.transport,this.defaultHeaders={Accept:`application/json`,...r??{},...a?{Authorization:`Bearer ${a}`}:{}}}request=async(e,r={})=>{let{body:a,headers:o,method:s,query:c,signal:l,timeoutMs:u}=r;if(this.transport)return await this.requestWithTransport(e,r);let d=new AbortController,f=Math.max(1e3,u??this.requestTimeoutMs),p=this.bindAbortSignal(d,l),m=setTimeout(()=>d.abort(),f),h={...this.defaultHeaders,...o??{}},g=this.normalizeRequestBody(a,h);try{let r=await this.fetchImpl(t(this.baseUrl,n(e,this.serializeQuery(c))),{method:s??`GET`,headers:h,body:g,signal:d.signal}),a=await r.json();if(!r.ok){let e=this.extractApiError(a);throw new i({message:e.message,status:r.status,code:e.code,details:e.details})}if(!this.isApiResponse(a))throw new i({message:`Unexpected NextClaw API response shape.`,status:r.status});if(!a.ok)throw new i({message:a.error.message,status:r.status,code:a.error.code,details:a.error.details});return a.data}catch(e){throw e instanceof i?e:e instanceof Error&&e.name===`AbortError`?new i({message:`NextClaw API request timed out after ${f}ms.`}):new i({message:e instanceof Error?e.message:`NextClaw API request failed.`})}finally{l?.removeEventListener(`abort`,p),clearTimeout(m)}};bindAbortSignal=(e,t)=>{let n=()=>e.abort(t?.reason);return t?t.aborted?(e.abort(t.reason),n):(t.addEventListener(`abort`,n,{once:!0}),n):n};requestWithTransport=async(e,t)=>{let{body:n,headers:r,method:s,query:c,signal:l,timeoutMs:u}=t,{transport:d}=this;if(!d)throw new i({message:`NextClaw transport is not configured.`});try{return await d.request({method:s??`GET`,path:e,...n===void 0?{}:{body:n},...c?{query:c}:{},...r?{headers:r}:{},...l?{signal:l}:{},...u===void 0?{}:{timeoutMs:u}})}catch(e){if(e instanceof i)throw e;let t=o(e,`code`),n=o(e,`details`),r=o(e,`status`);throw new i({message:e instanceof Error?e.message:`NextClaw API request failed.`,code:typeof t==`string`?t:void 0,details:a(n)?n:void 0,status:typeof r==`number`?r:void 0})}};get=async(e,t={})=>await this.request(e,{...t,method:`GET`});post=async(e,t,n={})=>await this.request(e,{...n,method:`POST`,...t===void 0?{}:{body:t}});put=async(e,t,n={})=>await this.request(e,{...n,method:`PUT`,...t===void 0?{}:{body:t}});delete=async(e,t={})=>await this.request(e,{...t,method:`DELETE`});upload=async(e,n,r={})=>{let{headers:a,signal:o,timeoutMs:s}=r;if(this.transport?.upload)return await this.transport.upload({path:e,formData:n,...a?{headers:a}:{},...o?{signal:o}:{},...s===void 0?{}:{timeoutMs:s}});let l=new AbortController,u=Math.max(1e3,s??this.requestTimeoutMs),d=()=>l.abort(o?.reason);o&&(o.aborted?l.abort(o.reason):o.addEventListener(`abort`,d,{once:!0}));let f=setTimeout(()=>l.abort(),u);try{let r=await this.fetchImpl(t(this.baseUrl,e),{method:`POST`,headers:{Accept:`application/json`,...c(this.options.token)??{},...this.options.headers??{},...a??{}},body:n,signal:l.signal}),o=await r.json();if(!r.ok){let e=this.extractApiError(o);throw new i({message:e.message,status:r.status,code:e.code,details:e.details})}if(!this.isApiResponse(o)||!o.ok)throw new i({message:`Unexpected NextClaw upload response shape.`,status:r.status});return o.data}catch(e){throw e instanceof i?e:e instanceof Error&&e.name===`AbortError`?new i({message:`NextClaw API upload timed out after ${u}ms.`}):new i({message:e instanceof Error?e.message:`NextClaw API upload failed.`})}finally{o?.removeEventListener(`abort`,d),clearTimeout(f)}};isApiResponse=e=>typeof e==`object`&&!!e&&`ok`in e;extractApiError=e=>{if(this.isApiResponse(e)&&!e.ok)return e.error;if(typeof e==`object`&&e&&`message`in e){let t=e;return{code:typeof t.code==`string`?t.code:`HTTP_ERROR`,message:typeof t.message==`string`?t.message:`NextClaw API request failed.`,details:t.details!==null&&typeof t.details==`object`?t.details:void 0}}return{code:`HTTP_ERROR`,message:`NextClaw API request failed.`}};normalizeRequestBody=(e,t)=>{if(e!==void 0)return e instanceof FormData||e instanceof URLSearchParams||e instanceof Blob||e instanceof ArrayBuffer?e:typeof e==`string`?(!(`Content-Type`in t)&&!(`content-type`in t)&&(t[`Content-Type`]=`application/json`),e):(!(`Content-Type`in t)&&!(`content-type`in t)&&(t[`Content-Type`]=`application/json`),JSON.stringify(e))};serializeQuery=e=>{if(!e)return;if(e instanceof URLSearchParams)return e;let t=new URLSearchParams;for(let[n,r]of Object.entries(e)){let e=Array.isArray(r)?r:[r];for(let r of e)r!=null&&t.append(n,String(r))}return t}};function c(e){return e?{Authorization:`Bearer ${e}`}:null}var l=class{constructor(e,t){this.requestService=e,this.baseUrl=t}list=async()=>(await this.requestService.get(`/api/agents`)).agents;create=async e=>await this.requestService.post(`/api/agents`,e);update=async(e,t)=>await this.requestService.put(`/api/agents/${encodeURIComponent(e)}`,t);delete=async e=>await this.requestService.delete(`/api/agents/${encodeURIComponent(e)}`);resolveAvatarUrl=e=>t(this.baseUrl,`/api/agents/${encodeURIComponent(e)}/avatar`)},u=class{constructor(e){this.requestService=e}fetchMeta=async()=>await this.requestService.get(`/api/app/meta`);fetchBootstrapStatus=async(e={})=>await this.requestService.get(`/api/runtime/bootstrap-status`,e)},d=class{constructor(e){this.requestService=e}fetchStatus=async(e={})=>await this.requestService.get(`/api/auth/status`,{...e.timeoutMs===void 0?{}:{timeoutMs:e.timeoutMs}});setup=async e=>await this.requestService.post(`/api/auth/setup`,e);login=async e=>await this.requestService.post(`/api/auth/login`,e);logout=async()=>await this.requestService.post(`/api/auth/logout`,{});updatePassword=async e=>await this.requestService.put(`/api/auth/password`,e);updateEnabled=async e=>await this.requestService.put(`/api/auth/enabled`,e)},f=class{constructor(e){this.requestService=e}start=async(e,t={})=>await this.requestService.post(`/api/config/channels/${encodeURIComponent(e)}/auth/start`,t);poll=async(e,t)=>await this.requestService.post(`/api/config/channels/${encodeURIComponent(e)}/auth/poll`,t);connect=async(e,t)=>await this.requestService.post(`/api/config/channels/${encodeURIComponent(e)}/auth/connect`,t)},p=class{constructor(e){this.requestService=e}fetch=async()=>await this.requestService.get(`/api/config`);fetchMeta=async()=>await this.requestService.get(`/api/config/meta`);fetchSchema=async()=>await this.requestService.get(`/api/config/schema`);updateModel=async e=>await this.requestService.put(`/api/config/model`,e);updateSearch=async e=>await this.requestService.put(`/api/config/search`,e);updateProvider=async(e,t)=>await this.requestService.put(`/api/config/providers/${e}`,t);createProvider=async(e={})=>await this.requestService.post(`/api/config/providers`,e);deleteProvider=async e=>await this.requestService.delete(`/api/config/providers/${e}`);testProviderConnection=async(e,t)=>await this.requestService.post(`/api/config/providers/${e}/test`,t);startProviderAuth=async(e,t={})=>await this.requestService.post(`/api/config/providers/${e}/auth/start`,t);pollProviderAuth=async(e,t)=>await this.requestService.post(`/api/config/providers/${e}/auth/poll`,t);importProviderAuthFromCli=async e=>await this.requestService.post(`/api/config/providers/${e}/auth/import-cli`,{});updateChannel=async(e,t)=>await this.requestService.put(`/api/config/channels/${encodeURIComponent(e)}`,t);updateRuntime=async e=>await this.requestService.put(`/api/config/runtime`,e);updateSecrets=async e=>await this.requestService.put(`/api/config/secrets`,e);executeAction=async(e,t={})=>await this.requestService.post(`/api/config/actions/${encodeURIComponent(e)}/execute`,t);fetchChatSessionTypes=async()=>await this.requestService.get(`/api/ncp/session-types`);fetchCronJobs=async(e={})=>await this.requestService.get(`/api/cron`,{query:e.all?{all:`1`}:void 0});deleteCronJob=async e=>await this.requestService.delete(`/api/cron/${encodeURIComponent(e)}`);setCronJobEnabled=async(e,t)=>await this.requestService.put(`/api/cron/${encodeURIComponent(e)}/enable`,t);runCronJob=async(e,t={})=>await this.requestService.post(`/api/cron/${encodeURIComponent(e)}/run`,t)},m=class{constructor(e){this.requestService=e}fetchItems=async e=>await this.requestService.get(`${h(e.type)}/items`,{query:g(e)});fetchItem=async(e,t)=>await this.requestService.get(`${h(t)}/items/${encodeURIComponent(e)}`);fetchSkillContent=async e=>await this.requestService.get(`/api/marketplace/skills/items/${encodeURIComponent(e)}/content`);fetchRecommendations=async(e,t={})=>await this.requestService.get(`${h(e)}/recommendations`,{query:{...t.scene?.trim()?{scene:t.scene.trim()}:{},...typeof t.limit==`number`&&Number.isFinite(t.limit)?{limit:Math.max(1,Math.trunc(t.limit))}:{}}});fetchSkillScenes=async()=>await this.requestService.get(`/api/marketplace/skills/scenes`);install=async e=>await this.requestService.post(`${h(_(e.type))}/install`,e);fetchInstalled=async e=>await this.requestService.get(`${h(e)}/installed`);manage=async e=>await this.requestService.post(`${h(_(e.type))}/manage`,e)};function h(e){return e===`skill`?`/api/marketplace/skills`:`/api/marketplace/mcp`}function g(e){let{page:t,pageSize:n,q:r,scene:i,sort:a,tag:o}=e,s={};return r?.trim()&&(s.q=r.trim()),o?.trim()&&(s.tag=o.trim()),i?.trim()&&(s.scene=i.trim()),a&&(s.sort=a),typeof t==`number`&&Number.isFinite(t)&&(s.page=Math.max(1,Math.trunc(t))),typeof n==`number`&&Number.isFinite(n)&&(s.pageSize=Math.max(1,Math.trunc(n))),Object.keys(s).length>0?s:void 0}function _(e){if(!e)throw Error(`Marketplace request type is required.`);return e}var v=class{constructor(e){this.requestService=e}fetchItems=async(e={})=>await this.requestService.get(`/api/marketplace/mcp/items`,{query:y(e)});fetchInstalled=async()=>await this.requestService.get(`/api/marketplace/mcp/installed`);fetchItem=async e=>await this.requestService.get(`/api/marketplace/mcp/items/${encodeURIComponent(e)}`);fetchContent=async e=>await this.requestService.get(`/api/marketplace/mcp/items/${encodeURIComponent(e)}/content`);fetchRecommendations=async(e={})=>await this.requestService.get(`/api/marketplace/mcp/recommendations`,{query:{...e.scene?.trim()?{scene:e.scene.trim()}:{},...typeof e.limit==`number`&&Number.isFinite(e.limit)?{limit:Math.max(1,Math.trunc(e.limit))}:{}}});install=async e=>await this.requestService.post(`/api/marketplace/mcp/install`,e);manage=async e=>await this.requestService.post(`/api/marketplace/mcp/manage`,e);doctor=async e=>await this.requestService.post(`/api/marketplace/mcp/doctor`,{name:e})};function y(e){let{page:t,pageSize:n,q:r,sort:i,tag:a}=e,o={};return r?.trim()&&(o.q=r.trim()),a?.trim()&&(o.tag=a.trim()),i&&(o.sort=i),typeof t==`number`&&Number.isFinite(t)&&(o.page=Math.max(1,Math.trunc(t))),typeof n==`number`&&Number.isFinite(n)&&(o.pageSize=Math.max(1,Math.trunc(n))),Object.keys(o).length>0?o:void 0}var b=`x-nextclaw-panel-bridge-session`;function x(e){return e?{[b]:e}:void 0}var S=class{constructor(e){this.requestService=e}listPanelApps=async()=>await this.requestService.get(`/api/panel-apps`);updatePanelAppPreferences=async(e,t)=>await this.requestService.request(`/api/panel-apps/${encodeURIComponent(e)}/preferences`,{method:`PATCH`,body:t});recordPanelAppOpened=async e=>await this.requestService.post(`/api/panel-apps/${encodeURIComponent(e)}/open`);deletePanelApp=async e=>await this.requestService.delete(`/api/panel-apps/${encodeURIComponent(e)}`);createBridgeSession=async e=>await this.requestService.post(`/api/panel-app-bridge-sessions`,e);deleteBridgeSession=async e=>await this.requestService.delete(`/api/panel-app-bridge-sessions/${encodeURIComponent(e)}`);sendAgentMessage=async(e,t={})=>await this.requestService.post(`/api/panel-app-agent/send`,e,{headers:x(t.bridgeSessionToken)});generateAgentObject=async(e,t={})=>await this.requestService.post(`/api/panel-app-agent/generate-object`,e,{headers:x(t.bridgeSessionToken)});grantAgentCapability=async(e,t={})=>await this.requestService.post(`/api/panel-app-agent-capabilities/${encodeURIComponent(e)}/grant`,{},{headers:x(t.bridgeSessionToken)})},C=class{baseUrl;transport;webSocketFactory;constructor(e){this.options=e,this.baseUrl=e.baseUrl,this.transport=e.transport,this.webSocketFactory=e.webSocketFactory}subscribe=(e,t={})=>{if(this.transport?.subscribe){let t=this.transport.subscribe(e);return{close:()=>{t()}}}let n=null,i=null,a=!1,o=Math.max(200,t.reconnectDelayMs??1e3),s=()=>{i!==null&&(clearTimeout(i),i=null)},c=t=>{e(t)},l=()=>{try{n=this.createSocket(r(this.baseUrl,`/ws`))}catch(e){t.onError?.(e),a||(i=setTimeout(l,o));return}n.onopen=()=>{c({type:`connection.open`})},n.onmessage=e=>{let t=this.parseEvent(e.data);t&&c(t)},n.onerror=e=>{t.onError?.(e),c({type:`connection.error`,payload:{message:`WebSocket error`}})},n.onclose=()=>{c({type:`connection.close`}),n=null,a||(s(),i=setTimeout(l,o))}};return l(),{close:()=>{a=!0,s(),n?.close(),n=null}}};createSocket=e=>{if(this.webSocketFactory)return this.webSocketFactory(e);if(typeof globalThis.WebSocket!=`function`)throw Error(`WebSocket is unavailable. Provide webSocketFactory when creating the client.`);return new globalThis.WebSocket(e)};parseEvent=e=>{if(typeof e!=`string`)return null;try{let t=JSON.parse(e);return t&&typeof t==`object`&&`type`in t?t:null}catch{return null}}},w=class{constructor(e){this.requestService=e}fetchStatus=async()=>await this.requestService.get(`/api/remote/status`);fetchDoctor=async()=>await this.requestService.get(`/api/remote/doctor`);login=async e=>await this.requestService.post(`/api/remote/login`,e);startBrowserAuth=async(e={})=>await this.requestService.post(`/api/remote/auth/start`,e);pollBrowserAuth=async e=>await this.requestService.post(`/api/remote/auth/poll`,e);logout=async()=>await this.requestService.post(`/api/remote/logout`,{});updateAccountProfile=async e=>await this.requestService.put(`/api/remote/account/profile`,e);updateSettings=async e=>await this.requestService.put(`/api/remote/settings`,e);controlService=async e=>await this.requestService.post(`/api/remote/service/${e}`,{})},T=class{constructor(e){this.requestService=e}fetch=async()=>await this.requestService.get(`/api/runtime/control`);startService=async()=>await this.requestService.post(`/api/runtime/control/start-service`,{});restartService=async()=>await this.requestService.post(`/api/runtime/control/restart-service`,{});stopService=async()=>await this.requestService.post(`/api/runtime/control/stop-service`,{})},E=class{constructor(e){this.requestService=e}fetch=async()=>await this.requestService.get(`/api/runtime/update`);check=async()=>await this.requestService.post(`/api/runtime/update/check`,{});download=async()=>await this.requestService.post(`/api/runtime/update/download`,{});apply=async()=>await this.requestService.post(`/api/runtime/update/apply`,{});updatePreferences=async e=>await this.requestService.put(`/api/runtime/update/preferences`,e);updateChannel=async e=>await this.requestService.put(`/api/runtime/update/channel`,{channel:e})},D=class{constructor(e){this.requestService=e}browse=async e=>{let t=typeof e?.path==`string`?e.path.trim():``;return await this.requestService.get(`/api/server-paths/browse`,{query:{...t?{path:t}:{},...e?.includeFiles?{includeFiles:`1`}:{}}})};read=async e=>{let t=e.path.trim(),n=typeof e.basePath==`string`?e.basePath.trim():``;return await this.requestService.get(`/api/server-paths/read`,{query:{path:t,...n?{basePath:n}:{}}})}},O=`x-nextclaw-panel-bridge-session`;function k(e){return e?{[O]:e}:void 0}var A=class{constructor(e){this.requestService=e}listServiceApps=async()=>await this.requestService.get(`/api/service-apps`);getServiceApp=async e=>await this.requestService.get(`/api/service-apps/${encodeURIComponent(e)}`);restartServiceApp=async e=>await this.requestService.post(`/api/service-apps/${encodeURIComponent(e)}/restart`);listServiceActions=async(e={})=>{let t=e.appId?`?${new URLSearchParams({appId:e.appId}).toString()}`:``;return await this.requestService.get(`/api/service-actions${t}`,{headers:k(e.bridgeSessionToken)})};discoverServiceAppActions=async e=>await this.requestService.post(`/api/service-apps/${encodeURIComponent(e)}/actions/discover`,{});invokeServiceAction=async(e,t,n={})=>await this.requestService.post(`/api/service-actions/${encodeURIComponent(e)}/invoke`,{input:t??{}},{headers:k(n.bridgeSessionToken)});grantServiceAction=async(e,t={})=>await this.requestService.post(`/api/service-actions/${encodeURIComponent(e)}/grant`,{},{headers:k(t.bridgeSessionToken)});listServiceActionGrants=async()=>await this.requestService.get(`/api/service-action-grants`);revokeServiceAction=async(e,t={})=>await this.requestService.delete(`/api/service-actions/${encodeURIComponent(e)}/grant`,{headers:k(t.bridgeSessionToken)});revokeServiceActionGrant=async e=>{let t=new URLSearchParams({surface:e.caller.surface,appId:e.caller.appId});return await this.requestService.delete(`/api/service-action-grants/${encodeURIComponent(e.actionId)}?${t.toString()}`)}},j=class{constructor(e,t){this.requestService=e,this.eventBus=t}list=async e=>{let t=new URLSearchParams;return typeof e?.limit==`number`&&Number.isFinite(e.limit)&&t.set(`limit`,String(Math.max(1,Math.trunc(e.limit)))),await this.requestService.get(`/api/ncp/sessions`,{...t.size>0?{query:t}:{}})};get=async e=>await this.requestService.get(`/api/ncp/sessions/${encodeURIComponent(e)}`);listMessages=async(e,t=200)=>await this.requestService.get(`/api/ncp/sessions/${encodeURIComponent(e)}/messages`,{query:{limit:Math.max(1,Math.trunc(t))}});listSkills=async(e,t)=>await this.requestService.get(`/api/ncp/sessions/${encodeURIComponent(e)}/skills`,{query:t?.projectRoot?.trim()?{projectRoot:t.projectRoot.trim()}:void 0});update=async(e,t)=>await this.requestService.put(`/api/ncp/sessions/${encodeURIComponent(e)}`,t);delete=async e=>await this.requestService.delete(`/api/ncp/sessions/${encodeURIComponent(e)}`);uploadAssets=async e=>{let t=new FormData;for(let n of e)t.append(`files`,n);return await this.requestService.upload(`/api/ncp/assets`,t)};subscribe=(e,t={})=>({close:this.eventBus.subscribeAll(t=>{e(t)})})};function M(e){let t=e.trim();if(!t)throw Error(`typed key id is required`);return{id:t}}function N(e){return typeof e==`string`?e.trim():e.id}var P=class{listeners=new Map;globalListeners=new Set;listenerCount=0;onFirstSubscriber;onListenerError;onNoSubscribers;constructor(e={}){this.onFirstSubscriber=e.onFirstSubscriber,this.onListenerError=e.onListenerError,this.onNoSubscribers=e.onNoSubscribers}emit=(e,t,n={})=>{let r={type:N(e),payload:t,...n.emittedAt?{emittedAt:n.emittedAt}:{},...n.source?{source:n.source}:{}};this.emitEnvelope(r)};emitEnvelope=e=>{let t=this.listeners.get(e.type);if(t)for(let n of t)this.safeInvokeListener(e,n);if(this.globalListeners.size!==0)for(let t of this.globalListeners)this.safeInvokeGlobalListener(e,t)};on=(e,t)=>{let n=N(e),r=this.listeners.get(n)??new Set,i=t,a=!r.has(i);return r.add(i),this.listeners.set(n,r),a&&this.registerSubscriber(),()=>{this.off(e,t)}};off=(e,t)=>{let n=N(e),r=this.listeners.get(n);if(!r)return;let i=r.delete(t);r.size===0&&this.listeners.delete(n),i&&this.unregisterSubscriber()};once=(e,t)=>{let n=this.on(e,(e,r)=>{n(),t(e,r)});return n};subscribeAll=e=>{let t=!this.globalListeners.has(e);return this.globalListeners.add(e),t&&this.registerSubscriber(),()=>{this.globalListeners.delete(e)&&this.unregisterSubscriber()}};registerSubscriber=()=>{this.listenerCount+=1,this.listenerCount===1&&this.onFirstSubscriber?.()};unregisterSubscriber=()=>{this.listenerCount=Math.max(0,this.listenerCount-1),this.listenerCount===0&&this.onNoSubscribers?.()};safeInvokeListener=(e,t)=>{try{t(e.payload,e)}catch(t){this.onListenerError?.({type:e.type,payload:e.payload,error:t})}};safeInvokeGlobalListener=(e,t)=>{try{t(e)}catch(t){this.onListenerError?.({type:e.type,payload:e.payload,error:t})}}};function F(e){return M(e)}var I={configUpdated:F(`config.updated`),channelConfigApplyStatus:F(`channel.config.apply-status`),sessionUpdated:F(`session.updated`),sessionRunStatus:F(`session.run-status`),sessionMetadataChanged:F(`session.metadata.changed`),ncpEvent:F(`ncp.event`),sessionSummaryUpsert:F(`session.summary.upsert`),sessionSummaryDelete:F(`session.summary.delete`),configReloadStarted:F(`config.reload.started`),configReloadFinished:F(`config.reload.finished`),error:F(`error`),connectionOpen:F(`connection.open`),connectionClose:F(`connection.close`),connectionError:F(`connection.error`),runtimeUpdateSnapshot:F(`runtime.update.snapshot`)};M(`extension.channel.config.get`),M(`extension.channel.message.submit`),M(`extension.channel.command.list`),M(`extension.channel.command.execute`),M(`extension.response`),M(`agent-run.send`),M(`agent-run.abort`),M(`agent-run.session-message.request`);var L=class{baseUrl;app;agents;auth;channelAuth;config;eventBus;marketplace;mcpMarketplace;panelApps;realtime;remote;runtimeControl;runtimeUpdate;serverPaths;serviceApps;sessions;constructor(t){this.baseUrl=e(t.baseUrl);let n={...t,baseUrl:this.baseUrl},r=new s(n);this.realtime=new C(n);let i=null;this.eventBus=new P({onFirstSubscriber:()=>{i??=this.realtime.subscribe(e=>{this.eventBus.emitEnvelope({type:e.type,payload:`payload`in e?e.payload:void 0,emittedAt:`emittedAt`in e?e.emittedAt:new Date().toISOString(),source:`source`in e?e.source:`realtime`})})},onNoSubscribers:()=>{i?.close(),i=null}}),this.app=new u(r),this.agents=new l(r,this.baseUrl),this.auth=new d(r),this.channelAuth=new f(r),this.config=new p(r),this.marketplace=new m(r),this.mcpMarketplace=new v(r),this.panelApps=new S(r),this.remote=new w(r),this.runtimeControl=new T(r),this.runtimeUpdate=new E(r),this.serverPaths=new D(r),this.serviceApps=new A(r),this.sessions=new j(r,this.eventBus)}};export{L as NextClawClient,i as NextClawClientError,I as eventKeys};
@@ -5,4 +5,4 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
5
5
  `+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{ge=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?he(e):``}function ve(e){switch(e.tag){case 5:return he(e.type);case 16:return he(`Lazy`);case 13:return he(`Suspense`);case 19:return he(`SuspenseList`);case 0:case 2:case 15:return e=_e(e.type,!1),e;case 11:return e=_e(e.type.render,!1),e;case 1:return e=_e(e.type,!0),e;default:return``}}function ye(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case ie:return`Fragment`;case re:return`Portal`;case oe:return`Profiler`;case ae:return`StrictMode`;case S:return`Suspense`;case ue:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case ce:return(e.displayName||`Context`)+`.Consumer`;case se:return(e._context.displayName||`Context`)+`.Provider`;case le:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case C:return t=e.displayName||null,t===null?ye(e.type)||`Memo`:t;case de:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}function be(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return ye(t);case 8:return t===ae?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function xe(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Se(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ce(e){var t=Se(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function we(e){e._valueTracker||=Ce(e)}function Te(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Se(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ee(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function De(e,t){var n=t.checked;return T({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Oe(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=xe(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function ke(e,t){t=t.checked,t!=null&&te(e,`checked`,t,!1)}function Ae(e,t){ke(e,t);var n=xe(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?Me(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&Me(e,t.type,xe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function je(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function Me(e,t,n){(t!==`number`||Ee(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var Ne=Array.isArray;function Pe(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+xe(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Fe(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return T({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function Ie(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(Ne(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:xe(n)}}function Le(e,t){var n=xe(t.value),r=xe(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function Re(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function ze(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function Be(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?ze(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Ve,He=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(Ve||=document.createElement(`div`),Ve.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Ve.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ue(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var We={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ge=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(We).forEach(function(e){Ge.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),We[t]=We[e]})});function Ke(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||We.hasOwnProperty(e)&&We[e]?(``+t).trim():t+`px`}function qe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Ke(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Je=T({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ye(e,t){if(t){if(Je[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function Xe(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Ze=null;function Qe(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $e=null,et=null,tt=null;function nt(e){if(e=ea(e)){if(typeof $e!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=na(t),$e(e.stateNode,e.type,t))}}function rt(e){et?tt?tt.push(e):tt=[e]:et=e}function it(){if(et){var e=et,t=tt;if(tt=et=null,nt(e),t)for(e=0;e<t.length;e++)nt(t[e])}}function at(e,t){return e(t)}function ot(){}var st=!1;function ct(e,t,n){if(st)return e(t,n);st=!0;try{return at(e,t,n)}finally{st=!1,(et!==null||tt!==null)&&(ot(),it())}}function lt(e,t){var n=e.stateNode;if(n===null)return null;var i=na(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var ut=!1;if(c)try{var dt={};Object.defineProperty(dt,`passive`,{get:function(){ut=!0}}),window.addEventListener(`test`,dt,dt),window.removeEventListener(`test`,dt,dt)}catch{ut=!1}function ft(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var pt=!1,mt=null,ht=!1,gt=null,_t={onError:function(e){pt=!0,mt=e}};function vt(e,t,n,r,i,a,o,s,c){pt=!1,mt=null,ft.apply(_t,arguments)}function yt(e,t,n,i,a,o,s,c,l){if(vt.apply(this,arguments),pt){if(pt){var u=mt;pt=!1,mt=null}else throw Error(r(198));ht||(ht=!0,gt=u)}}function bt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function xt(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function St(e){if(bt(e)!==e)throw Error(r(188))}function Ct(e){var t=e.alternate;if(!t){if(t=bt(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return St(a),e;if(o===i)return St(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function wt(e){return e=Ct(e),e===null?null:Tt(e)}function Tt(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Tt(e);if(t!==null)return t;e=e.sibling}return null}var Et=n.unstable_scheduleCallback,Dt=n.unstable_cancelCallback,Ot=n.unstable_shouldYield,kt=n.unstable_requestPaint,E=n.unstable_now,At=n.unstable_getCurrentPriorityLevel,jt=n.unstable_ImmediatePriority,Mt=n.unstable_UserBlockingPriority,Nt=n.unstable_NormalPriority,Pt=n.unstable_LowPriority,Ft=n.unstable_IdlePriority,It=null,Lt=null;function Rt(e){if(Lt&&typeof Lt.onCommitFiberRoot==`function`)try{Lt.onCommitFiberRoot(It,e,void 0,(e.current.flags&128)==128)}catch{}}var zt=Math.clz32?Math.clz32:Ht,Bt=Math.log,Vt=Math.LN2;function Ht(e){return e>>>=0,e===0?32:31-(Bt(e)/Vt|0)|0}var Ut=64,Wt=4194304;function Gt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Kt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=Gt(a))):r=Gt(s)}else o=n&~i,o===0?a!==0&&(r=Gt(a)):r=Gt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-zt(t),i=1<<n,r|=e[n],t&=~i;return r}function qt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Jt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-zt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=qt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Yt(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Xt(){var e=Ut;return Ut<<=1,!(Ut&4194240)&&(Ut=64),e}function Zt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-zt(t),e[t]=n}function $t(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-zt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function en(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-zt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var D=0;function tn(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var nn,rn,an,on,sn,cn=!1,ln=[],un=null,dn=null,fn=null,pn=new Map,mn=new Map,hn=[],gn=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit`.split(` `);function _n(e,t){switch(e){case`focusin`:case`focusout`:un=null;break;case`dragenter`:case`dragleave`:dn=null;break;case`mouseover`:case`mouseout`:fn=null;break;case`pointerover`:case`pointerout`:pn.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:mn.delete(t.pointerId)}}function vn(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ea(t),t!==null&&rn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function yn(e,t,n,r,i){switch(t){case`focusin`:return un=vn(un,e,t,n,r,i),!0;case`dragenter`:return dn=vn(dn,e,t,n,r,i),!0;case`mouseover`:return fn=vn(fn,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return pn.set(a,vn(pn.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,mn.set(a,vn(mn.get(a)||null,e,t,n,r,i)),!0}return!1}function bn(e){var t=$i(e.target);if(t!==null){var n=bt(t);if(n!==null){if(t=n.tag,t===13){if(t=xt(n),t!==null){e.blockedOn=t,sn(e.priority,function(){an(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Mn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ze=r,n.target.dispatchEvent(r),Ze=null}else return t=ea(n),t!==null&&rn(t),e.blockedOn=n,!1;t.shift()}return!0}function Sn(e,t,n){xn(e)&&n.delete(t)}function Cn(){cn=!1,un!==null&&xn(un)&&(un=null),dn!==null&&xn(dn)&&(dn=null),fn!==null&&xn(fn)&&(fn=null),pn.forEach(Sn),mn.forEach(Sn)}function wn(e,t){e.blockedOn===t&&(e.blockedOn=null,cn||(cn=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Cn)))}function Tn(e){function t(t){return wn(t,e)}if(0<ln.length){wn(ln[0],e);for(var n=1;n<ln.length;n++){var r=ln[n];r.blockedOn===e&&(r.blockedOn=null)}}for(un!==null&&wn(un,e),dn!==null&&wn(dn,e),fn!==null&&wn(fn,e),pn.forEach(t),mn.forEach(t),n=0;n<hn.length;n++)r=hn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<hn.length&&(n=hn[0],n.blockedOn===null);)bn(n),n.blockedOn===null&&hn.shift()}var En=x.ReactCurrentBatchConfig,Dn=!0;function On(e,t,n,r){var i=D,a=En.transition;En.transition=null;try{D=1,An(e,t,n,r)}finally{D=i,En.transition=a}}function kn(e,t,n,r){var i=D,a=En.transition;En.transition=null;try{D=4,An(e,t,n,r)}finally{D=i,En.transition=a}}function An(e,t,n,r){if(Dn){var i=Mn(e,t,n,r);if(i===null)Ti(e,t,r,jn,n),_n(e,r);else if(yn(i,e,t,n,r))r.stopPropagation();else if(_n(e,r),t&4&&-1<gn.indexOf(e)){for(;i!==null;){var a=ea(i);if(a!==null&&nn(a),a=Mn(e,t,n,r),a===null&&Ti(e,t,r,jn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ti(e,t,r,null,n)}}var jn=null;function Mn(e,t,n,r){if(jn=null,e=Qe(r),e=$i(e),e!==null)if(t=bt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=xt(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return jn=e,null}function Nn(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(At()){case jt:return 1;case Mt:return 4;case Nt:case Pt:return 16;case Ft:return 536870912;default:return 16}default:return 16}}var Pn=null,Fn=null,In=null;function Ln(){if(In)return In;var e,t=Fn,n=t.length,r,i=`value`in Pn?Pn.value:Pn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return In=i.slice(e,1<r?1-r:void 0)}function Rn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function zn(){return!0}function Bn(){return!1}function Vn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?zn:Bn,this.isPropagationStopped=Bn,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=zn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=zn)},persist:function(){},isPersistent:zn}),t}var Hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Un=Vn(Hn),Wn=T({},Hn,{view:0,detail:0}),Gn=Vn(Wn),Kn,qn,Jn,Yn=T({},Wn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:or,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Jn&&(Jn&&e.type===`mousemove`?(Kn=e.screenX-Jn.screenX,qn=e.screenY-Jn.screenY):qn=Kn=0,Jn=e),Kn)},movementY:function(e){return`movementY`in e?e.movementY:qn}}),Xn=Vn(Yn),Zn=Vn(T({},Yn,{dataTransfer:0})),Qn=Vn(T({},Wn,{relatedTarget:0})),$n=Vn(T({},Hn,{animationName:0,elapsedTime:0,pseudoElement:0})),er=Vn(T({},Hn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),tr=Vn(T({},Hn,{data:0})),nr={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},rr={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},ir={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function ar(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ir[e])?!!t[e]:!1}function or(){return ar}var sr=Vn(T({},Wn,{key:function(e){if(e.key){var t=nr[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Rn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?rr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:or,charCode:function(e){return e.type===`keypress`?Rn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Rn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),cr=Vn(T({},Yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),lr=Vn(T({},Wn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:or})),ur=Vn(T({},Hn,{propertyName:0,elapsedTime:0,pseudoElement:0})),dr=Vn(T({},Yn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),fr=[9,13,27,32],pr=c&&`CompositionEvent`in window,mr=null;c&&`documentMode`in document&&(mr=document.documentMode);var hr=c&&`TextEvent`in window&&!mr,gr=c&&(!pr||mr&&8<mr&&11>=mr),_r=` `,vr=!1;function yr(e,t){switch(e){case`keyup`:return fr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function br(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var xr=!1;function Sr(e,t){switch(e){case`compositionend`:return br(t);case`keypress`:return t.which===32?(vr=!0,_r):null;case`textInput`:return e=t.data,e===_r&&vr?null:e;default:return null}}function Cr(e,t){if(xr)return e===`compositionend`||!pr&&yr(e,t)?(e=Ln(),In=Fn=Pn=null,xr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return gr&&t.locale!==`ko`?null:t.data;default:return null}}var wr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!wr[e.type]:t===`textarea`}function Er(e,t,n,r){rt(r),t=Di(t,`onChange`),0<t.length&&(n=new Un(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Dr=null,Or=null;function kr(e){bi(e,0)}function Ar(e){if(Te(ta(e)))return e}function jr(e,t){if(e===`change`)return t}var Mr=!1;if(c){var Nr;if(c){var Pr=`oninput`in document;if(!Pr){var Fr=document.createElement(`div`);Fr.setAttribute(`oninput`,`return;`),Pr=typeof Fr.oninput==`function`}Nr=Pr}else Nr=!1;Mr=Nr&&(!document.documentMode||9<document.documentMode)}function Ir(){Dr&&(Dr.detachEvent(`onpropertychange`,Lr),Or=Dr=null)}function Lr(e){if(e.propertyName===`value`&&Ar(Or)){var t=[];Er(t,Or,e,Qe(e)),ct(kr,t)}}function Rr(e,t,n){e===`focusin`?(Ir(),Dr=t,Or=n,Dr.attachEvent(`onpropertychange`,Lr)):e===`focusout`&&Ir()}function zr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Ar(Or)}function Br(e,t){if(e===`click`)return Ar(t)}function Vr(e,t){if(e===`input`||e===`change`)return Ar(t)}function Hr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ur=typeof Object.is==`function`?Object.is:Hr;function Wr(e,t){if(Ur(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!Ur(e[i],t[i]))return!1}return!0}function Gr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kr(e,t){var n=Gr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Gr(n)}}function qr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jr(){for(var e=window,t=Ee();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ee(e.document)}return t}function Yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function Xr(e){var t=Jr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&qr(n.ownerDocument.documentElement,n)){if(r!==null&&Yr(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Kr(n,a);var o=Kr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Zr=c&&`documentMode`in document&&11>=document.documentMode,Qr=null,$r=null,ei=null,ti=!1;function ni(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ti||Qr==null||Qr!==Ee(r)||(r=Qr,`selectionStart`in r&&Yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ei&&Wr(ei,r)||(ei=r,r=Di($r,`onSelect`),0<r.length&&(t=new Un(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Qr)))}function ri(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ii={animationend:ri(`Animation`,`AnimationEnd`),animationiteration:ri(`Animation`,`AnimationIteration`),animationstart:ri(`Animation`,`AnimationStart`),transitionend:ri(`Transition`,`TransitionEnd`)},ai={},oi={};c&&(oi=document.createElement(`div`).style,`AnimationEvent`in window||(delete ii.animationend.animation,delete ii.animationiteration.animation,delete ii.animationstart.animation),`TransitionEvent`in window||delete ii.transitionend.transition);function si(e){if(ai[e])return ai[e];if(!ii[e])return e;var t=ii[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in oi)return ai[e]=t[n];return e}var ci=si(`animationend`),li=si(`animationiteration`),ui=si(`animationstart`),di=si(`transitionend`),fi=new Map,pi=`abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);function mi(e,t){fi.set(e,t),o(t,[e])}for(var hi=0;hi<pi.length;hi++){var gi=pi[hi];mi(gi.toLowerCase(),`on`+(gi[0].toUpperCase()+gi.slice(1)))}mi(ci,`onAnimationEnd`),mi(li,`onAnimationIteration`),mi(ui,`onAnimationStart`),mi(`dblclick`,`onDoubleClick`),mi(`focusin`,`onFocus`),mi(`focusout`,`onBlur`),mi(di,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _i=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),vi=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(_i));function yi(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,yt(r,t,void 0,e),e.currentTarget=null}function bi(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;yi(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;yi(i,s,l),a=c}}}if(ht)throw e=gt,ht=!1,gt=null,e}function O(e,t){var n=t[Xi];n===void 0&&(n=t[Xi]=new Set);var r=e+`__bubble`;n.has(r)||(wi(t,e,2,!1),n.add(r))}function xi(e,t,n){var r=0;t&&(r|=4),wi(n,e,r,t)}var Si=`_reactListening`+Math.random().toString(36).slice(2);function Ci(e){if(!e[Si]){e[Si]=!0,i.forEach(function(t){t!==`selectionchange`&&(vi.has(t)||xi(t,!1,e),xi(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Si]||(t[Si]=!0,xi(`selectionchange`,!1,t))}}function wi(e,t,n,r){switch(Nn(t)){case 1:var i=On;break;case 4:i=kn;break;default:i=An}n=i.bind(null,t,n,e),i=void 0,!ut||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Ti(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=$i(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}ct(function(){var r=a,i=Qe(n),o=[];a:{var s=fi.get(e);if(s!==void 0){var c=Un,l=e;switch(e){case`keypress`:if(Rn(n)===0)break a;case`keydown`:case`keyup`:c=sr;break;case`focusin`:l=`focus`,c=Qn;break;case`focusout`:l=`blur`,c=Qn;break;case`beforeblur`:case`afterblur`:c=Qn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Xn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Zn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=lr;break;case ci:case li:case ui:c=$n;break;case di:c=ur;break;case`scroll`:c=Gn;break;case`wheel`:c=dr;break;case`copy`:case`cut`:case`paste`:c=er;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=cr}var u=(t&4)!=0,d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=lt(p,f),h!=null&&u.push(Ei(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Ze&&(l=n.relatedTarget||n.fromElement)&&($i(l)||l[Yi]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?$i(l):null,l!==null&&(d=bt(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Xn,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=cr,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:ta(c),m=l==null?s:ta(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,$i(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=Oi(m))p++;for(m=0,h=f;h;h=Oi(h))m++;for(;0<p-m;)u=Oi(u),p--;for(;0<m-p;)f=Oi(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=Oi(u),f=Oi(f)}u=null}else u=null;c!==null&&ki(o,s,c,u,!1),l!==null&&d!==null&&ki(o,d,l,u,!0)}}a:{if(s=r?ta(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=jr;else if(Tr(s))if(Mr)g=Vr;else{g=zr;var _=Rr}else (c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Br);if(g&&=g(e,r)){Er(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&Me(s,`number`,s.value)}switch(_=r?ta(r):window,e){case`focusin`:(Tr(_)||_.contentEditable===`true`)&&(Qr=_,$r=r,ei=null);break;case`focusout`:ei=$r=Qr=null;break;case`mousedown`:ti=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ti=!1,ni(o,n,i);break;case`selectionchange`:if(Zr)break;case`keydown`:case`keyup`:ni(o,n,i)}var v;if(pr)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else xr?yr(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(gr&&n.locale!==`ko`&&(xr||y!==`onCompositionStart`?y===`onCompositionEnd`&&xr&&(v=Ln()):(Pn=i,Fn=`value`in Pn?Pn.value:Pn.textContent,xr=!0)),_=Di(r,y),0<_.length&&(y=new tr(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=br(n),v!==null&&(y.data=v)))),(v=hr?Sr(e,n):Cr(e,n))&&(r=Di(r,`onBeforeInput`),0<r.length&&(i=new tr(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}bi(o,t)})}function Ei(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Di(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=lt(e,n),a!=null&&r.unshift(Ei(e,a,i)),a=lt(e,t),a!=null&&r.push(Ei(e,a,i))),e=e.return}return r}function Oi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ki(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=lt(n,a),c!=null&&o.unshift(Ei(n,c,s))):i||(c=lt(n,a),c!=null&&o.push(Ei(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ai=/\r\n?/g,ji=/\u0000|\uFFFD/g;function Mi(e){return(typeof e==`string`?e:``+e).replace(Ai,`
6
6
  `).replace(ji,``)}function Ni(e,t,n){if(t=Mi(t),Mi(e)!==t&&n)throw Error(r(425))}function Pi(){}var Fi=null,Ii=null;function Li(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ri=typeof setTimeout==`function`?setTimeout:void 0,zi=typeof clearTimeout==`function`?clearTimeout:void 0,Bi=typeof Promise==`function`?Promise:void 0,Vi=typeof queueMicrotask==`function`?queueMicrotask:Bi===void 0?Ri:function(e){return Bi.resolve(null).then(e).catch(Hi)};function Hi(e){setTimeout(function(){throw e})}function Ui(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),Tn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);Tn(t)}function Wi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Gi(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var Ki=Math.random().toString(36).slice(2),qi=`__reactFiber$`+Ki,Ji=`__reactProps$`+Ki,Yi=`__reactContainer$`+Ki,Xi=`__reactEvents$`+Ki,Zi=`__reactListeners$`+Ki,Qi=`__reactHandles$`+Ki;function $i(e){var t=e[qi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yi]||n[qi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Gi(e);e!==null;){if(n=e[qi])return n;e=Gi(e)}return t}e=n,n=e.parentNode}return null}function ea(e){return e=e[qi]||e[Yi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ta(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function na(e){return e[Ji]||null}var ra=[],ia=-1;function aa(e){return{current:e}}function k(e){0>ia||(e.current=ra[ia],ra[ia]=null,ia--)}function A(e,t){ia++,ra[ia]=e.current,e.current=t}var oa={},j=aa(oa),M=aa(!1),sa=oa;function ca(e,t){var n=e.type.contextTypes;if(!n)return oa;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function N(e){return e=e.childContextTypes,e!=null}function la(){k(M),k(j)}function ua(e,t,n){if(j.current!==oa)throw Error(r(168));A(j,t),A(M,n)}function da(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,be(e)||`Unknown`,a));return T({},n,i)}function fa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||oa,sa=j.current,A(j,e),A(M,M.current),!0}function pa(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=da(e,t,sa),i.__reactInternalMemoizedMergedChildContext=e,k(M),k(j),A(j,e)):k(M),A(M,n)}var ma=null,ha=!1,ga=!1;function _a(e){ma===null?ma=[e]:ma.push(e)}function va(e){ha=!0,_a(e)}function ya(){if(!ga&&ma!==null){ga=!0;var e=0,t=D;try{var n=ma;for(D=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ma=null,ha=!1}catch(t){throw ma!==null&&(ma=ma.slice(e+1)),Et(jt,ya),t}finally{D=t,ga=!1}}return null}var ba=[],xa=0,Sa=null,Ca=0,wa=[],Ta=0,Ea=null,Da=1,Oa=``;function ka(e,t){ba[xa++]=Ca,ba[xa++]=Sa,Sa=e,Ca=t}function Aa(e,t,n){wa[Ta++]=Da,wa[Ta++]=Oa,wa[Ta++]=Ea,Ea=e;var r=Da;e=Oa;var i=32-zt(r)-1;r&=~(1<<i),n+=1;var a=32-zt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Da=1<<32-zt(t)+i|n<<i|r,Oa=a+e}else Da=1<<a|n<<i|r,Oa=e}function ja(e){e.return!==null&&(ka(e,1),Aa(e,1,0))}function Ma(e){for(;e===Sa;)Sa=ba[--xa],ba[xa]=null,Ca=ba[--xa],ba[xa]=null;for(;e===Ea;)Ea=wa[--Ta],wa[Ta]=null,Oa=wa[--Ta],wa[Ta]=null,Da=wa[--Ta],wa[Ta]=null}var Na=null,Pa=null,P=!1,Fa=null;function Ia(e,t){var n=Kl(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function La(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t===null?!1:(e.stateNode=t,Na=e,Pa=Wi(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,Na=e,Pa=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=Ea===null?null:{id:Da,overflow:Oa},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Kl(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Na=e,Pa=null,!0);default:return!1}}function Ra(e){return(e.mode&1)!=0&&(e.flags&128)==0}function za(e){if(P){var t=Pa;if(t){var n=t;if(!La(e,t)){if(Ra(e))throw Error(r(418));t=Wi(n.nextSibling);var i=Na;t&&La(e,t)?Ia(i,n):(e.flags=e.flags&-4097|2,P=!1,Na=e)}}else{if(Ra(e))throw Error(r(418));e.flags=e.flags&-4097|2,P=!1,Na=e}}}function Ba(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Na=e}function Va(e){if(e!==Na)return!1;if(!P)return Ba(e),P=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Li(e.type,e.memoizedProps)),t&&=Pa){if(Ra(e))throw Ha(),Error(r(418));for(;t;)Ia(e,t),t=Wi(t.nextSibling)}if(Ba(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Pa=Wi(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Pa=null}}else Pa=Na?Wi(e.stateNode.nextSibling):null;return!0}function Ha(){for(var e=Pa;e;)e=Wi(e.nextSibling)}function Ua(){Pa=Na=null,P=!1}function Wa(e){Fa===null?Fa=[e]:Fa.push(e)}var Ga=x.ReactCurrentBatchConfig;function Ka(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function qa(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Ja(e){var t=e._init;return t(e._payload)}function Ya(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=Yl(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=$l(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===ie?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===de&&Ja(i)===t.type)?(r=a(t,n.props),r.ref=Ka(e,t,n),r.return=e,r):(r=Xl(n.type,n.key,n.props,null,e.mode,r),r.ref=Ka(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=eu(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Zl(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=$l(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case ne:return n=Xl(t.type,t.key,t.props,null,e.mode,n),n.ref=Ka(e,null,t),n.return=e,n;case re:return t=eu(t,e.mode,n),t.return=e,t;case de:var r=t._init;return f(e,r(t._payload),n)}if(Ne(t)||pe(t))return t=Zl(t,e.mode,n,null),t.return=e,t;qa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case ne:return n.key===i?l(e,t,n,r):null;case re:return n.key===i?u(e,t,n,r):null;case de:return i=n._init,p(e,t,i(n._payload),r)}if(Ne(n)||pe(n))return i===null?d(e,t,n,r,null):null;qa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case ne:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case re:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case de:var a=r._init;return m(e,t,n,a(r._payload),i)}if(Ne(r)||pe(r))return e=e.get(n)||null,d(t,e,r,i,null);qa(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),P&&ka(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return P&&ka(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),P&&ka(r,h),l}function g(a,s,c,l){var u=pe(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),P&&ka(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return P&&ka(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),P&&ka(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===ie&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case ne:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===ie){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===de&&Ja(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Ka(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===ie?(r=Zl(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=Xl(i.type,i.key,i.props,null,e.mode,o),o.ref=Ka(e,r,i),o.return=e,e=o)}return s(e);case re:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}else t(e,r);r=r.sibling}r=eu(i,e.mode,o),r.return=e,e=r}return s(e);case de:return l=i._init,_(e,r,l(i._payload),o)}if(Ne(i))return h(e,r,i,o);if(pe(i))return g(e,r,i,o);qa(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=$l(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Xa=Ya(!0),Za=Ya(!1),Qa=aa(null),$a=null,eo=null,to=null;function no(){to=eo=$a=null}function ro(e){var t=Qa.current;k(Qa),e._currentValue=t}function io(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ao(e,t){$a=e,to=eo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(B=!0),e.firstContext=null)}function oo(e){var t=e._currentValue;if(to!==e)if(e={context:e,memoizedValue:t,next:null},eo===null){if($a===null)throw Error(r(308));eo=e,$a.dependencies={lanes:0,firstContext:e}}else eo=eo.next=e;return t}var so=null;function co(e){so===null?so=[e]:so.push(e)}function lo(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,co(t)):(n.next=i.next,i.next=n),t.interleaved=n,uo(e,r)}function uo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var fo=!1;function po(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ho(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function go(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,uo(e,n)}return i=r.interleaved,i===null?(t.next=t,co(r)):(t.next=i.next,i.next=t),r.interleaved=t,uo(e,n)}function _o(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,en(e,n)}}function vo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function yo(e,t,n,r){var i=e.updateQueue;fo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=T({},d,f);break a;case 2:fo=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Zc|=o,e.lanes=o,e.memoizedState=d}}function bo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var xo={},So=aa(xo),Co=aa(xo),wo=aa(xo);function To(e){if(e===xo)throw Error(r(174));return e}function Eo(e,t){switch(A(wo,t),A(Co,e),A(So,xo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Be(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Be(t,e)}k(So),A(So,t)}function Do(){k(So),k(Co),k(wo)}function Oo(e){To(wo.current);var t=To(So.current),n=Be(t,e.type);t!==n&&(A(Co,e),A(So,n))}function ko(e){Co.current===e&&(k(So),k(Co))}var F=aa(0);function Ao(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jo=[];function Mo(){for(var e=0;e<jo.length;e++)jo[e]._workInProgressVersionPrimary=null;jo.length=0}var No=x.ReactCurrentDispatcher,Po=x.ReactCurrentBatchConfig,Fo=0,I=null,L=null,R=null,Io=!1,Lo=!1,Ro=0,zo=0;function z(){throw Error(r(321))}function Bo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ur(e[n],t[n]))return!1;return!0}function Vo(e,t,n,i,a,o){if(Fo=o,I=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,No.current=e===null||e.memoizedState===null?ws:Ts,e=n(i,a),Lo){o=0;do{if(Lo=!1,Ro=0,25<=o)throw Error(r(301));o+=1,R=L=null,t.updateQueue=null,No.current=Es,e=n(i,a)}while(Lo)}if(No.current=Cs,t=L!==null&&L.next!==null,Fo=0,R=L=I=null,Io=!1,t)throw Error(r(300));return e}function Ho(){var e=Ro!==0;return Ro=0,e}function Uo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return R===null?I.memoizedState=R=e:R=R.next=e,R}function Wo(){if(L===null){var e=I.alternate;e=e===null?null:e.memoizedState}else e=L.next;var t=R===null?I.memoizedState:R.next;if(t!==null)R=t,L=e;else{if(e===null)throw Error(r(310));L=e,e={memoizedState:L.memoizedState,baseState:L.baseState,baseQueue:L.baseQueue,queue:L.queue,next:null},R===null?I.memoizedState=R=e:R=R.next=e}return R}function Go(e,t){return typeof t==`function`?t(e):t}function Ko(e){var t=Wo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=L,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((Fo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,I.lanes|=d,Zc|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Ur(i,t.memoizedState)||(B=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,I.lanes|=o,Zc|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function qo(e){var t=Wo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Ur(o,t.memoizedState)||(B=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Jo(){}function Yo(e,t){var n=I,i=Wo(),a=t(),o=!Ur(i.memoizedState,a);if(o&&(i.memoizedState=a,B=!0),i=i.queue,ss(Qo.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||R!==null&&R.memoizedState.tag&1){if(n.flags|=2048,ns(9,Zo.bind(null,n,i,a,t),void 0,null),q===null)throw Error(r(349));Fo&30||Xo(n,t,a)}return a}function Xo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=I.updateQueue,t===null?(t={lastEffect:null,stores:null},I.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Zo(e,t,n,r){t.value=n,t.getSnapshot=r,$o(t)&&es(e)}function Qo(e,t,n){return n(function(){$o(t)&&es(e)})}function $o(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ur(e,n)}catch{return!0}}function es(e){var t=uo(e,1);t!==null&&hl(t,e,1,-1)}function ts(e){var t=Uo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:e},t.queue=e,e=e.dispatch=ys.bind(null,I,e),[t.memoizedState,e]}function ns(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=I.updateQueue,t===null?(t={lastEffect:null,stores:null},I.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function rs(){return Wo().memoizedState}function is(e,t,n,r){var i=Uo();I.flags|=e,i.memoizedState=ns(1|t,n,void 0,r===void 0?null:r)}function as(e,t,n,r){var i=Wo();r=r===void 0?null:r;var a=void 0;if(L!==null){var o=L.memoizedState;if(a=o.destroy,r!==null&&Bo(r,o.deps)){i.memoizedState=ns(t,n,a,r);return}}I.flags|=e,i.memoizedState=ns(1|t,n,a,r)}function os(e,t){return is(8390656,8,e,t)}function ss(e,t){return as(2048,8,e,t)}function cs(e,t){return as(4,2,e,t)}function ls(e,t){return as(4,4,e,t)}function us(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ds(e,t,n){return n=n==null?null:n.concat([e]),as(4,4,us.bind(null,t,e),n)}function fs(){}function ps(e,t){var n=Wo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ms(e,t){var n=Wo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Bo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function hs(e,t,n){return Fo&21?(Ur(n,t)||(n=Xt(),I.lanes|=n,Zc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,B=!0),e.memoizedState=n)}function gs(e,t){var n=D;D=n!==0&&4>n?n:4,e(!0);var r=Po.transition;Po.transition={};try{e(!1),t()}finally{D=n,Po.transition=r}}function _s(){return Wo().memoizedState}function vs(e,t,n){var r=ml(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bs(e))xs(t,n);else if(n=lo(e,t,n,r),n!==null){var i=Q();hl(n,e,r,i),Ss(n,t,r)}}function ys(e,t,n){var r=ml(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bs(e))xs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ur(s,o)){var c=t.interleaved;c===null?(i.next=i,co(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=lo(e,t,i,r),n!==null&&(i=Q(),hl(n,e,r,i),Ss(n,t,r))}}function bs(e){var t=e.alternate;return e===I||t!==null&&t===I}function xs(e,t){Lo=Io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ss(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,en(e,n)}}var Cs={readContext:oo,useCallback:z,useContext:z,useEffect:z,useImperativeHandle:z,useInsertionEffect:z,useLayoutEffect:z,useMemo:z,useReducer:z,useRef:z,useState:z,useDebugValue:z,useDeferredValue:z,useTransition:z,useMutableSource:z,useSyncExternalStore:z,useId:z,unstable_isNewReconciler:!1},ws={readContext:oo,useCallback:function(e,t){return Uo().memoizedState=[e,t===void 0?null:t],e},useContext:oo,useEffect:os,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),is(4194308,4,us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return is(4194308,4,e,t)},useInsertionEffect:function(e,t){return is(4,2,e,t)},useMemo:function(e,t){var n=Uo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Uo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=vs.bind(null,I,e),[r.memoizedState,e]},useRef:function(e){var t=Uo();return e={current:e},t.memoizedState=e},useState:ts,useDebugValue:fs,useDeferredValue:function(e){return Uo().memoizedState=e},useTransition:function(){var e=ts(!1),t=e[0];return e=gs.bind(null,e[1]),Uo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=I,a=Uo();if(P){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),q===null)throw Error(r(349));Fo&30||Xo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,os(Qo.bind(null,i,o,e),[e]),i.flags|=2048,ns(9,Zo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Uo(),t=q.identifierPrefix;if(P){var n=Oa,r=Da;n=(r&~(1<<32-zt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Ro++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=zo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},Ts={readContext:oo,useCallback:ps,useContext:oo,useEffect:ss,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:Ko,useRef:rs,useState:function(){return Ko(Go)},useDebugValue:fs,useDeferredValue:function(e){return hs(Wo(),L.memoizedState,e)},useTransition:function(){return[Ko(Go)[0],Wo().memoizedState]},useMutableSource:Jo,useSyncExternalStore:Yo,useId:_s,unstable_isNewReconciler:!1},Es={readContext:oo,useCallback:ps,useContext:oo,useEffect:ss,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:qo,useRef:rs,useState:function(){return qo(Go)},useDebugValue:fs,useDeferredValue:function(e){var t=Wo();return L===null?t.memoizedState=e:hs(t,L.memoizedState,e)},useTransition:function(){return[qo(Go)[0],Wo().memoizedState]},useMutableSource:Jo,useSyncExternalStore:Yo,useId:_s,unstable_isNewReconciler:!1};function Ds(e,t){if(e&&e.defaultProps){for(var n in t=T({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Os(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ks={isMounted:function(e){return(e=e._reactInternals)?bt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Q(),i=ml(e),a=ho(r,i);a.payload=t,n!=null&&(a.callback=n),t=go(e,a,i),t!==null&&(hl(t,e,i,r),_o(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Q(),i=ml(e),a=ho(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=go(e,a,i),t!==null&&(hl(t,e,i,r),_o(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Q(),r=ml(e),i=ho(n,r);i.tag=2,t!=null&&(i.callback=t),t=go(e,i,r),t!==null&&(hl(t,e,r,n),_o(t,e,r))}};function As(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Wr(n,r)||!Wr(i,a):!0}function js(e,t,n){var r=!1,i=oa,a=t.contextType;return typeof a==`object`&&a?a=oo(a):(i=N(t)?sa:j.current,r=t.contextTypes,a=(r=r!=null)?ca(e,i):oa),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ks,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ms(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ks.enqueueReplaceState(t,t.state,null)}function Ns(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},po(e);var a=t.contextType;typeof a==`object`&&a?i.context=oo(a):(a=N(t)?sa:j.current,i.context=ca(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(Os(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&ks.enqueueReplaceState(i,i.state,null),yo(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Ps(e,t){try{var n=``,r=t;do n+=ve(r),r=r.return;while(r);var i=n}catch(e){i=`
7
7
  Error generating stack: `+e.message+`
8
- `+e.stack}return{value:e,source:t,stack:i,digest:null}}function Fs(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Is(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Ls=typeof WeakMap==`function`?WeakMap:Map;function Rs(e,t,n){n=ho(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){il||(il=!0,al=r),Is(e,t)},n}function zs(e,t,n){n=ho(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Is(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Is(e,t),typeof r!=`function`&&(ol===null?ol=new Set([this]):ol.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Bs(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ls;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=zl.bind(null,e,t,n),t.then(e,e))}function Vs(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null?!0:t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Hs(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ho(-1,1),t.tag=2,go(n,t,1))),n.lanes|=1),e)}var Us=x.ReactCurrentOwner,B=!1;function V(e,t,n,r){t.child=e===null?Za(t,null,n,r):Xa(t,e.child,n,r)}function Ws(e,t,n,r,i){n=n.render;var a=t.ref;return ao(t,i),r=Vo(e,t,n,r,a,i),n=Ho(),e!==null&&!B?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,uc(e,t,i)):(P&&n&&ja(t),t.flags|=1,V(e,t,r,i),t.child)}function Gs(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ql(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Ks(e,t,a,r,i)):(e=Xl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Wr:n,n(o,r)&&e.ref===t.ref)return uc(e,t,i)}return t.flags|=1,e=Yl(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ks(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Wr(a,r)&&e.ref===t.ref)if(B=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(B=!0);else return t.lanes=e.lanes,uc(e,t,i)}return Ys(e,t,n,r,i)}function qs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},A(Yc,Jc),Jc|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,A(Yc,Jc),Jc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,A(Yc,Jc),Jc|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),A(Yc,Jc),Jc|=r;return V(e,t,i,n),t.child}function Js(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ys(e,t,n,r,i){var a=N(n)?sa:j.current;return a=ca(t,a),ao(t,i),n=Vo(e,t,n,r,a,i),r=Ho(),e!==null&&!B?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,uc(e,t,i)):(P&&r&&ja(t),t.flags|=1,V(e,t,n,i),t.child)}function Xs(e,t,n,r,i){if(N(n)){var a=!0;fa(t)}else a=!1;if(ao(t,i),t.stateNode===null)lc(e,t),js(t,n,r),Ns(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=oo(l):(l=N(n)?sa:j.current,l=ca(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Ms(t,o,r,l),fo=!1;var f=t.memoizedState;o.state=f,yo(t,r,o,i),c=t.memoizedState,s!==r||f!==c||M.current||fo?(typeof u==`function`&&(Os(t,n,u,r),c=t.memoizedState),(s=fo||As(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,mo(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Ds(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=oo(c):(c=N(n)?sa:j.current,c=ca(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Ms(t,o,r,c),fo=!1,f=t.memoizedState,o.state=f,yo(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||M.current||fo?(typeof p==`function`&&(Os(t,n,p,r),m=t.memoizedState),(l=fo||As(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Zs(e,t,n,r,a,i)}function Zs(e,t,n,r,i,a){Js(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&pa(t,n,!1),uc(e,t,a);r=t.stateNode,Us.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Xa(t,e.child,null,a),t.child=Xa(t,null,s,a)):V(e,t,s,a),t.memoizedState=r.state,i&&pa(t,n,!0),t.child}function Qs(e){var t=e.stateNode;t.pendingContext?ua(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ua(e,t.context,!1),Eo(e,t.containerInfo)}function $s(e,t,n,r,i){return Ua(),Wa(i),t.flags|=256,V(e,t,n,r),t.child}var ec={dehydrated:null,treeContext:null,retryLane:0};function tc(e){return{baseLanes:e,cachePool:null,transitions:null}}function nc(e,t,n){var r=t.pendingProps,i=F.current,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!=0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),A(F,i&1),e===null)return za(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data===`$!`?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Ql(o,r,0,null),e=Zl(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=tc(n),t.memoizedState=ec,e):rc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return ac(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Yl(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=Zl(a,o,n,null),a.flags|=2):a=Yl(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?tc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=ec,r}return a=e.child,e=a.sibling,r=Yl(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function rc(e,t){return t=Ql({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function ic(e,t,n,r){return r!==null&&Wa(r),Xa(t,e.child,null,n),e=rc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ac(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Fs(Error(r(422))),ic(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=Ql({mode:`visible`,children:i.children},a,0,null),o=Zl(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Xa(t,e.child,null,s),t.child.memoizedState=tc(s),t.memoizedState=ec,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return ic(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Fs(o,i,void 0),ic(e,t,s,i)}if(c=(s&e.childLanes)!==0,B||c){if(i=q,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,uo(e,a),hl(i,e,a,-1))}return kl(),i=Fs(Error(r(421))),ic(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=Vl.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Pa=Wi(a.nextSibling),Na=t,P=!0,Fa=null,e!==null&&(wa[Ta++]=Da,wa[Ta++]=Oa,wa[Ta++]=Ea,Da=e.id,Oa=e.overflow,Ea=t),t=rc(t,i.children),t.flags|=4096,t)}function oc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),io(e.return,t,n)}function sc(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function cc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(V(e,t,r.children,n),r=F.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&oc(e,n,t);else if(e.tag===19)oc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(A(F,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ao(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),sc(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ao(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}sc(t,!0,n,null,a);break;case`together`:sc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function lc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function uc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Zc|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=Yl(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Yl(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function dc(e,t,n){switch(t.tag){case 3:Qs(t),Ua();break;case 5:Oo(t);break;case 1:N(t.type)&&fa(t);break;case 4:Eo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;A(Qa,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(A(F,F.current&1),e=uc(e,t,n),e===null?null:e.sibling):nc(e,t,n):(A(F,F.current&1),t.flags|=128,null);A(F,F.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return cc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),A(F,F.current),r)break;return null;case 22:case 23:return t.lanes=0,qs(e,t,n)}return uc(e,t,n)}var fc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},pc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,To(So.current);var o=null;switch(n){case`input`:i=De(e,i),r=De(e,r),o=[];break;case`select`:i=T({},i,{value:void 0}),r=T({},r,{value:void 0}),o=[];break;case`textarea`:i=Fe(e,i),r=Fe(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Pi)}Ye(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&O(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},mc=function(e,t,n,r){n!==r&&(t.flags|=4)};function hc(e,t){if(!P)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function H(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function gc(e,t,n){var i=t.pendingProps;switch(Ma(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return H(t),null;case 1:return N(t.type)&&la(),H(t),null;case 3:return i=t.stateNode,Do(),k(M),k(j),Mo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Va(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Fa!==null&&(yl(Fa),Fa=null))),H(t),null;case 5:ko(t);var o=To(wo.current);if(n=t.type,e!==null&&t.stateNode!=null)pc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return H(t),null}if(e=To(So.current),Va(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[qi]=t,i[Ji]=s,e=(t.mode&1)!=0,n){case`dialog`:O(`cancel`,i),O(`close`,i);break;case`iframe`:case`object`:case`embed`:O(`load`,i);break;case`video`:case`audio`:for(o=0;o<_i.length;o++)O(_i[o],i);break;case`source`:O(`error`,i);break;case`img`:case`image`:case`link`:O(`error`,i),O(`load`,i);break;case`details`:O(`toggle`,i);break;case`input`:Oe(i,s),O(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},O(`invalid`,i);break;case`textarea`:Ie(i,s),O(`invalid`,i)}for(var c in Ye(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Ni(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Ni(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&O(`scroll`,i)}switch(n){case`input`:we(i),je(i,s,!0);break;case`textarea`:we(i),Re(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Pi)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=ze(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[qi]=t,e[Ji]=i,fc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Xe(n,i),n){case`dialog`:O(`cancel`,e),O(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:O(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<_i.length;o++)O(_i[o],e);o=i;break;case`source`:O(`error`,e),o=i;break;case`img`:case`image`:case`link`:O(`error`,e),O(`load`,e),o=i;break;case`details`:O(`toggle`,e),o=i;break;case`input`:Oe(e,i),o=De(e,i),O(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=T({},i,{value:void 0}),O(`invalid`,e);break;case`textarea`:Ie(e,i),o=Fe(e,i),O(`invalid`,e);break;default:o=i}for(s in Ye(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?qe(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&He(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Ue(e,u):typeof u==`number`&&Ue(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&O(`scroll`,e):u!=null&&te(e,s,u,c))}switch(n){case`input`:we(e),je(e,i,!1);break;case`textarea`:we(e),Re(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+xe(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&Pe(e,!!i.multiple,i.defaultValue,!0):Pe(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=Pi)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return H(t),null;case 6:if(e&&t.stateNode!=null)mc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=To(wo.current),To(So.current),Va(t)){if(i=t.stateNode,n=t.memoizedProps,i[qi]=t,(s=i.nodeValue!==n)&&(e=Na,e!==null))switch(e.tag){case 3:Ni(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ni(i.nodeValue,n,(e.mode&1)!=0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[qi]=t,t.stateNode=i}return H(t),null;case 13:if(k(F),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(P&&Pa!==null&&t.mode&1&&!(t.flags&128))Ha(),Ua(),t.flags|=98560,s=!1;else if(s=Va(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[qi]=t}else Ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),s=!1}else Fa!==null&&(yl(Fa),Fa=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||F.current&1?X===0&&(X=3):kl())),t.updateQueue!==null&&(t.flags|=4),H(t),null);case 4:return Do(),e===null&&Ci(t.stateNode.containerInfo),H(t),null;case 10:return ro(t.type._context),H(t),null;case 17:return N(t.type)&&la(),H(t),null;case 19:if(k(F),s=t.memoizedState,s===null)return H(t),null;if(i=(t.flags&128)!=0,c=s.rendering,c===null)if(i)hc(s,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Ao(e),c!==null){for(t.flags|=128,hc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return A(F,F.current&1|2),t.child}e=e.sibling}s.tail!==null&&E()>nl&&(t.flags|=128,i=!0,hc(s,!1),t.lanes=4194304)}else{if(!i)if(e=Ao(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),hc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!P)return H(t),null}else 2*E()-s.renderingStartTime>nl&&n!==1073741824&&(t.flags|=128,i=!0,hc(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(H(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=E(),t.sibling=null,n=F.current,A(F,i?n&1|2:n&1),t);case 22:case 23:return Tl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Jc&1073741824&&(H(t),t.subtreeFlags&6&&(t.flags|=8192)):H(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function _c(e,t){switch(Ma(t),t.tag){case 1:return N(t.type)&&la(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Do(),k(M),k(j),Mo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ko(t),null;case 13:if(k(F),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return k(F),null;case 4:return Do(),null;case 10:return ro(t.type._context),null;case 22:case 23:return Tl(),null;case 24:return null;default:return null}}var vc=!1,U=!1,yc=typeof WeakSet==`function`?WeakSet:Set,W=null;function bc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){$(e,t,n)}else n.current=null}function xc(e,t,n){try{n()}catch(n){$(e,t,n)}}var Sc=!1;function Cc(e,t){if(Fi=Dn,e=Jr(),Yr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Ii={focusedElem:e,selectionRange:n},Dn=!1,W=t;W!==null;)if(t=W,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,W=e;else for(;W!==null;){t=W;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Ds(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){$(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return h=Sc,Sc=!1,h}function wc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&xc(t,n,a)}i=i.next}while(i!==r)}}function Tc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ec(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Dc(e){var t=e.alternate;t!==null&&(e.alternate=null,Dc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[qi],delete t[Ji],delete t[Xi],delete t[Zi],delete t[Qi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Oc(e){return e.tag===5||e.tag===3||e.tag===4}function kc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Oc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ac(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Pi));else if(r!==4&&(e=e.child,e!==null))for(Ac(e,t,n),e=e.sibling;e!==null;)Ac(e,t,n),e=e.sibling}function jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(jc(e,t,n),e=e.sibling;e!==null;)jc(e,t,n),e=e.sibling}var G=null,Mc=!1;function Nc(e,t,n){for(n=n.child;n!==null;)Pc(e,t,n),n=n.sibling}function Pc(e,t,n){if(Lt&&typeof Lt.onCommitFiberUnmount==`function`)try{Lt.onCommitFiberUnmount(It,n)}catch{}switch(n.tag){case 5:U||bc(n,t);case 6:var r=G,i=Mc;G=null,Nc(e,t,n),G=r,Mc=i,G!==null&&(Mc?(e=G,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):G.removeChild(n.stateNode));break;case 18:G!==null&&(Mc?(e=G,n=n.stateNode,e.nodeType===8?Ui(e.parentNode,n):e.nodeType===1&&Ui(e,n),Tn(e)):Ui(G,n.stateNode));break;case 4:r=G,i=Mc,G=n.stateNode.containerInfo,Mc=!0,Nc(e,t,n),G=r,Mc=i;break;case 0:case 11:case 14:case 15:if(!U&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&xc(n,t,o),i=i.next}while(i!==r)}Nc(e,t,n);break;case 1:if(!U&&(bc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){$(n,t,e)}Nc(e,t,n);break;case 21:Nc(e,t,n);break;case 22:n.mode&1?(U=(r=U)||n.memoizedState!==null,Nc(e,t,n),U=r):Nc(e,t,n);break;default:Nc(e,t,n)}}function Fc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new yc),t.forEach(function(t){var r=Hl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Ic(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:G=c.stateNode,Mc=!1;break a;case 3:G=c.stateNode.containerInfo,Mc=!0;break a;case 4:G=c.stateNode.containerInfo,Mc=!0;break a}c=c.return}if(G===null)throw Error(r(160));Pc(o,s,a),G=null,Mc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){$(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Lc(t,e),t=t.sibling}function Lc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ic(t,e),Rc(e),i&4){try{wc(3,e,e.return),Tc(3,e)}catch(t){$(e,e.return,t)}try{wc(5,e,e.return)}catch(t){$(e,e.return,t)}}break;case 1:Ic(t,e),Rc(e),i&512&&n!==null&&bc(n,n.return);break;case 5:if(Ic(t,e),Rc(e),i&512&&n!==null&&bc(n,n.return),e.flags&32){var a=e.stateNode;try{Ue(a,``)}catch(t){$(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&ke(a,o),Xe(c,s);var u=Xe(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?qe(a,f):d===`dangerouslySetInnerHTML`?He(a,f):d===`children`?Ue(a,f):te(a,d,f,u)}switch(c){case`input`:Ae(a,o);break;case`textarea`:Le(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?Pe(a,!!o.multiple,o.multiple?[]:``,!1):Pe(a,!!o.multiple,o.defaultValue,!0)):Pe(a,!!o.multiple,m,!1)}a[Ji]=o}catch(t){$(e,e.return,t)}}break;case 6:if(Ic(t,e),Rc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){$(e,e.return,t)}}break;case 3:if(Ic(t,e),Rc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{Tn(t.containerInfo)}catch(t){$(e,e.return,t)}break;case 4:Ic(t,e),Rc(e);break;case 13:Ic(t,e),Rc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(tl=E())),i&4&&Fc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(U=(u=U)||d,Ic(t,e),U=u):Ic(t,e),Rc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(W=e,d=e.child;d!==null;){for(f=W=d;W!==null;){switch(p=W,m=p.child,p.tag){case 0:case 11:case 14:case 15:wc(4,p,p.return);break;case 1:bc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){$(i,n,e)}}break;case 5:bc(p,p.return);break;case 22:if(p.memoizedState!==null){Hc(f);continue}}m===null?Hc(f):(m.return=p,W=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Ke(`display`,s))}catch(t){$(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){$(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ic(t,e),Rc(e),i&4&&Fc(e);break;case 21:break;default:Ic(t,e),Rc(e)}}function Rc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Oc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Ue(a,``),i.flags&=-33),jc(e,kc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Ac(e,kc(e),o);break;default:throw Error(r(161))}}catch(t){$(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zc(e,t,n){W=e,Bc(e,t,n)}function Bc(e,t,n){for(var r=(e.mode&1)!=0;W!==null;){var i=W,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||vc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||U;s=vc;var l=U;if(vc=o,(U=c)&&!l)for(W=i;W!==null;)o=W,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Uc(i):(c.return=o,W=c);for(;a!==null;)W=a,Bc(a,t,n),a=a.sibling;W=i,vc=s,U=l}Vc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,W=a):Vc(e,t,n)}}function Vc(e){for(;W!==null;){var t=W;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:U||Tc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!U)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Ds(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&bo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}bo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Tn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}U||t.flags&512&&Ec(t)}catch(e){$(t,t.return,e)}}if(t===e){W=null;break}if(n=t.sibling,n!==null){n.return=t.return,W=n;break}W=t.return}}function Hc(e){for(;W!==null;){var t=W;if(t===e){W=null;break}var n=t.sibling;if(n!==null){n.return=t.return,W=n;break}W=t.return}}function Uc(e){for(;W!==null;){var t=W;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Tc(4,t)}catch(e){$(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){$(t,i,e)}}var a=t.return;try{Ec(t)}catch(e){$(t,a,e)}break;case 5:var o=t.return;try{Ec(t)}catch(e){$(t,o,e)}}}catch(e){$(t,t.return,e)}if(t===e){W=null;break}var s=t.sibling;if(s!==null){s.return=t.return,W=s;break}W=t.return}}var Wc=Math.ceil,Gc=x.ReactCurrentDispatcher,Kc=x.ReactCurrentOwner,qc=x.ReactCurrentBatchConfig,K=0,q=null,J=null,Y=0,Jc=0,Yc=aa(0),X=0,Xc=null,Zc=0,Qc=0,$c=0,el=null,Z=null,tl=0,nl=1/0,rl=null,il=!1,al=null,ol=null,sl=!1,cl=null,ll=0,ul=0,dl=null,fl=-1,pl=0;function Q(){return K&6?E():fl===-1?fl=E():fl}function ml(e){return e.mode&1?K&2&&Y!==0?Y&-Y:Ga.transition===null?(e=D,e===0?(e=window.event,e=e===void 0?16:Nn(e.type),e):e):(pl===0&&(pl=Xt()),pl):1}function hl(e,t,n,i){if(50<ul)throw ul=0,dl=null,Error(r(185));Qt(e,n,i),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(Qc|=n),X===4&&xl(e,Y)),gl(e,i),n===1&&K===0&&!(t.mode&1)&&(nl=E()+500,ha&&ya()))}function gl(e,t){var n=e.callbackNode;Jt(e,t);var r=Kt(e,e===q?Y:0);if(r===0)n!==null&&Dt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Dt(n),t===1)e.tag===0?va(Sl.bind(null,e)):_a(Sl.bind(null,e)),Vi(function(){!(K&6)&&ya()}),n=null;else{switch(tn(r)){case 1:n=jt;break;case 4:n=Mt;break;case 16:n=Nt;break;case 536870912:n=Ft;break;default:n=Nt}n=Wl(n,_l.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function _l(e,t){if(fl=-1,pl=0,K&6)throw Error(r(327));var n=e.callbackNode;if(Ll()&&e.callbackNode!==n)return null;var i=Kt(e,e===q?Y:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Al(e,i);else{t=i;var a=K;K|=2;var o=Ol();(q!==e||Y!==t)&&(rl=null,nl=E()+500,El(e,t));do try{Ml();break}catch(t){Dl(e,t)}while(1);no(),Gc.current=o,K=a,J===null?(q=null,Y=0,t=X):t=0}if(t!==0){if(t===2&&(a=Yt(e),a!==0&&(i=a,t=vl(e,a))),t===1)throw n=Xc,El(e,0),xl(e,i),gl(e,E()),n;if(t===6)xl(e,i);else{if(a=e.current.alternate,!(i&30)&&!bl(a)&&(t=Al(e,i),t===2&&(o=Yt(e),o!==0&&(i=o,t=vl(e,o))),t===1))throw n=Xc,El(e,0),xl(e,i),gl(e,E()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Fl(e,Z,rl);break;case 3:if(xl(e,i),(i&130023424)===i&&(t=tl+500-E(),10<t)){if(Kt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){Q(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Ri(Fl.bind(null,e,Z,rl),t);break}Fl(e,Z,rl);break;case 4:if(xl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-zt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=E()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Wc(i/1960))-i,10<i){e.timeoutHandle=Ri(Fl.bind(null,e,Z,rl),i);break}Fl(e,Z,rl);break;case 5:Fl(e,Z,rl);break;default:throw Error(r(329))}}}return gl(e,E()),e.callbackNode===n?_l.bind(null,e):null}function vl(e,t){var n=el;return e.current.memoizedState.isDehydrated&&(El(e,t).flags|=256),e=Al(e,t),e!==2&&(t=Z,Z=n,t!==null&&yl(t)),e}function yl(e){Z===null?Z=e:Z.push.apply(Z,e)}function bl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ur(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xl(e,t){for(t&=~$c,t&=~Qc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-zt(t),r=1<<n;e[n]=-1,t&=~r}}function Sl(e){if(K&6)throw Error(r(327));Ll();var t=Kt(e,0);if(!(t&1))return gl(e,E()),null;var n=Al(e,t);if(e.tag!==0&&n===2){var i=Yt(e);i!==0&&(t=i,n=vl(e,i))}if(n===1)throw n=Xc,El(e,0),xl(e,t),gl(e,E()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fl(e,Z,rl),gl(e,E()),null}function Cl(e,t){var n=K;K|=1;try{return e(t)}finally{K=n,K===0&&(nl=E()+500,ha&&ya())}}function wl(e){cl!==null&&cl.tag===0&&!(K&6)&&Ll();var t=K;K|=1;var n=qc.transition,r=D;try{if(qc.transition=null,D=1,e)return e()}finally{D=r,qc.transition=n,K=t,!(K&6)&&ya()}}function Tl(){Jc=Yc.current,k(Yc)}function El(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,zi(n)),J!==null)for(n=J.return;n!==null;){var r=n;switch(Ma(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&la();break;case 3:Do(),k(M),k(j),Mo();break;case 5:ko(r);break;case 4:Do();break;case 13:k(F);break;case 19:k(F);break;case 10:ro(r.type._context);break;case 22:case 23:Tl()}n=n.return}if(q=e,J=e=Yl(e.current,null),Y=Jc=t,X=0,Xc=null,$c=Qc=Zc=0,Z=el=null,so!==null){for(t=0;t<so.length;t++)if(n=so[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}so=null}return e}function Dl(e,t){do{var n=J;try{if(no(),No.current=Cs,Io){for(var i=I.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Io=!1}if(Fo=0,R=L=I=null,Lo=!1,Ro=0,Kc.current=null,n===null||n.return===null){X=1,Xc=t,J=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=Y,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Vs(s);if(m!==null){m.flags&=-257,Hs(m,s,c,o,t),m.mode&1&&Bs(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}else{if(!(t&1)){Bs(o,u,t),kl();break a}l=Error(r(426))}}else if(P&&c.mode&1){var _=Vs(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Hs(_,s,c,o,t),Wa(Ps(l,c));break a}}o=l=Ps(l,c),X!==4&&(X=2),el===null?el=[o]:el.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Rs(o,l,t);vo(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(ol===null||!ol.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var ee=zs(o,c,t);vo(o,ee);break a}}o=o.return}while(o!==null)}Pl(n)}catch(e){t=e,J===n&&n!==null&&(J=n=n.return);continue}break}while(1)}function Ol(){var e=Gc.current;return Gc.current=Cs,e===null?Cs:e}function kl(){(X===0||X===3||X===2)&&(X=4),q===null||!(Zc&268435455)&&!(Qc&268435455)||xl(q,Y)}function Al(e,t){var n=K;K|=2;var i=Ol();(q!==e||Y!==t)&&(rl=null,El(e,t));do try{jl();break}catch(t){Dl(e,t)}while(1);if(no(),K=n,Gc.current=i,J!==null)throw Error(r(261));return q=null,Y=0,X}function jl(){for(;J!==null;)Nl(J)}function Ml(){for(;J!==null&&!Ot();)Nl(J)}function Nl(e){var t=Ul(e.alternate,e,Jc);e.memoizedProps=e.pendingProps,t===null?Pl(e):J=t,Kc.current=null}function Pl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=_c(n,t),n!==null){n.flags&=32767,J=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{X=6,J=null;return}}else if(n=gc(n,t,Jc),n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);X===0&&(X=5)}function Fl(e,t,n){var r=D,i=qc.transition;try{qc.transition=null,D=1,Il(e,t,n,r)}finally{qc.transition=i,D=r}return null}function Il(e,t,n,i){do Ll();while(cl!==null);if(K&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if($t(e,o),e===q&&(J=q=null,Y=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||sl||(sl=!0,Wl(Nt,function(){return Ll(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=qc.transition,qc.transition=null;var s=D;D=1;var c=K;K|=4,Kc.current=null,Cc(e,n),Lc(n,e),Xr(Ii),Dn=!!Fi,Ii=Fi=null,e.current=n,zc(n,e,a),kt(),K=c,D=s,qc.transition=o}else e.current=n;if(sl&&(sl=!1,cl=e,ll=a),o=e.pendingLanes,o===0&&(ol=null),Rt(n.stateNode,i),gl(e,E()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(il)throw il=!1,e=al,al=null,e;return ll&1&&e.tag!==0&&Ll(),o=e.pendingLanes,o&1?e===dl?ul++:(ul=0,dl=e):ul=0,ya(),null}function Ll(){if(cl!==null){var e=tn(ll),t=qc.transition,n=D;try{if(qc.transition=null,D=16>e?16:e,cl===null)var i=!1;else{if(e=cl,cl=null,ll=0,K&6)throw Error(r(331));var a=K;for(K|=4,W=e.current;W!==null;){var o=W,s=o.child;if(W.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(W=u;W!==null;){var d=W;switch(d.tag){case 0:case 11:case 15:wc(8,d,o)}var f=d.child;if(f!==null)f.return=d,W=f;else for(;W!==null;){d=W;var p=d.sibling,m=d.return;if(Dc(d),d===u){W=null;break}if(p!==null){p.return=m,W=p;break}W=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}W=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,W=s;else b:for(;W!==null;){if(o=W,o.flags&2048)switch(o.tag){case 0:case 11:case 15:wc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,W=v;break b}W=o.return}}var y=e.current;for(W=y;W!==null;){s=W;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,W=b;else b:for(s=y;W!==null;){if(c=W,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Tc(9,c)}}catch(e){$(c,c.return,e)}if(c===s){W=null;break b}var ee=c.sibling;if(ee!==null){ee.return=c.return,W=ee;break b}W=c.return}}if(K=a,ya(),Lt&&typeof Lt.onPostCommitFiberRoot==`function`)try{Lt.onPostCommitFiberRoot(It,e)}catch{}i=!0}return i}finally{D=n,qc.transition=t}}return!1}function Rl(e,t,n){t=Ps(n,t),t=Rs(e,t,1),e=go(e,t,1),t=Q(),e!==null&&(Qt(e,1,t),gl(e,t))}function $(e,t,n){if(e.tag===3)Rl(e,e,n);else for(;t!==null;){if(t.tag===3){Rl(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ol===null||!ol.has(r))){e=Ps(n,e),e=zs(t,e,1),t=go(t,e,1),e=Q(),t!==null&&(Qt(t,1,e),gl(t,e));break}}t=t.return}}function zl(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Q(),e.pingedLanes|=e.suspendedLanes&n,q===e&&(Y&n)===n&&(X===4||X===3&&(Y&130023424)===Y&&500>E()-tl?El(e,0):$c|=n),gl(e,t)}function Bl(e,t){t===0&&(e.mode&1?(t=Wt,Wt<<=1,!(Wt&130023424)&&(Wt=4194304)):t=1);var n=Q();e=uo(e,t),e!==null&&(Qt(e,t,n),gl(e,n))}function Vl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bl(e,n)}function Hl(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Bl(e,n)}var Ul=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||M.current)B=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return B=!1,dc(e,t,n);B=!!(e.flags&131072)}else B=!1,P&&t.flags&1048576&&Aa(t,Ca,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;lc(e,t),e=t.pendingProps;var a=ca(t,j.current);ao(t,n),a=Vo(null,t,i,e,a,n);var o=Ho();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,N(i)?(o=!0,fa(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,po(t),a.updater=ks,t.stateNode=a,a._reactInternals=t,Ns(t,i,e,n),t=Zs(null,t,i,!0,o,n)):(t.tag=0,P&&o&&ja(t),V(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(lc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Jl(i),e=Ds(i,e),a){case 0:t=Ys(null,t,i,e,n);break a;case 1:t=Xs(null,t,i,e,n);break a;case 11:t=Ws(null,t,i,e,n);break a;case 14:t=Gs(null,t,i,Ds(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ds(i,a),Ys(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ds(i,a),Xs(e,t,i,a,n);case 3:a:{if(Qs(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,mo(e,t),yo(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Ps(Error(r(423)),t),t=$s(e,t,i,n,a);break a}else if(i!==a){a=Ps(Error(r(424)),t),t=$s(e,t,i,n,a);break a}else for(Pa=Wi(t.stateNode.containerInfo.firstChild),Na=t,P=!0,Fa=null,n=Za(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ua(),i===a){t=uc(e,t,n);break a}V(e,t,i,n)}t=t.child}return t;case 5:return Oo(t),e===null&&za(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Li(i,a)?s=null:o!==null&&Li(i,o)&&(t.flags|=32),Js(e,t),V(e,t,s,n),t.child;case 6:return e===null&&za(t),null;case 13:return nc(e,t,n);case 4:return Eo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Xa(t,null,i,n):V(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ds(i,a),Ws(e,t,i,a,n);case 7:return V(e,t,t.pendingProps,n),t.child;case 8:return V(e,t,t.pendingProps.children,n),t.child;case 12:return V(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,A(Qa,i._currentValue),i._currentValue=s,o!==null)if(Ur(o.value,s)){if(o.children===a.children&&!M.current){t=uc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=ho(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),io(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),io(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}V(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,ao(t,n),a=oo(a),i=i(a),t.flags|=1,V(e,t,i,n),t.child;case 14:return i=t.type,a=Ds(i,t.pendingProps),a=Ds(i.type,a),Gs(e,t,i,a,n);case 15:return Ks(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ds(i,a),lc(e,t),t.tag=1,N(i)?(e=!0,fa(t)):e=!1,ao(t,n),js(t,i,a),Ns(t,i,a,n),Zs(null,t,i,!0,e,n);case 19:return cc(e,t,n);case 22:return qs(e,t,n)}throw Error(r(156,t.tag))};function Wl(e,t){return Et(e,t)}function Gl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kl(e,t,n,r){return new Gl(e,t,n,r)}function ql(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jl(e){if(typeof e==`function`)return ql(e)?1:0;if(e!=null){if(e=e.$$typeof,e===le)return 11;if(e===C)return 14}return 2}function Yl(e,t){var n=e.alternate;return n===null?(n=Kl(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xl(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)ql(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case ie:return Zl(n.children,a,o,t);case ae:s=8,a|=8;break;case oe:return e=Kl(12,n,t,a|2),e.elementType=oe,e.lanes=o,e;case S:return e=Kl(13,n,t,a),e.elementType=S,e.lanes=o,e;case ue:return e=Kl(19,n,t,a),e.elementType=ue,e.lanes=o,e;case w:return Ql(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case se:s=10;break a;case ce:s=9;break a;case le:s=11;break a;case C:s=14;break a;case de:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=Kl(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function Zl(e,t,n,r){return e=Kl(7,e,r,t),e.lanes=n,e}function Ql(e,t,n,r){return e=Kl(22,e,r,t),e.elementType=w,e.lanes=n,e.stateNode={isHidden:!1},e}function $l(e,t,n){return e=Kl(6,e,null,t),e.lanes=n,e}function eu(e,t,n){return t=Kl(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zt(0),this.expirationTimes=Zt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function nu(e,t,n,r,i,a,o,s,c){return e=new tu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=Kl(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},po(a),e}function ru(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:re,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function iu(e){if(!e)return oa;e=e._reactInternals;a:{if(bt(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(N(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(N(n))return da(e,n,t)}return t}function au(e,t,n,r,i,a,o,s,c){return e=nu(n,r,!0,e,i,a,o,s,c),e.context=iu(null),n=e.current,r=Q(),i=ml(n),a=ho(r,i),a.callback=t??null,go(n,a,i),e.current.lanes=i,Qt(e,i,r),gl(e,r),e}function ou(e,t,n,r){var i=t.current,a=Q(),o=ml(i);return n=iu(n),t.context===null?t.context=n:t.pendingContext=n,t=ho(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=go(i,t,o),e!==null&&(hl(e,i,o,a),_o(e,i,o)),o}function su(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function cu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lu(e,t){cu(e,t),(e=e.alternate)&&cu(e,t)}function uu(){return null}var du=typeof reportError==`function`?reportError:function(e){console.error(e)};function fu(e){this._internalRoot=e}pu.prototype.render=fu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));ou(e,t,null,null)},pu.prototype.unmount=fu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;wl(function(){ou(null,e,null,null)}),t[Yi]=null}};function pu(e){this._internalRoot=e}pu.prototype.unstable_scheduleHydration=function(e){if(e){var t=on();e={blockedOn:null,target:e,priority:t};for(var n=0;n<hn.length&&t!==0&&t<hn[n].priority;n++);hn.splice(n,0,e),n===0&&bn(e)}};function mu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function hu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function gu(){}function _u(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=su(o);a.call(e)}}var o=au(t,r,e,0,null,!1,!1,``,gu);return e._reactRootContainer=o,e[Yi]=o.current,Ci(e.nodeType===8?e.parentNode:e),wl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=su(c);s.call(e)}}var c=nu(e,0,!1,null,null,!1,!1,``,gu);return e._reactRootContainer=c,e[Yi]=c.current,Ci(e.nodeType===8?e.parentNode:e),wl(function(){ou(t,c,n,r)}),c}function vu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=su(o);s.call(e)}}ou(t,o,e,i)}else o=_u(n,t,e,i,r);return su(o)}nn=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Gt(t.pendingLanes);n!==0&&(en(t,n|1),gl(t,E()),!(K&6)&&(nl=E()+500,ya()))}break;case 13:wl(function(){var t=uo(e,1);t!==null&&hl(t,e,1,Q())}),lu(e,1)}},rn=function(e){if(e.tag===13){var t=uo(e,134217728);t!==null&&hl(t,e,134217728,Q()),lu(e,134217728)}},an=function(e){if(e.tag===13){var t=ml(e),n=uo(e,t);n!==null&&hl(n,e,t,Q()),lu(e,t)}},on=function(){return D},sn=function(e,t){var n=D;try{return D=e,t()}finally{D=n}},$e=function(e,t,n){switch(t){case`input`:if(Ae(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=na(i);if(!a)throw Error(r(90));Te(i),Ae(i,a)}}}break;case`textarea`:Le(e,n);break;case`select`:t=n.value,t!=null&&Pe(e,!!n.multiple,t,!1)}},at=Cl,ot=wl;var yu={usingClientEntryPoint:!1,Events:[ea,ta,na,rt,it,Cl]},bu={findFiberByHostInstance:$i,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},xu={bundleType:bu.bundleType,version:bu.version,rendererPackageName:bu.rendererPackageName,rendererConfig:bu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=wt(e),e===null?null:e.stateNode},findFiberByHostInstance:bu.findFiberByHostInstance||uu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Su=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Su.isDisabled&&Su.supportsFiber)try{It=Su.inject(xu),Lt=Su}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yu,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!mu(t))throw Error(r(200));return ru(e,t,null,n)},e.createRoot=function(e,t){if(!mu(e))throw Error(r(299));var n=!1,i=``,a=du;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=nu(e,1,!1,null,null,n,!1,i,a),e[Yi]=t.current,Ci(e.nodeType===8?e.parentNode:e),new fu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=wt(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return wl(e)},e.hydrate=function(e,t,n){if(!hu(t))throw Error(r(200));return vu(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!mu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=du;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=au(t,null,e,1,n??null,a,!1,o,s),e[Yi]=t.current,Ci(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new pu(t)},e.render=function(e,t,n){if(!hu(t))throw Error(r(200));return vu(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!hu(e))throw Error(r(40));return e._reactRootContainer?(wl(function(){vu(null,null,e,!1,function(){e._reactRootContainer=null,e[Yi]=null})}),!0):!1},e.unstable_batchedUpdates=Cl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!hu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return vu(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=m();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),g=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),_=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),v={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},y=c(u()),b=(0,y.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,y.createElement)(`svg`,{ref:c,...v,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:_(`lucide`,i),...s},[...o.map(([e,t])=>(0,y.createElement)(e,t)),...Array.isArray(a)?a:[a]])),ee=(e,t)=>{let n=(0,y.forwardRef)(({className:n,...r},i)=>(0,y.createElement)(b,{ref:i,iconNode:t,className:_(`lucide-${g(e)}`,n),...r}));return n.displayName=`${e}`,n},te=ee(`ExternalLink`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),x=ee(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ne=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},re=(e=>e?ne(e):ne),ie=e=>e;function ae(e,t=ie){let n=y.useSyncExternalStore(e.subscribe,y.useCallback(()=>t(e.getState()),[e,t]),y.useCallback(()=>t(e.getInitialState()),[e,t]));return y.useDebugValue(n),n}var oe=e=>{let t=re(e),n=e=>ae(t,e);return Object.assign(n,t),n},se=(e=>e?oe(e):oe),ce=h(),le=(e=null)=>({baseUrl:e,agents:[],sessions:[],connectionState:`loading`,offlineReason:null,currentView:{state:`idle`,title:`NextClaw`,subtitle:`Starting companion`,openUrl:e??`http://127.0.0.1:55667`}}),S=se(e=>({snapshot:le(),setSnapshot:t=>{e({snapshot:t})},reset:()=>{e({snapshot:le()})}})),ue=()=>({baseUrl:`http://127.0.0.1:55667`,bootstrapped:!1}),C=se(e=>({snapshot:ue(),setSnapshot:t=>{e({snapshot:t})},reset:()=>{e({snapshot:ue()})}})),de=o((e=>{var t=u(),n=Symbol.for(`react.element`),r=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(e,t,o){var s,c={},l=null,u=null;for(s in o!==void 0&&(l=``+o),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)r.call(t,s)&&!a.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:i.current}}e.jsx=o,e.jsxs=o})),w=o(((e,t)=>{t.exports=de()}))(),fe=(0,y.createContext)(null);function pe({presenter:e,children:t}){return(0,w.jsx)(fe.Provider,{value:e,children:t})}function T(){let e=(0,y.useContext)(fe);if(!e)throw Error(`usePresenter must be used inside CompanionPresenterProvider`);return e}function me(){let e=T(),t=S(e=>e.snapshot.currentView),n=S(e=>e.snapshot.connectionState),r=C(e=>e.snapshot.bootstrapped),i=n===`running`?`bg-success`:n===`offline`?`bg-danger`:`bg-slate-300`;return(0,w.jsx)(`div`,{className:`h-screen w-screen overflow-hidden bg-transparent`,children:(0,w.jsx)(`div`,{className:`grid h-full place-items-center`,children:(0,w.jsxs)(`div`,{className:`grid w-[112px] justify-items-center gap-2`,children:[(0,w.jsxs)(`div`,{className:`drag-region relative grid h-24 w-24 place-items-center overflow-hidden rounded-[28px] border border-white/70 bg-white/90 shadow-companion backdrop-blur-xl`,children:[(0,w.jsxs)(`div`,{className:`no-drag absolute right-1.5 top-1.5 z-20 flex gap-1`,children:[(0,w.jsx)(`button`,{type:`button`,"aria-label":`Open NextClaw`,onClick:()=>void e.companionShellManager.open(),className:`grid h-5 w-5 place-items-center rounded-full bg-slate-900/10 text-slate-700 transition hover:bg-slate-900/15`,children:(0,w.jsx)(te,{className:`h-3 w-3`})}),(0,w.jsx)(`button`,{type:`button`,"aria-label":`Quit Companion`,onClick:()=>void e.companionShellManager.quit(),className:`grid h-5 w-5 place-items-center rounded-full bg-slate-900/10 text-slate-700 transition hover:bg-slate-900/15`,children:(0,w.jsx)(x,{className:`h-3 w-3`})})]}),t.avatarUrl?(0,w.jsx)(`img`,{src:t.avatarUrl,alt:``,className:`h-full w-full object-cover`}):(0,w.jsx)(`span`,{className:`grid h-full w-full place-items-center bg-gradient-to-b from-white to-slate-200 text-[28px] font-bold text-slate-800`,children:(t.title||`NC`).slice(0,2).toUpperCase()}),(0,w.jsx)(`span`,{className:`absolute bottom-2 right-2 h-3.5 w-3.5 rounded-full border-2 border-white ${i}`})]}),(0,w.jsxs)(`button`,{type:`button`,onClick:()=>void e.companionShellManager.open(),className:`no-drag w-full rounded-xl px-1 text-center`,children:[(0,w.jsx)(`div`,{className:`truncate text-[12px] font-semibold leading-4 text-slate-900`,children:r?t.title:`NextClaw`}),(0,w.jsx)(`div`,{className:`truncate pt-0.5 text-[11px] leading-4 text-slate-500`,children:r?t.subtitle:`Connecting`})]})]})})})}function he(){let e=T();return(0,y.useEffect)(()=>(e.bootstrap(),()=>{e.shutdown()}),[e]),(0,w.jsx)(me,{})}var ge=`modulepreload`,_e=function(e){return`/`+e},ve={},ye=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=_e(t,n),t in ve)return;ve[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:ge,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},be=class{client=null;constructor(e){this.baseUrl=e}listAgents=async()=>await this.ensureClient().agents.list();listSessions=async()=>await this.ensureClient().sessions.list();subscribeToSessions=(e,t)=>this.ensureClient().sessions.subscribe(e,t);resolveAvatarUrl=e=>`${this.baseUrl}/api/agents/${encodeURIComponent(e)}/avatar`;ensureClient=()=>{if(this.client)return this.client;throw Error(`Companion runtime client has not been initialized.`)};initialize=async()=>{this.client||=new(await(ye(()=>import(`./dist-DXDLJQj-.js`),[]))).NextClawClient({baseUrl:this.baseUrl})}},xe=class{clientService=null;baseUrl=null;refreshTimer=null;subscription=null;started=!1;start=async e=>{this.started&&this.baseUrl===e||(this.stop(),this.baseUrl=e,this.clientService=new be(e),await this.clientService.initialize(),S.getState().setSnapshot(le(e)),await this.refresh(),this.subscription=this.ensureClientService().subscribeToSessions(async()=>{await this.refresh()},{reconnectDelayMs:1e3,onError:async()=>{await this.refresh()}}),this.refreshTimer=setInterval(()=>{this.refresh()},1e4),this.started=!0)};stop=()=>{this.subscription?.close(),this.subscription=null,this.refreshTimer!==null&&(clearInterval(this.refreshTimer),this.refreshTimer=null),this.clientService=null,this.baseUrl=null,this.started=!1,S.getState().reset()};getSnapshot=()=>S.getState().snapshot;syncRuntimeSnapshot=({agents:e,sessions:t})=>{let n=this.ensureBaseUrl(),r=this.resolveCurrentView({baseUrl:n,agents:e,sessions:t}),i={baseUrl:n,agents:e,sessions:t,connectionState:r.state===`running`?`running`:`idle`,offlineReason:null,currentView:r};return S.getState().setSnapshot(i),i};applyOfflineState=e=>{let t=this.baseUrl??S.getState().snapshot.baseUrl??`http://127.0.0.1:55667`,n={baseUrl:t,agents:[],sessions:[],connectionState:`offline`,offlineReason:e??null,currentView:{state:`offline`,title:`NextClaw`,subtitle:e?.summary?.trim()||`Runtime unavailable`,openUrl:t}};return S.getState().setSnapshot(n),n};refresh=async()=>{try{let[e,t]=await Promise.all([this.ensureClientService().listAgents(),this.ensureClientService().listSessions()]);this.syncRuntimeSnapshot({agents:e,sessions:t.sessions})}catch(e){this.applyOfflineState(e instanceof Error?{summary:this.summarizeOfflineError(e.message)}:void 0)}};ensureClientService=()=>(this.clientService||=new be(this.ensureBaseUrl()),this.clientService);ensureBaseUrl=()=>{if(!this.baseUrl)throw Error(`CompanionRuntimeManager baseUrl has not been initialized.`);return this.baseUrl};resolveCurrentView=({baseUrl:e,agents:t,sessions:n})=>{let r=[...n].filter(e=>e.status===`running`).sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt))[0];if(!r)return{state:`idle`,title:`NextClaw`,subtitle:`No active agent`,openUrl:e};let i=t.find(e=>e.id===r.agentId)??null;return{state:`running`,title:i?.displayName?.trim()||r.agentId||`Active Agent`,subtitle:r.sessionId,avatarUrl:r.agentId?i?.avatarUrl?.trim()||this.ensureClientService().resolveAvatarUrl(r.agentId):void 0,sessionId:r.sessionId,agentId:r.agentId,openUrl:e}};summarizeOfflineError=e=>{if(/fetch failed/i.test(e))return`Cannot reach runtime`;if(/timed out/i.test(e))return`Runtime timeout`;let t=e.trim();return t.length>28?`${t.slice(0,25)}...`:t||`Runtime unavailable`}},Se=class{bootstrap=async()=>{let e={baseUrl:(await window.nextclawCompanion.getBootstrap()).baseUrl,bootstrapped:!0};return C.getState().setSnapshot(e),e};open=async()=>{await window.nextclawCompanion.open()};quit=async()=>{await window.nextclawCompanion.quit()}},Ce=new class{companionRuntimeManager=new xe;companionShellManager=new Se;bootstrapPromise=null;bootstrapped=!1;bootstrap=async()=>{if(!this.bootstrapped){if(this.bootstrapPromise)return await this.bootstrapPromise;this.bootstrapPromise=(async()=>{let e=await this.companionShellManager.bootstrap();await this.companionRuntimeManager.start(e.baseUrl),this.bootstrapped=!0})();try{await this.bootstrapPromise}finally{this.bootstrapPromise=null}}};shutdown=()=>{this.companionRuntimeManager.stop(),this.bootstrapped=!1,this.bootstrapPromise=null}};(0,ce.createRoot)(document.getElementById(`root`)).render((0,w.jsx)(y.StrictMode,{children:(0,w.jsx)(pe,{presenter:Ce,children:(0,w.jsx)(he,{})})}));
8
+ `+e.stack}return{value:e,source:t,stack:i,digest:null}}function Fs(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Is(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Ls=typeof WeakMap==`function`?WeakMap:Map;function Rs(e,t,n){n=ho(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){il||(il=!0,al=r),Is(e,t)},n}function zs(e,t,n){n=ho(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Is(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Is(e,t),typeof r!=`function`&&(ol===null?ol=new Set([this]):ol.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Bs(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ls;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=zl.bind(null,e,t,n),t.then(e,e))}function Vs(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null?!0:t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Hs(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ho(-1,1),t.tag=2,go(n,t,1))),n.lanes|=1),e)}var Us=x.ReactCurrentOwner,B=!1;function V(e,t,n,r){t.child=e===null?Za(t,null,n,r):Xa(t,e.child,n,r)}function Ws(e,t,n,r,i){n=n.render;var a=t.ref;return ao(t,i),r=Vo(e,t,n,r,a,i),n=Ho(),e!==null&&!B?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,uc(e,t,i)):(P&&n&&ja(t),t.flags|=1,V(e,t,r,i),t.child)}function Gs(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ql(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Ks(e,t,a,r,i)):(e=Xl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Wr:n,n(o,r)&&e.ref===t.ref)return uc(e,t,i)}return t.flags|=1,e=Yl(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ks(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Wr(a,r)&&e.ref===t.ref)if(B=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(B=!0);else return t.lanes=e.lanes,uc(e,t,i)}return Ys(e,t,n,r,i)}function qs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},A(Yc,Jc),Jc|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,A(Yc,Jc),Jc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,A(Yc,Jc),Jc|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),A(Yc,Jc),Jc|=r;return V(e,t,i,n),t.child}function Js(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ys(e,t,n,r,i){var a=N(n)?sa:j.current;return a=ca(t,a),ao(t,i),n=Vo(e,t,n,r,a,i),r=Ho(),e!==null&&!B?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,uc(e,t,i)):(P&&r&&ja(t),t.flags|=1,V(e,t,n,i),t.child)}function Xs(e,t,n,r,i){if(N(n)){var a=!0;fa(t)}else a=!1;if(ao(t,i),t.stateNode===null)lc(e,t),js(t,n,r),Ns(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=oo(l):(l=N(n)?sa:j.current,l=ca(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Ms(t,o,r,l),fo=!1;var f=t.memoizedState;o.state=f,yo(t,r,o,i),c=t.memoizedState,s!==r||f!==c||M.current||fo?(typeof u==`function`&&(Os(t,n,u,r),c=t.memoizedState),(s=fo||As(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,mo(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Ds(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=oo(c):(c=N(n)?sa:j.current,c=ca(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Ms(t,o,r,c),fo=!1,f=t.memoizedState,o.state=f,yo(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||M.current||fo?(typeof p==`function`&&(Os(t,n,p,r),m=t.memoizedState),(l=fo||As(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Zs(e,t,n,r,a,i)}function Zs(e,t,n,r,i,a){Js(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&pa(t,n,!1),uc(e,t,a);r=t.stateNode,Us.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Xa(t,e.child,null,a),t.child=Xa(t,null,s,a)):V(e,t,s,a),t.memoizedState=r.state,i&&pa(t,n,!0),t.child}function Qs(e){var t=e.stateNode;t.pendingContext?ua(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ua(e,t.context,!1),Eo(e,t.containerInfo)}function $s(e,t,n,r,i){return Ua(),Wa(i),t.flags|=256,V(e,t,n,r),t.child}var ec={dehydrated:null,treeContext:null,retryLane:0};function tc(e){return{baseLanes:e,cachePool:null,transitions:null}}function nc(e,t,n){var r=t.pendingProps,i=F.current,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!=0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),A(F,i&1),e===null)return za(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data===`$!`?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Ql(o,r,0,null),e=Zl(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=tc(n),t.memoizedState=ec,e):rc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return ac(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Yl(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=Zl(a,o,n,null),a.flags|=2):a=Yl(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?tc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=ec,r}return a=e.child,e=a.sibling,r=Yl(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function rc(e,t){return t=Ql({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function ic(e,t,n,r){return r!==null&&Wa(r),Xa(t,e.child,null,n),e=rc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ac(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Fs(Error(r(422))),ic(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=Ql({mode:`visible`,children:i.children},a,0,null),o=Zl(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Xa(t,e.child,null,s),t.child.memoizedState=tc(s),t.memoizedState=ec,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return ic(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Fs(o,i,void 0),ic(e,t,s,i)}if(c=(s&e.childLanes)!==0,B||c){if(i=q,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,uo(e,a),hl(i,e,a,-1))}return kl(),i=Fs(Error(r(421))),ic(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=Vl.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Pa=Wi(a.nextSibling),Na=t,P=!0,Fa=null,e!==null&&(wa[Ta++]=Da,wa[Ta++]=Oa,wa[Ta++]=Ea,Da=e.id,Oa=e.overflow,Ea=t),t=rc(t,i.children),t.flags|=4096,t)}function oc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),io(e.return,t,n)}function sc(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function cc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(V(e,t,r.children,n),r=F.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&oc(e,n,t);else if(e.tag===19)oc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(A(F,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ao(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),sc(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ao(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}sc(t,!0,n,null,a);break;case`together`:sc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function lc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function uc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Zc|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=Yl(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Yl(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function dc(e,t,n){switch(t.tag){case 3:Qs(t),Ua();break;case 5:Oo(t);break;case 1:N(t.type)&&fa(t);break;case 4:Eo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;A(Qa,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(A(F,F.current&1),e=uc(e,t,n),e===null?null:e.sibling):nc(e,t,n):(A(F,F.current&1),t.flags|=128,null);A(F,F.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return cc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),A(F,F.current),r)break;return null;case 22:case 23:return t.lanes=0,qs(e,t,n)}return uc(e,t,n)}var fc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},pc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,To(So.current);var o=null;switch(n){case`input`:i=De(e,i),r=De(e,r),o=[];break;case`select`:i=T({},i,{value:void 0}),r=T({},r,{value:void 0}),o=[];break;case`textarea`:i=Fe(e,i),r=Fe(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Pi)}Ye(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&O(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},mc=function(e,t,n,r){n!==r&&(t.flags|=4)};function hc(e,t){if(!P)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function H(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function gc(e,t,n){var i=t.pendingProps;switch(Ma(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return H(t),null;case 1:return N(t.type)&&la(),H(t),null;case 3:return i=t.stateNode,Do(),k(M),k(j),Mo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Va(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Fa!==null&&(yl(Fa),Fa=null))),H(t),null;case 5:ko(t);var o=To(wo.current);if(n=t.type,e!==null&&t.stateNode!=null)pc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return H(t),null}if(e=To(So.current),Va(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[qi]=t,i[Ji]=s,e=(t.mode&1)!=0,n){case`dialog`:O(`cancel`,i),O(`close`,i);break;case`iframe`:case`object`:case`embed`:O(`load`,i);break;case`video`:case`audio`:for(o=0;o<_i.length;o++)O(_i[o],i);break;case`source`:O(`error`,i);break;case`img`:case`image`:case`link`:O(`error`,i),O(`load`,i);break;case`details`:O(`toggle`,i);break;case`input`:Oe(i,s),O(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},O(`invalid`,i);break;case`textarea`:Ie(i,s),O(`invalid`,i)}for(var c in Ye(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Ni(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Ni(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&O(`scroll`,i)}switch(n){case`input`:we(i),je(i,s,!0);break;case`textarea`:we(i),Re(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Pi)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=ze(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[qi]=t,e[Ji]=i,fc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Xe(n,i),n){case`dialog`:O(`cancel`,e),O(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:O(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<_i.length;o++)O(_i[o],e);o=i;break;case`source`:O(`error`,e),o=i;break;case`img`:case`image`:case`link`:O(`error`,e),O(`load`,e),o=i;break;case`details`:O(`toggle`,e),o=i;break;case`input`:Oe(e,i),o=De(e,i),O(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=T({},i,{value:void 0}),O(`invalid`,e);break;case`textarea`:Ie(e,i),o=Fe(e,i),O(`invalid`,e);break;default:o=i}for(s in Ye(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?qe(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&He(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Ue(e,u):typeof u==`number`&&Ue(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&O(`scroll`,e):u!=null&&te(e,s,u,c))}switch(n){case`input`:we(e),je(e,i,!1);break;case`textarea`:we(e),Re(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+xe(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&Pe(e,!!i.multiple,i.defaultValue,!0):Pe(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=Pi)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return H(t),null;case 6:if(e&&t.stateNode!=null)mc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=To(wo.current),To(So.current),Va(t)){if(i=t.stateNode,n=t.memoizedProps,i[qi]=t,(s=i.nodeValue!==n)&&(e=Na,e!==null))switch(e.tag){case 3:Ni(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ni(i.nodeValue,n,(e.mode&1)!=0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[qi]=t,t.stateNode=i}return H(t),null;case 13:if(k(F),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(P&&Pa!==null&&t.mode&1&&!(t.flags&128))Ha(),Ua(),t.flags|=98560,s=!1;else if(s=Va(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[qi]=t}else Ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),s=!1}else Fa!==null&&(yl(Fa),Fa=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||F.current&1?X===0&&(X=3):kl())),t.updateQueue!==null&&(t.flags|=4),H(t),null);case 4:return Do(),e===null&&Ci(t.stateNode.containerInfo),H(t),null;case 10:return ro(t.type._context),H(t),null;case 17:return N(t.type)&&la(),H(t),null;case 19:if(k(F),s=t.memoizedState,s===null)return H(t),null;if(i=(t.flags&128)!=0,c=s.rendering,c===null)if(i)hc(s,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Ao(e),c!==null){for(t.flags|=128,hc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return A(F,F.current&1|2),t.child}e=e.sibling}s.tail!==null&&E()>nl&&(t.flags|=128,i=!0,hc(s,!1),t.lanes=4194304)}else{if(!i)if(e=Ao(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),hc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!P)return H(t),null}else 2*E()-s.renderingStartTime>nl&&n!==1073741824&&(t.flags|=128,i=!0,hc(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(H(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=E(),t.sibling=null,n=F.current,A(F,i?n&1|2:n&1),t);case 22:case 23:return Tl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Jc&1073741824&&(H(t),t.subtreeFlags&6&&(t.flags|=8192)):H(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function _c(e,t){switch(Ma(t),t.tag){case 1:return N(t.type)&&la(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Do(),k(M),k(j),Mo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ko(t),null;case 13:if(k(F),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return k(F),null;case 4:return Do(),null;case 10:return ro(t.type._context),null;case 22:case 23:return Tl(),null;case 24:return null;default:return null}}var vc=!1,U=!1,yc=typeof WeakSet==`function`?WeakSet:Set,W=null;function bc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){$(e,t,n)}else n.current=null}function xc(e,t,n){try{n()}catch(n){$(e,t,n)}}var Sc=!1;function Cc(e,t){if(Fi=Dn,e=Jr(),Yr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Ii={focusedElem:e,selectionRange:n},Dn=!1,W=t;W!==null;)if(t=W,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,W=e;else for(;W!==null;){t=W;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Ds(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){$(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return h=Sc,Sc=!1,h}function wc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&xc(t,n,a)}i=i.next}while(i!==r)}}function Tc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ec(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Dc(e){var t=e.alternate;t!==null&&(e.alternate=null,Dc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[qi],delete t[Ji],delete t[Xi],delete t[Zi],delete t[Qi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Oc(e){return e.tag===5||e.tag===3||e.tag===4}function kc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Oc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ac(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Pi));else if(r!==4&&(e=e.child,e!==null))for(Ac(e,t,n),e=e.sibling;e!==null;)Ac(e,t,n),e=e.sibling}function jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(jc(e,t,n),e=e.sibling;e!==null;)jc(e,t,n),e=e.sibling}var G=null,Mc=!1;function Nc(e,t,n){for(n=n.child;n!==null;)Pc(e,t,n),n=n.sibling}function Pc(e,t,n){if(Lt&&typeof Lt.onCommitFiberUnmount==`function`)try{Lt.onCommitFiberUnmount(It,n)}catch{}switch(n.tag){case 5:U||bc(n,t);case 6:var r=G,i=Mc;G=null,Nc(e,t,n),G=r,Mc=i,G!==null&&(Mc?(e=G,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):G.removeChild(n.stateNode));break;case 18:G!==null&&(Mc?(e=G,n=n.stateNode,e.nodeType===8?Ui(e.parentNode,n):e.nodeType===1&&Ui(e,n),Tn(e)):Ui(G,n.stateNode));break;case 4:r=G,i=Mc,G=n.stateNode.containerInfo,Mc=!0,Nc(e,t,n),G=r,Mc=i;break;case 0:case 11:case 14:case 15:if(!U&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&xc(n,t,o),i=i.next}while(i!==r)}Nc(e,t,n);break;case 1:if(!U&&(bc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){$(n,t,e)}Nc(e,t,n);break;case 21:Nc(e,t,n);break;case 22:n.mode&1?(U=(r=U)||n.memoizedState!==null,Nc(e,t,n),U=r):Nc(e,t,n);break;default:Nc(e,t,n)}}function Fc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new yc),t.forEach(function(t){var r=Hl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Ic(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:G=c.stateNode,Mc=!1;break a;case 3:G=c.stateNode.containerInfo,Mc=!0;break a;case 4:G=c.stateNode.containerInfo,Mc=!0;break a}c=c.return}if(G===null)throw Error(r(160));Pc(o,s,a),G=null,Mc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){$(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Lc(t,e),t=t.sibling}function Lc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ic(t,e),Rc(e),i&4){try{wc(3,e,e.return),Tc(3,e)}catch(t){$(e,e.return,t)}try{wc(5,e,e.return)}catch(t){$(e,e.return,t)}}break;case 1:Ic(t,e),Rc(e),i&512&&n!==null&&bc(n,n.return);break;case 5:if(Ic(t,e),Rc(e),i&512&&n!==null&&bc(n,n.return),e.flags&32){var a=e.stateNode;try{Ue(a,``)}catch(t){$(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&ke(a,o),Xe(c,s);var u=Xe(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?qe(a,f):d===`dangerouslySetInnerHTML`?He(a,f):d===`children`?Ue(a,f):te(a,d,f,u)}switch(c){case`input`:Ae(a,o);break;case`textarea`:Le(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?Pe(a,!!o.multiple,o.multiple?[]:``,!1):Pe(a,!!o.multiple,o.defaultValue,!0)):Pe(a,!!o.multiple,m,!1)}a[Ji]=o}catch(t){$(e,e.return,t)}}break;case 6:if(Ic(t,e),Rc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){$(e,e.return,t)}}break;case 3:if(Ic(t,e),Rc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{Tn(t.containerInfo)}catch(t){$(e,e.return,t)}break;case 4:Ic(t,e),Rc(e);break;case 13:Ic(t,e),Rc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(tl=E())),i&4&&Fc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(U=(u=U)||d,Ic(t,e),U=u):Ic(t,e),Rc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(W=e,d=e.child;d!==null;){for(f=W=d;W!==null;){switch(p=W,m=p.child,p.tag){case 0:case 11:case 14:case 15:wc(4,p,p.return);break;case 1:bc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){$(i,n,e)}}break;case 5:bc(p,p.return);break;case 22:if(p.memoizedState!==null){Hc(f);continue}}m===null?Hc(f):(m.return=p,W=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Ke(`display`,s))}catch(t){$(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){$(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ic(t,e),Rc(e),i&4&&Fc(e);break;case 21:break;default:Ic(t,e),Rc(e)}}function Rc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Oc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Ue(a,``),i.flags&=-33),jc(e,kc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Ac(e,kc(e),o);break;default:throw Error(r(161))}}catch(t){$(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zc(e,t,n){W=e,Bc(e,t,n)}function Bc(e,t,n){for(var r=(e.mode&1)!=0;W!==null;){var i=W,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||vc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||U;s=vc;var l=U;if(vc=o,(U=c)&&!l)for(W=i;W!==null;)o=W,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Uc(i):(c.return=o,W=c);for(;a!==null;)W=a,Bc(a,t,n),a=a.sibling;W=i,vc=s,U=l}Vc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,W=a):Vc(e,t,n)}}function Vc(e){for(;W!==null;){var t=W;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:U||Tc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!U)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Ds(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&bo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}bo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Tn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}U||t.flags&512&&Ec(t)}catch(e){$(t,t.return,e)}}if(t===e){W=null;break}if(n=t.sibling,n!==null){n.return=t.return,W=n;break}W=t.return}}function Hc(e){for(;W!==null;){var t=W;if(t===e){W=null;break}var n=t.sibling;if(n!==null){n.return=t.return,W=n;break}W=t.return}}function Uc(e){for(;W!==null;){var t=W;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Tc(4,t)}catch(e){$(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){$(t,i,e)}}var a=t.return;try{Ec(t)}catch(e){$(t,a,e)}break;case 5:var o=t.return;try{Ec(t)}catch(e){$(t,o,e)}}}catch(e){$(t,t.return,e)}if(t===e){W=null;break}var s=t.sibling;if(s!==null){s.return=t.return,W=s;break}W=t.return}}var Wc=Math.ceil,Gc=x.ReactCurrentDispatcher,Kc=x.ReactCurrentOwner,qc=x.ReactCurrentBatchConfig,K=0,q=null,J=null,Y=0,Jc=0,Yc=aa(0),X=0,Xc=null,Zc=0,Qc=0,$c=0,el=null,Z=null,tl=0,nl=1/0,rl=null,il=!1,al=null,ol=null,sl=!1,cl=null,ll=0,ul=0,dl=null,fl=-1,pl=0;function Q(){return K&6?E():fl===-1?fl=E():fl}function ml(e){return e.mode&1?K&2&&Y!==0?Y&-Y:Ga.transition===null?(e=D,e===0?(e=window.event,e=e===void 0?16:Nn(e.type),e):e):(pl===0&&(pl=Xt()),pl):1}function hl(e,t,n,i){if(50<ul)throw ul=0,dl=null,Error(r(185));Qt(e,n,i),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(Qc|=n),X===4&&xl(e,Y)),gl(e,i),n===1&&K===0&&!(t.mode&1)&&(nl=E()+500,ha&&ya()))}function gl(e,t){var n=e.callbackNode;Jt(e,t);var r=Kt(e,e===q?Y:0);if(r===0)n!==null&&Dt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Dt(n),t===1)e.tag===0?va(Sl.bind(null,e)):_a(Sl.bind(null,e)),Vi(function(){!(K&6)&&ya()}),n=null;else{switch(tn(r)){case 1:n=jt;break;case 4:n=Mt;break;case 16:n=Nt;break;case 536870912:n=Ft;break;default:n=Nt}n=Wl(n,_l.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function _l(e,t){if(fl=-1,pl=0,K&6)throw Error(r(327));var n=e.callbackNode;if(Ll()&&e.callbackNode!==n)return null;var i=Kt(e,e===q?Y:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Al(e,i);else{t=i;var a=K;K|=2;var o=Ol();(q!==e||Y!==t)&&(rl=null,nl=E()+500,El(e,t));do try{Ml();break}catch(t){Dl(e,t)}while(1);no(),Gc.current=o,K=a,J===null?(q=null,Y=0,t=X):t=0}if(t!==0){if(t===2&&(a=Yt(e),a!==0&&(i=a,t=vl(e,a))),t===1)throw n=Xc,El(e,0),xl(e,i),gl(e,E()),n;if(t===6)xl(e,i);else{if(a=e.current.alternate,!(i&30)&&!bl(a)&&(t=Al(e,i),t===2&&(o=Yt(e),o!==0&&(i=o,t=vl(e,o))),t===1))throw n=Xc,El(e,0),xl(e,i),gl(e,E()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Fl(e,Z,rl);break;case 3:if(xl(e,i),(i&130023424)===i&&(t=tl+500-E(),10<t)){if(Kt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){Q(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Ri(Fl.bind(null,e,Z,rl),t);break}Fl(e,Z,rl);break;case 4:if(xl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-zt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=E()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Wc(i/1960))-i,10<i){e.timeoutHandle=Ri(Fl.bind(null,e,Z,rl),i);break}Fl(e,Z,rl);break;case 5:Fl(e,Z,rl);break;default:throw Error(r(329))}}}return gl(e,E()),e.callbackNode===n?_l.bind(null,e):null}function vl(e,t){var n=el;return e.current.memoizedState.isDehydrated&&(El(e,t).flags|=256),e=Al(e,t),e!==2&&(t=Z,Z=n,t!==null&&yl(t)),e}function yl(e){Z===null?Z=e:Z.push.apply(Z,e)}function bl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ur(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xl(e,t){for(t&=~$c,t&=~Qc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-zt(t),r=1<<n;e[n]=-1,t&=~r}}function Sl(e){if(K&6)throw Error(r(327));Ll();var t=Kt(e,0);if(!(t&1))return gl(e,E()),null;var n=Al(e,t);if(e.tag!==0&&n===2){var i=Yt(e);i!==0&&(t=i,n=vl(e,i))}if(n===1)throw n=Xc,El(e,0),xl(e,t),gl(e,E()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fl(e,Z,rl),gl(e,E()),null}function Cl(e,t){var n=K;K|=1;try{return e(t)}finally{K=n,K===0&&(nl=E()+500,ha&&ya())}}function wl(e){cl!==null&&cl.tag===0&&!(K&6)&&Ll();var t=K;K|=1;var n=qc.transition,r=D;try{if(qc.transition=null,D=1,e)return e()}finally{D=r,qc.transition=n,K=t,!(K&6)&&ya()}}function Tl(){Jc=Yc.current,k(Yc)}function El(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,zi(n)),J!==null)for(n=J.return;n!==null;){var r=n;switch(Ma(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&la();break;case 3:Do(),k(M),k(j),Mo();break;case 5:ko(r);break;case 4:Do();break;case 13:k(F);break;case 19:k(F);break;case 10:ro(r.type._context);break;case 22:case 23:Tl()}n=n.return}if(q=e,J=e=Yl(e.current,null),Y=Jc=t,X=0,Xc=null,$c=Qc=Zc=0,Z=el=null,so!==null){for(t=0;t<so.length;t++)if(n=so[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}so=null}return e}function Dl(e,t){do{var n=J;try{if(no(),No.current=Cs,Io){for(var i=I.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Io=!1}if(Fo=0,R=L=I=null,Lo=!1,Ro=0,Kc.current=null,n===null||n.return===null){X=1,Xc=t,J=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=Y,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Vs(s);if(m!==null){m.flags&=-257,Hs(m,s,c,o,t),m.mode&1&&Bs(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}else{if(!(t&1)){Bs(o,u,t),kl();break a}l=Error(r(426))}}else if(P&&c.mode&1){var _=Vs(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Hs(_,s,c,o,t),Wa(Ps(l,c));break a}}o=l=Ps(l,c),X!==4&&(X=2),el===null?el=[o]:el.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Rs(o,l,t);vo(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(ol===null||!ol.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var ee=zs(o,c,t);vo(o,ee);break a}}o=o.return}while(o!==null)}Pl(n)}catch(e){t=e,J===n&&n!==null&&(J=n=n.return);continue}break}while(1)}function Ol(){var e=Gc.current;return Gc.current=Cs,e===null?Cs:e}function kl(){(X===0||X===3||X===2)&&(X=4),q===null||!(Zc&268435455)&&!(Qc&268435455)||xl(q,Y)}function Al(e,t){var n=K;K|=2;var i=Ol();(q!==e||Y!==t)&&(rl=null,El(e,t));do try{jl();break}catch(t){Dl(e,t)}while(1);if(no(),K=n,Gc.current=i,J!==null)throw Error(r(261));return q=null,Y=0,X}function jl(){for(;J!==null;)Nl(J)}function Ml(){for(;J!==null&&!Ot();)Nl(J)}function Nl(e){var t=Ul(e.alternate,e,Jc);e.memoizedProps=e.pendingProps,t===null?Pl(e):J=t,Kc.current=null}function Pl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=_c(n,t),n!==null){n.flags&=32767,J=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{X=6,J=null;return}}else if(n=gc(n,t,Jc),n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);X===0&&(X=5)}function Fl(e,t,n){var r=D,i=qc.transition;try{qc.transition=null,D=1,Il(e,t,n,r)}finally{qc.transition=i,D=r}return null}function Il(e,t,n,i){do Ll();while(cl!==null);if(K&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if($t(e,o),e===q&&(J=q=null,Y=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||sl||(sl=!0,Wl(Nt,function(){return Ll(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=qc.transition,qc.transition=null;var s=D;D=1;var c=K;K|=4,Kc.current=null,Cc(e,n),Lc(n,e),Xr(Ii),Dn=!!Fi,Ii=Fi=null,e.current=n,zc(n,e,a),kt(),K=c,D=s,qc.transition=o}else e.current=n;if(sl&&(sl=!1,cl=e,ll=a),o=e.pendingLanes,o===0&&(ol=null),Rt(n.stateNode,i),gl(e,E()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(il)throw il=!1,e=al,al=null,e;return ll&1&&e.tag!==0&&Ll(),o=e.pendingLanes,o&1?e===dl?ul++:(ul=0,dl=e):ul=0,ya(),null}function Ll(){if(cl!==null){var e=tn(ll),t=qc.transition,n=D;try{if(qc.transition=null,D=16>e?16:e,cl===null)var i=!1;else{if(e=cl,cl=null,ll=0,K&6)throw Error(r(331));var a=K;for(K|=4,W=e.current;W!==null;){var o=W,s=o.child;if(W.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(W=u;W!==null;){var d=W;switch(d.tag){case 0:case 11:case 15:wc(8,d,o)}var f=d.child;if(f!==null)f.return=d,W=f;else for(;W!==null;){d=W;var p=d.sibling,m=d.return;if(Dc(d),d===u){W=null;break}if(p!==null){p.return=m,W=p;break}W=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}W=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,W=s;else b:for(;W!==null;){if(o=W,o.flags&2048)switch(o.tag){case 0:case 11:case 15:wc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,W=v;break b}W=o.return}}var y=e.current;for(W=y;W!==null;){s=W;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,W=b;else b:for(s=y;W!==null;){if(c=W,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Tc(9,c)}}catch(e){$(c,c.return,e)}if(c===s){W=null;break b}var ee=c.sibling;if(ee!==null){ee.return=c.return,W=ee;break b}W=c.return}}if(K=a,ya(),Lt&&typeof Lt.onPostCommitFiberRoot==`function`)try{Lt.onPostCommitFiberRoot(It,e)}catch{}i=!0}return i}finally{D=n,qc.transition=t}}return!1}function Rl(e,t,n){t=Ps(n,t),t=Rs(e,t,1),e=go(e,t,1),t=Q(),e!==null&&(Qt(e,1,t),gl(e,t))}function $(e,t,n){if(e.tag===3)Rl(e,e,n);else for(;t!==null;){if(t.tag===3){Rl(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ol===null||!ol.has(r))){e=Ps(n,e),e=zs(t,e,1),t=go(t,e,1),e=Q(),t!==null&&(Qt(t,1,e),gl(t,e));break}}t=t.return}}function zl(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Q(),e.pingedLanes|=e.suspendedLanes&n,q===e&&(Y&n)===n&&(X===4||X===3&&(Y&130023424)===Y&&500>E()-tl?El(e,0):$c|=n),gl(e,t)}function Bl(e,t){t===0&&(e.mode&1?(t=Wt,Wt<<=1,!(Wt&130023424)&&(Wt=4194304)):t=1);var n=Q();e=uo(e,t),e!==null&&(Qt(e,t,n),gl(e,n))}function Vl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bl(e,n)}function Hl(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Bl(e,n)}var Ul=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||M.current)B=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return B=!1,dc(e,t,n);B=!!(e.flags&131072)}else B=!1,P&&t.flags&1048576&&Aa(t,Ca,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;lc(e,t),e=t.pendingProps;var a=ca(t,j.current);ao(t,n),a=Vo(null,t,i,e,a,n);var o=Ho();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,N(i)?(o=!0,fa(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,po(t),a.updater=ks,t.stateNode=a,a._reactInternals=t,Ns(t,i,e,n),t=Zs(null,t,i,!0,o,n)):(t.tag=0,P&&o&&ja(t),V(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(lc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Jl(i),e=Ds(i,e),a){case 0:t=Ys(null,t,i,e,n);break a;case 1:t=Xs(null,t,i,e,n);break a;case 11:t=Ws(null,t,i,e,n);break a;case 14:t=Gs(null,t,i,Ds(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ds(i,a),Ys(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ds(i,a),Xs(e,t,i,a,n);case 3:a:{if(Qs(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,mo(e,t),yo(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Ps(Error(r(423)),t),t=$s(e,t,i,n,a);break a}else if(i!==a){a=Ps(Error(r(424)),t),t=$s(e,t,i,n,a);break a}else for(Pa=Wi(t.stateNode.containerInfo.firstChild),Na=t,P=!0,Fa=null,n=Za(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ua(),i===a){t=uc(e,t,n);break a}V(e,t,i,n)}t=t.child}return t;case 5:return Oo(t),e===null&&za(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Li(i,a)?s=null:o!==null&&Li(i,o)&&(t.flags|=32),Js(e,t),V(e,t,s,n),t.child;case 6:return e===null&&za(t),null;case 13:return nc(e,t,n);case 4:return Eo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Xa(t,null,i,n):V(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ds(i,a),Ws(e,t,i,a,n);case 7:return V(e,t,t.pendingProps,n),t.child;case 8:return V(e,t,t.pendingProps.children,n),t.child;case 12:return V(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,A(Qa,i._currentValue),i._currentValue=s,o!==null)if(Ur(o.value,s)){if(o.children===a.children&&!M.current){t=uc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=ho(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),io(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),io(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}V(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,ao(t,n),a=oo(a),i=i(a),t.flags|=1,V(e,t,i,n),t.child;case 14:return i=t.type,a=Ds(i,t.pendingProps),a=Ds(i.type,a),Gs(e,t,i,a,n);case 15:return Ks(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ds(i,a),lc(e,t),t.tag=1,N(i)?(e=!0,fa(t)):e=!1,ao(t,n),js(t,i,a),Ns(t,i,a,n),Zs(null,t,i,!0,e,n);case 19:return cc(e,t,n);case 22:return qs(e,t,n)}throw Error(r(156,t.tag))};function Wl(e,t){return Et(e,t)}function Gl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kl(e,t,n,r){return new Gl(e,t,n,r)}function ql(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jl(e){if(typeof e==`function`)return ql(e)?1:0;if(e!=null){if(e=e.$$typeof,e===le)return 11;if(e===C)return 14}return 2}function Yl(e,t){var n=e.alternate;return n===null?(n=Kl(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xl(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)ql(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case ie:return Zl(n.children,a,o,t);case ae:s=8,a|=8;break;case oe:return e=Kl(12,n,t,a|2),e.elementType=oe,e.lanes=o,e;case S:return e=Kl(13,n,t,a),e.elementType=S,e.lanes=o,e;case ue:return e=Kl(19,n,t,a),e.elementType=ue,e.lanes=o,e;case w:return Ql(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case se:s=10;break a;case ce:s=9;break a;case le:s=11;break a;case C:s=14;break a;case de:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=Kl(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function Zl(e,t,n,r){return e=Kl(7,e,r,t),e.lanes=n,e}function Ql(e,t,n,r){return e=Kl(22,e,r,t),e.elementType=w,e.lanes=n,e.stateNode={isHidden:!1},e}function $l(e,t,n){return e=Kl(6,e,null,t),e.lanes=n,e}function eu(e,t,n){return t=Kl(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zt(0),this.expirationTimes=Zt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function nu(e,t,n,r,i,a,o,s,c){return e=new tu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=Kl(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},po(a),e}function ru(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:re,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function iu(e){if(!e)return oa;e=e._reactInternals;a:{if(bt(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(N(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(N(n))return da(e,n,t)}return t}function au(e,t,n,r,i,a,o,s,c){return e=nu(n,r,!0,e,i,a,o,s,c),e.context=iu(null),n=e.current,r=Q(),i=ml(n),a=ho(r,i),a.callback=t??null,go(n,a,i),e.current.lanes=i,Qt(e,i,r),gl(e,r),e}function ou(e,t,n,r){var i=t.current,a=Q(),o=ml(i);return n=iu(n),t.context===null?t.context=n:t.pendingContext=n,t=ho(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=go(i,t,o),e!==null&&(hl(e,i,o,a),_o(e,i,o)),o}function su(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function cu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lu(e,t){cu(e,t),(e=e.alternate)&&cu(e,t)}function uu(){return null}var du=typeof reportError==`function`?reportError:function(e){console.error(e)};function fu(e){this._internalRoot=e}pu.prototype.render=fu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));ou(e,t,null,null)},pu.prototype.unmount=fu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;wl(function(){ou(null,e,null,null)}),t[Yi]=null}};function pu(e){this._internalRoot=e}pu.prototype.unstable_scheduleHydration=function(e){if(e){var t=on();e={blockedOn:null,target:e,priority:t};for(var n=0;n<hn.length&&t!==0&&t<hn[n].priority;n++);hn.splice(n,0,e),n===0&&bn(e)}};function mu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function hu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function gu(){}function _u(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=su(o);a.call(e)}}var o=au(t,r,e,0,null,!1,!1,``,gu);return e._reactRootContainer=o,e[Yi]=o.current,Ci(e.nodeType===8?e.parentNode:e),wl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=su(c);s.call(e)}}var c=nu(e,0,!1,null,null,!1,!1,``,gu);return e._reactRootContainer=c,e[Yi]=c.current,Ci(e.nodeType===8?e.parentNode:e),wl(function(){ou(t,c,n,r)}),c}function vu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=su(o);s.call(e)}}ou(t,o,e,i)}else o=_u(n,t,e,i,r);return su(o)}nn=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Gt(t.pendingLanes);n!==0&&(en(t,n|1),gl(t,E()),!(K&6)&&(nl=E()+500,ya()))}break;case 13:wl(function(){var t=uo(e,1);t!==null&&hl(t,e,1,Q())}),lu(e,1)}},rn=function(e){if(e.tag===13){var t=uo(e,134217728);t!==null&&hl(t,e,134217728,Q()),lu(e,134217728)}},an=function(e){if(e.tag===13){var t=ml(e),n=uo(e,t);n!==null&&hl(n,e,t,Q()),lu(e,t)}},on=function(){return D},sn=function(e,t){var n=D;try{return D=e,t()}finally{D=n}},$e=function(e,t,n){switch(t){case`input`:if(Ae(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=na(i);if(!a)throw Error(r(90));Te(i),Ae(i,a)}}}break;case`textarea`:Le(e,n);break;case`select`:t=n.value,t!=null&&Pe(e,!!n.multiple,t,!1)}},at=Cl,ot=wl;var yu={usingClientEntryPoint:!1,Events:[ea,ta,na,rt,it,Cl]},bu={findFiberByHostInstance:$i,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},xu={bundleType:bu.bundleType,version:bu.version,rendererPackageName:bu.rendererPackageName,rendererConfig:bu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=wt(e),e===null?null:e.stateNode},findFiberByHostInstance:bu.findFiberByHostInstance||uu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Su=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Su.isDisabled&&Su.supportsFiber)try{It=Su.inject(xu),Lt=Su}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yu,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!mu(t))throw Error(r(200));return ru(e,t,null,n)},e.createRoot=function(e,t){if(!mu(e))throw Error(r(299));var n=!1,i=``,a=du;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=nu(e,1,!1,null,null,n,!1,i,a),e[Yi]=t.current,Ci(e.nodeType===8?e.parentNode:e),new fu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=wt(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return wl(e)},e.hydrate=function(e,t,n){if(!hu(t))throw Error(r(200));return vu(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!mu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=du;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=au(t,null,e,1,n??null,a,!1,o,s),e[Yi]=t.current,Ci(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new pu(t)},e.render=function(e,t,n){if(!hu(t))throw Error(r(200));return vu(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!hu(e))throw Error(r(40));return e._reactRootContainer?(wl(function(){vu(null,null,e,!1,function(){e._reactRootContainer=null,e[Yi]=null})}),!0):!1},e.unstable_batchedUpdates=Cl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!hu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return vu(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=m();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),g=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),_=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),v={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},y=c(u()),b=(0,y.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,y.createElement)(`svg`,{ref:c,...v,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:_(`lucide`,i),...s},[...o.map(([e,t])=>(0,y.createElement)(e,t)),...Array.isArray(a)?a:[a]])),ee=(e,t)=>{let n=(0,y.forwardRef)(({className:n,...r},i)=>(0,y.createElement)(b,{ref:i,iconNode:t,className:_(`lucide-${g(e)}`,n),...r}));return n.displayName=`${e}`,n},te=ee(`ExternalLink`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),x=ee(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ne=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},re=(e=>e?ne(e):ne),ie=e=>e;function ae(e,t=ie){let n=y.useSyncExternalStore(e.subscribe,y.useCallback(()=>t(e.getState()),[e,t]),y.useCallback(()=>t(e.getInitialState()),[e,t]));return y.useDebugValue(n),n}var oe=e=>{let t=re(e),n=e=>ae(t,e);return Object.assign(n,t),n},se=(e=>e?oe(e):oe),ce=h(),le=(e=null)=>({baseUrl:e,agents:[],sessions:[],connectionState:`loading`,offlineReason:null,currentView:{state:`idle`,title:`NextClaw`,subtitle:`Starting companion`,openUrl:e??`http://127.0.0.1:55667`}}),S=se(e=>({snapshot:le(),setSnapshot:t=>{e({snapshot:t})},reset:()=>{e({snapshot:le()})}})),ue=()=>({baseUrl:`http://127.0.0.1:55667`,bootstrapped:!1}),C=se(e=>({snapshot:ue(),setSnapshot:t=>{e({snapshot:t})},reset:()=>{e({snapshot:ue()})}})),de=o((e=>{var t=u(),n=Symbol.for(`react.element`),r=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(e,t,o){var s,c={},l=null,u=null;for(s in o!==void 0&&(l=``+o),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)r.call(t,s)&&!a.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:i.current}}e.jsx=o,e.jsxs=o})),w=o(((e,t)=>{t.exports=de()}))(),fe=(0,y.createContext)(null);function pe({presenter:e,children:t}){return(0,w.jsx)(fe.Provider,{value:e,children:t})}function T(){let e=(0,y.useContext)(fe);if(!e)throw Error(`usePresenter must be used inside CompanionPresenterProvider`);return e}function me(){let e=T(),t=S(e=>e.snapshot.currentView),n=S(e=>e.snapshot.connectionState),r=C(e=>e.snapshot.bootstrapped),i=n===`running`?`bg-success`:n===`offline`?`bg-danger`:`bg-slate-300`;return(0,w.jsx)(`div`,{className:`h-screen w-screen overflow-hidden bg-transparent`,children:(0,w.jsx)(`div`,{className:`grid h-full place-items-center`,children:(0,w.jsxs)(`div`,{className:`grid w-[112px] justify-items-center gap-2`,children:[(0,w.jsxs)(`div`,{className:`drag-region relative grid h-24 w-24 place-items-center overflow-hidden rounded-[28px] border border-white/70 bg-white/90 shadow-companion backdrop-blur-xl`,children:[(0,w.jsxs)(`div`,{className:`no-drag absolute right-1.5 top-1.5 z-20 flex gap-1`,children:[(0,w.jsx)(`button`,{type:`button`,"aria-label":`Open NextClaw`,onClick:()=>void e.companionShellManager.open(),className:`grid h-5 w-5 place-items-center rounded-full bg-slate-900/10 text-slate-700 transition hover:bg-slate-900/15`,children:(0,w.jsx)(te,{className:`h-3 w-3`})}),(0,w.jsx)(`button`,{type:`button`,"aria-label":`Quit Companion`,onClick:()=>void e.companionShellManager.quit(),className:`grid h-5 w-5 place-items-center rounded-full bg-slate-900/10 text-slate-700 transition hover:bg-slate-900/15`,children:(0,w.jsx)(x,{className:`h-3 w-3`})})]}),t.avatarUrl?(0,w.jsx)(`img`,{src:t.avatarUrl,alt:``,className:`h-full w-full object-cover`}):(0,w.jsx)(`span`,{className:`grid h-full w-full place-items-center bg-gradient-to-b from-white to-slate-200 text-[28px] font-bold text-slate-800`,children:(t.title||`NC`).slice(0,2).toUpperCase()}),(0,w.jsx)(`span`,{className:`absolute bottom-2 right-2 h-3.5 w-3.5 rounded-full border-2 border-white ${i}`})]}),(0,w.jsxs)(`button`,{type:`button`,onClick:()=>void e.companionShellManager.open(),className:`no-drag w-full rounded-xl px-1 text-center`,children:[(0,w.jsx)(`div`,{className:`truncate text-[12px] font-semibold leading-4 text-slate-900`,children:r?t.title:`NextClaw`}),(0,w.jsx)(`div`,{className:`truncate pt-0.5 text-[11px] leading-4 text-slate-500`,children:r?t.subtitle:`Connecting`})]})]})})})}function he(){let e=T();return(0,y.useEffect)(()=>(e.bootstrap(),()=>{e.shutdown()}),[e]),(0,w.jsx)(me,{})}var ge=`modulepreload`,_e=function(e){return`/`+e},ve={},ye=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=_e(t,n),t in ve)return;ve[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:ge,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},be=class{client=null;constructor(e){this.baseUrl=e}listAgents=async()=>await this.ensureClient().agents.list();listSessions=async()=>await this.ensureClient().sessions.list();subscribeToSessions=(e,t)=>this.ensureClient().sessions.subscribe(e,t);resolveAvatarUrl=e=>`${this.baseUrl}/api/agents/${encodeURIComponent(e)}/avatar`;ensureClient=()=>{if(this.client)return this.client;throw Error(`Companion runtime client has not been initialized.`)};initialize=async()=>{this.client||=new(await(ye(()=>import(`./dist-BcuyDkW0.js`),[]))).NextClawClient({baseUrl:this.baseUrl})}},xe=class{clientService=null;baseUrl=null;refreshTimer=null;subscription=null;started=!1;start=async e=>{this.started&&this.baseUrl===e||(this.stop(),this.baseUrl=e,this.clientService=new be(e),await this.clientService.initialize(),S.getState().setSnapshot(le(e)),await this.refresh(),this.subscription=this.ensureClientService().subscribeToSessions(async()=>{await this.refresh()},{reconnectDelayMs:1e3,onError:async()=>{await this.refresh()}}),this.refreshTimer=setInterval(()=>{this.refresh()},1e4),this.started=!0)};stop=()=>{this.subscription?.close(),this.subscription=null,this.refreshTimer!==null&&(clearInterval(this.refreshTimer),this.refreshTimer=null),this.clientService=null,this.baseUrl=null,this.started=!1,S.getState().reset()};getSnapshot=()=>S.getState().snapshot;syncRuntimeSnapshot=({agents:e,sessions:t})=>{let n=this.ensureBaseUrl(),r=this.resolveCurrentView({baseUrl:n,agents:e,sessions:t}),i={baseUrl:n,agents:e,sessions:t,connectionState:r.state===`running`?`running`:`idle`,offlineReason:null,currentView:r};return S.getState().setSnapshot(i),i};applyOfflineState=e=>{let t=this.baseUrl??S.getState().snapshot.baseUrl??`http://127.0.0.1:55667`,n={baseUrl:t,agents:[],sessions:[],connectionState:`offline`,offlineReason:e??null,currentView:{state:`offline`,title:`NextClaw`,subtitle:e?.summary?.trim()||`Runtime unavailable`,openUrl:t}};return S.getState().setSnapshot(n),n};refresh=async()=>{try{let[e,t]=await Promise.all([this.ensureClientService().listAgents(),this.ensureClientService().listSessions()]);this.syncRuntimeSnapshot({agents:e,sessions:t.sessions})}catch(e){this.applyOfflineState(e instanceof Error?{summary:this.summarizeOfflineError(e.message)}:void 0)}};ensureClientService=()=>(this.clientService||=new be(this.ensureBaseUrl()),this.clientService);ensureBaseUrl=()=>{if(!this.baseUrl)throw Error(`CompanionRuntimeManager baseUrl has not been initialized.`);return this.baseUrl};resolveCurrentView=({baseUrl:e,agents:t,sessions:n})=>{let r=[...n].filter(e=>e.status===`running`).sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt))[0];if(!r)return{state:`idle`,title:`NextClaw`,subtitle:`No active agent`,openUrl:e};let i=t.find(e=>e.id===r.agentId)??null;return{state:`running`,title:i?.displayName?.trim()||r.agentId||`Active Agent`,subtitle:r.sessionId,avatarUrl:r.agentId?i?.avatarUrl?.trim()||this.ensureClientService().resolveAvatarUrl(r.agentId):void 0,sessionId:r.sessionId,agentId:r.agentId,openUrl:e}};summarizeOfflineError=e=>{if(/fetch failed/i.test(e))return`Cannot reach runtime`;if(/timed out/i.test(e))return`Runtime timeout`;let t=e.trim();return t.length>28?`${t.slice(0,25)}...`:t||`Runtime unavailable`}},Se=class{bootstrap=async()=>{let e={baseUrl:(await window.nextclawCompanion.getBootstrap()).baseUrl,bootstrapped:!0};return C.getState().setSnapshot(e),e};open=async()=>{await window.nextclawCompanion.open()};quit=async()=>{await window.nextclawCompanion.quit()}},Ce=new class{companionRuntimeManager=new xe;companionShellManager=new Se;bootstrapPromise=null;bootstrapped=!1;bootstrap=async()=>{if(!this.bootstrapped){if(this.bootstrapPromise)return await this.bootstrapPromise;this.bootstrapPromise=(async()=>{let e=await this.companionShellManager.bootstrap();await this.companionRuntimeManager.start(e.baseUrl),this.bootstrapped=!0})();try{await this.bootstrapPromise}finally{this.bootstrapPromise=null}}};shutdown=()=>{this.companionRuntimeManager.stop(),this.bootstrapped=!1,this.bootstrapPromise=null}};(0,ce.createRoot)(document.getElementById(`root`)).render((0,w.jsx)(y.StrictMode,{children:(0,w.jsx)(pe,{presenter:Ce,children:(0,w.jsx)(he,{})})}));
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>NextClaw Companion</title>
7
- <script type="module" crossorigin src="/assets/index-CeCdzaaj.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-BTYfvO1Y.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/assets/index-DPctoCcE.css">
9
9
  </head>
10
10
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextclaw/companion",
3
- "version": "0.1.14-beta.6",
3
+ "version": "0.1.14",
4
4
  "private": false,
5
5
  "description": "Standalone Electron companion shell for active NextClaw agents.",
6
6
  "author": "NextClaw Team",
@@ -16,7 +16,7 @@
16
16
  "react": "^18.3.1",
17
17
  "react-dom": "^18.3.1",
18
18
  "zustand": "^5.0.2",
19
- "@nextclaw/client-sdk": "0.1.14-beta.6"
19
+ "@nextclaw/client-sdk": "0.1.14"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/react": "^18.3.12",