@tea-agent/loop-agent 0.40.0-next.4 → 0.40.0-next.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/build-stamp.json +3 -3
- package/dist/infrastructure/harness/atomic-write.js +23 -0
- package/dist/worker/console/chat/chat-event-store.js +62 -4
- package/dist/worker/console/chat/context-panel.js +7 -0
- package/dist/worker/console/chat/deferred-turn.js +12 -0
- package/dist/worker/console/chat/pi-runtime.js +264 -16
- package/dist/worker/console/chat/provider-error.js +98 -0
- package/dist/worker/console/chat/routes.js +292 -29
- package/dist/worker/console/chat/session-stats.js +179 -0
- package/dist/worker/console/chat/session-store.js +93 -63
- package/dist/worker/console/chat/todos.js +115 -0
- package/dist/worker/console/chat/tool-preview.js +42 -0
- package/dist/worker/console/chat/turn-process.js +20 -55
- package/dist/worker/console/chat/user-questions.js +266 -0
- package/dist/worker/console/chat/workspace-landing.js +14 -0
- package/dist/worker/console/native-directory-picker.js +13 -0
- package/dist/worker/console/routes.js +309 -1
- package/dist/worker/console/security.js +4 -4
- package/dist/worker/console/server.js +529 -186
- package/dist/worker/console/static/assets/{abnfDiagram-N423BO3Z-CTx1TrNa.js → abnfDiagram-N423BO3Z-CGZrpj0K.js} +1 -1
- package/dist/worker/console/static/assets/{arc-B4i9cVxX.js → arc-CwEyA8iq.js} +1 -1
- package/dist/worker/console/static/assets/{architectureDiagram-T3A2C74G-BAXE8_Rl.js → architectureDiagram-T3A2C74G-DLTkrEQ3.js} +1 -1
- package/dist/worker/console/static/assets/{blockDiagram-VBNYF7ZC-C5Xh59at.js → blockDiagram-VBNYF7ZC-4w12zR3t.js} +1 -1
- package/dist/worker/console/static/assets/{c4Diagram-5PPSVZJV-B_asOzAu.js → c4Diagram-5PPSVZJV-BppqLAjk.js} +1 -1
- package/dist/worker/console/static/assets/channel-TzuwQha5.js +1 -0
- package/dist/worker/console/static/assets/{chunk-2GRJ4B5K-wRO_iRNc.js → chunk-2GRJ4B5K-DO6U26Pm.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-2Q5K7J3B-ByOaSh_G.js → chunk-2Q5K7J3B-DC7YEdOy.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5RXB4S5H-DjLzudan.js → chunk-5RXB4S5H-DtMYVQBw.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5VM5RSS4-JCNGkXYT.js → chunk-5VM5RSS4-C5Ed-57N.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-6Q2QTUOP-BhrPXXMZ.js → chunk-6Q2QTUOP-BUY4oIzT.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-GF5L2VYU-TJ5JuEBT.js → chunk-GF5L2VYU-VnWHALIV.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-JWPE2WC7-VVthn_mD.js → chunk-JWPE2WC7-COV-RQk4.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-KBJHAD2P-D60-Mny4.js → chunk-KBJHAD2P-dSnLtUiz.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-RYQCIY6F-zXv7aVye.js → chunk-RYQCIY6F-CX6FDzWh.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-XXDRQBXY-By9VQoi1.js → chunk-XXDRQBXY-D3mEgb6W.js} +1 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-DCu69b3S.js +1 -0
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-DCu69b3S.js +1 -0
- package/dist/worker/console/static/assets/{cose-bilkent-JH36ORCC-C4zQLe-M.js → cose-bilkent-JH36ORCC-QQBMUnAf.js} +1 -1
- package/dist/worker/console/static/assets/{cynefin-VYW2F7L2-wh5N2ReN.js → cynefin-VYW2F7L2-BxSD-LVV.js} +1 -1
- package/dist/worker/console/static/assets/{cynefinDiagram-MW4NZA55-Dlu5wIqs.js → cynefinDiagram-MW4NZA55-DxHNiNbk.js} +1 -1
- package/dist/worker/console/static/assets/{dagre-VZM6K2ZE-CrDgthc6.js → dagre-VZM6K2ZE-C83bYy8E.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-7IWD3JNH-zN1clg27.js → diagram-7IWD3JNH-BhtZu2YY.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-B4RE2ZJO-BN-o7J7-.js → diagram-B4RE2ZJO-K0P_ntRE.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-LBJQPF4R-C8SuPt0d.js → diagram-LBJQPF4R-CXYy1Nib.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-Q27KOJAE-BoizuHbZ.js → diagram-Q27KOJAE-D-CtIFkU.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-UB23O5K3-BzUzXixG.js → diagram-UB23O5K3-BEK9-_7c.js} +1 -1
- package/dist/worker/console/static/assets/{ebnfDiagram-BXEA7PRR-Ev3lA4Cf.js → ebnfDiagram-BXEA7PRR-L0EX-9wn.js} +1 -1
- package/dist/worker/console/static/assets/{erDiagram-JOGREHBK-GALUzRbs.js → erDiagram-JOGREHBK-9pt0fc_5.js} +1 -1
- package/dist/worker/console/static/assets/{flowDiagram-UKHOOZJN-CZJN65Sb.js → flowDiagram-UKHOOZJN-CZVeM_n1.js} +1 -1
- package/dist/worker/console/static/assets/{ganttDiagram-PKOTCBZU-JLB9OESl.js → ganttDiagram-PKOTCBZU-DqUKkAZP.js} +1 -1
- package/dist/worker/console/static/assets/{gitGraphDiagram-DS77QQ5N-CcvCr4GD.js → gitGraphDiagram-DS77QQ5N-BYUuXEgp.js} +1 -1
- package/dist/worker/console/static/assets/index-B0jGzQj6.js +407 -0
- package/dist/worker/console/static/assets/index-BiYbPiTw.css +1 -0
- package/dist/worker/console/static/assets/{infoDiagram-6WML65LV-HG5z7aVg.js → infoDiagram-6WML65LV-DNzKk7ah.js} +1 -1
- package/dist/worker/console/static/assets/{ishikawaDiagram-WSZJBQD7-BHEu9chR.js → ishikawaDiagram-WSZJBQD7-Clbyg5IP.js} +1 -1
- package/dist/worker/console/static/assets/{journeyDiagram-NVQOT4AX-Cp_Up8-a.js → journeyDiagram-NVQOT4AX-zDO_gZNO.js} +1 -1
- package/dist/worker/console/static/assets/{kanban-definition-27J2QSJJ-DvVeY-em.js → kanban-definition-27J2QSJJ-x3LpRYek.js} +1 -1
- package/dist/worker/console/static/assets/{linear-aGmcjgTn.js → linear-CTpwZqKR.js} +1 -1
- package/dist/worker/console/static/assets/{mermaid.core-Biyo-tqA.js → mermaid.core-D_WXK6C7.js} +5 -5
- package/dist/worker/console/static/assets/{mindmap-definition-FAOFIHXS-DyxY2pIb.js → mindmap-definition-FAOFIHXS-CWK-OYP5.js} +1 -1
- package/dist/worker/console/static/assets/{pegDiagram-VL7TDLO6-CkdGuc50.js → pegDiagram-VL7TDLO6-B9gtUPsM.js} +1 -1
- package/dist/worker/console/static/assets/{pieDiagram-7S7Q4E2Y-NNQI9xVR.js → pieDiagram-7S7Q4E2Y-Dj2lzceR.js} +1 -1
- package/dist/worker/console/static/assets/{quadrantDiagram-CIZ2JOQS-PAJkuz_G.js → quadrantDiagram-CIZ2JOQS-Nwljut7m.js} +1 -1
- package/dist/worker/console/static/assets/{railroadDiagram-AXF67PYL-ZwrQod0O.js → railroadDiagram-AXF67PYL-BY-KNt93.js} +1 -1
- package/dist/worker/console/static/assets/{requirementDiagram-LRYGKXZP-D3ZfrzM2.js → requirementDiagram-LRYGKXZP-Vx0wvpPy.js} +1 -1
- package/dist/worker/console/static/assets/{sankeyDiagram-W5VNT64P-DDGFmWk5.js → sankeyDiagram-W5VNT64P-B6grNXUk.js} +1 -1
- package/dist/worker/console/static/assets/{sequenceDiagram-SI44F4Z6-DO6mmXTA.js → sequenceDiagram-SI44F4Z6-CteidBvh.js} +1 -1
- package/dist/worker/console/static/assets/{sizeCapture-X5ZJPWSS-DMbCQiJt.js → sizeCapture-X5ZJPWSS-Du4W8mFK.js} +1 -1
- package/dist/worker/console/static/assets/{stateDiagram-OKZ733FA-Di_YUEfC.js → stateDiagram-OKZ733FA-jyI6Yh81.js} +1 -1
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-DyQblISl.js +1 -0
- package/dist/worker/console/static/assets/{swimlanes-SLNWSIFB-Bn2PphNJ.js → swimlanes-SLNWSIFB-DYWs_fRv.js} +2 -2
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-DiygmgYP.js +8 -0
- package/dist/worker/console/static/assets/{timeline-definition-Z64GVDOM-DPh8pRsp.js → timeline-definition-Z64GVDOM-DO5LLy47.js} +1 -1
- package/dist/worker/console/static/assets/{vennDiagram-T6HMQDX7-GMfl26pW.js → vennDiagram-T6HMQDX7-CLF2p1_L.js} +1 -1
- package/dist/worker/console/static/assets/{wardleyDiagram-T6FBY63Y-DTlmVrmF.js → wardleyDiagram-T6FBY63Y-AwTaYBxA.js} +1 -1
- package/dist/worker/console/static/assets/{xychartDiagram-ELKLHX3M-YGBjKAS5.js → xychartDiagram-ELKLHX3M-DzbblQRw.js} +1 -1
- package/dist/worker/console/static/index.html +2 -2
- package/dist/worker/console/static-src/app/console-types.js +29 -4
- package/dist/worker/console/static-src/app/useConsoleShell.js +30 -12
- package/dist/worker/console/static-src/app/useOperatorActions.js +36 -6
- package/dist/worker/console/static-src/app/useRecoveryConsole.js +10 -11
- package/dist/worker/console/static-src/app/useRunProgress.js +2 -1
- package/dist/worker/console/static-src/app/useTaskWizard.js +2 -2
- package/dist/worker/console/static-src/night/useNightBoard.js +8 -5
- package/dist/worker/console/static-src/operator-chat/chat-sse-events.js +140 -8
- package/dist/worker/console/static-src/operator-chat/details-dag-actions.js +122 -0
- package/dist/worker/console/static-src/operator-chat/refs.js +3 -0
- package/dist/worker/console/static-src/operator-chat/runtime-selection-labels.js +27 -0
- package/dist/worker/console/static-src/operator-chat/turn-submission.js +3 -2
- package/dist/worker/console/static-src/operator-chat/useChatSessions.js +168 -72
- package/dist/worker/console/static-src/operator-chat/useChatStream.js +78 -17
- package/dist/worker/console/static-src/operator-chat/useChatThread.js +184 -4
- package/dist/worker/console/static-src/operator-chat/useRepoBrowser.js +63 -9
- package/dist/worker/console/static-src/operator-chat/useWorkspaceBrowserGate.js +4 -0
- package/dist/worker/console/static-src/operator-chat/workspace-layout-mode.js +3 -3
- package/dist/worker/console/static-src/shell/useWorkspaces.js +299 -0
- package/dist/worker/console/static-src/shell/workspace-route.js +337 -0
- package/dist/worker/console/workspace-context.js +234 -0
- package/dist/worker/console/workspace-registry.js +214 -0
- package/dist/worker/observe/server.js +4 -0
- package/dist/worker/observe/static/api.js +26 -6
- package/dist/worker/observe/static/app.js +18 -70
- package/dist/worker/observe/static/index.html +1 -1
- package/dist/worker/observe/static/inspect-workspace.js +307 -0
- package/dist/worker/observe/static/operator-chrome.css +145 -20
- package/dist/worker/observe/static/operator-chrome.d.ts +20 -3
- package/dist/worker/observe/static/operator-chrome.js +330 -100
- package/dist/worker/observe/static/router.d.ts +46 -0
- package/dist/worker/observe/static/router.js +25 -1
- package/dist/worker/observe/static/state.d.ts +50 -0
- package/dist/worker/observe/static/state.js +172 -0
- package/dist/worker/observe/static/views/dag-inspector.js +3 -2
- package/dist/worker/observe/static/views/dag.js +2 -1
- package/dist/worker/observe/static/views/dashboard.js +6 -4
- package/dist/worker/observe/static/views/night.js +2 -2
- package/dist/worker/observe/static/views/pool.js +1 -0
- package/dist/worker/observe/static/views/run.js +3 -1
- package/dist/worker/observe/static/views/task.js +1 -1
- package/dist/workflows/dag/interrupt-request.js +3 -3
- package/dist/workflows/dag/lifecycle.js +3 -3
- package/docs/README.md +1 -0
- package/docs/operations/local-development-environment.md +21 -0
- package/harness.json +3 -3
- package/package.json +3 -1
- package/dist/worker/console/static/assets/channel-Dj_4Moei.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-C0YYAyCa.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-C0YYAyCa.js +0 -1
- package/dist/worker/console/static/assets/index-CW88Fjbw.js +0 -406
- package/dist/worker/console/static/assets/index-DP0ZJl39.css +0 -1
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-DrdDvela.js +0 -1
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-DPkEAULl.js +0 -8
|
@@ -1,406 +0,0 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();function qu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mf={exports:{}},lo={};var ov;function s8(){if(ov)return lo;ov=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var f in s)f!=="key"&&(l[f]=s[f])}else l=s;return s=l.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:l}}return lo.Fragment=t,lo.jsx=n,lo.jsxs=n,lo}var cv;function l8(){return cv||(cv=1,mf.exports=s8()),mf.exports}var u=l8(),hf={exports:{}},pt={};var uv;function o8(){if(uv)return pt;uv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),y=Symbol.iterator;function x(U){return U===null||typeof U!="object"?null:(U=y&&U[y]||U["@@iterator"],typeof U=="function"?U:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,R={};function C(U,q,A){this.props=U,this.context=q,this.refs=R,this.updater=A||k}C.prototype.isReactComponent={},C.prototype.setState=function(U,q){if(typeof U!="object"&&typeof U!="function"&&U!=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,U,q,"setState")},C.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function _(){}_.prototype=C.prototype;function I(U,q,A){this.props=U,this.context=q,this.refs=R,this.updater=A||k}var $=I.prototype=new _;$.constructor=I,N($,C.prototype),$.isPureReactComponent=!0;var D=Array.isArray;function M(){}var B={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function G(U,q,A){var ae=A.ref;return{$$typeof:e,type:U,key:q,ref:ae!==void 0?ae:null,props:A}}function j(U,q){return G(U.type,q,U.props)}function F(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function H(U){var q={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(A){return q[A]})}var ee=/\/+/g;function K(U,q){return typeof U=="object"&&U!==null&&U.key!=null?H(""+U.key):q.toString(36)}function X(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(M,M):(U.status="pending",U.then(function(q){U.status==="pending"&&(U.status="fulfilled",U.value=q)},function(q){U.status==="pending"&&(U.status="rejected",U.reason=q)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function V(U,q,A,ae,he){var ne=typeof U;(ne==="undefined"||ne==="boolean")&&(U=null);var te=!1;if(U===null)te=!0;else switch(ne){case"bigint":case"string":case"number":te=!0;break;case"object":switch(U.$$typeof){case e:case t:te=!0;break;case p:return te=U._init,V(te(U._payload),q,A,ae,he)}}if(te)return he=he(U),te=ae===""?"."+K(U,0):ae,D(he)?(A="",te!=null&&(A=te.replace(ee,"$&/")+"/"),V(he,q,A,"",function(Re){return Re})):he!=null&&(F(he)&&(he=j(he,A+(he.key==null||U&&U.key===he.key?"":(""+he.key).replace(ee,"$&/")+"/")+te)),q.push(he)),1;te=0;var ce=ae===""?".":ae+":";if(D(U))for(var ge=0;ge<U.length;ge++)ae=U[ge],ne=ce+K(ae,ge),te+=V(ae,q,A,ne,he);else if(ge=x(U),typeof ge=="function")for(U=ge.call(U),ge=0;!(ae=U.next()).done;)ae=ae.value,ne=ce+K(ae,ge++),te+=V(ae,q,A,ne,he);else if(ne==="object"){if(typeof U.then=="function")return V(X(U),q,A,ae,he);throw q=String(U),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return te}function re(U,q,A){if(U==null)return U;var ae=[],he=0;return V(U,ae,"","",function(ne){return q.call(A,ne,he++)}),ae}function ue(U){if(U._status===-1){var q=U._result;q=q(),q.then(function(A){(U._status===0||U._status===-1)&&(U._status=1,U._result=A)},function(A){(U._status===0||U._status===-1)&&(U._status=2,U._result=A)}),U._status===-1&&(U._status=0,U._result=q)}if(U._status===1)return U._result.default;throw U._result}var Te=typeof reportError=="function"?reportError:function(U){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof U=="object"&&U!==null&&typeof U.message=="string"?String(U.message):String(U),error:U});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",U);return}console.error(U)},P={map:re,forEach:function(U,q,A){re(U,function(){q.apply(this,arguments)},A)},count:function(U){var q=0;return re(U,function(){q++}),q},toArray:function(U){return re(U,function(q){return q})||[]},only:function(U){if(!F(U))throw Error("React.Children.only expected to receive a single React element child.");return U}};return pt.Activity=b,pt.Children=P,pt.Component=C,pt.Fragment=n,pt.Profiler=s,pt.PureComponent=I,pt.StrictMode=a,pt.Suspense=m,pt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,pt.__COMPILER_RUNTIME={__proto__:null,c:function(U){return B.H.useMemoCache(U)}},pt.cache=function(U){return function(){return U.apply(null,arguments)}},pt.cacheSignal=function(){return null},pt.cloneElement=function(U,q,A){if(U==null)throw Error("The argument must be a React element, but you passed "+U+".");var ae=N({},U.props),he=U.key;if(q!=null)for(ne in q.key!==void 0&&(he=""+q.key),q)!Y.call(q,ne)||ne==="key"||ne==="__self"||ne==="__source"||ne==="ref"&&q.ref===void 0||(ae[ne]=q[ne]);var ne=arguments.length-2;if(ne===1)ae.children=A;else if(1<ne){for(var te=Array(ne),ce=0;ce<ne;ce++)te[ce]=arguments[ce+2];ae.children=te}return G(U.type,he,ae)},pt.createContext=function(U){return U={$$typeof:c,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null},U.Provider=U,U.Consumer={$$typeof:l,_context:U},U},pt.createElement=function(U,q,A){var ae,he={},ne=null;if(q!=null)for(ae in q.key!==void 0&&(ne=""+q.key),q)Y.call(q,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(he[ae]=q[ae]);var te=arguments.length-2;if(te===1)he.children=A;else if(1<te){for(var ce=Array(te),ge=0;ge<te;ge++)ce[ge]=arguments[ge+2];he.children=ce}if(U&&U.defaultProps)for(ae in te=U.defaultProps,te)he[ae]===void 0&&(he[ae]=te[ae]);return G(U,ne,he)},pt.createRef=function(){return{current:null}},pt.forwardRef=function(U){return{$$typeof:f,render:U}},pt.isValidElement=F,pt.lazy=function(U){return{$$typeof:p,_payload:{_status:-1,_result:U},_init:ue}},pt.memo=function(U,q){return{$$typeof:h,type:U,compare:q===void 0?null:q}},pt.startTransition=function(U){var q=B.T,A={};B.T=A;try{var ae=U(),he=B.S;he!==null&&he(A,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(M,Te)}catch(ne){Te(ne)}finally{q!==null&&A.types!==null&&(q.types=A.types),B.T=q}},pt.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},pt.use=function(U){return B.H.use(U)},pt.useActionState=function(U,q,A){return B.H.useActionState(U,q,A)},pt.useCallback=function(U,q){return B.H.useCallback(U,q)},pt.useContext=function(U){return B.H.useContext(U)},pt.useDebugValue=function(){},pt.useDeferredValue=function(U,q){return B.H.useDeferredValue(U,q)},pt.useEffect=function(U,q){return B.H.useEffect(U,q)},pt.useEffectEvent=function(U){return B.H.useEffectEvent(U)},pt.useId=function(){return B.H.useId()},pt.useImperativeHandle=function(U,q,A){return B.H.useImperativeHandle(U,q,A)},pt.useInsertionEffect=function(U,q){return B.H.useInsertionEffect(U,q)},pt.useLayoutEffect=function(U,q){return B.H.useLayoutEffect(U,q)},pt.useMemo=function(U,q){return B.H.useMemo(U,q)},pt.useOptimistic=function(U,q){return B.H.useOptimistic(U,q)},pt.useReducer=function(U,q,A){return B.H.useReducer(U,q,A)},pt.useRef=function(U){return B.H.useRef(U)},pt.useState=function(U){return B.H.useState(U)},pt.useSyncExternalStore=function(U,q,A){return B.H.useSyncExternalStore(U,q,A)},pt.useTransition=function(){return B.H.useTransition()},pt.version="19.2.8",pt}var dv;function zh(){return dv||(dv=1,hf.exports=o8()),hf.exports}var S=zh();const zn=qu(S);var pf={exports:{}},oo={},gf={exports:{}},bf={};var fv;function c8(){return fv||(fv=1,(function(e){function t(V,re){var ue=V.length;V.push(re);e:for(;0<ue;){var Te=ue-1>>>1,P=V[Te];if(0<s(P,re))V[Te]=re,V[ue]=P,ue=Te;else break e}}function n(V){return V.length===0?null:V[0]}function a(V){if(V.length===0)return null;var re=V[0],ue=V.pop();if(ue!==re){V[0]=ue;e:for(var Te=0,P=V.length,U=P>>>1;Te<U;){var q=2*(Te+1)-1,A=V[q],ae=q+1,he=V[ae];if(0>s(A,ue))ae<P&&0>s(he,A)?(V[Te]=he,V[ae]=ue,Te=ae):(V[Te]=A,V[q]=ue,Te=q);else if(ae<P&&0>s(he,ue))V[Te]=he,V[ae]=ue,Te=ae;else break e}}return re}function s(V,re){var ue=V.sortIndex-re.sortIndex;return ue!==0?ue:V.id-re.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var m=[],h=[],p=1,b=null,y=3,x=!1,k=!1,N=!1,R=!1,C=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;function $(V){for(var re=n(h);re!==null;){if(re.callback===null)a(h);else if(re.startTime<=V)a(h),re.sortIndex=re.expirationTime,t(m,re);else break;re=n(h)}}function D(V){if(N=!1,$(V),!k)if(n(m)!==null)k=!0,M||(M=!0,H());else{var re=n(h);re!==null&&X(D,re.startTime-V)}}var M=!1,B=-1,Y=5,G=-1;function j(){return R?!0:!(e.unstable_now()-G<Y)}function F(){if(R=!1,M){var V=e.unstable_now();G=V;var re=!0;try{e:{k=!1,N&&(N=!1,_(B),B=-1),x=!0;var ue=y;try{t:{for($(V),b=n(m);b!==null&&!(b.expirationTime>V&&j());){var Te=b.callback;if(typeof Te=="function"){b.callback=null,y=b.priorityLevel;var P=Te(b.expirationTime<=V);if(V=e.unstable_now(),typeof P=="function"){b.callback=P,$(V),re=!0;break t}b===n(m)&&a(m),$(V)}else a(m);b=n(m)}if(b!==null)re=!0;else{var U=n(h);U!==null&&X(D,U.startTime-V),re=!1}}break e}finally{b=null,y=ue,x=!1}re=void 0}}finally{re?H():M=!1}}}var H;if(typeof I=="function")H=function(){I(F)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,K=ee.port2;ee.port1.onmessage=F,H=function(){K.postMessage(null)}}else H=function(){C(F,0)};function X(V,re){B=C(function(){V(e.unstable_now())},re)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(V){switch(y){case 1:case 2:case 3:var re=3;break;default:re=y}var ue=y;y=re;try{return V()}finally{y=ue}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(V,re){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var ue=y;y=V;try{return re()}finally{y=ue}},e.unstable_scheduleCallback=function(V,re,ue){var Te=e.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?Te+ue:Te):ue=Te,V){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=ue+P,V={id:p++,callback:re,priorityLevel:V,startTime:ue,expirationTime:P,sortIndex:-1},ue>Te?(V.sortIndex=ue,t(h,V),n(m)===null&&V===n(h)&&(N?(_(B),B=-1):N=!0,X(D,ue-Te))):(V.sortIndex=P,t(m,V),k||x||(k=!0,M||(M=!0,H()))),V},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(V){var re=y;return function(){var ue=y;y=re;try{return V.apply(this,arguments)}finally{y=ue}}}})(bf)),bf}var mv;function u8(){return mv||(mv=1,gf.exports=c8()),gf.exports}var vf={exports:{}},er={};var hv;function d8(){if(hv)return er;hv=1;var e=zh();function t(m){var h="https://react.dev/errors/"+m;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+m+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(m,h,p){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:b==null?null:""+b,children:m,containerInfo:h,implementation:p}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return er.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,er.createPortal=function(m,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(m,h,null,p)},er.flushSync=function(m){var h=c.T,p=a.p;try{if(c.T=null,a.p=2,m)return m()}finally{c.T=h,a.p=p,a.d.f()}},er.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(m,h))},er.prefetchDNS=function(m){typeof m=="string"&&a.d.D(m)},er.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var p=h.as,b=f(p,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?a.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:b,integrity:y,fetchPriority:x}):p==="script"&&a.d.X(m,{crossOrigin:b,integrity:y,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},er.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=f(h.as,h.crossOrigin);a.d.M(m,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(m)},er.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,b=f(p,h.crossOrigin);a.d.L(m,p,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},er.preloadModule=function(m,h){if(typeof m=="string")if(h){var p=f(h.as,h.crossOrigin);a.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(m)},er.requestFormReset=function(m){a.d.r(m)},er.unstable_batchedUpdates=function(m,h){return m(h)},er.useFormState=function(m,h,p){return c.H.useFormState(m,h,p)},er.useFormStatus=function(){return c.H.useHostTransitionStatus()},er.version="19.2.8",er}var pv;function H2(){if(pv)return vf.exports;pv=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),vf.exports=d8(),vf.exports}var gv;function f8(){if(gv)return oo;gv=1;var e=u8(),t=zh(),n=H2();function a(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)i+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var i=r,o=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(o=i.return),r=i.return;while(r)}return i.tag===3?o:null}function c(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function f(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function m(r){if(l(r)!==r)throw Error(a(188))}function h(r){var i=r.alternate;if(!i){if(i=l(r),i===null)throw Error(a(188));return i!==r?null:r}for(var o=r,d=i;;){var g=o.return;if(g===null)break;var v=g.alternate;if(v===null){if(d=g.return,d!==null){o=d;continue}break}if(g.child===v.child){for(v=g.child;v;){if(v===o)return m(g),r;if(v===d)return m(g),i;v=v.sibling}throw Error(a(188))}if(o.return!==d.return)o=g,d=v;else{for(var T=!1,L=g.child;L;){if(L===o){T=!0,o=g,d=v;break}if(L===d){T=!0,d=g,o=v;break}L=L.sibling}if(!T){for(L=v.child;L;){if(L===o){T=!0,o=v,d=g;break}if(L===d){T=!0,d=v,o=g;break}L=L.sibling}if(!T)throw Error(a(189))}}if(o.alternate!==d)throw Error(a(190))}if(o.tag!==3)throw Error(a(188));return o.stateNode.current===o?r:i}function p(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=p(r),i!==null)return i;r=r.sibling}return null}var b=Object.assign,y=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),I=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function H(r){return r===null||typeof r!="object"?null:(r=F&&r[F]||r["@@iterator"],typeof r=="function"?r:null)}var ee=Symbol.for("react.client.reference");function K(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===ee?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case N:return"Fragment";case C:return"Profiler";case R:return"StrictMode";case D:return"Suspense";case M:return"SuspenseList";case G:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case k:return"Portal";case I:return r.displayName||"Context";case _:return(r._context.displayName||"Context")+".Consumer";case $:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case B:return i=r.displayName||null,i!==null?i:K(r.type)||"Memo";case Y:i=r._payload,r=r._init;try{return K(r(i))}catch{}}return null}var X=Array.isArray,V=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},Te=[],P=-1;function U(r){return{current:r}}function q(r){0>P||(r.current=Te[P],Te[P]=null,P--)}function A(r,i){P++,Te[P]=r.current,r.current=i}var ae=U(null),he=U(null),ne=U(null),te=U(null);function ce(r,i){switch(A(ne,i),A(he,r),A(ae,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?Ib(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=Ib(i),r=Mb(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}q(ae),A(ae,r)}function ge(){q(ae),q(he),q(ne)}function Re(r){r.memoizedState!==null&&A(te,r);var i=ae.current,o=Mb(i,r.type);i!==o&&(A(he,r),A(ae,o))}function je(r){he.current===r&&(q(ae),q(he)),te.current===r&&(q(te),ro._currentValue=ue)}var be,qe;function Ve(r){if(be===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);be=i&&i[1]||"",qe=-1<o.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+be+r+qe}var tt=!1;function nt(r,i){if(!r||tt)return"";tt=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(i){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch(ve){var me=ve}Reflect.construct(r,[],Ee)}else{try{Ee.call()}catch(ve){me=ve}r.call(Ee.prototype)}}else{try{throw Error()}catch(ve){me=ve}(Ee=r())&&typeof Ee.catch=="function"&&Ee.catch(function(){})}}catch(ve){if(ve&&me&&typeof ve.stack=="string")return[ve.stack,me.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=d.DetermineComponentFrameRoot(),T=v[0],L=v[1];if(T&&L){var J=T.split(`
|
|
4
|
-
`),fe=L.split(`
|
|
5
|
-
`);for(g=d=0;d<J.length&&!J[d].includes("DetermineComponentFrameRoot");)d++;for(;g<fe.length&&!fe[g].includes("DetermineComponentFrameRoot");)g++;if(d===J.length||g===fe.length)for(d=J.length-1,g=fe.length-1;1<=d&&0<=g&&J[d]!==fe[g];)g--;for(;1<=d&&0<=g;d--,g--)if(J[d]!==fe[g]){if(d!==1||g!==1)do if(d--,g--,0>g||J[d]!==fe[g]){var xe=`
|
|
6
|
-
`+J[d].replace(" at new "," at ");return r.displayName&&xe.includes("<anonymous>")&&(xe=xe.replace("<anonymous>",r.displayName)),xe}while(1<=d&&0<=g);break}}}finally{tt=!1,Error.prepareStackTrace=o}return(o=r?r.displayName||r.name:"")?Ve(o):""}function Ut(r,i){switch(r.tag){case 26:case 27:case 5:return Ve(r.type);case 16:return Ve("Lazy");case 13:return r.child!==i&&i!==null?Ve("Suspense Fallback"):Ve("Suspense");case 19:return Ve("SuspenseList");case 0:case 15:return nt(r.type,!1);case 11:return nt(r.type.render,!1);case 1:return nt(r.type,!0);case 31:return Ve("Activity");default:return""}}function Rt(r){try{var i="",o=null;do i+=Ut(r,o),o=r,r=r.return;while(r);return i}catch(d){return`
|
|
7
|
-
Error generating stack: `+d.message+`
|
|
8
|
-
`+d.stack}}var ut=Object.prototype.hasOwnProperty,Ge=e.unstable_scheduleCallback,Bt=e.unstable_cancelCallback,Kt=e.unstable_shouldYield,hn=e.unstable_requestPaint,Je=e.unstable_now,tn=e.unstable_getCurrentPriorityLevel,pe=e.unstable_ImmediatePriority,Se=e.unstable_UserBlockingPriority,Fe=e.unstable_NormalPriority,_e=e.unstable_LowPriority,He=e.unstable_IdlePriority,vt=e.log,jt=e.unstable_setDisableYieldValue,Lt=null,yt=null;function ot(r){if(typeof vt=="function"&&jt(r),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(Lt,r)}catch{}}var mt=Math.clz32?Math.clz32:rt,Un=Math.log,un=Math.LN2;function rt(r){return r>>>=0,r===0?32:31-(Un(r)/un|0)|0}var Ke=256,gt=262144,ct=4194304;function Ft(r){var i=r&42;if(i!==0)return i;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Q(r,i,o){var d=r.pendingLanes;if(d===0)return 0;var g=0,v=r.suspendedLanes,T=r.pingedLanes;r=r.warmLanes;var L=d&134217727;return L!==0?(d=L&~v,d!==0?g=Ft(d):(T&=L,T!==0?g=Ft(T):o||(o=L&~r,o!==0&&(g=Ft(o))))):(L=d&~v,L!==0?g=Ft(L):T!==0?g=Ft(T):o||(o=d&~r,o!==0&&(g=Ft(o)))),g===0?0:i!==0&&i!==g&&(i&v)===0&&(v=g&-g,o=i&-i,v>=o||v===32&&(o&4194048)!==0)?i:g}function ye(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function Le(r,i){switch(r){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 Ze(){var r=ct;return ct<<=1,(ct&62914560)===0&&(ct=4194304),r}function ht(r){for(var i=[],o=0;31>o;o++)i.push(r);return i}function Et(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function ie(r,i,o,d,g,v){var T=r.pendingLanes;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=o,r.entangledLanes&=o,r.errorRecoveryDisabledLanes&=o,r.shellSuspendCounter=0;var L=r.entanglements,J=r.expirationTimes,fe=r.hiddenUpdates;for(o=T&~o;0<o;){var xe=31-mt(o),Ee=1<<xe;L[xe]=0,J[xe]=-1;var me=fe[xe];if(me!==null)for(fe[xe]=null,xe=0;xe<me.length;xe++){var ve=me[xe];ve!==null&&(ve.lane&=-536870913)}o&=~Ee}d!==0&&we(r,d,0),v!==0&&g===0&&r.tag!==0&&(r.suspendedLanes|=v&~(T&~i))}function we(r,i,o){r.pendingLanes|=i,r.suspendedLanes&=~i;var d=31-mt(i);r.entangledLanes|=i,r.entanglements[d]=r.entanglements[d]|1073741824|o&261930}function Ue(r,i){var o=r.entangledLanes|=i;for(r=r.entanglements;o;){var d=31-mt(o),g=1<<d;g&i|r[d]&i&&(r[d]|=i),o&=~g}}function wt(r,i){var o=i&-i;return o=(o&42)!==0?1:Tt(o),(o&(r.suspendedLanes|i))!==0?0:o}function Tt(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function Sn(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function qn(){var r=re.p;return r!==0?r:(r=window.event,r===void 0?32:tv(r.type))}function Qn(r,i){var o=re.p;try{return re.p=r,i()}finally{re.p=o}}var Gn=Math.random().toString(36).slice(2),Pt="__reactFiber$"+Gn,kn="__reactProps$"+Gn,Va="__reactContainer$"+Gn,hl="__reactEvents$"+Gn,Uo="__reactListeners$"+Gn,fs="__reactHandles$"+Gn,qo="__reactResources$"+Gn,Mi="__reactMarker$"+Gn;function pl(r){delete r[Pt],delete r[kn],delete r[hl],delete r[Uo],delete r[fs]}function ir(r){var i=r[Pt];if(i)return i;for(var o=r.parentNode;o;){if(i=o[Va]||o[Pt]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(r=Ub(r);r!==null;){if(o=r[Pt])return o;r=Ub(r)}return i}r=o,o=r.parentNode}return null}function ga(r){if(r=r[Pt]||r[Va]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function Ka(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function Ya(r){var i=r[qo];return i||(i=r[qo]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Rn(r){r[Mi]=!0}var Ho=new Set,Oi={};function ba(r,i){Ae(r,i),Ae(r+"Capture",i)}function Ae(r,i){for(Oi[r]=i,r=0;r<i.length;r++)Ho.add(i[r])}var Qe=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]*$"),Nt={},Yt={};function En(r){return ut.call(Yt,r)?!0:ut.call(Nt,r)?!1:Qe.test(r)?Yt[r]=!0:(Nt[r]=!0,!1)}function Jn(r,i,o){if(En(i))if(o===null)r.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var d=i.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+o)}}function kr(r,i,o){if(o===null)r.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+o)}}function fr(r,i,o,d){if(d===null)r.removeAttribute(o);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(o);return}r.setAttributeNS(i,o,""+d)}}function ln(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Er(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Fo(r,i,o){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var g=d.get,v=d.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return g.call(this)},set:function(T){o=""+T,v.call(this,T)}}),Object.defineProperty(r,i,{enumerable:d.enumerable}),{getValue:function(){return o},setValue:function(T){o=""+T},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function ms(r){if(!r._valueTracker){var i=Er(r)?"checked":"value";r._valueTracker=Fo(r,i,""+r[i])}}function gl(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var o=i.getValue(),d="";return r&&(d=Er(r)?r.checked?"true":"false":r.value),r=d,r!==o?(i.setValue(r),!0):!1}function hs(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var d0=/[\n"\\]/g;function mr(r){return r.replace(d0,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function bl(r,i,o,d,g,v,T,L){r.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?r.type=T:r.removeAttribute("type"),i!=null?T==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+ln(i)):r.value!==""+ln(i)&&(r.value=""+ln(i)):T!=="submit"&&T!=="reset"||r.removeAttribute("value"),i!=null?ps(r,T,ln(i)):o!=null?ps(r,T,ln(o)):d!=null&&r.removeAttribute("value"),g==null&&v!=null&&(r.defaultChecked=!!v),g!=null&&(r.checked=g&&typeof g!="function"&&typeof g!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?r.name=""+ln(L):r.removeAttribute("name")}function Di(r,i,o,d,g,v,T,L){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.type=v),i!=null||o!=null){if(!(v!=="submit"&&v!=="reset"||i!=null)){ms(r);return}o=o!=null?""+ln(o):"",i=i!=null?""+ln(i):o,L||i===r.value||(r.value=i),r.defaultValue=i}d=d??g,d=typeof d!="function"&&typeof d!="symbol"&&!!d,r.checked=L?r.checked:!!d,r.defaultChecked=!!d,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(r.name=T),ms(r)}function ps(r,i,o){i==="number"&&hs(r.ownerDocument)===r||r.defaultValue===""+o||(r.defaultValue=""+o)}function Kn(r,i,o,d){if(r=r.options,i){i={};for(var g=0;g<o.length;g++)i["$"+o[g]]=!0;for(o=0;o<r.length;o++)g=i.hasOwnProperty("$"+r[o].value),r[o].selected!==g&&(r[o].selected=g),g&&d&&(r[o].defaultSelected=!0)}else{for(o=""+ln(o),i=null,g=0;g<r.length;g++){if(r[g].value===o){r[g].selected=!0,d&&(r[g].defaultSelected=!0);return}i!==null||r[g].disabled||(i=r[g])}i!==null&&(i.selected=!0)}}function Po(r,i,o){if(i!=null&&(i=""+ln(i),i!==r.value&&(r.value=i),o==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=o!=null?""+ln(o):""}function gs(r,i,o,d){if(i==null){if(d!=null){if(o!=null)throw Error(a(92));if(X(d)){if(1<d.length)throw Error(a(93));d=d[0]}o=d}o==null&&(o=""),i=o}o=ln(i),r.defaultValue=o,d=r.textContent,d===o&&d!==""&&d!==null&&(r.value=d),ms(r)}function st(r,i){if(i){var o=r.firstChild;if(o&&o===r.lastChild&&o.nodeType===3){o.nodeValue=i;return}}r.textContent=i}var $o=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 An(r,i,o){var d=i.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?d?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":d?r.setProperty(i,o):typeof o!="number"||o===0||$o.has(i)?i==="float"?r.cssFloat=o:r[i]=(""+o).trim():r[i]=o+"px"}function Xt(r,i,o){if(i!=null&&typeof i!="object")throw Error(a(62));if(r=r.style,o!=null){for(var d in o)!o.hasOwnProperty(d)||i!=null&&i.hasOwnProperty(d)||(d.indexOf("--")===0?r.setProperty(d,""):d==="float"?r.cssFloat="":r[d]="");for(var g in i)d=i[g],i.hasOwnProperty(g)&&o[g]!==d&&An(r,g,d)}else for(var v in i)i.hasOwnProperty(v)&&An(r,v,i[v])}function Xa(r){if(r.indexOf("-")===-1)return!1;switch(r){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 va=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"]]),vl=/^[\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 Za(r){return vl.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function ze(){}var Ye=null;function bt(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Mt=null,pn=null;function Ur(r){var i=ga(r);if(i&&(r=i.stateNode)){var o=r[kn]||null;e:switch(r=i.stateNode,i.type){case"input":if(bl(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),i=o.name,o.type==="radio"&&i!=null){for(o=r;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+mr(""+i)+'"][type="radio"]'),i=0;i<o.length;i++){var d=o[i];if(d!==r&&d.form===r.form){var g=d[kn]||null;if(!g)throw Error(a(90));bl(d,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(i=0;i<o.length;i++)d=o[i],d.form===r.form&&gl(d)}break e;case"textarea":Po(r,o.value,o.defaultValue);break e;case"select":i=o.value,i!=null&&Kn(r,!!o.multiple,i,!1)}}}var yl=!1;function Go(r,i,o){if(yl)return r(i,o);yl=!0;try{var d=r(i);return d}finally{if(yl=!1,(Mt!==null||pn!==null)&&(Mc(),Mt&&(i=Mt,r=pn,pn=Mt=null,Ur(i),r)))for(i=0;i<r.length;i++)Ur(r[i])}}function xl(r,i){var o=r.stateNode;if(o===null)return null;var d=o[kn]||null;if(d===null)return null;o=d[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(o&&typeof o!="function")throw Error(a(231,i,typeof o));return o}var ya=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f0=!1;if(ya)try{var wl={};Object.defineProperty(wl,"passive",{get:function(){f0=!0}}),window.addEventListener("test",wl,wl),window.removeEventListener("test",wl,wl)}catch{f0=!1}var Wa=null,m0=null,Vo=null;function Mp(){if(Vo)return Vo;var r,i=m0,o=i.length,d,g="value"in Wa?Wa.value:Wa.textContent,v=g.length;for(r=0;r<o&&i[r]===g[r];r++);var T=o-r;for(d=1;d<=T&&i[o-d]===g[v-d];d++);return Vo=g.slice(r,1<d?1-d:void 0)}function Ko(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function Yo(){return!0}function Op(){return!1}function hr(r){function i(o,d,g,v,T){this._reactName=o,this._targetInst=g,this.type=d,this.nativeEvent=v,this.target=T,this.currentTarget=null;for(var L in r)r.hasOwnProperty(L)&&(o=r[L],this[L]=o?o(v):v[L]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Yo:Op,this.isPropagationStopped=Op,this}return b(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Yo)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Yo)},persist:function(){},isPersistent:Yo}),i}var ji={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xo=hr(ji),Sl=b({},ji,{view:0,detail:0}),ax=hr(Sl),h0,p0,kl,Zo=b({},Sl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:b0,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==kl&&(kl&&r.type==="mousemove"?(h0=r.screenX-kl.screenX,p0=r.screenY-kl.screenY):p0=h0=0,kl=r),h0)},movementY:function(r){return"movementY"in r?r.movementY:p0}}),Dp=hr(Zo),ix=b({},Zo,{dataTransfer:0}),sx=hr(ix),lx=b({},Sl,{relatedTarget:0}),g0=hr(lx),ox=b({},ji,{animationName:0,elapsedTime:0,pseudoElement:0}),cx=hr(ox),ux=b({},ji,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),dx=hr(ux),fx=b({},ji,{data:0}),jp=hr(fx),mx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hx={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"},px={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gx(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=px[r])?!!i[r]:!1}function b0(){return gx}var bx=b({},Sl,{key:function(r){if(r.key){var i=mx[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Ko(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?hx[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:b0,charCode:function(r){return r.type==="keypress"?Ko(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Ko(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),vx=hr(bx),yx=b({},Zo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lp=hr(yx),xx=b({},Sl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:b0}),wx=hr(xx),Sx=b({},ji,{propertyName:0,elapsedTime:0,pseudoElement:0}),kx=hr(Sx),Ex=b({},Zo,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),Tx=hr(Ex),Nx=b({},ji,{newState:0,oldState:0}),Cx=hr(Nx),Rx=[9,13,27,32],v0=ya&&"CompositionEvent"in window,El=null;ya&&"documentMode"in document&&(El=document.documentMode);var Ax=ya&&"TextEvent"in window&&!El,zp=ya&&(!v0||El&&8<El&&11>=El),Bp=" ",Up=!1;function qp(r,i){switch(r){case"keyup":return Rx.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hp(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var bs=!1;function _x(r,i){switch(r){case"compositionend":return Hp(i);case"keypress":return i.which!==32?null:(Up=!0,Bp);case"textInput":return r=i.data,r===Bp&&Up?null:r;default:return null}}function Ix(r,i){if(bs)return r==="compositionend"||!v0&&qp(r,i)?(r=Mp(),Vo=m0=Wa=null,bs=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return zp&&i.locale!=="ko"?null:i.data;default:return null}}var Mx={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 Fp(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!Mx[r.type]:i==="textarea"}function Pp(r,i,o,d){Mt?pn?pn.push(d):pn=[d]:Mt=d,i=Uc(i,"onChange"),0<i.length&&(o=new Xo("onChange","change",null,o,d),r.push({event:o,listeners:i}))}var Tl=null,Nl=null;function Ox(r){Tb(r,0)}function Wo(r){var i=Ka(r);if(gl(i))return r}function $p(r,i){if(r==="change")return i}var Gp=!1;if(ya){var y0;if(ya){var x0="oninput"in document;if(!x0){var Vp=document.createElement("div");Vp.setAttribute("oninput","return;"),x0=typeof Vp.oninput=="function"}y0=x0}else y0=!1;Gp=y0&&(!document.documentMode||9<document.documentMode)}function Kp(){Tl&&(Tl.detachEvent("onpropertychange",Yp),Nl=Tl=null)}function Yp(r){if(r.propertyName==="value"&&Wo(Nl)){var i=[];Pp(i,Nl,r,bt(r)),Go(Ox,i)}}function Dx(r,i,o){r==="focusin"?(Kp(),Tl=i,Nl=o,Tl.attachEvent("onpropertychange",Yp)):r==="focusout"&&Kp()}function jx(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Wo(Nl)}function Lx(r,i){if(r==="click")return Wo(i)}function zx(r,i){if(r==="input"||r==="change")return Wo(i)}function Bx(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var Tr=typeof Object.is=="function"?Object.is:Bx;function Cl(r,i){if(Tr(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var o=Object.keys(r),d=Object.keys(i);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var g=o[d];if(!ut.call(i,g)||!Tr(r[g],i[g]))return!1}return!0}function Xp(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Zp(r,i){var o=Xp(r);r=0;for(var d;o;){if(o.nodeType===3){if(d=r+o.textContent.length,r<=i&&d>=i)return{node:o,offset:i-r};r=d}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Xp(o)}}function Wp(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Wp(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function Qp(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=hs(r.document);i instanceof r.HTMLIFrameElement;){try{var o=typeof i.contentWindow.location.href=="string"}catch{o=!1}if(o)r=i.contentWindow;else break;i=hs(r.document)}return i}function w0(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}var Ux=ya&&"documentMode"in document&&11>=document.documentMode,vs=null,S0=null,Rl=null,k0=!1;function Jp(r,i,o){var d=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;k0||vs==null||vs!==hs(d)||(d=vs,"selectionStart"in d&&w0(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Rl&&Cl(Rl,d)||(Rl=d,d=Uc(S0,"onSelect"),0<d.length&&(i=new Xo("onSelect","select",null,i,o),r.push({event:i,listeners:d}),i.target=vs)))}function Li(r,i){var o={};return o[r.toLowerCase()]=i.toLowerCase(),o["Webkit"+r]="webkit"+i,o["Moz"+r]="moz"+i,o}var ys={animationend:Li("Animation","AnimationEnd"),animationiteration:Li("Animation","AnimationIteration"),animationstart:Li("Animation","AnimationStart"),transitionrun:Li("Transition","TransitionRun"),transitionstart:Li("Transition","TransitionStart"),transitioncancel:Li("Transition","TransitionCancel"),transitionend:Li("Transition","TransitionEnd")},E0={},e1={};ya&&(e1=document.createElement("div").style,"AnimationEvent"in window||(delete ys.animationend.animation,delete ys.animationiteration.animation,delete ys.animationstart.animation),"TransitionEvent"in window||delete ys.transitionend.transition);function zi(r){if(E0[r])return E0[r];if(!ys[r])return r;var i=ys[r],o;for(o in i)if(i.hasOwnProperty(o)&&o in e1)return E0[r]=i[o];return r}var t1=zi("animationend"),n1=zi("animationiteration"),r1=zi("animationstart"),qx=zi("transitionrun"),Hx=zi("transitionstart"),Fx=zi("transitioncancel"),a1=zi("transitionend"),i1=new Map,T0="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(" ");T0.push("scrollEnd");function Qr(r,i){i1.set(r,i),ba(i,[r])}var Qo=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},qr=[],xs=0,N0=0;function Jo(){for(var r=xs,i=N0=xs=0;i<r;){var o=qr[i];qr[i++]=null;var d=qr[i];qr[i++]=null;var g=qr[i];qr[i++]=null;var v=qr[i];if(qr[i++]=null,d!==null&&g!==null){var T=d.pending;T===null?g.next=g:(g.next=T.next,T.next=g),d.pending=g}v!==0&&s1(o,g,v)}}function ec(r,i,o,d){qr[xs++]=r,qr[xs++]=i,qr[xs++]=o,qr[xs++]=d,N0|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function C0(r,i,o,d){return ec(r,i,o,d),tc(r)}function Bi(r,i){return ec(r,null,null,i),tc(r)}function s1(r,i,o){r.lanes|=o;var d=r.alternate;d!==null&&(d.lanes|=o);for(var g=!1,v=r.return;v!==null;)v.childLanes|=o,d=v.alternate,d!==null&&(d.childLanes|=o),v.tag===22&&(r=v.stateNode,r===null||r._visibility&1||(g=!0)),r=v,v=v.return;return r.tag===3?(v=r.stateNode,g&&i!==null&&(g=31-mt(o),r=v.hiddenUpdates,d=r[g],d===null?r[g]=[i]:d.push(i),i.lane=o|536870912),v):null}function tc(r){if(50<Zl)throw Zl=0,Ld=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var ws={};function Px(r,i,o,d){this.tag=r,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nr(r,i,o,d){return new Px(r,i,o,d)}function R0(r){return r=r.prototype,!(!r||!r.isReactComponent)}function xa(r,i){var o=r.alternate;return o===null?(o=Nr(r.tag,i,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=i,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&65011712,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,i=r.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o.refCleanup=r.refCleanup,o}function l1(r,i){r.flags&=65011714;var o=r.alternate;return o===null?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,i=o.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function nc(r,i,o,d,g,v){var T=0;if(d=r,typeof r=="function")R0(r)&&(T=1);else if(typeof r=="string")T=Y7(r,o,ae.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case G:return r=Nr(31,o,i,g),r.elementType=G,r.lanes=v,r;case N:return Ui(o.children,g,v,i);case R:T=8,g|=24;break;case C:return r=Nr(12,o,i,g|2),r.elementType=C,r.lanes=v,r;case D:return r=Nr(13,o,i,g),r.elementType=D,r.lanes=v,r;case M:return r=Nr(19,o,i,g),r.elementType=M,r.lanes=v,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case I:T=10;break e;case _:T=9;break e;case $:T=11;break e;case B:T=14;break e;case Y:T=16,d=null;break e}T=29,o=Error(a(130,r===null?"null":typeof r,"")),d=null}return i=Nr(T,o,i,g),i.elementType=r,i.type=d,i.lanes=v,i}function Ui(r,i,o,d){return r=Nr(7,r,d,i),r.lanes=o,r}function A0(r,i,o){return r=Nr(6,r,null,i),r.lanes=o,r}function o1(r){var i=Nr(18,null,null,0);return i.stateNode=r,i}function _0(r,i,o){return i=Nr(4,r.children!==null?r.children:[],r.key,i),i.lanes=o,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var c1=new WeakMap;function Hr(r,i){if(typeof r=="object"&&r!==null){var o=c1.get(r);return o!==void 0?o:(i={value:r,source:i,stack:Rt(i)},c1.set(r,i),i)}return{value:r,source:i,stack:Rt(i)}}var Ss=[],ks=0,rc=null,Al=0,Fr=[],Pr=0,Qa=null,ra=1,aa="";function wa(r,i){Ss[ks++]=Al,Ss[ks++]=rc,rc=r,Al=i}function u1(r,i,o){Fr[Pr++]=ra,Fr[Pr++]=aa,Fr[Pr++]=Qa,Qa=r;var d=ra;r=aa;var g=32-mt(d)-1;d&=~(1<<g),o+=1;var v=32-mt(i)+g;if(30<v){var T=g-g%5;v=(d&(1<<T)-1).toString(32),d>>=T,g-=T,ra=1<<32-mt(i)+g|o<<g|d,aa=v+r}else ra=1<<v|o<<g|d,aa=r}function I0(r){r.return!==null&&(wa(r,1),u1(r,1,0))}function M0(r){for(;r===rc;)rc=Ss[--ks],Ss[ks]=null,Al=Ss[--ks],Ss[ks]=null;for(;r===Qa;)Qa=Fr[--Pr],Fr[Pr]=null,aa=Fr[--Pr],Fr[Pr]=null,ra=Fr[--Pr],Fr[Pr]=null}function d1(r,i){Fr[Pr++]=ra,Fr[Pr++]=aa,Fr[Pr++]=Qa,ra=i.id,aa=i.overflow,Qa=r}var Yn=null,on=null,zt=!1,Ja=null,$r=!1,O0=Error(a(519));function ei(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw _l(Hr(i,r)),O0}function f1(r){var i=r.stateNode,o=r.type,d=r.memoizedProps;switch(i[Pt]=r,i[kn]=d,o){case"dialog":_t("cancel",i),_t("close",i);break;case"iframe":case"object":case"embed":_t("load",i);break;case"video":case"audio":for(o=0;o<Ql.length;o++)_t(Ql[o],i);break;case"source":_t("error",i);break;case"img":case"image":case"link":_t("error",i),_t("load",i);break;case"details":_t("toggle",i);break;case"input":_t("invalid",i),Di(i,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":_t("invalid",i);break;case"textarea":_t("invalid",i),gs(i,d.value,d.defaultValue,d.children)}o=d.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||i.textContent===""+o||d.suppressHydrationWarning===!0||Ab(i.textContent,o)?(d.popover!=null&&(_t("beforetoggle",i),_t("toggle",i)),d.onScroll!=null&&_t("scroll",i),d.onScrollEnd!=null&&_t("scrollend",i),d.onClick!=null&&(i.onclick=ze),i=!0):i=!1,i||ei(r,!0)}function m1(r){for(Yn=r.return;Yn;)switch(Yn.tag){case 5:case 31:case 13:$r=!1;return;case 27:case 3:$r=!0;return;default:Yn=Yn.return}}function Es(r){if(r!==Yn)return!1;if(!zt)return m1(r),zt=!0,!1;var i=r.tag,o;if((o=i!==3&&i!==27)&&((o=i===5)&&(o=r.type,o=!(o!=="form"&&o!=="button")||Wd(r.type,r.memoizedProps)),o=!o),o&&on&&ei(r),m1(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));on=Bb(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));on=Bb(r)}else i===27?(i=on,hi(r.type)?(r=nf,nf=null,on=r):on=i):on=Yn?Vr(r.stateNode.nextSibling):null;return!0}function qi(){on=Yn=null,zt=!1}function D0(){var r=Ja;return r!==null&&(vr===null?vr=r:vr.push.apply(vr,r),Ja=null),r}function _l(r){Ja===null?Ja=[r]:Ja.push(r)}var j0=U(null),Hi=null,Sa=null;function ti(r,i,o){A(j0,i._currentValue),i._currentValue=o}function ka(r){r._currentValue=j0.current,q(j0)}function L0(r,i,o){for(;r!==null;){var d=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,d!==null&&(d.childLanes|=i)):d!==null&&(d.childLanes&i)!==i&&(d.childLanes|=i),r===o)break;r=r.return}}function z0(r,i,o,d){var g=r.child;for(g!==null&&(g.return=r);g!==null;){var v=g.dependencies;if(v!==null){var T=g.child;v=v.firstContext;e:for(;v!==null;){var L=v;v=g;for(var J=0;J<i.length;J++)if(L.context===i[J]){v.lanes|=o,L=v.alternate,L!==null&&(L.lanes|=o),L0(v.return,o,r),d||(T=null);break e}v=L.next}}else if(g.tag===18){if(T=g.return,T===null)throw Error(a(341));T.lanes|=o,v=T.alternate,v!==null&&(v.lanes|=o),L0(T,o,r),T=null}else T=g.child;if(T!==null)T.return=g;else for(T=g;T!==null;){if(T===r){T=null;break}if(g=T.sibling,g!==null){g.return=T.return,T=g;break}T=T.return}g=T}}function Ts(r,i,o,d){r=null;for(var g=i,v=!1;g!==null;){if(!v){if((g.flags&524288)!==0)v=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var T=g.alternate;if(T===null)throw Error(a(387));if(T=T.memoizedProps,T!==null){var L=g.type;Tr(g.pendingProps.value,T.value)||(r!==null?r.push(L):r=[L])}}else if(g===te.current){if(T=g.alternate,T===null)throw Error(a(387));T.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(r!==null?r.push(ro):r=[ro])}g=g.return}r!==null&&z0(i,r,o,d),i.flags|=262144}function ac(r){for(r=r.firstContext;r!==null;){if(!Tr(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Fi(r){Hi=r,Sa=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Xn(r){return h1(Hi,r)}function ic(r,i){return Hi===null&&Fi(r),h1(r,i)}function h1(r,i){var o=i._currentValue;if(i={context:i,memoizedValue:o,next:null},Sa===null){if(r===null)throw Error(a(308));Sa=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else Sa=Sa.next=i;return o}var $x=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(o,d){r.push(d)}};this.abort=function(){i.aborted=!0,r.forEach(function(o){return o()})}},Gx=e.unstable_scheduleCallback,Vx=e.unstable_NormalPriority,_n={$$typeof:I,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function B0(){return{controller:new $x,data:new Map,refCount:0}}function Il(r){r.refCount--,r.refCount===0&&Gx(Vx,function(){r.controller.abort()})}var Ml=null,U0=0,Ns=0,Cs=null;function Kx(r,i){if(Ml===null){var o=Ml=[];U0=0,Ns=Fd(),Cs={status:"pending",value:void 0,then:function(d){o.push(d)}}}return U0++,i.then(p1,p1),i}function p1(){if(--U0===0&&Ml!==null){Cs!==null&&(Cs.status="fulfilled");var r=Ml;Ml=null,Ns=0,Cs=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function Yx(r,i){var o=[],d={status:"pending",value:null,reason:null,then:function(g){o.push(g)}};return r.then(function(){d.status="fulfilled",d.value=i;for(var g=0;g<o.length;g++)(0,o[g])(i)},function(g){for(d.status="rejected",d.reason=g,g=0;g<o.length;g++)(0,o[g])(void 0)}),d}var g1=V.S;V.S=function(r,i){Jg=Je(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Kx(r,i),g1!==null&&g1(r,i)};var Pi=U(null);function q0(){var r=Pi.current;return r!==null?r:nn.pooledCache}function sc(r,i){i===null?A(Pi,Pi.current):A(Pi,i.pool)}function b1(){var r=q0();return r===null?null:{parent:_n._currentValue,pool:r}}var Rs=Error(a(460)),H0=Error(a(474)),lc=Error(a(542)),oc={then:function(){}};function v1(r){return r=r.status,r==="fulfilled"||r==="rejected"}function y1(r,i,o){switch(o=r[o],o===void 0?r.push(i):o!==i&&(i.then(ze,ze),i=o),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,w1(r),r;default:if(typeof i.status=="string")i.then(ze,ze);else{if(r=nn,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status="pending",r.then(function(d){if(i.status==="pending"){var g=i;g.status="fulfilled",g.value=d}},function(d){if(i.status==="pending"){var g=i;g.status="rejected",g.reason=d}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,w1(r),r}throw Gi=i,Rs}}function $i(r){try{var i=r._init;return i(r._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Gi=o,Rs):o}}var Gi=null;function x1(){if(Gi===null)throw Error(a(459));var r=Gi;return Gi=null,r}function w1(r){if(r===Rs||r===lc)throw Error(a(483))}var As=null,Ol=0;function cc(r){var i=Ol;return Ol+=1,As===null&&(As=[]),y1(As,r,i)}function Dl(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function uc(r,i){throw i.$$typeof===y?Error(a(525)):(r=Object.prototype.toString.call(i),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function S1(r){function i(oe,se){if(r){var de=oe.deletions;de===null?(oe.deletions=[se],oe.flags|=16):de.push(se)}}function o(oe,se){if(!r)return null;for(;se!==null;)i(oe,se),se=se.sibling;return null}function d(oe){for(var se=new Map;oe!==null;)oe.key!==null?se.set(oe.key,oe):se.set(oe.index,oe),oe=oe.sibling;return se}function g(oe,se){return oe=xa(oe,se),oe.index=0,oe.sibling=null,oe}function v(oe,se,de){return oe.index=de,r?(de=oe.alternate,de!==null?(de=de.index,de<se?(oe.flags|=67108866,se):de):(oe.flags|=67108866,se)):(oe.flags|=1048576,se)}function T(oe){return r&&oe.alternate===null&&(oe.flags|=67108866),oe}function L(oe,se,de,ke){return se===null||se.tag!==6?(se=A0(de,oe.mode,ke),se.return=oe,se):(se=g(se,de),se.return=oe,se)}function J(oe,se,de,ke){var et=de.type;return et===N?xe(oe,se,de.props.children,ke,de.key):se!==null&&(se.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===Y&&$i(et)===se.type)?(se=g(se,de.props),Dl(se,de),se.return=oe,se):(se=nc(de.type,de.key,de.props,null,oe.mode,ke),Dl(se,de),se.return=oe,se)}function fe(oe,se,de,ke){return se===null||se.tag!==4||se.stateNode.containerInfo!==de.containerInfo||se.stateNode.implementation!==de.implementation?(se=_0(de,oe.mode,ke),se.return=oe,se):(se=g(se,de.children||[]),se.return=oe,se)}function xe(oe,se,de,ke,et){return se===null||se.tag!==7?(se=Ui(de,oe.mode,ke,et),se.return=oe,se):(se=g(se,de),se.return=oe,se)}function Ee(oe,se,de){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return se=A0(""+se,oe.mode,de),se.return=oe,se;if(typeof se=="object"&&se!==null){switch(se.$$typeof){case x:return de=nc(se.type,se.key,se.props,null,oe.mode,de),Dl(de,se),de.return=oe,de;case k:return se=_0(se,oe.mode,de),se.return=oe,se;case Y:return se=$i(se),Ee(oe,se,de)}if(X(se)||H(se))return se=Ui(se,oe.mode,de,null),se.return=oe,se;if(typeof se.then=="function")return Ee(oe,cc(se),de);if(se.$$typeof===I)return Ee(oe,ic(oe,se),de);uc(oe,se)}return null}function me(oe,se,de,ke){var et=se!==null?se.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return et!==null?null:L(oe,se,""+de,ke);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case x:return de.key===et?J(oe,se,de,ke):null;case k:return de.key===et?fe(oe,se,de,ke):null;case Y:return de=$i(de),me(oe,se,de,ke)}if(X(de)||H(de))return et!==null?null:xe(oe,se,de,ke,null);if(typeof de.then=="function")return me(oe,se,cc(de),ke);if(de.$$typeof===I)return me(oe,se,ic(oe,de),ke);uc(oe,de)}return null}function ve(oe,se,de,ke,et){if(typeof ke=="string"&&ke!==""||typeof ke=="number"||typeof ke=="bigint")return oe=oe.get(de)||null,L(se,oe,""+ke,et);if(typeof ke=="object"&&ke!==null){switch(ke.$$typeof){case x:return oe=oe.get(ke.key===null?de:ke.key)||null,J(se,oe,ke,et);case k:return oe=oe.get(ke.key===null?de:ke.key)||null,fe(se,oe,ke,et);case Y:return ke=$i(ke),ve(oe,se,de,ke,et)}if(X(ke)||H(ke))return oe=oe.get(de)||null,xe(se,oe,ke,et,null);if(typeof ke.then=="function")return ve(oe,se,de,cc(ke),et);if(ke.$$typeof===I)return ve(oe,se,de,ic(se,ke),et);uc(se,ke)}return null}function $e(oe,se,de,ke){for(var et=null,qt=null,Xe=se,St=se=0,Dt=null;Xe!==null&&St<de.length;St++){Xe.index>St?(Dt=Xe,Xe=null):Dt=Xe.sibling;var Ht=me(oe,Xe,de[St],ke);if(Ht===null){Xe===null&&(Xe=Dt);break}r&&Xe&&Ht.alternate===null&&i(oe,Xe),se=v(Ht,se,St),qt===null?et=Ht:qt.sibling=Ht,qt=Ht,Xe=Dt}if(St===de.length)return o(oe,Xe),zt&&wa(oe,St),et;if(Xe===null){for(;St<de.length;St++)Xe=Ee(oe,de[St],ke),Xe!==null&&(se=v(Xe,se,St),qt===null?et=Xe:qt.sibling=Xe,qt=Xe);return zt&&wa(oe,St),et}for(Xe=d(Xe);St<de.length;St++)Dt=ve(Xe,oe,St,de[St],ke),Dt!==null&&(r&&Dt.alternate!==null&&Xe.delete(Dt.key===null?St:Dt.key),se=v(Dt,se,St),qt===null?et=Dt:qt.sibling=Dt,qt=Dt);return r&&Xe.forEach(function(yi){return i(oe,yi)}),zt&&wa(oe,St),et}function it(oe,se,de,ke){if(de==null)throw Error(a(151));for(var et=null,qt=null,Xe=se,St=se=0,Dt=null,Ht=de.next();Xe!==null&&!Ht.done;St++,Ht=de.next()){Xe.index>St?(Dt=Xe,Xe=null):Dt=Xe.sibling;var yi=me(oe,Xe,Ht.value,ke);if(yi===null){Xe===null&&(Xe=Dt);break}r&&Xe&&yi.alternate===null&&i(oe,Xe),se=v(yi,se,St),qt===null?et=yi:qt.sibling=yi,qt=yi,Xe=Dt}if(Ht.done)return o(oe,Xe),zt&&wa(oe,St),et;if(Xe===null){for(;!Ht.done;St++,Ht=de.next())Ht=Ee(oe,Ht.value,ke),Ht!==null&&(se=v(Ht,se,St),qt===null?et=Ht:qt.sibling=Ht,qt=Ht);return zt&&wa(oe,St),et}for(Xe=d(Xe);!Ht.done;St++,Ht=de.next())Ht=ve(Xe,oe,St,Ht.value,ke),Ht!==null&&(r&&Ht.alternate!==null&&Xe.delete(Ht.key===null?St:Ht.key),se=v(Ht,se,St),qt===null?et=Ht:qt.sibling=Ht,qt=Ht);return r&&Xe.forEach(function(i8){return i(oe,i8)}),zt&&wa(oe,St),et}function en(oe,se,de,ke){if(typeof de=="object"&&de!==null&&de.type===N&&de.key===null&&(de=de.props.children),typeof de=="object"&&de!==null){switch(de.$$typeof){case x:e:{for(var et=de.key;se!==null;){if(se.key===et){if(et=de.type,et===N){if(se.tag===7){o(oe,se.sibling),ke=g(se,de.props.children),ke.return=oe,oe=ke;break e}}else if(se.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===Y&&$i(et)===se.type){o(oe,se.sibling),ke=g(se,de.props),Dl(ke,de),ke.return=oe,oe=ke;break e}o(oe,se);break}else i(oe,se);se=se.sibling}de.type===N?(ke=Ui(de.props.children,oe.mode,ke,de.key),ke.return=oe,oe=ke):(ke=nc(de.type,de.key,de.props,null,oe.mode,ke),Dl(ke,de),ke.return=oe,oe=ke)}return T(oe);case k:e:{for(et=de.key;se!==null;){if(se.key===et)if(se.tag===4&&se.stateNode.containerInfo===de.containerInfo&&se.stateNode.implementation===de.implementation){o(oe,se.sibling),ke=g(se,de.children||[]),ke.return=oe,oe=ke;break e}else{o(oe,se);break}else i(oe,se);se=se.sibling}ke=_0(de,oe.mode,ke),ke.return=oe,oe=ke}return T(oe);case Y:return de=$i(de),en(oe,se,de,ke)}if(X(de))return $e(oe,se,de,ke);if(H(de)){if(et=H(de),typeof et!="function")throw Error(a(150));return de=et.call(de),it(oe,se,de,ke)}if(typeof de.then=="function")return en(oe,se,cc(de),ke);if(de.$$typeof===I)return en(oe,se,ic(oe,de),ke);uc(oe,de)}return typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint"?(de=""+de,se!==null&&se.tag===6?(o(oe,se.sibling),ke=g(se,de),ke.return=oe,oe=ke):(o(oe,se),ke=A0(de,oe.mode,ke),ke.return=oe,oe=ke),T(oe)):o(oe,se)}return function(oe,se,de,ke){try{Ol=0;var et=en(oe,se,de,ke);return As=null,et}catch(Xe){if(Xe===Rs||Xe===lc)throw Xe;var qt=Nr(29,Xe,null,oe.mode);return qt.lanes=ke,qt.return=oe,qt}}}var Vi=S1(!0),k1=S1(!1),ni=!1;function F0(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function P0(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function ri(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function ai(r,i,o){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,($t&2)!==0){var g=d.pending;return g===null?i.next=i:(i.next=g.next,g.next=i),d.pending=i,i=tc(r),s1(r,null,o),i}return ec(r,d,i,o),tc(r)}function jl(r,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194048)!==0)){var d=i.lanes;d&=r.pendingLanes,o|=d,i.lanes=o,Ue(r,o)}}function $0(r,i){var o=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var g=null,v=null;if(o=o.firstBaseUpdate,o!==null){do{var T={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};v===null?g=v=T:v=v.next=T,o=o.next}while(o!==null);v===null?g=v=i:v=v.next=i}else g=v=i;o={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:v,shared:d.shared,callbacks:d.callbacks},r.updateQueue=o;return}r=o.lastBaseUpdate,r===null?o.firstBaseUpdate=i:r.next=i,o.lastBaseUpdate=i}var G0=!1;function Ll(){if(G0){var r=Cs;if(r!==null)throw r}}function zl(r,i,o,d){G0=!1;var g=r.updateQueue;ni=!1;var v=g.firstBaseUpdate,T=g.lastBaseUpdate,L=g.shared.pending;if(L!==null){g.shared.pending=null;var J=L,fe=J.next;J.next=null,T===null?v=fe:T.next=fe,T=J;var xe=r.alternate;xe!==null&&(xe=xe.updateQueue,L=xe.lastBaseUpdate,L!==T&&(L===null?xe.firstBaseUpdate=fe:L.next=fe,xe.lastBaseUpdate=J))}if(v!==null){var Ee=g.baseState;T=0,xe=fe=J=null,L=v;do{var me=L.lane&-536870913,ve=me!==L.lane;if(ve?(Ot&me)===me:(d&me)===me){me!==0&&me===Ns&&(G0=!0),xe!==null&&(xe=xe.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});e:{var $e=r,it=L;me=i;var en=o;switch(it.tag){case 1:if($e=it.payload,typeof $e=="function"){Ee=$e.call(en,Ee,me);break e}Ee=$e;break e;case 3:$e.flags=$e.flags&-65537|128;case 0:if($e=it.payload,me=typeof $e=="function"?$e.call(en,Ee,me):$e,me==null)break e;Ee=b({},Ee,me);break e;case 2:ni=!0}}me=L.callback,me!==null&&(r.flags|=64,ve&&(r.flags|=8192),ve=g.callbacks,ve===null?g.callbacks=[me]:ve.push(me))}else ve={lane:me,tag:L.tag,payload:L.payload,callback:L.callback,next:null},xe===null?(fe=xe=ve,J=Ee):xe=xe.next=ve,T|=me;if(L=L.next,L===null){if(L=g.shared.pending,L===null)break;ve=L,L=ve.next,ve.next=null,g.lastBaseUpdate=ve,g.shared.pending=null}}while(!0);xe===null&&(J=Ee),g.baseState=J,g.firstBaseUpdate=fe,g.lastBaseUpdate=xe,v===null&&(g.shared.lanes=0),ci|=T,r.lanes=T,r.memoizedState=Ee}}function E1(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function T1(r,i){var o=r.callbacks;if(o!==null)for(r.callbacks=null,r=0;r<o.length;r++)E1(o[r],i)}var _s=U(null),dc=U(0);function N1(r,i){r=Ma,A(dc,r),A(_s,i),Ma=r|i.baseLanes}function V0(){A(dc,Ma),A(_s,_s.current)}function K0(){Ma=dc.current,q(_s),q(dc)}var Cr=U(null),Gr=null;function ii(r){var i=r.alternate;A(Tn,Tn.current&1),A(Cr,r),Gr===null&&(i===null||_s.current!==null||i.memoizedState!==null)&&(Gr=r)}function Y0(r){A(Tn,Tn.current),A(Cr,r),Gr===null&&(Gr=r)}function C1(r){r.tag===22?(A(Tn,Tn.current),A(Cr,r),Gr===null&&(Gr=r)):si()}function si(){A(Tn,Tn.current),A(Cr,Cr.current)}function Rr(r){q(Cr),Gr===r&&(Gr=null),q(Tn)}var Tn=U(0);function fc(r){for(var i=r;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||ef(o)||tf(o)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Ea=0,xt=null,Qt=null,In=null,mc=!1,Is=!1,Ki=!1,hc=0,Bl=0,Ms=null,Xx=0;function vn(){throw Error(a(321))}function X0(r,i){if(i===null)return!1;for(var o=0;o<i.length&&o<r.length;o++)if(!Tr(r[o],i[o]))return!1;return!0}function Z0(r,i,o,d,g,v){return Ea=v,xt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,V.H=r===null||r.memoizedState===null?ug:dd,Ki=!1,v=o(d,g),Ki=!1,Is&&(v=A1(i,o,d,g)),R1(r),v}function R1(r){V.H=Hl;var i=Qt!==null&&Qt.next!==null;if(Ea=0,In=Qt=xt=null,mc=!1,Bl=0,Ms=null,i)throw Error(a(300));r===null||Mn||(r=r.dependencies,r!==null&&ac(r)&&(Mn=!0))}function A1(r,i,o,d){xt=r;var g=0;do{if(Is&&(Ms=null),Bl=0,Is=!1,25<=g)throw Error(a(301));if(g+=1,In=Qt=null,r.updateQueue!=null){var v=r.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}V.H=dg,v=i(o,d)}while(Is);return v}function Zx(){var r=V.H,i=r.useState()[0];return i=typeof i.then=="function"?Ul(i):i,r=r.useState()[0],(Qt!==null?Qt.memoizedState:null)!==r&&(xt.flags|=1024),i}function W0(){var r=hc!==0;return hc=0,r}function Q0(r,i,o){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~o}function J0(r){if(mc){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}mc=!1}Ea=0,In=Qt=xt=null,Is=!1,Bl=hc=0,Ms=null}function sr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return In===null?xt.memoizedState=In=r:In=In.next=r,In}function Nn(){if(Qt===null){var r=xt.alternate;r=r!==null?r.memoizedState:null}else r=Qt.next;var i=In===null?xt.memoizedState:In.next;if(i!==null)In=i,Qt=r;else{if(r===null)throw xt.alternate===null?Error(a(467)):Error(a(310));Qt=r,r={memoizedState:Qt.memoizedState,baseState:Qt.baseState,baseQueue:Qt.baseQueue,queue:Qt.queue,next:null},In===null?xt.memoizedState=In=r:In=In.next=r}return In}function pc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ul(r){var i=Bl;return Bl+=1,Ms===null&&(Ms=[]),r=y1(Ms,r,i),i=xt,(In===null?i.memoizedState:In.next)===null&&(i=i.alternate,V.H=i===null||i.memoizedState===null?ug:dd),r}function gc(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Ul(r);if(r.$$typeof===I)return Xn(r)}throw Error(a(438,String(r)))}function ed(r){var i=null,o=xt.updateQueue;if(o!==null&&(i=o.memoCache),i==null){var d=xt.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(i={data:d.data.map(function(g){return g.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),o===null&&(o=pc(),xt.updateQueue=o),o.memoCache=i,o=i.data[i.index],o===void 0)for(o=i.data[i.index]=Array(r),d=0;d<r;d++)o[d]=j;return i.index++,o}function Ta(r,i){return typeof i=="function"?i(r):i}function bc(r){var i=Nn();return td(i,Qt,r)}function td(r,i,o){var d=r.queue;if(d===null)throw Error(a(311));d.lastRenderedReducer=o;var g=r.baseQueue,v=d.pending;if(v!==null){if(g!==null){var T=g.next;g.next=v.next,v.next=T}i.baseQueue=g=v,d.pending=null}if(v=r.baseState,g===null)r.memoizedState=v;else{i=g.next;var L=T=null,J=null,fe=i,xe=!1;do{var Ee=fe.lane&-536870913;if(Ee!==fe.lane?(Ot&Ee)===Ee:(Ea&Ee)===Ee){var me=fe.revertLane;if(me===0)J!==null&&(J=J.next={lane:0,revertLane:0,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null}),Ee===Ns&&(xe=!0);else if((Ea&me)===me){fe=fe.next,me===Ns&&(xe=!0);continue}else Ee={lane:0,revertLane:fe.revertLane,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},J===null?(L=J=Ee,T=v):J=J.next=Ee,xt.lanes|=me,ci|=me;Ee=fe.action,Ki&&o(v,Ee),v=fe.hasEagerState?fe.eagerState:o(v,Ee)}else me={lane:Ee,revertLane:fe.revertLane,gesture:fe.gesture,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},J===null?(L=J=me,T=v):J=J.next=me,xt.lanes|=Ee,ci|=Ee;fe=fe.next}while(fe!==null&&fe!==i);if(J===null?T=v:J.next=L,!Tr(v,r.memoizedState)&&(Mn=!0,xe&&(o=Cs,o!==null)))throw o;r.memoizedState=v,r.baseState=T,r.baseQueue=J,d.lastRenderedState=v}return g===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function nd(r){var i=Nn(),o=i.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=r;var d=o.dispatch,g=o.pending,v=i.memoizedState;if(g!==null){o.pending=null;var T=g=g.next;do v=r(v,T.action),T=T.next;while(T!==g);Tr(v,i.memoizedState)||(Mn=!0),i.memoizedState=v,i.baseQueue===null&&(i.baseState=v),o.lastRenderedState=v}return[v,d]}function _1(r,i,o){var d=xt,g=Nn(),v=zt;if(v){if(o===void 0)throw Error(a(407));o=o()}else o=i();var T=!Tr((Qt||g).memoizedState,o);if(T&&(g.memoizedState=o,Mn=!0),g=g.queue,id(O1.bind(null,d,g,r),[r]),g.getSnapshot!==i||T||In!==null&&In.memoizedState.tag&1){if(d.flags|=2048,Os(9,{destroy:void 0},M1.bind(null,d,g,o,i),null),nn===null)throw Error(a(349));v||(Ea&127)!==0||I1(d,i,o)}return o}function I1(r,i,o){r.flags|=16384,r={getSnapshot:i,value:o},i=xt.updateQueue,i===null?(i=pc(),xt.updateQueue=i,i.stores=[r]):(o=i.stores,o===null?i.stores=[r]:o.push(r))}function M1(r,i,o,d){i.value=o,i.getSnapshot=d,D1(i)&&j1(r)}function O1(r,i,o){return o(function(){D1(i)&&j1(r)})}function D1(r){var i=r.getSnapshot;r=r.value;try{var o=i();return!Tr(r,o)}catch{return!0}}function j1(r){var i=Bi(r,2);i!==null&&yr(i,r,2)}function rd(r){var i=sr();if(typeof r=="function"){var o=r;if(r=o(),Ki){ot(!0);try{o()}finally{ot(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:r},i}function L1(r,i,o,d){return r.baseState=o,td(r,Qt,typeof d=="function"?d:Ta)}function Wx(r,i,o,d,g){if(xc(r))throw Error(a(485));if(r=i.action,r!==null){var v={payload:g,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){v.listeners.push(T)}};V.T!==null?o(!0):v.isTransition=!1,d(v),o=i.pending,o===null?(v.next=i.pending=v,z1(i,v)):(v.next=o.next,i.pending=o.next=v)}}function z1(r,i){var o=i.action,d=i.payload,g=r.state;if(i.isTransition){var v=V.T,T={};V.T=T;try{var L=o(g,d),J=V.S;J!==null&&J(T,L),B1(r,i,L)}catch(fe){ad(r,i,fe)}finally{v!==null&&T.types!==null&&(v.types=T.types),V.T=v}}else try{v=o(g,d),B1(r,i,v)}catch(fe){ad(r,i,fe)}}function B1(r,i,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(d){U1(r,i,d)},function(d){return ad(r,i,d)}):U1(r,i,o)}function U1(r,i,o){i.status="fulfilled",i.value=o,q1(i),r.state=o,i=r.pending,i!==null&&(o=i.next,o===i?r.pending=null:(o=o.next,i.next=o,z1(r,o)))}function ad(r,i,o){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do i.status="rejected",i.reason=o,q1(i),i=i.next;while(i!==d)}r.action=null}function q1(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function H1(r,i){return i}function F1(r,i){if(zt){var o=nn.formState;if(o!==null){e:{var d=xt;if(zt){if(on){t:{for(var g=on,v=$r;g.nodeType!==8;){if(!v){g=null;break t}if(g=Vr(g.nextSibling),g===null){g=null;break t}}v=g.data,g=v==="F!"||v==="F"?g:null}if(g){on=Vr(g.nextSibling),d=g.data==="F!";break e}}ei(d)}d=!1}d&&(i=o[0])}}return o=sr(),o.memoizedState=o.baseState=i,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:H1,lastRenderedState:i},o.queue=d,o=lg.bind(null,xt,d),d.dispatch=o,d=rd(!1),v=ud.bind(null,xt,!1,d.queue),d=sr(),g={state:i,dispatch:null,action:r,pending:null},d.queue=g,o=Wx.bind(null,xt,g,v,o),g.dispatch=o,d.memoizedState=r,[i,o,!1]}function P1(r){var i=Nn();return $1(i,Qt,r)}function $1(r,i,o){if(i=td(r,i,H1)[0],r=bc(Ta)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var d=Ul(i)}catch(T){throw T===Rs?lc:T}else d=i;i=Nn();var g=i.queue,v=g.dispatch;return o!==i.memoizedState&&(xt.flags|=2048,Os(9,{destroy:void 0},Qx.bind(null,g,o),null)),[d,v,r]}function Qx(r,i){r.action=i}function G1(r){var i=Nn(),o=Qt;if(o!==null)return $1(i,o,r);Nn(),i=i.memoizedState,o=Nn();var d=o.queue.dispatch;return o.memoizedState=r,[i,d,!1]}function Os(r,i,o,d){return r={tag:r,create:o,deps:d,inst:i,next:null},i=xt.updateQueue,i===null&&(i=pc(),xt.updateQueue=i),o=i.lastEffect,o===null?i.lastEffect=r.next=r:(d=o.next,o.next=r,r.next=d,i.lastEffect=r),r}function V1(){return Nn().memoizedState}function vc(r,i,o,d){var g=sr();xt.flags|=r,g.memoizedState=Os(1|i,{destroy:void 0},o,d===void 0?null:d)}function yc(r,i,o,d){var g=Nn();d=d===void 0?null:d;var v=g.memoizedState.inst;Qt!==null&&d!==null&&X0(d,Qt.memoizedState.deps)?g.memoizedState=Os(i,v,o,d):(xt.flags|=r,g.memoizedState=Os(1|i,v,o,d))}function K1(r,i){vc(8390656,8,r,i)}function id(r,i){yc(2048,8,r,i)}function Jx(r){xt.flags|=4;var i=xt.updateQueue;if(i===null)i=pc(),xt.updateQueue=i,i.events=[r];else{var o=i.events;o===null?i.events=[r]:o.push(r)}}function Y1(r){var i=Nn().memoizedState;return Jx({ref:i,nextImpl:r}),function(){if(($t&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function X1(r,i){return yc(4,2,r,i)}function Z1(r,i){return yc(4,4,r,i)}function W1(r,i){if(typeof i=="function"){r=r();var o=i(r);return function(){typeof o=="function"?o():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function Q1(r,i,o){o=o!=null?o.concat([r]):null,yc(4,4,W1.bind(null,i,r),o)}function sd(){}function J1(r,i){var o=Nn();i=i===void 0?null:i;var d=o.memoizedState;return i!==null&&X0(i,d[1])?d[0]:(o.memoizedState=[r,i],r)}function eg(r,i){var o=Nn();i=i===void 0?null:i;var d=o.memoizedState;if(i!==null&&X0(i,d[1]))return d[0];if(d=r(),Ki){ot(!0);try{r()}finally{ot(!1)}}return o.memoizedState=[d,i],d}function ld(r,i,o){return o===void 0||(Ea&1073741824)!==0&&(Ot&261930)===0?r.memoizedState=i:(r.memoizedState=o,r=tb(),xt.lanes|=r,ci|=r,o)}function tg(r,i,o,d){return Tr(o,i)?o:_s.current!==null?(r=ld(r,o,d),Tr(r,i)||(Mn=!0),r):(Ea&42)===0||(Ea&1073741824)!==0&&(Ot&261930)===0?(Mn=!0,r.memoizedState=o):(r=tb(),xt.lanes|=r,ci|=r,i)}function ng(r,i,o,d,g){var v=re.p;re.p=v!==0&&8>v?v:8;var T=V.T,L={};V.T=L,ud(r,!1,i,o);try{var J=g(),fe=V.S;if(fe!==null&&fe(L,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var xe=Yx(J,d);ql(r,i,xe,Ir(r))}else ql(r,i,d,Ir(r))}catch(Ee){ql(r,i,{then:function(){},status:"rejected",reason:Ee},Ir())}finally{re.p=v,T!==null&&L.types!==null&&(T.types=L.types),V.T=T}}function e7(){}function od(r,i,o,d){if(r.tag!==5)throw Error(a(476));var g=rg(r).queue;ng(r,g,i,ue,o===null?e7:function(){return ag(r),o(d)})}function rg(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:ue},next:null};var o={};return i.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:o},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function ag(r){var i=rg(r);i.next===null&&(i=r.alternate.memoizedState),ql(r,i.next.queue,{},Ir())}function cd(){return Xn(ro)}function ig(){return Nn().memoizedState}function sg(){return Nn().memoizedState}function t7(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var o=Ir();r=ri(o);var d=ai(i,r,o);d!==null&&(yr(d,i,o),jl(d,i,o)),i={cache:B0()},r.payload=i;return}i=i.return}}function n7(r,i,o){var d=Ir();o={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},xc(r)?og(i,o):(o=C0(r,i,o,d),o!==null&&(yr(o,r,d),cg(o,i,d)))}function lg(r,i,o){var d=Ir();ql(r,i,o,d)}function ql(r,i,o,d){var g={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(xc(r))og(i,g);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=i.lastRenderedReducer,v!==null))try{var T=i.lastRenderedState,L=v(T,o);if(g.hasEagerState=!0,g.eagerState=L,Tr(L,T))return ec(r,i,g,0),nn===null&&Jo(),!1}catch{}if(o=C0(r,i,g,d),o!==null)return yr(o,r,d),cg(o,i,d),!0}return!1}function ud(r,i,o,d){if(d={lane:2,revertLane:Fd(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},xc(r)){if(i)throw Error(a(479))}else i=C0(r,o,d,2),i!==null&&yr(i,r,2)}function xc(r){var i=r.alternate;return r===xt||i!==null&&i===xt}function og(r,i){Is=mc=!0;var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}function cg(r,i,o){if((o&4194048)!==0){var d=i.lanes;d&=r.pendingLanes,o|=d,i.lanes=o,Ue(r,o)}}var Hl={readContext:Xn,use:gc,useCallback:vn,useContext:vn,useEffect:vn,useImperativeHandle:vn,useLayoutEffect:vn,useInsertionEffect:vn,useMemo:vn,useReducer:vn,useRef:vn,useState:vn,useDebugValue:vn,useDeferredValue:vn,useTransition:vn,useSyncExternalStore:vn,useId:vn,useHostTransitionStatus:vn,useFormState:vn,useActionState:vn,useOptimistic:vn,useMemoCache:vn,useCacheRefresh:vn};Hl.useEffectEvent=vn;var ug={readContext:Xn,use:gc,useCallback:function(r,i){return sr().memoizedState=[r,i===void 0?null:i],r},useContext:Xn,useEffect:K1,useImperativeHandle:function(r,i,o){o=o!=null?o.concat([r]):null,vc(4194308,4,W1.bind(null,i,r),o)},useLayoutEffect:function(r,i){return vc(4194308,4,r,i)},useInsertionEffect:function(r,i){vc(4,2,r,i)},useMemo:function(r,i){var o=sr();i=i===void 0?null:i;var d=r();if(Ki){ot(!0);try{r()}finally{ot(!1)}}return o.memoizedState=[d,i],d},useReducer:function(r,i,o){var d=sr();if(o!==void 0){var g=o(i);if(Ki){ot(!0);try{o(i)}finally{ot(!1)}}}else g=i;return d.memoizedState=d.baseState=g,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:g},d.queue=r,r=r.dispatch=n7.bind(null,xt,r),[d.memoizedState,r]},useRef:function(r){var i=sr();return r={current:r},i.memoizedState=r},useState:function(r){r=rd(r);var i=r.queue,o=lg.bind(null,xt,i);return i.dispatch=o,[r.memoizedState,o]},useDebugValue:sd,useDeferredValue:function(r,i){var o=sr();return ld(o,r,i)},useTransition:function(){var r=rd(!1);return r=ng.bind(null,xt,r.queue,!0,!1),sr().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,o){var d=xt,g=sr();if(zt){if(o===void 0)throw Error(a(407));o=o()}else{if(o=i(),nn===null)throw Error(a(349));(Ot&127)!==0||I1(d,i,o)}g.memoizedState=o;var v={value:o,getSnapshot:i};return g.queue=v,K1(O1.bind(null,d,v,r),[r]),d.flags|=2048,Os(9,{destroy:void 0},M1.bind(null,d,v,o,i),null),o},useId:function(){var r=sr(),i=nn.identifierPrefix;if(zt){var o=aa,d=ra;o=(d&~(1<<32-mt(d)-1)).toString(32)+o,i="_"+i+"R_"+o,o=hc++,0<o&&(i+="H"+o.toString(32)),i+="_"}else o=Xx++,i="_"+i+"r_"+o.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:cd,useFormState:F1,useActionState:F1,useOptimistic:function(r){var i=sr();i.memoizedState=i.baseState=r;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=o,i=ud.bind(null,xt,!0,o),o.dispatch=i,[r,i]},useMemoCache:ed,useCacheRefresh:function(){return sr().memoizedState=t7.bind(null,xt)},useEffectEvent:function(r){var i=sr(),o={impl:r};return i.memoizedState=o,function(){if(($t&2)!==0)throw Error(a(440));return o.impl.apply(void 0,arguments)}}},dd={readContext:Xn,use:gc,useCallback:J1,useContext:Xn,useEffect:id,useImperativeHandle:Q1,useInsertionEffect:X1,useLayoutEffect:Z1,useMemo:eg,useReducer:bc,useRef:V1,useState:function(){return bc(Ta)},useDebugValue:sd,useDeferredValue:function(r,i){var o=Nn();return tg(o,Qt.memoizedState,r,i)},useTransition:function(){var r=bc(Ta)[0],i=Nn().memoizedState;return[typeof r=="boolean"?r:Ul(r),i]},useSyncExternalStore:_1,useId:ig,useHostTransitionStatus:cd,useFormState:P1,useActionState:P1,useOptimistic:function(r,i){var o=Nn();return L1(o,Qt,r,i)},useMemoCache:ed,useCacheRefresh:sg};dd.useEffectEvent=Y1;var dg={readContext:Xn,use:gc,useCallback:J1,useContext:Xn,useEffect:id,useImperativeHandle:Q1,useInsertionEffect:X1,useLayoutEffect:Z1,useMemo:eg,useReducer:nd,useRef:V1,useState:function(){return nd(Ta)},useDebugValue:sd,useDeferredValue:function(r,i){var o=Nn();return Qt===null?ld(o,r,i):tg(o,Qt.memoizedState,r,i)},useTransition:function(){var r=nd(Ta)[0],i=Nn().memoizedState;return[typeof r=="boolean"?r:Ul(r),i]},useSyncExternalStore:_1,useId:ig,useHostTransitionStatus:cd,useFormState:G1,useActionState:G1,useOptimistic:function(r,i){var o=Nn();return Qt!==null?L1(o,Qt,r,i):(o.baseState=r,[r,o.queue.dispatch])},useMemoCache:ed,useCacheRefresh:sg};dg.useEffectEvent=Y1;function fd(r,i,o,d){i=r.memoizedState,o=o(d,i),o=o==null?i:b({},i,o),r.memoizedState=o,r.lanes===0&&(r.updateQueue.baseState=o)}var md={enqueueSetState:function(r,i,o){r=r._reactInternals;var d=Ir(),g=ri(d);g.payload=i,o!=null&&(g.callback=o),i=ai(r,g,d),i!==null&&(yr(i,r,d),jl(i,r,d))},enqueueReplaceState:function(r,i,o){r=r._reactInternals;var d=Ir(),g=ri(d);g.tag=1,g.payload=i,o!=null&&(g.callback=o),i=ai(r,g,d),i!==null&&(yr(i,r,d),jl(i,r,d))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var o=Ir(),d=ri(o);d.tag=2,i!=null&&(d.callback=i),i=ai(r,d,o),i!==null&&(yr(i,r,o),jl(i,r,o))}};function fg(r,i,o,d,g,v,T){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,v,T):i.prototype&&i.prototype.isPureReactComponent?!Cl(o,d)||!Cl(g,v):!0}function mg(r,i,o,d){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,d),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,d),i.state!==r&&md.enqueueReplaceState(i,i.state,null)}function Yi(r,i){var o=i;if("ref"in i){o={};for(var d in i)d!=="ref"&&(o[d]=i[d])}if(r=r.defaultProps){o===i&&(o=b({},o));for(var g in r)o[g]===void 0&&(o[g]=r[g])}return o}function hg(r){Qo(r)}function pg(r){console.error(r)}function gg(r){Qo(r)}function wc(r,i){try{var o=r.onUncaughtError;o(i.value,{componentStack:i.stack})}catch(d){setTimeout(function(){throw d})}}function bg(r,i,o){try{var d=r.onCaughtError;d(o.value,{componentStack:o.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function hd(r,i,o){return o=ri(o),o.tag=3,o.payload={element:null},o.callback=function(){wc(r,i)},o}function vg(r){return r=ri(r),r.tag=3,r}function yg(r,i,o,d){var g=o.type.getDerivedStateFromError;if(typeof g=="function"){var v=d.value;r.payload=function(){return g(v)},r.callback=function(){bg(i,o,d)}}var T=o.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(r.callback=function(){bg(i,o,d),typeof g!="function"&&(ui===null?ui=new Set([this]):ui.add(this));var L=d.stack;this.componentDidCatch(d.value,{componentStack:L!==null?L:""})})}function r7(r,i,o,d,g){if(o.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(i=o.alternate,i!==null&&Ts(i,o,g,!0),o=Cr.current,o!==null){switch(o.tag){case 31:case 13:return Gr===null?Oc():o.alternate===null&&yn===0&&(yn=3),o.flags&=-257,o.flags|=65536,o.lanes=g,d===oc?o.flags|=16384:(i=o.updateQueue,i===null?o.updateQueue=new Set([d]):i.add(d),Ud(r,d,g)),!1;case 22:return o.flags|=65536,d===oc?o.flags|=16384:(i=o.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([d])},o.updateQueue=i):(o=i.retryQueue,o===null?i.retryQueue=new Set([d]):o.add(d)),Ud(r,d,g)),!1}throw Error(a(435,o.tag))}return Ud(r,d,g),Oc(),!1}if(zt)return i=Cr.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=g,d!==O0&&(r=Error(a(422),{cause:d}),_l(Hr(r,o)))):(d!==O0&&(i=Error(a(423),{cause:d}),_l(Hr(i,o))),r=r.current.alternate,r.flags|=65536,g&=-g,r.lanes|=g,d=Hr(d,o),g=hd(r.stateNode,d,g),$0(r,g),yn!==4&&(yn=2)),!1;var v=Error(a(520),{cause:d});if(v=Hr(v,o),Xl===null?Xl=[v]:Xl.push(v),yn!==4&&(yn=2),i===null)return!0;d=Hr(d,o),o=i;do{switch(o.tag){case 3:return o.flags|=65536,r=g&-g,o.lanes|=r,r=hd(o.stateNode,d,r),$0(o,r),!1;case 1:if(i=o.type,v=o.stateNode,(o.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(ui===null||!ui.has(v))))return o.flags|=65536,g&=-g,o.lanes|=g,g=vg(g),yg(g,r,o,d),$0(o,g),!1}o=o.return}while(o!==null);return!1}var pd=Error(a(461)),Mn=!1;function Zn(r,i,o,d){i.child=r===null?k1(i,null,o,d):Vi(i,r.child,o,d)}function xg(r,i,o,d,g){o=o.render;var v=i.ref;if("ref"in d){var T={};for(var L in d)L!=="ref"&&(T[L]=d[L])}else T=d;return Fi(i),d=Z0(r,i,o,T,v,g),L=W0(),r!==null&&!Mn?(Q0(r,i,g),Na(r,i,g)):(zt&&L&&I0(i),i.flags|=1,Zn(r,i,d,g),i.child)}function wg(r,i,o,d,g){if(r===null){var v=o.type;return typeof v=="function"&&!R0(v)&&v.defaultProps===void 0&&o.compare===null?(i.tag=15,i.type=v,Sg(r,i,v,d,g)):(r=nc(o.type,null,d,i,i.mode,g),r.ref=i.ref,r.return=i,i.child=r)}if(v=r.child,!kd(r,g)){var T=v.memoizedProps;if(o=o.compare,o=o!==null?o:Cl,o(T,d)&&r.ref===i.ref)return Na(r,i,g)}return i.flags|=1,r=xa(v,d),r.ref=i.ref,r.return=i,i.child=r}function Sg(r,i,o,d,g){if(r!==null){var v=r.memoizedProps;if(Cl(v,d)&&r.ref===i.ref)if(Mn=!1,i.pendingProps=d=v,kd(r,g))(r.flags&131072)!==0&&(Mn=!0);else return i.lanes=r.lanes,Na(r,i,g)}return gd(r,i,o,d,g)}function kg(r,i,o,d){var g=d.children,v=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((i.flags&128)!==0){if(v=v!==null?v.baseLanes|o:o,r!==null){for(d=i.child=r.child,g=0;d!==null;)g=g|d.lanes|d.childLanes,d=d.sibling;d=g&~v}else d=0,i.child=null;return Eg(r,i,v,o,d)}if((o&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&sc(i,v!==null?v.cachePool:null),v!==null?N1(i,v):V0(),C1(i);else return d=i.lanes=536870912,Eg(r,i,v!==null?v.baseLanes|o:o,o,d)}else v!==null?(sc(i,v.cachePool),N1(i,v),si(),i.memoizedState=null):(r!==null&&sc(i,null),V0(),si());return Zn(r,i,g,o),i.child}function Fl(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Eg(r,i,o,d,g){var v=q0();return v=v===null?null:{parent:_n._currentValue,pool:v},i.memoizedState={baseLanes:o,cachePool:v},r!==null&&sc(i,null),V0(),C1(i),r!==null&&Ts(r,i,d,!0),i.childLanes=g,null}function Sc(r,i){return i=Ec({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function Tg(r,i,o){return Vi(i,r.child,null,o),r=Sc(i,i.pendingProps),r.flags|=2,Rr(i),i.memoizedState=null,r}function a7(r,i,o){var d=i.pendingProps,g=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(zt){if(d.mode==="hidden")return r=Sc(i,d),i.lanes=536870912,Fl(null,r);if(Y0(i),(r=on)?(r=zb(r,$r),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Qa!==null?{id:ra,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},o=o1(r),o.return=i,i.child=o,Yn=i,on=null)):r=null,r===null)throw ei(i);return i.lanes=536870912,null}return Sc(i,d)}var v=r.memoizedState;if(v!==null){var T=v.dehydrated;if(Y0(i),g)if(i.flags&256)i.flags&=-257,i=Tg(r,i,o);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if(Mn||Ts(r,i,o,!1),g=(o&r.childLanes)!==0,Mn||g){if(d=nn,d!==null&&(T=wt(d,o),T!==0&&T!==v.retryLane))throw v.retryLane=T,Bi(r,T),yr(d,r,T),pd;Oc(),i=Tg(r,i,o)}else r=v.treeContext,on=Vr(T.nextSibling),Yn=i,zt=!0,Ja=null,$r=!1,r!==null&&d1(i,r),i=Sc(i,d),i.flags|=4096;return i}return r=xa(r.child,{mode:d.mode,children:d.children}),r.ref=i.ref,i.child=r,r.return=i,r}function kc(r,i){var o=i.ref;if(o===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(a(284));(r===null||r.ref!==o)&&(i.flags|=4194816)}}function gd(r,i,o,d,g){return Fi(i),o=Z0(r,i,o,d,void 0,g),d=W0(),r!==null&&!Mn?(Q0(r,i,g),Na(r,i,g)):(zt&&d&&I0(i),i.flags|=1,Zn(r,i,o,g),i.child)}function Ng(r,i,o,d,g,v){return Fi(i),i.updateQueue=null,o=A1(i,d,o,g),R1(r),d=W0(),r!==null&&!Mn?(Q0(r,i,v),Na(r,i,v)):(zt&&d&&I0(i),i.flags|=1,Zn(r,i,o,v),i.child)}function Cg(r,i,o,d,g){if(Fi(i),i.stateNode===null){var v=ws,T=o.contextType;typeof T=="object"&&T!==null&&(v=Xn(T)),v=new o(d,v),i.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=md,i.stateNode=v,v._reactInternals=i,v=i.stateNode,v.props=d,v.state=i.memoizedState,v.refs={},F0(i),T=o.contextType,v.context=typeof T=="object"&&T!==null?Xn(T):ws,v.state=i.memoizedState,T=o.getDerivedStateFromProps,typeof T=="function"&&(fd(i,o,T,d),v.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(T=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),T!==v.state&&md.enqueueReplaceState(v,v.state,null),zl(i,d,v,g),Ll(),v.state=i.memoizedState),typeof v.componentDidMount=="function"&&(i.flags|=4194308),d=!0}else if(r===null){v=i.stateNode;var L=i.memoizedProps,J=Yi(o,L);v.props=J;var fe=v.context,xe=o.contextType;T=ws,typeof xe=="object"&&xe!==null&&(T=Xn(xe));var Ee=o.getDerivedStateFromProps;xe=typeof Ee=="function"||typeof v.getSnapshotBeforeUpdate=="function",L=i.pendingProps!==L,xe||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(L||fe!==T)&&mg(i,v,d,T),ni=!1;var me=i.memoizedState;v.state=me,zl(i,d,v,g),Ll(),fe=i.memoizedState,L||me!==fe||ni?(typeof Ee=="function"&&(fd(i,o,Ee,d),fe=i.memoizedState),(J=ni||fg(i,o,J,d,me,fe,T))?(xe||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(i.flags|=4194308)):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=d,i.memoizedState=fe),v.props=d,v.state=fe,v.context=T,d=J):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),d=!1)}else{v=i.stateNode,P0(r,i),T=i.memoizedProps,xe=Yi(o,T),v.props=xe,Ee=i.pendingProps,me=v.context,fe=o.contextType,J=ws,typeof fe=="object"&&fe!==null&&(J=Xn(fe)),L=o.getDerivedStateFromProps,(fe=typeof L=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(T!==Ee||me!==J)&&mg(i,v,d,J),ni=!1,me=i.memoizedState,v.state=me,zl(i,d,v,g),Ll();var ve=i.memoizedState;T!==Ee||me!==ve||ni||r!==null&&r.dependencies!==null&&ac(r.dependencies)?(typeof L=="function"&&(fd(i,o,L,d),ve=i.memoizedState),(xe=ni||fg(i,o,xe,d,me,ve,J)||r!==null&&r.dependencies!==null&&ac(r.dependencies))?(fe||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(d,ve,J),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(d,ve,J)),typeof v.componentDidUpdate=="function"&&(i.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof v.componentDidUpdate!="function"||T===r.memoizedProps&&me===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||T===r.memoizedProps&&me===r.memoizedState||(i.flags|=1024),i.memoizedProps=d,i.memoizedState=ve),v.props=d,v.state=ve,v.context=J,d=xe):(typeof v.componentDidUpdate!="function"||T===r.memoizedProps&&me===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||T===r.memoizedProps&&me===r.memoizedState||(i.flags|=1024),d=!1)}return v=d,kc(r,i),d=(i.flags&128)!==0,v||d?(v=i.stateNode,o=d&&typeof o.getDerivedStateFromError!="function"?null:v.render(),i.flags|=1,r!==null&&d?(i.child=Vi(i,r.child,null,g),i.child=Vi(i,null,o,g)):Zn(r,i,o,g),i.memoizedState=v.state,r=i.child):r=Na(r,i,g),r}function Rg(r,i,o,d){return qi(),i.flags|=256,Zn(r,i,o,d),i.child}var bd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vd(r){return{baseLanes:r,cachePool:b1()}}function yd(r,i,o){return r=r!==null?r.childLanes&~o:0,i&&(r|=_r),r}function Ag(r,i,o){var d=i.pendingProps,g=!1,v=(i.flags&128)!==0,T;if((T=v)||(T=r!==null&&r.memoizedState===null?!1:(Tn.current&2)!==0),T&&(g=!0,i.flags&=-129),T=(i.flags&32)!==0,i.flags&=-33,r===null){if(zt){if(g?ii(i):si(),(r=on)?(r=zb(r,$r),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Qa!==null?{id:ra,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},o=o1(r),o.return=i,i.child=o,Yn=i,on=null)):r=null,r===null)throw ei(i);return tf(r)?i.lanes=32:i.lanes=536870912,null}var L=d.children;return d=d.fallback,g?(si(),g=i.mode,L=Ec({mode:"hidden",children:L},g),d=Ui(d,g,o,null),L.return=i,d.return=i,L.sibling=d,i.child=L,d=i.child,d.memoizedState=vd(o),d.childLanes=yd(r,T,o),i.memoizedState=bd,Fl(null,d)):(ii(i),xd(i,L))}var J=r.memoizedState;if(J!==null&&(L=J.dehydrated,L!==null)){if(v)i.flags&256?(ii(i),i.flags&=-257,i=wd(r,i,o)):i.memoizedState!==null?(si(),i.child=r.child,i.flags|=128,i=null):(si(),L=d.fallback,g=i.mode,d=Ec({mode:"visible",children:d.children},g),L=Ui(L,g,o,null),L.flags|=2,d.return=i,L.return=i,d.sibling=L,i.child=d,Vi(i,r.child,null,o),d=i.child,d.memoizedState=vd(o),d.childLanes=yd(r,T,o),i.memoizedState=bd,i=Fl(null,d));else if(ii(i),tf(L)){if(T=L.nextSibling&&L.nextSibling.dataset,T)var fe=T.dgst;T=fe,d=Error(a(419)),d.stack="",d.digest=T,_l({value:d,source:null,stack:null}),i=wd(r,i,o)}else if(Mn||Ts(r,i,o,!1),T=(o&r.childLanes)!==0,Mn||T){if(T=nn,T!==null&&(d=wt(T,o),d!==0&&d!==J.retryLane))throw J.retryLane=d,Bi(r,d),yr(T,r,d),pd;ef(L)||Oc(),i=wd(r,i,o)}else ef(L)?(i.flags|=192,i.child=r.child,i=null):(r=J.treeContext,on=Vr(L.nextSibling),Yn=i,zt=!0,Ja=null,$r=!1,r!==null&&d1(i,r),i=xd(i,d.children),i.flags|=4096);return i}return g?(si(),L=d.fallback,g=i.mode,J=r.child,fe=J.sibling,d=xa(J,{mode:"hidden",children:d.children}),d.subtreeFlags=J.subtreeFlags&65011712,fe!==null?L=xa(fe,L):(L=Ui(L,g,o,null),L.flags|=2),L.return=i,d.return=i,d.sibling=L,i.child=d,Fl(null,d),d=i.child,L=r.child.memoizedState,L===null?L=vd(o):(g=L.cachePool,g!==null?(J=_n._currentValue,g=g.parent!==J?{parent:J,pool:J}:g):g=b1(),L={baseLanes:L.baseLanes|o,cachePool:g}),d.memoizedState=L,d.childLanes=yd(r,T,o),i.memoizedState=bd,Fl(r.child,d)):(ii(i),o=r.child,r=o.sibling,o=xa(o,{mode:"visible",children:d.children}),o.return=i,o.sibling=null,r!==null&&(T=i.deletions,T===null?(i.deletions=[r],i.flags|=16):T.push(r)),i.child=o,i.memoizedState=null,o)}function xd(r,i){return i=Ec({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function Ec(r,i){return r=Nr(22,r,null,i),r.lanes=0,r}function wd(r,i,o){return Vi(i,r.child,null,o),r=xd(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function _g(r,i,o){r.lanes|=i;var d=r.alternate;d!==null&&(d.lanes|=i),L0(r.return,i,o)}function Sd(r,i,o,d,g,v){var T=r.memoizedState;T===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:g,treeForkCount:v}:(T.isBackwards=i,T.rendering=null,T.renderingStartTime=0,T.last=d,T.tail=o,T.tailMode=g,T.treeForkCount=v)}function Ig(r,i,o){var d=i.pendingProps,g=d.revealOrder,v=d.tail;d=d.children;var T=Tn.current,L=(T&2)!==0;if(L?(T=T&1|2,i.flags|=128):T&=1,A(Tn,T),Zn(r,i,d,o),d=zt?Al:0,!L&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&_g(r,o,i);else if(r.tag===19)_g(r,o,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(g){case"forwards":for(o=i.child,g=null;o!==null;)r=o.alternate,r!==null&&fc(r)===null&&(g=o),o=o.sibling;o=g,o===null?(g=i.child,i.child=null):(g=o.sibling,o.sibling=null),Sd(i,!1,g,o,v,d);break;case"backwards":case"unstable_legacy-backwards":for(o=null,g=i.child,i.child=null;g!==null;){if(r=g.alternate,r!==null&&fc(r)===null){i.child=g;break}r=g.sibling,g.sibling=o,o=g,g=r}Sd(i,!0,o,null,v,d);break;case"together":Sd(i,!1,null,null,void 0,d);break;default:i.memoizedState=null}return i.child}function Na(r,i,o){if(r!==null&&(i.dependencies=r.dependencies),ci|=i.lanes,(o&i.childLanes)===0)if(r!==null){if(Ts(r,i,o,!1),(o&i.childLanes)===0)return null}else return null;if(r!==null&&i.child!==r.child)throw Error(a(153));if(i.child!==null){for(r=i.child,o=xa(r,r.pendingProps),i.child=o,o.return=i;r.sibling!==null;)r=r.sibling,o=o.sibling=xa(r,r.pendingProps),o.return=i;o.sibling=null}return i.child}function kd(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&ac(r)))}function i7(r,i,o){switch(i.tag){case 3:ce(i,i.stateNode.containerInfo),ti(i,_n,r.memoizedState.cache),qi();break;case 27:case 5:Re(i);break;case 4:ce(i,i.stateNode.containerInfo);break;case 10:ti(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Y0(i),null;break;case 13:var d=i.memoizedState;if(d!==null)return d.dehydrated!==null?(ii(i),i.flags|=128,null):(o&i.child.childLanes)!==0?Ag(r,i,o):(ii(i),r=Na(r,i,o),r!==null?r.sibling:null);ii(i);break;case 19:var g=(r.flags&128)!==0;if(d=(o&i.childLanes)!==0,d||(Ts(r,i,o,!1),d=(o&i.childLanes)!==0),g){if(d)return Ig(r,i,o);i.flags|=128}if(g=i.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),A(Tn,Tn.current),d)break;return null;case 22:return i.lanes=0,kg(r,i,o,i.pendingProps);case 24:ti(i,_n,r.memoizedState.cache)}return Na(r,i,o)}function Mg(r,i,o){if(r!==null)if(r.memoizedProps!==i.pendingProps)Mn=!0;else{if(!kd(r,o)&&(i.flags&128)===0)return Mn=!1,i7(r,i,o);Mn=(r.flags&131072)!==0}else Mn=!1,zt&&(i.flags&1048576)!==0&&u1(i,Al,i.index);switch(i.lanes=0,i.tag){case 16:e:{var d=i.pendingProps;if(r=$i(i.elementType),i.type=r,typeof r=="function")R0(r)?(d=Yi(r,d),i.tag=1,i=Cg(null,i,r,d,o)):(i.tag=0,i=gd(null,i,r,d,o));else{if(r!=null){var g=r.$$typeof;if(g===$){i.tag=11,i=xg(null,i,r,d,o);break e}else if(g===B){i.tag=14,i=wg(null,i,r,d,o);break e}}throw i=K(r)||r,Error(a(306,i,""))}}return i;case 0:return gd(r,i,i.type,i.pendingProps,o);case 1:return d=i.type,g=Yi(d,i.pendingProps),Cg(r,i,d,g,o);case 3:e:{if(ce(i,i.stateNode.containerInfo),r===null)throw Error(a(387));d=i.pendingProps;var v=i.memoizedState;g=v.element,P0(r,i),zl(i,d,null,o);var T=i.memoizedState;if(d=T.cache,ti(i,_n,d),d!==v.cache&&z0(i,[_n],o,!0),Ll(),d=T.element,v.isDehydrated)if(v={element:d,isDehydrated:!1,cache:T.cache},i.updateQueue.baseState=v,i.memoizedState=v,i.flags&256){i=Rg(r,i,d,o);break e}else if(d!==g){g=Hr(Error(a(424)),i),_l(g),i=Rg(r,i,d,o);break e}else for(r=i.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,on=Vr(r.firstChild),Yn=i,zt=!0,Ja=null,$r=!0,o=k1(i,null,d,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(qi(),d===g){i=Na(r,i,o);break e}Zn(r,i,d,o)}i=i.child}return i;case 26:return kc(r,i),r===null?(o=Pb(i.type,null,i.pendingProps,null))?i.memoizedState=o:zt||(o=i.type,r=i.pendingProps,d=qc(ne.current).createElement(o),d[Pt]=i,d[kn]=r,Wn(d,o,r),Rn(d),i.stateNode=d):i.memoizedState=Pb(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return Re(i),r===null&&zt&&(d=i.stateNode=qb(i.type,i.pendingProps,ne.current),Yn=i,$r=!0,g=on,hi(i.type)?(nf=g,on=Vr(d.firstChild)):on=g),Zn(r,i,i.pendingProps.children,o),kc(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&zt&&((g=d=on)&&(d=j7(d,i.type,i.pendingProps,$r),d!==null?(i.stateNode=d,Yn=i,on=Vr(d.firstChild),$r=!1,g=!0):g=!1),g||ei(i)),Re(i),g=i.type,v=i.pendingProps,T=r!==null?r.memoizedProps:null,d=v.children,Wd(g,v)?d=null:T!==null&&Wd(g,T)&&(i.flags|=32),i.memoizedState!==null&&(g=Z0(r,i,Zx,null,null,o),ro._currentValue=g),kc(r,i),Zn(r,i,d,o),i.child;case 6:return r===null&&zt&&((r=o=on)&&(o=L7(o,i.pendingProps,$r),o!==null?(i.stateNode=o,Yn=i,on=null,r=!0):r=!1),r||ei(i)),null;case 13:return Ag(r,i,o);case 4:return ce(i,i.stateNode.containerInfo),d=i.pendingProps,r===null?i.child=Vi(i,null,d,o):Zn(r,i,d,o),i.child;case 11:return xg(r,i,i.type,i.pendingProps,o);case 7:return Zn(r,i,i.pendingProps,o),i.child;case 8:return Zn(r,i,i.pendingProps.children,o),i.child;case 12:return Zn(r,i,i.pendingProps.children,o),i.child;case 10:return d=i.pendingProps,ti(i,i.type,d.value),Zn(r,i,d.children,o),i.child;case 9:return g=i.type._context,d=i.pendingProps.children,Fi(i),g=Xn(g),d=d(g),i.flags|=1,Zn(r,i,d,o),i.child;case 14:return wg(r,i,i.type,i.pendingProps,o);case 15:return Sg(r,i,i.type,i.pendingProps,o);case 19:return Ig(r,i,o);case 31:return a7(r,i,o);case 22:return kg(r,i,o,i.pendingProps);case 24:return Fi(i),d=Xn(_n),r===null?(g=q0(),g===null&&(g=nn,v=B0(),g.pooledCache=v,v.refCount++,v!==null&&(g.pooledCacheLanes|=o),g=v),i.memoizedState={parent:d,cache:g},F0(i),ti(i,_n,g)):((r.lanes&o)!==0&&(P0(r,i),zl(i,null,null,o),Ll()),g=r.memoizedState,v=i.memoizedState,g.parent!==d?(g={parent:d,cache:d},i.memoizedState=g,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=g),ti(i,_n,d)):(d=v.cache,ti(i,_n,d),d!==g.cache&&z0(i,[_n],o,!0))),Zn(r,i,i.pendingProps.children,o),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Ca(r){r.flags|=4}function Ed(r,i,o,d,g){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(g&335544128)===g)if(r.stateNode.complete)r.flags|=8192;else if(ib())r.flags|=8192;else throw Gi=oc,H0}else r.flags&=-16777217}function Og(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Yb(i))if(ib())r.flags|=8192;else throw Gi=oc,H0}function Tc(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?Ze():536870912,r.lanes|=i,zs|=i)}function Pl(r,i){if(!zt)switch(r.tailMode){case"hidden":i=r.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?r.tail=null:o.sibling=null;break;case"collapsed":o=r.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function cn(r){var i=r.alternate!==null&&r.alternate.child===r.child,o=0,d=0;if(i)for(var g=r.child;g!==null;)o|=g.lanes|g.childLanes,d|=g.subtreeFlags&65011712,d|=g.flags&65011712,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)o|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=d,r.childLanes=o,i}function s7(r,i,o){var d=i.pendingProps;switch(M0(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return cn(i),null;case 1:return cn(i),null;case 3:return o=i.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),i.memoizedState.cache!==d&&(i.flags|=2048),ka(_n),ge(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(r===null||r.child===null)&&(Es(i)?Ca(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,D0())),cn(i),null;case 26:var g=i.type,v=i.memoizedState;return r===null?(Ca(i),v!==null?(cn(i),Og(i,v)):(cn(i),Ed(i,g,null,d,o))):v?v!==r.memoizedState?(Ca(i),cn(i),Og(i,v)):(cn(i),i.flags&=-16777217):(r=r.memoizedProps,r!==d&&Ca(i),cn(i),Ed(i,g,r,d,o)),null;case 27:if(je(i),o=ne.current,g=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&Ca(i);else{if(!d){if(i.stateNode===null)throw Error(a(166));return cn(i),null}r=ae.current,Es(i)?f1(i):(r=qb(g,d,o),i.stateNode=r,Ca(i))}return cn(i),null;case 5:if(je(i),g=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&Ca(i);else{if(!d){if(i.stateNode===null)throw Error(a(166));return cn(i),null}if(v=ae.current,Es(i))f1(i);else{var T=qc(ne.current);switch(v){case 1:v=T.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:v=T.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":v=T.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":v=T.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":v=T.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof d.is=="string"?T.createElement("select",{is:d.is}):T.createElement("select"),d.multiple?v.multiple=!0:d.size&&(v.size=d.size);break;default:v=typeof d.is=="string"?T.createElement(g,{is:d.is}):T.createElement(g)}}v[Pt]=i,v[kn]=d;e:for(T=i.child;T!==null;){if(T.tag===5||T.tag===6)v.appendChild(T.stateNode);else if(T.tag!==4&&T.tag!==27&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===i)break e;for(;T.sibling===null;){if(T.return===null||T.return===i)break e;T=T.return}T.sibling.return=T.return,T=T.sibling}i.stateNode=v;e:switch(Wn(v,g,d),g){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&Ca(i)}}return cn(i),Ed(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,o),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==d&&Ca(i);else{if(typeof d!="string"&&i.stateNode===null)throw Error(a(166));if(r=ne.current,Es(i)){if(r=i.stateNode,o=i.memoizedProps,d=null,g=Yn,g!==null)switch(g.tag){case 27:case 5:d=g.memoizedProps}r[Pt]=i,r=!!(r.nodeValue===o||d!==null&&d.suppressHydrationWarning===!0||Ab(r.nodeValue,o)),r||ei(i,!0)}else r=qc(r).createTextNode(d),r[Pt]=i,i.stateNode=r}return cn(i),null;case 31:if(o=i.memoizedState,r===null||r.memoizedState!==null){if(d=Es(i),o!==null){if(r===null){if(!d)throw Error(a(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[Pt]=i}else qi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;cn(i),r=!1}else o=D0(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=o),r=!0;if(!r)return i.flags&256?(Rr(i),i):(Rr(i),null);if((i.flags&128)!==0)throw Error(a(558))}return cn(i),null;case 13:if(d=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(g=Es(i),d!==null&&d.dehydrated!==null){if(r===null){if(!g)throw Error(a(318));if(g=i.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(a(317));g[Pt]=i}else qi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;cn(i),g=!1}else g=D0(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=g),g=!0;if(!g)return i.flags&256?(Rr(i),i):(Rr(i),null)}return Rr(i),(i.flags&128)!==0?(i.lanes=o,i):(o=d!==null,r=r!==null&&r.memoizedState!==null,o&&(d=i.child,g=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(g=d.alternate.memoizedState.cachePool.pool),v=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(v=d.memoizedState.cachePool.pool),v!==g&&(d.flags|=2048)),o!==r&&o&&(i.child.flags|=8192),Tc(i,i.updateQueue),cn(i),null);case 4:return ge(),r===null&&Vd(i.stateNode.containerInfo),cn(i),null;case 10:return ka(i.type),cn(i),null;case 19:if(q(Tn),d=i.memoizedState,d===null)return cn(i),null;if(g=(i.flags&128)!==0,v=d.rendering,v===null)if(g)Pl(d,!1);else{if(yn!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(v=fc(r),v!==null){for(i.flags|=128,Pl(d,!1),r=v.updateQueue,i.updateQueue=r,Tc(i,r),i.subtreeFlags=0,r=o,o=i.child;o!==null;)l1(o,r),o=o.sibling;return A(Tn,Tn.current&1|2),zt&&wa(i,d.treeForkCount),i.child}r=r.sibling}d.tail!==null&&Je()>_c&&(i.flags|=128,g=!0,Pl(d,!1),i.lanes=4194304)}else{if(!g)if(r=fc(v),r!==null){if(i.flags|=128,g=!0,r=r.updateQueue,i.updateQueue=r,Tc(i,r),Pl(d,!0),d.tail===null&&d.tailMode==="hidden"&&!v.alternate&&!zt)return cn(i),null}else 2*Je()-d.renderingStartTime>_c&&o!==536870912&&(i.flags|=128,g=!0,Pl(d,!1),i.lanes=4194304);d.isBackwards?(v.sibling=i.child,i.child=v):(r=d.last,r!==null?r.sibling=v:i.child=v,d.last=v)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=Je(),r.sibling=null,o=Tn.current,A(Tn,g?o&1|2:o&1),zt&&wa(i,d.treeForkCount),r):(cn(i),null);case 22:case 23:return Rr(i),K0(),d=i.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(i.flags|=8192):d&&(i.flags|=8192),d?(o&536870912)!==0&&(i.flags&128)===0&&(cn(i),i.subtreeFlags&6&&(i.flags|=8192)):cn(i),o=i.updateQueue,o!==null&&Tc(i,o.retryQueue),o=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==o&&(i.flags|=2048),r!==null&&q(Pi),null;case 24:return o=null,r!==null&&(o=r.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),ka(_n),cn(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function l7(r,i){switch(M0(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return ka(_n),ge(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return je(i),null;case 31:if(i.memoizedState!==null){if(Rr(i),i.alternate===null)throw Error(a(340));qi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(Rr(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));qi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return q(Tn),null;case 4:return ge(),null;case 10:return ka(i.type),null;case 22:case 23:return Rr(i),K0(),r!==null&&q(Pi),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return ka(_n),null;case 25:return null;default:return null}}function Dg(r,i){switch(M0(i),i.tag){case 3:ka(_n),ge();break;case 26:case 27:case 5:je(i);break;case 4:ge();break;case 31:i.memoizedState!==null&&Rr(i);break;case 13:Rr(i);break;case 19:q(Tn);break;case 10:ka(i.type);break;case 22:case 23:Rr(i),K0(),r!==null&&q(Pi);break;case 24:ka(_n)}}function $l(r,i){try{var o=i.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var g=d.next;o=g;do{if((o.tag&r)===r){d=void 0;var v=o.create,T=o.inst;d=v(),T.destroy=d}o=o.next}while(o!==g)}}catch(L){Wt(i,i.return,L)}}function li(r,i,o){try{var d=i.updateQueue,g=d!==null?d.lastEffect:null;if(g!==null){var v=g.next;d=v;do{if((d.tag&r)===r){var T=d.inst,L=T.destroy;if(L!==void 0){T.destroy=void 0,g=i;var J=o,fe=L;try{fe()}catch(xe){Wt(g,J,xe)}}}d=d.next}while(d!==v)}}catch(xe){Wt(i,i.return,xe)}}function jg(r){var i=r.updateQueue;if(i!==null){var o=r.stateNode;try{T1(i,o)}catch(d){Wt(r,r.return,d)}}}function Lg(r,i,o){o.props=Yi(r.type,r.memoizedProps),o.state=r.memoizedState;try{o.componentWillUnmount()}catch(d){Wt(r,i,d)}}function Gl(r,i){try{var o=r.ref;if(o!==null){switch(r.tag){case 26:case 27:case 5:var d=r.stateNode;break;case 30:d=r.stateNode;break;default:d=r.stateNode}typeof o=="function"?r.refCleanup=o(d):o.current=d}}catch(g){Wt(r,i,g)}}function ia(r,i){var o=r.ref,d=r.refCleanup;if(o!==null)if(typeof d=="function")try{d()}catch(g){Wt(r,i,g)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(g){Wt(r,i,g)}else o.current=null}function zg(r){var i=r.type,o=r.memoizedProps,d=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":o.autoFocus&&d.focus();break e;case"img":o.src?d.src=o.src:o.srcSet&&(d.srcset=o.srcSet)}}catch(g){Wt(r,r.return,g)}}function Td(r,i,o){try{var d=r.stateNode;A7(d,r.type,o,i),d[kn]=i}catch(g){Wt(r,r.return,g)}}function Bg(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&hi(r.type)||r.tag===4}function Nd(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Bg(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&hi(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Cd(r,i,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(r,i):(i=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,i.appendChild(r),o=o._reactRootContainer,o!=null||i.onclick!==null||(i.onclick=ze));else if(d!==4&&(d===27&&hi(r.type)&&(o=r.stateNode,i=null),r=r.child,r!==null))for(Cd(r,i,o),r=r.sibling;r!==null;)Cd(r,i,o),r=r.sibling}function Nc(r,i,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?o.insertBefore(r,i):o.appendChild(r);else if(d!==4&&(d===27&&hi(r.type)&&(o=r.stateNode),r=r.child,r!==null))for(Nc(r,i,o),r=r.sibling;r!==null;)Nc(r,i,o),r=r.sibling}function Ug(r){var i=r.stateNode,o=r.memoizedProps;try{for(var d=r.type,g=i.attributes;g.length;)i.removeAttributeNode(g[0]);Wn(i,d,o),i[Pt]=r,i[kn]=o}catch(v){Wt(r,r.return,v)}}var Ra=!1,On=!1,Rd=!1,qg=typeof WeakSet=="function"?WeakSet:Set,Vn=null;function o7(r,i){if(r=r.containerInfo,Xd=Kc,r=Qp(r),w0(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else e:{o=(o=r.ownerDocument)&&o.defaultView||window;var d=o.getSelection&&o.getSelection();if(d&&d.rangeCount!==0){o=d.anchorNode;var g=d.anchorOffset,v=d.focusNode;d=d.focusOffset;try{o.nodeType,v.nodeType}catch{o=null;break e}var T=0,L=-1,J=-1,fe=0,xe=0,Ee=r,me=null;t:for(;;){for(var ve;Ee!==o||g!==0&&Ee.nodeType!==3||(L=T+g),Ee!==v||d!==0&&Ee.nodeType!==3||(J=T+d),Ee.nodeType===3&&(T+=Ee.nodeValue.length),(ve=Ee.firstChild)!==null;)me=Ee,Ee=ve;for(;;){if(Ee===r)break t;if(me===o&&++fe===g&&(L=T),me===v&&++xe===d&&(J=T),(ve=Ee.nextSibling)!==null)break;Ee=me,me=Ee.parentNode}Ee=ve}o=L===-1||J===-1?null:{start:L,end:J}}else o=null}o=o||{start:0,end:0}}else o=null;for(Zd={focusedElem:r,selectionRange:o},Kc=!1,Vn=i;Vn!==null;)if(i=Vn,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,Vn=r;else for(;Vn!==null;){switch(i=Vn,v=i.alternate,r=i.flags,i.tag){case 0:if((r&4)!==0&&(r=i.updateQueue,r=r!==null?r.events:null,r!==null))for(o=0;o<r.length;o++)g=r[o],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&v!==null){r=void 0,o=i,g=v.memoizedProps,v=v.memoizedState,d=o.stateNode;try{var $e=Yi(o.type,g);r=d.getSnapshotBeforeUpdate($e,v),d.__reactInternalSnapshotBeforeUpdate=r}catch(it){Wt(o,o.return,it)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,o=r.nodeType,o===9)Jd(r);else if(o===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Jd(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=i.sibling,r!==null){r.return=i.return,Vn=r;break}Vn=i.return}}function Hg(r,i,o){var d=o.flags;switch(o.tag){case 0:case 11:case 15:_a(r,o),d&4&&$l(5,o);break;case 1:if(_a(r,o),d&4)if(r=o.stateNode,i===null)try{r.componentDidMount()}catch(T){Wt(o,o.return,T)}else{var g=Yi(o.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(g,i,r.__reactInternalSnapshotBeforeUpdate)}catch(T){Wt(o,o.return,T)}}d&64&&jg(o),d&512&&Gl(o,o.return);break;case 3:if(_a(r,o),d&64&&(r=o.updateQueue,r!==null)){if(i=null,o.child!==null)switch(o.child.tag){case 27:case 5:i=o.child.stateNode;break;case 1:i=o.child.stateNode}try{T1(r,i)}catch(T){Wt(o,o.return,T)}}break;case 27:i===null&&d&4&&Ug(o);case 26:case 5:_a(r,o),i===null&&d&4&&zg(o),d&512&&Gl(o,o.return);break;case 12:_a(r,o);break;case 31:_a(r,o),d&4&&$g(r,o);break;case 13:_a(r,o),d&4&&Gg(r,o),d&64&&(r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(o=b7.bind(null,o),z7(r,o))));break;case 22:if(d=o.memoizedState!==null||Ra,!d){i=i!==null&&i.memoizedState!==null||On,g=Ra;var v=On;Ra=d,(On=i)&&!v?Ia(r,o,(o.subtreeFlags&8772)!==0):_a(r,o),Ra=g,On=v}break;case 30:break;default:_a(r,o)}}function Fg(r){var i=r.alternate;i!==null&&(r.alternate=null,Fg(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&pl(i)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var dn=null,pr=!1;function Aa(r,i,o){for(o=o.child;o!==null;)Pg(r,i,o),o=o.sibling}function Pg(r,i,o){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(Lt,o)}catch{}switch(o.tag){case 26:On||ia(o,i),Aa(r,i,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:On||ia(o,i);var d=dn,g=pr;hi(o.type)&&(dn=o.stateNode,pr=!1),Aa(r,i,o),eo(o.stateNode),dn=d,pr=g;break;case 5:On||ia(o,i);case 6:if(d=dn,g=pr,dn=null,Aa(r,i,o),dn=d,pr=g,dn!==null)if(pr)try{(dn.nodeType===9?dn.body:dn.nodeName==="HTML"?dn.ownerDocument.body:dn).removeChild(o.stateNode)}catch(v){Wt(o,i,v)}else try{dn.removeChild(o.stateNode)}catch(v){Wt(o,i,v)}break;case 18:dn!==null&&(pr?(r=dn,jb(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,o.stateNode),Gs(r)):jb(dn,o.stateNode));break;case 4:d=dn,g=pr,dn=o.stateNode.containerInfo,pr=!0,Aa(r,i,o),dn=d,pr=g;break;case 0:case 11:case 14:case 15:li(2,o,i),On||li(4,o,i),Aa(r,i,o);break;case 1:On||(ia(o,i),d=o.stateNode,typeof d.componentWillUnmount=="function"&&Lg(o,i,d)),Aa(r,i,o);break;case 21:Aa(r,i,o);break;case 22:On=(d=On)||o.memoizedState!==null,Aa(r,i,o),On=d;break;default:Aa(r,i,o)}}function $g(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Gs(r)}catch(o){Wt(i,i.return,o)}}}function Gg(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Gs(r)}catch(o){Wt(i,i.return,o)}}function c7(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new qg),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new qg),i;default:throw Error(a(435,r.tag))}}function Cc(r,i){var o=c7(r);i.forEach(function(d){if(!o.has(d)){o.add(d);var g=v7.bind(null,r,d);d.then(g,g)}})}function gr(r,i){var o=i.deletions;if(o!==null)for(var d=0;d<o.length;d++){var g=o[d],v=r,T=i,L=T;e:for(;L!==null;){switch(L.tag){case 27:if(hi(L.type)){dn=L.stateNode,pr=!1;break e}break;case 5:dn=L.stateNode,pr=!1;break e;case 3:case 4:dn=L.stateNode.containerInfo,pr=!0;break e}L=L.return}if(dn===null)throw Error(a(160));Pg(v,T,g),dn=null,pr=!1,v=g.alternate,v!==null&&(v.return=null),g.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Vg(i,r),i=i.sibling}var Jr=null;function Vg(r,i){var o=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:gr(i,r),br(r),d&4&&(li(3,r,r.return),$l(3,r),li(5,r,r.return));break;case 1:gr(i,r),br(r),d&512&&(On||o===null||ia(o,o.return)),d&64&&Ra&&(r=r.updateQueue,r!==null&&(d=r.callbacks,d!==null&&(o=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=o===null?d:o.concat(d))));break;case 26:var g=Jr;if(gr(i,r),br(r),d&512&&(On||o===null||ia(o,o.return)),d&4){var v=o!==null?o.memoizedState:null;if(d=r.memoizedState,o===null)if(d===null)if(r.stateNode===null){e:{d=r.type,o=r.memoizedProps,g=g.ownerDocument||g;t:switch(d){case"title":v=g.getElementsByTagName("title")[0],(!v||v[Mi]||v[Pt]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=g.createElement(d),g.head.insertBefore(v,g.querySelector("head > title"))),Wn(v,d,o),v[Pt]=r,Rn(v),d=v;break e;case"link":var T=Vb("link","href",g).get(d+(o.href||""));if(T){for(var L=0;L<T.length;L++)if(v=T[L],v.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&v.getAttribute("rel")===(o.rel==null?null:o.rel)&&v.getAttribute("title")===(o.title==null?null:o.title)&&v.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){T.splice(L,1);break t}}v=g.createElement(d),Wn(v,d,o),g.head.appendChild(v);break;case"meta":if(T=Vb("meta","content",g).get(d+(o.content||""))){for(L=0;L<T.length;L++)if(v=T[L],v.getAttribute("content")===(o.content==null?null:""+o.content)&&v.getAttribute("name")===(o.name==null?null:o.name)&&v.getAttribute("property")===(o.property==null?null:o.property)&&v.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&v.getAttribute("charset")===(o.charSet==null?null:o.charSet)){T.splice(L,1);break t}}v=g.createElement(d),Wn(v,d,o),g.head.appendChild(v);break;default:throw Error(a(468,d))}v[Pt]=r,Rn(v),d=v}r.stateNode=d}else Kb(g,r.type,r.stateNode);else r.stateNode=Gb(g,d,r.memoizedProps);else v!==d?(v===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):v.count--,d===null?Kb(g,r.type,r.stateNode):Gb(g,d,r.memoizedProps)):d===null&&r.stateNode!==null&&Td(r,r.memoizedProps,o.memoizedProps)}break;case 27:gr(i,r),br(r),d&512&&(On||o===null||ia(o,o.return)),o!==null&&d&4&&Td(r,r.memoizedProps,o.memoizedProps);break;case 5:if(gr(i,r),br(r),d&512&&(On||o===null||ia(o,o.return)),r.flags&32){g=r.stateNode;try{st(g,"")}catch($e){Wt(r,r.return,$e)}}d&4&&r.stateNode!=null&&(g=r.memoizedProps,Td(r,g,o!==null?o.memoizedProps:g)),d&1024&&(Rd=!0);break;case 6:if(gr(i,r),br(r),d&4){if(r.stateNode===null)throw Error(a(162));d=r.memoizedProps,o=r.stateNode;try{o.nodeValue=d}catch($e){Wt(r,r.return,$e)}}break;case 3:if(Pc=null,g=Jr,Jr=Hc(i.containerInfo),gr(i,r),Jr=g,br(r),d&4&&o!==null&&o.memoizedState.isDehydrated)try{Gs(i.containerInfo)}catch($e){Wt(r,r.return,$e)}Rd&&(Rd=!1,Kg(r));break;case 4:d=Jr,Jr=Hc(r.stateNode.containerInfo),gr(i,r),br(r),Jr=d;break;case 12:gr(i,r),br(r);break;case 31:gr(i,r),br(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Cc(r,d)));break;case 13:gr(i,r),br(r),r.child.flags&8192&&r.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Ac=Je()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Cc(r,d)));break;case 22:g=r.memoizedState!==null;var J=o!==null&&o.memoizedState!==null,fe=Ra,xe=On;if(Ra=fe||g,On=xe||J,gr(i,r),On=xe,Ra=fe,br(r),d&8192)e:for(i=r.stateNode,i._visibility=g?i._visibility&-2:i._visibility|1,g&&(o===null||J||Ra||On||Xi(r)),o=null,i=r;;){if(i.tag===5||i.tag===26){if(o===null){J=o=i;try{if(v=J.stateNode,g)T=v.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none";else{L=J.stateNode;var Ee=J.memoizedProps.style,me=Ee!=null&&Ee.hasOwnProperty("display")?Ee.display:null;L.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch($e){Wt(J,J.return,$e)}}}else if(i.tag===6){if(o===null){J=i;try{J.stateNode.nodeValue=g?"":J.memoizedProps}catch($e){Wt(J,J.return,$e)}}}else if(i.tag===18){if(o===null){J=i;try{var ve=J.stateNode;g?Lb(ve,!0):Lb(J.stateNode,!1)}catch($e){Wt(J,J.return,$e)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===r)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;o===i&&(o=null),i=i.return}o===i&&(o=null),i.sibling.return=i.return,i=i.sibling}d&4&&(d=r.updateQueue,d!==null&&(o=d.retryQueue,o!==null&&(d.retryQueue=null,Cc(r,o))));break;case 19:gr(i,r),br(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Cc(r,d)));break;case 30:break;case 21:break;default:gr(i,r),br(r)}}function br(r){var i=r.flags;if(i&2){try{for(var o,d=r.return;d!==null;){if(Bg(d)){o=d;break}d=d.return}if(o==null)throw Error(a(160));switch(o.tag){case 27:var g=o.stateNode,v=Nd(r);Nc(r,v,g);break;case 5:var T=o.stateNode;o.flags&32&&(st(T,""),o.flags&=-33);var L=Nd(r);Nc(r,L,T);break;case 3:case 4:var J=o.stateNode.containerInfo,fe=Nd(r);Cd(r,fe,J);break;default:throw Error(a(161))}}catch(xe){Wt(r,r.return,xe)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function Kg(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;Kg(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function _a(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Hg(r,i.alternate,i),i=i.sibling}function Xi(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:li(4,i,i.return),Xi(i);break;case 1:ia(i,i.return);var o=i.stateNode;typeof o.componentWillUnmount=="function"&&Lg(i,i.return,o),Xi(i);break;case 27:eo(i.stateNode);case 26:case 5:ia(i,i.return),Xi(i);break;case 22:i.memoizedState===null&&Xi(i);break;case 30:Xi(i);break;default:Xi(i)}r=r.sibling}}function Ia(r,i,o){for(o=o&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var d=i.alternate,g=r,v=i,T=v.flags;switch(v.tag){case 0:case 11:case 15:Ia(g,v,o),$l(4,v);break;case 1:if(Ia(g,v,o),d=v,g=d.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(fe){Wt(d,d.return,fe)}if(d=v,g=d.updateQueue,g!==null){var L=d.stateNode;try{var J=g.shared.hiddenCallbacks;if(J!==null)for(g.shared.hiddenCallbacks=null,g=0;g<J.length;g++)E1(J[g],L)}catch(fe){Wt(d,d.return,fe)}}o&&T&64&&jg(v),Gl(v,v.return);break;case 27:Ug(v);case 26:case 5:Ia(g,v,o),o&&d===null&&T&4&&zg(v),Gl(v,v.return);break;case 12:Ia(g,v,o);break;case 31:Ia(g,v,o),o&&T&4&&$g(g,v);break;case 13:Ia(g,v,o),o&&T&4&&Gg(g,v);break;case 22:v.memoizedState===null&&Ia(g,v,o),Gl(v,v.return);break;case 30:break;default:Ia(g,v,o)}i=i.sibling}}function Ad(r,i){var o=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==o&&(r!=null&&r.refCount++,o!=null&&Il(o))}function _d(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Il(r))}function ea(r,i,o,d){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Yg(r,i,o,d),i=i.sibling}function Yg(r,i,o,d){var g=i.flags;switch(i.tag){case 0:case 11:case 15:ea(r,i,o,d),g&2048&&$l(9,i);break;case 1:ea(r,i,o,d);break;case 3:ea(r,i,o,d),g&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Il(r)));break;case 12:if(g&2048){ea(r,i,o,d),r=i.stateNode;try{var v=i.memoizedProps,T=v.id,L=v.onPostCommit;typeof L=="function"&&L(T,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(J){Wt(i,i.return,J)}}else ea(r,i,o,d);break;case 31:ea(r,i,o,d);break;case 13:ea(r,i,o,d);break;case 23:break;case 22:v=i.stateNode,T=i.alternate,i.memoizedState!==null?v._visibility&2?ea(r,i,o,d):Vl(r,i):v._visibility&2?ea(r,i,o,d):(v._visibility|=2,Ds(r,i,o,d,(i.subtreeFlags&10256)!==0||!1)),g&2048&&Ad(T,i);break;case 24:ea(r,i,o,d),g&2048&&_d(i.alternate,i);break;default:ea(r,i,o,d)}}function Ds(r,i,o,d,g){for(g=g&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var v=r,T=i,L=o,J=d,fe=T.flags;switch(T.tag){case 0:case 11:case 15:Ds(v,T,L,J,g),$l(8,T);break;case 23:break;case 22:var xe=T.stateNode;T.memoizedState!==null?xe._visibility&2?Ds(v,T,L,J,g):Vl(v,T):(xe._visibility|=2,Ds(v,T,L,J,g)),g&&fe&2048&&Ad(T.alternate,T);break;case 24:Ds(v,T,L,J,g),g&&fe&2048&&_d(T.alternate,T);break;default:Ds(v,T,L,J,g)}i=i.sibling}}function Vl(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var o=r,d=i,g=d.flags;switch(d.tag){case 22:Vl(o,d),g&2048&&Ad(d.alternate,d);break;case 24:Vl(o,d),g&2048&&_d(d.alternate,d);break;default:Vl(o,d)}i=i.sibling}}var Kl=8192;function js(r,i,o){if(r.subtreeFlags&Kl)for(r=r.child;r!==null;)Xg(r,i,o),r=r.sibling}function Xg(r,i,o){switch(r.tag){case 26:js(r,i,o),r.flags&Kl&&r.memoizedState!==null&&X7(o,Jr,r.memoizedState,r.memoizedProps);break;case 5:js(r,i,o);break;case 3:case 4:var d=Jr;Jr=Hc(r.stateNode.containerInfo),js(r,i,o),Jr=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=Kl,Kl=16777216,js(r,i,o),Kl=d):js(r,i,o));break;default:js(r,i,o)}}function Zg(r){var i=r.alternate;if(i!==null&&(r=i.child,r!==null)){i.child=null;do i=r.sibling,r.sibling=null,r=i;while(r!==null)}}function Yl(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var d=i[o];Vn=d,Qg(d,r)}Zg(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Wg(r),r=r.sibling}function Wg(r){switch(r.tag){case 0:case 11:case 15:Yl(r),r.flags&2048&&li(9,r,r.return);break;case 3:Yl(r);break;case 12:Yl(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,Rc(r)):Yl(r);break;default:Yl(r)}}function Rc(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var d=i[o];Vn=d,Qg(d,r)}Zg(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:li(8,i,i.return),Rc(i);break;case 22:o=i.stateNode,o._visibility&2&&(o._visibility&=-3,Rc(i));break;default:Rc(i)}r=r.sibling}}function Qg(r,i){for(;Vn!==null;){var o=Vn;switch(o.tag){case 0:case 11:case 15:li(8,o,i);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var d=o.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Il(o.memoizedState.cache)}if(d=o.child,d!==null)d.return=o,Vn=d;else e:for(o=r;Vn!==null;){d=Vn;var g=d.sibling,v=d.return;if(Fg(d),d===o){Vn=null;break e}if(g!==null){g.return=v,Vn=g;break e}Vn=v}}}var u7={getCacheForType:function(r){var i=Xn(_n),o=i.data.get(r);return o===void 0&&(o=r(),i.data.set(r,o)),o},cacheSignal:function(){return Xn(_n).controller.signal}},d7=typeof WeakMap=="function"?WeakMap:Map,$t=0,nn=null,At=null,Ot=0,Zt=0,Ar=null,oi=!1,Ls=!1,Id=!1,Ma=0,yn=0,ci=0,Zi=0,Md=0,_r=0,zs=0,Xl=null,vr=null,Od=!1,Ac=0,Jg=0,_c=1/0,Ic=null,ui=null,Hn=0,di=null,Bs=null,Oa=0,Dd=0,jd=null,eb=null,Zl=0,Ld=null;function Ir(){return($t&2)!==0&&Ot!==0?Ot&-Ot:V.T!==null?Fd():qn()}function tb(){if(_r===0)if((Ot&536870912)===0||zt){var r=gt;gt<<=1,(gt&3932160)===0&&(gt=262144),_r=r}else _r=536870912;return r=Cr.current,r!==null&&(r.flags|=32),_r}function yr(r,i,o){(r===nn&&(Zt===2||Zt===9)||r.cancelPendingCommit!==null)&&(Us(r,0),fi(r,Ot,_r,!1)),Et(r,o),(($t&2)===0||r!==nn)&&(r===nn&&(($t&2)===0&&(Zi|=o),yn===4&&fi(r,Ot,_r,!1)),sa(r))}function nb(r,i,o){if(($t&6)!==0)throw Error(a(327));var d=!o&&(i&127)===0&&(i&r.expiredLanes)===0||ye(r,i),g=d?h7(r,i):Bd(r,i,!0),v=d;do{if(g===0){Ls&&!d&&fi(r,i,0,!1);break}else{if(o=r.current.alternate,v&&!f7(o)){g=Bd(r,i,!1),v=!1;continue}if(g===2){if(v=i,r.errorRecoveryDisabledLanes&v)var T=0;else T=r.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){i=T;e:{var L=r;g=Xl;var J=L.current.memoizedState.isDehydrated;if(J&&(Us(L,T).flags|=256),T=Bd(L,T,!1),T!==2){if(Id&&!J){L.errorRecoveryDisabledLanes|=v,Zi|=v,g=4;break e}v=vr,vr=g,v!==null&&(vr===null?vr=v:vr.push.apply(vr,v))}g=T}if(v=!1,g!==2)continue}}if(g===1){Us(r,0),fi(r,i,0,!0);break}e:{switch(d=r,v=g,v){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:fi(d,i,_r,!oi);break e;case 2:vr=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(g=Ac+300-Je(),10<g)){if(fi(d,i,_r,!oi),Q(d,0,!0)!==0)break e;Oa=i,d.timeoutHandle=Ob(rb.bind(null,d,o,vr,Ic,Od,i,_r,Zi,zs,oi,v,"Throttled",-0,0),g);break e}rb(d,o,vr,Ic,Od,i,_r,Zi,zs,oi,v,null,-0,0)}}break}while(!0);sa(r)}function rb(r,i,o,d,g,v,T,L,J,fe,xe,Ee,me,ve){if(r.timeoutHandle=-1,Ee=i.subtreeFlags,Ee&8192||(Ee&16785408)===16785408){Ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ze},Xg(i,v,Ee);var $e=(v&62914560)===v?Ac-Je():(v&4194048)===v?Jg-Je():0;if($e=Z7(Ee,$e),$e!==null){Oa=v,r.cancelPendingCommit=$e(db.bind(null,r,i,v,o,d,g,T,L,J,xe,Ee,null,me,ve)),fi(r,v,T,!fe);return}}db(r,i,v,o,d,g,T,L,J)}function f7(r){for(var i=r;;){var o=i.tag;if((o===0||o===11||o===15)&&i.flags&16384&&(o=i.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var d=0;d<o.length;d++){var g=o[d],v=g.getSnapshot;g=g.value;try{if(!Tr(v(),g))return!1}catch{return!1}}if(o=i.child,i.subtreeFlags&16384&&o!==null)o.return=i,i=o;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function fi(r,i,o,d){i&=~Md,i&=~Zi,r.suspendedLanes|=i,r.pingedLanes&=~i,d&&(r.warmLanes|=i),d=r.expirationTimes;for(var g=i;0<g;){var v=31-mt(g),T=1<<v;d[v]=-1,g&=~T}o!==0&&we(r,o,i)}function Mc(){return($t&6)===0?(Wl(0),!1):!0}function zd(){if(At!==null){if(Zt===0)var r=At.return;else r=At,Sa=Hi=null,J0(r),As=null,Ol=0,r=At;for(;r!==null;)Dg(r.alternate,r),r=r.return;At=null}}function Us(r,i){var o=r.timeoutHandle;o!==-1&&(r.timeoutHandle=-1,M7(o)),o=r.cancelPendingCommit,o!==null&&(r.cancelPendingCommit=null,o()),Oa=0,zd(),nn=r,At=o=xa(r.current,null),Ot=i,Zt=0,Ar=null,oi=!1,Ls=ye(r,i),Id=!1,zs=_r=Md=Zi=ci=yn=0,vr=Xl=null,Od=!1,(i&8)!==0&&(i|=i&32);var d=r.entangledLanes;if(d!==0)for(r=r.entanglements,d&=i;0<d;){var g=31-mt(d),v=1<<g;i|=r[g],d&=~v}return Ma=i,Jo(),o}function ab(r,i){xt=null,V.H=Hl,i===Rs||i===lc?(i=x1(),Zt=3):i===H0?(i=x1(),Zt=4):Zt=i===pd?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Ar=i,At===null&&(yn=1,wc(r,Hr(i,r.current)))}function ib(){var r=Cr.current;return r===null?!0:(Ot&4194048)===Ot?Gr===null:(Ot&62914560)===Ot||(Ot&536870912)!==0?r===Gr:!1}function sb(){var r=V.H;return V.H=Hl,r===null?Hl:r}function lb(){var r=V.A;return V.A=u7,r}function Oc(){yn=4,oi||(Ot&4194048)!==Ot&&Cr.current!==null||(Ls=!0),(ci&134217727)===0&&(Zi&134217727)===0||nn===null||fi(nn,Ot,_r,!1)}function Bd(r,i,o){var d=$t;$t|=2;var g=sb(),v=lb();(nn!==r||Ot!==i)&&(Ic=null,Us(r,i)),i=!1;var T=yn;e:do try{if(Zt!==0&&At!==null){var L=At,J=Ar;switch(Zt){case 8:zd(),T=6;break e;case 3:case 2:case 9:case 6:Cr.current===null&&(i=!0);var fe=Zt;if(Zt=0,Ar=null,qs(r,L,J,fe),o&&Ls){T=0;break e}break;default:fe=Zt,Zt=0,Ar=null,qs(r,L,J,fe)}}m7(),T=yn;break}catch(xe){ab(r,xe)}while(!0);return i&&r.shellSuspendCounter++,Sa=Hi=null,$t=d,V.H=g,V.A=v,At===null&&(nn=null,Ot=0,Jo()),T}function m7(){for(;At!==null;)ob(At)}function h7(r,i){var o=$t;$t|=2;var d=sb(),g=lb();nn!==r||Ot!==i?(Ic=null,_c=Je()+500,Us(r,i)):Ls=ye(r,i);e:do try{if(Zt!==0&&At!==null){i=At;var v=Ar;t:switch(Zt){case 1:Zt=0,Ar=null,qs(r,i,v,1);break;case 2:case 9:if(v1(v)){Zt=0,Ar=null,cb(i);break}i=function(){Zt!==2&&Zt!==9||nn!==r||(Zt=7),sa(r)},v.then(i,i);break e;case 3:Zt=7;break e;case 4:Zt=5;break e;case 7:v1(v)?(Zt=0,Ar=null,cb(i)):(Zt=0,Ar=null,qs(r,i,v,7));break;case 5:var T=null;switch(At.tag){case 26:T=At.memoizedState;case 5:case 27:var L=At;if(T?Yb(T):L.stateNode.complete){Zt=0,Ar=null;var J=L.sibling;if(J!==null)At=J;else{var fe=L.return;fe!==null?(At=fe,Dc(fe)):At=null}break t}}Zt=0,Ar=null,qs(r,i,v,5);break;case 6:Zt=0,Ar=null,qs(r,i,v,6);break;case 8:zd(),yn=6;break e;default:throw Error(a(462))}}p7();break}catch(xe){ab(r,xe)}while(!0);return Sa=Hi=null,V.H=d,V.A=g,$t=o,At!==null?0:(nn=null,Ot=0,Jo(),yn)}function p7(){for(;At!==null&&!Kt();)ob(At)}function ob(r){var i=Mg(r.alternate,r,Ma);r.memoizedProps=r.pendingProps,i===null?Dc(r):At=i}function cb(r){var i=r,o=i.alternate;switch(i.tag){case 15:case 0:i=Ng(o,i,i.pendingProps,i.type,void 0,Ot);break;case 11:i=Ng(o,i,i.pendingProps,i.type.render,i.ref,Ot);break;case 5:J0(i);default:Dg(o,i),i=At=l1(i,Ma),i=Mg(o,i,Ma)}r.memoizedProps=r.pendingProps,i===null?Dc(r):At=i}function qs(r,i,o,d){Sa=Hi=null,J0(i),As=null,Ol=0;var g=i.return;try{if(r7(r,g,i,o,Ot)){yn=1,wc(r,Hr(o,r.current)),At=null;return}}catch(v){if(g!==null)throw At=g,v;yn=1,wc(r,Hr(o,r.current)),At=null;return}i.flags&32768?(zt||d===1?r=!0:Ls||(Ot&536870912)!==0?r=!1:(oi=r=!0,(d===2||d===9||d===3||d===6)&&(d=Cr.current,d!==null&&d.tag===13&&(d.flags|=16384))),ub(i,r)):Dc(i)}function Dc(r){var i=r;do{if((i.flags&32768)!==0){ub(i,oi);return}r=i.return;var o=s7(i.alternate,i,Ma);if(o!==null){At=o;return}if(i=i.sibling,i!==null){At=i;return}At=i=r}while(i!==null);yn===0&&(yn=5)}function ub(r,i){do{var o=l7(r.alternate,r);if(o!==null){o.flags&=32767,At=o;return}if(o=r.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!i&&(r=r.sibling,r!==null)){At=r;return}At=r=o}while(r!==null);yn=6,At=null}function db(r,i,o,d,g,v,T,L,J){r.cancelPendingCommit=null;do jc();while(Hn!==0);if(($t&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(v=i.lanes|i.childLanes,v|=N0,ie(r,o,v,T,L,J),r===nn&&(At=nn=null,Ot=0),Bs=i,di=r,Oa=o,Dd=v,jd=g,eb=d,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,y7(Fe,function(){return gb(),null})):(r.callbackNode=null,r.callbackPriority=0),d=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||d){d=V.T,V.T=null,g=re.p,re.p=2,T=$t,$t|=4;try{o7(r,i,o)}finally{$t=T,re.p=g,V.T=d}}Hn=1,fb(),mb(),hb()}}function fb(){if(Hn===1){Hn=0;var r=di,i=Bs,o=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||o){o=V.T,V.T=null;var d=re.p;re.p=2;var g=$t;$t|=4;try{Vg(i,r);var v=Zd,T=Qp(r.containerInfo),L=v.focusedElem,J=v.selectionRange;if(T!==L&&L&&L.ownerDocument&&Wp(L.ownerDocument.documentElement,L)){if(J!==null&&w0(L)){var fe=J.start,xe=J.end;if(xe===void 0&&(xe=fe),"selectionStart"in L)L.selectionStart=fe,L.selectionEnd=Math.min(xe,L.value.length);else{var Ee=L.ownerDocument||document,me=Ee&&Ee.defaultView||window;if(me.getSelection){var ve=me.getSelection(),$e=L.textContent.length,it=Math.min(J.start,$e),en=J.end===void 0?it:Math.min(J.end,$e);!ve.extend&&it>en&&(T=en,en=it,it=T);var oe=Zp(L,it),se=Zp(L,en);if(oe&&se&&(ve.rangeCount!==1||ve.anchorNode!==oe.node||ve.anchorOffset!==oe.offset||ve.focusNode!==se.node||ve.focusOffset!==se.offset)){var de=Ee.createRange();de.setStart(oe.node,oe.offset),ve.removeAllRanges(),it>en?(ve.addRange(de),ve.extend(se.node,se.offset)):(de.setEnd(se.node,se.offset),ve.addRange(de))}}}}for(Ee=[],ve=L;ve=ve.parentNode;)ve.nodeType===1&&Ee.push({element:ve,left:ve.scrollLeft,top:ve.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<Ee.length;L++){var ke=Ee[L];ke.element.scrollLeft=ke.left,ke.element.scrollTop=ke.top}}Kc=!!Xd,Zd=Xd=null}finally{$t=g,re.p=d,V.T=o}}r.current=i,Hn=2}}function mb(){if(Hn===2){Hn=0;var r=di,i=Bs,o=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||o){o=V.T,V.T=null;var d=re.p;re.p=2;var g=$t;$t|=4;try{Hg(r,i.alternate,i)}finally{$t=g,re.p=d,V.T=o}}Hn=3}}function hb(){if(Hn===4||Hn===3){Hn=0,hn();var r=di,i=Bs,o=Oa,d=eb;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Hn=5:(Hn=0,Bs=di=null,pb(r,r.pendingLanes));var g=r.pendingLanes;if(g===0&&(ui=null),Sn(o),i=i.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(Lt,i,void 0,(i.current.flags&128)===128)}catch{}if(d!==null){i=V.T,g=re.p,re.p=2,V.T=null;try{for(var v=r.onRecoverableError,T=0;T<d.length;T++){var L=d[T];v(L.value,{componentStack:L.stack})}}finally{V.T=i,re.p=g}}(Oa&3)!==0&&jc(),sa(r),g=r.pendingLanes,(o&261930)!==0&&(g&42)!==0?r===Ld?Zl++:(Zl=0,Ld=r):Zl=0,Wl(0)}}function pb(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,Il(i)))}function jc(){return fb(),mb(),hb(),gb()}function gb(){if(Hn!==5)return!1;var r=di,i=Dd;Dd=0;var o=Sn(Oa),d=V.T,g=re.p;try{re.p=32>o?32:o,V.T=null,o=jd,jd=null;var v=di,T=Oa;if(Hn=0,Bs=di=null,Oa=0,($t&6)!==0)throw Error(a(331));var L=$t;if($t|=4,Wg(v.current),Yg(v,v.current,T,o),$t=L,Wl(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(Lt,v)}catch{}return!0}finally{re.p=g,V.T=d,pb(r,i)}}function bb(r,i,o){i=Hr(o,i),i=hd(r.stateNode,i,2),r=ai(r,i,2),r!==null&&(Et(r,2),sa(r))}function Wt(r,i,o){if(r.tag===3)bb(r,r,o);else for(;i!==null;){if(i.tag===3){bb(i,r,o);break}else if(i.tag===1){var d=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(ui===null||!ui.has(d))){r=Hr(o,r),o=vg(2),d=ai(i,o,2),d!==null&&(yg(o,d,i,r),Et(d,2),sa(d));break}}i=i.return}}function Ud(r,i,o){var d=r.pingCache;if(d===null){d=r.pingCache=new d7;var g=new Set;d.set(i,g)}else g=d.get(i),g===void 0&&(g=new Set,d.set(i,g));g.has(o)||(Id=!0,g.add(o),r=g7.bind(null,r,i,o),i.then(r,r))}function g7(r,i,o){var d=r.pingCache;d!==null&&d.delete(i),r.pingedLanes|=r.suspendedLanes&o,r.warmLanes&=~o,nn===r&&(Ot&o)===o&&(yn===4||yn===3&&(Ot&62914560)===Ot&&300>Je()-Ac?($t&2)===0&&Us(r,0):Md|=o,zs===Ot&&(zs=0)),sa(r)}function vb(r,i){i===0&&(i=Ze()),r=Bi(r,i),r!==null&&(Et(r,i),sa(r))}function b7(r){var i=r.memoizedState,o=0;i!==null&&(o=i.retryLane),vb(r,o)}function v7(r,i){var o=0;switch(r.tag){case 31:case 13:var d=r.stateNode,g=r.memoizedState;g!==null&&(o=g.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error(a(314))}d!==null&&d.delete(i),vb(r,o)}function y7(r,i){return Ge(r,i)}var Lc=null,Hs=null,qd=!1,zc=!1,Hd=!1,mi=0;function sa(r){r!==Hs&&r.next===null&&(Hs===null?Lc=Hs=r:Hs=Hs.next=r),zc=!0,qd||(qd=!0,w7())}function Wl(r,i){if(!Hd&&zc){Hd=!0;do for(var o=!1,d=Lc;d!==null;){if(r!==0){var g=d.pendingLanes;if(g===0)var v=0;else{var T=d.suspendedLanes,L=d.pingedLanes;v=(1<<31-mt(42|r)+1)-1,v&=g&~(T&~L),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(o=!0,Sb(d,v))}else v=Ot,v=Q(d,d===nn?v:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(v&3)===0||ye(d,v)||(o=!0,Sb(d,v));d=d.next}while(o);Hd=!1}}function x7(){yb()}function yb(){zc=qd=!1;var r=0;mi!==0&&I7()&&(r=mi);for(var i=Je(),o=null,d=Lc;d!==null;){var g=d.next,v=xb(d,i);v===0?(d.next=null,o===null?Lc=g:o.next=g,g===null&&(Hs=o)):(o=d,(r!==0||(v&3)!==0)&&(zc=!0)),d=g}Hn!==0&&Hn!==5||Wl(r),mi!==0&&(mi=0)}function xb(r,i){for(var o=r.suspendedLanes,d=r.pingedLanes,g=r.expirationTimes,v=r.pendingLanes&-62914561;0<v;){var T=31-mt(v),L=1<<T,J=g[T];J===-1?((L&o)===0||(L&d)!==0)&&(g[T]=Le(L,i)):J<=i&&(r.expiredLanes|=L),v&=~L}if(i=nn,o=Ot,o=Q(r,r===i?o:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,o===0||r===i&&(Zt===2||Zt===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&Bt(d),r.callbackNode=null,r.callbackPriority=0;if((o&3)===0||ye(r,o)){if(i=o&-o,i===r.callbackPriority)return i;switch(d!==null&&Bt(d),Sn(o)){case 2:case 8:o=Se;break;case 32:o=Fe;break;case 268435456:o=He;break;default:o=Fe}return d=wb.bind(null,r),o=Ge(o,d),r.callbackPriority=i,r.callbackNode=o,i}return d!==null&&d!==null&&Bt(d),r.callbackPriority=2,r.callbackNode=null,2}function wb(r,i){if(Hn!==0&&Hn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var o=r.callbackNode;if(jc()&&r.callbackNode!==o)return null;var d=Ot;return d=Q(r,r===nn?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(nb(r,d,i),xb(r,Je()),r.callbackNode!=null&&r.callbackNode===o?wb.bind(null,r):null)}function Sb(r,i){if(jc())return null;nb(r,i,!0)}function w7(){O7(function(){($t&6)!==0?Ge(pe,x7):yb()})}function Fd(){if(mi===0){var r=Ns;r===0&&(r=Ke,Ke<<=1,(Ke&261888)===0&&(Ke=256)),mi=r}return mi}function kb(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Za(""+r)}function Eb(r,i){var o=i.ownerDocument.createElement("input");return o.name=i.name,o.value=i.value,r.id&&o.setAttribute("form",r.id),i.parentNode.insertBefore(o,i),r=new FormData(r),o.parentNode.removeChild(o),r}function S7(r,i,o,d,g){if(i==="submit"&&o&&o.stateNode===g){var v=kb((g[kn]||null).action),T=d.submitter;T&&(i=(i=T[kn]||null)?kb(i.formAction):T.getAttribute("formAction"),i!==null&&(v=i,T=null));var L=new Xo("action","action",null,d,g);r.push({event:L,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(mi!==0){var J=T?Eb(g,T):new FormData(g);od(o,{pending:!0,data:J,method:g.method,action:v},null,J)}}else typeof v=="function"&&(L.preventDefault(),J=T?Eb(g,T):new FormData(g),od(o,{pending:!0,data:J,method:g.method,action:v},v,J))},currentTarget:g}]})}}for(var Pd=0;Pd<T0.length;Pd++){var $d=T0[Pd],k7=$d.toLowerCase(),E7=$d[0].toUpperCase()+$d.slice(1);Qr(k7,"on"+E7)}Qr(t1,"onAnimationEnd"),Qr(n1,"onAnimationIteration"),Qr(r1,"onAnimationStart"),Qr("dblclick","onDoubleClick"),Qr("focusin","onFocus"),Qr("focusout","onBlur"),Qr(qx,"onTransitionRun"),Qr(Hx,"onTransitionStart"),Qr(Fx,"onTransitionCancel"),Qr(a1,"onTransitionEnd"),Ae("onMouseEnter",["mouseout","mouseover"]),Ae("onMouseLeave",["mouseout","mouseover"]),Ae("onPointerEnter",["pointerout","pointerover"]),Ae("onPointerLeave",["pointerout","pointerover"]),ba("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ba("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ba("onBeforeInput",["compositionend","keypress","textInput","paste"]),ba("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ba("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ba("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ql="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(" "),T7=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ql));function Tb(r,i){i=(i&4)!==0;for(var o=0;o<r.length;o++){var d=r[o],g=d.event;d=d.listeners;e:{var v=void 0;if(i)for(var T=d.length-1;0<=T;T--){var L=d[T],J=L.instance,fe=L.currentTarget;if(L=L.listener,J!==v&&g.isPropagationStopped())break e;v=L,g.currentTarget=fe;try{v(g)}catch(xe){Qo(xe)}g.currentTarget=null,v=J}else for(T=0;T<d.length;T++){if(L=d[T],J=L.instance,fe=L.currentTarget,L=L.listener,J!==v&&g.isPropagationStopped())break e;v=L,g.currentTarget=fe;try{v(g)}catch(xe){Qo(xe)}g.currentTarget=null,v=J}}}}function _t(r,i){var o=i[hl];o===void 0&&(o=i[hl]=new Set);var d=r+"__bubble";o.has(d)||(Nb(i,r,2,!1),o.add(d))}function Gd(r,i,o){var d=0;i&&(d|=4),Nb(o,r,d,i)}var Bc="_reactListening"+Math.random().toString(36).slice(2);function Vd(r){if(!r[Bc]){r[Bc]=!0,Ho.forEach(function(o){o!=="selectionchange"&&(T7.has(o)||Gd(o,!1,r),Gd(o,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[Bc]||(i[Bc]=!0,Gd("selectionchange",!1,i))}}function Nb(r,i,o,d){switch(tv(i)){case 2:var g=J7;break;case 8:g=e8;break;default:g=of}o=g.bind(null,i,o,r),g=void 0,!f0||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(g=!0),d?g!==void 0?r.addEventListener(i,o,{capture:!0,passive:g}):r.addEventListener(i,o,!0):g!==void 0?r.addEventListener(i,o,{passive:g}):r.addEventListener(i,o,!1)}function Kd(r,i,o,d,g){var v=d;if((i&1)===0&&(i&2)===0&&d!==null)e:for(;;){if(d===null)return;var T=d.tag;if(T===3||T===4){var L=d.stateNode.containerInfo;if(L===g)break;if(T===4)for(T=d.return;T!==null;){var J=T.tag;if((J===3||J===4)&&T.stateNode.containerInfo===g)return;T=T.return}for(;L!==null;){if(T=ir(L),T===null)return;if(J=T.tag,J===5||J===6||J===26||J===27){d=v=T;continue e}L=L.parentNode}}d=d.return}Go(function(){var fe=v,xe=bt(o),Ee=[];e:{var me=i1.get(r);if(me!==void 0){var ve=Xo,$e=r;switch(r){case"keypress":if(Ko(o)===0)break e;case"keydown":case"keyup":ve=vx;break;case"focusin":$e="focus",ve=g0;break;case"focusout":$e="blur",ve=g0;break;case"beforeblur":case"afterblur":ve=g0;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ve=Dp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=sx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=wx;break;case t1:case n1:case r1:ve=cx;break;case a1:ve=kx;break;case"scroll":case"scrollend":ve=ax;break;case"wheel":ve=Tx;break;case"copy":case"cut":case"paste":ve=dx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=Lp;break;case"toggle":case"beforetoggle":ve=Cx}var it=(i&4)!==0,en=!it&&(r==="scroll"||r==="scrollend"),oe=it?me!==null?me+"Capture":null:me;it=[];for(var se=fe,de;se!==null;){var ke=se;if(de=ke.stateNode,ke=ke.tag,ke!==5&&ke!==26&&ke!==27||de===null||oe===null||(ke=xl(se,oe),ke!=null&&it.push(Jl(se,ke,de))),en)break;se=se.return}0<it.length&&(me=new ve(me,$e,null,o,xe),Ee.push({event:me,listeners:it}))}}if((i&7)===0){e:{if(me=r==="mouseover"||r==="pointerover",ve=r==="mouseout"||r==="pointerout",me&&o!==Ye&&($e=o.relatedTarget||o.fromElement)&&(ir($e)||$e[Va]))break e;if((ve||me)&&(me=xe.window===xe?xe:(me=xe.ownerDocument)?me.defaultView||me.parentWindow:window,ve?($e=o.relatedTarget||o.toElement,ve=fe,$e=$e?ir($e):null,$e!==null&&(en=l($e),it=$e.tag,$e!==en||it!==5&&it!==27&&it!==6)&&($e=null)):(ve=null,$e=fe),ve!==$e)){if(it=Dp,ke="onMouseLeave",oe="onMouseEnter",se="mouse",(r==="pointerout"||r==="pointerover")&&(it=Lp,ke="onPointerLeave",oe="onPointerEnter",se="pointer"),en=ve==null?me:Ka(ve),de=$e==null?me:Ka($e),me=new it(ke,se+"leave",ve,o,xe),me.target=en,me.relatedTarget=de,ke=null,ir(xe)===fe&&(it=new it(oe,se+"enter",$e,o,xe),it.target=de,it.relatedTarget=en,ke=it),en=ke,ve&&$e)t:{for(it=N7,oe=ve,se=$e,de=0,ke=oe;ke;ke=it(ke))de++;ke=0;for(var et=se;et;et=it(et))ke++;for(;0<de-ke;)oe=it(oe),de--;for(;0<ke-de;)se=it(se),ke--;for(;de--;){if(oe===se||se!==null&&oe===se.alternate){it=oe;break t}oe=it(oe),se=it(se)}it=null}else it=null;ve!==null&&Cb(Ee,me,ve,it,!1),$e!==null&&en!==null&&Cb(Ee,en,$e,it,!0)}}e:{if(me=fe?Ka(fe):window,ve=me.nodeName&&me.nodeName.toLowerCase(),ve==="select"||ve==="input"&&me.type==="file")var qt=$p;else if(Fp(me))if(Gp)qt=zx;else{qt=jx;var Xe=Dx}else ve=me.nodeName,!ve||ve.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?fe&&Xa(fe.elementType)&&(qt=$p):qt=Lx;if(qt&&(qt=qt(r,fe))){Pp(Ee,qt,o,xe);break e}Xe&&Xe(r,me,fe),r==="focusout"&&fe&&me.type==="number"&&fe.memoizedProps.value!=null&&ps(me,"number",me.value)}switch(Xe=fe?Ka(fe):window,r){case"focusin":(Fp(Xe)||Xe.contentEditable==="true")&&(vs=Xe,S0=fe,Rl=null);break;case"focusout":Rl=S0=vs=null;break;case"mousedown":k0=!0;break;case"contextmenu":case"mouseup":case"dragend":k0=!1,Jp(Ee,o,xe);break;case"selectionchange":if(Ux)break;case"keydown":case"keyup":Jp(Ee,o,xe)}var St;if(v0)e:{switch(r){case"compositionstart":var Dt="onCompositionStart";break e;case"compositionend":Dt="onCompositionEnd";break e;case"compositionupdate":Dt="onCompositionUpdate";break e}Dt=void 0}else bs?qp(r,o)&&(Dt="onCompositionEnd"):r==="keydown"&&o.keyCode===229&&(Dt="onCompositionStart");Dt&&(zp&&o.locale!=="ko"&&(bs||Dt!=="onCompositionStart"?Dt==="onCompositionEnd"&&bs&&(St=Mp()):(Wa=xe,m0="value"in Wa?Wa.value:Wa.textContent,bs=!0)),Xe=Uc(fe,Dt),0<Xe.length&&(Dt=new jp(Dt,r,null,o,xe),Ee.push({event:Dt,listeners:Xe}),St?Dt.data=St:(St=Hp(o),St!==null&&(Dt.data=St)))),(St=Ax?_x(r,o):Ix(r,o))&&(Dt=Uc(fe,"onBeforeInput"),0<Dt.length&&(Xe=new jp("onBeforeInput","beforeinput",null,o,xe),Ee.push({event:Xe,listeners:Dt}),Xe.data=St)),S7(Ee,r,fe,o,xe)}Tb(Ee,i)})}function Jl(r,i,o){return{instance:r,listener:i,currentTarget:o}}function Uc(r,i){for(var o=i+"Capture",d=[];r!==null;){var g=r,v=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||v===null||(g=xl(r,o),g!=null&&d.unshift(Jl(r,g,v)),g=xl(r,i),g!=null&&d.push(Jl(r,g,v))),r.tag===3)return d;r=r.return}return[]}function N7(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Cb(r,i,o,d,g){for(var v=i._reactName,T=[];o!==null&&o!==d;){var L=o,J=L.alternate,fe=L.stateNode;if(L=L.tag,J!==null&&J===d)break;L!==5&&L!==26&&L!==27||fe===null||(J=fe,g?(fe=xl(o,v),fe!=null&&T.unshift(Jl(o,fe,J))):g||(fe=xl(o,v),fe!=null&&T.push(Jl(o,fe,J)))),o=o.return}T.length!==0&&r.push({event:i,listeners:T})}var C7=/\r\n?/g,R7=/\u0000|\uFFFD/g;function Rb(r){return(typeof r=="string"?r:""+r).replace(C7,`
|
|
9
|
-
`).replace(R7,"")}function Ab(r,i){return i=Rb(i),Rb(r)===i}function Jt(r,i,o,d,g,v){switch(o){case"children":typeof d=="string"?i==="body"||i==="textarea"&&d===""||st(r,d):(typeof d=="number"||typeof d=="bigint")&&i!=="body"&&st(r,""+d);break;case"className":kr(r,"class",d);break;case"tabIndex":kr(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":kr(r,o,d);break;case"style":Xt(r,d,v);break;case"data":if(i!=="object"){kr(r,"data",d);break}case"src":case"href":if(d===""&&(i!=="a"||o!=="href")){r.removeAttribute(o);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(o);break}d=Za(""+d),r.setAttribute(o,d);break;case"action":case"formAction":if(typeof d=="function"){r.setAttribute(o,"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 v=="function"&&(o==="formAction"?(i!=="input"&&Jt(r,i,"name",g.name,g,null),Jt(r,i,"formEncType",g.formEncType,g,null),Jt(r,i,"formMethod",g.formMethod,g,null),Jt(r,i,"formTarget",g.formTarget,g,null)):(Jt(r,i,"encType",g.encType,g,null),Jt(r,i,"method",g.method,g,null),Jt(r,i,"target",g.target,g,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(o);break}d=Za(""+d),r.setAttribute(o,d);break;case"onClick":d!=null&&(r.onclick=ze);break;case"onScroll":d!=null&&_t("scroll",r);break;case"onScrollEnd":d!=null&&_t("scrollend",r);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(o=d.__html,o!=null){if(g.children!=null)throw Error(a(60));r.innerHTML=o}}break;case"multiple":r.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":r.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){r.removeAttribute("xlink:href");break}o=Za(""+d),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,""+d):r.removeAttribute(o);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":d&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,""):r.removeAttribute(o);break;case"capture":case"download":d===!0?r.setAttribute(o,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,d):r.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?r.setAttribute(o,d):r.removeAttribute(o);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?r.removeAttribute(o):r.setAttribute(o,d);break;case"popover":_t("beforetoggle",r),_t("toggle",r),Jn(r,"popover",d);break;case"xlinkActuate":fr(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":fr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":fr(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":fr(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":fr(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":fr(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":fr(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":fr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":fr(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Jn(r,"is",d);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=va.get(o)||o,Jn(r,o,d))}}function Yd(r,i,o,d,g,v){switch(o){case"style":Xt(r,d,v);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(o=d.__html,o!=null){if(g.children!=null)throw Error(a(60));r.innerHTML=o}}break;case"children":typeof d=="string"?st(r,d):(typeof d=="number"||typeof d=="bigint")&&st(r,""+d);break;case"onScroll":d!=null&&_t("scroll",r);break;case"onScrollEnd":d!=null&&_t("scrollend",r);break;case"onClick":d!=null&&(r.onclick=ze);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Oi.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(g=o.endsWith("Capture"),i=o.slice(2,g?o.length-7:void 0),v=r[kn]||null,v=v!=null?v[o]:null,typeof v=="function"&&r.removeEventListener(i,v,g),typeof d=="function")){typeof v!="function"&&v!==null&&(o in r?r[o]=null:r.hasAttribute(o)&&r.removeAttribute(o)),r.addEventListener(i,d,g);break e}o in r?r[o]=d:d===!0?r.setAttribute(o,""):Jn(r,o,d)}}}function Wn(r,i,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_t("error",r),_t("load",r);var d=!1,g=!1,v;for(v in o)if(o.hasOwnProperty(v)){var T=o[v];if(T!=null)switch(v){case"src":d=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Jt(r,i,v,T,o,null)}}g&&Jt(r,i,"srcSet",o.srcSet,o,null),d&&Jt(r,i,"src",o.src,o,null);return;case"input":_t("invalid",r);var L=v=T=g=null,J=null,fe=null;for(d in o)if(o.hasOwnProperty(d)){var xe=o[d];if(xe!=null)switch(d){case"name":g=xe;break;case"type":T=xe;break;case"checked":J=xe;break;case"defaultChecked":fe=xe;break;case"value":v=xe;break;case"defaultValue":L=xe;break;case"children":case"dangerouslySetInnerHTML":if(xe!=null)throw Error(a(137,i));break;default:Jt(r,i,d,xe,o,null)}}Di(r,v,L,J,fe,T,g,!1);return;case"select":_t("invalid",r),d=T=v=null;for(g in o)if(o.hasOwnProperty(g)&&(L=o[g],L!=null))switch(g){case"value":v=L;break;case"defaultValue":T=L;break;case"multiple":d=L;default:Jt(r,i,g,L,o,null)}i=v,o=T,r.multiple=!!d,i!=null?Kn(r,!!d,i,!1):o!=null&&Kn(r,!!d,o,!0);return;case"textarea":_t("invalid",r),v=g=d=null;for(T in o)if(o.hasOwnProperty(T)&&(L=o[T],L!=null))switch(T){case"value":d=L;break;case"defaultValue":g=L;break;case"children":v=L;break;case"dangerouslySetInnerHTML":if(L!=null)throw Error(a(91));break;default:Jt(r,i,T,L,o,null)}gs(r,d,g,v);return;case"option":for(J in o)o.hasOwnProperty(J)&&(d=o[J],d!=null)&&(J==="selected"?r.selected=d&&typeof d!="function"&&typeof d!="symbol":Jt(r,i,J,d,o,null));return;case"dialog":_t("beforetoggle",r),_t("toggle",r),_t("cancel",r),_t("close",r);break;case"iframe":case"object":_t("load",r);break;case"video":case"audio":for(d=0;d<Ql.length;d++)_t(Ql[d],r);break;case"image":_t("error",r),_t("load",r);break;case"details":_t("toggle",r);break;case"embed":case"source":case"link":_t("error",r),_t("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(fe in o)if(o.hasOwnProperty(fe)&&(d=o[fe],d!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Jt(r,i,fe,d,o,null)}return;default:if(Xa(i)){for(xe in o)o.hasOwnProperty(xe)&&(d=o[xe],d!==void 0&&Yd(r,i,xe,d,o,void 0));return}}for(L in o)o.hasOwnProperty(L)&&(d=o[L],d!=null&&Jt(r,i,L,d,o,null))}function A7(r,i,o,d){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,v=null,T=null,L=null,J=null,fe=null,xe=null;for(ve in o){var Ee=o[ve];if(o.hasOwnProperty(ve)&&Ee!=null)switch(ve){case"checked":break;case"value":break;case"defaultValue":J=Ee;default:d.hasOwnProperty(ve)||Jt(r,i,ve,null,d,Ee)}}for(var me in d){var ve=d[me];if(Ee=o[me],d.hasOwnProperty(me)&&(ve!=null||Ee!=null))switch(me){case"type":v=ve;break;case"name":g=ve;break;case"checked":fe=ve;break;case"defaultChecked":xe=ve;break;case"value":T=ve;break;case"defaultValue":L=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(a(137,i));break;default:ve!==Ee&&Jt(r,i,me,ve,d,Ee)}}bl(r,T,L,J,fe,xe,v,g);return;case"select":ve=T=L=me=null;for(v in o)if(J=o[v],o.hasOwnProperty(v)&&J!=null)switch(v){case"value":break;case"multiple":ve=J;default:d.hasOwnProperty(v)||Jt(r,i,v,null,d,J)}for(g in d)if(v=d[g],J=o[g],d.hasOwnProperty(g)&&(v!=null||J!=null))switch(g){case"value":me=v;break;case"defaultValue":L=v;break;case"multiple":T=v;default:v!==J&&Jt(r,i,g,v,d,J)}i=L,o=T,d=ve,me!=null?Kn(r,!!o,me,!1):!!d!=!!o&&(i!=null?Kn(r,!!o,i,!0):Kn(r,!!o,o?[]:"",!1));return;case"textarea":ve=me=null;for(L in o)if(g=o[L],o.hasOwnProperty(L)&&g!=null&&!d.hasOwnProperty(L))switch(L){case"value":break;case"children":break;default:Jt(r,i,L,null,d,g)}for(T in d)if(g=d[T],v=o[T],d.hasOwnProperty(T)&&(g!=null||v!=null))switch(T){case"value":me=g;break;case"defaultValue":ve=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(a(91));break;default:g!==v&&Jt(r,i,T,g,d,v)}Po(r,me,ve);return;case"option":for(var $e in o)me=o[$e],o.hasOwnProperty($e)&&me!=null&&!d.hasOwnProperty($e)&&($e==="selected"?r.selected=!1:Jt(r,i,$e,null,d,me));for(J in d)me=d[J],ve=o[J],d.hasOwnProperty(J)&&me!==ve&&(me!=null||ve!=null)&&(J==="selected"?r.selected=me&&typeof me!="function"&&typeof me!="symbol":Jt(r,i,J,me,d,ve));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 it in o)me=o[it],o.hasOwnProperty(it)&&me!=null&&!d.hasOwnProperty(it)&&Jt(r,i,it,null,d,me);for(fe in d)if(me=d[fe],ve=o[fe],d.hasOwnProperty(fe)&&me!==ve&&(me!=null||ve!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(a(137,i));break;default:Jt(r,i,fe,me,d,ve)}return;default:if(Xa(i)){for(var en in o)me=o[en],o.hasOwnProperty(en)&&me!==void 0&&!d.hasOwnProperty(en)&&Yd(r,i,en,void 0,d,me);for(xe in d)me=d[xe],ve=o[xe],!d.hasOwnProperty(xe)||me===ve||me===void 0&&ve===void 0||Yd(r,i,xe,me,d,ve);return}}for(var oe in o)me=o[oe],o.hasOwnProperty(oe)&&me!=null&&!d.hasOwnProperty(oe)&&Jt(r,i,oe,null,d,me);for(Ee in d)me=d[Ee],ve=o[Ee],!d.hasOwnProperty(Ee)||me===ve||me==null&&ve==null||Jt(r,i,Ee,me,d,ve)}function _b(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function _7(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,o=performance.getEntriesByType("resource"),d=0;d<o.length;d++){var g=o[d],v=g.transferSize,T=g.initiatorType,L=g.duration;if(v&&L&&_b(T)){for(T=0,L=g.responseEnd,d+=1;d<o.length;d++){var J=o[d],fe=J.startTime;if(fe>L)break;var xe=J.transferSize,Ee=J.initiatorType;xe&&_b(Ee)&&(J=J.responseEnd,T+=xe*(J<L?1:(L-fe)/(J-fe)))}if(--d,i+=8*(v+T)/(g.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Xd=null,Zd=null;function qc(r){return r.nodeType===9?r:r.ownerDocument}function Ib(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Mb(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function Wd(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Qd=null;function I7(){var r=window.event;return r&&r.type==="popstate"?r===Qd?!1:(Qd=r,!0):(Qd=null,!1)}var Ob=typeof setTimeout=="function"?setTimeout:void 0,M7=typeof clearTimeout=="function"?clearTimeout:void 0,Db=typeof Promise=="function"?Promise:void 0,O7=typeof queueMicrotask=="function"?queueMicrotask:typeof Db<"u"?function(r){return Db.resolve(null).then(r).catch(D7)}:Ob;function D7(r){setTimeout(function(){throw r})}function hi(r){return r==="head"}function jb(r,i){var o=i,d=0;do{var g=o.nextSibling;if(r.removeChild(o),g&&g.nodeType===8)if(o=g.data,o==="/$"||o==="/&"){if(d===0){r.removeChild(g),Gs(i);return}d--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")d++;else if(o==="html")eo(r.ownerDocument.documentElement);else if(o==="head"){o=r.ownerDocument.head,eo(o);for(var v=o.firstChild;v;){var T=v.nextSibling,L=v.nodeName;v[Mi]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&v.rel.toLowerCase()==="stylesheet"||o.removeChild(v),v=T}}else o==="body"&&eo(r.ownerDocument.body);o=g}while(o);Gs(i)}function Lb(r,i){var o=r;r=0;do{var d=o.nextSibling;if(o.nodeType===1?i?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(i?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),d&&d.nodeType===8)if(o=d.data,o==="/$"){if(r===0)break;r--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||r++;o=d}while(o)}function Jd(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var o=i;switch(i=i.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Jd(o),pl(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}r.removeChild(o)}}function j7(r,i,o,d){for(;r.nodeType===1;){var g=o;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(d){if(!r[Mi])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(v=r.getAttribute("rel"),v==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(v!==g.rel||r.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||r.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||r.getAttribute("title")!==(g.title==null?null:g.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(v=r.getAttribute("src"),(v!==(g.src==null?null:g.src)||r.getAttribute("type")!==(g.type==null?null:g.type)||r.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&v&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var v=g.name==null?null:""+g.name;if(g.type==="hidden"&&r.getAttribute("name")===v)return r}else return r;if(r=Vr(r.nextSibling),r===null)break}return null}function L7(r,i,o){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!o||(r=Vr(r.nextSibling),r===null))return null;return r}function zb(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=Vr(r.nextSibling),r===null))return null;return r}function ef(r){return r.data==="$?"||r.data==="$~"}function tf(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function z7(r,i){var o=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||o.readyState!=="loading")i();else{var d=function(){i(),o.removeEventListener("DOMContentLoaded",d)};o.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function Vr(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var nf=null;function Bb(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var o=r.data;if(o==="/$"||o==="/&"){if(i===0)return Vr(r.nextSibling);i--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||i++}r=r.nextSibling}return null}function Ub(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var o=r.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(i===0)return r;i--}else o!=="/$"&&o!=="/&"||i++}r=r.previousSibling}return null}function qb(r,i,o){switch(i=qc(o),r){case"html":if(r=i.documentElement,!r)throw Error(a(452));return r;case"head":if(r=i.head,!r)throw Error(a(453));return r;case"body":if(r=i.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function eo(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);pl(r)}var Kr=new Map,Hb=new Set;function Hc(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Da=re.d;re.d={f:B7,r:U7,D:q7,C:H7,L:F7,m:P7,X:G7,S:$7,M:V7};function B7(){var r=Da.f(),i=Mc();return r||i}function U7(r){var i=ga(r);i!==null&&i.tag===5&&i.type==="form"?ag(i):Da.r(r)}var Fs=typeof document>"u"?null:document;function Fb(r,i,o){var d=Fs;if(d&&typeof i=="string"&&i){var g=mr(i);g='link[rel="'+r+'"][href="'+g+'"]',typeof o=="string"&&(g+='[crossorigin="'+o+'"]'),Hb.has(g)||(Hb.add(g),r={rel:r,crossOrigin:o,href:i},d.querySelector(g)===null&&(i=d.createElement("link"),Wn(i,"link",r),Rn(i),d.head.appendChild(i)))}}function q7(r){Da.D(r),Fb("dns-prefetch",r,null)}function H7(r,i){Da.C(r,i),Fb("preconnect",r,i)}function F7(r,i,o){Da.L(r,i,o);var d=Fs;if(d&&r&&i){var g='link[rel="preload"][as="'+mr(i)+'"]';i==="image"&&o&&o.imageSrcSet?(g+='[imagesrcset="'+mr(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(g+='[imagesizes="'+mr(o.imageSizes)+'"]')):g+='[href="'+mr(r)+'"]';var v=g;switch(i){case"style":v=Ps(r);break;case"script":v=$s(r)}Kr.has(v)||(r=b({rel:"preload",href:i==="image"&&o&&o.imageSrcSet?void 0:r,as:i},o),Kr.set(v,r),d.querySelector(g)!==null||i==="style"&&d.querySelector(to(v))||i==="script"&&d.querySelector(no(v))||(i=d.createElement("link"),Wn(i,"link",r),Rn(i),d.head.appendChild(i)))}}function P7(r,i){Da.m(r,i);var o=Fs;if(o&&r){var d=i&&typeof i.as=="string"?i.as:"script",g='link[rel="modulepreload"][as="'+mr(d)+'"][href="'+mr(r)+'"]',v=g;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=$s(r)}if(!Kr.has(v)&&(r=b({rel:"modulepreload",href:r},i),Kr.set(v,r),o.querySelector(g)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(no(v)))return}d=o.createElement("link"),Wn(d,"link",r),Rn(d),o.head.appendChild(d)}}}function $7(r,i,o){Da.S(r,i,o);var d=Fs;if(d&&r){var g=Ya(d).hoistableStyles,v=Ps(r);i=i||"default";var T=g.get(v);if(!T){var L={loading:0,preload:null};if(T=d.querySelector(to(v)))L.loading=5;else{r=b({rel:"stylesheet",href:r,"data-precedence":i},o),(o=Kr.get(v))&&rf(r,o);var J=T=d.createElement("link");Rn(J),Wn(J,"link",r),J._p=new Promise(function(fe,xe){J.onload=fe,J.onerror=xe}),J.addEventListener("load",function(){L.loading|=1}),J.addEventListener("error",function(){L.loading|=2}),L.loading|=4,Fc(T,i,d)}T={type:"stylesheet",instance:T,count:1,state:L},g.set(v,T)}}}function G7(r,i){Da.X(r,i);var o=Fs;if(o&&r){var d=Ya(o).hoistableScripts,g=$s(r),v=d.get(g);v||(v=o.querySelector(no(g)),v||(r=b({src:r,async:!0},i),(i=Kr.get(g))&&af(r,i),v=o.createElement("script"),Rn(v),Wn(v,"link",r),o.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},d.set(g,v))}}function V7(r,i){Da.M(r,i);var o=Fs;if(o&&r){var d=Ya(o).hoistableScripts,g=$s(r),v=d.get(g);v||(v=o.querySelector(no(g)),v||(r=b({src:r,async:!0,type:"module"},i),(i=Kr.get(g))&&af(r,i),v=o.createElement("script"),Rn(v),Wn(v,"link",r),o.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},d.set(g,v))}}function Pb(r,i,o,d){var g=(g=ne.current)?Hc(g):null;if(!g)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(i=Ps(o.href),o=Ya(g).hoistableStyles,d=o.get(i),d||(d={type:"style",instance:null,count:0,state:null},o.set(i,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){r=Ps(o.href);var v=Ya(g).hoistableStyles,T=v.get(r);if(T||(g=g.ownerDocument||g,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(r,T),(v=g.querySelector(to(r)))&&!v._p&&(T.instance=v,T.state.loading=5),Kr.has(r)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Kr.set(r,o),v||K7(g,r,o,T.state))),i&&d===null)throw Error(a(528,""));return T}if(i&&d!==null)throw Error(a(529,""));return null;case"script":return i=o.async,o=o.src,typeof o=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=$s(o),o=Ya(g).hoistableScripts,d=o.get(i),d||(d={type:"script",instance:null,count:0,state:null},o.set(i,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function Ps(r){return'href="'+mr(r)+'"'}function to(r){return'link[rel="stylesheet"]['+r+"]"}function $b(r){return b({},r,{"data-precedence":r.precedence,precedence:null})}function K7(r,i,o,d){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?d.loading=1:(i=r.createElement("link"),d.preload=i,i.addEventListener("load",function(){return d.loading|=1}),i.addEventListener("error",function(){return d.loading|=2}),Wn(i,"link",o),Rn(i),r.head.appendChild(i))}function $s(r){return'[src="'+mr(r)+'"]'}function no(r){return"script[async]"+r}function Gb(r,i,o){if(i.count++,i.instance===null)switch(i.type){case"style":var d=r.querySelector('style[data-href~="'+mr(o.href)+'"]');if(d)return i.instance=d,Rn(d),d;var g=b({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),Rn(d),Wn(d,"style",g),Fc(d,o.precedence,r),i.instance=d;case"stylesheet":g=Ps(o.href);var v=r.querySelector(to(g));if(v)return i.state.loading|=4,i.instance=v,Rn(v),v;d=$b(o),(g=Kr.get(g))&&rf(d,g),v=(r.ownerDocument||r).createElement("link"),Rn(v);var T=v;return T._p=new Promise(function(L,J){T.onload=L,T.onerror=J}),Wn(v,"link",d),i.state.loading|=4,Fc(v,o.precedence,r),i.instance=v;case"script":return v=$s(o.src),(g=r.querySelector(no(v)))?(i.instance=g,Rn(g),g):(d=o,(g=Kr.get(v))&&(d=b({},o),af(d,g)),r=r.ownerDocument||r,g=r.createElement("script"),Rn(g),Wn(g,"link",d),r.head.appendChild(g),i.instance=g);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(d=i.instance,i.state.loading|=4,Fc(d,o.precedence,r));return i.instance}function Fc(r,i,o){for(var d=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=d.length?d[d.length-1]:null,v=g,T=0;T<d.length;T++){var L=d[T];if(L.dataset.precedence===i)v=L;else if(v!==g)break}v?v.parentNode.insertBefore(r,v.nextSibling):(i=o.nodeType===9?o.head:o,i.insertBefore(r,i.firstChild))}function rf(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function af(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var Pc=null;function Vb(r,i,o){if(Pc===null){var d=new Map,g=Pc=new Map;g.set(o,d)}else g=Pc,d=g.get(o),d||(d=new Map,g.set(o,d));if(d.has(r))return d;for(d.set(r,null),o=o.getElementsByTagName(r),g=0;g<o.length;g++){var v=o[g];if(!(v[Mi]||v[Pt]||r==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var T=v.getAttribute(i)||"";T=r+T;var L=d.get(T);L?L.push(v):d.set(T,[v])}}return d}function Kb(r,i,o){r=r.ownerDocument||r,r.head.insertBefore(o,i==="title"?r.querySelector("head > title"):null)}function Y7(r,i,o){if(o===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(r=i.disabled,typeof i.precedence=="string"&&r==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Yb(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function X7(r,i,o,d){if(o.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var g=Ps(d.href),v=i.querySelector(to(g));if(v){i=v._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=$c.bind(r),i.then(r,r)),o.state.loading|=4,o.instance=v,Rn(v);return}v=i.ownerDocument||i,d=$b(d),(g=Kr.get(g))&&rf(d,g),v=v.createElement("link"),Rn(v);var T=v;T._p=new Promise(function(L,J){T.onload=L,T.onerror=J}),Wn(v,"link",d),o.instance=v}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(o,i),(i=o.state.preload)&&(o.state.loading&3)===0&&(r.count++,o=$c.bind(r),i.addEventListener("load",o),i.addEventListener("error",o))}}var sf=0;function Z7(r,i){return r.stylesheets&&r.count===0&&Vc(r,r.stylesheets),0<r.count||0<r.imgCount?function(o){var d=setTimeout(function(){if(r.stylesheets&&Vc(r,r.stylesheets),r.unsuspend){var v=r.unsuspend;r.unsuspend=null,v()}},6e4+i);0<r.imgBytes&&sf===0&&(sf=62500*_7());var g=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Vc(r,r.stylesheets),r.unsuspend)){var v=r.unsuspend;r.unsuspend=null,v()}},(r.imgBytes>sf?50:800)+i);return r.unsuspend=o,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(g)}}:null}function $c(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Vc(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Gc=null;function Vc(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Gc=new Map,i.forEach(W7,r),Gc=null,$c.call(r))}function W7(r,i){if(!(i.state.loading&4)){var o=Gc.get(r);if(o)var d=o.get(null);else{o=new Map,Gc.set(r,o);for(var g=r.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<g.length;v++){var T=g[v];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(o.set(T.dataset.precedence,T),d=T)}d&&o.set(null,d)}g=i.instance,T=g.getAttribute("data-precedence"),v=o.get(T)||d,v===d&&o.set(null,g),o.set(T,g),this.count++,d=$c.bind(this),g.addEventListener("load",d),g.addEventListener("error",d),v?v.parentNode.insertBefore(g,v.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(g,r.firstChild)),i.state.loading|=4}}var ro={$$typeof:I,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function Q7(r,i,o,d,g,v,T,L,J){this.tag=1,this.containerInfo=r,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=ht(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ht(0),this.hiddenUpdates=ht(null),this.identifierPrefix=d,this.onUncaughtError=g,this.onCaughtError=v,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=J,this.incompleteTransitions=new Map}function Xb(r,i,o,d,g,v,T,L,J,fe,xe,Ee){return r=new Q7(r,i,o,T,J,fe,xe,Ee,L),i=1,v===!0&&(i|=24),v=Nr(3,null,null,i),r.current=v,v.stateNode=r,i=B0(),i.refCount++,r.pooledCache=i,i.refCount++,v.memoizedState={element:d,isDehydrated:o,cache:i},F0(v),r}function Zb(r){return r?(r=ws,r):ws}function Wb(r,i,o,d,g,v){g=Zb(g),d.context===null?d.context=g:d.pendingContext=g,d=ri(i),d.payload={element:o},v=v===void 0?null:v,v!==null&&(d.callback=v),o=ai(r,d,i),o!==null&&(yr(o,r,i),jl(o,r,i))}function Qb(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var o=r.retryLane;r.retryLane=o!==0&&o<i?o:i}}function lf(r,i){Qb(r,i),(r=r.alternate)&&Qb(r,i)}function Jb(r){if(r.tag===13||r.tag===31){var i=Bi(r,67108864);i!==null&&yr(i,r,67108864),lf(r,67108864)}}function ev(r){if(r.tag===13||r.tag===31){var i=Ir();i=Tt(i);var o=Bi(r,i);o!==null&&yr(o,r,i),lf(r,i)}}var Kc=!0;function J7(r,i,o,d){var g=V.T;V.T=null;var v=re.p;try{re.p=2,of(r,i,o,d)}finally{re.p=v,V.T=g}}function e8(r,i,o,d){var g=V.T;V.T=null;var v=re.p;try{re.p=8,of(r,i,o,d)}finally{re.p=v,V.T=g}}function of(r,i,o,d){if(Kc){var g=cf(d);if(g===null)Kd(r,i,d,Yc,o),nv(r,d);else if(n8(g,r,i,o,d))d.stopPropagation();else if(nv(r,d),i&4&&-1<t8.indexOf(r)){for(;g!==null;){var v=ga(g);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var T=Ft(v.pendingLanes);if(T!==0){var L=v;for(L.pendingLanes|=2,L.entangledLanes|=2;T;){var J=1<<31-mt(T);L.entanglements[1]|=J,T&=~J}sa(v),($t&6)===0&&(_c=Je()+500,Wl(0))}}break;case 31:case 13:L=Bi(v,2),L!==null&&yr(L,v,2),Mc(),lf(v,2)}if(v=cf(d),v===null&&Kd(r,i,d,Yc,o),v===g)break;g=v}g!==null&&d.stopPropagation()}else Kd(r,i,d,null,o)}}function cf(r){return r=bt(r),uf(r)}var Yc=null;function uf(r){if(Yc=null,r=ir(r),r!==null){var i=l(r);if(i===null)r=null;else{var o=i.tag;if(o===13){if(r=c(i),r!==null)return r;r=null}else if(o===31){if(r=f(i),r!==null)return r;r=null}else if(o===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return Yc=r,null}function tv(r){switch(r){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(tn()){case pe:return 2;case Se:return 8;case Fe:case _e:return 32;case He:return 268435456;default:return 32}default:return 32}}var df=!1,pi=null,gi=null,bi=null,ao=new Map,io=new Map,vi=[],t8="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 nv(r,i){switch(r){case"focusin":case"focusout":pi=null;break;case"dragenter":case"dragleave":gi=null;break;case"mouseover":case"mouseout":bi=null;break;case"pointerover":case"pointerout":ao.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":io.delete(i.pointerId)}}function so(r,i,o,d,g,v){return r===null||r.nativeEvent!==v?(r={blockedOn:i,domEventName:o,eventSystemFlags:d,nativeEvent:v,targetContainers:[g]},i!==null&&(i=ga(i),i!==null&&Jb(i)),r):(r.eventSystemFlags|=d,i=r.targetContainers,g!==null&&i.indexOf(g)===-1&&i.push(g),r)}function n8(r,i,o,d,g){switch(i){case"focusin":return pi=so(pi,r,i,o,d,g),!0;case"dragenter":return gi=so(gi,r,i,o,d,g),!0;case"mouseover":return bi=so(bi,r,i,o,d,g),!0;case"pointerover":var v=g.pointerId;return ao.set(v,so(ao.get(v)||null,r,i,o,d,g)),!0;case"gotpointercapture":return v=g.pointerId,io.set(v,so(io.get(v)||null,r,i,o,d,g)),!0}return!1}function rv(r){var i=ir(r.target);if(i!==null){var o=l(i);if(o!==null){if(i=o.tag,i===13){if(i=c(o),i!==null){r.blockedOn=i,Qn(r.priority,function(){ev(o)});return}}else if(i===31){if(i=f(o),i!==null){r.blockedOn=i,Qn(r.priority,function(){ev(o)});return}}else if(i===3&&o.stateNode.current.memoizedState.isDehydrated){r.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Xc(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var o=cf(r.nativeEvent);if(o===null){o=r.nativeEvent;var d=new o.constructor(o.type,o);Ye=d,o.target.dispatchEvent(d),Ye=null}else return i=ga(o),i!==null&&Jb(i),r.blockedOn=o,!1;i.shift()}return!0}function av(r,i,o){Xc(r)&&o.delete(i)}function r8(){df=!1,pi!==null&&Xc(pi)&&(pi=null),gi!==null&&Xc(gi)&&(gi=null),bi!==null&&Xc(bi)&&(bi=null),ao.forEach(av),io.forEach(av)}function Zc(r,i){r.blockedOn===i&&(r.blockedOn=null,df||(df=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,r8)))}var Wc=null;function iv(r){Wc!==r&&(Wc=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Wc===r&&(Wc=null);for(var i=0;i<r.length;i+=3){var o=r[i],d=r[i+1],g=r[i+2];if(typeof d!="function"){if(uf(d||o)===null)continue;break}var v=ga(o);v!==null&&(r.splice(i,3),i-=3,od(v,{pending:!0,data:g,method:o.method,action:d},d,g))}}))}function Gs(r){function i(J){return Zc(J,r)}pi!==null&&Zc(pi,r),gi!==null&&Zc(gi,r),bi!==null&&Zc(bi,r),ao.forEach(i),io.forEach(i);for(var o=0;o<vi.length;o++){var d=vi[o];d.blockedOn===r&&(d.blockedOn=null)}for(;0<vi.length&&(o=vi[0],o.blockedOn===null);)rv(o),o.blockedOn===null&&vi.shift();if(o=(r.ownerDocument||r).$$reactFormReplay,o!=null)for(d=0;d<o.length;d+=3){var g=o[d],v=o[d+1],T=g[kn]||null;if(typeof v=="function")T||iv(o);else if(T){var L=null;if(v&&v.hasAttribute("formAction")){if(g=v,T=v[kn]||null)L=T.formAction;else if(uf(g)!==null)continue}else L=T.action;typeof L=="function"?o[d+1]=L:(o.splice(d,3),d-=3),iv(o)}}}function sv(){function r(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(T){return g=T})},focusReset:"manual",scroll:"manual"})}function i(){g!==null&&(g(),g=null),d||setTimeout(o,20)}function o(){if(!d&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,g=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(o,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),g!==null&&(g(),g=null)}}}function ff(r){this._internalRoot=r}Qc.prototype.render=ff.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var o=i.current,d=Ir();Wb(o,d,r,i,null,null)},Qc.prototype.unmount=ff.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Wb(r.current,2,null,r,null,null),Mc(),i[Va]=null}};function Qc(r){this._internalRoot=r}Qc.prototype.unstable_scheduleHydration=function(r){if(r){var i=qn();r={blockedOn:null,target:r,priority:i};for(var o=0;o<vi.length&&i!==0&&i<vi[o].priority;o++);vi.splice(o,0,r),o===0&&rv(r)}};var lv=t.version;if(lv!=="19.2.8")throw Error(a(527,lv,"19.2.8"));re.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=h(i),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var a8={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jc.isDisabled&&Jc.supportsFiber)try{Lt=Jc.inject(a8),yt=Jc}catch{}}return oo.createRoot=function(r,i){if(!s(r))throw Error(a(299));var o=!1,d="",g=hg,v=pg,T=gg;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(g=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(T=i.onRecoverableError)),i=Xb(r,1,!1,null,null,o,d,null,g,v,T,sv),r[Va]=i.current,Vd(r),new ff(i)},oo.hydrateRoot=function(r,i,o){if(!s(r))throw Error(a(299));var d=!1,g="",v=hg,T=pg,L=gg,J=null;return o!=null&&(o.unstable_strictMode===!0&&(d=!0),o.identifierPrefix!==void 0&&(g=o.identifierPrefix),o.onUncaughtError!==void 0&&(v=o.onUncaughtError),o.onCaughtError!==void 0&&(T=o.onCaughtError),o.onRecoverableError!==void 0&&(L=o.onRecoverableError),o.formState!==void 0&&(J=o.formState)),i=Xb(r,1,!0,i,o??null,d,g,J,v,T,L,sv),i.context=Zb(null),o=i.current,d=Ir(),d=Tt(d),g=ri(d),g.callback=null,ai(o,g,d),o=d,i.current.lanes=o,Et(i,o),sa(i),r[Va]=i.current,Vd(r),new Qc(i)},oo.version="19.2.8",oo}var bv;function m8(){if(bv)return pf.exports;bv=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),pf.exports=f8(),pf.exports}var h8=m8();const go={"worker-managed-rerun-unsupported":"这次运行由 Console/Worker 启动,不能只从某个节点续跑","workspace-drift":"工作区在上次运行后又改过文件,旧结果不能接着用","controller-drift":"控制器版本已变化,不能接到上次运行上继续","binding-drift":"任务契约或源文件已变化,不能只续跑旧计划","restart-subgraph-contains-unsafe-shell":"下游包含会执行命令的验证步骤,不能只重跑这一段","restart-subgraph-contains-writer":"下游包含会改代码的写入步骤,不能只重跑这一段","restart-subgraph-contains-decision-gate":"下游包含需要人工决策的门禁,不能只重跑这一段","dynamic-rerun-unsupported":"这次运行含动态展开节点,不支持从节点续跑","parent-lifecycle-ineligible":"当前运行状态不允许从节点续跑","convergence-rerun-unsupported":"收敛型运行不支持从节点续跑","evaluation-rerun-unsupported":"带评估的运行不支持从节点续跑","budget-rerun-unsupported":"硬预算运行不支持从节点续跑","workspace-checkpoint-missing":"缺少工作区快照,无法安全地只续跑一段","skill-snapshot-invalid":"技能快照缺失或损坏,不能接到上次运行上继续","unresolved-errors-outside-reset-closure":"选中节点之外还有未解决的失败,只重跑这一段不够","selected-node-missing":"找不到要续跑的起始节点","ambiguous-skipped-rewrite":"跳过的节点有多个上游失败,无法自动选定起点","skipped-without-upstream-error":"该节点被跳过且没有明确的上游失败","parent-facts-invalid":"上次运行的证据不完整或已损坏,不能只续跑一段",RUN_NOT_ACTIVE:"这次运行不在活动状态,不能协作中止",RUN_NOT_CONSOLE_OWNED:"此运行不由当前 Console 持有,暂不支持协作中止",RUNNER_IDENTITY_MISMATCH:"运行身份已变化,不能中止这份过期请求",INTERRUPT_ALREADY_PENDING:"已有一条中止请求等待结算",RUN_ALREADY_TERMINAL:"运行已经结束,没有可中止的活 runner",INTERRUPT_NEEDS_RECONCILE:"中止请求已登记但无法确认 runner 已处理,需要对账"};function p8(){return Object.keys(go)}function bu(e){const t=e.trim().replace(/[.…]+$/,"");if(!t)return null;if(go[t])return{code:t};const n=t.lastIndexOf(":");if(n>0){const a=t.slice(n+1),s=t.slice(0,n);if(go[a])return{code:a,nodeId:s};const l=p8().find(c=>a.length>=3&&c.startsWith(a));if(l)return{code:l,nodeId:s}}return go[t]?{code:t}:null}function g8(e){const t=[];for(const n of e.blockedReasons??[]){const a=bu(String(n));a&&t.push(a)}for(const n of e.blockingNodes??[]){const a=n.reasonCode?.trim();if(!a)continue;const s=bu(n.nodeId?`${n.nodeId}:${a}`:a);s&&t.push(s)}if(t.length===0&&e.fallbackMessage?.trim()){const n=e.fallbackMessage.trim().replace(/^从节点重跑不具备安全资格[::]?\s*/,"").replace(/[。..]+$/,"");for(const a of n.split(/[;;]/)){const s=bu(a);s&&t.push(s)}}return t}function b8(e){const t=new Map;for(const a of e){const s=t.get(a.code)??[];a.nodeId&&!s.includes(a.nodeId)&&s.push(a.nodeId),t.set(a.code,s)}const n=[];for(const[a,s]of t){const l=go[a];l&&(s.length>0&&a.startsWith("restart-subgraph-contains-")?n.push(`${l}(${s.join("、")})`):n.push(l))}return n}function v8(e){return e.join("; ").includes("worker-managed-rerun-unsupported")||e.some(n=>bu(n)?.code==="worker-managed-rerun-unsupported")?"下一步:请点下方「重新排队 Worker Task」,从头完整执行。":"下一步:请改用「带反馈重新执行任务」,重新生成完整 DAG。"}function F2(e){const t=e.fallbackMessage?.trim();if(t?.startsWith("无法从该节点续跑"))return t;const n=g8(e),a=b8(n),s=n.map(c=>c.code),l=v8(s.length>0?s:[t??""]);return a.length===0?["无法从该节点续跑。这次续跑不够安全(工作区、控制器或下游步骤不允许只重跑一段)。",l].join(`
|
|
10
|
-
`):["无法从该节点续跑,因为:",...a.map(c=>`• ${c}`),"",l].join(`
|
|
11
|
-
`)}function y8(e){const t=e.trim();if(!t)return null;if(t.startsWith("无法从该节点续跑"))return t;if(/从节点重跑不具备安全资格|worker-managed-rerun-unsupported|restart-subgraph-contains-|workspace-drift|controller-drift|binding-drift/.test(t))return F2({fallbackMessage:t});if(/action must be a mutation-gate target/i.test(t))return"这个操作不能再走确认门。Worker 启动的任务请直接点「重新排队 Worker Task」;独立运行请点「带反馈重新执行任务」。";if(/cannot read dagReport run facts/i.test(t))return"读不到这次运行的失败报告,不能完整重跑。请先点「查看报告」或「Doctor 诊断」。";if(/dagRerunPlan run facts unavailable/i.test(t))return"读不到节点恢复资格,不能直接改走完整重跑。请先点「从失败节点恢复」查看资格,或先「查看报告」。";if(/node rerun plan is eligible/i.test(t))return"节点恢复是安全的,请改用「从失败节点恢复」,不必重新执行完整任务。";if(/does not support autonomous standaloneTaskRerun/i.test(t))return"当前失败不适合自动完整重跑。请先点「查看报告」,按建议操作。";if(/primaryRecovery requires a human decision/i.test(t))return"这次失败需要人工决策,不能自动重跑。请先点「查看报告」。";if(/is not bound to run/i.test(t))return"填写的任务 ID 与这次运行不匹配。请使用该运行绑定的原任务 ID。";if(/cannot read pool doctor/i.test(t))return"读不到任务队列状态,暂时不能重新排队。请稍后重试,或先跑 Doctor 诊断。";if(/not found in the pool doctor inventory/i.test(t))return"任务队列里找不到这个任务,不能重新排队。请确认 Task ID 来自 Worker 队列,而不是只填了 DAG 运行 ID。";if(/only Failed tasks are retry-eligible/i.test(t)){const n=t.match(/is ([A-Za-z_]+); only Failed/)?.[1];return n?`该任务当前是「${n}」,只有失败(Failed)的任务才能重新排队。`:"只有失败(Failed)的任务才能重新排队。请先确认任务已失败。"}return/featureId .+ does not match the pool task/i.test(t)?"Feature ID 与队列中的任务不一致。请改用队列里记录的 Feature ID,或留空后重试。":/RUN_NOT_CONSOLE_OWNED|不由当前 Console 持有/.test(t)?"此运行不由当前 Console 持有,暂不支持协作中止。请用 Doctor / 报告查看。":/RUNNER_IDENTITY_MISMATCH|运行身份已变化/.test(t)?"运行身份已变化,不能中止这份过期请求。请刷新后再试。":/INTERRUPT_ALREADY_PENDING|已有一条中止请求/.test(t)?"已有一条中止请求等待当前节点安全收敛。请稍候刷新,不要重复提交。":/RUN_ALREADY_TERMINAL|运行已经结束/.test(t)?"运行已经结束,没有可中止的活 runner。请改用报告或对账。":/INTERRUPT_NEEDS_RECONCILE|无法确认 runner 已处理/.test(t)?"中止请求已登记,但无法确认 runner 已处理。请用 Doctor 对账,不要当成已经中止。":/RUN_NOT_ACTIVE/.test(t)?"这次运行不在本机活动目录,或已经不是 running,不能协作中止。":null}function x8(e){return e==="validate"||e==="apply"||e==="spine"?"contract":e}async function w8(e,t){const a=await fetch(`/api/dag-runs/${encodeURIComponent(e)}/prewrite-result`,{credentials:"same-origin"});if(!a.ok)return{ok:!1,status:a.status};const s=await a.json();return!s||typeof s.classification!="string"?{ok:!1,status:a.status}:{ok:!0,result:{schemaVersion:typeof s.schemaVersion=="number"?s.schemaVersion:1,schemaId:typeof s.schemaId=="string"?s.schemaId:"",classification:s.classification,failureCode:typeof s.failureCode=="string"?s.failureCode:null,failureReason:typeof s.failureReason=="string"?s.failureReason:null}}}function S8(e){return e==="fail"?"未通过":e==="pass"?"通过":"未知/不可判定"}const Bh="X-Loop-Console-Confirmation",P2="agent-worker console doctor --repo .",Uh=["LOW","MED","HIGH"];function k8(e){if(e.length===0)return"模型值不能为空";if(e.trim()!==e)return"模型值不能包含首尾空白";if(e==="default")return"default 是保留哨兵,不能作为模型值";if(e.startsWith("/")||e.endsWith("/")||e.includes("//"))return"provider/model 格式非法:不允许 /model、provider/ 或 a//b"}function E8(e){const t={};for(const n of Uh){const a=k8(e[n]);a&&(t[n]=a)}return t}function vv(e){return{LOW:e?.LOW?.value??"",MED:e?.MED?.value??"",HIGH:e?.HIGH?.value??""}}function T8(e){return Uh.every(t=>e[t]===void 0)}const Wm=[{kind:"standard",label:"后端研发(默认 DAG)",hint:"生成标准 hybrid DAG(contract → implement → verify)"},{kind:"frontend-implementation",label:"前端研发",hint:"生成 frontend-implementation 专用节点链"},{kind:"backend-test",label:"后端测试",hint:"生成 backend-test-dag(分析 / 用例 / pytest)"},{kind:"frontend-test",label:"前端测试",hint:"生成 frontend-test-dag(RAG 用例 + Playwright CLI)"}],$2={"setup-required":"需要设置",ready:"已就绪",degraded:"降级可用",unknown:"未知"},N8={idle:"未探测",match:"匹配",mismatch:"仓库不匹配",unavailable:"不可用"},G2={low:"低",medium:"中",high:"高"},V2={"validation-failed":"校验失败","contract-drift":"契约漂移","runtime-mismatch":"运行时不匹配","pause-on-human":"等待人工","verification-failed":"验证失败","orphan-unknown":"孤立/未知","terminal-failed":"已终止(失败)","terminal-succeeded":"已终止(成功)","needs-reconcile":"需要对账","running-active":"正在运行"},C8={idle:"空闲","not-started":"未开始","not-run":"未运行","n/a (MVP)":"不适用(MVP)",accepted:"已接受",succeeded:"已成功",running:"运行中",ran:"已执行"};function eu(e){return C8[e]??e}function qh(){return window.__CONSOLE_CONFIRMATION_TOKEN__??""}function wu(e){return`${e}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}async function ko(e,t={},n){const a={"Content-Type":"application/json",[Bh]:qh()},s=await fetch("/api/operator/v1/operations",{method:"POST",credentials:"same-origin",headers:a,body:JSON.stringify({action:e,actionParams:t,...n?{clientRequestId:n}:{}})});let l={};try{l=await s.json()}catch{l={ok:!1,error:{code:"INVALID_INPUT",message:"操作响应不是合法 JSON"}}}return{status:s.status,body:l}}const R8=new Set(["runDag","dagRerun","dagReconcileRun","dagRequestInterrupt","standaloneTaskRerun","consoleUpdateAndInit"]);function yf(e,t){return F2({blockedReasons:e.blockedReasons,blockingNodes:e.blockingNodes,fallbackMessage:t})}async function yv(e,t=3e5){const n=Date.now();for(;Date.now()-n<t;){const a=await fetch(`/api/operator/v1/operations/${encodeURIComponent(e)}`,{credentials:"same-origin"});if(!a.ok)return null;const s=await a.json(),l=s.operation??s,c=l.state??"";if(c==="succeeded"||c==="failed"||c==="needs-reconcile"||c==="timed-out"||c==="restarting")return l;await new Promise(f=>setTimeout(f,250))}return{state:"needs-reconcile",errorMessage:"等待操作结果超时"}}function Wi(e){if(e==null)return null;if(typeof e=="string")return e.trim()||null;if(typeof e=="number"||typeof e=="boolean")return String(e);if(typeof e=="object"){const t=e;if(typeof t.text=="string"&&t.text.trim())return t.text.trim();if(typeof t.errorMessage=="string"&&t.errorMessage.trim())return t.errorMessage.trim();if(Array.isArray(t.content)){const n=t.content.map(a=>{if(typeof a=="string")return a;if(a&&typeof a=="object"){const s=a;if(typeof s.text=="string")return s.text}return""}).filter(Boolean);if(n.length)return n.join(`
|
|
12
|
-
`).slice(0,240)}if(typeof t.role=="string")return`${t.role} 消息`}return null}function A8(e){const t=Wi(e.at)??Wi(e.timestamp)??Wi(e.recordedAt)??"",n=Wi(e.errorMessage)??Wi(e.label)??Wi(e.type)??Wi(e.message)??"运行事件";return t?`${t} · ${n}`:n}function bo(e){return String(e.nodeId??e.id??"").trim()}function xf(e){const t=bo(e);return String(e.label??e.name??(t||"未命名节点"))}function xv(e,t){if(e.length===0)return;const n=t?.trim();if(n){const l=e.find(c=>bo(c)===n);if(l)return l}const a=e.find(l=>{const c=String(l.status??"").toLowerCase();return c.includes("fail")||c.includes("error")||c==="blocked"});return a||(e.find(l=>{const c=String(l.status??"").toLowerCase();return c==="running"||c==="in_progress"||c==="active"})??e[0])}const _8=new Set(["finished","failed","partial_failed","superseded","abandoned"]);function Qm(e){if(!e)return!1;const t=String(e.effectiveStatus??e.status??"").toLowerCase();return _8.has(t)}const I8=5e3;function M8({dagRunId:e,nodeId:t,onClose:n,onOpenFull:a}){const s=S.useRef(null),[l,c]=S.useState(null),[f,m]=S.useState([]),[h,p]=S.useState(null),[b,y]=S.useState(!0),[x,k]=S.useState(null),N=Qm(l);S.useEffect(()=>{s.current?.focus();const $=D=>{D.key==="Escape"&&n()};return document.addEventListener("keydown",$),document.title=`检视 · DAG ${e} · Loop Operator`,()=>document.removeEventListener("keydown",$)},[e,n]),S.useEffect(()=>{const $=new AbortController;let D;const M=async B=>{B&&(y(!0),p(null),m([]));try{const Y=await fetch(`/api/dag-runs/${encodeURIComponent(e)}`,{signal:$.signal,credentials:"same-origin"});if(!Y.ok)throw new Error(`DAG 查询失败(HTTP ${Y.status})`);const G=await Y.json();if($.signal.aborted)return;c(G),p(null);const j=Array.isArray(G.nodes)?G.nodes:[];try{const ee=await w8(e);if($.signal.aborted)return;ee.ok?k({status:"success",...ee.result}):ee.status===404&&k({status:"missing"})}catch{}const F=xv(j,t),H=F?bo(F):t?.trim();if(H){const ee=await fetch(`/api/dag-runs/${encodeURIComponent(e)}/nodes/${encodeURIComponent(H)}/session-events`,{signal:$.signal,credentials:"same-origin"});if(ee.ok){const K=await ee.json();$.signal.aborted||m((K.events??[]).slice(-20))}}Qm(G)&&D!==void 0&&(window.clearInterval(D),D=void 0)}catch(Y){$.signal.aborted||p(Y instanceof Error?Y.message:String(Y))}finally{!$.signal.aborted&&B&&y(!1)}};return M(!0),D=window.setInterval(()=>{M(!1)},I8),()=>{$.abort(),D!==void 0&&window.clearInterval(D)}},[e,t]);const R=S.useMemo(()=>Array.isArray(l?.nodes)?l.nodes:[],[l]),C=xv(R,t),_=C?bo(C):"",I=String(l?.effectiveStatus??l?.status??(b?"加载中…":"未知"));return u.jsxs("aside",{className:"inspect-split-panel","aria-label":"DAG 紧凑检视",children:[u.jsxs("div",{className:"inspect-split-header",children:[u.jsxs("div",{children:[u.jsx("p",{className:"inspect-split-kicker",children:"Inspect"}),u.jsx("h2",{children:"检视 DAG"})]}),u.jsx("button",{ref:s,type:"button","aria-label":"关闭检视面板",onClick:n,children:"关闭"})]}),u.jsx("p",{className:"inspect-split-id",children:u.jsx("code",{children:e})}),l?u.jsx("p",{className:`inspect-split-refresh${N?" is-terminal":""}`,"data-testid":"inspect-split-refresh",children:N?"已结束 · 停止自动刷新":"进行中 · 每 5 秒自动刷新"}):null,h?u.jsx("p",{className:"error",children:h}):null,b&&!l?u.jsx("p",{className:"muted",children:"正在加载 DAG…"}):null,u.jsxs("dl",{className:"inspect-split-facts",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"状态"}),u.jsx("dd",{children:I})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"当前节点"}),u.jsx("dd",{children:C?xf(C):"暂无节点"})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"节点状态"}),u.jsx("dd",{children:C?.status??"—"})]}),C?.errorPreview?u.jsxs("div",{children:[u.jsx("dt",{children:"错误摘要"}),u.jsx("dd",{children:C.errorPreview})]}):null,x?u.jsxs("div",{"data-testid":"inspect-prewrite-gate",children:[u.jsx("dt",{children:"prewrite 门禁"}),u.jsx("dd",{children:x.status==="missing"?u.jsx("span",{className:"muted",children:"prewrite 门禁结果尚未生成"}):u.jsxs(u.Fragment,{children:[x.classification,x.failureCode?u.jsxs("code",{"data-testid":"inspect-prewrite-failure-code",children:[" ",x.failureCode]}):null,x.failureReason?u.jsxs("span",{className:"muted",children:[" ","— ",x.failureReason]}):null]})})]}):null]}),u.jsxs("section",{children:[u.jsxs("h3",{children:["节点(",R.length,")"]}),R.length?u.jsx("ul",{className:"inspect-split-nodes",children:R.slice(0,24).map($=>{const D=bo($)||xf($),M=D===_;return u.jsxs("li",{"data-active":M?"true":void 0,className:M?"is-active":void 0,children:[u.jsx("span",{children:xf($)}),u.jsx("code",{children:$.status??"—"})]},D)})}):u.jsx("p",{className:"muted",children:b?"加载节点中…":"该运行暂无节点。"})]}),u.jsxs("section",{children:[u.jsxs("h3",{children:["最近事件",_?` · ${_}`:""]}),f.length?u.jsx("ul",{className:"inspect-split-events",children:f.map(($,D)=>u.jsx("li",{children:A8($)},`${$.at??D}-${D}`))}):u.jsx("p",{className:"muted",children:b?"加载事件中…":"节点事件将在可用时显示。"})]}),u.jsx("button",{type:"button",className:"btn btn-secondary",onClick:a,children:"全屏观测"}),u.jsx("p",{className:"muted",children:"全屏后点顶栏「返回操作台」可回来。"})]})}function O8(e){const{board:t,busy:n}=e;return u.jsxs("details",{className:"night-advanced","data-testid":"night-advanced",open:t.advancedOpen,onToggle:a=>t.setAdvancedOpen(a.target.open),children:[u.jsx("summary",{children:"高级 / Inspect"}),u.jsxs("p",{className:"muted",children:["只读深链:"," ",u.jsx("a",{className:"external-link",href:"/inspect/#/night",children:"/inspect/#/night"})]}),u.jsx("div",{className:"cta-row",children:u.jsx("button",{type:"button",className:"btn btn-secondary",disabled:n,"data-testid":"night-morning-btn",onClick:()=>{t.onMorningReport()},children:"早晨 night 报告"})}),t.morningPreview?u.jsx("pre",{className:"cmd","data-testid":"night-morning-preview",children:t.morningPreview}):null]})}function tu(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function Cn(e,t){const n=e[t];return typeof n=="string"&&n.trim()?n.trim():void 0}function wv(e,t){const n=e[t];if(!Array.isArray(n))return;const a=n.filter(s=>typeof s=="string");return a.length>0?a:void 0}function D8(e){const t=tu(e);if(!t)return null;const n=tu(t.result),a=[tu(t.reviewPacket),n?tu(n.reviewPacket):null,n,t].filter(Boolean);for(const s of a){const l=Cn(s,"scheduleId")??Cn(s,"id"),c=Cn(s,"gateToken")??Cn(s,"approveGate")??Cn(s,"writeSetGateToken");if(!(!l||!c))return{scheduleId:l,gateToken:c,...Cn(s,"featureId")?{featureId:Cn(s,"featureId")}:{},...Cn(s,"taskId")?{taskId:Cn(s,"taskId")}:{},...wv(s,"writeSet")?{writeSet:wv(s,"writeSet")}:{},...Cn(s,"worktreePath")?{worktreePath:Cn(s,"worktreePath")}:{},...Cn(s,"branch")?{branch:Cn(s,"branch")}:{},...Cn(s,"baseBranch")?{baseBranch:Cn(s,"baseBranch")}:{},...Cn(s,"baseCommit")?{baseCommit:Cn(s,"baseCommit")}:{},...Cn(s,"executeAtUtc")?{executeAtUtc:Cn(s,"executeAtUtc")}:{},...Cn(s,"taskCard")?{taskCard:Cn(s,"taskCard")}:{}}}return null}function Sv(e){return`docs/features/${e.trim().replace(/^\/+|\/+$/g,"")}`}function j8(e){const t=e.trim(),n=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})/.exec(t);return n?`${n[1]} ${n[2]}`:null}function kv(){const e=new Date;e.setHours(20,0,0,0);const t=n=>String(n).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}T${t(e.getHours())}:${t(e.getMinutes())}`}function K2(e){if(!e)return"—";const t=Date.parse(e);if(Number.isNaN(t))return e;try{return new Intl.DateTimeFormat("zh-CN",{dateStyle:"short",timeStyle:"short",timeZone:"Asia/Shanghai"}).format(new Date(t))}catch{return e}}function L8(e){return e.mergeState==="pending-harvest"||/\bscheduler harvest\b/i.test(e.nextAction)}function z8(e){return e.status==="failed"||e.status==="human_required"||e.status==="cancelled"||/\bscheduler discard\b/i.test(e.nextAction)}function Su(e){return e==="failed"||e==="human_required"}function B8(e){return`${e}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function Y2(e){return{submitted:"已提交",validating:"校验中",validated:"待预约确认",scheduled:"已预约",waiting:"等待触发",dispatching:"派发中",running:"执行中",succeeded:"成功",failed:"失败",human_required:"需人工",cancelled:"已取消",rejected:"已拒绝",cancel_requested:"取消中"}[e]??e}function U8(e){const{target:t,reason:n,onReasonChange:a,force:s,onForceChange:l,busy:c}=e;return u.jsxs("div",{className:"night-discard-card","data-testid":"night-discard-card",children:[u.jsx("h3",{children:"确认 Discard"}),u.jsxs("p",{className:"muted",children:[t.featureId,"/",t.taskId,"(",Y2(t.status),")"]}),u.jsxs("label",{className:"field",children:[u.jsx("span",{className:"muted",children:"原因"}),u.jsx("input",{"data-testid":"night-discard-reason",value:n,disabled:c,placeholder:"human discard reason",onChange:f=>a(f.target.value)})]}),Su(t.status)?u.jsxs("label",{className:"field checkbox-field",children:[u.jsx("input",{type:"checkbox","data-testid":"night-discard-force",checked:s,disabled:c,onChange:f=>l(f.target.checked)}),u.jsx("span",{className:"muted",children:"强制 Discard(failed / human_required)"})]}):null,u.jsxs("div",{className:"cta-row",children:[u.jsx("button",{type:"button",className:"btn btn-primary",disabled:c||Su(t.status)&&!s,"data-testid":"night-discard-confirm",onClick:e.onConfirm,children:"确认 Discard"}),u.jsx("button",{type:"button",className:"btn btn-secondary",disabled:c,onClick:e.onCancel,children:"返回"})]})]})}function q8(e){const{board:t}=e,{doctor:n,list:a,clockHint:s,doctorIssues:l,auxTicker:c}=t;return u.jsxs("div",{className:"night-health","data-testid":"night-health-bar",children:[u.jsxs("div",{className:"night-health-main",children:[u.jsx("span",{className:`night-health-pill${n?.ok===!1?" is-bad":""}`,children:n?.ok===!1?"Scheduler 异常":"Scheduler 健康"}),u.jsxs("span",{className:"muted",children:["计划 ",n?.scheduleCount??a?.summary.total??"—"," · 活动"," ",n?.activeCount??a?.summary.active??"—"]})]}),s?u.jsxs("p",{className:"muted night-health-hint","data-testid":"night-clock-hint",children:["时钟:",s.message,"(安装/启停请用 CLI:",u.jsx("code",{children:"agent-worker scheduler clock status --repo ."}),")"]}):u.jsxs("p",{className:"muted night-health-hint",children:["到点执行依赖本机 clock / tick,不在此面板安装。详见"," ",u.jsx("a",{className:"external-link",href:"/inspect/#/night",children:"/inspect/#/night"})]}),u.jsxs("div",{className:"night-aux-ticker","data-testid":"night-aux-ticker",children:[u.jsxs("p",{className:"night-aux-ticker-label",children:["开着 Console 时辅助 tick(每 ",c?.intervalSec??60,"s)"]}),u.jsx("p",{className:"muted night-health-hint","data-testid":"night-aux-ticker-disclaimer",children:c?.disclaimer??"仅在本 Console 进程开着时有效;过夜无人值守仍需 OS clock。"}),c?.lastOutcome?u.jsxs("p",{className:"muted","data-testid":"night-aux-ticker-last",children:["上次:",c.lastOutcome,c.running?"(进行中)":"",c.lastSummary?` · ${c.lastSummary}`:"",c.lastError?` · ${c.lastError}`:""]}):null]}),l.length>0?u.jsx("ul",{className:"night-doctor-list","data-testid":"night-doctor-findings",children:l.slice(0,4).map(f=>u.jsxs("li",{children:[u.jsx("strong",{children:f.severity})," ",f.message]},`${f.code}-${f.scheduleId??""}-${f.message}`))}):null]})}function H8(e){const{board:t,busy:n,onHarvest:a,onOpenDiscard:s}=e,{list:l}=t;return u.jsxs(u.Fragment,{children:[l?u.jsxs("div",{className:"night-kpi","data-testid":"night-kpi",children:[u.jsxs("span",{children:["合计 ",l.summary.total]}),u.jsxs("span",{children:["活动 ",l.summary.active]}),u.jsxs("span",{children:["待收成 ",l.summary.pendingHarvest]}),u.jsxs("span",{children:["需人工 ",l.summary.humanRequired]}),u.jsxs("span",{children:["失败 ",l.summary.failed]})]}):null,u.jsxs("div",{className:"night-board","data-testid":"night-board",children:[u.jsx("h3",{children:"计划列表"}),!l||l.schedules.length===0?u.jsxs("div",{className:"empty-state","data-testid":"night-board-empty",children:[u.jsx("p",{className:"empty-title",children:"暂无夜间计划"}),u.jsx("p",{className:"muted",children:"用下方向导预约第一个任务。"})]}):u.jsx("ul",{className:"night-schedule-list",children:l.schedules.map(c=>u.jsxs("li",{className:"night-schedule-row","data-testid":"night-schedule-row","data-status":c.status,children:[u.jsxs("div",{className:"night-schedule-head",children:[u.jsxs("strong",{children:[c.featureId,"/",c.taskId]}),u.jsx("span",{className:"night-status-chip",children:Y2(c.status)})]}),u.jsxs("p",{className:"muted",children:["执行 ",K2(c.executeAtUtc),c.mergeState?` · merge ${c.mergeState}`:"",c.taskCard?` · ${c.taskCard}`:""]}),c.waitingReason?u.jsxs("p",{className:"muted",children:["等待原因:",c.waitingReason]}):null,u.jsxs("p",{className:"muted night-next-action",children:["下一步:",c.nextAction]}),u.jsxs("div",{className:"cta-row",children:[L8(c)?u.jsx("button",{type:"button",className:"btn btn-primary",disabled:n,"data-testid":"night-row-harvest",onClick:()=>a(c),children:"Harvest"}):null,z8(c)?u.jsx("button",{type:"button",className:"btn btn-secondary",disabled:n,"data-testid":"night-row-discard",onClick:()=>s(c),children:"Discard"}):null,u.jsx("a",{className:"external-link",href:`/inspect/#/night/${encodeURIComponent(c.scheduleId)}`,children:"Inspect"})]})]},c.scheduleId))})]})]})}function F8(e){const{wizard:t,busy:n}=e;return u.jsxs("div",{className:"night-wizard","data-testid":"night-wizard",children:[u.jsx("h3",{children:"预约夜间任务"}),t.phase==="pick"?u.jsxs(u.Fragment,{children:[t.selectableTasks.length===0?u.jsxs("div",{className:"empty-state","data-testid":"night-task-empty",children:[u.jsx("p",{className:"empty-title",children:"没有可选任务"}),u.jsx("p",{className:"muted",children:"请先在 Feature Packet / Task Pool 中创建任务,再回到此处刷新。"})]}):u.jsxs("label",{className:"field",children:[u.jsx("span",{className:"muted",children:"Feature / Task"}),u.jsxs("select",{"data-testid":"night-task-select",value:t.selectedKey,disabled:n,onChange:a=>t.setSelectedKey(a.target.value),children:[u.jsx("option",{value:"",children:"选择任务…"}),t.selectableTasks.map(a=>{const s=`${a.featureId}::${a.taskId}`;return u.jsxs("option",{value:s,children:[a.featureId,"/",a.taskId,a.status?` · ${a.status}`:""]},s)})]})]}),t.derivedFeatureDir?u.jsxs("p",{className:"muted","data-testid":"night-feature-dir",children:["Feature 目录:",u.jsx("code",{children:t.derivedFeatureDir})]}):null,u.jsxs("label",{className:"field",children:[u.jsx("span",{className:"muted",children:"本地执行时间"}),u.jsx("input",{type:"datetime-local","data-testid":"night-at",value:t.nightAt,disabled:n,onChange:a=>t.setNightAt(a.target.value)})]}),u.jsxs("label",{className:"field",children:[u.jsx("span",{className:"muted",children:"任务卡片(可选)"}),u.jsx("input",{"data-testid":"night-task-card",value:t.taskCard,disabled:n,placeholder:"UCP-LOOP#11",onChange:a=>t.setTaskCard(a.target.value)})]}),u.jsx("div",{className:"cta-row",children:u.jsx("button",{type:"button",className:"btn btn-primary",disabled:n||!t.selectedKey||!t.nightAt,"data-testid":"night-prepare-btn",onClick:()=>{t.onPrepare()},children:"准备并审阅"})})]}):u.jsxs("div",{className:"night-review-card","data-testid":"night-review-card",children:[u.jsx("p",{className:"muted",children:"请确认 writeSet 与执行环境后预约。Token 已隐藏。"}),u.jsxs("dl",{className:"kv",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Schedule"}),u.jsx("dd",{children:u.jsx("code",{children:t.review?.scheduleId})})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"任务"}),u.jsxs("dd",{children:[t.review?.featureId,"/",t.review?.taskId]})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"执行时间 (UTC)"}),u.jsx("dd",{children:K2(t.review?.executeAtUtc)})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Worktree"}),u.jsx("dd",{children:u.jsx("code",{children:t.review?.worktreePath??"—"})})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"分支"}),u.jsx("dd",{children:u.jsx("code",{children:t.review?.branch??"—"})})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Base"}),u.jsx("dd",{children:u.jsxs("code",{children:[t.review?.baseBranch??"—","@",(t.review?.baseCommit??"").slice(0,12)||"—"]})})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"WriteSet"}),u.jsx("dd",{children:t.review?.writeSet&&t.review.writeSet.length>0?u.jsx("ul",{className:"night-writeset",children:t.review.writeSet.map(a=>u.jsx("li",{children:u.jsx("code",{children:a})},a))}):u.jsx("span",{className:"muted",children:"(未返回显式 writeSet)"})})]})]}),u.jsxs("div",{className:"cta-row",children:[u.jsx("button",{type:"button",className:"btn btn-primary",disabled:n||!t.review,"data-testid":"night-confirm-add-btn",onClick:()=>{t.onConfirmAdd()},children:"确认预约"}),u.jsx("button",{type:"button",className:"btn btn-secondary",disabled:n,"data-testid":"night-review-back-btn",onClick:t.onCancelWizard,children:"返回修改"})]})]})]})}function P8(e){const{setOpError:t}=e,[n,a]=S.useState(null),[s,l]=S.useState(null),[c,f]=S.useState([]),[m,h]=S.useState(null),[p,b]=S.useState(!1),[y,x]=S.useState(!1),[k,N]=S.useState(null),[R,C]=S.useState(null),_=S.useCallback(async()=>{b(!0),h(null);try{const[M,B,Y,G]=await Promise.all([fetch("/api/night-jobs",{credentials:"same-origin"}),fetch("/api/night-jobs/doctor",{credentials:"same-origin"}),fetch("/api/tasks",{credentials:"same-origin"}),fetch("/api/operator/v1/night-aux-ticker",{credentials:"same-origin"})]);if(!M.ok)throw new Error(`加载计划列表失败(HTTP ${M.status})`);const j=await M.json();if(a(j),B.ok?l(await B.json()):l(null),Y.ok){const F=await Y.json();f(Array.isArray(F)?F:[])}else f([]);if(G.ok){const F=await G.json();F.ticker&&C(F.ticker)}}catch(M){h(M instanceof Error?M.message:String(M))}finally{b(!1)}},[]);S.useEffect(()=>{_()},[_]);const I=S.useCallback(async()=>{try{const M=await fetch("/api/night-jobs/morning",{credentials:"same-origin"});if(!M.ok){t(`早晨报告加载失败(HTTP ${M.status})`);return}const B=await M.json();N(JSON.stringify(B,null,2).slice(0,4e3)),x(!0)}catch(M){t(M instanceof Error?M.message:String(M))}},[t]),$=(s?.findings??[]).filter(M=>M.severity==="error"||M.severity==="warning"),D=(s?.findings??[]).find(M=>/clock/i.test(M.code)||/clock/i.test(M.message));return{list:n,doctor:s,tasks:c,loadError:m,loadingBoard:p,advancedOpen:y,setAdvancedOpen:x,morningPreview:k,auxTicker:R,refreshBoard:_,onMorningReport:I,doctorIssues:$,clockHint:D}}function $8(e){const{board:t,runAction:n,isActionSuccess:a,setOpError:s}=e,{tasks:l,refreshBoard:c}=t,[f,m]=S.useState("pick"),[h,p]=S.useState(""),[b,y]=S.useState(kv),[x,k]=S.useState(""),[N,R]=S.useState(null),[C,_]=S.useState(""),[I,$]=S.useState(null),[D,M]=S.useState(!1),B=S.useMemo(()=>{const re=l.filter(ue=>typeof ue.featureId=="string"&&ue.featureId.trim()&&ue.taskId);return re.sort((ue,Te)=>{const P=ue.featureId??"",U=Te.featureId??"";return P!==U?P.localeCompare(U):ue.taskId.localeCompare(Te.taskId)}),re},[l]),Y=S.useMemo(()=>h?B.find(re=>`${re.featureId}::${re.taskId}`===h)??null:null,[B,h]),G=Y?.featureId?Sv(Y.featureId):"",j=S.useCallback(async(re,ue,Te)=>{const P=await n("prepareMutationGate",{action:re,actionParams:ue});if(!a(P))return;const U=P?.result??P,q=U.receiptId?U:U.result??U;if(!q.receiptId||!q.humanGateToken){s("prepareMutationGate 未返回可消费的 Human Gate receipt");return}return n(re,{...ue,confirmationId:q.receiptId,humanGateToken:q.humanGateToken},{clientRequestId:B8(Te)})},[a,n,s]),F=S.useCallback(async()=>{if(!Y?.featureId){s("请先点选 Feature / Task");return}const re=j8(b);if(!re){s("执行时间格式无效,请使用日期时间选择器");return}const ue={featureDir:Sv(Y.featureId),taskId:Y.taskId,at:re,tz:"Asia/Shanghai",...x.trim()?{taskCard:x.trim()}:{}},Te=await j("workerAdmissionPrepare",ue,"night-prepare");if(!a(Te))return;const P=D8(Te?.result??Te);if(!P){s("准备成功但未解析到 scheduleId / gateToken。请刷新后重试,或查看 Inspect。");return}R(P),m("review")},[a,b,j,Y,s,x]),H=S.useCallback(async()=>{if(!N)return;const re=await j("workerSchedulerAdd",{scheduleId:N.scheduleId,approveGate:N.gateToken},"night-add");a(re)&&(R(null),m("pick"),p(""),k(""),y(kv()),await c())},[a,c,N,j]),ee=S.useCallback(()=>{m("pick"),R(null)},[]),K=S.useCallback(async re=>{const ue=await j("workerSchedulerHarvest",{scheduleId:re.scheduleId},"night-harvest");a(ue)&&await c()},[a,c,j]),X=S.useCallback(async()=>{if(!I)return;const re=C.trim()||"discard from console night workbench",ue=Su(I.status),Te=await j("workerSchedulerDiscard",{scheduleId:I.scheduleId,reason:re,...ue||D?{force:!0}:{}},"night-discard");a(Te)&&($(null),_(""),M(!1),await c())},[C,I,D,a,c,j]),V=S.useCallback(re=>{$(re),M(Su(re.status)),_("")},[]);return{phase:f,selectedKey:h,setSelectedKey:p,nightAt:b,setNightAt:y,taskCard:x,setTaskCard:k,review:N,discardReason:C,setDiscardReason:_,discardTarget:I,setDiscardTarget:$,forceDiscard:D,setForceDiscard:M,selectableTasks:B,derivedFeatureDir:G,onPrepare:F,onConfirmAdd:H,onCancelWizard:ee,onHarvest:K,onDiscard:X,openDiscard:V}}function G8({busy:e,runAction:t,isActionSuccess:n,setOpError:a}){const s=P8({setOpError:a}),l=$8({board:s,runAction:t,isActionSuccess:n,setOpError:a});return u.jsxs("section",{className:"panel night-workbench","aria-labelledby":"night-title","data-testid":"night-jobs-panel",children:[u.jsx("h2",{id:"night-title",children:"夜间任务"}),u.jsx("p",{className:"panel-lead",children:"白天点选任务并预约;列表查看状态;早晨在行内收成或丢弃。写操作仍经 Human Gate,列表复用 Inspect 投影。"}),u.jsx(q8,{board:s,busy:e}),u.jsx("div",{className:"cta-row",children:u.jsx("button",{type:"button",className:"btn btn-secondary",disabled:e||s.loadingBoard,"data-testid":"night-refresh-btn",onClick:()=>{s.refreshBoard()},children:"刷新看板"})}),s.loadError?u.jsx("p",{className:"error","data-testid":"night-load-error",children:s.loadError}):null,u.jsx(H8,{board:s,busy:e,onHarvest:c=>{l.onHarvest(c)},onOpenDiscard:l.openDiscard}),l.discardTarget?u.jsx(U8,{target:l.discardTarget,reason:l.discardReason,onReasonChange:l.setDiscardReason,force:l.forceDiscard,onForceChange:l.setForceDiscard,busy:e,onConfirm:()=>{l.onDiscard()},onCancel:()=>l.setDiscardTarget(null)}):null,u.jsx(F8,{wizard:l,busy:e}),u.jsx(O8,{board:s,busy:e})]})}const V8=({color:e="currentColor",size:t=24,className:n,...a})=>zn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},zn.createElement("path",{d:"M3 10H2V4.00293C2 3.44903 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.43788 22 4.00293V10H21V20.0015C21 20.553 20.5551 21 20.0066 21H3.9934C3.44476 21 3 20.5525 3 20.0015V10ZM19 10H5V19H19V10ZM4 5V8H20V5H4ZM9 12H15V14H9V12Z"})),K8=({color:e="currentColor",size:t=24,className:n,...a})=>zn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},zn.createElement("path",{d:"M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z"})),Y8=({color:e="currentColor",size:t=24,className:n,...a})=>zn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},zn.createElement("path",{d:"M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z"})),X8=({color:e="currentColor",size:t=24,className:n,...a})=>zn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},zn.createElement("path",{d:"M6.41421 15.89L16.5563 5.74785L15.1421 4.33363L5 14.4758V15.89H6.41421ZM7.24264 17.89H3V13.6473L14.435 2.21231C14.8256 1.82179 15.4587 1.82179 15.8492 2.21231L18.6777 5.04074C19.0682 5.43126 19.0682 6.06443 18.6777 6.45495L7.24264 17.89ZM3 19.89H21V21.89H3V19.89Z"})),X2=({color:e="currentColor",size:t=24,className:n,...a})=>zn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},zn.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM11 7H13V13H11V7Z"})),Ev=({color:e="currentColor",size:t=24,className:n,...a})=>zn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},zn.createElement("path",{d:"M13 9H21L11 24V15H4L13 0V9ZM11 11V7.22063L7.53238 13H13V17.3944L17.263 11H11Z"})),Z8=({color:e="currentColor",size:t=24,className:n,...a})=>zn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},zn.createElement("path",{d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12H4C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C9.25022 4 6.82447 5.38734 5.38451 7.50024L8 7.5V9.5H2V3.5H4L3.99989 5.99918C5.82434 3.57075 8.72873 2 12 2ZM13 7L12.9998 11.585L16.2426 14.8284L14.8284 16.2426L10.9998 12.413L11 7H13Z"})),W8=({color:e="currentColor",size:t=24,className:n,...a})=>zn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},zn.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 7H13V9H11V7ZM11 11H13V17H11V11Z"})),Q8=({color:e="currentColor",size:t=24,className:n,...a})=>zn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},zn.createElement("path",{d:"M10 3V5H5V19H19V14H21V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H10ZM17.5858 5H13V3H21V11H19V6.41421L12 13.4142L10.5858 12L17.5858 5Z"})),J8=({color:e="currentColor",size:t=24,className:n,...a})=>zn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},zn.createElement("path",{d:"M18.793 5.79285 12.5859 12 18.793 18.2071 20.2072 16.7928 15.4143 12 20.2072 7.20706 18.793 5.79285ZM5.20694 18.2072 11.414 12.0001 5.20694 5.793 3.79272 7.20721 8.58562 12.0001 3.79272 16.793 5.20694 18.2072Z"}));var Mo=H2();const ew=["command","query","operation","tool","server","symbol","path","file_path","filePath","pattern","glob","url"],tw=120,nw=800;function ku(e){if(!(!e||typeof e!="object"||Array.isArray(e)))return e}function rw(e){if(e!=null){if(typeof e=="string"){const t=e.trim();if(!t)return;try{return ku(JSON.parse(t))}catch{return}}return ku(e)}}function La(e,t){const n=e.replace(/\s+/g," ").trim();return n?n.length>t?`${n.slice(0,t)}…`:n:""}function Fn(e,t){const n=e[t];if(typeof n=="string"&&n.trim())return n.trim();if(typeof n=="number"&&Number.isFinite(n))return String(n)}function aw(e,t,n){const a=(e??"").toLowerCase();if(a==="bash"||a==="shell"){const s=Fn(t,"command");return s?La(s,n):void 0}if(a==="mcp"||a.startsWith("mcp_")){const s=Fn(t,"server"),l=Fn(t,"tool")??Fn(t,"name"),c=Fn(t,"query");return s&&l?La(`${s} · ${l}`,n):l?La(l,n):c?La(c,n):s?La(s,n):void 0}if(a==="lsp_navigation"||a.includes("lsp")){const s=[Fn(t,"operation"),Fn(t,"symbol"),Fn(t,"path")??Fn(t,"file_path")??Fn(t,"filePath")].filter(Boolean),l=Fn(t,"line")??Fn(t,"position");if(s.length===0&&!l)return;const c=s.join(" · ");return La(l?`${c}${c?":":""}${l}`:c,n)}if(a==="symbol_search"||a.includes("symbol_search")){const s=Fn(t,"query")??Fn(t,"symbol");return s?La(s,n):void 0}if(a==="read"||a==="read_symbol"||a==="read_enclosing"||a.startsWith("read_")){const s=Fn(t,"path")??Fn(t,"file_path")??Fn(t,"filePath"),l=Fn(t,"symbol"),c=Fn(t,"line");if(!s&&!l)return;const f=[s,l,c].filter(Boolean);return La(f.join(" · "),n)}}function iw(e,t){const n=t?.maxLen??tw,a=rw(e);if(!a){if(typeof e=="string"){const m=e.replace(/\s+/g," ").trim();return!m||m==="{}"?"":m.length>n?`${m.slice(0,n)}…`:m}return""}const s=aw(t?.toolName,a,n);if(s)return s;for(const m of ew){const h=a[m];if(typeof h=="string"&&h.trim())return La(h,n)}const l=Object.keys(a);if(l.length===0)return"";const c=a[l[0]],f=String(c??"").replace(/\s+/g," ").trim();return f?f.length>n?`${f.slice(0,n)}…`:f:""}function sw(e){const t=(e??"").toLowerCase();return t==="bash"||t==="shell"?{argsLabel:"命令",resultLabel:"输出"}:t==="mcp"||t.startsWith("mcp_")?{argsLabel:"参数",resultLabel:"结果"}:{argsLabel:"入参",resultLabel:"结果"}}function Z2(e){if(e==null)return"";if(typeof e=="string"){const a=e.trim();if(!a)return"";if(a.startsWith("{")&&a.endsWith("}")||a.startsWith("[")&&a.endsWith("]"))try{return Z2(JSON.parse(a))}catch{return e}return e}if(typeof e=="number"||typeof e=="boolean")return String(e);const t=ku(e);if(!t)try{return JSON.stringify(e,null,2)}catch{return String(e)}const n=t.content;if(Array.isArray(n)){const a=[];for(const s of n){const l=ku(s);l&&(l.type==="text"&&typeof l.text=="string"||typeof l.text=="string")&&a.push(l.text)}if(a.length>0)return a.join(`
|
|
13
|
-
`)}if(typeof t.text=="string")return t.text;if(typeof t.output=="string")return t.output;if(typeof t.message=="string")return t.message;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function lw(e){if(e==null)return"";try{return typeof e=="string"?e:JSON.stringify(e,null,2)}catch{return String(e)}}function ow(e,t){if(e===void 0)return{text:"",truncated:!1};const n=t?.maxLen??nw;return e.length<=n?{text:e,truncated:!1}:{text:`${e.slice(0,n)}…`,truncated:!0}}function cw(e,t){if(t===void 0||!Number.isFinite(e)||!Number.isFinite(t))return;const n=Math.round((t-e)/1e3);return n>0?n:void 0}function tr(){return window.__CONSOLE_CONFIRMATION_TOKEN__??""}function rs(e){return`${e}-${Math.random().toString(36).slice(2,10)}`}function wf(e,t){return new Promise((n,a)=>{if(t?.aborted){a(new DOMException("Aborted","AbortError"));return}const s=setTimeout(()=>{t?.removeEventListener("abort",l),n()},e),l=()=>{clearTimeout(s),a(new DOMException("Aborted","AbortError"))};t?.addEventListener("abort",l)})}function Eo(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function Sf(e){const t=new Date(e),n=new Date;return t.getFullYear()===n.getFullYear()&&t.getMonth()===n.getMonth()&&t.getDate()===n.getDate()?"今天":t.toLocaleDateString([],{month:"long",day:"numeric"})}function uw(e,t){return e?e.taskId===t.taskId&&e.updatedAt===t.updatedAt&&e.lastEventId===t.lastEventId&&e.operations.length===t.operations.length:!1}const W2={status:"idle",snapshot:null,error:null,reloading:!1,reloadError:null,mutationBusy:!1,mutationToken:null};function Hh(e){if(!e||typeof e!="object")return{message:"runtime snapshot request failed"};const t=e,n=t.error;if(n&&typeof n=="object"){const a=n;return{...typeof a.code=="string"&&a.code?{code:a.code}:{},...typeof t.status=="number"?{status:t.status}:{},message:typeof a.message=="string"&&a.message?a.message:"runtime snapshot request failed"}}return{...typeof t.status=="number"?{status:t.status}:{},message:typeof t=="object"&&"message"in t&&typeof t.message=="string"&&t.message?t.message:"runtime snapshot request failed"}}function dw(e,t){switch(t.type){case"load-start":return{...e,sessionId:t.sessionId,status:"loading",error:null};case"load-success":return e.snapshot&&e.sessionId===t.sessionId&&t.snapshot.revision<e.snapshot.revision?e:{...e,sessionId:t.sessionId,status:"ready",snapshot:t.snapshot,error:null,reloadError:null,reloading:!1};case"load-failure":return{...e,sessionId:t.sessionId,status:"error",error:t.error,snapshot:null};case"reload-start":return e.reloading?e:{...e,reloading:!0,reloadError:null,...e.status==="error"?{error:null}:{}};case"reload-success":return{...e,status:"ready",snapshot:t.snapshot,reloading:!1,reloadError:null,error:null,sessionId:t.snapshot.sessionId||e.sessionId};case"reload-failure":return{...e,reloading:!1,reloadError:t.error};case"mutation-start":return{...e,mutationBusy:!0,mutationToken:t.token};case"mutation-adopt":return e.mutationToken!==t.token||e.sessionId!==void 0&&e.sessionId!==t.sessionId||e.snapshot&&t.snapshot.revision<e.snapshot.revision?e:{...e,sessionId:t.sessionId,status:"ready",snapshot:t.snapshot,error:null,reloadError:null,reloading:!1};case"mutation-settle":return e.mutationToken!==t.token?e:{...e,mutationBusy:!1,mutationToken:null};case"mutation-reset":return{...e,mutationBusy:!1,mutationToken:null};case"reset":return{...W2};default:return e}}function Q2(e){const t=e.selection;return{...t.model?{model:{provider:t.model.provider,modelId:t.model.id}}:{},...t.thinkingSelection==="auto"?t.effectiveThinkingLevel?{thinkingLevel:t.effectiveThinkingLevel}:{}:{thinkingLevel:t.thinkingSelection}}}function fw(e,t,n,a){const s=n&&n.sessionId===a?Q2(n):{},l=s.model??e?.model,c=s.thinkingLevel??e?.thinkingLevel;return{readOnly:t.readOnly,systemPrompt:t.systemPrompt,resources:t.resources,suffix:t.suffix,...l?{model:l}:{},...c?{thinkingLevel:c}:{}}}function mw(e=W2){let t=e;const n=new Set;return{getState:()=>t,dispatch:a=>{t=dw(t,a);for(const s of n)s();return t},subscribe:a=>(n.add(a),()=>n.delete(a))}}const wn=mw();let Ti;function J2(e){return`/api/operator/v1/chat/sessions/${encodeURIComponent(e)}`}function hw(e){const t=Ti;if(Ti=e,!(t&&t.sessionId===e.sessionId&&t.origin===e.origin)){if((!t||t.sessionId!==e.sessionId)&&wn.dispatch({type:"mutation-reset"}),!e.sessionId){wn.dispatch({type:"reset"});return}wn.dispatch({type:"load-start",sessionId:e.sessionId}),e3(e.sessionId,e.origin)}}async function e3(e,t){try{const n=await fetch(`${t}${J2(e)}/runtime-snapshot`,{credentials:"include"}),a=await n.json().catch(()=>({}));if(Ti?.sessionId!==e)return;if(!n.ok){wn.dispatch({type:"load-failure",sessionId:e,error:{...Hh(a),status:n.status}});return}if(!a.snapshot){wn.dispatch({type:"load-failure",sessionId:e,error:{status:n.status,message:"runtime snapshot missing in response"}});return}wn.dispatch({type:"load-success",sessionId:e,snapshot:a.snapshot})}catch(n){if(Ti?.sessionId!==e)return;wn.dispatch({type:"load-failure",sessionId:e,error:{message:n instanceof Error?n.message:String(n)}})}}async function el(){const e=Ti;if(!e?.sessionId||wn.getState().reloading)return!1;const t=e.sessionId;wn.dispatch({type:"reload-start"});try{const n=await fetch(`${e.origin}${J2(t)}/reload`,{method:"POST",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":tr()},body:"{}"}),a=await n.json().catch(()=>({}));return Ti?.sessionId!==t?!1:n.ok?a.snapshot?(wn.dispatch({type:"reload-success",snapshot:a.snapshot}),!0):(wn.dispatch({type:"reload-failure",error:{status:n.status,message:"reload succeeded but snapshot missing"}}),!1):(wn.dispatch({type:"reload-failure",error:{...Hh(a),status:n.status}}),!1)}catch(n){return Ti?.sessionId!==t||wn.dispatch({type:"reload-failure",error:{message:n instanceof Error?n.message:String(n)}}),!1}}async function tl(){const e=Ti;if(!e?.sessionId)return!1;const t=e.sessionId;return wn.dispatch({type:"load-start",sessionId:t}),e3(t,e.origin),!0}function pw(e,t,n){return n?(wn.dispatch({type:"mutation-adopt",token:e,sessionId:t,snapshot:n}),wn.getState().snapshot===n):!1}function gw(e,t,n){return n.sessionRef.current?.sessionId!==t||wn.getState().mutationToken!==e?!1:(wn.dispatch({type:"mutation-settle",token:e}),!0)}function sl(){return S.useSyncExternalStore(wn.subscribe,wn.getState)}function t3(e){wn.dispatch(e)}function bw(){return wn.getState()}function vw(e,t,n){return`${e}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/skills/${encodeURIComponent(n)}/auto-invocation`}async function yw(e){const t=e.fetchImpl??fetch;try{const n=await t(vw(e.origin,e.sessionId,e.resourceId),{method:"PATCH",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":e.confirmationToken},body:JSON.stringify({autoInvocationEnabled:e.autoInvocationEnabled})}),a=await n.json().catch(()=>({}));if(!n.ok||a.ok===!1)return{ok:!1,error:{...Hh(a),status:n.status}};const s=a.preferenceSaved===!0,l=a.reloadApplied===!0;if(!s)return{ok:!1,error:{status:n.status,code:"PI_RESOURCE_PREFERENCES_WRITE_FAILED",message:"preference was not saved"}};if(!l){const c=a.error?.code??"PI_SESSION_BUSY",f=a.error?.message??"preference saved; current session is busy and was not reloaded";return{ok:!0,preferenceSaved:!0,reloadApplied:!1,...a.snapshot?{snapshot:a.snapshot}:{},partialBusy:{code:c,message:f}}}return{ok:!0,preferenceSaved:!0,reloadApplied:!0,...a.snapshot?{snapshot:a.snapshot}:{}}}catch(n){return{ok:!1,error:{message:n instanceof Error?n.message:String(n)}}}}function xw(e){return e.autoInvocationEnabled?{badge:"允许自动使用",help:"模型可自动选择该技能,也可通过 /skill:<name> 手动调用。"}:{badge:"已隐藏自动使用",help:`已从模型自动技能列表隐藏,仍可通过 /skill:${e.name} 手动调用。`}}function ww(e){const{summary:t,onRetry:n}=e,[a,s]=S.useState(!1),l=S.useRef(null),c=S.useId();if(S.useEffect(()=>{if(!a)return;const h=b=>{l.current?.contains(b.target)||s(!1)},p=b=>{b.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",h),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",p)}},[a]),t.total===0)return null;const f=t.errorCount>0?"error":"warning",m=t.groups.some(h=>h.items.some(p=>p.retryable));return u.jsxs("div",{className:"oc-diag-chip-wrap",ref:l,children:[u.jsxs("button",{type:"button",className:`oc-diag-chip is-${f}${a?" is-open":""}`,"aria-expanded":a,"aria-controls":c,onClick:()=>s(h=>!h),children:[u.jsx(X2,{size:14,"aria-hidden":"true"}),t.chipLabel]}),a?u.jsxs("div",{id:c,className:"oc-diag-popover",role:"region","aria-label":"加载提示",children:[t.groups.map(h=>u.jsxs("section",{className:"oc-diag-group",children:[u.jsxs("header",{className:"oc-diag-group-head",children:[u.jsx("strong",{children:h.heading}),u.jsx("span",{children:h.items.length})]}),u.jsx("p",{className:"oc-diag-group-hint",children:h.hint}),u.jsx("ul",{className:"oc-diag-list",children:h.items.map((p,b)=>u.jsxs("li",{className:`oc-diag-item is-${p.tone}`,children:[u.jsx("span",{className:"oc-diag-item-title",children:p.title}),p.detail?u.jsx("span",{className:"oc-diag-item-detail",children:p.detail}):null,p.shortPath?u.jsx("code",{className:"oc-diag-item-path",title:p.path,children:p.shortPath}):null]},`${h.kind}:${b}`))})]},h.kind)),m&&n?u.jsx("div",{className:"oc-diag-popover-actions",children:u.jsx("button",{type:"button",className:"btn btn-ghost",onClick:n,children:"再读一次"})}):null]}):null]})}const Sw=/name\s+"([^"]+)"\s+collision/i,kw=/invalid characters|must be lowercase/i,n3=/must not start or end with a hyphen/i,r3=/consecutive hyphens/i,Ew={"load-failed":{heading:"需要处理",hint:"有些清单没读完整,下面的列表可能不全。"},"invalid-name":{heading:"名称不规范",hint:"技能已经加载,还能用。名称请改成小写字母、数字和连字符,例如 sdd-requirement-analysis。"},collision:{heading:"同名未生效",hint:"同名技能只保留先扫到的那一份,后面的不会进当前会话。"},other:{heading:"其他提示",hint:"不影响你浏览当前列表。"}},Tw=["load-failed","invalid-name","collision","other"];function nu(e){if(!e)return;const t=e.replace(/\\/g,"/").split("/").filter(Boolean);if(t.length===0)return e;const n=t.at(-1);if(!n)return e;const a=t.at(-2);return a?`${a}/${n}`:n}function Tv(e){if(!e)return;const t=e.replace(/\\/g,"/").split("/").filter(Boolean);if(t.length===0)return;const n=t.at(-1);if(n)return/^skill\.md$/i.test(n)&&t.length>=2?t.at(-2):n.replace(/\.md$/i,"")}function a3(e,t){if(e.path){const n=e.path.replace(/\\/g,"/").toLowerCase(),a=t.path.replace(/\\/g,"/").toLowerCase();if(n===a||n.endsWith(a)||a.endsWith(n))return!0}return!!(e.skillName&&e.skillName===t.name)}function Nv(e){const t=e.trim();return t.length<=80?t:`${t.slice(0,79)}…`}function Nw(e){const t=`${e.code??""} ${e.message}`.toLowerCase();return t.includes("preference")?"自动使用偏好读不出来":t.includes("package")?"软件包清单没读完整":t.includes("skill")?"技能清单没读完整":t.includes("extension")?"扩展没读完整":t.includes("prompt")?"提示词没读完整":t.includes("theme")?"主题没读完整":t.includes("context")?"上下文文件没读完整":"有些内容没读完整"}function Cw(e){return r3.test(e)?"名称里不要连用两个连字符。现在这样也能用。":n3.test(e)?"名称开头和结尾不要用连字符。现在这样也能用。":"名称请只用小写字母、数字和连字符。现在这样也能用。"}function Rw(e){const t=(e.type??"warning").toLowerCase(),n=e.message??"",a=n.match(Sw)??(t==="collision"?n.match(/"([^"]+)"/):null);if(t==="collision"||a){const l=a?.[1]??Tv(e.path);return{kind:"collision",tone:"warning",title:l?`「${l}」有多份`:"有一份同名技能没生效",detail:"同名只保留先扫到的那一份,这份被盖掉了。",path:e.path,shortPath:nu(e.path),skillName:l,retryable:!1}}if(kw.test(n)||n3.test(n)||r3.test(n)){const l=Tv(e.path);return{kind:"invalid-name",tone:"warning",title:l??"有个技能名称不合规范",detail:Cw(n),path:e.path,shortPath:nu(e.path),skillName:l,retryable:!1}}return t==="error"||e.retryable===!0||e.code==="RESOURCE_LOAD_FAILED"||e.code==="PACKAGE_INVENTORY_FAILED"||e.code==="PI_RESOURCE_PREFERENCES_MALFORMED"?{kind:"load-failed",tone:"error",title:Nw(e),detail:Nv(n),path:e.path,shortPath:nu(e.path),retryable:e.retryable===!0}:{kind:"other",tone:t==="error"?"error":"warning",title:Nv(n)||"一条提示",path:e.path,shortPath:nu(e.path),retryable:!1}}function Aw(e){const t=e.map(Rw),n=new Map;for(const c of t){const f=n.get(c.kind)??[];f.push(c),n.set(c.kind,f)}const a=Tw.flatMap(c=>{const f=n.get(c);return f?.length?[{kind:c,...Ew[c],items:f}]:[]}),s=t.filter(c=>c.tone==="error").length,l=t.length-s;return{total:t.length,errorCount:s,warningCount:l,chipLabel:_w(s,l),groups:a}}function _w(e,t){return e>0&&t>0?`${e} 个问题 · ${t} 条提示`:e>0?e===1?"1 个问题":`${e} 个问题`:t===1?"1 条提示":`${t} 条提示`}function Iw(e,t){return t.some(n=>n.kind==="invalid-name"&&a3(n,e))}function Mw(e,t){return t.filter(n=>n.kind!=="collision"&&a3(n,e))}const i3=()=>window.__CONSOLE_CONFIRMATION_TOKEN__??"";function Ow(){const[e,t]=S.useState(0);return S.useEffect(()=>{const n=()=>{const l=document.querySelector(".och, .operator-chrome-fallback");t(l?Math.max(0,Math.round(l.getBoundingClientRect().bottom)):0)};n();const a=document.querySelector(".och, .operator-chrome-fallback"),s=a?new ResizeObserver(n):null;return a&&s?.observe(a),window.addEventListener("resize",n),()=>{s?.disconnect(),window.removeEventListener("resize",n)}},[]),e}function Dw(e){const t=Date.parse(e);return Number.isFinite(t)?new Date(t).toLocaleString([],{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):e}function jw({origin:e}){const[t,n]=S.useState(null),[a,s]=S.useState(null),[l,c]=S.useState(null),[f,m]=S.useState(!1),h=sl(),p=h.snapshot,b=h.reloading,y=h.reloadError,x=p?.diagnostics??[],k=S.useMemo(()=>Aw(x),[x]),N=async $=>{n($),c(null);{s(null);try{const D=await fetch(`${e}/api/operator/v1/pi/models-config`,{credentials:"include"}),M=await D.json();if(!D.ok)throw new Error(M.error?.message??"读取失败");s(M.data)}catch(D){c(D instanceof Error?D.message:String(D))}}},R=async $=>{m(!0),c(null);try{const D=await fetch(`${e}/api/operator/v1/pi/models-config`,{method:"PATCH",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":i3()},body:JSON.stringify($)}),M=await D.json();if(!D.ok)throw new Error(M.error?.message??"模型配置保存失败");s(M.data)}catch(D){c(D instanceof Error?D.message:String(D))}finally{m(!1)}},C=t==="models"?"Models":t==="skills"?"Skills":t==="mcp"?"MCP":"Plugins",_=Ow(),I=t&&typeof document<"u"?Mo.createPortal(u.jsx("div",{className:"oc-resource-backdrop",style:{"--oc-chrome-offset":`${_}px`},onMouseDown:$=>{$.target===$.currentTarget&&n(null)},children:u.jsxs("section",{className:"oc-resource-panel",role:"dialog","aria-modal":"true","aria-label":C,children:[u.jsxs("header",{className:"oc-resource-panel-head",children:[u.jsxs("div",{className:"oc-resource-panel-head-copy",children:[u.jsx("strong",{children:C}),u.jsx("span",{className:"oc-resource-panel-meta",children:t==="models"?"管理 models.json(改动会走确认门)":t==="skills"?"开关控制自动使用;这里是当前会话真正加载的技能":t==="mcp"?"只读;这里是当前会话真正加载的 MCP 服务和工具":"只读;这里是当前会话真正解析到的插件"})]}),u.jsxs("div",{className:"oc-resource-panel-head-actions",children:[u.jsx(ww,{summary:k,onRetry:()=>{tl()}}),u.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>n(null),children:"关闭"})]})]}),u.jsxs("div",{className:"oc-resource-panel-body",children:[l&&u.jsx("p",{className:"oc-resource-error",children:l}),t==="models"&&u.jsx(Lw,{busy:f,data:a,onMutate:R}),t==="skills"&&u.jsx(zw,{origin:e,sessionId:p?.sessionId,status:h.status,loadError:h.error,skills:p?.skills,hasSession:!!p?.sessionId,hasDiagnostics:k.total>0,diagnosticItems:k.groups.flatMap($=>$.items)}),t==="packages"&&u.jsx(qw,{status:h.status,loadError:h.error,packages:p?.packages,hasSession:!!p?.sessionId,hasDiagnostics:x.length>0}),t==="mcp"&&u.jsx(Fw,{status:h.status,loadError:h.error,inventory:p?.mcp,hasSession:!!p?.sessionId,hasDiagnostics:x.length>0})]}),u.jsxs("footer",{className:"oc-resource-panel-foot",children:[u.jsx("span",{className:"oc-resource-panel-meta",children:b?"正在重新加载会话…":y?`${y.code??"ERROR"}:${y.message}`:p?`快照 r${p.revision} · ${Dw(p.loadedAt)}`:"等待会话快照…"}),u.jsxs("div",{className:"oc-resource-panel-actions",children:[y&&u.jsx("button",{type:"button",className:"btn btn-ghost",disabled:b,onClick:()=>{el()},children:"重试"}),h.status==="error"&&u.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>{tl()},children:"重新读取快照"}),u.jsx("button",{type:"button",className:"btn btn-ghost",disabled:b,onClick:()=>{el()},children:"重新加载会话"})]})]})]})}),document.body):null;return u.jsxs("div",{className:"oc-governance",children:[u.jsxs("div",{className:"oc-governance-links",children:[u.jsx("button",{type:"button",onClick:()=>{N("models")},children:"Models"}),u.jsx("button",{type:"button",className:t==="skills"?"is-active":"",onClick:()=>n("skills"),children:"Skills"}),u.jsx("button",{type:"button",className:t==="packages"?"is-active":"",onClick:()=>n("packages"),children:"Plugins"}),u.jsx("button",{type:"button",className:t==="mcp"?"is-active":"",onClick:()=>n("mcp"),children:"MCP"})]}),I]})}function Lw({busy:e,data:t,onMutate:n}){const[a,s]=S.useState(!1),[l,c]=S.useState("add"),[f,m]=S.useState(""),[h,p]=S.useState(""),[b,y]=S.useState(""),[x,k]=S.useState(""),[N,R]=S.useState(""),[C,_]=S.useState(""),[I,$]=S.useState(!0),D=()=>{m(t?.providers?.[0]?.name??""),p(""),y(""),k(""),R(""),_(""),$(!0),c("add"),s(!0)},M=(G,j)=>{m(G),p(j.id),y(j.name??""),k(j.contextWindow!==void 0?String(j.contextWindow):""),R(j.maxTokens!==void 0?String(j.maxTokens):""),_((j.input??[]).join(",")),$(j.reasoning!==void 0?j.reasoning:!0),c("edit"),s(!0)},B=()=>s(!1),Y=async G=>{if(G.preventDefault(),!t||!f.trim()||!h.trim())return;const j=F=>{if(F.trim()==="")return;const H=Number(F.trim());return Number.isFinite(H)?H:void 0};await n({expectedRevision:t.revision,action:"upsert-model",provider:f.trim(),model:{id:h.trim(),...b.trim()?{name:b.trim()}:{},...j(x)!==void 0?{contextWindow:j(x)}:{},...j(N)!==void 0?{maxTokens:j(N)}:{},...C.trim()?{input:C.split(/[,,\s]+/).filter(Boolean)}:{},reasoning:I}}),s(!1)};return t?u.jsxs("div",{className:"oc-models-config",children:[u.jsx("p",{className:"oc-resource-panel-meta",children:"Console 不读取或写入 API key;credential 请通过 Pi CLI 配置。 编辑只改表单里的字段,模型配置里的其它字段不会被覆盖。"}),u.jsx("div",{className:"oc-model-toolbar",children:u.jsx("button",{type:"button",className:"btn btn-primary",disabled:e,onClick:D,children:"新增模型"})}),t.providers.length===0?u.jsx("p",{className:"oc-resource-empty",children:"models.json 中暂无 Provider(真实空态;用 Pi CLI 配置)。"}):null,t.providers.map(G=>u.jsxs("article",{className:"oc-model-provider",children:[u.jsxs("div",{className:"oc-model-provider-head",children:[u.jsx("strong",{children:G.name}),u.jsx("span",{children:G.credential.configured?"credential configured":"credential 未配置"})]}),G.models.map(j=>u.jsxs("div",{className:"oc-model-row",children:[u.jsx("span",{children:j.name?`${j.name} (${j.id})`:j.id}),u.jsxs("div",{className:"oc-model-row-actions",children:[u.jsx("button",{type:"button",disabled:e,onClick:()=>M(G.name,j),children:"编辑"}),u.jsx("button",{type:"button",disabled:e,onClick:()=>{window.confirm(`确认删除模型 ${G.name}/${j.id}?`)&&n({expectedRevision:t.revision,action:"remove-model",provider:G.name,model:{id:j.id}})},children:"删除"})]})]},j.id))]},G.name)),a?Mo.createPortal(u.jsx("div",{className:"oc-model-modal-backdrop","data-testid":"oc-model-modal",onMouseDown:G=>{G.target===G.currentTarget&&B()},children:u.jsx("div",{className:"oc-model-modal",role:"dialog","aria-modal":"true",children:u.jsxs("form",{className:"oc-model-form",onSubmit:G=>{Y(G)},children:[u.jsx("strong",{children:l==="edit"?`编辑模型 ${h}`:"新增模型"}),l==="add"?u.jsxs("label",{className:"oc-model-field",children:[u.jsx("span",{children:"Provider(下拉选择)"}),u.jsx("select",{required:!0,value:f,onChange:G=>m(G.target.value),children:t.providers.map(G=>u.jsx("option",{value:G.name,children:G.name},G.name))})]}):u.jsxs("label",{className:"oc-model-field",children:[u.jsx("span",{children:"Provider(编辑时不可修改)"}),u.jsx("input",{value:f,disabled:!0})]}),u.jsxs("label",{className:"oc-model-field",children:[u.jsx("span",{children:"模型 ID"}),u.jsx("input",{required:!0,placeholder:"如 deepseek-v4-flash3",value:h,onChange:G=>p(G.target.value)})]}),u.jsxs("label",{className:"oc-model-field",children:[u.jsx("span",{children:"显示名称(name)"}),u.jsx("input",{placeholder:"如 DeepSeek V4 Flash",value:b,onChange:G=>y(G.target.value)})]}),u.jsxs("label",{className:"oc-model-field",children:[u.jsx("span",{children:"contextWindow"}),u.jsx("input",{type:"number",min:0,placeholder:"如 1000000",value:x,onChange:G=>k(G.target.value)})]}),u.jsxs("label",{className:"oc-model-field",children:[u.jsx("span",{children:"maxTokens"}),u.jsx("input",{type:"number",min:0,placeholder:"如 384000",value:N,onChange:G=>R(G.target.value)})]}),u.jsxs("label",{className:"oc-model-field",children:[u.jsx("span",{children:"input(逗号分隔,如 text,image)"}),u.jsx("input",{placeholder:"text",value:C,onChange:G=>_(G.target.value)})]}),u.jsxs("label",{className:"oc-model-field",children:[u.jsx("span",{children:"reasoning"}),u.jsxs("select",{value:String(I),onChange:G=>$(G.target.value==="true"),children:[u.jsx("option",{value:"true",children:"true"}),u.jsx("option",{value:"false",children:"false"})]})]}),u.jsxs("div",{className:"oc-model-form-actions",children:[u.jsx("button",{type:"submit",disabled:e,children:e?"保存中…":l==="edit"?"保存修改":"新增模型"}),u.jsx("button",{type:"button",disabled:e,onClick:B,children:"取消"})]})]})})}),document.body):null]}):u.jsx("p",{className:"oc-resource-empty",children:"正在读取模型配置…"})}function Fh(e){return e.status==="loading"?u.jsx("p",{className:"oc-resource-empty",children:"会话快照加载中…"}):e.status==="error"?u.jsxs("div",{className:"oc-resource-error",role:"alert",children:[u.jsxs("span",{children:[e.loadError?.code?`${e.loadError.code}:`:"",e.loadError?.message??"会话快照读取失败"]}),u.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>{tl()},children:"重试"})]}):e.hasSession?u.jsx("p",{className:"oc-resource-empty",children:e.emptyText}):u.jsx("p",{className:"oc-resource-empty",children:"当前没有活动会话;打开会话后显示真实资源清单(真实空态)。"})}function zw(e){const t=e.skills??[],n=e.diagnosticItems??[],[a,s]=S.useState(null),[l,c]=S.useState(null),[f,m]=S.useState(null),[h,p]=S.useState(null),[b,y]=S.useState({});if(e.status!=="ready"||!e.hasSession)return u.jsx(Fh,{status:e.status,loadError:e.loadError,hasSession:e.hasSession,emptyText:"当前 session 未加载任何 Skills(真实空态)"});if(t.length===0&&!e.hasDiagnostics)return u.jsx("p",{className:"oc-resource-empty",children:"当前 session 未加载任何 Skills(真实空态,未伪造列表)。"});const x=new Map;for(const C of t){const _=C.scope||"unknown",I=x.get(_)??[];I.push(C),x.set(_,I)}const k=C=>Object.hasOwn(b,C.resourceId)?b[C.resourceId]:C.autoInvocationEnabled,N=async(C,_)=>{if(!e.sessionId||!C.resourceId||a)return;k(C),c(null),m(null),s(C.resourceId),y($=>({...$,[C.resourceId]:_}));const I=await yw({origin:e.origin,sessionId:e.sessionId,resourceId:C.resourceId,autoInvocationEnabled:_,confirmationToken:i3()});if(s(null),!I.ok){y($=>{const D={...$};return delete D[C.resourceId],D}),c(`${I.error.code?`${I.error.code}:`:""}${I.error.message}`);return}if(I.reloadApplied&&I.snapshot){t3({type:"load-success",sessionId:e.sessionId,snapshot:I.snapshot}),y($=>{const D={...$};return delete D[C.resourceId],D}),m(null);return}!I.reloadApplied&&I.partialBusy&&m(`设置已保存;当前会话正忙(${I.partialBusy.code}),请在本轮结束后点击「重新加载会话」。${I.partialBusy.message}`)},R=t.find(C=>(C.resourceId||C.path)===h)??t[0];return u.jsxs("div",{className:"oc-resource-lists",children:[l?u.jsx("p",{className:"oc-resource-error",role:"alert",children:l}):null,f?u.jsx("p",{className:"oc-skill-partial-notice",role:"status",children:f}):null,t.length===0?null:u.jsxs("div",{className:"oc-master-detail",children:[u.jsx("nav",{className:"oc-master-list","aria-label":"Skills 列表",children:[...x.entries()].map(([C,_])=>u.jsxs("div",{className:"oc-master-group",children:[u.jsx("div",{className:"oc-master-group-label",children:C}),_.map(I=>{const $=k(I),D=I.resourceId||I.path,M=R?.resourceId===I.resourceId&&R?.path===I.path,B=Iw(I,n);return u.jsxs("button",{type:"button",className:`oc-master-item${M?" is-active":""}${$?"":" is-off"}`,onClick:()=>p(D),title:I.path,children:[u.jsx("span",{"aria-hidden":"true",className:"oc-master-dot"}),u.jsx("span",{className:"oc-master-name",children:I.name}),B?u.jsx("span",{className:"oc-master-flag",title:"名称不合规范,技能仍可用",children:"提示"}):null]},`${C}:${D}`)})]},C))}),R?u.jsx(Bw,{skill:R,enabled:k(R),pending:a===R.resourceId,notices:Mw(R,n),onToggle:N}):u.jsx("div",{className:"oc-detail-empty",children:"选择左侧技能看详情"})]})]})}function Bw(e){const{skill:t,enabled:n,pending:a,notices:s}=e,l=xw({name:t.name,autoInvocationEnabled:n});return u.jsxs("article",{className:"oc-detail",children:[u.jsxs("header",{className:"oc-detail-head",children:[t.scope?u.jsx("span",{className:"oc-scope-badge",children:t.scope}):null,u.jsx("code",{className:"oc-detail-path",title:t.path,children:t.path}),u.jsx("button",{type:"button",className:`oc-toggle${n?" is-on":""}`,role:"switch","aria-checked":n,"aria-label":`允许自动使用 ${t.name}`,disabled:a||!t.resourceId,title:a?"保存中…":l.help,onClick:()=>{e.onToggle(t,!n)},children:u.jsx("span",{className:"oc-toggle-knob","aria-hidden":"true"})})]}),u.jsxs("div",{className:"oc-detail-fields",children:[u.jsxs("section",{className:"oc-detail-field",children:[u.jsx("span",{className:"oc-detail-label",children:"名称"}),u.jsx("span",{className:"oc-detail-value oc-mono",children:t.name})]}),t.description?u.jsxs("section",{className:"oc-detail-field",children:[u.jsx("span",{className:"oc-detail-label",children:"说明"}),u.jsx("span",{className:"oc-detail-value",children:t.description})]}):null,u.jsxs("section",{className:"oc-detail-field",children:[u.jsx("span",{className:"oc-detail-label",children:"状态"}),u.jsx("span",{className:"oc-detail-value",children:l.badge})]}),t.source?u.jsxs("section",{className:"oc-detail-field",children:[u.jsx("span",{className:"oc-detail-label",children:"来源"}),u.jsx("span",{className:"oc-detail-value oc-mono",children:t.source})]}):null]}),s.length>0?u.jsx("div",{className:"oc-skill-notices",children:s.map((c,f)=>u.jsx("p",{className:"oc-skill-notice",children:c.detail??c.title},`${c.kind}:${f}`))}):null]})}const Uw={extension:"Extensions",skill:"Skills",prompt:"Prompts",theme:"Themes"};function s3(e){return Array.isArray(e.diagnostics)&&e.diagnostics.length>0?"error":e.enabled?e.version?"installed":"loaded":"disabled"}function qw(e){const t=e.packages??[];if(e.status!=="ready"||!e.hasSession)return u.jsx(Fh,{status:e.status,loadError:e.loadError,hasSession:e.hasSession,emptyText:"当前会话没有插件(真实空态)"});if(t.length===0&&!e.hasDiagnostics)return u.jsx("p",{className:"oc-resource-empty",children:"当前会话没有插件(真实空态,未伪造列表)。"});const[n,a]=S.useState(null),s=new Map;for(const f of t){const m=s.get(f.scope)??[];m.push(f),s.set(f.scope,m)}const l=f=>`${f.scope}:${f.spec}`,c=t.find(f=>l(f)===n)??t[0];return u.jsx("div",{className:"oc-resource-lists",children:t.length===0?null:u.jsxs("div",{className:"oc-master-detail",children:[u.jsx("nav",{className:"oc-master-list","aria-label":"插件列表",children:[...s.entries()].map(([f,m])=>u.jsxs("div",{className:"oc-master-group",children:[u.jsx("div",{className:"oc-master-group-label",children:f}),m.map(h=>{const p=s3(h);return u.jsxs("button",{type:"button",className:`oc-master-item${l(h)===(c?l(c):"")?" is-active":""}`,onClick:()=>a(l(h)),title:h.spec,children:[u.jsx("span",{"aria-hidden":"true",className:`oc-master-dot is-${p}`}),u.jsx("span",{className:"oc-master-name",children:h.spec})]},l(h))})]},f))}),c?u.jsx(Hw,{pkg:c}):u.jsx("div",{className:"oc-detail-empty",children:"选择左侧 Package 查看详情"})]})})}function Hw(e){const{pkg:t}=e,n=s3(t),a=new Map;for(const s of t.resolved??[]){const l=Uw[s.type]??s.type,c=a.get(l)??[];c.push(s),a.set(l,c)}return u.jsxs("article",{className:"oc-detail",children:[u.jsxs("header",{className:"oc-detail-head",children:[t.scope?u.jsx("span",{className:"oc-scope-badge",children:t.scope}):null,u.jsx("code",{className:"oc-detail-path",title:t.spec,children:t.spec}),u.jsx("span",{className:`oc-package-status is-${n}`,children:n})]}),u.jsxs("div",{className:"oc-detail-fields",children:[t.packageName?u.jsxs("section",{className:"oc-detail-field",children:[u.jsx("span",{className:"oc-detail-label",children:"Package"}),u.jsx("span",{className:"oc-detail-value oc-mono",children:t.packageName})]}):null,t.version?u.jsxs("section",{className:"oc-detail-field",children:[u.jsx("span",{className:"oc-detail-label",children:"Version"}),u.jsxs("span",{className:"oc-detail-value oc-mono",children:["v",t.version]})]}):null,t.configuredVersion?u.jsxs("section",{className:"oc-detail-field",children:[u.jsx("span",{className:"oc-detail-label",children:"Configured"}),u.jsx("span",{className:"oc-detail-value oc-mono",children:t.configuredVersion})]}):null,u.jsxs("section",{className:"oc-detail-field",children:[u.jsx("span",{className:"oc-detail-label",children:"状态"}),u.jsx("span",{className:"oc-detail-value",children:t.enabled?"loaded":"disabled"})]}),t.installedPath?u.jsxs("section",{className:"oc-detail-field",children:[u.jsx("span",{className:"oc-detail-label",children:"Installed path"}),u.jsx("span",{className:"oc-detail-value oc-mono",title:t.installedPath,children:t.installedPath})]}):null,t.cwd?u.jsxs("section",{className:"oc-detail-field",children:[u.jsx("span",{className:"oc-detail-label",children:"Cwd"}),u.jsx("span",{className:"oc-detail-value oc-mono",children:t.cwd})]}):null]}),a.size>0?u.jsx("div",{className:"oc-package-resources",children:[...a.entries()].map(([s,l])=>u.jsxs("section",{className:"oc-package-group",children:[u.jsxs("header",{className:"oc-resource-group-head",children:[u.jsx("strong",{children:s}),u.jsxs("span",{children:[l.length," 项"]})]}),u.jsx("ul",{className:"oc-resource-sub-list",children:l.map((c,f)=>u.jsxs("li",{children:[u.jsx("span",{children:c.name||c.path}),u.jsxs("span",{className:"oc-resource-panel-meta",children:[c.scope,c.source?` · ${c.source}`:""]}),u.jsx("code",{children:c.path})]},`${s}:${f}`))})]},s))}):u.jsx("p",{className:"oc-resource-panel-meta",children:"未解析出扩展/技能/提示词/主题(真实空态)"}),Array.isArray(t.diagnostics)&&t.diagnostics.length>0?u.jsx("div",{className:"oc-package-diagnostics",children:t.diagnostics.map((s,l)=>u.jsx("span",{children:s},l))}):null]})}function Cv(e){return e==="loaded"?"已加载":e==="disabled"?"已关闭":"已配置"}function Fw(e){const t=e.inventory?.servers??[],n=e.inventory?.unassignedTools??[],[a,s]=S.useState(null);if(e.status!=="ready"||!e.hasSession)return u.jsx(Fh,{status:e.status,loadError:e.loadError,hasSession:e.hasSession,emptyText:"当前会话还没加载 MCP"});if(t.length===0&&n.length===0&&!e.hasDiagnostics)return u.jsx("p",{className:"oc-resource-empty",children:"当前会话没有 MCP 服务,也没有扩展注册的 MCP 工具。"});const l=t.find(c=>c.name===a)??t[0];return u.jsx("div",{className:"oc-resource-lists",children:t.length===0&&n.length===0?null:u.jsxs("div",{className:"oc-master-detail",children:[u.jsx("nav",{className:"oc-master-list","aria-label":"MCP 服务列表",children:t.length>0?u.jsxs("div",{className:"oc-master-group",children:[u.jsx("div",{className:"oc-master-group-label",children:"服务"}),t.map(c=>{const f=l?.name===c.name;return u.jsxs("button",{type:"button",className:`oc-master-item${f?" is-active":""}${c.enabled?"":" is-off"}`,onClick:()=>s(c.name),title:c.configPath??c.name,children:[u.jsx("span",{"aria-hidden":"true",className:`oc-master-dot is-${c.status}`}),u.jsx("span",{className:"oc-master-name",children:c.name})]},`${c.scope}:${c.name}`)})]}):null}),l?u.jsx(Pw,{server:l}):n.length>0?u.jsx($w,{tools:n}):u.jsx("div",{className:"oc-detail-empty",children:"选择左侧服务看详情"})]})})}function Pw(e){const{server:t}=e;return u.jsxs("article",{className:"oc-detail",children:[u.jsxs("header",{className:"oc-detail-head",children:[u.jsx("span",{className:"oc-scope-badge",children:t.scope}),u.jsx("code",{className:"oc-detail-path",title:t.configPath??t.name,children:t.name}),u.jsx("span",{className:`oc-package-status is-${t.status}`,children:Cv(t.status)})]}),u.jsxs("div",{className:"oc-detail-fields",children:[u.jsxs("section",{className:"oc-detail-field",children:[u.jsx("span",{className:"oc-detail-label",children:"状态"}),u.jsx("span",{className:"oc-detail-value",children:Cv(t.status)})]}),t.transport?u.jsxs("section",{className:"oc-detail-field",children:[u.jsx("span",{className:"oc-detail-label",children:"传输"}),u.jsx("span",{className:"oc-detail-value oc-mono",children:t.transport})]}):null,t.command?u.jsxs("section",{className:"oc-detail-field",children:[u.jsx("span",{className:"oc-detail-label",children:"命令"}),u.jsx("span",{className:"oc-detail-value oc-mono",children:t.command})]}):null,t.url?u.jsxs("section",{className:"oc-detail-field",children:[u.jsx("span",{className:"oc-detail-label",children:"地址"}),u.jsx("span",{className:"oc-detail-value oc-mono",children:t.url})]}):null,t.configPath?u.jsxs("section",{className:"oc-detail-field",children:[u.jsx("span",{className:"oc-detail-label",children:"配置"}),u.jsx("span",{className:"oc-detail-value oc-mono",title:t.configPath,children:t.configPath})]}):null]}),t.tools.length>0?u.jsx("div",{className:"oc-package-resources",children:u.jsxs("section",{className:"oc-package-group",children:[u.jsxs("header",{className:"oc-resource-group-head",children:[u.jsx("strong",{children:"工具"}),u.jsxs("span",{children:[t.tools.length," 项"]})]}),u.jsx("ul",{className:"oc-resource-sub-list",children:t.tools.map(n=>u.jsxs("li",{children:[u.jsx("span",{children:n.name}),u.jsx("span",{className:"oc-resource-panel-meta",children:n.active?"当前可用":"已注册未激活"}),n.description?u.jsx("code",{children:n.description}):null]},n.name))})]})}):u.jsx("p",{className:"oc-resource-panel-meta",children:"配置里有这个服务,当前会话还没注册出工具。"})]})}function $w(e){return u.jsxs("article",{className:"oc-detail",children:[u.jsxs("header",{className:"oc-detail-head",children:[u.jsx("span",{className:"oc-scope-badge",children:"session"}),u.jsx("code",{className:"oc-detail-path",children:"扩展工具"})]}),u.jsx("p",{className:"oc-resource-panel-meta",children:"这些工具已经进当前会话,但对不上 mcp.json 里的服务名。"}),u.jsx("ul",{className:"oc-resource-sub-list",children:e.tools.map(t=>u.jsxs("li",{children:[u.jsx("span",{children:t.name}),u.jsx("span",{className:"oc-resource-panel-meta",children:t.active?"当前可用":"已注册未激活"}),t.description?u.jsx("code",{children:t.description}):null]},t.name))})]})}const Eu=10,l3="loop-console.operator-chat.sidebar-split.v1",ss=45,Hu=28,Fu=70,Rv=5,Av=10;function Ws(e){return Number.isFinite(e)?Math.min(Fu,Math.max(Hu,Math.round(e))):ss}function Gw(e){if(e==null||e==="")return null;const t=Number(e);if(!Number.isFinite(t))return null;const n=Math.round(t);return n<Hu||n>Fu?null:n}function Vw(e=o3()){if(!e)return ss;try{return Gw(e.getItem(l3))??ss}catch{return ss}}function _v(e,t=o3()){const n=Ws(e);if(!t)return n;try{t.setItem(l3,String(n))}catch{}return n}function Kw(e,t,n=!1){const a=Ws(e);switch(t){case"ArrowUp":return Ws(a-(n?Av:Rv));case"ArrowDown":return Ws(a+(n?Av:Rv));case"Home":return Hu;case"End":return Fu;case"Enter":return ss;default:return null}}function Iv(e,t,n){if(!Number.isFinite(n)||n<=0)return ss;const a=(e-t)/n;return Ws(a*100)}function o3(){try{return typeof globalThis>"u"?null:globalThis.localStorage??null}catch{return null}}const Mv='a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';function Pu(e){const{open:t,containerRef:n,triggerRef:a,onEscape:s}=e,l=S.useRef(null),c=S.useRef(!1);S.useEffect(()=>{if(t){if(!c.current){const f=document.activeElement;l.current=a?.current??(f instanceof HTMLElement?f:null);const m=n.current;m&&(m.querySelector(Mv)??m).focus?.(),c.current=!0}return()=>{if(!c.current)return;const f=a?.current??l.current;f&&document.contains(f)&&f.focus(),l.current=null,c.current=!1}}c.current=!1},[t,n,a]),S.useEffect(()=>{if(!t)return;const f=n.current;if(!f)return;const m=h=>{if(h.key==="Escape"){h.preventDefault(),s?.();return}if(h.key!=="Tab")return;const p=Array.from(f.querySelectorAll(Mv)).filter(k=>!k.hasAttribute("disabled")&&k.tabIndex!==-1);if(p.length===0){h.preventDefault(),f.focus?.();return}const b=p[0],y=p[p.length-1],x=document.activeElement;h.shiftKey?(x===b||!f.contains(x))&&(h.preventDefault(),y.focus()):(x===y||!f.contains(x))&&(h.preventDefault(),b.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[t,n,s])}function Yw(e){const{item:t,active:n,streamingNow:a,turnPhaseNow:s,state:l,deleteConfirming:c,deleting:f}=e,m=s??t.turnPhase,h=a||m==="running"||m==="stopping"||!!t.activeTurnId,p=t.deferredTurn?.state==="failed"?"发送失败":t.deferredTurn?.state==="dispatching"||t.deferredTurn?.state==="accepted"?"发送中":t.deferredTurn?.state==="queued"?"待发送":null,b=t.title||t.displayTitle||"未命名对话",y=S.useRef(null),x=S.useRef(null),[k,N]=S.useState(null),R=S.useRef(null),C=()=>{R.current!==null&&(window.clearTimeout(R.current),R.current=null)},_=()=>{C(),N(null)},I=M=>{if(!(M.scrollWidth>M.clientWidth+1)){_();return}const Y=M.getBoundingClientRect(),G=12,j=Math.min(360,window.innerWidth-G*2),F=Y.left,H=Math.max(G,Math.min(F,window.innerWidth-G-j));N({x:H,y:Y.top+Y.height/2})},$=M=>{M&&(C(),R.current=window.setTimeout(()=>I(M),350))};S.useEffect(()=>{const M=()=>_(),B=Y=>{Y.key==="Escape"&&_()};return window.addEventListener("scroll",M,!0),window.addEventListener("keydown",B),()=>{window.removeEventListener("scroll",M,!0),window.removeEventListener("keydown",B),C()}},[]),S.useEffect(()=>{c&&x.current?.focus()},[c]);const D=`oc-session-tip-${t.sessionId}`;return u.jsxs("div",{className:`oc-session-item${n?" is-active":""}${c?" is-delete-confirming":""}`,"data-session-id":t.sessionId,children:[u.jsxs("button",{type:"button",className:"oc-session-main",disabled:f,onClick:e.onActivate,onMouseEnter:M=>{const B=M.currentTarget.querySelector("strong");B instanceof HTMLElement&&$(B)},onMouseLeave:_,onFocus:M=>{const B=M.currentTarget.querySelector("strong");B instanceof HTMLElement&&$(B)},onBlur:_,"aria-describedby":k?D:void 0,children:[u.jsx("strong",{ref:y,children:b}),u.jsx("span",{children:new Date(t.updatedAt).toLocaleString()})]}),h?u.jsx("span",{className:"oc-session-running","aria-label":"对话进行中",title:"对话进行中",children:u.jsx("span",{className:"oc-spinner","aria-hidden":"true"})}):null,p?u.jsx("span",{className:`oc-session-queue-state is-${t.deferredTurn?.state}`,children:p}):null,u.jsx("div",{className:`oc-session-actions${c?" is-delete-confirm":""}`,children:c?u.jsxs(u.Fragment,{children:[u.jsx("button",{type:"button",ref:x,className:"oc-session-delete-confirm",disabled:f,"aria-busy":f||void 0,"aria-label":`确认删除会话:${b}`,onClick:M=>{M.stopPropagation(),e.onConfirmDelete()},children:f?"删除中…":"删除"}),u.jsx("button",{type:"button",className:"oc-session-delete-cancel",disabled:f,"aria-label":"取消删除会话",onClick:M=>{M.stopPropagation(),e.onCancelDelete()},children:"取消"})]}):u.jsxs(u.Fragment,{children:[u.jsx("button",{type:"button",className:"oc-session-menu",title:"重命名会话","aria-label":"重命名会话",onClick:M=>{M.stopPropagation();const B=window.prompt("会话名称",t.title??"");B!==null&&e.onRename(B)},children:u.jsx(X8,{size:16,"aria-hidden":"true"})}),u.jsx("button",{type:"button",className:"oc-session-menu",title:l==="active"?"归档会话":"恢复会话","aria-label":l==="active"?"归档会话":"恢复会话",onClick:M=>{M.stopPropagation(),e.onSetState(l==="active"?"archived":"active")},children:l==="active"?u.jsx(V8,{size:16,"aria-hidden":"true"}):u.jsx(Z8,{size:16,"aria-hidden":"true"})}),u.jsx("button",{type:"button",className:"oc-session-menu oc-session-delete","data-session-delete-id":t.sessionId,title:"删除会话","aria-label":"删除会话",onClick:M=>{M.stopPropagation(),e.onRequestDelete()},children:u.jsx(Y8,{size:16,"aria-hidden":"true"})})]})}),k?Mo.createPortal(u.jsx("div",{id:D,role:"tooltip",className:"oc-session-title-tooltip",style:{position:"fixed",left:k.x,top:k.y,transform:"translateY(-50%)"},children:b}),document.body):null]})}function Xw(e){return[...e].sort((t,n)=>t.kind!==n.kind?t.kind==="directory"?-1:1:t.name.localeCompare(n.name,void 0,{sensitivity:"base"}))}function Zw({open:e}){return u.jsx("svg",{className:`oc-tree-chevron${e?" is-open":""}`,width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",children:u.jsx("path",{d:"M4.2 2.4 7.8 6 4.2 9.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ww({open:e}){return e?u.jsxs("svg",{className:"oc-tree-glyph is-folder-open",width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:[u.jsx("path",{d:"M1.5 4.2h3.1l1.1 1.2H12a.8.8 0 0 1 .8.8v5a.8.8 0 0 1-.8.8H2a.8.8 0 0 1-.8-.8V5a.8.8 0 0 1 .8-.8Z",fill:"currentColor",opacity:"0.88"}),u.jsx("path",{d:"M1.8 5.8h10.4l-.7 5.2H2.5L1.8 5.8Z",fill:"currentColor",opacity:"0.55"})]}):u.jsx("svg",{className:"oc-tree-glyph is-folder",width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:u.jsx("path",{d:"M1.5 3.8h3.2l1 1.1H12a.8.8 0 0 1 .8.8v5.5a.8.8 0 0 1-.8.8H2a.8.8 0 0 1-.8-.8V4.6a.8.8 0 0 1 .8-.8Z",fill:"currentColor",opacity:"0.78"})})}function Qw(){return u.jsxs("svg",{className:"oc-tree-glyph is-file",width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:[u.jsx("path",{d:"M3.2 1.6h5.1L10.8 4v8.4a.8.8 0 0 1-.8.8H3.2a.8.8 0 0 1-.8-.8V2.4a.8.8 0 0 1 .8-.8Z",fill:"currentColor",opacity:"0.55"}),u.jsx("path",{d:"M8.3 1.7v2.5h2.4",fill:"none",stroke:"currentColor",strokeWidth:"1.1",strokeLinejoin:"round",opacity:"0.75"})]})}function Jw(){return u.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:u.jsx("path",{d:"M3 3.5h10v2H3v-2Zm0 3.5h10v2H3V7Zm0 3.5h7V13H3v-2Z",fill:"currentColor"})})}function eS(){return u.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:u.jsx("path",{d:"M8 3v10M3 8h10",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}function tS(){return u.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:u.jsx("path",{d:"M8 2.2 13 4.5v3.2c0 3.1-2.1 5.5-5 6.3-2.9-.8-5-3.2-5-6.3V4.5L8 2.2Z",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"})})}function nS(e){const t=e.sessions.slice(0,Eu),[n,a]=S.useState(()=>Vw()),[s,l]=S.useState(!1),[c,f]=S.useState(null),[m,h]=S.useState(null),p=S.useRef(null),b=S.useRef(null),y=S.useRef(!1),x=e.layoutMode==="comfortable"&&e.open,k=e.layoutMode==="compact",N=e.drawerOpen&&(e.layoutMode==="compact"||e.layoutMode==="narrow"),R=S.useCallback((ee=!0)=>{if(m)return;const K=c;f(null),!(!ee||!K)&&window.requestAnimationFrame(()=>{const X=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(K):K.replace(/["\\]/g,"\\$&");document.querySelector(`[data-session-delete-id="${X}"]`)?.focus()})},[m,c]),C=S.useCallback(()=>{m||(f(null),e.onCloseDrawer())},[m,e.onCloseDrawer]),_=S.useCallback(()=>{if(c){R();return}C()},[R,C,c]);Pu({open:N,containerRef:b,triggerRef:e.drawerTriggerRef,onEscape:_}),S.useEffect(()=>{y.current&&!N&&!m&&f(null),y.current=N},[m,N]),S.useEffect(()=>{if(N||!c)return;const ee=K=>{K.key==="Escape"&&(K.preventDefault(),R())};return document.addEventListener("keydown",ee),()=>document.removeEventListener("keydown",ee)},[R,c,N]),S.useEffect(()=>{c&&!t.some(ee=>ee.sessionId===c)&&f(null),m&&!t.some(ee=>ee.sessionId===m)&&h(null)},[m,c,t]);const I=S.useCallback(async ee=>{if(!(m||c!==ee)){h(ee);try{await e.onDelete(ee)}finally{h(null),f(null)}}},[m,c,e.onDelete]),$=S.useCallback(()=>{m||(R(!1),e.onCreate())},[R,m,e.onCreate]),D=S.useCallback(()=>{m||(R(!1),e.onToggleOpen())},[R,m,e.onToggleOpen]),M=S.useCallback((ee,K)=>{const X=Ws(ee);a(X),K&&_v(X)},[]),B=S.useCallback(ee=>{const K=Kw(n,ee.key,ee.shiftKey);K!=null&&(ee.preventDefault(),M(K,!0))},[M,n]),Y=S.useCallback(ee=>{ee.preventDefault(),ee.currentTarget.setPointerCapture(ee.pointerId),l(!0);const X=p.current;if(!X)return;const V=X.getBoundingClientRect();M(Iv(ee.clientY,V.top,V.height),!1)},[M]),G=S.useCallback(ee=>{if(!ee.currentTarget.hasPointerCapture(ee.pointerId))return;const K=p.current;if(!K)return;const X=K.getBoundingClientRect();M(Iv(ee.clientY,X.top,X.height),!1)},[M]),j=S.useCallback(ee=>{ee.currentTarget.hasPointerCapture(ee.pointerId)&&ee.currentTarget.releasePointerCapture(ee.pointerId),l(!1),_v(n)},[n]),F=S.useCallback(()=>{M(ss,!0)},[M]),H=u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"oc-sidebar-split",ref:p,style:{"--oc-session-share":`${n}%`,"--oc-repo-share":`${100-n}%`},"data-dragging":s?"true":"false",children:[u.jsxs("section",{className:"oc-sidebar-section oc-sessions",children:[u.jsxs("header",{children:[u.jsx("strong",{children:"会话"}),u.jsxs("div",{className:"oc-sidebar-header-actions",children:[u.jsx("button",{type:"button",className:"btn btn-ghost",onClick:$,disabled:e.creatingSession,"aria-busy":e.creatingSession||void 0,children:e.creatingSession?"创建中…":"新建"}),e.layoutMode==="comfortable"?u.jsx("button",{type:"button",className:"oc-sidebar-toggle",onClick:D,"aria-expanded":!0,"aria-label":"收起侧栏",title:"收起侧栏",children:u.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:u.jsx("path",{d:"M8.8 2.6 5.2 7l3.6 4.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}):u.jsx("button",{type:"button",className:"oc-sidebar-toggle",onClick:C,"aria-label":"关闭侧栏抽屉",title:"关闭",children:u.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:u.jsx("path",{d:"M3.5 3.5 10.5 10.5M10.5 3.5 3.5 10.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})})]})]}),u.jsxs("div",{className:"oc-session-scroll",children:[["active","archived"].map(ee=>{const K=t.filter(X=>X.state===ee);return K.length?u.jsxs("div",{className:"oc-session-group",children:[u.jsx("small",{children:ee==="active"?"进行中":"已归档"}),K.map(X=>u.jsx(Yw,{item:X,active:e.activeSessionId===X.sessionId,streamingNow:e.activeSessionId===X.sessionId&&e.activeSessionStreaming===!0,turnPhaseNow:e.activeSessionId===X.sessionId?e.activeSessionTurnPhase:void 0,state:ee,deleteConfirming:c===X.sessionId,deleting:m===X.sessionId,onActivate:()=>{m||(R(!1),e.onActivate(X.sessionId))},onRename:V=>e.onRename(X.sessionId,V),onSetState:V=>e.onSetState(X.sessionId,V),onRequestDelete:()=>{m||f(X.sessionId)},onConfirmDelete:()=>{I(X.sessionId)},onCancelDelete:()=>R()},X.sessionId))]},ee):null}),t.length===0?u.jsx("p",{className:"oc-tree-empty",children:"暂无会话,点击上方新建。"}):null]})]}),u.jsx("div",{className:"oc-sidebar-separator",role:"separator","aria-orientation":"horizontal","aria-valuemin":Hu,"aria-valuemax":Fu,"aria-valuenow":n,"aria-label":"调整会话与仓库高度比例",tabIndex:0,onKeyDown:B,onPointerDown:Y,onPointerMove:G,onPointerUp:j,onPointerCancel:j,onDoubleClick:F}),u.jsxs("section",{className:"oc-sidebar-section oc-explorer",children:[u.jsxs("header",{children:[u.jsx("strong",{children:"仓库"}),u.jsx("button",{type:"button",className:"btn btn-ghost",onClick:e.onRefreshTree,children:"刷新"})]}),u.jsx("p",{className:"oc-explorer-hint",children:"单击插入 @路径 · 双击预览"}),e.treeError&&u.jsx("p",{className:"oc-sidebar-error",children:e.treeError}),u.jsx("div",{className:"oc-tree-scroll",children:u.jsx(c3,{entries:e.tree[""]??[],tree:e.tree,expanded:e.expanded,depth:0,onToggle:e.onToggleDir,onInsert:e.onInsert,onPreview:e.onPreview})})]})]}),u.jsx(jw,{origin:e.origin})]});return u.jsxs(u.Fragment,{children:[k?u.jsxs("nav",{className:"oc-sidebar-rail","aria-label":"紧凑侧栏",children:[u.jsx("button",{type:"button",className:"oc-sidebar-rail-btn","aria-label":"打开会话与仓库",title:"会话与仓库","aria-expanded":N,onClick:()=>N?C():e.onOpenDrawer(),children:u.jsx(Jw,{})}),u.jsx("button",{type:"button",className:"oc-sidebar-rail-btn","aria-label":e.creatingSession?"创建会话中":"新建会话",title:e.creatingSession?"创建中…":"新建会话",onClick:$,disabled:e.creatingSession,"aria-busy":e.creatingSession||void 0,children:u.jsx(eS,{})}),u.jsx("button",{type:"button",className:"oc-sidebar-rail-btn","aria-label":"治理入口",title:"治理",onClick:()=>N?C():e.onOpenDrawer(),children:u.jsx(tS,{})})]}):null,e.layoutMode==="comfortable"?u.jsx("aside",{className:`oc-sidebar${x?"":" is-collapsed"}`,"aria-label":"会话与仓库",children:x?H:u.jsx("button",{type:"button",className:"oc-sidebar-toggle is-collapsed",onClick:D,"aria-expanded":!1,"aria-label":"展开侧栏",title:"展开侧栏",children:u.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:u.jsx("path",{d:"M5.2 2.6 8.8 7 5.2 11.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})})}):null,N?u.jsxs(u.Fragment,{children:[u.jsx("button",{type:"button",className:"oc-overlay-backdrop","aria-label":"关闭侧栏遮罩",onClick:C}),u.jsx("aside",{ref:b,className:"oc-sidebar oc-sidebar-drawer","aria-label":"会话与仓库抽屉",role:"dialog","aria-modal":"true",tabIndex:-1,children:H})]}):null]})}function c3(e){const t=S.useMemo(()=>Xw(e.entries),[e.entries]);return t.length?u.jsx("ul",{className:"oc-tree",role:e.depth===0?"tree":"group",children:t.map(n=>{const a=n.name.startsWith(".");if(n.kind==="directory"){const s=e.expanded.has(n.path);return u.jsxs("li",{className:`oc-tree-node is-dir${s?" is-open":""}${a?" is-dot":""}`,role:"treeitem","aria-expanded":s,children:[u.jsxs("button",{type:"button",className:"oc-tree-row oc-tree-dir",onClick:()=>e.onToggle(n.path),style:{paddingLeft:`${8+e.depth*12}px`},children:[u.jsx(Zw,{open:s}),u.jsx(Ww,{open:s}),u.jsx("span",{className:"oc-tree-label",children:n.name}),u.jsx("span",{className:"oc-tree-at",role:"button",tabIndex:0,title:"插入 @目录/ 引用","aria-label":`插入 ${n.name} 引用`,onClick:l=>{l.stopPropagation(),e.onInsert(`${n.path}/`)},onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),e.onInsert(`${n.path}/`))},children:"@"})]}),s?u.jsx("div",{className:"oc-tree-children",style:{"--oc-tree-guide":`${14+e.depth*12}px`},children:u.jsx(c3,{entries:e.tree[n.path]??[],tree:e.tree,expanded:e.expanded,depth:e.depth+1,onToggle:e.onToggle,onInsert:e.onInsert,onPreview:e.onPreview})}):null]},n.path)}return u.jsx("li",{className:`oc-tree-node is-file${a?" is-dot":""}`,role:"treeitem",children:u.jsx(rS,{entry:n,depth:e.depth,onInsert:e.onInsert,onPreview:e.onPreview})},n.path)})}):u.jsx("p",{className:"oc-tree-empty",children:"此目录为空或没有可安全浏览的文件。"})}function rS(e){const t=S.useRef(null);return S.useEffect(()=>()=>{t.current!==null&&window.clearTimeout(t.current)},[]),u.jsxs("button",{type:"button",className:"oc-tree-row oc-tree-file",style:{paddingLeft:`${8+e.depth*12}px`},title:"单击插入引用;双击预览",onClick:()=>{t.current!==null&&window.clearTimeout(t.current),t.current=window.setTimeout(()=>{e.onInsert(e.entry.path),t.current=null},220)},onDoubleClick:()=>{t.current!==null&&window.clearTimeout(t.current),t.current=null,e.onPreview(e.entry.path)},children:[u.jsx("span",{className:"oc-tree-chevron-spacer","aria-hidden":"true"}),u.jsx(Qw,{}),u.jsx("span",{className:"oc-tree-label",children:e.entry.name}),u.jsx("span",{className:"oc-tree-at",role:"button",tabIndex:0,title:"插入 @文件 引用","aria-label":`插入 ${e.entry.name} 引用`,onClick:n=>{n.stopPropagation(),e.onInsert(e.entry.path)},onDoubleClick:n=>n.stopPropagation(),onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),e.onInsert(e.entry.path))},children:"@"})]})}const aS="modulepreload",iS=function(e){return"/"+e},Ov={},sS=function(t,n,a){let s=Promise.resolve();if(n&&n.length>0){let m=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");s=m(n.map(h=>{if(h=iS(h),h in Ov)return;Ov[h]=!0;const p=h.endsWith(".css"),b=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${b}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":aS,p||(y.as="script"),y.crossOrigin="",y.href=h,f&&y.setAttribute("nonce",f),document.head.appendChild(y),p)return new Promise((x,k)=>{y.addEventListener("load",x),y.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return s.then(c=>{for(const f of c||[])f.status==="rejected"&&l(f.reason);return t().catch(l)})};function Dv(e){const t=[],n=String(e||"");let a=n.indexOf(","),s=0,l=!1;for(;!l;){a===-1&&(a=n.length,l=!0);const c=n.slice(s,a).trim();(c||!l)&&t.push(c),s=a+1,a=n.indexOf(",",s)}return t}function lS(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const oS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,uS={};function jv(e,t){return(uS.jsx?cS:oS).test(e)}const dS=/[ \t\n\f\r]/g;function fS(e){return typeof e=="object"?e.type==="text"?Lv(e.value):!1:Lv(e)}function Lv(e){return e.replace(dS,"")===""}class Oo{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}Oo.prototype.normal={};Oo.prototype.property={};Oo.prototype.space=void 0;function u3(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new Oo(n,a,t)}function To(e){return e.toLowerCase()}class Sr{constructor(t,n){this.attribute=n,this.property=t}}Sr.prototype.attribute="";Sr.prototype.booleanish=!1;Sr.prototype.boolean=!1;Sr.prototype.commaOrSpaceSeparated=!1;Sr.prototype.commaSeparated=!1;Sr.prototype.defined=!1;Sr.prototype.mustUseProperty=!1;Sr.prototype.number=!1;Sr.prototype.overloadedBoolean=!1;Sr.prototype.property="";Sr.prototype.spaceSeparated=!1;Sr.prototype.space=void 0;let mS=0;const dt=cs(),Dn=cs(),Jm=cs(),Me=cs(),rn=cs(),ls=cs(),Mr=cs();function cs(){return 2**++mS}const eh=Object.freeze(Object.defineProperty({__proto__:null,boolean:dt,booleanish:Dn,commaOrSpaceSeparated:Mr,commaSeparated:ls,number:Me,overloadedBoolean:Jm,spaceSeparated:rn},Symbol.toStringTag,{value:"Module"})),kf=Object.keys(eh);class Ph extends Sr{constructor(t,n,a,s){let l=-1;if(super(t,n),zv(this,"space",s),typeof a=="number")for(;++l<kf.length;){const c=kf[l];zv(this,kf[l],(a&eh[c])===eh[c])}}}Ph.prototype.defined=!0;function zv(e,t,n){n&&(e[t]=n)}function ll(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const l=new Ph(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(l.mustUseProperty=!0),t[a]=l,n[To(a)]=a,n[To(l.attribute)]=a}return new Oo(t,n,e.space)}const d3=ll({properties:{ariaActiveDescendant:null,ariaAtomic:Dn,ariaAutoComplete:null,ariaBusy:Dn,ariaChecked:Dn,ariaColCount:Me,ariaColIndex:Me,ariaColSpan:Me,ariaControls:rn,ariaCurrent:null,ariaDescribedBy:rn,ariaDetails:null,ariaDisabled:Dn,ariaDropEffect:rn,ariaErrorMessage:null,ariaExpanded:Dn,ariaFlowTo:rn,ariaGrabbed:Dn,ariaHasPopup:null,ariaHidden:Dn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:rn,ariaLevel:Me,ariaLive:null,ariaModal:Dn,ariaMultiLine:Dn,ariaMultiSelectable:Dn,ariaOrientation:null,ariaOwns:rn,ariaPlaceholder:null,ariaPosInSet:Me,ariaPressed:Dn,ariaReadOnly:Dn,ariaRelevant:null,ariaRequired:Dn,ariaRoleDescription:rn,ariaRowCount:Me,ariaRowIndex:Me,ariaRowSpan:Me,ariaSelected:Dn,ariaSetSize:Me,ariaSort:null,ariaValueMax:Me,ariaValueMin:Me,ariaValueNow:Me,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function f3(e,t){return t in e?e[t]:t}function m3(e,t){return f3(e,t.toLowerCase())}const hS=ll({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ls,acceptCharset:rn,accessKey:rn,action:null,allow:null,allowFullScreen:dt,allowPaymentRequest:dt,allowUserMedia:dt,alpha:dt,alt:null,as:null,async:dt,autoCapitalize:null,autoComplete:rn,autoFocus:dt,autoPlay:dt,blocking:rn,capture:null,charSet:null,checked:dt,cite:null,className:rn,closedBy:null,colorSpace:null,cols:Me,colSpan:Me,command:null,commandFor:null,content:null,contentEditable:Dn,controls:dt,controlsList:rn,coords:Me|ls,crossOrigin:null,data:null,dateTime:null,decoding:null,default:dt,defer:dt,dir:null,dirName:null,disabled:dt,download:Jm,draggable:Dn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:dt,formTarget:null,headers:rn,height:Me,hidden:Jm,high:Me,href:null,hrefLang:null,htmlFor:rn,httpEquiv:rn,id:null,imageSizes:null,imageSrcSet:null,inert:dt,inputMode:null,integrity:null,is:null,isMap:dt,itemId:null,itemProp:rn,itemRef:rn,itemScope:dt,itemType:rn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:dt,low:Me,manifest:null,max:null,maxLength:Me,media:null,method:null,min:null,minLength:Me,multiple:dt,muted:dt,name:null,nonce:null,noModule:dt,noValidate:dt,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:dt,optimum:Me,pattern:null,ping:rn,placeholder:null,playsInline:dt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:dt,referrerPolicy:null,rel:rn,required:dt,reversed:dt,rows:Me,rowSpan:Me,sandbox:rn,scope:null,scoped:dt,seamless:dt,selected:dt,shadowRootClonable:dt,shadowRootCustomElementRegistry:dt,shadowRootDelegatesFocus:dt,shadowRootMode:null,shadowRootSerializable:dt,shape:null,size:Me,sizes:null,slot:null,span:Me,spellCheck:Dn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Me,step:null,style:null,tabIndex:Me,target:null,title:null,translate:null,type:null,typeMustMatch:dt,useMap:null,value:Dn,width:Me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:rn,axis:null,background:null,bgColor:null,border:Me,borderColor:null,bottomMargin:Me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:dt,declare:dt,event:null,face:null,frame:null,frameBorder:null,hSpace:Me,leftMargin:Me,link:null,longDesc:null,lowSrc:null,marginHeight:Me,marginWidth:Me,noResize:dt,noHref:dt,noShade:dt,noWrap:dt,object:null,profile:null,prompt:null,rev:null,rightMargin:Me,rules:null,scheme:null,scrolling:Dn,standby:null,summary:null,text:null,topMargin:Me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Me,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:dt,disablePictureInPicture:dt,disableRemotePlayback:dt,exportParts:ls,part:rn,prefix:null,property:null,results:Me,security:null,unselectable:null},space:"html",transform:m3}),pS=ll({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Mr,accentHeight:Me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Me,amplitude:Me,arabicForm:null,ascent:Me,attributeName:null,attributeType:null,azimuth:Me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Me,by:null,calcMode:null,capHeight:Me,className:rn,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:Me,diffuseConstant:Me,direction:null,display:null,dur:null,divisor:Me,dominantBaseline:null,download:dt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Me,enableBackground:null,end:null,event:null,exponent:Me,externalResourcesRequired:null,fill:null,fillOpacity:Me,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:ls,g2:ls,glyphName:ls,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Me,horizOriginX:Me,horizOriginY:Me,id:null,ideographic:Me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Me,k:Me,k1:Me,k2:Me,k3:Me,k4:Me,kernelMatrix:Mr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Me,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Me,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:Me,overlineThickness:Me,paintOrder:null,panose1:null,path:null,pathLength:Me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:rn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Me,pointsAtY:Me,pointsAtZ:Me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mr,rev:Mr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mr,requiredFeatures:Mr,requiredFonts:Mr,requiredFormats:Mr,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:Me,specularExponent:Me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Me,strikethroughThickness:Me,string:null,stroke:null,strokeDashArray:Mr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Me,strokeOpacity:Me,strokeWidth:null,style:null,surfaceScale:Me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Mr,tabIndex:Me,tableValues:null,target:null,targetX:Me,targetY:Me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Mr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Me,underlineThickness:Me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Me,values:null,vAlphabetic:Me,vMathematical:Me,vectorEffect:null,vHanging:Me,vIdeographic:Me,version:null,vertAdvY:Me,vertOriginX:Me,vertOriginY:Me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:f3}),h3=ll({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),p3=ll({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:m3}),g3=ll({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),gS={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"},bS=/[A-Z]/g,Bv=/-[a-z]/g,vS=/^data[-\w.:]+$/i;function b3(e,t){const n=To(t);let a=t,s=Sr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&vS.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Bv,xS);a="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Bv.test(l)){let c=l.replace(bS,yS);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=Ph}return new s(a,t)}function yS(e){return"-"+e.toLowerCase()}function xS(e){return e.charAt(1).toUpperCase()}const v3=u3([d3,hS,h3,p3,g3],"html"),$u=u3([d3,pS,h3,p3,g3],"svg");function Uv(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function wS(e){return e.join(" ").trim()}var Vs={},Ef,qv;function SS(){if(qv)return Ef;qv=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,m=`
|
|
14
|
-
`,h="/",p="*",b="",y="comment",x="declaration";function k(R,C){if(typeof R!="string")throw new TypeError("First argument must be a string");if(!R)return[];C=C||{};var _=1,I=1;function $(K){var X=K.match(t);X&&(_+=X.length);var V=K.lastIndexOf(m);I=~V?K.length-V:I+K.length}function D(){var K={line:_,column:I};return function(X){return X.position=new M(K),G(),X}}function M(K){this.start=K,this.end={line:_,column:I},this.source=C.source}M.prototype.content=R;function B(K){var X=new Error(C.source+":"+_+":"+I+": "+K);if(X.reason=K,X.filename=C.source,X.line=_,X.column=I,X.source=R,!C.silent)throw X}function Y(K){var X=K.exec(R);if(X){var V=X[0];return $(V),R=R.slice(V.length),X}}function G(){Y(n)}function j(K){var X;for(K=K||[];X=F();)X!==!1&&K.push(X);return K}function F(){var K=D();if(!(h!=R.charAt(0)||p!=R.charAt(1))){for(var X=2;b!=R.charAt(X)&&(p!=R.charAt(X)||h!=R.charAt(X+1));)++X;if(X+=2,b===R.charAt(X-1))return B("End of comment missing");var V=R.slice(2,X-2);return I+=2,$(V),R=R.slice(X),I+=2,K({type:y,comment:V})}}function H(){var K=D(),X=Y(a);if(X){if(F(),!Y(s))return B("property missing ':'");var V=Y(l),re=K({type:x,property:N(X[0].replace(e,b)),value:V?N(V[0].replace(e,b)):b});return Y(c),re}}function ee(){var K=[];j(K);for(var X;X=H();)X!==!1&&(K.push(X),j(K));return K}return G(),ee()}function N(R){return R?R.replace(f,b):b}return Ef=k,Ef}var Hv;function kS(){if(Hv)return Vs;Hv=1;var e=Vs&&Vs.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.default=n;const t=e(SS());function n(a,s){let l=null;if(!a||typeof a!="string")return l;const c=(0,t.default)(a),f=typeof s=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:h,value:p}=m;f?s(h,p,m):p&&(l=l||{},l[h]=p)}),l}return Vs}var co={},Fv;function ES(){if(Fv)return co;Fv=1,Object.defineProperty(co,"__esModule",{value:!0}),co.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(h){return!h||n.test(h)||e.test(h)},c=function(h,p){return p.toUpperCase()},f=function(h,p){return"".concat(p,"-")},m=function(h,p){return p===void 0&&(p={}),l(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(s,f):h=h.replace(a,f),h.replace(t,c))};return co.camelCase=m,co}var uo,Pv;function TS(){if(Pv)return uo;Pv=1;var e=uo&&uo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(kS()),n=ES();function a(s,l){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(f,m){f&&m&&(c[(0,n.camelCase)(f,l)]=m)}),c}return a.default=a,uo=a,uo}var NS=TS();const CS=qu(NS),y3=x3("end"),$h=x3("start");function x3(e){return t;function t(n){const a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function RS(e){const t=$h(e),n=y3(e);if(t&&n)return{start:t,end:n}}function vo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?$v(e.position):"start"in e||"end"in e?$v(e):"line"in e||"column"in e?th(e):""}function th(e){return Gv(e&&e.line)+":"+Gv(e&&e.column)}function $v(e){return th(e&&e.start)+"-"+th(e&&e.end)}function Gv(e){return e&&typeof e=="number"?e:1}class ar extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let s="",l={},c=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?s=t:!l.cause&&t&&(c=!0,s=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof a=="string"){const m=a.indexOf(":");m===-1?l.ruleId=a:(l.source=a.slice(0,m),l.ruleId=a.slice(m+1))}if(!l.place&&l.ancestors&&l.ancestors){const m=l.ancestors[l.ancestors.length-1];m&&(l.place=m.position)}const f=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.line:void 0,this.name=vo(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=c&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ar.prototype.file="";ar.prototype.name="";ar.prototype.reason="";ar.prototype.message="";ar.prototype.stack="";ar.prototype.column=void 0;ar.prototype.line=void 0;ar.prototype.ancestors=void 0;ar.prototype.cause=void 0;ar.prototype.fatal=void 0;ar.prototype.place=void 0;ar.prototype.ruleId=void 0;ar.prototype.source=void 0;const Gh={}.hasOwnProperty,AS=new Map,_S=/[A-Z]/g,IS=new Set(["table","tbody","thead","tfoot","tr"]),MS=new Set(["td","th"]),w3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function OS(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=HS(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=qS(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?$u:v3,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=S3(s,e,void 0);return l&&typeof l!="string"?l:s.create(e,s.Fragment,{children:l||void 0},void 0)}function S3(e,t,n){if(t.type==="element")return DS(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return jS(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return zS(e,t,n);if(t.type==="mdxjsEsm")return LS(e,t);if(t.type==="root")return BS(e,t,n);if(t.type==="text")return US(e,t)}function DS(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=$u,e.schema=s),e.ancestors.push(t);const l=E3(e,t.tagName,!1),c=FS(e,t);let f=Kh(e,t);return IS.has(t.tagName)&&(f=f.filter(function(m){return typeof m=="string"?!fS(m):!0})),k3(e,c,l,t),Vh(c,f),e.ancestors.pop(),e.schema=a,e.create(t,l,c,n)}function jS(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}No(e,t.position)}function LS(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);No(e,t.position)}function zS(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=$u,e.schema=s),e.ancestors.push(t);const l=t.name===null?e.Fragment:E3(e,t.name,!0),c=PS(e,t),f=Kh(e,t);return k3(e,c,l,t),Vh(c,f),e.ancestors.pop(),e.schema=a,e.create(t,l,c,n)}function BS(e,t,n){const a={};return Vh(a,Kh(e,t)),e.create(t,e.Fragment,a,n)}function US(e,t){return t.value}function k3(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function Vh(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function qS(e,t,n){return a;function a(s,l,c,f){const h=Array.isArray(c.children)?n:t;return f?h(l,c,f):h(l,c)}}function HS(e,t){return n;function n(a,s,l,c){const f=Array.isArray(l.children),m=$h(a);return t(s,l,c,f,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function FS(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&Gh.call(t.properties,s)){const l=$S(e,s,t.properties[s]);if(l){const[c,f]=l;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&MS.has(t.tagName)?a=f:n[c]=f}}if(a){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function PS(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const l=a.data.estree.body[0];l.type;const c=l.expression;c.type;const f=c.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else No(e,t.position);else{const s=a.name;let l;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,l=e.evaluater.evaluateExpression(f.expression)}else No(e,t.position);else l=a.value===null?!0:a.value;n[s]=l}return n}function Kh(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:AS;for(;++a<t.children.length;){const l=t.children[a];let c;if(e.passKeys){const m=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(m){const h=s.get(m)||0;c=m+"-"+h,s.set(m,h+1)}}const f=S3(e,l,c);f!==void 0&&n.push(f)}return n}function $S(e,t,n){const a=b3(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?lS(n):wS(n)),a.property==="style"){let s=typeof n=="object"?n:GS(e,String(n));return e.stylePropertyNameCase==="css"&&(s=VS(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?gS[a.property]||a.property:a.attribute,n]}}function GS(e,t){try{return CS(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new ar("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=w3+"#cannot-parse-style-attribute",s}}function E3(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let l=-1,c;for(;++l<s.length;){const f=jv(s[l])?{type:"Identifier",name:s[l]}:{type:"Literal",value:s[l]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(l&&f.type==="Literal"),optional:!1}:f}a=c}else a=jv(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return Gh.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);No(e)}function No(e,t){const n=new ar("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=w3+"#cannot-handle-mdx-estrees-without-createevaluater",n}function VS(e){const t={};let n;for(n in e)Gh.call(e,n)&&(t[KS(n)]=e[n]);return t}function KS(e){let t=e.replace(_S,YS);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function YS(e){return"-"+e.toLowerCase()}const Tf={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"]},XS={};function Yh(e,t){const n=XS,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return T3(e,a,s)}function T3(e,t,n){if(ZS(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Vv(e.children,t,n)}return Array.isArray(e)?Vv(e,t,n):""}function Vv(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=T3(e[s],t,n);return a.join("")}function ZS(e){return!!(e&&typeof e=="object")}const Kv=document.createElement("i");function Xh(e){const t="&"+e+";";Kv.innerHTML=t;const n=Kv.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Dr(e,t,n,a){const s=e.length;let l=0,c;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,a.length<1e4)c=Array.from(a),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);l<a.length;)c=a.slice(l,l+1e4),c.unshift(t,0),e.splice(...c),l+=1e4,t+=1e4}function Xr(e,t){return e.length>0?(Dr(e,e.length,0,t),e):t}const Yv={}.hasOwnProperty;function N3(e){const t={};let n=-1;for(;++n<e.length;)WS(t,e[n]);return t}function WS(e,t){let n;for(n in t){const s=(Yv.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let c;if(l)for(c in l){Yv.call(s,c)||(s[c]=[]);const f=l[c];QS(s[c],Array.isArray(f)?f:f?[f]:[])}}}function QS(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);Dr(e,0,0,a)}function C3(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function na(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const cr=_i(/[A-Za-z]/),nr=_i(/[\dA-Za-z]/),JS=_i(/[#-'*+\--9=?A-Z^-~]/);function Tu(e){return e!==null&&(e<32||e===127)}const nh=_i(/\d/),e9=_i(/[\dA-Fa-f]/),t9=_i(/[!-/:-@[-`{-~]/);function We(e){return e!==null&&e<-2}function an(e){return e!==null&&(e<0||e===32)}function It(e){return e===-2||e===-1||e===32}const Gu=_i(new RegExp("\\p{P}|\\p{S}","u")),os=_i(/\s/);function _i(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ol(e){const t=[];let n=-1,a=0,s=0;for(;++n<e.length;){const l=e.charCodeAt(n);let c="";if(l===37&&nr(e.charCodeAt(n+1))&&nr(e.charCodeAt(n+2)))s=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(c=String.fromCharCode(l));else if(l>55295&&l<57344){const f=e.charCodeAt(n+1);l<56320&&f>56319&&f<57344?(c=String.fromCharCode(l,f),s=1):c="�"}else c=String.fromCharCode(l);c&&(t.push(e.slice(a,n),encodeURIComponent(c)),a=n+s+1,c=""),s&&(n+=s,s=0)}return t.join("")+e.slice(a)}function Ct(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let l=0;return c;function c(m){return It(m)?(e.enter(n),f(m)):t(m)}function f(m){return It(m)&&l++<s?(e.consume(m),f):(e.exit(n),t(m))}}const n9={tokenize:r9};function r9(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ct(e,t,"linePrefix")}function s(f){return e.enter("paragraph"),l(f)}function l(f){const m=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=m),n=m,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return We(f)?(e.consume(f),e.exit("chunkText"),l):(e.consume(f),c)}}const a9={tokenize:i9},Xv={tokenize:s9};function i9(e){const t=this,n=[];let a=0,s,l,c;return f;function f(I){if(a<n.length){const $=n[a];return t.containerState=$[1],e.attempt($[0].continuation,m,h)(I)}return h(I)}function m(I){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&_();const $=t.events.length;let D=$,M;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){M=t.events[D][1].end;break}C(a);let B=$;for(;B<t.events.length;)t.events[B][1].end={...M},B++;return Dr(t.events,D+1,0,t.events.slice($)),t.events.length=B,h(I)}return f(I)}function h(I){if(a===n.length){if(!s)return y(I);if(s.currentConstruct&&s.currentConstruct.concrete)return k(I);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Xv,p,b)(I)}function p(I){return s&&_(),C(a),y(I)}function b(I){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,k(I)}function y(I){return t.containerState={},e.attempt(Xv,x,k)(I)}function x(I){return a++,n.push([t.currentConstruct,t.containerState]),y(I)}function k(I){if(I===null){s&&_(),C(0),e.consume(I);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:l}),N(I)}function N(I){if(I===null){R(e.exit("chunkFlow"),!0),C(0),e.consume(I);return}return We(I)?(e.consume(I),R(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(I),N)}function R(I,$){const D=t.sliceStream(I);if($&&D.push(null),I.previous=l,l&&(l.next=I),l=I,s.defineSkip(I.start),s.write(D),t.parser.lazy[I.start.line]){let M=s.events.length;for(;M--;)if(s.events[M][1].start.offset<c&&(!s.events[M][1].end||s.events[M][1].end.offset>c))return;const B=t.events.length;let Y=B,G,j;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){if(G){j=t.events[Y][1].end;break}G=!0}for(C(a),M=B;M<t.events.length;)t.events[M][1].end={...j},M++;Dr(t.events,Y+1,0,t.events.slice(B)),t.events.length=M}}function C(I){let $=n.length;for(;$-- >I;){const D=n[$];t.containerState=D[1],D[0].exit.call(t,e)}n.length=I}function _(){s.write([null]),l=void 0,s=void 0,t.containerState._closeFlow=void 0}}function s9(e,t,n){return Ct(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function nl(e){if(e===null||an(e)||os(e))return 1;if(Gu(e))return 2}function Vu(e,t,n){const a=[];let s=-1;for(;++s<e.length;){const l=e[s].resolveAll;l&&!a.includes(l)&&(t=l(t,n),a.push(l))}return t}const rh={name:"attention",resolveAll:l9,tokenize:o9};function l9(e,t){let n=-1,a,s,l,c,f,m,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;m=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const b={...e[a][1].end},y={...e[n][1].start};Zv(b,-m),Zv(y,m),c={type:m>1?"strongSequence":"emphasisSequence",start:b,end:{...e[a][1].end}},f={type:m>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},l={type:m>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:m>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[n][1].start={...f.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=Xr(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=Xr(h,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",l,t]]),h=Xr(h,Vu(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),h=Xr(h,[["exit",l,t],["enter",f,t],["exit",f,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=Xr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Dr(e,a-1,n-a+3,h),n=a+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function o9(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=nl(a);let l;return c;function c(m){return l=m,e.enter("attentionSequence"),f(m)}function f(m){if(m===l)return e.consume(m),f;const h=e.exit("attentionSequence"),p=nl(m),b=!p||p===2&&s||n.includes(m),y=!s||s===2&&p||n.includes(a);return h._open=!!(l===42?b:b&&(s||!y)),h._close=!!(l===42?y:y&&(p||!b)),t(m)}}function Zv(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const c9={name:"autolink",tokenize:u9};function u9(e,t,n){let a=0;return s;function s(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(x){return cr(x)?(e.consume(x),c):x===64?n(x):h(x)}function c(x){return x===43||x===45||x===46||nr(x)?(a=1,f(x)):h(x)}function f(x){return x===58?(e.consume(x),a=0,m):(x===43||x===45||x===46||nr(x))&&a++<32?(e.consume(x),f):(a=0,h(x))}function m(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||Tu(x)?n(x):(e.consume(x),m)}function h(x){return x===64?(e.consume(x),p):JS(x)?(e.consume(x),h):n(x)}function p(x){return nr(x)?b(x):n(x)}function b(x){return x===46?(e.consume(x),a=0,p):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):y(x)}function y(x){if((x===45||nr(x))&&a++<63){const k=x===45?y:b;return e.consume(x),k}return n(x)}}const Do={partial:!0,tokenize:d9};function d9(e,t,n){return a;function a(l){return It(l)?Ct(e,s,"linePrefix")(l):s(l)}function s(l){return l===null||We(l)?t(l):n(l)}}const R3={continuation:{tokenize:m9},exit:h9,name:"blockQuote",tokenize:f9};function f9(e,t,n){const a=this;return s;function s(c){if(c===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),l}return n(c)}function l(c){return It(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function m9(e,t,n){const a=this;return s;function s(c){return It(c)?Ct(e,l,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):l(c)}function l(c){return e.attempt(R3,t,n)(c)}}function h9(e){e.exit("blockQuote")}const A3={name:"characterEscape",tokenize:p9};function p9(e,t,n){return a;function a(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),s}function s(l){return t9(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const _3={name:"characterReference",tokenize:g9};function g9(e,t,n){const a=this;let s=0,l,c;return f;function f(b){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),m}function m(b){return b===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(b),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),l=31,c=nr,p(b))}function h(b){return b===88||b===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(b),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,c=e9,p):(e.enter("characterReferenceValue"),l=7,c=nh,p(b))}function p(b){if(b===59&&s){const y=e.exit("characterReferenceValue");return c===nr&&!Xh(a.sliceSerialize(y))?n(b):(e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(b)&&s++<l?(e.consume(b),p):n(b)}}const Wv={partial:!0,tokenize:v9},Qv={concrete:!0,name:"codeFenced",tokenize:b9};function b9(e,t,n){const a=this,s={partial:!0,tokenize:D};let l=0,c=0,f;return m;function m(M){return h(M)}function h(M){const B=a.events[a.events.length-1];return l=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,f=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(M)}function p(M){return M===f?(c++,e.consume(M),p):c<3?n(M):(e.exit("codeFencedFenceSequence"),It(M)?Ct(e,b,"whitespace")(M):b(M))}function b(M){return M===null||We(M)?(e.exit("codeFencedFence"),a.interrupt?t(M):e.check(Wv,N,$)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(M))}function y(M){return M===null||We(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),b(M)):It(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ct(e,x,"whitespace")(M)):M===96&&M===f?n(M):(e.consume(M),y)}function x(M){return M===null||We(M)?b(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(M))}function k(M){return M===null||We(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),b(M)):M===96&&M===f?n(M):(e.consume(M),k)}function N(M){return e.attempt(s,$,R)(M)}function R(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),C}function C(M){return l>0&&It(M)?Ct(e,_,"linePrefix",l+1)(M):_(M)}function _(M){return M===null||We(M)?e.check(Wv,N,$)(M):(e.enter("codeFlowValue"),I(M))}function I(M){return M===null||We(M)?(e.exit("codeFlowValue"),_(M)):(e.consume(M),I)}function $(M){return e.exit("codeFenced"),t(M)}function D(M,B,Y){let G=0;return j;function j(X){return M.enter("lineEnding"),M.consume(X),M.exit("lineEnding"),F}function F(X){return M.enter("codeFencedFence"),It(X)?Ct(M,H,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):H(X)}function H(X){return X===f?(M.enter("codeFencedFenceSequence"),ee(X)):Y(X)}function ee(X){return X===f?(G++,M.consume(X),ee):G>=c?(M.exit("codeFencedFenceSequence"),It(X)?Ct(M,K,"whitespace")(X):K(X)):Y(X)}function K(X){return X===null||We(X)?(M.exit("codeFencedFence"),B(X)):Y(X)}}}function v9(e,t,n){const a=this;return s;function s(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l)}function l(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}const Nf={name:"codeIndented",tokenize:x9},y9={partial:!0,tokenize:w9};function x9(e,t,n){const a=this;return s;function s(h){return e.enter("codeIndented"),Ct(e,l,"linePrefix",5)(h)}function l(h){const p=a.events[a.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?c(h):n(h)}function c(h){return h===null?m(h):We(h)?e.attempt(y9,c,m)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||We(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function m(h){return e.exit("codeIndented"),t(h)}}function w9(e,t,n){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?n(c):We(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):Ct(e,l,"linePrefix",5)(c)}function l(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):We(c)?s(c):n(c)}}const S9={name:"codeText",previous:E9,resolve:k9,tokenize:T9};function k9(e){let t=e.length-4,n=3,a,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="codeTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function E9(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function T9(e,t,n){let a=0,s,l;return c;function c(b){return e.enter("codeText"),e.enter("codeTextSequence"),f(b)}function f(b){return b===96?(e.consume(b),a++,f):(e.exit("codeTextSequence"),m(b))}function m(b){return b===null?n(b):b===32?(e.enter("space"),e.consume(b),e.exit("space"),m):b===96?(l=e.enter("codeTextSequence"),s=0,p(b)):We(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),m):(e.enter("codeTextData"),h(b))}function h(b){return b===null||b===32||b===96||We(b)?(e.exit("codeTextData"),m(b)):(e.consume(b),h)}function p(b){return b===96?(e.consume(b),s++,p):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(b)):(l.type="codeTextData",h(b))}}class N9{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const a=n??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){const s=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&fo(this.left,a),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),fo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),fo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);fo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);fo(this.left,n.reverse())}}}function fo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function I3(e){const t={};let n=-1,a,s,l,c,f,m,h;const p=new N9(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(a=p.get(n),n&&a[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(m=a[1]._tokenizer.events,l=0,l<m.length&&m[l][1].type==="lineEndingBlank"&&(l+=2),l<m.length&&m[l][1].type==="content"))for(;++l<m.length&&m[l][1].type!=="content";)m[l][1].type==="chunkText"&&(m[l][1]._isInFirstContentOfListItem=!0,l++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,C9(p,n)),n=t[n],h=!0);else if(a[1]._container){for(l=n,s=void 0;l--;)if(c=p.get(l),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=l);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(a[1].end={...p.get(s)[1].start},f=p.slice(s,n),f.unshift(a),p.splice(s,n-s+1,f))}}return Dr(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function C9(e,t){const n=e.get(t)[1],a=e.get(t)[2];let s=t-1;const l=[];let c=n._tokenizer;c||(c=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,m=[],h={};let p,b,y=-1,x=n,k=0,N=0;const R=[N];for(;x;){for(;e.get(++s)[1]!==x;);l.push(s),x._tokenizer||(p=a.sliceStream(x),x.next||p.push(null),b&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(p),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),b=x,x=x.next}for(x=n;++y<f.length;)f[y][0]==="exit"&&f[y-1][0]==="enter"&&f[y][1].type===f[y-1][1].type&&f[y][1].start.line!==f[y][1].end.line&&(N=y+1,R.push(N),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):R.pop(),y=R.length;y--;){const C=f.slice(R[y],R[y+1]),_=l.pop();m.push([_,_+C.length-1]),e.splice(_,2,C)}for(m.reverse(),y=-1;++y<m.length;)h[k+m[y][0]]=k+m[y][1],k+=m[y][1]-m[y][0]-1;return h}const R9={resolve:_9,tokenize:I9},A9={partial:!0,tokenize:M9};function _9(e){return I3(e),e}function I9(e,t){let n;return a;function a(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?l(f):We(f)?e.check(A9,c,l)(f):(e.consume(f),s)}function l(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function M9(e,t,n){const a=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ct(e,l,"linePrefix")}function l(c){if(c===null||We(c))return n(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,n,t)(c)}}function M3(e,t,n,a,s,l,c,f,m){const h=m||Number.POSITIVE_INFINITY;let p=0;return b;function b(C){return C===60?(e.enter(a),e.enter(s),e.enter(l),e.consume(C),e.exit(l),y):C===null||C===32||C===41||Tu(C)?n(C):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),N(C))}function y(C){return C===62?(e.enter(l),e.consume(C),e.exit(l),e.exit(s),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),x(C))}function x(C){return C===62?(e.exit("chunkString"),e.exit(f),y(C)):C===null||C===60||We(C)?n(C):(e.consume(C),C===92?k:x)}function k(C){return C===60||C===62||C===92?(e.consume(C),x):x(C)}function N(C){return!p&&(C===null||C===41||an(C))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(C)):p<h&&C===40?(e.consume(C),p++,N):C===41?(e.consume(C),p--,N):C===null||C===32||C===40||Tu(C)?n(C):(e.consume(C),C===92?R:N)}function R(C){return C===40||C===41||C===92?(e.consume(C),N):N(C)}}function O3(e,t,n,a,s,l){const c=this;let f=0,m;return h;function h(x){return e.enter(a),e.enter(s),e.consume(x),e.exit(s),e.enter(l),p}function p(x){return f>999||x===null||x===91||x===93&&!m||x===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?n(x):x===93?(e.exit(l),e.enter(s),e.consume(x),e.exit(s),e.exit(a),t):We(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),b(x))}function b(x){return x===null||x===91||x===93||We(x)||f++>999?(e.exit("chunkString"),p(x)):(e.consume(x),m||(m=!It(x)),x===92?y:b)}function y(x){return x===91||x===92||x===93?(e.consume(x),f++,b):b(x)}}function D3(e,t,n,a,s,l){let c;return f;function f(y){return y===34||y===39||y===40?(e.enter(a),e.enter(s),e.consume(y),e.exit(s),c=y===40?41:y,m):n(y)}function m(y){return y===c?(e.enter(s),e.consume(y),e.exit(s),e.exit(a),t):(e.enter(l),h(y))}function h(y){return y===c?(e.exit(l),m(c)):y===null?n(y):We(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Ct(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===c||y===null||We(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?b:p)}function b(y){return y===c||y===92?(e.consume(y),p):p(y)}}function yo(e,t){let n;return a;function a(s){return We(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):It(s)?Ct(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const O9={name:"definition",tokenize:j9},D9={partial:!0,tokenize:L9};function j9(e,t,n){const a=this;let s;return l;function l(x){return e.enter("definition"),c(x)}function c(x){return O3.call(a,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function f(x){return s=na(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),m):n(x)}function m(x){return an(x)?yo(e,h)(x):h(x)}function h(x){return M3(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function p(x){return e.attempt(D9,b,b)(x)}function b(x){return It(x)?Ct(e,y,"whitespace")(x):y(x)}function y(x){return x===null||We(x)?(e.exit("definition"),a.parser.defined.push(s),t(x)):n(x)}}function L9(e,t,n){return a;function a(f){return an(f)?yo(e,s)(f):n(f)}function s(f){return D3(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function l(f){return It(f)?Ct(e,c,"whitespace")(f):c(f)}function c(f){return f===null||We(f)?t(f):n(f)}}const z9={name:"hardBreakEscape",tokenize:B9};function B9(e,t,n){return a;function a(l){return e.enter("hardBreakEscape"),e.consume(l),s}function s(l){return We(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const U9={name:"headingAtx",resolve:q9,tokenize:H9};function q9(e,t){let n=e.length-2,a=3,s,l;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},l={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},Dr(e,a,n-a+1,[["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]])),e}function H9(e,t,n){let a=0;return s;function s(p){return e.enter("atxHeading"),l(p)}function l(p){return e.enter("atxHeadingSequence"),c(p)}function c(p){return p===35&&a++<6?(e.consume(p),c):p===null||an(p)?(e.exit("atxHeadingSequence"),f(p)):n(p)}function f(p){return p===35?(e.enter("atxHeadingSequence"),m(p)):p===null||We(p)?(e.exit("atxHeading"),t(p)):It(p)?Ct(e,f,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function m(p){return p===35?(e.consume(p),m):(e.exit("atxHeadingSequence"),f(p))}function h(p){return p===null||p===35||an(p)?(e.exit("atxHeadingText"),f(p)):(e.consume(p),h)}}const F9=["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"],Jv=["pre","script","style","textarea"],P9={concrete:!0,name:"htmlFlow",resolveTo:V9,tokenize:K9},$9={partial:!0,tokenize:X9},G9={partial:!0,tokenize:Y9};function V9(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function K9(e,t,n){const a=this;let s,l,c,f,m;return h;function h(A){return p(A)}function p(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),b}function b(A){return A===33?(e.consume(A),y):A===47?(e.consume(A),l=!0,N):A===63?(e.consume(A),s=3,a.interrupt?t:P):cr(A)?(e.consume(A),c=String.fromCharCode(A),R):n(A)}function y(A){return A===45?(e.consume(A),s=2,x):A===91?(e.consume(A),s=5,f=0,k):cr(A)?(e.consume(A),s=4,a.interrupt?t:P):n(A)}function x(A){return A===45?(e.consume(A),a.interrupt?t:P):n(A)}function k(A){const ae="CDATA[";return A===ae.charCodeAt(f++)?(e.consume(A),f===ae.length?a.interrupt?t:H:k):n(A)}function N(A){return cr(A)?(e.consume(A),c=String.fromCharCode(A),R):n(A)}function R(A){if(A===null||A===47||A===62||an(A)){const ae=A===47,he=c.toLowerCase();return!ae&&!l&&Jv.includes(he)?(s=1,a.interrupt?t(A):H(A)):F9.includes(c.toLowerCase())?(s=6,ae?(e.consume(A),C):a.interrupt?t(A):H(A)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(A):l?_(A):I(A))}return A===45||nr(A)?(e.consume(A),c+=String.fromCharCode(A),R):n(A)}function C(A){return A===62?(e.consume(A),a.interrupt?t:H):n(A)}function _(A){return It(A)?(e.consume(A),_):j(A)}function I(A){return A===47?(e.consume(A),j):A===58||A===95||cr(A)?(e.consume(A),$):It(A)?(e.consume(A),I):j(A)}function $(A){return A===45||A===46||A===58||A===95||nr(A)?(e.consume(A),$):D(A)}function D(A){return A===61?(e.consume(A),M):It(A)?(e.consume(A),D):I(A)}function M(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),m=A,B):It(A)?(e.consume(A),M):Y(A)}function B(A){return A===m?(e.consume(A),m=null,G):A===null||We(A)?n(A):(e.consume(A),B)}function Y(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||an(A)?D(A):(e.consume(A),Y)}function G(A){return A===47||A===62||It(A)?I(A):n(A)}function j(A){return A===62?(e.consume(A),F):n(A)}function F(A){return A===null||We(A)?H(A):It(A)?(e.consume(A),F):n(A)}function H(A){return A===45&&s===2?(e.consume(A),V):A===60&&s===1?(e.consume(A),re):A===62&&s===4?(e.consume(A),U):A===63&&s===3?(e.consume(A),P):A===93&&s===5?(e.consume(A),Te):We(A)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check($9,q,ee)(A)):A===null||We(A)?(e.exit("htmlFlowData"),ee(A)):(e.consume(A),H)}function ee(A){return e.check(G9,K,q)(A)}function K(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),X}function X(A){return A===null||We(A)?ee(A):(e.enter("htmlFlowData"),H(A))}function V(A){return A===45?(e.consume(A),P):H(A)}function re(A){return A===47?(e.consume(A),c="",ue):H(A)}function ue(A){if(A===62){const ae=c.toLowerCase();return Jv.includes(ae)?(e.consume(A),U):H(A)}return cr(A)&&c.length<8?(e.consume(A),c+=String.fromCharCode(A),ue):H(A)}function Te(A){return A===93?(e.consume(A),P):H(A)}function P(A){return A===62?(e.consume(A),U):A===45&&s===2?(e.consume(A),P):H(A)}function U(A){return A===null||We(A)?(e.exit("htmlFlowData"),q(A)):(e.consume(A),U)}function q(A){return e.exit("htmlFlow"),t(A)}}function Y9(e,t,n){const a=this;return s;function s(c){return We(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):n(c)}function l(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function X9(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Do,t,n)}}const Z9={name:"htmlText",tokenize:W9};function W9(e,t,n){const a=this;let s,l,c;return f;function f(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),m}function m(P){return P===33?(e.consume(P),h):P===47?(e.consume(P),D):P===63?(e.consume(P),I):cr(P)?(e.consume(P),Y):n(P)}function h(P){return P===45?(e.consume(P),p):P===91?(e.consume(P),l=0,k):cr(P)?(e.consume(P),_):n(P)}function p(P){return P===45?(e.consume(P),x):n(P)}function b(P){return P===null?n(P):P===45?(e.consume(P),y):We(P)?(c=b,re(P)):(e.consume(P),b)}function y(P){return P===45?(e.consume(P),x):b(P)}function x(P){return P===62?V(P):P===45?y(P):b(P)}function k(P){const U="CDATA[";return P===U.charCodeAt(l++)?(e.consume(P),l===U.length?N:k):n(P)}function N(P){return P===null?n(P):P===93?(e.consume(P),R):We(P)?(c=N,re(P)):(e.consume(P),N)}function R(P){return P===93?(e.consume(P),C):N(P)}function C(P){return P===62?V(P):P===93?(e.consume(P),C):N(P)}function _(P){return P===null||P===62?V(P):We(P)?(c=_,re(P)):(e.consume(P),_)}function I(P){return P===null?n(P):P===63?(e.consume(P),$):We(P)?(c=I,re(P)):(e.consume(P),I)}function $(P){return P===62?V(P):I(P)}function D(P){return cr(P)?(e.consume(P),M):n(P)}function M(P){return P===45||nr(P)?(e.consume(P),M):B(P)}function B(P){return We(P)?(c=B,re(P)):It(P)?(e.consume(P),B):V(P)}function Y(P){return P===45||nr(P)?(e.consume(P),Y):P===47||P===62||an(P)?G(P):n(P)}function G(P){return P===47?(e.consume(P),V):P===58||P===95||cr(P)?(e.consume(P),j):We(P)?(c=G,re(P)):It(P)?(e.consume(P),G):V(P)}function j(P){return P===45||P===46||P===58||P===95||nr(P)?(e.consume(P),j):F(P)}function F(P){return P===61?(e.consume(P),H):We(P)?(c=F,re(P)):It(P)?(e.consume(P),F):G(P)}function H(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),s=P,ee):We(P)?(c=H,re(P)):It(P)?(e.consume(P),H):(e.consume(P),K)}function ee(P){return P===s?(e.consume(P),s=void 0,X):P===null?n(P):We(P)?(c=ee,re(P)):(e.consume(P),ee)}function K(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||an(P)?G(P):(e.consume(P),K)}function X(P){return P===47||P===62||an(P)?G(P):n(P)}function V(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):n(P)}function re(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),ue}function ue(P){return It(P)?Ct(e,Te,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):Te(P)}function Te(P){return e.enter("htmlTextData"),c(P)}}const Zh={name:"labelEnd",resolveAll:tk,resolveTo:nk,tokenize:rk},Q9={tokenize:ak},J9={tokenize:ik},ek={tokenize:sk};function tk(e){let t=-1;const n=[];for(;++t<e.length;){const a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",t+=s}}return e.length!==n.length&&Dr(e,0,e.length,n),e}function nk(e,t){let n=e.length,a=0,s,l,c,f;for(;n--;)if(s=e[n][1],l){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(l=n,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(c=n);const m={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[l][1].start},end:{...e[c][1].end}},p={type:"labelText",start:{...e[l+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",m,t],["enter",h,t]],f=Xr(f,e.slice(l+1,l+a+3)),f=Xr(f,[["enter",p,t]]),f=Xr(f,Vu(t.parser.constructs.insideSpan.null,e.slice(l+a+4,c-3),t)),f=Xr(f,[["exit",p,t],e[c-2],e[c-1],["exit",h,t]]),f=Xr(f,e.slice(c+1)),f=Xr(f,[["exit",m,t]]),Dr(e,l,e.length,f),e}function rk(e,t,n){const a=this;let s=a.events.length,l,c;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){l=a.events[s][1];break}return f;function f(y){return l?l._inactive?b(y):(c=a.parser.defined.includes(na(a.sliceSerialize({start:l.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),m):n(y)}function m(y){return y===40?e.attempt(Q9,p,c?p:b)(y):y===91?e.attempt(J9,p,c?h:b)(y):c?p(y):b(y)}function h(y){return e.attempt(ek,p,b)(y)}function p(y){return t(y)}function b(y){return l._balanced=!0,n(y)}}function ak(e,t,n){return a;function a(b){return e.enter("resource"),e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),s}function s(b){return an(b)?yo(e,l)(b):l(b)}function l(b){return b===41?p(b):M3(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function c(b){return an(b)?yo(e,m)(b):p(b)}function f(b){return n(b)}function m(b){return b===34||b===39||b===40?D3(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):p(b)}function h(b){return an(b)?yo(e,p)(b):p(b)}function p(b){return b===41?(e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),e.exit("resource"),t):n(b)}}function ik(e,t,n){const a=this;return s;function s(f){return O3.call(a,e,l,c,"reference","referenceMarker","referenceString")(f)}function l(f){return a.parser.defined.includes(na(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function c(f){return n(f)}}function sk(e,t,n){return a;function a(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),s}function s(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const lk={name:"labelStartImage",resolveAll:Zh.resolveAll,tokenize:ok};function ok(e,t,n){const a=this;return s;function s(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),l}function l(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):n(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):t(f)}}const ck={name:"labelStartLink",resolveAll:Zh.resolveAll,tokenize:uk};function uk(e,t,n){const a=this;return s;function s(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),l}function l(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(c):t(c)}}const Cf={name:"lineEnding",tokenize:dk};function dk(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ct(e,t,"linePrefix")}}const vu={name:"thematicBreak",tokenize:fk};function fk(e,t,n){let a=0,s;return l;function l(h){return e.enter("thematicBreak"),c(h)}function c(h){return s=h,f(h)}function f(h){return h===s?(e.enter("thematicBreakSequence"),m(h)):a>=3&&(h===null||We(h))?(e.exit("thematicBreak"),t(h)):n(h)}function m(h){return h===s?(e.consume(h),a++,m):(e.exit("thematicBreakSequence"),It(h)?Ct(e,f,"whitespace")(h):f(h))}}const xr={continuation:{tokenize:gk},exit:vk,name:"list",tokenize:pk},mk={partial:!0,tokenize:yk},hk={partial:!0,tokenize:bk};function pk(e,t,n){const a=this,s=a.events[a.events.length-1];let l=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return f;function f(x){const k=a.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!a.containerState.marker||x===a.containerState.marker:nh(x)){if(a.containerState.type||(a.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(vu,n,h)(x):h(x);if(!a.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(x)}return n(x)}function m(x){return nh(x)&&++c<10?(e.consume(x),m):(!a.interrupt||c<2)&&(a.containerState.marker?x===a.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),h(x)):n(x)}function h(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||x,e.check(Do,a.interrupt?n:p,e.attempt(mk,y,b))}function p(x){return a.containerState.initialBlankLine=!0,l++,y(x)}function b(x){return It(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),y):n(x)}function y(x){return a.containerState.size=l+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function gk(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(Do,s,l);function s(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Ct(e,t,"listItemIndent",a.containerState.size+1)(f)}function l(f){return a.containerState.furtherBlankLines||!It(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(hk,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,Ct(e,e.attempt(xr,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function bk(e,t,n){const a=this;return Ct(e,s,"listItemIndent",a.containerState.size+1);function s(l){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(l):n(l)}}function vk(e){e.exit(this.containerState.type)}function yk(e,t,n){const a=this;return Ct(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(l){const c=a.events[a.events.length-1];return!It(l)&&c&&c[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const e4={name:"setextUnderline",resolveTo:xk,tokenize:wk};function xk(e,t){let n=e.length,a,s,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",l?(e.splice(s,0,["enter",c,t]),e.splice(l+1,0,["exit",e[a][1],t]),e[a][1].end={...e[l][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function wk(e,t,n){const a=this;let s;return l;function l(h){let p=a.events.length,b;for(;p--;)if(a.events[p][1].type!=="lineEnding"&&a.events[p][1].type!=="linePrefix"&&a.events[p][1].type!=="content"){b=a.events[p][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||b)?(e.enter("setextHeadingLine"),s=h,c(h)):n(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===s?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),It(h)?Ct(e,m,"lineSuffix")(h):m(h))}function m(h){return h===null||We(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const Sk={tokenize:kk};function kk(e){const t=this,n=e.attempt(Do,a,e.attempt(this.parser.constructs.flowInitial,s,Ct(e,e.attempt(this.parser.constructs.flow,s,e.attempt(R9,s)),"linePrefix")));return n;function a(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Ek={resolveAll:L3()},Tk=j3("string"),Nk=j3("text");function j3(e){return{resolveAll:L3(e==="text"?Ck:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],l=n.attempt(s,c,f);return c;function c(p){return h(p)?l(p):f(p)}function f(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),m}function m(p){return h(p)?(n.exit("data"),l(p)):(n.consume(p),m)}function h(p){if(p===null)return!0;const b=s[p];let y=-1;if(b)for(;++y<b.length;){const x=b[y];if(!x.previous||x.previous.call(a,a.previous))return!0}return!1}}}function L3(e){return t;function t(n,a){let s=-1,l;for(;++s<=n.length;)l===void 0?n[s]&&n[s][1].type==="data"&&(l=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==l+2&&(n[l][1].end=n[s-1][1].end,n.splice(l+2,s-l-2),s=l+2),l=void 0);return e?e(n,a):n}}function Ck(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const a=e[n-1][1],s=t.sliceStream(a);let l=s.length,c=-1,f=0,m;for(;l--;){const h=s[l];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)m=!0,f++;else if(h!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const h={type:n===e.length||m||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?c:a.start._bufferIndex+c,_index:a.start._index+l,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const Rk={42:xr,43:xr,45:xr,48:xr,49:xr,50:xr,51:xr,52:xr,53:xr,54:xr,55:xr,56:xr,57:xr,62:R3},Ak={91:O9},_k={[-2]:Nf,[-1]:Nf,32:Nf},Ik={35:U9,42:vu,45:[e4,vu],60:P9,61:e4,95:vu,96:Qv,126:Qv},Mk={38:_3,92:A3},Ok={[-5]:Cf,[-4]:Cf,[-3]:Cf,33:lk,38:_3,42:rh,60:[c9,Z9],91:ck,92:[z9,A3],93:Zh,95:rh,96:S9},Dk={null:[rh,Ek]},jk={null:[42,95]},Lk={null:[]},zk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:jk,contentInitial:Ak,disable:Lk,document:Rk,flow:Ik,flowInitial:_k,insideSpan:Dk,string:Mk,text:Ok},Symbol.toStringTag,{value:"Module"}));function Bk(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},l=[];let c=[],f=[];const m={attempt:B(D),check:B(M),consume:_,enter:I,exit:$,interrupt:B(M,{interrupt:!0})},h={code:null,containerState:{},defineSkip:N,events:[],now:k,parser:e,previous:null,sliceSerialize:y,sliceStream:x,write:b};let p=t.tokenize.call(h,m);return t.resolveAll&&l.push(t),h;function b(F){return c=Xr(c,F),R(),c[c.length-1]!==null?[]:(Y(t,0),h.events=Vu(l,h.events,h),h.events)}function y(F,H){return qk(x(F),H)}function x(F){return Uk(c,F)}function k(){const{_bufferIndex:F,_index:H,line:ee,column:K,offset:X}=a;return{_bufferIndex:F,_index:H,line:ee,column:K,offset:X}}function N(F){s[F.line]=F.column,j()}function R(){let F;for(;a._index<c.length;){const H=c[a._index];if(typeof H=="string")for(F=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===F&&a._bufferIndex<H.length;)C(H.charCodeAt(a._bufferIndex));else C(H)}}function C(F){p=p(F)}function _(F){We(F)?(a.line++,a.column=1,a.offset+=F===-3?2:1,j()):F!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=F}function I(F,H){const ee=H||{};return ee.type=F,ee.start=k(),h.events.push(["enter",ee,h]),f.push(ee),ee}function $(F){const H=f.pop();return H.end=k(),h.events.push(["exit",H,h]),H}function D(F,H){Y(F,H.from)}function M(F,H){H.restore()}function B(F,H){return ee;function ee(K,X,V){let re,ue,Te,P;return Array.isArray(K)?q(K):"tokenize"in K?q([K]):U(K);function U(ne){return te;function te(ce){const ge=ce!==null&&ne[ce],Re=ce!==null&&ne.null,je=[...Array.isArray(ge)?ge:ge?[ge]:[],...Array.isArray(Re)?Re:Re?[Re]:[]];return q(je)(ce)}}function q(ne){return re=ne,ue=0,ne.length===0?V:A(ne[ue])}function A(ne){return te;function te(ce){return P=G(),Te=ne,ne.partial||(h.currentConstruct=ne),ne.name&&h.parser.constructs.disable.null.includes(ne.name)?he():ne.tokenize.call(H?Object.assign(Object.create(h),H):h,m,ae,he)(ce)}}function ae(ne){return F(Te,P),X}function he(ne){return P.restore(),++ue<re.length?A(re[ue]):V}}}function Y(F,H){F.resolveAll&&!l.includes(F)&&l.push(F),F.resolve&&Dr(h.events,H,h.events.length-H,F.resolve(h.events.slice(H),h)),F.resolveTo&&(h.events=F.resolveTo(h.events,h))}function G(){const F=k(),H=h.previous,ee=h.currentConstruct,K=h.events.length,X=Array.from(f);return{from:K,restore:V};function V(){a=F,h.previous=H,h.currentConstruct=ee,h.events.length=K,f=X,j()}}function j(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function Uk(e,t){const n=t.start._index,a=t.start._bufferIndex,s=t.end._index,l=t.end._bufferIndex;let c;if(n===s)c=[e[n].slice(a,l)];else{if(c=e.slice(n,s),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}l>0&&c.push(e[s].slice(0,l))}return c}function qk(e,t){let n=-1;const a=[];let s;for(;++n<e.length;){const l=e[n];let c;if(typeof l=="string")c=l;else switch(l){case-5:{c="\r";break}case-4:{c=`
|
|
15
|
-
`;break}case-3:{c=`\r
|
|
16
|
-
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&s)continue;c=" ";break}default:c=String.fromCharCode(l)}s=l===-2,a.push(c)}return a.join("")}function Hk(e){const a={constructs:N3([zk,...(e||{}).extensions||[]]),content:s(n9),defined:[],document:s(a9),flow:s(Sk),lazy:{},string:s(Tk),text:s(Nk)};return a;function s(l){return c;function c(f){return Bk(a,l,f)}}}function Fk(e){for(;!I3(e););return e}const t4=/[\0\t\n\r]/g;function Pk(){let e=1,t="",n=!0,a;return s;function s(l,c,f){const m=[];let h,p,b,y,x;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(c||void 0).decode(l)),b=0,t="",n&&(l.charCodeAt(0)===65279&&b++,n=void 0);b<l.length;){if(t4.lastIndex=b,h=t4.exec(l),y=h&&h.index!==void 0?h.index:l.length,x=l.charCodeAt(y),!h){t=l.slice(b);break}if(x===10&&b===y&&a)m.push(-3),a=void 0;else switch(a&&(m.push(-5),a=void 0),b<y&&(m.push(l.slice(b,y)),e+=y-b),x){case 0:{m.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,m.push(-2);e++<p;)m.push(-1);break}case 10:{m.push(-4),e=1;break}default:a=!0,e=1}b=y+1}return f&&(a&&m.push(-5),t&&m.push(t),m.push(null)),m}}const $k=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Gk(e){return e.replace($k,Vk)}function Vk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),l=s===120||s===88;return C3(n.slice(l?2:1),l?16:10)}return Xh(n)||e}const z3={}.hasOwnProperty;function Kk(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Yk(n)(Fk(Hk(n).document().write(Pk()(e,t,!0))))}function Yk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(ut),autolinkProtocol:G,autolinkEmail:G,atxHeading:l(tt),blockQuote:l(Re),characterEscape:G,characterReference:G,codeFenced:l(je),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:l(je,c),codeText:l(be,c),codeTextData:G,data:G,codeFlowValue:G,definition:l(qe),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:l(Ve),hardBreakEscape:l(nt),hardBreakTrailing:l(nt),htmlFlow:l(Ut,c),htmlFlowData:G,htmlText:l(Ut,c),htmlTextData:G,image:l(Rt),label:c,link:l(ut),listItem:l(Bt),listItemValue:y,listOrdered:l(Ge,b),listUnordered:l(Ge),paragraph:l(Kt),reference:A,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:l(tt),strong:l(hn),thematicBreak:l(tn)},exit:{atxHeading:m(),atxHeadingSequence:D,autolink:m(),autolinkEmail:ge,autolinkProtocol:ce,blockQuote:m(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:ne,characterReference:te,codeFenced:m(R),codeFencedFence:N,codeFencedFenceInfo:x,codeFencedFenceMeta:k,codeFlowValue:j,codeIndented:m(C),codeText:m(X),codeTextData:j,data:j,definition:m(),definitionDestinationString:$,definitionLabelString:_,definitionTitleString:I,emphasis:m(),hardBreakEscape:m(H),hardBreakTrailing:m(H),htmlFlow:m(ee),htmlFlowData:j,htmlText:m(K),htmlTextData:j,image:m(re),label:Te,labelText:ue,lineEnding:F,link:m(V),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:ae,resourceDestinationString:P,resourceTitleString:U,resource:q,setextHeading:m(Y),setextHeadingLineSequence:B,setextHeadingText:M,strong:m(),thematicBreak:m()}};B3(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(pe){let Se={type:"root",children:[]};const Fe={stack:[Se],tokenStack:[],config:t,enter:f,exit:h,buffer:c,resume:p,data:n},_e=[];let He=-1;for(;++He<pe.length;)if(pe[He][1].type==="listOrdered"||pe[He][1].type==="listUnordered")if(pe[He][0]==="enter")_e.push(He);else{const vt=_e.pop();He=s(pe,vt,He)}for(He=-1;++He<pe.length;){const vt=t[pe[He][0]];z3.call(vt,pe[He][1].type)&&vt[pe[He][1].type].call(Object.assign({sliceSerialize:pe[He][2].sliceSerialize},Fe),pe[He][1])}if(Fe.tokenStack.length>0){const vt=Fe.tokenStack[Fe.tokenStack.length-1];(vt[1]||n4).call(Fe,void 0,vt[0])}for(Se.position={start:xi(pe.length>0?pe[0][1].start:{line:1,column:1,offset:0}),end:xi(pe.length>0?pe[pe.length-2][1].end:{line:1,column:1,offset:0})},He=-1;++He<t.transforms.length;)Se=t.transforms[He](Se)||Se;return Se}function s(pe,Se,Fe){let _e=Se-1,He=-1,vt=!1,jt,Lt,yt,ot;for(;++_e<=Fe;){const mt=pe[_e];switch(mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mt[0]==="enter"?He++:He--,ot=void 0;break}case"lineEndingBlank":{mt[0]==="enter"&&(jt&&!ot&&!He&&!yt&&(yt=_e),ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ot=void 0}if(!He&&mt[0]==="enter"&&mt[1].type==="listItemPrefix"||He===-1&&mt[0]==="exit"&&(mt[1].type==="listUnordered"||mt[1].type==="listOrdered")){if(jt){let Un=_e;for(Lt=void 0;Un--;){const un=pe[Un];if(un[1].type==="lineEnding"||un[1].type==="lineEndingBlank"){if(un[0]==="exit")continue;Lt&&(pe[Lt][1].type="lineEndingBlank",vt=!0),un[1].type="lineEnding",Lt=Un}else if(!(un[1].type==="linePrefix"||un[1].type==="blockQuotePrefix"||un[1].type==="blockQuotePrefixWhitespace"||un[1].type==="blockQuoteMarker"||un[1].type==="listItemIndent"))break}yt&&(!Lt||yt<Lt)&&(jt._spread=!0),jt.end=Object.assign({},Lt?pe[Lt][1].start:mt[1].end),pe.splice(Lt||_e,0,["exit",jt,mt[2]]),_e++,Fe++}if(mt[1].type==="listItemPrefix"){const Un={type:"listItem",_spread:!1,start:Object.assign({},mt[1].start),end:void 0};jt=Un,pe.splice(_e,0,["enter",Un,mt[2]]),_e++,Fe++,yt=void 0,ot=!0}}}return pe[Se][1]._spread=vt,Fe}function l(pe,Se){return Fe;function Fe(_e){f.call(this,pe(_e),_e),Se&&Se.call(this,_e)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(pe,Se,Fe){this.stack[this.stack.length-1].children.push(pe),this.stack.push(pe),this.tokenStack.push([Se,Fe||void 0]),pe.position={start:xi(Se.start),end:void 0}}function m(pe){return Se;function Se(Fe){pe&&pe.call(this,Fe),h.call(this,Fe)}}function h(pe,Se){const Fe=this.stack.pop(),_e=this.tokenStack.pop();if(_e)_e[0].type!==pe.type&&(Se?Se.call(this,pe,_e[0]):(_e[1]||n4).call(this,pe,_e[0]));else throw new Error("Cannot close `"+pe.type+"` ("+vo({start:pe.start,end:pe.end})+"): it’s not open");Fe.position.end=xi(pe.end)}function p(){return Yh(this.stack.pop())}function b(){this.data.expectingFirstListItemValue=!0}function y(pe){if(this.data.expectingFirstListItemValue){const Se=this.stack[this.stack.length-2];Se.start=Number.parseInt(this.sliceSerialize(pe),10),this.data.expectingFirstListItemValue=void 0}}function x(){const pe=this.resume(),Se=this.stack[this.stack.length-1];Se.lang=pe}function k(){const pe=this.resume(),Se=this.stack[this.stack.length-1];Se.meta=pe}function N(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function R(){const pe=this.resume(),Se=this.stack[this.stack.length-1];Se.value=pe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const pe=this.resume(),Se=this.stack[this.stack.length-1];Se.value=pe.replace(/(\r?\n|\r)$/g,"")}function _(pe){const Se=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=Se,Fe.identifier=na(this.sliceSerialize(pe)).toLowerCase()}function I(){const pe=this.resume(),Se=this.stack[this.stack.length-1];Se.title=pe}function $(){const pe=this.resume(),Se=this.stack[this.stack.length-1];Se.url=pe}function D(pe){const Se=this.stack[this.stack.length-1];if(!Se.depth){const Fe=this.sliceSerialize(pe).length;Se.depth=Fe}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function B(pe){const Se=this.stack[this.stack.length-1];Se.depth=this.sliceSerialize(pe).codePointAt(0)===61?1:2}function Y(){this.data.setextHeadingSlurpLineEnding=void 0}function G(pe){const Fe=this.stack[this.stack.length-1].children;let _e=Fe[Fe.length-1];(!_e||_e.type!=="text")&&(_e=Je(),_e.position={start:xi(pe.start),end:void 0},Fe.push(_e)),this.stack.push(_e)}function j(pe){const Se=this.stack.pop();Se.value+=this.sliceSerialize(pe),Se.position.end=xi(pe.end)}function F(pe){const Se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Fe=Se.children[Se.children.length-1];Fe.position.end=xi(pe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Se.type)&&(G.call(this,pe),j.call(this,pe))}function H(){this.data.atHardBreak=!0}function ee(){const pe=this.resume(),Se=this.stack[this.stack.length-1];Se.value=pe}function K(){const pe=this.resume(),Se=this.stack[this.stack.length-1];Se.value=pe}function X(){const pe=this.resume(),Se=this.stack[this.stack.length-1];Se.value=pe}function V(){const pe=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";pe.type+="Reference",pe.referenceType=Se,delete pe.url,delete pe.title}else delete pe.identifier,delete pe.label;this.data.referenceType=void 0}function re(){const pe=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";pe.type+="Reference",pe.referenceType=Se,delete pe.url,delete pe.title}else delete pe.identifier,delete pe.label;this.data.referenceType=void 0}function ue(pe){const Se=this.sliceSerialize(pe),Fe=this.stack[this.stack.length-2];Fe.label=Gk(Se),Fe.identifier=na(Se).toLowerCase()}function Te(){const pe=this.stack[this.stack.length-1],Se=this.resume(),Fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Fe.type==="link"){const _e=pe.children;Fe.children=_e}else Fe.alt=Se}function P(){const pe=this.resume(),Se=this.stack[this.stack.length-1];Se.url=pe}function U(){const pe=this.resume(),Se=this.stack[this.stack.length-1];Se.title=pe}function q(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function ae(pe){const Se=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=Se,Fe.identifier=na(this.sliceSerialize(pe)).toLowerCase(),this.data.referenceType="full"}function he(pe){this.data.characterReferenceType=pe.type}function ne(pe){const Se=this.sliceSerialize(pe),Fe=this.data.characterReferenceType;let _e;Fe?(_e=C3(Se,Fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_e=Xh(Se);const He=this.stack[this.stack.length-1];He.value+=_e}function te(pe){const Se=this.stack.pop();Se.position.end=xi(pe.end)}function ce(pe){j.call(this,pe);const Se=this.stack[this.stack.length-1];Se.url=this.sliceSerialize(pe)}function ge(pe){j.call(this,pe);const Se=this.stack[this.stack.length-1];Se.url="mailto:"+this.sliceSerialize(pe)}function Re(){return{type:"blockquote",children:[]}}function je(){return{type:"code",lang:null,meta:null,value:""}}function be(){return{type:"inlineCode",value:""}}function qe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ve(){return{type:"emphasis",children:[]}}function tt(){return{type:"heading",depth:0,children:[]}}function nt(){return{type:"break"}}function Ut(){return{type:"html",value:""}}function Rt(){return{type:"image",title:null,url:"",alt:null}}function ut(){return{type:"link",title:null,url:"",children:[]}}function Ge(pe){return{type:"list",ordered:pe.type==="listOrdered",start:null,spread:pe._spread,children:[]}}function Bt(pe){return{type:"listItem",spread:pe._spread,checked:null,children:[]}}function Kt(){return{type:"paragraph",children:[]}}function hn(){return{type:"strong",children:[]}}function Je(){return{type:"text",value:""}}function tn(){return{type:"thematicBreak"}}}function xi(e){return{line:e.line,column:e.column,offset:e.offset}}function B3(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?B3(e,a):Xk(e,a)}}function Xk(e,t){let n;for(n in t)if(z3.call(t,n))switch(n){case"canContainEols":{const a=t[n];a&&e[n].push(...a);break}case"transforms":{const a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{const a=t[n];a&&Object.assign(e[n],a);break}}}function n4(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+vo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+vo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+vo({start:t.start,end:t.end})+") is still open")}function Zk(e){const t=this;t.parser=n;function n(a){return Kk(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Wk(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Qk(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
17
|
-
`}]}function Jk(e,t){const n=t.value?t.value+`
|
|
18
|
-
`:"",a={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let l={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function eE(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tE(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nE(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=ol(a.toLowerCase()),l=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=l+1,f+=1,e.footnoteCounts.set(a,f);const m={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,m);const h={type:"element",tagName:"sup",properties:{},children:[m]};return e.patch(t,h),e.applyData(t,h)}function rE(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aE(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function U3(e,t){const n=t.referenceType;let a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const s=e.all(t),l=s[0];l&&l.type==="text"?l.value="["+l.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=a:s.push({type:"text",value:a}),s}function iE(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return U3(e,t);const s={src:ol(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const l={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,l),e.applyData(t,l)}function sE(e,t){const n={src:ol(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}function lE(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}function oE(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return U3(e,t);const s={href:ol(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const l={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function cE(e,t){const n={href:ol(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function uE(e,t,n){const a=e.all(t),s=n?dE(n):q3(t),l={},c=[];if(typeof t.checked=="boolean"){const p=a[0];let b;p&&p.type==="element"&&p.tagName==="p"?b=p:(b={type:"element",tagName:"p",properties:{},children:[]},a.unshift(b)),b.children.length>0&&b.children.unshift({type:"text",value:" "}),b.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const p=a[f];(s||f!==0||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
19
|
-
`}),p.type==="element"&&p.tagName==="p"&&!s?c.push(...p.children):c.push(p)}const m=a[a.length-1];m&&(s||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
|
|
20
|
-
`});const h={type:"element",tagName:"li",properties:l,children:c};return e.patch(t,h),e.applyData(t,h)}function dE(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let a=-1;for(;!t&&++a<n.length;)t=q3(n[a])}return t}function q3(e){const t=e.spread;return t??e.children.length>1}function fE(e,t){const n={},a=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<a.length;){const c=a[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,l),e.applyData(t,l)}function mE(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hE(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function pE(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gE(e,t){const n=e.all(t),a=n.shift(),s=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),s.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=$h(t.children[1]),m=y3(t.children[t.children.length-1]);f&&m&&(c.position={start:f,end:m}),s.push(c)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)}function bE(e,t,n){const a=n?n.children:void 0,l=(a?a.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,f=c?c.length:t.children.length;let m=-1;const h=[];for(;++m<f;){const b=t.children[m],y={},x=c?c[m]:void 0;x&&(y.align=x);let k={type:"element",tagName:l,properties:y,children:[]};b&&(k.children=e.all(b),e.patch(b,k),k=e.applyData(b,k)),h.push(k)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function vE(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const r4=9,a4=32;function yE(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),s=0;const l=[];for(;a;)l.push(i4(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=n.exec(t);return l.push(i4(t.slice(s),s>0,!1)),l.join("")}function i4(e,t,n){let a=0,s=e.length;if(t){let l=e.codePointAt(a);for(;l===r4||l===a4;)a++,l=e.codePointAt(a)}if(n){let l=e.codePointAt(s-1);for(;l===r4||l===a4;)s--,l=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function xE(e,t){const n={type:"text",value:yE(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function wE(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const SE={blockquote:Wk,break:Qk,code:Jk,delete:eE,emphasis:tE,footnoteReference:nE,heading:rE,html:aE,imageReference:iE,image:sE,inlineCode:lE,linkReference:oE,link:cE,listItem:uE,list:fE,paragraph:mE,root:hE,strong:pE,table:gE,tableCell:vE,tableRow:bE,text:xE,thematicBreak:wE,toml:ru,yaml:ru,definition:ru,footnoteDefinition:ru};function ru(){}const H3=-1,Ku=0,xo=1,Nu=2,Wh=3,Qh=4,Jh=5,ep=6,F3=7,P3=8,$3=typeof self=="object"?self:globalThis,s4=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new $3[e](t)},kE=(e,t)=>{const n=(s,l)=>(e.set(l,s),s),a=s=>{if(e.has(s))return e.get(s);const[l,c]=t[s];switch(l){case Ku:case H3:return n(c,s);case xo:{const f=n([],s);for(const m of c)f.push(a(m));return f}case Nu:{const f=n({},s);for(const[m,h]of c)f[a(m)]=a(h);return f}case Wh:return n(new Date(c),s);case Qh:{const{source:f,flags:m}=c;return n(new RegExp(f,m),s)}case Jh:{const f=n(new Map,s);for(const[m,h]of c)f.set(a(m),a(h));return f}case ep:{const f=n(new Set,s);for(const m of c)f.add(a(m));return f}case F3:{const{name:f,message:m}=c;return n(typeof $3[f]=="function"?s4(f,m):new Error(m),s)}case P3:return n(BigInt(c),s);case"BigInt":return n(Object(BigInt(c)),s);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return n(new DataView(f),c)}}return n(s4(l,c),s)};return a},l4=e=>kE(new Map,e)(0),ts="",{toString:EE}={},{keys:TE}=Object,mo=e=>{const t=typeof e;if(t!=="object"||!e)return[Ku,t];const n=EE.call(e).slice(8,-1);switch(n){case"Array":return[xo,ts];case"Object":return[Nu,ts];case"Date":return[Wh,ts];case"RegExp":return[Qh,ts];case"Map":return[Jh,ts];case"Set":return[ep,ts];case"DataView":return[xo,n]}return n.includes("Array")?[xo,n]:e instanceof Error?[F3,e.name||"Error"]:[Nu,n]},au=([e,t])=>e===Ku&&(t==="function"||t==="symbol"),NE=(e,t,n,a)=>{const s=(c,f)=>{const m=a.push(c)-1;return n.set(f,m),m},l=c=>{if(n.has(c))return n.get(c);let[f,m]=mo(c);switch(f){case Ku:{let p=c;switch(m){case"bigint":f=P3,p=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);p=null;break;case"undefined":return s([H3],c)}return s([f,p],c)}case xo:{if(m){let y=c;return m==="DataView"?y=new Uint8Array(c.buffer):m==="ArrayBuffer"&&(y=new Uint8Array(c)),s([m,[...y]],c)}const p=[],b=s([f,p],c);for(const y of c)p.push(l(y));return b}case Nu:{if(m)switch(m){case"BigInt":return s([m,c.toString()],c);case"Boolean":case"Number":case"String":return s([m,c.valueOf()],c)}if(t&&"toJSON"in c)return l(c.toJSON());const p=[],b=s([f,p],c);for(const y of TE(c))(e||!au(mo(c[y])))&&p.push([l(y),l(c[y])]);return b}case Wh:return s([f,isNaN(c.getTime())?ts:c.toISOString()],c);case Qh:{const{source:p,flags:b}=c;return s([f,{source:p,flags:b}],c)}case Jh:{const p=[],b=s([f,p],c);for(const[y,x]of c)(e||!(au(mo(y))||au(mo(x))))&&p.push([l(y),l(x)]);return b}case ep:{const p=[],b=s([f,p],c);for(const y of c)(e||!au(mo(y)))&&p.push(l(y));return b}}const{message:h}=c;return s([f,{name:m,message:h}],c)};return l},o4=(e,{json:t,lossy:n}={})=>{const a=[];return NE(!(t||n),!!t,new Map,a)(e),a},Cu=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?l4(o4(e,t)):structuredClone(e):(e,t)=>l4(o4(e,t));function CE(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function RE(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function AE(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||CE,a=e.options.footnoteBackLabel||RE,s=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let m=-1;for(;++m<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[m]);if(!h)continue;const p=e.all(h),b=String(h.identifier).toUpperCase(),y=ol(b.toLowerCase());let x=0;const k=[],N=e.footnoteCounts.get(b);for(;N!==void 0&&++x<=N;){k.length>0&&k.push({type:"text",value:" "});let _=typeof n=="string"?n:n(m,x);typeof _=="string"&&(_={type:"text",value:_}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(m,x),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const R=p[p.length-1];if(R&&R.type==="element"&&R.tagName==="p"){const _=R.children[R.children.length-1];_&&_.type==="text"?_.value+=" ":R.children.push({type:"text",value:" "}),R.children.push(...k)}else p.push(...k);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(p,!0)};e.patch(h,C),f.push(C)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Cu(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
21
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
22
|
-
`}]}}const jo=(function(e){if(e==null)return OE;if(typeof e=="function")return Yu(e);if(typeof e=="object")return Array.isArray(e)?_E(e):IE(e);if(typeof e=="string")return ME(e);throw new Error("Expected function, string, or object as test")});function _E(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=jo(e[n]);return Yu(a);function a(...s){let l=-1;for(;++l<t.length;)if(t[l].apply(this,s))return!0;return!1}}function IE(e){const t=e;return Yu(n);function n(a){const s=a;let l;for(l in e)if(s[l]!==t[l])return!1;return!0}}function ME(e){return Yu(t);function t(n){return n&&n.type===e}}function Yu(e){return t;function t(n,a,s){return!!(DE(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function OE(){return!0}function DE(e){return e!==null&&typeof e=="object"&&"type"in e}const G3=[],jE=!0,ah=!1,V3="skip";function tp(e,t,n,a){let s;typeof t=="function"&&typeof n!="function"?(a=n,n=t):s=t;const l=jo(s),c=a?-1:1;f(e,void 0,[])();function f(m,h,p){const b=m&&typeof m=="object"?m:{};if(typeof b.type=="string"){const x=typeof b.tagName=="string"?b.tagName:typeof b.name=="string"?b.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(m.type+(x?"<"+x+">":""))+")"})}return y;function y(){let x=G3,k,N,R;if((!t||l(m,h,p[p.length-1]||void 0))&&(x=LE(n(m,p)),x[0]===ah))return x;if("children"in m&&m.children){const C=m;if(C.children&&x[0]!==V3)for(N=(a?C.children.length:-1)+c,R=p.concat(C);N>-1&&N<C.children.length;){const _=C.children[N];if(k=f(_,N,R)(),k[0]===ah)return k;N=typeof k[1]=="number"?k[1]:N+c}}return x}}}function LE(e){return Array.isArray(e)?e:typeof e=="number"?[jE,e]:e==null?G3:[e]}function np(e,t,n,a){let s,l,c;typeof t=="function"&&typeof n!="function"?(l=void 0,c=t,s=n):(l=t,c=n,s=a),tp(e,l,f,s);function f(m,h){const p=h[h.length-1],b=p?p.children.indexOf(m):void 0;return c(m,b,p)}}const ih={}.hasOwnProperty,zE={};function BE(e,t){const n=t||zE,a=new Map,s=new Map,l=new Map,c={...SE,...n.handlers},f={all:h,applyData:qE,definitionById:a,footnoteById:s,footnoteCounts:l,footnoteOrder:[],handlers:c,one:m,options:n,patch:UE,wrap:FE};return np(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const b=p.type==="definition"?a:s,y=String(p.identifier).toUpperCase();b.has(y)||b.set(y,p)}}),f;function m(p,b){const y=p.type,x=f.handlers[y];if(ih.call(f.handlers,y)&&x)return x(f,p,b);if(f.options.passThrough&&f.options.passThrough.includes(y)){if("children"in p){const{children:N,...R}=p,C=Cu(R);return C.children=f.all(p),C}return Cu(p)}return(f.options.unknownHandler||HE)(f,p,b)}function h(p){const b=[];if("children"in p){const y=p.children;let x=-1;for(;++x<y.length;){const k=f.one(y[x],p);if(k){if(x&&y[x-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=c4(k.value)),!Array.isArray(k)&&k.type==="element")){const N=k.children[0];N&&N.type==="text"&&(N.value=c4(N.value))}Array.isArray(k)?b.push(...k):b.push(k)}}}return b}}function UE(e,t){e.position&&(t.position=RS(e))}function qE(e,t){let n=t;if(e&&e.data){const a=e.data.hName,s=e.data.hChildren,l=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{const c="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:c}}n.type==="element"&&l&&Object.assign(n.properties,Cu(l)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function HE(e,t){const n=t.data||{},a="value"in t&&!(ih.call(n,"hProperties")||ih.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function FE(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
|
|
23
|
-
`});++a<e.length;)a&&n.push({type:"text",value:`
|
|
24
|
-
`}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
25
|
-
`}),n}function c4(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function u4(e,t){const n=BE(e,t),a=n.one(e,void 0),s=AE(n),l=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&l.children.push({type:"text",value:`
|
|
26
|
-
`},s),l}function PE(e,t){return e&&"run"in e?async function(n,a){const s=u4(n,{file:a,...t});await e.run(s,a)}:function(n,a){return u4(n,{file:a,...e||t})}}function d4(e){if(e)throw e}var Rf,f4;function $E(){if(f4)return Rf;f4=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},l=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),b=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!b)return!1;var y;for(y in h);return typeof y>"u"||e.call(h,y)},c=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},f=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(a)return a(h,p).value}else return;return h[p]};return Rf=function m(){var h,p,b,y,x,k,N=arguments[0],R=1,C=arguments.length,_=!1;for(typeof N=="boolean"&&(_=N,N=arguments[1]||{},R=2),(N==null||typeof N!="object"&&typeof N!="function")&&(N={});R<C;++R)if(h=arguments[R],h!=null)for(p in h)b=f(N,p),y=f(h,p),N!==y&&(_&&y&&(l(y)||(x=s(y)))?(x?(x=!1,k=b&&s(b)?b:[]):k=b&&l(b)?b:{},c(N,{name:p,newValue:m(_,k,y)})):typeof y<"u"&&c(N,{name:p,newValue:y}));return N},Rf}var GE=$E();const Af=qu(GE);function sh(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function VE(){const e=[],t={run:n,use:a};return t;function n(...s){let l=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...s);function f(m,...h){const p=e[++l];let b=-1;if(m){c(m);return}for(;++b<s.length;)(h[b]===null||h[b]===void 0)&&(h[b]=s[b]);s=h,p?KE(p,f)(...h):c(null,...h)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function KE(e,t){let n;return a;function a(...c){const f=e.length>c.length;let m;f&&c.push(s);try{m=e.apply(this,c)}catch(h){const p=h;if(f&&n)throw p;return s(p)}f||(m&&m.then&&typeof m.then=="function"?m.then(l,s):m instanceof Error?s(m):l(m))}function s(c,...f){n||(n=!0,t(c,...f))}function l(c){s(null,c)}}const ca={basename:YE,dirname:XE,extname:ZE,join:WE,sep:"/"};function YE(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Lo(e);let n=0,a=-1,s=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else a<0&&(l=!0,a=s+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let c=-1,f=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else c<0&&(l=!0,c=s+1),f>-1&&(e.codePointAt(s)===t.codePointAt(f--)?f<0&&(a=s):(f=-1,a=c));return n===a?a=c:a<0&&(a=e.length),e.slice(n,a)}function XE(e){if(Lo(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function ZE(e){Lo(e);let t=e.length,n=-1,a=0,s=-1,l=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}n<0&&(c=!0,n=t+1),f===46?s<0?s=t:l!==1&&(l=1):s>-1&&(l=-1)}return s<0||n<0||l===0||l===1&&s===n-1&&s===a+1?"":e.slice(s,n)}function WE(...e){let t=-1,n;for(;++t<e.length;)Lo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":QE(n)}function QE(e){Lo(e);const t=e.codePointAt(0)===47;let n=JE(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function JE(e,t){let n="",a=0,s=-1,l=0,c=-1,f,m;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(s===c-1||l===1))if(s!==c-1&&l===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(m=n.lastIndexOf("/"),m!==n.length-1){m<0?(n="",a=0):(n=n.slice(0,m),a=n.length-1-n.lastIndexOf("/")),s=c,l=0;continue}}else if(n.length>0){n="",a=0,s=c,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(s+1,c):n=e.slice(s+1,c),a=c-s-1;s=c,l=0}else f===46&&l>-1?l++:l=-1}return n}function Lo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const eT={cwd:tT};function tT(){return"/"}function lh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function nT(e){if(typeof e=="string")e=new URL(e);else if(!lh(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return rT(e)}function rT(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const a=t.codePointAt(n+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const _f=["history","path","basename","stem","extname","dirname"];class K3{constructor(t){let n;t?lh(t)?n={path:t}:typeof t=="string"||aT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":eT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<_f.length;){const l=_f[a];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let s;for(s in n)_f.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?ca.basename(this.path):void 0}set basename(t){Mf(t,"basename"),If(t,"basename"),this.path=ca.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ca.dirname(this.path):void 0}set dirname(t){m4(this.basename,"dirname"),this.path=ca.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ca.extname(this.path):void 0}set extname(t){if(If(t,"extname"),m4(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ca.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){lh(t)&&(t=nT(t)),Mf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ca.basename(this.path,this.extname):void 0}set stem(t){Mf(t,"stem"),If(t,"stem"),this.path=ca.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){const s=this.message(t,n,a);throw s.fatal=!0,s}info(t,n,a){const s=this.message(t,n,a);return s.fatal=void 0,s}message(t,n,a){const s=new ar(t,n,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function If(e,t){if(e&&e.includes(ca.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ca.sep+"`")}function Mf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function m4(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function aT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const iT=(function(e){const a=this.constructor.prototype,s=a[e],l=function(){return s.apply(l,arguments)};return Object.setPrototypeOf(l,a),l}),sT={}.hasOwnProperty;class rp extends iT{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=VE()}copy(){const t=new rp;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(Af(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(jf("data",this.frozen),this.namespace[t]=n,this):sT.call(this.namespace,t)&&this.namespace[t]||void 0:t?(jf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=n.call(t,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=iu(t),a=this.parser||this.Parser;return Of("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),Of("process",this.parser||this.Parser),Df("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(l,c){const f=iu(t),m=a.parse(f);a.run(m,f,function(p,b,y){if(p||!b||!y)return h(p);const x=b,k=a.stringify(x,y);cT(k)?y.value=k:y.result=k,h(p,y)});function h(p,b){p||!b?c(p):l?l(b):n(void 0,b)}}}processSync(t){let n=!1,a;return this.freeze(),Of("processSync",this.parser||this.Parser),Df("processSync",this.compiler||this.Compiler),this.process(t,s),p4("processSync","process",n),a;function s(l,c){n=!0,d4(l),a=c}}run(t,n,a){h4(t),this.freeze();const s=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?l(void 0,a):new Promise(l);function l(c,f){const m=iu(n);s.run(t,m,h);function h(p,b,y){const x=b||t;p?f(p):c?c(x):a(void 0,x,y)}}}runSync(t,n){let a=!1,s;return this.run(t,n,l),p4("runSync","run",a),s;function l(c,f){d4(c),s=f,a=!0}}stringify(t,n){this.freeze();const a=iu(n),s=this.compiler||this.Compiler;return Df("stringify",s),h4(t),s(t,a)}use(t,...n){const a=this.attachers,s=this.namespace;if(jf("use",this.frozen),t!=null)if(typeof t=="function")m(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(h){if(typeof h=="function")m(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...b]=h;m(p,b)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))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");f(h.plugins),h.settings&&(s.settings=Af(!0,s.settings,h.settings))}function f(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const b=h[p];l(b)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function m(h,p){let b=-1,y=-1;for(;++b<a.length;)if(a[b][0]===h){y=b;break}if(y===-1)a.push([h,...p]);else if(p.length>0){let[x,...k]=p;const N=a[y][1];sh(N)&&sh(x)&&(x=Af(!0,N,x)),a[y]=[h,x,...k]}}}}const lT=new rp().freeze();function Of(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Df(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function jf(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function h4(e){if(!sh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function p4(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function iu(e){return oT(e)?e:new K3(e)}function oT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function cT(e){return typeof e=="string"||uT(e)}function uT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dT="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",g4=[],b4={allowDangerousHtml:!0},fT=/^(https?|ircs?|mailto|xmpp)$/i,mT=[{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 hT(e){const t=pT(e),n=gT(e);return bT(t.runSync(t.parse(n),n),e)}function pT(e){const t=e.rehypePlugins||g4,n=e.remarkPlugins||g4,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...b4}:b4;return lT().use(Zk).use(n).use(PE,a).use(t)}function gT(e){const t=e.children||"",n=new K3;return typeof t=="string"&&(n.value=t),n}function bT(e,t){const n=t.allowedElements,a=t.allowElement,s=t.components,l=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,m=t.urlTransform||vT;for(const p of mT)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+dT+p.id,void 0);return np(e,h),OS(e,{Fragment:u.Fragment,components:s,ignoreInvalidStyle:!0,jsx:u.jsx,jsxs:u.jsxs,passKeys:!0,passNode:!0});function h(p,b,y){if(p.type==="raw"&&y&&typeof b=="number")return c?y.children.splice(b,1):y.children[b]={type:"text",value:p.value},b;if(p.type==="element"){let x;for(x in Tf)if(Object.hasOwn(Tf,x)&&Object.hasOwn(p.properties,x)){const k=p.properties[x],N=Tf[x];(N===null||N.includes(p.tagName))&&(p.properties[x]=m(String(k||""),x,p))}}if(p.type==="element"){let x=n?!n.includes(p.tagName):l?l.includes(p.tagName):!1;if(!x&&a&&typeof b=="number"&&(x=!a(p,b,y)),x&&y&&typeof b=="number")return f&&p.children?y.children.splice(b,1,...p.children):y.children.splice(b,1),b}}}function vT(e){const t=e.indexOf(":"),n=e.indexOf("?"),a=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||a!==-1&&t>a||fT.test(e.slice(0,t))?e:""}function v4(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,s=n.indexOf(t);for(;s!==-1;)a++,s=n.indexOf(t,s+t.length);return a}function yT(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function xT(e,t,n){const s=jo((n||{}).ignore||[]),l=wT(t);let c=-1;for(;++c<l.length;)tp(e,"text",f);function f(h,p){let b=-1,y;for(;++b<p.length;){const x=p[b],k=y?y.children:void 0;if(s(x,k?k.indexOf(x):void 0,y))return;y=x}if(y)return m(h,p)}function m(h,p){const b=p[p.length-1],y=l[c][0],x=l[c][1];let k=0;const R=b.children.indexOf(h);let C=!1,_=[];y.lastIndex=0;let I=y.exec(h.value);for(;I;){const $=I.index,D={index:I.index,input:I.input,stack:[...p,h]};let M=x(...I,D);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?y.lastIndex=$+1:(k!==$&&_.push({type:"text",value:h.value.slice(k,$)}),Array.isArray(M)?_.push(...M):M&&_.push(M),k=$+I[0].length,C=!0),!y.global)break;I=y.exec(h.value)}return C?(k<h.value.length&&_.push({type:"text",value:h.value.slice(k)}),b.children.splice(R,1,..._)):_=[h],R+_.length}}function wT(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let a=-1;for(;++a<n.length;){const s=n[a];t.push([ST(s[0]),kT(s[1])])}return t}function ST(e){return typeof e=="string"?new RegExp(yT(e),"g"):e}function kT(e){return typeof e=="function"?e:function(){return e}}const Lf="phrasing",zf=["autolink","link","image","label"];function ET(){return{transforms:[IT],enter:{literalAutolink:NT,literalAutolinkEmail:Bf,literalAutolinkHttp:Bf,literalAutolinkWww:Bf},exit:{literalAutolink:_T,literalAutolinkEmail:AT,literalAutolinkHttp:CT,literalAutolinkWww:RT}}}function TT(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Lf,notInConstruct:zf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Lf,notInConstruct:zf},{character:":",before:"[ps]",after:"\\/",inConstruct:Lf,notInConstruct:zf}]}}function NT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Bf(e){this.config.enter.autolinkProtocol.call(this,e)}function CT(e){this.config.exit.autolinkProtocol.call(this,e)}function RT(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function AT(e){this.config.exit.autolinkEmail.call(this,e)}function _T(e){this.exit(e)}function IT(e){xT(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,MT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),OT]],{ignore:["link","linkReference"]})}function MT(e,t,n,a,s){let l="";if(!Y3(s)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!DT(n)))return!1;const c=jT(n+a);if(!c[0])return!1;const f={type:"link",title:null,url:l+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function OT(e,t,n,a){return!Y3(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function DT(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function jT(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],a=n.indexOf(")");const s=v4(e,"(");let l=v4(e,")");for(;a!==-1&&s>l;)e+=n.slice(0,a+1),n=n.slice(a+1),a=n.indexOf(")"),l++;return[e,n]}function Y3(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||os(n)||Gu(n))&&(!t||n!==47)}X3.peek=$T;function LT(){this.buffer()}function zT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function BT(){this.buffer()}function UT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function qT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=na(this.sliceSerialize(e)).toLowerCase(),n.label=t}function HT(e){this.exit(e)}function FT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=na(this.sliceSerialize(e)).toLowerCase(),n.label=t}function PT(e){this.exit(e)}function $T(){return"["}function X3(e,t,n,a){const s=n.createTracker(a);let l=s.move("[^");const c=n.enter("footnoteReference"),f=n.enter("reference");return l+=s.move(n.safe(n.associationId(e),{after:"]",before:l})),f(),c(),l+=s.move("]"),l}function GT(){return{enter:{gfmFootnoteCallString:LT,gfmFootnoteCall:zT,gfmFootnoteDefinitionLabelString:BT,gfmFootnoteDefinition:UT},exit:{gfmFootnoteCallString:qT,gfmFootnoteCall:HT,gfmFootnoteDefinitionLabelString:FT,gfmFootnoteDefinition:PT}}}function VT(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:X3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,s,l,c){const f=l.createTracker(c);let m=f.move("[^");const h=l.enter("footnoteDefinition"),p=l.enter("label");return m+=f.move(l.safe(l.associationId(a),{before:m,after:"]"})),p(),m+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),m+=f.move((t?`
|
|
27
|
-
`:" ")+l.indentLines(l.containerFlow(a,f.current()),t?Z3:KT))),h(),m}}function KT(e,t,n){return t===0?e:Z3(e,t,n)}function Z3(e,t,n){return(n?"":" ")+e}const YT=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];W3.peek=JT;function XT(){return{canContainEols:["delete"],enter:{strikethrough:WT},exit:{strikethrough:QT}}}function ZT(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:YT}],handlers:{delete:W3}}}function WT(e){this.enter({type:"delete",children:[]},e)}function QT(e){this.exit(e)}function W3(e,t,n,a){const s=n.createTracker(a),l=n.enter("strikethrough");let c=s.move("~~");return c+=n.containerPhrasing(e,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),l(),c}function JT(){return"~"}function eN(e){return e.length}function tN(e,t){const n=t||{},a=(n.align||[]).concat(),s=n.stringLength||eN,l=[],c=[],f=[],m=[];let h=0,p=-1;for(;++p<e.length;){const N=[],R=[];let C=-1;for(e[p].length>h&&(h=e[p].length);++C<e[p].length;){const _=nN(e[p][C]);if(n.alignDelimiters!==!1){const I=s(_);R[C]=I,(m[C]===void 0||I>m[C])&&(m[C]=I)}N.push(_)}c[p]=N,f[p]=R}let b=-1;if(typeof a=="object"&&"length"in a)for(;++b<h;)l[b]=y4(a[b]);else{const N=y4(a);for(;++b<h;)l[b]=N}b=-1;const y=[],x=[];for(;++b<h;){const N=l[b];let R="",C="";N===99?(R=":",C=":"):N===108?R=":":N===114&&(C=":");let _=n.alignDelimiters===!1?1:Math.max(1,m[b]-R.length-C.length);const I=R+"-".repeat(_)+C;n.alignDelimiters!==!1&&(_=R.length+_+C.length,_>m[b]&&(m[b]=_),x[b]=_),y[b]=I}c.splice(1,0,y),f.splice(1,0,x),p=-1;const k=[];for(;++p<c.length;){const N=c[p],R=f[p];b=-1;const C=[];for(;++b<h;){const _=N[b]||"";let I="",$="";if(n.alignDelimiters!==!1){const D=m[b]-(R[b]||0),M=l[b];M===114?I=" ".repeat(D):M===99?D%2?(I=" ".repeat(D/2+.5),$=" ".repeat(D/2-.5)):(I=" ".repeat(D/2),$=I):$=" ".repeat(D)}n.delimiterStart!==!1&&!b&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||b)&&C.push(" "),n.alignDelimiters!==!1&&C.push(I),C.push(_),n.alignDelimiters!==!1&&C.push($),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||b!==h-1)&&C.push("|")}k.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return k.join(`
|
|
28
|
-
`)}function nN(e){return e==null?"":String(e)}function y4(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function rN(e,t,n,a){const s=n.enter("blockquote"),l=n.createTracker(a);l.move("> "),l.shift(2);const c=n.indentLines(n.containerFlow(e,l.current()),aN);return s(),c}function aN(e,t,n){return">"+(n?"":" ")+e}function iN(e,t){return x4(e,t.inConstruct,!0)&&!x4(e,t.notInConstruct,!1)}function x4(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function w4(e,t,n,a){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
29
|
-
`&&iN(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
|
|
30
|
-
`}function Q3(e,t){const n=String(e);let a=n.indexOf(t),s=a,l=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===s?++l>c&&(c=l):l=1,s=a+t.length,a=n.indexOf(t,s);return c}function sN(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function lN(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function oN(e,t,n,a){const s=lN(n),l=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(sN(e,n)){const b=n.enter("codeIndented"),y=n.indentLines(l,cN);return b(),y}const f=n.createTracker(a),m=s.repeat(Math.max(Q3(l,s)+1,3)),h=n.enter("codeFenced");let p=f.move(m);if(e.lang){const b=n.enter(`codeFencedLang${c}`);p+=f.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...f.current()})),b()}if(e.lang&&e.meta){const b=n.enter(`codeFencedMeta${c}`);p+=f.move(" "),p+=f.move(n.safe(e.meta,{before:p,after:`
|
|
31
|
-
`,encode:["`"],...f.current()})),b()}return p+=f.move(`
|
|
32
|
-
`),l&&(p+=f.move(l+`
|
|
33
|
-
`)),p+=f.move(m),h(),p}function cN(e,t,n){return(n?"":" ")+e}function ap(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function uN(e,t,n,a){const s=ap(n),l=s==='"'?"Quote":"Apostrophe",c=n.enter("definition");let f=n.enter("label");const m=n.createTracker(a);let h=m.move("[");return h+=m.move(n.safe(n.associationId(e),{before:h,after:"]",...m.current()})),h+=m.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=m.move("<"),h+=m.move(n.safe(e.url,{before:h,after:">",...m.current()})),h+=m.move(">")):(f=n.enter("destinationRaw"),h+=m.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
34
|
-
`,...m.current()}))),f(),e.title&&(f=n.enter(`title${l}`),h+=m.move(" "+s),h+=m.move(n.safe(e.title,{before:h,after:s,...m.current()})),h+=m.move(s),f()),c(),h}function dN(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Co(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ru(e,t,n){const a=nl(e),s=nl(t);return a===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}J3.peek=fN;function J3(e,t,n,a){const s=dN(n),l=n.enter("emphasis"),c=n.createTracker(a),f=c.move(s);let m=c.move(n.containerPhrasing(e,{after:s,before:f,...c.current()}));const h=m.charCodeAt(0),p=Ru(a.before.charCodeAt(a.before.length-1),h,s);p.inside&&(m=Co(h)+m.slice(1));const b=m.charCodeAt(m.length-1),y=Ru(a.after.charCodeAt(0),b,s);y.inside&&(m=m.slice(0,-1)+Co(b));const x=c.move(s);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},f+m+x}function fN(e,t,n){return n.options.emphasis||"*"}function mN(e,t){let n=!1;return np(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,ah}),!!((!e.depth||e.depth<3)&&Yh(e)&&(t.options.setext||n))}function hN(e,t,n,a){const s=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(a);if(mN(e,n)){const p=n.enter("headingSetext"),b=n.enter("phrasing"),y=n.containerPhrasing(e,{...l.current(),before:`
|
|
35
|
-
`,after:`
|
|
36
|
-
`});return b(),p(),y+`
|
|
37
|
-
`+(s===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
38
|
-
`))+1))}const c="#".repeat(s),f=n.enter("headingAtx"),m=n.enter("phrasing");l.move(c+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
39
|
-
`,...l.current()});return/^[\t ]/.test(h)&&(h=Co(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,n.options.closeAtx&&(h+=" "+c),m(),f(),h}e5.peek=pN;function e5(e){return e.value||""}function pN(){return"<"}t5.peek=gN;function t5(e,t,n,a){const s=ap(n),l=s==='"'?"Quote":"Apostrophe",c=n.enter("image");let f=n.enter("label");const m=n.createTracker(a);let h=m.move("![");return h+=m.move(n.safe(e.alt,{before:h,after:"]",...m.current()})),h+=m.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=m.move("<"),h+=m.move(n.safe(e.url,{before:h,after:">",...m.current()})),h+=m.move(">")):(f=n.enter("destinationRaw"),h+=m.move(n.safe(e.url,{before:h,after:e.title?" ":")",...m.current()}))),f(),e.title&&(f=n.enter(`title${l}`),h+=m.move(" "+s),h+=m.move(n.safe(e.title,{before:h,after:s,...m.current()})),h+=m.move(s),f()),h+=m.move(")"),c(),h}function gN(){return"!"}n5.peek=bN;function n5(e,t,n,a){const s=e.referenceType,l=n.enter("imageReference");let c=n.enter("label");const f=n.createTracker(a);let m=f.move("![");const h=n.safe(e.alt,{before:m,after:"]",...f.current()});m+=f.move(h+"]["),c();const p=n.stack;n.stack=[],c=n.enter("reference");const b=n.safe(n.associationId(e),{before:m,after:"]",...f.current()});return c(),n.stack=p,l(),s==="full"||!h||h!==b?m+=f.move(b+"]"):s==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function bN(){return"!"}r5.peek=vN;function r5(e,t,n){let a=e.value||"",s="`",l=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(a);)s+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++l<n.unsafe.length;){const c=n.unsafe[l],f=n.compilePattern(c);let m;if(c.atBreak)for(;m=f.exec(a);){let h=m.index;a.charCodeAt(h)===10&&a.charCodeAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(m.index+1)}}return s+a+s}function vN(){return"`"}function a5(e,t){const n=Yh(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}i5.peek=yN;function i5(e,t,n,a){const s=ap(n),l=s==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let f,m;if(a5(e,n)){const p=n.stack;n.stack=[],f=n.enter("autolink");let b=c.move("<");return b+=c.move(n.containerPhrasing(e,{before:b,after:">",...c.current()})),b+=c.move(">"),f(),n.stack=p,b}f=n.enter("link"),m=n.enter("label");let h=c.move("[");return h+=c.move(n.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),m(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(m=n.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(n.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(m=n.enter("destinationRaw"),h+=c.move(n.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),m(),e.title&&(m=n.enter(`title${l}`),h+=c.move(" "+s),h+=c.move(n.safe(e.title,{before:h,after:s,...c.current()})),h+=c.move(s),m()),h+=c.move(")"),f(),h}function yN(e,t,n){return a5(e,n)?"<":"["}s5.peek=xN;function s5(e,t,n,a){const s=e.referenceType,l=n.enter("linkReference");let c=n.enter("label");const f=n.createTracker(a);let m=f.move("[");const h=n.containerPhrasing(e,{before:m,after:"]",...f.current()});m+=f.move(h+"]["),c();const p=n.stack;n.stack=[],c=n.enter("reference");const b=n.safe(n.associationId(e),{before:m,after:"]",...f.current()});return c(),n.stack=p,l(),s==="full"||!h||h!==b?m+=f.move(b+"]"):s==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function xN(){return"["}function ip(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function wN(e){const t=ip(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function SN(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function l5(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function kN(e,t,n,a){const s=n.enter("list"),l=n.bulletCurrent;let c=e.ordered?SN(n):ip(n);const f=e.ordered?c==="."?")":".":wN(n);let m=t&&n.bulletLastUsed?c===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(m=!0),l5(n)===c&&p){let b=-1;for(;++b<e.children.length;){const y=e.children[b];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(c=f),n.bulletCurrent=c;const h=n.containerFlow(e,a);return n.bulletLastUsed=c,n.bulletCurrent=l,s(),h}function EN(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function TN(e,t,n,a){const s=EN(n);let l=n.bulletCurrent||ip(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let c=l.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=n.createTracker(a);f.move(l+" ".repeat(c-l.length)),f.shift(c);const m=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,f.current()),p);return m(),h;function p(b,y,x){return y?(x?"":" ".repeat(c))+b:(x?l:l+" ".repeat(c-l.length))+b}}function NN(e,t,n,a){const s=n.enter("paragraph"),l=n.enter("phrasing"),c=n.containerPhrasing(e,a);return l(),s(),c}const CN=jo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function RN(e,t,n,a){return(e.children.some(function(c){return CN(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function AN(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}o5.peek=_N;function o5(e,t,n,a){const s=AN(n),l=n.enter("strong"),c=n.createTracker(a),f=c.move(s+s);let m=c.move(n.containerPhrasing(e,{after:s,before:f,...c.current()}));const h=m.charCodeAt(0),p=Ru(a.before.charCodeAt(a.before.length-1),h,s);p.inside&&(m=Co(h)+m.slice(1));const b=m.charCodeAt(m.length-1),y=Ru(a.after.charCodeAt(0),b,s);y.inside&&(m=m.slice(0,-1)+Co(b));const x=c.move(s+s);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},f+m+x}function _N(e,t,n){return n.options.strong||"*"}function IN(e,t,n,a){return n.safe(e.value,a)}function MN(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ON(e,t,n){const a=(l5(n)+(n.options.ruleSpaces?" ":"")).repeat(MN(n));return n.options.ruleSpaces?a.slice(0,-1):a}const c5={blockquote:rN,break:w4,code:oN,definition:uN,emphasis:J3,hardBreak:w4,heading:hN,html:e5,image:t5,imageReference:n5,inlineCode:r5,link:i5,linkReference:s5,list:kN,listItem:TN,paragraph:NN,root:RN,strong:o5,text:IN,thematicBreak:ON};function DN(){return{enter:{table:jN,tableData:S4,tableHeader:S4,tableRow:zN},exit:{codeText:BN,table:LN,tableData:Uf,tableHeader:Uf,tableRow:Uf}}}function jN(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function LN(e){this.exit(e),this.data.inTable=void 0}function zN(e){this.enter({type:"tableRow",children:[]},e)}function Uf(e){this.exit(e)}function S4(e){this.enter({type:"tableCell",children:[]},e)}function BN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,UN));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function UN(e,t){return t==="|"?t:e}function qN(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
40
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:c,tableCell:m,tableRow:f}};function c(x,k,N,R){return h(p(x,N,R),x.align)}function f(x,k,N,R){const C=b(x,N,R),_=h([C]);return _.slice(0,_.indexOf(`
|
|
41
|
-
`))}function m(x,k,N,R){const C=N.enter("tableCell"),_=N.enter("phrasing"),I=N.containerPhrasing(x,{...R,before:l,after:l});return _(),C(),I}function h(x,k){return tN(x,{align:k,alignDelimiters:a,padding:n,stringLength:s})}function p(x,k,N){const R=x.children;let C=-1;const _=[],I=k.enter("table");for(;++C<R.length;)_[C]=b(R[C],k,N);return I(),_}function b(x,k,N){const R=x.children;let C=-1;const _=[],I=k.enter("tableRow");for(;++C<R.length;)_[C]=m(R[C],x,k,N);return I(),_}function y(x,k,N){let R=c5.inlineCode(x,k,N);return N.stack.includes("tableCell")&&(R=R.replace(/\|/g,"\\$&")),R}}function HN(){return{exit:{taskListCheckValueChecked:k4,taskListCheckValueUnchecked:k4,paragraph:PN}}}function FN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:$N}}}function k4(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function PN(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const a=n.children[0];if(a&&a.type==="text"){const s=t.children;let l=-1,c;for(;++l<s.length;){const f=s[l];if(f.type==="paragraph"){c=f;break}}c===n&&(a.value=a.value.slice(1),a.value.length===0?n.children.shift():n.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,n.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function $N(e,t,n,a){const s=e.children[0],l=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=n.createTracker(a);l&&f.move(c);let m=c5.listItem(e,t,n,{...a,...f.current()});return l&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),m;function h(p){return p+c}}function GN(){return[ET(),GT(),XT(),DN(),HN()]}function VN(e){return{extensions:[TT(),VT(e),ZT(),qN(e),FN()]}}const KN={tokenize:JN,partial:!0},u5={tokenize:eC,partial:!0},d5={tokenize:tC,partial:!0},f5={tokenize:nC,partial:!0},YN={tokenize:rC,partial:!0},m5={name:"wwwAutolink",tokenize:WN,previous:p5},h5={name:"protocolAutolink",tokenize:QN,previous:g5},Fa={name:"emailAutolink",tokenize:ZN,previous:b5},fa={};function XN(){return{text:fa}}let Qi=48;for(;Qi<123;)fa[Qi]=Fa,Qi++,Qi===58?Qi=65:Qi===91&&(Qi=97);fa[43]=Fa;fa[45]=Fa;fa[46]=Fa;fa[95]=Fa;fa[72]=[Fa,h5];fa[104]=[Fa,h5];fa[87]=[Fa,m5];fa[119]=[Fa,m5];function ZN(e,t,n){const a=this;let s,l;return c;function c(b){return!oh(b)||!b5.call(a,a.previous)||sp(a.events)?n(b):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(b))}function f(b){return oh(b)?(e.consume(b),f):b===64?(e.consume(b),m):n(b)}function m(b){return b===46?e.check(YN,p,h)(b):b===45||b===95||nr(b)?(l=!0,e.consume(b),m):p(b)}function h(b){return e.consume(b),s=!0,m}function p(b){return l&&s&&cr(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(b)):n(b)}}function WN(e,t,n){const a=this;return s;function s(c){return c!==87&&c!==119||!p5.call(a,a.previous)||sp(a.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(KN,e.attempt(u5,e.attempt(d5,l),n),n)(c))}function l(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function QN(e,t,n){const a=this;let s="",l=!1;return c;function c(b){return(b===72||b===104)&&g5.call(a,a.previous)&&!sp(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(b),e.consume(b),f):n(b)}function f(b){if(cr(b)&&s.length<5)return s+=String.fromCodePoint(b),e.consume(b),f;if(b===58){const y=s.toLowerCase();if(y==="http"||y==="https")return e.consume(b),m}return n(b)}function m(b){return b===47?(e.consume(b),l?h:(l=!0,m)):n(b)}function h(b){return b===null||Tu(b)||an(b)||os(b)||Gu(b)?n(b):e.attempt(u5,e.attempt(d5,p),n)(b)}function p(b){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(b)}}function JN(e,t,n){let a=0;return s;function s(c){return(c===87||c===119)&&a<3?(a++,e.consume(c),s):c===46&&a===3?(e.consume(c),l):n(c)}function l(c){return c===null?n(c):t(c)}}function eC(e,t,n){let a,s,l;return c;function c(h){return h===46||h===95?e.check(f5,m,f)(h):h===null||an(h)||os(h)||h!==45&&Gu(h)?m(h):(l=!0,e.consume(h),c)}function f(h){return h===95?a=!0:(s=a,a=void 0),e.consume(h),c}function m(h){return s||a||!l?n(h):t(h)}}function tC(e,t){let n=0,a=0;return s;function s(c){return c===40?(n++,e.consume(c),s):c===41&&a<n?l(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(f5,t,l)(c):c===null||an(c)||os(c)?t(c):(e.consume(c),s)}function l(c){return c===41&&a++,e.consume(c),s}}function nC(e,t,n){return a;function a(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),a):f===38?(e.consume(f),l):f===93?(e.consume(f),s):f===60||f===null||an(f)||os(f)?t(f):n(f)}function s(f){return f===null||f===40||f===91||an(f)||os(f)?t(f):a(f)}function l(f){return cr(f)?c(f):n(f)}function c(f){return f===59?(e.consume(f),a):cr(f)?(e.consume(f),c):n(f)}}function rC(e,t,n){return a;function a(l){return e.consume(l),s}function s(l){return nr(l)?n(l):t(l)}}function p5(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||an(e)}function g5(e){return!cr(e)}function b5(e){return!(e===47||oh(e))}function oh(e){return e===43||e===45||e===46||e===95||nr(e)}function sp(e){let t=e.length,n=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){n=!0;break}if(a._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const aC={tokenize:fC,partial:!0};function iC(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:cC,continuation:{tokenize:uC},exit:dC}},text:{91:{name:"gfmFootnoteCall",tokenize:oC},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:sC,resolveTo:lC}}}}function sC(e,t,n){const a=this;let s=a.events.length;const l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;s--;){const m=a.events[s][1];if(m.type==="labelImage"){c=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return f;function f(m){if(!c||!c._balanced)return n(m);const h=na(a.sliceSerialize({start:c.end,end:a.now()}));return h.codePointAt(0)!==94||!l.includes(h.slice(1))?n(m):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),t(m))}}function lC(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},f=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",l,t],["enter",c,t],["exit",c,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...f),e}function oC(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let l=0,c;return f;function f(b){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),m}function m(b){return b!==94?n(b):(e.enter("gfmFootnoteCallMarker"),e.consume(b),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(b){if(l>999||b===93&&!c||b===null||b===91||an(b))return n(b);if(b===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return s.includes(na(a.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(b)}return an(b)||(c=!0),l++,e.consume(b),b===92?p:h}function p(b){return b===91||b===92||b===93?(e.consume(b),l++,h):h(b)}}function cC(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let l,c=0,f;return m;function m(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(k)}function p(k){if(c>999||k===93&&!f||k===null||k===91||an(k))return n(k);if(k===93){e.exit("chunkString");const N=e.exit("gfmFootnoteDefinitionLabelString");return l=na(a.sliceSerialize(N)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return an(k)||(f=!0),c++,e.consume(k),k===92?b:p}function b(k){return k===91||k===92||k===93?(e.consume(k),c++,p):p(k)}function y(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),s.includes(l)||s.push(l),Ct(e,x,"gfmFootnoteDefinitionWhitespace")):n(k)}function x(k){return t(k)}}function uC(e,t,n){return e.check(Do,t,e.attempt(aC,t,n))}function dC(e){e.exit("gfmFootnoteDefinition")}function fC(e,t,n){const a=this;return Ct(e,s,"gfmFootnoteDefinitionIndent",5);function s(l){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(l):n(l)}}function mC(e){let n=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:l,resolveAll:s};return n==null&&(n=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(c,f){let m=-1;for(;++m<c.length;)if(c[m][0]==="enter"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._close){let h=m;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[m][1].end.offset-c[m][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[m][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[m][1].end)},b={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[m][1].start)},y=[["enter",p,f],["enter",c[h][1],f],["exit",c[h][1],f],["enter",b,f]],x=f.parser.constructs.insideSpan.null;x&&Dr(y,y.length,0,Vu(x,c.slice(h+1,m),f)),Dr(y,y.length,0,[["exit",b,f],["enter",c[m][1],f],["exit",c[m][1],f],["exit",p,f]]),Dr(c,h-1,m-h+3,y),m=h+y.length-2;break}}for(m=-1;++m<c.length;)c[m][1].type==="strikethroughSequenceTemporary"&&(c[m][1].type="data");return c}function l(c,f,m){const h=this.previous,p=this.events;let b=0;return y;function y(k){return h===126&&p[p.length-1][1].type!=="characterEscape"?m(k):(c.enter("strikethroughSequenceTemporary"),x(k))}function x(k){const N=nl(h);if(k===126)return b>1?m(k):(c.consume(k),b++,x);if(b<2&&!n)return m(k);const R=c.exit("strikethroughSequenceTemporary"),C=nl(k);return R._open=!C||C===2&&!!N,R._close=!N||N===2&&!!C,f(k)}}}class hC{constructor(){this.map=[]}add(t,n,a){pC(this,t,n,a)}consume(t){if(this.map.sort(function(l,c){return l[0]-c[0]}),this.map.length===0)return;let n=this.map.length;const a=[];for(;n>0;)n-=1,a.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];a.push(t.slice()),t.length=0;let s=a.pop();for(;s;){for(const l of s)t.push(l);s=a.pop()}this.map.length=0}}function pC(e,t,n,a){let s=0;if(!(n===0&&a.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...a);return}s+=1}e.map.push([t,n,a])}}function gC(e,t){let n=!1;const a=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=a.length-1;a[l]=a[l]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return a}function bC(){return{flow:{null:{name:"table",tokenize:vC,resolveAll:yC}}}}function vC(e,t,n){const a=this;let s=0,l=0,c;return f;function f(j){let F=a.events.length-1;for(;F>-1;){const K=a.events[F][1].type;if(K==="lineEnding"||K==="linePrefix")F--;else break}const H=F>-1?a.events[F][1].type:null,ee=H==="tableHead"||H==="tableRow"?M:m;return ee===M&&a.parser.lazy[a.now().line]?n(j):ee(j)}function m(j){return e.enter("tableHead"),e.enter("tableRow"),h(j)}function h(j){return j===124||(c=!0,l+=1),p(j)}function p(j){return j===null?n(j):We(j)?l>1?(l=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),x):n(j):It(j)?Ct(e,p,"whitespace")(j):(l+=1,c&&(c=!1,s+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),c=!0,p):(e.enter("data"),b(j)))}function b(j){return j===null||j===124||an(j)?(e.exit("data"),p(j)):(e.consume(j),j===92?y:b)}function y(j){return j===92||j===124?(e.consume(j),b):b(j)}function x(j){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(j):(e.enter("tableDelimiterRow"),c=!1,It(j)?Ct(e,k,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):k(j))}function k(j){return j===45||j===58?R(j):j===124?(c=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),N):D(j)}function N(j){return It(j)?Ct(e,R,"whitespace")(j):R(j)}function R(j){return j===58?(l+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),C):j===45?(l+=1,C(j)):j===null||We(j)?$(j):D(j)}function C(j){return j===45?(e.enter("tableDelimiterFiller"),_(j)):D(j)}function _(j){return j===45?(e.consume(j),_):j===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),I):(e.exit("tableDelimiterFiller"),I(j))}function I(j){return It(j)?Ct(e,$,"whitespace")(j):$(j)}function $(j){return j===124?k(j):j===null||We(j)?!c||s!==l?D(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):D(j)}function D(j){return n(j)}function M(j){return e.enter("tableRow"),B(j)}function B(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),B):j===null||We(j)?(e.exit("tableRow"),t(j)):It(j)?Ct(e,B,"whitespace")(j):(e.enter("data"),Y(j))}function Y(j){return j===null||j===124||an(j)?(e.exit("data"),B(j)):(e.consume(j),j===92?G:Y)}function G(j){return j===92||j===124?(e.consume(j),Y):Y(j)}}function yC(e,t){let n=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],f=!1,m=0,h,p,b;const y=new hC;for(;++n<e.length;){const x=e[n],k=x[1];x[0]==="enter"?k.type==="tableHead"?(f=!1,m!==0&&(E4(y,t,m,h,p),p=void 0,m=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(n,0,[["enter",h,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(a=!0,b=void 0,l=[0,0,0,0],c=[0,n+1,0,0],f&&(f=!1,p={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(n,0,[["enter",p,t]])),s=k.type==="tableDelimiterRow"?2:p?3:1):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(l[1]!==0&&(c[0]=c[1],b=su(y,t,l,s,void 0,b),l=[0,0,0,0]),c[2]=n)):k.type==="tableCellDivider"&&(a?a=!1:(l[1]!==0&&(c[0]=c[1],b=su(y,t,l,s,void 0,b)),l=c,c=[l[1],n,0,0])):k.type==="tableHead"?(f=!0,m=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(m=n,l[1]!==0?(c[0]=c[1],b=su(y,t,l,s,n,b)):c[1]!==0&&(b=su(y,t,c,s,n,b)),s=0):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(c[3]=n)}for(m!==0&&E4(y,t,m,h,p),y.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=gC(t.events,n))}return e}function su(e,t,n,a,s,l){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";n[0]!==0&&(l.end=Object.assign({},Zs(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const m=Zs(t.events,n[1]);if(l={type:c,start:Object.assign({},m),end:Object.assign({},m)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const h=Zs(t.events,n[2]),p=Zs(t.events,n[3]),b={type:f,start:Object.assign({},h),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",b,t]]),a!==2){const y=t.events[n[2]],x=t.events[n[3]];if(y[1].end=Object.assign({},x[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,N=n[3]-n[2]-1;e.add(k,N,[])}}e.add(n[3]+1,0,[["exit",b,t]])}return s!==void 0&&(l.end=Object.assign({},Zs(t.events,s)),e.add(s,0,[["exit",l,t]]),l=void 0),l}function E4(e,t,n,a,s){const l=[],c=Zs(t.events,n);s&&(s.end=Object.assign({},c),l.push(["exit",s,t])),a.end=Object.assign({},c),l.push(["exit",a,t]),e.add(n+1,0,l)}function Zs(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const xC={name:"tasklistCheck",tokenize:SC};function wC(){return{text:{91:xC}}}function SC(e,t,n){const a=this;return s;function s(m){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(m):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),l)}function l(m){return an(m)?(e.enter("taskListCheckValueUnchecked"),e.consume(m),e.exit("taskListCheckValueUnchecked"),c):m===88||m===120?(e.enter("taskListCheckValueChecked"),e.consume(m),e.exit("taskListCheckValueChecked"),c):n(m)}function c(m){return m===93?(e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):n(m)}function f(m){return We(m)?t(m):It(m)?e.check({tokenize:kC},t,n)(m):n(m)}}function kC(e,t,n){return Ct(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function EC(e){return N3([XN(),iC(),mC(e),bC(),wC()])}const TC={};function NC(e){const t=this,n=e||TC,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),l=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(EC(n)),l.push(GN()),c.push(VN(n))}function CC(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:l},exit:{mathFlow:s,mathFlowFence:a,mathFlowFenceMeta:n,mathFlowValue:f,mathText:c,mathTextData:f}};function e(m){const h={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[h]}},m)}function t(){this.buffer()}function n(){const m=this.resume(),h=this.stack[this.stack.length-1];h.type,h.meta=m}function a(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(m){const h=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),p=this.stack[this.stack.length-1];p.type,this.exit(m),p.value=h;const b=p.data.hChildren[0];b.type,b.tagName,b.children.push({type:"text",value:h}),this.data.mathFlowInside=void 0}function l(m){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},m),this.buffer()}function c(m){const h=this.resume(),p=this.stack[this.stack.length-1];p.type,this.exit(m),p.value=h,p.data.hChildren.push({type:"text",value:h})}function f(m){this.config.enter.data.call(this,m),this.config.exit.data.call(this,m)}}function RC(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),a.peek=s,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
|
|
42
|
-
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:a}};function n(l,c,f,m){const h=l.value||"",p=f.createTracker(m),b="$".repeat(Math.max(Q3(h,"$")+1,2)),y=f.enter("mathFlow");let x=p.move(b);if(l.meta){const k=f.enter("mathFlowMeta");x+=p.move(f.safe(l.meta,{after:`
|
|
43
|
-
`,before:x,encode:["$"],...p.current()})),k()}return x+=p.move(`
|
|
44
|
-
`),h&&(x+=p.move(h+`
|
|
45
|
-
`)),x+=p.move(b),y(),x}function a(l,c,f){let m=l.value||"",h=1;for(t||h++;new RegExp("(^|[^$])"+"\\$".repeat(h)+"([^$]|$)").test(m);)h++;const p="$".repeat(h);/[^ \r\n]/.test(m)&&(/^[ \r\n]/.test(m)&&/[ \r\n]$/.test(m)||/^\$|\$$/.test(m))&&(m=" "+m+" ");let b=-1;for(;++b<f.unsafe.length;){const y=f.unsafe[b];if(!y.atBreak)continue;const x=f.compilePattern(y);let k;for(;k=x.exec(m);){let N=k.index;m.codePointAt(N)===10&&m.codePointAt(N-1)===13&&N--,m=m.slice(0,N)+" "+m.slice(k.index+1)}}return p+m+p}function s(){return"$"}}const AC={tokenize:_C,concrete:!0,name:"mathFlow"},T4={tokenize:IC,partial:!0};function _C(e,t,n){const a=this,s=a.events[a.events.length-1],l=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0;let c=0;return f;function f(_){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),m(_)}function m(_){return _===36?(e.consume(_),c++,m):c<2?n(_):(e.exit("mathFlowFenceSequence"),Ct(e,h,"whitespace")(_))}function h(_){return _===null||We(_)?b(_):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(_))}function p(_){return _===null||We(_)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),b(_)):_===36?n(_):(e.consume(_),p)}function b(_){return e.exit("mathFlowFence"),a.interrupt?t(_):e.attempt(T4,y,R)(_)}function y(_){return e.attempt({tokenize:C,partial:!0},R,x)(_)}function x(_){return(l?Ct(e,k,"linePrefix",l+1):k)(_)}function k(_){return _===null?R(_):We(_)?e.attempt(T4,y,R)(_):(e.enter("mathFlowValue"),N(_))}function N(_){return _===null||We(_)?(e.exit("mathFlowValue"),k(_)):(e.consume(_),N)}function R(_){return e.exit("mathFlow"),t(_)}function C(_,I,$){let D=0;return Ct(_,M,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function M(G){return _.enter("mathFlowFence"),_.enter("mathFlowFenceSequence"),B(G)}function B(G){return G===36?(D++,_.consume(G),B):D<c?$(G):(_.exit("mathFlowFenceSequence"),Ct(_,Y,"whitespace")(G))}function Y(G){return G===null||We(G)?(_.exit("mathFlowFence"),I(G)):$(G)}}}function IC(e,t,n){const a=this;return s;function s(c){return c===null?t(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l)}function l(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function MC(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:a,resolve:OC,previous:DC,name:"mathText"};function a(s,l,c){let f=0,m,h;return p;function p(N){return s.enter("mathText"),s.enter("mathTextSequence"),b(N)}function b(N){return N===36?(s.consume(N),f++,b):f<2&&!n?c(N):(s.exit("mathTextSequence"),y(N))}function y(N){return N===null?c(N):N===36?(h=s.enter("mathTextSequence"),m=0,k(N)):N===32?(s.enter("space"),s.consume(N),s.exit("space"),y):We(N)?(s.enter("lineEnding"),s.consume(N),s.exit("lineEnding"),y):(s.enter("mathTextData"),x(N))}function x(N){return N===null||N===32||N===36||We(N)?(s.exit("mathTextData"),y(N)):(s.consume(N),x)}function k(N){return N===36?(s.consume(N),m++,k):m===f?(s.exit("mathTextSequence"),s.exit("mathText"),l(N)):(h.type="mathTextData",x(N))}}}function OC(e){let t=e.length-4,n=3,a,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[n][1].type="mathTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="mathTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function DC(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function jC(e){return{flow:{36:AC},text:{36:MC(e)}}}class Ie extends Error{constructor(t,n){var a="KaTeX parse error: "+t,s,l,c=n&&n.loc;if(c&&c.start<=c.end){var f=c.lexer.input;s=c.start,l=c.end,s===f.length?a+=" at end of input: ":a+=" at position "+(s+1)+": ";var m=f.slice(s,l).replace(/[^]/g,"$&̲"),h;s>15?h="…"+f.slice(s-15,s):h=f.slice(0,s);var p;l+15<f.length?p=f.slice(l,l+15)+"…":p=f.slice(l),a+=h+m+p}super(a),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,Ie.prototype),this.position=s,s!=null&&l!=null&&(this.length=l-s),this.rawMessage=t}}var LC=/([A-Z])/g,zC=e=>e.replace(LC,"-$1").toLowerCase(),BC={"&":"&",">":">","<":"<",'"':""","'":"'"},UC=/[&><"']/g,rr=e=>String(e).replace(UC,t=>BC[t]),yu=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?yu(e.body[0]):e:e.type==="font"?yu(e.body):e,qC=new Set(["mathord","textord","atom"]),Pa=e=>qC.has(yu(e).type),HC=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},Au={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function FC(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function PC(e){if(e.default!==void 0)return e.default;var t=Array.isArray(e.type)?e.type[0]:e.type;return FC(t)}function $C(e,t,n,a){var s=n[t];e[t]=s!==void 0?a.processor?a.processor(s):s:PC(a)}class lp{constructor(t){t===void 0&&(t={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var n of Object.keys(Au)){var a=Au[n];a&&$C(this,n,t,a)}}reportNonstrict(t,n,a){var s=this.strict;if(typeof s=="function"&&(s=s(t,n,a)),!(!s||s==="ignore")){if(s===!0||s==="error")throw new Ie("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+t+"]"),a);s==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+n+" ["+t+"]"))}}useStrictBehavior(t,n,a){var s=this.strict;if(typeof s=="function")try{s=s(t,n,a)}catch{s="error"}return!s||s==="ignore"?!1:s===!0||s==="error"?!0:s==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+n+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var n=HC(t.url);if(n==null)return!1;t.protocol=n}var a=typeof this.trust=="function"?this.trust(t):this.trust;return!!a}}class wi{constructor(t,n,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=n,this.cramped=a}sup(){return ua[GC[this.id]]}sub(){return ua[VC[this.id]]}fracNum(){return ua[KC[this.id]]}fracDen(){return ua[YC[this.id]]}cramp(){return ua[XC[this.id]]}text(){return ua[ZC[this.id]]}isTight(){return this.size>=2}}var op=0,_u=1,Qs=2,qa=3,Ro=4,Zr=5,rl=6,ur=7,ua=[new wi(op,0,!1),new wi(_u,0,!0),new wi(Qs,1,!1),new wi(qa,1,!0),new wi(Ro,2,!1),new wi(Zr,2,!0),new wi(rl,3,!1),new wi(ur,3,!0)],GC=[Ro,Zr,Ro,Zr,rl,ur,rl,ur],VC=[Zr,Zr,Zr,Zr,ur,ur,ur,ur],KC=[Qs,qa,Ro,Zr,rl,ur,rl,ur],YC=[qa,qa,Zr,Zr,ur,ur,ur,ur],XC=[_u,_u,qa,qa,Zr,Zr,ur,ur],ZC=[op,_u,Qs,qa,Qs,qa,Qs,qa],ft={DISPLAY:ua[op],TEXT:ua[Qs],SCRIPT:ua[Ro],SCRIPTSCRIPT:ua[rl]},ch=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function WC(e){for(var t=0;t<ch.length;t++)for(var n=ch[t],a=0;a<n.blocks.length;a++){var s=n.blocks[a];if(e>=s[0]&&e<=s[1])return n.name}return null}var xu=[];ch.forEach(e=>e.blocks.forEach(t=>xu.push(...t)));function v5(e){for(var t=0;t<xu.length;t+=2)if(e>=xu[t]&&e<=xu[t+1])return!0;return!1}var Pn=e=>e+" "+e,Ks=80,QC=function(t,n){return"M95,"+(622+t+n)+`
|
|
46
|
-
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
47
|
-
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
48
|
-
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
49
|
-
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
50
|
-
c69,-144,104.5,-217.7,106.5,-221
|
|
51
|
-
l`+t/2.075+" -"+t+`
|
|
52
|
-
c5.3,-9.3,12,-14,20,-14
|
|
53
|
-
H400000v`+(40+t)+`H845.2724
|
|
54
|
-
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
55
|
-
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
56
|
-
M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},JC=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119
|
|
57
|
-
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
58
|
-
c340,-704.7,510.7,-1060.3,512,-1067
|
|
59
|
-
l`+t/2.084+" -"+t+`
|
|
60
|
-
c4.7,-7.3,11,-11,19,-11
|
|
61
|
-
H40000v`+(40+t)+`H1012.3
|
|
62
|
-
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
63
|
-
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
64
|
-
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
65
|
-
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
66
|
-
M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},eR=function(t,n){return"M983 "+(10+t+n)+`
|
|
67
|
-
l`+t/3.13+" -"+t+`
|
|
68
|
-
c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
|
|
69
|
-
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
70
|
-
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
71
|
-
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
72
|
-
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
73
|
-
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
74
|
-
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
75
|
-
M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},tR=function(t,n){return"M424,"+(2398+t+n)+`
|
|
76
|
-
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
77
|
-
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
78
|
-
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
79
|
-
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
80
|
-
l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
|
|
81
|
-
v`+(40+t)+`H1014.6
|
|
82
|
-
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
83
|
-
c-2,6,-10,9,-24,9
|
|
84
|
-
c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+`
|
|
85
|
-
h400000v`+(40+t)+"h-400000z"},nR=function(t,n){return"M473,"+(2713+t+n)+`
|
|
86
|
-
c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
|
|
87
|
-
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
|
|
88
|
-
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
89
|
-
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
90
|
-
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
91
|
-
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
92
|
-
606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},rR=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},aR=function(t,n,a){var s=a-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+`
|
|
93
|
-
H742v`+s+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
94
|
-
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
95
|
-
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
96
|
-
219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},iR=function(t,n,a){n=1e3*n;var s="";switch(t){case"sqrtMain":s=QC(n,Ks);break;case"sqrtSize1":s=JC(n,Ks);break;case"sqrtSize2":s=eR(n,Ks);break;case"sqrtSize3":s=tR(n,Ks);break;case"sqrtSize4":s=nR(n,Ks);break;case"sqrtTall":s=aR(n,Ks,a)}return s},sR=function(t,n){switch(t){case"⎜":return Pn("M291 0 H417 V"+n+" H291z");case"∣":return Pn("M145 0 H188 V"+n+" H145z");case"∥":return Pn("M145 0 H188 V"+n+" H145z")+Pn("M367 0 H410 V"+n+" H367z");case"⎟":return Pn("M457 0 H583 V"+n+" H457z");case"⎢":return Pn("M319 0 H403 V"+n+" H319z");case"⎥":return Pn("M263 0 H347 V"+n+" H263z");case"⎪":return Pn("M384 0 H504 V"+n+" H384z");case"⏐":return Pn("M312 0 H355 V"+n+" H312z");case"‖":return Pn("M257 0 H300 V"+n+" H257z")+Pn("M478 0 H521 V"+n+" H478z");default:return""}},N4={doubleleftarrow:`M262 157
|
|
97
|
-
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
98
|
-
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
99
|
-
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
100
|
-
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
101
|
-
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
102
|
-
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
103
|
-
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
104
|
-
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
105
|
-
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
106
|
-
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
107
|
-
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
108
|
-
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
109
|
-
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
110
|
-
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
111
|
-
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
112
|
-
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
113
|
-
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
114
|
-
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
115
|
-
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
116
|
-
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
117
|
-
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
118
|
-
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
119
|
-
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
120
|
-
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
121
|
-
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
122
|
-
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
123
|
-
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
124
|
-
435 0h399565z`,leftgroupunder:`M400000 262
|
|
125
|
-
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
126
|
-
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
127
|
-
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
128
|
-
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
129
|
-
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
130
|
-
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
131
|
-
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
132
|
-
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
133
|
-
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
134
|
-
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
135
|
-
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
136
|
-
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
137
|
-
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
138
|
-
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
139
|
-
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
140
|
-
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
141
|
-
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
142
|
-
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Pn("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Pn("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Pn("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Pn("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
143
|
-
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
144
|
-
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
145
|
-
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Pn("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334
|
|
146
|
-
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
147
|
-
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
148
|
-
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
149
|
-
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
150
|
-
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
151
|
-
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
152
|
-
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
153
|
-
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
154
|
-
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
155
|
-
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
156
|
-
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
157
|
-
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
158
|
-
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
159
|
-
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
160
|
-
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
161
|
-
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
162
|
-
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
163
|
-
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
164
|
-
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
165
|
-
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
166
|
-
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
167
|
-
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
168
|
-
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
169
|
-
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
170
|
-
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
171
|
-
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
172
|
-
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
173
|
-
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
174
|
-
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
175
|
-
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
176
|
-
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
177
|
-
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
178
|
-
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
179
|
-
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
180
|
-
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
181
|
-
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
182
|
-
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
183
|
-
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
184
|
-
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
185
|
-
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
186
|
-
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
187
|
-
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
188
|
-
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
189
|
-
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
190
|
-
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
191
|
-
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
192
|
-
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
193
|
-
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
194
|
-
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Pn("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Pn("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Pn("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
195
|
-
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
196
|
-
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
197
|
-
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
198
|
-
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
199
|
-
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
200
|
-
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
201
|
-
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
202
|
-
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
203
|
-
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
204
|
-
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
205
|
-
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
206
|
-
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
207
|
-
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
208
|
-
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
209
|
-
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
210
|
-
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
211
|
-
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
212
|
-
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
213
|
-
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
214
|
-
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
215
|
-
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
216
|
-
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
217
|
-
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
218
|
-
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
219
|
-
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
220
|
-
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
221
|
-
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
222
|
-
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
223
|
-
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
224
|
-
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
225
|
-
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
226
|
-
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
227
|
-
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
228
|
-
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
229
|
-
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
230
|
-
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
231
|
-
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
232
|
-
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
233
|
-
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
234
|
-
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
235
|
-
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
236
|
-
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
237
|
-
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
238
|
-
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
239
|
-
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
240
|
-
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
241
|
-
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
242
|
-
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
243
|
-
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
244
|
-
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
245
|
-
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
246
|
-
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
247
|
-
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
248
|
-
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
249
|
-
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
250
|
-
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
251
|
-
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
252
|
-
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
253
|
-
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
254
|
-
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
255
|
-
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
256
|
-
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
257
|
-
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
258
|
-
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
259
|
-
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
260
|
-
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
261
|
-
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
262
|
-
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
263
|
-
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
264
|
-
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
265
|
-
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
266
|
-
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
267
|
-
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},lR=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 v84 h347 v-84
|
|
268
|
-
H403z M403 1759 V0 H319 V1759 v`+n+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z
|
|
269
|
-
M347 1759 V0 H263 V1759 v`+n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15
|
|
270
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
271
|
-
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15
|
|
272
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
273
|
-
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z
|
|
274
|
-
M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15
|
|
275
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
276
|
-
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+` v1715 h263 v84 H319z
|
|
277
|
-
MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z
|
|
278
|
-
MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z
|
|
279
|
-
M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z
|
|
280
|
-
M347 1759 V0 h-84 V1759 v`+n+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
|
281
|
-
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
|
282
|
-
-36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
283
|
-
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
|
284
|
-
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
|
285
|
-
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
286
|
-
l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
287
|
-
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
|
288
|
-
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
289
|
-
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+`
|
|
290
|
-
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
|
291
|
-
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
|
292
|
-
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
293
|
-
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
294
|
-
l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
295
|
-
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function oR(e){return"toText"in e}class cl{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t}toMarkup(){for(var t="",n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t}toText(){return this.children.map(t=>{if(oR(t))return t.toText();throw new Error("Expected MathDomNode with toText, got "+t.constructor.name)}).join("")}}var uh={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},cR={ex:!0,em:!0,mu:!0},y5=function(t){return typeof t!="string"&&(t=t.unit),t in uh||t in cR||t==="ex"},bn=function(t,n){var a;if(t.unit in uh)a=uh[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")a=n.fontMetrics().cssEmPerMu;else{var s;if(n.style.isTight()?s=n.havingStyle(n.style.text()):s=n,t.unit==="ex")a=s.fontMetrics().xHeight;else if(t.unit==="em")a=s.fontMetrics().quad;else throw new Ie("Invalid unit: '"+t.unit+"'");s!==n&&(a*=s.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*a,n.maxSize)},De=function(t){return+t.toFixed(4)+"em"},Ni=function(t){return t.filter(n=>n).join(" ")},cp=function(t){var n="";for(var a of Object.keys(t)){var s=t[a];s!==void 0&&(n+=zC(a)+":"+s+";")}return n},x5=function(t,n,a){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=a||{},n){n.style.isTight()&&this.classes.push("mtight");var s=n.getColor();s&&(this.style.color=s)}},w5=function(t){var n=document.createElement(t);n.className=Ni(this.classes),Object.assign(n.style,this.style);for(var a of Object.keys(this.attributes))n.setAttribute(a,this.attributes[a]);for(var s=0;s<this.children.length;s++)n.appendChild(this.children[s].toNode());return n},uR=/[\s"'>/=\x00-\x1f]/,S5=function(t){var n="<"+t;this.classes.length&&(n+=' class="'+rr(Ni(this.classes))+'"');var a=cp(this.style);a&&(n+=' style="'+rr(a)+'"');for(var s of Object.keys(this.attributes)){if(uR.test(s))throw new Ie("Invalid attribute name '"+s+"'");n+=" "+s+'="'+rr(this.attributes[s])+'"'}n+=">";for(var l=0;l<this.children.length;l++)n+=this.children[l].toMarkup();return n+="</"+t+">",n};class ul{constructor(t,n,a,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,x5.call(this,t,a,s),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return w5.call(this,"span")}toMarkup(){return S5.call(this,"span")}}class Xu{constructor(t,n,a,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,x5.call(this,n,s),this.children=a||[],this.setAttribute("href",t)}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return w5.call(this,"a")}toMarkup(){return S5.call(this,"a")}}class dR{constructor(t,n,a){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=n,this.src=t,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=a}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");return t.src=this.src,t.alt=this.alt,t.className="mord",Object.assign(t.style,this.style),t}toMarkup(){var t='<img src="'+rr(this.src)+'"'+(' alt="'+rr(this.alt)+'"'),n=cp(this.style);return n&&(t+=' style="'+rr(n)+'"'),t+="'/>",t}}var fR={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class Lr{constructor(t,n,a,s,l,c,f,m){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=t,this.height=n||0,this.depth=a||0,this.italic=s||0,this.skew=l||0,this.width=c||0,this.classes=f||[],this.style=m||{},this.maxFontSize=0;var h=WC(this.text.charCodeAt(0));h&&this.classes.push(h+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=fR[this.text])}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createTextNode(this.text),n=null;return this.italic>0&&(n=document.createElement("span"),n.style.marginRight=De(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=Ni(this.classes)),Object.keys(this.style).length>0&&(n=n||document.createElement("span"),Object.assign(n.style,this.style)),n?(n.appendChild(t),n):t}toMarkup(){var t=!1,n="<span";this.classes.length&&(t=!0,n+=' class="',n+=rr(Ni(this.classes)),n+='"');var a="";this.italic>0&&(a+="margin-right:"+De(this.italic)+";"),a+=cp(this.style),a&&(t=!0,n+=' style="'+rr(a)+'"');var s=rr(this.text);return t?(n+=">",n+=s,n+="</span>",n):s}}class Ha{constructor(t,n){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=n||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");for(var a of Object.keys(this.attributes))n.setAttribute(a,this.attributes[a]);for(var s=0;s<this.children.length;s++)n.appendChild(this.children[s].toNode());return n}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var n of Object.keys(this.attributes))t+=" "+n+'="'+rr(this.attributes[n])+'"';t+=">";for(var a=0;a<this.children.length;a++)t+=this.children[a].toMarkup();return t+="</svg>",t}}class Ci{constructor(t,n){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=n}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"path");return this.alternate?n.setAttribute("d",this.alternate):n.setAttribute("d",N4[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+rr(this.alternate)+'"/>':'<path d="'+rr(N4[this.pathName])+'"/>'}}class dh{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"line");for(var a of Object.keys(this.attributes))n.setAttribute(a,this.attributes[a]);return n}toMarkup(){var t="<line";for(var n of Object.keys(this.attributes))t+=" "+n+'="'+rr(this.attributes[n])+'"';return t+="/>",t}}function mR(e){if(e instanceof Lr)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function hR(e){if(e instanceof ul)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var pR=e=>e instanceof ul||e instanceof Xu||e instanceof cl,da={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},lu={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},C4={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function k5(e,t){da[e]=t}function up(e,t,n){if(!da[t])throw new Error("Font metrics not found for font: "+t+".");var a=e.charCodeAt(0),s=da[t][a];if(!s&&e[0]in C4&&(a=C4[e[0]].charCodeAt(0),s=da[t][a]),!s&&n==="text"&&v5(a)&&(s=da[t][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var qf={};function gR(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!qf[t]){var n=qf[t]={cssEmPerMu:lu.quad[t]/18};for(var a in lu)lu.hasOwnProperty(a)&&(n[a]=lu[a][t])}return qf[t]}var fn={math:{},text:{}};function w(e,t,n,a,s,l){fn[e][s]={font:t,group:n,replace:a},l&&a&&(fn[e][a]=fn[e][s])}var E="math",Ne="text",O="main",Z="ams",mn="accent-token",Pe="bin",dr="close",dl="inner",at="mathord",Bn="op-token",zr="open",zo="punct",W="rel",$a="spacing",le="textord";w(E,O,W,"≡","\\equiv",!0);w(E,O,W,"≺","\\prec",!0);w(E,O,W,"≻","\\succ",!0);w(E,O,W,"∼","\\sim",!0);w(E,O,W,"⊥","\\perp");w(E,O,W,"⪯","\\preceq",!0);w(E,O,W,"⪰","\\succeq",!0);w(E,O,W,"≃","\\simeq",!0);w(E,O,W,"∣","\\mid",!0);w(E,O,W,"≪","\\ll",!0);w(E,O,W,"≫","\\gg",!0);w(E,O,W,"≍","\\asymp",!0);w(E,O,W,"∥","\\parallel");w(E,O,W,"⋈","\\bowtie",!0);w(E,O,W,"⌣","\\smile",!0);w(E,O,W,"⊑","\\sqsubseteq",!0);w(E,O,W,"⊒","\\sqsupseteq",!0);w(E,O,W,"≐","\\doteq",!0);w(E,O,W,"⌢","\\frown",!0);w(E,O,W,"∋","\\ni",!0);w(E,O,W,"∝","\\propto",!0);w(E,O,W,"⊢","\\vdash",!0);w(E,O,W,"⊣","\\dashv",!0);w(E,O,W,"∋","\\owns");w(E,O,zo,".","\\ldotp");w(E,O,zo,"⋅","\\cdotp");w(E,O,zo,"⋅","·");w(Ne,O,le,"⋅","·");w(E,O,le,"#","\\#");w(Ne,O,le,"#","\\#");w(E,O,le,"&","\\&");w(Ne,O,le,"&","\\&");w(E,O,le,"ℵ","\\aleph",!0);w(E,O,le,"∀","\\forall",!0);w(E,O,le,"ℏ","\\hbar",!0);w(E,O,le,"∃","\\exists",!0);w(E,O,le,"∇","\\nabla",!0);w(E,O,le,"♭","\\flat",!0);w(E,O,le,"ℓ","\\ell",!0);w(E,O,le,"♮","\\natural",!0);w(E,O,le,"♣","\\clubsuit",!0);w(E,O,le,"℘","\\wp",!0);w(E,O,le,"♯","\\sharp",!0);w(E,O,le,"♢","\\diamondsuit",!0);w(E,O,le,"ℜ","\\Re",!0);w(E,O,le,"♡","\\heartsuit",!0);w(E,O,le,"ℑ","\\Im",!0);w(E,O,le,"♠","\\spadesuit",!0);w(E,O,le,"§","\\S",!0);w(Ne,O,le,"§","\\S");w(E,O,le,"¶","\\P",!0);w(Ne,O,le,"¶","\\P");w(E,O,le,"†","\\dag");w(Ne,O,le,"†","\\dag");w(Ne,O,le,"†","\\textdagger");w(E,O,le,"‡","\\ddag");w(Ne,O,le,"‡","\\ddag");w(Ne,O,le,"‡","\\textdaggerdbl");w(E,O,dr,"⎱","\\rmoustache",!0);w(E,O,zr,"⎰","\\lmoustache",!0);w(E,O,dr,"⟯","\\rgroup",!0);w(E,O,zr,"⟮","\\lgroup",!0);w(E,O,Pe,"∓","\\mp",!0);w(E,O,Pe,"⊖","\\ominus",!0);w(E,O,Pe,"⊎","\\uplus",!0);w(E,O,Pe,"⊓","\\sqcap",!0);w(E,O,Pe,"∗","\\ast");w(E,O,Pe,"⊔","\\sqcup",!0);w(E,O,Pe,"◯","\\bigcirc",!0);w(E,O,Pe,"∙","\\bullet",!0);w(E,O,Pe,"‡","\\ddagger");w(E,O,Pe,"≀","\\wr",!0);w(E,O,Pe,"⨿","\\amalg");w(E,O,Pe,"&","\\And");w(E,O,W,"⟵","\\longleftarrow",!0);w(E,O,W,"⇐","\\Leftarrow",!0);w(E,O,W,"⟸","\\Longleftarrow",!0);w(E,O,W,"⟶","\\longrightarrow",!0);w(E,O,W,"⇒","\\Rightarrow",!0);w(E,O,W,"⟹","\\Longrightarrow",!0);w(E,O,W,"↔","\\leftrightarrow",!0);w(E,O,W,"⟷","\\longleftrightarrow",!0);w(E,O,W,"⇔","\\Leftrightarrow",!0);w(E,O,W,"⟺","\\Longleftrightarrow",!0);w(E,O,W,"↦","\\mapsto",!0);w(E,O,W,"⟼","\\longmapsto",!0);w(E,O,W,"↗","\\nearrow",!0);w(E,O,W,"↩","\\hookleftarrow",!0);w(E,O,W,"↪","\\hookrightarrow",!0);w(E,O,W,"↘","\\searrow",!0);w(E,O,W,"↼","\\leftharpoonup",!0);w(E,O,W,"⇀","\\rightharpoonup",!0);w(E,O,W,"↙","\\swarrow",!0);w(E,O,W,"↽","\\leftharpoondown",!0);w(E,O,W,"⇁","\\rightharpoondown",!0);w(E,O,W,"↖","\\nwarrow",!0);w(E,O,W,"⇌","\\rightleftharpoons",!0);w(E,Z,W,"≮","\\nless",!0);w(E,Z,W,"","\\@nleqslant");w(E,Z,W,"","\\@nleqq");w(E,Z,W,"⪇","\\lneq",!0);w(E,Z,W,"≨","\\lneqq",!0);w(E,Z,W,"","\\@lvertneqq");w(E,Z,W,"⋦","\\lnsim",!0);w(E,Z,W,"⪉","\\lnapprox",!0);w(E,Z,W,"⊀","\\nprec",!0);w(E,Z,W,"⋠","\\npreceq",!0);w(E,Z,W,"⋨","\\precnsim",!0);w(E,Z,W,"⪹","\\precnapprox",!0);w(E,Z,W,"≁","\\nsim",!0);w(E,Z,W,"","\\@nshortmid");w(E,Z,W,"∤","\\nmid",!0);w(E,Z,W,"⊬","\\nvdash",!0);w(E,Z,W,"⊭","\\nvDash",!0);w(E,Z,W,"⋪","\\ntriangleleft");w(E,Z,W,"⋬","\\ntrianglelefteq",!0);w(E,Z,W,"⊊","\\subsetneq",!0);w(E,Z,W,"","\\@varsubsetneq");w(E,Z,W,"⫋","\\subsetneqq",!0);w(E,Z,W,"","\\@varsubsetneqq");w(E,Z,W,"≯","\\ngtr",!0);w(E,Z,W,"","\\@ngeqslant");w(E,Z,W,"","\\@ngeqq");w(E,Z,W,"⪈","\\gneq",!0);w(E,Z,W,"≩","\\gneqq",!0);w(E,Z,W,"","\\@gvertneqq");w(E,Z,W,"⋧","\\gnsim",!0);w(E,Z,W,"⪊","\\gnapprox",!0);w(E,Z,W,"⊁","\\nsucc",!0);w(E,Z,W,"⋡","\\nsucceq",!0);w(E,Z,W,"⋩","\\succnsim",!0);w(E,Z,W,"⪺","\\succnapprox",!0);w(E,Z,W,"≆","\\ncong",!0);w(E,Z,W,"","\\@nshortparallel");w(E,Z,W,"∦","\\nparallel",!0);w(E,Z,W,"⊯","\\nVDash",!0);w(E,Z,W,"⋫","\\ntriangleright");w(E,Z,W,"⋭","\\ntrianglerighteq",!0);w(E,Z,W,"","\\@nsupseteqq");w(E,Z,W,"⊋","\\supsetneq",!0);w(E,Z,W,"","\\@varsupsetneq");w(E,Z,W,"⫌","\\supsetneqq",!0);w(E,Z,W,"","\\@varsupsetneqq");w(E,Z,W,"⊮","\\nVdash",!0);w(E,Z,W,"⪵","\\precneqq",!0);w(E,Z,W,"⪶","\\succneqq",!0);w(E,Z,W,"","\\@nsubseteqq");w(E,Z,Pe,"⊴","\\unlhd");w(E,Z,Pe,"⊵","\\unrhd");w(E,Z,W,"↚","\\nleftarrow",!0);w(E,Z,W,"↛","\\nrightarrow",!0);w(E,Z,W,"⇍","\\nLeftarrow",!0);w(E,Z,W,"⇏","\\nRightarrow",!0);w(E,Z,W,"↮","\\nleftrightarrow",!0);w(E,Z,W,"⇎","\\nLeftrightarrow",!0);w(E,Z,W,"△","\\vartriangle");w(E,Z,le,"ℏ","\\hslash");w(E,Z,le,"▽","\\triangledown");w(E,Z,le,"◊","\\lozenge");w(E,Z,le,"Ⓢ","\\circledS");w(E,Z,le,"®","\\circledR");w(Ne,Z,le,"®","\\circledR");w(E,Z,le,"∡","\\measuredangle",!0);w(E,Z,le,"∄","\\nexists");w(E,Z,le,"℧","\\mho");w(E,Z,le,"Ⅎ","\\Finv",!0);w(E,Z,le,"⅁","\\Game",!0);w(E,Z,le,"‵","\\backprime");w(E,Z,le,"▲","\\blacktriangle");w(E,Z,le,"▼","\\blacktriangledown");w(E,Z,le,"■","\\blacksquare");w(E,Z,le,"⧫","\\blacklozenge");w(E,Z,le,"★","\\bigstar");w(E,Z,le,"∢","\\sphericalangle",!0);w(E,Z,le,"∁","\\complement",!0);w(E,Z,le,"ð","\\eth",!0);w(Ne,O,le,"ð","ð");w(E,Z,le,"╱","\\diagup");w(E,Z,le,"╲","\\diagdown");w(E,Z,le,"□","\\square");w(E,Z,le,"□","\\Box");w(E,Z,le,"◊","\\Diamond");w(E,Z,le,"¥","\\yen",!0);w(Ne,Z,le,"¥","\\yen",!0);w(E,Z,le,"✓","\\checkmark",!0);w(Ne,Z,le,"✓","\\checkmark");w(E,Z,le,"ℶ","\\beth",!0);w(E,Z,le,"ℸ","\\daleth",!0);w(E,Z,le,"ℷ","\\gimel",!0);w(E,Z,le,"ϝ","\\digamma",!0);w(E,Z,le,"ϰ","\\varkappa");w(E,Z,zr,"┌","\\@ulcorner",!0);w(E,Z,dr,"┐","\\@urcorner",!0);w(E,Z,zr,"└","\\@llcorner",!0);w(E,Z,dr,"┘","\\@lrcorner",!0);w(E,Z,W,"≦","\\leqq",!0);w(E,Z,W,"⩽","\\leqslant",!0);w(E,Z,W,"⪕","\\eqslantless",!0);w(E,Z,W,"≲","\\lesssim",!0);w(E,Z,W,"⪅","\\lessapprox",!0);w(E,Z,W,"≊","\\approxeq",!0);w(E,Z,Pe,"⋖","\\lessdot");w(E,Z,W,"⋘","\\lll",!0);w(E,Z,W,"≶","\\lessgtr",!0);w(E,Z,W,"⋚","\\lesseqgtr",!0);w(E,Z,W,"⪋","\\lesseqqgtr",!0);w(E,Z,W,"≑","\\doteqdot");w(E,Z,W,"≓","\\risingdotseq",!0);w(E,Z,W,"≒","\\fallingdotseq",!0);w(E,Z,W,"∽","\\backsim",!0);w(E,Z,W,"⋍","\\backsimeq",!0);w(E,Z,W,"⫅","\\subseteqq",!0);w(E,Z,W,"⋐","\\Subset",!0);w(E,Z,W,"⊏","\\sqsubset",!0);w(E,Z,W,"≼","\\preccurlyeq",!0);w(E,Z,W,"⋞","\\curlyeqprec",!0);w(E,Z,W,"≾","\\precsim",!0);w(E,Z,W,"⪷","\\precapprox",!0);w(E,Z,W,"⊲","\\vartriangleleft");w(E,Z,W,"⊴","\\trianglelefteq");w(E,Z,W,"⊨","\\vDash",!0);w(E,Z,W,"⊪","\\Vvdash",!0);w(E,Z,W,"⌣","\\smallsmile");w(E,Z,W,"⌢","\\smallfrown");w(E,Z,W,"≏","\\bumpeq",!0);w(E,Z,W,"≎","\\Bumpeq",!0);w(E,Z,W,"≧","\\geqq",!0);w(E,Z,W,"⩾","\\geqslant",!0);w(E,Z,W,"⪖","\\eqslantgtr",!0);w(E,Z,W,"≳","\\gtrsim",!0);w(E,Z,W,"⪆","\\gtrapprox",!0);w(E,Z,Pe,"⋗","\\gtrdot");w(E,Z,W,"⋙","\\ggg",!0);w(E,Z,W,"≷","\\gtrless",!0);w(E,Z,W,"⋛","\\gtreqless",!0);w(E,Z,W,"⪌","\\gtreqqless",!0);w(E,Z,W,"≖","\\eqcirc",!0);w(E,Z,W,"≗","\\circeq",!0);w(E,Z,W,"≜","\\triangleq",!0);w(E,Z,W,"∼","\\thicksim");w(E,Z,W,"≈","\\thickapprox");w(E,Z,W,"⫆","\\supseteqq",!0);w(E,Z,W,"⋑","\\Supset",!0);w(E,Z,W,"⊐","\\sqsupset",!0);w(E,Z,W,"≽","\\succcurlyeq",!0);w(E,Z,W,"⋟","\\curlyeqsucc",!0);w(E,Z,W,"≿","\\succsim",!0);w(E,Z,W,"⪸","\\succapprox",!0);w(E,Z,W,"⊳","\\vartriangleright");w(E,Z,W,"⊵","\\trianglerighteq");w(E,Z,W,"⊩","\\Vdash",!0);w(E,Z,W,"∣","\\shortmid");w(E,Z,W,"∥","\\shortparallel");w(E,Z,W,"≬","\\between",!0);w(E,Z,W,"⋔","\\pitchfork",!0);w(E,Z,W,"∝","\\varpropto");w(E,Z,W,"◀","\\blacktriangleleft");w(E,Z,W,"∴","\\therefore",!0);w(E,Z,W,"∍","\\backepsilon");w(E,Z,W,"▶","\\blacktriangleright");w(E,Z,W,"∵","\\because",!0);w(E,Z,W,"⋘","\\llless");w(E,Z,W,"⋙","\\gggtr");w(E,Z,Pe,"⊲","\\lhd");w(E,Z,Pe,"⊳","\\rhd");w(E,Z,W,"≂","\\eqsim",!0);w(E,O,W,"⋈","\\Join");w(E,Z,W,"≑","\\Doteq",!0);w(E,Z,Pe,"∔","\\dotplus",!0);w(E,Z,Pe,"∖","\\smallsetminus");w(E,Z,Pe,"⋒","\\Cap",!0);w(E,Z,Pe,"⋓","\\Cup",!0);w(E,Z,Pe,"⩞","\\doublebarwedge",!0);w(E,Z,Pe,"⊟","\\boxminus",!0);w(E,Z,Pe,"⊞","\\boxplus",!0);w(E,Z,Pe,"⋇","\\divideontimes",!0);w(E,Z,Pe,"⋉","\\ltimes",!0);w(E,Z,Pe,"⋊","\\rtimes",!0);w(E,Z,Pe,"⋋","\\leftthreetimes",!0);w(E,Z,Pe,"⋌","\\rightthreetimes",!0);w(E,Z,Pe,"⋏","\\curlywedge",!0);w(E,Z,Pe,"⋎","\\curlyvee",!0);w(E,Z,Pe,"⊝","\\circleddash",!0);w(E,Z,Pe,"⊛","\\circledast",!0);w(E,Z,Pe,"⋅","\\centerdot");w(E,Z,Pe,"⊺","\\intercal",!0);w(E,Z,Pe,"⋒","\\doublecap");w(E,Z,Pe,"⋓","\\doublecup");w(E,Z,Pe,"⊠","\\boxtimes",!0);w(E,Z,W,"⇢","\\dashrightarrow",!0);w(E,Z,W,"⇠","\\dashleftarrow",!0);w(E,Z,W,"⇇","\\leftleftarrows",!0);w(E,Z,W,"⇆","\\leftrightarrows",!0);w(E,Z,W,"⇚","\\Lleftarrow",!0);w(E,Z,W,"↞","\\twoheadleftarrow",!0);w(E,Z,W,"↢","\\leftarrowtail",!0);w(E,Z,W,"↫","\\looparrowleft",!0);w(E,Z,W,"⇋","\\leftrightharpoons",!0);w(E,Z,W,"↶","\\curvearrowleft",!0);w(E,Z,W,"↺","\\circlearrowleft",!0);w(E,Z,W,"↰","\\Lsh",!0);w(E,Z,W,"⇈","\\upuparrows",!0);w(E,Z,W,"↿","\\upharpoonleft",!0);w(E,Z,W,"⇃","\\downharpoonleft",!0);w(E,O,W,"⊶","\\origof",!0);w(E,O,W,"⊷","\\imageof",!0);w(E,Z,W,"⊸","\\multimap",!0);w(E,Z,W,"↭","\\leftrightsquigarrow",!0);w(E,Z,W,"⇉","\\rightrightarrows",!0);w(E,Z,W,"⇄","\\rightleftarrows",!0);w(E,Z,W,"↠","\\twoheadrightarrow",!0);w(E,Z,W,"↣","\\rightarrowtail",!0);w(E,Z,W,"↬","\\looparrowright",!0);w(E,Z,W,"↷","\\curvearrowright",!0);w(E,Z,W,"↻","\\circlearrowright",!0);w(E,Z,W,"↱","\\Rsh",!0);w(E,Z,W,"⇊","\\downdownarrows",!0);w(E,Z,W,"↾","\\upharpoonright",!0);w(E,Z,W,"⇂","\\downharpoonright",!0);w(E,Z,W,"⇝","\\rightsquigarrow",!0);w(E,Z,W,"⇝","\\leadsto");w(E,Z,W,"⇛","\\Rrightarrow",!0);w(E,Z,W,"↾","\\restriction");w(E,O,le,"‘","`");w(E,O,le,"$","\\$");w(Ne,O,le,"$","\\$");w(Ne,O,le,"$","\\textdollar");w(E,O,le,"%","\\%");w(Ne,O,le,"%","\\%");w(E,O,le,"_","\\_");w(Ne,O,le,"_","\\_");w(Ne,O,le,"_","\\textunderscore");w(E,O,le,"∠","\\angle",!0);w(E,O,le,"∞","\\infty",!0);w(E,O,le,"′","\\prime");w(E,O,le,"△","\\triangle");w(E,O,le,"Γ","\\Gamma",!0);w(E,O,le,"Δ","\\Delta",!0);w(E,O,le,"Θ","\\Theta",!0);w(E,O,le,"Λ","\\Lambda",!0);w(E,O,le,"Ξ","\\Xi",!0);w(E,O,le,"Π","\\Pi",!0);w(E,O,le,"Σ","\\Sigma",!0);w(E,O,le,"Υ","\\Upsilon",!0);w(E,O,le,"Φ","\\Phi",!0);w(E,O,le,"Ψ","\\Psi",!0);w(E,O,le,"Ω","\\Omega",!0);w(E,O,le,"A","Α");w(E,O,le,"B","Β");w(E,O,le,"E","Ε");w(E,O,le,"Z","Ζ");w(E,O,le,"H","Η");w(E,O,le,"I","Ι");w(E,O,le,"K","Κ");w(E,O,le,"M","Μ");w(E,O,le,"N","Ν");w(E,O,le,"O","Ο");w(E,O,le,"P","Ρ");w(E,O,le,"T","Τ");w(E,O,le,"X","Χ");w(E,O,le,"¬","\\neg",!0);w(E,O,le,"¬","\\lnot");w(E,O,le,"⊤","\\top");w(E,O,le,"⊥","\\bot");w(E,O,le,"∅","\\emptyset");w(E,Z,le,"∅","\\varnothing");w(E,O,at,"α","\\alpha",!0);w(E,O,at,"β","\\beta",!0);w(E,O,at,"γ","\\gamma",!0);w(E,O,at,"δ","\\delta",!0);w(E,O,at,"ϵ","\\epsilon",!0);w(E,O,at,"ζ","\\zeta",!0);w(E,O,at,"η","\\eta",!0);w(E,O,at,"θ","\\theta",!0);w(E,O,at,"ι","\\iota",!0);w(E,O,at,"κ","\\kappa",!0);w(E,O,at,"λ","\\lambda",!0);w(E,O,at,"μ","\\mu",!0);w(E,O,at,"ν","\\nu",!0);w(E,O,at,"ξ","\\xi",!0);w(E,O,at,"ο","\\omicron",!0);w(E,O,at,"π","\\pi",!0);w(E,O,at,"ρ","\\rho",!0);w(E,O,at,"σ","\\sigma",!0);w(E,O,at,"τ","\\tau",!0);w(E,O,at,"υ","\\upsilon",!0);w(E,O,at,"ϕ","\\phi",!0);w(E,O,at,"χ","\\chi",!0);w(E,O,at,"ψ","\\psi",!0);w(E,O,at,"ω","\\omega",!0);w(E,O,at,"ε","\\varepsilon",!0);w(E,O,at,"ϑ","\\vartheta",!0);w(E,O,at,"ϖ","\\varpi",!0);w(E,O,at,"ϱ","\\varrho",!0);w(E,O,at,"ς","\\varsigma",!0);w(E,O,at,"φ","\\varphi",!0);w(E,O,Pe,"∗","*",!0);w(E,O,Pe,"+","+");w(E,O,Pe,"−","-",!0);w(E,O,Pe,"⋅","\\cdot",!0);w(E,O,Pe,"∘","\\circ",!0);w(E,O,Pe,"÷","\\div",!0);w(E,O,Pe,"±","\\pm",!0);w(E,O,Pe,"×","\\times",!0);w(E,O,Pe,"∩","\\cap",!0);w(E,O,Pe,"∪","\\cup",!0);w(E,O,Pe,"∖","\\setminus",!0);w(E,O,Pe,"∧","\\land");w(E,O,Pe,"∨","\\lor");w(E,O,Pe,"∧","\\wedge",!0);w(E,O,Pe,"∨","\\vee",!0);w(E,O,le,"√","\\surd");w(E,O,zr,"⟨","\\langle",!0);w(E,O,zr,"∣","\\lvert");w(E,O,zr,"∥","\\lVert");w(E,O,dr,"?","?");w(E,O,dr,"!","!");w(E,O,dr,"⟩","\\rangle",!0);w(E,O,dr,"∣","\\rvert");w(E,O,dr,"∥","\\rVert");w(E,O,W,"=","=");w(E,O,W,":",":");w(E,O,W,"≈","\\approx",!0);w(E,O,W,"≅","\\cong",!0);w(E,O,W,"≥","\\ge");w(E,O,W,"≥","\\geq",!0);w(E,O,W,"←","\\gets");w(E,O,W,">","\\gt",!0);w(E,O,W,"∈","\\in",!0);w(E,O,W,"","\\@not");w(E,O,W,"⊂","\\subset",!0);w(E,O,W,"⊃","\\supset",!0);w(E,O,W,"⊆","\\subseteq",!0);w(E,O,W,"⊇","\\supseteq",!0);w(E,Z,W,"⊈","\\nsubseteq",!0);w(E,Z,W,"⊉","\\nsupseteq",!0);w(E,O,W,"⊨","\\models");w(E,O,W,"←","\\leftarrow",!0);w(E,O,W,"≤","\\le");w(E,O,W,"≤","\\leq",!0);w(E,O,W,"<","\\lt",!0);w(E,O,W,"→","\\rightarrow",!0);w(E,O,W,"→","\\to");w(E,Z,W,"≱","\\ngeq",!0);w(E,Z,W,"≰","\\nleq",!0);w(E,O,$a," ","\\ ");w(E,O,$a," ","\\space");w(E,O,$a," ","\\nobreakspace");w(Ne,O,$a," ","\\ ");w(Ne,O,$a," "," ");w(Ne,O,$a," ","\\space");w(Ne,O,$a," ","\\nobreakspace");w(E,O,$a,"","\\nobreak");w(E,O,$a,"","\\allowbreak");w(E,O,zo,",",",");w(E,O,zo,";",";");w(E,Z,Pe,"⊼","\\barwedge",!0);w(E,Z,Pe,"⊻","\\veebar",!0);w(E,O,Pe,"⊙","\\odot",!0);w(E,O,Pe,"⊕","\\oplus",!0);w(E,O,Pe,"⊗","\\otimes",!0);w(E,O,le,"∂","\\partial",!0);w(E,O,Pe,"⊘","\\oslash",!0);w(E,Z,Pe,"⊚","\\circledcirc",!0);w(E,Z,Pe,"⊡","\\boxdot",!0);w(E,O,Pe,"△","\\bigtriangleup");w(E,O,Pe,"▽","\\bigtriangledown");w(E,O,Pe,"†","\\dagger");w(E,O,Pe,"⋄","\\diamond");w(E,O,Pe,"⋆","\\star");w(E,O,Pe,"◃","\\triangleleft");w(E,O,Pe,"▹","\\triangleright");w(E,O,zr,"{","\\{");w(Ne,O,le,"{","\\{");w(Ne,O,le,"{","\\textbraceleft");w(E,O,dr,"}","\\}");w(Ne,O,le,"}","\\}");w(Ne,O,le,"}","\\textbraceright");w(E,O,zr,"{","\\lbrace");w(E,O,dr,"}","\\rbrace");w(E,O,zr,"[","\\lbrack",!0);w(Ne,O,le,"[","\\lbrack",!0);w(E,O,dr,"]","\\rbrack",!0);w(Ne,O,le,"]","\\rbrack",!0);w(E,O,zr,"(","\\lparen",!0);w(E,O,dr,")","\\rparen",!0);w(Ne,O,le,"<","\\textless",!0);w(Ne,O,le,">","\\textgreater",!0);w(E,O,zr,"⌊","\\lfloor",!0);w(E,O,dr,"⌋","\\rfloor",!0);w(E,O,zr,"⌈","\\lceil",!0);w(E,O,dr,"⌉","\\rceil",!0);w(E,O,le,"\\","\\backslash");w(E,O,le,"∣","|");w(E,O,le,"∣","\\vert");w(Ne,O,le,"|","\\textbar",!0);w(E,O,le,"∥","\\|");w(E,O,le,"∥","\\Vert");w(Ne,O,le,"∥","\\textbardbl");w(Ne,O,le,"~","\\textasciitilde");w(Ne,O,le,"\\","\\textbackslash");w(Ne,O,le,"^","\\textasciicircum");w(E,O,W,"↑","\\uparrow",!0);w(E,O,W,"⇑","\\Uparrow",!0);w(E,O,W,"↓","\\downarrow",!0);w(E,O,W,"⇓","\\Downarrow",!0);w(E,O,W,"↕","\\updownarrow",!0);w(E,O,W,"⇕","\\Updownarrow",!0);w(E,O,Bn,"∐","\\coprod");w(E,O,Bn,"⋁","\\bigvee");w(E,O,Bn,"⋀","\\bigwedge");w(E,O,Bn,"⨄","\\biguplus");w(E,O,Bn,"⋂","\\bigcap");w(E,O,Bn,"⋃","\\bigcup");w(E,O,Bn,"∫","\\int");w(E,O,Bn,"∫","\\intop");w(E,O,Bn,"∬","\\iint");w(E,O,Bn,"∭","\\iiint");w(E,O,Bn,"∏","\\prod");w(E,O,Bn,"∑","\\sum");w(E,O,Bn,"⨂","\\bigotimes");w(E,O,Bn,"⨁","\\bigoplus");w(E,O,Bn,"⨀","\\bigodot");w(E,O,Bn,"∮","\\oint");w(E,O,Bn,"∯","\\oiint");w(E,O,Bn,"∰","\\oiiint");w(E,O,Bn,"⨆","\\bigsqcup");w(E,O,Bn,"∫","\\smallint");w(Ne,O,dl,"…","\\textellipsis");w(E,O,dl,"…","\\mathellipsis");w(Ne,O,dl,"…","\\ldots",!0);w(E,O,dl,"…","\\ldots",!0);w(E,O,dl,"⋯","\\@cdots",!0);w(E,O,dl,"⋱","\\ddots",!0);w(E,O,le,"⋮","\\varvdots");w(Ne,O,le,"⋮","\\varvdots");w(E,O,mn,"ˊ","\\acute");w(E,O,mn,"ˋ","\\grave");w(E,O,mn,"¨","\\ddot");w(E,O,mn,"~","\\tilde");w(E,O,mn,"ˉ","\\bar");w(E,O,mn,"˘","\\breve");w(E,O,mn,"ˇ","\\check");w(E,O,mn,"^","\\hat");w(E,O,mn,"⃗","\\vec");w(E,O,mn,"˙","\\dot");w(E,O,mn,"˚","\\mathring");w(E,O,at,"","\\@imath");w(E,O,at,"","\\@jmath");w(E,O,le,"ı","ı");w(E,O,le,"ȷ","ȷ");w(Ne,O,le,"ı","\\i",!0);w(Ne,O,le,"ȷ","\\j",!0);w(Ne,O,le,"ß","\\ss",!0);w(Ne,O,le,"æ","\\ae",!0);w(Ne,O,le,"œ","\\oe",!0);w(Ne,O,le,"ø","\\o",!0);w(Ne,O,le,"Æ","\\AE",!0);w(Ne,O,le,"Œ","\\OE",!0);w(Ne,O,le,"Ø","\\O",!0);w(Ne,O,mn,"ˊ","\\'");w(Ne,O,mn,"ˋ","\\`");w(Ne,O,mn,"ˆ","\\^");w(Ne,O,mn,"˜","\\~");w(Ne,O,mn,"ˉ","\\=");w(Ne,O,mn,"˘","\\u");w(Ne,O,mn,"˙","\\.");w(Ne,O,mn,"¸","\\c");w(Ne,O,mn,"˚","\\r");w(Ne,O,mn,"ˇ","\\v");w(Ne,O,mn,"¨",'\\"');w(Ne,O,mn,"˝","\\H");w(Ne,O,mn,"◯","\\textcircled");var E5={"--":!0,"---":!0,"``":!0,"''":!0};w(Ne,O,le,"–","--",!0);w(Ne,O,le,"–","\\textendash");w(Ne,O,le,"—","---",!0);w(Ne,O,le,"—","\\textemdash");w(Ne,O,le,"‘","`",!0);w(Ne,O,le,"‘","\\textquoteleft");w(Ne,O,le,"’","'",!0);w(Ne,O,le,"’","\\textquoteright");w(Ne,O,le,"“","``",!0);w(Ne,O,le,"“","\\textquotedblleft");w(Ne,O,le,"”","''",!0);w(Ne,O,le,"”","\\textquotedblright");w(E,O,le,"°","\\degree",!0);w(Ne,O,le,"°","\\degree");w(Ne,O,le,"°","\\textdegree",!0);w(E,O,le,"£","\\pounds");w(E,O,le,"£","\\mathsterling",!0);w(Ne,O,le,"£","\\pounds");w(Ne,O,le,"£","\\textsterling",!0);w(E,Z,le,"✠","\\maltese");w(Ne,Z,le,"✠","\\maltese");var R4='0123456789/@."';for(var Hf=0;Hf<R4.length;Hf++){var A4=R4.charAt(Hf);w(E,O,le,A4,A4)}var _4='0123456789!@*()-=+";:?/.,';for(var Ff=0;Ff<_4.length;Ff++){var I4=_4.charAt(Ff);w(Ne,O,le,I4,I4)}var Iu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var Pf=0;Pf<Iu.length;Pf++){var ou=Iu.charAt(Pf);w(E,O,at,ou,ou),w(Ne,O,le,ou,ou)}w(E,Z,le,"C","ℂ");w(Ne,Z,le,"C","ℂ");w(E,Z,le,"H","ℍ");w(Ne,Z,le,"H","ℍ");w(E,Z,le,"N","ℕ");w(Ne,Z,le,"N","ℕ");w(E,Z,le,"P","ℙ");w(Ne,Z,le,"P","ℙ");w(E,Z,le,"Q","ℚ");w(Ne,Z,le,"Q","ℚ");w(E,Z,le,"R","ℝ");w(Ne,Z,le,"R","ℝ");w(E,Z,le,"Z","ℤ");w(Ne,Z,le,"Z","ℤ");w(E,O,at,"h","ℎ");w(Ne,O,at,"h","ℎ");var lt;for(var lr=0;lr<Iu.length;lr++){var xn=Iu.charAt(lr);lt=String.fromCharCode(55349,56320+lr),w(E,O,at,xn,lt),w(Ne,O,le,xn,lt),lt=String.fromCharCode(55349,56372+lr),w(E,O,at,xn,lt),w(Ne,O,le,xn,lt),lt=String.fromCharCode(55349,56424+lr),w(E,O,at,xn,lt),w(Ne,O,le,xn,lt),lt=String.fromCharCode(55349,56580+lr),w(E,O,at,xn,lt),w(Ne,O,le,xn,lt),lt=String.fromCharCode(55349,56684+lr),w(E,O,at,xn,lt),w(Ne,O,le,xn,lt),lt=String.fromCharCode(55349,56736+lr),w(E,O,at,xn,lt),w(Ne,O,le,xn,lt),lt=String.fromCharCode(55349,56788+lr),w(E,O,at,xn,lt),w(Ne,O,le,xn,lt),lt=String.fromCharCode(55349,56840+lr),w(E,O,at,xn,lt),w(Ne,O,le,xn,lt),lt=String.fromCharCode(55349,56944+lr),w(E,O,at,xn,lt),w(Ne,O,le,xn,lt),lr<26&&(lt=String.fromCharCode(55349,56632+lr),w(E,O,at,xn,lt),w(Ne,O,le,xn,lt),lt=String.fromCharCode(55349,56476+lr),w(E,O,at,xn,lt),w(Ne,O,le,xn,lt))}lt="𝕜";w(E,O,at,"k",lt);w(Ne,O,le,"k",lt);for(var Ji=0;Ji<10;Ji++){var Si=Ji.toString();lt=String.fromCharCode(55349,57294+Ji),w(E,O,at,Si,lt),w(Ne,O,le,Si,lt),lt=String.fromCharCode(55349,57314+Ji),w(E,O,at,Si,lt),w(Ne,O,le,Si,lt),lt=String.fromCharCode(55349,57324+Ji),w(E,O,at,Si,lt),w(Ne,O,le,Si,lt),lt=String.fromCharCode(55349,57334+Ji),w(E,O,at,Si,lt),w(Ne,O,le,Si,lt)}var fh="ÐÞþ";for(var $f=0;$f<fh.length;$f++){var cu=fh.charAt($f);w(E,O,at,cu,cu),w(Ne,O,le,cu,cu)}var mh={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},M4={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},O4={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},bR={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},ns={mathClass:"",textClass:"",font:""},D4={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},j4={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},L4={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},hh={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},ph={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},z4={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},gh={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},B4=[mh,mh,M4,M4,O4,O4,bR,ns,ns,ns,D4,D4,j4,j4,L4,L4,hh,hh,ph,ph,z4,z4,ns,ns,gh,gh],vR=[mh,ns,hh,ph,gh],yR=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),a=(t-55296)*1024+(n-56320)+65536;if(119808<=a&&a<120484){var s=Math.floor((a-119808)/26);return B4[s]}else if(120782<=a&&a<=120831){var l=Math.floor((a-120782)/10);return vR[l]}else{if(a===120485||a===120486)return B4[0];if(120486<a&&a<120782)return ns;throw new Ie("Unsupported character: "+e)}},Zu=function(t,n,a){if(fn[a][t]){var s=fn[a][t].replace;s&&(t=s)}return{value:t,metrics:up(t,n,a)}},or=function(t,n,a,s,l){var c=Zu(t,n,a),f=c.metrics;t=c.value;var m;if(f){var h=f.italic;(a==="text"||s&&s.font==="mathit")&&(h=0),m=new Lr(t,f.height,f.depth,h,f.skew,f.width,l)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+n+"' and mode '"+a+"'")),m=new Lr(t,0,0,0,0,0,l);if(s){m.maxFontSize=s.sizeMultiplier,s.style.isTight()&&m.classes.push("mtight");var p=s.getColor();p&&(m.style.color=p)}return m},dp=function(t,n,a,s){return s===void 0&&(s=[]),a.font==="boldsymbol"&&Zu(t,"Main-Bold",n).metrics?or(t,"Main-Bold",n,a,s.concat(["mathbf"])):t==="\\"||fn[n][t].font==="main"?or(t,"Main-Regular",n,a,s):or(t,"AMS-Regular",n,a,s.concat(["amsrm"]))},xR=function(t,n,a){return a!=="textord"&&Zu(t,"Math-BoldItalic",n).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Wu=function(t,n,a){var s=t.mode,l=t.text,c=["mord"],{font:f,fontFamily:m,fontWeight:h,fontShape:p}=n,b=s==="math"||s==="text"&&!!f,y=b?f:m,x="",k="";if(l.charCodeAt(0)===55349){var N=yR(l);x=N.font,k=N[s+"Class"]}if(x)return or(l,x,s,n,c.concat(k));if(y){var R,C;if(y==="boldsymbol"){var _=xR(l,s,a);R=_.fontName,C=[_.fontClass]}else b?(R=bh[f].fontName,C=[f]):(R=uu(m,h,p),C=[m,h,p]);if(Zu(l,R,s).metrics)return or(l,R,s,n,c.concat(C));if(E5.hasOwnProperty(l)&&R.slice(0,10)==="Typewriter"){for(var I=[],$=0;$<l.length;$++)I.push(or(l[$],R,s,n,c.concat(C)));return Ga(I)}}if(a==="mathord")return or(l,"Math-Italic",s,n,c.concat(["mathnormal"]));if(a==="textord"){var D=fn[s][l]&&fn[s][l].font;if(D==="ams"){var M=uu("amsrm",h,p);return or(l,M,s,n,c.concat("amsrm",h,p))}else if(D==="main"||!D){var B=uu("textrm",h,p);return or(l,B,s,n,c.concat(h,p))}else{var Y=uu(D,h,p);return or(l,Y,s,n,c.concat(Y,h,p))}}else throw new Error("unexpected type: "+a+" in makeOrd")},wR=(e,t)=>{if(Ni(e.classes)!==Ni(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var a of Object.keys(e.style))if(e.style[a]!==t.style[a])return!1;for(var s of Object.keys(t.style))if(e.style[s]!==t.style[s])return!1;return!0},T5=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],a=e[t+1];n instanceof Lr&&a instanceof Lr&&wR(n,a)&&(n.text+=a.text,n.height=Math.max(n.height,a.height),n.depth=Math.max(n.depth,a.depth),n.italic=a.italic,e.splice(t+1,1),t--)}return e},fp=function(t){for(var n=0,a=0,s=0,l=0;l<t.children.length;l++){var c=t.children[l];c.height>n&&(n=c.height),c.depth>a&&(a=c.depth),c.maxFontSize>s&&(s=c.maxFontSize)}t.height=n,t.depth=a,t.maxFontSize=s},Ce=function(t,n,a,s){var l=new ul(t,n,a,s);return fp(l),l},Ri=(e,t,n,a)=>new ul(e,t,n,a),al=function(t,n,a){var s=Ce([t],[],n);return s.height=Math.max(a||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),s.style.borderBottomWidth=De(s.height),s.maxFontSize=1,s},SR=function(t,n,a,s){var l=new Xu(t,n,a,s);return fp(l),l},Ga=function(t){var n=new cl(t);return fp(n),n},il=function(t,n){return t instanceof cl?Ce([],[t],n):t},kR=function(t){if(t.positionType==="individualShift"){for(var n=t.children,a=[n[0]],s=-n[0].shift-n[0].elem.depth,l=s,c=1;c<n.length;c++){var f=-n[c].shift-l-n[c].elem.depth,m=f-(n[c-1].elem.height+n[c-1].elem.depth);l=l+f,a.push({type:"kern",size:m}),a.push(n[c])}return{children:a,depth:s}}var h;if(t.positionType==="top"){for(var p=t.positionData,b=0;b<t.children.length;b++){var y=t.children[b];p-=y.type==="kern"?y.size:y.elem.height+y.elem.depth}h=p}else if(t.positionType==="bottom")h=-t.positionData;else{var x=t.children[0];if(x.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")h=-x.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")h=-x.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:h}},Gt=function(t,n){for(var{children:a,depth:s}=kR(t),l=0,c=0;c<a.length;c++){var f=a[c];if(f.type==="elem"){var m=f.elem;l=Math.max(l,m.maxFontSize,m.height)}}l+=2;var h=Ce(["pstrut"],[]);h.style.height=De(l);for(var p=[],b=s,y=s,x=s,k=0;k<a.length;k++){var N=a[k];if(N.type==="kern")x+=N.size;else{var R=N.elem,C=N.wrapperClasses||[],_=N.wrapperStyle||{},I=Ce(C,[h,R],void 0,_);I.style.top=De(-l-x-R.depth),N.marginLeft&&(I.style.marginLeft=N.marginLeft),N.marginRight&&(I.style.marginRight=N.marginRight),p.push(I),x+=R.height+R.depth}b=Math.min(b,x),y=Math.max(y,x)}var $=Ce(["vlist"],p);$.style.height=De(y);var D;if(b<0){var M=Ce([],[]),B=Ce(["vlist"],[M]);B.style.height=De(-b);var Y=Ce(["vlist-s"],[new Lr("")]);D=[Ce(["vlist-r"],[$,Y]),Ce(["vlist-r"],[B])]}else D=[Ce(["vlist-r"],[$])];var G=Ce(["vlist-t"],D);return D.length===2&&G.classes.push("vlist-t2"),G.height=y,G.depth=-b,G},N5=(e,t)=>{var n=Ce(["mspace"],[],t),a=bn(e,t);return n.style.marginRight=De(a),n},uu=(e,t,n)=>{var a,s;switch(e){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=e}return t==="textbf"&&n==="textit"?s="BoldItalic":t==="textbf"?s="Bold":n==="textit"?s="Italic":s="Regular",a+"-"+s},bh={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},C5={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},R5=function(t,n){var[a,s,l]=C5[t],c=new Ci(a),f=new Ha([c],{width:De(s),height:De(l),style:"width:"+De(s),viewBox:"0 0 "+1e3*s+" "+1e3*l,preserveAspectRatio:"xMinYMin"}),m=Ri(["overlay"],[f],n);return m.height=l,m.style.height=De(l),m.style.width=De(s),m},gn={number:3,unit:"mu"},es={number:4,unit:"mu"},ja={number:5,unit:"mu"},ER={mord:{mop:gn,mbin:es,mrel:ja,minner:gn},mop:{mord:gn,mop:gn,mrel:ja,minner:gn},mbin:{mord:es,mop:es,mopen:es,minner:es},mrel:{mord:ja,mop:ja,mopen:ja,minner:ja},mopen:{},mclose:{mop:gn,mbin:es,mrel:ja,minner:gn},mpunct:{mord:gn,mop:gn,mrel:ja,mopen:gn,mclose:gn,mpunct:gn,minner:gn},minner:{mord:gn,mop:gn,mbin:es,mrel:ja,mopen:gn,mpunct:gn,minner:gn}},TR={mord:{mop:gn},mop:{mord:gn,mop:gn},mbin:{},mrel:{},mopen:{},mclose:{mop:gn},mpunct:{},minner:{mop:gn}},A5={},Mu={},Ou={};function Be(e){for(var{type:t,names:n,props:a,handler:s,htmlBuilder:l,mathmlBuilder:c}=e,f={type:t,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:a.allowedInMath===void 0?!0:a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:s},m=0;m<n.length;++m)A5[n[m]]=f;t&&(l&&(Mu[t]=l),c&&(Ou[t]=c))}function us(e){var{type:t,htmlBuilder:n,mathmlBuilder:a}=e;Be({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:a})}var Du=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},jn=function(t){return t.type==="ordgroup"?t.body:[t]},NR=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),CR=new Set(["rightmost","mrel","mclose","mpunct"]),RR={display:ft.DISPLAY,text:ft.TEXT,script:ft.SCRIPT,scriptscript:ft.SCRIPTSCRIPT},AR={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},$n=function(t,n,a,s){s===void 0&&(s=[null,null]);for(var l=[],c=0;c<t.length;c++){var f=Vt(t[c],n);if(f instanceof cl){var m=f.children;l.push(...m)}else l.push(f)}if(T5(l),!a)return l;var h=n;if(t.length===1){var p=t[0];p.type==="sizing"?h=n.havingSize(p.size):p.type==="styling"&&(h=n.havingStyle(RR[p.style]))}var b=Ce([s[0]||"leftmost"],[],n),y=Ce([s[1]||"rightmost"],[],n),x=a==="root";return vh(l,(k,N)=>{var R=N.classes[0],C=k.classes[0];R==="mbin"&&CR.has(C)?N.classes[0]="mord":C==="mbin"&&NR.has(R)&&(k.classes[0]="mord")},{node:b},y,x),vh(l,(k,N)=>{var R,C,_=xh(N),I=xh(k),$=_&&I?k.hasClass("mtight")?(R=TR[_])==null?void 0:R[I]:(C=ER[_])==null?void 0:C[I]:null;if($)return N5($,h)},{node:b},y,x),l},vh=function(t,n,a,s,l){s&&t.push(s);for(var c=0;c<t.length;c++){var f=t[c],m=_5(f);if(m){vh(m.children,n,a,null,l);continue}var h=!f.hasClass("mspace");if(h){var p=n(f,a.node);p&&(a.insertAfter?a.insertAfter(p):(t.unshift(p),c++))}h?a.node=f:l&&f.hasClass("newline")&&(a.node=Ce(["leftmost"])),a.insertAfter=(b=>y=>{t.splice(b+1,0,y),c++})(c)}s&&t.pop()},_5=function(t){return t instanceof cl||t instanceof Xu||t instanceof ul&&t.hasClass("enclosing")?t:null},yh=function(t,n){var a=_5(t);if(a){var s=a.children;if(s.length){if(n==="right")return yh(s[s.length-1],"right");if(n==="left")return yh(s[0],"left")}}return t},xh=function(t,n){if(!t)return null;n&&(t=yh(t,n));var a=t.classes[0];return AR[a]||null},Ao=function(t,n){var a=["nulldelimiter"].concat(t.baseSizingClasses());return Ce(n.concat(a))},Vt=function(t,n,a){if(!t)return Ce();if(Mu[t.type]){var s=Mu[t.type](t,n);if(a&&n.size!==a.size){s=Ce(n.sizingClasses(a),[s],n);var l=n.sizeMultiplier/a.sizeMultiplier;s.height*=l,s.depth*=l}return s}else throw new Ie("Got group of unknown type: '"+t.type+"'")};function du(e,t){var n=Ce(["base"],e,t),a=Ce(["strut"]);return a.style.height=De(n.height+n.depth),n.depth&&(a.style.verticalAlign=De(-n.depth)),n.children.unshift(a),n}function wh(e,t){var n=null;e.length===1&&e[0].type==="tag"&&(n=e[0].tag,e=e[0].body);var a=$n(e,t,"root"),s;a.length===2&&a[1].hasClass("tag")&&(s=a.pop());for(var l=[],c=[],f=0;f<a.length;f++)if(c.push(a[f]),a[f].hasClass("mbin")||a[f].hasClass("mrel")||a[f].hasClass("allowbreak")){for(var m=!1;f<a.length-1&&a[f+1].hasClass("mspace")&&!a[f+1].hasClass("newline");)f++,c.push(a[f]),a[f].hasClass("nobreak")&&(m=!0);m||(l.push(du(c,t)),c=[])}else a[f].hasClass("newline")&&(c.pop(),c.length>0&&(l.push(du(c,t)),c=[]),l.push(a[f]));c.length>0&&l.push(du(c,t));var h;n?(h=du($n(n,t,!0),t),h.classes=["tag"],l.push(h)):s&&l.push(s);var p=Ce(["katex-html"],l);if(p.setAttribute("aria-hidden","true"),h){var b=h.children[0];b.style.height=De(p.height+p.depth),p.depth&&(b.style.verticalAlign=De(-p.depth))}return p}function I5(e){return new cl(e)}class Oe{constructor(t,n,a){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=n||[],this.classes=a||[]}setAttribute(t,n){this.attributes[t]=n}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);this.classes.length>0&&(t.className=Ni(this.classes));for(var a=0;a<this.children.length;a++)if(this.children[a]instanceof Ln&&this.children[a+1]instanceof Ln){for(var s=this.children[a].toText()+this.children[++a].toText();this.children[a+1]instanceof Ln;)s+=this.children[++a].toText();t.appendChild(new Ln(s).toNode())}else t.appendChild(this.children[a].toNode());return t}toMarkup(){var t="<"+this.type;for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(t+=" "+n+'="',t+=rr(this.attributes[n]),t+='"');this.classes.length>0&&(t+=' class ="'+rr(Ni(this.classes))+'"'),t+=">";for(var a=0;a<this.children.length;a++)t+=this.children[a].toMarkup();return t+="</"+this.type+">",t}toText(){return this.children.map(t=>t.toText()).join("")}}class Ln{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return rr(this.toText())}toText(){return this.text}}class M5{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character=" ":t>=-.05556&&t<=-.05555?this.character=" ":t>=-.1667&&t<=-.1666?this.character=" ":t>=-.2223&&t<=-.2222?this.character=" ":t>=-.2778&&t<=-.2777?this.character=" ":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",De(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+De(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var _R=new Set(["\\imath","\\jmath"]),IR=new Set(["mrow","mtable"]),Wr=function(t,n,a){return fn[n][t]&&fn[n][t].replace&&t.charCodeAt(0)!==55349&&!(E5.hasOwnProperty(t)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(t=fn[n][t].replace),new Ln(t)},mp=function(t){return t.length===1?t[0]:new Oe("mrow",t)},MR={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},hp=(e,t)=>{if(e.mode==="text"){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold"}var n=t.font;if(!n||n==="mathnormal")return null;var a=e.mode,s=MR[n];if(s)return typeof s=="function"?s(e):s;var l=e.text;if(_R.has(l))return null;if(fn[a][l]){var c=fn[a][l].replace;c&&(l=c)}var f=bh[n].fontName;return up(l,f,a)?bh[n].variant:null};function Gf(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof Ln&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var n=e.children[0];return n instanceof Ln&&n.text===","}else return!1}var Br=function(t,n,a){if(t.length===1){var s=sn(t[0],n);return a&&s instanceof Oe&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var l=[],c,f=0;f<t.length;f++){var m=sn(t[f],n);if(m instanceof Oe&&c instanceof Oe){if(m.type==="mtext"&&c.type==="mtext"&&m.getAttribute("mathvariant")===c.getAttribute("mathvariant")){c.children.push(...m.children);continue}else if(m.type==="mn"&&c.type==="mn"){c.children.push(...m.children);continue}else if(Gf(m)&&c.type==="mn"){c.children.push(...m.children);continue}else if(m.type==="mn"&&Gf(c))m.children=[...c.children,...m.children],l.pop();else if((m.type==="msup"||m.type==="msub")&&m.children.length>=1&&(c.type==="mn"||Gf(c))){var h=m.children[0];h instanceof Oe&&h.type==="mn"&&(h.children=[...c.children,...h.children],l.pop())}else if(c.type==="mi"&&c.children.length===1){var p=c.children[0];if(p instanceof Ln&&p.text==="̸"&&(m.type==="mo"||m.type==="mi"||m.type==="mn")){var b=m.children[0];b instanceof Ln&&b.text.length>0&&(b.text=b.text.slice(0,1)+"̸"+b.text.slice(1),l.pop())}}}l.push(m),c=m}return l},Ai=function(t,n,a){return mp(Br(t,n,a))},sn=function(t,n){if(!t)return new Oe("mrow");if(Ou[t.type])return Ou[t.type](t,n);throw new Ie("Got group of unknown type: '"+t.type+"'")};function U4(e,t,n,a,s){var l=Br(e,n),c;l.length===1&&l[0]instanceof Oe&&IR.has(l[0].type)?c=l[0]:c=new Oe("mrow",l);var f=new Oe("annotation",[new Ln(t)]);f.setAttribute("encoding","application/x-tex");var m=new Oe("semantics",[c,f]),h=new Oe("math",[m]);h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&h.setAttribute("display","block");var p=s?"katex":"katex-mathml";return Ce([p],[h])}var OR=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],q4=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],H4=function(t,n){return n.size<2?t:OR[t-1][n.size-1]};class za{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||za.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=q4[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new za(n)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:H4(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:q4[t-1]})}havingBaseStyle(t){t=t||this.style.text();var n=H4(za.BASESIZE,t);return this.size===n&&this.textSize===za.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==za.BASESIZE?["sizing","reset-size"+this.size,"size"+za.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=gR(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}za.BASESIZE=6;var O5=function(t){return new za({style:t.displayMode?ft.DISPLAY:ft.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},D5=function(t,n){if(n.displayMode){var a=["katex-display"];n.leqno&&a.push("leqno"),n.fleqn&&a.push("fleqn"),t=Ce(a,[t])}return t},DR=function(t,n,a){var s=O5(a),l;if(a.output==="mathml")return U4(t,n,s,a.displayMode,!0);if(a.output==="html"){var c=wh(t,s);l=Ce(["katex"],[c])}else{var f=U4(t,n,s,a.displayMode,!1),m=wh(t,s);l=Ce(["katex"],[f,m])}return D5(l,a)},jR=function(t,n,a){var s=O5(a),l=wh(t,s),c=Ce(["katex"],[l]);return D5(c,a)},LR={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Qu=function(t){var n=new Oe("mo",[new Ln(LR[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},zR={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},BR=new Set(["widehat","widecheck","widetilde","utilde"]),Ju=function(t,n){function a(){var f=4e5,m=t.label.slice(1);if(BR.has(m)&&"base"in t){var h=t.base.type==="ordgroup"?t.base.body.length:1,p,b,y;if(h>5)m==="widehat"||m==="widecheck"?(p=420,f=2364,y=.42,b=m+"4"):(p=312,f=2340,y=.34,b="tilde4");else{var x=[1,1,2,2,3,3][h];m==="widehat"||m==="widecheck"?(f=[0,1062,2364,2364,2364][x],p=[0,239,300,360,420][x],y=[0,.24,.3,.3,.36,.42][x],b=m+x):(f=[0,600,1033,2339,2340][x],p=[0,260,286,306,312][x],y=[0,.26,.286,.3,.306,.34][x],b="tilde"+x)}var k=new Ci(b),N=new Ha([k],{width:"100%",height:De(y),viewBox:"0 0 "+f+" "+p,preserveAspectRatio:"none"});return{span:Ri([],[N],n),minWidth:0,height:y}}else{var R=[],C=zR[m];if(!C)throw new Error('No SVG data for "'+m+'".');var[_,I,$]=C,D=$/1e3,M=_.length,B,Y;if(M===1){if(C.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+m+'".');B=["hide-tail"],Y=[C[3]]}else if(M===2)B=["halfarrow-left","halfarrow-right"],Y=["xMinYMin","xMaxYMin"];else if(M===3)B=["brace-left","brace-center","brace-right"],Y=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
296
|
-
`+M+" children.");for(var G=0;G<M;G++){var j=new Ci(_[G]),F=new Ha([j],{width:"400em",height:De(D),viewBox:"0 0 "+f+" "+$,preserveAspectRatio:Y[G]+" slice"}),H=Ri([B[G]],[F],n);if(M===1)return{span:H,minWidth:I,height:D};H.style.height=De(D),R.push(H)}return{span:Ce(["stretchy"],R,n),minWidth:I,height:D}}}var{span:s,minWidth:l,height:c}=a();return s.height=c,s.style.height=De(c),l>0&&(s.style.minWidth=De(l)),s},UR=function(t,n,a,s,l){var c,f=t.height+t.depth+a+s;if(/fbox|color|angl/.test(n)){if(c=Ce(["stretchy",n],[],l),n==="fbox"){var m=l.color&&l.getColor();m&&(c.style.borderColor=m)}}else{var h=[];/^[bx]cancel$/.test(n)&&h.push(new dh({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&h.push(new dh({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var p=new Ha(h,{width:"100%",height:De(f)});c=Ri([],[p],l)}return c.height=f,c.style.height=De(f),c},qR={bin:1,close:1,inner:1,open:1,punct:1,rel:1},HR={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function FR(e){return e in qR}function kt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function e0(e){var t=t0(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function t0(e){return e&&(e.type==="atom"||HR.hasOwnProperty(e.type))?e:null}var j5=e=>{if(e instanceof Lr)return e;if(pR(e)&&e.children.length===1)return j5(e.children[0])},pp=(e,t)=>{var n,a,s;e&&e.type==="supsub"?(a=kt(e.base,"accent"),n=a.base,e.base=n,s=hR(Vt(e,t)),e.base=a):(a=kt(e,"accent"),n=a.base);var l=Vt(n,t.havingCrampedStyle()),c=a.isShifty&&Pa(n),f=0;if(c){var m,h;f=(m=(h=j5(l))==null?void 0:h.skew)!=null?m:0}var p=a.label==="\\c",b=p?l.height+l.depth:Math.min(l.height,t.fontMetrics().xHeight),y;if(a.isStretchy)y=Ju(a,t),y=Gt({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"elem",elem:y,wrapperClasses:["svg-align"],wrapperStyle:f>0?{width:"calc(100% - "+De(2*f)+")",marginLeft:De(2*f)}:void 0}]});else{var x,k;a.label==="\\vec"?(x=R5("vec",t),k=C5.vec[1]):(x=Wu({mode:a.mode,text:a.label},t,"textord"),x=mR(x),x.italic=0,k=x.width,p&&(b+=x.depth)),y=Ce(["accent-body"],[x]);var N=a.label==="\\textcircled";N&&(y.classes.push("accent-full"),b=l.height);var R=f;N||(R-=k/2),y.style.left=De(R),a.label==="\\textcircled"&&(y.style.top=".2em"),y=Gt({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:-b},{type:"elem",elem:y}]})}var C=Ce(["mord","accent"],[y],t);return s?(s.children[0]=C,s.height=Math.max(C.height,s.height),s.classes[0]="mord",s):C},L5=(e,t)=>{var n=e.isStretchy?Qu(e.label):new Oe("mo",[Wr(e.label,e.mode)]),a=new Oe("mover",[sn(e.base,t),n]);return a.setAttribute("accent","true"),a},PR=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Be({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=Du(t[0]),a=!PR.test(e.funcName),s=!a||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:a,isShifty:s,base:n}},htmlBuilder:pp,mathmlBuilder:L5});Be({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],a=e.parser.mode;return a==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:pp,mathmlBuilder:L5});Be({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=t[0];return{type:"accentUnder",mode:n.mode,label:a,base:s}},htmlBuilder:(e,t)=>{var n=Vt(e.base,t),a=Ju(e,t),s=e.label==="\\utilde"?.12:0,l=Gt({positionType:"top",positionData:n.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:n}]});return Ce(["mord","accentunder"],[l],t)},mathmlBuilder:(e,t)=>{var n=Qu(e.label),a=new Oe("munder",[sn(e.base,t),n]);return a.setAttribute("accentunder","true"),a}});var fu=e=>{var t=new Oe("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Be({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:a,funcName:s}=e;return{type:"xArrow",mode:a.mode,label:s,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,a=t.havingStyle(n.sup()),s=il(Vt(e.body,a,t),t),l=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(l+"-arrow-pad");var c;e.below&&(a=t.havingStyle(n.sub()),c=il(Vt(e.below,a,t),t),c.classes.push(l+"-arrow-pad"));var f=Ju(e,t),m=-t.fontMetrics().axisHeight+.5*f.height,h=-t.fontMetrics().axisHeight-.5*f.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(h-=s.depth);var p;if(c){var b=-t.fontMetrics().axisHeight+c.height+.5*f.height+.111;p=Gt({positionType:"individualShift",children:[{type:"elem",elem:s,shift:h},{type:"elem",elem:f,shift:m,wrapperClasses:["svg-align"]},{type:"elem",elem:c,shift:b}]})}else p=Gt({positionType:"individualShift",children:[{type:"elem",elem:s,shift:h},{type:"elem",elem:f,shift:m,wrapperClasses:["svg-align"]}]});return Ce(["mrel","x-arrow"],[p],t)},mathmlBuilder(e,t){var n=Qu(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(e.body){var s=fu(sn(e.body,t));if(e.below){var l=fu(sn(e.below,t));a=new Oe("munderover",[n,l,s])}else a=new Oe("mover",[n,s])}else if(e.below){var c=fu(sn(e.below,t));a=new Oe("munder",[n,c])}else a=fu(),a=new Oe("mover",[n,a]);return a}});function z5(e,t){var n=$n(e.body,t,!0);return Ce([e.mclass],n,t)}function B5(e,t){var n,a=Br(e.body,t);return e.mclass==="minner"?n=new Oe("mpadded",a):e.mclass==="mord"?e.isCharacterBox?(n=a[0],n.type="mi"):n=new Oe("mi",a):(e.isCharacterBox?(n=a[0],n.type="mo"):n=new Oe("mo",a),e.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):e.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):e.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}Be({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:a}=e,s=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+a.slice(5),body:jn(s),isCharacterBox:Pa(s)}},htmlBuilder:z5,mathmlBuilder:B5});var n0=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};Be({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:n0(t[0]),body:jn(t[1]),isCharacterBox:Pa(t[1])}}});Be({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:n,funcName:a}=e,s=t[1],l=t[0],c;a!=="\\stackrel"?c=n0(s):c="mrel";var f={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:jn(s)},m={type:"supsub",mode:l.mode,base:f,sup:a==="\\underset"?null:l,sub:a==="\\underset"?l:null};return{type:"mclass",mode:n.mode,mclass:c,body:[m],isCharacterBox:Pa(m)}},htmlBuilder:z5,mathmlBuilder:B5});Be({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:n0(t[0]),body:jn(t[0])}},htmlBuilder(e,t){var n=$n(e.body,t,!0),a=Ce([e.mclass],n,t);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(e,t){var n=Br(e.body,t),a=new Oe("mstyle",n);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var $R={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},F4=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),P4=e=>e.type==="textord"&&e.text==="@",GR=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function VR(e,t,n){var a=$R[e];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(a,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var s=n.callFunction("\\\\cdleft",[t[0]],[]),l={type:"atom",text:a,mode:"math",family:"rel"},c=n.callFunction("\\Big",[l],[]),f=n.callFunction("\\\\cdright",[t[1]],[]),m={type:"ordgroup",mode:"math",body:[s,c,f]};return n.callFunction("\\\\cdparent",[m],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var h={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[h],[])}default:return{type:"textord",text:" ",mode:"math"}}}function KR(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n==="&"||n==="\\\\")e.consume();else if(n==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new Ie("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var a=[],s=[a],l=0;l<t.length;l++){for(var c=t[l],f=F4(),m=0;m<c.length;m++)if(!P4(c[m]))f.body.push(c[m]);else{a.push(f),m+=1;var h=e0(c[m]).text,p=new Array(2);if(p[0]={type:"ordgroup",mode:"math",body:[]},p[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(h))if("<>AV".includes(h))for(var b=0;b<2;b++){for(var y=!0,x=m+1;x<c.length;x++){if(GR(c[x],h)){y=!1,m=x;break}if(P4(c[x]))throw new Ie("Missing a "+h+" character to complete a CD arrow.",c[x]);p[b].body.push(c[x])}if(y)throw new Ie("Missing a "+h+" character to complete a CD arrow.",c[m])}else throw new Ie('Expected one of "<>AV=|." after @',c[m]);var k=VR(h,p,e),N={type:"styling",body:[k],mode:"math",style:"display",resetFont:!0};a.push(N),f=F4()}l%2===0?a.push(f):a.shift(),a=[],s.push(a)}e.gullet.endGroup(),e.gullet.endGroup();var R=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:R,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}Be({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:a}=e;return{type:"cdlabel",mode:n.mode,side:a.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),a=il(Vt(e.label,n,t),t);return a.classes.push("cd-label-"+e.side),a.style.bottom=De(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(e,t){var n=new Oe("mrow",[sn(e.label,t)]);return n=new Oe("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new Oe("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});Be({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=il(Vt(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new Oe("mrow",[sn(e.fragment,t)])}});Be({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,a=kt(t[0],"ordgroup"),s=a.body,l="",c=0;c<s.length;c++){var f=kt(s[c],"textord");l+=f.text}var m=parseInt(l),h;if(isNaN(m))throw new Ie("\\@char has non-numeric argument "+l);if(m<0||m>=1114111)throw new Ie("\\@char with invalid code point "+l);return m<=65535?h=String.fromCharCode(m):(m-=65536,h=String.fromCharCode((m>>10)+55296,(m&1023)+56320)),{type:"textord",mode:n.mode,text:h}}});var U5=(e,t)=>{var n=$n(e.body,t.withColor(e.color),!1);return Ga(n)},q5=(e,t)=>{var n=Br(e.body,t.withColor(e.color)),a=new Oe("mstyle",n);return a.setAttribute("mathcolor",e.color),a};Be({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,a=kt(t[0],"color-token").color,s=t[1];return{type:"color",mode:n.mode,color:a,body:jn(s)}},htmlBuilder:U5,mathmlBuilder:q5});Be({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:a}=e,s=kt(t[0],"color-token").color;n.gullet.macros.set("\\current@color",s);var l=n.parseExpression(!0,a);return{type:"color",mode:n.mode,color:s,body:l}},htmlBuilder:U5,mathmlBuilder:q5});Be({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:a}=e,s=a.gullet.future().text==="["?a.parseSizeGroup(!0):null,l=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:l,size:s&&kt(s,"size").value}},htmlBuilder(e,t){var n=Ce(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=De(bn(e.size,t)))),n},mathmlBuilder(e,t){var n=new Oe("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",De(bn(e.size,t)))),n}});var Sh={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},H5=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Ie("Expected a control sequence",e);return t},YR=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},F5=(e,t,n,a)=>{var s=e.gullet.macros.get(n.text);s==null&&(n.noexpand=!0,s={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,s,a)};Be({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var a=t.fetch();if(Sh[a.text])return(n==="\\global"||n==="\\\\globallong")&&(a.text=Sh[a.text]),kt(t.parseFunction(),"internal");throw new Ie("Invalid token after macro prefix",a)}});Be({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,a=t.gullet.popToken(),s=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new Ie("Expected a control sequence",a);for(var l=0,c,f=[[]];t.gullet.future().text!=="{";)if(a=t.gullet.popToken(),a.text==="#"){if(t.gullet.future().text==="{"){c=t.gullet.future(),f[l].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new Ie('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==l+1)throw new Ie('Argument number "'+a.text+'" out of order');l++,f.push([])}else{if(a.text==="EOF")throw new Ie("Expected a macro definition");f[l].push(a.text)}var{tokens:m}=t.gullet.consumeArg();return c&&m.unshift(c),(n==="\\edef"||n==="\\xdef")&&(m=t.gullet.expandTokens(m),m.reverse()),t.gullet.macros.set(s,{tokens:m,numArgs:l,delimiters:f},n===Sh[n]),{type:"internal",mode:t.mode}}});Be({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,a=H5(t.gullet.popToken());t.gullet.consumeSpaces();var s=YR(t);return F5(t,a,s,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});Be({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,a=H5(t.gullet.popToken()),s=t.gullet.popToken(),l=t.gullet.popToken();return F5(t,a,l,n==="\\\\globalfuture"),t.gullet.pushToken(l),t.gullet.pushToken(s),{type:"internal",mode:t.mode}}});var ho=function(t,n,a){var s=fn.math[t]&&fn.math[t].replace,l=up(s||t,n,a);if(!l)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return l},gp=function(t,n,a,s){var l=a.havingBaseStyle(n),c=Ce(s.concat(l.sizingClasses(a)),[t],a),f=l.sizeMultiplier/a.sizeMultiplier;return c.height*=f,c.depth*=f,c.maxFontSize=l.sizeMultiplier,c},P5=function(t,n,a){var s=n.havingBaseStyle(a),l=(1-n.sizeMultiplier/s.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=De(l),t.height-=l,t.depth+=l},XR=function(t,n,a,s,l,c){var f=or(t,"Main-Regular",l,s),m=gp(f,n,s,c);return P5(m,s,n),m},ZR=function(t,n,a,s){return or(t,"Size"+n+"-Regular",a,s)},$5=function(t,n,a,s,l,c){var f=ZR(t,n,l,s),m=gp(Ce(["delimsizing","size"+n],[f],s),ft.TEXT,s,c);return a&&P5(m,s,ft.TEXT),m},Vf=function(t,n,a){var s;n==="Size1-Regular"?s="delim-size1":s="delim-size4";var l=Ce(["delimsizinginner",s],[Ce([],[or(t,n,a)])]);return{type:"elem",elem:l}},Kf=function(t,n,a){var s=da["Size4-Regular"][t.charCodeAt(0)]?da["Size4-Regular"][t.charCodeAt(0)][4]:da["Size1-Regular"][t.charCodeAt(0)][4],l=new Ci("inner",sR(t,Math.round(1e3*n))),c=new Ha([l],{width:De(s),height:De(n),style:"width:"+De(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),f=Ri([],[c],a);return f.height=n,f.style.height=De(n),f.style.width=De(s),{type:"elem",elem:f}},kh=.008,mu={type:"kern",size:-1*kh},WR=new Set(["|","\\lvert","\\rvert","\\vert"]),QR=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),G5=function(t,n,a,s,l,c){var f,m,h,p,b="",y=0;f=h=p=t,m=null;var x="Size1-Regular";t==="\\uparrow"?h=p="⏐":t==="\\Uparrow"?h=p="‖":t==="\\downarrow"?f=h="⏐":t==="\\Downarrow"?f=h="‖":t==="\\updownarrow"?(f="\\uparrow",h="⏐",p="\\downarrow"):t==="\\Updownarrow"?(f="\\Uparrow",h="‖",p="\\Downarrow"):WR.has(t)?(h="∣",b="vert",y=333):QR.has(t)?(h="∥",b="doublevert",y=556):t==="["||t==="\\lbrack"?(f="⎡",h="⎢",p="⎣",x="Size4-Regular",b="lbrack",y=667):t==="]"||t==="\\rbrack"?(f="⎤",h="⎥",p="⎦",x="Size4-Regular",b="rbrack",y=667):t==="\\lfloor"||t==="⌊"?(h=f="⎢",p="⎣",x="Size4-Regular",b="lfloor",y=667):t==="\\lceil"||t==="⌈"?(f="⎡",h=p="⎢",x="Size4-Regular",b="lceil",y=667):t==="\\rfloor"||t==="⌋"?(h=f="⎥",p="⎦",x="Size4-Regular",b="rfloor",y=667):t==="\\rceil"||t==="⌉"?(f="⎤",h=p="⎥",x="Size4-Regular",b="rceil",y=667):t==="("||t==="\\lparen"?(f="⎛",h="⎜",p="⎝",x="Size4-Regular",b="lparen",y=875):t===")"||t==="\\rparen"?(f="⎞",h="⎟",p="⎠",x="Size4-Regular",b="rparen",y=875):t==="\\{"||t==="\\lbrace"?(f="⎧",m="⎨",p="⎩",h="⎪",x="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(f="⎫",m="⎬",p="⎭",h="⎪",x="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(f="⎧",p="⎩",h="⎪",x="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(f="⎫",p="⎭",h="⎪",x="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(f="⎧",p="⎭",h="⎪",x="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(f="⎫",p="⎩",h="⎪",x="Size4-Regular");var k=ho(f,x,l),N=k.height+k.depth,R=ho(h,x,l),C=R.height+R.depth,_=ho(p,x,l),I=_.height+_.depth,$=0,D=1;if(m!==null){var M=ho(m,x,l);$=M.height+M.depth,D=2}var B=N+I+$,Y=Math.max(0,Math.ceil((n-B)/(D*C))),G=B+Y*D*C,j=s.fontMetrics().axisHeight;a&&(j*=s.sizeMultiplier);var F=G/2-j,H=[];if(b.length>0){var ee=G-N-I,K=Math.round(G*1e3),X=lR(b,Math.round(ee*1e3)),V=new Ci(b,X),re=De(y/1e3),ue=De(K/1e3),Te=new Ha([V],{width:re,height:ue,viewBox:"0 0 "+y+" "+K}),P=Ri([],[Te],s);P.height=K/1e3,P.style.width=re,P.style.height=ue,H.push({type:"elem",elem:P})}else{if(H.push(Vf(p,x,l)),H.push(mu),m===null){var U=G-N-I+2*kh;H.push(Kf(h,U,s))}else{var q=(G-N-I-$)/2+2*kh;H.push(Kf(h,q,s)),H.push(mu),H.push(Vf(m,x,l)),H.push(mu),H.push(Kf(h,q,s))}H.push(mu),H.push(Vf(f,x,l))}var A=s.havingBaseStyle(ft.TEXT),ae=Gt({positionType:"bottom",positionData:F,children:H});return gp(Ce(["delimsizing","mult"],[ae],A),ft.TEXT,s,c)},Yf=80,Xf=.08,Zf=function(t,n,a,s,l){var c=iR(t,s,a),f=new Ci(t,c),m=new Ha([f],{width:"400em",height:De(n),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return Ri(["hide-tail"],[m],l)},JR=function(t,n){var a=n.havingBaseSizing(),s=Z5("\\surd",t*a.sizeMultiplier,X5,a),l=a.sizeMultiplier,c=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),f,m,h,p,b;return s.type==="small"?(p=1e3+1e3*c+Yf,t<1?l=1:t<1.4&&(l=.7),m=(1+c+Xf)/l,h=(1+c)/l,f=Zf("sqrtMain",m,p,c,n),f.style.minWidth="0.853em",b=.833/l):s.type==="large"?(p=(1e3+Yf)*wo[s.size],h=(wo[s.size]+c)/l,m=(wo[s.size]+c+Xf)/l,f=Zf("sqrtSize"+s.size,m,p,c,n),f.style.minWidth="1.02em",b=1/l):(m=t+c+Xf,h=t+c,p=Math.floor(1e3*t+c)+Yf,f=Zf("sqrtTall",m,p,c,n),f.style.minWidth="0.742em",b=1.056),f.height=h,f.style.height=De(m),{span:f,advanceWidth:b,ruleWidth:(n.fontMetrics().sqrtRuleThickness+c)*l}},V5=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),eA=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),K5=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),wo=[0,1.2,1.8,2.4,3],Y5=function(t,n,a,s,l){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),V5.has(t)||K5.has(t))return $5(t,n,!1,a,s,l);if(eA.has(t))return G5(t,wo[n],!1,a,s,l);throw new Ie("Illegal delimiter: '"+t+"'")},tA=[{type:"small",style:ft.SCRIPTSCRIPT},{type:"small",style:ft.SCRIPT},{type:"small",style:ft.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],nA=[{type:"small",style:ft.SCRIPTSCRIPT},{type:"small",style:ft.SCRIPT},{type:"small",style:ft.TEXT},{type:"stack"}],X5=[{type:"small",style:ft.SCRIPTSCRIPT},{type:"small",style:ft.SCRIPT},{type:"small",style:ft.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],rA=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";var n=t.type;throw new Error("Add support for delim type '"+n+"' here.")},Z5=function(t,n,a,s){for(var l=Math.min(2,3-s.style.size),c=l;c<a.length;c++){var f=a[c];if(f.type==="stack")break;var m=ho(t,rA(f),"math"),h=m.height+m.depth;if(f.type==="small"){var p=s.havingBaseStyle(f.style);h*=p.sizeMultiplier}if(h>n)return f}return a[a.length-1]},Eh=function(t,n,a,s,l,c){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var f;K5.has(t)?f=tA:V5.has(t)?f=X5:f=nA;var m=Z5(t,n,f,s);return m.type==="small"?XR(t,m.style,a,s,l,c):m.type==="large"?$5(t,m.size,a,s,l,c):G5(t,n,a,s,l,c)},Wf=function(t,n,a,s,l,c){var f=s.fontMetrics().axisHeight*s.sizeMultiplier,m=901,h=5/s.fontMetrics().ptPerEm,p=Math.max(n-f,a+f),b=Math.max(p/500*m,2*p-h);return Eh(t,b,!0,s,l,c)},$4={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},aA=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function G4(e){return"isMiddle"in e}function r0(e,t){var n=t0(e);if(n&&aA.has(n.text))return n;throw n?new Ie("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new Ie("Invalid delimiter type '"+e.type+"'",e)}Be({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=r0(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:$4[e.funcName].size,mclass:$4[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?Ce([e.mclass]):Y5(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Wr(e.delim,e.mode));var n=new Oe("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var a=De(wo[e.size]);return n.setAttribute("minsize",a),n.setAttribute("maxsize",a),n}});function V4(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Be({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new Ie("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:r0(t[0],e).text,color:n}}});Be({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=r0(t[0],e),a=e.parser;++a.leftrightDepth;var s=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var l=kt(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:s,left:n.text,right:l.delim,rightColor:l.color}},htmlBuilder:(e,t)=>{V4(e);for(var n=$n(e.body,t,!0,["mopen","mclose"]),a=0,s=0,l=!1,c=0;c<n.length;c++){var f=n[c];G4(f)?l=!0:(a=Math.max(n[c].height,a),s=Math.max(n[c].depth,s))}a*=t.sizeMultiplier,s*=t.sizeMultiplier;var m;if(e.left==="."?m=Ao(t,["mopen"]):m=Wf(e.left,a,s,t,e.mode,["mopen"]),n.unshift(m),l)for(var h=1;h<n.length;h++){var p=n[h];if(G4(p)){var b=p.isMiddle;n[h]=Wf(b.delim,a,s,b.options,e.mode,[])}}var y;if(e.right===".")y=Ao(t,["mclose"]);else{var x=e.rightColor?t.withColor(e.rightColor):t;y=Wf(e.right,a,s,x,e.mode,["mclose"])}return n.push(y),Ce(["minner"],n,t)},mathmlBuilder:(e,t)=>{V4(e);var n=Br(e.body,t);if(e.left!=="."){var a=new Oe("mo",[Wr(e.left,e.mode)]);a.setAttribute("fence","true"),n.unshift(a)}if(e.right!=="."){var s=new Oe("mo",[Wr(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),n.push(s)}return mp(n)}});Be({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=r0(t[0],e);if(!e.parser.leftrightDepth)throw new Ie("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim==="."?n=Ao(t,[]):(n=Y5(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?Wr("|","text"):Wr(e.delim,e.mode),a=new Oe("mo",[n]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var a0=(e,t)=>{var n=il(Vt(e.body,t),t),a=e.label.slice(1),s=t.sizeMultiplier,l,c,f=Pa(e.body);if(a==="sout")l=Ce(["stretchy","sout"]),l.height=t.fontMetrics().defaultRuleThickness/s,c=-.5*t.fontMetrics().xHeight;else if(a==="phase"){var m=bn({number:.6,unit:"pt"},t),h=bn({number:.35,unit:"ex"},t),p=t.havingBaseSizing();s=s/p.sizeMultiplier;var b=n.height+n.depth+m+h;n.style.paddingLeft=De(b/2+m);var y=Math.floor(1e3*b*s),x=rR(y),k=new Ha([new Ci("phase",x)],{width:"400em",height:De(y/1e3),viewBox:"0 0 400000 "+y,preserveAspectRatio:"xMinYMin slice"});l=Ri(["hide-tail"],[k],t),l.style.height=De(b),c=n.depth+m+h}else{/cancel/.test(a)?f||n.classes.push("cancel-pad"):a==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var N,R,C=0;/box/.test(a)?(C=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),N=t.fontMetrics().fboxsep+(a==="colorbox"?0:C),R=N):a==="angl"?(C=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),N=4*C,R=Math.max(0,.25-n.depth)):(N=f?.2:0,R=N),l=UR(n,a,N,R,t),/fbox|boxed|fcolorbox/.test(a)?(l.style.borderStyle="solid",l.style.borderWidth=De(C)):a==="angl"&&C!==.049&&(l.style.borderTopWidth=De(C),l.style.borderRightWidth=De(C)),c=n.depth+R,e.backgroundColor&&(l.style.backgroundColor=e.backgroundColor,e.borderColor&&(l.style.borderColor=e.borderColor))}var _;if(e.backgroundColor)_=Gt({positionType:"individualShift",children:[{type:"elem",elem:l,shift:c},{type:"elem",elem:n,shift:0}]});else{var I=/cancel|phase/.test(a)?["svg-align"]:[];_=Gt({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:l,shift:c,wrapperClasses:I}]})}return/cancel/.test(a)&&(_.height=n.height,_.depth=n.depth),/cancel/.test(a)&&!f?Ce(["mord","cancel-lap"],[_],t):Ce(["mord"],[_],t)},i0=(e,t)=>{var n,a=new Oe(e.label.includes("colorbox")?"mpadded":"menclose",[sn(e.body,t)]);switch(e.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*n+"pt"),a.setAttribute("height","+"+2*n+"pt"),a.setAttribute("lspace",n+"pt"),a.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var s=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);a.setAttribute("style","border: "+De(s)+" solid "+e.borderColor)}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&a.setAttribute("mathbackground",e.backgroundColor),a};Be({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,t,n){var{parser:a,funcName:s}=e,l=kt(t[0],"color-token").color,c=t[1];return{type:"enclose",mode:a.mode,label:s,backgroundColor:l,body:c}},htmlBuilder:a0,mathmlBuilder:i0});Be({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,t,n){var{parser:a,funcName:s}=e,l=kt(t[0],"color-token").color,c=kt(t[1],"color-token").color,f=t[2];return{type:"enclose",mode:a.mode,label:s,backgroundColor:c,borderColor:l,body:f}},htmlBuilder:a0,mathmlBuilder:i0});Be({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});Be({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:a}=e,s=t[0];return{type:"enclose",mode:n.mode,label:a,body:s}},htmlBuilder:a0,mathmlBuilder:i0});Be({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:a}=e;n.mode==="math"&&n.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=t[0];return{type:"enclose",mode:n.mode,label:a,body:s}},htmlBuilder:a0,mathmlBuilder:i0});Be({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var W5={};function ma(e){for(var{type:t,names:n,props:a,handler:s,htmlBuilder:l,mathmlBuilder:c}=e,f={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},m=0;m<n.length;++m)W5[n[m]]=f;l&&(Mu[t]=l),c&&(Ou[t]=c)}var Q5={};function z(e,t){Q5[e]=t}class wr{constructor(t,n,a){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=n,this.end=a}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new wr(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}}class jr{constructor(t,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=n}range(t,n){return new jr(n,wr.range(this,t))}}function K4(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n==="\\relax"&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n==="\\hline"||n==="\\hdashline";)e.consume(),t.push(n==="\\hdashline"),e.consumeSpaces(),n=e.fetch().text;return t}var s0=e=>{var t=e.parser.settings;if(!t.displayMode)throw new Ie("{"+e.envName+"} can be used only in display mode.")},iA=new Set(["gather","gather*"]);function bp(e){if(!e.includes("ed"))return!e.includes("*")}function Ii(e,t,n){var{hskipBeforeAndAfter:a,addJot:s,cols:l,arraystretch:c,colSeparationType:f,autoTag:m,singleRow:h,emptySingleRow:p,maxNumCols:b,leqno:y}=t;if(e.gullet.beginGroup(),h||e.gullet.macros.set("\\cr","\\\\\\relax"),!c){var x=e.gullet.expandMacroAsText("\\arraystretch");if(x==null)c=1;else if(c=parseFloat(x),!c||c<0)throw new Ie("Invalid \\arraystretch: "+x)}e.gullet.beginGroup();var k=[],N=[k],R=[],C=[],_=m!=null?[]:void 0;function I(){m&&e.gullet.macros.set("\\@eqnsw","1",!0)}function $(){_&&(e.gullet.macros.get("\\df@tag")?(_.push(e.subparse([new jr("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):_.push(!!m&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(I(),C.push(K4(e));;){var D=e.parseExpression(!1,h?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var M={type:"ordgroup",mode:e.mode,body:D};n&&(M={type:"styling",mode:e.mode,style:n,resetFont:!0,body:[M]}),k.push(M);var B=e.fetch().text;if(B==="&"){if(b&&k.length===b){if(h||f)throw new Ie("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(B==="\\end"){$(),k.length===1&&M.type==="styling"&&M.body.length===1&&M.body[0].type==="ordgroup"&&M.body[0].body.length===0&&(N.length>1||!p)&&N.pop(),C.length<N.length+1&&C.push([]);break}else if(B==="\\\\"){e.consume();var Y=void 0;e.gullet.future().text!==" "&&(Y=e.parseSizeGroup(!0)),R.push(Y?Y.value:null),$(),C.push(K4(e)),k=[],N.push(k),I()}else throw new Ie("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:s,arraystretch:c,body:N,cols:l,rowGaps:R,hskipBeforeAndAfter:a,hLinesBeforeRow:C,colSeparationType:f,tags:_,leqno:y}}function vp(e){return e.slice(0,1)==="d"?"display":"text"}var ha=function(t,n){var a,s,l=t.body.length,c=t.hLinesBeforeRow,f=0,m=new Array(l),h=[],p=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),b=1/n.fontMetrics().ptPerEm,y=5*b;if(t.colSeparationType&&t.colSeparationType==="small"){var x=n.havingStyle(ft.SCRIPT).sizeMultiplier;y=.2778*(x/n.sizeMultiplier)}var k=t.colSeparationType==="CD"?bn({number:3,unit:"ex"},n):12*b,N=3*b,R=t.arraystretch*k,C=.7*R,_=.3*R,I=0;function $(Fe){for(var _e=0;_e<Fe.length;++_e)_e>0&&(I+=.25),h.push({pos:I,isDashed:Fe[_e]})}for($(c[0]),a=0;a<t.body.length;++a){var D=t.body[a],M=C,B=_;f<D.length&&(f=D.length);var Y={cells:new Array(D.length),height:0,depth:0,pos:0};for(s=0;s<D.length;++s){var G=Vt(D[s],n);B<G.depth&&(B=G.depth),M<G.height&&(M=G.height),Y.cells[s]=G}var j=t.rowGaps[a],F=0;j&&(F=bn(j,n),F>0&&(F+=_,B<F&&(B=F),F=0)),t.addJot&&a<t.body.length-1&&(B+=N),Y.height=M,Y.depth=B,I+=M,Y.pos=I,I+=B+F,m[a]=Y,$(c[a+1])}var H=I/2+n.fontMetrics().axisHeight,ee=t.cols||[],K=[],X,V,re=[];if(t.tags&&t.tags.some(Fe=>Fe))for(a=0;a<l;++a){var ue=m[a],Te=ue.pos-H,P=t.tags[a],U=void 0;P===!0?U=Ce(["eqn-num"],[],n):P===!1?U=Ce([],[],n):U=Ce([],$n(P,n,!0),n),U.depth=ue.depth,U.height=ue.height,re.push({type:"elem",elem:U,shift:Te})}for(s=0,V=0;s<f||V<ee.length;++s,++V){for(var q,A=ee[V],ae=!0;((he=A)==null?void 0:he.type)==="separator";){var he;if(ae||(X=Ce(["arraycolsep"],[]),X.style.width=De(n.fontMetrics().doubleRuleSep),K.push(X)),A.separator==="|"||A.separator===":"){var ne=A.separator==="|"?"solid":"dashed",te=Ce(["vertical-separator"],[],n);te.style.height=De(I),te.style.borderRightWidth=De(p),te.style.borderRightStyle=ne,te.style.margin="0 "+De(-p/2);var ce=I-H;ce&&(te.style.verticalAlign=De(-ce)),K.push(te)}else throw new Ie("Invalid separator type: "+A.separator);V++,A=ee[V],ae=!1}if(!(s>=f)){var ge=void 0;if(s>0||t.hskipBeforeAndAfter){var Re,je;ge=(Re=(je=A)==null?void 0:je.pregap)!=null?Re:y,ge!==0&&(X=Ce(["arraycolsep"],[]),X.style.width=De(ge),K.push(X))}var be=[];for(a=0;a<l;++a){var qe=m[a],Ve=qe.cells[s];if(Ve){var tt=qe.pos-H;Ve.depth=qe.depth,Ve.height=qe.height,be.push({type:"elem",elem:Ve,shift:tt})}}var nt=Gt({positionType:"individualShift",children:be}),Ut=Ce(["col-align-"+(((q=A)==null?void 0:q.align)||"c")],[nt]);if(K.push(Ut),s<f-1||t.hskipBeforeAndAfter){var Rt,ut;ge=(Rt=(ut=A)==null?void 0:ut.postgap)!=null?Rt:y,ge!==0&&(X=Ce(["arraycolsep"],[]),X.style.width=De(ge),K.push(X))}}}var Ge=Ce(["mtable"],K);if(h.length>0){for(var Bt=al("hline",n,p),Kt=al("hdashline",n,p),hn=[{type:"elem",elem:Ge,shift:0}];h.length>0;){var Je=h.pop(),tn=Je.pos-H;Je.isDashed?hn.push({type:"elem",elem:Kt,shift:tn}):hn.push({type:"elem",elem:Bt,shift:tn})}Ge=Gt({positionType:"individualShift",children:hn})}if(re.length===0)return Ce(["mord"],[Ge],n);var pe=Gt({positionType:"individualShift",children:re}),Se=Ce(["tag"],[pe],n);return Ga([Ge,Se])},sA={c:"center ",l:"left ",r:"right "},pa=function(t,n){for(var a=[],s=new Oe("mtd",[],["mtr-glue"]),l=new Oe("mtd",[],["mml-eqn-num"]),c=0;c<t.body.length;c++){for(var f=t.body[c],m=[],h=0;h<f.length;h++)m.push(new Oe("mtd",[sn(f[h],n)]));t.tags&&t.tags[c]&&(m.unshift(s),m.push(s),t.leqno?m.unshift(l):m.push(l)),a.push(new Oe("mtr",m))}var p=new Oe("mtable",a),b=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);p.setAttribute("rowspacing",De(b));var y="",x="";if(t.cols&&t.cols.length>0){var k=t.cols,N="",R=!1,C=0,_=k.length;k[0].type==="separator"&&(y+="top ",C=1),k[k.length-1].type==="separator"&&(y+="bottom ",_-=1);for(var I=C;I<_;I++){var $=k[I];$.type==="align"?(x+=sA[$.align],R&&(N+="none "),R=!0):$.type==="separator"&&R&&(N+=$.separator==="|"?"solid ":"dashed ",R=!1)}p.setAttribute("columnalign",x.trim()),/[sd]/.test(N)&&p.setAttribute("columnlines",N.trim())}if(t.colSeparationType==="align"){for(var D=t.cols||[],M="",B=1;B<D.length;B++)M+=B%2?"0em ":"1em ";p.setAttribute("columnspacing",M.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?p.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?p.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?p.setAttribute("columnspacing","0.5em"):p.setAttribute("columnspacing","1em");var Y="",G=t.hLinesBeforeRow;y+=G[0].length>0?"left ":"",y+=G[G.length-1].length>0?"right ":"";for(var j=1;j<G.length-1;j++)Y+=G[j].length===0?"none ":G[j][0]?"dashed ":"solid ";return/[sd]/.test(Y)&&p.setAttribute("rowlines",Y.trim()),y!==""&&(p=new Oe("menclose",[p]),p.setAttribute("notation",y.trim())),t.arraystretch&&t.arraystretch<1&&(p=new Oe("mstyle",[p]),p.setAttribute("scriptlevel","1")),p},J5=function(t,n){t.envName.includes("ed")||s0(t);var a=[],s=t.envName.includes("at")?"alignat":"align",l=t.envName==="split",c=Ii(t.parser,{cols:a,addJot:!0,autoTag:l?void 0:bp(t.envName),emptySingleRow:!0,colSeparationType:s,maxNumCols:l?2:void 0,leqno:t.parser.settings.leqno},"display"),f=0,m=0,h={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var p="",b=0;b<n[0].body.length;b++){var y=kt(n[0].body[b],"textord");p+=y.text}f=Number(p),m=f*2}var x=!m;c.body.forEach(function(C){for(var _=1;_<C.length;_+=2){var I=kt(C[_],"styling"),$=kt(I.body[0],"ordgroup");$.body.unshift(h)}if(x)m<C.length&&(m=C.length);else{var D=C.length/2;if(f<D)throw new Ie("Too many math in a row: "+("expected "+f+", but got "+D),C[0])}});for(var k=0;k<m;++k){var N="r",R=0;k%2===1?N="l":k>0&&x&&(R=1),a[k]={type:"align",align:N,pregap:R,postgap:0}}return c.colSeparationType=x?"align":"alignat",c};ma({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=t0(t[0]),a=n?[t[0]]:kt(t[0],"ordgroup").body,s=a.map(function(c){var f=e0(c),m=f.text;if("lcr".includes(m))return{type:"align",align:m};if(m==="|")return{type:"separator",separator:"|"};if(m===":")return{type:"separator",separator:":"};throw new Ie("Unknown column alignment: "+m,c)}),l={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return Ii(e.parser,l,vp(e.envName))},htmlBuilder:ha,mathmlBuilder:pa});ma({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),n=s.fetch().text,!"lcr".includes(n))throw new Ie("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),a.cols=[{type:"align",align:n}]}}var l=Ii(e.parser,a,vp(e.envName)),c=Math.max(0,...l.body.map(f=>f.length));return l.cols=new Array(c).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[l],left:t[0],right:t[1],rightColor:void 0}:l},htmlBuilder:ha,mathmlBuilder:pa});ma({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=Ii(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:ha,mathmlBuilder:pa});ma({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=t0(t[0]),a=n?[t[0]]:kt(t[0],"ordgroup").body,s=a.map(function(f){var m=e0(f),h=m.text;if("lc".includes(h))return{type:"align",align:h};throw new Ie("Unknown column alignment: "+h,f)});if(s.length>1)throw new Ie("{subarray} can contain only one column");var l={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},c=Ii(e.parser,l,"script");if(c.body.length>0&&c.body[0].length>1)throw new Ie("{subarray} can contain only one column");return c},htmlBuilder:ha,mathmlBuilder:pa});ma({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=Ii(e.parser,t,vp(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ha,mathmlBuilder:pa});ma({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:J5,htmlBuilder:ha,mathmlBuilder:pa});ma({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){iA.has(e.envName)&&s0(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:bp(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Ii(e.parser,t,"display")},htmlBuilder:ha,mathmlBuilder:pa});ma({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:J5,htmlBuilder:ha,mathmlBuilder:pa});ma({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){s0(e);var t={autoTag:bp(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Ii(e.parser,t,"display")},htmlBuilder:ha,mathmlBuilder:pa});ma({type:"array",names:["CD"],props:{numArgs:0},handler(e){return s0(e),KR(e.parser)},htmlBuilder:ha,mathmlBuilder:pa});z("\\nonumber","\\gdef\\@eqnsw{0}");z("\\notag","\\nonumber");Be({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Ie(e.funcName+" valid only within array environment")}});var Y4=W5;Be({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:a}=e,s=t[0];if(s.type!=="ordgroup")throw new Ie("Invalid environment name",s);for(var l="",c=0;c<s.body.length;++c)l+=kt(s.body[c],"textord").text;if(a==="\\begin"){if(!Y4.hasOwnProperty(l))throw new Ie("No such environment: "+l,s);var f=Y4[l],{args:m,optArgs:h}=n.parseArguments("\\begin{"+l+"}",f),p={mode:n.mode,envName:l,parser:n},b=f.handler(p,m,h);n.expect("\\end",!1);var y=n.nextToken,x=kt(n.parseFunction(),"environment");if(x.name!==l)throw new Ie("Mismatch: \\begin{"+l+"} matched by \\end{"+x.name+"}",y);return b}return{type:"environment",mode:n.mode,name:l,nameGroup:s}}});var e6=(e,t)=>{var n=e.font,a=t.withFont(n);return Vt(e.body,a)},t6=(e,t)=>{var n=e.font,a=t.withFont(n);return sn(e.body,a)},X4={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};Be({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=Du(t[0]),l=a;return l in X4&&(l=X4[l]),{type:"font",mode:n.mode,font:l.slice(1),body:s}},htmlBuilder:e6,mathmlBuilder:t6});Be({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,a=t[0];return{type:"mclass",mode:n.mode,mclass:n0(a),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:a}],isCharacterBox:Pa(a)}}});Be({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:a,breakOnTokenText:s}=e,{mode:l}=n,c=n.parseExpression(!0,s);return{type:"font",mode:l,font:"math"+a.slice(1),body:{type:"ordgroup",mode:n.mode,body:c}}},htmlBuilder:e6,mathmlBuilder:t6});var lA=(e,t)=>{var n=t.style,a=n.fracNum(),s=n.fracDen(),l;l=t.havingStyle(a);var c=Vt(e.numer,l,t);if(e.continued){var f=8.5/t.fontMetrics().ptPerEm,m=3.5/t.fontMetrics().ptPerEm;c.height=c.height<f?f:c.height,c.depth=c.depth<m?m:c.depth}l=t.havingStyle(s);var h=Vt(e.denom,l,t),p,b,y;e.hasBarLine?(e.barSize?(b=bn(e.barSize,t),p=al("frac-line",t,b)):p=al("frac-line",t),b=p.height,y=p.height):(p=null,b=0,y=t.fontMetrics().defaultRuleThickness);var x,k,N;n.size===ft.DISPLAY.size?(x=t.fontMetrics().num1,b>0?k=3*y:k=7*y,N=t.fontMetrics().denom1):(b>0?(x=t.fontMetrics().num2,k=y):(x=t.fontMetrics().num3,k=3*y),N=t.fontMetrics().denom2);var R;if(p){var _=t.fontMetrics().axisHeight;x-c.depth-(_+.5*b)<k&&(x+=k-(x-c.depth-(_+.5*b))),_-.5*b-(h.height-N)<k&&(N+=k-(_-.5*b-(h.height-N)));var I=-(_-.5*b);R=Gt({positionType:"individualShift",children:[{type:"elem",elem:h,shift:N},{type:"elem",elem:p,shift:I},{type:"elem",elem:c,shift:-x}]})}else{var C=x-c.depth-(h.height-N);C<k&&(x+=.5*(k-C),N+=.5*(k-C)),R=Gt({positionType:"individualShift",children:[{type:"elem",elem:h,shift:N},{type:"elem",elem:c,shift:-x}]})}l=t.havingStyle(n),R.height*=l.sizeMultiplier/t.sizeMultiplier,R.depth*=l.sizeMultiplier/t.sizeMultiplier;var $;n.size===ft.DISPLAY.size?$=t.fontMetrics().delim1:n.size===ft.SCRIPTSCRIPT.size?$=t.havingStyle(ft.SCRIPT).fontMetrics().delim2:$=t.fontMetrics().delim2;var D,M;return e.leftDelim==null?D=Ao(t,["mopen"]):D=Eh(e.leftDelim,$,!0,t.havingStyle(n),e.mode,["mopen"]),e.continued?M=Ce([]):e.rightDelim==null?M=Ao(t,["mclose"]):M=Eh(e.rightDelim,$,!0,t.havingStyle(n),e.mode,["mclose"]),Ce(["mord"].concat(l.sizingClasses(t)),[D,Ce(["mfrac"],[R]),M],t)},oA=(e,t)=>{var n=new Oe("mfrac",[sn(e.numer,t),sn(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var a=bn(e.barSize,t);n.setAttribute("linethickness",De(a))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var l=new Oe("mo",[new Ln(e.leftDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}if(s.push(n),e.rightDelim!=null){var c=new Oe("mo",[new Ln(e.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),s.push(c)}return mp(s)}return n},n6=(e,t)=>{if(!t)return e;var n={type:"styling",mode:e.mode,style:t,body:[e]};return n};Be({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=t[0],l=t[1],c,f=null,m=null;switch(a){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":c=!0;break;case"\\\\atopfrac":c=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":c=!1,f="(",m=")";break;case"\\\\bracefrac":c=!1,f="\\{",m="\\}";break;case"\\\\brackfrac":c=!1,f="[",m="]";break;default:throw new Error("Unrecognized genfrac command")}var h=a==="\\cfrac",p=null;return h||a.startsWith("\\d")?p="display":a.startsWith("\\t")&&(p="text"),n6({type:"genfrac",mode:n.mode,numer:s,denom:l,continued:h,hasBarLine:c,leftDelim:f,rightDelim:m,barSize:null},p)},htmlBuilder:lA,mathmlBuilder:oA});Be({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:a}=e,s;switch(n){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:s,token:a}}});var Z4=["display","text","script","scriptscript"],W4=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};Be({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:n}=e,a=t[4],s=t[5],l=Du(t[0]),c=l.type==="atom"&&l.family==="open"?W4(l.text):null,f=Du(t[1]),m=f.type==="atom"&&f.family==="close"?W4(f.text):null,h=kt(t[2],"size"),p,b=null;h.isBlank?p=!0:(b=h.value,p=b.number>0);var y=null,x=t[3];if(x.type==="ordgroup"){if(x.body.length>0){var k=kt(x.body[0],"textord");y=Z4[Number(k.text)]}}else x=kt(x,"textord"),y=Z4[Number(x.text)];return n6({type:"genfrac",mode:n.mode,numer:a,denom:s,continued:!1,hasBarLine:p,barSize:b,leftDelim:c,rightDelim:m},y)}});Be({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:a,token:s}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:kt(t[0],"size").value,token:s}}});Be({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=t[0],l=kt(t[1],"infix").size;if(!l)throw new Error("\\\\abovefrac expected size, but got "+String(l));var c=t[2],f=l.number>0;return{type:"genfrac",mode:n.mode,numer:s,denom:c,continued:!1,hasBarLine:f,barSize:l,leftDelim:null,rightDelim:null}}});var r6=(e,t)=>{var n=t.style,a,s;e.type==="supsub"?(a=e.sup?Vt(e.sup,t.havingStyle(n.sup()),t):Vt(e.sub,t.havingStyle(n.sub()),t),s=kt(e.base,"horizBrace")):s=kt(e,"horizBrace");var l=Vt(s.base,t.havingBaseStyle(ft.DISPLAY)),c=Ju(s,t),f;if(s.isOver?f=Gt({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.1},{type:"elem",elem:c,wrapperClasses:["svg-align"]}]}):f=Gt({positionType:"bottom",positionData:l.depth+.1+c.height,children:[{type:"elem",elem:c,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:l}]}),a){var m=Ce(["minner",s.isOver?"mover":"munder"],[f],t);s.isOver?f=Gt({positionType:"firstBaseline",children:[{type:"elem",elem:m},{type:"kern",size:.2},{type:"elem",elem:a}]}):f=Gt({positionType:"bottom",positionData:m.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:m}]})}return Ce(["minner",s.isOver?"mover":"munder"],[f],t)},cA=(e,t)=>{var n=Qu(e.label);return new Oe(e.isOver?"mover":"munder",[sn(e.base,t),n])};Be({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:a}=e;return{type:"horizBrace",mode:n.mode,label:a,isOver:a.includes("\\over"),base:t[0]}},htmlBuilder:r6,mathmlBuilder:cA});Be({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=t[1],s=kt(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:n.mode,href:s,body:jn(a)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=$n(e.body,t,!1);return SR(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Ai(e.body,t);return n instanceof Oe||(n=new Oe("mrow",[n])),n.setAttribute("href",e.href),n}});Be({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=kt(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:a}))return n.formatUnsupportedCmd("\\url");for(var s=[],l=0;l<a.length;l++){var c=a[l];c==="~"&&(c="\\textasciitilde"),s.push({type:"textord",mode:"text",text:c})}var f={type:"text",mode:n.mode,font:"\\texttt",body:s};return{type:"href",mode:n.mode,href:a,body:jn(f)}}});Be({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:jn(t[0])}},htmlBuilder(e,t){var n=$n(e.body,t.withFont(""),!1);return Ga(n)},mathmlBuilder(e,t){return new Oe("mrow",Br(e.body,t.withFont("")))}});Be({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:a,token:s}=e,l=kt(t[0],"raw").string,c=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var f,m={};switch(a){case"\\htmlClass":m.class=l,f={command:"\\htmlClass",class:l};break;case"\\htmlId":m.id=l,f={command:"\\htmlId",id:l};break;case"\\htmlStyle":m.style=l,f={command:"\\htmlStyle",style:l};break;case"\\htmlData":{for(var h=l.split(","),p=0;p<h.length;p++){var b=h[p],y=b.indexOf("=");if(y<0)throw new Ie("\\htmlData key/value '"+b+"' missing equals sign");var x=b.slice(0,y),k=b.slice(y+1);m["data-"+x.trim()]=k}f={command:"\\htmlData",attributes:m};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(f)?{type:"html",mode:n.mode,attributes:m,body:jn(c)}:n.formatUnsupportedCmd(a)},htmlBuilder:(e,t)=>{var n=$n(e.body,t,!1),a=["enclosing"];e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/));var s=Ce(a,n,t);for(var l in e.attributes)l!=="class"&&e.attributes.hasOwnProperty(l)&&s.setAttribute(l,e.attributes[l]);return s},mathmlBuilder:(e,t)=>Ai(e.body,t)});Be({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:jn(t[0]),mathml:jn(t[1])}},htmlBuilder:(e,t)=>{var n=$n(e.html,t,!1);return Ga(n)},mathmlBuilder:(e,t)=>Ai(e.mathml,t)});var Qf=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new Ie("Invalid size: '"+t+"' in \\includegraphics");var a={number:+(n[1]+n[2]),unit:n[3]};if(!y5(a))throw new Ie("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a};Be({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:a}=e,s={number:0,unit:"em"},l={number:.9,unit:"em"},c={number:0,unit:"em"},f="";if(n[0])for(var m=kt(n[0],"raw").string,h=m.split(","),p=0;p<h.length;p++){var b=h[p].split("=");if(b.length===2){var y=b[1].trim();switch(b[0].trim()){case"alt":f=y;break;case"width":s=Qf(y);break;case"height":l=Qf(y);break;case"totalheight":c=Qf(y);break;default:throw new Ie("Invalid key: '"+b[0]+"' in \\includegraphics.")}}}var x=kt(t[0],"url").url;return f===""&&(f=x,f=f.replace(/^.*[\\/]/,""),f=f.substring(0,f.lastIndexOf("."))),a.settings.isTrusted({command:"\\includegraphics",url:x})?{type:"includegraphics",mode:a.mode,alt:f,width:s,height:l,totalheight:c,src:x}:a.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=bn(e.height,t),a=0;e.totalheight.number>0&&(a=bn(e.totalheight,t)-n);var s=0;e.width.number>0&&(s=bn(e.width,t));var l={height:De(n+a)};s>0&&(l.width=De(s)),a>0&&(l.verticalAlign=De(-a));var c=new dR(e.src,e.alt,l);return c.height=n,c.depth=a,c},mathmlBuilder:(e,t)=>{var n=new Oe("mglyph",[]);n.setAttribute("alt",e.alt);var a=bn(e.height,t),s=0;if(e.totalheight.number>0&&(s=bn(e.totalheight,t)-a,n.setAttribute("valign",De(-s))),n.setAttribute("height",De(a+s)),e.width.number>0){var l=bn(e.width,t);n.setAttribute("width",De(l))}return n.setAttribute("src",e.src),n}});Be({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:a}=e,s=kt(t[0],"size");if(n.settings.strict){var l=a[1]==="m",c=s.value.unit==="mu";l?(c||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, "+("not "+s.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):c&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:s.value}},htmlBuilder(e,t){return N5(e.dimension,t)},mathmlBuilder(e,t){var n=bn(e.dimension,t);return new M5(n)}});Be({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=t[0];return{type:"lap",mode:n.mode,alignment:a.slice(5),body:s}},htmlBuilder:(e,t)=>{var n;e.alignment==="clap"?(n=Ce([],[Vt(e.body,t)]),n=Ce(["inner"],[n],t)):n=Ce(["inner"],[Vt(e.body,t)]);var a=Ce(["fix"],[]),s=Ce([e.alignment],[n,a],t),l=Ce(["strut"]);return l.style.height=De(s.height+s.depth),s.depth&&(l.style.verticalAlign=De(-s.depth)),s.children.unshift(l),s=Ce(["thinbox"],[s],t),Ce(["mord","vbox"],[s],t)},mathmlBuilder:(e,t)=>{var n=new Oe("mpadded",[sn(e.body,t)]);if(e.alignment!=="rlap"){var a=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",a+"width")}return n.setAttribute("width","0px"),n}});Be({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:a}=e,s=a.mode;a.switchMode("math");var l=n==="\\("?"\\)":"$",c=a.parseExpression(!1,l);return a.expect(l),a.switchMode(s),{type:"styling",mode:a.mode,style:"text",resetFont:!0,body:c}}});Be({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Ie("Mismatched "+e.funcName)}});var Q4=(e,t)=>{switch(t.style.size){case ft.DISPLAY.size:return e.display;case ft.TEXT.size:return e.text;case ft.SCRIPT.size:return e.script;case ft.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Be({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:jn(t[0]),text:jn(t[1]),script:jn(t[2]),scriptscript:jn(t[3])}},htmlBuilder:(e,t)=>{var n=Q4(e,t),a=$n(n,t,!1);return Ga(a)},mathmlBuilder:(e,t)=>{var n=Q4(e,t);return Ai(n,t)}});var a6=(e,t,n,a,s,l,c)=>{e=Ce([],[e]);var f=n&&Pa(n),m,h;if(t){var p=Vt(t,a.havingStyle(s.sup()),a);h={elem:p,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-p.depth)}}if(n){var b=Vt(n,a.havingStyle(s.sub()),a);m={elem:b,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-b.height)}}var y;if(h&&m){var x=a.fontMetrics().bigOpSpacing5+m.elem.height+m.elem.depth+m.kern+e.depth+c;y=Gt({positionType:"bottom",positionData:x,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:m.elem,marginLeft:De(-l)},{type:"kern",size:m.kern},{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:De(l)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else if(m){var k=e.height-c;y=Gt({positionType:"top",positionData:k,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:m.elem,marginLeft:De(-l)},{type:"kern",size:m.kern},{type:"elem",elem:e}]})}else if(h){var N=e.depth+c;y=Gt({positionType:"bottom",positionData:N,children:[{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:De(l)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else return e;var R=[y];if(m&&l!==0&&!f){var C=Ce(["mspace"],[],a);C.style.marginRight=De(l),R.unshift(C)}return Ce(["mop","op-limits"],R,a)},i6=new Set(["\\smallint"]),fl=(e,t)=>{var n,a,s=!1,l;e.type==="supsub"?(n=e.sup,a=e.sub,l=kt(e.base,"op"),s=!0):l=kt(e,"op");var c=t.style,f=!1;c.size===ft.DISPLAY.size&&l.symbol&&!i6.has(l.name)&&(f=!0);var m,h;if(l.symbol){var p=f?"Size2-Regular":"Size1-Regular",b="";if((l.name==="\\oiint"||l.name==="\\oiiint")&&(b=l.name.slice(1),l.name=b==="oiint"?"\\iint":"\\iiint"),m=or(l.name,p,"math",t,["mop","op-symbol",f?"large-op":"small-op"]),h=m.italic,b.length>0){var y=R5(b+"Size"+(f?"2":"1"),t);m=Gt({positionType:"individualShift",children:[{type:"elem",elem:m,shift:0},{type:"elem",elem:y,shift:f?.08:0}]}),l.name="\\"+b,m.classes.unshift("mop"),m.italic=h}}else if(l.body){var x=$n(l.body,t,!0);x.length===1&&x[0]instanceof Lr?(m=x[0],m.classes[0]="mop"):m=Ce(["mop"],x,t)}else{for(var k=[],N=1;N<l.name.length;N++)k.push(dp(l.name[N],l.mode,t));m=Ce(["mop"],k,t)}var R=0,C=0;if((m instanceof Lr||l.name==="\\oiint"||l.name==="\\oiiint")&&!l.suppressBaseShift){var _;R=(m.height-m.depth)/2-t.fontMetrics().axisHeight,C=(_=m.italic)!=null?_:0}return s?a6(m,n,a,t,c,C,R):(R&&(m.style.position="relative",m.style.top=De(R)),m)},Bo=(e,t)=>{var n;if(e.symbol)n=new Oe("mo",[Wr(e.name,e.mode)]),i6.has(e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new Oe("mo",Br(e.body,t));else{n=new Oe("mi",[new Ln(e.name.slice(1))]);var a=new Oe("mo",[Wr("","text")]);e.parentIsSupSub?n=new Oe("mrow",[n,a]):n=I5([n,a])}return n},uA={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Be({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=a;return s.length===1&&(s=uA[s]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:fl,mathmlBuilder:Bo});Be({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,a=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:jn(a)}},htmlBuilder:fl,mathmlBuilder:Bo});var dA={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Be({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:fl,mathmlBuilder:Bo});Be({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:fl,mathmlBuilder:Bo});Be({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,a=n;return a.length===1&&(a=dA[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:fl,mathmlBuilder:Bo});var s6=(e,t)=>{var n,a,s=!1,l;e.type==="supsub"?(n=e.sup,a=e.sub,l=kt(e.base,"operatorname"),s=!0):l=kt(e,"operatorname");var c;if(l.body.length>0){for(var f=l.body.map(b=>{var y="text"in b?b.text:void 0;return typeof y=="string"?{type:"textord",mode:b.mode,text:y}:b}),m=$n(f,t.withFont("mathrm"),!0),h=0;h<m.length;h++){var p=m[h];p instanceof Lr&&(p.text=p.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}c=Ce(["mop"],m,t)}else c=Ce(["mop"],[],t);return s?a6(c,n,a,t,t.style,0,0):c},fA=(e,t)=>{for(var n=Br(e.body,t.withFont("mathrm")),a=!0,s=0;s<n.length;s++){var l=n[s];if(!(l instanceof M5))if(l instanceof Oe)switch(l.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var c=l.children[0];l.children.length===1&&c instanceof Ln?c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):a=!1;break}default:a=!1}else a=!1}if(a){var f=n.map(p=>p.toText()).join("");n=[new Ln(f)]}var m=new Oe("mi",n);m.setAttribute("mathvariant","normal");var h=new Oe("mo",[Wr("","text")]);return e.parentIsSupSub?new Oe("mrow",[m,h]):I5([m,h])};Be({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=t[0];return{type:"operatorname",mode:n.mode,body:jn(s),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:s6,mathmlBuilder:fA});z("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");us({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Ga($n(e.body,t,!1)):Ce(["mord"],$n(e.body,t,!0),t)},mathmlBuilder(e,t){return Ai(e.body,t,!0)}});Be({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,a=t[0];return{type:"overline",mode:n.mode,body:a}},htmlBuilder(e,t){var n=Vt(e.body,t.havingCrampedStyle()),a=al("overline-line",t),s=t.fontMetrics().defaultRuleThickness,l=Gt({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*s},{type:"elem",elem:a},{type:"kern",size:s}]});return Ce(["mord","overline"],[l],t)},mathmlBuilder(e,t){var n=new Oe("mo",[new Ln("‾")]);n.setAttribute("stretchy","true");var a=new Oe("mover",[sn(e.body,t),n]);return a.setAttribute("accent","true"),a}});Be({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=t[0];return{type:"phantom",mode:n.mode,body:jn(a)}},htmlBuilder:(e,t)=>{var n=$n(e.body,t.withPhantom(),!1);return Ga(n)},mathmlBuilder:(e,t)=>{var n=Br(e.body,t);return new Oe("mphantom",n)}});z("\\hphantom","\\smash{\\phantom{#1}}");Be({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=t[0];return{type:"vphantom",mode:n.mode,body:a}},htmlBuilder:(e,t)=>{var n=Ce(["inner"],[Vt(e.body,t.withPhantom())]),a=Ce(["fix"],[]);return Ce(["mord","rlap"],[n,a],t)},mathmlBuilder:(e,t)=>{var n=Br(jn(e.body),t),a=new Oe("mphantom",n),s=new Oe("mpadded",[a]);return s.setAttribute("width","0px"),s}});Be({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,a=kt(t[0],"size").value,s=t[1];return{type:"raisebox",mode:n.mode,dy:a,body:s}},htmlBuilder(e,t){var n=Vt(e.body,t),a=bn(e.dy,t);return Gt({positionType:"shift",positionData:-a,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new Oe("mpadded",[sn(e.body,t)]),a=e.dy.number+e.dy.unit;return n.setAttribute("voffset",a),n}});Be({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});Be({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){var{parser:a}=e,s=n[0],l=kt(t[0],"size"),c=kt(t[1],"size");return{type:"rule",mode:a.mode,shift:s&&kt(s,"size").value,width:l.value,height:c.value}},htmlBuilder(e,t){var n=Ce(["mord","rule"],[],t),a=bn(e.width,t),s=bn(e.height,t),l=e.shift?bn(e.shift,t):0;return n.style.borderRightWidth=De(a),n.style.borderTopWidth=De(s),n.style.bottom=De(l),n.width=a,n.height=s+l,n.depth=-l,n.maxFontSize=s*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=bn(e.width,t),a=bn(e.height,t),s=e.shift?bn(e.shift,t):0,l=t.color&&t.getColor()||"black",c=new Oe("mspace");c.setAttribute("mathbackground",l),c.setAttribute("width",De(n)),c.setAttribute("height",De(a));var f=new Oe("mpadded",[c]);return s>=0?f.setAttribute("height",De(s)):(f.setAttribute("height",De(s)),f.setAttribute("depth",De(-s))),f.setAttribute("voffset",De(s)),f}});function l6(e,t,n){for(var a=$n(e,t,!1),s=t.sizeMultiplier/n.sizeMultiplier,l=0;l<a.length;l++){var c=a[l].classes.indexOf("sizing");c<0?Array.prototype.push.apply(a[l].classes,t.sizingClasses(n)):a[l].classes[c+1]==="reset-size"+t.size&&(a[l].classes[c+1]="reset-size"+n.size),a[l].height*=s,a[l].depth*=s}return Ga(a)}var J4=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],mA=(e,t)=>{var n=t.havingSize(e.size);return l6(e.body,n,t)};Be({type:"sizing",names:J4,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:a,parser:s}=e,l=s.parseExpression(!1,n);return{type:"sizing",mode:s.mode,size:J4.indexOf(a)+1,body:l}},htmlBuilder:mA,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),a=Br(e.body,n),s=new Oe("mstyle",a);return s.setAttribute("mathsize",De(n.sizeMultiplier)),s}});Be({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:a}=e,s=!1,l=!1,c=n[0]&&kt(n[0],"ordgroup");if(c)for(var f,m=0;m<c.body.length;++m){var h=c.body[m];if(f=e0(h).text,f==="t")s=!0;else if(f==="b")l=!0;else{s=!1,l=!1;break}}else s=!0,l=!0;var p=t[0];return{type:"smash",mode:a.mode,body:p,smashHeight:s,smashDepth:l}},htmlBuilder:(e,t)=>{var n=Ce([],[Vt(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return Ce(["mord","smash"],[n],t);if(n.children)for(var a=0;a<n.children.length;a++)e.smashHeight&&(n.children[a].height=0),e.smashDepth&&(n.children[a].depth=0);var s=Gt({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return Ce(["mord"],[s],t)},mathmlBuilder:(e,t)=>{var n=new Oe("mpadded",[sn(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});Be({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:a}=e,s=n[0],l=t[0];return{type:"sqrt",mode:a.mode,body:l,index:s}},htmlBuilder(e,t){var n=Vt(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=il(n,t);var a=t.fontMetrics(),s=a.defaultRuleThickness,l=s;t.style.id<ft.TEXT.id&&(l=t.fontMetrics().xHeight);var c=s+l/4,f=n.height+n.depth+c+s,{span:m,ruleWidth:h,advanceWidth:p}=JR(f,t),b=m.height-h;b>n.height+n.depth+c&&(c=(c+b-n.height-n.depth)/2);var y=m.height-n.height-c-h;n.style.paddingLeft=De(p);var x=Gt({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+y)},{type:"elem",elem:m},{type:"kern",size:h}]});if(e.index){var k=t.havingStyle(ft.SCRIPTSCRIPT),N=Vt(e.index,k,t),R=.6*(x.height-x.depth),C=Gt({positionType:"shift",positionData:-R,children:[{type:"elem",elem:N}]}),_=Ce(["root"],[C]);return Ce(["mord","sqrt"],[_,x],t)}else return Ce(["mord","sqrt"],[x],t)},mathmlBuilder(e,t){var{body:n,index:a}=e;return a?new Oe("mroot",[sn(n,t),sn(a,t)]):new Oe("msqrt",[sn(n,t)])}});var Th={display:ft.DISPLAY,text:ft.TEXT,script:ft.SCRIPT,scriptscript:ft.SCRIPTSCRIPT};function hA(e){return e in Th}Be({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:a,parser:s}=e,l=s.parseExpression(!0,n),c=a.slice(1,a.length-5);if(!hA(c))throw new Error("Unknown style: "+c);return{type:"styling",mode:s.mode,style:c,body:l}},htmlBuilder(e,t){var n=Th[e.style],a=t.havingStyle(n);return e.resetFont&&(a=a.withFont("")),l6(e.body,a,t)},mathmlBuilder(e,t){var n=Th[e.style],a=t.havingStyle(n);e.resetFont&&(a=a.withFont(""));var s=Br(e.body,a),l=new Oe("mstyle",s),c={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},f=c[e.style];return l.setAttribute("scriptlevel",f[0]),l.setAttribute("displaystyle",f[1]),l}});var pA=function(t,n){var a=t.base;if(a)if(a.type==="op"){var s=a.limits&&(n.style.size===ft.DISPLAY.size||a.alwaysHandleSupSub);return s?fl:null}else if(a.type==="operatorname"){var l=a.alwaysHandleSupSub&&(n.style.size===ft.DISPLAY.size||a.limits);return l?s6:null}else{if(a.type==="accent")return Pa(a.base)?pp:null;if(a.type==="horizBrace"){var c=!t.sub;return c===a.isOver?r6:null}else return null}else return null};us({type:"supsub",htmlBuilder(e,t){var n=pA(e,t);if(n)return n(e,t);var{base:a,sup:s,sub:l}=e,c=Vt(a,t),f,m,h=t.fontMetrics(),p=0,b=0,y=a&&Pa(a);if(s){var x=t.havingStyle(t.style.sup());f=Vt(s,x,t),y||(p=c.height-x.fontMetrics().supDrop*x.sizeMultiplier/t.sizeMultiplier)}if(l){var k=t.havingStyle(t.style.sub());m=Vt(l,k,t),y||(b=c.depth+k.fontMetrics().subDrop*k.sizeMultiplier/t.sizeMultiplier)}var N;t.style===ft.DISPLAY?N=h.sup1:t.style.cramped?N=h.sup3:N=h.sup2;var R=t.sizeMultiplier,C=De(.5/h.ptPerEm/R),_=null;if(m){var I=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(c instanceof Lr||I){var $;_=De(-(($=c.italic)!=null?$:0))}}var D;if(f&&m){p=Math.max(p,N,f.depth+.25*h.xHeight),b=Math.max(b,h.sub2);var M=h.defaultRuleThickness,B=4*M;if(p-f.depth-(m.height-b)<B){b=B-(p-f.depth)+m.height;var Y=.8*h.xHeight-(p-f.depth);Y>0&&(p+=Y,b-=Y)}var G=[{type:"elem",elem:m,shift:b,marginRight:C,marginLeft:_},{type:"elem",elem:f,shift:-p,marginRight:C}];D=Gt({positionType:"individualShift",children:G})}else if(m){b=Math.max(b,h.sub1,m.height-.8*h.xHeight);var j=[{type:"elem",elem:m,marginLeft:_,marginRight:C}];D=Gt({positionType:"shift",positionData:b,children:j})}else if(f)p=Math.max(p,N,f.depth+.25*h.xHeight),D=Gt({positionType:"shift",positionData:-p,children:[{type:"elem",elem:f,marginRight:C}]});else throw new Error("supsub must have either sup or sub.");var F=xh(c,"right")||"mord";return Ce([F],[c,Ce(["msupsub"],[D])],t)},mathmlBuilder(e,t){var n=!1,a,s;e.base&&e.base.type==="horizBrace"&&(s=!!e.sup,s===e.base.isOver&&(n=!0,a=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var l=[sn(e.base,t)];e.sub&&l.push(sn(e.sub,t)),e.sup&&l.push(sn(e.sup,t));var c;if(n)c=a?"mover":"munder";else if(e.sub)if(e.sup){var h=e.base;h&&h.type==="op"&&h.limits&&t.style===ft.DISPLAY||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(t.style===ft.DISPLAY||h.limits)?c="munderover":c="msubsup"}else{var m=e.base;m&&m.type==="op"&&m.limits&&(t.style===ft.DISPLAY||m.alwaysHandleSupSub)||m&&m.type==="operatorname"&&m.alwaysHandleSupSub&&(m.limits||t.style===ft.DISPLAY)?c="munder":c="msub"}else{var f=e.base;f&&f.type==="op"&&f.limits&&(t.style===ft.DISPLAY||f.alwaysHandleSupSub)||f&&f.type==="operatorname"&&f.alwaysHandleSupSub&&(f.limits||t.style===ft.DISPLAY)?c="mover":c="msup"}return new Oe(c,l)}});us({type:"atom",htmlBuilder(e,t){return dp(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new Oe("mo",[Wr(e.text,e.mode)]);if(e.family==="bin"){var a=hp(e,t);a==="bold-italic"&&n.setAttribute("mathvariant",a)}else e.family==="punct"?n.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&n.setAttribute("stretchy","false");return n}});var o6={mi:"italic",mn:"normal",mtext:"normal"};us({type:"mathord",htmlBuilder(e,t){return Wu(e,t,"mathord")},mathmlBuilder(e,t){var n=new Oe("mi",[Wr(e.text,e.mode,t)]),a=hp(e,t)||"italic";return a!==o6[n.type]&&n.setAttribute("mathvariant",a),n}});us({type:"textord",htmlBuilder(e,t){return Wu(e,t,"textord")},mathmlBuilder(e,t){var n=Wr(e.text,e.mode,t),a=hp(e,t)||"normal",s;return e.mode==="text"?s=new Oe("mtext",[n]):/[0-9]/.test(e.text)?s=new Oe("mn",[n]):e.text==="\\prime"?s=new Oe("mo",[n]):s=new Oe("mi",[n]),a!==o6[s.type]&&s.setAttribute("mathvariant",a),s}});var Jf={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},em={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};us({type:"spacing",htmlBuilder(e,t){if(em.hasOwnProperty(e.text)){var n=em[e.text].className||"";if(e.mode==="text"){var a=Wu(e,t,"textord");return a.classes.push(n),a}else return Ce(["mspace",n],[dp(e.text,e.mode,t)],t)}else{if(Jf.hasOwnProperty(e.text))return Ce(["mspace",Jf[e.text]],[],t);throw new Ie('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(em.hasOwnProperty(e.text))n=new Oe("mtext",[new Ln(" ")]);else{if(Jf.hasOwnProperty(e.text))return new Oe("mspace");throw new Ie('Unknown type of space "'+e.text+'"')}return n}});var ey=()=>{var e=new Oe("mtd",[]);return e.setAttribute("width","50%"),e};us({type:"tag",mathmlBuilder(e,t){var n=new Oe("mtable",[new Oe("mtr",[ey(),new Oe("mtd",[Ai(e.body,t)]),ey(),new Oe("mtd",[Ai(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var ty={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},ny={"\\textbf":"textbf","\\textmd":"textmd"},gA={"\\textit":"textit","\\textup":"textup"},ry=(e,t)=>{var n=e.font;if(n){if(ty[n])return t.withTextFontFamily(ty[n]);if(ny[n])return t.withTextFontWeight(ny[n]);if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(gA[n])};Be({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:a}=e,s=t[0];return{type:"text",mode:n.mode,body:jn(s),font:a}},htmlBuilder(e,t){var n=ry(e,t),a=$n(e.body,n,!0);return Ce(["mord","text"],a,n)},mathmlBuilder(e,t){var n=ry(e,t);return Ai(e.body,n)}});Be({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Vt(e.body,t),a=al("underline-line",t),s=t.fontMetrics().defaultRuleThickness,l=Gt({positionType:"top",positionData:n.height,children:[{type:"kern",size:s},{type:"elem",elem:a},{type:"kern",size:3*s},{type:"elem",elem:n}]});return Ce(["mord","underline"],[l],t)},mathmlBuilder(e,t){var n=new Oe("mo",[new Ln("‾")]);n.setAttribute("stretchy","true");var a=new Oe("munder",[sn(e.body,t),n]);return a.setAttribute("accentunder","true"),a}});Be({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Vt(e.body,t),a=t.fontMetrics().axisHeight,s=.5*(n.height-a-(n.depth+a));return Gt({positionType:"shift",positionData:s,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new Oe("mpadded",[sn(e.body,t)],["vcenter"]);return new Oe("mrow",[n])}});Be({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Ie("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=ay(e),a=[],s=t.havingStyle(t.style.text()),l=0;l<n.length;l++){var c=n[l];c==="~"&&(c="\\textasciitilde"),a.push(or(c,"Typewriter-Regular",e.mode,s,["mord","texttt"]))}return Ce(["mord","text"].concat(s.sizingClasses(t)),T5(a),s)},mathmlBuilder(e,t){var n=new Ln(ay(e)),a=new Oe("mtext",[n]);return a.setAttribute("mathvariant","monospace"),a}});var ay=e=>e.body.replace(/ /g,e.star?"␣":" "),Ei=A5,c6=`[ \r
|
|
297
|
-
]`,bA="\\\\[a-zA-Z@]+",vA="\\\\[^\uD800-\uDFFF]",yA="("+bA+")"+c6+"*",xA=`\\\\(
|
|
298
|
-
|[ \r ]+
|
|
299
|
-
?)[ \r ]*`,Nh="[̀-ͯ]",wA=new RegExp(Nh+"+$"),SA="("+c6+"+)|"+(xA+"|")+"([!-\\[\\]-‧-豈-]"+(Nh+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Nh+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+yA)+("|"+vA+")");class iy{constructor(t,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=n,this.tokenRegex=new RegExp(SA,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,n){this.catcodes[t]=n}lex(){var t=this.input,n=this.tokenRegex.lastIndex;if(n===t.length)return new jr("EOF",new wr(this,n,n));var a=this.tokenRegex.exec(t);if(a===null||a.index!==n)throw new Ie("Unexpected character: '"+t[n]+"'",new jr(t[n],new wr(this,n,n+1)));var s=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[s]===14){var l=t.indexOf(`
|
|
300
|
-
`,this.tokenRegex.lastIndex);return l===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=l+1,this.lex()}return new jr(s,new wr(this,n,this.tokenRegex.lastIndex))}}class kA{constructor(t,n){t===void 0&&(t={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Ie("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var n in t)t.hasOwnProperty(n)&&(t[n]==null?delete this.current[n]:this.current[n]=t[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,n,a){if(a===void 0&&(a=!1),a){for(var s=0;s<this.undefStack.length;s++)delete this.undefStack[s][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=n)}else{var l=this.undefStack[this.undefStack.length-1];l&&!l.hasOwnProperty(t)&&(l[t]=this.current[t])}n==null?delete this.current[t]:this.current[t]=n}}var EA=Q5;z("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});z("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});z("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});z("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});z("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});z("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");z("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var sy={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};z("\\char",function(e){var t=e.popToken(),n,a=0;if(t.text==="'")n=8,t=e.popToken();else if(t.text==='"')n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")a=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new Ie("\\char` missing argument");a=t.text.charCodeAt(0)}else n=10;if(n){if(a=sy[t.text],a==null||a>=n)throw new Ie("Invalid base-"+n+" digit "+t.text);for(var s;(s=sy[e.future().text])!=null&&s<n;)a*=n,a+=s,e.popToken()}return"\\@char{"+a+"}"});var yp=(e,t,n,a)=>{var s=e.consumeArg().tokens;if(s.length!==1)throw new Ie("\\newcommand's first argument must be a macro name");var l=s[0].text,c=e.isDefined(l);if(c&&!t)throw new Ie("\\newcommand{"+l+"} attempting to redefine "+(l+"; use \\renewcommand"));if(!c&&!n)throw new Ie("\\renewcommand{"+l+"} when command "+l+" does not yet exist; use \\newcommand");var f=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var m="",h=e.expandNextToken();h.text!=="]"&&h.text!=="EOF";)m+=h.text,h=e.expandNextToken();if(!m.match(/^\s*[0-9]+\s*$/))throw new Ie("Invalid number of arguments: "+m);f=parseInt(m),s=e.consumeArg().tokens}return c&&a||e.macros.set(l,{tokens:s,numArgs:f}),""};z("\\newcommand",e=>yp(e,!1,!0,!1));z("\\renewcommand",e=>yp(e,!0,!1,!1));z("\\providecommand",e=>yp(e,!0,!0,!0));z("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});z("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});z("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Ei[n],fn.math[n],fn.text[n]),""});z("\\bgroup","{");z("\\egroup","}");z("~","\\nobreakspace");z("\\lq","`");z("\\rq","'");z("\\aa","\\r a");z("\\AA","\\r A");z("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");z("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");z("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");z("ℬ","\\mathscr{B}");z("ℰ","\\mathscr{E}");z("ℱ","\\mathscr{F}");z("ℋ","\\mathscr{H}");z("ℐ","\\mathscr{I}");z("ℒ","\\mathscr{L}");z("ℳ","\\mathscr{M}");z("ℛ","\\mathscr{R}");z("ℭ","\\mathfrak{C}");z("ℌ","\\mathfrak{H}");z("ℨ","\\mathfrak{Z}");z("\\Bbbk","\\Bbb{k}");z("\\llap","\\mathllap{\\textrm{#1}}");z("\\rlap","\\mathrlap{\\textrm{#1}}");z("\\clap","\\mathclap{\\textrm{#1}}");z("\\mathstrut","\\vphantom{(}");z("\\underbar","\\underline{\\text{#1}}");z("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');z("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");z("\\ne","\\neq");z("≠","\\neq");z("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");z("∉","\\notin");z("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");z("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");z("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");z("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");z("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");z("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");z("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");z("⟂","\\perp");z("‼","\\mathclose{!\\mkern-0.8mu!}");z("∌","\\notni");z("⌜","\\ulcorner");z("⌝","\\urcorner");z("⌞","\\llcorner");z("⌟","\\lrcorner");z("©","\\copyright");z("®","\\textregistered");z("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');z("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');z("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');z("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');z("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");z("⋮","\\vdots");z("\\varGamma","\\mathit{\\Gamma}");z("\\varDelta","\\mathit{\\Delta}");z("\\varTheta","\\mathit{\\Theta}");z("\\varLambda","\\mathit{\\Lambda}");z("\\varXi","\\mathit{\\Xi}");z("\\varPi","\\mathit{\\Pi}");z("\\varSigma","\\mathit{\\Sigma}");z("\\varUpsilon","\\mathit{\\Upsilon}");z("\\varPhi","\\mathit{\\Phi}");z("\\varPsi","\\mathit{\\Psi}");z("\\varOmega","\\mathit{\\Omega}");z("\\substack","\\begin{subarray}{c}#1\\end{subarray}");z("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");z("\\boxed","\\fbox{$\\displaystyle{#1}$}");z("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");z("\\implies","\\DOTSB\\;\\Longrightarrow\\;");z("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");z("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");z("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var ly={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},TA=new Set(["bin","rel"]);z("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in ly?t=ly[n]:(n.slice(0,4)==="\\not"||n in fn.math&&TA.has(fn.math[n].group))&&(t="\\dotsb"),t});var xp={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};z("\\dotso",function(e){var t=e.future().text;return t in xp?"\\ldots\\,":"\\ldots"});z("\\dotsc",function(e){var t=e.future().text;return t in xp&&t!==","?"\\ldots\\,":"\\ldots"});z("\\cdots",function(e){var t=e.future().text;return t in xp?"\\@cdots\\,":"\\@cdots"});z("\\dotsb","\\cdots");z("\\dotsm","\\cdots");z("\\dotsi","\\!\\cdots");z("\\dotsx","\\ldots\\,");z("\\DOTSI","\\relax");z("\\DOTSB","\\relax");z("\\DOTSX","\\relax");z("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");z("\\,","\\tmspace+{3mu}{.1667em}");z("\\thinspace","\\,");z("\\>","\\mskip{4mu}");z("\\:","\\tmspace+{4mu}{.2222em}");z("\\medspace","\\:");z("\\;","\\tmspace+{5mu}{.2777em}");z("\\thickspace","\\;");z("\\!","\\tmspace-{3mu}{.1667em}");z("\\negthinspace","\\!");z("\\negmedspace","\\tmspace-{4mu}{.2222em}");z("\\negthickspace","\\tmspace-{5mu}{.277em}");z("\\enspace","\\kern.5em ");z("\\enskip","\\hskip.5em\\relax");z("\\quad","\\hskip1em\\relax");z("\\qquad","\\hskip2em\\relax");z("\\tag","\\@ifstar\\tag@literal\\tag@paren");z("\\tag@paren","\\tag@literal{({#1})}");z("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Ie("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});z("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");z("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");z("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");z("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");z("\\newline","\\\\\\relax");z("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var u6=De(da["Main-Regular"][84][1]-.7*da["Main-Regular"][65][1]);z("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+u6+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");z("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+u6+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");z("\\hspace","\\@ifstar\\@hspacer\\@hspace");z("\\@hspace","\\hskip #1\\relax");z("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");z("\\ordinarycolon",":");z("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");z("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');z("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');z("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');z("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');z("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');z("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');z("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');z("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');z("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');z("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');z("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');z("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');z("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');z("∷","\\dblcolon");z("∹","\\eqcolon");z("≔","\\coloneqq");z("≕","\\eqqcolon");z("⩴","\\Coloneqq");z("\\ratio","\\vcentcolon");z("\\coloncolon","\\dblcolon");z("\\colonequals","\\coloneqq");z("\\coloncolonequals","\\Coloneqq");z("\\equalscolon","\\eqqcolon");z("\\equalscoloncolon","\\Eqqcolon");z("\\colonminus","\\coloneq");z("\\coloncolonminus","\\Coloneq");z("\\minuscolon","\\eqcolon");z("\\minuscoloncolon","\\Eqcolon");z("\\coloncolonapprox","\\Colonapprox");z("\\coloncolonsim","\\Colonsim");z("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");z("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");z("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");z("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");z("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");z("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");z("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");z("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");z("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");z("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");z("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");z("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");z("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");z("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");z("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");z("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");z("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");z("\\nleqq","\\html@mathml{\\@nleqq}{≰}");z("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");z("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");z("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");z("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");z("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");z("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");z("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");z("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");z("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");z("\\imath","\\html@mathml{\\@imath}{ı}");z("\\jmath","\\html@mathml{\\@jmath}{ȷ}");z("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");z("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");z("⟦","\\llbracket");z("⟧","\\rrbracket");z("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");z("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");z("⦃","\\lBrace");z("⦄","\\rBrace");z("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");z("⦵","\\minuso");z("\\darr","\\downarrow");z("\\dArr","\\Downarrow");z("\\Darr","\\Downarrow");z("\\lang","\\langle");z("\\rang","\\rangle");z("\\uarr","\\uparrow");z("\\uArr","\\Uparrow");z("\\Uarr","\\Uparrow");z("\\N","\\mathbb{N}");z("\\R","\\mathbb{R}");z("\\Z","\\mathbb{Z}");z("\\alef","\\aleph");z("\\alefsym","\\aleph");z("\\Alpha","\\mathrm{A}");z("\\Beta","\\mathrm{B}");z("\\bull","\\bullet");z("\\Chi","\\mathrm{X}");z("\\clubs","\\clubsuit");z("\\cnums","\\mathbb{C}");z("\\Complex","\\mathbb{C}");z("\\Dagger","\\ddagger");z("\\diamonds","\\diamondsuit");z("\\empty","\\emptyset");z("\\Epsilon","\\mathrm{E}");z("\\Eta","\\mathrm{H}");z("\\exist","\\exists");z("\\harr","\\leftrightarrow");z("\\hArr","\\Leftrightarrow");z("\\Harr","\\Leftrightarrow");z("\\hearts","\\heartsuit");z("\\image","\\Im");z("\\infin","\\infty");z("\\Iota","\\mathrm{I}");z("\\isin","\\in");z("\\Kappa","\\mathrm{K}");z("\\larr","\\leftarrow");z("\\lArr","\\Leftarrow");z("\\Larr","\\Leftarrow");z("\\lrarr","\\leftrightarrow");z("\\lrArr","\\Leftrightarrow");z("\\Lrarr","\\Leftrightarrow");z("\\Mu","\\mathrm{M}");z("\\natnums","\\mathbb{N}");z("\\Nu","\\mathrm{N}");z("\\Omicron","\\mathrm{O}");z("\\plusmn","\\pm");z("\\rarr","\\rightarrow");z("\\rArr","\\Rightarrow");z("\\Rarr","\\Rightarrow");z("\\real","\\Re");z("\\reals","\\mathbb{R}");z("\\Reals","\\mathbb{R}");z("\\Rho","\\mathrm{P}");z("\\sdot","\\cdot");z("\\sect","\\S");z("\\spades","\\spadesuit");z("\\sub","\\subset");z("\\sube","\\subseteq");z("\\supe","\\supseteq");z("\\Tau","\\mathrm{T}");z("\\thetasym","\\vartheta");z("\\weierp","\\wp");z("\\Zeta","\\mathrm{Z}");z("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");z("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");z("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");z("\\bra","\\mathinner{\\langle{#1}|}");z("\\ket","\\mathinner{|{#1}\\rangle}");z("\\braket","\\mathinner{\\langle{#1}\\rangle}");z("\\Bra","\\left\\langle#1\\right|");z("\\Ket","\\left|#1\\right\\rangle");var d6=e=>t=>{var n=t.consumeArg().tokens,a=t.consumeArg().tokens,s=t.consumeArg().tokens,l=t.consumeArg().tokens,c=t.macros.get("|"),f=t.macros.get("\\|");t.macros.beginGroup();var m=b=>y=>{e&&(y.macros.set("|",c),s.length&&y.macros.set("\\|",f));var x=b;if(!b&&s.length){var k=y.future();k.text==="|"&&(y.popToken(),x=!0)}return{tokens:x?s:a,numArgs:0}};t.macros.set("|",m(!1)),s.length&&t.macros.set("\\|",m(!0));var h=t.consumeArg().tokens,p=t.expandTokens([...l,...h,...n]);return t.macros.endGroup(),{tokens:p.reverse(),numArgs:0}};z("\\bra@ket",d6(!1));z("\\bra@set",d6(!0));z("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");z("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");z("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");z("\\angln","{\\angl n}");z("\\blue","\\textcolor{##6495ed}{#1}");z("\\orange","\\textcolor{##ffa500}{#1}");z("\\pink","\\textcolor{##ff00af}{#1}");z("\\red","\\textcolor{##df0030}{#1}");z("\\green","\\textcolor{##28ae7b}{#1}");z("\\gray","\\textcolor{gray}{#1}");z("\\purple","\\textcolor{##9d38bd}{#1}");z("\\blueA","\\textcolor{##ccfaff}{#1}");z("\\blueB","\\textcolor{##80f6ff}{#1}");z("\\blueC","\\textcolor{##63d9ea}{#1}");z("\\blueD","\\textcolor{##11accd}{#1}");z("\\blueE","\\textcolor{##0c7f99}{#1}");z("\\tealA","\\textcolor{##94fff5}{#1}");z("\\tealB","\\textcolor{##26edd5}{#1}");z("\\tealC","\\textcolor{##01d1c1}{#1}");z("\\tealD","\\textcolor{##01a995}{#1}");z("\\tealE","\\textcolor{##208170}{#1}");z("\\greenA","\\textcolor{##b6ffb0}{#1}");z("\\greenB","\\textcolor{##8af281}{#1}");z("\\greenC","\\textcolor{##74cf70}{#1}");z("\\greenD","\\textcolor{##1fab54}{#1}");z("\\greenE","\\textcolor{##0d923f}{#1}");z("\\goldA","\\textcolor{##ffd0a9}{#1}");z("\\goldB","\\textcolor{##ffbb71}{#1}");z("\\goldC","\\textcolor{##ff9c39}{#1}");z("\\goldD","\\textcolor{##e07d10}{#1}");z("\\goldE","\\textcolor{##a75a05}{#1}");z("\\redA","\\textcolor{##fca9a9}{#1}");z("\\redB","\\textcolor{##ff8482}{#1}");z("\\redC","\\textcolor{##f9685d}{#1}");z("\\redD","\\textcolor{##e84d39}{#1}");z("\\redE","\\textcolor{##bc2612}{#1}");z("\\maroonA","\\textcolor{##ffbde0}{#1}");z("\\maroonB","\\textcolor{##ff92c6}{#1}");z("\\maroonC","\\textcolor{##ed5fa6}{#1}");z("\\maroonD","\\textcolor{##ca337c}{#1}");z("\\maroonE","\\textcolor{##9e034e}{#1}");z("\\purpleA","\\textcolor{##ddd7ff}{#1}");z("\\purpleB","\\textcolor{##c6b9fc}{#1}");z("\\purpleC","\\textcolor{##aa87ff}{#1}");z("\\purpleD","\\textcolor{##7854ab}{#1}");z("\\purpleE","\\textcolor{##543b78}{#1}");z("\\mintA","\\textcolor{##f5f9e8}{#1}");z("\\mintB","\\textcolor{##edf2df}{#1}");z("\\mintC","\\textcolor{##e0e5cc}{#1}");z("\\grayA","\\textcolor{##f6f7f7}{#1}");z("\\grayB","\\textcolor{##f0f1f2}{#1}");z("\\grayC","\\textcolor{##e3e5e6}{#1}");z("\\grayD","\\textcolor{##d6d8da}{#1}");z("\\grayE","\\textcolor{##babec2}{#1}");z("\\grayF","\\textcolor{##888d93}{#1}");z("\\grayG","\\textcolor{##626569}{#1}");z("\\grayH","\\textcolor{##3b3e40}{#1}");z("\\grayI","\\textcolor{##21242c}{#1}");z("\\kaBlue","\\textcolor{##314453}{#1}");z("\\kaGreen","\\textcolor{##71B307}{#1}");var f6={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class NA{constructor(t,n,a){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=n,this.expansionCount=0,this.feed(t),this.macros=new kA(EA,n.macros),this.mode=a,this.stack=[]}feed(t){this.lexer=new iy(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var n,a,s;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:s,end:a}=this.consumeArg(["]"])}else({tokens:s,start:n,end:a}=this.consumeArg());return this.pushToken(new jr("EOF",a.loc)),this.pushTokens(s),new jr("",wr.range(n,a))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var n=[],a=t&&t.length>0;a||this.consumeSpaces();var s=this.future(),l,c=0,f=0;do{if(l=this.popToken(),n.push(l),l.text==="{")++c;else if(l.text==="}"){if(--c,c===-1)throw new Ie("Extra }",l)}else if(l.text==="EOF")throw new Ie("Unexpected end of input in a macro argument, expected '"+(t&&a?t[f]:"}")+"'",l);if(t&&a)if((c===0||c===1&&t[f]==="{")&&l.text===t[f]){if(++f,f===t.length){n.splice(-f,f);break}}else f=0}while(c!==0||a);return s.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:s,end:l}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new Ie("The length of delimiters doesn't match the number of args!");for(var a=n[0],s=0;s<a.length;s++){var l=this.popToken();if(a[s]!==l.text)throw new Ie("Use of the macro doesn't match its definition",l)}}for(var c=[],f=0;f<t;f++)c.push(this.consumeArg(n&&n[f+1]).tokens);return c}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new Ie("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var n=this.popToken(),a=n.text,s=n.noexpand?null:this._getExpansion(a);if(s==null||t&&s.unexpandable){if(t&&s==null&&a[0]==="\\"&&!this.isDefined(a))throw new Ie("Undefined control sequence: "+a);return this.pushToken(n),!1}this.countExpansion(1);var l=s.tokens,c=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){l=l.slice();for(var f=l.length-1;f>=0;--f){var m=l[f];if(m.text==="#"){if(f===0)throw new Ie("Incomplete placeholder at end of macro body",m);if(m=l[--f],m.text==="#")l.splice(f+1,1);else if(/^[1-9]$/.test(m.text))l.splice(f,2,...c[+m.text-1]);else throw new Ie("Not a valid argument number",m)}}}return this.pushTokens(l),l.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}}expandMacro(t){return this.macros.has(t)?this.expandTokens([new jr(t)]):void 0}expandTokens(t){var n=[],a=this.stack.length;for(this.pushTokens(t);this.stack.length>a;)if(this.expandOnce(!0)===!1){var s=this.stack.pop();s.treatAsRelax&&(s.noexpand=!1,s.treatAsRelax=!1),n.push(s)}return this.countExpansion(n.length),n}expandMacroAsText(t){var n=this.expandMacro(t);return n&&n.map(a=>a.text).join("")}_getExpansion(t){var n=this.macros.get(t);if(n==null)return n;if(t.length===1){var a=this.lexer.catcodes[t];if(a!=null&&a!==13)return}var s=typeof n=="function"?n(this):n;if(typeof s=="string"){var l=0;if(s.includes("#"))for(var c=s.replace(/##/g,"");c.includes("#"+(l+1));)++l;for(var f=new iy(s,this.settings),m=[],h=f.lex();h.text!=="EOF";)m.push(h),h=f.lex();m.reverse();var p={tokens:m,numArgs:l};return p}return s}isDefined(t){return this.macros.has(t)||Ei.hasOwnProperty(t)||fn.math.hasOwnProperty(t)||fn.text.hasOwnProperty(t)||f6.hasOwnProperty(t)}isExpandable(t){var n=this.macros.get(t);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:Ei.hasOwnProperty(t)&&!Ei[t].primitive}}var oy=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,hu=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),tm={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},cy={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class l0{constructor(t,n){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new NA(t,n,this.mode),this.settings=n,this.leftrightDepth=0,this.nextToken=null}expect(t,n){if(n===void 0&&(n=!0),this.fetch().text!==t)throw new Ie("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var n=this.nextToken;this.consume(),this.gullet.pushToken(new jr("}")),this.gullet.pushTokens(t);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,a}parseExpression(t,n){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var s=this.fetch();if(l0.endOfExpression.has(s.text)||n&&s.text===n||t&&Ei[s.text]&&Ei[s.text].infix)break;var l=this.parseAtom(n);if(l){if(l.type==="internal")continue}else break;a.push(l)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(t){for(var n=-1,a,s=0;s<t.length;s++){var l=t[s];if(l.type==="infix"){if(n!==-1)throw new Ie("only one infix operator per group",l.token);n=s,a=l.replaceWith}}if(n!==-1&&a){var c,f,m=t.slice(0,n),h=t.slice(n+1);m.length===1&&m[0].type==="ordgroup"?c=m[0]:c={type:"ordgroup",mode:this.mode,body:m},h.length===1&&h[0].type==="ordgroup"?f=h[0]:f={type:"ordgroup",mode:this.mode,body:h};var p;return a==="\\\\abovefrac"?p=this.callFunction(a,[c,t[n],f],[]):p=this.callFunction(a,[c,f],[]),[p]}else return t}handleSupSubscript(t){var n=this.fetch(),a=n.text;this.consume(),this.consumeSpaces();var s;do{var l;s=this.parseGroup(t)}while(((l=s)==null?void 0:l.type)==="internal");if(!s)throw new Ie("Expected group after '"+a+"'",n);return s}formatUnsupportedCmd(t){for(var n=[],a=0;a<t.length;a++)n.push({type:"textord",mode:"text",text:t[a]});var s={type:"text",mode:this.mode,body:n},l={type:"color",mode:this.mode,color:this.settings.errorColor,body:[s]};return l}parseAtom(t){var n=this.parseGroup("atom",t);if(n?.type==="internal"||this.mode==="text")return n;for(var a,s;;){this.consumeSpaces();var l=this.fetch();if(l.text==="\\limits"||l.text==="\\nolimits"){if(n&&n.type==="op"){var c=l.text==="\\limits";n.limits=c,n.alwaysHandleSupSub=!0}else if(n&&n.type==="operatorname")n.alwaysHandleSupSub&&(n.limits=l.text==="\\limits");else throw new Ie("Limit controls must follow a math operator",l);this.consume()}else if(l.text==="^"){if(a)throw new Ie("Double superscript",l);a=this.handleSupSubscript("superscript")}else if(l.text==="_"){if(s)throw new Ie("Double subscript",l);s=this.handleSupSubscript("subscript")}else if(l.text==="'"){if(a)throw new Ie("Double superscript",l);var f={type:"textord",mode:this.mode,text:"\\prime"},m=[f];for(this.consume();this.fetch().text==="'";)m.push(f),this.consume();this.fetch().text==="^"&&m.push(this.handleSupSubscript("superscript")),a={type:"ordgroup",mode:this.mode,body:m}}else if(hu[l.text]){var h=oy.test(l.text),p=[];for(p.push(new jr(hu[l.text])),this.consume();;){var b=this.fetch().text;if(!hu[b]||oy.test(b)!==h)break;p.unshift(new jr(hu[b])),this.consume()}var y=this.subparse(p);h?s={type:"ordgroup",mode:"math",body:y}:a={type:"ordgroup",mode:"math",body:y}}else break}return a||s?{type:"supsub",mode:this.mode,base:n,sup:a,sub:s}:n}parseFunction(t,n){var a=this.fetch(),s=a.text,l=Ei[s];if(!l)return null;if(this.consume(),n&&n!=="atom"&&!l.allowedInArgument)throw new Ie("Got function '"+s+"' with no arguments"+(n?" as "+n:""),a);if(this.mode==="text"&&!l.allowedInText)throw new Ie("Can't use function '"+s+"' in text mode",a);if(this.mode==="math"&&l.allowedInMath===!1)throw new Ie("Can't use function '"+s+"' in math mode",a);var{args:c,optArgs:f}=this.parseArguments(s,l);return this.callFunction(s,c,f,a,t)}callFunction(t,n,a,s,l){var c={funcName:t,parser:this,token:s,breakOnTokenText:l},f=Ei[t];if(f&&f.handler)return f.handler(c,n,a);throw new Ie("No function handler for "+t)}parseArguments(t,n){var a=n.numArgs+n.numOptionalArgs;if(a===0)return{args:[],optArgs:[]};for(var s=[],l=[],c=0;c<a;c++){var f=n.argTypes&&n.argTypes[c],m=c<n.numOptionalArgs;("primitive"in n&&n.primitive&&f==null||n.type==="sqrt"&&c===1&&l[0]==null)&&(f="primitive");var h=this.parseGroupOfType("argument to '"+t+"'",f,m);if(m)l.push(h);else if(h!=null)s.push(h);else throw new Ie("Null argument, please report this as a bug")}return{args:s,optArgs:l}}parseGroupOfType(t,n,a){switch(n){case"color":return this.parseColorGroup(a);case"size":return this.parseSizeGroup(a);case"url":return this.parseUrlGroup(a);case"math":case"text":return this.parseArgumentGroup(a,n);case"hbox":{var s=this.parseArgumentGroup(a,"text");return s!=null?{type:"styling",mode:s.mode,body:[s],style:"text",resetFont:!0}:null}case"raw":{var l=this.parseStringGroup("raw",a);return l!=null?{type:"raw",mode:"text",string:l.text}:null}case"primitive":{if(a)throw new Ie("A primitive argument cannot be optional");var c=this.parseGroup(t);if(c==null)throw new Ie("Expected group as "+t,this.fetch());return c}case"original":case null:case void 0:return this.parseArgumentGroup(a);default:throw new Ie("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(t,n){var a=this.gullet.scanArgument(n);if(a==null)return null;for(var s="",l;(l=this.fetch()).text!=="EOF";)s+=l.text,this.consume();return this.consume(),a.text=s,a}parseRegexGroup(t,n){for(var a=this.fetch(),s=a,l="",c;(c=this.fetch()).text!=="EOF"&&t.test(l+c.text);)s=c,l+=s.text,this.consume();if(l==="")throw new Ie("Invalid "+n+": '"+a.text+"'",a);return a.range(s,l)}parseColorGroup(t){var n=this.parseStringGroup("color",t);if(n==null)return null;var a=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(n.text);if(!a)throw new Ie("Invalid color: '"+n.text+"'",n);var s=a[0];return/^[0-9a-f]{6}$/i.test(s)&&(s="#"+s),{type:"color-token",mode:this.mode,color:s}}parseSizeGroup(t){var n,a=!1;if(this.gullet.consumeSpaces(),!t&&this.gullet.future().text!=="{"?n=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):n=this.parseStringGroup("size",t),!n)return null;!t&&n.text.length===0&&(n.text="0pt",a=!0);var s=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n.text);if(!s)throw new Ie("Invalid size: '"+n.text+"'",n);var l={number:+(s[1]+s[2]),unit:s[3]};if(!y5(l))throw new Ie("Invalid unit: '"+l.unit+"'",n);return{type:"size",mode:this.mode,value:l,isBlank:a}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var n=this.parseStringGroup("url",t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),n==null)return null;var a=n.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:a}}parseArgumentGroup(t,n){var a=this.gullet.scanArgument(t);if(a==null)return null;var s=this.mode;n&&this.switchMode(n),this.gullet.beginGroup();var l=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var c={type:"ordgroup",mode:this.mode,loc:a.loc,body:l};return n&&this.switchMode(s),c}parseGroup(t,n){var a=this.fetch(),s=a.text,l;if(s==="{"||s==="\\begingroup"){this.consume();var c=s==="{"?"}":"\\endgroup";this.gullet.beginGroup();var f=this.parseExpression(!1,c),m=this.fetch();this.expect(c),this.gullet.endGroup(),l={type:"ordgroup",mode:this.mode,loc:wr.range(a,m),body:f,semisimple:s==="\\begingroup"||void 0}}else if(l=this.parseFunction(n,t)||this.parseSymbol(),l==null&&s[0]==="\\"&&!f6.hasOwnProperty(s)){if(this.settings.throwOnError)throw new Ie("Undefined control sequence: "+s,a);l=this.formatUnsupportedCmd(s),this.consume()}return l}formLigatures(t){for(var n=t.length-1,a=0;a<n;++a){var s=t[a];if(s.type==="textord"){var l=s.text,c=t[a+1];if(!(!c||c.type!=="textord")){if(l==="-"&&c.text==="-"){var f=t[a+2];a+1<n&&f&&f.type==="textord"&&f.text==="-"?(t.splice(a,3,{type:"textord",mode:"text",loc:wr.range(s,f),text:"---"}),n-=2):(t.splice(a,2,{type:"textord",mode:"text",loc:wr.range(s,c),text:"--"}),n-=1)}(l==="'"||l==="`")&&c.text===l&&(t.splice(a,2,{type:"textord",mode:"text",loc:wr.range(s,c),text:l+l}),n-=1)}}}}parseSymbol(){var t=this.fetch(),n=t.text;if(/^\\verb[^a-zA-Z]/.test(n)){this.consume();var a=n.slice(5),s=a.charAt(0)==="*";if(s&&(a=a.slice(1)),a.length<2||a.charAt(0)!==a.slice(-1))throw new Ie(`\\verb assertion failed --
|
|
301
|
-
please report what input caused this bug`);return a=a.slice(1,-1),{type:"verb",mode:"text",body:a,star:s}}cy.hasOwnProperty(n[0])&&!fn[this.mode][n[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+n[0]+'" used in math mode',t),n=cy[n[0]]+n.slice(1));var l=wA.exec(n);l&&(n=n.substring(0,l.index),n==="i"?n="ı":n==="j"&&(n="ȷ"));var c;if(fn[this.mode][n]){this.settings.strict&&this.mode==="math"&&fh.includes(n)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',t);var f=fn[this.mode][n].group,m=wr.range(t),h;FR(f)?h={type:"atom",mode:this.mode,family:f,loc:m,text:n}:h={type:f,mode:this.mode,loc:m,text:n},c=h}else if(n.charCodeAt(0)>=128)this.settings.strict&&(v5(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),t)),c={type:"textord",mode:"text",loc:wr.range(t),text:n};else return null;if(this.consume(),l)for(var p=0;p<l[0].length;p++){var b=l[0][p];if(!tm[b])throw new Ie("Unknown accent ' "+b+"'",t);var y=tm[b][this.mode]||tm[b].text;if(!y)throw new Ie("Accent "+b+" unsupported in "+this.mode+" mode",t);c={type:"accent",mode:this.mode,loc:wr.range(t),label:y,isStretchy:!1,isShifty:!0,base:c}}return c}}l0.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var wp=function(t,n){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var a=new l0(t,n);delete a.gullet.macros.current["\\df@tag"];var s=a.parse();if(delete a.gullet.macros.current["\\current@color"],delete a.gullet.macros.current["\\color"],a.gullet.macros.get("\\df@tag")){if(!n.displayMode)throw new Ie("\\tag works only in display equations");s=[{type:"tag",mode:"text",body:s,tag:a.subparse([new jr("\\df@tag")])}]}return s},Sp=function(t,n,a){n.textContent="";var s=o0(t,a).toNode();n.appendChild(s)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Sp=function(){throw new Ie("KaTeX doesn't work in quirks mode.")});var m6=function(t,n){var a=o0(t,n).toMarkup();return a},h6=function(t,n){var a=new lp(n);return wp(t,a)},p6=function(t,n,a){if(a.throwOnError||!(t instanceof Ie))throw t;var s=Ce(["katex-error"],[new Lr(n)]);return s.setAttribute("title",t.toString()),s.setAttribute("style","color:"+a.errorColor),s},o0=function(t,n){var a=new lp(n);try{var s=wp(t,a);return DR(s,t,a)}catch(l){return p6(l,t,a)}},g6=function(t,n){var a=new lp(n);try{var s=wp(t,a);return jR(s,t,a)}catch(l){return p6(l,t,a)}},b6="0.16.47",v6={Span:ul,Anchor:Xu,SymbolNode:Lr,SvgNode:Ha,PathNode:Ci,LineNode:dh},Ch={version:b6,render:Sp,renderToString:m6,ParseError:Ie,SETTINGS_SCHEMA:Au,__parse:h6,__renderToDomTree:o0,__renderToHTMLTree:g6,__setFontMetrics:k5,__defineSymbol:w,__defineFunction:Be,__defineMacro:z,__domTree:v6};const Mj=Object.freeze(Object.defineProperty({__proto__:null,ParseError:Ie,SETTINGS_SCHEMA:Au,__defineFunction:Be,__defineMacro:z,__defineSymbol:w,__domTree:v6,__parse:h6,__renderToDomTree:o0,__renderToHTMLTree:g6,__setFontMetrics:k5,default:Ch,get render(){return Sp},renderToString:m6,version:b6},Symbol.toStringTag,{value:"Module"})),CA={};function RA(e){const t=this,n=e||CA,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),l=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(jC(n)),l.push(CC()),c.push(RC(n))}const uy=/[#.]/g;function AA(e,t){const n=e||"",a={};let s=0,l,c;for(;s<n.length;){uy.lastIndex=s;const f=uy.exec(n),m=n.slice(s,f?f.index:n.length);m&&(l?l==="#"?a.id=m:Array.isArray(a.className)?a.className.push(m):a.className=[m]:c=m,s+=m.length),f&&(l=f[0],s++)}return{type:"element",tagName:c||t||"div",properties:a,children:[]}}function y6(e,t,n){const a=n?OA(n):void 0;function s(l,c,...f){let m;if(l==null){m={type:"root",children:[]};const h=c;f.unshift(h)}else{m=AA(l,t);const h=m.tagName.toLowerCase(),p=a?a.get(h):void 0;if(m.tagName=p||h,_A(c))f.unshift(c);else for(const[b,y]of Object.entries(c))IA(e,m.properties,b,y)}for(const h of f)Rh(m.children,h);return m.type==="element"&&m.tagName==="template"&&(m.content={type:"root",children:m.children},m.children=[]),m}return s}function _A(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const a of n){const s=t[a];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const l=s;for(const c of l)if(typeof c!="number"&&typeof c!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function IA(e,t,n,a){const s=b3(e,n);let l;if(a!=null){if(typeof a=="number"){if(Number.isNaN(a))return;l=a}else typeof a=="boolean"?l=a:typeof a=="string"?s.spaceSeparated?l=Uv(a):s.commaSeparated?l=Dv(a):s.commaOrSpaceSeparated?l=Uv(Dv(a).join(" ")):l=dy(s,s.property,a):Array.isArray(a)?l=[...a]:l=s.property==="style"?MA(a):String(a);if(Array.isArray(l)){const c=[];for(const f of l)c.push(dy(s,s.property,f));l=c}s.property==="className"&&Array.isArray(t.className)&&(l=t.className.concat(l)),t[s.property]=l}}function Rh(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Rh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Rh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function dy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||To(n)===To(t)))return!0}return n}function MA(e){const t=[];for(const[n,a]of Object.entries(e))t.push([n,a].join(": "));return t.join("; ")}function OA(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const DA=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],jA=y6(v3,"div"),LA=y6($u,"g",DA),nm={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function zA(e,t){return x6(e,{})||{type:"root",children:[]}}function x6(e,t){const n=BA(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function BA(e,t){switch(e.nodeType){case 1:return FA(e,t);case 3:return qA(e);case 8:return HA(e);case 9:return fy(e,t);case 10:return UA();case 11:return fy(e,t);default:return}}function fy(e,t){return{type:"root",children:w6(e,t)}}function UA(){return{type:"doctype"}}function qA(e){return{type:"text",value:e.nodeValue||""}}function HA(e){return{type:"comment",value:e.nodeValue||""}}function FA(e,t){const n=e.namespaceURI,a=n===nm.svg?LA:jA,s=n===nm.html?e.tagName.toLowerCase():e.tagName,l=n===nm.html&&s==="template"?e.content:e,c=e.getAttributeNames(),f={};let m=-1;for(;++m<c.length;)f[c[m]]=e.getAttribute(c[m])||"";return a(s,f,w6(l,t))}function w6(e,t){const n=e.childNodes,a=[];let s=-1;for(;++s<n.length;){const l=x6(n[s],t);l!==void 0&&a.push(l)}return a}new DOMParser;function PA(e,t){const n=$A(e);return zA(n)}function $A(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const my=(function(e,t,n){const a=jo(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(a(e.children[t],t,e))return e.children[t]}),ds=(function(e){if(e==null)return KA;if(typeof e=="string")return VA(e);if(typeof e=="object")return GA(e);if(typeof e=="function")return kp(e);throw new Error("Expected function, string, or array as `test`")});function GA(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ds(e[n]);return kp(a);function a(...s){let l=-1;for(;++l<t.length;)if(t[l].apply(this,s))return!0;return!1}}function VA(e){return kp(t);function t(n){return n.tagName===e}}function kp(e){return t;function t(n,a,s){return!!(YA(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function KA(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function YA(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const hy=/\n/g,py=/[\t ]+/g,Ah=ds("br"),gy=ds(n_),XA=ds("p"),by=ds("tr"),ZA=ds(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",t_,r_]),S6=ds(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function WA(e,t){const n=t||{},a="children"in e?e.children:[],s=S6(e),l=T6(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...E6(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<a.length;)c.push(...k6(a[f],e,{whitespace:l,breakBefore:f?void 0:s,breakAfter:f<a.length-1?Ah(a[f+1]):s}));const m=[];let h;for(f=-1;++f<c.length;){const p=c[f];typeof p=="number"?h!==void 0&&p>h&&(h=p):p&&(h!==void 0&&h>-1&&m.push(`
|
|
302
|
-
`.repeat(h)||" "),h=-1,m.push(p))}return m.join("")}function k6(e,t,n){return e.type==="element"?QA(e,t,n):e.type==="text"?n.whitespace==="normal"?E6(e,n):JA(e):[]}function QA(e,t,n){const a=T6(e,n),s=e.children||[];let l=-1,c=[];if(ZA(e))return c;let f,m;for(Ah(e)||by(e)&&my(t,e,by)?m=`
|
|
303
|
-
`:XA(e)?(f=2,m=2):S6(e)&&(f=1,m=1);++l<s.length;)c=c.concat(k6(s[l],e,{whitespace:a,breakBefore:l?void 0:f,breakAfter:l<s.length-1?Ah(s[l+1]):m}));return gy(e)&&my(t,e,gy)&&c.push(" "),f&&c.unshift(f),m&&c.push(m),c}function E6(e,t){const n=String(e.value),a=[],s=[];let l=0;for(;l<=n.length;){hy.lastIndex=l;const m=hy.exec(n),h=m&&"index"in m?m.index:n.length;a.push(e_(n.slice(l,h).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),l===0?t.breakBefore:!0,h===n.length?t.breakAfter:!0)),l=h+1}let c=-1,f;for(;++c<a.length;)a[c].charCodeAt(a[c].length-1)===8203||c<a.length-1&&a[c+1].charCodeAt(0)===8203?(s.push(a[c]),f=void 0):a[c]?(typeof f=="number"&&s.push(f),s.push(a[c]),f=0):(c===0||c===a.length-1)&&s.push(0);return s}function JA(e){return[String(e.value)]}function e_(e,t,n){const a=[];let s=0,l;for(;s<e.length;){py.lastIndex=s;const c=py.exec(e);l=c?c.index:e.length,!s&&!l&&c&&!t&&a.push(""),s!==l&&a.push(e.slice(s,l)),s=c?l+c[0].length:l}return s!==l&&!n&&a.push(""),a.join(" ")}function T6(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function t_(e){return!!(e.properties||{}).hidden}function n_(e){return e.tagName==="td"||e.tagName==="th"}function r_(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const a_={},i_=[];function s_(e){const t=e||a_;return function(n,a){tp(n,"element",function(s,l){const c=Array.isArray(s.properties.className)?s.properties.className:i_,f=c.includes("language-math"),m=c.includes("math-display"),h=c.includes("math-inline");let p=m;if(!f&&!m&&!h)return;let b=l[l.length-1],y=s;if(s.tagName==="code"&&f&&b&&b.type==="element"&&b.tagName==="pre"&&(y=b,b=l[l.length-2],p=!0),!b)return;const x=WA(y,{whitespace:"pre"});let k;try{k=Ch.renderToString(x,{...t,displayMode:p,throwOnError:!0})}catch(R){const C=R,_=C.name.toLowerCase();a.message("Could not render math with KaTeX",{ancestors:[...l,s],cause:C,place:s.position,ruleId:_,source:"rehype-katex"});try{k=Ch.renderToString(x,{...t,displayMode:p,strict:"ignore",throwOnError:!1})}catch{k=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(R)},children:[{type:"text",value:x}]}]}}typeof k=="string"&&(k=PA(k).children);const N=b.children.indexOf(y);return b.children.splice(N,1,...k),V3})}}var rm,vy;function l_(){if(vy)return rm;vy=1;function e(Q){return Q instanceof Map?Q.clear=Q.delete=Q.set=function(){throw new Error("map is read-only")}:Q instanceof Set&&(Q.add=Q.clear=Q.delete=function(){throw new Error("set is read-only")}),Object.freeze(Q),Object.getOwnPropertyNames(Q).forEach(ye=>{const Le=Q[ye],Ze=typeof Le;(Ze==="object"||Ze==="function")&&!Object.isFrozen(Le)&&e(Le)}),Q}class t{constructor(ye){ye.data===void 0&&(ye.data={}),this.data=ye.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(Q){return Q.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(Q,...ye){const Le=Object.create(null);for(const Ze in Q)Le[Ze]=Q[Ze];return ye.forEach(function(Ze){for(const ht in Ze)Le[ht]=Ze[ht]}),Le}const s="</span>",l=Q=>!!Q.scope,c=(Q,{prefix:ye})=>{if(Q.startsWith("language:"))return Q.replace("language:","language-");if(Q.includes(".")){const Le=Q.split(".");return[`${ye}${Le.shift()}`,...Le.map((Ze,ht)=>`${Ze}${"_".repeat(ht+1)}`)].join(" ")}return`${ye}${Q}`};class f{constructor(ye,Le){this.buffer="",this.classPrefix=Le.classPrefix,ye.walk(this)}addText(ye){this.buffer+=n(ye)}openNode(ye){if(!l(ye))return;const Le=c(ye.scope,{prefix:this.classPrefix});this.span(Le)}closeNode(ye){l(ye)&&(this.buffer+=s)}value(){return this.buffer}span(ye){this.buffer+=`<span class="${ye}">`}}const m=(Q={})=>{const ye={children:[]};return Object.assign(ye,Q),ye};class h{constructor(){this.rootNode=m(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ye){this.top.children.push(ye)}openNode(ye){const Le=m({scope:ye});this.add(Le),this.stack.push(Le)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ye){return this.constructor._walk(ye,this.rootNode)}static _walk(ye,Le){return typeof Le=="string"?ye.addText(Le):Le.children&&(ye.openNode(Le),Le.children.forEach(Ze=>this._walk(ye,Ze)),ye.closeNode(Le)),ye}static _collapse(ye){typeof ye!="string"&&ye.children&&(ye.children.every(Le=>typeof Le=="string")?ye.children=[ye.children.join("")]:ye.children.forEach(Le=>{h._collapse(Le)}))}}class p extends h{constructor(ye){super(),this.options=ye}addText(ye){ye!==""&&this.add(ye)}startScope(ye){this.openNode(ye)}endScope(){this.closeNode()}__addSublanguage(ye,Le){const Ze=ye.root;Le&&(Ze.scope=`language:${Le}`),this.add(Ze)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function b(Q){return Q?typeof Q=="string"?Q:Q.source:null}function y(Q){return N("(?=",Q,")")}function x(Q){return N("(?:",Q,")*")}function k(Q){return N("(?:",Q,")?")}function N(...Q){return Q.map(Le=>b(Le)).join("")}function R(Q){const ye=Q[Q.length-1];return typeof ye=="object"&&ye.constructor===Object?(Q.splice(Q.length-1,1),ye):{}}function C(...Q){return"("+(R(Q).capture?"":"?:")+Q.map(Ze=>b(Ze)).join("|")+")"}function _(Q){return new RegExp(Q.toString()+"|").exec("").length-1}function I(Q,ye){const Le=Q&&Q.exec(ye);return Le&&Le.index===0}const $=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function D(Q,{joinWith:ye}){let Le=0;return Q.map(Ze=>{Le+=1;const ht=Le;let Et=b(Ze),ie="";for(;Et.length>0;){const we=$.exec(Et);if(!we){ie+=Et;break}ie+=Et.substring(0,we.index),Et=Et.substring(we.index+we[0].length),we[0][0]==="\\"&&we[1]?ie+="\\"+String(Number(we[1])+ht):(ie+=we[0],we[0]==="("&&Le++)}return ie}).map(Ze=>`(${Ze})`).join(ye)}const M=/\b\B/,B="[a-zA-Z]\\w*",Y="[a-zA-Z_]\\w*",G="\\b\\d+(\\.\\d+)?",j="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",F="\\b(0b[01]+)",H="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ee=(Q={})=>{const ye=/^#![ ]*\//;return Q.binary&&(Q.begin=N(ye,/.*\b/,Q.binary,/\b.*/)),a({scope:"meta",begin:ye,end:/$/,relevance:0,"on:begin":(Le,Ze)=>{Le.index!==0&&Ze.ignoreMatch()}},Q)},K={begin:"\\\\[\\s\\S]",relevance:0},X={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[K]},V={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[K]},re={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ue=function(Q,ye,Le={}){const Ze=a({scope:"comment",begin:Q,end:ye,contains:[]},Le);Ze.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const ht=C("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Ze.contains.push({begin:N(/[ ]+/,"(",ht,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ze},Te=ue("//","$"),P=ue("/\\*","\\*/"),U=ue("#","$"),q={scope:"number",begin:G,relevance:0},A={scope:"number",begin:j,relevance:0},ae={scope:"number",begin:F,relevance:0},he={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[K,{begin:/\[/,end:/\]/,relevance:0,contains:[K]}]},ne={scope:"title",begin:B,relevance:0},te={scope:"title",begin:Y,relevance:0},ce={begin:"\\.\\s*"+Y,relevance:0};var Re=Object.freeze({__proto__:null,APOS_STRING_MODE:X,BACKSLASH_ESCAPE:K,BINARY_NUMBER_MODE:ae,BINARY_NUMBER_RE:F,COMMENT:ue,C_BLOCK_COMMENT_MODE:P,C_LINE_COMMENT_MODE:Te,C_NUMBER_MODE:A,C_NUMBER_RE:j,END_SAME_AS_BEGIN:function(Q){return Object.assign(Q,{"on:begin":(ye,Le)=>{Le.data._beginMatch=ye[1]},"on:end":(ye,Le)=>{Le.data._beginMatch!==ye[1]&&Le.ignoreMatch()}})},HASH_COMMENT_MODE:U,IDENT_RE:B,MATCH_NOTHING_RE:M,METHOD_GUARD:ce,NUMBER_MODE:q,NUMBER_RE:G,PHRASAL_WORDS_MODE:re,QUOTE_STRING_MODE:V,REGEXP_MODE:he,RE_STARTERS_RE:H,SHEBANG:ee,TITLE_MODE:ne,UNDERSCORE_IDENT_RE:Y,UNDERSCORE_TITLE_MODE:te});function je(Q,ye){Q.input[Q.index-1]==="."&&ye.ignoreMatch()}function be(Q,ye){Q.className!==void 0&&(Q.scope=Q.className,delete Q.className)}function qe(Q,ye){ye&&Q.beginKeywords&&(Q.begin="\\b("+Q.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Q.__beforeBegin=je,Q.keywords=Q.keywords||Q.beginKeywords,delete Q.beginKeywords,Q.relevance===void 0&&(Q.relevance=0))}function Ve(Q,ye){Array.isArray(Q.illegal)&&(Q.illegal=C(...Q.illegal))}function tt(Q,ye){if(Q.match){if(Q.begin||Q.end)throw new Error("begin & end are not supported with match");Q.begin=Q.match,delete Q.match}}function nt(Q,ye){Q.relevance===void 0&&(Q.relevance=1)}const Ut=(Q,ye)=>{if(!Q.beforeMatch)return;if(Q.starts)throw new Error("beforeMatch cannot be used with starts");const Le=Object.assign({},Q);Object.keys(Q).forEach(Ze=>{delete Q[Ze]}),Q.keywords=Le.keywords,Q.begin=N(Le.beforeMatch,y(Le.begin)),Q.starts={relevance:0,contains:[Object.assign(Le,{endsParent:!0})]},Q.relevance=0,delete Le.beforeMatch},Rt=["of","and","for","in","not","or","if","then","parent","list","value"],ut="keyword";function Ge(Q,ye,Le=ut){const Ze=Object.create(null);return typeof Q=="string"?ht(Le,Q.split(" ")):Array.isArray(Q)?ht(Le,Q):Object.keys(Q).forEach(function(Et){Object.assign(Ze,Ge(Q[Et],ye,Et))}),Ze;function ht(Et,ie){ye&&(ie=ie.map(we=>we.toLowerCase())),ie.forEach(function(we){const Ue=we.split("|");Ze[Ue[0]]=[Et,Bt(Ue[0],Ue[1])]})}}function Bt(Q,ye){return ye?Number(ye):Kt(Q)?0:1}function Kt(Q){return Rt.includes(Q.toLowerCase())}const hn={},Je=Q=>{console.error(Q)},tn=(Q,...ye)=>{console.log(`WARN: ${Q}`,...ye)},pe=(Q,ye)=>{hn[`${Q}/${ye}`]||(console.log(`Deprecated as of ${Q}. ${ye}`),hn[`${Q}/${ye}`]=!0)},Se=new Error;function Fe(Q,ye,{key:Le}){let Ze=0;const ht=Q[Le],Et={},ie={};for(let we=1;we<=ye.length;we++)ie[we+Ze]=ht[we],Et[we+Ze]=!0,Ze+=_(ye[we-1]);Q[Le]=ie,Q[Le]._emit=Et,Q[Le]._multi=!0}function _e(Q){if(Array.isArray(Q.begin)){if(Q.skip||Q.excludeBegin||Q.returnBegin)throw Je("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Se;if(typeof Q.beginScope!="object"||Q.beginScope===null)throw Je("beginScope must be object"),Se;Fe(Q,Q.begin,{key:"beginScope"}),Q.begin=D(Q.begin,{joinWith:""})}}function He(Q){if(Array.isArray(Q.end)){if(Q.skip||Q.excludeEnd||Q.returnEnd)throw Je("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Se;if(typeof Q.endScope!="object"||Q.endScope===null)throw Je("endScope must be object"),Se;Fe(Q,Q.end,{key:"endScope"}),Q.end=D(Q.end,{joinWith:""})}}function vt(Q){Q.scope&&typeof Q.scope=="object"&&Q.scope!==null&&(Q.beginScope=Q.scope,delete Q.scope)}function jt(Q){vt(Q),typeof Q.beginScope=="string"&&(Q.beginScope={_wrap:Q.beginScope}),typeof Q.endScope=="string"&&(Q.endScope={_wrap:Q.endScope}),_e(Q),He(Q)}function Lt(Q){function ye(ie,we){return new RegExp(b(ie),"m"+(Q.case_insensitive?"i":"")+(Q.unicodeRegex?"u":"")+(we?"g":""))}class Le{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(we,Ue){Ue.position=this.position++,this.matchIndexes[this.matchAt]=Ue,this.regexes.push([Ue,we]),this.matchAt+=_(we)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const we=this.regexes.map(Ue=>Ue[1]);this.matcherRe=ye(D(we,{joinWith:"|"}),!0),this.lastIndex=0}exec(we){this.matcherRe.lastIndex=this.lastIndex;const Ue=this.matcherRe.exec(we);if(!Ue)return null;const wt=Ue.findIndex((Sn,qn)=>qn>0&&Sn!==void 0),Tt=this.matchIndexes[wt];return Ue.splice(0,wt),Object.assign(Ue,Tt)}}class Ze{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(we){if(this.multiRegexes[we])return this.multiRegexes[we];const Ue=new Le;return this.rules.slice(we).forEach(([wt,Tt])=>Ue.addRule(wt,Tt)),Ue.compile(),this.multiRegexes[we]=Ue,Ue}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(we,Ue){this.rules.push([we,Ue]),Ue.type==="begin"&&this.count++}exec(we){const Ue=this.getMatcher(this.regexIndex);Ue.lastIndex=this.lastIndex;let wt=Ue.exec(we);if(this.resumingScanAtSamePosition()&&!(wt&&wt.index===this.lastIndex)){const Tt=this.getMatcher(0);Tt.lastIndex=this.lastIndex+1,wt=Tt.exec(we)}return wt&&(this.regexIndex+=wt.position+1,this.regexIndex===this.count&&this.considerAll()),wt}}function ht(ie){const we=new Ze;return ie.contains.forEach(Ue=>we.addRule(Ue.begin,{rule:Ue,type:"begin"})),ie.terminatorEnd&&we.addRule(ie.terminatorEnd,{type:"end"}),ie.illegal&&we.addRule(ie.illegal,{type:"illegal"}),we}function Et(ie,we){const Ue=ie;if(ie.isCompiled)return Ue;[be,tt,jt,Ut].forEach(Tt=>Tt(ie,we)),Q.compilerExtensions.forEach(Tt=>Tt(ie,we)),ie.__beforeBegin=null,[qe,Ve,nt].forEach(Tt=>Tt(ie,we)),ie.isCompiled=!0;let wt=null;return typeof ie.keywords=="object"&&ie.keywords.$pattern&&(ie.keywords=Object.assign({},ie.keywords),wt=ie.keywords.$pattern,delete ie.keywords.$pattern),wt=wt||/\w+/,ie.keywords&&(ie.keywords=Ge(ie.keywords,Q.case_insensitive)),Ue.keywordPatternRe=ye(wt,!0),we&&(ie.begin||(ie.begin=/\B|\b/),Ue.beginRe=ye(Ue.begin),!ie.end&&!ie.endsWithParent&&(ie.end=/\B|\b/),ie.end&&(Ue.endRe=ye(Ue.end)),Ue.terminatorEnd=b(Ue.end)||"",ie.endsWithParent&&we.terminatorEnd&&(Ue.terminatorEnd+=(ie.end?"|":"")+we.terminatorEnd)),ie.illegal&&(Ue.illegalRe=ye(ie.illegal)),ie.contains||(ie.contains=[]),ie.contains=[].concat(...ie.contains.map(function(Tt){return ot(Tt==="self"?ie:Tt)})),ie.contains.forEach(function(Tt){Et(Tt,Ue)}),ie.starts&&Et(ie.starts,we),Ue.matcher=ht(Ue),Ue}if(Q.compilerExtensions||(Q.compilerExtensions=[]),Q.contains&&Q.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Q.classNameAliases=a(Q.classNameAliases||{}),Et(Q)}function yt(Q){return Q?Q.endsWithParent||yt(Q.starts):!1}function ot(Q){return Q.variants&&!Q.cachedVariants&&(Q.cachedVariants=Q.variants.map(function(ye){return a(Q,{variants:null},ye)})),Q.cachedVariants?Q.cachedVariants:yt(Q)?a(Q,{starts:Q.starts?a(Q.starts):null}):Object.isFrozen(Q)?a(Q):Q}var mt="11.11.2";class Un extends Error{constructor(ye,Le){super(ye),this.name="HTMLInjectionError",this.html=Le}}const un=n,rt=a,Ke=Symbol("nomatch"),gt=7,ct=function(Q){const ye=Object.create(null),Le=Object.create(null),Ze=[];let ht=!0;const Et="Could not find the language '{}', did you forget to load/include a language module?",ie={disableAutodetect:!0,name:"Plain text",contains:[]};let we={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:p};function Ue(Ae){return we.noHighlightRe.test(Ae)}function wt(Ae){let Qe=Ae.className+" ";Qe+=Ae.parentNode?Ae.parentNode.className:"";const Nt=we.languageDetectRe.exec(Qe);if(Nt){const Yt=ir(Nt[1]);return Yt||(tn(Et.replace("{}",Nt[1])),tn("Falling back to no-highlight mode for this block.",Ae)),Yt?Nt[1]:"no-highlight"}return Qe.split(/\s+/).find(Yt=>Ue(Yt)||ir(Yt))}function Tt(Ae,Qe,Nt){let Yt="",En="";typeof Qe=="object"?(Yt=Ae,Nt=Qe.ignoreIllegals,En=Qe.language):(pe("10.7.0","highlight(lang, code, ...args) has been deprecated."),pe("10.7.0",`Please use highlight(code, options) instead.
|
|
304
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),En=Ae,Yt=Qe),Nt===void 0&&(Nt=!0);const Jn={code:Yt,language:En};Oi("before:highlight",Jn);const kr=Jn.result?Jn.result:Sn(Jn.language,Jn.code,Nt);return kr.code=Jn.code,Oi("after:highlight",kr),kr}function Sn(Ae,Qe,Nt,Yt){const En=Object.create(null);function Jn(ze,Ye){return ze.keywords[Ye]}function kr(){if(!st.keywords){An.addText(Xt);return}let ze=0;st.keywordPatternRe.lastIndex=0;let Ye=st.keywordPatternRe.exec(Xt),bt="";for(;Ye;){bt+=Xt.substring(ze,Ye.index);const Mt=Kn.case_insensitive?Ye[0].toLowerCase():Ye[0],pn=Jn(st,Mt);if(pn){const[Ur,yl]=pn;if(An.addText(bt),bt="",En[Mt]=(En[Mt]||0)+1,En[Mt]<=gt&&(Xa+=yl),Ur.startsWith("_"))bt+=Ye[0];else{const Go=Kn.classNameAliases[Ur]||Ur;Er(Ye[0],Go)}}else bt+=Ye[0];ze=st.keywordPatternRe.lastIndex,Ye=st.keywordPatternRe.exec(Xt)}bt+=Xt.substring(ze),An.addText(bt)}function fr(){if(Xt==="")return;let ze=null;if(typeof st.subLanguage=="string"){if(!ye[st.subLanguage]){An.addText(Xt);return}ze=Sn(st.subLanguage,Xt,!0,$o[st.subLanguage]),$o[st.subLanguage]=ze._top}else ze=Qn(Xt,st.subLanguage.length?st.subLanguage:null);st.relevance>0&&(Xa+=ze.relevance),An.__addSublanguage(ze._emitter,ze.language)}function ln(){st.subLanguage!=null?fr():kr(),Xt=""}function Er(ze,Ye){ze!==""&&(An.startScope(Ye),An.addText(ze),An.endScope())}function Fo(ze,Ye){let bt=1;const Mt=Ye.length-1;for(;bt<=Mt;){if(!ze._emit[bt]){bt++;continue}const pn=Kn.classNameAliases[ze[bt]]||ze[bt],Ur=Ye[bt];pn?Er(Ur,pn):(Xt=Ur,kr(),Xt=""),bt++}}function ms(ze,Ye){return ze.scope&&typeof ze.scope=="string"&&An.openNode(Kn.classNameAliases[ze.scope]||ze.scope),ze.beginScope&&(ze.beginScope._wrap?(Er(Xt,Kn.classNameAliases[ze.beginScope._wrap]||ze.beginScope._wrap),Xt=""):ze.beginScope._multi&&(Fo(ze.beginScope,Ye),Xt="")),st=Object.create(ze,{parent:{value:st}}),st}function gl(ze,Ye,bt){let Mt=I(ze.endRe,bt);if(Mt){if(ze["on:end"]){const pn=new t(ze);ze["on:end"](Ye,pn),pn.isMatchIgnored&&(Mt=!1)}if(Mt){for(;ze.endsParent&&ze.parent;)ze=ze.parent;return ze}}if(ze.endsWithParent)return gl(ze.parent,Ye,bt)}function hs(ze){return st.matcher.regexIndex===0?(Xt+=ze[0],1):(Za=!0,0)}function d0(ze){const Ye=ze[0],bt=ze.rule,Mt=new t(bt),pn=[bt.__beforeBegin,bt["on:begin"]];for(const Ur of pn)if(Ur&&(Ur(ze,Mt),Mt.isMatchIgnored))return hs(Ye);return bt.skip?Xt+=Ye:(bt.excludeBegin&&(Xt+=Ye),ln(),!bt.returnBegin&&!bt.excludeBegin&&(Xt=Ye)),ms(bt,ze),bt.returnBegin?0:Ye.length}function mr(ze){const Ye=ze[0],bt=Qe.substring(ze.index),Mt=gl(st,ze,bt);if(!Mt)return Ke;const pn=st;st.endScope&&st.endScope._wrap?(ln(),Er(Ye,st.endScope._wrap)):st.endScope&&st.endScope._multi?(ln(),Fo(st.endScope,ze)):pn.skip?Xt+=Ye:(pn.returnEnd||pn.excludeEnd||(Xt+=Ye),ln(),pn.excludeEnd&&(Xt=Ye));do st.scope&&An.closeNode(),!st.skip&&!st.subLanguage&&(Xa+=st.relevance),st=st.parent;while(st!==Mt.parent);return Mt.starts&&ms(Mt.starts,ze),pn.returnEnd?0:Ye.length}function bl(){const ze=[];for(let Ye=st;Ye!==Kn;Ye=Ye.parent)Ye.scope&&ze.unshift(Ye.scope);ze.forEach(Ye=>An.openNode(Ye))}let Di={};function ps(ze,Ye){const bt=Ye&&Ye[0];if(Xt+=ze,bt==null)return ln(),0;if(Di.type==="begin"&&Ye.type==="end"&&Di.index===Ye.index&&bt===""){if(Xt+=Qe.slice(Ye.index,Ye.index+1),!ht){const Mt=new Error(`0 width match regex (${Ae})`);throw Mt.languageName=Ae,Mt.badRule=Di.rule,Mt}return 1}if(Di=Ye,Ye.type==="begin")return d0(Ye);if(Ye.type==="illegal"&&!Nt){const Mt=new Error('Illegal lexeme "'+bt+'" for mode "'+(st.scope||"<unnamed>")+'"');throw Mt.mode=st,Mt}else if(Ye.type==="end"){const Mt=mr(Ye);if(Mt!==Ke)return Mt}if(Ye.type==="illegal"&&bt==="")return Ye.index===Qe.length||(Xt+=`
|
|
305
|
-
`),1;if(vl>1e5&&vl>Ye.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Xt+=bt,bt.length}const Kn=ir(Ae);if(!Kn)throw Je(Et.replace("{}",Ae)),new Error('Unknown language: "'+Ae+'"');const Po=Lt(Kn);let gs="",st=Yt||Po;const $o={},An=new we.__emitter(we);bl();let Xt="",Xa=0,va=0,vl=0,Za=!1;try{if(Kn.__emitTokens)Kn.__emitTokens(Qe,An);else{for(st.matcher.considerAll();;){vl++,Za?Za=!1:st.matcher.considerAll(),st.matcher.lastIndex=va;const ze=st.matcher.exec(Qe);if(!ze)break;const Ye=Qe.substring(va,ze.index),bt=ps(Ye,ze);va=ze.index+bt}ps(Qe.substring(va))}return An.finalize(),gs=An.toHTML(),{language:Ae,value:gs,relevance:Xa,illegal:!1,_emitter:An,_top:st}}catch(ze){if(ze.message&&ze.message.includes("Illegal"))return{language:Ae,value:un(Qe),illegal:!0,relevance:0,_illegalBy:{message:ze.message,index:va,context:Qe.slice(va-100,va+100),mode:ze.mode,resultSoFar:gs},_emitter:An};if(ht)return{language:Ae,value:un(Qe),illegal:!1,relevance:0,errorRaised:ze,_emitter:An,_top:st};throw ze}}function qn(Ae){const Qe={value:un(Ae),illegal:!1,relevance:0,_top:ie,_emitter:new we.__emitter(we)};return Qe._emitter.addText(Ae),Qe}function Qn(Ae,Qe){Qe=Qe||we.languages||Object.keys(ye);const Nt=qn(Ae),Yt=Qe.filter(ir).filter(Ka).map(ln=>Sn(ln,Ae,!1));Yt.unshift(Nt);const En=Yt.sort((ln,Er)=>{if(ln.relevance!==Er.relevance)return Er.relevance-ln.relevance;if(ln.language&&Er.language){if(ir(ln.language).supersetOf===Er.language)return 1;if(ir(Er.language).supersetOf===ln.language)return-1}return 0}),[Jn,kr]=En,fr=Jn;return fr.secondBest=kr,fr}function Gn(Ae,Qe,Nt){const Yt=Qe&&Le[Qe]||Nt;Ae.classList.add("hljs"),Ae.classList.add(`language-${Yt}`)}function Pt(Ae){let Qe=null;const Nt=wt(Ae);if(Ue(Nt))return;if(Oi("before:highlightElement",{el:Ae,language:Nt}),Ae.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Ae);return}if(Ae.children.length>0&&(we.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Ae)),we.throwUnescapedHTML))throw new Un("One of your code blocks includes unescaped HTML.",Ae.innerHTML);Qe=Ae;const Yt=Qe.textContent,En=Nt?Tt(Yt,{language:Nt,ignoreIllegals:!0}):Qn(Yt);Ae.innerHTML=En.value,Ae.dataset.highlighted="yes",Gn(Ae,Nt,En.language),Ae.result={language:En.language,re:En.relevance,relevance:En.relevance},En.secondBest&&(Ae.secondBest={language:En.secondBest.language,relevance:En.secondBest.relevance}),Oi("after:highlightElement",{el:Ae,result:En,text:Yt})}function kn(Ae){we=rt(we,Ae)}const Va=()=>{fs(),pe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function hl(){fs(),pe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Uo=!1;function fs(){function Ae(){fs()}if(document.readyState==="loading"){Uo||window.addEventListener("DOMContentLoaded",Ae,!1),Uo=!0;return}document.querySelectorAll(we.cssSelector).forEach(Pt)}function qo(Ae,Qe){let Nt=null;try{Nt=Qe(Q)}catch(Yt){if(Je("Language definition for '{}' could not be registered.".replace("{}",Ae)),ht)Je(Yt);else throw Yt;Nt=ie}Nt.name||(Nt.name=Ae),ye[Ae]=Nt,Nt.rawDefinition=Qe.bind(null,Q),Nt.aliases&&ga(Nt.aliases,{languageName:Ae})}function Mi(Ae){delete ye[Ae];for(const Qe of Object.keys(Le))Le[Qe]===Ae&&delete Le[Qe]}function pl(){return Object.keys(ye)}function ir(Ae){return Ae=(Ae||"").toLowerCase(),ye[Ae]||ye[Le[Ae]]}function ga(Ae,{languageName:Qe}){typeof Ae=="string"&&(Ae=[Ae]),Ae.forEach(Nt=>{Le[Nt.toLowerCase()]=Qe})}function Ka(Ae){const Qe=ir(Ae);return Qe&&!Qe.disableAutodetect}function Ya(Ae){Ae["before:highlightBlock"]&&!Ae["before:highlightElement"]&&(Ae["before:highlightElement"]=Qe=>{Ae["before:highlightBlock"](Object.assign({block:Qe.el},Qe))}),Ae["after:highlightBlock"]&&!Ae["after:highlightElement"]&&(Ae["after:highlightElement"]=Qe=>{Ae["after:highlightBlock"](Object.assign({block:Qe.el},Qe))})}function Rn(Ae){Ya(Ae),Ze.push(Ae)}function Ho(Ae){const Qe=Ze.indexOf(Ae);Qe!==-1&&Ze.splice(Qe,1)}function Oi(Ae,Qe){const Nt=Ae;Ze.forEach(function(Yt){Yt[Nt]&&Yt[Nt](Qe)})}function ba(Ae){return pe("10.7.0","highlightBlock will be removed entirely in v12.0"),pe("10.7.0","Please use highlightElement now."),Pt(Ae)}Object.assign(Q,{highlight:Tt,highlightAuto:Qn,highlightAll:fs,highlightElement:Pt,highlightBlock:ba,configure:kn,initHighlighting:Va,initHighlightingOnLoad:hl,registerLanguage:qo,unregisterLanguage:Mi,listLanguages:pl,getLanguage:ir,registerAliases:ga,autoDetection:Ka,inherit:rt,addPlugin:Rn,removePlugin:Ho}),Q.debugMode=function(){ht=!1},Q.safeMode=function(){ht=!0},Q.versionString=mt,Q.regex={concat:N,lookahead:y,either:C,optional:k,anyNumberOfTimes:x};for(const Ae in Re)typeof Re[Ae]=="object"&&e(Re[Ae]);return Object.assign(Q,Re),Q},Ft=ct({});return Ft.newInstance=()=>ct({}),rm=Ft,Ft.HighlightJS=Ft,Ft.default=Ft,rm}var am,yy;function o_(){if(yy)return am;yy=1;function e(t){const n=t.regex,a=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,l={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},c={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},f=t.inherit(c,{begin:/\(/,end:/\)/}),m=t.inherit(t.APOS_STRING_MODE,{className:"string"}),h=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),p={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:s,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[l]},{begin:/'/,end:/'/,contains:[l]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[c,h,m,f,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[c,f,h,m]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},l,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[h]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[p],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[p],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(/</,n.lookahead(n.concat(a,n.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:a,relevance:0,starts:p}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(a,/>/))),contains:[{className:"name",begin:a,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return am=e,am}var im,xy;function c_(){if(xy)return im;xy=1;function e(t){const n=t.regex,a={},s={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[a]}]};Object.assign(a,{className:"variable",variants:[{begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},s]});const l={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},c=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),f={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},m={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,a,l]};l.contains.push(m);const h={match:/\\"/},p={className:"string",begin:/'/,end:/'/},b={match:/\\'/},y={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,a]},x=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],k=t.SHEBANG({binary:`(${x.join("|")})`,relevance:10}),N={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},R=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],C=["true","false"],_={match:/(\/[a-z._-]+)+/},I=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],$=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],D=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],M=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:R,literal:C,built_in:[...I,...$,"set","shopt",...D,...M]},contains:[k,t.SHEBANG(),N,y,c,f,_,m,h,p,b,a]}}return im=e,im}var sm,wy;function u_(){if(wy)return sm;wy=1;function e(t){const n=t.regex,a=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",f="("+s+"|"+n.optional(l)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",m={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},p={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},y={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(p,{className:"string"}),{className:"string",begin:/<.*?>/},a,t.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:n.optional(l)+t.IDENT_RE,relevance:0},k=n.optional(l)+t.IDENT_RE+"\\s*\\(",C={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},_=[y,m,a,t.C_BLOCK_COMMENT_MODE,b,p],I={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:_.concat([{begin:/\(/,end:/\)/,keywords:C,contains:_.concat(["self"]),relevance:0}]),relevance:0},$={begin:"("+f+"[\\*&\\s]+)+"+k,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:C,relevance:0},{begin:k,returnBegin:!0,contains:[t.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[a,t.C_BLOCK_COMMENT_MODE,p,b,m,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",a,t.C_BLOCK_COMMENT_MODE,p,b,m]}]},m,a,t.C_BLOCK_COMMENT_MODE,y]};return{name:"C",aliases:["h"],keywords:C,disableAutodetect:!0,illegal:"</",contains:[].concat(I,$,_,[y,{begin:t.IDENT_RE+"::",keywords:C},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:y,strings:p,keywords:C}}}return sm=e,sm}var lm,Sy;function d_(){if(Sy)return lm;Sy=1;function e(t){const n=t.regex,a=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",f="(?!struct)("+s+"|"+n.optional(l)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",m={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},p={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},y={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(p,{className:"string"}),{className:"string",begin:/<.*?>/},a,t.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:n.optional(l)+t.IDENT_RE,relevance:0},k=n.optional(l)+t.IDENT_RE+"\\s*\\(",N=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],R=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],C=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],_=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],D={type:R,keyword:N,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:C},M={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:n.concat(/\b/,`(?!${N.join("|")})`,t.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},B=[M,y,m,a,t.C_BLOCK_COMMENT_MODE,b,p],Y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:B.concat([{begin:/\(/,end:/\)/,keywords:D,contains:B.concat(["self"]),relevance:0}]),relevance:0},G={className:"function",begin:"("+f+"[\\*&\\s]+)+"+k,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:D,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:D,relevance:0},{begin:k,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[p,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[a,t.C_BLOCK_COMMENT_MODE,p,b,m,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",a,t.C_BLOCK_COMMENT_MODE,p,b,m]}]},m,a,t.C_BLOCK_COMMENT_MODE,y]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:D,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(Y,G,M,B,[y,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:D,contains:["self",m]},{begin:t.IDENT_RE+"::",keywords:D},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return lm=e,lm}var om,ky;function f_(){if(ky)return om;ky=1;function e(t){const n=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],a=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],s=["default","false","null","true"],l=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],c=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],f={keyword:l.concat(c),built_in:n,literal:s},m=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),h={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9'_]+|(\\b[\\d'_]+(\\.[\\d'_]*)?|\\.[\\d'_]+)([eE][-+]?[\\d'_]+)?)"}],relevance:0},p={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},b={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},y=t.inherit(b,{illegal:/\n/}),x={className:"subst",begin:/\{/,end:/\}/,keywords:f},k=t.inherit(x,{illegal:/\n/}),N={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,k]},R={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]},C=t.inherit(R,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},k]});x.contains=[R,N,b,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,t.C_BLOCK_COMMENT_MODE],k.contains=[C,N,y,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const _={variants:[p,R,N,b,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},I={begin:"<",end:">",contains:[{beginKeywords:"in out"},m]},$=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",D={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:f,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},_,h,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},m,I,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[m,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[m,I,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+$+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:f,contains:[{beginKeywords:a.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,I],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,relevance:0,contains:[_,h,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},D]}}return om=e,om}var cm,Ey;function m_(){if(Ey)return cm;Ey=1;const e=h=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:h.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:h.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],a=[...t,...n],s=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),l=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),f=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function m(h){const p=h.regex,b=e(h),y={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},x="and or not only",k=/@-?\w[\w]*(-\w+)*/,N="[a-zA-Z-][a-zA-Z0-9_-]*",R=[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[b.BLOCK_COMMENT,y,b.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+N,relevance:0},b.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+l.join("|")+")"},{begin:":(:)?("+c.join("|")+")"}]},b.CSS_VARIABLE,{className:"attribute",begin:"\\b("+f.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[b.BLOCK_COMMENT,b.HEXCOLOR,b.IMPORTANT,b.CSS_NUMBER_MODE,b.UNICODE_RANGE,...R,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...R,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},b.FUNCTION_DISPATCH]},{begin:p.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:k},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:x,attribute:s.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...R,b.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+a.join("|")+")\\b"}]}}return cm=m,cm}var um,Ty;function h_(){if(Ty)return um;Ty=1;function e(t){const n=t.regex,a={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},s={begin:"^[-\\*]{3,}",end:"$"},l={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},c={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},f={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},m=/[A-Za-z][A-Za-z0-9+.-]*/,h={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,m,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},p={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},b={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},y=t.inherit(p,{contains:[]}),x=t.inherit(b,{contains:[]});p.contains.push(x),b.contains.push(y);let k=[a,h];return[p,b,y,x].forEach(_=>{_.contains=_.contains.concat(k)}),k=k.concat(p,b),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:k},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:k}]}]},a,c,p,b,{className:"quote",begin:"^>\\s+",contains:k,end:"$"},l,s,h,f,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return um=e,um}var dm,Ny;function p_(){if(Ny)return dm;Ny=1;function e(t){const n=t.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return dm=e,dm}var fm,Cy;function g_(){if(Cy)return fm;Cy=1;function e(t){const n=t.regex,a="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",s=n.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),l=n.concat(s,/(::\w+)*/),f={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},m={className:"doctag",begin:"@[A-Za-z]+"},h={begin:"#<",end:">"},p=[t.COMMENT("#","$",{contains:[m]}),t.COMMENT("^=begin","^=end",{contains:[m],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],b={className:"subst",begin:/#\{/,end:/\}/,keywords:f},y={className:"string",contains:[t.BACKSLASH_ESCAPE,b],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,b]})]}]},x="[1-9](_?[0-9])*|0",k="[0-9](_?[0-9])*",N={className:"number",relevance:0,variants:[{begin:`\\b(${x})(\\.(${k}))?([eE][+-]?(${k})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},R={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:f}]},B=[y,{variants:[{match:[/class\s+/,l,/\s+<\s+/,l]},{match:[/\b(class|module)\s+/,l]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:f},{match:[/(include|extend)\s+/,l],scope:{2:"title.class"},keywords:f},{relevance:0,match:[l,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:s,scope:"title.class"},{match:[/def/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[R]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[y,{begin:a}],relevance:0},N,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:f},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,b],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(h,p),relevance:0}].concat(h,p);b.contains=B,R.contains=B;const F=[{begin:/^\s*=>/,starts:{end:"$",contains:B}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:f,contains:B}}];return p.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:f,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(F).concat(p).concat(B)}}return fm=e,fm}var mm,Ry;function b_(){if(Ry)return mm;Ry=1;function e(t){const c={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:c,illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"string",variants:[t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[t.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:c,illegal:/["']/}]}]}}return mm=e,mm}var hm,Ay;function v_(){if(Ay)return hm;Ay=1;function e(t){const n=t.regex,a=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[t.HASH_COMMENT_MODE,t.QUOTE_STRING_MODE,t.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:n.concat(a,n.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return hm=e,hm}var pm,_y;function y_(){if(_y)return pm;_y=1;function e(t){const n=t.regex,a={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:t.NUMBER_RE}]},s=t.COMMENT();s.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const l={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},c={className:"literal",begin:/\bon|off|true|false|yes|no\b/},f={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},m={begin:/\[/,end:/\]/,contains:[s,c,l,f,a,"self"],relevance:0},h=/[A-Za-z0-9_-]+/,p=/"(\\"|[^"])*"/,b=/'[^']*'/,y=n.either(h,p,b),x=n.concat(y,"(\\s*\\.\\s*",y,")*",n.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[s,{className:"section",begin:/\[+/,end:/\]+/},{begin:x,className:"attr",starts:{end:/$/,contains:[s,m,c,l,f,a]}}]}}return pm=e,pm}var gm,Iy;function x_(){if(Iy)return gm;Iy=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",a={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function s(c,f,m){return m===-1?"":c.replace(f,h=>s(c,f,m-1))}function l(c){const f=c.regex,m="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",h=m+s("(?:<"+m+"~~~(?:\\s*,\\s*"+m+"~~~)*>)?",/~~~/g,2),k={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},N={className:"meta",begin:"@"+m,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},R={className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[c.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:k,illegal:/<\/|#/,contains:[c.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[c.BACKSLASH_ESCAPE]},c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,m],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[f.concat(/(?!else)/,m),/\s+/,m,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,m],className:{1:"keyword",3:"title.class"},contains:[R,c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+h+"\\s+)",c.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:k,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[N,c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,a,c.C_BLOCK_COMMENT_MODE]},c.C_LINE_COMMENT_MODE,c.C_BLOCK_COMMENT_MODE]},a,N]}}return gm=l,gm}var bm,My;function w_(){if(My)return bm;My=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],a=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],l=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],f=[].concat(l,a,s);function m(h){const p=h.regex,b=(te,{after:ce})=>{const ge="</"+te[0].slice(1);return te.input.indexOf(ge,ce)!==-1},y=e,x={begin:"<>",end:"</>"},k=/<[A-Za-z0-9\\._:-]+\s*\/>/,N={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(te,ce)=>{const ge=te[0].length+te.index,Re=te.input[ge];if(Re==="<"||Re===","){ce.ignoreMatch();return}Re===">"&&(b(te,{after:ge})||ce.ignoreMatch());let je;const be=te.input.substring(ge);if(je=be.match(/^\s*=/)){ce.ignoreMatch();return}if((je=be.match(/^\s+extends\s+/))&&je.index===0){ce.ignoreMatch();return}}},R={$pattern:e,keyword:t,literal:n,built_in:f,"variable.language":c},C="[0-9](_?[0-9])*",_=`\\.(${C})`,I="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",$={className:"number",variants:[{begin:`(\\b(${I})((${_})|\\.)?|(${_}))[eE][+-]?(${C})\\b`},{begin:`\\b(${I})\\b((${_})\\b|\\.)?|(${_})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},D={className:"subst",begin:"\\$\\{",end:"\\}",keywords:R,contains:[]},M={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,D],subLanguage:"xml"}},B={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,D],subLanguage:"css"}},Y={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,D],subLanguage:"graphql"}},G={className:"string",begin:"`",end:"`",contains:[h.BACKSLASH_ESCAPE,D]},F={className:"comment",variants:[h.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:y+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),h.C_BLOCK_COMMENT_MODE,h.C_LINE_COMMENT_MODE]},H=[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE,M,B,Y,G,{match:/\$\d+/},$];D.contains=H.concat({begin:/\{/,end:/\}/,keywords:R,contains:["self"].concat(H)});const ee=[].concat(F,D.contains),K=ee.concat([{begin:/(\s*)\(/,end:/\)/,keywords:R,contains:["self"].concat(ee)}]),X={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:R,contains:K},V={variants:[{match:[/class/,/\s+/,y,/\s+/,/extends/,/\s+/,p.concat(y,"(",p.concat(/\./,y),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,y],scope:{1:"keyword",3:"title.class"}}]},re={relevance:0,match:p.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...a,...s]}},ue={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},Te={variants:[{match:[/function/,/\s+/,y,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[X],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function U(te){return p.concat("(?!",te.join("|"),")")}const q={match:p.concat(/\b/,U([...l,"super","import","await"].map(te=>`${te}\\s*\\(`)),y,p.lookahead(/\s*\(/)),className:"title.function",relevance:0},A={begin:p.concat(/\./,p.lookahead(p.concat(y,/(?![0-9A-Za-z$_(])/))),end:y,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ae={match:[/get|set/,/\s+/,y,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},X]},he="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+h.UNDERSCORE_IDENT_RE+")\\s*=>",ne={match:[/const|var|let/,/\s+/,y,/\s*/,/=\s*/,/(async\s*)?/,p.lookahead(he)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[X]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:R,exports:{PARAMS_CONTAINS:K,CLASS_REFERENCE:re},illegal:/#(?![$_A-Za-z])/,contains:[h.SHEBANG({label:"shebang",binary:"node",relevance:5}),ue,h.APOS_STRING_MODE,h.QUOTE_STRING_MODE,M,B,Y,G,F,{match:/\$\d+/},$,re,{scope:"attr",match:y+p.lookahead(":"),relevance:0},ne,{begin:"("+h.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[F,h.REGEXP_MODE,{className:"function",begin:he,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:h.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:R,contains:K}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:x.begin,end:x.end},{match:k},{begin:N.begin,"on:begin":N.isTrulyOpeningTag,end:N.end}],subLanguage:"xml",contains:[{begin:N.begin,end:N.end,skip:!0,contains:["self"]}]}]},Te,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+h.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[X,h.inherit(h.TITLE_MODE,{begin:y,className:"title.function"})]},{match:/\.\.\./,relevance:0},A,{match:"\\$"+y,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[X]},q,P,V,ae,{match:/\$[(.]/}]}}return bm=m,bm}var vm,Oy;function S_(){if(Oy)return vm;Oy=1;const t={scope:"number",match:"([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity",relevance:0};function n(a){const s={className:"attr",begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},l={match:/[{}[\],:]/,className:"punctuation",relevance:0},c=["true","false","null"],f={scope:"literal",beginKeywords:c.join(" ")};return{name:"JSON",aliases:["jsonc","json5"],keywords:{literal:c},contains:[s,l,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,f,t,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return vm=n,vm}var ym,Dy;function k_(){if(Dy)return ym;Dy=1;var e="[0-9](_*[0-9])*",t=`\\.(${e})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",a={className:"number",variants:[{begin:`(\\b(${e})((${t})|\\.)?|(${t}))[eE][+-]?(${e})[fFdD]?\\b`},{begin:`\\b(${e})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${e})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${e})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function s(l){const c={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},f={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},m={className:"symbol",begin:l.UNDERSCORE_IDENT_RE+"@"},h={className:"subst",begin:/\$\{/,end:/\}/,contains:[l.C_NUMBER_MODE]},p={className:"variable",begin:"\\$"+l.UNDERSCORE_IDENT_RE},b={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[p,h]},{begin:"'",end:"'",illegal:/\n/,contains:[l.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[l.BACKSLASH_ESCAPE,p,h]}]};h.contains.push(b);const y={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+l.UNDERSCORE_IDENT_RE+")?"},x={className:"meta",begin:"@"+l.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[l.inherit(b,{className:"string"}),"self"]}]},k=a,N=l.COMMENT("/\\*","\\*/",{contains:[l.C_BLOCK_COMMENT_MODE]}),R={variants:[{className:"type",begin:l.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},C=R;return C.variants[1].contains=[R],R.variants[1].contains=[C],{name:"Kotlin",aliases:["kt","kts"],keywords:c,contains:[l.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),l.C_LINE_COMMENT_MODE,N,f,m,y,x,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:c,relevance:5,contains:[{begin:l.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[l.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:c,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[R,l.C_LINE_COMMENT_MODE,N],relevance:0},l.C_LINE_COMMENT_MODE,N,y,x,b,l.C_NUMBER_MODE]},N]},{begin:[/class|interface|trait/,/\s+/,l.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},l.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},y,x]},b,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
306
|
-
`},k]}}return ym=s,ym}var xm,jy;function E_(){if(jy)return xm;jy=1;const e=p=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:p.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[p.APOS_STRING_MODE,p.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:p.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],a=[...t,...n],s=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),l=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),f=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),m=l.concat(c).sort().reverse();function h(p){const b=e(p),y=m,x="and or not only",k="[\\w-]+",N="("+k+"|@\\{"+k+"\\})",R=[],C=[],_=function(ee){return{className:"string",begin:"~?"+ee+".*?"+ee}},I=function(ee,K,X){return{className:ee,begin:K,relevance:X}},$={$pattern:/[a-z-]+/,keyword:x,attribute:s.join(" ")},D={begin:"\\(",end:"\\)",contains:C,keywords:$,relevance:0};C.push(p.C_LINE_COMMENT_MODE,p.C_BLOCK_COMMENT_MODE,_("'"),_('"'),b.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},b.UNICODE_RANGE,b.HEXCOLOR,D,I("variable","@@?"+k,10),I("variable","@\\{"+k+"\\}"),I("built_in","~?`[^`]*?`"),{className:"attribute",begin:k+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},b.IMPORTANT,{beginKeywords:"and not"},b.FUNCTION_DISPATCH);const M=C.concat({begin:/\{/,end:/\}/,contains:R}),B={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(C)},Y={begin:N+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},b.CSS_VARIABLE,{className:"attribute",begin:"\\b("+f.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:C}}]},G={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:$,returnEnd:!0,contains:C,relevance:0}},j={className:"variable",variants:[{begin:"@"+k+"\\s*:",relevance:15},{begin:"@"+k}],starts:{end:"[;}]",returnEnd:!0,contains:M}},F={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:N,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[p.C_LINE_COMMENT_MODE,p.C_BLOCK_COMMENT_MODE,B,I("keyword","all\\b"),I("variable","@\\{"+k+"\\}"),{begin:"\\b("+a.join("|")+")\\b",className:"selector-tag"},b.CSS_NUMBER_MODE,I("selector-tag",N,0),I("selector-id","#"+N),I("selector-class","\\."+N,0),I("selector-tag","&",0),b.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+l.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+c.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:M},{begin:"!important"},b.FUNCTION_DISPATCH]},H={begin:k+`:(:)?(${y.join("|")})`,returnBegin:!0,contains:[F]};return R.push(p.C_LINE_COMMENT_MODE,p.C_BLOCK_COMMENT_MODE,G,j,H,Y,F,B,b.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:R}}return xm=h,xm}var wm,Ly;function T_(){if(Ly)return wm;Ly=1;function e(t){const n="\\[=*\\[",a="\\]=*\\]",s={begin:n,end:a,contains:["self"]},l=[t.COMMENT("--(?!"+n+")","$"),t.COMMENT("--"+n,a,{contains:[s],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:t.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:l.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[t.inherit(t.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:l}].concat(l)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:n,end:a,contains:[s],relevance:5}])}}return wm=e,wm}var Sm,zy;function N_(){if(zy)return Sm;zy=1;function e(t){const n={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},a={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,n]},s={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[n,a]},l={begin:"^"+t.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},c={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},f={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[n]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[t.HASH_COMMENT_MODE,n,a,s,l,c,f]}}return Sm=e,Sm}var km,By;function C_(){if(By)return km;By=1;function e(t){const n=t.regex,a=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],s=/[dualxmsipngr]{0,12}/,l={$pattern:/[\w.]+/,keyword:a.join(" ")},c={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:l},f={begin:/->\{/,end:/\}/},m={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},h={scope:"variable",variants:[{begin:/\$\d/},{begin:n.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[m]},p={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},b=[t.BACKSLASH_ESCAPE,c,h],y=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],x=(R,C,_="\\1")=>{const I=_==="\\1"?_:n.concat(_,C);return n.concat(n.concat("(?:",R,")"),C,/(?:\\.|[^\\\/])*?/,I,/(?:\\.|[^\\\/])*?/,_,s)},k=(R,C,_)=>n.concat(n.concat("(?:",R,")"),C,/(?:\\.|[^\\\/])*?/,_,s),N=[h,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),f,{className:"string",contains:b,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},p,{begin:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:x("s|tr|y",n.either(...y,{capture:!0}))},{begin:x("s|tr|y","\\(","\\)")},{begin:x("s|tr|y","\\[","\\]")},{begin:x("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:k("(?:m|qr)?",/\//,/\//)},{begin:k("m|qr",n.either(...y,{capture:!0}),/\1/)},{begin:k("m|qr",/\(/,/\)/)},{begin:k("m|qr",/\[/,/\]/)},{begin:k("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,m]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,m,p]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return c.contains=N,f.contains=N,{name:"Perl",aliases:["pl","pm"],keywords:l,contains:N}}return km=e,km}var Em,Uy;function R_(){if(Uy)return Em;Uy=1;function e(t){const n={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},a=/[a-zA-Z@][a-zA-Z0-9_]*/,m={"variable.language":["this","super"],$pattern:a,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},h={$pattern:a,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:m,illegal:"</",contains:[n,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.C_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+h.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:h,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}}return Em=e,Em}var Tm,qy;function A_(){if(qy)return Tm;qy=1;function e(t){const n=t.regex,a=/(?![A-Za-z0-9])(?![$])/,s=n.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,a),l=n.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,a),c=n.concat(/[A-Z]+/,a),f={scope:"variable",match:"\\$+"+s},m={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},h={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},p=t.inherit(t.APOS_STRING_MODE,{illegal:null}),b=t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(h)}),y={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(h),"on:begin":(X,V)=>{V.data._beginMatch=X[1]||X[2]},"on:end":(X,V)=>{V.data._beginMatch!==X[1]&&V.ignoreMatch()}},x=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),k=`[
|
|
307
|
-
]`,N={scope:"string",variants:[b,p,y,x]},R={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},C=["false","null","true"],_=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],I=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],D={keyword:_,literal:(X=>{const V=[];return X.forEach(re=>{V.push(re),re.toLowerCase()===re?V.push(re.toUpperCase()):V.push(re.toLowerCase())}),V})(C),built_in:I},M=X=>X.map(V=>V.replace(/\|\d+$/,"")),B={variants:[{match:[/new/,n.concat(k,"+"),n.concat("(?!",M(I).join("\\b|"),"\\b)"),l],scope:{1:"keyword",4:"title.class"}}]},Y=n.concat(s,"\\b(?!\\()"),G={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),Y],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[l,n.concat(/::/,n.lookahead(/(?!class\b)/)),Y],scope:{1:"title.class",3:"variable.constant"}},{match:[l,n.concat("::",n.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[l,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},j={scope:"attr",match:n.concat(s,n.lookahead(":"),n.lookahead(/(?!::)/))},F={relevance:0,begin:/\(/,end:/\)/,keywords:D,contains:[j,f,G,t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE,t.HASH_COMMENT_MODE,N,R,B]},H={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",M(_).join("\\b|"),"|",M(I).join("\\b|"),"\\b)"),s,n.concat(k,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[F]};F.contains.push(H);const ee=[j,G,t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE,t.HASH_COMMENT_MODE,N,R,B],K={begin:n.concat(/#\[\s*\\?/,n.either(l,c)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:C,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:C,keyword:["new","array"]},contains:["self",...ee]},...ee,{scope:"meta",variants:[{match:l},{match:c}]}]};return{case_insensitive:!1,keywords:D,contains:[K,t.HASH_COMMENT_MODE,t.COMMENT("//","$"),t.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:t.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},m,{scope:"variable.language",match:/\$this\b/},f,H,G,{match:[/const/,/\s/,s],scope:{1:"keyword",3:"variable.constant"}},B,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:D,contains:["self",K,f,G,t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE,t.HASH_COMMENT_MODE,N,R]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},N,R]}}return Tm=e,Tm}var Nm,Hy;function __(){if(Hy)return Nm;Hy=1;function e(t){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},t.inherit(t.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}return Nm=e,Nm}var Cm,Fy;function I_(){if(Fy)return Cm;Fy=1;function e(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return Cm=e,Cm}var Rm,Py;function M_(){if(Py)return Rm;Py=1;function e(t){const n=t.regex,a=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),s=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],m={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:s,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},h={className:"meta",begin:/^(>>>|\.\.\.) /},p={className:"subst",begin:/\{/,end:/\}/,keywords:m,illegal:/#/},b={begin:/\{\{/,relevance:0},y={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,h,b,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,h,b,p]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,b,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,b,p]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},x="[0-9](_?[0-9])*",k=`(\\b(${x}))?\\.(${x})|\\b(${x})\\.`,N=`\\b|${s.join("|")}`,R={className:"number",relevance:0,variants:[{begin:`(\\b(${x})|(${k}))[eE][+-]?(${x})[jJ]?(?=${N})`},{begin:`(${k})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${N})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${N})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${N})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${N})`},{begin:`\\b(${x})[jJ](?=${N})`}]},C={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:m,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},_={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:["self",h,R,y,t.HASH_COMMENT_MODE]}]};return p.contains=[y,R,h],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:m,illegal:/(<\/|\?)|=>/,contains:[h,R,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},y,C,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[_]},{variants:[{match:[/\bclass/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/\bclass/,/\s+/,a]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[R,_,y]}]}}return Rm=e,Rm}var Am,$y;function O_(){if($y)return Am;$y=1;function e(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return Am=e,Am}var _m,Gy;function D_(){if(Gy)return _m;Gy=1;function e(t){const n=t.regex,a=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,s=n.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),l=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,c=n.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:a,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[t.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:n.lookahead(n.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:a},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),t.HASH_COMMENT_MODE,{scope:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[l,s]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,s]},{scope:{1:"punctuation",2:"number"},match:[c,s]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,s]}]},{scope:{3:"operator"},match:[a,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:l},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:c},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return _m=e,_m}var Im,Vy;function j_(){if(Vy)return Im;Vy=1;function e(t){const n=t.regex,a=/(r#)?/,s=n.concat(a,t.UNDERSCORE_IDENT_RE),l=n.concat(a,t.IDENT_RE),c={className:"title.function.invoke",relevance:0,begin:n.concat(/\b/,/(?!let|for|while|if|else|match\b)/,l,n.lookahead(/\s*\(/))},f="([ui](8|16|32|64|128|size)|f(32|64))?",m=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],h=["true","false","Some","None","Ok","Err"],p=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],b=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:t.IDENT_RE+"!?",type:b,keyword:m,literal:h,built_in:p},illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*","\\*/",{contains:["self"]}),t.inherit(t.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+f},{begin:"\\b0o([0-7_]+)"+f},{begin:"\\b0x([A-Fa-f0-9_]+)"+f},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+f}],relevance:0},{begin:[/fn/,/\s+/,s],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,s],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,s,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,s],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,s],className:{1:"keyword",3:"title.class"}},{begin:t.IDENT_RE+"::",keywords:{keyword:"Self",built_in:p,type:b}},{className:"punctuation",begin:"->"},c]}}return Im=e,Im}var Mm,Ky;function L_(){if(Ky)return Mm;Ky=1;const e=h=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:h.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:h.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),t=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],a=[...t,...n],s=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),l=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),c=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),f=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function m(h){const p=e(h),b=c,y=l,x="@[a-z-]+",k="and or not only",R={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[h.C_LINE_COMMENT_MODE,h.C_BLOCK_COMMENT_MODE,p.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},p.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+a.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+y.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+b.join("|")+")"},R,{begin:/\(/,end:/\)/,contains:[p.CSS_NUMBER_MODE]},p.CSS_VARIABLE,{className:"attribute",begin:"\\b("+f.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[p.BLOCK_COMMENT,R,p.HEXCOLOR,p.CSS_NUMBER_MODE,p.UNICODE_RANGE,h.QUOTE_STRING_MODE,h.APOS_STRING_MODE,p.IMPORTANT,p.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:x,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:k,attribute:s.join(" ")},contains:[{begin:x,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},R,h.QUOTE_STRING_MODE,h.APOS_STRING_MODE,p.HEXCOLOR,p.CSS_NUMBER_MODE]},p.FUNCTION_DISPATCH]}}return Mm=m,Mm}var Om,Yy;function z_(){if(Yy)return Om;Yy=1;function e(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return Om=e,Om}var Dm,Xy;function B_(){if(Xy)return Dm;Xy=1;function e(t){const n=t.regex,a=t.COMMENT("--","$"),s={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},l={begin:/"/,end:/"/,contains:[{match:/""/}]},c=["true","false","unknown"],f=["double precision","large object","with timezone","without timezone"],m=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],h=["add","asc","collation","desc","final","first","last","view"],p=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],b=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],y=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],x=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],k=b,N=[...p,...h].filter(M=>!b.includes(M)),R={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},C={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:n.concat(/\b/,n.either(...k),/\s*\(/),relevance:0,keywords:{built_in:k}};function I(M){return n.concat(/\b/,n.either(...M.map(B=>B.replace(/\s+/,"\\s+"))),/\b/)}const $={scope:"keyword",match:I(x),relevance:0};function D(M,{exceptions:B,when:Y}={}){const G=Y;return B=B||[],M.map(j=>j.match(/\|\d+$/)||B.includes(j)?j:G(j)?`${j}|0`:j)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:D(N,{when:M=>M.length<3}),literal:c,type:m,built_in:y},contains:[{scope:"type",match:I(f)},$,_,R,s,l,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,a,C]}}return Dm=e,Dm}var jm,Zy;function U_(){if(Zy)return jm;Zy=1;function e(Y){return Y?typeof Y=="string"?Y:Y.source:null}function t(Y){return n("(?=",Y,")")}function n(...Y){return Y.map(j=>e(j)).join("")}function a(Y){const G=Y[Y.length-1];return typeof G=="object"&&G.constructor===Object?(Y.splice(Y.length-1,1),G):{}}function s(...Y){return"("+(a(Y).capture?"":"?:")+Y.map(F=>e(F)).join("|")+")"}const l=Y=>n(/\b/,Y,/\w$/.test(Y)?/\b/:/\B/),c=["Protocol","Type"].map(l),f=["init","self"].map(l),m=["Any","Self"],h=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],p=["false","nil","true"],b=["assignment","associativity","higherThan","left","lowerThan","none","right"],y=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],x=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],k=s(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),N=s(k,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),R=n(k,N,"*"),C=s(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),_=s(C,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),I=n(C,_,"*"),$=n(/[A-Z]/,_,"*"),D=["attached","autoclosure",n(/convention\(/,s("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",n(/objc\(/,I,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],M=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function B(Y){const G={match:/\s+/,relevance:0},j=Y.COMMENT("/\\*","\\*/",{contains:["self"]}),F=[Y.C_LINE_COMMENT_MODE,j],H={match:[/\./,s(...c,...f)],className:{2:"keyword"}},ee={match:n(/\./,s(...h)),relevance:0},K=h.filter(Ke=>typeof Ke=="string").concat(["_|0"]),X=h.filter(Ke=>typeof Ke!="string").concat(m).map(l),V={variants:[{className:"keyword",match:s(...X,...f)}]},re={$pattern:s(/\b\w+/,/#\w+/),keyword:K.concat(y),literal:p},ue=[H,ee,V],Te={match:n(/\./,s(...x)),relevance:0},P={className:"built_in",match:n(/\b/,s(...x),/(?=\()/)},U=[Te,P],q={match:/->/,relevance:0},A={className:"operator",relevance:0,variants:[{match:R},{match:`\\.(\\.|${N})+`}]},ae=[q,A],he="([0-9]_*)+",ne="([0-9a-fA-F]_*)+",te={className:"number",relevance:0,variants:[{match:`\\b(${he})(\\.(${he}))?([eE][+-]?(${he}))?\\b`},{match:`\\b0x(${ne})(\\.(${ne}))?([pP][+-]?(${he}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},ce=(Ke="")=>({className:"subst",variants:[{match:n(/\\/,Ke,/[0\\tnr"']/)},{match:n(/\\/,Ke,/u\{[0-9a-fA-F]{1,8}\}/)}]}),ge=(Ke="")=>({className:"subst",match:n(/\\/,Ke,/[\t ]*(?:[\r\n]|\r\n)/)}),Re=(Ke="")=>({className:"subst",label:"interpol",begin:n(/\\/,Ke,/\(/),end:/\)/}),je=(Ke="")=>({begin:n(Ke,/"""/),end:n(/"""/,Ke),contains:[ce(Ke),ge(Ke),Re(Ke)]}),be=(Ke="")=>({begin:n(Ke,/"/),end:n(/"/,Ke),contains:[ce(Ke),Re(Ke)]}),qe={className:"string",variants:[je(),je("#"),je("##"),je("###"),be(),be("#"),be("##"),be("###")]},Ve=[Y.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[Y.BACKSLASH_ESCAPE]}],tt={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:Ve},nt=Ke=>{const gt=n(Ke,/\//),ct=n(/\//,Ke);return{begin:gt,end:ct,contains:[...Ve,{scope:"comment",begin:`#(?!.*${ct})`,end:/$/}]}},Ut={scope:"regexp",variants:[nt("###"),nt("##"),nt("#"),tt]},Rt={match:n(/`/,I,/`/)},ut={className:"variable",match:/\$\d+/},Ge={className:"variable",match:`\\$${_}+`},Bt=[Rt,ut,Ge],Kt={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:M,contains:[...ae,te,qe]}]}},hn={scope:"keyword",match:n(/@/,s(...D),t(s(/\(/,/\s+/)))},Je={scope:"meta",match:n(/@/,I)},tn=[Kt,hn,Je],pe={match:t(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:n(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,_,"+")},{className:"type",match:$,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:n(/\s+&\s+/,t($)),relevance:0}]},Se={begin:/</,end:/>/,keywords:re,contains:[...F,...ue,...tn,q,pe]};pe.contains.push(Se);const Fe={match:n(I,/\s*:/),keywords:"_|0",relevance:0},_e={begin:/\(/,end:/\)/,relevance:0,keywords:re,contains:["self",Fe,...F,Ut,...ue,...U,...ae,te,qe,...Bt,...tn,pe]},He={begin:/</,end:/>/,keywords:"repeat each",contains:[...F,pe]},vt={begin:s(t(n(I,/\s*:/)),t(n(I,/\s+/,I,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:I}]},jt={begin:/\(/,end:/\)/,keywords:re,contains:[vt,...F,...ue,...ae,te,qe,...tn,pe,_e],endsParent:!0,illegal:/["']/},Lt={match:[/(func|macro)/,/\s+/,s(Rt.match,I,R)],className:{1:"keyword",3:"title.function"},contains:[He,jt,G],illegal:[/\[/,/%/]},yt={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[He,jt,G],illegal:/\[|%/},ot={match:[/operator/,/\s+/,R],className:{1:"keyword",3:"title"}},mt={begin:[/precedencegroup/,/\s+/,$],className:{1:"keyword",3:"title"},contains:[pe],keywords:[...b,...p],end:/}/},Un={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},un={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},rt={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,I,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:re,contains:[He,...ue,{begin:/:/,end:/\{/,keywords:re,contains:[{scope:"title.class.inherited",match:$},...ue],relevance:0}]};for(const Ke of qe.variants){const gt=Ke.contains.find(Ft=>Ft.label==="interpol");gt.keywords=re;const ct=[...ue,...U,...ae,te,qe,...Bt];gt.contains=[...ct,{begin:/\(/,end:/\)/,contains:["self",...ct]}]}return{name:"Swift",keywords:re,contains:[...F,Lt,yt,Un,un,rt,ot,mt,{beginKeywords:"import",end:/$/,contains:[...F],relevance:0},Ut,...ue,...U,...ae,te,qe,...Bt,...tn,pe,_e]}}return jm=B,jm}var Lm,Wy;function q_(){if(Wy)return Lm;Wy=1;function e(t){const n="true false yes no null",a="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},l={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},c={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},f={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,l]},m=t.inherit(f,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),x={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},k={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},N={begin:/\{/,end:/\}/,contains:[k],illegal:"\\n",relevance:0},R={begin:"\\[",end:"\\]",contains:[k],illegal:"\\n",relevance:0},C=[s,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type",begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},x,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},N,R,c,f],_=[...C];return _.pop(),_.push(m),k.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:C}}return Lm=e,Lm}var zm,Qy;function H_(){if(Qy)return zm;Qy=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",t=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],a=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],l=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],f=[].concat(l,a,s);function m(p){const b=p.regex,y=(ce,{after:ge})=>{const Re="</"+ce[0].slice(1);return ce.input.indexOf(Re,ge)!==-1},x=e,k={begin:"<>",end:"</>"},N=/<[A-Za-z0-9\\._:-]+\s*\/>/,R={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ce,ge)=>{const Re=ce[0].length+ce.index,je=ce.input[Re];if(je==="<"||je===","){ge.ignoreMatch();return}je===">"&&(y(ce,{after:Re})||ge.ignoreMatch());let be;const qe=ce.input.substring(Re);if(be=qe.match(/^\s*=/)){ge.ignoreMatch();return}if((be=qe.match(/^\s+extends\s+/))&&be.index===0){ge.ignoreMatch();return}}},C={$pattern:e,keyword:t,literal:n,built_in:f,"variable.language":c},_="[0-9](_?[0-9])*",I=`\\.(${_})`,$="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",D={className:"number",variants:[{begin:`(\\b(${$})((${I})|\\.)?|(${I}))[eE][+-]?(${_})\\b`},{begin:`\\b(${$})\\b((${I})\\b|\\.)?|(${I})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},M={className:"subst",begin:"\\$\\{",end:"\\}",keywords:C,contains:[]},B={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[p.BACKSLASH_ESCAPE,M],subLanguage:"xml"}},Y={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[p.BACKSLASH_ESCAPE,M],subLanguage:"css"}},G={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[p.BACKSLASH_ESCAPE,M],subLanguage:"graphql"}},j={className:"string",begin:"`",end:"`",contains:[p.BACKSLASH_ESCAPE,M]},H={className:"comment",variants:[p.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:x+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),p.C_BLOCK_COMMENT_MODE,p.C_LINE_COMMENT_MODE]},ee=[p.APOS_STRING_MODE,p.QUOTE_STRING_MODE,B,Y,G,j,{match:/\$\d+/},D];M.contains=ee.concat({begin:/\{/,end:/\}/,keywords:C,contains:["self"].concat(ee)});const K=[].concat(H,M.contains),X=K.concat([{begin:/(\s*)\(/,end:/\)/,keywords:C,contains:["self"].concat(K)}]),V={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:C,contains:X},re={variants:[{match:[/class/,/\s+/,x,/\s+/,/extends/,/\s+/,b.concat(x,"(",b.concat(/\./,x),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,x],scope:{1:"keyword",3:"title.class"}}]},ue={relevance:0,match:b.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...a,...s]}},Te={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,x,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[V],illegal:/%/},U={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function q(ce){return b.concat("(?!",ce.join("|"),")")}const A={match:b.concat(/\b/,q([...l,"super","import","await"].map(ce=>`${ce}\\s*\\(`)),x,b.lookahead(/\s*\(/)),className:"title.function",relevance:0},ae={begin:b.concat(/\./,b.lookahead(b.concat(x,/(?![0-9A-Za-z$_(])/))),end:x,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},he={match:[/get|set/,/\s+/,x,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},V]},ne="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+p.UNDERSCORE_IDENT_RE+")\\s*=>",te={match:[/const|var|let/,/\s+/,x,/\s*/,/=\s*/,/(async\s*)?/,b.lookahead(ne)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[V]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:C,exports:{PARAMS_CONTAINS:X,CLASS_REFERENCE:ue},illegal:/#(?![$_A-Za-z])/,contains:[p.SHEBANG({label:"shebang",binary:"node",relevance:5}),Te,p.APOS_STRING_MODE,p.QUOTE_STRING_MODE,B,Y,G,j,H,{match:/\$\d+/},D,ue,{scope:"attr",match:x+b.lookahead(":"),relevance:0},te,{begin:"("+p.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[H,p.REGEXP_MODE,{className:"function",begin:ne,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:p.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:C,contains:X}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:k.begin,end:k.end},{match:N},{begin:R.begin,"on:begin":R.isTrulyOpeningTag,end:R.end}],subLanguage:"xml",contains:[{begin:R.begin,end:R.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+p.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[V,p.inherit(p.TITLE_MODE,{begin:x,className:"title.function"})]},{match:/\.\.\./,relevance:0},ae,{match:"\\$"+x,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[V]},A,U,re,he,{match:/\$[(.]/}]}}function h(p){const b=p.regex,y=m(p),x=e,k=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],N={begin:[/namespace/,/\s+/,p.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},R={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:k},contains:[y.exports.CLASS_REFERENCE]},C={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},_=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],I={$pattern:e,keyword:t.concat(_),literal:n,built_in:f.concat(k),"variable.language":c},$={className:"meta",begin:"@"+x},D=(G,j,F)=>{const H=G.contains.findIndex(ee=>ee.label===j);if(H===-1)throw new Error("can not find mode to replace");G.contains.splice(H,1,F)};Object.assign(y.keywords,I),y.exports.PARAMS_CONTAINS.push($);const M=y.contains.find(G=>G.scope==="attr"),B=Object.assign({},M,{match:b.concat(x,b.lookahead(/\s*\?:/))});y.exports.PARAMS_CONTAINS.push([y.exports.CLASS_REFERENCE,M,B]),y.contains=y.contains.concat([$,N,R,B]),D(y,"shebang",p.SHEBANG()),D(y,"use_strict",C);const Y=y.contains.find(G=>G.label==="func.def");return Y.relevance=0,Object.assign(y,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),y}return zm=h,zm}var Bm,Jy;function F_(){if(Jy)return Bm;Jy=1;function e(t){const n=t.regex,a={className:"string",begin:/"(""|[^/n])"C\b/},s={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},l=/\d{1,2}\/\d{1,2}\/\d{4}/,c=/\d{4}-\d{1,2}-\d{1,2}/,f=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,m=/\d{1,2}(:\d{1,2}){1,2}/,h={className:"literal",variants:[{begin:n.concat(/# */,n.either(c,l),/ *#/)},{begin:n.concat(/# */,m,/ *#/)},{begin:n.concat(/# */,f,/ *#/)},{begin:n.concat(/# */,n.either(c,l),/ +/,n.either(f,m),/ *#/)}]},p={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},b={className:"label",begin:/^\w+:/},y=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),x=t.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[a,s,h,p,b,y,x,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[x]}]}}return Bm=e,Bm}var Um,e2;function P_(){if(e2)return Um;e2=1;function e(t){t.regex;const n=t.COMMENT(/\(;/,/;\)/);n.contains.push("self");const a=t.COMMENT(/;;/,/$/),s=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],l={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},c={className:"variable",begin:/\$[\w_]+/},f={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},m={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},h={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},p={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:s},contains:[a,n,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},c,f,l,t.QUOTE_STRING_MODE,h,p,m]}}return Um=e,Um}var qm,t2;function $_(){if(t2)return qm;t2=1;var e=l_();return e.registerLanguage("xml",o_()),e.registerLanguage("bash",c_()),e.registerLanguage("c",u_()),e.registerLanguage("cpp",d_()),e.registerLanguage("csharp",f_()),e.registerLanguage("css",m_()),e.registerLanguage("markdown",h_()),e.registerLanguage("diff",p_()),e.registerLanguage("ruby",g_()),e.registerLanguage("go",b_()),e.registerLanguage("graphql",v_()),e.registerLanguage("ini",y_()),e.registerLanguage("java",x_()),e.registerLanguage("javascript",w_()),e.registerLanguage("json",S_()),e.registerLanguage("kotlin",k_()),e.registerLanguage("less",E_()),e.registerLanguage("lua",T_()),e.registerLanguage("makefile",N_()),e.registerLanguage("perl",C_()),e.registerLanguage("objectivec",R_()),e.registerLanguage("php",A_()),e.registerLanguage("php-template",__()),e.registerLanguage("plaintext",I_()),e.registerLanguage("python",M_()),e.registerLanguage("python-repl",O_()),e.registerLanguage("r",D_()),e.registerLanguage("rust",j_()),e.registerLanguage("scss",L_()),e.registerLanguage("shell",z_()),e.registerLanguage("sql",B_()),e.registerLanguage("swift",U_()),e.registerLanguage("yaml",q_()),e.registerLanguage("typescript",H_()),e.registerLanguage("vbnet",F_()),e.registerLanguage("wasm",P_()),e.HighlightJS=e,e.default=e,qm=e,qm}var G_=$_();const n2=qu(G_),N6=/^(javascript|vbscript|data):/i;function V_(e){if(!e)return!1;const t=e.trim();return!(!t||N6.test(t))}function K_(e){if(!e)return!1;const t=e.trim();return!t||N6.test(t)||t.startsWith("blob:")||t.startsWith("data:image/")||/^https?:\/\//i.test(t)?!1:!!(t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||!/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(t))}const Y_=[[NC,{singleTilde:!1}],[RA,{singleDollarTextMath:!0}]],X_=[s_];let Hm=null,r2=null;async function Z_(){return Hm||(r2??=sS(()=>import("./mermaid.core-Biyo-tqA.js").then(e=>e.bp),[]).then(e=>{e.default.initialize({startOnLoad:!1,securityLevel:"strict",theme:"neutral"});const t=async(n,a)=>{const{svg:s}=await e.default.render(`oc-mermaid-${Math.random().toString(36).slice(2,10)}`,a);n.innerHTML=s};return Hm=t,t}).catch(()=>null),r2)}function W_({code:e}){const t=S.useRef(null),[n,a]=S.useState(!1);return S.useEffect(()=>{let s=!1;return Z_().then(l=>{if(s||!l||!t.current){l||a(!0);return}l(t.current,e).catch(()=>{s||a(!0)})}),()=>{s=!0}},[e]),n?u.jsx(_h,{lang:"mermaid",text:e}):u.jsx("div",{className:"oc-mermaid",ref:t,role:"img","aria-label":"Mermaid 图表"})}function _h({lang:e,text:t,children:n}){const[a,s]=S.useState(!1),l=S.useMemo(()=>{const f=n2.getLanguage(e)?e:"";return f?n2.highlight(t,{language:f,ignoreIllegals:!0}).value:void 0},[e,t]),c=()=>{navigator.clipboard?.writeText(t).then(()=>{s(!0),window.setTimeout(()=>s(!1),1600)},()=>{})};return u.jsxs("div",{className:"oc-codeblock",children:[u.jsxs("div",{className:"oc-codeblock-head",children:[u.jsx("span",{className:"oc-codeblock-lang",children:e||"text"}),u.jsx("button",{type:"button",className:"oc-codeblock-copy",onClick:c,children:a?"已复制":"复制"})]}),u.jsx("pre",{children:l!==void 0?u.jsx("code",{className:`hljs language-${e}`,dangerouslySetInnerHTML:{__html:l}}):u.jsx("code",{className:e?`hljs language-${e}`:"hljs",children:n??t})})]})}function Ih(e){if(e==null||typeof e=="boolean")return"";if(typeof e=="string"||typeof e=="number")return String(e);if(Array.isArray(e))return e.map(Ih).join("");if(typeof e=="object"&&"props"in e){const t=e.props;return Ih(t?.children)}return""}const Q_={pre({children:e}){return u.jsx(u.Fragment,{children:e})},code({className:e,children:t,...n}){const a=Ih(t).replace(/\n$/,""),s=/language-([\w-]+)/.exec(e??"");return s?.[1]==="mermaid"?u.jsx(W_,{code:a}):s||e&&a.includes(`
|
|
308
|
-
`)?u.jsx(_h,{lang:s?.[1]??"",text:a}):a.includes(`
|
|
309
|
-
`)?u.jsx(_h,{lang:"",text:a}):u.jsx("code",{className:e,...n,children:t})},a({href:e,children:t,...n}){if(!V_(e))return u.jsx("span",{...n,children:t});const a=/^https?:\/\//i.test(e??"");return u.jsx("a",{href:e,...a?{target:"_blank",rel:"noopener noreferrer"}:{},...n,children:t})},img({src:e,alt:t}){return K_(e)?u.jsxs(u.Fragment,{children:[u.jsx("img",{src:e,alt:t??"",loading:"lazy",onError:n=>{const a=n.currentTarget;a.hidden=!0,a.nextElementSibling?.removeAttribute("hidden")}}),u.jsx("span",{className:"oc-md-img-fallback",hidden:!0,title:e??void 0,children:t?`[图片加载失败: ${t}]`:"[图片加载失败]"})]}):u.jsx("span",{className:"oc-md-img-fallback",title:e??void 0,children:t?`[图片: ${t}]`:"[图片已屏蔽]"})},table({children:e}){return u.jsx("div",{className:"oc-md-table-wrap",children:u.jsx("table",{children:e})})},input(e){return e.type==="checkbox"?u.jsx("input",{type:"checkbox",checked:!!e.checked,disabled:!0,readOnly:!0}):u.jsx("input",{...e,disabled:!0,readOnly:!0})}};class J_ extends S.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){}componentDidUpdate(t){t.text!==this.props.text&&this.state.hasError&&this.setState({hasError:!1})}render(){return this.state.hasError?u.jsx("div",{className:"oc-md",children:u.jsx("pre",{className:"oc-md-fallback",children:this.props.text})}):this.props.children}}function Mh({text:e}){try{return u.jsx(J_,{text:e,children:u.jsx("div",{className:"oc-md",children:u.jsx(hT,{remarkPlugins:Y_,rehypePlugins:X_,components:Q_,children:e})})})}catch{return u.jsx("div",{className:"oc-md",children:u.jsx("pre",{className:"oc-md-fallback",children:e})})}}const a2="无法在浏览器中打开:弹窗被拦截",eI="内容已截断,以下为已加载片段。";function tI(e){const t=e?.availWidth??1440,n=e?.availHeight??900,a=Math.min(1280,Math.max(880,Math.floor(t*.82))),s=Math.min(960,Math.max(640,Math.floor(n*.88)));return["popup=yes",`width=${a}`,`height=${s}`,"left=72","top=36","menubar=yes","toolbar=yes","location=yes","status=yes","resizable=yes","scrollbars=yes"].join(",")}function Js(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function c0(e){return e.trim().toLowerCase()}function nI(e){const t=c0(e);return t==="html"||t==="htm"}function rI(e){const t=c0(e);return t==="md"||t==="markdown"}function aI(e){if(c0(e.language)!=="json")return e.content;try{return JSON.stringify(JSON.parse(e.content),null,2)}catch{return e.content}}function iI(e){return/^https?:\/\//i.test(e.trim())}function po(e){const t=[];return e.replace(/`([^`]+)`/g,(l,c)=>(t.push(`<code>${c}</code>`),`\0${t.length-1}\0`)).replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,(l,c,f)=>iI(f)?`<a href="${f}" rel="noopener noreferrer" target="_blank">${c}</a>`:c).replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/__([^_]+)__/g,"<strong>$1</strong>").replace(/\*([^*]+)\*/g,"<em>$1</em>").replace(/\u0000(\d+)\u0000/g,(l,c)=>t[Number(c)]??"")}function sI(e){return e.length?`<p>${po(e.join(" "))}</p>`:""}function i2(e){const t=e.replaceAll(`\r
|
|
310
|
-
`,`
|
|
311
|
-
`).split(`
|
|
312
|
-
`),n=[];let a=[],s=null;const l=()=>{s&&(n.push(s==="ul"?"</ul>":"</ol>"),s=null)},c=()=>{a.length&&(n.push(sI(a)),a=[])};for(const f of t){const m=/^(#{1,6})\s+(.+)$/.exec(f);if(m){c(),l();const y=m[1].length;n.push(`<h${y}>${po(m[2])}</h${y}>`);continue}if(/^---+$/.test(f.trim())||/^\*\*\*+$/.test(f.trim())){c(),l(),n.push("<hr>");continue}const h=/^>\s?(.*)$/.exec(f);if(h){c(),l(),n.push(`<blockquote><p>${po(h[1]??"")}</p></blockquote>`);continue}const p=/^[-*]\s+(.+)$/.exec(f);if(p){c(),s!=="ul"&&(l(),n.push("<ul>"),s="ul"),n.push(`<li>${po(p[1])}</li>`);continue}const b=/^\d+\.\s+(.+)$/.exec(f);if(b){c(),s!=="ol"&&(l(),n.push("<ol>"),s="ol"),n.push(`<li>${po(b[1])}</li>`);continue}if(f.trim()===""){c(),l();continue}l(),a.push(f)}return c(),l(),n.join(`
|
|
313
|
-
`)}function lI(e){const t=Js(e),n=[],a=/```([^\n`]*)\n([\s\S]*?)```/g;let s=0,l;for(;l=a.exec(t);)l.index>s&&n.push(i2(t.slice(s,l.index))),n.push(`<pre class="md-code"><code>${l[2]??""}</code></pre>`),s=l.index+l[0].length;return s<t.length&&n.push(i2(t.slice(s))),n.filter(Boolean).join(`
|
|
314
|
-
`)}function oI(){return`
|
|
315
|
-
:root { color-scheme: light dark; }
|
|
316
|
-
html, body { margin: 0; min-height: 100%; background: #f7f5f0; color: #1f1b16; }
|
|
317
|
-
body { font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
|
|
318
|
-
.bar { position: sticky; top: 0; z-index: 1; display: flex; gap: 12px; align-items: center; padding: 10px 16px 10px 20px; border-bottom: 1px solid #e4ddd2; background: #fffdf8; }
|
|
319
|
-
.bar .meta { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
|
|
320
|
-
.bar strong { font-size: 13px; font-weight: 650; word-break: break-all; }
|
|
321
|
-
.bar .kind { color: #6b6258; font-size: 12px; }
|
|
322
|
-
.modes { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid #e4ddd2; border-radius: 8px; background: #f3eee6; }
|
|
323
|
-
.modes button { appearance: none; border: 0; background: transparent; color: #6b6258; font: 12px/1.2 inherit; padding: 5px 10px; border-radius: 6px; cursor: pointer; }
|
|
324
|
-
.modes button:hover { color: #1f1b16; }
|
|
325
|
-
.modes button.is-active { background: #fff; color: #1f1b16; font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / 8%); }
|
|
326
|
-
.notice { margin: 0; padding: 8px 20px; background: #fff6d8; color: #5c4b00; font-size: 13px; }
|
|
327
|
-
.pane { display: none; }
|
|
328
|
-
.pane.is-active { display: block; }
|
|
329
|
-
.doc { max-width: 52rem; margin: 0 auto; padding: 32px 24px 96px; }
|
|
330
|
-
.doc.md h1, .doc.md h2, .doc.md h3, .doc.md h4 { line-height: 1.25; margin: 1.4em 0 0.5em; }
|
|
331
|
-
.doc.md h1 { font-size: 2rem; }
|
|
332
|
-
.doc.md h2 { font-size: 1.45rem; }
|
|
333
|
-
.doc.md p { margin: 0.8em 0; }
|
|
334
|
-
.doc.md ul, .doc.md ol { margin: 0.6em 0; padding-left: 1.4em; }
|
|
335
|
-
.doc.md blockquote { margin: 0.8em 0; padding: 0.2em 0.9em; border-left: 3px solid #d9cfc0; color: #4a433c; }
|
|
336
|
-
.doc.md hr { border: 0; border-top: 1px solid #e4ddd2; margin: 1.6em 0; }
|
|
337
|
-
.doc.md a { color: #0b57d0; }
|
|
338
|
-
.doc.md code, .md-code, .source { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
|
|
339
|
-
.doc.md :not(pre) > code { padding: 0.1em 0.35em; border-radius: 4px; background: #efe8dc; }
|
|
340
|
-
.md-code, .source { margin: 1em 0; padding: 14px 16px; overflow: auto; white-space: pre-wrap; background: #fff; border: 1px solid #e4ddd2; border-radius: 8px; }
|
|
341
|
-
.frame { margin: 0; padding: 0; }
|
|
342
|
-
iframe.page { display: block; width: 100%; height: calc(100vh - 53px); border: 0; background: #fff; }
|
|
343
|
-
`.trim()}function C6(e){return Js(aI(e))}function cI(e){return nI(e.language)?`<div class="frame"><iframe class="page" sandbox="" srcdoc="${Js(e.content)}"></iframe></div>`:rI(e.language)?`<article class="doc md">${lI(e.content)}</article>`:`<article class="doc"><pre class="source">${C6(e)}</pre></article>`}function uI(e){return`<article class="doc"><pre class="source">${C6(e)}</pre></article>`}function dI(){return`<script>
|
|
344
|
-
(function () {
|
|
345
|
-
var previewBtn = document.getElementById("view-preview");
|
|
346
|
-
var sourceBtn = document.getElementById("view-source");
|
|
347
|
-
var previewPane = document.getElementById("pane-preview");
|
|
348
|
-
var sourcePane = document.getElementById("pane-source");
|
|
349
|
-
if (!previewBtn || !sourceBtn || !previewPane || !sourcePane) return;
|
|
350
|
-
function show(mode) {
|
|
351
|
-
var source = mode === "source";
|
|
352
|
-
previewBtn.classList.toggle("is-active", !source);
|
|
353
|
-
sourceBtn.classList.toggle("is-active", source);
|
|
354
|
-
previewBtn.setAttribute("aria-pressed", String(!source));
|
|
355
|
-
sourceBtn.setAttribute("aria-pressed", String(source));
|
|
356
|
-
previewPane.classList.toggle("is-active", !source);
|
|
357
|
-
sourcePane.classList.toggle("is-active", source);
|
|
358
|
-
}
|
|
359
|
-
previewBtn.addEventListener("click", function () { show("preview"); });
|
|
360
|
-
sourceBtn.addEventListener("click", function () { show("source"); });
|
|
361
|
-
})();
|
|
362
|
-
<\/script>`}function fI(e){const t=Js(e.path),n=e.truncated?`<p class="notice">${Js(eI)}</p>`:"",a=c0(e.language);return`<!doctype html>
|
|
363
|
-
<html lang="zh-CN">
|
|
364
|
-
<head>
|
|
365
|
-
<meta charset="utf-8">
|
|
366
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
367
|
-
<title>${t}</title>
|
|
368
|
-
<style>
|
|
369
|
-
${oI()}
|
|
370
|
-
</style>
|
|
371
|
-
</head>
|
|
372
|
-
<body>
|
|
373
|
-
<header class="bar">
|
|
374
|
-
<div class="meta">
|
|
375
|
-
<strong>${t}</strong>
|
|
376
|
-
<span class="kind">${Js(a||"text")}${e.truncated?" · 已截断":""}</span>
|
|
377
|
-
</div>
|
|
378
|
-
<div class="modes" role="group" aria-label="查看模式">
|
|
379
|
-
<button type="button" id="view-preview" class="is-active" aria-pressed="true">预览</button>
|
|
380
|
-
<button type="button" id="view-source" aria-pressed="false">查看原文</button>
|
|
381
|
-
</div>
|
|
382
|
-
</header>
|
|
383
|
-
${n}
|
|
384
|
-
<div id="pane-preview" class="pane is-active">${cI(e)}</div>
|
|
385
|
-
<div id="pane-source" class="pane">${uI(e)}</div>
|
|
386
|
-
${dI()}
|
|
387
|
-
</body>
|
|
388
|
-
</html>`}function mI(){const e=globalThis.screen;return{availWidth:e?.availWidth,availHeight:e?.availHeight}}function hI(){const e=globalThis;if(typeof e.open!="function")throw new Error("window.open is unavailable");return{open:e.open.bind(e),createObjectURL:e.URL.createObjectURL.bind(e.URL),revokeObjectURL:e.URL.revokeObjectURL.bind(e.URL)}}function pI(e,t=hI(),n=tI(mI())){let a;try{const s=fI(e),l=new Blob([s],{type:"text/html;charset=utf-8"});a=t.createObjectURL(l);const c=t.open(a,"_blank",n);if(!c)return t.revokeObjectURL(a),{ok:!1,error:a2};try{c.opener=null}catch{}return{ok:!0}}catch{return a&&t.revokeObjectURL(a),{ok:!1,error:a2}}}function gI(e){return e.language==="md"||e.language==="markdown"}function s2(e){const t=e.previews.find(f=>f.path===e.activePath),n=t?gI(t):!1,[a,s]=S.useState(n?"preview":"source"),[l,c]=S.useState(null);return S.useEffect(()=>{s(n?"preview":"source"),c(null)},[t?.path,n]),!t&&!e.loading?null:u.jsxs(u.Fragment,{children:[t&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"oc-file-preview-backdrop",onMouseDown:f=>{f.target===f.currentTarget&&e.onClose(t.path)}}),u.jsxs("section",{className:"oc-file-preview","aria-label":`文件预览 ${t.path}`,children:[u.jsxs("header",{children:[u.jsx("div",{className:"oc-file-tabs",role:"tablist","aria-label":"文件预览 Tabs",children:e.previews.map(f=>u.jsx("button",{type:"button",role:"tab","aria-selected":f.path===t.path,className:f.path===t.path?"is-active":"",onClick:()=>e.onActivate(f.path),children:f.path},f.path))}),n&&u.jsxs("div",{className:"oc-file-view-modes",role:"group","aria-label":"文件查看模式",children:[u.jsx("button",{type:"button",className:`oc-file-view-mode${a==="preview"?" is-active":""}`,"aria-pressed":a==="preview",onClick:()=>s("preview"),children:"预览"}),u.jsx("button",{type:"button",className:`oc-file-view-mode${a==="source"?" is-active":""}`,"aria-pressed":a==="source",onClick:()=>s("source"),children:"源文件"})]}),u.jsxs("span",{children:[t.bytes," bytes",t.truncated?" · 已截断":""]}),u.jsx("button",{type:"button",className:"oc-file-preview-open",title:"新窗口打开","aria-label":`新窗口打开 ${t.path}`,onClick:()=>{const f=pI(t);c(f.ok?null:f.error)},children:u.jsx(Q8,{size:16,"aria-hidden":"true"})}),u.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>e.onClose(t.path),children:"关闭预览"})]}),l?u.jsx("p",{className:"oc-file-preview-open-error",role:"alert",children:l}):null,a==="preview"&&n?u.jsx("div",{className:"oc-file-preview-rendered",children:u.jsx(Mh,{text:t.content})}):u.jsx("pre",{children:u.jsx("code",{children:t.content})})]})]}),e.loading&&u.jsx("div",{className:"oc-file-preview-loading",children:"正在读取文件…"})]})}const R6=[{command:"/task",label:"Task context",description:"查看当前任务、Draft 与 assessment",action:"focus-panel:task",source:"operator"},{command:"/contract",label:"Contract",description:"查看 contract diff 与 apply gate",action:"focus-panel:contract",source:"operator"},{command:"/dag",label:"DAG",description:"查看 DAG spine、确认与运行状态",action:"focus-panel:dag",source:"operator"},{command:"/interview",label:"Interview",description:"打开 Requirement Interview",action:"focus:interview",source:"operator"},{command:"/reload",label:"Reload session",description:"重新加载当前 Pi 会话的设置、扩展、技能、提示词、主题与上下文文件(不产生消息)",action:"reload",source:"operator"}],A6=[{command:"/compact",label:"压缩上下文",description:"压缩当前会话上下文,释放 token",action:"compact",source:"web"},{command:"/name",label:"重命名会话",description:"设置当前会话标题",action:"name",source:"web"},{command:"/session",label:"会话信息",description:"显示当前会话元信息",action:"session",source:"web"},{command:"/copy",label:"复制回复",description:"复制最后一条助手消息原文",action:"copy",source:"web"}],as={operator:0,web:1,extension:2,skill:3,prompt:4};function l2(e){const t=e.trim().split(/\s+/,1)[0]??"";return t?t.startsWith("/")?t.toLowerCase():`/${t.toLowerCase()}`:""}function o2(e){const t=e.trim().split(/\s+/,1)[0]?.toLowerCase();if(!t?.startsWith("/"))return;const n=[...R6,...A6].find(a=>a.command===t);return n?{command:n.command,action:n.action}:{command:t,action:"unknown"}}function bI(e){if(e==="focus-panel:task"||e==="focus-panel:contract")return"tasks";if(e==="focus-panel:dag")return"recovery"}function vI(e=[]){const t=new Map,n=a=>{const s=l2(a.command);if(!s)return;const l=t.get(s);if(!l){t.set(s,{...a,command:s});return}as[a.source]<as[l.source]&&t.set(s,{...a,command:s})};for(const a of R6)n({command:a.command,label:a.label,description:a.description,source:a.source,action:a.action});for(const a of A6)n({command:a.command,label:a.label,description:a.description,source:a.source,action:a.action});for(const a of e){const s=l2(a.command);s&&n({command:s,label:a.label||s,description:a.description||"",source:a.source,action:"pi-prompt"})}return[...t.values()].sort((a,s)=>{const l=as[a.source]-as[s.source];return l!==0?l:a.command.localeCompare(s.command)})}function yI(e,t){const n=(t.trim().split(/\s+/,1)[0]??"").toLowerCase();if((/\s/.test(t.trimStart().slice(1))||t.includes(" "))&&t.trimStart().includes(" "))return[];const a=n.startsWith("/")?n:n?`/${n}`:"/",s=a==="/"?"":a.slice(1),l=[];for(const c of e){const f=c.command.toLowerCase(),m=f.startsWith("/")?f.slice(1):f,h=c.description.toLowerCase();let p=100;if(!s)p=10+as[c.source];else if(f===a||m===s)p=0;else if(f.startsWith(a)||m.startsWith(s))p=1;else if(m.includes(s)||f.includes(s))p=2;else if(h.includes(s))p=3;else continue;l.push({...c,score:p})}return l.sort((c,f)=>{if(c.score!==f.score)return c.score-f.score;const m=as[c.source]-as[f.source];return m!==0?m:c.command.localeCompare(f.command)})}const xI={operator:"Operator",web:"Pi Web",extension:"Extensions",prompt:"Prompts",skill:"Skills"},wI=new Set(["operatorCapabilities","operationList","operationGet","operationEventSummary","statsContext","sourceInstructions","spineCheck","inspect","observeLink"]);function SI(e){return wI.has(e)?"technical-only":e==="doctor"?"inline-detail":"activity-detail"}const kI={newTask:"创建任务",importPrd:"任务需求",contractShow:"任务边界",contractApply:"更新任务契约",contractDiff:"任务契约差异",contractDraftSave:"任务契约草稿",contractValidate:"检查任务契约",taskAdvance:"推进任务准备",dagRunTask:"执行流程",dagValidate:"校验执行流程",prepareDagConfirmation:"执行确认",confirmDagConfirmation:"确认执行边界",prepareDagExecution:"执行边界",runDag:"任务执行",operationWait:"执行监督",operationGet:"任务活动详情",operationList:"会话活动",operationEventSummary:"执行进展摘要",dagStatus:"执行状态",dagDoctor:"执行诊断",dagReport:"执行结果",dagRerunPlan:"节点恢复评估",dagRerun:"从失败节点恢复",dagInterruptEligibility:"中止资格",standaloneTaskRerun:"带反馈重新执行",workerTaskRetry:"重试 Worker 任务",workerPoolDoctor:"任务池诊断",promoteRun:"任务推进",status:"任务状态"},EI={newTask:{running:"正在创建任务",success:"任务已经创建",error:"创建任务时遇到问题"},importPrd:{running:"正在整理并导入任务需求",success:"任务需求已经导入",error:"导入任务需求时遇到问题"},contractShow:{running:"正在读取任务目标和执行边界",success:"任务目标与执行边界已经读取",error:"读取任务边界时遇到问题"},taskAdvance:{running:"正在推进任务契约并准备执行流程",success:"任务已经推进到下一安全阶段",error:"任务推进被契约或执行边界阻塞"},dagRunTask:{running:"正在生成并校验执行流程",success:"执行流程已经准备好",error:"准备执行流程时遇到问题"},prepareDagExecution:{running:"正在确认任务可以安全执行",success:"执行边界已经确认",error:"执行边界尚未通过确认"},runDag:{running:"正在启动任务执行",success:"任务执行已经启动",error:"启动任务执行时遇到问题"},dagReport:{running:"正在读取本次执行结果",success:"本次执行结果已经读取",error:"读取执行结果时遇到问题"},dagRerunPlan:{running:"正在评估能否从失败节点安全恢复",success:"节点恢复条件评估已经完成",error:"暂时无法确定安全的恢复方式"},dagRerun:{running:"正在创建节点恢复 run",success:"节点恢复 run 已经启动",error:"从失败节点恢复时遇到问题"},dagInterruptEligibility:{running:"正在检查能否协作中止此运行",success:"中止资格已经确认",error:"当前运行不能协作中止"},standaloneTaskRerun:{running:"正在创建新的完整 DAG,并带入上一轮未解决反馈",success:"新的完整 DAG 已经按上一轮反馈重新执行",error:"带反馈重新执行任务时遇到问题"},workerPoolDoctor:{running:"正在读取任务池状态",success:"任务池状态已经读取",error:"读取任务池状态时遇到问题"},promoteRun:{running:"正在推进任务状态",success:"任务状态已经更新",error:"推进任务状态时遇到问题"},status:{running:"正在读取任务状态",success:"任务状态已经更新",error:"读取任务状态时遇到问题"},contractApply:{running:"正在应用任务契约变更",success:"任务契约已经更新",error:"应用任务契约变更时遇到问题"},contractDiff:{running:"正在比较任务契约版本",success:"任务契约差异已经读取",error:"比较任务契约时遇到问题"},contractDraftSave:{running:"正在保存任务契约草稿",success:"任务契约草稿已经保存",error:"保存任务契约草稿时遇到问题"},contractValidate:{running:"正在检查任务契约",success:"任务契约检查已经完成",error:"任务契约检查没有通过"},dagValidate:{running:"正在校验执行流程",success:"执行流程校验已经通过",error:"执行流程校验没有通过"},prepareDagConfirmation:{running:"正在准备执行确认",success:"执行确认已经准备好",error:"准备执行确认时遇到问题"},confirmDagConfirmation:{running:"正在确认执行边界",success:"执行边界已经确认",error:"执行边界尚未通过确认"},operationGet:{running:"正在读取任务活动详情",success:"任务活动详情已经读取",error:"读取任务活动详情时遇到问题"},operationList:{running:"正在读取本次对话的活动",success:"本次对话的活动已经读取",error:"读取对话活动时遇到问题"},operationEventSummary:{running:"正在汇总执行进展",success:"执行进展已经汇总",error:"汇总执行进展时遇到问题"},dagStatus:{running:"正在读取执行状态",success:"执行状态已经更新",error:"读取执行状态时遇到问题"},dagDoctor:{running:"正在诊断本次任务执行",success:"任务执行诊断已经完成",error:"诊断任务执行时遇到问题"},workerTaskRetry:{running:"正在重试失败的任务",success:"失败任务已经重新开始",error:"重试失败任务时遇到问题"},doctor:{running:"正在检查运行环境",success:"运行环境检查已经完成",error:"运行环境检查发现问题"},inspect:{running:"正在读取详细运行信息",success:"详细运行信息已经读取",error:"读取详细运行信息时遇到问题"},observeLink:{running:"正在准备运行看板入口",success:"运行看板入口已经准备好",error:"准备运行看板入口时遇到问题"},operatorCapabilities:{running:"正在读取可用操作能力",success:"可用操作能力已经读取",error:"读取可用操作能力时遇到问题"},sourceInstructions:{running:"正在读取任务来源说明",success:"任务来源说明已经读取",error:"读取任务来源说明时遇到问题"},spineCheck:{running:"正在检查计划执行步骤",success:"计划执行步骤检查已经完成",error:"计划执行步骤检查发现问题"},statsContext:{running:"正在统计上下文使用情况",success:"上下文使用情况已经统计完成",error:"统计上下文使用情况时遇到问题"}},TI=[{pattern:/(?:^|-)contract(?:-pi)?$/i,running:"正在核对任务目标和执行边界",finished:"任务目标与执行边界已确认",error:"任务边界存在冲突,需要先处理"},{pattern:/scout-src/i,running:"正在梳理与任务相关的代码",finished:"相关代码范围已梳理",error:"梳理相关代码时遇到问题"},{pattern:/scout-tests/i,running:"正在检查现有测试和验证方式",finished:"现有测试与验证方式已确认",error:"检查现有测试时遇到问题"},{pattern:/plan/i,running:"正在整理具体实施步骤",finished:"实施步骤已经准备好",error:"实施方案还需要进一步完善"},{pattern:/implement|writer/i,running:"正在修改并保存相关文件",finished:"文件修改已经完成",error:"修改文件时遇到问题"},{pattern:/verify|reverify/i,running:"正在验证本次修改",finished:"本次修改已通过验证",error:"验证没有通过,正在检查原因"},{pattern:/review/i,running:"正在检查改动是否完整",finished:"改动完整性检查已通过",error:"发现需要补充或修正的内容"},{pattern:/closeout/i,running:"正在整理交付结果",finished:"任务已经完成并形成交付记录",error:"交付结果尚未整理完整"}];function _6(e){if(!(!e||typeof e!="object"))return e}function Ep(e){if(e&&typeof e=="object")return e;if(typeof e=="string")try{return _6(JSON.parse(e))}catch{return}}function Fm(e){const n=Ep(e)?.operationId;return typeof n=="string"&&n?n:void 0}function NI(e){const n=Ep(e)?.maxWaitMs;if(!(typeof n!="number"||!Number.isFinite(n)||n<=0))return Math.max(1,Math.round(n/1e3))}function I6(e){const t=e.operationId??Fm(e.args)??Fm(e.result)??Fm(e.resultText);return t?`operation:${t}`:`tool:${e.id}`}function CI(e){return e==="running"?"progress":e==="error"?"error":"success"}function RI(e){return Ep(e.resultText??e.result)}function AI(e){return Array.isArray(e.events)?e.events.flatMap(t=>{const n=_6(t);if(!n)return[];const a=n.messagePreview??n.message;return typeof a=="string"?[a]:[]}):[]}function _I(e,t,n){const a=[];for(const m of e)for(const h of m.matchAll(/node-(started|finished)[^\n]*?node=([^\s,]+)/gi)){const p=h[1]?.toLowerCase(),b=h[2]??"",y=m.match(/status=([^\s,]+)/i)?.[1]?.toUpperCase();let x="finished";y==="ERROR"||y==="FAILED"?x="error":p==="started"&&(x="running"),a.push({node:b,status:x})}const s=a.at(-1);if(!s)return;const l=a.some(m=>/scout-src/i.test(m.node)&&m.status==="finished"),c=a.some(m=>/scout-tests/i.test(m.node)&&m.status==="finished");if(l&&c)return{id:t,kind:"success",title:"代码与测试的影响范围已确认",activityRef:n};const f=TI.find(m=>m.pattern.test(s.node));return f?s.status==="running"?{id:t,kind:"progress",title:f.running,activityRef:n}:s.status==="error"?{id:t,kind:"error",title:f.error,activityRef:n}:{id:t,kind:"success",title:f.finished,activityRef:n}:{id:t,kind:"success",title:"执行状态已经更新",activityRef:n}}function II(e){const t=I6(e),n=`activity:${e.id}`,a=NI(e.args);if(e.status==="running")return{id:n,kind:"progress",title:a?`正在等待新的执行进展,最长等待时间 ${a} 秒`:"正在等待新的执行进展",activityRef:t};if(e.status==="error")return{id:n,kind:"error",title:"等待执行进展时遇到问题",activityRef:t};let s="";typeof e.resultText=="string"?s=e.resultText:typeof e.result=="string"&&(s=e.result);const l=RI(e),c=_I([s,...l?AI(l):[]],n,t);if(c)return c;if(l){if(l.timedOut===!0||l.changed===!1)return{id:n,kind:"warning",title:"等待期间没有新的执行进展",activityRef:t};if(l.changed===!0)return{id:n,kind:"success",title:"已经收到新的执行进展",activityRef:t}}return{id:n,kind:"success",title:"执行状态已经更新",activityRef:t}}function MI(e){const t=SI(e.toolName);if(t==="technical-only"||t==="inline-detail")return;if(e.toolName==="operationWait")return II(e);const n=EI[e.toolName];if(!n)return;let a=n.success;return e.status==="running"?a=n.running:e.status==="error"&&(a=n.error),{id:`activity:${e.id}`,kind:CI(e.status),title:a,activityRef:I6(e)}}function M6(e){return kI[e]??"任务活动"}function Tp(e){switch(e){case"starting":return{label:"正在启动",kind:"progress"};case"running":return{label:"运行中",kind:"progress"};case"succeeded":case"finished":case"FINISHED":case"pass":return{label:"已完成",kind:"success"};case"failed":case"partial_failed":case"ERROR":case"FAILED":case"timed-out":return{label:"未完成",kind:"error"};case"needs-reconcile":return{label:"需要同步",kind:"warning"};case"cancelled":case"abandoned":case"superseded":return{label:"已停止",kind:"warning"};default:return{label:"状态已更新",kind:"success"}}}function O6(e){return[e.activityRef??`operation:${e.operationId}`,`operation:${e.operationId}`,...e.toolCallId?[`tool:${e.toolCallId}`]:[]]}function D6(e){return[e.activityRef??`gate:${e.cardId}`]}function j6(e){return[e.activityRef??`artifact:${e.artifactId}`]}function OI(e){return new Set([...e.operations.flatMap(O6),...e.gates.flatMap(D6),...e.artifacts.flatMap(j6)])}function c2(e){return e.updatedSeq??e.eventSeq}function u2(e){const t=Date.parse(e.updatedAt);return Number.isFinite(t)?t:0}function Np(e,t){const n=c2(e),a=c2(t);return n!==void 0&&a!==void 0?n-a:u2(e)-u2(t)}function DI(e){return e.taskId?`task:${e.taskId}`:e.dagRunId?`run:${e.dagRunId}`:`operation:${e.operationId}`}function jI(e){return e.taskId?e.taskId.replace(/^\d{4}-\d{2}-\d{2}-/,"").replace(/[-_]+/g," ").trim()||e.taskId:M6(e.action)}function LI(e){return[...new Set(e)]}function zI(e){const t=new Map;for(const n of e)t.set(n.action,n);return[...t.values()].sort(Np).map(n=>{const a=Tp(n.state);return{id:n.operationId,label:M6(n.action),stateLabel:a.label,kind:a.kind,at:n.updatedAt}})}function BI(e){const t=new Map;for(const n of e){const a=n.dagRunId??n.runSummary?.runId;if(!a)continue;const s=t.get(a)??[];s.push(n),t.set(a,s)}return[...t.entries()].flatMap(([n,a])=>{const s=[...a].sort((h,p)=>Np(p,h)),l=s[0];if(!l)return[];const c=s.find(h=>h.runSummary)?.runSummary,f=c?.status??l.state,m=Tp(f);return[{runId:n,state:f,stateLabel:m.label,kind:m.kind,updatedAt:l.updatedAt,operationCount:a.length,firstFailedNode:c?.nodes.find(h=>h.status==="ERROR")?.id,failureCategory:c?.failureCategory,inspectHref:l.inspectHref}]}).sort((n,a)=>Date.parse(a.updatedAt)-Date.parse(n.updatedAt))}function L6(e){const t=new Map;for(const n of e){const a=DI(n),s=t.get(a)??[];s.push(n),t.set(a,s)}return[...t.entries()].flatMap(([n,a])=>{const s=[...a].sort(Np),l=s.at(-1);if(!l)return[];const c=Tp(l.state);return[{key:n,taskId:l.taskId,displayTitle:jI(l),state:l.state,stateLabel:c.label,kind:c.kind,updatedAt:l.updatedAt,latestOperation:l,operations:s,steps:zI(s),runs:BI(s),activityRefs:LI(s.flatMap(O6)),compactEligible:c.kind==="success"}]}).sort((n,a)=>{const s=n.kind==="progress"||n.kind==="error"?0:1,l=a.kind==="progress"||a.kind==="error"?0:1;return s!==l?s-l:Date.parse(a.updatedAt)-Date.parse(n.updatedAt)})}const UI={operation:"执行记录",contract:"任务契约",dag:"执行流程",report:"报告",html:"HTML 预览"};function qI(e){const{artifact:t}=e,n=!!(t.reportText||t.htmlPreview);return u.jsxs("section",{className:"oc-artifact-card","aria-label":`任务产物:${t.title??t.artifactId}`,"data-activity-ref":t.activityRef??`artifact:${t.artifactId}`,children:[u.jsxs("header",{children:[u.jsxs("div",{children:[u.jsx("small",{children:"任务产物"}),u.jsx("strong",{children:t.title??t.artifactId}),u.jsx("code",{children:t.artifactId})]}),u.jsx("span",{children:UI[t.kind]})]}),t.summary?u.jsx("p",{children:t.summary}):null,n?u.jsxs("details",{className:"oc-artifact-details",children:[u.jsx("summary",{children:"预览与技术详情"}),t.reportText?u.jsx("pre",{children:t.reportText}):null,t.htmlPreview?u.jsx("iframe",{title:`${t.title??t.artifactId} preview`,sandbox:"",srcDoc:t.htmlPreview}):null]}):null,t.inspectHref?u.jsx("footer",{children:u.jsx("button",{className:"btn btn-ghost",type:"button",onClick:()=>window.open(t.inspectHref,"_blank","noopener,noreferrer"),children:"打开产物"})}):null]})}const d2={prepared:"等待确认",confirmed:"已经确认",dispatched:"正在执行",consumed:"已经完成",stale:"已经失效",expired:"已经过期",error:"处理失败"};function f2(e){return e.gateType==="contract-apply"?"确认任务契约变更":e.gateType==="mutation"?"确认执行工作区修改":"确认启动任务执行"}function HI({card:e,origin:t,sessionId:n}){const[a,s]=S.useState(!1),[l,c]=S.useState(),f=async()=>{s(!0),c(void 0);try{let b="contract-apply";e.gateType==="dag-run"?b=e.state==="prepared"?"dag-confirm":"dag-run":e.gateType==="mutation"&&(b="mutation-apply");const y=e.gateType==="dag-run"?{confirmationId:e.confirmationId,...e.state==="prepared"?{humanGateToken:e.humanGateToken}:{}}:{receiptId:e.receiptId,humanGateToken:e.humanGateToken},x=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(n)}/human-gate/${b}`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json","x-loop-console-confirmation":tr()},body:JSON.stringify(y)}),k=await x.json();if(!x.ok)throw new Error(k.error?.message??`HTTP ${x.status}`)}catch(b){c(b instanceof Error?b.message:String(b))}finally{s(!1)}},m=e.state==="prepared"||e.gateType==="dag-run"&&e.state==="confirmed";let h="确认接受";e.gateType==="mutation"?h="确认执行":e.gateType==="dag-run"&&(h=e.state==="prepared"?"确认边界":"启动执行");const p=(e.displayOnlyChallenges?.length??0)+(e.dagSpine?.length??0);return u.jsxs("section",{className:`oc-human-gate-card is-${e.state}`,"aria-label":`${f2(e)}:${d2[e.state]}`,"data-activity-ref":e.activityRef??`gate:${e.cardId}`,children:[u.jsxs("header",{children:[u.jsxs("div",{children:[u.jsx("small",{children:"人工门禁"}),u.jsx("strong",{children:f2(e)}),u.jsx("code",{children:e.taskId})]}),u.jsx("span",{children:d2[e.state]})]}),e.contractDiffSummary?u.jsx("p",{className:"oc-human-gate-summary",children:e.contractDiffSummary}):null,p>0||e.errorMessage?u.jsxs("details",{className:"oc-human-gate-details",children:[u.jsxs("summary",{children:["门禁详情 · ",p," 项"]}),e.displayOnlyChallenges?.length?u.jsxs("div",{className:"oc-human-gate-challenges",children:[u.jsx("b",{children:"确认前请检查"}),u.jsx("ul",{children:e.displayOnlyChallenges.map(b=>u.jsx("li",{children:b},b))})]}):null,e.dagSpine?.length?u.jsxs("div",{children:[u.jsx("b",{children:"计划执行步骤"}),u.jsx("ol",{children:e.dagSpine.map(b=>u.jsx("li",{children:u.jsx("code",{children:b})},b))})]}):null,e.errorMessage?u.jsx("p",{className:"oc-human-gate-error",children:e.errorMessage}):null]}):null,u.jsxs("footer",{children:[u.jsx("button",{className:"btn btn-ghost",type:"button",onClick:()=>window.open(e.inspectHref,"_blank","noopener,noreferrer"),children:"查看记录"}),u.jsx("button",{className:"btn btn-primary",type:"button",disabled:!m||a,onClick:()=>{f()},children:a?"提交中…":h})]}),l?u.jsx("div",{className:"oc-human-gate-error",children:l}):null]})}const Yr="loop-console.operator-chat.active-session.v1",FI="loop-console.operator-chat.default-landing.v1";function ju(e){const t=e?.trim().toLowerCase();if(t==="chat")return"chat";if(t==="tasks")return"tasks"}function z6(e){const t=e?.trim().toLowerCase();if(t==="chat"||t==="tasks"||t==="recovery"||t==="night"||t==="models"||t==="settings")return t}function B6(e){const t=n=>e.get(n)?.trim()||void 0;return{...t("taskId")?{taskId:t("taskId")}:{},...t("dagRunId")?{dagRunId:t("dagRunId")}:{},...t("fromNodeId")?{fromNodeId:t("fromNodeId")}:{},...t("featureId")?{featureId:t("featureId")}:{},...t("intent")?{intent:t("intent")}:{}}}function U6(e){const t=String(e??"").replace(/^#/,"");if(!t)return null;const n=t.indexOf("?"),a=n>=0?t.slice(0,n):t,s=n>=0?t.slice(n+1):"",l=(a||"/").split("?")[0]||"/";if(l==="/"||l==="")return null;const c=l.replace(/^\//,"").split("/")[0],f=z6(c);return f?{workspace:f,...B6(new URLSearchParams(s))}:null}function PI(e){const t=new URLSearchParams(e.search),n=e.hash.startsWith("#")?e.hash.slice(1):e.hash,a=new URLSearchParams(n),s=z6(t.get("workspace")??t.get("landing")??a.get("workspace"));return s?{workspace:s,...B6(t)}:null}function $I(e){if(!e)return;const t=U6(e.hash);if(t)return t.workspace;const n=new URLSearchParams(e.search),a=ju(n.get("landing")??n.get("workspace"));if(a)return a;const s=e.hash.startsWith("#")?e.hash.slice(1):e.hash;return ju(new URLSearchParams(s).get("workspace"))}function q6(e){return $I(e.location)??ju(e.storage?.getItem(FI))??ju(e.env)??"chat"}function H6(e,t={}){const n=new URLSearchParams;for(const[l,c]of Object.entries(t))c?.trim()&&n.set(l,c.trim());const a=n.toString(),s=`/${e}`;return a?`${s}?${a}`:s}function GI(e,t={}){return`#${H6(e,t)}`}function VI(e){return U6(e.hash)??PI(e)}const KI={validation:"节点输出未通过契约或门禁校验。可在恢复页从失败节点重跑;若错误指向任务契约(如验证命令、Mock 策略),先修正任务配置并重新生成 DAG。",executor:"执行器或模型提供方调用失败(网络、配额或运行时错误)。稍后可在恢复页从失败节点重跑;反复出现请到「模型与认证」页检查配置与凭据。","write-guard":"写入越过了授权边界(writeSet / allowedPaths)。检查计划中的写入路径是否越界,修正后从失败节点重跑。",timeout:"节点执行超时。可在恢复页从失败节点重跑;反复超时建议缩小任务范围或排查卡住的命令。",auth:"模型或服务认证失败。请先到「模型与认证」页检查 API Key 与模型配置,再从失败节点重跑。","human-required":"节点正在等待人工审批。完成审批后该节点可继续执行;也可在恢复页查看对账状态。","human-rejected":"人工审批被拒绝。请调整任务描述或契约后重新发起任务。","shell-command":"验证/构建命令以非零退出。进入 DAG 查看命令输出定位具体失败,修复后从失败节点重跑。","static-error":"静态检查(typecheck / lint 等)失败。修复对应代码错误后从失败节点重跑。","decision-envelope":"决策与证据不匹配(决策包络校验失败)。进入 DAG 查看节点决策依据,修正后重跑。",unknown:"失败原因未归类。进入 DAG 查看节点详情,或在恢复页使用对账 / 诊断入口。"};function YI(e){if(e)return KI[e]}function m2(e,t=900){if(e)return e.length>t?`${e.slice(0,t)}…`:e}function Pm(e){return new Date(e).toLocaleString()}function h2(e){if(!e)return;const t=e.trim();if(/taskId[^\n]*(?:placeholder|占位)|["']?<id>["']?/i.test(t))return"任务编号仍是占位符;请提供实际的 YYYY-MM-DD-<slug> 任务编号后重试。";if(/ENOENT|no such file or directory/i.test(t))return"任务活动缺少所需文件或目录,可进入 DAG 查看详情。";if(/command failed|exited with code/i.test(t))return"相关命令没有成功完成,可进入 DAG 查看详情。";if(!(t.length>220||t.startsWith("{")||t.startsWith("[")||t.includes("[dag execute]")||t.includes("schemaVersion")||/[A-Za-z]:\\/.test(t)))return t}function XI(e){const t=e.latestOperation,n=t.runSummary;if(e.kind==="success"||e.kind==="progress")return;const a=n?.nodes.find(c=>c.status==="ERROR")?.id;if(a){const c=n?.failureCategory?`,原因分类为 ${n.failureCategory}`:"";return`执行在 ${a} 阶段未完成${c}。`}const s=n?.next?.description;if(s&&/fail|error|block|cannot|unable/i.test(s))return s;const l=h2(t.stderrPreview)??h2(t.summaryPreview);return l||(e.kind==="error"?"本次任务活动没有完成,可进入 DAG 查看详情或使用恢复选项。":"本次任务活动需要进一步确认,请查看相关记录。")}function ZI(e){const{journey:t}=e,n=t.latestOperation,a=t.runs[0],s=t.runs.slice(1),l=n.inspectHref.startsWith("/")?`${e.origin}${n.inspectHref}`:n.inspectHref,c=XI(t),f=t.kind==="error"||t.kind==="warning",m=t.latestOperation.runSummary,h=m?.nodes.find(y=>y.failureCategory)?.failureCategory??m?.failureCategory,p=f?YI(h):void 0,b=(y,x)=>{e.onNavigateWorkspace?e.onNavigateWorkspace(y,x):window.location.assign(GI(y,x))};return e.compact?u.jsxs("details",{className:"oc-journey-compact",children:[u.jsxs("summary",{children:[u.jsx("span",{className:`oc-journey-dot is-${t.kind}`,"aria-hidden":"true"}),u.jsxs("span",{children:[u.jsx("strong",{children:t.displayTitle}),u.jsxs("small",{children:[t.stateLabel," · ",Pm(t.updatedAt)]})]}),u.jsx("span",{"aria-hidden":"true",children:"›"})]}),u.jsxs("div",{className:"oc-journey-compact-body",children:[t.taskId?u.jsx("code",{children:t.taskId}):null,u.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>window.open(l,"_blank","noopener,noreferrer"),children:"查看记录"})]})]}):u.jsxs("section",{className:`oc-task-journey-card is-${t.kind}`,"aria-label":`${t.displayTitle}:${t.stateLabel}`,children:[u.jsxs("header",{className:"oc-journey-head",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"oc-journey-state-line",children:[u.jsx("span",{className:`oc-journey-dot is-${t.kind}`,"aria-hidden":"true"}),u.jsx("span",{children:t.stateLabel})]}),u.jsx("strong",{children:t.displayTitle}),t.taskId?u.jsxs("small",{children:["Task · ",u.jsx("code",{children:t.taskId})]}):null]}),u.jsx("time",{dateTime:t.updatedAt,children:Pm(t.updatedAt)})]}),u.jsx("div",{className:"oc-journey-steps","aria-label":"任务旅程",children:t.steps.slice(-6).map(y=>u.jsxs("div",{className:"oc-journey-step",children:[u.jsx("span",{className:`oc-journey-step-icon is-${y.kind}`,"aria-hidden":"true",children:y.kind==="success"?"✓":y.kind==="error"?"!":"•"}),u.jsx("span",{children:y.label}),u.jsx("small",{children:y.stateLabel})]},y.id))}),c?u.jsxs("div",{className:`oc-journey-outcome is-${t.kind}`,children:[u.jsx("strong",{children:f?"当前问题":"最新结果"}),u.jsx("p",{children:c}),p?u.jsxs("p",{className:"oc-journey-advice","data-testid":"oc-journey-advice",children:["建议:",p]}):null]}):null,a?u.jsxs("div",{className:"oc-journey-latest-run",children:[u.jsx("span",{children:"最新执行"}),u.jsx("code",{children:a.runId}),u.jsx("b",{className:`is-${a.kind}`,children:a.stateLabel}),a.firstFailedNode?u.jsxs("small",{children:["失败阶段 · ",a.firstFailedNode]}):null]}):null,s.length>0?u.jsxs("details",{className:"oc-journey-history",children:[u.jsxs("summary",{children:["执行历史 ",t.runs.length," 次"]}),u.jsx("div",{children:t.runs.map(y=>u.jsxs("div",{className:"oc-journey-run-row",children:[u.jsx("code",{children:y.runId}),u.jsx("span",{className:`is-${y.kind}`,children:y.stateLabel}),y.firstFailedNode?u.jsx("small",{children:y.firstFailedNode}):null,u.jsx("time",{dateTime:y.updatedAt,children:Pm(y.updatedAt)})]},y.runId))})]}):null,u.jsxs("footer",{className:"oc-journey-actions",children:[u.jsx("button",{className:"btn btn-ghost",type:"button",onClick:()=>{const y=n.dagRunId??a?.runId,x=y?n.inspectHref.startsWith("/")?`${e.origin}/inspect/#/dag/${encodeURIComponent(y)}`:`/inspect/#/dag/${encodeURIComponent(y)}`:l;window.open(x,"_blank","noopener,noreferrer")},children:"进入 DAG"}),f&&(t.taskId||n.dagRunId)?u.jsx("button",{className:"btn btn-primary",type:"button",onClick:()=>b("recovery",{taskId:t.taskId,dagRunId:n.dagRunId}),children:"恢复选项"}):null]}),u.jsxs("details",{className:"oc-journey-technical",children:[u.jsxs("summary",{children:["技术详情 · ",t.operations.length," 项活动"]}),u.jsx("div",{className:"oc-journey-technical-body",children:t.operations.map(y=>u.jsxs("div",{className:"oc-journey-operation-row",children:[u.jsxs("div",{children:[u.jsx("code",{children:y.operationId}),u.jsx("span",{children:y.action})]}),y.dagRunId?u.jsxs("small",{children:["run · ",y.dagRunId]}):null,y.controller?u.jsxs("small",{children:["controller · ",y.controller]}):null,y.stderrPreview?u.jsx("pre",{className:"is-error",children:m2(y.stderrPreview)}):null,y.summaryPreview?u.jsx("pre",{children:m2(y.summaryPreview)}):null]},y.operationId))})]})]})}function p2(e){return e.state==="prepared"||e.state==="confirmed"?0:e.state==="dispatched"?1:e.state==="error"?2:3}function $m(e,t){return e!==null&&t.includes(e)}function WI(e){return e.operations>0?"operations":e.gates>0?"gates":"artifacts"}function QI(e){const t=e.presentation==="sidecar",n=t||e.open,a=S.useRef(null),[s,l]=S.useState("operations"),c=S.useMemo(()=>L6(e.operationCards),[e.operationCards]),f=c.length+e.humanGateCards.length+e.artifactCards.length,m=S.useMemo(()=>[...e.humanGateCards].sort((x,k)=>{const N=p2(x)-p2(k);return N!==0?N:(k.eventSeq??0)-(x.eventSeq??0)}),[e.humanGateCards]),h=S.useMemo(()=>[...e.artifactCards].sort((x,k)=>(k.eventSeq??0)-(x.eventSeq??0)),[e.artifactCards]);if(Pu({open:n&&!t,containerRef:a,triggerRef:e.triggerRef,onEscape:e.onClose}),S.useEffect(()=>{l(WI({operations:c.length,gates:e.humanGateCards.length,artifacts:e.artifactCards.length}))},[e.sessionId]),S.useEffect(()=>{e.focusRef&&(e.focusRef.startsWith("gate:")?l("gates"):e.focusRef.startsWith("artifact:")?l("artifacts"):l("operations"))},[e.focusRef]),S.useEffect(()=>{if(!n||!e.focusRef)return;const x=window.requestAnimationFrame(()=>{const k=a.current;if(!k)return;Array.from(k.querySelectorAll("[data-activity-ref], [data-tool-call-id], [data-activity-refs]")).find(C=>{const _=C.dataset.activityRefs?.split(" ")??[];return C.dataset.activityRef===e.focusRef||_.includes(e.focusRef??"")||C.dataset.toolCallId&&`tool:${C.dataset.toolCallId}`===e.focusRef})?.scrollIntoView({block:"nearest",behavior:"smooth"})});return()=>window.cancelAnimationFrame(x)},[n,s,e.focusRef]),!n||f===0)return null;let p="is-drawer";t?p="is-sidecar":e.presentation==="sheet"&&(p="is-sheet");const b=t&&e.sidecarRect?{top:e.sidecarRect.top,left:e.sidecarRect.left,height:e.sidecarRect.height,width:e.sidecarRect.width}:void 0,y=u.jsxs("aside",{ref:a,id:"oc-activity-rail",className:`oc-activity-rail ${p} is-${e.phase}`,style:b,"aria-label":"本次对话的活动","aria-busy":e.phase==="switching",tabIndex:-1,children:[u.jsxs("header",{className:"oc-activity-rail-head",children:[u.jsxs("div",{children:[u.jsx("strong",{children:"本次对话的活动"}),u.jsx("small",{children:"运行、门禁与任务产物"})]}),u.jsx("span",{className:"oc-activity-count",children:f}),t?null:u.jsx("button",{type:"button",className:"oc-activity-close","aria-label":"关闭运行活动",onClick:e.onClose,children:"×"})]}),u.jsxs("div",{className:"oc-activity-content",children:[u.jsxs("div",{className:"oc-activity-tabs",role:"tablist","aria-label":"活动类型",children:[u.jsxs("button",{type:"button",role:"tab","aria-selected":s==="operations",className:s==="operations"?"is-active":"",onClick:()=>l("operations"),children:["运行 ",u.jsx("span",{children:c.length})]}),u.jsxs("button",{type:"button",role:"tab","aria-selected":s==="gates",className:s==="gates"?"is-active":"",onClick:()=>l("gates"),children:["门禁 ",u.jsx("span",{children:m.length})]}),u.jsxs("button",{type:"button",role:"tab","aria-selected":s==="artifacts",className:s==="artifacts"?"is-active":"",onClick:()=>l("artifacts"),children:["产物 ",u.jsx("span",{children:h.length})]})]}),u.jsxs("div",{className:"oc-activity-list",children:[s==="operations"&&c.length===0?u.jsx("div",{className:"oc-activity-empty",children:"本次对话还没有任务执行记录。"}):null,s==="operations"?c.map((x,k)=>{const N=x.activityRefs;return u.jsxs("div",{"data-activity-refs":N.join(" "),className:`oc-activity-card-wrap${$m(e.focusRef,N)?" is-focused":""}`,children:[u.jsx(ZI,{journey:x,compact:k>0&&x.compactEligible,origin:e.origin,onNavigateWorkspace:e.onNavigateWorkspace}),u.jsx("button",{type:"button",className:"oc-activity-locate",onClick:()=>e.onLocateConversation(N),children:"查看对话位置"})]},x.key)}):null,s==="gates"&&m.length===0?u.jsx("div",{className:"oc-activity-empty",children:"本次对话还没有需要展示的门禁。"}):null,s==="gates"?m.map(x=>{const k=D6(x);return u.jsx("div",{className:`oc-activity-card-wrap${$m(e.focusRef,k)?" is-focused":""}`,children:u.jsx(HI,{card:x,origin:e.origin,sessionId:e.sessionId})},x.cardId)}):null,s==="artifacts"&&h.length===0?u.jsx("div",{className:"oc-activity-empty",children:"本次对话还没有任务产物。"}):null,s==="artifacts"?h.map(x=>{const k=j6(x);return u.jsx("div",{className:`oc-activity-card-wrap${$m(e.focusRef,k)?" is-focused":""}`,children:u.jsx(qI,{artifact:x})},x.artifactId)}):null]})]},e.sessionId)]});return t?Mo.createPortal(y,document.body):y}const F6=420,P6=12;function JI(e){if(e.layoutMode==="narrow")return"sheet";const t=e.railWidth??F6,n=e.gap??P6;return e.viewportWidth-e.mainRight>=t+n?"sidecar":"drawer"}const eM={presentation:"drawer",sidecarRect:null};function tM(e,t,n){const[a,s]=S.useState(eM);return S.useLayoutEffect(()=>{const l=e.current;if(!l)return;const c=l.closest(".panel--chat")??l;let f=0;const m=()=>{window.cancelAnimationFrame(f),f=window.requestAnimationFrame(()=>{const p=l.getBoundingClientRect(),b=c.getBoundingClientRect(),y=JI({layoutMode:t,viewportWidth:window.innerWidth,mainRight:p.right}),x=y==="sidecar"?{top:b.top,left:p.right+P6,height:b.height,width:F6}:null;s(k=>k.presentation===y&&k.sidecarRect?.top===x?.top&&k.sidecarRect?.left===x?.left&&k.sidecarRect?.height===x?.height&&k.sidecarRect?.width===x?.width?k:{presentation:y,sidecarRect:x})})};m();const h=new ResizeObserver(m);return h.observe(l),c!==l&&h.observe(c),window.addEventListener("resize",m),()=>{window.cancelAnimationFrame(f),h.disconnect(),window.removeEventListener("resize",m)}},[t,e,n]),a}const g2={comfortableMin:620,compactMin:480};function nM(e){return!Number.isFinite(e)||e<0?"extra-compact":e>=g2.comfortableMin?"comfortable":e>=g2.compactMin?"compact":"extra-compact"}function rM(e){return`is-landing-${e}`}const aM=[{label:"新建任务",hint:"先走需求分析 skills,再导入创建任务",prompt:["我要新建任务。请先做需求分析,不要用一句话直接 bootstrapFromPrd。","1. 先问我需求内容和范围(frontend / backend / both,默认 both)。","2. 读取并严格执行 `.agents/skills/analyze-product-requirements/SKILL.md`(`loop-agent init --profile full` 会投影该 skill):按规程澄清访谈、校验,并把产物写到 `docs/product-analysis/<requirement-id>/`(product-analysis.md、requirement-clarification.md、product-requirement.md)。","3. product-requirement 为 complete 且校验通过后,再严格执行 `.agents/skills/analyze-product-dependencies/SKILL.md`,生成 dependency-analysis.md 和按需的 api-documentation.md。","4. 两套产物都校验通过后,再用这些文件 bootstrapFromPrd 创建任务,并建议 taskKind。","若上述 skill 不存在,先说明缺失,并提示运行 `loop-agent init --repo-root . --profile full --merge`。"].join(`
|
|
389
|
-
`)},{label:"查看任务状态",hint:"列出任务与就绪/阻塞状态",prompt:"列出当前所有 task 及其状态,重点说明哪些是 Ready 可以推进、哪些 Blocked 及阻塞原因。"},{label:"诊断 DAG 运行",hint:"对失败运行跑 Doctor",prompt:"帮我诊断最近失败或异常的 DAG 运行:先列出最近的 DAG 运行,对有问题的运行执行 doctor,总结根因和可执行的恢复方案。"},{label:"恢复或重跑任务",hint:"默认从节点续跑,勿无故新开 task",prompt:"我要恢复失败或卡住的 DAG。请先 dagReport/dagDoctor 看 primaryFailure.nodeId 与 primaryRecovery;默认用 dagRerunPlan→dagRerun 从失败节点续跑(plan 合格后直接 dagRerun,不要 prepareMutationGate)。不要新建 task-id。plan 不合格时:Worker Task Pool Failed 用 workerPoolDoctor 确认后再 workerTaskRetry;独立 Console run 用 standaloneTaskRerun(整单重生,不是从节点续跑)。paused/中断需要 resume 时准备 Human Gate,不要自己调 dagResume。确定后直接帮我发起。"}];function $6(e){const t=e.readiness==="setup-required",n=!!e.disabled||t,a=e.density??"comfortable",s=e.mode==="no-session"?"开始一段新的对话":"今天想推进什么?",l=e.mode==="no-session"?"用自然语言编排 loop-agent:查询状态、诊断问题、创建与恢复任务。可先点选下方建议,或新建空白对话。":"会话已就绪。点选建议快速开场,或在下方输入框直接描述目标。业务写入仍经受治理 DAG。";return u.jsxs("div",{className:`oc-empty ${rM(a)}`,role:"status","data-landing-density":a,children:[u.jsxs("div",{className:"oc-empty-hero",children:[u.jsx("img",{className:"oc-empty-icon oc-empty-brand",src:"/favicon.svg",alt:"","aria-hidden":"true",draggable:!1}),u.jsxs("div",{className:"oc-empty-copy",children:[u.jsx("h3",{children:s}),u.jsx("p",{children:l})]})]}),u.jsx("div",{className:"oc-suggestions","aria-label":"开场建议",children:aM.map(c=>u.jsxs("button",{type:"button",className:"oc-suggestion",onClick:()=>e.onSuggest(c.prompt),disabled:n,children:[u.jsx("strong",{children:c.label}),u.jsx("span",{children:a==="extra-compact"?c.hint.replace(/[,,].*$/,""):c.hint})]},c.label))}),u.jsxs("ul",{className:"oc-empty-tips",children:[u.jsxs("li",{children:[u.jsx("kbd",{children:"@"}),u.jsx("span",{children:"引用仓库文件"})]}),u.jsxs("li",{children:[u.jsx("kbd",{children:"/"}),u.jsx("span",{children:"快捷命令"})]}),u.jsxs("li",{children:[u.jsx("kbd",{children:"Enter"}),u.jsx("span",{children:"发送 · Shift+Enter 换行"})]})]}),e.mode==="no-session"&&e.onCreateSession?u.jsx("button",{type:"button",className:"btn btn-primary oc-empty-cta",onClick:e.onCreateSession,disabled:n,"aria-busy":e.disabled||void 0,children:t?"需先完成 Pi setup":e.disabled?"创建中…":"新建空白对话"}):null]})}function iM(e){const{interview:t,interviewAnswer:n,onAnswerChange:a,onAnswer:s}=e;return u.jsxs("section",{className:"oc-draft-card","aria-label":"Requirement Interview",children:[u.jsxs("header",{children:[u.jsx("strong",{children:"Requirement Interview"}),u.jsx("span",{children:t.state})]}),t.question&&u.jsxs("div",{className:"oc-interview-bubble",children:[u.jsx("strong",{children:t.question.text}),u.jsxs("p",{children:["建议:",t.question.recommendation]}),u.jsx("textarea",{value:n,onChange:l=>a(l.target.value),placeholder:"输入答案"}),u.jsxs("div",{children:[u.jsx("button",{className:"btn btn-primary",type:"button",onClick:()=>s("override"),disabled:!n.trim(),children:"提交答案"}),u.jsx("button",{className:"btn btn-ghost",type:"button",onClick:()=>s("accept-recommendation"),children:"接受建议"})]})]}),t.draft&&u.jsxs("details",{open:!0,children:[u.jsxs("summary",{children:["TaskContractDraftV1 · ",t.draftSha256?.slice(0,12)]}),u.jsx("pre",{children:JSON.stringify(t.draft,null,2)})]}),t.assessment&&u.jsxs("div",{className:`oc-assessment${t.assessment.fresh?" is-fresh":""}`,children:[u.jsxs("strong",{children:["完整性:",t.assessment.outcome]}),(t.assessment.missingFields??[]).length>0&&u.jsxs("p",{children:["缺失:",t.assessment.missingFields?.join("、")]})]}),t.taskKindRecommendation&&u.jsxs("div",{className:"oc-task-kind-card",children:[u.jsx("span",{children:"taskKind 建议"}),u.jsx("strong",{children:t.taskKindRecommendation}),u.jsx("button",{className:"btn btn-primary",type:"button",onClick:()=>e.onConfirmTaskKind(),children:"由我确认"}),u.jsx("small",{children:"模型不能代替人类确认。"})]}),t.confirmedTaskKind&&u.jsxs("div",{className:"oc-task-kind-card is-confirmed",children:["已由人类确认:",u.jsx("strong",{children:t.confirmedTaskKind})]})]})}function Or(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:e.toLocaleString()}function sM(e){const t=[],n=e.inputTokens??0,a=e.outputTokens??0,s=e.cacheReadTokens??0,l=e.cacheWriteTokens??0,c=e.cost??0;if(n>0&&t.push(`${Or(n)} in`),a>0&&t.push(`${Or(a)} out`),s>0&&t.push(`${Or(s)} cache R`),l>0&&t.push(`${Or(l)} cache W`),c>0&&t.push(c>=.01?`$${c.toFixed(2)}`:"<$0.01"),t.length===0){const f=e.totalTokens??0;return f>0?`${Or(f)} tokens`:"—"}return t.join(" · ")}function lM(){return u.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[u.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),u.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function oM(){return u.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:u.jsx("polyline",{points:"20 6 9 17 4 12"})})}function b2(){return u.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[u.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),u.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})}function cM(){return u.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:u.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})})}function Cp(){return u.jsx("svg",{className:"oc-tool-chevron",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:u.jsx("polyline",{points:"4 2.5 7.5 6 4 9.5"})})}function uM(){return u.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:u.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})})}function Oh(e){const[t,n]=S.useState(!1),a=()=>{navigator.clipboard?.writeText(e.text).then(()=>{n(!0),window.setTimeout(()=>n(!1),1600)},()=>{})};return u.jsx("button",{type:"button",className:`oc-message-copy${t?" is-copied":""}`,"aria-label":t?"已复制":"复制消息",title:t?"已复制":"复制",onClick:a,children:t?u.jsx(oM,{}):u.jsx(lM,{})})}function v2(e){const{message:t,streaming:n,activeAssistantId:a}=e;if(t.kind==="compaction")return u.jsxs("div",{className:"oc-compaction-card",role:"status",children:[u.jsx("span",{className:"oc-compaction-icon","aria-hidden":"true",children:u.jsx(J8,{size:16})}),u.jsxs("div",{className:"oc-compaction-body",children:[u.jsxs("div",{className:"oc-compaction-heading",children:[u.jsx("strong",{children:"上下文已压缩"}),u.jsx("span",{children:Eo(t.createdAt)}),t.compaction?.tokensBefore?u.jsxs("span",{children:["压缩前 ",Or(t.compaction.tokensBefore)," tokens"]}):null]}),u.jsx("div",{className:"oc-compaction-summary",children:u.jsx(Mh,{text:t.text})})]})]});const s=t.role==="user",l=s?"你":"助手",c=!s&&n&&a!==null&&t.id===a,f=c&&t.text.length===0,m=t.text.trim().length>0;return u.jsxs("div",{className:`oc-row ${s?"is-user":"is-assistant"}`,"data-user-message-id":s?t.id:void 0,children:[u.jsxs("div",{className:"oc-meta",children:[!s&&u.jsx("span",{className:"oc-role oc-role-assistant","aria-hidden":"true",children:"π"}),u.jsxs("span",{className:"oc-time",children:[Eo(t.createdAt),u.jsxs("span",{className:"sr-only",children:["(",l,")"]})]}),m&&u.jsx(Oh,{text:t.text})]}),u.jsxs("div",{className:`oc-bubble ${s?"oc-bubble-user":"oc-bubble-assistant"}`,children:[m?s?u.jsx("div",{style:{whiteSpace:"pre-wrap"},children:t.text}):u.jsx(Mh,{text:t.text}):f?u.jsx("span",{className:"oc-cursor","aria-hidden":"true"}):null,c&&m&&u.jsx("span",{className:"oc-cursor","aria-hidden":"true"})]})]})}function dM(e){if(!(!e||typeof e!="object"))return e}function ki(e){return typeof e=="string"?e:void 0}function Rp(e){if(!Array.isArray(e))return;const t=[];for(const n of e){const a=dM(n);if(!a)continue;const s=ki(a.type)??"";if(s==="thinking"||s==="reasoning"){const l=ki(a.thinking)??ki(a.text)??"";t.push({type:"thinking",thinking:l});continue}if(s==="toolCall"||s==="tool_call"||s==="toolUse"||s==="tool_use"){const l=ki(a.toolCallId)??ki(a.id)??"";if(!l)continue;const c=ki(a.toolName)??ki(a.name);t.push({type:"toolCall",toolCallId:l,...c?{toolName:c}:{}});continue}if(s==="text"||s==="output_text"||s===""){const l=ki(a.text);l!==void 0&&t.push({type:"text",text:l})}}return t}function fM(e,t={}){return e.type==="thinking"&&!t.isStreaming&&e.thinking.trim()===""}function G6(e,t={}){return e.filter(n=>!fM(n,t))}function mM(e){return e.type==="text"}function hM(e,t={}){const n=G6(e,t);let a=-1;for(let s=n.length-1;s>=0;s--)if(!mM(n[s])){a=s;break}return a===-1?{answerBlocks:n,processBlocks:[]}:{answerBlocks:n.slice(a+1),processBlocks:n.slice(0,a+1)}}function pM(e){return e.filter(t=>t.type==="text").map(t=>t.text).join("")}function gM(e){return{key:e,assistants:[],tools:[],processItems:[],live:!1}}function V6(e){const t=[],n=[];let a,s=[];const l=c=>{for(const f of s)f.assistantMessageId||(f.assistantMessageId=c),f.turnId||(f.turnId=a);s=[]};for(const c of e){const f=Date.parse(c.at)||Date.now();if(c.role==="user"){a=`restored-${c.id}`,s=[],t.push({id:c.id,role:"user",text:c.text,createdAt:f});continue}if(c.role==="assistant"){a||(a=`restored-${c.id}`);const m=Rp(c.content);t.push({id:c.id,role:"assistant",text:c.text,createdAt:f,...m&&m.length>0?{content:m}:{}}),l(c.id);continue}if(c.role==="tool"){a||(a=`restored-tool-${c.id}`);const m={id:c.toolCallId||c.id,toolName:c.toolName||"tool",status:c.isError===!0?"error":"ok",resultText:c.text,result:c.text,createdAt:f,finishedAt:f,turnId:a,...c.operationId?{operationId:c.operationId}:{}};n.push(m),s.push(m)}}return{messages:t,toolCalls:n}}function bM(e){return[...e].sort((t,n)=>t.eventSeq!==void 0&&n.eventSeq!==void 0&&t.eventSeq!==n.eventSeq?t.eventSeq-n.eventSeq:t.createdAt!==n.createdAt?t.createdAt-n.createdAt:t.id<n.id?-1:1)}function So(e,t){if(t.length===0)return;const n=bM(t);for(const a of n){const s=MI(a);s?e.push({kind:"activity",activity:s}):e.push({kind:"tool",tool:a})}}function y2(e,t,n,a){let s=[];for(const l of e){if(l.type==="thinking"){So(n,s),s=[],n.push({kind:"thinking",thinking:l.thinking});continue}if(l.type==="text"){So(n,s),s=[],l.text.trim()&&n.push({kind:"text",text:l.text});continue}const c=t.tools.find(f=>f.id===l.toolCallId);c&&!a.has(c.id)&&(s.push(c),a.add(c.id))}So(n,s)}function x2(e,t,n,a){const s=e.tools.filter(l=>!a.has(l.id)&&l.assistantMessageId===t.id);if(s.length!==0){for(const l of s)a.add(l.id);So(n,s)}}function vM(e){const t=new Set,n=[],a=e.assistants.slice(0,-1),s=e.assistants.at(-1);for(const h of a)y2(G6(h.content??[]),e,n,t),x2(e,h,n,t);const l=s?.content??[],c=hM(l,{isStreaming:e.live});y2(c.processBlocks,e,n,t),s&&x2(e,s,n,t);const f=e.tools.filter(h=>!t.has(h.id));if(f.length>0&&So(n,f),e.processItems=n,!s)return;if(l.length===0){e.answer=s;return}const m=pM(c.answerBlocks);e.answer={...s,text:m,content:c.answerBlocks}}function yM(e){const t=e.messages.filter(f=>f.role==="user"||f.role==="assistant"),n=[];let a=null;const s=f=>{const m=gM(f);return n.push(m),m};for(const f of t){if(f.role==="user"){a=s(`user-${f.id}`),a.user=f;continue}if(f.kind==="compaction"){a=s(`compaction-${f.id}`),a.assistants.push(f),a=null;continue}a||(a=s(`assistant-${f.id}`)),a.assistants.push(f)}const l=new Set,c=new Map;for(const f of n)for(const m of f.assistants)c.set(m.id,f);for(const f of e.toolCalls)if(f.assistantMessageId){const m=c.get(f.assistantMessageId);m&&(m.tools.push(f),l.add(f.id))}for(const f of e.toolCalls)if(!l.has(f.id)&&f.turnId){const m=n.find(p=>p.tools.some(b=>b.turnId===f.turnId)||p.key===`turn-${f.turnId}`||p.user&&`restored-${p.user.id}`===f.turnId);if(m){m.tools.push(f),l.add(f.id);continue}const h=n.find(p=>f.turnId===`restored-${p.user?.id}`||p.assistants.some(b=>f.turnId===`restored-${b.id}`));h&&(h.tools.push(f),l.add(f.id))}for(const f of e.toolCalls){if(l.has(f.id))continue;const m=n.find((h,p)=>{const b=h.user?.createdAt??h.assistants[0]?.createdAt??0,x=n[p+1]?.user?.createdAt??Number.POSITIVE_INFINITY;return f.createdAt>=b&&f.createdAt<x});m&&(m.tools.push(f),l.add(f.id))}for(const f of n)f.tools.sort((m,h)=>m.eventSeq!==void 0&&h.eventSeq!==void 0?m.eventSeq-h.eventSeq:m.createdAt-h.createdAt),f.live=e.streaming&&e.activeAssistantId!==null&&f.assistants.some(m=>m.id===e.activeAssistantId),vM(f);return n}function xM(e,t){return t<=0?[]:e.length<=t?[...e]:e.slice(-t)}function wM(e,t){const n=e.length,a=t?.thinkingCount??0,s=t?.textCount??0,l=t?.activityCount??0,c=a+s+l+n,f=e.filter(p=>p.status==="error").length+(t?.activityErrorCount??0),m=e.filter(p=>p.status==="running").length+(t?.activityRunningCount??0),h=[`处理详情 · ${c} 步`];return n>0&&h.push(`${n} 工具`),l>0&&h.push(`${l} 进展`),f>0?h.push(`${f} 出错`):m>0&&h.push("运行中"),{count:n,errorCount:f,runningCount:m,stepCount:c,label:h.join(" · ")}}function SM(e){const t=[];let n=0,a=0,s=0,l=0,c=0;for(const f of e)f.kind==="thinking"?n+=1:f.kind==="text"?a+=1:f.kind==="activity"?(s+=1,f.activity.kind==="error"?l+=1:f.activity.kind==="progress"&&(c+=1)):t.push(f.tool);return wM(t,{thinkingCount:n,textCount:a,activityCount:s,activityErrorCount:l,activityRunningCount:c})}function K6(e){const{entry:t}=e,[n,a]=S.useState(t.status==="error"),[s,l]=S.useState(!1),c=t.status==="running"?"运行中":t.status==="error"?"出错":"完成",f=`is-${t.status}`,m=iw(t.args,{toolName:t.toolName}),h=cw(t.createdAt,t.finishedAt),p=sw(t.toolName),b=Z2(t.resultText??t.result),y=ow(b,s?{maxLen:Number.MAX_SAFE_INTEGER}:void 0);return u.jsxs("div",{className:`oc-tool ${t.status==="error"?"is-error":""} ${t.status==="running"?"is-running":""}`,children:[u.jsxs("button",{type:"button",className:"oc-tool-head","aria-expanded":n,onClick:()=>a(x=>!x),children:[u.jsx(Cp,{}),u.jsx("span",{className:"oc-tool-icon","aria-hidden":"true",children:u.jsx(uM,{})}),u.jsx("span",{className:"oc-tool-name",children:t.toolName}),m&&u.jsx("span",{className:"oc-tool-args",children:m}),h!==void 0&&u.jsxs("span",{className:"oc-tool-duration",children:[h,"s"]}),u.jsx("span",{className:`oc-tool-status ${f}`,children:c})]}),n&&u.jsxs("div",{className:"oc-tool-body",children:[t.args!==void 0&&u.jsxs("div",{className:"oc-tool-section",children:[u.jsx("div",{className:"oc-tool-label",children:p.argsLabel}),u.jsx("pre",{className:"oc-tool-code",children:lw(t.args)})]}),(t.resultText!==void 0||t.result!==void 0)&&u.jsxs("div",{className:"oc-tool-section",children:[u.jsx("div",{className:"oc-tool-label",children:t.status==="error"?"错误":p.resultLabel}),u.jsx("pre",{className:"oc-tool-code",children:y.text}),y.truncated&&!s&&u.jsx("button",{type:"button",className:"btn btn-ghost oc-tool-expand-result",onClick:()=>l(!0),children:"展开全部"})]}),t.status==="running"&&t.resultText===void 0&&t.result===void 0&&t.args===void 0&&u.jsx("div",{className:"oc-tool-section",children:u.jsx("div",{className:"oc-tool-waiting",children:"等待结果…"})})]})]})}function kM(e){const{thinking:t,defaultOpen:n}=e,[a,s]=S.useState(n);return S.useEffect(()=>{s(n)},[n]),u.jsxs("div",{className:"oc-thinking",children:[u.jsxs("button",{type:"button",className:`oc-thinking-summary${a?" is-open":""}`,"aria-expanded":a,onClick:()=>s(l=>!l),children:[u.jsx(Cp,{}),u.jsx("span",{children:"思考"})]}),a?u.jsx("pre",{className:"oc-thinking-body",children:t||"…"}):null]})}function EM(e){return e.kind==="progress"?"••":e.kind==="success"?"✓":e.kind==="warning"?"!":"×"}function TM(e){const{activity:t,onActivate:n}=e,a=!!(t.activityRef&&n&&(e.canActivate?.(t.activityRef)??!0)),s=u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"oc-semantic-activity-icon","aria-hidden":"true",children:EM(t)}),u.jsxs("span",{className:"oc-semantic-activity-copy",children:[u.jsx("strong",{children:t.title}),t.detail?u.jsx("small",{children:t.detail}):null]}),a?u.jsx("span",{className:"oc-semantic-activity-link",children:"查看详情"}):null]});if(a&&t.activityRef&&n){const l=t.activityRef;return u.jsx("button",{type:"button",className:`oc-semantic-activity is-${t.kind}`,"data-activity-ref":l,onClick:()=>n(l),children:s})}return u.jsx("div",{className:`oc-semantic-activity is-${t.kind}`,"data-activity-ref":t.activityRef,children:s})}function NM(e){const{items:t,live:n}=e,[a,s]=S.useState(!1);S.useEffect(()=>{n||s(!1)},[n]);const l=SM(t),c=u.jsx("div",{className:"oc-process-inline-body",children:t.map((f,m)=>{if(f.kind==="thinking")return u.jsx(kM,{thinking:f.thinking,defaultOpen:n},`thinking-${m}`);if(f.kind==="text")return u.jsx("div",{className:"oc-process-text",children:f.text},`text-${m}`);if(f.kind==="activity")return u.jsx(TM,{activity:f.activity,onActivate:e.onActivateActivity,canActivate:e.canActivateActivity},f.activity.id);if(f.kind==="tool")return u.jsx(K6,{entry:f.tool},f.tool.id)})});return n?u.jsx("div",{className:"oc-process-inline is-live",children:c}):u.jsxs("div",{className:"oc-process-inline",children:[u.jsxs("button",{type:"button",className:`oc-process-inline-summary${a?" is-open":""}${l.errorCount>0?" is-error":l.runningCount>0?" is-running":""}`,"aria-expanded":a,onClick:()=>s(f=>!f),children:[u.jsx(Cp,{}),u.jsx("span",{children:l.label})]}),a?c:null]})}function CM(e){const{scrollContainerRef:t,messagesEndRef:n,onScroll:a,hasThread:s,readiness:l,streaming:c,streamingAssistantId:f,messagesCount:m,visibleCount:h,onLoadMore:p,turnGroups:b,interview:y}=e;return u.jsxs("div",{ref:t,className:`oc-messages${s?" has-thread":" is-empty"}`,onScroll:a,children:[s?null:u.jsx($6,{mode:"empty-session",readiness:l,disabled:c,onSuggest:e.onSuggest}),s&&m>h&&u.jsx("button",{type:"button",className:"btn btn-ghost oc-load-history",onClick:p,children:"加载更早消息"}),s&&b.map((x,k)=>{const N=x.user??x.assistants[0],R=k>0?b[k-1].user??b[k-1].assistants[0]:void 0,C=!!N&&(!R||Sf(R.createdAt)!==Sf(N.createdAt)),_=x.answer,I=!!_?.text.trim(),$=x.live&&x.processItems.length===0;return u.jsxs("div",{className:"oc-turn-group",children:[C&&N&&u.jsx("div",{className:"oc-day-sep",children:Sf(N.createdAt)}),x.user&&u.jsx(v2,{message:x.user,streaming:c,activeAssistantId:f}),x.processItems.length>0&&u.jsx(NM,{items:x.processItems,live:x.live,onActivateActivity:e.onActivateActivity,canActivateActivity:e.canActivateActivity}),_&&(I||$)?u.jsx(v2,{message:_,streaming:c,activeAssistantId:f}):null]},x.key)}),y&&u.jsx(iM,{interview:y,interviewAnswer:e.interviewAnswer,onAnswerChange:e.onInterviewAnswerChange,onAnswer:e.onAnswerInterview,onConfirmTaskKind:e.onConfirmTaskKind}),u.jsx("div",{ref:n})]})}const RM=13,w2=240;function AM(e){const t=e.trim();return t.length>w2?`${t.slice(0,w2).trimEnd()}…`:t}function Gm(e,t=64){const n=e.trim().replace(/\s+/g," ");return n.length>t?`${n.slice(0,t)}…`:n}function _M(e,t){if(e.length===0)return[];const n=t>0?Math.max(1,Math.floor(t/RM)):e.length;if(e.length<=n)return e.map((s,l)=>({key:`b${l}`,members:[s]}));const a=[];for(let s=0;s<n;s+=1){const l=Math.floor(s*e.length/n),c=Math.floor((s+1)*e.length/n),f=e.slice(l,Math.max(c,l+1));f.length>0&&a.push({key:`b${s}`,members:f})}return a}function IM(e){const{scrollContainerRef:t,turnGroups:n,measureKey:a}=e,s=S.useRef(null),l=S.useMemo(()=>n.filter(I=>I.user).map((I,$)=>{const D=I.user;return{id:D.id,index:$+1,text:D.text,createdAt:D.createdAt}}),[n]),[c,f]=S.useState(0),[m,h]=S.useState(null),[p,b]=S.useState(null),y=S.useRef(new Map),x=S.useRef(0),k=S.useRef(null),N=S.useCallback(()=>{const I=t.current;if(!I)return;const $=I.offsetTop,D=new Map;for(const B of l){const Y=I.querySelector(`[data-user-message-id="${CSS.escape(B.id)}"]`);Y&&D.set(B.id,Math.max(0,Y.offsetTop-$))}y.current=D;const M=s.current?.clientHeight??I.clientHeight;M!==x.current&&(x.current=M,f(M))},[t,l]),R=S.useCallback(()=>{const I=t.current;if(!I)return;const $=48;let D=null;for(const M of l){const B=y.current.get(M.id);if(B!==void 0)if(B<=I.scrollTop+$)D=M.id;else break}h(D)},[t,l]);S.useEffect(()=>{const I=window.requestAnimationFrame(N);return()=>window.cancelAnimationFrame(I)},[N,a]),S.useEffect(()=>{const I=t.current;if(!I)return;const $=()=>{k.current=null,N(),R()},D=()=>{k.current===null&&(k.current=window.requestAnimationFrame($))};D(),I.addEventListener("scroll",D,{passive:!0}),window.addEventListener("resize",D);const M=new MutationObserver(D);return M.observe(I,{childList:!0,subtree:!0}),()=>{I.removeEventListener("scroll",D),window.removeEventListener("resize",D),M.disconnect(),k.current!==null&&(window.cancelAnimationFrame(k.current),k.current=null)}},[N,R,t]);const C=S.useMemo(()=>_M(l,c),[l,c]),_=S.useCallback(I=>{const $=t.current,D=y.current.get(I);!$||D===void 0||$.scrollTo({top:Math.max(0,D-8),behavior:"smooth"})},[t]);return l.length===0?null:u.jsx("nav",{ref:s,className:"oc-anchor-rail","aria-label":`用户消息锚点(共 ${l.length} 条)`,children:C.map(I=>{const $=I.members[0],D=m!==null&&I.members.some(Y=>Y.id===m),M=I.members.length,B=p===I.key;return u.jsxs("div",{className:"oc-anchor-cluster",onMouseEnter:()=>b(I.key),onMouseLeave:()=>b(null),children:[u.jsx("button",{type:"button",className:`oc-anchor-bar${D?" is-active":""}${M>1?" is-cluster":""}`,title:M>1?`${M} 条相邻输入`:void 0,"aria-label":M>1?`定位到 ${M} 条聚合输入中的第 ${$.index} 条:${Gm($.text,40)}`:`定位到第 ${$.index} 条输入:${Gm($.text,80)}`,onClick:()=>_($.id),onFocus:()=>b(I.key),onBlur:()=>b(null)}),B?u.jsx("div",{className:"oc-anchor-popover",role:"tooltip",children:M>1?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"oc-anchor-popover-head",children:[u.jsxs("span",{children:[M," 条聚合输入"]}),u.jsxs("span",{children:["第 ",$.index,"–",I.members[I.members.length-1].index," 条"]})]}),u.jsx("ul",{className:"oc-anchor-popover-list",children:I.members.map(Y=>u.jsx("li",{children:u.jsxs("button",{type:"button",className:"oc-anchor-popover-item",onClick:()=>_(Y.id),children:[u.jsx("span",{className:"oc-anchor-popover-item-time",children:Eo(Y.createdAt)}),u.jsx("span",{className:"oc-anchor-popover-item-text",children:Gm(Y.text)})]})},Y.id))})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"oc-anchor-popover-head",children:[u.jsxs("span",{children:["第 ",$.index,"/",l.length," 条输入"]}),u.jsx("span",{children:Eo($.createdAt)})]}),u.jsx("div",{className:"oc-anchor-popover-body",children:AM($.text)})]})}):null]},I.key)})})}const MM={auto:"auto(跟随 Pi 默认等级)",off:"off · 关闭",minimal:"minimal · 极简",low:"low · 低",medium:"medium · 中",high:"high · 高",xhigh:"xhigh · 极高",max:"max · 最高"};function Y6(e,t){const n=t.trim().toLowerCase(),a=new Map;for(const s of e){if(n&&!s.provider.toLowerCase().includes(n)&&!s.id.toLowerCase().includes(n)&&!(s.name??"").toLowerCase().includes(n))continue;const l=a.get(s.provider)??[];l.push(s),a.set(s.provider,l)}return[...a.entries()].map(([s,l])=>({provider:s,models:l}))}function OM(e,t){const n=new Set,a=[],s=l=>{n.has(l)||(n.add(l),a.push({value:l,label:MM[l]??l,...l==="auto"&&t?{effective:t}:{}}))};s("auto");for(const l of e)s(l);return a}function _o(e,t){return`${e}/${t}`}function Dh(e){return{...e.modelProvider&&e.modelId?{model:{provider:e.modelProvider,modelId:e.modelId}}:{},...e.thinkingLevel?{thinkingLevel:e.thinkingLevel}:{}}}function X6(e,t){return{...e,model:t.model??e.model,thinkingLevel:t.thinkingLevel??e.thinkingLevel}}function DM(e,t){const n=X6(e,t);return n.model?.provider===e.model?.provider&&n.model?.modelId===e.model?.modelId&&n.thinkingLevel===e.thinkingLevel}function jM(){return u.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",children:u.jsx("path",{d:"M2.6 4.2 6 7.6l3.4-3.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function LM(e){const t=sl(),[n,a]=S.useState(!1),[s,l]=S.useState(""),[c,f]=S.useState(0),m=S.useRef(null),h=S.useRef(null),p=t.snapshot,b=t.status==="loading",y=t.status==="error"?t.error:null,x=p?(p.models??[]).map(_=>({provider:_.provider,id:_.id,..._.name?{name:_.name}:{},..._.hasCredentials!==void 0?{hasCredentials:_.hasCredentials}:{}})):e.models,k=S.useMemo(()=>Y6(x,s),[x,s]),N=S.useMemo(()=>k.flatMap(_=>_.models),[k]);S.useEffect(()=>{n&&(l(""),f(0),window.setTimeout(()=>h.current?.focus(),0))},[n]),S.useEffect(()=>{if(!n)return;const _=$=>{const D=m.current;D&&$.target instanceof Node&&!D.contains($.target)&&a(!1)},I=$=>{$.key==="Escape"&&a(!1)};return document.addEventListener("mousedown",_),document.addEventListener("keydown",I),()=>{document.removeEventListener("mousedown",_),document.removeEventListener("keydown",I)}},[n]);const R=_=>{if(e.disabled)return;const I=N[_];I&&(a(!1),e.onSelect(I.provider,I.id))},C=_=>{if(_.key==="ArrowDown"){_.preventDefault(),f(I=>N.length?(I+1)%N.length:0);return}if(_.key==="ArrowUp"){_.preventDefault(),f(I=>N.length?(I-1+N.length)%N.length:0);return}if(_.key==="Enter"){_.preventDefault(),R(c);return}if(_.key==="Escape"){_.preventDefault(),a(!1);return}};return u.jsxs("div",{className:"oc-select-menu oc-model-menu",ref:m,children:[u.jsxs("button",{type:"button",className:"oc-select-trigger","aria-haspopup":"listbox","aria-expanded":n,title:"选择模型",disabled:e.disabled,onClick:()=>a(_=>!_),children:[u.jsx("span",{className:"oc-select-trigger-label",children:e.triggerLabel}),u.jsx(jM,{})]}),n&&u.jsxs("div",{className:"oc-select-panel oc-model-panel",role:"listbox","aria-label":"选择模型",children:[u.jsx("input",{ref:h,className:"oc-select-search",placeholder:"搜索模型或 Provider…",value:s,onChange:_=>{l(_.target.value),f(0)},onKeyDown:C}),b&&u.jsx("div",{className:"oc-select-status",children:"模型列表加载中…"}),y&&u.jsxs("div",{className:"oc-select-status is-error",children:[u.jsxs("span",{children:[y.code?`${y.code}:`:"",y.message]}),u.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>{tl()},children:"重试"})]}),!b&&!y&&k.length===0&&u.jsx("div",{className:"oc-select-status",children:"当前没有可用模型(真实空态,未伪造列表)"}),k.map(_=>u.jsxs("div",{className:"oc-model-group",children:[u.jsx("div",{className:"oc-model-group-head",children:_.provider}),_.models.map(I=>{const $=_o(I.provider,I.id),D=$===e.activeModelRef,M=N[c]===I;return u.jsxs("button",{type:"button",role:"option","aria-selected":D,disabled:e.disabled,className:`oc-select-option oc-model-option${M?" is-highlighted":""}${D?" is-active":""}`,onMouseDown:B=>B.preventDefault(),onClick:()=>{e.disabled||(a(!1),e.onSelect(I.provider,I.id))},children:[u.jsxs("span",{className:"oc-model-option-name",children:[I.name?`${I.name} · `:"",I.id]}),D&&u.jsx("span",{className:"oc-model-option-check",children:"✓"})]},$)})]},_.provider))]})]})}function zM(){return u.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",children:u.jsx("path",{d:"M2.6 4.2 6 7.6l3.4-3.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function BM(e){const t=sl(),[n,a]=S.useState(!1),[s,l]=S.useState(0),c=S.useRef(null),f=e.effectiveLevel??t.snapshot?.selection?.effectiveThinkingLevel,m=t.snapshot?.thinkingLevels?.length?t.snapshot.thinkingLevels.map(y=>y.value):void 0,h=S.useMemo(()=>OM(m??e.levels,f),[m,e.levels,f]);S.useEffect(()=>{n&&l(0)},[n]),S.useEffect(()=>{if(!n)return;const y=k=>{const N=c.current;N&&k.target instanceof Node&&!N.contains(k.target)&&a(!1)},x=k=>{k.key==="Escape"&&a(!1)};return document.addEventListener("mousedown",y),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("keydown",x)}},[n]);const p=y=>{if(e.disabled)return;const x=h[y];x&&(a(!1),e.onSelect(x.value))},b=y=>{if(y.key==="ArrowDown"){y.preventDefault(),l(x=>h.length?(x+1)%h.length:0);return}if(y.key==="ArrowUp"){y.preventDefault(),l(x=>h.length?(x-1+h.length)%h.length:0);return}if(y.key==="Enter"){y.preventDefault(),p(s);return}if(y.key==="Escape"){y.preventDefault(),a(!1);return}};return u.jsxs("div",{className:"oc-select-menu oc-thinking-menu",ref:c,children:[u.jsxs("button",{type:"button",className:"oc-select-trigger","aria-haspopup":"listbox","aria-expanded":n,title:"思考等级",disabled:e.disabled,onClick:()=>a(y=>!y),children:[u.jsx("span",{className:"oc-select-trigger-label",children:e.triggerLabel}),u.jsx(zM,{})]}),n&&u.jsx("div",{className:"oc-select-panel oc-thinking-panel",role:"listbox","aria-label":"思考等级",onKeyDown:b,children:h.map((y,x)=>{const k=y.value===e.activeValue,N=x===s;return u.jsxs("button",{type:"button",role:"option","aria-selected":k,disabled:e.disabled,className:`oc-select-option oc-thinking-option${N?" is-highlighted":""}${k?" is-active":""}`,onMouseDown:R=>R.preventDefault(),onClick:()=>{e.disabled||(a(!1),e.onSelect(y.value))},children:[u.jsx("span",{className:"oc-thinking-option-label",children:y.label}),y.value==="auto"&&y.effective?u.jsxs("span",{className:"oc-thinking-badge",children:["Pi 实际:",y.effective]}):null,k&&u.jsx("span",{className:"oc-model-option-check",children:"✓"})]},y.value)})})]})}const Vm="--oc-shortcut-palette-available-height",UM=8,qM=8;function HM(e){const t=e.viewportTop??0,n=e.topInset??UM,a=e.anchorGap??qM;if([e.boundaryTop,e.anchorTop,t,n,a].some(c=>!Number.isFinite(c)))return null;const l=Math.max(e.boundaryTop,t);return Math.max(0,Math.floor(e.anchorTop-l-n-a))}function FM(){return u.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[u.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),u.jsx("circle",{cx:"8.5",cy:"10",r:"1.5"}),u.jsx("path",{d:"m21 16-5.5-5.5L9 17"})]})}function PM(e){const{composer:t,streaming:n,turnPhase:a,deferredTurn:s,hasThread:l}=e,c=S.useRef(null),f=sl(),m=f.reloading,h=f.reloadError,b=f.mutationBusy||m||a!=="idle",y=s?"textPreview"in s?s.textPreview:s.text:"",x=s?"imageCount"in s?s.imageCount:s.images.length:0,k=s?.state==="dispatching"?"正在确认发送":s?.state==="accepted"?"已进入发送":s?.state==="failed"?"发送失败":a!=="idle"?"已排队 · 当前回合结束后自动发送":"已排队 · 等待发送",N=s?.state==="queued"||s?.state==="failed",R=S.useCallback(()=>{t.setInput(""),t.setShortcutOpen(!1),el()},[t.setInput,t.setShortcutOpen]),C=S.useCallback(B=>{const Y=t.isComposingNow()||B.nativeEvent.isComposing,G=t.recentlyComposedNow();if(B.key==="Enter"&&!B.shiftKey&&!Y&&!G&&(!n||a!=="idle")){if(t.shortcutOpen&&t.filteredShortcuts.length>0){if((t.filteredShortcuts[t.shortcutIndex]??t.filteredShortcuts[0])?.command==="/reload"){B.preventDefault(),R();return}}else if(t.input.trim()==="/reload"){B.preventDefault(),R();return}}e.onKeyDown(B)},[t.isComposingNow,t.recentlyComposedNow,t.shortcutOpen,t.filteredShortcuts,t.shortcutIndex,t.input,R,n,a,e.onKeyDown]),_=S.useCallback((B,Y)=>{if(Y==="pi-prompt"||B==="/name"||B==="/compact"){t.setInput(`${B} `),t.setShortcutOpen(!1),t.textareaRef.current?.focus();return}if(B==="/reload"){R();return}e.onRunShortcut(B)},[R,e.onRunShortcut,t]),I=S.useCallback(()=>{if(t.input.trim()==="/reload"){R();return}e.onSend(t.input)},[t.input,R,e.onSend]);S.useEffect(()=>{if(!t.shortcutOpen||t.filteredShortcuts.length===0||!e.paletteKeyboardNavRef.current)return;const B=e.shortcutPaletteRef.current;if(!B)return;B.querySelector(`[data-shortcut-index="${t.shortcutIndex}"]`)?.scrollIntoView({block:"nearest",inline:"nearest"}),e.paletteKeyboardNavRef.current=!1},[t.shortcutOpen,t.filteredShortcuts,t.shortcutIndex,e.shortcutPaletteRef,e.paletteKeyboardNavRef]),S.useEffect(()=>{if(!t.shortcutOpen||t.filteredShortcuts.length===0)return;const B=c.current,Y=e.shortcutPaletteRef.current,G=B?.closest(".oc-main")??null;if(!B||!Y||!G)return;let j=0;const F=()=>{j=0;const K=G.getBoundingClientRect(),X=B.getBoundingClientRect(),V=HM({boundaryTop:K.top,anchorTop:X.top,viewportTop:window.visualViewport?.offsetTop??0});if(V===null){Y.style.removeProperty(Vm);return}Y.style.setProperty(Vm,`${V}px`)},H=()=>{j!==0&&window.cancelAnimationFrame(j),j=window.requestAnimationFrame(F)};F();const ee=typeof ResizeObserver>"u"?null:new ResizeObserver(H);return ee?.observe(G),ee?.observe(B),window.addEventListener("resize",H),window.visualViewport?.addEventListener("resize",H),window.visualViewport?.addEventListener("scroll",H),()=>{j!==0&&window.cancelAnimationFrame(j),ee?.disconnect(),window.removeEventListener("resize",H),window.visualViewport?.removeEventListener("resize",H),window.visualViewport?.removeEventListener("scroll",H),Y.style.removeProperty(Vm)}},[t.shortcutOpen,t.filteredShortcuts.length,e.layoutMode,e.shortcutPaletteRef]);const $=(()=>{const B=e.processSummary;return B?B.statusKind==="error"?`查看工具调用记录,共 ${B.count} 次,其中 ${B.statusLabel}`:B.statusKind==="running"?`查看工具调用记录,共 ${B.count} 次,${B.statusLabel||"正在运行"}`:`查看工具调用记录,共 ${B.count} 次,全部已完成`:"查看工具调用记录"})(),D=(()=>{const B=e.usage.inputTokens,Y=e.usage.outputTokens,G=e.usage.cacheReadTokens,j=e.usage.cacheWriteTokens,F=e.usage.cost??0,H=e.usage.contextUsage,ee=[];if(H&&(H.percent!==null||H.tokens!==null)){const K=H.percent!==null?`${Math.round(H.percent*10)/10}%`:"—",X=H.contextWindow>0?Or(H.contextWindow):"—",V=H.tokens!==null?Or(H.tokens):"—";ee.push(u.jsxs("span",{className:`oc-usage-part is-context${H.percent!==null&&H.percent>=80?" is-high":""}`,title:`上下文占用 ${V} / ${X} tokens(达到约 80% 时建议压缩上下文)`,children:["上下文 ",K," / ",X]},"context"))}if(B>0&&ee.push(u.jsxs("span",{className:"oc-usage-part is-in",title:"输入 tokens",children:["↑ ",Or(B)]},"in")),Y>0&&ee.push(u.jsxs("span",{className:"oc-usage-part is-out",title:"输出 tokens",children:["↓ ",Or(Y)]},"out")),G>0&&ee.push(u.jsxs("span",{className:"oc-usage-part",title:"缓存命中:这部分输入由提供商 prompt 缓存复用,计费约为原价的 10%",children:[u.jsx(Ev,{size:12,"aria-hidden":"true"}),"缓存命中 ",Or(G)]},"cache-read")),j>0&&ee.push(u.jsxs("span",{className:"oc-usage-part",title:"缓存写入:本次新建立 prompt 缓存的部分,下次请求可低价复用",children:[u.jsx(Ev,{size:12,"aria-hidden":"true"}),"缓存写入 ",Or(j)]},"cache-write")),F>0&&ee.push(u.jsx("span",{className:"oc-usage-part",children:F>=.01?`$${F.toFixed(2)}`:"<$0.01"},"cost")),ee.length===0){const K=e.usage.totalTokens;K>0&&ee.push(u.jsxs("span",{className:"oc-usage-part",children:[Or(K)," tokens"]},"total"))}return ee})(),M=u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"oc-runtime-controls-group",children:[u.jsx(LM,{models:e.models,activeModelRef:e.activeModelRef,triggerLabel:e.activeModelRef||"选择模型",disabled:b,onSelect:(B,Y)=>e.onSwitchRuntime({provider:B,modelId:Y})}),u.jsx(BM,{levels:e.thinkingLevels,activeValue:e.activeThinkingLevel||"auto",triggerLabel:e.activeThinkingLevel||"auto",disabled:b,onSelect:B=>e.onSwitchRuntime({thinkingLevel:B})}),u.jsxs("span",{className:"oc-usage",title:sM(e.usage),children:[u.jsx("span",{className:"oc-usage-state",children:a==="stopping"?"正在停止":a==="running"?"运行中":"空闲"}),e.unread>0?u.jsxs("span",{className:"oc-usage-unread",children:[e.unread," 未读"]}):null,D]}),e.processSummary&&u.jsxs("button",{type:"button",ref:e.processTriggerRef,className:`oc-process-summary is-${e.processSummary.statusKind}${e.processOpen?" is-open":""}`,"aria-expanded":e.processOpen,"aria-controls":"oc-process-panel","aria-label":$,title:$,onClick:e.onToggleProcess,children:[u.jsx("span",{className:"oc-process-summary-label",children:"调用记录"}),u.jsx("span",{className:"oc-process-summary-badge",children:e.processSummary.count}),e.processSummary.statusKind!=="ok"&&e.processSummary.statusLabel?u.jsx("span",{className:"oc-process-summary-status",children:e.processSummary.statusLabel}):null]})]}),u.jsxs("div",{className:"oc-runtime-controls-group is-right",children:[u.jsxs("button",{type:"button",className:"btn btn-ghost",onClick:e.onCompact,disabled:a!=="idle"||!l||e.compacting,title:e.compacting?"正在压缩上下文…":l?a!=="idle"?"生成中,暂不可压缩":"压缩上下文,释放 token":"先进行对话后再压缩上下文","aria-label":e.compacting?"正在压缩上下文…":l?a!=="idle"?"生成中,暂不可压缩":"压缩上下文,释放 token":"先进行对话后再压缩上下文",children:[e.compacting?u.jsx("span",{className:"oc-spinner oc-spinner-inline","aria-hidden":"true"}):null,e.compacting?"压缩中…":"压缩"]}),e.runtimeContext?u.jsx("button",{type:"button",ref:e.runtimeContextTriggerRef,className:`btn btn-ghost oc-runtime-context-toggle${e.runtimeContextOpen?" is-active":""}`,"aria-expanded":e.runtimeContextOpen,"aria-controls":"oc-runtime-context-panel",onClick:e.onToggleRuntimeContext,children:"注入上下文"}):null]})]});return u.jsx("div",{className:"oc-composer",children:u.jsxs("div",{className:"oc-composer-inner",ref:c,children:[t.fileOptions.length>0&&u.jsx("div",{className:"oc-file-palette",role:"listbox","aria-label":"Repository files",children:t.fileOptions.map(B=>u.jsx("button",{type:"button",role:"option",className:B.endsWith("/")?"is-dir":void 0,onMouseDown:Y=>Y.preventDefault(),onClick:()=>t.insertFileReference(B),children:u.jsxs("code",{children:["@",B]})},B))}),t.pendingImages.length>0&&u.jsx("div",{className:"oc-attachment-list",children:t.pendingImages.map(B=>u.jsxs("span",{children:[B.name,u.jsx("button",{type:"button","aria-label":`移除 ${B.name}`,onClick:()=>t.removeImage(B),children:"×"})]},B.name))}),u.jsxs("div",{className:"oc-composer-toolbar",children:[u.jsxs("label",{className:"oc-attach-button oc-attach-icon",title:"添加图片","aria-label":"添加图片",children:[u.jsx(FM,{}),u.jsx("span",{className:"sr-only",children:"添加图片"}),u.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:B=>{t.addImagesFromFiles(Array.from(B.target.files??[]).slice(0,4)),B.target.value=""}})]}),u.jsxs("span",{className:"oc-composer-hint",children:[u.jsx("span",{className:"oc-kbd",children:"Enter"})," ",a==="running"?"排队发送":"发送"]}),u.jsxs("span",{className:"oc-composer-hint",children:[u.jsx("span",{className:"oc-kbd",children:"Shift"}),"+",u.jsx("span",{className:"oc-kbd",children:"Enter"})," 换行"]}),u.jsxs("span",{className:"oc-composer-hint",children:[u.jsx("span",{className:"oc-kbd",children:"↑"}),u.jsx("span",{className:"oc-kbd",children:"↓"})," 历史输入"]}),m&&u.jsx("span",{className:"oc-reload-status",children:"正在重新加载会话…"})]}),t.shortcutOpen&&t.filteredShortcuts.length>0&&u.jsxs("div",{className:"oc-shortcut-palette",id:"oc-shortcut-palette",ref:e.shortcutPaletteRef,role:"listbox","aria-label":"命令","aria-busy":t.dynamicCommandsLoading||void 0,"data-layout-mode":e.layoutMode,children:[u.jsxs("div",{className:"oc-shortcut-palette-head",children:[u.jsxs("strong",{children:["命令 · ",t.filteredShortcuts.length]}),t.dynamicCommandsLoading?u.jsx("span",{className:"oc-shortcut-palette-meta",children:"正在加载扩展、提示词与技能…"}):null,t.dynamicCommandsError?u.jsxs("span",{className:"oc-shortcut-palette-meta is-error",children:[t.dynamicCommandsError,u.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>t.retryDynamicCommands(),children:"重试"})]}):null]}),u.jsx("div",{className:"oc-shortcut-palette-body",children:e.paletteModel.map(B=>u.jsxs("div",{className:"oc-shortcut-group",children:[u.jsxs("small",{children:[B.label," · ",B.items.length]}),B.items.map(({entry:Y,globalIndex:G})=>u.jsxs("button",{type:"button",role:"option",id:`oc-shortcut-option-${G}`,"aria-label":Y.command,"aria-describedby":`oc-shortcut-option-desc-${G}`,"aria-selected":G===t.shortcutIndex,className:G===t.shortcutIndex?"is-active":"","data-shortcut-index":G,title:Y.command,onMouseEnter:()=>t.setShortcutIndex(G),onMouseDown:j=>j.preventDefault(),onClick:j=>{j.currentTarget.scrollIntoView({block:"nearest"}),_(Y.command,Y.action)},children:[u.jsx("code",{children:Y.command}),u.jsx("small",{id:`oc-shortcut-option-desc-${G}`,children:Y.description})]},`${Y.source}:${Y.command}`))]},B.source))})," "]}),s?u.jsxs("div",{className:`oc-deferred-turn is-${s.state}`,role:"status",children:[u.jsxs("div",{className:"oc-deferred-turn-info",children:[u.jsx("strong",{children:k}),u.jsx("span",{children:y||(x>0?`${x} 张图片`:"待发送消息")})]}),N?u.jsxs("div",{className:"oc-deferred-turn-actions",children:[s.state==="queued"&&a!=="idle"?u.jsx("button",{type:"button",title:"停止当前回复,立即发送排队消息",onClick:e.onSendDeferredNow,children:"立即发送"}):null,u.jsx("button",{type:"button",title:"把排队消息移回输入框编辑",onClick:e.onCancelDeferred,children:"编辑"}),u.jsx("button",{type:"button",className:"is-danger",title:"删除排队消息",onClick:e.onDiscardDeferred,children:"删除"})]}):null]}):null,u.jsxs("div",{className:`oc-composer-shell${a!=="idle"?" is-busy":""}`,children:[u.jsx("textarea",{ref:t.textareaRef,className:"oc-textarea",value:t.input,rows:1,placeholder:a==="stopping"?"上一轮正在停止…输入后可排队自动发送":n?"正在执行…继续输入以排队,当前回合结束后自动发送":l?"输入消息… Enter 发送 · Shift+Enter 换行 · ↑ 召回历史输入":"描述目标,或点选上方建议开始…",onChange:B=>t.handleInputChange(B.target.value),onKeyDown:C,onCompositionStart:t.onCompositionStart,onCompositionEnd:t.onCompositionEnd,"aria-expanded":t.shortcutOpen,"aria-controls":t.shortcutOpen?"oc-shortcut-palette":void 0,"aria-activedescendant":t.shortcutOpen&&t.filteredShortcuts.length>0?`oc-shortcut-option-${t.shortcutIndex}`:void 0}),a==="running"?u.jsxs(u.Fragment,{children:[(t.input.trim()!==""||t.pendingImages.length>0)&&u.jsx("button",{type:"button",className:"oc-send is-queue",title:"排队发送:当前回合结束后自动发送","aria-label":"排队发送:当前回合结束后自动发送",onClick:I,disabled:m,children:u.jsx(b2,{})}),u.jsxs("button",{type:"button",className:"oc-stop",title:s?"对话进行中,点击停止后立即发送排队消息":"对话进行中,点击停止","aria-label":s?"对话进行中,点击停止后立即发送排队消息":"对话进行中,点击停止",onClick:e.onStop,children:[u.jsx("span",{className:"oc-spinner","aria-hidden":"true"}),u.jsx(cM,{})]})]}):u.jsx("button",{type:"button",className:"oc-send",title:a==="stopping"?"停止后发送":"发送","aria-label":a==="stopping"?"停止后发送":"发送",onClick:I,disabled:!t.input.trim()&&t.pendingImages.length===0||m,children:u.jsx(b2,{})})]}),h&&u.jsxs("div",{className:"oc-reload-banner is-error",role:"alert",children:[u.jsxs("span",{children:[h.code?`${h.code}:`:"",h.message]}),u.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>{el()},children:"重试"})]}),u.jsx("div",{className:"oc-runtime-controls",children:M})]})})}function $M(e){const{toolCalls:t,onClose:n,overlay:a=!1}=e,s=S.useRef(null);return Pu({open:a,containerRef:s,triggerRef:e.triggerRef,onEscape:n}),u.jsxs("aside",{ref:s,id:"oc-process-panel",className:`oc-process${a?" is-process-overlay":""}`,"aria-label":"工具调用记录",role:a?"dialog":void 0,"aria-modal":a?!0:void 0,tabIndex:-1,children:[u.jsxs("header",{className:"oc-process-head",children:[u.jsxs("div",{className:"oc-process-title",children:[u.jsx("span",{className:"oc-process-title-mark","aria-hidden":"true"}),"工具调用记录",u.jsxs("span",{className:"oc-process-count",children:[t.length," 次"]})]}),u.jsx("button",{type:"button",className:"btn btn-ghost oc-process-close","aria-label":"关闭工具调用记录",onClick:n,children:"关闭"})]}),u.jsx("div",{className:"oc-process-timeline",children:t.length===0?u.jsx("div",{className:"oc-process-empty",children:"本轮对话尚无工具调用。诊断细节会在这里按时间线展示。"}):t.map((l,c)=>u.jsxs("div",{className:`oc-process-item${c===0?" is-first":""}${c===t.length-1?" is-last":""}${l.status==="error"?" is-error":""}${l.status==="running"?" is-running":""}`,children:[u.jsx("div",{className:"oc-process-rail","aria-hidden":"true",children:u.jsx("span",{className:"oc-process-dot"})}),u.jsx("div",{className:"oc-process-time",children:Eo(l.createdAt)}),u.jsx("div",{className:"oc-process-body",children:u.jsx(K6,{entry:l})})]},l.id))})]})}const S2=[{id:"overview",label:"概览"},{id:"system",label:"System prompt"},{id:"files",label:"Context files"},{id:"skills",label:"Skills"},{id:"extensions",label:"Extensions"},{id:"packages",label:"Plugins"},{id:"tools",label:"Active tools"},{id:"raw",label:"原始 JSON"}];function pu(e){const t=Array.isArray(e.items)?e.items:void 0;return u.jsxs("section",{className:"oc-runtime-context-section",children:[u.jsxs("header",{className:"oc-runtime-context-section-head",children:[u.jsx("strong",{children:e.title}),u.jsx("span",{className:"oc-runtime-context-meta",children:t?`${t.length} 项`:"未投影"})]}),t===void 0?u.jsx("p",{className:"oc-runtime-context-empty",children:"该 session 未提供资源投影"}):t.length===0?u.jsx("p",{className:"oc-runtime-context-empty",children:e.emptyText}):u.jsx("ul",{className:"oc-runtime-context-resources",children:t.map((n,a)=>u.jsx(GM,{item:n},`${n.name??n.path??a}:${a}`))})]})}function GM(e){const t=e.item,a=[t.scope?`scope ${t.scope}`:"",t.source??"",t.version?`v${t.version}`:"",t.cwd?`cwd ${t.cwd}`:""].filter(Boolean).join(" · "),s=t.path?`${t.path}${t.baseDir?`(base: ${t.baseDir})`:""}`:"";return u.jsxs("li",{children:[u.jsxs("div",{className:"oc-runtime-context-resource-head",children:[u.jsx("strong",{className:"oc-runtime-context-resource-name",title:t.path??t.name,children:t.name||t.path||"未命名资源"}),t.enabled===!1?u.jsx("span",{className:"oc-runtime-context-resource-flag",children:"未启用"}):null,a?u.jsx("span",{className:"oc-runtime-context-meta",title:a,children:a}):null]}),t.description?u.jsx("span",{className:"oc-runtime-context-resource-desc",children:t.description}):null,t.path?u.jsx("code",{className:"oc-runtime-context-resource-path",title:s,children:s}):null,t.error?u.jsxs("span",{className:"oc-runtime-context-diag is-error",children:[u.jsx("span",{className:"oc-runtime-context-diag-icon","aria-hidden":"true",children:"✕"}),t.error]}):null,Array.isArray(t.diagnostics)&&t.diagnostics.length>0?u.jsxs("span",{className:"oc-runtime-context-diag",children:[u.jsx("span",{className:"oc-runtime-context-diag-icon","aria-hidden":"true",children:"⚠"}),t.diagnostics.join(";")]}):null,Array.isArray(t.resolved)&&t.resolved.length>0?u.jsxs("details",{className:"oc-runtime-context-resolved",children:[u.jsxs("summary",{children:["已解析 ",t.resolved.length," 项"]}),u.jsx("ul",{className:"oc-runtime-context-resolved-list",children:t.resolved.map((l,c)=>{const f=`${l.type??"?"}:${l.name??l.path??"?"}`;return u.jsx("li",{children:u.jsx("code",{title:f,children:f})},c)})})]}):null]})}const VM=S.forwardRef(function({open:t,onToggle:n,onClose:a,context:s,panelOnly:l=!1,triggerOnly:c=!1,triggerRef:f},m){const h=sl(),p=h.reloading,b=h.reloadError,[y,x]=S.useState("overview"),k=S.useRef(null);Pu({open:t&&!c,containerRef:k,triggerRef:f,onEscape:a}),S.useEffect(()=>{t||x("overview")},[t]);const N=Array.isArray(s.resources.activeTools)?s.resources.activeTools:[],R=typeof s.resources.activeToolCount=="number"?s.resources.activeToolCount:N.length,C=s.systemPrompt.text??s.systemPrompt.summary??"",_=s.systemPrompt.charCount??C.length,I=s.suffix.present?s.suffix.text??s.suffix.summary??"":"",$=s.model?_o(s.model.provider,s.model.modelId):"",D=s.resources,M=String(s.resources.mode??"closed"),B=M.includes("open")?"open":"closed",Y={files:D.contextFiles?.length??0,skills:D.skills?.length??0,extensions:D.extensions?.length??0,packages:D.packages?.length??0},G=["files","skills","extensions","packages"].map(H=>({id:H,label:S2.find(ee=>ee.id===H)?.label??H,count:Y[H]??0})),j=u.jsx("button",{type:"button",ref:H=>{typeof m=="function"?m(H):m&&(m.current=H)},className:`btn btn-ghost oc-runtime-context-toggle${t?" is-active":""}`,"aria-expanded":t,"aria-controls":"oc-runtime-context-panel",onClick:n,children:"注入上下文"});if(c)return j;const F=t?u.jsxs("div",{ref:k,id:"oc-runtime-context-panel",className:"oc-runtime-context-sidepanel",role:"dialog","aria-modal":"true","aria-label":"注入上下文",tabIndex:-1,children:[u.jsxs("header",{className:"oc-runtime-context-head",children:[u.jsxs("div",{className:"oc-runtime-context-head-copy",children:[u.jsx("strong",{children:"注入上下文"}),u.jsx("span",{className:"oc-runtime-context-meta",children:"只读 · 本轮实际注入的 system prompt / 资源(已脱敏)"})]}),u.jsx("button",{type:"button",className:"btn btn-ghost oc-runtime-context-close","aria-label":"关闭注入上下文",onClick:a,children:"关闭"})]}),u.jsxs("div",{className:"oc-runtime-context-layout",children:[u.jsx("nav",{className:"oc-runtime-context-nav","aria-label":"上下文分类",children:S2.map(H=>{const ee=Y[H.id];return u.jsxs("button",{type:"button",className:`oc-runtime-context-nav-item${y===H.id?" is-active":""}`,"aria-current":y===H.id?"page":void 0,onClick:()=>x(H.id),children:[u.jsx("span",{className:"oc-runtime-context-nav-label",title:H.label,children:H.label}),typeof ee=="number"?u.jsx("span",{className:"oc-runtime-context-nav-count",children:ee}):null]},H.id)})}),u.jsxs("div",{className:"oc-runtime-context-body",children:[y==="overview"?u.jsxs("div",{className:"oc-runtime-context-overview",children:[s.model?u.jsxs("section",{className:"oc-runtime-context-model-card",children:[u.jsx("span",{className:"oc-runtime-context-model-label",children:"模型"}),u.jsx("code",{className:"oc-runtime-context-model-ref",title:$,children:$})]}):null,u.jsxs("div",{className:"oc-runtime-context-stat-grid",children:[u.jsxs("div",{className:"oc-runtime-context-stat",children:[u.jsx("span",{className:"oc-runtime-context-stat-label",children:"Prompt 字数"}),u.jsxs("strong",{className:"oc-runtime-context-stat-value",children:[_.toLocaleString()," 字"]})]}),u.jsxs("div",{className:"oc-runtime-context-stat",children:[u.jsx("span",{className:"oc-runtime-context-stat-label",children:"工具"}),u.jsx("strong",{className:"oc-runtime-context-stat-value",children:R})]}),u.jsxs("div",{className:"oc-runtime-context-stat",children:[u.jsx("span",{className:"oc-runtime-context-stat-label",children:"思考"}),u.jsx("strong",{className:"oc-runtime-context-stat-value",children:s.thinkingLevel??"—"})]}),u.jsxs("div",{className:"oc-runtime-context-stat",children:[u.jsx("span",{className:"oc-runtime-context-stat-label",children:"资源面"}),u.jsxs("strong",{className:`oc-runtime-context-stat-value oc-runtime-context-mode is-${B}`,title:M,children:[u.jsx("span",{className:"oc-runtime-context-mode-dot","aria-hidden":"true"}),M]})]})]}),u.jsxs("section",{className:"oc-runtime-context-section",children:[u.jsx("header",{className:"oc-runtime-context-section-head",children:u.jsx("strong",{children:"已加载资源"})}),u.jsx("div",{className:"oc-runtime-context-resource-links",children:G.map(H=>u.jsxs("button",{type:"button",className:"oc-runtime-context-resource-link",onClick:()=>x(H.id),children:[u.jsx("span",{className:"oc-runtime-context-resource-label",children:H.label}),u.jsx("span",{className:`oc-runtime-context-resource-count${H.count===0?" is-zero":""}`,children:H.count}),u.jsx("span",{className:"oc-runtime-context-resource-chevron","aria-hidden":"true",children:"›"})]},H.id))})]})]}):null,y==="system"?u.jsxs(u.Fragment,{children:[u.jsxs("section",{className:"oc-runtime-context-section",children:[u.jsxs("header",{className:"oc-runtime-context-section-head",children:[u.jsxs("div",{children:[u.jsx("strong",{children:"System prompt"}),u.jsxs("code",{className:"oc-runtime-context-hash",children:[s.systemPrompt.hash.slice(0,12),"…"]})]}),C?u.jsx(Oh,{text:C}):null]}),u.jsx("pre",{className:"oc-runtime-context-text",children:C||"(空)"})]}),u.jsxs("section",{className:"oc-runtime-context-section",children:[u.jsxs("header",{className:"oc-runtime-context-section-head",children:[u.jsxs("div",{className:"oc-runtime-context-section-title",children:[u.jsx("strong",{children:"Session suffix"}),u.jsx("span",{className:"oc-runtime-context-meta",children:s.suffix.present?`${(s.suffix.charCount??0).toLocaleString()} 字`:"未注入"})]}),I?u.jsx(Oh,{text:I}):null]}),s.suffix.present?u.jsx("pre",{className:"oc-runtime-context-text",children:I||"已注入"}):u.jsx("p",{className:"oc-runtime-context-empty",children:"本会话无额外 suffix"})]})]}):null,y==="files"?u.jsx(pu,{title:"Context files",items:D.contextFiles?.map(H=>({name:H.path,description:`${H.characters.toLocaleString()} 字符`})),emptyText:"该 session 未加载任何上下文文件"}):null,y==="skills"?u.jsx(pu,{title:"Skills",items:D.skills,emptyText:"该 session 未加载任何 Skills"}):null,y==="extensions"?u.jsx(pu,{title:"Extensions",items:D.extensions,emptyText:"该 session 未加载任何 Extensions"}):null,y==="packages"?u.jsx(pu,{title:"Plugins",items:D.packages,emptyText:"该会话没有插件"}):null,y==="tools"?u.jsxs("section",{className:"oc-runtime-context-section",children:[u.jsxs("header",{className:"oc-runtime-context-section-head",children:[u.jsx("strong",{children:"Active tools"}),u.jsxs("span",{className:"oc-runtime-context-meta",children:[R," 项"]})]}),N.length===0?u.jsx("p",{className:"oc-runtime-context-empty",children:"无激活工具"}):u.jsx("ul",{className:"oc-runtime-context-tools",children:N.map(H=>u.jsx("li",{children:u.jsx("code",{children:H})},H))}),Array.isArray(D.diagnostics)&&D.diagnostics.length>0?u.jsx("ul",{className:"oc-runtime-context-resources",children:D.diagnostics.map((H,ee)=>u.jsxs("li",{children:[u.jsxs("span",{className:`oc-runtime-context-diag is-${H.type??"warning"}`,children:[H.type,": ",H.message]}),H.path?u.jsx("code",{children:H.path}):null]},ee))}):null]}):null,y==="raw"?u.jsxs("details",{className:"oc-runtime-context-raw",open:!0,children:[u.jsx("summary",{children:"原始投影 JSON"}),u.jsx("pre",{children:JSON.stringify(s,null,2)})]}):null]},y)]}),u.jsxs("footer",{className:"oc-runtime-context-foot",children:[u.jsx("span",{className:"oc-runtime-context-meta",children:p?"正在重新加载会话…":"重新加载 Pi 会话设置、扩展、技能、提示词与上下文文件"}),u.jsx("button",{type:"button",className:"btn btn-ghost",disabled:p,onClick:()=>{el()},children:"重新加载会话"}),b&&u.jsxs("span",{className:"oc-runtime-context-diag is-error",role:"alert",children:[b.code?`${b.code}:`:"",b.message,u.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>{el()},children:"重试"})]})]})]}):null;return l?F:u.jsxs("div",{className:"oc-runtime-context-menu",children:[j,F]})});function KM(){const e=S.useRef(null),t=S.useRef(!1),n=S.useRef(null),a=S.useRef(new Map),s=S.useRef(new Set),l=S.useRef(null),c=S.useRef(null),f=S.useRef(0),m=S.useRef(null),h=S.useRef(new Set),p=S.useRef(new Set),b=S.useRef(new Map),y=S.useRef(new Set),x=S.useRef(null),k=S.useRef(null),N=S.useRef(!1),R=S.useRef(0),C=S.useRef(null),_=S.useRef(!1),I=S.useRef(!1),$=S.useRef(null),D=S.useRef(new Set),M=S.useRef(new Set),B=S.useRef(new Set),Y=S.useRef(!1),G=S.useRef(0);return S.useMemo(()=>({sessionRef:e,streamingRef:t,abortRef:n,sessionAbortControllersRef:a,inlineStreamSessionIdsRef:s,assistantIdRef:l,lastEventIdRef:c,sessionGenerationRef:f,eventsStreamStateRef:m,settledTurnIdsRef:h,seenEventIdsRef:p,turnAssistantIdsRef:b,sealedAssistantIdsRef:y,reconnectAbortRef:x,activeTurnIdRef:k,submitInFlightRef:N,submitGenerationRef:R,pendingSubmissionRef:C,stopInFlightRef:_,stopRequestedRef:I,stoppingTurnIdRef:$,abortPostedTurnIdsRef:D,releasedClientRequestIdsRef:M,usageResponseKeysRef:B,isComposingRef:Y,compositionEndedAtRef:G}),[e,t,n,a,s,l,c,f,m,h,p,b,y,x,k,N,R,C,_,I,$,D,M,B,Y,G])}const YM=["operation","contract","dag","report","html"];function XM(e){const t=e.artifact;if(!t||typeof t!="object")return;const n=t;if(!(n.schemaVersion!==1||typeof n.artifactId!="string"||!n.artifactId||typeof n.kind!="string"||!YM.includes(n.kind)||typeof n.previewHash!="string")){for(const a of["title","summary","htmlPreview","reportText","inspectHref"])if(n[a]!==void 0&&typeof n[a]!="string")return;return n}}function ZM(e,t){const n=e.findIndex(a=>a.artifactId===t.artifactId);return n<0?[...e,t]:e.map((a,s)=>s===n?{...a,...t,eventSeq:a.eventSeq??t.eventSeq,activityRef:a.activityRef??t.activityRef}:a)}function WM(e){if(!e||typeof e!="object")return;const t=e;if(!(t.schemaVersion!==1||typeof t.cardId!="string"||t.gateType!=="contract-apply"&&t.gateType!=="dag-run"||typeof t.taskId!="string"||typeof t.state!="string"||typeof t.expiresAt!="string"||typeof t.inspectHref!="string"||typeof t.previewHash!="string"))return t}function QM(e,t){const n=e.findIndex(l=>l.cardId===t.cardId);if(n<0)return[...e,t];const a=[...e],s=a[n];return s?(a[n]={...s,...t,eventSeq:s.eventSeq??t.eventSeq,activityRef:s.activityRef??t.activityRef},a):[...e,t]}function JM(e,t){const n=e.findIndex(a=>a.operationId===t.operationId);return n<0?[...e,t]:e.map((a,s)=>{if(s!==n)return a;let l=a.eventSeq;return l===void 0?l=t.eventSeq:t.eventSeq!==void 0&&(l=Math.min(l,t.eventSeq)),{...a,...t,...l===void 0?{}:{eventSeq:l},updatedSeq:Math.max(a.updatedSeq??a.eventSeq??0,t.updatedSeq??t.eventSeq??0),toolCallId:a.toolCallId??t.toolCallId,activityRef:a.activityRef??t.activityRef}})}function eO(e){const t=e.operation;if(!t||typeof t!="object")return;const n=t;if(n.schemaVersion!==1||typeof n.operationId!="string"||typeof n.action!="string"||typeof n.state!="string"||typeof n.inspectHref!="string"||typeof n.createdAt!="string"||typeof n.updatedAt!="string"||typeof n.previewHash!="string")return;const a=tO(n.runSummary),{runSummary:s,...l}=n;return{...l,...a?{runSummary:a}:{}}}function tO(e){if(!e||typeof e!="object"||Array.isArray(e))return;const t=e;if(typeof t.runId!="string"||!t.runId||typeof t.status!="string"||!t.status)return;let n=[];Array.isArray(t.nodes)&&(n=t.nodes.flatMap(l=>{if(!l||typeof l!="object")return[];const c=String(l.id??""),f=String(l.status??"");if(!c||!f)return[];const m=String(l.failureCategory??"");return[{id:c,status:f,...m?{failureCategory:m}:{}}]}).slice(0,20));let a;if(t.next&&typeof t.next=="object"){const l=t.next;a={kind:String(l.kind??""),...typeof l.description=="string"?{description:l.description}:{}}}return{runId:t.runId,status:t.status,nodes:n,...typeof t.verdict=="string"?{verdict:t.verdict}:{},...typeof t.failureCategory=="string"?{failureCategory:t.failureCategory}:{},...a&&a.kind?{next:a}:{}}}function nO(e){const{refs:t,onReconcile:n,setError:a,setInterview:s,setHumanGateCards:l,setArtifactCards:c,setStreaming:f,setTurnPhase:m=()=>{},setDeferredTurn:h=()=>{},setStreamingAssistantId:p,setUnread:b,setOperationCards:y,setUsage:x,setMessages:k,setToolCalls:N}=e;return(R,C,_,I)=>{if(I?.generation!==void 0&&t.sessionGenerationRef.current!==I.generation)return;const $=I?.replay===!0;if(R==="stream_ready")return;if(R==="reconcile"){const F={reason:typeof C.reason=="string"?C.reason:"cursor_expired",...typeof C.minSeq=="number"?{minSeq:C.minSeq}:{},...typeof C.epoch=="string"?{epoch:C.epoch}:{},...typeof C.latestTurnId=="string"?{latestTurnId:C.latestTurnId}:{}};(typeof C.latestEventId=="string"||C.latestEventId===null)&&(F.latestEventId=C.latestEventId),n?.(F);return}const D=C.data&&typeof C.data=="object"?C.data:C,M=typeof C.turnId=="string"?C.turnId:void 0,B=typeof C.seq=="number"&&Number.isFinite(C.seq)?C.seq:void 0,Y=typeof C.at=="string"&&Number.isFinite(Date.parse(C.at))?Date.parse(C.at):Date.now();if(R==="queue_update"){const j=typeof D.revision=="number"?D.revision:-1;h(F=>F&&j<F.revision?F:D.deferredTurn&&typeof D.deferredTurn=="object"?D.deferredTurn:null);return}if(R==="user_message"){const j=D.message&&typeof D.message=="object"?D.message:null;if(j&&typeof j.id=="string"&&typeof j.text=="string"){const F=typeof j.at=="string"&&Number.isFinite(Date.parse(j.at))?Date.parse(j.at):Date.now();k(H=>H.some(ee=>ee.id===j.id)?H:[...H,{id:j.id,role:"user",text:j.text,createdAt:F}])}return}if(M&&(R==="agent_start"||R==="message_update")&&t.settledTurnIdsRef.current.has(M))return;let G=_;if(M){const j=t.turnAssistantIdsRef.current.get(M);j?G=j:t.turnAssistantIdsRef.current.set(M,_)}if(R==="interview-turn"){s(j=>({...j??{},interviewSessionId:typeof D.interviewSessionId=="string"?D.interviewSessionId:j?.interviewSessionId,taskId:typeof D.taskId=="string"?D.taskId:j?.taskId,state:typeof D.state=="string"?D.state:j?.state,question:D.question&&typeof D.question=="object"?D.question:void 0}));return}if(R==="draft"){s(j=>({...j??{},taskId:typeof D.taskId=="string"?D.taskId:j?.taskId,draft:D.draft&&typeof D.draft=="object"?D.draft:j?.draft,draftSha256:typeof D.draftSha256=="string"?D.draftSha256:j?.draftSha256,taskKindRecommendation:typeof D.taskKindRecommendation=="string"?D.taskKindRecommendation:j?.taskKindRecommendation}));return}if(R==="assessment"){s(j=>({...j??{},assessment:D}));return}if(R==="taskKind-confirmed"){s(j=>({...j??{},confirmedTaskKind:typeof D.taskKind=="string"?D.taskKind:j?.confirmedTaskKind,taskKindRecommendation:void 0}));return}if(R==="human-gate-card"){const j=WM(D);j&&l(F=>QM(F,{...j,...B===void 0?{}:{eventSeq:B},...M?{turnId:M}:{},activityRef:`gate:${j.cardId}`}));return}if(R==="artifact-ref"){const j=XM(D);j&&c(F=>ZM(F,{...j,...B===void 0?{}:{eventSeq:B},...M?{turnId:M}:{},activityRef:`artifact:${j.artifactId}`}));return}if(R==="agent_start"){if($&&M!==void 0&&M!==t.activeTurnIdRef.current)return;M&&(t.settledTurnIdsRef.current.delete(M),t.activeTurnIdRef.current=M),t.streamingRef.current=!0,f(!0),m("running"),p(G);return}if(R==="agent_settled"||R==="agent_end"){if(M&&t.settledTurnIdsRef.current.add(M),R==="agent_end")return;M===t.activeTurnIdRef.current&&(t.activeTurnIdRef.current=null),t.streamingRef.current=!1,f(!1),m("idle"),p(null),R==="agent_settled"&&!$&&typeof document<"u"&&document.hidden&&b(F=>F+1);let j=!1;N(F=>(j=F.some(H=>H.assistantMessageId===G),F.map(H=>H.status==="running"&&(M!==void 0&&H.turnId===M||H.assistantMessageId===G)?{...H,status:"error",finishedAt:Date.now()}:H))),k(F=>F.filter(H=>H.id!==G||H.role!=="assistant"||H.text.trim()||H.content&&H.content.length>0?!0:j));return}if(R==="operation-ref"||R==="operation-status"){const j=eO(D);if(j){const F=typeof D.toolCallId=="string"?D.toolCallId:void 0;y(H=>JM(H,{...j,...B===void 0?{}:{eventSeq:B,updatedSeq:B},...M?{turnId:M}:{},...F?{toolCallId:F}:{},activityRef:`operation:${j.operationId}`}))}return}if(R==="usage"){if($)return;const j=D,F=typeof j.responseKey=="string"&&j.responseKey?j.responseKey:void 0;if(F&&t.usageResponseKeysRef.current.has(F))return;F&&t.usageResponseKeysRef.current.add(F),x(H=>{const ee=j.inputTokens??0,K=j.outputTokens??0,X=j.cacheReadTokens??0,V=j.cacheWriteTokens??0,re=j.totalTokens??ee+K+X+V,ue=j.contextUsage,Te=ue&&typeof ue=="object"?{tokens:typeof ue.tokens=="number"?ue.tokens:null,contextWindow:typeof ue.contextWindow=="number"?ue.contextWindow:0,percent:typeof ue.percent=="number"?ue.percent:null}:H.contextUsage;return{inputTokens:H.inputTokens+ee,outputTokens:H.outputTokens+K,cacheReadTokens:H.cacheReadTokens+X,cacheWriteTokens:H.cacheWriteTokens+V,totalTokens:H.totalTokens+re,cost:j.cost===void 0?H.cost:(H.cost??0)+j.cost,...Te?{contextUsage:Te}:{}}});return}if(R==="message_update"||R==="message_end"){if($)return;const j=t.sealedAssistantIdsRef.current;if(R==="message_update"&&j.has(G)){const K=rs("a");M&&t.turnAssistantIdsRef.current.set(M,K);const X=G;N(V=>V.map(re=>re.assistantMessageId===X?{...re,assistantMessageId:K}:re)),G=K,p(K)}const F=typeof D.text=="string"?D.text:"",H=Rp(D.content),ee=G;k(K=>K.some(V=>V.id===ee)?K.map(V=>V.id!==ee?V:{...V,text:F,...H?{content:H}:{}}):[...K,{id:ee,role:"assistant",text:F,createdAt:Y,...H?{content:H}:{}}]),R==="message_end"&&j.add(ee)}else if(R==="tool_call"){const j=typeof D.toolCallId=="string"?D.toolCallId:rs("t"),F=typeof D.toolName=="string"?D.toolName:"tool",H=typeof D.argsPreview=="string"?D.argsPreview:"{}";N(ee=>ee.some(K=>K.id===j)?ee.map(K=>K.id!==j?K:{...K,args:H,status:"running",turnId:M??K.turnId,assistantMessageId:G,...B===void 0?{}:{eventSeq:B}}):[...ee,{id:j,toolName:F,args:H,status:"running",createdAt:Y,...B===void 0?{}:{eventSeq:B},turnId:M,assistantMessageId:G}])}else if(R==="tool_result"){const j=typeof D.toolCallId=="string"?D.toolCallId:rs("r"),F=typeof D.toolName=="string"?D.toolName:"tool",H=D.isError===!0,ee=typeof D.resultPreview=="string"?D.resultPreview:"{}",K=typeof D.operationId=="string"&&D.operationId?D.operationId:void 0;N(X=>X.find(re=>re.id===j)?X.map(re=>re.id!==j?re:{...re,result:ee,resultText:ee,status:H?"error":"ok",finishedAt:Y,...B===void 0?{}:{finishedSeq:B},turnId:M??re.turnId,assistantMessageId:re.assistantMessageId??G,...K?{operationId:K}:re.operationId?{operationId:re.operationId}:{}}):[...X,{id:j,toolName:F,result:ee,resultText:ee,status:H?"error":"ok",createdAt:Y,finishedAt:Y,...B===void 0?{}:{eventSeq:B,finishedSeq:B},turnId:M,assistantMessageId:G,...K?{operationId:K}:{}}])}else R==="error"&&a(typeof D.message=="string"?D.message:"chat error")}}const Km={inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheWriteTokens:0,totalTokens:0};function rO(e){const{origin:t,refs:n,sessionId:a,setError:s,onReconcile:l}=e,[c,f]=S.useState([]),[m,h]=S.useState([]),[p,b]=S.useState([]),[y,x]=S.useState([]),[k,N]=S.useState(50),[R,C]=S.useState(0),[_,I]=S.useState([]),[$,D]=S.useState(null),[M,B]=S.useState(null),[Y,G]=S.useState(!1),[j,F]=S.useState(Km),[H,ee]=S.useState(!1),[K,X]=S.useState("idle"),[V,re]=S.useState(null),[ue,Te]=S.useState(null),[P]=S.useState(!1),U=S.useMemo(()=>nO({refs:n,onReconcile:l,setError:s,setInterview:D,setHumanGateCards:I,setArtifactCards:x,setStreaming:ee,setTurnPhase:X,setDeferredTurn:re,setStreamingAssistantId:Te,setUnread:C,setOperationCards:b,setUsage:F,setMessages:f,setToolCalls:h}),[n,l,s]),q=S.useCallback((je,be,qe)=>{if(qe?.targetSessionId&&n.sessionRef.current?.sessionId!==qe.targetSessionId||qe?.generation!==void 0&&n.sessionGenerationRef.current!==qe.generation)return null;const Ve=je.split(`
|
|
390
|
-
`);let tt="message",nt="",Ut=null;for(const Ge of Ve)Ge.startsWith("event: ")?tt=Ge.slice(7).trim():Ge.startsWith("data: ")?nt+=Ge.slice(6):Ge.startsWith("id: ")&&(Ut=Ge.slice(4).trim());if(!nt)return Ut;let Rt;try{Rt=JSON.parse(nt)}catch{return Ut}const ut=Ut??(typeof Rt.eventId=="string"?Rt.eventId:null);if(ut){if(n.seenEventIdsRef.current.has(ut))return ut;n.seenEventIdsRef.current.add(ut)}return U(tt,Rt,be,qe),Ut??ut},[U,n]),A=S.useCallback(async(je,be)=>{const qe=be?.background===!0;qe||G(!0);try{const Ve=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(je)}/context`,{credentials:"include"});if(!Ve.ok)return;const tt=await Ve.json();tt.context&&n.sessionRef.current?.sessionId===je&&B(nt=>uw(nt,tt.context)?nt:tt.context)}finally{qe||G(!1)}},[t,n]);S.useEffect(()=>{a&&A(a)},[a,A]),S.useEffect(()=>{if(!a)return;const je=window.setTimeout(()=>{A(a,{background:!0})},350);return()=>window.clearTimeout(je)},[a,p,_,$,A]);const ae=S.useMemo(()=>c.filter(je=>je.role!=="system"||P),[c,P]);S.useEffect(()=>{const je=()=>{document.hidden||C(0)};return document.addEventListener("visibilitychange",je),()=>document.removeEventListener("visibilitychange",je)},[]);const he=S.useMemo(()=>{if(m.length===0)return null;const je=m.filter(nt=>nt.status==="running"),be=m.filter(nt=>nt.status==="error"),qe=je[je.length-1];let Ve="完成",tt="ok";return be.length>0?(Ve=`${be.length} 次出错`,tt="error"):je.length>0?(Ve=qe?`${qe.toolName} 运行中`:"运行中",tt="running"):Ve="",{count:m.length,statusLabel:Ve,statusKind:tt}},[m]),ne=S.useMemo(()=>{const je=yM({messages:ae,toolCalls:m,streaming:H,activeAssistantId:ue});return xM(je,k)},[ae,m,H,ue,k]),te=S.useMemo(()=>{const je=[];for(const be of ne)be.user&&je.push(be.user),je.push(...be.assistants);return je},[ne]),ce=S.useCallback(()=>{f([]),h([]),b([]),I([]),x([]),D(null),B(null),F(Km),ee(!1),X("idle"),re(null),Te(null),C(0),N(50),n.usageResponseKeysRef.current=new Set},[n]),ge=S.useCallback(je=>{f(je.messages),h(je.toolCalls),b([]),I([]),x([]),B(null),D(null),F(Km),n.usageResponseKeysRef.current=new Set,ee(je.streaming),X(je.turnPhase??(je.streaming?"running":"idle")),re(je.deferredTurn??null),Te(null),C(0),N(50)},[n]),Re=S.useCallback(async je=>{try{const be=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(je)}`,{credentials:"include"});if(!be.ok)return!1;const qe=await be.json();if(!qe.session||n.sessionRef.current?.sessionId!==je)return!1;const Ve=qe.session.activeTurnId??null;n.activeTurnIdRef.current=Ve,n.streamingRef.current=!!Ve,X(qe.session.turnPhase??(Ve?"running":"idle")),re(qe.session.deferredTurn??null),n.lastEventIdRef.current=qe.lastEventId??null,n.seenEventIdsRef.current=new Set,n.turnAssistantIdsRef.current=new Map,n.sealedAssistantIdsRef.current=new Set;const tt=V6(qe.session.messages??[]);return f(tt.messages),h(tt.toolCalls),Te(null),!0}catch{return!1}},[t,n,f,h,Te,X,re]);return{messages:c,setMessages:f,toolCalls:m,setToolCalls:h,operationCards:p,artifactCards:y,historyLimit:k,setHistoryLimit:N,unread:R,humanGateCards:_,interview:$,setInterview:D,taskContext:M,contextLoading:Y,usage:j,streaming:H,setStreaming:ee,turnPhase:K,setTurnPhase:X,deferredTurn:V,setDeferredTurn:re,streamingAssistantId:ue,setStreamingAssistantId:Te,visibleMessages:te,turnGroups:ne,processSummary:he,applyChatSseEvent:U,applySseBlock:q,loadTaskContext:A,resetForNewSession:ce,applyActivatedSession:ge,recoverSession:Re}}const aO={error:6e3,info:4e3};function iO(e){const{toast:t,onDismiss:n}=e,[a,s]=S.useState(!1),l=S.useRef(null),c=S.useRef(null),f=()=>{l.current!==null&&window.clearTimeout(l.current),c.current!==null&&window.clearTimeout(c.current),l.current=null,c.current=null},m=()=>{f(),s(!0),c.current=window.setTimeout(()=>{s(!1),n()},140)};if(S.useEffect(()=>{if(t)return s(!1),l.current=window.setTimeout(m,aO[t.kind]),f},[t?.id]),S.useEffect(()=>f,[]),!t)return null;const h=t.kind==="error";return Mo.createPortal(u.jsxs("div",{className:`oc-toast is-${t.kind}${a?" is-leaving":""}`,role:h?"alert":"status",onMouseEnter:f,onMouseLeave:()=>{a||(l.current=window.setTimeout(m,1600))},children:[u.jsx("span",{className:"oc-toast-icon","aria-hidden":"true",children:h?u.jsx(X2,{size:16}):u.jsx(W8,{size:16})}),u.jsx("span",{className:"oc-toast-message",children:t.message}),u.jsx("button",{type:"button",className:"oc-toast-close","aria-label":"关闭提示",onClick:m,children:u.jsx(K8,{size:14,"aria-hidden":"true"})})]}),document.body)}function sO(e){return e==="missing-capability-token"||e==="invalid-capability-token"||e==="missing-confirmation-token"||e==="invalid-confirmation-token"||e==="host-not-loopback"||e==="origin-mismatch"||e==="cross-site-fetch"}function Z6(e){return e==="invalid-capability-token"||e==="invalid-confirmation-token"||e==="missing-capability-token"||e==="missing-confirmation-token"}function lO(e){return Z6(e)?"页面凭证已失效(控制台可能已重启),请刷新页面(F5)后重试。":e==="host-not-loopback"?"请求主机校验失败:非回环绑定时要求 Host 头,请刷新页面或检查访问地址。":e==="origin-mismatch"?"请求来源与控制台地址不一致,请通过控制台页面操作。":e==="cross-site-fetch"?"检测到跨站请求,已拒绝。请通过控制台页面操作。":"操作被拒绝,请刷新页面后重试。"}class oO{constructor(t){this.options=t,this.fetchFn=t.fetchFn??fetch,this.backoffMs=t.backoffMs??1e3,this.deadlineMs=t.deadlineMs??3e4}options;eligible=new Set;controllers=new Map;fetchFn;backoffMs;deadlineMs;markEligible(t){this.eligible.add(t)}startIfEligible(t){if(!this.eligible.delete(t)||this.controllers.has(t))return;const n=new AbortController;this.controllers.set(t,n),this.run(t,n)}cancel(t){this.eligible.delete(t),this.controllers.get(t)?.abort(),this.controllers.delete(t)}reconcile(t){const n=new Set(t);for(const a of this.controllers.keys())n.has(a)||this.cancel(a)}dispose(){for(const t of this.controllers.values())t.abort();this.controllers.clear(),this.eligible.clear()}async run(t,n){let a;const s=new Set;let l=!1;const c=window.setTimeout(()=>{l=!0,n.abort()},this.deadlineMs);try{for(;!n.signal.aborted;){try{const f={Accept:"text/event-stream"};a&&(f["Last-Event-ID"]=a);const m=await this.fetchFn(`${this.options.origin}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/events`,{headers:f,credentials:"include",signal:n.signal});if(m.status===404||!m.body)return;if(!m.ok)throw new Error(`HTTP ${m.status}`);const h=m.body.getReader(),p=new TextDecoder;let b="";for(;;){const{done:y,value:x}=await h.read();if(y||n.signal.aborted)break;b+=p.decode(x,{stream:!0});const k=b.split(`
|
|
391
|
-
|
|
392
|
-
`);b=k.pop()??"";for(const N of k){const R=N.split(`
|
|
393
|
-
`).find(_=>_.startsWith("id: "))?.slice(4);if(R&&(a=R),!R||s.has(R)||!N.includes("event: session_title"))continue;const C=N.split(`
|
|
394
|
-
`).find(_=>_.startsWith("data: "))?.slice(6);if(C)try{const _=JSON.parse(C),I=_.data?.title?.trim();if(!I)continue;if(s.add(R),!this.options.hasSession(t)||(this.options.onTitle(t,{title:I,automatic:!!_.data?.automatic}),_.data?.automatic))return}catch{}}}}catch{if(n.signal.aborted)return}n.signal.aborted||await cO(this.backoffMs,n.signal)}}finally{window.clearTimeout(c),this.controllers.get(t)===n&&this.controllers.delete(t),(l||!this.options.hasSession(t))&&this.options.refresh()}}}function cO(e,t){return new Promise(n=>{const a=window.setTimeout(l,e),s=()=>l();function l(){window.clearTimeout(a),t.removeEventListener("abort",s),n()}t.addEventListener("abort",s,{once:!0})})}async function uO(e){if(e.creatingRef?.current)throw new Error("CREATE_SESSION_IN_FLIGHT");e.creatingRef&&(e.creatingRef.current=!0),e.setCreatingSession?.(!0);try{const t=await(e.fetchFn??fetch)(`${e.origin}/api/operator/v1/chat/sessions`,{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":tr()},credentials:"include",body:JSON.stringify(e.options??{})});if(!t.ok){const c=await t.json().catch(()=>({}));throw new Error(c.error?.message??`HTTP ${t.status}`)}const n=await t.json();if(!n.session)throw new Error("创建会话响应缺少 durable session");const a=n.session,s={sessionId:a.sessionId,...Dh(a)},l=[a,...e.sessionListRef.current.filter(c=>c.sessionId!==a.sessionId)].slice(0,Eu);return e.sessionListRef.current=l,e.setSessionList(l),e.titleWatcher?.markEligible(a.sessionId),e.refreshSessionList(),s}finally{e.creatingRef&&(e.creatingRef.current=!1),e.setCreatingSession?.(!1)}}function dO(e){const{origin:t,refs:n,setSession:a,thread:s,composer:l,browser:c,setError:f,setNotice:m,onCompactionChange:h,setProcessOpen:p,setAutoScroll:b}=e,{applyActivatedSession:y,resetForNewSession:x,setMessages:k}=s,{setInput:N,setPendingImages:R}=l,{setPreviews:C,setActivePreviewPath:_}=c,[I,$]=S.useState([]),D=S.useRef([]);D.current=I;const M=S.useRef(null),[B,Y]=S.useState(!1),G=S.useRef(!1),j=S.useRef(!1),F=S.useRef(0),H=S.useCallback(()=>{n.sessionGenerationRef.current+=1,n.abortRef.current?.abort(),n.reconnectAbortRef.current?.abort();for(const U of n.sessionAbortControllersRef.current.values())U.abort();n.sessionAbortControllersRef.current.clear(),n.reconnectAbortRef.current=null,n.eventsStreamStateRef.current=null,n.streamingRef.current=!1,n.abortRef.current=null,n.assistantIdRef.current=null,n.lastEventIdRef.current=null,n.seenEventIdsRef.current=new Set,n.turnAssistantIdsRef.current=new Map,n.sealedAssistantIdsRef.current=new Set,n.settledTurnIdsRef.current=new Set,n.activeTurnIdRef.current=null,x(),N(""),R([]),C([]),_(null),p(!1),b(!0)},[n,x,N,R,C,_,p,b]),ee=S.useCallback(async()=>{try{const U=await fetch(`${t}/api/operator/v1/chat/sessions`,{credentials:"include"});if(!U.ok)return;const q=(await U.json()).sessions??[],A=q.slice(0,Eu),ae=q.slice(Eu);if($(A),ae.length===0)return;await Promise.all(ae.map(ne=>fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(ne.sessionId)}`,{method:"DELETE",credentials:"include",headers:{"x-loop-console-confirmation":tr()}}).catch(()=>{})));const he=n.sessionRef.current?.sessionId;he&&ae.some(ne=>ne.sessionId===he)&&(F.current+=1,n.sessionRef.current=null,H(),a(null),window.localStorage.removeItem(Yr))}catch{}},[t,n,H,a]),K=S.useCallback(async U=>{try{return(await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(U)}`,{method:"DELETE",credentials:"include",headers:{"x-loop-console-confirmation":tr()}})).ok?(M.current?.cancel(U),n.sessionRef.current?.sessionId===U&&(F.current+=1,n.sessionRef.current=null,H(),a(null),window.localStorage.removeItem(Yr)),await ee(),!0):(f("删除会话失败"),!1)}catch(q){return f(q instanceof Error?q.message:String(q)),!1}},[t,n,a,H,ee,f]),X=S.useCallback(async U=>{const q=++F.current;try{const A=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(U)}`,{credentials:"include"}),ae=await A.json();if(!A.ok||!ae.session)throw new Error(ae.error?.message??"会话不可用");if(q!==F.current)return;const he={sessionId:ae.session.sessionId,...Dh(ae.session)};H(),n.sessionRef.current=he,n.streamingRef.current=!!ae.session.activeTurnId,n.activeTurnIdRef.current=ae.session.activeTurnId??null,n.seenEventIdsRef.current=new Set,n.turnAssistantIdsRef.current=new Map,n.sealedAssistantIdsRef.current=new Set,n.settledTurnIdsRef.current=new Set,n.lastEventIdRef.current=null,a(he),n.assistantIdRef.current=null,n.abortRef.current=n.sessionAbortControllersRef.current.get(U)??null,R([]),C([]),N(ae.session.composerDraft??"");const ne=V6(ae.session.messages??[]);y({messages:ne.messages,toolCalls:ne.toolCalls,streaming:!!ae.session.activeTurnId,turnPhase:ae.session.turnPhase??(ae.session.activeTurnId?"running":"idle"),deferredTurn:ae.session.deferredTurn??null}),window.localStorage.setItem(Yr,U),_(null)}catch(A){if(q!==F.current)return;f(A instanceof Error?A.message:String(A))}},[t,n,a,R,C,N,y,H,_,f]);S.useEffect(()=>{ee()},[ee]),M.current||(M.current=new oO({origin:t,hasSession:U=>D.current.some(q=>q.sessionId===U),onTitle:(U,q)=>{$(A=>A.map(ae=>ae.sessionId!==U||q.automatic&&ae.title?ae:q.automatic?{...ae,title:q.title}:{...ae,displayTitle:q.title}))},refresh:ee}));const V=S.useCallback(U=>M.current?.startIfEligible(U),[]);S.useEffect(()=>{M.current?.reconcile(I.filter(U=>U.state!=="archived"&&!U.title).map(U=>U.sessionId))},[I]),S.useEffect(()=>()=>M.current?.dispose(),[]),S.useEffect(()=>{let U=!1;const q=window.localStorage.getItem(Yr);if(!q)return;const A=++F.current;return(async()=>{try{const ae=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(q)}`,{credentials:"include"});if(!ae.ok){window.localStorage.removeItem(Yr);return}const he=await ae.json();if(U||A!==F.current||!he.session)return;const ne={sessionId:he.session.sessionId,...Dh(he.session)};n.sessionGenerationRef.current+=1,n.sessionRef.current=ne,n.activeTurnIdRef.current=he.session.activeTurnId??null,n.seenEventIdsRef.current=new Set,n.turnAssistantIdsRef.current=new Map,n.sealedAssistantIdsRef.current=new Set,n.settledTurnIdsRef.current=new Set,n.lastEventIdRef.current=null,a(ne),N(he.session.composerDraft??""),k((he.session.messages??[]).filter(te=>te.role==="user"||te.role==="assistant").map(te=>{const ce=Rp(te.content);return{id:te.id,role:te.role,text:te.text,createdAt:Date.parse(te.at)||Date.now(),...ce&&ce.length>0?{content:ce}:{}}}))}catch{}})(),()=>{U=!0}},[t,n,a,N,k]);const re=S.useCallback(U=>uO({origin:t,sessionListRef:D,setSessionList:$,titleWatcher:M.current,refreshSessionList:ee,options:U,setCreatingSession:Y,creatingRef:G}),[t,ee]),ue=S.useCallback(async U=>{if(G.current)return null;const q=++F.current;f(null);try{const A=await re(U);return q!==F.current?null:(H(),n.sessionRef.current=A,window.localStorage.setItem(Yr,A.sessionId),a(A),A)}catch(A){if(q!==F.current)return null;const ae=A instanceof Error?A.message:String(A);return ae!=="CREATE_SESSION_IN_FLIGHT"&&f(ae),null}},[n,a,f,H,re]),Te=S.useCallback(async U=>{const q=n.sessionRef.current;if(!q||n.streamingRef.current)return;const A=typeof U=="string"?U.trim():"";h?.(!0);try{const ae={"x-loop-console-confirmation":tr()};A&&(ae["content-type"]="application/json");const he=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(q.sessionId)}/compact`,{method:"POST",credentials:"include",headers:ae,...A?{body:JSON.stringify({instructions:A})}:{}}),ne=await he.json().catch(()=>({}));if(!he.ok){const Re=ne.error?.code;if(sO(Re)){f(lO(Re)),Z6(Re)&&!j.current&&(j.current=!0,window.setTimeout(()=>window.location.reload(),1200));return}f(ne.error?.message??"上下文压缩失败");return}f(null);const te=ne.snapshot?.summary?.trim(),ce=ne.snapshot?.tokensBefore,ge=te||"历史上下文已精简,关键决策与当前任务已保留。";await X(q.sessionId),k(Re=>[...Re,{id:`compaction-${Date.now()}`,role:"assistant",kind:"compaction",text:ge,createdAt:Date.now(),...ce?{compaction:{tokensBefore:ce}}:{}}]),m({id:Date.now(),message:`已压缩上下文:${ge.slice(0,72)}${ge.length>72?"…":""}`})}catch(ae){f(ae instanceof Error?ae.message:"上下文压缩失败")}finally{h?.(!1)}},[t,n,f,m,k,h,X]);return{sessionList:I,creatingSession:B,activateSession:X,refreshSessionList:ee,deleteSession:K,createSession:ue,updateSession:async(U,q)=>{if(!(await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(U)}`,{method:"PATCH",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":tr()},body:JSON.stringify(q)})).ok){f("会话更新失败");return}await ee(),q.state==="archived"&&M.current?.cancel(U),q.state==="archived"&&n.sessionRef.current?.sessionId===U&&(F.current+=1,n.sessionRef.current=null,H(),a(null),window.localStorage.removeItem(Yr))},watchSessionTitle:V,compactSession:Te}}const fO=[{pattern:/invalid (boot capability|confirmation header) token/i,copy:"页面凭证已失效(控制台可能已重启),请刷新页面(F5)后重试。"},{pattern:/mutation requires boot capability cookie|mutation requires confirmation header token/i,copy:"页面状态异常,请刷新页面(F5)后重试。"},{pattern:/Host header is required for non-loopback/i,copy:"请求主机校验失败:非回环绑定时要求 Host 头,请刷新页面或检查访问地址。"}];function Ua(e){const t=(e??"").trim();if(!t)return"操作失败";const n=y8(t);if(n)return n;if(/controller identity changed|package fingerprint changed|entry binary sha256 changed/i.test(t))return"控制器版本已变更(Console 启动后代码被重新编译,或提交了 package.json / bin / dist / skills 等指纹范围文件)。请重启 Console 进程使其重新加载当前构建后再重试本操作;一次会话中途不要重建控制器。";if(/Pi session file missing or not openable|cannot reopen chat session .* no persisted Pi session file/i.test(t))return"该对话的 Pi 会话文件已丢失,无法恢复上下文。请新建对话继续(历史记录无法重开)。";if(/reopened Pi sessionId mismatch/i.test(t))return"重开对话失败:Pi 会话身份与记录不一致(常见于会话文件丢失后被误建)。请新建对话继续。";if(/base HEAD .+ != frozen baseCommit|exact-base|not a descendant of frozen baseCommit/i.test(t))return"主分支已相对夜间冻结的 baseCommit 前进,无法安全 fast-forward harvest。请人工核对后使用 Discard(必要时勾选强制),或改走日间合并流程。";if(/force-required|requires --force/i.test(t))return"该终态需要强制 Discard。请确认后勾选强制再试。";for(const a of fO)if(a.pattern.test(t))return a.copy;return t}function mO(e){return e.turnPhase==="stopping"?e.blockedByTurnId?{action:"queue-deferred",blockedByTurnId:e.blockedByTurnId}:{action:"hold"}:e.turnPhase==="running"?e.blockedByTurnId?{action:"queue-deferred",blockedByTurnId:e.blockedByTurnId}:{action:"hold"}:{action:"send-now"}}function k2(e){const{clientRequestId:t,blockedByTurnId:n,state:a}=e;if(!a)return{action:"hold"};if(a.deferredTurn?.clientRequestId===t)return{action:"deferred",deferredTurn:a.deferredTurn};if(a.activeTurn?.clientRequestId===t)return{action:"accepted",turn:a.activeTurn};if(a.latestTurn?.clientRequestId===t)return{action:"accepted",turn:a.latestTurn};const s=a.activeTurn?.turnId??a.activeTurnId??null;return a.turnPhase==="stopping"&&s===n?{action:"retry-deferred"}:Io(a)?{action:"hold"}:{action:"send-now"}}function hO(e){let t;const n=new Promise(a=>{t=a});return{...e,outcomePromise:n,resolveOutcome:t}}function E2(e="network error while creating turn"){return{kind:"ambiguous",message:e}}function pO(e="无法确认 Turn 是否已创建,正在与服务端对账(不会重复提交新的请求 ID)"){return{kind:"ambiguous",message:e}}function T2(e){const{body:t,clientRequestId:n}=e,a=t.error?.code,s=t.error?.message??(e.httpOk?"turn was not accepted":`HTTP ${e.status}`);if(a==="TURN_ACTIVE"&&t.activeTurn?.turnId)return{kind:"adopt-active",activeTurn:t.activeTurn,message:"上一轮仍在运行,已重新连接;当前消息已保留。"};if(t.accepted===!0||e.httpOk&&t.turnId){const l=t.turn?.turnId??t.turnId;return l?{kind:"accepted",turnId:l,idempotent:t.idempotent===!0,turn:t.turn??{turnId:l,clientRequestId:n,state:t.state}}:{kind:"ambiguous",message:s}}return t.accepted===!1||a?{kind:"rejected",code:a,message:s}:{kind:"ambiguous",message:s}}function gO(e){const t=e.clientRequestId,n=e.state?.activeTurn,a=e.state?.latestTurn;return n?.clientRequestId===t&&n.turnId?{kind:"accepted",turnId:n.turnId,idempotent:!0,turn:n}:a?.clientRequestId===t&&a.turnId?{kind:"accepted",turnId:a.turnId,idempotent:!0,turn:a}:n?.turnId?{kind:"adopt-active",activeTurn:n,message:"上一轮仍在运行,已重新连接;当前消息已保留。"}:null}function bO(e){const t=e.clientRequestId,n=e.state?.activeTurn,a=e.state?.latestTurn,s=n?.state??e.state?.activeTurnState??void 0,l=a?.state??e.state?.latestTurnState??void 0;if(n?.clientRequestId===t&&n.turnId)return is(s)?{action:"release-terminal",turnId:n.turnId,state:String(s)}:{action:"bind-active",turnId:n.turnId};if(a?.clientRequestId===t&&a.turnId){if(is(l))return{action:"release-terminal",turnId:a.turnId,state:String(l)};if(!n?.turnId||n.clientRequestId===t)return{action:"bind-active",turnId:a.turnId}}return!Io(e.state)&&!(!!n?.turnId&&n?.clientRequestId!==t)?{action:"release-not-accepted"}:{action:"hold"}}function Io(e){if(e?.activeTurnId||e?.activeTurn?.turnId)return!0;const t=e?.runtime;return t?t.isStreaming===!0||t.isPromptRunning===!0||t.isCompacting===!0||t.isBashRunning===!0:!1}function is(e){return e==="settled"||e==="aborted"||e==="failed"}function Lu(e){return e.pending.sessionId===e.sessionId&&e.pending.sessionGeneration===e.sessionGeneration&&e.pending.submitGeneration===e.submitGeneration}function vO(e,t){return`${e}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/turns`}function N2(e,t){return`${e}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/state`}function yO(e,t){return`${e}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/events`}function xO(e,t,n){return`${e}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/turns/${encodeURIComponent(n)}/abort`}function Ys(e){return e.stoppingTurnId||e.stopRequested?"stopping":e.activeTurnId||e.streaming||e.submitInFlight||e.pendingSubmission?"running":"idle"}function ml(e,t){const n=e.pendingSubmission;t&&n&&n.clientRequestId!==t||(e.submitInFlight=!1,(!t||n?.clientRequestId===t)&&(n?.clientRequestId?e.releasedClientRequestIds.add(n.clientRequestId):t&&e.releasedClientRequestIds.add(t),e.pendingSubmission=null),e.pendingSubmission||(e.stopRequested=!1))}function W6(e){e.stopRequested=!0}function zu(e){e.stopRequested=!1}function wO(e,t){return!(!t||e.abortPostedTurnIds.has(t))}function SO(e,t){t&&e.abortPostedTurnIds.add(t)}function Bu(e,t){return!e.stopRequested||!wO(e,t)?null:(SO(e,t),e.stoppingTurnId=t,e.activeTurnId=t,t)}function C2(e,t){const n=e.pendingSubmission;return n&&n.clientRequestId!==t.clientRequestId?!1:(t.turnId&&e.settledTurnIds.add(t.turnId),ml(e,t.clientRequestId),zu(e),t.markIdle!==!1&&(e.streaming=!1,e.activeTurnId=null,e.assistantId=null,e.stoppingTurnId=null),!0)}function kO(e,t){return Lu({pending:t.pending,sessionId:e.sessionId,sessionGeneration:e.sessionGeneration,submitGeneration:e.submitGeneration})?(t.pending.acceptedTurnId=t.turnId,e.activeTurnId=t.turnId,e.turnAssistantIds.set(t.turnId,t.assistantId),e.streaming=!0,e.submitInFlight=!1,t.pending.resolveOutcome({kind:"accepted",turnId:t.turnId}),t.ui?.setStreaming(!0),t.ui?.setStreamingAssistantId(t.assistantId),t.ui?.setPendingImages([]),t.ui?.watchSessionTitle?.(t.sessionId),!0):(t.pending.resolveOutcome({kind:"stale"}),!1)}function EO(e,t){t.pending.resolveOutcome({kind:"adopt-active",activeTurn:{turnId:t.activeTurnId},message:t.message}),ml(e,t.pending.clientRequestId),t.current&&(t.ui?.clearEmptyAssistant(t.assistantId),t.ui?.setInput(t.text),t.ui?.setPendingImages(t.images),e.activeTurnId=t.activeTurnId,e.assistantId=null,e.streaming=!0,t.ui?.setStreaming(!0),t.ui?.setStreamingAssistantId(null),t.notice.setError(null),t.notice.showNotice(t.message))}function TO(e,t){if(t.pending.resolveOutcome({kind:"rejected",message:t.message}),ml(e,t.pending.clientRequestId),!t.current)return;const n=t.ui?.formatError?t.ui.formatError(t.message):t.message;t.ui?.setError(n),e.streaming=!1,e.assistantId=null,t.ui?.setStreaming(!1),t.ui?.setStreamingAssistantId(null),t.ui?.clearEmptyAssistant(t.assistantId),t.ui?.setInput(t.text),t.ui?.setPendingImages(t.images)}function NO(e,t,n){const a=Lu({pending:n.pending,sessionId:e.sessionId,sessionGeneration:e.sessionGeneration,submitGeneration:e.submitGeneration});if(t.kind==="accepted"){if(kO(e,{turnId:t.turnId,assistantId:n.assistantId,pending:n.pending,sessionId:n.sessionId,ui:n.acceptedUi})){const l=Bu(e,t.turnId);l&&n.onAutoAbort?.(l)}return}if(t.kind==="adopt-active"){const s=a?Bu(e,t.activeTurn.turnId):null;EO(e,{activeTurnId:t.activeTurn.turnId,message:t.message,assistantId:n.assistantId,text:n.text,images:n.images,pending:n.pending,current:a,notice:n.notice,ui:n.adoptUi}),s&&n.onAutoAbort?.(s);return}if(t.kind==="rejected"){TO(e,{message:t.message,assistantId:n.assistantId,text:n.text,images:n.images,pending:n.pending,current:a,ui:n.rejectedUi}),zu(e);return}if(t.kind==="stale"){n.pending.resolveOutcome(t),ml(e,n.pending.clientRequestId),zu(e);return}n.pending.resolveOutcome(t)}function CO(e,t,n,a){const s=e.pendingSubmission;if(!s)return"held";if(t.action==="bind-active"){const c=!!s.acceptedTurnId;c||(s.acceptedTurnId=t.turnId,e.activeTurnId=t.turnId,e.turnAssistantIds.set(t.turnId,s.assistantId),e.streaming=!0,e.submitInFlight=!1);const f=Bu(e,t.turnId);return f&&a?.onAutoAbort?.(f),c?"held":"bound"}if(t.action==="release-terminal"||t.action==="release-not-accepted")return t.action==="release-terminal"&&e.settledTurnIds.add(t.turnId),ml(e,s.clientRequestId),zu(e),Io(n)||(e.streaming=!1,e.activeTurnId=null,e.assistantId=null,e.stoppingTurnId=null,a?.markIdle?.()),"released";const l=n?.activeTurn?.turnId??n?.activeTurnId??null;return l&&(e.activeTurnId=l),"held"}const RO="正在停止…",AO="正在停止…",_O="停止请求未完成,正在与服务端对账…",IO="停止请求失败,正在与服务端对账…";function R2(e){e.showNotice(RO)}function A2(e){if(e.networkError)return{action:"keep-busy-notice",message:IO};const t=e.body.turn?.state;return e.body.accepted===!0&&is(t)?{action:"terminal-idle",turnId:e.turnId}:e.body.error?.code==="TURN_ABORT_PENDING"?{action:"abort-pending-notice"}:e.body.error?.code==="CHAT_TURN_OWNER_LOST"||e.body.error?.code==="OWNER_LOST"?{action:"owner-lost-reconcile"}:e.httpOk?{action:"noop"}:{action:"keep-busy-notice",message:_O}}function Ym(e,t,n,a){const s=a?.sessionStillCurrent!==!1;if(t.action==="terminal-idle"){if(!s)return;e.settledTurnIds.add(t.turnId),e.streaming=!1,e.activeTurnId=null,e.assistantId=null,e.stoppingTurnId=null,a?.markIdle?.();return}if(t.action==="abort-pending-notice"){n.showNotice(AO);return}if(t.action==="owner-lost-reconcile"){if(!s)return;a?.runtimeBusy||(e.stoppingTurnId&&e.settledTurnIds.add(e.stoppingTurnId),e.streaming=!1,e.activeTurnId=null,e.assistantId=null,e.stoppingTurnId=null,a?.markIdle?.());return}if(t.action==="keep-busy-notice"){n.showNotice(t.message);return}}function _2(e,t){W6(e);const n=e.activeTurnId??e.pendingSubmission?.acceptedTurnId??null;if(n){const a=Bu(e,n);return a?(t.notice&&R2(t.notice),t.postAbort(a),{abortedTurnId:a,stopRequested:!0}):{abortedTurnId:null,stopRequested:!0}}return t.notice&&R2(t.notice),{abortedTurnId:null,stopRequested:!0}}function la(e){return{submitInFlight:e.submitInFlightRef.current,pendingSubmission:e.pendingSubmissionRef.current,activeTurnId:e.activeTurnIdRef.current,streaming:e.streamingRef.current,assistantId:e.assistantIdRef.current,stoppingTurnId:e.stoppingTurnIdRef.current,settledTurnIds:e.settledTurnIdsRef.current,turnAssistantIds:e.turnAssistantIdsRef.current,sessionId:e.sessionRef.current?.sessionId??null,sessionGeneration:e.sessionGenerationRef.current,submitGeneration:e.submitGenerationRef.current,stopInFlight:e.stopInFlightRef.current,stopRequested:e.stopRequestedRef.current,abortPostedTurnIds:e.abortPostedTurnIdsRef.current,releasedClientRequestIds:e.releasedClientRequestIdsRef.current}}function oa(e,t){e.submitInFlightRef.current=t.submitInFlight,e.pendingSubmissionRef.current=t.pendingSubmission,e.activeTurnIdRef.current=t.activeTurnId,e.streamingRef.current=t.streaming,e.assistantIdRef.current=t.assistantId,e.stoppingTurnIdRef.current=t.stoppingTurnId,e.submitGenerationRef.current=t.submitGeneration,e.stopInFlightRef.current=t.stopInFlight,e.stopRequestedRef.current=t.stopRequested}function MO(e){return e.split(`
|
|
395
|
-
`).find(t=>t.startsWith("event: "))?.slice(7).trim()??"message"}function OO(){return new Promise(e=>window.setTimeout(e,25))}function Xm(e,t){t&&e(n=>n.filter(a=>!(a.id===t&&a.role==="assistant"&&!a.text.trim())))}function DO(e){const{origin:t,refs:n,session:a,thread:s,composer:l,setError:c,setAutoScroll:f,setNotice:m,recoveryVersion:h=0,watchSessionTitle:p}=e,{applySseBlock:b,setMessages:y,setStreaming:x,setStreamingAssistantId:k,streaming:N,setTurnPhase:R,setDeferredTurn:C}=s,{setInput:_,setPendingImages:I,recordHistory:$}=l,D=S.useCallback(q=>{m&&m({id:Date.now(),message:q})},[m]),M=S.useCallback(q=>{const A=la(n);ml(A,q),oa(n,A)},[n]),B=S.useCallback((q,A,ae)=>{n.sessionRef.current?.sessionId!==q||n.sessionGenerationRef.current!==A||(n.streamingRef.current=!1,n.activeTurnIdRef.current=null,n.assistantIdRef.current=null,n.stoppingTurnIdRef.current=null,x(!1),R("idle"),k(null),Xm(y,ae))},[n,x,R,k,y]),Y=S.useCallback(async(q,A,ae)=>{for(;!ae.aborted;){const he=n.eventsStreamStateRef.current;if(!he||he.sessionId!==q||he.generation!==A)return;he.ready=!1;try{const ne={Accept:"text/event-stream"},te=n.lastEventIdRef.current;te&&(ne["Last-Event-ID"]=te);const ce=await fetch(yO(t,q),{headers:ne,credentials:"include",signal:ae});if(!ce.ok||!ce.body){if(ce.status===404)return;await wf(2e3,ae);continue}const ge=ce.body.getReader(),Re=new TextDecoder;let je="",be=!0;const qe=rs("a");for(;;){const{done:tt,value:nt}=await ge.read();if(tt)break;je+=Re.decode(nt,{stream:!0});const Ut=je.split(`
|
|
396
|
-
|
|
397
|
-
`);je=Ut.pop()??"";for(const Rt of Ut){if(MO(Rt)==="stream_ready"){const Bt=n.eventsStreamStateRef.current;Bt?.sessionId===q&&Bt.generation===A&&(Bt.ready=!0),be=!1;continue}const ut=n.assistantIdRef.current??qe,Ge=b(Rt,ut,{replay:be,targetSessionId:q,generation:A});Ge&&(n.lastEventIdRef.current=Ge)}}const Ve=n.eventsStreamStateRef.current;Ve?.sessionId===q&&Ve.generation===A&&(Ve.ready=!1),await wf(1e3,ae)}catch{if(ae.aborted)return;await wf(2e3,ae)}}},[t,n,b]),G=S.useCallback((q,A)=>{const ae=n.eventsStreamStateRef.current;if(ae?.sessionId===q&&ae.generation===A&&n.reconnectAbortRef.current)return;n.reconnectAbortRef.current?.abort();const he=new AbortController;n.reconnectAbortRef.current=he,n.eventsStreamStateRef.current={sessionId:q,generation:A,ready:!1},Y(q,A,he.signal)},[n,Y]),j=S.useCallback(async(q,A)=>{G(q,A);const ae=Date.now()+5e3;for(;Date.now()<ae;){const he=n.eventsStreamStateRef.current;if(he?.sessionId===q&&he.generation===A&&he.ready)return;if(n.sessionRef.current?.sessionId!==q||n.sessionGenerationRef.current!==A)throw new Error("会话已切换");await OO()}throw new Error("事件连接未就绪,请检查 Console 连接后重试")},[n,G]),F=S.useCallback(async q=>{try{const A=await fetch(N2(t,q),{credentials:"include"}),ae=await A.json().catch(()=>({}));return A.ok?ae.state??null:null}catch{return null}},[t]),H=S.useCallback(async q=>{try{const A=await fetch(vO(t,q.sessionId),{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":tr()},credentials:"include",body:JSON.stringify({clientRequestId:q.clientRequestId,text:q.text.trim()||"请查看附件图片。",images:q.images.map(({type:he,mimeType:ne,data:te})=>({type:he,mimeType:ne,data:te}))})}),ae=await A.json().catch(()=>({}));return{httpOk:A.ok,status:A.status,body:ae}}catch{return{httpOk:!1,status:0,body:{},networkError:!0}}},[t]),ee=S.useCallback(()=>({showNotice:D,setError:q=>c(q)}),[D,c]),K=S.useCallback(async(q,A,ae)=>{n.stoppingTurnIdRef.current=ae,n.streamingRef.current=!1,x(!1),R("stopping"),k(null);try{const he=await fetch(xO(t,q,ae),{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":tr()},credentials:"include",body:"{}"}),ne=await he.json().catch(()=>({}));if(n.sessionRef.current?.sessionId!==q||n.sessionGenerationRef.current!==A||n.stoppingTurnIdRef.current!==ae)return;const te=A2({httpOk:he.ok,turnId:ae,body:ne}),ce=la(n);if(ce.stoppingTurnId=ae,te.action==="owner-lost-reconcile"){const ge=await F(q),Re=n.sessionRef.current?.sessionId===q&&n.sessionGenerationRef.current===A;Ym(ce,te,ee(),{sessionStillCurrent:Re,runtimeBusy:Io(ge??void 0),markIdle:()=>B(q,A,n.assistantIdRef.current)}),oa(n,ce),R(Ys(ce));return}Ym(ce,te,ee(),{sessionStillCurrent:!0,markIdle:()=>B(q,A,n.assistantIdRef.current)}),oa(n,ce),R(Ys(ce)),ce.streaming&&x(!0)}catch{const he=la(n);Ym(he,A2({httpOk:!1,turnId:ae,body:{},networkError:!0}),ee()),oa(n,he),n.streamingRef.current=!0,x(!0),R("stopping")}},[t,n,x,R,B,F,ee]),X=S.useCallback((q,A)=>{const ae=la(n);ae.sessionId=n.sessionRef.current?.sessionId??null,ae.sessionGeneration=n.sessionGenerationRef.current,ae.submitGeneration=n.submitGenerationRef.current;const he=ne=>{I(ne)};NO(ae,q,{assistantId:A.assistantId,text:A.text,images:A.images,pending:A.pending,sessionId:A.sessionId,notice:ee(),acceptedUi:{setStreaming:x,setStreamingAssistantId:k,setPendingImages:he,watchSessionTitle:p},adoptUi:{clearEmptyAssistant:ne=>Xm(y,ne),setInput:_,setPendingImages:he,setStreaming:x,setStreamingAssistantId:k},rejectedUi:{setError:c,setStreaming:x,setStreamingAssistantId:k,clearEmptyAssistant:ne=>Xm(y,ne),setInput:_,setPendingImages:he,formatError:Ua},onAutoAbort:ne=>{K(A.sessionId,A.generation,ne)}}),oa(n,ae),R(Ys(ae))},[n,ee,x,R,k,I,p,y,_,c,K]),V=S.useCallback(async q=>{const A=n.sessionRef.current;if(!A||!q.text.trim()&&q.images.length===0)return{action:"handled"};const ae=s.deferredTurn;D("正在排队…");const he=ce=>{C(ce),_(""),I([]),c(null),D(ae?"已更新排队消息":"已排队,将在当前回合结束后自动发送")},ne=()=>{C(null),_(""),I([]),c(null),D("消息已进入发送")},te=async()=>{const ce=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(A.sessionId)}/deferred-turn`,{method:"PUT",headers:{"Content-Type":"application/json","x-loop-console-confirmation":tr()},credentials:"include",body:JSON.stringify({clientRequestId:q.clientRequestId,blockedByTurnId:q.blockedByTurnId,text:q.text,images:q.images,...ae?{expectedRevision:ae.revision}:{}})}),ge=await ce.json().catch(()=>({}));return{response:ce,body:ge}};try{for(let ce=0;ce<2;ce+=1){const{response:ge,body:Re}=await te();if(ge.ok&&Re.accepted&&Re.deferredTurn)return he(Re.deferredTurn),{action:"handled"};if(Re.deferredTurn&&C(Re.deferredTurn),Re.error?.code!=="TURN_NOT_ACTIVE")return c(Re.error?.message??`待发送消息未被服务端接受(HTTP ${ge.status})`),{action:"handled"};const je=await F(A.sessionId),be=k2({clientRequestId:q.clientRequestId,blockedByTurnId:q.blockedByTurnId,state:je??void 0});if(be.action==="deferred")return he(be.deferredTurn),{action:"handled"};if(be.action==="accepted")return ne(),{action:"handled"};if(!(be.action==="retry-deferred"&&ce===0))return be.action==="send-now"&&!ae?(D("上一轮已停止,正在发送当前消息…"),{action:"send-now"}):(c(Re.error?.message??"停止状态已变化,当前消息仍保留在输入框"),{action:"handled"})}return{action:"handled"}}catch(ce){const ge=await F(A.sessionId),Re=k2({clientRequestId:q.clientRequestId,blockedByTurnId:q.blockedByTurnId,state:ge??void 0});return Re.action==="deferred"?(he(Re.deferredTurn),{action:"handled"}):Re.action==="accepted"?(ne(),{action:"handled"}):Re.action==="send-now"&&!ae?(D("上一轮已停止,正在发送当前消息…"),{action:"send-now"}):(c(ce instanceof Error?`无法确认消息是否已排队:${ce.message}`:"无法确认消息是否已排队,请刷新后查看服务端状态"),{action:"handled"})}},[t,n,s.deferredTurn,C,_,I,c,D,F]),re=S.useCallback(async q=>{const A=n.sessionRef.current,ae=s.deferredTurn;if(!(!A||!ae))try{const he=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(A.sessionId)}/deferred-turn`,{method:"DELETE",headers:{"Content-Type":"application/json","x-loop-console-confirmation":tr()},credentials:"include",body:JSON.stringify({clientRequestId:ae.clientRequestId,expectedRevision:ae.revision})}),ne=await he.json().catch(()=>({}));if(!he.ok||!ne.cancelled){c(ne.error?.message??"待发送消息撤回失败");return}C(null),q==="restore"?(_(ne.deferredTurn?.text??""),I(ne.deferredTurn?.images??[]),D("待发送消息已移回输入框")):D("已删除排队消息"),c(null)}catch(he){c(he instanceof Error?he.message:String(he))}},[t,n,s.deferredTurn,C,_,I,c,D]),ue=S.useCallback(()=>re("restore"),[re]),Te=S.useCallback(()=>re("discard"),[re]),P=S.useCallback(async(q,A)=>{const ae=n.sessionRef.current;if(!ae||!q.trim()&&A.length===0)return;const he=la(n),ne=mO({turnPhase:Ys(he),blockedByTurnId:he.stoppingTurnId??he.activeTurnId}),te=rs("chat-submit");if(ne.action==="hold"){const Ge=Ys(he);Ge==="stopping"?D("正在确认上一轮停止状态,当前消息已保留"):Ge==="running"&&D("正在确认当前回合状态,当前消息已保留");return}if($?.(q),ne.action==="queue-deferred"&&(await V({text:q,images:A,clientRequestId:te,blockedByTurnId:ne.blockedByTurnId})).action!=="send-now")return;const ce=n.sessionRef.current,ge=n.sessionGenerationRef.current;if(!ce||ce.sessionId!==ae.sessionId||!q.trim()&&A.length===0||n.streamingRef.current||n.submitInFlightRef.current||n.pendingSubmissionRef.current)return;n.submitInFlightRef.current=!0;const Re=++n.submitGenerationRef.current,je=rs("u"),be=rs("a"),qe=q.trim(),Ve=A.slice(),tt=hO({clientRequestId:te,submitGeneration:Re,sessionId:ce.sessionId,sessionGeneration:ge,text:qe,images:Ve,assistantId:be,userMessageId:je});n.pendingSubmissionRef.current=tt;try{await j(ce.sessionId,ge)}catch(Ge){n.sessionRef.current?.sessionId===ce.sessionId&&n.sessionGenerationRef.current===ge&&c(Ua(Ge instanceof Error?Ge.message:String(Ge))),M(te);return}if(n.sessionRef.current?.sessionId!==ce.sessionId||n.sessionGenerationRef.current!==ge){M(te);return}const nt={id:je,role:"user",text:qe,createdAt:Date.now()};y(Ge=>[...Ge,nt,{id:be,role:"assistant",text:"",createdAt:Date.now()}]),_(""),f(!0),c(null),n.streamingRef.current=!0,R("running"),n.assistantIdRef.current=be,x(!0),k(be);const Ut={sessionId:ce.sessionId,generation:ge,submitGeneration:Re,assistantId:be,text:qe,images:Ve,pending:tt},Rt=await H({sessionId:ce.sessionId,clientRequestId:te,text:qe,images:Ve});if(!Lu({pending:tt,sessionId:n.sessionRef.current?.sessionId,sessionGeneration:n.sessionGenerationRef.current,submitGeneration:n.submitGenerationRef.current})){tt.resolveOutcome({kind:"stale"}),M(te);return}let ut=Rt.networkError?E2():T2({httpOk:Rt.httpOk,status:Rt.status,body:Rt.body,clientRequestId:te});if(ut.kind==="ambiguous"){const Ge=await F(ce.sessionId),Bt=Ge?gO({clientRequestId:te,state:Ge}):null;if(Bt)ut=Bt;else{const Kt=await H({sessionId:ce.sessionId,clientRequestId:te,text:qe,images:Ve});if(!Lu({pending:tt,sessionId:n.sessionRef.current?.sessionId,sessionGeneration:n.sessionGenerationRef.current,submitGeneration:n.submitGenerationRef.current})){tt.resolveOutcome({kind:"stale"}),M(te);return}if(ut=Kt.networkError?E2("无法确认 Turn 是否已创建,正在与服务端对账(不会重复提交新的请求 ID)"):T2({httpOk:Kt.httpOk,status:Kt.status,body:Kt.body,clientRequestId:te}),ut.kind==="ambiguous"){const hn=ut.message||"无法确认 Turn 是否已创建,正在与服务端对账(不会重复提交新的请求 ID)";ut=pO(hn),D(hn)}}}X(ut,Ut)},[t,n,j,H,F,X,M,D,y,_,f,c,x,R,k,V,$]),U=S.useCallback(async()=>{const q=n.sessionRef.current?.sessionId,A=n.sessionGenerationRef.current;if(!q)return;const ae=la(n),he=_2(ae,{postAbort:()=>{},notice:ee()});if(oa(n,ae),R("stopping"),he.abortedTurnId){if(n.stopInFlightRef.current)return;n.stopInFlightRef.current=!0;try{await K(q,A,he.abortedTurnId)}finally{n.stopInFlightRef.current=!1}return}const ne=n.pendingSubmissionRef.current;if(ne&&!n.stopInFlightRef.current){n.stopInFlightRef.current=!0;try{const te=await ne.outcomePromise;if(n.sessionRef.current?.sessionId!==q||n.sessionGenerationRef.current!==A)return;let ce=null;if(te.kind==="accepted")ce=te.turnId;else if(te.kind==="adopt-active")ce=te.activeTurn.turnId;else{if(te.kind==="ambiguous")return;n.stopRequestedRef.current=!1;return}if(!ce)return;const ge=la(n);W6(ge);const Re=_2(ge,{postAbort:()=>{},notice:ee()});oa(n,ge),Re.abortedTurnId&&await K(q,A,Re.abortedTurnId)}finally{n.stopInFlightRef.current=!1}}},[n,ee,K]);return S.useEffect(()=>{const q=!!n.pendingSubmissionRef.current||n.submitInFlightRef.current||n.stopRequestedRef.current||!!n.activeTurnIdRef.current;if(!a||!N&&!q)return;const A=a.sessionId,ae=n.sessionGenerationRef.current;let he=!1;const ne=async()=>{try{const Re=await fetch(N2(t,A),{credentials:"include"}),je=await Re.json().catch(()=>({}));if(he||!Re.ok||n.sessionRef.current?.sessionId!==A||n.sessionGenerationRef.current!==ae)return;const be=je.state,qe=n.pendingSubmissionRef.current;if(qe){const ut=bO({clientRequestId:qe.clientRequestId,state:be}),Ge=la(n),Bt=CO(Ge,ut,be,{markIdle:()=>B(A,ae,n.assistantIdRef.current),onAutoAbort:Kt=>{K(A,ae,Kt)}});if(oa(n,Ge),R(Ys(Ge)),be&&"deferredTurn"in be&&C(be.deferredTurn??null),Bt==="bound"){x(!0);return}if(Bt==="released"||!qe.acceptedTurnId&&!Ge.pendingSubmission?.acceptedTurnId)return}const Ve=be?.activeTurn?.turnId??be?.activeTurnId??null;n.activeTurnIdRef.current=Ve;const tt=Io(be),nt=n.pendingSubmissionRef.current;if(nt){const ut=be?.latestTurn?.clientRequestId===nt.clientRequestId&&is(be?.latestTurn?.state),Ge=be?.activeTurn?.clientRequestId===nt.clientRequestId&&is(be?.activeTurn?.state);if(ut||Ge){const Bt=Ge?be?.activeTurn?.turnId??null:be?.latestTurn?.turnId??nt.acceptedTurnId??null,Kt=la(n);C2(Kt,{clientRequestId:nt.clientRequestId,turnId:Bt,markIdle:!tt}),oa(n,Kt),tt||B(A,ae,n.assistantIdRef.current);return}}if(tt)return;const Ut=n.assistantIdRef.current;if(Ve&&!(is(be?.activeTurn?.state)||is(be?.activeTurnState)))return;Ve&&n.settledTurnIdsRef.current.add(Ve);const Rt=nt?.clientRequestId;if(Rt){const ut=la(n);C2(ut,{clientRequestId:Rt,turnId:Ve,markIdle:!0}),oa(n,ut)}else M();B(A,ae,Ut)}catch{}},te=()=>{document.visibilityState==="visible"&&ne()},ce=()=>{ne()},ge=window.setInterval(()=>{ne()},15e3);return document.addEventListener("visibilitychange",te),window.addEventListener("online",ce),ne(),()=>{he=!0,window.clearInterval(ge),document.removeEventListener("visibilitychange",te),window.removeEventListener("online",ce)}},[t,n,a,N,R,B,M,K]),S.useEffect(()=>{if(!a)return;const q=n.sessionGenerationRef.current;return G(a.sessionId,q),()=>{const A=n.eventsStreamStateRef.current;A?.sessionId===a.sessionId&&A.generation===q&&(n.reconnectAbortRef.current?.abort(),n.reconnectAbortRef.current=null,n.eventsStreamStateRef.current=null)}},[a,h,n,G]),{sendPrompt:P,handleStop:U,cancelDeferredTurn:ue,discardDeferredTurn:Te,openEventsStream:Y}}function jO(e){const{origin:t,refs:n,thread:a,setError:s}=e,{interview:l,setInterview:c}=a,[f,m]=S.useState(""),h=S.useCallback(async()=>{const y=n.sessionRef.current;if(!y)return;const x=window.prompt("Task ID(例如 2026-07-26-my-task)")?.trim();if(!x)return;const k=await fetch(`${t}/api/operator/v1/chat/sessions/${y.sessionId}/interviews`,{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":tr()},credentials:"include",body:JSON.stringify({taskId:x})}),N=await k.json();if(!k.ok){s(N.error?.message??`HTTP ${k.status}`);return}c({interviewSessionId:N.interview?.sessionId,taskId:x,state:N.interview?.state,question:N.question,draft:N.draft?.draft,draftSha256:N.draft?.draftSha256,assessment:N.assessment})},[t,n,c,s]),p=S.useCallback(async y=>{const x=n.sessionRef.current;if(!x||!l?.interviewSessionId||!l.question)return;const k=await fetch(`${t}/api/operator/v1/chat/sessions/${x.sessionId}/interviews/${l.interviewSessionId}/answers`,{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":tr()},credentials:"include",body:JSON.stringify({questionId:l.question.id,response:y,...y==="override"?{text:f}:{}})}),N=await k.json();if(!k.ok){s(N.error?.message??`HTTP ${k.status}`);return}c(R=>({...R??{},state:N.interview?.state,question:N.question,draft:N.draft?.draft,draftSha256:N.draft?.draftSha256,assessment:N.assessment,taskKindRecommendation:N.taskKindRecommendation??R?.taskKindRecommendation})),m("")},[t,n,l,f,c,s]),b=S.useCallback(async()=>{const y=n.sessionRef.current;if(!y||!l?.interviewSessionId||!l.taskKindRecommendation)return;const x=await fetch(`${t}/api/operator/v1/chat/sessions/${y.sessionId}/interviews/${l.interviewSessionId}/task-kind/confirm`,{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":tr()},credentials:"include",body:JSON.stringify({taskKind:l.taskKindRecommendation})}),k=await x.json();if(!x.ok){s(k.error?.message??`HTTP ${x.status}`);return}c(N=>({...N??{},confirmedTaskKind:N?.taskKindRecommendation,taskKindRecommendation:void 0,draft:k.draft?.draft,draftSha256:k.draft?.draftSha256,assessment:k.assessment}))},[t,n,l,c,s]);return{interviewAnswer:f,setInterviewAnswer:m,startInterview:h,answerInterview:p,confirmTaskKind:b}}function LO(e){const{origin:t,refs:n,sessionId:a,setError:s}=e,[l,c]=S.useState({}),[f,m]=S.useState(new Set),[h,p]=S.useState(null),[b,y]=S.useState([]),[x,k]=S.useState(null),[N,R]=S.useState(!1),C=S.useRef(new Set);C.current=f;const _=S.useCallback(async(G="")=>{try{p(null);const j=await fetch(`${t}/api/operator/v1/chat/repo/tree?path=${encodeURIComponent(G)}`,{credentials:"include"}),F=await j.json();if(!j.ok)throw new Error(F.error?.message??"无法读取仓库目录");c(H=>({...H,[G]:F.data?.entries??[]}))}catch(j){p(j instanceof Error?j.message:String(j))}},[t]);S.useEffect(()=>{_()},[_]);const[I,$]=S.useState(0),D=S.useCallback(()=>{$(G=>G+1)},[]);S.useEffect(()=>{const G=["",...C.current];for(const j of G)_(j)},[_,I]),S.useEffect(()=>{const G=()=>{document.hidden||D()};return document.addEventListener("visibilitychange",G),()=>document.removeEventListener("visibilitychange",G)},[D]);const M=S.useCallback(async G=>{R(!0);try{const j=await fetch(`${t}/api/operator/v1/chat/repo/file?path=${encodeURIComponent(G)}`,{credentials:"include"}),F=await j.json();if(!j.ok||!F.data)throw new Error(F.error?.message??"无法预览文件");y(H=>{const ee=[...H.filter(X=>X.path!==F.data.path),F.data],K=n.sessionRef.current?.sessionId;return K&&window.localStorage.setItem(`${Yr}.previews.${K}`,JSON.stringify(ee.map(X=>X.path))),ee}),k(F.data.path)}catch(j){s(j instanceof Error?j.message:String(j))}finally{R(!1)}},[t,n,s]);S.useEffect(()=>{if(!a)return;let G=[];try{const j=JSON.parse(window.localStorage.getItem(`${Yr}.previews.${a}`)??"[]");Array.isArray(j)&&(G=j.filter(F=>typeof F=="string").slice(0,10))}catch{}G.length&&Promise.all(G.map(async j=>{const F=await fetch(`${t}/api/operator/v1/chat/repo/file?path=${encodeURIComponent(j)}`,{credentials:"include"});if(F.ok)return(await F.json()).data})).then(j=>{if(n.sessionRef.current?.sessionId!==a)return;const F=j.filter(H=>!!H);y(F),k(F.at(-1)?.path??null)})},[t,a,n]);const B=S.useCallback(G=>{m(j=>{const F=new Set(j);return F.has(G)?F.delete(G):F.add(G),F}),l[G]||_(G)},[l,_]),Y=S.useCallback(G=>{y(j=>{const F=j.filter(H=>H.path!==G);return a&&window.localStorage.setItem(`${Yr}.previews.${a}`,JSON.stringify(F.map(H=>H.path))),F}),k(j=>j===G?b.find(F=>F.path!==G)?.path??null:j)},[b,a]);return{tree:l,expandedDirs:f,treeError:h,previews:b,activePreviewPath:x,setActivePreviewPath:k,previewLoading:N,setPreviews:y,loadTree:_,refreshTree:D,openPreview:M,closePreview:Y,toggleDir:B}}const zO=["operator","web","extension","prompt","skill"];function BO(e){const t=[];for(const n of zO){const a=[];for(let s=0;s<e.length;s+=1)e[s].source===n&&a.push({entry:e[s],globalIndex:s});a.length!==0&&t.push({source:n,label:xI[n],items:a})}return t}function UO(e,t){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<0?0:e>=t?t-1:e}function qO(e){return e==="comfortable"?3:e==="compact"?2:1}function I2(e,t,n,a){const s=t.findIndex(b=>b.items.some(y=>y.globalIndex===e));if(s<0)return e;const l=t[s],c=l.items.findIndex(b=>b.globalIndex===e);if(c<0)return e;const f=Math.floor(c/n),m=c%n;if(a==="left"||a==="right"){if(n<=1)return e;const y=c+(a==="left"?-1:1);return y<0||y>=l.items.length||Math.floor(y/n)!==f?e:l.items[y].globalIndex}const h=a==="up"?-1:1,p=c+h*n;if(p>=0&&p<l.items.length)return l.items[p].globalIndex;for(let b=s+h;b>=0&&b<t.length;b+=h){const y=t[b];if(y.items.length===0)continue;const x=Math.floor((y.items.length-1)/n)*n,k=a==="up"?x+m:m;return k>=y.items.length?e:y.items[k].globalIndex}return e}function HO(e,t,n){const a=(e.left+e.right)/2;let s=null;for(const l of t){if(l.globalIndex===e.globalIndex)continue;const c=n==="up"?e.top-l.bottom:l.top-e.bottom;if(c<0)continue;const f=(l.left+l.right)/2,m=Math.abs(f-a);(s===null||c<s.gap||c===s.gap&&m<s.dist||c===s.gap&&m===s.dist&&l.globalIndex<s.index)&&(s={gap:c,dist:m,index:l.globalIndex})}return s?.index??null}function FO(){return{entries:[],index:-1,draft:""}}function PO(e,t){return t.trim()?e.entries[e.entries.length-1]===t?e.index===-1?e:{...e,index:-1,draft:""}:{entries:[...e.entries,t].slice(-100),index:-1,draft:""}:e}function $O(e){return e.index===-1?e:{...e,index:-1}}function GO(e,t,n){const{text:a,caretStart:s,caretEnd:l}=n;if(e.entries.length===0)return{handled:!1};if(t==="up"){if(a.slice(0,s).includes(`
|
|
398
|
-
`))return{handled:!1};if(e.index===-1){const m=e.entries.length-1;return{handled:!0,state:{...e,index:m,draft:a},text:e.entries[m]}}if(e.index===0)return{handled:!0,state:e,text:e.entries[0]};const f=e.index-1;return{handled:!0,state:{...e,index:f},text:e.entries[f]}}if(e.index===-1)return{handled:!1};if(a.slice(l).includes(`
|
|
399
|
-
`))return{handled:!1};if(e.index>=e.entries.length-1)return{handled:!0,state:{...e,index:-1},text:e.draft};const c=e.index+1;return{handled:!0,state:{...e,index:c},text:e.entries[c]}}function VO(e){const{origin:t,sessionId:n,refs:a,setError:s}=e,[l,c]=S.useState(""),[f,m]=S.useState([]),[h,p]=S.useState([]),[b,y]=S.useState(!1),x=S.useCallback(ne=>{if(typeof ne=="function"){c(te=>{const ce=ne(te);return y(ce.startsWith("/")),ce});return}c(ne),y(ne.startsWith("/"))},[]),[k,N]=S.useState(0),[R,C]=S.useState([]),[_,I]=S.useState(!1),[$,D]=S.useState(null),[M,B]=S.useState(0),Y=S.useRef(null),G=S.useRef(FO()),j=S.useRef(n),F=S.useRef(0),H=S.useCallback(ne=>{x(ne),y(ne.startsWith("/")),N(0),G.current=$O(G.current)},[]),ee=S.useCallback(ne=>{const te=Y.current,ce=GO(G.current,ne,{text:l,caretStart:te?.selectionStart??l.length,caretEnd:te?.selectionEnd??l.length});if(!ce.handled)return!1;G.current=ce.state,x(ce.text);const ge=ce.text.length;return queueMicrotask(()=>{const Re=Y.current;Re&&Re.value===ce.text&&Re.setSelectionRange(ge,ge)}),!0},[l,x]),K=S.useCallback(ne=>{G.current=PO(G.current,ne)},[]);S.useLayoutEffect(()=>{j.current=n,F.current+=1,C([]),D(null),I(!1)},[n]);const X=S.useCallback(async()=>{if(!n){C([]),D(null),I(!1);return}const ne=n,te=F.current;j.current=ne,I(!0),D(null);const ce=()=>j.current===ne&&F.current===te;try{const ge=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(ne)}/commands`,{credentials:"include"});if(!ce())return;if(!ge.ok){D("动态命令加载失败"),C([]);return}const Re=await ge.json().catch(()=>null),je=[];for(const qe of Re?.commands??[]){const Ve=qe.source;if(Ve!=="extension"&&Ve!=="prompt"&&Ve!=="skill")continue;const tt=String(qe.command??qe.name??"").trim();tt&&je.push({command:tt.startsWith("/")?tt:`/${tt}`,label:String(qe.label??qe.name??tt),description:String(qe.description??""),source:Ve})}if(!ce())return;C(je);const be=typeof Re?.warning=="string"?Re.warning.trim():"";D(be?be.slice(0,160):null)}catch{if(!ce())return;D("动态命令加载失败"),C([])}finally{ce()&&I(!1)}},[t,n]);S.useEffect(()=>{n&&(!b&&M===0||X())},[n,b,M,X]);const V=S.useCallback(()=>{B(ne=>ne+1),X()},[X]);S.useEffect(()=>{if(!n)return;const ne=l.slice(0,Y.current?.selectionStart??l.length).match(/(?:^|\s)@([^\s@]*)$/);if(!ne){m([]);return}const te=window.setTimeout(()=>{fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(n)}/files?q=${encodeURIComponent(ne[1]??"")}`).then(ce=>ce.ok?ce.json():null).then(ce=>m((ce?.files??[]).map(ge=>ge.path)))},150);return()=>window.clearTimeout(te)},[t,n,l]);const re=S.useCallback(ne=>{const te=Y.current?.selectionStart??l.length,ge=l.slice(0,te).search(/@[^\s@]*$/);ge<0||(x(`${l.slice(0,ge)}@${ne} ${l.slice(te)}`),m([]))},[l]),ue=S.useCallback(ne=>{for(const te of Array.from(ne).slice(0,4)){if(!te.type.startsWith("image/")||te.size>5*1024*1024){s("图片仅支持 PNG/JPEG/GIF/WebP,单张不超过 5 MiB");continue}const ce=new FileReader;ce.onload=()=>{const ge=String(ce.result??""),Re=ge.slice(ge.indexOf(",")+1);p(je=>[...je,{name:te.name,type:"image",mimeType:te.type,data:Re}].slice(0,4))},ce.readAsDataURL(te)}},[s]),Te=S.useCallback(ne=>{p(te=>te.filter(ce=>ce!==ne))},[]);S.useLayoutEffect(()=>{const ne=Y.current;ne&&(ne.style.height="auto",ne.style.height=`${Math.min(ne.scrollHeight,280)}px`)},[l]),S.useEffect(()=>{if(!n)return;const ne=window.setTimeout(()=>{fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(n)}/draft`,{method:"PUT",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":tr()},body:JSON.stringify({text:l})})},400);return()=>window.clearTimeout(ne)},[t,n,l]);const P=S.useMemo(()=>vI(R),[R]),U=S.useMemo(()=>l.startsWith("/")?yI(P,l):[],[l,P]);S.useEffect(()=>{N(ne=>UO(ne,U.length))},[U.length]);const q=S.useCallback(()=>{a.isComposingRef.current=!0},[a]),A=S.useCallback(()=>{a.isComposingRef.current=!1,a.compositionEndedAtRef.current=Date.now()},[a]),ae=S.useCallback(()=>a.isComposingRef.current,[a]),he=S.useCallback(()=>Date.now()-a.compositionEndedAtRef.current<100,[a]);return S.useEffect(()=>{hw({origin:t,sessionId:n,refs:a})},[t,n,a]),{input:l,setInput:x,handleInputChange:H,navigateHistory:ee,recordHistory:K,fileOptions:f,pendingImages:h,setPendingImages:p,addImagesFromFiles:ue,removeImage:Te,shortcutOpen:b,setShortcutOpen:y,shortcutIndex:k,setShortcutIndex:N,filteredShortcuts:U,dynamicCommandsLoading:_,dynamicCommandsError:$,retryDynamicCommands:V,insertFileReference:re,textareaRef:Y,onCompositionStart:q,onCompositionEnd:A,isComposingNow:ae,recentlyComposedNow:he}}const KO=[{toolId:"read",kind:"explore",description:"Pi 内置读取文件。"},{toolId:"write",kind:"explore",description:"Pi 内置写入文件(软约束:大改优先走 DAG)。"},{toolId:"edit",kind:"explore",description:"Pi 内置编辑文件(软约束:大改优先走 DAG)。"},{toolId:"bash",kind:"explore",description:"Pi 内置 shell 执行(软约束:优先受治路径)。"},{toolId:"grep",kind:"explore",description:"Pi 内置内容搜索。"},{toolId:"find",kind:"explore",description:"按名称查找文件路径。"},{toolId:"ls",kind:"explore",description:"列出目录内容。"},{toolId:"safe-read",kind:"explore",description:"安全读取仓库相对路径文件;拒绝敏感文件并自动脱敏 secret。"},{toolId:"safe-grep",kind:"explore",description:"安全搜索仓库内容;跳过敏感文件并自动脱敏搜索结果。"},{toolId:"git-status",kind:"explore",description:"固定参数执行 git status --porcelain(无 shell)。"},{toolId:"git-diff",kind:"explore",description:"固定参数查看 git diff;敏感路径不可查看且结果自动脱敏。"}];function YO(e){if(!e)return null;const t=(e.tools??[]).map(a=>({toolId:a.toolId,action:a.action,description:a.description,kind:a.kind??"read",cli:a.cli})),n=[...KO];return{explore:n,operator:t,total:n.length+t.length}}let XO=0;function ZO(e){const{origin:t,session:n,setSession:a,refs:s,setError:l}=e,[c,f]=S.useState(null),[m,h]=S.useState([]),[p,b]=S.useState("idle"),[y,x]=S.useState(null),[k,N]=S.useState([]),[R,C]=S.useState(null),[_,I]=S.useState(null),[$,D]=S.useState(!1),[M,B]=S.useState(!1),[Y,G]=S.useState(!1),j=S.useRef(null),F=S.useRef(null),H=S.useRef(0);S.useEffect(()=>{H.current=-1,D(!1)},[n?.sessionId,D]);const K=sl().snapshot,X=S.useCallback(async()=>{try{const ne=await fetch(`${t}/api/operator/v1/chat/capabilities`);if(!ne.ok)return;const te=await ne.json();f(te)}catch{}},[t]);S.useEffect(()=>{X()},[X]);const V=S.useCallback(async()=>{if(!n){h([]),b("idle");return}const ne=n.sessionId;b("loading"),x(null);try{const te=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(ne)}/models`,{credentials:"include"}),ce=await te.json().catch(()=>null);if(s.sessionRef.current?.sessionId!==ne)return;if(!te.ok||!ce){b("error"),x(ce?.error?.message??`模型列表读取失败(HTTP ${te.status})`);return}h(ce.models??[]),N(ce.thinkingLevels??[]),b("ready")}catch(te){if(s.sessionRef.current?.sessionId!==ne)return;b("error"),x(te instanceof Error?te.message:String(te))}},[t,n,s]);S.useEffect(()=>{V()},[V]),S.useEffect(()=>{if(!n){C(null),I(null);return}const ne=n.sessionId,te=`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(ne)}`;I(null),fetch(`${te}/runtime-context`,{credentials:"include"}).then(async ce=>{const ge=await ce.json().catch(()=>null);if(!ge?.context||s.sessionRef.current?.sessionId!==ne)return;const Re=ge.context,je=bw().snapshot;C(be=>fw(be,Re,je,ne))}).catch(()=>{s.sessionRef.current?.sessionId===ne&&I("注入上下文读取失败,请重试")})},[t,n?.sessionId,s]),S.useEffect(()=>{if(!K||!n||K.sessionId!==n.sessionId)return;const ne=Q2(K);a(te=>{if(!te||te.sessionId!==K.sessionId||DM(te,ne))return te;const ce=X6(te,ne);return s.sessionRef.current=ce,ce}),C(te=>{if(!te)return te;const ce={...te,...ne.model?{model:ne.model}:{},...ne.thinkingLevel?{thinkingLevel:ne.thinkingLevel}:{}};return ce.model?.provider===te.model?.provider&&ce.model?.modelId===te.model?.modelId&&ce.thinkingLevel===te.thinkingLevel?te:ce})},[K,n?.sessionId,s,a,C]);const re=S.useCallback(async ne=>{if(!n)return!1;const te=n.sessionId,ce=++XO;H.current=ce,t3({type:"mutation-start",token:ce}),D(!0);try{const ge=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(n.sessionId)}/model`,{method:"POST",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":tr()},body:JSON.stringify(ne)}),Re=await ge.json().catch(()=>({}));return H.current!==ce?!1:ge.ok?!Re.session||s.sessionRef.current?.sessionId!==te?!1:pw(ce,te,Re.snapshot):(s.sessionRef.current?.sessionId===te&&(l(Re.error?.message??`模型或思考等级切换失败(HTTP ${ge.status})`),tl()),!1)}catch(ge){return H.current!==ce||s.sessionRef.current?.sessionId===te&&l(ge instanceof Error?ge.message:String(ge)),!1}finally{gw(ce,te,s)&&H.current===ce&&D(!1)}},[t,n,s,a,l]);S.useEffect(()=>{if(!M)return;const ne=ce=>{const ge=j.current;ge&&ce.target instanceof Node&&!ge.contains(ce.target)&&B(!1)},te=ce=>{ce.key==="Escape"&&B(!1)};return document.addEventListener("mousedown",ne),document.addEventListener("keydown",te),()=>{document.removeEventListener("mousedown",ne),document.removeEventListener("keydown",te)}},[M]),S.useEffect(()=>{if(!Y)return;const ne=ce=>{const ge=F.current;ge&&ce.target instanceof Node&&!ge.contains(ce.target)&&G(!1)},te=ce=>{ce.key==="Escape"&&G(!1)};return document.addEventListener("mousedown",ne),document.addEventListener("keydown",te),()=>{document.removeEventListener("mousedown",ne),document.removeEventListener("keydown",te)}},[Y]);const ue=S.useMemo(()=>YO(c),[c]),Te=K?(K.models??[]).map(ne=>({provider:ne.provider,id:ne.id,...ne.name?{name:ne.name}:{},...ne.hasCredentials!==void 0?{hasCredentials:ne.hasCredentials}:{}})):m,P=K?.thinkingLevels?.length?K.thinkingLevels.map(ne=>ne.value):k,U=n?.model??R?.model,q=U?_o(U.provider,U.modelId):"",A=K?.selection?.thinkingSelection??n?.thinkingLevel??"",ae=K?.selection?.effectiveThinkingLevel??n?.thinkingLevel??void 0,he=!q||Te.some(ne=>_o(ne.provider,ne.id)===q);return{capabilities:c,models:Te,modelsStatus:p,modelsError:y,onRetryModels:()=>{V()},thinkingLevels:P,runtimeContext:R,runtimeContextError:_,onRetryRuntimeContext:()=>{I(null),tl()},toolsOpen:M,setToolsOpen:B,runtimeContextOpen:Y,setRuntimeContextOpen:G,toolsMenuRef:j,runtimeContextMenuRef:F,switchRuntime:re,switching:$,toolCatalog:ue,activeModel:U,activeModelRef:q,activeThinkingLevel:A,effectiveThinkingLevel:ae,activeModelListed:he}}const M2={comfortableMin:1450,compactMin:1100};function WO(e){return!Number.isFinite(e)||e<0?"narrow":e>=M2.comfortableMin?"comfortable":e>=M2.compactMin?"compact":"narrow"}const QO={mode:"comfortable",width:1600,landingDensity:"comfortable",emptyHeight:720};function JO(e,t){const[n,a]=S.useState(QO);return S.useEffect(()=>{const s=e.current;if(!s||typeof ResizeObserver>"u")return;const l=()=>{const p=s.getBoundingClientRect().width,b=t?.current??null,y=b?b.getBoundingClientRect().height:720;a({mode:WO(p),width:p,landingDensity:nM(y),emptyHeight:y})};l();const c=new ResizeObserver(()=>l());c.observe(s);let f=null;const m=()=>{const p=t?.current??null;p&&p!==f&&(f&&c.unobserve(f),c.observe(p),f=p,l())};m();const h=window.setInterval(m,250);return()=>{window.clearInterval(h),c.disconnect()}},[e,t]),n}function eD(e="none"){return{active:e}}function Xs(e,t){return{active:t}}function ta(e={active:"none"}){return{active:"none"}}function tD(e){return{sidebarDrawerOpen:e.active==="sidebar-drawer",processOpen:e.active==="process",runtimeContextOpen:e.active==="runtime-context",toolsOpen:e.active==="tools",activityOpen:e.active==="activity"}}const nD=160,rD=120,aD=120;function iD(e){return e?e.operationCards.length+e.humanGateCards.length+e.artifactCards.length:0}function sD(e){const t=iD(e),[n,a]=S.useState(()=>t>0?{phase:"visible",snapshot:e}:{phase:"hidden",snapshot:null}),s=S.useRef(n);s.current=n;const l=S.useMemo(()=>`${e?.sessionId??"none"}:${t}`,[e?.sessionId,t]);return S.useEffect(()=>{const c=[],f=s.current.snapshot;if(!e||t===0){if(!f){a({phase:"hidden",snapshot:null});return}a({phase:"leaving",snapshot:f}),c.push(window.setTimeout(()=>{a({phase:"hidden",snapshot:null})},rD))}else f?f.sessionId!==e.sessionId?(a({phase:"switching",snapshot:e}),c.push(window.setTimeout(()=>{a({phase:"visible",snapshot:e})},aD))):a({phase:"visible",snapshot:e}):(a({phase:"entering",snapshot:e}),c.push(window.setTimeout(()=>{a({phase:"visible",snapshot:e})},nD)));return()=>{for(const m of c)window.clearTimeout(m)}},[e,l,t]),n}function lD(e){const{origin:t,surface:n="standalone"}=e,a=n==="workspace",s=KM(),[l,c]=S.useState(null),[f,m]=S.useState(!1),[h,p]=S.useState(null),[b,y]=S.useState(!0),[x,k]=S.useState(!0),[N,R]=S.useState(()=>eD()),[C,_]=S.useState(null),[I,$]=S.useState(null),[D,M]=S.useState(0),B=S.useRef(null),Y=S.useRef(null),G=S.useRef(null),j=S.useRef(null),F=S.useRef(null),H=S.useRef(null),ee=S.useRef(null),K=S.useRef(null),X=S.useRef(null),V=S.useRef(()=>{}),re=S.useRef(null),ue=S.useRef(!1),Te=JO(G,F),P=Te.mode,U=tD(N),q=U.processOpen,A=q,ae=U.runtimeContextOpen,he=U.activityOpen,ne=S.useCallback(ie=>{R(we=>{const Ue=we.active==="process";return(typeof ie=="function"?ie(Ue):ie)?Xs(we,"process"):we.active==="process"?ta(we):we})},[]),te=VO({origin:t,sessionId:h?.sessionId,refs:s,setError:c}),ce=S.useMemo(()=>BO(te.filteredShortcuts),[te.filteredShortcuts]),ge=LO({origin:t,refs:s,sessionId:h?.sessionId,setError:c}),Re=S.useRef(()=>{}),je=S.useCallback(ie=>{Re.current(ie)},[]),be=rO({origin:t,refs:s,sessionId:h?.sessionId,setError:c,onReconcile:je});Re.current=ie=>{const we=s.sessionRef.current?.sessionId;we&&(async()=>await be.recoverSession(we)?($({id:Date.now(),message:"已自动恢复:会话事件已重新同步,可继续对话。"}),M(wt=>wt+1)):$({id:Date.now(),message:"自动恢复未完成,将在重连时重试。"}))()};const qe=be.operationCards.length+be.humanGateCards.length+be.artifactCards.length,Ve=S.useMemo(()=>L6(be.operationCards).length+be.humanGateCards.length+be.artifactCards.length,[be.operationCards,be.humanGateCards.length,be.artifactCards.length]),tt=S.useMemo(()=>h?{sessionId:h.sessionId,operationCards:be.operationCards,humanGateCards:be.humanGateCards,artifactCards:be.artifactCards}:null,[h,be.operationCards,be.humanGateCards,be.artifactCards]),nt=sD(tt),Ut=S.useMemo(()=>OI({operations:be.operationCards,gates:be.humanGateCards,artifacts:be.artifactCards}),[be.operationCards,be.humanGateCards,be.artifactCards]),Rt=S.useCallback(ie=>Ut.has(ie),[Ut]),ut=tM(j,P,h?.sessionId??"no-session"),Ge=ut.presentation==="sidecar";S.useEffect(()=>{const ie=P==="comfortable"&&N.active==="sidebar-drawer",we=Ge&&N.active==="activity";(ie||we)&&R(Ue=>Ue.active===N.active?ta(Ue):Ue)},[Ge,P,N.active]),S.useEffect(()=>{_(null)},[h?.sessionId]),S.useEffect(()=>{qe>0||N.active!=="activity"||R(ie=>ie.active==="activity"?ta(ie):ie)},[qe,N.active]);const Bt=S.useCallback(ie=>{ie&&_(ie),Ge||R(we=>Xs(we,"activity"))},[Ge]),Kt=S.useCallback(()=>{R(ie=>ie.active==="activity"?ta(ie):ie)},[]),hn=S.useCallback(ie=>{const we=Y.current;if(!we)return;const wt=Array.from(we.querySelectorAll("[data-activity-ref]")).find(Tt=>ie.includes(Tt.dataset.activityRef??""));if(!wt){$({id:Date.now(),message:"详细运行记录暂时没有对应的对话位置。"});return}wt.scrollIntoView({block:"center",behavior:"smooth"}),wt.classList.add("is-located"),window.setTimeout(()=>wt.classList.remove("is-located"),1400),Ge||Kt()},[Ge,Kt]),Je=dO({origin:t,refs:s,setSession:p,thread:be,composer:{setInput:te.setInput,setPendingImages:te.setPendingImages},browser:{setPreviews:ge.setPreviews,setActivePreviewPath:ge.setActivePreviewPath},setError:c,setNotice:$,onCompactionChange:m,setProcessOpen:ne,setAutoScroll:k}),tn=DO({origin:t,refs:s,session:h,thread:be,composer:{setInput:te.setInput,setPendingImages:te.setPendingImages,recordHistory:te.recordHistory},setError:c,setNotice:$,setAutoScroll:k,recoveryVersion:D,watchSessionTitle:Je.watchSessionTitle}),pe=jO({origin:t,refs:s,thread:be,setError:c}),Se=ZO({origin:t,session:h,setSession:p,refs:s,setError:c});S.useEffect(()=>{if(be.streaming){Je.refreshSessionList();return}ge.refreshTree();const ie=window.setTimeout(()=>{Je.refreshSessionList()},1200);return()=>window.clearTimeout(ie)},[be.streaming,be.turnPhase,be.deferredTurn?.revision,be.deferredTurn?.state,Je.refreshSessionList,ge.refreshTree]),S.useEffect(()=>{Se.runtimeContextOpen&&N.active!=="runtime-context"?R(ie=>Xs(ie,"runtime-context")):!Se.runtimeContextOpen&&N.active==="runtime-context"&&R(ie=>ta(ie))},[Se.runtimeContextOpen,N.active]),S.useEffect(()=>{N.active!=="runtime-context"&&Se.runtimeContextOpen&&Se.setRuntimeContextOpen(!1)},[N.active]),S.useEffect(()=>{if(!q&&!ae)return;const ie=we=>{if(we.target instanceof Node){if(q){const Ue=document.getElementById("oc-process-panel"),wt=ee.current;!Ue?.contains(we.target)&&!wt?.contains(we.target)&&ne(!1)}if(ae){const Ue=document.getElementById("oc-runtime-context-panel"),wt=K.current;!Ue?.contains(we.target)&&!wt?.contains(we.target)&&(Se.setRuntimeContextOpen(!1),R(Tt=>Tt.active==="runtime-context"?ta(Tt):Tt))}}};return document.addEventListener("mousedown",ie),()=>document.removeEventListener("mousedown",ie)},[q,ae,ne,Se.setRuntimeContextOpen]),S.useEffect(()=>{be.streaming&&N.active==="process"&&R(ta)},[be.streaming,N.active]);const{sendPrompt:Fe,handleStop:_e,cancelDeferredTurn:He,discardDeferredTurn:vt}=tn,jt=S.useRef(()=>{}),Lt=S.useCallback(async ie=>{const we=o2(ie);if(we&&we.action!=="unknown"&&we.action!=="pi-prompt"){if(s.streamingRef.current){$({id:Date.now(),message:"当前回合进行中,命令请在回合结束后执行"});return}jt.current(ie);return}await Fe(ie,te.pendingImages)},[Fe,te.pendingImages,s]);V.current=ie=>{Lt(ie)};const yt=S.useCallback(()=>{te.textareaRef.current?.focus()},[te.textareaRef]),ot=S.useCallback(()=>{R(ie=>ie.active==="sidebar-drawer"?ta(ie):ie)},[]),mt=S.useCallback(()=>{Se.setRuntimeContextOpen(!1),R(ie=>Xs(ie,"sidebar-drawer"))},[Se.setRuntimeContextOpen]),Un=S.useCallback(ie=>{Je.activateSession(ie),ot(),queueMicrotask(()=>{Y.current?.focus?.(),yt()})},[Je,ot,yt]),un=S.useCallback(ie=>{te.setInput(we=>`${we}${we&&!we.endsWith(" ")?" ":""}@${ie} `),ot(),queueMicrotask(()=>yt())},[te,ot,yt]),rt=S.useCallback(ie=>{ge.openPreview(ie),ot()},[ge,ot]),Ke=S.useCallback(()=>{const ie=Y.current;if(!ie)return;const we=ie.scrollHeight-ie.scrollTop-ie.clientHeight<80;k(we)},[]);S.useEffect(()=>{x&&B.current?.scrollIntoView({behavior:"smooth",block:"end"})},[be.messages,x,be.streaming]),S.useEffect(()=>{if(!I)return;const ie=window.setTimeout(()=>$(null),6500);return()=>window.clearTimeout(ie)},[I]);const gt=l?{id:I?.id??1,kind:"error",message:l}:I?{id:I.id,kind:"info",message:I.message}:null,ct=S.useCallback(ie=>{if(ie.action==="pi-prompt"||ie.command==="/name"||ie.command==="/compact"){te.setInput(`${ie.command} `),te.setShortcutOpen(!1),te.textareaRef.current?.focus();return}jt.current(ie.command)},[te]),Ft=S.useCallback(ie=>{const we=o2(ie),Ue=ie.trim(),wt=Ue.split(/\s+/,1)[0]?.toLowerCase()??"";if(te.setInput(""),te.setShortcutOpen(!1),!we)return;if(we.action==="focus:interview"){if(!h){$({id:Date.now(),message:"请先创建或打开一个会话,再开始 Interview"});return}pe.startInterview();return}const Tt=bI(we.action);if(Tt){e.onNavigateWorkspace?.(Tt,{});return}if(we.action==="compact"){const Sn=Ue.slice(wt.length).trim();Je.compactSession(Sn||void 0);return}if(we.action==="name"){const Sn=Ue.slice(wt.length).trim(),qn=h?.sessionId;if(!qn){c("当前没有可重命名的会话");return}const Qn=Je.sessionList.find(Pt=>Pt.sessionId===qn),Gn=Sn||window.prompt("会话名称",Qn?.title??Qn?.displayTitle??"")||"";Gn.trim()&&Je.updateSession(qn,{title:Gn.trim()});return}if(we.action==="session"){const Sn=h?.sessionId??"(none)",qn=Je.sessionList.find(Gn=>Gn.sessionId===Sn),Qn=qn?.title||qn?.displayTitle||"未命名对话";$({id:Date.now(),message:`当前会话:${Qn}(${Sn})`});return}if(we.action==="copy"){const qn=[...be.visibleMessages??[]].reverse().find(Qn=>Qn.role==="assistant");if(!qn?.text){c("没有可复制的助手消息");return}navigator.clipboard?.writeText(qn.text).then(()=>$({id:Date.now(),message:"已复制最后一条助手消息"}),()=>c("复制失败"));return}if(we.action==="unknown"){Fe(Ue,te.pendingImages);return}c(`未知 shortcut:${we.command}`)},[te.setInput,te.setShortcutOpen,te.pendingImages,pe.startInterview,e.onNavigateWorkspace,Je,h,be.visibleMessages,Fe]);jt.current=Ft;const Q=S.useCallback(ie=>{const we=s.isComposingRef.current||ie.nativeEvent.isComposing,Ue=Date.now()-s.compositionEndedAtRef.current<100;if(te.shortcutOpen&&te.filteredShortcuts.length>0&&!we&&!Ue){if(ie.key==="ArrowLeft"||ie.key==="ArrowRight"||ie.key==="ArrowUp"||ie.key==="ArrowDown"){ie.preventDefault();const wt=qO(P);let Tt=te.shortcutIndex;if(ie.key==="ArrowLeft"||ie.key==="ArrowRight")Tt=I2(te.shortcutIndex,ce,wt,ie.key==="ArrowLeft"?"left":"right");else{const Sn=re.current;let qn=null;if(Sn){const Qn=Array.from(Sn.querySelectorAll("[data-shortcut-index]")).map(Pt=>{const kn=Pt.getBoundingClientRect();return{globalIndex:Number(Pt.dataset.shortcutIndex??-1),top:kn.top,bottom:kn.bottom,left:kn.left,right:kn.right}}).filter(Pt=>Number.isFinite(Pt.globalIndex)&&Pt.globalIndex>=0),Gn=Qn.find(Pt=>Pt.globalIndex===te.shortcutIndex)??null;Gn&&(qn=HO(Gn,Qn,ie.key==="ArrowUp"?"up":"down"))}Tt=qn??I2(te.shortcutIndex,ce,wt,ie.key==="ArrowUp"?"up":"down")}Tt!==te.shortcutIndex&&(ue.current=!0,te.setShortcutIndex(Tt));return}if(ie.key==="Escape"){ie.preventDefault(),te.setShortcutOpen(!1);return}if(ie.key==="Enter"||ie.key==="Tab"){ie.preventDefault();const wt=te.filteredShortcuts[te.shortcutIndex]??te.filteredShortcuts[0];ct(wt);return}}if(ie.key==="Enter"&&!ie.shiftKey&&(we||Ue)){Ue&&ie.preventDefault();return}if((ie.key==="ArrowUp"||ie.key==="ArrowDown")&&!we&&!Ue&&te.fileOptions.length===0&&te.navigateHistory(ie.key==="ArrowUp"?"up":"down")){ie.preventDefault();return}if(ie.key==="Enter"&&!ie.shiftKey){ie.preventDefault(),Lt(te.input);return}},[te.input,te.shortcutOpen,te.filteredShortcuts,te.shortcutIndex,te.setShortcutIndex,te.setShortcutOpen,te.fileOptions,te.navigateHistory,s,Lt,ct,P,ce,re,ue]),ye=be.visibleMessages.length>0||be.operationCards.length>0||be.humanGateCards.length>0||be.artifactCards.length>0||!!be.interview,Le=e.readiness==="setup-required"?"⚠ Pi 未就绪(setup-required):Chat 需要先完成 Pi 认证 / 模型配置。":e.readiness==="degraded"?"⚠ Pi 降级(degraded):可继续对话,但部分能力不可用。":null,Ze=u.jsx(nS,{origin:t,open:b,layoutMode:P,drawerOpen:U.sidebarDrawerOpen,activeSessionId:h?.sessionId,activeSessionStreaming:be.streaming,activeSessionTurnPhase:be.turnPhase,sessions:Je.sessionList,tree:ge.tree,expanded:ge.expandedDirs,treeError:ge.treeError,onToggleOpen:()=>y(ie=>!ie),onOpenDrawer:mt,onCloseDrawer:ot,onCreate:()=>{Je.createSession()},creatingSession:Je.creatingSession,onActivate:ie=>{U.sidebarDrawerOpen?Un(ie):Je.activateSession(ie)},onRename:(ie,we)=>{Je.updateSession(ie,{title:we})},onSetState:(ie,we)=>{Je.updateSession(ie,{state:we})},onDelete:ie=>Je.deleteSession(ie),onRefreshTree:ge.refreshTree,onToggleDir:ge.toggleDir,onInsert:ie=>{U.sidebarDrawerOpen?un(ie):te.setInput(we=>`${we}${we&&!we.endsWith(" ")?" ":""}@${ie} `)},onPreview:ie=>{U.sidebarDrawerOpen?rt(ie):ge.openPreview(ie)},drawerTriggerRef:H}),ht=["oc-workspace",q&&!A?"has-process":"",A?"has-process-overlay":""].filter(Boolean).join(" "),Et=ie=>u.jsx("div",{className:"oc-messages is-empty",ref:F,"data-landing-density":Te.landingDensity,children:u.jsx($6,{mode:ie,readiness:e.readiness,density:Te.landingDensity,onSuggest:async we=>{Je.creatingSession||(ie==="no-session"?await Je.createSession()&&await Lt(we):await Lt(we))},disabled:Je.creatingSession,onCreateSession:ie==="no-session"?()=>{Je.createSession()}:void 0})});return u.jsxs("div",{className:"oc-shell",children:[a?null:u.jsxs("div",{className:"oc-banner",children:[u.jsxs("span",{className:"oc-banner-title",children:[u.jsx("span",{className:"oc-banner-dot","aria-hidden":"true"}),"对话"]}),u.jsxs("span",{className:"oc-banner-body",children:["用自然语言编排 loop-agent / agent-worker 的",u.jsx("strong",{children:"全部能力"}),"。这是 ",u.jsx("strong",{children:"Operator"})," 面:默认具备完整 Pi 工具(read/write/edit/bash/grep/find/ls)与 safe-* 探查、以及受策略约束的 operator action(ADR 0011)。",u.jsx("strong",{children:"软约束"}),":大改与高风险变更优先走受治 DAG 的 implement-pi / repair-pi 与 Human Gate,而非把 Chat 当作第二套 DAG kernel。"]})]}),Le&&u.jsx("div",{className:"oc-alert oc-alert-warning",children:Le}),u.jsx(iO,{toast:gt,onDismiss:()=>{c(null),$(null)}}),h?u.jsxs("div",{className:ht,ref:G,"data-layout-mode":P,children:[Ze,u.jsxs("div",{ref:j,className:`oc-main${ye?"":" is-landing"}`,children:[!Ge&&(P==="narrow"||qe>0)?u.jsxs("div",{className:"oc-main-topbar",children:[P==="narrow"?u.jsx("button",{type:"button",className:"oc-main-topbar-btn",ref:H,"aria-label":"打开会话与仓库","aria-expanded":U.sidebarDrawerOpen,onClick:()=>U.sidebarDrawerOpen?ot():mt(),children:"会话与仓库"}):null,qe>0?u.jsxs("button",{type:"button",className:"oc-main-topbar-btn oc-activity-trigger",ref:X,"aria-controls":"oc-activity-rail","aria-expanded":he,onClick:()=>he?Kt():Bt(),children:["运行活动 ",u.jsx("span",{children:Ve})]}):null]}):null,u.jsx(s2,{previews:ge.previews,activePath:ge.activePreviewPath,loading:ge.previewLoading,onActivate:ge.setActivePreviewPath,onClose:ge.closePreview}),ye?u.jsxs("div",{className:"oc-thread-anchor-wrap",children:[u.jsx(IM,{scrollContainerRef:Y,turnGroups:be.turnGroups,measureKey:be.visibleMessages.length}),u.jsx(CM,{scrollContainerRef:Y,messagesEndRef:B,onScroll:Ke,hasThread:ye,readiness:e.readiness,streaming:be.streaming,streamingAssistantId:be.streamingAssistantId,messagesCount:be.messages.length,visibleCount:be.visibleMessages.length,onLoadMore:()=>be.setHistoryLimit(ie=>ie+50),turnGroups:be.turnGroups,interview:be.interview,interviewAnswer:pe.interviewAnswer,onInterviewAnswerChange:pe.setInterviewAnswer,onAnswerInterview:ie=>{pe.answerInterview(ie)},onConfirmTaskKind:()=>{pe.confirmTaskKind()},onActivateActivity:Bt,canActivateActivity:Rt,onSuggest:ie=>{Lt(ie)}})]}):Et("empty-session"),u.jsx(PM,{composer:te,streaming:be.streaming,turnPhase:be.turnPhase,deferredTurn:be.deferredTurn,hasThread:ye,layoutMode:P,paletteModel:ce,shortcutPaletteRef:re,paletteKeyboardNavRef:ue,onSend:ie=>{Lt(ie)},onStop:_e,onCancelDeferred:He,onDiscardDeferred:()=>{vt()},onSendDeferredNow:()=>{_e()},onKeyDown:Q,onRunShortcut:Ft,models:Se.models,activeModel:Se.activeModel,activeModelRef:Se.activeModelRef,activeModelListed:Se.activeModelListed,activeThinkingLevel:Se.activeThinkingLevel,thinkingLevels:Se.thinkingLevels,onSwitchRuntime:ie=>{Se.switchRuntime(ie)},usage:be.usage,unread:be.unread,onCompact:()=>{Je.compactSession()},compacting:f,processSummary:be.streaming?null:be.processSummary,processOpen:q,onToggleProcess:()=>{R(ie=>ie.active==="process"?ta(ie):Xs(ie,"process")),q||Se.setRuntimeContextOpen(!1)},processTriggerRef:ee,runtimeContext:Se.runtimeContext,runtimeContextOpen:ae,onToggleRuntimeContext:()=>{ae?(Se.setRuntimeContextOpen(!1),R(ie=>ie.active==="runtime-context"?ta(ie):ie)):(Se.setRuntimeContextOpen(!0),R(ie=>Xs(ie,"runtime-context")))},runtimeContextTriggerRef:K})]}),qe>0&&!Ge&&he?u.jsx("button",{type:"button",className:"oc-overlay-backdrop is-activity","aria-label":"关闭运行活动遮罩",onClick:Kt}):null,nt.snapshot?u.jsx(QI,{origin:t,sessionId:nt.snapshot.sessionId,presentation:ut.presentation,sidecarRect:ut.sidecarRect,phase:nt.phase,open:he,focusRef:C,triggerRef:X,operationCards:nt.snapshot.operationCards,humanGateCards:nt.snapshot.humanGateCards,artifactCards:nt.snapshot.artifactCards,onClose:Kt,onLocateConversation:hn,onNavigateWorkspace:e.onNavigateWorkspace}):null,ae&&Se.runtimeContext?u.jsx(VM,{panelOnly:!0,open:ae,onToggle:()=>{},onClose:()=>{Se.setRuntimeContextOpen(!1),R(ie=>ie.active==="runtime-context"?ta(ie):ie)},context:Se.runtimeContext,triggerRef:K}):null,q&&u.jsx($M,{toolCalls:be.toolCalls,overlay:A,onClose:()=>ne(!1),triggerRef:ee})]}):u.jsxs("div",{className:ht,ref:G,"data-layout-mode":P,children:[Ze,u.jsxs("div",{className:"oc-main is-landing",children:[P==="narrow"?u.jsx("div",{className:"oc-main-topbar",children:u.jsx("button",{type:"button",className:"oc-main-topbar-btn",ref:H,"aria-label":"打开会话与仓库","aria-expanded":U.sidebarDrawerOpen,onClick:()=>U.sidebarDrawerOpen?ot():mt(),children:"会话与仓库"})}):null,u.jsx(s2,{previews:ge.previews,activePath:ge.activePreviewPath,loading:ge.previewLoading,onActivate:ge.setActivePreviewPath,onClose:ge.closePreview}),Et("no-session")]})]})]})}const oD={};function cD(){const[e,t]=S.useState(()=>q6({env:oD?.VITE_OPERATOR_CHAT_DEFAULT_LANDING,storage:window.localStorage,location:window.location})),[n,a]=S.useState(null),[s,l]=S.useState("setup-required"),[c,f]=S.useState(null),[m,h]=S.useState(null),[p,b]=S.useState(!1),[y,x]=S.useState(!1),[k,N]=S.useState(null),[R,C]=S.useState(null),[_,I]=S.useState(null),[$,D]=S.useState(null),[M,B]=S.useState({command:"idle",dag:"not-started",verification:"not-run",promote:"n/a (MVP)"}),[Y,G]=S.useState("setup"),j=S.useCallback(X=>{G(V=>x8(typeof X=="function"?X(V):X))},[]),F=s==="setup-required",H=s==="degraded",ee=S.useCallback(X=>{X!==e&&(N(null),I(null),C(null)),t(X)},[e]),K=S.useCallback(async()=>{try{const V=await(await fetch("/api/health")).json();a(V);const re=V.piReadiness??"setup-required";l(re),h(null),j(re==="ready"||re==="degraded"?ue=>ue==="setup"?"import-prd":ue:"setup")}catch(X){h(X instanceof Error?X.message:String(X))}try{const V=await(await fetch("/api/operator/v1/readiness")).json();f(V),V.state&&l(V.state)}catch{}},[j]);return{nav:e,setNav:t,selectNav:ee,health:n,readiness:s,setReadiness:l,readinessReport:c,healthError:m,loadHealth:K,busy:p,setBusy:b,observeBusy:y,setObserveBusy:x,opError:k,setOpError:N,opMessage:R,setOpMessage:C,opErrorCode:_,setOpErrorCode:I,lastOpState:$,setLastOpState:D,layers:M,setLayers:B,step:Y,setStep:j,setupBlocked:F,degraded:H}}const uD={bootstrapFromPrd:"正在导入 PRD 并创建任务:归档文档 → 确定性解析 → 语义结构化(MED→HIGH→LOW,每档最多 300 秒,请勿关闭页面)",importPrd:"正在导入 PRD:归档文档 → 确定性解析 → 语义结构化(MED→HIGH→LOW,每档最多 300 秒,请勿关闭页面)",interviewStart:"正在启动需求访谈…",interviewTurn:"正在提交访谈回答…",interviewSkip:"正在跳过访谈并生成评估…",contractValidate:"正在校验契约草稿…",contractDiff:"正在计算契约差异…",contractApply:"正在应用契约(写入需求与执行约束)…",spineCheck:"正在运行 Spine 审计…",dagGenerate:"正在生成 DAG…",standaloneTaskRerun:"正在带反馈重新执行任务:服务端校验资格后生成并启动新 DAG…",consoleUpdateAndInit:"正在检查活动运行、所选 npm 渠道与安全初始化;完成后 Console 将自动刷新…",workerTaskRetry:"正在重新排队 Worker Task…"};function dD(e){const{shell:t,applyInterviewPayload:n}=e,{setBusy:a,setOpError:s,setOpErrorCode:l,setOpMessage:c,setReadiness:f,setStep:m,setNav:h,setLastOpState:p,setLayers:b,step:y,nav:x}=t,[k,N]=S.useState(null),[R,C]=S.useState([]),[_,I]=S.useState(!0),$=S.useRef(null),[D,M]=S.useState(null),[B,Y]=S.useState(null),G=S.useCallback(async(K,X={},V)=>{a(!0),s(null),l(null),c(uD[K]??null);try{const{status:re,body:ue}=await ko(K,X,V?.clientRequestId);if(re===412||ue.error?.code==="PI_SETUP_REQUIRED")return s(Ua(ue.error?.message??"Pi 未就绪或已降级:该操作暂不可用")),l(ue.error?.code??"PI_SETUP_REQUIRED"),f("setup-required"),m("setup"),h("models"),ue;if(re>=400||ue.ok===!1)return s(Ua(ue.error?.message??ue.message??`操作失败(HTTP ${re})`)),l(ue.error?.code??String(re)),p(ue.state??`failed:${re}`),b(U=>({...U,command:ue.error?.message??`failed:${ue.error?.code??re}`})),ue;if(ue.operationId){const U=window.localStorage.getItem(Yr)?.trim();if(U&&fetch(`/api/operator/v1/chat/sessions/${encodeURIComponent(U)}/operation-links`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json",[Bh]:qh()},body:JSON.stringify({operationId:ue.operationId})}).then(q=>{q.ok||console.warn("Operator Chat operation link failed",q.status)}).catch(q=>console.warn("Operator Chat operation link failed",q)),N(ue.operationId),p(ue.state??"accepted"),b(q=>({...q,command:ue.state??"accepted",dag:K==="runDag"?"running":q.dag})),R8.has(K)){I(!0),c(`操作已接受,后台运行中:${ue.operationId}(请看事件流;可同时打开 Observe)`);const q=ue.operationId;yv(q,30*6e4).then(A=>{if(A){if(p(A.state??null),A.state==="failed"||A.state==="needs-reconcile"||A.state==="timed-out"){s(Ua(A.errorMessage??A.stderrPreview??`操作失败:${A.state}`)),l(A.errorCode??A.state??null),b(ae=>({...ae,command:`failed:${A.errorCode??A.state}`}));return}A.state==="succeeded"&&(c(`${K} 已成功`),b(ae=>({...ae,command:"succeeded"}))),K==="consoleUpdateAndInit"&&A.state==="restarting"&&(c("新 Console 正在接棒,页面即将刷新…"),setTimeout(()=>window.location.reload(),800))}})}else{c(`操作已接受:${ue.operationId}`);const q=await yv(ue.operationId);if(q){if(p(q.state??null),q.state==="failed"||q.state==="needs-reconcile"||q.state==="timed-out")return s(Ua(q.errorMessage??q.stderrPreview??`操作失败:${q.state}`)),l(q.errorCode??q.state??null),b(ne=>({...ne,command:`failed:${q.errorCode??q.state}`})),{ok:!1,operationId:ue.operationId,state:q.state,error:{code:q.errorCode??q.state??"INTERNAL_ERROR",message:q.errorMessage??q.stderrPreview??`操作失败:${q.state}`}};c(q.errorMessage?`${K}:${q.errorMessage}`:`${K} 已成功`),b(ne=>({...ne,command:q.state??"succeeded"}));const A=q.result??{},ae={ok:!0,operationId:ue.operationId,state:q.state??"succeeded",result:A};(K==="interviewStart"||K==="interviewTurn"||K==="interviewSkip")&&n(A);const he=A.confirmation;return he?.confirmationId&&(M(he.confirmationId),Y(A)),V?.advanceTo&&m(V.advanceTo),ae}}}else c(`${K} 已完成`),p(ue.state??"succeeded"),b(U=>({...U,command:"succeeded",verification:K==="contractValidate"||K==="spineCheck"?"ran":U.verification}));const Te=ue.result??{};(K==="interviewStart"||K==="interviewTurn"||K==="interviewSkip")&&n(Te);const P=Te.confirmation;return P?.confirmationId&&(M(P.confirmationId),Y(Te)),V?.advanceTo&&m(V.advanceTo),ue}catch(re){s(re instanceof Error?re.message:String(re));return}finally{a(!1)}},[n,a,s,l,c,f,m,h,p,b]),j=S.useCallback(K=>{if(!K)return"无响应";if(K.error?.message)return K.error.message;if(K.message)return K.message;const X=K.result;if(X&&typeof X=="object")try{return JSON.stringify(X).slice(0,1200)}catch{return"已返回结果"}return K.ok===!1?"失败":"成功"},[]),F=S.useCallback(K=>{if(!K||K.ok===!1||K.error)return!1;const X=K.result;if(!X)return!0;if(typeof X.valid=="boolean")return X.valid;const V=X.result;return V&&typeof V.valid=="boolean"?V.valid:!0},[]),H=S.useCallback(async K=>{$.current?.abort();const X=new AbortController;$.current=X,C(V=>[...V,`开始跟随事件流 ${K}`]);try{const V=await fetch(`/api/operator/v1/operations/${encodeURIComponent(K)}/events`,{credentials:"same-origin",signal:X.signal});if(!V.ok||!V.body){C(P=>[...P,`事件流 HTTP ${V.status}`]);return}const re=V.body.getReader(),ue=new TextDecoder;let Te="";for(;_;){const{done:P,value:U}=await re.read();if(P)break;Te+=ue.decode(U,{stream:!0});const q=Te.split(`
|
|
400
|
-
|
|
401
|
-
`);Te=q.pop()??"";for(const A of q){const ae=A.split(`
|
|
402
|
-
`).find(ne=>ne.startsWith("data:"));if(!ae)continue;const he=ae.slice(5).trim();C(ne=>[...ne.slice(-80),he.slice(0,240)])}}}catch(V){V.name!=="AbortError"&&C(re=>[...re,`事件流错误:${V instanceof Error?V.message:String(V)}`])}},[_]);S.useEffect(()=>(k&&_&&(y==="run"||x==="recovery")&&H(k),()=>$.current?.abort()),[k,_,y,x,H]);const ee=S.useCallback(()=>{I(!1),$.current?.abort(),c("已停止跟随日志(未取消子进程)")},[c]);return{runAction:G,summarizeEnvelope:j,isActionSuccess:F,operationId:k,setOperationId:N,sseLog:R,followSse:_,setFollowSse:I,stopFollowSse:ee,confirmationId:D,setConfirmationId:M,confirmationDetails:B,setConfirmationDetails:Y}}const jh=8*1024*1024,fD=10*1024*1024,Uu=8,mD=".md,.markdown,.txt,text/markdown,text/plain",hD=[".md",".markdown",".txt"],Ap=/\.[^.]+$/;function pD(e){const t=Ap.exec(e.trim());return t?t[0].toLowerCase():""}function gD(e){const t=pD(e);return hD.includes(t)}function Lh(e){if(!Number.isFinite(e)||e<0)return"0 B";if(e<1024)return`${e} B`;if(e<1024*1024){const n=e/1024;return`${n>=10?n.toFixed(0):n.toFixed(1)} KiB`}const t=e/(1024*1024);return`${t>=10?t.toFixed(1):t.toFixed(2)} MiB`}function Ba(e,t){return{ok:!1,code:e,message:t}}function bD(e,t){const n=e?Array.from(e):[],a=t?.maxFiles??Uu,s=t?.existingCount??0;return n.length===0?Ba("file-count","请选择至少一个 .md / .markdown / .txt 文件"):s+n.length>a?Ba("file-count",`最多支持 ${a} 个文件(当前已有 ${s} 个)`):null}async function vD(e){const t=e.name?.trim()||"untitled.md";if(!gD(t))return Ba("unsupported-extension","仅支持 .md、.markdown、.txt 文件");if(e.size>jh)return Ba("file-too-large",`文件不能超过 ${Lh(jh)}`);let n;try{n=await e.arrayBuffer()}catch{return Ba("read-failed","文件读取失败,请重试或直接粘贴")}let a;try{a=new TextDecoder("utf-8",{fatal:!0}).decode(n)}catch{return Ba("invalid-utf8","文件不是有效 UTF-8,请另存为 UTF-8")}if(a.trim().length===0)return Ba("empty-content","文件内容不能为空或只有空白");const s=new TextEncoder().encode(a).byteLength;return{ok:!0,text:a,fileName:t,sourceBytes:e.size,textBytes:s}}async function yD(e){if(e.length===0)return Ba("file-count","请选择至少一个 .md / .markdown / .txt 文件");if(e.length>Uu)return Ba("file-count",`最多支持 ${Uu} 个文件`);const t=[];for(const n of e){const a=await vD(n);if(!a.ok)return a;t.push({fileName:a.fileName,text:a.text,sourceBytes:a.sourceBytes,textBytes:a.textBytes})}return{ok:!0,documents:t}}function xD(e,t){const n=e.split(/\r?\n/);for(const s of n){const l=/^(#{1,6})\s+(.+)$/.exec(s.trim());if(l?.[2])return l[2].trim()}for(const s of n){const l=s.trim();if(l&&!/^---+$/.test(l)&&!/^```/.test(l)&&!/^<!--/.test(l))return l.replace(/^>\s+/,"").slice(0,120)}return t.replace(Ap,"").trim()||"需求"}function wD(e){return e.trim().toLowerCase().replace(/[^a-z0-9._-]+/g,"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,"-")||"requirement"}function SD(e,t){const n=e.replace(Ap,"").trim(),a=wD(n);return a==="requirement"&&/[^\u0000-\u007f]/.test(n)?`part-${t+1}`:a==="requirement"?n?`part-${t+1}`:`part-${t+1}`:a}function kD(e){const t=new Set;return e.map((n,a)=>{let s=SD(n.fileName,a);if(t.has(s)){let l=2;for(;t.has(`${s}-${l}`);)l+=1;s=`${s}-${l}`}return t.add(s),{name:s,content:n.text,fileName:n.fileName}})}function ED(e,t){if(e.length===0)return"";if(e.length===1)return e[0].text;const n=Math.min(Math.max(0,t?.primaryIndex??0),e.length-1),a=e[n],s=xD(a.text,a.fileName),c=[`<!-- composed-from: ${e.map(f=>f.fileName).join(", ")} -->`,"",`# ${s}`,""];for(const f of e)c.push(`## 来源:${f.fileName}`,"",f.text.trim(),"");return`${c.join(`
|
|
403
|
-
`).trimEnd()}
|
|
404
|
-
`}function TD(e,t,n){const a={action:e,actionParams:t};return new TextEncoder().encode(JSON.stringify(a)).byteLength<=fD}function ND(){return"最终内容导致请求体超过服务端限制,请缩小文档或减少文件数量"}function CD(){const[e,t]=S.useState(""),[n,a]=S.useState([]),[s,l]=S.useState(0),[c,f]=S.useState(!1),[m,h]=S.useState(null),[p,b]=S.useState(!1),[y,x]=S.useState(!1),k=S.useRef(0),N=S.useRef(0),R=S.useCallback((F,H)=>{const ee=F.length===0?0:Math.min(Math.max(0,H),F.length-1);l(ee),t(ED(F,{primaryIndex:ee})),f(!1)},[]),C=S.useCallback(async F=>{const H=bD(F,{existingCount:n.length});if(H){h(H.message);return}const ee=Array.from(F),K=++N.current;b(!0),h(null);try{const X=await yD(ee);if(K!==N.current)return;if(!X.ok){h(X.message);return}const V=[...n,...X.documents],re=n.length===0?0:s;a(V),n.length===0||!c?(R(V,re),h(null)):h("已追加文件,未改正文(正文已手动编辑);可点「按文件重新合成」覆盖。")}catch{if(K!==N.current)return;h("文件读取失败,请重试或直接粘贴")}finally{K===N.current&&b(!1)}},[R,c,n,s]),_=S.useCallback(F=>{t(F),n.length>0&&f(!0)},[n.length]),I=S.useCallback(F=>{l(F),c||R(n,F)},[R,c,n]),$=S.useCallback((F,H)=>{const ee=F+H,K=[...n],X=K[ee];K[ee]=K[F],K[F]=X;const V=s===F?ee:s===ee?F:s;a(K),l(V),c||R(K,V)},[R,c,n,s]),D=S.useCallback(F=>{const H=n.filter((K,X)=>X!==F),ee=H.length===0?0:Math.min(s>=F?Math.max(0,s-1):s,Math.max(0,H.length-1));a(H),l(ee),H.length===0?f(!1):c||R(H,ee)},[R,c,n,s]),M=S.useCallback(()=>{a([]),l(0),f(!1),h(null)},[]),B=S.useCallback(()=>{c&&!window.confirm("将用当前文件列表重新合成正文,覆盖你在编辑区的修改。继续?")||(R(n,s),h(null))},[R,c,n,s]),Y=S.useCallback((F,H)=>{F.preventDefault(),F.stopPropagation(),!H&&(k.current+=1,x(!0))},[]),G=S.useCallback(F=>{F.preventDefault(),F.stopPropagation(),k.current=Math.max(0,k.current-1),k.current===0&&x(!1)},[]),j=S.useCallback((F,H)=>{F.preventDefault(),F.stopPropagation(),k.current=0,x(!1),!H&&C(F.dataTransfer.files)},[C]);return{prdText:e,setPrdText:t,onPrdTextChange:_,prdDocuments:n,prdPrimaryIndex:s,prdComposedDirty:c,prdFileError:m,setPrdFileError:h,prdFileReading:p,prdDragOver:y,loadPrdFromFiles:C,applyPrdComposition:R,setPrimaryDocument:I,moveDocument:$,removeDocument:D,clearDocuments:M,recomposeDocuments:B,onDragEnter:Y,onDragLeave:G,onDrop:j}}const RD={report:{id:"report",label:"查看报告",action:"dagReport",lane:"dag",guide:"看失败分类与建议动作(交接报告摘要)",commandHint:"loop-agent dag report --run-id <run-id> --json"},doctor:{id:"doctor",label:"Doctor 诊断",action:"doctor",lane:"dag",guide:"只读诊断:检查 Console / Pi / 仓库就绪,不是重跑前置",commandHint:"agent-worker console doctor --repo ."},decision:{id:"decision",label:"人工决策",lane:"dag",guide:"暂停等人时:先看 doctor 输出再做决策(经 CLI)",commandHint:"loop-agent dag doctor --run-id <run-id> --markdown"},resume:{id:"resume",label:"恢复运行",lane:"dag",guide:"仅当运行可安全 resume 时使用(经 CLI)",commandHint:"loop-agent task advance <task-id> --json"},reconcile:{id:"reconcile",label:"对账 / reconcile",requiresReason:!0,action:"dagReconcileRun",lane:"dag",guide:"Orphan/中断时先对账归档(默认 supersede);runner 仍存活时勿盲 supersede",commandHint:"loop-agent dag reconcile-run --run-id <run-id> --action supersede --reason <structured-reason>"},regenerate:{id:"regenerate",label:"重新生成契约/计划",lane:"dag",guide:"契约/计划过期时:回任务页或经 CLI 重新 task advance(本页仅提示)",commandHint:"loop-agent task advance <task-id> --json"},observeLink:{id:"observeLink",label:"全屏观测",action:"observeLink",lane:"dag",guide:"打开完整 Inspect 画布;顶栏可返回操作台",commandHint:"agent-worker console --repo . --port 8790"},dagRerun:{id:"dagRerun",label:"从失败节点恢复",requiresReason:!0,action:"dagRerun",lane:"dag",guide:"Provider、网络、限流或超时等非代码问题的首选:先评估安全子图,合格后创建 continuation run 从有效节点恢复(无需 Human Gate)。Worker 持有的 run、workspace/controller 漂移或含 unsafe shell 时不要强跑子图",commandHint:"loop-agent dag rerun --run-id <run-id> --from-node <node-id> --plan"},standaloneTaskRerun:{id:"standaloneTaskRerun",label:"带反馈重新执行任务",requiresReason:!0,action:"standaloneTaskRerun",lane:"dag",guide:"独立 DAG run 无法安全从节点恢复时,重新生成完整 DAG,并带入上一轮仍未解决的 verify/review 反馈;没有可继承反馈时会明确说明(无需 Human Gate)。Worker 持有的 run 请用下方「重新排队 Worker Task」",commandHint:"loop-agent dag rerun-task --run-id <run-id> --reason <text> --json"},workerTaskRetry:{id:"workerTaskRetry",label:"重新排队 Worker Task",requiresReason:!0,action:"workerTaskRetry",lane:"worker",guide:"仅 Worker 队列任务失败时直调执行,服务端校验 Failed 状态,无需 Human Gate;不要与 DAG 完整重跑混用",commandHint:"agent-worker task retry <task-id> --feature-id <feature-id> --repo . --reason <reason>"},interrupt:{id:"interrupt",label:"中止运行",requiresReason:!0,action:"dagRequestInterrupt",lane:"dag",guide:"仅本机 Console 持有的正在运行 DAG:经 Human Gate 登记协作中止,等待当前节点安全收敛。不会立即强杀进程",commandHint:"loop-agent dag request-interrupt --run-id <run-id> --reason-code operator-request --reason <structured-reason>"}},O2={"validation-failed":["report","doctor","regenerate"],"contract-drift":["report","doctor","decision","reconcile","regenerate"],"runtime-mismatch":["report","doctor","reconcile","regenerate"],"pause-on-human":["decision","resume","report","doctor"],"verification-failed":["report","doctor","dagRerun","standaloneTaskRerun","resume","regenerate"],"orphan-unknown":["report","doctor"],"terminal-failed":["report","doctor","dagRerun","standaloneTaskRerun","workerTaskRetry","regenerate"],"terminal-succeeded":["report","observeLink"],"needs-reconcile":["report","doctor","reconcile","regenerate"],"running-active":["interrupt","report","doctor","observeLink"]},AD=new Set(["succeeded","failed","timed-out"]);function _D(e){const t=(e.interruptStatus??"").trim();if(!t||t==="none")return null;if(t==="requested")return"请求已登记,等待 runner 确认。";if(t==="acknowledged")return"等待当前节点安全收敛(不会立即强杀)。";if(t==="needs-reconcile")return"需要对账:中止请求未能确认。";if(t==="settled"){const n=e.dagStatus==="failed"||e.dagStatus==="partial_failed",a=(e.failureCategory??"").includes("controller-interrupted"),s=AD.has(e.targetOperationState??"");return n&&a&&s?"已中止。":"正在对账,尚未确认退出。"}return null}function ID(e){return(O2[e]??O2["orphan-unknown"]).map(n=>RD[n])}function MD(e){const t=[],n=[];for(const a of e)a.lane==="worker"?n.push(a):t.push(a);return{dag:t,worker:n}}function OD(e){return typeof e.action=="string"&&e.action.trim().length>0}function Q6(e){return ID(e).filter(OD)}function DD(e){const t=new Set(Q6(e).map(a=>a.id)),n=(...a)=>{for(const s of a)if(t.has(s))return s;return null};switch(e){case"terminal-failed":case"verification-failed":return n("dagRerun","standaloneTaskRerun","doctor","report");case"pause-on-human":return n("doctor","report");case"needs-reconcile":return n("doctor","reconcile","report");case"running-active":return n("interrupt","doctor","report");case"runtime-mismatch":case"contract-drift":return n("doctor","report");case"validation-failed":return n("doctor","report");case"terminal-succeeded":return n("observeLink","report");default:return n("doctor","report")}}function jD(e){if(e.needsReconcile)return"needs-reconcile";const t=(e.errorCode??"").toLowerCase(),n=(e.operationState??"").toLowerCase(),a=(e.dagStatus??"").toLowerCase(),s=(e.failureCategory??"").toLowerCase();return t.includes("validation")||t.includes("invalid")||n.includes("validation")?"validation-failed":t.includes("contract")||t.includes("drift")||t.includes("binding")?"contract-drift":t.includes("runtime")||t.includes("mismatch")||t.includes("fingerprint")?"runtime-mismatch":t.includes("human")||n.includes("paused")||a.includes("paused")||n.includes("awaiting")?"pause-on-human":t.includes("verif")||n.includes("verif")?"verification-failed":s==="controller-interrupted"||t.includes("controller-interrupted")||t.includes("interrupted")||a==="interrupted"||a==="orphaned"||n.includes("controller-interrupted")||n.includes("interrupted")?"needs-reconcile":a==="running-suspected-stall"||a==="running-quiet"||a==="suspected-stall"||a.includes("suspected-stall")||n.includes("suspected-stall")?"orphan-unknown":a==="running"||a==="active"?"running-active":n==="succeeded"||n==="completed"||n==="finished"||a==="succeeded"||a==="completed"||a==="finished"?"terminal-succeeded":n==="failed"||n.includes("fail")||a==="failed"||a==="partial_failed"||t.includes("fail")?"terminal-failed":t.includes("reconcil")||n.includes("reconcil")?"needs-reconcile":"orphan-unknown"}const _p=new Set(["failed","error","partial_failed"]),J6=new Set(["blocked","paused","awaiting_human"]);function u0(e){return(e??"").trim().toLowerCase()}function LD(e){return _p.has(u0(e))}function D2(e){const t=u0(e.status);return _p.has(t)||t.includes("fail")?0:e.lifecycle==="paused"||t==="paused"?1:e.lifecycle==="active"?2:3}function zD(e){return[...e].sort((t,n)=>{const a=D2(t)-D2(n);return a!==0?a:n.mtimeMs-t.mtimeMs})}function BD(e){return zD(e)[0]?.dagRunId}function j2(e){const t=u0(e.status);return _p.has(t)?0:J6.has(t)?1:2}function ex(e){return[...e].sort((t,n)=>{const a=j2(t)-j2(n);return a!==0?a:t.nodeId.localeCompare(n.nodeId)})}function UD(e){const t=ex(e);return t.find(a=>LD(a.status)||J6.has(u0(a.status)))?.nodeId??t[0]?.nodeId}function qD(e){const t=e.status?.trim()||e.lifecycle;return`${e.dagRunId.length>36?`${e.dagRunId.slice(0,18)}…${e.dagRunId.slice(-8)}`:e.dagRunId} · ${t}`}function HD(e){const t=e.status?.trim()||"unknown",n=e.label?.trim();return n&&n!==e.nodeId?`${e.nodeId} · ${t} · ${n}`:`${e.nodeId} · ${t}`}function FD(e){const n=[`operator-recovery: ${e.actionLabel?.trim()||"恢复"}`],a=e.dagRunId?.trim();if(a){const f=e.runStatus?.trim();n.push(f?`run=${a} (${f})`:`run=${a}`)}const s=e.fromNodeId?.trim();if(s){const f=e.nodeStatus?.trim();n.push(f?`from-node=${s} (${f})`:`from-node=${s}`)}const l=e.factClassLabel?.trim();l&&n.push(`fact=${l}`);const c=e.nodeError?.trim()||e.errorMessage?.trim()||(e.errorCode?.trim()?`code=${e.errorCode.trim()}`:"");return c&&n.push(`detail=${c.replace(/\s+/g," ").slice(0,280)}`),n.join(`
|
|
405
|
-
`).slice(0,500)}function tx(e){const t=e.trim();return t?t==="operator-recovery"||t.startsWith("operator-recovery:")||t.startsWith("recovery:"):!0}async function L2(e){const t=await e.runAction("prepareMutationGate",{action:e.action,actionParams:e.actionParams});if(!e.isActionSuccess(t))return;const n=t?.result??t,a=n.receiptId?n:n.result??n;if(!a.receiptId||!a.humanGateToken){e.setOpError("prepareMutationGate 未返回可消费的 Human Gate receipt");return}await e.runAction(e.action,{...e.actionParams,confirmationId:a.receiptId,humanGateToken:a.humanGateToken},{clientRequestId:e.clientRequestId})}function PD(e){const{shell:t,actions:n,taskId:a,dagRunId:s,fromNodeId:l,featureId:c,recoveryReason:f,recoveryReasonTouched:m,recoveryConfirm:h,recoveryPlanSummary:p,interruptReasonCode:b,setRecoveryConfirm:y,setRecoveryPlanSummary:x,setRecoveryReport:k,setRecoveryReason:N,setRecoveryReasonTouched:R,buildCurrentRecoveryReason:C,openFullCanvas:_}=e,{setOpError:I,setOpErrorCode:$,setOpMessage:D,setBusy:M}=t,{runAction:B,isActionSuccess:Y}=n,G=S.useCallback(async F=>{if(F.requiresReason||(y(null),x(null)),F.action==="doctor"){k(null),B("doctor",{});return}if(F.action==="dagReport"||F.id==="report"){const H=s.trim();if(H){y(null),x(null);const ee=await B("dagReport",{runId:H}),K=ee?.result??{},X=(K.raw?.runs??K.runs)?.[0];ee&&ee.ok!==!1&&!ee.error&&X&&(k({runId:X.runId??H,title:X.title,status:X.status,category:X.productLineFailureCategory,recommendation:X.recoveryRecommendation?.summary??X.recommendedFollowUp??void 0}),D(null));return}if(a.trim()){k(null),B("status",{taskId:a});return}I("查看报告需要先选择 DAG 运行 ID(或填写任务 ID)");return}if(F.action==="observeLink"){k(null),_();return}if(F.requiresReason){if(k(null),y(F),x(null),F.id!=="dagRerun"&&(I(null),$(null)),(!m||tx(f))&&(N(C(F.label)),R(!1)),F.id==="dagRerun"&&s.trim()&&l.trim()){M(!0);try{const{status:H,body:ee}=await ko("dagRerunPlan",{runId:s.trim(),fromNode:l.trim()}),K=ee.result??{};K&&typeof K=="object"&&("eligible"in K||K.planHash)&&x(K),H<400&&ee.ok!==!1&&K.eligible!==!1?D(null):K.eligible===!1?I(Ua(yf(K,ee.error?.message))):D(ee.error?.message??"无法预检重跑计划;确认后仍将尝试提交(CLI 可能尚未就绪)")}finally{M(!1)}}return}I(null),$(null),D(`${F.label}:请经 CLI — ${F.commandHint??""}`)},[C,s,l,_,f,m,B,M,I,$,D,y,x,k,N,R,a]),j=S.useCallback(async()=>{const F=h;if(!F)return;const H=f.trim();if(!H){I("恢复操作需要结构化原因");return}const ee=wu(`recovery-${F.id}`);if(y(null),F.id==="dagRerun"){const K=s.trim(),X=l.trim();if(!K||!X){I("从失败节点恢复需要 DAG 运行 ID 与起始节点 ID");return}let V=p?.planHash?.trim(),re=p?.eligible;if(!V||re===void 0){const ue=await B("dagRerunPlan",{runId:K,fromNode:X}),Te=ue?.result??{};if((Te.planHash||Te.eligible!==void 0)&&x(Te),V=Te.planHash?.trim()||V,re=Te.eligible,Te.eligible===!1){I(Ua(yf(Te,ue?.error?.message)));return}if(ue&&ue.ok===!1&&!V){I(ue.error?.message??"无法获取 planHash;请确认 loop-agent dag rerun --plan 可用");return}}if(re===!1){I(Ua(yf(p??{})));return}if(!V){I("无法获取 planHash;请确认 loop-agent dag rerun --plan 可用");return}await B("dagRerun",{runId:K,fromNode:X,planHash:V,reason:H},{clientRequestId:ee});return}if(F.id==="standaloneTaskRerun"){const K=s.trim();if(!K){I("带反馈重新执行任务需要 DAG 运行 ID");return}await B("standaloneTaskRerun",{runId:K,reason:H,...a.trim()?{taskId:a.trim()}:{}},{clientRequestId:ee});return}if(F.id==="workerTaskRetry"){const K=a.trim();if(!K){I("重新排队 Worker Task 需要任务 ID");return}await B("workerTaskRetry",{taskId:K,reason:H,...c.trim()?{featureId:c.trim()}:{}},{clientRequestId:ee});return}if(F.id==="interrupt"){const K=s.trim();if(!K){I("中止运行需要 DAG 运行 ID");return}if(H.trim().length<10||H.trim().length>500){I("中止原因去首尾空白后必须是 10–500 个字符,请手写说明,不要用占位句。");return}await L2({runAction:B,isActionSuccess:Y,setOpError:I,action:"dagRequestInterrupt",actionParams:{runId:K,reasonCode:b.trim()||"operator-request",reasonDetail:H},clientRequestId:ee});return}if(F.id==="reconcile"){const K=s.trim();if(!K){I("对账恢复需要 DAG 运行 ID");return}await L2({runAction:B,isActionSuccess:Y,setOpError:I,action:"dagReconcileRun",actionParams:{runId:K,reason:H,reconcileAction:"supersede"},clientRequestId:ee});return}D(`${F.label}:请经 CLI — ${F.commandHint??""}`)},[s,c,l,h,p?.planHash,f,b,B,Y,I,D,y,x,a]);return{handleRecoveryCta:G,submitRecoveryConfirm:j}}function $D(e){const{shell:t,actions:n,wizard:a}=e,{nav:s,opError:l,opErrorCode:c,lastOpState:f,setOpError:m,setObserveBusy:h}=t,{taskId:p}=a,[b,y]=S.useState(""),[x,k]=S.useState(""),[N,R]=S.useState(""),[C,_]=S.useState(""),[I,$]=S.useState(!1),[D,M]=S.useState(null),[B,Y]=S.useState(null),[G,j]=S.useState(!1),[F,H]=S.useState("operator-request"),[ee,K]=S.useState(null),[X,V]=S.useState([]),[re,ue]=S.useState([]),[Te,P]=S.useState(!1),[U,q]=S.useState(!1),[A,ae]=S.useState(null),[he,ne]=S.useState(null),[te,ce]=S.useState(null),[ge,Re]=S.useState(!1),[je,be]=S.useState(!1),[qe,Ve]=S.useState(null),[tt,nt]=S.useState("idle"),[Ut,Rt]=S.useState(null),[ut,Ge]=S.useState(null),[Bt,Kt]=S.useState(!1),hn=S.useCallback(()=>b.trim()?`/inspect/#/dag/${encodeURIComponent(b.trim())}?from=recovery`:"/inspect/#/",[b]),Je=S.useCallback(()=>{window.location.assign(hn())},[hn]),tn=S.useCallback(async()=>{if(b.trim())return b.trim();const rt=p.trim();if(!rt)return m("打开 DAG 检视需要任务 ID 或 DAG 运行 ID"),null;h(!0),m(null);try{const{status:Ke,body:gt}=await ko("observeLink",{taskId:rt}),ct=gt.result??{};if(Ke>=400||gt.ok===!1)return m(gt.error?.message??"无法解析 DAG 画布地址"),nt("unavailable"),Rt(gt.error?.message??null),null;const Ft=typeof ct.dagRunId=="string"?ct.dagRunId.trim():"";return Ft?(y(Ft),nt("match"),Rt(null),Ge(`/inspect/#/dag/${encodeURIComponent(Ft)}`),Ft):(m("尚未找到该任务的 DAG 运行,请稍后再打开检视"),nt("unavailable"),Rt(ct.message??"未解析到 DAG run"),null)}catch(Ke){return m(Ke instanceof Error?Ke.message:String(Ke)),null}finally{h(!1)}},[b,p,m,h]),pe=S.useCallback(async()=>{await tn()&&Kt(!0)},[tn]),Se=S.useCallback(async()=>{const rt=await tn();rt&&window.location.assign(`/inspect/#/dag/${encodeURIComponent(rt)}?from=recovery`)},[tn]),Fe=S.useCallback(async()=>{P(!0);try{const rt=p.trim(),Ke=new URLSearchParams;rt&&Ke.set("taskId",rt),Ke.set("limit","40");const gt=await fetch(`/api/operator/v1/recovery/candidates?${Ke.toString()}`,{credentials:"same-origin"});if(!gt.ok){V([]);return}const ct=await gt.json();V(Array.isArray(ct.runs)?ct.runs:[])}catch{V([])}finally{P(!1)}},[p]),_e=S.useCallback(async rt=>{const Ke=rt.trim();if(!Ke){ue([]),ae(null),ne(null),ce(null);return}q(!0);try{const gt=await fetch(`/api/dag-runs/${encodeURIComponent(Ke)}`,{credentials:"same-origin"});if(!gt.ok){ue([]),ae(null),ne(null);return}const ct=await gt.json(),Ft=typeof ct.effectiveStatus=="string"&&ct.effectiveStatus||typeof ct.status=="string"&&ct.status||null;ae(Ft);const Q=Array.isArray(ct.nodes)?ct.nodes:[],ye=ex(Q.map(ht=>{const Et=(ht.nodeId??ht.id??"").trim();return Et?{nodeId:Et,status:ht.status,label:ht.label??ht.name,errorPreview:ht.errorPreview}:null}).filter(ht=>ht!==null));ue(ye);const Le=typeof ct.failureCategory=="string"&&ct.failureCategory||void 0,Ze=Q.find(ht=>typeof ht.failureCategory=="string"&&ht.failureCategory&&ht.failureCategory!=="success")?.failureCategory;ne(Le??Ze??null),ce(ct.frontendRecovery??null)}catch{ue([]),ae(null),ne(null),ce(null)}finally{q(!1)}},[]);S.useEffect(()=>{s==="recovery"&&Fe()},[s,p,Fe]),S.useEffect(()=>{if(s!=="recovery"||ge||X.length===0)return;const rt=b.trim(),Ke=rt?X.some(gt=>gt.dagRunId===rt):!1;if(!rt||!Ke){const gt=BD(X);gt&>!==rt&&y(gt)}},[s,X,b,ge]),S.useEffect(()=>{s==="recovery"&&_e(b)},[s,b,_e]),S.useEffect(()=>{if(s!=="recovery")return;const rt=b.trim();if(!rt){K(null);return}const gt=A&&new Set(["finished","failed","partial_failed","superseded","abandoned","interrupted"]).has(A)?3e4:4e3,ct=gt===4e3;let Ft=!1;const Q=async()=>{const{body:Le}=await ko("dagInterruptEligibility",{runId:rt});if(Ft)return;const Ze=Le.result??Le;if(K({eligible:Ze.eligible===!0,ownerKind:Ze.ownerKind,message:Ze.message,interruptStatus:Ze.interruptStatus,reasonCodes:Ze.reasonCodes,targetOperationId:Ze.targetOperationId,targetOperationState:Ze.targetOperationState}),!!ct)try{const ht=await fetch(`/api/dag-runs/${encodeURIComponent(rt)}`,{credentials:"same-origin"});if(!ht.ok||Ft)return;const Et=await ht.json();if(Ft)return;const ie=typeof Et.effectiveStatus=="string"&&Et.effectiveStatus||typeof Et.status=="string"&&Et.status||null;ae(ie)}catch{}};Q();const ye=window.setInterval(()=>{Q()},gt);return()=>{Ft=!0,window.clearInterval(ye)}},[s,b,A]),S.useEffect(()=>{if(s!=="recovery"||je||re.length===0)return;const rt=x.trim(),Ke=rt?re.some(gt=>gt.nodeId===rt):!1;if(!rt||!Ke){const gt=UD(re);gt&>!==rt&&k(gt)}},[s,re,x,je]);const He=jD({operationState:A?null:f,errorCode:A?null:c,dagStatus:A,failureCategory:he}),vt=S.useMemo(()=>{const rt=Q6(He);return He!=="running-active"||ee?.eligible?rt:rt.filter(Ke=>Ke.id!=="interrupt")},[He,ee?.eligible]),jt=S.useMemo(()=>MD(vt),[vt]),Lt=S.useMemo(()=>DD(He),[He]),yt=S.useMemo(()=>re.find(rt=>rt.nodeId===x.trim()),[re,x]),ot=S.useRef(null);S.useEffect(()=>{B&&ot.current?.scrollIntoView({behavior:"smooth",block:"nearest"})},[B?.id]);const mt=S.useCallback(rt=>FD({actionLabel:rt,dagRunId:b.trim()||void 0,fromNodeId:x.trim()||void 0,runStatus:A,nodeStatus:yt?.status,nodeError:yt?.errorPreview,factClassLabel:V2[He],errorMessage:l,errorCode:c}),[b,x,l,c,He,A,yt?.errorPreview,yt?.status]);S.useEffect(()=>{if(s!=="recovery"||I&&!tx(C))return;const rt=mt(B?.label);rt&&rt!==C&&_(rt)},[s,b,x,A,yt,He,l,c,B?.label,I,C,mt]);const{handleRecoveryCta:Un,submitRecoveryConfirm:un}=PD({shell:t,actions:n,taskId:p,dagRunId:b,fromNodeId:x,featureId:N,recoveryReason:C,recoveryReasonTouched:I,recoveryConfirm:B,recoveryPlanSummary:D,interruptReasonCode:F,setRecoveryConfirm:Y,setRecoveryPlanSummary:M,setRecoveryReport:Ve,setRecoveryReason:_,setRecoveryReasonTouched:$,buildCurrentRecoveryReason:mt,openFullCanvas:Se});return S.useEffect(()=>{if(s!=="recovery"||!G||!ee?.eligible)return;const rt=vt.find(Ke=>Ke.id==="interrupt");rt&&(Y(rt),_(mt(rt.label)),$(!1),j(!1))},[s,G,ee?.eligible,vt,mt]),{dagRunId:b,setDagRunId:y,fromNodeId:x,setFromNodeId:k,featureId:N,setFeatureId:R,recoveryReason:C,setRecoveryReason:_,recoveryReasonTouched:I,setRecoveryReasonTouched:$,recoveryPlanSummary:D,recoveryConfirm:B,setRecoveryConfirm:Y,setRecoveryPlanSummary:M,recoveryRuns:X,recoveryNodes:re,recoveryRunsLoading:Te,recoveryNodesLoading:U,recoveryRunStatus:A,recoveryFailureCategory:he,frontendRecovery:te,manualRunId:ge,setManualRunId:Re,manualNodeId:je,setManualNodeId:be,recoveryReport:qe,setRecoveryReport:Ve,observeLinkStatus:tt,observeLinkMessage:Ut,observeUrl:ut,inspectSplitOpen:Bt,setInspectSplitOpen:Kt,inspectPath:hn,openFullInspect:Je,resolveDagRunForInspect:tn,openInspectSplit:pe,openFullCanvas:Se,loadRecoveryRuns:Fe,loadRecoveryNodes:_e,recoveryFact:He,recoveryCtas:vt,recoveryLanes:jt,recommendedCtaId:Lt,interruptIntent:G,setInterruptIntent:j,interruptReasonCode:F,setInterruptReasonCode:H,interruptEligibility:ee,recoveryConfirmRef:ot,buildCurrentRecoveryReason:mt,handleRecoveryCta:Un,submitRecoveryConfirm:un}}async function GD(e,t){const a=await fetch(`/api/tasks/${encodeURIComponent(e)}/ledger`,{credentials:"same-origin"});return a.ok?{ok:!0,summary:await a.json()}:{ok:!1}}function VD(e){const{shell:t,actions:n,prd:a}=e,{step:s,setStep:l,setOpMessage:c}=t,{runAction:f,isActionSuccess:m,summarizeEnvelope:h}=n,[p,b]=S.useState(""),[y,x]=S.useState(""),[k,N]=S.useState("standard"),[R,C]=S.useState(""),[_,I]=S.useState(""),[$,D]=S.useState(""),M=Wm.find(_e=>_e.kind===k)??Wm[0],[B,Y]=S.useState(null),[G,j]=S.useState(null),[F,H]=S.useState(""),[ee,K]=S.useState(null),[X,V]=S.useState(null),[re,ue]=S.useState(null),[Te,P]=S.useState(null),[U,q]=S.useState(null),[A,ae]=S.useState(!1),[he,ne]=S.useState(null),[te,ce]=S.useState(!1),[ge,Re]=S.useState(null),[je,be]=S.useState(null),[qe,Ve]=S.useState(null),tt=S.useRef(!1),nt=S.useRef(0),Ut=S.useCallback(()=>{ue(null),P(null),q(null),ae(!1),ne(null),ce(!1),Re(null),be(null),Ve(null),tt.current=!1,nt.current=0},[]),Rt=S.useCallback(()=>{Ut(),l("contract")},[Ut,l]),ut=S.useCallback(_e=>{const He=_e.session;He?.sessionId&&Y(He.sessionId);const vt=_e.question;j(vt),K(_e.summary??null);const jt=_e.assessmentId;typeof jt=="string"&&jt&&V(jt),(_e.complete===!0||typeof jt=="string"&&jt)&&(Rt(),c(_e.skipped===!0?"已跳过访谈:已按推荐补齐草稿并签发评估":"访谈已完成:草稿已绑定完整评估结果"))},[Rt,c]),Ge=S.useCallback(async(_e,He)=>{const vt=++nt.current;ce(!0),Re(null);try{const jt=await GD(_e);if(nt.current!==vt)return;if(!jt.ok){be(null),He&&Re("ledger 接口不可达(安全降级)");return}be(jt.summary)}catch{if(nt.current!==vt)return;Re("ledger 接口不可达(安全降级)"),be(null)}finally{nt.current===vt&&ce(!1)}},[]),Bt=S.useCallback(async(_e=!1)=>{const He=p.trim();if(!He)return;const vt=`${He}:${X??""}`;if(!(!_e&&qe===vt&&re!==null)&&!tt.current){tt.current=!0,ue(null),P(null),q(null),ne(null),ae(!1),await Ge(He,!1);try{const jt=await f("contractValidate",{taskId:He}),Lt=m(jt);if(ue(Lt),P(h(jt)),!Lt){Ve(vt),c("契约校验未通过:请先修正草稿后再应用");return}const yt=await f("contractDiff",{taskId:He});q(h(yt)),Ve(vt),c(m(yt)?"校验与差异已就绪:确认后可应用契约":"校验通过,但差异查询失败(仍可查看下方摘要)")}finally{tt.current=!1}}},[X,qe,re,m,Ge,f,c,h,p]),Kt=S.useCallback(async()=>{const _e=p.trim();if(!_e||!X)return;const He=await f("contractApply",{taskId:_e,assessmentId:X},{clientRequestId:wu("apply")});if(!m(He)){ae(!1);return}ae(!0),await Ge(_e,!0);const vt=await f("spineCheck",{taskId:_e});if(m(vt)){ne(!0),l("dag-confirm"),c("契约已应用并通过 Spine 审计,可生成并运行 DAG");return}ne(!1),c("契约已应用,但 Spine 审计未通过:可重试 Spine")},[X,m,Ge,f,c,l,p]),hn=S.useCallback(async()=>{const _e=p.trim();if(!_e)return;const He=await f("spineCheck",{taskId:_e});if(m(He)){ne(!0),l("dag-confirm"),c("Spine 审计已通过,可生成并运行 DAG");return}ne(!1)},[m,f,c,l,p]),Je=S.useCallback(async()=>{const _e=n.confirmationId?.trim();if(!_e)return;const He=n.confirmationDetails?.confirmation?.humanGateToken,vt=await f("confirmDagConfirmation",{confirmationId:_e,humanGateToken:He});m(vt)&&(l("run"),await f("runDag",{confirmationId:_e},{clientRequestId:wu("run")}))},[n.confirmationId,n.confirmationDetails,m,f,l]);S.useEffect(()=>{s==="contract"&&p.trim()&&Bt(!1)},[s,p,X,Bt]);const tn=S.useCallback(_e=>_e.split(/[\n,;,;]+/).map(He=>He.trim()).filter(Boolean),[]),pe=S.useCallback(async()=>{const _e=a.prdDocuments.length>0?kD(a.prdDocuments):void 0,He=tn(R),vt=tn(_),jt=tn($),Lt={content:a.prdText,taskKind:k,..._e?{documents:_e}:{},...He.length>0?{allowedPaths:He}:{},...vt.length>0?{forbiddenPaths:vt}:{},...jt.length>0?{verifyCommands:jt}:{}};if(!TD("bootstrapFromPrd",Lt)){a.setPrdFileError(ND());return}const yt=await f("bootstrapFromPrd",Lt);if(!yt||yt.ok===!1)return;const ot=yt.result??{};ot.taskId&&b(ot.taskId),ot.title&&x(ot.title);const mt=ot.parseStatus??"pending",Un=ot.draftPreview?.objective?.trim(),un=Array.isArray(ot.gaps)?ot.gaps.length:0,rt=ot.semanticIntake?.applied?"semantic":ot.semanticIntake?.code??"no-semantic",Ke=(ot.autoImportedReferences??[]).filter(ct=>ct.repoRelative),gt=(ot.unresolvedReferences??[]).filter(ct=>ct.token);c([`已创建任务「${ot.title??""}」(${ot.taskId??""})`,`来源:${ot.identitySource??"prd"}`,`解析:${mt}(${rt})`,Un?`目标:${Un.slice(0,120)}`:null,un>0?`缺口 ${un} 项待确认`:null,Ke.length>0?`已自动导入 ${Ke.length} 个引用文档(${Ke.map(ct=>`${ct.repoRelative}${ct.role?`:${ct.role}`:""}`).join("、")})`:null,gt.length>0?`有 ${gt.length} 个引用未能解析:${gt.map(ct=>`${ct.token}(${ct.reason??"未知原因"})`).join("、")}`:null].filter(Boolean).join(" · ")),l("interview")},[R,_,a,f,c,l,tn,k,$]),Se=[{id:"setup",label:"就绪检查"},{id:"import-prd",label:"导入需求"},{id:"interview",label:"需求访谈(可跳过)"},{id:"contract",label:"契约落地"},{id:"dag-confirm",label:"确认 DAG"},{id:"run",label:"运行"}],Fe=Se.findIndex(_e=>_e.id===s);return{taskId:p,setTaskId:b,taskTitle:y,taskKind:k,setTaskKind:N,engineering:{allowedPathsText:R,forbiddenPathsText:_,verifyCommandsText:$},setEngineering:_e=>{_e.allowedPathsText!==void 0&&C(_e.allowedPathsText),_e.forbiddenPathsText!==void 0&&I(_e.forbiddenPathsText),_e.verifyCommandsText!==void 0&&D(_e.verifyCommandsText)},workflowMeta:M,sessionId:B,question:G,answerText:F,setAnswerText:H,draftSummary:ee,assessmentId:X,contractValidateOk:re,contractValidateSummary:Te,contractDiffSummary:U,ledgerLoading:te,ledgerError:ge,ledgerSummary:je,contractApplied:A,spineOk:he,applyInterviewPayload:ut,runContractPreflight:Bt,applyContractThenSpine:Kt,retrySpineOnly:hn,confirmAndRunDag:Je,importPrdAndCreate:pe,wizardSteps:Se,stepIndex:Fe}}const KD={chat:"对话",tasks:"任务",recovery:"恢复",night:"夜间",models:"模型与认证",settings:"设置"};async function YD(e){return await import(e)}function XD(e){const t=e.repoName?.trim();if(t)return t;const n=(e.repoRoot??"").split(/[\\/]/).filter(Boolean);return n.length?n[n.length-1]:"repository"}function ZD(e){const{nav:t,readiness:n,setupBlocked:a,degraded:s,health:l,inspectHref:c}=e,f=a||s?"models":"settings",m=a?"Pi SDK / 认证 / 模型未就绪。不提供纯表单兜底。点击前往模型与认证。":s?"Pi 暂时降级:仍可恢复草稿与需求访谈。点击查看详情。":"Pi 已就绪。点击打开设置查看详情。";return{mode:"operate",activeTabHref:`#/${t}`,operateHref:"/#/chat",inspectHref:c,freshness:!1,readinessState:n,readinessHref:`#/${f}`,readinessTitle:m,repo:l?{name:XD(l),fingerprint:l.repoFingerprint??"",version:l.packageVersion??"",product:l.productName??l.product??"",inspectReady:l.inspect?.ready}:null}}function WD(e){const t=S.useRef(null),n=S.useRef(null),[a,s]=S.useState(!1),l=S.useMemo(()=>ZD(e),[e.nav,e.readiness,e.setupBlocked,e.degraded,e.health,e.inspectHref]),c=S.useRef(l);return c.current=l,S.useEffect(()=>{let f=!1;return YD("/inspect/operator-chrome.js").then(m=>{f||!t.current||(n.current=m.mountOperatorChrome(t.current,c.current))}).catch(()=>{f||s(!0)}),()=>{f=!0,n.current?.destroy(),n.current=null}},[]),S.useEffect(()=>{n.current?.update(l)},[l]),u.jsxs(u.Fragment,{children:[u.jsx("div",{ref:t,"data-testid":"operator-chrome"}),a?u.jsxs("nav",{className:"operator-chrome-fallback","aria-label":"操作工作区",children:[u.jsx("button",{type:"button",onClick:()=>window.location.assign("/#/"),children:"Loop Agent"}),u.jsx("button",{type:"button",onClick:()=>window.location.assign(`#/${e.nav}`),children:KD[e.nav]}),u.jsx("button",{type:"button",onClick:()=>window.location.assign(e.inspectHref),children:"观测"}),u.jsx("span",{role:"status",children:"共享导航加载失败,请刷新页面"})]}):null]})}function QD(e){const[t,n]=S.useState(!1),[a,s]=S.useState("latest"),l=S.useId(),c=e.busy||t;return u.jsxs("div",{className:"console-update-control","aria-live":"polite",children:[u.jsx("span",{className:"console-update-badge",children:a==="latest"?"稳定版更新":"预发布更新"}),u.jsx("label",{className:"console-update-channel-label",htmlFor:l,children:"更新渠道"}),u.jsxs("select",{id:l,className:"console-update-channel",value:a,disabled:c,onChange:f=>s(f.target.value==="next"?"next":"latest"),children:[u.jsx("option",{value:"latest",children:"稳定版(latest)"}),u.jsx("option",{value:"next",children:"预发布版(next)"})]}),u.jsx("button",{type:"button",className:"console-update-button",disabled:c,onClick:()=>{n(!0),e.runAction("consoleUpdateAndInit",{channel:a},{clientRequestId:`console-update-${crypto.randomUUID()}`}).then(f=>{if(f?.state==="restarting"){setTimeout(()=>window.location.reload(),800);return}n(!1)})},children:t?"正在更新…":"更新并初始化"})]})}function JD(e){return u.jsxs(u.Fragment,{children:[e.opError?u.jsxs("div",{className:"flash flash-error","data-testid":"op-error",children:[u.jsx("span",{className:"flash-label",children:"错误"}),u.jsx("p",{className:"flash-body",children:e.opError})]}):null,e.opMessage?u.jsxs("div",{className:"flash flash-info","data-testid":"op-message",children:[u.jsx("span",{className:"flash-label",children:"状态"}),u.jsx("p",{className:"flash-body",children:e.opMessage})]}):null]})}function ej(){return u.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",children:u.jsx("path",{d:"M2.6 4.2 6 7.6l3.4-3.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function gu(e){return e.provider?_o(e.provider,e.id):e.id}function tj(e){const t=e.trim();if(!t)return;const n=t.indexOf("/");return n<=0||n===t.length-1?{provider:"",id:t}:{provider:t.slice(0,n),id:t.slice(n+1)}}function nj(e){const[t,n]=S.useState(!1),[a,s]=S.useState(""),[l,c]=S.useState(0),f=S.useRef(null),m=S.useRef(null),h=S.useRef(null),p=S.useMemo(()=>{const N=[...e.models];if(e.value&&!N.some(R=>gu(R)===e.value)){const R=tj(e.value);R&&N.push(R)}return N},[e.models,e.value]),b=S.useMemo(()=>Y6(p,a),[p,a]),y=S.useMemo(()=>b.flatMap(N=>N.models),[b]);S.useEffect(()=>{t&&(s(""),c(Math.max(0,p.findIndex(N=>gu(N)===e.value))),window.setTimeout(()=>h.current?.focus(),0))},[t,p,e.value]),S.useEffect(()=>{if(!t)return;const N=C=>{const _=f.current;_&&C.target instanceof Node&&!_.contains(C.target)&&n(!1)},R=C=>{C.key==="Escape"&&(n(!1),m.current?.focus())};return document.addEventListener("mousedown",N),document.addEventListener("keydown",R),()=>{document.removeEventListener("mousedown",N),document.removeEventListener("keydown",R)}},[t]);const x=N=>{if(e.disabled)return;const R=y[N];R&&(n(!1),e.onChange(gu(R)),m.current?.focus())},k=N=>{if(N.key==="ArrowDown"){N.preventDefault(),c(R=>y.length?(R+1)%y.length:0);return}if(N.key==="ArrowUp"){N.preventDefault(),c(R=>y.length?(R-1+y.length)%y.length:0);return}if(N.key==="Enter"){N.preventDefault(),x(l);return}if(N.key==="Escape"){N.preventDefault(),n(!1),m.current?.focus();return}};return u.jsxs("div",{className:"oc-select-menu models-matrix-select",ref:f,children:[u.jsxs("button",{type:"button",ref:m,id:e.id,className:"oc-select-trigger","aria-haspopup":"listbox","aria-expanded":t,"aria-invalid":e.ariaInvalid,"data-testid":e.dataTestId,disabled:e.disabled,onClick:()=>n(N=>!N),children:[u.jsx("span",{className:"oc-select-trigger-label",children:e.value||"选择模型"}),u.jsx(ej,{})]}),t&&u.jsxs("div",{className:"oc-select-panel oc-model-panel is-below",role:"listbox","aria-label":"选择模型",children:[u.jsx("input",{ref:h,className:"oc-select-search",placeholder:"搜索模型…",value:a,onChange:N=>{s(N.target.value),c(0)},onKeyDown:k}),b.length===0&&u.jsx("div",{className:"oc-select-status",children:"没有可用模型"}),b.map(N=>u.jsxs("div",{className:"oc-model-group",children:[u.jsx("div",{className:"oc-model-group-head",children:N.provider||"其他"}),N.models.map(R=>{const C=gu(R),_=C===e.value,I=y[l]===R;return u.jsxs("button",{type:"button",role:"option","aria-selected":_,disabled:e.disabled,className:`oc-select-option oc-model-option${I?" is-highlighted":""}${_?" is-active":""}`,onMouseDown:$=>$.preventDefault(),onClick:()=>{e.disabled||(n(!1),e.onChange(C))},children:[u.jsxs("span",{className:"oc-model-option-name",children:[R.name?`${R.name} · `:"",R.id]}),_&&u.jsx("span",{className:"oc-model-option-check",children:"✓"})]},C)})]},N.provider))]})]})}const rj=[{key:"sdkAvailable",detailKey:"sdkMessage",label:"Pi SDK",hint:"Node 侧 Pi SDK 可加载"},{key:"authReady",detailKey:"authMessage",label:"认证凭据",hint:"Pi auth / provider 密钥已配置"},{key:"modelsAvailable",detailKey:"modelsMessage",label:"可用模型",hint:"harness.json executors.pi(LOW/MED/HIGH)可在 Pi 凭据面解析"},{key:"interviewSessionOk",detailKey:"sessionMessage",label:"访谈会话",hint:"Interview 会话预检通过"}];function aj(e){if(!e)return null;const t=Date.parse(e);return Number.isNaN(t)?e:new Date(t).toLocaleString()}function ij(e){const t=e.readinessReport?.state??e.readiness,n=e.readinessReport?.probe,a=n?.details??{},s=e.readinessReport?.blockedActions??[],l=aj(e.readinessReport?.generatedAt),c=e.readinessReport??{state:e.readiness,health:e.health},f=n?.piModelMatrix,m=n?.piAvailableModels??[],[h,p]=S.useState(()=>vv(f)),[b,y]=S.useState(!1),[x,k]=S.useState(null),[N,R]=S.useState(null);S.useEffect(()=>{p(vv(f)),k(null)},[f]);const C=E8(h),_=!T8(C),I=e.busy||b||_;async function $(){if(!I){y(!0),k(null),R(null);try{const D=await e.onSaveMatrix({LOW:h.LOW,MED:h.MED,HIGH:h.HIGH});if(D&&D.ok===!1){k(D.error?.message??"保存模型矩阵失败");return}const M=window.localStorage.getItem(Yr)?.trim();if(M)try{const B=await fetch(`/api/operator/v1/chat/sessions/${encodeURIComponent(M)}/reload`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json",[Bh]:qh()},body:"{}"});B.ok?R("配置已保存,活动会话已重载。"):B.status===409?R("配置已保存;活动会话正忙(PI_SESSION_BUSY),请稍后手动重载。"):R("配置已保存;活动会话重载未完成,请手动重载。")}catch{R("配置已保存;活动会话重载未完成,请手动重载。")}else R("配置已保存,检测结果已刷新。")}catch(D){k(D instanceof Error?D.message:String(D))}finally{y(!1)}}}return u.jsxs("section",{className:"panel models-page","aria-labelledby":"models-title",children:[u.jsxs("div",{className:"models-header",children:[u.jsx("h2",{id:"models-title",children:"模型与认证"}),u.jsx("span",{className:"models-status-pill","data-state":t,"data-testid":"models-readiness-pill",children:$2[t]??t})]}),u.jsxs("p",{className:"panel-lead",children:["复用 Pi ModelRuntime 凭据平面;密钥不会回传到页面。请用"," ",u.jsx("code",{children:"pi"})," 或 Pi 认证存储完成配置,然后刷新就绪探测。"]}),u.jsxs("section",{className:"models-probe-card","aria-labelledby":"models-probe-title","data-testid":"readiness-details",children:[u.jsx("h3",{id:"models-probe-title",className:"models-subtitle",children:"就绪检查"}),u.jsx("ul",{className:"models-probe-list",children:rj.map(D=>{const M=n?.[D.key],B=a[D.detailKey],Y=M===void 0;return u.jsxs("li",{className:`models-probe-item${Y?" is-pending":M?" is-ok":" is-bad"}`,children:[u.jsx("span",{className:"models-probe-badge","aria-label":Y?"未探测":M?"通过":"未通过",children:Y?"—":M?"✓":"✕"}),u.jsxs("div",{className:"models-probe-body",children:[u.jsx("strong",{children:D.label}),u.jsx("span",{className:"muted",children:D.hint}),B?u.jsx("p",{className:"models-probe-detail",children:B}):null]})]},D.key)})})]}),u.jsxs("section",{className:"models-matrix-card","aria-labelledby":"models-matrix-title","data-testid":"models-matrix-editor",children:[u.jsx("h3",{id:"models-matrix-title",className:"models-subtitle",children:"Herness模型矩阵(LOW/MED/HIGH)"}),u.jsxs("p",{className:"models-matrix-lead",children:["从 Pi 可用模型中选择 ",u.jsx("code",{children:"provider/model"})," 或裸 model id; 保存后原子写入 ",u.jsx("code",{children:"executors.pi"})," 并自动重测就绪。"]}),u.jsx("div",{className:"models-matrix-list",children:Uh.map(D=>u.jsxs("div",{className:"models-matrix-row",children:[u.jsxs("label",{htmlFor:`pi-model-${D}`,children:[D," 档",C[D]?u.jsxs("span",{className:"error","data-testid":`pi-model-error-${D}`,children:[" ","— ",C[D]]}):null]}),u.jsx(nj,{id:`pi-model-${D}`,value:h[D],models:m,onChange:M=>p(B=>({...B,[D]:M})),ariaInvalid:C[D]!==void 0,"data-testid":`pi-model-select-${D}`})]},D))}),x?u.jsx("p",{className:"error","data-testid":"models-matrix-save-error",children:x}):null,N?u.jsx("p",{className:"muted","data-testid":"models-matrix-save-notice",children:N}):null,u.jsxs("div",{className:"models-actions",children:[u.jsx("button",{type:"button",className:"btn btn-secondary",disabled:I,"data-testid":"models-matrix-save",onClick:()=>{$()},children:b||e.busy?"保存中…":"保存模型矩阵"}),u.jsx("button",{type:"button",className:"btn btn-secondary",disabled:e.busy||b,"data-testid":"models-matrix-refresh-models",onClick:e.onRefreshReadiness,children:e.busy?"刷新中…":"刷新模型"})]})]}),t==="setup-required"?u.jsxs("div",{className:"models-setup-card","data-testid":"models-setup-hint",children:[u.jsx("h3",{className:"models-subtitle",children:"如何完成配置"}),u.jsxs("ol",{className:"models-setup-steps",children:[u.jsxs("li",{children:["在终端配置 Pi 认证(例如 ",u.jsx("code",{children:"pi auth login"}),")或写入 provider API key。"]}),u.jsxs("li",{children:["确认 agent 目录下 ",u.jsx("code",{children:"models.json"})," / 认证文件可读。"]}),u.jsx("li",{children:"点击下方「刷新就绪探测」,或运行诊断命令查看详情。"})]}),u.jsx("pre",{className:"cmd",children:P2})]}):null,t==="degraded"?u.jsx("p",{className:"models-degraded-note","data-testid":"models-degraded-note",children:"Pi 暂时降级:仍可恢复草稿与需求访谈;部分写入/运行类操作会被拦截。"}):null,s.length>0?u.jsxs("div",{className:"models-blocked-card",children:[u.jsx("h3",{className:"models-subtitle",children:"当前受限操作"}),u.jsx("ul",{className:"models-blocked-list",children:s.map(D=>u.jsx("li",{children:u.jsx("code",{children:D})},D))})]}):null,u.jsxs("div",{className:"models-actions",children:[u.jsx("button",{type:"button",className:"btn btn-primary",disabled:e.busy,onClick:e.onRefreshReadiness,children:"刷新就绪探测"}),l?u.jsxs("span",{className:"muted models-generated-at",children:["上次探测:",l]}):null]}),u.jsxs("details",{className:"models-raw-details",children:[u.jsx("summary",{children:"查看原始探测数据(调试)"}),u.jsx("pre",{className:"cmd models-raw-json",children:JSON.stringify(c,null,2)})]})]})}const sj=[{value:"requirements-changed",label:"需求已变更"},{value:"suspected-runaway",label:"疑似失控"},{value:"resource-protection",label:"保护资源"},{value:"operator-request",label:"操作者请求"},{value:"other",label:"其他"}];function z2(e){const{lane:t,cta:n,planSummary:a,reason:s,busy:l,confirmRef:c}=e;return!n||n.lane!==t?null:u.jsxs("div",{ref:c,className:"recovery-confirm","data-testid":"recovery-confirm",children:[u.jsxs("h3",{children:["待确认:",n.label]}),u.jsx("p",{className:"muted",children:n.id==="reconcile"?"破坏性对账需经浏览器 Human Gate 确认。请核对运行与原因后再点「确定」。":n.id==="interrupt"?"协作中止需经浏览器 Human Gate。原因已按当前运行预填,可改分类或编辑后再确定。提交只表示请求已登记,当前节点仍会跑完。":"核对上方运行 / 节点与恢复原因后直接执行;服务端会校验资格,不再走 Human Gate。"}),n.id==="interrupt"?u.jsxs("fieldset",{className:"recovery-reason-code","data-testid":"recovery-interrupt-reason-code",disabled:l,children:[u.jsx("legend",{children:"原因分类"}),u.jsx("div",{className:"recovery-reason-code-group",children:sj.map(f=>{const m=(e.reasonCode??"operator-request")===f.value;return u.jsxs("label",{className:m?"recovery-reason-code-option is-active":"recovery-reason-code-option",children:[u.jsx("input",{type:"radio",name:"recovery-interrupt-reason-code",value:f.value,checked:m,onChange:()=>e.onReasonCodeChange?.(f.value)}),f.label]},f.value)})})]}):null,a?u.jsxs("div",{className:"recovery-plan-summary",children:[u.jsxs("p",{className:"muted",children:["计划 eligible=",String(a.eligible??"—")," · 风险=",G2[a.risk??""]??a.risk??"—"]}),a.effectiveFromNodeId?u.jsxs("p",{className:"muted",children:["有效起点:",a.effectiveFromNodeId]}):null,a.estimatedExecution?u.jsxs("p",{className:"muted",children:["将执行 ",a.estimatedExecution.nodeCount??"?"," 个节点 / ",a.estimatedExecution.piCallCount??"?"," 次 Pi;预计避免"," ",a.estimatedExecution.avoidedNodeCount??"?"," 个节点"]}):null,a.planHash?u.jsxs("p",{className:"muted",children:["planHash: ",u.jsxs("code",{children:[a.planHash.slice(0,16),"…"]})]}):null]}):n.id==="dagRerun"?u.jsx("p",{className:"muted",children:"未加载计划摘要;点「确定」前将再次尝试资格检查。"}):null,u.jsxs("div",{className:"cta-row",children:[u.jsx("button",{type:"button",className:"btn btn-primary",disabled:l||!s.trim(),"data-testid":"recovery-confirm-submit",onClick:e.onSubmit,children:"确定"}),u.jsx("button",{type:"button",className:"btn btn-secondary",disabled:l,"data-testid":"recovery-confirm-cancel",onClick:e.onCancel,children:"取消"})]})]})}function lj(e){const{shell:t,recovery:n,wizard:a}=e,{busy:s}=t,l=_D({interruptStatus:n.interruptEligibility?.interruptStatus,dagStatus:n.recoveryRunStatus,failureCategory:n.recoveryFailureCategory,targetOperationState:n.interruptEligibility?.targetOperationState}),c={planSummary:n.recoveryPlanSummary,reason:n.recoveryReason,reasonCode:n.interruptReasonCode,onReasonCodeChange:n.setInterruptReasonCode,busy:s,confirmRef:n.recoveryConfirmRef,onSubmit:()=>{n.submitRecoveryConfirm()},onCancel:()=>{n.setRecoveryConfirm(null),n.setRecoveryPlanSummary(null)}};return u.jsxs("section",{className:"panel","aria-labelledby":"recovery-title",children:[u.jsx("h2",{id:"recovery-title",children:"恢复"}),u.jsxs("p",{className:"muted",children:["事实分类:",V2[n.recoveryFact]," · 无 Cancel · 无「直接改代码」"]}),n.frontendRecovery?u.jsxs("div",{className:"muted","data-testid":"frontend-recovery-lineage",style:{marginBottom:"0.75rem"},children:[u.jsxs("div",{children:["前端恢复:outcome=",u.jsx("code",{children:n.frontendRecovery.outcome??"—"})," phase=",u.jsx("code",{children:n.frontendRecovery.phase??"—"})]}),u.jsxs("div",{children:["root ",u.jsx("code",{children:n.frontendRecovery.recoveryRootRunId??"—"}),n.frontendRecovery.parentRunId?` · parent ${n.frontendRecovery.parentRunId}`:"",n.frontendRecovery.childRunId?` · child ${n.frontendRecovery.childRunId}`:"",n.frontendRecovery.attemptIndex!==void 0?` · attempt ${n.frontendRecovery.attemptIndex}`:""]})]}):null,u.jsxs("ol",{className:"muted recovery-steps",children:[u.jsx("li",{children:"上方选 DAG 运行 / 节点,用「DAG 运行恢复」动作"}),u.jsx("li",{children:"Worker 持有的失败 run 用下方「Worker Task 重排队」;独立 DAG run 无法从节点恢复时才用「带反馈重新执行任务」"}),u.jsx("li",{children:"带 * 的动作:核对预填原因后点「确定」。重跑/重试直接执行;对账与中止运行走 Human Gate"})]}),l?u.jsxs("p",{className:"muted","data-testid":"recovery-interrupt-status",children:["中止进度:",l]}):null,n.recoveryFact==="running-active"&&n.interruptEligibility&&!n.interruptEligibility.eligible&&(!n.interruptEligibility.interruptStatus||n.interruptEligibility.interruptStatus==="none")?u.jsx("p",{className:"muted","data-testid":"recovery-interrupt-unavailable",children:n.interruptEligibility.ownerKind==="worker-managed"?"此运行不由当前 Console 持有,暂不支持协作中止。请用 Doctor / 报告查看。":n.interruptEligibility.message??"当前运行不具备协作中止资格。"}):null,u.jsxs("p",{className:"muted",children:[a.taskId.trim()?`按任务 ${a.taskId.trim()} 拉取候选。`:"未填任务 ID 时列出最近 DAG 运行。","Doctor 诊断可选,不是重跑前置。"," ",u.jsx("button",{type:"button",className:"btn btn-secondary",disabled:s||n.recoveryRunsLoading,"data-testid":"recovery-refresh-candidates",onClick:()=>{n.loadRecoveryRuns()},children:n.recoveryRunsLoading?"刷新中…":"刷新候选"})]}),u.jsxs("label",{className:"field",children:[u.jsx("span",{className:"muted",children:"DAG 运行 ID"}),!n.manualRunId&&n.recoveryRuns.length>0?u.jsxs("select",{"data-testid":"recovery-run-select",value:n.dagRunId,disabled:s||n.recoveryRunsLoading,onChange:f=>{n.setManualRunId(!1),n.setManualNodeId(!1),n.setFromNodeId(""),n.setDagRunId(f.target.value),n.recoveryReasonTouched||n.setRecoveryReasonTouched(!1)},children:[n.recoveryRuns.some(f=>f.dagRunId===n.dagRunId)?null:u.jsx("option",{value:n.dagRunId||"",children:n.dagRunId?`${n.dagRunId}(当前)`:"— 请选择 —"}),n.recoveryRuns.map(f=>u.jsx("option",{value:f.dagRunId,children:qD(f)},f.dagRunId))]}):u.jsx("input",{"data-testid":"recovery-run-input",value:n.dagRunId,disabled:s,onChange:f=>{n.setManualRunId(!0),n.setDagRunId(f.target.value.trim())},placeholder:"dag-run-id(节点恢复/完整重新执行)"}),u.jsx("button",{type:"button",className:"btn btn-secondary",disabled:s,"data-testid":"recovery-run-manual-toggle",onClick:()=>{if(!n.manualRunId&&n.recoveryRuns.length>0){n.setManualRunId(!0);return}n.setManualRunId(!1),n.loadRecoveryRuns()},children:!n.manualRunId&&n.recoveryRuns.length>0?"手动输入运行 ID":"刷新并改用下拉"})]}),u.jsxs("label",{className:"field",children:[u.jsxs("span",{className:"muted",children:["起始节点 ID(从失败节点恢复)",n.recoveryNodesLoading?" · 加载节点…":""]}),!n.manualNodeId&&n.recoveryNodes.length>0?u.jsxs("select",{"data-testid":"recovery-node-select",value:n.fromNodeId,disabled:s||n.recoveryNodesLoading,onChange:f=>{n.setManualNodeId(!1),n.setFromNodeId(f.target.value)},children:[n.recoveryNodes.some(f=>f.nodeId===n.fromNodeId)?null:u.jsx("option",{value:n.fromNodeId||"",children:n.fromNodeId?`${n.fromNodeId}(当前)`:"— 请选择 —"}),n.recoveryNodes.map(f=>u.jsx("option",{value:f.nodeId,children:HD(f)},f.nodeId))]}):u.jsx("input",{"data-testid":"recovery-node-input",value:n.fromNodeId,disabled:s,onChange:f=>{n.setManualNodeId(!0),n.setFromNodeId(f.target.value.trim())},placeholder:"例如 review-verdict-recovery-pi"}),u.jsx("button",{type:"button",className:"btn btn-secondary",disabled:s,"data-testid":"recovery-node-manual-toggle",onClick:()=>{if(!n.manualNodeId&&n.recoveryNodes.length>0){n.setManualNodeId(!0);return}n.setManualNodeId(!1),n.loadRecoveryNodes(n.dagRunId)},children:!n.manualNodeId&&n.recoveryNodes.length>0?"手动输入节点 ID":"刷新并改用下拉"})]}),u.jsxs("label",{className:"field",children:[u.jsx("span",{className:"muted",children:"恢复原因(已按 run/节点失败事实自动预填,可编辑)"}),u.jsx("textarea",{"data-testid":"recovery-reason",value:n.recoveryReason,disabled:s,rows:4,onChange:f=>{n.setRecoveryReasonTouched(!0),n.setRecoveryReason(f.target.value)},placeholder:"将自动预填 operator-recovery / run / from-node / detail"}),u.jsx("button",{type:"button",className:"btn btn-secondary",disabled:s,"data-testid":"recovery-reason-refresh",onClick:()=>{n.setRecoveryReasonTouched(!1),n.setRecoveryReason(n.buildCurrentRecoveryReason(n.recoveryConfirm?.label))},children:"重新预填原因"})]}),u.jsxs("div",{className:"recovery-lane","data-testid":"recovery-lane-dag",children:[u.jsx("h3",{children:"DAG 运行恢复"}),u.jsx("p",{className:"muted",children:"针对 `.harness/dag-runs` 的 Agent DAG 运行。橙色为当前建议;带 * 需确认原因。"}),u.jsxs("div",{className:"recovery-cta-row","data-testid":"recovery-cta-row-dag",children:[n.recoveryLanes.dag.map(f=>{const m=f.id===n.recommendedCtaId;return u.jsxs("button",{type:"button",className:m?"btn btn-primary":"btn btn-secondary",disabled:s,title:f.guide,"aria-pressed":n.recoveryConfirm?.id===f.id?!0:void 0,"data-testid":`recovery-cta-${f.id}`,"data-recommended":m?"true":void 0,onClick:()=>{n.handleRecoveryCta(f)},children:[f.label,f.requiresReason?" *":""]},f.id)}),u.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!n.dagRunId.trim(),"data-testid":"recovery-dag-preview",title:"在本页侧栏预览,可关闭返回",onClick:()=>{if(!n.dagRunId.trim()){t.setOpError("侧栏预览需要先选择 DAG 运行 ID");return}n.setInspectSplitOpen(!0)},children:"侧栏预览"})]}),n.recoveryReport?u.jsxs("div",{className:"recovery-report","data-testid":"recovery-report",children:[u.jsxs("div",{className:"recovery-report-header",children:[u.jsx("h3",{children:"交接报告摘要"}),u.jsx("button",{type:"button",className:"btn btn-ghost","data-testid":"recovery-report-close",onClick:()=>n.setRecoveryReport(null),children:"关闭"})]}),u.jsxs("dl",{className:"recovery-report-facts",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"运行"}),u.jsx("dd",{children:u.jsx("code",{children:n.recoveryReport.runId})})]}),n.recoveryReport.title?u.jsxs("div",{children:[u.jsx("dt",{children:"标题"}),u.jsx("dd",{children:n.recoveryReport.title})]}):null,u.jsxs("div",{children:[u.jsx("dt",{children:"状态"}),u.jsx("dd",{children:n.recoveryReport.status??"—"})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"失败分类"}),u.jsx("dd",{children:n.recoveryReport.category??"—"})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"建议"}),u.jsx("dd",{children:n.recoveryReport.recommendation??"暂无结构化建议"})]})]}),u.jsxs("p",{className:"muted",children:["完整 Markdown 可用 CLI:",u.jsxs("code",{children:["loop-agent dag report --run-id"," ",n.recoveryReport.runId," --markdown"]})]})]}):null,u.jsx(z2,{lane:"dag",cta:n.recoveryConfirm,...c})]}),u.jsxs("div",{className:"recovery-lane","data-testid":"recovery-lane-worker",children:[u.jsx("h3",{children:"Worker Task 重排队"}),u.jsx("p",{className:"muted",children:"针对 agent-worker Task Pool,不是 DAG run。需要 Task ID;Feature ID 可选。"}),u.jsxs("label",{className:"field",children:[u.jsx("span",{className:"muted",children:"Task ID(Worker 重排队必填)"}),u.jsx("input",{"data-testid":"recovery-worker-task-id",value:a.taskId,disabled:s,onChange:f=>a.setTaskId(f.target.value.trim()),placeholder:"harness / worker task-id"})]}),u.jsxs("label",{className:"field",children:[u.jsx("span",{className:"muted",children:"Feature ID(可选)"}),u.jsx("input",{"data-testid":"recovery-feature-id",value:n.featureId,disabled:s,onChange:f=>n.setFeatureId(f.target.value.trim()),placeholder:"feature-id"})]}),u.jsx("div",{className:"recovery-cta-row","data-testid":"recovery-cta-row-worker",children:n.recoveryLanes.worker.length>0?n.recoveryLanes.worker.map(f=>u.jsxs("button",{type:"button",className:f.id===n.recommendedCtaId?"btn btn-primary":"btn btn-secondary",disabled:s,title:f.guide,"data-testid":`recovery-cta-${f.id}`,"data-recommended":f.id===n.recommendedCtaId?"true":void 0,onClick:()=>{n.handleRecoveryCta(f)},children:[f.label,f.requiresReason?" *":""]},f.id)):u.jsx("p",{className:"muted","data-testid":"recovery-worker-unavailable",children:"当前事实分类下不提供 Worker 重排队。"})}),u.jsx(z2,{lane:"worker",cta:n.recoveryConfirm,...c})]}),u.jsx("div",{className:"recovery-cta-row","data-testid":"recovery-cta-row",hidden:!0,children:n.recoveryCtas.map(f=>u.jsx("span",{children:f.id},f.id))}),n.observeLinkMessage?u.jsxs("p",{className:"muted",children:["[",N8[n.observeLinkStatus],"]"," ",n.observeLinkMessage]}):null,n.observeUrl?u.jsx("p",{className:"muted",children:u.jsx("a",{className:"external-link",href:n.observeUrl,children:n.observeUrl})}):null]})}function oj(e){const{health:t,readiness:n,healthError:a,layers:s,setupBlocked:l,degraded:c}=e;return u.jsxs(u.Fragment,{children:[u.jsxs("section",{className:"panel","aria-labelledby":"settings-title",children:[u.jsx("h2",{id:"settings-title",children:"设置"}),u.jsxs("dl",{className:"kv",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"产品"}),u.jsx("dd",{children:t?.productName??"Loop Operator Console"})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"仓库根目录"}),u.jsx("dd",{children:u.jsx("code",{children:t?.repoRoot??"—"})})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"仓库指纹"}),u.jsx("dd",{children:u.jsx("code",{title:t?.repoFingerprint??void 0,children:t?.repoFingerprint?`${t.repoFingerprint.slice(0,12)}…`:"—"})})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Pi 就绪"}),u.jsxs("dd",{children:[u.jsxs("code",{children:[$2[n]??n,"(",n,")"]}),l?u.jsx("p",{className:"muted",children:"Pi SDK / 认证 / 模型未就绪。不提供纯表单兜底。请前往「模型与认证」。"}):c?u.jsx("p",{className:"muted",children:"Pi 暂时降级:仍可恢复草稿与需求访谈。"}):null]})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Inspect"}),u.jsxs("dd",{children:[u.jsx("code",{children:"/inspect/"}),"(同一 Console 进程)"]})]})]}),a?u.jsx("p",{className:"error",children:a}):null]}),u.jsxs("section",{className:"panel","aria-labelledby":"layers-title",children:[u.jsx("h2",{id:"layers-title",children:"完成语义分层"}),u.jsx("p",{className:"muted",children:"MVP 不执行收尾提交;不显示「任务已关闭/已交付」。"}),u.jsxs("dl",{className:"kv","data-testid":"completion-layers",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"命令"}),u.jsx("dd",{children:eu(s.command)})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"DAG 生命周期"}),u.jsx("dd",{children:eu(s.dag)})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"最终验证"}),u.jsx("dd",{children:eu(s.verification)})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"晋升"}),u.jsx("dd",{children:eu(s.promote)})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"任务关闭"}),u.jsx("dd",{children:"不可用(MVP)"})]})]})]})]})}function cj(e){const t=(e??"").trim().toLowerCase();return t?t.includes("running")||t==="in_progress"||t==="active"?"running":t.includes("fail")||t.includes("error")||t==="blocked"?"failed":t.includes("finish")||t.includes("success")||t==="done"||t==="ok"?"finished":t.includes("skip")?"skipped":"pending":"pending"}function uj(e){const t=String(e.nodeId??e.id??"").trim();return{nodeId:t,label:String((e.label??e.name??t)||"未命名节点"),status:String(e.status??""),rank:typeof e.rank=="string"?e.rank:void 0,startedAt:typeof e.startedAt=="string"?e.startedAt:void 0,durationMs:typeof e.durationMs=="number"?e.durationMs:void 0,errorPreview:typeof e.errorPreview=="string"?e.errorPreview:void 0}}function Zm(e,t){if(!e)return null;const n=Date.parse(e);if(Number.isNaN(n))return null;const a=t-n;return a>=0?a:null}function dj(e,t=Date.now()){if(!e)return{total:0,finished:0,running:null,failed:null,terminal:!1,effectiveStatus:null,stalled:!1,currentNodeElapsedMs:null,runElapsedMs:null};const a=(Array.isArray(e.nodes)?e.nodes:[]).map(uj),s=a.map(k=>cj(k.status)),l=s.filter(k=>k==="finished"||k==="skipped").length,c=s.indexOf("running"),f=c>=0?a[c]:null,m=s.indexOf("failed"),h=m>=0?a[m]:null,p=String(e.effectiveStatus??e.status??"").toLowerCase(),b=fj.has(p),y=typeof e.startedAt=="string"?e.startedAt:void 0,x=typeof e.durationMs=="number"?e.durationMs:void 0;return{total:a.length,finished:l,running:f,failed:h,terminal:b,effectiveStatus:p||null,stalled:p==="running-suspected-stall",currentNodeElapsedMs:f?.durationMs??Zm(f?.startedAt,t),runElapsedMs:b?x??Zm(y,t):Zm(y,t)}}const fj=new Set(["finished","failed","partial_failed","superseded","abandoned"]);function B2(e){if(e==null||!Number.isFinite(e)||e<0)return"—";const t=Math.floor(e/1e3),n=Math.floor(t/3600),a=Math.floor(t%3600/60),s=t%60;return n>0?`${n} 时 ${a} 分`:a>0?`${a} 分 ${s} 秒`:`${s} 秒`}const mj=5e3;function hj(e){const[t,n]=S.useState(null);return S.useEffect(()=>{const a=e.trim();if(n(null),!a)return;const s=new AbortController;let l;const c=async()=>{try{const f=await fetch(`/api/dag-runs/${encodeURIComponent(a)}`,{credentials:"same-origin",signal:s.signal});if(!f.ok)return;const m=await f.json();if(s.signal.aborted)return;n(m),Qm(m)&&l!==void 0&&(window.clearInterval(l),l=void 0)}catch{}};return c(),l=window.setInterval(()=>{c()},mj),()=>{s.abort(),l!==void 0&&window.clearInterval(l)}},[e]),S.useMemo(()=>dj(t),[t])}function pj(e){const t=[`fragments=${e.fragmentCount}`,`canonical=${e.canonicalRequirementCount}`,`context-only=${e.contextOnlyCount}`,`duplicate=${e.duplicateCount}`,`unresolved=${e.unresolvedCount}`,`conflict=${e.conflictCount}`];return e.bindingSchemaVersion===2&&(t.push(`binding=v2${e.stale?" · STALE(输入漂移)":""}`),e.ledgerSha256&&t.push(`ledgerSha256=${e.ledgerSha256}`),e.inputDigest&&t.push(`inputDigest=${e.inputDigest}`)),t.join(" ")}function Ip(e){const{ledgerLoading:t=!1,ledgerError:n=null,ledgerSummary:a=null}=e;return u.jsxs("div",{className:"contract-checks","data-testid":"ledger-summary-block","aria-busy":t||void 0,"aria-labelledby":"ledger-summary-heading",children:[u.jsx("h4",{id:"ledger-summary-heading",children:"Source fidelity ledger"}),t?u.jsxs("p",{className:"muted",role:"status",children:[u.jsx("span",{className:"sr-only",children:"ledger 加载中"}),"加载中…"]}):n?u.jsxs("p",{className:"muted",role:"alert",children:["ledger 只读接口失败:",n,"(安全降级,不展示敏感内容)"]}):!a||a.present!==!0?u.jsx("p",{className:"empty",role:"status",children:"无 source fidelity ledger(任务无引用或 ledger 缺失,不伪造计数)"}):u.jsxs(u.Fragment,{children:[u.jsxs("p",{children:[u.jsx("strong",{children:"gate"}),": ",S8(a.gateStatus),a.bindingSchemaVersion===2?u.jsxs(u.Fragment,{children:[" ",u.jsxs("code",{"data-testid":"ledger-binding-version",children:["binding v2",a.stale?" · STALE":""]})]}):null,a.failureCode?u.jsxs(u.Fragment,{children:[" ",u.jsx("code",{"data-testid":"ledger-failure-code",children:a.failureCode})]}):null]}),u.jsx("pre",{className:"cmd","data-testid":"ledger-summary",children:pj(a)}),a.exclusions.length>0?u.jsx("ul",{"data-testid":"ledger-exclusions",children:a.exclusions.slice(0,10).map(s=>u.jsxs("li",{className:"muted",children:[u.jsx("code",{children:s.fragmentId}),": ",s.reason]},s.fragmentId))}):null]})]})}function gj(e){const{busy:t,taskId:n,confirmationId:a,confirmationDetails:s,ledgerLoading:l=!1,ledgerError:c=null,ledgerSummary:f=null,runAction:m,onConfirmAndRun:h}=e;return u.jsxs("div",{"data-testid":"panel-dag-confirm",children:[u.jsx("h3",{children:"DAG 确认(§5.5)"}),u.jsxs("ul",{className:"checklist",children:[u.jsx("li",{children:"源绑定(source)"}),u.jsx("li",{children:"Writer 写集范围(writer-scope)"}),u.jsx("li",{children:"验证命令(verification)"}),u.jsx("li",{children:"人工门禁(human-gates)"})]}),s?u.jsx("pre",{className:"cmd",children:JSON.stringify(s,null,2).slice(0,4e3)}):null,u.jsx(Ip,{ledgerLoading:l,ledgerError:c,ledgerSummary:f}),u.jsxs("div",{className:"cta-row",children:[u.jsx("button",{type:"button",className:"btn btn-primary",disabled:t,onClick:()=>{m("prepareDagConfirmation",{taskId:n,dagHandle:`${n}.dag.json`,profile:"auto"})},children:"生成 DAG 并准备确认"}),u.jsx("button",{type:"button",className:"btn btn-primary",disabled:t||!a,onClick:h,children:"开始运行"})]}),a?u.jsxs("p",{className:"muted",children:["确认 ID: ",u.jsx("code",{children:a})]}):null]})}function bj(e){const{busy:t,degraded:n,taskId:a,assessmentId:s,contractValidateOk:l,contractValidateSummary:c,contractDiffSummary:f,contractApplied:m,spineOk:h,ledgerLoading:p=!1,ledgerError:b=null,ledgerSummary:y=null,onRerunPreflight:x,onApplyContract:k,onRetrySpine:N}=e;return u.jsxs("div",{"data-testid":"panel-contract",children:[u.jsx("h3",{children:"契约落地"}),u.jsx("p",{className:"muted",children:"进入本步后自动跑确定性校验与差异(非 AI 代判)。写入仓库仍需你人工确认一次;应用成功后会自动跑 Spine 审计。"}),u.jsxs("p",{className:"muted",children:["评估 ID: ",u.jsx("code",{children:s??"—"})]}),u.jsxs("div",{className:"contract-checks",children:[u.jsxs("p",{children:[u.jsx("strong",{children:"校验"}),":"," ",l===null?t?"进行中…":"等待开始":l?"通过":"未通过"]}),c?u.jsx("pre",{className:"cmd","data-testid":"contract-validate-summary",children:c}):null,u.jsxs("p",{children:[u.jsx("strong",{children:"差异"}),f?"":":尚未拉取"]}),f?u.jsx("pre",{className:"cmd","data-testid":"contract-diff-summary",children:f}):null,m?u.jsxs("p",{children:[u.jsx("strong",{children:"Spine"}),":"," ",h===null?"待检查":h?"通过":"未通过"]}):null]}),u.jsx(Ip,{ledgerLoading:p,ledgerError:b,ledgerSummary:y}),u.jsxs("div",{className:"cta-row",children:[u.jsx("button",{type:"button",className:"btn btn-secondary",disabled:t||!a.trim(),onClick:x,children:"重新校验"}),u.jsx("button",{type:"button",className:"btn btn-primary","data-testid":"contract-apply",disabled:t||n||!s||l!==!0||m,onClick:k,children:"确认并应用契约"}),m&&h===!1?u.jsx("button",{type:"button",className:"btn btn-primary",disabled:t,onClick:N,children:"重试 Spine"}):null]})]})}function vj(e){const{busy:t,taskKind:n,onTaskKindChange:a,workflowHint:s,prd:l,engineering:c,onEngineeringChange:f,onImport:m}=e,h=t||l.prdFileReading;return u.jsxs("div",{"data-testid":"panel-import-prd",children:[u.jsx("h3",{children:"导入需求"}),u.jsx("p",{className:"muted",children:"粘贴、选择或拖入一份或多份 PRD / 需求 Markdown。多文件会分别归档到 source/references,并合成一份可编辑正文。创建前可继续编辑。 系统会对 PRD 做确定性/语义结构化;工程边界(路径与验证)须人类确认,不会由模型编造。"}),u.jsxs("label",{className:"field",children:[u.jsx("span",{className:"muted",children:"流程类型"}),u.jsx("select",{"data-testid":"workflow-kind-select",value:n,disabled:t||l.prdFileReading,onChange:p=>a(p.target.value),children:Wm.map(p=>u.jsx("option",{value:p.kind,children:p.label},p.kind))})]}),u.jsxs("p",{className:"workflow-hint","data-testid":"workflow-kind-hint",children:[s," · taskKind=",u.jsx("code",{children:n})]}),u.jsxs("div",{className:`prd-drop-zone${l.prdDragOver?" is-dragover":""}`,"data-testid":"prd-drop-zone","data-dragover":l.prdDragOver?"true":"false",onDragEnter:p=>l.onDragEnter(p,h),onDragOver:p=>{p.preventDefault(),p.stopPropagation()},onDragLeave:l.onDragLeave,onDrop:p=>l.onDrop(p,h),children:[u.jsxs("div",{className:"prd-upload-toolbar",children:[u.jsxs("label",{className:`btn btn-ghost prd-upload-btn${h?" is-disabled":""}`,children:["选择需求文档",u.jsx("input",{type:"file",accept:mD,multiple:!0,hidden:!0,disabled:h,"data-testid":"prd-file-input",onChange:p=>{const b=p.currentTarget;l.loadPrdFromFiles(b.files).finally(()=>{b.value=""})}})]}),u.jsxs("span",{className:"muted prd-upload-hint",children:["支持多文件 .md / .markdown / .txt,单文件最大"," ",Lh(jh),",最多 ",Uu," 个"]}),l.prdDocuments.length>0?u.jsx("button",{type:"button",className:"btn btn-ghost","data-testid":"prd-recompose",disabled:h,onClick:l.recomposeDocuments,children:"按文件重新合成"}):null]}),l.prdDocuments.length>0?u.jsx("ul",{className:"prd-file-list","data-testid":"prd-file-list",children:l.prdDocuments.map((p,b)=>u.jsxs("li",{className:b===l.prdPrimaryIndex?"is-primary":void 0,"data-testid":`prd-file-item-${b}`,children:[u.jsxs("span",{className:"prd-file-item-name",children:[p.fileName,b===l.prdPrimaryIndex?u.jsx("span",{className:"prd-file-primary-tag",children:"主"}):null,u.jsxs("span",{className:"muted",children:[" ","· ",Lh(p.sourceBytes)]})]}),u.jsxs("span",{className:"prd-file-item-actions",children:[u.jsx("button",{type:"button",className:"btn btn-ghost",disabled:h||b===l.prdPrimaryIndex,onClick:()=>l.setPrimaryDocument(b),children:"设为主"}),u.jsx("button",{type:"button",className:"btn btn-ghost",disabled:h||b===0,onClick:()=>l.moveDocument(b,-1),children:"上移"}),u.jsx("button",{type:"button",className:"btn btn-ghost",disabled:h||b===l.prdDocuments.length-1,onClick:()=>l.moveDocument(b,1),children:"下移"}),u.jsx("button",{type:"button",className:"btn btn-ghost",disabled:h,onClick:()=>l.removeDocument(b),children:"移除"})]})]},`${p.fileName}-${b}`))}):null,l.prdDocuments.length>0?u.jsxs("div",{className:"prd-file-meta",children:[u.jsxs("span",{children:["分卷=上传原件(将分别归档);正文=本会话采用稿",l.prdComposedDirty?"(已手动编辑)":""]}),u.jsx("button",{type:"button",className:"btn btn-ghost prd-file-clear","data-testid":"prd-file-clear",disabled:h,onClick:l.clearDocuments,children:"清除来源列表"})]}):null,l.prdDragOver?u.jsx("p",{className:"prd-drop-hint","data-testid":"prd-drop-hint",children:"释放以载入"}):null,u.jsxs("label",{className:"field prd-text-field",children:[u.jsx("span",{className:"muted",children:"PRD Markdown"}),u.jsx("textarea",{rows:10,value:l.prdText,disabled:h,"data-testid":"prd-textarea",onChange:p=>l.onPrdTextChange(p.target.value)})]})]}),l.prdFileError?u.jsx("p",{className:"prd-file-error",role:"alert","aria-live":"polite","data-testid":"prd-file-error",children:l.prdFileError}):null,u.jsxs("details",{className:"engineering-boundary","data-testid":"engineering-boundary",children:[u.jsx("summary",{children:"工程边界(可选,人类确认)"}),u.jsxs("p",{className:"muted",children:["逗号或换行分隔。留空则 intake 后进入访谈补齐;不会自动填",u.jsx("code",{children:"src/worker/console/**"})," 模板。"]}),u.jsxs("label",{className:"field",children:[u.jsx("span",{className:"muted",children:"allowedPaths"}),u.jsx("textarea",{rows:2,value:c.allowedPathsText,disabled:h,"data-testid":"prd-allowed-paths",placeholder:"src/**, test/**",onChange:p=>f({allowedPathsText:p.target.value})})]}),u.jsxs("label",{className:"field",children:[u.jsx("span",{className:"muted",children:"forbiddenPaths"}),u.jsx("textarea",{rows:2,value:c.forbiddenPathsText,disabled:h,"data-testid":"prd-forbidden-paths",placeholder:".harness/**, node_modules/**",onChange:p=>f({forbiddenPathsText:p.target.value})})]}),u.jsxs("label",{className:"field",children:[u.jsx("span",{className:"muted",children:"verifyCommands(label:command 或纯命令)"}),u.jsx("textarea",{rows:2,value:c.verifyCommandsText,disabled:h,"data-testid":"prd-verify-commands",placeholder:"typecheck:npm run typecheck",onChange:p=>f({verifyCommandsText:p.target.value})})]})]}),u.jsx("div",{className:"cta-row",children:u.jsxs("button",{type:"button",className:`btn btn-primary${t?" is-loading":""}`,disabled:t||l.prdFileReading||!l.prdText.trim(),"aria-busy":t||void 0,onClick:m,children:[t?u.jsx("span",{className:"spinner","aria-hidden":"true"}):null,t?"导入中…":"导入并创建任务"]})})]})}function yj(e){const{busy:t,taskId:n,taskTitle:a,taskKind:s,sessionId:l,question:c,answerText:f,onAnswerTextChange:m,draftSummary:h,assessmentId:p,runAction:b}=e;return u.jsxs("div",{"data-testid":"panel-interview",children:[u.jsx("h3",{children:"需求访谈(grill-me)"}),u.jsx("p",{className:"muted",children:"一次一问;也可跳过:系统会按推荐补齐草稿并签发评估,随后进入校验。 访谈中不可应用契约 / 运行 DAG / 对账。"}),h?u.jsx("pre",{className:"cmd","data-testid":"draft-summary",children:JSON.stringify(h,null,2)}):null,u.jsxs("div",{className:"cta-row",style:{marginBottom:"0.75rem"},children:[!l||!c?u.jsx("button",{type:"button",className:"btn btn-primary",disabled:t||!n.trim(),onClick:()=>{b("interviewStart",{taskId:n,title:a,taskKind:s})},children:"开始 / 继续访谈"}):null,u.jsx("button",{type:"button",className:"btn btn-ghost","data-testid":"interview-skip",disabled:t||!n.trim(),onClick:()=>{b("interviewSkip",{taskId:n,title:a,taskKind:s})},children:"跳过访谈"})]}),l&&c?u.jsxs("div",{className:"interview-card",children:[u.jsxs("p",{className:"interview-q",children:[u.jsx("strong",{children:c.id})," · 风险=",G2[c.risk??""]??c.risk??"—"]}),u.jsx("p",{children:c.text}),c.recommendation?u.jsxs("p",{className:"muted",children:["推荐:",c.recommendation]}):null,u.jsxs("label",{className:"field",children:[u.jsx("span",{className:"muted",children:"你的回答(覆盖推荐)"}),u.jsx("textarea",{rows:3,value:f,disabled:t,onChange:y=>m(y.target.value)})]}),u.jsxs("div",{className:"cta-row",children:[u.jsx("button",{type:"button",className:"btn btn-primary",disabled:t,onClick:()=>{b("interviewTurn",{sessionId:l,questionId:c.id,response:"accept-recommendation"}).then(()=>m(""))},children:"接受推荐"}),u.jsx("button",{type:"button",className:"btn btn-primary",disabled:t||!f.trim(),onClick:()=>{b("interviewTurn",{sessionId:l,questionId:c.id,response:"override",text:f}).then(()=>m(""))},children:"提交自定义回答"}),u.jsx("button",{type:"button",className:"btn btn-secondary",disabled:t||c.risk==="high",onClick:()=>{b("interviewTurn",{sessionId:l,questionId:c.id,response:"defer",text:f||c.recommendation}).then(()=>m(""))},children:"暂缓(非高风险)"})]})]}):null,p?u.jsxs("p",{className:"muted",children:["评估 ID: ",u.jsx("code",{children:p})]}):null]})}function xj({progress:e}){const t=e.total>0?Math.round(e.finished/e.total*100):0;return u.jsxs("div",{className:"run-progress","data-testid":"run-progress",children:[u.jsxs("div",{className:"run-progress-head",children:[u.jsxs("b",{children:["节点进度 ",e.finished,"/",e.total||"—",e.total>0?`(${t}%)`:""]}),u.jsx("span",{className:`run-progress-status${e.stalled?" is-stalled":""}`,"data-testid":"run-progress-status",children:e.effectiveStatus??"未知状态"})]}),u.jsx("div",{className:"run-progress-bar",role:"progressbar","aria-valuemin":0,"aria-valuemax":e.total,"aria-valuenow":e.finished,"aria-label":"DAG 节点完成进度",children:u.jsx("span",{style:{width:`${t}%`}})}),u.jsx("p",{className:"run-progress-current","data-testid":"run-progress-current",children:e.running?u.jsxs(u.Fragment,{children:["当前节点:",u.jsx("strong",{children:e.running.label}),"(已运行 ",B2(e.currentNodeElapsedMs),")"]}):e.terminal?u.jsxs(u.Fragment,{children:["运行已结束(总时长 ",B2(e.runElapsedMs),")"]}):u.jsx(u.Fragment,{children:"暂无正在运行的节点"})}),e.stalled?u.jsx("p",{className:"run-progress-stall","data-testid":"run-progress-stall",children:"疑似停滞:超过阈值没有实质进展。可打开检视查看节点活动,或到恢复页 使用协作中止 / 诊断入口判断是否继续等待。"}):null,e.failed?u.jsxs("p",{className:"run-progress-failed","data-testid":"run-progress-failed",children:["失败节点:",u.jsx("strong",{children:e.failed.label}),e.failed.errorPreview?` — ${e.failed.errorPreview}`:""]}):null]})}function wj(e){const{busy:t,confirmationId:n,operationId:a,dagRunId:s,observeBusy:l,ledgerLoading:c=!1,ledgerError:f=null,ledgerSummary:m=null,sseLog:h,progress:p,runAction:b,onStopFollow:y,onShowInspectSplit:x,onOpenInspectSplit:k}=e;return u.jsxs("div",{"data-testid":"panel-run",children:[u.jsx("h3",{children:"运行详情"}),u.jsxs("div",{className:"meta-row",children:[u.jsxs("div",{children:["操作 ID: ",u.jsx("code",{children:a??"—"})]}),u.jsxs("div",{children:["确认 ID: ",u.jsx("code",{children:n??"—"})]})]}),u.jsx(Ip,{ledgerLoading:c,ledgerError:f,ledgerSummary:m}),u.jsxs("div",{className:"cta-row",children:[u.jsx("button",{type:"button",className:"btn btn-primary",disabled:t||!n,onClick:()=>{b("runDag",{confirmationId:n},{clientRequestId:wu("run")})},children:"重新运行"}),u.jsx("button",{type:"button",className:"btn btn-secondary",onClick:y,children:"停止跟随日志"}),u.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!s.trim(),onClick:x,children:"打开检视"}),u.jsx("button",{type:"button",className:"btn btn-ghost",disabled:l||!s.trim(),title:"在本页侧栏预览当前运行的 DAG,可关闭返回",onClick:k,children:"侧栏预览"})]}),p?u.jsx(xj,{progress:p}):null,u.jsxs("details",{className:"run-sse-log",children:[u.jsx("summary",{children:"原始事件日志(最近 80 条)"}),u.jsx("pre",{className:"cmd","data-testid":"sse-log",children:h.join(`
|
|
406
|
-
`)||"(尚无事件)"})]})]})}const nx=[2e3,2e3,4e3,4e3,8e3,8e3,15e3,15e3,3e4,3e4];function Sj(e,t){if(e===!0)return{kind:"own"};if(e===!1)return{kind:"clear"};const n=nx[t];return n===void 0?{kind:"give-up"}:{kind:"retry",delayMs:n}}nx.reduce((e,t)=>e+t,0);function kj(){return{baseline:null,ownedRunId:"",pendingSelection:""}}function Ej(e,t){const n=e.task===void 0,a=!n&&e.task!==t.task,s=!n&&e.dispatch!==t.dispatchId,l={...e,task:t.task,dispatch:t.dispatchId,pendingSelection:""};if(a)return l.baseline=null,l.ownedRunId="",{state:l,observation:{action:"reset-selection"}};if(s&&(l.ownedRunId="",t.selectedRunId))return l.baseline=t.selectedRunId,{state:l,observation:{action:"invalidate-selection"}};const c=t.selectedRunId;return c&&c!==l.ownedRunId?(l.pendingSelection=c,{state:l,observation:{action:"verify-ownership"}}):{state:l,observation:{action:c?"idle":"probe"}}}function U2(e){return{...e,baseline:null}}function Tj(e,t){return{...e,baseline:t??""}}function Nj(e,t){return!t.ok||!t.dagRunId?{state:e,acceptedRunId:null}:e.baseline===null||t.dagRunId===e.baseline?{state:e,acceptedRunId:null}:{state:{...e,ownedRunId:t.dagRunId},acceptedRunId:t.dagRunId}}function Cj(e,t){return t?{state:{...e,ownedRunId:e.pendingSelection,pendingSelection:""},clearSelection:!1}:{state:{...e,ownedRunId:"",pendingSelection:"",baseline:null},clearSelection:!0}}async function q2(e){try{const{status:t,body:n}=await ko("observeLink",{taskId:e});if(t>=400||n.ok===!1)return{ok:!1};const a=n.result??{};return{ok:!0,dagRunId:(typeof a.dagRunId=="string"?a.dagRunId.trim():"")||null}}catch{return{ok:!1}}}async function Rj(e,t){try{const n=await fetch(`/api/dag-runs/${encodeURIComponent(e)}`,{credentials:"same-origin"});if(n.status===404)return!1;if(!n.ok)return null;const a=await n.json(),s=typeof a.taskId=="string"?a.taskId.trim():"";return s?s===t.trim():null}catch{return null}}function Aj(e){const{shell:t,actions:n,wizard:a,prd:s,recovery:l}=e,{busy:c,step:f,setupBlocked:m,degraded:h}=t,p=S.useRef(kj()),b=S.useRef(0),[y,x]=S.useState(""),k=S.useCallback(C=>{const _=++b.current;p.current=U2(p.current);const I=async $=>{const D=await q2(C);if(b.current===_){if(D.ok){p.current=Tj(p.current,D.dagRunId);return}$>0&&window.setTimeout(()=>{I($-1)},1500)}};I(8)},[]);S.useEffect(()=>{if(f!=="dag-confirm")return;const C=a.taskId.trim();if(!C){b.current+=1,p.current=U2(p.current);return}k(C)},[f,a.taskId,k]),S.useEffect(()=>{if(f!=="run")return;const C=a.taskId.trim();if(!C)return;const _=Ej(p.current,{task:C,dispatchId:n.operationId??null,selectedRunId:l.dagRunId.trim()});switch(p.current=_.state,x(_.state.ownedRunId),_.observation.action){case"reset-selection":{l.setManualRunId(!1),l.setDagRunId(""),k(C);return}case"invalidate-selection":{l.setManualRunId(!1),l.setDagRunId("");return}case"verify-ownership":{const I=_.state.pendingSelection;let $=!1,D=0;const M=async B=>{if($)return;const Y=await Rj(I,C);if($)return;const G=Sj(Y,B);if(G.kind==="own"||G.kind==="clear"){const j=Cj(p.current,G.kind==="own");p.current=j.state,x(j.state.ownedRunId),j.clearSelection&&(l.setManualRunId(!1),l.setDagRunId(""),k(C));return}G.kind==="retry"&&(D=window.setTimeout(()=>{M(B+1)},G.delayMs))};return M(0),()=>{$=!0,window.clearTimeout(D)}}case"idle":return;case"probe":{p.current.baseline===null&&k(C);let I=!1,$=0,D=0;const M=async()=>{if(I)return;if(p.current.baseline===null){D+=1,D<120&&($=window.setTimeout(()=>{M()},1e3));return}const B=await q2(C);if(I)return;D+=1;const Y=Nj(p.current,B);if(p.current=Y.state,Y.acceptedRunId){x(Y.state.ownedRunId),l.setManualRunId(!0),l.setDagRunId(Y.acceptedRunId);return}D<120&&($=window.setTimeout(()=>{M()},2500))};return $=window.setTimeout(()=>{M()},1200),()=>{I=!0,window.clearTimeout($)}}}},[f,n.operationId,a.taskId,l.dagRunId,l.setManualRunId,l.setDagRunId,k]);const N=l.dagRunId===y?l.dagRunId:"",R=hj(f==="run"?N:"");return u.jsxs("section",{className:"panel task-ops","aria-labelledby":"task-ops-title",children:[u.jsx("h2",{id:"task-ops-title",children:"任务操作"}),u.jsx("p",{className:"panel-lead",children:"按 Happy Path 推进;契约落地一步内自动校验,人工确认写入。"}),u.jsx("ol",{className:"wizard-steps","data-testid":"wizard-steps",children:a.wizardSteps.map((C,_)=>u.jsxs("li",{"data-active":f===C.id,"data-done":_<a.stepIndex,children:[u.jsx("span",{className:"step-index",children:String(_+1).padStart(2,"0")}),u.jsx("span",{className:"step-label",children:C.label})]},C.id))}),u.jsxs("label",{className:"field",children:[u.jsx("span",{className:"muted",children:"任务 ID"}),u.jsx("input",{"data-testid":"task-id-input",value:a.taskId,disabled:c||m||f==="import-prd",placeholder:f==="import-prd"?"导入需求后自动生成":"task-id",onChange:C=>a.setTaskId(C.target.value.trim())})]}),a.taskTitle?u.jsxs("p",{className:"workflow-hint","data-testid":"task-title-chip",children:["任务名称:",a.taskTitle]}):null,f!=="import-prd"&&!m?u.jsxs("p",{className:"workflow-hint","data-testid":"workflow-kind-chip",children:["当前流程:",a.workflowMeta.label," ·"," ",u.jsx("code",{children:a.taskKind})]}):null,m||f==="setup"?u.jsxs("div",{className:"empty-state","data-testid":"setup-gate",children:[u.jsx("p",{className:"empty-title",children:"需要先完成设置"}),u.jsx("p",{className:"muted",children:"请先在「模型与认证」完成 Pi 就绪,再导入需求与访谈。"}),u.jsxs("div",{className:"cta-row",children:[u.jsx("button",{type:"button",className:"btn btn-primary",disabled:c,onClick:()=>{t.selectNav("models"),n.runAction("refreshReadiness",{}).then(()=>t.loadHealth())},children:"刷新就绪状态"}),u.jsx("button",{type:"button",className:"btn btn-primary",disabled:c,onClick:()=>{n.runAction("doctor",{})},children:"运行诊断"}),u.jsx("pre",{className:"cmd",children:P2})]})]}):u.jsxs("div",{className:"wizard-body","data-testid":"wizard-body",children:[f==="import-prd"&&u.jsx(vj,{busy:c,taskKind:a.taskKind,onTaskKindChange:a.setTaskKind,workflowHint:a.workflowMeta.hint,prd:s,engineering:a.engineering,onEngineeringChange:a.setEngineering,onImport:()=>{a.importPrdAndCreate()}}),f==="interview"&&u.jsx(yj,{busy:c,taskId:a.taskId,taskTitle:a.taskTitle,taskKind:a.taskKind,sessionId:a.sessionId,question:a.question,answerText:a.answerText,onAnswerTextChange:a.setAnswerText,draftSummary:a.draftSummary,assessmentId:a.assessmentId,runAction:n.runAction}),f==="contract"&&u.jsx(bj,{busy:c,degraded:h,taskId:a.taskId,assessmentId:a.assessmentId,contractValidateOk:a.contractValidateOk,contractValidateSummary:a.contractValidateSummary,contractDiffSummary:a.contractDiffSummary,contractApplied:a.contractApplied,spineOk:a.spineOk,ledgerLoading:a.ledgerLoading,ledgerError:a.ledgerError,ledgerSummary:a.ledgerSummary,onRerunPreflight:()=>{a.runContractPreflight(!0)},onApplyContract:()=>{a.applyContractThenSpine()},onRetrySpine:()=>{a.retrySpineOnly()}}),f==="dag-confirm"&&u.jsx(gj,{busy:c,taskId:a.taskId,confirmationId:n.confirmationId,confirmationDetails:n.confirmationDetails,ledgerLoading:a.ledgerLoading,ledgerError:a.ledgerError,ledgerSummary:a.ledgerSummary,runAction:n.runAction,onConfirmAndRun:()=>{a.confirmAndRunDag()}}),f==="run"&&u.jsx(wj,{busy:c,confirmationId:n.confirmationId,operationId:n.operationId,dagRunId:N,observeBusy:t.observeBusy,ledgerLoading:a.ledgerLoading,ledgerError:a.ledgerError,ledgerSummary:a.ledgerSummary,sseLog:n.sseLog,progress:R,runAction:n.runAction,onStopFollow:n.stopFollowSse,onShowInspectSplit:()=>{N.trim()&&l.setInspectSplitOpen(!0)},onOpenInspectSplit:()=>{N.trim()&&l.openInspectSplit()}})]})]})}const _j={};function Ij(){const e=cD(),t=S.useRef(()=>{}),n=S.useCallback(p=>t.current(p),[]),a=dD({shell:e,applyInterviewPayload:n}),s=CD(),l=VD({shell:e,actions:a,prd:s}),c=$D({shell:e,actions:a,wizard:l});S.useEffect(()=>{t.current=l.applyInterviewPayload}),S.useEffect(()=>{e.loadHealth()},[e.loadHealth]);const f=S.useCallback((p,b={})=>{e.selectNav(p),b.taskId&&l.setTaskId(b.taskId),b.dagRunId&&c.setDagRunId(b.dagRunId),b.fromNodeId&&c.setFromNodeId(b.fromNodeId),b.featureId&&c.setFeatureId(b.featureId),c.setInterruptIntent(b.intent==="interrupt");const y=H6(p,b);window.location.hash.replace(/^#/,"")!==y&&(window.location.hash=y)},[e.selectNav,l.setTaskId,c.setDagRunId,c.setFromNodeId,c.setFeatureId,c.setInterruptIntent]),m=S.useCallback(()=>{const p=VI(window.location);if(p){f(p.workspace,p);return}const b=q6({env:_j?.VITE_OPERATOR_CHAT_DEFAULT_LANDING,storage:window.localStorage,location:window.location});f(b,{})},[f]);S.useEffect(()=>(m(),window.addEventListener("hashchange",m),()=>window.removeEventListener("hashchange",m)),[m]);const h=e.nav==="recovery"&&c.dagRunId.trim()?`/inspect/#/dag/${encodeURIComponent(c.dagRunId.trim())}?from=recovery`:"/inspect/#/";return u.jsx(u.Fragment,{children:u.jsxs("div",{className:`console-app${e.nav==="chat"?" is-chat-focus":""}`,children:[u.jsx(WD,{nav:e.nav,readiness:e.readiness,setupBlocked:e.setupBlocked,degraded:e.degraded,health:e.health,inspectHref:h}),u.jsx(QD,{busy:e.busy,runAction:a.runAction}),u.jsxs("div",{className:`console-shell${e.nav==="chat"?" is-chat-focus":""}`,children:[u.jsx(JD,{opError:e.opError,opMessage:e.opMessage}),u.jsxs("main",{className:`console-main${e.nav==="chat"?" console-main--fill":""}`,children:[e.nav==="tasks"?u.jsx(Aj,{shell:e,actions:a,wizard:l,prd:s,recovery:c}):null,e.nav==="recovery"?u.jsx(lj,{shell:e,recovery:c,wizard:l}):null,e.nav==="night"?u.jsx(G8,{busy:e.busy,runAction:a.runAction,isActionSuccess:a.isActionSuccess,setOpError:e.setOpError}):null,e.nav==="models"?u.jsx(ij,{busy:e.busy,readiness:e.readiness,readinessReport:e.readinessReport,health:e.health,onRefreshReadiness:()=>{a.runAction("refreshReadiness",{}).then(()=>e.loadHealth())},onSaveMatrix:async p=>{const b=await a.runAction("savePiModelMatrix",{matrix:p});return await e.loadHealth(),b}}):null,e.nav==="chat"?u.jsxs("section",{className:"panel panel--chat","aria-labelledby":"chat-title",children:[u.jsx("h2",{id:"chat-title",className:"sr-only",children:"对话"}),u.jsx(lD,{origin:"",readiness:e.readiness,surface:"workspace",onNavigateWorkspace:f})]}):null,e.nav==="settings"?u.jsx(oj,{health:e.health,readiness:e.readiness,healthError:e.healthError,layers:e.layers,setupBlocked:e.setupBlocked,degraded:e.degraded}):null]}),c.inspectSplitOpen&&c.dagRunId.trim()?u.jsx(M8,{dagRunId:c.dagRunId.trim(),nodeId:c.fromNodeId.trim()||void 0,onClose:()=>c.setInspectSplitOpen(!1),onOpenFull:c.openFullInspect}):null]})]})})}const rx=document.getElementById("root");if(!rx)throw new Error("Loop Operator Console: #root missing");h8.createRoot(rx).render(u.jsx(S.StrictMode,{children:u.jsx(Ij,{})}));export{sS as _,qu as g,Mj as k};
|