pi-web-ui 0.8.3 → 0.8.4

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/bin/pi-web-ui.mjs CHANGED
@@ -394,7 +394,7 @@ User=${process.env.SUDO_USER ?? userInfo().username}
394
394
  WorkingDirectory=${cwd}
395
395
  ${envLines}
396
396
  ExecStart=${JSON.stringify(NODE)} ${JSON.stringify(SERVER_ENTRY)}
397
- Restart=on-failure
397
+ Restart=always
398
398
  RestartSec=5
399
399
 
400
400
  [Install]
@@ -946,6 +946,11 @@ export class ClientSession {
946
946
  }
947
947
  /** True once updateApp succeeded — the process must restart to run new code. */
948
948
  pendingRestart = false;
949
+ /**
950
+ * Set by index.ts: called after a successful self-update; returns whether
951
+ * the process is going to restart itself (so the notice can say so).
952
+ */
953
+ onUpdateReady = undefined;
949
954
  /** Ask the npm registry for the latest pi-web-ui version and report it. */
950
955
  async checkUpdate() {
951
956
  const current = ClientSession.currentAppVersion();
@@ -993,10 +998,13 @@ export class ClientSession {
993
998
  ok: true,
994
999
  detail: out.slice(0, 400),
995
1000
  });
1001
+ const autoRestart = this.onUpdateReady?.() ?? false;
996
1002
  this.emit({
997
1003
  type: "notice",
998
1004
  level: "info",
999
- text: "✅ 已更新 pi-web-ui,重启服务后生效(pi-web-ui server restart)",
1005
+ text: autoRestart
1006
+ ? "✅ 已更新 pi-web-ui,正在自动重启…"
1007
+ : "✅ 已更新 pi-web-ui,重启服务后生效(pi-web-ui server restart)",
1000
1008
  });
1001
1009
  }
1002
1010
  else {
@@ -2350,6 +2358,11 @@ export class AgentService {
2350
2358
  clients = new Map();
2351
2359
  pending = new Map();
2352
2360
  stateStore;
2361
+ /**
2362
+ * Set by index.ts: called by a client session after a successful
2363
+ * self-update; returns whether the process will restart itself.
2364
+ */
2365
+ onUpdateReady = undefined;
2353
2366
  constructor(cwd, sessionDirRoot, stateFile) {
2354
2367
  this.cwd = cwd;
2355
2368
  this.sessionDirRoot = sessionDirRoot;
@@ -2395,6 +2408,8 @@ export class AgentService {
2395
2408
  }
2396
2409
  }
2397
2410
  cs.attachSink(send);
2411
+ // Forward the update hook (set once by index.ts) to every session.
2412
+ cs.onUpdateReady = this.onUpdateReady;
2398
2413
  return cs;
2399
2414
  }
2400
2415
  /** Remove a socket from a client's broadcast set (called on socket close). */
@@ -15,6 +15,8 @@
15
15
  import { existsSync } from "node:fs";
16
16
  import { stat } from "node:fs/promises";
17
17
  import { createServer } from "node:http";
18
+ import { createConnection } from "node:net";
19
+ import { spawn } from "node:child_process";
18
20
  import { basename, dirname, join, resolve } from "node:path";
19
21
  import { fileURLToPath } from "node:url";
20
22
  import { randomUUID } from "node:crypto";
@@ -109,6 +111,51 @@ const heartbeatTimer = setInterval(() => {
109
111
  const service = new AgentService(CWD, SESSION_DIR_ROOT,
110
112
  // Per-client persisted UI state: last-used workspace + recent projects.
111
113
  join(DATA_DIR, "client-state.json"));
114
+ // ---------------------------------------------------------------------------
115
+ // Self-update auto-restart
116
+ // ---------------------------------------------------------------------------
117
+ // npm i -g writes new code to disk but the running process keeps the old
118
+ // code in memory — so a successful in-app update hands the process over:
119
+ // macOS launchd (KeepAlive) and systemd (Restart) relaunch us on exit;
120
+ // foreground runs get a replacement child that waits for our port to free.
121
+ // Docker containers can't self-restart (the orchestrator owns that), so they
122
+ // keep the manual-restart notice.
123
+ const RESTART_CHILD_ENV = "PI_WEB_RESTART_CHILD";
124
+ function scheduleUpdateRestart() {
125
+ const isLaunchd = process.platform === "darwin" && process.ppid === 1;
126
+ const isSystemd = process.platform === "linux" && !!process.env.INVOCATION_ID;
127
+ const inDocker = existsSync("/.dockerenv");
128
+ if (isLaunchd || isSystemd || inDocker) {
129
+ // Supervisors relaunch on exit; Docker restarts externally. Nothing to
130
+ // spawn — just exit after the notice has flushed.
131
+ if (isLaunchd || isSystemd) {
132
+ setTimeout(() => {
133
+ console.log("update applied — auto-restarting…");
134
+ if (isSystemd) {
135
+ // Non-zero exit: legacy units use Restart=on-failure.
136
+ process.exit(3);
137
+ }
138
+ void shutdown();
139
+ }, 1500);
140
+ return true;
141
+ }
142
+ return false;
143
+ }
144
+ // Foreground / Windows: spawn a replacement from the updated install and
145
+ // exit. Same stdio (logs keep flowing), same args/env (port, cwd, data
146
+ // dir…); the child waits for this port to free before binding.
147
+ setTimeout(() => {
148
+ console.log("update applied — spawning replacement…");
149
+ spawn(process.execPath, process.argv.slice(1), {
150
+ stdio: "inherit",
151
+ env: { ...process.env, [RESTART_CHILD_ENV]: "1" },
152
+ ...(process.platform === "win32" ? { windowsHide: true } : {}),
153
+ });
154
+ void shutdown();
155
+ }, 1500);
156
+ return true;
157
+ }
158
+ service.onUpdateReady = scheduleUpdateRestart;
112
159
  wss.on("connection", (ws) => {
113
160
  let clientId = null;
114
161
  let closed = false;
@@ -279,6 +326,29 @@ wss.on("connection", (ws) => {
279
326
  service.detach(clientId, send);
280
327
  });
281
328
  });
329
+ // When spawned by the old process as an auto-restart replacement, wait for
330
+ // the old instance to release the port before binding (it exits right after
331
+ // spawning us). Probe by attempting a connection: refused = free.
332
+ if (process.env[RESTART_CHILD_ENV] === "1") {
333
+ const deadline = Date.now() + 20_000;
334
+ const portFree = () => new Promise((resolve) => {
335
+ const sock = createConnection({ port: PORT, host: "127.0.0.1" });
336
+ sock.once("connect", () => {
337
+ sock.destroy();
338
+ resolve(false); // busy — old instance still up
339
+ });
340
+ sock.once("error", () => resolve(true)); // refused → free
341
+ sock.setTimeout(500, () => {
342
+ sock.destroy();
343
+ resolve(false);
344
+ });
345
+ });
346
+ while (Date.now() < deadline) {
347
+ if (await portFree())
348
+ break;
349
+ await new Promise((r) => setTimeout(r, 300));
350
+ }
351
+ }
282
352
  httpServer.listen(PORT, () => {
283
353
  console.log("");
284
354
  console.log(" ⚡ pi-web-ui — web chat for the pi coding agent");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-web-ui",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "Web chat interface for the pi coding agent, powered by the pi SDK (@earendil-works/pi-coding-agent) — one-command run, Docker/systemd/launchd deployable",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -37,7 +37,7 @@
37
37
  `+g[x].replace(" at new "," at ");return i.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",i.displayName)),B}while(1<=x&&0<=M);break}}}finally{R=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?G(i):""}function Ne(i){switch(i.tag){case 5:return G(i.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return i=ye(i.type,!1),i;case 11:return i=ye(i.type.render,!1),i;case 1:return i=ye(i.type,!0),i;default:return""}}function _e(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case re:return"Fragment";case I:return"Portal";case F:return"Profiler";case Z:return"StrictMode";case j:return"Suspense";case $:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case X:return(i.displayName||"Context")+".Consumer";case L:return(i._context.displayName||"Context")+".Provider";case W:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case P:return s=i.displayName||null,s!==null?s:_e(i.type)||"Memo";case Y:s=i._payload,i=i._init;try{return _e(i(s))}catch{}}return null}function Ue(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _e(s);case 8:return s===Z?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ie(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function je(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function nt(i){var s=je(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),f=""+i[s];if(!i.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var g=c.get,v=c.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return g.call(this)},set:function(x){f=""+x,v.call(this,x)}}),Object.defineProperty(i,s,{enumerable:c.enumerable}),{getValue:function(){return f},setValue:function(x){f=""+x},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Ft(i){i._valueTracker||(i._valueTracker=nt(i))}function nn(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),f="";return i&&(f=je(i)?i.checked?"true":"false":i.value),i=f,i!==c?(s.setValue(i),!0):!1}function He(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function Dn(i,s){var c=s.checked;return C({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??i._wrapperState.initialChecked})}function Pi(i,s){var c=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;c=Ie(s.value!=null?s.value:c),i._wrapperState={initialChecked:f,initialValue:c,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Qe(i,s){s=s.checked,s!=null&&N(i,"checked",s,!1)}function Pn(i,s){Qe(i,s);var c=Ie(s.value),f=s.type;if(c!=null)f==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(f==="submit"||f==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?vi(i,s.type,c):s.hasOwnProperty("defaultValue")&&vi(i,s.type,Ie(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Kn(i,s,c){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,c||s===i.value||(i.value=s),i.defaultValue=s}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function vi(i,s,c){(s!=="number"||He(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var oi=Array.isArray;function yi(i,s,c,f){if(i=i.options,s){s={};for(var g=0;g<c.length;g++)s["$"+c[g]]=!0;for(c=0;c<i.length;c++)g=s.hasOwnProperty("$"+i[c].value),i[c].selected!==g&&(i[c].selected=g),g&&f&&(i[c].defaultSelected=!0)}else{for(c=""+Ie(c),s=null,g=0;g<i.length;g++){if(i[g].value===c){i[g].selected=!0,f&&(i[g].defaultSelected=!0);return}s!==null||i[g].disabled||(s=i[g])}s!==null&&(s.selected=!0)}}function Rr(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return C({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Mr(i,s){var c=s.value;if(c==null){if(c=s.children,s=s.defaultValue,c!=null){if(s!=null)throw Error(n(92));if(oi(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}i._wrapperState={initialValue:Ie(c)}}function qn(i,s){var c=Ie(s.value),f=Ie(s.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),s.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),f!=null&&(i.defaultValue=""+f)}function Ar(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function J(i){switch(i){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 he(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?J(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Oe,$e=(function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,c,f,g){MSApp.execUnsafeLocalFunction(function(){return i(s,c,f,g)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Oe=Oe||document.createElement("div"),Oe.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Oe.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Xe(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var zt={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},ai=["Webkit","ms","Moz","O"];Object.keys(zt).forEach(function(i){ai.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),zt[s]=zt[i]})});function En(i,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||zt.hasOwnProperty(i)&&zt[i]?(""+s).trim():s+"px"}function li(i,s){i=i.style;for(var c in s)if(s.hasOwnProperty(c)){var f=c.indexOf("--")===0,g=En(c,s[c],f);c==="float"&&(c="cssFloat"),f?i.setProperty(c,g):i[c]=g}}var Bi=C({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 Ut(i,s){if(s){if(Bi[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Vn(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){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 rn=null;function ds(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var fs=null,er=null,Fi=null;function zi(i){if(i=yo(i)){if(typeof fs!="function")throw Error(n(280));var s=i.stateNode;s&&(s=ja(s),fs(i.stateNode,i.type,s))}}function D(i){er?Fi?Fi.push(i):Fi=[i]:er=i}function ee(){if(er){var i=er,s=Fi;if(Fi=er=null,zi(i),s)for(i=0;i<s.length;i++)zi(s[i])}}function pe(i,s){return i(s)}function De(){}var dt=!1;function gt(i,s,c){if(dt)return i(s,c);dt=!0;try{return pe(i,s,c)}finally{dt=!1,(er!==null||Fi!==null)&&(De(),ee())}}function be(i,s){var c=i.stateNode;if(c===null)return null;var f=ja(c);if(f===null)return null;c=f[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,s,typeof c));return c}var ve=!1;if(u)try{var Te={};Object.defineProperty(Te,"passive",{get:function(){ve=!0}}),window.addEventListener("test",Te,Te),window.removeEventListener("test",Te,Te)}catch{ve=!1}function Lt(i,s,c,f,g,v,x,M,B){var V=Array.prototype.slice.call(arguments,3);try{s.apply(c,V)}catch(oe){this.onError(oe)}}var ut=!1,bi=null,tr=!1,Or=null,wc={onError:function(i){ut=!0,bi=i}};function Qs(i,s,c,f,g,v,x,M,B){ut=!1,bi=null,Lt.apply(wc,arguments)}function xc(i,s,c,f,g,v,x,M,B){if(Qs.apply(this,arguments),ut){if(ut){var V=bi;ut=!1,bi=null}else throw Error(n(198));tr||(tr=!0,Or=V)}}function Ui(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function ya(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function Js(i){if(Ui(i)!==i)throw Error(n(188))}function ps(i){var s=i.alternate;if(!s){if(s=Ui(i),s===null)throw Error(n(188));return s!==i?null:i}for(var c=i,f=s;;){var g=c.return;if(g===null)break;var v=g.alternate;if(v===null){if(f=g.return,f!==null){c=f;continue}break}if(g.child===v.child){for(v=g.child;v;){if(v===c)return Js(g),i;if(v===f)return Js(g),s;v=v.sibling}throw Error(n(188))}if(c.return!==f.return)c=g,f=v;else{for(var x=!1,M=g.child;M;){if(M===c){x=!0,c=g,f=v;break}if(M===f){x=!0,f=g,c=v;break}M=M.sibling}if(!x){for(M=v.child;M;){if(M===c){x=!0,c=v,f=g;break}if(M===f){x=!0,f=v,c=g;break}M=M.sibling}if(!x)throw Error(n(189))}}if(c.alternate!==f)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:s}function ba(i){return i=ps(i),i!==null?Sa(i):null}function Sa(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=Sa(i);if(s!==null)return s;i=i.sibling}return null}var wa=t.unstable_scheduleCallback,ci=t.unstable_cancelCallback,xa=t.unstable_shouldYield,ka=t.unstable_requestPaint,yt=t.unstable_now,kc=t.unstable_getCurrentPriorityLevel,eo=t.unstable_ImmediatePriority,Lr=t.unstable_UserBlockingPriority,ms=t.unstable_NormalPriority,ce=t.unstable_LowPriority,Ce=t.unstable_IdlePriority,We=null,Ge=null;function Rt(i){if(Ge&&typeof Ge.onCommitFiberRoot=="function")try{Ge.onCommitFiberRoot(We,i,void 0,(i.current.flags&128)===128)}catch{}}var bt=Math.clz32?Math.clz32:gn,Si=Math.log,gs=Math.LN2;function gn(i){return i>>>=0,i===0?32:31-(Si(i)/gs|0)|0}var _n=64,Ir=4194304;function nr(i){switch(i&-i){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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Dr(i,s){var c=i.pendingLanes;if(c===0)return 0;var f=0,g=i.suspendedLanes,v=i.pingedLanes,x=c&268435455;if(x!==0){var M=x&~g;M!==0?f=nr(M):(v&=x,v!==0&&(f=nr(v)))}else x=c&~g,x!==0?f=nr(x):v!==0&&(f=nr(v));if(f===0)return 0;if(s!==0&&s!==f&&(s&g)===0&&(g=f&-f,v=s&-s,g>=v||g===16&&(v&4194240)!==0))return s;if((f&4)!==0&&(f|=c&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=f;0<s;)c=31-bt(s),g=1<<c,f|=i[c],s&=~g;return f}function Ec(i,s){switch(i){case 1:case 2:case 4:return s+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 s+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 Cc(i,s){for(var c=i.suspendedLanes,f=i.pingedLanes,g=i.expirationTimes,v=i.pendingLanes;0<v;){var x=31-bt(v),M=1<<x,B=g[x];B===-1?((M&c)===0||(M&f)!==0)&&(g[x]=Ec(M,s)):B<=s&&(i.expiredLanes|=M),v&=~M}}function to(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Ea(){var i=_n;return _n<<=1,(_n&4194240)===0&&(_n=64),i}function ir(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function rr(i,s,c){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-bt(s),i[s]=c}function Gn(i,s){var c=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var f=i.eventTimes;for(i=i.expirationTimes;0<c;){var g=31-bt(c),v=1<<g;s[g]=0,f[g]=-1,i[g]=-1,c&=~v}}function no(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var f=31-bt(c),g=1<<f;g&s|i[f]&s&&(i[f]|=s),c&=~g}}var et=0;function Fe(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var io,Mt,rt,Pr,wi,Br=!1,sr=[],fe=null,Se=null,Le=null,Ze=new Map,Et=new Map,Vt=[],Nc="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 Ca(i,s){switch(i){case"focusin":case"focusout":fe=null;break;case"dragenter":case"dragleave":Se=null;break;case"mouseover":case"mouseout":Le=null;break;case"pointerover":case"pointerout":Ze.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Et.delete(s.pointerId)}}function ro(i,s,c,f,g,v){return i===null||i.nativeEvent!==v?(i={blockedOn:s,domEventName:c,eventSystemFlags:f,nativeEvent:v,targetContainers:[g]},s!==null&&(s=yo(s),s!==null&&Mt(s)),i):(i.eventSystemFlags|=f,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function jb(i,s,c,f,g){switch(s){case"focusin":return fe=ro(fe,i,s,c,f,g),!0;case"dragenter":return Se=ro(Se,i,s,c,f,g),!0;case"mouseover":return Le=ro(Le,i,s,c,f,g),!0;case"pointerover":var v=g.pointerId;return Ze.set(v,ro(Ze.get(v)||null,i,s,c,f,g)),!0;case"gotpointercapture":return v=g.pointerId,Et.set(v,ro(Et.get(v)||null,i,s,c,f,g)),!0}return!1}function kf(i){var s=Fr(i.target);if(s!==null){var c=Ui(s);if(c!==null){if(s=c.tag,s===13){if(s=ya(c),s!==null){i.blockedOn=s,wi(i.priority,function(){rt(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Na(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=Rc(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var f=new c.constructor(c.type,c);rn=f,c.target.dispatchEvent(f),rn=null}else return s=yo(c),s!==null&&Mt(s),i.blockedOn=c,!1;s.shift()}return!0}function Ef(i,s,c){Na(i)&&c.delete(s)}function Hb(){Br=!1,fe!==null&&Na(fe)&&(fe=null),Se!==null&&Na(Se)&&(Se=null),Le!==null&&Na(Le)&&(Le=null),Ze.forEach(Ef),Et.forEach(Ef)}function so(i,s){i.blockedOn===s&&(i.blockedOn=null,Br||(Br=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hb)))}function oo(i){function s(g){return so(g,i)}if(0<sr.length){so(sr[0],i);for(var c=1;c<sr.length;c++){var f=sr[c];f.blockedOn===i&&(f.blockedOn=null)}}for(fe!==null&&so(fe,i),Se!==null&&so(Se,i),Le!==null&&so(Le,i),Ze.forEach(s),Et.forEach(s),c=0;c<Vt.length;c++)f=Vt[c],f.blockedOn===i&&(f.blockedOn=null);for(;0<Vt.length&&(c=Vt[0],c.blockedOn===null);)kf(c),c.blockedOn===null&&Vt.shift()}var _s=O.ReactCurrentBatchConfig,Ta=!0;function $b(i,s,c,f){var g=et,v=_s.transition;_s.transition=null;try{et=1,Tc(i,s,c,f)}finally{et=g,_s.transition=v}}function Wb(i,s,c,f){var g=et,v=_s.transition;_s.transition=null;try{et=4,Tc(i,s,c,f)}finally{et=g,_s.transition=v}}function Tc(i,s,c,f){if(Ta){var g=Rc(i,s,c,f);if(g===null)qc(i,s,f,Ra,c),Ca(i,f);else if(jb(g,i,s,c,f))f.stopPropagation();else if(Ca(i,f),s&4&&-1<Nc.indexOf(i)){for(;g!==null;){var v=yo(g);if(v!==null&&io(v),v=Rc(i,s,c,f),v===null&&qc(i,s,f,Ra,c),v===g)break;g=v}g!==null&&f.stopPropagation()}else qc(i,s,f,null,c)}}var Ra=null;function Rc(i,s,c,f){if(Ra=null,i=ds(f),i=Fr(i),i!==null)if(s=Ui(i),s===null)i=null;else if(c=s.tag,c===13){if(i=ya(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Ra=i,null}function Cf(i){switch(i){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(kc()){case eo:return 1;case Lr:return 4;case ms:case ce:return 16;case Ce:return 536870912;default:return 16}default:return 16}}var or=null,Mc=null,Ma=null;function Nf(){if(Ma)return Ma;var i,s=Mc,c=s.length,f,g="value"in or?or.value:or.textContent,v=g.length;for(i=0;i<c&&s[i]===g[i];i++);var x=c-i;for(f=1;f<=x&&s[c-f]===g[v-f];f++);return Ma=g.slice(i,1<f?1-f:void 0)}function Aa(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Oa(){return!0}function Tf(){return!1}function Bn(i){function s(c,f,g,v,x){this._reactName=c,this._targetInst=g,this.type=f,this.nativeEvent=v,this.target=x,this.currentTarget=null;for(var M in i)i.hasOwnProperty(M)&&(c=i[M],this[M]=c?c(v):v[M]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Oa:Tf,this.isPropagationStopped=Tf,this}return C(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Oa)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Oa)},persist:function(){},isPersistent:Oa}),s}var vs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ac=Bn(vs),ao=C({},vs,{view:0,detail:0}),Kb=Bn(ao),Oc,Lc,lo,La=C({},ao,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dc,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==lo&&(lo&&i.type==="mousemove"?(Oc=i.screenX-lo.screenX,Lc=i.screenY-lo.screenY):Lc=Oc=0,lo=i),Oc)},movementY:function(i){return"movementY"in i?i.movementY:Lc}}),Rf=Bn(La),qb=C({},La,{dataTransfer:0}),Vb=Bn(qb),Gb=C({},ao,{relatedTarget:0}),Ic=Bn(Gb),Yb=C({},vs,{animationName:0,elapsedTime:0,pseudoElement:0}),Xb=Bn(Yb),Zb=C({},vs,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),Qb=Bn(Zb),Jb=C({},vs,{data:0}),Mf=Bn(Jb),eS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tS={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"},nS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iS(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=nS[i])?!!s[i]:!1}function Dc(){return iS}var rS=C({},ao,{key:function(i){if(i.key){var s=eS[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Aa(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?tS[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dc,charCode:function(i){return i.type==="keypress"?Aa(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Aa(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),sS=Bn(rS),oS=C({},La,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Af=Bn(oS),aS=C({},ao,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dc}),lS=Bn(aS),cS=C({},vs,{propertyName:0,elapsedTime:0,pseudoElement:0}),uS=Bn(cS),hS=C({},La,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),dS=Bn(hS),fS=[9,13,27,32],Pc=u&&"CompositionEvent"in window,co=null;u&&"documentMode"in document&&(co=document.documentMode);var pS=u&&"TextEvent"in window&&!co,Of=u&&(!Pc||co&&8<co&&11>=co),Lf=" ",If=!1;function Df(i,s){switch(i){case"keyup":return fS.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pf(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var ys=!1;function mS(i,s){switch(i){case"compositionend":return Pf(s);case"keypress":return s.which!==32?null:(If=!0,Lf);case"textInput":return i=s.data,i===Lf&&If?null:i;default:return null}}function gS(i,s){if(ys)return i==="compositionend"||!Pc&&Df(i,s)?(i=Nf(),Ma=Mc=or=null,ys=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Of&&s.locale!=="ko"?null:s.data;default:return null}}var _S={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 Bf(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!_S[i.type]:s==="textarea"}function Ff(i,s,c,f){D(f),s=Fa(s,"onChange"),0<s.length&&(c=new Ac("onChange","change",null,c,f),i.push({event:c,listeners:s}))}var uo=null,ho=null;function vS(i){np(i,0)}function Ia(i){var s=ks(i);if(nn(s))return i}function yS(i,s){if(i==="change")return s}var zf=!1;if(u){var Bc;if(u){var Fc="oninput"in document;if(!Fc){var Uf=document.createElement("div");Uf.setAttribute("oninput","return;"),Fc=typeof Uf.oninput=="function"}Bc=Fc}else Bc=!1;zf=Bc&&(!document.documentMode||9<document.documentMode)}function jf(){uo&&(uo.detachEvent("onpropertychange",Hf),ho=uo=null)}function Hf(i){if(i.propertyName==="value"&&Ia(ho)){var s=[];Ff(s,ho,i,ds(i)),gt(vS,s)}}function bS(i,s,c){i==="focusin"?(jf(),uo=s,ho=c,uo.attachEvent("onpropertychange",Hf)):i==="focusout"&&jf()}function SS(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Ia(ho)}function wS(i,s){if(i==="click")return Ia(s)}function xS(i,s){if(i==="input"||i==="change")return Ia(s)}function kS(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var ui=typeof Object.is=="function"?Object.is:kS;function fo(i,s){if(ui(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),f=Object.keys(s);if(c.length!==f.length)return!1;for(f=0;f<c.length;f++){var g=c[f];if(!d.call(s,g)||!ui(i[g],s[g]))return!1}return!0}function $f(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Wf(i,s){var c=$f(i);i=0;for(var f;c;){if(c.nodeType===3){if(f=i+c.textContent.length,i<=s&&f>=s)return{node:c,offset:s-i};i=f}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=$f(c)}}function Kf(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?Kf(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function qf(){for(var i=window,s=He();s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)i=s.contentWindow;else break;s=He(i.document)}return s}function zc(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function ES(i){var s=qf(),c=i.focusedElem,f=i.selectionRange;if(s!==c&&c&&c.ownerDocument&&Kf(c.ownerDocument.documentElement,c)){if(f!==null&&zc(c)){if(s=f.start,i=f.end,i===void 0&&(i=s),"selectionStart"in c)c.selectionStart=s,c.selectionEnd=Math.min(i,c.value.length);else if(i=(s=c.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var g=c.textContent.length,v=Math.min(f.start,g);f=f.end===void 0?v:Math.min(f.end,g),!i.extend&&v>f&&(g=f,f=v,v=g),g=Wf(c,v);var x=Wf(c,f);g&&x&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),i.removeAllRanges(),v>f?(i.addRange(s),i.extend(x.node,x.offset)):(s.setEnd(x.node,x.offset),i.addRange(s)))}}for(s=[],i=c;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<s.length;c++)i=s[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var CS=u&&"documentMode"in document&&11>=document.documentMode,bs=null,Uc=null,po=null,jc=!1;function Vf(i,s,c){var f=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;jc||bs==null||bs!==He(f)||(f=bs,"selectionStart"in f&&zc(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),po&&fo(po,f)||(po=f,f=Fa(Uc,"onSelect"),0<f.length&&(s=new Ac("onSelect","select",null,s,c),i.push({event:s,listeners:f}),s.target=bs)))}function Da(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Ss={animationend:Da("Animation","AnimationEnd"),animationiteration:Da("Animation","AnimationIteration"),animationstart:Da("Animation","AnimationStart"),transitionend:Da("Transition","TransitionEnd")},Hc={},Gf={};u&&(Gf=document.createElement("div").style,"AnimationEvent"in window||(delete Ss.animationend.animation,delete Ss.animationiteration.animation,delete Ss.animationstart.animation),"TransitionEvent"in window||delete Ss.transitionend.transition);function Pa(i){if(Hc[i])return Hc[i];if(!Ss[i])return i;var s=Ss[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in Gf)return Hc[i]=s[c];return i}var Yf=Pa("animationend"),Xf=Pa("animationiteration"),Zf=Pa("animationstart"),Qf=Pa("transitionend"),Jf=new Map,ep="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 ar(i,s){Jf.set(i,s),a(s,[i])}for(var $c=0;$c<ep.length;$c++){var Wc=ep[$c],NS=Wc.toLowerCase(),TS=Wc[0].toUpperCase()+Wc.slice(1);ar(NS,"on"+TS)}ar(Yf,"onAnimationEnd"),ar(Xf,"onAnimationIteration"),ar(Zf,"onAnimationStart"),ar("dblclick","onDoubleClick"),ar("focusin","onFocus"),ar("focusout","onBlur"),ar(Qf,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mo="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(" "),RS=new Set("cancel close invalid load scroll toggle".split(" ").concat(mo));function tp(i,s,c){var f=i.type||"unknown-event";i.currentTarget=c,xc(f,s,void 0,i),i.currentTarget=null}function np(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var f=i[c],g=f.event;f=f.listeners;e:{var v=void 0;if(s)for(var x=f.length-1;0<=x;x--){var M=f[x],B=M.instance,V=M.currentTarget;if(M=M.listener,B!==v&&g.isPropagationStopped())break e;tp(g,M,V),v=B}else for(x=0;x<f.length;x++){if(M=f[x],B=M.instance,V=M.currentTarget,M=M.listener,B!==v&&g.isPropagationStopped())break e;tp(g,M,V),v=B}}}if(tr)throw i=Or,tr=!1,Or=null,i}function ft(i,s){var c=s[Qc];c===void 0&&(c=s[Qc]=new Set);var f=i+"__bubble";c.has(f)||(ip(s,i,2,!1),c.add(f))}function Kc(i,s,c){var f=0;s&&(f|=4),ip(c,i,f,s)}var Ba="_reactListening"+Math.random().toString(36).slice(2);function go(i){if(!i[Ba]){i[Ba]=!0,r.forEach(function(c){c!=="selectionchange"&&(RS.has(c)||Kc(c,!1,i),Kc(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Ba]||(s[Ba]=!0,Kc("selectionchange",!1,s))}}function ip(i,s,c,f){switch(Cf(s)){case 1:var g=$b;break;case 4:g=Wb;break;default:g=Tc}c=g.bind(null,s,c,i),g=void 0,!ve||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),f?g!==void 0?i.addEventListener(s,c,{capture:!0,passive:g}):i.addEventListener(s,c,!0):g!==void 0?i.addEventListener(s,c,{passive:g}):i.addEventListener(s,c,!1)}function qc(i,s,c,f,g){var v=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var x=f.tag;if(x===3||x===4){var M=f.stateNode.containerInfo;if(M===g||M.nodeType===8&&M.parentNode===g)break;if(x===4)for(x=f.return;x!==null;){var B=x.tag;if((B===3||B===4)&&(B=x.stateNode.containerInfo,B===g||B.nodeType===8&&B.parentNode===g))return;x=x.return}for(;M!==null;){if(x=Fr(M),x===null)return;if(B=x.tag,B===5||B===6){f=v=x;continue e}M=M.parentNode}}f=f.return}gt(function(){var V=v,oe=ds(c),ae=[];e:{var se=Jf.get(i);if(se!==void 0){var ge=Ac,xe=i;switch(i){case"keypress":if(Aa(c)===0)break e;case"keydown":case"keyup":ge=sS;break;case"focusin":xe="focus",ge=Ic;break;case"focusout":xe="blur",ge=Ic;break;case"beforeblur":case"afterblur":ge=Ic;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=Rf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=Vb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=lS;break;case Yf:case Xf:case Zf:ge=Xb;break;case Qf:ge=uS;break;case"scroll":ge=Kb;break;case"wheel":ge=dS;break;case"copy":case"cut":case"paste":ge=Qb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=Af}var ke=(s&4)!==0,At=!ke&&i==="scroll",H=ke?se!==null?se+"Capture":null:se;ke=[];for(var U=V,q;U!==null;){q=U;var ue=q.stateNode;if(q.tag===5&&ue!==null&&(q=ue,H!==null&&(ue=be(U,H),ue!=null&&ke.push(_o(U,ue,q)))),At)break;U=U.return}0<ke.length&&(se=new ge(se,xe,null,c,oe),ae.push({event:se,listeners:ke}))}}if((s&7)===0){e:{if(se=i==="mouseover"||i==="pointerover",ge=i==="mouseout"||i==="pointerout",se&&c!==rn&&(xe=c.relatedTarget||c.fromElement)&&(Fr(xe)||xe[ji]))break e;if((ge||se)&&(se=oe.window===oe?oe:(se=oe.ownerDocument)?se.defaultView||se.parentWindow:window,ge?(xe=c.relatedTarget||c.toElement,ge=V,xe=xe?Fr(xe):null,xe!==null&&(At=Ui(xe),xe!==At||xe.tag!==5&&xe.tag!==6)&&(xe=null)):(ge=null,xe=V),ge!==xe)){if(ke=Rf,ue="onMouseLeave",H="onMouseEnter",U="mouse",(i==="pointerout"||i==="pointerover")&&(ke=Af,ue="onPointerLeave",H="onPointerEnter",U="pointer"),At=ge==null?se:ks(ge),q=xe==null?se:ks(xe),se=new ke(ue,U+"leave",ge,c,oe),se.target=At,se.relatedTarget=q,ue=null,Fr(oe)===V&&(ke=new ke(H,U+"enter",xe,c,oe),ke.target=q,ke.relatedTarget=At,ue=ke),At=ue,ge&&xe)t:{for(ke=ge,H=xe,U=0,q=ke;q;q=ws(q))U++;for(q=0,ue=H;ue;ue=ws(ue))q++;for(;0<U-q;)ke=ws(ke),U--;for(;0<q-U;)H=ws(H),q--;for(;U--;){if(ke===H||H!==null&&ke===H.alternate)break t;ke=ws(ke),H=ws(H)}ke=null}else ke=null;ge!==null&&rp(ae,se,ge,ke,!1),xe!==null&&At!==null&&rp(ae,At,xe,ke,!0)}}e:{if(se=V?ks(V):window,ge=se.nodeName&&se.nodeName.toLowerCase(),ge==="select"||ge==="input"&&se.type==="file")var Ee=yS;else if(Bf(se))if(zf)Ee=xS;else{Ee=SS;var Re=bS}else(ge=se.nodeName)&&ge.toLowerCase()==="input"&&(se.type==="checkbox"||se.type==="radio")&&(Ee=wS);if(Ee&&(Ee=Ee(i,V))){Ff(ae,Ee,c,oe);break e}Re&&Re(i,se,V),i==="focusout"&&(Re=se._wrapperState)&&Re.controlled&&se.type==="number"&&vi(se,"number",se.value)}switch(Re=V?ks(V):window,i){case"focusin":(Bf(Re)||Re.contentEditable==="true")&&(bs=Re,Uc=V,po=null);break;case"focusout":po=Uc=bs=null;break;case"mousedown":jc=!0;break;case"contextmenu":case"mouseup":case"dragend":jc=!1,Vf(ae,c,oe);break;case"selectionchange":if(CS)break;case"keydown":case"keyup":Vf(ae,c,oe)}var Me;if(Pc)e:{switch(i){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else ys?Df(i,c)&&(Pe="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Pe="onCompositionStart");Pe&&(Of&&c.locale!=="ko"&&(ys||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&ys&&(Me=Nf()):(or=oe,Mc="value"in or?or.value:or.textContent,ys=!0)),Re=Fa(V,Pe),0<Re.length&&(Pe=new Mf(Pe,i,null,c,oe),ae.push({event:Pe,listeners:Re}),Me?Pe.data=Me:(Me=Pf(c),Me!==null&&(Pe.data=Me)))),(Me=pS?mS(i,c):gS(i,c))&&(V=Fa(V,"onBeforeInput"),0<V.length&&(oe=new Mf("onBeforeInput","beforeinput",null,c,oe),ae.push({event:oe,listeners:V}),oe.data=Me))}np(ae,s)})}function _o(i,s,c){return{instance:i,listener:s,currentTarget:c}}function Fa(i,s){for(var c=s+"Capture",f=[];i!==null;){var g=i,v=g.stateNode;g.tag===5&&v!==null&&(g=v,v=be(i,c),v!=null&&f.unshift(_o(i,v,g)),v=be(i,s),v!=null&&f.push(_o(i,v,g))),i=i.return}return f}function ws(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function rp(i,s,c,f,g){for(var v=s._reactName,x=[];c!==null&&c!==f;){var M=c,B=M.alternate,V=M.stateNode;if(B!==null&&B===f)break;M.tag===5&&V!==null&&(M=V,g?(B=be(c,v),B!=null&&x.unshift(_o(c,B,M))):g||(B=be(c,v),B!=null&&x.push(_o(c,B,M)))),c=c.return}x.length!==0&&i.push({event:s,listeners:x})}var MS=/\r\n?/g,AS=/\u0000|\uFFFD/g;function sp(i){return(typeof i=="string"?i:""+i).replace(MS,`
38
38
  `).replace(AS,"")}function za(i,s,c){if(s=sp(s),sp(i)!==s&&c)throw Error(n(425))}function Ua(){}var Vc=null,Gc=null;function Yc(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Xc=typeof setTimeout=="function"?setTimeout:void 0,OS=typeof clearTimeout=="function"?clearTimeout:void 0,op=typeof Promise=="function"?Promise:void 0,LS=typeof queueMicrotask=="function"?queueMicrotask:typeof op<"u"?function(i){return op.resolve(null).then(i).catch(IS)}:Xc;function IS(i){setTimeout(function(){throw i})}function Zc(i,s){var c=s,f=0;do{var g=c.nextSibling;if(i.removeChild(c),g&&g.nodeType===8)if(c=g.data,c==="/$"){if(f===0){i.removeChild(g),oo(s);return}f--}else c!=="$"&&c!=="$?"&&c!=="$!"||f++;c=g}while(c);oo(s)}function lr(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function ap(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return i;s--}else c==="/$"&&s++}i=i.previousSibling}return null}var xs=Math.random().toString(36).slice(2),xi="__reactFiber$"+xs,vo="__reactProps$"+xs,ji="__reactContainer$"+xs,Qc="__reactEvents$"+xs,DS="__reactListeners$"+xs,PS="__reactHandles$"+xs;function Fr(i){var s=i[xi];if(s)return s;for(var c=i.parentNode;c;){if(s=c[ji]||c[xi]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=ap(i);i!==null;){if(c=i[xi])return c;i=ap(i)}return s}i=c,c=i.parentNode}return null}function yo(i){return i=i[xi]||i[ji],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function ks(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function ja(i){return i[vo]||null}var Jc=[],Es=-1;function cr(i){return{current:i}}function pt(i){0>Es||(i.current=Jc[Es],Jc[Es]=null,Es--)}function ht(i,s){Es++,Jc[Es]=i.current,i.current=s}var ur={},cn=cr(ur),Cn=cr(!1),zr=ur;function Cs(i,s){var c=i.type.contextTypes;if(!c)return ur;var f=i.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var g={},v;for(v in c)g[v]=s[v];return f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=g),g}function Nn(i){return i=i.childContextTypes,i!=null}function Ha(){pt(Cn),pt(cn)}function lp(i,s,c){if(cn.current!==ur)throw Error(n(168));ht(cn,s),ht(Cn,c)}function cp(i,s,c){var f=i.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return c;f=f.getChildContext();for(var g in f)if(!(g in s))throw Error(n(108,Ue(i)||"Unknown",g));return C({},c,f)}function $a(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||ur,zr=cn.current,ht(cn,i),ht(Cn,Cn.current),!0}function up(i,s,c){var f=i.stateNode;if(!f)throw Error(n(169));c?(i=cp(i,s,zr),f.__reactInternalMemoizedMergedChildContext=i,pt(Cn),pt(cn),ht(cn,i)):pt(Cn),ht(Cn,c)}var Hi=null,Wa=!1,eu=!1;function hp(i){Hi===null?Hi=[i]:Hi.push(i)}function BS(i){Wa=!0,hp(i)}function hr(){if(!eu&&Hi!==null){eu=!0;var i=0,s=et;try{var c=Hi;for(et=1;i<c.length;i++){var f=c[i];do f=f(!0);while(f!==null)}Hi=null,Wa=!1}catch(g){throw Hi!==null&&(Hi=Hi.slice(i+1)),wa(eo,hr),g}finally{et=s,eu=!1}}return null}var Ns=[],Ts=0,Ka=null,qa=0,Yn=[],Xn=0,Ur=null,$i=1,Wi="";function jr(i,s){Ns[Ts++]=qa,Ns[Ts++]=Ka,Ka=i,qa=s}function dp(i,s,c){Yn[Xn++]=$i,Yn[Xn++]=Wi,Yn[Xn++]=Ur,Ur=i;var f=$i;i=Wi;var g=32-bt(f)-1;f&=~(1<<g),c+=1;var v=32-bt(s)+g;if(30<v){var x=g-g%5;v=(f&(1<<x)-1).toString(32),f>>=x,g-=x,$i=1<<32-bt(s)+g|c<<g|f,Wi=v+i}else $i=1<<v|c<<g|f,Wi=i}function tu(i){i.return!==null&&(jr(i,1),dp(i,1,0))}function nu(i){for(;i===Ka;)Ka=Ns[--Ts],Ns[Ts]=null,qa=Ns[--Ts],Ns[Ts]=null;for(;i===Ur;)Ur=Yn[--Xn],Yn[Xn]=null,Wi=Yn[--Xn],Yn[Xn]=null,$i=Yn[--Xn],Yn[Xn]=null}var Fn=null,zn=null,_t=!1,hi=null;function fp(i,s){var c=ei(5,null,null,0);c.elementType="DELETED",c.stateNode=s,c.return=i,s=i.deletions,s===null?(i.deletions=[c],i.flags|=16):s.push(c)}function pp(i,s){switch(i.tag){case 5:var c=i.type;return s=s.nodeType!==1||c.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Fn=i,zn=lr(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Fn=i,zn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=Ur!==null?{id:$i,overflow:Wi}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=ei(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,Fn=i,zn=null,!0):!1;default:return!1}}function iu(i){return(i.mode&1)!==0&&(i.flags&128)===0}function ru(i){if(_t){var s=zn;if(s){var c=s;if(!pp(i,s)){if(iu(i))throw Error(n(418));s=lr(c.nextSibling);var f=Fn;s&&pp(i,s)?fp(f,c):(i.flags=i.flags&-4097|2,_t=!1,Fn=i)}}else{if(iu(i))throw Error(n(418));i.flags=i.flags&-4097|2,_t=!1,Fn=i}}}function mp(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Fn=i}function Va(i){if(i!==Fn)return!1;if(!_t)return mp(i),_t=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Yc(i.type,i.memoizedProps)),s&&(s=zn)){if(iu(i))throw gp(),Error(n(418));for(;s;)fp(i,s),s=lr(s.nextSibling)}if(mp(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"){if(s===0){zn=lr(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}zn=null}}else zn=Fn?lr(i.stateNode.nextSibling):null;return!0}function gp(){for(var i=zn;i;)i=lr(i.nextSibling)}function Rs(){zn=Fn=null,_t=!1}function su(i){hi===null?hi=[i]:hi.push(i)}var FS=O.ReactCurrentBatchConfig;function bo(i,s,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var f=c.stateNode}if(!f)throw Error(n(147,i));var g=f,v=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===v?s.ref:(s=function(x){var M=g.refs;x===null?delete M[v]:M[v]=x},s._stringRef=v,s)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Ga(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function _p(i){var s=i._init;return s(i._payload)}function vp(i){function s(H,U){if(i){var q=H.deletions;q===null?(H.deletions=[U],H.flags|=16):q.push(U)}}function c(H,U){if(!i)return null;for(;U!==null;)s(H,U),U=U.sibling;return null}function f(H,U){for(H=new Map;U!==null;)U.key!==null?H.set(U.key,U):H.set(U.index,U),U=U.sibling;return H}function g(H,U){return H=yr(H,U),H.index=0,H.sibling=null,H}function v(H,U,q){return H.index=q,i?(q=H.alternate,q!==null?(q=q.index,q<U?(H.flags|=2,U):q):(H.flags|=2,U)):(H.flags|=1048576,U)}function x(H){return i&&H.alternate===null&&(H.flags|=2),H}function M(H,U,q,ue){return U===null||U.tag!==6?(U=Xu(q,H.mode,ue),U.return=H,U):(U=g(U,q),U.return=H,U)}function B(H,U,q,ue){var Ee=q.type;return Ee===re?oe(H,U,q.props.children,ue,q.key):U!==null&&(U.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Y&&_p(Ee)===U.type)?(ue=g(U,q.props),ue.ref=bo(H,U,q),ue.return=H,ue):(ue=vl(q.type,q.key,q.props,null,H.mode,ue),ue.ref=bo(H,U,q),ue.return=H,ue)}function V(H,U,q,ue){return U===null||U.tag!==4||U.stateNode.containerInfo!==q.containerInfo||U.stateNode.implementation!==q.implementation?(U=Zu(q,H.mode,ue),U.return=H,U):(U=g(U,q.children||[]),U.return=H,U)}function oe(H,U,q,ue,Ee){return U===null||U.tag!==7?(U=Yr(q,H.mode,ue,Ee),U.return=H,U):(U=g(U,q),U.return=H,U)}function ae(H,U,q){if(typeof U=="string"&&U!==""||typeof U=="number")return U=Xu(""+U,H.mode,q),U.return=H,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case K:return q=vl(U.type,U.key,U.props,null,H.mode,q),q.ref=bo(H,null,U),q.return=H,q;case I:return U=Zu(U,H.mode,q),U.return=H,U;case Y:var ue=U._init;return ae(H,ue(U._payload),q)}if(oi(U)||ie(U))return U=Yr(U,H.mode,q,null),U.return=H,U;Ga(H,U)}return null}function se(H,U,q,ue){var Ee=U!==null?U.key:null;if(typeof q=="string"&&q!==""||typeof q=="number")return Ee!==null?null:M(H,U,""+q,ue);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case K:return q.key===Ee?B(H,U,q,ue):null;case I:return q.key===Ee?V(H,U,q,ue):null;case Y:return Ee=q._init,se(H,U,Ee(q._payload),ue)}if(oi(q)||ie(q))return Ee!==null?null:oe(H,U,q,ue,null);Ga(H,q)}return null}function ge(H,U,q,ue,Ee){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return H=H.get(q)||null,M(U,H,""+ue,Ee);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case K:return H=H.get(ue.key===null?q:ue.key)||null,B(U,H,ue,Ee);case I:return H=H.get(ue.key===null?q:ue.key)||null,V(U,H,ue,Ee);case Y:var Re=ue._init;return ge(H,U,q,Re(ue._payload),Ee)}if(oi(ue)||ie(ue))return H=H.get(q)||null,oe(U,H,ue,Ee,null);Ga(U,ue)}return null}function xe(H,U,q,ue){for(var Ee=null,Re=null,Me=U,Pe=U=0,Xt=null;Me!==null&&Pe<q.length;Pe++){Me.index>Pe?(Xt=Me,Me=null):Xt=Me.sibling;var it=se(H,Me,q[Pe],ue);if(it===null){Me===null&&(Me=Xt);break}i&&Me&&it.alternate===null&&s(H,Me),U=v(it,U,Pe),Re===null?Ee=it:Re.sibling=it,Re=it,Me=Xt}if(Pe===q.length)return c(H,Me),_t&&jr(H,Pe),Ee;if(Me===null){for(;Pe<q.length;Pe++)Me=ae(H,q[Pe],ue),Me!==null&&(U=v(Me,U,Pe),Re===null?Ee=Me:Re.sibling=Me,Re=Me);return _t&&jr(H,Pe),Ee}for(Me=f(H,Me);Pe<q.length;Pe++)Xt=ge(Me,H,Pe,q[Pe],ue),Xt!==null&&(i&&Xt.alternate!==null&&Me.delete(Xt.key===null?Pe:Xt.key),U=v(Xt,U,Pe),Re===null?Ee=Xt:Re.sibling=Xt,Re=Xt);return i&&Me.forEach(function(br){return s(H,br)}),_t&&jr(H,Pe),Ee}function ke(H,U,q,ue){var Ee=ie(q);if(typeof Ee!="function")throw Error(n(150));if(q=Ee.call(q),q==null)throw Error(n(151));for(var Re=Ee=null,Me=U,Pe=U=0,Xt=null,it=q.next();Me!==null&&!it.done;Pe++,it=q.next()){Me.index>Pe?(Xt=Me,Me=null):Xt=Me.sibling;var br=se(H,Me,it.value,ue);if(br===null){Me===null&&(Me=Xt);break}i&&Me&&br.alternate===null&&s(H,Me),U=v(br,U,Pe),Re===null?Ee=br:Re.sibling=br,Re=br,Me=Xt}if(it.done)return c(H,Me),_t&&jr(H,Pe),Ee;if(Me===null){for(;!it.done;Pe++,it=q.next())it=ae(H,it.value,ue),it!==null&&(U=v(it,U,Pe),Re===null?Ee=it:Re.sibling=it,Re=it);return _t&&jr(H,Pe),Ee}for(Me=f(H,Me);!it.done;Pe++,it=q.next())it=ge(Me,H,Pe,it.value,ue),it!==null&&(i&&it.alternate!==null&&Me.delete(it.key===null?Pe:it.key),U=v(it,U,Pe),Re===null?Ee=it:Re.sibling=it,Re=it);return i&&Me.forEach(function(_w){return s(H,_w)}),_t&&jr(H,Pe),Ee}function At(H,U,q,ue){if(typeof q=="object"&&q!==null&&q.type===re&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case K:e:{for(var Ee=q.key,Re=U;Re!==null;){if(Re.key===Ee){if(Ee=q.type,Ee===re){if(Re.tag===7){c(H,Re.sibling),U=g(Re,q.props.children),U.return=H,H=U;break e}}else if(Re.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Y&&_p(Ee)===Re.type){c(H,Re.sibling),U=g(Re,q.props),U.ref=bo(H,Re,q),U.return=H,H=U;break e}c(H,Re);break}else s(H,Re);Re=Re.sibling}q.type===re?(U=Yr(q.props.children,H.mode,ue,q.key),U.return=H,H=U):(ue=vl(q.type,q.key,q.props,null,H.mode,ue),ue.ref=bo(H,U,q),ue.return=H,H=ue)}return x(H);case I:e:{for(Re=q.key;U!==null;){if(U.key===Re)if(U.tag===4&&U.stateNode.containerInfo===q.containerInfo&&U.stateNode.implementation===q.implementation){c(H,U.sibling),U=g(U,q.children||[]),U.return=H,H=U;break e}else{c(H,U);break}else s(H,U);U=U.sibling}U=Zu(q,H.mode,ue),U.return=H,H=U}return x(H);case Y:return Re=q._init,At(H,U,Re(q._payload),ue)}if(oi(q))return xe(H,U,q,ue);if(ie(q))return ke(H,U,q,ue);Ga(H,q)}return typeof q=="string"&&q!==""||typeof q=="number"?(q=""+q,U!==null&&U.tag===6?(c(H,U.sibling),U=g(U,q),U.return=H,H=U):(c(H,U),U=Xu(q,H.mode,ue),U.return=H,H=U),x(H)):c(H,U)}return At}var Ms=vp(!0),yp=vp(!1),Ya=cr(null),Xa=null,As=null,ou=null;function au(){ou=As=Xa=null}function lu(i){var s=Ya.current;pt(Ya),i._currentValue=s}function cu(i,s,c){for(;i!==null;){var f=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),i===c)break;i=i.return}}function Os(i,s){Xa=i,ou=As=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(Tn=!0),i.firstContext=null)}function Zn(i){var s=i._currentValue;if(ou!==i)if(i={context:i,memoizedValue:s,next:null},As===null){if(Xa===null)throw Error(n(308));As=i,Xa.dependencies={lanes:0,firstContext:i}}else As=As.next=i;return s}var Hr=null;function uu(i){Hr===null?Hr=[i]:Hr.push(i)}function bp(i,s,c,f){var g=s.interleaved;return g===null?(c.next=c,uu(s)):(c.next=g.next,g.next=c),s.interleaved=c,Ki(i,f)}function Ki(i,s){i.lanes|=s;var c=i.alternate;for(c!==null&&(c.lanes|=s),c=i,i=i.return;i!==null;)i.childLanes|=s,c=i.alternate,c!==null&&(c.childLanes|=s),c=i,i=i.return;return c.tag===3?c.stateNode:null}var dr=!1;function hu(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Sp(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function qi(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function fr(i,s,c){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(tt&2)!==0){var g=f.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),f.pending=s,Ki(i,c)}return g=f.interleaved,g===null?(s.next=s,uu(f)):(s.next=g.next,g.next=s),f.interleaved=s,Ki(i,c)}function Za(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var f=s.lanes;f&=i.pendingLanes,c|=f,s.lanes=c,no(i,c)}}function wp(i,s){var c=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,c===f)){var g=null,v=null;if(c=c.firstBaseUpdate,c!==null){do{var x={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};v===null?g=v=x:v=v.next=x,c=c.next}while(c!==null);v===null?g=v=s:v=v.next=s}else g=v=s;c={baseState:f.baseState,firstBaseUpdate:g,lastBaseUpdate:v,shared:f.shared,effects:f.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}function Qa(i,s,c,f){var g=i.updateQueue;dr=!1;var v=g.firstBaseUpdate,x=g.lastBaseUpdate,M=g.shared.pending;if(M!==null){g.shared.pending=null;var B=M,V=B.next;B.next=null,x===null?v=V:x.next=V,x=B;var oe=i.alternate;oe!==null&&(oe=oe.updateQueue,M=oe.lastBaseUpdate,M!==x&&(M===null?oe.firstBaseUpdate=V:M.next=V,oe.lastBaseUpdate=B))}if(v!==null){var ae=g.baseState;x=0,oe=V=B=null,M=v;do{var se=M.lane,ge=M.eventTime;if((f&se)===se){oe!==null&&(oe=oe.next={eventTime:ge,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var xe=i,ke=M;switch(se=s,ge=c,ke.tag){case 1:if(xe=ke.payload,typeof xe=="function"){ae=xe.call(ge,ae,se);break e}ae=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=ke.payload,se=typeof xe=="function"?xe.call(ge,ae,se):xe,se==null)break e;ae=C({},ae,se);break e;case 2:dr=!0}}M.callback!==null&&M.lane!==0&&(i.flags|=64,se=g.effects,se===null?g.effects=[M]:se.push(M))}else ge={eventTime:ge,lane:se,tag:M.tag,payload:M.payload,callback:M.callback,next:null},oe===null?(V=oe=ge,B=ae):oe=oe.next=ge,x|=se;if(M=M.next,M===null){if(M=g.shared.pending,M===null)break;se=M,M=se.next,se.next=null,g.lastBaseUpdate=se,g.shared.pending=null}}while(!0);if(oe===null&&(B=ae),g.baseState=B,g.firstBaseUpdate=V,g.lastBaseUpdate=oe,s=g.shared.interleaved,s!==null){g=s;do x|=g.lane,g=g.next;while(g!==s)}else v===null&&(g.shared.lanes=0);Kr|=x,i.lanes=x,i.memoizedState=ae}}function xp(i,s,c){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var f=i[s],g=f.callback;if(g!==null){if(f.callback=null,f=c,typeof g!="function")throw Error(n(191,g));g.call(f)}}}var So={},ki=cr(So),wo=cr(So),xo=cr(So);function $r(i){if(i===So)throw Error(n(174));return i}function du(i,s){switch(ht(xo,s),ht(wo,i),ht(ki,So),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:he(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=he(s,i)}pt(ki),ht(ki,s)}function Ls(){pt(ki),pt(wo),pt(xo)}function kp(i){$r(xo.current);var s=$r(ki.current),c=he(s,i.type);s!==c&&(ht(wo,i),ht(ki,c))}function fu(i){wo.current===i&&(pt(ki),pt(wo))}var St=cr(0);function Ja(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var pu=[];function mu(){for(var i=0;i<pu.length;i++)pu[i]._workInProgressVersionPrimary=null;pu.length=0}var el=O.ReactCurrentDispatcher,gu=O.ReactCurrentBatchConfig,Wr=0,wt=null,jt=null,Gt=null,tl=!1,ko=!1,Eo=0,zS=0;function un(){throw Error(n(321))}function _u(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!ui(i[c],s[c]))return!1;return!0}function vu(i,s,c,f,g,v){if(Wr=v,wt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,el.current=i===null||i.memoizedState===null?$S:WS,i=c(f,g),ko){v=0;do{if(ko=!1,Eo=0,25<=v)throw Error(n(301));v+=1,Gt=jt=null,s.updateQueue=null,el.current=KS,i=c(f,g)}while(ko)}if(el.current=rl,s=jt!==null&&jt.next!==null,Wr=0,Gt=jt=wt=null,tl=!1,s)throw Error(n(300));return i}function yu(){var i=Eo!==0;return Eo=0,i}function Ei(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Gt===null?wt.memoizedState=Gt=i:Gt=Gt.next=i,Gt}function Qn(){if(jt===null){var i=wt.alternate;i=i!==null?i.memoizedState:null}else i=jt.next;var s=Gt===null?wt.memoizedState:Gt.next;if(s!==null)Gt=s,jt=i;else{if(i===null)throw Error(n(310));jt=i,i={memoizedState:jt.memoizedState,baseState:jt.baseState,baseQueue:jt.baseQueue,queue:jt.queue,next:null},Gt===null?wt.memoizedState=Gt=i:Gt=Gt.next=i}return Gt}function Co(i,s){return typeof s=="function"?s(i):s}function bu(i){var s=Qn(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var f=jt,g=f.baseQueue,v=c.pending;if(v!==null){if(g!==null){var x=g.next;g.next=v.next,v.next=x}f.baseQueue=g=v,c.pending=null}if(g!==null){v=g.next,f=f.baseState;var M=x=null,B=null,V=v;do{var oe=V.lane;if((Wr&oe)===oe)B!==null&&(B=B.next={lane:0,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),f=V.hasEagerState?V.eagerState:i(f,V.action);else{var ae={lane:oe,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null};B===null?(M=B=ae,x=f):B=B.next=ae,wt.lanes|=oe,Kr|=oe}V=V.next}while(V!==null&&V!==v);B===null?x=f:B.next=M,ui(f,s.memoizedState)||(Tn=!0),s.memoizedState=f,s.baseState=x,s.baseQueue=B,c.lastRenderedState=f}if(i=c.interleaved,i!==null){g=i;do v=g.lane,wt.lanes|=v,Kr|=v,g=g.next;while(g!==i)}else g===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Su(i){var s=Qn(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var f=c.dispatch,g=c.pending,v=s.memoizedState;if(g!==null){c.pending=null;var x=g=g.next;do v=i(v,x.action),x=x.next;while(x!==g);ui(v,s.memoizedState)||(Tn=!0),s.memoizedState=v,s.baseQueue===null&&(s.baseState=v),c.lastRenderedState=v}return[v,f]}function Ep(){}function Cp(i,s){var c=wt,f=Qn(),g=s(),v=!ui(f.memoizedState,g);if(v&&(f.memoizedState=g,Tn=!0),f=f.queue,wu(Rp.bind(null,c,f,i),[i]),f.getSnapshot!==s||v||Gt!==null&&Gt.memoizedState.tag&1){if(c.flags|=2048,No(9,Tp.bind(null,c,f,g,s),void 0,null),Yt===null)throw Error(n(349));(Wr&30)!==0||Np(c,s,g)}return g}function Np(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=wt.updateQueue,s===null?(s={lastEffect:null,stores:null},wt.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function Tp(i,s,c,f){s.value=c,s.getSnapshot=f,Mp(s)&&Ap(i)}function Rp(i,s,c){return c(function(){Mp(s)&&Ap(i)})}function Mp(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!ui(i,c)}catch{return!0}}function Ap(i){var s=Ki(i,1);s!==null&&mi(s,i,1,-1)}function Op(i){var s=Ei();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Co,lastRenderedState:i},s.queue=i,i=i.dispatch=HS.bind(null,wt,i),[s.memoizedState,i]}function No(i,s,c,f){return i={tag:i,create:s,destroy:c,deps:f,next:null},s=wt.updateQueue,s===null?(s={lastEffect:null,stores:null},wt.updateQueue=s,s.lastEffect=i.next=i):(c=s.lastEffect,c===null?s.lastEffect=i.next=i:(f=c.next,c.next=i,i.next=f,s.lastEffect=i)),i}function Lp(){return Qn().memoizedState}function nl(i,s,c,f){var g=Ei();wt.flags|=i,g.memoizedState=No(1|s,c,void 0,f===void 0?null:f)}function il(i,s,c,f){var g=Qn();f=f===void 0?null:f;var v=void 0;if(jt!==null){var x=jt.memoizedState;if(v=x.destroy,f!==null&&_u(f,x.deps)){g.memoizedState=No(s,c,v,f);return}}wt.flags|=i,g.memoizedState=No(1|s,c,v,f)}function Ip(i,s){return nl(8390656,8,i,s)}function wu(i,s){return il(2048,8,i,s)}function Dp(i,s){return il(4,2,i,s)}function Pp(i,s){return il(4,4,i,s)}function Bp(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function Fp(i,s,c){return c=c!=null?c.concat([i]):null,il(4,4,Bp.bind(null,s,i),c)}function xu(){}function zp(i,s){var c=Qn();s=s===void 0?null:s;var f=c.memoizedState;return f!==null&&s!==null&&_u(s,f[1])?f[0]:(c.memoizedState=[i,s],i)}function Up(i,s){var c=Qn();s=s===void 0?null:s;var f=c.memoizedState;return f!==null&&s!==null&&_u(s,f[1])?f[0]:(i=i(),c.memoizedState=[i,s],i)}function jp(i,s,c){return(Wr&21)===0?(i.baseState&&(i.baseState=!1,Tn=!0),i.memoizedState=c):(ui(c,s)||(c=Ea(),wt.lanes|=c,Kr|=c,i.baseState=!0),s)}function US(i,s){var c=et;et=c!==0&&4>c?c:4,i(!0);var f=gu.transition;gu.transition={};try{i(!1),s()}finally{et=c,gu.transition=f}}function Hp(){return Qn().memoizedState}function jS(i,s,c){var f=_r(i);if(c={lane:f,action:c,hasEagerState:!1,eagerState:null,next:null},$p(i))Wp(s,c);else if(c=bp(i,s,c,f),c!==null){var g=yn();mi(c,i,f,g),Kp(c,s,f)}}function HS(i,s,c){var f=_r(i),g={lane:f,action:c,hasEagerState:!1,eagerState:null,next:null};if($p(i))Wp(s,g);else{var v=i.alternate;if(i.lanes===0&&(v===null||v.lanes===0)&&(v=s.lastRenderedReducer,v!==null))try{var x=s.lastRenderedState,M=v(x,c);if(g.hasEagerState=!0,g.eagerState=M,ui(M,x)){var B=s.interleaved;B===null?(g.next=g,uu(s)):(g.next=B.next,B.next=g),s.interleaved=g;return}}catch{}finally{}c=bp(i,s,g,f),c!==null&&(g=yn(),mi(c,i,f,g),Kp(c,s,f))}}function $p(i){var s=i.alternate;return i===wt||s!==null&&s===wt}function Wp(i,s){ko=tl=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function Kp(i,s,c){if((c&4194240)!==0){var f=s.lanes;f&=i.pendingLanes,c|=f,s.lanes=c,no(i,c)}}var rl={readContext:Zn,useCallback:un,useContext:un,useEffect:un,useImperativeHandle:un,useInsertionEffect:un,useLayoutEffect:un,useMemo:un,useReducer:un,useRef:un,useState:un,useDebugValue:un,useDeferredValue:un,useTransition:un,useMutableSource:un,useSyncExternalStore:un,useId:un,unstable_isNewReconciler:!1},$S={readContext:Zn,useCallback:function(i,s){return Ei().memoizedState=[i,s===void 0?null:s],i},useContext:Zn,useEffect:Ip,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,nl(4194308,4,Bp.bind(null,s,i),c)},useLayoutEffect:function(i,s){return nl(4194308,4,i,s)},useInsertionEffect:function(i,s){return nl(4,2,i,s)},useMemo:function(i,s){var c=Ei();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var f=Ei();return s=c!==void 0?c(s):s,f.memoizedState=f.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},f.queue=i,i=i.dispatch=jS.bind(null,wt,i),[f.memoizedState,i]},useRef:function(i){var s=Ei();return i={current:i},s.memoizedState=i},useState:Op,useDebugValue:xu,useDeferredValue:function(i){return Ei().memoizedState=i},useTransition:function(){var i=Op(!1),s=i[0];return i=US.bind(null,i[1]),Ei().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var f=wt,g=Ei();if(_t){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),Yt===null)throw Error(n(349));(Wr&30)!==0||Np(f,s,c)}g.memoizedState=c;var v={value:c,getSnapshot:s};return g.queue=v,Ip(Rp.bind(null,f,v,i),[i]),f.flags|=2048,No(9,Tp.bind(null,f,v,c,s),void 0,null),c},useId:function(){var i=Ei(),s=Yt.identifierPrefix;if(_t){var c=Wi,f=$i;c=(f&~(1<<32-bt(f)-1)).toString(32)+c,s=":"+s+"R"+c,c=Eo++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=zS++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},WS={readContext:Zn,useCallback:zp,useContext:Zn,useEffect:wu,useImperativeHandle:Fp,useInsertionEffect:Dp,useLayoutEffect:Pp,useMemo:Up,useReducer:bu,useRef:Lp,useState:function(){return bu(Co)},useDebugValue:xu,useDeferredValue:function(i){var s=Qn();return jp(s,jt.memoizedState,i)},useTransition:function(){var i=bu(Co)[0],s=Qn().memoizedState;return[i,s]},useMutableSource:Ep,useSyncExternalStore:Cp,useId:Hp,unstable_isNewReconciler:!1},KS={readContext:Zn,useCallback:zp,useContext:Zn,useEffect:wu,useImperativeHandle:Fp,useInsertionEffect:Dp,useLayoutEffect:Pp,useMemo:Up,useReducer:Su,useRef:Lp,useState:function(){return Su(Co)},useDebugValue:xu,useDeferredValue:function(i){var s=Qn();return jt===null?s.memoizedState=i:jp(s,jt.memoizedState,i)},useTransition:function(){var i=Su(Co)[0],s=Qn().memoizedState;return[i,s]},useMutableSource:Ep,useSyncExternalStore:Cp,useId:Hp,unstable_isNewReconciler:!1};function di(i,s){if(i&&i.defaultProps){s=C({},s),i=i.defaultProps;for(var c in i)s[c]===void 0&&(s[c]=i[c]);return s}return s}function ku(i,s,c,f){s=i.memoizedState,c=c(f,s),c=c==null?s:C({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var sl={isMounted:function(i){return(i=i._reactInternals)?Ui(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var f=yn(),g=_r(i),v=qi(f,g);v.payload=s,c!=null&&(v.callback=c),s=fr(i,v,g),s!==null&&(mi(s,i,g,f),Za(s,i,g))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var f=yn(),g=_r(i),v=qi(f,g);v.tag=1,v.payload=s,c!=null&&(v.callback=c),s=fr(i,v,g),s!==null&&(mi(s,i,g,f),Za(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=yn(),f=_r(i),g=qi(c,f);g.tag=2,s!=null&&(g.callback=s),s=fr(i,g,f),s!==null&&(mi(s,i,f,c),Za(s,i,f))}};function qp(i,s,c,f,g,v,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,v,x):s.prototype&&s.prototype.isPureReactComponent?!fo(c,f)||!fo(g,v):!0}function Vp(i,s,c){var f=!1,g=ur,v=s.contextType;return typeof v=="object"&&v!==null?v=Zn(v):(g=Nn(s)?zr:cn.current,f=s.contextTypes,v=(f=f!=null)?Cs(i,g):ur),s=new s(c,v),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=sl,i.stateNode=s,s._reactInternals=i,f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=v),s}function Gp(i,s,c,f){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,f),s.state!==i&&sl.enqueueReplaceState(s,s.state,null)}function Eu(i,s,c,f){var g=i.stateNode;g.props=c,g.state=i.memoizedState,g.refs={},hu(i);var v=s.contextType;typeof v=="object"&&v!==null?g.context=Zn(v):(v=Nn(s)?zr:cn.current,g.context=Cs(i,v)),g.state=i.memoizedState,v=s.getDerivedStateFromProps,typeof v=="function"&&(ku(i,s,v,c),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&sl.enqueueReplaceState(g,g.state,null),Qa(i,c,g,f),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function Is(i,s){try{var c="",f=s;do c+=Ne(f),f=f.return;while(f);var g=c}catch(v){g=`
39
39
  Error generating stack: `+v.message+`
40
- `+v.stack}return{value:i,source:s,stack:g,digest:null}}function Cu(i,s,c){return{value:i,source:null,stack:c??null,digest:s??null}}function Nu(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var qS=typeof WeakMap=="function"?WeakMap:Map;function Yp(i,s,c){c=qi(-1,c),c.tag=3,c.payload={element:null};var f=s.value;return c.callback=function(){dl||(dl=!0,Hu=f),Nu(i,s)},c}function Xp(i,s,c){c=qi(-1,c),c.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var g=s.value;c.payload=function(){return f(g)},c.callback=function(){Nu(i,s)}}var v=i.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(c.callback=function(){Nu(i,s),typeof f!="function"&&(mr===null?mr=new Set([this]):mr.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),c}function Zp(i,s,c){var f=i.pingCache;if(f===null){f=i.pingCache=new qS;var g=new Set;f.set(s,g)}else g=f.get(s),g===void 0&&(g=new Set,f.set(s,g));g.has(c)||(g.add(c),i=ow.bind(null,i,s,c),s.then(i,i))}function Qp(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function Jp(i,s,c,f,g){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=qi(-1,1),s.tag=2,fr(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var VS=O.ReactCurrentOwner,Tn=!1;function vn(i,s,c,f){s.child=i===null?yp(s,null,c,f):Ms(s,i.child,c,f)}function em(i,s,c,f,g){c=c.render;var v=s.ref;return Os(s,g),f=vu(i,s,c,f,v,g),c=yu(),i!==null&&!Tn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Vi(i,s,g)):(_t&&c&&tu(s),s.flags|=1,vn(i,s,f,g),s.child)}function tm(i,s,c,f,g){if(i===null){var v=c.type;return typeof v=="function"&&!Yu(v)&&v.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=v,nm(i,s,v,f,g)):(i=vl(c.type,null,f,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(v=i.child,(i.lanes&g)===0){var x=v.memoizedProps;if(c=c.compare,c=c!==null?c:fo,c(x,f)&&i.ref===s.ref)return Vi(i,s,g)}return s.flags|=1,i=yr(v,f),i.ref=s.ref,i.return=s,s.child=i}function nm(i,s,c,f,g){if(i!==null){var v=i.memoizedProps;if(fo(v,f)&&i.ref===s.ref)if(Tn=!1,s.pendingProps=f=v,(i.lanes&g)!==0)(i.flags&131072)!==0&&(Tn=!0);else return s.lanes=i.lanes,Vi(i,s,g)}return Tu(i,s,c,f,g)}function im(i,s,c){var f=s.pendingProps,g=f.children,v=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ht(Ps,Un),Un|=c;else{if((c&1073741824)===0)return i=v!==null?v.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,ht(Ps,Un),Un|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=v!==null?v.baseLanes:c,ht(Ps,Un),Un|=f}else v!==null?(f=v.baseLanes|c,s.memoizedState=null):f=c,ht(Ps,Un),Un|=f;return vn(i,s,g,c),s.child}function rm(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Tu(i,s,c,f,g){var v=Nn(c)?zr:cn.current;return v=Cs(s,v),Os(s,g),c=vu(i,s,c,f,v,g),f=yu(),i!==null&&!Tn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Vi(i,s,g)):(_t&&f&&tu(s),s.flags|=1,vn(i,s,c,g),s.child)}function sm(i,s,c,f,g){if(Nn(c)){var v=!0;$a(s)}else v=!1;if(Os(s,g),s.stateNode===null)al(i,s),Vp(s,c,f),Eu(s,c,f,g),f=!0;else if(i===null){var x=s.stateNode,M=s.memoizedProps;x.props=M;var B=x.context,V=c.contextType;typeof V=="object"&&V!==null?V=Zn(V):(V=Nn(c)?zr:cn.current,V=Cs(s,V));var oe=c.getDerivedStateFromProps,ae=typeof oe=="function"||typeof x.getSnapshotBeforeUpdate=="function";ae||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(M!==f||B!==V)&&Gp(s,x,f,V),dr=!1;var se=s.memoizedState;x.state=se,Qa(s,f,x,g),B=s.memoizedState,M!==f||se!==B||Cn.current||dr?(typeof oe=="function"&&(ku(s,c,oe,f),B=s.memoizedState),(M=dr||qp(s,c,M,f,se,B,V))?(ae||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=B),x.props=f,x.state=B,x.context=V,f=M):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{x=s.stateNode,Sp(i,s),M=s.memoizedProps,V=s.type===s.elementType?M:di(s.type,M),x.props=V,ae=s.pendingProps,se=x.context,B=c.contextType,typeof B=="object"&&B!==null?B=Zn(B):(B=Nn(c)?zr:cn.current,B=Cs(s,B));var ge=c.getDerivedStateFromProps;(oe=typeof ge=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(M!==ae||se!==B)&&Gp(s,x,f,B),dr=!1,se=s.memoizedState,x.state=se,Qa(s,f,x,g);var xe=s.memoizedState;M!==ae||se!==xe||Cn.current||dr?(typeof ge=="function"&&(ku(s,c,ge,f),xe=s.memoizedState),(V=dr||qp(s,c,V,f,se,xe,B)||!1)?(oe||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(f,xe,B),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(f,xe,B)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||M===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=xe),x.props=f,x.state=xe,x.context=B,f=V):(typeof x.componentDidUpdate!="function"||M===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),f=!1)}return Ru(i,s,c,f,v,g)}function Ru(i,s,c,f,g,v){rm(i,s);var x=(s.flags&128)!==0;if(!f&&!x)return g&&up(s,c,!1),Vi(i,s,v);f=s.stateNode,VS.current=s;var M=x&&typeof c.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&x?(s.child=Ms(s,i.child,null,v),s.child=Ms(s,null,M,v)):vn(i,s,M,v),s.memoizedState=f.state,g&&up(s,c,!0),s.child}function om(i){var s=i.stateNode;s.pendingContext?lp(i,s.pendingContext,s.pendingContext!==s.context):s.context&&lp(i,s.context,!1),du(i,s.containerInfo)}function am(i,s,c,f,g){return Rs(),su(g),s.flags|=256,vn(i,s,c,f),s.child}var Mu={dehydrated:null,treeContext:null,retryLane:0};function Au(i){return{baseLanes:i,cachePool:null,transitions:null}}function lm(i,s,c){var f=s.pendingProps,g=St.current,v=!1,x=(s.flags&128)!==0,M;if((M=x)||(M=i!==null&&i.memoizedState===null?!1:(g&2)!==0),M?(v=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),ht(St,g&1),i===null)return ru(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=f.children,i=f.fallback,v?(f=s.mode,v=s.child,x={mode:"hidden",children:x},(f&1)===0&&v!==null?(v.childLanes=0,v.pendingProps=x):v=yl(x,f,0,null),i=Yr(i,f,c,null),v.return=s,i.return=s,v.sibling=i,s.child=v,s.child.memoizedState=Au(c),s.memoizedState=Mu,i):Ou(s,x));if(g=i.memoizedState,g!==null&&(M=g.dehydrated,M!==null))return GS(i,s,x,f,M,g,c);if(v){v=f.fallback,x=s.mode,g=i.child,M=g.sibling;var B={mode:"hidden",children:f.children};return(x&1)===0&&s.child!==g?(f=s.child,f.childLanes=0,f.pendingProps=B,s.deletions=null):(f=yr(g,B),f.subtreeFlags=g.subtreeFlags&14680064),M!==null?v=yr(M,v):(v=Yr(v,x,c,null),v.flags|=2),v.return=s,f.return=s,f.sibling=v,s.child=f,f=v,v=s.child,x=i.child.memoizedState,x=x===null?Au(c):{baseLanes:x.baseLanes|c,cachePool:null,transitions:x.transitions},v.memoizedState=x,v.childLanes=i.childLanes&~c,s.memoizedState=Mu,f}return v=i.child,i=v.sibling,f=yr(v,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=c),f.return=s,f.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=f,s.memoizedState=null,f}function Ou(i,s){return s=yl({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function ol(i,s,c,f){return f!==null&&su(f),Ms(s,i.child,null,c),i=Ou(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function GS(i,s,c,f,g,v,x){if(c)return s.flags&256?(s.flags&=-257,f=Cu(Error(n(422))),ol(i,s,x,f)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(v=f.fallback,g=s.mode,f=yl({mode:"visible",children:f.children},g,0,null),v=Yr(v,g,x,null),v.flags|=2,f.return=s,v.return=s,f.sibling=v,s.child=f,(s.mode&1)!==0&&Ms(s,i.child,null,x),s.child.memoizedState=Au(x),s.memoizedState=Mu,v);if((s.mode&1)===0)return ol(i,s,x,null);if(g.data==="$!"){if(f=g.nextSibling&&g.nextSibling.dataset,f)var M=f.dgst;return f=M,v=Error(n(419)),f=Cu(v,f,void 0),ol(i,s,x,f)}if(M=(x&i.childLanes)!==0,Tn||M){if(f=Yt,f!==null){switch(x&-x){case 4:g=2;break;case 16:g=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:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(f.suspendedLanes|x))!==0?0:g,g!==0&&g!==v.retryLane&&(v.retryLane=g,Ki(i,g),mi(f,i,g,-1))}return Gu(),f=Cu(Error(n(421))),ol(i,s,x,f)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=aw.bind(null,i),g._reactRetry=s,null):(i=v.treeContext,zn=lr(g.nextSibling),Fn=s,_t=!0,hi=null,i!==null&&(Yn[Xn++]=$i,Yn[Xn++]=Wi,Yn[Xn++]=Ur,$i=i.id,Wi=i.overflow,Ur=s),s=Ou(s,f.children),s.flags|=4096,s)}function cm(i,s,c){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),cu(i.return,s,c)}function Lu(i,s,c,f,g){var v=i.memoizedState;v===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:c,tailMode:g}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=f,v.tail=c,v.tailMode=g)}function um(i,s,c){var f=s.pendingProps,g=f.revealOrder,v=f.tail;if(vn(i,s,f.children,c),f=St.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&cm(i,c,s);else if(i.tag===19)cm(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}if(ht(St,f),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(c=s.child,g=null;c!==null;)i=c.alternate,i!==null&&Ja(i)===null&&(g=c),c=c.sibling;c=g,c===null?(g=s.child,s.child=null):(g=c.sibling,c.sibling=null),Lu(s,!1,g,c,v);break;case"backwards":for(c=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&Ja(i)===null){s.child=g;break}i=g.sibling,g.sibling=c,c=g,g=i}Lu(s,!0,c,null,v);break;case"together":Lu(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function al(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Vi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Kr|=s.lanes,(c&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,c=yr(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=yr(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function YS(i,s,c){switch(s.tag){case 3:om(s),Rs();break;case 5:kp(s);break;case 1:Nn(s.type)&&$a(s);break;case 4:du(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,g=s.memoizedProps.value;ht(Ya,f._currentValue),f._currentValue=g;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(ht(St,St.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?lm(i,s,c):(ht(St,St.current&1),i=Vi(i,s,c),i!==null?i.sibling:null);ht(St,St.current&1);break;case 19:if(f=(c&s.childLanes)!==0,(i.flags&128)!==0){if(f)return um(i,s,c);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),ht(St,St.current),f)break;return null;case 22:case 23:return s.lanes=0,im(i,s,c)}return Vi(i,s,c)}var hm,Iu,dm,fm;hm=function(i,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Iu=function(){},dm=function(i,s,c,f){var g=i.memoizedProps;if(g!==f){i=s.stateNode,$r(ki.current);var v=null;switch(c){case"input":g=Dn(i,g),f=Dn(i,f),v=[];break;case"select":g=C({},g,{value:void 0}),f=C({},f,{value:void 0}),v=[];break;case"textarea":g=Rr(i,g),f=Rr(i,f),v=[];break;default:typeof g.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=Ua)}Ut(c,f);var x;c=null;for(V in g)if(!f.hasOwnProperty(V)&&g.hasOwnProperty(V)&&g[V]!=null)if(V==="style"){var M=g[V];for(x in M)M.hasOwnProperty(x)&&(c||(c={}),c[x]="")}else V!=="dangerouslySetInnerHTML"&&V!=="children"&&V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&V!=="autoFocus"&&(o.hasOwnProperty(V)?v||(v=[]):(v=v||[]).push(V,null));for(V in f){var B=f[V];if(M=g!=null?g[V]:void 0,f.hasOwnProperty(V)&&B!==M&&(B!=null||M!=null))if(V==="style")if(M){for(x in M)!M.hasOwnProperty(x)||B&&B.hasOwnProperty(x)||(c||(c={}),c[x]="");for(x in B)B.hasOwnProperty(x)&&M[x]!==B[x]&&(c||(c={}),c[x]=B[x])}else c||(v||(v=[]),v.push(V,c)),c=B;else V==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,M=M?M.__html:void 0,B!=null&&M!==B&&(v=v||[]).push(V,B)):V==="children"?typeof B!="string"&&typeof B!="number"||(v=v||[]).push(V,""+B):V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&(o.hasOwnProperty(V)?(B!=null&&V==="onScroll"&&ft("scroll",i),v||M===B||(v=[])):(v=v||[]).push(V,B))}c&&(v=v||[]).push("style",c);var V=v;(s.updateQueue=V)&&(s.flags|=4)}},fm=function(i,s,c,f){c!==f&&(s.flags|=4)};function To(i,s){if(!_t)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function hn(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,f=0;if(s)for(var g=i.child;g!==null;)c|=g.lanes|g.childLanes,f|=g.subtreeFlags&14680064,f|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)c|=g.lanes|g.childLanes,f|=g.subtreeFlags,f|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=f,i.childLanes=c,s}function XS(i,s,c){var f=s.pendingProps;switch(nu(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(s),null;case 1:return Nn(s.type)&&Ha(),hn(s),null;case 3:return f=s.stateNode,Ls(),pt(Cn),pt(cn),mu(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(Va(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,hi!==null&&(Ku(hi),hi=null))),Iu(i,s),hn(s),null;case 5:fu(s);var g=$r(xo.current);if(c=s.type,i!==null&&s.stateNode!=null)dm(i,s,c,f,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return hn(s),null}if(i=$r(ki.current),Va(s)){f=s.stateNode,c=s.type;var v=s.memoizedProps;switch(f[xi]=s,f[vo]=v,i=(s.mode&1)!==0,c){case"dialog":ft("cancel",f),ft("close",f);break;case"iframe":case"object":case"embed":ft("load",f);break;case"video":case"audio":for(g=0;g<mo.length;g++)ft(mo[g],f);break;case"source":ft("error",f);break;case"img":case"image":case"link":ft("error",f),ft("load",f);break;case"details":ft("toggle",f);break;case"input":Pi(f,v),ft("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!v.multiple},ft("invalid",f);break;case"textarea":Mr(f,v),ft("invalid",f)}Ut(c,v),g=null;for(var x in v)if(v.hasOwnProperty(x)){var M=v[x];x==="children"?typeof M=="string"?f.textContent!==M&&(v.suppressHydrationWarning!==!0&&za(f.textContent,M,i),g=["children",M]):typeof M=="number"&&f.textContent!==""+M&&(v.suppressHydrationWarning!==!0&&za(f.textContent,M,i),g=["children",""+M]):o.hasOwnProperty(x)&&M!=null&&x==="onScroll"&&ft("scroll",f)}switch(c){case"input":Ft(f),Kn(f,v,!0);break;case"textarea":Ft(f),Ar(f);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(f.onclick=Ua)}f=g,s.updateQueue=f,f!==null&&(s.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=J(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=x.createElement(c,{is:f.is}):(i=x.createElement(c),c==="select"&&(x=i,f.multiple?x.multiple=!0:f.size&&(x.size=f.size))):i=x.createElementNS(i,c),i[xi]=s,i[vo]=f,hm(i,s,!1,!1),s.stateNode=i;e:{switch(x=Vn(c,f),c){case"dialog":ft("cancel",i),ft("close",i),g=f;break;case"iframe":case"object":case"embed":ft("load",i),g=f;break;case"video":case"audio":for(g=0;g<mo.length;g++)ft(mo[g],i);g=f;break;case"source":ft("error",i),g=f;break;case"img":case"image":case"link":ft("error",i),ft("load",i),g=f;break;case"details":ft("toggle",i),g=f;break;case"input":Pi(i,f),g=Dn(i,f),ft("invalid",i);break;case"option":g=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},g=C({},f,{value:void 0}),ft("invalid",i);break;case"textarea":Mr(i,f),g=Rr(i,f),ft("invalid",i);break;default:g=f}Ut(c,g),M=g;for(v in M)if(M.hasOwnProperty(v)){var B=M[v];v==="style"?li(i,B):v==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,B!=null&&$e(i,B)):v==="children"?typeof B=="string"?(c!=="textarea"||B!=="")&&Xe(i,B):typeof B=="number"&&Xe(i,""+B):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(o.hasOwnProperty(v)?B!=null&&v==="onScroll"&&ft("scroll",i):B!=null&&N(i,v,B,x))}switch(c){case"input":Ft(i),Kn(i,f,!1);break;case"textarea":Ft(i),Ar(i);break;case"option":f.value!=null&&i.setAttribute("value",""+Ie(f.value));break;case"select":i.multiple=!!f.multiple,v=f.value,v!=null?yi(i,!!f.multiple,v,!1):f.defaultValue!=null&&yi(i,!!f.multiple,f.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=Ua)}switch(c){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return hn(s),null;case 6:if(i&&s.stateNode!=null)fm(i,s,i.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(c=$r(xo.current),$r(ki.current),Va(s)){if(f=s.stateNode,c=s.memoizedProps,f[xi]=s,(v=f.nodeValue!==c)&&(i=Fn,i!==null))switch(i.tag){case 3:za(f.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&za(f.nodeValue,c,(i.mode&1)!==0)}v&&(s.flags|=4)}else f=(c.nodeType===9?c:c.ownerDocument).createTextNode(f),f[xi]=s,s.stateNode=f}return hn(s),null;case 13:if(pt(St),f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(_t&&zn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)gp(),Rs(),s.flags|=98560,v=!1;else if(v=Va(s),f!==null&&f.dehydrated!==null){if(i===null){if(!v)throw Error(n(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(n(317));v[xi]=s}else Rs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;hn(s),v=!1}else hi!==null&&(Ku(hi),hi=null),v=!0;if(!v)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(f=f!==null,f!==(i!==null&&i.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(St.current&1)!==0?Ht===0&&(Ht=3):Gu())),s.updateQueue!==null&&(s.flags|=4),hn(s),null);case 4:return Ls(),Iu(i,s),i===null&&go(s.stateNode.containerInfo),hn(s),null;case 10:return lu(s.type._context),hn(s),null;case 17:return Nn(s.type)&&Ha(),hn(s),null;case 19:if(pt(St),v=s.memoizedState,v===null)return hn(s),null;if(f=(s.flags&128)!==0,x=v.rendering,x===null)if(f)To(v,!1);else{if(Ht!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=Ja(i),x!==null){for(s.flags|=128,To(v,!1),f=x.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=c,c=s.child;c!==null;)v=c,i=f,v.flags&=14680066,x=v.alternate,x===null?(v.childLanes=0,v.lanes=i,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=x.childLanes,v.lanes=x.lanes,v.child=x.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=x.memoizedProps,v.memoizedState=x.memoizedState,v.updateQueue=x.updateQueue,v.type=x.type,i=x.dependencies,v.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return ht(St,St.current&1|2),s.child}i=i.sibling}v.tail!==null&&yt()>Bs&&(s.flags|=128,f=!0,To(v,!1),s.lanes=4194304)}else{if(!f)if(i=Ja(x),i!==null){if(s.flags|=128,f=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),To(v,!0),v.tail===null&&v.tailMode==="hidden"&&!x.alternate&&!_t)return hn(s),null}else 2*yt()-v.renderingStartTime>Bs&&c!==1073741824&&(s.flags|=128,f=!0,To(v,!1),s.lanes=4194304);v.isBackwards?(x.sibling=s.child,s.child=x):(c=v.last,c!==null?c.sibling=x:s.child=x,v.last=x)}return v.tail!==null?(s=v.tail,v.rendering=s,v.tail=s.sibling,v.renderingStartTime=yt(),s.sibling=null,c=St.current,ht(St,f?c&1|2:c&1),s):(hn(s),null);case 22:case 23:return Vu(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(Un&1073741824)!==0&&(hn(s),s.subtreeFlags&6&&(s.flags|=8192)):hn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function ZS(i,s){switch(nu(s),s.tag){case 1:return Nn(s.type)&&Ha(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Ls(),pt(Cn),pt(cn),mu(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return fu(s),null;case 13:if(pt(St),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Rs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return pt(St),null;case 4:return Ls(),null;case 10:return lu(s.type._context),null;case 22:case 23:return Vu(),null;case 24:return null;default:return null}}var ll=!1,dn=!1,QS=typeof WeakSet=="function"?WeakSet:Set,we=null;function Ds(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(f){Ct(i,s,f)}else c.current=null}function Du(i,s,c){try{c()}catch(f){Ct(i,s,f)}}var pm=!1;function JS(i,s){if(Vc=Ta,i=qf(),zc(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var g=f.anchorOffset,v=f.focusNode;f=f.focusOffset;try{c.nodeType,v.nodeType}catch{c=null;break e}var x=0,M=-1,B=-1,V=0,oe=0,ae=i,se=null;t:for(;;){for(var ge;ae!==c||g!==0&&ae.nodeType!==3||(M=x+g),ae!==v||f!==0&&ae.nodeType!==3||(B=x+f),ae.nodeType===3&&(x+=ae.nodeValue.length),(ge=ae.firstChild)!==null;)se=ae,ae=ge;for(;;){if(ae===i)break t;if(se===c&&++V===g&&(M=x),se===v&&++oe===f&&(B=x),(ge=ae.nextSibling)!==null)break;ae=se,se=ae.parentNode}ae=ge}c=M===-1||B===-1?null:{start:M,end:B}}else c=null}c=c||{start:0,end:0}}else c=null;for(Gc={focusedElem:i,selectionRange:c},Ta=!1,we=s;we!==null;)if(s=we,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,we=i;else for(;we!==null;){s=we;try{var xe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var ke=xe.memoizedProps,At=xe.memoizedState,H=s.stateNode,U=H.getSnapshotBeforeUpdate(s.elementType===s.type?ke:di(s.type,ke),At);H.__reactInternalSnapshotBeforeUpdate=U}break;case 3:var q=s.stateNode.containerInfo;q.nodeType===1?q.textContent="":q.nodeType===9&&q.documentElement&&q.removeChild(q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ue){Ct(s,s.return,ue)}if(i=s.sibling,i!==null){i.return=s.return,we=i;break}we=s.return}return xe=pm,pm=!1,xe}function Ro(i,s,c){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&i)===i){var v=g.destroy;g.destroy=void 0,v!==void 0&&Du(s,c,v)}g=g.next}while(g!==f)}}function cl(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var f=c.create;c.destroy=f()}c=c.next}while(c!==s)}}function Pu(i){var s=i.ref;if(s!==null){var c=i.stateNode;switch(i.tag){case 5:i=c;break;default:i=c}typeof s=="function"?s(i):s.current=i}}function mm(i){var s=i.alternate;s!==null&&(i.alternate=null,mm(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[xi],delete s[vo],delete s[Qc],delete s[DS],delete s[PS])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function gm(i){return i.tag===5||i.tag===3||i.tag===4}function _m(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||gm(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Bu(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=Ua));else if(f!==4&&(i=i.child,i!==null))for(Bu(i,s,c),i=i.sibling;i!==null;)Bu(i,s,c),i=i.sibling}function Fu(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(Fu(i,s,c),i=i.sibling;i!==null;)Fu(i,s,c),i=i.sibling}var sn=null,fi=!1;function pr(i,s,c){for(c=c.child;c!==null;)vm(i,s,c),c=c.sibling}function vm(i,s,c){if(Ge&&typeof Ge.onCommitFiberUnmount=="function")try{Ge.onCommitFiberUnmount(We,c)}catch{}switch(c.tag){case 5:dn||Ds(c,s);case 6:var f=sn,g=fi;sn=null,pr(i,s,c),sn=f,fi=g,sn!==null&&(fi?(i=sn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):sn.removeChild(c.stateNode));break;case 18:sn!==null&&(fi?(i=sn,c=c.stateNode,i.nodeType===8?Zc(i.parentNode,c):i.nodeType===1&&Zc(i,c),oo(i)):Zc(sn,c.stateNode));break;case 4:f=sn,g=fi,sn=c.stateNode.containerInfo,fi=!0,pr(i,s,c),sn=f,fi=g;break;case 0:case 11:case 14:case 15:if(!dn&&(f=c.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){g=f=f.next;do{var v=g,x=v.destroy;v=v.tag,x!==void 0&&((v&2)!==0||(v&4)!==0)&&Du(c,s,x),g=g.next}while(g!==f)}pr(i,s,c);break;case 1:if(!dn&&(Ds(c,s),f=c.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=c.memoizedProps,f.state=c.memoizedState,f.componentWillUnmount()}catch(M){Ct(c,s,M)}pr(i,s,c);break;case 21:pr(i,s,c);break;case 22:c.mode&1?(dn=(f=dn)||c.memoizedState!==null,pr(i,s,c),dn=f):pr(i,s,c);break;default:pr(i,s,c)}}function ym(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new QS),s.forEach(function(f){var g=lw.bind(null,i,f);c.has(f)||(c.add(f),f.then(g,g))})}}function pi(i,s){var c=s.deletions;if(c!==null)for(var f=0;f<c.length;f++){var g=c[f];try{var v=i,x=s,M=x;e:for(;M!==null;){switch(M.tag){case 5:sn=M.stateNode,fi=!1;break e;case 3:sn=M.stateNode.containerInfo,fi=!0;break e;case 4:sn=M.stateNode.containerInfo,fi=!0;break e}M=M.return}if(sn===null)throw Error(n(160));vm(v,x,g),sn=null,fi=!1;var B=g.alternate;B!==null&&(B.return=null),g.return=null}catch(V){Ct(g,s,V)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)bm(s,i),s=s.sibling}function bm(i,s){var c=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(pi(s,i),Ci(i),f&4){try{Ro(3,i,i.return),cl(3,i)}catch(ke){Ct(i,i.return,ke)}try{Ro(5,i,i.return)}catch(ke){Ct(i,i.return,ke)}}break;case 1:pi(s,i),Ci(i),f&512&&c!==null&&Ds(c,c.return);break;case 5:if(pi(s,i),Ci(i),f&512&&c!==null&&Ds(c,c.return),i.flags&32){var g=i.stateNode;try{Xe(g,"")}catch(ke){Ct(i,i.return,ke)}}if(f&4&&(g=i.stateNode,g!=null)){var v=i.memoizedProps,x=c!==null?c.memoizedProps:v,M=i.type,B=i.updateQueue;if(i.updateQueue=null,B!==null)try{M==="input"&&v.type==="radio"&&v.name!=null&&Qe(g,v),Vn(M,x);var V=Vn(M,v);for(x=0;x<B.length;x+=2){var oe=B[x],ae=B[x+1];oe==="style"?li(g,ae):oe==="dangerouslySetInnerHTML"?$e(g,ae):oe==="children"?Xe(g,ae):N(g,oe,ae,V)}switch(M){case"input":Pn(g,v);break;case"textarea":qn(g,v);break;case"select":var se=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!v.multiple;var ge=v.value;ge!=null?yi(g,!!v.multiple,ge,!1):se!==!!v.multiple&&(v.defaultValue!=null?yi(g,!!v.multiple,v.defaultValue,!0):yi(g,!!v.multiple,v.multiple?[]:"",!1))}g[vo]=v}catch(ke){Ct(i,i.return,ke)}}break;case 6:if(pi(s,i),Ci(i),f&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,v=i.memoizedProps;try{g.nodeValue=v}catch(ke){Ct(i,i.return,ke)}}break;case 3:if(pi(s,i),Ci(i),f&4&&c!==null&&c.memoizedState.isDehydrated)try{oo(s.containerInfo)}catch(ke){Ct(i,i.return,ke)}break;case 4:pi(s,i),Ci(i);break;case 13:pi(s,i),Ci(i),g=i.child,g.flags&8192&&(v=g.memoizedState!==null,g.stateNode.isHidden=v,!v||g.alternate!==null&&g.alternate.memoizedState!==null||(ju=yt())),f&4&&ym(i);break;case 22:if(oe=c!==null&&c.memoizedState!==null,i.mode&1?(dn=(V=dn)||oe,pi(s,i),dn=V):pi(s,i),Ci(i),f&8192){if(V=i.memoizedState!==null,(i.stateNode.isHidden=V)&&!oe&&(i.mode&1)!==0)for(we=i,oe=i.child;oe!==null;){for(ae=we=oe;we!==null;){switch(se=we,ge=se.child,se.tag){case 0:case 11:case 14:case 15:Ro(4,se,se.return);break;case 1:Ds(se,se.return);var xe=se.stateNode;if(typeof xe.componentWillUnmount=="function"){f=se,c=se.return;try{s=f,xe.props=s.memoizedProps,xe.state=s.memoizedState,xe.componentWillUnmount()}catch(ke){Ct(f,c,ke)}}break;case 5:Ds(se,se.return);break;case 22:if(se.memoizedState!==null){xm(ae);continue}}ge!==null?(ge.return=se,we=ge):xm(ae)}oe=oe.sibling}e:for(oe=null,ae=i;;){if(ae.tag===5){if(oe===null){oe=ae;try{g=ae.stateNode,V?(v=g.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(M=ae.stateNode,B=ae.memoizedProps.style,x=B!=null&&B.hasOwnProperty("display")?B.display:null,M.style.display=En("display",x))}catch(ke){Ct(i,i.return,ke)}}}else if(ae.tag===6){if(oe===null)try{ae.stateNode.nodeValue=V?"":ae.memoizedProps}catch(ke){Ct(i,i.return,ke)}}else if((ae.tag!==22&&ae.tag!==23||ae.memoizedState===null||ae===i)&&ae.child!==null){ae.child.return=ae,ae=ae.child;continue}if(ae===i)break e;for(;ae.sibling===null;){if(ae.return===null||ae.return===i)break e;oe===ae&&(oe=null),ae=ae.return}oe===ae&&(oe=null),ae.sibling.return=ae.return,ae=ae.sibling}}break;case 19:pi(s,i),Ci(i),f&4&&ym(i);break;case 21:break;default:pi(s,i),Ci(i)}}function Ci(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(gm(c)){var f=c;break e}c=c.return}throw Error(n(160))}switch(f.tag){case 5:var g=f.stateNode;f.flags&32&&(Xe(g,""),f.flags&=-33);var v=_m(i);Fu(i,v,g);break;case 3:case 4:var x=f.stateNode.containerInfo,M=_m(i);Bu(i,M,x);break;default:throw Error(n(161))}}catch(B){Ct(i,i.return,B)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function ew(i,s,c){we=i,Sm(i)}function Sm(i,s,c){for(var f=(i.mode&1)!==0;we!==null;){var g=we,v=g.child;if(g.tag===22&&f){var x=g.memoizedState!==null||ll;if(!x){var M=g.alternate,B=M!==null&&M.memoizedState!==null||dn;M=ll;var V=dn;if(ll=x,(dn=B)&&!V)for(we=g;we!==null;)x=we,B=x.child,x.tag===22&&x.memoizedState!==null?km(g):B!==null?(B.return=x,we=B):km(g);for(;v!==null;)we=v,Sm(v),v=v.sibling;we=g,ll=M,dn=V}wm(i)}else(g.subtreeFlags&8772)!==0&&v!==null?(v.return=g,we=v):wm(i)}}function wm(i){for(;we!==null;){var s=we;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:dn||cl(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!dn)if(c===null)f.componentDidMount();else{var g=s.elementType===s.type?c.memoizedProps:di(s.type,c.memoizedProps);f.componentDidUpdate(g,c.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var v=s.updateQueue;v!==null&&xp(s,v,f);break;case 3:var x=s.updateQueue;if(x!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}xp(s,x,c)}break;case 5:var M=s.stateNode;if(c===null&&s.flags&4){c=M;var B=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":B.autoFocus&&c.focus();break;case"img":B.src&&(c.src=B.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var V=s.alternate;if(V!==null){var oe=V.memoizedState;if(oe!==null){var ae=oe.dehydrated;ae!==null&&oo(ae)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}dn||s.flags&512&&Pu(s)}catch(se){Ct(s,s.return,se)}}if(s===i){we=null;break}if(c=s.sibling,c!==null){c.return=s.return,we=c;break}we=s.return}}function xm(i){for(;we!==null;){var s=we;if(s===i){we=null;break}var c=s.sibling;if(c!==null){c.return=s.return,we=c;break}we=s.return}}function km(i){for(;we!==null;){var s=we;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{cl(4,s)}catch(B){Ct(s,c,B)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var g=s.return;try{f.componentDidMount()}catch(B){Ct(s,g,B)}}var v=s.return;try{Pu(s)}catch(B){Ct(s,v,B)}break;case 5:var x=s.return;try{Pu(s)}catch(B){Ct(s,x,B)}}}catch(B){Ct(s,s.return,B)}if(s===i){we=null;break}var M=s.sibling;if(M!==null){M.return=s.return,we=M;break}we=s.return}}var tw=Math.ceil,ul=O.ReactCurrentDispatcher,zu=O.ReactCurrentOwner,Jn=O.ReactCurrentBatchConfig,tt=0,Yt=null,It=null,on=0,Un=0,Ps=cr(0),Ht=0,Mo=null,Kr=0,hl=0,Uu=0,Ao=null,Rn=null,ju=0,Bs=1/0,Gi=null,dl=!1,Hu=null,mr=null,fl=!1,gr=null,pl=0,Oo=0,$u=null,ml=-1,gl=0;function yn(){return(tt&6)!==0?yt():ml!==-1?ml:ml=yt()}function _r(i){return(i.mode&1)===0?1:(tt&2)!==0&&on!==0?on&-on:FS.transition!==null?(gl===0&&(gl=Ea()),gl):(i=et,i!==0||(i=window.event,i=i===void 0?16:Cf(i.type)),i)}function mi(i,s,c,f){if(50<Oo)throw Oo=0,$u=null,Error(n(185));rr(i,c,f),((tt&2)===0||i!==Yt)&&(i===Yt&&((tt&2)===0&&(hl|=c),Ht===4&&vr(i,on)),Mn(i,f),c===1&&tt===0&&(s.mode&1)===0&&(Bs=yt()+500,Wa&&hr()))}function Mn(i,s){var c=i.callbackNode;Cc(i,s);var f=Dr(i,i===Yt?on:0);if(f===0)c!==null&&ci(c),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(c!=null&&ci(c),s===1)i.tag===0?BS(Cm.bind(null,i)):hp(Cm.bind(null,i)),LS(function(){(tt&6)===0&&hr()}),c=null;else{switch(Fe(f)){case 1:c=eo;break;case 4:c=Lr;break;case 16:c=ms;break;case 536870912:c=Ce;break;default:c=ms}c=Im(c,Em.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function Em(i,s){if(ml=-1,gl=0,(tt&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Fs()&&i.callbackNode!==c)return null;var f=Dr(i,i===Yt?on:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||s)s=_l(i,f);else{s=f;var g=tt;tt|=2;var v=Tm();(Yt!==i||on!==s)&&(Gi=null,Bs=yt()+500,Vr(i,s));do try{rw();break}catch(M){Nm(i,M)}while(!0);au(),ul.current=v,tt=g,It!==null?s=0:(Yt=null,on=0,s=Ht)}if(s!==0){if(s===2&&(g=to(i),g!==0&&(f=g,s=Wu(i,g))),s===1)throw c=Mo,Vr(i,0),vr(i,f),Mn(i,yt()),c;if(s===6)vr(i,f);else{if(g=i.current.alternate,(f&30)===0&&!nw(g)&&(s=_l(i,f),s===2&&(v=to(i),v!==0&&(f=v,s=Wu(i,v))),s===1))throw c=Mo,Vr(i,0),vr(i,f),Mn(i,yt()),c;switch(i.finishedWork=g,i.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:Gr(i,Rn,Gi);break;case 3:if(vr(i,f),(f&130023424)===f&&(s=ju+500-yt(),10<s)){if(Dr(i,0)!==0)break;if(g=i.suspendedLanes,(g&f)!==f){yn(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=Xc(Gr.bind(null,i,Rn,Gi),s);break}Gr(i,Rn,Gi);break;case 4:if(vr(i,f),(f&4194240)===f)break;for(s=i.eventTimes,g=-1;0<f;){var x=31-bt(f);v=1<<x,x=s[x],x>g&&(g=x),f&=~v}if(f=g,f=yt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*tw(f/1960))-f,10<f){i.timeoutHandle=Xc(Gr.bind(null,i,Rn,Gi),f);break}Gr(i,Rn,Gi);break;case 5:Gr(i,Rn,Gi);break;default:throw Error(n(329))}}}return Mn(i,yt()),i.callbackNode===c?Em.bind(null,i):null}function Wu(i,s){var c=Ao;return i.current.memoizedState.isDehydrated&&(Vr(i,s).flags|=256),i=_l(i,s),i!==2&&(s=Rn,Rn=c,s!==null&&Ku(s)),i}function Ku(i){Rn===null?Rn=i:Rn.push.apply(Rn,i)}function nw(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var f=0;f<c.length;f++){var g=c[f],v=g.getSnapshot;g=g.value;try{if(!ui(v(),g))return!1}catch{return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function vr(i,s){for(s&=~Uu,s&=~hl,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-bt(s),f=1<<c;i[c]=-1,s&=~f}}function Cm(i){if((tt&6)!==0)throw Error(n(327));Fs();var s=Dr(i,0);if((s&1)===0)return Mn(i,yt()),null;var c=_l(i,s);if(i.tag!==0&&c===2){var f=to(i);f!==0&&(s=f,c=Wu(i,f))}if(c===1)throw c=Mo,Vr(i,0),vr(i,s),Mn(i,yt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Gr(i,Rn,Gi),Mn(i,yt()),null}function qu(i,s){var c=tt;tt|=1;try{return i(s)}finally{tt=c,tt===0&&(Bs=yt()+500,Wa&&hr())}}function qr(i){gr!==null&&gr.tag===0&&(tt&6)===0&&Fs();var s=tt;tt|=1;var c=Jn.transition,f=et;try{if(Jn.transition=null,et=1,i)return i()}finally{et=f,Jn.transition=c,tt=s,(tt&6)===0&&hr()}}function Vu(){Un=Ps.current,pt(Ps)}function Vr(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,OS(c)),It!==null)for(c=It.return;c!==null;){var f=c;switch(nu(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&Ha();break;case 3:Ls(),pt(Cn),pt(cn),mu();break;case 5:fu(f);break;case 4:Ls();break;case 13:pt(St);break;case 19:pt(St);break;case 10:lu(f.type._context);break;case 22:case 23:Vu()}c=c.return}if(Yt=i,It=i=yr(i.current,null),on=Un=s,Ht=0,Mo=null,Uu=hl=Kr=0,Rn=Ao=null,Hr!==null){for(s=0;s<Hr.length;s++)if(c=Hr[s],f=c.interleaved,f!==null){c.interleaved=null;var g=f.next,v=c.pending;if(v!==null){var x=v.next;v.next=g,f.next=x}c.pending=f}Hr=null}return i}function Nm(i,s){do{var c=It;try{if(au(),el.current=rl,tl){for(var f=wt.memoizedState;f!==null;){var g=f.queue;g!==null&&(g.pending=null),f=f.next}tl=!1}if(Wr=0,Gt=jt=wt=null,ko=!1,Eo=0,zu.current=null,c===null||c.return===null){Ht=1,Mo=s,It=null;break}e:{var v=i,x=c.return,M=c,B=s;if(s=on,M.flags|=32768,B!==null&&typeof B=="object"&&typeof B.then=="function"){var V=B,oe=M,ae=oe.tag;if((oe.mode&1)===0&&(ae===0||ae===11||ae===15)){var se=oe.alternate;se?(oe.updateQueue=se.updateQueue,oe.memoizedState=se.memoizedState,oe.lanes=se.lanes):(oe.updateQueue=null,oe.memoizedState=null)}var ge=Qp(x);if(ge!==null){ge.flags&=-257,Jp(ge,x,M,v,s),ge.mode&1&&Zp(v,V,s),s=ge,B=V;var xe=s.updateQueue;if(xe===null){var ke=new Set;ke.add(B),s.updateQueue=ke}else xe.add(B);break e}else{if((s&1)===0){Zp(v,V,s),Gu();break e}B=Error(n(426))}}else if(_t&&M.mode&1){var At=Qp(x);if(At!==null){(At.flags&65536)===0&&(At.flags|=256),Jp(At,x,M,v,s),su(Is(B,M));break e}}v=B=Is(B,M),Ht!==4&&(Ht=2),Ao===null?Ao=[v]:Ao.push(v),v=x;do{switch(v.tag){case 3:v.flags|=65536,s&=-s,v.lanes|=s;var H=Yp(v,B,s);wp(v,H);break e;case 1:M=B;var U=v.type,q=v.stateNode;if((v.flags&128)===0&&(typeof U.getDerivedStateFromError=="function"||q!==null&&typeof q.componentDidCatch=="function"&&(mr===null||!mr.has(q)))){v.flags|=65536,s&=-s,v.lanes|=s;var ue=Xp(v,M,s);wp(v,ue);break e}}v=v.return}while(v!==null)}Mm(c)}catch(Ee){s=Ee,It===c&&c!==null&&(It=c=c.return);continue}break}while(!0)}function Tm(){var i=ul.current;return ul.current=rl,i===null?rl:i}function Gu(){(Ht===0||Ht===3||Ht===2)&&(Ht=4),Yt===null||(Kr&268435455)===0&&(hl&268435455)===0||vr(Yt,on)}function _l(i,s){var c=tt;tt|=2;var f=Tm();(Yt!==i||on!==s)&&(Gi=null,Vr(i,s));do try{iw();break}catch(g){Nm(i,g)}while(!0);if(au(),tt=c,ul.current=f,It!==null)throw Error(n(261));return Yt=null,on=0,Ht}function iw(){for(;It!==null;)Rm(It)}function rw(){for(;It!==null&&!xa();)Rm(It)}function Rm(i){var s=Lm(i.alternate,i,Un);i.memoizedProps=i.pendingProps,s===null?Mm(i):It=s,zu.current=null}function Mm(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=XS(c,s,Un),c!==null){It=c;return}}else{if(c=ZS(c,s),c!==null){c.flags&=32767,It=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Ht=6,It=null;return}}if(s=s.sibling,s!==null){It=s;return}It=s=i}while(s!==null);Ht===0&&(Ht=5)}function Gr(i,s,c){var f=et,g=Jn.transition;try{Jn.transition=null,et=1,sw(i,s,c,f)}finally{Jn.transition=g,et=f}return null}function sw(i,s,c,f){do Fs();while(gr!==null);if((tt&6)!==0)throw Error(n(327));c=i.finishedWork;var g=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var v=c.lanes|c.childLanes;if(Gn(i,v),i===Yt&&(It=Yt=null,on=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||fl||(fl=!0,Im(ms,function(){return Fs(),null})),v=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||v){v=Jn.transition,Jn.transition=null;var x=et;et=1;var M=tt;tt|=4,zu.current=null,JS(i,c),bm(c,i),ES(Gc),Ta=!!Vc,Gc=Vc=null,i.current=c,ew(c),ka(),tt=M,et=x,Jn.transition=v}else i.current=c;if(fl&&(fl=!1,gr=i,pl=g),v=i.pendingLanes,v===0&&(mr=null),Rt(c.stateNode),Mn(i,yt()),s!==null)for(f=i.onRecoverableError,c=0;c<s.length;c++)g=s[c],f(g.value,{componentStack:g.stack,digest:g.digest});if(dl)throw dl=!1,i=Hu,Hu=null,i;return(pl&1)!==0&&i.tag!==0&&Fs(),v=i.pendingLanes,(v&1)!==0?i===$u?Oo++:(Oo=0,$u=i):Oo=0,hr(),null}function Fs(){if(gr!==null){var i=Fe(pl),s=Jn.transition,c=et;try{if(Jn.transition=null,et=16>i?16:i,gr===null)var f=!1;else{if(i=gr,gr=null,pl=0,(tt&6)!==0)throw Error(n(331));var g=tt;for(tt|=4,we=i.current;we!==null;){var v=we,x=v.child;if((we.flags&16)!==0){var M=v.deletions;if(M!==null){for(var B=0;B<M.length;B++){var V=M[B];for(we=V;we!==null;){var oe=we;switch(oe.tag){case 0:case 11:case 15:Ro(8,oe,v)}var ae=oe.child;if(ae!==null)ae.return=oe,we=ae;else for(;we!==null;){oe=we;var se=oe.sibling,ge=oe.return;if(mm(oe),oe===V){we=null;break}if(se!==null){se.return=ge,we=se;break}we=ge}}}var xe=v.alternate;if(xe!==null){var ke=xe.child;if(ke!==null){xe.child=null;do{var At=ke.sibling;ke.sibling=null,ke=At}while(ke!==null)}}we=v}}if((v.subtreeFlags&2064)!==0&&x!==null)x.return=v,we=x;else e:for(;we!==null;){if(v=we,(v.flags&2048)!==0)switch(v.tag){case 0:case 11:case 15:Ro(9,v,v.return)}var H=v.sibling;if(H!==null){H.return=v.return,we=H;break e}we=v.return}}var U=i.current;for(we=U;we!==null;){x=we;var q=x.child;if((x.subtreeFlags&2064)!==0&&q!==null)q.return=x,we=q;else e:for(x=U;we!==null;){if(M=we,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:cl(9,M)}}catch(Ee){Ct(M,M.return,Ee)}if(M===x){we=null;break e}var ue=M.sibling;if(ue!==null){ue.return=M.return,we=ue;break e}we=M.return}}if(tt=g,hr(),Ge&&typeof Ge.onPostCommitFiberRoot=="function")try{Ge.onPostCommitFiberRoot(We,i)}catch{}f=!0}return f}finally{et=c,Jn.transition=s}}return!1}function Am(i,s,c){s=Is(c,s),s=Yp(i,s,1),i=fr(i,s,1),s=yn(),i!==null&&(rr(i,1,s),Mn(i,s))}function Ct(i,s,c){if(i.tag===3)Am(i,i,c);else for(;s!==null;){if(s.tag===3){Am(s,i,c);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(mr===null||!mr.has(f))){i=Is(c,i),i=Xp(s,i,1),s=fr(s,i,1),i=yn(),s!==null&&(rr(s,1,i),Mn(s,i));break}}s=s.return}}function ow(i,s,c){var f=i.pingCache;f!==null&&f.delete(s),s=yn(),i.pingedLanes|=i.suspendedLanes&c,Yt===i&&(on&c)===c&&(Ht===4||Ht===3&&(on&130023424)===on&&500>yt()-ju?Vr(i,0):Uu|=c),Mn(i,s)}function Om(i,s){s===0&&((i.mode&1)===0?s=1:(s=Ir,Ir<<=1,(Ir&130023424)===0&&(Ir=4194304)));var c=yn();i=Ki(i,s),i!==null&&(rr(i,s,c),Mn(i,c))}function aw(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),Om(i,c)}function lw(i,s){var c=0;switch(i.tag){case 13:var f=i.stateNode,g=i.memoizedState;g!==null&&(c=g.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),Om(i,c)}var Lm;Lm=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Cn.current)Tn=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return Tn=!1,YS(i,s,c);Tn=(i.flags&131072)!==0}else Tn=!1,_t&&(s.flags&1048576)!==0&&dp(s,qa,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;al(i,s),i=s.pendingProps;var g=Cs(s,cn.current);Os(s,c),g=vu(null,s,f,i,g,c);var v=yu();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Nn(f)?(v=!0,$a(s)):v=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,hu(s),g.updater=sl,s.stateNode=g,g._reactInternals=s,Eu(s,f,i,c),s=Ru(null,s,f,!0,v,c)):(s.tag=0,_t&&v&&tu(s),vn(null,s,g,c),s=s.child),s;case 16:f=s.elementType;e:{switch(al(i,s),i=s.pendingProps,g=f._init,f=g(f._payload),s.type=f,g=s.tag=uw(f),i=di(f,i),g){case 0:s=Tu(null,s,f,i,c);break e;case 1:s=sm(null,s,f,i,c);break e;case 11:s=em(null,s,f,i,c);break e;case 14:s=tm(null,s,f,di(f.type,i),c);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),Tu(i,s,f,g,c);case 1:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),sm(i,s,f,g,c);case 3:e:{if(om(s),i===null)throw Error(n(387));f=s.pendingProps,v=s.memoizedState,g=v.element,Sp(i,s),Qa(s,f,null,c);var x=s.memoizedState;if(f=x.element,v.isDehydrated)if(v={element:f,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=v,s.memoizedState=v,s.flags&256){g=Is(Error(n(423)),s),s=am(i,s,f,c,g);break e}else if(f!==g){g=Is(Error(n(424)),s),s=am(i,s,f,c,g);break e}else for(zn=lr(s.stateNode.containerInfo.firstChild),Fn=s,_t=!0,hi=null,c=yp(s,null,f,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Rs(),f===g){s=Vi(i,s,c);break e}vn(i,s,f,c)}s=s.child}return s;case 5:return kp(s),i===null&&ru(s),f=s.type,g=s.pendingProps,v=i!==null?i.memoizedProps:null,x=g.children,Yc(f,g)?x=null:v!==null&&Yc(f,v)&&(s.flags|=32),rm(i,s),vn(i,s,x,c),s.child;case 6:return i===null&&ru(s),null;case 13:return lm(i,s,c);case 4:return du(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=Ms(s,null,f,c):vn(i,s,f,c),s.child;case 11:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),em(i,s,f,g,c);case 7:return vn(i,s,s.pendingProps,c),s.child;case 8:return vn(i,s,s.pendingProps.children,c),s.child;case 12:return vn(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(f=s.type._context,g=s.pendingProps,v=s.memoizedProps,x=g.value,ht(Ya,f._currentValue),f._currentValue=x,v!==null)if(ui(v.value,x)){if(v.children===g.children&&!Cn.current){s=Vi(i,s,c);break e}}else for(v=s.child,v!==null&&(v.return=s);v!==null;){var M=v.dependencies;if(M!==null){x=v.child;for(var B=M.firstContext;B!==null;){if(B.context===f){if(v.tag===1){B=qi(-1,c&-c),B.tag=2;var V=v.updateQueue;if(V!==null){V=V.shared;var oe=V.pending;oe===null?B.next=B:(B.next=oe.next,oe.next=B),V.pending=B}}v.lanes|=c,B=v.alternate,B!==null&&(B.lanes|=c),cu(v.return,c,s),M.lanes|=c;break}B=B.next}}else if(v.tag===10)x=v.type===s.type?null:v.child;else if(v.tag===18){if(x=v.return,x===null)throw Error(n(341));x.lanes|=c,M=x.alternate,M!==null&&(M.lanes|=c),cu(x,c,s),x=v.sibling}else x=v.child;if(x!==null)x.return=v;else for(x=v;x!==null;){if(x===s){x=null;break}if(v=x.sibling,v!==null){v.return=x.return,x=v;break}x=x.return}v=x}vn(i,s,g.children,c),s=s.child}return s;case 9:return g=s.type,f=s.pendingProps.children,Os(s,c),g=Zn(g),f=f(g),s.flags|=1,vn(i,s,f,c),s.child;case 14:return f=s.type,g=di(f,s.pendingProps),g=di(f.type,g),tm(i,s,f,g,c);case 15:return nm(i,s,s.type,s.pendingProps,c);case 17:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),al(i,s),s.tag=1,Nn(f)?(i=!0,$a(s)):i=!1,Os(s,c),Vp(s,f,g),Eu(s,f,g,c),Ru(null,s,f,!0,i,c);case 19:return um(i,s,c);case 22:return im(i,s,c)}throw Error(n(156,s.tag))};function Im(i,s){return wa(i,s)}function cw(i,s,c,f){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ei(i,s,c,f){return new cw(i,s,c,f)}function Yu(i){return i=i.prototype,!(!i||!i.isReactComponent)}function uw(i){if(typeof i=="function")return Yu(i)?1:0;if(i!=null){if(i=i.$$typeof,i===W)return 11;if(i===P)return 14}return 2}function yr(i,s){var c=i.alternate;return c===null?(c=ei(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function vl(i,s,c,f,g,v){var x=2;if(f=i,typeof i=="function")Yu(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case re:return Yr(c.children,g,v,s);case Z:x=8,g|=8;break;case F:return i=ei(12,c,s,g|2),i.elementType=F,i.lanes=v,i;case j:return i=ei(13,c,s,g),i.elementType=j,i.lanes=v,i;case $:return i=ei(19,c,s,g),i.elementType=$,i.lanes=v,i;case te:return yl(c,g,v,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case L:x=10;break e;case X:x=9;break e;case W:x=11;break e;case P:x=14;break e;case Y:x=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=ei(x,c,s,g),s.elementType=i,s.type=f,s.lanes=v,s}function Yr(i,s,c,f){return i=ei(7,i,f,s),i.lanes=c,i}function yl(i,s,c,f){return i=ei(22,i,f,s),i.elementType=te,i.lanes=c,i.stateNode={isHidden:!1},i}function Xu(i,s,c){return i=ei(6,i,null,s),i.lanes=c,i}function Zu(i,s,c){return s=ei(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function hw(i,s,c,f,g){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ir(0),this.expirationTimes=ir(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ir(0),this.identifierPrefix=f,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Qu(i,s,c,f,g,v,x,M,B){return i=new hw(i,s,c,M,B),s===1?(s=1,v===!0&&(s|=8)):s=0,v=ei(3,null,null,s),i.current=v,v.stateNode=i,v.memoizedState={element:f,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},hu(v),i}function dw(i,s,c){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:I,key:f==null?null:""+f,children:i,containerInfo:s,implementation:c}}function Dm(i){if(!i)return ur;i=i._reactInternals;e:{if(Ui(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Nn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(Nn(c))return cp(i,c,s)}return s}function Pm(i,s,c,f,g,v,x,M,B){return i=Qu(c,f,!0,i,g,v,x,M,B),i.context=Dm(null),c=i.current,f=yn(),g=_r(c),v=qi(f,g),v.callback=s??null,fr(c,v,g),i.current.lanes=g,rr(i,g,f),Mn(i,f),i}function bl(i,s,c,f){var g=s.current,v=yn(),x=_r(g);return c=Dm(c),s.context===null?s.context=c:s.pendingContext=c,s=qi(v,x),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=fr(g,s,x),i!==null&&(mi(i,g,x,v),Za(i,g,x)),x}function Sl(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function Bm(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function Ju(i,s){Bm(i,s),(i=i.alternate)&&Bm(i,s)}function fw(){return null}var Fm=typeof reportError=="function"?reportError:function(i){console.error(i)};function eh(i){this._internalRoot=i}wl.prototype.render=eh.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));bl(i,s,null,null)},wl.prototype.unmount=eh.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;qr(function(){bl(null,i,null,null)}),s[ji]=null}};function wl(i){this._internalRoot=i}wl.prototype.unstable_scheduleHydration=function(i){if(i){var s=Pr();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Vt.length&&s!==0&&s<Vt[c].priority;c++);Vt.splice(c,0,i),c===0&&kf(i)}};function th(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function xl(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function zm(){}function pw(i,s,c,f,g){if(g){if(typeof f=="function"){var v=f;f=function(){var V=Sl(x);v.call(V)}}var x=Pm(s,f,i,0,null,!1,!1,"",zm);return i._reactRootContainer=x,i[ji]=x.current,go(i.nodeType===8?i.parentNode:i),qr(),x}for(;g=i.lastChild;)i.removeChild(g);if(typeof f=="function"){var M=f;f=function(){var V=Sl(B);M.call(V)}}var B=Qu(i,0,!1,null,null,!1,!1,"",zm);return i._reactRootContainer=B,i[ji]=B.current,go(i.nodeType===8?i.parentNode:i),qr(function(){bl(s,B,c,f)}),B}function kl(i,s,c,f,g){var v=c._reactRootContainer;if(v){var x=v;if(typeof g=="function"){var M=g;g=function(){var B=Sl(x);M.call(B)}}bl(s,x,i,g)}else x=pw(c,s,i,g,f);return Sl(x)}io=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=nr(s.pendingLanes);c!==0&&(no(s,c|1),Mn(s,yt()),(tt&6)===0&&(Bs=yt()+500,hr()))}break;case 13:qr(function(){var f=Ki(i,1);if(f!==null){var g=yn();mi(f,i,1,g)}}),Ju(i,1)}},Mt=function(i){if(i.tag===13){var s=Ki(i,134217728);if(s!==null){var c=yn();mi(s,i,134217728,c)}Ju(i,134217728)}},rt=function(i){if(i.tag===13){var s=_r(i),c=Ki(i,s);if(c!==null){var f=yn();mi(c,i,s,f)}Ju(i,s)}},Pr=function(){return et},wi=function(i,s){var c=et;try{return et=i,s()}finally{et=c}},fs=function(i,s,c){switch(s){case"input":if(Pn(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var f=c[s];if(f!==i&&f.form===i.form){var g=ja(f);if(!g)throw Error(n(90));nn(f),Pn(f,g)}}}break;case"textarea":qn(i,c);break;case"select":s=c.value,s!=null&&yi(i,!!c.multiple,s,!1)}},pe=qu,De=qr;var mw={usingClientEntryPoint:!1,Events:[yo,ks,ja,D,ee,qu]},Lo={findFiberByHostInstance:Fr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},gw={bundleType:Lo.bundleType,version:Lo.version,rendererPackageName:Lo.rendererPackageName,rendererConfig:Lo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:O.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=ba(i),i===null?null:i.stateNode},findFiberByHostInstance:Lo.findFiberByHostInstance||fw,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 El=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!El.isDisabled&&El.supportsFiber)try{We=El.inject(gw),Ge=El}catch{}}return An.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mw,An.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!th(s))throw Error(n(200));return dw(i,s,null,c)},An.createRoot=function(i,s){if(!th(i))throw Error(n(299));var c=!1,f="",g=Fm;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Qu(i,1,!1,null,null,c,!1,f,g),i[ji]=s.current,go(i.nodeType===8?i.parentNode:i),new eh(s)},An.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=ba(s),i=i===null?null:i.stateNode,i},An.flushSync=function(i){return qr(i)},An.hydrate=function(i,s,c){if(!xl(s))throw Error(n(200));return kl(null,i,s,!0,c)},An.hydrateRoot=function(i,s,c){if(!th(i))throw Error(n(405));var f=c!=null&&c.hydratedSources||null,g=!1,v="",x=Fm;if(c!=null&&(c.unstable_strictMode===!0&&(g=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onRecoverableError!==void 0&&(x=c.onRecoverableError)),s=Pm(s,null,i,1,c??null,g,!1,v,x),i[ji]=s.current,go(i),f)for(i=0;i<f.length;i++)c=f[i],g=c._getVersion,g=g(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,g]:s.mutableSourceEagerHydrationData.push(c,g);return new wl(s)},An.render=function(i,s,c){if(!xl(s))throw Error(n(200));return kl(null,i,s,!1,c)},An.unmountComponentAtNode=function(i){if(!xl(i))throw Error(n(40));return i._reactRootContainer?(qr(function(){kl(null,null,i,!1,function(){i._reactRootContainer=null,i[ji]=null})}),!0):!1},An.unstable_batchedUpdates=qu,An.unstable_renderSubtreeIntoContainer=function(i,s,c,f){if(!xl(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return kl(i,s,c,!1,f)},An.version="18.3.1-next-f1338f8080-20240426",An}var Vm;function kw(){if(Vm)return rh.exports;Vm=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),rh.exports=xw(),rh.exports}var Gm;function Ew(){if(Gm)return Cl;Gm=1;var e=kw();return Cl.createRoot=e.createRoot,Cl.hydrateRoot=e.hydrateRoot,Cl}var Cw=Ew(),av={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ym=ns.createContext&&ns.createContext(av),Nw=["attr","size","title"];function Tw(e,t){if(e==null)return{};var n,r,o=Rw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Rw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Yl(){return Yl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yl.apply(null,arguments)}function Xm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Xl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xm(Object(n),!0).forEach(function(r){Mw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mw(e,t,n){return(t=Aw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Aw(e){var t=Ow(e,"string");return typeof t=="symbol"?t:t+""}function Ow(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lv(e){return e&&e.map((t,n)=>ns.createElement(t.tag,Xl({key:n},t.attr),lv(t.child)))}function at(e){return t=>ns.createElement(Lw,Yl({attr:Xl({},e.attr)},t),lv(e.child))}function Lw(e){var t=n=>{var r=e.attr,o=e.size,a=e.title,l=Tw(e,Nw),u=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),ns.createElement("svg",Yl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,l,{className:d,style:Xl(Xl({color:e.color||n.color},n.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),a&&ns.createElement("title",null,a),e.children)};return Ym!==void 0?ns.createElement(Ym.Consumer,null,n=>t(n)):t(av)}function Iw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"},child:[]}]})(e)}function uc(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}function cv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"},child:[]},{tag:"path",attr:{d:"M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"},child:[]}]})(e)}function $h(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"},child:[]},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"},child:[]}]})(e)}function $d(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"4 17 10 11 4 5"},child:[]},{tag:"line",attr:{x1:"12",y1:"19",x2:"20",y2:"19"},child:[]}]})(e)}function Dw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"},child:[]}]})(e)}function Zm(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"22",y1:"2",x2:"11",y2:"13"},child:[]},{tag:"polygon",attr:{points:"22 2 15 22 11 13 2 9 22 2"},child:[]}]})(e)}function hc(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"23 4 23 10 17 10"},child:[]},{tag:"polyline",attr:{points:"1 20 1 14 7 14"},child:[]},{tag:"path",attr:{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"},child:[]}]})(e)}function ss(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(e)}function Pw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"5 3 19 12 5 21 5 3"},child:[]}]})(e)}function Wh(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"},child:[]}]})(e)}function Kh(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"},child:[]},{tag:"path",attr:{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"},child:[]}]})(e)}function Bw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"},child:[]}]})(e)}function Fw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"2",y1:"12",x2:"22",y2:"12"},child:[]},{tag:"path",attr:{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"},child:[]}]})(e)}function ra(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"},child:[]}]})(e)}function uv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"},child:[]},{tag:"polyline",attr:{points:"13 2 13 9 20 9"},child:[]}]})(e)}function zw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"},child:[]},{tag:"polyline",attr:{points:"14 2 14 8 20 8"},child:[]},{tag:"line",attr:{x1:"16",y1:"13",x2:"8",y2:"13"},child:[]},{tag:"line",attr:{x1:"16",y1:"17",x2:"8",y2:"17"},child:[]},{tag:"polyline",attr:{points:"10 9 9 9 8 9"},child:[]}]})(e)}function Qm(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 20h9"},child:[]},{tag:"path",attr:{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"},child:[]}]})(e)}function hv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"},child:[]}]})(e)}function dv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(e)}function Wd(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"4",y:"4",width:"16",height:"16",rx:"2",ry:"2"},child:[]},{tag:"rect",attr:{x:"9",y:"9",width:"6",height:"6"},child:[]},{tag:"line",attr:{x1:"9",y1:"1",x2:"9",y2:"4"},child:[]},{tag:"line",attr:{x1:"15",y1:"1",x2:"15",y2:"4"},child:[]},{tag:"line",attr:{x1:"9",y1:"20",x2:"9",y2:"23"},child:[]},{tag:"line",attr:{x1:"15",y1:"20",x2:"15",y2:"23"},child:[]},{tag:"line",attr:{x1:"20",y1:"9",x2:"23",y2:"9"},child:[]},{tag:"line",attr:{x1:"20",y1:"14",x2:"23",y2:"14"},child:[]},{tag:"line",attr:{x1:"1",y1:"9",x2:"4",y2:"9"},child:[]},{tag:"line",attr:{x1:"1",y1:"14",x2:"4",y2:"14"},child:[]}]})(e)}function fv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},child:[]}]})(e)}function Uw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"18 15 12 9 6 15"},child:[]}]})(e)}function dc(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(e)}function ua(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(e)}function pv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(e)}function jw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"},child:[]},{tag:"polyline",attr:{points:"22 4 12 14.01 9 11.01"},child:[]}]})(e)}function Hw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"polyline",attr:{points:"19 12 12 19 5 12"},child:[]}]})(e)}function Do({trigger:e,open:t,onOpenChange:n,children:r,align:o="right"}){const a=Q.useRef(null);return Q.useEffect(()=>{if(!t)return;const l=d=>{a.current&&!a.current.contains(d.target)&&n(!1)},u=d=>{d.key==="Escape"&&n(!1)};return document.addEventListener("mousedown",l),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",u)}},[t,n]),_.jsxs("div",{className:`dropdown ${o}`,ref:a,children:[_.jsxs("button",{type:"button",className:"chip",onClick:()=>n(!t),"aria-expanded":t,children:[e,_.jsx(ua,{className:`dd-caret ${t?"up":""}`})]}),t&&_.jsx("div",{className:"dd-menu",children:r})]})}function ah({active:e,onClick:t,children:n}){return _.jsx("button",{type:"button",className:`dd-item ${e?"active":""}`,onClick:t,children:n})}const mv="pi-web-ui:lang",$w={cancel:"取消",ok:"确定",save:"保存",close:"关闭",loading:"加载中…",connected:"已连接",connecting:"连接中…",reconnecting:"重连中…",language:"语言",langZh:"中文",langEn:"English",copy:"复制",viewSwitch:"视图切换",chat:"对话",terminal:"终端",selectModel:"选择模型",availableModels:"可用模型",noModels:"暂无可用模型(请先配置 API 密钥)",reasoning:"推理",refreshModels:"刷新模型列表",manageModels:"⚙ 管理模型(新增 / 修改)",manageModelsTitle:"管理模型",thinkingLevel:"思考强度",thinking:"思考",thinkingChip:"思考:{level}",sound:"声音",newChat:"新对话",newChatTip:"新建对话(每个浏览器独立保存会话)","thinking.off":"关闭","thinking.minimal":"极简","thinking.low":"低","thinking.medium":"中","thinking.high":"高","thinking.xhigh":"极高","thinking.max":"最大",context:"上下文",contextUsage:"上下文用量",cumulativeCost:"累计成本",sessionMessages:"会话消息数",messages:"消息",pluginStatus:"插件状态",working:"工作中",queued:"排队",enterPath:"输入路径,Enter 切换",cwdTip:"工作目录:{path}(点击切换)",folderRef:"文件夹引用:{path}",refOnly:"仅引用:{path}",attachContent:"附加内容:{path}",attachLines:"附加选中行:{path}(第 {start}-{end} 行)",removeAttachment:"移除附件",attachHint:"将随下一条消息发送",followUpQueued:"⏳ {n} 条跟进消息排队中",steeringQueued:"⏳ {n} 条转向消息排队中",placeholderStreaming:"智能体正在工作中…(消息可排队发送)",placeholderIdle:"给 pi 发送消息 — Enter 发送,Shift+Enter 换行",placeholderConnecting:"正在连接服务器…",stopAgent:"停止智能体",stop:"停止",supplement:"补充",supplementTip:"当前回复完成后立即发送",sendTip:"发送(Enter)",recentProjects:"最近项目",openConversations:"打开的对话",historySessions:"历史对话",streaming:"进行中…",noHistory:"还没有历史对话",current:"当前",messageCount:"{n} 条消息",tuiTip:"pi 终端(TUI)中的对话",refreshList:"刷新列表",emptyChat:"空对话",editReask:"编辑重问",editReaskTip:"修改此问题,并从这里重新提问(会新建一个分支对话,原对话保留)",reaskFromHere:"从此处重新提问",editPlaceholder:"修改问题内容…",editHint:"⌘/Ctrl+Enter 提交 · Esc 取消",expandMsg:"展开",collapseMsg:"收起",toolCalls:"工具调用",bashRuns:"终端运行",images:"图片",update:"更新",updateTip:"检查并更新 pi-web-ui",currentVersion:"当前版本",latestVersion:"最新版本",checkingUpdate:"检查中…",checkUpdate:"检查更新",upToDate:"已是最新版本",updateAvailable:"发现新版本 v{version}",updateNow:"立即更新",confirmUpdate:"确认更新(覆盖全局安装)",updateSuccess:"✅ 已更新,重启服务后生效",updateFailed:"更新失败:{detail}",restartHint:"重启:pi-web-ui server restart",refreshFiles:"刷新文件列表",rootDir:"根目录",noFiles:"暂无文件",linkFolderTip:"链接文件夹路径到对话",attachInlineTip:"附加内容到对话",referenceTip:"仅引用路径(AI 按需读取)",previewFile:"预览",downloadFile:"下载文件",downloadFailed:"下载失败:{error}",selectLinesHint:"点击选择行;拖拽或 Shift+点击选择范围",selectedRange:"已选 {n} 行(第 {start}-{end} 行)",fileLines:"{n} 行",selectAll:"全选",clearSelection:"清除",addToChat:"添加到对话",addedToChat:"已添加",previewTruncated:"⚠ 文件过大,仅预览前 512KB",previewLinesTruncated:"… 文件行数过多,仅显示前 {n} 行",binaryFile:"二进制文件,无法预览",previewNotSupported:"该类型文件不支持预览(仅图片 / 视频 / 文本)",emptyFile:"(空文件)",pluginRequest:"插件请求",noOptions:"(无选项)",inputPlaceholder:"输入内容",soundHeader:"声音提示",enableSound:"启用声音",preview:"试听",volume:"音量","sound.question":"问卷弹出","sound.question.desc":"ask_user_question 出现时","sound.done":"回复结束","sound.done.desc":"智能体完成一轮回答时","sound.start":"回复开始","sound.start.desc":"智能体开始新一轮时","sound.error":"出错","sound.error.desc":"出现错误提示时",setupTitle:"未检测到 pi agent 配置",setupDesc:"pi-web-ui 需要 pi 的配置目录(~/.pi/agent)和至少一个 API 密钥才能运行智能体。pi 内置了 openai、anthropic、deepseek 等服务商——选一个填密钥即可,全程无需打开终端。",installFailed:"✖ pi agent 安装失败:",retryInstall:"重试安装",skip:"跳过",installDone:"✅ pi agent CLI 已安装。选择服务商并填入 API 密钥即可开始对话:",provider:"服务商",configured:"已配置",providerKeyReady:"该服务商已配置密钥,可直接使用或更换新密钥。",apiKey:"API 密钥",saving:"保存中…",saveAndStart:"保存并开始使用",recheck:"重新检测",installing:"正在安装 pi agent CLI…",autoInstall:"自动安装 pi agent",attachment:"附件",plugin:"插件",unknown:"未知",thinkingWait:"正在思考",exitCode:"退出码 {code}",cancelled:"已取消",truncated:"… 内容过长,当前视图已截断",outputTruncated:"… 输出过长,当前视图已截断",refOnlyShort:"仅引用",folderRefShort:"文件夹 · 仅引用",inlineLines:"内联 · {n} 行",inlineLinesRange:"行 {start}-{end}",image:"🖼 图片",folderNotExpanded:"文件夹,未展开内容 —— 智能体会按需浏览目录",fileNotExpanded:"文件较大({size}),未展开内容 —— 智能体会按需读取","role.user":"你","role.assistant":"pi","role.tool":"工具","role.bash":"终端","role.branch":"分支摘要","role.compaction":"上下文已压缩",welcomeTitle:"pi 编码智能体",welcomeSub:"检查、编辑、运行 —— 随时待命",directory:"目录",clickToFill:"点击填入输入框",waitingResponse:"正在等待模型响应…",backToBottom:"回到底部","ex.understand":"了解这个项目","ex.understand.prompt":"介绍一下这个项目:整体结构、主要模块和如何运行?","ex.debug":"排查一个问题","ex.debug.prompt":"帮我排查一个 bug,请先说明问题现象,我会补充细节。","ex.test":"编写测试","ex.test.prompt":"为项目的核心模块编写单元测试。","ex.review":"代码审查","ex.review.prompt":"审查最近改动的代码,指出潜在问题和改进建议。",error:"出错",done:"完成",running:"执行中…",toolQueued:"排队中",copyArgs:"复制参数",errorOutput:"错误输出",output:"输出",waitingOutput:"等待输出…",thinkingNow:"思考中",thinkingPreview:"思考:{preview}",commands:"命令",newCommand:"新建命令",newTerminal:"新建终端",name:"名称",command:"命令",cwdHint:"(${pwd} = 当前工作目录)",noCommands:"还没有命令,点 + 添加一个",clickToRun:"点击运行",edit:"编辑",delete:"删除",confirmQ:"确认?",commandsFileHint:"${pwd} 指代当前工作目录",builtinTerminal:"内置终端",termEmptySub:"点击左侧命令运行,或点右侧 + 新建终端",noTerminal:"暂无终端",exited:"(已退出{code})",closeTerminal:"关闭终端",rerun:"重新读取 .pi/commands.json",terminalTitle:"终端 {n}",exampleName:"例如:启动开发服务器",exampleCommand:"例如:npm run dev",editProvider:"编辑服务商",builtinProviders:"内置服务商",hintKeyOnly:"只需填入 API 密钥",configuredBadge:"✓ 已配置",keyReady:"密钥已就绪",pasteKey:"粘贴 API 密钥…",savingKey:"保存中",saveKey:"保存密钥",customProviders:"自定义服务商",customDesc:"用于 Ollama / vLLM / 兼容 OpenAI 的代理等,写入 pi 的 models.json,保存后热重载、立即生效。",noCustomProviders:"还没有自定义服务商",modelsCount:"{n} 个模型",addProvider:"新增服务商",providerId:"服务商 ID",providerIdHint:"(必填,如 ollama / my-proxy)",displayName:"显示名",displayNamePh:"我的代理",apiType:"API 类型",baseUrlHint:"(OpenAI 兼容端点)",apiKeyHint:"sk-…(可留空,用 auth.json 的密钥)",authHeader:"自动添加 Authorization 请求头",modelsTitle:"模型",modelIdReq:"模型 ID(必填)",text:"文本",textImage:"文本+图片",contextWindow:"上下文",maxOutput:"最大输出",removeModel:"移除模型",addModel:"添加模型",deleteProviderConfirm:"删除服务商 {id} 及其 {n} 个模型?",loadingSession:"正在加载会话…",connectingServer:"正在连接 pi-web-ui 服务器…"},Ww={cancel:"Cancel",ok:"OK",save:"Save",close:"Close",loading:"Loading…",connected:"Connected",connecting:"Connecting…",reconnecting:"Reconnecting…",language:"Language",langZh:"中文",langEn:"English",copy:"Copy",viewSwitch:"Switch view",chat:"Chat",terminal:"Terminal",selectModel:"Select model",availableModels:"Available models",noModels:"No models available (configure an API key first)",reasoning:"reasoning",refreshModels:"Refresh model list",manageModels:"⚙ Manage models (add / edit)",manageModelsTitle:"Manage models",thinkingLevel:"Thinking level",thinking:"Thinking",thinkingChip:"Thinking: {level}",sound:"Sound",newChat:"New chat",newChatTip:"New chat (sessions are saved per browser)","thinking.off":"Off","thinking.minimal":"Minimal","thinking.low":"Low","thinking.medium":"Medium","thinking.high":"High","thinking.xhigh":"Extra high","thinking.max":"Max",context:"Context",contextUsage:"Context usage",cumulativeCost:"Cumulative cost",sessionMessages:"Session messages",messages:"messages",pluginStatus:"Plugin status",working:"Working",queued:"queued",enterPath:"Type a path, Enter to switch",cwdTip:"Working directory: {path} (click to switch)",folderRef:"Folder reference: {path}",refOnly:"Reference only: {path}",attachContent:"Attached content: {path}",attachLines:"Attached selected lines: {path} (lines {start}-{end})",removeAttachment:"Remove attachment",attachHint:"Will be sent with the next message",followUpQueued:"⏳ {n} follow-up message(s) queued",steeringQueued:"⏳ {n} steering message(s) queued",placeholderStreaming:"The agent is working… (messages will queue)",placeholderIdle:"Message pi — Enter to send, Shift+Enter for newline",placeholderConnecting:"Connecting to server…",stopAgent:"Stop agent",stop:"Stop",supplement:"Follow-up",supplementTip:"Send immediately after the current reply finishes",sendTip:"Send (Enter)",recentProjects:"Recent projects",openConversations:"Open chats",historySessions:"History",streaming:"Streaming…",noHistory:"No previous chats",current:"Current",messageCount:"{n} messages",tuiTip:"Chat in the pi terminal (TUI)",refreshList:"Refresh list",emptyChat:"Empty chat",editReask:"Edit & re-ask",editReaskTip:"Edit this question and re-ask from here (forks a new conversation; the original is kept)",reaskFromHere:"Re-ask from here",editPlaceholder:"Edit the question…",editHint:"⌘/Ctrl+Enter to submit · Esc to cancel",expandMsg:"Expand",collapseMsg:"Collapse",toolCalls:"tool calls",bashRuns:"bash runs",images:"images",update:"Update",updateTip:"Check & update pi-web-ui",currentVersion:"Current version",latestVersion:"Latest version",checkingUpdate:"Checking…",checkUpdate:"Check for updates",upToDate:"You're up to date",updateAvailable:"New version v{version} available",updateNow:"Update now",confirmUpdate:"Confirm (replaces global install)",updateSuccess:"✅ Updated — restart the server to apply",updateFailed:"Update failed: {detail}",restartHint:"Restart: pi-web-ui server restart",refreshFiles:"Refresh file list",rootDir:"Root",noFiles:"No files",linkFolderTip:"Link folder path to chat",attachInlineTip:"Attach content to chat",referenceTip:"Reference path only (AI reads on demand)",previewFile:"Preview",downloadFile:"Download file",downloadFailed:"Download failed: {error}",selectLinesHint:"Click a line to select; drag or Shift+click for a range",selectedRange:"Selected {n} lines (lines {start}-{end})",fileLines:"{n} lines",selectAll:"Select all",clearSelection:"Clear",addToChat:"Add to chat",addedToChat:"Added",previewTruncated:"⚠ File too large — previewing the first 512KB",previewLinesTruncated:"… too many lines — showing the first {n}",binaryFile:"Binary file — preview not available",previewNotSupported:"This file type can't be previewed (only images / videos / text)",emptyFile:"(empty file)",pluginRequest:"Plugin request",noOptions:"(no options)",inputPlaceholder:"Enter content",soundHeader:"Sound notifications",enableSound:"Enable sound",preview:"Preview",volume:"Volume","sound.question":"Question popup","sound.question.desc":"When ask_user_question appears","sound.done":"Reply finished","sound.done.desc":"When the agent finishes a turn","sound.start":"Reply started","sound.start.desc":"When the agent starts a new turn","sound.error":"Error","sound.error.desc":"When an error notice appears",setupTitle:"pi agent config not detected",setupDesc:"pi-web-ui needs pi's config directory (~/.pi/agent) and at least one API key to run the agent. pi has built-in providers such as openai, anthropic, and deepseek — just pick one and enter a key, no terminal needed.",installFailed:"✖ pi agent installation failed:",retryInstall:"Retry install",skip:"Skip",installDone:"✅ pi agent CLI installed. Pick a provider and enter an API key to start chatting:",provider:"Provider",configured:"configured",providerKeyReady:"This provider already has a key — use it or replace it.",apiKey:"API key",saving:"Saving…",saveAndStart:"Save and start using",recheck:"Recheck",installing:"Installing pi agent CLI…",autoInstall:"Auto-install pi agent",attachment:"Attachment",plugin:"plugin",unknown:"unknown",thinkingWait:"Thinking",exitCode:"Exit code {code}",cancelled:"Cancelled",truncated:"… content too long, truncated in this view",outputTruncated:"… output too long, truncated in this view",refOnlyShort:"Reference only",folderRefShort:"Folder · reference only",inlineLines:"Inline · {n} lines",inlineLinesRange:"Lines {start}-{end}",image:"🖼 Image",folderNotExpanded:"Folder — content not expanded, the agent will browse it as needed",fileNotExpanded:"Large file ({size}) — content not expanded, the agent will read it as needed","role.user":"You","role.assistant":"pi","role.tool":"Tool","role.bash":"Terminal","role.branch":"Branch summary","role.compaction":"Context compacted",welcomeTitle:"pi coding agent",welcomeSub:"Inspect, edit, run — always ready",directory:"Directory",clickToFill:"Click to fill input",waitingResponse:"Waiting for model response…",backToBottom:"Back to bottom","ex.understand":"Understand this project","ex.understand.prompt":"Introduce this project: overall structure, main modules, and how to run it?","ex.debug":"Debug an issue","ex.debug.prompt":"Help me debug a bug — describe the symptom first, and I'll add details.","ex.test":"Write tests","ex.test.prompt":"Write unit tests for the core modules.","ex.review":"Code review","ex.review.prompt":"Review the recently changed code and point out potential issues and improvements.",error:"Error",done:"Done",running:"Running…",toolQueued:"Queued",copyArgs:"Copy args",errorOutput:"Error output",output:"Output",waitingOutput:"Waiting for output…",thinkingNow:"Thinking",thinkingPreview:"Thinking: {preview}",commands:"Commands",newCommand:"New command",newTerminal:"New terminal",name:"Name",command:"Command",cwdHint:"(${pwd} = current working directory)",noCommands:"No commands yet — click + to add one",clickToRun:"Click to run",edit:"Edit",delete:"Delete",confirmQ:"Confirm?",commandsFileHint:"${pwd} refers to the current working directory",builtinTerminal:"Built-in terminal",termEmptySub:"Click a command on the left to run it, or + on the right for a new terminal",noTerminal:"No terminals",exited:"(exited{code})",closeTerminal:"Close terminal",rerun:"Reload .pi/commands.json",terminalTitle:"Terminal {n}",exampleName:"e.g. start dev server",exampleCommand:"e.g. npm run dev",editProvider:"Edit provider",builtinProviders:"Built-in providers",hintKeyOnly:"Just enter an API key",configuredBadge:"✓ Configured",keyReady:"Key ready",pasteKey:"Paste API key…",savingKey:"Saving",saveKey:"Save key",customProviders:"Custom providers",customDesc:"For Ollama / vLLM / OpenAI-compatible proxies, etc. Written to pi's models.json — hot-reloaded immediately.",noCustomProviders:"No custom providers yet",modelsCount:"{n} models",addProvider:"Add provider",providerId:"Provider ID",providerIdHint:"(required, e.g. ollama / my-proxy)",displayName:"Display name",displayNamePh:"My proxy",apiType:"API type",baseUrlHint:"(OpenAI-compatible endpoint)",apiKeyHint:"sk-… (optional — uses the auth.json key)",authHeader:"Auto-add Authorization header",modelsTitle:"Models",modelIdReq:"Model ID (required)",text:"Text",textImage:"Text+image",contextWindow:"Context",maxOutput:"Max output",removeModel:"Remove model",addModel:"Add model",deleteProviderConfirm:"Delete provider {id} and its {n} models?",loadingSession:"Loading session…",connectingServer:"Connecting to pi-web-ui server…"},gv=Q.createContext(null);function Kw(){try{const e=localStorage.getItem(mv);if(e==="zh"||e==="en")return e}catch{}return"zh"}function qw({children:e}){const[t,n]=Q.useState(Kw),r=Q.useCallback(l=>{n(l);try{localStorage.setItem(mv,l)}catch{}},[]),o=Q.useCallback((l,u)=>{let d=Ww[l];if(t==="zh"&&(d=$w[l]),u)for(const[h,p]of Object.entries(u))d=d.replaceAll(`{${h}}`,String(p));return d},[t]);Q.useEffect(()=>{document.documentElement.lang=t==="zh"?"zh-CN":"en"},[t]);const a=Q.useMemo(()=>({locale:t,setLocale:r,t:o}),[t,r,o]);return _.jsx(gv.Provider,{value:a,children:e})}function _v(){const e=Q.useContext(gv);if(!e)throw new Error("useI18n must be used within LanguageProvider");return e}function qt(){return _v().t}const Vw=[{kind:"question",labelKey:"sound.question",descKey:"sound.question.desc"},{kind:"done",labelKey:"sound.done",descKey:"sound.done.desc"},{kind:"start",labelKey:"sound.start",descKey:"sound.start.desc"},{kind:"error",labelKey:"sound.error",descKey:"sound.error.desc"}];function Gw({settings:e,onChange:t,onPreview:n}){const r=qt(),o=a=>t({...e,...a});return _.jsxs("div",{className:"sound-menu",children:[_.jsx("div",{className:"dd-header",children:r("soundHeader")}),_.jsxs("label",{className:"sound-row sound-master",children:[_.jsxs("span",{className:"sound-label",children:[_.jsx(cv,{className:"sound-icon"}),_.jsx("span",{children:r("enableSound")})]}),_.jsx("input",{type:"checkbox",checked:e.enabled,onChange:a=>o({enabled:a.target.checked})})]}),Vw.map(({kind:a,labelKey:l,descKey:u})=>_.jsxs("label",{className:`sound-row ${e.enabled?"":"disabled"}`,children:[_.jsxs("span",{className:"sound-label",children:[_.jsx("span",{className:"sound-name",children:r(l)}),_.jsx("span",{className:"sound-desc",children:r(u)})]}),_.jsxs("span",{className:"sound-right",children:[_.jsx("button",{type:"button",className:"sound-preview",title:r("preview"),disabled:!e.enabled,onClick:d=>{d.preventDefault(),n(a)},children:r("preview")}),_.jsx("input",{type:"checkbox",checked:e[a],disabled:!e.enabled,onChange:d=>o({[a]:d.target.checked})})]})]},a)),_.jsxs("div",{className:`sound-volume ${e.enabled?"":"disabled"}`,children:[_.jsx("span",{className:"sound-name",children:r("volume")}),_.jsx("input",{type:"range",min:0,max:100,step:5,value:e.volume,disabled:!e.enabled,onChange:a=>o({volume:Number(a.target.value)})}),_.jsxs("span",{className:"sound-vol-num",children:[e.volume,"%"]})]})]})}const Yw=["off","minimal","low","medium","high","xhigh","max"];function Xw({chat:e,send:t,view:n,onViewChange:r,onManageModels:o,sound:a,onSoundChange:l,onSoundPreview:u}){var te,z,ie,C;const{locale:d,setLocale:h,t:p}=_v(),m=e.state,y=m==null?void 0:m.model,b=y?`${y.provider}/${y.id}`:null,[w,S]=Q.useState(!1),[k,E]=Q.useState(!1),[T,N]=Q.useState(!1),[O,K]=Q.useState(!1),[I,re]=Q.useState(!1),[Z,F]=Q.useState(!1),[L,X]=Q.useState(!1),W=Yw.map(A=>({value:A,label:p(`thinking.${A}`)})),j=A=>{var G;return((G=W.find(R=>R.value===A))==null?void 0:G.label)??A},$=[{value:"zh",label:p("langZh")},{value:"en",label:p("langEn")}];Q.useEffect(()=>{w&&e.models.length===0&&!L&&(X(!0),t({type:"list_models"}))},[w,e.models.length,L,t]),Q.useEffect(()=>{e.models.length>0&&X(!1)},[e.models.length]);const P=e.ready?p("connected"):e.status==="closed"?p("reconnecting"):p("connecting"),Y=e.ready?"ok":"busy";return _.jsxs("header",{className:"topbar",children:[_.jsxs("div",{className:"brand",children:[_.jsx("span",{className:"brand-logo",children:"π"}),_.jsx("span",{className:"brand-name",children:"pi-web-ui"}),_.jsx("span",{className:`conn-dot ${Y}`,title:P}),_.jsx("span",{className:"conn-label",children:P})]}),_.jsxs("div",{className:"topbar-actions",children:[_.jsxs("div",{className:"view-switch",role:"tablist","aria-label":p("viewSwitch"),children:[_.jsxs("button",{type:"button",role:"tab","aria-selected":n==="chat",className:n==="chat"?"active":"",onClick:()=>r("chat"),children:[_.jsx(Wh,{}),_.jsx("span",{children:p("chat")})]}),_.jsxs("button",{type:"button",role:"tab","aria-selected":n==="terminal",className:n==="terminal"?"active":"",onClick:()=>r("terminal"),children:[_.jsx($d,{}),_.jsx("span",{children:p("terminal")})]})]}),_.jsxs(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(Wd,{}),_.jsx("span",{className:"chip-model",children:y?y.name:p("selectModel")}),y&&_.jsx("span",{className:"chip-sub",children:y.provider})]}),open:w,onOpenChange:S,children:[_.jsx("div",{className:"dd-header",children:p("availableModels")}),(L||e.modelsLoading)&&_.jsx("div",{className:"dd-loading",children:p("loading")}),e.models.length===0&&!L&&!e.modelsLoading&&_.jsx("div",{className:"dd-loading",children:p("noModels")}),e.models.map(A=>_.jsxs(ah,{active:b===A.id,onClick:()=>{b!==A.id&&t({type:"set_model",modelId:A.id}),S(!1)},children:[_.jsx("span",{className:"dd-model-name",children:A.name}),_.jsxs("span",{className:"dd-model-sub",children:[A.provider,A.reasoning?` · ${p("reasoning")}`:""]})]},A.id)),_.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>t({type:"list_models"}),children:p("refreshModels")}),_.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>{S(!1),o()},children:p("manageModels")})]}),_.jsxs(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(Iw,{}),_.jsx("span",{className:"chip-sub",children:p("thinkingChip",{level:m?j(m.thinkingLevel):"—"})})]}),open:k,onOpenChange:E,children:[_.jsx("div",{className:"dd-header",children:p("thinkingLevel")}),W.map(A=>_.jsx(ah,{active:(m==null?void 0:m.thinkingLevel)===A.value,onClick:()=>{(m==null?void 0:m.thinkingLevel)!==A.value&&t({type:"set_thinking",level:A.value}),E(!1)},children:A.label},A.value))]}),_.jsx(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(cv,{}),_.jsx("span",{className:"chip-sub",children:p("sound")})]}),open:T,onOpenChange:N,children:_.jsx(Gw,{settings:a,onChange:l,onPreview:u})}),_.jsxs(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(Fw,{}),_.jsx("span",{className:"chip-sub",children:d==="zh"?p("langZh"):"EN"})]}),open:O,onOpenChange:K,children:[_.jsx("div",{className:"dd-header",children:p("language")}),$.map(A=>_.jsx(ah,{active:d===A.value,onClick:()=>{h(A.value),K(!1)},children:A.label},A.value))]}),_.jsxs("button",{type:"button",className:"chip newchat","data-tip":p("newChatTip"),onClick:()=>t({type:"new_chat"}),children:[_.jsx(ss,{}),_.jsx("span",{children:p("newChat")})]}),_.jsxs(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(dv,{}),_.jsxs("span",{className:"chip-sub",children:["v",((te=e.update)==null?void 0:te.current)??"…"]}),e.update&&!e.update.upToDate&&!e.update.pendingRestart&&_.jsx("span",{className:"update-dot",title:p("updateAvailable",{version:e.update.latest??""})})]}),open:I,onOpenChange:A=>{re(A),F(!1),A&&t({type:"check_update"})},children:[_.jsx("div",{className:"dd-header",children:p("update")}),_.jsxs("div",{className:"dd-update",children:[_.jsxs("div",{className:"dd-row",children:[_.jsx("span",{children:p("currentVersion")}),_.jsxs("b",{children:["v",((z=e.update)==null?void 0:z.current)??"…"]})]}),_.jsxs("div",{className:"dd-row",children:[_.jsx("span",{children:p("latestVersion")}),_.jsx("b",{children:e.update===null?p("checkingUpdate"):e.update.error?e.update.error:e.update.latest?`v${e.update.latest}`:p("checkingUpdate")})]}),((ie=e.update)==null?void 0:ie.pendingRestart)&&_.jsx("div",{className:"dd-note ok",children:p("updateSuccess")}),e.update&&!e.update.pendingRestart&&e.update.upToDate&&_.jsx("div",{className:"dd-note ok",children:p("upToDate")}),e.update&&!e.update.pendingRestart&&!e.update.upToDate&&e.update.latest&&_.jsx("div",{className:"dd-note warn",children:p("updateAvailable",{version:e.update.latest})}),e.updateResult&&!e.updateResult.ok&&_.jsx("div",{className:"dd-note err",children:p("updateFailed",{detail:e.updateResult.detail})}),((C=e.update)==null?void 0:C.pendingRestart)&&_.jsx("div",{className:"dd-note",children:p("restartHint")})]}),_.jsxs("div",{className:"dd-actions",children:[_.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>t({type:"check_update"}),children:e.update===null?p("checkingUpdate"):p("checkUpdate")}),e.update&&!e.update.pendingRestart&&!e.update.upToDate&&e.update.latest&&_.jsx("button",{type:"button",className:`dd-refresh accent ${Z?"armed":""}`,onClick:()=>{if(!Z){F(!0);return}F(!1),re(!1),t({type:"update_app"})},children:p(Z?"confirmUpdate":"updateNow")})]})]})]})]})}function Jm(e){const t=new Date(e),n=new Date;return t.toDateString()===n.toDateString()?`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`:`${t.getMonth()+1}/${t.getDate()}`}function Zw({chat:e,send:t}){var h,p;const n=qt(),r=(h=e.state)==null?void 0:h.sessionFile,o=(p=e.state)==null?void 0:p.cwd,a=e.sessions,l=e.projects,u=m=>{const y=m.name||m.firstMessage.trim();return y.length>0?y:n("emptyChat")},d=m=>m.split(/[\\/]/).pop()||m;return _.jsxs("aside",{className:"panel panel-left",children:[l.length>0&&_.jsxs("div",{className:"panel-projects",children:[_.jsx("div",{className:"panel-section-title",children:n("recentProjects")}),l.map(m=>{const y=o===m.path;return _.jsxs("button",{type:"button",className:`project-item ${y?"active":""}`,title:m.path,onClick:()=>{y||t({type:"set_cwd",path:m.path})},children:[_.jsx(ra,{className:"project-icon"}),_.jsxs("span",{className:"project-info",children:[_.jsx("span",{className:"project-name",children:d(m.path)}),_.jsx("span",{className:"project-path",children:m.path})]}),_.jsx("span",{className:"project-time",children:Jm(m.lastUsed)})]},m.path)})]}),_.jsxs("div",{className:"panel-body",children:[e.conversations.length>1&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"panel-section-title",children:n("openConversations")}),e.conversations.map(m=>{const y=e.activeConversationId===m.id;return _.jsxs("button",{type:"button",className:`session-item ${y?"active":""}`,title:`${m.title} — ${m.cwd}`,onClick:()=>{y||t({type:"switch_conversation",id:m.id})},children:[_.jsx(Wh,{className:"session-icon"}),_.jsxs("span",{className:"session-info",children:[_.jsx("span",{className:"session-title",children:m.title}),_.jsxs("span",{className:"session-sub",children:[_.jsxs("span",{className:"session-cwd",title:m.cwd,children:[_.jsx(ra,{})," ",d(m.cwd)]}),y?n("current"):n("messageCount",{n:m.messageCount})]})]}),m.isStreaming&&_.jsx("span",{className:"conv-streaming",title:n("streaming")})]},m.id)}),_.jsx("div",{className:"panel-section-divider"})]}),_.jsx("div",{className:"panel-section-title",children:n("historySessions")}),a.length===0&&_.jsx("div",{className:"panel-empty",children:n("noHistory")}),a.map(m=>{const y=r===m.path;return _.jsxs("button",{type:"button",className:`session-item ${y?"active":""}`,title:m.path,onClick:()=>{y||t({type:"switch_session",path:m.path})},children:[_.jsx(Wh,{className:"session-icon"}),_.jsxs("span",{className:"session-info",children:[_.jsx("span",{className:"session-title",children:u(m)}),_.jsxs("span",{className:"session-sub",children:[y?n("current"):n("messageCount",{n:m.messageCount}),m.source==="tui"&&_.jsx("span",{className:"session-src",title:n("tuiTip"),children:"TUI"})]})]}),_.jsx("span",{className:"session-time",children:Jm(m.modified)})]},m.path)})]}),_.jsx("button",{type:"button",className:"panel-fab",title:n("refreshList"),onClick:()=>{t({type:"list_sessions"}),t({type:"list_projects"})},children:_.jsx(hc,{})})]})}const eg=2e5,Qw=2e5;function Jw(){const e=new Map,t=new Map;return{write(n,r){const o=e.get(n);if(o){o.write(r);return}const a=t.get(n)??"",l=a.length+r.length>Qw?r:a+r;t.set(n,l)},register(n,r){e.set(n,r);const o=t.get(n);if(o){try{r.write(o)}catch{}t.delete(n)}return()=>{e.get(n)===r&&e.delete(n),t.delete(n)}},clear(){e.clear(),t.clear()}}}function e0(e,t){const n=new Set;for(const o of t.messages)o.role==="toolResult"&&o.toolCallId&&n.add(o.toolCallId),o.role==="bashExecution"&&n.add(`bash-${o.id}`);let r=!1;for(const o of e.keys())n.has(o)&&(e.delete(o),r=!0);return r?new Map(e):e}function t0(e,t){switch(t.type){case"status":return{...e,status:t.status,ready:t.status==="open"?e.ready:!1,terminals:t.status==="open"?e.terminals:[]};case"ready":return{...e,serverVersion:t.serverVersion,ready:!0};case"snapshot":return{...e,ready:!0,state:t.state,activeConversationId:t.state.conversationId,liveOutputs:e0(e.liveOutputs,t.state)};case"tool_delta":{const n=e.liveOutputs.get(t.toolCallId),r=((n==null?void 0:n.text)??"")+t.delta,o=r.length>eg?r.slice(0,eg):r,a=new Map(e.liveOutputs);return a.set(t.toolCallId,{toolName:t.toolName,text:o}),{...e,liveOutputs:a}}case"notice":return{...e,notices:[...e.notices,t.notice].slice(-6)};case"dismiss_notice":return{...e,notices:e.notices.filter(n=>n.id!==t.id)};case"sessions":return{...e,sessions:t.sessions};case"conversations":return{...e,conversations:t.conversations,activeConversationId:t.activeId};case"projects":return{...e,projects:t.projects};case"files":return{...e,files:t.files};case"file_content":return{...e,fileContent:t.content};case"models":return{...e,models:t.models,modelsLoading:t.loading};case"models_config":return{...e,modelsConfig:t.providers};case"providers_status":return{...e,providers:t.providers};case"install_result":return{...e,installResult:t.result};case"path_completions":return{...e,pathCompletions:t.completions};case"update_status":return{...e,update:t.status};case"update_result":return{...e,updateResult:t.result};case"widgets":return{...e,widgets:t.widgets};case"statuses":return{...e,statuses:t.statuses};case"dialog":return{...e,dialog:t.dialog};case"commands":return{...e,commands:t.commands,commandsPath:t.path};case"terminal_add":return{...e,terminals:[...e.terminals,t.meta]};case"terminal_remove":return{...e,terminals:e.terminals.filter(n=>n.id!==t.id)};case"terminal_exit":return{...e,terminals:e.terminals.map(n=>n.id===t.terminalId?{...n,running:!1,exitCode:t.exitCode}:n)};case"terminal_restart":return{...e,terminals:e.terminals.map(n=>n.id===t.terminalId?{...n,running:!0,exitCode:null}:n)};default:return e}}const tg="pi-web-client-id";function Kd(){let e=localStorage.getItem(tg);return e||(e=crypto.randomUUID(),localStorage.setItem(tg,e)),e}function n0(){return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/ws`}function i0(){const[e,t]=Q.useReducer(t0,{status:"connecting",ready:!1,state:null,liveOutputs:new Map,notices:[],sessions:[],conversations:[],activeConversationId:"",projects:[],files:null,fileContent:null,models:[],modelsLoading:!1,modelsConfig:[],providers:[],installResult:null,pathCompletions:[],update:null,updateResult:null,widgets:[],statuses:[],dialog:null,commands:[],commandsPath:"",terminals:[]}),n=Q.useRef(null),r=Q.useRef(Jw()),o=Q.useRef(0),a=Q.useRef(null),l=Q.useRef(!0),u=Q.useRef(0),d=Q.useRef(0),h=Q.useCallback((T,N)=>{const O=++d.current;t({type:"notice",notice:{id:O,level:T,text:N}}),setTimeout(()=>t({type:"dismiss_notice",id:O}),T==="error"?12e3:7e3)},[]),p=Q.useCallback(T=>{const N=n.current;return N&&N.readyState===WebSocket.OPEN?(N.send(JSON.stringify(T)),!0):!1},[]),m=Q.useCallback(()=>{if(!l.current)return;t({type:"status",status:"connecting"});const T=new WebSocket(n0());n.current=T,T.onopen=()=>{n.current===T&&(t({type:"status",status:"open"}),o.current=0,u.current=Date.now(),T.send(JSON.stringify({type:"hello",clientId:Kd()})))},T.onmessage=N=>{if(n.current!==T)return;u.current=Date.now();let O;try{O=JSON.parse(N.data)}catch{return}switch(O.type){case"ready":t({type:"ready",serverVersion:O.serverVersion}),T.send(JSON.stringify({type:"get_state"})),T.send(JSON.stringify({type:"list_sessions"})),T.send(JSON.stringify({type:"list_projects"})),T.send(JSON.stringify({type:"list_files"})),T.send(JSON.stringify({type:"list_models"})),T.send(JSON.stringify({type:"list_commands"})),T.send(JSON.stringify({type:"check_update"}));break;case"snapshot":t({type:"snapshot",state:O.state});break;case"tool_delta":t({type:"tool_delta",toolCallId:O.toolCallId,toolName:O.toolName,delta:O.delta});break;case"notice":{const K=++d.current;t({type:"notice",notice:{id:K,level:O.level,text:O.text}}),setTimeout(()=>t({type:"dismiss_notice",id:K}),O.level==="error"?12e3:7e3);break}case"sessions":t({type:"sessions",sessions:O.sessions});break;case"conversations":t({type:"conversations",conversations:O.conversations,activeId:O.activeId});break;case"projects":t({type:"projects",projects:O.projects});break;case"files":t({type:"files",files:O});break;case"file_content":t({type:"file_content",content:O});break;case"models":t({type:"models",models:O.models,loading:!1});break;case"models_config":t({type:"models_config",providers:O.providers});break;case"providers_status":t({type:"providers_status",providers:O.providers});break;case"install_result":t({type:"install_result",result:O});break;case"path_completions":t({type:"path_completions",completions:O.completions});break;case"update_status":t({type:"update_status",status:O});break;case"update_result":t({type:"update_result",result:O});break;case"widgets":t({type:"widgets",widgets:O.widgets});break;case"statuses":t({type:"statuses",statuses:O.statuses});break;case"dialog":t({type:"dialog",dialog:{id:O.id,kind:O.kind,title:O.title,args:O.args}});break;case"dialog_closed":t({type:"dialog",dialog:null});break;case"terminal_output":r.current.write(O.terminalId,O.data);break;case"terminal_exit":t({type:"terminal_exit",terminalId:O.terminalId,exitCode:O.exitCode});break;case"commands":t({type:"commands",commands:O.commands,path:O.path});break}},T.onclose=()=>{if(n.current===T&&(n.current=null),r.current.clear(),!l.current)return;t({type:"status",status:"closed"});const N=Math.min(1e3*2**o.current,1e4);o.current+=1,a.current=setTimeout(()=>{a.current=null,m()},N)},T.onerror=()=>{T.close()}},[]);Q.useEffect(()=>{l.current=!0,m();const T=setInterval(()=>{if(!l.current)return;const N=n.current;N&&N.readyState===WebSocket.OPEN&&Date.now()-u.current>3e4&&N.close()},5e3);return()=>{var N;l.current=!1,clearInterval(T),a.current&&(clearTimeout(a.current),a.current=null),(N=n.current)==null||N.close(),n.current=null}},[m]);const y=Q.useCallback(T=>t({type:"dismiss_notice",id:T}),[]),b=Q.useCallback(T=>t({type:"terminal_add",meta:T}),[]),w=Q.useCallback(T=>t({type:"terminal_remove",id:T}),[]),S=Q.useCallback(T=>t({type:"terminal_restart",terminalId:T}),[]),k=Q.useCallback((T,N)=>r.current.register(T,N),[]),E=Q.useRef({chat:e,send:p,pushNotice:h,dismissNotice:y,terminal:{create:b,close:w,register:k,restart:S}});return E.current={chat:e,send:p,pushNotice:h,dismissNotice:y,terminal:{create:b,close:w,register:k,restart:S}},E.current}const r0=200*1024*1024;function ng(e,t=!0){return`/api/file?${new URLSearchParams({clientId:Kd(),path:e,...t?{download:"1"}:{}})}`}async function s0(e,t){try{const n=await fetch(ng(e));if(!n.ok)return{ok:!1,error:await n.text().catch(()=>"")||(n.status===404?"文件不存在":`HTTP ${n.status}`)};if(Number(n.headers.get("content-length")??"0")>r0)return window.location.assign(ng(e)),{ok:!0};const o=await n.blob(),a=URL.createObjectURL(o),l=document.createElement("a");return l.href=a,l.download=t,document.body.appendChild(l),l.click(),l.remove(),setTimeout(()=>URL.revokeObjectURL(a),1e4),{ok:!0}}catch(n){return{ok:!1,error:n instanceof Error?n.message:String(n)}}}function o0({chat:e,send:t,onAttach:n,onPreview:r,onNotice:o}){var T;const a=qt(),[l,u]=Q.useState(""),[d,h]=Q.useState(!1),p=e.files,m=1e4,y=Q.useRef(0),b=Q.useRef(void 0),w=Q.useCallback((N,O)=>{const K=++y.current;u(N),O!=null&&O.silent||h(!0),t({type:"list_files",path:N===""?void 0:N})||y.current===K&&h(!1)},[t]);Q.useEffect(()=>{p&&p.path===l&&h(!1)},[p,l]),Q.useEffect(()=>{var K;const N=(K=e.state)==null?void 0:K.cwd;if(N!==b.current){b.current=N,w("",{silent:!0});return}const O=setInterval(()=>{document.visibilityState!=="hidden"&&w(l,{silent:!0})},m);return()=>clearInterval(O)},[(T=e.state)==null?void 0:T.cwd,l,w]);const S=N=>w(N),k=()=>{(p==null?void 0:p.parent)!==null&&(p==null?void 0:p.parent)!==void 0&&w(p.parent)},E=l.split("/").filter(Boolean);return _.jsxs("aside",{className:"panel panel-right",children:[_.jsxs("div",{className:"panel-crumbs",children:[_.jsx("button",{type:"button",className:`crumb ${l===""?"active":""}`,onClick:()=>w(""),children:a("rootDir")}),E.map((N,O)=>{const K=E.slice(0,O+1).join("/");return _.jsxs("span",{className:"crumb-seg",children:[_.jsx(dc,{}),_.jsx("button",{type:"button",className:`crumb ${K===l?"active":""}`,onClick:()=>w(K),children:N})]},K)})]}),_.jsxs("div",{className:"panel-body",children:[d&&_.jsx("div",{className:"panel-empty",children:a("loading")}),!d&&p&&p.path===l&&_.jsxs(_.Fragment,{children:[p.path!==""&&_.jsxs("button",{type:"button",className:"file-item dir",onClick:k,children:[_.jsx(ra,{className:"file-icon"}),_.jsx("span",{className:"file-name",children:".."})]}),p.entries.map(N=>N.type==="dir"?_.jsxs("div",{className:"file-item dir",children:[_.jsxs("button",{type:"button",className:"file-dir-main",onClick:()=>S(N.path),children:[_.jsx(ra,{className:"file-icon"}),_.jsx("span",{className:"file-name",children:N.name})]}),_.jsx("button",{type:"button",className:"file-attach ref","data-tip":a("linkFolderTip"),onClick:()=>n(N.path,N.name,"reference",!0),children:_.jsx(Kh,{})})]},N.path):_.jsxs("div",{className:"file-item file",children:[_.jsxs("button",{type:"button",className:`file-name ${N.kind==="none"?"no-preview":""}`,title:`${N.path} — ${N.kind==="none"?a("previewNotSupported"):a("previewFile")}`,onClick:N.kind==="none"?void 0:()=>r(N.path,N.name),children:[_.jsx(uv,{className:"file-icon"}),_.jsx("span",{className:"file-name-text",children:N.name})]}),_.jsx("button",{type:"button",className:"file-attach download","data-tip":a("downloadFile"),onClick:()=>{s0(N.path,N.name).then(O=>{O.ok||o("error",a("downloadFailed",{error:O.error}))})},children:_.jsx(dv,{})}),_.jsx("button",{type:"button",className:"file-attach inline","data-tip":a("attachInlineTip"),onClick:()=>n(N.path,N.name,"inline"),children:_.jsx(ss,{})}),_.jsx("button",{type:"button",className:"file-attach ref","data-tip":a("referenceTip"),onClick:()=>n(N.path,N.name,"reference"),children:_.jsx(Kh,{})})]},N.path))]}),!d&&!p&&_.jsx("div",{className:"panel-empty",children:a("noFiles")})]}),e.widgets.filter(N=>N.lines.length>0).length>0&&_.jsx("div",{className:"panel-widgets",children:e.widgets.filter(N=>N.lines.length>0).map(N=>_.jsxs("div",{className:"widget",children:[_.jsx("div",{className:"widget-title",children:N.key}),_.jsx("pre",{className:"widget-lines",children:N.lines.join(`
40
+ `+v.stack}return{value:i,source:s,stack:g,digest:null}}function Cu(i,s,c){return{value:i,source:null,stack:c??null,digest:s??null}}function Nu(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var qS=typeof WeakMap=="function"?WeakMap:Map;function Yp(i,s,c){c=qi(-1,c),c.tag=3,c.payload={element:null};var f=s.value;return c.callback=function(){dl||(dl=!0,Hu=f),Nu(i,s)},c}function Xp(i,s,c){c=qi(-1,c),c.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var g=s.value;c.payload=function(){return f(g)},c.callback=function(){Nu(i,s)}}var v=i.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(c.callback=function(){Nu(i,s),typeof f!="function"&&(mr===null?mr=new Set([this]):mr.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),c}function Zp(i,s,c){var f=i.pingCache;if(f===null){f=i.pingCache=new qS;var g=new Set;f.set(s,g)}else g=f.get(s),g===void 0&&(g=new Set,f.set(s,g));g.has(c)||(g.add(c),i=ow.bind(null,i,s,c),s.then(i,i))}function Qp(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function Jp(i,s,c,f,g){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=qi(-1,1),s.tag=2,fr(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var VS=O.ReactCurrentOwner,Tn=!1;function vn(i,s,c,f){s.child=i===null?yp(s,null,c,f):Ms(s,i.child,c,f)}function em(i,s,c,f,g){c=c.render;var v=s.ref;return Os(s,g),f=vu(i,s,c,f,v,g),c=yu(),i!==null&&!Tn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Vi(i,s,g)):(_t&&c&&tu(s),s.flags|=1,vn(i,s,f,g),s.child)}function tm(i,s,c,f,g){if(i===null){var v=c.type;return typeof v=="function"&&!Yu(v)&&v.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=v,nm(i,s,v,f,g)):(i=vl(c.type,null,f,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(v=i.child,(i.lanes&g)===0){var x=v.memoizedProps;if(c=c.compare,c=c!==null?c:fo,c(x,f)&&i.ref===s.ref)return Vi(i,s,g)}return s.flags|=1,i=yr(v,f),i.ref=s.ref,i.return=s,s.child=i}function nm(i,s,c,f,g){if(i!==null){var v=i.memoizedProps;if(fo(v,f)&&i.ref===s.ref)if(Tn=!1,s.pendingProps=f=v,(i.lanes&g)!==0)(i.flags&131072)!==0&&(Tn=!0);else return s.lanes=i.lanes,Vi(i,s,g)}return Tu(i,s,c,f,g)}function im(i,s,c){var f=s.pendingProps,g=f.children,v=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ht(Ps,Un),Un|=c;else{if((c&1073741824)===0)return i=v!==null?v.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,ht(Ps,Un),Un|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=v!==null?v.baseLanes:c,ht(Ps,Un),Un|=f}else v!==null?(f=v.baseLanes|c,s.memoizedState=null):f=c,ht(Ps,Un),Un|=f;return vn(i,s,g,c),s.child}function rm(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Tu(i,s,c,f,g){var v=Nn(c)?zr:cn.current;return v=Cs(s,v),Os(s,g),c=vu(i,s,c,f,v,g),f=yu(),i!==null&&!Tn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Vi(i,s,g)):(_t&&f&&tu(s),s.flags|=1,vn(i,s,c,g),s.child)}function sm(i,s,c,f,g){if(Nn(c)){var v=!0;$a(s)}else v=!1;if(Os(s,g),s.stateNode===null)al(i,s),Vp(s,c,f),Eu(s,c,f,g),f=!0;else if(i===null){var x=s.stateNode,M=s.memoizedProps;x.props=M;var B=x.context,V=c.contextType;typeof V=="object"&&V!==null?V=Zn(V):(V=Nn(c)?zr:cn.current,V=Cs(s,V));var oe=c.getDerivedStateFromProps,ae=typeof oe=="function"||typeof x.getSnapshotBeforeUpdate=="function";ae||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(M!==f||B!==V)&&Gp(s,x,f,V),dr=!1;var se=s.memoizedState;x.state=se,Qa(s,f,x,g),B=s.memoizedState,M!==f||se!==B||Cn.current||dr?(typeof oe=="function"&&(ku(s,c,oe,f),B=s.memoizedState),(M=dr||qp(s,c,M,f,se,B,V))?(ae||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=B),x.props=f,x.state=B,x.context=V,f=M):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{x=s.stateNode,Sp(i,s),M=s.memoizedProps,V=s.type===s.elementType?M:di(s.type,M),x.props=V,ae=s.pendingProps,se=x.context,B=c.contextType,typeof B=="object"&&B!==null?B=Zn(B):(B=Nn(c)?zr:cn.current,B=Cs(s,B));var ge=c.getDerivedStateFromProps;(oe=typeof ge=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(M!==ae||se!==B)&&Gp(s,x,f,B),dr=!1,se=s.memoizedState,x.state=se,Qa(s,f,x,g);var xe=s.memoizedState;M!==ae||se!==xe||Cn.current||dr?(typeof ge=="function"&&(ku(s,c,ge,f),xe=s.memoizedState),(V=dr||qp(s,c,V,f,se,xe,B)||!1)?(oe||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(f,xe,B),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(f,xe,B)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||M===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=xe),x.props=f,x.state=xe,x.context=B,f=V):(typeof x.componentDidUpdate!="function"||M===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),f=!1)}return Ru(i,s,c,f,v,g)}function Ru(i,s,c,f,g,v){rm(i,s);var x=(s.flags&128)!==0;if(!f&&!x)return g&&up(s,c,!1),Vi(i,s,v);f=s.stateNode,VS.current=s;var M=x&&typeof c.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&x?(s.child=Ms(s,i.child,null,v),s.child=Ms(s,null,M,v)):vn(i,s,M,v),s.memoizedState=f.state,g&&up(s,c,!0),s.child}function om(i){var s=i.stateNode;s.pendingContext?lp(i,s.pendingContext,s.pendingContext!==s.context):s.context&&lp(i,s.context,!1),du(i,s.containerInfo)}function am(i,s,c,f,g){return Rs(),su(g),s.flags|=256,vn(i,s,c,f),s.child}var Mu={dehydrated:null,treeContext:null,retryLane:0};function Au(i){return{baseLanes:i,cachePool:null,transitions:null}}function lm(i,s,c){var f=s.pendingProps,g=St.current,v=!1,x=(s.flags&128)!==0,M;if((M=x)||(M=i!==null&&i.memoizedState===null?!1:(g&2)!==0),M?(v=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),ht(St,g&1),i===null)return ru(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=f.children,i=f.fallback,v?(f=s.mode,v=s.child,x={mode:"hidden",children:x},(f&1)===0&&v!==null?(v.childLanes=0,v.pendingProps=x):v=yl(x,f,0,null),i=Yr(i,f,c,null),v.return=s,i.return=s,v.sibling=i,s.child=v,s.child.memoizedState=Au(c),s.memoizedState=Mu,i):Ou(s,x));if(g=i.memoizedState,g!==null&&(M=g.dehydrated,M!==null))return GS(i,s,x,f,M,g,c);if(v){v=f.fallback,x=s.mode,g=i.child,M=g.sibling;var B={mode:"hidden",children:f.children};return(x&1)===0&&s.child!==g?(f=s.child,f.childLanes=0,f.pendingProps=B,s.deletions=null):(f=yr(g,B),f.subtreeFlags=g.subtreeFlags&14680064),M!==null?v=yr(M,v):(v=Yr(v,x,c,null),v.flags|=2),v.return=s,f.return=s,f.sibling=v,s.child=f,f=v,v=s.child,x=i.child.memoizedState,x=x===null?Au(c):{baseLanes:x.baseLanes|c,cachePool:null,transitions:x.transitions},v.memoizedState=x,v.childLanes=i.childLanes&~c,s.memoizedState=Mu,f}return v=i.child,i=v.sibling,f=yr(v,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=c),f.return=s,f.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=f,s.memoizedState=null,f}function Ou(i,s){return s=yl({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function ol(i,s,c,f){return f!==null&&su(f),Ms(s,i.child,null,c),i=Ou(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function GS(i,s,c,f,g,v,x){if(c)return s.flags&256?(s.flags&=-257,f=Cu(Error(n(422))),ol(i,s,x,f)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(v=f.fallback,g=s.mode,f=yl({mode:"visible",children:f.children},g,0,null),v=Yr(v,g,x,null),v.flags|=2,f.return=s,v.return=s,f.sibling=v,s.child=f,(s.mode&1)!==0&&Ms(s,i.child,null,x),s.child.memoizedState=Au(x),s.memoizedState=Mu,v);if((s.mode&1)===0)return ol(i,s,x,null);if(g.data==="$!"){if(f=g.nextSibling&&g.nextSibling.dataset,f)var M=f.dgst;return f=M,v=Error(n(419)),f=Cu(v,f,void 0),ol(i,s,x,f)}if(M=(x&i.childLanes)!==0,Tn||M){if(f=Yt,f!==null){switch(x&-x){case 4:g=2;break;case 16:g=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:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(f.suspendedLanes|x))!==0?0:g,g!==0&&g!==v.retryLane&&(v.retryLane=g,Ki(i,g),mi(f,i,g,-1))}return Gu(),f=Cu(Error(n(421))),ol(i,s,x,f)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=aw.bind(null,i),g._reactRetry=s,null):(i=v.treeContext,zn=lr(g.nextSibling),Fn=s,_t=!0,hi=null,i!==null&&(Yn[Xn++]=$i,Yn[Xn++]=Wi,Yn[Xn++]=Ur,$i=i.id,Wi=i.overflow,Ur=s),s=Ou(s,f.children),s.flags|=4096,s)}function cm(i,s,c){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),cu(i.return,s,c)}function Lu(i,s,c,f,g){var v=i.memoizedState;v===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:c,tailMode:g}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=f,v.tail=c,v.tailMode=g)}function um(i,s,c){var f=s.pendingProps,g=f.revealOrder,v=f.tail;if(vn(i,s,f.children,c),f=St.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&cm(i,c,s);else if(i.tag===19)cm(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}if(ht(St,f),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(c=s.child,g=null;c!==null;)i=c.alternate,i!==null&&Ja(i)===null&&(g=c),c=c.sibling;c=g,c===null?(g=s.child,s.child=null):(g=c.sibling,c.sibling=null),Lu(s,!1,g,c,v);break;case"backwards":for(c=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&Ja(i)===null){s.child=g;break}i=g.sibling,g.sibling=c,c=g,g=i}Lu(s,!0,c,null,v);break;case"together":Lu(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function al(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Vi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Kr|=s.lanes,(c&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,c=yr(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=yr(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function YS(i,s,c){switch(s.tag){case 3:om(s),Rs();break;case 5:kp(s);break;case 1:Nn(s.type)&&$a(s);break;case 4:du(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,g=s.memoizedProps.value;ht(Ya,f._currentValue),f._currentValue=g;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(ht(St,St.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?lm(i,s,c):(ht(St,St.current&1),i=Vi(i,s,c),i!==null?i.sibling:null);ht(St,St.current&1);break;case 19:if(f=(c&s.childLanes)!==0,(i.flags&128)!==0){if(f)return um(i,s,c);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),ht(St,St.current),f)break;return null;case 22:case 23:return s.lanes=0,im(i,s,c)}return Vi(i,s,c)}var hm,Iu,dm,fm;hm=function(i,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Iu=function(){},dm=function(i,s,c,f){var g=i.memoizedProps;if(g!==f){i=s.stateNode,$r(ki.current);var v=null;switch(c){case"input":g=Dn(i,g),f=Dn(i,f),v=[];break;case"select":g=C({},g,{value:void 0}),f=C({},f,{value:void 0}),v=[];break;case"textarea":g=Rr(i,g),f=Rr(i,f),v=[];break;default:typeof g.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=Ua)}Ut(c,f);var x;c=null;for(V in g)if(!f.hasOwnProperty(V)&&g.hasOwnProperty(V)&&g[V]!=null)if(V==="style"){var M=g[V];for(x in M)M.hasOwnProperty(x)&&(c||(c={}),c[x]="")}else V!=="dangerouslySetInnerHTML"&&V!=="children"&&V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&V!=="autoFocus"&&(o.hasOwnProperty(V)?v||(v=[]):(v=v||[]).push(V,null));for(V in f){var B=f[V];if(M=g!=null?g[V]:void 0,f.hasOwnProperty(V)&&B!==M&&(B!=null||M!=null))if(V==="style")if(M){for(x in M)!M.hasOwnProperty(x)||B&&B.hasOwnProperty(x)||(c||(c={}),c[x]="");for(x in B)B.hasOwnProperty(x)&&M[x]!==B[x]&&(c||(c={}),c[x]=B[x])}else c||(v||(v=[]),v.push(V,c)),c=B;else V==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,M=M?M.__html:void 0,B!=null&&M!==B&&(v=v||[]).push(V,B)):V==="children"?typeof B!="string"&&typeof B!="number"||(v=v||[]).push(V,""+B):V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&(o.hasOwnProperty(V)?(B!=null&&V==="onScroll"&&ft("scroll",i),v||M===B||(v=[])):(v=v||[]).push(V,B))}c&&(v=v||[]).push("style",c);var V=v;(s.updateQueue=V)&&(s.flags|=4)}},fm=function(i,s,c,f){c!==f&&(s.flags|=4)};function To(i,s){if(!_t)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function hn(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,f=0;if(s)for(var g=i.child;g!==null;)c|=g.lanes|g.childLanes,f|=g.subtreeFlags&14680064,f|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)c|=g.lanes|g.childLanes,f|=g.subtreeFlags,f|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=f,i.childLanes=c,s}function XS(i,s,c){var f=s.pendingProps;switch(nu(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(s),null;case 1:return Nn(s.type)&&Ha(),hn(s),null;case 3:return f=s.stateNode,Ls(),pt(Cn),pt(cn),mu(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(Va(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,hi!==null&&(Ku(hi),hi=null))),Iu(i,s),hn(s),null;case 5:fu(s);var g=$r(xo.current);if(c=s.type,i!==null&&s.stateNode!=null)dm(i,s,c,f,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return hn(s),null}if(i=$r(ki.current),Va(s)){f=s.stateNode,c=s.type;var v=s.memoizedProps;switch(f[xi]=s,f[vo]=v,i=(s.mode&1)!==0,c){case"dialog":ft("cancel",f),ft("close",f);break;case"iframe":case"object":case"embed":ft("load",f);break;case"video":case"audio":for(g=0;g<mo.length;g++)ft(mo[g],f);break;case"source":ft("error",f);break;case"img":case"image":case"link":ft("error",f),ft("load",f);break;case"details":ft("toggle",f);break;case"input":Pi(f,v),ft("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!v.multiple},ft("invalid",f);break;case"textarea":Mr(f,v),ft("invalid",f)}Ut(c,v),g=null;for(var x in v)if(v.hasOwnProperty(x)){var M=v[x];x==="children"?typeof M=="string"?f.textContent!==M&&(v.suppressHydrationWarning!==!0&&za(f.textContent,M,i),g=["children",M]):typeof M=="number"&&f.textContent!==""+M&&(v.suppressHydrationWarning!==!0&&za(f.textContent,M,i),g=["children",""+M]):o.hasOwnProperty(x)&&M!=null&&x==="onScroll"&&ft("scroll",f)}switch(c){case"input":Ft(f),Kn(f,v,!0);break;case"textarea":Ft(f),Ar(f);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(f.onclick=Ua)}f=g,s.updateQueue=f,f!==null&&(s.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=J(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=x.createElement(c,{is:f.is}):(i=x.createElement(c),c==="select"&&(x=i,f.multiple?x.multiple=!0:f.size&&(x.size=f.size))):i=x.createElementNS(i,c),i[xi]=s,i[vo]=f,hm(i,s,!1,!1),s.stateNode=i;e:{switch(x=Vn(c,f),c){case"dialog":ft("cancel",i),ft("close",i),g=f;break;case"iframe":case"object":case"embed":ft("load",i),g=f;break;case"video":case"audio":for(g=0;g<mo.length;g++)ft(mo[g],i);g=f;break;case"source":ft("error",i),g=f;break;case"img":case"image":case"link":ft("error",i),ft("load",i),g=f;break;case"details":ft("toggle",i),g=f;break;case"input":Pi(i,f),g=Dn(i,f),ft("invalid",i);break;case"option":g=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},g=C({},f,{value:void 0}),ft("invalid",i);break;case"textarea":Mr(i,f),g=Rr(i,f),ft("invalid",i);break;default:g=f}Ut(c,g),M=g;for(v in M)if(M.hasOwnProperty(v)){var B=M[v];v==="style"?li(i,B):v==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,B!=null&&$e(i,B)):v==="children"?typeof B=="string"?(c!=="textarea"||B!=="")&&Xe(i,B):typeof B=="number"&&Xe(i,""+B):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(o.hasOwnProperty(v)?B!=null&&v==="onScroll"&&ft("scroll",i):B!=null&&N(i,v,B,x))}switch(c){case"input":Ft(i),Kn(i,f,!1);break;case"textarea":Ft(i),Ar(i);break;case"option":f.value!=null&&i.setAttribute("value",""+Ie(f.value));break;case"select":i.multiple=!!f.multiple,v=f.value,v!=null?yi(i,!!f.multiple,v,!1):f.defaultValue!=null&&yi(i,!!f.multiple,f.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=Ua)}switch(c){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return hn(s),null;case 6:if(i&&s.stateNode!=null)fm(i,s,i.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(c=$r(xo.current),$r(ki.current),Va(s)){if(f=s.stateNode,c=s.memoizedProps,f[xi]=s,(v=f.nodeValue!==c)&&(i=Fn,i!==null))switch(i.tag){case 3:za(f.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&za(f.nodeValue,c,(i.mode&1)!==0)}v&&(s.flags|=4)}else f=(c.nodeType===9?c:c.ownerDocument).createTextNode(f),f[xi]=s,s.stateNode=f}return hn(s),null;case 13:if(pt(St),f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(_t&&zn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)gp(),Rs(),s.flags|=98560,v=!1;else if(v=Va(s),f!==null&&f.dehydrated!==null){if(i===null){if(!v)throw Error(n(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(n(317));v[xi]=s}else Rs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;hn(s),v=!1}else hi!==null&&(Ku(hi),hi=null),v=!0;if(!v)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(f=f!==null,f!==(i!==null&&i.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(St.current&1)!==0?Ht===0&&(Ht=3):Gu())),s.updateQueue!==null&&(s.flags|=4),hn(s),null);case 4:return Ls(),Iu(i,s),i===null&&go(s.stateNode.containerInfo),hn(s),null;case 10:return lu(s.type._context),hn(s),null;case 17:return Nn(s.type)&&Ha(),hn(s),null;case 19:if(pt(St),v=s.memoizedState,v===null)return hn(s),null;if(f=(s.flags&128)!==0,x=v.rendering,x===null)if(f)To(v,!1);else{if(Ht!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=Ja(i),x!==null){for(s.flags|=128,To(v,!1),f=x.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=c,c=s.child;c!==null;)v=c,i=f,v.flags&=14680066,x=v.alternate,x===null?(v.childLanes=0,v.lanes=i,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=x.childLanes,v.lanes=x.lanes,v.child=x.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=x.memoizedProps,v.memoizedState=x.memoizedState,v.updateQueue=x.updateQueue,v.type=x.type,i=x.dependencies,v.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return ht(St,St.current&1|2),s.child}i=i.sibling}v.tail!==null&&yt()>Bs&&(s.flags|=128,f=!0,To(v,!1),s.lanes=4194304)}else{if(!f)if(i=Ja(x),i!==null){if(s.flags|=128,f=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),To(v,!0),v.tail===null&&v.tailMode==="hidden"&&!x.alternate&&!_t)return hn(s),null}else 2*yt()-v.renderingStartTime>Bs&&c!==1073741824&&(s.flags|=128,f=!0,To(v,!1),s.lanes=4194304);v.isBackwards?(x.sibling=s.child,s.child=x):(c=v.last,c!==null?c.sibling=x:s.child=x,v.last=x)}return v.tail!==null?(s=v.tail,v.rendering=s,v.tail=s.sibling,v.renderingStartTime=yt(),s.sibling=null,c=St.current,ht(St,f?c&1|2:c&1),s):(hn(s),null);case 22:case 23:return Vu(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(Un&1073741824)!==0&&(hn(s),s.subtreeFlags&6&&(s.flags|=8192)):hn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function ZS(i,s){switch(nu(s),s.tag){case 1:return Nn(s.type)&&Ha(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Ls(),pt(Cn),pt(cn),mu(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return fu(s),null;case 13:if(pt(St),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Rs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return pt(St),null;case 4:return Ls(),null;case 10:return lu(s.type._context),null;case 22:case 23:return Vu(),null;case 24:return null;default:return null}}var ll=!1,dn=!1,QS=typeof WeakSet=="function"?WeakSet:Set,we=null;function Ds(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(f){Ct(i,s,f)}else c.current=null}function Du(i,s,c){try{c()}catch(f){Ct(i,s,f)}}var pm=!1;function JS(i,s){if(Vc=Ta,i=qf(),zc(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var g=f.anchorOffset,v=f.focusNode;f=f.focusOffset;try{c.nodeType,v.nodeType}catch{c=null;break e}var x=0,M=-1,B=-1,V=0,oe=0,ae=i,se=null;t:for(;;){for(var ge;ae!==c||g!==0&&ae.nodeType!==3||(M=x+g),ae!==v||f!==0&&ae.nodeType!==3||(B=x+f),ae.nodeType===3&&(x+=ae.nodeValue.length),(ge=ae.firstChild)!==null;)se=ae,ae=ge;for(;;){if(ae===i)break t;if(se===c&&++V===g&&(M=x),se===v&&++oe===f&&(B=x),(ge=ae.nextSibling)!==null)break;ae=se,se=ae.parentNode}ae=ge}c=M===-1||B===-1?null:{start:M,end:B}}else c=null}c=c||{start:0,end:0}}else c=null;for(Gc={focusedElem:i,selectionRange:c},Ta=!1,we=s;we!==null;)if(s=we,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,we=i;else for(;we!==null;){s=we;try{var xe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var ke=xe.memoizedProps,At=xe.memoizedState,H=s.stateNode,U=H.getSnapshotBeforeUpdate(s.elementType===s.type?ke:di(s.type,ke),At);H.__reactInternalSnapshotBeforeUpdate=U}break;case 3:var q=s.stateNode.containerInfo;q.nodeType===1?q.textContent="":q.nodeType===9&&q.documentElement&&q.removeChild(q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ue){Ct(s,s.return,ue)}if(i=s.sibling,i!==null){i.return=s.return,we=i;break}we=s.return}return xe=pm,pm=!1,xe}function Ro(i,s,c){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&i)===i){var v=g.destroy;g.destroy=void 0,v!==void 0&&Du(s,c,v)}g=g.next}while(g!==f)}}function cl(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var f=c.create;c.destroy=f()}c=c.next}while(c!==s)}}function Pu(i){var s=i.ref;if(s!==null){var c=i.stateNode;switch(i.tag){case 5:i=c;break;default:i=c}typeof s=="function"?s(i):s.current=i}}function mm(i){var s=i.alternate;s!==null&&(i.alternate=null,mm(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[xi],delete s[vo],delete s[Qc],delete s[DS],delete s[PS])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function gm(i){return i.tag===5||i.tag===3||i.tag===4}function _m(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||gm(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Bu(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=Ua));else if(f!==4&&(i=i.child,i!==null))for(Bu(i,s,c),i=i.sibling;i!==null;)Bu(i,s,c),i=i.sibling}function Fu(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(Fu(i,s,c),i=i.sibling;i!==null;)Fu(i,s,c),i=i.sibling}var sn=null,fi=!1;function pr(i,s,c){for(c=c.child;c!==null;)vm(i,s,c),c=c.sibling}function vm(i,s,c){if(Ge&&typeof Ge.onCommitFiberUnmount=="function")try{Ge.onCommitFiberUnmount(We,c)}catch{}switch(c.tag){case 5:dn||Ds(c,s);case 6:var f=sn,g=fi;sn=null,pr(i,s,c),sn=f,fi=g,sn!==null&&(fi?(i=sn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):sn.removeChild(c.stateNode));break;case 18:sn!==null&&(fi?(i=sn,c=c.stateNode,i.nodeType===8?Zc(i.parentNode,c):i.nodeType===1&&Zc(i,c),oo(i)):Zc(sn,c.stateNode));break;case 4:f=sn,g=fi,sn=c.stateNode.containerInfo,fi=!0,pr(i,s,c),sn=f,fi=g;break;case 0:case 11:case 14:case 15:if(!dn&&(f=c.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){g=f=f.next;do{var v=g,x=v.destroy;v=v.tag,x!==void 0&&((v&2)!==0||(v&4)!==0)&&Du(c,s,x),g=g.next}while(g!==f)}pr(i,s,c);break;case 1:if(!dn&&(Ds(c,s),f=c.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=c.memoizedProps,f.state=c.memoizedState,f.componentWillUnmount()}catch(M){Ct(c,s,M)}pr(i,s,c);break;case 21:pr(i,s,c);break;case 22:c.mode&1?(dn=(f=dn)||c.memoizedState!==null,pr(i,s,c),dn=f):pr(i,s,c);break;default:pr(i,s,c)}}function ym(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new QS),s.forEach(function(f){var g=lw.bind(null,i,f);c.has(f)||(c.add(f),f.then(g,g))})}}function pi(i,s){var c=s.deletions;if(c!==null)for(var f=0;f<c.length;f++){var g=c[f];try{var v=i,x=s,M=x;e:for(;M!==null;){switch(M.tag){case 5:sn=M.stateNode,fi=!1;break e;case 3:sn=M.stateNode.containerInfo,fi=!0;break e;case 4:sn=M.stateNode.containerInfo,fi=!0;break e}M=M.return}if(sn===null)throw Error(n(160));vm(v,x,g),sn=null,fi=!1;var B=g.alternate;B!==null&&(B.return=null),g.return=null}catch(V){Ct(g,s,V)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)bm(s,i),s=s.sibling}function bm(i,s){var c=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(pi(s,i),Ci(i),f&4){try{Ro(3,i,i.return),cl(3,i)}catch(ke){Ct(i,i.return,ke)}try{Ro(5,i,i.return)}catch(ke){Ct(i,i.return,ke)}}break;case 1:pi(s,i),Ci(i),f&512&&c!==null&&Ds(c,c.return);break;case 5:if(pi(s,i),Ci(i),f&512&&c!==null&&Ds(c,c.return),i.flags&32){var g=i.stateNode;try{Xe(g,"")}catch(ke){Ct(i,i.return,ke)}}if(f&4&&(g=i.stateNode,g!=null)){var v=i.memoizedProps,x=c!==null?c.memoizedProps:v,M=i.type,B=i.updateQueue;if(i.updateQueue=null,B!==null)try{M==="input"&&v.type==="radio"&&v.name!=null&&Qe(g,v),Vn(M,x);var V=Vn(M,v);for(x=0;x<B.length;x+=2){var oe=B[x],ae=B[x+1];oe==="style"?li(g,ae):oe==="dangerouslySetInnerHTML"?$e(g,ae):oe==="children"?Xe(g,ae):N(g,oe,ae,V)}switch(M){case"input":Pn(g,v);break;case"textarea":qn(g,v);break;case"select":var se=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!v.multiple;var ge=v.value;ge!=null?yi(g,!!v.multiple,ge,!1):se!==!!v.multiple&&(v.defaultValue!=null?yi(g,!!v.multiple,v.defaultValue,!0):yi(g,!!v.multiple,v.multiple?[]:"",!1))}g[vo]=v}catch(ke){Ct(i,i.return,ke)}}break;case 6:if(pi(s,i),Ci(i),f&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,v=i.memoizedProps;try{g.nodeValue=v}catch(ke){Ct(i,i.return,ke)}}break;case 3:if(pi(s,i),Ci(i),f&4&&c!==null&&c.memoizedState.isDehydrated)try{oo(s.containerInfo)}catch(ke){Ct(i,i.return,ke)}break;case 4:pi(s,i),Ci(i);break;case 13:pi(s,i),Ci(i),g=i.child,g.flags&8192&&(v=g.memoizedState!==null,g.stateNode.isHidden=v,!v||g.alternate!==null&&g.alternate.memoizedState!==null||(ju=yt())),f&4&&ym(i);break;case 22:if(oe=c!==null&&c.memoizedState!==null,i.mode&1?(dn=(V=dn)||oe,pi(s,i),dn=V):pi(s,i),Ci(i),f&8192){if(V=i.memoizedState!==null,(i.stateNode.isHidden=V)&&!oe&&(i.mode&1)!==0)for(we=i,oe=i.child;oe!==null;){for(ae=we=oe;we!==null;){switch(se=we,ge=se.child,se.tag){case 0:case 11:case 14:case 15:Ro(4,se,se.return);break;case 1:Ds(se,se.return);var xe=se.stateNode;if(typeof xe.componentWillUnmount=="function"){f=se,c=se.return;try{s=f,xe.props=s.memoizedProps,xe.state=s.memoizedState,xe.componentWillUnmount()}catch(ke){Ct(f,c,ke)}}break;case 5:Ds(se,se.return);break;case 22:if(se.memoizedState!==null){xm(ae);continue}}ge!==null?(ge.return=se,we=ge):xm(ae)}oe=oe.sibling}e:for(oe=null,ae=i;;){if(ae.tag===5){if(oe===null){oe=ae;try{g=ae.stateNode,V?(v=g.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(M=ae.stateNode,B=ae.memoizedProps.style,x=B!=null&&B.hasOwnProperty("display")?B.display:null,M.style.display=En("display",x))}catch(ke){Ct(i,i.return,ke)}}}else if(ae.tag===6){if(oe===null)try{ae.stateNode.nodeValue=V?"":ae.memoizedProps}catch(ke){Ct(i,i.return,ke)}}else if((ae.tag!==22&&ae.tag!==23||ae.memoizedState===null||ae===i)&&ae.child!==null){ae.child.return=ae,ae=ae.child;continue}if(ae===i)break e;for(;ae.sibling===null;){if(ae.return===null||ae.return===i)break e;oe===ae&&(oe=null),ae=ae.return}oe===ae&&(oe=null),ae.sibling.return=ae.return,ae=ae.sibling}}break;case 19:pi(s,i),Ci(i),f&4&&ym(i);break;case 21:break;default:pi(s,i),Ci(i)}}function Ci(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(gm(c)){var f=c;break e}c=c.return}throw Error(n(160))}switch(f.tag){case 5:var g=f.stateNode;f.flags&32&&(Xe(g,""),f.flags&=-33);var v=_m(i);Fu(i,v,g);break;case 3:case 4:var x=f.stateNode.containerInfo,M=_m(i);Bu(i,M,x);break;default:throw Error(n(161))}}catch(B){Ct(i,i.return,B)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function ew(i,s,c){we=i,Sm(i)}function Sm(i,s,c){for(var f=(i.mode&1)!==0;we!==null;){var g=we,v=g.child;if(g.tag===22&&f){var x=g.memoizedState!==null||ll;if(!x){var M=g.alternate,B=M!==null&&M.memoizedState!==null||dn;M=ll;var V=dn;if(ll=x,(dn=B)&&!V)for(we=g;we!==null;)x=we,B=x.child,x.tag===22&&x.memoizedState!==null?km(g):B!==null?(B.return=x,we=B):km(g);for(;v!==null;)we=v,Sm(v),v=v.sibling;we=g,ll=M,dn=V}wm(i)}else(g.subtreeFlags&8772)!==0&&v!==null?(v.return=g,we=v):wm(i)}}function wm(i){for(;we!==null;){var s=we;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:dn||cl(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!dn)if(c===null)f.componentDidMount();else{var g=s.elementType===s.type?c.memoizedProps:di(s.type,c.memoizedProps);f.componentDidUpdate(g,c.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var v=s.updateQueue;v!==null&&xp(s,v,f);break;case 3:var x=s.updateQueue;if(x!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}xp(s,x,c)}break;case 5:var M=s.stateNode;if(c===null&&s.flags&4){c=M;var B=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":B.autoFocus&&c.focus();break;case"img":B.src&&(c.src=B.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var V=s.alternate;if(V!==null){var oe=V.memoizedState;if(oe!==null){var ae=oe.dehydrated;ae!==null&&oo(ae)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}dn||s.flags&512&&Pu(s)}catch(se){Ct(s,s.return,se)}}if(s===i){we=null;break}if(c=s.sibling,c!==null){c.return=s.return,we=c;break}we=s.return}}function xm(i){for(;we!==null;){var s=we;if(s===i){we=null;break}var c=s.sibling;if(c!==null){c.return=s.return,we=c;break}we=s.return}}function km(i){for(;we!==null;){var s=we;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{cl(4,s)}catch(B){Ct(s,c,B)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var g=s.return;try{f.componentDidMount()}catch(B){Ct(s,g,B)}}var v=s.return;try{Pu(s)}catch(B){Ct(s,v,B)}break;case 5:var x=s.return;try{Pu(s)}catch(B){Ct(s,x,B)}}}catch(B){Ct(s,s.return,B)}if(s===i){we=null;break}var M=s.sibling;if(M!==null){M.return=s.return,we=M;break}we=s.return}}var tw=Math.ceil,ul=O.ReactCurrentDispatcher,zu=O.ReactCurrentOwner,Jn=O.ReactCurrentBatchConfig,tt=0,Yt=null,It=null,on=0,Un=0,Ps=cr(0),Ht=0,Mo=null,Kr=0,hl=0,Uu=0,Ao=null,Rn=null,ju=0,Bs=1/0,Gi=null,dl=!1,Hu=null,mr=null,fl=!1,gr=null,pl=0,Oo=0,$u=null,ml=-1,gl=0;function yn(){return(tt&6)!==0?yt():ml!==-1?ml:ml=yt()}function _r(i){return(i.mode&1)===0?1:(tt&2)!==0&&on!==0?on&-on:FS.transition!==null?(gl===0&&(gl=Ea()),gl):(i=et,i!==0||(i=window.event,i=i===void 0?16:Cf(i.type)),i)}function mi(i,s,c,f){if(50<Oo)throw Oo=0,$u=null,Error(n(185));rr(i,c,f),((tt&2)===0||i!==Yt)&&(i===Yt&&((tt&2)===0&&(hl|=c),Ht===4&&vr(i,on)),Mn(i,f),c===1&&tt===0&&(s.mode&1)===0&&(Bs=yt()+500,Wa&&hr()))}function Mn(i,s){var c=i.callbackNode;Cc(i,s);var f=Dr(i,i===Yt?on:0);if(f===0)c!==null&&ci(c),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(c!=null&&ci(c),s===1)i.tag===0?BS(Cm.bind(null,i)):hp(Cm.bind(null,i)),LS(function(){(tt&6)===0&&hr()}),c=null;else{switch(Fe(f)){case 1:c=eo;break;case 4:c=Lr;break;case 16:c=ms;break;case 536870912:c=Ce;break;default:c=ms}c=Im(c,Em.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function Em(i,s){if(ml=-1,gl=0,(tt&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Fs()&&i.callbackNode!==c)return null;var f=Dr(i,i===Yt?on:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||s)s=_l(i,f);else{s=f;var g=tt;tt|=2;var v=Tm();(Yt!==i||on!==s)&&(Gi=null,Bs=yt()+500,Vr(i,s));do try{rw();break}catch(M){Nm(i,M)}while(!0);au(),ul.current=v,tt=g,It!==null?s=0:(Yt=null,on=0,s=Ht)}if(s!==0){if(s===2&&(g=to(i),g!==0&&(f=g,s=Wu(i,g))),s===1)throw c=Mo,Vr(i,0),vr(i,f),Mn(i,yt()),c;if(s===6)vr(i,f);else{if(g=i.current.alternate,(f&30)===0&&!nw(g)&&(s=_l(i,f),s===2&&(v=to(i),v!==0&&(f=v,s=Wu(i,v))),s===1))throw c=Mo,Vr(i,0),vr(i,f),Mn(i,yt()),c;switch(i.finishedWork=g,i.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:Gr(i,Rn,Gi);break;case 3:if(vr(i,f),(f&130023424)===f&&(s=ju+500-yt(),10<s)){if(Dr(i,0)!==0)break;if(g=i.suspendedLanes,(g&f)!==f){yn(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=Xc(Gr.bind(null,i,Rn,Gi),s);break}Gr(i,Rn,Gi);break;case 4:if(vr(i,f),(f&4194240)===f)break;for(s=i.eventTimes,g=-1;0<f;){var x=31-bt(f);v=1<<x,x=s[x],x>g&&(g=x),f&=~v}if(f=g,f=yt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*tw(f/1960))-f,10<f){i.timeoutHandle=Xc(Gr.bind(null,i,Rn,Gi),f);break}Gr(i,Rn,Gi);break;case 5:Gr(i,Rn,Gi);break;default:throw Error(n(329))}}}return Mn(i,yt()),i.callbackNode===c?Em.bind(null,i):null}function Wu(i,s){var c=Ao;return i.current.memoizedState.isDehydrated&&(Vr(i,s).flags|=256),i=_l(i,s),i!==2&&(s=Rn,Rn=c,s!==null&&Ku(s)),i}function Ku(i){Rn===null?Rn=i:Rn.push.apply(Rn,i)}function nw(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var f=0;f<c.length;f++){var g=c[f],v=g.getSnapshot;g=g.value;try{if(!ui(v(),g))return!1}catch{return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function vr(i,s){for(s&=~Uu,s&=~hl,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-bt(s),f=1<<c;i[c]=-1,s&=~f}}function Cm(i){if((tt&6)!==0)throw Error(n(327));Fs();var s=Dr(i,0);if((s&1)===0)return Mn(i,yt()),null;var c=_l(i,s);if(i.tag!==0&&c===2){var f=to(i);f!==0&&(s=f,c=Wu(i,f))}if(c===1)throw c=Mo,Vr(i,0),vr(i,s),Mn(i,yt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Gr(i,Rn,Gi),Mn(i,yt()),null}function qu(i,s){var c=tt;tt|=1;try{return i(s)}finally{tt=c,tt===0&&(Bs=yt()+500,Wa&&hr())}}function qr(i){gr!==null&&gr.tag===0&&(tt&6)===0&&Fs();var s=tt;tt|=1;var c=Jn.transition,f=et;try{if(Jn.transition=null,et=1,i)return i()}finally{et=f,Jn.transition=c,tt=s,(tt&6)===0&&hr()}}function Vu(){Un=Ps.current,pt(Ps)}function Vr(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,OS(c)),It!==null)for(c=It.return;c!==null;){var f=c;switch(nu(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&Ha();break;case 3:Ls(),pt(Cn),pt(cn),mu();break;case 5:fu(f);break;case 4:Ls();break;case 13:pt(St);break;case 19:pt(St);break;case 10:lu(f.type._context);break;case 22:case 23:Vu()}c=c.return}if(Yt=i,It=i=yr(i.current,null),on=Un=s,Ht=0,Mo=null,Uu=hl=Kr=0,Rn=Ao=null,Hr!==null){for(s=0;s<Hr.length;s++)if(c=Hr[s],f=c.interleaved,f!==null){c.interleaved=null;var g=f.next,v=c.pending;if(v!==null){var x=v.next;v.next=g,f.next=x}c.pending=f}Hr=null}return i}function Nm(i,s){do{var c=It;try{if(au(),el.current=rl,tl){for(var f=wt.memoizedState;f!==null;){var g=f.queue;g!==null&&(g.pending=null),f=f.next}tl=!1}if(Wr=0,Gt=jt=wt=null,ko=!1,Eo=0,zu.current=null,c===null||c.return===null){Ht=1,Mo=s,It=null;break}e:{var v=i,x=c.return,M=c,B=s;if(s=on,M.flags|=32768,B!==null&&typeof B=="object"&&typeof B.then=="function"){var V=B,oe=M,ae=oe.tag;if((oe.mode&1)===0&&(ae===0||ae===11||ae===15)){var se=oe.alternate;se?(oe.updateQueue=se.updateQueue,oe.memoizedState=se.memoizedState,oe.lanes=se.lanes):(oe.updateQueue=null,oe.memoizedState=null)}var ge=Qp(x);if(ge!==null){ge.flags&=-257,Jp(ge,x,M,v,s),ge.mode&1&&Zp(v,V,s),s=ge,B=V;var xe=s.updateQueue;if(xe===null){var ke=new Set;ke.add(B),s.updateQueue=ke}else xe.add(B);break e}else{if((s&1)===0){Zp(v,V,s),Gu();break e}B=Error(n(426))}}else if(_t&&M.mode&1){var At=Qp(x);if(At!==null){(At.flags&65536)===0&&(At.flags|=256),Jp(At,x,M,v,s),su(Is(B,M));break e}}v=B=Is(B,M),Ht!==4&&(Ht=2),Ao===null?Ao=[v]:Ao.push(v),v=x;do{switch(v.tag){case 3:v.flags|=65536,s&=-s,v.lanes|=s;var H=Yp(v,B,s);wp(v,H);break e;case 1:M=B;var U=v.type,q=v.stateNode;if((v.flags&128)===0&&(typeof U.getDerivedStateFromError=="function"||q!==null&&typeof q.componentDidCatch=="function"&&(mr===null||!mr.has(q)))){v.flags|=65536,s&=-s,v.lanes|=s;var ue=Xp(v,M,s);wp(v,ue);break e}}v=v.return}while(v!==null)}Mm(c)}catch(Ee){s=Ee,It===c&&c!==null&&(It=c=c.return);continue}break}while(!0)}function Tm(){var i=ul.current;return ul.current=rl,i===null?rl:i}function Gu(){(Ht===0||Ht===3||Ht===2)&&(Ht=4),Yt===null||(Kr&268435455)===0&&(hl&268435455)===0||vr(Yt,on)}function _l(i,s){var c=tt;tt|=2;var f=Tm();(Yt!==i||on!==s)&&(Gi=null,Vr(i,s));do try{iw();break}catch(g){Nm(i,g)}while(!0);if(au(),tt=c,ul.current=f,It!==null)throw Error(n(261));return Yt=null,on=0,Ht}function iw(){for(;It!==null;)Rm(It)}function rw(){for(;It!==null&&!xa();)Rm(It)}function Rm(i){var s=Lm(i.alternate,i,Un);i.memoizedProps=i.pendingProps,s===null?Mm(i):It=s,zu.current=null}function Mm(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=XS(c,s,Un),c!==null){It=c;return}}else{if(c=ZS(c,s),c!==null){c.flags&=32767,It=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Ht=6,It=null;return}}if(s=s.sibling,s!==null){It=s;return}It=s=i}while(s!==null);Ht===0&&(Ht=5)}function Gr(i,s,c){var f=et,g=Jn.transition;try{Jn.transition=null,et=1,sw(i,s,c,f)}finally{Jn.transition=g,et=f}return null}function sw(i,s,c,f){do Fs();while(gr!==null);if((tt&6)!==0)throw Error(n(327));c=i.finishedWork;var g=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var v=c.lanes|c.childLanes;if(Gn(i,v),i===Yt&&(It=Yt=null,on=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||fl||(fl=!0,Im(ms,function(){return Fs(),null})),v=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||v){v=Jn.transition,Jn.transition=null;var x=et;et=1;var M=tt;tt|=4,zu.current=null,JS(i,c),bm(c,i),ES(Gc),Ta=!!Vc,Gc=Vc=null,i.current=c,ew(c),ka(),tt=M,et=x,Jn.transition=v}else i.current=c;if(fl&&(fl=!1,gr=i,pl=g),v=i.pendingLanes,v===0&&(mr=null),Rt(c.stateNode),Mn(i,yt()),s!==null)for(f=i.onRecoverableError,c=0;c<s.length;c++)g=s[c],f(g.value,{componentStack:g.stack,digest:g.digest});if(dl)throw dl=!1,i=Hu,Hu=null,i;return(pl&1)!==0&&i.tag!==0&&Fs(),v=i.pendingLanes,(v&1)!==0?i===$u?Oo++:(Oo=0,$u=i):Oo=0,hr(),null}function Fs(){if(gr!==null){var i=Fe(pl),s=Jn.transition,c=et;try{if(Jn.transition=null,et=16>i?16:i,gr===null)var f=!1;else{if(i=gr,gr=null,pl=0,(tt&6)!==0)throw Error(n(331));var g=tt;for(tt|=4,we=i.current;we!==null;){var v=we,x=v.child;if((we.flags&16)!==0){var M=v.deletions;if(M!==null){for(var B=0;B<M.length;B++){var V=M[B];for(we=V;we!==null;){var oe=we;switch(oe.tag){case 0:case 11:case 15:Ro(8,oe,v)}var ae=oe.child;if(ae!==null)ae.return=oe,we=ae;else for(;we!==null;){oe=we;var se=oe.sibling,ge=oe.return;if(mm(oe),oe===V){we=null;break}if(se!==null){se.return=ge,we=se;break}we=ge}}}var xe=v.alternate;if(xe!==null){var ke=xe.child;if(ke!==null){xe.child=null;do{var At=ke.sibling;ke.sibling=null,ke=At}while(ke!==null)}}we=v}}if((v.subtreeFlags&2064)!==0&&x!==null)x.return=v,we=x;else e:for(;we!==null;){if(v=we,(v.flags&2048)!==0)switch(v.tag){case 0:case 11:case 15:Ro(9,v,v.return)}var H=v.sibling;if(H!==null){H.return=v.return,we=H;break e}we=v.return}}var U=i.current;for(we=U;we!==null;){x=we;var q=x.child;if((x.subtreeFlags&2064)!==0&&q!==null)q.return=x,we=q;else e:for(x=U;we!==null;){if(M=we,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:cl(9,M)}}catch(Ee){Ct(M,M.return,Ee)}if(M===x){we=null;break e}var ue=M.sibling;if(ue!==null){ue.return=M.return,we=ue;break e}we=M.return}}if(tt=g,hr(),Ge&&typeof Ge.onPostCommitFiberRoot=="function")try{Ge.onPostCommitFiberRoot(We,i)}catch{}f=!0}return f}finally{et=c,Jn.transition=s}}return!1}function Am(i,s,c){s=Is(c,s),s=Yp(i,s,1),i=fr(i,s,1),s=yn(),i!==null&&(rr(i,1,s),Mn(i,s))}function Ct(i,s,c){if(i.tag===3)Am(i,i,c);else for(;s!==null;){if(s.tag===3){Am(s,i,c);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(mr===null||!mr.has(f))){i=Is(c,i),i=Xp(s,i,1),s=fr(s,i,1),i=yn(),s!==null&&(rr(s,1,i),Mn(s,i));break}}s=s.return}}function ow(i,s,c){var f=i.pingCache;f!==null&&f.delete(s),s=yn(),i.pingedLanes|=i.suspendedLanes&c,Yt===i&&(on&c)===c&&(Ht===4||Ht===3&&(on&130023424)===on&&500>yt()-ju?Vr(i,0):Uu|=c),Mn(i,s)}function Om(i,s){s===0&&((i.mode&1)===0?s=1:(s=Ir,Ir<<=1,(Ir&130023424)===0&&(Ir=4194304)));var c=yn();i=Ki(i,s),i!==null&&(rr(i,s,c),Mn(i,c))}function aw(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),Om(i,c)}function lw(i,s){var c=0;switch(i.tag){case 13:var f=i.stateNode,g=i.memoizedState;g!==null&&(c=g.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),Om(i,c)}var Lm;Lm=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Cn.current)Tn=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return Tn=!1,YS(i,s,c);Tn=(i.flags&131072)!==0}else Tn=!1,_t&&(s.flags&1048576)!==0&&dp(s,qa,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;al(i,s),i=s.pendingProps;var g=Cs(s,cn.current);Os(s,c),g=vu(null,s,f,i,g,c);var v=yu();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Nn(f)?(v=!0,$a(s)):v=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,hu(s),g.updater=sl,s.stateNode=g,g._reactInternals=s,Eu(s,f,i,c),s=Ru(null,s,f,!0,v,c)):(s.tag=0,_t&&v&&tu(s),vn(null,s,g,c),s=s.child),s;case 16:f=s.elementType;e:{switch(al(i,s),i=s.pendingProps,g=f._init,f=g(f._payload),s.type=f,g=s.tag=uw(f),i=di(f,i),g){case 0:s=Tu(null,s,f,i,c);break e;case 1:s=sm(null,s,f,i,c);break e;case 11:s=em(null,s,f,i,c);break e;case 14:s=tm(null,s,f,di(f.type,i),c);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),Tu(i,s,f,g,c);case 1:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),sm(i,s,f,g,c);case 3:e:{if(om(s),i===null)throw Error(n(387));f=s.pendingProps,v=s.memoizedState,g=v.element,Sp(i,s),Qa(s,f,null,c);var x=s.memoizedState;if(f=x.element,v.isDehydrated)if(v={element:f,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=v,s.memoizedState=v,s.flags&256){g=Is(Error(n(423)),s),s=am(i,s,f,c,g);break e}else if(f!==g){g=Is(Error(n(424)),s),s=am(i,s,f,c,g);break e}else for(zn=lr(s.stateNode.containerInfo.firstChild),Fn=s,_t=!0,hi=null,c=yp(s,null,f,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Rs(),f===g){s=Vi(i,s,c);break e}vn(i,s,f,c)}s=s.child}return s;case 5:return kp(s),i===null&&ru(s),f=s.type,g=s.pendingProps,v=i!==null?i.memoizedProps:null,x=g.children,Yc(f,g)?x=null:v!==null&&Yc(f,v)&&(s.flags|=32),rm(i,s),vn(i,s,x,c),s.child;case 6:return i===null&&ru(s),null;case 13:return lm(i,s,c);case 4:return du(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=Ms(s,null,f,c):vn(i,s,f,c),s.child;case 11:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),em(i,s,f,g,c);case 7:return vn(i,s,s.pendingProps,c),s.child;case 8:return vn(i,s,s.pendingProps.children,c),s.child;case 12:return vn(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(f=s.type._context,g=s.pendingProps,v=s.memoizedProps,x=g.value,ht(Ya,f._currentValue),f._currentValue=x,v!==null)if(ui(v.value,x)){if(v.children===g.children&&!Cn.current){s=Vi(i,s,c);break e}}else for(v=s.child,v!==null&&(v.return=s);v!==null;){var M=v.dependencies;if(M!==null){x=v.child;for(var B=M.firstContext;B!==null;){if(B.context===f){if(v.tag===1){B=qi(-1,c&-c),B.tag=2;var V=v.updateQueue;if(V!==null){V=V.shared;var oe=V.pending;oe===null?B.next=B:(B.next=oe.next,oe.next=B),V.pending=B}}v.lanes|=c,B=v.alternate,B!==null&&(B.lanes|=c),cu(v.return,c,s),M.lanes|=c;break}B=B.next}}else if(v.tag===10)x=v.type===s.type?null:v.child;else if(v.tag===18){if(x=v.return,x===null)throw Error(n(341));x.lanes|=c,M=x.alternate,M!==null&&(M.lanes|=c),cu(x,c,s),x=v.sibling}else x=v.child;if(x!==null)x.return=v;else for(x=v;x!==null;){if(x===s){x=null;break}if(v=x.sibling,v!==null){v.return=x.return,x=v;break}x=x.return}v=x}vn(i,s,g.children,c),s=s.child}return s;case 9:return g=s.type,f=s.pendingProps.children,Os(s,c),g=Zn(g),f=f(g),s.flags|=1,vn(i,s,f,c),s.child;case 14:return f=s.type,g=di(f,s.pendingProps),g=di(f.type,g),tm(i,s,f,g,c);case 15:return nm(i,s,s.type,s.pendingProps,c);case 17:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),al(i,s),s.tag=1,Nn(f)?(i=!0,$a(s)):i=!1,Os(s,c),Vp(s,f,g),Eu(s,f,g,c),Ru(null,s,f,!0,i,c);case 19:return um(i,s,c);case 22:return im(i,s,c)}throw Error(n(156,s.tag))};function Im(i,s){return wa(i,s)}function cw(i,s,c,f){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ei(i,s,c,f){return new cw(i,s,c,f)}function Yu(i){return i=i.prototype,!(!i||!i.isReactComponent)}function uw(i){if(typeof i=="function")return Yu(i)?1:0;if(i!=null){if(i=i.$$typeof,i===W)return 11;if(i===P)return 14}return 2}function yr(i,s){var c=i.alternate;return c===null?(c=ei(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function vl(i,s,c,f,g,v){var x=2;if(f=i,typeof i=="function")Yu(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case re:return Yr(c.children,g,v,s);case Z:x=8,g|=8;break;case F:return i=ei(12,c,s,g|2),i.elementType=F,i.lanes=v,i;case j:return i=ei(13,c,s,g),i.elementType=j,i.lanes=v,i;case $:return i=ei(19,c,s,g),i.elementType=$,i.lanes=v,i;case te:return yl(c,g,v,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case L:x=10;break e;case X:x=9;break e;case W:x=11;break e;case P:x=14;break e;case Y:x=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=ei(x,c,s,g),s.elementType=i,s.type=f,s.lanes=v,s}function Yr(i,s,c,f){return i=ei(7,i,f,s),i.lanes=c,i}function yl(i,s,c,f){return i=ei(22,i,f,s),i.elementType=te,i.lanes=c,i.stateNode={isHidden:!1},i}function Xu(i,s,c){return i=ei(6,i,null,s),i.lanes=c,i}function Zu(i,s,c){return s=ei(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function hw(i,s,c,f,g){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ir(0),this.expirationTimes=ir(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ir(0),this.identifierPrefix=f,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Qu(i,s,c,f,g,v,x,M,B){return i=new hw(i,s,c,M,B),s===1?(s=1,v===!0&&(s|=8)):s=0,v=ei(3,null,null,s),i.current=v,v.stateNode=i,v.memoizedState={element:f,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},hu(v),i}function dw(i,s,c){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:I,key:f==null?null:""+f,children:i,containerInfo:s,implementation:c}}function Dm(i){if(!i)return ur;i=i._reactInternals;e:{if(Ui(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Nn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(Nn(c))return cp(i,c,s)}return s}function Pm(i,s,c,f,g,v,x,M,B){return i=Qu(c,f,!0,i,g,v,x,M,B),i.context=Dm(null),c=i.current,f=yn(),g=_r(c),v=qi(f,g),v.callback=s??null,fr(c,v,g),i.current.lanes=g,rr(i,g,f),Mn(i,f),i}function bl(i,s,c,f){var g=s.current,v=yn(),x=_r(g);return c=Dm(c),s.context===null?s.context=c:s.pendingContext=c,s=qi(v,x),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=fr(g,s,x),i!==null&&(mi(i,g,x,v),Za(i,g,x)),x}function Sl(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function Bm(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function Ju(i,s){Bm(i,s),(i=i.alternate)&&Bm(i,s)}function fw(){return null}var Fm=typeof reportError=="function"?reportError:function(i){console.error(i)};function eh(i){this._internalRoot=i}wl.prototype.render=eh.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));bl(i,s,null,null)},wl.prototype.unmount=eh.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;qr(function(){bl(null,i,null,null)}),s[ji]=null}};function wl(i){this._internalRoot=i}wl.prototype.unstable_scheduleHydration=function(i){if(i){var s=Pr();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Vt.length&&s!==0&&s<Vt[c].priority;c++);Vt.splice(c,0,i),c===0&&kf(i)}};function th(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function xl(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function zm(){}function pw(i,s,c,f,g){if(g){if(typeof f=="function"){var v=f;f=function(){var V=Sl(x);v.call(V)}}var x=Pm(s,f,i,0,null,!1,!1,"",zm);return i._reactRootContainer=x,i[ji]=x.current,go(i.nodeType===8?i.parentNode:i),qr(),x}for(;g=i.lastChild;)i.removeChild(g);if(typeof f=="function"){var M=f;f=function(){var V=Sl(B);M.call(V)}}var B=Qu(i,0,!1,null,null,!1,!1,"",zm);return i._reactRootContainer=B,i[ji]=B.current,go(i.nodeType===8?i.parentNode:i),qr(function(){bl(s,B,c,f)}),B}function kl(i,s,c,f,g){var v=c._reactRootContainer;if(v){var x=v;if(typeof g=="function"){var M=g;g=function(){var B=Sl(x);M.call(B)}}bl(s,x,i,g)}else x=pw(c,s,i,g,f);return Sl(x)}io=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=nr(s.pendingLanes);c!==0&&(no(s,c|1),Mn(s,yt()),(tt&6)===0&&(Bs=yt()+500,hr()))}break;case 13:qr(function(){var f=Ki(i,1);if(f!==null){var g=yn();mi(f,i,1,g)}}),Ju(i,1)}},Mt=function(i){if(i.tag===13){var s=Ki(i,134217728);if(s!==null){var c=yn();mi(s,i,134217728,c)}Ju(i,134217728)}},rt=function(i){if(i.tag===13){var s=_r(i),c=Ki(i,s);if(c!==null){var f=yn();mi(c,i,s,f)}Ju(i,s)}},Pr=function(){return et},wi=function(i,s){var c=et;try{return et=i,s()}finally{et=c}},fs=function(i,s,c){switch(s){case"input":if(Pn(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var f=c[s];if(f!==i&&f.form===i.form){var g=ja(f);if(!g)throw Error(n(90));nn(f),Pn(f,g)}}}break;case"textarea":qn(i,c);break;case"select":s=c.value,s!=null&&yi(i,!!c.multiple,s,!1)}},pe=qu,De=qr;var mw={usingClientEntryPoint:!1,Events:[yo,ks,ja,D,ee,qu]},Lo={findFiberByHostInstance:Fr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},gw={bundleType:Lo.bundleType,version:Lo.version,rendererPackageName:Lo.rendererPackageName,rendererConfig:Lo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:O.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=ba(i),i===null?null:i.stateNode},findFiberByHostInstance:Lo.findFiberByHostInstance||fw,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 El=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!El.isDisabled&&El.supportsFiber)try{We=El.inject(gw),Ge=El}catch{}}return An.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mw,An.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!th(s))throw Error(n(200));return dw(i,s,null,c)},An.createRoot=function(i,s){if(!th(i))throw Error(n(299));var c=!1,f="",g=Fm;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Qu(i,1,!1,null,null,c,!1,f,g),i[ji]=s.current,go(i.nodeType===8?i.parentNode:i),new eh(s)},An.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=ba(s),i=i===null?null:i.stateNode,i},An.flushSync=function(i){return qr(i)},An.hydrate=function(i,s,c){if(!xl(s))throw Error(n(200));return kl(null,i,s,!0,c)},An.hydrateRoot=function(i,s,c){if(!th(i))throw Error(n(405));var f=c!=null&&c.hydratedSources||null,g=!1,v="",x=Fm;if(c!=null&&(c.unstable_strictMode===!0&&(g=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onRecoverableError!==void 0&&(x=c.onRecoverableError)),s=Pm(s,null,i,1,c??null,g,!1,v,x),i[ji]=s.current,go(i),f)for(i=0;i<f.length;i++)c=f[i],g=c._getVersion,g=g(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,g]:s.mutableSourceEagerHydrationData.push(c,g);return new wl(s)},An.render=function(i,s,c){if(!xl(s))throw Error(n(200));return kl(null,i,s,!1,c)},An.unmountComponentAtNode=function(i){if(!xl(i))throw Error(n(40));return i._reactRootContainer?(qr(function(){kl(null,null,i,!1,function(){i._reactRootContainer=null,i[ji]=null})}),!0):!1},An.unstable_batchedUpdates=qu,An.unstable_renderSubtreeIntoContainer=function(i,s,c,f){if(!xl(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return kl(i,s,c,!1,f)},An.version="18.3.1-next-f1338f8080-20240426",An}var Vm;function kw(){if(Vm)return rh.exports;Vm=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),rh.exports=xw(),rh.exports}var Gm;function Ew(){if(Gm)return Cl;Gm=1;var e=kw();return Cl.createRoot=e.createRoot,Cl.hydrateRoot=e.hydrateRoot,Cl}var Cw=Ew(),av={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ym=ns.createContext&&ns.createContext(av),Nw=["attr","size","title"];function Tw(e,t){if(e==null)return{};var n,r,o=Rw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Rw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Yl(){return Yl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yl.apply(null,arguments)}function Xm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Xl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xm(Object(n),!0).forEach(function(r){Mw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mw(e,t,n){return(t=Aw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Aw(e){var t=Ow(e,"string");return typeof t=="symbol"?t:t+""}function Ow(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lv(e){return e&&e.map((t,n)=>ns.createElement(t.tag,Xl({key:n},t.attr),lv(t.child)))}function at(e){return t=>ns.createElement(Lw,Yl({attr:Xl({},e.attr)},t),lv(e.child))}function Lw(e){var t=n=>{var r=e.attr,o=e.size,a=e.title,l=Tw(e,Nw),u=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),ns.createElement("svg",Yl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,l,{className:d,style:Xl(Xl({color:e.color||n.color},n.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),a&&ns.createElement("title",null,a),e.children)};return Ym!==void 0?ns.createElement(Ym.Consumer,null,n=>t(n)):t(av)}function Iw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"},child:[]}]})(e)}function uc(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}function cv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"},child:[]},{tag:"path",attr:{d:"M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"},child:[]}]})(e)}function $h(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"},child:[]},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"},child:[]}]})(e)}function $d(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"4 17 10 11 4 5"},child:[]},{tag:"line",attr:{x1:"12",y1:"19",x2:"20",y2:"19"},child:[]}]})(e)}function Dw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"},child:[]}]})(e)}function Zm(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"22",y1:"2",x2:"11",y2:"13"},child:[]},{tag:"polygon",attr:{points:"22 2 15 22 11 13 2 9 22 2"},child:[]}]})(e)}function hc(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"23 4 23 10 17 10"},child:[]},{tag:"polyline",attr:{points:"1 20 1 14 7 14"},child:[]},{tag:"path",attr:{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"},child:[]}]})(e)}function ss(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(e)}function Pw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"5 3 19 12 5 21 5 3"},child:[]}]})(e)}function Wh(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"},child:[]}]})(e)}function Kh(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"},child:[]},{tag:"path",attr:{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"},child:[]}]})(e)}function Bw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"},child:[]}]})(e)}function Fw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"2",y1:"12",x2:"22",y2:"12"},child:[]},{tag:"path",attr:{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"},child:[]}]})(e)}function ra(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"},child:[]}]})(e)}function uv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"},child:[]},{tag:"polyline",attr:{points:"13 2 13 9 20 9"},child:[]}]})(e)}function zw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"},child:[]},{tag:"polyline",attr:{points:"14 2 14 8 20 8"},child:[]},{tag:"line",attr:{x1:"16",y1:"13",x2:"8",y2:"13"},child:[]},{tag:"line",attr:{x1:"16",y1:"17",x2:"8",y2:"17"},child:[]},{tag:"polyline",attr:{points:"10 9 9 9 8 9"},child:[]}]})(e)}function Qm(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 20h9"},child:[]},{tag:"path",attr:{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"},child:[]}]})(e)}function hv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"},child:[]}]})(e)}function dv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(e)}function Wd(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"4",y:"4",width:"16",height:"16",rx:"2",ry:"2"},child:[]},{tag:"rect",attr:{x:"9",y:"9",width:"6",height:"6"},child:[]},{tag:"line",attr:{x1:"9",y1:"1",x2:"9",y2:"4"},child:[]},{tag:"line",attr:{x1:"15",y1:"1",x2:"15",y2:"4"},child:[]},{tag:"line",attr:{x1:"9",y1:"20",x2:"9",y2:"23"},child:[]},{tag:"line",attr:{x1:"15",y1:"20",x2:"15",y2:"23"},child:[]},{tag:"line",attr:{x1:"20",y1:"9",x2:"23",y2:"9"},child:[]},{tag:"line",attr:{x1:"20",y1:"14",x2:"23",y2:"14"},child:[]},{tag:"line",attr:{x1:"1",y1:"9",x2:"4",y2:"9"},child:[]},{tag:"line",attr:{x1:"1",y1:"14",x2:"4",y2:"14"},child:[]}]})(e)}function fv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},child:[]}]})(e)}function Uw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"18 15 12 9 6 15"},child:[]}]})(e)}function dc(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(e)}function ua(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(e)}function pv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(e)}function jw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"},child:[]},{tag:"polyline",attr:{points:"22 4 12 14.01 9 11.01"},child:[]}]})(e)}function Hw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"polyline",attr:{points:"19 12 12 19 5 12"},child:[]}]})(e)}function Do({trigger:e,open:t,onOpenChange:n,children:r,align:o="right"}){const a=Q.useRef(null);return Q.useEffect(()=>{if(!t)return;const l=d=>{a.current&&!a.current.contains(d.target)&&n(!1)},u=d=>{d.key==="Escape"&&n(!1)};return document.addEventListener("mousedown",l),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",u)}},[t,n]),_.jsxs("div",{className:`dropdown ${o}`,ref:a,children:[_.jsxs("button",{type:"button",className:"chip",onClick:()=>n(!t),"aria-expanded":t,children:[e,_.jsx(ua,{className:`dd-caret ${t?"up":""}`})]}),t&&_.jsx("div",{className:"dd-menu",children:r})]})}function ah({active:e,onClick:t,children:n}){return _.jsx("button",{type:"button",className:`dd-item ${e?"active":""}`,onClick:t,children:n})}const mv="pi-web-ui:lang",$w={cancel:"取消",ok:"确定",save:"保存",close:"关闭",loading:"加载中…",connected:"已连接",connecting:"连接中…",reconnecting:"重连中…",language:"语言",langZh:"中文",langEn:"English",copy:"复制",viewSwitch:"视图切换",chat:"对话",terminal:"终端",selectModel:"选择模型",availableModels:"可用模型",noModels:"暂无可用模型(请先配置 API 密钥)",reasoning:"推理",refreshModels:"刷新模型列表",manageModels:"⚙ 管理模型(新增 / 修改)",manageModelsTitle:"管理模型",thinkingLevel:"思考强度",thinking:"思考",thinkingChip:"思考:{level}",sound:"声音",newChat:"新对话",newChatTip:"新建对话(每个浏览器独立保存会话)","thinking.off":"关闭","thinking.minimal":"极简","thinking.low":"低","thinking.medium":"中","thinking.high":"高","thinking.xhigh":"极高","thinking.max":"最大",context:"上下文",contextUsage:"上下文用量",cumulativeCost:"累计成本",sessionMessages:"会话消息数",messages:"消息",pluginStatus:"插件状态",working:"工作中",queued:"排队",enterPath:"输入路径,Enter 切换",cwdTip:"工作目录:{path}(点击切换)",folderRef:"文件夹引用:{path}",refOnly:"仅引用:{path}",attachContent:"附加内容:{path}",attachLines:"附加选中行:{path}(第 {start}-{end} 行)",removeAttachment:"移除附件",attachHint:"将随下一条消息发送",followUpQueued:"⏳ {n} 条跟进消息排队中",steeringQueued:"⏳ {n} 条转向消息排队中",placeholderStreaming:"智能体正在工作中…(消息可排队发送)",placeholderIdle:"给 pi 发送消息 — Enter 发送,Shift+Enter 换行",placeholderConnecting:"正在连接服务器…",stopAgent:"停止智能体",stop:"停止",supplement:"补充",supplementTip:"当前回复完成后立即发送",sendTip:"发送(Enter)",recentProjects:"最近项目",openConversations:"打开的对话",historySessions:"历史对话",streaming:"进行中…",noHistory:"还没有历史对话",current:"当前",messageCount:"{n} 条消息",tuiTip:"pi 终端(TUI)中的对话",refreshList:"刷新列表",emptyChat:"空对话",editReask:"编辑重问",editReaskTip:"修改此问题,并从这里重新提问(会新建一个分支对话,原对话保留)",reaskFromHere:"从此处重新提问",editPlaceholder:"修改问题内容…",editHint:"⌘/Ctrl+Enter 提交 · Esc 取消",expandMsg:"展开",collapseMsg:"收起",toolCalls:"工具调用",bashRuns:"终端运行",images:"图片",update:"更新",updateTip:"检查并更新 pi-web-ui",currentVersion:"当前版本",latestVersion:"最新版本",checkingUpdate:"检查中…",checkUpdate:"检查更新",upToDate:"已是最新版本",updateAvailable:"发现新版本 v{version}",updateNow:"立即更新",confirmUpdate:"确认更新(覆盖全局安装)",updateSuccess:"✅ 已更新,正在重启…",updateFailed:"更新失败:{detail}",restartHint:"重启:pi-web-ui server restart",refreshFiles:"刷新文件列表",rootDir:"根目录",noFiles:"暂无文件",linkFolderTip:"链接文件夹路径到对话",attachInlineTip:"附加内容到对话",referenceTip:"仅引用路径(AI 按需读取)",previewFile:"预览",downloadFile:"下载文件",downloadFailed:"下载失败:{error}",selectLinesHint:"点击选择行;拖拽或 Shift+点击选择范围",selectedRange:"已选 {n} 行(第 {start}-{end} 行)",fileLines:"{n} 行",selectAll:"全选",clearSelection:"清除",addToChat:"添加到对话",addedToChat:"已添加",previewTruncated:"⚠ 文件过大,仅预览前 512KB",previewLinesTruncated:"… 文件行数过多,仅显示前 {n} 行",binaryFile:"二进制文件,无法预览",previewNotSupported:"该类型文件不支持预览(仅图片 / 视频 / 文本)",emptyFile:"(空文件)",pluginRequest:"插件请求",noOptions:"(无选项)",inputPlaceholder:"输入内容",soundHeader:"声音提示",enableSound:"启用声音",preview:"试听",volume:"音量","sound.question":"问卷弹出","sound.question.desc":"ask_user_question 出现时","sound.done":"回复结束","sound.done.desc":"智能体完成一轮回答时","sound.start":"回复开始","sound.start.desc":"智能体开始新一轮时","sound.error":"出错","sound.error.desc":"出现错误提示时",setupTitle:"未检测到 pi agent 配置",setupDesc:"pi-web-ui 需要 pi 的配置目录(~/.pi/agent)和至少一个 API 密钥才能运行智能体。pi 内置了 openai、anthropic、deepseek 等服务商——选一个填密钥即可,全程无需打开终端。",installFailed:"✖ pi agent 安装失败:",retryInstall:"重试安装",skip:"跳过",installDone:"✅ pi agent CLI 已安装。选择服务商并填入 API 密钥即可开始对话:",provider:"服务商",configured:"已配置",providerKeyReady:"该服务商已配置密钥,可直接使用或更换新密钥。",apiKey:"API 密钥",saving:"保存中…",saveAndStart:"保存并开始使用",recheck:"重新检测",installing:"正在安装 pi agent CLI…",autoInstall:"自动安装 pi agent",attachment:"附件",plugin:"插件",unknown:"未知",thinkingWait:"正在思考",exitCode:"退出码 {code}",cancelled:"已取消",truncated:"… 内容过长,当前视图已截断",outputTruncated:"… 输出过长,当前视图已截断",refOnlyShort:"仅引用",folderRefShort:"文件夹 · 仅引用",inlineLines:"内联 · {n} 行",inlineLinesRange:"行 {start}-{end}",image:"🖼 图片",folderNotExpanded:"文件夹,未展开内容 —— 智能体会按需浏览目录",fileNotExpanded:"文件较大({size}),未展开内容 —— 智能体会按需读取","role.user":"你","role.assistant":"pi","role.tool":"工具","role.bash":"终端","role.branch":"分支摘要","role.compaction":"上下文已压缩",welcomeTitle:"pi 编码智能体",welcomeSub:"检查、编辑、运行 —— 随时待命",directory:"目录",clickToFill:"点击填入输入框",waitingResponse:"正在等待模型响应…",backToBottom:"回到底部","ex.understand":"了解这个项目","ex.understand.prompt":"介绍一下这个项目:整体结构、主要模块和如何运行?","ex.debug":"排查一个问题","ex.debug.prompt":"帮我排查一个 bug,请先说明问题现象,我会补充细节。","ex.test":"编写测试","ex.test.prompt":"为项目的核心模块编写单元测试。","ex.review":"代码审查","ex.review.prompt":"审查最近改动的代码,指出潜在问题和改进建议。",error:"出错",done:"完成",running:"执行中…",toolQueued:"排队中",copyArgs:"复制参数",errorOutput:"错误输出",output:"输出",waitingOutput:"等待输出…",thinkingNow:"思考中",thinkingPreview:"思考:{preview}",commands:"命令",newCommand:"新建命令",newTerminal:"新建终端",name:"名称",command:"命令",cwdHint:"(${pwd} = 当前工作目录)",noCommands:"还没有命令,点 + 添加一个",clickToRun:"点击运行",edit:"编辑",delete:"删除",confirmQ:"确认?",commandsFileHint:"${pwd} 指代当前工作目录",builtinTerminal:"内置终端",termEmptySub:"点击左侧命令运行,或点右侧 + 新建终端",noTerminal:"暂无终端",exited:"(已退出{code})",closeTerminal:"关闭终端",rerun:"重新读取 .pi/commands.json",terminalTitle:"终端 {n}",exampleName:"例如:启动开发服务器",exampleCommand:"例如:npm run dev",editProvider:"编辑服务商",builtinProviders:"内置服务商",hintKeyOnly:"只需填入 API 密钥",configuredBadge:"✓ 已配置",keyReady:"密钥已就绪",pasteKey:"粘贴 API 密钥…",savingKey:"保存中",saveKey:"保存密钥",customProviders:"自定义服务商",customDesc:"用于 Ollama / vLLM / 兼容 OpenAI 的代理等,写入 pi 的 models.json,保存后热重载、立即生效。",noCustomProviders:"还没有自定义服务商",modelsCount:"{n} 个模型",addProvider:"新增服务商",providerId:"服务商 ID",providerIdHint:"(必填,如 ollama / my-proxy)",displayName:"显示名",displayNamePh:"我的代理",apiType:"API 类型",baseUrlHint:"(OpenAI 兼容端点)",apiKeyHint:"sk-…(可留空,用 auth.json 的密钥)",authHeader:"自动添加 Authorization 请求头",modelsTitle:"模型",modelIdReq:"模型 ID(必填)",text:"文本",textImage:"文本+图片",contextWindow:"上下文",maxOutput:"最大输出",removeModel:"移除模型",addModel:"添加模型",deleteProviderConfirm:"删除服务商 {id} 及其 {n} 个模型?",loadingSession:"正在加载会话…",connectingServer:"正在连接 pi-web-ui 服务器…"},Ww={cancel:"Cancel",ok:"OK",save:"Save",close:"Close",loading:"Loading…",connected:"Connected",connecting:"Connecting…",reconnecting:"Reconnecting…",language:"Language",langZh:"中文",langEn:"English",copy:"Copy",viewSwitch:"Switch view",chat:"Chat",terminal:"Terminal",selectModel:"Select model",availableModels:"Available models",noModels:"No models available (configure an API key first)",reasoning:"reasoning",refreshModels:"Refresh model list",manageModels:"⚙ Manage models (add / edit)",manageModelsTitle:"Manage models",thinkingLevel:"Thinking level",thinking:"Thinking",thinkingChip:"Thinking: {level}",sound:"Sound",newChat:"New chat",newChatTip:"New chat (sessions are saved per browser)","thinking.off":"Off","thinking.minimal":"Minimal","thinking.low":"Low","thinking.medium":"Medium","thinking.high":"High","thinking.xhigh":"Extra high","thinking.max":"Max",context:"Context",contextUsage:"Context usage",cumulativeCost:"Cumulative cost",sessionMessages:"Session messages",messages:"messages",pluginStatus:"Plugin status",working:"Working",queued:"queued",enterPath:"Type a path, Enter to switch",cwdTip:"Working directory: {path} (click to switch)",folderRef:"Folder reference: {path}",refOnly:"Reference only: {path}",attachContent:"Attached content: {path}",attachLines:"Attached selected lines: {path} (lines {start}-{end})",removeAttachment:"Remove attachment",attachHint:"Will be sent with the next message",followUpQueued:"⏳ {n} follow-up message(s) queued",steeringQueued:"⏳ {n} steering message(s) queued",placeholderStreaming:"The agent is working… (messages will queue)",placeholderIdle:"Message pi — Enter to send, Shift+Enter for newline",placeholderConnecting:"Connecting to server…",stopAgent:"Stop agent",stop:"Stop",supplement:"Follow-up",supplementTip:"Send immediately after the current reply finishes",sendTip:"Send (Enter)",recentProjects:"Recent projects",openConversations:"Open chats",historySessions:"History",streaming:"Streaming…",noHistory:"No previous chats",current:"Current",messageCount:"{n} messages",tuiTip:"Chat in the pi terminal (TUI)",refreshList:"Refresh list",emptyChat:"Empty chat",editReask:"Edit & re-ask",editReaskTip:"Edit this question and re-ask from here (forks a new conversation; the original is kept)",reaskFromHere:"Re-ask from here",editPlaceholder:"Edit the question…",editHint:"⌘/Ctrl+Enter to submit · Esc to cancel",expandMsg:"Expand",collapseMsg:"Collapse",toolCalls:"tool calls",bashRuns:"bash runs",images:"images",update:"Update",updateTip:"Check & update pi-web-ui",currentVersion:"Current version",latestVersion:"Latest version",checkingUpdate:"Checking…",checkUpdate:"Check for updates",upToDate:"You're up to date",updateAvailable:"New version v{version} available",updateNow:"Update now",confirmUpdate:"Confirm (replaces global install)",updateSuccess:"✅ Updated — restarting…",updateFailed:"Update failed: {detail}",restartHint:"Restart: pi-web-ui server restart",refreshFiles:"Refresh file list",rootDir:"Root",noFiles:"No files",linkFolderTip:"Link folder path to chat",attachInlineTip:"Attach content to chat",referenceTip:"Reference path only (AI reads on demand)",previewFile:"Preview",downloadFile:"Download file",downloadFailed:"Download failed: {error}",selectLinesHint:"Click a line to select; drag or Shift+click for a range",selectedRange:"Selected {n} lines (lines {start}-{end})",fileLines:"{n} lines",selectAll:"Select all",clearSelection:"Clear",addToChat:"Add to chat",addedToChat:"Added",previewTruncated:"⚠ File too large — previewing the first 512KB",previewLinesTruncated:"… too many lines — showing the first {n}",binaryFile:"Binary file — preview not available",previewNotSupported:"This file type can't be previewed (only images / videos / text)",emptyFile:"(empty file)",pluginRequest:"Plugin request",noOptions:"(no options)",inputPlaceholder:"Enter content",soundHeader:"Sound notifications",enableSound:"Enable sound",preview:"Preview",volume:"Volume","sound.question":"Question popup","sound.question.desc":"When ask_user_question appears","sound.done":"Reply finished","sound.done.desc":"When the agent finishes a turn","sound.start":"Reply started","sound.start.desc":"When the agent starts a new turn","sound.error":"Error","sound.error.desc":"When an error notice appears",setupTitle:"pi agent config not detected",setupDesc:"pi-web-ui needs pi's config directory (~/.pi/agent) and at least one API key to run the agent. pi has built-in providers such as openai, anthropic, and deepseek — just pick one and enter a key, no terminal needed.",installFailed:"✖ pi agent installation failed:",retryInstall:"Retry install",skip:"Skip",installDone:"✅ pi agent CLI installed. Pick a provider and enter an API key to start chatting:",provider:"Provider",configured:"configured",providerKeyReady:"This provider already has a key — use it or replace it.",apiKey:"API key",saving:"Saving…",saveAndStart:"Save and start using",recheck:"Recheck",installing:"Installing pi agent CLI…",autoInstall:"Auto-install pi agent",attachment:"Attachment",plugin:"plugin",unknown:"unknown",thinkingWait:"Thinking",exitCode:"Exit code {code}",cancelled:"Cancelled",truncated:"… content too long, truncated in this view",outputTruncated:"… output too long, truncated in this view",refOnlyShort:"Reference only",folderRefShort:"Folder · reference only",inlineLines:"Inline · {n} lines",inlineLinesRange:"Lines {start}-{end}",image:"🖼 Image",folderNotExpanded:"Folder — content not expanded, the agent will browse it as needed",fileNotExpanded:"Large file ({size}) — content not expanded, the agent will read it as needed","role.user":"You","role.assistant":"pi","role.tool":"Tool","role.bash":"Terminal","role.branch":"Branch summary","role.compaction":"Context compacted",welcomeTitle:"pi coding agent",welcomeSub:"Inspect, edit, run — always ready",directory:"Directory",clickToFill:"Click to fill input",waitingResponse:"Waiting for model response…",backToBottom:"Back to bottom","ex.understand":"Understand this project","ex.understand.prompt":"Introduce this project: overall structure, main modules, and how to run it?","ex.debug":"Debug an issue","ex.debug.prompt":"Help me debug a bug — describe the symptom first, and I'll add details.","ex.test":"Write tests","ex.test.prompt":"Write unit tests for the core modules.","ex.review":"Code review","ex.review.prompt":"Review the recently changed code and point out potential issues and improvements.",error:"Error",done:"Done",running:"Running…",toolQueued:"Queued",copyArgs:"Copy args",errorOutput:"Error output",output:"Output",waitingOutput:"Waiting for output…",thinkingNow:"Thinking",thinkingPreview:"Thinking: {preview}",commands:"Commands",newCommand:"New command",newTerminal:"New terminal",name:"Name",command:"Command",cwdHint:"(${pwd} = current working directory)",noCommands:"No commands yet — click + to add one",clickToRun:"Click to run",edit:"Edit",delete:"Delete",confirmQ:"Confirm?",commandsFileHint:"${pwd} refers to the current working directory",builtinTerminal:"Built-in terminal",termEmptySub:"Click a command on the left to run it, or + on the right for a new terminal",noTerminal:"No terminals",exited:"(exited{code})",closeTerminal:"Close terminal",rerun:"Reload .pi/commands.json",terminalTitle:"Terminal {n}",exampleName:"e.g. start dev server",exampleCommand:"e.g. npm run dev",editProvider:"Edit provider",builtinProviders:"Built-in providers",hintKeyOnly:"Just enter an API key",configuredBadge:"✓ Configured",keyReady:"Key ready",pasteKey:"Paste API key…",savingKey:"Saving",saveKey:"Save key",customProviders:"Custom providers",customDesc:"For Ollama / vLLM / OpenAI-compatible proxies, etc. Written to pi's models.json — hot-reloaded immediately.",noCustomProviders:"No custom providers yet",modelsCount:"{n} models",addProvider:"Add provider",providerId:"Provider ID",providerIdHint:"(required, e.g. ollama / my-proxy)",displayName:"Display name",displayNamePh:"My proxy",apiType:"API type",baseUrlHint:"(OpenAI-compatible endpoint)",apiKeyHint:"sk-… (optional — uses the auth.json key)",authHeader:"Auto-add Authorization header",modelsTitle:"Models",modelIdReq:"Model ID (required)",text:"Text",textImage:"Text+image",contextWindow:"Context",maxOutput:"Max output",removeModel:"Remove model",addModel:"Add model",deleteProviderConfirm:"Delete provider {id} and its {n} models?",loadingSession:"Loading session…",connectingServer:"Connecting to pi-web-ui server…"},gv=Q.createContext(null);function Kw(){try{const e=localStorage.getItem(mv);if(e==="zh"||e==="en")return e}catch{}return"zh"}function qw({children:e}){const[t,n]=Q.useState(Kw),r=Q.useCallback(l=>{n(l);try{localStorage.setItem(mv,l)}catch{}},[]),o=Q.useCallback((l,u)=>{let d=Ww[l];if(t==="zh"&&(d=$w[l]),u)for(const[h,p]of Object.entries(u))d=d.replaceAll(`{${h}}`,String(p));return d},[t]);Q.useEffect(()=>{document.documentElement.lang=t==="zh"?"zh-CN":"en"},[t]);const a=Q.useMemo(()=>({locale:t,setLocale:r,t:o}),[t,r,o]);return _.jsx(gv.Provider,{value:a,children:e})}function _v(){const e=Q.useContext(gv);if(!e)throw new Error("useI18n must be used within LanguageProvider");return e}function qt(){return _v().t}const Vw=[{kind:"question",labelKey:"sound.question",descKey:"sound.question.desc"},{kind:"done",labelKey:"sound.done",descKey:"sound.done.desc"},{kind:"start",labelKey:"sound.start",descKey:"sound.start.desc"},{kind:"error",labelKey:"sound.error",descKey:"sound.error.desc"}];function Gw({settings:e,onChange:t,onPreview:n}){const r=qt(),o=a=>t({...e,...a});return _.jsxs("div",{className:"sound-menu",children:[_.jsx("div",{className:"dd-header",children:r("soundHeader")}),_.jsxs("label",{className:"sound-row sound-master",children:[_.jsxs("span",{className:"sound-label",children:[_.jsx(cv,{className:"sound-icon"}),_.jsx("span",{children:r("enableSound")})]}),_.jsx("input",{type:"checkbox",checked:e.enabled,onChange:a=>o({enabled:a.target.checked})})]}),Vw.map(({kind:a,labelKey:l,descKey:u})=>_.jsxs("label",{className:`sound-row ${e.enabled?"":"disabled"}`,children:[_.jsxs("span",{className:"sound-label",children:[_.jsx("span",{className:"sound-name",children:r(l)}),_.jsx("span",{className:"sound-desc",children:r(u)})]}),_.jsxs("span",{className:"sound-right",children:[_.jsx("button",{type:"button",className:"sound-preview",title:r("preview"),disabled:!e.enabled,onClick:d=>{d.preventDefault(),n(a)},children:r("preview")}),_.jsx("input",{type:"checkbox",checked:e[a],disabled:!e.enabled,onChange:d=>o({[a]:d.target.checked})})]})]},a)),_.jsxs("div",{className:`sound-volume ${e.enabled?"":"disabled"}`,children:[_.jsx("span",{className:"sound-name",children:r("volume")}),_.jsx("input",{type:"range",min:0,max:100,step:5,value:e.volume,disabled:!e.enabled,onChange:a=>o({volume:Number(a.target.value)})}),_.jsxs("span",{className:"sound-vol-num",children:[e.volume,"%"]})]})]})}const Yw=["off","minimal","low","medium","high","xhigh","max"];function Xw({chat:e,send:t,view:n,onViewChange:r,onManageModels:o,sound:a,onSoundChange:l,onSoundPreview:u}){var te,z,ie,C;const{locale:d,setLocale:h,t:p}=_v(),m=e.state,y=m==null?void 0:m.model,b=y?`${y.provider}/${y.id}`:null,[w,S]=Q.useState(!1),[k,E]=Q.useState(!1),[T,N]=Q.useState(!1),[O,K]=Q.useState(!1),[I,re]=Q.useState(!1),[Z,F]=Q.useState(!1),[L,X]=Q.useState(!1),W=Yw.map(A=>({value:A,label:p(`thinking.${A}`)})),j=A=>{var G;return((G=W.find(R=>R.value===A))==null?void 0:G.label)??A},$=[{value:"zh",label:p("langZh")},{value:"en",label:p("langEn")}];Q.useEffect(()=>{w&&e.models.length===0&&!L&&(X(!0),t({type:"list_models"}))},[w,e.models.length,L,t]),Q.useEffect(()=>{e.models.length>0&&X(!1)},[e.models.length]);const P=e.ready?p("connected"):e.status==="closed"?p("reconnecting"):p("connecting"),Y=e.ready?"ok":"busy";return _.jsxs("header",{className:"topbar",children:[_.jsxs("div",{className:"brand",children:[_.jsx("span",{className:"brand-logo",children:"π"}),_.jsx("span",{className:"brand-name",children:"pi-web-ui"}),_.jsx("span",{className:`conn-dot ${Y}`,title:P}),_.jsx("span",{className:"conn-label",children:P})]}),_.jsxs("div",{className:"topbar-actions",children:[_.jsxs("div",{className:"view-switch",role:"tablist","aria-label":p("viewSwitch"),children:[_.jsxs("button",{type:"button",role:"tab","aria-selected":n==="chat",className:n==="chat"?"active":"",onClick:()=>r("chat"),children:[_.jsx(Wh,{}),_.jsx("span",{children:p("chat")})]}),_.jsxs("button",{type:"button",role:"tab","aria-selected":n==="terminal",className:n==="terminal"?"active":"",onClick:()=>r("terminal"),children:[_.jsx($d,{}),_.jsx("span",{children:p("terminal")})]})]}),_.jsxs(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(Wd,{}),_.jsx("span",{className:"chip-model",children:y?y.name:p("selectModel")}),y&&_.jsx("span",{className:"chip-sub",children:y.provider})]}),open:w,onOpenChange:S,children:[_.jsx("div",{className:"dd-header",children:p("availableModels")}),(L||e.modelsLoading)&&_.jsx("div",{className:"dd-loading",children:p("loading")}),e.models.length===0&&!L&&!e.modelsLoading&&_.jsx("div",{className:"dd-loading",children:p("noModels")}),e.models.map(A=>_.jsxs(ah,{active:b===A.id,onClick:()=>{b!==A.id&&t({type:"set_model",modelId:A.id}),S(!1)},children:[_.jsx("span",{className:"dd-model-name",children:A.name}),_.jsxs("span",{className:"dd-model-sub",children:[A.provider,A.reasoning?` · ${p("reasoning")}`:""]})]},A.id)),_.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>t({type:"list_models"}),children:p("refreshModels")}),_.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>{S(!1),o()},children:p("manageModels")})]}),_.jsxs(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(Iw,{}),_.jsx("span",{className:"chip-sub",children:p("thinkingChip",{level:m?j(m.thinkingLevel):"—"})})]}),open:k,onOpenChange:E,children:[_.jsx("div",{className:"dd-header",children:p("thinkingLevel")}),W.map(A=>_.jsx(ah,{active:(m==null?void 0:m.thinkingLevel)===A.value,onClick:()=>{(m==null?void 0:m.thinkingLevel)!==A.value&&t({type:"set_thinking",level:A.value}),E(!1)},children:A.label},A.value))]}),_.jsx(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(cv,{}),_.jsx("span",{className:"chip-sub",children:p("sound")})]}),open:T,onOpenChange:N,children:_.jsx(Gw,{settings:a,onChange:l,onPreview:u})}),_.jsxs(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(Fw,{}),_.jsx("span",{className:"chip-sub",children:d==="zh"?p("langZh"):"EN"})]}),open:O,onOpenChange:K,children:[_.jsx("div",{className:"dd-header",children:p("language")}),$.map(A=>_.jsx(ah,{active:d===A.value,onClick:()=>{h(A.value),K(!1)},children:A.label},A.value))]}),_.jsxs("button",{type:"button",className:"chip newchat","data-tip":p("newChatTip"),onClick:()=>t({type:"new_chat"}),children:[_.jsx(ss,{}),_.jsx("span",{children:p("newChat")})]}),_.jsxs(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(dv,{}),_.jsxs("span",{className:"chip-sub",children:["v",((te=e.update)==null?void 0:te.current)??"…"]}),e.update&&!e.update.upToDate&&!e.update.pendingRestart&&_.jsx("span",{className:"update-dot",title:p("updateAvailable",{version:e.update.latest??""})})]}),open:I,onOpenChange:A=>{re(A),F(!1),A&&t({type:"check_update"})},children:[_.jsx("div",{className:"dd-header",children:p("update")}),_.jsxs("div",{className:"dd-update",children:[_.jsxs("div",{className:"dd-row",children:[_.jsx("span",{children:p("currentVersion")}),_.jsxs("b",{children:["v",((z=e.update)==null?void 0:z.current)??"…"]})]}),_.jsxs("div",{className:"dd-row",children:[_.jsx("span",{children:p("latestVersion")}),_.jsx("b",{children:e.update===null?p("checkingUpdate"):e.update.error?e.update.error:e.update.latest?`v${e.update.latest}`:p("checkingUpdate")})]}),((ie=e.update)==null?void 0:ie.pendingRestart)&&_.jsx("div",{className:"dd-note ok",children:p("updateSuccess")}),e.update&&!e.update.pendingRestart&&e.update.upToDate&&_.jsx("div",{className:"dd-note ok",children:p("upToDate")}),e.update&&!e.update.pendingRestart&&!e.update.upToDate&&e.update.latest&&_.jsx("div",{className:"dd-note warn",children:p("updateAvailable",{version:e.update.latest})}),e.updateResult&&!e.updateResult.ok&&_.jsx("div",{className:"dd-note err",children:p("updateFailed",{detail:e.updateResult.detail})}),((C=e.update)==null?void 0:C.pendingRestart)&&_.jsx("div",{className:"dd-note",children:p("restartHint")})]}),_.jsxs("div",{className:"dd-actions",children:[_.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>t({type:"check_update"}),children:e.update===null?p("checkingUpdate"):p("checkUpdate")}),e.update&&!e.update.pendingRestart&&!e.update.upToDate&&e.update.latest&&_.jsx("button",{type:"button",className:`dd-refresh accent ${Z?"armed":""}`,onClick:()=>{if(!Z){F(!0);return}F(!1),re(!1),t({type:"update_app"})},children:p(Z?"confirmUpdate":"updateNow")})]})]})]})]})}function Jm(e){const t=new Date(e),n=new Date;return t.toDateString()===n.toDateString()?`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`:`${t.getMonth()+1}/${t.getDate()}`}function Zw({chat:e,send:t}){var h,p;const n=qt(),r=(h=e.state)==null?void 0:h.sessionFile,o=(p=e.state)==null?void 0:p.cwd,a=e.sessions,l=e.projects,u=m=>{const y=m.name||m.firstMessage.trim();return y.length>0?y:n("emptyChat")},d=m=>m.split(/[\\/]/).pop()||m;return _.jsxs("aside",{className:"panel panel-left",children:[l.length>0&&_.jsxs("div",{className:"panel-projects",children:[_.jsx("div",{className:"panel-section-title",children:n("recentProjects")}),l.map(m=>{const y=o===m.path;return _.jsxs("button",{type:"button",className:`project-item ${y?"active":""}`,title:m.path,onClick:()=>{y||t({type:"set_cwd",path:m.path})},children:[_.jsx(ra,{className:"project-icon"}),_.jsxs("span",{className:"project-info",children:[_.jsx("span",{className:"project-name",children:d(m.path)}),_.jsx("span",{className:"project-path",children:m.path})]}),_.jsx("span",{className:"project-time",children:Jm(m.lastUsed)})]},m.path)})]}),_.jsxs("div",{className:"panel-body",children:[e.conversations.length>1&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"panel-section-title",children:n("openConversations")}),e.conversations.map(m=>{const y=e.activeConversationId===m.id;return _.jsxs("button",{type:"button",className:`session-item ${y?"active":""}`,title:`${m.title} — ${m.cwd}`,onClick:()=>{y||t({type:"switch_conversation",id:m.id})},children:[_.jsx(Wh,{className:"session-icon"}),_.jsxs("span",{className:"session-info",children:[_.jsx("span",{className:"session-title",children:m.title}),_.jsxs("span",{className:"session-sub",children:[_.jsxs("span",{className:"session-cwd",title:m.cwd,children:[_.jsx(ra,{})," ",d(m.cwd)]}),y?n("current"):n("messageCount",{n:m.messageCount})]})]}),m.isStreaming&&_.jsx("span",{className:"conv-streaming",title:n("streaming")})]},m.id)}),_.jsx("div",{className:"panel-section-divider"})]}),_.jsx("div",{className:"panel-section-title",children:n("historySessions")}),a.length===0&&_.jsx("div",{className:"panel-empty",children:n("noHistory")}),a.map(m=>{const y=r===m.path;return _.jsxs("button",{type:"button",className:`session-item ${y?"active":""}`,title:m.path,onClick:()=>{y||t({type:"switch_session",path:m.path})},children:[_.jsx(Wh,{className:"session-icon"}),_.jsxs("span",{className:"session-info",children:[_.jsx("span",{className:"session-title",children:u(m)}),_.jsxs("span",{className:"session-sub",children:[y?n("current"):n("messageCount",{n:m.messageCount}),m.source==="tui"&&_.jsx("span",{className:"session-src",title:n("tuiTip"),children:"TUI"})]})]}),_.jsx("span",{className:"session-time",children:Jm(m.modified)})]},m.path)})]}),_.jsx("button",{type:"button",className:"panel-fab",title:n("refreshList"),onClick:()=>{t({type:"list_sessions"}),t({type:"list_projects"})},children:_.jsx(hc,{})})]})}const eg=2e5,Qw=2e5;function Jw(){const e=new Map,t=new Map;return{write(n,r){const o=e.get(n);if(o){o.write(r);return}const a=t.get(n)??"",l=a.length+r.length>Qw?r:a+r;t.set(n,l)},register(n,r){e.set(n,r);const o=t.get(n);if(o){try{r.write(o)}catch{}t.delete(n)}return()=>{e.get(n)===r&&e.delete(n),t.delete(n)}},clear(){e.clear(),t.clear()}}}function e0(e,t){const n=new Set;for(const o of t.messages)o.role==="toolResult"&&o.toolCallId&&n.add(o.toolCallId),o.role==="bashExecution"&&n.add(`bash-${o.id}`);let r=!1;for(const o of e.keys())n.has(o)&&(e.delete(o),r=!0);return r?new Map(e):e}function t0(e,t){switch(t.type){case"status":return{...e,status:t.status,ready:t.status==="open"?e.ready:!1,terminals:t.status==="open"?e.terminals:[]};case"ready":return{...e,serverVersion:t.serverVersion,ready:!0};case"snapshot":return{...e,ready:!0,state:t.state,activeConversationId:t.state.conversationId,liveOutputs:e0(e.liveOutputs,t.state)};case"tool_delta":{const n=e.liveOutputs.get(t.toolCallId),r=((n==null?void 0:n.text)??"")+t.delta,o=r.length>eg?r.slice(0,eg):r,a=new Map(e.liveOutputs);return a.set(t.toolCallId,{toolName:t.toolName,text:o}),{...e,liveOutputs:a}}case"notice":return{...e,notices:[...e.notices,t.notice].slice(-6)};case"dismiss_notice":return{...e,notices:e.notices.filter(n=>n.id!==t.id)};case"sessions":return{...e,sessions:t.sessions};case"conversations":return{...e,conversations:t.conversations,activeConversationId:t.activeId};case"projects":return{...e,projects:t.projects};case"files":return{...e,files:t.files};case"file_content":return{...e,fileContent:t.content};case"models":return{...e,models:t.models,modelsLoading:t.loading};case"models_config":return{...e,modelsConfig:t.providers};case"providers_status":return{...e,providers:t.providers};case"install_result":return{...e,installResult:t.result};case"path_completions":return{...e,pathCompletions:t.completions};case"update_status":return{...e,update:t.status};case"update_result":return{...e,updateResult:t.result};case"widgets":return{...e,widgets:t.widgets};case"statuses":return{...e,statuses:t.statuses};case"dialog":return{...e,dialog:t.dialog};case"commands":return{...e,commands:t.commands,commandsPath:t.path};case"terminal_add":return{...e,terminals:[...e.terminals,t.meta]};case"terminal_remove":return{...e,terminals:e.terminals.filter(n=>n.id!==t.id)};case"terminal_exit":return{...e,terminals:e.terminals.map(n=>n.id===t.terminalId?{...n,running:!1,exitCode:t.exitCode}:n)};case"terminal_restart":return{...e,terminals:e.terminals.map(n=>n.id===t.terminalId?{...n,running:!0,exitCode:null}:n)};default:return e}}const tg="pi-web-client-id";function Kd(){let e=localStorage.getItem(tg);return e||(e=crypto.randomUUID(),localStorage.setItem(tg,e)),e}function n0(){return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/ws`}function i0(){const[e,t]=Q.useReducer(t0,{status:"connecting",ready:!1,state:null,liveOutputs:new Map,notices:[],sessions:[],conversations:[],activeConversationId:"",projects:[],files:null,fileContent:null,models:[],modelsLoading:!1,modelsConfig:[],providers:[],installResult:null,pathCompletions:[],update:null,updateResult:null,widgets:[],statuses:[],dialog:null,commands:[],commandsPath:"",terminals:[]}),n=Q.useRef(null),r=Q.useRef(Jw()),o=Q.useRef(0),a=Q.useRef(null),l=Q.useRef(!0),u=Q.useRef(0),d=Q.useRef(0),h=Q.useCallback((T,N)=>{const O=++d.current;t({type:"notice",notice:{id:O,level:T,text:N}}),setTimeout(()=>t({type:"dismiss_notice",id:O}),T==="error"?12e3:7e3)},[]),p=Q.useCallback(T=>{const N=n.current;return N&&N.readyState===WebSocket.OPEN?(N.send(JSON.stringify(T)),!0):!1},[]),m=Q.useCallback(()=>{if(!l.current)return;t({type:"status",status:"connecting"});const T=new WebSocket(n0());n.current=T,T.onopen=()=>{n.current===T&&(t({type:"status",status:"open"}),o.current=0,u.current=Date.now(),T.send(JSON.stringify({type:"hello",clientId:Kd()})))},T.onmessage=N=>{if(n.current!==T)return;u.current=Date.now();let O;try{O=JSON.parse(N.data)}catch{return}switch(O.type){case"ready":t({type:"ready",serverVersion:O.serverVersion}),T.send(JSON.stringify({type:"get_state"})),T.send(JSON.stringify({type:"list_sessions"})),T.send(JSON.stringify({type:"list_projects"})),T.send(JSON.stringify({type:"list_files"})),T.send(JSON.stringify({type:"list_models"})),T.send(JSON.stringify({type:"list_commands"})),T.send(JSON.stringify({type:"check_update"}));break;case"snapshot":t({type:"snapshot",state:O.state});break;case"tool_delta":t({type:"tool_delta",toolCallId:O.toolCallId,toolName:O.toolName,delta:O.delta});break;case"notice":{const K=++d.current;t({type:"notice",notice:{id:K,level:O.level,text:O.text}}),setTimeout(()=>t({type:"dismiss_notice",id:K}),O.level==="error"?12e3:7e3);break}case"sessions":t({type:"sessions",sessions:O.sessions});break;case"conversations":t({type:"conversations",conversations:O.conversations,activeId:O.activeId});break;case"projects":t({type:"projects",projects:O.projects});break;case"files":t({type:"files",files:O});break;case"file_content":t({type:"file_content",content:O});break;case"models":t({type:"models",models:O.models,loading:!1});break;case"models_config":t({type:"models_config",providers:O.providers});break;case"providers_status":t({type:"providers_status",providers:O.providers});break;case"install_result":t({type:"install_result",result:O});break;case"path_completions":t({type:"path_completions",completions:O.completions});break;case"update_status":t({type:"update_status",status:O});break;case"update_result":t({type:"update_result",result:O});break;case"widgets":t({type:"widgets",widgets:O.widgets});break;case"statuses":t({type:"statuses",statuses:O.statuses});break;case"dialog":t({type:"dialog",dialog:{id:O.id,kind:O.kind,title:O.title,args:O.args}});break;case"dialog_closed":t({type:"dialog",dialog:null});break;case"terminal_output":r.current.write(O.terminalId,O.data);break;case"terminal_exit":t({type:"terminal_exit",terminalId:O.terminalId,exitCode:O.exitCode});break;case"commands":t({type:"commands",commands:O.commands,path:O.path});break}},T.onclose=()=>{if(n.current===T&&(n.current=null),r.current.clear(),!l.current)return;t({type:"status",status:"closed"});const N=Math.min(1e3*2**o.current,1e4);o.current+=1,a.current=setTimeout(()=>{a.current=null,m()},N)},T.onerror=()=>{T.close()}},[]);Q.useEffect(()=>{l.current=!0,m();const T=setInterval(()=>{if(!l.current)return;const N=n.current;N&&N.readyState===WebSocket.OPEN&&Date.now()-u.current>3e4&&N.close()},5e3);return()=>{var N;l.current=!1,clearInterval(T),a.current&&(clearTimeout(a.current),a.current=null),(N=n.current)==null||N.close(),n.current=null}},[m]);const y=Q.useCallback(T=>t({type:"dismiss_notice",id:T}),[]),b=Q.useCallback(T=>t({type:"terminal_add",meta:T}),[]),w=Q.useCallback(T=>t({type:"terminal_remove",id:T}),[]),S=Q.useCallback(T=>t({type:"terminal_restart",terminalId:T}),[]),k=Q.useCallback((T,N)=>r.current.register(T,N),[]),E=Q.useRef({chat:e,send:p,pushNotice:h,dismissNotice:y,terminal:{create:b,close:w,register:k,restart:S}});return E.current={chat:e,send:p,pushNotice:h,dismissNotice:y,terminal:{create:b,close:w,register:k,restart:S}},E.current}const r0=200*1024*1024;function ng(e,t=!0){return`/api/file?${new URLSearchParams({clientId:Kd(),path:e,...t?{download:"1"}:{}})}`}async function s0(e,t){try{const n=await fetch(ng(e));if(!n.ok)return{ok:!1,error:await n.text().catch(()=>"")||(n.status===404?"文件不存在":`HTTP ${n.status}`)};if(Number(n.headers.get("content-length")??"0")>r0)return window.location.assign(ng(e)),{ok:!0};const o=await n.blob(),a=URL.createObjectURL(o),l=document.createElement("a");return l.href=a,l.download=t,document.body.appendChild(l),l.click(),l.remove(),setTimeout(()=>URL.revokeObjectURL(a),1e4),{ok:!0}}catch(n){return{ok:!1,error:n instanceof Error?n.message:String(n)}}}function o0({chat:e,send:t,onAttach:n,onPreview:r,onNotice:o}){var T;const a=qt(),[l,u]=Q.useState(""),[d,h]=Q.useState(!1),p=e.files,m=1e4,y=Q.useRef(0),b=Q.useRef(void 0),w=Q.useCallback((N,O)=>{const K=++y.current;u(N),O!=null&&O.silent||h(!0),t({type:"list_files",path:N===""?void 0:N})||y.current===K&&h(!1)},[t]);Q.useEffect(()=>{p&&p.path===l&&h(!1)},[p,l]),Q.useEffect(()=>{var K;const N=(K=e.state)==null?void 0:K.cwd;if(N!==b.current){b.current=N,w("",{silent:!0});return}const O=setInterval(()=>{document.visibilityState!=="hidden"&&w(l,{silent:!0})},m);return()=>clearInterval(O)},[(T=e.state)==null?void 0:T.cwd,l,w]);const S=N=>w(N),k=()=>{(p==null?void 0:p.parent)!==null&&(p==null?void 0:p.parent)!==void 0&&w(p.parent)},E=l.split("/").filter(Boolean);return _.jsxs("aside",{className:"panel panel-right",children:[_.jsxs("div",{className:"panel-crumbs",children:[_.jsx("button",{type:"button",className:`crumb ${l===""?"active":""}`,onClick:()=>w(""),children:a("rootDir")}),E.map((N,O)=>{const K=E.slice(0,O+1).join("/");return _.jsxs("span",{className:"crumb-seg",children:[_.jsx(dc,{}),_.jsx("button",{type:"button",className:`crumb ${K===l?"active":""}`,onClick:()=>w(K),children:N})]},K)})]}),_.jsxs("div",{className:"panel-body",children:[d&&_.jsx("div",{className:"panel-empty",children:a("loading")}),!d&&p&&p.path===l&&_.jsxs(_.Fragment,{children:[p.path!==""&&_.jsxs("button",{type:"button",className:"file-item dir",onClick:k,children:[_.jsx(ra,{className:"file-icon"}),_.jsx("span",{className:"file-name",children:".."})]}),p.entries.map(N=>N.type==="dir"?_.jsxs("div",{className:"file-item dir",children:[_.jsxs("button",{type:"button",className:"file-dir-main",onClick:()=>S(N.path),children:[_.jsx(ra,{className:"file-icon"}),_.jsx("span",{className:"file-name",children:N.name})]}),_.jsx("button",{type:"button",className:"file-attach ref","data-tip":a("linkFolderTip"),onClick:()=>n(N.path,N.name,"reference",!0),children:_.jsx(Kh,{})})]},N.path):_.jsxs("div",{className:"file-item file",children:[_.jsxs("button",{type:"button",className:`file-name ${N.kind==="none"?"no-preview":""}`,title:`${N.path} — ${N.kind==="none"?a("previewNotSupported"):a("previewFile")}`,onClick:N.kind==="none"?void 0:()=>r(N.path,N.name),children:[_.jsx(uv,{className:"file-icon"}),_.jsx("span",{className:"file-name-text",children:N.name})]}),_.jsx("button",{type:"button",className:"file-attach download","data-tip":a("downloadFile"),onClick:()=>{s0(N.path,N.name).then(O=>{O.ok||o("error",a("downloadFailed",{error:O.error}))})},children:_.jsx(dv,{})}),_.jsx("button",{type:"button",className:"file-attach inline","data-tip":a("attachInlineTip"),onClick:()=>n(N.path,N.name,"inline"),children:_.jsx(ss,{})}),_.jsx("button",{type:"button",className:"file-attach ref","data-tip":a("referenceTip"),onClick:()=>n(N.path,N.name,"reference"),children:_.jsx(Kh,{})})]},N.path))]}),!d&&!p&&_.jsx("div",{className:"panel-empty",children:a("noFiles")})]}),e.widgets.filter(N=>N.lines.length>0).length>0&&_.jsx("div",{className:"panel-widgets",children:e.widgets.filter(N=>N.lines.length>0).map(N=>_.jsxs("div",{className:"widget",children:[_.jsx("div",{className:"widget-title",children:N.key}),_.jsx("pre",{className:"widget-lines",children:N.lines.join(`
41
41
  `)})]},N.key))}),_.jsx("button",{type:"button",className:"panel-fab",title:a("refreshFiles"),onClick:()=>w(l,{silent:!0}),children:_.jsx(hc,{})})]})}function a0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const l0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,c0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,u0={};function ig(e,t){return(u0.jsx?c0:l0).test(e)}const h0=/[ \t\n\f\r]/g;function d0(e){return typeof e=="object"?e.type==="text"?rg(e.value):!1:rg(e)}function rg(e){return e.replace(h0,"")===""}class ha{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ha.prototype.normal={};ha.prototype.property={};ha.prototype.space=void 0;function vv(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new ha(n,r,t)}function qh(e){return e.toLowerCase()}class In{constructor(t,n){this.attribute=n,this.property=t}}In.prototype.attribute="";In.prototype.booleanish=!1;In.prototype.boolean=!1;In.prototype.commaOrSpaceSeparated=!1;In.prototype.commaSeparated=!1;In.prototype.defined=!1;In.prototype.mustUseProperty=!1;In.prototype.number=!1;In.prototype.overloadedBoolean=!1;In.prototype.property="";In.prototype.spaceSeparated=!1;In.prototype.space=void 0;let f0=0;const ze=cs(),Dt=cs(),Vh=cs(),le=cs(),lt=cs(),is=cs(),$n=cs();function cs(){return 2**++f0}const Gh=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:Dt,commaOrSpaceSeparated:$n,commaSeparated:is,number:le,overloadedBoolean:Vh,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),lh=Object.keys(Gh);class qd extends In{constructor(t,n,r,o){let a=-1;if(super(t,n),sg(this,"space",o),typeof r=="number")for(;++a<lh.length;){const l=lh[a];sg(this,lh[a],(r&Gh[l])===Gh[l])}}}qd.prototype.defined=!0;function sg(e,t,n){n&&(e[t]=n)}function Gs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new qd(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[qh(r)]=r,n[qh(a.attribute)]=r}return new ha(t,n,e.space)}const yv=Gs({properties:{ariaActiveDescendant:null,ariaAtomic:Dt,ariaAutoComplete:null,ariaBusy:Dt,ariaChecked:Dt,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:Dt,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:Dt,ariaFlowTo:lt,ariaGrabbed:Dt,ariaHasPopup:null,ariaHidden:Dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:le,ariaLive:null,ariaModal:Dt,ariaMultiLine:Dt,ariaMultiSelectable:Dt,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:Dt,ariaReadOnly:Dt,ariaRelevant:null,ariaRequired:Dt,ariaRoleDescription:lt,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:Dt,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function bv(e,t){return t in e?e[t]:t}function Sv(e,t){return bv(e,t.toLowerCase())}const p0=Gs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:is,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alpha:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:lt,autoFocus:ze,autoPlay:ze,blocking:lt,capture:null,charSet:null,checked:ze,cite:null,className:lt,closedBy:null,colorSpace:null,cols:le,colSpan:le,command:null,commandFor:null,content:null,contentEditable:Dt,controls:ze,controlsList:lt,coords:le|is,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:Vh,draggable:Dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:lt,height:le,hidden:Vh,high:le,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:lt,itemRef:lt,itemScope:ze,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ze,optimum:le,pattern:null,ping:lt,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:lt,required:ze,reversed:ze,rows:le,rowSpan:le,sandbox:lt,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootCustomElementRegistry:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shadowRootSerializable:ze,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:Dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:Dt,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:Dt,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ze,disablePictureInPicture:ze,disableRemotePlayback:ze,exportParts:is,part:lt,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:Sv}),m0=Gs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:$n,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:is,g2:is,glyphName:is,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:$n,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:le,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$n,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$n,rev:$n,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$n,requiredFeatures:$n,requiredFonts:$n,requiredFormats:$n,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:$n,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$n,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$n,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:bv}),wv=Gs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),xv=Gs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Sv}),kv=Gs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),g0={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},_0=/[A-Z]/g,og=/-[a-z]/g,v0=/^data[-\w.:]+$/i;function y0(e,t){const n=qh(t);let r=t,o=In;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&v0.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(og,S0);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!og.test(a)){let l=a.replace(_0,b0);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=qd}return new o(r,t)}function b0(e){return"-"+e.toLowerCase()}function S0(e){return e.charAt(1).toUpperCase()}const w0=vv([yv,p0,wv,xv,kv],"html"),Vd=vv([yv,m0,wv,xv,kv],"svg");function x0(e){return e.join(" ").trim()}var zs={},ch,ag;function k0(){if(ag)return ch;ag=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
42
42
  `,h="/",p="*",m="",y="comment",b="declaration";function w(k,E){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];E=E||{};var T=1,N=1;function O($){var P=$.match(t);P&&(T+=P.length);var Y=$.lastIndexOf(d);N=~Y?$.length-Y:N+$.length}function K(){var $={line:T,column:N};return function(P){return P.position=new I($),F(),P}}function I($){this.start=$,this.end={line:T,column:N},this.source=E.source}I.prototype.content=k;function re($){var P=new Error(E.source+":"+T+":"+N+": "+$);if(P.reason=$,P.filename=E.source,P.line=T,P.column=N,P.source=k,!E.silent)throw P}function Z($){var P=$.exec(k);if(P){var Y=P[0];return O(Y),k=k.slice(Y.length),P}}function F(){Z(n)}function L($){var P;for($=$||[];P=X();)P!==!1&&$.push(P);return $}function X(){var $=K();if(!(h!=k.charAt(0)||p!=k.charAt(1))){for(var P=2;m!=k.charAt(P)&&(p!=k.charAt(P)||h!=k.charAt(P+1));)++P;if(P+=2,m===k.charAt(P-1))return re("End of comment missing");var Y=k.slice(2,P-2);return N+=2,O(Y),k=k.slice(P),N+=2,$({type:y,comment:Y})}}function W(){var $=K(),P=Z(r);if(P){if(X(),!Z(o))return re("property missing ':'");var Y=Z(a),te=$({type:b,property:S(P[0].replace(e,m)),value:Y?S(Y[0].replace(e,m)):m});return Z(l),te}}function j(){var $=[];L($);for(var P;P=W();)P!==!1&&($.push(P),L($));return $}return F(),j()}function S(k){return k?k.replace(u,m):m}return ch=w,ch}var lg;function E0(){if(lg)return zs;lg=1;var e=zs&&zs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zs,"__esModule",{value:!0}),zs.default=n;const t=e(k0());function n(r,o){let a=null;if(!r||typeof r!="string")return a;const l=(0,t.default)(r),u=typeof o=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:p}=d;u?o(h,p,d):p&&(a=a||{},a[h]=p)}),a}return zs}var Po={},cg;function C0(){if(cg)return Po;cg=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},l=function(h,p){return p.toUpperCase()},u=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),a(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,u):h=h.replace(r,u),h.replace(t,l))};return Po.camelCase=d,Po}var Bo,ug;function N0(){if(ug)return Bo;ug=1;var e=Bo&&Bo.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(E0()),n=C0();function r(o,a){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(u,d){u&&d&&(l[(0,n.camelCase)(u,a)]=d)}),l}return r.default=r,Bo=r,Bo}var T0=N0();const R0=cc(T0),Ev=Cv("end"),Gd=Cv("start");function Cv(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function M0(e){const t=Gd(e),n=Ev(e);if(t&&n)return{start:t,end:n}}function ea(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?hg(e.position):"start"in e||"end"in e?hg(e):"line"in e||"column"in e?Yh(e):""}function Yh(e){return dg(e&&e.line)+":"+dg(e&&e.column)}function hg(e){return Yh(e&&e.start)+"-"+Yh(e&&e.end)}function dg(e){return e&&typeof e=="number"?e:1}class mn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?o=t:!a.cause&&t&&(l=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=u?u.line:void 0,this.name=ea(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}mn.prototype.file="";mn.prototype.name="";mn.prototype.reason="";mn.prototype.message="";mn.prototype.stack="";mn.prototype.column=void 0;mn.prototype.line=void 0;mn.prototype.ancestors=void 0;mn.prototype.cause=void 0;mn.prototype.fatal=void 0;mn.prototype.place=void 0;mn.prototype.ruleId=void 0;mn.prototype.source=void 0;const Yd={}.hasOwnProperty,A0=new Map,O0=/[A-Z]/g,L0=new Set(["table","tbody","thead","tfoot","tr"]),I0=new Set(["td","th"]),Nv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function D0(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=$0(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=H0(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Vd:w0,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Tv(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function Tv(e,t,n){if(t.type==="element")return P0(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return B0(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return z0(e,t,n);if(t.type==="mdxjsEsm")return F0(e,t);if(t.type==="root")return U0(e,t,n);if(t.type==="text")return j0(e,t)}function P0(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Vd,e.schema=o),e.ancestors.push(t);const a=Mv(e,t.tagName,!1),l=W0(e,t);let u=Zd(e,t);return L0.has(t.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!d0(d):!0})),Rv(e,l,a,t),Xd(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function B0(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}sa(e,t.position)}function F0(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);sa(e,t.position)}function z0(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Vd,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:Mv(e,t.name,!0),l=K0(e,t),u=Zd(e,t);return Rv(e,l,a,t),Xd(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function U0(e,t,n){const r={};return Xd(r,Zd(e,t)),e.create(t,e.Fragment,r,n)}function j0(e,t){return t.value}function Rv(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function H0(e,t,n){return r;function r(o,a,l,u){const h=Array.isArray(l.children)?n:t;return u?h(a,l,u):h(a,l)}}function $0(e,t){return n;function n(r,o,a,l){const u=Array.isArray(a.children),d=Gd(r);return t(o,a,l,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function W0(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Yd.call(t.properties,o)){const a=q0(e,o,t.properties[o]);if(a){const[l,u]=a;e.tableCellAlignToStyle&&l==="align"&&typeof u=="string"&&I0.has(t.tagName)?r=u:n[l]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function K0(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const u=l.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else sa(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else sa(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Zd(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:A0;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const h=o.get(d)||0;l=d+"-"+h,o.set(d,h+1)}}const u=Tv(e,a,l);u!==void 0&&n.push(u)}return n}function q0(e,t,n){const r=y0(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?a0(n):x0(n)),r.property==="style"){let o=typeof n=="object"?n:V0(e,String(n));return e.stylePropertyNameCase==="css"&&(o=G0(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?g0[r.property]||r.property:r.attribute,n]}}function V0(e,t){try{return R0(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new mn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Nv+"#cannot-parse-style-attribute",o}}function Mv(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,l;for(;++a<o.length;){const u=ig(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};l=l?{type:"MemberExpression",object:l,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=l}else r=ig(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Yd.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);sa(e)}function sa(e,t){const n=new mn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Nv+"#cannot-handle-mdx-estrees-without-createevaluater",n}function G0(e){const t={};let n;for(n in e)Yd.call(e,n)&&(t[Y0(n)]=e[n]);return t}function Y0(e){let t=e.replace(O0,X0);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function X0(e){return"-"+e.toLowerCase()}const uh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Z0={};function Qd(e,t){const n=Z0,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Av(e,r,o)}function Av(e,t,n){if(Q0(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return fg(e.children,t,n)}return Array.isArray(e)?fg(e,t,n):""}function fg(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Av(e[o],t,n);return r.join("")}function Q0(e){return!!(e&&typeof e=="object")}const pg=document.createElement("i");function Jd(e){const t="&"+e+";";pg.innerHTML=t;const n=pg.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Wn(e,t,n,r){const o=e.length;let a=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function ri(e,t){return e.length>0?(Wn(e,e.length,0,t),e):t}const mg={}.hasOwnProperty;function Ov(e){const t={};let n=-1;for(;++n<e.length;)J0(t,e[n]);return t}function J0(e,t){let n;for(n in t){const o=(mg.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){mg.call(o,l)||(o[l]=[]);const u=a[l];ex(o[l],Array.isArray(u)?u:u?[u]:[])}}}function ex(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Wn(e,0,0,r)}function Lv(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function _i(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wn=Tr(/[A-Za-z]/),pn=Tr(/[\dA-Za-z]/),tx=Tr(/[#-'*+\--9=?A-Z^-~]/);function Zl(e){return e!==null&&(e<32||e===127)}const Xh=Tr(/\d/),nx=Tr(/[\dA-Fa-f]/),ix=Tr(/[!-/:-@[-`{-~]/);function Ae(e){return e!==null&&e<-2}function ct(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const fc=Tr(new RegExp("\\p{P}|\\p{S}","u")),os=Tr(/\s/);function Tr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ys(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&pn(e.charCodeAt(n+1))&&pn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(l=String.fromCharCode(a,u),o=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Je(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(d){return Ye(d)?(e.enter(n),u(d)):t(d)}function u(d){return Ye(d)&&a++<o?(e.consume(d),u):(e.exit(n),t(d))}}const rx={tokenize:sx};function sx(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Je(e,t,"linePrefix")}function o(u){return e.enter("paragraph"),a(u)}function a(u){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Ae(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),l)}}const ox={tokenize:ax},gg={tokenize:lx};function ax(e){const t=this,n=[];let r=0,o,a,l;return u;function u(N){if(r<n.length){const O=n[r];return t.containerState=O[1],e.attempt(O[0].continuation,d,h)(N)}return h(N)}function d(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&T();const O=t.events.length;let K=O,I;for(;K--;)if(t.events[K][0]==="exit"&&t.events[K][1].type==="chunkFlow"){I=t.events[K][1].end;break}E(r);let re=O;for(;re<t.events.length;)t.events[re][1].end={...I},re++;return Wn(t.events,K+1,0,t.events.slice(O)),t.events.length=re,h(N)}return u(N)}function h(N){if(r===n.length){if(!o)return y(N);if(o.currentConstruct&&o.currentConstruct.concrete)return w(N);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(gg,p,m)(N)}function p(N){return o&&T(),E(r),y(N)}function m(N){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,w(N)}function y(N){return t.containerState={},e.attempt(gg,b,w)(N)}function b(N){return r++,n.push([t.currentConstruct,t.containerState]),y(N)}function w(N){if(N===null){o&&T(),E(0),e.consume(N);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),S(N)}function S(N){if(N===null){k(e.exit("chunkFlow"),!0),E(0),e.consume(N);return}return Ae(N)?(e.consume(N),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(N),S)}function k(N,O){const K=t.sliceStream(N);if(O&&K.push(null),N.previous=a,a&&(a.next=N),a=N,o.defineSkip(N.start),o.write(K),t.parser.lazy[N.start.line]){let I=o.events.length;for(;I--;)if(o.events[I][1].start.offset<l&&(!o.events[I][1].end||o.events[I][1].end.offset>l))return;const re=t.events.length;let Z=re,F,L;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(F){L=t.events[Z][1].end;break}F=!0}for(E(r),I=re;I<t.events.length;)t.events[I][1].end={...L},I++;Wn(t.events,Z+1,0,t.events.slice(re)),t.events.length=I}}function E(N){let O=n.length;for(;O-- >N;){const K=n[O];t.containerState=K[1],K[0].exit.call(t,e)}n.length=N}function T(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function lx(e,t,n){return Je(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qs(e){if(e===null||ct(e)||os(e))return 1;if(fc(e))return 2}function pc(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Zh={name:"attention",resolveAll:cx,tokenize:ux};function cx(e,t){let n=-1,r,o,a,l,u,d,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},y={...e[n][1].start};_g(m,-d),_g(y,d),l={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},u={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},a={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[r][1].end={...l.start},e[n][1].start={...u.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=ri(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=ri(h,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",a,t]]),h=ri(h,pc(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=ri(h,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=ri(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Wn(e,r-1,n-r+3,h),n=r+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function ux(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=qs(r);let a;return l;function l(d){return a=d,e.enter("attentionSequence"),u(d)}function u(d){if(d===a)return e.consume(d),u;const h=e.exit("attentionSequence"),p=qs(d),m=!p||p===2&&o||n.includes(d),y=!o||o===2&&p||n.includes(r);return h._open=!!(a===42?m:m&&(o||!y)),h._close=!!(a===42?y:y&&(p||!m)),t(d)}}function _g(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const hx={name:"autolink",tokenize:dx};function dx(e,t,n){let r=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(b){return wn(b)?(e.consume(b),l):b===64?n(b):h(b)}function l(b){return b===43||b===45||b===46||pn(b)?(r=1,u(b)):h(b)}function u(b){return b===58?(e.consume(b),r=0,d):(b===43||b===45||b===46||pn(b))&&r++<32?(e.consume(b),u):(r=0,h(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||Zl(b)?n(b):(e.consume(b),d)}function h(b){return b===64?(e.consume(b),p):tx(b)?(e.consume(b),h):n(b)}function p(b){return pn(b)?m(b):n(b)}function m(b){return b===46?(e.consume(b),r=0,p):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):y(b)}function y(b){if((b===45||pn(b))&&r++<63){const w=b===45?y:m;return e.consume(b),w}return n(b)}}const da={partial:!0,tokenize:fx};function fx(e,t,n){return r;function r(a){return Ye(a)?Je(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Ae(a)?t(a):n(a)}}const Iv={continuation:{tokenize:mx},exit:gx,name:"blockQuote",tokenize:px};function px(e,t,n){const r=this;return o;function o(l){if(l===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return Ye(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function mx(e,t,n){const r=this;return o;function o(l){return Ye(l)?Je(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(Iv,t,n)(l)}}function gx(e){e.exit("blockQuote")}const Dv={name:"characterEscape",tokenize:_x};function _x(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return ix(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Pv={name:"characterReference",tokenize:vx};function vx(e,t,n){const r=this;let o=0,a,l;return u;function u(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,l=pn,p(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=nx,p):(e.enter("characterReferenceValue"),a=7,l=Xh,p(m))}function p(m){if(m===59&&o){const y=e.exit("characterReferenceValue");return l===pn&&!Jd(r.sliceSerialize(y))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&o++<a?(e.consume(m),p):n(m)}}const vg={partial:!0,tokenize:bx},yg={concrete:!0,name:"codeFenced",tokenize:yx};function yx(e,t,n){const r=this,o={partial:!0,tokenize:K};let a=0,l=0,u;return d;function d(I){return h(I)}function h(I){const re=r.events[r.events.length-1];return a=re&&re[1].type==="linePrefix"?re[2].sliceSerialize(re[1],!0).length:0,u=I,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(I)}function p(I){return I===u?(l++,e.consume(I),p):l<3?n(I):(e.exit("codeFencedFenceSequence"),Ye(I)?Je(e,m,"whitespace")(I):m(I))}function m(I){return I===null||Ae(I)?(e.exit("codeFencedFence"),r.interrupt?t(I):e.check(vg,S,O)(I)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(I))}function y(I){return I===null||Ae(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(I)):Ye(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,b,"whitespace")(I)):I===96&&I===u?n(I):(e.consume(I),y)}function b(I){return I===null||Ae(I)?m(I):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(I))}function w(I){return I===null||Ae(I)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(I)):I===96&&I===u?n(I):(e.consume(I),w)}function S(I){return e.attempt(o,O,k)(I)}function k(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),E}function E(I){return a>0&&Ye(I)?Je(e,T,"linePrefix",a+1)(I):T(I)}function T(I){return I===null||Ae(I)?e.check(vg,S,O)(I):(e.enter("codeFlowValue"),N(I))}function N(I){return I===null||Ae(I)?(e.exit("codeFlowValue"),T(I)):(e.consume(I),N)}function O(I){return e.exit("codeFenced"),t(I)}function K(I,re,Z){let F=0;return L;function L(P){return I.enter("lineEnding"),I.consume(P),I.exit("lineEnding"),X}function X(P){return I.enter("codeFencedFence"),Ye(P)?Je(I,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):W(P)}function W(P){return P===u?(I.enter("codeFencedFenceSequence"),j(P)):Z(P)}function j(P){return P===u?(F++,I.consume(P),j):F>=l?(I.exit("codeFencedFenceSequence"),Ye(P)?Je(I,$,"whitespace")(P):$(P)):Z(P)}function $(P){return P===null||Ae(P)?(I.exit("codeFencedFence"),re(P)):Z(P)}}}function bx(e,t,n){const r=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const hh={name:"codeIndented",tokenize:wx},Sx={partial:!0,tokenize:xx};function wx(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Je(e,a,"linePrefix",5)(h)}function a(h){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?d(h):Ae(h)?e.attempt(Sx,l,d)(h):(e.enter("codeFlowValue"),u(h))}function u(h){return h===null||Ae(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),u)}function d(h){return e.exit("codeIndented"),t(h)}}function xx(e,t,n){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?n(l):Ae(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):Je(e,a,"linePrefix",5)(l)}function a(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):Ae(l)?o(l):n(l)}}const kx={name:"codeText",previous:Cx,resolve:Ex,tokenize:Nx};function Ex(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function Cx(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Nx(e,t,n){let r=0,o,a;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),u(m)}function u(m){return m===96?(e.consume(m),r++,u):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),o=0,p(m)):Ae(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||Ae(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),h)}function p(m){return m===96?(e.consume(m),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",h(m))}}class Tx{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Fo(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Fo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Fo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Fo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Fo(this.left,n.reverse())}}}function Fo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Bv(e){const t={};let n=-1,r,o,a,l,u,d,h;const p=new Tx(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Rx(p,n)),n=t[n],h=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(l=p.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(r[1].end={...p.get(o)[1].start},u=p.slice(o,n),u.unshift(r),p.splice(o,n-o+1,u))}}return Wn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function Rx(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const u=l.events,d=[],h={};let p,m,y=-1,b=n,w=0,S=0;const k=[S];for(;b;){for(;e.get(++o)[1]!==b;);a.push(o),b._tokenizer||(p=r.sliceStream(b),b.next||p.push(null),m&&l.defineSkip(b.start),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=b,b=b.next}for(b=n;++y<u.length;)u[y][0]==="exit"&&u[y-1][0]==="enter"&&u[y][1].type===u[y-1][1].type&&u[y][1].start.line!==u[y][1].end.line&&(S=y+1,k.push(S),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(l.events=[],b?(b._tokenizer=void 0,b.previous=void 0):k.pop(),y=k.length;y--;){const E=u.slice(k[y],k[y+1]),T=a.pop();d.push([T,T+E.length-1]),e.splice(T,2,E)}for(d.reverse(),y=-1;++y<d.length;)h[w+d[y][0]]=w+d[y][1],w+=d[y][1]-d[y][0]-1;return h}const Mx={resolve:Ox,tokenize:Lx},Ax={partial:!0,tokenize:Ix};function Ox(e){return Bv(e),e}function Lx(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(u)}function o(u){return u===null?a(u):Ae(u)?e.check(Ax,l,a)(u):(e.consume(u),o)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function Ix(e,t,n){const r=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Je(e,a,"linePrefix")}function a(l){if(l===null||Ae(l))return n(l);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Fv(e,t,n,r,o,a,l,u,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(E){return E===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(E),e.exit(a),y):E===null||E===32||E===41||Zl(E)?n(E):(e.enter(r),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),S(E))}function y(E){return E===62?(e.enter(a),e.consume(E),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),b(E))}function b(E){return E===62?(e.exit("chunkString"),e.exit(u),y(E)):E===null||E===60||Ae(E)?n(E):(e.consume(E),E===92?w:b)}function w(E){return E===60||E===62||E===92?(e.consume(E),b):b(E)}function S(E){return!p&&(E===null||E===41||ct(E))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(r),t(E)):p<h&&E===40?(e.consume(E),p++,S):E===41?(e.consume(E),p--,S):E===null||E===32||E===40||Zl(E)?n(E):(e.consume(E),E===92?k:S)}function k(E){return E===40||E===41||E===92?(e.consume(E),S):S(E)}}function zv(e,t,n,r,o,a){const l=this;let u=0,d;return h;function h(b){return e.enter(r),e.enter(o),e.consume(b),e.exit(o),e.enter(a),p}function p(b){return u>999||b===null||b===91||b===93&&!d||b===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(b):b===93?(e.exit(a),e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):Ae(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||b===91||b===93||Ae(b)||u++>999?(e.exit("chunkString"),p(b)):(e.consume(b),d||(d=!Ye(b)),b===92?y:m)}function y(b){return b===91||b===92||b===93?(e.consume(b),u++,m):m(b)}}function Uv(e,t,n,r,o,a){let l;return u;function u(y){return y===34||y===39||y===40?(e.enter(r),e.enter(o),e.consume(y),e.exit(o),l=y===40?41:y,d):n(y)}function d(y){return y===l?(e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):(e.enter(a),h(y))}function h(y){return y===l?(e.exit(a),d(l)):y===null?n(y):Ae(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Je(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===l||y===null||Ae(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?m:p)}function m(y){return y===l||y===92?(e.consume(y),p):p(y)}}function ta(e,t){let n;return r;function r(o){return Ae(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ye(o)?Je(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Dx={name:"definition",tokenize:Bx},Px={partial:!0,tokenize:Fx};function Bx(e,t,n){const r=this;let o;return a;function a(b){return e.enter("definition"),l(b)}function l(b){return zv.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function u(b){return o=_i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):n(b)}function d(b){return ct(b)?ta(e,h)(b):h(b)}function h(b){return Fv(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function p(b){return e.attempt(Px,m,m)(b)}function m(b){return Ye(b)?Je(e,y,"whitespace")(b):y(b)}function y(b){return b===null||Ae(b)?(e.exit("definition"),r.parser.defined.push(o),t(b)):n(b)}}function Fx(e,t,n){return r;function r(u){return ct(u)?ta(e,o)(u):n(u)}function o(u){return Uv(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return Ye(u)?Je(e,l,"whitespace")(u):l(u)}function l(u){return u===null||Ae(u)?t(u):n(u)}}const zx={name:"hardBreakEscape",tokenize:Ux};function Ux(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Ae(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const jx={name:"headingAtx",resolve:Hx,tokenize:$x};function Hx(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Wn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function $x(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&r++<6?(e.consume(p),l):p===null||ct(p)?(e.exit("atxHeadingSequence"),u(p)):n(p)}function u(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Ae(p)?(e.exit("atxHeading"),t(p)):Ye(p)?Je(e,u,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),u(p))}function h(p){return p===null||p===35||ct(p)?(e.exit("atxHeadingText"),u(p)):(e.consume(p),h)}}const Wx=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],bg=["pre","script","style","textarea"],Kx={concrete:!0,name:"htmlFlow",resolveTo:Gx,tokenize:Yx},qx={partial:!0,tokenize:Zx},Vx={partial:!0,tokenize:Xx};function Gx(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Yx(e,t,n){const r=this;let o,a,l,u,d;return h;function h(R){return p(R)}function p(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),m}function m(R){return R===33?(e.consume(R),y):R===47?(e.consume(R),a=!0,S):R===63?(e.consume(R),o=3,r.interrupt?t:C):wn(R)?(e.consume(R),l=String.fromCharCode(R),k):n(R)}function y(R){return R===45?(e.consume(R),o=2,b):R===91?(e.consume(R),o=5,u=0,w):wn(R)?(e.consume(R),o=4,r.interrupt?t:C):n(R)}function b(R){return R===45?(e.consume(R),r.interrupt?t:C):n(R)}function w(R){const ye="CDATA[";return R===ye.charCodeAt(u++)?(e.consume(R),u===ye.length?r.interrupt?t:W:w):n(R)}function S(R){return wn(R)?(e.consume(R),l=String.fromCharCode(R),k):n(R)}function k(R){if(R===null||R===47||R===62||ct(R)){const ye=R===47,Ne=l.toLowerCase();return!ye&&!a&&bg.includes(Ne)?(o=1,r.interrupt?t(R):W(R)):Wx.includes(l.toLowerCase())?(o=6,ye?(e.consume(R),E):r.interrupt?t(R):W(R)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):a?T(R):N(R))}return R===45||pn(R)?(e.consume(R),l+=String.fromCharCode(R),k):n(R)}function E(R){return R===62?(e.consume(R),r.interrupt?t:W):n(R)}function T(R){return Ye(R)?(e.consume(R),T):L(R)}function N(R){return R===47?(e.consume(R),L):R===58||R===95||wn(R)?(e.consume(R),O):Ye(R)?(e.consume(R),N):L(R)}function O(R){return R===45||R===46||R===58||R===95||pn(R)?(e.consume(R),O):K(R)}function K(R){return R===61?(e.consume(R),I):Ye(R)?(e.consume(R),K):N(R)}function I(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),d=R,re):Ye(R)?(e.consume(R),I):Z(R)}function re(R){return R===d?(e.consume(R),d=null,F):R===null||Ae(R)?n(R):(e.consume(R),re)}function Z(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||ct(R)?K(R):(e.consume(R),Z)}function F(R){return R===47||R===62||Ye(R)?N(R):n(R)}function L(R){return R===62?(e.consume(R),X):n(R)}function X(R){return R===null||Ae(R)?W(R):Ye(R)?(e.consume(R),X):n(R)}function W(R){return R===45&&o===2?(e.consume(R),Y):R===60&&o===1?(e.consume(R),te):R===62&&o===4?(e.consume(R),A):R===63&&o===3?(e.consume(R),C):R===93&&o===5?(e.consume(R),ie):Ae(R)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(qx,G,j)(R)):R===null||Ae(R)?(e.exit("htmlFlowData"),j(R)):(e.consume(R),W)}function j(R){return e.check(Vx,$,G)(R)}function $(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),P}function P(R){return R===null||Ae(R)?j(R):(e.enter("htmlFlowData"),W(R))}function Y(R){return R===45?(e.consume(R),C):W(R)}function te(R){return R===47?(e.consume(R),l="",z):W(R)}function z(R){if(R===62){const ye=l.toLowerCase();return bg.includes(ye)?(e.consume(R),A):W(R)}return wn(R)&&l.length<8?(e.consume(R),l+=String.fromCharCode(R),z):W(R)}function ie(R){return R===93?(e.consume(R),C):W(R)}function C(R){return R===62?(e.consume(R),A):R===45&&o===2?(e.consume(R),C):W(R)}function A(R){return R===null||Ae(R)?(e.exit("htmlFlowData"),G(R)):(e.consume(R),A)}function G(R){return e.exit("htmlFlow"),t(R)}}function Xx(e,t,n){const r=this;return o;function o(l){return Ae(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Zx(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(da,t,n)}}const Qx={name:"htmlText",tokenize:Jx};function Jx(e,t,n){const r=this;let o,a,l;return u;function u(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),h):C===47?(e.consume(C),K):C===63?(e.consume(C),N):wn(C)?(e.consume(C),Z):n(C)}function h(C){return C===45?(e.consume(C),p):C===91?(e.consume(C),a=0,w):wn(C)?(e.consume(C),T):n(C)}function p(C){return C===45?(e.consume(C),b):n(C)}function m(C){return C===null?n(C):C===45?(e.consume(C),y):Ae(C)?(l=m,te(C)):(e.consume(C),m)}function y(C){return C===45?(e.consume(C),b):m(C)}function b(C){return C===62?Y(C):C===45?y(C):m(C)}function w(C){const A="CDATA[";return C===A.charCodeAt(a++)?(e.consume(C),a===A.length?S:w):n(C)}function S(C){return C===null?n(C):C===93?(e.consume(C),k):Ae(C)?(l=S,te(C)):(e.consume(C),S)}function k(C){return C===93?(e.consume(C),E):S(C)}function E(C){return C===62?Y(C):C===93?(e.consume(C),E):S(C)}function T(C){return C===null||C===62?Y(C):Ae(C)?(l=T,te(C)):(e.consume(C),T)}function N(C){return C===null?n(C):C===63?(e.consume(C),O):Ae(C)?(l=N,te(C)):(e.consume(C),N)}function O(C){return C===62?Y(C):N(C)}function K(C){return wn(C)?(e.consume(C),I):n(C)}function I(C){return C===45||pn(C)?(e.consume(C),I):re(C)}function re(C){return Ae(C)?(l=re,te(C)):Ye(C)?(e.consume(C),re):Y(C)}function Z(C){return C===45||pn(C)?(e.consume(C),Z):C===47||C===62||ct(C)?F(C):n(C)}function F(C){return C===47?(e.consume(C),Y):C===58||C===95||wn(C)?(e.consume(C),L):Ae(C)?(l=F,te(C)):Ye(C)?(e.consume(C),F):Y(C)}function L(C){return C===45||C===46||C===58||C===95||pn(C)?(e.consume(C),L):X(C)}function X(C){return C===61?(e.consume(C),W):Ae(C)?(l=X,te(C)):Ye(C)?(e.consume(C),X):F(C)}function W(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),o=C,j):Ae(C)?(l=W,te(C)):Ye(C)?(e.consume(C),W):(e.consume(C),$)}function j(C){return C===o?(e.consume(C),o=void 0,P):C===null?n(C):Ae(C)?(l=j,te(C)):(e.consume(C),j)}function $(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||ct(C)?F(C):(e.consume(C),$)}function P(C){return C===47||C===62||ct(C)?F(C):n(C)}function Y(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function te(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),z}function z(C){return Ye(C)?Je(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):ie(C)}function ie(C){return e.enter("htmlTextData"),l(C)}}const ef={name:"labelEnd",resolveAll:ik,resolveTo:rk,tokenize:sk},ek={tokenize:ok},tk={tokenize:ak},nk={tokenize:lk};function ik(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Wn(e,0,e.length,n),e}function rk(e,t){let n=e.length,r=0,o,a,l,u;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(l=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},p={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return u=[["enter",d,t],["enter",h,t]],u=ri(u,e.slice(a+1,a+r+3)),u=ri(u,[["enter",p,t]]),u=ri(u,pc(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),u=ri(u,[["exit",p,t],e[l-2],e[l-1],["exit",h,t]]),u=ri(u,e.slice(l+1)),u=ri(u,[["exit",d,t]]),Wn(e,a,e.length,u),e}function sk(e,t,n){const r=this;let o=r.events.length,a,l;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return u;function u(y){return a?a._inactive?m(y):(l=r.parser.defined.includes(_i(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),d):n(y)}function d(y){return y===40?e.attempt(ek,p,l?p:m)(y):y===91?e.attempt(tk,p,l?h:m)(y):l?p(y):m(y)}function h(y){return e.attempt(nk,p,m)(y)}function p(y){return t(y)}function m(y){return a._balanced=!0,n(y)}}function ok(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return ct(m)?ta(e,a)(m):a(m)}function a(m){return m===41?p(m):Fv(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return ct(m)?ta(e,d)(m):p(m)}function u(m){return n(m)}function d(m){return m===34||m===39||m===40?Uv(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function h(m){return ct(m)?ta(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function ak(e,t,n){const r=this;return o;function o(u){return zv.call(r,e,a,l,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(_i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function l(u){return n(u)}}function lk(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const ck={name:"labelStartImage",resolveAll:ef.resolveAll,tokenize:uk};function uk(e,t,n){const r=this;return o;function o(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):n(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const hk={name:"labelStartLink",resolveAll:ef.resolveAll,tokenize:dk};function dk(e,t,n){const r=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const dh={name:"lineEnding",tokenize:fk};function fk(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Je(e,t,"linePrefix")}}const Hl={name:"thematicBreak",tokenize:pk};function pk(e,t,n){let r=0,o;return a;function a(h){return e.enter("thematicBreak"),l(h)}function l(h){return o=h,u(h)}function u(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Ae(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===o?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Ye(h)?Je(e,u,"whitespace")(h):u(h))}}const Ln={continuation:{tokenize:vk},exit:bk,name:"list",tokenize:_k},mk={partial:!0,tokenize:Sk},gk={partial:!0,tokenize:yk};function _k(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return u;function u(b){const w=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:Xh(b)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Hl,n,h)(b):h(b);if(!r.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return n(b)}function d(b){return Xh(b)&&++l<10?(e.consume(b),d):(!r.interrupt||l<2)&&(r.containerState.marker?b===r.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):n(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,e.check(da,r.interrupt?n:p,e.attempt(mk,y,m))}function p(b){return r.containerState.initialBlankLine=!0,a++,y(b)}function m(b){return Ye(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),y):n(b)}function y(b){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function vk(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(da,o,a);function o(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Je(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!Ye(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(gk,t,l)(u))}function l(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Je(e,e.attempt(Ln,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function yk(e,t,n){const r=this;return Je(e,o,"listItemIndent",r.containerState.size+1);function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function bk(e){e.exit(this.containerState.type)}function Sk(e,t,n){const r=this;return Je(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const l=r.events[r.events.length-1];return!Ye(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Sg={name:"setextUnderline",resolveTo:wk,tokenize:xk};function wk(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function xk(e,t,n){const r=this;let o;return a;function a(h){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),o=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),u(h)}function u(h){return h===o?(e.consume(h),u):(e.exit("setextHeadingLineSequence"),Ye(h)?Je(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Ae(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const kk={tokenize:Ek};function Ek(e){const t=this,n=e.attempt(da,r,e.attempt(this.parser.constructs.flowInitial,o,Je(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Mx,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Ck={resolveAll:Hv()},Nk=jv("string"),Tk=jv("text");function jv(e){return{resolveAll:Hv(e==="text"?Rk:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,l,u);return l;function l(p){return h(p)?a(p):u(p)}function u(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const m=o[p];let y=-1;if(m)for(;++y<m.length;){const b=m[y];if(!b.previous||b.previous.call(r,r.previous))return!0}return!1}}}function Hv(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function Rk(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,l=-1,u=0,d;for(;a--;){const h=o[a];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(h===-2)d=!0,u++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const h={type:n===e.length||d||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const Mk={42:Ln,43:Ln,45:Ln,48:Ln,49:Ln,50:Ln,51:Ln,52:Ln,53:Ln,54:Ln,55:Ln,56:Ln,57:Ln,62:Iv},Ak={91:Dx},Ok={[-2]:hh,[-1]:hh,32:hh},Lk={35:jx,42:Hl,45:[Sg,Hl],60:Kx,61:Sg,95:Hl,96:yg,126:yg},Ik={38:Pv,92:Dv},Dk={[-5]:dh,[-4]:dh,[-3]:dh,33:ck,38:Pv,42:Zh,60:[hx,Qx],91:hk,92:[zx,Dv],93:ef,95:Zh,96:kx},Pk={null:[Zh,Ck]},Bk={null:[42,95]},Fk={null:[]},zk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Bk,contentInitial:Ak,disable:Fk,document:Mk,flow:Lk,flowInitial:Ok,insideSpan:Pk,string:Ik,text:Dk},Symbol.toStringTag,{value:"Module"}));function Uk(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let l=[],u=[];const d={attempt:re(K),check:re(I),consume:T,enter:N,exit:O,interrupt:re(I,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:w,parser:e,previous:null,sliceSerialize:y,sliceStream:b,write:m};let p=t.tokenize.call(h,d);return t.resolveAll&&a.push(t),h;function m(X){return l=ri(l,X),k(),l[l.length-1]!==null?[]:(Z(t,0),h.events=pc(a,h.events,h),h.events)}function y(X,W){return Hk(b(X),W)}function b(X){return jk(l,X)}function w(){const{_bufferIndex:X,_index:W,line:j,column:$,offset:P}=r;return{_bufferIndex:X,_index:W,line:j,column:$,offset:P}}function S(X){o[X.line]=X.column,L()}function k(){let X;for(;r._index<l.length;){const W=l[r._index];if(typeof W=="string")for(X=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===X&&r._bufferIndex<W.length;)E(W.charCodeAt(r._bufferIndex));else E(W)}}function E(X){p=p(X)}function T(X){Ae(X)?(r.line++,r.column=1,r.offset+=X===-3?2:1,L()):X!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=X}function N(X,W){const j=W||{};return j.type=X,j.start=w(),h.events.push(["enter",j,h]),u.push(j),j}function O(X){const W=u.pop();return W.end=w(),h.events.push(["exit",W,h]),W}function K(X,W){Z(X,W.from)}function I(X,W){W.restore()}function re(X,W){return j;function j($,P,Y){let te,z,ie,C;return Array.isArray($)?G($):"tokenize"in $?G([$]):A($);function A(_e){return Ue;function Ue(Ie){const je=Ie!==null&&_e[Ie],nt=Ie!==null&&_e.null,Ft=[...Array.isArray(je)?je:je?[je]:[],...Array.isArray(nt)?nt:nt?[nt]:[]];return G(Ft)(Ie)}}function G(_e){return te=_e,z=0,_e.length===0?Y:R(_e[z])}function R(_e){return Ue;function Ue(Ie){return C=F(),ie=_e,_e.partial||(h.currentConstruct=_e),_e.name&&h.parser.constructs.disable.null.includes(_e.name)?Ne():_e.tokenize.call(W?Object.assign(Object.create(h),W):h,d,ye,Ne)(Ie)}}function ye(_e){return X(ie,C),P}function Ne(_e){return C.restore(),++z<te.length?R(te[z]):Y}}}function Z(X,W){X.resolveAll&&!a.includes(X)&&a.push(X),X.resolve&&Wn(h.events,W,h.events.length-W,X.resolve(h.events.slice(W),h)),X.resolveTo&&(h.events=X.resolveTo(h.events,h))}function F(){const X=w(),W=h.previous,j=h.currentConstruct,$=h.events.length,P=Array.from(u);return{from:$,restore:Y};function Y(){r=X,h.previous=W,h.currentConstruct=j,h.events.length=$,u=P,L()}}function L(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function jk(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,a)];else{if(l=e.slice(n,o),r>-1){const u=l[0];typeof u=="string"?l[0]=u.slice(r):l.shift()}a>0&&l.push(e[o].slice(0,a))}return l}function Hk(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
43
43
  `;break}case-3:{l=`\r
@@ -6,7 +6,7 @@
6
6
  <meta name="color-scheme" content="dark" />
7
7
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
8
8
  <title>pi-web-ui — pi 编码智能体</title>
9
- <script type="module" crossorigin src="/assets/index-Cbunl4-1.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-CqRE1kpZ.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="/assets/index-Ton8iALZ.css">
11
11
  </head>
12
12
  <body>