@mulsok/traders-client 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/README.md +42 -5
  3. package/bin/cli.js +618 -38
  4. package/dist/server/auth/admin.js +32 -0
  5. package/dist/server/auth/admin.js.map +1 -0
  6. package/dist/server/broker/kiwoom/_helpers/symbol-code.js +21 -0
  7. package/dist/server/broker/kiwoom/_helpers/symbol-code.js.map +1 -0
  8. package/dist/server/broker/kiwoom/client.js +23 -4
  9. package/dist/server/broker/kiwoom/client.js.map +1 -1
  10. package/dist/server/broker/kiwoom/endpoints/account.js +14 -6
  11. package/dist/server/broker/kiwoom/endpoints/account.js.map +1 -1
  12. package/dist/server/broker/kiwoom/endpoints/quote.js +99 -13
  13. package/dist/server/broker/kiwoom/endpoints/quote.js.map +1 -1
  14. package/dist/server/broker/kiwoom/index.js +1 -1
  15. package/dist/server/broker/kiwoom/index.js.map +1 -1
  16. package/dist/server/broker/kiwoom/order-tracker.js +13 -0
  17. package/dist/server/broker/kiwoom/order-tracker.js.map +1 -1
  18. package/dist/server/broker/kiwoom/price-feed.js +13 -0
  19. package/dist/server/broker/kiwoom/price-feed.js.map +1 -1
  20. package/dist/server/broker/kiwoom/ws/endpoints/condition.js +3 -2
  21. package/dist/server/broker/kiwoom/ws/endpoints/condition.js.map +1 -1
  22. package/dist/server/calendar/kst-marker.js +68 -0
  23. package/dist/server/calendar/kst-marker.js.map +1 -0
  24. package/dist/server/config.js +370 -72
  25. package/dist/server/config.js.map +1 -1
  26. package/dist/server/db/sqlite.js +53 -29
  27. package/dist/server/db/sqlite.js.map +1 -1
  28. package/dist/server/diary/writer.js +151 -46
  29. package/dist/server/diary/writer.js.map +1 -1
  30. package/dist/server/index.js +166 -11
  31. package/dist/server/index.js.map +1 -1
  32. package/dist/server/jobs/universe-sync.js +48 -11
  33. package/dist/server/jobs/universe-sync.js.map +1 -1
  34. package/dist/server/jobs/watchdog.js +4 -0
  35. package/dist/server/jobs/watchdog.js.map +1 -1
  36. package/dist/server/journal/telemetry.js +11 -0
  37. package/dist/server/journal/telemetry.js.map +1 -1
  38. package/dist/server/journal/trade-journal.js +42 -16
  39. package/dist/server/journal/trade-journal.js.map +1 -1
  40. package/dist/server/llm/context-builder.js +9 -5
  41. package/dist/server/llm/context-builder.js.map +1 -1
  42. package/dist/server/personas/loader.js +46 -16
  43. package/dist/server/personas/loader.js.map +1 -1
  44. package/dist/server/personas/persona-agent.js +93 -21
  45. package/dist/server/personas/persona-agent.js.map +1 -1
  46. package/dist/server/personas/persona-state.js +198 -19
  47. package/dist/server/personas/persona-state.js.map +1 -1
  48. package/dist/server/personas/runner.js +29 -0
  49. package/dist/server/personas/runner.js.map +1 -1
  50. package/dist/server/personas/wake-plan.js +4 -67
  51. package/dist/server/personas/wake-plan.js.map +1 -1
  52. package/dist/server/readiness.js +70 -0
  53. package/dist/server/readiness.js.map +1 -1
  54. package/dist/server/routes.js +276 -12
  55. package/dist/server/routes.js.map +1 -1
  56. package/dist/server/screener/engine.js +8 -1
  57. package/dist/server/screener/engine.js.map +1 -1
  58. package/dist/server/screener/indicators.js +63 -0
  59. package/dist/server/screener/indicators.js.map +1 -0
  60. package/dist/server/server-sync.js +365 -125
  61. package/dist/server/server-sync.js.map +1 -1
  62. package/dist/server/share/postgres-publish.js +139 -0
  63. package/dist/server/share/postgres-publish.js.map +1 -0
  64. package/dist/server/share/prepare-state.js +50 -0
  65. package/dist/server/share/prepare-state.js.map +1 -0
  66. package/dist/server/share/prepare.js +61 -0
  67. package/dist/server/share/prepare.js.map +1 -0
  68. package/dist/server/share/publish-cron.js +96 -0
  69. package/dist/server/share/publish-cron.js.map +1 -0
  70. package/dist/server/share/snapshot.js +81 -0
  71. package/dist/server/share/snapshot.js.map +1 -0
  72. package/dist/server/watchers/condition-watcher.js +57 -16
  73. package/dist/server/watchers/condition-watcher.js.map +1 -1
  74. package/dist/web/assets/index-B1C-UX9W.js +88 -0
  75. package/dist/web/assets/index-N7Xwheka.css +1 -0
  76. package/dist/web/index.html +2 -2
  77. package/package.json +4 -5
  78. package/dist/web/assets/index-62SMpbaf.js +0 -79
  79. package/dist/web/assets/index-BPLQR0wt.css +0 -1
@@ -0,0 +1,88 @@
1
+ (function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))u(o);new MutationObserver(o=>{for(const h of o)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&u(f)}).observe(document,{childList:!0,subtree:!0});function r(o){const h={};return o.integrity&&(h.integrity=o.integrity),o.referrerPolicy&&(h.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?h.credentials="include":o.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function u(o){if(o.ep)return;o.ep=!0;const h=r(o);fetch(o.href,h)}})();function hu(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var _c={exports:{}},ja={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var qm;function pv(){if(qm)return ja;qm=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function r(u,o,h){var f=null;if(h!==void 0&&(f=""+h),o.key!==void 0&&(f=""+o.key),"key"in o){h={};for(var p in o)p!=="key"&&(h[p]=o[p])}else h=o;return o=h.ref,{$$typeof:n,type:u,key:f,ref:o!==void 0?o:null,props:h}}return ja.Fragment=a,ja.jsx=r,ja.jsxs=r,ja}var Ym;function gv(){return Ym||(Ym=1,_c.exports=pv()),_c.exports}var c=gv(),Mc={exports:{}},ze={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Km;function yv(){if(Km)return ze;Km=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),j=Symbol.iterator;function b(N){return N===null||typeof N!="object"?null:(N=j&&N[j]||N["@@iterator"],typeof N=="function"?N:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,K={};function C(N,_,k){this.props=N,this.context=_,this.refs=K,this.updater=k||w}C.prototype.isReactComponent={},C.prototype.setState=function(N,_){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,_,"setState")},C.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function X(){}X.prototype=C.prototype;function Y(N,_,k){this.props=N,this.context=_,this.refs=K,this.updater=k||w}var Z=Y.prototype=new X;Z.constructor=Y,B(Z,C.prototype),Z.isPureReactComponent=!0;var oe=Array.isArray;function M(){}var ne={H:null,A:null,T:null,S:null},me=Object.prototype.hasOwnProperty;function pe(N,_,k){var G=k.ref;return{$$typeof:n,type:N,key:_,ref:G!==void 0?G:null,props:k}}function O(N,_){return pe(N.type,_,N.props)}function ae(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function le(N){var _={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(k){return _[k]})}var Ee=/\/+/g;function se(N,_){return typeof N=="object"&&N!==null&&N.key!=null?le(""+N.key):_.toString(36)}function P(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(M,M):(N.status="pending",N.then(function(_){N.status==="pending"&&(N.status="fulfilled",N.value=_)},function(_){N.status==="pending"&&(N.status="rejected",N.reason=_)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function D(N,_,k,G,fe){var he=typeof N;(he==="undefined"||he==="boolean")&&(N=null);var ke=!1;if(N===null)ke=!0;else switch(he){case"bigint":case"string":case"number":ke=!0;break;case"object":switch(N.$$typeof){case n:case a:ke=!0;break;case v:return ke=N._init,D(ke(N._payload),_,k,G,fe)}}if(ke)return fe=fe(N),ke=G===""?"."+se(N,0):G,oe(fe)?(k="",ke!=null&&(k=ke.replace(Ee,"$&/")+"/"),D(fe,_,k,"",function(ue){return ue})):fe!=null&&(ae(fe)&&(fe=O(fe,k+(fe.key==null||N&&N.key===fe.key?"":(""+fe.key).replace(Ee,"$&/")+"/")+ke)),_.push(fe)),1;ke=0;var Me=G===""?".":G+":";if(oe(N))for(var Ce=0;Ce<N.length;Ce++)G=N[Ce],he=Me+se(G,Ce),ke+=D(G,_,k,he,fe);else if(Ce=b(N),typeof Ce=="function")for(N=Ce.call(N),Ce=0;!(G=N.next()).done;)G=G.value,he=Me+se(G,Ce++),ke+=D(G,_,k,he,fe);else if(he==="object"){if(typeof N.then=="function")return D(P(N),_,k,G,fe);throw _=String(N),Error("Objects are not valid as a React child (found: "+(_==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":_)+"). If you meant to render a collection of children, use an array instead.")}return ke}function I(N,_,k){if(N==null)return N;var G=[],fe=0;return D(N,G,"","",function(he){return _.call(k,he,fe++)}),G}function de(N){if(N._status===-1){var _=N._result;_=_(),_.then(function(k){(N._status===0||N._status===-1)&&(N._status=1,N._result=k)},function(k){(N._status===0||N._status===-1)&&(N._status=2,N._result=k)}),N._status===-1&&(N._status=0,N._result=_)}if(N._status===1)return N._result.default;throw N._result}var ee=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var _=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(_))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},E={map:I,forEach:function(N,_,k){I(N,function(){_.apply(this,arguments)},k)},count:function(N){var _=0;return I(N,function(){_++}),_},toArray:function(N){return I(N,function(_){return _})||[]},only:function(N){if(!ae(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return ze.Activity=y,ze.Children=E,ze.Component=C,ze.Fragment=r,ze.Profiler=o,ze.PureComponent=Y,ze.StrictMode=u,ze.Suspense=g,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ne,ze.__COMPILER_RUNTIME={__proto__:null,c:function(N){return ne.H.useMemoCache(N)}},ze.cache=function(N){return function(){return N.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(N,_,k){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var G=B({},N.props),fe=N.key;if(_!=null)for(he in _.key!==void 0&&(fe=""+_.key),_)!me.call(_,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&_.ref===void 0||(G[he]=_[he]);var he=arguments.length-2;if(he===1)G.children=k;else if(1<he){for(var ke=Array(he),Me=0;Me<he;Me++)ke[Me]=arguments[Me+2];G.children=ke}return pe(N.type,fe,G)},ze.createContext=function(N){return N={$$typeof:f,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:h,_context:N},N},ze.createElement=function(N,_,k){var G,fe={},he=null;if(_!=null)for(G in _.key!==void 0&&(he=""+_.key),_)me.call(_,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(fe[G]=_[G]);var ke=arguments.length-2;if(ke===1)fe.children=k;else if(1<ke){for(var Me=Array(ke),Ce=0;Ce<ke;Ce++)Me[Ce]=arguments[Ce+2];fe.children=Me}if(N&&N.defaultProps)for(G in ke=N.defaultProps,ke)fe[G]===void 0&&(fe[G]=ke[G]);return pe(N,he,fe)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(N){return{$$typeof:p,render:N}},ze.isValidElement=ae,ze.lazy=function(N){return{$$typeof:v,_payload:{_status:-1,_result:N},_init:de}},ze.memo=function(N,_){return{$$typeof:m,type:N,compare:_===void 0?null:_}},ze.startTransition=function(N){var _=ne.T,k={};ne.T=k;try{var G=N(),fe=ne.S;fe!==null&&fe(k,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(M,ee)}catch(he){ee(he)}finally{_!==null&&k.types!==null&&(_.types=k.types),ne.T=_}},ze.unstable_useCacheRefresh=function(){return ne.H.useCacheRefresh()},ze.use=function(N){return ne.H.use(N)},ze.useActionState=function(N,_,k){return ne.H.useActionState(N,_,k)},ze.useCallback=function(N,_){return ne.H.useCallback(N,_)},ze.useContext=function(N){return ne.H.useContext(N)},ze.useDebugValue=function(){},ze.useDeferredValue=function(N,_){return ne.H.useDeferredValue(N,_)},ze.useEffect=function(N,_){return ne.H.useEffect(N,_)},ze.useEffectEvent=function(N){return ne.H.useEffectEvent(N)},ze.useId=function(){return ne.H.useId()},ze.useImperativeHandle=function(N,_,k){return ne.H.useImperativeHandle(N,_,k)},ze.useInsertionEffect=function(N,_){return ne.H.useInsertionEffect(N,_)},ze.useLayoutEffect=function(N,_){return ne.H.useLayoutEffect(N,_)},ze.useMemo=function(N,_){return ne.H.useMemo(N,_)},ze.useOptimistic=function(N,_){return ne.H.useOptimistic(N,_)},ze.useReducer=function(N,_,k){return ne.H.useReducer(N,_,k)},ze.useRef=function(N){return ne.H.useRef(N)},ze.useState=function(N){return ne.H.useState(N)},ze.useSyncExternalStore=function(N,_,k){return ne.H.useSyncExternalStore(N,_,k)},ze.useTransition=function(){return ne.H.useTransition()},ze.version="19.2.5",ze}var Gm;function ko(){return Gm||(Gm=1,Mc.exports=yv()),Mc.exports}var W=ko();const xv=hu(W);var Oc={exports:{}},ka={},Rc={exports:{}},Lc={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Vm;function vv(){return Vm||(Vm=1,(function(n){function a(D,I){var de=D.length;D.push(I);e:for(;0<de;){var ee=de-1>>>1,E=D[ee];if(0<o(E,I))D[ee]=I,D[de]=E,de=ee;else break e}}function r(D){return D.length===0?null:D[0]}function u(D){if(D.length===0)return null;var I=D[0],de=D.pop();if(de!==I){D[0]=de;e:for(var ee=0,E=D.length,N=E>>>1;ee<N;){var _=2*(ee+1)-1,k=D[_],G=_+1,fe=D[G];if(0>o(k,de))G<E&&0>o(fe,k)?(D[ee]=fe,D[G]=de,ee=G):(D[ee]=k,D[_]=de,ee=_);else if(G<E&&0>o(fe,de))D[ee]=fe,D[G]=de,ee=G;else break e}}return I}function o(D,I){var de=D.sortIndex-I.sortIndex;return de!==0?de:D.id-I.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;n.unstable_now=function(){return h.now()}}else{var f=Date,p=f.now();n.unstable_now=function(){return f.now()-p}}var g=[],m=[],v=1,y=null,j=3,b=!1,w=!1,B=!1,K=!1,C=typeof setTimeout=="function"?setTimeout:null,X=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function Z(D){for(var I=r(m);I!==null;){if(I.callback===null)u(m);else if(I.startTime<=D)u(m),I.sortIndex=I.expirationTime,a(g,I);else break;I=r(m)}}function oe(D){if(B=!1,Z(D),!w)if(r(g)!==null)w=!0,M||(M=!0,le());else{var I=r(m);I!==null&&P(oe,I.startTime-D)}}var M=!1,ne=-1,me=5,pe=-1;function O(){return K?!0:!(n.unstable_now()-pe<me)}function ae(){if(K=!1,M){var D=n.unstable_now();pe=D;var I=!0;try{e:{w=!1,B&&(B=!1,X(ne),ne=-1),b=!0;var de=j;try{t:{for(Z(D),y=r(g);y!==null&&!(y.expirationTime>D&&O());){var ee=y.callback;if(typeof ee=="function"){y.callback=null,j=y.priorityLevel;var E=ee(y.expirationTime<=D);if(D=n.unstable_now(),typeof E=="function"){y.callback=E,Z(D),I=!0;break t}y===r(g)&&u(g),Z(D)}else u(g);y=r(g)}if(y!==null)I=!0;else{var N=r(m);N!==null&&P(oe,N.startTime-D),I=!1}}break e}finally{y=null,j=de,b=!1}I=void 0}}finally{I?le():M=!1}}}var le;if(typeof Y=="function")le=function(){Y(ae)};else if(typeof MessageChannel<"u"){var Ee=new MessageChannel,se=Ee.port2;Ee.port1.onmessage=ae,le=function(){se.postMessage(null)}}else le=function(){C(ae,0)};function P(D,I){ne=C(function(){D(n.unstable_now())},I)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(D){D.callback=null},n.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):me=0<D?Math.floor(1e3/D):5},n.unstable_getCurrentPriorityLevel=function(){return j},n.unstable_next=function(D){switch(j){case 1:case 2:case 3:var I=3;break;default:I=j}var de=j;j=I;try{return D()}finally{j=de}},n.unstable_requestPaint=function(){K=!0},n.unstable_runWithPriority=function(D,I){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var de=j;j=D;try{return I()}finally{j=de}},n.unstable_scheduleCallback=function(D,I,de){var ee=n.unstable_now();switch(typeof de=="object"&&de!==null?(de=de.delay,de=typeof de=="number"&&0<de?ee+de:ee):de=ee,D){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=de+E,D={id:v++,callback:I,priorityLevel:D,startTime:de,expirationTime:E,sortIndex:-1},de>ee?(D.sortIndex=de,a(m,D),r(g)===null&&D===r(m)&&(B?(X(ne),ne=-1):B=!0,P(oe,de-ee))):(D.sortIndex=E,a(g,D),w||b||(w=!0,M||(M=!0,le()))),D},n.unstable_shouldYield=O,n.unstable_wrapCallback=function(D){var I=j;return function(){var de=j;j=I;try{return D.apply(this,arguments)}finally{j=de}}}})(Lc)),Lc}var Qm;function bv(){return Qm||(Qm=1,Rc.exports=vv()),Rc.exports}var Bc={exports:{}},At={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Xm;function Sv(){if(Xm)return At;Xm=1;var n=ko();function a(g){var m="https://react.dev/errors/"+g;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)m+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+g+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var u={d:{f:r,r:function(){throw Error(a(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function h(g,m,v){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:g,containerInfo:m,implementation:v}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(g,m){if(g==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return At.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,At.createPortal=function(g,m){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(a(299));return h(g,m,null,v)},At.flushSync=function(g){var m=f.T,v=u.p;try{if(f.T=null,u.p=2,g)return g()}finally{f.T=m,u.p=v,u.d.f()}},At.preconnect=function(g,m){typeof g=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,u.d.C(g,m))},At.prefetchDNS=function(g){typeof g=="string"&&u.d.D(g)},At.preinit=function(g,m){if(typeof g=="string"&&m&&typeof m.as=="string"){var v=m.as,y=p(v,m.crossOrigin),j=typeof m.integrity=="string"?m.integrity:void 0,b=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;v==="style"?u.d.S(g,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:j,fetchPriority:b}):v==="script"&&u.d.X(g,{crossOrigin:y,integrity:j,fetchPriority:b,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},At.preinitModule=function(g,m){if(typeof g=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var v=p(m.as,m.crossOrigin);u.d.M(g,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&u.d.M(g)},At.preload=function(g,m){if(typeof g=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var v=m.as,y=p(v,m.crossOrigin);u.d.L(g,v,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},At.preloadModule=function(g,m){if(typeof g=="string")if(m){var v=p(m.as,m.crossOrigin);u.d.m(g,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else u.d.m(g)},At.requestFormReset=function(g){u.d.r(g)},At.unstable_batchedUpdates=function(g,m){return g(m)},At.useFormState=function(g,m,v){return f.H.useFormState(g,m,v)},At.useFormStatus=function(){return f.H.useHostTransitionStatus()},At.version="19.2.5",At}var Zm;function jv(){if(Zm)return Bc.exports;Zm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Bc.exports=Sv(),Bc.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var Fm;function kv(){if(Fm)return ka;Fm=1;var n=bv(),a=ko(),r=jv();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function f(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 p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(h(e)!==e)throw Error(u(188))}function m(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(u(188));return t!==e?null:e}for(var l=e,i=t;;){var s=l.return;if(s===null)break;var d=s.alternate;if(d===null){if(i=s.return,i!==null){l=i;continue}break}if(s.child===d.child){for(d=s.child;d;){if(d===l)return g(s),e;if(d===i)return g(s),t;d=d.sibling}throw Error(u(188))}if(l.return!==i.return)l=s,i=d;else{for(var x=!1,S=s.child;S;){if(S===l){x=!0,l=s,i=d;break}if(S===i){x=!0,i=s,l=d;break}S=S.sibling}if(!x){for(S=d.child;S;){if(S===l){x=!0,l=d,i=s;break}if(S===i){x=!0,i=d,l=s;break}S=S.sibling}if(!x)throw Error(u(189))}}if(l.alternate!==i)throw Error(u(190))}if(l.tag!==3)throw Error(u(188));return l.stateNode.current===l?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,j=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),oe=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),me=Symbol.for("react.lazy"),pe=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function le(e){return e===null||typeof e!="object"?null:(e=ae&&e[ae]||e["@@iterator"],typeof e=="function"?e:null)}var Ee=Symbol.for("react.client.reference");function se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ee?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case B:return"Fragment";case C:return"Profiler";case K:return"StrictMode";case oe:return"Suspense";case M:return"SuspenseList";case pe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case Y:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case Z:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ne:return t=e.displayName||null,t!==null?t:se(e.type)||"Memo";case me:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var P=Array.isArray,D=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de={pending:!1,data:null,method:null,action:null},ee=[],E=-1;function N(e){return{current:e}}function _(e){0>E||(e.current=ee[E],ee[E]=null,E--)}function k(e,t){E++,ee[E]=e.current,e.current=t}var G=N(null),fe=N(null),he=N(null),ke=N(null);function Me(e,t){switch(k(he,t),k(fe,e),k(G,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?cm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=cm(t),e=om(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}_(G),k(G,e)}function Ce(){_(G),_(fe),_(he)}function ue(e){e.memoizedState!==null&&k(ke,e);var t=G.current,l=om(t,e.type);t!==l&&(k(fe,e),k(G,l))}function F(e){fe.current===e&&(_(G),_(fe)),ke.current===e&&(_(ke),xa._currentValue=de)}var ve,te;function be(e){if(ve===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);ve=t&&t[1]||"",te=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+ve+e+te}var ye=!1;function Q(e,t){if(!e||ye)return"";ye=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(q){var U=q}Reflect.construct(e,[],$)}else{try{$.call()}catch(q){U=q}e.call($.prototype)}}else{try{throw Error()}catch(q){U=q}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(q){if(q&&U&&typeof q.stack=="string")return[q.stack,U.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=i.DetermineComponentFrameRoot(),x=d[0],S=d[1];if(x&&S){var T=x.split(`
44
+ `),L=S.split(`
45
+ `);for(s=i=0;i<T.length&&!T[i].includes("DetermineComponentFrameRoot");)i++;for(;s<L.length&&!L[s].includes("DetermineComponentFrameRoot");)s++;if(i===T.length||s===L.length)for(i=T.length-1,s=L.length-1;1<=i&&0<=s&&T[i]!==L[s];)s--;for(;1<=i&&0<=s;i--,s--)if(T[i]!==L[s]){if(i!==1||s!==1)do if(i--,s--,0>s||T[i]!==L[s]){var V=`
46
+ `+T[i].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=i&&0<=s);break}}}finally{ye=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?be(l):""}function ce(e,t){switch(e.tag){case 26:case 27:case 5:return be(e.type);case 16:return be("Lazy");case 13:return e.child!==t&&t!==null?be("Suspense Fallback"):be("Suspense");case 19:return be("SuspenseList");case 0:case 15:return Q(e.type,!1);case 11:return Q(e.type.render,!1);case 1:return Q(e.type,!0);case 31:return be("Activity");default:return""}}function Ve(e){try{var t="",l=null;do t+=ce(e,l),l=e,e=e.return;while(e);return t}catch(i){return`
47
+ Error generating stack: `+i.message+`
48
+ `+i.stack}}var Le=Object.prototype.hasOwnProperty,Xe=n.unstable_scheduleCallback,we=n.unstable_cancelCallback,jt=n.unstable_shouldYield,Vt=n.unstable_requestPaint,Ae=n.unstable_now,Je=n.unstable_getCurrentPriorityLevel,H=n.unstable_ImmediatePriority,ie=n.unstable_UserBlockingPriority,Se=n.unstable_NormalPriority,De=n.unstable_LowPriority,qe=n.unstable_IdlePriority,Qt=n.log,En=n.unstable_setDisableYieldValue,Dt=null,xt=null;function Ot(e){if(typeof Qt=="function"&&En(e),xt&&typeof xt.setStrictMode=="function")try{xt.setStrictMode(Dt,e)}catch{}}var nt=Math.clz32?Math.clz32:ty,Qn=Math.log,hn=Math.LN2;function ty(e){return e>>>=0,e===0?32:31-(Qn(e)/hn|0)|0}var Ua=256,Ha=262144,qa=4194304;function xl(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ya(e,t,l){var i=e.pendingLanes;if(i===0)return 0;var s=0,d=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var S=i&134217727;return S!==0?(i=S&~d,i!==0?s=xl(i):(x&=S,x!==0?s=xl(x):l||(l=S&~e,l!==0&&(s=xl(l))))):(S=i&~d,S!==0?s=xl(S):x!==0?s=xl(x):l||(l=i&~e,l!==0&&(s=xl(l)))),s===0?0:t!==0&&t!==s&&(t&d)===0&&(d=s&-s,l=t&-t,d>=l||d===32&&(l&4194048)!==0)?t:s}function Di(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ny(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Go(){var e=qa;return qa<<=1,(qa&62914560)===0&&(qa=4194304),e}function bu(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function _i(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ly(e,t,l,i,s,d){var x=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var S=e.entanglements,T=e.expirationTimes,L=e.hiddenUpdates;for(l=x&~l;0<l;){var V=31-nt(l),$=1<<V;S[V]=0,T[V]=-1;var U=L[V];if(U!==null)for(L[V]=null,V=0;V<U.length;V++){var q=U[V];q!==null&&(q.lane&=-536870913)}l&=~$}i!==0&&Vo(e,i,0),d!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=d&~(x&~t))}function Vo(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-nt(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|l&261930}function Qo(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var i=31-nt(l),s=1<<i;s&t|e[i]&t&&(e[i]|=t),l&=~s}}function Xo(e,t){var l=t&-t;return l=(l&42)!==0?1:Su(l),(l&(e.suspendedLanes|t))!==0?0:l}function Su(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ju(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Zo(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:Mm(e.type))}function Fo(e,t){var l=I.p;try{return I.p=e,t()}finally{I.p=l}}var Xn=Math.random().toString(36).slice(2),kt="__reactFiber$"+Xn,Rt="__reactProps$"+Xn,Hl="__reactContainer$"+Xn,ku="__reactEvents$"+Xn,iy="__reactListeners$"+Xn,ay="__reactHandles$"+Xn,Jo="__reactResources$"+Xn,Mi="__reactMarker$"+Xn;function Nu(e){delete e[kt],delete e[Rt],delete e[ku],delete e[iy],delete e[ay]}function ql(e){var t=e[kt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Hl]||l[kt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=ym(e);e!==null;){if(l=e[kt])return l;e=ym(e)}return t}e=l,l=e.parentNode}return null}function Yl(e){if(e=e[kt]||e[Hl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Oi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Kl(e){var t=e[Jo];return t||(t=e[Jo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function bt(e){e[Mi]=!0}var $o=new Set,Io={};function vl(e,t){Gl(e,t),Gl(e+"Capture",t)}function Gl(e,t){for(Io[e]=t,e=0;e<t.length;e++)$o.add(t[e])}var ry=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Wo={},Po={};function uy(e){return Le.call(Po,e)?!0:Le.call(Wo,e)?!1:ry.test(e)?Po[e]=!0:(Wo[e]=!0,!1)}function Ka(e,t,l){if(uy(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Ga(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Tn(e,t,l,i){if(i===null)e.removeAttribute(l);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+i)}}function tn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ef(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sy(e,t,l){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var s=i.get,d=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(x){l=""+x,d.call(this,x)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return l},setValue:function(x){l=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Eu(e){if(!e._valueTracker){var t=ef(e)?"checked":"value";e._valueTracker=sy(e,t,""+e[t])}}function tf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),i="";return e&&(i=ef(e)?e.checked?"true":"false":e.value),e=i,e!==l?(t.setValue(e),!0):!1}function Va(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}}var cy=/[\n"\\]/g;function nn(e){return e.replace(cy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Tu(e,t,l,i,s,d,x,S){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+tn(t)):e.value!==""+tn(t)&&(e.value=""+tn(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?wu(e,x,tn(t)):l!=null?wu(e,x,tn(l)):i!=null&&e.removeAttribute("value"),s==null&&d!=null&&(e.defaultChecked=!!d),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+tn(S):e.removeAttribute("name")}function nf(e,t,l,i,s,d,x,S){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||l!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){Eu(e);return}l=l!=null?""+tn(l):"",t=t!=null?""+tn(t):l,S||t===e.value||(e.value=t),e.defaultValue=t}i=i??s,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=S?e.checked:!!i,e.defaultChecked=!!i,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Eu(e)}function wu(e,t,l){t==="number"&&Va(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Vl(e,t,l,i){if(e=e.options,t){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=t.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&i&&(e[l].defaultSelected=!0)}else{for(l=""+tn(l),t=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,i&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function lf(e,t,l){if(t!=null&&(t=""+tn(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+tn(l):""}function af(e,t,l,i){if(t==null){if(i!=null){if(l!=null)throw Error(u(92));if(P(i)){if(1<i.length)throw Error(u(93));i=i[0]}l=i}l==null&&(l=""),t=l}l=tn(t),e.defaultValue=l,i=e.textContent,i===l&&i!==""&&i!==null&&(e.value=i),Eu(e)}function Ql(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var oy=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function rf(e,t,l){var i=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,l):typeof l!="number"||l===0||oy.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function uf(e,t,l){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,l!=null){for(var i in l)!l.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var s in t)i=t[s],t.hasOwnProperty(s)&&l[s]!==i&&rf(e,s,i)}else for(var d in t)t.hasOwnProperty(d)&&rf(e,d,t[d])}function Au(e){if(e.indexOf("-")===-1)return!1;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 fy=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),dy=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Qa(e){return dy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function wn(){}var Cu=null;function zu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xl=null,Zl=null;function sf(e){var t=Yl(e);if(t&&(e=t.stateNode)){var l=e[Rt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Tu(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+nn(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var i=l[t];if(i!==e&&i.form===e.form){var s=i[Rt]||null;if(!s)throw Error(u(90));Tu(i,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<l.length;t++)i=l[t],i.form===e.form&&tf(i)}break e;case"textarea":lf(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Vl(e,!!l.multiple,t,!1)}}}var Du=!1;function cf(e,t,l){if(Du)return e(t,l);Du=!0;try{var i=e(t);return i}finally{if(Du=!1,(Xl!==null||Zl!==null)&&(_r(),Xl&&(t=Xl,e=Zl,Zl=Xl=null,sf(t),e)))for(t=0;t<e.length;t++)sf(e[t])}}function Ri(e,t){var l=e.stateNode;if(l===null)return null;var i=l[Rt]||null;if(i===null)return null;l=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(u(231,t,typeof l));return l}var An=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_u=!1;if(An)try{var Li={};Object.defineProperty(Li,"passive",{get:function(){_u=!0}}),window.addEventListener("test",Li,Li),window.removeEventListener("test",Li,Li)}catch{_u=!1}var Zn=null,Mu=null,Xa=null;function of(){if(Xa)return Xa;var e,t=Mu,l=t.length,i,s="value"in Zn?Zn.value:Zn.textContent,d=s.length;for(e=0;e<l&&t[e]===s[e];e++);var x=l-e;for(i=1;i<=x&&t[l-i]===s[d-i];i++);return Xa=s.slice(e,1<i?1-i:void 0)}function Za(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 Fa(){return!0}function ff(){return!1}function Lt(e){function t(l,i,s,d,x){this._reactName=l,this._targetInst=s,this.type=i,this.nativeEvent=d,this.target=x,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(l=e[S],this[S]=l?l(d):d[S]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Fa:ff,this.isPropagationStopped=ff,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Fa)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Fa)},persist:function(){},isPersistent:Fa}),t}var bl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ja=Lt(bl),Bi=y({},bl,{view:0,detail:0}),hy=Lt(Bi),Ou,Ru,Ui,$a=y({},Bi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bu,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!==Ui&&(Ui&&e.type==="mousemove"?(Ou=e.screenX-Ui.screenX,Ru=e.screenY-Ui.screenY):Ru=Ou=0,Ui=e),Ou)},movementY:function(e){return"movementY"in e?e.movementY:Ru}}),df=Lt($a),my=y({},$a,{dataTransfer:0}),py=Lt(my),gy=y({},Bi,{relatedTarget:0}),Lu=Lt(gy),yy=y({},bl,{animationName:0,elapsedTime:0,pseudoElement:0}),xy=Lt(yy),vy=y({},bl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),by=Lt(vy),Sy=y({},bl,{data:0}),hf=Lt(Sy),jy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ky={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"},Ny={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ey(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ny[e])?!!t[e]:!1}function Bu(){return Ey}var Ty=y({},Bi,{key:function(e){if(e.key){var t=jy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Za(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ky[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bu,charCode:function(e){return e.type==="keypress"?Za(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Za(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),wy=Lt(Ty),Ay=y({},$a,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mf=Lt(Ay),Cy=y({},Bi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bu}),zy=Lt(Cy),Dy=y({},bl,{propertyName:0,elapsedTime:0,pseudoElement:0}),_y=Lt(Dy),My=y({},$a,{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}),Oy=Lt(My),Ry=y({},bl,{newState:0,oldState:0}),Ly=Lt(Ry),By=[9,13,27,32],Uu=An&&"CompositionEvent"in window,Hi=null;An&&"documentMode"in document&&(Hi=document.documentMode);var Uy=An&&"TextEvent"in window&&!Hi,pf=An&&(!Uu||Hi&&8<Hi&&11>=Hi),gf=" ",yf=!1;function xf(e,t){switch(e){case"keyup":return By.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fl=!1;function Hy(e,t){switch(e){case"compositionend":return vf(t);case"keypress":return t.which!==32?null:(yf=!0,gf);case"textInput":return e=t.data,e===gf&&yf?null:e;default:return null}}function qy(e,t){if(Fl)return e==="compositionend"||!Uu&&xf(e,t)?(e=of(),Xa=Mu=Zn=null,Fl=!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 pf&&t.locale!=="ko"?null:t.data;default:return null}}var Yy={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function bf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Yy[e.type]:t==="textarea"}function Sf(e,t,l,i){Xl?Zl?Zl.push(i):Zl=[i]:Xl=i,t=Hr(t,"onChange"),0<t.length&&(l=new Ja("onChange","change",null,l,i),e.push({event:l,listeners:t}))}var qi=null,Yi=null;function Ky(e){lm(e,0)}function Ia(e){var t=Oi(e);if(tf(t))return e}function jf(e,t){if(e==="change")return t}var kf=!1;if(An){var Hu;if(An){var qu="oninput"in document;if(!qu){var Nf=document.createElement("div");Nf.setAttribute("oninput","return;"),qu=typeof Nf.oninput=="function"}Hu=qu}else Hu=!1;kf=Hu&&(!document.documentMode||9<document.documentMode)}function Ef(){qi&&(qi.detachEvent("onpropertychange",Tf),Yi=qi=null)}function Tf(e){if(e.propertyName==="value"&&Ia(Yi)){var t=[];Sf(t,Yi,e,zu(e)),cf(Ky,t)}}function Gy(e,t,l){e==="focusin"?(Ef(),qi=t,Yi=l,qi.attachEvent("onpropertychange",Tf)):e==="focusout"&&Ef()}function Vy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ia(Yi)}function Qy(e,t){if(e==="click")return Ia(t)}function Xy(e,t){if(e==="input"||e==="change")return Ia(t)}function Zy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xt=typeof Object.is=="function"?Object.is:Zy;function Ki(e,t){if(Xt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),i=Object.keys(t);if(l.length!==i.length)return!1;for(i=0;i<l.length;i++){var s=l[i];if(!Le.call(t,s)||!Xt(e[s],t[s]))return!1}return!0}function wf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Af(e,t){var l=wf(e);e=0;for(var i;l;){if(l.nodeType===3){if(i=e+l.textContent.length,e<=t&&i>=t)return{node:l,offset:t-e};e=i}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=wf(l)}}function Cf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Va(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Va(e.document)}return t}function Yu(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")}var Fy=An&&"documentMode"in document&&11>=document.documentMode,Jl=null,Ku=null,Gi=null,Gu=!1;function Df(e,t,l){var i=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Gu||Jl==null||Jl!==Va(i)||(i=Jl,"selectionStart"in i&&Yu(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Gi&&Ki(Gi,i)||(Gi=i,i=Hr(Ku,"onSelect"),0<i.length&&(t=new Ja("onSelect","select",null,t,l),e.push({event:t,listeners:i}),t.target=Jl)))}function Sl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var $l={animationend:Sl("Animation","AnimationEnd"),animationiteration:Sl("Animation","AnimationIteration"),animationstart:Sl("Animation","AnimationStart"),transitionrun:Sl("Transition","TransitionRun"),transitionstart:Sl("Transition","TransitionStart"),transitioncancel:Sl("Transition","TransitionCancel"),transitionend:Sl("Transition","TransitionEnd")},Vu={},_f={};An&&(_f=document.createElement("div").style,"AnimationEvent"in window||(delete $l.animationend.animation,delete $l.animationiteration.animation,delete $l.animationstart.animation),"TransitionEvent"in window||delete $l.transitionend.transition);function jl(e){if(Vu[e])return Vu[e];if(!$l[e])return e;var t=$l[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in _f)return Vu[e]=t[l];return e}var Mf=jl("animationend"),Of=jl("animationiteration"),Rf=jl("animationstart"),Jy=jl("transitionrun"),$y=jl("transitionstart"),Iy=jl("transitioncancel"),Lf=jl("transitionend"),Bf=new Map,Qu="abort auxClick beforeToggle 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(" ");Qu.push("scrollEnd");function mn(e,t){Bf.set(e,t),vl(t,[e])}var Wa=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},ln=[],Il=0,Xu=0;function Pa(){for(var e=Il,t=Xu=Il=0;t<e;){var l=ln[t];ln[t++]=null;var i=ln[t];ln[t++]=null;var s=ln[t];ln[t++]=null;var d=ln[t];if(ln[t++]=null,i!==null&&s!==null){var x=i.pending;x===null?s.next=s:(s.next=x.next,x.next=s),i.pending=s}d!==0&&Uf(l,s,d)}}function er(e,t,l,i){ln[Il++]=e,ln[Il++]=t,ln[Il++]=l,ln[Il++]=i,Xu|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Zu(e,t,l,i){return er(e,t,l,i),tr(e)}function kl(e,t){return er(e,null,null,t),tr(e)}function Uf(e,t,l){e.lanes|=l;var i=e.alternate;i!==null&&(i.lanes|=l);for(var s=!1,d=e.return;d!==null;)d.childLanes|=l,i=d.alternate,i!==null&&(i.childLanes|=l),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(s=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,s&&t!==null&&(s=31-nt(l),e=d.hiddenUpdates,i=e[s],i===null?e[s]=[t]:i.push(t),t.lane=l|536870912),d):null}function tr(e){if(50<fa)throw fa=0,nc=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Wl={};function Wy(e,t,l,i){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zt(e,t,l,i){return new Wy(e,t,l,i)}function Fu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Cn(e,t){var l=e.alternate;return l===null?(l=Zt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Hf(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function nr(e,t,l,i,s,d){var x=0;if(i=e,typeof e=="function")Fu(e)&&(x=1);else if(typeof e=="string")x=lv(e,l,G.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case pe:return e=Zt(31,l,t,s),e.elementType=pe,e.lanes=d,e;case B:return Nl(l.children,s,d,t);case K:x=8,s|=24;break;case C:return e=Zt(12,l,t,s|2),e.elementType=C,e.lanes=d,e;case oe:return e=Zt(13,l,t,s),e.elementType=oe,e.lanes=d,e;case M:return e=Zt(19,l,t,s),e.elementType=M,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Y:x=10;break e;case X:x=9;break e;case Z:x=11;break e;case ne:x=14;break e;case me:x=16,i=null;break e}x=29,l=Error(u(130,e===null?"null":typeof e,"")),i=null}return t=Zt(x,l,t,s),t.elementType=e,t.type=i,t.lanes=d,t}function Nl(e,t,l,i){return e=Zt(7,e,i,t),e.lanes=l,e}function Ju(e,t,l){return e=Zt(6,e,null,t),e.lanes=l,e}function qf(e){var t=Zt(18,null,null,0);return t.stateNode=e,t}function $u(e,t,l){return t=Zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Yf=new WeakMap;function an(e,t){if(typeof e=="object"&&e!==null){var l=Yf.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Ve(t)},Yf.set(e,t),t)}return{value:e,source:t,stack:Ve(t)}}var Pl=[],ei=0,lr=null,Vi=0,rn=[],un=0,Fn=null,xn=1,vn="";function zn(e,t){Pl[ei++]=Vi,Pl[ei++]=lr,lr=e,Vi=t}function Kf(e,t,l){rn[un++]=xn,rn[un++]=vn,rn[un++]=Fn,Fn=e;var i=xn;e=vn;var s=32-nt(i)-1;i&=~(1<<s),l+=1;var d=32-nt(t)+s;if(30<d){var x=s-s%5;d=(i&(1<<x)-1).toString(32),i>>=x,s-=x,xn=1<<32-nt(t)+s|l<<s|i,vn=d+e}else xn=1<<d|l<<s|i,vn=e}function Iu(e){e.return!==null&&(zn(e,1),Kf(e,1,0))}function Wu(e){for(;e===lr;)lr=Pl[--ei],Pl[ei]=null,Vi=Pl[--ei],Pl[ei]=null;for(;e===Fn;)Fn=rn[--un],rn[un]=null,vn=rn[--un],rn[un]=null,xn=rn[--un],rn[un]=null}function Gf(e,t){rn[un++]=xn,rn[un++]=vn,rn[un++]=Fn,xn=t.id,vn=t.overflow,Fn=e}var Nt=null,rt=null,Ge=!1,Jn=null,sn=!1,Pu=Error(u(519));function $n(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qi(an(t,e)),Pu}function Vf(e){var t=e.stateNode,l=e.type,i=e.memoizedProps;switch(t[kt]=e,t[Rt]=i,l){case"dialog":Ue("cancel",t),Ue("close",t);break;case"iframe":case"object":case"embed":Ue("load",t);break;case"video":case"audio":for(l=0;l<ha.length;l++)Ue(ha[l],t);break;case"source":Ue("error",t);break;case"img":case"image":case"link":Ue("error",t),Ue("load",t);break;case"details":Ue("toggle",t);break;case"input":Ue("invalid",t),nf(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Ue("invalid",t);break;case"textarea":Ue("invalid",t),af(t,i.value,i.defaultValue,i.children)}l=i.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||i.suppressHydrationWarning===!0||um(t.textContent,l)?(i.popover!=null&&(Ue("beforetoggle",t),Ue("toggle",t)),i.onScroll!=null&&Ue("scroll",t),i.onScrollEnd!=null&&Ue("scrollend",t),i.onClick!=null&&(t.onclick=wn),t=!0):t=!1,t||$n(e,!0)}function Qf(e){for(Nt=e.return;Nt;)switch(Nt.tag){case 5:case 31:case 13:sn=!1;return;case 27:case 3:sn=!0;return;default:Nt=Nt.return}}function ti(e){if(e!==Nt)return!1;if(!Ge)return Qf(e),Ge=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||yc(e.type,e.memoizedProps)),l=!l),l&&rt&&$n(e),Qf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));rt=gm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));rt=gm(e)}else t===27?(t=rt,ol(e.type)?(e=jc,jc=null,rt=e):rt=t):rt=Nt?on(e.stateNode.nextSibling):null;return!0}function El(){rt=Nt=null,Ge=!1}function es(){var e=Jn;return e!==null&&(qt===null?qt=e:qt.push.apply(qt,e),Jn=null),e}function Qi(e){Jn===null?Jn=[e]:Jn.push(e)}var ts=N(null),Tl=null,Dn=null;function In(e,t,l){k(ts,t._currentValue),t._currentValue=l}function _n(e){e._currentValue=ts.current,_(ts)}function ns(e,t,l){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===l)break;e=e.return}}function ls(e,t,l,i){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var d=s.dependencies;if(d!==null){var x=s.child;d=d.firstContext;e:for(;d!==null;){var S=d;d=s;for(var T=0;T<t.length;T++)if(S.context===t[T]){d.lanes|=l,S=d.alternate,S!==null&&(S.lanes|=l),ns(d.return,l,e),i||(x=null);break e}d=S.next}}else if(s.tag===18){if(x=s.return,x===null)throw Error(u(341));x.lanes|=l,d=x.alternate,d!==null&&(d.lanes|=l),ns(x,l,e),x=null}else x=s.child;if(x!==null)x.return=s;else for(x=s;x!==null;){if(x===e){x=null;break}if(s=x.sibling,s!==null){s.return=x.return,x=s;break}x=x.return}s=x}}function ni(e,t,l,i){e=null;for(var s=t,d=!1;s!==null;){if(!d){if((s.flags&524288)!==0)d=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var x=s.alternate;if(x===null)throw Error(u(387));if(x=x.memoizedProps,x!==null){var S=s.type;Xt(s.pendingProps.value,x.value)||(e!==null?e.push(S):e=[S])}}else if(s===ke.current){if(x=s.alternate,x===null)throw Error(u(387));x.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(xa):e=[xa])}s=s.return}e!==null&&ls(t,e,l,i),t.flags|=262144}function ir(e){for(e=e.firstContext;e!==null;){if(!Xt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function wl(e){Tl=e,Dn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Et(e){return Xf(Tl,e)}function ar(e,t){return Tl===null&&wl(e),Xf(e,t)}function Xf(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Dn===null){if(e===null)throw Error(u(308));Dn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Dn=Dn.next=t;return l}var Py=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},ex=n.unstable_scheduleCallback,tx=n.unstable_NormalPriority,ht={$$typeof:Y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function is(){return{controller:new Py,data:new Map,refCount:0}}function Xi(e){e.refCount--,e.refCount===0&&ex(tx,function(){e.controller.abort()})}var Zi=null,as=0,li=0,ii=null;function nx(e,t){if(Zi===null){var l=Zi=[];as=0,li=sc(),ii={status:"pending",value:void 0,then:function(i){l.push(i)}}}return as++,t.then(Zf,Zf),t}function Zf(){if(--as===0&&Zi!==null){ii!==null&&(ii.status="fulfilled");var e=Zi;Zi=null,li=0,ii=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function lx(e,t){var l=[],i={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var s=0;s<l.length;s++)(0,l[s])(t)},function(s){for(i.status="rejected",i.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),i}var Ff=D.S;D.S=function(e,t){Dh=Ae(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&nx(e,t),Ff!==null&&Ff(e,t)};var Al=N(null);function rs(){var e=Al.current;return e!==null?e:lt.pooledCache}function rr(e,t){t===null?k(Al,Al.current):k(Al,t.pool)}function Jf(){var e=rs();return e===null?null:{parent:ht._currentValue,pool:e}}var ai=Error(u(460)),us=Error(u(474)),ur=Error(u(542)),sr={then:function(){}};function $f(e){return e=e.status,e==="fulfilled"||e==="rejected"}function If(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(wn,wn),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Pf(e),e;default:if(typeof t.status=="string")t.then(wn,wn);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=i}},function(i){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Pf(e),e}throw zl=t,ai}}function Cl(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(zl=l,ai):l}}var zl=null;function Wf(){if(zl===null)throw Error(u(459));var e=zl;return zl=null,e}function Pf(e){if(e===ai||e===ur)throw Error(u(483))}var ri=null,Fi=0;function cr(e){var t=Fi;return Fi+=1,ri===null&&(ri=[]),If(ri,e,t)}function Ji(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function or(e,t){throw t.$$typeof===j?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ed(e){function t(z,A){if(e){var R=z.deletions;R===null?(z.deletions=[A],z.flags|=16):R.push(A)}}function l(z,A){if(!e)return null;for(;A!==null;)t(z,A),A=A.sibling;return null}function i(z){for(var A=new Map;z!==null;)z.key!==null?A.set(z.key,z):A.set(z.index,z),z=z.sibling;return A}function s(z,A){return z=Cn(z,A),z.index=0,z.sibling=null,z}function d(z,A,R){return z.index=R,e?(R=z.alternate,R!==null?(R=R.index,R<A?(z.flags|=67108866,A):R):(z.flags|=67108866,A)):(z.flags|=1048576,A)}function x(z){return e&&z.alternate===null&&(z.flags|=67108866),z}function S(z,A,R,J){return A===null||A.tag!==6?(A=Ju(R,z.mode,J),A.return=z,A):(A=s(A,R),A.return=z,A)}function T(z,A,R,J){var je=R.type;return je===B?V(z,A,R.props.children,J,R.key):A!==null&&(A.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===me&&Cl(je)===A.type)?(A=s(A,R.props),Ji(A,R),A.return=z,A):(A=nr(R.type,R.key,R.props,null,z.mode,J),Ji(A,R),A.return=z,A)}function L(z,A,R,J){return A===null||A.tag!==4||A.stateNode.containerInfo!==R.containerInfo||A.stateNode.implementation!==R.implementation?(A=$u(R,z.mode,J),A.return=z,A):(A=s(A,R.children||[]),A.return=z,A)}function V(z,A,R,J,je){return A===null||A.tag!==7?(A=Nl(R,z.mode,J,je),A.return=z,A):(A=s(A,R),A.return=z,A)}function $(z,A,R){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return A=Ju(""+A,z.mode,R),A.return=z,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case b:return R=nr(A.type,A.key,A.props,null,z.mode,R),Ji(R,A),R.return=z,R;case w:return A=$u(A,z.mode,R),A.return=z,A;case me:return A=Cl(A),$(z,A,R)}if(P(A)||le(A))return A=Nl(A,z.mode,R,null),A.return=z,A;if(typeof A.then=="function")return $(z,cr(A),R);if(A.$$typeof===Y)return $(z,ar(z,A),R);or(z,A)}return null}function U(z,A,R,J){var je=A!==null?A.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return je!==null?null:S(z,A,""+R,J);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case b:return R.key===je?T(z,A,R,J):null;case w:return R.key===je?L(z,A,R,J):null;case me:return R=Cl(R),U(z,A,R,J)}if(P(R)||le(R))return je!==null?null:V(z,A,R,J,null);if(typeof R.then=="function")return U(z,A,cr(R),J);if(R.$$typeof===Y)return U(z,A,ar(z,R),J);or(z,R)}return null}function q(z,A,R,J,je){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return z=z.get(R)||null,S(A,z,""+J,je);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case b:return z=z.get(J.key===null?R:J.key)||null,T(A,z,J,je);case w:return z=z.get(J.key===null?R:J.key)||null,L(A,z,J,je);case me:return J=Cl(J),q(z,A,R,J,je)}if(P(J)||le(J))return z=z.get(R)||null,V(A,z,J,je,null);if(typeof J.then=="function")return q(z,A,R,cr(J),je);if(J.$$typeof===Y)return q(z,A,R,ar(A,J),je);or(A,J)}return null}function ge(z,A,R,J){for(var je=null,Ze=null,xe=A,Oe=A=0,Ke=null;xe!==null&&Oe<R.length;Oe++){xe.index>Oe?(Ke=xe,xe=null):Ke=xe.sibling;var Fe=U(z,xe,R[Oe],J);if(Fe===null){xe===null&&(xe=Ke);break}e&&xe&&Fe.alternate===null&&t(z,xe),A=d(Fe,A,Oe),Ze===null?je=Fe:Ze.sibling=Fe,Ze=Fe,xe=Ke}if(Oe===R.length)return l(z,xe),Ge&&zn(z,Oe),je;if(xe===null){for(;Oe<R.length;Oe++)xe=$(z,R[Oe],J),xe!==null&&(A=d(xe,A,Oe),Ze===null?je=xe:Ze.sibling=xe,Ze=xe);return Ge&&zn(z,Oe),je}for(xe=i(xe);Oe<R.length;Oe++)Ke=q(xe,z,Oe,R[Oe],J),Ke!==null&&(e&&Ke.alternate!==null&&xe.delete(Ke.key===null?Oe:Ke.key),A=d(Ke,A,Oe),Ze===null?je=Ke:Ze.sibling=Ke,Ze=Ke);return e&&xe.forEach(function(pl){return t(z,pl)}),Ge&&zn(z,Oe),je}function Te(z,A,R,J){if(R==null)throw Error(u(151));for(var je=null,Ze=null,xe=A,Oe=A=0,Ke=null,Fe=R.next();xe!==null&&!Fe.done;Oe++,Fe=R.next()){xe.index>Oe?(Ke=xe,xe=null):Ke=xe.sibling;var pl=U(z,xe,Fe.value,J);if(pl===null){xe===null&&(xe=Ke);break}e&&xe&&pl.alternate===null&&t(z,xe),A=d(pl,A,Oe),Ze===null?je=pl:Ze.sibling=pl,Ze=pl,xe=Ke}if(Fe.done)return l(z,xe),Ge&&zn(z,Oe),je;if(xe===null){for(;!Fe.done;Oe++,Fe=R.next())Fe=$(z,Fe.value,J),Fe!==null&&(A=d(Fe,A,Oe),Ze===null?je=Fe:Ze.sibling=Fe,Ze=Fe);return Ge&&zn(z,Oe),je}for(xe=i(xe);!Fe.done;Oe++,Fe=R.next())Fe=q(xe,z,Oe,Fe.value,J),Fe!==null&&(e&&Fe.alternate!==null&&xe.delete(Fe.key===null?Oe:Fe.key),A=d(Fe,A,Oe),Ze===null?je=Fe:Ze.sibling=Fe,Ze=Fe);return e&&xe.forEach(function(mv){return t(z,mv)}),Ge&&zn(z,Oe),je}function tt(z,A,R,J){if(typeof R=="object"&&R!==null&&R.type===B&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case b:e:{for(var je=R.key;A!==null;){if(A.key===je){if(je=R.type,je===B){if(A.tag===7){l(z,A.sibling),J=s(A,R.props.children),J.return=z,z=J;break e}}else if(A.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===me&&Cl(je)===A.type){l(z,A.sibling),J=s(A,R.props),Ji(J,R),J.return=z,z=J;break e}l(z,A);break}else t(z,A);A=A.sibling}R.type===B?(J=Nl(R.props.children,z.mode,J,R.key),J.return=z,z=J):(J=nr(R.type,R.key,R.props,null,z.mode,J),Ji(J,R),J.return=z,z=J)}return x(z);case w:e:{for(je=R.key;A!==null;){if(A.key===je)if(A.tag===4&&A.stateNode.containerInfo===R.containerInfo&&A.stateNode.implementation===R.implementation){l(z,A.sibling),J=s(A,R.children||[]),J.return=z,z=J;break e}else{l(z,A);break}else t(z,A);A=A.sibling}J=$u(R,z.mode,J),J.return=z,z=J}return x(z);case me:return R=Cl(R),tt(z,A,R,J)}if(P(R))return ge(z,A,R,J);if(le(R)){if(je=le(R),typeof je!="function")throw Error(u(150));return R=je.call(R),Te(z,A,R,J)}if(typeof R.then=="function")return tt(z,A,cr(R),J);if(R.$$typeof===Y)return tt(z,A,ar(z,R),J);or(z,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,A!==null&&A.tag===6?(l(z,A.sibling),J=s(A,R),J.return=z,z=J):(l(z,A),J=Ju(R,z.mode,J),J.return=z,z=J),x(z)):l(z,A)}return function(z,A,R,J){try{Fi=0;var je=tt(z,A,R,J);return ri=null,je}catch(xe){if(xe===ai||xe===ur)throw xe;var Ze=Zt(29,xe,null,z.mode);return Ze.lanes=J,Ze.return=z,Ze}finally{}}}var Dl=ed(!0),td=ed(!1),Wn=!1;function ss(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cs(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Pn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function el(e,t,l){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,($e&2)!==0){var s=i.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),i.pending=t,t=tr(e),Uf(e,null,l),t}return er(e,i,t,l),tr(e)}function $i(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,l|=i,t.lanes=l,Qo(e,l)}}function os(e,t){var l=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,l===i)){var s=null,d=null;if(l=l.firstBaseUpdate,l!==null){do{var x={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};d===null?s=d=x:d=d.next=x,l=l.next}while(l!==null);d===null?s=d=t:d=d.next=t}else s=d=t;l={baseState:i.baseState,firstBaseUpdate:s,lastBaseUpdate:d,shared:i.shared,callbacks:i.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var fs=!1;function Ii(){if(fs){var e=ii;if(e!==null)throw e}}function Wi(e,t,l,i){fs=!1;var s=e.updateQueue;Wn=!1;var d=s.firstBaseUpdate,x=s.lastBaseUpdate,S=s.shared.pending;if(S!==null){s.shared.pending=null;var T=S,L=T.next;T.next=null,x===null?d=L:x.next=L,x=T;var V=e.alternate;V!==null&&(V=V.updateQueue,S=V.lastBaseUpdate,S!==x&&(S===null?V.firstBaseUpdate=L:S.next=L,V.lastBaseUpdate=T))}if(d!==null){var $=s.baseState;x=0,V=L=T=null,S=d;do{var U=S.lane&-536870913,q=U!==S.lane;if(q?(Ye&U)===U:(i&U)===U){U!==0&&U===li&&(fs=!0),V!==null&&(V=V.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ge=e,Te=S;U=t;var tt=l;switch(Te.tag){case 1:if(ge=Te.payload,typeof ge=="function"){$=ge.call(tt,$,U);break e}$=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=Te.payload,U=typeof ge=="function"?ge.call(tt,$,U):ge,U==null)break e;$=y({},$,U);break e;case 2:Wn=!0}}U=S.callback,U!==null&&(e.flags|=64,q&&(e.flags|=8192),q=s.callbacks,q===null?s.callbacks=[U]:q.push(U))}else q={lane:U,tag:S.tag,payload:S.payload,callback:S.callback,next:null},V===null?(L=V=q,T=$):V=V.next=q,x|=U;if(S=S.next,S===null){if(S=s.shared.pending,S===null)break;q=S,S=q.next,q.next=null,s.lastBaseUpdate=q,s.shared.pending=null}}while(!0);V===null&&(T=$),s.baseState=T,s.firstBaseUpdate=L,s.lastBaseUpdate=V,d===null&&(s.shared.lanes=0),al|=x,e.lanes=x,e.memoizedState=$}}function nd(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function ld(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)nd(l[e],t)}var ui=N(null),fr=N(0);function id(e,t){e=Yn,k(fr,e),k(ui,t),Yn=e|t.baseLanes}function ds(){k(fr,Yn),k(ui,ui.current)}function hs(){Yn=fr.current,_(ui),_(fr)}var Ft=N(null),cn=null;function tl(e){var t=e.alternate;k(ft,ft.current&1),k(Ft,e),cn===null&&(t===null||ui.current!==null||t.memoizedState!==null)&&(cn=e)}function ms(e){k(ft,ft.current),k(Ft,e),cn===null&&(cn=e)}function ad(e){e.tag===22?(k(ft,ft.current),k(Ft,e),cn===null&&(cn=e)):nl()}function nl(){k(ft,ft.current),k(Ft,Ft.current)}function Jt(e){_(Ft),cn===e&&(cn=null),_(ft)}var ft=N(0);function dr(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||bc(l)||Sc(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)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 Mn=0,_e=null,Pe=null,mt=null,hr=!1,si=!1,_l=!1,mr=0,Pi=0,ci=null,ix=0;function ct(){throw Error(u(321))}function ps(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Xt(e[l],t[l]))return!1;return!0}function gs(e,t,l,i,s,d){return Mn=d,_e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Kd:Ds,_l=!1,d=l(i,s),_l=!1,si&&(d=ud(t,l,i,s)),rd(e),d}function rd(e){D.H=na;var t=Pe!==null&&Pe.next!==null;if(Mn=0,mt=Pe=_e=null,hr=!1,Pi=0,ci=null,t)throw Error(u(300));e===null||pt||(e=e.dependencies,e!==null&&ir(e)&&(pt=!0))}function ud(e,t,l,i){_e=e;var s=0;do{if(si&&(ci=null),Pi=0,si=!1,25<=s)throw Error(u(301));if(s+=1,mt=Pe=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}D.H=Gd,d=t(l,i)}while(si);return d}function ax(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?ea(t):t,e=e.useState()[0],(Pe!==null?Pe.memoizedState:null)!==e&&(_e.flags|=1024),t}function ys(){var e=mr!==0;return mr=0,e}function xs(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function vs(e){if(hr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}hr=!1}Mn=0,mt=Pe=_e=null,si=!1,Pi=mr=0,ci=null}function _t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mt===null?_e.memoizedState=mt=e:mt=mt.next=e,mt}function dt(){if(Pe===null){var e=_e.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var t=mt===null?_e.memoizedState:mt.next;if(t!==null)mt=t,Pe=e;else{if(e===null)throw _e.alternate===null?Error(u(467)):Error(u(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},mt===null?_e.memoizedState=mt=e:mt=mt.next=e}return mt}function pr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ea(e){var t=Pi;return Pi+=1,ci===null&&(ci=[]),e=If(ci,e,t),t=_e,(mt===null?t.memoizedState:mt.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Kd:Ds),e}function gr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ea(e);if(e.$$typeof===Y)return Et(e)}throw Error(u(438,String(e)))}function bs(e){var t=null,l=_e.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var i=_e.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=pr(),_e.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),i=0;i<e;i++)l[i]=O;return t.index++,l}function On(e,t){return typeof t=="function"?t(e):t}function yr(e){var t=dt();return Ss(t,Pe,e)}function Ss(e,t,l){var i=e.queue;if(i===null)throw Error(u(311));i.lastRenderedReducer=l;var s=e.baseQueue,d=i.pending;if(d!==null){if(s!==null){var x=s.next;s.next=d.next,d.next=x}t.baseQueue=s=d,i.pending=null}if(d=e.baseState,s===null)e.memoizedState=d;else{t=s.next;var S=x=null,T=null,L=t,V=!1;do{var $=L.lane&-536870913;if($!==L.lane?(Ye&$)===$:(Mn&$)===$){var U=L.revertLane;if(U===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),$===li&&(V=!0);else if((Mn&U)===U){L=L.next,U===li&&(V=!0);continue}else $={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},T===null?(S=T=$,x=d):T=T.next=$,_e.lanes|=U,al|=U;$=L.action,_l&&l(d,$),d=L.hasEagerState?L.eagerState:l(d,$)}else U={lane:$,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},T===null?(S=T=U,x=d):T=T.next=U,_e.lanes|=$,al|=$;L=L.next}while(L!==null&&L!==t);if(T===null?x=d:T.next=S,!Xt(d,e.memoizedState)&&(pt=!0,V&&(l=ii,l!==null)))throw l;e.memoizedState=d,e.baseState=x,e.baseQueue=T,i.lastRenderedState=d}return s===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function js(e){var t=dt(),l=t.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=e;var i=l.dispatch,s=l.pending,d=t.memoizedState;if(s!==null){l.pending=null;var x=s=s.next;do d=e(d,x.action),x=x.next;while(x!==s);Xt(d,t.memoizedState)||(pt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),l.lastRenderedState=d}return[d,i]}function sd(e,t,l){var i=_e,s=dt(),d=Ge;if(d){if(l===void 0)throw Error(u(407));l=l()}else l=t();var x=!Xt((Pe||s).memoizedState,l);if(x&&(s.memoizedState=l,pt=!0),s=s.queue,Es(fd.bind(null,i,s,e),[e]),s.getSnapshot!==t||x||mt!==null&&mt.memoizedState.tag&1){if(i.flags|=2048,oi(9,{destroy:void 0},od.bind(null,i,s,l,t),null),lt===null)throw Error(u(349));d||(Mn&127)!==0||cd(i,t,l)}return l}function cd(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=_e.updateQueue,t===null?(t=pr(),_e.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function od(e,t,l,i){t.value=l,t.getSnapshot=i,dd(t)&&hd(e)}function fd(e,t,l){return l(function(){dd(t)&&hd(e)})}function dd(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Xt(e,l)}catch{return!0}}function hd(e){var t=kl(e,2);t!==null&&Yt(t,e,2)}function ks(e){var t=_t();if(typeof e=="function"){var l=e;if(e=l(),_l){Ot(!0);try{l()}finally{Ot(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:On,lastRenderedState:e},t}function md(e,t,l,i){return e.baseState=l,Ss(e,Pe,typeof i=="function"?i:On)}function rx(e,t,l,i,s){if(br(e))throw Error(u(485));if(e=t.action,e!==null){var d={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){d.listeners.push(x)}};D.T!==null?l(!0):d.isTransition=!1,i(d),l=t.pending,l===null?(d.next=t.pending=d,pd(t,d)):(d.next=l.next,t.pending=l.next=d)}}function pd(e,t){var l=t.action,i=t.payload,s=e.state;if(t.isTransition){var d=D.T,x={};D.T=x;try{var S=l(s,i),T=D.S;T!==null&&T(x,S),gd(e,t,S)}catch(L){Ns(e,t,L)}finally{d!==null&&x.types!==null&&(d.types=x.types),D.T=d}}else try{d=l(s,i),gd(e,t,d)}catch(L){Ns(e,t,L)}}function gd(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(i){yd(e,t,i)},function(i){return Ns(e,t,i)}):yd(e,t,l)}function yd(e,t,l){t.status="fulfilled",t.value=l,xd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,pd(e,l)))}function Ns(e,t,l){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=l,xd(t),t=t.next;while(t!==i)}e.action=null}function xd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function vd(e,t){return t}function bd(e,t){if(Ge){var l=lt.formState;if(l!==null){e:{var i=_e;if(Ge){if(rt){t:{for(var s=rt,d=sn;s.nodeType!==8;){if(!d){s=null;break t}if(s=on(s.nextSibling),s===null){s=null;break t}}d=s.data,s=d==="F!"||d==="F"?s:null}if(s){rt=on(s.nextSibling),i=s.data==="F!";break e}}$n(i)}i=!1}i&&(t=l[0])}}return l=_t(),l.memoizedState=l.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vd,lastRenderedState:t},l.queue=i,l=Hd.bind(null,_e,i),i.dispatch=l,i=ks(!1),d=zs.bind(null,_e,!1,i.queue),i=_t(),s={state:t,dispatch:null,action:e,pending:null},i.queue=s,l=rx.bind(null,_e,s,d,l),s.dispatch=l,i.memoizedState=e,[t,l,!1]}function Sd(e){var t=dt();return jd(t,Pe,e)}function jd(e,t,l){if(t=Ss(e,t,vd)[0],e=yr(On)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=ea(t)}catch(x){throw x===ai?ur:x}else i=t;t=dt();var s=t.queue,d=s.dispatch;return l!==t.memoizedState&&(_e.flags|=2048,oi(9,{destroy:void 0},ux.bind(null,s,l),null)),[i,d,e]}function ux(e,t){e.action=t}function kd(e){var t=dt(),l=Pe;if(l!==null)return jd(t,l,e);dt(),t=t.memoizedState,l=dt();var i=l.queue.dispatch;return l.memoizedState=e,[t,i,!1]}function oi(e,t,l,i){return e={tag:e,create:l,deps:i,inst:t,next:null},t=_e.updateQueue,t===null&&(t=pr(),_e.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(i=l.next,l.next=e,e.next=i,t.lastEffect=e),e}function Nd(){return dt().memoizedState}function xr(e,t,l,i){var s=_t();_e.flags|=e,s.memoizedState=oi(1|t,{destroy:void 0},l,i===void 0?null:i)}function vr(e,t,l,i){var s=dt();i=i===void 0?null:i;var d=s.memoizedState.inst;Pe!==null&&i!==null&&ps(i,Pe.memoizedState.deps)?s.memoizedState=oi(t,d,l,i):(_e.flags|=e,s.memoizedState=oi(1|t,d,l,i))}function Ed(e,t){xr(8390656,8,e,t)}function Es(e,t){vr(2048,8,e,t)}function sx(e){_e.flags|=4;var t=_e.updateQueue;if(t===null)t=pr(),_e.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Td(e){var t=dt().memoizedState;return sx({ref:t,nextImpl:e}),function(){if(($e&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function wd(e,t){return vr(4,2,e,t)}function Ad(e,t){return vr(4,4,e,t)}function Cd(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function zd(e,t,l){l=l!=null?l.concat([e]):null,vr(4,4,Cd.bind(null,t,e),l)}function Ts(){}function Dd(e,t){var l=dt();t=t===void 0?null:t;var i=l.memoizedState;return t!==null&&ps(t,i[1])?i[0]:(l.memoizedState=[e,t],e)}function _d(e,t){var l=dt();t=t===void 0?null:t;var i=l.memoizedState;if(t!==null&&ps(t,i[1]))return i[0];if(i=e(),_l){Ot(!0);try{e()}finally{Ot(!1)}}return l.memoizedState=[i,t],i}function ws(e,t,l){return l===void 0||(Mn&1073741824)!==0&&(Ye&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Mh(),_e.lanes|=e,al|=e,l)}function Md(e,t,l,i){return Xt(l,t)?l:ui.current!==null?(e=ws(e,l,i),Xt(e,t)||(pt=!0),e):(Mn&42)===0||(Mn&1073741824)!==0&&(Ye&261930)===0?(pt=!0,e.memoizedState=l):(e=Mh(),_e.lanes|=e,al|=e,t)}function Od(e,t,l,i,s){var d=I.p;I.p=d!==0&&8>d?d:8;var x=D.T,S={};D.T=S,zs(e,!1,t,l);try{var T=s(),L=D.S;if(L!==null&&L(S,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var V=lx(T,i);ta(e,t,V,Wt(e))}else ta(e,t,i,Wt(e))}catch($){ta(e,t,{then:function(){},status:"rejected",reason:$},Wt())}finally{I.p=d,x!==null&&S.types!==null&&(x.types=S.types),D.T=x}}function cx(){}function As(e,t,l,i){if(e.tag!==5)throw Error(u(476));var s=Rd(e).queue;Od(e,s,t,de,l===null?cx:function(){return Ld(e),l(i)})}function Rd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:On,lastRenderedState:de},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:On,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ld(e){var t=Rd(e);t.next===null&&(t=e.alternate.memoizedState),ta(e,t.next.queue,{},Wt())}function Cs(){return Et(xa)}function Bd(){return dt().memoizedState}function Ud(){return dt().memoizedState}function ox(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Wt();e=Pn(l);var i=el(t,e,l);i!==null&&(Yt(i,t,l),$i(i,t,l)),t={cache:is()},e.payload=t;return}t=t.return}}function fx(e,t,l){var i=Wt();l={lane:i,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},br(e)?qd(t,l):(l=Zu(e,t,l,i),l!==null&&(Yt(l,e,i),Yd(l,t,i)))}function Hd(e,t,l){var i=Wt();ta(e,t,l,i)}function ta(e,t,l,i){var s={lane:i,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(br(e))qd(t,s);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var x=t.lastRenderedState,S=d(x,l);if(s.hasEagerState=!0,s.eagerState=S,Xt(S,x))return er(e,t,s,0),lt===null&&Pa(),!1}catch{}finally{}if(l=Zu(e,t,s,i),l!==null)return Yt(l,e,i),Yd(l,t,i),!0}return!1}function zs(e,t,l,i){if(i={lane:2,revertLane:sc(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},br(e)){if(t)throw Error(u(479))}else t=Zu(e,l,i,2),t!==null&&Yt(t,e,2)}function br(e){var t=e.alternate;return e===_e||t!==null&&t===_e}function qd(e,t){si=hr=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Yd(e,t,l){if((l&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,l|=i,t.lanes=l,Qo(e,l)}}var na={readContext:Et,use:gr,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useInsertionEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useSyncExternalStore:ct,useId:ct,useHostTransitionStatus:ct,useFormState:ct,useActionState:ct,useOptimistic:ct,useMemoCache:ct,useCacheRefresh:ct};na.useEffectEvent=ct;var Kd={readContext:Et,use:gr,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:Et,useEffect:Ed,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,xr(4194308,4,Cd.bind(null,t,e),l)},useLayoutEffect:function(e,t){return xr(4194308,4,e,t)},useInsertionEffect:function(e,t){xr(4,2,e,t)},useMemo:function(e,t){var l=_t();t=t===void 0?null:t;var i=e();if(_l){Ot(!0);try{e()}finally{Ot(!1)}}return l.memoizedState=[i,t],i},useReducer:function(e,t,l){var i=_t();if(l!==void 0){var s=l(t);if(_l){Ot(!0);try{l(t)}finally{Ot(!1)}}}else s=t;return i.memoizedState=i.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},i.queue=e,e=e.dispatch=fx.bind(null,_e,e),[i.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:function(e){e=ks(e);var t=e.queue,l=Hd.bind(null,_e,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Ts,useDeferredValue:function(e,t){var l=_t();return ws(l,e,t)},useTransition:function(){var e=ks(!1);return e=Od.bind(null,_e,e.queue,!0,!1),_t().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var i=_e,s=_t();if(Ge){if(l===void 0)throw Error(u(407));l=l()}else{if(l=t(),lt===null)throw Error(u(349));(Ye&127)!==0||cd(i,t,l)}s.memoizedState=l;var d={value:l,getSnapshot:t};return s.queue=d,Ed(fd.bind(null,i,d,e),[e]),i.flags|=2048,oi(9,{destroy:void 0},od.bind(null,i,d,l,t),null),l},useId:function(){var e=_t(),t=lt.identifierPrefix;if(Ge){var l=vn,i=xn;l=(i&~(1<<32-nt(i)-1)).toString(32)+l,t="_"+t+"R_"+l,l=mr++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=ix++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Cs,useFormState:bd,useActionState:bd,useOptimistic:function(e){var t=_t();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=zs.bind(null,_e,!0,l),l.dispatch=t,[e,t]},useMemoCache:bs,useCacheRefresh:function(){return _t().memoizedState=ox.bind(null,_e)},useEffectEvent:function(e){var t=_t(),l={impl:e};return t.memoizedState=l,function(){if(($e&2)!==0)throw Error(u(440));return l.impl.apply(void 0,arguments)}}},Ds={readContext:Et,use:gr,useCallback:Dd,useContext:Et,useEffect:Es,useImperativeHandle:zd,useInsertionEffect:wd,useLayoutEffect:Ad,useMemo:_d,useReducer:yr,useRef:Nd,useState:function(){return yr(On)},useDebugValue:Ts,useDeferredValue:function(e,t){var l=dt();return Md(l,Pe.memoizedState,e,t)},useTransition:function(){var e=yr(On)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:ea(e),t]},useSyncExternalStore:sd,useId:Bd,useHostTransitionStatus:Cs,useFormState:Sd,useActionState:Sd,useOptimistic:function(e,t){var l=dt();return md(l,Pe,e,t)},useMemoCache:bs,useCacheRefresh:Ud};Ds.useEffectEvent=Td;var Gd={readContext:Et,use:gr,useCallback:Dd,useContext:Et,useEffect:Es,useImperativeHandle:zd,useInsertionEffect:wd,useLayoutEffect:Ad,useMemo:_d,useReducer:js,useRef:Nd,useState:function(){return js(On)},useDebugValue:Ts,useDeferredValue:function(e,t){var l=dt();return Pe===null?ws(l,e,t):Md(l,Pe.memoizedState,e,t)},useTransition:function(){var e=js(On)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:ea(e),t]},useSyncExternalStore:sd,useId:Bd,useHostTransitionStatus:Cs,useFormState:kd,useActionState:kd,useOptimistic:function(e,t){var l=dt();return Pe!==null?md(l,Pe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:bs,useCacheRefresh:Ud};Gd.useEffectEvent=Td;function _s(e,t,l,i){t=e.memoizedState,l=l(i,t),l=l==null?t:y({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Ms={enqueueSetState:function(e,t,l){e=e._reactInternals;var i=Wt(),s=Pn(i);s.payload=t,l!=null&&(s.callback=l),t=el(e,s,i),t!==null&&(Yt(t,e,i),$i(t,e,i))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var i=Wt(),s=Pn(i);s.tag=1,s.payload=t,l!=null&&(s.callback=l),t=el(e,s,i),t!==null&&(Yt(t,e,i),$i(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Wt(),i=Pn(l);i.tag=2,t!=null&&(i.callback=t),t=el(e,i,l),t!==null&&(Yt(t,e,l),$i(t,e,l))}};function Vd(e,t,l,i,s,d,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,d,x):t.prototype&&t.prototype.isPureReactComponent?!Ki(l,i)||!Ki(s,d):!0}function Qd(e,t,l,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,i),t.state!==e&&Ms.enqueueReplaceState(t,t.state,null)}function Ml(e,t){var l=t;if("ref"in t){l={};for(var i in t)i!=="ref"&&(l[i]=t[i])}if(e=e.defaultProps){l===t&&(l=y({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function Xd(e){Wa(e)}function Zd(e){console.error(e)}function Fd(e){Wa(e)}function Sr(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Jd(e,t,l){try{var i=e.onCaughtError;i(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Os(e,t,l){return l=Pn(l),l.tag=3,l.payload={element:null},l.callback=function(){Sr(e,t)},l}function $d(e){return e=Pn(e),e.tag=3,e}function Id(e,t,l,i){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var d=i.value;e.payload=function(){return s(d)},e.callback=function(){Jd(t,l,i)}}var x=l.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Jd(t,l,i),typeof s!="function"&&(rl===null?rl=new Set([this]):rl.add(this));var S=i.stack;this.componentDidCatch(i.value,{componentStack:S!==null?S:""})})}function dx(e,t,l,i,s){if(l.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=l.alternate,t!==null&&ni(t,l,s,!0),l=Ft.current,l!==null){switch(l.tag){case 31:case 13:return cn===null?Mr():l.alternate===null&&ot===0&&(ot=3),l.flags&=-257,l.flags|=65536,l.lanes=s,i===sr?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([i]):t.add(i),ac(e,i,s)),!1;case 22:return l.flags|=65536,i===sr?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([i]):l.add(i)),ac(e,i,s)),!1}throw Error(u(435,l.tag))}return ac(e,i,s),Mr(),!1}if(Ge)return t=Ft.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,i!==Pu&&(e=Error(u(422),{cause:i}),Qi(an(e,l)))):(i!==Pu&&(t=Error(u(423),{cause:i}),Qi(an(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,i=an(i,l),s=Os(e.stateNode,i,s),os(e,s),ot!==4&&(ot=2)),!1;var d=Error(u(520),{cause:i});if(d=an(d,l),oa===null?oa=[d]:oa.push(d),ot!==4&&(ot=2),t===null)return!0;i=an(i,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=Os(l.stateNode,i,e),os(l,e),!1;case 1:if(t=l.type,d=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(rl===null||!rl.has(d))))return l.flags|=65536,s&=-s,l.lanes|=s,s=$d(s),Id(s,e,l,i),os(l,s),!1}l=l.return}while(l!==null);return!1}var Rs=Error(u(461)),pt=!1;function Tt(e,t,l,i){t.child=e===null?td(t,null,l,i):Dl(t,e.child,l,i)}function Wd(e,t,l,i,s){l=l.render;var d=t.ref;if("ref"in i){var x={};for(var S in i)S!=="ref"&&(x[S]=i[S])}else x=i;return wl(t),i=gs(e,t,l,x,d,s),S=ys(),e!==null&&!pt?(xs(e,t,s),Rn(e,t,s)):(Ge&&S&&Iu(t),t.flags|=1,Tt(e,t,i,s),t.child)}function Pd(e,t,l,i,s){if(e===null){var d=l.type;return typeof d=="function"&&!Fu(d)&&d.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=d,eh(e,t,d,i,s)):(e=nr(l.type,null,i,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Gs(e,s)){var x=d.memoizedProps;if(l=l.compare,l=l!==null?l:Ki,l(x,i)&&e.ref===t.ref)return Rn(e,t,s)}return t.flags|=1,e=Cn(d,i),e.ref=t.ref,e.return=t,t.child=e}function eh(e,t,l,i,s){if(e!==null){var d=e.memoizedProps;if(Ki(d,i)&&e.ref===t.ref)if(pt=!1,t.pendingProps=i=d,Gs(e,s))(e.flags&131072)!==0&&(pt=!0);else return t.lanes=e.lanes,Rn(e,t,s)}return Ls(e,t,l,i,s)}function th(e,t,l,i){var s=i.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|l:l,e!==null){for(i=t.child=e.child,s=0;i!==null;)s=s|i.lanes|i.childLanes,i=i.sibling;i=s&~d}else i=0,t.child=null;return nh(e,t,d,l,i)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&rr(t,d!==null?d.cachePool:null),d!==null?id(t,d):ds(),ad(t);else return i=t.lanes=536870912,nh(e,t,d!==null?d.baseLanes|l:l,l,i)}else d!==null?(rr(t,d.cachePool),id(t,d),nl(),t.memoizedState=null):(e!==null&&rr(t,null),ds(),nl());return Tt(e,t,s,l),t.child}function la(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function nh(e,t,l,i,s){var d=rs();return d=d===null?null:{parent:ht._currentValue,pool:d},t.memoizedState={baseLanes:l,cachePool:d},e!==null&&rr(t,null),ds(),ad(t),e!==null&&ni(e,t,i,!0),t.childLanes=s,null}function jr(e,t){return t=Nr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lh(e,t,l){return Dl(t,e.child,null,l),e=jr(t,t.pendingProps),e.flags|=2,Jt(t),t.memoizedState=null,e}function hx(e,t,l){var i=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ge){if(i.mode==="hidden")return e=jr(t,i),t.lanes=536870912,la(null,e);if(ms(t),(e=rt)?(e=pm(e,sn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fn!==null?{id:xn,overflow:vn}:null,retryLane:536870912,hydrationErrors:null},l=qf(e),l.return=t,t.child=l,Nt=t,rt=null)):e=null,e===null)throw $n(t);return t.lanes=536870912,null}return jr(t,i)}var d=e.memoizedState;if(d!==null){var x=d.dehydrated;if(ms(t),s)if(t.flags&256)t.flags&=-257,t=lh(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(pt||ni(e,t,l,!1),s=(l&e.childLanes)!==0,pt||s){if(i=lt,i!==null&&(x=Xo(i,l),x!==0&&x!==d.retryLane))throw d.retryLane=x,kl(e,x),Yt(i,e,x),Rs;Mr(),t=lh(e,t,l)}else e=d.treeContext,rt=on(x.nextSibling),Nt=t,Ge=!0,Jn=null,sn=!1,e!==null&&Gf(t,e),t=jr(t,i),t.flags|=4096;return t}return e=Cn(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function kr(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(u(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Ls(e,t,l,i,s){return wl(t),l=gs(e,t,l,i,void 0,s),i=ys(),e!==null&&!pt?(xs(e,t,s),Rn(e,t,s)):(Ge&&i&&Iu(t),t.flags|=1,Tt(e,t,l,s),t.child)}function ih(e,t,l,i,s,d){return wl(t),t.updateQueue=null,l=ud(t,i,l,s),rd(e),i=ys(),e!==null&&!pt?(xs(e,t,d),Rn(e,t,d)):(Ge&&i&&Iu(t),t.flags|=1,Tt(e,t,l,d),t.child)}function ah(e,t,l,i,s){if(wl(t),t.stateNode===null){var d=Wl,x=l.contextType;typeof x=="object"&&x!==null&&(d=Et(x)),d=new l(i,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Ms,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=i,d.state=t.memoizedState,d.refs={},ss(t),x=l.contextType,d.context=typeof x=="object"&&x!==null?Et(x):Wl,d.state=t.memoizedState,x=l.getDerivedStateFromProps,typeof x=="function"&&(_s(t,l,x,i),d.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(x=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),x!==d.state&&Ms.enqueueReplaceState(d,d.state,null),Wi(t,i,d,s),Ii(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){d=t.stateNode;var S=t.memoizedProps,T=Ml(l,S);d.props=T;var L=d.context,V=l.contextType;x=Wl,typeof V=="object"&&V!==null&&(x=Et(V));var $=l.getDerivedStateFromProps;V=typeof $=="function"||typeof d.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,V||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(S||L!==x)&&Qd(t,d,i,x),Wn=!1;var U=t.memoizedState;d.state=U,Wi(t,i,d,s),Ii(),L=t.memoizedState,S||U!==L||Wn?(typeof $=="function"&&(_s(t,l,$,i),L=t.memoizedState),(T=Wn||Vd(t,l,T,i,U,L,x))?(V||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=L),d.props=i,d.state=L,d.context=x,i=T):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{d=t.stateNode,cs(e,t),x=t.memoizedProps,V=Ml(l,x),d.props=V,$=t.pendingProps,U=d.context,L=l.contextType,T=Wl,typeof L=="object"&&L!==null&&(T=Et(L)),S=l.getDerivedStateFromProps,(L=typeof S=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(x!==$||U!==T)&&Qd(t,d,i,T),Wn=!1,U=t.memoizedState,d.state=U,Wi(t,i,d,s),Ii();var q=t.memoizedState;x!==$||U!==q||Wn||e!==null&&e.dependencies!==null&&ir(e.dependencies)?(typeof S=="function"&&(_s(t,l,S,i),q=t.memoizedState),(V=Wn||Vd(t,l,V,i,U,q,T)||e!==null&&e.dependencies!==null&&ir(e.dependencies))?(L||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(i,q,T),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(i,q,T)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=q),d.props=i,d.state=q,d.context=T,i=V):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),i=!1)}return d=i,kr(e,t),i=(t.flags&128)!==0,d||i?(d=t.stateNode,l=i&&typeof l.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&i?(t.child=Dl(t,e.child,null,s),t.child=Dl(t,null,l,s)):Tt(e,t,l,s),t.memoizedState=d.state,e=t.child):e=Rn(e,t,s),e}function rh(e,t,l,i){return El(),t.flags|=256,Tt(e,t,l,i),t.child}var Bs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Us(e){return{baseLanes:e,cachePool:Jf()}}function Hs(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=It),e}function uh(e,t,l){var i=t.pendingProps,s=!1,d=(t.flags&128)!==0,x;if((x=d)||(x=e!==null&&e.memoizedState===null?!1:(ft.current&2)!==0),x&&(s=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ge){if(s?tl(t):nl(),(e=rt)?(e=pm(e,sn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fn!==null?{id:xn,overflow:vn}:null,retryLane:536870912,hydrationErrors:null},l=qf(e),l.return=t,t.child=l,Nt=t,rt=null)):e=null,e===null)throw $n(t);return Sc(e)?t.lanes=32:t.lanes=536870912,null}var S=i.children;return i=i.fallback,s?(nl(),s=t.mode,S=Nr({mode:"hidden",children:S},s),i=Nl(i,s,l,null),S.return=t,i.return=t,S.sibling=i,t.child=S,i=t.child,i.memoizedState=Us(l),i.childLanes=Hs(e,x,l),t.memoizedState=Bs,la(null,i)):(tl(t),qs(t,S))}var T=e.memoizedState;if(T!==null&&(S=T.dehydrated,S!==null)){if(d)t.flags&256?(tl(t),t.flags&=-257,t=Ys(e,t,l)):t.memoizedState!==null?(nl(),t.child=e.child,t.flags|=128,t=null):(nl(),S=i.fallback,s=t.mode,i=Nr({mode:"visible",children:i.children},s),S=Nl(S,s,l,null),S.flags|=2,i.return=t,S.return=t,i.sibling=S,t.child=i,Dl(t,e.child,null,l),i=t.child,i.memoizedState=Us(l),i.childLanes=Hs(e,x,l),t.memoizedState=Bs,t=la(null,i));else if(tl(t),Sc(S)){if(x=S.nextSibling&&S.nextSibling.dataset,x)var L=x.dgst;x=L,i=Error(u(419)),i.stack="",i.digest=x,Qi({value:i,source:null,stack:null}),t=Ys(e,t,l)}else if(pt||ni(e,t,l,!1),x=(l&e.childLanes)!==0,pt||x){if(x=lt,x!==null&&(i=Xo(x,l),i!==0&&i!==T.retryLane))throw T.retryLane=i,kl(e,i),Yt(x,e,i),Rs;bc(S)||Mr(),t=Ys(e,t,l)}else bc(S)?(t.flags|=192,t.child=e.child,t=null):(e=T.treeContext,rt=on(S.nextSibling),Nt=t,Ge=!0,Jn=null,sn=!1,e!==null&&Gf(t,e),t=qs(t,i.children),t.flags|=4096);return t}return s?(nl(),S=i.fallback,s=t.mode,T=e.child,L=T.sibling,i=Cn(T,{mode:"hidden",children:i.children}),i.subtreeFlags=T.subtreeFlags&65011712,L!==null?S=Cn(L,S):(S=Nl(S,s,l,null),S.flags|=2),S.return=t,i.return=t,i.sibling=S,t.child=i,la(null,i),i=t.child,S=e.child.memoizedState,S===null?S=Us(l):(s=S.cachePool,s!==null?(T=ht._currentValue,s=s.parent!==T?{parent:T,pool:T}:s):s=Jf(),S={baseLanes:S.baseLanes|l,cachePool:s}),i.memoizedState=S,i.childLanes=Hs(e,x,l),t.memoizedState=Bs,la(e.child,i)):(tl(t),l=e.child,e=l.sibling,l=Cn(l,{mode:"visible",children:i.children}),l.return=t,l.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=l,t.memoizedState=null,l)}function qs(e,t){return t=Nr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Nr(e,t){return e=Zt(22,e,null,t),e.lanes=0,e}function Ys(e,t,l){return Dl(t,e.child,null,l),e=qs(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function sh(e,t,l){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),ns(e.return,t,l)}function Ks(e,t,l,i,s,d){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:l,tailMode:s,treeForkCount:d}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=i,x.tail=l,x.tailMode=s,x.treeForkCount=d)}function ch(e,t,l){var i=t.pendingProps,s=i.revealOrder,d=i.tail;i=i.children;var x=ft.current,S=(x&2)!==0;if(S?(x=x&1|2,t.flags|=128):x&=1,k(ft,x),Tt(e,t,i,l),i=Ge?Vi:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sh(e,l,t);else if(e.tag===19)sh(e,l,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}switch(s){case"forwards":for(l=t.child,s=null;l!==null;)e=l.alternate,e!==null&&dr(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=t.child,t.child=null):(s=l.sibling,l.sibling=null),Ks(t,!1,s,l,d,i);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&dr(e)===null){t.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}Ks(t,!0,l,null,d,i);break;case"together":Ks(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function Rn(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),al|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(ni(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,l=Cn(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Cn(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Gs(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ir(e)))}function mx(e,t,l){switch(t.tag){case 3:Me(t,t.stateNode.containerInfo),In(t,ht,e.memoizedState.cache),El();break;case 27:case 5:ue(t);break;case 4:Me(t,t.stateNode.containerInfo);break;case 10:In(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ms(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(tl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?uh(e,t,l):(tl(t),e=Rn(e,t,l),e!==null?e.sibling:null);tl(t);break;case 19:var s=(e.flags&128)!==0;if(i=(l&t.childLanes)!==0,i||(ni(e,t,l,!1),i=(l&t.childLanes)!==0),s){if(i)return ch(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),k(ft,ft.current),i)break;return null;case 22:return t.lanes=0,th(e,t,l,t.pendingProps);case 24:In(t,ht,e.memoizedState.cache)}return Rn(e,t,l)}function oh(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)pt=!0;else{if(!Gs(e,l)&&(t.flags&128)===0)return pt=!1,mx(e,t,l);pt=(e.flags&131072)!==0}else pt=!1,Ge&&(t.flags&1048576)!==0&&Kf(t,Vi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Cl(t.elementType),t.type=e,typeof e=="function")Fu(e)?(i=Ml(e,i),t.tag=1,t=ah(null,t,e,i,l)):(t.tag=0,t=Ls(null,t,e,i,l));else{if(e!=null){var s=e.$$typeof;if(s===Z){t.tag=11,t=Wd(null,t,e,i,l);break e}else if(s===ne){t.tag=14,t=Pd(null,t,e,i,l);break e}}throw t=se(e)||e,Error(u(306,t,""))}}return t;case 0:return Ls(e,t,t.type,t.pendingProps,l);case 1:return i=t.type,s=Ml(i,t.pendingProps),ah(e,t,i,s,l);case 3:e:{if(Me(t,t.stateNode.containerInfo),e===null)throw Error(u(387));i=t.pendingProps;var d=t.memoizedState;s=d.element,cs(e,t),Wi(t,i,null,l);var x=t.memoizedState;if(i=x.cache,In(t,ht,i),i!==d.cache&&ls(t,[ht],l,!0),Ii(),i=x.element,d.isDehydrated)if(d={element:i,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=rh(e,t,i,l);break e}else if(i!==s){s=an(Error(u(424)),t),Qi(s),t=rh(e,t,i,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(rt=on(e.firstChild),Nt=t,Ge=!0,Jn=null,sn=!0,l=td(t,null,i,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(El(),i===s){t=Rn(e,t,l);break e}Tt(e,t,i,l)}t=t.child}return t;case 26:return kr(e,t),e===null?(l=Sm(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ge||(l=t.type,e=t.pendingProps,i=qr(he.current).createElement(l),i[kt]=t,i[Rt]=e,wt(i,l,e),bt(i),t.stateNode=i):t.memoizedState=Sm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ue(t),e===null&&Ge&&(i=t.stateNode=xm(t.type,t.pendingProps,he.current),Nt=t,sn=!0,s=rt,ol(t.type)?(jc=s,rt=on(i.firstChild)):rt=s),Tt(e,t,t.pendingProps.children,l),kr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ge&&((s=i=rt)&&(i=Vx(i,t.type,t.pendingProps,sn),i!==null?(t.stateNode=i,Nt=t,rt=on(i.firstChild),sn=!1,s=!0):s=!1),s||$n(t)),ue(t),s=t.type,d=t.pendingProps,x=e!==null?e.memoizedProps:null,i=d.children,yc(s,d)?i=null:x!==null&&yc(s,x)&&(t.flags|=32),t.memoizedState!==null&&(s=gs(e,t,ax,null,null,l),xa._currentValue=s),kr(e,t),Tt(e,t,i,l),t.child;case 6:return e===null&&Ge&&((e=l=rt)&&(l=Qx(l,t.pendingProps,sn),l!==null?(t.stateNode=l,Nt=t,rt=null,e=!0):e=!1),e||$n(t)),null;case 13:return uh(e,t,l);case 4:return Me(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Dl(t,null,i,l):Tt(e,t,i,l),t.child;case 11:return Wd(e,t,t.type,t.pendingProps,l);case 7:return Tt(e,t,t.pendingProps,l),t.child;case 8:return Tt(e,t,t.pendingProps.children,l),t.child;case 12:return Tt(e,t,t.pendingProps.children,l),t.child;case 10:return i=t.pendingProps,In(t,t.type,i.value),Tt(e,t,i.children,l),t.child;case 9:return s=t.type._context,i=t.pendingProps.children,wl(t),s=Et(s),i=i(s),t.flags|=1,Tt(e,t,i,l),t.child;case 14:return Pd(e,t,t.type,t.pendingProps,l);case 15:return eh(e,t,t.type,t.pendingProps,l);case 19:return ch(e,t,l);case 31:return hx(e,t,l);case 22:return th(e,t,l,t.pendingProps);case 24:return wl(t),i=Et(ht),e===null?(s=rs(),s===null&&(s=lt,d=is(),s.pooledCache=d,d.refCount++,d!==null&&(s.pooledCacheLanes|=l),s=d),t.memoizedState={parent:i,cache:s},ss(t),In(t,ht,s)):((e.lanes&l)!==0&&(cs(e,t),Wi(t,null,null,l),Ii()),s=e.memoizedState,d=t.memoizedState,s.parent!==i?(s={parent:i,cache:i},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),In(t,ht,i)):(i=d.cache,In(t,ht,i),i!==s.cache&&ls(t,[ht],l,!0))),Tt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Ln(e){e.flags|=4}function Vs(e,t,l,i,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(Bh())e.flags|=8192;else throw zl=sr,us}else e.flags&=-16777217}function fh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Tm(t))if(Bh())e.flags|=8192;else throw zl=sr,us}function Er(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Go():536870912,e.lanes|=t,mi|=t)}function ia(e,t){if(!Ge)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var i=null;l!==null;)l.alternate!==null&&(i=l),l=l.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,i=0;if(t)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,i|=s.subtreeFlags&65011712,i|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,i|=s.subtreeFlags,i|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=i,e.childLanes=l,t}function px(e,t,l){var i=t.pendingProps;switch(Wu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(t),null;case 1:return ut(t),null;case 3:return l=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),_n(ht),Ce(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ti(t)?Ln(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,es())),ut(t),null;case 26:var s=t.type,d=t.memoizedState;return e===null?(Ln(t),d!==null?(ut(t),fh(t,d)):(ut(t),Vs(t,s,null,i,l))):d?d!==e.memoizedState?(Ln(t),ut(t),fh(t,d)):(ut(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&Ln(t),ut(t),Vs(t,s,e,i,l)),null;case 27:if(F(t),l=he.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Ln(t);else{if(!i){if(t.stateNode===null)throw Error(u(166));return ut(t),null}e=G.current,ti(t)?Vf(t):(e=xm(s,i,l),t.stateNode=e,Ln(t))}return ut(t),null;case 5:if(F(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Ln(t);else{if(!i){if(t.stateNode===null)throw Error(u(166));return ut(t),null}if(d=G.current,ti(t))Vf(t);else{var x=qr(he.current);switch(d){case 1:d=x.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:d=x.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":d=x.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":d=x.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":d=x.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof i.is=="string"?x.createElement("select",{is:i.is}):x.createElement("select"),i.multiple?d.multiple=!0:i.size&&(d.size=i.size);break;default:d=typeof i.is=="string"?x.createElement(s,{is:i.is}):x.createElement(s)}}d[kt]=t,d[Rt]=i;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)d.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=d;e:switch(wt(d,s,i),s){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Ln(t)}}return ut(t),Vs(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Ln(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(u(166));if(e=he.current,ti(t)){if(e=t.stateNode,l=t.memoizedProps,i=null,s=Nt,s!==null)switch(s.tag){case 27:case 5:i=s.memoizedProps}e[kt]=t,e=!!(e.nodeValue===l||i!==null&&i.suppressHydrationWarning===!0||um(e.nodeValue,l)),e||$n(t,!0)}else e=qr(e).createTextNode(i),e[kt]=t,t.stateNode=e}return ut(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(i=ti(t),l!==null){if(e===null){if(!i)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[kt]=t}else El(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),e=!1}else l=es(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Jt(t),t):(Jt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return ut(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=ti(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(u(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(u(317));s[kt]=t}else El(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),s=!1}else s=es(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(Jt(t),t):(Jt(t),null)}return Jt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=i!==null,e=e!==null&&e.memoizedState!==null,l&&(i=t.child,s=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(s=i.alternate.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==s&&(i.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Er(t,t.updateQueue),ut(t),null);case 4:return Ce(),e===null&&dc(t.stateNode.containerInfo),ut(t),null;case 10:return _n(t.type),ut(t),null;case 19:if(_(ft),i=t.memoizedState,i===null)return ut(t),null;if(s=(t.flags&128)!==0,d=i.rendering,d===null)if(s)ia(i,!1);else{if(ot!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=dr(e),d!==null){for(t.flags|=128,ia(i,!1),e=d.updateQueue,t.updateQueue=e,Er(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Hf(l,e),l=l.sibling;return k(ft,ft.current&1|2),Ge&&zn(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&Ae()>zr&&(t.flags|=128,s=!0,ia(i,!1),t.lanes=4194304)}else{if(!s)if(e=dr(d),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Er(t,e),ia(i,!0),i.tail===null&&i.tailMode==="hidden"&&!d.alternate&&!Ge)return ut(t),null}else 2*Ae()-i.renderingStartTime>zr&&l!==536870912&&(t.flags|=128,s=!0,ia(i,!1),t.lanes=4194304);i.isBackwards?(d.sibling=t.child,t.child=d):(e=i.last,e!==null?e.sibling=d:t.child=d,i.last=d)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Ae(),e.sibling=null,l=ft.current,k(ft,s?l&1|2:l&1),Ge&&zn(t,i.treeForkCount),e):(ut(t),null);case 22:case 23:return Jt(t),hs(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(l&536870912)!==0&&(t.flags&128)===0&&(ut(t),t.subtreeFlags&6&&(t.flags|=8192)):ut(t),l=t.updateQueue,l!==null&&Er(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==l&&(t.flags|=2048),e!==null&&_(Al),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),_n(ht),ut(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function gx(e,t){switch(Wu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _n(ht),Ce(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return F(t),null;case 31:if(t.memoizedState!==null){if(Jt(t),t.alternate===null)throw Error(u(340));El()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));El()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _(ft),null;case 4:return Ce(),null;case 10:return _n(t.type),null;case 22:case 23:return Jt(t),hs(),e!==null&&_(Al),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return _n(ht),null;case 25:return null;default:return null}}function dh(e,t){switch(Wu(t),t.tag){case 3:_n(ht),Ce();break;case 26:case 27:case 5:F(t);break;case 4:Ce();break;case 31:t.memoizedState!==null&&Jt(t);break;case 13:Jt(t);break;case 19:_(ft);break;case 10:_n(t.type);break;case 22:case 23:Jt(t),hs(),e!==null&&_(Al);break;case 24:_n(ht)}}function aa(e,t){try{var l=t.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var s=i.next;l=s;do{if((l.tag&e)===e){i=void 0;var d=l.create,x=l.inst;i=d(),x.destroy=i}l=l.next}while(l!==s)}}catch(S){We(t,t.return,S)}}function ll(e,t,l){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var d=s.next;i=d;do{if((i.tag&e)===e){var x=i.inst,S=x.destroy;if(S!==void 0){x.destroy=void 0,s=t;var T=l,L=S;try{L()}catch(V){We(s,T,V)}}}i=i.next}while(i!==d)}}catch(V){We(t,t.return,V)}}function hh(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{ld(t,l)}catch(i){We(e,e.return,i)}}}function mh(e,t,l){l.props=Ml(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(i){We(e,t,i)}}function ra(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof l=="function"?e.refCleanup=l(i):l.current=i}}catch(s){We(e,t,s)}}function bn(e,t){var l=e.ref,i=e.refCleanup;if(l!==null)if(typeof i=="function")try{i()}catch(s){We(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){We(e,t,s)}else l.current=null}function ph(e){var t=e.type,l=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&i.focus();break e;case"img":l.src?i.src=l.src:l.srcSet&&(i.srcset=l.srcSet)}}catch(s){We(e,e.return,s)}}function Qs(e,t,l){try{var i=e.stateNode;Ux(i,e.type,l,t),i[Rt]=t}catch(s){We(e,e.return,s)}}function gh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ol(e.type)||e.tag===4}function Xs(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gh(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.tag===27&&ol(e.type)||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 Zs(e,t,l){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=wn));else if(i!==4&&(i===27&&ol(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Zs(e,t,l),e=e.sibling;e!==null;)Zs(e,t,l),e=e.sibling}function Tr(e,t,l){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(i!==4&&(i===27&&ol(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Tr(e,t,l),e=e.sibling;e!==null;)Tr(e,t,l),e=e.sibling}function yh(e){var t=e.stateNode,l=e.memoizedProps;try{for(var i=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);wt(t,i,l),t[kt]=e,t[Rt]=l}catch(d){We(e,e.return,d)}}var Bn=!1,gt=!1,Fs=!1,xh=typeof WeakSet=="function"?WeakSet:Set,St=null;function yx(e,t){if(e=e.containerInfo,pc=Zr,e=zf(e),Yu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var i=l.getSelection&&l.getSelection();if(i&&i.rangeCount!==0){l=i.anchorNode;var s=i.anchorOffset,d=i.focusNode;i=i.focusOffset;try{l.nodeType,d.nodeType}catch{l=null;break e}var x=0,S=-1,T=-1,L=0,V=0,$=e,U=null;t:for(;;){for(var q;$!==l||s!==0&&$.nodeType!==3||(S=x+s),$!==d||i!==0&&$.nodeType!==3||(T=x+i),$.nodeType===3&&(x+=$.nodeValue.length),(q=$.firstChild)!==null;)U=$,$=q;for(;;){if($===e)break t;if(U===l&&++L===s&&(S=x),U===d&&++V===i&&(T=x),(q=$.nextSibling)!==null)break;$=U,U=$.parentNode}$=q}l=S===-1||T===-1?null:{start:S,end:T}}else l=null}l=l||{start:0,end:0}}else l=null;for(gc={focusedElem:e,selectionRange:l},Zr=!1,St=t;St!==null;)if(t=St,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,St=e;else for(;St!==null;){switch(t=St,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,l=t,s=d.memoizedProps,d=d.memoizedState,i=l.stateNode;try{var ge=Ml(l.type,s);e=i.getSnapshotBeforeUpdate(ge,d),i.__reactInternalSnapshotBeforeUpdate=e}catch(Te){We(l,l.return,Te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)vc(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":vc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,St=e;break}St=t.return}}function vh(e,t,l){var i=l.flags;switch(l.tag){case 0:case 11:case 15:Hn(e,l),i&4&&aa(5,l);break;case 1:if(Hn(e,l),i&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(x){We(l,l.return,x)}else{var s=Ml(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){We(l,l.return,x)}}i&64&&hh(l),i&512&&ra(l,l.return);break;case 3:if(Hn(e,l),i&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{ld(e,t)}catch(x){We(l,l.return,x)}}break;case 27:t===null&&i&4&&yh(l);case 26:case 5:Hn(e,l),t===null&&i&4&&ph(l),i&512&&ra(l,l.return);break;case 12:Hn(e,l);break;case 31:Hn(e,l),i&4&&jh(e,l);break;case 13:Hn(e,l),i&4&&kh(e,l),i&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Tx.bind(null,l),Xx(e,l))));break;case 22:if(i=l.memoizedState!==null||Bn,!i){t=t!==null&&t.memoizedState!==null||gt,s=Bn;var d=gt;Bn=i,(gt=t)&&!d?qn(e,l,(l.subtreeFlags&8772)!==0):Hn(e,l),Bn=s,gt=d}break;case 30:break;default:Hn(e,l)}}function bh(e){var t=e.alternate;t!==null&&(e.alternate=null,bh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Nu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var st=null,Bt=!1;function Un(e,t,l){for(l=l.child;l!==null;)Sh(e,t,l),l=l.sibling}function Sh(e,t,l){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(Dt,l)}catch{}switch(l.tag){case 26:gt||bn(l,t),Un(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:gt||bn(l,t);var i=st,s=Bt;ol(l.type)&&(st=l.stateNode,Bt=!1),Un(e,t,l),pa(l.stateNode),st=i,Bt=s;break;case 5:gt||bn(l,t);case 6:if(i=st,s=Bt,st=null,Un(e,t,l),st=i,Bt=s,st!==null)if(Bt)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(l.stateNode)}catch(d){We(l,t,d)}else try{st.removeChild(l.stateNode)}catch(d){We(l,t,d)}break;case 18:st!==null&&(Bt?(e=st,hm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ji(e)):hm(st,l.stateNode));break;case 4:i=st,s=Bt,st=l.stateNode.containerInfo,Bt=!0,Un(e,t,l),st=i,Bt=s;break;case 0:case 11:case 14:case 15:ll(2,l,t),gt||ll(4,l,t),Un(e,t,l);break;case 1:gt||(bn(l,t),i=l.stateNode,typeof i.componentWillUnmount=="function"&&mh(l,t,i)),Un(e,t,l);break;case 21:Un(e,t,l);break;case 22:gt=(i=gt)||l.memoizedState!==null,Un(e,t,l),gt=i;break;default:Un(e,t,l)}}function jh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ji(e)}catch(l){We(t,t.return,l)}}}function kh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ji(e)}catch(l){We(t,t.return,l)}}function xx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new xh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new xh),t;default:throw Error(u(435,e.tag))}}function wr(e,t){var l=xx(e);t.forEach(function(i){if(!l.has(i)){l.add(i);var s=wx.bind(null,e,i);i.then(s,s)}})}function Ut(e,t){var l=t.deletions;if(l!==null)for(var i=0;i<l.length;i++){var s=l[i],d=e,x=t,S=x;e:for(;S!==null;){switch(S.tag){case 27:if(ol(S.type)){st=S.stateNode,Bt=!1;break e}break;case 5:st=S.stateNode,Bt=!1;break e;case 3:case 4:st=S.stateNode.containerInfo,Bt=!0;break e}S=S.return}if(st===null)throw Error(u(160));Sh(d,x,s),st=null,Bt=!1,d=s.alternate,d!==null&&(d.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Nh(t,e),t=t.sibling}var pn=null;function Nh(e,t){var l=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ut(t,e),Ht(e),i&4&&(ll(3,e,e.return),aa(3,e),ll(5,e,e.return));break;case 1:Ut(t,e),Ht(e),i&512&&(gt||l===null||bn(l,l.return)),i&64&&Bn&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?i:l.concat(i))));break;case 26:var s=pn;if(Ut(t,e),Ht(e),i&512&&(gt||l===null||bn(l,l.return)),i&4){var d=l!==null?l.memoizedState:null;if(i=e.memoizedState,l===null)if(i===null)if(e.stateNode===null){e:{i=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(i){case"title":d=s.getElementsByTagName("title")[0],(!d||d[Mi]||d[kt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=s.createElement(i),s.head.insertBefore(d,s.querySelector("head > title"))),wt(d,i,l),d[kt]=e,bt(d),i=d;break e;case"link":var x=Nm("link","href",s).get(i+(l.href||""));if(x){for(var S=0;S<x.length;S++)if(d=x[S],d.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&d.getAttribute("rel")===(l.rel==null?null:l.rel)&&d.getAttribute("title")===(l.title==null?null:l.title)&&d.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){x.splice(S,1);break t}}d=s.createElement(i),wt(d,i,l),s.head.appendChild(d);break;case"meta":if(x=Nm("meta","content",s).get(i+(l.content||""))){for(S=0;S<x.length;S++)if(d=x[S],d.getAttribute("content")===(l.content==null?null:""+l.content)&&d.getAttribute("name")===(l.name==null?null:l.name)&&d.getAttribute("property")===(l.property==null?null:l.property)&&d.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&d.getAttribute("charset")===(l.charSet==null?null:l.charSet)){x.splice(S,1);break t}}d=s.createElement(i),wt(d,i,l),s.head.appendChild(d);break;default:throw Error(u(468,i))}d[kt]=e,bt(d),i=d}e.stateNode=i}else Em(s,e.type,e.stateNode);else e.stateNode=km(s,i,e.memoizedProps);else d!==i?(d===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):d.count--,i===null?Em(s,e.type,e.stateNode):km(s,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Qs(e,e.memoizedProps,l.memoizedProps)}break;case 27:Ut(t,e),Ht(e),i&512&&(gt||l===null||bn(l,l.return)),l!==null&&i&4&&Qs(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Ut(t,e),Ht(e),i&512&&(gt||l===null||bn(l,l.return)),e.flags&32){s=e.stateNode;try{Ql(s,"")}catch(ge){We(e,e.return,ge)}}i&4&&e.stateNode!=null&&(s=e.memoizedProps,Qs(e,s,l!==null?l.memoizedProps:s)),i&1024&&(Fs=!0);break;case 6:if(Ut(t,e),Ht(e),i&4){if(e.stateNode===null)throw Error(u(162));i=e.memoizedProps,l=e.stateNode;try{l.nodeValue=i}catch(ge){We(e,e.return,ge)}}break;case 3:if(Gr=null,s=pn,pn=Yr(t.containerInfo),Ut(t,e),pn=s,Ht(e),i&4&&l!==null&&l.memoizedState.isDehydrated)try{ji(t.containerInfo)}catch(ge){We(e,e.return,ge)}Fs&&(Fs=!1,Eh(e));break;case 4:i=pn,pn=Yr(e.stateNode.containerInfo),Ut(t,e),Ht(e),pn=i;break;case 12:Ut(t,e),Ht(e);break;case 31:Ut(t,e),Ht(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,wr(e,i)));break;case 13:Ut(t,e),Ht(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Cr=Ae()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,wr(e,i)));break;case 22:s=e.memoizedState!==null;var T=l!==null&&l.memoizedState!==null,L=Bn,V=gt;if(Bn=L||s,gt=V||T,Ut(t,e),gt=V,Bn=L,Ht(e),i&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||T||Bn||gt||Ol(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){T=l=t;try{if(d=T.stateNode,s)x=d.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{S=T.stateNode;var $=T.memoizedProps.style,U=$!=null&&$.hasOwnProperty("display")?$.display:null;S.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ge){We(T,T.return,ge)}}}else if(t.tag===6){if(l===null){T=t;try{T.stateNode.nodeValue=s?"":T.memoizedProps}catch(ge){We(T,T.return,ge)}}}else if(t.tag===18){if(l===null){T=t;try{var q=T.stateNode;s?mm(q,!0):mm(T.stateNode,!1)}catch(ge){We(T,T.return,ge)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(l=i.retryQueue,l!==null&&(i.retryQueue=null,wr(e,l))));break;case 19:Ut(t,e),Ht(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,wr(e,i)));break;case 30:break;case 21:break;default:Ut(t,e),Ht(e)}}function Ht(e){var t=e.flags;if(t&2){try{for(var l,i=e.return;i!==null;){if(gh(i)){l=i;break}i=i.return}if(l==null)throw Error(u(160));switch(l.tag){case 27:var s=l.stateNode,d=Xs(e);Tr(e,d,s);break;case 5:var x=l.stateNode;l.flags&32&&(Ql(x,""),l.flags&=-33);var S=Xs(e);Tr(e,S,x);break;case 3:case 4:var T=l.stateNode.containerInfo,L=Xs(e);Zs(e,L,T);break;default:throw Error(u(161))}}catch(V){We(e,e.return,V)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Eh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Eh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Hn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)vh(e,t.alternate,t),t=t.sibling}function Ol(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ll(4,t,t.return),Ol(t);break;case 1:bn(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&mh(t,t.return,l),Ol(t);break;case 27:pa(t.stateNode);case 26:case 5:bn(t,t.return),Ol(t);break;case 22:t.memoizedState===null&&Ol(t);break;case 30:Ol(t);break;default:Ol(t)}e=e.sibling}}function qn(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,s=e,d=t,x=d.flags;switch(d.tag){case 0:case 11:case 15:qn(s,d,l),aa(4,d);break;case 1:if(qn(s,d,l),i=d,s=i.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(L){We(i,i.return,L)}if(i=d,s=i.updateQueue,s!==null){var S=i.stateNode;try{var T=s.shared.hiddenCallbacks;if(T!==null)for(s.shared.hiddenCallbacks=null,s=0;s<T.length;s++)nd(T[s],S)}catch(L){We(i,i.return,L)}}l&&x&64&&hh(d),ra(d,d.return);break;case 27:yh(d);case 26:case 5:qn(s,d,l),l&&i===null&&x&4&&ph(d),ra(d,d.return);break;case 12:qn(s,d,l);break;case 31:qn(s,d,l),l&&x&4&&jh(s,d);break;case 13:qn(s,d,l),l&&x&4&&kh(s,d);break;case 22:d.memoizedState===null&&qn(s,d,l),ra(d,d.return);break;case 30:break;default:qn(s,d,l)}t=t.sibling}}function Js(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Xi(l))}function $s(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Xi(e))}function gn(e,t,l,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Th(e,t,l,i),t=t.sibling}function Th(e,t,l,i){var s=t.flags;switch(t.tag){case 0:case 11:case 15:gn(e,t,l,i),s&2048&&aa(9,t);break;case 1:gn(e,t,l,i);break;case 3:gn(e,t,l,i),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Xi(e)));break;case 12:if(s&2048){gn(e,t,l,i),e=t.stateNode;try{var d=t.memoizedProps,x=d.id,S=d.onPostCommit;typeof S=="function"&&S(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){We(t,t.return,T)}}else gn(e,t,l,i);break;case 31:gn(e,t,l,i);break;case 13:gn(e,t,l,i);break;case 23:break;case 22:d=t.stateNode,x=t.alternate,t.memoizedState!==null?d._visibility&2?gn(e,t,l,i):ua(e,t):d._visibility&2?gn(e,t,l,i):(d._visibility|=2,fi(e,t,l,i,(t.subtreeFlags&10256)!==0||!1)),s&2048&&Js(x,t);break;case 24:gn(e,t,l,i),s&2048&&$s(t.alternate,t);break;default:gn(e,t,l,i)}}function fi(e,t,l,i,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,x=t,S=l,T=i,L=x.flags;switch(x.tag){case 0:case 11:case 15:fi(d,x,S,T,s),aa(8,x);break;case 23:break;case 22:var V=x.stateNode;x.memoizedState!==null?V._visibility&2?fi(d,x,S,T,s):ua(d,x):(V._visibility|=2,fi(d,x,S,T,s)),s&&L&2048&&Js(x.alternate,x);break;case 24:fi(d,x,S,T,s),s&&L&2048&&$s(x.alternate,x);break;default:fi(d,x,S,T,s)}t=t.sibling}}function ua(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,i=t,s=i.flags;switch(i.tag){case 22:ua(l,i),s&2048&&Js(i.alternate,i);break;case 24:ua(l,i),s&2048&&$s(i.alternate,i);break;default:ua(l,i)}t=t.sibling}}var sa=8192;function di(e,t,l){if(e.subtreeFlags&sa)for(e=e.child;e!==null;)wh(e,t,l),e=e.sibling}function wh(e,t,l){switch(e.tag){case 26:di(e,t,l),e.flags&sa&&e.memoizedState!==null&&iv(l,pn,e.memoizedState,e.memoizedProps);break;case 5:di(e,t,l);break;case 3:case 4:var i=pn;pn=Yr(e.stateNode.containerInfo),di(e,t,l),pn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=sa,sa=16777216,di(e,t,l),sa=i):di(e,t,l));break;default:di(e,t,l)}}function Ah(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ca(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var i=t[l];St=i,zh(i,e)}Ah(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ch(e),e=e.sibling}function Ch(e){switch(e.tag){case 0:case 11:case 15:ca(e),e.flags&2048&&ll(9,e,e.return);break;case 3:ca(e);break;case 12:ca(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ar(e)):ca(e);break;default:ca(e)}}function Ar(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var i=t[l];St=i,zh(i,e)}Ah(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ll(8,t,t.return),Ar(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Ar(t));break;default:Ar(t)}e=e.sibling}}function zh(e,t){for(;St!==null;){var l=St;switch(l.tag){case 0:case 11:case 15:ll(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var i=l.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:Xi(l.memoizedState.cache)}if(i=l.child,i!==null)i.return=l,St=i;else e:for(l=e;St!==null;){i=St;var s=i.sibling,d=i.return;if(bh(i),i===l){St=null;break e}if(s!==null){s.return=d,St=s;break e}St=d}}}var vx={getCacheForType:function(e){var t=Et(ht),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Et(ht).controller.signal}},bx=typeof WeakMap=="function"?WeakMap:Map,$e=0,lt=null,Be=null,Ye=0,Ie=0,$t=null,il=!1,hi=!1,Is=!1,Yn=0,ot=0,al=0,Rl=0,Ws=0,It=0,mi=0,oa=null,qt=null,Ps=!1,Cr=0,Dh=0,zr=1/0,Dr=null,rl=null,vt=0,ul=null,pi=null,Kn=0,ec=0,tc=null,_h=null,fa=0,nc=null;function Wt(){return($e&2)!==0&&Ye!==0?Ye&-Ye:D.T!==null?sc():Zo()}function Mh(){if(It===0)if((Ye&536870912)===0||Ge){var e=Ha;Ha<<=1,(Ha&3932160)===0&&(Ha=262144),It=e}else It=536870912;return e=Ft.current,e!==null&&(e.flags|=32),It}function Yt(e,t,l){(e===lt&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)&&(gi(e,0),sl(e,Ye,It,!1)),_i(e,l),(($e&2)===0||e!==lt)&&(e===lt&&(($e&2)===0&&(Rl|=l),ot===4&&sl(e,Ye,It,!1)),Sn(e))}function Oh(e,t,l){if(($e&6)!==0)throw Error(u(327));var i=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Di(e,t),s=i?kx(e,t):ic(e,t,!0),d=i;do{if(s===0){hi&&!i&&sl(e,t,0,!1);break}else{if(l=e.current.alternate,d&&!Sx(l)){s=ic(e,t,!1),d=!1;continue}if(s===2){if(d=t,e.errorRecoveryDisabledLanes&d)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var S=e;s=oa;var T=S.current.memoizedState.isDehydrated;if(T&&(gi(S,x).flags|=256),x=ic(S,x,!1),x!==2){if(Is&&!T){S.errorRecoveryDisabledLanes|=d,Rl|=d,s=4;break e}d=qt,qt=s,d!==null&&(qt===null?qt=d:qt.push.apply(qt,d))}s=x}if(d=!1,s!==2)continue}}if(s===1){gi(e,0),sl(e,t,0,!0);break}e:{switch(i=e,d=s,d){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:sl(i,t,It,!il);break e;case 2:qt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(s=Cr+300-Ae(),10<s)){if(sl(i,t,It,!il),Ya(i,0,!0)!==0)break e;Kn=t,i.timeoutHandle=fm(Rh.bind(null,i,l,qt,Dr,Ps,t,It,Rl,mi,il,d,"Throttled",-0,0),s);break e}Rh(i,l,qt,Dr,Ps,t,It,Rl,mi,il,d,null,-0,0)}}break}while(!0);Sn(e)}function Rh(e,t,l,i,s,d,x,S,T,L,V,$,U,q){if(e.timeoutHandle=-1,$=t.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:wn},wh(t,d,$);var ge=(d&62914560)===d?Cr-Ae():(d&4194048)===d?Dh-Ae():0;if(ge=av($,ge),ge!==null){Kn=d,e.cancelPendingCommit=ge(Gh.bind(null,e,t,d,l,i,s,x,S,T,V,$,null,U,q)),sl(e,d,x,!L);return}}Gh(e,t,d,l,i,s,x,S,T)}function Sx(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var i=0;i<l.length;i++){var s=l[i],d=s.getSnapshot;s=s.value;try{if(!Xt(d(),s))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 sl(e,t,l,i){t&=~Ws,t&=~Rl,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var s=t;0<s;){var d=31-nt(s),x=1<<d;i[d]=-1,s&=~x}l!==0&&Vo(e,l,t)}function _r(){return($e&6)===0?(da(0),!1):!0}function lc(){if(Be!==null){if(Ie===0)var e=Be.return;else e=Be,Dn=Tl=null,vs(e),ri=null,Fi=0,e=Be;for(;e!==null;)dh(e.alternate,e),e=e.return;Be=null}}function gi(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Yx(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Kn=0,lc(),lt=e,Be=l=Cn(e.current,null),Ye=t,Ie=0,$t=null,il=!1,hi=Di(e,t),Is=!1,mi=It=Ws=Rl=al=ot=0,qt=oa=null,Ps=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var s=31-nt(i),d=1<<s;t|=e[s],i&=~d}return Yn=t,Pa(),l}function Lh(e,t){_e=null,D.H=na,t===ai||t===ur?(t=Wf(),Ie=3):t===us?(t=Wf(),Ie=4):Ie=t===Rs?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,$t=t,Be===null&&(ot=1,Sr(e,an(t,e.current)))}function Bh(){var e=Ft.current;return e===null?!0:(Ye&4194048)===Ye?cn===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?e===cn:!1}function Uh(){var e=D.H;return D.H=na,e===null?na:e}function Hh(){var e=D.A;return D.A=vx,e}function Mr(){ot=4,il||(Ye&4194048)!==Ye&&Ft.current!==null||(hi=!0),(al&134217727)===0&&(Rl&134217727)===0||lt===null||sl(lt,Ye,It,!1)}function ic(e,t,l){var i=$e;$e|=2;var s=Uh(),d=Hh();(lt!==e||Ye!==t)&&(Dr=null,gi(e,t)),t=!1;var x=ot;e:do try{if(Ie!==0&&Be!==null){var S=Be,T=$t;switch(Ie){case 8:lc(),x=6;break e;case 3:case 2:case 9:case 6:Ft.current===null&&(t=!0);var L=Ie;if(Ie=0,$t=null,yi(e,S,T,L),l&&hi){x=0;break e}break;default:L=Ie,Ie=0,$t=null,yi(e,S,T,L)}}jx(),x=ot;break}catch(V){Lh(e,V)}while(!0);return t&&e.shellSuspendCounter++,Dn=Tl=null,$e=i,D.H=s,D.A=d,Be===null&&(lt=null,Ye=0,Pa()),x}function jx(){for(;Be!==null;)qh(Be)}function kx(e,t){var l=$e;$e|=2;var i=Uh(),s=Hh();lt!==e||Ye!==t?(Dr=null,zr=Ae()+500,gi(e,t)):hi=Di(e,t);e:do try{if(Ie!==0&&Be!==null){t=Be;var d=$t;t:switch(Ie){case 1:Ie=0,$t=null,yi(e,t,d,1);break;case 2:case 9:if($f(d)){Ie=0,$t=null,Yh(t);break}t=function(){Ie!==2&&Ie!==9||lt!==e||(Ie=7),Sn(e)},d.then(t,t);break e;case 3:Ie=7;break e;case 4:Ie=5;break e;case 7:$f(d)?(Ie=0,$t=null,Yh(t)):(Ie=0,$t=null,yi(e,t,d,7));break;case 5:var x=null;switch(Be.tag){case 26:x=Be.memoizedState;case 5:case 27:var S=Be;if(x?Tm(x):S.stateNode.complete){Ie=0,$t=null;var T=S.sibling;if(T!==null)Be=T;else{var L=S.return;L!==null?(Be=L,Or(L)):Be=null}break t}}Ie=0,$t=null,yi(e,t,d,5);break;case 6:Ie=0,$t=null,yi(e,t,d,6);break;case 8:lc(),ot=6;break e;default:throw Error(u(462))}}Nx();break}catch(V){Lh(e,V)}while(!0);return Dn=Tl=null,D.H=i,D.A=s,$e=l,Be!==null?0:(lt=null,Ye=0,Pa(),ot)}function Nx(){for(;Be!==null&&!jt();)qh(Be)}function qh(e){var t=oh(e.alternate,e,Yn);e.memoizedProps=e.pendingProps,t===null?Or(e):Be=t}function Yh(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=ih(l,t,t.pendingProps,t.type,void 0,Ye);break;case 11:t=ih(l,t,t.pendingProps,t.type.render,t.ref,Ye);break;case 5:vs(t);default:dh(l,t),t=Be=Hf(t,Yn),t=oh(l,t,Yn)}e.memoizedProps=e.pendingProps,t===null?Or(e):Be=t}function yi(e,t,l,i){Dn=Tl=null,vs(t),ri=null,Fi=0;var s=t.return;try{if(dx(e,s,t,l,Ye)){ot=1,Sr(e,an(l,e.current)),Be=null;return}}catch(d){if(s!==null)throw Be=s,d;ot=1,Sr(e,an(l,e.current)),Be=null;return}t.flags&32768?(Ge||i===1?e=!0:hi||(Ye&536870912)!==0?e=!1:(il=e=!0,(i===2||i===9||i===3||i===6)&&(i=Ft.current,i!==null&&i.tag===13&&(i.flags|=16384))),Kh(t,e)):Or(t)}function Or(e){var t=e;do{if((t.flags&32768)!==0){Kh(t,il);return}e=t.return;var l=px(t.alternate,t,Yn);if(l!==null){Be=l;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);ot===0&&(ot=5)}function Kh(e,t){do{var l=gx(e.alternate,e);if(l!==null){l.flags&=32767,Be=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Be=e;return}Be=e=l}while(e!==null);ot=6,Be=null}function Gh(e,t,l,i,s,d,x,S,T){e.cancelPendingCommit=null;do Rr();while(vt!==0);if(($e&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(d=t.lanes|t.childLanes,d|=Xu,ly(e,l,d,x,S,T),e===lt&&(Be=lt=null,Ye=0),pi=t,ul=e,Kn=l,ec=d,tc=s,_h=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ax(Se,function(){return Fh(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=D.T,D.T=null,s=I.p,I.p=2,x=$e,$e|=4;try{yx(e,t,l)}finally{$e=x,I.p=s,D.T=i}}vt=1,Vh(),Qh(),Xh()}}function Vh(){if(vt===1){vt=0;var e=ul,t=pi,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var i=I.p;I.p=2;var s=$e;$e|=4;try{Nh(t,e);var d=gc,x=zf(e.containerInfo),S=d.focusedElem,T=d.selectionRange;if(x!==S&&S&&S.ownerDocument&&Cf(S.ownerDocument.documentElement,S)){if(T!==null&&Yu(S)){var L=T.start,V=T.end;if(V===void 0&&(V=L),"selectionStart"in S)S.selectionStart=L,S.selectionEnd=Math.min(V,S.value.length);else{var $=S.ownerDocument||document,U=$&&$.defaultView||window;if(U.getSelection){var q=U.getSelection(),ge=S.textContent.length,Te=Math.min(T.start,ge),tt=T.end===void 0?Te:Math.min(T.end,ge);!q.extend&&Te>tt&&(x=tt,tt=Te,Te=x);var z=Af(S,Te),A=Af(S,tt);if(z&&A&&(q.rangeCount!==1||q.anchorNode!==z.node||q.anchorOffset!==z.offset||q.focusNode!==A.node||q.focusOffset!==A.offset)){var R=$.createRange();R.setStart(z.node,z.offset),q.removeAllRanges(),Te>tt?(q.addRange(R),q.extend(A.node,A.offset)):(R.setEnd(A.node,A.offset),q.addRange(R))}}}}for($=[],q=S;q=q.parentNode;)q.nodeType===1&&$.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<$.length;S++){var J=$[S];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}Zr=!!pc,gc=pc=null}finally{$e=s,I.p=i,D.T=l}}e.current=t,vt=2}}function Qh(){if(vt===2){vt=0;var e=ul,t=pi,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var i=I.p;I.p=2;var s=$e;$e|=4;try{vh(e,t.alternate,t)}finally{$e=s,I.p=i,D.T=l}}vt=3}}function Xh(){if(vt===4||vt===3){vt=0,Vt();var e=ul,t=pi,l=Kn,i=_h;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?vt=5:(vt=0,pi=ul=null,Zh(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(rl=null),ju(l),t=t.stateNode,xt&&typeof xt.onCommitFiberRoot=="function")try{xt.onCommitFiberRoot(Dt,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=D.T,s=I.p,I.p=2,D.T=null;try{for(var d=e.onRecoverableError,x=0;x<i.length;x++){var S=i[x];d(S.value,{componentStack:S.stack})}}finally{D.T=t,I.p=s}}(Kn&3)!==0&&Rr(),Sn(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===nc?fa++:(fa=0,nc=e):fa=0,da(0)}}function Zh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Xi(t)))}function Rr(){return Vh(),Qh(),Xh(),Fh()}function Fh(){if(vt!==5)return!1;var e=ul,t=ec;ec=0;var l=ju(Kn),i=D.T,s=I.p;try{I.p=32>l?32:l,D.T=null,l=tc,tc=null;var d=ul,x=Kn;if(vt=0,pi=ul=null,Kn=0,($e&6)!==0)throw Error(u(331));var S=$e;if($e|=4,Ch(d.current),Th(d,d.current,x,l),$e=S,da(0,!1),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(Dt,d)}catch{}return!0}finally{I.p=s,D.T=i,Zh(e,t)}}function Jh(e,t,l){t=an(l,t),t=Os(e.stateNode,t,2),e=el(e,t,2),e!==null&&(_i(e,2),Sn(e))}function We(e,t,l){if(e.tag===3)Jh(e,e,l);else for(;t!==null;){if(t.tag===3){Jh(t,e,l);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(rl===null||!rl.has(i))){e=an(l,e),l=$d(2),i=el(t,l,2),i!==null&&(Id(l,i,t,e),_i(i,2),Sn(i));break}}t=t.return}}function ac(e,t,l){var i=e.pingCache;if(i===null){i=e.pingCache=new bx;var s=new Set;i.set(t,s)}else s=i.get(t),s===void 0&&(s=new Set,i.set(t,s));s.has(l)||(Is=!0,s.add(l),e=Ex.bind(null,e,t,l),t.then(e,e))}function Ex(e,t,l){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,lt===e&&(Ye&l)===l&&(ot===4||ot===3&&(Ye&62914560)===Ye&&300>Ae()-Cr?($e&2)===0&&gi(e,0):Ws|=l,mi===Ye&&(mi=0)),Sn(e)}function $h(e,t){t===0&&(t=Go()),e=kl(e,t),e!==null&&(_i(e,t),Sn(e))}function Tx(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),$h(e,l)}function wx(e,t){var l=0;switch(e.tag){case 31:case 13:var i=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(u(314))}i!==null&&i.delete(t),$h(e,l)}function Ax(e,t){return Xe(e,t)}var Lr=null,xi=null,rc=!1,Br=!1,uc=!1,cl=0;function Sn(e){e!==xi&&e.next===null&&(xi===null?Lr=xi=e:xi=xi.next=e),Br=!0,rc||(rc=!0,zx())}function da(e,t){if(!uc&&Br){uc=!0;do for(var l=!1,i=Lr;i!==null;){if(e!==0){var s=i.pendingLanes;if(s===0)var d=0;else{var x=i.suspendedLanes,S=i.pingedLanes;d=(1<<31-nt(42|e)+1)-1,d&=s&~(x&~S),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,em(i,d))}else d=Ye,d=Ya(i,i===lt?d:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(d&3)===0||Di(i,d)||(l=!0,em(i,d));i=i.next}while(l);uc=!1}}function Cx(){Ih()}function Ih(){Br=rc=!1;var e=0;cl!==0&&qx()&&(e=cl);for(var t=Ae(),l=null,i=Lr;i!==null;){var s=i.next,d=Wh(i,t);d===0?(i.next=null,l===null?Lr=s:l.next=s,s===null&&(xi=l)):(l=i,(e!==0||(d&3)!==0)&&(Br=!0)),i=s}vt!==0&&vt!==5||da(e),cl!==0&&(cl=0)}function Wh(e,t){for(var l=e.suspendedLanes,i=e.pingedLanes,s=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var x=31-nt(d),S=1<<x,T=s[x];T===-1?((S&l)===0||(S&i)!==0)&&(s[x]=ny(S,t)):T<=t&&(e.expiredLanes|=S),d&=~S}if(t=lt,l=Ye,l=Ya(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,l===0||e===t&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&we(i),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Di(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(i!==null&&we(i),ju(l)){case 2:case 8:l=ie;break;case 32:l=Se;break;case 268435456:l=qe;break;default:l=Se}return i=Ph.bind(null,e),l=Xe(l,i),e.callbackPriority=t,e.callbackNode=l,t}return i!==null&&i!==null&&we(i),e.callbackPriority=2,e.callbackNode=null,2}function Ph(e,t){if(vt!==0&&vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Rr()&&e.callbackNode!==l)return null;var i=Ye;return i=Ya(e,e===lt?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Oh(e,i,t),Wh(e,Ae()),e.callbackNode!=null&&e.callbackNode===l?Ph.bind(null,e):null)}function em(e,t){if(Rr())return null;Oh(e,t,!0)}function zx(){Kx(function(){($e&6)!==0?Xe(H,Cx):Ih()})}function sc(){if(cl===0){var e=li;e===0&&(e=Ua,Ua<<=1,(Ua&261888)===0&&(Ua=256)),cl=e}return cl}function tm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Qa(""+e)}function nm(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function Dx(e,t,l,i,s){if(t==="submit"&&l&&l.stateNode===s){var d=tm((s[Rt]||null).action),x=i.submitter;x&&(t=(t=x[Rt]||null)?tm(t.formAction):x.getAttribute("formAction"),t!==null&&(d=t,x=null));var S=new Ja("action","action",null,i,s);e.push({event:S,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(cl!==0){var T=x?nm(s,x):new FormData(s);As(l,{pending:!0,data:T,method:s.method,action:d},null,T)}}else typeof d=="function"&&(S.preventDefault(),T=x?nm(s,x):new FormData(s),As(l,{pending:!0,data:T,method:s.method,action:d},d,T))},currentTarget:s}]})}}for(var cc=0;cc<Qu.length;cc++){var oc=Qu[cc],_x=oc.toLowerCase(),Mx=oc[0].toUpperCase()+oc.slice(1);mn(_x,"on"+Mx)}mn(Mf,"onAnimationEnd"),mn(Of,"onAnimationIteration"),mn(Rf,"onAnimationStart"),mn("dblclick","onDoubleClick"),mn("focusin","onFocus"),mn("focusout","onBlur"),mn(Jy,"onTransitionRun"),mn($y,"onTransitionStart"),mn(Iy,"onTransitionCancel"),mn(Lf,"onTransitionEnd"),Gl("onMouseEnter",["mouseout","mouseover"]),Gl("onMouseLeave",["mouseout","mouseover"]),Gl("onPointerEnter",["pointerout","pointerover"]),Gl("onPointerLeave",["pointerout","pointerover"]),vl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),vl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),vl("onBeforeInput",["compositionend","keypress","textInput","paste"]),vl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),vl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),vl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ha="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(" "),Ox=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ha));function lm(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var i=e[l],s=i.event;i=i.listeners;e:{var d=void 0;if(t)for(var x=i.length-1;0<=x;x--){var S=i[x],T=S.instance,L=S.currentTarget;if(S=S.listener,T!==d&&s.isPropagationStopped())break e;d=S,s.currentTarget=L;try{d(s)}catch(V){Wa(V)}s.currentTarget=null,d=T}else for(x=0;x<i.length;x++){if(S=i[x],T=S.instance,L=S.currentTarget,S=S.listener,T!==d&&s.isPropagationStopped())break e;d=S,s.currentTarget=L;try{d(s)}catch(V){Wa(V)}s.currentTarget=null,d=T}}}}function Ue(e,t){var l=t[ku];l===void 0&&(l=t[ku]=new Set);var i=e+"__bubble";l.has(i)||(im(t,e,2,!1),l.add(i))}function fc(e,t,l){var i=0;t&&(i|=4),im(l,e,i,t)}var Ur="_reactListening"+Math.random().toString(36).slice(2);function dc(e){if(!e[Ur]){e[Ur]=!0,$o.forEach(function(l){l!=="selectionchange"&&(Ox.has(l)||fc(l,!1,e),fc(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ur]||(t[Ur]=!0,fc("selectionchange",!1,t))}}function im(e,t,l,i){switch(Mm(t)){case 2:var s=sv;break;case 8:s=cv;break;default:s=wc}l=s.bind(null,t,l,e),s=void 0,!_u||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),i?s!==void 0?e.addEventListener(t,l,{capture:!0,passive:s}):e.addEventListener(t,l,!0):s!==void 0?e.addEventListener(t,l,{passive:s}):e.addEventListener(t,l,!1)}function hc(e,t,l,i,s){var d=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var x=i.tag;if(x===3||x===4){var S=i.stateNode.containerInfo;if(S===s)break;if(x===4)for(x=i.return;x!==null;){var T=x.tag;if((T===3||T===4)&&x.stateNode.containerInfo===s)return;x=x.return}for(;S!==null;){if(x=ql(S),x===null)return;if(T=x.tag,T===5||T===6||T===26||T===27){i=d=x;continue e}S=S.parentNode}}i=i.return}cf(function(){var L=d,V=zu(l),$=[];e:{var U=Bf.get(e);if(U!==void 0){var q=Ja,ge=e;switch(e){case"keypress":if(Za(l)===0)break e;case"keydown":case"keyup":q=wy;break;case"focusin":ge="focus",q=Lu;break;case"focusout":ge="blur",q=Lu;break;case"beforeblur":case"afterblur":q=Lu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=df;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=py;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=zy;break;case Mf:case Of:case Rf:q=xy;break;case Lf:q=_y;break;case"scroll":case"scrollend":q=hy;break;case"wheel":q=Oy;break;case"copy":case"cut":case"paste":q=by;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=mf;break;case"toggle":case"beforetoggle":q=Ly}var Te=(t&4)!==0,tt=!Te&&(e==="scroll"||e==="scrollend"),z=Te?U!==null?U+"Capture":null:U;Te=[];for(var A=L,R;A!==null;){var J=A;if(R=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||R===null||z===null||(J=Ri(A,z),J!=null&&Te.push(ma(A,J,R))),tt)break;A=A.return}0<Te.length&&(U=new q(U,ge,null,l,V),$.push({event:U,listeners:Te}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",U&&l!==Cu&&(ge=l.relatedTarget||l.fromElement)&&(ql(ge)||ge[Hl]))break e;if((q||U)&&(U=V.window===V?V:(U=V.ownerDocument)?U.defaultView||U.parentWindow:window,q?(ge=l.relatedTarget||l.toElement,q=L,ge=ge?ql(ge):null,ge!==null&&(tt=h(ge),Te=ge.tag,ge!==tt||Te!==5&&Te!==27&&Te!==6)&&(ge=null)):(q=null,ge=L),q!==ge)){if(Te=df,J="onMouseLeave",z="onMouseEnter",A="mouse",(e==="pointerout"||e==="pointerover")&&(Te=mf,J="onPointerLeave",z="onPointerEnter",A="pointer"),tt=q==null?U:Oi(q),R=ge==null?U:Oi(ge),U=new Te(J,A+"leave",q,l,V),U.target=tt,U.relatedTarget=R,J=null,ql(V)===L&&(Te=new Te(z,A+"enter",ge,l,V),Te.target=R,Te.relatedTarget=tt,J=Te),tt=J,q&&ge)t:{for(Te=Rx,z=q,A=ge,R=0,J=z;J;J=Te(J))R++;J=0;for(var je=A;je;je=Te(je))J++;for(;0<R-J;)z=Te(z),R--;for(;0<J-R;)A=Te(A),J--;for(;R--;){if(z===A||A!==null&&z===A.alternate){Te=z;break t}z=Te(z),A=Te(A)}Te=null}else Te=null;q!==null&&am($,U,q,Te,!1),ge!==null&&tt!==null&&am($,tt,ge,Te,!0)}}e:{if(U=L?Oi(L):window,q=U.nodeName&&U.nodeName.toLowerCase(),q==="select"||q==="input"&&U.type==="file")var Ze=jf;else if(bf(U))if(kf)Ze=Xy;else{Ze=Vy;var xe=Gy}else q=U.nodeName,!q||q.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?L&&Au(L.elementType)&&(Ze=jf):Ze=Qy;if(Ze&&(Ze=Ze(e,L))){Sf($,Ze,l,V);break e}xe&&xe(e,U,L),e==="focusout"&&L&&U.type==="number"&&L.memoizedProps.value!=null&&wu(U,"number",U.value)}switch(xe=L?Oi(L):window,e){case"focusin":(bf(xe)||xe.contentEditable==="true")&&(Jl=xe,Ku=L,Gi=null);break;case"focusout":Gi=Ku=Jl=null;break;case"mousedown":Gu=!0;break;case"contextmenu":case"mouseup":case"dragend":Gu=!1,Df($,l,V);break;case"selectionchange":if(Fy)break;case"keydown":case"keyup":Df($,l,V)}var Oe;if(Uu)e:{switch(e){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else Fl?xf(e,l)&&(Ke="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Ke="onCompositionStart");Ke&&(pf&&l.locale!=="ko"&&(Fl||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Fl&&(Oe=of()):(Zn=V,Mu="value"in Zn?Zn.value:Zn.textContent,Fl=!0)),xe=Hr(L,Ke),0<xe.length&&(Ke=new hf(Ke,e,null,l,V),$.push({event:Ke,listeners:xe}),Oe?Ke.data=Oe:(Oe=vf(l),Oe!==null&&(Ke.data=Oe)))),(Oe=Uy?Hy(e,l):qy(e,l))&&(Ke=Hr(L,"onBeforeInput"),0<Ke.length&&(xe=new hf("onBeforeInput","beforeinput",null,l,V),$.push({event:xe,listeners:Ke}),xe.data=Oe)),Dx($,e,L,l,V)}lm($,t)})}function ma(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Hr(e,t){for(var l=t+"Capture",i=[];e!==null;){var s=e,d=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||d===null||(s=Ri(e,l),s!=null&&i.unshift(ma(e,s,d)),s=Ri(e,t),s!=null&&i.push(ma(e,s,d))),e.tag===3)return i;e=e.return}return[]}function Rx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function am(e,t,l,i,s){for(var d=t._reactName,x=[];l!==null&&l!==i;){var S=l,T=S.alternate,L=S.stateNode;if(S=S.tag,T!==null&&T===i)break;S!==5&&S!==26&&S!==27||L===null||(T=L,s?(L=Ri(l,d),L!=null&&x.unshift(ma(l,L,T))):s||(L=Ri(l,d),L!=null&&x.push(ma(l,L,T)))),l=l.return}x.length!==0&&e.push({event:t,listeners:x})}var Lx=/\r\n?/g,Bx=/\u0000|\uFFFD/g;function rm(e){return(typeof e=="string"?e:""+e).replace(Lx,`
49
+ `).replace(Bx,"")}function um(e,t){return t=rm(t),rm(e)===t}function et(e,t,l,i,s,d){switch(l){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Ql(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Ql(e,""+i);break;case"className":Ga(e,"class",i);break;case"tabIndex":Ga(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Ga(e,l,i);break;case"style":uf(e,i,d);break;case"data":if(t!=="object"){Ga(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(l);break}i=Qa(""+i),e.setAttribute(l,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(l==="formAction"?(t!=="input"&&et(e,t,"name",s.name,s,null),et(e,t,"formEncType",s.formEncType,s,null),et(e,t,"formMethod",s.formMethod,s,null),et(e,t,"formTarget",s.formTarget,s,null)):(et(e,t,"encType",s.encType,s,null),et(e,t,"method",s.method,s,null),et(e,t,"target",s.target,s,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(l);break}i=Qa(""+i),e.setAttribute(l,i);break;case"onClick":i!=null&&(e.onclick=wn);break;case"onScroll":i!=null&&Ue("scroll",e);break;case"onScrollEnd":i!=null&&Ue("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(u(61));if(l=i.__html,l!=null){if(s.children!=null)throw Error(u(60));e.innerHTML=l}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}l=Qa(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(l,""+i):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":i===!0?e.setAttribute(l,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(l,i):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(l,i):e.removeAttribute(l);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(l):e.setAttribute(l,i);break;case"popover":Ue("beforetoggle",e),Ue("toggle",e),Ka(e,"popover",i);break;case"xlinkActuate":Tn(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Tn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Tn(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Tn(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Tn(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Tn(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Tn(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Tn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Tn(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":Ka(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=fy.get(l)||l,Ka(e,l,i))}}function mc(e,t,l,i,s,d){switch(l){case"style":uf(e,i,d);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(u(61));if(l=i.__html,l!=null){if(s.children!=null)throw Error(u(60));e.innerHTML=l}}break;case"children":typeof i=="string"?Ql(e,i):(typeof i=="number"||typeof i=="bigint")&&Ql(e,""+i);break;case"onScroll":i!=null&&Ue("scroll",e);break;case"onScrollEnd":i!=null&&Ue("scrollend",e);break;case"onClick":i!=null&&(e.onclick=wn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Io.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),t=l.slice(2,s?l.length-7:void 0),d=e[Rt]||null,d=d!=null?d[l]:null,typeof d=="function"&&e.removeEventListener(t,d,s),typeof i=="function")){typeof d!="function"&&d!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,i,s);break e}l in e?e[l]=i:i===!0?e.setAttribute(l,""):Ka(e,l,i)}}}function wt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ue("error",e),Ue("load",e);var i=!1,s=!1,d;for(d in l)if(l.hasOwnProperty(d)){var x=l[d];if(x!=null)switch(d){case"src":i=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:et(e,t,d,x,l,null)}}s&&et(e,t,"srcSet",l.srcSet,l,null),i&&et(e,t,"src",l.src,l,null);return;case"input":Ue("invalid",e);var S=d=x=s=null,T=null,L=null;for(i in l)if(l.hasOwnProperty(i)){var V=l[i];if(V!=null)switch(i){case"name":s=V;break;case"type":x=V;break;case"checked":T=V;break;case"defaultChecked":L=V;break;case"value":d=V;break;case"defaultValue":S=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(u(137,t));break;default:et(e,t,i,V,l,null)}}nf(e,d,S,T,L,x,s,!1);return;case"select":Ue("invalid",e),i=x=d=null;for(s in l)if(l.hasOwnProperty(s)&&(S=l[s],S!=null))switch(s){case"value":d=S;break;case"defaultValue":x=S;break;case"multiple":i=S;default:et(e,t,s,S,l,null)}t=d,l=x,e.multiple=!!i,t!=null?Vl(e,!!i,t,!1):l!=null&&Vl(e,!!i,l,!0);return;case"textarea":Ue("invalid",e),d=s=i=null;for(x in l)if(l.hasOwnProperty(x)&&(S=l[x],S!=null))switch(x){case"value":i=S;break;case"defaultValue":s=S;break;case"children":d=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(u(91));break;default:et(e,t,x,S,l,null)}af(e,i,s,d);return;case"option":for(T in l)if(l.hasOwnProperty(T)&&(i=l[T],i!=null))switch(T){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:et(e,t,T,i,l,null)}return;case"dialog":Ue("beforetoggle",e),Ue("toggle",e),Ue("cancel",e),Ue("close",e);break;case"iframe":case"object":Ue("load",e);break;case"video":case"audio":for(i=0;i<ha.length;i++)Ue(ha[i],e);break;case"image":Ue("error",e),Ue("load",e);break;case"details":Ue("toggle",e);break;case"embed":case"source":case"link":Ue("error",e),Ue("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(L in l)if(l.hasOwnProperty(L)&&(i=l[L],i!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:et(e,t,L,i,l,null)}return;default:if(Au(t)){for(V in l)l.hasOwnProperty(V)&&(i=l[V],i!==void 0&&mc(e,t,V,i,l,void 0));return}}for(S in l)l.hasOwnProperty(S)&&(i=l[S],i!=null&&et(e,t,S,i,l,null))}function Ux(e,t,l,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,d=null,x=null,S=null,T=null,L=null,V=null;for(q in l){var $=l[q];if(l.hasOwnProperty(q)&&$!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":T=$;default:i.hasOwnProperty(q)||et(e,t,q,null,i,$)}}for(var U in i){var q=i[U];if($=l[U],i.hasOwnProperty(U)&&(q!=null||$!=null))switch(U){case"type":d=q;break;case"name":s=q;break;case"checked":L=q;break;case"defaultChecked":V=q;break;case"value":x=q;break;case"defaultValue":S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(u(137,t));break;default:q!==$&&et(e,t,U,q,i,$)}}Tu(e,x,S,T,L,V,d,s);return;case"select":q=x=S=U=null;for(d in l)if(T=l[d],l.hasOwnProperty(d)&&T!=null)switch(d){case"value":break;case"multiple":q=T;default:i.hasOwnProperty(d)||et(e,t,d,null,i,T)}for(s in i)if(d=i[s],T=l[s],i.hasOwnProperty(s)&&(d!=null||T!=null))switch(s){case"value":U=d;break;case"defaultValue":S=d;break;case"multiple":x=d;default:d!==T&&et(e,t,s,d,i,T)}t=S,l=x,i=q,U!=null?Vl(e,!!l,U,!1):!!i!=!!l&&(t!=null?Vl(e,!!l,t,!0):Vl(e,!!l,l?[]:"",!1));return;case"textarea":q=U=null;for(S in l)if(s=l[S],l.hasOwnProperty(S)&&s!=null&&!i.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:et(e,t,S,null,i,s)}for(x in i)if(s=i[x],d=l[x],i.hasOwnProperty(x)&&(s!=null||d!=null))switch(x){case"value":U=s;break;case"defaultValue":q=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(u(91));break;default:s!==d&&et(e,t,x,s,i,d)}lf(e,U,q);return;case"option":for(var ge in l)if(U=l[ge],l.hasOwnProperty(ge)&&U!=null&&!i.hasOwnProperty(ge))switch(ge){case"selected":e.selected=!1;break;default:et(e,t,ge,null,i,U)}for(T in i)if(U=i[T],q=l[T],i.hasOwnProperty(T)&&U!==q&&(U!=null||q!=null))switch(T){case"selected":e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:et(e,t,T,U,i,q)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Te in l)U=l[Te],l.hasOwnProperty(Te)&&U!=null&&!i.hasOwnProperty(Te)&&et(e,t,Te,null,i,U);for(L in i)if(U=i[L],q=l[L],i.hasOwnProperty(L)&&U!==q&&(U!=null||q!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(u(137,t));break;default:et(e,t,L,U,i,q)}return;default:if(Au(t)){for(var tt in l)U=l[tt],l.hasOwnProperty(tt)&&U!==void 0&&!i.hasOwnProperty(tt)&&mc(e,t,tt,void 0,i,U);for(V in i)U=i[V],q=l[V],!i.hasOwnProperty(V)||U===q||U===void 0&&q===void 0||mc(e,t,V,U,i,q);return}}for(var z in l)U=l[z],l.hasOwnProperty(z)&&U!=null&&!i.hasOwnProperty(z)&&et(e,t,z,null,i,U);for($ in i)U=i[$],q=l[$],!i.hasOwnProperty($)||U===q||U==null&&q==null||et(e,t,$,U,i,q)}function sm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Hx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),i=0;i<l.length;i++){var s=l[i],d=s.transferSize,x=s.initiatorType,S=s.duration;if(d&&S&&sm(x)){for(x=0,S=s.responseEnd,i+=1;i<l.length;i++){var T=l[i],L=T.startTime;if(L>S)break;var V=T.transferSize,$=T.initiatorType;V&&sm($)&&(T=T.responseEnd,x+=V*(T<S?1:(S-L)/(T-L)))}if(--i,t+=8*(d+x)/(s.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var pc=null,gc=null;function qr(e){return e.nodeType===9?e:e.ownerDocument}function cm(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function om(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function yc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var xc=null;function qx(){var e=window.event;return e&&e.type==="popstate"?e===xc?!1:(xc=e,!0):(xc=null,!1)}var fm=typeof setTimeout=="function"?setTimeout:void 0,Yx=typeof clearTimeout=="function"?clearTimeout:void 0,dm=typeof Promise=="function"?Promise:void 0,Kx=typeof queueMicrotask=="function"?queueMicrotask:typeof dm<"u"?function(e){return dm.resolve(null).then(e).catch(Gx)}:fm;function Gx(e){setTimeout(function(){throw e})}function ol(e){return e==="head"}function hm(e,t){var l=t,i=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(i===0){e.removeChild(s),ji(t);return}i--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")i++;else if(l==="html")pa(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,pa(l);for(var d=l.firstChild;d;){var x=d.nextSibling,S=d.nodeName;d[Mi]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&d.rel.toLowerCase()==="stylesheet"||l.removeChild(d),d=x}}else l==="body"&&pa(e.ownerDocument.body);l=s}while(l);ji(t)}function mm(e,t){var l=e;e=0;do{var i=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),i&&i.nodeType===8)if(l=i.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=i}while(l)}function vc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":vc(l),Nu(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Vx(e,t,l,i){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Mi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=on(e.nextSibling),e===null)break}return null}function Qx(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=on(e.nextSibling),e===null))return null;return e}function pm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=on(e.nextSibling),e===null))return null;return e}function bc(e){return e.data==="$?"||e.data==="$~"}function Sc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Xx(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var i=function(){t(),l.removeEventListener("DOMContentLoaded",i)};l.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function on(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var jc=null;function gm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return on(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function ym(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function xm(e,t,l){switch(t=qr(l),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function pa(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Nu(e)}var fn=new Map,vm=new Set;function Yr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Gn=I.d;I.d={f:Zx,r:Fx,D:Jx,C:$x,L:Ix,m:Wx,X:ev,S:Px,M:tv};function Zx(){var e=Gn.f(),t=_r();return e||t}function Fx(e){var t=Yl(e);t!==null&&t.tag===5&&t.type==="form"?Ld(t):Gn.r(e)}var vi=typeof document>"u"?null:document;function bm(e,t,l){var i=vi;if(i&&typeof t=="string"&&t){var s=nn(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),vm.has(s)||(vm.add(s),e={rel:e,crossOrigin:l,href:t},i.querySelector(s)===null&&(t=i.createElement("link"),wt(t,"link",e),bt(t),i.head.appendChild(t)))}}function Jx(e){Gn.D(e),bm("dns-prefetch",e,null)}function $x(e,t){Gn.C(e,t),bm("preconnect",e,t)}function Ix(e,t,l){Gn.L(e,t,l);var i=vi;if(i&&e&&t){var s='link[rel="preload"][as="'+nn(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+nn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+nn(l.imageSizes)+'"]')):s+='[href="'+nn(e)+'"]';var d=s;switch(t){case"style":d=bi(e);break;case"script":d=Si(e)}fn.has(d)||(e=y({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),fn.set(d,e),i.querySelector(s)!==null||t==="style"&&i.querySelector(ga(d))||t==="script"&&i.querySelector(ya(d))||(t=i.createElement("link"),wt(t,"link",e),bt(t),i.head.appendChild(t)))}}function Wx(e,t){Gn.m(e,t);var l=vi;if(l&&e){var i=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+nn(i)+'"][href="'+nn(e)+'"]',d=s;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Si(e)}if(!fn.has(d)&&(e=y({rel:"modulepreload",href:e},t),fn.set(d,e),l.querySelector(s)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ya(d)))return}i=l.createElement("link"),wt(i,"link",e),bt(i),l.head.appendChild(i)}}}function Px(e,t,l){Gn.S(e,t,l);var i=vi;if(i&&e){var s=Kl(i).hoistableStyles,d=bi(e);t=t||"default";var x=s.get(d);if(!x){var S={loading:0,preload:null};if(x=i.querySelector(ga(d)))S.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},l),(l=fn.get(d))&&kc(e,l);var T=x=i.createElement("link");bt(T),wt(T,"link",e),T._p=new Promise(function(L,V){T.onload=L,T.onerror=V}),T.addEventListener("load",function(){S.loading|=1}),T.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Kr(x,t,i)}x={type:"stylesheet",instance:x,count:1,state:S},s.set(d,x)}}}function ev(e,t){Gn.X(e,t);var l=vi;if(l&&e){var i=Kl(l).hoistableScripts,s=Si(e),d=i.get(s);d||(d=l.querySelector(ya(s)),d||(e=y({src:e,async:!0},t),(t=fn.get(s))&&Nc(e,t),d=l.createElement("script"),bt(d),wt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},i.set(s,d))}}function tv(e,t){Gn.M(e,t);var l=vi;if(l&&e){var i=Kl(l).hoistableScripts,s=Si(e),d=i.get(s);d||(d=l.querySelector(ya(s)),d||(e=y({src:e,async:!0,type:"module"},t),(t=fn.get(s))&&Nc(e,t),d=l.createElement("script"),bt(d),wt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},i.set(s,d))}}function Sm(e,t,l,i){var s=(s=he.current)?Yr(s):null;if(!s)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=bi(l.href),l=Kl(s).hoistableStyles,i=l.get(t),i||(i={type:"style",instance:null,count:0,state:null},l.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=bi(l.href);var d=Kl(s).hoistableStyles,x=d.get(e);if(x||(s=s.ownerDocument||s,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,x),(d=s.querySelector(ga(e)))&&!d._p&&(x.instance=d,x.state.loading=5),fn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},fn.set(e,l),d||nv(s,e,l,x.state))),t&&i===null)throw Error(u(528,""));return x}if(t&&i!==null)throw Error(u(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Si(l),l=Kl(s).hoistableScripts,i=l.get(t),i||(i={type:"script",instance:null,count:0,state:null},l.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function bi(e){return'href="'+nn(e)+'"'}function ga(e){return'link[rel="stylesheet"]['+e+"]"}function jm(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function nv(e,t,l,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),wt(t,"link",l),bt(t),e.head.appendChild(t))}function Si(e){return'[src="'+nn(e)+'"]'}function ya(e){return"script[async]"+e}function km(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+nn(l.href)+'"]');if(i)return t.instance=i,bt(i),i;var s=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),bt(i),wt(i,"style",s),Kr(i,l.precedence,e),t.instance=i;case"stylesheet":s=bi(l.href);var d=e.querySelector(ga(s));if(d)return t.state.loading|=4,t.instance=d,bt(d),d;i=jm(l),(s=fn.get(s))&&kc(i,s),d=(e.ownerDocument||e).createElement("link"),bt(d);var x=d;return x._p=new Promise(function(S,T){x.onload=S,x.onerror=T}),wt(d,"link",i),t.state.loading|=4,Kr(d,l.precedence,e),t.instance=d;case"script":return d=Si(l.src),(s=e.querySelector(ya(d)))?(t.instance=s,bt(s),s):(i=l,(s=fn.get(d))&&(i=y({},l),Nc(i,s)),e=e.ownerDocument||e,s=e.createElement("script"),bt(s),wt(s,"link",i),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,Kr(i,l.precedence,e));return t.instance}function Kr(e,t,l){for(var i=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=i.length?i[i.length-1]:null,d=s,x=0;x<i.length;x++){var S=i[x];if(S.dataset.precedence===t)d=S;else if(d!==s)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function kc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Nc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Gr=null;function Nm(e,t,l){if(Gr===null){var i=new Map,s=Gr=new Map;s.set(l,i)}else s=Gr,i=s.get(l),i||(i=new Map,s.set(l,i));if(i.has(e))return i;for(i.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var d=l[s];if(!(d[Mi]||d[kt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var x=d.getAttribute(t)||"";x=e+x;var S=i.get(x);S?S.push(d):i.set(x,[d])}}return i}function Em(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function lv(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Tm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function iv(e,t,l,i){if(l.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=bi(i.href),d=t.querySelector(ga(s));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Vr.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=d,bt(d);return}d=t.ownerDocument||t,i=jm(i),(s=fn.get(s))&&kc(i,s),d=d.createElement("link"),bt(d);var x=d;x._p=new Promise(function(S,T){x.onload=S,x.onerror=T}),wt(d,"link",i),l.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Vr.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Ec=0;function av(e,t){return e.stylesheets&&e.count===0&&Xr(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var i=setTimeout(function(){if(e.stylesheets&&Xr(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&Ec===0&&(Ec=62500*Hx());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xr(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Ec?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(s)}}:null}function Vr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qr=null;function Xr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qr=new Map,t.forEach(rv,e),Qr=null,Vr.call(e))}function rv(e,t){if(!(t.state.loading&4)){var l=Qr.get(e);if(l)var i=l.get(null);else{l=new Map,Qr.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<s.length;d++){var x=s[d];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(l.set(x.dataset.precedence,x),i=x)}i&&l.set(null,i)}s=t.instance,x=s.getAttribute("data-precedence"),d=l.get(x)||i,d===i&&l.set(null,s),l.set(x,s),this.count++,i=Vr.bind(this),s.addEventListener("load",i),s.addEventListener("error",i),d?d.parentNode.insertBefore(s,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var xa={$$typeof:Y,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function uv(e,t,l,i,s,d,x,S,T){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=bu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bu(0),this.hiddenUpdates=bu(null),this.identifierPrefix=i,this.onUncaughtError=s,this.onCaughtError=d,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function wm(e,t,l,i,s,d,x,S,T,L,V,$){return e=new uv(e,t,l,x,T,L,V,$,S),t=1,d===!0&&(t|=24),d=Zt(3,null,null,t),e.current=d,d.stateNode=e,t=is(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:i,isDehydrated:l,cache:t},ss(d),e}function Am(e){return e?(e=Wl,e):Wl}function Cm(e,t,l,i,s,d){s=Am(s),i.context===null?i.context=s:i.pendingContext=s,i=Pn(t),i.payload={element:l},d=d===void 0?null:d,d!==null&&(i.callback=d),l=el(e,i,t),l!==null&&(Yt(l,e,t),$i(l,e,t))}function zm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Tc(e,t){zm(e,t),(e=e.alternate)&&zm(e,t)}function Dm(e){if(e.tag===13||e.tag===31){var t=kl(e,67108864);t!==null&&Yt(t,e,67108864),Tc(e,67108864)}}function _m(e){if(e.tag===13||e.tag===31){var t=Wt();t=Su(t);var l=kl(e,t);l!==null&&Yt(l,e,t),Tc(e,t)}}var Zr=!0;function sv(e,t,l,i){var s=D.T;D.T=null;var d=I.p;try{I.p=2,wc(e,t,l,i)}finally{I.p=d,D.T=s}}function cv(e,t,l,i){var s=D.T;D.T=null;var d=I.p;try{I.p=8,wc(e,t,l,i)}finally{I.p=d,D.T=s}}function wc(e,t,l,i){if(Zr){var s=Ac(i);if(s===null)hc(e,t,i,Fr,l),Om(e,i);else if(fv(s,e,t,l,i))i.stopPropagation();else if(Om(e,i),t&4&&-1<ov.indexOf(e)){for(;s!==null;){var d=Yl(s);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var x=xl(d.pendingLanes);if(x!==0){var S=d;for(S.pendingLanes|=2,S.entangledLanes|=2;x;){var T=1<<31-nt(x);S.entanglements[1]|=T,x&=~T}Sn(d),($e&6)===0&&(zr=Ae()+500,da(0))}}break;case 31:case 13:S=kl(d,2),S!==null&&Yt(S,d,2),_r(),Tc(d,2)}if(d=Ac(i),d===null&&hc(e,t,i,Fr,l),d===s)break;s=d}s!==null&&i.stopPropagation()}else hc(e,t,i,null,l)}}function Ac(e){return e=zu(e),Cc(e)}var Fr=null;function Cc(e){if(Fr=null,e=ql(e),e!==null){var t=h(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=f(t),e!==null)return e;e=null}else if(l===31){if(e=p(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Fr=e,null}function Mm(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Je()){case H:return 2;case ie:return 8;case Se:case De:return 32;case qe:return 268435456;default:return 32}default:return 32}}var zc=!1,fl=null,dl=null,hl=null,va=new Map,ba=new Map,ml=[],ov="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".split(" ");function Om(e,t){switch(e){case"focusin":case"focusout":fl=null;break;case"dragenter":case"dragleave":dl=null;break;case"mouseover":case"mouseout":hl=null;break;case"pointerover":case"pointerout":va.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ba.delete(t.pointerId)}}function Sa(e,t,l,i,s,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:l,eventSystemFlags:i,nativeEvent:d,targetContainers:[s]},t!==null&&(t=Yl(t),t!==null&&Dm(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function fv(e,t,l,i,s){switch(t){case"focusin":return fl=Sa(fl,e,t,l,i,s),!0;case"dragenter":return dl=Sa(dl,e,t,l,i,s),!0;case"mouseover":return hl=Sa(hl,e,t,l,i,s),!0;case"pointerover":var d=s.pointerId;return va.set(d,Sa(va.get(d)||null,e,t,l,i,s)),!0;case"gotpointercapture":return d=s.pointerId,ba.set(d,Sa(ba.get(d)||null,e,t,l,i,s)),!0}return!1}function Rm(e){var t=ql(e.target);if(t!==null){var l=h(t);if(l!==null){if(t=l.tag,t===13){if(t=f(l),t!==null){e.blockedOn=t,Fo(e.priority,function(){_m(l)});return}}else if(t===31){if(t=p(l),t!==null){e.blockedOn=t,Fo(e.priority,function(){_m(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Jr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Ac(e.nativeEvent);if(l===null){l=e.nativeEvent;var i=new l.constructor(l.type,l);Cu=i,l.target.dispatchEvent(i),Cu=null}else return t=Yl(l),t!==null&&Dm(t),e.blockedOn=l,!1;t.shift()}return!0}function Lm(e,t,l){Jr(e)&&l.delete(t)}function dv(){zc=!1,fl!==null&&Jr(fl)&&(fl=null),dl!==null&&Jr(dl)&&(dl=null),hl!==null&&Jr(hl)&&(hl=null),va.forEach(Lm),ba.forEach(Lm)}function $r(e,t){e.blockedOn===t&&(e.blockedOn=null,zc||(zc=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,dv)))}var Ir=null;function Bm(e){Ir!==e&&(Ir=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ir===e&&(Ir=null);for(var t=0;t<e.length;t+=3){var l=e[t],i=e[t+1],s=e[t+2];if(typeof i!="function"){if(Cc(i||l)===null)continue;break}var d=Yl(l);d!==null&&(e.splice(t,3),t-=3,As(d,{pending:!0,data:s,method:l.method,action:i},i,s))}}))}function ji(e){function t(T){return $r(T,e)}fl!==null&&$r(fl,e),dl!==null&&$r(dl,e),hl!==null&&$r(hl,e),va.forEach(t),ba.forEach(t);for(var l=0;l<ml.length;l++){var i=ml[l];i.blockedOn===e&&(i.blockedOn=null)}for(;0<ml.length&&(l=ml[0],l.blockedOn===null);)Rm(l),l.blockedOn===null&&ml.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(i=0;i<l.length;i+=3){var s=l[i],d=l[i+1],x=s[Rt]||null;if(typeof d=="function")x||Bm(l);else if(x){var S=null;if(d&&d.hasAttribute("formAction")){if(s=d,x=d[Rt]||null)S=x.formAction;else if(Cc(s)!==null)continue}else S=x.action;typeof S=="function"?l[i+1]=S:(l.splice(i,3),i-=3),Bm(l)}}}function Um(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(x){return s=x})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),i||setTimeout(l,20)}function l(){if(!i&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Dc(e){this._internalRoot=e}Wr.prototype.render=Dc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var l=t.current,i=Wt();Cm(l,i,e,t,null,null)},Wr.prototype.unmount=Dc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Cm(e.current,2,null,e,null,null),_r(),t[Hl]=null}};function Wr(e){this._internalRoot=e}Wr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Zo();e={blockedOn:null,target:e,priority:t};for(var l=0;l<ml.length&&t!==0&&t<ml[l].priority;l++);ml.splice(l,0,e),l===0&&Rm(e)}};var Hm=a.version;if(Hm!=="19.2.5")throw Error(u(527,Hm,"19.2.5"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=m(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var hv={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pr.isDisabled&&Pr.supportsFiber)try{Dt=Pr.inject(hv),xt=Pr}catch{}}return ka.createRoot=function(e,t){if(!o(e))throw Error(u(299));var l=!1,i="",s=Xd,d=Zd,x=Fd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=wm(e,1,!1,null,null,l,i,null,s,d,x,Um),e[Hl]=t.current,dc(e),new Dc(t)},ka.hydrateRoot=function(e,t,l){if(!o(e))throw Error(u(299));var i=!1,s="",d=Xd,x=Zd,S=Fd,T=null;return l!=null&&(l.unstable_strictMode===!0&&(i=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(d=l.onUncaughtError),l.onCaughtError!==void 0&&(x=l.onCaughtError),l.onRecoverableError!==void 0&&(S=l.onRecoverableError),l.formState!==void 0&&(T=l.formState)),t=wm(e,1,!0,t,l??null,i,s,T,d,x,S,Um),t.context=Am(null),l=t.current,i=Wt(),i=Su(i),s=Pn(i),s.callback=null,el(l,s,i),l=i,t.current.lanes=l,_i(t,l),Sn(t),e[Hl]=t.current,dc(e),new Wr(t)},ka.version="19.2.5",ka}var Jm;function Nv(){if(Jm)return Oc.exports;Jm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Oc.exports=kv(),Oc.exports}var Ev=Nv();const Tv=hu(Ev),Uc={none:"",gemini:"gemini-2.5-flash",openai:"gpt-4o-mini",anthropic:"claude-haiku-3-5","claude-cli":"sonnet"},wv={none:[],gemini:["gemini-2.5-flash","gemini-2.5-pro","gemini-2.0-flash"],openai:["gpt-4o-mini","gpt-4o","gpt-4.1","o1"],anthropic:["claude-haiku-3-5","claude-sonnet-4","claude-sonnet-4-5","claude-opus-4"],"claude-cli":["sonnet","opus","haiku"]},$m={none:"선택하지 않음",anthropic:"Anthropic (Claude API)",openai:"OpenAI (GPT)",gemini:"Google (Gemini)","claude-cli":"Claude Code CLI (subprocess)"},Na={neoul:"너울"},Av=[{id:"subscriptions",label:"구독",meta:"트레이더 추가/해제",icon:"👥"},{id:"llm",label:"AI 모델",meta:"Claude · Gemini · GPT",icon:"🤖"},{id:"broker",label:"증권사",meta:"키움 · KIS",icon:"🏦"},{id:"allocations",label:"자본 배정",meta:"트레이더별 한도",icon:"💰"},{id:"device",label:"디바이스",meta:"성과 동기화 토큰",icon:"📱"},{id:"safety",label:"안전망",meta:"긴급 정지 · halted",icon:"🛡"}];function Cv({onSaved:n,onSafetyChange:a}){var ye;const[r,u]=W.useState("device"),[o,h]=W.useState(null),[f,p]=W.useState(null),[g,m]=W.useState({}),[v,y]=W.useState({halted:!1}),[j,b]=W.useState(null);async function w(Q=!1){try{const[ce,Ve,Le,Xe]=await Promise.all([fetch("/api/config").then(we=>we.json()),fetch(`/api/subscriptions${Q?"?fresh=1":""}`).then(we=>we.json()),fetch("/api/allocations").then(we=>we.json()),fetch("/api/safety").then(we=>we.json())]);h(ce.config),p(Ve),m(Le.allocations??{}),y(Xe)}catch(ce){b({kind:"err",msg:`로드 실패: ${ce}`})}}W.useEffect(()=>{w(!0)},[]),W.useEffect(()=>{if(!j)return;const Q=setTimeout(()=>b(null),5e3);return()=>clearTimeout(Q)},[j]);const[B,K]=W.useState("none"),[C,X]=W.useState(""),[Y,Z]=W.useState(""),[oe,M]=W.useState(!1);W.useEffect(()=>{var Q;o&&(K(o.llm.provider),X(o.llm.provider==="claude-cli"?((Q=o.llm.claudeCli)==null?void 0:Q.model)??"sonnet":o.llm.model??Uc[o.llm.provider]??""),M(!1))},[o]);async function ne(){if(!o)return;const Q={llm:B==="claude-cli"?{provider:B,claudeCli:{model:C}}:{provider:B,model:C||Uc[B],apiKey:Y||void 0}};try{await fetch("/api/config",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(Q)}),await w(!0),Z(""),b({kind:"ok",msg:"AI 모델 설정을 저장했어요."}),n==null||n()}catch(ce){b({kind:"err",msg:`저장 실패: ${ce}`})}}const[me,pe]=W.useState("none"),[O,ae]=W.useState(""),[le,Ee]=W.useState(""),[se,P]=W.useState(!0),[D,I]=W.useState(!1);W.useEffect(()=>{o&&(pe(o.broker.kind),P(o.broker.isDemo),I(!1))},[o]);async function de(){if(!o)return;const Q={broker:{kind:me,appKey:O||void 0,appSecret:le||void 0,isDemo:se}};try{await fetch("/api/config",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(Q)}),await w(!0),ae(""),Ee(""),b({kind:"ok",msg:"증권사 설정을 저장했어요."})}catch(ce){b({kind:"err",msg:`저장 실패: ${ce}`})}}const[ee,E]=W.useState(""),[N,_]=W.useState(!1);async function k(){if(!o)return;const Q={auth:{deviceToken:ee||void 0}};try{await fetch("/api/config",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(Q)}),await w(!0),E(""),_(!1),b({kind:"ok",msg:"디바이스 토큰을 저장했어요."})}catch(ce){b({kind:"err",msg:`저장 실패: ${ce}`})}}async function G(){if(window.confirm("디바이스 토큰을 제거할까요? 구독 캐시도 함께 비워지고, 다시 입력하기 전까지 자율 사이클이 멈춥니다."))try{await fetch("/api/auth/device-token",{method:"DELETE"}),await w(!0),E(""),_(!1),b({kind:"ok",msg:"디바이스 토큰을 제거했어요."})}catch(Q){b({kind:"err",msg:`제거 실패: ${Q}`})}}async function fe(){if(window.confirm("증권사 자격증명을 제거할까요? AppKey · SecretKey 가 모두 삭제됩니다."))try{await fetch("/api/broker",{method:"DELETE"}),await w(!0),ae(""),Ee(""),I(!1),b({kind:"ok",msg:"증권사 자격증명을 제거했어요."})}catch(Q){b({kind:"err",msg:`제거 실패: ${Q}`})}}async function he(){if(window.confirm("LLM 설정을 제거할까요? Provider · API Key · 모델이 모두 초기값으로 돌아갑니다."))try{await fetch("/api/llm",{method:"DELETE"}),await w(!0),Z(""),M(!1),b({kind:"ok",msg:"LLM 설정을 제거했어요."})}catch(Q){b({kind:"err",msg:`제거 실패: ${Q}`})}}async function ke(){if(!window.confirm(`🛑 로컬 데이터를 모두 삭제할까요?
50
+
51
+ 삭제 대상:
52
+ - config.json (모든 자격증명)
53
+ - personas (페르소나 상태)
54
+ - watchers.db (감시자)
55
+ - diary, trade-journal (일기·거래기록)
56
+ - logs
57
+
58
+ 복구 불가능합니다.`))return;if(window.prompt("정말 진행하려면 다음 문구를 그대로 입력해주세요: RESET-MY-LOCAL-DATA")!=="RESET-MY-LOCAL-DATA"){b({kind:"err",msg:"확인 문구가 다릅니다. 초기화 취소."});return}try{const Le=await(await fetch("/api/local/reset",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({confirm:"RESET-MY-LOCAL-DATA"})})).json();if(!Le.ok)throw new Error(Le.error??"unknown");await w(!0),b({kind:"ok",msg:`로컬 데이터 초기화 완료. 삭제: ${(Le.removed??[]).join(", ")}. 클라이언트 재시작 권장.`})}catch(Ve){b({kind:"err",msg:`초기화 실패: ${Ve}`})}}const[Me,Ce]=W.useState({});async function ue(Q){const ce=Number(Me[Q]??0);if(!Number.isFinite(ce)||ce<0){b({kind:"err",msg:"0 이상 정수만 입력할 수 있어요."});return}try{await fetch("/api/allocations",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({slug:Q,krw:ce})}),await w(),Ce(Ve=>({...Ve,[Q]:""})),b({kind:"ok",msg:`${Na[Q]??Q} 자본을 ${ce.toLocaleString()}원으로 설정했어요.`})}catch(Ve){b({kind:"err",msg:`저장 실패: ${Ve}`})}}async function F(Q){if(window.confirm(`${Na[Q]??Q} 자본 배정을 해제하시겠어요?`))try{await fetch(`/api/allocations/${Q}`,{method:"DELETE"}),await w(),b({kind:"ok",msg:`${Na[Q]??Q} 자본 배정을 해제했어요.`})}catch(ce){b({kind:"err",msg:`삭제 실패: ${ce}`})}}async function ve(){const Q=!v.halted;if(!(Q&&!window.confirm("긴급 정지를 활성화하시겠어요? 모든 자동 거래가 즉시 차단됩니다.")))try{await fetch(Q?"/api/safety/halt":"/api/safety/resume",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({reason:Q?"사용자 수동 (Setup)":""})}),y({halted:Q}),a==null||a(Q),b({kind:"ok",msg:Q?"긴급 정지를 활성화했어요.":"정지를 해제했어요."})}catch(ce){b({kind:"err",msg:`safety toggle 실패: ${ce}`})}}if(!o)return c.jsx("div",{className:"empty",children:"로드 중..."});const te=!!o.auth.userId,be=Q=>!te&&Q!=="device"&&Q!=="safety";return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"setup-grid",children:[c.jsx("aside",{className:"setup-nav glass",children:Av.map(Q=>{const ce=be(Q.id);return c.jsxs("button",{className:`${r===Q.id?"is-active":""}${ce?" is-disabled":""}`,onClick:()=>{if(ce){b({kind:"err",msg:"먼저 「디바이스」 탭에서 토큰을 입력해 로그인하세요."}),u("device");return}u(Q.id),b(null)},disabled:ce,style:ce?{opacity:.4,cursor:"not-allowed"}:void 0,title:ce?"로그인 후 사용 가능":void 0,children:[c.jsx("span",{className:"nav-icon","aria-hidden":!0,children:Q.icon}),c.jsxs("span",{className:"nav-text",children:[c.jsxs("span",{children:[Q.label,ce?" 🔒":""]}),c.jsx("span",{className:"nav-meta",children:ce?"로그인 후":Q.meta})]})]},Q.id)})}),c.jsxs("div",{className:"setup-section glass-lg",children:[c.jsxs("div",{className:"banner",style:{position:"static",marginBottom:"var(--sp-4)",background:o.auth.userEmail?"var(--gain-soft)":"var(--surface)",color:o.auth.userEmail?"var(--gain)":"var(--ink-mute)",border:`1px solid ${o.auth.userEmail?"var(--gain)":"var(--border)"}`,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsx("span",{children:o.auth.userEmail?c.jsxs(c.Fragment,{children:["✓ 인증된 user: ",c.jsx("strong",{children:o.auth.userEmail})]}):o.auth.deviceToken?c.jsx(c.Fragment,{children:"⏳ 인증 중 (토큰 등록됨, server 응답 대기)"}):c.jsx(c.Fragment,{children:"👤 인증되지 않음 — 「디바이스」 탭에서 토큰을 입력하세요"})}),o.auth.userEmail&&c.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-mute)"},children:"user-scoped LOCAL data 격리됨"})]}),!!o.auth.deviceToken&&f&&f.lastSync&&!f.authenticated&&!f.error&&c.jsxs("div",{className:"banner danger",style:{position:"static",marginBottom:"var(--sp-4)"},children:["🛑 디바이스 토큰 인증 실패 — 서버가 토큰을 거부했어요. dashboard 에서 토큰이 revoke 됐거나 만료됐을 수 있어요. 「디바이스」 탭에서 토큰을 제거 후 다시 발급받아 입력해주세요.",c.jsx("br",{}),c.jsx("span",{style:{fontSize:"var(--fs-xs)"},children:"※ subscriptions 캐시가 비워졌으니 자율 사이클은 멈춥니다."})]}),j&&c.jsxs("div",{className:`banner ${j.kind==="ok"?"success":"danger"}`,children:[j.kind==="ok"?"✓ ":"⚠ ",j.msg]}),r==="subscriptions"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"setup-form",children:[c.jsx("h2",{children:"구독한 트레이더"}),c.jsxs("p",{className:"lead",children:["mulsok-traders.vercel.app 에서 트레이더를 구독하면 이곳에 표시됩니다.",(f==null?void 0:f.userEmail)&&c.jsxs(c.Fragment,{children:[" 현재 로그인: ",c.jsx("strong",{children:f.userEmail})]})]}),!(f!=null&&f.authenticated)&&c.jsx("div",{className:"banner warn",style:{position:"static",marginBottom:"var(--sp-5)"},children:"⚠ 디바이스 토큰이 없거나 인증되지 않았어요. 「디바이스」 탭에서 토큰을 입력해주세요."}),(f==null?void 0:f.error)&&c.jsx("div",{className:"banner danger",style:{position:"static",marginBottom:"var(--sp-5)"},children:f.error}),!(f!=null&&f.subscriptions)||f.subscriptions.length===0?c.jsx("div",{className:"empty",children:"구독한 트레이더가 없어요."}):c.jsx("div",{className:"sub-list",children:f.subscriptions.map(Q=>{var Xe;const ce=(Xe=f.details)==null?void 0:Xe.find(we=>we.persona_slug===Q),Ve=Na[Q]??Q,Le=(ce==null?void 0:ce.status)==="live";return c.jsxs("div",{className:"sub-row",children:[c.jsx("div",{className:"avatar",children:Ve.slice(0,1)}),c.jsxs("div",{className:"info",children:[c.jsxs("div",{className:"name",children:[(ce==null?void 0:ce.persona_name)??Ve,(ce==null?void 0:ce.prompt_version)&&c.jsxs("span",{className:"ver",children:["v",ce.prompt_version]})]}),c.jsxs("div",{className:"meta",children:["slug: ",Q]})]}),c.jsx("span",{className:`status ${Le?"":"idle"}`,children:(ce==null?void 0:ce.status)??"—"})]},Q)})})]}),c.jsxs("div",{className:"save-bar",children:[c.jsxs("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-mute)"},children:[((ye=f==null?void 0:f.subscriptions)==null?void 0:ye.length)??0,"명 구독 중"]}),c.jsx("span",{className:"spacer"}),c.jsx("button",{className:"btn ghost",onClick:()=>void w(!0),children:"↻ 서버에서 다시 가져오기"})]})]}),r==="llm"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"setup-form",children:[c.jsx("h2",{children:"AI 모델"}),c.jsx("p",{className:"lead",children:"트레이더가 의사결정에 사용할 LLM. 답변 길이 제한 없음 (각 모델의 최대 출력 토큰까지)."}),c.jsxs("div",{className:"field-group",children:[c.jsxs("div",{className:"group-head",children:[c.jsx("span",{className:"group-title",children:"Provider"}),o.llm.provider!=="none"&&o.llm.provider!=="claude-cli"&&o.llm.apiKey&&c.jsxs("span",{className:"group-meta",children:["키 저장됨 · ",o.llm.apiKey]})]}),c.jsxs("div",{className:"field",children:[c.jsx("label",{className:"field-label",children:"제공자"}),c.jsx("select",{value:B,onChange:Q=>{const ce=Q.target.value;K(ce),X(Uc[ce]??""),M(!0)},children:Object.keys($m).map(Q=>c.jsx("option",{value:Q,children:$m[Q]},Q))})]}),c.jsxs("div",{className:"field",children:[c.jsx("label",{className:"field-label",children:"모델"}),c.jsx("select",{value:C,onChange:Q=>{X(Q.target.value),M(!0)},disabled:B==="none",children:B==="none"?c.jsx("option",{children:"제공자를 먼저 선택해주세요"}):wv[B].map(Q=>c.jsx("option",{value:Q,children:Q},Q))}),c.jsx("span",{className:"field-hint",children:B==="claude-cli"?"subprocess 로 실행됩니다. 30분 timeout · CLAUDE_CLI_TIMEOUT_SEC env 로 조정 가능.":"선택한 모델의 최대 출력 토큰까지 응답합니다. 잘리면 자동 감지되어 일지에 기록됩니다."})]}),B!=="none"&&B!=="claude-cli"&&c.jsxs("div",{className:"field",style:{marginBottom:0},children:[c.jsx("label",{className:"field-label",children:"API Key"}),c.jsx("input",{type:"password",placeholder:o.llm.apiKey?`저장됨 (${o.llm.apiKey})`:"sk-...",value:Y,onChange:Q=>{Z(Q.target.value),M(!0)}}),c.jsx("span",{className:"field-hint",children:"키는 ~/.mulsok-traders/config.json 에 0600 권한으로만 저장됩니다 (서버 송신 X)."})]})]})]}),c.jsxs("div",{className:"save-bar",children:[oe&&c.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--warn)"},children:"● 변경 사항이 있어요"}),c.jsx("span",{className:"spacer"}),(o.llm.provider!=="none"||o.llm.apiKey)&&c.jsx("button",{className:"btn danger",onClick:()=>void he(),children:"제거"}),c.jsx("button",{className:"btn primary",onClick:()=>void ne(),disabled:!oe,children:"저장"})]})]}),r==="broker"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"setup-form",children:[c.jsx("h2",{children:"증권사 연동"}),c.jsx("p",{className:"lead",children:"자동 거래용 자격증명. 모든 키는 PC 에만 저장되며 서버로 송신되지 않습니다."}),c.jsxs("div",{className:"field-group",children:[c.jsx("div",{className:"group-head",children:c.jsx("span",{className:"group-title",children:"증권사 선택"})}),c.jsxs("div",{className:"field",style:{marginBottom:0},children:[c.jsx("label",{className:"field-label",children:"제공자"}),c.jsxs("select",{value:me,onChange:Q=>{pe(Q.target.value),I(!0)},children:[c.jsx("option",{value:"none",children:"선택하지 않음"}),c.jsx("option",{value:"kiwoom",children:"키움증권 (REST + WS)"}),c.jsx("option",{value:"kis",disabled:!0,children:"한국투자증권 KIS (예정)"})]})]})]}),me==="kiwoom"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"field-group",children:[c.jsxs("div",{className:"group-head",children:[c.jsx("span",{className:"group-title",children:"키움 자격증명"}),(o.broker.appKey||o.broker.appSecret)&&c.jsx("span",{className:"group-meta",children:"저장됨"})]}),c.jsxs("div",{className:"field-row",children:[c.jsxs("div",{className:"field",style:{marginBottom:0},children:[c.jsx("label",{className:"field-label",children:"AppKey"}),c.jsx("input",{type:"password",placeholder:o.broker.appKey?`저장됨 (${o.broker.appKey})`:"AppKey",value:O,onChange:Q=>{ae(Q.target.value),I(!0)}})]}),c.jsxs("div",{className:"field",style:{marginBottom:0},children:[c.jsx("label",{className:"field-label",children:"SecretKey"}),c.jsx("input",{type:"password",placeholder:o.broker.appSecret?`저장됨 (${o.broker.appSecret})`:"SecretKey",value:le,onChange:Q=>{Ee(Q.target.value),I(!0)}})]})]})]}),c.jsxs("div",{className:"toggle-row",children:[c.jsxs("div",{children:[c.jsx("div",{className:"label",children:"모의투자 모드"}),c.jsx("div",{className:"label-meta",children:se?"✅ ON · 가짜 자금 안전 거래":"🔴 OFF · 실전 · 실제 주문 발생"})]}),c.jsxs("label",{className:"toggle",children:[c.jsx("input",{type:"checkbox",checked:se,onChange:Q=>{P(Q.target.checked),I(!0)}}),c.jsx("span",{className:"slider"})]})]})]})]}),c.jsxs("div",{className:"save-bar",children:[D&&c.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--warn)"},children:"● 변경 사항이 있어요"}),c.jsx("span",{className:"spacer"}),(o.broker.kind!=="none"||o.broker.appKey||o.broker.appSecret)&&c.jsx("button",{className:"btn danger",onClick:()=>void fe(),children:"제거"}),c.jsx("button",{className:"btn primary",onClick:()=>void de(),disabled:!D,children:"저장"})]})]}),r==="allocations"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"setup-form",style:{maxWidth:760},children:[c.jsx("h2",{children:"자본 배정"}),c.jsxs("p",{className:"lead",children:["트레이더별 운용 한도 (KRW). ",c.jsx("strong",{children:"미설정 시 키움 계좌의 예수금 전체 (MAX)"}),"가 자동으로 한도가 됩니다. 자기 보유 평가액 + 신규 매수액이 한도를 넘으면 자동 차단 (capital_exceeded). 다른 트레이더의 보유는 영향 없음 — 트레이더별 격리."]}),!(f!=null&&f.subscriptions)||f.subscriptions.length===0?c.jsx("div",{className:"empty",children:"먼저 트레이더를 구독해주세요."}):c.jsx("div",{className:"alloc-list",children:f.subscriptions.map(Q=>{const ce=g[Q]??0;return c.jsxs("div",{className:"alloc-row",children:[c.jsx("span",{className:"slug",children:Na[Q]??Q}),c.jsxs("span",{className:"name",children:["현재: ",c.jsx("strong",{className:"num",children:ce>0?`${ce.toLocaleString()}원`:"자동 (예수금 전체)"})]}),c.jsx("input",{type:"number",placeholder:"새 한도 (원)",value:Me[Q]??"",onChange:Ve=>Ce(Le=>({...Le,[Q]:Ve.target.value}))}),c.jsxs("div",{className:"actions",children:[c.jsx("button",{className:"btn primary sm",onClick:()=>void ue(Q),disabled:!Me[Q],children:"저장"}),ce>0&&c.jsx("button",{className:"btn danger sm",onClick:()=>void F(Q),children:"해제"})]})]},Q)})})]}),c.jsx("div",{className:"save-bar",children:c.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-mute)"},children:"각 트레이더별로 개별 저장하세요"})})]}),r==="device"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"setup-form",children:[c.jsx("h2",{children:"디바이스 토큰"}),c.jsx("p",{className:"lead",children:"mulsok-traders.vercel.app 에서 발급받은 토큰. 구독한 트레이더 목록과 성과를 동기화합니다."}),c.jsxs("div",{className:"field-group",children:[c.jsxs("div",{className:"group-head",children:[c.jsx("span",{className:"group-title",children:"동기화 토큰"}),o.auth.deviceToken&&c.jsxs("span",{className:"group-meta",children:["저장됨 · ",o.auth.deviceToken]})]}),c.jsxs("div",{className:"field",style:{marginBottom:0},children:[c.jsx("label",{className:"field-label",children:"Device Token"}),c.jsx("input",{type:"password",placeholder:o.auth.deviceToken?`저장됨 (${o.auth.deviceToken})`:"mtd_...",value:ee,onChange:Q=>{E(Q.target.value),_(!0)}}),c.jsx("span",{className:"field-hint",children:"토큰은 ~/.mulsok-traders/config.json 에 저장됩니다 · mtd_ 접두로 시작."})]})]})]}),c.jsxs("div",{className:"save-bar",children:[N&&c.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--warn)"},children:"● 변경 사항이 있어요"}),c.jsx("span",{className:"spacer"}),o.auth.deviceToken&&c.jsx("button",{className:"btn danger",onClick:()=>void G(),children:"제거"}),c.jsx("button",{className:"btn primary",onClick:()=>void k(),disabled:!N,children:"저장"})]})]}),r==="safety"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"setup-form",children:[c.jsx("h2",{children:"안전망 · 긴급 정지"}),c.jsx("p",{className:"lead",children:"긴급 정지를 켜면 LLM 호출 · 주문 실행 · 감시자 발화가 모두 즉시 차단됩니다. 해제하기 전까지 자동 거래가 일어나지 않습니다."}),c.jsx("div",{className:"banner",style:{position:"static",background:v.halted?"var(--loss-soft)":"var(--gain-soft)",color:v.halted?"var(--loss)":"var(--gain)",marginBottom:"var(--sp-5)"},children:v.halted?"🛑 현재 긴급 정지 중 · 자동 거래 모두 차단":"✅ 정상 가동 중 · 자율 사이클 동작"}),c.jsxs("div",{className:"toggle-row",children:[c.jsxs("div",{children:[c.jsx("div",{className:"label",children:v.halted?"정지 해제하기":"지금 긴급 정지하기"}),c.jsx("div",{className:"label-meta",children:v.halted?"토글을 해제하면 자동 거래가 다시 시작됩니다.":"한 번 누르면 모든 자동 거래가 즉시 멈춥니다."})]}),c.jsxs("label",{className:`toggle ${v.halted?"danger":""}`,children:[c.jsx("input",{type:"checkbox",checked:v.halted,onChange:()=>void ve()}),c.jsx("span",{className:"slider"})]})]}),c.jsxs("div",{className:"field-hint",style:{marginTop:"var(--sp-5)",padding:"var(--sp-4) var(--sp-5)",background:"var(--glass)",borderRadius:"var(--r-lg)"},children:[c.jsx("strong",{style:{color:"var(--ink-700)"},children:"SPEC-26 안전 코드 9종"})," 가운데 사용자가 직접 토글하는 항목입니다 · halted · market_closed · weekend · invalid_symbol · invalid_quantity · invalid_price · duplicate_order · no_allocation · capital_exceeded · broker_not_configured 의 「halted」 직접 제어."]}),c.jsxs("div",{style:{marginTop:"var(--sp-8)",padding:"var(--sp-5)",border:"1px solid var(--loss)",borderRadius:"var(--r-lg)",background:"var(--loss-soft)"},children:[c.jsx("h3",{style:{marginTop:0,color:"var(--loss)"},children:"⚠ 위험 영역 — 로컬 전체 초기화"}),c.jsxs("p",{style:{fontSize:"var(--fs-sm)",color:"var(--ink-700)"},children:["~/.mulsok-traders/ 의 모든 사용자 데이터 (config · 페르소나 상태 · watcher · 일기 · 거래 기록 · 로그) 를 삭제합니다. ",c.jsx("strong",{children:"복구 불가"}),". 처음부터 onboarding 을 다시 검증할 때만 사용하세요."]}),c.jsx("button",{className:"btn danger",onClick:()=>void ke(),children:"🗑 로컬 데이터 모두 삭제"})]})]}),c.jsx("div",{className:"save-bar",children:c.jsx("span",{style:{fontSize:"var(--fs-xs)",color:"var(--ink-mute)"},children:"토글 즉시 적용됩니다 (저장 버튼 없음)"})})]})]})]}),c.jsx("div",{className:"disclaimer",children:"본 소프트웨어는 트레이딩 로직 라이선스 + 소프트웨어 공급 모델로 제공됩니다. 거래 의사결정과 실행은 사용자의 책임이며, 본 소프트웨어는 투자 자문 · 투자 일임 · 수익 보장을 제공하지 않습니다. 원금 손실의 위험이 있습니다."})]})}function mu({open:n,onClose:a,title:r,headerExtra:u,size:o="default",children:h}){const f=W.useRef(null);return W.useEffect(()=>{var m;if(!n)return;const p=v=>{v.key==="Escape"&&a()};document.addEventListener("keydown",p);const g=document.body.style.overflow;return document.body.style.overflow="hidden",(m=f.current)==null||m.focus(),()=>{document.removeEventListener("keydown",p),document.body.style.overflow=g}},[n,a]),n?c.jsx("div",{className:"modal-overlay",role:"presentation",onClick:p=>{p.target===p.currentTarget&&a()},children:c.jsxs("div",{ref:f,className:`modal-dialog ${o==="wide"?"is-wide":""}`,role:"dialog","aria-modal":"true","aria-label":typeof r=="string"?r:void 0,tabIndex:-1,children:[(r||u)&&c.jsxs("header",{className:"modal-head",children:[c.jsx("div",{className:"modal-title",children:r}),c.jsxs("div",{className:"modal-head-actions",children:[u,c.jsx("button",{type:"button",className:"modal-close",onClick:a,"aria-label":"닫기",children:"✕"})]})]}),c.jsx("div",{className:"modal-body",children:h})]})}):null}function Zp({state:n,decisionAt:a,screenedAt:r,dataAsOf:u,priceLines:o=[]}){if(!n||n.loading)return c.jsx("div",{className:"candle-chart loading",children:c.jsxs("span",{className:"msg",children:["일봉 불러오는 중",c.jsx("span",{className:"dots-loading"})]})});if(n.error){const F=n.error==="broker:not_configured";return c.jsx("div",{className:"candle-chart empty",children:c.jsx("span",{className:"msg",children:F?"키움 증권사가 설정되지 않아 일봉을 표시할 수 없어요.":`일봉 로드 실패 · ${n.error}`})})}const h=n.data??[];if(h.length<2)return c.jsx("div",{className:"candle-chart empty",children:c.jsx("span",{className:"msg",children:"표시할 일봉이 부족해요."})});const f=800,p=200,g=50,m=8,v=8,y=60,j=8,w=p+m+g+j+22,K=(f-v-y)/h.length,C=Math.max(2,K*.65),X=h.map(F=>F.highKrw),Y=h.map(F=>F.lowKrw),Z=o.map(F=>F.value).filter(F=>Number.isFinite(F)&&F>0),oe=Math.max(...X,...Z),M=Math.min(...Y,...Z.length>0?Z:X),me=(oe-M||1)*.05,pe=oe+me,O=Math.max(0,M-me),ae=pe-O||1,le=F=>j+p*(1-(F-O)/ae),Ee=Math.max(...h.map(F=>F.volume),1),se=j+p+m+g,P=F=>F/Ee*g;function D(F){return h.map((ve,te)=>{if(te<F-1)return null;const ye=h.slice(te-F+1,te+1).reduce((ce,Ve)=>ce+Ve.closeKrw,0)/F;return[v+K*(te+.5),le(ye)]})}const I=D(5),de=D(20);function ee(F){let ve=!1,te="";for(const be of F){if(!be){ve=!1;continue}te+=(ve?" L ":"M ")+be[0]+" "+be[1],ve=!0}return te}function E(F){return F.length<8?F:`${F.slice(4,6)}-${F.slice(6,8)}`}const N=[0,Math.floor(h.length/2),h.length-1];function _(F){return F>=1e6?`${(F/1e4).toFixed(0)}만`:F.toLocaleString("ko-KR")}function k(F){let ve=-1,te=-1;for(let be=0;be<h.length;be++){if(h[be].date===F){ve=be;break}h[be].date<=F&&(te=be)}return ve>=0?ve:te>=0?te:null}function G(F){if(!F)return null;const ve=new Date(F);if(Number.isNaN(ve.getTime()))return null;const te=ve.getFullYear(),be=String(ve.getMonth()+1).padStart(2,"0"),ye=String(ve.getDate()).padStart(2,"0");return k(`${te}${be}${ye}`)}const fe=u?k(u):G(r),he=fe!=null?v+K*(fe+.5):null,ke=h[h.length-1].date,Me=E(ke);function Ce(F){if(!F)return null;const ve=new Date(F).getTime();if(Number.isNaN(ve))return null;const te=Date.now()-ve,be=Math.floor(te/6e4);if(be<1)return"방금";if(be<60)return`${be}분 전`;const ye=Math.floor(be/60);return ye<24?`${ye}시간 전`:`${Math.floor(ye/24)}일 전`}const ue=Ce(a);return c.jsxs("div",{className:"candle-chart",children:[c.jsxs("svg",{viewBox:`0 0 ${f} ${w}`,preserveAspectRatio:"none",children:[c.jsx("line",{x1:v,y1:j+p+m/2,x2:f-y,y2:j+p+m/2,stroke:"var(--ink-faint)",strokeWidth:"0.5"}),c.jsx("text",{className:"axis",x:f-y+4,y:le(pe)+4,textAnchor:"start",children:_(pe)}),c.jsx("text",{className:"axis",x:f-y+4,y:le((pe+O)/2)+4,textAnchor:"start",children:_((pe+O)/2)}),c.jsx("text",{className:"axis",x:f-y+4,y:le(O)+4,textAnchor:"start",children:_(O)}),h.map((F,ve)=>{const te=v+K*(ve+.5),ye=F.closeKrw>=F.openKrw?"var(--gain)":"var(--loss)",Q=le(Math.max(F.openKrw,F.closeKrw)),ce=le(Math.min(F.openKrw,F.closeKrw)),Ve=Math.max(1,ce-Q);return c.jsxs("g",{children:[c.jsx("line",{x1:te,y1:le(F.highKrw),x2:te,y2:le(F.lowKrw),stroke:ye,strokeWidth:"1"}),c.jsx("rect",{x:te-C/2,y:Q,width:C,height:Ve,fill:ye}),c.jsx("rect",{x:te-C/2,y:se-P(F.volume),width:C,height:P(F.volume),fill:ye,fillOpacity:"0.4"})]},ve)}),I.some(Boolean)&&c.jsx("path",{d:ee(I),fill:"none",stroke:"#F59E0B",strokeWidth:"1.2",opacity:"0.85"}),de.some(Boolean)&&c.jsx("path",{d:ee(de),fill:"none",stroke:"var(--ink-mute)",strokeWidth:"1.2",opacity:"0.7"}),o.map((F,ve)=>{if(!Number.isFinite(F.value)||F.value<=0)return null;const te=le(F.value);return te<j-4||te>j+p+4?null:c.jsxs("g",{children:[c.jsx("line",{x1:v,y1:te,x2:f-y,y2:te,stroke:F.color,strokeWidth:F.width??1,strokeDasharray:F.dashed?"4 3":void 0,opacity:"0.85"}),c.jsxs("text",{className:"axis",x:f-y-4,y:te-3,textAnchor:"end",fill:F.color,style:{fontWeight:600},children:[F.label," ",_(F.value)]})]},`pl-${ve}`)}),he!==null&&c.jsxs("g",{children:[c.jsx("line",{x1:he,y1:j,x2:he,y2:j+p+m+g,stroke:"var(--accent)",strokeWidth:"1",strokeDasharray:"3 3",opacity:"0.7"}),c.jsx("text",{className:"axis",x:he+4,y:j+12,textAnchor:"start",fill:"var(--accent)",children:"↑ 매칭 기준일"})]}),N.map(F=>{const ve=v+K*(F+.5),te=F===0?"start":F===h.length-1?"end":"middle";return c.jsx("text",{className:"axis",x:ve,y:w-6,textAnchor:te,children:E(h[F].date)},F)})]}),c.jsxs("div",{className:"legend",children:[c.jsxs("span",{className:"item",children:[c.jsx("span",{className:"swatch ma5"}),"5일선"]}),c.jsxs("span",{className:"item",children:[c.jsx("span",{className:"swatch ma20"}),"20일선"]}),c.jsxs("span",{className:"item",children:[c.jsx("span",{className:"swatch up"}),"양봉"]}),c.jsxs("span",{className:"item",children:[c.jsx("span",{className:"swatch down"}),"음봉"]}),he!==null&&c.jsxs("span",{className:"item",children:[c.jsx("span",{className:"swatch decision-line"}),"매칭 기준일"]}),c.jsx("span",{className:"spacer"}),c.jsxs("span",{className:"meta",children:["최근 ",h.length,"일"]})]}),c.jsxs("div",{className:"data-caption",children:[u&&c.jsxs(c.Fragment,{children:["매칭 기준일 ",c.jsx("strong",{children:u.length===8?`${u.slice(4,6)}-${u.slice(6,8)}`:u})," · "]}),"차트 마지막 거래일 ",c.jsx("strong",{children:Me}),ue&&c.jsxs(c.Fragment,{children:[" · 마지막 LLM 분석 ",c.jsx("strong",{children:ue})]})]})]})}function co(n){return n?n.replace(/^[A-Z]/,""):""}function zv(n,a){return!n||!a?!1:n===a?!0:co(n)===co(a)}function Im(n,a){if(a)return n[a]??n[co(a)]}function Dv({open:n,onClose:a,holding:r,position:u,watchers:o}){const[h,f]=W.useState({loading:!1});W.useEffect(()=>{if(!n)return;let y=!0;return f({loading:!0}),(async()=>{try{const b=await(await fetch(`/api/quote/daily/${r.symbolCode}?days=60`)).json();if(!y)return;b.ok?f({loading:!1,data:b.candles}):f({loading:!1,error:b.error??"fetch_failed"})}catch(j){y&&f({loading:!1,error:String(j)})}})(),()=>{y=!1}},[n,r.symbolCode]);const p=o.filter(y=>{var b;if(y.status!=="active")return!1;if((b=u==null?void 0:u.watcherIds)!=null&&b.includes(y.id))return!0;const j=y.spec.condition.config;return zv(j.symbolCode,r.symbolCode)}),g=[];r.avgBuyPriceKrw>0&&g.push({value:r.avgBuyPriceKrw,label:"평단",color:"var(--accent)",width:1.5}),u!=null&&u.stopPriceKrw&&u.stopPriceKrw>0&&g.push({value:u.stopPriceKrw,label:"손절",color:"var(--loss)",dashed:!0}),u!=null&&u.target1PriceKrw&&u.target1PriceKrw>0&&g.push({value:u.target1PriceKrw,label:"익절1",color:"var(--gain)",dashed:!0}),u!=null&&u.target2PriceKrw&&u.target2PriceKrw>0&&g.push({value:u.target2PriceKrw,label:"익절2",color:"var(--gain)",dashed:!0});for(const y of p){if(y.spec.condition.type!=="price")continue;const j=y.spec.condition.config;!j.value||j.value<=0||j.metric==="current_price"&&g.push({value:j.value,label:`${j.op==="gte"||j.op==="gt"?"↑":"↓"} ${y.spec.intent.slice(0,8)}`,color:"var(--warn)",dashed:!0})}const m=r.pnlPct>0?"is-gain":r.pnlPct<0?"is-loss":"",v=r.pnlKrw>0?"+":"";return c.jsxs(mu,{open:n,onClose:a,size:"wide",title:c.jsxs("span",{children:[c.jsx("strong",{children:r.symbolName})," ",c.jsx("code",{className:"symbol-code",children:r.symbolCode})]}),children:[c.jsxs("div",{className:"holding-modal-kpi",children:[c.jsxs("div",{className:`kpi-cell ${m}`,children:[c.jsx("div",{className:"k",children:"평가 손익"}),c.jsxs("div",{className:"v num",children:[v,r.pnlPct.toFixed(2),"%"]}),c.jsxs("div",{className:"sub num",children:[v,r.pnlKrw.toLocaleString("ko-KR"),"원"]})]}),c.jsxs("div",{className:"kpi-cell",children:[c.jsx("div",{className:"k",children:"평단"}),c.jsx("div",{className:"v num",children:r.avgBuyPriceKrw.toLocaleString("ko-KR")}),c.jsx("div",{className:"sub",children:"매입 단가"})]}),c.jsxs("div",{className:"kpi-cell",children:[c.jsx("div",{className:"k",children:"현재가"}),c.jsx("div",{className:"v num",children:r.currentPriceKrw.toLocaleString("ko-KR")}),c.jsx("div",{className:"sub",children:"실시간"})]}),c.jsxs("div",{className:"kpi-cell",children:[c.jsx("div",{className:"k",children:"수량"}),c.jsx("div",{className:"v num",children:r.quantity.toLocaleString("ko-KR")}),c.jsxs("div",{className:"sub num",children:["평가 ",r.evalAmountKrw.toLocaleString("ko-KR")]})]})]}),c.jsx("div",{className:"section-label",children:"CHART · WATCHERS"}),c.jsx(Zp,{state:h,priceLines:g}),c.jsx("div",{className:"section-label",style:{marginTop:"var(--sp-5)"},children:"STRATEGY"}),c.jsxs("div",{className:"strategy-card",children:[(u==null?void 0:u.pattern)&&c.jsxs("div",{className:"strategy-row",children:[c.jsx("span",{className:"k",children:"패턴"}),c.jsx("span",{className:"v",children:u.pattern})]}),(u==null?void 0:u.splitTier)!=null&&c.jsxs("div",{className:"strategy-row",children:[c.jsx("span",{className:"k",children:"분할 매수"}),c.jsxs("span",{className:"v",children:[u.splitTier,"차"]})]}),(u==null?void 0:u.boughtAt)&&c.jsxs("div",{className:"strategy-row",children:[c.jsx("span",{className:"k",children:"매수 시점"}),c.jsx("span",{className:"v",children:new Date(u.boughtAt).toLocaleString("ko-KR")})]}),(u==null?void 0:u.rationale)&&c.jsxs("div",{className:"strategy-rationale",children:[c.jsx("span",{className:"k",children:"진입 근거"}),c.jsx("p",{children:u.rationale})]}),!u&&c.jsx("div",{className:"strategy-empty",children:"이 종목의 진입 근거가 페르소나 state.json 에 기록되지 않았습니다. (브로커 보유 종목이지만 자율 분석 cycle 외부에서 매수된 경우)"})]}),c.jsxs("div",{className:"section-label",style:{marginTop:"var(--sp-5)"},children:["ACTIVE WATCHERS · ",p.length,"건"]}),p.length===0?c.jsx("div",{className:"strategy-empty",children:"활성 감시자가 없습니다."}):c.jsx("ul",{className:"watcher-list",children:p.map(y=>{const j=y.spec.condition.config,b=y.spec.condition.type;return c.jsxs("li",{className:"watcher-row",children:[c.jsx("span",{className:`watcher-type wake-type-${b}`,children:b==="time"?"시간":b==="price"?"가격":b==="event"?"이벤트":b}),c.jsxs("div",{className:"watcher-body",children:[c.jsx("div",{className:"watcher-intent",children:y.spec.intent}),c.jsx("div",{className:"watcher-detail num",children:_v(b,j)})]}),c.jsx("code",{className:"watcher-id",children:y.id})]},y.id)})})]})}function _v(n,a){if(n==="price"){const r=String(a.op??""),u=Number(a.value),o=String(a.metric??"");return`${o==="current_price"?"현재가":o==="change_pct"?"전일대비%":o==="from_buy_price_pct"?"평단대비%":o==="from_open_pct"?"시가대비%":o==="volume_ratio_d1"?"D1 거래량비":o} ${r==="gte"?"≥":r==="gt"?">":r==="lte"?"≤":r==="lt"?"<":r==="eq"?"=":r} ${u.toLocaleString("ko-KR")}`}if(n==="time"){const r=a.at;if(r){const u=new Date(r);if(!Number.isNaN(u.getTime()))return u.toLocaleString("ko-KR",{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"})}return a.afterMs?`${Math.round(Number(a.afterMs)/6e4)}분 후`:""}if(n==="event"){const r=String(a.metric??"");return`${a.maPeriod?`${a.maPeriod}일선 `:""}${r}`}return""}const Hc={neoul:"너울"};function Mv({onGoToSetup:n,onGoToPersonas:a,onGoToJournal:r,onGoToDiary:u,onSafetyChange:o}){var Ce,ue,F,ve;const[h,f]=W.useState(null),[p,g]=W.useState(null),[m,v]=W.useState(null),[y,j]=W.useState([]),[b,w]=W.useState({}),[B,K]=W.useState(null),[,C]=W.useState({halted:!1}),[X,Y]=W.useState(null),[Z,oe]=W.useState(null),[M,ne]=W.useState({}),[me,pe]=W.useState(null),[,O]=W.useState(!1),[ae,le]=W.useState(null);async function Ee(){O(!0),le(null);try{const[te,be,ye,Q,ce,Ve,Le]=await Promise.all([fetch("/api/health").then(we=>we.json()),fetch("/api/me/identity").then(we=>we.json()).catch(()=>null),fetch("/api/setup/wizard").then(we=>we.json()),fetch("/api/subscriptions").then(we=>we.json()),fetch("/api/watchers").then(we=>we.json()),fetch("/api/safety").then(we=>we.json()),fetch("/api/account/status").then(we=>we.json()).catch(()=>null)]);f(te),g(be),v(ye);const Xe=Q.subscriptions??[];if(j(Xe),K(ce),C(Ve),oe(Le),Xe.length>0){const we=await Promise.all(Xe.map(async Je=>{try{const H=await fetch(`/api/screen/${Je}?topN=5`);return[Je,await H.json()]}catch{return[Je,null]}})),jt={};for(const[Je,H]of we)H&&(jt[Je]=H);w(jt);const Vt={};await Promise.all(Xe.map(async Je=>{var H;try{const Se=await(await fetch(`/api/personas/${Je}/state`)).json();if(Se.ok&&((H=Se.state)!=null&&H.positions))for(const De of Se.state.positions)Vt[De.code]=De}catch{}})),ne(Vt);const Ae=Xe[0];try{const H=await(await fetch(`/api/diary/${Ae}/list?limit=1`)).json();H.ok&&H.diaries&&H.diaries.length>0&&Y({date:H.diaries[0].date,persona:Ae,excerpt:H.diaries[0].excerpt})}catch{}}}catch(te){le(String(te))}finally{O(!1)}}if(W.useEffect(()=>{Ee()},[]),ae)return c.jsxs("div",{className:"banner danger",children:["API 연결 실패 · ",ae]});if(!h||!m)return c.jsx("div",{className:"empty",children:"로드 중..."});const se=Object.values(b).reduce((te,be)=>{var ye,Q;return te+(((Q=(ye=be.screener)==null?void 0:ye.candidates)==null?void 0:Q.length)??0)},0),P=(B==null?void 0:B.stats.active)??0,D=y.length,I=y.map(te=>({slug:te,name:Hc[te]??te,watchers:((B==null?void 0:B.watchers)??[]).filter(be=>be.status==="active"&&be.personaSlug===te).sort((be,ye)=>Wm(be)-Wm(ye))})).filter(te=>te.watchers.length>0),de=I.length>0,ee=new Date,E=new Date(ee.getTime()+9*36e5).getUTCDay(),N=E===0||E===6,_=((Ce=Z==null?void 0:Z.deposit)==null?void 0:Ce.totalDepositKrw)??null,k=((ue=Z==null?void 0:Z.holdings)==null?void 0:ue.count)??0,G=((F=Z==null?void 0:Z.holdings)==null?void 0:F.totalPnlPct)??null,fe=((ve=Z==null?void 0:Z.holdings)==null?void 0:ve.totalPnlKrw)??null,he=te=>te>=1e8?`${(te/1e8).toFixed(2)}억원`:te>=1e4?`${Math.round(te/1e4).toLocaleString()}만원`:`${te.toLocaleString()}원`,ke=G==null||G===0?"":G>0?"gain":"loss",Me=!!p&&(!p.userEmail||p.hasToken&&!p.lastAuthenticated);return c.jsxs(c.Fragment,{children:[Me&&p&&c.jsxs("div",{className:"banner is-compact "+(p.hasToken&&p.lastAuthenticated?"warn":"danger"),children:[c.jsx("span",{children:p.hasToken?p.lastAuthenticated?c.jsx(c.Fragment,{children:"⏳ 인증 중 (토큰 등록됨, server 응답 대기)"}):c.jsx(c.Fragment,{children:"🛑 server 가 토큰을 거부했습니다 — 재발급 필요"}):c.jsx(c.Fragment,{children:"👤 인증되지 않음 — 「설정 → 디바이스」 에서 토큰 입력 필요"})}),c.jsx("button",{className:"btn ghost sm",onClick:n,children:"설정 열기"})]}),c.jsxs("header",{className:"page-hero",children:[c.jsxs("div",{className:"page-hero-text",children:[c.jsx("span",{className:"page-hero-eyebrow",children:"DASHBOARD"}),c.jsx("h1",{children:"오늘의 자율 운영"}),c.jsx("p",{className:"page-hero-sub",children:D>0?`${D}명의 트레이더가 자율적으로 시장을 분석합니다.`:"구독한 트레이더가 아직 없습니다. 트레이더를 추가해 자율 운영을 시작하세요."})]}),c.jsxs("div",{className:"page-hero-meta",children:[c.jsxs("span",{className:"page-hero-pill",children:["📅 ",c.jsx("strong",{children:ee.toLocaleDateString("ko-KR",{month:"long",day:"numeric",weekday:"short"})}),N&&c.jsx("span",{style:{color:"var(--ink-mute)"},children:"· KRX 휴장"})]}),P>0&&c.jsxs("span",{className:"page-hero-pill",children:["🔔 활성 watcher ",c.jsx("strong",{className:"num",children:P})]})]})]}),c.jsxs("section",{className:"dash-kpi-hero",children:[c.jsx("div",{className:"section-label",children:"PORTFOLIO"}),c.jsxs("div",{className:`dash-kpi-hero-card is-${ke}`,children:[c.jsx("div",{className:"dash-kpi-hero-icon","aria-hidden":!0,children:"📊"}),c.jsxs("div",{className:"dash-kpi-hero-body",children:[c.jsx("div",{className:"dash-kpi-hero-label",children:"평가 손익"}),c.jsx("div",{className:`dash-kpi-hero-value is-${ke}`,children:G==null?"—":`${G>0?"+":""}${G.toFixed(2)}%`}),c.jsxs("div",{className:"dash-kpi-hero-sub",children:[fe!=null&&fe!==0&&c.jsxs("span",{className:"num",children:[fe>0?"+":"",he(Math.abs(fe)).replace(/원$/,""),"원"]}),fe!=null&&fe!==0?" · ":"","보유 ",k,"종목",_!=null&&c.jsxs("span",{children:[" · 자본 ",c.jsx("span",{className:"num",children:he(_)})]})]})]})]})]}),(()=>{var be;const te=((be=Z==null?void 0:Z.holdings)==null?void 0:be.items)??[];return te.length===0?null:c.jsxs("section",{children:[c.jsxs("div",{className:"section-label",children:["HOLDINGS · ",te.length,"종목"]}),c.jsx("ul",{className:"holdings-list",children:te.map(ye=>{const Q=ye.pnlPct>0?"is-gain":ye.pnlPct<0?"is-loss":"",ce=Im(M,ye.symbolCode);return c.jsx("li",{children:c.jsxs("button",{type:"button",className:`holding-row ${Q}`,onClick:()=>pe(ye),"aria-label":`${ye.symbolName} 상세 보기`,children:[c.jsxs("span",{className:"hr-name",children:[c.jsx("strong",{children:ye.symbolName}),c.jsx("code",{className:"hr-code",children:ye.symbolCode}),(ce==null?void 0:ce.pattern)&&c.jsx("span",{className:"hr-tag",children:ce.pattern})]}),c.jsxs("span",{className:"hr-qty num",children:[ye.quantity.toLocaleString("ko-KR"),"주 · 평단 ",ye.avgBuyPriceKrw.toLocaleString("ko-KR")]}),c.jsx("span",{className:"hr-price num",children:ye.currentPriceKrw.toLocaleString("ko-KR")}),c.jsxs("span",{className:`hr-pnl num ${Q}`,children:[ye.pnlPct>0?"+":"",ye.pnlPct.toFixed(2),"%"]}),c.jsx("span",{className:"hr-arrow","aria-hidden":!0,children:"→"})]})},ye.symbolCode)})})]})})(),c.jsxs("section",{children:[c.jsx("div",{className:"section-label",children:"TODAY"}),c.jsxs("div",{className:"dash-kpi-row is-secondary",children:[c.jsxs("div",{className:"dash-kpi",children:[c.jsx("div",{className:"dash-kpi-icon","aria-hidden":!0,children:"✨"}),c.jsxs("div",{className:"dash-kpi-body",children:[c.jsx("div",{className:"dash-kpi-label",children:"패턴 발견"}),c.jsx("div",{className:"dash-kpi-value num",children:se}),c.jsxs("div",{className:"dash-kpi-sub",children:["스크리너 ",Object.keys(b).length,"개"]})]})]}),c.jsxs("div",{className:"dash-kpi",children:[c.jsx("div",{className:"dash-kpi-icon","aria-hidden":!0,children:"🤖"}),c.jsxs("div",{className:"dash-kpi-body",children:[c.jsx("div",{className:"dash-kpi-label",children:"트레이더"}),c.jsx("div",{className:"dash-kpi-value num",children:D}),c.jsx("div",{className:"dash-kpi-sub",children:"활성 페르소나"})]})]}),c.jsxs("div",{className:"dash-kpi",children:[c.jsx("div",{className:"dash-kpi-icon","aria-hidden":!0,children:"🔔"}),c.jsxs("div",{className:"dash-kpi-body",children:[c.jsx("div",{className:"dash-kpi-label",children:"감시자"}),c.jsx("div",{className:"dash-kpi-value num",children:P}),c.jsx("div",{className:"dash-kpi-sub",children:"자율 깨움 조건"})]})]})]})]}),!m.ready&&c.jsxs("section",{children:[c.jsx("div",{className:"section-label",children:"SETUP"}),c.jsxs("div",{className:"section-head",children:[c.jsxs("h2",{children:["거래 준비 · ",m.passed,"/",m.total]}),c.jsx("span",{className:"meta",children:m.next})]}),c.jsx("div",{className:"step-list",children:m.steps.map(te=>c.jsxs("div",{className:"step-chip glass",title:te.detail,children:[c.jsx("div",{className:`icon ${te.ok?"is-ok":"is-fail"}`,children:te.ok?"✓":"!"}),c.jsx("div",{className:"label",children:te.label}),c.jsx("div",{className:"detail",children:te.detail})]},te.id))})]}),c.jsxs("section",{className:de?"is-accent":"",children:[c.jsx("div",{className:"section-label",children:"AGENTS"}),de?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"section-head",children:[c.jsx("h2",{children:"다음 깨움"}),c.jsxs("span",{className:"meta",children:[P,"개 활성 · ",I.length,"명 트레이더"]})]}),c.jsx("div",{className:"wake-grid",children:I.map(te=>c.jsxs("article",{className:"wake-card",children:[c.jsxs("header",{className:"wake-card-head",children:[c.jsx("span",{className:"wake-persona",children:te.name}),c.jsxs("span",{className:"wake-count",children:[te.watchers.length,"건"]})]}),c.jsx("ul",{className:"wake-list",children:te.watchers.map(be=>{const ye=be.spec.condition.type,Q=ye==="time"?"시간":ye==="price"?"가격":ye==="event"?"이벤트":ye;return c.jsxs("li",{className:"wake-row",children:[c.jsx("span",{className:"wake-when num",children:Ov(be)}),c.jsx("span",{className:"wake-intent",children:be.spec.intent}),c.jsx("span",{className:`wake-type wake-type-${ye}`,children:Q})]},be.id)})})]},te.slug))})]}):c.jsxs("div",{className:"empty-card",children:[c.jsx("div",{className:"empty-card-icon","aria-hidden":!0,children:"💤"}),c.jsx("div",{className:"empty-card-title",children:"활성 감시자가 없습니다"}),c.jsx("div",{className:"empty-card-sub",children:D===0?"트레이더를 추가하면 시장 조건에 따라 자율적으로 깨어나 분석합니다.":"지금 분석을 트리거하면 트레이더가 watchlist 와 시세를 점검하고 깨움 조건을 등록합니다."}),c.jsx("div",{className:"empty-card-actions",children:D===0?c.jsx("button",{className:"btn primary sm",onClick:a,children:"트레이더 둘러보기 →"}):c.jsx("button",{className:"btn primary sm",onClick:a,children:"지금 분석"})})]})]}),X?c.jsxs("section",{children:[c.jsx("div",{className:"section-label",children:"DIARY"}),c.jsxs("article",{className:"diary",children:[c.jsxs("header",{className:"head",children:[c.jsx("div",{className:"avatar",children:(Hc[X.persona]??X.persona).slice(0,1)}),c.jsxs("div",{children:[c.jsx("div",{className:"who",children:Hc[X.persona]??X.persona}),c.jsx("div",{className:"when",children:X.date})]}),c.jsx("div",{style:{marginLeft:"auto"},children:c.jsx("button",{className:"btn ghost sm",onClick:u,children:"전체 일기 →"})})]}),c.jsxs("p",{className:"body",children:[X.excerpt.replace(/^#[^\n]*\n+/,"").trim().slice(0,240),"…"]})]})]}):D>0?c.jsxs("section",{children:[c.jsx("div",{className:"section-label",children:"JOURNAL"}),c.jsxs("div",{className:"empty-card",children:[c.jsx("div",{className:"empty-card-icon","aria-hidden":!0,children:"📓"}),c.jsx("div",{className:"empty-card-title",children:"아직 작성된 일지가 없습니다"}),c.jsx("div",{className:"empty-card-sub",children:"매일 16:00 KST 자율 일지가 생성됩니다."})]})]}):null,c.jsxs("div",{className:"disclaimer",children:["본 소프트웨어는 트레이딩 로직 라이선스 + 소프트웨어 공급 모델로 제공됩니다. 거래 의사결정과 실행은 사용자의 책임이며, 본 소프트웨어는 투자 자문 · 투자 일임 · 수익 보장을 제공하지 않습니다. 원금 손실의 위험이 있습니다.",c.jsxs("div",{className:"disclaimer-meta",children:["v",h.version," · ",h.config.provider,!m.ready&&c.jsx("button",{className:"btn ghost sm",onClick:n,children:"설정 마치기"})]})]}),me&&c.jsx(Dv,{open:!!me,onClose:()=>pe(null),holding:me,position:Im(M,me.symbolCode),watchers:(B==null?void 0:B.watchers)??[]})]})}function Wm(n){const a=n.spec.condition;if(a.type==="time"){const r=a.config;if(r.at){const u=new Date(r.at).getTime();if(!Number.isNaN(u))return u}}return new Date(n.expiresAt).getTime()}function Ov(n){const a=n.spec.condition;if(a.type==="time"){const r=a.config;if(r.at){const u=new Date(r.at);if(!Number.isNaN(u.getTime()))return u.toLocaleString("ko-KR",{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"})}}return new Date(n.expiresAt).toLocaleDateString("ko-KR",{month:"numeric",day:"numeric"})+" 까지"}const ki={neoul:"너울"},qc={neoul:{color:"var(--persona-neoul)",emoji:"🌊",styleChips:["양음양 눌림목","세력 발자국"]}};function Rv(n){if(!n)return{};try{const a=n.match(/```(?:json)?\s*([\s\S]*?)```/),r=a?a[1]:n;return{action:JSON.parse(r).action}}catch{return{}}}function Pm(n){if(!n)return"분석 전";const a=new Date(n).getTime();if(Number.isNaN(a))return"—";const r=Date.now()-a,u=Math.floor(r/1e3);if(u<60)return"방금";const o=Math.floor(u/60);if(o<60)return`${o}분 전`;const h=Math.floor(o/60);if(h<24)return`${h}시간 전`;const f=Math.floor(h/24);return f<7?`${f}일 전`:new Date(n).toLocaleDateString("ko-KR",{month:"numeric",day:"numeric"})}function Lv(n){return n==="buy"?"매수":n==="sell"?"매도":n==="hold"?"보유":n==="skip"?"관망":"—"}function Bv(n){return n==="buy"?"buy":n==="sell"?"sell":n==="skip"?"skip":"hold"}function Uv({onGoToSetup:n}){var ke,Me,Ce;const[a,r]=W.useState([]),[u,o]=W.useState({}),[h,f]=W.useState([]),[p,g]=W.useState({}),[m,v]=W.useState({}),[y,j]=W.useState(null),[b,w]=W.useState(null),[B,K]=W.useState({}),[C,X]=W.useState({}),[Y,Z]=W.useState(!1),[oe,M]=W.useState(null),[ne,me]=W.useState("paper"),[pe,O]=W.useState([]),[ae,le]=W.useState(null),[Ee,se]=W.useState({}),[P,D]=W.useState({}),[I,de]=W.useState({});function ee(ue){const F=Date.now()+Math.random();O(ve=>[...ve,{...ue,id:F}]),setTimeout(()=>O(ve=>ve.filter(te=>te.id!==F)),5500)}function E(ue){O(F=>F.filter(ve=>ve.id!==ue))}async function N(){var ue,F;Z(!0),M(null);try{const te=(await(await fetch("/api/subscriptions")).json()).subscriptions??[];r(te);const[be,ye,Q]=await Promise.all([fetch("/api/watchers").then(Ae=>Ae.json()),fetch("/api/journal/events?days=7").then(Ae=>Ae.json()),fetch("/api/config").then(Ae=>Ae.json()).catch(()=>null)]);f(be.watchers??[]);const ce=Q==null?void 0:Q.config;ce!=null&&ce.halted?me("halted"):!((ue=ce==null?void 0:ce.broker)!=null&&ue.kind)||ce.broker.kind==="none"?me("no-broker"):ce.broker.isDemo?me("paper"):me("live");const Ve=ye.events??[],Le={},Xe={};for(let Ae=Ve.length-1;Ae>=0;Ae--){const Je=Ve[Ae];if(Je.eventType!=="decision"||!Je.personaSlug||Le[Je.personaSlug])continue;const{action:H}=Rv((F=Je.llmContext)==null?void 0:F.reasoning);H&&(Le[Je.personaSlug]=H),Xe[Je.personaSlug]||(Xe[Je.personaSlug]=Je.timestamp)}g(Le),v(Xe);const we=await Promise.all(te.map(async Ae=>{try{const[Je,H]=await Promise.all([fetch(`/api/screen/${Ae}?topN=30`).then(ie=>ie.json()).catch(()=>null),fetch(`/api/personas/${Ae}/state`).then(ie=>ie.json()).catch(()=>null)]);return[Ae,Je,(H==null?void 0:H.state)??null]}catch{return[Ae,null,null]}})),jt={},Vt={};for(const[Ae,Je,H]of we)jt[Ae]=Je,Vt[Ae]=H;o(jt),D(Vt)}catch(ve){M(String(ve))}finally{Z(!1)}}W.useEffect(()=>{N()},[]),W.useEffect(()=>{y&&I[y]===void 0&&(async()=>{try{const F=await(await fetch(`/api/personas/${y}/strategy`)).json();de(ve=>({...ve,[y]:F.ok?F.strategy:""}))}catch{de(ue=>({...ue,[y]:""}))}})()},[y]),W.useEffect(()=>{var F;if(!y){w(null);return}const ue=((F=P[y])==null?void 0:F.watchlist)??[];if(ue.length===0){w(null);return}(!b||!ue.find(ve=>ve.code===b))&&w(ue[0].code)},[y,P]),W.useEffect(()=>{var ve,te;if(!b||(ve=Ee[b])!=null&&ve.data||(te=Ee[b])!=null&&te.loading)return;let ue=!1;const F=b;return se(be=>({...be,[F]:{loading:!0}})),(async()=>{try{const ye=await(await fetch(`/api/quote/daily/${encodeURIComponent(F)}?days=30`)).json();if(ue)return;ye.ok?se(Q=>({...Q,[F]:{loading:!1,data:ye.candles}})):se(Q=>({...Q,[F]:{loading:!1,error:ye.error??"fetch_failed"}}))}catch(be){if(ue)return;se(ye=>({...ye,[F]:{loading:!1,error:String(be)}}))}})(),()=>{ue=!0}},[b]),W.useEffect(()=>{if(!y&&!ae)return;const ue=F=>{F.key==="Escape"&&(ae?le(null):y&&j(null))};return window.addEventListener("keydown",ue),()=>window.removeEventListener("keydown",ue)},[y,ae]);function _(ue){if(ne==="halted"){ee({kind:"warn",title:"긴급 정지 중",desc:"안전 모드를 해제한 뒤 다시 시도하세요."});return}if(ne==="live"){le(ue);return}k(ue)}async function k(ue){var te,be,ye,Q,ce,Ve;K(Le=>({...Le,[ue]:!0})),X(Le=>({...Le,[ue]:0}));const F=Date.now(),ve=setInterval(()=>{X(Le=>({...Le,[ue]:Math.floor((Date.now()-F)/1e3)}))},1e3);try{const Xe=await(await fetch(`/api/personas/${ue}/cycle`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({triggerKind:"manual"})})).json(),we=ki[ue]??ue;if(Xe.ok){const jt=((be=(te=Xe.stateAfter)==null?void 0:te.watchlist)==null?void 0:be.length)??0,Vt=((Q=(ye=Xe.stateAfter)==null?void 0:ye.positions)==null?void 0:Q.length)??0,Ae=(ce=Xe.stateAfter)==null?void 0:ce.nextRunAt,Je=(Ve=Xe.summary)==null?void 0:Ve.slice(0,200);ee({kind:"info",title:`${we} 사이클 완료`,desc:`watchlist ${jt} · positions ${Vt}${Ae?` · 다음 ${new Date(Ae).toLocaleString("ko-KR")}`:" · 다음 (자율 결정 안됨)"}${Je?`
59
+ ${Je}`:""}`}),await N(),de(H=>{const ie={...H};return delete ie[ue],ie})}else ee({kind:"danger",title:`${we} 사이클 실패`,desc:Xe.error??Xe.stage??"unknown"})}catch(Le){ee({kind:"danger",title:`${ki[ue]??ue} 호출 실패`,desc:String(Le)})}finally{clearInterval(ve),K(Le=>({...Le,[ue]:!1})),X(Le=>({...Le,[ue]:0}))}}if(oe)return c.jsxs("div",{className:"banner danger",children:["API 오류 · ",oe]});if(a.length===0)return c.jsxs(c.Fragment,{children:[c.jsx("header",{className:"page-hero",children:c.jsxs("div",{className:"page-hero-text",children:[c.jsx("span",{className:"page-hero-eyebrow",children:"TRADERS"}),c.jsx("h1",{children:"아직 트레이더가 없어요"}),c.jsx("p",{className:"page-hero-sub",children:"설정 탭에서 mulsok 웹에 로그인하고 트레이더를 구독하세요."})]})}),c.jsxs("div",{className:"empty-card",children:[c.jsx("div",{className:"empty-card-icon","aria-hidden":!0,children:"🤖"}),c.jsx("div",{className:"empty-card-title",children:"트레이더 구독을 시작하세요"}),c.jsx("div",{className:"empty-card-sub",children:"mulsok 웹에서 마음에 드는 AI 트레이더를 구독하면, 자율적으로 시장을 분석하고 운영합니다."}),c.jsx("div",{className:"empty-card-actions",children:c.jsx("button",{className:"btn primary",onClick:n,children:"설정으로 가기 →"})})]}),c.jsx(ep,{})]});const G=y?u[y]:null,fe=y?qc[y]:null,he=((Me=(ke=G==null?void 0:G.screener)==null?void 0:ke.candidates)==null?void 0:Me.length)??0;return c.jsxs(c.Fragment,{children:[c.jsxs("header",{className:"page-hero",children:[c.jsxs("div",{className:"page-hero-text",children:[c.jsx("span",{className:"page-hero-eyebrow",children:"TRADERS"}),c.jsx("h1",{children:"AI 트레이더"}),c.jsxs("p",{className:"page-hero-sub",children:["구독한 ",a.length,"명의 트레이더가 시장을 보고 있어요. 카드를 눌러 자세히 보세요."]})]}),c.jsx("div",{className:"page-hero-meta",children:c.jsx(Yv,{mode:ne})})]}),ne==="live"&&c.jsx("div",{className:"banner warn is-compact",children:c.jsxs("span",{children:["⚠ ",c.jsx("strong",{children:"실거래 모드"})," · 「지금 분석」 클릭 시 실제 매매 주문이 나갈 수 있습니다."]})}),c.jsxs("section",{children:[c.jsxs("div",{className:"section-label",children:["SUBSCRIPTIONS · ",a.length,"명"]}),c.jsx("div",{className:"tools-row",children:c.jsx("button",{className:"btn sm ghost",onClick:()=>void N(),disabled:Y,"aria-label":"모두 다시 불러오기",children:Y?"갱신 중...":"↻ 새로고침"})}),c.jsx("div",{className:"persona-grid",children:a.map(ue=>{var ie,Se,De;const F=u[ue],ve=qc[ue]??{color:"var(--persona-unknown)",styleChips:[]},te=P[ue],be=((ie=te==null?void 0:te.watchlist)==null?void 0:ie.length)??0,ye=((Se=te==null?void 0:te.positions)==null?void 0:Se.length)??0,Q=h.filter(qe=>qe.personaSlug===ue&&qe.status==="active").length,ce=p[ue],Ve=(te==null?void 0:te.lastRunAt)??m[ue],Le=(te==null?void 0:te.nextRunAt)??null,Xe=(De=F==null?void 0:F.persona.displayName)==null?void 0:De.replace(/^[^—]+—\s*/,""),we=te==null?void 0:te.stats,jt=(we==null?void 0:we.totalTrades)??0,Vt=(we==null?void 0:we.winCount)??0;we==null||we.lossCount;const Ae=(we==null?void 0:we.realizedPnlKrw)??0,Je=jt>0?Vt/jt*100:null,H=Ae>0?"is-gain":Ae<0?"is-loss":"is-zero";return c.jsxs("button",{type:"button",className:"trader-card glass",style:{"--persona-color":ve.color},onClick:()=>{j(ue),w(null)},"aria-label":`${ki[ue]??ue} 트레이더 상세 보기`,children:[c.jsxs("div",{className:"head",children:[c.jsxs("div",{className:"name-row",children:[c.jsx("span",{className:"name",children:ki[ue]??ue}),(F==null?void 0:F.persona.version)&&c.jsxs("span",{className:"ver",children:["v",F.persona.version]})]}),c.jsxs("div",{className:"head-right",children:[jt>0&&c.jsxs("span",{className:`trader-card-pnl ${H}`,children:[Ae>0?"+":"",Math.round(Ae/1e4).toLocaleString("ko-KR"),"만"]}),c.jsx("span",{className:`verdict-pill ${Bv(ce)}`,children:Lv(ce)})]})]}),Xe&&c.jsx("div",{className:"display-name",children:Xe}),ve.styleChips.length>0&&c.jsx("div",{className:"style-chips",children:ve.styleChips.map(qe=>c.jsx("span",{className:"style-chip",children:qe},qe))}),c.jsxs("div",{className:"stats",children:[c.jsx("span",{className:"stat-v num",children:be}),c.jsx("span",{className:"stat-k",children:"관심"}),c.jsx("span",{className:"sep",children:"·"}),c.jsx("span",{className:"stat-v num",children:ye}),c.jsx("span",{className:"stat-k",children:"보유"}),c.jsx("span",{className:"sep",children:"·"}),c.jsx("span",{className:"stat-v num",children:Q}),c.jsx("span",{className:"stat-k",children:"감시"}),c.jsx("span",{className:"sep",children:"·"}),c.jsx("span",{className:"stat-v sm num",title:Ve?new Date(Ve).toLocaleString("ko-KR"):"",children:Le?`다음 ${Pm(Le)}`:Pm(Ve)})]}),jt>0&&c.jsxs("div",{className:"trader-card-perf",children:[c.jsxs("span",{className:"perf-cell",children:[c.jsx("span",{className:"perf-k",children:"거래"}),c.jsx("span",{className:"perf-v num",children:jt})]}),Je!=null&&c.jsxs("span",{className:"perf-cell",children:[c.jsx("span",{className:"perf-k",children:"승률"}),c.jsxs("span",{className:"perf-v num",children:[Je.toFixed(0),"%"]})]}),c.jsxs("span",{className:"perf-cell",children:[c.jsx("span",{className:"perf-k",children:"실현"}),c.jsxs("span",{className:`perf-v num ${H}`,children:[Ae>0?"+":"",Ae.toLocaleString("ko-KR"),"원"]})]})]})]},ue)})})]}),c.jsxs("p",{className:"helper-note",children:["구독 변경은 ",c.jsx("strong",{children:"mulsok 웹"})," 에서 가능해요."]}),c.jsx(ep,{}),c.jsx(Kv,{toasts:pe,onDismiss:E}),y&&G&&fe&&c.jsx(mu,{open:!!y,onClose:()=>j(null),size:"wide",title:c.jsxs("span",{children:[ki[y]??y,G.persona.version&&c.jsxs("span",{className:"ver",children:[" v",G.persona.version]})]}),headerExtra:c.jsx("button",{className:`btn sm ${ne==="live"?"live":"primary"}`,onClick:()=>_(y),disabled:!!B[y]||ne==="halted",title:ne==="halted"?"긴급 정지 중":void 0,children:B[y]?c.jsxs(c.Fragment,{children:["분석 중",c.jsx("span",{className:"dots-loading"})]}):ne==="live"?"⚠ 지금 분석":"↻ 지금 분석"}),children:c.jsxs("div",{className:"trader-detail-body",style:{"--persona-color":fe.color},children:[c.jsx("div",{className:"trader-detail-head",children:c.jsxs("div",{className:"detail-title",children:[G.persona.tagline&&c.jsxs("p",{className:"tagline",children:["「",G.persona.tagline,"」"]}),c.jsxs("p",{className:"funnel",children:["universe ",c.jsx("strong",{children:G.screener.universeSize.toLocaleString()}),c.jsx("span",{className:"arrow",children:"→"}),"평가 ",c.jsx("strong",{children:G.screener.evaluated.toLocaleString()}),c.jsx("span",{className:"arrow",children:"→"}),"후보 ",c.jsx("strong",{children:he}),G.screener.elapsedMs&&c.jsxs(c.Fragment,{children:[" · ",G.screener.elapsedMs,"ms"]})]})]})}),c.jsx(Hv,{state:P[y],strategyMd:I[y],candleCache:Ee,selectedCode:b,onSelectCode:w})]})}),ae&&c.jsx(Gv,{name:ki[ae]??ae,color:((Ce=qc[ae])==null?void 0:Ce.color)??"var(--persona-unknown)",onCancel:()=>le(null),onConfirm:()=>{const ue=ae;le(null),k(ue)}})]})}function ep(){return c.jsx("div",{className:"disclaimer",children:"본 소프트웨어는 트레이딩 로직 라이선스 + 소프트웨어 공급 모델로 제공됩니다. 거래 의사결정과 실행은 사용자의 책임이며, 본 소프트웨어는 투자 자문 · 투자 일임 · 수익 보장을 제공하지 않습니다. 원금 손실의 위험이 있습니다."})}function Hv({state:n,strategyMd:a,candleCache:r,selectedCode:u,onSelectCode:o}){if(!n)return c.jsx("div",{className:"watchlist-section empty",children:c.jsx("p",{children:"아직 AI 가 자기 메모리를 만들지 않았어요. 「↻ 지금 분석」 으로 첫 사이클을 실행하세요."})});const{watchlist:h,positions:f,nextRunAt:p,lastRunAt:g,stats:m}=n,v=qv(a,"현재 시장 판단");return c.jsxs("div",{className:"watchlist-section",children:[c.jsxs("div",{className:"memory-meta",children:[c.jsxs("span",{children:["마지막 사이클 ",c.jsx("strong",{children:Yc(g)??"—"})]}),p?c.jsxs("span",{children:["다음 예약 ",c.jsx("strong",{children:new Date(p).toLocaleString("ko-KR")})]}):c.jsx("span",{className:"memory-meta-warn",children:"다음 예약 없음 (watcher 발화 대기)"}),c.jsxs("span",{children:["총 거래 ",c.jsx("strong",{className:"num",children:m.totalTrades})]}),c.jsxs("span",{children:["실현 손익 ",c.jsxs("strong",{className:"num",children:[m.realizedPnlKrw.toLocaleString("ko-KR"),"원"]})]})]}),c.jsxs("div",{className:"dialog-section-head",children:[c.jsxs("h3",{children:["관심 종목 (",h.length,")"]}),c.jsx("p",{className:"sub",children:"AI 가 직접 선정 · 칩을 누르면 상세 + 차트"})]}),h.length===0?c.jsx("p",{className:"empty-line",children:"아직 관심 종목 없음. AI 가 다음 사이클에서 발굴할 수 있어요."}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"watchlist-chips",children:h.map(y=>{const j=y.code===u;return c.jsx("button",{type:"button",className:`btn sm ${j?"primary":"ghost"}`,onClick:()=>o(y.code),children:y.name},y.code)})}),(()=>{const y=h.find(j=>j.code===u)??h[0];return y?c.jsxs("div",{className:"watchlist-detail",children:[c.jsxs("div",{className:"head",children:[c.jsx("span",{className:"name",children:y.name}),c.jsx("span",{className:"code",children:y.code}),c.jsx("span",{className:"pattern",children:y.pattern}),y.triggerPrice!=null&&c.jsxs("span",{className:"trigger num",children:["↳ ",y.triggerPrice.toLocaleString("ko-KR"),"원"]})]}),y.reason&&c.jsx("p",{className:"reason",children:y.reason}),c.jsxs("div",{className:"meta",children:[c.jsxs("span",{children:["관심 등록 ",c.jsx("strong",{children:Yc(y.addedAt)})]}),y.targetPrice!=null&&c.jsxs("span",{children:["목표 ",c.jsxs("strong",{className:"num",children:[y.targetPrice.toLocaleString("ko-KR"),"원"]})]}),y.stopPrice!=null&&c.jsxs("span",{children:["손절 ",c.jsxs("strong",{className:"num",children:[y.stopPrice.toLocaleString("ko-KR"),"원"]})]}),y.expiresAt&&c.jsxs("span",{children:["만료 ",c.jsx("strong",{children:new Date(y.expiresAt).toLocaleDateString("ko-KR")})]})]}),c.jsx("div",{className:"watchlist-chart",children:c.jsx(Zp,{state:r[y.code],decisionAt:y.addedAt})})]}):null})()]}),f.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"dialog-section-head is-spaced",children:c.jsxs("h3",{children:["보유 종목 (",f.length,")"]})}),c.jsx("div",{className:"watchlist-list",children:f.map(y=>c.jsxs("div",{className:"watchlist-row",children:[c.jsxs("div",{className:"head",children:[c.jsx("span",{className:"name",children:y.name}),c.jsx("span",{className:"code",children:y.code}),c.jsxs("span",{className:"num",children:[y.quantity,"주 @ ",y.avgPriceKrw.toLocaleString("ko-KR"),"원"]})]}),y.rationale&&c.jsx("p",{className:"reason",children:y.rationale}),c.jsx("div",{className:"meta",children:c.jsxs("span",{children:["매수 ",c.jsx("strong",{children:Yc(y.boughtAt)})]})})]},y.code))})]}),v&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"dialog-section-head is-spaced",children:[c.jsx("h3",{children:"현재 시장 판단"}),c.jsx("p",{className:"sub",children:"strategy.md 발췌 · AI 가 매 사이클 갱신"})]}),c.jsx("div",{className:"market-view",children:v})]})]})}function Yc(n){if(!n)return null;const a=new Date(n).getTime();if(Number.isNaN(a))return null;const r=Date.now()-a,u=Math.floor(r/6e4);if(Math.abs(u)<1)return"방금";if(u>0){if(u<60)return`${u}분 전`;const f=Math.floor(u/60);return f<24?`${f}시간 전`:`${Math.floor(f/24)}일 전`}const o=-u;if(o<60)return`${o}분 후`;const h=Math.floor(o/60);return h<24?`${h}시간 후`:`${Math.floor(h/24)}일 후`}function qv(n,a){if(!n)return null;const r=new RegExp(`##\\s+${a}\\s*\\n([\\s\\S]*?)(?=\\n##\\s|---|$)`,"m"),u=n.match(r);if(!u)return null;const o=u[1].trim();return!o||o.startsWith("(아직")||o.startsWith("(첫")?null:o.length>600?o.slice(0,600)+"...":o}function Yv({mode:n}){const r={live:{cls:"live",label:"실거래 모드"},paper:{cls:"paper",label:"모의 모드"},halted:{cls:"halted",label:"긴급 정지"},"no-broker":{cls:"paper",label:"증권사 미설정"}}[n];return c.jsxs("span",{className:`mode-badge ${r.cls}`,"aria-label":`현재 ${r.label}`,children:[c.jsx("span",{className:"dot","aria-hidden":!0}),r.label]})}function Kv({toasts:n,onDismiss:a}){if(n.length===0)return null;const r={success:"✓",danger:"⚠",warn:"!",info:"i"};return c.jsx("div",{className:"toast-stack",role:"status","aria-live":"polite",children:n.map(u=>c.jsxs("div",{className:`toast ${u.kind}`,children:[c.jsx("div",{className:"icon","aria-hidden":!0,children:r[u.kind]}),c.jsxs("div",{className:"body",children:[c.jsx("div",{className:"title",children:u.title}),u.desc&&c.jsx("div",{className:"desc",children:u.desc})]}),c.jsx("button",{className:"close",onClick:()=>a(u.id),"aria-label":"알림 닫기",children:"×"})]},u.id))})}function Gv({name:n,color:a,onCancel:r,onConfirm:u}){return c.jsx(mu,{open:!0,onClose:r,title:c.jsx("span",{children:"실거래 분석 확인"}),children:c.jsxs("div",{className:"confirm-modal",children:[c.jsx("div",{className:"alert-icon","aria-hidden":!0,children:"⚠"}),c.jsxs("h3",{children:[c.jsx("span",{style:{color:a},children:n})," 분석을 지금 실행할까요?"]}),c.jsxs("p",{className:"desc",children:[c.jsx("strong",{children:"실거래 모드"}),"입니다. 이 분석은 자동 사이클과 동일하게 동작하며, 다음 결과가 발생할 수 있어요:"]}),c.jsxs("ul",{children:[c.jsxs("li",{children:["LLM 판단이 매수·매도면 ",c.jsx("strong",{children:"본인 증권사 API 로 실 주문이 나갈 수 있음"})]}),c.jsx("li",{children:"새 시세 감시자(watcher)가 자동 등록되어 이후 다시 깨어날 수 있음"}),c.jsx("li",{children:"LLM 호출 비용이 발생함 (모델별 토큰 과금)"})]}),c.jsxs("div",{className:"actions",children:[c.jsx("button",{className:"btn ghost",onClick:r,children:"취소"}),c.jsx("button",{className:"btn live",onClick:u,autoFocus:!0,children:"실행"})]})]})})}function Vv(n,a){const r={};return(n[n.length-1]===""?[...n,""]:n).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const Qv=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Xv=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zv={};function tp(n,a){return(Zv.jsx?Xv:Qv).test(n)}const Fv=/[ \t\n\f\r]/g;function Jv(n){return typeof n=="object"?n.type==="text"?np(n.value):!1:np(n)}function np(n){return n.replace(Fv,"")===""}class Ra{constructor(a,r,u){this.normal=r,this.property=a,u&&(this.space=u)}}Ra.prototype.normal={};Ra.prototype.property={};Ra.prototype.space=void 0;function Fp(n,a){const r={},u={};for(const o of n)Object.assign(r,o.property),Object.assign(u,o.normal);return new Ra(r,u,a)}function oo(n){return n.toLowerCase()}class Gt{constructor(a,r){this.attribute=r,this.property=a}}Gt.prototype.attribute="";Gt.prototype.booleanish=!1;Gt.prototype.boolean=!1;Gt.prototype.commaOrSpaceSeparated=!1;Gt.prototype.commaSeparated=!1;Gt.prototype.defined=!1;Gt.prototype.mustUseProperty=!1;Gt.prototype.number=!1;Gt.prototype.overloadedBoolean=!1;Gt.prototype.property="";Gt.prototype.spaceSeparated=!1;Gt.prototype.space=void 0;let $v=0;const Re=Ul(),yt=Ul(),fo=Ul(),re=Ul(),at=Ul(),wi=Ul(),Pt=Ul();function Ul(){return 2**++$v}const ho=Object.freeze(Object.defineProperty({__proto__:null,boolean:Re,booleanish:yt,commaOrSpaceSeparated:Pt,commaSeparated:wi,number:re,overloadedBoolean:fo,spaceSeparated:at},Symbol.toStringTag,{value:"Module"})),Kc=Object.keys(ho);class No extends Gt{constructor(a,r,u,o){let h=-1;if(super(a,r),lp(this,"space",o),typeof u=="number")for(;++h<Kc.length;){const f=Kc[h];lp(this,Kc[h],(u&ho[f])===ho[f])}}}No.prototype.defined=!0;function lp(n,a,r){r&&(n[a]=r)}function Ci(n){const a={},r={};for(const[u,o]of Object.entries(n.properties)){const h=new No(u,n.transform(n.attributes||{},u),o,n.space);n.mustUseProperty&&n.mustUseProperty.includes(u)&&(h.mustUseProperty=!0),a[u]=h,r[oo(u)]=u,r[oo(h.attribute)]=u}return new Ra(a,r,n.space)}const Jp=Ci({properties:{ariaActiveDescendant:null,ariaAtomic:yt,ariaAutoComplete:null,ariaBusy:yt,ariaChecked:yt,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:at,ariaCurrent:null,ariaDescribedBy:at,ariaDetails:null,ariaDisabled:yt,ariaDropEffect:at,ariaErrorMessage:null,ariaExpanded:yt,ariaFlowTo:at,ariaGrabbed:yt,ariaHasPopup:null,ariaHidden:yt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:at,ariaLevel:re,ariaLive:null,ariaModal:yt,ariaMultiLine:yt,ariaMultiSelectable:yt,ariaOrientation:null,ariaOwns:at,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:yt,ariaReadOnly:yt,ariaRelevant:null,ariaRequired:yt,ariaRoleDescription:at,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:yt,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null},transform(n,a){return a==="role"?a:"aria-"+a.slice(4).toLowerCase()}});function $p(n,a){return a in n?n[a]:a}function Ip(n,a){return $p(n,a.toLowerCase())}const Iv=Ci({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:wi,acceptCharset:at,accessKey:at,action:null,allow:null,allowFullScreen:Re,allowPaymentRequest:Re,allowUserMedia:Re,alt:null,as:null,async:Re,autoCapitalize:null,autoComplete:at,autoFocus:Re,autoPlay:Re,blocking:at,capture:null,charSet:null,checked:Re,cite:null,className:at,cols:re,colSpan:null,content:null,contentEditable:yt,controls:Re,controlsList:at,coords:re|wi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Re,defer:Re,dir:null,dirName:null,disabled:Re,download:fo,draggable:yt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Re,formTarget:null,headers:at,height:re,hidden:fo,high:re,href:null,hrefLang:null,htmlFor:at,httpEquiv:at,id:null,imageSizes:null,imageSrcSet:null,inert:Re,inputMode:null,integrity:null,is:null,isMap:Re,itemId:null,itemProp:at,itemRef:at,itemScope:Re,itemType:at,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Re,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:Re,muted:Re,name:null,nonce:null,noModule:Re,noValidate:Re,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Re,optimum:re,pattern:null,ping:at,placeholder:null,playsInline:Re,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Re,referrerPolicy:null,rel:at,required:Re,reversed:Re,rows:re,rowSpan:re,sandbox:at,scope:null,scoped:Re,seamless:Re,selected:Re,shadowRootClonable:Re,shadowRootDelegatesFocus:Re,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:yt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:Re,useMap:null,value:yt,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:at,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Re,declare:Re,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:Re,noHref:Re,noShade:Re,noWrap:Re,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:yt,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Re,disableRemotePlayback:Re,prefix:null,property:null,results:re,security:null,unselectable:null},space:"html",transform:Ip}),Wv=Ci({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Pt,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:at,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:Re,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:wi,g2:wi,glyphName:wi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:Pt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:re,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:at,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pt,rev:Pt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pt,requiredFeatures:Pt,requiredFonts:Pt,requiredFormats:Pt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:Pt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pt,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:$p}),Wp=Ci({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,a){return"xlink:"+a.slice(5).toLowerCase()}}),Pp=Ci({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ip}),eg=Ci({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,a){return"xml:"+a.slice(3).toLowerCase()}}),Pv={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},e0=/[A-Z]/g,ip=/-[a-z]/g,t0=/^data[-\w.:]+$/i;function n0(n,a){const r=oo(a);let u=a,o=Gt;if(r in n.normal)return n.property[n.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&t0.test(a)){if(a.charAt(4)==="-"){const h=a.slice(5).replace(ip,i0);u="data"+h.charAt(0).toUpperCase()+h.slice(1)}else{const h=a.slice(4);if(!ip.test(h)){let f=h.replace(e0,l0);f.charAt(0)!=="-"&&(f="-"+f),a="data"+f}}o=No}return new o(u,a)}function l0(n){return"-"+n.toLowerCase()}function i0(n){return n.charAt(1).toUpperCase()}const a0=Fp([Jp,Iv,Wp,Pp,eg],"html"),Eo=Fp([Jp,Wv,Wp,Pp,eg],"svg");function r0(n){return n.join(" ").trim()}var Ni={},Gc,ap;function u0(){if(ap)return Gc;ap=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,a=/\n/g,r=/^\s*/,u=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,h=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,p=/^\s+|\s+$/g,g=`
60
+ `,m="/",v="*",y="",j="comment",b="declaration";function w(K,C){if(typeof K!="string")throw new TypeError("First argument must be a string");if(!K)return[];C=C||{};var X=1,Y=1;function Z(se){var P=se.match(a);P&&(X+=P.length);var D=se.lastIndexOf(g);Y=~D?se.length-D:Y+se.length}function oe(){var se={line:X,column:Y};return function(P){return P.position=new M(se),pe(),P}}function M(se){this.start=se,this.end={line:X,column:Y},this.source=C.source}M.prototype.content=K;function ne(se){var P=new Error(C.source+":"+X+":"+Y+": "+se);if(P.reason=se,P.filename=C.source,P.line=X,P.column=Y,P.source=K,!C.silent)throw P}function me(se){var P=se.exec(K);if(P){var D=P[0];return Z(D),K=K.slice(D.length),P}}function pe(){me(r)}function O(se){var P;for(se=se||[];P=ae();)P!==!1&&se.push(P);return se}function ae(){var se=oe();if(!(m!=K.charAt(0)||v!=K.charAt(1))){for(var P=2;y!=K.charAt(P)&&(v!=K.charAt(P)||m!=K.charAt(P+1));)++P;if(P+=2,y===K.charAt(P-1))return ne("End of comment missing");var D=K.slice(2,P-2);return Y+=2,Z(D),K=K.slice(P),Y+=2,se({type:j,comment:D})}}function le(){var se=oe(),P=me(u);if(P){if(ae(),!me(o))return ne("property missing ':'");var D=me(h),I=se({type:b,property:B(P[0].replace(n,y)),value:D?B(D[0].replace(n,y)):y});return me(f),I}}function Ee(){var se=[];O(se);for(var P;P=le();)P!==!1&&(se.push(P),O(se));return se}return pe(),Ee()}function B(K){return K?K.replace(p,y):y}return Gc=w,Gc}var rp;function s0(){if(rp)return Ni;rp=1;var n=Ni&&Ni.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.default=r;const a=n(u0());function r(u,o){let h=null;if(!u||typeof u!="string")return h;const f=(0,a.default)(u),p=typeof o=="function";return f.forEach(g=>{if(g.type!=="declaration")return;const{property:m,value:v}=g;p?o(m,v,g):v&&(h=h||{},h[m]=v)}),h}return Ni}var Ea={},up;function c0(){if(up)return Ea;up=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,a=/-([a-z])/g,r=/^[^-]+$/,u=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,h=function(m){return!m||r.test(m)||n.test(m)},f=function(m,v){return v.toUpperCase()},p=function(m,v){return"".concat(v,"-")},g=function(m,v){return v===void 0&&(v={}),h(m)?m:(m=m.toLowerCase(),v.reactCompat?m=m.replace(o,p):m=m.replace(u,p),m.replace(a,f))};return Ea.camelCase=g,Ea}var Ta,sp;function o0(){if(sp)return Ta;sp=1;var n=Ta&&Ta.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},a=n(s0()),r=c0();function u(o,h){var f={};return!o||typeof o!="string"||(0,a.default)(o,function(p,g){p&&g&&(f[(0,r.camelCase)(p,h)]=g)}),f}return u.default=u,Ta=u,Ta}var f0=o0();const d0=hu(f0),tg=ng("end"),To=ng("start");function ng(n){return a;function a(r){const u=r&&r.position&&r.position[n]||{};if(typeof u.line=="number"&&u.line>0&&typeof u.column=="number"&&u.column>0)return{line:u.line,column:u.column,offset:typeof u.offset=="number"&&u.offset>-1?u.offset:void 0}}}function h0(n){const a=To(n),r=tg(n);if(a&&r)return{start:a,end:r}}function za(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?cp(n.position):"start"in n||"end"in n?cp(n):"line"in n||"column"in n?mo(n):""}function mo(n){return op(n&&n.line)+":"+op(n&&n.column)}function cp(n){return mo(n&&n.start)+"-"+mo(n&&n.end)}function op(n){return n&&typeof n=="number"?n:1}class zt extends Error{constructor(a,r,u){super(),typeof r=="string"&&(u=r,r=void 0);let o="",h={},f=!1;if(r&&("line"in r&&"column"in r?h={place:r}:"start"in r&&"end"in r?h={place:r}:"type"in r?h={ancestors:[r],place:r.position}:h={...r}),typeof a=="string"?o=a:!h.cause&&a&&(f=!0,o=a.message,h.cause=a),!h.ruleId&&!h.source&&typeof u=="string"){const g=u.indexOf(":");g===-1?h.ruleId=u:(h.source=u.slice(0,g),h.ruleId=u.slice(g+1))}if(!h.place&&h.ancestors&&h.ancestors){const g=h.ancestors[h.ancestors.length-1];g&&(h.place=g.position)}const p=h.place&&"start"in h.place?h.place.start:h.place;this.ancestors=h.ancestors||void 0,this.cause=h.cause||void 0,this.column=p?p.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=p?p.line:void 0,this.name=za(h.place)||"1:1",this.place=h.place||void 0,this.reason=this.message,this.ruleId=h.ruleId||void 0,this.source=h.source||void 0,this.stack=f&&h.cause&&typeof h.cause.stack=="string"?h.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}zt.prototype.file="";zt.prototype.name="";zt.prototype.reason="";zt.prototype.message="";zt.prototype.stack="";zt.prototype.column=void 0;zt.prototype.line=void 0;zt.prototype.ancestors=void 0;zt.prototype.cause=void 0;zt.prototype.fatal=void 0;zt.prototype.place=void 0;zt.prototype.ruleId=void 0;zt.prototype.source=void 0;const wo={}.hasOwnProperty,m0=new Map,p0=/[A-Z]/g,g0=new Set(["table","tbody","thead","tfoot","tr"]),y0=new Set(["td","th"]),lg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function x0(n,a){if(!a||a.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=a.filePath||void 0;let u;if(a.development){if(typeof a.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");u=T0(r,a.jsxDEV)}else{if(typeof a.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof a.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");u=E0(r,a.jsx,a.jsxs)}const o={Fragment:a.Fragment,ancestors:[],components:a.components||{},create:u,elementAttributeNameCase:a.elementAttributeNameCase||"react",evaluater:a.createEvaluater?a.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:a.ignoreInvalidStyle||!1,passKeys:a.passKeys!==!1,passNode:a.passNode||!1,schema:a.space==="svg"?Eo:a0,stylePropertyNameCase:a.stylePropertyNameCase||"dom",tableCellAlignToStyle:a.tableCellAlignToStyle!==!1},h=ig(o,n,void 0);return h&&typeof h!="string"?h:o.create(n,o.Fragment,{children:h||void 0},void 0)}function ig(n,a,r){if(a.type==="element")return v0(n,a,r);if(a.type==="mdxFlowExpression"||a.type==="mdxTextExpression")return b0(n,a);if(a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement")return j0(n,a,r);if(a.type==="mdxjsEsm")return S0(n,a);if(a.type==="root")return k0(n,a,r);if(a.type==="text")return N0(n,a)}function v0(n,a,r){const u=n.schema;let o=u;a.tagName.toLowerCase()==="svg"&&u.space==="html"&&(o=Eo,n.schema=o),n.ancestors.push(a);const h=rg(n,a.tagName,!1),f=w0(n,a);let p=Co(n,a);return g0.has(a.tagName)&&(p=p.filter(function(g){return typeof g=="string"?!Jv(g):!0})),ag(n,f,h,a),Ao(f,p),n.ancestors.pop(),n.schema=u,n.create(a,h,f,r)}function b0(n,a){if(a.data&&a.data.estree&&n.evaluater){const u=a.data.estree.body[0];return u.type,n.evaluater.evaluateExpression(u.expression)}Ma(n,a.position)}function S0(n,a){if(a.data&&a.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(a.data.estree);Ma(n,a.position)}function j0(n,a,r){const u=n.schema;let o=u;a.name==="svg"&&u.space==="html"&&(o=Eo,n.schema=o),n.ancestors.push(a);const h=a.name===null?n.Fragment:rg(n,a.name,!0),f=A0(n,a),p=Co(n,a);return ag(n,f,h,a),Ao(f,p),n.ancestors.pop(),n.schema=u,n.create(a,h,f,r)}function k0(n,a,r){const u={};return Ao(u,Co(n,a)),n.create(a,n.Fragment,u,r)}function N0(n,a){return a.value}function ag(n,a,r,u){typeof r!="string"&&r!==n.Fragment&&n.passNode&&(a.node=u)}function Ao(n,a){if(a.length>0){const r=a.length>1?a:a[0];r&&(n.children=r)}}function E0(n,a,r){return u;function u(o,h,f,p){const m=Array.isArray(f.children)?r:a;return p?m(h,f,p):m(h,f)}}function T0(n,a){return r;function r(u,o,h,f){const p=Array.isArray(h.children),g=To(u);return a(o,h,f,p,{columnNumber:g?g.column-1:void 0,fileName:n,lineNumber:g?g.line:void 0},void 0)}}function w0(n,a){const r={};let u,o;for(o in a.properties)if(o!=="children"&&wo.call(a.properties,o)){const h=C0(n,o,a.properties[o]);if(h){const[f,p]=h;n.tableCellAlignToStyle&&f==="align"&&typeof p=="string"&&y0.has(a.tagName)?u=p:r[f]=p}}if(u){const h=r.style||(r.style={});h[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=u}return r}function A0(n,a){const r={};for(const u of a.attributes)if(u.type==="mdxJsxExpressionAttribute")if(u.data&&u.data.estree&&n.evaluater){const h=u.data.estree.body[0];h.type;const f=h.expression;f.type;const p=f.properties[0];p.type,Object.assign(r,n.evaluater.evaluateExpression(p.argument))}else Ma(n,a.position);else{const o=u.name;let h;if(u.value&&typeof u.value=="object")if(u.value.data&&u.value.data.estree&&n.evaluater){const p=u.value.data.estree.body[0];p.type,h=n.evaluater.evaluateExpression(p.expression)}else Ma(n,a.position);else h=u.value===null?!0:u.value;r[o]=h}return r}function Co(n,a){const r=[];let u=-1;const o=n.passKeys?new Map:m0;for(;++u<a.children.length;){const h=a.children[u];let f;if(n.passKeys){const g=h.type==="element"?h.tagName:h.type==="mdxJsxFlowElement"||h.type==="mdxJsxTextElement"?h.name:void 0;if(g){const m=o.get(g)||0;f=g+"-"+m,o.set(g,m+1)}}const p=ig(n,h,f);p!==void 0&&r.push(p)}return r}function C0(n,a,r){const u=n0(n.schema,a);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=u.commaSeparated?Vv(r):r0(r)),u.property==="style"){let o=typeof r=="object"?r:z0(n,String(r));return n.stylePropertyNameCase==="css"&&(o=D0(o)),["style",o]}return[n.elementAttributeNameCase==="react"&&u.space?Pv[u.property]||u.property:u.attribute,r]}}function z0(n,a){try{return d0(a,{reactCompat:!0})}catch(r){if(n.ignoreInvalidStyle)return{};const u=r,o=new zt("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:u,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=n.filePath||void 0,o.url=lg+"#cannot-parse-style-attribute",o}}function rg(n,a,r){let u;if(!r)u={type:"Literal",value:a};else if(a.includes(".")){const o=a.split(".");let h=-1,f;for(;++h<o.length;){const p=tp(o[h])?{type:"Identifier",name:o[h]}:{type:"Literal",value:o[h]};f=f?{type:"MemberExpression",object:f,property:p,computed:!!(h&&p.type==="Literal"),optional:!1}:p}u=f}else u=tp(a)&&!/^[a-z]/.test(a)?{type:"Identifier",name:a}:{type:"Literal",value:a};if(u.type==="Literal"){const o=u.value;return wo.call(n.components,o)?n.components[o]:o}if(n.evaluater)return n.evaluater.evaluateExpression(u);Ma(n)}function Ma(n,a){const r=new zt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:a,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=n.filePath||void 0,r.url=lg+"#cannot-handle-mdx-estrees-without-createevaluater",r}function D0(n){const a={};let r;for(r in n)wo.call(n,r)&&(a[_0(r)]=n[r]);return a}function _0(n){let a=n.replace(p0,M0);return a.slice(0,3)==="ms-"&&(a="-"+a),a}function M0(n){return"-"+n.toLowerCase()}const Vc={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},O0={};function zo(n,a){const r=O0,u=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return ug(n,u,o)}function ug(n,a,r){if(R0(n)){if("value"in n)return n.type==="html"&&!r?"":n.value;if(a&&"alt"in n&&n.alt)return n.alt;if("children"in n)return fp(n.children,a,r)}return Array.isArray(n)?fp(n,a,r):""}function fp(n,a,r){const u=[];let o=-1;for(;++o<n.length;)u[o]=ug(n[o],a,r);return u.join("")}function R0(n){return!!(n&&typeof n=="object")}const dp=document.createElement("i");function Do(n){const a="&"+n+";";dp.innerHTML=a;const r=dp.textContent;return r.charCodeAt(r.length-1)===59&&n!=="semi"||r===a?!1:r}function en(n,a,r,u){const o=n.length;let h=0,f;if(a<0?a=-a>o?0:o+a:a=a>o?o:a,r=r>0?r:0,u.length<1e4)f=Array.from(u),f.unshift(a,r),n.splice(...f);else for(r&&n.splice(a,r);h<u.length;)f=u.slice(h,h+1e4),f.unshift(a,0),n.splice(...f),h+=1e4,a+=1e4}function dn(n,a){return n.length>0?(en(n,n.length,0,a),n):a}const hp={}.hasOwnProperty;function sg(n){const a={};let r=-1;for(;++r<n.length;)L0(a,n[r]);return a}function L0(n,a){let r;for(r in a){const o=(hp.call(n,r)?n[r]:void 0)||(n[r]={}),h=a[r];let f;if(h)for(f in h){hp.call(o,f)||(o[f]=[]);const p=h[f];B0(o[f],Array.isArray(p)?p:p?[p]:[])}}}function B0(n,a){let r=-1;const u=[];for(;++r<a.length;)(a[r].add==="after"?n:u).push(a[r]);en(n,0,0,u)}function cg(n,a){const r=Number.parseInt(n,a);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function yn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mt=yl(/[A-Za-z]/),Ct=yl(/[\dA-Za-z]/),U0=yl(/[#-'*+\--9=?A-Z^-~]/);function su(n){return n!==null&&(n<32||n===127)}const po=yl(/\d/),H0=yl(/[\dA-Fa-f]/),q0=yl(/[!-/:-@[-`{-~]/);function Ne(n){return n!==null&&n<-2}function it(n){return n!==null&&(n<0||n===32)}function He(n){return n===-2||n===-1||n===32}const pu=yl(new RegExp("\\p{P}|\\p{S}","u")),Bl=yl(/\s/);function yl(n){return a;function a(r){return r!==null&&r>-1&&n.test(String.fromCharCode(r))}}function zi(n){const a=[];let r=-1,u=0,o=0;for(;++r<n.length;){const h=n.charCodeAt(r);let f="";if(h===37&&Ct(n.charCodeAt(r+1))&&Ct(n.charCodeAt(r+2)))o=2;else if(h<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(h))||(f=String.fromCharCode(h));else if(h>55295&&h<57344){const p=n.charCodeAt(r+1);h<56320&&p>56319&&p<57344?(f=String.fromCharCode(h,p),o=1):f="�"}else f=String.fromCharCode(h);f&&(a.push(n.slice(u,r),encodeURIComponent(f)),u=r+o+1,f=""),o&&(r+=o,o=0)}return a.join("")+n.slice(u)}function Qe(n,a,r,u){const o=u?u-1:Number.POSITIVE_INFINITY;let h=0;return f;function f(g){return He(g)?(n.enter(r),p(g)):a(g)}function p(g){return He(g)&&h++<o?(n.consume(g),p):(n.exit(r),a(g))}}const Y0={tokenize:K0};function K0(n){const a=n.attempt(this.parser.constructs.contentInitial,u,o);let r;return a;function u(p){if(p===null){n.consume(p);return}return n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),Qe(n,a,"linePrefix")}function o(p){return n.enter("paragraph"),h(p)}function h(p){const g=n.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=g),r=g,f(p)}function f(p){if(p===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(p);return}return Ne(p)?(n.consume(p),n.exit("chunkText"),h):(n.consume(p),f)}}const G0={tokenize:V0},mp={tokenize:Q0};function V0(n){const a=this,r=[];let u=0,o,h,f;return p;function p(Y){if(u<r.length){const Z=r[u];return a.containerState=Z[1],n.attempt(Z[0].continuation,g,m)(Y)}return m(Y)}function g(Y){if(u++,a.containerState._closeFlow){a.containerState._closeFlow=void 0,o&&X();const Z=a.events.length;let oe=Z,M;for(;oe--;)if(a.events[oe][0]==="exit"&&a.events[oe][1].type==="chunkFlow"){M=a.events[oe][1].end;break}C(u);let ne=Z;for(;ne<a.events.length;)a.events[ne][1].end={...M},ne++;return en(a.events,oe+1,0,a.events.slice(Z)),a.events.length=ne,m(Y)}return p(Y)}function m(Y){if(u===r.length){if(!o)return j(Y);if(o.currentConstruct&&o.currentConstruct.concrete)return w(Y);a.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return a.containerState={},n.check(mp,v,y)(Y)}function v(Y){return o&&X(),C(u),j(Y)}function y(Y){return a.parser.lazy[a.now().line]=u!==r.length,f=a.now().offset,w(Y)}function j(Y){return a.containerState={},n.attempt(mp,b,w)(Y)}function b(Y){return u++,r.push([a.currentConstruct,a.containerState]),j(Y)}function w(Y){if(Y===null){o&&X(),C(0),n.consume(Y);return}return o=o||a.parser.flow(a.now()),n.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:h}),B(Y)}function B(Y){if(Y===null){K(n.exit("chunkFlow"),!0),C(0),n.consume(Y);return}return Ne(Y)?(n.consume(Y),K(n.exit("chunkFlow")),u=0,a.interrupt=void 0,p):(n.consume(Y),B)}function K(Y,Z){const oe=a.sliceStream(Y);if(Z&&oe.push(null),Y.previous=h,h&&(h.next=Y),h=Y,o.defineSkip(Y.start),o.write(oe),a.parser.lazy[Y.start.line]){let M=o.events.length;for(;M--;)if(o.events[M][1].start.offset<f&&(!o.events[M][1].end||o.events[M][1].end.offset>f))return;const ne=a.events.length;let me=ne,pe,O;for(;me--;)if(a.events[me][0]==="exit"&&a.events[me][1].type==="chunkFlow"){if(pe){O=a.events[me][1].end;break}pe=!0}for(C(u),M=ne;M<a.events.length;)a.events[M][1].end={...O},M++;en(a.events,me+1,0,a.events.slice(ne)),a.events.length=M}}function C(Y){let Z=r.length;for(;Z-- >Y;){const oe=r[Z];a.containerState=oe[1],oe[0].exit.call(a,n)}r.length=Y}function X(){o.write([null]),h=void 0,o=void 0,a.containerState._closeFlow=void 0}}function Q0(n,a,r){return Qe(n,n.attempt(this.parser.constructs.document,a,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ai(n){if(n===null||it(n)||Bl(n))return 1;if(pu(n))return 2}function gu(n,a,r){const u=[];let o=-1;for(;++o<n.length;){const h=n[o].resolveAll;h&&!u.includes(h)&&(a=h(a,r),u.push(h))}return a}const go={name:"attention",resolveAll:X0,tokenize:Z0};function X0(n,a){let r=-1,u,o,h,f,p,g,m,v;for(;++r<n.length;)if(n[r][0]==="enter"&&n[r][1].type==="attentionSequence"&&n[r][1]._close){for(u=r;u--;)if(n[u][0]==="exit"&&n[u][1].type==="attentionSequence"&&n[u][1]._open&&a.sliceSerialize(n[u][1]).charCodeAt(0)===a.sliceSerialize(n[r][1]).charCodeAt(0)){if((n[u][1]._close||n[r][1]._open)&&(n[r][1].end.offset-n[r][1].start.offset)%3&&!((n[u][1].end.offset-n[u][1].start.offset+n[r][1].end.offset-n[r][1].start.offset)%3))continue;g=n[u][1].end.offset-n[u][1].start.offset>1&&n[r][1].end.offset-n[r][1].start.offset>1?2:1;const y={...n[u][1].end},j={...n[r][1].start};pp(y,-g),pp(j,g),f={type:g>1?"strongSequence":"emphasisSequence",start:y,end:{...n[u][1].end}},p={type:g>1?"strongSequence":"emphasisSequence",start:{...n[r][1].start},end:j},h={type:g>1?"strongText":"emphasisText",start:{...n[u][1].end},end:{...n[r][1].start}},o={type:g>1?"strong":"emphasis",start:{...f.start},end:{...p.end}},n[u][1].end={...f.start},n[r][1].start={...p.end},m=[],n[u][1].end.offset-n[u][1].start.offset&&(m=dn(m,[["enter",n[u][1],a],["exit",n[u][1],a]])),m=dn(m,[["enter",o,a],["enter",f,a],["exit",f,a],["enter",h,a]]),m=dn(m,gu(a.parser.constructs.insideSpan.null,n.slice(u+1,r),a)),m=dn(m,[["exit",h,a],["enter",p,a],["exit",p,a],["exit",o,a]]),n[r][1].end.offset-n[r][1].start.offset?(v=2,m=dn(m,[["enter",n[r][1],a],["exit",n[r][1],a]])):v=0,en(n,u-1,r-u+3,m),r=u+m.length-v-2;break}}for(r=-1;++r<n.length;)n[r][1].type==="attentionSequence"&&(n[r][1].type="data");return n}function Z0(n,a){const r=this.parser.constructs.attentionMarkers.null,u=this.previous,o=Ai(u);let h;return f;function f(g){return h=g,n.enter("attentionSequence"),p(g)}function p(g){if(g===h)return n.consume(g),p;const m=n.exit("attentionSequence"),v=Ai(g),y=!v||v===2&&o||r.includes(g),j=!o||o===2&&v||r.includes(u);return m._open=!!(h===42?y:y&&(o||!j)),m._close=!!(h===42?j:j&&(v||!y)),a(g)}}function pp(n,a){n.column+=a,n.offset+=a,n._bufferIndex+=a}const F0={name:"autolink",tokenize:J0};function J0(n,a,r){let u=0;return o;function o(b){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),h}function h(b){return Mt(b)?(n.consume(b),f):b===64?r(b):m(b)}function f(b){return b===43||b===45||b===46||Ct(b)?(u=1,p(b)):m(b)}function p(b){return b===58?(n.consume(b),u=0,g):(b===43||b===45||b===46||Ct(b))&&u++<32?(n.consume(b),p):(u=0,m(b))}function g(b){return b===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.exit("autolink"),a):b===null||b===32||b===60||su(b)?r(b):(n.consume(b),g)}function m(b){return b===64?(n.consume(b),v):U0(b)?(n.consume(b),m):r(b)}function v(b){return Ct(b)?y(b):r(b)}function y(b){return b===46?(n.consume(b),u=0,v):b===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.exit("autolink"),a):j(b)}function j(b){if((b===45||Ct(b))&&u++<63){const w=b===45?j:y;return n.consume(b),w}return r(b)}}const La={partial:!0,tokenize:$0};function $0(n,a,r){return u;function u(h){return He(h)?Qe(n,o,"linePrefix")(h):o(h)}function o(h){return h===null||Ne(h)?a(h):r(h)}}const og={continuation:{tokenize:W0},exit:P0,name:"blockQuote",tokenize:I0};function I0(n,a,r){const u=this;return o;function o(f){if(f===62){const p=u.containerState;return p.open||(n.enter("blockQuote",{_container:!0}),p.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(f),n.exit("blockQuoteMarker"),h}return r(f)}function h(f){return He(f)?(n.enter("blockQuotePrefixWhitespace"),n.consume(f),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),a):(n.exit("blockQuotePrefix"),a(f))}}function W0(n,a,r){const u=this;return o;function o(f){return He(f)?Qe(n,h,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):h(f)}function h(f){return n.attempt(og,a,r)(f)}}function P0(n){n.exit("blockQuote")}const fg={name:"characterEscape",tokenize:eb};function eb(n,a,r){return u;function u(h){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(h),n.exit("escapeMarker"),o}function o(h){return q0(h)?(n.enter("characterEscapeValue"),n.consume(h),n.exit("characterEscapeValue"),n.exit("characterEscape"),a):r(h)}}const dg={name:"characterReference",tokenize:tb};function tb(n,a,r){const u=this;let o=0,h,f;return p;function p(y){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),g}function g(y){return y===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(y),n.exit("characterReferenceMarkerNumeric"),m):(n.enter("characterReferenceValue"),h=31,f=Ct,v(y))}function m(y){return y===88||y===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(y),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),h=6,f=H0,v):(n.enter("characterReferenceValue"),h=7,f=po,v(y))}function v(y){if(y===59&&o){const j=n.exit("characterReferenceValue");return f===Ct&&!Do(u.sliceSerialize(j))?r(y):(n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),n.exit("characterReference"),a)}return f(y)&&o++<h?(n.consume(y),v):r(y)}}const gp={partial:!0,tokenize:lb},yp={concrete:!0,name:"codeFenced",tokenize:nb};function nb(n,a,r){const u=this,o={partial:!0,tokenize:oe};let h=0,f=0,p;return g;function g(M){return m(M)}function m(M){const ne=u.events[u.events.length-1];return h=ne&&ne[1].type==="linePrefix"?ne[2].sliceSerialize(ne[1],!0).length:0,p=M,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),v(M)}function v(M){return M===p?(f++,n.consume(M),v):f<3?r(M):(n.exit("codeFencedFenceSequence"),He(M)?Qe(n,y,"whitespace")(M):y(M))}function y(M){return M===null||Ne(M)?(n.exit("codeFencedFence"),u.interrupt?a(M):n.check(gp,B,Z)(M)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),j(M))}function j(M){return M===null||Ne(M)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),y(M)):He(M)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Qe(n,b,"whitespace")(M)):M===96&&M===p?r(M):(n.consume(M),j)}function b(M){return M===null||Ne(M)?y(M):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),w(M))}function w(M){return M===null||Ne(M)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),y(M)):M===96&&M===p?r(M):(n.consume(M),w)}function B(M){return n.attempt(o,Z,K)(M)}function K(M){return n.enter("lineEnding"),n.consume(M),n.exit("lineEnding"),C}function C(M){return h>0&&He(M)?Qe(n,X,"linePrefix",h+1)(M):X(M)}function X(M){return M===null||Ne(M)?n.check(gp,B,Z)(M):(n.enter("codeFlowValue"),Y(M))}function Y(M){return M===null||Ne(M)?(n.exit("codeFlowValue"),X(M)):(n.consume(M),Y)}function Z(M){return n.exit("codeFenced"),a(M)}function oe(M,ne,me){let pe=0;return O;function O(P){return M.enter("lineEnding"),M.consume(P),M.exit("lineEnding"),ae}function ae(P){return M.enter("codeFencedFence"),He(P)?Qe(M,le,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):le(P)}function le(P){return P===p?(M.enter("codeFencedFenceSequence"),Ee(P)):me(P)}function Ee(P){return P===p?(pe++,M.consume(P),Ee):pe>=f?(M.exit("codeFencedFenceSequence"),He(P)?Qe(M,se,"whitespace")(P):se(P)):me(P)}function se(P){return P===null||Ne(P)?(M.exit("codeFencedFence"),ne(P)):me(P)}}}function lb(n,a,r){const u=this;return o;function o(f){return f===null?r(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),h)}function h(f){return u.parser.lazy[u.now().line]?r(f):a(f)}}const Qc={name:"codeIndented",tokenize:ab},ib={partial:!0,tokenize:rb};function ab(n,a,r){const u=this;return o;function o(m){return n.enter("codeIndented"),Qe(n,h,"linePrefix",5)(m)}function h(m){const v=u.events[u.events.length-1];return v&&v[1].type==="linePrefix"&&v[2].sliceSerialize(v[1],!0).length>=4?f(m):r(m)}function f(m){return m===null?g(m):Ne(m)?n.attempt(ib,f,g)(m):(n.enter("codeFlowValue"),p(m))}function p(m){return m===null||Ne(m)?(n.exit("codeFlowValue"),f(m)):(n.consume(m),p)}function g(m){return n.exit("codeIndented"),a(m)}}function rb(n,a,r){const u=this;return o;function o(f){return u.parser.lazy[u.now().line]?r(f):Ne(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),o):Qe(n,h,"linePrefix",5)(f)}function h(f){const p=u.events[u.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?a(f):Ne(f)?o(f):r(f)}}const ub={name:"codeText",previous:cb,resolve:sb,tokenize:ob};function sb(n){let a=n.length-4,r=3,u,o;if((n[r][1].type==="lineEnding"||n[r][1].type==="space")&&(n[a][1].type==="lineEnding"||n[a][1].type==="space")){for(u=r;++u<a;)if(n[u][1].type==="codeTextData"){n[r][1].type="codeTextPadding",n[a][1].type="codeTextPadding",r+=2,a-=2;break}}for(u=r-1,a++;++u<=a;)o===void 0?u!==a&&n[u][1].type!=="lineEnding"&&(o=u):(u===a||n[u][1].type==="lineEnding")&&(n[o][1].type="codeTextData",u!==o+2&&(n[o][1].end=n[u-1][1].end,n.splice(o+2,u-o-2),a-=u-o-2,u=o+2),o=void 0);return n}function cb(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ob(n,a,r){let u=0,o,h;return f;function f(y){return n.enter("codeText"),n.enter("codeTextSequence"),p(y)}function p(y){return y===96?(n.consume(y),u++,p):(n.exit("codeTextSequence"),g(y))}function g(y){return y===null?r(y):y===32?(n.enter("space"),n.consume(y),n.exit("space"),g):y===96?(h=n.enter("codeTextSequence"),o=0,v(y)):Ne(y)?(n.enter("lineEnding"),n.consume(y),n.exit("lineEnding"),g):(n.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||Ne(y)?(n.exit("codeTextData"),g(y)):(n.consume(y),m)}function v(y){return y===96?(n.consume(y),o++,v):o===u?(n.exit("codeTextSequence"),n.exit("codeText"),a(y)):(h.type="codeTextData",m(y))}}class fb{constructor(a){this.left=a?[...a]:[],this.right=[]}get(a){if(a<0||a>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+a+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return a<this.left.length?this.left[a]:this.right[this.right.length-a+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(a,r){const u=r??Number.POSITIVE_INFINITY;return u<this.left.length?this.left.slice(a,u):a>this.left.length?this.right.slice(this.right.length-u+this.left.length,this.right.length-a+this.left.length).reverse():this.left.slice(a).concat(this.right.slice(this.right.length-u+this.left.length).reverse())}splice(a,r,u){const o=r||0;this.setCursor(Math.trunc(a));const h=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return u&&wa(this.left,u),h.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(a){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(a)}pushMany(a){this.setCursor(Number.POSITIVE_INFINITY),wa(this.left,a)}unshift(a){this.setCursor(0),this.right.push(a)}unshiftMany(a){this.setCursor(0),wa(this.right,a.reverse())}setCursor(a){if(!(a===this.left.length||a>this.left.length&&this.right.length===0||a<0&&this.left.length===0))if(a<this.left.length){const r=this.left.splice(a,Number.POSITIVE_INFINITY);wa(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-a,Number.POSITIVE_INFINITY);wa(this.left,r.reverse())}}}function wa(n,a){let r=0;if(a.length<1e4)n.push(...a);else for(;r<a.length;)n.push(...a.slice(r,r+1e4)),r+=1e4}function hg(n){const a={};let r=-1,u,o,h,f,p,g,m;const v=new fb(n);for(;++r<v.length;){for(;r in a;)r=a[r];if(u=v.get(r),r&&u[1].type==="chunkFlow"&&v.get(r-1)[1].type==="listItemPrefix"&&(g=u[1]._tokenizer.events,h=0,h<g.length&&g[h][1].type==="lineEndingBlank"&&(h+=2),h<g.length&&g[h][1].type==="content"))for(;++h<g.length&&g[h][1].type!=="content";)g[h][1].type==="chunkText"&&(g[h][1]._isInFirstContentOfListItem=!0,h++);if(u[0]==="enter")u[1].contentType&&(Object.assign(a,db(v,r)),r=a[r],m=!0);else if(u[1]._container){for(h=r,o=void 0;h--;)if(f=v.get(h),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(o&&(v.get(o)[1].type="lineEndingBlank"),f[1].type="lineEnding",o=h);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;o&&(u[1].end={...v.get(o)[1].start},p=v.slice(o,r),p.unshift(u),v.splice(o,r-o+1,p))}}return en(n,0,Number.POSITIVE_INFINITY,v.slice(0)),!m}function db(n,a){const r=n.get(a)[1],u=n.get(a)[2];let o=a-1;const h=[];let f=r._tokenizer;f||(f=u.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const p=f.events,g=[],m={};let v,y,j=-1,b=r,w=0,B=0;const K=[B];for(;b;){for(;n.get(++o)[1]!==b;);h.push(o),b._tokenizer||(v=u.sliceStream(b),b.next||v.push(null),y&&f.defineSkip(b.start),b._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(v),b._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=r;++j<p.length;)p[j][0]==="exit"&&p[j-1][0]==="enter"&&p[j][1].type===p[j-1][1].type&&p[j][1].start.line!==p[j][1].end.line&&(B=j+1,K.push(B),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(f.events=[],b?(b._tokenizer=void 0,b.previous=void 0):K.pop(),j=K.length;j--;){const C=p.slice(K[j],K[j+1]),X=h.pop();g.push([X,X+C.length-1]),n.splice(X,2,C)}for(g.reverse(),j=-1;++j<g.length;)m[w+g[j][0]]=w+g[j][1],w+=g[j][1]-g[j][0]-1;return m}const hb={resolve:pb,tokenize:gb},mb={partial:!0,tokenize:yb};function pb(n){return hg(n),n}function gb(n,a){let r;return u;function u(p){return n.enter("content"),r=n.enter("chunkContent",{contentType:"content"}),o(p)}function o(p){return p===null?h(p):Ne(p)?n.check(mb,f,h)(p):(n.consume(p),o)}function h(p){return n.exit("chunkContent"),n.exit("content"),a(p)}function f(p){return n.consume(p),n.exit("chunkContent"),r.next=n.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function yb(n,a,r){const u=this;return o;function o(f){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),Qe(n,h,"linePrefix")}function h(f){if(f===null||Ne(f))return r(f);const p=u.events[u.events.length-1];return!u.parser.constructs.disable.null.includes("codeIndented")&&p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?a(f):n.interrupt(u.parser.constructs.flow,r,a)(f)}}function mg(n,a,r,u,o,h,f,p,g){const m=g||Number.POSITIVE_INFINITY;let v=0;return y;function y(C){return C===60?(n.enter(u),n.enter(o),n.enter(h),n.consume(C),n.exit(h),j):C===null||C===32||C===41||su(C)?r(C):(n.enter(u),n.enter(f),n.enter(p),n.enter("chunkString",{contentType:"string"}),B(C))}function j(C){return C===62?(n.enter(h),n.consume(C),n.exit(h),n.exit(o),n.exit(u),a):(n.enter(p),n.enter("chunkString",{contentType:"string"}),b(C))}function b(C){return C===62?(n.exit("chunkString"),n.exit(p),j(C)):C===null||C===60||Ne(C)?r(C):(n.consume(C),C===92?w:b)}function w(C){return C===60||C===62||C===92?(n.consume(C),b):b(C)}function B(C){return!v&&(C===null||C===41||it(C))?(n.exit("chunkString"),n.exit(p),n.exit(f),n.exit(u),a(C)):v<m&&C===40?(n.consume(C),v++,B):C===41?(n.consume(C),v--,B):C===null||C===32||C===40||su(C)?r(C):(n.consume(C),C===92?K:B)}function K(C){return C===40||C===41||C===92?(n.consume(C),B):B(C)}}function pg(n,a,r,u,o,h){const f=this;let p=0,g;return m;function m(b){return n.enter(u),n.enter(o),n.consume(b),n.exit(o),n.enter(h),v}function v(b){return p>999||b===null||b===91||b===93&&!g||b===94&&!p&&"_hiddenFootnoteSupport"in f.parser.constructs?r(b):b===93?(n.exit(h),n.enter(o),n.consume(b),n.exit(o),n.exit(u),a):Ne(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),v):(n.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||Ne(b)||p++>999?(n.exit("chunkString"),v(b)):(n.consume(b),g||(g=!He(b)),b===92?j:y)}function j(b){return b===91||b===92||b===93?(n.consume(b),p++,y):y(b)}}function gg(n,a,r,u,o,h){let f;return p;function p(j){return j===34||j===39||j===40?(n.enter(u),n.enter(o),n.consume(j),n.exit(o),f=j===40?41:j,g):r(j)}function g(j){return j===f?(n.enter(o),n.consume(j),n.exit(o),n.exit(u),a):(n.enter(h),m(j))}function m(j){return j===f?(n.exit(h),g(f)):j===null?r(j):Ne(j)?(n.enter("lineEnding"),n.consume(j),n.exit("lineEnding"),Qe(n,m,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),v(j))}function v(j){return j===f||j===null||Ne(j)?(n.exit("chunkString"),m(j)):(n.consume(j),j===92?y:v)}function y(j){return j===f||j===92?(n.consume(j),v):v(j)}}function Da(n,a){let r;return u;function u(o){return Ne(o)?(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),r=!0,u):He(o)?Qe(n,u,r?"linePrefix":"lineSuffix")(o):a(o)}}const xb={name:"definition",tokenize:bb},vb={partial:!0,tokenize:Sb};function bb(n,a,r){const u=this;let o;return h;function h(b){return n.enter("definition"),f(b)}function f(b){return pg.call(u,n,p,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function p(b){return o=yn(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),b===58?(n.enter("definitionMarker"),n.consume(b),n.exit("definitionMarker"),g):r(b)}function g(b){return it(b)?Da(n,m)(b):m(b)}function m(b){return mg(n,v,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function v(b){return n.attempt(vb,y,y)(b)}function y(b){return He(b)?Qe(n,j,"whitespace")(b):j(b)}function j(b){return b===null||Ne(b)?(n.exit("definition"),u.parser.defined.push(o),a(b)):r(b)}}function Sb(n,a,r){return u;function u(p){return it(p)?Da(n,o)(p):r(p)}function o(p){return gg(n,h,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(p)}function h(p){return He(p)?Qe(n,f,"whitespace")(p):f(p)}function f(p){return p===null||Ne(p)?a(p):r(p)}}const jb={name:"hardBreakEscape",tokenize:kb};function kb(n,a,r){return u;function u(h){return n.enter("hardBreakEscape"),n.consume(h),o}function o(h){return Ne(h)?(n.exit("hardBreakEscape"),a(h)):r(h)}}const Nb={name:"headingAtx",resolve:Eb,tokenize:Tb};function Eb(n,a){let r=n.length-2,u=3,o,h;return n[u][1].type==="whitespace"&&(u+=2),r-2>u&&n[r][1].type==="whitespace"&&(r-=2),n[r][1].type==="atxHeadingSequence"&&(u===r-1||r-4>u&&n[r-2][1].type==="whitespace")&&(r-=u+1===r?2:4),r>u&&(o={type:"atxHeadingText",start:n[u][1].start,end:n[r][1].end},h={type:"chunkText",start:n[u][1].start,end:n[r][1].end,contentType:"text"},en(n,u,r-u+1,[["enter",o,a],["enter",h,a],["exit",h,a],["exit",o,a]])),n}function Tb(n,a,r){let u=0;return o;function o(v){return n.enter("atxHeading"),h(v)}function h(v){return n.enter("atxHeadingSequence"),f(v)}function f(v){return v===35&&u++<6?(n.consume(v),f):v===null||it(v)?(n.exit("atxHeadingSequence"),p(v)):r(v)}function p(v){return v===35?(n.enter("atxHeadingSequence"),g(v)):v===null||Ne(v)?(n.exit("atxHeading"),a(v)):He(v)?Qe(n,p,"whitespace")(v):(n.enter("atxHeadingText"),m(v))}function g(v){return v===35?(n.consume(v),g):(n.exit("atxHeadingSequence"),p(v))}function m(v){return v===null||v===35||it(v)?(n.exit("atxHeadingText"),p(v)):(n.consume(v),m)}}const wb=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],xp=["pre","script","style","textarea"],Ab={concrete:!0,name:"htmlFlow",resolveTo:Db,tokenize:_b},Cb={partial:!0,tokenize:Ob},zb={partial:!0,tokenize:Mb};function Db(n){let a=n.length;for(;a--&&!(n[a][0]==="enter"&&n[a][1].type==="htmlFlow"););return a>1&&n[a-2][1].type==="linePrefix"&&(n[a][1].start=n[a-2][1].start,n[a+1][1].start=n[a-2][1].start,n.splice(a-2,2)),n}function _b(n,a,r){const u=this;let o,h,f,p,g;return m;function m(k){return v(k)}function v(k){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(k),y}function y(k){return k===33?(n.consume(k),j):k===47?(n.consume(k),h=!0,B):k===63?(n.consume(k),o=3,u.interrupt?a:E):Mt(k)?(n.consume(k),f=String.fromCharCode(k),K):r(k)}function j(k){return k===45?(n.consume(k),o=2,b):k===91?(n.consume(k),o=5,p=0,w):Mt(k)?(n.consume(k),o=4,u.interrupt?a:E):r(k)}function b(k){return k===45?(n.consume(k),u.interrupt?a:E):r(k)}function w(k){const G="CDATA[";return k===G.charCodeAt(p++)?(n.consume(k),p===G.length?u.interrupt?a:le:w):r(k)}function B(k){return Mt(k)?(n.consume(k),f=String.fromCharCode(k),K):r(k)}function K(k){if(k===null||k===47||k===62||it(k)){const G=k===47,fe=f.toLowerCase();return!G&&!h&&xp.includes(fe)?(o=1,u.interrupt?a(k):le(k)):wb.includes(f.toLowerCase())?(o=6,G?(n.consume(k),C):u.interrupt?a(k):le(k)):(o=7,u.interrupt&&!u.parser.lazy[u.now().line]?r(k):h?X(k):Y(k))}return k===45||Ct(k)?(n.consume(k),f+=String.fromCharCode(k),K):r(k)}function C(k){return k===62?(n.consume(k),u.interrupt?a:le):r(k)}function X(k){return He(k)?(n.consume(k),X):O(k)}function Y(k){return k===47?(n.consume(k),O):k===58||k===95||Mt(k)?(n.consume(k),Z):He(k)?(n.consume(k),Y):O(k)}function Z(k){return k===45||k===46||k===58||k===95||Ct(k)?(n.consume(k),Z):oe(k)}function oe(k){return k===61?(n.consume(k),M):He(k)?(n.consume(k),oe):Y(k)}function M(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(n.consume(k),g=k,ne):He(k)?(n.consume(k),M):me(k)}function ne(k){return k===g?(n.consume(k),g=null,pe):k===null||Ne(k)?r(k):(n.consume(k),ne)}function me(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||it(k)?oe(k):(n.consume(k),me)}function pe(k){return k===47||k===62||He(k)?Y(k):r(k)}function O(k){return k===62?(n.consume(k),ae):r(k)}function ae(k){return k===null||Ne(k)?le(k):He(k)?(n.consume(k),ae):r(k)}function le(k){return k===45&&o===2?(n.consume(k),D):k===60&&o===1?(n.consume(k),I):k===62&&o===4?(n.consume(k),N):k===63&&o===3?(n.consume(k),E):k===93&&o===5?(n.consume(k),ee):Ne(k)&&(o===6||o===7)?(n.exit("htmlFlowData"),n.check(Cb,_,Ee)(k)):k===null||Ne(k)?(n.exit("htmlFlowData"),Ee(k)):(n.consume(k),le)}function Ee(k){return n.check(zb,se,_)(k)}function se(k){return n.enter("lineEnding"),n.consume(k),n.exit("lineEnding"),P}function P(k){return k===null||Ne(k)?Ee(k):(n.enter("htmlFlowData"),le(k))}function D(k){return k===45?(n.consume(k),E):le(k)}function I(k){return k===47?(n.consume(k),f="",de):le(k)}function de(k){if(k===62){const G=f.toLowerCase();return xp.includes(G)?(n.consume(k),N):le(k)}return Mt(k)&&f.length<8?(n.consume(k),f+=String.fromCharCode(k),de):le(k)}function ee(k){return k===93?(n.consume(k),E):le(k)}function E(k){return k===62?(n.consume(k),N):k===45&&o===2?(n.consume(k),E):le(k)}function N(k){return k===null||Ne(k)?(n.exit("htmlFlowData"),_(k)):(n.consume(k),N)}function _(k){return n.exit("htmlFlow"),a(k)}}function Mb(n,a,r){const u=this;return o;function o(f){return Ne(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),h):r(f)}function h(f){return u.parser.lazy[u.now().line]?r(f):a(f)}}function Ob(n,a,r){return u;function u(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),n.attempt(La,a,r)}}const Rb={name:"htmlText",tokenize:Lb};function Lb(n,a,r){const u=this;let o,h,f;return p;function p(E){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(E),g}function g(E){return E===33?(n.consume(E),m):E===47?(n.consume(E),oe):E===63?(n.consume(E),Y):Mt(E)?(n.consume(E),me):r(E)}function m(E){return E===45?(n.consume(E),v):E===91?(n.consume(E),h=0,w):Mt(E)?(n.consume(E),X):r(E)}function v(E){return E===45?(n.consume(E),b):r(E)}function y(E){return E===null?r(E):E===45?(n.consume(E),j):Ne(E)?(f=y,I(E)):(n.consume(E),y)}function j(E){return E===45?(n.consume(E),b):y(E)}function b(E){return E===62?D(E):E===45?j(E):y(E)}function w(E){const N="CDATA[";return E===N.charCodeAt(h++)?(n.consume(E),h===N.length?B:w):r(E)}function B(E){return E===null?r(E):E===93?(n.consume(E),K):Ne(E)?(f=B,I(E)):(n.consume(E),B)}function K(E){return E===93?(n.consume(E),C):B(E)}function C(E){return E===62?D(E):E===93?(n.consume(E),C):B(E)}function X(E){return E===null||E===62?D(E):Ne(E)?(f=X,I(E)):(n.consume(E),X)}function Y(E){return E===null?r(E):E===63?(n.consume(E),Z):Ne(E)?(f=Y,I(E)):(n.consume(E),Y)}function Z(E){return E===62?D(E):Y(E)}function oe(E){return Mt(E)?(n.consume(E),M):r(E)}function M(E){return E===45||Ct(E)?(n.consume(E),M):ne(E)}function ne(E){return Ne(E)?(f=ne,I(E)):He(E)?(n.consume(E),ne):D(E)}function me(E){return E===45||Ct(E)?(n.consume(E),me):E===47||E===62||it(E)?pe(E):r(E)}function pe(E){return E===47?(n.consume(E),D):E===58||E===95||Mt(E)?(n.consume(E),O):Ne(E)?(f=pe,I(E)):He(E)?(n.consume(E),pe):D(E)}function O(E){return E===45||E===46||E===58||E===95||Ct(E)?(n.consume(E),O):ae(E)}function ae(E){return E===61?(n.consume(E),le):Ne(E)?(f=ae,I(E)):He(E)?(n.consume(E),ae):pe(E)}function le(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(n.consume(E),o=E,Ee):Ne(E)?(f=le,I(E)):He(E)?(n.consume(E),le):(n.consume(E),se)}function Ee(E){return E===o?(n.consume(E),o=void 0,P):E===null?r(E):Ne(E)?(f=Ee,I(E)):(n.consume(E),Ee)}function se(E){return E===null||E===34||E===39||E===60||E===61||E===96?r(E):E===47||E===62||it(E)?pe(E):(n.consume(E),se)}function P(E){return E===47||E===62||it(E)?pe(E):r(E)}function D(E){return E===62?(n.consume(E),n.exit("htmlTextData"),n.exit("htmlText"),a):r(E)}function I(E){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(E),n.exit("lineEnding"),de}function de(E){return He(E)?Qe(n,ee,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):ee(E)}function ee(E){return n.enter("htmlTextData"),f(E)}}const _o={name:"labelEnd",resolveAll:qb,resolveTo:Yb,tokenize:Kb},Bb={tokenize:Gb},Ub={tokenize:Vb},Hb={tokenize:Qb};function qb(n){let a=-1;const r=[];for(;++a<n.length;){const u=n[a][1];if(r.push(n[a]),u.type==="labelImage"||u.type==="labelLink"||u.type==="labelEnd"){const o=u.type==="labelImage"?4:2;u.type="data",a+=o}}return n.length!==r.length&&en(n,0,n.length,r),n}function Yb(n,a){let r=n.length,u=0,o,h,f,p;for(;r--;)if(o=n[r][1],h){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;n[r][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(f){if(n[r][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(h=r,o.type!=="labelLink")){u=2;break}}else o.type==="labelEnd"&&(f=r);const g={type:n[h][1].type==="labelLink"?"link":"image",start:{...n[h][1].start},end:{...n[n.length-1][1].end}},m={type:"label",start:{...n[h][1].start},end:{...n[f][1].end}},v={type:"labelText",start:{...n[h+u+2][1].end},end:{...n[f-2][1].start}};return p=[["enter",g,a],["enter",m,a]],p=dn(p,n.slice(h+1,h+u+3)),p=dn(p,[["enter",v,a]]),p=dn(p,gu(a.parser.constructs.insideSpan.null,n.slice(h+u+4,f-3),a)),p=dn(p,[["exit",v,a],n[f-2],n[f-1],["exit",m,a]]),p=dn(p,n.slice(f+1)),p=dn(p,[["exit",g,a]]),en(n,h,n.length,p),n}function Kb(n,a,r){const u=this;let o=u.events.length,h,f;for(;o--;)if((u.events[o][1].type==="labelImage"||u.events[o][1].type==="labelLink")&&!u.events[o][1]._balanced){h=u.events[o][1];break}return p;function p(j){return h?h._inactive?y(j):(f=u.parser.defined.includes(yn(u.sliceSerialize({start:h.end,end:u.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(j),n.exit("labelMarker"),n.exit("labelEnd"),g):r(j)}function g(j){return j===40?n.attempt(Bb,v,f?v:y)(j):j===91?n.attempt(Ub,v,f?m:y)(j):f?v(j):y(j)}function m(j){return n.attempt(Hb,v,y)(j)}function v(j){return a(j)}function y(j){return h._balanced=!0,r(j)}}function Gb(n,a,r){return u;function u(y){return n.enter("resource"),n.enter("resourceMarker"),n.consume(y),n.exit("resourceMarker"),o}function o(y){return it(y)?Da(n,h)(y):h(y)}function h(y){return y===41?v(y):mg(n,f,p,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function f(y){return it(y)?Da(n,g)(y):v(y)}function p(y){return r(y)}function g(y){return y===34||y===39||y===40?gg(n,m,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):v(y)}function m(y){return it(y)?Da(n,v)(y):v(y)}function v(y){return y===41?(n.enter("resourceMarker"),n.consume(y),n.exit("resourceMarker"),n.exit("resource"),a):r(y)}}function Vb(n,a,r){const u=this;return o;function o(p){return pg.call(u,n,h,f,"reference","referenceMarker","referenceString")(p)}function h(p){return u.parser.defined.includes(yn(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)))?a(p):r(p)}function f(p){return r(p)}}function Qb(n,a,r){return u;function u(h){return n.enter("reference"),n.enter("referenceMarker"),n.consume(h),n.exit("referenceMarker"),o}function o(h){return h===93?(n.enter("referenceMarker"),n.consume(h),n.exit("referenceMarker"),n.exit("reference"),a):r(h)}}const Xb={name:"labelStartImage",resolveAll:_o.resolveAll,tokenize:Zb};function Zb(n,a,r){const u=this;return o;function o(p){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(p),n.exit("labelImageMarker"),h}function h(p){return p===91?(n.enter("labelMarker"),n.consume(p),n.exit("labelMarker"),n.exit("labelImage"),f):r(p)}function f(p){return p===94&&"_hiddenFootnoteSupport"in u.parser.constructs?r(p):a(p)}}const Fb={name:"labelStartLink",resolveAll:_o.resolveAll,tokenize:Jb};function Jb(n,a,r){const u=this;return o;function o(f){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(f),n.exit("labelMarker"),n.exit("labelLink"),h}function h(f){return f===94&&"_hiddenFootnoteSupport"in u.parser.constructs?r(f):a(f)}}const Xc={name:"lineEnding",tokenize:$b};function $b(n,a){return r;function r(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),Qe(n,a,"linePrefix")}}const au={name:"thematicBreak",tokenize:Ib};function Ib(n,a,r){let u=0,o;return h;function h(m){return n.enter("thematicBreak"),f(m)}function f(m){return o=m,p(m)}function p(m){return m===o?(n.enter("thematicBreakSequence"),g(m)):u>=3&&(m===null||Ne(m))?(n.exit("thematicBreak"),a(m)):r(m)}function g(m){return m===o?(n.consume(m),u++,g):(n.exit("thematicBreakSequence"),He(m)?Qe(n,p,"whitespace")(m):p(m))}}const Kt={continuation:{tokenize:t1},exit:l1,name:"list",tokenize:e1},Wb={partial:!0,tokenize:i1},Pb={partial:!0,tokenize:n1};function e1(n,a,r){const u=this,o=u.events[u.events.length-1];let h=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,f=0;return p;function p(b){const w=u.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!u.containerState.marker||b===u.containerState.marker:po(b)){if(u.containerState.type||(u.containerState.type=w,n.enter(w,{_container:!0})),w==="listUnordered")return n.enter("listItemPrefix"),b===42||b===45?n.check(au,r,m)(b):m(b);if(!u.interrupt||b===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),g(b)}return r(b)}function g(b){return po(b)&&++f<10?(n.consume(b),g):(!u.interrupt||f<2)&&(u.containerState.marker?b===u.containerState.marker:b===41||b===46)?(n.exit("listItemValue"),m(b)):r(b)}function m(b){return n.enter("listItemMarker"),n.consume(b),n.exit("listItemMarker"),u.containerState.marker=u.containerState.marker||b,n.check(La,u.interrupt?r:v,n.attempt(Wb,j,y))}function v(b){return u.containerState.initialBlankLine=!0,h++,j(b)}function y(b){return He(b)?(n.enter("listItemPrefixWhitespace"),n.consume(b),n.exit("listItemPrefixWhitespace"),j):r(b)}function j(b){return u.containerState.size=h+u.sliceSerialize(n.exit("listItemPrefix"),!0).length,a(b)}}function t1(n,a,r){const u=this;return u.containerState._closeFlow=void 0,n.check(La,o,h);function o(p){return u.containerState.furtherBlankLines=u.containerState.furtherBlankLines||u.containerState.initialBlankLine,Qe(n,a,"listItemIndent",u.containerState.size+1)(p)}function h(p){return u.containerState.furtherBlankLines||!He(p)?(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,f(p)):(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,n.attempt(Pb,a,f)(p))}function f(p){return u.containerState._closeFlow=!0,u.interrupt=void 0,Qe(n,n.attempt(Kt,a,r),"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(p)}}function n1(n,a,r){const u=this;return Qe(n,o,"listItemIndent",u.containerState.size+1);function o(h){const f=u.events[u.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===u.containerState.size?a(h):r(h)}}function l1(n){n.exit(this.containerState.type)}function i1(n,a,r){const u=this;return Qe(n,o,"listItemPrefixWhitespace",u.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(h){const f=u.events[u.events.length-1];return!He(h)&&f&&f[1].type==="listItemPrefixWhitespace"?a(h):r(h)}}const vp={name:"setextUnderline",resolveTo:a1,tokenize:r1};function a1(n,a){let r=n.length,u,o,h;for(;r--;)if(n[r][0]==="enter"){if(n[r][1].type==="content"){u=r;break}n[r][1].type==="paragraph"&&(o=r)}else n[r][1].type==="content"&&n.splice(r,1),!h&&n[r][1].type==="definition"&&(h=r);const f={type:"setextHeading",start:{...n[u][1].start},end:{...n[n.length-1][1].end}};return n[o][1].type="setextHeadingText",h?(n.splice(o,0,["enter",f,a]),n.splice(h+1,0,["exit",n[u][1],a]),n[u][1].end={...n[h][1].end}):n[u][1]=f,n.push(["exit",f,a]),n}function r1(n,a,r){const u=this;let o;return h;function h(m){let v=u.events.length,y;for(;v--;)if(u.events[v][1].type!=="lineEnding"&&u.events[v][1].type!=="linePrefix"&&u.events[v][1].type!=="content"){y=u.events[v][1].type==="paragraph";break}return!u.parser.lazy[u.now().line]&&(u.interrupt||y)?(n.enter("setextHeadingLine"),o=m,f(m)):r(m)}function f(m){return n.enter("setextHeadingLineSequence"),p(m)}function p(m){return m===o?(n.consume(m),p):(n.exit("setextHeadingLineSequence"),He(m)?Qe(n,g,"lineSuffix")(m):g(m))}function g(m){return m===null||Ne(m)?(n.exit("setextHeadingLine"),a(m)):r(m)}}const u1={tokenize:s1};function s1(n){const a=this,r=n.attempt(La,u,n.attempt(this.parser.constructs.flowInitial,o,Qe(n,n.attempt(this.parser.constructs.flow,o,n.attempt(hb,o)),"linePrefix")));return r;function u(h){if(h===null){n.consume(h);return}return n.enter("lineEndingBlank"),n.consume(h),n.exit("lineEndingBlank"),a.currentConstruct=void 0,r}function o(h){if(h===null){n.consume(h);return}return n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),a.currentConstruct=void 0,r}}const c1={resolveAll:xg()},o1=yg("string"),f1=yg("text");function yg(n){return{resolveAll:xg(n==="text"?d1:void 0),tokenize:a};function a(r){const u=this,o=this.parser.constructs[n],h=r.attempt(o,f,p);return f;function f(v){return m(v)?h(v):p(v)}function p(v){if(v===null){r.consume(v);return}return r.enter("data"),r.consume(v),g}function g(v){return m(v)?(r.exit("data"),h(v)):(r.consume(v),g)}function m(v){if(v===null)return!0;const y=o[v];let j=-1;if(y)for(;++j<y.length;){const b=y[j];if(!b.previous||b.previous.call(u,u.previous))return!0}return!1}}}function xg(n){return a;function a(r,u){let o=-1,h;for(;++o<=r.length;)h===void 0?r[o]&&r[o][1].type==="data"&&(h=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==h+2&&(r[h][1].end=r[o-1][1].end,r.splice(h+2,o-h-2),o=h+2),h=void 0);return n?n(r,u):r}}function d1(n,a){let r=0;for(;++r<=n.length;)if((r===n.length||n[r][1].type==="lineEnding")&&n[r-1][1].type==="data"){const u=n[r-1][1],o=a.sliceStream(u);let h=o.length,f=-1,p=0,g;for(;h--;){const m=o[h];if(typeof m=="string"){for(f=m.length;m.charCodeAt(f-1)===32;)p++,f--;if(f)break;f=-1}else if(m===-2)g=!0,p++;else if(m!==-1){h++;break}}if(a._contentTypeTextTrailing&&r===n.length&&(p=0),p){const m={type:r===n.length||g||p<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:h?f:u.start._bufferIndex+f,_index:u.start._index+h,line:u.end.line,column:u.end.column-p,offset:u.end.offset-p},end:{...u.end}};u.end={...m.start},u.start.offset===u.end.offset?Object.assign(u,m):(n.splice(r,0,["enter",m,a],["exit",m,a]),r+=2)}r++}return n}const h1={42:Kt,43:Kt,45:Kt,48:Kt,49:Kt,50:Kt,51:Kt,52:Kt,53:Kt,54:Kt,55:Kt,56:Kt,57:Kt,62:og},m1={91:xb},p1={[-2]:Qc,[-1]:Qc,32:Qc},g1={35:Nb,42:au,45:[vp,au],60:Ab,61:vp,95:au,96:yp,126:yp},y1={38:dg,92:fg},x1={[-5]:Xc,[-4]:Xc,[-3]:Xc,33:Xb,38:dg,42:go,60:[F0,Rb],91:Fb,92:[jb,fg],93:_o,95:go,96:ub},v1={null:[go,c1]},b1={null:[42,95]},S1={null:[]},j1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:b1,contentInitial:m1,disable:S1,document:h1,flow:g1,flowInitial:p1,insideSpan:v1,string:y1,text:x1},Symbol.toStringTag,{value:"Module"}));function k1(n,a,r){let u={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const o={},h=[];let f=[],p=[];const g={attempt:ne(oe),check:ne(M),consume:X,enter:Y,exit:Z,interrupt:ne(M,{interrupt:!0})},m={code:null,containerState:{},defineSkip:B,events:[],now:w,parser:n,previous:null,sliceSerialize:j,sliceStream:b,write:y};let v=a.tokenize.call(m,g);return a.resolveAll&&h.push(a),m;function y(ae){return f=dn(f,ae),K(),f[f.length-1]!==null?[]:(me(a,0),m.events=gu(h,m.events,m),m.events)}function j(ae,le){return E1(b(ae),le)}function b(ae){return N1(f,ae)}function w(){const{_bufferIndex:ae,_index:le,line:Ee,column:se,offset:P}=u;return{_bufferIndex:ae,_index:le,line:Ee,column:se,offset:P}}function B(ae){o[ae.line]=ae.column,O()}function K(){let ae;for(;u._index<f.length;){const le=f[u._index];if(typeof le=="string")for(ae=u._index,u._bufferIndex<0&&(u._bufferIndex=0);u._index===ae&&u._bufferIndex<le.length;)C(le.charCodeAt(u._bufferIndex));else C(le)}}function C(ae){v=v(ae)}function X(ae){Ne(ae)?(u.line++,u.column=1,u.offset+=ae===-3?2:1,O()):ae!==-1&&(u.column++,u.offset++),u._bufferIndex<0?u._index++:(u._bufferIndex++,u._bufferIndex===f[u._index].length&&(u._bufferIndex=-1,u._index++)),m.previous=ae}function Y(ae,le){const Ee=le||{};return Ee.type=ae,Ee.start=w(),m.events.push(["enter",Ee,m]),p.push(Ee),Ee}function Z(ae){const le=p.pop();return le.end=w(),m.events.push(["exit",le,m]),le}function oe(ae,le){me(ae,le.from)}function M(ae,le){le.restore()}function ne(ae,le){return Ee;function Ee(se,P,D){let I,de,ee,E;return Array.isArray(se)?_(se):"tokenize"in se?_([se]):N(se);function N(he){return ke;function ke(Me){const Ce=Me!==null&&he[Me],ue=Me!==null&&he.null,F=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(ue)?ue:ue?[ue]:[]];return _(F)(Me)}}function _(he){return I=he,de=0,he.length===0?D:k(he[de])}function k(he){return ke;function ke(Me){return E=pe(),ee=he,he.partial||(m.currentConstruct=he),he.name&&m.parser.constructs.disable.null.includes(he.name)?fe():he.tokenize.call(le?Object.assign(Object.create(m),le):m,g,G,fe)(Me)}}function G(he){return ae(ee,E),P}function fe(he){return E.restore(),++de<I.length?k(I[de]):D}}}function me(ae,le){ae.resolveAll&&!h.includes(ae)&&h.push(ae),ae.resolve&&en(m.events,le,m.events.length-le,ae.resolve(m.events.slice(le),m)),ae.resolveTo&&(m.events=ae.resolveTo(m.events,m))}function pe(){const ae=w(),le=m.previous,Ee=m.currentConstruct,se=m.events.length,P=Array.from(p);return{from:se,restore:D};function D(){u=ae,m.previous=le,m.currentConstruct=Ee,m.events.length=se,p=P,O()}}function O(){u.line in o&&u.column<2&&(u.column=o[u.line],u.offset+=o[u.line]-1)}}function N1(n,a){const r=a.start._index,u=a.start._bufferIndex,o=a.end._index,h=a.end._bufferIndex;let f;if(r===o)f=[n[r].slice(u,h)];else{if(f=n.slice(r,o),u>-1){const p=f[0];typeof p=="string"?f[0]=p.slice(u):f.shift()}h>0&&f.push(n[o].slice(0,h))}return f}function E1(n,a){let r=-1;const u=[];let o;for(;++r<n.length;){const h=n[r];let f;if(typeof h=="string")f=h;else switch(h){case-5:{f="\r";break}case-4:{f=`
61
+ `;break}case-3:{f=`\r
62
+ `;break}case-2:{f=a?" ":" ";break}case-1:{if(!a&&o)continue;f=" ";break}default:f=String.fromCharCode(h)}o=h===-2,u.push(f)}return u.join("")}function T1(n){const u={constructs:sg([j1,...(n||{}).extensions||[]]),content:o(Y0),defined:[],document:o(G0),flow:o(u1),lazy:{},string:o(o1),text:o(f1)};return u;function o(h){return f;function f(p){return k1(u,h,p)}}}function w1(n){for(;!hg(n););return n}const bp=/[\0\t\n\r]/g;function A1(){let n=1,a="",r=!0,u;return o;function o(h,f,p){const g=[];let m,v,y,j,b;for(h=a+(typeof h=="string"?h.toString():new TextDecoder(f||void 0).decode(h)),y=0,a="",r&&(h.charCodeAt(0)===65279&&y++,r=void 0);y<h.length;){if(bp.lastIndex=y,m=bp.exec(h),j=m&&m.index!==void 0?m.index:h.length,b=h.charCodeAt(j),!m){a=h.slice(y);break}if(b===10&&y===j&&u)g.push(-3),u=void 0;else switch(u&&(g.push(-5),u=void 0),y<j&&(g.push(h.slice(y,j)),n+=j-y),b){case 0:{g.push(65533),n++;break}case 9:{for(v=Math.ceil(n/4)*4,g.push(-2);n++<v;)g.push(-1);break}case 10:{g.push(-4),n=1;break}default:u=!0,n=1}y=j+1}return p&&(u&&g.push(-5),a&&g.push(a),g.push(null)),g}}const C1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function z1(n){return n.replace(C1,D1)}function D1(n,a,r){if(a)return a;if(r.charCodeAt(0)===35){const o=r.charCodeAt(1),h=o===120||o===88;return cg(r.slice(h?2:1),h?16:10)}return Do(r)||n}const vg={}.hasOwnProperty;function _1(n,a,r){return a&&typeof a=="object"&&(r=a,a=void 0),M1(r)(w1(T1(r).document().write(A1()(n,a,!0))))}function M1(n){const a={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:h(Le),autolinkProtocol:pe,autolinkEmail:pe,atxHeading:h(ye),blockQuote:h(ue),characterEscape:pe,characterReference:pe,codeFenced:h(F),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:h(F,f),codeText:h(ve,f),codeTextData:pe,data:pe,codeFlowValue:pe,definition:h(te),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:h(be),hardBreakEscape:h(Q),hardBreakTrailing:h(Q),htmlFlow:h(ce,f),htmlFlowData:pe,htmlText:h(ce,f),htmlTextData:pe,image:h(Ve),label:f,link:h(Le),listItem:h(we),listItemValue:j,listOrdered:h(Xe,y),listUnordered:h(Xe),paragraph:h(jt),reference:k,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:h(ye),strong:h(Vt),thematicBreak:h(Je)},exit:{atxHeading:g(),atxHeadingSequence:oe,autolink:g(),autolinkEmail:Ce,autolinkProtocol:Me,blockQuote:g(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:he,characterReference:ke,codeFenced:g(K),codeFencedFence:B,codeFencedFenceInfo:b,codeFencedFenceMeta:w,codeFlowValue:O,codeIndented:g(C),codeText:g(P),codeTextData:O,data:O,definition:g(),definitionDestinationString:Z,definitionLabelString:X,definitionTitleString:Y,emphasis:g(),hardBreakEscape:g(le),hardBreakTrailing:g(le),htmlFlow:g(Ee),htmlFlowData:O,htmlText:g(se),htmlTextData:O,image:g(I),label:ee,labelText:de,lineEnding:ae,link:g(D),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:G,resourceDestinationString:E,resourceTitleString:N,resource:_,setextHeading:g(me),setextHeadingLineSequence:ne,setextHeadingText:M,strong:g(),thematicBreak:g()}};bg(a,(n||{}).mdastExtensions||[]);const r={};return u;function u(H){let ie={type:"root",children:[]};const Se={stack:[ie],tokenStack:[],config:a,enter:p,exit:m,buffer:f,resume:v,data:r},De=[];let qe=-1;for(;++qe<H.length;)if(H[qe][1].type==="listOrdered"||H[qe][1].type==="listUnordered")if(H[qe][0]==="enter")De.push(qe);else{const Qt=De.pop();qe=o(H,Qt,qe)}for(qe=-1;++qe<H.length;){const Qt=a[H[qe][0]];vg.call(Qt,H[qe][1].type)&&Qt[H[qe][1].type].call(Object.assign({sliceSerialize:H[qe][2].sliceSerialize},Se),H[qe][1])}if(Se.tokenStack.length>0){const Qt=Se.tokenStack[Se.tokenStack.length-1];(Qt[1]||Sp).call(Se,void 0,Qt[0])}for(ie.position={start:gl(H.length>0?H[0][1].start:{line:1,column:1,offset:0}),end:gl(H.length>0?H[H.length-2][1].end:{line:1,column:1,offset:0})},qe=-1;++qe<a.transforms.length;)ie=a.transforms[qe](ie)||ie;return ie}function o(H,ie,Se){let De=ie-1,qe=-1,Qt=!1,En,Dt,xt,Ot;for(;++De<=Se;){const nt=H[De];switch(nt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{nt[0]==="enter"?qe++:qe--,Ot=void 0;break}case"lineEndingBlank":{nt[0]==="enter"&&(En&&!Ot&&!qe&&!xt&&(xt=De),Ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ot=void 0}if(!qe&&nt[0]==="enter"&&nt[1].type==="listItemPrefix"||qe===-1&&nt[0]==="exit"&&(nt[1].type==="listUnordered"||nt[1].type==="listOrdered")){if(En){let Qn=De;for(Dt=void 0;Qn--;){const hn=H[Qn];if(hn[1].type==="lineEnding"||hn[1].type==="lineEndingBlank"){if(hn[0]==="exit")continue;Dt&&(H[Dt][1].type="lineEndingBlank",Qt=!0),hn[1].type="lineEnding",Dt=Qn}else if(!(hn[1].type==="linePrefix"||hn[1].type==="blockQuotePrefix"||hn[1].type==="blockQuotePrefixWhitespace"||hn[1].type==="blockQuoteMarker"||hn[1].type==="listItemIndent"))break}xt&&(!Dt||xt<Dt)&&(En._spread=!0),En.end=Object.assign({},Dt?H[Dt][1].start:nt[1].end),H.splice(Dt||De,0,["exit",En,nt[2]]),De++,Se++}if(nt[1].type==="listItemPrefix"){const Qn={type:"listItem",_spread:!1,start:Object.assign({},nt[1].start),end:void 0};En=Qn,H.splice(De,0,["enter",Qn,nt[2]]),De++,Se++,xt=void 0,Ot=!0}}}return H[ie][1]._spread=Qt,Se}function h(H,ie){return Se;function Se(De){p.call(this,H(De),De),ie&&ie.call(this,De)}}function f(){this.stack.push({type:"fragment",children:[]})}function p(H,ie,Se){this.stack[this.stack.length-1].children.push(H),this.stack.push(H),this.tokenStack.push([ie,Se||void 0]),H.position={start:gl(ie.start),end:void 0}}function g(H){return ie;function ie(Se){H&&H.call(this,Se),m.call(this,Se)}}function m(H,ie){const Se=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==H.type&&(ie?ie.call(this,H,De[0]):(De[1]||Sp).call(this,H,De[0]));else throw new Error("Cannot close `"+H.type+"` ("+za({start:H.start,end:H.end})+"): it’s not open");Se.position.end=gl(H.end)}function v(){return zo(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function j(H){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(H),10),this.data.expectingFirstListItemValue=void 0}}function b(){const H=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=H}function w(){const H=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=H}function B(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function K(){const H=this.resume(),ie=this.stack[this.stack.length-1];ie.value=H.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const H=this.resume(),ie=this.stack[this.stack.length-1];ie.value=H.replace(/(\r?\n|\r)$/g,"")}function X(H){const ie=this.resume(),Se=this.stack[this.stack.length-1];Se.label=ie,Se.identifier=yn(this.sliceSerialize(H)).toLowerCase()}function Y(){const H=this.resume(),ie=this.stack[this.stack.length-1];ie.title=H}function Z(){const H=this.resume(),ie=this.stack[this.stack.length-1];ie.url=H}function oe(H){const ie=this.stack[this.stack.length-1];if(!ie.depth){const Se=this.sliceSerialize(H).length;ie.depth=Se}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function ne(H){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(H).codePointAt(0)===61?1:2}function me(){this.data.setextHeadingSlurpLineEnding=void 0}function pe(H){const Se=this.stack[this.stack.length-1].children;let De=Se[Se.length-1];(!De||De.type!=="text")&&(De=Ae(),De.position={start:gl(H.start),end:void 0},Se.push(De)),this.stack.push(De)}function O(H){const ie=this.stack.pop();ie.value+=this.sliceSerialize(H),ie.position.end=gl(H.end)}function ae(H){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Se=ie.children[ie.children.length-1];Se.position.end=gl(H.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&a.canContainEols.includes(ie.type)&&(pe.call(this,H),O.call(this,H))}function le(){this.data.atHardBreak=!0}function Ee(){const H=this.resume(),ie=this.stack[this.stack.length-1];ie.value=H}function se(){const H=this.resume(),ie=this.stack[this.stack.length-1];ie.value=H}function P(){const H=this.resume(),ie=this.stack[this.stack.length-1];ie.value=H}function D(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=ie,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function I(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=ie,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function de(H){const ie=this.sliceSerialize(H),Se=this.stack[this.stack.length-2];Se.label=z1(ie),Se.identifier=yn(ie).toLowerCase()}function ee(){const H=this.stack[this.stack.length-1],ie=this.resume(),Se=this.stack[this.stack.length-1];if(this.data.inReference=!0,Se.type==="link"){const De=H.children;Se.children=De}else Se.alt=ie}function E(){const H=this.resume(),ie=this.stack[this.stack.length-1];ie.url=H}function N(){const H=this.resume(),ie=this.stack[this.stack.length-1];ie.title=H}function _(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function G(H){const ie=this.resume(),Se=this.stack[this.stack.length-1];Se.label=ie,Se.identifier=yn(this.sliceSerialize(H)).toLowerCase(),this.data.referenceType="full"}function fe(H){this.data.characterReferenceType=H.type}function he(H){const ie=this.sliceSerialize(H),Se=this.data.characterReferenceType;let De;Se?(De=cg(ie,Se==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=Do(ie);const qe=this.stack[this.stack.length-1];qe.value+=De}function ke(H){const ie=this.stack.pop();ie.position.end=gl(H.end)}function Me(H){O.call(this,H);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(H)}function Ce(H){O.call(this,H);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(H)}function ue(){return{type:"blockquote",children:[]}}function F(){return{type:"code",lang:null,meta:null,value:""}}function ve(){return{type:"inlineCode",value:""}}function te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function be(){return{type:"emphasis",children:[]}}function ye(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function ce(){return{type:"html",value:""}}function Ve(){return{type:"image",title:null,url:"",alt:null}}function Le(){return{type:"link",title:null,url:"",children:[]}}function Xe(H){return{type:"list",ordered:H.type==="listOrdered",start:null,spread:H._spread,children:[]}}function we(H){return{type:"listItem",spread:H._spread,checked:null,children:[]}}function jt(){return{type:"paragraph",children:[]}}function Vt(){return{type:"strong",children:[]}}function Ae(){return{type:"text",value:""}}function Je(){return{type:"thematicBreak"}}}function gl(n){return{line:n.line,column:n.column,offset:n.offset}}function bg(n,a){let r=-1;for(;++r<a.length;){const u=a[r];Array.isArray(u)?bg(n,u):O1(n,u)}}function O1(n,a){let r;for(r in a)if(vg.call(a,r))switch(r){case"canContainEols":{const u=a[r];u&&n[r].push(...u);break}case"transforms":{const u=a[r];u&&n[r].push(...u);break}case"enter":case"exit":{const u=a[r];u&&Object.assign(n[r],u);break}}}function Sp(n,a){throw n?new Error("Cannot close `"+n.type+"` ("+za({start:n.start,end:n.end})+"): a different token (`"+a.type+"`, "+za({start:a.start,end:a.end})+") is open"):new Error("Cannot close document, a token (`"+a.type+"`, "+za({start:a.start,end:a.end})+") is still open")}function R1(n){const a=this;a.parser=r;function r(u){return _1(u,{...a.data("settings"),...n,extensions:a.data("micromarkExtensions")||[],mdastExtensions:a.data("fromMarkdownExtensions")||[]})}}function L1(n,a){const r={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(a),!0)};return n.patch(a,r),n.applyData(a,r)}function B1(n,a){const r={type:"element",tagName:"br",properties:{},children:[]};return n.patch(a,r),[n.applyData(a,r),{type:"text",value:`
63
+ `}]}function U1(n,a){const r=a.value?a.value+`
64
+ `:"",u={},o=a.lang?a.lang.split(/\s+/):[];o.length>0&&(u.className=["language-"+o[0]]);let h={type:"element",tagName:"code",properties:u,children:[{type:"text",value:r}]};return a.meta&&(h.data={meta:a.meta}),n.patch(a,h),h=n.applyData(a,h),h={type:"element",tagName:"pre",properties:{},children:[h]},n.patch(a,h),h}function H1(n,a){const r={type:"element",tagName:"del",properties:{},children:n.all(a)};return n.patch(a,r),n.applyData(a,r)}function q1(n,a){const r={type:"element",tagName:"em",properties:{},children:n.all(a)};return n.patch(a,r),n.applyData(a,r)}function Y1(n,a){const r=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",u=String(a.identifier).toUpperCase(),o=zi(u.toLowerCase()),h=n.footnoteOrder.indexOf(u);let f,p=n.footnoteCounts.get(u);p===void 0?(p=0,n.footnoteOrder.push(u),f=n.footnoteOrder.length):f=h+1,p+=1,n.footnoteCounts.set(u,p);const g={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+o,id:r+"fnref-"+o+(p>1?"-"+p:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};n.patch(a,g);const m={type:"element",tagName:"sup",properties:{},children:[g]};return n.patch(a,m),n.applyData(a,m)}function K1(n,a){const r={type:"element",tagName:"h"+a.depth,properties:{},children:n.all(a)};return n.patch(a,r),n.applyData(a,r)}function G1(n,a){if(n.options.allowDangerousHtml){const r={type:"raw",value:a.value};return n.patch(a,r),n.applyData(a,r)}}function Sg(n,a){const r=a.referenceType;let u="]";if(r==="collapsed"?u+="[]":r==="full"&&(u+="["+(a.label||a.identifier)+"]"),a.type==="imageReference")return[{type:"text",value:"!["+a.alt+u}];const o=n.all(a),h=o[0];h&&h.type==="text"?h.value="["+h.value:o.unshift({type:"text",value:"["});const f=o[o.length-1];return f&&f.type==="text"?f.value+=u:o.push({type:"text",value:u}),o}function V1(n,a){const r=String(a.identifier).toUpperCase(),u=n.definitionById.get(r);if(!u)return Sg(n,a);const o={src:zi(u.url||""),alt:a.alt};u.title!==null&&u.title!==void 0&&(o.title=u.title);const h={type:"element",tagName:"img",properties:o,children:[]};return n.patch(a,h),n.applyData(a,h)}function Q1(n,a){const r={src:zi(a.url)};a.alt!==null&&a.alt!==void 0&&(r.alt=a.alt),a.title!==null&&a.title!==void 0&&(r.title=a.title);const u={type:"element",tagName:"img",properties:r,children:[]};return n.patch(a,u),n.applyData(a,u)}function X1(n,a){const r={type:"text",value:a.value.replace(/\r?\n|\r/g," ")};n.patch(a,r);const u={type:"element",tagName:"code",properties:{},children:[r]};return n.patch(a,u),n.applyData(a,u)}function Z1(n,a){const r=String(a.identifier).toUpperCase(),u=n.definitionById.get(r);if(!u)return Sg(n,a);const o={href:zi(u.url||"")};u.title!==null&&u.title!==void 0&&(o.title=u.title);const h={type:"element",tagName:"a",properties:o,children:n.all(a)};return n.patch(a,h),n.applyData(a,h)}function F1(n,a){const r={href:zi(a.url)};a.title!==null&&a.title!==void 0&&(r.title=a.title);const u={type:"element",tagName:"a",properties:r,children:n.all(a)};return n.patch(a,u),n.applyData(a,u)}function J1(n,a,r){const u=n.all(a),o=r?$1(r):jg(a),h={},f=[];if(typeof a.checked=="boolean"){const v=u[0];let y;v&&v.type==="element"&&v.tagName==="p"?y=v:(y={type:"element",tagName:"p",properties:{},children:[]},u.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:a.checked,disabled:!0},children:[]}),h.className=["task-list-item"]}let p=-1;for(;++p<u.length;){const v=u[p];(o||p!==0||v.type!=="element"||v.tagName!=="p")&&f.push({type:"text",value:`
65
+ `}),v.type==="element"&&v.tagName==="p"&&!o?f.push(...v.children):f.push(v)}const g=u[u.length-1];g&&(o||g.type!=="element"||g.tagName!=="p")&&f.push({type:"text",value:`
66
+ `});const m={type:"element",tagName:"li",properties:h,children:f};return n.patch(a,m),n.applyData(a,m)}function $1(n){let a=!1;if(n.type==="list"){a=n.spread||!1;const r=n.children;let u=-1;for(;!a&&++u<r.length;)a=jg(r[u])}return a}function jg(n){const a=n.spread;return a??n.children.length>1}function I1(n,a){const r={},u=n.all(a);let o=-1;for(typeof a.start=="number"&&a.start!==1&&(r.start=a.start);++o<u.length;){const f=u[o];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const h={type:"element",tagName:a.ordered?"ol":"ul",properties:r,children:n.wrap(u,!0)};return n.patch(a,h),n.applyData(a,h)}function W1(n,a){const r={type:"element",tagName:"p",properties:{},children:n.all(a)};return n.patch(a,r),n.applyData(a,r)}function P1(n,a){const r={type:"root",children:n.wrap(n.all(a))};return n.patch(a,r),n.applyData(a,r)}function eS(n,a){const r={type:"element",tagName:"strong",properties:{},children:n.all(a)};return n.patch(a,r),n.applyData(a,r)}function tS(n,a){const r=n.all(a),u=r.shift(),o=[];if(u){const f={type:"element",tagName:"thead",properties:{},children:n.wrap([u],!0)};n.patch(a.children[0],f),o.push(f)}if(r.length>0){const f={type:"element",tagName:"tbody",properties:{},children:n.wrap(r,!0)},p=To(a.children[1]),g=tg(a.children[a.children.length-1]);p&&g&&(f.position={start:p,end:g}),o.push(f)}const h={type:"element",tagName:"table",properties:{},children:n.wrap(o,!0)};return n.patch(a,h),n.applyData(a,h)}function nS(n,a,r){const u=r?r.children:void 0,h=(u?u.indexOf(a):1)===0?"th":"td",f=r&&r.type==="table"?r.align:void 0,p=f?f.length:a.children.length;let g=-1;const m=[];for(;++g<p;){const y=a.children[g],j={},b=f?f[g]:void 0;b&&(j.align=b);let w={type:"element",tagName:h,properties:j,children:[]};y&&(w.children=n.all(y),n.patch(y,w),w=n.applyData(y,w)),m.push(w)}const v={type:"element",tagName:"tr",properties:{},children:n.wrap(m,!0)};return n.patch(a,v),n.applyData(a,v)}function lS(n,a){const r={type:"element",tagName:"td",properties:{},children:n.all(a)};return n.patch(a,r),n.applyData(a,r)}const jp=9,kp=32;function iS(n){const a=String(n),r=/\r?\n|\r/g;let u=r.exec(a),o=0;const h=[];for(;u;)h.push(Np(a.slice(o,u.index),o>0,!0),u[0]),o=u.index+u[0].length,u=r.exec(a);return h.push(Np(a.slice(o),o>0,!1)),h.join("")}function Np(n,a,r){let u=0,o=n.length;if(a){let h=n.codePointAt(u);for(;h===jp||h===kp;)u++,h=n.codePointAt(u)}if(r){let h=n.codePointAt(o-1);for(;h===jp||h===kp;)o--,h=n.codePointAt(o-1)}return o>u?n.slice(u,o):""}function aS(n,a){const r={type:"text",value:iS(String(a.value))};return n.patch(a,r),n.applyData(a,r)}function rS(n,a){const r={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(a,r),n.applyData(a,r)}const uS={blockquote:L1,break:B1,code:U1,delete:H1,emphasis:q1,footnoteReference:Y1,heading:K1,html:G1,imageReference:V1,image:Q1,inlineCode:X1,linkReference:Z1,link:F1,listItem:J1,list:I1,paragraph:W1,root:P1,strong:eS,table:tS,tableCell:lS,tableRow:nS,text:aS,thematicBreak:rS,toml:eu,yaml:eu,definition:eu,footnoteDefinition:eu};function eu(){}const kg=-1,yu=0,_a=1,cu=2,Mo=3,Oo=4,Ro=5,Lo=6,Ng=7,Eg=8,Ep=typeof self=="object"?self:globalThis,sS=(n,a)=>{const r=(o,h)=>(n.set(h,o),o),u=o=>{if(n.has(o))return n.get(o);const[h,f]=a[o];switch(h){case yu:case kg:return r(f,o);case _a:{const p=r([],o);for(const g of f)p.push(u(g));return p}case cu:{const p=r({},o);for(const[g,m]of f)p[u(g)]=u(m);return p}case Mo:return r(new Date(f),o);case Oo:{const{source:p,flags:g}=f;return r(new RegExp(p,g),o)}case Ro:{const p=r(new Map,o);for(const[g,m]of f)p.set(u(g),u(m));return p}case Lo:{const p=r(new Set,o);for(const g of f)p.add(u(g));return p}case Ng:{const{name:p,message:g}=f;return r(new Ep[p](g),o)}case Eg:return r(BigInt(f),o);case"BigInt":return r(Object(BigInt(f)),o);case"ArrayBuffer":return r(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:p}=new Uint8Array(f);return r(new DataView(p),f)}}return r(new Ep[h](f),o)};return u},Tp=n=>sS(new Map,n)(0),Ei="",{toString:cS}={},{keys:oS}=Object,Aa=n=>{const a=typeof n;if(a!=="object"||!n)return[yu,a];const r=cS.call(n).slice(8,-1);switch(r){case"Array":return[_a,Ei];case"Object":return[cu,Ei];case"Date":return[Mo,Ei];case"RegExp":return[Oo,Ei];case"Map":return[Ro,Ei];case"Set":return[Lo,Ei];case"DataView":return[_a,r]}return r.includes("Array")?[_a,r]:r.includes("Error")?[Ng,r]:[cu,r]},tu=([n,a])=>n===yu&&(a==="function"||a==="symbol"),fS=(n,a,r,u)=>{const o=(f,p)=>{const g=u.push(f)-1;return r.set(p,g),g},h=f=>{if(r.has(f))return r.get(f);let[p,g]=Aa(f);switch(p){case yu:{let v=f;switch(g){case"bigint":p=Eg,v=f.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+g);v=null;break;case"undefined":return o([kg],f)}return o([p,v],f)}case _a:{if(g){let j=f;return g==="DataView"?j=new Uint8Array(f.buffer):g==="ArrayBuffer"&&(j=new Uint8Array(f)),o([g,[...j]],f)}const v=[],y=o([p,v],f);for(const j of f)v.push(h(j));return y}case cu:{if(g)switch(g){case"BigInt":return o([g,f.toString()],f);case"Boolean":case"Number":case"String":return o([g,f.valueOf()],f)}if(a&&"toJSON"in f)return h(f.toJSON());const v=[],y=o([p,v],f);for(const j of oS(f))(n||!tu(Aa(f[j])))&&v.push([h(j),h(f[j])]);return y}case Mo:return o([p,f.toISOString()],f);case Oo:{const{source:v,flags:y}=f;return o([p,{source:v,flags:y}],f)}case Ro:{const v=[],y=o([p,v],f);for(const[j,b]of f)(n||!(tu(Aa(j))||tu(Aa(b))))&&v.push([h(j),h(b)]);return y}case Lo:{const v=[],y=o([p,v],f);for(const j of f)(n||!tu(Aa(j)))&&v.push(h(j));return y}}const{message:m}=f;return o([p,{name:g,message:m}],f)};return h},wp=(n,{json:a,lossy:r}={})=>{const u=[];return fS(!(a||r),!!a,new Map,u)(n),u},ou=typeof structuredClone=="function"?(n,a)=>a&&("json"in a||"lossy"in a)?Tp(wp(n,a)):structuredClone(n):(n,a)=>Tp(wp(n,a));function dS(n,a){const r=[{type:"text",value:"↩"}];return a>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(a)}]}),r}function hS(n,a){return"Back to reference "+(n+1)+(a>1?"-"+a:"")}function mS(n){const a=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",r=n.options.footnoteBackContent||dS,u=n.options.footnoteBackLabel||hS,o=n.options.footnoteLabel||"Footnotes",h=n.options.footnoteLabelTagName||"h2",f=n.options.footnoteLabelProperties||{className:["sr-only"]},p=[];let g=-1;for(;++g<n.footnoteOrder.length;){const m=n.footnoteById.get(n.footnoteOrder[g]);if(!m)continue;const v=n.all(m),y=String(m.identifier).toUpperCase(),j=zi(y.toLowerCase());let b=0;const w=[],B=n.footnoteCounts.get(y);for(;B!==void 0&&++b<=B;){w.length>0&&w.push({type:"text",value:" "});let X=typeof r=="string"?r:r(g,b);typeof X=="string"&&(X={type:"text",value:X}),w.push({type:"element",tagName:"a",properties:{href:"#"+a+"fnref-"+j+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof u=="string"?u:u(g,b),className:["data-footnote-backref"]},children:Array.isArray(X)?X:[X]})}const K=v[v.length-1];if(K&&K.type==="element"&&K.tagName==="p"){const X=K.children[K.children.length-1];X&&X.type==="text"?X.value+=" ":K.children.push({type:"text",value:" "}),K.children.push(...w)}else v.push(...w);const C={type:"element",tagName:"li",properties:{id:a+"fn-"+j},children:n.wrap(v,!0)};n.patch(m,C),p.push(C)}if(p.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:h,properties:{...ou(f),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
67
+ `},{type:"element",tagName:"ol",properties:{},children:n.wrap(p,!0)},{type:"text",value:`
68
+ `}]}}const xu=(function(n){if(n==null)return xS;if(typeof n=="function")return vu(n);if(typeof n=="object")return Array.isArray(n)?pS(n):gS(n);if(typeof n=="string")return yS(n);throw new Error("Expected function, string, or object as test")});function pS(n){const a=[];let r=-1;for(;++r<n.length;)a[r]=xu(n[r]);return vu(u);function u(...o){let h=-1;for(;++h<a.length;)if(a[h].apply(this,o))return!0;return!1}}function gS(n){const a=n;return vu(r);function r(u){const o=u;let h;for(h in n)if(o[h]!==a[h])return!1;return!0}}function yS(n){return vu(a);function a(r){return r&&r.type===n}}function vu(n){return a;function a(r,u,o){return!!(vS(r)&&n.call(this,r,typeof u=="number"?u:void 0,o||void 0))}}function xS(){return!0}function vS(n){return n!==null&&typeof n=="object"&&"type"in n}const Tg=[],bS=!0,yo=!1,SS="skip";function wg(n,a,r,u){let o;typeof a=="function"&&typeof r!="function"?(u=r,r=a):o=a;const h=xu(o),f=u?-1:1;p(n,void 0,[])();function p(g,m,v){const y=g&&typeof g=="object"?g:{};if(typeof y.type=="string"){const b=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(j,"name",{value:"node ("+(g.type+(b?"<"+b+">":""))+")"})}return j;function j(){let b=Tg,w,B,K;if((!a||h(g,m,v[v.length-1]||void 0))&&(b=jS(r(g,v)),b[0]===yo))return b;if("children"in g&&g.children){const C=g;if(C.children&&b[0]!==SS)for(B=(u?C.children.length:-1)+f,K=v.concat(C);B>-1&&B<C.children.length;){const X=C.children[B];if(w=p(X,B,K)(),w[0]===yo)return w;B=typeof w[1]=="number"?w[1]:B+f}}return b}}}function jS(n){return Array.isArray(n)?n:typeof n=="number"?[bS,n]:n==null?Tg:[n]}function Bo(n,a,r,u){let o,h,f;typeof a=="function"&&typeof r!="function"?(h=void 0,f=a,o=r):(h=a,f=r,o=u),wg(n,h,p,o);function p(g,m){const v=m[m.length-1],y=v?v.children.indexOf(g):void 0;return f(g,y,v)}}const xo={}.hasOwnProperty,kS={};function NS(n,a){const r=a||kS,u=new Map,o=new Map,h=new Map,f={...uS,...r.handlers},p={all:m,applyData:TS,definitionById:u,footnoteById:o,footnoteCounts:h,footnoteOrder:[],handlers:f,one:g,options:r,patch:ES,wrap:AS};return Bo(n,function(v){if(v.type==="definition"||v.type==="footnoteDefinition"){const y=v.type==="definition"?u:o,j=String(v.identifier).toUpperCase();y.has(j)||y.set(j,v)}}),p;function g(v,y){const j=v.type,b=p.handlers[j];if(xo.call(p.handlers,j)&&b)return b(p,v,y);if(p.options.passThrough&&p.options.passThrough.includes(j)){if("children"in v){const{children:B,...K}=v,C=ou(K);return C.children=p.all(v),C}return ou(v)}return(p.options.unknownHandler||wS)(p,v,y)}function m(v){const y=[];if("children"in v){const j=v.children;let b=-1;for(;++b<j.length;){const w=p.one(j[b],v);if(w){if(b&&j[b-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=Ap(w.value)),!Array.isArray(w)&&w.type==="element")){const B=w.children[0];B&&B.type==="text"&&(B.value=Ap(B.value))}Array.isArray(w)?y.push(...w):y.push(w)}}}return y}}function ES(n,a){n.position&&(a.position=h0(n))}function TS(n,a){let r=a;if(n&&n.data){const u=n.data.hName,o=n.data.hChildren,h=n.data.hProperties;if(typeof u=="string")if(r.type==="element")r.tagName=u;else{const f="children"in r?r.children:[r];r={type:"element",tagName:u,properties:{},children:f}}r.type==="element"&&h&&Object.assign(r.properties,ou(h)),"children"in r&&r.children&&o!==null&&o!==void 0&&(r.children=o)}return r}function wS(n,a){const r=a.data||{},u="value"in a&&!(xo.call(r,"hProperties")||xo.call(r,"hChildren"))?{type:"text",value:a.value}:{type:"element",tagName:"div",properties:{},children:n.all(a)};return n.patch(a,u),n.applyData(a,u)}function AS(n,a){const r=[];let u=-1;for(a&&r.push({type:"text",value:`
69
+ `});++u<n.length;)u&&r.push({type:"text",value:`
70
+ `}),r.push(n[u]);return a&&n.length>0&&r.push({type:"text",value:`
71
+ `}),r}function Ap(n){let a=0,r=n.charCodeAt(a);for(;r===9||r===32;)a++,r=n.charCodeAt(a);return n.slice(a)}function Cp(n,a){const r=NS(n,a),u=r.one(n,void 0),o=mS(r),h=Array.isArray(u)?{type:"root",children:u}:u||{type:"root",children:[]};return o&&h.children.push({type:"text",value:`
72
+ `},o),h}function CS(n,a){return n&&"run"in n?async function(r,u){const o=Cp(r,{file:u,...a});await n.run(o,u)}:function(r,u){return Cp(r,{file:u,...n||a})}}function zp(n){if(n)throw n}var Zc,Dp;function zS(){if(Dp)return Zc;Dp=1;var n=Object.prototype.hasOwnProperty,a=Object.prototype.toString,r=Object.defineProperty,u=Object.getOwnPropertyDescriptor,o=function(m){return typeof Array.isArray=="function"?Array.isArray(m):a.call(m)==="[object Array]"},h=function(m){if(!m||a.call(m)!=="[object Object]")return!1;var v=n.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&n.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!v&&!y)return!1;var j;for(j in m);return typeof j>"u"||n.call(m,j)},f=function(m,v){r&&v.name==="__proto__"?r(m,v.name,{enumerable:!0,configurable:!0,value:v.newValue,writable:!0}):m[v.name]=v.newValue},p=function(m,v){if(v==="__proto__")if(n.call(m,v)){if(u)return u(m,v).value}else return;return m[v]};return Zc=function g(){var m,v,y,j,b,w,B=arguments[0],K=1,C=arguments.length,X=!1;for(typeof B=="boolean"&&(X=B,B=arguments[1]||{},K=2),(B==null||typeof B!="object"&&typeof B!="function")&&(B={});K<C;++K)if(m=arguments[K],m!=null)for(v in m)y=p(B,v),j=p(m,v),B!==j&&(X&&j&&(h(j)||(b=o(j)))?(b?(b=!1,w=y&&o(y)?y:[]):w=y&&h(y)?y:{},f(B,{name:v,newValue:g(X,w,j)})):typeof j<"u"&&f(B,{name:v,newValue:j}));return B},Zc}var DS=zS();const Fc=hu(DS);function vo(n){if(typeof n!="object"||n===null)return!1;const a=Object.getPrototypeOf(n);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function _S(){const n=[],a={run:r,use:u};return a;function r(...o){let h=-1;const f=o.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);p(null,...o);function p(g,...m){const v=n[++h];let y=-1;if(g){f(g);return}for(;++y<o.length;)(m[y]===null||m[y]===void 0)&&(m[y]=o[y]);o=m,v?MS(v,p)(...m):f(null,...m)}}function u(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return n.push(o),a}}function MS(n,a){let r;return u;function u(...f){const p=n.length>f.length;let g;p&&f.push(o);try{g=n.apply(this,f)}catch(m){const v=m;if(p&&r)throw v;return o(v)}p||(g&&g.then&&typeof g.then=="function"?g.then(h,o):g instanceof Error?o(g):h(g))}function o(f,...p){r||(r=!0,a(f,...p))}function h(f){o(null,f)}}const jn={basename:OS,dirname:RS,extname:LS,join:BS,sep:"/"};function OS(n,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');Ba(n);let r=0,u=-1,o=n.length,h;if(a===void 0||a.length===0||a.length>n.length){for(;o--;)if(n.codePointAt(o)===47){if(h){r=o+1;break}}else u<0&&(h=!0,u=o+1);return u<0?"":n.slice(r,u)}if(a===n)return"";let f=-1,p=a.length-1;for(;o--;)if(n.codePointAt(o)===47){if(h){r=o+1;break}}else f<0&&(h=!0,f=o+1),p>-1&&(n.codePointAt(o)===a.codePointAt(p--)?p<0&&(u=o):(p=-1,u=f));return r===u?u=f:u<0&&(u=n.length),n.slice(r,u)}function RS(n){if(Ba(n),n.length===0)return".";let a=-1,r=n.length,u;for(;--r;)if(n.codePointAt(r)===47){if(u){a=r;break}}else u||(u=!0);return a<0?n.codePointAt(0)===47?"/":".":a===1&&n.codePointAt(0)===47?"//":n.slice(0,a)}function LS(n){Ba(n);let a=n.length,r=-1,u=0,o=-1,h=0,f;for(;a--;){const p=n.codePointAt(a);if(p===47){if(f){u=a+1;break}continue}r<0&&(f=!0,r=a+1),p===46?o<0?o=a:h!==1&&(h=1):o>-1&&(h=-1)}return o<0||r<0||h===0||h===1&&o===r-1&&o===u+1?"":n.slice(o,r)}function BS(...n){let a=-1,r;for(;++a<n.length;)Ba(n[a]),n[a]&&(r=r===void 0?n[a]:r+"/"+n[a]);return r===void 0?".":US(r)}function US(n){Ba(n);const a=n.codePointAt(0)===47;let r=HS(n,!a);return r.length===0&&!a&&(r="."),r.length>0&&n.codePointAt(n.length-1)===47&&(r+="/"),a?"/"+r:r}function HS(n,a){let r="",u=0,o=-1,h=0,f=-1,p,g;for(;++f<=n.length;){if(f<n.length)p=n.codePointAt(f);else{if(p===47)break;p=47}if(p===47){if(!(o===f-1||h===1))if(o!==f-1&&h===2){if(r.length<2||u!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(g=r.lastIndexOf("/"),g!==r.length-1){g<0?(r="",u=0):(r=r.slice(0,g),u=r.length-1-r.lastIndexOf("/")),o=f,h=0;continue}}else if(r.length>0){r="",u=0,o=f,h=0;continue}}a&&(r=r.length>0?r+"/..":"..",u=2)}else r.length>0?r+="/"+n.slice(o+1,f):r=n.slice(o+1,f),u=f-o-1;o=f,h=0}else p===46&&h>-1?h++:h=-1}return r}function Ba(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const qS={cwd:YS};function YS(){return"/"}function bo(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function KS(n){if(typeof n=="string")n=new URL(n);else if(!bo(n)){const a=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw a.code="ERR_INVALID_ARG_TYPE",a}if(n.protocol!=="file:"){const a=new TypeError("The URL must be of scheme file");throw a.code="ERR_INVALID_URL_SCHEME",a}return GS(n)}function GS(n){if(n.hostname!==""){const u=new TypeError('File URL host must be "localhost" or empty on darwin');throw u.code="ERR_INVALID_FILE_URL_HOST",u}const a=n.pathname;let r=-1;for(;++r<a.length;)if(a.codePointAt(r)===37&&a.codePointAt(r+1)===50){const u=a.codePointAt(r+2);if(u===70||u===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(a)}const Jc=["history","path","basename","stem","extname","dirname"];class Ag{constructor(a){let r;a?bo(a)?r={path:a}:typeof a=="string"||VS(a)?r={value:a}:r=a:r={},this.cwd="cwd"in r?"":qS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let u=-1;for(;++u<Jc.length;){const h=Jc[u];h in r&&r[h]!==void 0&&r[h]!==null&&(this[h]=h==="history"?[...r[h]]:r[h])}let o;for(o in r)Jc.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?jn.basename(this.path):void 0}set basename(a){Ic(a,"basename"),$c(a,"basename"),this.path=jn.join(this.dirname||"",a)}get dirname(){return typeof this.path=="string"?jn.dirname(this.path):void 0}set dirname(a){_p(this.basename,"dirname"),this.path=jn.join(a||"",this.basename)}get extname(){return typeof this.path=="string"?jn.extname(this.path):void 0}set extname(a){if($c(a,"extname"),_p(this.dirname,"extname"),a){if(a.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(a.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=jn.join(this.dirname,this.stem+(a||""))}get path(){return this.history[this.history.length-1]}set path(a){bo(a)&&(a=KS(a)),Ic(a,"path"),this.path!==a&&this.history.push(a)}get stem(){return typeof this.path=="string"?jn.basename(this.path,this.extname):void 0}set stem(a){Ic(a,"stem"),$c(a,"stem"),this.path=jn.join(this.dirname||"",a+(this.extname||""))}fail(a,r,u){const o=this.message(a,r,u);throw o.fatal=!0,o}info(a,r,u){const o=this.message(a,r,u);return o.fatal=void 0,o}message(a,r,u){const o=new zt(a,r,u);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(a){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(a||void 0).decode(this.value)}}function $c(n,a){if(n&&n.includes(jn.sep))throw new Error("`"+a+"` cannot be a path: did not expect `"+jn.sep+"`")}function Ic(n,a){if(!n)throw new Error("`"+a+"` cannot be empty")}function _p(n,a){if(!n)throw new Error("Setting `"+a+"` requires `path` to be set too")}function VS(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const QS=(function(n){const u=this.constructor.prototype,o=u[n],h=function(){return o.apply(h,arguments)};return Object.setPrototypeOf(h,u),h}),XS={}.hasOwnProperty;class Uo extends QS{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=_S()}copy(){const a=new Uo;let r=-1;for(;++r<this.attachers.length;){const u=this.attachers[r];a.use(...u)}return a.data(Fc(!0,{},this.namespace)),a}data(a,r){return typeof a=="string"?arguments.length===2?(eo("data",this.frozen),this.namespace[a]=r,this):XS.call(this.namespace,a)&&this.namespace[a]||void 0:a?(eo("data",this.frozen),this.namespace=a,this):this.namespace}freeze(){if(this.frozen)return this;const a=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...u]=this.attachers[this.freezeIndex];if(u[0]===!1)continue;u[0]===!0&&(u[0]=void 0);const o=r.call(a,...u);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(a){this.freeze();const r=nu(a),u=this.parser||this.Parser;return Wc("parse",u),u(String(r),r)}process(a,r){const u=this;return this.freeze(),Wc("process",this.parser||this.Parser),Pc("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(h,f){const p=nu(a),g=u.parse(p);u.run(g,p,function(v,y,j){if(v||!y||!j)return m(v);const b=y,w=u.stringify(b,j);JS(w)?j.value=w:j.result=w,m(v,j)});function m(v,y){v||!y?f(v):h?h(y):r(void 0,y)}}}processSync(a){let r=!1,u;return this.freeze(),Wc("processSync",this.parser||this.Parser),Pc("processSync",this.compiler||this.Compiler),this.process(a,o),Op("processSync","process",r),u;function o(h,f){r=!0,zp(h),u=f}}run(a,r,u){Mp(a),this.freeze();const o=this.transformers;return!u&&typeof r=="function"&&(u=r,r=void 0),u?h(void 0,u):new Promise(h);function h(f,p){const g=nu(r);o.run(a,g,m);function m(v,y,j){const b=y||a;v?p(v):f?f(b):u(void 0,b,j)}}}runSync(a,r){let u=!1,o;return this.run(a,r,h),Op("runSync","run",u),o;function h(f,p){zp(f),o=p,u=!0}}stringify(a,r){this.freeze();const u=nu(r),o=this.compiler||this.Compiler;return Pc("stringify",o),Mp(a),o(a,u)}use(a,...r){const u=this.attachers,o=this.namespace;if(eo("use",this.frozen),a!=null)if(typeof a=="function")g(a,r);else if(typeof a=="object")Array.isArray(a)?p(a):f(a);else throw new TypeError("Expected usable value, not `"+a+"`");return this;function h(m){if(typeof m=="function")g(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[v,...y]=m;g(v,y)}else f(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function f(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");p(m.plugins),m.settings&&(o.settings=Fc(!0,o.settings,m.settings))}function p(m){let v=-1;if(m!=null)if(Array.isArray(m))for(;++v<m.length;){const y=m[v];h(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function g(m,v){let y=-1,j=-1;for(;++y<u.length;)if(u[y][0]===m){j=y;break}if(j===-1)u.push([m,...v]);else if(v.length>0){let[b,...w]=v;const B=u[j][1];vo(B)&&vo(b)&&(b=Fc(!0,B,b)),u[j]=[m,b,...w]}}}}const ZS=new Uo().freeze();function Wc(n,a){if(typeof a!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Pc(n,a){if(typeof a!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function eo(n,a){if(a)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Mp(n){if(!vo(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function Op(n,a,r){if(!r)throw new Error("`"+n+"` finished async. Use `"+a+"` instead")}function nu(n){return FS(n)?n:new Ag(n)}function FS(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function JS(n){return typeof n=="string"||$S(n)}function $S(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const IS="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Rp=[],Lp={allowDangerousHtml:!0},WS=/^(https?|ircs?|mailto|xmpp)$/i,PS=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Cg(n){const a=ej(n),r=tj(n);return nj(a.runSync(a.parse(r),r),n)}function ej(n){const a=n.rehypePlugins||Rp,r=n.remarkPlugins||Rp,u=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...Lp}:Lp;return ZS().use(R1).use(r).use(CS,u).use(a)}function tj(n){const a=n.children||"",r=new Ag;return typeof a=="string"&&(r.value=a),r}function nj(n,a){const r=a.allowedElements,u=a.allowElement,o=a.components,h=a.disallowedElements,f=a.skipHtml,p=a.unwrapDisallowed,g=a.urlTransform||lj;for(const v of PS)Object.hasOwn(a,v.from)&&(""+v.from+(v.to?"use `"+v.to+"` instead":"remove it")+IS+v.id,void 0);return Bo(n,m),x0(n,{Fragment:c.Fragment,components:o,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function m(v,y,j){if(v.type==="raw"&&j&&typeof y=="number")return f?j.children.splice(y,1):j.children[y]={type:"text",value:v.value},y;if(v.type==="element"){let b;for(b in Vc)if(Object.hasOwn(Vc,b)&&Object.hasOwn(v.properties,b)){const w=v.properties[b],B=Vc[b];(B===null||B.includes(v.tagName))&&(v.properties[b]=g(String(w||""),b,v))}}if(v.type==="element"){let b=r?!r.includes(v.tagName):h?h.includes(v.tagName):!1;if(!b&&u&&typeof y=="number"&&(b=!u(v,y,j)),b&&j&&typeof y=="number")return p&&v.children?j.children.splice(y,1,...v.children):j.children.splice(y,1),y}}}function lj(n){const a=n.indexOf(":"),r=n.indexOf("?"),u=n.indexOf("#"),o=n.indexOf("/");return a===-1||o!==-1&&a>o||r!==-1&&a>r||u!==-1&&a>u||WS.test(n.slice(0,a))?n:""}function Bp(n,a){const r=String(n);if(typeof a!="string")throw new TypeError("Expected character");let u=0,o=r.indexOf(a);for(;o!==-1;)u++,o=r.indexOf(a,o+a.length);return u}function ij(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function aj(n,a,r){const o=xu((r||{}).ignore||[]),h=rj(a);let f=-1;for(;++f<h.length;)wg(n,"text",p);function p(m,v){let y=-1,j;for(;++y<v.length;){const b=v[y],w=j?j.children:void 0;if(o(b,w?w.indexOf(b):void 0,j))return;j=b}if(j)return g(m,v)}function g(m,v){const y=v[v.length-1],j=h[f][0],b=h[f][1];let w=0;const K=y.children.indexOf(m);let C=!1,X=[];j.lastIndex=0;let Y=j.exec(m.value);for(;Y;){const Z=Y.index,oe={index:Y.index,input:Y.input,stack:[...v,m]};let M=b(...Y,oe);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?j.lastIndex=Z+1:(w!==Z&&X.push({type:"text",value:m.value.slice(w,Z)}),Array.isArray(M)?X.push(...M):M&&X.push(M),w=Z+Y[0].length,C=!0),!j.global)break;Y=j.exec(m.value)}return C?(w<m.value.length&&X.push({type:"text",value:m.value.slice(w)}),y.children.splice(K,1,...X)):X=[m],K+X.length}}function rj(n){const a=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!n[0]||Array.isArray(n[0])?n:[n];let u=-1;for(;++u<r.length;){const o=r[u];a.push([uj(o[0]),sj(o[1])])}return a}function uj(n){return typeof n=="string"?new RegExp(ij(n),"g"):n}function sj(n){return typeof n=="function"?n:function(){return n}}const to="phrasing",no=["autolink","link","image","label"];function cj(){return{transforms:[gj],enter:{literalAutolink:fj,literalAutolinkEmail:lo,literalAutolinkHttp:lo,literalAutolinkWww:lo},exit:{literalAutolink:pj,literalAutolinkEmail:mj,literalAutolinkHttp:dj,literalAutolinkWww:hj}}}function oj(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:to,notInConstruct:no},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:to,notInConstruct:no},{character:":",before:"[ps]",after:"\\/",inConstruct:to,notInConstruct:no}]}}function fj(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function lo(n){this.config.enter.autolinkProtocol.call(this,n)}function dj(n){this.config.exit.autolinkProtocol.call(this,n)}function hj(n){this.config.exit.data.call(this,n);const a=this.stack[this.stack.length-1];a.type,a.url="http://"+this.sliceSerialize(n)}function mj(n){this.config.exit.autolinkEmail.call(this,n)}function pj(n){this.exit(n)}function gj(n){aj(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,yj],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),xj]],{ignore:["link","linkReference"]})}function yj(n,a,r,u,o){let h="";if(!zg(o)||(/^w/i.test(a)&&(r=a+r,a="",h="http://"),!vj(r)))return!1;const f=bj(r+u);if(!f[0])return!1;const p={type:"link",title:null,url:h+a+f[0],children:[{type:"text",value:a+f[0]}]};return f[1]?[p,{type:"text",value:f[1]}]:p}function xj(n,a,r,u){return!zg(u,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+a+"@"+r,children:[{type:"text",value:a+"@"+r}]}}function vj(n){const a=n.split(".");return!(a.length<2||a[a.length-1]&&(/_/.test(a[a.length-1])||!/[a-zA-Z\d]/.test(a[a.length-1]))||a[a.length-2]&&(/_/.test(a[a.length-2])||!/[a-zA-Z\d]/.test(a[a.length-2])))}function bj(n){const a=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!a)return[n,void 0];n=n.slice(0,a.index);let r=a[0],u=r.indexOf(")");const o=Bp(n,"(");let h=Bp(n,")");for(;u!==-1&&o>h;)n+=r.slice(0,u+1),r=r.slice(u+1),u=r.indexOf(")"),h++;return[n,r]}function zg(n,a){const r=n.input.charCodeAt(n.index-1);return(n.index===0||Bl(r)||pu(r))&&(!a||r!==47)}Dg.peek=Cj;function Sj(){this.buffer()}function jj(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function kj(){this.buffer()}function Nj(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function Ej(n){const a=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=yn(this.sliceSerialize(n)).toLowerCase(),r.label=a}function Tj(n){this.exit(n)}function wj(n){const a=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=yn(this.sliceSerialize(n)).toLowerCase(),r.label=a}function Aj(n){this.exit(n)}function Cj(){return"["}function Dg(n,a,r,u){const o=r.createTracker(u);let h=o.move("[^");const f=r.enter("footnoteReference"),p=r.enter("reference");return h+=o.move(r.safe(r.associationId(n),{after:"]",before:h})),p(),f(),h+=o.move("]"),h}function zj(){return{enter:{gfmFootnoteCallString:Sj,gfmFootnoteCall:jj,gfmFootnoteDefinitionLabelString:kj,gfmFootnoteDefinition:Nj},exit:{gfmFootnoteCallString:Ej,gfmFootnoteCall:Tj,gfmFootnoteDefinitionLabelString:wj,gfmFootnoteDefinition:Aj}}}function Dj(n){let a=!1;return n&&n.firstLineBlank&&(a=!0),{handlers:{footnoteDefinition:r,footnoteReference:Dg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(u,o,h,f){const p=h.createTracker(f);let g=p.move("[^");const m=h.enter("footnoteDefinition"),v=h.enter("label");return g+=p.move(h.safe(h.associationId(u),{before:g,after:"]"})),v(),g+=p.move("]:"),u.children&&u.children.length>0&&(p.shift(4),g+=p.move((a?`
73
+ `:" ")+h.indentLines(h.containerFlow(u,p.current()),a?_g:_j))),m(),g}}function _j(n,a,r){return a===0?n:_g(n,a,r)}function _g(n,a,r){return(r?"":" ")+n}const Mj=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Mg.peek=Uj;function Oj(){return{canContainEols:["delete"],enter:{strikethrough:Lj},exit:{strikethrough:Bj}}}function Rj(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Mj}],handlers:{delete:Mg}}}function Lj(n){this.enter({type:"delete",children:[]},n)}function Bj(n){this.exit(n)}function Mg(n,a,r,u){const o=r.createTracker(u),h=r.enter("strikethrough");let f=o.move("~~");return f+=r.containerPhrasing(n,{...o.current(),before:f,after:"~"}),f+=o.move("~~"),h(),f}function Uj(){return"~"}function Hj(n){return n.length}function qj(n,a){const r=a||{},u=(r.align||[]).concat(),o=r.stringLength||Hj,h=[],f=[],p=[],g=[];let m=0,v=-1;for(;++v<n.length;){const B=[],K=[];let C=-1;for(n[v].length>m&&(m=n[v].length);++C<n[v].length;){const X=Yj(n[v][C]);if(r.alignDelimiters!==!1){const Y=o(X);K[C]=Y,(g[C]===void 0||Y>g[C])&&(g[C]=Y)}B.push(X)}f[v]=B,p[v]=K}let y=-1;if(typeof u=="object"&&"length"in u)for(;++y<m;)h[y]=Up(u[y]);else{const B=Up(u);for(;++y<m;)h[y]=B}y=-1;const j=[],b=[];for(;++y<m;){const B=h[y];let K="",C="";B===99?(K=":",C=":"):B===108?K=":":B===114&&(C=":");let X=r.alignDelimiters===!1?1:Math.max(1,g[y]-K.length-C.length);const Y=K+"-".repeat(X)+C;r.alignDelimiters!==!1&&(X=K.length+X+C.length,X>g[y]&&(g[y]=X),b[y]=X),j[y]=Y}f.splice(1,0,j),p.splice(1,0,b),v=-1;const w=[];for(;++v<f.length;){const B=f[v],K=p[v];y=-1;const C=[];for(;++y<m;){const X=B[y]||"";let Y="",Z="";if(r.alignDelimiters!==!1){const oe=g[y]-(K[y]||0),M=h[y];M===114?Y=" ".repeat(oe):M===99?oe%2?(Y=" ".repeat(oe/2+.5),Z=" ".repeat(oe/2-.5)):(Y=" ".repeat(oe/2),Z=Y):Z=" ".repeat(oe)}r.delimiterStart!==!1&&!y&&C.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&X==="")&&(r.delimiterStart!==!1||y)&&C.push(" "),r.alignDelimiters!==!1&&C.push(Y),C.push(X),r.alignDelimiters!==!1&&C.push(Z),r.padding!==!1&&C.push(" "),(r.delimiterEnd!==!1||y!==m-1)&&C.push("|")}w.push(r.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return w.join(`
74
+ `)}function Yj(n){return n==null?"":String(n)}function Up(n){const a=typeof n=="string"?n.codePointAt(0):0;return a===67||a===99?99:a===76||a===108?108:a===82||a===114?114:0}function Kj(n,a,r,u){const o=r.enter("blockquote"),h=r.createTracker(u);h.move("> "),h.shift(2);const f=r.indentLines(r.containerFlow(n,h.current()),Gj);return o(),f}function Gj(n,a,r){return">"+(r?"":" ")+n}function Vj(n,a){return Hp(n,a.inConstruct,!0)&&!Hp(n,a.notInConstruct,!1)}function Hp(n,a,r){if(typeof a=="string"&&(a=[a]),!a||a.length===0)return r;let u=-1;for(;++u<a.length;)if(n.includes(a[u]))return!0;return!1}function qp(n,a,r,u){let o=-1;for(;++o<r.unsafe.length;)if(r.unsafe[o].character===`
75
+ `&&Vj(r.stack,r.unsafe[o]))return/[ \t]/.test(u.before)?"":" ";return`\\
76
+ `}function Qj(n,a){const r=String(n);let u=r.indexOf(a),o=u,h=0,f=0;if(typeof a!="string")throw new TypeError("Expected substring");for(;u!==-1;)u===o?++h>f&&(f=h):h=1,o=u+a.length,u=r.indexOf(a,o);return f}function Xj(n,a){return!!(a.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function Zj(n){const a=n.options.fence||"`";if(a!=="`"&&a!=="~")throw new Error("Cannot serialize code with `"+a+"` for `options.fence`, expected `` ` `` or `~`");return a}function Fj(n,a,r,u){const o=Zj(r),h=n.value||"",f=o==="`"?"GraveAccent":"Tilde";if(Xj(n,r)){const y=r.enter("codeIndented"),j=r.indentLines(h,Jj);return y(),j}const p=r.createTracker(u),g=o.repeat(Math.max(Qj(h,o)+1,3)),m=r.enter("codeFenced");let v=p.move(g);if(n.lang){const y=r.enter(`codeFencedLang${f}`);v+=p.move(r.safe(n.lang,{before:v,after:" ",encode:["`"],...p.current()})),y()}if(n.lang&&n.meta){const y=r.enter(`codeFencedMeta${f}`);v+=p.move(" "),v+=p.move(r.safe(n.meta,{before:v,after:`
77
+ `,encode:["`"],...p.current()})),y()}return v+=p.move(`
78
+ `),h&&(v+=p.move(h+`
79
+ `)),v+=p.move(g),m(),v}function Jj(n,a,r){return(r?"":" ")+n}function Ho(n){const a=n.options.quote||'"';if(a!=='"'&&a!=="'")throw new Error("Cannot serialize title with `"+a+"` for `options.quote`, expected `\"`, or `'`");return a}function $j(n,a,r,u){const o=Ho(r),h=o==='"'?"Quote":"Apostrophe",f=r.enter("definition");let p=r.enter("label");const g=r.createTracker(u);let m=g.move("[");return m+=g.move(r.safe(r.associationId(n),{before:m,after:"]",...g.current()})),m+=g.move("]: "),p(),!n.url||/[\0- \u007F]/.test(n.url)?(p=r.enter("destinationLiteral"),m+=g.move("<"),m+=g.move(r.safe(n.url,{before:m,after:">",...g.current()})),m+=g.move(">")):(p=r.enter("destinationRaw"),m+=g.move(r.safe(n.url,{before:m,after:n.title?" ":`
80
+ `,...g.current()}))),p(),n.title&&(p=r.enter(`title${h}`),m+=g.move(" "+o),m+=g.move(r.safe(n.title,{before:m,after:o,...g.current()})),m+=g.move(o),p()),f(),m}function Ij(n){const a=n.options.emphasis||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize emphasis with `"+a+"` for `options.emphasis`, expected `*`, or `_`");return a}function Oa(n){return"&#x"+n.toString(16).toUpperCase()+";"}function fu(n,a,r){const u=Ai(n),o=Ai(a);return u===void 0?o===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:u===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Og.peek=Wj;function Og(n,a,r,u){const o=Ij(r),h=r.enter("emphasis"),f=r.createTracker(u),p=f.move(o);let g=f.move(r.containerPhrasing(n,{after:o,before:p,...f.current()}));const m=g.charCodeAt(0),v=fu(u.before.charCodeAt(u.before.length-1),m,o);v.inside&&(g=Oa(m)+g.slice(1));const y=g.charCodeAt(g.length-1),j=fu(u.after.charCodeAt(0),y,o);j.inside&&(g=g.slice(0,-1)+Oa(y));const b=f.move(o);return h(),r.attentionEncodeSurroundingInfo={after:j.outside,before:v.outside},p+g+b}function Wj(n,a,r){return r.options.emphasis||"*"}function Pj(n,a){let r=!1;return Bo(n,function(u){if("value"in u&&/\r?\n|\r/.test(u.value)||u.type==="break")return r=!0,yo}),!!((!n.depth||n.depth<3)&&zo(n)&&(a.options.setext||r))}function ek(n,a,r,u){const o=Math.max(Math.min(6,n.depth||1),1),h=r.createTracker(u);if(Pj(n,r)){const v=r.enter("headingSetext"),y=r.enter("phrasing"),j=r.containerPhrasing(n,{...h.current(),before:`
81
+ `,after:`
82
+ `});return y(),v(),j+`
83
+ `+(o===1?"=":"-").repeat(j.length-(Math.max(j.lastIndexOf("\r"),j.lastIndexOf(`
84
+ `))+1))}const f="#".repeat(o),p=r.enter("headingAtx"),g=r.enter("phrasing");h.move(f+" ");let m=r.containerPhrasing(n,{before:"# ",after:`
85
+ `,...h.current()});return/^[\t ]/.test(m)&&(m=Oa(m.charCodeAt(0))+m.slice(1)),m=m?f+" "+m:f,r.options.closeAtx&&(m+=" "+f),g(),p(),m}Rg.peek=tk;function Rg(n){return n.value||""}function tk(){return"<"}Lg.peek=nk;function Lg(n,a,r,u){const o=Ho(r),h=o==='"'?"Quote":"Apostrophe",f=r.enter("image");let p=r.enter("label");const g=r.createTracker(u);let m=g.move("![");return m+=g.move(r.safe(n.alt,{before:m,after:"]",...g.current()})),m+=g.move("]("),p(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(p=r.enter("destinationLiteral"),m+=g.move("<"),m+=g.move(r.safe(n.url,{before:m,after:">",...g.current()})),m+=g.move(">")):(p=r.enter("destinationRaw"),m+=g.move(r.safe(n.url,{before:m,after:n.title?" ":")",...g.current()}))),p(),n.title&&(p=r.enter(`title${h}`),m+=g.move(" "+o),m+=g.move(r.safe(n.title,{before:m,after:o,...g.current()})),m+=g.move(o),p()),m+=g.move(")"),f(),m}function nk(){return"!"}Bg.peek=lk;function Bg(n,a,r,u){const o=n.referenceType,h=r.enter("imageReference");let f=r.enter("label");const p=r.createTracker(u);let g=p.move("![");const m=r.safe(n.alt,{before:g,after:"]",...p.current()});g+=p.move(m+"]["),f();const v=r.stack;r.stack=[],f=r.enter("reference");const y=r.safe(r.associationId(n),{before:g,after:"]",...p.current()});return f(),r.stack=v,h(),o==="full"||!m||m!==y?g+=p.move(y+"]"):o==="shortcut"?g=g.slice(0,-1):g+=p.move("]"),g}function lk(){return"!"}Ug.peek=ik;function Ug(n,a,r){let u=n.value||"",o="`",h=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(u);)o+="`";for(/[^ \r\n]/.test(u)&&(/^[ \r\n]/.test(u)&&/[ \r\n]$/.test(u)||/^`|`$/.test(u))&&(u=" "+u+" ");++h<r.unsafe.length;){const f=r.unsafe[h],p=r.compilePattern(f);let g;if(f.atBreak)for(;g=p.exec(u);){let m=g.index;u.charCodeAt(m)===10&&u.charCodeAt(m-1)===13&&m--,u=u.slice(0,m)+" "+u.slice(g.index+1)}}return o+u+o}function ik(){return"`"}function Hg(n,a){const r=zo(n);return!!(!a.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(r===n.url||"mailto:"+r===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}qg.peek=ak;function qg(n,a,r,u){const o=Ho(r),h=o==='"'?"Quote":"Apostrophe",f=r.createTracker(u);let p,g;if(Hg(n,r)){const v=r.stack;r.stack=[],p=r.enter("autolink");let y=f.move("<");return y+=f.move(r.containerPhrasing(n,{before:y,after:">",...f.current()})),y+=f.move(">"),p(),r.stack=v,y}p=r.enter("link"),g=r.enter("label");let m=f.move("[");return m+=f.move(r.containerPhrasing(n,{before:m,after:"](",...f.current()})),m+=f.move("]("),g(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(g=r.enter("destinationLiteral"),m+=f.move("<"),m+=f.move(r.safe(n.url,{before:m,after:">",...f.current()})),m+=f.move(">")):(g=r.enter("destinationRaw"),m+=f.move(r.safe(n.url,{before:m,after:n.title?" ":")",...f.current()}))),g(),n.title&&(g=r.enter(`title${h}`),m+=f.move(" "+o),m+=f.move(r.safe(n.title,{before:m,after:o,...f.current()})),m+=f.move(o),g()),m+=f.move(")"),p(),m}function ak(n,a,r){return Hg(n,r)?"<":"["}Yg.peek=rk;function Yg(n,a,r,u){const o=n.referenceType,h=r.enter("linkReference");let f=r.enter("label");const p=r.createTracker(u);let g=p.move("[");const m=r.containerPhrasing(n,{before:g,after:"]",...p.current()});g+=p.move(m+"]["),f();const v=r.stack;r.stack=[],f=r.enter("reference");const y=r.safe(r.associationId(n),{before:g,after:"]",...p.current()});return f(),r.stack=v,h(),o==="full"||!m||m!==y?g+=p.move(y+"]"):o==="shortcut"?g=g.slice(0,-1):g+=p.move("]"),g}function rk(){return"["}function qo(n){const a=n.options.bullet||"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bullet`, expected `*`, `+`, or `-`");return a}function uk(n){const a=qo(n),r=n.options.bulletOther;if(!r)return a==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===a)throw new Error("Expected `bullet` (`"+a+"`) and `bulletOther` (`"+r+"`) to be different");return r}function sk(n){const a=n.options.bulletOrdered||".";if(a!=="."&&a!==")")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOrdered`, expected `.` or `)`");return a}function Kg(n){const a=n.options.rule||"*";if(a!=="*"&&a!=="-"&&a!=="_")throw new Error("Cannot serialize rules with `"+a+"` for `options.rule`, expected `*`, `-`, or `_`");return a}function ck(n,a,r,u){const o=r.enter("list"),h=r.bulletCurrent;let f=n.ordered?sk(r):qo(r);const p=n.ordered?f==="."?")":".":uk(r);let g=a&&r.bulletLastUsed?f===r.bulletLastUsed:!1;if(!n.ordered){const v=n.children?n.children[0]:void 0;if((f==="*"||f==="-")&&v&&(!v.children||!v.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(g=!0),Kg(r)===f&&v){let y=-1;for(;++y<n.children.length;){const j=n.children[y];if(j&&j.type==="listItem"&&j.children&&j.children[0]&&j.children[0].type==="thematicBreak"){g=!0;break}}}}g&&(f=p),r.bulletCurrent=f;const m=r.containerFlow(n,u);return r.bulletLastUsed=f,r.bulletCurrent=h,o(),m}function ok(n){const a=n.options.listItemIndent||"one";if(a!=="tab"&&a!=="one"&&a!=="mixed")throw new Error("Cannot serialize items with `"+a+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return a}function fk(n,a,r,u){const o=ok(r);let h=r.bulletCurrent||qo(r);a&&a.type==="list"&&a.ordered&&(h=(typeof a.start=="number"&&a.start>-1?a.start:1)+(r.options.incrementListMarker===!1?0:a.children.indexOf(n))+h);let f=h.length+1;(o==="tab"||o==="mixed"&&(a&&a.type==="list"&&a.spread||n.spread))&&(f=Math.ceil(f/4)*4);const p=r.createTracker(u);p.move(h+" ".repeat(f-h.length)),p.shift(f);const g=r.enter("listItem"),m=r.indentLines(r.containerFlow(n,p.current()),v);return g(),m;function v(y,j,b){return j?(b?"":" ".repeat(f))+y:(b?h:h+" ".repeat(f-h.length))+y}}function dk(n,a,r,u){const o=r.enter("paragraph"),h=r.enter("phrasing"),f=r.containerPhrasing(n,u);return h(),o(),f}const hk=xu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function mk(n,a,r,u){return(n.children.some(function(f){return hk(f)})?r.containerPhrasing:r.containerFlow).call(r,n,u)}function pk(n){const a=n.options.strong||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize strong with `"+a+"` for `options.strong`, expected `*`, or `_`");return a}Gg.peek=gk;function Gg(n,a,r,u){const o=pk(r),h=r.enter("strong"),f=r.createTracker(u),p=f.move(o+o);let g=f.move(r.containerPhrasing(n,{after:o,before:p,...f.current()}));const m=g.charCodeAt(0),v=fu(u.before.charCodeAt(u.before.length-1),m,o);v.inside&&(g=Oa(m)+g.slice(1));const y=g.charCodeAt(g.length-1),j=fu(u.after.charCodeAt(0),y,o);j.inside&&(g=g.slice(0,-1)+Oa(y));const b=f.move(o+o);return h(),r.attentionEncodeSurroundingInfo={after:j.outside,before:v.outside},p+g+b}function gk(n,a,r){return r.options.strong||"*"}function yk(n,a,r,u){return r.safe(n.value,u)}function xk(n){const a=n.options.ruleRepetition||3;if(a<3)throw new Error("Cannot serialize rules with repetition `"+a+"` for `options.ruleRepetition`, expected `3` or more");return a}function vk(n,a,r){const u=(Kg(r)+(r.options.ruleSpaces?" ":"")).repeat(xk(r));return r.options.ruleSpaces?u.slice(0,-1):u}const Vg={blockquote:Kj,break:qp,code:Fj,definition:$j,emphasis:Og,hardBreak:qp,heading:ek,html:Rg,image:Lg,imageReference:Bg,inlineCode:Ug,link:qg,linkReference:Yg,list:ck,listItem:fk,paragraph:dk,root:mk,strong:Gg,text:yk,thematicBreak:vk};function bk(){return{enter:{table:Sk,tableData:Yp,tableHeader:Yp,tableRow:kk},exit:{codeText:Nk,table:jk,tableData:io,tableHeader:io,tableRow:io}}}function Sk(n){const a=n._align;this.enter({type:"table",align:a.map(function(r){return r==="none"?null:r}),children:[]},n),this.data.inTable=!0}function jk(n){this.exit(n),this.data.inTable=void 0}function kk(n){this.enter({type:"tableRow",children:[]},n)}function io(n){this.exit(n)}function Yp(n){this.enter({type:"tableCell",children:[]},n)}function Nk(n){let a=this.resume();this.data.inTable&&(a=a.replace(/\\([\\|])/g,Ek));const r=this.stack[this.stack.length-1];r.type,r.value=a,this.exit(n)}function Ek(n,a){return a==="|"?a:n}function Tk(n){const a=n||{},r=a.tableCellPadding,u=a.tablePipeAlign,o=a.stringLength,h=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
86
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:j,table:f,tableCell:g,tableRow:p}};function f(b,w,B,K){return m(v(b,B,K),b.align)}function p(b,w,B,K){const C=y(b,B,K),X=m([C]);return X.slice(0,X.indexOf(`
87
+ `))}function g(b,w,B,K){const C=B.enter("tableCell"),X=B.enter("phrasing"),Y=B.containerPhrasing(b,{...K,before:h,after:h});return X(),C(),Y}function m(b,w){return qj(b,{align:w,alignDelimiters:u,padding:r,stringLength:o})}function v(b,w,B){const K=b.children;let C=-1;const X=[],Y=w.enter("table");for(;++C<K.length;)X[C]=y(K[C],w,B);return Y(),X}function y(b,w,B){const K=b.children;let C=-1;const X=[],Y=w.enter("tableRow");for(;++C<K.length;)X[C]=g(K[C],b,w,B);return Y(),X}function j(b,w,B){let K=Vg.inlineCode(b,w,B);return B.stack.includes("tableCell")&&(K=K.replace(/\|/g,"\\$&")),K}}function wk(){return{exit:{taskListCheckValueChecked:Kp,taskListCheckValueUnchecked:Kp,paragraph:Ck}}}function Ak(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:zk}}}function Kp(n){const a=this.stack[this.stack.length-2];a.type,a.checked=n.type==="taskListCheckValueChecked"}function Ck(n){const a=this.stack[this.stack.length-2];if(a&&a.type==="listItem"&&typeof a.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const u=r.children[0];if(u&&u.type==="text"){const o=a.children;let h=-1,f;for(;++h<o.length;){const p=o[h];if(p.type==="paragraph"){f=p;break}}f===r&&(u.value=u.value.slice(1),u.value.length===0?r.children.shift():r.position&&u.position&&typeof u.position.start.offset=="number"&&(u.position.start.column++,u.position.start.offset++,r.position.start=Object.assign({},u.position.start)))}}this.exit(n)}function zk(n,a,r,u){const o=n.children[0],h=typeof n.checked=="boolean"&&o&&o.type==="paragraph",f="["+(n.checked?"x":" ")+"] ",p=r.createTracker(u);h&&p.move(f);let g=Vg.listItem(n,a,r,{...u,...p.current()});return h&&(g=g.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),g;function m(v){return v+f}}function Dk(){return[cj(),zj(),Oj(),bk(),wk()]}function _k(n){return{extensions:[oj(),Dj(n),Rj(),Tk(n),Ak()]}}const Mk={tokenize:Hk,partial:!0},Qg={tokenize:qk,partial:!0},Xg={tokenize:Yk,partial:!0},Zg={tokenize:Kk,partial:!0},Ok={tokenize:Gk,partial:!0},Fg={name:"wwwAutolink",tokenize:Bk,previous:$g},Jg={name:"protocolAutolink",tokenize:Uk,previous:Ig},Vn={name:"emailAutolink",tokenize:Lk,previous:Wg},Nn={};function Rk(){return{text:Nn}}let Ll=48;for(;Ll<123;)Nn[Ll]=Vn,Ll++,Ll===58?Ll=65:Ll===91&&(Ll=97);Nn[43]=Vn;Nn[45]=Vn;Nn[46]=Vn;Nn[95]=Vn;Nn[72]=[Vn,Jg];Nn[104]=[Vn,Jg];Nn[87]=[Vn,Fg];Nn[119]=[Vn,Fg];function Lk(n,a,r){const u=this;let o,h;return f;function f(y){return!So(y)||!Wg.call(u,u.previous)||Yo(u.events)?r(y):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),p(y))}function p(y){return So(y)?(n.consume(y),p):y===64?(n.consume(y),g):r(y)}function g(y){return y===46?n.check(Ok,v,m)(y):y===45||y===95||Ct(y)?(h=!0,n.consume(y),g):v(y)}function m(y){return n.consume(y),o=!0,g}function v(y){return h&&o&&Mt(u.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),a(y)):r(y)}}function Bk(n,a,r){const u=this;return o;function o(f){return f!==87&&f!==119||!$g.call(u,u.previous)||Yo(u.events)?r(f):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(Mk,n.attempt(Qg,n.attempt(Xg,h),r),r)(f))}function h(f){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),a(f)}}function Uk(n,a,r){const u=this;let o="",h=!1;return f;function f(y){return(y===72||y===104)&&Ig.call(u,u.previous)&&!Yo(u.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),o+=String.fromCodePoint(y),n.consume(y),p):r(y)}function p(y){if(Mt(y)&&o.length<5)return o+=String.fromCodePoint(y),n.consume(y),p;if(y===58){const j=o.toLowerCase();if(j==="http"||j==="https")return n.consume(y),g}return r(y)}function g(y){return y===47?(n.consume(y),h?m:(h=!0,g)):r(y)}function m(y){return y===null||su(y)||it(y)||Bl(y)||pu(y)?r(y):n.attempt(Qg,n.attempt(Xg,v),r)(y)}function v(y){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),a(y)}}function Hk(n,a,r){let u=0;return o;function o(f){return(f===87||f===119)&&u<3?(u++,n.consume(f),o):f===46&&u===3?(n.consume(f),h):r(f)}function h(f){return f===null?r(f):a(f)}}function qk(n,a,r){let u,o,h;return f;function f(m){return m===46||m===95?n.check(Zg,g,p)(m):m===null||it(m)||Bl(m)||m!==45&&pu(m)?g(m):(h=!0,n.consume(m),f)}function p(m){return m===95?u=!0:(o=u,u=void 0),n.consume(m),f}function g(m){return o||u||!h?r(m):a(m)}}function Yk(n,a){let r=0,u=0;return o;function o(f){return f===40?(r++,n.consume(f),o):f===41&&u<r?h(f):f===33||f===34||f===38||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===60||f===63||f===93||f===95||f===126?n.check(Zg,a,h)(f):f===null||it(f)||Bl(f)?a(f):(n.consume(f),o)}function h(f){return f===41&&u++,n.consume(f),o}}function Kk(n,a,r){return u;function u(p){return p===33||p===34||p===39||p===41||p===42||p===44||p===46||p===58||p===59||p===63||p===95||p===126?(n.consume(p),u):p===38?(n.consume(p),h):p===93?(n.consume(p),o):p===60||p===null||it(p)||Bl(p)?a(p):r(p)}function o(p){return p===null||p===40||p===91||it(p)||Bl(p)?a(p):u(p)}function h(p){return Mt(p)?f(p):r(p)}function f(p){return p===59?(n.consume(p),u):Mt(p)?(n.consume(p),f):r(p)}}function Gk(n,a,r){return u;function u(h){return n.consume(h),o}function o(h){return Ct(h)?r(h):a(h)}}function $g(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||it(n)}function Ig(n){return!Mt(n)}function Wg(n){return!(n===47||So(n))}function So(n){return n===43||n===45||n===46||n===95||Ct(n)}function Yo(n){let a=n.length,r=!1;for(;a--;){const u=n[a][1];if((u.type==="labelLink"||u.type==="labelImage")&&!u._balanced){r=!0;break}if(u._gfmAutolinkLiteralWalkedInto){r=!1;break}}return n.length>0&&!r&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const Vk={tokenize:Wk,partial:!0};function Qk(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Jk,continuation:{tokenize:$k},exit:Ik}},text:{91:{name:"gfmFootnoteCall",tokenize:Fk},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Xk,resolveTo:Zk}}}}function Xk(n,a,r){const u=this;let o=u.events.length;const h=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let f;for(;o--;){const g=u.events[o][1];if(g.type==="labelImage"){f=g;break}if(g.type==="gfmFootnoteCall"||g.type==="labelLink"||g.type==="label"||g.type==="image"||g.type==="link")break}return p;function p(g){if(!f||!f._balanced)return r(g);const m=yn(u.sliceSerialize({start:f.end,end:u.now()}));return m.codePointAt(0)!==94||!h.includes(m.slice(1))?r(g):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(g),n.exit("gfmFootnoteCallLabelMarker"),a(g))}}function Zk(n,a){let r=n.length;for(;r--;)if(n[r][1].type==="labelImage"&&n[r][0]==="enter"){n[r][1];break}n[r+1][1].type="data",n[r+3][1].type="gfmFootnoteCallLabelMarker";const u={type:"gfmFootnoteCall",start:Object.assign({},n[r+3][1].start),end:Object.assign({},n[n.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},n[r+3][1].end),end:Object.assign({},n[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const h={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},n[n.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},h.start),end:Object.assign({},h.end)},p=[n[r+1],n[r+2],["enter",u,a],n[r+3],n[r+4],["enter",o,a],["exit",o,a],["enter",h,a],["enter",f,a],["exit",f,a],["exit",h,a],n[n.length-2],n[n.length-1],["exit",u,a]];return n.splice(r,n.length-r+1,...p),n}function Fk(n,a,r){const u=this,o=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let h=0,f;return p;function p(y){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(y),n.exit("gfmFootnoteCallLabelMarker"),g}function g(y){return y!==94?r(y):(n.enter("gfmFootnoteCallMarker"),n.consume(y),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",m)}function m(y){if(h>999||y===93&&!f||y===null||y===91||it(y))return r(y);if(y===93){n.exit("chunkString");const j=n.exit("gfmFootnoteCallString");return o.includes(yn(u.sliceSerialize(j)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(y),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),a):r(y)}return it(y)||(f=!0),h++,n.consume(y),y===92?v:m}function v(y){return y===91||y===92||y===93?(n.consume(y),h++,m):m(y)}}function Jk(n,a,r){const u=this,o=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let h,f=0,p;return g;function g(w){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(w),n.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(w){return w===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(w),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",v):r(w)}function v(w){if(f>999||w===93&&!p||w===null||w===91||it(w))return r(w);if(w===93){n.exit("chunkString");const B=n.exit("gfmFootnoteDefinitionLabelString");return h=yn(u.sliceSerialize(B)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(w),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),j}return it(w)||(p=!0),f++,n.consume(w),w===92?y:v}function y(w){return w===91||w===92||w===93?(n.consume(w),f++,v):v(w)}function j(w){return w===58?(n.enter("definitionMarker"),n.consume(w),n.exit("definitionMarker"),o.includes(h)||o.push(h),Qe(n,b,"gfmFootnoteDefinitionWhitespace")):r(w)}function b(w){return a(w)}}function $k(n,a,r){return n.check(La,a,n.attempt(Vk,a,r))}function Ik(n){n.exit("gfmFootnoteDefinition")}function Wk(n,a,r){const u=this;return Qe(n,o,"gfmFootnoteDefinitionIndent",5);function o(h){const f=u.events[u.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?a(h):r(h)}}function Pk(n){let r=(n||{}).singleTilde;const u={name:"strikethrough",tokenize:h,resolveAll:o};return r==null&&(r=!0),{text:{126:u},insideSpan:{null:[u]},attentionMarkers:{null:[126]}};function o(f,p){let g=-1;for(;++g<f.length;)if(f[g][0]==="enter"&&f[g][1].type==="strikethroughSequenceTemporary"&&f[g][1]._close){let m=g;for(;m--;)if(f[m][0]==="exit"&&f[m][1].type==="strikethroughSequenceTemporary"&&f[m][1]._open&&f[g][1].end.offset-f[g][1].start.offset===f[m][1].end.offset-f[m][1].start.offset){f[g][1].type="strikethroughSequence",f[m][1].type="strikethroughSequence";const v={type:"strikethrough",start:Object.assign({},f[m][1].start),end:Object.assign({},f[g][1].end)},y={type:"strikethroughText",start:Object.assign({},f[m][1].end),end:Object.assign({},f[g][1].start)},j=[["enter",v,p],["enter",f[m][1],p],["exit",f[m][1],p],["enter",y,p]],b=p.parser.constructs.insideSpan.null;b&&en(j,j.length,0,gu(b,f.slice(m+1,g),p)),en(j,j.length,0,[["exit",y,p],["enter",f[g][1],p],["exit",f[g][1],p],["exit",v,p]]),en(f,m-1,g-m+3,j),g=m+j.length-2;break}}for(g=-1;++g<f.length;)f[g][1].type==="strikethroughSequenceTemporary"&&(f[g][1].type="data");return f}function h(f,p,g){const m=this.previous,v=this.events;let y=0;return j;function j(w){return m===126&&v[v.length-1][1].type!=="characterEscape"?g(w):(f.enter("strikethroughSequenceTemporary"),b(w))}function b(w){const B=Ai(m);if(w===126)return y>1?g(w):(f.consume(w),y++,b);if(y<2&&!r)return g(w);const K=f.exit("strikethroughSequenceTemporary"),C=Ai(w);return K._open=!C||C===2&&!!B,K._close=!B||B===2&&!!C,p(w)}}}class eN{constructor(){this.map=[]}add(a,r,u){tN(this,a,r,u)}consume(a){if(this.map.sort(function(h,f){return h[0]-f[0]}),this.map.length===0)return;let r=this.map.length;const u=[];for(;r>0;)r-=1,u.push(a.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),a.length=this.map[r][0];u.push(a.slice()),a.length=0;let o=u.pop();for(;o;){for(const h of o)a.push(h);o=u.pop()}this.map.length=0}}function tN(n,a,r,u){let o=0;if(!(r===0&&u.length===0)){for(;o<n.map.length;){if(n.map[o][0]===a){n.map[o][1]+=r,n.map[o][2].push(...u);return}o+=1}n.map.push([a,r,u])}}function nN(n,a){let r=!1;const u=[];for(;a<n.length;){const o=n[a];if(r){if(o[0]==="enter")o[1].type==="tableContent"&&u.push(n[a+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(n[a-1][1].type==="tableDelimiterMarker"){const h=u.length-1;u[h]=u[h]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(r=!0);a+=1}return u}function lN(){return{flow:{null:{name:"table",tokenize:iN,resolveAll:aN}}}}function iN(n,a,r){const u=this;let o=0,h=0,f;return p;function p(O){let ae=u.events.length-1;for(;ae>-1;){const se=u.events[ae][1].type;if(se==="lineEnding"||se==="linePrefix")ae--;else break}const le=ae>-1?u.events[ae][1].type:null,Ee=le==="tableHead"||le==="tableRow"?M:g;return Ee===M&&u.parser.lazy[u.now().line]?r(O):Ee(O)}function g(O){return n.enter("tableHead"),n.enter("tableRow"),m(O)}function m(O){return O===124||(f=!0,h+=1),v(O)}function v(O){return O===null?r(O):Ne(O)?h>1?(h=0,u.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(O),n.exit("lineEnding"),b):r(O):He(O)?Qe(n,v,"whitespace")(O):(h+=1,f&&(f=!1,o+=1),O===124?(n.enter("tableCellDivider"),n.consume(O),n.exit("tableCellDivider"),f=!0,v):(n.enter("data"),y(O)))}function y(O){return O===null||O===124||it(O)?(n.exit("data"),v(O)):(n.consume(O),O===92?j:y)}function j(O){return O===92||O===124?(n.consume(O),y):y(O)}function b(O){return u.interrupt=!1,u.parser.lazy[u.now().line]?r(O):(n.enter("tableDelimiterRow"),f=!1,He(O)?Qe(n,w,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):w(O))}function w(O){return O===45||O===58?K(O):O===124?(f=!0,n.enter("tableCellDivider"),n.consume(O),n.exit("tableCellDivider"),B):oe(O)}function B(O){return He(O)?Qe(n,K,"whitespace")(O):K(O)}function K(O){return O===58?(h+=1,f=!0,n.enter("tableDelimiterMarker"),n.consume(O),n.exit("tableDelimiterMarker"),C):O===45?(h+=1,C(O)):O===null||Ne(O)?Z(O):oe(O)}function C(O){return O===45?(n.enter("tableDelimiterFiller"),X(O)):oe(O)}function X(O){return O===45?(n.consume(O),X):O===58?(f=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(O),n.exit("tableDelimiterMarker"),Y):(n.exit("tableDelimiterFiller"),Y(O))}function Y(O){return He(O)?Qe(n,Z,"whitespace")(O):Z(O)}function Z(O){return O===124?w(O):O===null||Ne(O)?!f||o!==h?oe(O):(n.exit("tableDelimiterRow"),n.exit("tableHead"),a(O)):oe(O)}function oe(O){return r(O)}function M(O){return n.enter("tableRow"),ne(O)}function ne(O){return O===124?(n.enter("tableCellDivider"),n.consume(O),n.exit("tableCellDivider"),ne):O===null||Ne(O)?(n.exit("tableRow"),a(O)):He(O)?Qe(n,ne,"whitespace")(O):(n.enter("data"),me(O))}function me(O){return O===null||O===124||it(O)?(n.exit("data"),ne(O)):(n.consume(O),O===92?pe:me)}function pe(O){return O===92||O===124?(n.consume(O),me):me(O)}}function aN(n,a){let r=-1,u=!0,o=0,h=[0,0,0,0],f=[0,0,0,0],p=!1,g=0,m,v,y;const j=new eN;for(;++r<n.length;){const b=n[r],w=b[1];b[0]==="enter"?w.type==="tableHead"?(p=!1,g!==0&&(Gp(j,a,g,m,v),v=void 0,g=0),m={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},j.add(r,0,[["enter",m,a]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(u=!0,y=void 0,h=[0,0,0,0],f=[0,r+1,0,0],p&&(p=!1,v={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},j.add(r,0,[["enter",v,a]])),o=w.type==="tableDelimiterRow"?2:v?3:1):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(u=!1,f[2]===0&&(h[1]!==0&&(f[0]=f[1],y=lu(j,a,h,o,void 0,y),h=[0,0,0,0]),f[2]=r)):w.type==="tableCellDivider"&&(u?u=!1:(h[1]!==0&&(f[0]=f[1],y=lu(j,a,h,o,void 0,y)),h=f,f=[h[1],r,0,0])):w.type==="tableHead"?(p=!0,g=r):w.type==="tableRow"||w.type==="tableDelimiterRow"?(g=r,h[1]!==0?(f[0]=f[1],y=lu(j,a,h,o,r,y)):f[1]!==0&&(y=lu(j,a,f,o,r,y)),o=0):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(f[3]=r)}for(g!==0&&Gp(j,a,g,m,v),j.consume(a.events),r=-1;++r<a.events.length;){const b=a.events[r];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=nN(a.events,r))}return n}function lu(n,a,r,u,o,h){const f=u===1?"tableHeader":u===2?"tableDelimiter":"tableData",p="tableContent";r[0]!==0&&(h.end=Object.assign({},Ti(a.events,r[0])),n.add(r[0],0,[["exit",h,a]]));const g=Ti(a.events,r[1]);if(h={type:f,start:Object.assign({},g),end:Object.assign({},g)},n.add(r[1],0,[["enter",h,a]]),r[2]!==0){const m=Ti(a.events,r[2]),v=Ti(a.events,r[3]),y={type:p,start:Object.assign({},m),end:Object.assign({},v)};if(n.add(r[2],0,[["enter",y,a]]),u!==2){const j=a.events[r[2]],b=a.events[r[3]];if(j[1].end=Object.assign({},b[1].end),j[1].type="chunkText",j[1].contentType="text",r[3]>r[2]+1){const w=r[2]+1,B=r[3]-r[2]-1;n.add(w,B,[])}}n.add(r[3]+1,0,[["exit",y,a]])}return o!==void 0&&(h.end=Object.assign({},Ti(a.events,o)),n.add(o,0,[["exit",h,a]]),h=void 0),h}function Gp(n,a,r,u,o){const h=[],f=Ti(a.events,r);o&&(o.end=Object.assign({},f),h.push(["exit",o,a])),u.end=Object.assign({},f),h.push(["exit",u,a]),n.add(r+1,0,h)}function Ti(n,a){const r=n[a],u=r[0]==="enter"?"start":"end";return r[1][u]}const rN={name:"tasklistCheck",tokenize:sN};function uN(){return{text:{91:rN}}}function sN(n,a,r){const u=this;return o;function o(g){return u.previous!==null||!u._gfmTasklistFirstContentOfListItem?r(g):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(g),n.exit("taskListCheckMarker"),h)}function h(g){return it(g)?(n.enter("taskListCheckValueUnchecked"),n.consume(g),n.exit("taskListCheckValueUnchecked"),f):g===88||g===120?(n.enter("taskListCheckValueChecked"),n.consume(g),n.exit("taskListCheckValueChecked"),f):r(g)}function f(g){return g===93?(n.enter("taskListCheckMarker"),n.consume(g),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),p):r(g)}function p(g){return Ne(g)?a(g):He(g)?n.check({tokenize:cN},a,r)(g):r(g)}}function cN(n,a,r){return Qe(n,u,"whitespace");function u(o){return o===null?r(o):a(o)}}function oN(n){return sg([Rk(),Qk(),Pk(n),lN(),uN()])}const fN={};function Pg(n){const a=this,r=n||fN,u=a.data(),o=u.micromarkExtensions||(u.micromarkExtensions=[]),h=u.fromMarkdownExtensions||(u.fromMarkdownExtensions=[]),f=u.toMarkdownExtensions||(u.toMarkdownExtensions=[]);o.push(oN(r)),h.push(Dk()),f.push(_k(r))}function dN({meta:n}={}){return c.jsxs("div",{className:"disclaimer",children:["본 소프트웨어는 트레이딩 로직 라이선스 + 소프트웨어 공급 모델로 제공됩니다. 거래 의사결정과 실행은 사용자의 책임이며, 본 소프트웨어는 투자 자문 · 투자 일임 · 수익 보장을 제공하지 않습니다. 원금 손실의 위험이 있습니다.",n&&c.jsx("div",{className:"disclaimer-meta",children:n})]})}const ru={neoul:"너울"},hN={neoul:"var(--persona-neoul)"};function Ca(n){return n?hN[n]??"var(--persona-unknown)":"var(--persona-unknown)"}function jo(n){return n?ru[n]??n:"미지정"}const uu={decision:"의사결정",order_submitted:"주문 접수",order_status:"주문 상태",order_rejected:"주문 거부",watcher_triggered:"감시자 발화"};function ao(n){return n.replace(/<state_update>[\s\S]*?<\/state_update>\s*$/i,"").replace(/<state_update>[\s\S]*?<\/state_update>/gi,"").trimEnd()}function ro(n){if(!n)return{};try{const a=n.match(/```(?:json)?\s*([\s\S]*?)```/),r=a?a[1]:n,u=JSON.parse(r);return{action:u.action,symbol:u.symbol_code,symbolName:u.symbol_name,reasoning:typeof u.reasoning=="string"?ao(u.reasoning):void 0}}catch{const a=n.match(/"reasoning"\s*:\s*"([^"\\]*(?:\\.[^"\\]*)*)"/);return a?{reasoning:ao(a[1].replace(/\\n/g,`
88
+ `).replace(/\\"/g,'"'))}:{reasoning:ao(n)}}}function mN(n){const a=new Date(n),r=new Date;return a.toDateString()===r.toDateString()?a.toLocaleTimeString("ko-KR",{hour:"2-digit",minute:"2-digit"}):a.toLocaleDateString("ko-KR",{month:"numeric",day:"numeric"})+" "+a.toLocaleTimeString("ko-KR",{hour:"2-digit",minute:"2-digit"})}function kn(n){return n==null?"—":Math.abs(n)>=1e8?`${(n/1e8).toFixed(2)}억`:Math.abs(n)>=1e4?`${(n/1e4).toFixed(0)}만`:n.toLocaleString("ko-KR")}const uo=5;function pN(n={}){var E;const[a,r]=W.useState([]),[u,o]=W.useState(null),[h,f]=W.useState(null),[p,g]=W.useState(7),[m,v]=W.useState("all"),[y,j]=W.useState("all"),[b,w]=W.useState(0),B=W.useRef(null),[K,C]=W.useState(0),[X,Y]=W.useState(!1),[Z,oe]=W.useState(null),[M,ne]=W.useState(null);async function me(){Y(!0),oe(null);try{const[N,_,k]=await Promise.all([fetch(`/api/journal/events?days=${p}`).then(G=>G.json()),fetch(`/api/journal/pnl?days=${Math.max(p,30)}`).then(G=>G.json()).catch(()=>null),fetch("/api/watchers").then(G=>G.json())]);r((N.events??[]).reverse()),o(_),f(k),w(0)}catch(N){oe(String(N))}finally{Y(!1)}}W.useEffect(()=>{me()},[p]);const pe=W.useMemo(()=>a.filter(N=>!(m!=="all"&&N.eventType!==m||y!=="all"&&N.personaSlug!==y)),[a,m,y]),O=W.useMemo(()=>Array.from(new Set(a.map(N=>N.personaSlug).filter(Boolean))),[a]),ae=W.useMemo(()=>{const N={};for(const _ of a){const k=_.personaSlug??"unknown";N[k]||(N[k]={decisions:0,orders:0,watcher:0,total:0,buyKrw:0,sellKrw:0});const G=N[k];G.total++,_.eventType==="decision"&&G.decisions++,_.eventType.startsWith("order")&&G.orders++,_.eventType==="watcher_triggered"&&G.watcher++,_.priceKrw&&_.filledQty&&(_.side==="buy"&&(G.buyKrw+=_.priceKrw*_.filledQty),_.side==="sell"&&(G.sellKrw+=_.priceKrw*_.filledQty))}return N},[a]),le=W.useMemo(()=>{const N=Object.keys(uu),_=Object.keys(ae),k={};for(const G of N)k[G]={};for(const G of a){k[G.eventType]||(k[G.eventType]={});const fe=G.personaSlug??"unknown";k[G.eventType][fe]=(k[G.eventType][fe]??0)+1}return{types:N,personaList:_,matrix:k}},[a,ae]),Ee=W.useMemo(()=>{const N=(h==null?void 0:h.watchers)??[],_={};for(const k of N){const G=k.personaSlug??"unknown";_[G]||(_[G]=[]),_[G].push(k)}return _},[h]);W.useEffect(()=>{if(!M)return;const N=_=>{_.key==="Escape"&&ne(null)};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[M]);const se=Math.max(1,Math.ceil(pe.length/uo)),P=Math.min(K,se-1),D=P*uo,I=Math.min(D+uo,pe.length),de=pe.slice(D,I);W.useEffect(()=>{C(0),w(0)},[m,y,p,a.length]),W.useEffect(()=>{var N;(N=B.current)==null||N.scrollTo({top:0})},[b]);const ee=pe[b];return Z?c.jsxs("div",{className:"banner danger",children:["API 오류 · ",Z]}):c.jsxs("div",{className:"journal-page",children:[c.jsx("header",{className:"page-hero",children:c.jsxs("div",{className:"page-hero-text",children:[c.jsx("span",{className:"page-hero-eyebrow",children:"JOURNAL"}),c.jsx("h1",{children:"거래 일지"}),c.jsxs("p",{className:"page-hero-sub",children:["최근 ",p,"일 의사결정 · 주문 · 감시자 발화 이벤트 timeline."]})]})}),c.jsx("div",{className:"section-label",children:"STAT"}),c.jsxs("section",{className:"stat-row",children:[c.jsxs("button",{type:"button",className:"stat-card glass is-clickable",onClick:()=>ne("pnl"),"aria-label":"실현 손익 상세 보기",children:[c.jsx("div",{className:"icon green","aria-hidden":!0,children:"💰"}),c.jsxs("div",{className:"stat-body",children:[c.jsxs("div",{className:`v num ${((u==null?void 0:u.totalRealizedPnlKrw)??0)>=0?"gain":"loss"}`,children:[((u==null?void 0:u.totalRealizedPnlKrw)??0)>=0?"+":"",kn((u==null?void 0:u.totalRealizedPnlKrw)??0)]}),c.jsx("div",{className:"k",children:"실현 손익 30일"})]})]}),c.jsxs("button",{type:"button",className:"stat-card glass is-clickable",onClick:()=>ne("trades"),"aria-label":"거래 수 상세 보기",children:[c.jsx("div",{className:"icon purple","aria-hidden":!0,children:"📊"}),c.jsxs("div",{className:"stat-body",children:[c.jsx("div",{className:"v num",children:(u==null?void 0:u.totalTrades)??0}),c.jsx("div",{className:"k",children:"총 거래 수"})]})]}),c.jsxs("button",{type:"button",className:"stat-card glass is-clickable",onClick:()=>ne("events"),"aria-label":"이벤트 상세 보기",children:[c.jsx("div",{className:"icon amber","aria-hidden":!0,children:"📓"}),c.jsxs("div",{className:"stat-body",children:[c.jsx("div",{className:"v num",children:a.length}),c.jsxs("div",{className:"k",children:[p,"일 이벤트"]})]})]}),c.jsxs("button",{type:"button",className:"stat-card glass is-clickable",onClick:()=>ne("watchers"),"aria-label":"감시자 상세 보기",children:[c.jsx("div",{className:"icon sky","aria-hidden":!0,children:"⏰"}),c.jsxs("div",{className:"stat-body",children:[c.jsxs("div",{className:"v num",children:[(h==null?void 0:h.stats.active)??0,(h==null?void 0:h.dbStats)&&h.dbStats.total>(h.stats.active??0)&&c.jsxs("span",{className:"stat-v-secondary",children:[" /",h.dbStats.total]})]}),c.jsx("div",{className:"k",children:"활성 감시자"})]})]})]}),c.jsx("div",{className:"section-label",children:"TIMELINE"}),c.jsxs("div",{className:"journal-section-head",children:[c.jsxs("h2",{children:["이벤트 ",pe.length,"건"]}),c.jsxs("div",{className:"filter-bar",children:[c.jsxs("select",{value:p,onChange:N=>g(Number(N.target.value)),children:[c.jsx("option",{value:1,children:"오늘"}),c.jsx("option",{value:7,children:"7일"}),c.jsx("option",{value:30,children:"30일"}),c.jsx("option",{value:90,children:"90일"})]}),c.jsxs("select",{value:m,onChange:N=>v(N.target.value),children:[c.jsx("option",{value:"all",children:"모든 이벤트"}),c.jsx("option",{value:"decision",children:"의사결정"}),c.jsx("option",{value:"order_submitted",children:"주문 접수"}),c.jsx("option",{value:"order_status",children:"주문 상태"}),c.jsx("option",{value:"order_rejected",children:"주문 거부"}),c.jsx("option",{value:"watcher_triggered",children:"감시자 발화"})]}),O.length>1&&c.jsxs("select",{value:y,onChange:N=>j(N.target.value),children:[c.jsx("option",{value:"all",children:"모든 트레이더"}),O.map(N=>c.jsx("option",{value:N,children:ru[N]??N},N))]}),c.jsx("button",{className:"btn ghost sm",onClick:()=>void me(),disabled:X,children:X?"...":"↻"})]})]}),c.jsxs("div",{className:"journal-grid",children:[c.jsxs("div",{className:"glass",children:[c.jsx("div",{className:"journal-list",children:pe.length===0?c.jsxs("div",{className:"empty-card",children:[c.jsx("div",{className:"empty-card-icon","aria-hidden":!0,children:"📭"}),c.jsx("div",{className:"empty-card-title",children:"표시할 이벤트가 없어요"}),c.jsx("div",{className:"empty-card-sub",children:"필터를 변경하거나 페르소나가 첫 사이클을 실행하면 일지에 기록됩니다."})]}):de.map(N=>{var he,ke,Me,Ce;const _=pe.indexOf(N),k=N.personaSlug?ru[N.personaSlug]??N.personaSlug:"—";let G=uu[N.eventType]??N.eventType;if(N.eventType==="decision"){const{action:ue,symbolName:F}=ro((he=N.llmContext)==null?void 0:he.reasoning);ue&&(G=`${ue==="buy"?"매수":ue==="sell"?"매도":ue==="hold"?"보유":"관망"}${F?` · ${F}`:""}`)}else if(N.eventType==="watcher_triggered"){const ue=(ke=N.meta)==null?void 0:ke.intent;typeof ue=="string"&&(G=`깨움 · ${ue}`)}else if(N.eventType==="order_status"){const ue=(Me=N.meta)==null?void 0:Me.next;G=`${N.symbolName??N.symbolCode??""} · ${ue??"상태 변경"}`}let fe="is-decision";if(N.eventType==="decision"){const{action:ue}=ro((Ce=N.llmContext)==null?void 0:Ce.reasoning);fe=ue==="buy"?"is-buy":ue==="sell"?"is-sell":"is-decision"}else N.eventType==="watcher_triggered"?fe="is-watcher":N.eventType==="order_rejected"?fe="is-rejected":N.eventType.startsWith("order_")&&(fe="is-order");return c.jsxs("button",{className:`item ${_===b?"is-active":""}`,onClick:()=>w(_),children:[c.jsxs("div",{className:"ev-row",children:[c.jsx("span",{className:`ev-dot ${fe}`,"aria-hidden":!0}),c.jsx("span",{className:"ev-time",children:mN(N.timestamp)}),c.jsx("span",{className:"ev-meta",children:k})]}),c.jsx("div",{className:"ev-summary",children:G})]},_)})}),se>1&&c.jsxs("div",{className:"pagination",children:[c.jsxs("span",{children:[D+1,"–",I," ",c.jsxs("span",{className:"pages-total",children:["/ ",pe.length]})]}),c.jsxs("div",{className:"pages",children:[c.jsx("button",{className:"page-btn",disabled:P===0,onClick:()=>C(0),children:"«"}),c.jsx("button",{className:"page-btn",disabled:P===0,onClick:()=>C(N=>Math.max(0,N-1)),children:"‹"}),c.jsxs("span",{className:"page-num",children:[c.jsx("strong",{children:P+1})," / ",se]}),c.jsx("button",{className:"page-btn",disabled:P>=se-1,onClick:()=>C(N=>Math.min(se-1,N+1)),children:"›"}),c.jsx("button",{className:"page-btn",disabled:P>=se-1,onClick:()=>C(se-1),children:"»"})]})]})]}),ee&&c.jsxs("div",{className:"journal-detail glass",ref:B,children:[c.jsxs("div",{className:"journal-detail-head",children:[c.jsx("h3",{children:uu[ee.eventType]??ee.eventType}),c.jsx("span",{className:"ev-time-mono",children:new Date(ee.timestamp).toLocaleString("ko-KR")})]}),ee.eventType==="decision"&&(()=>{var ke,Me,Ce,ue,F,ve,te;const{action:N,symbol:_,symbolName:k,reasoning:G}=ro((ke=ee.llmContext)==null?void 0:ke.reasoning),fe=N==="buy"?"매수":N==="sell"?"매도":N==="hold"?"보유":"관망",he=N==="buy"?"buy":N==="sell"?"sell":"hold";return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"journal-decision-head",children:[c.jsx("span",{className:`verdict-pill ${he}`,children:fe}),k&&c.jsx("strong",{children:k}),_&&c.jsx("span",{className:"symbol-mono",children:_})]}),G&&c.jsx("div",{className:"reasoning markdown",children:c.jsx(Cg,{remarkPlugins:[Pg],children:G})}),c.jsxs("dl",{className:"kv-list",children:[ee.personaSlug&&c.jsxs(c.Fragment,{children:[c.jsx("dt",{children:"트레이더"}),c.jsx("dd",{children:ru[ee.personaSlug]??ee.personaSlug})]}),c.jsx("dt",{children:"모델"}),c.jsx("dd",{children:((Me=ee.llmContext)==null?void 0:Me.model)??"—"}),((Ce=ee.llmContext)==null?void 0:Ce.stopReason)&&c.jsxs(c.Fragment,{children:[c.jsx("dt",{children:"응답 종료"}),c.jsxs("dd",{children:[ee.llmContext.stopReason,ee.llmContext.truncated&&c.jsx("span",{className:"is-truncated",children:" · 잘림 ⚠"})]})]}),((ue=ee.llmContext)==null?void 0:ue.triggered_by)&&c.jsxs(c.Fragment,{children:[c.jsx("dt",{children:"발화 원인"}),c.jsxs("dd",{children:["감시자 · ",ee.llmContext.triggered_by.intent]})]}),((F=ee.llmContext)==null?void 0:F.followup_status)&&c.jsxs(c.Fragment,{children:[c.jsx("dt",{children:"처리 상태"}),c.jsxs("dd",{className:"is-loss",children:[ee.llmContext.followup_status,ee.llmContext.error?` · ${ee.llmContext.error}`:""]})]}),((ve=ee.llmContext)==null?void 0:ve.screening_summary)&&c.jsxs(c.Fragment,{children:[c.jsx("dt",{children:"스크리닝"}),c.jsxs("dd",{children:["universe ",(te=ee.llmContext.screening_summary.universe)==null?void 0:te.toLocaleString()," →"," ","평가 ",ee.llmContext.screening_summary.evaluated," →"," ","후보 ",ee.llmContext.screening_summary.candidates]})]})]})]})})(),ee.eventType.startsWith("order_")&&ee.eventType!=="decision"&&c.jsxs("dl",{className:"kv-list",children:[c.jsx("dt",{children:"종목"}),c.jsxs("dd",{children:[ee.symbolName??"—"," ",ee.symbolCode&&c.jsxs("span",{className:"mono-mute",children:["(",ee.symbolCode,")"]})]}),c.jsx("dt",{children:"방향"}),c.jsx("dd",{children:ee.side==="buy"?"매수":ee.side==="sell"?"매도":"—"}),c.jsx("dt",{children:"수량"}),c.jsxs("dd",{className:"num",children:[ee.quantity??"—",ee.filledQty!=null&&ee.filledQty!==ee.quantity?` (체결 ${ee.filledQty})`:""]}),ee.priceKrw!=null&&c.jsxs(c.Fragment,{children:[c.jsx("dt",{children:"가격"}),c.jsxs("dd",{className:"num",children:[kn(ee.priceKrw),"원"]})]}),ee.brokerOrderNo&&c.jsxs(c.Fragment,{children:[c.jsx("dt",{children:"broker 주문번호"}),c.jsx("dd",{className:"num",children:ee.brokerOrderNo})]}),ee.clientOrderId&&c.jsxs(c.Fragment,{children:[c.jsx("dt",{children:"client id"}),c.jsx("dd",{className:"is-mono",children:ee.clientOrderId})]}),ee.meta&&Object.keys(ee.meta).length>0&&c.jsxs(c.Fragment,{children:[c.jsx("dt",{children:"메타"}),c.jsx("dd",{className:"is-mono",children:JSON.stringify(ee.meta)})]}),ee.error&&c.jsxs(c.Fragment,{children:[c.jsx("dt",{children:"오류"}),c.jsx("dd",{className:"is-loss",children:ee.error})]})]}),ee.eventType==="watcher_triggered"&&ee.meta&&(()=>{const N=ee.meta;return c.jsxs("dl",{className:"kv-list",children:[c.jsx("dt",{children:"의도"}),c.jsx("dd",{children:String(N.intent??"—")}),c.jsx("dt",{children:"watcher"}),c.jsx("dd",{className:"is-mono",children:String(N.watcherId??"")}),N.lifecycle==="expired"&&c.jsxs(c.Fragment,{children:[c.jsx("dt",{children:"이유"}),c.jsx("dd",{className:"is-warn",children:"만료 (maxWaitHours 초과)"})]}),N.triggerData!=null&&c.jsxs(c.Fragment,{children:[c.jsx("dt",{children:"trigger data"}),c.jsx("dd",{className:"is-mono",children:JSON.stringify(N.triggerData)})]})]})})()]})]}),c.jsx(dN,{}),M==="pnl"&&c.jsx(iu,{title:"실현 손익 상세",subtitle:`최근 ${Math.max(p,30)}일 · FIFO 추정`,onClose:()=>ne(null),children:c.jsx(gN,{pnl:u,personaStats:ae})}),M==="trades"&&c.jsx(iu,{title:"거래 수 상세",subtitle:`총 ${(u==null?void 0:u.totalTrades)??0}건 · 트레이더별 분포`,onClose:()=>ne(null),children:c.jsx(yN,{pnl:u,personaStats:ae})}),M==="events"&&c.jsx(iu,{title:"이벤트 상세",subtitle:`최근 ${p}일 · ${a.length}건`,onClose:()=>ne(null),children:c.jsx(xN,{matrix:le})}),M==="watchers"&&c.jsx(iu,{title:"감시자 상세",subtitle:`활성 ${(h==null?void 0:h.stats.active)??0} / 누적 ${((E=h==null?void 0:h.dbStats)==null?void 0:E.total)??0}`,onClose:()=>ne(null),children:c.jsx(vN,{groups:Ee})})]})}function iu({title:n,subtitle:a,onClose:r,children:u}){return c.jsxs(mu,{open:!0,onClose:r,size:"wide",title:c.jsx("span",{children:n}),children:[a&&c.jsx("div",{className:"card-dialog-head",children:c.jsx("p",{className:"sub",children:a})}),u]})}function gN({pnl:n,personaStats:a}){const r=(n==null?void 0:n.byDate)??[],u=W.useMemo(()=>{let f=0;return r.map(p=>(f+=p.realizedPnlKrw,{date:p.date,value:f}))},[r]),o=Object.keys(a).filter(f=>a[f].buyKrw>0||a[f].sellKrw>0),h=Math.max(0,...o.flatMap(f=>[a[f].buyKrw,a[f].sellKrw]));return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"dialog-section",children:[c.jsx("h3",{children:"일별 누적 손익"}),c.jsx("p",{className:"sub",children:"날짜별 실현 손익 누적 추이"}),u.length===0?c.jsx("div",{className:"empty",children:"아직 손익 데이터가 없어요."}):c.jsx(bN,{data:u,color:u[u.length-1].value>=0?"var(--gain)":"var(--loss)"})]}),c.jsxs("div",{className:"dialog-section",children:[c.jsx("h3",{children:"트레이더별 매수 · 매도 금액"}),c.jsx("p",{className:"sub",children:"체결가 × 체결수량 합계"}),o.length===0?c.jsx("div",{className:"empty",children:"집계할 거래가 없어요."}):c.jsx("div",{children:o.map(f=>c.jsxs("div",{style:{marginBottom:"var(--sp-3)"},children:[c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:4},children:[c.jsx(Ko,{slug:f}),c.jsxs("span",{className:"num",style:{fontSize:"var(--fs-xs)",color:"var(--ink-mute)"},children:["매수 ",kn(a[f].buyKrw)," · 매도 ",kn(a[f].sellKrw)]})]}),c.jsx(du,{label:"매수",value:a[f].buyKrw,max:h,color:"var(--gain)",hideLabel:!0}),c.jsx(du,{label:"매도",value:a[f].sellKrw,max:h,color:"var(--loss)",hideLabel:!0})]},f))})]})]})}function yN({pnl:n,personaStats:a}){const r=Object.keys(a).sort((h,f)=>a[f].orders-a[h].orders),u=Math.max(1,...r.map(h=>a[h].orders)),o=Math.max(1,...r.map(h=>a[h].decisions));return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"dialog-section",children:[c.jsx("h3",{children:"요약"}),c.jsxs("div",{className:"metric-grid",children:[c.jsxs("div",{className:"item",children:[c.jsx("span",{className:"k",children:"총 거래 (체결)"}),c.jsx("span",{className:"v num",children:(n==null?void 0:n.totalTrades)??0})]}),c.jsxs("div",{className:"item",children:[c.jsx("span",{className:"k",children:"총 매수액"}),c.jsx("span",{className:"v num",children:kn(n==null?void 0:n.totalBuyAmountKrw)})]}),c.jsxs("div",{className:"item",children:[c.jsx("span",{className:"k",children:"총 매도액"}),c.jsx("span",{className:"v num",children:kn(n==null?void 0:n.totalSellAmountKrw)})]}),c.jsxs("div",{className:"item",children:[c.jsx("span",{className:"k",children:"실현 손익"}),c.jsx("span",{className:"v num",children:kn(n==null?void 0:n.totalRealizedPnlKrw)})]})]})]}),c.jsxs("div",{className:"dialog-section",children:[c.jsx("h3",{children:"트레이더별 주문 이벤트"}),c.jsx("p",{className:"sub",children:"order_submitted / order_status / order_rejected 합계"}),r.length===0?c.jsx("div",{className:"empty",children:"데이터 없음"}):r.map(h=>c.jsx(du,{label:jo(h),dotColor:Ca(h),value:a[h].orders,max:u,color:Ca(h)},h))]}),c.jsxs("div",{className:"dialog-section",children:[c.jsx("h3",{children:"트레이더별 의사결정 횟수"}),c.jsx("p",{className:"sub",children:"decision 이벤트 카운트 (LLM 판단 횟수)"}),r.length===0?c.jsx("div",{className:"empty",children:"데이터 없음"}):r.map(h=>c.jsx(du,{label:jo(h),dotColor:Ca(h),value:a[h].decisions,max:o,color:Ca(h)},h))]})]})}function xN({matrix:n}){const a=n.personaList.filter(f=>f!=="unknown").sort(),r=n.personaList.includes("unknown")?[...a,"unknown"]:a,u=n.types.filter(f=>Object.values(n.matrix[f]??{}).some(p=>p>0)),o=f=>Object.values(n.matrix[f]??{}).reduce((p,g)=>p+g,0),h=f=>u.reduce((p,g)=>{var m;return p+(((m=n.matrix[g])==null?void 0:m[f])??0)},0);return u.length===0?c.jsx("div",{className:"empty",children:"집계할 이벤트가 없어요."}):c.jsxs("div",{className:"dialog-section",children:[c.jsx("h3",{children:"이벤트 타입 × 트레이더"}),c.jsx("p",{className:"sub",children:"행: 이벤트 타입 · 열: 트레이더"}),c.jsxs("table",{className:"matrix-table",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"row-head",children:"타입"}),r.map(f=>c.jsx("th",{children:c.jsx(Ko,{slug:f,compact:!0})},f)),c.jsx("th",{children:"합계"})]})}),c.jsxs("tbody",{children:[u.map(f=>c.jsxs("tr",{children:[c.jsx("td",{className:"row-head",children:uu[f]??f}),r.map(p=>{var m;const g=((m=n.matrix[f])==null?void 0:m[p])??0;return c.jsx("td",{className:g===0?"zero":"",children:g||"·"},p)}),c.jsx("td",{className:"total",children:o(f)})]},f)),c.jsxs("tr",{children:[c.jsx("td",{className:"row-head total",children:"합계"}),r.map(f=>c.jsx("td",{className:"total",children:h(f)},f)),c.jsx("td",{className:"total",children:u.reduce((f,p)=>f+o(p),0)})]})]})]})]})}function vN({groups:n}){const a=Object.keys(n).sort();if(a.length===0)return c.jsx("div",{className:"empty",children:"활성 감시자가 없어요."});const r=u=>({active:"활성",triggered:"발화",expired:"만료",revoked:"해제"})[u];return c.jsx(c.Fragment,{children:a.map(u=>c.jsxs("div",{className:"watcher-group",children:[c.jsxs("div",{className:"group-head",children:[c.jsx(Ko,{slug:u}),c.jsxs("span",{className:"count",children:[n[u].length,"건"]})]}),n[u].map(o=>{var f,p,g,m;const h=((g=(p=(f=o.spec)==null?void 0:f.condition)==null?void 0:p.config)==null?void 0:g.symbolCode)??"—";return c.jsxs("div",{className:"watcher-row",children:[c.jsxs("div",{style:{minWidth:0},children:[c.jsx("div",{className:"intent",children:((m=o.spec)==null?void 0:m.intent)??"—"}),c.jsx("div",{className:"symbol",children:h})]}),c.jsx("span",{className:`status ${o.status}`,children:r(o.status)})]},o.id)})]},u))})}function Ko({slug:n,compact:a=!1}){const r=Ca(n),u=jo(n);return c.jsxs("span",{className:"persona-chip",style:{"--persona-color":r},children:[c.jsx("span",{className:"dot",style:{background:r}}),!a&&c.jsx("span",{children:u}),a&&c.jsx("span",{style:{fontSize:"var(--fs-xs)"},children:u})]})}function du({label:n,value:a,max:r,color:u,dotColor:o,hideLabel:h=!1}){const f=r>0?Math.max(0,a/r*100):0,p=a>=1e4?kn(a):a.toLocaleString("ko-KR");return c.jsxs("div",{className:"bar-row",style:h?{gridTemplateColumns:"60px 1fr 80px"}:void 0,children:[c.jsxs("div",{className:"bar-label",children:[o&&c.jsx("span",{className:"dot",style:{background:o}}),c.jsx("span",{className:"name",children:n})]}),c.jsx("div",{className:"bar-track",children:c.jsx("div",{className:"bar-fill",style:{width:`${f}%`,background:u}})}),c.jsx("div",{className:"bar-value",children:p})]})}function bN({data:n,color:a}){if(n.length===0)return null;const r=600,u=180,o=16,h=n.map(X=>X.value),f=Math.max(...h,0),p=Math.min(...h,0),g=f-p||1,m=n.length>1?(r-2*o)/(n.length-1):0,v=n.map((X,Y)=>{const Z=o+Y*m,oe=o+(u-2*o)*(1-(X.value-p)/g);return[Z,oe]}),y=v.map(([X,Y],Z)=>`${Z===0?"M":"L"} ${X} ${Y}`).join(" "),j=v[v.length-1],b=v[0],w=`${y} L ${j[0]} ${u-o} L ${b[0]} ${u-o} Z`,B=o+(u-2*o)*(1-(0-p)/g),K=n[0].date.slice(5),C=n[n.length-1].date.slice(5);return c.jsx("div",{className:"mini-chart",children:c.jsxs("svg",{viewBox:`0 0 ${r} ${u+18}`,preserveAspectRatio:"none",children:[p<0&&f>0&&c.jsx("line",{x1:o,y1:B,x2:r-o,y2:B,stroke:"var(--ink-faint)",strokeDasharray:"3 4",strokeWidth:"1"}),c.jsx("path",{d:w,fill:a,fillOpacity:"0.12"}),c.jsx("path",{d:y,stroke:a,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),v.map(([X,Y],Z)=>c.jsx("circle",{cx:X,cy:Y,r:n.length>30?0:2.5,fill:a},Z)),c.jsx("text",{className:"axis",x:o,y:u+12,textAnchor:"start",children:K}),c.jsx("text",{className:"axis",x:r-o,y:u+12,textAnchor:"end",children:C}),c.jsx("text",{className:"axis",x:r-o,y:o+4,textAnchor:"end",fill:"var(--ink-mute)",children:kn(f)}),p<0&&c.jsx("text",{className:"axis",x:r-o,y:u-o+2,textAnchor:"end",fill:"var(--ink-mute)",children:kn(p)})]})})}const Vp={neoul:"너울"};function SN(n){var Y;const[a,r]=W.useState([]),[u,o]=W.useState(null),[h,f]=W.useState({}),[p,g]=W.useState(null),[m,v]=W.useState(null),[y,j]=W.useState(!1),[b,w]=W.useState(null),B=W.useRef(null);W.useEffect(()=>{let Z=!0;return(async()=>{try{const M=(await fetch("/api/subscriptions").then(me=>me.json())).subscriptions??[];if(!Z)return;r(M),M.length>0&&!u&&o(M[0]);const ne={};await Promise.all(M.map(async me=>{try{const O=await(await fetch(`/api/diary/${me}/list?limit=30`)).json();O.ok&&O.diaries&&(ne[me]=O.diaries)}catch{}})),Z&&f(ne)}catch(oe){Z&&w(String(oe))}})(),()=>{Z=!1}},[]);const K=u?h[u]??[]:[],C=p??((Y=K[0])==null?void 0:Y.date)??null;W.useEffect(()=>{if(!u||!C){v(null);return}let Z=!0;return j(!0),(async()=>{try{const M=await(await fetch(`/api/diary/${u}?date=${C}`)).json();if(!Z)return;M.ok&&M.body?v(M.body):v(null)}catch(oe){Z&&w(String(oe))}finally{Z&&j(!1)}})(),()=>{Z=!1}},[u,C]),W.useEffect(()=>{var Z;(Z=B.current)==null||Z.scrollTo({top:0})},[u,C]);const X=W.useMemo(()=>C?new Date(`${C}T12:00:00+09:00`).toLocaleDateString("ko-KR",{year:"numeric",month:"long",day:"numeric",weekday:"long"}):"",[C]);return b?c.jsxs("div",{className:"banner danger",children:["일기 로드 실패 · ",b]}):c.jsxs("div",{className:"diary-page",children:[c.jsx("header",{className:"page-hero",children:c.jsxs("div",{className:"page-hero-text",children:[c.jsx("span",{className:"page-hero-eyebrow",children:"DIARY"}),c.jsx("h1",{children:"트레이더의 일기"}),c.jsx("p",{className:"page-hero-sub",children:"매일 16:00 KST 자동 작성 · 재미난 소설처럼 트레이더의 사고를 따라가며 주식을 배우는 콘텐츠"})]})}),a.length>1&&c.jsx("div",{className:"diary-persona-tabs",children:a.map(Z=>c.jsxs("button",{type:"button",className:`diary-persona-tab ${Z===u?"is-active":""}`,onClick:()=>{o(Z),g(null)},children:[Vp[Z]??Z,c.jsx("span",{className:"count",children:(h[Z]??[]).length})]},Z))}),c.jsxs("div",{className:"diary-grid",children:[c.jsxs("aside",{className:"diary-list-pane glass",children:[c.jsxs("div",{className:"diary-list-head",children:[c.jsx("span",{children:Vp[u??""]??u??"—"}),c.jsxs("span",{className:"meta",children:[K.length,"편"]})]}),K.length===0?c.jsxs("div",{className:"empty-card",style:{margin:"var(--sp-3)"},children:[c.jsx("div",{className:"empty-card-icon","aria-hidden":!0,children:"📓"}),c.jsx("div",{className:"empty-card-title",children:"아직 일기가 없습니다"}),c.jsx("div",{className:"empty-card-sub",children:"매일 16:00 KST 자동 작성됩니다."})]}):c.jsx("ul",{className:"diary-list",children:K.map(Z=>{const oe=Z.date===C,M=new Date(`${Z.date}T12:00:00+09:00`);return c.jsx("li",{children:c.jsxs("button",{type:"button",className:`diary-list-item ${oe?"is-active":""}`,onClick:()=>g(Z.date),children:[c.jsxs("div",{className:"row",children:[c.jsx("span",{className:"date num",children:M.toLocaleDateString("ko-KR",{month:"numeric",day:"numeric",weekday:"short"})}),c.jsxs("span",{className:"len num",children:[Math.round(Z.bodyLength/100)/10,"k자"]})]}),c.jsxs("p",{className:"excerpt",children:[Z.excerpt.replace(/^#[^\n]*\n+/,"").slice(0,90),"…"]})]})},Z.date)})})]}),c.jsx("article",{className:"diary-body-pane glass",ref:B,children:y?c.jsxs("div",{className:"empty",children:["일기 불러오는 중",c.jsx("span",{className:"dots-loading"})]}):m?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"diary-body-head",children:c.jsx("span",{className:"date-label",children:X})}),c.jsx("div",{className:"diary-md",children:c.jsx(Cg,{remarkPlugins:[Pg],children:m})})]}):c.jsxs("div",{className:"empty-card",children:[c.jsx("div",{className:"empty-card-icon","aria-hidden":!0,children:"📓"}),c.jsx("div",{className:"empty-card-title",children:"선택한 일기가 없습니다"}),c.jsx("div",{className:"empty-card-sub",children:"왼쪽 목록에서 날짜를 선택하세요."})]})})]})]})}const jN=1e3,kN=1500,NN=11e6;function EN({onComplete:n}){const[a,r]=W.useState(null),[u,o]=W.useState(null),h=W.useRef(!1);W.useEffect(()=>{h.current||(h.current=!0,(async()=>{try{await fetch("/api/prepare/start",{method:"POST"})}catch(g){o(`시작 실패: ${String(g)}`)}})())},[]),W.useEffect(()=>{let g=!1,m=null;async function v(){try{const b=await(await fetch("/api/prepare/status")).json();if(g)return;r(b),!b.running&&b.ok===!0&&!m&&(m=setTimeout(()=>{g||n()},kN))}catch(j){g||o(`상태 조회 실패: ${String(j)}`)}}v();const y=setInterval(v,jN);return()=>{g=!0,clearInterval(y),m&&clearTimeout(m)}},[n]);const f=a!=null&&a.startedAt?Math.round((Date.now()-a.startedAt)/1e3):0,p=a!=null&&a.candles.returned?Math.min(100,a.candles.returned/NN*100):0;return c.jsx("div",{className:"page",style:{maxWidth:720,margin:"48px auto",padding:"0 24px"},children:c.jsxs("div",{className:"section",children:[c.jsx("div",{className:"section-label",style:{marginBottom:8},children:"SETUP"}),c.jsx("h1",{style:{marginTop:0},children:"시세 데이터 준비 중"}),c.jsx("p",{style:{color:"var(--ink-mute, #71717a)"},children:"첫 다운로드는 5~10분 정도 걸려요. 그 다음부터는 매일 수 초 안에 갱신."}),u&&c.jsxs("div",{className:"banner danger",style:{marginTop:16},children:[c.jsx("strong",{children:"오류:"})," ",u]}),a&&c.jsxs("div",{className:"card",style:{marginTop:24,padding:24},children:[c.jsx("div",{style:{marginBottom:16},children:c.jsx(Qp,{icon:a.universe.done?"✓":"⏳",label:"universe (전종목 마스터)",value:a.universe.done?`${a.universe.count.toLocaleString()} 종목`:"다운로드 중...",done:a.universe.done})}),c.jsxs("div",{children:[c.jsx(Qp,{icon:a.candles.done?"✓":"⏳",label:"일봉 데이터",value:a.candles.done?`${a.candles.returned.toLocaleString()} row · 완료`:`${a.candles.returned.toLocaleString()} row · ${a.candles.pages} page`,done:a.candles.done}),c.jsx(TN,{percent:a.candles.done?100:p})]}),c.jsxs("div",{style:{marginTop:16,fontSize:"var(--fs-xs, 12px)",color:"var(--ink-mute)"},children:["경과 ",f,"초",a.running&&" · 백그라운드에서 계속 진행됩니다"]}),!a.running&&a.ok===!0&&c.jsx("div",{className:"banner",style:{marginTop:16,background:"var(--gain-soft)"},children:"✓ 준비 완료 — 곧 대시보드로 이동합니다"}),!a.running&&a.ok===!1&&c.jsxs("div",{className:"banner danger",style:{marginTop:16},children:["✗ 실패: ",a.error,c.jsx("button",{type:"button",className:"btn",style:{marginLeft:12},onClick:()=>{h.current=!1,r(null),fetch("/api/prepare/start",{method:"POST"}),h.current=!0},children:"재시도"})]})]}),!a&&!u&&c.jsx("p",{style:{marginTop:24,color:"var(--ink-mute)"},children:"시작 중..."})]})})}function Qp({icon:n,label:a,value:r,done:u}){return c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline"},children:[c.jsxs("span",{children:[c.jsx("span",{style:{display:"inline-block",width:20,color:u?"var(--gain, #22c55e)":"var(--ink-mute)"},children:n}),a]}),c.jsx("span",{style:{color:u?"var(--gain)":"var(--ink)",fontWeight:500},children:r})]})}function TN({percent:n}){return c.jsx("div",{style:{marginTop:8,height:8,borderRadius:4,background:"var(--surface, rgba(0,0,0,0.06))",overflow:"hidden"},children:c.jsx("div",{style:{width:`${Math.max(2,n)}%`,height:"100%",background:"var(--accent, #3b82f6)",transition:"width 500ms ease"}})})}const ey=[{id:"status",label:"대시보드",path:"/"},{id:"personas",label:"트레이더",path:"/personas"},{id:"diary",label:"일기",path:"/diary"},{id:"journal",label:"일지",path:"/journal"},{id:"setup",label:"설정",path:"/setup"}],wN={"/":"status","/status":"status","/personas":"personas","/diary":"diary","/journal":"journal","/setup":"setup"};function so(n){return wN[n]??"status"}function Xp(n){var a;return((a=ey.find(r=>r.id===n))==null?void 0:a.path)??"/"}function AN(){const[n,a]=W.useState(()=>so(window.location.pathname)),[r,u]=W.useState({halted:!1}),[o,h]=W.useState({authenticated:!1,userEmail:null,hasToken:!1}),[f,p]=W.useState(null);async function g(){var v;try{const b=(v=(await(await fetch("/api/readiness")).json()).items)==null?void 0:v.find(w=>w.id==="data-prepared");p((b==null?void 0:b.status)==="ok")}catch{p(null)}}function m(v,{replace:y=!1}={}){a(v);const j=Xp(v);if(window.location.pathname!==j){const b=y?"replaceState":"pushState";window.history[b]({tab:v},"",j)}}return W.useEffect(()=>{const v=()=>{a(so(window.location.pathname))};return window.addEventListener("popstate",v),()=>window.removeEventListener("popstate",v)},[]),W.useEffect(()=>{const v=Xp(so(window.location.pathname));window.location.pathname!==v&&window.history.replaceState({tab:n},"",v)},[]),W.useEffect(()=>{let v=!1;async function y(){var b;try{const[w,B,K]=await Promise.all([fetch("/api/me/identity"),fetch("/api/safety"),fetch("/api/readiness")]);if(v)return;const C=await w.json(),X=await B.json(),Y=await K.json();u({halted:!!X.halted});const Z={authenticated:!!C.authenticated,userEmail:C.userEmail??null,hasToken:!!C.hasToken};h(Z);const oe=(b=Y.items)==null?void 0:b.find(M=>M.id==="data-prepared");p(oe?oe.status==="ok":null),!Z.authenticated&&n!=="setup"&&m("setup",{replace:!0})}catch{!v&&n!=="setup"&&m("setup",{replace:!0})}}y();const j=setInterval(y,6e4);return()=>{v=!0,clearInterval(j)}},[]),c.jsxs("div",{className:"app-shell",children:[c.jsxs("header",{className:"app-bar",role:"banner",children:[c.jsxs("a",{className:"brand",href:"/","aria-label":"mulsok 홈",onClick:v=>{v.preventDefault(),m("status")},children:[c.jsx(CN,{}),c.jsx("span",{className:"brand-word",children:"mulsok"})]}),c.jsx("nav",{className:"app-nav",role:"tablist","aria-label":"주 탐색",children:ey.map(v=>c.jsx("button",{role:"tab","aria-selected":n===v.id,className:n===v.id?"is-active":"",onClick:()=>m(v.id),children:v.label},v.id))}),c.jsxs("div",{className:"app-bar-right",children:[c.jsx("div",{className:"user-pill",style:{background:o.authenticated?"var(--gain-soft, rgba(34,197,94,0.1))":"var(--surface, rgba(0,0,0,0.05))",color:o.authenticated?"var(--gain, #22c55e)":"var(--ink-mute, #71717a)",fontSize:"var(--fs-xs, 12px)",fontWeight:500},title:o.authenticated?`로그인: ${o.userEmail}`:o.hasToken?"인증 중":"로그인 안 됨 — 디바이스 토큰 필요",children:o.authenticated&&o.userEmail?`👤 ${o.userEmail.split("@")[0]}`:o.hasToken?"⏳ 인증 중":"🔒 로그인 안됨"}),c.jsxs("div",{className:`user-pill ${r.halted?"is-halt":""}`,children:[c.jsx("div",{className:"dot"}),r.halted?"긴급 정지":"가동 중"]})]})]}),c.jsxs("main",{className:"app-main",children:[o.authenticated&&n!=="setup"&&f===!1?c.jsx(EN,{onComplete:g}):null,!(o.authenticated&&n!=="setup"&&f===!1)&&n==="status"&&c.jsx(Mv,{onGoToSetup:()=>m("setup"),onGoToPersonas:()=>m("personas"),onGoToJournal:()=>m("journal"),onGoToDiary:()=>m("diary"),onSafetyChange:v=>u({halted:v})}),!(o.authenticated&&f===!1)&&n==="personas"&&c.jsx(Uv,{onGoToSetup:()=>m("setup"),onGoToJournal:()=>m("journal")}),!(o.authenticated&&f===!1)&&n==="diary"&&c.jsx(SN,{}),!(o.authenticated&&f===!1)&&n==="journal"&&c.jsx(pN,{onGoToSetup:()=>m("setup")}),n==="setup"&&c.jsx(Cv,{onSaved:()=>m("status"),onSafetyChange:v=>u({halted:v})})]})]})}function CN(){return c.jsx("div",{className:"brand-mark",children:"m"})}Tv.createRoot(document.getElementById("root")).render(c.jsx(xv.StrictMode,{children:c.jsx(AN,{})}));