agentroam-runtime-darwin-arm64 0.2.0-preview.13 → 0.2.0-preview.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/runtime/.next/BUILD_ID +1 -1
- package/runtime/.next/app-build-manifest.json +8 -8
- package/runtime/.next/app-path-routes-manifest.json +1 -1
- package/runtime/.next/build-manifest.json +6 -6
- package/runtime/.next/prerender-manifest.json +1 -1
- package/runtime/.next/react-loadable-manifest.json +1 -1
- package/runtime/.next/required-server-files.json +1 -1
- package/runtime/.next/routes-manifest.json +1 -1
- package/runtime/.next/server/app/_not-found/page.js +1 -1
- package/runtime/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/runtime/.next/server/app/_not-found.html +1 -1
- package/runtime/.next/server/app/_not-found.rsc +1 -1
- package/runtime/.next/server/app/api/agent/abort/route.js +1 -1
- package/runtime/.next/server/app/api/agent/answer/route.js +1 -1
- package/runtime/.next/server/app/api/agent/model/route.js +1 -1
- package/runtime/.next/server/app/api/agent/models/route.js +1 -1
- package/runtime/.next/server/app/api/agent/run/route.js +1 -1
- package/runtime/.next/server/app/api/agent/runtime-health/route.js +1 -1
- package/runtime/.next/server/app/api/agent/steer/route.js +1 -1
- package/runtime/.next/server/app/api/agent/stream/route.js +4 -4
- package/runtime/.next/server/app/api/agent-workspaces/[workspaceId]/sessions/route.js +1 -1
- package/runtime/.next/server/app/api/agent-workspaces/route.js +1 -1
- package/runtime/.next/server/app/api/auth/verify/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/connect/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/disconnect/route.js +1 -1
- package/runtime/.next/server/app/api/mcp/servers/route.js +1 -1
- package/runtime/.next/server/app/api/memory/[key]/route.js +1 -1
- package/runtime/.next/server/app/api/memory/route.js +1 -1
- package/runtime/.next/server/app/api/plugins/load/route.js +1 -1
- package/runtime/.next/server/app/api/projects/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/projects/check/route.js +1 -1
- package/runtime/.next/server/app/api/projects/directories/route.js +1 -1
- package/runtime/.next/server/app/api/projects/roots/route.js +1 -1
- package/runtime/.next/server/app/api/projects/route.js +1 -1
- package/runtime/.next/server/app/api/remote-tools/register/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/changes/route.js +2 -2
- package/runtime/.next/server/app/api/sessions/[id]/fork/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/goals/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/handoff/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/query-index/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/release/route.js +1 -0
- package/runtime/.next/server/app/api/sessions/[id]/release/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/runtime/.next/server/app/api/sessions/[id]/tool-result/route.js +1 -0
- package/runtime/.next/server/app/api/sessions/[id]/tool-result/route.js.nft.json +1 -0
- package/runtime/.next/server/app/api/sessions/route.js +1 -1
- package/runtime/.next/server/app/api/skills/route.js +1 -1
- package/runtime/.next/server/app/api/tools/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/login/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/logout/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/revoke-all/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/setup/route.js +1 -1
- package/runtime/.next/server/app/api/web-auth/status/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/bootstrap/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/device-state/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/history/route.js +1 -1
- package/runtime/.next/server/app/api/web-console/preferences/route.js +1 -1
- package/runtime/.next/server/app/web/page.js +11 -8
- package/runtime/.next/server/app/web/page_client-reference-manifest.js +1 -1
- package/runtime/.next/server/app/web.html +1 -1
- package/runtime/.next/server/app/web.rsc +2 -2
- package/runtime/.next/server/app-paths-manifest.json +27 -25
- package/runtime/.next/server/chunks/1322.js +37 -37
- package/runtime/.next/server/chunks/2083.js +12 -12
- package/runtime/.next/server/chunks/5303.js +1 -1
- package/runtime/.next/server/chunks/7186.js +3 -3
- package/runtime/.next/server/middleware-build-manifest.js +1 -1
- package/runtime/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/runtime/.next/server/pages/404.html +1 -1
- package/runtime/.next/server/pages/500.html +1 -1
- package/runtime/.next/server/server-reference-manifest.json +1 -1
- package/runtime/.next/static/chunks/137.e70970795c25de4f.js +1 -0
- package/runtime/.next/static/chunks/919-e3163c9448664f1a.js +1 -0
- package/runtime/.next/static/chunks/app/web/page-f8e555341da23177.js +1 -0
- package/runtime/.next/static/chunks/main-app-07d67f2d4e96ecb8.js +1 -0
- package/runtime/.next/static/chunks/{webpack-d22db940097662ef.js → webpack-819dfd677dd52477.js} +1 -1
- package/runtime/lib/file-preview-service.mjs +29 -0
- package/runtime/lib/markdown-preview.mjs +65 -0
- package/runtime/node_modules/.package-lock.json +23 -11
- package/runtime/node_modules/@agent/core/dist/domain/agent/entities.d.ts +3 -0
- package/runtime/node_modules/@agent/core/dist/domain/agent/entities.d.ts.map +1 -1
- package/runtime/node_modules/@agent/core/dist/domain/model/entities.d.ts +7 -0
- package/runtime/node_modules/@agent/core/dist/domain/model/entities.d.ts.map +1 -1
- package/runtime/node_modules/@agent/core/dist/domain/session/entities.d.ts +16 -0
- package/runtime/node_modules/@agent/core/dist/domain/session/entities.d.ts.map +1 -1
- package/runtime/node_modules/@agent/core/dist/domain/session/index.d.ts +2 -2
- package/runtime/node_modules/@agent/core/dist/domain/session/index.d.ts.map +1 -1
- package/runtime/node_modules/@agent/core/dist/index.js +2 -1
- package/runtime/node_modules/@agent/core/dist/index.js.map +1 -1
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/bridge.mjs +39 -39
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/browser-sdk.js +1 -1
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.json +18 -20
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.zst.json +23 -25
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/package.json +10 -10
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +41 -41
- package/runtime/node_modules/marked/LICENSE.md +44 -0
- package/runtime/node_modules/marked/README.md +106 -0
- package/runtime/node_modules/marked/bin/main.js +282 -0
- package/runtime/node_modules/marked/bin/marked.js +15 -0
- package/runtime/node_modules/marked/lib/marked.cjs +2211 -0
- package/runtime/node_modules/marked/lib/marked.d.cts +728 -0
- package/runtime/node_modules/marked/lib/marked.esm.js +2189 -0
- package/runtime/node_modules/marked/lib/marked.umd.js +2213 -0
- package/runtime/node_modules/marked/man/marked.1 +111 -0
- package/runtime/node_modules/marked/man/marked.1.md +92 -0
- package/runtime/node_modules/marked/marked.min.js +69 -0
- package/runtime/node_modules/marked/package.json +111 -0
- package/runtime/package-lock.json +48 -35
- package/runtime/package.json +1 -0
- package/runtime/webapp/dist/assets/App-u5-hbDMQ.js +285 -0
- package/runtime/webapp/dist/assets/index-3s0r60kD.css +1 -0
- package/runtime/webapp/dist/assets/{index-BAH3pT_c.js → index-jGt09xOx.js} +2 -2
- package/runtime/webapp/dist/index.html +2 -2
- package/runtime/ws-server.mjs +13 -0
- package/runtime/.next/static/chunks/108-bc4a0fe192dfff08.js +0 -1
- package/runtime/.next/static/chunks/137.261fab9d606d75d3.js +0 -1
- package/runtime/.next/static/chunks/app/web/page-8e4da33d77868123.js +0 -1
- package/runtime/.next/static/chunks/main-app-3596fd7d2841e9a3.js +0 -1
- package/runtime/webapp/dist/assets/App-CZspcejP.js +0 -275
- package/runtime/webapp/dist/assets/index-lt5J4xDf.css +0 -1
- /package/runtime/.next/static/{iaxCayE60RyqJY_Zj-OjS → 1LC7dx7c9RaWO6oZD2h4N}/_buildManifest.js +0 -0
- /package/runtime/.next/static/{iaxCayE60RyqJY_Zj-OjS → 1LC7dx7c9RaWO6oZD2h4N}/_ssgManifest.js +0 -0
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
`+l[o].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=o&&0<=u);break}}}finally{Rl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?yn(e):""}function uf(e){switch(e.tag){case 5:return yn(e.type);case 16:return yn("Lazy");case 13:return yn("Suspense");case 19:return yn("SuspenseList");case 0:case 2:case 15:return e=Nl(e.type,!1),e;case 11:return e=Nl(e.type.render,!1),e;case 1:return e=Nl(e.type,!0),e;default:return""}}function ii(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case jt:return"Fragment";case zt:return"Portal";case ni:return"Profiler";case eo:return"StrictMode";case ri:return"Suspense";case li:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case xs:return(e.displayName||"Context")+".Consumer";case _s:return(e._context.displayName||"Context")+".Provider";case to:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case no:return t=e.displayName||null,t!==null?t:ii(e.type)||"Memo";case Je:t=e._payload,e=e._init;try{return ii(e(t))}catch{}}return null}function sf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ii(t);case 8:return t===eo?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ct(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Cs(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function af(e){var t=Cs(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function lr(e){e._valueTracker||(e._valueTracker=af(e))}function Rs(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Cs(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Dr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function oi(e,t){var n=t.checked;return A({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Jo(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ct(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ns(e,t){t=t.checked,t!=null&&bi(e,"checked",t,!1)}function ui(e,t){Ns(e,t);var n=ct(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?si(e,t.type,n):t.hasOwnProperty("defaultValue")&&si(e,t.type,ct(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zo(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function si(e,t,n){(t!=="number"||Dr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var wn=Array.isArray;function Vt(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ct(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function ai(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(S(91));return A({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function qo(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(S(92));if(wn(n)){if(1<n.length)throw Error(S(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ct(n)}}function Is(e,t){var n=ct(t.value),r=ct(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function bo(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ts(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ci(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ts(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ir,Ls=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ir=ir||document.createElement("div"),ir.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ir.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var En={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},cf=["Webkit","ms","Moz","O"];Object.keys(En).forEach(function(e){cf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),En[t]=En[e]})});function zs(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||En.hasOwnProperty(e)&&En[e]?(""+t).trim():t+"px"}function js(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=zs(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var ff=A({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 fi(e,t){if(t){if(ff[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(S(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(S(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(S(61))}if(t.style!=null&&typeof t.style!="object")throw Error(S(62))}}function di(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var pi=null;function ro(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hi=null,Qt=null,Kt=null;function eu(e){if(e=qn(e)){if(typeof hi!="function")throw Error(S(280));var t=e.stateNode;t&&(t=al(t),hi(e.stateNode,e.type,t))}}function Ds(e){Qt?Kt?Kt.push(e):Kt=[e]:Qt=e}function Ms(){if(Qt){var e=Qt,t=Kt;if(Kt=Qt=null,eu(e),t)for(e=0;e<t.length;e++)eu(t[e])}}function Os(e,t){return e(t)}function Us(){}var Il=!1;function Fs(e,t,n){if(Il)return e(t,n);Il=!0;try{return Os(e,t,n)}finally{Il=!1,(Qt!==null||Kt!==null)&&(Us(),Ms())}}function jn(e,t){var n=e.stateNode;if(n===null)return null;var r=al(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(S(231,t,typeof n));return n}var mi=!1;if(Ve)try{var fn={};Object.defineProperty(fn,"passive",{get:function(){mi=!0}}),window.addEventListener("test",fn,fn),window.removeEventListener("test",fn,fn)}catch{mi=!1}function df(e,t,n,r,l,i,o,u,s){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(h){this.onError(h)}}var _n=!1,Mr=null,Or=!1,vi=null,pf={onError:function(e){_n=!0,Mr=e}};function hf(e,t,n,r,l,i,o,u,s){_n=!1,Mr=null,df.apply(pf,arguments)}function mf(e,t,n,r,l,i,o,u,s){if(hf.apply(this,arguments),_n){if(_n){var c=Mr;_n=!1,Mr=null}else throw Error(S(198));Or||(Or=!0,vi=c)}}function Tt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function $s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function tu(e){if(Tt(e)!==e)throw Error(S(188))}function vf(e){var t=e.alternate;if(!t){if(t=Tt(e),t===null)throw Error(S(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var i=l.alternate;if(i===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return tu(l),e;if(i===r)return tu(l),t;i=i.sibling}throw Error(S(188))}if(n.return!==r.return)n=l,r=i;else{for(var o=!1,u=l.child;u;){if(u===n){o=!0,n=l,r=i;break}if(u===r){o=!0,r=l,n=i;break}u=u.sibling}if(!o){for(u=i.child;u;){if(u===n){o=!0,n=i,r=l;break}if(u===r){o=!0,r=i,n=l;break}u=u.sibling}if(!o)throw Error(S(189))}}if(n.alternate!==r)throw Error(S(190))}if(n.tag!==3)throw Error(S(188));return n.stateNode.current===n?e:t}function As(e){return e=vf(e),e!==null?Ws(e):null}function Ws(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ws(e);if(t!==null)return t;e=e.sibling}return null}var Bs=ve.unstable_scheduleCallback,nu=ve.unstable_cancelCallback,gf=ve.unstable_shouldYield,yf=ve.unstable_requestPaint,V=ve.unstable_now,wf=ve.unstable_getCurrentPriorityLevel,lo=ve.unstable_ImmediatePriority,Hs=ve.unstable_UserBlockingPriority,Ur=ve.unstable_NormalPriority,Sf=ve.unstable_LowPriority,Vs=ve.unstable_IdlePriority,il=null,Oe=null;function kf(e){if(Oe&&typeof Oe.onCommitFiberRoot=="function")try{Oe.onCommitFiberRoot(il,e,void 0,(e.current.flags&128)===128)}catch{}}var Te=Math.clz32?Math.clz32:xf,Ef=Math.log,_f=Math.LN2;function xf(e){return e>>>=0,e===0?32:31-(Ef(e)/_f|0)|0}var or=64,ur=4194304;function Sn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Fr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var u=o&~l;u!==0?r=Sn(u):(i&=o,i!==0&&(r=Sn(i)))}else o=n&~l,o!==0?r=Sn(o):i!==0&&(r=Sn(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Te(t),l=1<<n,r|=e[n],t&=~l;return r}function Pf(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Cf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Te(i),u=1<<o,s=l[o];s===-1?(!(u&n)||u&r)&&(l[o]=Pf(u,t)):s<=t&&(e.expiredLanes|=u),i&=~u}}function gi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Qs(){var e=or;return or<<=1,!(or&4194240)&&(or=64),e}function Tl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Jn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Te(t),e[t]=n}function Rf(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var l=31-Te(n),i=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~i}}function io(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Te(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var j=0;function Ks(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Ys,oo,Xs,Gs,Js,yi=!1,sr=[],nt=null,rt=null,lt=null,Dn=new Map,Mn=new Map,qe=[],Nf="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 ru(e,t){switch(e){case"focusin":case"focusout":nt=null;break;case"dragenter":case"dragleave":rt=null;break;case"mouseover":case"mouseout":lt=null;break;case"pointerover":case"pointerout":Dn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mn.delete(t.pointerId)}}function dn(e,t,n,r,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[l]},t!==null&&(t=qn(t),t!==null&&oo(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function If(e,t,n,r,l){switch(t){case"focusin":return nt=dn(nt,e,t,n,r,l),!0;case"dragenter":return rt=dn(rt,e,t,n,r,l),!0;case"mouseover":return lt=dn(lt,e,t,n,r,l),!0;case"pointerover":var i=l.pointerId;return Dn.set(i,dn(Dn.get(i)||null,e,t,n,r,l)),!0;case"gotpointercapture":return i=l.pointerId,Mn.set(i,dn(Mn.get(i)||null,e,t,n,r,l)),!0}return!1}function Zs(e){var t=wt(e.target);if(t!==null){var n=Tt(t);if(n!==null){if(t=n.tag,t===13){if(t=$s(n),t!==null){e.blockedOn=t,Js(e.priority,function(){Xs(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wi(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);pi=r,n.target.dispatchEvent(r),pi=null}else return t=qn(n),t!==null&&oo(t),e.blockedOn=n,!1;t.shift()}return!0}function lu(e,t,n){xr(e)&&n.delete(t)}function Tf(){yi=!1,nt!==null&&xr(nt)&&(nt=null),rt!==null&&xr(rt)&&(rt=null),lt!==null&&xr(lt)&&(lt=null),Dn.forEach(lu),Mn.forEach(lu)}function pn(e,t){e.blockedOn===t&&(e.blockedOn=null,yi||(yi=!0,ve.unstable_scheduleCallback(ve.unstable_NormalPriority,Tf)))}function On(e){function t(l){return pn(l,e)}if(0<sr.length){pn(sr[0],e);for(var n=1;n<sr.length;n++){var r=sr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(nt!==null&&pn(nt,e),rt!==null&&pn(rt,e),lt!==null&&pn(lt,e),Dn.forEach(t),Mn.forEach(t),n=0;n<qe.length;n++)r=qe[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<qe.length&&(n=qe[0],n.blockedOn===null);)Zs(n),n.blockedOn===null&&qe.shift()}var Yt=Xe.ReactCurrentBatchConfig,$r=!0;function Lf(e,t,n,r){var l=j,i=Yt.transition;Yt.transition=null;try{j=1,uo(e,t,n,r)}finally{j=l,Yt.transition=i}}function zf(e,t,n,r){var l=j,i=Yt.transition;Yt.transition=null;try{j=4,uo(e,t,n,r)}finally{j=l,Yt.transition=i}}function uo(e,t,n,r){if($r){var l=wi(e,t,n,r);if(l===null)Al(e,t,r,Ar,n),ru(e,r);else if(If(l,e,t,n,r))r.stopPropagation();else if(ru(e,r),t&4&&-1<Nf.indexOf(e)){for(;l!==null;){var i=qn(l);if(i!==null&&Ys(i),i=wi(e,t,n,r),i===null&&Al(e,t,r,Ar,n),i===l)break;l=i}l!==null&&r.stopPropagation()}else Al(e,t,r,null,n)}}var Ar=null;function wi(e,t,n,r){if(Ar=null,e=ro(r),e=wt(e),e!==null)if(t=Tt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=$s(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ar=e,null}function qs(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(wf()){case lo:return 1;case Hs:return 4;case Ur:case Sf:return 16;case Vs:return 536870912;default:return 16}default:return 16}}var et=null,so=null,Pr=null;function bs(){if(Pr)return Pr;var e,t=so,n=t.length,r,l="value"in et?et.value:et.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===l[i-r];r++);return Pr=l.slice(e,1<r?1-r:void 0)}function Cr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ar(){return!0}function iu(){return!1}function ye(e){function t(n,r,l,i,o){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(i):i[u]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ar:iu,this.isPropagationStopped=iu,this}return A(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ar)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ar)},persist:function(){},isPersistent:ar}),t}var on={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ao=ye(on),Zn=A({},on,{view:0,detail:0}),jf=ye(Zn),Ll,zl,hn,ol=A({},Zn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:co,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==hn&&(hn&&e.type==="mousemove"?(Ll=e.screenX-hn.screenX,zl=e.screenY-hn.screenY):zl=Ll=0,hn=e),Ll)},movementY:function(e){return"movementY"in e?e.movementY:zl}}),ou=ye(ol),Df=A({},ol,{dataTransfer:0}),Mf=ye(Df),Of=A({},Zn,{relatedTarget:0}),jl=ye(Of),Uf=A({},on,{animationName:0,elapsedTime:0,pseudoElement:0}),Ff=ye(Uf),$f=A({},on,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Af=ye($f),Wf=A({},on,{data:0}),uu=ye(Wf),Bf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hf={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"},Vf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Qf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vf[e])?!!t[e]:!1}function co(){return Qf}var Kf=A({},Zn,{key:function(e){if(e.key){var t=Bf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Cr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Hf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:co,charCode:function(e){return e.type==="keypress"?Cr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Cr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Yf=ye(Kf),Xf=A({},ol,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),su=ye(Xf),Gf=A({},Zn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:co}),Jf=ye(Gf),Zf=A({},on,{propertyName:0,elapsedTime:0,pseudoElement:0}),qf=ye(Zf),bf=A({},ol,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ed=ye(bf),td=[9,13,27,32],fo=Ve&&"CompositionEvent"in window,xn=null;Ve&&"documentMode"in document&&(xn=document.documentMode);var nd=Ve&&"TextEvent"in window&&!xn,ea=Ve&&(!fo||xn&&8<xn&&11>=xn),au=" ",cu=!1;function ta(e,t){switch(e){case"keyup":return td.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function na(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dt=!1;function rd(e,t){switch(e){case"compositionend":return na(t);case"keypress":return t.which!==32?null:(cu=!0,au);case"textInput":return e=t.data,e===au&&cu?null:e;default:return null}}function ld(e,t){if(Dt)return e==="compositionend"||!fo&&ta(e,t)?(e=bs(),Pr=so=et=null,Dt=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ea&&t.locale!=="ko"?null:t.data;default:return null}}var id={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 fu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!id[e.type]:t==="textarea"}function ra(e,t,n,r){Ds(r),t=Wr(t,"onChange"),0<t.length&&(n=new ao("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Pn=null,Un=null;function od(e){ha(e,0)}function ul(e){var t=Ut(e);if(Rs(t))return e}function ud(e,t){if(e==="change")return t}var la=!1;if(Ve){var Dl;if(Ve){var Ml="oninput"in document;if(!Ml){var du=document.createElement("div");du.setAttribute("oninput","return;"),Ml=typeof du.oninput=="function"}Dl=Ml}else Dl=!1;la=Dl&&(!document.documentMode||9<document.documentMode)}function pu(){Pn&&(Pn.detachEvent("onpropertychange",ia),Un=Pn=null)}function ia(e){if(e.propertyName==="value"&&ul(Un)){var t=[];ra(t,Un,e,ro(e)),Fs(od,t)}}function sd(e,t,n){e==="focusin"?(pu(),Pn=t,Un=n,Pn.attachEvent("onpropertychange",ia)):e==="focusout"&&pu()}function ad(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ul(Un)}function cd(e,t){if(e==="click")return ul(t)}function fd(e,t){if(e==="input"||e==="change")return ul(t)}function dd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ze=typeof Object.is=="function"?Object.is:dd;function Fn(e,t){if(ze(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!ti.call(t,l)||!ze(e[l],t[l]))return!1}return!0}function hu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mu(e,t){var n=hu(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=hu(n)}}function oa(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?oa(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ua(){for(var e=window,t=Dr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Dr(e.document)}return t}function po(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function pd(e){var t=ua(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&oa(n.ownerDocument.documentElement,n)){if(r!==null&&po(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=mu(n,i);var o=mu(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var hd=Ve&&"documentMode"in document&&11>=document.documentMode,Mt=null,Si=null,Cn=null,ki=!1;function vu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ki||Mt==null||Mt!==Dr(r)||(r=Mt,"selectionStart"in r&&po(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Cn&&Fn(Cn,r)||(Cn=r,r=Wr(Si,"onSelect"),0<r.length&&(t=new ao("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Mt)))}function cr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ot={animationend:cr("Animation","AnimationEnd"),animationiteration:cr("Animation","AnimationIteration"),animationstart:cr("Animation","AnimationStart"),transitionend:cr("Transition","TransitionEnd")},Ol={},sa={};Ve&&(sa=document.createElement("div").style,"AnimationEvent"in window||(delete Ot.animationend.animation,delete Ot.animationiteration.animation,delete Ot.animationstart.animation),"TransitionEvent"in window||delete Ot.transitionend.transition);function sl(e){if(Ol[e])return Ol[e];if(!Ot[e])return e;var t=Ot[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in sa)return Ol[e]=t[n];return e}var aa=sl("animationend"),ca=sl("animationiteration"),fa=sl("animationstart"),da=sl("transitionend"),pa=new Map,gu="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 dt(e,t){pa.set(e,t),It(t,[e])}for(var Ul=0;Ul<gu.length;Ul++){var Fl=gu[Ul],md=Fl.toLowerCase(),vd=Fl[0].toUpperCase()+Fl.slice(1);dt(md,"on"+vd)}dt(aa,"onAnimationEnd");dt(ca,"onAnimationIteration");dt(fa,"onAnimationStart");dt("dblclick","onDoubleClick");dt("focusin","onFocus");dt("focusout","onBlur");dt(da,"onTransitionEnd");Jt("onMouseEnter",["mouseout","mouseover"]);Jt("onMouseLeave",["mouseout","mouseover"]);Jt("onPointerEnter",["pointerout","pointerover"]);Jt("onPointerLeave",["pointerout","pointerover"]);It("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));It("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));It("onBeforeInput",["compositionend","keypress","textInput","paste"]);It("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));It("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));It("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kn="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(" "),gd=new Set("cancel close invalid load scroll toggle".split(" ").concat(kn));function yu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,mf(r,t,void 0,e),e.currentTarget=null}function ha(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var u=r[o],s=u.instance,c=u.currentTarget;if(u=u.listener,s!==i&&l.isPropagationStopped())break e;yu(l,u,c),i=s}else for(o=0;o<r.length;o++){if(u=r[o],s=u.instance,c=u.currentTarget,u=u.listener,s!==i&&l.isPropagationStopped())break e;yu(l,u,c),i=s}}}if(Or)throw e=vi,Or=!1,vi=null,e}function M(e,t){var n=t[Ci];n===void 0&&(n=t[Ci]=new Set);var r=e+"__bubble";n.has(r)||(ma(t,e,2,!1),n.add(r))}function $l(e,t,n){var r=0;t&&(r|=4),ma(n,e,r,t)}var fr="_reactListening"+Math.random().toString(36).slice(2);function $n(e){if(!e[fr]){e[fr]=!0,Es.forEach(function(n){n!=="selectionchange"&&(gd.has(n)||$l(n,!1,e),$l(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fr]||(t[fr]=!0,$l("selectionchange",!1,t))}}function ma(e,t,n,r){switch(qs(t)){case 1:var l=Lf;break;case 4:l=zf;break;default:l=uo}n=l.bind(null,t,n,e),l=void 0,!mi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Al(e,t,n,r,l){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var u=r.stateNode.containerInfo;if(u===l||u.nodeType===8&&u.parentNode===l)break;if(o===4)for(o=r.return;o!==null;){var s=o.tag;if((s===3||s===4)&&(s=o.stateNode.containerInfo,s===l||s.nodeType===8&&s.parentNode===l))return;o=o.return}for(;u!==null;){if(o=wt(u),o===null)return;if(s=o.tag,s===5||s===6){r=i=o;continue e}u=u.parentNode}}r=r.return}Fs(function(){var c=i,h=ro(n),v=[];e:{var p=pa.get(e);if(p!==void 0){var g=ao,m=e;switch(e){case"keypress":if(Cr(n)===0)break e;case"keydown":case"keyup":g=Yf;break;case"focusin":m="focus",g=jl;break;case"focusout":m="blur",g=jl;break;case"beforeblur":case"afterblur":g=jl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=ou;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=Mf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=Jf;break;case aa:case ca:case fa:g=Ff;break;case da:g=qf;break;case"scroll":g=jf;break;case"wheel":g=ed;break;case"copy":case"cut":case"paste":g=Af;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=su}var y=(t&4)!==0,k=!y&&e==="scroll",f=y?p!==null?p+"Capture":null:p;y=[];for(var a=c,d;a!==null;){d=a;var w=d.stateNode;if(d.tag===5&&w!==null&&(d=w,f!==null&&(w=jn(a,f),w!=null&&y.push(An(a,w,d)))),k)break;a=a.return}0<y.length&&(p=new g(p,m,null,n,h),v.push({event:p,listeners:y}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",p&&n!==pi&&(m=n.relatedTarget||n.fromElement)&&(wt(m)||m[Qe]))break e;if((g||p)&&(p=h.window===h?h:(p=h.ownerDocument)?p.defaultView||p.parentWindow:window,g?(m=n.relatedTarget||n.toElement,g=c,m=m?wt(m):null,m!==null&&(k=Tt(m),m!==k||m.tag!==5&&m.tag!==6)&&(m=null)):(g=null,m=c),g!==m)){if(y=ou,w="onMouseLeave",f="onMouseEnter",a="mouse",(e==="pointerout"||e==="pointerover")&&(y=su,w="onPointerLeave",f="onPointerEnter",a="pointer"),k=g==null?p:Ut(g),d=m==null?p:Ut(m),p=new y(w,a+"leave",g,n,h),p.target=k,p.relatedTarget=d,w=null,wt(h)===c&&(y=new y(f,a+"enter",m,n,h),y.target=d,y.relatedTarget=k,w=y),k=w,g&&m)t:{for(y=g,f=m,a=0,d=y;d;d=Lt(d))a++;for(d=0,w=f;w;w=Lt(w))d++;for(;0<a-d;)y=Lt(y),a--;for(;0<d-a;)f=Lt(f),d--;for(;a--;){if(y===f||f!==null&&y===f.alternate)break t;y=Lt(y),f=Lt(f)}y=null}else y=null;g!==null&&wu(v,p,g,y,!1),m!==null&&k!==null&&wu(v,k,m,y,!0)}}e:{if(p=c?Ut(c):window,g=p.nodeName&&p.nodeName.toLowerCase(),g==="select"||g==="input"&&p.type==="file")var E=ud;else if(fu(p))if(la)E=fd;else{E=ad;var P=sd}else(g=p.nodeName)&&g.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(E=cd);if(E&&(E=E(e,c))){ra(v,E,n,h);break e}P&&P(e,p,c),e==="focusout"&&(P=p._wrapperState)&&P.controlled&&p.type==="number"&&si(p,"number",p.value)}switch(P=c?Ut(c):window,e){case"focusin":(fu(P)||P.contentEditable==="true")&&(Mt=P,Si=c,Cn=null);break;case"focusout":Cn=Si=Mt=null;break;case"mousedown":ki=!0;break;case"contextmenu":case"mouseup":case"dragend":ki=!1,vu(v,n,h);break;case"selectionchange":if(hd)break;case"keydown":case"keyup":vu(v,n,h)}var C;if(fo)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Dt?ta(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(ea&&n.locale!=="ko"&&(Dt||R!=="onCompositionStart"?R==="onCompositionEnd"&&Dt&&(C=bs()):(et=h,so="value"in et?et.value:et.textContent,Dt=!0)),P=Wr(c,R),0<P.length&&(R=new uu(R,e,null,n,h),v.push({event:R,listeners:P}),C?R.data=C:(C=na(n),C!==null&&(R.data=C)))),(C=nd?rd(e,n):ld(e,n))&&(c=Wr(c,"onBeforeInput"),0<c.length&&(h=new uu("onBeforeInput","beforeinput",null,n,h),v.push({event:h,listeners:c}),h.data=C))}ha(v,t)})}function An(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wr(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,i=l.stateNode;l.tag===5&&i!==null&&(l=i,i=jn(e,n),i!=null&&r.unshift(An(e,i,l)),i=jn(e,t),i!=null&&r.push(An(e,i,l))),e=e.return}return r}function Lt(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function wu(e,t,n,r,l){for(var i=t._reactName,o=[];n!==null&&n!==r;){var u=n,s=u.alternate,c=u.stateNode;if(s!==null&&s===r)break;u.tag===5&&c!==null&&(u=c,l?(s=jn(n,i),s!=null&&o.unshift(An(n,s,u))):l||(s=jn(n,i),s!=null&&o.push(An(n,s,u)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var yd=/\r\n?/g,wd=/\u0000|\uFFFD/g;function Su(e){return(typeof e=="string"?e:""+e).replace(yd,`
|
|
38
38
|
`).replace(wd,"")}function dr(e,t,n){if(t=Su(t),Su(e)!==t&&n)throw Error(S(425))}function Br(){}var Ei=null,_i=null;function xi(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Pi=typeof setTimeout=="function"?setTimeout:void 0,Sd=typeof clearTimeout=="function"?clearTimeout:void 0,ku=typeof Promise=="function"?Promise:void 0,kd=typeof queueMicrotask=="function"?queueMicrotask:typeof ku<"u"?function(e){return ku.resolve(null).then(e).catch(Ed)}:Pi;function Ed(e){setTimeout(function(){throw e})}function Wl(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),On(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);On(t)}function it(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Eu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var un=Math.random().toString(36).slice(2),Me="__reactFiber$"+un,Wn="__reactProps$"+un,Qe="__reactContainer$"+un,Ci="__reactEvents$"+un,_d="__reactListeners$"+un,xd="__reactHandles$"+un;function wt(e){var t=e[Me];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Qe]||n[Me]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Eu(e);e!==null;){if(n=e[Me])return n;e=Eu(e)}return t}e=n,n=e.parentNode}return null}function qn(e){return e=e[Me]||e[Qe],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ut(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(S(33))}function al(e){return e[Wn]||null}var Ri=[],Ft=-1;function pt(e){return{current:e}}function O(e){0>Ft||(e.current=Ri[Ft],Ri[Ft]=null,Ft--)}function D(e,t){Ft++,Ri[Ft]=e.current,e.current=t}var ft={},re=pt(ft),ce=pt(!1),xt=ft;function Zt(e,t){var n=e.type.contextTypes;if(!n)return ft;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function fe(e){return e=e.childContextTypes,e!=null}function Hr(){O(ce),O(re)}function _u(e,t,n){if(re.current!==ft)throw Error(S(168));D(re,t),D(ce,n)}function va(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(S(108,sf(e)||"Unknown",l));return A({},n,r)}function Vr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ft,xt=re.current,D(re,e),D(ce,ce.current),!0}function xu(e,t,n){var r=e.stateNode;if(!r)throw Error(S(169));n?(e=va(e,t,xt),r.__reactInternalMemoizedMergedChildContext=e,O(ce),O(re),D(re,e)):O(ce),D(ce,n)}var $e=null,cl=!1,Bl=!1;function ga(e){$e===null?$e=[e]:$e.push(e)}function Pd(e){cl=!0,ga(e)}function ht(){if(!Bl&&$e!==null){Bl=!0;var e=0,t=j;try{var n=$e;for(j=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}$e=null,cl=!1}catch(l){throw $e!==null&&($e=$e.slice(e+1)),Bs(lo,ht),l}finally{j=t,Bl=!1}}return null}var $t=[],At=0,Qr=null,Kr=0,we=[],Se=0,Pt=null,Ae=1,We="";function gt(e,t){$t[At++]=Kr,$t[At++]=Qr,Qr=e,Kr=t}function ya(e,t,n){we[Se++]=Ae,we[Se++]=We,we[Se++]=Pt,Pt=e;var r=Ae;e=We;var l=32-Te(r)-1;r&=~(1<<l),n+=1;var i=32-Te(t)+l;if(30<i){var o=l-l%5;i=(r&(1<<o)-1).toString(32),r>>=o,l-=o,Ae=1<<32-Te(t)+l|n<<l|r,We=i+e}else Ae=1<<i|n<<l|r,We=e}function ho(e){e.return!==null&&(gt(e,1),ya(e,1,0))}function mo(e){for(;e===Qr;)Qr=$t[--At],$t[At]=null,Kr=$t[--At],$t[At]=null;for(;e===Pt;)Pt=we[--Se],we[Se]=null,We=we[--Se],we[Se]=null,Ae=we[--Se],we[Se]=null}var me=null,he=null,U=!1,Ie=null;function wa(e,t){var n=ke(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Pu(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,me=e,he=it(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,me=e,he=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Pt!==null?{id:Ae,overflow:We}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ke(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,me=e,he=null,!0):!1;default:return!1}}function Ni(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ii(e){if(U){var t=he;if(t){var n=t;if(!Pu(e,t)){if(Ni(e))throw Error(S(418));t=it(n.nextSibling);var r=me;t&&Pu(e,t)?wa(r,n):(e.flags=e.flags&-4097|2,U=!1,me=e)}}else{if(Ni(e))throw Error(S(418));e.flags=e.flags&-4097|2,U=!1,me=e}}}function Cu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;me=e}function pr(e){if(e!==me)return!1;if(!U)return Cu(e),U=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!xi(e.type,e.memoizedProps)),t&&(t=he)){if(Ni(e))throw Sa(),Error(S(418));for(;t;)wa(e,t),t=it(t.nextSibling)}if(Cu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(S(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){he=it(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}he=null}}else he=me?it(e.stateNode.nextSibling):null;return!0}function Sa(){for(var e=he;e;)e=it(e.nextSibling)}function qt(){he=me=null,U=!1}function vo(e){Ie===null?Ie=[e]:Ie.push(e)}var Cd=Xe.ReactCurrentBatchConfig;function mn(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(S(309));var r=n.stateNode}if(!r)throw Error(S(147,e));var l=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var u=l.refs;o===null?delete u[i]:u[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(S(284));if(!n._owner)throw Error(S(290,e))}return e}function hr(e,t){throw e=Object.prototype.toString.call(t),Error(S(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ru(e){var t=e._init;return t(e._payload)}function ka(e){function t(f,a){if(e){var d=f.deletions;d===null?(f.deletions=[a],f.flags|=16):d.push(a)}}function n(f,a){if(!e)return null;for(;a!==null;)t(f,a),a=a.sibling;return null}function r(f,a){for(f=new Map;a!==null;)a.key!==null?f.set(a.key,a):f.set(a.index,a),a=a.sibling;return f}function l(f,a){return f=at(f,a),f.index=0,f.sibling=null,f}function i(f,a,d){return f.index=d,e?(d=f.alternate,d!==null?(d=d.index,d<a?(f.flags|=2,a):d):(f.flags|=2,a)):(f.flags|=1048576,a)}function o(f){return e&&f.alternate===null&&(f.flags|=2),f}function u(f,a,d,w){return a===null||a.tag!==6?(a=Gl(d,f.mode,w),a.return=f,a):(a=l(a,d),a.return=f,a)}function s(f,a,d,w){var E=d.type;return E===jt?h(f,a,d.props.children,w,d.key):a!==null&&(a.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Je&&Ru(E)===a.type)?(w=l(a,d.props),w.ref=mn(f,a,d),w.return=f,w):(w=jr(d.type,d.key,d.props,null,f.mode,w),w.ref=mn(f,a,d),w.return=f,w)}function c(f,a,d,w){return a===null||a.tag!==4||a.stateNode.containerInfo!==d.containerInfo||a.stateNode.implementation!==d.implementation?(a=Jl(d,f.mode,w),a.return=f,a):(a=l(a,d.children||[]),a.return=f,a)}function h(f,a,d,w,E){return a===null||a.tag!==7?(a=_t(d,f.mode,w,E),a.return=f,a):(a=l(a,d),a.return=f,a)}function v(f,a,d){if(typeof a=="string"&&a!==""||typeof a=="number")return a=Gl(""+a,f.mode,d),a.return=f,a;if(typeof a=="object"&&a!==null){switch(a.$$typeof){case rr:return d=jr(a.type,a.key,a.props,null,f.mode,d),d.ref=mn(f,null,a),d.return=f,d;case zt:return a=Jl(a,f.mode,d),a.return=f,a;case Je:var w=a._init;return v(f,w(a._payload),d)}if(wn(a)||cn(a))return a=_t(a,f.mode,d,null),a.return=f,a;hr(f,a)}return null}function p(f,a,d,w){var E=a!==null?a.key:null;if(typeof d=="string"&&d!==""||typeof d=="number")return E!==null?null:u(f,a,""+d,w);if(typeof d=="object"&&d!==null){switch(d.$$typeof){case rr:return d.key===E?s(f,a,d,w):null;case zt:return d.key===E?c(f,a,d,w):null;case Je:return E=d._init,p(f,a,E(d._payload),w)}if(wn(d)||cn(d))return E!==null?null:h(f,a,d,w,null);hr(f,d)}return null}function g(f,a,d,w,E){if(typeof w=="string"&&w!==""||typeof w=="number")return f=f.get(d)||null,u(a,f,""+w,E);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case rr:return f=f.get(w.key===null?d:w.key)||null,s(a,f,w,E);case zt:return f=f.get(w.key===null?d:w.key)||null,c(a,f,w,E);case Je:var P=w._init;return g(f,a,d,P(w._payload),E)}if(wn(w)||cn(w))return f=f.get(d)||null,h(a,f,w,E,null);hr(a,w)}return null}function m(f,a,d,w){for(var E=null,P=null,C=a,R=a=0,B=null;C!==null&&R<d.length;R++){C.index>R?(B=C,C=null):B=C.sibling;var L=p(f,C,d[R],w);if(L===null){C===null&&(C=B);break}e&&C&&L.alternate===null&&t(f,C),a=i(L,a,R),P===null?E=L:P.sibling=L,P=L,C=B}if(R===d.length)return n(f,C),U&>(f,R),E;if(C===null){for(;R<d.length;R++)C=v(f,d[R],w),C!==null&&(a=i(C,a,R),P===null?E=C:P.sibling=C,P=C);return U&>(f,R),E}for(C=r(f,C);R<d.length;R++)B=g(C,f,R,d[R],w),B!==null&&(e&&B.alternate!==null&&C.delete(B.key===null?R:B.key),a=i(B,a,R),P===null?E=B:P.sibling=B,P=B);return e&&C.forEach(function(Pe){return t(f,Pe)}),U&>(f,R),E}function y(f,a,d,w){var E=cn(d);if(typeof E!="function")throw Error(S(150));if(d=E.call(d),d==null)throw Error(S(151));for(var P=E=null,C=a,R=a=0,B=null,L=d.next();C!==null&&!L.done;R++,L=d.next()){C.index>R?(B=C,C=null):B=C.sibling;var Pe=p(f,C,L.value,w);if(Pe===null){C===null&&(C=B);break}e&&C&&Pe.alternate===null&&t(f,C),a=i(Pe,a,R),P===null?E=Pe:P.sibling=Pe,P=Pe,C=B}if(L.done)return n(f,C),U&>(f,R),E;if(C===null){for(;!L.done;R++,L=d.next())L=v(f,L.value,w),L!==null&&(a=i(L,a,R),P===null?E=L:P.sibling=L,P=L);return U&>(f,R),E}for(C=r(f,C);!L.done;R++,L=d.next())L=g(C,f,R,L.value,w),L!==null&&(e&&L.alternate!==null&&C.delete(L.key===null?R:L.key),a=i(L,a,R),P===null?E=L:P.sibling=L,P=L);return e&&C.forEach(function(sn){return t(f,sn)}),U&>(f,R),E}function k(f,a,d,w){if(typeof d=="object"&&d!==null&&d.type===jt&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case rr:e:{for(var E=d.key,P=a;P!==null;){if(P.key===E){if(E=d.type,E===jt){if(P.tag===7){n(f,P.sibling),a=l(P,d.props.children),a.return=f,f=a;break e}}else if(P.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Je&&Ru(E)===P.type){n(f,P.sibling),a=l(P,d.props),a.ref=mn(f,P,d),a.return=f,f=a;break e}n(f,P);break}else t(f,P);P=P.sibling}d.type===jt?(a=_t(d.props.children,f.mode,w,d.key),a.return=f,f=a):(w=jr(d.type,d.key,d.props,null,f.mode,w),w.ref=mn(f,a,d),w.return=f,f=w)}return o(f);case zt:e:{for(P=d.key;a!==null;){if(a.key===P)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){n(f,a.sibling),a=l(a,d.children||[]),a.return=f,f=a;break e}else{n(f,a);break}else t(f,a);a=a.sibling}a=Jl(d,f.mode,w),a.return=f,f=a}return o(f);case Je:return P=d._init,k(f,a,P(d._payload),w)}if(wn(d))return m(f,a,d,w);if(cn(d))return y(f,a,d,w);hr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(n(f,a.sibling),a=l(a,d),a.return=f,f=a):(n(f,a),a=Gl(d,f.mode,w),a.return=f,f=a),o(f)):n(f,a)}return k}var bt=ka(!0),Ea=ka(!1),Yr=pt(null),Xr=null,Wt=null,go=null;function yo(){go=Wt=Xr=null}function wo(e){var t=Yr.current;O(Yr),e._currentValue=t}function Ti(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Xt(e,t){Xr=e,go=Wt=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ae=!0),e.firstContext=null)}function _e(e){var t=e._currentValue;if(go!==e)if(e={context:e,memoizedValue:t,next:null},Wt===null){if(Xr===null)throw Error(S(308));Wt=e,Xr.dependencies={lanes:0,firstContext:e}}else Wt=Wt.next=e;return t}var St=null;function So(e){St===null?St=[e]:St.push(e)}function _a(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,So(t)):(n.next=l.next,l.next=n),t.interleaved=n,Ke(e,r)}function Ke(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ze=!1;function ko(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Be(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ot(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,z&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Ke(e,n)}return l=r.interleaved,l===null?(t.next=t,So(r)):(t.next=l.next,l.next=t),r.interleaved=t,Ke(e,n)}function Rr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,io(e,n)}}function Nu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Gr(e,t,n,r){var l=e.updateQueue;Ze=!1;var i=l.firstBaseUpdate,o=l.lastBaseUpdate,u=l.shared.pending;if(u!==null){l.shared.pending=null;var s=u,c=s.next;s.next=null,o===null?i=c:o.next=c,o=s;var h=e.alternate;h!==null&&(h=h.updateQueue,u=h.lastBaseUpdate,u!==o&&(u===null?h.firstBaseUpdate=c:u.next=c,h.lastBaseUpdate=s))}if(i!==null){var v=l.baseState;o=0,h=c=s=null,u=i;do{var p=u.lane,g=u.eventTime;if((r&p)===p){h!==null&&(h=h.next={eventTime:g,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var m=e,y=u;switch(p=t,g=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){v=m.call(g,v,p);break e}v=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,p=typeof m=="function"?m.call(g,v,p):m,p==null)break e;v=A({},v,p);break e;case 2:Ze=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,p=l.effects,p===null?l.effects=[u]:p.push(u))}else g={eventTime:g,lane:p,tag:u.tag,payload:u.payload,callback:u.callback,next:null},h===null?(c=h=g,s=v):h=h.next=g,o|=p;if(u=u.next,u===null){if(u=l.shared.pending,u===null)break;p=u,u=p.next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}while(!0);if(h===null&&(s=v),l.baseState=s,l.firstBaseUpdate=c,l.lastBaseUpdate=h,t=l.shared.interleaved,t!==null){l=t;do o|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);Rt|=o,e.lanes=o,e.memoizedState=v}}function Iu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(S(191,l));l.call(r)}}}var bn={},Ue=pt(bn),Bn=pt(bn),Hn=pt(bn);function kt(e){if(e===bn)throw Error(S(174));return e}function Eo(e,t){switch(D(Hn,t),D(Bn,e),D(Ue,bn),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ci(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ci(t,e)}O(Ue),D(Ue,t)}function en(){O(Ue),O(Bn),O(Hn)}function Pa(e){kt(Hn.current);var t=kt(Ue.current),n=ci(t,e.type);t!==n&&(D(Bn,e),D(Ue,n))}function _o(e){Bn.current===e&&(O(Ue),O(Bn))}var F=pt(0);function Jr(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Hl=[];function xo(){for(var e=0;e<Hl.length;e++)Hl[e]._workInProgressVersionPrimary=null;Hl.length=0}var Nr=Xe.ReactCurrentDispatcher,Vl=Xe.ReactCurrentBatchConfig,Ct=0,$=null,K=null,G=null,Zr=!1,Rn=!1,Vn=0,Rd=0;function ee(){throw Error(S(321))}function Po(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ze(e[n],t[n]))return!1;return!0}function Co(e,t,n,r,l,i){if(Ct=i,$=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Nr.current=e===null||e.memoizedState===null?Ld:zd,e=n(r,l),Rn){i=0;do{if(Rn=!1,Vn=0,25<=i)throw Error(S(301));i+=1,G=K=null,t.updateQueue=null,Nr.current=jd,e=n(r,l)}while(Rn)}if(Nr.current=qr,t=K!==null&&K.next!==null,Ct=0,G=K=$=null,Zr=!1,t)throw Error(S(300));return e}function Ro(){var e=Vn!==0;return Vn=0,e}function De(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return G===null?$.memoizedState=G=e:G=G.next=e,G}function xe(){if(K===null){var e=$.alternate;e=e!==null?e.memoizedState:null}else e=K.next;var t=G===null?$.memoizedState:G.next;if(t!==null)G=t,K=e;else{if(e===null)throw Error(S(310));K=e,e={memoizedState:K.memoizedState,baseState:K.baseState,baseQueue:K.baseQueue,queue:K.queue,next:null},G===null?$.memoizedState=G=e:G=G.next=e}return G}function Qn(e,t){return typeof t=="function"?t(e):t}function Ql(e){var t=xe(),n=t.queue;if(n===null)throw Error(S(311));n.lastRenderedReducer=e;var r=K,l=r.baseQueue,i=n.pending;if(i!==null){if(l!==null){var o=l.next;l.next=i.next,i.next=o}r.baseQueue=l=i,n.pending=null}if(l!==null){i=l.next,r=r.baseState;var u=o=null,s=null,c=i;do{var h=c.lane;if((Ct&h)===h)s!==null&&(s=s.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var v={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};s===null?(u=s=v,o=r):s=s.next=v,$.lanes|=h,Rt|=h}c=c.next}while(c!==null&&c!==i);s===null?o=r:s.next=u,ze(r,t.memoizedState)||(ae=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=s,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do i=l.lane,$.lanes|=i,Rt|=i,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Kl(e){var t=xe(),n=t.queue;if(n===null)throw Error(S(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,i=t.memoizedState;if(l!==null){n.pending=null;var o=l=l.next;do i=e(i,o.action),o=o.next;while(o!==l);ze(i,t.memoizedState)||(ae=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Ca(){}function Ra(e,t){var n=$,r=xe(),l=t(),i=!ze(r.memoizedState,l);if(i&&(r.memoizedState=l,ae=!0),r=r.queue,No(Ta.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||G!==null&&G.memoizedState.tag&1){if(n.flags|=2048,Kn(9,Ia.bind(null,n,r,l,t),void 0,null),J===null)throw Error(S(349));Ct&30||Na(n,t,l)}return l}function Na(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=$.updateQueue,t===null?(t={lastEffect:null,stores:null},$.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ia(e,t,n,r){t.value=n,t.getSnapshot=r,La(t)&&za(e)}function Ta(e,t,n){return n(function(){La(t)&&za(e)})}function La(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ze(e,n)}catch{return!0}}function za(e){var t=Ke(e,1);t!==null&&Le(t,e,1,-1)}function Tu(e){var t=De();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:e},t.queue=e,e=e.dispatch=Td.bind(null,$,e),[t.memoizedState,e]}function Kn(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=$.updateQueue,t===null?(t={lastEffect:null,stores:null},$.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ja(){return xe().memoizedState}function Ir(e,t,n,r){var l=De();$.flags|=e,l.memoizedState=Kn(1|t,n,void 0,r===void 0?null:r)}function fl(e,t,n,r){var l=xe();r=r===void 0?null:r;var i=void 0;if(K!==null){var o=K.memoizedState;if(i=o.destroy,r!==null&&Po(r,o.deps)){l.memoizedState=Kn(t,n,i,r);return}}$.flags|=e,l.memoizedState=Kn(1|t,n,i,r)}function Lu(e,t){return Ir(8390656,8,e,t)}function No(e,t){return fl(2048,8,e,t)}function Da(e,t){return fl(4,2,e,t)}function Ma(e,t){return fl(4,4,e,t)}function Oa(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ua(e,t,n){return n=n!=null?n.concat([e]):null,fl(4,4,Oa.bind(null,t,e),n)}function Io(){}function Fa(e,t){var n=xe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Po(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function $a(e,t){var n=xe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Po(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Aa(e,t,n){return Ct&21?(ze(n,t)||(n=Qs(),$.lanes|=n,Rt|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ae=!0),e.memoizedState=n)}function Nd(e,t){var n=j;j=n!==0&&4>n?n:4,e(!0);var r=Vl.transition;Vl.transition={};try{e(!1),t()}finally{j=n,Vl.transition=r}}function Wa(){return xe().memoizedState}function Id(e,t,n){var r=st(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ba(e))Ha(t,n);else if(n=_a(e,t,n,r),n!==null){var l=ie();Le(n,e,r,l),Va(n,t,r)}}function Td(e,t,n){var r=st(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ba(e))Ha(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,u=i(o,n);if(l.hasEagerState=!0,l.eagerState=u,ze(u,o)){var s=t.interleaved;s===null?(l.next=l,So(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=_a(e,t,l,r),n!==null&&(l=ie(),Le(n,e,r,l),Va(n,t,r))}}function Ba(e){var t=e.alternate;return e===$||t!==null&&t===$}function Ha(e,t){Rn=Zr=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Va(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,io(e,n)}}var qr={readContext:_e,useCallback:ee,useContext:ee,useEffect:ee,useImperativeHandle:ee,useInsertionEffect:ee,useLayoutEffect:ee,useMemo:ee,useReducer:ee,useRef:ee,useState:ee,useDebugValue:ee,useDeferredValue:ee,useTransition:ee,useMutableSource:ee,useSyncExternalStore:ee,useId:ee,unstable_isNewReconciler:!1},Ld={readContext:_e,useCallback:function(e,t){return De().memoizedState=[e,t===void 0?null:t],e},useContext:_e,useEffect:Lu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ir(4194308,4,Oa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ir(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ir(4,2,e,t)},useMemo:function(e,t){var n=De();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=De();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Id.bind(null,$,e),[r.memoizedState,e]},useRef:function(e){var t=De();return e={current:e},t.memoizedState=e},useState:Tu,useDebugValue:Io,useDeferredValue:function(e){return De().memoizedState=e},useTransition:function(){var e=Tu(!1),t=e[0];return e=Nd.bind(null,e[1]),De().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=$,l=De();if(U){if(n===void 0)throw Error(S(407));n=n()}else{if(n=t(),J===null)throw Error(S(349));Ct&30||Na(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,Lu(Ta.bind(null,r,i,e),[e]),r.flags|=2048,Kn(9,Ia.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=De(),t=J.identifierPrefix;if(U){var n=We,r=Ae;n=(r&~(1<<32-Te(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Vn++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Rd++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},zd={readContext:_e,useCallback:Fa,useContext:_e,useEffect:No,useImperativeHandle:Ua,useInsertionEffect:Da,useLayoutEffect:Ma,useMemo:$a,useReducer:Ql,useRef:ja,useState:function(){return Ql(Qn)},useDebugValue:Io,useDeferredValue:function(e){var t=xe();return Aa(t,K.memoizedState,e)},useTransition:function(){var e=Ql(Qn)[0],t=xe().memoizedState;return[e,t]},useMutableSource:Ca,useSyncExternalStore:Ra,useId:Wa,unstable_isNewReconciler:!1},jd={readContext:_e,useCallback:Fa,useContext:_e,useEffect:No,useImperativeHandle:Ua,useInsertionEffect:Da,useLayoutEffect:Ma,useMemo:$a,useReducer:Kl,useRef:ja,useState:function(){return Kl(Qn)},useDebugValue:Io,useDeferredValue:function(e){var t=xe();return K===null?t.memoizedState=e:Aa(t,K.memoizedState,e)},useTransition:function(){var e=Kl(Qn)[0],t=xe().memoizedState;return[e,t]},useMutableSource:Ca,useSyncExternalStore:Ra,useId:Wa,unstable_isNewReconciler:!1};function Re(e,t){if(e&&e.defaultProps){t=A({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Li(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:A({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var dl={isMounted:function(e){return(e=e._reactInternals)?Tt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ie(),l=st(e),i=Be(r,l);i.payload=t,n!=null&&(i.callback=n),t=ot(e,i,l),t!==null&&(Le(t,e,l,r),Rr(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ie(),l=st(e),i=Be(r,l);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=ot(e,i,l),t!==null&&(Le(t,e,l,r),Rr(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ie(),r=st(e),l=Be(n,r);l.tag=2,t!=null&&(l.callback=t),t=ot(e,l,r),t!==null&&(Le(t,e,r,n),Rr(t,e,r))}};function zu(e,t,n,r,l,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Fn(n,r)||!Fn(l,i):!0}function Qa(e,t,n){var r=!1,l=ft,i=t.contextType;return typeof i=="object"&&i!==null?i=_e(i):(l=fe(t)?xt:re.current,r=t.contextTypes,i=(r=r!=null)?Zt(e,l):ft),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=dl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=i),t}function ju(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&dl.enqueueReplaceState(t,t.state,null)}function zi(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},ko(e);var i=t.contextType;typeof i=="object"&&i!==null?l.context=_e(i):(i=fe(t)?xt:re.current,l.context=Zt(e,i)),l.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Li(e,t,i,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&dl.enqueueReplaceState(l,l.state,null),Gr(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function tn(e,t){try{var n="",r=t;do n+=uf(r),r=r.return;while(r);var l=n}catch(i){l=`
|
|
39
39
|
Error generating stack: `+i.message+`
|
|
40
|
-
`+i.stack}return{value:e,source:t,stack:l,digest:null}}function Yl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ji(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Dd=typeof WeakMap=="function"?WeakMap:Map;function Ka(e,t,n){n=Be(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){el||(el=!0,Hi=r),ji(e,t)},n}function Ya(e,t,n){n=Be(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){ji(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){ji(e,t),typeof r!="function"&&(ut===null?ut=new Set([this]):ut.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Du(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Dd;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Xd.bind(null,e,t,n),t.then(e,e))}function Mu(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ou(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Be(-1,1),t.tag=2,ot(n,t,1))),n.lanes|=1),e)}var Md=Xe.ReactCurrentOwner,ae=!1;function le(e,t,n,r){t.child=e===null?Ea(t,null,n,r):bt(t,e.child,n,r)}function Uu(e,t,n,r,l){n=n.render;var i=t.ref;return Xt(t,l),r=Co(e,t,n,r,i,l),n=Ro(),e!==null&&!ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ye(e,t,l)):(U&&n&&ho(t),t.flags|=1,le(e,t,r,l),t.child)}function Fu(e,t,n,r,l){if(e===null){var i=n.type;return typeof i=="function"&&!Uo(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Xa(e,t,i,r,l)):(e=jr(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&l)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Fn,n(o,r)&&e.ref===t.ref)return Ye(e,t,l)}return t.flags|=1,e=at(i,r),e.ref=t.ref,e.return=t,t.child=e}function Xa(e,t,n,r,l){if(e!==null){var i=e.memoizedProps;if(Fn(i,r)&&e.ref===t.ref)if(ae=!1,t.pendingProps=r=i,(e.lanes&l)!==0)e.flags&131072&&(ae=!0);else return t.lanes=e.lanes,Ye(e,t,l)}return Di(e,t,n,r,l)}function Ga(e,t,n){var r=t.pendingProps,l=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},D(Ht,pe),pe|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,D(Ht,pe),pe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,D(Ht,pe),pe|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,D(Ht,pe),pe|=r;return le(e,t,l,n),t.child}function Ja(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Di(e,t,n,r,l){var i=fe(n)?xt:re.current;return i=Zt(t,i),Xt(t,l),n=Co(e,t,n,r,i,l),r=Ro(),e!==null&&!ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ye(e,t,l)):(U&&r&&ho(t),t.flags|=1,le(e,t,n,l),t.child)}function $u(e,t,n,r,l){if(fe(n)){var i=!0;Vr(t)}else i=!1;if(Xt(t,l),t.stateNode===null)Tr(e,t),Qa(t,n,r),zi(t,n,r,l),r=!0;else if(e===null){var o=t.stateNode,u=t.memoizedProps;o.props=u;var s=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=_e(c):(c=fe(n)?xt:re.current,c=Zt(t,c));var h=n.getDerivedStateFromProps,v=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";v||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==r||s!==c)&&ju(t,o,r,c),Ze=!1;var p=t.memoizedState;o.state=p,Gr(t,r,o,l),s=t.memoizedState,u!==r||p!==s||ce.current||Ze?(typeof h=="function"&&(Li(t,n,h,r),s=t.memoizedState),(u=Ze||zu(t,n,u,r,p,s,c))?(v||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),o.props=r,o.state=s,o.context=c,r=u):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,xa(e,t),u=t.memoizedProps,c=t.type===t.elementType?u:Re(t.type,u),o.props=c,v=t.pendingProps,p=o.context,s=n.contextType,typeof s=="object"&&s!==null?s=_e(s):(s=fe(n)?xt:re.current,s=Zt(t,s));var g=n.getDerivedStateFromProps;(h=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==v||p!==s)&&ju(t,o,r,s),Ze=!1,p=t.memoizedState,o.state=p,Gr(t,r,o,l);var m=t.memoizedState;u!==v||p!==m||ce.current||Ze?(typeof g=="function"&&(Li(t,n,g,r),m=t.memoizedState),(c=Ze||zu(t,n,c,r,p,m,s)||!1)?(h||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,s),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,s)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=s,r=c):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Mi(e,t,n,r,i,l)}function Mi(e,t,n,r,l,i){Ja(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return l&&xu(t,n,!1),Ye(e,t,i);r=t.stateNode,Md.current=t;var u=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=bt(t,e.child,null,i),t.child=bt(t,null,u,i)):le(e,t,u,i),t.memoizedState=r.state,l&&xu(t,n,!0),t.child}function Za(e){var t=e.stateNode;t.pendingContext?_u(e,t.pendingContext,t.pendingContext!==t.context):t.context&&_u(e,t.context,!1),Eo(e,t.containerInfo)}function Au(e,t,n,r,l){return qt(),vo(l),t.flags|=256,le(e,t,n,r),t.child}var Oi={dehydrated:null,treeContext:null,retryLane:0};function Ui(e){return{baseLanes:e,cachePool:null,transitions:null}}function qa(e,t,n){var r=t.pendingProps,l=F.current,i=!1,o=(t.flags&128)!==0,u;if((u=o)||(u=e!==null&&e.memoizedState===null?!1:(l&2)!==0),u?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),D(F,l&1),e===null)return Ii(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=ml(o,r,0,null),e=_t(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Ui(n),t.memoizedState=Oi,e):To(t,o));if(l=e.memoizedState,l!==null&&(u=l.dehydrated,u!==null))return Od(e,t,o,r,u,l,n);if(i){i=r.fallback,o=t.mode,l=e.child,u=l.sibling;var s={mode:"hidden",children:r.children};return!(o&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=at(l,s),r.subtreeFlags=l.subtreeFlags&14680064),u!==null?i=at(u,i):(i=_t(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Ui(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Oi,r}return i=e.child,e=i.sibling,r=at(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function To(e,t){return t=ml({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function mr(e,t,n,r){return r!==null&&vo(r),bt(t,e.child,null,n),e=To(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Od(e,t,n,r,l,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Yl(Error(S(422))),mr(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,l=t.mode,r=ml({mode:"visible",children:r.children},l,0,null),i=_t(i,l,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&bt(t,e.child,null,o),t.child.memoizedState=Ui(o),t.memoizedState=Oi,i);if(!(t.mode&1))return mr(e,t,o,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var u=r.dgst;return r=u,i=Error(S(419)),r=Yl(i,r,void 0),mr(e,t,o,r)}if(u=(o&e.childLanes)!==0,ae||u){if(r=J,r!==null){switch(o&-o){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|o)?0:l,l!==0&&l!==i.retryLane&&(i.retryLane=l,Ke(e,l),Le(r,e,l,-1))}return Oo(),r=Yl(Error(S(421))),mr(e,t,o,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Gd.bind(null,e),l._reactRetry=t,null):(e=i.treeContext,he=it(l.nextSibling),me=t,U=!0,Ie=null,e!==null&&(we[Se++]=Ae,we[Se++]=We,we[Se++]=Pt,Ae=e.id,We=e.overflow,Pt=t),t=To(t,r.children),t.flags|=4096,t)}function Wu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ti(e.return,t,n)}function Xl(e,t,n,r,l){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=l)}function ba(e,t,n){var r=t.pendingProps,l=r.revealOrder,i=r.tail;if(le(e,t,r.children,n),r=F.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wu(e,n,t);else if(e.tag===19)Wu(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(D(F,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Jr(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Xl(t,!1,l,n,i);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Jr(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Xl(t,!0,n,null,i);break;case"together":Xl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Tr(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ye(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Rt|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(S(153));if(t.child!==null){for(e=t.child,n=at(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=at(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ud(e,t,n){switch(t.tag){case 3:Za(t),qt();break;case 5:Pa(t);break;case 1:fe(t.type)&&Vr(t);break;case 4:Eo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;D(Yr,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(D(F,F.current&1),t.flags|=128,null):n&t.child.childLanes?qa(e,t,n):(D(F,F.current&1),e=Ye(e,t,n),e!==null?e.sibling:null);D(F,F.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ba(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),D(F,F.current),r)break;return null;case 22:case 23:return t.lanes=0,Ga(e,t,n)}return Ye(e,t,n)}var ec,Fi,tc,nc;ec=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Fi=function(){};tc=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,kt(Ue.current);var i=null;switch(n){case"input":l=oi(e,l),r=oi(e,r),i=[];break;case"select":l=A({},l,{value:void 0}),r=A({},r,{value:void 0}),i=[];break;case"textarea":l=ai(e,l),r=ai(e,r),i=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Br)}fi(n,r);var o;n=null;for(c in l)if(!r.hasOwnProperty(c)&&l.hasOwnProperty(c)&&l[c]!=null)if(c==="style"){var u=l[c];for(o in u)u.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ln.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var s=r[c];if(u=l!=null?l[c]:void 0,r.hasOwnProperty(c)&&s!==u&&(s!=null||u!=null))if(c==="style")if(u){for(o in u)!u.hasOwnProperty(o)||s&&s.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in s)s.hasOwnProperty(o)&&u[o]!==s[o]&&(n||(n={}),n[o]=s[o])}else n||(i||(i=[]),i.push(c,n)),n=s;else c==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,u=u?u.__html:void 0,s!=null&&u!==s&&(i=i||[]).push(c,s)):c==="children"?typeof s!="string"&&typeof s!="number"||(i=i||[]).push(c,""+s):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ln.hasOwnProperty(c)?(s!=null&&c==="onScroll"&&M("scroll",e),i||u===s||(i=[])):(i=i||[]).push(c,s))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};nc=function(e,t,n,r){n!==r&&(t.flags|=4)};function vn(e,t){if(!U)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function te(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Fd(e,t,n){var r=t.pendingProps;switch(mo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return te(t),null;case 1:return fe(t.type)&&Hr(),te(t),null;case 3:return r=t.stateNode,en(),O(ce),O(re),xo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(pr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ie!==null&&(Ki(Ie),Ie=null))),Fi(e,t),te(t),null;case 5:_o(t);var l=kt(Hn.current);if(n=t.type,e!==null&&t.stateNode!=null)tc(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(S(166));return te(t),null}if(e=kt(Ue.current),pr(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Me]=t,r[Wn]=i,e=(t.mode&1)!==0,n){case"dialog":M("cancel",r),M("close",r);break;case"iframe":case"object":case"embed":M("load",r);break;case"video":case"audio":for(l=0;l<kn.length;l++)M(kn[l],r);break;case"source":M("error",r);break;case"img":case"image":case"link":M("error",r),M("load",r);break;case"details":M("toggle",r);break;case"input":Jo(r,i),M("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},M("invalid",r);break;case"textarea":qo(r,i),M("invalid",r)}fi(n,i),l=null;for(var o in i)if(i.hasOwnProperty(o)){var u=i[o];o==="children"?typeof u=="string"?r.textContent!==u&&(i.suppressHydrationWarning!==!0&&dr(r.textContent,u,e),l=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(i.suppressHydrationWarning!==!0&&dr(r.textContent,u,e),l=["children",""+u]):Ln.hasOwnProperty(o)&&u!=null&&o==="onScroll"&&M("scroll",r)}switch(n){case"input":lr(r),Zo(r,i,!0);break;case"textarea":lr(r),bo(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Br)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ts(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Me]=t,e[Wn]=r,ec(e,t,!1,!1),t.stateNode=e;e:{switch(o=di(n,r),n){case"dialog":M("cancel",e),M("close",e),l=r;break;case"iframe":case"object":case"embed":M("load",e),l=r;break;case"video":case"audio":for(l=0;l<kn.length;l++)M(kn[l],e);l=r;break;case"source":M("error",e),l=r;break;case"img":case"image":case"link":M("error",e),M("load",e),l=r;break;case"details":M("toggle",e),l=r;break;case"input":Jo(e,r),l=oi(e,r),M("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=A({},r,{value:void 0}),M("invalid",e);break;case"textarea":qo(e,r),l=ai(e,r),M("invalid",e);break;default:l=r}fi(n,l),u=l;for(i in u)if(u.hasOwnProperty(i)){var s=u[i];i==="style"?js(e,s):i==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&Ls(e,s)):i==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&zn(e,s):typeof s=="number"&&zn(e,""+s):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ln.hasOwnProperty(i)?s!=null&&i==="onScroll"&&M("scroll",e):s!=null&&bi(e,i,s,o))}switch(n){case"input":lr(e),Zo(e,r,!1);break;case"textarea":lr(e),bo(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ct(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Vt(e,!!r.multiple,i,!1):r.defaultValue!=null&&Vt(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Br)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return te(t),null;case 6:if(e&&t.stateNode!=null)nc(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(S(166));if(n=kt(Hn.current),kt(Ue.current),pr(t)){if(r=t.stateNode,n=t.memoizedProps,r[Me]=t,(i=r.nodeValue!==n)&&(e=me,e!==null))switch(e.tag){case 3:dr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&dr(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Me]=t,t.stateNode=r}return te(t),null;case 13:if(O(F),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(U&&he!==null&&t.mode&1&&!(t.flags&128))Sa(),qt(),t.flags|=98560,i=!1;else if(i=pr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(S(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(S(317));i[Me]=t}else qt(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;te(t),i=!1}else Ie!==null&&(Ki(Ie),Ie=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||F.current&1?Y===0&&(Y=3):Oo())),t.updateQueue!==null&&(t.flags|=4),te(t),null);case 4:return en(),Fi(e,t),e===null&&$n(t.stateNode.containerInfo),te(t),null;case 10:return wo(t.type._context),te(t),null;case 17:return fe(t.type)&&Hr(),te(t),null;case 19:if(O(F),i=t.memoizedState,i===null)return te(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)vn(i,!1);else{if(Y!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Jr(e),o!==null){for(t.flags|=128,vn(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return D(F,F.current&1|2),t.child}e=e.sibling}i.tail!==null&&V()>nn&&(t.flags|=128,r=!0,vn(i,!1),t.lanes=4194304)}else{if(!r)if(e=Jr(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vn(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!U)return te(t),null}else 2*V()-i.renderingStartTime>nn&&n!==1073741824&&(t.flags|=128,r=!0,vn(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=V(),t.sibling=null,n=F.current,D(F,r?n&1|2:n&1),t):(te(t),null);case 22:case 23:return Mo(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?pe&1073741824&&(te(t),t.subtreeFlags&6&&(t.flags|=8192)):te(t),null;case 24:return null;case 25:return null}throw Error(S(156,t.tag))}function $d(e,t){switch(mo(t),t.tag){case 1:return fe(t.type)&&Hr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return en(),O(ce),O(re),xo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return _o(t),null;case 13:if(O(F),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));qt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(F),null;case 4:return en(),null;case 10:return wo(t.type._context),null;case 22:case 23:return Mo(),null;case 24:return null;default:return null}}var vr=!1,ne=!1,Ad=typeof WeakSet=="function"?WeakSet:Set,_=null;function Bt(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){W(e,t,r)}else n.current=null}function $i(e,t,n){try{n()}catch(r){W(e,t,r)}}var Bu=!1;function Wd(e,t){if(Ei=$r,e=ua(),po(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,u=-1,s=-1,c=0,h=0,v=e,p=null;t:for(;;){for(var g;v!==n||l!==0&&v.nodeType!==3||(u=o+l),v!==i||r!==0&&v.nodeType!==3||(s=o+r),v.nodeType===3&&(o+=v.nodeValue.length),(g=v.firstChild)!==null;)p=v,v=g;for(;;){if(v===e)break t;if(p===n&&++c===l&&(u=o),p===i&&++h===r&&(s=o),(g=v.nextSibling)!==null)break;v=p,p=v.parentNode}v=g}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(_i={focusedElem:e,selectionRange:n},$r=!1,_=t;_!==null;)if(t=_,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_=e;else for(;_!==null;){t=_;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,k=m.memoizedState,f=t.stateNode,a=f.getSnapshotBeforeUpdate(t.elementType===t.type?y:Re(t.type,y),k);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(S(163))}}catch(w){W(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,_=e;break}_=t.return}return m=Bu,Bu=!1,m}function Nn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&$i(t,n,i)}l=l.next}while(l!==r)}}function pl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ai(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function rc(e){var t=e.alternate;t!==null&&(e.alternate=null,rc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Me],delete t[Wn],delete t[Ci],delete t[_d],delete t[xd])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function lc(e){return e.tag===5||e.tag===3||e.tag===4}function Hu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||lc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Wi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Br));else if(r!==4&&(e=e.child,e!==null))for(Wi(e,t,n),e=e.sibling;e!==null;)Wi(e,t,n),e=e.sibling}function Bi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Bi(e,t,n),e=e.sibling;e!==null;)Bi(e,t,n),e=e.sibling}var Z=null,Ne=!1;function Ge(e,t,n){for(n=n.child;n!==null;)ic(e,t,n),n=n.sibling}function ic(e,t,n){if(Oe&&typeof Oe.onCommitFiberUnmount=="function")try{Oe.onCommitFiberUnmount(il,n)}catch{}switch(n.tag){case 5:ne||Bt(n,t);case 6:var r=Z,l=Ne;Z=null,Ge(e,t,n),Z=r,Ne=l,Z!==null&&(Ne?(e=Z,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Z.removeChild(n.stateNode));break;case 18:Z!==null&&(Ne?(e=Z,n=n.stateNode,e.nodeType===8?Wl(e.parentNode,n):e.nodeType===1&&Wl(e,n),On(e)):Wl(Z,n.stateNode));break;case 4:r=Z,l=Ne,Z=n.stateNode.containerInfo,Ne=!0,Ge(e,t,n),Z=r,Ne=l;break;case 0:case 11:case 14:case 15:if(!ne&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&$i(n,t,o),l=l.next}while(l!==r)}Ge(e,t,n);break;case 1:if(!ne&&(Bt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){W(n,t,u)}Ge(e,t,n);break;case 21:Ge(e,t,n);break;case 22:n.mode&1?(ne=(r=ne)||n.memoizedState!==null,Ge(e,t,n),ne=r):Ge(e,t,n);break;default:Ge(e,t,n)}}function Vu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ad),t.forEach(function(r){var l=Jd.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Ce(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var i=e,o=t,u=o;e:for(;u!==null;){switch(u.tag){case 5:Z=u.stateNode,Ne=!1;break e;case 3:Z=u.stateNode.containerInfo,Ne=!0;break e;case 4:Z=u.stateNode.containerInfo,Ne=!0;break e}u=u.return}if(Z===null)throw Error(S(160));ic(i,o,l),Z=null,Ne=!1;var s=l.alternate;s!==null&&(s.return=null),l.return=null}catch(c){W(l,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)oc(t,e),t=t.sibling}function oc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ce(t,e),je(e),r&4){try{Nn(3,e,e.return),pl(3,e)}catch(y){W(e,e.return,y)}try{Nn(5,e,e.return)}catch(y){W(e,e.return,y)}}break;case 1:Ce(t,e),je(e),r&512&&n!==null&&Bt(n,n.return);break;case 5:if(Ce(t,e),je(e),r&512&&n!==null&&Bt(n,n.return),e.flags&32){var l=e.stateNode;try{zn(l,"")}catch(y){W(e,e.return,y)}}if(r&4&&(l=e.stateNode,l!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,u=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{u==="input"&&i.type==="radio"&&i.name!=null&&Ns(l,i),di(u,o);var c=di(u,i);for(o=0;o<s.length;o+=2){var h=s[o],v=s[o+1];h==="style"?js(l,v):h==="dangerouslySetInnerHTML"?Ls(l,v):h==="children"?zn(l,v):bi(l,h,v,c)}switch(u){case"input":ui(l,i);break;case"textarea":Is(l,i);break;case"select":var p=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!i.multiple;var g=i.value;g!=null?Vt(l,!!i.multiple,g,!1):p!==!!i.multiple&&(i.defaultValue!=null?Vt(l,!!i.multiple,i.defaultValue,!0):Vt(l,!!i.multiple,i.multiple?[]:"",!1))}l[Wn]=i}catch(y){W(e,e.return,y)}}break;case 6:if(Ce(t,e),je(e),r&4){if(e.stateNode===null)throw Error(S(162));l=e.stateNode,i=e.memoizedProps;try{l.nodeValue=i}catch(y){W(e,e.return,y)}}break;case 3:if(Ce(t,e),je(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{On(t.containerInfo)}catch(y){W(e,e.return,y)}break;case 4:Ce(t,e),je(e);break;case 13:Ce(t,e),je(e),l=e.child,l.flags&8192&&(i=l.memoizedState!==null,l.stateNode.isHidden=i,!i||l.alternate!==null&&l.alternate.memoizedState!==null||(jo=V())),r&4&&Vu(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(ne=(c=ne)||h,Ce(t,e),ne=c):Ce(t,e),je(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!h&&e.mode&1)for(_=e,h=e.child;h!==null;){for(v=_=h;_!==null;){switch(p=_,g=p.child,p.tag){case 0:case 11:case 14:case 15:Nn(4,p,p.return);break;case 1:Bt(p,p.return);var m=p.stateNode;if(typeof m.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(y){W(r,n,y)}}break;case 5:Bt(p,p.return);break;case 22:if(p.memoizedState!==null){Ku(v);continue}}g!==null?(g.return=p,_=g):Ku(v)}h=h.sibling}e:for(h=null,v=e;;){if(v.tag===5){if(h===null){h=v;try{l=v.stateNode,c?(i=l.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(u=v.stateNode,s=v.memoizedProps.style,o=s!=null&&s.hasOwnProperty("display")?s.display:null,u.style.display=zs("display",o))}catch(y){W(e,e.return,y)}}}else if(v.tag===6){if(h===null)try{v.stateNode.nodeValue=c?"":v.memoizedProps}catch(y){W(e,e.return,y)}}else if((v.tag!==22&&v.tag!==23||v.memoizedState===null||v===e)&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===e)break e;for(;v.sibling===null;){if(v.return===null||v.return===e)break e;h===v&&(h=null),v=v.return}h===v&&(h=null),v.sibling.return=v.return,v=v.sibling}}break;case 19:Ce(t,e),je(e),r&4&&Vu(e);break;case 21:break;default:Ce(t,e),je(e)}}function je(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(lc(n)){var r=n;break e}n=n.return}throw Error(S(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(zn(l,""),r.flags&=-33);var i=Hu(e);Bi(e,i,l);break;case 3:case 4:var o=r.stateNode.containerInfo,u=Hu(e);Wi(e,u,o);break;default:throw Error(S(161))}}catch(s){W(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Bd(e,t,n){_=e,uc(e)}function uc(e,t,n){for(var r=(e.mode&1)!==0;_!==null;){var l=_,i=l.child;if(l.tag===22&&r){var o=l.memoizedState!==null||vr;if(!o){var u=l.alternate,s=u!==null&&u.memoizedState!==null||ne;u=vr;var c=ne;if(vr=o,(ne=s)&&!c)for(_=l;_!==null;)o=_,s=o.child,o.tag===22&&o.memoizedState!==null?Yu(l):s!==null?(s.return=o,_=s):Yu(l);for(;i!==null;)_=i,uc(i),i=i.sibling;_=l,vr=u,ne=c}Qu(e)}else l.subtreeFlags&8772&&i!==null?(i.return=l,_=i):Qu(e)}}function Qu(e){for(;_!==null;){var t=_;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ne||pl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ne)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:Re(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Iu(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Iu(t,o,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var h=c.memoizedState;if(h!==null){var v=h.dehydrated;v!==null&&On(v)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(S(163))}ne||t.flags&512&&Ai(t)}catch(p){W(t,t.return,p)}}if(t===e){_=null;break}if(n=t.sibling,n!==null){n.return=t.return,_=n;break}_=t.return}}function Ku(e){for(;_!==null;){var t=_;if(t===e){_=null;break}var n=t.sibling;if(n!==null){n.return=t.return,_=n;break}_=t.return}}function Yu(e){for(;_!==null;){var t=_;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{pl(4,t)}catch(s){W(t,n,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(s){W(t,l,s)}}var i=t.return;try{Ai(t)}catch(s){W(t,i,s)}break;case 5:var o=t.return;try{Ai(t)}catch(s){W(t,o,s)}}}catch(s){W(t,t.return,s)}if(t===e){_=null;break}var u=t.sibling;if(u!==null){u.return=t.return,_=u;break}_=t.return}}var Hd=Math.ceil,br=Xe.ReactCurrentDispatcher,Lo=Xe.ReactCurrentOwner,Ee=Xe.ReactCurrentBatchConfig,z=0,J=null,Q=null,q=0,pe=0,Ht=pt(0),Y=0,Yn=null,Rt=0,hl=0,zo=0,In=null,se=null,jo=0,nn=1/0,Fe=null,el=!1,Hi=null,ut=null,gr=!1,tt=null,tl=0,Tn=0,Vi=null,Lr=-1,zr=0;function ie(){return z&6?V():Lr!==-1?Lr:Lr=V()}function st(e){return e.mode&1?z&2&&q!==0?q&-q:Cd.transition!==null?(zr===0&&(zr=Qs()),zr):(e=j,e!==0||(e=window.event,e=e===void 0?16:qs(e.type)),e):1}function Le(e,t,n,r){if(50<Tn)throw Tn=0,Vi=null,Error(S(185));Jn(e,n,r),(!(z&2)||e!==J)&&(e===J&&(!(z&2)&&(hl|=n),Y===4&&be(e,q)),de(e,r),n===1&&z===0&&!(t.mode&1)&&(nn=V()+500,cl&&ht()))}function de(e,t){var n=e.callbackNode;Cf(e,t);var r=Fr(e,e===J?q:0);if(r===0)n!==null&&nu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&nu(n),t===1)e.tag===0?Pd(Xu.bind(null,e)):ga(Xu.bind(null,e)),kd(function(){!(z&6)&&ht()}),n=null;else{switch(Ks(r)){case 1:n=lo;break;case 4:n=Hs;break;case 16:n=Ur;break;case 536870912:n=Vs;break;default:n=Ur}n=mc(n,sc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function sc(e,t){if(Lr=-1,zr=0,z&6)throw Error(S(327));var n=e.callbackNode;if(Gt()&&e.callbackNode!==n)return null;var r=Fr(e,e===J?q:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=nl(e,r);else{t=r;var l=z;z|=2;var i=cc();(J!==e||q!==t)&&(Fe=null,nn=V()+500,Et(e,t));do try{Kd();break}catch(u){ac(e,u)}while(!0);yo(),br.current=i,z=l,Q!==null?t=0:(J=null,q=0,t=Y)}if(t!==0){if(t===2&&(l=gi(e),l!==0&&(r=l,t=Qi(e,l))),t===1)throw n=Yn,Et(e,0),be(e,r),de(e,V()),n;if(t===6)be(e,r);else{if(l=e.current.alternate,!(r&30)&&!Vd(l)&&(t=nl(e,r),t===2&&(i=gi(e),i!==0&&(r=i,t=Qi(e,i))),t===1))throw n=Yn,Et(e,0),be(e,r),de(e,V()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(S(345));case 2:yt(e,se,Fe);break;case 3:if(be(e,r),(r&130023424)===r&&(t=jo+500-V(),10<t)){if(Fr(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){ie(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Pi(yt.bind(null,e,se,Fe),t);break}yt(e,se,Fe);break;case 4:if(be(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var o=31-Te(r);i=1<<o,o=t[o],o>l&&(l=o),r&=~i}if(r=l,r=V()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Hd(r/1960))-r,10<r){e.timeoutHandle=Pi(yt.bind(null,e,se,Fe),r);break}yt(e,se,Fe);break;case 5:yt(e,se,Fe);break;default:throw Error(S(329))}}}return de(e,V()),e.callbackNode===n?sc.bind(null,e):null}function Qi(e,t){var n=In;return e.current.memoizedState.isDehydrated&&(Et(e,t).flags|=256),e=nl(e,t),e!==2&&(t=se,se=n,t!==null&&Ki(t)),e}function Ki(e){se===null?se=e:se.push.apply(se,e)}function Vd(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],i=l.getSnapshot;l=l.value;try{if(!ze(i(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function be(e,t){for(t&=~zo,t&=~hl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Te(t),r=1<<n;e[n]=-1,t&=~r}}function Xu(e){if(z&6)throw Error(S(327));Gt();var t=Fr(e,0);if(!(t&1))return de(e,V()),null;var n=nl(e,t);if(e.tag!==0&&n===2){var r=gi(e);r!==0&&(t=r,n=Qi(e,r))}if(n===1)throw n=Yn,Et(e,0),be(e,t),de(e,V()),n;if(n===6)throw Error(S(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yt(e,se,Fe),de(e,V()),null}function Do(e,t){var n=z;z|=1;try{return e(t)}finally{z=n,z===0&&(nn=V()+500,cl&&ht())}}function Nt(e){tt!==null&&tt.tag===0&&!(z&6)&&Gt();var t=z;z|=1;var n=Ee.transition,r=j;try{if(Ee.transition=null,j=1,e)return e()}finally{j=r,Ee.transition=n,z=t,!(z&6)&&ht()}}function Mo(){pe=Ht.current,O(Ht)}function Et(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Sd(n)),Q!==null)for(n=Q.return;n!==null;){var r=n;switch(mo(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Hr();break;case 3:en(),O(ce),O(re),xo();break;case 5:_o(r);break;case 4:en();break;case 13:O(F);break;case 19:O(F);break;case 10:wo(r.type._context);break;case 22:case 23:Mo()}n=n.return}if(J=e,Q=e=at(e.current,null),q=pe=t,Y=0,Yn=null,zo=hl=Rt=0,se=In=null,St!==null){for(t=0;t<St.length;t++)if(n=St[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=l,r.next=o}n.pending=r}St=null}return e}function ac(e,t){do{var n=Q;try{if(yo(),Nr.current=qr,Zr){for(var r=$.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}Zr=!1}if(Ct=0,G=K=$=null,Rn=!1,Vn=0,Lo.current=null,n===null||n.return===null){Y=1,Yn=t,Q=null;break}e:{var i=e,o=n.return,u=n,s=t;if(t=q,u.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=s,h=u,v=h.tag;if(!(h.mode&1)&&(v===0||v===11||v===15)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var g=Mu(o);if(g!==null){g.flags&=-257,Ou(g,o,u,i,t),g.mode&1&&Du(i,c,t),t=g,s=c;var m=t.updateQueue;if(m===null){var y=new Set;y.add(s),t.updateQueue=y}else m.add(s);break e}else{if(!(t&1)){Du(i,c,t),Oo();break e}s=Error(S(426))}}else if(U&&u.mode&1){var k=Mu(o);if(k!==null){!(k.flags&65536)&&(k.flags|=256),Ou(k,o,u,i,t),vo(tn(s,u));break e}}i=s=tn(s,u),Y!==4&&(Y=2),In===null?In=[i]:In.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var f=Ka(i,s,t);Nu(i,f);break e;case 1:u=s;var a=i.type,d=i.stateNode;if(!(i.flags&128)&&(typeof a.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(ut===null||!ut.has(d)))){i.flags|=65536,t&=-t,i.lanes|=t;var w=Ya(i,u,t);Nu(i,w);break e}}i=i.return}while(i!==null)}dc(n)}catch(E){t=E,Q===n&&n!==null&&(Q=n=n.return);continue}break}while(!0)}function cc(){var e=br.current;return br.current=qr,e===null?qr:e}function Oo(){(Y===0||Y===3||Y===2)&&(Y=4),J===null||!(Rt&268435455)&&!(hl&268435455)||be(J,q)}function nl(e,t){var n=z;z|=2;var r=cc();(J!==e||q!==t)&&(Fe=null,Et(e,t));do try{Qd();break}catch(l){ac(e,l)}while(!0);if(yo(),z=n,br.current=r,Q!==null)throw Error(S(261));return J=null,q=0,Y}function Qd(){for(;Q!==null;)fc(Q)}function Kd(){for(;Q!==null&&!gf();)fc(Q)}function fc(e){var t=hc(e.alternate,e,pe);e.memoizedProps=e.pendingProps,t===null?dc(e):Q=t,Lo.current=null}function dc(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=$d(n,t),n!==null){n.flags&=32767,Q=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Y=6,Q=null;return}}else if(n=Fd(n,t,pe),n!==null){Q=n;return}if(t=t.sibling,t!==null){Q=t;return}Q=t=e}while(t!==null);Y===0&&(Y=5)}function yt(e,t,n){var r=j,l=Ee.transition;try{Ee.transition=null,j=1,Yd(e,t,n,r)}finally{Ee.transition=l,j=r}return null}function Yd(e,t,n,r){do Gt();while(tt!==null);if(z&6)throw Error(S(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(S(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Rf(e,i),e===J&&(Q=J=null,q=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||gr||(gr=!0,mc(Ur,function(){return Gt(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Ee.transition,Ee.transition=null;var o=j;j=1;var u=z;z|=4,Lo.current=null,Wd(e,n),oc(n,e),pd(_i),$r=!!Ei,_i=Ei=null,e.current=n,Bd(n),yf(),z=u,j=o,Ee.transition=i}else e.current=n;if(gr&&(gr=!1,tt=e,tl=l),i=e.pendingLanes,i===0&&(ut=null),kf(n.stateNode),de(e,V()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(el)throw el=!1,e=Hi,Hi=null,e;return tl&1&&e.tag!==0&&Gt(),i=e.pendingLanes,i&1?e===Vi?Tn++:(Tn=0,Vi=e):Tn=0,ht(),null}function Gt(){if(tt!==null){var e=Ks(tl),t=Ee.transition,n=j;try{if(Ee.transition=null,j=16>e?16:e,tt===null)var r=!1;else{if(e=tt,tt=null,tl=0,z&6)throw Error(S(331));var l=z;for(z|=4,_=e.current;_!==null;){var i=_,o=i.child;if(_.flags&16){var u=i.deletions;if(u!==null){for(var s=0;s<u.length;s++){var c=u[s];for(_=c;_!==null;){var h=_;switch(h.tag){case 0:case 11:case 15:Nn(8,h,i)}var v=h.child;if(v!==null)v.return=h,_=v;else for(;_!==null;){h=_;var p=h.sibling,g=h.return;if(rc(h),h===c){_=null;break}if(p!==null){p.return=g,_=p;break}_=g}}}var m=i.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var k=y.sibling;y.sibling=null,y=k}while(y!==null)}}_=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,_=o;else e:for(;_!==null;){if(i=_,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Nn(9,i,i.return)}var f=i.sibling;if(f!==null){f.return=i.return,_=f;break e}_=i.return}}var a=e.current;for(_=a;_!==null;){o=_;var d=o.child;if(o.subtreeFlags&2064&&d!==null)d.return=o,_=d;else e:for(o=a;_!==null;){if(u=_,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:pl(9,u)}}catch(E){W(u,u.return,E)}if(u===o){_=null;break e}var w=u.sibling;if(w!==null){w.return=u.return,_=w;break e}_=u.return}}if(z=l,ht(),Oe&&typeof Oe.onPostCommitFiberRoot=="function")try{Oe.onPostCommitFiberRoot(il,e)}catch{}r=!0}return r}finally{j=n,Ee.transition=t}}return!1}function Gu(e,t,n){t=tn(n,t),t=Ka(e,t,1),e=ot(e,t,1),t=ie(),e!==null&&(Jn(e,1,t),de(e,t))}function W(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ut===null||!ut.has(r))){e=tn(n,e),e=Ya(t,e,1),t=ot(t,e,1),e=ie(),t!==null&&(Jn(t,1,e),de(t,e));break}}t=t.return}}function Xd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ie(),e.pingedLanes|=e.suspendedLanes&n,J===e&&(q&n)===n&&(Y===4||Y===3&&(q&130023424)===q&&500>V()-jo?Et(e,0):zo|=n),de(e,t)}function pc(e,t){t===0&&(e.mode&1?(t=ur,ur<<=1,!(ur&130023424)&&(ur=4194304)):t=1);var n=ie();e=Ke(e,t),e!==null&&(Jn(e,t,n),de(e,n))}function Gd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),pc(e,n)}function Jd(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(S(314))}r!==null&&r.delete(t),pc(e,n)}var hc;hc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ce.current)ae=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ae=!1,Ud(e,t,n);ae=!!(e.flags&131072)}else ae=!1,U&&t.flags&1048576&&ya(t,Kr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Tr(e,t),e=t.pendingProps;var l=Zt(t,re.current);Xt(t,n),l=Co(null,t,r,e,l,n);var i=Ro();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,fe(r)?(i=!0,Vr(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,ko(t),l.updater=dl,t.stateNode=l,l._reactInternals=t,zi(t,r,e,n),t=Mi(null,t,r,!0,i,n)):(t.tag=0,U&&i&&ho(t),le(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Tr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=qd(r),e=Re(r,e),l){case 0:t=Di(null,t,r,e,n);break e;case 1:t=$u(null,t,r,e,n);break e;case 11:t=Uu(null,t,r,e,n);break e;case 14:t=Fu(null,t,r,Re(r.type,e),n);break e}throw Error(S(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Re(r,l),Di(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Re(r,l),$u(e,t,r,l,n);case 3:e:{if(Za(t),e===null)throw Error(S(387));r=t.pendingProps,i=t.memoizedState,l=i.element,xa(e,t),Gr(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=tn(Error(S(423)),t),t=Au(e,t,r,n,l);break e}else if(r!==l){l=tn(Error(S(424)),t),t=Au(e,t,r,n,l);break e}else for(he=it(t.stateNode.containerInfo.firstChild),me=t,U=!0,Ie=null,n=Ea(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(qt(),r===l){t=Ye(e,t,n);break e}le(e,t,r,n)}t=t.child}return t;case 5:return Pa(t),e===null&&Ii(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,xi(r,l)?o=null:i!==null&&xi(r,i)&&(t.flags|=32),Ja(e,t),le(e,t,o,n),t.child;case 6:return e===null&&Ii(t),null;case 13:return qa(e,t,n);case 4:return Eo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bt(t,null,r,n):le(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Re(r,l),Uu(e,t,r,l,n);case 7:return le(e,t,t.pendingProps,n),t.child;case 8:return le(e,t,t.pendingProps.children,n),t.child;case 12:return le(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,o=l.value,D(Yr,r._currentValue),r._currentValue=o,i!==null)if(ze(i.value,o)){if(i.children===l.children&&!ce.current){t=Ye(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var u=i.dependencies;if(u!==null){o=i.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=Be(-1,n&-n),s.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?s.next=s:(s.next=h.next,h.next=s),c.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Ti(i.return,n,t),u.lanes|=n;break}s=s.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(S(341));o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Ti(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}le(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Xt(t,n),l=_e(l),r=r(l),t.flags|=1,le(e,t,r,n),t.child;case 14:return r=t.type,l=Re(r,t.pendingProps),l=Re(r.type,l),Fu(e,t,r,l,n);case 15:return Xa(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Re(r,l),Tr(e,t),t.tag=1,fe(r)?(e=!0,Vr(t)):e=!1,Xt(t,n),Qa(t,r,l),zi(t,r,l,n),Mi(null,t,r,!0,e,n);case 19:return ba(e,t,n);case 22:return Ga(e,t,n)}throw Error(S(156,t.tag))};function mc(e,t){return Bs(e,t)}function Zd(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ke(e,t,n,r){return new Zd(e,t,n,r)}function Uo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qd(e){if(typeof e=="function")return Uo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===to)return 11;if(e===no)return 14}return 2}function at(e,t){var n=e.alternate;return n===null?(n=ke(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function jr(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")Uo(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case jt:return _t(n.children,l,i,t);case eo:o=8,l|=8;break;case ni:return e=ke(12,n,t,l|2),e.elementType=ni,e.lanes=i,e;case ri:return e=ke(13,n,t,l),e.elementType=ri,e.lanes=i,e;case li:return e=ke(19,n,t,l),e.elementType=li,e.lanes=i,e;case Ps:return ml(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _s:o=10;break e;case xs:o=9;break e;case to:o=11;break e;case no:o=14;break e;case Je:o=16,r=null;break e}throw Error(S(130,e==null?e:typeof e,""))}return t=ke(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function _t(e,t,n,r){return e=ke(7,e,r,t),e.lanes=n,e}function ml(e,t,n,r){return e=ke(22,e,r,t),e.elementType=Ps,e.lanes=n,e.stateNode={isHidden:!1},e}function Gl(e,t,n){return e=ke(6,e,null,t),e.lanes=n,e}function Jl(e,t,n){return t=ke(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bd(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Tl(0),this.expirationTimes=Tl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Fo(e,t,n,r,l,i,o,u,s){return e=new bd(e,t,n,u,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ke(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ko(i),e}function ep(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:zt,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function vc(e){if(!e)return ft;e=e._reactInternals;e:{if(Tt(e)!==e||e.tag!==1)throw Error(S(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(fe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(S(171))}if(e.tag===1){var n=e.type;if(fe(n))return va(e,n,t)}return t}function gc(e,t,n,r,l,i,o,u,s){return e=Fo(n,r,!0,e,l,i,o,u,s),e.context=vc(null),n=e.current,r=ie(),l=st(n),i=Be(r,l),i.callback=t??null,ot(n,i,l),e.current.lanes=l,Jn(e,l,r),de(e,r),e}function vl(e,t,n,r){var l=t.current,i=ie(),o=st(l);return n=vc(n),t.context===null?t.context=n:t.pendingContext=n,t=Be(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ot(l,t,o),e!==null&&(Le(e,l,o,i),Rr(e,l,o)),o}function rl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Ju(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function $o(e,t){Ju(e,t),(e=e.alternate)&&Ju(e,t)}function tp(){return null}var yc=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ao(e){this._internalRoot=e}gl.prototype.render=Ao.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(S(409));vl(e,t,null,null)};gl.prototype.unmount=Ao.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Nt(function(){vl(null,e,null,null)}),t[Qe]=null}};function gl(e){this._internalRoot=e}gl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Gs();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qe.length&&t!==0&&t<qe[n].priority;n++);qe.splice(n,0,e),n===0&&Zs(e)}};function Wo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function yl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Zu(){}function np(e,t,n,r,l){if(l){if(typeof r=="function"){var i=r;r=function(){var c=rl(o);i.call(c)}}var o=gc(t,r,e,0,null,!1,!1,"",Zu);return e._reactRootContainer=o,e[Qe]=o.current,$n(e.nodeType===8?e.parentNode:e),Nt(),o}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var u=r;r=function(){var c=rl(s);u.call(c)}}var s=Fo(e,0,!1,null,null,!1,!1,"",Zu);return e._reactRootContainer=s,e[Qe]=s.current,$n(e.nodeType===8?e.parentNode:e),Nt(function(){vl(t,s,n,r)}),s}function wl(e,t,n,r,l){var i=n._reactRootContainer;if(i){var o=i;if(typeof l=="function"){var u=l;l=function(){var s=rl(o);u.call(s)}}vl(t,o,e,l)}else o=np(n,t,e,l,r);return rl(o)}Ys=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Sn(t.pendingLanes);n!==0&&(io(t,n|1),de(t,V()),!(z&6)&&(nn=V()+500,ht()))}break;case 13:Nt(function(){var r=Ke(e,1);if(r!==null){var l=ie();Le(r,e,1,l)}}),$o(e,1)}};oo=function(e){if(e.tag===13){var t=Ke(e,134217728);if(t!==null){var n=ie();Le(t,e,134217728,n)}$o(e,134217728)}};Xs=function(e){if(e.tag===13){var t=st(e),n=Ke(e,t);if(n!==null){var r=ie();Le(n,e,t,r)}$o(e,t)}};Gs=function(){return j};Js=function(e,t){var n=j;try{return j=e,t()}finally{j=n}};hi=function(e,t,n){switch(t){case"input":if(ui(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=al(r);if(!l)throw Error(S(90));Rs(r),ui(r,l)}}}break;case"textarea":Is(e,n);break;case"select":t=n.value,t!=null&&Vt(e,!!n.multiple,t,!1)}};Os=Do;Us=Nt;var rp={usingClientEntryPoint:!1,Events:[qn,Ut,al,Ds,Ms,Do]},gn={findFiberByHostInstance:wt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},lp={bundleType:gn.bundleType,version:gn.version,rendererPackageName:gn.rendererPackageName,rendererConfig:gn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Xe.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=As(e),e===null?null:e.stateNode},findFiberByHostInstance:gn.findFiberByHostInstance||tp,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 yr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yr.isDisabled&&yr.supportsFiber)try{il=yr.inject(lp),Oe=yr}catch{}}ge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rp;ge.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wo(t))throw Error(S(200));return ep(e,t,null,n)};ge.createRoot=function(e,t){if(!Wo(e))throw Error(S(299));var n=!1,r="",l=yc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Fo(e,1,!1,null,null,n,!1,r,l),e[Qe]=t.current,$n(e.nodeType===8?e.parentNode:e),new Ao(t)};ge.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(S(188)):(e=Object.keys(e).join(","),Error(S(268,e)));return e=As(t),e=e===null?null:e.stateNode,e};ge.flushSync=function(e){return Nt(e)};ge.hydrate=function(e,t,n){if(!yl(t))throw Error(S(200));return wl(null,e,t,!0,n)};ge.hydrateRoot=function(e,t,n){if(!Wo(e))throw Error(S(405));var r=n!=null&&n.hydratedSources||null,l=!1,i="",o=yc;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=gc(t,null,e,1,n??null,l,!1,i,o),e[Qe]=t.current,$n(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new gl(t)};ge.render=function(e,t,n){if(!yl(t))throw Error(S(200));return wl(null,e,t,!1,n)};ge.unmountComponentAtNode=function(e){if(!yl(e))throw Error(S(40));return e._reactRootContainer?(Nt(function(){wl(null,null,e,!1,function(){e._reactRootContainer=null,e[Qe]=null})}),!0):!1};ge.unstable_batchedUpdates=Do;ge.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!yl(n))throw Error(S(200));if(e==null||e._reactInternals===void 0)throw Error(S(38));return wl(e,t,n,!1,r)};ge.version="18.3.1-next-f1338f8080-20240426";function wc(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wc)}catch(e){console.error(e)}}wc(),ws.exports=ge;var ip=ws.exports,Sc,qu=ip;Sc=qu.createRoot,qu.hydrateRoot;class op extends Error{constructor(){super("未登录或会话已过期"),this.name="UnauthorizedError"}}class up extends Error{constructor(t,n,r){super(n),this.status=t,this.code=r,this.name="ApiError"}}class sp{async get(t,n){return this.request(t,{method:"GET",headers:n==null?void 0:n.headers})}async post(t,n,r){return this.request(t,{method:"POST",headers:{"content-type":"application/json",...r==null?void 0:r.headers},body:n===void 0?void 0:JSON.stringify(n)})}async patch(t,n,r){return this.request(t,{method:"PATCH",headers:{"content-type":"application/json",...r==null?void 0:r.headers},body:n===void 0?void 0:JSON.stringify(n)})}async delete(t,n){return this.request(t,{method:"DELETE",headers:n==null?void 0:n.headers})}async request(t,n){var l;const r=await fetch(t,{credentials:"same-origin",cache:"no-store",...n});if(r.status===401)throw window.dispatchEvent(new CustomEvent("webapp:unauthorized")),new op;if(!r.ok){let i=`请求失败 (${r.status})`,o;try{const u=await r.json();typeof u.error=="string"?i=u.error:(l=u.error)!=null&&l.message&&(i=u.error.message),typeof u.code=="string"&&(o=u.code)}catch{}throw new up(r.status,i,o)}if(r.status!==204)return await r.json()}}function wr(e,...t){if(Array.isArray(e))return e;if(e&&typeof e=="object"){const n=e;for(const r of t)if(Array.isArray(n[r]))return n[r]}return[]}class bu{constructor(t){this.storageKey=t}list(){try{const t=JSON.parse(localStorage.getItem(this.storageKey)??"[]");return Array.isArray(t)?t:[]}catch{return[]}}upsert(t){const n=this.list().filter(r=>r.id!==t.id);n.push(t),localStorage.setItem(this.storageKey,JSON.stringify(n))}remove(t){localStorage.setItem(this.storageKey,JSON.stringify(this.list().filter(n=>n.id!==t)))}}const Zl="<think>",ql="</think>";function es(e,t){const n=Math.min(t.length-1,e.length);for(let r=n;r>0;r--)if(e.endsWith(t.slice(0,r)))return r;return 0}function Sr(e){return e.replace(/<think>[\s\S]*?<\/think>/g,"")}class ap{constructor(){this.buffer="",this.dropping=!1}push(t){this.buffer+=t;let n="";for(;;){if(this.dropping){const l=this.buffer.indexOf(ql);if(l===-1){const i=es(this.buffer,ql);return this.buffer=this.buffer.slice(this.buffer.length-i),n}this.buffer=this.buffer.slice(l+ql.length),this.dropping=!1;continue}const r=this.buffer.indexOf(Zl);if(r===-1){const l=es(this.buffer,Zl);return n+=this.buffer.slice(0,this.buffer.length-l),this.buffer=this.buffer.slice(this.buffer.length-l),n}n+=this.buffer.slice(0,r),this.buffer=this.buffer.slice(r+Zl.length),this.dropping=!0}}flush(){const t=this.buffer;return this.buffer="",t}}const cp=/^(?:load failed|failed to fetch|network request failed|networkerror when attempting to fetch resource\.?|the network connection was lost\.?|fetch failed)$/i;function ts(e){return e instanceof Error&&e.name!=="AbortError"&&cp.test(e.message.trim())}class fp{constructor(t,n,r){this.http=t,this.settings=n,this.projectBridge=r,this.streams=new Map,this.nativeSnapshotRevisions=new Map,this.pendingRuns=new Map,this.listeners=new Set,this.thinkFilters=new Map,this.agentDefs=new bu("webapp.agentDefs"),this.lspServers=new bu("webapp.lspServers"),this.uploads=new Map}requireProjectBridge(){if(this.projectBridge)return this.projectBridge;throw Object.assign(new Error("请从 AgentRoam Web 控制台打开项目"),{code:"WEB_SHELL_REQUIRED"})}onEvent(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}async run(t,n,r,l,i,o){var g;const u=n.startsWith("runtime:"),s=this.streams.has(n),c=this.pendingRuns.has(n),h=this.nativeSnapshotRevisions.get(n);let v=null,p=null;try{u||await this.openStream(n,this.nativeSnapshotRevisions.get(n)),p=c?null:new Promise(f=>{v=f,this.pendingRuns.set(n,f)});const m=this.settings.getModelOverride(),y=this.settings.getRunLimits(),k=await this.http.post("/api/agent/run",{input:t,sessionId:n,...i!=null&&i.length?{images:i}:{},...m?{model:m}:{},reasoningEffort:this.settings.getReasoningEffort(),maxIterations:y.maxIterations,maxTokens:y.maxTokens,...(g=o==null?void 0:o.model)!=null&&g.id?{nativeModel:o.model}:{},...o!=null&&o.reasoningEffort?{nativeReasoningEffort:o.reasoningEffort}:{}});u&&await this.openStream(n,h??{sequence:0},{waitForOpen:!1}),typeof k.snapshotRevision=="number"&&this.rememberNativeSnapshot(n,k.snapshotRevision,k.runId),this.dispatch(n,{type:"run_admitted",...typeof k.runId=="string"?{_nativeRunId:k.runId}:{},...typeof k.snapshotRevision=="number"?{_nativeSequence:k.snapshotRevision}:{}}),p&&await p}catch(m){if(!c&&u&&ts(m)&&await this.recoverNativeAdmission(n,h))return await this.openStream(n,h??{sequence:0},{waitForOpen:!1}),p&&await p,[];const y=m.code,k=typeof y=="string"?y:m.status===409?"SESSION_OCCUPIED":void 0;u&&k==="SESSION_ALREADY_RUNNING"&&await this.openStream(n,h??{sequence:0},{waitForOpen:!1});const f=s||c||k==="SESSION_ALREADY_RUNNING";this.dispatch(n,{type:"error",message:ts(m)?"网络连接中断,消息未确认发送,请重试":m instanceof Error?m.message:"无法启动运行",...k?{code:k}:{},...f?{_preserveActiveRun:!0}:{}}),f?v&&this.pendingRuns.get(n)===v&&this.pendingRuns.delete(n):(this.closeStream(n),this.settle(n))}return[]}async recoverNativeAdmission(t,n){const r=this.nativeSnapshotRevisions.get(t);if(r!=null&&r.runId&&r.runId!==(n==null?void 0:n.runId))return this.dispatchRecoveredAdmission(t,r),!0;try{const l=await this.http.get(`/api/sessions/${encodeURIComponent(t)}?limit=1`),i=typeof l.snapshotRunId=="string"?l.snapshotRunId:void 0,o=typeof l.snapshotRevision=="number"?l.snapshotRevision:0,u=!!(i&&(n!=null&&n.runId)&&i!==n.runId),s=!!(i&&!(n!=null&&n.runId)&&l.status==="running");return!u&&!s?!1:(this.dispatchRecoveredAdmission(t,{runId:i,sequence:o}),!0)}catch{return!1}}dispatchRecoveredAdmission(t,n){this.rememberNativeSnapshot(t,n.sequence,n.runId),this.dispatch(t,{type:"run_admitted",...n.runId?{_nativeRunId:n.runId}:{},_nativeSequence:0})}async steer(t,n,r){return(await this.http.post("/api/agent/steer",{input:t,sessionId:n})).steered||this.run(t,n).catch(()=>{}),!0}async steerSessionMessage(t,n){const r=await this.http.post("/api/agent/steer",{sessionId:t,messageId:n});if(!r.steered)throw new Error("当前运行不支持插队消息");return r.state}async abort(t){try{await this.http.post("/api/agent/abort",t?{sessionId:t}:{})}finally{for(const n of[...this.pendingRuns.keys()])this.settle(n);for(const n of[...this.streams.keys()])this.closeStream(n)}}async answerQuestion(t,n,r){try{return await this.http.post("/api/agent/answer",{questionId:t,answer:n,selectedIndices:r}),!0}catch{return!1}}async listSessions(t){const n=t?`?projectId=${encodeURIComponent(t)}`:"";return this.http.get(`/api/sessions${n}`)}async listAgentWorkspaces(t,n={}){const r=new URLSearchParams({agentType:t});return n.cursor&&r.set("cursor",n.cursor),n.limit!==void 0&&r.set("limit",String(n.limit)),n.refresh&&r.set("refresh","1"),n.since&&r.set("since",n.since),this.http.get(`/api/agent-workspaces?${r.toString()}`)}async importAgentWorkspace(t,n,r){return this.http.post("/api/agent-workspaces",{agentType:t,path:n,...r?{name:r}:{}})}async listAgentWorkspaceSessions(t,n,r={}){const l=new URLSearchParams({agentType:t});return r.cursor&&l.set("cursor",r.cursor),r.limit!==void 0&&l.set("limit",String(r.limit)),r.refresh&&l.set("refresh","1"),this.http.get(`/api/agent-workspaces/${encodeURIComponent(n)}/sessions?${l.toString()}`)}async refreshSessions(t){const n=t?`?refresh=1&projectId=${encodeURIComponent(t)}`:"?refresh=1";return this.http.get(`/api/sessions${n}`)}async listChildSessions(t){return[]}async getSession(t,n){try{const r=new URLSearchParams;n!=null&&n.before&&r.set("before",n.before),n!=null&&n.after&&r.set("after",n.after),n!=null&&n.anchor&&r.set("anchor",n.anchor),(n==null?void 0:n.limit)!==void 0&&r.set("limit",String(n.limit));const l=r.size>0?`?${r.toString()}`:"",i=await this.http.get(`/api/sessions/${encodeURIComponent(t)}${l}`);return Array.isArray(i.messages)&&(i.messages=i.messages.map(o=>typeof o.content=="string"?{...o,content:Sr(o.content)}:o)),Array.isArray(i.events)&&(i.events=i.events.map(o=>typeof o.text=="string"&&o.text.includes("<think>")?{...o,text:Sr(o.text)}:typeof o.finalText=="string"&&o.finalText.includes("<think>")?{...o,finalText:Sr(o.finalText)}:o)),t.startsWith("runtime:")&&typeof i.snapshotRevision=="number"&&(this.rememberNativeSnapshot(t,i.snapshotRevision,typeof i.snapshotRunId=="string"?i.snapshotRunId:void 0),i.status==="running"&&i.occupancy!=="owned-externally"&&this.openStream(t,this.nativeSnapshotRevisions.get(t)).catch(()=>{})),i}catch(r){if(r.status===404)return null;throw r}}async getSessionQueryIndex(t){return this.http.get(`/api/sessions/${encodeURIComponent(t)}/query-index`)}observeSession(t,n,r){const l=new EventSource(`/api/sessions/${encodeURIComponent(t)}/changes`);let i=!1;return l.onmessage=o=>{if(o.data)try{const u=JSON.parse(o.data);u.type==="session_history_changed"&&typeof u.revision=="number"&&n({type:u.type,revision:u.revision})}catch{}},l.onerror=()=>{i||(i=!0,l.close(),r==null||r())},()=>{i||(i=!0,l.close())}}async setSessionPermissionMode(t,n){return this.http.patch(`/api/sessions/${encodeURIComponent(t)}`,{permissionMode:n})}async getSessionGoals(t){const n=await this.http.get(`/api/sessions/${encodeURIComponent(t)}/goals`);return n.active&&this.openStream(t,this.nativeSnapshotRevisions.get(t)).catch(()=>{}),n}async enqueueSessionGoal(t,n,r){var i;await this.openStream(t,this.nativeSnapshotRevisions.get(t));const l=await this.http.post(`/api/sessions/${encodeURIComponent(t)}/goals`,{objective:n,sourceMessageId:r});return typeof((i=l.started)==null?void 0:i.snapshotRevision)=="number"&&(this.rememberNativeSnapshot(t,l.started.snapshotRevision,l.started.runId),this.dispatch(t,{type:"run_admitted",...l.started.runId?{_nativeRunId:l.started.runId}:{},_nativeSequence:l.started.snapshotRevision})),l.state}async reorderSessionGoals(t,n){return this.http.patch(`/api/sessions/${encodeURIComponent(t)}/goals`,{orderedIds:n})}async cancelSessionGoal(t,n){return this.http.delete(`/api/sessions/${encodeURIComponent(t)}/goals?goalId=${encodeURIComponent(n)}`)}async enqueueSessionMessage(t,n){var l;await this.openStream(t,this.nativeSnapshotRevisions.get(t));const r=await this.http.post(`/api/sessions/${encodeURIComponent(t)}/goals`,{kind:"message",objective:n.content,sourceMessageId:n.sourceMessageId,messagePayload:{images:n.images,agentIds:n.agentIds,agentName:n.agentName}});return typeof((l=r.started)==null?void 0:l.snapshotRevision)=="number"&&(this.rememberNativeSnapshot(t,r.started.snapshotRevision,r.started.runId),this.dispatch(t,{type:"run_admitted",...r.started.runId?{_nativeRunId:r.started.runId}:{},_nativeSequence:r.started.snapshotRevision})),r.state}async updateSessionMessage(t,n,r){return this.http.patch(`/api/sessions/${encodeURIComponent(t)}/goals`,{kind:"message",messageId:n,objective:r})}async reorderSessionMessages(t,n){return this.http.patch(`/api/sessions/${encodeURIComponent(t)}/goals`,{kind:"message",orderedIds:n})}async cancelSessionMessage(t,n){return this.http.delete(`/api/sessions/${encodeURIComponent(t)}/goals?kind=message&goalId=${encodeURIComponent(n)}`)}async createSession(t,n,r,l){return this.http.post("/api/sessions",{title:t,...n?{projectId:n}:{},...r&&r!=="customer-agent"?{agentType:r}:{},...l?{cwd:l}:{}})}async forkSession(t){return this.http.post(`/api/sessions/${encodeURIComponent(t)}/fork`,{})}async deleteSession(t){await this.http.delete(`/api/sessions/${encodeURIComponent(t)}`)}async getRuntimeHealth(){return this.http.get("/api/agent/runtime-health")}async listAgentModels(t){return this.http.get(`/api/agent/models?agentType=${encodeURIComponent(t)}`)}async listProjects(){return this.projectBridge?(await this.requireProjectBridge().request("project:list")).projects??[]:this.http.get("/api/projects")}async getProject(t){return this.projectBridge?(await this.requireProjectBridge().request("project:get",{projectId:t})).project??null:this.http.get(`/api/projects/${encodeURIComponent(t)}`)}async createProject(t,n){return this.projectBridge?(await this.requireProjectBridge().request("project:create",{name:t,path:n??""})).project:this.http.post("/api/projects",{name:t,path:n??""})}async updateProject(t,n){return this.projectBridge?(await this.requireProjectBridge().request("project:rename",{projectId:t,name:n.name})).project:this.http.patch(`/api/projects/${encodeURIComponent(t)}`,n)}async deleteProject(t){if(!this.projectBridge){await this.http.delete(`/api/projects/${encodeURIComponent(t)}`);return}await this.requireProjectBridge().request("project:delete",{projectId:t})}async checkProjectPath(t){return this.projectBridge?(await this.requireProjectBridge().request("project:check",{path:t})).valid===!0:(await this.http.get(`/api/projects/check?path=${encodeURIComponent(t)}`)).valid===!0}async listProjectRoots(){return this.projectBridge?(await this.requireProjectBridge().request("project:roots")).roots??[]:this.http.get("/api/projects/roots")}async listProjectDirectories(t){return this.projectBridge?(await this.requireProjectBridge().request("project:directories",{path:t})).entries??[]:this.http.get(`/api/projects/directories?path=${encodeURIComponent(t)}`)}async setProjectWorkingDir(t){return{ok:!0,path:t}}getSettings(){return this.settings.get()}async saveSettings(t){this.settings.save(t)}async setActiveProfile(t){this.settings.setActiveProfile(t)}async refreshServerModel(){try{const t=await this.http.get("/api/agent/model");this.settings.reflectServerModel(t)}catch{}}async listMemories(){return wr(await this.http.get("/api/memory"),"entries","memories","items")}async searchMemories(t){return wr(await this.http.get(`/api/memory?q=${encodeURIComponent(t)}`),"entries","memories","items")}async getMemory(t){try{return await this.http.get(`/api/memory/${encodeURIComponent(t)}`)}catch(n){if(n.status===404)return null;throw n}}async setMemory(t){await this.http.post("/api/memory",t)}async deleteMemory(t){await this.http.delete(`/api/memory/${encodeURIComponent(t)}`)}async mcpList(){return wr(await this.http.get("/api/mcp/servers"),"servers","items")}async mcpSave(t){await this.http.post("/api/mcp/connect",t)}async mcpDelete(t){await this.http.delete(`/api/mcp/disconnect?serverId=${encodeURIComponent(t)}`)}async mcpSetEnabled(){}async mcpProbe(t){try{return(await this.http.post("/api/mcp/connect",t)).tools??[]}catch{return[]}}async listSkills(){return wr(await this.http.get("/api/skills"),"skills","items")}async saveSkill(){}async deleteSkill(){}async setSkillEnabled(){}async importSkill(){return null}listAgentDefs(){return Promise.resolve(this.agentDefs.list())}getAgentDef(t){return Promise.resolve(this.agentDefs.list().find(n=>n.id===t)??null)}createAgentDef(t){const n=new Date().toISOString(),r={id:crypto.randomUUID(),name:t.name??"新智能体",description:t.description??"",systemPrompt:t.systemPrompt??"",contextPlaceholders:t.contextPlaceholders??[],capabilities:t.capabilities??{profileId:"",enabledTools:[],enabledSkills:[],enabledMCPServers:[]},maxIterations:t.maxIterations??10,isDefault:t.isDefault??!1,created:n,updated:n,...t};return this.agentDefs.upsert(r),Promise.resolve(r)}updateAgentDef(t,n){const r={...this.agentDefs.list().find(l=>l.id===t),...n,id:t,updated:new Date().toISOString()};return this.agentDefs.upsert(r),Promise.resolve(r)}async deleteAgentDef(t){this.agentDefs.remove(t)}async setActiveAgentDef(t){return this.agentDefs.list().forEach(n=>{this.agentDefs.upsert({...n,isDefault:n.id===t})}),{activeAgentId:t}}lspList(){return Promise.resolve(this.lspServers.list())}lspSave(t){const n={id:t.id??crypto.randomUUID(),enabled:!0,...t};return this.lspServers.upsert(n),Promise.resolve()}async lspDelete(t){this.lspServers.remove(t)}lspSetEnabled(t,n){const r=this.lspServers.list().find(l=>l.id===t);return r&&this.lspServers.upsert({...r,enabled:n}),Promise.resolve()}listUploads(){return Promise.resolve([...this.uploads.values()])}getUpload(t){return Promise.resolve(this.uploads.get(t)??null)}async saveUpload(t){const n=t.id??crypto.randomUUID();this.uploads.set(n,{...t,id:n})}async deleteUpload(t){this.uploads.delete(t)}async cronCreate(t,n){return{id:crypto.randomUUID(),cron:t,prompt:n,createdAt:Date.now(),recurring:!0,enabled:!1,label:"Web 端暂不执行"}}async cronPause(){return null}async cronResume(){return null}async cronDelete(){return!0}async cronDeleteAll(){return{ok:!0}}async cronList(){return[]}async openFileDialog(){return null}async readFile(){throw new Error("Web 端不支持直接读取本地文件")}async writeFile(){throw new Error("Web 端不支持直接写入本地文件")}async hideWindow(){}async showWindow(){}async isWindowVisible(){return!0}async wakeStop(){return{ok:!0}}async wakeConversation(t){return{ok:!0,conversation:t}}async ttsSpeak(){return{ok:!1}}async ttsStop(){return{ok:!0}}async ttsPlaybackEnded(){return{ok:!0}}onTtsStart(){return()=>{}}onTtsPcm(){return()=>{}}onTtsStreamEnd(){return()=>{}}onTtsFlush(){return()=>{}}onTtsEnd(){return()=>{}}onWake(){return()=>{}}onWakeCommand(){return()=>{}}dispatch(t,n){const r={...n,_sid:t};for(const l of this.listeners)try{l(r)}catch{}}settle(t){const n=this.pendingRuns.get(t);n&&(this.pendingRuns.delete(t),n())}openStream(t,n,r={}){if(this.streams.has(t))return Promise.resolve();this.thinkFilters.set(t,new ap);const l=new URLSearchParams({sessionId:t});Number.isSafeInteger(n==null?void 0:n.sequence)&&l.set("afterSequence",String(n.sequence)),n!=null&&n.runId&&l.set("afterRunId",n.runId);const i=new EventSource(`/api/agent/stream?${l.toString()}`);let o=!1;this.streams.set(t,i);const u=r.waitForOpen!==!1;let s=u,c=null,h=null,v=null;const p=u?new Promise((g,m)=>{h=g,v=m,c=setTimeout(()=>{s=!1,m(new Error("事件流连接超时"))},8e3)}):Promise.resolve();return i.onopen=()=>{s&&(s=!1,c&&clearTimeout(c),h==null||h())},i.onmessage=g=>{var y;if(!g.data)return;let m;try{m=JSON.parse(g.data)}catch{return}if(m.type==="text_chunk"&&typeof m.text=="string"&&(m.text=this.thinkFilters.get(t).push(m.text)),typeof m._nativeSequence=="number"&&this.rememberNativeSnapshot(t,m._nativeSequence,typeof m._nativeRunId=="string"?m._nativeRunId:void 0),m.type==="done"||m.type==="error"||m.type==="turn_aborted"){const k=((y=this.thinkFilters.get(t))==null?void 0:y.flush())??"";k&&m.type==="done"&&typeof m.finalText=="string"&&(m.finalText=m.finalText+k),o=!0}m.type==="text_chunk"&&m.text===""||(this.dispatch(t,m),(m.type==="done"||m.type==="error"||m.type==="turn_aborted")&&(this.closeStream(t),this.settle(t)))},i.onerror=()=>{if(s&&i.readyState===EventSource.CLOSED){s=!1,c&&clearTimeout(c),v==null||v(new Error("事件流连接失败"));return}if(i.readyState===EventSource.CLOSED){if(this.closeStream(t),o){this.settle(t);return}(async()=>{let g="";for(let m=0;m<8&&!g;m++){m>0&&await new Promise(y=>setTimeout(y,750));try{const y=await this.getSession(t,{limit:50}),k=(y==null?void 0:y.messages)??[],f=k.map(d=>d.role).lastIndexOf("user"),a=k.slice(f+1).filter(d=>d.role==="assistant"&&(d.content??"").trim()).map(d=>d.content.trim()).join(`
|
|
40
|
+
`+i.stack}return{value:e,source:t,stack:l,digest:null}}function Yl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ji(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Dd=typeof WeakMap=="function"?WeakMap:Map;function Ka(e,t,n){n=Be(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){el||(el=!0,Hi=r),ji(e,t)},n}function Ya(e,t,n){n=Be(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){ji(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){ji(e,t),typeof r!="function"&&(ut===null?ut=new Set([this]):ut.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Du(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Dd;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Xd.bind(null,e,t,n),t.then(e,e))}function Mu(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ou(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Be(-1,1),t.tag=2,ot(n,t,1))),n.lanes|=1),e)}var Md=Xe.ReactCurrentOwner,ae=!1;function le(e,t,n,r){t.child=e===null?Ea(t,null,n,r):bt(t,e.child,n,r)}function Uu(e,t,n,r,l){n=n.render;var i=t.ref;return Xt(t,l),r=Co(e,t,n,r,i,l),n=Ro(),e!==null&&!ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ye(e,t,l)):(U&&n&&ho(t),t.flags|=1,le(e,t,r,l),t.child)}function Fu(e,t,n,r,l){if(e===null){var i=n.type;return typeof i=="function"&&!Uo(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Xa(e,t,i,r,l)):(e=jr(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&l)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Fn,n(o,r)&&e.ref===t.ref)return Ye(e,t,l)}return t.flags|=1,e=at(i,r),e.ref=t.ref,e.return=t,t.child=e}function Xa(e,t,n,r,l){if(e!==null){var i=e.memoizedProps;if(Fn(i,r)&&e.ref===t.ref)if(ae=!1,t.pendingProps=r=i,(e.lanes&l)!==0)e.flags&131072&&(ae=!0);else return t.lanes=e.lanes,Ye(e,t,l)}return Di(e,t,n,r,l)}function Ga(e,t,n){var r=t.pendingProps,l=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},D(Ht,pe),pe|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,D(Ht,pe),pe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,D(Ht,pe),pe|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,D(Ht,pe),pe|=r;return le(e,t,l,n),t.child}function Ja(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Di(e,t,n,r,l){var i=fe(n)?xt:re.current;return i=Zt(t,i),Xt(t,l),n=Co(e,t,n,r,i,l),r=Ro(),e!==null&&!ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ye(e,t,l)):(U&&r&&ho(t),t.flags|=1,le(e,t,n,l),t.child)}function $u(e,t,n,r,l){if(fe(n)){var i=!0;Vr(t)}else i=!1;if(Xt(t,l),t.stateNode===null)Tr(e,t),Qa(t,n,r),zi(t,n,r,l),r=!0;else if(e===null){var o=t.stateNode,u=t.memoizedProps;o.props=u;var s=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=_e(c):(c=fe(n)?xt:re.current,c=Zt(t,c));var h=n.getDerivedStateFromProps,v=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";v||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==r||s!==c)&&ju(t,o,r,c),Ze=!1;var p=t.memoizedState;o.state=p,Gr(t,r,o,l),s=t.memoizedState,u!==r||p!==s||ce.current||Ze?(typeof h=="function"&&(Li(t,n,h,r),s=t.memoizedState),(u=Ze||zu(t,n,u,r,p,s,c))?(v||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),o.props=r,o.state=s,o.context=c,r=u):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,xa(e,t),u=t.memoizedProps,c=t.type===t.elementType?u:Re(t.type,u),o.props=c,v=t.pendingProps,p=o.context,s=n.contextType,typeof s=="object"&&s!==null?s=_e(s):(s=fe(n)?xt:re.current,s=Zt(t,s));var g=n.getDerivedStateFromProps;(h=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==v||p!==s)&&ju(t,o,r,s),Ze=!1,p=t.memoizedState,o.state=p,Gr(t,r,o,l);var m=t.memoizedState;u!==v||p!==m||ce.current||Ze?(typeof g=="function"&&(Li(t,n,g,r),m=t.memoizedState),(c=Ze||zu(t,n,c,r,p,m,s)||!1)?(h||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,s),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,s)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=s,r=c):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Mi(e,t,n,r,i,l)}function Mi(e,t,n,r,l,i){Ja(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return l&&xu(t,n,!1),Ye(e,t,i);r=t.stateNode,Md.current=t;var u=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=bt(t,e.child,null,i),t.child=bt(t,null,u,i)):le(e,t,u,i),t.memoizedState=r.state,l&&xu(t,n,!0),t.child}function Za(e){var t=e.stateNode;t.pendingContext?_u(e,t.pendingContext,t.pendingContext!==t.context):t.context&&_u(e,t.context,!1),Eo(e,t.containerInfo)}function Au(e,t,n,r,l){return qt(),vo(l),t.flags|=256,le(e,t,n,r),t.child}var Oi={dehydrated:null,treeContext:null,retryLane:0};function Ui(e){return{baseLanes:e,cachePool:null,transitions:null}}function qa(e,t,n){var r=t.pendingProps,l=F.current,i=!1,o=(t.flags&128)!==0,u;if((u=o)||(u=e!==null&&e.memoizedState===null?!1:(l&2)!==0),u?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),D(F,l&1),e===null)return Ii(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=ml(o,r,0,null),e=_t(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Ui(n),t.memoizedState=Oi,e):To(t,o));if(l=e.memoizedState,l!==null&&(u=l.dehydrated,u!==null))return Od(e,t,o,r,u,l,n);if(i){i=r.fallback,o=t.mode,l=e.child,u=l.sibling;var s={mode:"hidden",children:r.children};return!(o&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=at(l,s),r.subtreeFlags=l.subtreeFlags&14680064),u!==null?i=at(u,i):(i=_t(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Ui(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Oi,r}return i=e.child,e=i.sibling,r=at(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function To(e,t){return t=ml({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function mr(e,t,n,r){return r!==null&&vo(r),bt(t,e.child,null,n),e=To(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Od(e,t,n,r,l,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Yl(Error(S(422))),mr(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,l=t.mode,r=ml({mode:"visible",children:r.children},l,0,null),i=_t(i,l,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&bt(t,e.child,null,o),t.child.memoizedState=Ui(o),t.memoizedState=Oi,i);if(!(t.mode&1))return mr(e,t,o,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var u=r.dgst;return r=u,i=Error(S(419)),r=Yl(i,r,void 0),mr(e,t,o,r)}if(u=(o&e.childLanes)!==0,ae||u){if(r=J,r!==null){switch(o&-o){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|o)?0:l,l!==0&&l!==i.retryLane&&(i.retryLane=l,Ke(e,l),Le(r,e,l,-1))}return Oo(),r=Yl(Error(S(421))),mr(e,t,o,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Gd.bind(null,e),l._reactRetry=t,null):(e=i.treeContext,he=it(l.nextSibling),me=t,U=!0,Ie=null,e!==null&&(we[Se++]=Ae,we[Se++]=We,we[Se++]=Pt,Ae=e.id,We=e.overflow,Pt=t),t=To(t,r.children),t.flags|=4096,t)}function Wu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ti(e.return,t,n)}function Xl(e,t,n,r,l){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=l)}function ba(e,t,n){var r=t.pendingProps,l=r.revealOrder,i=r.tail;if(le(e,t,r.children,n),r=F.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wu(e,n,t);else if(e.tag===19)Wu(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(D(F,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Jr(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Xl(t,!1,l,n,i);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Jr(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Xl(t,!0,n,null,i);break;case"together":Xl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Tr(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ye(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Rt|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(S(153));if(t.child!==null){for(e=t.child,n=at(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=at(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ud(e,t,n){switch(t.tag){case 3:Za(t),qt();break;case 5:Pa(t);break;case 1:fe(t.type)&&Vr(t);break;case 4:Eo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;D(Yr,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(D(F,F.current&1),t.flags|=128,null):n&t.child.childLanes?qa(e,t,n):(D(F,F.current&1),e=Ye(e,t,n),e!==null?e.sibling:null);D(F,F.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ba(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),D(F,F.current),r)break;return null;case 22:case 23:return t.lanes=0,Ga(e,t,n)}return Ye(e,t,n)}var ec,Fi,tc,nc;ec=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Fi=function(){};tc=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,kt(Ue.current);var i=null;switch(n){case"input":l=oi(e,l),r=oi(e,r),i=[];break;case"select":l=A({},l,{value:void 0}),r=A({},r,{value:void 0}),i=[];break;case"textarea":l=ai(e,l),r=ai(e,r),i=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Br)}fi(n,r);var o;n=null;for(c in l)if(!r.hasOwnProperty(c)&&l.hasOwnProperty(c)&&l[c]!=null)if(c==="style"){var u=l[c];for(o in u)u.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ln.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var s=r[c];if(u=l!=null?l[c]:void 0,r.hasOwnProperty(c)&&s!==u&&(s!=null||u!=null))if(c==="style")if(u){for(o in u)!u.hasOwnProperty(o)||s&&s.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in s)s.hasOwnProperty(o)&&u[o]!==s[o]&&(n||(n={}),n[o]=s[o])}else n||(i||(i=[]),i.push(c,n)),n=s;else c==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,u=u?u.__html:void 0,s!=null&&u!==s&&(i=i||[]).push(c,s)):c==="children"?typeof s!="string"&&typeof s!="number"||(i=i||[]).push(c,""+s):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ln.hasOwnProperty(c)?(s!=null&&c==="onScroll"&&M("scroll",e),i||u===s||(i=[])):(i=i||[]).push(c,s))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};nc=function(e,t,n,r){n!==r&&(t.flags|=4)};function vn(e,t){if(!U)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function te(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Fd(e,t,n){var r=t.pendingProps;switch(mo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return te(t),null;case 1:return fe(t.type)&&Hr(),te(t),null;case 3:return r=t.stateNode,en(),O(ce),O(re),xo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(pr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ie!==null&&(Ki(Ie),Ie=null))),Fi(e,t),te(t),null;case 5:_o(t);var l=kt(Hn.current);if(n=t.type,e!==null&&t.stateNode!=null)tc(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(S(166));return te(t),null}if(e=kt(Ue.current),pr(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Me]=t,r[Wn]=i,e=(t.mode&1)!==0,n){case"dialog":M("cancel",r),M("close",r);break;case"iframe":case"object":case"embed":M("load",r);break;case"video":case"audio":for(l=0;l<kn.length;l++)M(kn[l],r);break;case"source":M("error",r);break;case"img":case"image":case"link":M("error",r),M("load",r);break;case"details":M("toggle",r);break;case"input":Jo(r,i),M("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},M("invalid",r);break;case"textarea":qo(r,i),M("invalid",r)}fi(n,i),l=null;for(var o in i)if(i.hasOwnProperty(o)){var u=i[o];o==="children"?typeof u=="string"?r.textContent!==u&&(i.suppressHydrationWarning!==!0&&dr(r.textContent,u,e),l=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(i.suppressHydrationWarning!==!0&&dr(r.textContent,u,e),l=["children",""+u]):Ln.hasOwnProperty(o)&&u!=null&&o==="onScroll"&&M("scroll",r)}switch(n){case"input":lr(r),Zo(r,i,!0);break;case"textarea":lr(r),bo(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Br)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ts(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Me]=t,e[Wn]=r,ec(e,t,!1,!1),t.stateNode=e;e:{switch(o=di(n,r),n){case"dialog":M("cancel",e),M("close",e),l=r;break;case"iframe":case"object":case"embed":M("load",e),l=r;break;case"video":case"audio":for(l=0;l<kn.length;l++)M(kn[l],e);l=r;break;case"source":M("error",e),l=r;break;case"img":case"image":case"link":M("error",e),M("load",e),l=r;break;case"details":M("toggle",e),l=r;break;case"input":Jo(e,r),l=oi(e,r),M("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=A({},r,{value:void 0}),M("invalid",e);break;case"textarea":qo(e,r),l=ai(e,r),M("invalid",e);break;default:l=r}fi(n,l),u=l;for(i in u)if(u.hasOwnProperty(i)){var s=u[i];i==="style"?js(e,s):i==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&Ls(e,s)):i==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&zn(e,s):typeof s=="number"&&zn(e,""+s):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ln.hasOwnProperty(i)?s!=null&&i==="onScroll"&&M("scroll",e):s!=null&&bi(e,i,s,o))}switch(n){case"input":lr(e),Zo(e,r,!1);break;case"textarea":lr(e),bo(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ct(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Vt(e,!!r.multiple,i,!1):r.defaultValue!=null&&Vt(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Br)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return te(t),null;case 6:if(e&&t.stateNode!=null)nc(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(S(166));if(n=kt(Hn.current),kt(Ue.current),pr(t)){if(r=t.stateNode,n=t.memoizedProps,r[Me]=t,(i=r.nodeValue!==n)&&(e=me,e!==null))switch(e.tag){case 3:dr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&dr(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Me]=t,t.stateNode=r}return te(t),null;case 13:if(O(F),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(U&&he!==null&&t.mode&1&&!(t.flags&128))Sa(),qt(),t.flags|=98560,i=!1;else if(i=pr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(S(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(S(317));i[Me]=t}else qt(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;te(t),i=!1}else Ie!==null&&(Ki(Ie),Ie=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||F.current&1?Y===0&&(Y=3):Oo())),t.updateQueue!==null&&(t.flags|=4),te(t),null);case 4:return en(),Fi(e,t),e===null&&$n(t.stateNode.containerInfo),te(t),null;case 10:return wo(t.type._context),te(t),null;case 17:return fe(t.type)&&Hr(),te(t),null;case 19:if(O(F),i=t.memoizedState,i===null)return te(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)vn(i,!1);else{if(Y!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Jr(e),o!==null){for(t.flags|=128,vn(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return D(F,F.current&1|2),t.child}e=e.sibling}i.tail!==null&&V()>nn&&(t.flags|=128,r=!0,vn(i,!1),t.lanes=4194304)}else{if(!r)if(e=Jr(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vn(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!U)return te(t),null}else 2*V()-i.renderingStartTime>nn&&n!==1073741824&&(t.flags|=128,r=!0,vn(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=V(),t.sibling=null,n=F.current,D(F,r?n&1|2:n&1),t):(te(t),null);case 22:case 23:return Mo(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?pe&1073741824&&(te(t),t.subtreeFlags&6&&(t.flags|=8192)):te(t),null;case 24:return null;case 25:return null}throw Error(S(156,t.tag))}function $d(e,t){switch(mo(t),t.tag){case 1:return fe(t.type)&&Hr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return en(),O(ce),O(re),xo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return _o(t),null;case 13:if(O(F),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));qt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(F),null;case 4:return en(),null;case 10:return wo(t.type._context),null;case 22:case 23:return Mo(),null;case 24:return null;default:return null}}var vr=!1,ne=!1,Ad=typeof WeakSet=="function"?WeakSet:Set,_=null;function Bt(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){W(e,t,r)}else n.current=null}function $i(e,t,n){try{n()}catch(r){W(e,t,r)}}var Bu=!1;function Wd(e,t){if(Ei=$r,e=ua(),po(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,u=-1,s=-1,c=0,h=0,v=e,p=null;t:for(;;){for(var g;v!==n||l!==0&&v.nodeType!==3||(u=o+l),v!==i||r!==0&&v.nodeType!==3||(s=o+r),v.nodeType===3&&(o+=v.nodeValue.length),(g=v.firstChild)!==null;)p=v,v=g;for(;;){if(v===e)break t;if(p===n&&++c===l&&(u=o),p===i&&++h===r&&(s=o),(g=v.nextSibling)!==null)break;v=p,p=v.parentNode}v=g}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(_i={focusedElem:e,selectionRange:n},$r=!1,_=t;_!==null;)if(t=_,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_=e;else for(;_!==null;){t=_;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,k=m.memoizedState,f=t.stateNode,a=f.getSnapshotBeforeUpdate(t.elementType===t.type?y:Re(t.type,y),k);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(S(163))}}catch(w){W(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,_=e;break}_=t.return}return m=Bu,Bu=!1,m}function Nn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&$i(t,n,i)}l=l.next}while(l!==r)}}function pl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ai(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function rc(e){var t=e.alternate;t!==null&&(e.alternate=null,rc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Me],delete t[Wn],delete t[Ci],delete t[_d],delete t[xd])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function lc(e){return e.tag===5||e.tag===3||e.tag===4}function Hu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||lc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Wi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Br));else if(r!==4&&(e=e.child,e!==null))for(Wi(e,t,n),e=e.sibling;e!==null;)Wi(e,t,n),e=e.sibling}function Bi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Bi(e,t,n),e=e.sibling;e!==null;)Bi(e,t,n),e=e.sibling}var Z=null,Ne=!1;function Ge(e,t,n){for(n=n.child;n!==null;)ic(e,t,n),n=n.sibling}function ic(e,t,n){if(Oe&&typeof Oe.onCommitFiberUnmount=="function")try{Oe.onCommitFiberUnmount(il,n)}catch{}switch(n.tag){case 5:ne||Bt(n,t);case 6:var r=Z,l=Ne;Z=null,Ge(e,t,n),Z=r,Ne=l,Z!==null&&(Ne?(e=Z,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Z.removeChild(n.stateNode));break;case 18:Z!==null&&(Ne?(e=Z,n=n.stateNode,e.nodeType===8?Wl(e.parentNode,n):e.nodeType===1&&Wl(e,n),On(e)):Wl(Z,n.stateNode));break;case 4:r=Z,l=Ne,Z=n.stateNode.containerInfo,Ne=!0,Ge(e,t,n),Z=r,Ne=l;break;case 0:case 11:case 14:case 15:if(!ne&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&$i(n,t,o),l=l.next}while(l!==r)}Ge(e,t,n);break;case 1:if(!ne&&(Bt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){W(n,t,u)}Ge(e,t,n);break;case 21:Ge(e,t,n);break;case 22:n.mode&1?(ne=(r=ne)||n.memoizedState!==null,Ge(e,t,n),ne=r):Ge(e,t,n);break;default:Ge(e,t,n)}}function Vu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ad),t.forEach(function(r){var l=Jd.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Ce(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var i=e,o=t,u=o;e:for(;u!==null;){switch(u.tag){case 5:Z=u.stateNode,Ne=!1;break e;case 3:Z=u.stateNode.containerInfo,Ne=!0;break e;case 4:Z=u.stateNode.containerInfo,Ne=!0;break e}u=u.return}if(Z===null)throw Error(S(160));ic(i,o,l),Z=null,Ne=!1;var s=l.alternate;s!==null&&(s.return=null),l.return=null}catch(c){W(l,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)oc(t,e),t=t.sibling}function oc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ce(t,e),je(e),r&4){try{Nn(3,e,e.return),pl(3,e)}catch(y){W(e,e.return,y)}try{Nn(5,e,e.return)}catch(y){W(e,e.return,y)}}break;case 1:Ce(t,e),je(e),r&512&&n!==null&&Bt(n,n.return);break;case 5:if(Ce(t,e),je(e),r&512&&n!==null&&Bt(n,n.return),e.flags&32){var l=e.stateNode;try{zn(l,"")}catch(y){W(e,e.return,y)}}if(r&4&&(l=e.stateNode,l!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,u=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{u==="input"&&i.type==="radio"&&i.name!=null&&Ns(l,i),di(u,o);var c=di(u,i);for(o=0;o<s.length;o+=2){var h=s[o],v=s[o+1];h==="style"?js(l,v):h==="dangerouslySetInnerHTML"?Ls(l,v):h==="children"?zn(l,v):bi(l,h,v,c)}switch(u){case"input":ui(l,i);break;case"textarea":Is(l,i);break;case"select":var p=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!i.multiple;var g=i.value;g!=null?Vt(l,!!i.multiple,g,!1):p!==!!i.multiple&&(i.defaultValue!=null?Vt(l,!!i.multiple,i.defaultValue,!0):Vt(l,!!i.multiple,i.multiple?[]:"",!1))}l[Wn]=i}catch(y){W(e,e.return,y)}}break;case 6:if(Ce(t,e),je(e),r&4){if(e.stateNode===null)throw Error(S(162));l=e.stateNode,i=e.memoizedProps;try{l.nodeValue=i}catch(y){W(e,e.return,y)}}break;case 3:if(Ce(t,e),je(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{On(t.containerInfo)}catch(y){W(e,e.return,y)}break;case 4:Ce(t,e),je(e);break;case 13:Ce(t,e),je(e),l=e.child,l.flags&8192&&(i=l.memoizedState!==null,l.stateNode.isHidden=i,!i||l.alternate!==null&&l.alternate.memoizedState!==null||(jo=V())),r&4&&Vu(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(ne=(c=ne)||h,Ce(t,e),ne=c):Ce(t,e),je(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!h&&e.mode&1)for(_=e,h=e.child;h!==null;){for(v=_=h;_!==null;){switch(p=_,g=p.child,p.tag){case 0:case 11:case 14:case 15:Nn(4,p,p.return);break;case 1:Bt(p,p.return);var m=p.stateNode;if(typeof m.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(y){W(r,n,y)}}break;case 5:Bt(p,p.return);break;case 22:if(p.memoizedState!==null){Ku(v);continue}}g!==null?(g.return=p,_=g):Ku(v)}h=h.sibling}e:for(h=null,v=e;;){if(v.tag===5){if(h===null){h=v;try{l=v.stateNode,c?(i=l.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(u=v.stateNode,s=v.memoizedProps.style,o=s!=null&&s.hasOwnProperty("display")?s.display:null,u.style.display=zs("display",o))}catch(y){W(e,e.return,y)}}}else if(v.tag===6){if(h===null)try{v.stateNode.nodeValue=c?"":v.memoizedProps}catch(y){W(e,e.return,y)}}else if((v.tag!==22&&v.tag!==23||v.memoizedState===null||v===e)&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===e)break e;for(;v.sibling===null;){if(v.return===null||v.return===e)break e;h===v&&(h=null),v=v.return}h===v&&(h=null),v.sibling.return=v.return,v=v.sibling}}break;case 19:Ce(t,e),je(e),r&4&&Vu(e);break;case 21:break;default:Ce(t,e),je(e)}}function je(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(lc(n)){var r=n;break e}n=n.return}throw Error(S(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(zn(l,""),r.flags&=-33);var i=Hu(e);Bi(e,i,l);break;case 3:case 4:var o=r.stateNode.containerInfo,u=Hu(e);Wi(e,u,o);break;default:throw Error(S(161))}}catch(s){W(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Bd(e,t,n){_=e,uc(e)}function uc(e,t,n){for(var r=(e.mode&1)!==0;_!==null;){var l=_,i=l.child;if(l.tag===22&&r){var o=l.memoizedState!==null||vr;if(!o){var u=l.alternate,s=u!==null&&u.memoizedState!==null||ne;u=vr;var c=ne;if(vr=o,(ne=s)&&!c)for(_=l;_!==null;)o=_,s=o.child,o.tag===22&&o.memoizedState!==null?Yu(l):s!==null?(s.return=o,_=s):Yu(l);for(;i!==null;)_=i,uc(i),i=i.sibling;_=l,vr=u,ne=c}Qu(e)}else l.subtreeFlags&8772&&i!==null?(i.return=l,_=i):Qu(e)}}function Qu(e){for(;_!==null;){var t=_;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ne||pl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ne)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:Re(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Iu(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Iu(t,o,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var h=c.memoizedState;if(h!==null){var v=h.dehydrated;v!==null&&On(v)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(S(163))}ne||t.flags&512&&Ai(t)}catch(p){W(t,t.return,p)}}if(t===e){_=null;break}if(n=t.sibling,n!==null){n.return=t.return,_=n;break}_=t.return}}function Ku(e){for(;_!==null;){var t=_;if(t===e){_=null;break}var n=t.sibling;if(n!==null){n.return=t.return,_=n;break}_=t.return}}function Yu(e){for(;_!==null;){var t=_;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{pl(4,t)}catch(s){W(t,n,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(s){W(t,l,s)}}var i=t.return;try{Ai(t)}catch(s){W(t,i,s)}break;case 5:var o=t.return;try{Ai(t)}catch(s){W(t,o,s)}}}catch(s){W(t,t.return,s)}if(t===e){_=null;break}var u=t.sibling;if(u!==null){u.return=t.return,_=u;break}_=t.return}}var Hd=Math.ceil,br=Xe.ReactCurrentDispatcher,Lo=Xe.ReactCurrentOwner,Ee=Xe.ReactCurrentBatchConfig,z=0,J=null,Q=null,q=0,pe=0,Ht=pt(0),Y=0,Yn=null,Rt=0,hl=0,zo=0,In=null,se=null,jo=0,nn=1/0,Fe=null,el=!1,Hi=null,ut=null,gr=!1,tt=null,tl=0,Tn=0,Vi=null,Lr=-1,zr=0;function ie(){return z&6?V():Lr!==-1?Lr:Lr=V()}function st(e){return e.mode&1?z&2&&q!==0?q&-q:Cd.transition!==null?(zr===0&&(zr=Qs()),zr):(e=j,e!==0||(e=window.event,e=e===void 0?16:qs(e.type)),e):1}function Le(e,t,n,r){if(50<Tn)throw Tn=0,Vi=null,Error(S(185));Jn(e,n,r),(!(z&2)||e!==J)&&(e===J&&(!(z&2)&&(hl|=n),Y===4&&be(e,q)),de(e,r),n===1&&z===0&&!(t.mode&1)&&(nn=V()+500,cl&&ht()))}function de(e,t){var n=e.callbackNode;Cf(e,t);var r=Fr(e,e===J?q:0);if(r===0)n!==null&&nu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&nu(n),t===1)e.tag===0?Pd(Xu.bind(null,e)):ga(Xu.bind(null,e)),kd(function(){!(z&6)&&ht()}),n=null;else{switch(Ks(r)){case 1:n=lo;break;case 4:n=Hs;break;case 16:n=Ur;break;case 536870912:n=Vs;break;default:n=Ur}n=mc(n,sc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function sc(e,t){if(Lr=-1,zr=0,z&6)throw Error(S(327));var n=e.callbackNode;if(Gt()&&e.callbackNode!==n)return null;var r=Fr(e,e===J?q:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=nl(e,r);else{t=r;var l=z;z|=2;var i=cc();(J!==e||q!==t)&&(Fe=null,nn=V()+500,Et(e,t));do try{Kd();break}catch(u){ac(e,u)}while(!0);yo(),br.current=i,z=l,Q!==null?t=0:(J=null,q=0,t=Y)}if(t!==0){if(t===2&&(l=gi(e),l!==0&&(r=l,t=Qi(e,l))),t===1)throw n=Yn,Et(e,0),be(e,r),de(e,V()),n;if(t===6)be(e,r);else{if(l=e.current.alternate,!(r&30)&&!Vd(l)&&(t=nl(e,r),t===2&&(i=gi(e),i!==0&&(r=i,t=Qi(e,i))),t===1))throw n=Yn,Et(e,0),be(e,r),de(e,V()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(S(345));case 2:yt(e,se,Fe);break;case 3:if(be(e,r),(r&130023424)===r&&(t=jo+500-V(),10<t)){if(Fr(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){ie(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Pi(yt.bind(null,e,se,Fe),t);break}yt(e,se,Fe);break;case 4:if(be(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var o=31-Te(r);i=1<<o,o=t[o],o>l&&(l=o),r&=~i}if(r=l,r=V()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Hd(r/1960))-r,10<r){e.timeoutHandle=Pi(yt.bind(null,e,se,Fe),r);break}yt(e,se,Fe);break;case 5:yt(e,se,Fe);break;default:throw Error(S(329))}}}return de(e,V()),e.callbackNode===n?sc.bind(null,e):null}function Qi(e,t){var n=In;return e.current.memoizedState.isDehydrated&&(Et(e,t).flags|=256),e=nl(e,t),e!==2&&(t=se,se=n,t!==null&&Ki(t)),e}function Ki(e){se===null?se=e:se.push.apply(se,e)}function Vd(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],i=l.getSnapshot;l=l.value;try{if(!ze(i(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function be(e,t){for(t&=~zo,t&=~hl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Te(t),r=1<<n;e[n]=-1,t&=~r}}function Xu(e){if(z&6)throw Error(S(327));Gt();var t=Fr(e,0);if(!(t&1))return de(e,V()),null;var n=nl(e,t);if(e.tag!==0&&n===2){var r=gi(e);r!==0&&(t=r,n=Qi(e,r))}if(n===1)throw n=Yn,Et(e,0),be(e,t),de(e,V()),n;if(n===6)throw Error(S(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yt(e,se,Fe),de(e,V()),null}function Do(e,t){var n=z;z|=1;try{return e(t)}finally{z=n,z===0&&(nn=V()+500,cl&&ht())}}function Nt(e){tt!==null&&tt.tag===0&&!(z&6)&&Gt();var t=z;z|=1;var n=Ee.transition,r=j;try{if(Ee.transition=null,j=1,e)return e()}finally{j=r,Ee.transition=n,z=t,!(z&6)&&ht()}}function Mo(){pe=Ht.current,O(Ht)}function Et(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Sd(n)),Q!==null)for(n=Q.return;n!==null;){var r=n;switch(mo(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Hr();break;case 3:en(),O(ce),O(re),xo();break;case 5:_o(r);break;case 4:en();break;case 13:O(F);break;case 19:O(F);break;case 10:wo(r.type._context);break;case 22:case 23:Mo()}n=n.return}if(J=e,Q=e=at(e.current,null),q=pe=t,Y=0,Yn=null,zo=hl=Rt=0,se=In=null,St!==null){for(t=0;t<St.length;t++)if(n=St[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=l,r.next=o}n.pending=r}St=null}return e}function ac(e,t){do{var n=Q;try{if(yo(),Nr.current=qr,Zr){for(var r=$.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}Zr=!1}if(Ct=0,G=K=$=null,Rn=!1,Vn=0,Lo.current=null,n===null||n.return===null){Y=1,Yn=t,Q=null;break}e:{var i=e,o=n.return,u=n,s=t;if(t=q,u.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=s,h=u,v=h.tag;if(!(h.mode&1)&&(v===0||v===11||v===15)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var g=Mu(o);if(g!==null){g.flags&=-257,Ou(g,o,u,i,t),g.mode&1&&Du(i,c,t),t=g,s=c;var m=t.updateQueue;if(m===null){var y=new Set;y.add(s),t.updateQueue=y}else m.add(s);break e}else{if(!(t&1)){Du(i,c,t),Oo();break e}s=Error(S(426))}}else if(U&&u.mode&1){var k=Mu(o);if(k!==null){!(k.flags&65536)&&(k.flags|=256),Ou(k,o,u,i,t),vo(tn(s,u));break e}}i=s=tn(s,u),Y!==4&&(Y=2),In===null?In=[i]:In.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var f=Ka(i,s,t);Nu(i,f);break e;case 1:u=s;var a=i.type,d=i.stateNode;if(!(i.flags&128)&&(typeof a.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(ut===null||!ut.has(d)))){i.flags|=65536,t&=-t,i.lanes|=t;var w=Ya(i,u,t);Nu(i,w);break e}}i=i.return}while(i!==null)}dc(n)}catch(E){t=E,Q===n&&n!==null&&(Q=n=n.return);continue}break}while(!0)}function cc(){var e=br.current;return br.current=qr,e===null?qr:e}function Oo(){(Y===0||Y===3||Y===2)&&(Y=4),J===null||!(Rt&268435455)&&!(hl&268435455)||be(J,q)}function nl(e,t){var n=z;z|=2;var r=cc();(J!==e||q!==t)&&(Fe=null,Et(e,t));do try{Qd();break}catch(l){ac(e,l)}while(!0);if(yo(),z=n,br.current=r,Q!==null)throw Error(S(261));return J=null,q=0,Y}function Qd(){for(;Q!==null;)fc(Q)}function Kd(){for(;Q!==null&&!gf();)fc(Q)}function fc(e){var t=hc(e.alternate,e,pe);e.memoizedProps=e.pendingProps,t===null?dc(e):Q=t,Lo.current=null}function dc(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=$d(n,t),n!==null){n.flags&=32767,Q=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Y=6,Q=null;return}}else if(n=Fd(n,t,pe),n!==null){Q=n;return}if(t=t.sibling,t!==null){Q=t;return}Q=t=e}while(t!==null);Y===0&&(Y=5)}function yt(e,t,n){var r=j,l=Ee.transition;try{Ee.transition=null,j=1,Yd(e,t,n,r)}finally{Ee.transition=l,j=r}return null}function Yd(e,t,n,r){do Gt();while(tt!==null);if(z&6)throw Error(S(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(S(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Rf(e,i),e===J&&(Q=J=null,q=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||gr||(gr=!0,mc(Ur,function(){return Gt(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Ee.transition,Ee.transition=null;var o=j;j=1;var u=z;z|=4,Lo.current=null,Wd(e,n),oc(n,e),pd(_i),$r=!!Ei,_i=Ei=null,e.current=n,Bd(n),yf(),z=u,j=o,Ee.transition=i}else e.current=n;if(gr&&(gr=!1,tt=e,tl=l),i=e.pendingLanes,i===0&&(ut=null),kf(n.stateNode),de(e,V()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(el)throw el=!1,e=Hi,Hi=null,e;return tl&1&&e.tag!==0&&Gt(),i=e.pendingLanes,i&1?e===Vi?Tn++:(Tn=0,Vi=e):Tn=0,ht(),null}function Gt(){if(tt!==null){var e=Ks(tl),t=Ee.transition,n=j;try{if(Ee.transition=null,j=16>e?16:e,tt===null)var r=!1;else{if(e=tt,tt=null,tl=0,z&6)throw Error(S(331));var l=z;for(z|=4,_=e.current;_!==null;){var i=_,o=i.child;if(_.flags&16){var u=i.deletions;if(u!==null){for(var s=0;s<u.length;s++){var c=u[s];for(_=c;_!==null;){var h=_;switch(h.tag){case 0:case 11:case 15:Nn(8,h,i)}var v=h.child;if(v!==null)v.return=h,_=v;else for(;_!==null;){h=_;var p=h.sibling,g=h.return;if(rc(h),h===c){_=null;break}if(p!==null){p.return=g,_=p;break}_=g}}}var m=i.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var k=y.sibling;y.sibling=null,y=k}while(y!==null)}}_=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,_=o;else e:for(;_!==null;){if(i=_,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Nn(9,i,i.return)}var f=i.sibling;if(f!==null){f.return=i.return,_=f;break e}_=i.return}}var a=e.current;for(_=a;_!==null;){o=_;var d=o.child;if(o.subtreeFlags&2064&&d!==null)d.return=o,_=d;else e:for(o=a;_!==null;){if(u=_,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:pl(9,u)}}catch(E){W(u,u.return,E)}if(u===o){_=null;break e}var w=u.sibling;if(w!==null){w.return=u.return,_=w;break e}_=u.return}}if(z=l,ht(),Oe&&typeof Oe.onPostCommitFiberRoot=="function")try{Oe.onPostCommitFiberRoot(il,e)}catch{}r=!0}return r}finally{j=n,Ee.transition=t}}return!1}function Gu(e,t,n){t=tn(n,t),t=Ka(e,t,1),e=ot(e,t,1),t=ie(),e!==null&&(Jn(e,1,t),de(e,t))}function W(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ut===null||!ut.has(r))){e=tn(n,e),e=Ya(t,e,1),t=ot(t,e,1),e=ie(),t!==null&&(Jn(t,1,e),de(t,e));break}}t=t.return}}function Xd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ie(),e.pingedLanes|=e.suspendedLanes&n,J===e&&(q&n)===n&&(Y===4||Y===3&&(q&130023424)===q&&500>V()-jo?Et(e,0):zo|=n),de(e,t)}function pc(e,t){t===0&&(e.mode&1?(t=ur,ur<<=1,!(ur&130023424)&&(ur=4194304)):t=1);var n=ie();e=Ke(e,t),e!==null&&(Jn(e,t,n),de(e,n))}function Gd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),pc(e,n)}function Jd(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(S(314))}r!==null&&r.delete(t),pc(e,n)}var hc;hc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ce.current)ae=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ae=!1,Ud(e,t,n);ae=!!(e.flags&131072)}else ae=!1,U&&t.flags&1048576&&ya(t,Kr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Tr(e,t),e=t.pendingProps;var l=Zt(t,re.current);Xt(t,n),l=Co(null,t,r,e,l,n);var i=Ro();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,fe(r)?(i=!0,Vr(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,ko(t),l.updater=dl,t.stateNode=l,l._reactInternals=t,zi(t,r,e,n),t=Mi(null,t,r,!0,i,n)):(t.tag=0,U&&i&&ho(t),le(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Tr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=qd(r),e=Re(r,e),l){case 0:t=Di(null,t,r,e,n);break e;case 1:t=$u(null,t,r,e,n);break e;case 11:t=Uu(null,t,r,e,n);break e;case 14:t=Fu(null,t,r,Re(r.type,e),n);break e}throw Error(S(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Re(r,l),Di(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Re(r,l),$u(e,t,r,l,n);case 3:e:{if(Za(t),e===null)throw Error(S(387));r=t.pendingProps,i=t.memoizedState,l=i.element,xa(e,t),Gr(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=tn(Error(S(423)),t),t=Au(e,t,r,n,l);break e}else if(r!==l){l=tn(Error(S(424)),t),t=Au(e,t,r,n,l);break e}else for(he=it(t.stateNode.containerInfo.firstChild),me=t,U=!0,Ie=null,n=Ea(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(qt(),r===l){t=Ye(e,t,n);break e}le(e,t,r,n)}t=t.child}return t;case 5:return Pa(t),e===null&&Ii(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,xi(r,l)?o=null:i!==null&&xi(r,i)&&(t.flags|=32),Ja(e,t),le(e,t,o,n),t.child;case 6:return e===null&&Ii(t),null;case 13:return qa(e,t,n);case 4:return Eo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bt(t,null,r,n):le(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Re(r,l),Uu(e,t,r,l,n);case 7:return le(e,t,t.pendingProps,n),t.child;case 8:return le(e,t,t.pendingProps.children,n),t.child;case 12:return le(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,o=l.value,D(Yr,r._currentValue),r._currentValue=o,i!==null)if(ze(i.value,o)){if(i.children===l.children&&!ce.current){t=Ye(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var u=i.dependencies;if(u!==null){o=i.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=Be(-1,n&-n),s.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?s.next=s:(s.next=h.next,h.next=s),c.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Ti(i.return,n,t),u.lanes|=n;break}s=s.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(S(341));o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Ti(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}le(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Xt(t,n),l=_e(l),r=r(l),t.flags|=1,le(e,t,r,n),t.child;case 14:return r=t.type,l=Re(r,t.pendingProps),l=Re(r.type,l),Fu(e,t,r,l,n);case 15:return Xa(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Re(r,l),Tr(e,t),t.tag=1,fe(r)?(e=!0,Vr(t)):e=!1,Xt(t,n),Qa(t,r,l),zi(t,r,l,n),Mi(null,t,r,!0,e,n);case 19:return ba(e,t,n);case 22:return Ga(e,t,n)}throw Error(S(156,t.tag))};function mc(e,t){return Bs(e,t)}function Zd(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ke(e,t,n,r){return new Zd(e,t,n,r)}function Uo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qd(e){if(typeof e=="function")return Uo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===to)return 11;if(e===no)return 14}return 2}function at(e,t){var n=e.alternate;return n===null?(n=ke(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function jr(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")Uo(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case jt:return _t(n.children,l,i,t);case eo:o=8,l|=8;break;case ni:return e=ke(12,n,t,l|2),e.elementType=ni,e.lanes=i,e;case ri:return e=ke(13,n,t,l),e.elementType=ri,e.lanes=i,e;case li:return e=ke(19,n,t,l),e.elementType=li,e.lanes=i,e;case Ps:return ml(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _s:o=10;break e;case xs:o=9;break e;case to:o=11;break e;case no:o=14;break e;case Je:o=16,r=null;break e}throw Error(S(130,e==null?e:typeof e,""))}return t=ke(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function _t(e,t,n,r){return e=ke(7,e,r,t),e.lanes=n,e}function ml(e,t,n,r){return e=ke(22,e,r,t),e.elementType=Ps,e.lanes=n,e.stateNode={isHidden:!1},e}function Gl(e,t,n){return e=ke(6,e,null,t),e.lanes=n,e}function Jl(e,t,n){return t=ke(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bd(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Tl(0),this.expirationTimes=Tl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Fo(e,t,n,r,l,i,o,u,s){return e=new bd(e,t,n,u,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ke(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ko(i),e}function ep(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:zt,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function vc(e){if(!e)return ft;e=e._reactInternals;e:{if(Tt(e)!==e||e.tag!==1)throw Error(S(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(fe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(S(171))}if(e.tag===1){var n=e.type;if(fe(n))return va(e,n,t)}return t}function gc(e,t,n,r,l,i,o,u,s){return e=Fo(n,r,!0,e,l,i,o,u,s),e.context=vc(null),n=e.current,r=ie(),l=st(n),i=Be(r,l),i.callback=t??null,ot(n,i,l),e.current.lanes=l,Jn(e,l,r),de(e,r),e}function vl(e,t,n,r){var l=t.current,i=ie(),o=st(l);return n=vc(n),t.context===null?t.context=n:t.pendingContext=n,t=Be(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ot(l,t,o),e!==null&&(Le(e,l,o,i),Rr(e,l,o)),o}function rl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Ju(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function $o(e,t){Ju(e,t),(e=e.alternate)&&Ju(e,t)}function tp(){return null}var yc=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ao(e){this._internalRoot=e}gl.prototype.render=Ao.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(S(409));vl(e,t,null,null)};gl.prototype.unmount=Ao.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Nt(function(){vl(null,e,null,null)}),t[Qe]=null}};function gl(e){this._internalRoot=e}gl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Gs();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qe.length&&t!==0&&t<qe[n].priority;n++);qe.splice(n,0,e),n===0&&Zs(e)}};function Wo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function yl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Zu(){}function np(e,t,n,r,l){if(l){if(typeof r=="function"){var i=r;r=function(){var c=rl(o);i.call(c)}}var o=gc(t,r,e,0,null,!1,!1,"",Zu);return e._reactRootContainer=o,e[Qe]=o.current,$n(e.nodeType===8?e.parentNode:e),Nt(),o}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var u=r;r=function(){var c=rl(s);u.call(c)}}var s=Fo(e,0,!1,null,null,!1,!1,"",Zu);return e._reactRootContainer=s,e[Qe]=s.current,$n(e.nodeType===8?e.parentNode:e),Nt(function(){vl(t,s,n,r)}),s}function wl(e,t,n,r,l){var i=n._reactRootContainer;if(i){var o=i;if(typeof l=="function"){var u=l;l=function(){var s=rl(o);u.call(s)}}vl(t,o,e,l)}else o=np(n,t,e,l,r);return rl(o)}Ys=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Sn(t.pendingLanes);n!==0&&(io(t,n|1),de(t,V()),!(z&6)&&(nn=V()+500,ht()))}break;case 13:Nt(function(){var r=Ke(e,1);if(r!==null){var l=ie();Le(r,e,1,l)}}),$o(e,1)}};oo=function(e){if(e.tag===13){var t=Ke(e,134217728);if(t!==null){var n=ie();Le(t,e,134217728,n)}$o(e,134217728)}};Xs=function(e){if(e.tag===13){var t=st(e),n=Ke(e,t);if(n!==null){var r=ie();Le(n,e,t,r)}$o(e,t)}};Gs=function(){return j};Js=function(e,t){var n=j;try{return j=e,t()}finally{j=n}};hi=function(e,t,n){switch(t){case"input":if(ui(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=al(r);if(!l)throw Error(S(90));Rs(r),ui(r,l)}}}break;case"textarea":Is(e,n);break;case"select":t=n.value,t!=null&&Vt(e,!!n.multiple,t,!1)}};Os=Do;Us=Nt;var rp={usingClientEntryPoint:!1,Events:[qn,Ut,al,Ds,Ms,Do]},gn={findFiberByHostInstance:wt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},lp={bundleType:gn.bundleType,version:gn.version,rendererPackageName:gn.rendererPackageName,rendererConfig:gn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Xe.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=As(e),e===null?null:e.stateNode},findFiberByHostInstance:gn.findFiberByHostInstance||tp,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 yr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yr.isDisabled&&yr.supportsFiber)try{il=yr.inject(lp),Oe=yr}catch{}}ge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rp;ge.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wo(t))throw Error(S(200));return ep(e,t,null,n)};ge.createRoot=function(e,t){if(!Wo(e))throw Error(S(299));var n=!1,r="",l=yc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Fo(e,1,!1,null,null,n,!1,r,l),e[Qe]=t.current,$n(e.nodeType===8?e.parentNode:e),new Ao(t)};ge.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(S(188)):(e=Object.keys(e).join(","),Error(S(268,e)));return e=As(t),e=e===null?null:e.stateNode,e};ge.flushSync=function(e){return Nt(e)};ge.hydrate=function(e,t,n){if(!yl(t))throw Error(S(200));return wl(null,e,t,!0,n)};ge.hydrateRoot=function(e,t,n){if(!Wo(e))throw Error(S(405));var r=n!=null&&n.hydratedSources||null,l=!1,i="",o=yc;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=gc(t,null,e,1,n??null,l,!1,i,o),e[Qe]=t.current,$n(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new gl(t)};ge.render=function(e,t,n){if(!yl(t))throw Error(S(200));return wl(null,e,t,!1,n)};ge.unmountComponentAtNode=function(e){if(!yl(e))throw Error(S(40));return e._reactRootContainer?(Nt(function(){wl(null,null,e,!1,function(){e._reactRootContainer=null,e[Qe]=null})}),!0):!1};ge.unstable_batchedUpdates=Do;ge.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!yl(n))throw Error(S(200));if(e==null||e._reactInternals===void 0)throw Error(S(38));return wl(e,t,n,!1,r)};ge.version="18.3.1-next-f1338f8080-20240426";function wc(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wc)}catch(e){console.error(e)}}wc(),ws.exports=ge;var ip=ws.exports,Sc,qu=ip;Sc=qu.createRoot,qu.hydrateRoot;class op extends Error{constructor(){super("未登录或会话已过期"),this.name="UnauthorizedError"}}class up extends Error{constructor(t,n,r){super(n),this.status=t,this.code=r,this.name="ApiError"}}class sp{async get(t,n){return this.request(t,{method:"GET",headers:n==null?void 0:n.headers})}async post(t,n,r){return this.request(t,{method:"POST",headers:{"content-type":"application/json",...r==null?void 0:r.headers},body:n===void 0?void 0:JSON.stringify(n)})}async patch(t,n,r){return this.request(t,{method:"PATCH",headers:{"content-type":"application/json",...r==null?void 0:r.headers},body:n===void 0?void 0:JSON.stringify(n)})}async delete(t,n){return this.request(t,{method:"DELETE",headers:n==null?void 0:n.headers})}async request(t,n){var l;const r=await fetch(t,{credentials:"same-origin",cache:"no-store",...n});if(r.status===401)throw window.dispatchEvent(new CustomEvent("webapp:unauthorized")),new op;if(!r.ok){let i=`请求失败 (${r.status})`,o;try{const u=await r.json();typeof u.error=="string"?i=u.error:(l=u.error)!=null&&l.message&&(i=u.error.message),typeof u.code=="string"&&(o=u.code)}catch{}throw new up(r.status,i,o)}if(r.status!==204)return await r.json()}}function wr(e,...t){if(Array.isArray(e))return e;if(e&&typeof e=="object"){const n=e;for(const r of t)if(Array.isArray(n[r]))return n[r]}return[]}class bu{constructor(t){this.storageKey=t}list(){try{const t=JSON.parse(localStorage.getItem(this.storageKey)??"[]");return Array.isArray(t)?t:[]}catch{return[]}}upsert(t){const n=this.list().filter(r=>r.id!==t.id);n.push(t),localStorage.setItem(this.storageKey,JSON.stringify(n))}remove(t){localStorage.setItem(this.storageKey,JSON.stringify(this.list().filter(n=>n.id!==t)))}}const Zl="<think>",ql="</think>";function es(e,t){const n=Math.min(t.length-1,e.length);for(let r=n;r>0;r--)if(e.endsWith(t.slice(0,r)))return r;return 0}function Sr(e){return e.replace(/<think>[\s\S]*?<\/think>/g,"")}class ap{constructor(){this.buffer="",this.dropping=!1}push(t){this.buffer+=t;let n="";for(;;){if(this.dropping){const l=this.buffer.indexOf(ql);if(l===-1){const i=es(this.buffer,ql);return this.buffer=this.buffer.slice(this.buffer.length-i),n}this.buffer=this.buffer.slice(l+ql.length),this.dropping=!1;continue}const r=this.buffer.indexOf(Zl);if(r===-1){const l=es(this.buffer,Zl);return n+=this.buffer.slice(0,this.buffer.length-l),this.buffer=this.buffer.slice(this.buffer.length-l),n}n+=this.buffer.slice(0,r),this.buffer=this.buffer.slice(r+Zl.length),this.dropping=!0}}flush(){const t=this.buffer;return this.buffer="",t}}const cp=/^(?:load failed|failed to fetch|network request failed|networkerror when attempting to fetch resource\.?|the network connection was lost\.?|fetch failed)$/i;function ts(e){return e instanceof Error&&e.name!=="AbortError"&&cp.test(e.message.trim())}class fp{constructor(t,n,r){this.http=t,this.settings=n,this.projectBridge=r,this.streams=new Map,this.nativeSnapshotRevisions=new Map,this.pendingRuns=new Map,this.listeners=new Set,this.thinkFilters=new Map,this.agentDefs=new bu("webapp.agentDefs"),this.lspServers=new bu("webapp.lspServers"),this.uploads=new Map}requireProjectBridge(){if(this.projectBridge)return this.projectBridge;throw Object.assign(new Error("请从 AgentRoam Web 控制台打开项目"),{code:"WEB_SHELL_REQUIRED"})}onEvent(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}async run(t,n,r,l,i,o){var g;const u=n.startsWith("runtime:"),s=this.streams.has(n),c=this.pendingRuns.has(n),h=this.nativeSnapshotRevisions.get(n);let v=null,p=null;try{u||await this.openStream(n,this.nativeSnapshotRevisions.get(n)),p=c?null:new Promise(f=>{v=f,this.pendingRuns.set(n,f)});const m=this.settings.getModelOverride(),y=this.settings.getRunLimits(),k=await this.http.post("/api/agent/run",{input:t,sessionId:n,...i!=null&&i.length?{images:i}:{},...m?{model:m}:{},reasoningEffort:this.settings.getReasoningEffort(),maxIterations:y.maxIterations,maxTokens:y.maxTokens,...(g=o==null?void 0:o.model)!=null&&g.id?{nativeModel:o.model}:{},...o!=null&&o.reasoningEffort?{nativeReasoningEffort:o.reasoningEffort}:{}});u&&await this.openStream(n,h??{sequence:0},{waitForOpen:!1}),typeof k.snapshotRevision=="number"&&this.rememberNativeSnapshot(n,k.snapshotRevision,k.runId),this.dispatch(n,{type:"run_admitted",...typeof k.runId=="string"?{_nativeRunId:k.runId}:{},...typeof k.snapshotRevision=="number"?{_nativeSequence:k.snapshotRevision}:{}}),p&&await p}catch(m){if(!c&&u&&ts(m)&&await this.recoverNativeAdmission(n,h))return await this.openStream(n,h??{sequence:0},{waitForOpen:!1}),p&&await p,[];const y=m.code,k=typeof y=="string"?y:m.status===409?"SESSION_OCCUPIED":void 0;u&&k==="SESSION_ALREADY_RUNNING"&&await this.openStream(n,h??{sequence:0},{waitForOpen:!1});const f=s||c||k==="SESSION_ALREADY_RUNNING";this.dispatch(n,{type:"error",message:ts(m)?"网络连接中断,消息未确认发送,请重试":m instanceof Error?m.message:"无法启动运行",...k?{code:k}:{},...f?{_preserveActiveRun:!0}:{}}),f?v&&this.pendingRuns.get(n)===v&&this.pendingRuns.delete(n):(this.closeStream(n),this.settle(n))}return[]}async recoverNativeAdmission(t,n){const r=this.nativeSnapshotRevisions.get(t);if(r!=null&&r.runId&&r.runId!==(n==null?void 0:n.runId))return this.dispatchRecoveredAdmission(t,r),!0;try{const l=await this.http.get(`/api/sessions/${encodeURIComponent(t)}?limit=1`),i=typeof l.snapshotRunId=="string"?l.snapshotRunId:void 0,o=typeof l.snapshotRevision=="number"?l.snapshotRevision:0,u=!!(i&&(n!=null&&n.runId)&&i!==n.runId),s=!!(i&&!(n!=null&&n.runId)&&l.status==="running");return!u&&!s?!1:(this.dispatchRecoveredAdmission(t,{runId:i,sequence:o}),!0)}catch{return!1}}dispatchRecoveredAdmission(t,n){this.rememberNativeSnapshot(t,n.sequence,n.runId),this.dispatch(t,{type:"run_admitted",...n.runId?{_nativeRunId:n.runId}:{},_nativeSequence:0})}async steer(t,n,r){return(await this.http.post("/api/agent/steer",{input:t,sessionId:n})).steered||this.run(t,n).catch(()=>{}),!0}async steerSessionMessage(t,n){const r=await this.http.post("/api/agent/steer",{sessionId:t,messageId:n});if(!r.steered)throw new Error("当前运行不支持插队消息");return r.state}async abort(t){try{await this.http.post("/api/agent/abort",t?{sessionId:t}:{})}finally{for(const n of[...this.pendingRuns.keys()])this.settle(n);for(const n of[...this.streams.keys()])this.closeStream(n)}}async answerQuestion(t,n,r){try{return await this.http.post("/api/agent/answer",{questionId:t,answer:n,selectedIndices:r}),!0}catch{return!1}}async listSessions(t){const n=t?`?projectId=${encodeURIComponent(t)}`:"";return this.http.get(`/api/sessions${n}`)}async listAgentWorkspaces(t,n={}){const r=new URLSearchParams({agentType:t});return n.cursor&&r.set("cursor",n.cursor),n.limit!==void 0&&r.set("limit",String(n.limit)),n.refresh&&r.set("refresh","1"),n.since&&r.set("since",n.since),this.http.get(`/api/agent-workspaces?${r.toString()}`)}async importAgentWorkspace(t,n,r){return this.http.post("/api/agent-workspaces",{agentType:t,path:n,...r?{name:r}:{}})}async listAgentWorkspaceSessions(t,n,r={}){const l=new URLSearchParams({agentType:t});return r.cursor&&l.set("cursor",r.cursor),r.limit!==void 0&&l.set("limit",String(r.limit)),r.refresh&&l.set("refresh","1"),this.http.get(`/api/agent-workspaces/${encodeURIComponent(n)}/sessions?${l.toString()}`)}async refreshSessions(t){const n=t?`?refresh=1&projectId=${encodeURIComponent(t)}`:"?refresh=1";return this.http.get(`/api/sessions${n}`)}async listChildSessions(t){return[]}async getSession(t,n){try{const r=new URLSearchParams;n!=null&&n.before&&r.set("before",n.before),n!=null&&n.after&&r.set("after",n.after),n!=null&&n.anchor&&r.set("anchor",n.anchor),(n==null?void 0:n.limit)!==void 0&&r.set("limit",String(n.limit)),n!=null&&n.view&&r.set("view",n.view),n!=null&&n.revision&&r.set("revision",n.revision),n!=null&&n.turnId&&r.set("turnId",n.turnId);const l=r.size>0?`?${r.toString()}`:"",i=await this.http.get(`/api/sessions/${encodeURIComponent(t)}${l}`);if(Array.isArray(i.messages)&&(i.messages=i.messages.map(o=>typeof o.content=="string"?{...o,content:Sr(o.content)}:o)),Array.isArray(i.events)&&(i.events=i.events.map(o=>typeof o.text=="string"&&o.text.includes("<think>")?{...o,text:Sr(o.text)}:typeof o.finalText=="string"&&o.finalText.includes("<think>")?{...o,finalText:Sr(o.finalText)}:o)),t.startsWith("runtime:")&&typeof i.snapshotRevision=="number")this.rememberNativeSnapshot(t,i.snapshotRevision,typeof i.snapshotRunId=="string"?i.snapshotRunId:void 0),i.status==="running"&&i.occupancy!=="owned-externally"&&this.openStream(t,this.nativeSnapshotRevisions.get(t)).catch(()=>{});else if(!t.startsWith("runtime:")&&i.status==="active"){const o=i.activeRun;(o==null?void 0:o.running)===!0&&typeof o.eventId=="number"&&this.openStream(t,{sequence:o.eventId}).catch(()=>{})}return i}catch(r){if(r.status===404)return null;throw r}}async getSessionToolResult(t,n){const r=new URLSearchParams(n);return this.http.get(`/api/sessions/${encodeURIComponent(t)}/tool-result?${r.toString()}`)}async getSessionQueryIndex(t){return this.http.get(`/api/sessions/${encodeURIComponent(t)}/query-index`)}observeSession(t,n,r){const l=new EventSource(`/api/sessions/${encodeURIComponent(t)}/changes`);let i=!1;return l.onmessage=o=>{if(o.data)try{const u=JSON.parse(o.data);u.type==="session_history_changed"&&typeof u.revision=="number"&&n({type:u.type,revision:u.revision})}catch{}},l.onerror=()=>{i||(i=!0,l.close(),r==null||r())},()=>{i||(i=!0,l.close())}}async setSessionPermissionMode(t,n){return this.http.patch(`/api/sessions/${encodeURIComponent(t)}`,{permissionMode:n})}async getSessionGoals(t){const n=await this.http.get(`/api/sessions/${encodeURIComponent(t)}/goals`);return n.active&&this.openStream(t,this.nativeSnapshotRevisions.get(t)).catch(()=>{}),n}async enqueueSessionGoal(t,n,r){var i;await this.openStream(t,this.nativeSnapshotRevisions.get(t));const l=await this.http.post(`/api/sessions/${encodeURIComponent(t)}/goals`,{objective:n,sourceMessageId:r});return typeof((i=l.started)==null?void 0:i.snapshotRevision)=="number"&&(this.rememberNativeSnapshot(t,l.started.snapshotRevision,l.started.runId),this.dispatch(t,{type:"run_admitted",...l.started.runId?{_nativeRunId:l.started.runId}:{},_nativeSequence:l.started.snapshotRevision})),l.state}async reorderSessionGoals(t,n){return this.http.patch(`/api/sessions/${encodeURIComponent(t)}/goals`,{orderedIds:n})}async cancelSessionGoal(t,n){return this.http.delete(`/api/sessions/${encodeURIComponent(t)}/goals?goalId=${encodeURIComponent(n)}`)}async enqueueSessionMessage(t,n){var l;await this.openStream(t,this.nativeSnapshotRevisions.get(t));const r=await this.http.post(`/api/sessions/${encodeURIComponent(t)}/goals`,{kind:"message",objective:n.content,sourceMessageId:n.sourceMessageId,messagePayload:{images:n.images,agentIds:n.agentIds,agentName:n.agentName}});return typeof((l=r.started)==null?void 0:l.snapshotRevision)=="number"&&(this.rememberNativeSnapshot(t,r.started.snapshotRevision,r.started.runId),this.dispatch(t,{type:"run_admitted",...r.started.runId?{_nativeRunId:r.started.runId}:{},_nativeSequence:r.started.snapshotRevision})),r.state}async updateSessionMessage(t,n,r){return this.http.patch(`/api/sessions/${encodeURIComponent(t)}/goals`,{kind:"message",messageId:n,objective:r})}async reorderSessionMessages(t,n){return this.http.patch(`/api/sessions/${encodeURIComponent(t)}/goals`,{kind:"message",orderedIds:n})}async cancelSessionMessage(t,n){return this.http.delete(`/api/sessions/${encodeURIComponent(t)}/goals?kind=message&goalId=${encodeURIComponent(n)}`)}async createSession(t,n,r,l){return this.http.post("/api/sessions",{title:t,...n?{projectId:n}:{},...r&&r!=="customer-agent"?{agentType:r}:{},...l?{cwd:l}:{}})}async forkSession(t){return this.http.post(`/api/sessions/${encodeURIComponent(t)}/fork`,{})}async releaseCodexSession(t){await this.http.post(`/api/sessions/${encodeURIComponent(t)}/release`,{})}async deleteSession(t){await this.http.delete(`/api/sessions/${encodeURIComponent(t)}`)}async getRuntimeHealth(){return this.http.get("/api/agent/runtime-health")}async listAgentModels(t){return this.http.get(`/api/agent/models?agentType=${encodeURIComponent(t)}`)}async listProjects(){return this.projectBridge?(await this.requireProjectBridge().request("project:list")).projects??[]:this.http.get("/api/projects")}async getProject(t){return this.projectBridge?(await this.requireProjectBridge().request("project:get",{projectId:t})).project??null:this.http.get(`/api/projects/${encodeURIComponent(t)}`)}async createProject(t,n){return this.projectBridge?(await this.requireProjectBridge().request("project:create",{name:t,path:n??""})).project:this.http.post("/api/projects",{name:t,path:n??""})}async updateProject(t,n){return this.projectBridge?(await this.requireProjectBridge().request("project:rename",{projectId:t,name:n.name})).project:this.http.patch(`/api/projects/${encodeURIComponent(t)}`,n)}async deleteProject(t){if(!this.projectBridge){await this.http.delete(`/api/projects/${encodeURIComponent(t)}`);return}await this.requireProjectBridge().request("project:delete",{projectId:t})}async checkProjectPath(t){return this.projectBridge?(await this.requireProjectBridge().request("project:check",{path:t})).valid===!0:(await this.http.get(`/api/projects/check?path=${encodeURIComponent(t)}`)).valid===!0}async listProjectRoots(){return this.projectBridge?(await this.requireProjectBridge().request("project:roots")).roots??[]:this.http.get("/api/projects/roots")}async listProjectDirectories(t){return this.projectBridge?(await this.requireProjectBridge().request("project:directories",{path:t})).entries??[]:this.http.get(`/api/projects/directories?path=${encodeURIComponent(t)}`)}async setProjectWorkingDir(t){return{ok:!0,path:t}}getSettings(){return this.settings.get()}async saveSettings(t){this.settings.save(t)}async setActiveProfile(t){this.settings.setActiveProfile(t)}async refreshServerModel(){try{const t=await this.http.get("/api/agent/model");this.settings.reflectServerModel(t)}catch{}}async listMemories(){return wr(await this.http.get("/api/memory"),"entries","memories","items")}async searchMemories(t){return wr(await this.http.get(`/api/memory?q=${encodeURIComponent(t)}`),"entries","memories","items")}async getMemory(t){try{return await this.http.get(`/api/memory/${encodeURIComponent(t)}`)}catch(n){if(n.status===404)return null;throw n}}async setMemory(t){await this.http.post("/api/memory",t)}async deleteMemory(t){await this.http.delete(`/api/memory/${encodeURIComponent(t)}`)}async mcpList(){return wr(await this.http.get("/api/mcp/servers"),"servers","items")}async mcpSave(t){await this.http.post("/api/mcp/connect",t)}async mcpDelete(t){await this.http.delete(`/api/mcp/disconnect?serverId=${encodeURIComponent(t)}`)}async mcpSetEnabled(){}async mcpProbe(t){try{return(await this.http.post("/api/mcp/connect",t)).tools??[]}catch{return[]}}async listSkills(){return wr(await this.http.get("/api/skills"),"skills","items")}async saveSkill(){}async deleteSkill(){}async setSkillEnabled(){}async importSkill(){return null}listAgentDefs(){return Promise.resolve(this.agentDefs.list())}getAgentDef(t){return Promise.resolve(this.agentDefs.list().find(n=>n.id===t)??null)}createAgentDef(t){const n=new Date().toISOString(),r={id:crypto.randomUUID(),name:t.name??"新智能体",description:t.description??"",systemPrompt:t.systemPrompt??"",contextPlaceholders:t.contextPlaceholders??[],capabilities:t.capabilities??{profileId:"",enabledTools:[],enabledSkills:[],enabledMCPServers:[]},maxIterations:t.maxIterations??10,isDefault:t.isDefault??!1,created:n,updated:n,...t};return this.agentDefs.upsert(r),Promise.resolve(r)}updateAgentDef(t,n){const r={...this.agentDefs.list().find(l=>l.id===t),...n,id:t,updated:new Date().toISOString()};return this.agentDefs.upsert(r),Promise.resolve(r)}async deleteAgentDef(t){this.agentDefs.remove(t)}async setActiveAgentDef(t){return this.agentDefs.list().forEach(n=>{this.agentDefs.upsert({...n,isDefault:n.id===t})}),{activeAgentId:t}}lspList(){return Promise.resolve(this.lspServers.list())}lspSave(t){const n={id:t.id??crypto.randomUUID(),enabled:!0,...t};return this.lspServers.upsert(n),Promise.resolve()}async lspDelete(t){this.lspServers.remove(t)}lspSetEnabled(t,n){const r=this.lspServers.list().find(l=>l.id===t);return r&&this.lspServers.upsert({...r,enabled:n}),Promise.resolve()}listUploads(){return Promise.resolve([...this.uploads.values()])}getUpload(t){return Promise.resolve(this.uploads.get(t)??null)}async saveUpload(t){const n=t.id??crypto.randomUUID();this.uploads.set(n,{...t,id:n})}async deleteUpload(t){this.uploads.delete(t)}async cronCreate(t,n){return{id:crypto.randomUUID(),cron:t,prompt:n,createdAt:Date.now(),recurring:!0,enabled:!1,label:"Web 端暂不执行"}}async cronPause(){return null}async cronResume(){return null}async cronDelete(){return!0}async cronDeleteAll(){return{ok:!0}}async cronList(){return[]}async openFileDialog(){return null}async readFile(){throw new Error("Web 端不支持直接读取本地文件")}async writeFile(){throw new Error("Web 端不支持直接写入本地文件")}async hideWindow(){}async showWindow(){}async isWindowVisible(){return!0}async wakeStop(){return{ok:!0}}async wakeConversation(t){return{ok:!0,conversation:t}}async ttsSpeak(){return{ok:!1}}async ttsStop(){return{ok:!0}}async ttsPlaybackEnded(){return{ok:!0}}onTtsStart(){return()=>{}}onTtsPcm(){return()=>{}}onTtsStreamEnd(){return()=>{}}onTtsFlush(){return()=>{}}onTtsEnd(){return()=>{}}onWake(){return()=>{}}onWakeCommand(){return()=>{}}dispatch(t,n){const r={...n,_sid:t};for(const l of this.listeners)try{l(r)}catch{}}settle(t){const n=this.pendingRuns.get(t);n&&(this.pendingRuns.delete(t),n())}openStream(t,n,r={}){if(this.streams.has(t))return Promise.resolve();this.thinkFilters.set(t,new ap);const l=new URLSearchParams({sessionId:t});Number.isSafeInteger(n==null?void 0:n.sequence)&&l.set(t.startsWith("runtime:")?"afterSequence":"afterEventId",String(n.sequence)),t.startsWith("runtime:")&&(n!=null&&n.runId)&&l.set("afterRunId",n.runId);const i=new EventSource(`/api/agent/stream?${l.toString()}`);let o=!1;this.streams.set(t,i);const u=r.waitForOpen!==!1;let s=u,c=null,h=null,v=null;const p=u?new Promise((g,m)=>{h=g,v=m,c=setTimeout(()=>{s=!1,m(new Error("事件流连接超时"))},8e3)}):Promise.resolve();return i.onopen=()=>{s&&(s=!1,c&&clearTimeout(c),h==null||h())},i.onmessage=g=>{var y;if(!g.data)return;let m;try{m=JSON.parse(g.data)}catch{return}if(m.type==="text_chunk"&&typeof m.text=="string"&&(m.text=this.thinkFilters.get(t).push(m.text)),typeof m._nativeSequence=="number"&&this.rememberNativeSnapshot(t,m._nativeSequence,typeof m._nativeRunId=="string"?m._nativeRunId:void 0),m.type==="done"||m.type==="error"||m.type==="turn_aborted"){const k=((y=this.thinkFilters.get(t))==null?void 0:y.flush())??"";k&&m.type==="done"&&typeof m.finalText=="string"&&(m.finalText=m.finalText+k),o=!0}m.type==="text_chunk"&&m.text===""||(this.dispatch(t,m),(m.type==="done"||m.type==="error"||m.type==="turn_aborted")&&(this.closeStream(t),this.settle(t)))},i.onerror=()=>{if(s&&i.readyState===EventSource.CLOSED){s=!1,c&&clearTimeout(c),v==null||v(new Error("事件流连接失败"));return}if(i.readyState===EventSource.CLOSED){if(this.closeStream(t),o){this.settle(t);return}(async()=>{let g="";for(let m=0;m<8&&!g;m++){m>0&&await new Promise(y=>setTimeout(y,750));try{const y=await this.getSession(t,{limit:50}),k=(y==null?void 0:y.messages)??[],f=k.map(d=>d.role).lastIndexOf("user"),a=k.slice(f+1).filter(d=>d.role==="assistant"&&(d.content??"").trim()).map(d=>d.content.trim()).join(`
|
|
41
41
|
|
|
42
42
|
`);g=Sr(a).trim()}catch{}}g?this.dispatch(t,{type:"text_chunk",text:g}):this.dispatch(t,{type:"error",message:"连接中断,回复未能恢复,请重试"}),this.dispatch(t,{type:"done",finalText:""}),this.settle(t)})()}},p}rememberNativeSnapshot(t,n,r){this.nativeSnapshotRevisions.set(t,{sequence:n,...r?{runId:r}:{}})}closeStream(t){const n=this.streams.get(t);n&&(n.close(),this.streams.delete(t),this.thinkFilters.delete(t))}}const kr="webapp.settings.v1";class dp{constructor(){this.cached=null}get(){if(this.cached)return this.cached;let t={};try{t=JSON.parse(localStorage.getItem(kr)??"{}")}catch{t={}}return this.cached={...this.defaults(),...t},this.cached}save(t){const n=this.get();this.cached={...n,...t},t.profiles&&!t.activeProfileId&&(this.cached.activeProfileId=n.activeProfileId),localStorage.setItem(kr,JSON.stringify(this.cached))}setActiveProfile(t){const n=this.get();this.cached={...n,activeProfileId:t},localStorage.setItem(kr,JSON.stringify(this.cached))}reflectServerModel(t){if(!(t!=null&&t.modelId))return;const n=this.get(),r=n.profiles.find(u=>u.id==="server-managed");if(!r||r.apiKey!=="managed"||r.modelId===t.modelId&&r.provider===(t.provider||"openai"))return;const l=t.modelId,i=t.provider||"openai",o=t.baseUrl||"";this.cached={...n,profiles:n.profiles.map(u=>u.id==="server-managed"?{...u,name:`服务端 · ${l}`,provider:i,modelId:l,baseUrl:o}:u),modelProvider:i,modelId:l,baseUrl:o||n.baseUrl},localStorage.setItem(kr,JSON.stringify(this.cached))}getModelOverride(){const t=this.get(),n=t.profiles.find(u=>u.id===t.activeProfileId)??null,r=(n==null?void 0:n.provider)??t.modelProvider,l=(n==null?void 0:n.apiKey)??t.apiKey,i=(n==null?void 0:n.modelId)??t.modelId,o=(n==null?void 0:n.baseUrl)??t.baseUrl;return!l||l==="managed"||!i||i==="server"?null:{provider:r,apiKey:l,modelId:i,...o?{baseUrl:o}:{}}}getReasoningEffort(){const t=this.get().reasoningEffort;return["off","low","medium","high"].includes(t)?t:"off"}getRunLimits(){const t=this.get(),n=Math.min(50,Math.max(1,Math.trunc(Number(t.maxIterations)||10))),r=Math.min(2e3,Math.max(8,Math.trunc(Number(t.contextWindow)||100)));return{maxIterations:n,maxTokens:r*1e3}}defaults(){const t={id:"server-managed",name:"服务端托管",provider:"openai",modelId:"server",apiKey:"managed",baseUrl:""};return{modelProvider:t.provider,modelId:t.modelId,apiKey:t.apiKey,baseUrl:"",maxIterations:10,contextWindow:100,workingDirectory:"/",profiles:[t],activeProfileId:t.id,reasoningEffort:"off"}}}function pp(e){return e.toString(16).padStart(2,"0")}function hp(e){const t=e.getRandomValues(new Uint8Array(16));t[6]=t[6]&15|64,t[8]=t[8]&63|128;const n=Array.from(t,pp);return[n.slice(0,4).join(""),n.slice(4,6).join(""),n.slice(6,8).join(""),n.slice(8,10).join(""),n.slice(10,16).join("")].join("-")}function mp(e=globalThis.crypto){typeof e.randomUUID!="function"&&Object.defineProperty(e,"randomUUID",{configurable:!0,writable:!0,value:()=>hp(e)})}const bl="agent-webapp:tab-swipe:v1",vp=["input","textarea","select","button","a[href]","[contenteditable='true']","[role='button']","[data-tab-swipe-ignore]"].join(",");function gp(e){return!e||typeof e.closest!="function"?!1:!!e.closest(vp)}function yp(e){let t=null;const n=r=>t!==null&&r.pointerType==="touch"&&r.pointerId===t.pointerId;return{pointerDown(r){r.pointerType!=="touch"||!r.isPrimary||r.interactive||(t={pointerId:r.pointerId,startX:r.clientX,startY:r.clientY,axis:"pending"})},pointerMove(r){if(!n(r)||!t)return!1;const l=r.clientX-t.startX,i=r.clientY-t.startY;if(t.axis==="pending"){if(Math.max(Math.abs(l),Math.abs(i))<=8)return!1;if(Math.abs(i)>=Math.abs(l)*1.2)return t=null,!1;t.axis="horizontal"}return e({type:bl,phase:"move",deltaX:l}),!0},pointerUp(r){if(!n(r)||!t)return!1;const l=t.axis==="horizontal";return l&&e({type:bl,phase:"end",deltaX:r.clientX-t.startX}),t=null,l},pointerCancel(r){if(!n(r)||!t)return!1;const l=t.axis==="horizontal";return l&&e({type:bl,phase:"cancel",deltaX:0}),t=null,l}}}function wp(){if(window.parent===window)return()=>{};const e=yp(o=>{window.parent.postMessage(o,window.location.origin)}),t=o=>({pointerId:o.pointerId,pointerType:o.pointerType,isPrimary:o.isPrimary,clientX:o.clientX,clientY:o.clientY}),n=o=>{e.pointerDown({...t(o),interactive:gp(o.target)})},r=o=>{e.pointerMove(t(o))&&o.preventDefault()},l=o=>{e.pointerUp(t(o))&&o.preventDefault()},i=o=>{e.pointerCancel(t(o))};return document.addEventListener("pointerdown",n,{capture:!0}),document.addEventListener("pointermove",r,{capture:!0,passive:!1}),document.addEventListener("pointerup",l,{capture:!0,passive:!1}),document.addEventListener("pointercancel",i,{capture:!0}),()=>{document.removeEventListener("pointerdown",n,{capture:!0}),document.removeEventListener("pointermove",r,{capture:!0}),document.removeEventListener("pointerup",l,{capture:!0}),document.removeEventListener("pointercancel",i,{capture:!0})}}const Sp={},ns=e=>{let t;const n=new Set,r=(h,v)=>{const p=typeof h=="function"?h(t):h;if(!Object.is(p,t)){const g=t;t=v??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(m=>m(t,g))}},l=()=>t,s={setState:r,getState:l,getInitialState:()=>c,subscribe:h=>(n.add(h),()=>n.delete(h)),destroy:()=>{(Sp?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,l,s);return s},kp=e=>e?ns(e):ns;var kc={exports:{}},Ec={},_c={exports:{}},xc={};/**
|
|
43
43
|
* @license React
|
|
@@ -55,4 +55,4 @@ Error generating stack: `+i.message+`
|
|
|
55
55
|
*
|
|
56
56
|
* This source code is licensed under the MIT license found in the
|
|
57
57
|
* LICENSE file in the root directory of this source tree.
|
|
58
|
-
*/var Sl=He,zp=Lp;function jp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dp=typeof Object.is=="function"?Object.is:jp,Mp=zp.useSyncExternalStore,Op=Sl.useRef,Up=Sl.useEffect,Fp=Sl.useMemo,$p=Sl.useDebugValue;Ec.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var i=Op(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=Fp(function(){function s(g){if(!c){if(c=!0,h=g,g=r(g),l!==void 0&&o.hasValue){var m=o.value;if(l(m,g))return v=m}return v=g}if(m=v,Dp(h,g))return m;var y=r(g);return l!==void 0&&l(m,y)?(h=g,m):(h=g,v=y)}var c=!1,h,v,p=n===void 0?null:n;return[function(){return s(t())},p===null?void 0:function(){return s(p())}]},[t,n,r,l]);var u=Mp(e,i[0],i[1]);return Up(function(){o.hasValue=!0,o.value=u},[u]),$p(u),u};kc.exports=Ec;var Ap=kc.exports;const Wp=us(Ap),Pc={},{useDebugValue:Bp}=Yc,{useSyncExternalStoreWithSelector:Hp}=Wp;let rs=!1;const Vp=e=>e;function Qp(e,t=Vp,n){(Pc?"production":void 0)!=="production"&&n&&!rs&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),rs=!0);const r=Hp(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Bp(r),r}const ls=e=>{(Pc?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?kp(e):e,n=(r,l)=>Qp(t,r,l);return Object.assign(n,t),n},Kp=e=>e?ls(e):ls,Yp={};function Xp(e,t){let n;try{n=e()}catch{return}return{getItem:l=>{var i;const o=s=>s===null?null:JSON.parse(s,void 0),u=(i=n.getItem(l))!=null?i:null;return u instanceof Promise?u.then(o):o(u)},setItem:(l,i)=>n.setItem(l,JSON.stringify(i,void 0)),removeItem:l=>n.removeItem(l)}}const Xn=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Xn(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Xn(r)(n)}}}},Gp=(e,t)=>(n,r,l)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:k=>k,version:0,merge:(k,f)=>({...f,...k}),...t},o=!1;const u=new Set,s=new Set;let c;try{c=i.getStorage()}catch{}if(!c)return e((...k)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...k)},r,l);const h=Xn(i.serialize),v=()=>{const k=i.partialize({...r()});let f;const a=h({state:k,version:i.version}).then(d=>c.setItem(i.name,d)).catch(d=>{f=d});if(f)throw f;return a},p=l.setState;l.setState=(k,f)=>{p(k,f),v()};const g=e((...k)=>{n(...k),v()},r,l);let m;const y=()=>{var k;if(!c)return;o=!1,u.forEach(a=>a(r()));const f=((k=i.onRehydrateStorage)==null?void 0:k.call(i,r()))||void 0;return Xn(c.getItem.bind(c))(i.name).then(a=>{if(a)return i.deserialize(a)}).then(a=>{if(a)if(typeof a.version=="number"&&a.version!==i.version){if(i.migrate)return i.migrate(a.state,a.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return a.state}).then(a=>{var d;return m=i.merge(a,(d=r())!=null?d:g),n(m,!0),v()}).then(()=>{f==null||f(m,void 0),o=!0,s.forEach(a=>a(m))}).catch(a=>{f==null||f(void 0,a)})};return l.persist={setOptions:k=>{i={...i,...k},k.getStorage&&(c=k.getStorage())},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>y(),hasHydrated:()=>o,onHydrate:k=>(u.add(k),()=>{u.delete(k)}),onFinishHydration:k=>(s.add(k),()=>{s.delete(k)})},y(),m||g},Jp=(e,t)=>(n,r,l)=>{let i={storage:Xp(()=>localStorage),partialize:y=>y,version:0,merge:(y,k)=>({...k,...y}),...t},o=!1;const u=new Set,s=new Set;let c=i.storage;if(!c)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...y)},r,l);const h=()=>{const y=i.partialize({...r()});return c.setItem(i.name,{state:y,version:i.version})},v=l.setState;l.setState=(y,k)=>{v(y,k),h()};const p=e((...y)=>{n(...y),h()},r,l);l.getInitialState=()=>p;let g;const m=()=>{var y,k;if(!c)return;o=!1,u.forEach(a=>{var d;return a((d=r())!=null?d:p)});const f=((k=i.onRehydrateStorage)==null?void 0:k.call(i,(y=r())!=null?y:p))||void 0;return Xn(c.getItem.bind(c))(i.name).then(a=>{if(a)if(typeof a.version=="number"&&a.version!==i.version){if(i.migrate)return[!0,i.migrate(a.state,a.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,a.state];return[!1,void 0]}).then(a=>{var d;const[w,E]=a;if(g=i.merge(E,(d=r())!=null?d:p),n(g,!0),w)return h()}).then(()=>{f==null||f(g,void 0),g=r(),o=!0,s.forEach(a=>a(g))}).catch(a=>{f==null||f(void 0,a)})};return l.persist={setOptions:y=>{i={...i,...y},y.storage&&(c=y.storage)},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:y=>(u.add(y),()=>{u.delete(y)}),onFinishHydration:y=>(s.add(y),()=>{s.delete(y)})},i.skipHydration||m(),g||p},Zp=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Yp?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Gp(e,t)):Jp(e,t),qp=Zp;function bp(){return typeof document<"u"&&document.body.dataset.webShell==="1"}function Cc(){return typeof navigator>"u"?!1:bp()||!/Electron\//i.test(navigator.userAgent)}function gh(e=900){const[t,n]=He.useState(()=>typeof window<"u"&&window.innerWidth<e);return He.useEffect(()=>{const r=window.matchMedia(`(max-width: ${e-1}px)`),l=i=>n(i.matches);return n(r.matches),r.addEventListener("change",l),()=>r.removeEventListener("change",l)},[e]),t}const yh=[{id:"pearl",label:"珍珠白",preview:["#f5f6fa","#4f6ef7"]},{id:"scifi",label:"科幻霓虹",preview:["#050a14","#22d3ee"]},{id:"noir",label:"暗夜黑",preview:["#0f1115","#a78bfa"]}],wh=[{id:"standard",label:"标准",description:"侧边栏 + 对话区"},{id:"focus",label:"专注",description:"隐藏侧边栏,居中沉浸对话"},{id:"compact",label:"紧凑",description:"更小间距与字号,信息密度优先"}],is=3;function eh(e=Cc()){return!e}const th=Kp()(qp(e=>({skin:"pearl",layout:"standard",autoSpeak:!1,wakeEnabled:eh(),wakeWord:"小智",runningFirst:!1,setSkin:t=>e({skin:t}),setLayout:t=>e({layout:t}),setAutoSpeak:t=>e({autoSpeak:t}),setWakeEnabled:t=>e({wakeEnabled:t}),setWakeWord:t=>e({wakeWord:t}),setRunningFirst:t=>e({runningFirst:t})}),{name:"agent-ui-prefs",version:is,migrate:(e,t)=>{const n=e;return{...n.skin!==void 0?{skin:n.skin}:{},...n.layout!==void 0?{layout:n.layout}:{},...n.autoSpeak!==void 0?{autoSpeak:n.autoSpeak}:{},...n.wakeEnabled!==void 0?{wakeEnabled:n.wakeEnabled}:{},...n.wakeWord!==void 0?{wakeWord:n.wakeWord}:{},...n.runningFirst!==void 0?{runningFirst:n.runningFirst}:{},...t<is&&Cc()?{wakeEnabled:!1}:{}}}})),nh="agent-web-shell:skin:v1",rh=["pearl","scifi","noir"];function lh(){if(window.parent===window)return()=>{};const e=t=>{if(t.origin!==window.location.origin||t.source!==window.parent)return;const n=t.data;!n||typeof n!="object"||n.type!==nh||typeof n.skin!="string"||!rh.includes(n.skin)||th.getState().setSkin(n.skin)};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)}const ih="agent-webapp:ready:v1";function oh(){window.parent!==window&&window.parent.postMessage({type:ih},window.location.origin)}const uh="agent-webapp:project-request:v1",sh="agent-web-shell:project-response:v1",ah=["project:list","project:get","project:create","project:rename","project:delete","project:roots","project:directories","project:check"];new Set(ah);function ch(e){if(!e||typeof e!="object")return null;const t=e;return t.type!==sh||!Number.isSafeInteger(t.id)||Number(t.id)<1||typeof t.ok!="boolean"||!t.ok&&typeof t.error!="string"?null:t}class fh{constructor(t=window,n=15e3){this.context=t,this.timeoutMs=n,this.sequence=0,this.pending=new Map,this.onMessage=r=>{if(r.origin!==this.context.location.origin||r.source!==this.context.parent)return;const l=ch(r.data);if(!l)return;const i=this.pending.get(l.id);i&&(this.pending.delete(l.id),clearTimeout(i.timer),l.ok?i.resolve(l.result):i.reject(Object.assign(new Error(l.error||"项目操作失败"),{code:l.code})))},this.context.addEventListener("message",this.onMessage)}request(t,n={}){if(this.context.parent===this.context)return Promise.reject(Object.assign(new Error("请从 AgentRoam Web 控制台打开项目"),{code:"WEB_SHELL_REQUIRED"}));const r=++this.sequence;return new Promise((l,i)=>{const o=setTimeout(()=>{this.pending.delete(r),i(Object.assign(new Error("项目操作超时"),{code:"WEB_SHELL_TIMEOUT"}))},this.timeoutMs);this.pending.set(r,{resolve:l,reject:i,timer:o}),this.context.parent.postMessage({type:uh,id:r,method:t,payload:n},this.context.location.origin)})}dispose(){this.context.removeEventListener("message",this.onMessage);for(const t of this.pending.values())clearTimeout(t.timer),t.reject(Object.assign(new Error("项目桥已关闭"),{code:"WEB_SHELL_CLOSED"}));this.pending.clear()}}mp();wp();lh();document.body.dataset.webShell="1";const dh=new sp,ph=window.parent===window?void 0:new fh,os=new fp(dh,new dp,ph),Rc=document.getElementById("root");if(!Rc)throw new Error("#root missing");const hh=Sc(Rc);function mh(){return He.useEffect(()=>{oh()},[]),null}(async()=>{window.agentApi=os,await os.refreshServerModel();const{default:e}=await Lc(async()=>{const{default:t}=await import("./App-CZspcejP.js");return{default:t}},[],import.meta.url);hh.render(Pl.jsxs(He.StrictMode,{children:[Pl.jsx(e,{}),Pl.jsx(mh,{})]})),vh()})();function vh(){const e=[...document.scripts].map(n=>n.src).join(",").match(/index-([^/]+)\.js/),t=e?e[1]:null;t&&setInterval(async()=>{try{const l=((await(await fetch("/api/agent/model",{credentials:"same-origin"})).json()).buildId||"").replace(/^index-|\.js$/g,"");l&&l!==t&&location.reload()}catch{}},6e4)}export{wh as L,Yc as R,yh as S,ip as a,gh as b,Kp as c,bp as i,Pl as j,He as r,th as u};
|
|
58
|
+
*/var Sl=He,zp=Lp;function jp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dp=typeof Object.is=="function"?Object.is:jp,Mp=zp.useSyncExternalStore,Op=Sl.useRef,Up=Sl.useEffect,Fp=Sl.useMemo,$p=Sl.useDebugValue;Ec.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var i=Op(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=Fp(function(){function s(g){if(!c){if(c=!0,h=g,g=r(g),l!==void 0&&o.hasValue){var m=o.value;if(l(m,g))return v=m}return v=g}if(m=v,Dp(h,g))return m;var y=r(g);return l!==void 0&&l(m,y)?(h=g,m):(h=g,v=y)}var c=!1,h,v,p=n===void 0?null:n;return[function(){return s(t())},p===null?void 0:function(){return s(p())}]},[t,n,r,l]);var u=Mp(e,i[0],i[1]);return Up(function(){o.hasValue=!0,o.value=u},[u]),$p(u),u};kc.exports=Ec;var Ap=kc.exports;const Wp=us(Ap),Pc={},{useDebugValue:Bp}=Yc,{useSyncExternalStoreWithSelector:Hp}=Wp;let rs=!1;const Vp=e=>e;function Qp(e,t=Vp,n){(Pc?"production":void 0)!=="production"&&n&&!rs&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),rs=!0);const r=Hp(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Bp(r),r}const ls=e=>{(Pc?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?kp(e):e,n=(r,l)=>Qp(t,r,l);return Object.assign(n,t),n},Kp=e=>e?ls(e):ls,Yp={};function Xp(e,t){let n;try{n=e()}catch{return}return{getItem:l=>{var i;const o=s=>s===null?null:JSON.parse(s,void 0),u=(i=n.getItem(l))!=null?i:null;return u instanceof Promise?u.then(o):o(u)},setItem:(l,i)=>n.setItem(l,JSON.stringify(i,void 0)),removeItem:l=>n.removeItem(l)}}const Xn=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Xn(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Xn(r)(n)}}}},Gp=(e,t)=>(n,r,l)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:k=>k,version:0,merge:(k,f)=>({...f,...k}),...t},o=!1;const u=new Set,s=new Set;let c;try{c=i.getStorage()}catch{}if(!c)return e((...k)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...k)},r,l);const h=Xn(i.serialize),v=()=>{const k=i.partialize({...r()});let f;const a=h({state:k,version:i.version}).then(d=>c.setItem(i.name,d)).catch(d=>{f=d});if(f)throw f;return a},p=l.setState;l.setState=(k,f)=>{p(k,f),v()};const g=e((...k)=>{n(...k),v()},r,l);let m;const y=()=>{var k;if(!c)return;o=!1,u.forEach(a=>a(r()));const f=((k=i.onRehydrateStorage)==null?void 0:k.call(i,r()))||void 0;return Xn(c.getItem.bind(c))(i.name).then(a=>{if(a)return i.deserialize(a)}).then(a=>{if(a)if(typeof a.version=="number"&&a.version!==i.version){if(i.migrate)return i.migrate(a.state,a.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return a.state}).then(a=>{var d;return m=i.merge(a,(d=r())!=null?d:g),n(m,!0),v()}).then(()=>{f==null||f(m,void 0),o=!0,s.forEach(a=>a(m))}).catch(a=>{f==null||f(void 0,a)})};return l.persist={setOptions:k=>{i={...i,...k},k.getStorage&&(c=k.getStorage())},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>y(),hasHydrated:()=>o,onHydrate:k=>(u.add(k),()=>{u.delete(k)}),onFinishHydration:k=>(s.add(k),()=>{s.delete(k)})},y(),m||g},Jp=(e,t)=>(n,r,l)=>{let i={storage:Xp(()=>localStorage),partialize:y=>y,version:0,merge:(y,k)=>({...k,...y}),...t},o=!1;const u=new Set,s=new Set;let c=i.storage;if(!c)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...y)},r,l);const h=()=>{const y=i.partialize({...r()});return c.setItem(i.name,{state:y,version:i.version})},v=l.setState;l.setState=(y,k)=>{v(y,k),h()};const p=e((...y)=>{n(...y),h()},r,l);l.getInitialState=()=>p;let g;const m=()=>{var y,k;if(!c)return;o=!1,u.forEach(a=>{var d;return a((d=r())!=null?d:p)});const f=((k=i.onRehydrateStorage)==null?void 0:k.call(i,(y=r())!=null?y:p))||void 0;return Xn(c.getItem.bind(c))(i.name).then(a=>{if(a)if(typeof a.version=="number"&&a.version!==i.version){if(i.migrate)return[!0,i.migrate(a.state,a.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,a.state];return[!1,void 0]}).then(a=>{var d;const[w,E]=a;if(g=i.merge(E,(d=r())!=null?d:p),n(g,!0),w)return h()}).then(()=>{f==null||f(g,void 0),g=r(),o=!0,s.forEach(a=>a(g))}).catch(a=>{f==null||f(void 0,a)})};return l.persist={setOptions:y=>{i={...i,...y},y.storage&&(c=y.storage)},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:y=>(u.add(y),()=>{u.delete(y)}),onFinishHydration:y=>(s.add(y),()=>{s.delete(y)})},i.skipHydration||m(),g||p},Zp=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Yp?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Gp(e,t)):Jp(e,t),qp=Zp;function bp(){return typeof document<"u"&&document.body.dataset.webShell==="1"}function Cc(){return typeof navigator>"u"?!1:bp()||!/Electron\//i.test(navigator.userAgent)}function gh(e=900){const[t,n]=He.useState(()=>typeof window<"u"&&window.innerWidth<e);return He.useEffect(()=>{const r=window.matchMedia(`(max-width: ${e-1}px)`),l=i=>n(i.matches);return n(r.matches),r.addEventListener("change",l),()=>r.removeEventListener("change",l)},[e]),t}const yh=[{id:"pearl",label:"珍珠白",preview:["#f5f6fa","#4f6ef7"]},{id:"scifi",label:"科幻霓虹",preview:["#050a14","#22d3ee"]},{id:"noir",label:"暗夜黑",preview:["#0f1115","#a78bfa"]}],wh=[{id:"standard",label:"标准",description:"侧边栏 + 对话区"},{id:"focus",label:"专注",description:"隐藏侧边栏,居中沉浸对话"},{id:"compact",label:"紧凑",description:"更小间距与字号,信息密度优先"}],is=3;function eh(e=Cc()){return!e}const th=Kp()(qp(e=>({skin:"pearl",layout:"standard",autoSpeak:!1,wakeEnabled:eh(),wakeWord:"小智",runningFirst:!1,setSkin:t=>e({skin:t}),setLayout:t=>e({layout:t}),setAutoSpeak:t=>e({autoSpeak:t}),setWakeEnabled:t=>e({wakeEnabled:t}),setWakeWord:t=>e({wakeWord:t}),setRunningFirst:t=>e({runningFirst:t})}),{name:"agent-ui-prefs",version:is,migrate:(e,t)=>{const n=e;return{...n.skin!==void 0?{skin:n.skin}:{},...n.layout!==void 0?{layout:n.layout}:{},...n.autoSpeak!==void 0?{autoSpeak:n.autoSpeak}:{},...n.wakeEnabled!==void 0?{wakeEnabled:n.wakeEnabled}:{},...n.wakeWord!==void 0?{wakeWord:n.wakeWord}:{},...n.runningFirst!==void 0?{runningFirst:n.runningFirst}:{},...t<is&&Cc()?{wakeEnabled:!1}:{}}}})),nh="agent-web-shell:skin:v1",rh=["pearl","scifi","noir"];function lh(){if(window.parent===window)return()=>{};const e=t=>{if(t.origin!==window.location.origin||t.source!==window.parent)return;const n=t.data;!n||typeof n!="object"||n.type!==nh||typeof n.skin!="string"||!rh.includes(n.skin)||th.getState().setSkin(n.skin)};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)}const ih="agent-webapp:ready:v1";function oh(){window.parent!==window&&window.parent.postMessage({type:ih},window.location.origin)}const uh="agent-webapp:project-request:v1",sh="agent-web-shell:project-response:v1",ah=["project:list","project:get","project:create","project:rename","project:delete","project:roots","project:directories","project:check"];new Set(ah);function ch(e){if(!e||typeof e!="object")return null;const t=e;return t.type!==sh||!Number.isSafeInteger(t.id)||Number(t.id)<1||typeof t.ok!="boolean"||!t.ok&&typeof t.error!="string"?null:t}class fh{constructor(t=window,n=15e3){this.context=t,this.timeoutMs=n,this.sequence=0,this.pending=new Map,this.onMessage=r=>{if(r.origin!==this.context.location.origin||r.source!==this.context.parent)return;const l=ch(r.data);if(!l)return;const i=this.pending.get(l.id);i&&(this.pending.delete(l.id),clearTimeout(i.timer),l.ok?i.resolve(l.result):i.reject(Object.assign(new Error(l.error||"项目操作失败"),{code:l.code})))},this.context.addEventListener("message",this.onMessage)}request(t,n={}){if(this.context.parent===this.context)return Promise.reject(Object.assign(new Error("请从 AgentRoam Web 控制台打开项目"),{code:"WEB_SHELL_REQUIRED"}));const r=++this.sequence;return new Promise((l,i)=>{const o=setTimeout(()=>{this.pending.delete(r),i(Object.assign(new Error("项目操作超时"),{code:"WEB_SHELL_TIMEOUT"}))},this.timeoutMs);this.pending.set(r,{resolve:l,reject:i,timer:o}),this.context.parent.postMessage({type:uh,id:r,method:t,payload:n},this.context.location.origin)})}dispose(){this.context.removeEventListener("message",this.onMessage);for(const t of this.pending.values())clearTimeout(t.timer),t.reject(Object.assign(new Error("项目桥已关闭"),{code:"WEB_SHELL_CLOSED"}));this.pending.clear()}}mp();wp();lh();document.body.dataset.webShell="1";const dh=new sp,ph=window.parent===window?void 0:new fh,os=new fp(dh,new dp,ph),Rc=document.getElementById("root");if(!Rc)throw new Error("#root missing");const hh=Sc(Rc);function mh(){return He.useEffect(()=>{oh()},[]),null}(async()=>{window.agentApi=os,await os.refreshServerModel();const{default:e}=await Lc(async()=>{const{default:t}=await import("./App-u5-hbDMQ.js");return{default:t}},[],import.meta.url);hh.render(Pl.jsxs(He.StrictMode,{children:[Pl.jsx(e,{}),Pl.jsx(mh,{})]})),vh()})();function vh(){const e=[...document.scripts].map(n=>n.src).join(",").match(/index-([^/]+)\.js/),t=e?e[1]:null;t&&setInterval(async()=>{try{const l=((await(await fetch("/api/agent/model",{credentials:"same-origin"})).json()).buildId||"").replace(/^index-|\.js$/g,"");l&&l!==t&&location.reload()}catch{}},6e4)}export{wh as L,Yc as R,yh as S,ip as a,gh as b,Kp as c,bp as i,Pl as j,He as r,th as u};
|