@tea-agent/loop-agent 0.38.0 → 0.38.2
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 +191 -0
- package/dist/application/dag/generate-task-dag.js +9 -0
- package/dist/build-stamp.json +3 -3
- package/dist/commands/init-upgrade.js +97 -19
- package/dist/executors/dag-pi-executor.js +42 -4
- package/dist/executors/shell-executor.js +269 -15
- package/dist/infrastructure/harness/atomic-write.js +2 -1
- package/dist/shared/openspec-spec.js +76 -0
- package/dist/shared/operator/capabilities.js +149 -27
- package/dist/task/config-types.js +43 -0
- package/dist/task/frontend-project-capability.js +292 -38
- package/dist/worker/console/chat/deferred-turn.js +91 -0
- package/dist/worker/console/chat/mcp-inventory.js +221 -0
- package/dist/worker/console/chat/pi-runtime.js +165 -83
- package/dist/worker/console/chat/repo-walk.js +10 -1
- package/dist/worker/console/chat/routes.js +477 -55
- package/dist/worker/console/chat/semantic-activity.js +20 -8
- package/dist/worker/console/chat/session-store.js +146 -2
- package/dist/worker/console/chat/turn-process.js +17 -30
- package/dist/worker/console/harness-pi-model-matrix.js +137 -0
- package/dist/worker/console/operator-actions.js +128 -4
- package/dist/worker/console/operator-user-error.js +19 -0
- package/dist/worker/console/pi-readiness.js +8 -1
- package/dist/worker/console/recovery-cta.js +4 -4
- package/dist/worker/console/recovery-error-copy.js +4 -4
- package/dist/worker/console/security.js +20 -1
- package/dist/worker/console/server.js +6 -1
- package/dist/worker/console/static/assets/{abnfDiagram-N423BO3Z-DSvF6RXQ.js → abnfDiagram-N423BO3Z-C4bmo3iY.js} +1 -1
- package/dist/worker/console/static/assets/{arc-DuI4ogtJ.js → arc-SAD7McOS.js} +1 -1
- package/dist/worker/console/static/assets/{architectureDiagram-T3A2C74G-DdBbgD4y.js → architectureDiagram-T3A2C74G-DAVLUdK1.js} +1 -1
- package/dist/worker/console/static/assets/{blockDiagram-VBNYF7ZC-xQC2HELm.js → blockDiagram-VBNYF7ZC-CPPdv4vj.js} +1 -1
- package/dist/worker/console/static/assets/{c4Diagram-5PPSVZJV-DPMSgwIZ.js → c4Diagram-5PPSVZJV-D1GRGZax.js} +1 -1
- package/dist/worker/console/static/assets/channel-R6oQIDkw.js +1 -0
- package/dist/worker/console/static/assets/{chunk-2GRJ4B5K-WTEKTxin.js → chunk-2GRJ4B5K-D_Bq2ZqK.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-2Q5K7J3B-B6vZ0Pv_.js → chunk-2Q5K7J3B-CPLVtamK.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5RXB4S5H-BrerNAix.js → chunk-5RXB4S5H-DnaZWcL3.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5VM5RSS4-D_ch2aaI.js → chunk-5VM5RSS4-BRTmFgnq.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-6Q2QTUOP-VvfacNrq.js → chunk-6Q2QTUOP-BRlfYZoH.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-GF5L2VYU-B-uGFIg2.js → chunk-GF5L2VYU-CjNybD4u.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-JWPE2WC7-BlysCtod.js → chunk-JWPE2WC7-D3e-74fG.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-KBJHAD2P-BjAUAfcT.js → chunk-KBJHAD2P-Br3ir6f2.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-RYQCIY6F-BeZnBmb-.js → chunk-RYQCIY6F-1NgVuRbh.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-XXDRQBXY-Bbfe3UJG.js → chunk-XXDRQBXY-BTYuvuWN.js} +1 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-BPXlmPWI.js +1 -0
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-BPXlmPWI.js +1 -0
- package/dist/worker/console/static/assets/{cose-bilkent-JH36ORCC-BKJQnYVM.js → cose-bilkent-JH36ORCC-BC6Bgosf.js} +1 -1
- package/dist/worker/console/static/assets/{cynefin-VYW2F7L2-B1wtI3hU.js → cynefin-VYW2F7L2-DV-HypfL.js} +1 -1
- package/dist/worker/console/static/assets/{cynefinDiagram-MW4NZA55-DCF6DBSu.js → cynefinDiagram-MW4NZA55-DhTaddO-.js} +1 -1
- package/dist/worker/console/static/assets/{dagre-VZM6K2ZE-BJyNGRlP.js → dagre-VZM6K2ZE-BnEcOmiI.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-7IWD3JNH-B7j1-VsZ.js → diagram-7IWD3JNH-xphGRVKp.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-B4RE2ZJO-BREJ140a.js → diagram-B4RE2ZJO-CrdD1mRG.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-LBJQPF4R-CDPHmHGH.js → diagram-LBJQPF4R-D4YdLsaF.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-Q27KOJAE-BtZLrez1.js → diagram-Q27KOJAE-LCKyGZ5U.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-UB23O5K3-mzybu8oU.js → diagram-UB23O5K3-BeiTe7t0.js} +1 -1
- package/dist/worker/console/static/assets/{ebnfDiagram-BXEA7PRR-Dk3I2uO6.js → ebnfDiagram-BXEA7PRR-BO2cq8GS.js} +1 -1
- package/dist/worker/console/static/assets/{erDiagram-JOGREHBK-BT97u_tQ.js → erDiagram-JOGREHBK-CmWww3Nt.js} +1 -1
- package/dist/worker/console/static/assets/{flowDiagram-UKHOOZJN-CMOtYzui.js → flowDiagram-UKHOOZJN-C2kkUYg5.js} +1 -1
- package/dist/worker/console/static/assets/{ganttDiagram-PKOTCBZU-DiNydkuY.js → ganttDiagram-PKOTCBZU-DY_JZ2iQ.js} +1 -1
- package/dist/worker/console/static/assets/{gitGraphDiagram-DS77QQ5N-Cwt6fLkl.js → gitGraphDiagram-DS77QQ5N-BizhCSw9.js} +1 -1
- package/dist/worker/console/static/assets/index-BXN89VPX.js +325 -0
- package/dist/worker/console/static/assets/index-CuH5CNFu.css +1 -0
- package/dist/worker/console/static/assets/{infoDiagram-6WML65LV-AsGIGKKB.js → infoDiagram-6WML65LV-Dlo2eK_d.js} +1 -1
- package/dist/worker/console/static/assets/{ishikawaDiagram-WSZJBQD7-BL8ITZh3.js → ishikawaDiagram-WSZJBQD7-3EIlIIuZ.js} +1 -1
- package/dist/worker/console/static/assets/{journeyDiagram-NVQOT4AX-VPKAUX8M.js → journeyDiagram-NVQOT4AX-DiMDe5Yh.js} +1 -1
- package/dist/worker/console/static/assets/{kanban-definition-27J2QSJJ-BL56hfGp.js → kanban-definition-27J2QSJJ-sN553oIN.js} +1 -1
- package/dist/worker/console/static/assets/{linear-BmSG3nIZ.js → linear-D9Py31Ld.js} +1 -1
- package/dist/worker/console/static/assets/{mermaid.core-DWGK9kwP.js → mermaid.core-D7Occzk_.js} +5 -5
- package/dist/worker/console/static/assets/{mindmap-definition-FAOFIHXS--vvKLjo0.js → mindmap-definition-FAOFIHXS-DjDRboiR.js} +1 -1
- package/dist/worker/console/static/assets/{pegDiagram-VL7TDLO6-B41mxb2-.js → pegDiagram-VL7TDLO6-Cgc4qlzp.js} +1 -1
- package/dist/worker/console/static/assets/{pieDiagram-7S7Q4E2Y-DTlu77sw.js → pieDiagram-7S7Q4E2Y-DxZj8pKd.js} +1 -1
- package/dist/worker/console/static/assets/{quadrantDiagram-CIZ2JOQS-Bk5A7alv.js → quadrantDiagram-CIZ2JOQS-CJ50MngR.js} +1 -1
- package/dist/worker/console/static/assets/{railroadDiagram-AXF67PYL-Csf9jzQy.js → railroadDiagram-AXF67PYL-BY-OD8Tr.js} +1 -1
- package/dist/worker/console/static/assets/{requirementDiagram-LRYGKXZP-CeptoSNx.js → requirementDiagram-LRYGKXZP-CQFButfK.js} +1 -1
- package/dist/worker/console/static/assets/{sankeyDiagram-W5VNT64P-A-DLCLer.js → sankeyDiagram-W5VNT64P-BB_QUK_b.js} +1 -1
- package/dist/worker/console/static/assets/{sequenceDiagram-SI44F4Z6-22VbPdOI.js → sequenceDiagram-SI44F4Z6-CqhXZjyx.js} +1 -1
- package/dist/worker/console/static/assets/{sizeCapture-X5ZJPWSS-DWvAyBC9.js → sizeCapture-X5ZJPWSS-2l1U4rgJ.js} +1 -1
- package/dist/worker/console/static/assets/{stateDiagram-OKZ733FA-qICZ75yT.js → stateDiagram-OKZ733FA-BX1FbrhJ.js} +1 -1
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-DJKi0Qel.js +1 -0
- package/dist/worker/console/static/assets/{swimlanes-SLNWSIFB-xi7lcMyp.js → swimlanes-SLNWSIFB-DOSnT7hb.js} +2 -2
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-YYe7EEm5.js +8 -0
- package/dist/worker/console/static/assets/{timeline-definition-Z64GVDOM-Bu6Nl6O2.js → timeline-definition-Z64GVDOM-DVJQA7AN.js} +1 -1
- package/dist/worker/console/static/assets/{vennDiagram-T6HMQDX7-BzMz4Bn9.js → vennDiagram-T6HMQDX7-74uxl9gx.js} +1 -1
- package/dist/worker/console/static/assets/{wardleyDiagram-T6FBY63Y-CxaJnzc5.js → wardleyDiagram-T6FBY63Y-DsBxlcg_.js} +1 -1
- package/dist/worker/console/static/assets/{xychartDiagram-ELKLHX3M-5JK-omQK.js → xychartDiagram-ELKLHX3M-snuW9Mjw.js} +1 -1
- package/dist/worker/console/static/index.html +2 -2
- package/dist/worker/console/static-src/app/console-types.js +39 -0
- package/dist/worker/console/static-src/app/useOperatorActions.js +1 -1
- package/dist/worker/console/static-src/app/useRecoveryActions.js +2 -2
- package/dist/worker/console/static-src/operator-chat/chat-sse-events.js +82 -22
- package/dist/worker/console/static-src/operator-chat/mutation-gate.js +45 -0
- package/dist/worker/console/static-src/operator-chat/resource-diagnostics.js +204 -0
- package/dist/worker/console/static-src/operator-chat/turn-stream-controller.js +8 -1
- package/dist/worker/console/static-src/operator-chat/turn-submission.js +42 -0
- package/dist/worker/console/static-src/operator-chat/useChatSessions.js +18 -0
- package/dist/worker/console/static-src/operator-chat/useChatStream.js +216 -10
- package/dist/worker/console/static-src/operator-chat/useChatThread.js +50 -22
- package/dist/worker/console/static-src/operator-chat/useRepoBrowser.js +26 -1
- package/dist/workflows/dag/backend-test-case-coverage-analysis.js +755 -51
- package/dist/workflows/dag/backend-test-case-manifest.js +4 -0
- package/dist/workflows/dag/backend-test-execution-contract.js +18 -9
- package/dist/workflows/dag/backend-test-gap-fill.js +205 -0
- package/dist/workflows/dag/backend-test-intake-context.js +32 -0
- package/dist/workflows/dag/backend-test-layout.js +133 -0
- package/dist/workflows/dag/backend-test-markdown-workflow.js +167 -32
- package/dist/workflows/dag/backend-test-module-stem.js +5 -0
- package/dist/workflows/dag/backend-test-pytest-collection.js +368 -33
- package/dist/workflows/dag/backend-test-result-contract.js +1 -1
- package/dist/workflows/dag/backend-test-scenario-param.js +884 -140
- package/dist/workflows/dag/backend-test-scenario-partitions.js +249 -0
- package/dist/workflows/dag/backend-test-writer-completeness.js +100 -56
- package/dist/workflows/dag/contract-validator-registrations.js +3 -1
- package/dist/workflows/dag/convergence/controller.js +141 -0
- package/dist/workflows/dag/dynamic-runtime/map.js +24 -8
- package/dist/workflows/dag/dynamic-runtime/shared.js +1 -1
- package/dist/workflows/dag/failure-routing.js +9 -4
- package/dist/workflows/dag/frontend-implementation-contract.js +386 -0
- package/dist/workflows/dag/frontend-plan-render.js +90 -0
- package/dist/workflows/dag/frontend-prewrite-gate.js +479 -28
- package/dist/workflows/dag/init-hybrid.js +920 -110
- package/dist/workflows/dag/lifecycle.js +4 -0
- package/dist/workflows/dag/node-execution.js +77 -8
- package/dist/workflows/dag/prompt.js +45 -0
- package/dist/workflows/dag/report.js +6 -0
- package/dist/workflows/dag/rerun-feedback.js +212 -0
- package/dist/workflows/dag/rerun-plan.js +93 -27
- package/dist/workflows/dag/rerun-run.js +3 -0
- package/dist/workflows/dag/rerun-task.js +61 -2
- package/dist/workflows/dag/retry-policy.js +33 -0
- package/dist/workflows/dag/types.js +148 -4
- package/dist/workflows/dag/validate.js +7 -2
- package/docs/templates/backend-test-dag.json +60 -35
- package/docs/templates/frontend-design-contract.md +40 -14
- package/docs/templates/frontend-implementation-contract.schema.json +9 -2
- package/docs/templates/frontend-task-constraints.md +40 -13
- package/docs/templates/frontend-task-requirement.md +54 -20
- package/harness.json +3 -1
- package/package.json +1 -1
- package/skills/frontend-design-review/references/review-checklist.md +2 -0
- package/skills/frontend-implementation/references/design-spec.md +16 -19
- package/skills/frontend-implementation/references/node-contracts.md +15 -11
- package/dist/worker/console/static/assets/channel-DLVz9TYW.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-BeAuGcO9.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-BeAuGcO9.js +0 -1
- package/dist/worker/console/static/assets/index-DQxiso1w.js +0 -325
- package/dist/worker/console/static/assets/index-_j0Hzo69.css +0 -1
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-DzKvfHTX.js +0 -1
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-Cxqr_qM1.js +0 -8
|
@@ -0,0 +1,325 @@
|
|
|
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 o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Lu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cf={exports:{}},so={};var nv;function P7(){if(nv)return so;nv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,s,o){var c=null;if(o!==void 0&&(c=""+o),s.key!==void 0&&(c=""+s.key),"key"in s){o={};for(var d in s)d!=="key"&&(o[d]=s[d])}else o=s;return s=o.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:o}}return so.Fragment=t,so.jsx=n,so.jsxs=n,so}var rv;function $7(){return rv||(rv=1,cf.exports=P7()),cf.exports}var f=$7(),uf={exports:{}},ft={};var av;function G7(){if(av)return ft;av=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"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=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"),x=Symbol.iterator;function y(D){return D===null||typeof D!="object"?null:(D=x&&D[x]||D["@@iterator"],typeof D=="function"?D:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,R={};function C(D,P,_){this.props=D,this.context=P,this.refs=R,this.updater=_||E}C.prototype.isReactComponent={},C.prototype.setState=function(D,P){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,P,"setState")},C.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function I(){}I.prototype=C.prototype;function O(D,P,_){this.props=D,this.context=P,this.refs=R,this.updater=_||E}var X=O.prototype=new I;X.constructor=O,N(X,C.prototype),X.isPureReactComponent=!0;var q=Array.isArray;function A(){}var F={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function W(D,P,_){var ne=_.ref;return{$$typeof:e,type:D,key:P,ref:ne!==void 0?ne:null,props:_}}function z(D,P){return W(D.type,P,D.props)}function U(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function H(D){var P={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(_){return P[_]})}var te=/\/+/g;function G(D,P){return typeof D=="object"&&D!==null&&D.key!=null?H(""+D.key):P.toString(36)}function K(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(A,A):(D.status="pending",D.then(function(P){D.status==="pending"&&(D.status="fulfilled",D.value=P)},function(P){D.status==="pending"&&(D.status="rejected",D.reason=P)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function $(D,P,_,ne,de){var se=typeof D;(se==="undefined"||se==="boolean")&&(D=null);var ae=!1;if(D===null)ae=!0;else switch(se){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(D.$$typeof){case e:case t:ae=!0;break;case p:return ae=D._init,$(ae(D._payload),P,_,ne,de)}}if(ae)return de=de(D),ae=ne===""?"."+G(D,0):ne,q(de)?(_="",ae!=null&&(_=ae.replace(te,"$&/")+"/"),$(de,P,_,"",function(ze){return ze})):de!=null&&(U(de)&&(de=z(de,_+(de.key==null||D&&D.key===de.key?"":(""+de.key).replace(te,"$&/")+"/")+ae)),P.push(de)),1;ae=0;var we=ne===""?".":ne+":";if(q(D))for(var be=0;be<D.length;be++)ne=D[be],se=we+G(ne,be),ae+=$(ne,P,_,se,de);else if(be=y(D),typeof be=="function")for(D=be.call(D),be=0;!(ne=D.next()).done;)ne=ne.value,se=we+G(ne,be++),ae+=$(ne,P,_,se,de);else if(se==="object"){if(typeof D.then=="function")return $(K(D),P,_,ne,de);throw P=String(D),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return ae}function ee(D,P,_){if(D==null)return D;var ne=[],de=0;return $(D,ne,"","",function(se){return P.call(_,se,de++)}),ne}function oe(D){if(D._status===-1){var P=D._result;P=P(),P.then(function(_){(D._status===0||D._status===-1)&&(D._status=1,D._result=_)},function(_){(D._status===0||D._status===-1)&&(D._status=2,D._result=_)}),D._status===-1&&(D._status=0,D._result=P)}if(D._status===1)return D._result.default;throw D._result}var ce=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},j={map:ee,forEach:function(D,P,_){ee(D,function(){P.apply(this,arguments)},_)},count:function(D){var P=0;return ee(D,function(){P++}),P},toArray:function(D){return ee(D,function(P){return P})||[]},only:function(D){if(!U(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return ft.Activity=b,ft.Children=j,ft.Component=C,ft.Fragment=n,ft.Profiler=s,ft.PureComponent=O,ft.StrictMode=a,ft.Suspense=m,ft.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,ft.__COMPILER_RUNTIME={__proto__:null,c:function(D){return F.H.useMemoCache(D)}},ft.cache=function(D){return function(){return D.apply(null,arguments)}},ft.cacheSignal=function(){return null},ft.cloneElement=function(D,P,_){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var ne=N({},D.props),de=D.key;if(P!=null)for(se in P.key!==void 0&&(de=""+P.key),P)!J.call(P,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&P.ref===void 0||(ne[se]=P[se]);var se=arguments.length-2;if(se===1)ne.children=_;else if(1<se){for(var ae=Array(se),we=0;we<se;we++)ae[we]=arguments[we+2];ne.children=ae}return W(D.type,de,ne)},ft.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:o,_context:D},D},ft.createElement=function(D,P,_){var ne,de={},se=null;if(P!=null)for(ne in P.key!==void 0&&(se=""+P.key),P)J.call(P,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(de[ne]=P[ne]);var ae=arguments.length-2;if(ae===1)de.children=_;else if(1<ae){for(var we=Array(ae),be=0;be<ae;be++)we[be]=arguments[be+2];de.children=we}if(D&&D.defaultProps)for(ne in ae=D.defaultProps,ae)de[ne]===void 0&&(de[ne]=ae[ne]);return W(D,se,de)},ft.createRef=function(){return{current:null}},ft.forwardRef=function(D){return{$$typeof:d,render:D}},ft.isValidElement=U,ft.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:oe}},ft.memo=function(D,P){return{$$typeof:h,type:D,compare:P===void 0?null:P}},ft.startTransition=function(D){var P=F.T,_={};F.T=_;try{var ne=D(),de=F.S;de!==null&&de(_,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(A,ce)}catch(se){ce(se)}finally{P!==null&&_.types!==null&&(P.types=_.types),F.T=P}},ft.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},ft.use=function(D){return F.H.use(D)},ft.useActionState=function(D,P,_){return F.H.useActionState(D,P,_)},ft.useCallback=function(D,P){return F.H.useCallback(D,P)},ft.useContext=function(D){return F.H.useContext(D)},ft.useDebugValue=function(){},ft.useDeferredValue=function(D,P){return F.H.useDeferredValue(D,P)},ft.useEffect=function(D,P){return F.H.useEffect(D,P)},ft.useEffectEvent=function(D){return F.H.useEffectEvent(D)},ft.useId=function(){return F.H.useId()},ft.useImperativeHandle=function(D,P,_){return F.H.useImperativeHandle(D,P,_)},ft.useInsertionEffect=function(D,P){return F.H.useInsertionEffect(D,P)},ft.useLayoutEffect=function(D,P){return F.H.useLayoutEffect(D,P)},ft.useMemo=function(D,P){return F.H.useMemo(D,P)},ft.useOptimistic=function(D,P){return F.H.useOptimistic(D,P)},ft.useReducer=function(D,P,_){return F.H.useReducer(D,P,_)},ft.useRef=function(D){return F.H.useRef(D)},ft.useState=function(D){return F.H.useState(D)},ft.useSyncExternalStore=function(D,P,_){return F.H.useSyncExternalStore(D,P,_)},ft.useTransition=function(){return F.H.useTransition()},ft.version="19.2.8",ft}var iv;function Mh(){return iv||(iv=1,uf.exports=G7()),uf.exports}var k=Mh();const Pn=Lu(k);var df={exports:{}},lo={},ff={exports:{}},mf={};var sv;function K7(){return sv||(sv=1,(function(e){function t($,ee){var oe=$.length;$.push(ee);e:for(;0<oe;){var ce=oe-1>>>1,j=$[ce];if(0<s(j,ee))$[ce]=ee,$[oe]=j,oe=ce;else break e}}function n($){return $.length===0?null:$[0]}function a($){if($.length===0)return null;var ee=$[0],oe=$.pop();if(oe!==ee){$[0]=oe;e:for(var ce=0,j=$.length,D=j>>>1;ce<D;){var P=2*(ce+1)-1,_=$[P],ne=P+1,de=$[ne];if(0>s(_,oe))ne<j&&0>s(de,_)?($[ce]=de,$[ne]=oe,ce=ne):($[ce]=_,$[P]=oe,ce=P);else if(ne<j&&0>s(de,oe))$[ce]=de,$[ne]=oe,ce=ne;else break e}}return ee}function s($,ee){var oe=$.sortIndex-ee.sortIndex;return oe!==0?oe:$.id-ee.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var m=[],h=[],p=1,b=null,x=3,y=!1,E=!1,N=!1,R=!1,C=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function X($){for(var ee=n(h);ee!==null;){if(ee.callback===null)a(h);else if(ee.startTime<=$)a(h),ee.sortIndex=ee.expirationTime,t(m,ee);else break;ee=n(h)}}function q($){if(N=!1,X($),!E)if(n(m)!==null)E=!0,A||(A=!0,H());else{var ee=n(h);ee!==null&&K(q,ee.startTime-$)}}var A=!1,F=-1,J=5,W=-1;function z(){return R?!0:!(e.unstable_now()-W<J)}function U(){if(R=!1,A){var $=e.unstable_now();W=$;var ee=!0;try{e:{E=!1,N&&(N=!1,I(F),F=-1),y=!0;var oe=x;try{t:{for(X($),b=n(m);b!==null&&!(b.expirationTime>$&&z());){var ce=b.callback;if(typeof ce=="function"){b.callback=null,x=b.priorityLevel;var j=ce(b.expirationTime<=$);if($=e.unstable_now(),typeof j=="function"){b.callback=j,X($),ee=!0;break t}b===n(m)&&a(m),X($)}else a(m);b=n(m)}if(b!==null)ee=!0;else{var D=n(h);D!==null&&K(q,D.startTime-$),ee=!1}}break e}finally{b=null,x=oe,y=!1}ee=void 0}}finally{ee?H():A=!1}}}var H;if(typeof O=="function")H=function(){O(U)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,G=te.port2;te.port1.onmessage=U,H=function(){G.postMessage(null)}}else H=function(){C(U,0)};function K($,ee){F=C(function(){$(e.unstable_now())},ee)}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($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function($){switch(x){case 1:case 2:case 3:var ee=3;break;default:ee=x}var oe=x;x=ee;try{return $()}finally{x=oe}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function($,ee){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var oe=x;x=$;try{return ee()}finally{x=oe}},e.unstable_scheduleCallback=function($,ee,oe){var ce=e.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?ce+oe:ce):oe=ce,$){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=oe+j,$={id:p++,callback:ee,priorityLevel:$,startTime:oe,expirationTime:j,sortIndex:-1},oe>ce?($.sortIndex=oe,t(h,$),n(m)===null&&$===n(h)&&(N?(I(F),F=-1):N=!0,K(q,oe-ce))):($.sortIndex=j,t(m,$),E||y||(E=!0,A||(A=!0,H()))),$},e.unstable_shouldYield=z,e.unstable_wrapCallback=function($){var ee=x;return function(){var oe=x;x=ee;try{return $.apply(this,arguments)}finally{x=oe}}}})(mf)),mf}var lv;function V7(){return lv||(lv=1,ff.exports=K7()),ff.exports}var hf={exports:{}},Jn={};var ov;function Y7(){if(ov)return Jn;ov=1;var e=Mh();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 o(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 d(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Jn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Jn.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 o(m,h,null,p)},Jn.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()}},Jn.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))},Jn.prefetchDNS=function(m){typeof m=="string"&&a.d.D(m)},Jn.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var p=h.as,b=d(p,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,y=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:x,fetchPriority:y}):p==="script"&&a.d.X(m,{crossOrigin:b,integrity:x,fetchPriority:y,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Jn.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=d(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)},Jn.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,b=d(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})}},Jn.preloadModule=function(m,h){if(typeof m=="string")if(h){var p=d(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)},Jn.requestFormReset=function(m){a.d.r(m)},Jn.unstable_batchedUpdates=function(m,h){return m(h)},Jn.useFormState=function(m,h,p){return c.H.useFormState(m,h,p)},Jn.useFormStatus=function(){return c.H.useHostTransitionStatus()},Jn.version="19.2.8",Jn}var cv;function C2(){if(cv)return hf.exports;cv=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(),hf.exports=Y7(),hf.exports}var uv;function X7(){if(uv)return lo;uv=1;var e=V7(),t=Mh(),n=C2();function a(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)i+="&args[]="+encodeURIComponent(arguments[l])}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 o(r){var i=r,l=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(l=i.return),r=i.return;while(r)}return i.tag===3?l: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 d(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(o(r)!==r)throw Error(a(188))}function h(r){var i=r.alternate;if(!i){if(i=o(r),i===null)throw Error(a(188));return i!==r?null:r}for(var l=r,u=i;;){var g=l.return;if(g===null)break;var v=g.alternate;if(v===null){if(u=g.return,u!==null){l=u;continue}break}if(g.child===v.child){for(v=g.child;v;){if(v===l)return m(g),r;if(v===u)return m(g),i;v=v.sibling}throw Error(a(188))}if(l.return!==u.return)l=g,u=v;else{for(var T=!1,L=g.child;L;){if(L===l){T=!0,l=g,u=v;break}if(L===u){T=!0,u=g,l=v;break}L=L.sibling}if(!T){for(L=v.child;L;){if(L===l){T=!0,l=v,u=g;break}if(L===u){T=!0,u=v,l=g;break}L=L.sibling}if(!T)throw Error(a(189))}}if(l.alternate!==u)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?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,x=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),O=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function H(r){return r===null||typeof r!="object"?null:(r=U&&r[U]||r["@@iterator"],typeof r=="function"?r:null)}var te=Symbol.for("react.client.reference");function G(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===te?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 q:return"Suspense";case A:return"SuspenseList";case W:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case E:return"Portal";case O:return r.displayName||"Context";case I:return(r._context.displayName||"Context")+".Consumer";case X:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case F:return i=r.displayName||null,i!==null?i:G(r.type)||"Memo";case J:i=r._payload,r=r._init;try{return G(r(i))}catch{}}return null}var K=Array.isArray,$=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},ce=[],j=-1;function D(r){return{current:r}}function P(r){0>j||(r.current=ce[j],ce[j]=null,j--)}function _(r,i){j++,ce[j]=r.current,r.current=i}var ne=D(null),de=D(null),se=D(null),ae=D(null);function we(r,i){switch(_(se,i),_(de,r),_(ne,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?Tb(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=Tb(i),r=Nb(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}P(ne),_(ne,r)}function be(){P(ne),P(de),P(se)}function ze(r){r.memoizedState!==null&&_(ae,r);var i=ne.current,l=Nb(i,r.type);i!==l&&(_(de,r),_(ne,l))}function Me(r){de.current===r&&(P(ne),P(de)),ae.current===r&&(P(ae),no._currentValue=oe)}var Se,$e;function ct(r){if(Se===void 0)try{throw Error()}catch(l){var i=l.stack.trim().match(/\n( *(at )?)/);Se=i&&i[1]||"",$e=-1<l.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+Se+r+$e}var mt=!1;function Ze(r,i){if(!r||mt)return"";mt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(i){var Te=function(){throw Error()};if(Object.defineProperty(Te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Te,[])}catch(ge){var pe=ge}Reflect.construct(r,[],Te)}else{try{Te.call()}catch(ge){pe=ge}r.call(Te.prototype)}}else{try{throw Error()}catch(ge){pe=ge}(Te=r())&&typeof Te.catch=="function"&&Te.catch(function(){})}}catch(ge){if(ge&&pe&&typeof ge.stack=="string")return[ge.stack,pe.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=u.DetermineComponentFrameRoot(),T=v[0],L=v[1];if(T&&L){var Q=T.split(`
|
|
4
|
+
`),me=L.split(`
|
|
5
|
+
`);for(g=u=0;u<Q.length&&!Q[u].includes("DetermineComponentFrameRoot");)u++;for(;g<me.length&&!me[g].includes("DetermineComponentFrameRoot");)g++;if(u===Q.length||g===me.length)for(u=Q.length-1,g=me.length-1;1<=u&&0<=g&&Q[u]!==me[g];)g--;for(;1<=u&&0<=g;u--,g--)if(Q[u]!==me[g]){if(u!==1||g!==1)do if(u--,g--,0>g||Q[u]!==me[g]){var ye=`
|
|
6
|
+
`+Q[u].replace(" at new "," at ");return r.displayName&&ye.includes("<anonymous>")&&(ye=ye.replace("<anonymous>",r.displayName)),ye}while(1<=u&&0<=g);break}}}finally{mt=!1,Error.prepareStackTrace=l}return(l=r?r.displayName||r.name:"")?ct(l):""}function lt(r,i){switch(r.tag){case 26:case 27:case 5:return ct(r.type);case 16:return ct("Lazy");case 13:return r.child!==i&&i!==null?ct("Suspense Fallback"):ct("Suspense");case 19:return ct("SuspenseList");case 0:case 15:return Ze(r.type,!1);case 11:return Ze(r.type.render,!1);case 1:return Ze(r.type,!0);case 31:return ct("Activity");default:return""}}function Tt(r){try{var i="",l=null;do i+=lt(r,l),l=r,r=r.return;while(r);return i}catch(u){return`
|
|
7
|
+
Error generating stack: `+u.message+`
|
|
8
|
+
`+u.stack}}var St=Object.prototype.hasOwnProperty,wt=e.unstable_scheduleCallback,Je=e.unstable_cancelCallback,Nt=e.unstable_shouldYield,qt=e.unstable_requestPaint,Fe=e.unstable_now,Xt=e.unstable_getCurrentPriorityLevel,he=e.unstable_ImmediatePriority,ve=e.unstable_UserBlockingPriority,qe=e.unstable_NormalPriority,We=e.unstable_LowPriority,nt=e.unstable_IdlePriority,$t=e.log,Zt=e.unstable_setDisableYieldValue,Pt=null,rt=null;function on(r){if(typeof $t=="function"&&Zt(r),rt&&typeof rt.setStrictMode=="function")try{rt.setStrictMode(Pt,r)}catch{}}var yt=Math.clz32?Math.clz32:st,Xn=Math.log,Sn=Math.LN2;function st(r){return r>>>=0,r===0?32:31-(Xn(r)/Sn|0)|0}var Ve=256,xt=262144,Dt=4194304;function Wt(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 Z(r,i,l){var u=r.pendingLanes;if(u===0)return 0;var g=0,v=r.suspendedLanes,T=r.pingedLanes;r=r.warmLanes;var L=u&134217727;return L!==0?(u=L&~v,u!==0?g=Wt(u):(T&=L,T!==0?g=Wt(T):l||(l=L&~r,l!==0&&(g=Wt(l))))):(L=u&~v,L!==0?g=Wt(L):T!==0?g=Wt(T):l||(l=u&~r,l!==0&&(g=Wt(l)))),g===0?0:i!==0&&i!==g&&(i&v)===0&&(v=g&-g,l=i&-i,v>=l||v===32&&(l&4194048)!==0)?i:g}function xe(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function je(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 et(){var r=Dt;return Dt<<=1,(Dt&62914560)===0&&(Dt=4194304),r}function gt(r){for(var i=[],l=0;31>l;l++)i.push(r);return i}function ue(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Ee(r,i,l,u,g,v){var T=r.pendingLanes;r.pendingLanes=l,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=l,r.entangledLanes&=l,r.errorRecoveryDisabledLanes&=l,r.shellSuspendCounter=0;var L=r.entanglements,Q=r.expirationTimes,me=r.hiddenUpdates;for(l=T&~l;0<l;){var ye=31-yt(l),Te=1<<ye;L[ye]=0,Q[ye]=-1;var pe=me[ye];if(pe!==null)for(me[ye]=null,ye=0;ye<pe.length;ye++){var ge=pe[ye];ge!==null&&(ge.lane&=-536870913)}l&=~Te}u!==0&&Oe(r,u,0),v!==0&&g===0&&r.tag!==0&&(r.suspendedLanes|=v&~(T&~i))}function Oe(r,i,l){r.pendingLanes|=i,r.suspendedLanes&=~i;var u=31-yt(i);r.entangledLanes|=i,r.entanglements[u]=r.entanglements[u]|1073741824|l&261930}function Ue(r,i){var l=r.entangledLanes|=i;for(r=r.entanglements;l;){var u=31-yt(l),g=1<<u;g&i|r[u]&i&&(r[u]|=i),l&=~g}}function jt(r,i){var l=i&-i;return l=(l&42)!==0?1:_t(l),(l&(r.suspendedLanes|i))!==0?0:l}function _t(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 bn(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Zn(){var r=ee.p;return r!==0?r:(r=window.event,r===void 0?32:Xb(r.type))}function dr(r,i){var l=ee.p;try{return ee.p=r,i()}finally{ee.p=l}}var Cn=Math.random().toString(36).slice(2),sn="__reactFiber$"+Cn,Wn="__reactProps$"+Cn,Ka="__reactContainer$"+Cn,ml="__reactEvents$"+Cn,Do="__reactListeners$"+Cn,fs="__reactHandles$"+Cn,jo="__reactResources$"+Cn,Mi="__reactMarker$"+Cn;function hl(r){delete r[sn],delete r[Wn],delete r[ml],delete r[Do],delete r[fs]}function ar(r){var i=r[sn];if(i)return i;for(var l=r.parentNode;l;){if(i=l[Ka]||l[sn]){if(l=i.alternate,i.child!==null||l!==null&&l.child!==null)for(r=Ob(r);r!==null;){if(l=r[sn])return l;r=Ob(r)}return i}r=l,l=r.parentNode}return null}function ga(r){if(r=r[sn]||r[Ka]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function Va(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[jo];return i||(i=r[jo]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Rn(r){r[Mi]=!0}var Lo=new Set,Oi={};function ba(r,i){Re(r,i),Re(r+"Capture",i)}function Re(r,i){for(Oi[r]=i,r=0;r<i.length;r++)Lo.add(i[r])}var Xe=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]*$"),kt={},Gt={};function kn(r){return St.call(Gt,r)?!0:St.call(kt,r)?!1:Xe.test(r)?Gt[r]=!0:(kt[r]=!0,!1)}function Qn(r,i,l){if(kn(i))if(l===null)r.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var u=i.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+l)}}function kr(r,i,l){if(l===null)r.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+l)}}function fr(r,i,l,u){if(u===null)r.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(l);return}r.setAttributeNS(i,l,""+u)}}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 zo(r,i,l){var u=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var g=u.get,v=u.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return g.call(this)},set:function(T){l=""+T,v.call(this,T)}}),Object.defineProperty(r,i,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(T){l=""+T},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function ms(r){if(!r._valueTracker){var i=Er(r)?"checked":"value";r._valueTracker=zo(r,i,""+r[i])}}function pl(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var l=i.getValue(),u="";return r&&(u=Er(r)?r.checked?"true":"false":r.value),r=u,r!==l?(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 l0=/[\n"\\]/g;function mr(r){return r.replace(l0,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function gl(r,i,l,u,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)):l!=null?ps(r,T,ln(l)):u!=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,l,u,g,v,T,L){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.type=v),i!=null||l!=null){if(!(v!=="submit"&&v!=="reset"||i!=null)){ms(r);return}l=l!=null?""+ln(l):"",i=i!=null?""+ln(i):l,L||i===r.value||(r.value=i),r.defaultValue=i}u=u??g,u=typeof u!="function"&&typeof u!="symbol"&&!!u,r.checked=L?r.checked:!!u,r.defaultChecked=!!u,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(r.name=T),ms(r)}function ps(r,i,l){i==="number"&&hs(r.ownerDocument)===r||r.defaultValue===""+l||(r.defaultValue=""+l)}function $n(r,i,l,u){if(r=r.options,i){i={};for(var g=0;g<l.length;g++)i["$"+l[g]]=!0;for(l=0;l<r.length;l++)g=i.hasOwnProperty("$"+r[l].value),r[l].selected!==g&&(r[l].selected=g),g&&u&&(r[l].defaultSelected=!0)}else{for(l=""+ln(l),i=null,g=0;g<r.length;g++){if(r[g].value===l){r[g].selected=!0,u&&(r[g].defaultSelected=!0);return}i!==null||r[g].disabled||(i=r[g])}i!==null&&(i.selected=!0)}}function Bo(r,i,l){if(i!=null&&(i=""+ln(i),i!==r.value&&(r.value=i),l==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=l!=null?""+ln(l):""}function gs(r,i,l,u){if(i==null){if(u!=null){if(l!=null)throw Error(a(92));if(K(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),i=l}l=ln(i),r.defaultValue=l,u=r.textContent,u===l&&u!==""&&u!==null&&(r.value=u),ms(r)}function it(r,i){if(i){var l=r.firstChild;if(l&&l===r.lastChild&&l.nodeType===3){l.nodeValue=i;return}}r.textContent=i}var qo=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,l){var u=i.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":u?r.setProperty(i,l):typeof l!="number"||l===0||qo.has(i)?i==="float"?r.cssFloat=l:r[i]=(""+l).trim():r[i]=l+"px"}function Kt(r,i,l){if(i!=null&&typeof i!="object")throw Error(a(62));if(r=r.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||i!=null&&i.hasOwnProperty(u)||(u.indexOf("--")===0?r.setProperty(u,""):u==="float"?r.cssFloat="":r[u]="");for(var g in i)u=i[g],i.hasOwnProperty(g)&&l[g]!==u&&An(r,g,u)}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"]]),bl=/^[\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 bl.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Le(){}var Ge=null;function ht(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var It=null,hn=null;function qr(r){var i=ga(r);if(i&&(r=i.stateNode)){var l=r[Wn]||null;e:switch(r=i.stateNode,i.type){case"input":if(gl(r,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),i=l.name,l.type==="radio"&&i!=null){for(l=r;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+mr(""+i)+'"][type="radio"]'),i=0;i<l.length;i++){var u=l[i];if(u!==r&&u.form===r.form){var g=u[Wn]||null;if(!g)throw Error(a(90));gl(u,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(i=0;i<l.length;i++)u=l[i],u.form===r.form&&pl(u)}break e;case"textarea":Bo(r,l.value,l.defaultValue);break e;case"select":i=l.value,i!=null&&$n(r,!!l.multiple,i,!1)}}}var vl=!1;function Uo(r,i,l){if(vl)return r(i,l);vl=!0;try{var u=r(i);return u}finally{if(vl=!1,(It!==null||hn!==null)&&(Cc(),It&&(i=It,r=hn,hn=It=null,qr(i),r)))for(i=0;i<r.length;i++)qr(r[i])}}function yl(r,i){var l=r.stateNode;if(l===null)return null;var u=l[Wn]||null;if(u===null)return null;l=u[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":(u=!u.disabled)||(r=r.type,u=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!u;break e;default:r=!1}if(r)return null;if(l&&typeof l!="function")throw Error(a(231,i,typeof l));return l}var ya=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),o0=!1;if(ya)try{var xl={};Object.defineProperty(xl,"passive",{get:function(){o0=!0}}),window.addEventListener("test",xl,xl),window.removeEventListener("test",xl,xl)}catch{o0=!1}var Wa=null,c0=null,Ho=null;function Np(){if(Ho)return Ho;var r,i=c0,l=i.length,u,g="value"in Wa?Wa.value:Wa.textContent,v=g.length;for(r=0;r<l&&i[r]===g[r];r++);var T=l-r;for(u=1;u<=T&&i[l-u]===g[v-u];u++);return Ho=g.slice(r,1<u?1-u:void 0)}function Fo(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 Po(){return!0}function Cp(){return!1}function hr(r){function i(l,u,g,v,T){this._reactName=l,this._targetInst=g,this.type=u,this.nativeEvent=v,this.target=T,this.currentTarget=null;for(var L in r)r.hasOwnProperty(L)&&(l=r[L],this[L]=l?l(v):v[L]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Po:Cp,this.isPropagationStopped=Cp,this}return b(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Po)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Po)},persist:function(){},isPersistent:Po}),i}var ji={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$o=hr(ji),wl=b({},ji,{view:0,detail:0}),H6=hr(wl),u0,d0,Sl,Go=b({},wl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:m0,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!==Sl&&(Sl&&r.type==="mousemove"?(u0=r.screenX-Sl.screenX,d0=r.screenY-Sl.screenY):d0=u0=0,Sl=r),u0)},movementY:function(r){return"movementY"in r?r.movementY:d0}}),Rp=hr(Go),F6=b({},Go,{dataTransfer:0}),P6=hr(F6),$6=b({},wl,{relatedTarget:0}),f0=hr($6),G6=b({},ji,{animationName:0,elapsedTime:0,pseudoElement:0}),K6=hr(G6),V6=b({},ji,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Y6=hr(V6),X6=b({},ji,{data:0}),Ap=hr(X6),Z6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},W6={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"},Q6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function J6(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=Q6[r])?!!i[r]:!1}function m0(){return J6}var ex=b({},wl,{key:function(r){if(r.key){var i=Z6[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Fo(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?W6[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:m0,charCode:function(r){return r.type==="keypress"?Fo(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Fo(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),tx=hr(ex),nx=b({},Go,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_p=hr(nx),rx=b({},wl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:m0}),ax=hr(rx),ix=b({},ji,{propertyName:0,elapsedTime:0,pseudoElement:0}),sx=hr(ix),lx=b({},Go,{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}),ox=hr(lx),cx=b({},ji,{newState:0,oldState:0}),ux=hr(cx),dx=[9,13,27,32],h0=ya&&"CompositionEvent"in window,kl=null;ya&&"documentMode"in document&&(kl=document.documentMode);var fx=ya&&"TextEvent"in window&&!kl,Ip=ya&&(!h0||kl&&8<kl&&11>=kl),Mp=" ",Op=!1;function Dp(r,i){switch(r){case"keyup":return dx.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jp(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var bs=!1;function mx(r,i){switch(r){case"compositionend":return jp(i);case"keypress":return i.which!==32?null:(Op=!0,Mp);case"textInput":return r=i.data,r===Mp&&Op?null:r;default:return null}}function hx(r,i){if(bs)return r==="compositionend"||!h0&&Dp(r,i)?(r=Np(),Ho=c0=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 Ip&&i.locale!=="ko"?null:i.data;default:return null}}var px={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 Lp(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!px[r.type]:i==="textarea"}function zp(r,i,l,u){It?hn?hn.push(u):hn=[u]:It=u,i=Dc(i,"onChange"),0<i.length&&(l=new $o("onChange","change",null,l,u),r.push({event:l,listeners:i}))}var El=null,Tl=null;function gx(r){yb(r,0)}function Ko(r){var i=Va(r);if(pl(i))return r}function Bp(r,i){if(r==="change")return i}var qp=!1;if(ya){var p0;if(ya){var g0="oninput"in document;if(!g0){var Up=document.createElement("div");Up.setAttribute("oninput","return;"),g0=typeof Up.oninput=="function"}p0=g0}else p0=!1;qp=p0&&(!document.documentMode||9<document.documentMode)}function Hp(){El&&(El.detachEvent("onpropertychange",Fp),Tl=El=null)}function Fp(r){if(r.propertyName==="value"&&Ko(Tl)){var i=[];zp(i,Tl,r,ht(r)),Uo(gx,i)}}function bx(r,i,l){r==="focusin"?(Hp(),El=i,Tl=l,El.attachEvent("onpropertychange",Fp)):r==="focusout"&&Hp()}function vx(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Ko(Tl)}function yx(r,i){if(r==="click")return Ko(i)}function xx(r,i){if(r==="input"||r==="change")return Ko(i)}function wx(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var Tr=typeof Object.is=="function"?Object.is:wx;function Nl(r,i){if(Tr(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var l=Object.keys(r),u=Object.keys(i);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var g=l[u];if(!St.call(i,g)||!Tr(r[g],i[g]))return!1}return!0}function Pp(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function $p(r,i){var l=Pp(r);r=0;for(var u;l;){if(l.nodeType===3){if(u=r+l.textContent.length,r<=i&&u>=i)return{node:l,offset:i-r};r=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Pp(l)}}function Gp(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Gp(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function Kp(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 l=typeof i.contentWindow.location.href=="string"}catch{l=!1}if(l)r=i.contentWindow;else break;i=hs(r.document)}return i}function b0(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 Sx=ya&&"documentMode"in document&&11>=document.documentMode,vs=null,v0=null,Cl=null,y0=!1;function Vp(r,i,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;y0||vs==null||vs!==hs(u)||(u=vs,"selectionStart"in u&&b0(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Cl&&Nl(Cl,u)||(Cl=u,u=Dc(v0,"onSelect"),0<u.length&&(i=new $o("onSelect","select",null,i,l),r.push({event:i,listeners:u}),i.target=vs)))}function Li(r,i){var l={};return l[r.toLowerCase()]=i.toLowerCase(),l["Webkit"+r]="webkit"+i,l["Moz"+r]="moz"+i,l}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")},x0={},Yp={};ya&&(Yp=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(x0[r])return x0[r];if(!ys[r])return r;var i=ys[r],l;for(l in i)if(i.hasOwnProperty(l)&&l in Yp)return x0[r]=i[l];return r}var Xp=zi("animationend"),Zp=zi("animationiteration"),Wp=zi("animationstart"),kx=zi("transitionrun"),Ex=zi("transitionstart"),Tx=zi("transitioncancel"),Qp=zi("transitionend"),Jp=new Map,w0="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(" ");w0.push("scrollEnd");function Qr(r,i){Jp.set(r,i),ba(i,[r])}var Vo=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)},Ur=[],xs=0,S0=0;function Yo(){for(var r=xs,i=S0=xs=0;i<r;){var l=Ur[i];Ur[i++]=null;var u=Ur[i];Ur[i++]=null;var g=Ur[i];Ur[i++]=null;var v=Ur[i];if(Ur[i++]=null,u!==null&&g!==null){var T=u.pending;T===null?g.next=g:(g.next=T.next,T.next=g),u.pending=g}v!==0&&e1(l,g,v)}}function Xo(r,i,l,u){Ur[xs++]=r,Ur[xs++]=i,Ur[xs++]=l,Ur[xs++]=u,S0|=u,r.lanes|=u,r=r.alternate,r!==null&&(r.lanes|=u)}function k0(r,i,l,u){return Xo(r,i,l,u),Zo(r)}function Bi(r,i){return Xo(r,null,null,i),Zo(r)}function e1(r,i,l){r.lanes|=l;var u=r.alternate;u!==null&&(u.lanes|=l);for(var g=!1,v=r.return;v!==null;)v.childLanes|=l,u=v.alternate,u!==null&&(u.childLanes|=l),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-yt(l),r=v.hiddenUpdates,u=r[g],u===null?r[g]=[i]:u.push(i),i.lane=l|536870912),v):null}function Zo(r){if(50<Xl)throw Xl=0,Md=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 Nx(r,i,l,u){this.tag=r,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nr(r,i,l,u){return new Nx(r,i,l,u)}function E0(r){return r=r.prototype,!(!r||!r.isReactComponent)}function xa(r,i){var l=r.alternate;return l===null?(l=Nr(r.tag,i,r.key,r.mode),l.elementType=r.elementType,l.type=r.type,l.stateNode=r.stateNode,l.alternate=r,r.alternate=l):(l.pendingProps=i,l.type=r.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=r.flags&65011712,l.childLanes=r.childLanes,l.lanes=r.lanes,l.child=r.child,l.memoizedProps=r.memoizedProps,l.memoizedState=r.memoizedState,l.updateQueue=r.updateQueue,i=r.dependencies,l.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},l.sibling=r.sibling,l.index=r.index,l.ref=r.ref,l.refCleanup=r.refCleanup,l}function t1(r,i){r.flags&=65011714;var l=r.alternate;return l===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=l.childLanes,r.lanes=l.lanes,r.child=l.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=l.memoizedProps,r.memoizedState=l.memoizedState,r.updateQueue=l.updateQueue,r.type=l.type,i=l.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function Wo(r,i,l,u,g,v){var T=0;if(u=r,typeof r=="function")E0(r)&&(T=1);else if(typeof r=="string")T=I7(r,l,ne.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case W:return r=Nr(31,l,i,g),r.elementType=W,r.lanes=v,r;case N:return qi(l.children,g,v,i);case R:T=8,g|=24;break;case C:return r=Nr(12,l,i,g|2),r.elementType=C,r.lanes=v,r;case q:return r=Nr(13,l,i,g),r.elementType=q,r.lanes=v,r;case A:return r=Nr(19,l,i,g),r.elementType=A,r.lanes=v,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case O:T=10;break e;case I:T=9;break e;case X:T=11;break e;case F:T=14;break e;case J:T=16,u=null;break e}T=29,l=Error(a(130,r===null?"null":typeof r,"")),u=null}return i=Nr(T,l,i,g),i.elementType=r,i.type=u,i.lanes=v,i}function qi(r,i,l,u){return r=Nr(7,r,u,i),r.lanes=l,r}function T0(r,i,l){return r=Nr(6,r,null,i),r.lanes=l,r}function n1(r){var i=Nr(18,null,null,0);return i.stateNode=r,i}function N0(r,i,l){return i=Nr(4,r.children!==null?r.children:[],r.key,i),i.lanes=l,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var r1=new WeakMap;function Hr(r,i){if(typeof r=="object"&&r!==null){var l=r1.get(r);return l!==void 0?l:(i={value:r,source:i,stack:Tt(i)},r1.set(r,i),i)}return{value:r,source:i,stack:Tt(i)}}var Ss=[],ks=0,Qo=null,Rl=0,Fr=[],Pr=0,Qa=null,ra=1,aa="";function wa(r,i){Ss[ks++]=Rl,Ss[ks++]=Qo,Qo=r,Rl=i}function a1(r,i,l){Fr[Pr++]=ra,Fr[Pr++]=aa,Fr[Pr++]=Qa,Qa=r;var u=ra;r=aa;var g=32-yt(u)-1;u&=~(1<<g),l+=1;var v=32-yt(i)+g;if(30<v){var T=g-g%5;v=(u&(1<<T)-1).toString(32),u>>=T,g-=T,ra=1<<32-yt(i)+g|l<<g|u,aa=v+r}else ra=1<<v|l<<g|u,aa=r}function C0(r){r.return!==null&&(wa(r,1),a1(r,1,0))}function R0(r){for(;r===Qo;)Qo=Ss[--ks],Ss[ks]=null,Rl=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 i1(r,i){Fr[Pr++]=ra,Fr[Pr++]=aa,Fr[Pr++]=Qa,ra=i.id,aa=i.overflow,Qa=r}var Gn=null,cn=null,Lt=!1,Ja=null,$r=!1,A0=Error(a(519));function ei(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Al(Hr(i,r)),A0}function s1(r){var i=r.stateNode,l=r.type,u=r.memoizedProps;switch(i[sn]=r,i[Wn]=u,l){case"dialog":Rt("cancel",i),Rt("close",i);break;case"iframe":case"object":case"embed":Rt("load",i);break;case"video":case"audio":for(l=0;l<Wl.length;l++)Rt(Wl[l],i);break;case"source":Rt("error",i);break;case"img":case"image":case"link":Rt("error",i),Rt("load",i);break;case"details":Rt("toggle",i);break;case"input":Rt("invalid",i),Di(i,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Rt("invalid",i);break;case"textarea":Rt("invalid",i),gs(i,u.value,u.defaultValue,u.children)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||i.textContent===""+l||u.suppressHydrationWarning===!0||kb(i.textContent,l)?(u.popover!=null&&(Rt("beforetoggle",i),Rt("toggle",i)),u.onScroll!=null&&Rt("scroll",i),u.onScrollEnd!=null&&Rt("scrollend",i),u.onClick!=null&&(i.onclick=Le),i=!0):i=!1,i||ei(r,!0)}function l1(r){for(Gn=r.return;Gn;)switch(Gn.tag){case 5:case 31:case 13:$r=!1;return;case 27:case 3:$r=!0;return;default:Gn=Gn.return}}function Es(r){if(r!==Gn)return!1;if(!Lt)return l1(r),Lt=!0,!1;var i=r.tag,l;if((l=i!==3&&i!==27)&&((l=i===5)&&(l=r.type,l=!(l!=="form"&&l!=="button")||Vd(r.type,r.memoizedProps)),l=!l),l&&cn&&ei(r),l1(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));cn=Mb(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));cn=Mb(r)}else i===27?(i=cn,hi(r.type)?(r=Qd,Qd=null,cn=r):cn=i):cn=Gn?Kr(r.stateNode.nextSibling):null;return!0}function Ui(){cn=Gn=null,Lt=!1}function _0(){var r=Ja;return r!==null&&(vr===null?vr=r:vr.push.apply(vr,r),Ja=null),r}function Al(r){Ja===null?Ja=[r]:Ja.push(r)}var I0=D(null),Hi=null,Sa=null;function ti(r,i,l){_(I0,i._currentValue),i._currentValue=l}function ka(r){r._currentValue=I0.current,P(I0)}function M0(r,i,l){for(;r!==null;){var u=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,u!==null&&(u.childLanes|=i)):u!==null&&(u.childLanes&i)!==i&&(u.childLanes|=i),r===l)break;r=r.return}}function O0(r,i,l,u){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 Q=0;Q<i.length;Q++)if(L.context===i[Q]){v.lanes|=l,L=v.alternate,L!==null&&(L.lanes|=l),M0(v.return,l,r),u||(T=null);break e}v=L.next}}else if(g.tag===18){if(T=g.return,T===null)throw Error(a(341));T.lanes|=l,v=T.alternate,v!==null&&(v.lanes|=l),M0(T,l,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,l,u){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===ae.current){if(T=g.alternate,T===null)throw Error(a(387));T.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(r!==null?r.push(no):r=[no])}g=g.return}r!==null&&O0(i,r,l,u),i.flags|=262144}function Jo(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 Kn(r){return o1(Hi,r)}function ec(r,i){return Hi===null&&Fi(r),o1(r,i)}function o1(r,i){var l=i._currentValue;if(i={context:i,memoizedValue:l,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 l}var Cx=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(l,u){r.push(u)}};this.abort=function(){i.aborted=!0,r.forEach(function(l){return l()})}},Rx=e.unstable_scheduleCallback,Ax=e.unstable_NormalPriority,_n={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function D0(){return{controller:new Cx,data:new Map,refCount:0}}function _l(r){r.refCount--,r.refCount===0&&Rx(Ax,function(){r.controller.abort()})}var Il=null,j0=0,Ns=0,Cs=null;function _x(r,i){if(Il===null){var l=Il=[];j0=0,Ns=Bd(),Cs={status:"pending",value:void 0,then:function(u){l.push(u)}}}return j0++,i.then(c1,c1),i}function c1(){if(--j0===0&&Il!==null){Cs!==null&&(Cs.status="fulfilled");var r=Il;Il=null,Ns=0,Cs=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function Ix(r,i){var l=[],u={status:"pending",value:null,reason:null,then:function(g){l.push(g)}};return r.then(function(){u.status="fulfilled",u.value=i;for(var g=0;g<l.length;g++)(0,l[g])(i)},function(g){for(u.status="rejected",u.reason=g,g=0;g<l.length;g++)(0,l[g])(void 0)}),u}var u1=$.S;$.S=function(r,i){Vg=Fe(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&_x(r,i),u1!==null&&u1(r,i)};var Pi=D(null);function L0(){var r=Pi.current;return r!==null?r:tn.pooledCache}function tc(r,i){i===null?_(Pi,Pi.current):_(Pi,i.pool)}function d1(){var r=L0();return r===null?null:{parent:_n._currentValue,pool:r}}var Rs=Error(a(460)),z0=Error(a(474)),nc=Error(a(542)),rc={then:function(){}};function f1(r){return r=r.status,r==="fulfilled"||r==="rejected"}function m1(r,i,l){switch(l=r[l],l===void 0?r.push(i):l!==i&&(i.then(Le,Le),i=l),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,p1(r),r;default:if(typeof i.status=="string")i.then(Le,Le);else{if(r=tn,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status="pending",r.then(function(u){if(i.status==="pending"){var g=i;g.status="fulfilled",g.value=u}},function(u){if(i.status==="pending"){var g=i;g.status="rejected",g.reason=u}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,p1(r),r}throw Gi=i,Rs}}function $i(r){try{var i=r._init;return i(r._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Gi=l,Rs):l}}var Gi=null;function h1(){if(Gi===null)throw Error(a(459));var r=Gi;return Gi=null,r}function p1(r){if(r===Rs||r===nc)throw Error(a(483))}var As=null,Ml=0;function ac(r){var i=Ml;return Ml+=1,As===null&&(As=[]),m1(As,r,i)}function Ol(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function ic(r,i){throw i.$$typeof===x?Error(a(525)):(r=Object.prototype.toString.call(i),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function g1(r){function i(le,re){if(r){var fe=le.deletions;fe===null?(le.deletions=[re],le.flags|=16):fe.push(re)}}function l(le,re){if(!r)return null;for(;re!==null;)i(le,re),re=re.sibling;return null}function u(le){for(var re=new Map;le!==null;)le.key!==null?re.set(le.key,le):re.set(le.index,le),le=le.sibling;return re}function g(le,re){return le=xa(le,re),le.index=0,le.sibling=null,le}function v(le,re,fe){return le.index=fe,r?(fe=le.alternate,fe!==null?(fe=fe.index,fe<re?(le.flags|=67108866,re):fe):(le.flags|=67108866,re)):(le.flags|=1048576,re)}function T(le){return r&&le.alternate===null&&(le.flags|=67108866),le}function L(le,re,fe,ke){return re===null||re.tag!==6?(re=T0(fe,le.mode,ke),re.return=le,re):(re=g(re,fe),re.return=le,re)}function Q(le,re,fe,ke){var Qe=fe.type;return Qe===N?ye(le,re,fe.props.children,ke,fe.key):re!==null&&(re.elementType===Qe||typeof Qe=="object"&&Qe!==null&&Qe.$$typeof===J&&$i(Qe)===re.type)?(re=g(re,fe.props),Ol(re,fe),re.return=le,re):(re=Wo(fe.type,fe.key,fe.props,null,le.mode,ke),Ol(re,fe),re.return=le,re)}function me(le,re,fe,ke){return re===null||re.tag!==4||re.stateNode.containerInfo!==fe.containerInfo||re.stateNode.implementation!==fe.implementation?(re=N0(fe,le.mode,ke),re.return=le,re):(re=g(re,fe.children||[]),re.return=le,re)}function ye(le,re,fe,ke,Qe){return re===null||re.tag!==7?(re=qi(fe,le.mode,ke,Qe),re.return=le,re):(re=g(re,fe),re.return=le,re)}function Te(le,re,fe){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=T0(""+re,le.mode,fe),re.return=le,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case y:return fe=Wo(re.type,re.key,re.props,null,le.mode,fe),Ol(fe,re),fe.return=le,fe;case E:return re=N0(re,le.mode,fe),re.return=le,re;case J:return re=$i(re),Te(le,re,fe)}if(K(re)||H(re))return re=qi(re,le.mode,fe,null),re.return=le,re;if(typeof re.then=="function")return Te(le,ac(re),fe);if(re.$$typeof===O)return Te(le,ec(le,re),fe);ic(le,re)}return null}function pe(le,re,fe,ke){var Qe=re!==null?re.key:null;if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return Qe!==null?null:L(le,re,""+fe,ke);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:return fe.key===Qe?Q(le,re,fe,ke):null;case E:return fe.key===Qe?me(le,re,fe,ke):null;case J:return fe=$i(fe),pe(le,re,fe,ke)}if(K(fe)||H(fe))return Qe!==null?null:ye(le,re,fe,ke,null);if(typeof fe.then=="function")return pe(le,re,ac(fe),ke);if(fe.$$typeof===O)return pe(le,re,ec(le,fe),ke);ic(le,fe)}return null}function ge(le,re,fe,ke,Qe){if(typeof ke=="string"&&ke!==""||typeof ke=="number"||typeof ke=="bigint")return le=le.get(fe)||null,L(re,le,""+ke,Qe);if(typeof ke=="object"&&ke!==null){switch(ke.$$typeof){case y:return le=le.get(ke.key===null?fe:ke.key)||null,Q(re,le,ke,Qe);case E:return le=le.get(ke.key===null?fe:ke.key)||null,me(re,le,ke,Qe);case J:return ke=$i(ke),ge(le,re,fe,ke,Qe)}if(K(ke)||H(ke))return le=le.get(fe)||null,ye(re,le,ke,Qe,null);if(typeof ke.then=="function")return ge(le,re,fe,ac(ke),Qe);if(ke.$$typeof===O)return ge(le,re,fe,ec(re,ke),Qe);ic(re,ke)}return null}function Pe(le,re,fe,ke){for(var Qe=null,zt=null,Ke=re,bt=re=0,Ot=null;Ke!==null&&bt<fe.length;bt++){Ke.index>bt?(Ot=Ke,Ke=null):Ot=Ke.sibling;var Bt=pe(le,Ke,fe[bt],ke);if(Bt===null){Ke===null&&(Ke=Ot);break}r&&Ke&&Bt.alternate===null&&i(le,Ke),re=v(Bt,re,bt),zt===null?Qe=Bt:zt.sibling=Bt,zt=Bt,Ke=Ot}if(bt===fe.length)return l(le,Ke),Lt&&wa(le,bt),Qe;if(Ke===null){for(;bt<fe.length;bt++)Ke=Te(le,fe[bt],ke),Ke!==null&&(re=v(Ke,re,bt),zt===null?Qe=Ke:zt.sibling=Ke,zt=Ke);return Lt&&wa(le,bt),Qe}for(Ke=u(Ke);bt<fe.length;bt++)Ot=ge(Ke,le,bt,fe[bt],ke),Ot!==null&&(r&&Ot.alternate!==null&&Ke.delete(Ot.key===null?bt:Ot.key),re=v(Ot,re,bt),zt===null?Qe=Ot:zt.sibling=Ot,zt=Ot);return r&&Ke.forEach(function(yi){return i(le,yi)}),Lt&&wa(le,bt),Qe}function at(le,re,fe,ke){if(fe==null)throw Error(a(151));for(var Qe=null,zt=null,Ke=re,bt=re=0,Ot=null,Bt=fe.next();Ke!==null&&!Bt.done;bt++,Bt=fe.next()){Ke.index>bt?(Ot=Ke,Ke=null):Ot=Ke.sibling;var yi=pe(le,Ke,Bt.value,ke);if(yi===null){Ke===null&&(Ke=Ot);break}r&&Ke&&yi.alternate===null&&i(le,Ke),re=v(yi,re,bt),zt===null?Qe=yi:zt.sibling=yi,zt=yi,Ke=Ot}if(Bt.done)return l(le,Ke),Lt&&wa(le,bt),Qe;if(Ke===null){for(;!Bt.done;bt++,Bt=fe.next())Bt=Te(le,Bt.value,ke),Bt!==null&&(re=v(Bt,re,bt),zt===null?Qe=Bt:zt.sibling=Bt,zt=Bt);return Lt&&wa(le,bt),Qe}for(Ke=u(Ke);!Bt.done;bt++,Bt=fe.next())Bt=ge(Ke,le,bt,Bt.value,ke),Bt!==null&&(r&&Bt.alternate!==null&&Ke.delete(Bt.key===null?bt:Bt.key),re=v(Bt,re,bt),zt===null?Qe=Bt:zt.sibling=Bt,zt=Bt);return r&&Ke.forEach(function(F7){return i(le,F7)}),Lt&&wa(le,bt),Qe}function en(le,re,fe,ke){if(typeof fe=="object"&&fe!==null&&fe.type===N&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:e:{for(var Qe=fe.key;re!==null;){if(re.key===Qe){if(Qe=fe.type,Qe===N){if(re.tag===7){l(le,re.sibling),ke=g(re,fe.props.children),ke.return=le,le=ke;break e}}else if(re.elementType===Qe||typeof Qe=="object"&&Qe!==null&&Qe.$$typeof===J&&$i(Qe)===re.type){l(le,re.sibling),ke=g(re,fe.props),Ol(ke,fe),ke.return=le,le=ke;break e}l(le,re);break}else i(le,re);re=re.sibling}fe.type===N?(ke=qi(fe.props.children,le.mode,ke,fe.key),ke.return=le,le=ke):(ke=Wo(fe.type,fe.key,fe.props,null,le.mode,ke),Ol(ke,fe),ke.return=le,le=ke)}return T(le);case E:e:{for(Qe=fe.key;re!==null;){if(re.key===Qe)if(re.tag===4&&re.stateNode.containerInfo===fe.containerInfo&&re.stateNode.implementation===fe.implementation){l(le,re.sibling),ke=g(re,fe.children||[]),ke.return=le,le=ke;break e}else{l(le,re);break}else i(le,re);re=re.sibling}ke=N0(fe,le.mode,ke),ke.return=le,le=ke}return T(le);case J:return fe=$i(fe),en(le,re,fe,ke)}if(K(fe))return Pe(le,re,fe,ke);if(H(fe)){if(Qe=H(fe),typeof Qe!="function")throw Error(a(150));return fe=Qe.call(fe),at(le,re,fe,ke)}if(typeof fe.then=="function")return en(le,re,ac(fe),ke);if(fe.$$typeof===O)return en(le,re,ec(le,fe),ke);ic(le,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,re!==null&&re.tag===6?(l(le,re.sibling),ke=g(re,fe),ke.return=le,le=ke):(l(le,re),ke=T0(fe,le.mode,ke),ke.return=le,le=ke),T(le)):l(le,re)}return function(le,re,fe,ke){try{Ml=0;var Qe=en(le,re,fe,ke);return As=null,Qe}catch(Ke){if(Ke===Rs||Ke===nc)throw Ke;var zt=Nr(29,Ke,null,le.mode);return zt.lanes=ke,zt.return=le,zt}}}var Ki=g1(!0),b1=g1(!1),ni=!1;function B0(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function q0(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,l){var u=r.updateQueue;if(u===null)return null;if(u=u.shared,(Ut&2)!==0){var g=u.pending;return g===null?i.next=i:(i.next=g.next,g.next=i),u.pending=i,i=Zo(r),e1(r,null,l),i}return Xo(r,u,i,l),Zo(r)}function Dl(r,i,l){if(i=i.updateQueue,i!==null&&(i=i.shared,(l&4194048)!==0)){var u=i.lanes;u&=r.pendingLanes,l|=u,i.lanes=l,Ue(r,l)}}function U0(r,i){var l=r.updateQueue,u=r.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var g=null,v=null;if(l=l.firstBaseUpdate,l!==null){do{var T={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};v===null?g=v=T:v=v.next=T,l=l.next}while(l!==null);v===null?g=v=i:v=v.next=i}else g=v=i;l={baseState:u.baseState,firstBaseUpdate:g,lastBaseUpdate:v,shared:u.shared,callbacks:u.callbacks},r.updateQueue=l;return}r=l.lastBaseUpdate,r===null?l.firstBaseUpdate=i:r.next=i,l.lastBaseUpdate=i}var H0=!1;function jl(){if(H0){var r=Cs;if(r!==null)throw r}}function Ll(r,i,l,u){H0=!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 Q=L,me=Q.next;Q.next=null,T===null?v=me:T.next=me,T=Q;var ye=r.alternate;ye!==null&&(ye=ye.updateQueue,L=ye.lastBaseUpdate,L!==T&&(L===null?ye.firstBaseUpdate=me:L.next=me,ye.lastBaseUpdate=Q))}if(v!==null){var Te=g.baseState;T=0,ye=me=Q=null,L=v;do{var pe=L.lane&-536870913,ge=pe!==L.lane;if(ge?(Mt&pe)===pe:(u&pe)===pe){pe!==0&&pe===Ns&&(H0=!0),ye!==null&&(ye=ye.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});e:{var Pe=r,at=L;pe=i;var en=l;switch(at.tag){case 1:if(Pe=at.payload,typeof Pe=="function"){Te=Pe.call(en,Te,pe);break e}Te=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=at.payload,pe=typeof Pe=="function"?Pe.call(en,Te,pe):Pe,pe==null)break e;Te=b({},Te,pe);break e;case 2:ni=!0}}pe=L.callback,pe!==null&&(r.flags|=64,ge&&(r.flags|=8192),ge=g.callbacks,ge===null?g.callbacks=[pe]:ge.push(pe))}else ge={lane:pe,tag:L.tag,payload:L.payload,callback:L.callback,next:null},ye===null?(me=ye=ge,Q=Te):ye=ye.next=ge,T|=pe;if(L=L.next,L===null){if(L=g.shared.pending,L===null)break;ge=L,L=ge.next,ge.next=null,g.lastBaseUpdate=ge,g.shared.pending=null}}while(!0);ye===null&&(Q=Te),g.baseState=Q,g.firstBaseUpdate=me,g.lastBaseUpdate=ye,v===null&&(g.shared.lanes=0),ci|=T,r.lanes=T,r.memoizedState=Te}}function v1(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function y1(r,i){var l=r.callbacks;if(l!==null)for(r.callbacks=null,r=0;r<l.length;r++)v1(l[r],i)}var _s=D(null),sc=D(0);function x1(r,i){r=Ma,_(sc,r),_(_s,i),Ma=r|i.baseLanes}function F0(){_(sc,Ma),_(_s,_s.current)}function P0(){Ma=sc.current,P(_s),P(sc)}var Cr=D(null),Gr=null;function ii(r){var i=r.alternate;_(En,En.current&1),_(Cr,r),Gr===null&&(i===null||_s.current!==null||i.memoizedState!==null)&&(Gr=r)}function $0(r){_(En,En.current),_(Cr,r),Gr===null&&(Gr=r)}function w1(r){r.tag===22?(_(En,En.current),_(Cr,r),Gr===null&&(Gr=r)):si()}function si(){_(En,En.current),_(Cr,Cr.current)}function Rr(r){P(Cr),Gr===r&&(Gr=null),P(En)}var En=D(0);function lc(r){for(var i=r;i!==null;){if(i.tag===13){var l=i.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Zd(l)||Wd(l)))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,pt=null,Qt=null,In=null,oc=!1,Is=!1,Vi=!1,cc=0,zl=0,Ms=null,Mx=0;function vn(){throw Error(a(321))}function G0(r,i){if(i===null)return!1;for(var l=0;l<i.length&&l<r.length;l++)if(!Tr(r[l],i[l]))return!1;return!0}function K0(r,i,l,u,g,v){return Ea=v,pt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,$.H=r===null||r.memoizedState===null?ag:ld,Vi=!1,v=l(u,g),Vi=!1,Is&&(v=k1(i,l,u,g)),S1(r),v}function S1(r){$.H=Ul;var i=Qt!==null&&Qt.next!==null;if(Ea=0,In=Qt=pt=null,oc=!1,zl=0,Ms=null,i)throw Error(a(300));r===null||Mn||(r=r.dependencies,r!==null&&Jo(r)&&(Mn=!0))}function k1(r,i,l,u){pt=r;var g=0;do{if(Is&&(Ms=null),zl=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)}$.H=ig,v=i(l,u)}while(Is);return v}function Ox(){var r=$.H,i=r.useState()[0];return i=typeof i.then=="function"?Bl(i):i,r=r.useState()[0],(Qt!==null?Qt.memoizedState:null)!==r&&(pt.flags|=1024),i}function V0(){var r=cc!==0;return cc=0,r}function Y0(r,i,l){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~l}function X0(r){if(oc){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}oc=!1}Ea=0,In=Qt=pt=null,Is=!1,zl=cc=0,Ms=null}function ir(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return In===null?pt.memoizedState=In=r:In=In.next=r,In}function Tn(){if(Qt===null){var r=pt.alternate;r=r!==null?r.memoizedState:null}else r=Qt.next;var i=In===null?pt.memoizedState:In.next;if(i!==null)In=i,Qt=r;else{if(r===null)throw pt.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?pt.memoizedState=In=r:In=In.next=r}return In}function uc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bl(r){var i=zl;return zl+=1,Ms===null&&(Ms=[]),r=m1(Ms,r,i),i=pt,(In===null?i.memoizedState:In.next)===null&&(i=i.alternate,$.H=i===null||i.memoizedState===null?ag:ld),r}function dc(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Bl(r);if(r.$$typeof===O)return Kn(r)}throw Error(a(438,String(r)))}function Z0(r){var i=null,l=pt.updateQueue;if(l!==null&&(i=l.memoCache),i==null){var u=pt.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(i={data:u.data.map(function(g){return g.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),l===null&&(l=uc(),pt.updateQueue=l),l.memoCache=i,l=i.data[i.index],l===void 0)for(l=i.data[i.index]=Array(r),u=0;u<r;u++)l[u]=z;return i.index++,l}function Ta(r,i){return typeof i=="function"?i(r):i}function fc(r){var i=Tn();return W0(i,Qt,r)}function W0(r,i,l){var u=r.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var g=r.baseQueue,v=u.pending;if(v!==null){if(g!==null){var T=g.next;g.next=v.next,v.next=T}i.baseQueue=g=v,u.pending=null}if(v=r.baseState,g===null)r.memoizedState=v;else{i=g.next;var L=T=null,Q=null,me=i,ye=!1;do{var Te=me.lane&-536870913;if(Te!==me.lane?(Mt&Te)===Te:(Ea&Te)===Te){var pe=me.revertLane;if(pe===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null}),Te===Ns&&(ye=!0);else if((Ea&pe)===pe){me=me.next,pe===Ns&&(ye=!0);continue}else Te={lane:0,revertLane:me.revertLane,gesture:null,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null},Q===null?(L=Q=Te,T=v):Q=Q.next=Te,pt.lanes|=pe,ci|=pe;Te=me.action,Vi&&l(v,Te),v=me.hasEagerState?me.eagerState:l(v,Te)}else pe={lane:Te,revertLane:me.revertLane,gesture:me.gesture,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null},Q===null?(L=Q=pe,T=v):Q=Q.next=pe,pt.lanes|=Te,ci|=Te;me=me.next}while(me!==null&&me!==i);if(Q===null?T=v:Q.next=L,!Tr(v,r.memoizedState)&&(Mn=!0,ye&&(l=Cs,l!==null)))throw l;r.memoizedState=v,r.baseState=T,r.baseQueue=Q,u.lastRenderedState=v}return g===null&&(u.lanes=0),[r.memoizedState,u.dispatch]}function Q0(r){var i=Tn(),l=i.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=r;var u=l.dispatch,g=l.pending,v=i.memoizedState;if(g!==null){l.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),l.lastRenderedState=v}return[v,u]}function E1(r,i,l){var u=pt,g=Tn(),v=Lt;if(v){if(l===void 0)throw Error(a(407));l=l()}else l=i();var T=!Tr((Qt||g).memoizedState,l);if(T&&(g.memoizedState=l,Mn=!0),g=g.queue,td(C1.bind(null,u,g,r),[r]),g.getSnapshot!==i||T||In!==null&&In.memoizedState.tag&1){if(u.flags|=2048,Os(9,{destroy:void 0},N1.bind(null,u,g,l,i),null),tn===null)throw Error(a(349));v||(Ea&127)!==0||T1(u,i,l)}return l}function T1(r,i,l){r.flags|=16384,r={getSnapshot:i,value:l},i=pt.updateQueue,i===null?(i=uc(),pt.updateQueue=i,i.stores=[r]):(l=i.stores,l===null?i.stores=[r]:l.push(r))}function N1(r,i,l,u){i.value=l,i.getSnapshot=u,R1(i)&&A1(r)}function C1(r,i,l){return l(function(){R1(i)&&A1(r)})}function R1(r){var i=r.getSnapshot;r=r.value;try{var l=i();return!Tr(r,l)}catch{return!0}}function A1(r){var i=Bi(r,2);i!==null&&yr(i,r,2)}function J0(r){var i=ir();if(typeof r=="function"){var l=r;if(r=l(),Vi){on(!0);try{l()}finally{on(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:r},i}function _1(r,i,l,u){return r.baseState=l,W0(r,Qt,typeof u=="function"?u:Ta)}function Dx(r,i,l,u,g){if(pc(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)}};$.T!==null?l(!0):v.isTransition=!1,u(v),l=i.pending,l===null?(v.next=i.pending=v,I1(i,v)):(v.next=l.next,i.pending=l.next=v)}}function I1(r,i){var l=i.action,u=i.payload,g=r.state;if(i.isTransition){var v=$.T,T={};$.T=T;try{var L=l(g,u),Q=$.S;Q!==null&&Q(T,L),M1(r,i,L)}catch(me){ed(r,i,me)}finally{v!==null&&T.types!==null&&(v.types=T.types),$.T=v}}else try{v=l(g,u),M1(r,i,v)}catch(me){ed(r,i,me)}}function M1(r,i,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){O1(r,i,u)},function(u){return ed(r,i,u)}):O1(r,i,l)}function O1(r,i,l){i.status="fulfilled",i.value=l,D1(i),r.state=l,i=r.pending,i!==null&&(l=i.next,l===i?r.pending=null:(l=l.next,i.next=l,I1(r,l)))}function ed(r,i,l){var u=r.pending;if(r.pending=null,u!==null){u=u.next;do i.status="rejected",i.reason=l,D1(i),i=i.next;while(i!==u)}r.action=null}function D1(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function j1(r,i){return i}function L1(r,i){if(Lt){var l=tn.formState;if(l!==null){e:{var u=pt;if(Lt){if(cn){t:{for(var g=cn,v=$r;g.nodeType!==8;){if(!v){g=null;break t}if(g=Kr(g.nextSibling),g===null){g=null;break t}}v=g.data,g=v==="F!"||v==="F"?g:null}if(g){cn=Kr(g.nextSibling),u=g.data==="F!";break e}}ei(u)}u=!1}u&&(i=l[0])}}return l=ir(),l.memoizedState=l.baseState=i,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:j1,lastRenderedState:i},l.queue=u,l=tg.bind(null,pt,u),u.dispatch=l,u=J0(!1),v=sd.bind(null,pt,!1,u.queue),u=ir(),g={state:i,dispatch:null,action:r,pending:null},u.queue=g,l=Dx.bind(null,pt,g,v,l),g.dispatch=l,u.memoizedState=r,[i,l,!1]}function z1(r){var i=Tn();return B1(i,Qt,r)}function B1(r,i,l){if(i=W0(r,i,j1)[0],r=fc(Ta)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var u=Bl(i)}catch(T){throw T===Rs?nc:T}else u=i;i=Tn();var g=i.queue,v=g.dispatch;return l!==i.memoizedState&&(pt.flags|=2048,Os(9,{destroy:void 0},jx.bind(null,g,l),null)),[u,v,r]}function jx(r,i){r.action=i}function q1(r){var i=Tn(),l=Qt;if(l!==null)return B1(i,l,r);Tn(),i=i.memoizedState,l=Tn();var u=l.queue.dispatch;return l.memoizedState=r,[i,u,!1]}function Os(r,i,l,u){return r={tag:r,create:l,deps:u,inst:i,next:null},i=pt.updateQueue,i===null&&(i=uc(),pt.updateQueue=i),l=i.lastEffect,l===null?i.lastEffect=r.next=r:(u=l.next,l.next=r,r.next=u,i.lastEffect=r),r}function U1(){return Tn().memoizedState}function mc(r,i,l,u){var g=ir();pt.flags|=r,g.memoizedState=Os(1|i,{destroy:void 0},l,u===void 0?null:u)}function hc(r,i,l,u){var g=Tn();u=u===void 0?null:u;var v=g.memoizedState.inst;Qt!==null&&u!==null&&G0(u,Qt.memoizedState.deps)?g.memoizedState=Os(i,v,l,u):(pt.flags|=r,g.memoizedState=Os(1|i,v,l,u))}function H1(r,i){mc(8390656,8,r,i)}function td(r,i){hc(2048,8,r,i)}function Lx(r){pt.flags|=4;var i=pt.updateQueue;if(i===null)i=uc(),pt.updateQueue=i,i.events=[r];else{var l=i.events;l===null?i.events=[r]:l.push(r)}}function F1(r){var i=Tn().memoizedState;return Lx({ref:i,nextImpl:r}),function(){if((Ut&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function P1(r,i){return hc(4,2,r,i)}function $1(r,i){return hc(4,4,r,i)}function G1(r,i){if(typeof i=="function"){r=r();var l=i(r);return function(){typeof l=="function"?l():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function K1(r,i,l){l=l!=null?l.concat([r]):null,hc(4,4,G1.bind(null,i,r),l)}function nd(){}function V1(r,i){var l=Tn();i=i===void 0?null:i;var u=l.memoizedState;return i!==null&&G0(i,u[1])?u[0]:(l.memoizedState=[r,i],r)}function Y1(r,i){var l=Tn();i=i===void 0?null:i;var u=l.memoizedState;if(i!==null&&G0(i,u[1]))return u[0];if(u=r(),Vi){on(!0);try{r()}finally{on(!1)}}return l.memoizedState=[u,i],u}function rd(r,i,l){return l===void 0||(Ea&1073741824)!==0&&(Mt&261930)===0?r.memoizedState=i:(r.memoizedState=l,r=Xg(),pt.lanes|=r,ci|=r,l)}function X1(r,i,l,u){return Tr(l,i)?l:_s.current!==null?(r=rd(r,l,u),Tr(r,i)||(Mn=!0),r):(Ea&42)===0||(Ea&1073741824)!==0&&(Mt&261930)===0?(Mn=!0,r.memoizedState=l):(r=Xg(),pt.lanes|=r,ci|=r,i)}function Z1(r,i,l,u,g){var v=ee.p;ee.p=v!==0&&8>v?v:8;var T=$.T,L={};$.T=L,sd(r,!1,i,l);try{var Q=g(),me=$.S;if(me!==null&&me(L,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var ye=Ix(Q,u);ql(r,i,ye,Ir(r))}else ql(r,i,u,Ir(r))}catch(Te){ql(r,i,{then:function(){},status:"rejected",reason:Te},Ir())}finally{ee.p=v,T!==null&&L.types!==null&&(T.types=L.types),$.T=T}}function zx(){}function ad(r,i,l,u){if(r.tag!==5)throw Error(a(476));var g=W1(r).queue;Z1(r,g,i,oe,l===null?zx:function(){return Q1(r),l(u)})}function W1(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:oe},next:null};var l={};return i.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:l},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function Q1(r){var i=W1(r);i.next===null&&(i=r.alternate.memoizedState),ql(r,i.next.queue,{},Ir())}function id(){return Kn(no)}function J1(){return Tn().memoizedState}function eg(){return Tn().memoizedState}function Bx(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var l=Ir();r=ri(l);var u=ai(i,r,l);u!==null&&(yr(u,i,l),Dl(u,i,l)),i={cache:D0()},r.payload=i;return}i=i.return}}function qx(r,i,l){var u=Ir();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},pc(r)?ng(i,l):(l=k0(r,i,l,u),l!==null&&(yr(l,r,u),rg(l,i,u)))}function tg(r,i,l){var u=Ir();ql(r,i,l,u)}function ql(r,i,l,u){var g={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(pc(r))ng(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,l);if(g.hasEagerState=!0,g.eagerState=L,Tr(L,T))return Xo(r,i,g,0),tn===null&&Yo(),!1}catch{}if(l=k0(r,i,g,u),l!==null)return yr(l,r,u),rg(l,i,u),!0}return!1}function sd(r,i,l,u){if(u={lane:2,revertLane:Bd(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},pc(r)){if(i)throw Error(a(479))}else i=k0(r,l,u,2),i!==null&&yr(i,r,2)}function pc(r){var i=r.alternate;return r===pt||i!==null&&i===pt}function ng(r,i){Is=oc=!0;var l=r.pending;l===null?i.next=i:(i.next=l.next,l.next=i),r.pending=i}function rg(r,i,l){if((l&4194048)!==0){var u=i.lanes;u&=r.pendingLanes,l|=u,i.lanes=l,Ue(r,l)}}var Ul={readContext:Kn,use:dc,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};Ul.useEffectEvent=vn;var ag={readContext:Kn,use:dc,useCallback:function(r,i){return ir().memoizedState=[r,i===void 0?null:i],r},useContext:Kn,useEffect:H1,useImperativeHandle:function(r,i,l){l=l!=null?l.concat([r]):null,mc(4194308,4,G1.bind(null,i,r),l)},useLayoutEffect:function(r,i){return mc(4194308,4,r,i)},useInsertionEffect:function(r,i){mc(4,2,r,i)},useMemo:function(r,i){var l=ir();i=i===void 0?null:i;var u=r();if(Vi){on(!0);try{r()}finally{on(!1)}}return l.memoizedState=[u,i],u},useReducer:function(r,i,l){var u=ir();if(l!==void 0){var g=l(i);if(Vi){on(!0);try{l(i)}finally{on(!1)}}}else g=i;return u.memoizedState=u.baseState=g,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:g},u.queue=r,r=r.dispatch=qx.bind(null,pt,r),[u.memoizedState,r]},useRef:function(r){var i=ir();return r={current:r},i.memoizedState=r},useState:function(r){r=J0(r);var i=r.queue,l=tg.bind(null,pt,i);return i.dispatch=l,[r.memoizedState,l]},useDebugValue:nd,useDeferredValue:function(r,i){var l=ir();return rd(l,r,i)},useTransition:function(){var r=J0(!1);return r=Z1.bind(null,pt,r.queue,!0,!1),ir().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,l){var u=pt,g=ir();if(Lt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=i(),tn===null)throw Error(a(349));(Mt&127)!==0||T1(u,i,l)}g.memoizedState=l;var v={value:l,getSnapshot:i};return g.queue=v,H1(C1.bind(null,u,v,r),[r]),u.flags|=2048,Os(9,{destroy:void 0},N1.bind(null,u,v,l,i),null),l},useId:function(){var r=ir(),i=tn.identifierPrefix;if(Lt){var l=aa,u=ra;l=(u&~(1<<32-yt(u)-1)).toString(32)+l,i="_"+i+"R_"+l,l=cc++,0<l&&(i+="H"+l.toString(32)),i+="_"}else l=Mx++,i="_"+i+"r_"+l.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:id,useFormState:L1,useActionState:L1,useOptimistic:function(r){var i=ir();i.memoizedState=i.baseState=r;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=l,i=sd.bind(null,pt,!0,l),l.dispatch=i,[r,i]},useMemoCache:Z0,useCacheRefresh:function(){return ir().memoizedState=Bx.bind(null,pt)},useEffectEvent:function(r){var i=ir(),l={impl:r};return i.memoizedState=l,function(){if((Ut&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},ld={readContext:Kn,use:dc,useCallback:V1,useContext:Kn,useEffect:td,useImperativeHandle:K1,useInsertionEffect:P1,useLayoutEffect:$1,useMemo:Y1,useReducer:fc,useRef:U1,useState:function(){return fc(Ta)},useDebugValue:nd,useDeferredValue:function(r,i){var l=Tn();return X1(l,Qt.memoizedState,r,i)},useTransition:function(){var r=fc(Ta)[0],i=Tn().memoizedState;return[typeof r=="boolean"?r:Bl(r),i]},useSyncExternalStore:E1,useId:J1,useHostTransitionStatus:id,useFormState:z1,useActionState:z1,useOptimistic:function(r,i){var l=Tn();return _1(l,Qt,r,i)},useMemoCache:Z0,useCacheRefresh:eg};ld.useEffectEvent=F1;var ig={readContext:Kn,use:dc,useCallback:V1,useContext:Kn,useEffect:td,useImperativeHandle:K1,useInsertionEffect:P1,useLayoutEffect:$1,useMemo:Y1,useReducer:Q0,useRef:U1,useState:function(){return Q0(Ta)},useDebugValue:nd,useDeferredValue:function(r,i){var l=Tn();return Qt===null?rd(l,r,i):X1(l,Qt.memoizedState,r,i)},useTransition:function(){var r=Q0(Ta)[0],i=Tn().memoizedState;return[typeof r=="boolean"?r:Bl(r),i]},useSyncExternalStore:E1,useId:J1,useHostTransitionStatus:id,useFormState:q1,useActionState:q1,useOptimistic:function(r,i){var l=Tn();return Qt!==null?_1(l,Qt,r,i):(l.baseState=r,[r,l.queue.dispatch])},useMemoCache:Z0,useCacheRefresh:eg};ig.useEffectEvent=F1;function od(r,i,l,u){i=r.memoizedState,l=l(u,i),l=l==null?i:b({},i,l),r.memoizedState=l,r.lanes===0&&(r.updateQueue.baseState=l)}var cd={enqueueSetState:function(r,i,l){r=r._reactInternals;var u=Ir(),g=ri(u);g.payload=i,l!=null&&(g.callback=l),i=ai(r,g,u),i!==null&&(yr(i,r,u),Dl(i,r,u))},enqueueReplaceState:function(r,i,l){r=r._reactInternals;var u=Ir(),g=ri(u);g.tag=1,g.payload=i,l!=null&&(g.callback=l),i=ai(r,g,u),i!==null&&(yr(i,r,u),Dl(i,r,u))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var l=Ir(),u=ri(l);u.tag=2,i!=null&&(u.callback=i),i=ai(r,u,l),i!==null&&(yr(i,r,l),Dl(i,r,l))}};function sg(r,i,l,u,g,v,T){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(u,v,T):i.prototype&&i.prototype.isPureReactComponent?!Nl(l,u)||!Nl(g,v):!0}function lg(r,i,l,u){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(l,u),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(l,u),i.state!==r&&cd.enqueueReplaceState(i,i.state,null)}function Yi(r,i){var l=i;if("ref"in i){l={};for(var u in i)u!=="ref"&&(l[u]=i[u])}if(r=r.defaultProps){l===i&&(l=b({},l));for(var g in r)l[g]===void 0&&(l[g]=r[g])}return l}function og(r){Vo(r)}function cg(r){console.error(r)}function ug(r){Vo(r)}function gc(r,i){try{var l=r.onUncaughtError;l(i.value,{componentStack:i.stack})}catch(u){setTimeout(function(){throw u})}}function dg(r,i,l){try{var u=r.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function ud(r,i,l){return l=ri(l),l.tag=3,l.payload={element:null},l.callback=function(){gc(r,i)},l}function fg(r){return r=ri(r),r.tag=3,r}function mg(r,i,l,u){var g=l.type.getDerivedStateFromError;if(typeof g=="function"){var v=u.value;r.payload=function(){return g(v)},r.callback=function(){dg(i,l,u)}}var T=l.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(r.callback=function(){dg(i,l,u),typeof g!="function"&&(ui===null?ui=new Set([this]):ui.add(this));var L=u.stack;this.componentDidCatch(u.value,{componentStack:L!==null?L:""})})}function Ux(r,i,l,u,g){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(i=l.alternate,i!==null&&Ts(i,l,g,!0),l=Cr.current,l!==null){switch(l.tag){case 31:case 13:return Gr===null?Rc():l.alternate===null&&yn===0&&(yn=3),l.flags&=-257,l.flags|=65536,l.lanes=g,u===rc?l.flags|=16384:(i=l.updateQueue,i===null?l.updateQueue=new Set([u]):i.add(u),jd(r,u,g)),!1;case 22:return l.flags|=65536,u===rc?l.flags|=16384:(i=l.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=i):(l=i.retryQueue,l===null?i.retryQueue=new Set([u]):l.add(u)),jd(r,u,g)),!1}throw Error(a(435,l.tag))}return jd(r,u,g),Rc(),!1}if(Lt)return i=Cr.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=g,u!==A0&&(r=Error(a(422),{cause:u}),Al(Hr(r,l)))):(u!==A0&&(i=Error(a(423),{cause:u}),Al(Hr(i,l))),r=r.current.alternate,r.flags|=65536,g&=-g,r.lanes|=g,u=Hr(u,l),g=ud(r.stateNode,u,g),U0(r,g),yn!==4&&(yn=2)),!1;var v=Error(a(520),{cause:u});if(v=Hr(v,l),Yl===null?Yl=[v]:Yl.push(v),yn!==4&&(yn=2),i===null)return!0;u=Hr(u,l),l=i;do{switch(l.tag){case 3:return l.flags|=65536,r=g&-g,l.lanes|=r,r=ud(l.stateNode,u,r),U0(l,r),!1;case 1:if(i=l.type,v=l.stateNode,(l.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(ui===null||!ui.has(v))))return l.flags|=65536,g&=-g,l.lanes|=g,g=fg(g),mg(g,r,l,u),U0(l,g),!1}l=l.return}while(l!==null);return!1}var dd=Error(a(461)),Mn=!1;function Vn(r,i,l,u){i.child=r===null?b1(i,null,l,u):Ki(i,r.child,l,u)}function hg(r,i,l,u,g){l=l.render;var v=i.ref;if("ref"in u){var T={};for(var L in u)L!=="ref"&&(T[L]=u[L])}else T=u;return Fi(i),u=K0(r,i,l,T,v,g),L=V0(),r!==null&&!Mn?(Y0(r,i,g),Na(r,i,g)):(Lt&&L&&C0(i),i.flags|=1,Vn(r,i,u,g),i.child)}function pg(r,i,l,u,g){if(r===null){var v=l.type;return typeof v=="function"&&!E0(v)&&v.defaultProps===void 0&&l.compare===null?(i.tag=15,i.type=v,gg(r,i,v,u,g)):(r=Wo(l.type,null,u,i,i.mode,g),r.ref=i.ref,r.return=i,i.child=r)}if(v=r.child,!yd(r,g)){var T=v.memoizedProps;if(l=l.compare,l=l!==null?l:Nl,l(T,u)&&r.ref===i.ref)return Na(r,i,g)}return i.flags|=1,r=xa(v,u),r.ref=i.ref,r.return=i,i.child=r}function gg(r,i,l,u,g){if(r!==null){var v=r.memoizedProps;if(Nl(v,u)&&r.ref===i.ref)if(Mn=!1,i.pendingProps=u=v,yd(r,g))(r.flags&131072)!==0&&(Mn=!0);else return i.lanes=r.lanes,Na(r,i,g)}return fd(r,i,l,u,g)}function bg(r,i,l,u){var g=u.children,v=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((i.flags&128)!==0){if(v=v!==null?v.baseLanes|l:l,r!==null){for(u=i.child=r.child,g=0;u!==null;)g=g|u.lanes|u.childLanes,u=u.sibling;u=g&~v}else u=0,i.child=null;return vg(r,i,v,l,u)}if((l&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&tc(i,v!==null?v.cachePool:null),v!==null?x1(i,v):F0(),w1(i);else return u=i.lanes=536870912,vg(r,i,v!==null?v.baseLanes|l:l,l,u)}else v!==null?(tc(i,v.cachePool),x1(i,v),si(),i.memoizedState=null):(r!==null&&tc(i,null),F0(),si());return Vn(r,i,g,l),i.child}function Hl(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function vg(r,i,l,u,g){var v=L0();return v=v===null?null:{parent:_n._currentValue,pool:v},i.memoizedState={baseLanes:l,cachePool:v},r!==null&&tc(i,null),F0(),w1(i),r!==null&&Ts(r,i,u,!0),i.childLanes=g,null}function bc(r,i){return i=yc({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function yg(r,i,l){return Ki(i,r.child,null,l),r=bc(i,i.pendingProps),r.flags|=2,Rr(i),i.memoizedState=null,r}function Hx(r,i,l){var u=i.pendingProps,g=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(Lt){if(u.mode==="hidden")return r=bc(i,u),i.lanes=536870912,Hl(null,r);if($0(i),(r=cn)?(r=Ib(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},l=n1(r),l.return=i,i.child=l,Gn=i,cn=null)):r=null,r===null)throw ei(i);return i.lanes=536870912,null}return bc(i,u)}var v=r.memoizedState;if(v!==null){var T=v.dehydrated;if($0(i),g)if(i.flags&256)i.flags&=-257,i=yg(r,i,l);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,l,!1),g=(l&r.childLanes)!==0,Mn||g){if(u=tn,u!==null&&(T=jt(u,l),T!==0&&T!==v.retryLane))throw v.retryLane=T,Bi(r,T),yr(u,r,T),dd;Rc(),i=yg(r,i,l)}else r=v.treeContext,cn=Kr(T.nextSibling),Gn=i,Lt=!0,Ja=null,$r=!1,r!==null&&i1(i,r),i=bc(i,u),i.flags|=4096;return i}return r=xa(r.child,{mode:u.mode,children:u.children}),r.ref=i.ref,i.child=r,r.return=i,r}function vc(r,i){var l=i.ref;if(l===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(r===null||r.ref!==l)&&(i.flags|=4194816)}}function fd(r,i,l,u,g){return Fi(i),l=K0(r,i,l,u,void 0,g),u=V0(),r!==null&&!Mn?(Y0(r,i,g),Na(r,i,g)):(Lt&&u&&C0(i),i.flags|=1,Vn(r,i,l,g),i.child)}function xg(r,i,l,u,g,v){return Fi(i),i.updateQueue=null,l=k1(i,u,l,g),S1(r),u=V0(),r!==null&&!Mn?(Y0(r,i,v),Na(r,i,v)):(Lt&&u&&C0(i),i.flags|=1,Vn(r,i,l,v),i.child)}function wg(r,i,l,u,g){if(Fi(i),i.stateNode===null){var v=ws,T=l.contextType;typeof T=="object"&&T!==null&&(v=Kn(T)),v=new l(u,v),i.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=cd,i.stateNode=v,v._reactInternals=i,v=i.stateNode,v.props=u,v.state=i.memoizedState,v.refs={},B0(i),T=l.contextType,v.context=typeof T=="object"&&T!==null?Kn(T):ws,v.state=i.memoizedState,T=l.getDerivedStateFromProps,typeof T=="function"&&(od(i,l,T,u),v.state=i.memoizedState),typeof l.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&&cd.enqueueReplaceState(v,v.state,null),Ll(i,u,v,g),jl(),v.state=i.memoizedState),typeof v.componentDidMount=="function"&&(i.flags|=4194308),u=!0}else if(r===null){v=i.stateNode;var L=i.memoizedProps,Q=Yi(l,L);v.props=Q;var me=v.context,ye=l.contextType;T=ws,typeof ye=="object"&&ye!==null&&(T=Kn(ye));var Te=l.getDerivedStateFromProps;ye=typeof Te=="function"||typeof v.getSnapshotBeforeUpdate=="function",L=i.pendingProps!==L,ye||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(L||me!==T)&&lg(i,v,u,T),ni=!1;var pe=i.memoizedState;v.state=pe,Ll(i,u,v,g),jl(),me=i.memoizedState,L||pe!==me||ni?(typeof Te=="function"&&(od(i,l,Te,u),me=i.memoizedState),(Q=ni||sg(i,l,Q,u,pe,me,T))?(ye||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=u,i.memoizedState=me),v.props=u,v.state=me,v.context=T,u=Q):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),u=!1)}else{v=i.stateNode,q0(r,i),T=i.memoizedProps,ye=Yi(l,T),v.props=ye,Te=i.pendingProps,pe=v.context,me=l.contextType,Q=ws,typeof me=="object"&&me!==null&&(Q=Kn(me)),L=l.getDerivedStateFromProps,(me=typeof L=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(T!==Te||pe!==Q)&&lg(i,v,u,Q),ni=!1,pe=i.memoizedState,v.state=pe,Ll(i,u,v,g),jl();var ge=i.memoizedState;T!==Te||pe!==ge||ni||r!==null&&r.dependencies!==null&&Jo(r.dependencies)?(typeof L=="function"&&(od(i,l,L,u),ge=i.memoizedState),(ye=ni||sg(i,l,ye,u,pe,ge,Q)||r!==null&&r.dependencies!==null&&Jo(r.dependencies))?(me||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(u,ge,Q),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(u,ge,Q)),typeof v.componentDidUpdate=="function"&&(i.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof v.componentDidUpdate!="function"||T===r.memoizedProps&&pe===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||T===r.memoizedProps&&pe===r.memoizedState||(i.flags|=1024),i.memoizedProps=u,i.memoizedState=ge),v.props=u,v.state=ge,v.context=Q,u=ye):(typeof v.componentDidUpdate!="function"||T===r.memoizedProps&&pe===r.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||T===r.memoizedProps&&pe===r.memoizedState||(i.flags|=1024),u=!1)}return v=u,vc(r,i),u=(i.flags&128)!==0,v||u?(v=i.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:v.render(),i.flags|=1,r!==null&&u?(i.child=Ki(i,r.child,null,g),i.child=Ki(i,null,l,g)):Vn(r,i,l,g),i.memoizedState=v.state,r=i.child):r=Na(r,i,g),r}function Sg(r,i,l,u){return Ui(),i.flags|=256,Vn(r,i,l,u),i.child}var md={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hd(r){return{baseLanes:r,cachePool:d1()}}function pd(r,i,l){return r=r!==null?r.childLanes&~l:0,i&&(r|=_r),r}function kg(r,i,l){var u=i.pendingProps,g=!1,v=(i.flags&128)!==0,T;if((T=v)||(T=r!==null&&r.memoizedState===null?!1:(En.current&2)!==0),T&&(g=!0,i.flags&=-129),T=(i.flags&32)!==0,i.flags&=-33,r===null){if(Lt){if(g?ii(i):si(),(r=cn)?(r=Ib(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},l=n1(r),l.return=i,i.child=l,Gn=i,cn=null)):r=null,r===null)throw ei(i);return Wd(r)?i.lanes=32:i.lanes=536870912,null}var L=u.children;return u=u.fallback,g?(si(),g=i.mode,L=yc({mode:"hidden",children:L},g),u=qi(u,g,l,null),L.return=i,u.return=i,L.sibling=u,i.child=L,u=i.child,u.memoizedState=hd(l),u.childLanes=pd(r,T,l),i.memoizedState=md,Hl(null,u)):(ii(i),gd(i,L))}var Q=r.memoizedState;if(Q!==null&&(L=Q.dehydrated,L!==null)){if(v)i.flags&256?(ii(i),i.flags&=-257,i=bd(r,i,l)):i.memoizedState!==null?(si(),i.child=r.child,i.flags|=128,i=null):(si(),L=u.fallback,g=i.mode,u=yc({mode:"visible",children:u.children},g),L=qi(L,g,l,null),L.flags|=2,u.return=i,L.return=i,u.sibling=L,i.child=u,Ki(i,r.child,null,l),u=i.child,u.memoizedState=hd(l),u.childLanes=pd(r,T,l),i.memoizedState=md,i=Hl(null,u));else if(ii(i),Wd(L)){if(T=L.nextSibling&&L.nextSibling.dataset,T)var me=T.dgst;T=me,u=Error(a(419)),u.stack="",u.digest=T,Al({value:u,source:null,stack:null}),i=bd(r,i,l)}else if(Mn||Ts(r,i,l,!1),T=(l&r.childLanes)!==0,Mn||T){if(T=tn,T!==null&&(u=jt(T,l),u!==0&&u!==Q.retryLane))throw Q.retryLane=u,Bi(r,u),yr(T,r,u),dd;Zd(L)||Rc(),i=bd(r,i,l)}else Zd(L)?(i.flags|=192,i.child=r.child,i=null):(r=Q.treeContext,cn=Kr(L.nextSibling),Gn=i,Lt=!0,Ja=null,$r=!1,r!==null&&i1(i,r),i=gd(i,u.children),i.flags|=4096);return i}return g?(si(),L=u.fallback,g=i.mode,Q=r.child,me=Q.sibling,u=xa(Q,{mode:"hidden",children:u.children}),u.subtreeFlags=Q.subtreeFlags&65011712,me!==null?L=xa(me,L):(L=qi(L,g,l,null),L.flags|=2),L.return=i,u.return=i,u.sibling=L,i.child=u,Hl(null,u),u=i.child,L=r.child.memoizedState,L===null?L=hd(l):(g=L.cachePool,g!==null?(Q=_n._currentValue,g=g.parent!==Q?{parent:Q,pool:Q}:g):g=d1(),L={baseLanes:L.baseLanes|l,cachePool:g}),u.memoizedState=L,u.childLanes=pd(r,T,l),i.memoizedState=md,Hl(r.child,u)):(ii(i),l=r.child,r=l.sibling,l=xa(l,{mode:"visible",children:u.children}),l.return=i,l.sibling=null,r!==null&&(T=i.deletions,T===null?(i.deletions=[r],i.flags|=16):T.push(r)),i.child=l,i.memoizedState=null,l)}function gd(r,i){return i=yc({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function yc(r,i){return r=Nr(22,r,null,i),r.lanes=0,r}function bd(r,i,l){return Ki(i,r.child,null,l),r=gd(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function Eg(r,i,l){r.lanes|=i;var u=r.alternate;u!==null&&(u.lanes|=i),M0(r.return,i,l)}function vd(r,i,l,u,g,v){var T=r.memoizedState;T===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:g,treeForkCount:v}:(T.isBackwards=i,T.rendering=null,T.renderingStartTime=0,T.last=u,T.tail=l,T.tailMode=g,T.treeForkCount=v)}function Tg(r,i,l){var u=i.pendingProps,g=u.revealOrder,v=u.tail;u=u.children;var T=En.current,L=(T&2)!==0;if(L?(T=T&1|2,i.flags|=128):T&=1,_(En,T),Vn(r,i,u,l),u=Lt?Rl:0,!L&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Eg(r,l,i);else if(r.tag===19)Eg(r,l,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(l=i.child,g=null;l!==null;)r=l.alternate,r!==null&&lc(r)===null&&(g=l),l=l.sibling;l=g,l===null?(g=i.child,i.child=null):(g=l.sibling,l.sibling=null),vd(i,!1,g,l,v,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,g=i.child,i.child=null;g!==null;){if(r=g.alternate,r!==null&&lc(r)===null){i.child=g;break}r=g.sibling,g.sibling=l,l=g,g=r}vd(i,!0,l,null,v,u);break;case"together":vd(i,!1,null,null,void 0,u);break;default:i.memoizedState=null}return i.child}function Na(r,i,l){if(r!==null&&(i.dependencies=r.dependencies),ci|=i.lanes,(l&i.childLanes)===0)if(r!==null){if(Ts(r,i,l,!1),(l&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,l=xa(r,r.pendingProps),i.child=l,l.return=i;r.sibling!==null;)r=r.sibling,l=l.sibling=xa(r,r.pendingProps),l.return=i;l.sibling=null}return i.child}function yd(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&Jo(r)))}function Fx(r,i,l){switch(i.tag){case 3:we(i,i.stateNode.containerInfo),ti(i,_n,r.memoizedState.cache),Ui();break;case 27:case 5:ze(i);break;case 4:we(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,$0(i),null;break;case 13:var u=i.memoizedState;if(u!==null)return u.dehydrated!==null?(ii(i),i.flags|=128,null):(l&i.child.childLanes)!==0?kg(r,i,l):(ii(i),r=Na(r,i,l),r!==null?r.sibling:null);ii(i);break;case 19:var g=(r.flags&128)!==0;if(u=(l&i.childLanes)!==0,u||(Ts(r,i,l,!1),u=(l&i.childLanes)!==0),g){if(u)return Tg(r,i,l);i.flags|=128}if(g=i.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),_(En,En.current),u)break;return null;case 22:return i.lanes=0,bg(r,i,l,i.pendingProps);case 24:ti(i,_n,r.memoizedState.cache)}return Na(r,i,l)}function Ng(r,i,l){if(r!==null)if(r.memoizedProps!==i.pendingProps)Mn=!0;else{if(!yd(r,l)&&(i.flags&128)===0)return Mn=!1,Fx(r,i,l);Mn=(r.flags&131072)!==0}else Mn=!1,Lt&&(i.flags&1048576)!==0&&a1(i,Rl,i.index);switch(i.lanes=0,i.tag){case 16:e:{var u=i.pendingProps;if(r=$i(i.elementType),i.type=r,typeof r=="function")E0(r)?(u=Yi(r,u),i.tag=1,i=wg(null,i,r,u,l)):(i.tag=0,i=fd(null,i,r,u,l));else{if(r!=null){var g=r.$$typeof;if(g===X){i.tag=11,i=hg(null,i,r,u,l);break e}else if(g===F){i.tag=14,i=pg(null,i,r,u,l);break e}}throw i=G(r)||r,Error(a(306,i,""))}}return i;case 0:return fd(r,i,i.type,i.pendingProps,l);case 1:return u=i.type,g=Yi(u,i.pendingProps),wg(r,i,u,g,l);case 3:e:{if(we(i,i.stateNode.containerInfo),r===null)throw Error(a(387));u=i.pendingProps;var v=i.memoizedState;g=v.element,q0(r,i),Ll(i,u,null,l);var T=i.memoizedState;if(u=T.cache,ti(i,_n,u),u!==v.cache&&O0(i,[_n],l,!0),jl(),u=T.element,v.isDehydrated)if(v={element:u,isDehydrated:!1,cache:T.cache},i.updateQueue.baseState=v,i.memoizedState=v,i.flags&256){i=Sg(r,i,u,l);break e}else if(u!==g){g=Hr(Error(a(424)),i),Al(g),i=Sg(r,i,u,l);break e}else for(r=i.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,cn=Kr(r.firstChild),Gn=i,Lt=!0,Ja=null,$r=!0,l=b1(i,null,u,l),i.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Ui(),u===g){i=Na(r,i,l);break e}Vn(r,i,u,l)}i=i.child}return i;case 26:return vc(r,i),r===null?(l=zb(i.type,null,i.pendingProps,null))?i.memoizedState=l:Lt||(l=i.type,r=i.pendingProps,u=jc(se.current).createElement(l),u[sn]=i,u[Wn]=r,Yn(u,l,r),Rn(u),i.stateNode=u):i.memoizedState=zb(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return ze(i),r===null&&Lt&&(u=i.stateNode=Db(i.type,i.pendingProps,se.current),Gn=i,$r=!0,g=cn,hi(i.type)?(Qd=g,cn=Kr(u.firstChild)):cn=g),Vn(r,i,i.pendingProps.children,l),vc(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&Lt&&((g=u=cn)&&(u=v7(u,i.type,i.pendingProps,$r),u!==null?(i.stateNode=u,Gn=i,cn=Kr(u.firstChild),$r=!1,g=!0):g=!1),g||ei(i)),ze(i),g=i.type,v=i.pendingProps,T=r!==null?r.memoizedProps:null,u=v.children,Vd(g,v)?u=null:T!==null&&Vd(g,T)&&(i.flags|=32),i.memoizedState!==null&&(g=K0(r,i,Ox,null,null,l),no._currentValue=g),vc(r,i),Vn(r,i,u,l),i.child;case 6:return r===null&&Lt&&((r=l=cn)&&(l=y7(l,i.pendingProps,$r),l!==null?(i.stateNode=l,Gn=i,cn=null,r=!0):r=!1),r||ei(i)),null;case 13:return kg(r,i,l);case 4:return we(i,i.stateNode.containerInfo),u=i.pendingProps,r===null?i.child=Ki(i,null,u,l):Vn(r,i,u,l),i.child;case 11:return hg(r,i,i.type,i.pendingProps,l);case 7:return Vn(r,i,i.pendingProps,l),i.child;case 8:return Vn(r,i,i.pendingProps.children,l),i.child;case 12:return Vn(r,i,i.pendingProps.children,l),i.child;case 10:return u=i.pendingProps,ti(i,i.type,u.value),Vn(r,i,u.children,l),i.child;case 9:return g=i.type._context,u=i.pendingProps.children,Fi(i),g=Kn(g),u=u(g),i.flags|=1,Vn(r,i,u,l),i.child;case 14:return pg(r,i,i.type,i.pendingProps,l);case 15:return gg(r,i,i.type,i.pendingProps,l);case 19:return Tg(r,i,l);case 31:return Hx(r,i,l);case 22:return bg(r,i,l,i.pendingProps);case 24:return Fi(i),u=Kn(_n),r===null?(g=L0(),g===null&&(g=tn,v=D0(),g.pooledCache=v,v.refCount++,v!==null&&(g.pooledCacheLanes|=l),g=v),i.memoizedState={parent:u,cache:g},B0(i),ti(i,_n,g)):((r.lanes&l)!==0&&(q0(r,i),Ll(i,null,null,l),jl()),g=r.memoizedState,v=i.memoizedState,g.parent!==u?(g={parent:u,cache:u},i.memoizedState=g,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=g),ti(i,_n,u)):(u=v.cache,ti(i,_n,u),u!==g.cache&&O0(i,[_n],l,!0))),Vn(r,i,i.pendingProps.children,l),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Ca(r){r.flags|=4}function xd(r,i,l,u,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(Jg())r.flags|=8192;else throw Gi=rc,z0}else r.flags&=-16777217}function Cg(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Fb(i))if(Jg())r.flags|=8192;else throw Gi=rc,z0}function xc(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?et():536870912,r.lanes|=i,zs|=i)}function Fl(r,i){if(!Lt)switch(r.tailMode){case"hidden":i=r.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?r.tail=null:l.sibling=null;break;case"collapsed":l=r.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:u.sibling=null}}function un(r){var i=r.alternate!==null&&r.alternate.child===r.child,l=0,u=0;if(i)for(var g=r.child;g!==null;)l|=g.lanes|g.childLanes,u|=g.subtreeFlags&65011712,u|=g.flags&65011712,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)l|=g.lanes|g.childLanes,u|=g.subtreeFlags,u|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=u,r.childLanes=l,i}function Px(r,i,l){var u=i.pendingProps;switch(R0(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return un(i),null;case 1:return un(i),null;case 3:return l=i.stateNode,u=null,r!==null&&(u=r.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),ka(_n),be(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(r===null||r.child===null)&&(Es(i)?Ca(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,_0())),un(i),null;case 26:var g=i.type,v=i.memoizedState;return r===null?(Ca(i),v!==null?(un(i),Cg(i,v)):(un(i),xd(i,g,null,u,l))):v?v!==r.memoizedState?(Ca(i),un(i),Cg(i,v)):(un(i),i.flags&=-16777217):(r=r.memoizedProps,r!==u&&Ca(i),un(i),xd(i,g,r,u,l)),null;case 27:if(Me(i),l=se.current,g=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==u&&Ca(i);else{if(!u){if(i.stateNode===null)throw Error(a(166));return un(i),null}r=ne.current,Es(i)?s1(i):(r=Db(g,u,l),i.stateNode=r,Ca(i))}return un(i),null;case 5:if(Me(i),g=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==u&&Ca(i);else{if(!u){if(i.stateNode===null)throw Error(a(166));return un(i),null}if(v=ne.current,Es(i))s1(i);else{var T=jc(se.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 u.is=="string"?T.createElement("select",{is:u.is}):T.createElement("select"),u.multiple?v.multiple=!0:u.size&&(v.size=u.size);break;default:v=typeof u.is=="string"?T.createElement(g,{is:u.is}):T.createElement(g)}}v[sn]=i,v[Wn]=u;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(Yn(v,g,u),g){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Ca(i)}}return un(i),xd(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,l),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==u&&Ca(i);else{if(typeof u!="string"&&i.stateNode===null)throw Error(a(166));if(r=se.current,Es(i)){if(r=i.stateNode,l=i.memoizedProps,u=null,g=Gn,g!==null)switch(g.tag){case 27:case 5:u=g.memoizedProps}r[sn]=i,r=!!(r.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||kb(r.nodeValue,l)),r||ei(i,!0)}else r=jc(r).createTextNode(u),r[sn]=i,i.stateNode=r}return un(i),null;case 31:if(l=i.memoizedState,r===null||r.memoizedState!==null){if(u=Es(i),l!==null){if(r===null){if(!u)throw Error(a(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[sn]=i}else Ui(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;un(i),r=!1}else l=_0(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=l),r=!0;if(!r)return i.flags&256?(Rr(i),i):(Rr(i),null);if((i.flags&128)!==0)throw Error(a(558))}return un(i),null;case 13:if(u=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(g=Es(i),u!==null&&u.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[sn]=i}else Ui(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;un(i),g=!1}else g=_0(),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=l,i):(l=u!==null,r=r!==null&&r.memoizedState!==null,l&&(u=i.child,g=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(g=u.alternate.memoizedState.cachePool.pool),v=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(v=u.memoizedState.cachePool.pool),v!==g&&(u.flags|=2048)),l!==r&&l&&(i.child.flags|=8192),xc(i,i.updateQueue),un(i),null);case 4:return be(),r===null&&Fd(i.stateNode.containerInfo),un(i),null;case 10:return ka(i.type),un(i),null;case 19:if(P(En),u=i.memoizedState,u===null)return un(i),null;if(g=(i.flags&128)!==0,v=u.rendering,v===null)if(g)Fl(u,!1);else{if(yn!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(v=lc(r),v!==null){for(i.flags|=128,Fl(u,!1),r=v.updateQueue,i.updateQueue=r,xc(i,r),i.subtreeFlags=0,r=l,l=i.child;l!==null;)t1(l,r),l=l.sibling;return _(En,En.current&1|2),Lt&&wa(i,u.treeForkCount),i.child}r=r.sibling}u.tail!==null&&Fe()>Tc&&(i.flags|=128,g=!0,Fl(u,!1),i.lanes=4194304)}else{if(!g)if(r=lc(v),r!==null){if(i.flags|=128,g=!0,r=r.updateQueue,i.updateQueue=r,xc(i,r),Fl(u,!0),u.tail===null&&u.tailMode==="hidden"&&!v.alternate&&!Lt)return un(i),null}else 2*Fe()-u.renderingStartTime>Tc&&l!==536870912&&(i.flags|=128,g=!0,Fl(u,!1),i.lanes=4194304);u.isBackwards?(v.sibling=i.child,i.child=v):(r=u.last,r!==null?r.sibling=v:i.child=v,u.last=v)}return u.tail!==null?(r=u.tail,u.rendering=r,u.tail=r.sibling,u.renderingStartTime=Fe(),r.sibling=null,l=En.current,_(En,g?l&1|2:l&1),Lt&&wa(i,u.treeForkCount),r):(un(i),null);case 22:case 23:return Rr(i),P0(),u=i.memoizedState!==null,r!==null?r.memoizedState!==null!==u&&(i.flags|=8192):u&&(i.flags|=8192),u?(l&536870912)!==0&&(i.flags&128)===0&&(un(i),i.subtreeFlags&6&&(i.flags|=8192)):un(i),l=i.updateQueue,l!==null&&xc(i,l.retryQueue),l=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==l&&(i.flags|=2048),r!==null&&P(Pi),null;case 24:return l=null,r!==null&&(l=r.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),ka(_n),un(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function $x(r,i){switch(R0(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return ka(_n),be(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return Me(i),null;case 31:if(i.memoizedState!==null){if(Rr(i),i.alternate===null)throw Error(a(340));Ui()}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));Ui()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return P(En),null;case 4:return be(),null;case 10:return ka(i.type),null;case 22:case 23:return Rr(i),P0(),r!==null&&P(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 Rg(r,i){switch(R0(i),i.tag){case 3:ka(_n),be();break;case 26:case 27:case 5:Me(i);break;case 4:be();break;case 31:i.memoizedState!==null&&Rr(i);break;case 13:Rr(i);break;case 19:P(En);break;case 10:ka(i.type);break;case 22:case 23:Rr(i),P0(),r!==null&&P(Pi);break;case 24:ka(_n)}}function Pl(r,i){try{var l=i.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var g=u.next;l=g;do{if((l.tag&r)===r){u=void 0;var v=l.create,T=l.inst;u=v(),T.destroy=u}l=l.next}while(l!==g)}}catch(L){Yt(i,i.return,L)}}function li(r,i,l){try{var u=i.updateQueue,g=u!==null?u.lastEffect:null;if(g!==null){var v=g.next;u=v;do{if((u.tag&r)===r){var T=u.inst,L=T.destroy;if(L!==void 0){T.destroy=void 0,g=i;var Q=l,me=L;try{me()}catch(ye){Yt(g,Q,ye)}}}u=u.next}while(u!==v)}}catch(ye){Yt(i,i.return,ye)}}function Ag(r){var i=r.updateQueue;if(i!==null){var l=r.stateNode;try{y1(i,l)}catch(u){Yt(r,r.return,u)}}}function _g(r,i,l){l.props=Yi(r.type,r.memoizedProps),l.state=r.memoizedState;try{l.componentWillUnmount()}catch(u){Yt(r,i,u)}}function $l(r,i){try{var l=r.ref;if(l!==null){switch(r.tag){case 26:case 27:case 5:var u=r.stateNode;break;case 30:u=r.stateNode;break;default:u=r.stateNode}typeof l=="function"?r.refCleanup=l(u):l.current=u}}catch(g){Yt(r,i,g)}}function ia(r,i){var l=r.ref,u=r.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(g){Yt(r,i,g)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(g){Yt(r,i,g)}else l.current=null}function Ig(r){var i=r.type,l=r.memoizedProps,u=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(g){Yt(r,r.return,g)}}function wd(r,i,l){try{var u=r.stateNode;f7(u,r.type,l,i),u[Wn]=i}catch(g){Yt(r,r.return,g)}}function Mg(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&hi(r.type)||r.tag===4}function Sd(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Mg(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 kd(r,i,l){var u=r.tag;if(u===5||u===6)r=r.stateNode,i?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(r,i):(i=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,i.appendChild(r),l=l._reactRootContainer,l!=null||i.onclick!==null||(i.onclick=Le));else if(u!==4&&(u===27&&hi(r.type)&&(l=r.stateNode,i=null),r=r.child,r!==null))for(kd(r,i,l),r=r.sibling;r!==null;)kd(r,i,l),r=r.sibling}function wc(r,i,l){var u=r.tag;if(u===5||u===6)r=r.stateNode,i?l.insertBefore(r,i):l.appendChild(r);else if(u!==4&&(u===27&&hi(r.type)&&(l=r.stateNode),r=r.child,r!==null))for(wc(r,i,l),r=r.sibling;r!==null;)wc(r,i,l),r=r.sibling}function Og(r){var i=r.stateNode,l=r.memoizedProps;try{for(var u=r.type,g=i.attributes;g.length;)i.removeAttributeNode(g[0]);Yn(i,u,l),i[sn]=r,i[Wn]=l}catch(v){Yt(r,r.return,v)}}var Ra=!1,On=!1,Ed=!1,Dg=typeof WeakSet=="function"?WeakSet:Set,Fn=null;function Gx(r,i){if(r=r.containerInfo,Gd=Fc,r=Kp(r),b0(r)){if("selectionStart"in r)var l={start:r.selectionStart,end:r.selectionEnd};else e:{l=(l=r.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var g=u.anchorOffset,v=u.focusNode;u=u.focusOffset;try{l.nodeType,v.nodeType}catch{l=null;break e}var T=0,L=-1,Q=-1,me=0,ye=0,Te=r,pe=null;t:for(;;){for(var ge;Te!==l||g!==0&&Te.nodeType!==3||(L=T+g),Te!==v||u!==0&&Te.nodeType!==3||(Q=T+u),Te.nodeType===3&&(T+=Te.nodeValue.length),(ge=Te.firstChild)!==null;)pe=Te,Te=ge;for(;;){if(Te===r)break t;if(pe===l&&++me===g&&(L=T),pe===v&&++ye===u&&(Q=T),(ge=Te.nextSibling)!==null)break;Te=pe,pe=Te.parentNode}Te=ge}l=L===-1||Q===-1?null:{start:L,end:Q}}else l=null}l=l||{start:0,end:0}}else l=null;for(Kd={focusedElem:r,selectionRange:l},Fc=!1,Fn=i;Fn!==null;)if(i=Fn,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,Fn=r;else for(;Fn!==null;){switch(i=Fn,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(l=0;l<r.length;l++)g=r[l],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&v!==null){r=void 0,l=i,g=v.memoizedProps,v=v.memoizedState,u=l.stateNode;try{var Pe=Yi(l.type,g);r=u.getSnapshotBeforeUpdate(Pe,v),u.__reactInternalSnapshotBeforeUpdate=r}catch(at){Yt(l,l.return,at)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,l=r.nodeType,l===9)Xd(r);else if(l===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Xd(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,Fn=r;break}Fn=i.return}}function jg(r,i,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:_a(r,l),u&4&&Pl(5,l);break;case 1:if(_a(r,l),u&4)if(r=l.stateNode,i===null)try{r.componentDidMount()}catch(T){Yt(l,l.return,T)}else{var g=Yi(l.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(g,i,r.__reactInternalSnapshotBeforeUpdate)}catch(T){Yt(l,l.return,T)}}u&64&&Ag(l),u&512&&$l(l,l.return);break;case 3:if(_a(r,l),u&64&&(r=l.updateQueue,r!==null)){if(i=null,l.child!==null)switch(l.child.tag){case 27:case 5:i=l.child.stateNode;break;case 1:i=l.child.stateNode}try{y1(r,i)}catch(T){Yt(l,l.return,T)}}break;case 27:i===null&&u&4&&Og(l);case 26:case 5:_a(r,l),i===null&&u&4&&Ig(l),u&512&&$l(l,l.return);break;case 12:_a(r,l);break;case 31:_a(r,l),u&4&&Bg(r,l);break;case 13:_a(r,l),u&4&&qg(r,l),u&64&&(r=l.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(l=e7.bind(null,l),x7(r,l))));break;case 22:if(u=l.memoizedState!==null||Ra,!u){i=i!==null&&i.memoizedState!==null||On,g=Ra;var v=On;Ra=u,(On=i)&&!v?Ia(r,l,(l.subtreeFlags&8772)!==0):_a(r,l),Ra=g,On=v}break;case 30:break;default:_a(r,l)}}function Lg(r){var i=r.alternate;i!==null&&(r.alternate=null,Lg(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&hl(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,l){for(l=l.child;l!==null;)zg(r,i,l),l=l.sibling}function zg(r,i,l){if(rt&&typeof rt.onCommitFiberUnmount=="function")try{rt.onCommitFiberUnmount(Pt,l)}catch{}switch(l.tag){case 26:On||ia(l,i),Aa(r,i,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:On||ia(l,i);var u=dn,g=pr;hi(l.type)&&(dn=l.stateNode,pr=!1),Aa(r,i,l),Jl(l.stateNode),dn=u,pr=g;break;case 5:On||ia(l,i);case 6:if(u=dn,g=pr,dn=null,Aa(r,i,l),dn=u,pr=g,dn!==null)if(pr)try{(dn.nodeType===9?dn.body:dn.nodeName==="HTML"?dn.ownerDocument.body:dn).removeChild(l.stateNode)}catch(v){Yt(l,i,v)}else try{dn.removeChild(l.stateNode)}catch(v){Yt(l,i,v)}break;case 18:dn!==null&&(pr?(r=dn,Ab(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,l.stateNode),Gs(r)):Ab(dn,l.stateNode));break;case 4:u=dn,g=pr,dn=l.stateNode.containerInfo,pr=!0,Aa(r,i,l),dn=u,pr=g;break;case 0:case 11:case 14:case 15:li(2,l,i),On||li(4,l,i),Aa(r,i,l);break;case 1:On||(ia(l,i),u=l.stateNode,typeof u.componentWillUnmount=="function"&&_g(l,i,u)),Aa(r,i,l);break;case 21:Aa(r,i,l);break;case 22:On=(u=On)||l.memoizedState!==null,Aa(r,i,l),On=u;break;default:Aa(r,i,l)}}function Bg(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Gs(r)}catch(l){Yt(i,i.return,l)}}}function qg(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(l){Yt(i,i.return,l)}}function Kx(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new Dg),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new Dg),i;default:throw Error(a(435,r.tag))}}function Sc(r,i){var l=Kx(r);i.forEach(function(u){if(!l.has(u)){l.add(u);var g=t7.bind(null,r,u);u.then(g,g)}})}function gr(r,i){var l=i.deletions;if(l!==null)for(var u=0;u<l.length;u++){var g=l[u],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));zg(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;)Ug(i,r),i=i.sibling}var Jr=null;function Ug(r,i){var l=r.alternate,u=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:gr(i,r),br(r),u&4&&(li(3,r,r.return),Pl(3,r),li(5,r,r.return));break;case 1:gr(i,r),br(r),u&512&&(On||l===null||ia(l,l.return)),u&64&&Ra&&(r=r.updateQueue,r!==null&&(u=r.callbacks,u!==null&&(l=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var g=Jr;if(gr(i,r),br(r),u&512&&(On||l===null||ia(l,l.return)),u&4){var v=l!==null?l.memoizedState:null;if(u=r.memoizedState,l===null)if(u===null)if(r.stateNode===null){e:{u=r.type,l=r.memoizedProps,g=g.ownerDocument||g;t:switch(u){case"title":v=g.getElementsByTagName("title")[0],(!v||v[Mi]||v[sn]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=g.createElement(u),g.head.insertBefore(v,g.querySelector("head > title"))),Yn(v,u,l),v[sn]=r,Rn(v),u=v;break e;case"link":var T=Ub("link","href",g).get(u+(l.href||""));if(T){for(var L=0;L<T.length;L++)if(v=T[L],v.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&v.getAttribute("rel")===(l.rel==null?null:l.rel)&&v.getAttribute("title")===(l.title==null?null:l.title)&&v.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){T.splice(L,1);break t}}v=g.createElement(u),Yn(v,u,l),g.head.appendChild(v);break;case"meta":if(T=Ub("meta","content",g).get(u+(l.content||""))){for(L=0;L<T.length;L++)if(v=T[L],v.getAttribute("content")===(l.content==null?null:""+l.content)&&v.getAttribute("name")===(l.name==null?null:l.name)&&v.getAttribute("property")===(l.property==null?null:l.property)&&v.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&v.getAttribute("charset")===(l.charSet==null?null:l.charSet)){T.splice(L,1);break t}}v=g.createElement(u),Yn(v,u,l),g.head.appendChild(v);break;default:throw Error(a(468,u))}v[sn]=r,Rn(v),u=v}r.stateNode=u}else Hb(g,r.type,r.stateNode);else r.stateNode=qb(g,u,r.memoizedProps);else v!==u?(v===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):v.count--,u===null?Hb(g,r.type,r.stateNode):qb(g,u,r.memoizedProps)):u===null&&r.stateNode!==null&&wd(r,r.memoizedProps,l.memoizedProps)}break;case 27:gr(i,r),br(r),u&512&&(On||l===null||ia(l,l.return)),l!==null&&u&4&&wd(r,r.memoizedProps,l.memoizedProps);break;case 5:if(gr(i,r),br(r),u&512&&(On||l===null||ia(l,l.return)),r.flags&32){g=r.stateNode;try{it(g,"")}catch(Pe){Yt(r,r.return,Pe)}}u&4&&r.stateNode!=null&&(g=r.memoizedProps,wd(r,g,l!==null?l.memoizedProps:g)),u&1024&&(Ed=!0);break;case 6:if(gr(i,r),br(r),u&4){if(r.stateNode===null)throw Error(a(162));u=r.memoizedProps,l=r.stateNode;try{l.nodeValue=u}catch(Pe){Yt(r,r.return,Pe)}}break;case 3:if(Bc=null,g=Jr,Jr=Lc(i.containerInfo),gr(i,r),Jr=g,br(r),u&4&&l!==null&&l.memoizedState.isDehydrated)try{Gs(i.containerInfo)}catch(Pe){Yt(r,r.return,Pe)}Ed&&(Ed=!1,Hg(r));break;case 4:u=Jr,Jr=Lc(r.stateNode.containerInfo),gr(i,r),br(r),Jr=u;break;case 12:gr(i,r),br(r);break;case 31:gr(i,r),br(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,Sc(r,u)));break;case 13:gr(i,r),br(r),r.child.flags&8192&&r.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Ec=Fe()),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,Sc(r,u)));break;case 22:g=r.memoizedState!==null;var Q=l!==null&&l.memoizedState!==null,me=Ra,ye=On;if(Ra=me||g,On=ye||Q,gr(i,r),On=ye,Ra=me,br(r),u&8192)e:for(i=r.stateNode,i._visibility=g?i._visibility&-2:i._visibility|1,g&&(l===null||Q||Ra||On||Xi(r)),l=null,i=r;;){if(i.tag===5||i.tag===26){if(l===null){Q=l=i;try{if(v=Q.stateNode,g)T=v.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none";else{L=Q.stateNode;var Te=Q.memoizedProps.style,pe=Te!=null&&Te.hasOwnProperty("display")?Te.display:null;L.style.display=pe==null||typeof pe=="boolean"?"":(""+pe).trim()}}catch(Pe){Yt(Q,Q.return,Pe)}}}else if(i.tag===6){if(l===null){Q=i;try{Q.stateNode.nodeValue=g?"":Q.memoizedProps}catch(Pe){Yt(Q,Q.return,Pe)}}}else if(i.tag===18){if(l===null){Q=i;try{var ge=Q.stateNode;g?_b(ge,!0):_b(Q.stateNode,!1)}catch(Pe){Yt(Q,Q.return,Pe)}}}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;l===i&&(l=null),i=i.return}l===i&&(l=null),i.sibling.return=i.return,i=i.sibling}u&4&&(u=r.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,Sc(r,l))));break;case 19:gr(i,r),br(r),u&4&&(u=r.updateQueue,u!==null&&(r.updateQueue=null,Sc(r,u)));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 l,u=r.return;u!==null;){if(Mg(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var g=l.stateNode,v=Sd(r);wc(r,v,g);break;case 5:var T=l.stateNode;l.flags&32&&(it(T,""),l.flags&=-33);var L=Sd(r);wc(r,L,T);break;case 3:case 4:var Q=l.stateNode.containerInfo,me=Sd(r);kd(r,me,Q);break;default:throw Error(a(161))}}catch(ye){Yt(r,r.return,ye)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function Hg(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;Hg(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;)jg(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 l=i.stateNode;typeof l.componentWillUnmount=="function"&&_g(i,i.return,l),Xi(i);break;case 27:Jl(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,l){for(l=l&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var u=i.alternate,g=r,v=i,T=v.flags;switch(v.tag){case 0:case 11:case 15:Ia(g,v,l),Pl(4,v);break;case 1:if(Ia(g,v,l),u=v,g=u.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(me){Yt(u,u.return,me)}if(u=v,g=u.updateQueue,g!==null){var L=u.stateNode;try{var Q=g.shared.hiddenCallbacks;if(Q!==null)for(g.shared.hiddenCallbacks=null,g=0;g<Q.length;g++)v1(Q[g],L)}catch(me){Yt(u,u.return,me)}}l&&T&64&&Ag(v),$l(v,v.return);break;case 27:Og(v);case 26:case 5:Ia(g,v,l),l&&u===null&&T&4&&Ig(v),$l(v,v.return);break;case 12:Ia(g,v,l);break;case 31:Ia(g,v,l),l&&T&4&&Bg(g,v);break;case 13:Ia(g,v,l),l&&T&4&&qg(g,v);break;case 22:v.memoizedState===null&&Ia(g,v,l),$l(v,v.return);break;case 30:break;default:Ia(g,v,l)}i=i.sibling}}function Td(r,i){var l=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==l&&(r!=null&&r.refCount++,l!=null&&_l(l))}function Nd(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&_l(r))}function ea(r,i,l,u){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Fg(r,i,l,u),i=i.sibling}function Fg(r,i,l,u){var g=i.flags;switch(i.tag){case 0:case 11:case 15:ea(r,i,l,u),g&2048&&Pl(9,i);break;case 1:ea(r,i,l,u);break;case 3:ea(r,i,l,u),g&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&_l(r)));break;case 12:if(g&2048){ea(r,i,l,u),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(Q){Yt(i,i.return,Q)}}else ea(r,i,l,u);break;case 31:ea(r,i,l,u);break;case 13:ea(r,i,l,u);break;case 23:break;case 22:v=i.stateNode,T=i.alternate,i.memoizedState!==null?v._visibility&2?ea(r,i,l,u):Gl(r,i):v._visibility&2?ea(r,i,l,u):(v._visibility|=2,Ds(r,i,l,u,(i.subtreeFlags&10256)!==0||!1)),g&2048&&Td(T,i);break;case 24:ea(r,i,l,u),g&2048&&Nd(i.alternate,i);break;default:ea(r,i,l,u)}}function Ds(r,i,l,u,g){for(g=g&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var v=r,T=i,L=l,Q=u,me=T.flags;switch(T.tag){case 0:case 11:case 15:Ds(v,T,L,Q,g),Pl(8,T);break;case 23:break;case 22:var ye=T.stateNode;T.memoizedState!==null?ye._visibility&2?Ds(v,T,L,Q,g):Gl(v,T):(ye._visibility|=2,Ds(v,T,L,Q,g)),g&&me&2048&&Td(T.alternate,T);break;case 24:Ds(v,T,L,Q,g),g&&me&2048&&Nd(T.alternate,T);break;default:Ds(v,T,L,Q,g)}i=i.sibling}}function Gl(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var l=r,u=i,g=u.flags;switch(u.tag){case 22:Gl(l,u),g&2048&&Td(u.alternate,u);break;case 24:Gl(l,u),g&2048&&Nd(u.alternate,u);break;default:Gl(l,u)}i=i.sibling}}var Kl=8192;function js(r,i,l){if(r.subtreeFlags&Kl)for(r=r.child;r!==null;)Pg(r,i,l),r=r.sibling}function Pg(r,i,l){switch(r.tag){case 26:js(r,i,l),r.flags&Kl&&r.memoizedState!==null&&M7(l,Jr,r.memoizedState,r.memoizedProps);break;case 5:js(r,i,l);break;case 3:case 4:var u=Jr;Jr=Lc(r.stateNode.containerInfo),js(r,i,l),Jr=u;break;case 22:r.memoizedState===null&&(u=r.alternate,u!==null&&u.memoizedState!==null?(u=Kl,Kl=16777216,js(r,i,l),Kl=u):js(r,i,l));break;default:js(r,i,l)}}function $g(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 Vl(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var u=i[l];Fn=u,Kg(u,r)}$g(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Gg(r),r=r.sibling}function Gg(r){switch(r.tag){case 0:case 11:case 15:Vl(r),r.flags&2048&&li(9,r,r.return);break;case 3:Vl(r);break;case 12:Vl(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,kc(r)):Vl(r);break;default:Vl(r)}}function kc(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var u=i[l];Fn=u,Kg(u,r)}$g(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:li(8,i,i.return),kc(i);break;case 22:l=i.stateNode,l._visibility&2&&(l._visibility&=-3,kc(i));break;default:kc(i)}r=r.sibling}}function Kg(r,i){for(;Fn!==null;){var l=Fn;switch(l.tag){case 0:case 11:case 15:li(8,l,i);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:_l(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,Fn=u;else e:for(l=r;Fn!==null;){u=Fn;var g=u.sibling,v=u.return;if(Lg(u),u===l){Fn=null;break e}if(g!==null){g.return=v,Fn=g;break e}Fn=v}}}var Vx={getCacheForType:function(r){var i=Kn(_n),l=i.data.get(r);return l===void 0&&(l=r(),i.data.set(r,l)),l},cacheSignal:function(){return Kn(_n).controller.signal}},Yx=typeof WeakMap=="function"?WeakMap:Map,Ut=0,tn=null,Ct=null,Mt=0,Vt=0,Ar=null,oi=!1,Ls=!1,Cd=!1,Ma=0,yn=0,ci=0,Zi=0,Rd=0,_r=0,zs=0,Yl=null,vr=null,Ad=!1,Ec=0,Vg=0,Tc=1/0,Nc=null,ui=null,Bn=0,di=null,Bs=null,Oa=0,_d=0,Id=null,Yg=null,Xl=0,Md=null;function Ir(){return(Ut&2)!==0&&Mt!==0?Mt&-Mt:$.T!==null?Bd():Zn()}function Xg(){if(_r===0)if((Mt&536870912)===0||Lt){var r=xt;xt<<=1,(xt&3932160)===0&&(xt=262144),_r=r}else _r=536870912;return r=Cr.current,r!==null&&(r.flags|=32),_r}function yr(r,i,l){(r===tn&&(Vt===2||Vt===9)||r.cancelPendingCommit!==null)&&(qs(r,0),fi(r,Mt,_r,!1)),ue(r,l),((Ut&2)===0||r!==tn)&&(r===tn&&((Ut&2)===0&&(Zi|=l),yn===4&&fi(r,Mt,_r,!1)),sa(r))}function Zg(r,i,l){if((Ut&6)!==0)throw Error(a(327));var u=!l&&(i&127)===0&&(i&r.expiredLanes)===0||xe(r,i),g=u?Wx(r,i):Dd(r,i,!0),v=u;do{if(g===0){Ls&&!u&&fi(r,i,0,!1);break}else{if(l=r.current.alternate,v&&!Xx(l)){g=Dd(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=Yl;var Q=L.current.memoizedState.isDehydrated;if(Q&&(qs(L,T).flags|=256),T=Dd(L,T,!1),T!==2){if(Cd&&!Q){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){qs(r,0),fi(r,i,0,!0);break}e:{switch(u=r,v=g,v){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:fi(u,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=Ec+300-Fe(),10<g)){if(fi(u,i,_r,!oi),Z(u,0,!0)!==0)break e;Oa=i,u.timeoutHandle=Cb(Wg.bind(null,u,l,vr,Nc,Ad,i,_r,Zi,zs,oi,v,"Throttled",-0,0),g);break e}Wg(u,l,vr,Nc,Ad,i,_r,Zi,zs,oi,v,null,-0,0)}}break}while(!0);sa(r)}function Wg(r,i,l,u,g,v,T,L,Q,me,ye,Te,pe,ge){if(r.timeoutHandle=-1,Te=i.subtreeFlags,Te&8192||(Te&16785408)===16785408){Te={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Le},Pg(i,v,Te);var Pe=(v&62914560)===v?Ec-Fe():(v&4194048)===v?Vg-Fe():0;if(Pe=O7(Te,Pe),Pe!==null){Oa=v,r.cancelPendingCommit=Pe(ib.bind(null,r,i,v,l,u,g,T,L,Q,ye,Te,null,pe,ge)),fi(r,v,T,!me);return}}ib(r,i,v,l,u,g,T,L,Q)}function Xx(r){for(var i=r;;){var l=i.tag;if((l===0||l===11||l===15)&&i.flags&16384&&(l=i.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var g=l[u],v=g.getSnapshot;g=g.value;try{if(!Tr(v(),g))return!1}catch{return!1}}if(l=i.child,i.subtreeFlags&16384&&l!==null)l.return=i,i=l;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,l,u){i&=~Rd,i&=~Zi,r.suspendedLanes|=i,r.pingedLanes&=~i,u&&(r.warmLanes|=i),u=r.expirationTimes;for(var g=i;0<g;){var v=31-yt(g),T=1<<v;u[v]=-1,g&=~T}l!==0&&Oe(r,l,i)}function Cc(){return(Ut&6)===0?(Zl(0),!1):!0}function Od(){if(Ct!==null){if(Vt===0)var r=Ct.return;else r=Ct,Sa=Hi=null,X0(r),As=null,Ml=0,r=Ct;for(;r!==null;)Rg(r.alternate,r),r=r.return;Ct=null}}function qs(r,i){var l=r.timeoutHandle;l!==-1&&(r.timeoutHandle=-1,p7(l)),l=r.cancelPendingCommit,l!==null&&(r.cancelPendingCommit=null,l()),Oa=0,Od(),tn=r,Ct=l=xa(r.current,null),Mt=i,Vt=0,Ar=null,oi=!1,Ls=xe(r,i),Cd=!1,zs=_r=Rd=Zi=ci=yn=0,vr=Yl=null,Ad=!1,(i&8)!==0&&(i|=i&32);var u=r.entangledLanes;if(u!==0)for(r=r.entanglements,u&=i;0<u;){var g=31-yt(u),v=1<<g;i|=r[g],u&=~v}return Ma=i,Yo(),l}function Qg(r,i){pt=null,$.H=Ul,i===Rs||i===nc?(i=h1(),Vt=3):i===z0?(i=h1(),Vt=4):Vt=i===dd?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Ar=i,Ct===null&&(yn=1,gc(r,Hr(i,r.current)))}function Jg(){var r=Cr.current;return r===null?!0:(Mt&4194048)===Mt?Gr===null:(Mt&62914560)===Mt||(Mt&536870912)!==0?r===Gr:!1}function eb(){var r=$.H;return $.H=Ul,r===null?Ul:r}function tb(){var r=$.A;return $.A=Vx,r}function Rc(){yn=4,oi||(Mt&4194048)!==Mt&&Cr.current!==null||(Ls=!0),(ci&134217727)===0&&(Zi&134217727)===0||tn===null||fi(tn,Mt,_r,!1)}function Dd(r,i,l){var u=Ut;Ut|=2;var g=eb(),v=tb();(tn!==r||Mt!==i)&&(Nc=null,qs(r,i)),i=!1;var T=yn;e:do try{if(Vt!==0&&Ct!==null){var L=Ct,Q=Ar;switch(Vt){case 8:Od(),T=6;break e;case 3:case 2:case 9:case 6:Cr.current===null&&(i=!0);var me=Vt;if(Vt=0,Ar=null,Us(r,L,Q,me),l&&Ls){T=0;break e}break;default:me=Vt,Vt=0,Ar=null,Us(r,L,Q,me)}}Zx(),T=yn;break}catch(ye){Qg(r,ye)}while(!0);return i&&r.shellSuspendCounter++,Sa=Hi=null,Ut=u,$.H=g,$.A=v,Ct===null&&(tn=null,Mt=0,Yo()),T}function Zx(){for(;Ct!==null;)nb(Ct)}function Wx(r,i){var l=Ut;Ut|=2;var u=eb(),g=tb();tn!==r||Mt!==i?(Nc=null,Tc=Fe()+500,qs(r,i)):Ls=xe(r,i);e:do try{if(Vt!==0&&Ct!==null){i=Ct;var v=Ar;t:switch(Vt){case 1:Vt=0,Ar=null,Us(r,i,v,1);break;case 2:case 9:if(f1(v)){Vt=0,Ar=null,rb(i);break}i=function(){Vt!==2&&Vt!==9||tn!==r||(Vt=7),sa(r)},v.then(i,i);break e;case 3:Vt=7;break e;case 4:Vt=5;break e;case 7:f1(v)?(Vt=0,Ar=null,rb(i)):(Vt=0,Ar=null,Us(r,i,v,7));break;case 5:var T=null;switch(Ct.tag){case 26:T=Ct.memoizedState;case 5:case 27:var L=Ct;if(T?Fb(T):L.stateNode.complete){Vt=0,Ar=null;var Q=L.sibling;if(Q!==null)Ct=Q;else{var me=L.return;me!==null?(Ct=me,Ac(me)):Ct=null}break t}}Vt=0,Ar=null,Us(r,i,v,5);break;case 6:Vt=0,Ar=null,Us(r,i,v,6);break;case 8:Od(),yn=6;break e;default:throw Error(a(462))}}Qx();break}catch(ye){Qg(r,ye)}while(!0);return Sa=Hi=null,$.H=u,$.A=g,Ut=l,Ct!==null?0:(tn=null,Mt=0,Yo(),yn)}function Qx(){for(;Ct!==null&&!Nt();)nb(Ct)}function nb(r){var i=Ng(r.alternate,r,Ma);r.memoizedProps=r.pendingProps,i===null?Ac(r):Ct=i}function rb(r){var i=r,l=i.alternate;switch(i.tag){case 15:case 0:i=xg(l,i,i.pendingProps,i.type,void 0,Mt);break;case 11:i=xg(l,i,i.pendingProps,i.type.render,i.ref,Mt);break;case 5:X0(i);default:Rg(l,i),i=Ct=t1(i,Ma),i=Ng(l,i,Ma)}r.memoizedProps=r.pendingProps,i===null?Ac(r):Ct=i}function Us(r,i,l,u){Sa=Hi=null,X0(i),As=null,Ml=0;var g=i.return;try{if(Ux(r,g,i,l,Mt)){yn=1,gc(r,Hr(l,r.current)),Ct=null;return}}catch(v){if(g!==null)throw Ct=g,v;yn=1,gc(r,Hr(l,r.current)),Ct=null;return}i.flags&32768?(Lt||u===1?r=!0:Ls||(Mt&536870912)!==0?r=!1:(oi=r=!0,(u===2||u===9||u===3||u===6)&&(u=Cr.current,u!==null&&u.tag===13&&(u.flags|=16384))),ab(i,r)):Ac(i)}function Ac(r){var i=r;do{if((i.flags&32768)!==0){ab(i,oi);return}r=i.return;var l=Px(i.alternate,i,Ma);if(l!==null){Ct=l;return}if(i=i.sibling,i!==null){Ct=i;return}Ct=i=r}while(i!==null);yn===0&&(yn=5)}function ab(r,i){do{var l=$x(r.alternate,r);if(l!==null){l.flags&=32767,Ct=l;return}if(l=r.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!i&&(r=r.sibling,r!==null)){Ct=r;return}Ct=r=l}while(r!==null);yn=6,Ct=null}function ib(r,i,l,u,g,v,T,L,Q){r.cancelPendingCommit=null;do _c();while(Bn!==0);if((Ut&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(v=i.lanes|i.childLanes,v|=S0,Ee(r,l,v,T,L,Q),r===tn&&(Ct=tn=null,Mt=0),Bs=i,di=r,Oa=l,_d=v,Id=g,Yg=u,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,n7(qe,function(){return ub(),null})):(r.callbackNode=null,r.callbackPriority=0),u=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||u){u=$.T,$.T=null,g=ee.p,ee.p=2,T=Ut,Ut|=4;try{Gx(r,i,l)}finally{Ut=T,ee.p=g,$.T=u}}Bn=1,sb(),lb(),ob()}}function sb(){if(Bn===1){Bn=0;var r=di,i=Bs,l=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||l){l=$.T,$.T=null;var u=ee.p;ee.p=2;var g=Ut;Ut|=4;try{Ug(i,r);var v=Kd,T=Kp(r.containerInfo),L=v.focusedElem,Q=v.selectionRange;if(T!==L&&L&&L.ownerDocument&&Gp(L.ownerDocument.documentElement,L)){if(Q!==null&&b0(L)){var me=Q.start,ye=Q.end;if(ye===void 0&&(ye=me),"selectionStart"in L)L.selectionStart=me,L.selectionEnd=Math.min(ye,L.value.length);else{var Te=L.ownerDocument||document,pe=Te&&Te.defaultView||window;if(pe.getSelection){var ge=pe.getSelection(),Pe=L.textContent.length,at=Math.min(Q.start,Pe),en=Q.end===void 0?at:Math.min(Q.end,Pe);!ge.extend&&at>en&&(T=en,en=at,at=T);var le=$p(L,at),re=$p(L,en);if(le&&re&&(ge.rangeCount!==1||ge.anchorNode!==le.node||ge.anchorOffset!==le.offset||ge.focusNode!==re.node||ge.focusOffset!==re.offset)){var fe=Te.createRange();fe.setStart(le.node,le.offset),ge.removeAllRanges(),at>en?(ge.addRange(fe),ge.extend(re.node,re.offset)):(fe.setEnd(re.node,re.offset),ge.addRange(fe))}}}}for(Te=[],ge=L;ge=ge.parentNode;)ge.nodeType===1&&Te.push({element:ge,left:ge.scrollLeft,top:ge.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<Te.length;L++){var ke=Te[L];ke.element.scrollLeft=ke.left,ke.element.scrollTop=ke.top}}Fc=!!Gd,Kd=Gd=null}finally{Ut=g,ee.p=u,$.T=l}}r.current=i,Bn=2}}function lb(){if(Bn===2){Bn=0;var r=di,i=Bs,l=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||l){l=$.T,$.T=null;var u=ee.p;ee.p=2;var g=Ut;Ut|=4;try{jg(r,i.alternate,i)}finally{Ut=g,ee.p=u,$.T=l}}Bn=3}}function ob(){if(Bn===4||Bn===3){Bn=0,qt();var r=di,i=Bs,l=Oa,u=Yg;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Bn=5:(Bn=0,Bs=di=null,cb(r,r.pendingLanes));var g=r.pendingLanes;if(g===0&&(ui=null),bn(l),i=i.stateNode,rt&&typeof rt.onCommitFiberRoot=="function")try{rt.onCommitFiberRoot(Pt,i,void 0,(i.current.flags&128)===128)}catch{}if(u!==null){i=$.T,g=ee.p,ee.p=2,$.T=null;try{for(var v=r.onRecoverableError,T=0;T<u.length;T++){var L=u[T];v(L.value,{componentStack:L.stack})}}finally{$.T=i,ee.p=g}}(Oa&3)!==0&&_c(),sa(r),g=r.pendingLanes,(l&261930)!==0&&(g&42)!==0?r===Md?Xl++:(Xl=0,Md=r):Xl=0,Zl(0)}}function cb(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,_l(i)))}function _c(){return sb(),lb(),ob(),ub()}function ub(){if(Bn!==5)return!1;var r=di,i=_d;_d=0;var l=bn(Oa),u=$.T,g=ee.p;try{ee.p=32>l?32:l,$.T=null,l=Id,Id=null;var v=di,T=Oa;if(Bn=0,Bs=di=null,Oa=0,(Ut&6)!==0)throw Error(a(331));var L=Ut;if(Ut|=4,Gg(v.current),Fg(v,v.current,T,l),Ut=L,Zl(0,!1),rt&&typeof rt.onPostCommitFiberRoot=="function")try{rt.onPostCommitFiberRoot(Pt,v)}catch{}return!0}finally{ee.p=g,$.T=u,cb(r,i)}}function db(r,i,l){i=Hr(l,i),i=ud(r.stateNode,i,2),r=ai(r,i,2),r!==null&&(ue(r,2),sa(r))}function Yt(r,i,l){if(r.tag===3)db(r,r,l);else for(;i!==null;){if(i.tag===3){db(i,r,l);break}else if(i.tag===1){var u=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ui===null||!ui.has(u))){r=Hr(l,r),l=fg(2),u=ai(i,l,2),u!==null&&(mg(l,u,i,r),ue(u,2),sa(u));break}}i=i.return}}function jd(r,i,l){var u=r.pingCache;if(u===null){u=r.pingCache=new Yx;var g=new Set;u.set(i,g)}else g=u.get(i),g===void 0&&(g=new Set,u.set(i,g));g.has(l)||(Cd=!0,g.add(l),r=Jx.bind(null,r,i,l),i.then(r,r))}function Jx(r,i,l){var u=r.pingCache;u!==null&&u.delete(i),r.pingedLanes|=r.suspendedLanes&l,r.warmLanes&=~l,tn===r&&(Mt&l)===l&&(yn===4||yn===3&&(Mt&62914560)===Mt&&300>Fe()-Ec?(Ut&2)===0&&qs(r,0):Rd|=l,zs===Mt&&(zs=0)),sa(r)}function fb(r,i){i===0&&(i=et()),r=Bi(r,i),r!==null&&(ue(r,i),sa(r))}function e7(r){var i=r.memoizedState,l=0;i!==null&&(l=i.retryLane),fb(r,l)}function t7(r,i){var l=0;switch(r.tag){case 31:case 13:var u=r.stateNode,g=r.memoizedState;g!==null&&(l=g.retryLane);break;case 19:u=r.stateNode;break;case 22:u=r.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(i),fb(r,l)}function n7(r,i){return wt(r,i)}var Ic=null,Hs=null,Ld=!1,Mc=!1,zd=!1,mi=0;function sa(r){r!==Hs&&r.next===null&&(Hs===null?Ic=Hs=r:Hs=Hs.next=r),Mc=!0,Ld||(Ld=!0,a7())}function Zl(r,i){if(!zd&&Mc){zd=!0;do for(var l=!1,u=Ic;u!==null;){if(r!==0){var g=u.pendingLanes;if(g===0)var v=0;else{var T=u.suspendedLanes,L=u.pingedLanes;v=(1<<31-yt(42|r)+1)-1,v&=g&~(T&~L),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(l=!0,gb(u,v))}else v=Mt,v=Z(u,u===tn?v:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(v&3)===0||xe(u,v)||(l=!0,gb(u,v));u=u.next}while(l);zd=!1}}function r7(){mb()}function mb(){Mc=Ld=!1;var r=0;mi!==0&&h7()&&(r=mi);for(var i=Fe(),l=null,u=Ic;u!==null;){var g=u.next,v=hb(u,i);v===0?(u.next=null,l===null?Ic=g:l.next=g,g===null&&(Hs=l)):(l=u,(r!==0||(v&3)!==0)&&(Mc=!0)),u=g}Bn!==0&&Bn!==5||Zl(r),mi!==0&&(mi=0)}function hb(r,i){for(var l=r.suspendedLanes,u=r.pingedLanes,g=r.expirationTimes,v=r.pendingLanes&-62914561;0<v;){var T=31-yt(v),L=1<<T,Q=g[T];Q===-1?((L&l)===0||(L&u)!==0)&&(g[T]=je(L,i)):Q<=i&&(r.expiredLanes|=L),v&=~L}if(i=tn,l=Mt,l=Z(r,r===i?l:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u=r.callbackNode,l===0||r===i&&(Vt===2||Vt===9)||r.cancelPendingCommit!==null)return u!==null&&u!==null&&Je(u),r.callbackNode=null,r.callbackPriority=0;if((l&3)===0||xe(r,l)){if(i=l&-l,i===r.callbackPriority)return i;switch(u!==null&&Je(u),bn(l)){case 2:case 8:l=ve;break;case 32:l=qe;break;case 268435456:l=nt;break;default:l=qe}return u=pb.bind(null,r),l=wt(l,u),r.callbackPriority=i,r.callbackNode=l,i}return u!==null&&u!==null&&Je(u),r.callbackPriority=2,r.callbackNode=null,2}function pb(r,i){if(Bn!==0&&Bn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var l=r.callbackNode;if(_c()&&r.callbackNode!==l)return null;var u=Mt;return u=Z(r,r===tn?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),u===0?null:(Zg(r,u,i),hb(r,Fe()),r.callbackNode!=null&&r.callbackNode===l?pb.bind(null,r):null)}function gb(r,i){if(_c())return null;Zg(r,i,!0)}function a7(){g7(function(){(Ut&6)!==0?wt(he,r7):mb()})}function Bd(){if(mi===0){var r=Ns;r===0&&(r=Ve,Ve<<=1,(Ve&261888)===0&&(Ve=256)),mi=r}return mi}function bb(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Za(""+r)}function vb(r,i){var l=i.ownerDocument.createElement("input");return l.name=i.name,l.value=i.value,r.id&&l.setAttribute("form",r.id),i.parentNode.insertBefore(l,i),r=new FormData(r),l.parentNode.removeChild(l),r}function i7(r,i,l,u,g){if(i==="submit"&&l&&l.stateNode===g){var v=bb((g[Wn]||null).action),T=u.submitter;T&&(i=(i=T[Wn]||null)?bb(i.formAction):T.getAttribute("formAction"),i!==null&&(v=i,T=null));var L=new $o("action","action",null,u,g);r.push({event:L,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(mi!==0){var Q=T?vb(g,T):new FormData(g);ad(l,{pending:!0,data:Q,method:g.method,action:v},null,Q)}}else typeof v=="function"&&(L.preventDefault(),Q=T?vb(g,T):new FormData(g),ad(l,{pending:!0,data:Q,method:g.method,action:v},v,Q))},currentTarget:g}]})}}for(var qd=0;qd<w0.length;qd++){var Ud=w0[qd],s7=Ud.toLowerCase(),l7=Ud[0].toUpperCase()+Ud.slice(1);Qr(s7,"on"+l7)}Qr(Xp,"onAnimationEnd"),Qr(Zp,"onAnimationIteration"),Qr(Wp,"onAnimationStart"),Qr("dblclick","onDoubleClick"),Qr("focusin","onFocus"),Qr("focusout","onBlur"),Qr(kx,"onTransitionRun"),Qr(Ex,"onTransitionStart"),Qr(Tx,"onTransitionCancel"),Qr(Qp,"onTransitionEnd"),Re("onMouseEnter",["mouseout","mouseover"]),Re("onMouseLeave",["mouseout","mouseover"]),Re("onPointerEnter",["pointerout","pointerover"]),Re("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 Wl="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(" "),o7=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wl));function yb(r,i){i=(i&4)!==0;for(var l=0;l<r.length;l++){var u=r[l],g=u.event;u=u.listeners;e:{var v=void 0;if(i)for(var T=u.length-1;0<=T;T--){var L=u[T],Q=L.instance,me=L.currentTarget;if(L=L.listener,Q!==v&&g.isPropagationStopped())break e;v=L,g.currentTarget=me;try{v(g)}catch(ye){Vo(ye)}g.currentTarget=null,v=Q}else for(T=0;T<u.length;T++){if(L=u[T],Q=L.instance,me=L.currentTarget,L=L.listener,Q!==v&&g.isPropagationStopped())break e;v=L,g.currentTarget=me;try{v(g)}catch(ye){Vo(ye)}g.currentTarget=null,v=Q}}}}function Rt(r,i){var l=i[ml];l===void 0&&(l=i[ml]=new Set);var u=r+"__bubble";l.has(u)||(xb(i,r,2,!1),l.add(u))}function Hd(r,i,l){var u=0;i&&(u|=4),xb(l,r,u,i)}var Oc="_reactListening"+Math.random().toString(36).slice(2);function Fd(r){if(!r[Oc]){r[Oc]=!0,Lo.forEach(function(l){l!=="selectionchange"&&(o7.has(l)||Hd(l,!1,r),Hd(l,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[Oc]||(i[Oc]=!0,Hd("selectionchange",!1,i))}}function xb(r,i,l,u){switch(Xb(i)){case 2:var g=L7;break;case 8:g=z7;break;default:g=rf}l=g.bind(null,i,l,r),g=void 0,!o0||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(g=!0),u?g!==void 0?r.addEventListener(i,l,{capture:!0,passive:g}):r.addEventListener(i,l,!0):g!==void 0?r.addEventListener(i,l,{passive:g}):r.addEventListener(i,l,!1)}function Pd(r,i,l,u,g){var v=u;if((i&1)===0&&(i&2)===0&&u!==null)e:for(;;){if(u===null)return;var T=u.tag;if(T===3||T===4){var L=u.stateNode.containerInfo;if(L===g)break;if(T===4)for(T=u.return;T!==null;){var Q=T.tag;if((Q===3||Q===4)&&T.stateNode.containerInfo===g)return;T=T.return}for(;L!==null;){if(T=ar(L),T===null)return;if(Q=T.tag,Q===5||Q===6||Q===26||Q===27){u=v=T;continue e}L=L.parentNode}}u=u.return}Uo(function(){var me=v,ye=ht(l),Te=[];e:{var pe=Jp.get(r);if(pe!==void 0){var ge=$o,Pe=r;switch(r){case"keypress":if(Fo(l)===0)break e;case"keydown":case"keyup":ge=tx;break;case"focusin":Pe="focus",ge=f0;break;case"focusout":Pe="blur",ge=f0;break;case"beforeblur":case"afterblur":ge=f0;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=Rp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=P6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=ax;break;case Xp:case Zp:case Wp:ge=K6;break;case Qp:ge=sx;break;case"scroll":case"scrollend":ge=H6;break;case"wheel":ge=ox;break;case"copy":case"cut":case"paste":ge=Y6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=_p;break;case"toggle":case"beforetoggle":ge=ux}var at=(i&4)!==0,en=!at&&(r==="scroll"||r==="scrollend"),le=at?pe!==null?pe+"Capture":null:pe;at=[];for(var re=me,fe;re!==null;){var ke=re;if(fe=ke.stateNode,ke=ke.tag,ke!==5&&ke!==26&&ke!==27||fe===null||le===null||(ke=yl(re,le),ke!=null&&at.push(Ql(re,ke,fe))),en)break;re=re.return}0<at.length&&(pe=new ge(pe,Pe,null,l,ye),Te.push({event:pe,listeners:at}))}}if((i&7)===0){e:{if(pe=r==="mouseover"||r==="pointerover",ge=r==="mouseout"||r==="pointerout",pe&&l!==Ge&&(Pe=l.relatedTarget||l.fromElement)&&(ar(Pe)||Pe[Ka]))break e;if((ge||pe)&&(pe=ye.window===ye?ye:(pe=ye.ownerDocument)?pe.defaultView||pe.parentWindow:window,ge?(Pe=l.relatedTarget||l.toElement,ge=me,Pe=Pe?ar(Pe):null,Pe!==null&&(en=o(Pe),at=Pe.tag,Pe!==en||at!==5&&at!==27&&at!==6)&&(Pe=null)):(ge=null,Pe=me),ge!==Pe)){if(at=Rp,ke="onMouseLeave",le="onMouseEnter",re="mouse",(r==="pointerout"||r==="pointerover")&&(at=_p,ke="onPointerLeave",le="onPointerEnter",re="pointer"),en=ge==null?pe:Va(ge),fe=Pe==null?pe:Va(Pe),pe=new at(ke,re+"leave",ge,l,ye),pe.target=en,pe.relatedTarget=fe,ke=null,ar(ye)===me&&(at=new at(le,re+"enter",Pe,l,ye),at.target=fe,at.relatedTarget=en,ke=at),en=ke,ge&&Pe)t:{for(at=c7,le=ge,re=Pe,fe=0,ke=le;ke;ke=at(ke))fe++;ke=0;for(var Qe=re;Qe;Qe=at(Qe))ke++;for(;0<fe-ke;)le=at(le),fe--;for(;0<ke-fe;)re=at(re),ke--;for(;fe--;){if(le===re||re!==null&&le===re.alternate){at=le;break t}le=at(le),re=at(re)}at=null}else at=null;ge!==null&&wb(Te,pe,ge,at,!1),Pe!==null&&en!==null&&wb(Te,en,Pe,at,!0)}}e:{if(pe=me?Va(me):window,ge=pe.nodeName&&pe.nodeName.toLowerCase(),ge==="select"||ge==="input"&&pe.type==="file")var zt=Bp;else if(Lp(pe))if(qp)zt=xx;else{zt=vx;var Ke=bx}else ge=pe.nodeName,!ge||ge.toLowerCase()!=="input"||pe.type!=="checkbox"&&pe.type!=="radio"?me&&Xa(me.elementType)&&(zt=Bp):zt=yx;if(zt&&(zt=zt(r,me))){zp(Te,zt,l,ye);break e}Ke&&Ke(r,pe,me),r==="focusout"&&me&&pe.type==="number"&&me.memoizedProps.value!=null&&ps(pe,"number",pe.value)}switch(Ke=me?Va(me):window,r){case"focusin":(Lp(Ke)||Ke.contentEditable==="true")&&(vs=Ke,v0=me,Cl=null);break;case"focusout":Cl=v0=vs=null;break;case"mousedown":y0=!0;break;case"contextmenu":case"mouseup":case"dragend":y0=!1,Vp(Te,l,ye);break;case"selectionchange":if(Sx)break;case"keydown":case"keyup":Vp(Te,l,ye)}var bt;if(h0)e:{switch(r){case"compositionstart":var Ot="onCompositionStart";break e;case"compositionend":Ot="onCompositionEnd";break e;case"compositionupdate":Ot="onCompositionUpdate";break e}Ot=void 0}else bs?Dp(r,l)&&(Ot="onCompositionEnd"):r==="keydown"&&l.keyCode===229&&(Ot="onCompositionStart");Ot&&(Ip&&l.locale!=="ko"&&(bs||Ot!=="onCompositionStart"?Ot==="onCompositionEnd"&&bs&&(bt=Np()):(Wa=ye,c0="value"in Wa?Wa.value:Wa.textContent,bs=!0)),Ke=Dc(me,Ot),0<Ke.length&&(Ot=new Ap(Ot,r,null,l,ye),Te.push({event:Ot,listeners:Ke}),bt?Ot.data=bt:(bt=jp(l),bt!==null&&(Ot.data=bt)))),(bt=fx?mx(r,l):hx(r,l))&&(Ot=Dc(me,"onBeforeInput"),0<Ot.length&&(Ke=new Ap("onBeforeInput","beforeinput",null,l,ye),Te.push({event:Ke,listeners:Ot}),Ke.data=bt)),i7(Te,r,me,l,ye)}yb(Te,i)})}function Ql(r,i,l){return{instance:r,listener:i,currentTarget:l}}function Dc(r,i){for(var l=i+"Capture",u=[];r!==null;){var g=r,v=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||v===null||(g=yl(r,l),g!=null&&u.unshift(Ql(r,g,v)),g=yl(r,i),g!=null&&u.push(Ql(r,g,v))),r.tag===3)return u;r=r.return}return[]}function c7(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function wb(r,i,l,u,g){for(var v=i._reactName,T=[];l!==null&&l!==u;){var L=l,Q=L.alternate,me=L.stateNode;if(L=L.tag,Q!==null&&Q===u)break;L!==5&&L!==26&&L!==27||me===null||(Q=me,g?(me=yl(l,v),me!=null&&T.unshift(Ql(l,me,Q))):g||(me=yl(l,v),me!=null&&T.push(Ql(l,me,Q)))),l=l.return}T.length!==0&&r.push({event:i,listeners:T})}var u7=/\r\n?/g,d7=/\u0000|\uFFFD/g;function Sb(r){return(typeof r=="string"?r:""+r).replace(u7,`
|
|
9
|
+
`).replace(d7,"")}function kb(r,i){return i=Sb(i),Sb(r)===i}function Jt(r,i,l,u,g,v){switch(l){case"children":typeof u=="string"?i==="body"||i==="textarea"&&u===""||it(r,u):(typeof u=="number"||typeof u=="bigint")&&i!=="body"&&it(r,""+u);break;case"className":kr(r,"class",u);break;case"tabIndex":kr(r,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":kr(r,l,u);break;case"style":Kt(r,u,v);break;case"data":if(i!=="object"){kr(r,"data",u);break}case"src":case"href":if(u===""&&(i!=="a"||l!=="href")){r.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(l);break}u=Za(""+u),r.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){r.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof v=="function"&&(l==="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(u==null||typeof u=="symbol"||typeof u=="boolean"){r.removeAttribute(l);break}u=Za(""+u),r.setAttribute(l,u);break;case"onClick":u!=null&&(r.onclick=Le);break;case"onScroll":u!=null&&Rt("scroll",r);break;case"onScrollEnd":u!=null&&Rt("scrollend",r);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(g.children!=null)throw Error(a(60));r.innerHTML=l}}break;case"multiple":r.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":r.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){r.removeAttribute("xlink:href");break}l=Za(""+u),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(l,""+u):r.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(l,""):r.removeAttribute(l);break;case"capture":case"download":u===!0?r.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?r.setAttribute(l,u):r.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?r.setAttribute(l,u):r.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?r.removeAttribute(l):r.setAttribute(l,u);break;case"popover":Rt("beforetoggle",r),Rt("toggle",r),Qn(r,"popover",u);break;case"xlinkActuate":fr(r,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":fr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":fr(r,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":fr(r,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":fr(r,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":fr(r,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":fr(r,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":fr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":fr(r,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Qn(r,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=va.get(l)||l,Qn(r,l,u))}}function $d(r,i,l,u,g,v){switch(l){case"style":Kt(r,u,v);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(g.children!=null)throw Error(a(60));r.innerHTML=l}}break;case"children":typeof u=="string"?it(r,u):(typeof u=="number"||typeof u=="bigint")&&it(r,""+u);break;case"onScroll":u!=null&&Rt("scroll",r);break;case"onScrollEnd":u!=null&&Rt("scrollend",r);break;case"onClick":u!=null&&(r.onclick=Le);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Oi.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(g=l.endsWith("Capture"),i=l.slice(2,g?l.length-7:void 0),v=r[Wn]||null,v=v!=null?v[l]:null,typeof v=="function"&&r.removeEventListener(i,v,g),typeof u=="function")){typeof v!="function"&&v!==null&&(l in r?r[l]=null:r.hasAttribute(l)&&r.removeAttribute(l)),r.addEventListener(i,u,g);break e}l in r?r[l]=u:u===!0?r.setAttribute(l,""):Qn(r,l,u)}}}function Yn(r,i,l){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Rt("error",r),Rt("load",r);var u=!1,g=!1,v;for(v in l)if(l.hasOwnProperty(v)){var T=l[v];if(T!=null)switch(v){case"src":u=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Jt(r,i,v,T,l,null)}}g&&Jt(r,i,"srcSet",l.srcSet,l,null),u&&Jt(r,i,"src",l.src,l,null);return;case"input":Rt("invalid",r);var L=v=T=g=null,Q=null,me=null;for(u in l)if(l.hasOwnProperty(u)){var ye=l[u];if(ye!=null)switch(u){case"name":g=ye;break;case"type":T=ye;break;case"checked":Q=ye;break;case"defaultChecked":me=ye;break;case"value":v=ye;break;case"defaultValue":L=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(a(137,i));break;default:Jt(r,i,u,ye,l,null)}}Di(r,v,L,Q,me,T,g,!1);return;case"select":Rt("invalid",r),u=T=v=null;for(g in l)if(l.hasOwnProperty(g)&&(L=l[g],L!=null))switch(g){case"value":v=L;break;case"defaultValue":T=L;break;case"multiple":u=L;default:Jt(r,i,g,L,l,null)}i=v,l=T,r.multiple=!!u,i!=null?$n(r,!!u,i,!1):l!=null&&$n(r,!!u,l,!0);return;case"textarea":Rt("invalid",r),v=g=u=null;for(T in l)if(l.hasOwnProperty(T)&&(L=l[T],L!=null))switch(T){case"value":u=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,l,null)}gs(r,u,g,v);return;case"option":for(Q in l)l.hasOwnProperty(Q)&&(u=l[Q],u!=null)&&(Q==="selected"?r.selected=u&&typeof u!="function"&&typeof u!="symbol":Jt(r,i,Q,u,l,null));return;case"dialog":Rt("beforetoggle",r),Rt("toggle",r),Rt("cancel",r),Rt("close",r);break;case"iframe":case"object":Rt("load",r);break;case"video":case"audio":for(u=0;u<Wl.length;u++)Rt(Wl[u],r);break;case"image":Rt("error",r),Rt("load",r);break;case"details":Rt("toggle",r);break;case"embed":case"source":case"link":Rt("error",r),Rt("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(me in l)if(l.hasOwnProperty(me)&&(u=l[me],u!=null))switch(me){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Jt(r,i,me,u,l,null)}return;default:if(Xa(i)){for(ye in l)l.hasOwnProperty(ye)&&(u=l[ye],u!==void 0&&$d(r,i,ye,u,l,void 0));return}}for(L in l)l.hasOwnProperty(L)&&(u=l[L],u!=null&&Jt(r,i,L,u,l,null))}function f7(r,i,l,u){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,Q=null,me=null,ye=null;for(ge in l){var Te=l[ge];if(l.hasOwnProperty(ge)&&Te!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":Q=Te;default:u.hasOwnProperty(ge)||Jt(r,i,ge,null,u,Te)}}for(var pe in u){var ge=u[pe];if(Te=l[pe],u.hasOwnProperty(pe)&&(ge!=null||Te!=null))switch(pe){case"type":v=ge;break;case"name":g=ge;break;case"checked":me=ge;break;case"defaultChecked":ye=ge;break;case"value":T=ge;break;case"defaultValue":L=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(a(137,i));break;default:ge!==Te&&Jt(r,i,pe,ge,u,Te)}}gl(r,T,L,Q,me,ye,v,g);return;case"select":ge=T=L=pe=null;for(v in l)if(Q=l[v],l.hasOwnProperty(v)&&Q!=null)switch(v){case"value":break;case"multiple":ge=Q;default:u.hasOwnProperty(v)||Jt(r,i,v,null,u,Q)}for(g in u)if(v=u[g],Q=l[g],u.hasOwnProperty(g)&&(v!=null||Q!=null))switch(g){case"value":pe=v;break;case"defaultValue":L=v;break;case"multiple":T=v;default:v!==Q&&Jt(r,i,g,v,u,Q)}i=L,l=T,u=ge,pe!=null?$n(r,!!l,pe,!1):!!u!=!!l&&(i!=null?$n(r,!!l,i,!0):$n(r,!!l,l?[]:"",!1));return;case"textarea":ge=pe=null;for(L in l)if(g=l[L],l.hasOwnProperty(L)&&g!=null&&!u.hasOwnProperty(L))switch(L){case"value":break;case"children":break;default:Jt(r,i,L,null,u,g)}for(T in u)if(g=u[T],v=l[T],u.hasOwnProperty(T)&&(g!=null||v!=null))switch(T){case"value":pe=g;break;case"defaultValue":ge=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(a(91));break;default:g!==v&&Jt(r,i,T,g,u,v)}Bo(r,pe,ge);return;case"option":for(var Pe in l)pe=l[Pe],l.hasOwnProperty(Pe)&&pe!=null&&!u.hasOwnProperty(Pe)&&(Pe==="selected"?r.selected=!1:Jt(r,i,Pe,null,u,pe));for(Q in u)pe=u[Q],ge=l[Q],u.hasOwnProperty(Q)&&pe!==ge&&(pe!=null||ge!=null)&&(Q==="selected"?r.selected=pe&&typeof pe!="function"&&typeof pe!="symbol":Jt(r,i,Q,pe,u,ge));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 at in l)pe=l[at],l.hasOwnProperty(at)&&pe!=null&&!u.hasOwnProperty(at)&&Jt(r,i,at,null,u,pe);for(me in u)if(pe=u[me],ge=l[me],u.hasOwnProperty(me)&&pe!==ge&&(pe!=null||ge!=null))switch(me){case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(a(137,i));break;default:Jt(r,i,me,pe,u,ge)}return;default:if(Xa(i)){for(var en in l)pe=l[en],l.hasOwnProperty(en)&&pe!==void 0&&!u.hasOwnProperty(en)&&$d(r,i,en,void 0,u,pe);for(ye in u)pe=u[ye],ge=l[ye],!u.hasOwnProperty(ye)||pe===ge||pe===void 0&&ge===void 0||$d(r,i,ye,pe,u,ge);return}}for(var le in l)pe=l[le],l.hasOwnProperty(le)&&pe!=null&&!u.hasOwnProperty(le)&&Jt(r,i,le,null,u,pe);for(Te in u)pe=u[Te],ge=l[Te],!u.hasOwnProperty(Te)||pe===ge||pe==null&&ge==null||Jt(r,i,Te,pe,u,ge)}function Eb(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function m7(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var g=l[u],v=g.transferSize,T=g.initiatorType,L=g.duration;if(v&&L&&Eb(T)){for(T=0,L=g.responseEnd,u+=1;u<l.length;u++){var Q=l[u],me=Q.startTime;if(me>L)break;var ye=Q.transferSize,Te=Q.initiatorType;ye&&Eb(Te)&&(Q=Q.responseEnd,T+=ye*(Q<L?1:(L-me)/(Q-me)))}if(--u,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 Gd=null,Kd=null;function jc(r){return r.nodeType===9?r:r.ownerDocument}function Tb(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 Nb(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 Vd(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 Yd=null;function h7(){var r=window.event;return r&&r.type==="popstate"?r===Yd?!1:(Yd=r,!0):(Yd=null,!1)}var Cb=typeof setTimeout=="function"?setTimeout:void 0,p7=typeof clearTimeout=="function"?clearTimeout:void 0,Rb=typeof Promise=="function"?Promise:void 0,g7=typeof queueMicrotask=="function"?queueMicrotask:typeof Rb<"u"?function(r){return Rb.resolve(null).then(r).catch(b7)}:Cb;function b7(r){setTimeout(function(){throw r})}function hi(r){return r==="head"}function Ab(r,i){var l=i,u=0;do{var g=l.nextSibling;if(r.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"||l==="/&"){if(u===0){r.removeChild(g),Gs(i);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")Jl(r.ownerDocument.documentElement);else if(l==="head"){l=r.ownerDocument.head,Jl(l);for(var v=l.firstChild;v;){var T=v.nextSibling,L=v.nodeName;v[Mi]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&v.rel.toLowerCase()==="stylesheet"||l.removeChild(v),v=T}}else l==="body"&&Jl(r.ownerDocument.body);l=g}while(l);Gs(i)}function _b(r,i){var l=r;r=0;do{var u=l.nextSibling;if(l.nodeType===1?i?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(i?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),u&&u.nodeType===8)if(l=u.data,l==="/$"){if(r===0)break;r--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||r++;l=u}while(l)}function Xd(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var l=i;switch(i=i.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Xd(l),hl(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}r.removeChild(l)}}function v7(r,i,l,u){for(;r.nodeType===1;){var g=l;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!u&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(u){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=Kr(r.nextSibling),r===null)break}return null}function y7(r,i,l){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!l||(r=Kr(r.nextSibling),r===null))return null;return r}function Ib(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=Kr(r.nextSibling),r===null))return null;return r}function Zd(r){return r.data==="$?"||r.data==="$~"}function Wd(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function x7(r,i){var l=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||l.readyState!=="loading")i();else{var u=function(){i(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),r._reactRetry=u}}function Kr(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 Qd=null;function Mb(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var l=r.data;if(l==="/$"||l==="/&"){if(i===0)return Kr(r.nextSibling);i--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||i++}r=r.nextSibling}return null}function Ob(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var l=r.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(i===0)return r;i--}else l!=="/$"&&l!=="/&"||i++}r=r.previousSibling}return null}function Db(r,i,l){switch(i=jc(l),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 Jl(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);hl(r)}var Vr=new Map,jb=new Set;function Lc(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Da=ee.d;ee.d={f:w7,r:S7,D:k7,C:E7,L:T7,m:N7,X:R7,S:C7,M:A7};function w7(){var r=Da.f(),i=Cc();return r||i}function S7(r){var i=ga(r);i!==null&&i.tag===5&&i.type==="form"?Q1(i):Da.r(r)}var Fs=typeof document>"u"?null:document;function Lb(r,i,l){var u=Fs;if(u&&typeof i=="string"&&i){var g=mr(i);g='link[rel="'+r+'"][href="'+g+'"]',typeof l=="string"&&(g+='[crossorigin="'+l+'"]'),jb.has(g)||(jb.add(g),r={rel:r,crossOrigin:l,href:i},u.querySelector(g)===null&&(i=u.createElement("link"),Yn(i,"link",r),Rn(i),u.head.appendChild(i)))}}function k7(r){Da.D(r),Lb("dns-prefetch",r,null)}function E7(r,i){Da.C(r,i),Lb("preconnect",r,i)}function T7(r,i,l){Da.L(r,i,l);var u=Fs;if(u&&r&&i){var g='link[rel="preload"][as="'+mr(i)+'"]';i==="image"&&l&&l.imageSrcSet?(g+='[imagesrcset="'+mr(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(g+='[imagesizes="'+mr(l.imageSizes)+'"]')):g+='[href="'+mr(r)+'"]';var v=g;switch(i){case"style":v=Ps(r);break;case"script":v=$s(r)}Vr.has(v)||(r=b({rel:"preload",href:i==="image"&&l&&l.imageSrcSet?void 0:r,as:i},l),Vr.set(v,r),u.querySelector(g)!==null||i==="style"&&u.querySelector(eo(v))||i==="script"&&u.querySelector(to(v))||(i=u.createElement("link"),Yn(i,"link",r),Rn(i),u.head.appendChild(i)))}}function N7(r,i){Da.m(r,i);var l=Fs;if(l&&r){var u=i&&typeof i.as=="string"?i.as:"script",g='link[rel="modulepreload"][as="'+mr(u)+'"][href="'+mr(r)+'"]',v=g;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=$s(r)}if(!Vr.has(v)&&(r=b({rel:"modulepreload",href:r},i),Vr.set(v,r),l.querySelector(g)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(to(v)))return}u=l.createElement("link"),Yn(u,"link",r),Rn(u),l.head.appendChild(u)}}}function C7(r,i,l){Da.S(r,i,l);var u=Fs;if(u&&r){var g=Ya(u).hoistableStyles,v=Ps(r);i=i||"default";var T=g.get(v);if(!T){var L={loading:0,preload:null};if(T=u.querySelector(eo(v)))L.loading=5;else{r=b({rel:"stylesheet",href:r,"data-precedence":i},l),(l=Vr.get(v))&&Jd(r,l);var Q=T=u.createElement("link");Rn(Q),Yn(Q,"link",r),Q._p=new Promise(function(me,ye){Q.onload=me,Q.onerror=ye}),Q.addEventListener("load",function(){L.loading|=1}),Q.addEventListener("error",function(){L.loading|=2}),L.loading|=4,zc(T,i,u)}T={type:"stylesheet",instance:T,count:1,state:L},g.set(v,T)}}}function R7(r,i){Da.X(r,i);var l=Fs;if(l&&r){var u=Ya(l).hoistableScripts,g=$s(r),v=u.get(g);v||(v=l.querySelector(to(g)),v||(r=b({src:r,async:!0},i),(i=Vr.get(g))&&ef(r,i),v=l.createElement("script"),Rn(v),Yn(v,"link",r),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},u.set(g,v))}}function A7(r,i){Da.M(r,i);var l=Fs;if(l&&r){var u=Ya(l).hoistableScripts,g=$s(r),v=u.get(g);v||(v=l.querySelector(to(g)),v||(r=b({src:r,async:!0,type:"module"},i),(i=Vr.get(g))&&ef(r,i),v=l.createElement("script"),Rn(v),Yn(v,"link",r),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},u.set(g,v))}}function zb(r,i,l,u){var g=(g=se.current)?Lc(g):null;if(!g)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(i=Ps(l.href),l=Ya(g).hoistableStyles,u=l.get(i),u||(u={type:"style",instance:null,count:0,state:null},l.set(i,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){r=Ps(l.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(eo(r)))&&!v._p&&(T.instance=v,T.state.loading=5),Vr.has(r)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Vr.set(r,l),v||_7(g,r,l,T.state))),i&&u===null)throw Error(a(528,""));return T}if(i&&u!==null)throw Error(a(529,""));return null;case"script":return i=l.async,l=l.src,typeof l=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=$s(l),l=Ya(g).hoistableScripts,u=l.get(i),u||(u={type:"script",instance:null,count:0,state:null},l.set(i,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function Ps(r){return'href="'+mr(r)+'"'}function eo(r){return'link[rel="stylesheet"]['+r+"]"}function Bb(r){return b({},r,{"data-precedence":r.precedence,precedence:null})}function _7(r,i,l,u){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?u.loading=1:(i=r.createElement("link"),u.preload=i,i.addEventListener("load",function(){return u.loading|=1}),i.addEventListener("error",function(){return u.loading|=2}),Yn(i,"link",l),Rn(i),r.head.appendChild(i))}function $s(r){return'[src="'+mr(r)+'"]'}function to(r){return"script[async]"+r}function qb(r,i,l){if(i.count++,i.instance===null)switch(i.type){case"style":var u=r.querySelector('style[data-href~="'+mr(l.href)+'"]');if(u)return i.instance=u,Rn(u),u;var g=b({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(r.ownerDocument||r).createElement("style"),Rn(u),Yn(u,"style",g),zc(u,l.precedence,r),i.instance=u;case"stylesheet":g=Ps(l.href);var v=r.querySelector(eo(g));if(v)return i.state.loading|=4,i.instance=v,Rn(v),v;u=Bb(l),(g=Vr.get(g))&&Jd(u,g),v=(r.ownerDocument||r).createElement("link"),Rn(v);var T=v;return T._p=new Promise(function(L,Q){T.onload=L,T.onerror=Q}),Yn(v,"link",u),i.state.loading|=4,zc(v,l.precedence,r),i.instance=v;case"script":return v=$s(l.src),(g=r.querySelector(to(v)))?(i.instance=g,Rn(g),g):(u=l,(g=Vr.get(v))&&(u=b({},l),ef(u,g)),r=r.ownerDocument||r,g=r.createElement("script"),Rn(g),Yn(g,"link",u),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&&(u=i.instance,i.state.loading|=4,zc(u,l.precedence,r));return i.instance}function zc(r,i,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=u.length?u[u.length-1]:null,v=g,T=0;T<u.length;T++){var L=u[T];if(L.dataset.precedence===i)v=L;else if(v!==g)break}v?v.parentNode.insertBefore(r,v.nextSibling):(i=l.nodeType===9?l.head:l,i.insertBefore(r,i.firstChild))}function Jd(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function ef(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var Bc=null;function Ub(r,i,l){if(Bc===null){var u=new Map,g=Bc=new Map;g.set(l,u)}else g=Bc,u=g.get(l),u||(u=new Map,g.set(l,u));if(u.has(r))return u;for(u.set(r,null),l=l.getElementsByTagName(r),g=0;g<l.length;g++){var v=l[g];if(!(v[Mi]||v[sn]||r==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var T=v.getAttribute(i)||"";T=r+T;var L=u.get(T);L?L.push(v):u.set(T,[v])}}return u}function Hb(r,i,l){r=r.ownerDocument||r,r.head.insertBefore(l,i==="title"?r.querySelector("head > title"):null)}function I7(r,i,l){if(l===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 Fb(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function M7(r,i,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var g=Ps(u.href),v=i.querySelector(eo(g));if(v){i=v._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=qc.bind(r),i.then(r,r)),l.state.loading|=4,l.instance=v,Rn(v);return}v=i.ownerDocument||i,u=Bb(u),(g=Vr.get(g))&&Jd(u,g),v=v.createElement("link"),Rn(v);var T=v;T._p=new Promise(function(L,Q){T.onload=L,T.onerror=Q}),Yn(v,"link",u),l.instance=v}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(l,i),(i=l.state.preload)&&(l.state.loading&3)===0&&(r.count++,l=qc.bind(r),i.addEventListener("load",l),i.addEventListener("error",l))}}var tf=0;function O7(r,i){return r.stylesheets&&r.count===0&&Hc(r,r.stylesheets),0<r.count||0<r.imgCount?function(l){var u=setTimeout(function(){if(r.stylesheets&&Hc(r,r.stylesheets),r.unsuspend){var v=r.unsuspend;r.unsuspend=null,v()}},6e4+i);0<r.imgBytes&&tf===0&&(tf=62500*m7());var g=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Hc(r,r.stylesheets),r.unsuspend)){var v=r.unsuspend;r.unsuspend=null,v()}},(r.imgBytes>tf?50:800)+i);return r.unsuspend=l,function(){r.unsuspend=null,clearTimeout(u),clearTimeout(g)}}:null}function qc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hc(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Uc=null;function Hc(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Uc=new Map,i.forEach(D7,r),Uc=null,qc.call(r))}function D7(r,i){if(!(i.state.loading&4)){var l=Uc.get(r);if(l)var u=l.get(null);else{l=new Map,Uc.set(r,l);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")&&(l.set(T.dataset.precedence,T),u=T)}u&&l.set(null,u)}g=i.instance,T=g.getAttribute("data-precedence"),v=l.get(T)||u,v===u&&l.set(null,g),l.set(T,g),this.count++,u=qc.bind(this),g.addEventListener("load",u),g.addEventListener("error",u),v?v.parentNode.insertBefore(g,v.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(g,r.firstChild)),i.state.loading|=4}}var no={$$typeof:O,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function j7(r,i,l,u,g,v,T,L,Q){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=gt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.hiddenUpdates=gt(null),this.identifierPrefix=u,this.onUncaughtError=g,this.onCaughtError=v,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function Pb(r,i,l,u,g,v,T,L,Q,me,ye,Te){return r=new j7(r,i,l,T,Q,me,ye,Te,L),i=1,v===!0&&(i|=24),v=Nr(3,null,null,i),r.current=v,v.stateNode=r,i=D0(),i.refCount++,r.pooledCache=i,i.refCount++,v.memoizedState={element:u,isDehydrated:l,cache:i},B0(v),r}function $b(r){return r?(r=ws,r):ws}function Gb(r,i,l,u,g,v){g=$b(g),u.context===null?u.context=g:u.pendingContext=g,u=ri(i),u.payload={element:l},v=v===void 0?null:v,v!==null&&(u.callback=v),l=ai(r,u,i),l!==null&&(yr(l,r,i),Dl(l,r,i))}function Kb(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var l=r.retryLane;r.retryLane=l!==0&&l<i?l:i}}function nf(r,i){Kb(r,i),(r=r.alternate)&&Kb(r,i)}function Vb(r){if(r.tag===13||r.tag===31){var i=Bi(r,67108864);i!==null&&yr(i,r,67108864),nf(r,67108864)}}function Yb(r){if(r.tag===13||r.tag===31){var i=Ir();i=_t(i);var l=Bi(r,i);l!==null&&yr(l,r,i),nf(r,i)}}var Fc=!0;function L7(r,i,l,u){var g=$.T;$.T=null;var v=ee.p;try{ee.p=2,rf(r,i,l,u)}finally{ee.p=v,$.T=g}}function z7(r,i,l,u){var g=$.T;$.T=null;var v=ee.p;try{ee.p=8,rf(r,i,l,u)}finally{ee.p=v,$.T=g}}function rf(r,i,l,u){if(Fc){var g=af(u);if(g===null)Pd(r,i,u,Pc,l),Zb(r,u);else if(q7(g,r,i,l,u))u.stopPropagation();else if(Zb(r,u),i&4&&-1<B7.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=Wt(v.pendingLanes);if(T!==0){var L=v;for(L.pendingLanes|=2,L.entangledLanes|=2;T;){var Q=1<<31-yt(T);L.entanglements[1]|=Q,T&=~Q}sa(v),(Ut&6)===0&&(Tc=Fe()+500,Zl(0))}}break;case 31:case 13:L=Bi(v,2),L!==null&&yr(L,v,2),Cc(),nf(v,2)}if(v=af(u),v===null&&Pd(r,i,u,Pc,l),v===g)break;g=v}g!==null&&u.stopPropagation()}else Pd(r,i,u,null,l)}}function af(r){return r=ht(r),sf(r)}var Pc=null;function sf(r){if(Pc=null,r=ar(r),r!==null){var i=o(r);if(i===null)r=null;else{var l=i.tag;if(l===13){if(r=c(i),r!==null)return r;r=null}else if(l===31){if(r=d(i),r!==null)return r;r=null}else if(l===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return Pc=r,null}function Xb(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(Xt()){case he:return 2;case ve:return 8;case qe:case We:return 32;case nt:return 268435456;default:return 32}default:return 32}}var lf=!1,pi=null,gi=null,bi=null,ro=new Map,ao=new Map,vi=[],B7="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 Zb(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":ro.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":ao.delete(i.pointerId)}}function io(r,i,l,u,g,v){return r===null||r.nativeEvent!==v?(r={blockedOn:i,domEventName:l,eventSystemFlags:u,nativeEvent:v,targetContainers:[g]},i!==null&&(i=ga(i),i!==null&&Vb(i)),r):(r.eventSystemFlags|=u,i=r.targetContainers,g!==null&&i.indexOf(g)===-1&&i.push(g),r)}function q7(r,i,l,u,g){switch(i){case"focusin":return pi=io(pi,r,i,l,u,g),!0;case"dragenter":return gi=io(gi,r,i,l,u,g),!0;case"mouseover":return bi=io(bi,r,i,l,u,g),!0;case"pointerover":var v=g.pointerId;return ro.set(v,io(ro.get(v)||null,r,i,l,u,g)),!0;case"gotpointercapture":return v=g.pointerId,ao.set(v,io(ao.get(v)||null,r,i,l,u,g)),!0}return!1}function Wb(r){var i=ar(r.target);if(i!==null){var l=o(i);if(l!==null){if(i=l.tag,i===13){if(i=c(l),i!==null){r.blockedOn=i,dr(r.priority,function(){Yb(l)});return}}else if(i===31){if(i=d(l),i!==null){r.blockedOn=i,dr(r.priority,function(){Yb(l)});return}}else if(i===3&&l.stateNode.current.memoizedState.isDehydrated){r.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}r.blockedOn=null}function $c(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var l=af(r.nativeEvent);if(l===null){l=r.nativeEvent;var u=new l.constructor(l.type,l);Ge=u,l.target.dispatchEvent(u),Ge=null}else return i=ga(l),i!==null&&Vb(i),r.blockedOn=l,!1;i.shift()}return!0}function Qb(r,i,l){$c(r)&&l.delete(i)}function U7(){lf=!1,pi!==null&&$c(pi)&&(pi=null),gi!==null&&$c(gi)&&(gi=null),bi!==null&&$c(bi)&&(bi=null),ro.forEach(Qb),ao.forEach(Qb)}function Gc(r,i){r.blockedOn===i&&(r.blockedOn=null,lf||(lf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,U7)))}var Kc=null;function Jb(r){Kc!==r&&(Kc=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Kc===r&&(Kc=null);for(var i=0;i<r.length;i+=3){var l=r[i],u=r[i+1],g=r[i+2];if(typeof u!="function"){if(sf(u||l)===null)continue;break}var v=ga(l);v!==null&&(r.splice(i,3),i-=3,ad(v,{pending:!0,data:g,method:l.method,action:u},u,g))}}))}function Gs(r){function i(Q){return Gc(Q,r)}pi!==null&&Gc(pi,r),gi!==null&&Gc(gi,r),bi!==null&&Gc(bi,r),ro.forEach(i),ao.forEach(i);for(var l=0;l<vi.length;l++){var u=vi[l];u.blockedOn===r&&(u.blockedOn=null)}for(;0<vi.length&&(l=vi[0],l.blockedOn===null);)Wb(l),l.blockedOn===null&&vi.shift();if(l=(r.ownerDocument||r).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var g=l[u],v=l[u+1],T=g[Wn]||null;if(typeof v=="function")T||Jb(l);else if(T){var L=null;if(v&&v.hasAttribute("formAction")){if(g=v,T=v[Wn]||null)L=T.formAction;else if(sf(g)!==null)continue}else L=T.action;typeof L=="function"?l[u+1]=L:(l.splice(u,3),u-=3),Jb(l)}}}function ev(){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),u||setTimeout(l,20)}function l(){if(!u&&!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 u=!1,g=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(l,100),function(){u=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),g!==null&&(g(),g=null)}}}function of(r){this._internalRoot=r}Vc.prototype.render=of.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var l=i.current,u=Ir();Gb(l,u,r,i,null,null)},Vc.prototype.unmount=of.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Gb(r.current,2,null,r,null,null),Cc(),i[Ka]=null}};function Vc(r){this._internalRoot=r}Vc.prototype.unstable_scheduleHydration=function(r){if(r){var i=Zn();r={blockedOn:null,target:r,priority:i};for(var l=0;l<vi.length&&i!==0&&i<vi[l].priority;l++);vi.splice(l,0,r),l===0&&Wb(r)}};var tv=t.version;if(tv!=="19.2.8")throw Error(a(527,tv,"19.2.8"));ee.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 H7={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yc.isDisabled&&Yc.supportsFiber)try{Pt=Yc.inject(H7),rt=Yc}catch{}}return lo.createRoot=function(r,i){if(!s(r))throw Error(a(299));var l=!1,u="",g=og,v=cg,T=ug;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(g=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(T=i.onRecoverableError)),i=Pb(r,1,!1,null,null,l,u,null,g,v,T,ev),r[Ka]=i.current,Fd(r),new of(i)},lo.hydrateRoot=function(r,i,l){if(!s(r))throw Error(a(299));var u=!1,g="",v=og,T=cg,L=ug,Q=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(T=l.onCaughtError),l.onRecoverableError!==void 0&&(L=l.onRecoverableError),l.formState!==void 0&&(Q=l.formState)),i=Pb(r,1,!0,i,l??null,u,g,Q,v,T,L,ev),i.context=$b(null),l=i.current,u=Ir(),u=_t(u),g=ri(u),g.callback=null,ai(l,g,u),l=u,i.current.lanes=l,ue(i,l),sa(i),r[Ka]=i.current,Fd(r),new Vc(i)},lo.version="19.2.8",lo}var dv;function Z7(){if(dv)return df.exports;dv=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(),df.exports=X7(),df.exports}var W7=Z7();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(`
|
|
10
|
+
`).slice(0,240)}if(typeof t.role=="string")return`${t.role} 消息`}return null}function Q7(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 ho(e){return String(e.nodeId??e.id??"").trim()}function pf(e){const t=ho(e);return String(e.label??e.name??(t||"未命名节点"))}function fv(e,t){if(e.length===0)return;const n=t?.trim();if(n){const o=e.find(c=>ho(c)===n);if(o)return o}const a=e.find(o=>{const c=String(o.status??"").toLowerCase();return c.includes("fail")||c.includes("error")||c==="blocked"});return a||(e.find(o=>{const c=String(o.status??"").toLowerCase();return c==="running"||c==="in_progress"||c==="active"})??e[0])}function J7({dagRunId:e,nodeId:t,onClose:n,onOpenFull:a}){const s=k.useRef(null),[o,c]=k.useState(null),[d,m]=k.useState([]),[h,p]=k.useState(null),[b,x]=k.useState(!0);k.useEffect(()=>{s.current?.focus();const C=I=>{I.key==="Escape"&&n()};return document.addEventListener("keydown",C),document.title=`检视 · DAG ${e} · Loop Operator`,()=>document.removeEventListener("keydown",C)},[e,n]),k.useEffect(()=>{const C=new AbortController;return x(!0),p(null),m([]),(async()=>{try{const I=await fetch(`/api/dag-runs/${encodeURIComponent(e)}`,{signal:C.signal,credentials:"same-origin"});if(!I.ok)throw new Error(`DAG 查询失败(HTTP ${I.status})`);const O=await I.json();if(C.signal.aborted)return;c(O);const X=Array.isArray(O.nodes)?O.nodes:[],q=fv(X,t),A=q?ho(q):t?.trim();if(A){const F=await fetch(`/api/dag-runs/${encodeURIComponent(e)}/nodes/${encodeURIComponent(A)}/session-events`,{signal:C.signal,credentials:"same-origin"});if(F.ok){const J=await F.json();C.signal.aborted||m((J.events??[]).slice(-20))}}}catch(I){C.signal.aborted||p(I instanceof Error?I.message:String(I))}finally{C.signal.aborted||x(!1)}})(),()=>C.abort()},[e,t]);const y=k.useMemo(()=>Array.isArray(o?.nodes)?o.nodes:[],[o]),E=fv(y,t),N=E?ho(E):"",R=String(o?.effectiveStatus??o?.status??(b?"加载中…":"未知"));return f.jsxs("aside",{className:"inspect-split-panel","aria-label":"DAG 紧凑检视",children:[f.jsxs("div",{className:"inspect-split-header",children:[f.jsxs("div",{children:[f.jsx("p",{className:"inspect-split-kicker",children:"Inspect"}),f.jsx("h2",{children:"检视 DAG"})]}),f.jsx("button",{ref:s,type:"button","aria-label":"关闭检视面板",onClick:n,children:"关闭"})]}),f.jsx("p",{className:"inspect-split-id",children:f.jsx("code",{children:e})}),h?f.jsx("p",{className:"error",children:h}):null,b&&!o?f.jsx("p",{className:"muted",children:"正在加载 DAG…"}):null,f.jsxs("dl",{className:"inspect-split-facts",children:[f.jsxs("div",{children:[f.jsx("dt",{children:"状态"}),f.jsx("dd",{children:R})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"当前节点"}),f.jsx("dd",{children:E?pf(E):"暂无节点"})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"节点状态"}),f.jsx("dd",{children:E?.status??"—"})]}),E?.errorPreview?f.jsxs("div",{children:[f.jsx("dt",{children:"错误摘要"}),f.jsx("dd",{children:E.errorPreview})]}):null]}),f.jsxs("section",{children:[f.jsxs("h3",{children:["节点(",y.length,")"]}),y.length?f.jsx("ul",{className:"inspect-split-nodes",children:y.slice(0,24).map(C=>{const I=ho(C)||pf(C),O=I===N;return f.jsxs("li",{"data-active":O?"true":void 0,className:O?"is-active":void 0,children:[f.jsx("span",{children:pf(C)}),f.jsx("code",{children:C.status??"—"})]},I)})}):f.jsx("p",{className:"muted",children:b?"加载节点中…":"该运行暂无节点。"})]}),f.jsxs("section",{children:[f.jsxs("h3",{children:["最近事件",N?` · ${N}`:""]}),d.length?f.jsx("ul",{className:"inspect-split-events",children:d.map((C,I)=>f.jsx("li",{children:Q7(C)},`${C.at??I}-${I}`))}):f.jsx("p",{className:"muted",children:b?"加载事件中…":"节点事件将在可用时显示。"})]}),f.jsx("button",{type:"button",className:"btn btn-secondary",onClick:a,children:"全屏观测"}),f.jsx("p",{className:"muted",children:"全屏后点顶栏「返回操作台」可回来。"})]})}function e8(e){const{board:t,busy:n}=e;return f.jsxs("details",{className:"night-advanced","data-testid":"night-advanced",open:t.advancedOpen,onToggle:a=>t.setAdvancedOpen(a.target.open),children:[f.jsx("summary",{children:"高级 / Inspect"}),f.jsxs("p",{className:"muted",children:["只读深链:"," ",f.jsx("a",{className:"external-link",href:"/inspect/#/night",children:"/inspect/#/night"})]}),f.jsx("div",{className:"cta-row",children:f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:n,"data-testid":"night-morning-btn",onClick:()=>{t.onMorningReport()},children:"早晨 night 报告"})}),t.morningPreview?f.jsx("pre",{className:"cmd","data-testid":"night-morning-preview",children:t.morningPreview}):null]})}function Xc(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function Nn(e,t){const n=e[t];return typeof n=="string"&&n.trim()?n.trim():void 0}function mv(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 t8(e){const t=Xc(e);if(!t)return null;const n=Xc(t.result),a=[Xc(t.reviewPacket),n?Xc(n.reviewPacket):null,n,t].filter(Boolean);for(const s of a){const o=Nn(s,"scheduleId")??Nn(s,"id"),c=Nn(s,"gateToken")??Nn(s,"approveGate")??Nn(s,"writeSetGateToken");if(!(!o||!c))return{scheduleId:o,gateToken:c,...Nn(s,"featureId")?{featureId:Nn(s,"featureId")}:{},...Nn(s,"taskId")?{taskId:Nn(s,"taskId")}:{},...mv(s,"writeSet")?{writeSet:mv(s,"writeSet")}:{},...Nn(s,"worktreePath")?{worktreePath:Nn(s,"worktreePath")}:{},...Nn(s,"branch")?{branch:Nn(s,"branch")}:{},...Nn(s,"baseBranch")?{baseBranch:Nn(s,"baseBranch")}:{},...Nn(s,"baseCommit")?{baseCommit:Nn(s,"baseCommit")}:{},...Nn(s,"executeAtUtc")?{executeAtUtc:Nn(s,"executeAtUtc")}:{},...Nn(s,"taskCard")?{taskCard:Nn(s,"taskCard")}:{}}}return null}function hv(e){return`docs/features/${e.trim().replace(/^\/+|\/+$/g,"")}`}function n8(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 pv(){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 R2(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 r8(e){return e.mergeState==="pending-harvest"||/\bscheduler harvest\b/i.test(e.nextAction)}function a8(e){return e.status==="failed"||e.status==="human_required"||e.status==="cancelled"||/\bscheduler discard\b/i.test(e.nextAction)}function gu(e){return e==="failed"||e==="human_required"}function i8(e){return`${e}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function A2(e){return{submitted:"已提交",validating:"校验中",validated:"待预约确认",scheduled:"已预约",waiting:"等待触发",dispatching:"派发中",running:"执行中",succeeded:"成功",failed:"失败",human_required:"需人工",cancelled:"已取消",rejected:"已拒绝",cancel_requested:"取消中"}[e]??e}function s8(e){const{target:t,reason:n,onReasonChange:a,force:s,onForceChange:o,busy:c}=e;return f.jsxs("div",{className:"night-discard-card","data-testid":"night-discard-card",children:[f.jsx("h3",{children:"确认 Discard"}),f.jsxs("p",{className:"muted",children:[t.featureId,"/",t.taskId,"(",A2(t.status),")"]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"原因"}),f.jsx("input",{"data-testid":"night-discard-reason",value:n,disabled:c,placeholder:"human discard reason",onChange:d=>a(d.target.value)})]}),gu(t.status)?f.jsxs("label",{className:"field checkbox-field",children:[f.jsx("input",{type:"checkbox","data-testid":"night-discard-force",checked:s,disabled:c,onChange:d=>o(d.target.checked)}),f.jsx("span",{className:"muted",children:"强制 Discard(failed / human_required)"})]}):null,f.jsxs("div",{className:"cta-row",children:[f.jsx("button",{type:"button",className:"btn btn-primary",disabled:c||gu(t.status)&&!s,"data-testid":"night-discard-confirm",onClick:e.onConfirm,children:"确认 Discard"}),f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:c,onClick:e.onCancel,children:"返回"})]})]})}function l8(e){const{board:t}=e,{doctor:n,list:a,clockHint:s,doctorIssues:o,auxTicker:c}=t;return f.jsxs("div",{className:"night-health","data-testid":"night-health-bar",children:[f.jsxs("div",{className:"night-health-main",children:[f.jsx("span",{className:`night-health-pill${n?.ok===!1?" is-bad":""}`,children:n?.ok===!1?"Scheduler 异常":"Scheduler 健康"}),f.jsxs("span",{className:"muted",children:["计划 ",n?.scheduleCount??a?.summary.total??"—"," · 活动"," ",n?.activeCount??a?.summary.active??"—"]})]}),s?f.jsxs("p",{className:"muted night-health-hint","data-testid":"night-clock-hint",children:["时钟:",s.message,"(安装/启停请用 CLI:",f.jsx("code",{children:"agent-worker scheduler clock status --repo ."}),")"]}):f.jsxs("p",{className:"muted night-health-hint",children:["到点执行依赖本机 clock / tick,不在此面板安装。详见"," ",f.jsx("a",{className:"external-link",href:"/inspect/#/night",children:"/inspect/#/night"})]}),f.jsxs("div",{className:"night-aux-ticker","data-testid":"night-aux-ticker",children:[f.jsxs("p",{className:"night-aux-ticker-label",children:["开着 Console 时辅助 tick(每 ",c?.intervalSec??60,"s)"]}),f.jsx("p",{className:"muted night-health-hint","data-testid":"night-aux-ticker-disclaimer",children:c?.disclaimer??"仅在本 Console 进程开着时有效;过夜无人值守仍需 OS clock。"}),c?.lastOutcome?f.jsxs("p",{className:"muted","data-testid":"night-aux-ticker-last",children:["上次:",c.lastOutcome,c.running?"(进行中)":"",c.lastSummary?` · ${c.lastSummary}`:"",c.lastError?` · ${c.lastError}`:""]}):null]}),o.length>0?f.jsx("ul",{className:"night-doctor-list","data-testid":"night-doctor-findings",children:o.slice(0,4).map(d=>f.jsxs("li",{children:[f.jsx("strong",{children:d.severity})," ",d.message]},`${d.code}-${d.scheduleId??""}-${d.message}`))}):null]})}function o8(e){const{board:t,busy:n,onHarvest:a,onOpenDiscard:s}=e,{list:o}=t;return f.jsxs(f.Fragment,{children:[o?f.jsxs("div",{className:"night-kpi","data-testid":"night-kpi",children:[f.jsxs("span",{children:["合计 ",o.summary.total]}),f.jsxs("span",{children:["活动 ",o.summary.active]}),f.jsxs("span",{children:["待收成 ",o.summary.pendingHarvest]}),f.jsxs("span",{children:["需人工 ",o.summary.humanRequired]}),f.jsxs("span",{children:["失败 ",o.summary.failed]})]}):null,f.jsxs("div",{className:"night-board","data-testid":"night-board",children:[f.jsx("h3",{children:"计划列表"}),!o||o.schedules.length===0?f.jsxs("div",{className:"empty-state","data-testid":"night-board-empty",children:[f.jsx("p",{className:"empty-title",children:"暂无夜间计划"}),f.jsx("p",{className:"muted",children:"用下方向导预约第一个任务。"})]}):f.jsx("ul",{className:"night-schedule-list",children:o.schedules.map(c=>f.jsxs("li",{className:"night-schedule-row","data-testid":"night-schedule-row","data-status":c.status,children:[f.jsxs("div",{className:"night-schedule-head",children:[f.jsxs("strong",{children:[c.featureId,"/",c.taskId]}),f.jsx("span",{className:"night-status-chip",children:A2(c.status)})]}),f.jsxs("p",{className:"muted",children:["执行 ",R2(c.executeAtUtc),c.mergeState?` · merge ${c.mergeState}`:"",c.taskCard?` · ${c.taskCard}`:""]}),c.waitingReason?f.jsxs("p",{className:"muted",children:["等待原因:",c.waitingReason]}):null,f.jsxs("p",{className:"muted night-next-action",children:["下一步:",c.nextAction]}),f.jsxs("div",{className:"cta-row",children:[r8(c)?f.jsx("button",{type:"button",className:"btn btn-primary",disabled:n,"data-testid":"night-row-harvest",onClick:()=>a(c),children:"Harvest"}):null,a8(c)?f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:n,"data-testid":"night-row-discard",onClick:()=>s(c),children:"Discard"}):null,f.jsx("a",{className:"external-link",href:`/inspect/#/night/${encodeURIComponent(c.scheduleId)}`,children:"Inspect"})]})]},c.scheduleId))})]})]})}function c8(e){const{wizard:t,busy:n}=e;return f.jsxs("div",{className:"night-wizard","data-testid":"night-wizard",children:[f.jsx("h3",{children:"预约夜间任务"}),t.phase==="pick"?f.jsxs(f.Fragment,{children:[t.selectableTasks.length===0?f.jsxs("div",{className:"empty-state","data-testid":"night-task-empty",children:[f.jsx("p",{className:"empty-title",children:"没有可选任务"}),f.jsx("p",{className:"muted",children:"请先在 Feature Packet / Task Pool 中创建任务,再回到此处刷新。"})]}):f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"Feature / Task"}),f.jsxs("select",{"data-testid":"night-task-select",value:t.selectedKey,disabled:n,onChange:a=>t.setSelectedKey(a.target.value),children:[f.jsx("option",{value:"",children:"选择任务…"}),t.selectableTasks.map(a=>{const s=`${a.featureId}::${a.taskId}`;return f.jsxs("option",{value:s,children:[a.featureId,"/",a.taskId,a.status?` · ${a.status}`:""]},s)})]})]}),t.derivedFeatureDir?f.jsxs("p",{className:"muted","data-testid":"night-feature-dir",children:["Feature 目录:",f.jsx("code",{children:t.derivedFeatureDir})]}):null,f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"本地执行时间"}),f.jsx("input",{type:"datetime-local","data-testid":"night-at",value:t.nightAt,disabled:n,onChange:a=>t.setNightAt(a.target.value)})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"任务卡片(可选)"}),f.jsx("input",{"data-testid":"night-task-card",value:t.taskCard,disabled:n,placeholder:"UCP-LOOP#11",onChange:a=>t.setTaskCard(a.target.value)})]}),f.jsx("div",{className:"cta-row",children:f.jsx("button",{type:"button",className:"btn btn-primary",disabled:n||!t.selectedKey||!t.nightAt,"data-testid":"night-prepare-btn",onClick:()=>{t.onPrepare()},children:"准备并审阅"})})]}):f.jsxs("div",{className:"night-review-card","data-testid":"night-review-card",children:[f.jsx("p",{className:"muted",children:"请确认 writeSet 与执行环境后预约。Token 已隐藏。"}),f.jsxs("dl",{className:"kv",children:[f.jsxs("div",{children:[f.jsx("dt",{children:"Schedule"}),f.jsx("dd",{children:f.jsx("code",{children:t.review?.scheduleId})})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"任务"}),f.jsxs("dd",{children:[t.review?.featureId,"/",t.review?.taskId]})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"执行时间 (UTC)"}),f.jsx("dd",{children:R2(t.review?.executeAtUtc)})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"Worktree"}),f.jsx("dd",{children:f.jsx("code",{children:t.review?.worktreePath??"—"})})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"分支"}),f.jsx("dd",{children:f.jsx("code",{children:t.review?.branch??"—"})})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"Base"}),f.jsx("dd",{children:f.jsxs("code",{children:[t.review?.baseBranch??"—","@",(t.review?.baseCommit??"").slice(0,12)||"—"]})})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"WriteSet"}),f.jsx("dd",{children:t.review?.writeSet&&t.review.writeSet.length>0?f.jsx("ul",{className:"night-writeset",children:t.review.writeSet.map(a=>f.jsx("li",{children:f.jsx("code",{children:a})},a))}):f.jsx("span",{className:"muted",children:"(未返回显式 writeSet)"})})]})]}),f.jsxs("div",{className:"cta-row",children:[f.jsx("button",{type:"button",className:"btn btn-primary",disabled:n||!t.review,"data-testid":"night-confirm-add-btn",onClick:()=>{t.onConfirmAdd()},children:"确认预约"}),f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:n,"data-testid":"night-review-back-btn",onClick:t.onCancelWizard,children:"返回修改"})]})]})]})}function u8(e){const{setOpError:t}=e,[n,a]=k.useState(null),[s,o]=k.useState(null),[c,d]=k.useState([]),[m,h]=k.useState(null),[p,b]=k.useState(!1),[x,y]=k.useState(!1),[E,N]=k.useState(null),[R,C]=k.useState(null),I=k.useCallback(async()=>{b(!0),h(null);try{const[A,F,J,W]=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(!A.ok)throw new Error(`加载计划列表失败(HTTP ${A.status})`);const z=await A.json();if(a(z),F.ok?o(await F.json()):o(null),J.ok){const U=await J.json();d(Array.isArray(U)?U:[])}else d([]);if(W.ok){const U=await W.json();U.ticker&&C(U.ticker)}}catch(A){h(A instanceof Error?A.message:String(A))}finally{b(!1)}},[]);k.useEffect(()=>{I()},[I]);const O=k.useCallback(async()=>{try{const A=await fetch("/api/night-jobs/morning",{credentials:"same-origin"});if(!A.ok){t(`早晨报告加载失败(HTTP ${A.status})`);return}const F=await A.json();N(JSON.stringify(F,null,2).slice(0,4e3)),y(!0)}catch(A){t(A instanceof Error?A.message:String(A))}},[t]),X=(s?.findings??[]).filter(A=>A.severity==="error"||A.severity==="warning"),q=(s?.findings??[]).find(A=>/clock/i.test(A.code)||/clock/i.test(A.message));return{list:n,doctor:s,tasks:c,loadError:m,loadingBoard:p,advancedOpen:x,setAdvancedOpen:y,morningPreview:E,auxTicker:R,refreshBoard:I,onMorningReport:O,doctorIssues:X,clockHint:q}}function d8(e){const{board:t,runAction:n,isActionSuccess:a,setOpError:s}=e,{tasks:o,refreshBoard:c}=t,[d,m]=k.useState("pick"),[h,p]=k.useState(""),[b,x]=k.useState(pv),[y,E]=k.useState(""),[N,R]=k.useState(null),[C,I]=k.useState(""),[O,X]=k.useState(null),[q,A]=k.useState(!1),F=k.useMemo(()=>{const ee=o.filter(oe=>typeof oe.featureId=="string"&&oe.featureId.trim()&&oe.taskId);return ee.sort((oe,ce)=>{const j=oe.featureId??"",D=ce.featureId??"";return j!==D?j.localeCompare(D):oe.taskId.localeCompare(ce.taskId)}),ee},[o]),J=k.useMemo(()=>h?F.find(ee=>`${ee.featureId}::${ee.taskId}`===h)??null:null,[F,h]),W=J?.featureId?hv(J.featureId):"",z=k.useCallback(async(ee,oe,ce)=>{const j=await n("prepareMutationGate",{action:ee,actionParams:oe});if(!a(j))return;const D=j?.result??j,P=D.receiptId?D:D.result??D;if(!P.receiptId||!P.humanGateToken){s("prepareMutationGate 未返回可消费的 Human Gate receipt");return}return n(ee,{...oe,confirmationId:P.receiptId,humanGateToken:P.humanGateToken},{clientRequestId:i8(ce)})},[a,n,s]),U=k.useCallback(async()=>{if(!J?.featureId){s("请先点选 Feature / Task");return}const ee=n8(b);if(!ee){s("执行时间格式无效,请使用日期时间选择器");return}const oe={featureDir:hv(J.featureId),taskId:J.taskId,at:ee,tz:"Asia/Shanghai",...y.trim()?{taskCard:y.trim()}:{}},ce=await z("workerAdmissionPrepare",oe,"night-prepare");if(!a(ce))return;const j=t8(ce?.result??ce);if(!j){s("准备成功但未解析到 scheduleId / gateToken。请刷新后重试,或查看 Inspect。");return}R(j),m("review")},[a,b,z,J,s,y]),H=k.useCallback(async()=>{if(!N)return;const ee=await z("workerSchedulerAdd",{scheduleId:N.scheduleId,approveGate:N.gateToken},"night-add");a(ee)&&(R(null),m("pick"),p(""),E(""),x(pv()),await c())},[a,c,N,z]),te=k.useCallback(()=>{m("pick"),R(null)},[]),G=k.useCallback(async ee=>{const oe=await z("workerSchedulerHarvest",{scheduleId:ee.scheduleId},"night-harvest");a(oe)&&await c()},[a,c,z]),K=k.useCallback(async()=>{if(!O)return;const ee=C.trim()||"discard from console night workbench",oe=gu(O.status),ce=await z("workerSchedulerDiscard",{scheduleId:O.scheduleId,reason:ee,...oe||q?{force:!0}:{}},"night-discard");a(ce)&&(X(null),I(""),A(!1),await c())},[C,O,q,a,c,z]),$=k.useCallback(ee=>{X(ee),A(gu(ee.status)),I("")},[]);return{phase:d,selectedKey:h,setSelectedKey:p,nightAt:b,setNightAt:x,taskCard:y,setTaskCard:E,review:N,discardReason:C,setDiscardReason:I,discardTarget:O,setDiscardTarget:X,forceDiscard:q,setForceDiscard:A,selectableTasks:F,derivedFeatureDir:W,onPrepare:U,onConfirmAdd:H,onCancelWizard:te,onHarvest:G,onDiscard:K,openDiscard:$}}function f8({busy:e,runAction:t,isActionSuccess:n,setOpError:a}){const s=u8({setOpError:a}),o=d8({board:s,runAction:t,isActionSuccess:n,setOpError:a});return f.jsxs("section",{className:"panel night-workbench","aria-labelledby":"night-title","data-testid":"night-jobs-panel",children:[f.jsx("h2",{id:"night-title",children:"夜间任务"}),f.jsx("p",{className:"panel-lead",children:"白天点选任务并预约;列表查看状态;早晨在行内收成或丢弃。写操作仍经 Human Gate,列表复用 Inspect 投影。"}),f.jsx(l8,{board:s,busy:e}),f.jsx("div",{className:"cta-row",children:f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:e||s.loadingBoard,"data-testid":"night-refresh-btn",onClick:()=>{s.refreshBoard()},children:"刷新看板"})}),s.loadError?f.jsx("p",{className:"error","data-testid":"night-load-error",children:s.loadError}):null,f.jsx(o8,{board:s,busy:e,onHarvest:c=>{o.onHarvest(c)},onOpenDiscard:o.openDiscard}),o.discardTarget?f.jsx(s8,{target:o.discardTarget,reason:o.discardReason,onReasonChange:o.setDiscardReason,force:o.forceDiscard,onForceChange:o.setForceDiscard,busy:e,onConfirm:()=>{o.onDiscard()},onCancel:()=>o.setDiscardTarget(null)}):null,f.jsx(c8,{wizard:o,busy:e}),f.jsx(e8,{board:s,busy:e})]})}const m8=({color:e="currentColor",size:t=24,className:n,...a})=>Pn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Pn.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"})),h8=({color:e="currentColor",size:t=24,className:n,...a})=>Pn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Pn.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"})),p8=({color:e="currentColor",size:t=24,className:n,...a})=>Pn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Pn.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"})),g8=({color:e="currentColor",size:t=24,className:n,...a})=>Pn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Pn.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"})),_2=({color:e="currentColor",size:t=24,className:n,...a})=>Pn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Pn.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"})),gv=({color:e="currentColor",size:t=24,className:n,...a})=>Pn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Pn.createElement("path",{d:"M13 9H21L11 24V15H4L13 0V9ZM11 11V7.22063L7.53238 13H13V17.3944L17.263 11H11Z"})),b8=({color:e="currentColor",size:t=24,className:n,...a})=>Pn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Pn.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"})),v8=({color:e="currentColor",size:t=24,className:n,...a})=>Pn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Pn.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"})),y8=({color:e="currentColor",size:t=24,className:n,...a})=>Pn.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...a,className:"remixicon "+(n||"")},Pn.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 zu=C2();const x8=["command","query","operation","tool","server","symbol","path","file_path","filePath","pattern","glob","url"],w8=120,S8=800;function bu(e){if(!(!e||typeof e!="object"||Array.isArray(e)))return e}function k8(e){if(e!=null){if(typeof e=="string"){const t=e.trim();if(!t)return;try{return bu(JSON.parse(t))}catch{return}}return bu(e)}}function La(e,t){const n=e.replace(/\s+/g," ").trim();return n?n.length>t?`${n.slice(0,t)}…`:n:""}function qn(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 E8(e,t,n){const a=(e??"").toLowerCase();if(a==="bash"||a==="shell"){const s=qn(t,"command");return s?La(s,n):void 0}if(a==="mcp"||a.startsWith("mcp_")){const s=qn(t,"server"),o=qn(t,"tool")??qn(t,"name"),c=qn(t,"query");return s&&o?La(`${s} · ${o}`,n):o?La(o,n):c?La(c,n):s?La(s,n):void 0}if(a==="lsp_navigation"||a.includes("lsp")){const s=[qn(t,"operation"),qn(t,"symbol"),qn(t,"path")??qn(t,"file_path")??qn(t,"filePath")].filter(Boolean),o=qn(t,"line")??qn(t,"position");if(s.length===0&&!o)return;const c=s.join(" · ");return La(o?`${c}${c?":":""}${o}`:c,n)}if(a==="symbol_search"||a.includes("symbol_search")){const s=qn(t,"query")??qn(t,"symbol");return s?La(s,n):void 0}if(a==="read"||a==="read_symbol"||a==="read_enclosing"||a.startsWith("read_")){const s=qn(t,"path")??qn(t,"file_path")??qn(t,"filePath"),o=qn(t,"symbol"),c=qn(t,"line");if(!s&&!o)return;const d=[s,o,c].filter(Boolean);return La(d.join(" · "),n)}}function T8(e,t){const n=t?.maxLen??w8,a=k8(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=E8(t?.toolName,a,n);if(s)return s;for(const m of x8){const h=a[m];if(typeof h=="string"&&h.trim())return La(h,n)}const o=Object.keys(a);if(o.length===0)return"";const c=a[o[0]],d=String(c??"").replace(/\s+/g," ").trim();return d?d.length>n?`${d.slice(0,n)}…`:d:""}function N8(e){const t=(e??"").toLowerCase();return t==="bash"||t==="shell"?{argsLabel:"命令",resultLabel:"输出"}:t==="mcp"||t.startsWith("mcp_")?{argsLabel:"参数",resultLabel:"结果"}:{argsLabel:"入参",resultLabel:"结果"}}function I2(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 I2(JSON.parse(a))}catch{return e}return e}if(typeof e=="number"||typeof e=="boolean")return String(e);const t=bu(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 o=bu(s);o&&(o.type==="text"&&typeof o.text=="string"||typeof o.text=="string")&&a.push(o.text)}if(a.length>0)return a.join(`
|
|
11
|
+
`)}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 C8(e){if(e==null)return"";try{return typeof e=="string"?e:JSON.stringify(e,null,2)}catch{return String(e)}}function R8(e,t){if(e===void 0)return{text:"",truncated:!1};const n=t?.maxLen??S8;return e.length<=n?{text:e,truncated:!1}:{text:`${e.slice(0,n)}…`,truncated:!0}}function A8(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 er(){return window.__CONSOLE_CONFIRMATION_TOKEN__??""}function rs(e){return`${e}-${Math.random().toString(36).slice(2,10)}`}function gf(e,t){return new Promise((n,a)=>{if(t?.aborted){a(new DOMException("Aborted","AbortError"));return}const s=setTimeout(()=>{t?.removeEventListener("abort",o),n()},e),o=()=>{clearTimeout(s),a(new DOMException("Aborted","AbortError"))};t?.addEventListener("abort",o)})}function Gm(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function bf(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 _8(e,t){return e?e.taskId===t.taskId&&e.updatedAt===t.updatedAt&&e.lastEventId===t.lastEventId&&e.operations.length===t.operations.length:!1}const M2={status:"idle",snapshot:null,error:null,reloading:!1,reloadError:null,mutationBusy:!1,mutationToken:null};function Oh(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 I8(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{...M2};default:return e}}function O2(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 M8(e,t,n,a){const s=n&&n.sessionId===a?O2(n):{},o=s.model??e?.model,c=s.thinkingLevel??e?.thinkingLevel;return{readOnly:t.readOnly,systemPrompt:t.systemPrompt,resources:t.resources,suffix:t.suffix,...o?{model:o}:{},...c?{thinkingLevel:c}:{}}}function O8(e=M2){let t=e;const n=new Set;return{getState:()=>t,dispatch:a=>{t=I8(t,a);for(const s of n)s();return t},subscribe:a=>(n.add(a),()=>n.delete(a))}}const wn=O8();let Ti;function D2(e){return`/api/operator/v1/chat/sessions/${encodeURIComponent(e)}`}function D8(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}),j2(e.sessionId,e.origin)}}async function j2(e,t){try{const n=await fetch(`${t}${D2(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:{...Oh(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 Js(){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}${D2(t)}/reload`,{method:"POST",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":er()},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:{...Oh(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 el(){const e=Ti;if(!e?.sessionId)return!1;const t=e.sessionId;return wn.dispatch({type:"load-start",sessionId:t}),j2(t,e.origin),!0}function j8(e,t,n){return n?(wn.dispatch({type:"mutation-adopt",token:e,sessionId:t,snapshot:n}),wn.getState().snapshot===n):!1}function L8(e,t,n){return n.sessionRef.current?.sessionId!==t||wn.getState().mutationToken!==e?!1:(wn.dispatch({type:"mutation-settle",token:e}),!0)}function il(){return k.useSyncExternalStore(wn.subscribe,wn.getState)}function L2(e){wn.dispatch(e)}function z8(){return wn.getState()}function B8(e,t,n){return`${e}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/skills/${encodeURIComponent(n)}/auto-invocation`}async function q8(e){const t=e.fetchImpl??fetch;try{const n=await t(B8(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:{...Oh(a),status:n.status}};const s=a.preferenceSaved===!0,o=a.reloadApplied===!0;if(!s)return{ok:!1,error:{status:n.status,code:"PI_RESOURCE_PREFERENCES_WRITE_FAILED",message:"preference was not saved"}};if(!o){const c=a.error?.code??"PI_SESSION_BUSY",d=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:d}}}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 U8(e){return e.autoInvocationEnabled?{badge:"允许自动使用",help:"模型可自动选择该技能,也可通过 /skill:<name> 手动调用。"}:{badge:"已隐藏自动使用",help:`已从模型自动技能列表隐藏,仍可通过 /skill:${e.name} 手动调用。`}}function H8(e){const{summary:t,onRetry:n}=e,[a,s]=k.useState(!1),o=k.useRef(null),c=k.useId();if(k.useEffect(()=>{if(!a)return;const h=b=>{o.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 d=t.errorCount>0?"error":"warning",m=t.groups.some(h=>h.items.some(p=>p.retryable));return f.jsxs("div",{className:"oc-diag-chip-wrap",ref:o,children:[f.jsxs("button",{type:"button",className:`oc-diag-chip is-${d}${a?" is-open":""}`,"aria-expanded":a,"aria-controls":c,onClick:()=>s(h=>!h),children:[f.jsx(_2,{size:14,"aria-hidden":"true"}),t.chipLabel]}),a?f.jsxs("div",{id:c,className:"oc-diag-popover",role:"region","aria-label":"加载提示",children:[t.groups.map(h=>f.jsxs("section",{className:"oc-diag-group",children:[f.jsxs("header",{className:"oc-diag-group-head",children:[f.jsx("strong",{children:h.heading}),f.jsx("span",{children:h.items.length})]}),f.jsx("p",{className:"oc-diag-group-hint",children:h.hint}),f.jsx("ul",{className:"oc-diag-list",children:h.items.map((p,b)=>f.jsxs("li",{className:`oc-diag-item is-${p.tone}`,children:[f.jsx("span",{className:"oc-diag-item-title",children:p.title}),p.detail?f.jsx("span",{className:"oc-diag-item-detail",children:p.detail}):null,p.shortPath?f.jsx("code",{className:"oc-diag-item-path",title:p.path,children:p.shortPath}):null]},`${h.kind}:${b}`))})]},h.kind)),m&&n?f.jsx("div",{className:"oc-diag-popover-actions",children:f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:n,children:"再读一次"})}):null]}):null]})}const F8=/name\s+"([^"]+)"\s+collision/i,P8=/invalid characters|must be lowercase/i,z2=/must not start or end with a hyphen/i,B2=/consecutive hyphens/i,$8={"load-failed":{heading:"需要处理",hint:"有些清单没读完整,下面的列表可能不全。"},"invalid-name":{heading:"名称不规范",hint:"技能已经加载,还能用。名称请改成小写字母、数字和连字符,例如 sdd-requirement-analysis。"},collision:{heading:"同名未生效",hint:"同名技能只保留先扫到的那一份,后面的不会进当前会话。"},other:{heading:"其他提示",hint:"不影响你浏览当前列表。"}},G8=["load-failed","invalid-name","collision","other"];function Zc(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 bv(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 q2(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 vv(e){const t=e.trim();return t.length<=80?t:`${t.slice(0,79)}…`}function K8(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 V8(e){return B2.test(e)?"名称里不要连用两个连字符。现在这样也能用。":z2.test(e)?"名称开头和结尾不要用连字符。现在这样也能用。":"名称请只用小写字母、数字和连字符。现在这样也能用。"}function Y8(e){const t=(e.type??"warning").toLowerCase(),n=e.message??"",a=n.match(F8)??(t==="collision"?n.match(/"([^"]+)"/):null);if(t==="collision"||a){const o=a?.[1]??bv(e.path);return{kind:"collision",tone:"warning",title:o?`「${o}」有多份`:"有一份同名技能没生效",detail:"同名只保留先扫到的那一份,这份被盖掉了。",path:e.path,shortPath:Zc(e.path),skillName:o,retryable:!1}}if(P8.test(n)||z2.test(n)||B2.test(n)){const o=bv(e.path);return{kind:"invalid-name",tone:"warning",title:o??"有个技能名称不合规范",detail:V8(n),path:e.path,shortPath:Zc(e.path),skillName:o,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:K8(e),detail:vv(n),path:e.path,shortPath:Zc(e.path),retryable:e.retryable===!0}:{kind:"other",tone:t==="error"?"error":"warning",title:vv(n)||"一条提示",path:e.path,shortPath:Zc(e.path),retryable:!1}}function X8(e){const t=e.map(Y8),n=new Map;for(const c of t){const d=n.get(c.kind)??[];d.push(c),n.set(c.kind,d)}const a=G8.flatMap(c=>{const d=n.get(c);return d?.length?[{kind:c,...$8[c],items:d}]:[]}),s=t.filter(c=>c.tone==="error").length,o=t.length-s;return{total:t.length,errorCount:s,warningCount:o,chipLabel:Z8(s,o),groups:a}}function Z8(e,t){return e>0&&t>0?`${e} 个问题 · ${t} 条提示`:e>0?e===1?"1 个问题":`${e} 个问题`:t===1?"1 条提示":`${t} 条提示`}function W8(e,t){return t.some(n=>n.kind==="invalid-name"&&q2(n,e))}function Q8(e,t){return t.filter(n=>n.kind!=="collision"&&q2(n,e))}const Km=()=>window.__CONSOLE_CONFIRMATION_TOKEN__??"";function J8(){const[e,t]=k.useState(0);return k.useEffect(()=>{const n=()=>{const o=document.querySelector(".och, .operator-chrome-fallback");t(o?Math.max(0,Math.round(o.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 ew(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 tw({origin:e}){const[t,n]=k.useState(null),[a,s]=k.useState(null),[o,c]=k.useState(null),[d,m]=k.useState(!1),h=il(),p=h.snapshot,b=h.reloading,x=h.reloadError,y=p?.diagnostics??[],E=k.useMemo(()=>X8(y),[y]),N=async q=>{n(q),c(null);{s(null);try{const A=await fetch(`${e}/api/operator/v1/pi/models-config`,{credentials:"include"}),F=await A.json();if(!A.ok)throw new Error(F.error?.message??"读取失败");s(F.data)}catch(A){c(A instanceof Error?A.message:String(A))}}},R=async q=>{m(!0),c(null);try{const A=await fetch(`${e}/api/operator/v1/pi/models-config`,{method:"PATCH",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":Km()},body:JSON.stringify(q)}),F=await A.json();if(!A.ok)throw new Error(F.error?.message??"模型配置保存失败");s(F.data)}catch(A){c(A instanceof Error?A.message:String(A))}finally{m(!1)}},C=async(q,A)=>{m(!0),c(null);try{const F=await fetch(`${e}/api/operator/v1/pi/models-config/test`,{method:"POST",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":Km()},body:JSON.stringify({provider:q,modelId:A})}),J=await F.json();if(!F.ok)throw new Error(J.error?.message??"模型测试失败");return J.data?.available===!0}catch(F){return c(F instanceof Error?F.message:String(F)),!1}finally{m(!1)}},I=t==="models"?"Models":t==="skills"?"Skills":t==="mcp"?"MCP":"Plugins",O=J8(),X=t&&typeof document<"u"?zu.createPortal(f.jsx("div",{className:"oc-resource-backdrop",style:{"--oc-chrome-offset":`${O}px`},onMouseDown:q=>{q.target===q.currentTarget&&n(null)},children:f.jsxs("section",{className:"oc-resource-panel",role:"dialog","aria-modal":"true","aria-label":I,children:[f.jsxs("header",{className:"oc-resource-panel-head",children:[f.jsxs("div",{className:"oc-resource-panel-head-copy",children:[f.jsx("strong",{children:I}),f.jsx("span",{className:"oc-resource-panel-meta",children:t==="models"?"管理 models.json(改动会走确认门)":t==="skills"?"开关控制自动使用;这里是当前会话真正加载的技能":t==="mcp"?"只读;这里是当前会话真正加载的 MCP 服务和工具":"只读;这里是当前会话真正解析到的插件"})]}),f.jsxs("div",{className:"oc-resource-panel-head-actions",children:[f.jsx(H8,{summary:E,onRetry:()=>{el()}}),f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>n(null),children:"关闭"})]})]}),f.jsxs("div",{className:"oc-resource-panel-body",children:[o&&f.jsx("p",{className:"oc-resource-error",children:o}),t==="models"&&f.jsx(nw,{busy:d,data:a,onMutate:R,onTest:C}),t==="skills"&&f.jsx(rw,{origin:e,sessionId:p?.sessionId,status:h.status,loadError:h.error,skills:p?.skills,hasSession:!!p?.sessionId,hasDiagnostics:E.total>0,diagnosticItems:E.groups.flatMap(q=>q.items)}),t==="packages"&&f.jsx(sw,{status:h.status,loadError:h.error,packages:p?.packages,hasSession:!!p?.sessionId,hasDiagnostics:y.length>0}),t==="mcp"&&f.jsx(ow,{status:h.status,loadError:h.error,inventory:p?.mcp,hasSession:!!p?.sessionId,hasDiagnostics:y.length>0})]}),f.jsxs("footer",{className:"oc-resource-panel-foot",children:[f.jsx("span",{className:"oc-resource-panel-meta",children:b?"正在重新加载会话…":x?`${x.code??"ERROR"}:${x.message}`:p?`快照 r${p.revision} · ${ew(p.loadedAt)}`:"等待会话快照…"}),f.jsxs("div",{className:"oc-resource-panel-actions",children:[x&&f.jsx("button",{type:"button",className:"btn btn-ghost",disabled:b,onClick:()=>{Js()},children:"重试"}),h.status==="error"&&f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>{el()},children:"重新读取快照"}),f.jsx("button",{type:"button",className:"btn btn-ghost",disabled:b,onClick:()=>{Js()},children:"重新加载会话"})]})]})]})}),document.body):null;return f.jsxs("div",{className:"oc-governance",children:[f.jsxs("div",{className:"oc-governance-links",children:[f.jsx("button",{type:"button",onClick:()=>{N("models")},children:"Models"}),f.jsx("button",{type:"button",className:t==="skills"?"is-active":"",onClick:()=>n("skills"),children:"Skills"}),f.jsx("button",{type:"button",className:t==="packages"?"is-active":"",onClick:()=>n("packages"),children:"Plugins"}),f.jsx("button",{type:"button",className:t==="mcp"?"is-active":"",onClick:()=>n("mcp"),children:"MCP"})]}),X]})}function nw({busy:e,data:t,onMutate:n,onTest:a}){const[s,o]=k.useState(""),[c,d]=k.useState(""),[m,h]=k.useState(""),[p,b]=k.useState(null),x=async y=>{y.preventDefault(),!(!t||!s.trim()||!c.trim())&&(await n({expectedRevision:t.revision,action:"upsert-model",provider:s.trim(),model:{id:c.trim(),...m.trim()?{name:m.trim()}:{}}}),d(""),h(""))};return t?f.jsxs("div",{className:"oc-models-config",children:[f.jsx("p",{className:"oc-resource-panel-meta",children:"Console 不读取或写入 API key;credential 请通过 Pi CLI 配置。"}),t.providers.length===0?f.jsx("p",{className:"oc-resource-empty",children:"models.json 中暂无 Provider(真实空态;用 Pi CLI 配置)。"}):null,t.providers.map(y=>f.jsxs("article",{className:"oc-model-provider",children:[f.jsxs("div",{className:"oc-model-provider-head",children:[f.jsx("strong",{children:y.name}),f.jsx("span",{children:y.credential.configured?"credential configured":"credential 未配置"})]}),y.models.map(E=>f.jsxs("div",{className:"oc-model-row",children:[f.jsx("span",{children:E.name?`${E.name} (${E.id})`:E.id}),f.jsxs("div",{className:"oc-model-row-actions",children:[f.jsx("button",{type:"button",disabled:e,onClick:()=>{a(y.name,E.id).then(N=>b(`${y.name}/${E.id}: ${N?"可用":"不可用"}`))},children:"测试"}),f.jsx("button",{type:"button",disabled:e,onClick:()=>{window.confirm(`确认删除模型 ${y.name}/${E.id}?`)&&n({expectedRevision:t.revision,action:"remove-model",provider:y.name,model:{id:E.id}})},children:"删除"})]})]},E.id)),f.jsx("button",{type:"button",className:"oc-model-provider-remove",disabled:e,onClick:()=>{window.confirm(`确认删除 Provider ${y.name}?`)&&n({expectedRevision:t.revision,action:"remove-provider",provider:y.name})},children:"删除 Provider"})]},y.name)),p&&f.jsx("p",{className:"oc-model-test-result",children:p}),f.jsxs("form",{className:"oc-model-form",onSubmit:y=>{x(y)},children:[f.jsx("strong",{children:"新增或更新模型"}),f.jsx("input",{required:!0,placeholder:"Provider",value:s,onChange:y=>o(y.target.value)}),f.jsx("input",{required:!0,placeholder:"Model ID",value:c,onChange:y=>d(y.target.value)}),f.jsx("input",{placeholder:"显示名称(可选)",value:m,onChange:y=>h(y.target.value)}),f.jsx("button",{type:"submit",disabled:e,children:e?"保存中…":"保存模型"})]})]}):f.jsx("p",{className:"oc-resource-empty",children:"正在读取模型配置…"})}function Dh(e){return e.status==="loading"?f.jsx("p",{className:"oc-resource-empty",children:"会话快照加载中…"}):e.status==="error"?f.jsxs("div",{className:"oc-resource-error",role:"alert",children:[f.jsxs("span",{children:[e.loadError?.code?`${e.loadError.code}:`:"",e.loadError?.message??"会话快照读取失败"]}),f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>{el()},children:"重试"})]}):e.hasSession?f.jsx("p",{className:"oc-resource-empty",children:e.emptyText}):f.jsx("p",{className:"oc-resource-empty",children:"当前没有活动会话;打开会话后显示真实资源清单(真实空态)。"})}function rw(e){const t=e.skills??[],n=e.diagnosticItems??[],[a,s]=k.useState(null),[o,c]=k.useState(null),[d,m]=k.useState(null),[h,p]=k.useState(null),[b,x]=k.useState({});if(e.status!=="ready"||!e.hasSession)return f.jsx(Dh,{status:e.status,loadError:e.loadError,hasSession:e.hasSession,emptyText:"当前 session 未加载任何 Skills(真实空态)"});if(t.length===0&&!e.hasDiagnostics)return f.jsx("p",{className:"oc-resource-empty",children:"当前 session 未加载任何 Skills(真实空态,未伪造列表)。"});const y=new Map;for(const C of t){const I=C.scope||"unknown",O=y.get(I)??[];O.push(C),y.set(I,O)}const E=C=>Object.hasOwn(b,C.resourceId)?b[C.resourceId]:C.autoInvocationEnabled,N=async(C,I)=>{if(!e.sessionId||!C.resourceId||a)return;E(C),c(null),m(null),s(C.resourceId),x(X=>({...X,[C.resourceId]:I}));const O=await q8({origin:e.origin,sessionId:e.sessionId,resourceId:C.resourceId,autoInvocationEnabled:I,confirmationToken:Km()});if(s(null),!O.ok){x(X=>{const q={...X};return delete q[C.resourceId],q}),c(`${O.error.code?`${O.error.code}:`:""}${O.error.message}`);return}if(O.reloadApplied&&O.snapshot){L2({type:"load-success",sessionId:e.sessionId,snapshot:O.snapshot}),x(X=>{const q={...X};return delete q[C.resourceId],q}),m(null);return}!O.reloadApplied&&O.partialBusy&&m(`设置已保存;当前会话正忙(${O.partialBusy.code}),请在本轮结束后点击「重新加载会话」。${O.partialBusy.message}`)},R=t.find(C=>(C.resourceId||C.path)===h)??t[0];return f.jsxs("div",{className:"oc-resource-lists",children:[o?f.jsx("p",{className:"oc-resource-error",role:"alert",children:o}):null,d?f.jsx("p",{className:"oc-skill-partial-notice",role:"status",children:d}):null,t.length===0?null:f.jsxs("div",{className:"oc-master-detail",children:[f.jsx("nav",{className:"oc-master-list","aria-label":"Skills 列表",children:[...y.entries()].map(([C,I])=>f.jsxs("div",{className:"oc-master-group",children:[f.jsx("div",{className:"oc-master-group-label",children:C}),I.map(O=>{const X=E(O),q=O.resourceId||O.path,A=R?.resourceId===O.resourceId&&R?.path===O.path,F=W8(O,n);return f.jsxs("button",{type:"button",className:`oc-master-item${A?" is-active":""}${X?"":" is-off"}`,onClick:()=>p(q),title:O.path,children:[f.jsx("span",{"aria-hidden":"true",className:"oc-master-dot"}),f.jsx("span",{className:"oc-master-name",children:O.name}),F?f.jsx("span",{className:"oc-master-flag",title:"名称不合规范,技能仍可用",children:"提示"}):null]},`${C}:${q}`)})]},C))}),R?f.jsx(aw,{skill:R,enabled:E(R),pending:a===R.resourceId,notices:Q8(R,n),onToggle:N}):f.jsx("div",{className:"oc-detail-empty",children:"选择左侧技能看详情"})]})]})}function aw(e){const{skill:t,enabled:n,pending:a,notices:s}=e,o=U8({name:t.name,autoInvocationEnabled:n});return f.jsxs("article",{className:"oc-detail",children:[f.jsxs("header",{className:"oc-detail-head",children:[t.scope?f.jsx("span",{className:"oc-scope-badge",children:t.scope}):null,f.jsx("code",{className:"oc-detail-path",title:t.path,children:t.path}),f.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?"保存中…":o.help,onClick:()=>{e.onToggle(t,!n)},children:f.jsx("span",{className:"oc-toggle-knob","aria-hidden":"true"})})]}),f.jsxs("div",{className:"oc-detail-fields",children:[f.jsxs("section",{className:"oc-detail-field",children:[f.jsx("span",{className:"oc-detail-label",children:"名称"}),f.jsx("span",{className:"oc-detail-value oc-mono",children:t.name})]}),t.description?f.jsxs("section",{className:"oc-detail-field",children:[f.jsx("span",{className:"oc-detail-label",children:"说明"}),f.jsx("span",{className:"oc-detail-value",children:t.description})]}):null,f.jsxs("section",{className:"oc-detail-field",children:[f.jsx("span",{className:"oc-detail-label",children:"状态"}),f.jsx("span",{className:"oc-detail-value",children:o.badge})]}),t.source?f.jsxs("section",{className:"oc-detail-field",children:[f.jsx("span",{className:"oc-detail-label",children:"来源"}),f.jsx("span",{className:"oc-detail-value oc-mono",children:t.source})]}):null]}),s.length>0?f.jsx("div",{className:"oc-skill-notices",children:s.map((c,d)=>f.jsx("p",{className:"oc-skill-notice",children:c.detail??c.title},`${c.kind}:${d}`))}):null]})}const iw={extension:"Extensions",skill:"Skills",prompt:"Prompts",theme:"Themes"};function U2(e){return Array.isArray(e.diagnostics)&&e.diagnostics.length>0?"error":e.enabled?e.version?"installed":"loaded":"disabled"}function sw(e){const t=e.packages??[];if(e.status!=="ready"||!e.hasSession)return f.jsx(Dh,{status:e.status,loadError:e.loadError,hasSession:e.hasSession,emptyText:"当前会话没有插件(真实空态)"});if(t.length===0&&!e.hasDiagnostics)return f.jsx("p",{className:"oc-resource-empty",children:"当前会话没有插件(真实空态,未伪造列表)。"});const[n,a]=k.useState(null),s=new Map;for(const d of t){const m=s.get(d.scope)??[];m.push(d),s.set(d.scope,m)}const o=d=>`${d.scope}:${d.spec}`,c=t.find(d=>o(d)===n)??t[0];return f.jsx("div",{className:"oc-resource-lists",children:t.length===0?null:f.jsxs("div",{className:"oc-master-detail",children:[f.jsx("nav",{className:"oc-master-list","aria-label":"插件列表",children:[...s.entries()].map(([d,m])=>f.jsxs("div",{className:"oc-master-group",children:[f.jsx("div",{className:"oc-master-group-label",children:d}),m.map(h=>{const p=U2(h);return f.jsxs("button",{type:"button",className:`oc-master-item${o(h)===(c?o(c):"")?" is-active":""}`,onClick:()=>a(o(h)),title:h.spec,children:[f.jsx("span",{"aria-hidden":"true",className:`oc-master-dot is-${p}`}),f.jsx("span",{className:"oc-master-name",children:h.spec})]},o(h))})]},d))}),c?f.jsx(lw,{pkg:c}):f.jsx("div",{className:"oc-detail-empty",children:"选择左侧 Package 查看详情"})]})})}function lw(e){const{pkg:t}=e,n=U2(t),a=new Map;for(const s of t.resolved??[]){const o=iw[s.type]??s.type,c=a.get(o)??[];c.push(s),a.set(o,c)}return f.jsxs("article",{className:"oc-detail",children:[f.jsxs("header",{className:"oc-detail-head",children:[t.scope?f.jsx("span",{className:"oc-scope-badge",children:t.scope}):null,f.jsx("code",{className:"oc-detail-path",title:t.spec,children:t.spec}),f.jsx("span",{className:`oc-package-status is-${n}`,children:n})]}),f.jsxs("div",{className:"oc-detail-fields",children:[t.packageName?f.jsxs("section",{className:"oc-detail-field",children:[f.jsx("span",{className:"oc-detail-label",children:"Package"}),f.jsx("span",{className:"oc-detail-value oc-mono",children:t.packageName})]}):null,t.version?f.jsxs("section",{className:"oc-detail-field",children:[f.jsx("span",{className:"oc-detail-label",children:"Version"}),f.jsxs("span",{className:"oc-detail-value oc-mono",children:["v",t.version]})]}):null,t.configuredVersion?f.jsxs("section",{className:"oc-detail-field",children:[f.jsx("span",{className:"oc-detail-label",children:"Configured"}),f.jsx("span",{className:"oc-detail-value oc-mono",children:t.configuredVersion})]}):null,f.jsxs("section",{className:"oc-detail-field",children:[f.jsx("span",{className:"oc-detail-label",children:"状态"}),f.jsx("span",{className:"oc-detail-value",children:t.enabled?"loaded":"disabled"})]}),t.installedPath?f.jsxs("section",{className:"oc-detail-field",children:[f.jsx("span",{className:"oc-detail-label",children:"Installed path"}),f.jsx("span",{className:"oc-detail-value oc-mono",title:t.installedPath,children:t.installedPath})]}):null,t.cwd?f.jsxs("section",{className:"oc-detail-field",children:[f.jsx("span",{className:"oc-detail-label",children:"Cwd"}),f.jsx("span",{className:"oc-detail-value oc-mono",children:t.cwd})]}):null]}),a.size>0?f.jsx("div",{className:"oc-package-resources",children:[...a.entries()].map(([s,o])=>f.jsxs("section",{className:"oc-package-group",children:[f.jsxs("header",{className:"oc-resource-group-head",children:[f.jsx("strong",{children:s}),f.jsxs("span",{children:[o.length," 项"]})]}),f.jsx("ul",{className:"oc-resource-sub-list",children:o.map((c,d)=>f.jsxs("li",{children:[f.jsx("span",{children:c.name||c.path}),f.jsxs("span",{className:"oc-resource-panel-meta",children:[c.scope,c.source?` · ${c.source}`:""]}),f.jsx("code",{children:c.path})]},`${s}:${d}`))})]},s))}):f.jsx("p",{className:"oc-resource-panel-meta",children:"未解析出扩展/技能/提示词/主题(真实空态)"}),Array.isArray(t.diagnostics)&&t.diagnostics.length>0?f.jsx("div",{className:"oc-package-diagnostics",children:t.diagnostics.map((s,o)=>f.jsx("span",{children:s},o))}):null]})}function yv(e){return e==="loaded"?"已加载":e==="disabled"?"已关闭":"已配置"}function ow(e){const t=e.inventory?.servers??[],n=e.inventory?.unassignedTools??[],[a,s]=k.useState(null);if(e.status!=="ready"||!e.hasSession)return f.jsx(Dh,{status:e.status,loadError:e.loadError,hasSession:e.hasSession,emptyText:"当前会话还没加载 MCP"});if(t.length===0&&n.length===0&&!e.hasDiagnostics)return f.jsx("p",{className:"oc-resource-empty",children:"当前会话没有 MCP 服务,也没有扩展注册的 MCP 工具。"});const o=t.find(c=>c.name===a)??t[0];return f.jsx("div",{className:"oc-resource-lists",children:t.length===0&&n.length===0?null:f.jsxs("div",{className:"oc-master-detail",children:[f.jsx("nav",{className:"oc-master-list","aria-label":"MCP 服务列表",children:t.length>0?f.jsxs("div",{className:"oc-master-group",children:[f.jsx("div",{className:"oc-master-group-label",children:"服务"}),t.map(c=>{const d=o?.name===c.name;return f.jsxs("button",{type:"button",className:`oc-master-item${d?" is-active":""}${c.enabled?"":" is-off"}`,onClick:()=>s(c.name),title:c.configPath??c.name,children:[f.jsx("span",{"aria-hidden":"true",className:`oc-master-dot is-${c.status}`}),f.jsx("span",{className:"oc-master-name",children:c.name})]},`${c.scope}:${c.name}`)})]}):null}),o?f.jsx(cw,{server:o}):n.length>0?f.jsx(uw,{tools:n}):f.jsx("div",{className:"oc-detail-empty",children:"选择左侧服务看详情"})]})})}function cw(e){const{server:t}=e;return f.jsxs("article",{className:"oc-detail",children:[f.jsxs("header",{className:"oc-detail-head",children:[f.jsx("span",{className:"oc-scope-badge",children:t.scope}),f.jsx("code",{className:"oc-detail-path",title:t.configPath??t.name,children:t.name}),f.jsx("span",{className:`oc-package-status is-${t.status}`,children:yv(t.status)})]}),f.jsxs("div",{className:"oc-detail-fields",children:[f.jsxs("section",{className:"oc-detail-field",children:[f.jsx("span",{className:"oc-detail-label",children:"状态"}),f.jsx("span",{className:"oc-detail-value",children:yv(t.status)})]}),t.transport?f.jsxs("section",{className:"oc-detail-field",children:[f.jsx("span",{className:"oc-detail-label",children:"传输"}),f.jsx("span",{className:"oc-detail-value oc-mono",children:t.transport})]}):null,t.command?f.jsxs("section",{className:"oc-detail-field",children:[f.jsx("span",{className:"oc-detail-label",children:"命令"}),f.jsx("span",{className:"oc-detail-value oc-mono",children:t.command})]}):null,t.url?f.jsxs("section",{className:"oc-detail-field",children:[f.jsx("span",{className:"oc-detail-label",children:"地址"}),f.jsx("span",{className:"oc-detail-value oc-mono",children:t.url})]}):null,t.configPath?f.jsxs("section",{className:"oc-detail-field",children:[f.jsx("span",{className:"oc-detail-label",children:"配置"}),f.jsx("span",{className:"oc-detail-value oc-mono",title:t.configPath,children:t.configPath})]}):null]}),t.tools.length>0?f.jsx("div",{className:"oc-package-resources",children:f.jsxs("section",{className:"oc-package-group",children:[f.jsxs("header",{className:"oc-resource-group-head",children:[f.jsx("strong",{children:"工具"}),f.jsxs("span",{children:[t.tools.length," 项"]})]}),f.jsx("ul",{className:"oc-resource-sub-list",children:t.tools.map(n=>f.jsxs("li",{children:[f.jsx("span",{children:n.name}),f.jsx("span",{className:"oc-resource-panel-meta",children:n.active?"当前可用":"已注册未激活"}),n.description?f.jsx("code",{children:n.description}):null]},n.name))})]})}):f.jsx("p",{className:"oc-resource-panel-meta",children:"配置里有这个服务,当前会话还没注册出工具。"})]})}function uw(e){return f.jsxs("article",{className:"oc-detail",children:[f.jsxs("header",{className:"oc-detail-head",children:[f.jsx("span",{className:"oc-scope-badge",children:"session"}),f.jsx("code",{className:"oc-detail-path",children:"扩展工具"})]}),f.jsx("p",{className:"oc-resource-panel-meta",children:"这些工具已经进当前会话,但对不上 mcp.json 里的服务名。"}),f.jsx("ul",{className:"oc-resource-sub-list",children:e.tools.map(t=>f.jsxs("li",{children:[f.jsx("span",{children:t.name}),f.jsx("span",{className:"oc-resource-panel-meta",children:t.active?"当前可用":"已注册未激活"}),t.description?f.jsx("code",{children:t.description}):null]},t.name))})]})}const vu=10,H2="loop-console.operator-chat.sidebar-split.v1",ss=45,Bu=28,qu=70,xv=5,wv=10;function Ws(e){return Number.isFinite(e)?Math.min(qu,Math.max(Bu,Math.round(e))):ss}function dw(e){if(e==null||e==="")return null;const t=Number(e);if(!Number.isFinite(t))return null;const n=Math.round(t);return n<Bu||n>qu?null:n}function fw(e=F2()){if(!e)return ss;try{return dw(e.getItem(H2))??ss}catch{return ss}}function Sv(e,t=F2()){const n=Ws(e);if(!t)return n;try{t.setItem(H2,String(n))}catch{}return n}function mw(e,t,n=!1){const a=Ws(e);switch(t){case"ArrowUp":return Ws(a-(n?wv:xv));case"ArrowDown":return Ws(a+(n?wv:xv));case"Home":return Bu;case"End":return qu;case"Enter":return ss;default:return null}}function kv(e,t,n){if(!Number.isFinite(n)||n<=0)return ss;const a=(e-t)/n;return Ws(a*100)}function F2(){try{return typeof globalThis>"u"?null:globalThis.localStorage??null}catch{return null}}const Ev='a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';function Uu(e){const{open:t,containerRef:n,triggerRef:a,onEscape:s}=e,o=k.useRef(null),c=k.useRef(!1);k.useEffect(()=>{if(t){if(!c.current){const d=document.activeElement;o.current=a?.current??(d instanceof HTMLElement?d:null);const m=n.current;m&&(m.querySelector(Ev)??m).focus?.(),c.current=!0}return()=>{if(!c.current)return;const d=a?.current??o.current;d&&document.contains(d)&&d.focus(),o.current=null,c.current=!1}}c.current=!1},[t,n,a]),k.useEffect(()=>{if(!t)return;const d=n.current;if(!d)return;const m=h=>{if(h.key==="Escape"){h.preventDefault(),s?.();return}if(h.key!=="Tab")return;const p=Array.from(d.querySelectorAll(Ev)).filter(E=>!E.hasAttribute("disabled")&&E.tabIndex!==-1);if(p.length===0){h.preventDefault(),d.focus?.();return}const b=p[0],x=p[p.length-1],y=document.activeElement;h.shiftKey?(y===b||!d.contains(y))&&(h.preventDefault(),x.focus()):(y===x||!d.contains(y))&&(h.preventDefault(),b.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[t,n,s])}function hw(e){const{item:t,active:n,streamingNow:a,turnPhaseNow:s,state:o,deleteConfirming:c,deleting:d}=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||"未命名对话",x=k.useRef(null),y=k.useRef(null),[E,N]=k.useState(null),R=k.useRef(null),C=()=>{R.current!==null&&(window.clearTimeout(R.current),R.current=null)},I=()=>{C(),N(null)},O=A=>{if(!(A.scrollWidth>A.clientWidth+1)){I();return}const J=A.getBoundingClientRect(),W=12,z=Math.min(360,window.innerWidth-W*2),U=J.left,H=Math.max(W,Math.min(U,window.innerWidth-W-z));N({x:H,y:J.top+J.height/2})},X=A=>{A&&(C(),R.current=window.setTimeout(()=>O(A),350))};k.useEffect(()=>{const A=()=>I(),F=J=>{J.key==="Escape"&&I()};return window.addEventListener("scroll",A,!0),window.addEventListener("keydown",F),()=>{window.removeEventListener("scroll",A,!0),window.removeEventListener("keydown",F),C()}},[]),k.useEffect(()=>{c&&y.current?.focus()},[c]);const q=`oc-session-tip-${t.sessionId}`;return f.jsxs("div",{className:`oc-session-item${n?" is-active":""}${c?" is-delete-confirming":""}`,"data-session-id":t.sessionId,children:[f.jsxs("button",{type:"button",className:"oc-session-main",disabled:d,onClick:e.onActivate,onMouseEnter:A=>{const F=A.currentTarget.querySelector("strong");F instanceof HTMLElement&&X(F)},onMouseLeave:I,onFocus:A=>{const F=A.currentTarget.querySelector("strong");F instanceof HTMLElement&&X(F)},onBlur:I,"aria-describedby":E?q:void 0,children:[f.jsx("strong",{ref:x,children:b}),f.jsx("span",{children:new Date(t.updatedAt).toLocaleString()})]}),h?f.jsx("span",{className:"oc-session-running","aria-label":"对话进行中",title:"对话进行中",children:f.jsx("span",{className:"oc-spinner","aria-hidden":"true"})}):null,p?f.jsx("span",{className:`oc-session-queue-state is-${t.deferredTurn?.state}`,children:p}):null,f.jsx("div",{className:`oc-session-actions${c?" is-delete-confirm":""}`,children:c?f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",ref:y,className:"oc-session-delete-confirm",disabled:d,"aria-busy":d||void 0,"aria-label":`确认删除会话:${b}`,onClick:A=>{A.stopPropagation(),e.onConfirmDelete()},children:d?"删除中…":"删除"}),f.jsx("button",{type:"button",className:"oc-session-delete-cancel",disabled:d,"aria-label":"取消删除会话",onClick:A=>{A.stopPropagation(),e.onCancelDelete()},children:"取消"})]}):f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",className:"oc-session-menu",title:"重命名会话","aria-label":"重命名会话",onClick:A=>{A.stopPropagation();const F=window.prompt("会话名称",t.title??"");F!==null&&e.onRename(F)},children:f.jsx(g8,{size:16,"aria-hidden":"true"})}),f.jsx("button",{type:"button",className:"oc-session-menu",title:o==="active"?"归档会话":"恢复会话","aria-label":o==="active"?"归档会话":"恢复会话",onClick:A=>{A.stopPropagation(),e.onSetState(o==="active"?"archived":"active")},children:o==="active"?f.jsx(m8,{size:16,"aria-hidden":"true"}):f.jsx(b8,{size:16,"aria-hidden":"true"})}),f.jsx("button",{type:"button",className:"oc-session-menu oc-session-delete","data-session-delete-id":t.sessionId,title:"删除会话","aria-label":"删除会话",onClick:A=>{A.stopPropagation(),e.onRequestDelete()},children:f.jsx(p8,{size:16,"aria-hidden":"true"})})]})}),E?zu.createPortal(f.jsx("div",{id:q,role:"tooltip",className:"oc-session-title-tooltip",style:{position:"fixed",left:E.x,top:E.y,transform:"translateY(-50%)"},children:b}),document.body):null]})}function pw(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 gw({open:e}){return f.jsx("svg",{className:`oc-tree-chevron${e?" is-open":""}`,width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",children:f.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 bw({open:e}){return e?f.jsxs("svg",{className:"oc-tree-glyph is-folder-open",width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:[f.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"}),f.jsx("path",{d:"M1.8 5.8h10.4l-.7 5.2H2.5L1.8 5.8Z",fill:"currentColor",opacity:"0.55"})]}):f.jsx("svg",{className:"oc-tree-glyph is-folder",width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:f.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 vw(){return f.jsxs("svg",{className:"oc-tree-glyph is-file",width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:[f.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"}),f.jsx("path",{d:"M8.3 1.7v2.5h2.4",fill:"none",stroke:"currentColor",strokeWidth:"1.1",strokeLinejoin:"round",opacity:"0.75"})]})}function yw(){return f.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:f.jsx("path",{d:"M3 3.5h10v2H3v-2Zm0 3.5h10v2H3V7Zm0 3.5h7V13H3v-2Z",fill:"currentColor"})})}function xw(){return f.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:f.jsx("path",{d:"M8 3v10M3 8h10",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})})}function ww(){return f.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:f.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 Sw(e){const t=e.sessions.slice(0,vu),[n,a]=k.useState(()=>fw()),[s,o]=k.useState(!1),[c,d]=k.useState(null),[m,h]=k.useState(null),p=k.useRef(null),b=k.useRef(null),x=k.useRef(!1),y=e.layoutMode==="comfortable"&&e.open,E=e.layoutMode==="compact",N=e.drawerOpen&&(e.layoutMode==="compact"||e.layoutMode==="narrow"),R=k.useCallback((te=!0)=>{if(m)return;const G=c;d(null),!(!te||!G)&&window.requestAnimationFrame(()=>{const K=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(G):G.replace(/["\\]/g,"\\$&");document.querySelector(`[data-session-delete-id="${K}"]`)?.focus()})},[m,c]),C=k.useCallback(()=>{m||(d(null),e.onCloseDrawer())},[m,e.onCloseDrawer]),I=k.useCallback(()=>{if(c){R();return}C()},[R,C,c]);Uu({open:N,containerRef:b,triggerRef:e.drawerTriggerRef,onEscape:I}),k.useEffect(()=>{x.current&&!N&&!m&&d(null),x.current=N},[m,N]),k.useEffect(()=>{if(N||!c)return;const te=G=>{G.key==="Escape"&&(G.preventDefault(),R())};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[R,c,N]),k.useEffect(()=>{c&&!t.some(te=>te.sessionId===c)&&d(null),m&&!t.some(te=>te.sessionId===m)&&h(null)},[m,c,t]);const O=k.useCallback(async te=>{if(!(m||c!==te)){h(te);try{await e.onDelete(te)}finally{h(null),d(null)}}},[m,c,e.onDelete]),X=k.useCallback(()=>{m||(R(!1),e.onCreate())},[R,m,e.onCreate]),q=k.useCallback(()=>{m||(R(!1),e.onToggleOpen())},[R,m,e.onToggleOpen]),A=k.useCallback((te,G)=>{const K=Ws(te);a(K),G&&Sv(K)},[]),F=k.useCallback(te=>{const G=mw(n,te.key,te.shiftKey);G!=null&&(te.preventDefault(),A(G,!0))},[A,n]),J=k.useCallback(te=>{te.preventDefault(),te.currentTarget.setPointerCapture(te.pointerId),o(!0);const K=p.current;if(!K)return;const $=K.getBoundingClientRect();A(kv(te.clientY,$.top,$.height),!1)},[A]),W=k.useCallback(te=>{if(!te.currentTarget.hasPointerCapture(te.pointerId))return;const G=p.current;if(!G)return;const K=G.getBoundingClientRect();A(kv(te.clientY,K.top,K.height),!1)},[A]),z=k.useCallback(te=>{te.currentTarget.hasPointerCapture(te.pointerId)&&te.currentTarget.releasePointerCapture(te.pointerId),o(!1),Sv(n)},[n]),U=k.useCallback(()=>{A(ss,!0)},[A]),H=f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"oc-sidebar-split",ref:p,style:{"--oc-session-share":`${n}%`,"--oc-repo-share":`${100-n}%`},"data-dragging":s?"true":"false",children:[f.jsxs("section",{className:"oc-sidebar-section oc-sessions",children:[f.jsxs("header",{children:[f.jsx("strong",{children:"会话"}),f.jsxs("div",{className:"oc-sidebar-header-actions",children:[f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:X,disabled:e.creatingSession,"aria-busy":e.creatingSession||void 0,children:e.creatingSession?"创建中…":"新建"}),e.layoutMode==="comfortable"?f.jsx("button",{type:"button",className:"oc-sidebar-toggle",onClick:q,"aria-expanded":!0,"aria-label":"收起侧栏",title:"收起侧栏",children:f.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:f.jsx("path",{d:"M8.8 2.6 5.2 7l3.6 4.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}):f.jsx("button",{type:"button",className:"oc-sidebar-toggle",onClick:C,"aria-label":"关闭侧栏抽屉",title:"关闭",children:f.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:f.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"})})})]})]}),f.jsxs("div",{className:"oc-session-scroll",children:[["active","archived"].map(te=>{const G=t.filter(K=>K.state===te);return G.length?f.jsxs("div",{className:"oc-session-group",children:[f.jsx("small",{children:te==="active"?"进行中":"已归档"}),G.map(K=>f.jsx(hw,{item:K,active:e.activeSessionId===K.sessionId,streamingNow:e.activeSessionId===K.sessionId&&e.activeSessionStreaming===!0,turnPhaseNow:e.activeSessionId===K.sessionId?e.activeSessionTurnPhase:void 0,state:te,deleteConfirming:c===K.sessionId,deleting:m===K.sessionId,onActivate:()=>{m||(R(!1),e.onActivate(K.sessionId))},onRename:$=>e.onRename(K.sessionId,$),onSetState:$=>e.onSetState(K.sessionId,$),onRequestDelete:()=>{m||d(K.sessionId)},onConfirmDelete:()=>{O(K.sessionId)},onCancelDelete:()=>R()},K.sessionId))]},te):null}),t.length===0?f.jsx("p",{className:"oc-tree-empty",children:"暂无会话,点击上方新建。"}):null]})]}),f.jsx("div",{className:"oc-sidebar-separator",role:"separator","aria-orientation":"horizontal","aria-valuemin":Bu,"aria-valuemax":qu,"aria-valuenow":n,"aria-label":"调整会话与仓库高度比例",tabIndex:0,onKeyDown:F,onPointerDown:J,onPointerMove:W,onPointerUp:z,onPointerCancel:z,onDoubleClick:U}),f.jsxs("section",{className:"oc-sidebar-section oc-explorer",children:[f.jsxs("header",{children:[f.jsx("strong",{children:"仓库"}),f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:e.onRefreshTree,children:"刷新"})]}),f.jsx("p",{className:"oc-explorer-hint",children:"单击插入 @路径 · 双击预览"}),e.treeError&&f.jsx("p",{className:"oc-sidebar-error",children:e.treeError}),f.jsx("div",{className:"oc-tree-scroll",children:f.jsx(P2,{entries:e.tree[""]??[],tree:e.tree,expanded:e.expanded,depth:0,onToggle:e.onToggleDir,onInsert:e.onInsert,onPreview:e.onPreview})})]})]}),f.jsx(tw,{origin:e.origin})]});return f.jsxs(f.Fragment,{children:[E?f.jsxs("nav",{className:"oc-sidebar-rail","aria-label":"紧凑侧栏",children:[f.jsx("button",{type:"button",className:"oc-sidebar-rail-btn","aria-label":"打开会话与仓库",title:"会话与仓库","aria-expanded":N,onClick:()=>N?C():e.onOpenDrawer(),children:f.jsx(yw,{})}),f.jsx("button",{type:"button",className:"oc-sidebar-rail-btn","aria-label":e.creatingSession?"创建会话中":"新建会话",title:e.creatingSession?"创建中…":"新建会话",onClick:X,disabled:e.creatingSession,"aria-busy":e.creatingSession||void 0,children:f.jsx(xw,{})}),f.jsx("button",{type:"button",className:"oc-sidebar-rail-btn","aria-label":"治理入口",title:"治理",onClick:()=>N?C():e.onOpenDrawer(),children:f.jsx(ww,{})})]}):null,e.layoutMode==="comfortable"?f.jsx("aside",{className:`oc-sidebar${y?"":" is-collapsed"}`,"aria-label":"会话与仓库",children:y?H:f.jsx("button",{type:"button",className:"oc-sidebar-toggle is-collapsed",onClick:q,"aria-expanded":!1,"aria-label":"展开侧栏",title:"展开侧栏",children:f.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:f.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?f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",className:"oc-overlay-backdrop","aria-label":"关闭侧栏遮罩",onClick:C}),f.jsx("aside",{ref:b,className:"oc-sidebar oc-sidebar-drawer","aria-label":"会话与仓库抽屉",role:"dialog","aria-modal":"true",tabIndex:-1,children:H})]}):null]})}function P2(e){const t=k.useMemo(()=>pw(e.entries),[e.entries]);return t.length?f.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 f.jsxs("li",{className:`oc-tree-node is-dir${s?" is-open":""}${a?" is-dot":""}`,role:"treeitem","aria-expanded":s,children:[f.jsxs("button",{type:"button",className:"oc-tree-row oc-tree-dir",onClick:()=>e.onToggle(n.path),style:{paddingLeft:`${8+e.depth*12}px`},children:[f.jsx(gw,{open:s}),f.jsx(bw,{open:s}),f.jsx("span",{className:"oc-tree-label",children:n.name}),f.jsx("span",{className:"oc-tree-at",role:"button",tabIndex:0,title:"插入 @目录/ 引用","aria-label":`插入 ${n.name} 引用`,onClick:o=>{o.stopPropagation(),e.onInsert(`${n.path}/`)},onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),e.onInsert(`${n.path}/`))},children:"@"})]}),s?f.jsx("div",{className:"oc-tree-children",style:{"--oc-tree-guide":`${14+e.depth*12}px`},children:f.jsx(P2,{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 f.jsx("li",{className:`oc-tree-node is-file${a?" is-dot":""}`,role:"treeitem",children:f.jsx(kw,{entry:n,depth:e.depth,onInsert:e.onInsert,onPreview:e.onPreview})},n.path)})}):f.jsx("p",{className:"oc-tree-empty",children:"此目录为空或没有可安全浏览的文件。"})}function kw(e){const t=k.useRef(null);return k.useEffect(()=>()=>{t.current!==null&&window.clearTimeout(t.current)},[]),f.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:[f.jsx("span",{className:"oc-tree-chevron-spacer","aria-hidden":"true"}),f.jsx(vw,{}),f.jsx("span",{className:"oc-tree-label",children:e.entry.name}),f.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 Ew="modulepreload",Tw=function(e){return"/"+e},Tv={},Nw=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]"),d=c?.nonce||c?.getAttribute("nonce");s=m(n.map(h=>{if(h=Tw(h),h in Tv)return;Tv[h]=!0;const p=h.endsWith(".css"),b=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${b}`))return;const x=document.createElement("link");if(x.rel=p?"stylesheet":Ew,p||(x.as="script"),x.crossOrigin="",x.href=h,d&&x.setAttribute("nonce",d),document.head.appendChild(x),p)return new Promise((y,E)=>{x.addEventListener("load",y),x.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return s.then(c=>{for(const d of c||[])d.status==="rejected"&&o(d.reason);return t().catch(o)})};function Nv(e){const t=[],n=String(e||"");let a=n.indexOf(","),s=0,o=!1;for(;!o;){a===-1&&(a=n.length,o=!0);const c=n.slice(s,a).trim();(c||!o)&&t.push(c),s=a+1,a=n.indexOf(",",s)}return t}function Cw(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Rw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Aw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_w={};function Cv(e,t){return(_w.jsx?Aw:Rw).test(e)}const Iw=/[ \t\n\f\r]/g;function Mw(e){return typeof e=="object"?e.type==="text"?Rv(e.value):!1:Rv(e)}function Rv(e){return e.replace(Iw,"")===""}class Ro{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}Ro.prototype.normal={};Ro.prototype.property={};Ro.prototype.space=void 0;function $2(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new Ro(n,a,t)}function wo(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 Ow=0;const ut=cs(),Dn=cs(),Vm=cs(),_e=cs(),nn=cs(),ls=cs(),Mr=cs();function cs(){return 2**++Ow}const Ym=Object.freeze(Object.defineProperty({__proto__:null,boolean:ut,booleanish:Dn,commaOrSpaceSeparated:Mr,commaSeparated:ls,number:_e,overloadedBoolean:Vm,spaceSeparated:nn},Symbol.toStringTag,{value:"Module"})),vf=Object.keys(Ym);class jh extends Sr{constructor(t,n,a,s){let o=-1;if(super(t,n),Av(this,"space",s),typeof a=="number")for(;++o<vf.length;){const c=vf[o];Av(this,vf[o],(a&Ym[c])===Ym[c])}}}jh.prototype.defined=!0;function Av(e,t,n){n&&(e[t]=n)}function sl(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const o=new jh(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,n[wo(a)]=a,n[wo(o.attribute)]=a}return new Ro(t,n,e.space)}const G2=sl({properties:{ariaActiveDescendant:null,ariaAtomic:Dn,ariaAutoComplete:null,ariaBusy:Dn,ariaChecked:Dn,ariaColCount:_e,ariaColIndex:_e,ariaColSpan:_e,ariaControls:nn,ariaCurrent:null,ariaDescribedBy:nn,ariaDetails:null,ariaDisabled:Dn,ariaDropEffect:nn,ariaErrorMessage:null,ariaExpanded:Dn,ariaFlowTo:nn,ariaGrabbed:Dn,ariaHasPopup:null,ariaHidden:Dn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:nn,ariaLevel:_e,ariaLive:null,ariaModal:Dn,ariaMultiLine:Dn,ariaMultiSelectable:Dn,ariaOrientation:null,ariaOwns:nn,ariaPlaceholder:null,ariaPosInSet:_e,ariaPressed:Dn,ariaReadOnly:Dn,ariaRelevant:null,ariaRequired:Dn,ariaRoleDescription:nn,ariaRowCount:_e,ariaRowIndex:_e,ariaRowSpan:_e,ariaSelected:Dn,ariaSetSize:_e,ariaSort:null,ariaValueMax:_e,ariaValueMin:_e,ariaValueNow:_e,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function K2(e,t){return t in e?e[t]:t}function V2(e,t){return K2(e,t.toLowerCase())}const Dw=sl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ls,acceptCharset:nn,accessKey:nn,action:null,allow:null,allowFullScreen:ut,allowPaymentRequest:ut,allowUserMedia:ut,alpha:ut,alt:null,as:null,async:ut,autoCapitalize:null,autoComplete:nn,autoFocus:ut,autoPlay:ut,blocking:nn,capture:null,charSet:null,checked:ut,cite:null,className:nn,closedBy:null,colorSpace:null,cols:_e,colSpan:_e,command:null,commandFor:null,content:null,contentEditable:Dn,controls:ut,controlsList:nn,coords:_e|ls,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ut,defer:ut,dir:null,dirName:null,disabled:ut,download:Vm,draggable:Dn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ut,formTarget:null,headers:nn,height:_e,hidden:Vm,high:_e,href:null,hrefLang:null,htmlFor:nn,httpEquiv:nn,id:null,imageSizes:null,imageSrcSet:null,inert:ut,inputMode:null,integrity:null,is:null,isMap:ut,itemId:null,itemProp:nn,itemRef:nn,itemScope:ut,itemType:nn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ut,low:_e,manifest:null,max:null,maxLength:_e,media:null,method:null,min:null,minLength:_e,multiple:ut,muted:ut,name:null,nonce:null,noModule:ut,noValidate:ut,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:ut,optimum:_e,pattern:null,ping:nn,placeholder:null,playsInline:ut,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ut,referrerPolicy:null,rel:nn,required:ut,reversed:ut,rows:_e,rowSpan:_e,sandbox:nn,scope:null,scoped:ut,seamless:ut,selected:ut,shadowRootClonable:ut,shadowRootCustomElementRegistry:ut,shadowRootDelegatesFocus:ut,shadowRootMode:null,shadowRootSerializable:ut,shape:null,size:_e,sizes:null,slot:null,span:_e,spellCheck:Dn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:_e,step:null,style:null,tabIndex:_e,target:null,title:null,translate:null,type:null,typeMustMatch:ut,useMap:null,value:Dn,width:_e,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:nn,axis:null,background:null,bgColor:null,border:_e,borderColor:null,bottomMargin:_e,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ut,declare:ut,event:null,face:null,frame:null,frameBorder:null,hSpace:_e,leftMargin:_e,link:null,longDesc:null,lowSrc:null,marginHeight:_e,marginWidth:_e,noResize:ut,noHref:ut,noShade:ut,noWrap:ut,object:null,profile:null,prompt:null,rev:null,rightMargin:_e,rules:null,scheme:null,scrolling:Dn,standby:null,summary:null,text:null,topMargin:_e,valueType:null,version:null,vAlign:null,vLink:null,vSpace:_e,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ut,disablePictureInPicture:ut,disableRemotePlayback:ut,exportParts:ls,part:nn,prefix:null,property:null,results:_e,security:null,unselectable:null},space:"html",transform:V2}),jw=sl({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:_e,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:_e,amplitude:_e,arabicForm:null,ascent:_e,attributeName:null,attributeType:null,azimuth:_e,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:_e,by:null,calcMode:null,capHeight:_e,className:nn,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:_e,diffuseConstant:_e,direction:null,display:null,dur:null,divisor:_e,dominantBaseline:null,download:ut,dx:null,dy:null,edgeMode:null,editable:null,elevation:_e,enableBackground:null,end:null,event:null,exponent:_e,externalResourcesRequired:null,fill:null,fillOpacity:_e,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:_e,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:_e,horizOriginX:_e,horizOriginY:_e,id:null,ideographic:_e,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:_e,k:_e,k1:_e,k2:_e,k3:_e,k4:_e,kernelMatrix:Mr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:_e,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:_e,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:_e,overlineThickness:_e,paintOrder:null,panose1:null,path:null,pathLength:_e,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:nn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:_e,pointsAtY:_e,pointsAtZ:_e,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:_e,specularExponent:_e,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:_e,strikethroughThickness:_e,string:null,stroke:null,strokeDashArray:Mr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:_e,strokeOpacity:_e,strokeWidth:null,style:null,surfaceScale:_e,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Mr,tabIndex:_e,tableValues:null,target:null,targetX:_e,targetY:_e,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:_e,underlineThickness:_e,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:_e,values:null,vAlphabetic:_e,vMathematical:_e,vectorEffect:null,vHanging:_e,vIdeographic:_e,version:null,vertAdvY:_e,vertOriginX:_e,vertOriginY:_e,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:_e,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:K2}),Y2=sl({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()}}),X2=sl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:V2}),Z2=sl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Lw={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"},zw=/[A-Z]/g,_v=/-[a-z]/g,Bw=/^data[-\w.:]+$/i;function W2(e,t){const n=wo(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"&&Bw.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(_v,Uw);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!_v.test(o)){let c=o.replace(zw,qw);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=jh}return new s(a,t)}function qw(e){return"-"+e.toLowerCase()}function Uw(e){return e.charAt(1).toUpperCase()}const Q2=$2([G2,Dw,Y2,X2,Z2],"html"),Hu=$2([G2,jw,Y2,X2,Z2],"svg");function Iv(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Hw(e){return e.join(" ").trim()}var Ks={},yf,Mv;function Fw(){if(Mv)return yf;Mv=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,m=`
|
|
12
|
+
`,h="/",p="*",b="",x="comment",y="declaration";function E(R,C){if(typeof R!="string")throw new TypeError("First argument must be a string");if(!R)return[];C=C||{};var I=1,O=1;function X(G){var K=G.match(t);K&&(I+=K.length);var $=G.lastIndexOf(m);O=~$?G.length-$:O+G.length}function q(){var G={line:I,column:O};return function(K){return K.position=new A(G),W(),K}}function A(G){this.start=G,this.end={line:I,column:O},this.source=C.source}A.prototype.content=R;function F(G){var K=new Error(C.source+":"+I+":"+O+": "+G);if(K.reason=G,K.filename=C.source,K.line=I,K.column=O,K.source=R,!C.silent)throw K}function J(G){var K=G.exec(R);if(K){var $=K[0];return X($),R=R.slice($.length),K}}function W(){J(n)}function z(G){var K;for(G=G||[];K=U();)K!==!1&&G.push(K);return G}function U(){var G=q();if(!(h!=R.charAt(0)||p!=R.charAt(1))){for(var K=2;b!=R.charAt(K)&&(p!=R.charAt(K)||h!=R.charAt(K+1));)++K;if(K+=2,b===R.charAt(K-1))return F("End of comment missing");var $=R.slice(2,K-2);return O+=2,X($),R=R.slice(K),O+=2,G({type:x,comment:$})}}function H(){var G=q(),K=J(a);if(K){if(U(),!J(s))return F("property missing ':'");var $=J(o),ee=G({type:y,property:N(K[0].replace(e,b)),value:$?N($[0].replace(e,b)):b});return J(c),ee}}function te(){var G=[];z(G);for(var K;K=H();)K!==!1&&(G.push(K),z(G));return G}return W(),te()}function N(R){return R?R.replace(d,b):b}return yf=E,yf}var Ov;function Pw(){if(Ov)return Ks;Ov=1;var e=Ks&&Ks.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.default=n;const t=e(Fw());function n(a,s){let o=null;if(!a||typeof a!="string")return o;const c=(0,t.default)(a),d=typeof s=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:h,value:p}=m;d?s(h,p,m):p&&(o=o||{},o[h]=p)}),o}return Ks}var oo={},Dv;function $w(){if(Dv)return oo;Dv=1,Object.defineProperty(oo,"__esModule",{value:!0}),oo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(h){return!h||n.test(h)||e.test(h)},c=function(h,p){return p.toUpperCase()},d=function(h,p){return"".concat(p,"-")},m=function(h,p){return p===void 0&&(p={}),o(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(s,d):h=h.replace(a,d),h.replace(t,c))};return oo.camelCase=m,oo}var co,jv;function Gw(){if(jv)return co;jv=1;var e=co&&co.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(Pw()),n=$w();function a(s,o){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(d,m){d&&m&&(c[(0,n.camelCase)(d,o)]=m)}),c}return a.default=a,co=a,co}var Kw=Gw();const Vw=Lu(Kw),J2=e3("end"),Lh=e3("start");function e3(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 Yw(e){const t=Lh(e),n=J2(e);if(t&&n)return{start:t,end:n}}function po(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Lv(e.position):"start"in e||"end"in e?Lv(e):"line"in e||"column"in e?Xm(e):""}function Xm(e){return zv(e&&e.line)+":"+zv(e&&e.column)}function Lv(e){return Xm(e&&e.start)+"-"+Xm(e&&e.end)}function zv(e){return e&&typeof e=="number"?e:1}class rr extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let s="",o={},c=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?s=t:!o.cause&&t&&(c=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const m=a.indexOf(":");m===-1?o.ruleId=a:(o.source=a.slice(0,m),o.ruleId=a.slice(m+1))}if(!o.place&&o.ancestors&&o.ancestors){const m=o.ancestors[o.ancestors.length-1];m&&(o.place=m.position)}const d=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=po(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}rr.prototype.file="";rr.prototype.name="";rr.prototype.reason="";rr.prototype.message="";rr.prototype.stack="";rr.prototype.column=void 0;rr.prototype.line=void 0;rr.prototype.ancestors=void 0;rr.prototype.cause=void 0;rr.prototype.fatal=void 0;rr.prototype.place=void 0;rr.prototype.ruleId=void 0;rr.prototype.source=void 0;const zh={}.hasOwnProperty,Xw=new Map,Zw=/[A-Z]/g,Ww=new Set(["table","tbody","thead","tfoot","tr"]),Qw=new Set(["td","th"]),t3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Jw(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=l9(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=s9(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"?Hu:Q2,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=n3(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function n3(e,t,n){if(t.type==="element")return e9(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return t9(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return r9(e,t,n);if(t.type==="mdxjsEsm")return n9(e,t);if(t.type==="root")return a9(e,t,n);if(t.type==="text")return i9(e,t)}function e9(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=Hu,e.schema=s),e.ancestors.push(t);const o=a3(e,t.tagName,!1),c=o9(e,t);let d=qh(e,t);return Ww.has(t.tagName)&&(d=d.filter(function(m){return typeof m=="string"?!Mw(m):!0})),r3(e,c,o,t),Bh(c,d),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function t9(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)}So(e,t.position)}function n9(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);So(e,t.position)}function r9(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=Hu,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:a3(e,t.name,!0),c=c9(e,t),d=qh(e,t);return r3(e,c,o,t),Bh(c,d),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function a9(e,t,n){const a={};return Bh(a,qh(e,t)),e.create(t,e.Fragment,a,n)}function i9(e,t){return t.value}function r3(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function Bh(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function s9(e,t,n){return a;function a(s,o,c,d){const h=Array.isArray(c.children)?n:t;return d?h(o,c,d):h(o,c)}}function l9(e,t){return n;function n(a,s,o,c){const d=Array.isArray(o.children),m=Lh(a);return t(s,o,c,d,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function o9(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&zh.call(t.properties,s)){const o=u9(e,s,t.properties[s]);if(o){const[c,d]=o;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&Qw.has(t.tagName)?a=d:n[c]=d}}if(a){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function c9(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const c=o.expression;c.type;const d=c.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else So(e,t.position);else{const s=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const d=a.value.data.estree.body[0];d.type,o=e.evaluater.evaluateExpression(d.expression)}else So(e,t.position);else o=a.value===null?!0:a.value;n[s]=o}return n}function qh(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:Xw;for(;++a<t.children.length;){const o=t.children[a];let c;if(e.passKeys){const m=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(m){const h=s.get(m)||0;c=m+"-"+h,s.set(m,h+1)}}const d=n3(e,o,c);d!==void 0&&n.push(d)}return n}function u9(e,t,n){const a=W2(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?Cw(n):Hw(n)),a.property==="style"){let s=typeof n=="object"?n:d9(e,String(n));return e.stylePropertyNameCase==="css"&&(s=f9(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?Lw[a.property]||a.property:a.attribute,n]}}function d9(e,t){try{return Vw(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new rr("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=t3+"#cannot-parse-style-attribute",s}}function a3(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let o=-1,c;for(;++o<s.length;){const d=Cv(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(o&&d.type==="Literal"),optional:!1}:d}a=c}else a=Cv(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return zh.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);So(e)}function So(e,t){const n=new rr("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=t3+"#cannot-handle-mdx-estrees-without-createevaluater",n}function f9(e){const t={};let n;for(n in e)zh.call(e,n)&&(t[m9(n)]=e[n]);return t}function m9(e){let t=e.replace(Zw,h9);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function h9(e){return"-"+e.toLowerCase()}const xf={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"]},p9={};function Uh(e,t){const n=p9,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return i3(e,a,s)}function i3(e,t,n){if(g9(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 Bv(e.children,t,n)}return Array.isArray(e)?Bv(e,t,n):""}function Bv(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=i3(e[s],t,n);return a.join("")}function g9(e){return!!(e&&typeof e=="object")}const qv=document.createElement("i");function Hh(e){const t="&"+e+";";qv.innerHTML=t;const n=qv.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 o=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);o<a.length;)c=a.slice(o,o+1e4),c.unshift(t,0),e.splice(...c),o+=1e4,t+=1e4}function Xr(e,t){return e.length>0?(Dr(e,e.length,0,t),e):t}const Uv={}.hasOwnProperty;function s3(e){const t={};let n=-1;for(;++n<e.length;)b9(t,e[n]);return t}function b9(e,t){let n;for(n in t){const s=(Uv.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let c;if(o)for(c in o){Uv.call(s,c)||(s[c]=[]);const d=o[c];v9(s[c],Array.isArray(d)?d:d?[d]:[])}}}function v9(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 l3(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 or=_i(/[A-Za-z]/),tr=_i(/[\dA-Za-z]/),y9=_i(/[#-'*+\--9=?A-Z^-~]/);function yu(e){return e!==null&&(e<32||e===127)}const Zm=_i(/\d/),x9=_i(/[\dA-Fa-f]/),w9=_i(/[!-/:-@[-`{-~]/);function Ye(e){return e!==null&&e<-2}function rn(e){return e!==null&&(e<0||e===32)}function At(e){return e===-2||e===-1||e===32}const Fu=_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 ll(e){const t=[];let n=-1,a=0,s=0;for(;++n<e.length;){const o=e.charCodeAt(n);let c="";if(o===37&&tr(e.charCodeAt(n+1))&&tr(e.charCodeAt(n+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const d=e.charCodeAt(n+1);o<56320&&d>56319&&d<57344?(c=String.fromCharCode(o,d),s=1):c="�"}else c=String.fromCharCode(o);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 Et(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(m){return At(m)?(e.enter(n),d(m)):t(m)}function d(m){return At(m)&&o++<s?(e.consume(m),d):(e.exit(n),t(m))}}const S9={tokenize:k9};function k9(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Et(e,t,"linePrefix")}function s(d){return e.enter("paragraph"),o(d)}function o(d){const m=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=m),n=m,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Ye(d)?(e.consume(d),e.exit("chunkText"),o):(e.consume(d),c)}}const E9={tokenize:T9},Hv={tokenize:N9};function T9(e){const t=this,n=[];let a=0,s,o,c;return d;function d(O){if(a<n.length){const X=n[a];return t.containerState=X[1],e.attempt(X[0].continuation,m,h)(O)}return h(O)}function m(O){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&I();const X=t.events.length;let q=X,A;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){A=t.events[q][1].end;break}C(a);let F=X;for(;F<t.events.length;)t.events[F][1].end={...A},F++;return Dr(t.events,q+1,0,t.events.slice(X)),t.events.length=F,h(O)}return d(O)}function h(O){if(a===n.length){if(!s)return x(O);if(s.currentConstruct&&s.currentConstruct.concrete)return E(O);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Hv,p,b)(O)}function p(O){return s&&I(),C(a),x(O)}function b(O){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,E(O)}function x(O){return t.containerState={},e.attempt(Hv,y,E)(O)}function y(O){return a++,n.push([t.currentConstruct,t.containerState]),x(O)}function E(O){if(O===null){s&&I(),C(0),e.consume(O);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),N(O)}function N(O){if(O===null){R(e.exit("chunkFlow"),!0),C(0),e.consume(O);return}return Ye(O)?(e.consume(O),R(e.exit("chunkFlow")),a=0,t.interrupt=void 0,d):(e.consume(O),N)}function R(O,X){const q=t.sliceStream(O);if(X&&q.push(null),O.previous=o,o&&(o.next=O),o=O,s.defineSkip(O.start),s.write(q),t.parser.lazy[O.start.line]){let A=s.events.length;for(;A--;)if(s.events[A][1].start.offset<c&&(!s.events[A][1].end||s.events[A][1].end.offset>c))return;const F=t.events.length;let J=F,W,z;for(;J--;)if(t.events[J][0]==="exit"&&t.events[J][1].type==="chunkFlow"){if(W){z=t.events[J][1].end;break}W=!0}for(C(a),A=F;A<t.events.length;)t.events[A][1].end={...z},A++;Dr(t.events,J+1,0,t.events.slice(F)),t.events.length=A}}function C(O){let X=n.length;for(;X-- >O;){const q=n[X];t.containerState=q[1],q[0].exit.call(t,e)}n.length=O}function I(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function N9(e,t,n){return Et(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function tl(e){if(e===null||rn(e)||os(e))return 1;if(Fu(e))return 2}function Pu(e,t,n){const a=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!a.includes(o)&&(t=o(t,n),a.push(o))}return t}const Wm={name:"attention",resolveAll:C9,tokenize:R9};function C9(e,t){let n=-1,a,s,o,c,d,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},x={...e[n][1].start};Fv(b,-m),Fv(x,m),c={type:m>1?"strongSequence":"emphasisSequence",start:b,end:{...e[a][1].end}},d={type:m>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},o={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:{...d.end}},e[a][1].end={...c.start},e[n][1].start={...d.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",o,t]]),h=Xr(h,Pu(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),h=Xr(h,[["exit",o,t],["enter",d,t],["exit",d,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 R9(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=tl(a);let o;return c;function c(m){return o=m,e.enter("attentionSequence"),d(m)}function d(m){if(m===o)return e.consume(m),d;const h=e.exit("attentionSequence"),p=tl(m),b=!p||p===2&&s||n.includes(m),x=!s||s===2&&p||n.includes(a);return h._open=!!(o===42?b:b&&(s||!x)),h._close=!!(o===42?x:x&&(p||!b)),t(m)}}function Fv(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const A9={name:"autolink",tokenize:_9};function _9(e,t,n){let a=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(y){return or(y)?(e.consume(y),c):y===64?n(y):h(y)}function c(y){return y===43||y===45||y===46||tr(y)?(a=1,d(y)):h(y)}function d(y){return y===58?(e.consume(y),a=0,m):(y===43||y===45||y===46||tr(y))&&a++<32?(e.consume(y),d):(a=0,h(y))}function m(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||yu(y)?n(y):(e.consume(y),m)}function h(y){return y===64?(e.consume(y),p):y9(y)?(e.consume(y),h):n(y)}function p(y){return tr(y)?b(y):n(y)}function b(y){return y===46?(e.consume(y),a=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):x(y)}function x(y){if((y===45||tr(y))&&a++<63){const E=y===45?x:b;return e.consume(y),E}return n(y)}}const Ao={partial:!0,tokenize:I9};function I9(e,t,n){return a;function a(o){return At(o)?Et(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||Ye(o)?t(o):n(o)}}const o3={continuation:{tokenize:O9},exit:D9,name:"blockQuote",tokenize:M9};function M9(e,t,n){const a=this;return s;function s(c){if(c===62){const d=a.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return n(c)}function o(c){return At(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function O9(e,t,n){const a=this;return s;function s(c){return At(c)?Et(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(o3,t,n)(c)}}function D9(e){e.exit("blockQuote")}const c3={name:"characterEscape",tokenize:j9};function j9(e,t,n){return a;function a(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return w9(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const u3={name:"characterReference",tokenize:L9};function L9(e,t,n){const a=this;let s=0,o,c;return d;function d(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"),o=31,c=tr,p(b))}function h(b){return b===88||b===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(b),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=x9,p):(e.enter("characterReferenceValue"),o=7,c=Zm,p(b))}function p(b){if(b===59&&s){const x=e.exit("characterReferenceValue");return c===tr&&!Hh(a.sliceSerialize(x))?n(b):(e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(b)&&s++<o?(e.consume(b),p):n(b)}}const Pv={partial:!0,tokenize:B9},$v={concrete:!0,name:"codeFenced",tokenize:z9};function z9(e,t,n){const a=this,s={partial:!0,tokenize:q};let o=0,c=0,d;return m;function m(A){return h(A)}function h(A){const F=a.events[a.events.length-1];return o=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,d=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(A)}function p(A){return A===d?(c++,e.consume(A),p):c<3?n(A):(e.exit("codeFencedFenceSequence"),At(A)?Et(e,b,"whitespace")(A):b(A))}function b(A){return A===null||Ye(A)?(e.exit("codeFencedFence"),a.interrupt?t(A):e.check(Pv,N,X)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(A))}function x(A){return A===null||Ye(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),b(A)):At(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Et(e,y,"whitespace")(A)):A===96&&A===d?n(A):(e.consume(A),x)}function y(A){return A===null||Ye(A)?b(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(A))}function E(A){return A===null||Ye(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),b(A)):A===96&&A===d?n(A):(e.consume(A),E)}function N(A){return e.attempt(s,X,R)(A)}function R(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),C}function C(A){return o>0&&At(A)?Et(e,I,"linePrefix",o+1)(A):I(A)}function I(A){return A===null||Ye(A)?e.check(Pv,N,X)(A):(e.enter("codeFlowValue"),O(A))}function O(A){return A===null||Ye(A)?(e.exit("codeFlowValue"),I(A)):(e.consume(A),O)}function X(A){return e.exit("codeFenced"),t(A)}function q(A,F,J){let W=0;return z;function z(K){return A.enter("lineEnding"),A.consume(K),A.exit("lineEnding"),U}function U(K){return A.enter("codeFencedFence"),At(K)?Et(A,H,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):H(K)}function H(K){return K===d?(A.enter("codeFencedFenceSequence"),te(K)):J(K)}function te(K){return K===d?(W++,A.consume(K),te):W>=c?(A.exit("codeFencedFenceSequence"),At(K)?Et(A,G,"whitespace")(K):G(K)):J(K)}function G(K){return K===null||Ye(K)?(A.exit("codeFencedFence"),F(K)):J(K)}}}function B9(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"),o)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}const wf={name:"codeIndented",tokenize:U9},q9={partial:!0,tokenize:H9};function U9(e,t,n){const a=this;return s;function s(h){return e.enter("codeIndented"),Et(e,o,"linePrefix",5)(h)}function o(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):Ye(h)?e.attempt(q9,c,m)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||Ye(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),d)}function m(h){return e.exit("codeIndented"),t(h)}}function H9(e,t,n){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?n(c):Ye(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):Et(e,o,"linePrefix",5)(c)}function o(c){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):Ye(c)?s(c):n(c)}}const F9={name:"codeText",previous:$9,resolve:P9,tokenize:G9};function P9(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 $9(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function G9(e,t,n){let a=0,s,o;return c;function c(b){return e.enter("codeText"),e.enter("codeTextSequence"),d(b)}function d(b){return b===96?(e.consume(b),a++,d):(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?(o=e.enter("codeTextSequence"),s=0,p(b)):Ye(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||Ye(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)):(o.type="codeTextData",h(b))}}class K9{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 o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&uo(this.left,a),o.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),uo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),uo(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);uo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);uo(this.left,n.reverse())}}}function uo(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 d3(e){const t={};let n=-1,a,s,o,c,d,m,h;const p=new K9(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,o=0,o<m.length&&m[o][1].type==="lineEndingBlank"&&(o+=2),o<m.length&&m[o][1].type==="content"))for(;++o<m.length&&m[o][1].type!=="content";)m[o][1].type==="chunkText"&&(m[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,V9(p,n)),n=t[n],h=!0);else if(a[1]._container){for(o=n,s=void 0;o--;)if(c=p.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(a[1].end={...p.get(s)[1].start},d=p.slice(s,n),d.unshift(a),p.splice(s,n-s+1,d))}}return Dr(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function V9(e,t){const n=e.get(t)[1],a=e.get(t)[2];let s=t-1;const o=[];let c=n._tokenizer;c||(c=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,m=[],h={};let p,b,x=-1,y=n,E=0,N=0;const R=[N];for(;y;){for(;e.get(++s)[1]!==y;);o.push(s),y._tokenizer||(p=a.sliceStream(y),y.next||p.push(null),b&&c.defineSkip(y.start),y._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(p),y._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),b=y,y=y.next}for(y=n;++x<d.length;)d[x][0]==="exit"&&d[x-1][0]==="enter"&&d[x][1].type===d[x-1][1].type&&d[x][1].start.line!==d[x][1].end.line&&(N=x+1,R.push(N),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(c.events=[],y?(y._tokenizer=void 0,y.previous=void 0):R.pop(),x=R.length;x--;){const C=d.slice(R[x],R[x+1]),I=o.pop();m.push([I,I+C.length-1]),e.splice(I,2,C)}for(m.reverse(),x=-1;++x<m.length;)h[E+m[x][0]]=E+m[x][1],E+=m[x][1]-m[x][0]-1;return h}const Y9={resolve:Z9,tokenize:W9},X9={partial:!0,tokenize:Q9};function Z9(e){return d3(e),e}function W9(e,t){let n;return a;function a(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(d)}function s(d){return d===null?o(d):Ye(d)?e.check(X9,c,o)(d):(e.consume(d),s)}function o(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function c(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function Q9(e,t,n){const a=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Et(e,o,"linePrefix")}function o(c){if(c===null||Ye(c))return n(c);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,n,t)(c)}}function f3(e,t,n,a,s,o,c,d,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(o),e.consume(C),e.exit(o),x):C===null||C===32||C===41||yu(C)?n(C):(e.enter(a),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),N(C))}function x(C){return C===62?(e.enter(o),e.consume(C),e.exit(o),e.exit(s),e.exit(a),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),y(C))}function y(C){return C===62?(e.exit("chunkString"),e.exit(d),x(C)):C===null||C===60||Ye(C)?n(C):(e.consume(C),C===92?E:y)}function E(C){return C===60||C===62||C===92?(e.consume(C),y):y(C)}function N(C){return!p&&(C===null||C===41||rn(C))?(e.exit("chunkString"),e.exit(d),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||yu(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 m3(e,t,n,a,s,o){const c=this;let d=0,m;return h;function h(y){return e.enter(a),e.enter(s),e.consume(y),e.exit(s),e.enter(o),p}function p(y){return d>999||y===null||y===91||y===93&&!m||y===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?n(y):y===93?(e.exit(o),e.enter(s),e.consume(y),e.exit(s),e.exit(a),t):Ye(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),b(y))}function b(y){return y===null||y===91||y===93||Ye(y)||d++>999?(e.exit("chunkString"),p(y)):(e.consume(y),m||(m=!At(y)),y===92?x:b)}function x(y){return y===91||y===92||y===93?(e.consume(y),d++,b):b(y)}}function h3(e,t,n,a,s,o){let c;return d;function d(x){return x===34||x===39||x===40?(e.enter(a),e.enter(s),e.consume(x),e.exit(s),c=x===40?41:x,m):n(x)}function m(x){return x===c?(e.enter(s),e.consume(x),e.exit(s),e.exit(a),t):(e.enter(o),h(x))}function h(x){return x===c?(e.exit(o),m(c)):x===null?n(x):Ye(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Et(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===c||x===null||Ye(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?b:p)}function b(x){return x===c||x===92?(e.consume(x),p):p(x)}}function go(e,t){let n;return a;function a(s){return Ye(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):At(s)?Et(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const J9={name:"definition",tokenize:tS},eS={partial:!0,tokenize:nS};function tS(e,t,n){const a=this;let s;return o;function o(y){return e.enter("definition"),c(y)}function c(y){return m3.call(a,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function d(y){return s=na(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),m):n(y)}function m(y){return rn(y)?go(e,h)(y):h(y)}function h(y){return f3(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(eS,b,b)(y)}function b(y){return At(y)?Et(e,x,"whitespace")(y):x(y)}function x(y){return y===null||Ye(y)?(e.exit("definition"),a.parser.defined.push(s),t(y)):n(y)}}function nS(e,t,n){return a;function a(d){return rn(d)?go(e,s)(d):n(d)}function s(d){return h3(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function o(d){return At(d)?Et(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Ye(d)?t(d):n(d)}}const rS={name:"hardBreakEscape",tokenize:aS};function aS(e,t,n){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return Ye(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const iS={name:"headingAtx",resolve:sS,tokenize:lS};function sS(e,t){let n=e.length-2,a=3,s,o;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},o={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},Dr(e,a,n-a+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function lS(e,t,n){let a=0;return s;function s(p){return e.enter("atxHeading"),o(p)}function o(p){return e.enter("atxHeadingSequence"),c(p)}function c(p){return p===35&&a++<6?(e.consume(p),c):p===null||rn(p)?(e.exit("atxHeadingSequence"),d(p)):n(p)}function d(p){return p===35?(e.enter("atxHeadingSequence"),m(p)):p===null||Ye(p)?(e.exit("atxHeading"),t(p)):At(p)?Et(e,d,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function m(p){return p===35?(e.consume(p),m):(e.exit("atxHeadingSequence"),d(p))}function h(p){return p===null||p===35||rn(p)?(e.exit("atxHeadingText"),d(p)):(e.consume(p),h)}}const oS=["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"],Gv=["pre","script","style","textarea"],cS={concrete:!0,name:"htmlFlow",resolveTo:fS,tokenize:mS},uS={partial:!0,tokenize:pS},dS={partial:!0,tokenize:hS};function fS(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 mS(e,t,n){const a=this;let s,o,c,d,m;return h;function h(_){return p(_)}function p(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),b}function b(_){return _===33?(e.consume(_),x):_===47?(e.consume(_),o=!0,N):_===63?(e.consume(_),s=3,a.interrupt?t:j):or(_)?(e.consume(_),c=String.fromCharCode(_),R):n(_)}function x(_){return _===45?(e.consume(_),s=2,y):_===91?(e.consume(_),s=5,d=0,E):or(_)?(e.consume(_),s=4,a.interrupt?t:j):n(_)}function y(_){return _===45?(e.consume(_),a.interrupt?t:j):n(_)}function E(_){const ne="CDATA[";return _===ne.charCodeAt(d++)?(e.consume(_),d===ne.length?a.interrupt?t:H:E):n(_)}function N(_){return or(_)?(e.consume(_),c=String.fromCharCode(_),R):n(_)}function R(_){if(_===null||_===47||_===62||rn(_)){const ne=_===47,de=c.toLowerCase();return!ne&&!o&&Gv.includes(de)?(s=1,a.interrupt?t(_):H(_)):oS.includes(c.toLowerCase())?(s=6,ne?(e.consume(_),C):a.interrupt?t(_):H(_)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(_):o?I(_):O(_))}return _===45||tr(_)?(e.consume(_),c+=String.fromCharCode(_),R):n(_)}function C(_){return _===62?(e.consume(_),a.interrupt?t:H):n(_)}function I(_){return At(_)?(e.consume(_),I):z(_)}function O(_){return _===47?(e.consume(_),z):_===58||_===95||or(_)?(e.consume(_),X):At(_)?(e.consume(_),O):z(_)}function X(_){return _===45||_===46||_===58||_===95||tr(_)?(e.consume(_),X):q(_)}function q(_){return _===61?(e.consume(_),A):At(_)?(e.consume(_),q):O(_)}function A(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),m=_,F):At(_)?(e.consume(_),A):J(_)}function F(_){return _===m?(e.consume(_),m=null,W):_===null||Ye(_)?n(_):(e.consume(_),F)}function J(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||rn(_)?q(_):(e.consume(_),J)}function W(_){return _===47||_===62||At(_)?O(_):n(_)}function z(_){return _===62?(e.consume(_),U):n(_)}function U(_){return _===null||Ye(_)?H(_):At(_)?(e.consume(_),U):n(_)}function H(_){return _===45&&s===2?(e.consume(_),$):_===60&&s===1?(e.consume(_),ee):_===62&&s===4?(e.consume(_),D):_===63&&s===3?(e.consume(_),j):_===93&&s===5?(e.consume(_),ce):Ye(_)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(uS,P,te)(_)):_===null||Ye(_)?(e.exit("htmlFlowData"),te(_)):(e.consume(_),H)}function te(_){return e.check(dS,G,P)(_)}function G(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),K}function K(_){return _===null||Ye(_)?te(_):(e.enter("htmlFlowData"),H(_))}function $(_){return _===45?(e.consume(_),j):H(_)}function ee(_){return _===47?(e.consume(_),c="",oe):H(_)}function oe(_){if(_===62){const ne=c.toLowerCase();return Gv.includes(ne)?(e.consume(_),D):H(_)}return or(_)&&c.length<8?(e.consume(_),c+=String.fromCharCode(_),oe):H(_)}function ce(_){return _===93?(e.consume(_),j):H(_)}function j(_){return _===62?(e.consume(_),D):_===45&&s===2?(e.consume(_),j):H(_)}function D(_){return _===null||Ye(_)?(e.exit("htmlFlowData"),P(_)):(e.consume(_),D)}function P(_){return e.exit("htmlFlow"),t(_)}}function hS(e,t,n){const a=this;return s;function s(c){return Ye(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):n(c)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function pS(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Ao,t,n)}}const gS={name:"htmlText",tokenize:bS};function bS(e,t,n){const a=this;let s,o,c;return d;function d(j){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(j),m}function m(j){return j===33?(e.consume(j),h):j===47?(e.consume(j),q):j===63?(e.consume(j),O):or(j)?(e.consume(j),J):n(j)}function h(j){return j===45?(e.consume(j),p):j===91?(e.consume(j),o=0,E):or(j)?(e.consume(j),I):n(j)}function p(j){return j===45?(e.consume(j),y):n(j)}function b(j){return j===null?n(j):j===45?(e.consume(j),x):Ye(j)?(c=b,ee(j)):(e.consume(j),b)}function x(j){return j===45?(e.consume(j),y):b(j)}function y(j){return j===62?$(j):j===45?x(j):b(j)}function E(j){const D="CDATA[";return j===D.charCodeAt(o++)?(e.consume(j),o===D.length?N:E):n(j)}function N(j){return j===null?n(j):j===93?(e.consume(j),R):Ye(j)?(c=N,ee(j)):(e.consume(j),N)}function R(j){return j===93?(e.consume(j),C):N(j)}function C(j){return j===62?$(j):j===93?(e.consume(j),C):N(j)}function I(j){return j===null||j===62?$(j):Ye(j)?(c=I,ee(j)):(e.consume(j),I)}function O(j){return j===null?n(j):j===63?(e.consume(j),X):Ye(j)?(c=O,ee(j)):(e.consume(j),O)}function X(j){return j===62?$(j):O(j)}function q(j){return or(j)?(e.consume(j),A):n(j)}function A(j){return j===45||tr(j)?(e.consume(j),A):F(j)}function F(j){return Ye(j)?(c=F,ee(j)):At(j)?(e.consume(j),F):$(j)}function J(j){return j===45||tr(j)?(e.consume(j),J):j===47||j===62||rn(j)?W(j):n(j)}function W(j){return j===47?(e.consume(j),$):j===58||j===95||or(j)?(e.consume(j),z):Ye(j)?(c=W,ee(j)):At(j)?(e.consume(j),W):$(j)}function z(j){return j===45||j===46||j===58||j===95||tr(j)?(e.consume(j),z):U(j)}function U(j){return j===61?(e.consume(j),H):Ye(j)?(c=U,ee(j)):At(j)?(e.consume(j),U):W(j)}function H(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),s=j,te):Ye(j)?(c=H,ee(j)):At(j)?(e.consume(j),H):(e.consume(j),G)}function te(j){return j===s?(e.consume(j),s=void 0,K):j===null?n(j):Ye(j)?(c=te,ee(j)):(e.consume(j),te)}function G(j){return j===null||j===34||j===39||j===60||j===61||j===96?n(j):j===47||j===62||rn(j)?W(j):(e.consume(j),G)}function K(j){return j===47||j===62||rn(j)?W(j):n(j)}function $(j){return j===62?(e.consume(j),e.exit("htmlTextData"),e.exit("htmlText"),t):n(j)}function ee(j){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),oe}function oe(j){return At(j)?Et(e,ce,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):ce(j)}function ce(j){return e.enter("htmlTextData"),c(j)}}const Fh={name:"labelEnd",resolveAll:wS,resolveTo:SS,tokenize:kS},vS={tokenize:ES},yS={tokenize:TS},xS={tokenize:NS};function wS(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 SS(e,t){let n=e.length,a=0,s,o,c,d;for(;n--;)if(s=e[n][1],o){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&&(o=n,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(c=n);const m={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},p={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",m,t],["enter",h,t]],d=Xr(d,e.slice(o+1,o+a+3)),d=Xr(d,[["enter",p,t]]),d=Xr(d,Pu(t.parser.constructs.insideSpan.null,e.slice(o+a+4,c-3),t)),d=Xr(d,[["exit",p,t],e[c-2],e[c-1],["exit",h,t]]),d=Xr(d,e.slice(c+1)),d=Xr(d,[["exit",m,t]]),Dr(e,o,e.length,d),e}function kS(e,t,n){const a=this;let s=a.events.length,o,c;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){o=a.events[s][1];break}return d;function d(x){return o?o._inactive?b(x):(c=a.parser.defined.includes(na(a.sliceSerialize({start:o.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),m):n(x)}function m(x){return x===40?e.attempt(vS,p,c?p:b)(x):x===91?e.attempt(yS,p,c?h:b)(x):c?p(x):b(x)}function h(x){return e.attempt(xS,p,b)(x)}function p(x){return t(x)}function b(x){return o._balanced=!0,n(x)}}function ES(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 rn(b)?go(e,o)(b):o(b)}function o(b){return b===41?p(b):f3(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function c(b){return rn(b)?go(e,m)(b):p(b)}function d(b){return n(b)}function m(b){return b===34||b===39||b===40?h3(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):p(b)}function h(b){return rn(b)?go(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 TS(e,t,n){const a=this;return s;function s(d){return m3.call(a,e,o,c,"reference","referenceMarker","referenceString")(d)}function o(d){return a.parser.defined.includes(na(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function c(d){return n(d)}}function NS(e,t,n){return a;function a(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const CS={name:"labelStartImage",resolveAll:Fh.resolveAll,tokenize:RS};function RS(e,t,n){const a=this;return s;function s(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),o}function o(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),c):n(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):t(d)}}const AS={name:"labelStartLink",resolveAll:Fh.resolveAll,tokenize:_S};function _S(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"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(c):t(c)}}const Sf={name:"lineEnding",tokenize:IS};function IS(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Et(e,t,"linePrefix")}}const fu={name:"thematicBreak",tokenize:MS};function MS(e,t,n){let a=0,s;return o;function o(h){return e.enter("thematicBreak"),c(h)}function c(h){return s=h,d(h)}function d(h){return h===s?(e.enter("thematicBreakSequence"),m(h)):a>=3&&(h===null||Ye(h))?(e.exit("thematicBreak"),t(h)):n(h)}function m(h){return h===s?(e.consume(h),a++,m):(e.exit("thematicBreakSequence"),At(h)?Et(e,d,"whitespace")(h):d(h))}}const xr={continuation:{tokenize:LS},exit:BS,name:"list",tokenize:jS},OS={partial:!0,tokenize:qS},DS={partial:!0,tokenize:zS};function jS(e,t,n){const a=this,s=a.events[a.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return d;function d(y){const E=a.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!a.containerState.marker||y===a.containerState.marker:Zm(y)){if(a.containerState.type||(a.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(fu,n,h)(y):h(y);if(!a.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(y)}return n(y)}function m(y){return Zm(y)&&++c<10?(e.consume(y),m):(!a.interrupt||c<2)&&(a.containerState.marker?y===a.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),h(y)):n(y)}function h(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||y,e.check(Ao,a.interrupt?n:p,e.attempt(OS,x,b))}function p(y){return a.containerState.initialBlankLine=!0,o++,x(y)}function b(y){return At(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),x):n(y)}function x(y){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function LS(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(Ao,s,o);function s(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Et(e,t,"listItemIndent",a.containerState.size+1)(d)}function o(d){return a.containerState.furtherBlankLines||!At(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(DS,t,c)(d))}function c(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,Et(e,e.attempt(xr,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function zS(e,t,n){const a=this;return Et(e,s,"listItemIndent",a.containerState.size+1);function s(o){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(o):n(o)}}function BS(e){e.exit(this.containerState.type)}function qS(e,t,n){const a=this;return Et(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const c=a.events[a.events.length-1];return!At(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Kv={name:"setextUnderline",resolveTo:US,tokenize:HS};function US(e,t){let n=e.length,a,s,o;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),!o&&e[n][1].type==="definition"&&(o=n);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",c,t]),e.splice(o+1,0,["exit",e[a][1],t]),e[a][1].end={...e[o][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function HS(e,t,n){const a=this;let s;return o;function o(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"),d(h)}function d(h){return h===s?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),At(h)?Et(e,m,"lineSuffix")(h):m(h))}function m(h){return h===null||Ye(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const FS={tokenize:PS};function PS(e){const t=this,n=e.attempt(Ao,a,e.attempt(this.parser.constructs.flowInitial,s,Et(e,e.attempt(this.parser.constructs.flow,s,e.attempt(Y9,s)),"linePrefix")));return n;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const $S={resolveAll:g3()},GS=p3("string"),KS=p3("text");function p3(e){return{resolveAll:g3(e==="text"?VS:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],o=n.attempt(s,c,d);return c;function c(p){return h(p)?o(p):d(p)}function d(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"),o(p)):(n.consume(p),m)}function h(p){if(p===null)return!0;const b=s[p];let x=-1;if(b)for(;++x<b.length;){const y=b[x];if(!y.previous||y.previous.call(a,a.previous))return!0}return!1}}}function g3(e){return t;function t(n,a){let s=-1,o;for(;++s<=n.length;)o===void 0?n[s]&&n[s][1].type==="data"&&(o=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==o+2&&(n[o][1].end=n[s-1][1].end,n.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(n,a):n}}function VS(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 o=s.length,c=-1,d=0,m;for(;o--;){const h=s[o];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(h===-2)m=!0,d++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const h={type:n===e.length||m||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:a.start._bufferIndex+c,_index:a.start._index+o,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},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 YS={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:o3},XS={91:J9},ZS={[-2]:wf,[-1]:wf,32:wf},WS={35:iS,42:fu,45:[Kv,fu],60:cS,61:Kv,95:fu,96:$v,126:$v},QS={38:u3,92:c3},JS={[-5]:Sf,[-4]:Sf,[-3]:Sf,33:CS,38:u3,42:Wm,60:[A9,gS],91:AS,92:[rS,c3],93:Fh,95:Wm,96:F9},ek={null:[Wm,$S]},tk={null:[42,95]},nk={null:[]},rk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:tk,contentInitial:XS,disable:nk,document:YS,flow:WS,flowInitial:ZS,insideSpan:ek,string:QS,text:JS},Symbol.toStringTag,{value:"Module"}));function ak(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={},o=[];let c=[],d=[];const m={attempt:F(q),check:F(A),consume:I,enter:O,exit:X,interrupt:F(A,{interrupt:!0})},h={code:null,containerState:{},defineSkip:N,events:[],now:E,parser:e,previous:null,sliceSerialize:x,sliceStream:y,write:b};let p=t.tokenize.call(h,m);return t.resolveAll&&o.push(t),h;function b(U){return c=Xr(c,U),R(),c[c.length-1]!==null?[]:(J(t,0),h.events=Pu(o,h.events,h),h.events)}function x(U,H){return sk(y(U),H)}function y(U){return ik(c,U)}function E(){const{_bufferIndex:U,_index:H,line:te,column:G,offset:K}=a;return{_bufferIndex:U,_index:H,line:te,column:G,offset:K}}function N(U){s[U.line]=U.column,z()}function R(){let U;for(;a._index<c.length;){const H=c[a._index];if(typeof H=="string")for(U=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===U&&a._bufferIndex<H.length;)C(H.charCodeAt(a._bufferIndex));else C(H)}}function C(U){p=p(U)}function I(U){Ye(U)?(a.line++,a.column=1,a.offset+=U===-3?2:1,z()):U!==-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=U}function O(U,H){const te=H||{};return te.type=U,te.start=E(),h.events.push(["enter",te,h]),d.push(te),te}function X(U){const H=d.pop();return H.end=E(),h.events.push(["exit",H,h]),H}function q(U,H){J(U,H.from)}function A(U,H){H.restore()}function F(U,H){return te;function te(G,K,$){let ee,oe,ce,j;return Array.isArray(G)?P(G):"tokenize"in G?P([G]):D(G);function D(se){return ae;function ae(we){const be=we!==null&&se[we],ze=we!==null&&se.null,Me=[...Array.isArray(be)?be:be?[be]:[],...Array.isArray(ze)?ze:ze?[ze]:[]];return P(Me)(we)}}function P(se){return ee=se,oe=0,se.length===0?$:_(se[oe])}function _(se){return ae;function ae(we){return j=W(),ce=se,se.partial||(h.currentConstruct=se),se.name&&h.parser.constructs.disable.null.includes(se.name)?de():se.tokenize.call(H?Object.assign(Object.create(h),H):h,m,ne,de)(we)}}function ne(se){return U(ce,j),K}function de(se){return j.restore(),++oe<ee.length?_(ee[oe]):$}}}function J(U,H){U.resolveAll&&!o.includes(U)&&o.push(U),U.resolve&&Dr(h.events,H,h.events.length-H,U.resolve(h.events.slice(H),h)),U.resolveTo&&(h.events=U.resolveTo(h.events,h))}function W(){const U=E(),H=h.previous,te=h.currentConstruct,G=h.events.length,K=Array.from(d);return{from:G,restore:$};function $(){a=U,h.previous=H,h.currentConstruct=te,h.events.length=G,d=K,z()}}function z(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function ik(e,t){const n=t.start._index,a=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;let c;if(n===s)c=[e[n].slice(a,o)];else{if(c=e.slice(n,s),a>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(a):c.shift()}o>0&&c.push(e[s].slice(0,o))}return c}function sk(e,t){let n=-1;const a=[];let s;for(;++n<e.length;){const o=e[n];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
|
|
13
|
+
`;break}case-3:{c=`\r
|
|
14
|
+
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&s)continue;c=" ";break}default:c=String.fromCharCode(o)}s=o===-2,a.push(c)}return a.join("")}function lk(e){const a={constructs:s3([rk,...(e||{}).extensions||[]]),content:s(S9),defined:[],document:s(E9),flow:s(FS),lazy:{},string:s(GS),text:s(KS)};return a;function s(o){return c;function c(d){return ak(a,o,d)}}}function ok(e){for(;!d3(e););return e}const Vv=/[\0\t\n\r]/g;function ck(){let e=1,t="",n=!0,a;return s;function s(o,c,d){const m=[];let h,p,b,x,y;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),b=0,t="",n&&(o.charCodeAt(0)===65279&&b++,n=void 0);b<o.length;){if(Vv.lastIndex=b,h=Vv.exec(o),x=h&&h.index!==void 0?h.index:o.length,y=o.charCodeAt(x),!h){t=o.slice(b);break}if(y===10&&b===x&&a)m.push(-3),a=void 0;else switch(a&&(m.push(-5),a=void 0),b<x&&(m.push(o.slice(b,x)),e+=x-b),y){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=x+1}return d&&(a&&m.push(-5),t&&m.push(t),m.push(null)),m}}const uk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function dk(e){return e.replace(uk,fk)}function fk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return l3(n.slice(o?2:1),o?16:10)}return Hh(n)||e}const b3={}.hasOwnProperty;function mk(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),hk(n)(ok(lk(n).document().write(ck()(e,t,!0))))}function hk(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(St),autolinkProtocol:W,autolinkEmail:W,atxHeading:o(mt),blockQuote:o(ze),characterEscape:W,characterReference:W,codeFenced:o(Me),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Me,c),codeText:o(Se,c),codeTextData:W,data:W,codeFlowValue:W,definition:o($e),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(ct),hardBreakEscape:o(Ze),hardBreakTrailing:o(Ze),htmlFlow:o(lt,c),htmlFlowData:W,htmlText:o(lt,c),htmlTextData:W,image:o(Tt),label:c,link:o(St),listItem:o(Je),listItemValue:x,listOrdered:o(wt,b),listUnordered:o(wt),paragraph:o(Nt),reference:_,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(mt),strong:o(qt),thematicBreak:o(Xt)},exit:{atxHeading:m(),atxHeadingSequence:q,autolink:m(),autolinkEmail:be,autolinkProtocol:we,blockQuote:m(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:se,characterReference:ae,codeFenced:m(R),codeFencedFence:N,codeFencedFenceInfo:y,codeFencedFenceMeta:E,codeFlowValue:z,codeIndented:m(C),codeText:m(K),codeTextData:z,data:z,definition:m(),definitionDestinationString:X,definitionLabelString:I,definitionTitleString:O,emphasis:m(),hardBreakEscape:m(H),hardBreakTrailing:m(H),htmlFlow:m(te),htmlFlowData:z,htmlText:m(G),htmlTextData:z,image:m(ee),label:ce,labelText:oe,lineEnding:U,link:m($),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:ne,resourceDestinationString:j,resourceTitleString:D,resource:P,setextHeading:m(J),setextHeadingLineSequence:F,setextHeadingText:A,strong:m(),thematicBreak:m()}};v3(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(he){let ve={type:"root",children:[]};const qe={stack:[ve],tokenStack:[],config:t,enter:d,exit:h,buffer:c,resume:p,data:n},We=[];let nt=-1;for(;++nt<he.length;)if(he[nt][1].type==="listOrdered"||he[nt][1].type==="listUnordered")if(he[nt][0]==="enter")We.push(nt);else{const $t=We.pop();nt=s(he,$t,nt)}for(nt=-1;++nt<he.length;){const $t=t[he[nt][0]];b3.call($t,he[nt][1].type)&&$t[he[nt][1].type].call(Object.assign({sliceSerialize:he[nt][2].sliceSerialize},qe),he[nt][1])}if(qe.tokenStack.length>0){const $t=qe.tokenStack[qe.tokenStack.length-1];($t[1]||Yv).call(qe,void 0,$t[0])}for(ve.position={start:xi(he.length>0?he[0][1].start:{line:1,column:1,offset:0}),end:xi(he.length>0?he[he.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt<t.transforms.length;)ve=t.transforms[nt](ve)||ve;return ve}function s(he,ve,qe){let We=ve-1,nt=-1,$t=!1,Zt,Pt,rt,on;for(;++We<=qe;){const yt=he[We];switch(yt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{yt[0]==="enter"?nt++:nt--,on=void 0;break}case"lineEndingBlank":{yt[0]==="enter"&&(Zt&&!on&&!nt&&!rt&&(rt=We),on=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:on=void 0}if(!nt&&yt[0]==="enter"&&yt[1].type==="listItemPrefix"||nt===-1&&yt[0]==="exit"&&(yt[1].type==="listUnordered"||yt[1].type==="listOrdered")){if(Zt){let Xn=We;for(Pt=void 0;Xn--;){const Sn=he[Xn];if(Sn[1].type==="lineEnding"||Sn[1].type==="lineEndingBlank"){if(Sn[0]==="exit")continue;Pt&&(he[Pt][1].type="lineEndingBlank",$t=!0),Sn[1].type="lineEnding",Pt=Xn}else if(!(Sn[1].type==="linePrefix"||Sn[1].type==="blockQuotePrefix"||Sn[1].type==="blockQuotePrefixWhitespace"||Sn[1].type==="blockQuoteMarker"||Sn[1].type==="listItemIndent"))break}rt&&(!Pt||rt<Pt)&&(Zt._spread=!0),Zt.end=Object.assign({},Pt?he[Pt][1].start:yt[1].end),he.splice(Pt||We,0,["exit",Zt,yt[2]]),We++,qe++}if(yt[1].type==="listItemPrefix"){const Xn={type:"listItem",_spread:!1,start:Object.assign({},yt[1].start),end:void 0};Zt=Xn,he.splice(We,0,["enter",Xn,yt[2]]),We++,qe++,rt=void 0,on=!0}}}return he[ve][1]._spread=$t,qe}function o(he,ve){return qe;function qe(We){d.call(this,he(We),We),ve&&ve.call(this,We)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(he,ve,qe){this.stack[this.stack.length-1].children.push(he),this.stack.push(he),this.tokenStack.push([ve,qe||void 0]),he.position={start:xi(ve.start),end:void 0}}function m(he){return ve;function ve(qe){he&&he.call(this,qe),h.call(this,qe)}}function h(he,ve){const qe=this.stack.pop(),We=this.tokenStack.pop();if(We)We[0].type!==he.type&&(ve?ve.call(this,he,We[0]):(We[1]||Yv).call(this,he,We[0]));else throw new Error("Cannot close `"+he.type+"` ("+po({start:he.start,end:he.end})+"): it’s not open");qe.position.end=xi(he.end)}function p(){return Uh(this.stack.pop())}function b(){this.data.expectingFirstListItemValue=!0}function x(he){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(he),10),this.data.expectingFirstListItemValue=void 0}}function y(){const he=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=he}function E(){const he=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=he}function N(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function R(){const he=this.resume(),ve=this.stack[this.stack.length-1];ve.value=he.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const he=this.resume(),ve=this.stack[this.stack.length-1];ve.value=he.replace(/(\r?\n|\r)$/g,"")}function I(he){const ve=this.resume(),qe=this.stack[this.stack.length-1];qe.label=ve,qe.identifier=na(this.sliceSerialize(he)).toLowerCase()}function O(){const he=this.resume(),ve=this.stack[this.stack.length-1];ve.title=he}function X(){const he=this.resume(),ve=this.stack[this.stack.length-1];ve.url=he}function q(he){const ve=this.stack[this.stack.length-1];if(!ve.depth){const qe=this.sliceSerialize(he).length;ve.depth=qe}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function F(he){const ve=this.stack[this.stack.length-1];ve.depth=this.sliceSerialize(he).codePointAt(0)===61?1:2}function J(){this.data.setextHeadingSlurpLineEnding=void 0}function W(he){const qe=this.stack[this.stack.length-1].children;let We=qe[qe.length-1];(!We||We.type!=="text")&&(We=Fe(),We.position={start:xi(he.start),end:void 0},qe.push(We)),this.stack.push(We)}function z(he){const ve=this.stack.pop();ve.value+=this.sliceSerialize(he),ve.position.end=xi(he.end)}function U(he){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const qe=ve.children[ve.children.length-1];qe.position.end=xi(he.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ve.type)&&(W.call(this,he),z.call(this,he))}function H(){this.data.atHardBreak=!0}function te(){const he=this.resume(),ve=this.stack[this.stack.length-1];ve.value=he}function G(){const he=this.resume(),ve=this.stack[this.stack.length-1];ve.value=he}function K(){const he=this.resume(),ve=this.stack[this.stack.length-1];ve.value=he}function $(){const he=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";he.type+="Reference",he.referenceType=ve,delete he.url,delete he.title}else delete he.identifier,delete he.label;this.data.referenceType=void 0}function ee(){const he=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";he.type+="Reference",he.referenceType=ve,delete he.url,delete he.title}else delete he.identifier,delete he.label;this.data.referenceType=void 0}function oe(he){const ve=this.sliceSerialize(he),qe=this.stack[this.stack.length-2];qe.label=dk(ve),qe.identifier=na(ve).toLowerCase()}function ce(){const he=this.stack[this.stack.length-1],ve=this.resume(),qe=this.stack[this.stack.length-1];if(this.data.inReference=!0,qe.type==="link"){const We=he.children;qe.children=We}else qe.alt=ve}function j(){const he=this.resume(),ve=this.stack[this.stack.length-1];ve.url=he}function D(){const he=this.resume(),ve=this.stack[this.stack.length-1];ve.title=he}function P(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function ne(he){const ve=this.resume(),qe=this.stack[this.stack.length-1];qe.label=ve,qe.identifier=na(this.sliceSerialize(he)).toLowerCase(),this.data.referenceType="full"}function de(he){this.data.characterReferenceType=he.type}function se(he){const ve=this.sliceSerialize(he),qe=this.data.characterReferenceType;let We;qe?(We=l3(ve,qe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):We=Hh(ve);const nt=this.stack[this.stack.length-1];nt.value+=We}function ae(he){const ve=this.stack.pop();ve.position.end=xi(he.end)}function we(he){z.call(this,he);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(he)}function be(he){z.call(this,he);const ve=this.stack[this.stack.length-1];ve.url="mailto:"+this.sliceSerialize(he)}function ze(){return{type:"blockquote",children:[]}}function Me(){return{type:"code",lang:null,meta:null,value:""}}function Se(){return{type:"inlineCode",value:""}}function $e(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ct(){return{type:"emphasis",children:[]}}function mt(){return{type:"heading",depth:0,children:[]}}function Ze(){return{type:"break"}}function lt(){return{type:"html",value:""}}function Tt(){return{type:"image",title:null,url:"",alt:null}}function St(){return{type:"link",title:null,url:"",children:[]}}function wt(he){return{type:"list",ordered:he.type==="listOrdered",start:null,spread:he._spread,children:[]}}function Je(he){return{type:"listItem",spread:he._spread,checked:null,children:[]}}function Nt(){return{type:"paragraph",children:[]}}function qt(){return{type:"strong",children:[]}}function Fe(){return{type:"text",value:""}}function Xt(){return{type:"thematicBreak"}}}function xi(e){return{line:e.line,column:e.column,offset:e.offset}}function v3(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?v3(e,a):pk(e,a)}}function pk(e,t){let n;for(n in t)if(b3.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 Yv(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+po({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+po({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+po({start:t.start,end:t.end})+") is still open")}function gk(e){const t=this;t.parser=n;function n(a){return mk(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function bk(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 vk(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
15
|
+
`}]}function yk(e,t){const n=t.value?t.value+`
|
|
16
|
+
`:"",a={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function xk(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wk(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sk(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=ll(a.toLowerCase()),o=e.footnoteOrder.indexOf(a);let c,d=e.footnoteCounts.get(a);d===void 0?(d=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=o+1,d+=1,e.footnoteCounts.set(a,d);const m={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(d>1?"-"+d:""),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 kk(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 Ek(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function y3(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),o=s[0];o&&o.type==="text"?o.value="["+o.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 Tk(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return y3(e,t);const s={src:ll(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,o),e.applyData(t,o)}function Nk(e,t){const n={src:ll(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 Ck(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 Rk(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return y3(e,t);const s={href:ll(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Ak(e,t){const n={href:ll(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 _k(e,t,n){const a=e.all(t),s=n?Ik(n):x3(t),o={},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:[]}),o.className=["task-list-item"]}let d=-1;for(;++d<a.length;){const p=a[d];(s||d!==0||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
17
|
+
`}),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:`
|
|
18
|
+
`});const h={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,h),e.applyData(t,h)}function Ik(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=x3(n[a])}return t}function x3(e){const t=e.spread;return t??e.children.length>1}function Mk(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 o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function Ok(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Dk(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function jk(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lk(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)},d=Lh(t.children[1]),m=J2(t.children[t.children.length-1]);d&&m&&(c.position={start:d,end:m}),s.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function zk(e,t,n){const a=n?n.children:void 0,o=(a?a.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,d=c?c.length:t.children.length;let m=-1;const h=[];for(;++m<d;){const b=t.children[m],x={},y=c?c[m]:void 0;y&&(x.align=y);let E={type:"element",tagName:o,properties:x,children:[]};b&&(E.children=e.all(b),e.patch(b,E),E=e.applyData(b,E)),h.push(E)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function Bk(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Xv=9,Zv=32;function qk(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),s=0;const o=[];for(;a;)o.push(Wv(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=n.exec(t);return o.push(Wv(t.slice(s),s>0,!1)),o.join("")}function Wv(e,t,n){let a=0,s=e.length;if(t){let o=e.codePointAt(a);for(;o===Xv||o===Zv;)a++,o=e.codePointAt(a)}if(n){let o=e.codePointAt(s-1);for(;o===Xv||o===Zv;)s--,o=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function Uk(e,t){const n={type:"text",value:qk(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Hk(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Fk={blockquote:bk,break:vk,code:yk,delete:xk,emphasis:wk,footnoteReference:Sk,heading:kk,html:Ek,imageReference:Tk,image:Nk,inlineCode:Ck,linkReference:Rk,link:Ak,listItem:_k,list:Mk,paragraph:Ok,root:Dk,strong:jk,table:Lk,tableCell:Bk,tableRow:zk,text:Uk,thematicBreak:Hk,toml:Wc,yaml:Wc,definition:Wc,footnoteDefinition:Wc};function Wc(){}const w3=-1,$u=0,bo=1,xu=2,Ph=3,$h=4,Gh=5,Kh=6,S3=7,k3=8,E3=typeof self=="object"?self:globalThis,Qv=(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 E3[e](t)},Pk=(e,t)=>{const n=(s,o)=>(e.set(o,s),s),a=s=>{if(e.has(s))return e.get(s);const[o,c]=t[s];switch(o){case $u:case w3:return n(c,s);case bo:{const d=n([],s);for(const m of c)d.push(a(m));return d}case xu:{const d=n({},s);for(const[m,h]of c)d[a(m)]=a(h);return d}case Ph:return n(new Date(c),s);case $h:{const{source:d,flags:m}=c;return n(new RegExp(d,m),s)}case Gh:{const d=n(new Map,s);for(const[m,h]of c)d.set(a(m),a(h));return d}case Kh:{const d=n(new Set,s);for(const m of c)d.add(a(m));return d}case S3:{const{name:d,message:m}=c;return n(typeof E3[d]=="function"?Qv(d,m):new Error(m),s)}case k3: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:d}=new Uint8Array(c);return n(new DataView(d),c)}}return n(Qv(o,c),s)};return a},Jv=e=>Pk(new Map,e)(0),ts="",{toString:$k}={},{keys:Gk}=Object,fo=e=>{const t=typeof e;if(t!=="object"||!e)return[$u,t];const n=$k.call(e).slice(8,-1);switch(n){case"Array":return[bo,ts];case"Object":return[xu,ts];case"Date":return[Ph,ts];case"RegExp":return[$h,ts];case"Map":return[Gh,ts];case"Set":return[Kh,ts];case"DataView":return[bo,n]}return n.includes("Array")?[bo,n]:e instanceof Error?[S3,e.name||"Error"]:[xu,n]},Qc=([e,t])=>e===$u&&(t==="function"||t==="symbol"),Kk=(e,t,n,a)=>{const s=(c,d)=>{const m=a.push(c)-1;return n.set(d,m),m},o=c=>{if(n.has(c))return n.get(c);let[d,m]=fo(c);switch(d){case $u:{let p=c;switch(m){case"bigint":d=k3,p=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);p=null;break;case"undefined":return s([w3],c)}return s([d,p],c)}case bo:{if(m){let x=c;return m==="DataView"?x=new Uint8Array(c.buffer):m==="ArrayBuffer"&&(x=new Uint8Array(c)),s([m,[...x]],c)}const p=[],b=s([d,p],c);for(const x of c)p.push(o(x));return b}case xu:{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 o(c.toJSON());const p=[],b=s([d,p],c);for(const x of Gk(c))(e||!Qc(fo(c[x])))&&p.push([o(x),o(c[x])]);return b}case Ph:return s([d,isNaN(c.getTime())?ts:c.toISOString()],c);case $h:{const{source:p,flags:b}=c;return s([d,{source:p,flags:b}],c)}case Gh:{const p=[],b=s([d,p],c);for(const[x,y]of c)(e||!(Qc(fo(x))||Qc(fo(y))))&&p.push([o(x),o(y)]);return b}case Kh:{const p=[],b=s([d,p],c);for(const x of c)(e||!Qc(fo(x)))&&p.push(o(x));return b}}const{message:h}=c;return s([d,{name:m,message:h}],c)};return o},e4=(e,{json:t,lossy:n}={})=>{const a=[];return Kk(!(t||n),!!t,new Map,a)(e),a},wu=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Jv(e4(e,t)):structuredClone(e):(e,t)=>Jv(e4(e,t));function Vk(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 Yk(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Xk(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Vk,a=e.options.footnoteBackLabel||Yk,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];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(),x=ll(b.toLowerCase());let y=0;const E=[],N=e.footnoteCounts.get(b);for(;N!==void 0&&++y<=N;){E.length>0&&E.push({type:"text",value:" "});let I=typeof n=="string"?n:n(m,y);typeof I=="string"&&(I={type:"text",value:I}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(m,y),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const R=p[p.length-1];if(R&&R.type==="element"&&R.tagName==="p"){const I=R.children[R.children.length-1];I&&I.type==="text"?I.value+=" ":R.children.push({type:"text",value:" "}),R.children.push(...E)}else p.push(...E);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(p,!0)};e.patch(h,C),d.push(C)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...wu(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
19
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
20
|
+
`}]}}const _o=(function(e){if(e==null)return Jk;if(typeof e=="function")return Gu(e);if(typeof e=="object")return Array.isArray(e)?Zk(e):Wk(e);if(typeof e=="string")return Qk(e);throw new Error("Expected function, string, or object as test")});function Zk(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=_o(e[n]);return Gu(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function Wk(e){const t=e;return Gu(n);function n(a){const s=a;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function Qk(e){return Gu(t);function t(n){return n&&n.type===e}}function Gu(e){return t;function t(n,a,s){return!!(eE(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function Jk(){return!0}function eE(e){return e!==null&&typeof e=="object"&&"type"in e}const T3=[],tE=!0,Qm=!1,N3="skip";function Vh(e,t,n,a){let s;typeof t=="function"&&typeof n!="function"?(a=n,n=t):s=t;const o=_o(s),c=a?-1:1;d(e,void 0,[])();function d(m,h,p){const b=m&&typeof m=="object"?m:{};if(typeof b.type=="string"){const y=typeof b.tagName=="string"?b.tagName:typeof b.name=="string"?b.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(m.type+(y?"<"+y+">":""))+")"})}return x;function x(){let y=T3,E,N,R;if((!t||o(m,h,p[p.length-1]||void 0))&&(y=nE(n(m,p)),y[0]===Qm))return y;if("children"in m&&m.children){const C=m;if(C.children&&y[0]!==N3)for(N=(a?C.children.length:-1)+c,R=p.concat(C);N>-1&&N<C.children.length;){const I=C.children[N];if(E=d(I,N,R)(),E[0]===Qm)return E;N=typeof E[1]=="number"?E[1]:N+c}}return y}}}function nE(e){return Array.isArray(e)?e:typeof e=="number"?[tE,e]:e==null?T3:[e]}function Yh(e,t,n,a){let s,o,c;typeof t=="function"&&typeof n!="function"?(o=void 0,c=t,s=n):(o=t,c=n,s=a),Vh(e,o,d,s);function d(m,h){const p=h[h.length-1],b=p?p.children.indexOf(m):void 0;return c(m,b,p)}}const Jm={}.hasOwnProperty,rE={};function aE(e,t){const n=t||rE,a=new Map,s=new Map,o=new Map,c={...Fk,...n.handlers},d={all:h,applyData:sE,definitionById:a,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:c,one:m,options:n,patch:iE,wrap:oE};return Yh(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const b=p.type==="definition"?a:s,x=String(p.identifier).toUpperCase();b.has(x)||b.set(x,p)}}),d;function m(p,b){const x=p.type,y=d.handlers[x];if(Jm.call(d.handlers,x)&&y)return y(d,p,b);if(d.options.passThrough&&d.options.passThrough.includes(x)){if("children"in p){const{children:N,...R}=p,C=wu(R);return C.children=d.all(p),C}return wu(p)}return(d.options.unknownHandler||lE)(d,p,b)}function h(p){const b=[];if("children"in p){const x=p.children;let y=-1;for(;++y<x.length;){const E=d.one(x[y],p);if(E){if(y&&x[y-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=t4(E.value)),!Array.isArray(E)&&E.type==="element")){const N=E.children[0];N&&N.type==="text"&&(N.value=t4(N.value))}Array.isArray(E)?b.push(...E):b.push(E)}}}return b}}function iE(e,t){e.position&&(t.position=Yw(e))}function sE(e,t){let n=t;if(e&&e.data){const a=e.data.hName,s=e.data.hChildren,o=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"&&o&&Object.assign(n.properties,wu(o)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function lE(e,t){const n=t.data||{},a="value"in t&&!(Jm.call(n,"hProperties")||Jm.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 oE(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
|
|
21
|
+
`});++a<e.length;)a&&n.push({type:"text",value:`
|
|
22
|
+
`}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
23
|
+
`}),n}function t4(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function n4(e,t){const n=aE(e,t),a=n.one(e,void 0),s=Xk(n),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
|
|
24
|
+
`},s),o}function cE(e,t){return e&&"run"in e?async function(n,a){const s=n4(n,{file:a,...t});await e.run(s,a)}:function(n,a){return n4(n,{file:a,...e||t})}}function r4(e){if(e)throw e}var kf,a4;function uE(){if(a4)return kf;a4=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]"},o=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 x;for(x in h);return typeof x>"u"||e.call(h,x)},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},d=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(a)return a(h,p).value}else return;return h[p]};return kf=function m(){var h,p,b,x,y,E,N=arguments[0],R=1,C=arguments.length,I=!1;for(typeof N=="boolean"&&(I=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=d(N,p),x=d(h,p),N!==x&&(I&&x&&(o(x)||(y=s(x)))?(y?(y=!1,E=b&&s(b)?b:[]):E=b&&o(b)?b:{},c(N,{name:p,newValue:m(I,E,x)})):typeof x<"u"&&c(N,{name:p,newValue:x}));return N},kf}var dE=uE();const Ef=Lu(dE);function eh(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 fE(){const e=[],t={run:n,use:a};return t;function n(...s){let o=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...s);function d(m,...h){const p=e[++o];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?mE(p,d)(...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 mE(e,t){let n;return a;function a(...c){const d=e.length>c.length;let m;d&&c.push(s);try{m=e.apply(this,c)}catch(h){const p=h;if(d&&n)throw p;return s(p)}d||(m&&m.then&&typeof m.then=="function"?m.then(o,s):m instanceof Error?s(m):o(m))}function s(c,...d){n||(n=!0,t(c,...d))}function o(c){s(null,c)}}const ca={basename:hE,dirname:pE,extname:gE,join:bE,sep:"/"};function hE(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Io(e);let n=0,a=-1,s=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else a<0&&(o=!0,a=s+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let c=-1,d=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else c<0&&(o=!0,c=s+1),d>-1&&(e.codePointAt(s)===t.codePointAt(d--)?d<0&&(a=s):(d=-1,a=c));return n===a?a=c:a<0&&(a=e.length),e.slice(n,a)}function pE(e){if(Io(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 gE(e){Io(e);let t=e.length,n=-1,a=0,s=-1,o=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){a=t+1;break}continue}n<0&&(c=!0,n=t+1),d===46?s<0?s=t:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||n<0||o===0||o===1&&s===n-1&&s===a+1?"":e.slice(s,n)}function bE(...e){let t=-1,n;for(;++t<e.length;)Io(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":vE(n)}function vE(e){Io(e);const t=e.codePointAt(0)===47;let n=yE(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function yE(e,t){let n="",a=0,s=-1,o=0,c=-1,d,m;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(s===c-1||o===1))if(s!==c-1&&o===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,o=0;continue}}else if(n.length>0){n="",a=0,s=c,o=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,o=0}else d===46&&o>-1?o++:o=-1}return n}function Io(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const xE={cwd:wE};function wE(){return"/"}function th(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function SE(e){if(typeof e=="string")e=new URL(e);else if(!th(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 kE(e)}function kE(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 Tf=["history","path","basename","stem","extname","dirname"];class C3{constructor(t){let n;t?th(t)?n={path:t}:typeof t=="string"||EE(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":xE.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Tf.length;){const o=Tf[a];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let s;for(s in n)Tf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?ca.basename(this.path):void 0}set basename(t){Cf(t,"basename"),Nf(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){i4(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(Nf(t,"extname"),i4(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){th(t)&&(t=SE(t)),Cf(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){Cf(t,"stem"),Nf(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 rr(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 Nf(e,t){if(e&&e.includes(ca.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ca.sep+"`")}function Cf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function i4(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function EE(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const TE=(function(e){const a=this.constructor.prototype,s=a[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),NE={}.hasOwnProperty;class Xh extends TE{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=fE()}copy(){const t=new Xh;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(Ef(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(_f("data",this.frozen),this.namespace[t]=n,this):NE.call(this.namespace,t)&&this.namespace[t]||void 0:t?(_f("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=Jc(t),a=this.parser||this.Parser;return Rf("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),Rf("process",this.parser||this.Parser),Af("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,c){const d=Jc(t),m=a.parse(d);a.run(m,d,function(p,b,x){if(p||!b||!x)return h(p);const y=b,E=a.stringify(y,x);AE(E)?x.value=E:x.result=E,h(p,x)});function h(p,b){p||!b?c(p):o?o(b):n(void 0,b)}}}processSync(t){let n=!1,a;return this.freeze(),Rf("processSync",this.parser||this.Parser),Af("processSync",this.compiler||this.Compiler),this.process(t,s),l4("processSync","process",n),a;function s(o,c){n=!0,r4(o),a=c}}run(t,n,a){s4(t),this.freeze();const s=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?o(void 0,a):new Promise(o);function o(c,d){const m=Jc(n);s.run(t,m,h);function h(p,b,x){const y=b||t;p?d(p):c?c(y):a(void 0,y,x)}}}runSync(t,n){let a=!1,s;return this.run(t,n,o),l4("runSync","run",a),s;function o(c,d){r4(c),s=d,a=!0}}stringify(t,n){this.freeze();const a=Jc(n),s=this.compiler||this.Compiler;return Af("stringify",s),s4(t),s(t,a)}use(t,...n){const a=this.attachers,s=this.namespace;if(_f("use",this.frozen),t!=null)if(typeof t=="function")m(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(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");d(h.plugins),h.settings&&(s.settings=Ef(!0,s.settings,h.settings))}function d(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const b=h[p];o(b)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function m(h,p){let b=-1,x=-1;for(;++b<a.length;)if(a[b][0]===h){x=b;break}if(x===-1)a.push([h,...p]);else if(p.length>0){let[y,...E]=p;const N=a[x][1];eh(N)&&eh(y)&&(y=Ef(!0,N,y)),a[x]=[h,y,...E]}}}}const CE=new Xh().freeze();function Rf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Af(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function _f(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 s4(e){if(!eh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function l4(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Jc(e){return RE(e)?e:new C3(e)}function RE(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function AE(e){return typeof e=="string"||_E(e)}function _E(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const IE="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",o4=[],c4={allowDangerousHtml:!0},ME=/^(https?|ircs?|mailto|xmpp)$/i,OE=[{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 DE(e){const t=jE(e),n=LE(e);return zE(t.runSync(t.parse(n),n),e)}function jE(e){const t=e.rehypePlugins||o4,n=e.remarkPlugins||o4,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...c4}:c4;return CE().use(gk).use(n).use(cE,a).use(t)}function LE(e){const t=e.children||"",n=new C3;return typeof t=="string"&&(n.value=t),n}function zE(e,t){const n=t.allowedElements,a=t.allowElement,s=t.components,o=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,m=t.urlTransform||BE;for(const p of OE)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+IE+p.id,void 0);return Yh(e,h),Jw(e,{Fragment:f.Fragment,components:s,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function h(p,b,x){if(p.type==="raw"&&x&&typeof b=="number")return c?x.children.splice(b,1):x.children[b]={type:"text",value:p.value},b;if(p.type==="element"){let y;for(y in xf)if(Object.hasOwn(xf,y)&&Object.hasOwn(p.properties,y)){const E=p.properties[y],N=xf[y];(N===null||N.includes(p.tagName))&&(p.properties[y]=m(String(E||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):o?o.includes(p.tagName):!1;if(!y&&a&&typeof b=="number"&&(y=!a(p,b,x)),y&&x&&typeof b=="number")return d&&p.children?x.children.splice(b,1,...p.children):x.children.splice(b,1),b}}}function BE(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||ME.test(e.slice(0,t))?e:""}function u4(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 qE(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function UE(e,t,n){const s=_o((n||{}).ignore||[]),o=HE(t);let c=-1;for(;++c<o.length;)Vh(e,"text",d);function d(h,p){let b=-1,x;for(;++b<p.length;){const y=p[b],E=x?x.children:void 0;if(s(y,E?E.indexOf(y):void 0,x))return;x=y}if(x)return m(h,p)}function m(h,p){const b=p[p.length-1],x=o[c][0],y=o[c][1];let E=0;const R=b.children.indexOf(h);let C=!1,I=[];x.lastIndex=0;let O=x.exec(h.value);for(;O;){const X=O.index,q={index:O.index,input:O.input,stack:[...p,h]};let A=y(...O,q);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?x.lastIndex=X+1:(E!==X&&I.push({type:"text",value:h.value.slice(E,X)}),Array.isArray(A)?I.push(...A):A&&I.push(A),E=X+O[0].length,C=!0),!x.global)break;O=x.exec(h.value)}return C?(E<h.value.length&&I.push({type:"text",value:h.value.slice(E)}),b.children.splice(R,1,...I)):I=[h],R+I.length}}function HE(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([FE(s[0]),PE(s[1])])}return t}function FE(e){return typeof e=="string"?new RegExp(qE(e),"g"):e}function PE(e){return typeof e=="function"?e:function(){return e}}const If="phrasing",Mf=["autolink","link","image","label"];function $E(){return{transforms:[WE],enter:{literalAutolink:KE,literalAutolinkEmail:Of,literalAutolinkHttp:Of,literalAutolinkWww:Of},exit:{literalAutolink:ZE,literalAutolinkEmail:XE,literalAutolinkHttp:VE,literalAutolinkWww:YE}}}function GE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:If,notInConstruct:Mf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:If,notInConstruct:Mf},{character:":",before:"[ps]",after:"\\/",inConstruct:If,notInConstruct:Mf}]}}function KE(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Of(e){this.config.enter.autolinkProtocol.call(this,e)}function VE(e){this.config.exit.autolinkProtocol.call(this,e)}function YE(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 XE(e){this.config.exit.autolinkEmail.call(this,e)}function ZE(e){this.exit(e)}function WE(e){UE(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,QE],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),JE]],{ignore:["link","linkReference"]})}function QE(e,t,n,a,s){let o="";if(!R3(s)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!eT(n)))return!1;const c=tT(n+a);if(!c[0])return!1;const d={type:"link",title:null,url:o+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[d,{type:"text",value:c[1]}]:d}function JE(e,t,n,a){return!R3(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function eT(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 tT(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=u4(e,"(");let o=u4(e,")");for(;a!==-1&&s>o;)e+=n.slice(0,a+1),n=n.slice(a+1),a=n.indexOf(")"),o++;return[e,n]}function R3(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||os(n)||Fu(n))&&(!t||n!==47)}A3.peek=uT;function nT(){this.buffer()}function rT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function aT(){this.buffer()}function iT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function sT(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 lT(e){this.exit(e)}function oT(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 cT(e){this.exit(e)}function uT(){return"["}function A3(e,t,n,a){const s=n.createTracker(a);let o=s.move("[^");const c=n.enter("footnoteReference"),d=n.enter("reference");return o+=s.move(n.safe(n.associationId(e),{after:"]",before:o})),d(),c(),o+=s.move("]"),o}function dT(){return{enter:{gfmFootnoteCallString:nT,gfmFootnoteCall:rT,gfmFootnoteDefinitionLabelString:aT,gfmFootnoteDefinition:iT},exit:{gfmFootnoteCallString:sT,gfmFootnoteCall:lT,gfmFootnoteDefinitionLabelString:oT,gfmFootnoteDefinition:cT}}}function fT(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:A3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,s,o,c){const d=o.createTracker(c);let m=d.move("[^");const h=o.enter("footnoteDefinition"),p=o.enter("label");return m+=d.move(o.safe(o.associationId(a),{before:m,after:"]"})),p(),m+=d.move("]:"),a.children&&a.children.length>0&&(d.shift(4),m+=d.move((t?`
|
|
25
|
+
`:" ")+o.indentLines(o.containerFlow(a,d.current()),t?_3:mT))),h(),m}}function mT(e,t,n){return t===0?e:_3(e,t,n)}function _3(e,t,n){return(n?"":" ")+e}const hT=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];I3.peek=yT;function pT(){return{canContainEols:["delete"],enter:{strikethrough:bT},exit:{strikethrough:vT}}}function gT(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:hT}],handlers:{delete:I3}}}function bT(e){this.enter({type:"delete",children:[]},e)}function vT(e){this.exit(e)}function I3(e,t,n,a){const s=n.createTracker(a),o=n.enter("strikethrough");let c=s.move("~~");return c+=n.containerPhrasing(e,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),o(),c}function yT(){return"~"}function xT(e){return e.length}function wT(e,t){const n=t||{},a=(n.align||[]).concat(),s=n.stringLength||xT,o=[],c=[],d=[],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 I=ST(e[p][C]);if(n.alignDelimiters!==!1){const O=s(I);R[C]=O,(m[C]===void 0||O>m[C])&&(m[C]=O)}N.push(I)}c[p]=N,d[p]=R}let b=-1;if(typeof a=="object"&&"length"in a)for(;++b<h;)o[b]=d4(a[b]);else{const N=d4(a);for(;++b<h;)o[b]=N}b=-1;const x=[],y=[];for(;++b<h;){const N=o[b];let R="",C="";N===99?(R=":",C=":"):N===108?R=":":N===114&&(C=":");let I=n.alignDelimiters===!1?1:Math.max(1,m[b]-R.length-C.length);const O=R+"-".repeat(I)+C;n.alignDelimiters!==!1&&(I=R.length+I+C.length,I>m[b]&&(m[b]=I),y[b]=I),x[b]=O}c.splice(1,0,x),d.splice(1,0,y),p=-1;const E=[];for(;++p<c.length;){const N=c[p],R=d[p];b=-1;const C=[];for(;++b<h;){const I=N[b]||"";let O="",X="";if(n.alignDelimiters!==!1){const q=m[b]-(R[b]||0),A=o[b];A===114?O=" ".repeat(q):A===99?q%2?(O=" ".repeat(q/2+.5),X=" ".repeat(q/2-.5)):(O=" ".repeat(q/2),X=O):X=" ".repeat(q)}n.delimiterStart!==!1&&!b&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&I==="")&&(n.delimiterStart!==!1||b)&&C.push(" "),n.alignDelimiters!==!1&&C.push(O),C.push(I),n.alignDelimiters!==!1&&C.push(X),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||b!==h-1)&&C.push("|")}E.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return E.join(`
|
|
26
|
+
`)}function ST(e){return e==null?"":String(e)}function d4(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 kT(e,t,n,a){const s=n.enter("blockquote"),o=n.createTracker(a);o.move("> "),o.shift(2);const c=n.indentLines(n.containerFlow(e,o.current()),ET);return s(),c}function ET(e,t,n){return">"+(n?"":" ")+e}function TT(e,t){return f4(e,t.inConstruct,!0)&&!f4(e,t.notInConstruct,!1)}function f4(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 m4(e,t,n,a){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
27
|
+
`&&TT(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
|
|
28
|
+
`}function M3(e,t){const n=String(e);let a=n.indexOf(t),s=a,o=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===s?++o>c&&(c=o):o=1,s=a+t.length,a=n.indexOf(t,s);return c}function NT(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 CT(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 RT(e,t,n,a){const s=CT(n),o=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(NT(e,n)){const b=n.enter("codeIndented"),x=n.indentLines(o,AT);return b(),x}const d=n.createTracker(a),m=s.repeat(Math.max(M3(o,s)+1,3)),h=n.enter("codeFenced");let p=d.move(m);if(e.lang){const b=n.enter(`codeFencedLang${c}`);p+=d.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...d.current()})),b()}if(e.lang&&e.meta){const b=n.enter(`codeFencedMeta${c}`);p+=d.move(" "),p+=d.move(n.safe(e.meta,{before:p,after:`
|
|
29
|
+
`,encode:["`"],...d.current()})),b()}return p+=d.move(`
|
|
30
|
+
`),o&&(p+=d.move(o+`
|
|
31
|
+
`)),p+=d.move(m),h(),p}function AT(e,t,n){return(n?"":" ")+e}function Zh(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 _T(e,t,n,a){const s=Zh(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("definition");let d=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("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=m.move("<"),h+=m.move(n.safe(e.url,{before:h,after:">",...m.current()})),h+=m.move(">")):(d=n.enter("destinationRaw"),h+=m.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
32
|
+
`,...m.current()}))),d(),e.title&&(d=n.enter(`title${o}`),h+=m.move(" "+s),h+=m.move(n.safe(e.title,{before:h,after:s,...m.current()})),h+=m.move(s),d()),c(),h}function IT(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 ko(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Su(e,t,n){const a=tl(e),s=tl(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}}O3.peek=MT;function O3(e,t,n,a){const s=IT(n),o=n.enter("emphasis"),c=n.createTracker(a),d=c.move(s);let m=c.move(n.containerPhrasing(e,{after:s,before:d,...c.current()}));const h=m.charCodeAt(0),p=Su(a.before.charCodeAt(a.before.length-1),h,s);p.inside&&(m=ko(h)+m.slice(1));const b=m.charCodeAt(m.length-1),x=Su(a.after.charCodeAt(0),b,s);x.inside&&(m=m.slice(0,-1)+ko(b));const y=c.move(s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:p.outside},d+m+y}function MT(e,t,n){return n.options.emphasis||"*"}function OT(e,t){let n=!1;return Yh(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,Qm}),!!((!e.depth||e.depth<3)&&Uh(e)&&(t.options.setext||n))}function DT(e,t,n,a){const s=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(a);if(OT(e,n)){const p=n.enter("headingSetext"),b=n.enter("phrasing"),x=n.containerPhrasing(e,{...o.current(),before:`
|
|
33
|
+
`,after:`
|
|
34
|
+
`});return b(),p(),x+`
|
|
35
|
+
`+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
36
|
+
`))+1))}const c="#".repeat(s),d=n.enter("headingAtx"),m=n.enter("phrasing");o.move(c+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
37
|
+
`,...o.current()});return/^[\t ]/.test(h)&&(h=ko(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,n.options.closeAtx&&(h+=" "+c),m(),d(),h}D3.peek=jT;function D3(e){return e.value||""}function jT(){return"<"}j3.peek=LT;function j3(e,t,n,a){const s=Zh(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("image");let d=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("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=m.move("<"),h+=m.move(n.safe(e.url,{before:h,after:">",...m.current()})),h+=m.move(">")):(d=n.enter("destinationRaw"),h+=m.move(n.safe(e.url,{before:h,after:e.title?" ":")",...m.current()}))),d(),e.title&&(d=n.enter(`title${o}`),h+=m.move(" "+s),h+=m.move(n.safe(e.title,{before:h,after:s,...m.current()})),h+=m.move(s),d()),h+=m.move(")"),c(),h}function LT(){return"!"}L3.peek=zT;function L3(e,t,n,a){const s=e.referenceType,o=n.enter("imageReference");let c=n.enter("label");const d=n.createTracker(a);let m=d.move("![");const h=n.safe(e.alt,{before:m,after:"]",...d.current()});m+=d.move(h+"]["),c();const p=n.stack;n.stack=[],c=n.enter("reference");const b=n.safe(n.associationId(e),{before:m,after:"]",...d.current()});return c(),n.stack=p,o(),s==="full"||!h||h!==b?m+=d.move(b+"]"):s==="shortcut"?m=m.slice(0,-1):m+=d.move("]"),m}function zT(){return"!"}z3.peek=BT;function z3(e,t,n){let a=e.value||"",s="`",o=-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+" ");++o<n.unsafe.length;){const c=n.unsafe[o],d=n.compilePattern(c);let m;if(c.atBreak)for(;m=d.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 BT(){return"`"}function B3(e,t){const n=Uh(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))}q3.peek=qT;function q3(e,t,n,a){const s=Zh(n),o=s==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let d,m;if(B3(e,n)){const p=n.stack;n.stack=[],d=n.enter("autolink");let b=c.move("<");return b+=c.move(n.containerPhrasing(e,{before:b,after:">",...c.current()})),b+=c.move(">"),d(),n.stack=p,b}d=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${o}`),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(")"),d(),h}function qT(e,t,n){return B3(e,n)?"<":"["}U3.peek=UT;function U3(e,t,n,a){const s=e.referenceType,o=n.enter("linkReference");let c=n.enter("label");const d=n.createTracker(a);let m=d.move("[");const h=n.containerPhrasing(e,{before:m,after:"]",...d.current()});m+=d.move(h+"]["),c();const p=n.stack;n.stack=[],c=n.enter("reference");const b=n.safe(n.associationId(e),{before:m,after:"]",...d.current()});return c(),n.stack=p,o(),s==="full"||!h||h!==b?m+=d.move(b+"]"):s==="shortcut"?m=m.slice(0,-1):m+=d.move("]"),m}function UT(){return"["}function Wh(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 HT(e){const t=Wh(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 FT(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 H3(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 PT(e,t,n,a){const s=n.enter("list"),o=n.bulletCurrent;let c=e.ordered?FT(n):Wh(n);const d=e.ordered?c==="."?")":".":HT(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),H3(n)===c&&p){let b=-1;for(;++b<e.children.length;){const x=e.children[b];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(c=d),n.bulletCurrent=c;const h=n.containerFlow(e,a);return n.bulletLastUsed=c,n.bulletCurrent=o,s(),h}function $T(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 GT(e,t,n,a){const s=$T(n);let o=n.bulletCurrent||Wh(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let c=o.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const d=n.createTracker(a);d.move(o+" ".repeat(c-o.length)),d.shift(c);const m=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,d.current()),p);return m(),h;function p(b,x,y){return x?(y?"":" ".repeat(c))+b:(y?o:o+" ".repeat(c-o.length))+b}}function KT(e,t,n,a){const s=n.enter("paragraph"),o=n.enter("phrasing"),c=n.containerPhrasing(e,a);return o(),s(),c}const VT=_o(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function YT(e,t,n,a){return(e.children.some(function(c){return VT(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function XT(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}F3.peek=ZT;function F3(e,t,n,a){const s=XT(n),o=n.enter("strong"),c=n.createTracker(a),d=c.move(s+s);let m=c.move(n.containerPhrasing(e,{after:s,before:d,...c.current()}));const h=m.charCodeAt(0),p=Su(a.before.charCodeAt(a.before.length-1),h,s);p.inside&&(m=ko(h)+m.slice(1));const b=m.charCodeAt(m.length-1),x=Su(a.after.charCodeAt(0),b,s);x.inside&&(m=m.slice(0,-1)+ko(b));const y=c.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:p.outside},d+m+y}function ZT(e,t,n){return n.options.strong||"*"}function WT(e,t,n,a){return n.safe(e.value,a)}function QT(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 JT(e,t,n){const a=(H3(n)+(n.options.ruleSpaces?" ":"")).repeat(QT(n));return n.options.ruleSpaces?a.slice(0,-1):a}const P3={blockquote:kT,break:m4,code:RT,definition:_T,emphasis:O3,hardBreak:m4,heading:DT,html:D3,image:j3,imageReference:L3,inlineCode:z3,link:q3,linkReference:U3,list:PT,listItem:GT,paragraph:KT,root:YT,strong:F3,text:WT,thematicBreak:JT};function eN(){return{enter:{table:tN,tableData:h4,tableHeader:h4,tableRow:rN},exit:{codeText:aN,table:nN,tableData:Df,tableHeader:Df,tableRow:Df}}}function tN(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 nN(e){this.exit(e),this.data.inTable=void 0}function rN(e){this.enter({type:"tableRow",children:[]},e)}function Df(e){this.exit(e)}function h4(e){this.enter({type:"tableCell",children:[]},e)}function aN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,iN));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function iN(e,t){return t==="|"?t:e}function sN(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
38
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:m,tableRow:d}};function c(y,E,N,R){return h(p(y,N,R),y.align)}function d(y,E,N,R){const C=b(y,N,R),I=h([C]);return I.slice(0,I.indexOf(`
|
|
39
|
+
`))}function m(y,E,N,R){const C=N.enter("tableCell"),I=N.enter("phrasing"),O=N.containerPhrasing(y,{...R,before:o,after:o});return I(),C(),O}function h(y,E){return wT(y,{align:E,alignDelimiters:a,padding:n,stringLength:s})}function p(y,E,N){const R=y.children;let C=-1;const I=[],O=E.enter("table");for(;++C<R.length;)I[C]=b(R[C],E,N);return O(),I}function b(y,E,N){const R=y.children;let C=-1;const I=[],O=E.enter("tableRow");for(;++C<R.length;)I[C]=m(R[C],y,E,N);return O(),I}function x(y,E,N){let R=P3.inlineCode(y,E,N);return N.stack.includes("tableCell")&&(R=R.replace(/\|/g,"\\$&")),R}}function lN(){return{exit:{taskListCheckValueChecked:p4,taskListCheckValueUnchecked:p4,paragraph:cN}}}function oN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:uN}}}function p4(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function cN(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 o=-1,c;for(;++o<s.length;){const d=s[o];if(d.type==="paragraph"){c=d;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 uN(e,t,n,a){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",d=n.createTracker(a);o&&d.move(c);let m=P3.listItem(e,t,n,{...a,...d.current()});return o&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),m;function h(p){return p+c}}function dN(){return[$E(),dT(),pT(),eN(),lN()]}function fN(e){return{extensions:[GE(),fT(e),gT(),sN(e),oN()]}}const mN={tokenize:yN,partial:!0},$3={tokenize:xN,partial:!0},G3={tokenize:wN,partial:!0},K3={tokenize:SN,partial:!0},hN={tokenize:kN,partial:!0},V3={name:"wwwAutolink",tokenize:bN,previous:X3},Y3={name:"protocolAutolink",tokenize:vN,previous:Z3},Fa={name:"emailAutolink",tokenize:gN,previous:W3},fa={};function pN(){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,Y3];fa[104]=[Fa,Y3];fa[87]=[Fa,V3];fa[119]=[Fa,V3];function gN(e,t,n){const a=this;let s,o;return c;function c(b){return!nh(b)||!W3.call(a,a.previous)||Qh(a.events)?n(b):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(b))}function d(b){return nh(b)?(e.consume(b),d):b===64?(e.consume(b),m):n(b)}function m(b){return b===46?e.check(hN,p,h)(b):b===45||b===95||tr(b)?(o=!0,e.consume(b),m):p(b)}function h(b){return e.consume(b),s=!0,m}function p(b){return o&&s&&or(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(b)):n(b)}}function bN(e,t,n){const a=this;return s;function s(c){return c!==87&&c!==119||!X3.call(a,a.previous)||Qh(a.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(mN,e.attempt($3,e.attempt(G3,o),n),n)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function vN(e,t,n){const a=this;let s="",o=!1;return c;function c(b){return(b===72||b===104)&&Z3.call(a,a.previous)&&!Qh(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(b),e.consume(b),d):n(b)}function d(b){if(or(b)&&s.length<5)return s+=String.fromCodePoint(b),e.consume(b),d;if(b===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(b),m}return n(b)}function m(b){return b===47?(e.consume(b),o?h:(o=!0,m)):n(b)}function h(b){return b===null||yu(b)||rn(b)||os(b)||Fu(b)?n(b):e.attempt($3,e.attempt(G3,p),n)(b)}function p(b){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(b)}}function yN(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),o):n(c)}function o(c){return c===null?n(c):t(c)}}function xN(e,t,n){let a,s,o;return c;function c(h){return h===46||h===95?e.check(K3,m,d)(h):h===null||rn(h)||os(h)||h!==45&&Fu(h)?m(h):(o=!0,e.consume(h),c)}function d(h){return h===95?a=!0:(s=a,a=void 0),e.consume(h),c}function m(h){return s||a||!o?n(h):t(h)}}function wN(e,t){let n=0,a=0;return s;function s(c){return c===40?(n++,e.consume(c),s):c===41&&a<n?o(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(K3,t,o)(c):c===null||rn(c)||os(c)?t(c):(e.consume(c),s)}function o(c){return c===41&&a++,e.consume(c),s}}function SN(e,t,n){return a;function a(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),a):d===38?(e.consume(d),o):d===93?(e.consume(d),s):d===60||d===null||rn(d)||os(d)?t(d):n(d)}function s(d){return d===null||d===40||d===91||rn(d)||os(d)?t(d):a(d)}function o(d){return or(d)?c(d):n(d)}function c(d){return d===59?(e.consume(d),a):or(d)?(e.consume(d),c):n(d)}}function kN(e,t,n){return a;function a(o){return e.consume(o),s}function s(o){return tr(o)?n(o):t(o)}}function X3(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||rn(e)}function Z3(e){return!or(e)}function W3(e){return!(e===47||nh(e))}function nh(e){return e===43||e===45||e===46||e===95||tr(e)}function Qh(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 EN={tokenize:MN,partial:!0};function TN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:AN,continuation:{tokenize:_N},exit:IN}},text:{91:{name:"gfmFootnoteCall",tokenize:RN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:NN,resolveTo:CN}}}}function NN(e,t,n){const a=this;let s=a.events.length;const o=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 d;function d(m){if(!c||!c._balanced)return n(m);const h=na(a.sliceSerialize({start:c.end,end:a.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?n(m):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),t(m))}}function CN(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 o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},d=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",o,t],["enter",c,t],["exit",c,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...d),e}function RN(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,c;return d;function d(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(o>999||b===93&&!c||b===null||b===91||rn(b))return n(b);if(b===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(na(a.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(b)}return rn(b)||(c=!0),o++,e.consume(b),b===92?p:h}function p(b){return b===91||b===92||b===93?(e.consume(b),o++,h):h(b)}}function AN(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,c=0,d;return m;function m(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(E)}function p(E){if(c>999||E===93&&!d||E===null||E===91||rn(E))return n(E);if(E===93){e.exit("chunkString");const N=e.exit("gfmFootnoteDefinitionLabelString");return o=na(a.sliceSerialize(N)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return rn(E)||(d=!0),c++,e.consume(E),E===92?b:p}function b(E){return E===91||E===92||E===93?(e.consume(E),c++,p):p(E)}function x(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),s.includes(o)||s.push(o),Et(e,y,"gfmFootnoteDefinitionWhitespace")):n(E)}function y(E){return t(E)}}function _N(e,t,n){return e.check(Ao,t,e.attempt(EN,t,n))}function IN(e){e.exit("gfmFootnoteDefinition")}function MN(e,t,n){const a=this;return Et(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(o):n(o)}}function ON(e){let n=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:o,resolveAll:s};return n==null&&(n=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(c,d){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)},x=[["enter",p,d],["enter",c[h][1],d],["exit",c[h][1],d],["enter",b,d]],y=d.parser.constructs.insideSpan.null;y&&Dr(x,x.length,0,Pu(y,c.slice(h+1,m),d)),Dr(x,x.length,0,[["exit",b,d],["enter",c[m][1],d],["exit",c[m][1],d],["exit",p,d]]),Dr(c,h-1,m-h+3,x),m=h+x.length-2;break}}for(m=-1;++m<c.length;)c[m][1].type==="strikethroughSequenceTemporary"&&(c[m][1].type="data");return c}function o(c,d,m){const h=this.previous,p=this.events;let b=0;return x;function x(E){return h===126&&p[p.length-1][1].type!=="characterEscape"?m(E):(c.enter("strikethroughSequenceTemporary"),y(E))}function y(E){const N=tl(h);if(E===126)return b>1?m(E):(c.consume(E),b++,y);if(b<2&&!n)return m(E);const R=c.exit("strikethroughSequenceTemporary"),C=tl(E);return R._open=!C||C===2&&!!N,R._close=!N||N===2&&!!C,d(E)}}}class DN{constructor(){this.map=[]}add(t,n,a){jN(this,t,n,a)}consume(t){if(this.map.sort(function(o,c){return o[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 o of s)t.push(o);s=a.pop()}this.map.length=0}}function jN(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 LN(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 o=a.length-1;a[o]=a[o]==="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 zN(){return{flow:{null:{name:"table",tokenize:BN,resolveAll:qN}}}}function BN(e,t,n){const a=this;let s=0,o=0,c;return d;function d(z){let U=a.events.length-1;for(;U>-1;){const G=a.events[U][1].type;if(G==="lineEnding"||G==="linePrefix")U--;else break}const H=U>-1?a.events[U][1].type:null,te=H==="tableHead"||H==="tableRow"?A:m;return te===A&&a.parser.lazy[a.now().line]?n(z):te(z)}function m(z){return e.enter("tableHead"),e.enter("tableRow"),h(z)}function h(z){return z===124||(c=!0,o+=1),p(z)}function p(z){return z===null?n(z):Ye(z)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),y):n(z):At(z)?Et(e,p,"whitespace")(z):(o+=1,c&&(c=!1,s+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),c=!0,p):(e.enter("data"),b(z)))}function b(z){return z===null||z===124||rn(z)?(e.exit("data"),p(z)):(e.consume(z),z===92?x:b)}function x(z){return z===92||z===124?(e.consume(z),b):b(z)}function y(z){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(z):(e.enter("tableDelimiterRow"),c=!1,At(z)?Et(e,E,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):E(z))}function E(z){return z===45||z===58?R(z):z===124?(c=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),N):q(z)}function N(z){return At(z)?Et(e,R,"whitespace")(z):R(z)}function R(z){return z===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),C):z===45?(o+=1,C(z)):z===null||Ye(z)?X(z):q(z)}function C(z){return z===45?(e.enter("tableDelimiterFiller"),I(z)):q(z)}function I(z){return z===45?(e.consume(z),I):z===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),O):(e.exit("tableDelimiterFiller"),O(z))}function O(z){return At(z)?Et(e,X,"whitespace")(z):X(z)}function X(z){return z===124?E(z):z===null||Ye(z)?!c||s!==o?q(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):q(z)}function q(z){return n(z)}function A(z){return e.enter("tableRow"),F(z)}function F(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),F):z===null||Ye(z)?(e.exit("tableRow"),t(z)):At(z)?Et(e,F,"whitespace")(z):(e.enter("data"),J(z))}function J(z){return z===null||z===124||rn(z)?(e.exit("data"),F(z)):(e.consume(z),z===92?W:J)}function W(z){return z===92||z===124?(e.consume(z),J):J(z)}}function qN(e,t){let n=-1,a=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],d=!1,m=0,h,p,b;const x=new DN;for(;++n<e.length;){const y=e[n],E=y[1];y[0]==="enter"?E.type==="tableHead"?(d=!1,m!==0&&(g4(x,t,m,h,p),p=void 0,m=0),h={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},x.add(n,0,[["enter",h,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(a=!0,b=void 0,o=[0,0,0,0],c=[0,n+1,0,0],d&&(d=!1,p={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},x.add(n,0,[["enter",p,t]])),s=E.type==="tableDelimiterRow"?2:p?3:1):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],b=eu(x,t,o,s,void 0,b),o=[0,0,0,0]),c[2]=n)):E.type==="tableCellDivider"&&(a?a=!1:(o[1]!==0&&(c[0]=c[1],b=eu(x,t,o,s,void 0,b)),o=c,c=[o[1],n,0,0])):E.type==="tableHead"?(d=!0,m=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(m=n,o[1]!==0?(c[0]=c[1],b=eu(x,t,o,s,n,b)):c[1]!==0&&(b=eu(x,t,c,s,n,b)),s=0):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=n)}for(m!==0&&g4(x,t,m,h,p),x.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=LN(t.events,n))}return e}function eu(e,t,n,a,s,o){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",d="tableContent";n[0]!==0&&(o.end=Object.assign({},Zs(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const m=Zs(t.events,n[1]);if(o={type:c,start:Object.assign({},m),end:Object.assign({},m)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const h=Zs(t.events,n[2]),p=Zs(t.events,n[3]),b={type:d,start:Object.assign({},h),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",b,t]]),a!==2){const x=t.events[n[2]],y=t.events[n[3]];if(x[1].end=Object.assign({},y[1].end),x[1].type="chunkText",x[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,N=n[3]-n[2]-1;e.add(E,N,[])}}e.add(n[3]+1,0,[["exit",b,t]])}return s!==void 0&&(o.end=Object.assign({},Zs(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function g4(e,t,n,a,s){const o=[],c=Zs(t.events,n);s&&(s.end=Object.assign({},c),o.push(["exit",s,t])),a.end=Object.assign({},c),o.push(["exit",a,t]),e.add(n+1,0,o)}function Zs(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const UN={name:"tasklistCheck",tokenize:FN};function HN(){return{text:{91:UN}}}function FN(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"),o)}function o(m){return rn(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"),d):n(m)}function d(m){return Ye(m)?t(m):At(m)?e.check({tokenize:PN},t,n)(m):n(m)}}function PN(e,t,n){return Et(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function $N(e){return s3([pN(),TN(),ON(e),zN(),HN()])}const GN={};function KN(e){const t=this,n=e||GN,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push($N(n)),o.push(dN()),c.push(fN(n))}function VN(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:s,mathFlowFence:a,mathFlowFenceMeta:n,mathFlowValue:d,mathText:c,mathTextData:d}};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 o(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 d(m){this.config.enter.data.call(this,m),this.config.exit.data.call(this,m)}}function YN(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),a.peek=s,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
|
|
40
|
+
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:a}};function n(o,c,d,m){const h=o.value||"",p=d.createTracker(m),b="$".repeat(Math.max(M3(h,"$")+1,2)),x=d.enter("mathFlow");let y=p.move(b);if(o.meta){const E=d.enter("mathFlowMeta");y+=p.move(d.safe(o.meta,{after:`
|
|
41
|
+
`,before:y,encode:["$"],...p.current()})),E()}return y+=p.move(`
|
|
42
|
+
`),h&&(y+=p.move(h+`
|
|
43
|
+
`)),y+=p.move(b),x(),y}function a(o,c,d){let m=o.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<d.unsafe.length;){const x=d.unsafe[b];if(!x.atBreak)continue;const y=d.compilePattern(x);let E;for(;E=y.exec(m);){let N=E.index;m.codePointAt(N)===10&&m.codePointAt(N-1)===13&&N--,m=m.slice(0,N)+" "+m.slice(E.index+1)}}return p+m+p}function s(){return"$"}}const XN={tokenize:ZN,concrete:!0,name:"mathFlow"},b4={tokenize:WN,partial:!0};function ZN(e,t,n){const a=this,s=a.events[a.events.length-1],o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0;let c=0;return d;function d(I){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),m(I)}function m(I){return I===36?(e.consume(I),c++,m):c<2?n(I):(e.exit("mathFlowFenceSequence"),Et(e,h,"whitespace")(I))}function h(I){return I===null||Ye(I)?b(I):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(I))}function p(I){return I===null||Ye(I)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),b(I)):I===36?n(I):(e.consume(I),p)}function b(I){return e.exit("mathFlowFence"),a.interrupt?t(I):e.attempt(b4,x,R)(I)}function x(I){return e.attempt({tokenize:C,partial:!0},R,y)(I)}function y(I){return(o?Et(e,E,"linePrefix",o+1):E)(I)}function E(I){return I===null?R(I):Ye(I)?e.attempt(b4,x,R)(I):(e.enter("mathFlowValue"),N(I))}function N(I){return I===null||Ye(I)?(e.exit("mathFlowValue"),E(I)):(e.consume(I),N)}function R(I){return e.exit("mathFlow"),t(I)}function C(I,O,X){let q=0;return Et(I,A,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function A(W){return I.enter("mathFlowFence"),I.enter("mathFlowFenceSequence"),F(W)}function F(W){return W===36?(q++,I.consume(W),F):q<c?X(W):(I.exit("mathFlowFenceSequence"),Et(I,J,"whitespace")(W))}function J(W){return W===null||Ye(W)?(I.exit("mathFlowFence"),O(W)):X(W)}}}function WN(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"),o)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function QN(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:a,resolve:JN,previous:eC,name:"mathText"};function a(s,o,c){let d=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),d++,b):d<2&&!n?c(N):(s.exit("mathTextSequence"),x(N))}function x(N){return N===null?c(N):N===36?(h=s.enter("mathTextSequence"),m=0,E(N)):N===32?(s.enter("space"),s.consume(N),s.exit("space"),x):Ye(N)?(s.enter("lineEnding"),s.consume(N),s.exit("lineEnding"),x):(s.enter("mathTextData"),y(N))}function y(N){return N===null||N===32||N===36||Ye(N)?(s.exit("mathTextData"),x(N)):(s.consume(N),y)}function E(N){return N===36?(s.consume(N),m++,E):m===d?(s.exit("mathTextSequence"),s.exit("mathText"),o(N)):(h.type="mathTextData",y(N))}}}function JN(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 eC(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function tC(e){return{flow:{36:XN},text:{36:QN(e)}}}class Ae extends Error{constructor(t,n){var a="KaTeX parse error: "+t,s,o,c=n&&n.loc;if(c&&c.start<=c.end){var d=c.lexer.input;s=c.start,o=c.end,s===d.length?a+=" at end of input: ":a+=" at position "+(s+1)+": ";var m=d.slice(s,o).replace(/[^]/g,"$&̲"),h;s>15?h="…"+d.slice(s-15,s):h=d.slice(0,s);var p;o+15<d.length?p=d.slice(o,o+15)+"…":p=d.slice(o),a+=h+m+p}super(a),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,Ae.prototype),this.position=s,s!=null&&o!=null&&(this.length=o-s),this.rawMessage=t}}var nC=/([A-Z])/g,rC=e=>e.replace(nC,"-$1").toLowerCase(),aC={"&":"&",">":">","<":"<",'"':""","'":"'"},iC=/[&><"']/g,nr=e=>String(e).replace(iC,t=>aC[t]),mu=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?mu(e.body[0]):e:e.type==="font"?mu(e.body):e,sC=new Set(["mathord","textord","atom"]),Pa=e=>sC.has(mu(e).type),lC=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"},ku={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 oC(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 cC(e){if(e.default!==void 0)return e.default;var t=Array.isArray(e.type)?e.type[0]:e.type;return oC(t)}function uC(e,t,n,a){var s=n[t];e[t]=s!==void 0?a.processor?a.processor(s):s:cC(a)}class Jh{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(ku)){var a=ku[n];a&&uC(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 Ae("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=lC(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[dC[this.id]]}sub(){return ua[fC[this.id]]}fracNum(){return ua[mC[this.id]]}fracDen(){return ua[hC[this.id]]}cramp(){return ua[pC[this.id]]}text(){return ua[gC[this.id]]}isTight(){return this.size>=2}}var ep=0,Eu=1,Qs=2,Ua=3,Eo=4,Zr=5,nl=6,cr=7,ua=[new wi(ep,0,!1),new wi(Eu,0,!0),new wi(Qs,1,!1),new wi(Ua,1,!0),new wi(Eo,2,!1),new wi(Zr,2,!0),new wi(nl,3,!1),new wi(cr,3,!0)],dC=[Eo,Zr,Eo,Zr,nl,cr,nl,cr],fC=[Zr,Zr,Zr,Zr,cr,cr,cr,cr],mC=[Qs,Ua,Eo,Zr,nl,cr,nl,cr],hC=[Ua,Ua,Zr,Zr,cr,cr,cr,cr],pC=[Eu,Eu,Ua,Ua,Zr,Zr,cr,cr],gC=[ep,Eu,Qs,Ua,Qs,Ua,Qs,Ua],dt={DISPLAY:ua[ep],TEXT:ua[Qs],SCRIPT:ua[Eo],SCRIPTSCRIPT:ua[nl]},rh=[{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 bC(e){for(var t=0;t<rh.length;t++)for(var n=rh[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 hu=[];rh.forEach(e=>e.blocks.forEach(t=>hu.push(...t)));function Q3(e){for(var t=0;t<hu.length;t+=2)if(e>=hu[t]&&e<=hu[t+1])return!0;return!1}var Un=e=>e+" "+e,Vs=80,vC=function(t,n){return"M95,"+(622+t+n)+`
|
|
44
|
+
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
45
|
+
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
46
|
+
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
|
|
47
|
+
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
48
|
+
c69,-144,104.5,-217.7,106.5,-221
|
|
49
|
+
l`+t/2.075+" -"+t+`
|
|
50
|
+
c5.3,-9.3,12,-14,20,-14
|
|
51
|
+
H400000v`+(40+t)+`H845.2724
|
|
52
|
+
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
53
|
+
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
54
|
+
M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},yC=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119
|
|
55
|
+
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
56
|
+
c340,-704.7,510.7,-1060.3,512,-1067
|
|
57
|
+
l`+t/2.084+" -"+t+`
|
|
58
|
+
c4.7,-7.3,11,-11,19,-11
|
|
59
|
+
H40000v`+(40+t)+`H1012.3
|
|
60
|
+
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
61
|
+
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
|
|
62
|
+
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
63
|
+
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
64
|
+
M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},xC=function(t,n){return"M983 "+(10+t+n)+`
|
|
65
|
+
l`+t/3.13+" -"+t+`
|
|
66
|
+
c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
|
|
67
|
+
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
|
|
68
|
+
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
|
|
69
|
+
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
70
|
+
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
71
|
+
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
72
|
+
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
73
|
+
M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},wC=function(t,n){return"M424,"+(2398+t+n)+`
|
|
74
|
+
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
75
|
+
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
|
|
76
|
+
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
77
|
+
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
78
|
+
l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
|
|
79
|
+
v`+(40+t)+`H1014.6
|
|
80
|
+
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
81
|
+
c-2,6,-10,9,-24,9
|
|
82
|
+
c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+`
|
|
83
|
+
h400000v`+(40+t)+"h-400000z"},SC=function(t,n){return"M473,"+(2713+t+n)+`
|
|
84
|
+
c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
|
|
85
|
+
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
|
|
86
|
+
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
87
|
+
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
|
|
88
|
+
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
|
|
89
|
+
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
90
|
+
606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},kC=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},EC=function(t,n,a){var s=a-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+`
|
|
91
|
+
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
|
|
92
|
+
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
93
|
+
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
94
|
+
219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},TC=function(t,n,a){n=1e3*n;var s="";switch(t){case"sqrtMain":s=vC(n,Vs);break;case"sqrtSize1":s=yC(n,Vs);break;case"sqrtSize2":s=xC(n,Vs);break;case"sqrtSize3":s=wC(n,Vs);break;case"sqrtSize4":s=SC(n,Vs);break;case"sqrtTall":s=EC(n,Vs,a)}return s},NC=function(t,n){switch(t){case"⎜":return Un("M291 0 H417 V"+n+" H291z");case"∣":return Un("M145 0 H188 V"+n+" H145z");case"∥":return Un("M145 0 H188 V"+n+" H145z")+Un("M367 0 H410 V"+n+" H367z");case"⎟":return Un("M457 0 H583 V"+n+" H457z");case"⎢":return Un("M319 0 H403 V"+n+" H319z");case"⎥":return Un("M263 0 H347 V"+n+" H263z");case"⎪":return Un("M384 0 H504 V"+n+" H384z");case"⏐":return Un("M312 0 H355 V"+n+" H312z");case"‖":return Un("M257 0 H300 V"+n+" H257z")+Un("M478 0 H521 V"+n+" H478z");default:return""}},v4={doubleleftarrow:`M262 157
|
|
95
|
+
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
|
|
96
|
+
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
|
|
97
|
+
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
|
|
98
|
+
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
|
|
99
|
+
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
|
|
100
|
+
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
101
|
+
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
102
|
+
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
103
|
+
-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
|
|
104
|
+
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
|
|
105
|
+
-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
|
|
106
|
+
-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
|
|
107
|
+
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
108
|
+
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
|
|
109
|
+
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
110
|
+
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
|
|
111
|
+
-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
|
|
112
|
+
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
|
|
113
|
+
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
|
|
114
|
+
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
|
|
115
|
+
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
116
|
+
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
117
|
+
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
|
|
118
|
+
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
|
|
119
|
+
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
120
|
+
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
121
|
+
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
|
|
122
|
+
435 0h399565z`,leftgroupunder:`M400000 262
|
|
123
|
+
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
|
|
124
|
+
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
125
|
+
-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
|
|
126
|
+
-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
|
|
127
|
+
-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
|
|
128
|
+
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
|
|
129
|
+
-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
|
|
130
|
+
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
131
|
+
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
132
|
+
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
133
|
+
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
|
|
134
|
+
-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
|
|
135
|
+
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
|
|
136
|
+
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
137
|
+
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
|
|
138
|
+
-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
|
|
139
|
+
-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
|
|
140
|
+
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Un("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Un("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Un("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Un("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
141
|
+
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
142
|
+
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
|
|
143
|
+
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Un("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334
|
|
144
|
+
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
|
|
145
|
+
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
146
|
+
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
|
|
147
|
+
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
148
|
+
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
|
|
149
|
+
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
150
|
+
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
|
|
151
|
+
-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
|
|
152
|
+
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
153
|
+
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
|
|
154
|
+
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
|
|
155
|
+
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
156
|
+
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
157
|
+
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
|
|
158
|
+
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
159
|
+
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
|
|
160
|
+
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
|
|
161
|
+
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
162
|
+
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
163
|
+
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
|
|
164
|
+
-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
|
|
165
|
+
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
|
|
166
|
+
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
|
|
167
|
+
-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
|
|
168
|
+
-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
|
|
169
|
+
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
170
|
+
-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
|
|
171
|
+
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
|
|
172
|
+
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
|
|
173
|
+
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
174
|
+
-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
|
|
175
|
+
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
|
|
176
|
+
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
|
|
177
|
+
-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
|
|
178
|
+
-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
|
|
179
|
+
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
|
|
180
|
+
-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
|
|
181
|
+
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
|
|
182
|
+
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
|
|
183
|
+
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
|
|
184
|
+
-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
|
|
185
|
+
-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
|
|
186
|
+
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
|
|
187
|
+
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
|
|
188
|
+
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
189
|
+
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
|
|
190
|
+
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
|
|
191
|
+
-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
|
|
192
|
+
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Un("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Un("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Un("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
|
|
193
|
+
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
194
|
+
-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
|
|
195
|
+
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
196
|
+
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
|
|
197
|
+
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
198
|
+
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
199
|
+
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
200
|
+
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
|
|
201
|
+
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
|
|
202
|
+
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
|
|
203
|
+
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
204
|
+
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
205
|
+
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
|
|
206
|
+
-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
|
|
207
|
+
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
|
|
208
|
+
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
209
|
+
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
210
|
+
-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
|
|
211
|
+
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
212
|
+
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
|
|
213
|
+
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
|
|
214
|
+
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
215
|
+
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
216
|
+
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
217
|
+
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
218
|
+
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
219
|
+
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
220
|
+
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
221
|
+
-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
|
|
222
|
+
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
223
|
+
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
|
|
224
|
+
-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
|
|
225
|
+
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
226
|
+
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
227
|
+
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
|
|
228
|
+
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
|
|
229
|
+
-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
|
|
230
|
+
-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
|
|
231
|
+
-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,
|
|
232
|
+
-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,
|
|
233
|
+
-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,
|
|
234
|
+
-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,
|
|
235
|
+
-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
|
|
236
|
+
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
237
|
+
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
|
|
238
|
+
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
|
|
239
|
+
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
|
|
240
|
+
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
|
|
241
|
+
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
242
|
+
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
243
|
+
-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
|
|
244
|
+
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
|
|
245
|
+
-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
|
|
246
|
+
-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
|
|
247
|
+
-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
|
|
248
|
+
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
249
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
250
|
+
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
|
|
251
|
+
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
252
|
+
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
253
|
+
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
254
|
+
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,
|
|
255
|
+
-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
|
|
256
|
+
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
|
|
257
|
+
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
|
|
258
|
+
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,
|
|
259
|
+
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,
|
|
260
|
+
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
261
|
+
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
|
|
262
|
+
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,
|
|
263
|
+
-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
|
|
264
|
+
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
|
|
265
|
+
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},CC=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 v84 h347 v-84
|
|
266
|
+
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
|
|
267
|
+
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
|
|
268
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
269
|
+
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
|
|
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
|
|
272
|
+
M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15
|
|
273
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
274
|
+
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
|
|
275
|
+
MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z
|
|
276
|
+
MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z
|
|
277
|
+
M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z
|
|
278
|
+
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
|
|
279
|
+
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,
|
|
280
|
+
-36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
281
|
+
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
|
|
282
|
+
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,
|
|
283
|
+
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
284
|
+
l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
285
|
+
-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,
|
|
286
|
+
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
287
|
+
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+`
|
|
288
|
+
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
|
|
289
|
+
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
|
|
290
|
+
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
|
|
291
|
+
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
292
|
+
l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
293
|
+
-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 RC(e){return"toText"in e}class ol{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(RC(t))return t.toText();throw new Error("Expected MathDomNode with toText, got "+t.constructor.name)}).join("")}}var ah={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},AC={ex:!0,em:!0,mu:!0},J3=function(t){return typeof t!="string"&&(t=t.unit),t in ah||t in AC||t==="ex"},gn=function(t,n){var a;if(t.unit in ah)a=ah[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 Ae("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(" ")},tp=function(t){var n="";for(var a of Object.keys(t)){var s=t[a];s!==void 0&&(n+=rC(a)+":"+s+";")}return n},e5=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)}},t5=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},_C=/[\s"'>/=\x00-\x1f]/,n5=function(t){var n="<"+t;this.classes.length&&(n+=' class="'+nr(Ni(this.classes))+'"');var a=tp(this.style);a&&(n+=' style="'+nr(a)+'"');for(var s of Object.keys(this.attributes)){if(_C.test(s))throw new Ae("Invalid attribute name '"+s+"'");n+=" "+s+'="'+nr(this.attributes[s])+'"'}n+=">";for(var o=0;o<this.children.length;o++)n+=this.children[o].toMarkup();return n+="</"+t+">",n};class cl{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,e5.call(this,t,a,s),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return t5.call(this,"span")}toMarkup(){return n5.call(this,"span")}}class Ku{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,e5.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 t5.call(this,"a")}toMarkup(){return n5.call(this,"a")}}class IC{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="'+nr(this.src)+'"'+(' alt="'+nr(this.alt)+'"'),n=tp(this.style);return n&&(t+=' style="'+nr(n)+'"'),t+="'/>",t}}var MC={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class Lr{constructor(t,n,a,s,o,c,d,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=o||0,this.width=c||0,this.classes=d||[],this.style=m||{},this.maxFontSize=0;var h=bC(this.text.charCodeAt(0));h&&this.classes.push(h+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=MC[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+=nr(Ni(this.classes)),n+='"');var a="";this.italic>0&&(a+="margin-right:"+De(this.italic)+";"),a+=tp(this.style),a&&(t=!0,n+=' style="'+nr(a)+'"');var s=nr(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+'="'+nr(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",v4[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+nr(this.alternate)+'"/>':'<path d="'+nr(v4[this.pathName])+'"/>'}}class ih{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+'="'+nr(this.attributes[n])+'"';return t+="/>",t}}function OC(e){if(e instanceof Lr)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function DC(e){if(e instanceof cl)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var jC=e=>e instanceof cl||e instanceof Ku||e instanceof ol,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]}},tu={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]},y4={Å:"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 r5(e,t){da[e]=t}function np(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 y4&&(a=y4[e[0]].charCodeAt(0),s=da[t][a]),!s&&n==="text"&&Q3(a)&&(s=da[t][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var jf={};function LC(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!jf[t]){var n=jf[t]={cssEmPerMu:tu.quad[t]/18};for(var a in tu)tu.hasOwnProperty(a)&&(n[a]=tu[a][t])}return jf[t]}var fn={math:{},text:{}};function w(e,t,n,a,s,o){fn[e][s]={font:t,group:n,replace:a},o&&a&&(fn[e][a]=fn[e][s])}var S="math",Ne="text",M="main",V="ams",mn="accent-token",He="bin",ur="close",ul="inner",tt="mathord",zn="op-token",zr="open",Mo="punct",Y="rel",$a="spacing",ie="textord";w(S,M,Y,"≡","\\equiv",!0);w(S,M,Y,"≺","\\prec",!0);w(S,M,Y,"≻","\\succ",!0);w(S,M,Y,"∼","\\sim",!0);w(S,M,Y,"⊥","\\perp");w(S,M,Y,"⪯","\\preceq",!0);w(S,M,Y,"⪰","\\succeq",!0);w(S,M,Y,"≃","\\simeq",!0);w(S,M,Y,"∣","\\mid",!0);w(S,M,Y,"≪","\\ll",!0);w(S,M,Y,"≫","\\gg",!0);w(S,M,Y,"≍","\\asymp",!0);w(S,M,Y,"∥","\\parallel");w(S,M,Y,"⋈","\\bowtie",!0);w(S,M,Y,"⌣","\\smile",!0);w(S,M,Y,"⊑","\\sqsubseteq",!0);w(S,M,Y,"⊒","\\sqsupseteq",!0);w(S,M,Y,"≐","\\doteq",!0);w(S,M,Y,"⌢","\\frown",!0);w(S,M,Y,"∋","\\ni",!0);w(S,M,Y,"∝","\\propto",!0);w(S,M,Y,"⊢","\\vdash",!0);w(S,M,Y,"⊣","\\dashv",!0);w(S,M,Y,"∋","\\owns");w(S,M,Mo,".","\\ldotp");w(S,M,Mo,"⋅","\\cdotp");w(S,M,Mo,"⋅","·");w(Ne,M,ie,"⋅","·");w(S,M,ie,"#","\\#");w(Ne,M,ie,"#","\\#");w(S,M,ie,"&","\\&");w(Ne,M,ie,"&","\\&");w(S,M,ie,"ℵ","\\aleph",!0);w(S,M,ie,"∀","\\forall",!0);w(S,M,ie,"ℏ","\\hbar",!0);w(S,M,ie,"∃","\\exists",!0);w(S,M,ie,"∇","\\nabla",!0);w(S,M,ie,"♭","\\flat",!0);w(S,M,ie,"ℓ","\\ell",!0);w(S,M,ie,"♮","\\natural",!0);w(S,M,ie,"♣","\\clubsuit",!0);w(S,M,ie,"℘","\\wp",!0);w(S,M,ie,"♯","\\sharp",!0);w(S,M,ie,"♢","\\diamondsuit",!0);w(S,M,ie,"ℜ","\\Re",!0);w(S,M,ie,"♡","\\heartsuit",!0);w(S,M,ie,"ℑ","\\Im",!0);w(S,M,ie,"♠","\\spadesuit",!0);w(S,M,ie,"§","\\S",!0);w(Ne,M,ie,"§","\\S");w(S,M,ie,"¶","\\P",!0);w(Ne,M,ie,"¶","\\P");w(S,M,ie,"†","\\dag");w(Ne,M,ie,"†","\\dag");w(Ne,M,ie,"†","\\textdagger");w(S,M,ie,"‡","\\ddag");w(Ne,M,ie,"‡","\\ddag");w(Ne,M,ie,"‡","\\textdaggerdbl");w(S,M,ur,"⎱","\\rmoustache",!0);w(S,M,zr,"⎰","\\lmoustache",!0);w(S,M,ur,"⟯","\\rgroup",!0);w(S,M,zr,"⟮","\\lgroup",!0);w(S,M,He,"∓","\\mp",!0);w(S,M,He,"⊖","\\ominus",!0);w(S,M,He,"⊎","\\uplus",!0);w(S,M,He,"⊓","\\sqcap",!0);w(S,M,He,"∗","\\ast");w(S,M,He,"⊔","\\sqcup",!0);w(S,M,He,"◯","\\bigcirc",!0);w(S,M,He,"∙","\\bullet",!0);w(S,M,He,"‡","\\ddagger");w(S,M,He,"≀","\\wr",!0);w(S,M,He,"⨿","\\amalg");w(S,M,He,"&","\\And");w(S,M,Y,"⟵","\\longleftarrow",!0);w(S,M,Y,"⇐","\\Leftarrow",!0);w(S,M,Y,"⟸","\\Longleftarrow",!0);w(S,M,Y,"⟶","\\longrightarrow",!0);w(S,M,Y,"⇒","\\Rightarrow",!0);w(S,M,Y,"⟹","\\Longrightarrow",!0);w(S,M,Y,"↔","\\leftrightarrow",!0);w(S,M,Y,"⟷","\\longleftrightarrow",!0);w(S,M,Y,"⇔","\\Leftrightarrow",!0);w(S,M,Y,"⟺","\\Longleftrightarrow",!0);w(S,M,Y,"↦","\\mapsto",!0);w(S,M,Y,"⟼","\\longmapsto",!0);w(S,M,Y,"↗","\\nearrow",!0);w(S,M,Y,"↩","\\hookleftarrow",!0);w(S,M,Y,"↪","\\hookrightarrow",!0);w(S,M,Y,"↘","\\searrow",!0);w(S,M,Y,"↼","\\leftharpoonup",!0);w(S,M,Y,"⇀","\\rightharpoonup",!0);w(S,M,Y,"↙","\\swarrow",!0);w(S,M,Y,"↽","\\leftharpoondown",!0);w(S,M,Y,"⇁","\\rightharpoondown",!0);w(S,M,Y,"↖","\\nwarrow",!0);w(S,M,Y,"⇌","\\rightleftharpoons",!0);w(S,V,Y,"≮","\\nless",!0);w(S,V,Y,"","\\@nleqslant");w(S,V,Y,"","\\@nleqq");w(S,V,Y,"⪇","\\lneq",!0);w(S,V,Y,"≨","\\lneqq",!0);w(S,V,Y,"","\\@lvertneqq");w(S,V,Y,"⋦","\\lnsim",!0);w(S,V,Y,"⪉","\\lnapprox",!0);w(S,V,Y,"⊀","\\nprec",!0);w(S,V,Y,"⋠","\\npreceq",!0);w(S,V,Y,"⋨","\\precnsim",!0);w(S,V,Y,"⪹","\\precnapprox",!0);w(S,V,Y,"≁","\\nsim",!0);w(S,V,Y,"","\\@nshortmid");w(S,V,Y,"∤","\\nmid",!0);w(S,V,Y,"⊬","\\nvdash",!0);w(S,V,Y,"⊭","\\nvDash",!0);w(S,V,Y,"⋪","\\ntriangleleft");w(S,V,Y,"⋬","\\ntrianglelefteq",!0);w(S,V,Y,"⊊","\\subsetneq",!0);w(S,V,Y,"","\\@varsubsetneq");w(S,V,Y,"⫋","\\subsetneqq",!0);w(S,V,Y,"","\\@varsubsetneqq");w(S,V,Y,"≯","\\ngtr",!0);w(S,V,Y,"","\\@ngeqslant");w(S,V,Y,"","\\@ngeqq");w(S,V,Y,"⪈","\\gneq",!0);w(S,V,Y,"≩","\\gneqq",!0);w(S,V,Y,"","\\@gvertneqq");w(S,V,Y,"⋧","\\gnsim",!0);w(S,V,Y,"⪊","\\gnapprox",!0);w(S,V,Y,"⊁","\\nsucc",!0);w(S,V,Y,"⋡","\\nsucceq",!0);w(S,V,Y,"⋩","\\succnsim",!0);w(S,V,Y,"⪺","\\succnapprox",!0);w(S,V,Y,"≆","\\ncong",!0);w(S,V,Y,"","\\@nshortparallel");w(S,V,Y,"∦","\\nparallel",!0);w(S,V,Y,"⊯","\\nVDash",!0);w(S,V,Y,"⋫","\\ntriangleright");w(S,V,Y,"⋭","\\ntrianglerighteq",!0);w(S,V,Y,"","\\@nsupseteqq");w(S,V,Y,"⊋","\\supsetneq",!0);w(S,V,Y,"","\\@varsupsetneq");w(S,V,Y,"⫌","\\supsetneqq",!0);w(S,V,Y,"","\\@varsupsetneqq");w(S,V,Y,"⊮","\\nVdash",!0);w(S,V,Y,"⪵","\\precneqq",!0);w(S,V,Y,"⪶","\\succneqq",!0);w(S,V,Y,"","\\@nsubseteqq");w(S,V,He,"⊴","\\unlhd");w(S,V,He,"⊵","\\unrhd");w(S,V,Y,"↚","\\nleftarrow",!0);w(S,V,Y,"↛","\\nrightarrow",!0);w(S,V,Y,"⇍","\\nLeftarrow",!0);w(S,V,Y,"⇏","\\nRightarrow",!0);w(S,V,Y,"↮","\\nleftrightarrow",!0);w(S,V,Y,"⇎","\\nLeftrightarrow",!0);w(S,V,Y,"△","\\vartriangle");w(S,V,ie,"ℏ","\\hslash");w(S,V,ie,"▽","\\triangledown");w(S,V,ie,"◊","\\lozenge");w(S,V,ie,"Ⓢ","\\circledS");w(S,V,ie,"®","\\circledR");w(Ne,V,ie,"®","\\circledR");w(S,V,ie,"∡","\\measuredangle",!0);w(S,V,ie,"∄","\\nexists");w(S,V,ie,"℧","\\mho");w(S,V,ie,"Ⅎ","\\Finv",!0);w(S,V,ie,"⅁","\\Game",!0);w(S,V,ie,"‵","\\backprime");w(S,V,ie,"▲","\\blacktriangle");w(S,V,ie,"▼","\\blacktriangledown");w(S,V,ie,"■","\\blacksquare");w(S,V,ie,"⧫","\\blacklozenge");w(S,V,ie,"★","\\bigstar");w(S,V,ie,"∢","\\sphericalangle",!0);w(S,V,ie,"∁","\\complement",!0);w(S,V,ie,"ð","\\eth",!0);w(Ne,M,ie,"ð","ð");w(S,V,ie,"╱","\\diagup");w(S,V,ie,"╲","\\diagdown");w(S,V,ie,"□","\\square");w(S,V,ie,"□","\\Box");w(S,V,ie,"◊","\\Diamond");w(S,V,ie,"¥","\\yen",!0);w(Ne,V,ie,"¥","\\yen",!0);w(S,V,ie,"✓","\\checkmark",!0);w(Ne,V,ie,"✓","\\checkmark");w(S,V,ie,"ℶ","\\beth",!0);w(S,V,ie,"ℸ","\\daleth",!0);w(S,V,ie,"ℷ","\\gimel",!0);w(S,V,ie,"ϝ","\\digamma",!0);w(S,V,ie,"ϰ","\\varkappa");w(S,V,zr,"┌","\\@ulcorner",!0);w(S,V,ur,"┐","\\@urcorner",!0);w(S,V,zr,"└","\\@llcorner",!0);w(S,V,ur,"┘","\\@lrcorner",!0);w(S,V,Y,"≦","\\leqq",!0);w(S,V,Y,"⩽","\\leqslant",!0);w(S,V,Y,"⪕","\\eqslantless",!0);w(S,V,Y,"≲","\\lesssim",!0);w(S,V,Y,"⪅","\\lessapprox",!0);w(S,V,Y,"≊","\\approxeq",!0);w(S,V,He,"⋖","\\lessdot");w(S,V,Y,"⋘","\\lll",!0);w(S,V,Y,"≶","\\lessgtr",!0);w(S,V,Y,"⋚","\\lesseqgtr",!0);w(S,V,Y,"⪋","\\lesseqqgtr",!0);w(S,V,Y,"≑","\\doteqdot");w(S,V,Y,"≓","\\risingdotseq",!0);w(S,V,Y,"≒","\\fallingdotseq",!0);w(S,V,Y,"∽","\\backsim",!0);w(S,V,Y,"⋍","\\backsimeq",!0);w(S,V,Y,"⫅","\\subseteqq",!0);w(S,V,Y,"⋐","\\Subset",!0);w(S,V,Y,"⊏","\\sqsubset",!0);w(S,V,Y,"≼","\\preccurlyeq",!0);w(S,V,Y,"⋞","\\curlyeqprec",!0);w(S,V,Y,"≾","\\precsim",!0);w(S,V,Y,"⪷","\\precapprox",!0);w(S,V,Y,"⊲","\\vartriangleleft");w(S,V,Y,"⊴","\\trianglelefteq");w(S,V,Y,"⊨","\\vDash",!0);w(S,V,Y,"⊪","\\Vvdash",!0);w(S,V,Y,"⌣","\\smallsmile");w(S,V,Y,"⌢","\\smallfrown");w(S,V,Y,"≏","\\bumpeq",!0);w(S,V,Y,"≎","\\Bumpeq",!0);w(S,V,Y,"≧","\\geqq",!0);w(S,V,Y,"⩾","\\geqslant",!0);w(S,V,Y,"⪖","\\eqslantgtr",!0);w(S,V,Y,"≳","\\gtrsim",!0);w(S,V,Y,"⪆","\\gtrapprox",!0);w(S,V,He,"⋗","\\gtrdot");w(S,V,Y,"⋙","\\ggg",!0);w(S,V,Y,"≷","\\gtrless",!0);w(S,V,Y,"⋛","\\gtreqless",!0);w(S,V,Y,"⪌","\\gtreqqless",!0);w(S,V,Y,"≖","\\eqcirc",!0);w(S,V,Y,"≗","\\circeq",!0);w(S,V,Y,"≜","\\triangleq",!0);w(S,V,Y,"∼","\\thicksim");w(S,V,Y,"≈","\\thickapprox");w(S,V,Y,"⫆","\\supseteqq",!0);w(S,V,Y,"⋑","\\Supset",!0);w(S,V,Y,"⊐","\\sqsupset",!0);w(S,V,Y,"≽","\\succcurlyeq",!0);w(S,V,Y,"⋟","\\curlyeqsucc",!0);w(S,V,Y,"≿","\\succsim",!0);w(S,V,Y,"⪸","\\succapprox",!0);w(S,V,Y,"⊳","\\vartriangleright");w(S,V,Y,"⊵","\\trianglerighteq");w(S,V,Y,"⊩","\\Vdash",!0);w(S,V,Y,"∣","\\shortmid");w(S,V,Y,"∥","\\shortparallel");w(S,V,Y,"≬","\\between",!0);w(S,V,Y,"⋔","\\pitchfork",!0);w(S,V,Y,"∝","\\varpropto");w(S,V,Y,"◀","\\blacktriangleleft");w(S,V,Y,"∴","\\therefore",!0);w(S,V,Y,"∍","\\backepsilon");w(S,V,Y,"▶","\\blacktriangleright");w(S,V,Y,"∵","\\because",!0);w(S,V,Y,"⋘","\\llless");w(S,V,Y,"⋙","\\gggtr");w(S,V,He,"⊲","\\lhd");w(S,V,He,"⊳","\\rhd");w(S,V,Y,"≂","\\eqsim",!0);w(S,M,Y,"⋈","\\Join");w(S,V,Y,"≑","\\Doteq",!0);w(S,V,He,"∔","\\dotplus",!0);w(S,V,He,"∖","\\smallsetminus");w(S,V,He,"⋒","\\Cap",!0);w(S,V,He,"⋓","\\Cup",!0);w(S,V,He,"⩞","\\doublebarwedge",!0);w(S,V,He,"⊟","\\boxminus",!0);w(S,V,He,"⊞","\\boxplus",!0);w(S,V,He,"⋇","\\divideontimes",!0);w(S,V,He,"⋉","\\ltimes",!0);w(S,V,He,"⋊","\\rtimes",!0);w(S,V,He,"⋋","\\leftthreetimes",!0);w(S,V,He,"⋌","\\rightthreetimes",!0);w(S,V,He,"⋏","\\curlywedge",!0);w(S,V,He,"⋎","\\curlyvee",!0);w(S,V,He,"⊝","\\circleddash",!0);w(S,V,He,"⊛","\\circledast",!0);w(S,V,He,"⋅","\\centerdot");w(S,V,He,"⊺","\\intercal",!0);w(S,V,He,"⋒","\\doublecap");w(S,V,He,"⋓","\\doublecup");w(S,V,He,"⊠","\\boxtimes",!0);w(S,V,Y,"⇢","\\dashrightarrow",!0);w(S,V,Y,"⇠","\\dashleftarrow",!0);w(S,V,Y,"⇇","\\leftleftarrows",!0);w(S,V,Y,"⇆","\\leftrightarrows",!0);w(S,V,Y,"⇚","\\Lleftarrow",!0);w(S,V,Y,"↞","\\twoheadleftarrow",!0);w(S,V,Y,"↢","\\leftarrowtail",!0);w(S,V,Y,"↫","\\looparrowleft",!0);w(S,V,Y,"⇋","\\leftrightharpoons",!0);w(S,V,Y,"↶","\\curvearrowleft",!0);w(S,V,Y,"↺","\\circlearrowleft",!0);w(S,V,Y,"↰","\\Lsh",!0);w(S,V,Y,"⇈","\\upuparrows",!0);w(S,V,Y,"↿","\\upharpoonleft",!0);w(S,V,Y,"⇃","\\downharpoonleft",!0);w(S,M,Y,"⊶","\\origof",!0);w(S,M,Y,"⊷","\\imageof",!0);w(S,V,Y,"⊸","\\multimap",!0);w(S,V,Y,"↭","\\leftrightsquigarrow",!0);w(S,V,Y,"⇉","\\rightrightarrows",!0);w(S,V,Y,"⇄","\\rightleftarrows",!0);w(S,V,Y,"↠","\\twoheadrightarrow",!0);w(S,V,Y,"↣","\\rightarrowtail",!0);w(S,V,Y,"↬","\\looparrowright",!0);w(S,V,Y,"↷","\\curvearrowright",!0);w(S,V,Y,"↻","\\circlearrowright",!0);w(S,V,Y,"↱","\\Rsh",!0);w(S,V,Y,"⇊","\\downdownarrows",!0);w(S,V,Y,"↾","\\upharpoonright",!0);w(S,V,Y,"⇂","\\downharpoonright",!0);w(S,V,Y,"⇝","\\rightsquigarrow",!0);w(S,V,Y,"⇝","\\leadsto");w(S,V,Y,"⇛","\\Rrightarrow",!0);w(S,V,Y,"↾","\\restriction");w(S,M,ie,"‘","`");w(S,M,ie,"$","\\$");w(Ne,M,ie,"$","\\$");w(Ne,M,ie,"$","\\textdollar");w(S,M,ie,"%","\\%");w(Ne,M,ie,"%","\\%");w(S,M,ie,"_","\\_");w(Ne,M,ie,"_","\\_");w(Ne,M,ie,"_","\\textunderscore");w(S,M,ie,"∠","\\angle",!0);w(S,M,ie,"∞","\\infty",!0);w(S,M,ie,"′","\\prime");w(S,M,ie,"△","\\triangle");w(S,M,ie,"Γ","\\Gamma",!0);w(S,M,ie,"Δ","\\Delta",!0);w(S,M,ie,"Θ","\\Theta",!0);w(S,M,ie,"Λ","\\Lambda",!0);w(S,M,ie,"Ξ","\\Xi",!0);w(S,M,ie,"Π","\\Pi",!0);w(S,M,ie,"Σ","\\Sigma",!0);w(S,M,ie,"Υ","\\Upsilon",!0);w(S,M,ie,"Φ","\\Phi",!0);w(S,M,ie,"Ψ","\\Psi",!0);w(S,M,ie,"Ω","\\Omega",!0);w(S,M,ie,"A","Α");w(S,M,ie,"B","Β");w(S,M,ie,"E","Ε");w(S,M,ie,"Z","Ζ");w(S,M,ie,"H","Η");w(S,M,ie,"I","Ι");w(S,M,ie,"K","Κ");w(S,M,ie,"M","Μ");w(S,M,ie,"N","Ν");w(S,M,ie,"O","Ο");w(S,M,ie,"P","Ρ");w(S,M,ie,"T","Τ");w(S,M,ie,"X","Χ");w(S,M,ie,"¬","\\neg",!0);w(S,M,ie,"¬","\\lnot");w(S,M,ie,"⊤","\\top");w(S,M,ie,"⊥","\\bot");w(S,M,ie,"∅","\\emptyset");w(S,V,ie,"∅","\\varnothing");w(S,M,tt,"α","\\alpha",!0);w(S,M,tt,"β","\\beta",!0);w(S,M,tt,"γ","\\gamma",!0);w(S,M,tt,"δ","\\delta",!0);w(S,M,tt,"ϵ","\\epsilon",!0);w(S,M,tt,"ζ","\\zeta",!0);w(S,M,tt,"η","\\eta",!0);w(S,M,tt,"θ","\\theta",!0);w(S,M,tt,"ι","\\iota",!0);w(S,M,tt,"κ","\\kappa",!0);w(S,M,tt,"λ","\\lambda",!0);w(S,M,tt,"μ","\\mu",!0);w(S,M,tt,"ν","\\nu",!0);w(S,M,tt,"ξ","\\xi",!0);w(S,M,tt,"ο","\\omicron",!0);w(S,M,tt,"π","\\pi",!0);w(S,M,tt,"ρ","\\rho",!0);w(S,M,tt,"σ","\\sigma",!0);w(S,M,tt,"τ","\\tau",!0);w(S,M,tt,"υ","\\upsilon",!0);w(S,M,tt,"ϕ","\\phi",!0);w(S,M,tt,"χ","\\chi",!0);w(S,M,tt,"ψ","\\psi",!0);w(S,M,tt,"ω","\\omega",!0);w(S,M,tt,"ε","\\varepsilon",!0);w(S,M,tt,"ϑ","\\vartheta",!0);w(S,M,tt,"ϖ","\\varpi",!0);w(S,M,tt,"ϱ","\\varrho",!0);w(S,M,tt,"ς","\\varsigma",!0);w(S,M,tt,"φ","\\varphi",!0);w(S,M,He,"∗","*",!0);w(S,M,He,"+","+");w(S,M,He,"−","-",!0);w(S,M,He,"⋅","\\cdot",!0);w(S,M,He,"∘","\\circ",!0);w(S,M,He,"÷","\\div",!0);w(S,M,He,"±","\\pm",!0);w(S,M,He,"×","\\times",!0);w(S,M,He,"∩","\\cap",!0);w(S,M,He,"∪","\\cup",!0);w(S,M,He,"∖","\\setminus",!0);w(S,M,He,"∧","\\land");w(S,M,He,"∨","\\lor");w(S,M,He,"∧","\\wedge",!0);w(S,M,He,"∨","\\vee",!0);w(S,M,ie,"√","\\surd");w(S,M,zr,"⟨","\\langle",!0);w(S,M,zr,"∣","\\lvert");w(S,M,zr,"∥","\\lVert");w(S,M,ur,"?","?");w(S,M,ur,"!","!");w(S,M,ur,"⟩","\\rangle",!0);w(S,M,ur,"∣","\\rvert");w(S,M,ur,"∥","\\rVert");w(S,M,Y,"=","=");w(S,M,Y,":",":");w(S,M,Y,"≈","\\approx",!0);w(S,M,Y,"≅","\\cong",!0);w(S,M,Y,"≥","\\ge");w(S,M,Y,"≥","\\geq",!0);w(S,M,Y,"←","\\gets");w(S,M,Y,">","\\gt",!0);w(S,M,Y,"∈","\\in",!0);w(S,M,Y,"","\\@not");w(S,M,Y,"⊂","\\subset",!0);w(S,M,Y,"⊃","\\supset",!0);w(S,M,Y,"⊆","\\subseteq",!0);w(S,M,Y,"⊇","\\supseteq",!0);w(S,V,Y,"⊈","\\nsubseteq",!0);w(S,V,Y,"⊉","\\nsupseteq",!0);w(S,M,Y,"⊨","\\models");w(S,M,Y,"←","\\leftarrow",!0);w(S,M,Y,"≤","\\le");w(S,M,Y,"≤","\\leq",!0);w(S,M,Y,"<","\\lt",!0);w(S,M,Y,"→","\\rightarrow",!0);w(S,M,Y,"→","\\to");w(S,V,Y,"≱","\\ngeq",!0);w(S,V,Y,"≰","\\nleq",!0);w(S,M,$a," ","\\ ");w(S,M,$a," ","\\space");w(S,M,$a," ","\\nobreakspace");w(Ne,M,$a," ","\\ ");w(Ne,M,$a," "," ");w(Ne,M,$a," ","\\space");w(Ne,M,$a," ","\\nobreakspace");w(S,M,$a,"","\\nobreak");w(S,M,$a,"","\\allowbreak");w(S,M,Mo,",",",");w(S,M,Mo,";",";");w(S,V,He,"⊼","\\barwedge",!0);w(S,V,He,"⊻","\\veebar",!0);w(S,M,He,"⊙","\\odot",!0);w(S,M,He,"⊕","\\oplus",!0);w(S,M,He,"⊗","\\otimes",!0);w(S,M,ie,"∂","\\partial",!0);w(S,M,He,"⊘","\\oslash",!0);w(S,V,He,"⊚","\\circledcirc",!0);w(S,V,He,"⊡","\\boxdot",!0);w(S,M,He,"△","\\bigtriangleup");w(S,M,He,"▽","\\bigtriangledown");w(S,M,He,"†","\\dagger");w(S,M,He,"⋄","\\diamond");w(S,M,He,"⋆","\\star");w(S,M,He,"◃","\\triangleleft");w(S,M,He,"▹","\\triangleright");w(S,M,zr,"{","\\{");w(Ne,M,ie,"{","\\{");w(Ne,M,ie,"{","\\textbraceleft");w(S,M,ur,"}","\\}");w(Ne,M,ie,"}","\\}");w(Ne,M,ie,"}","\\textbraceright");w(S,M,zr,"{","\\lbrace");w(S,M,ur,"}","\\rbrace");w(S,M,zr,"[","\\lbrack",!0);w(Ne,M,ie,"[","\\lbrack",!0);w(S,M,ur,"]","\\rbrack",!0);w(Ne,M,ie,"]","\\rbrack",!0);w(S,M,zr,"(","\\lparen",!0);w(S,M,ur,")","\\rparen",!0);w(Ne,M,ie,"<","\\textless",!0);w(Ne,M,ie,">","\\textgreater",!0);w(S,M,zr,"⌊","\\lfloor",!0);w(S,M,ur,"⌋","\\rfloor",!0);w(S,M,zr,"⌈","\\lceil",!0);w(S,M,ur,"⌉","\\rceil",!0);w(S,M,ie,"\\","\\backslash");w(S,M,ie,"∣","|");w(S,M,ie,"∣","\\vert");w(Ne,M,ie,"|","\\textbar",!0);w(S,M,ie,"∥","\\|");w(S,M,ie,"∥","\\Vert");w(Ne,M,ie,"∥","\\textbardbl");w(Ne,M,ie,"~","\\textasciitilde");w(Ne,M,ie,"\\","\\textbackslash");w(Ne,M,ie,"^","\\textasciicircum");w(S,M,Y,"↑","\\uparrow",!0);w(S,M,Y,"⇑","\\Uparrow",!0);w(S,M,Y,"↓","\\downarrow",!0);w(S,M,Y,"⇓","\\Downarrow",!0);w(S,M,Y,"↕","\\updownarrow",!0);w(S,M,Y,"⇕","\\Updownarrow",!0);w(S,M,zn,"∐","\\coprod");w(S,M,zn,"⋁","\\bigvee");w(S,M,zn,"⋀","\\bigwedge");w(S,M,zn,"⨄","\\biguplus");w(S,M,zn,"⋂","\\bigcap");w(S,M,zn,"⋃","\\bigcup");w(S,M,zn,"∫","\\int");w(S,M,zn,"∫","\\intop");w(S,M,zn,"∬","\\iint");w(S,M,zn,"∭","\\iiint");w(S,M,zn,"∏","\\prod");w(S,M,zn,"∑","\\sum");w(S,M,zn,"⨂","\\bigotimes");w(S,M,zn,"⨁","\\bigoplus");w(S,M,zn,"⨀","\\bigodot");w(S,M,zn,"∮","\\oint");w(S,M,zn,"∯","\\oiint");w(S,M,zn,"∰","\\oiiint");w(S,M,zn,"⨆","\\bigsqcup");w(S,M,zn,"∫","\\smallint");w(Ne,M,ul,"…","\\textellipsis");w(S,M,ul,"…","\\mathellipsis");w(Ne,M,ul,"…","\\ldots",!0);w(S,M,ul,"…","\\ldots",!0);w(S,M,ul,"⋯","\\@cdots",!0);w(S,M,ul,"⋱","\\ddots",!0);w(S,M,ie,"⋮","\\varvdots");w(Ne,M,ie,"⋮","\\varvdots");w(S,M,mn,"ˊ","\\acute");w(S,M,mn,"ˋ","\\grave");w(S,M,mn,"¨","\\ddot");w(S,M,mn,"~","\\tilde");w(S,M,mn,"ˉ","\\bar");w(S,M,mn,"˘","\\breve");w(S,M,mn,"ˇ","\\check");w(S,M,mn,"^","\\hat");w(S,M,mn,"⃗","\\vec");w(S,M,mn,"˙","\\dot");w(S,M,mn,"˚","\\mathring");w(S,M,tt,"","\\@imath");w(S,M,tt,"","\\@jmath");w(S,M,ie,"ı","ı");w(S,M,ie,"ȷ","ȷ");w(Ne,M,ie,"ı","\\i",!0);w(Ne,M,ie,"ȷ","\\j",!0);w(Ne,M,ie,"ß","\\ss",!0);w(Ne,M,ie,"æ","\\ae",!0);w(Ne,M,ie,"œ","\\oe",!0);w(Ne,M,ie,"ø","\\o",!0);w(Ne,M,ie,"Æ","\\AE",!0);w(Ne,M,ie,"Œ","\\OE",!0);w(Ne,M,ie,"Ø","\\O",!0);w(Ne,M,mn,"ˊ","\\'");w(Ne,M,mn,"ˋ","\\`");w(Ne,M,mn,"ˆ","\\^");w(Ne,M,mn,"˜","\\~");w(Ne,M,mn,"ˉ","\\=");w(Ne,M,mn,"˘","\\u");w(Ne,M,mn,"˙","\\.");w(Ne,M,mn,"¸","\\c");w(Ne,M,mn,"˚","\\r");w(Ne,M,mn,"ˇ","\\v");w(Ne,M,mn,"¨",'\\"');w(Ne,M,mn,"˝","\\H");w(Ne,M,mn,"◯","\\textcircled");var a5={"--":!0,"---":!0,"``":!0,"''":!0};w(Ne,M,ie,"–","--",!0);w(Ne,M,ie,"–","\\textendash");w(Ne,M,ie,"—","---",!0);w(Ne,M,ie,"—","\\textemdash");w(Ne,M,ie,"‘","`",!0);w(Ne,M,ie,"‘","\\textquoteleft");w(Ne,M,ie,"’","'",!0);w(Ne,M,ie,"’","\\textquoteright");w(Ne,M,ie,"“","``",!0);w(Ne,M,ie,"“","\\textquotedblleft");w(Ne,M,ie,"”","''",!0);w(Ne,M,ie,"”","\\textquotedblright");w(S,M,ie,"°","\\degree",!0);w(Ne,M,ie,"°","\\degree");w(Ne,M,ie,"°","\\textdegree",!0);w(S,M,ie,"£","\\pounds");w(S,M,ie,"£","\\mathsterling",!0);w(Ne,M,ie,"£","\\pounds");w(Ne,M,ie,"£","\\textsterling",!0);w(S,V,ie,"✠","\\maltese");w(Ne,V,ie,"✠","\\maltese");var x4='0123456789/@."';for(var Lf=0;Lf<x4.length;Lf++){var w4=x4.charAt(Lf);w(S,M,ie,w4,w4)}var S4='0123456789!@*()-=+";:?/.,';for(var zf=0;zf<S4.length;zf++){var k4=S4.charAt(zf);w(Ne,M,ie,k4,k4)}var Tu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var Bf=0;Bf<Tu.length;Bf++){var nu=Tu.charAt(Bf);w(S,M,tt,nu,nu),w(Ne,M,ie,nu,nu)}w(S,V,ie,"C","ℂ");w(Ne,V,ie,"C","ℂ");w(S,V,ie,"H","ℍ");w(Ne,V,ie,"H","ℍ");w(S,V,ie,"N","ℕ");w(Ne,V,ie,"N","ℕ");w(S,V,ie,"P","ℙ");w(Ne,V,ie,"P","ℙ");w(S,V,ie,"Q","ℚ");w(Ne,V,ie,"Q","ℚ");w(S,V,ie,"R","ℝ");w(Ne,V,ie,"R","ℝ");w(S,V,ie,"Z","ℤ");w(Ne,V,ie,"Z","ℤ");w(S,M,tt,"h","ℎ");w(Ne,M,tt,"h","ℎ");var ot;for(var sr=0;sr<Tu.length;sr++){var xn=Tu.charAt(sr);ot=String.fromCharCode(55349,56320+sr),w(S,M,tt,xn,ot),w(Ne,M,ie,xn,ot),ot=String.fromCharCode(55349,56372+sr),w(S,M,tt,xn,ot),w(Ne,M,ie,xn,ot),ot=String.fromCharCode(55349,56424+sr),w(S,M,tt,xn,ot),w(Ne,M,ie,xn,ot),ot=String.fromCharCode(55349,56580+sr),w(S,M,tt,xn,ot),w(Ne,M,ie,xn,ot),ot=String.fromCharCode(55349,56684+sr),w(S,M,tt,xn,ot),w(Ne,M,ie,xn,ot),ot=String.fromCharCode(55349,56736+sr),w(S,M,tt,xn,ot),w(Ne,M,ie,xn,ot),ot=String.fromCharCode(55349,56788+sr),w(S,M,tt,xn,ot),w(Ne,M,ie,xn,ot),ot=String.fromCharCode(55349,56840+sr),w(S,M,tt,xn,ot),w(Ne,M,ie,xn,ot),ot=String.fromCharCode(55349,56944+sr),w(S,M,tt,xn,ot),w(Ne,M,ie,xn,ot),sr<26&&(ot=String.fromCharCode(55349,56632+sr),w(S,M,tt,xn,ot),w(Ne,M,ie,xn,ot),ot=String.fromCharCode(55349,56476+sr),w(S,M,tt,xn,ot),w(Ne,M,ie,xn,ot))}ot="𝕜";w(S,M,tt,"k",ot);w(Ne,M,ie,"k",ot);for(var Ji=0;Ji<10;Ji++){var Si=Ji.toString();ot=String.fromCharCode(55349,57294+Ji),w(S,M,tt,Si,ot),w(Ne,M,ie,Si,ot),ot=String.fromCharCode(55349,57314+Ji),w(S,M,tt,Si,ot),w(Ne,M,ie,Si,ot),ot=String.fromCharCode(55349,57324+Ji),w(S,M,tt,Si,ot),w(Ne,M,ie,Si,ot),ot=String.fromCharCode(55349,57334+Ji),w(S,M,tt,Si,ot),w(Ne,M,ie,Si,ot)}var sh="ÐÞþ";for(var qf=0;qf<sh.length;qf++){var ru=sh.charAt(qf);w(S,M,tt,ru,ru),w(Ne,M,ie,ru,ru)}var lh={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},E4={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},T4={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},zC={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},ns={mathClass:"",textClass:"",font:""},N4={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},C4={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},R4={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},oh={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},ch={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},A4={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},uh={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},_4=[lh,lh,E4,E4,T4,T4,zC,ns,ns,ns,N4,N4,C4,C4,R4,R4,oh,oh,ch,ch,A4,A4,ns,ns,uh,uh],BC=[lh,ns,oh,ch,uh],qC=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 _4[s]}else if(120782<=a&&a<=120831){var o=Math.floor((a-120782)/10);return BC[o]}else{if(a===120485||a===120486)return _4[0];if(120486<a&&a<120782)return ns;throw new Ae("Unsupported character: "+e)}},Vu=function(t,n,a){if(fn[a][t]){var s=fn[a][t].replace;s&&(t=s)}return{value:t,metrics:np(t,n,a)}},lr=function(t,n,a,s,o){var c=Vu(t,n,a),d=c.metrics;t=c.value;var m;if(d){var h=d.italic;(a==="text"||s&&s.font==="mathit")&&(h=0),m=new Lr(t,d.height,d.depth,h,d.skew,d.width,o)}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,o);if(s){m.maxFontSize=s.sizeMultiplier,s.style.isTight()&&m.classes.push("mtight");var p=s.getColor();p&&(m.style.color=p)}return m},rp=function(t,n,a,s){return s===void 0&&(s=[]),a.font==="boldsymbol"&&Vu(t,"Main-Bold",n).metrics?lr(t,"Main-Bold",n,a,s.concat(["mathbf"])):t==="\\"||fn[n][t].font==="main"?lr(t,"Main-Regular",n,a,s):lr(t,"AMS-Regular",n,a,s.concat(["amsrm"]))},UC=function(t,n,a){return a!=="textord"&&Vu(t,"Math-BoldItalic",n).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Yu=function(t,n,a){var s=t.mode,o=t.text,c=["mord"],{font:d,fontFamily:m,fontWeight:h,fontShape:p}=n,b=s==="math"||s==="text"&&!!d,x=b?d:m,y="",E="";if(o.charCodeAt(0)===55349){var N=qC(o);y=N.font,E=N[s+"Class"]}if(y)return lr(o,y,s,n,c.concat(E));if(x){var R,C;if(x==="boldsymbol"){var I=UC(o,s,a);R=I.fontName,C=[I.fontClass]}else b?(R=dh[d].fontName,C=[d]):(R=au(m,h,p),C=[m,h,p]);if(Vu(o,R,s).metrics)return lr(o,R,s,n,c.concat(C));if(a5.hasOwnProperty(o)&&R.slice(0,10)==="Typewriter"){for(var O=[],X=0;X<o.length;X++)O.push(lr(o[X],R,s,n,c.concat(C)));return Ga(O)}}if(a==="mathord")return lr(o,"Math-Italic",s,n,c.concat(["mathnormal"]));if(a==="textord"){var q=fn[s][o]&&fn[s][o].font;if(q==="ams"){var A=au("amsrm",h,p);return lr(o,A,s,n,c.concat("amsrm",h,p))}else if(q==="main"||!q){var F=au("textrm",h,p);return lr(o,F,s,n,c.concat(h,p))}else{var J=au(q,h,p);return lr(o,J,s,n,c.concat(J,h,p))}}else throw new Error("unexpected type: "+a+" in makeOrd")},HC=(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},i5=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],a=e[t+1];n instanceof Lr&&a instanceof Lr&&HC(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},ap=function(t){for(var n=0,a=0,s=0,o=0;o<t.children.length;o++){var c=t.children[o];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 o=new cl(t,n,a,s);return ap(o),o},Ri=(e,t,n,a)=>new cl(e,t,n,a),rl=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},FC=function(t,n,a,s){var o=new Ku(t,n,a,s);return ap(o),o},Ga=function(t){var n=new ol(t);return ap(n),n},al=function(t,n){return t instanceof ol?Ce([],[t],n):t},PC=function(t){if(t.positionType==="individualShift"){for(var n=t.children,a=[n[0]],s=-n[0].shift-n[0].elem.depth,o=s,c=1;c<n.length;c++){var d=-n[c].shift-o-n[c].elem.depth,m=d-(n[c-1].elem.height+n[c-1].elem.depth);o=o+d,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 x=t.children[b];p-=x.type==="kern"?x.size:x.elem.height+x.elem.depth}h=p}else if(t.positionType==="bottom")h=-t.positionData;else{var y=t.children[0];if(y.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")h=-y.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")h=-y.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:h}},Ht=function(t,n){for(var{children:a,depth:s}=PC(t),o=0,c=0;c<a.length;c++){var d=a[c];if(d.type==="elem"){var m=d.elem;o=Math.max(o,m.maxFontSize,m.height)}}o+=2;var h=Ce(["pstrut"],[]);h.style.height=De(o);for(var p=[],b=s,x=s,y=s,E=0;E<a.length;E++){var N=a[E];if(N.type==="kern")y+=N.size;else{var R=N.elem,C=N.wrapperClasses||[],I=N.wrapperStyle||{},O=Ce(C,[h,R],void 0,I);O.style.top=De(-o-y-R.depth),N.marginLeft&&(O.style.marginLeft=N.marginLeft),N.marginRight&&(O.style.marginRight=N.marginRight),p.push(O),y+=R.height+R.depth}b=Math.min(b,y),x=Math.max(x,y)}var X=Ce(["vlist"],p);X.style.height=De(x);var q;if(b<0){var A=Ce([],[]),F=Ce(["vlist"],[A]);F.style.height=De(-b);var J=Ce(["vlist-s"],[new Lr("")]);q=[Ce(["vlist-r"],[X,J]),Ce(["vlist-r"],[F])]}else q=[Ce(["vlist-r"],[X])];var W=Ce(["vlist-t"],q);return q.length===2&&W.classes.push("vlist-t2"),W.height=x,W.depth=-b,W},s5=(e,t)=>{var n=Ce(["mspace"],[],t),a=gn(e,t);return n.style.marginRight=De(a),n},au=(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},dh={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"}},l5={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},o5=function(t,n){var[a,s,o]=l5[t],c=new Ci(a),d=new Ha([c],{width:De(s),height:De(o),style:"width:"+De(s),viewBox:"0 0 "+1e3*s+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),m=Ri(["overlay"],[d],n);return m.height=o,m.style.height=De(o),m.style.width=De(s),m},pn={number:3,unit:"mu"},es={number:4,unit:"mu"},ja={number:5,unit:"mu"},$C={mord:{mop:pn,mbin:es,mrel:ja,minner:pn},mop:{mord:pn,mop:pn,mrel:ja,minner:pn},mbin:{mord:es,mop:es,mopen:es,minner:es},mrel:{mord:ja,mop:ja,mopen:ja,minner:ja},mopen:{},mclose:{mop:pn,mbin:es,mrel:ja,minner:pn},mpunct:{mord:pn,mop:pn,mrel:ja,mopen:pn,mclose:pn,mpunct:pn,minner:pn},minner:{mord:pn,mop:pn,mbin:es,mrel:ja,mopen:pn,mpunct:pn,minner:pn}},GC={mord:{mop:pn},mop:{mord:pn,mop:pn},mbin:{},mrel:{},mopen:{},mclose:{mop:pn},mpunct:{},minner:{mop:pn}},c5={},Nu={},Cu={};function Be(e){for(var{type:t,names:n,props:a,handler:s,htmlBuilder:o,mathmlBuilder:c}=e,d={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)c5[n[m]]=d;t&&(o&&(Nu[t]=o),c&&(Cu[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 Ru=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},jn=function(t){return t.type==="ordgroup"?t.body:[t]},KC=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),VC=new Set(["rightmost","mrel","mclose","mpunct"]),YC={display:dt.DISPLAY,text:dt.TEXT,script:dt.SCRIPT,scriptscript:dt.SCRIPTSCRIPT},XC={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Hn=function(t,n,a,s){s===void 0&&(s=[null,null]);for(var o=[],c=0;c<t.length;c++){var d=Ft(t[c],n);if(d instanceof ol){var m=d.children;o.push(...m)}else o.push(d)}if(i5(o),!a)return o;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(YC[p.style]))}var b=Ce([s[0]||"leftmost"],[],n),x=Ce([s[1]||"rightmost"],[],n),y=a==="root";return fh(o,(E,N)=>{var R=N.classes[0],C=E.classes[0];R==="mbin"&&VC.has(C)?N.classes[0]="mord":C==="mbin"&&KC.has(R)&&(E.classes[0]="mord")},{node:b},x,y),fh(o,(E,N)=>{var R,C,I=hh(N),O=hh(E),X=I&&O?E.hasClass("mtight")?(R=GC[I])==null?void 0:R[O]:(C=$C[I])==null?void 0:C[O]:null;if(X)return s5(X,h)},{node:b},x,y),o},fh=function(t,n,a,s,o){s&&t.push(s);for(var c=0;c<t.length;c++){var d=t[c],m=u5(d);if(m){fh(m.children,n,a,null,o);continue}var h=!d.hasClass("mspace");if(h){var p=n(d,a.node);p&&(a.insertAfter?a.insertAfter(p):(t.unshift(p),c++))}h?a.node=d:o&&d.hasClass("newline")&&(a.node=Ce(["leftmost"])),a.insertAfter=(b=>x=>{t.splice(b+1,0,x),c++})(c)}s&&t.pop()},u5=function(t){return t instanceof ol||t instanceof Ku||t instanceof cl&&t.hasClass("enclosing")?t:null},mh=function(t,n){var a=u5(t);if(a){var s=a.children;if(s.length){if(n==="right")return mh(s[s.length-1],"right");if(n==="left")return mh(s[0],"left")}}return t},hh=function(t,n){if(!t)return null;n&&(t=mh(t,n));var a=t.classes[0];return XC[a]||null},To=function(t,n){var a=["nulldelimiter"].concat(t.baseSizingClasses());return Ce(n.concat(a))},Ft=function(t,n,a){if(!t)return Ce();if(Nu[t.type]){var s=Nu[t.type](t,n);if(a&&n.size!==a.size){s=Ce(n.sizingClasses(a),[s],n);var o=n.sizeMultiplier/a.sizeMultiplier;s.height*=o,s.depth*=o}return s}else throw new Ae("Got group of unknown type: '"+t.type+"'")};function iu(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 ph(e,t){var n=null;e.length===1&&e[0].type==="tag"&&(n=e[0].tag,e=e[0].body);var a=Hn(e,t,"root"),s;a.length===2&&a[1].hasClass("tag")&&(s=a.pop());for(var o=[],c=[],d=0;d<a.length;d++)if(c.push(a[d]),a[d].hasClass("mbin")||a[d].hasClass("mrel")||a[d].hasClass("allowbreak")){for(var m=!1;d<a.length-1&&a[d+1].hasClass("mspace")&&!a[d+1].hasClass("newline");)d++,c.push(a[d]),a[d].hasClass("nobreak")&&(m=!0);m||(o.push(iu(c,t)),c=[])}else a[d].hasClass("newline")&&(c.pop(),c.length>0&&(o.push(iu(c,t)),c=[]),o.push(a[d]));c.length>0&&o.push(iu(c,t));var h;n?(h=iu(Hn(n,t,!0),t),h.classes=["tag"],o.push(h)):s&&o.push(s);var p=Ce(["katex-html"],o);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 d5(e){return new ol(e)}class Ie{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+=nr(this.attributes[n]),t+='"');this.classes.length>0&&(t+=' class ="'+nr(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 nr(this.toText())}toText(){return this.text}}class f5{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 ZC=new Set(["\\imath","\\jmath"]),WC=new Set(["mrow","mtable"]),Wr=function(t,n,a){return fn[n][t]&&fn[n][t].replace&&t.charCodeAt(0)!==55349&&!(a5.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)},ip=function(t){return t.length===1?t[0]:new Ie("mrow",t)},QC={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"},sp=(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=QC[n];if(s)return typeof s=="function"?s(e):s;var o=e.text;if(ZC.has(o))return null;if(fn[a][o]){var c=fn[a][o].replace;c&&(o=c)}var d=dh[n].fontName;return np(o,d,a)?dh[n].variant:null};function Uf(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=an(t[0],n);return a&&s instanceof Ie&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var o=[],c,d=0;d<t.length;d++){var m=an(t[d],n);if(m instanceof Ie&&c instanceof Ie){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(Uf(m)&&c.type==="mn"){c.children.push(...m.children);continue}else if(m.type==="mn"&&Uf(c))m.children=[...c.children,...m.children],o.pop();else if((m.type==="msup"||m.type==="msub")&&m.children.length>=1&&(c.type==="mn"||Uf(c))){var h=m.children[0];h instanceof Ie&&h.type==="mn"&&(h.children=[...c.children,...h.children],o.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),o.pop())}}}o.push(m),c=m}return o},Ai=function(t,n,a){return ip(Br(t,n,a))},an=function(t,n){if(!t)return new Ie("mrow");if(Cu[t.type])return Cu[t.type](t,n);throw new Ae("Got group of unknown type: '"+t.type+"'")};function I4(e,t,n,a,s){var o=Br(e,n),c;o.length===1&&o[0]instanceof Ie&&WC.has(o[0].type)?c=o[0]:c=new Ie("mrow",o);var d=new Ie("annotation",[new Ln(t)]);d.setAttribute("encoding","application/x-tex");var m=new Ie("semantics",[c,d]),h=new Ie("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 JC=[[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]],M4=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],O4=function(t,n){return n.size<2?t:JC[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=M4[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:O4(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:M4[t-1]})}havingBaseStyle(t){t=t||this.style.text();var n=O4(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=LC(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}za.BASESIZE=6;var m5=function(t){return new za({style:t.displayMode?dt.DISPLAY:dt.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},h5=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},eR=function(t,n,a){var s=m5(a),o;if(a.output==="mathml")return I4(t,n,s,a.displayMode,!0);if(a.output==="html"){var c=ph(t,s);o=Ce(["katex"],[c])}else{var d=I4(t,n,s,a.displayMode,!1),m=ph(t,s);o=Ce(["katex"],[d,m])}return h5(o,a)},tR=function(t,n,a){var s=m5(a),o=ph(t,s),c=Ce(["katex"],[o]);return h5(c,a)},nR={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":"="},Xu=function(t){var n=new Ie("mo",[new Ln(nR[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},rR={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]},aR=new Set(["widehat","widecheck","widetilde","utilde"]),Zu=function(t,n){function a(){var d=4e5,m=t.label.slice(1);if(aR.has(m)&&"base"in t){var h=t.base.type==="ordgroup"?t.base.body.length:1,p,b,x;if(h>5)m==="widehat"||m==="widecheck"?(p=420,d=2364,x=.42,b=m+"4"):(p=312,d=2340,x=.34,b="tilde4");else{var y=[1,1,2,2,3,3][h];m==="widehat"||m==="widecheck"?(d=[0,1062,2364,2364,2364][y],p=[0,239,300,360,420][y],x=[0,.24,.3,.3,.36,.42][y],b=m+y):(d=[0,600,1033,2339,2340][y],p=[0,260,286,306,312][y],x=[0,.26,.286,.3,.306,.34][y],b="tilde"+y)}var E=new Ci(b),N=new Ha([E],{width:"100%",height:De(x),viewBox:"0 0 "+d+" "+p,preserveAspectRatio:"none"});return{span:Ri([],[N],n),minWidth:0,height:x}}else{var R=[],C=rR[m];if(!C)throw new Error('No SVG data for "'+m+'".');var[I,O,X]=C,q=X/1e3,A=I.length,F,J;if(A===1){if(C.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+m+'".');F=["hide-tail"],J=[C[3]]}else if(A===2)F=["halfarrow-left","halfarrow-right"],J=["xMinYMin","xMaxYMin"];else if(A===3)F=["brace-left","brace-center","brace-right"],J=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
294
|
+
`+A+" children.");for(var W=0;W<A;W++){var z=new Ci(I[W]),U=new Ha([z],{width:"400em",height:De(q),viewBox:"0 0 "+d+" "+X,preserveAspectRatio:J[W]+" slice"}),H=Ri([F[W]],[U],n);if(A===1)return{span:H,minWidth:O,height:q};H.style.height=De(q),R.push(H)}return{span:Ce(["stretchy"],R,n),minWidth:O,height:q}}}var{span:s,minWidth:o,height:c}=a();return s.height=c,s.style.height=De(c),o>0&&(s.style.minWidth=De(o)),s},iR=function(t,n,a,s,o){var c,d=t.height+t.depth+a+s;if(/fbox|color|angl/.test(n)){if(c=Ce(["stretchy",n],[],o),n==="fbox"){var m=o.color&&o.getColor();m&&(c.style.borderColor=m)}}else{var h=[];/^[bx]cancel$/.test(n)&&h.push(new ih({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&h.push(new ih({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var p=new Ha(h,{width:"100%",height:De(d)});c=Ri([],[p],o)}return c.height=d,c.style.height=De(d),c},sR={bin:1,close:1,inner:1,open:1,punct:1,rel:1},lR={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function oR(e){return e in sR}function vt(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 Wu(e){var t=Qu(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 Qu(e){return e&&(e.type==="atom"||lR.hasOwnProperty(e.type))?e:null}var p5=e=>{if(e instanceof Lr)return e;if(jC(e)&&e.children.length===1)return p5(e.children[0])},lp=(e,t)=>{var n,a,s;e&&e.type==="supsub"?(a=vt(e.base,"accent"),n=a.base,e.base=n,s=DC(Ft(e,t)),e.base=a):(a=vt(e,"accent"),n=a.base);var o=Ft(n,t.havingCrampedStyle()),c=a.isShifty&&Pa(n),d=0;if(c){var m,h;d=(m=(h=p5(o))==null?void 0:h.skew)!=null?m:0}var p=a.label==="\\c",b=p?o.height+o.depth:Math.min(o.height,t.fontMetrics().xHeight),x;if(a.isStretchy)x=Zu(a,t),x=Ht({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:x,wrapperClasses:["svg-align"],wrapperStyle:d>0?{width:"calc(100% - "+De(2*d)+")",marginLeft:De(2*d)}:void 0}]});else{var y,E;a.label==="\\vec"?(y=o5("vec",t),E=l5.vec[1]):(y=Yu({mode:a.mode,text:a.label},t,"textord"),y=OC(y),y.italic=0,E=y.width,p&&(b+=y.depth)),x=Ce(["accent-body"],[y]);var N=a.label==="\\textcircled";N&&(x.classes.push("accent-full"),b=o.height);var R=d;N||(R-=E/2),x.style.left=De(R),a.label==="\\textcircled"&&(x.style.top=".2em"),x=Ht({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-b},{type:"elem",elem:x}]})}var C=Ce(["mord","accent"],[x],t);return s?(s.children[0]=C,s.height=Math.max(C.height,s.height),s.classes[0]="mord",s):C},g5=(e,t)=>{var n=e.isStretchy?Xu(e.label):new Ie("mo",[Wr(e.label,e.mode)]),a=new Ie("mover",[an(e.base,t),n]);return a.setAttribute("accent","true"),a},cR=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=Ru(t[0]),a=!cR.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:lp,mathmlBuilder:g5});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:lp,mathmlBuilder:g5});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=Ft(e.base,t),a=Zu(e,t),s=e.label==="\\utilde"?.12:0,o=Ht({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"],[o],t)},mathmlBuilder:(e,t)=>{var n=Xu(e.label),a=new Ie("munder",[an(e.base,t),n]);return a.setAttribute("accentunder","true"),a}});var su=e=>{var t=new Ie("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=al(Ft(e.body,a,t),t),o=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(o+"-arrow-pad");var c;e.below&&(a=t.havingStyle(n.sub()),c=al(Ft(e.below,a,t),t),c.classes.push(o+"-arrow-pad"));var d=Zu(e,t),m=-t.fontMetrics().axisHeight+.5*d.height,h=-t.fontMetrics().axisHeight-.5*d.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(h-=s.depth);var p;if(c){var b=-t.fontMetrics().axisHeight+c.height+.5*d.height+.111;p=Ht({positionType:"individualShift",children:[{type:"elem",elem:s,shift:h},{type:"elem",elem:d,shift:m,wrapperClasses:["svg-align"]},{type:"elem",elem:c,shift:b}]})}else p=Ht({positionType:"individualShift",children:[{type:"elem",elem:s,shift:h},{type:"elem",elem:d,shift:m,wrapperClasses:["svg-align"]}]});return Ce(["mrel","x-arrow"],[p],t)},mathmlBuilder(e,t){var n=Xu(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(e.body){var s=su(an(e.body,t));if(e.below){var o=su(an(e.below,t));a=new Ie("munderover",[n,o,s])}else a=new Ie("mover",[n,s])}else if(e.below){var c=su(an(e.below,t));a=new Ie("munder",[n,c])}else a=su(),a=new Ie("mover",[n,a]);return a}});function b5(e,t){var n=Hn(e.body,t,!0);return Ce([e.mclass],n,t)}function v5(e,t){var n,a=Br(e.body,t);return e.mclass==="minner"?n=new Ie("mpadded",a):e.mclass==="mord"?e.isCharacterBox?(n=a[0],n.type="mi"):n=new Ie("mi",a):(e.isCharacterBox?(n=a[0],n.type="mo"):n=new Ie("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:b5,mathmlBuilder:v5});var Ju=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:Ju(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],o=t[0],c;a!=="\\stackrel"?c=Ju(s):c="mrel";var d={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:jn(s)},m={type:"supsub",mode:o.mode,base:d,sup:a==="\\underset"?null:o,sub:a==="\\underset"?o:null};return{type:"mclass",mode:n.mode,mclass:c,body:[m],isCharacterBox:Pa(m)}},htmlBuilder:b5,mathmlBuilder:v5});Be({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:Ju(t[0]),body:jn(t[0])}},htmlBuilder(e,t){var n=Hn(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 Ie("mstyle",n);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var uR={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},D4=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),j4=e=>e.type==="textord"&&e.text==="@",dR=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function fR(e,t,n){var a=uR[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]],[]),o={type:"atom",text:a,mode:"math",family:"rel"},c=n.callFunction("\\Big",[o],[]),d=n.callFunction("\\\\cdright",[t[1]],[]),m={type:"ordgroup",mode:"math",body:[s,c,d]};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 mR(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 Ae("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var a=[],s=[a],o=0;o<t.length;o++){for(var c=t[o],d=D4(),m=0;m<c.length;m++)if(!j4(c[m]))d.body.push(c[m]);else{a.push(d),m+=1;var h=Wu(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 x=!0,y=m+1;y<c.length;y++){if(dR(c[y],h)){x=!1,m=y;break}if(j4(c[y]))throw new Ae("Missing a "+h+" character to complete a CD arrow.",c[y]);p[b].body.push(c[y])}if(x)throw new Ae("Missing a "+h+" character to complete a CD arrow.",c[m])}else throw new Ae('Expected one of "<>AV=|." after @',c[m]);var E=fR(h,p,e),N={type:"styling",body:[E],mode:"math",style:"display",resetFont:!0};a.push(N),d=D4()}o%2===0?a.push(d):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=al(Ft(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 Ie("mrow",[an(e.label,t)]);return n=new Ie("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new Ie("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=al(Ft(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new Ie("mrow",[an(e.fragment,t)])}});Be({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,a=vt(t[0],"ordgroup"),s=a.body,o="",c=0;c<s.length;c++){var d=vt(s[c],"textord");o+=d.text}var m=parseInt(o),h;if(isNaN(m))throw new Ae("\\@char has non-numeric argument "+o);if(m<0||m>=1114111)throw new Ae("\\@char with invalid code point "+o);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 y5=(e,t)=>{var n=Hn(e.body,t.withColor(e.color),!1);return Ga(n)},x5=(e,t)=>{var n=Br(e.body,t.withColor(e.color)),a=new Ie("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=vt(t[0],"color-token").color,s=t[1];return{type:"color",mode:n.mode,color:a,body:jn(s)}},htmlBuilder:y5,mathmlBuilder:x5});Be({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:a}=e,s=vt(t[0],"color-token").color;n.gullet.macros.set("\\current@color",s);var o=n.parseExpression(!0,a);return{type:"color",mode:n.mode,color:s,body:o}},htmlBuilder:y5,mathmlBuilder:x5});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,o=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:o,size:s&&vt(s,"size").value}},htmlBuilder(e,t){var n=Ce(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=De(gn(e.size,t)))),n},mathmlBuilder(e,t){var n=new Ie("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",De(gn(e.size,t)))),n}});var gh={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},w5=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Ae("Expected a control sequence",e);return t},hR=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},S5=(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(gh[a.text])return(n==="\\global"||n==="\\\\globallong")&&(a.text=gh[a.text]),vt(t.parseFunction(),"internal");throw new Ae("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 Ae("Expected a control sequence",a);for(var o=0,c,d=[[]];t.gullet.future().text!=="{";)if(a=t.gullet.popToken(),a.text==="#"){if(t.gullet.future().text==="{"){c=t.gullet.future(),d[o].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new Ae('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==o+1)throw new Ae('Argument number "'+a.text+'" out of order');o++,d.push([])}else{if(a.text==="EOF")throw new Ae("Expected a macro definition");d[o].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:o,delimiters:d},n===gh[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=w5(t.gullet.popToken());t.gullet.consumeSpaces();var s=hR(t);return S5(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=w5(t.gullet.popToken()),s=t.gullet.popToken(),o=t.gullet.popToken();return S5(t,a,o,n==="\\\\globalfuture"),t.gullet.pushToken(o),t.gullet.pushToken(s),{type:"internal",mode:t.mode}}});var mo=function(t,n,a){var s=fn.math[t]&&fn.math[t].replace,o=np(s||t,n,a);if(!o)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return o},op=function(t,n,a,s){var o=a.havingBaseStyle(n),c=Ce(s.concat(o.sizingClasses(a)),[t],a),d=o.sizeMultiplier/a.sizeMultiplier;return c.height*=d,c.depth*=d,c.maxFontSize=o.sizeMultiplier,c},k5=function(t,n,a){var s=n.havingBaseStyle(a),o=(1-n.sizeMultiplier/s.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=De(o),t.height-=o,t.depth+=o},pR=function(t,n,a,s,o,c){var d=lr(t,"Main-Regular",o,s),m=op(d,n,s,c);return k5(m,s,n),m},gR=function(t,n,a,s){return lr(t,"Size"+n+"-Regular",a,s)},E5=function(t,n,a,s,o,c){var d=gR(t,n,o,s),m=op(Ce(["delimsizing","size"+n],[d],s),dt.TEXT,s,c);return a&&k5(m,s,dt.TEXT),m},Hf=function(t,n,a){var s;n==="Size1-Regular"?s="delim-size1":s="delim-size4";var o=Ce(["delimsizinginner",s],[Ce([],[lr(t,n,a)])]);return{type:"elem",elem:o}},Ff=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],o=new Ci("inner",NC(t,Math.round(1e3*n))),c=new Ha([o],{width:De(s),height:De(n),style:"width:"+De(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),d=Ri([],[c],a);return d.height=n,d.style.height=De(n),d.style.width=De(s),{type:"elem",elem:d}},bh=.008,lu={type:"kern",size:-1*bh},bR=new Set(["|","\\lvert","\\rvert","\\vert"]),vR=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),T5=function(t,n,a,s,o,c){var d,m,h,p,b="",x=0;d=h=p=t,m=null;var y="Size1-Regular";t==="\\uparrow"?h=p="⏐":t==="\\Uparrow"?h=p="‖":t==="\\downarrow"?d=h="⏐":t==="\\Downarrow"?d=h="‖":t==="\\updownarrow"?(d="\\uparrow",h="⏐",p="\\downarrow"):t==="\\Updownarrow"?(d="\\Uparrow",h="‖",p="\\Downarrow"):bR.has(t)?(h="∣",b="vert",x=333):vR.has(t)?(h="∥",b="doublevert",x=556):t==="["||t==="\\lbrack"?(d="⎡",h="⎢",p="⎣",y="Size4-Regular",b="lbrack",x=667):t==="]"||t==="\\rbrack"?(d="⎤",h="⎥",p="⎦",y="Size4-Regular",b="rbrack",x=667):t==="\\lfloor"||t==="⌊"?(h=d="⎢",p="⎣",y="Size4-Regular",b="lfloor",x=667):t==="\\lceil"||t==="⌈"?(d="⎡",h=p="⎢",y="Size4-Regular",b="lceil",x=667):t==="\\rfloor"||t==="⌋"?(h=d="⎥",p="⎦",y="Size4-Regular",b="rfloor",x=667):t==="\\rceil"||t==="⌉"?(d="⎤",h=p="⎥",y="Size4-Regular",b="rceil",x=667):t==="("||t==="\\lparen"?(d="⎛",h="⎜",p="⎝",y="Size4-Regular",b="lparen",x=875):t===")"||t==="\\rparen"?(d="⎞",h="⎟",p="⎠",y="Size4-Regular",b="rparen",x=875):t==="\\{"||t==="\\lbrace"?(d="⎧",m="⎨",p="⎩",h="⎪",y="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(d="⎫",m="⎬",p="⎭",h="⎪",y="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(d="⎧",p="⎩",h="⎪",y="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(d="⎫",p="⎭",h="⎪",y="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(d="⎧",p="⎭",h="⎪",y="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(d="⎫",p="⎩",h="⎪",y="Size4-Regular");var E=mo(d,y,o),N=E.height+E.depth,R=mo(h,y,o),C=R.height+R.depth,I=mo(p,y,o),O=I.height+I.depth,X=0,q=1;if(m!==null){var A=mo(m,y,o);X=A.height+A.depth,q=2}var F=N+O+X,J=Math.max(0,Math.ceil((n-F)/(q*C))),W=F+J*q*C,z=s.fontMetrics().axisHeight;a&&(z*=s.sizeMultiplier);var U=W/2-z,H=[];if(b.length>0){var te=W-N-O,G=Math.round(W*1e3),K=CC(b,Math.round(te*1e3)),$=new Ci(b,K),ee=De(x/1e3),oe=De(G/1e3),ce=new Ha([$],{width:ee,height:oe,viewBox:"0 0 "+x+" "+G}),j=Ri([],[ce],s);j.height=G/1e3,j.style.width=ee,j.style.height=oe,H.push({type:"elem",elem:j})}else{if(H.push(Hf(p,y,o)),H.push(lu),m===null){var D=W-N-O+2*bh;H.push(Ff(h,D,s))}else{var P=(W-N-O-X)/2+2*bh;H.push(Ff(h,P,s)),H.push(lu),H.push(Hf(m,y,o)),H.push(lu),H.push(Ff(h,P,s))}H.push(lu),H.push(Hf(d,y,o))}var _=s.havingBaseStyle(dt.TEXT),ne=Ht({positionType:"bottom",positionData:U,children:H});return op(Ce(["delimsizing","mult"],[ne],_),dt.TEXT,s,c)},Pf=80,$f=.08,Gf=function(t,n,a,s,o){var c=TC(t,s,a),d=new Ci(t,c),m=new Ha([d],{width:"400em",height:De(n),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return Ri(["hide-tail"],[m],o)},yR=function(t,n){var a=n.havingBaseSizing(),s=_5("\\surd",t*a.sizeMultiplier,A5,a),o=a.sizeMultiplier,c=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),d,m,h,p,b;return s.type==="small"?(p=1e3+1e3*c+Pf,t<1?o=1:t<1.4&&(o=.7),m=(1+c+$f)/o,h=(1+c)/o,d=Gf("sqrtMain",m,p,c,n),d.style.minWidth="0.853em",b=.833/o):s.type==="large"?(p=(1e3+Pf)*vo[s.size],h=(vo[s.size]+c)/o,m=(vo[s.size]+c+$f)/o,d=Gf("sqrtSize"+s.size,m,p,c,n),d.style.minWidth="1.02em",b=1/o):(m=t+c+$f,h=t+c,p=Math.floor(1e3*t+c)+Pf,d=Gf("sqrtTall",m,p,c,n),d.style.minWidth="0.742em",b=1.056),d.height=h,d.style.height=De(m),{span:d,advanceWidth:b,ruleWidth:(n.fontMetrics().sqrtRuleThickness+c)*o}},N5=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),xR=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),C5=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),vo=[0,1.2,1.8,2.4,3],R5=function(t,n,a,s,o){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),N5.has(t)||C5.has(t))return E5(t,n,!1,a,s,o);if(xR.has(t))return T5(t,vo[n],!1,a,s,o);throw new Ae("Illegal delimiter: '"+t+"'")},wR=[{type:"small",style:dt.SCRIPTSCRIPT},{type:"small",style:dt.SCRIPT},{type:"small",style:dt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],SR=[{type:"small",style:dt.SCRIPTSCRIPT},{type:"small",style:dt.SCRIPT},{type:"small",style:dt.TEXT},{type:"stack"}],A5=[{type:"small",style:dt.SCRIPTSCRIPT},{type:"small",style:dt.SCRIPT},{type:"small",style:dt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],kR=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.")},_5=function(t,n,a,s){for(var o=Math.min(2,3-s.style.size),c=o;c<a.length;c++){var d=a[c];if(d.type==="stack")break;var m=mo(t,kR(d),"math"),h=m.height+m.depth;if(d.type==="small"){var p=s.havingBaseStyle(d.style);h*=p.sizeMultiplier}if(h>n)return d}return a[a.length-1]},vh=function(t,n,a,s,o,c){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var d;C5.has(t)?d=wR:N5.has(t)?d=A5:d=SR;var m=_5(t,n,d,s);return m.type==="small"?pR(t,m.style,a,s,o,c):m.type==="large"?E5(t,m.size,a,s,o,c):T5(t,n,a,s,o,c)},Kf=function(t,n,a,s,o,c){var d=s.fontMetrics().axisHeight*s.sizeMultiplier,m=901,h=5/s.fontMetrics().ptPerEm,p=Math.max(n-d,a+d),b=Math.max(p/500*m,2*p-h);return vh(t,b,!0,s,o,c)},L4={"\\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}},ER=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 z4(e){return"isMiddle"in e}function e0(e,t){var n=Qu(e);if(n&&ER.has(n.text))return n;throw n?new Ae("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new Ae("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=e0(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:L4[e.funcName].size,mclass:L4[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?Ce([e.mclass]):R5(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 Ie("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var a=De(vo[e.size]);return n.setAttribute("minsize",a),n.setAttribute("maxsize",a),n}});function B4(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 Ae("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:e0(t[0],e).text,color:n}}});Be({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e0(t[0],e),a=e.parser;++a.leftrightDepth;var s=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var o=vt(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:s,left:n.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,t)=>{B4(e);for(var n=Hn(e.body,t,!0,["mopen","mclose"]),a=0,s=0,o=!1,c=0;c<n.length;c++){var d=n[c];z4(d)?o=!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=To(t,["mopen"]):m=Kf(e.left,a,s,t,e.mode,["mopen"]),n.unshift(m),o)for(var h=1;h<n.length;h++){var p=n[h];if(z4(p)){var b=p.isMiddle;n[h]=Kf(b.delim,a,s,b.options,e.mode,[])}}var x;if(e.right===".")x=To(t,["mclose"]);else{var y=e.rightColor?t.withColor(e.rightColor):t;x=Kf(e.right,a,s,y,e.mode,["mclose"])}return n.push(x),Ce(["minner"],n,t)},mathmlBuilder:(e,t)=>{B4(e);var n=Br(e.body,t);if(e.left!=="."){var a=new Ie("mo",[Wr(e.left,e.mode)]);a.setAttribute("fence","true"),n.unshift(a)}if(e.right!=="."){var s=new Ie("mo",[Wr(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),n.push(s)}return ip(n)}});Be({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e0(t[0],e);if(!e.parser.leftrightDepth)throw new Ae("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim==="."?n=To(t,[]):(n=R5(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 Ie("mo",[n]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var t0=(e,t)=>{var n=al(Ft(e.body,t),t),a=e.label.slice(1),s=t.sizeMultiplier,o,c,d=Pa(e.body);if(a==="sout")o=Ce(["stretchy","sout"]),o.height=t.fontMetrics().defaultRuleThickness/s,c=-.5*t.fontMetrics().xHeight;else if(a==="phase"){var m=gn({number:.6,unit:"pt"},t),h=gn({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 x=Math.floor(1e3*b*s),y=kC(x),E=new Ha([new Ci("phase",y)],{width:"400em",height:De(x/1e3),viewBox:"0 0 400000 "+x,preserveAspectRatio:"xMinYMin slice"});o=Ri(["hide-tail"],[E],t),o.style.height=De(b),c=n.depth+m+h}else{/cancel/.test(a)?d||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=d?.2:0,R=N),o=iR(n,a,N,R,t),/fbox|boxed|fcolorbox/.test(a)?(o.style.borderStyle="solid",o.style.borderWidth=De(C)):a==="angl"&&C!==.049&&(o.style.borderTopWidth=De(C),o.style.borderRightWidth=De(C)),c=n.depth+R,e.backgroundColor&&(o.style.backgroundColor=e.backgroundColor,e.borderColor&&(o.style.borderColor=e.borderColor))}var I;if(e.backgroundColor)I=Ht({positionType:"individualShift",children:[{type:"elem",elem:o,shift:c},{type:"elem",elem:n,shift:0}]});else{var O=/cancel|phase/.test(a)?["svg-align"]:[];I=Ht({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:o,shift:c,wrapperClasses:O}]})}return/cancel/.test(a)&&(I.height=n.height,I.depth=n.depth),/cancel/.test(a)&&!d?Ce(["mord","cancel-lap"],[I],t):Ce(["mord"],[I],t)},n0=(e,t)=>{var n,a=new Ie(e.label.includes("colorbox")?"mpadded":"menclose",[an(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,o=vt(t[0],"color-token").color,c=t[1];return{type:"enclose",mode:a.mode,label:s,backgroundColor:o,body:c}},htmlBuilder:t0,mathmlBuilder:n0});Be({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,t,n){var{parser:a,funcName:s}=e,o=vt(t[0],"color-token").color,c=vt(t[1],"color-token").color,d=t[2];return{type:"enclose",mode:a.mode,label:s,backgroundColor:c,borderColor:o,body:d}},htmlBuilder:t0,mathmlBuilder:n0});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:t0,mathmlBuilder:n0});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:t0,mathmlBuilder:n0});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 I5={};function ma(e){for(var{type:t,names:n,props:a,handler:s,htmlBuilder:o,mathmlBuilder:c}=e,d={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},m=0;m<n.length;++m)I5[n[m]]=d;o&&(Nu[t]=o),c&&(Cu[t]=c)}var M5={};function B(e,t){M5[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 q4(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 r0=e=>{var t=e.parser.settings;if(!t.displayMode)throw new Ae("{"+e.envName+"} can be used only in display mode.")},TR=new Set(["gather","gather*"]);function cp(e){if(!e.includes("ed"))return!e.includes("*")}function Ii(e,t,n){var{hskipBeforeAndAfter:a,addJot:s,cols:o,arraystretch:c,colSeparationType:d,autoTag:m,singleRow:h,emptySingleRow:p,maxNumCols:b,leqno:x}=t;if(e.gullet.beginGroup(),h||e.gullet.macros.set("\\cr","\\\\\\relax"),!c){var y=e.gullet.expandMacroAsText("\\arraystretch");if(y==null)c=1;else if(c=parseFloat(y),!c||c<0)throw new Ae("Invalid \\arraystretch: "+y)}e.gullet.beginGroup();var E=[],N=[E],R=[],C=[],I=m!=null?[]:void 0;function O(){m&&e.gullet.macros.set("\\@eqnsw","1",!0)}function X(){I&&(e.gullet.macros.get("\\df@tag")?(I.push(e.subparse([new jr("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):I.push(!!m&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(O(),C.push(q4(e));;){var q=e.parseExpression(!1,h?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var A={type:"ordgroup",mode:e.mode,body:q};n&&(A={type:"styling",mode:e.mode,style:n,resetFont:!0,body:[A]}),E.push(A);var F=e.fetch().text;if(F==="&"){if(b&&E.length===b){if(h||d)throw new Ae("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(F==="\\end"){X(),E.length===1&&A.type==="styling"&&A.body.length===1&&A.body[0].type==="ordgroup"&&A.body[0].body.length===0&&(N.length>1||!p)&&N.pop(),C.length<N.length+1&&C.push([]);break}else if(F==="\\\\"){e.consume();var J=void 0;e.gullet.future().text!==" "&&(J=e.parseSizeGroup(!0)),R.push(J?J.value:null),X(),C.push(q4(e)),E=[],N.push(E),O()}else throw new Ae("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:o,rowGaps:R,hskipBeforeAndAfter:a,hLinesBeforeRow:C,colSeparationType:d,tags:I,leqno:x}}function up(e){return e.slice(0,1)==="d"?"display":"text"}var ha=function(t,n){var a,s,o=t.body.length,c=t.hLinesBeforeRow,d=0,m=new Array(o),h=[],p=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),b=1/n.fontMetrics().ptPerEm,x=5*b;if(t.colSeparationType&&t.colSeparationType==="small"){var y=n.havingStyle(dt.SCRIPT).sizeMultiplier;x=.2778*(y/n.sizeMultiplier)}var E=t.colSeparationType==="CD"?gn({number:3,unit:"ex"},n):12*b,N=3*b,R=t.arraystretch*E,C=.7*R,I=.3*R,O=0;function X(qe){for(var We=0;We<qe.length;++We)We>0&&(O+=.25),h.push({pos:O,isDashed:qe[We]})}for(X(c[0]),a=0;a<t.body.length;++a){var q=t.body[a],A=C,F=I;d<q.length&&(d=q.length);var J={cells:new Array(q.length),height:0,depth:0,pos:0};for(s=0;s<q.length;++s){var W=Ft(q[s],n);F<W.depth&&(F=W.depth),A<W.height&&(A=W.height),J.cells[s]=W}var z=t.rowGaps[a],U=0;z&&(U=gn(z,n),U>0&&(U+=I,F<U&&(F=U),U=0)),t.addJot&&a<t.body.length-1&&(F+=N),J.height=A,J.depth=F,O+=A,J.pos=O,O+=F+U,m[a]=J,X(c[a+1])}var H=O/2+n.fontMetrics().axisHeight,te=t.cols||[],G=[],K,$,ee=[];if(t.tags&&t.tags.some(qe=>qe))for(a=0;a<o;++a){var oe=m[a],ce=oe.pos-H,j=t.tags[a],D=void 0;j===!0?D=Ce(["eqn-num"],[],n):j===!1?D=Ce([],[],n):D=Ce([],Hn(j,n,!0),n),D.depth=oe.depth,D.height=oe.height,ee.push({type:"elem",elem:D,shift:ce})}for(s=0,$=0;s<d||$<te.length;++s,++$){for(var P,_=te[$],ne=!0;((de=_)==null?void 0:de.type)==="separator";){var de;if(ne||(K=Ce(["arraycolsep"],[]),K.style.width=De(n.fontMetrics().doubleRuleSep),G.push(K)),_.separator==="|"||_.separator===":"){var se=_.separator==="|"?"solid":"dashed",ae=Ce(["vertical-separator"],[],n);ae.style.height=De(O),ae.style.borderRightWidth=De(p),ae.style.borderRightStyle=se,ae.style.margin="0 "+De(-p/2);var we=O-H;we&&(ae.style.verticalAlign=De(-we)),G.push(ae)}else throw new Ae("Invalid separator type: "+_.separator);$++,_=te[$],ne=!1}if(!(s>=d)){var be=void 0;if(s>0||t.hskipBeforeAndAfter){var ze,Me;be=(ze=(Me=_)==null?void 0:Me.pregap)!=null?ze:x,be!==0&&(K=Ce(["arraycolsep"],[]),K.style.width=De(be),G.push(K))}var Se=[];for(a=0;a<o;++a){var $e=m[a],ct=$e.cells[s];if(ct){var mt=$e.pos-H;ct.depth=$e.depth,ct.height=$e.height,Se.push({type:"elem",elem:ct,shift:mt})}}var Ze=Ht({positionType:"individualShift",children:Se}),lt=Ce(["col-align-"+(((P=_)==null?void 0:P.align)||"c")],[Ze]);if(G.push(lt),s<d-1||t.hskipBeforeAndAfter){var Tt,St;be=(Tt=(St=_)==null?void 0:St.postgap)!=null?Tt:x,be!==0&&(K=Ce(["arraycolsep"],[]),K.style.width=De(be),G.push(K))}}}var wt=Ce(["mtable"],G);if(h.length>0){for(var Je=rl("hline",n,p),Nt=rl("hdashline",n,p),qt=[{type:"elem",elem:wt,shift:0}];h.length>0;){var Fe=h.pop(),Xt=Fe.pos-H;Fe.isDashed?qt.push({type:"elem",elem:Nt,shift:Xt}):qt.push({type:"elem",elem:Je,shift:Xt})}wt=Ht({positionType:"individualShift",children:qt})}if(ee.length===0)return Ce(["mord"],[wt],n);var he=Ht({positionType:"individualShift",children:ee}),ve=Ce(["tag"],[he],n);return Ga([wt,ve])},NR={c:"center ",l:"left ",r:"right "},pa=function(t,n){for(var a=[],s=new Ie("mtd",[],["mtr-glue"]),o=new Ie("mtd",[],["mml-eqn-num"]),c=0;c<t.body.length;c++){for(var d=t.body[c],m=[],h=0;h<d.length;h++)m.push(new Ie("mtd",[an(d[h],n)]));t.tags&&t.tags[c]&&(m.unshift(s),m.push(s),t.leqno?m.unshift(o):m.push(o)),a.push(new Ie("mtr",m))}var p=new Ie("mtable",a),b=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);p.setAttribute("rowspacing",De(b));var x="",y="";if(t.cols&&t.cols.length>0){var E=t.cols,N="",R=!1,C=0,I=E.length;E[0].type==="separator"&&(x+="top ",C=1),E[E.length-1].type==="separator"&&(x+="bottom ",I-=1);for(var O=C;O<I;O++){var X=E[O];X.type==="align"?(y+=NR[X.align],R&&(N+="none "),R=!0):X.type==="separator"&&R&&(N+=X.separator==="|"?"solid ":"dashed ",R=!1)}p.setAttribute("columnalign",y.trim()),/[sd]/.test(N)&&p.setAttribute("columnlines",N.trim())}if(t.colSeparationType==="align"){for(var q=t.cols||[],A="",F=1;F<q.length;F++)A+=F%2?"0em ":"1em ";p.setAttribute("columnspacing",A.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 J="",W=t.hLinesBeforeRow;x+=W[0].length>0?"left ":"",x+=W[W.length-1].length>0?"right ":"";for(var z=1;z<W.length-1;z++)J+=W[z].length===0?"none ":W[z][0]?"dashed ":"solid ";return/[sd]/.test(J)&&p.setAttribute("rowlines",J.trim()),x!==""&&(p=new Ie("menclose",[p]),p.setAttribute("notation",x.trim())),t.arraystretch&&t.arraystretch<1&&(p=new Ie("mstyle",[p]),p.setAttribute("scriptlevel","1")),p},O5=function(t,n){t.envName.includes("ed")||r0(t);var a=[],s=t.envName.includes("at")?"alignat":"align",o=t.envName==="split",c=Ii(t.parser,{cols:a,addJot:!0,autoTag:o?void 0:cp(t.envName),emptySingleRow:!0,colSeparationType:s,maxNumCols:o?2:void 0,leqno:t.parser.settings.leqno},"display"),d=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 x=vt(n[0].body[b],"textord");p+=x.text}d=Number(p),m=d*2}var y=!m;c.body.forEach(function(C){for(var I=1;I<C.length;I+=2){var O=vt(C[I],"styling"),X=vt(O.body[0],"ordgroup");X.body.unshift(h)}if(y)m<C.length&&(m=C.length);else{var q=C.length/2;if(d<q)throw new Ae("Too many math in a row: "+("expected "+d+", but got "+q),C[0])}});for(var E=0;E<m;++E){var N="r",R=0;E%2===1?N="l":E>0&&y&&(R=1),a[E]={type:"align",align:N,pregap:R,postgap:0}}return c.colSeparationType=y?"align":"alignat",c};ma({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=Qu(t[0]),a=n?[t[0]]:vt(t[0],"ordgroup").body,s=a.map(function(c){var d=Wu(c),m=d.text;if("lcr".includes(m))return{type:"align",align:m};if(m==="|")return{type:"separator",separator:"|"};if(m===":")return{type:"separator",separator:":"};throw new Ae("Unknown column alignment: "+m,c)}),o={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return Ii(e.parser,o,up(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 Ae("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),a.cols=[{type:"align",align:n}]}}var o=Ii(e.parser,a,up(e.envName)),c=Math.max(0,...o.body.map(d=>d.length));return o.cols=new Array(c).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},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=Qu(t[0]),a=n?[t[0]]:vt(t[0],"ordgroup").body,s=a.map(function(d){var m=Wu(d),h=m.text;if("lc".includes(h))return{type:"align",align:h};throw new Ae("Unknown column alignment: "+h,d)});if(s.length>1)throw new Ae("{subarray} can contain only one column");var o={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},c=Ii(e.parser,o,"script");if(c.body.length>0&&c.body[0].length>1)throw new Ae("{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,up(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:O5,htmlBuilder:ha,mathmlBuilder:pa});ma({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){TR.has(e.envName)&&r0(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:cp(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:O5,htmlBuilder:ha,mathmlBuilder:pa});ma({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){r0(e);var t={autoTag:cp(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 r0(e),mR(e.parser)},htmlBuilder:ha,mathmlBuilder:pa});B("\\nonumber","\\gdef\\@eqnsw{0}");B("\\notag","\\nonumber");Be({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Ae(e.funcName+" valid only within array environment")}});var U4=I5;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 Ae("Invalid environment name",s);for(var o="",c=0;c<s.body.length;++c)o+=vt(s.body[c],"textord").text;if(a==="\\begin"){if(!U4.hasOwnProperty(o))throw new Ae("No such environment: "+o,s);var d=U4[o],{args:m,optArgs:h}=n.parseArguments("\\begin{"+o+"}",d),p={mode:n.mode,envName:o,parser:n},b=d.handler(p,m,h);n.expect("\\end",!1);var x=n.nextToken,y=vt(n.parseFunction(),"environment");if(y.name!==o)throw new Ae("Mismatch: \\begin{"+o+"} matched by \\end{"+y.name+"}",x);return b}return{type:"environment",mode:n.mode,name:o,nameGroup:s}}});var D5=(e,t)=>{var n=e.font,a=t.withFont(n);return Ft(e.body,a)},j5=(e,t)=>{var n=e.font,a=t.withFont(n);return an(e.body,a)},H4={"\\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=Ru(t[0]),o=a;return o in H4&&(o=H4[o]),{type:"font",mode:n.mode,font:o.slice(1),body:s}},htmlBuilder:D5,mathmlBuilder:j5});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:Ju(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:o}=n,c=n.parseExpression(!0,s);return{type:"font",mode:o,font:"math"+a.slice(1),body:{type:"ordgroup",mode:n.mode,body:c}}},htmlBuilder:D5,mathmlBuilder:j5});var CR=(e,t)=>{var n=t.style,a=n.fracNum(),s=n.fracDen(),o;o=t.havingStyle(a);var c=Ft(e.numer,o,t);if(e.continued){var d=8.5/t.fontMetrics().ptPerEm,m=3.5/t.fontMetrics().ptPerEm;c.height=c.height<d?d:c.height,c.depth=c.depth<m?m:c.depth}o=t.havingStyle(s);var h=Ft(e.denom,o,t),p,b,x;e.hasBarLine?(e.barSize?(b=gn(e.barSize,t),p=rl("frac-line",t,b)):p=rl("frac-line",t),b=p.height,x=p.height):(p=null,b=0,x=t.fontMetrics().defaultRuleThickness);var y,E,N;n.size===dt.DISPLAY.size?(y=t.fontMetrics().num1,b>0?E=3*x:E=7*x,N=t.fontMetrics().denom1):(b>0?(y=t.fontMetrics().num2,E=x):(y=t.fontMetrics().num3,E=3*x),N=t.fontMetrics().denom2);var R;if(p){var I=t.fontMetrics().axisHeight;y-c.depth-(I+.5*b)<E&&(y+=E-(y-c.depth-(I+.5*b))),I-.5*b-(h.height-N)<E&&(N+=E-(I-.5*b-(h.height-N)));var O=-(I-.5*b);R=Ht({positionType:"individualShift",children:[{type:"elem",elem:h,shift:N},{type:"elem",elem:p,shift:O},{type:"elem",elem:c,shift:-y}]})}else{var C=y-c.depth-(h.height-N);C<E&&(y+=.5*(E-C),N+=.5*(E-C)),R=Ht({positionType:"individualShift",children:[{type:"elem",elem:h,shift:N},{type:"elem",elem:c,shift:-y}]})}o=t.havingStyle(n),R.height*=o.sizeMultiplier/t.sizeMultiplier,R.depth*=o.sizeMultiplier/t.sizeMultiplier;var X;n.size===dt.DISPLAY.size?X=t.fontMetrics().delim1:n.size===dt.SCRIPTSCRIPT.size?X=t.havingStyle(dt.SCRIPT).fontMetrics().delim2:X=t.fontMetrics().delim2;var q,A;return e.leftDelim==null?q=To(t,["mopen"]):q=vh(e.leftDelim,X,!0,t.havingStyle(n),e.mode,["mopen"]),e.continued?A=Ce([]):e.rightDelim==null?A=To(t,["mclose"]):A=vh(e.rightDelim,X,!0,t.havingStyle(n),e.mode,["mclose"]),Ce(["mord"].concat(o.sizingClasses(t)),[q,Ce(["mfrac"],[R]),A],t)},RR=(e,t)=>{var n=new Ie("mfrac",[an(e.numer,t),an(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var a=gn(e.barSize,t);n.setAttribute("linethickness",De(a))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var o=new Ie("mo",[new Ln(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(n),e.rightDelim!=null){var c=new Ie("mo",[new Ln(e.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),s.push(c)}return ip(s)}return n},L5=(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],o=t[1],c,d=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,d="(",m=")";break;case"\\\\bracefrac":c=!1,d="\\{",m="\\}";break;case"\\\\brackfrac":c=!1,d="[",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"),L5({type:"genfrac",mode:n.mode,numer:s,denom:o,continued:h,hasBarLine:c,leftDelim:d,rightDelim:m,barSize:null},p)},htmlBuilder:CR,mathmlBuilder:RR});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 F4=["display","text","script","scriptscript"],P4=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],o=Ru(t[0]),c=o.type==="atom"&&o.family==="open"?P4(o.text):null,d=Ru(t[1]),m=d.type==="atom"&&d.family==="close"?P4(d.text):null,h=vt(t[2],"size"),p,b=null;h.isBlank?p=!0:(b=h.value,p=b.number>0);var x=null,y=t[3];if(y.type==="ordgroup"){if(y.body.length>0){var E=vt(y.body[0],"textord");x=F4[Number(E.text)]}}else y=vt(y,"textord"),x=F4[Number(y.text)];return L5({type:"genfrac",mode:n.mode,numer:a,denom:s,continued:!1,hasBarLine:p,barSize:b,leftDelim:c,rightDelim:m},x)}});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:vt(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],o=vt(t[1],"infix").size;if(!o)throw new Error("\\\\abovefrac expected size, but got "+String(o));var c=t[2],d=o.number>0;return{type:"genfrac",mode:n.mode,numer:s,denom:c,continued:!1,hasBarLine:d,barSize:o,leftDelim:null,rightDelim:null}}});var z5=(e,t)=>{var n=t.style,a,s;e.type==="supsub"?(a=e.sup?Ft(e.sup,t.havingStyle(n.sup()),t):Ft(e.sub,t.havingStyle(n.sub()),t),s=vt(e.base,"horizBrace")):s=vt(e,"horizBrace");var o=Ft(s.base,t.havingBaseStyle(dt.DISPLAY)),c=Zu(s,t),d;if(s.isOver?d=Ht({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:c,wrapperClasses:["svg-align"]}]}):d=Ht({positionType:"bottom",positionData:o.depth+.1+c.height,children:[{type:"elem",elem:c,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:o}]}),a){var m=Ce(["minner",s.isOver?"mover":"munder"],[d],t);s.isOver?d=Ht({positionType:"firstBaseline",children:[{type:"elem",elem:m},{type:"kern",size:.2},{type:"elem",elem:a}]}):d=Ht({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"],[d],t)},AR=(e,t)=>{var n=Xu(e.label);return new Ie(e.isOver?"mover":"munder",[an(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:z5,mathmlBuilder:AR});Be({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=t[1],s=vt(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=Hn(e.body,t,!1);return FC(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Ai(e.body,t);return n instanceof Ie||(n=new Ie("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=vt(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:a}))return n.formatUnsupportedCmd("\\url");for(var s=[],o=0;o<a.length;o++){var c=a[o];c==="~"&&(c="\\textasciitilde"),s.push({type:"textord",mode:"text",text:c})}var d={type:"text",mode:n.mode,font:"\\texttt",body:s};return{type:"href",mode:n.mode,href:a,body:jn(d)}}});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=Hn(e.body,t.withFont(""),!1);return Ga(n)},mathmlBuilder(e,t){return new Ie("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,o=vt(t[0],"raw").string,c=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var d,m={};switch(a){case"\\htmlClass":m.class=o,d={command:"\\htmlClass",class:o};break;case"\\htmlId":m.id=o,d={command:"\\htmlId",id:o};break;case"\\htmlStyle":m.style=o,d={command:"\\htmlStyle",style:o};break;case"\\htmlData":{for(var h=o.split(","),p=0;p<h.length;p++){var b=h[p],x=b.indexOf("=");if(x<0)throw new Ae("\\htmlData key/value '"+b+"' missing equals sign");var y=b.slice(0,x),E=b.slice(x+1);m["data-"+y.trim()]=E}d={command:"\\htmlData",attributes:m};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(d)?{type:"html",mode:n.mode,attributes:m,body:jn(c)}:n.formatUnsupportedCmd(a)},htmlBuilder:(e,t)=>{var n=Hn(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 o in e.attributes)o!=="class"&&e.attributes.hasOwnProperty(o)&&s.setAttribute(o,e.attributes[o]);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=Hn(e.html,t,!1);return Ga(n)},mathmlBuilder:(e,t)=>Ai(e.mathml,t)});var Vf=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 Ae("Invalid size: '"+t+"' in \\includegraphics");var a={number:+(n[1]+n[2]),unit:n[3]};if(!J3(a))throw new Ae("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"},o={number:.9,unit:"em"},c={number:0,unit:"em"},d="";if(n[0])for(var m=vt(n[0],"raw").string,h=m.split(","),p=0;p<h.length;p++){var b=h[p].split("=");if(b.length===2){var x=b[1].trim();switch(b[0].trim()){case"alt":d=x;break;case"width":s=Vf(x);break;case"height":o=Vf(x);break;case"totalheight":c=Vf(x);break;default:throw new Ae("Invalid key: '"+b[0]+"' in \\includegraphics.")}}}var y=vt(t[0],"url").url;return d===""&&(d=y,d=d.replace(/^.*[\\/]/,""),d=d.substring(0,d.lastIndexOf("."))),a.settings.isTrusted({command:"\\includegraphics",url:y})?{type:"includegraphics",mode:a.mode,alt:d,width:s,height:o,totalheight:c,src:y}:a.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=gn(e.height,t),a=0;e.totalheight.number>0&&(a=gn(e.totalheight,t)-n);var s=0;e.width.number>0&&(s=gn(e.width,t));var o={height:De(n+a)};s>0&&(o.width=De(s)),a>0&&(o.verticalAlign=De(-a));var c=new IC(e.src,e.alt,o);return c.height=n,c.depth=a,c},mathmlBuilder:(e,t)=>{var n=new Ie("mglyph",[]);n.setAttribute("alt",e.alt);var a=gn(e.height,t),s=0;if(e.totalheight.number>0&&(s=gn(e.totalheight,t)-a,n.setAttribute("valign",De(-s))),n.setAttribute("height",De(a+s)),e.width.number>0){var o=gn(e.width,t);n.setAttribute("width",De(o))}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=vt(t[0],"size");if(n.settings.strict){var o=a[1]==="m",c=s.value.unit==="mu";o?(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 s5(e.dimension,t)},mathmlBuilder(e,t){var n=gn(e.dimension,t);return new f5(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([],[Ft(e.body,t)]),n=Ce(["inner"],[n],t)):n=Ce(["inner"],[Ft(e.body,t)]);var a=Ce(["fix"],[]),s=Ce([e.alignment],[n,a],t),o=Ce(["strut"]);return o.style.height=De(s.height+s.depth),s.depth&&(o.style.verticalAlign=De(-s.depth)),s.children.unshift(o),s=Ce(["thinbox"],[s],t),Ce(["mord","vbox"],[s],t)},mathmlBuilder:(e,t)=>{var n=new Ie("mpadded",[an(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 o=n==="\\("?"\\)":"$",c=a.parseExpression(!1,o);return a.expect(o),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 Ae("Mismatched "+e.funcName)}});var $4=(e,t)=>{switch(t.style.size){case dt.DISPLAY.size:return e.display;case dt.TEXT.size:return e.text;case dt.SCRIPT.size:return e.script;case dt.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=$4(e,t),a=Hn(n,t,!1);return Ga(a)},mathmlBuilder:(e,t)=>{var n=$4(e,t);return Ai(n,t)}});var B5=(e,t,n,a,s,o,c)=>{e=Ce([],[e]);var d=n&&Pa(n),m,h;if(t){var p=Ft(t,a.havingStyle(s.sup()),a);h={elem:p,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-p.depth)}}if(n){var b=Ft(n,a.havingStyle(s.sub()),a);m={elem:b,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-b.height)}}var x;if(h&&m){var y=a.fontMetrics().bigOpSpacing5+m.elem.height+m.elem.depth+m.kern+e.depth+c;x=Ht({positionType:"bottom",positionData:y,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:m.elem,marginLeft:De(-o)},{type:"kern",size:m.kern},{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:De(o)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else if(m){var E=e.height-c;x=Ht({positionType:"top",positionData:E,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:m.elem,marginLeft:De(-o)},{type:"kern",size:m.kern},{type:"elem",elem:e}]})}else if(h){var N=e.depth+c;x=Ht({positionType:"bottom",positionData:N,children:[{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:De(o)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else return e;var R=[x];if(m&&o!==0&&!d){var C=Ce(["mspace"],[],a);C.style.marginRight=De(o),R.unshift(C)}return Ce(["mop","op-limits"],R,a)},q5=new Set(["\\smallint"]),dl=(e,t)=>{var n,a,s=!1,o;e.type==="supsub"?(n=e.sup,a=e.sub,o=vt(e.base,"op"),s=!0):o=vt(e,"op");var c=t.style,d=!1;c.size===dt.DISPLAY.size&&o.symbol&&!q5.has(o.name)&&(d=!0);var m,h;if(o.symbol){var p=d?"Size2-Regular":"Size1-Regular",b="";if((o.name==="\\oiint"||o.name==="\\oiiint")&&(b=o.name.slice(1),o.name=b==="oiint"?"\\iint":"\\iiint"),m=lr(o.name,p,"math",t,["mop","op-symbol",d?"large-op":"small-op"]),h=m.italic,b.length>0){var x=o5(b+"Size"+(d?"2":"1"),t);m=Ht({positionType:"individualShift",children:[{type:"elem",elem:m,shift:0},{type:"elem",elem:x,shift:d?.08:0}]}),o.name="\\"+b,m.classes.unshift("mop"),m.italic=h}}else if(o.body){var y=Hn(o.body,t,!0);y.length===1&&y[0]instanceof Lr?(m=y[0],m.classes[0]="mop"):m=Ce(["mop"],y,t)}else{for(var E=[],N=1;N<o.name.length;N++)E.push(rp(o.name[N],o.mode,t));m=Ce(["mop"],E,t)}var R=0,C=0;if((m instanceof Lr||o.name==="\\oiint"||o.name==="\\oiiint")&&!o.suppressBaseShift){var I;R=(m.height-m.depth)/2-t.fontMetrics().axisHeight,C=(I=m.italic)!=null?I:0}return s?B5(m,n,a,t,c,C,R):(R&&(m.style.position="relative",m.style.top=De(R)),m)},Oo=(e,t)=>{var n;if(e.symbol)n=new Ie("mo",[Wr(e.name,e.mode)]),q5.has(e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new Ie("mo",Br(e.body,t));else{n=new Ie("mi",[new Ln(e.name.slice(1))]);var a=new Ie("mo",[Wr("","text")]);e.parentIsSupSub?n=new Ie("mrow",[n,a]):n=d5([n,a])}return n},_R={"∏":"\\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=_R[s]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:dl,mathmlBuilder:Oo});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:dl,mathmlBuilder:Oo});var IR={"∫":"\\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:dl,mathmlBuilder:Oo});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:dl,mathmlBuilder:Oo});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=IR[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:dl,mathmlBuilder:Oo});var U5=(e,t)=>{var n,a,s=!1,o;e.type==="supsub"?(n=e.sup,a=e.sub,o=vt(e.base,"operatorname"),s=!0):o=vt(e,"operatorname");var c;if(o.body.length>0){for(var d=o.body.map(b=>{var x="text"in b?b.text:void 0;return typeof x=="string"?{type:"textord",mode:b.mode,text:x}:b}),m=Hn(d,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?B5(c,n,a,t,t.style,0,0):c},MR=(e,t)=>{for(var n=Br(e.body,t.withFont("mathrm")),a=!0,s=0;s<n.length;s++){var o=n[s];if(!(o instanceof f5))if(o instanceof Ie)switch(o.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var c=o.children[0];o.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 d=n.map(p=>p.toText()).join("");n=[new Ln(d)]}var m=new Ie("mi",n);m.setAttribute("mathvariant","normal");var h=new Ie("mo",[Wr("","text")]);return e.parentIsSupSub?new Ie("mrow",[m,h]):d5([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:U5,mathmlBuilder:MR});B("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");us({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Ga(Hn(e.body,t,!1)):Ce(["mord"],Hn(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=Ft(e.body,t.havingCrampedStyle()),a=rl("overline-line",t),s=t.fontMetrics().defaultRuleThickness,o=Ht({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*s},{type:"elem",elem:a},{type:"kern",size:s}]});return Ce(["mord","overline"],[o],t)},mathmlBuilder(e,t){var n=new Ie("mo",[new Ln("‾")]);n.setAttribute("stretchy","true");var a=new Ie("mover",[an(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=Hn(e.body,t.withPhantom(),!1);return Ga(n)},mathmlBuilder:(e,t)=>{var n=Br(e.body,t);return new Ie("mphantom",n)}});B("\\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"],[Ft(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 Ie("mphantom",n),s=new Ie("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=vt(t[0],"size").value,s=t[1];return{type:"raisebox",mode:n.mode,dy:a,body:s}},htmlBuilder(e,t){var n=Ft(e.body,t),a=gn(e.dy,t);return Ht({positionType:"shift",positionData:-a,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new Ie("mpadded",[an(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],o=vt(t[0],"size"),c=vt(t[1],"size");return{type:"rule",mode:a.mode,shift:s&&vt(s,"size").value,width:o.value,height:c.value}},htmlBuilder(e,t){var n=Ce(["mord","rule"],[],t),a=gn(e.width,t),s=gn(e.height,t),o=e.shift?gn(e.shift,t):0;return n.style.borderRightWidth=De(a),n.style.borderTopWidth=De(s),n.style.bottom=De(o),n.width=a,n.height=s+o,n.depth=-o,n.maxFontSize=s*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=gn(e.width,t),a=gn(e.height,t),s=e.shift?gn(e.shift,t):0,o=t.color&&t.getColor()||"black",c=new Ie("mspace");c.setAttribute("mathbackground",o),c.setAttribute("width",De(n)),c.setAttribute("height",De(a));var d=new Ie("mpadded",[c]);return s>=0?d.setAttribute("height",De(s)):(d.setAttribute("height",De(s)),d.setAttribute("depth",De(-s))),d.setAttribute("voffset",De(s)),d}});function H5(e,t,n){for(var a=Hn(e,t,!1),s=t.sizeMultiplier/n.sizeMultiplier,o=0;o<a.length;o++){var c=a[o].classes.indexOf("sizing");c<0?Array.prototype.push.apply(a[o].classes,t.sizingClasses(n)):a[o].classes[c+1]==="reset-size"+t.size&&(a[o].classes[c+1]="reset-size"+n.size),a[o].height*=s,a[o].depth*=s}return Ga(a)}var G4=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],OR=(e,t)=>{var n=t.havingSize(e.size);return H5(e.body,n,t)};Be({type:"sizing",names:G4,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:a,parser:s}=e,o=s.parseExpression(!1,n);return{type:"sizing",mode:s.mode,size:G4.indexOf(a)+1,body:o}},htmlBuilder:OR,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),a=Br(e.body,n),s=new Ie("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,o=!1,c=n[0]&&vt(n[0],"ordgroup");if(c)for(var d,m=0;m<c.body.length;++m){var h=c.body[m];if(d=Wu(h).text,d==="t")s=!0;else if(d==="b")o=!0;else{s=!1,o=!1;break}}else s=!0,o=!0;var p=t[0];return{type:"smash",mode:a.mode,body:p,smashHeight:s,smashDepth:o}},htmlBuilder:(e,t)=>{var n=Ce([],[Ft(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=Ht({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return Ce(["mord"],[s],t)},mathmlBuilder:(e,t)=>{var n=new Ie("mpadded",[an(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],o=t[0];return{type:"sqrt",mode:a.mode,body:o,index:s}},htmlBuilder(e,t){var n=Ft(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=al(n,t);var a=t.fontMetrics(),s=a.defaultRuleThickness,o=s;t.style.id<dt.TEXT.id&&(o=t.fontMetrics().xHeight);var c=s+o/4,d=n.height+n.depth+c+s,{span:m,ruleWidth:h,advanceWidth:p}=yR(d,t),b=m.height-h;b>n.height+n.depth+c&&(c=(c+b-n.height-n.depth)/2);var x=m.height-n.height-c-h;n.style.paddingLeft=De(p);var y=Ht({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+x)},{type:"elem",elem:m},{type:"kern",size:h}]});if(e.index){var E=t.havingStyle(dt.SCRIPTSCRIPT),N=Ft(e.index,E,t),R=.6*(y.height-y.depth),C=Ht({positionType:"shift",positionData:-R,children:[{type:"elem",elem:N}]}),I=Ce(["root"],[C]);return Ce(["mord","sqrt"],[I,y],t)}else return Ce(["mord","sqrt"],[y],t)},mathmlBuilder(e,t){var{body:n,index:a}=e;return a?new Ie("mroot",[an(n,t),an(a,t)]):new Ie("msqrt",[an(n,t)])}});var yh={display:dt.DISPLAY,text:dt.TEXT,script:dt.SCRIPT,scriptscript:dt.SCRIPTSCRIPT};function DR(e){return e in yh}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,o=s.parseExpression(!0,n),c=a.slice(1,a.length-5);if(!DR(c))throw new Error("Unknown style: "+c);return{type:"styling",mode:s.mode,style:c,body:o}},htmlBuilder(e,t){var n=yh[e.style],a=t.havingStyle(n);return e.resetFont&&(a=a.withFont("")),H5(e.body,a,t)},mathmlBuilder(e,t){var n=yh[e.style],a=t.havingStyle(n);e.resetFont&&(a=a.withFont(""));var s=Br(e.body,a),o=new Ie("mstyle",s),c={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},d=c[e.style];return o.setAttribute("scriptlevel",d[0]),o.setAttribute("displaystyle",d[1]),o}});var jR=function(t,n){var a=t.base;if(a)if(a.type==="op"){var s=a.limits&&(n.style.size===dt.DISPLAY.size||a.alwaysHandleSupSub);return s?dl:null}else if(a.type==="operatorname"){var o=a.alwaysHandleSupSub&&(n.style.size===dt.DISPLAY.size||a.limits);return o?U5:null}else{if(a.type==="accent")return Pa(a.base)?lp:null;if(a.type==="horizBrace"){var c=!t.sub;return c===a.isOver?z5:null}else return null}else return null};us({type:"supsub",htmlBuilder(e,t){var n=jR(e,t);if(n)return n(e,t);var{base:a,sup:s,sub:o}=e,c=Ft(a,t),d,m,h=t.fontMetrics(),p=0,b=0,x=a&&Pa(a);if(s){var y=t.havingStyle(t.style.sup());d=Ft(s,y,t),x||(p=c.height-y.fontMetrics().supDrop*y.sizeMultiplier/t.sizeMultiplier)}if(o){var E=t.havingStyle(t.style.sub());m=Ft(o,E,t),x||(b=c.depth+E.fontMetrics().subDrop*E.sizeMultiplier/t.sizeMultiplier)}var N;t.style===dt.DISPLAY?N=h.sup1:t.style.cramped?N=h.sup3:N=h.sup2;var R=t.sizeMultiplier,C=De(.5/h.ptPerEm/R),I=null;if(m){var O=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(c instanceof Lr||O){var X;I=De(-((X=c.italic)!=null?X:0))}}var q;if(d&&m){p=Math.max(p,N,d.depth+.25*h.xHeight),b=Math.max(b,h.sub2);var A=h.defaultRuleThickness,F=4*A;if(p-d.depth-(m.height-b)<F){b=F-(p-d.depth)+m.height;var J=.8*h.xHeight-(p-d.depth);J>0&&(p+=J,b-=J)}var W=[{type:"elem",elem:m,shift:b,marginRight:C,marginLeft:I},{type:"elem",elem:d,shift:-p,marginRight:C}];q=Ht({positionType:"individualShift",children:W})}else if(m){b=Math.max(b,h.sub1,m.height-.8*h.xHeight);var z=[{type:"elem",elem:m,marginLeft:I,marginRight:C}];q=Ht({positionType:"shift",positionData:b,children:z})}else if(d)p=Math.max(p,N,d.depth+.25*h.xHeight),q=Ht({positionType:"shift",positionData:-p,children:[{type:"elem",elem:d,marginRight:C}]});else throw new Error("supsub must have either sup or sub.");var U=hh(c,"right")||"mord";return Ce([U],[c,Ce(["msupsub"],[q])],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 o=[an(e.base,t)];e.sub&&o.push(an(e.sub,t)),e.sup&&o.push(an(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===dt.DISPLAY||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(t.style===dt.DISPLAY||h.limits)?c="munderover":c="msubsup"}else{var m=e.base;m&&m.type==="op"&&m.limits&&(t.style===dt.DISPLAY||m.alwaysHandleSupSub)||m&&m.type==="operatorname"&&m.alwaysHandleSupSub&&(m.limits||t.style===dt.DISPLAY)?c="munder":c="msub"}else{var d=e.base;d&&d.type==="op"&&d.limits&&(t.style===dt.DISPLAY||d.alwaysHandleSupSub)||d&&d.type==="operatorname"&&d.alwaysHandleSupSub&&(d.limits||t.style===dt.DISPLAY)?c="mover":c="msup"}return new Ie(c,o)}});us({type:"atom",htmlBuilder(e,t){return rp(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new Ie("mo",[Wr(e.text,e.mode)]);if(e.family==="bin"){var a=sp(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 F5={mi:"italic",mn:"normal",mtext:"normal"};us({type:"mathord",htmlBuilder(e,t){return Yu(e,t,"mathord")},mathmlBuilder(e,t){var n=new Ie("mi",[Wr(e.text,e.mode,t)]),a=sp(e,t)||"italic";return a!==F5[n.type]&&n.setAttribute("mathvariant",a),n}});us({type:"textord",htmlBuilder(e,t){return Yu(e,t,"textord")},mathmlBuilder(e,t){var n=Wr(e.text,e.mode,t),a=sp(e,t)||"normal",s;return e.mode==="text"?s=new Ie("mtext",[n]):/[0-9]/.test(e.text)?s=new Ie("mn",[n]):e.text==="\\prime"?s=new Ie("mo",[n]):s=new Ie("mi",[n]),a!==F5[s.type]&&s.setAttribute("mathvariant",a),s}});var Yf={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Xf={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};us({type:"spacing",htmlBuilder(e,t){if(Xf.hasOwnProperty(e.text)){var n=Xf[e.text].className||"";if(e.mode==="text"){var a=Yu(e,t,"textord");return a.classes.push(n),a}else return Ce(["mspace",n],[rp(e.text,e.mode,t)],t)}else{if(Yf.hasOwnProperty(e.text))return Ce(["mspace",Yf[e.text]],[],t);throw new Ae('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(Xf.hasOwnProperty(e.text))n=new Ie("mtext",[new Ln(" ")]);else{if(Yf.hasOwnProperty(e.text))return new Ie("mspace");throw new Ae('Unknown type of space "'+e.text+'"')}return n}});var K4=()=>{var e=new Ie("mtd",[]);return e.setAttribute("width","50%"),e};us({type:"tag",mathmlBuilder(e,t){var n=new Ie("mtable",[new Ie("mtr",[K4(),new Ie("mtd",[Ai(e.body,t)]),K4(),new Ie("mtd",[Ai(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var V4={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Y4={"\\textbf":"textbf","\\textmd":"textmd"},LR={"\\textit":"textit","\\textup":"textup"},X4=(e,t)=>{var n=e.font;if(n){if(V4[n])return t.withTextFontFamily(V4[n]);if(Y4[n])return t.withTextFontWeight(Y4[n]);if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(LR[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=X4(e,t),a=Hn(e.body,n,!0);return Ce(["mord","text"],a,n)},mathmlBuilder(e,t){var n=X4(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=Ft(e.body,t),a=rl("underline-line",t),s=t.fontMetrics().defaultRuleThickness,o=Ht({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"],[o],t)},mathmlBuilder(e,t){var n=new Ie("mo",[new Ln("‾")]);n.setAttribute("stretchy","true");var a=new Ie("munder",[an(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=Ft(e.body,t),a=t.fontMetrics().axisHeight,s=.5*(n.height-a-(n.depth+a));return Ht({positionType:"shift",positionData:s,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new Ie("mpadded",[an(e.body,t)],["vcenter"]);return new Ie("mrow",[n])}});Be({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Ae("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=Z4(e),a=[],s=t.havingStyle(t.style.text()),o=0;o<n.length;o++){var c=n[o];c==="~"&&(c="\\textasciitilde"),a.push(lr(c,"Typewriter-Regular",e.mode,s,["mord","texttt"]))}return Ce(["mord","text"].concat(s.sizingClasses(t)),i5(a),s)},mathmlBuilder(e,t){var n=new Ln(Z4(e)),a=new Ie("mtext",[n]);return a.setAttribute("mathvariant","monospace"),a}});var Z4=e=>e.body.replace(/ /g,e.star?"␣":" "),Ei=c5,P5=`[ \r
|
|
295
|
+
]`,zR="\\\\[a-zA-Z@]+",BR="\\\\[^\uD800-\uDFFF]",qR="("+zR+")"+P5+"*",UR=`\\\\(
|
|
296
|
+
|[ \r ]+
|
|
297
|
+
?)[ \r ]*`,xh="[̀-ͯ]",HR=new RegExp(xh+"+$"),FR="("+P5+"+)|"+(UR+"|")+"([!-\\[\\]-‧-豈-]"+(xh+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(xh+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+qR)+("|"+BR+")");class W4{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(FR,"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 Ae("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 o=t.indexOf(`
|
|
298
|
+
`,this.tokenRegex.lastIndex);return o===-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=o+1,this.lex()}return new jr(s,new wr(this,n,this.tokenRegex.lastIndex))}}class PR{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 Ae("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 o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(t)&&(o[t]=this.current[t])}n==null?delete this.current[t]:this.current[t]=n}}var $R=M5;B("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});B("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});B("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});B("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});B("\\@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}});B("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");B("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Q4={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};B("\\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 Ae("\\char` missing argument");a=t.text.charCodeAt(0)}else n=10;if(n){if(a=Q4[t.text],a==null||a>=n)throw new Ae("Invalid base-"+n+" digit "+t.text);for(var s;(s=Q4[e.future().text])!=null&&s<n;)a*=n,a+=s,e.popToken()}return"\\@char{"+a+"}"});var dp=(e,t,n,a)=>{var s=e.consumeArg().tokens;if(s.length!==1)throw new Ae("\\newcommand's first argument must be a macro name");var o=s[0].text,c=e.isDefined(o);if(c&&!t)throw new Ae("\\newcommand{"+o+"} attempting to redefine "+(o+"; use \\renewcommand"));if(!c&&!n)throw new Ae("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var d=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 Ae("Invalid number of arguments: "+m);d=parseInt(m),s=e.consumeArg().tokens}return c&&a||e.macros.set(o,{tokens:s,numArgs:d}),""};B("\\newcommand",e=>dp(e,!1,!0,!1));B("\\renewcommand",e=>dp(e,!0,!1,!1));B("\\providecommand",e=>dp(e,!0,!0,!0));B("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});B("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});B("\\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]),""});B("\\bgroup","{");B("\\egroup","}");B("~","\\nobreakspace");B("\\lq","`");B("\\rq","'");B("\\aa","\\r a");B("\\AA","\\r A");B("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");B("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");B("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");B("ℬ","\\mathscr{B}");B("ℰ","\\mathscr{E}");B("ℱ","\\mathscr{F}");B("ℋ","\\mathscr{H}");B("ℐ","\\mathscr{I}");B("ℒ","\\mathscr{L}");B("ℳ","\\mathscr{M}");B("ℛ","\\mathscr{R}");B("ℭ","\\mathfrak{C}");B("ℌ","\\mathfrak{H}");B("ℨ","\\mathfrak{Z}");B("\\Bbbk","\\Bbb{k}");B("\\llap","\\mathllap{\\textrm{#1}}");B("\\rlap","\\mathrlap{\\textrm{#1}}");B("\\clap","\\mathclap{\\textrm{#1}}");B("\\mathstrut","\\vphantom{(}");B("\\underbar","\\underline{\\text{#1}}");B("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');B("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");B("\\ne","\\neq");B("≠","\\neq");B("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");B("∉","\\notin");B("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");B("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");B("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");B("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");B("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");B("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");B("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");B("⟂","\\perp");B("‼","\\mathclose{!\\mkern-0.8mu!}");B("∌","\\notni");B("⌜","\\ulcorner");B("⌝","\\urcorner");B("⌞","\\llcorner");B("⌟","\\lrcorner");B("©","\\copyright");B("®","\\textregistered");B("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');B("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');B("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');B("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');B("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");B("⋮","\\vdots");B("\\varGamma","\\mathit{\\Gamma}");B("\\varDelta","\\mathit{\\Delta}");B("\\varTheta","\\mathit{\\Theta}");B("\\varLambda","\\mathit{\\Lambda}");B("\\varXi","\\mathit{\\Xi}");B("\\varPi","\\mathit{\\Pi}");B("\\varSigma","\\mathit{\\Sigma}");B("\\varUpsilon","\\mathit{\\Upsilon}");B("\\varPhi","\\mathit{\\Phi}");B("\\varPsi","\\mathit{\\Psi}");B("\\varOmega","\\mathit{\\Omega}");B("\\substack","\\begin{subarray}{c}#1\\end{subarray}");B("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");B("\\boxed","\\fbox{$\\displaystyle{#1}$}");B("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");B("\\implies","\\DOTSB\\;\\Longrightarrow\\;");B("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");B("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");B("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var J4={",":"\\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"},GR=new Set(["bin","rel"]);B("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in J4?t=J4[n]:(n.slice(0,4)==="\\not"||n in fn.math&&GR.has(fn.math[n].group))&&(t="\\dotsb"),t});var fp={")":!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};B("\\dotso",function(e){var t=e.future().text;return t in fp?"\\ldots\\,":"\\ldots"});B("\\dotsc",function(e){var t=e.future().text;return t in fp&&t!==","?"\\ldots\\,":"\\ldots"});B("\\cdots",function(e){var t=e.future().text;return t in fp?"\\@cdots\\,":"\\@cdots"});B("\\dotsb","\\cdots");B("\\dotsm","\\cdots");B("\\dotsi","\\!\\cdots");B("\\dotsx","\\ldots\\,");B("\\DOTSI","\\relax");B("\\DOTSB","\\relax");B("\\DOTSX","\\relax");B("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");B("\\,","\\tmspace+{3mu}{.1667em}");B("\\thinspace","\\,");B("\\>","\\mskip{4mu}");B("\\:","\\tmspace+{4mu}{.2222em}");B("\\medspace","\\:");B("\\;","\\tmspace+{5mu}{.2777em}");B("\\thickspace","\\;");B("\\!","\\tmspace-{3mu}{.1667em}");B("\\negthinspace","\\!");B("\\negmedspace","\\tmspace-{4mu}{.2222em}");B("\\negthickspace","\\tmspace-{5mu}{.277em}");B("\\enspace","\\kern.5em ");B("\\enskip","\\hskip.5em\\relax");B("\\quad","\\hskip1em\\relax");B("\\qquad","\\hskip2em\\relax");B("\\tag","\\@ifstar\\tag@literal\\tag@paren");B("\\tag@paren","\\tag@literal{({#1})}");B("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Ae("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});B("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");B("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");B("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");B("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");B("\\newline","\\\\\\relax");B("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var $5=De(da["Main-Regular"][84][1]-.7*da["Main-Regular"][65][1]);B("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+$5+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");B("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+$5+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");B("\\hspace","\\@ifstar\\@hspacer\\@hspace");B("\\@hspace","\\hskip #1\\relax");B("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");B("\\ordinarycolon",":");B("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");B("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');B("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');B("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');B("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');B("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');B("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');B("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');B("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');B("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');B("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');B("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');B("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');B("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');B("∷","\\dblcolon");B("∹","\\eqcolon");B("≔","\\coloneqq");B("≕","\\eqqcolon");B("⩴","\\Coloneqq");B("\\ratio","\\vcentcolon");B("\\coloncolon","\\dblcolon");B("\\colonequals","\\coloneqq");B("\\coloncolonequals","\\Coloneqq");B("\\equalscolon","\\eqqcolon");B("\\equalscoloncolon","\\Eqqcolon");B("\\colonminus","\\coloneq");B("\\coloncolonminus","\\Coloneq");B("\\minuscolon","\\eqcolon");B("\\minuscoloncolon","\\Eqcolon");B("\\coloncolonapprox","\\Colonapprox");B("\\coloncolonsim","\\Colonsim");B("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");B("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");B("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");B("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");B("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");B("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");B("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");B("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");B("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");B("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");B("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");B("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");B("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");B("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");B("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");B("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");B("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");B("\\nleqq","\\html@mathml{\\@nleqq}{≰}");B("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");B("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");B("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");B("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");B("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");B("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");B("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");B("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");B("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");B("\\imath","\\html@mathml{\\@imath}{ı}");B("\\jmath","\\html@mathml{\\@jmath}{ȷ}");B("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");B("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");B("⟦","\\llbracket");B("⟧","\\rrbracket");B("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");B("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");B("⦃","\\lBrace");B("⦄","\\rBrace");B("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");B("⦵","\\minuso");B("\\darr","\\downarrow");B("\\dArr","\\Downarrow");B("\\Darr","\\Downarrow");B("\\lang","\\langle");B("\\rang","\\rangle");B("\\uarr","\\uparrow");B("\\uArr","\\Uparrow");B("\\Uarr","\\Uparrow");B("\\N","\\mathbb{N}");B("\\R","\\mathbb{R}");B("\\Z","\\mathbb{Z}");B("\\alef","\\aleph");B("\\alefsym","\\aleph");B("\\Alpha","\\mathrm{A}");B("\\Beta","\\mathrm{B}");B("\\bull","\\bullet");B("\\Chi","\\mathrm{X}");B("\\clubs","\\clubsuit");B("\\cnums","\\mathbb{C}");B("\\Complex","\\mathbb{C}");B("\\Dagger","\\ddagger");B("\\diamonds","\\diamondsuit");B("\\empty","\\emptyset");B("\\Epsilon","\\mathrm{E}");B("\\Eta","\\mathrm{H}");B("\\exist","\\exists");B("\\harr","\\leftrightarrow");B("\\hArr","\\Leftrightarrow");B("\\Harr","\\Leftrightarrow");B("\\hearts","\\heartsuit");B("\\image","\\Im");B("\\infin","\\infty");B("\\Iota","\\mathrm{I}");B("\\isin","\\in");B("\\Kappa","\\mathrm{K}");B("\\larr","\\leftarrow");B("\\lArr","\\Leftarrow");B("\\Larr","\\Leftarrow");B("\\lrarr","\\leftrightarrow");B("\\lrArr","\\Leftrightarrow");B("\\Lrarr","\\Leftrightarrow");B("\\Mu","\\mathrm{M}");B("\\natnums","\\mathbb{N}");B("\\Nu","\\mathrm{N}");B("\\Omicron","\\mathrm{O}");B("\\plusmn","\\pm");B("\\rarr","\\rightarrow");B("\\rArr","\\Rightarrow");B("\\Rarr","\\Rightarrow");B("\\real","\\Re");B("\\reals","\\mathbb{R}");B("\\Reals","\\mathbb{R}");B("\\Rho","\\mathrm{P}");B("\\sdot","\\cdot");B("\\sect","\\S");B("\\spades","\\spadesuit");B("\\sub","\\subset");B("\\sube","\\subseteq");B("\\supe","\\supseteq");B("\\Tau","\\mathrm{T}");B("\\thetasym","\\vartheta");B("\\weierp","\\wp");B("\\Zeta","\\mathrm{Z}");B("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");B("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");B("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");B("\\bra","\\mathinner{\\langle{#1}|}");B("\\ket","\\mathinner{|{#1}\\rangle}");B("\\braket","\\mathinner{\\langle{#1}\\rangle}");B("\\Bra","\\left\\langle#1\\right|");B("\\Ket","\\left|#1\\right\\rangle");var G5=e=>t=>{var n=t.consumeArg().tokens,a=t.consumeArg().tokens,s=t.consumeArg().tokens,o=t.consumeArg().tokens,c=t.macros.get("|"),d=t.macros.get("\\|");t.macros.beginGroup();var m=b=>x=>{e&&(x.macros.set("|",c),s.length&&x.macros.set("\\|",d));var y=b;if(!b&&s.length){var E=x.future();E.text==="|"&&(x.popToken(),y=!0)}return{tokens:y?s:a,numArgs:0}};t.macros.set("|",m(!1)),s.length&&t.macros.set("\\|",m(!0));var h=t.consumeArg().tokens,p=t.expandTokens([...o,...h,...n]);return t.macros.endGroup(),{tokens:p.reverse(),numArgs:0}};B("\\bra@ket",G5(!1));B("\\bra@set",G5(!0));B("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");B("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");B("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");B("\\angln","{\\angl n}");B("\\blue","\\textcolor{##6495ed}{#1}");B("\\orange","\\textcolor{##ffa500}{#1}");B("\\pink","\\textcolor{##ff00af}{#1}");B("\\red","\\textcolor{##df0030}{#1}");B("\\green","\\textcolor{##28ae7b}{#1}");B("\\gray","\\textcolor{gray}{#1}");B("\\purple","\\textcolor{##9d38bd}{#1}");B("\\blueA","\\textcolor{##ccfaff}{#1}");B("\\blueB","\\textcolor{##80f6ff}{#1}");B("\\blueC","\\textcolor{##63d9ea}{#1}");B("\\blueD","\\textcolor{##11accd}{#1}");B("\\blueE","\\textcolor{##0c7f99}{#1}");B("\\tealA","\\textcolor{##94fff5}{#1}");B("\\tealB","\\textcolor{##26edd5}{#1}");B("\\tealC","\\textcolor{##01d1c1}{#1}");B("\\tealD","\\textcolor{##01a995}{#1}");B("\\tealE","\\textcolor{##208170}{#1}");B("\\greenA","\\textcolor{##b6ffb0}{#1}");B("\\greenB","\\textcolor{##8af281}{#1}");B("\\greenC","\\textcolor{##74cf70}{#1}");B("\\greenD","\\textcolor{##1fab54}{#1}");B("\\greenE","\\textcolor{##0d923f}{#1}");B("\\goldA","\\textcolor{##ffd0a9}{#1}");B("\\goldB","\\textcolor{##ffbb71}{#1}");B("\\goldC","\\textcolor{##ff9c39}{#1}");B("\\goldD","\\textcolor{##e07d10}{#1}");B("\\goldE","\\textcolor{##a75a05}{#1}");B("\\redA","\\textcolor{##fca9a9}{#1}");B("\\redB","\\textcolor{##ff8482}{#1}");B("\\redC","\\textcolor{##f9685d}{#1}");B("\\redD","\\textcolor{##e84d39}{#1}");B("\\redE","\\textcolor{##bc2612}{#1}");B("\\maroonA","\\textcolor{##ffbde0}{#1}");B("\\maroonB","\\textcolor{##ff92c6}{#1}");B("\\maroonC","\\textcolor{##ed5fa6}{#1}");B("\\maroonD","\\textcolor{##ca337c}{#1}");B("\\maroonE","\\textcolor{##9e034e}{#1}");B("\\purpleA","\\textcolor{##ddd7ff}{#1}");B("\\purpleB","\\textcolor{##c6b9fc}{#1}");B("\\purpleC","\\textcolor{##aa87ff}{#1}");B("\\purpleD","\\textcolor{##7854ab}{#1}");B("\\purpleE","\\textcolor{##543b78}{#1}");B("\\mintA","\\textcolor{##f5f9e8}{#1}");B("\\mintB","\\textcolor{##edf2df}{#1}");B("\\mintC","\\textcolor{##e0e5cc}{#1}");B("\\grayA","\\textcolor{##f6f7f7}{#1}");B("\\grayB","\\textcolor{##f0f1f2}{#1}");B("\\grayC","\\textcolor{##e3e5e6}{#1}");B("\\grayD","\\textcolor{##d6d8da}{#1}");B("\\grayE","\\textcolor{##babec2}{#1}");B("\\grayF","\\textcolor{##888d93}{#1}");B("\\grayG","\\textcolor{##626569}{#1}");B("\\grayH","\\textcolor{##3b3e40}{#1}");B("\\grayI","\\textcolor{##21242c}{#1}");B("\\kaBlue","\\textcolor{##314453}{#1}");B("\\kaGreen","\\textcolor{##71B307}{#1}");var K5={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class KR{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 PR($R,n.macros),this.mode=a,this.stack=[]}feed(t){this.lexer=new W4(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(),o,c=0,d=0;do{if(o=this.popToken(),n.push(o),o.text==="{")++c;else if(o.text==="}"){if(--c,c===-1)throw new Ae("Extra }",o)}else if(o.text==="EOF")throw new Ae("Unexpected end of input in a macro argument, expected '"+(t&&a?t[d]:"}")+"'",o);if(t&&a)if((c===0||c===1&&t[d]==="{")&&o.text===t[d]){if(++d,d===t.length){n.splice(-d,d);break}}else d=0}while(c!==0||a);return s.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:s,end:o}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new Ae("The length of delimiters doesn't match the number of args!");for(var a=n[0],s=0;s<a.length;s++){var o=this.popToken();if(a[s]!==o.text)throw new Ae("Use of the macro doesn't match its definition",o)}}for(var c=[],d=0;d<t;d++)c.push(this.consumeArg(n&&n[d+1]).tokens);return c}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new Ae("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 Ae("Undefined control sequence: "+a);return this.pushToken(n),!1}this.countExpansion(1);var o=s.tokens,c=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){o=o.slice();for(var d=o.length-1;d>=0;--d){var m=o[d];if(m.text==="#"){if(d===0)throw new Ae("Incomplete placeholder at end of macro body",m);if(m=o[--d],m.text==="#")o.splice(d+1,1);else if(/^[1-9]$/.test(m.text))o.splice(d,2,...c[+m.text-1]);else throw new Ae("Not a valid argument number",m)}}}return this.pushTokens(o),o.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 o=0;if(s.includes("#"))for(var c=s.replace(/##/g,"");c.includes("#"+(o+1));)++o;for(var d=new W4(s,this.settings),m=[],h=d.lex();h.text!=="EOF";)m.push(h),h=d.lex();m.reverse();var p={tokens:m,numArgs:o};return p}return s}isDefined(t){return this.macros.has(t)||Ei.hasOwnProperty(t)||fn.math.hasOwnProperty(t)||fn.text.hasOwnProperty(t)||K5.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 ey=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ou=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Zf={"́":{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"}},ty={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class a0{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 KR(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 Ae("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(a0.endOfExpression.has(s.text)||n&&s.text===n||t&&Ei[s.text]&&Ei[s.text].infix)break;var o=this.parseAtom(n);if(o){if(o.type==="internal")continue}else break;a.push(o)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(t){for(var n=-1,a,s=0;s<t.length;s++){var o=t[s];if(o.type==="infix"){if(n!==-1)throw new Ae("only one infix operator per group",o.token);n=s,a=o.replaceWith}}if(n!==-1&&a){var c,d,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"?d=h[0]:d={type:"ordgroup",mode:this.mode,body:h};var p;return a==="\\\\abovefrac"?p=this.callFunction(a,[c,t[n],d],[]):p=this.callFunction(a,[c,d],[]),[p]}else return t}handleSupSubscript(t){var n=this.fetch(),a=n.text;this.consume(),this.consumeSpaces();var s;do{var o;s=this.parseGroup(t)}while(((o=s)==null?void 0:o.type)==="internal");if(!s)throw new Ae("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},o={type:"color",mode:this.mode,color:this.settings.errorColor,body:[s]};return o}parseAtom(t){var n=this.parseGroup("atom",t);if(n?.type==="internal"||this.mode==="text")return n;for(var a,s;;){this.consumeSpaces();var o=this.fetch();if(o.text==="\\limits"||o.text==="\\nolimits"){if(n&&n.type==="op"){var c=o.text==="\\limits";n.limits=c,n.alwaysHandleSupSub=!0}else if(n&&n.type==="operatorname")n.alwaysHandleSupSub&&(n.limits=o.text==="\\limits");else throw new Ae("Limit controls must follow a math operator",o);this.consume()}else if(o.text==="^"){if(a)throw new Ae("Double superscript",o);a=this.handleSupSubscript("superscript")}else if(o.text==="_"){if(s)throw new Ae("Double subscript",o);s=this.handleSupSubscript("subscript")}else if(o.text==="'"){if(a)throw new Ae("Double superscript",o);var d={type:"textord",mode:this.mode,text:"\\prime"},m=[d];for(this.consume();this.fetch().text==="'";)m.push(d),this.consume();this.fetch().text==="^"&&m.push(this.handleSupSubscript("superscript")),a={type:"ordgroup",mode:this.mode,body:m}}else if(ou[o.text]){var h=ey.test(o.text),p=[];for(p.push(new jr(ou[o.text])),this.consume();;){var b=this.fetch().text;if(!ou[b]||ey.test(b)!==h)break;p.unshift(new jr(ou[b])),this.consume()}var x=this.subparse(p);h?s={type:"ordgroup",mode:"math",body:x}:a={type:"ordgroup",mode:"math",body:x}}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,o=Ei[s];if(!o)return null;if(this.consume(),n&&n!=="atom"&&!o.allowedInArgument)throw new Ae("Got function '"+s+"' with no arguments"+(n?" as "+n:""),a);if(this.mode==="text"&&!o.allowedInText)throw new Ae("Can't use function '"+s+"' in text mode",a);if(this.mode==="math"&&o.allowedInMath===!1)throw new Ae("Can't use function '"+s+"' in math mode",a);var{args:c,optArgs:d}=this.parseArguments(s,o);return this.callFunction(s,c,d,a,t)}callFunction(t,n,a,s,o){var c={funcName:t,parser:this,token:s,breakOnTokenText:o},d=Ei[t];if(d&&d.handler)return d.handler(c,n,a);throw new Ae("No function handler for "+t)}parseArguments(t,n){var a=n.numArgs+n.numOptionalArgs;if(a===0)return{args:[],optArgs:[]};for(var s=[],o=[],c=0;c<a;c++){var d=n.argTypes&&n.argTypes[c],m=c<n.numOptionalArgs;("primitive"in n&&n.primitive&&d==null||n.type==="sqrt"&&c===1&&o[0]==null)&&(d="primitive");var h=this.parseGroupOfType("argument to '"+t+"'",d,m);if(m)o.push(h);else if(h!=null)s.push(h);else throw new Ae("Null argument, please report this as a bug")}return{args:s,optArgs:o}}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 o=this.parseStringGroup("raw",a);return o!=null?{type:"raw",mode:"text",string:o.text}:null}case"primitive":{if(a)throw new Ae("A primitive argument cannot be optional");var c=this.parseGroup(t);if(c==null)throw new Ae("Expected group as "+t,this.fetch());return c}case"original":case null:case void 0:return this.parseArgumentGroup(a);default:throw new Ae("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="",o;(o=this.fetch()).text!=="EOF";)s+=o.text,this.consume();return this.consume(),a.text=s,a}parseRegexGroup(t,n){for(var a=this.fetch(),s=a,o="",c;(c=this.fetch()).text!=="EOF"&&t.test(o+c.text);)s=c,o+=s.text,this.consume();if(o==="")throw new Ae("Invalid "+n+": '"+a.text+"'",a);return a.range(s,o)}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 Ae("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 Ae("Invalid size: '"+n.text+"'",n);var o={number:+(s[1]+s[2]),unit:s[3]};if(!J3(o))throw new Ae("Invalid unit: '"+o.unit+"'",n);return{type:"size",mode:this.mode,value:o,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 o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var c={type:"ordgroup",mode:this.mode,loc:a.loc,body:o};return n&&this.switchMode(s),c}parseGroup(t,n){var a=this.fetch(),s=a.text,o;if(s==="{"||s==="\\begingroup"){this.consume();var c=s==="{"?"}":"\\endgroup";this.gullet.beginGroup();var d=this.parseExpression(!1,c),m=this.fetch();this.expect(c),this.gullet.endGroup(),o={type:"ordgroup",mode:this.mode,loc:wr.range(a,m),body:d,semisimple:s==="\\begingroup"||void 0}}else if(o=this.parseFunction(n,t)||this.parseSymbol(),o==null&&s[0]==="\\"&&!K5.hasOwnProperty(s)){if(this.settings.throwOnError)throw new Ae("Undefined control sequence: "+s,a);o=this.formatUnsupportedCmd(s),this.consume()}return o}formLigatures(t){for(var n=t.length-1,a=0;a<n;++a){var s=t[a];if(s.type==="textord"){var o=s.text,c=t[a+1];if(!(!c||c.type!=="textord")){if(o==="-"&&c.text==="-"){var d=t[a+2];a+1<n&&d&&d.type==="textord"&&d.text==="-"?(t.splice(a,3,{type:"textord",mode:"text",loc:wr.range(s,d),text:"---"}),n-=2):(t.splice(a,2,{type:"textord",mode:"text",loc:wr.range(s,c),text:"--"}),n-=1)}(o==="'"||o==="`")&&c.text===o&&(t.splice(a,2,{type:"textord",mode:"text",loc:wr.range(s,c),text:o+o}),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 Ae(`\\verb assertion failed --
|
|
299
|
+
please report what input caused this bug`);return a=a.slice(1,-1),{type:"verb",mode:"text",body:a,star:s}}ty.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=ty[n[0]]+n.slice(1));var o=HR.exec(n);o&&(n=n.substring(0,o.index),n==="i"?n="ı":n==="j"&&(n="ȷ"));var c;if(fn[this.mode][n]){this.settings.strict&&this.mode==="math"&&sh.includes(n)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',t);var d=fn[this.mode][n].group,m=wr.range(t),h;oR(d)?h={type:"atom",mode:this.mode,family:d,loc:m,text:n}:h={type:d,mode:this.mode,loc:m,text:n},c=h}else if(n.charCodeAt(0)>=128)this.settings.strict&&(Q3(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(),o)for(var p=0;p<o[0].length;p++){var b=o[0][p];if(!Zf[b])throw new Ae("Unknown accent ' "+b+"'",t);var x=Zf[b][this.mode]||Zf[b].text;if(!x)throw new Ae("Accent "+b+" unsupported in "+this.mode+" mode",t);c={type:"accent",mode:this.mode,loc:wr.range(t),label:x,isStretchy:!1,isShifty:!0,base:c}}return c}}a0.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var mp=function(t,n){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var a=new a0(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 Ae("\\tag works only in display equations");s=[{type:"tag",mode:"text",body:s,tag:a.subparse([new jr("\\df@tag")])}]}return s},hp=function(t,n,a){n.textContent="";var s=i0(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."),hp=function(){throw new Ae("KaTeX doesn't work in quirks mode.")});var V5=function(t,n){var a=i0(t,n).toMarkup();return a},Y5=function(t,n){var a=new Jh(n);return mp(t,a)},X5=function(t,n,a){if(a.throwOnError||!(t instanceof Ae))throw t;var s=Ce(["katex-error"],[new Lr(n)]);return s.setAttribute("title",t.toString()),s.setAttribute("style","color:"+a.errorColor),s},i0=function(t,n){var a=new Jh(n);try{var s=mp(t,a);return eR(s,t,a)}catch(o){return X5(o,t,a)}},Z5=function(t,n){var a=new Jh(n);try{var s=mp(t,a);return tR(s,t,a)}catch(o){return X5(o,t,a)}},W5="0.16.47",Q5={Span:cl,Anchor:Ku,SymbolNode:Lr,SvgNode:Ha,PathNode:Ci,LineNode:ih},wh={version:W5,render:hp,renderToString:V5,ParseError:Ae,SETTINGS_SCHEMA:ku,__parse:Y5,__renderToDomTree:i0,__renderToHTMLTree:Z5,__setFontMetrics:r5,__defineSymbol:w,__defineFunction:Be,__defineMacro:B,__domTree:Q5};const kD=Object.freeze(Object.defineProperty({__proto__:null,ParseError:Ae,SETTINGS_SCHEMA:ku,__defineFunction:Be,__defineMacro:B,__defineSymbol:w,__domTree:Q5,__parse:Y5,__renderToDomTree:i0,__renderToHTMLTree:Z5,__setFontMetrics:r5,default:wh,get render(){return hp},renderToString:V5,version:W5},Symbol.toStringTag,{value:"Module"})),VR={};function YR(e){const t=this,n=e||VR,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(tC(n)),o.push(VN()),c.push(YN(n))}const ny=/[#.]/g;function XR(e,t){const n=e||"",a={};let s=0,o,c;for(;s<n.length;){ny.lastIndex=s;const d=ny.exec(n),m=n.slice(s,d?d.index:n.length);m&&(o?o==="#"?a.id=m:Array.isArray(a.className)?a.className.push(m):a.className=[m]:c=m,s+=m.length),d&&(o=d[0],s++)}return{type:"element",tagName:c||t||"div",properties:a,children:[]}}function J5(e,t,n){const a=n?JR(n):void 0;function s(o,c,...d){let m;if(o==null){m={type:"root",children:[]};const h=c;d.unshift(h)}else{m=XR(o,t);const h=m.tagName.toLowerCase(),p=a?a.get(h):void 0;if(m.tagName=p||h,ZR(c))d.unshift(c);else for(const[b,x]of Object.entries(c))WR(e,m.properties,b,x)}for(const h of d)Sh(m.children,h);return m.type==="element"&&m.tagName==="template"&&(m.content={type:"root",children:m.children},m.children=[]),m}return s}function ZR(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 o=s;for(const c of o)if(typeof c!="number"&&typeof c!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function WR(e,t,n,a){const s=W2(e,n);let o;if(a!=null){if(typeof a=="number"){if(Number.isNaN(a))return;o=a}else typeof a=="boolean"?o=a:typeof a=="string"?s.spaceSeparated?o=Iv(a):s.commaSeparated?o=Nv(a):s.commaOrSpaceSeparated?o=Iv(Nv(a).join(" ")):o=ry(s,s.property,a):Array.isArray(a)?o=[...a]:o=s.property==="style"?QR(a):String(a);if(Array.isArray(o)){const c=[];for(const d of o)c.push(ry(s,s.property,d));o=c}s.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[s.property]=o}}function Sh(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)Sh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Sh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ry(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||wo(n)===wo(t)))return!0}return n}function QR(e){const t=[];for(const[n,a]of Object.entries(e))t.push([n,a].join(": "));return t.join("; ")}function JR(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const eA=["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"],tA=J5(Q2,"div"),nA=J5(Hu,"g",eA),Wf={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function rA(e,t){return e6(e,{})||{type:"root",children:[]}}function e6(e,t){const n=aA(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function aA(e,t){switch(e.nodeType){case 1:return oA(e,t);case 3:return sA(e);case 8:return lA(e);case 9:return ay(e,t);case 10:return iA();case 11:return ay(e,t);default:return}}function ay(e,t){return{type:"root",children:t6(e,t)}}function iA(){return{type:"doctype"}}function sA(e){return{type:"text",value:e.nodeValue||""}}function lA(e){return{type:"comment",value:e.nodeValue||""}}function oA(e,t){const n=e.namespaceURI,a=n===Wf.svg?nA:tA,s=n===Wf.html?e.tagName.toLowerCase():e.tagName,o=n===Wf.html&&s==="template"?e.content:e,c=e.getAttributeNames(),d={};let m=-1;for(;++m<c.length;)d[c[m]]=e.getAttribute(c[m])||"";return a(s,d,t6(o,t))}function t6(e,t){const n=e.childNodes,a=[];let s=-1;for(;++s<n.length;){const o=e6(n[s],t);o!==void 0&&a.push(o)}return a}new DOMParser;function cA(e,t){const n=uA(e);return rA(n)}function uA(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const iy=(function(e,t,n){const a=_o(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 mA;if(typeof e=="string")return fA(e);if(typeof e=="object")return dA(e);if(typeof e=="function")return pp(e);throw new Error("Expected function, string, or array as `test`")});function dA(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ds(e[n]);return pp(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function fA(e){return pp(t);function t(n){return n.tagName===e}}function pp(e){return t;function t(n,a,s){return!!(hA(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function mA(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function hA(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const sy=/\n/g,ly=/[\t ]+/g,kh=ds("br"),oy=ds(SA),pA=ds("p"),cy=ds("tr"),gA=ds(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",wA,kA]),n6=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 bA(e,t){const n=t||{},a="children"in e?e.children:[],s=n6(e),o=i6(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...a6(e,{breakBefore:!0,breakAfter:!0}));let d=-1;for(;++d<a.length;)c.push(...r6(a[d],e,{whitespace:o,breakBefore:d?void 0:s,breakAfter:d<a.length-1?kh(a[d+1]):s}));const m=[];let h;for(d=-1;++d<c.length;){const p=c[d];typeof p=="number"?h!==void 0&&p>h&&(h=p):p&&(h!==void 0&&h>-1&&m.push(`
|
|
300
|
+
`.repeat(h)||" "),h=-1,m.push(p))}return m.join("")}function r6(e,t,n){return e.type==="element"?vA(e,t,n):e.type==="text"?n.whitespace==="normal"?a6(e,n):yA(e):[]}function vA(e,t,n){const a=i6(e,n),s=e.children||[];let o=-1,c=[];if(gA(e))return c;let d,m;for(kh(e)||cy(e)&&iy(t,e,cy)?m=`
|
|
301
|
+
`:pA(e)?(d=2,m=2):n6(e)&&(d=1,m=1);++o<s.length;)c=c.concat(r6(s[o],e,{whitespace:a,breakBefore:o?void 0:d,breakAfter:o<s.length-1?kh(s[o+1]):m}));return oy(e)&&iy(t,e,oy)&&c.push(" "),d&&c.unshift(d),m&&c.push(m),c}function a6(e,t){const n=String(e.value),a=[],s=[];let o=0;for(;o<=n.length;){sy.lastIndex=o;const m=sy.exec(n),h=m&&"index"in m?m.index:n.length;a.push(xA(n.slice(o,h).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,h===n.length?t.breakAfter:!0)),o=h+1}let c=-1,d;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]),d=void 0):a[c]?(typeof d=="number"&&s.push(d),s.push(a[c]),d=0):(c===0||c===a.length-1)&&s.push(0);return s}function yA(e){return[String(e.value)]}function xA(e,t,n){const a=[];let s=0,o;for(;s<e.length;){ly.lastIndex=s;const c=ly.exec(e);o=c?c.index:e.length,!s&&!o&&c&&!t&&a.push(""),s!==o&&a.push(e.slice(s,o)),s=c?o+c[0].length:o}return s!==o&&!n&&a.push(""),a.join(" ")}function i6(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 wA(e){return!!(e.properties||{}).hidden}function SA(e){return e.tagName==="td"||e.tagName==="th"}function kA(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const EA={},TA=[];function NA(e){const t=e||EA;return function(n,a){Vh(n,"element",function(s,o){const c=Array.isArray(s.properties.className)?s.properties.className:TA,d=c.includes("language-math"),m=c.includes("math-display"),h=c.includes("math-inline");let p=m;if(!d&&!m&&!h)return;let b=o[o.length-1],x=s;if(s.tagName==="code"&&d&&b&&b.type==="element"&&b.tagName==="pre"&&(x=b,b=o[o.length-2],p=!0),!b)return;const y=bA(x,{whitespace:"pre"});let E;try{E=wh.renderToString(y,{...t,displayMode:p,throwOnError:!0})}catch(R){const C=R,I=C.name.toLowerCase();a.message("Could not render math with KaTeX",{ancestors:[...o,s],cause:C,place:s.position,ruleId:I,source:"rehype-katex"});try{E=wh.renderToString(y,{...t,displayMode:p,strict:"ignore",throwOnError:!1})}catch{E=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(R)},children:[{type:"text",value:y}]}]}}typeof E=="string"&&(E=cA(E).children);const N=b.children.indexOf(x);return b.children.splice(N,1,...E),N3})}}var Qf,uy;function CA(){if(uy)return Qf;uy=1;function e(Z){return Z instanceof Map?Z.clear=Z.delete=Z.set=function(){throw new Error("map is read-only")}:Z instanceof Set&&(Z.add=Z.clear=Z.delete=function(){throw new Error("set is read-only")}),Object.freeze(Z),Object.getOwnPropertyNames(Z).forEach(xe=>{const je=Z[xe],et=typeof je;(et==="object"||et==="function")&&!Object.isFrozen(je)&&e(je)}),Z}class t{constructor(xe){xe.data===void 0&&(xe.data={}),this.data=xe.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(Z){return Z.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(Z,...xe){const je=Object.create(null);for(const et in Z)je[et]=Z[et];return xe.forEach(function(et){for(const gt in et)je[gt]=et[gt]}),je}const s="</span>",o=Z=>!!Z.scope,c=(Z,{prefix:xe})=>{if(Z.startsWith("language:"))return Z.replace("language:","language-");if(Z.includes(".")){const je=Z.split(".");return[`${xe}${je.shift()}`,...je.map((et,gt)=>`${et}${"_".repeat(gt+1)}`)].join(" ")}return`${xe}${Z}`};class d{constructor(xe,je){this.buffer="",this.classPrefix=je.classPrefix,xe.walk(this)}addText(xe){this.buffer+=n(xe)}openNode(xe){if(!o(xe))return;const je=c(xe.scope,{prefix:this.classPrefix});this.span(je)}closeNode(xe){o(xe)&&(this.buffer+=s)}value(){return this.buffer}span(xe){this.buffer+=`<span class="${xe}">`}}const m=(Z={})=>{const xe={children:[]};return Object.assign(xe,Z),xe};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(xe){this.top.children.push(xe)}openNode(xe){const je=m({scope:xe});this.add(je),this.stack.push(je)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(xe){return this.constructor._walk(xe,this.rootNode)}static _walk(xe,je){return typeof je=="string"?xe.addText(je):je.children&&(xe.openNode(je),je.children.forEach(et=>this._walk(xe,et)),xe.closeNode(je)),xe}static _collapse(xe){typeof xe!="string"&&xe.children&&(xe.children.every(je=>typeof je=="string")?xe.children=[xe.children.join("")]:xe.children.forEach(je=>{h._collapse(je)}))}}class p extends h{constructor(xe){super(),this.options=xe}addText(xe){xe!==""&&this.add(xe)}startScope(xe){this.openNode(xe)}endScope(){this.closeNode()}__addSublanguage(xe,je){const et=xe.root;je&&(et.scope=`language:${je}`),this.add(et)}toHTML(){return new d(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function b(Z){return Z?typeof Z=="string"?Z:Z.source:null}function x(Z){return N("(?=",Z,")")}function y(Z){return N("(?:",Z,")*")}function E(Z){return N("(?:",Z,")?")}function N(...Z){return Z.map(je=>b(je)).join("")}function R(Z){const xe=Z[Z.length-1];return typeof xe=="object"&&xe.constructor===Object?(Z.splice(Z.length-1,1),xe):{}}function C(...Z){return"("+(R(Z).capture?"":"?:")+Z.map(et=>b(et)).join("|")+")"}function I(Z){return new RegExp(Z.toString()+"|").exec("").length-1}function O(Z,xe){const je=Z&&Z.exec(xe);return je&&je.index===0}const X=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function q(Z,{joinWith:xe}){let je=0;return Z.map(et=>{je+=1;const gt=je;let ue=b(et),Ee="";for(;ue.length>0;){const Oe=X.exec(ue);if(!Oe){Ee+=ue;break}Ee+=ue.substring(0,Oe.index),ue=ue.substring(Oe.index+Oe[0].length),Oe[0][0]==="\\"&&Oe[1]?Ee+="\\"+String(Number(Oe[1])+gt):(Ee+=Oe[0],Oe[0]==="("&&je++)}return Ee}).map(et=>`(${et})`).join(xe)}const A=/\b\B/,F="[a-zA-Z]\\w*",J="[a-zA-Z_]\\w*",W="\\b\\d+(\\.\\d+)?",z="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",U="\\b(0b[01]+)",H="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",te=(Z={})=>{const xe=/^#![ ]*\//;return Z.binary&&(Z.begin=N(xe,/.*\b/,Z.binary,/\b.*/)),a({scope:"meta",begin:xe,end:/$/,relevance:0,"on:begin":(je,et)=>{je.index!==0&&et.ignoreMatch()}},Z)},G={begin:"\\\\[\\s\\S]",relevance:0},K={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[G]},$={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[G]},ee={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/},oe=function(Z,xe,je={}){const et=a({scope:"comment",begin:Z,end:xe,contains:[]},je);et.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 gt=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 et.contains.push({begin:N(/[ ]+/,"(",gt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),et},ce=oe("//","$"),j=oe("/\\*","\\*/"),D=oe("#","$"),P={scope:"number",begin:W,relevance:0},_={scope:"number",begin:z,relevance:0},ne={scope:"number",begin:U,relevance:0},de={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[G,{begin:/\[/,end:/\]/,relevance:0,contains:[G]}]},se={scope:"title",begin:F,relevance:0},ae={scope:"title",begin:J,relevance:0},we={begin:"\\.\\s*"+J,relevance:0};var ze=Object.freeze({__proto__:null,APOS_STRING_MODE:K,BACKSLASH_ESCAPE:G,BINARY_NUMBER_MODE:ne,BINARY_NUMBER_RE:U,COMMENT:oe,C_BLOCK_COMMENT_MODE:j,C_LINE_COMMENT_MODE:ce,C_NUMBER_MODE:_,C_NUMBER_RE:z,END_SAME_AS_BEGIN:function(Z){return Object.assign(Z,{"on:begin":(xe,je)=>{je.data._beginMatch=xe[1]},"on:end":(xe,je)=>{je.data._beginMatch!==xe[1]&&je.ignoreMatch()}})},HASH_COMMENT_MODE:D,IDENT_RE:F,MATCH_NOTHING_RE:A,METHOD_GUARD:we,NUMBER_MODE:P,NUMBER_RE:W,PHRASAL_WORDS_MODE:ee,QUOTE_STRING_MODE:$,REGEXP_MODE:de,RE_STARTERS_RE:H,SHEBANG:te,TITLE_MODE:se,UNDERSCORE_IDENT_RE:J,UNDERSCORE_TITLE_MODE:ae});function Me(Z,xe){Z.input[Z.index-1]==="."&&xe.ignoreMatch()}function Se(Z,xe){Z.className!==void 0&&(Z.scope=Z.className,delete Z.className)}function $e(Z,xe){xe&&Z.beginKeywords&&(Z.begin="\\b("+Z.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Z.__beforeBegin=Me,Z.keywords=Z.keywords||Z.beginKeywords,delete Z.beginKeywords,Z.relevance===void 0&&(Z.relevance=0))}function ct(Z,xe){Array.isArray(Z.illegal)&&(Z.illegal=C(...Z.illegal))}function mt(Z,xe){if(Z.match){if(Z.begin||Z.end)throw new Error("begin & end are not supported with match");Z.begin=Z.match,delete Z.match}}function Ze(Z,xe){Z.relevance===void 0&&(Z.relevance=1)}const lt=(Z,xe)=>{if(!Z.beforeMatch)return;if(Z.starts)throw new Error("beforeMatch cannot be used with starts");const je=Object.assign({},Z);Object.keys(Z).forEach(et=>{delete Z[et]}),Z.keywords=je.keywords,Z.begin=N(je.beforeMatch,x(je.begin)),Z.starts={relevance:0,contains:[Object.assign(je,{endsParent:!0})]},Z.relevance=0,delete je.beforeMatch},Tt=["of","and","for","in","not","or","if","then","parent","list","value"],St="keyword";function wt(Z,xe,je=St){const et=Object.create(null);return typeof Z=="string"?gt(je,Z.split(" ")):Array.isArray(Z)?gt(je,Z):Object.keys(Z).forEach(function(ue){Object.assign(et,wt(Z[ue],xe,ue))}),et;function gt(ue,Ee){xe&&(Ee=Ee.map(Oe=>Oe.toLowerCase())),Ee.forEach(function(Oe){const Ue=Oe.split("|");et[Ue[0]]=[ue,Je(Ue[0],Ue[1])]})}}function Je(Z,xe){return xe?Number(xe):Nt(Z)?0:1}function Nt(Z){return Tt.includes(Z.toLowerCase())}const qt={},Fe=Z=>{console.error(Z)},Xt=(Z,...xe)=>{console.log(`WARN: ${Z}`,...xe)},he=(Z,xe)=>{qt[`${Z}/${xe}`]||(console.log(`Deprecated as of ${Z}. ${xe}`),qt[`${Z}/${xe}`]=!0)},ve=new Error;function qe(Z,xe,{key:je}){let et=0;const gt=Z[je],ue={},Ee={};for(let Oe=1;Oe<=xe.length;Oe++)Ee[Oe+et]=gt[Oe],ue[Oe+et]=!0,et+=I(xe[Oe-1]);Z[je]=Ee,Z[je]._emit=ue,Z[je]._multi=!0}function We(Z){if(Array.isArray(Z.begin)){if(Z.skip||Z.excludeBegin||Z.returnBegin)throw Fe("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ve;if(typeof Z.beginScope!="object"||Z.beginScope===null)throw Fe("beginScope must be object"),ve;qe(Z,Z.begin,{key:"beginScope"}),Z.begin=q(Z.begin,{joinWith:""})}}function nt(Z){if(Array.isArray(Z.end)){if(Z.skip||Z.excludeEnd||Z.returnEnd)throw Fe("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ve;if(typeof Z.endScope!="object"||Z.endScope===null)throw Fe("endScope must be object"),ve;qe(Z,Z.end,{key:"endScope"}),Z.end=q(Z.end,{joinWith:""})}}function $t(Z){Z.scope&&typeof Z.scope=="object"&&Z.scope!==null&&(Z.beginScope=Z.scope,delete Z.scope)}function Zt(Z){$t(Z),typeof Z.beginScope=="string"&&(Z.beginScope={_wrap:Z.beginScope}),typeof Z.endScope=="string"&&(Z.endScope={_wrap:Z.endScope}),We(Z),nt(Z)}function Pt(Z){function xe(Ee,Oe){return new RegExp(b(Ee),"m"+(Z.case_insensitive?"i":"")+(Z.unicodeRegex?"u":"")+(Oe?"g":""))}class je{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Oe,Ue){Ue.position=this.position++,this.matchIndexes[this.matchAt]=Ue,this.regexes.push([Ue,Oe]),this.matchAt+=I(Oe)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Oe=this.regexes.map(Ue=>Ue[1]);this.matcherRe=xe(q(Oe,{joinWith:"|"}),!0),this.lastIndex=0}exec(Oe){this.matcherRe.lastIndex=this.lastIndex;const Ue=this.matcherRe.exec(Oe);if(!Ue)return null;const jt=Ue.findIndex((bn,Zn)=>Zn>0&&bn!==void 0),_t=this.matchIndexes[jt];return Ue.splice(0,jt),Object.assign(Ue,_t)}}class et{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Oe){if(this.multiRegexes[Oe])return this.multiRegexes[Oe];const Ue=new je;return this.rules.slice(Oe).forEach(([jt,_t])=>Ue.addRule(jt,_t)),Ue.compile(),this.multiRegexes[Oe]=Ue,Ue}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Oe,Ue){this.rules.push([Oe,Ue]),Ue.type==="begin"&&this.count++}exec(Oe){const Ue=this.getMatcher(this.regexIndex);Ue.lastIndex=this.lastIndex;let jt=Ue.exec(Oe);if(this.resumingScanAtSamePosition()&&!(jt&&jt.index===this.lastIndex)){const _t=this.getMatcher(0);_t.lastIndex=this.lastIndex+1,jt=_t.exec(Oe)}return jt&&(this.regexIndex+=jt.position+1,this.regexIndex===this.count&&this.considerAll()),jt}}function gt(Ee){const Oe=new et;return Ee.contains.forEach(Ue=>Oe.addRule(Ue.begin,{rule:Ue,type:"begin"})),Ee.terminatorEnd&&Oe.addRule(Ee.terminatorEnd,{type:"end"}),Ee.illegal&&Oe.addRule(Ee.illegal,{type:"illegal"}),Oe}function ue(Ee,Oe){const Ue=Ee;if(Ee.isCompiled)return Ue;[Se,mt,Zt,lt].forEach(_t=>_t(Ee,Oe)),Z.compilerExtensions.forEach(_t=>_t(Ee,Oe)),Ee.__beforeBegin=null,[$e,ct,Ze].forEach(_t=>_t(Ee,Oe)),Ee.isCompiled=!0;let jt=null;return typeof Ee.keywords=="object"&&Ee.keywords.$pattern&&(Ee.keywords=Object.assign({},Ee.keywords),jt=Ee.keywords.$pattern,delete Ee.keywords.$pattern),jt=jt||/\w+/,Ee.keywords&&(Ee.keywords=wt(Ee.keywords,Z.case_insensitive)),Ue.keywordPatternRe=xe(jt,!0),Oe&&(Ee.begin||(Ee.begin=/\B|\b/),Ue.beginRe=xe(Ue.begin),!Ee.end&&!Ee.endsWithParent&&(Ee.end=/\B|\b/),Ee.end&&(Ue.endRe=xe(Ue.end)),Ue.terminatorEnd=b(Ue.end)||"",Ee.endsWithParent&&Oe.terminatorEnd&&(Ue.terminatorEnd+=(Ee.end?"|":"")+Oe.terminatorEnd)),Ee.illegal&&(Ue.illegalRe=xe(Ee.illegal)),Ee.contains||(Ee.contains=[]),Ee.contains=[].concat(...Ee.contains.map(function(_t){return on(_t==="self"?Ee:_t)})),Ee.contains.forEach(function(_t){ue(_t,Ue)}),Ee.starts&&ue(Ee.starts,Oe),Ue.matcher=gt(Ue),Ue}if(Z.compilerExtensions||(Z.compilerExtensions=[]),Z.contains&&Z.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Z.classNameAliases=a(Z.classNameAliases||{}),ue(Z)}function rt(Z){return Z?Z.endsWithParent||rt(Z.starts):!1}function on(Z){return Z.variants&&!Z.cachedVariants&&(Z.cachedVariants=Z.variants.map(function(xe){return a(Z,{variants:null},xe)})),Z.cachedVariants?Z.cachedVariants:rt(Z)?a(Z,{starts:Z.starts?a(Z.starts):null}):Object.isFrozen(Z)?a(Z):Z}var yt="11.11.2";class Xn extends Error{constructor(xe,je){super(xe),this.name="HTMLInjectionError",this.html=je}}const Sn=n,st=a,Ve=Symbol("nomatch"),xt=7,Dt=function(Z){const xe=Object.create(null),je=Object.create(null),et=[];let gt=!0;const ue="Could not find the language '{}', did you forget to load/include a language module?",Ee={disableAutodetect:!0,name:"Plain text",contains:[]};let Oe={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(Re){return Oe.noHighlightRe.test(Re)}function jt(Re){let Xe=Re.className+" ";Xe+=Re.parentNode?Re.parentNode.className:"";const kt=Oe.languageDetectRe.exec(Xe);if(kt){const Gt=ar(kt[1]);return Gt||(Xt(ue.replace("{}",kt[1])),Xt("Falling back to no-highlight mode for this block.",Re)),Gt?kt[1]:"no-highlight"}return Xe.split(/\s+/).find(Gt=>Ue(Gt)||ar(Gt))}function _t(Re,Xe,kt){let Gt="",kn="";typeof Xe=="object"?(Gt=Re,kt=Xe.ignoreIllegals,kn=Xe.language):(he("10.7.0","highlight(lang, code, ...args) has been deprecated."),he("10.7.0",`Please use highlight(code, options) instead.
|
|
302
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),kn=Re,Gt=Xe),kt===void 0&&(kt=!0);const Qn={code:Gt,language:kn};Oi("before:highlight",Qn);const kr=Qn.result?Qn.result:bn(Qn.language,Qn.code,kt);return kr.code=Qn.code,Oi("after:highlight",kr),kr}function bn(Re,Xe,kt,Gt){const kn=Object.create(null);function Qn(Le,Ge){return Le.keywords[Ge]}function kr(){if(!it.keywords){An.addText(Kt);return}let Le=0;it.keywordPatternRe.lastIndex=0;let Ge=it.keywordPatternRe.exec(Kt),ht="";for(;Ge;){ht+=Kt.substring(Le,Ge.index);const It=$n.case_insensitive?Ge[0].toLowerCase():Ge[0],hn=Qn(it,It);if(hn){const[qr,vl]=hn;if(An.addText(ht),ht="",kn[It]=(kn[It]||0)+1,kn[It]<=xt&&(Xa+=vl),qr.startsWith("_"))ht+=Ge[0];else{const Uo=$n.classNameAliases[qr]||qr;Er(Ge[0],Uo)}}else ht+=Ge[0];Le=it.keywordPatternRe.lastIndex,Ge=it.keywordPatternRe.exec(Kt)}ht+=Kt.substring(Le),An.addText(ht)}function fr(){if(Kt==="")return;let Le=null;if(typeof it.subLanguage=="string"){if(!xe[it.subLanguage]){An.addText(Kt);return}Le=bn(it.subLanguage,Kt,!0,qo[it.subLanguage]),qo[it.subLanguage]=Le._top}else Le=dr(Kt,it.subLanguage.length?it.subLanguage:null);it.relevance>0&&(Xa+=Le.relevance),An.__addSublanguage(Le._emitter,Le.language)}function ln(){it.subLanguage!=null?fr():kr(),Kt=""}function Er(Le,Ge){Le!==""&&(An.startScope(Ge),An.addText(Le),An.endScope())}function zo(Le,Ge){let ht=1;const It=Ge.length-1;for(;ht<=It;){if(!Le._emit[ht]){ht++;continue}const hn=$n.classNameAliases[Le[ht]]||Le[ht],qr=Ge[ht];hn?Er(qr,hn):(Kt=qr,kr(),Kt=""),ht++}}function ms(Le,Ge){return Le.scope&&typeof Le.scope=="string"&&An.openNode($n.classNameAliases[Le.scope]||Le.scope),Le.beginScope&&(Le.beginScope._wrap?(Er(Kt,$n.classNameAliases[Le.beginScope._wrap]||Le.beginScope._wrap),Kt=""):Le.beginScope._multi&&(zo(Le.beginScope,Ge),Kt="")),it=Object.create(Le,{parent:{value:it}}),it}function pl(Le,Ge,ht){let It=O(Le.endRe,ht);if(It){if(Le["on:end"]){const hn=new t(Le);Le["on:end"](Ge,hn),hn.isMatchIgnored&&(It=!1)}if(It){for(;Le.endsParent&&Le.parent;)Le=Le.parent;return Le}}if(Le.endsWithParent)return pl(Le.parent,Ge,ht)}function hs(Le){return it.matcher.regexIndex===0?(Kt+=Le[0],1):(Za=!0,0)}function l0(Le){const Ge=Le[0],ht=Le.rule,It=new t(ht),hn=[ht.__beforeBegin,ht["on:begin"]];for(const qr of hn)if(qr&&(qr(Le,It),It.isMatchIgnored))return hs(Ge);return ht.skip?Kt+=Ge:(ht.excludeBegin&&(Kt+=Ge),ln(),!ht.returnBegin&&!ht.excludeBegin&&(Kt=Ge)),ms(ht,Le),ht.returnBegin?0:Ge.length}function mr(Le){const Ge=Le[0],ht=Xe.substring(Le.index),It=pl(it,Le,ht);if(!It)return Ve;const hn=it;it.endScope&&it.endScope._wrap?(ln(),Er(Ge,it.endScope._wrap)):it.endScope&&it.endScope._multi?(ln(),zo(it.endScope,Le)):hn.skip?Kt+=Ge:(hn.returnEnd||hn.excludeEnd||(Kt+=Ge),ln(),hn.excludeEnd&&(Kt=Ge));do it.scope&&An.closeNode(),!it.skip&&!it.subLanguage&&(Xa+=it.relevance),it=it.parent;while(it!==It.parent);return It.starts&&ms(It.starts,Le),hn.returnEnd?0:Ge.length}function gl(){const Le=[];for(let Ge=it;Ge!==$n;Ge=Ge.parent)Ge.scope&&Le.unshift(Ge.scope);Le.forEach(Ge=>An.openNode(Ge))}let Di={};function ps(Le,Ge){const ht=Ge&&Ge[0];if(Kt+=Le,ht==null)return ln(),0;if(Di.type==="begin"&&Ge.type==="end"&&Di.index===Ge.index&&ht===""){if(Kt+=Xe.slice(Ge.index,Ge.index+1),!gt){const It=new Error(`0 width match regex (${Re})`);throw It.languageName=Re,It.badRule=Di.rule,It}return 1}if(Di=Ge,Ge.type==="begin")return l0(Ge);if(Ge.type==="illegal"&&!kt){const It=new Error('Illegal lexeme "'+ht+'" for mode "'+(it.scope||"<unnamed>")+'"');throw It.mode=it,It}else if(Ge.type==="end"){const It=mr(Ge);if(It!==Ve)return It}if(Ge.type==="illegal"&&ht==="")return Ge.index===Xe.length||(Kt+=`
|
|
303
|
+
`),1;if(bl>1e5&&bl>Ge.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Kt+=ht,ht.length}const $n=ar(Re);if(!$n)throw Fe(ue.replace("{}",Re)),new Error('Unknown language: "'+Re+'"');const Bo=Pt($n);let gs="",it=Gt||Bo;const qo={},An=new Oe.__emitter(Oe);gl();let Kt="",Xa=0,va=0,bl=0,Za=!1;try{if($n.__emitTokens)$n.__emitTokens(Xe,An);else{for(it.matcher.considerAll();;){bl++,Za?Za=!1:it.matcher.considerAll(),it.matcher.lastIndex=va;const Le=it.matcher.exec(Xe);if(!Le)break;const Ge=Xe.substring(va,Le.index),ht=ps(Ge,Le);va=Le.index+ht}ps(Xe.substring(va))}return An.finalize(),gs=An.toHTML(),{language:Re,value:gs,relevance:Xa,illegal:!1,_emitter:An,_top:it}}catch(Le){if(Le.message&&Le.message.includes("Illegal"))return{language:Re,value:Sn(Xe),illegal:!0,relevance:0,_illegalBy:{message:Le.message,index:va,context:Xe.slice(va-100,va+100),mode:Le.mode,resultSoFar:gs},_emitter:An};if(gt)return{language:Re,value:Sn(Xe),illegal:!1,relevance:0,errorRaised:Le,_emitter:An,_top:it};throw Le}}function Zn(Re){const Xe={value:Sn(Re),illegal:!1,relevance:0,_top:Ee,_emitter:new Oe.__emitter(Oe)};return Xe._emitter.addText(Re),Xe}function dr(Re,Xe){Xe=Xe||Oe.languages||Object.keys(xe);const kt=Zn(Re),Gt=Xe.filter(ar).filter(Va).map(ln=>bn(ln,Re,!1));Gt.unshift(kt);const kn=Gt.sort((ln,Er)=>{if(ln.relevance!==Er.relevance)return Er.relevance-ln.relevance;if(ln.language&&Er.language){if(ar(ln.language).supersetOf===Er.language)return 1;if(ar(Er.language).supersetOf===ln.language)return-1}return 0}),[Qn,kr]=kn,fr=Qn;return fr.secondBest=kr,fr}function Cn(Re,Xe,kt){const Gt=Xe&&je[Xe]||kt;Re.classList.add("hljs"),Re.classList.add(`language-${Gt}`)}function sn(Re){let Xe=null;const kt=jt(Re);if(Ue(kt))return;if(Oi("before:highlightElement",{el:Re,language:kt}),Re.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Re);return}if(Re.children.length>0&&(Oe.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(Re)),Oe.throwUnescapedHTML))throw new Xn("One of your code blocks includes unescaped HTML.",Re.innerHTML);Xe=Re;const Gt=Xe.textContent,kn=kt?_t(Gt,{language:kt,ignoreIllegals:!0}):dr(Gt);Re.innerHTML=kn.value,Re.dataset.highlighted="yes",Cn(Re,kt,kn.language),Re.result={language:kn.language,re:kn.relevance,relevance:kn.relevance},kn.secondBest&&(Re.secondBest={language:kn.secondBest.language,relevance:kn.secondBest.relevance}),Oi("after:highlightElement",{el:Re,result:kn,text:Gt})}function Wn(Re){Oe=st(Oe,Re)}const Ka=()=>{fs(),he("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function ml(){fs(),he("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Do=!1;function fs(){function Re(){fs()}if(document.readyState==="loading"){Do||window.addEventListener("DOMContentLoaded",Re,!1),Do=!0;return}document.querySelectorAll(Oe.cssSelector).forEach(sn)}function jo(Re,Xe){let kt=null;try{kt=Xe(Z)}catch(Gt){if(Fe("Language definition for '{}' could not be registered.".replace("{}",Re)),gt)Fe(Gt);else throw Gt;kt=Ee}kt.name||(kt.name=Re),xe[Re]=kt,kt.rawDefinition=Xe.bind(null,Z),kt.aliases&&ga(kt.aliases,{languageName:Re})}function Mi(Re){delete xe[Re];for(const Xe of Object.keys(je))je[Xe]===Re&&delete je[Xe]}function hl(){return Object.keys(xe)}function ar(Re){return Re=(Re||"").toLowerCase(),xe[Re]||xe[je[Re]]}function ga(Re,{languageName:Xe}){typeof Re=="string"&&(Re=[Re]),Re.forEach(kt=>{je[kt.toLowerCase()]=Xe})}function Va(Re){const Xe=ar(Re);return Xe&&!Xe.disableAutodetect}function Ya(Re){Re["before:highlightBlock"]&&!Re["before:highlightElement"]&&(Re["before:highlightElement"]=Xe=>{Re["before:highlightBlock"](Object.assign({block:Xe.el},Xe))}),Re["after:highlightBlock"]&&!Re["after:highlightElement"]&&(Re["after:highlightElement"]=Xe=>{Re["after:highlightBlock"](Object.assign({block:Xe.el},Xe))})}function Rn(Re){Ya(Re),et.push(Re)}function Lo(Re){const Xe=et.indexOf(Re);Xe!==-1&&et.splice(Xe,1)}function Oi(Re,Xe){const kt=Re;et.forEach(function(Gt){Gt[kt]&&Gt[kt](Xe)})}function ba(Re){return he("10.7.0","highlightBlock will be removed entirely in v12.0"),he("10.7.0","Please use highlightElement now."),sn(Re)}Object.assign(Z,{highlight:_t,highlightAuto:dr,highlightAll:fs,highlightElement:sn,highlightBlock:ba,configure:Wn,initHighlighting:Ka,initHighlightingOnLoad:ml,registerLanguage:jo,unregisterLanguage:Mi,listLanguages:hl,getLanguage:ar,registerAliases:ga,autoDetection:Va,inherit:st,addPlugin:Rn,removePlugin:Lo}),Z.debugMode=function(){gt=!1},Z.safeMode=function(){gt=!0},Z.versionString=yt,Z.regex={concat:N,lookahead:x,either:C,optional:E,anyNumberOfTimes:y};for(const Re in ze)typeof ze[Re]=="object"&&e(ze[Re]);return Object.assign(Z,ze),Z},Wt=Dt({});return Wt.newInstance=()=>Dt({}),Qf=Wt,Wt.HighlightJS=Wt,Wt.default=Wt,Qf}var Jf,dy;function RA(){if(dy)return Jf;dy=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,o={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/}]},d=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:[o]},{begin:/'/,end:/'/,contains:[o]},{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,d,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[c,d,h,m]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},o,{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 Jf=e,Jf}var em,fy;function AA(){if(fy)return em;fy=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 o={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},c=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),d={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,o]};o.contains.push(m);const h={match:/\\"/},p={className:"string",begin:/'/,end:/'/},b={match:/\\'/},x={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,a]},y=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],E=t.SHEBANG({binary:`(${y.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"],I={match:/(\/[a-z._-]+)+/},O=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],X=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],q=["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"],A=["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:[...O,...X,"set","shopt",...q,...A]},contains:[E,t.SHEBANG(),N,x,c,d,I,m,h,p,b,a]}}return em=e,em}var tm,my;function _A(){if(my)return tm;my=1;function e(t){const n=t.regex,a=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",d="("+s+"|"+n.optional(o)+"[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},x={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]},y={className:"title",begin:n.optional(o)+t.IDENT_RE,relevance:0},E=n.optional(o)+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"},I=[x,m,a,t.C_BLOCK_COMMENT_MODE,b,p],O={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:I.concat([{begin:/\(/,end:/\)/,keywords:C,contains:I.concat(["self"]),relevance:0}]),relevance:0},X={begin:"("+d+"[\\*&\\s]+)+"+E,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:C,relevance:0},{begin:E,returnBegin:!0,contains:[t.inherit(y,{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,x]};return{name:"C",aliases:["h"],keywords:C,disableAutodetect:!0,illegal:"</",contains:[].concat(O,X,I,[x,{begin:t.IDENT_RE+"::",keywords:C},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:x,strings:p,keywords:C}}}return tm=e,tm}var nm,hy;function IA(){if(hy)return nm;hy=1;function e(t){const n=t.regex,a=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",d="(?!struct)("+s+"|"+n.optional(o)+"[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},x={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]},y={className:"title",begin:n.optional(o)+t.IDENT_RE,relevance:0},E=n.optional(o)+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"],I=["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"],q={type:R,keyword:N,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:C},A={className:"function.dispatch",relevance:0,keywords:{_hint:I},begin:n.concat(/\b/,`(?!${N.join("|")})`,t.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},F=[A,x,m,a,t.C_BLOCK_COMMENT_MODE,b,p],J={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:q,contains:F.concat([{begin:/\(/,end:/\)/,keywords:q,contains:F.concat(["self"]),relevance:0}]),relevance:0},W={className:"function",begin:"("+d+"[\\*&\\s]+)+"+E,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:q,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:q,relevance:0},{begin:E,returnBegin:!0,contains:[y],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[p,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:q,relevance:0,contains:[a,t.C_BLOCK_COMMENT_MODE,p,b,m,{begin:/\(/,end:/\)/,keywords:q,relevance:0,contains:["self",a,t.C_BLOCK_COMMENT_MODE,p,b,m]}]},m,a,t.C_BLOCK_COMMENT_MODE,x]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:q,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(J,W,A,F,[x,{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:q,contains:["self",m]},{begin:t.IDENT_RE+"::",keywords:q},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return nm=e,nm}var rm,py;function MA(){if(py)return rm;py=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"],o=["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"],d={keyword:o.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:'""'}]},x=t.inherit(b,{illegal:/\n/}),y={className:"subst",begin:/\{/,end:/\}/,keywords:d},E=t.inherit(y,{illegal:/\n/}),N={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,E]},R={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]},C=t.inherit(R,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},E]});y.contains=[R,N,b,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,t.C_BLOCK_COMMENT_MODE],E.contains=[C,N,x,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const I={variants:[p,R,N,b,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},O={begin:"<",end:">",contains:[{beginKeywords:"in out"},m]},X=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",q={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:d,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"}},I,h,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},m,O,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,O,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:"("+X+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:d,contains:[{beginKeywords:a.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,O],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,relevance:0,contains:[I,h,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},q]}}return rm=e,rm}var am,gy;function OA(){if(gy)return am;gy=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(),o=["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(),d=["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),x={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},y="and or not only",E=/@-?\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,x,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:":("+o.join("|")+")"},{begin:":(:)?("+c.join("|")+")"}]},b.CSS_VARIABLE,{className:"attribute",begin:"\\b("+d.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:E},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:y,attribute:s.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...R,b.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+a.join("|")+")\\b"}]}}return am=m,am}var im,by;function DA(){if(by)return im;by=1;function e(t){const n=t.regex,a={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},s={begin:"^[-\\*]{3,}",end:"$"},o={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},d={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}]},x=t.inherit(p,{contains:[]}),y=t.inherit(b,{contains:[]});p.contains.push(y),b.contains.push(x);let E=[a,h];return[p,b,x,y].forEach(I=>{I.contains=I.contains.concat(E)}),E=E.concat(p,b),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:E},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:E}]}]},a,c,p,b,{className:"quote",begin:"^>\\s+",contains:E,end:"$"},o,s,h,d,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return im=e,im}var sm,vy;function jA(){if(vy)return sm;vy=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 sm=e,sm}var lm,yy;function LA(){if(yy)return lm;yy=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]+/),o=n.concat(s,/(::\w+)*/),d={"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:d},x={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]})]}]},y="[1-9](_?[0-9])*|0",E="[0-9](_?[0-9])*",N={className:"number",relevance:0,variants:[{begin:`\\b(${y})(\\.(${E}))?([eE][+-]?(${E})|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:d}]},F=[x,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:d},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:d},{relevance:0,match:[o,/\.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:[x,{begin:a}],relevance:0},N,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:d},{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=F,R.contains=F;const U=[{begin:/^\s*=>/,starts:{end:"$",contains:F}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:d,contains:F}}];return p.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:d,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(U).concat(p).concat(F)}}return lm=e,lm}var om,xy;function zA(){if(xy)return om;xy=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 om=e,om}var cm,wy;function BA(){if(wy)return cm;wy=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 cm=e,cm}var um,Sy;function qA(){if(Sy)return um;Sy=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 o={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},c={className:"literal",begin:/\bon|off|true|false|yes|no\b/},d={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,o,d,a,"self"],relevance:0},h=/[A-Za-z0-9_-]+/,p=/"(\\"|[^"])*"/,b=/'[^']*'/,x=n.either(h,p,b),y=n.concat(x,"(\\s*\\.\\s*",x,")*",n.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[s,{className:"section",begin:/\[+/,end:/\]+/},{begin:y,className:"attr",starts:{end:/$/,contains:[s,m,c,o,d,a]}}]}}return um=e,um}var dm,ky;function UA(){if(ky)return dm;ky=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,d,m){return m===-1?"":c.replace(d,h=>s(c,d,m-1))}function o(c){const d=c.regex,m="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",h=m+s("(?:<"+m+"~~~(?:\\s*,\\s*"+m+"~~~)*>)?",/~~~/g,2),E={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:E,relevance:0,contains:[c.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:E,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:[d.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:E,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:E,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 dm=o,dm}var fm,Ey;function HA(){if(Ey)return fm;Ey=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"],o=["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"],d=[].concat(o,a,s);function m(h){const p=h.regex,b=(ae,{after:we})=>{const be="</"+ae[0].slice(1);return ae.input.indexOf(be,we)!==-1},x=e,y={begin:"<>",end:"</>"},E=/<[A-Za-z0-9\\._:-]+\s*\/>/,N={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ae,we)=>{const be=ae[0].length+ae.index,ze=ae.input[be];if(ze==="<"||ze===","){we.ignoreMatch();return}ze===">"&&(b(ae,{after:be})||we.ignoreMatch());let Me;const Se=ae.input.substring(be);if(Me=Se.match(/^\s*=/)){we.ignoreMatch();return}if((Me=Se.match(/^\s+extends\s+/))&&Me.index===0){we.ignoreMatch();return}}},R={$pattern:e,keyword:t,literal:n,built_in:d,"variable.language":c},C="[0-9](_?[0-9])*",I=`\\.(${C})`,O="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",X={className:"number",variants:[{begin:`(\\b(${O})((${I})|\\.)?|(${I}))[eE][+-]?(${C})\\b`},{begin:`\\b(${O})\\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},q={className:"subst",begin:"\\$\\{",end:"\\}",keywords:R,contains:[]},A={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,q],subLanguage:"xml"}},F={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,q],subLanguage:"css"}},J={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,q],subLanguage:"graphql"}},W={className:"string",begin:"`",end:"`",contains:[h.BACKSLASH_ESCAPE,q]},U={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:x+"(?=\\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,A,F,J,W,{match:/\$\d+/},X];q.contains=H.concat({begin:/\{/,end:/\}/,keywords:R,contains:["self"].concat(H)});const te=[].concat(U,q.contains),G=te.concat([{begin:/(\s*)\(/,end:/\)/,keywords:R,contains:["self"].concat(te)}]),K={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:R,contains:G},$={variants:[{match:[/class/,/\s+/,x,/\s+/,/extends/,/\s+/,p.concat(x,"(",p.concat(/\./,x),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,x],scope:{1:"keyword",3:"title.class"}}]},ee={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]}},oe={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},ce={variants:[{match:[/function/,/\s+/,x,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[K],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function D(ae){return p.concat("(?!",ae.join("|"),")")}const P={match:p.concat(/\b/,D([...o,"super","import","await"].map(ae=>`${ae}\\s*\\(`)),x,p.lookahead(/\s*\(/)),className:"title.function",relevance:0},_={begin:p.concat(/\./,p.lookahead(p.concat(x,/(?![0-9A-Za-z$_(])/))),end:x,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ne={match:[/get|set/,/\s+/,x,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},K]},de="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+h.UNDERSCORE_IDENT_RE+")\\s*=>",se={match:[/const|var|let/,/\s+/,x,/\s*/,/=\s*/,/(async\s*)?/,p.lookahead(de)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[K]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:R,exports:{PARAMS_CONTAINS:G,CLASS_REFERENCE:ee},illegal:/#(?![$_A-Za-z])/,contains:[h.SHEBANG({label:"shebang",binary:"node",relevance:5}),oe,h.APOS_STRING_MODE,h.QUOTE_STRING_MODE,A,F,J,W,U,{match:/\$\d+/},X,ee,{scope:"attr",match:x+p.lookahead(":"),relevance:0},se,{begin:"("+h.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[U,h.REGEXP_MODE,{className:"function",begin:de,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:G}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:y.begin,end:y.end},{match:E},{begin:N.begin,"on:begin":N.isTrulyOpeningTag,end:N.end}],subLanguage:"xml",contains:[{begin:N.begin,end:N.end,skip:!0,contains:["self"]}]}]},ce,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+h.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[K,h.inherit(h.TITLE_MODE,{begin:x,className:"title.function"})]},{match:/\.\.\./,relevance:0},_,{match:"\\$"+x,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[K]},P,j,$,ne,{match:/\$[(.]/}]}}return fm=m,fm}var mm,Ty;function FA(){if(Ty)return mm;Ty=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},o={match:/[{}[\],:]/,className:"punctuation",relevance:0},c=["true","false","null"],d={scope:"literal",beginKeywords:c.join(" ")};return{name:"JSON",aliases:["jsonc","json5"],keywords:{literal:c},contains:[s,o,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,d,t,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return mm=n,mm}var hm,Ny;function PA(){if(Ny)return hm;Ny=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(o){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"},d={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},m={className:"symbol",begin:o.UNDERSCORE_IDENT_RE+"@"},h={className:"subst",begin:/\$\{/,end:/\}/,contains:[o.C_NUMBER_MODE]},p={className:"variable",begin:"\\$"+o.UNDERSCORE_IDENT_RE},b={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[p,h]},{begin:"'",end:"'",illegal:/\n/,contains:[o.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[o.BACKSLASH_ESCAPE,p,h]}]};h.contains.push(b);const x={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+o.UNDERSCORE_IDENT_RE+")?"},y={className:"meta",begin:"@"+o.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[o.inherit(b,{className:"string"}),"self"]}]},E=a,N=o.COMMENT("/\\*","\\*/",{contains:[o.C_BLOCK_COMMENT_MODE]}),R={variants:[{className:"type",begin:o.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:[o.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),o.C_LINE_COMMENT_MODE,N,d,m,x,y,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:c,relevance:5,contains:[{begin:o.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[o.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,o.C_LINE_COMMENT_MODE,N],relevance:0},o.C_LINE_COMMENT_MODE,N,x,y,b,o.C_NUMBER_MODE]},N]},{begin:[/class|interface|trait/,/\s+/,o.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},o.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},x,y]},b,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
304
|
+
`},E]}}return hm=s,hm}var pm,Cy;function $A(){if(Cy)return pm;Cy=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(),o=["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(),d=["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=o.concat(c).sort().reverse();function h(p){const b=e(p),x=m,y="and or not only",E="[\\w-]+",N="("+E+"|@\\{"+E+"\\})",R=[],C=[],I=function(te){return{className:"string",begin:"~?"+te+".*?"+te}},O=function(te,G,K){return{className:te,begin:G,relevance:K}},X={$pattern:/[a-z-]+/,keyword:y,attribute:s.join(" ")},q={begin:"\\(",end:"\\)",contains:C,keywords:X,relevance:0};C.push(p.C_LINE_COMMENT_MODE,p.C_BLOCK_COMMENT_MODE,I("'"),I('"'),b.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},b.UNICODE_RANGE,b.HEXCOLOR,q,O("variable","@@?"+E,10),O("variable","@\\{"+E+"\\}"),O("built_in","~?`[^`]*?`"),{className:"attribute",begin:E+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},b.IMPORTANT,{beginKeywords:"and not"},b.FUNCTION_DISPATCH);const A=C.concat({begin:/\{/,end:/\}/,contains:R}),F={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(C)},J={begin:N+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},b.CSS_VARIABLE,{className:"attribute",begin:"\\b("+d.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:C}}]},W={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:X,returnEnd:!0,contains:C,relevance:0}},z={className:"variable",variants:[{begin:"@"+E+"\\s*:",relevance:15},{begin:"@"+E}],starts:{end:"[;}]",returnEnd:!0,contains:A}},U={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:N,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[p.C_LINE_COMMENT_MODE,p.C_BLOCK_COMMENT_MODE,F,O("keyword","all\\b"),O("variable","@\\{"+E+"\\}"),{begin:"\\b("+a.join("|")+")\\b",className:"selector-tag"},b.CSS_NUMBER_MODE,O("selector-tag",N,0),O("selector-id","#"+N),O("selector-class","\\."+N,0),O("selector-tag","&",0),b.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+o.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+c.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:A},{begin:"!important"},b.FUNCTION_DISPATCH]},H={begin:E+`:(:)?(${x.join("|")})`,returnBegin:!0,contains:[U]};return R.push(p.C_LINE_COMMENT_MODE,p.C_BLOCK_COMMENT_MODE,W,z,H,J,U,F,b.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:R}}return pm=h,pm}var gm,Ry;function GA(){if(Ry)return gm;Ry=1;function e(t){const n="\\[=*\\[",a="\\]=*\\]",s={begin:n,end:a,contains:["self"]},o=[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:o.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:o}].concat(o)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:n,end:a,contains:[s],relevance:5}])}}return gm=e,gm}var bm,Ay;function KA(){if(Ay)return bm;Ay=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]},o={begin:"^"+t.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},c={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},d={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,o,c,d]}}return bm=e,bm}var vm,_y;function VA(){if(_y)return vm;_y=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}/,o={$pattern:/[\w.]+/,keyword:a.join(" ")},c={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:o},d={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],x=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],y=(R,C,I="\\1")=>{const O=I==="\\1"?I:n.concat(I,C);return n.concat(n.concat("(?:",R,")"),C,/(?:\\.|[^\\\/])*?/,O,/(?:\\.|[^\\\/])*?/,I,s)},E=(R,C,I)=>n.concat(n.concat("(?:",R,")"),C,/(?:\\.|[^\\\/])*?/,I,s),N=[h,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),d,{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:y("s|tr|y",n.either(...x,{capture:!0}))},{begin:y("s|tr|y","\\(","\\)")},{begin:y("s|tr|y","\\[","\\]")},{begin:y("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:E("(?:m|qr)?",/\//,/\//)},{begin:E("m|qr",n.either(...x,{capture:!0}),/\1/)},{begin:E("m|qr",/\(/,/\)/)},{begin:E("m|qr",/\[/,/\]/)},{begin:E("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,d.contains=N,{name:"Perl",aliases:["pl","pm"],keywords:o,contains:N}}return vm=e,vm}var ym,Iy;function YA(){if(Iy)return ym;Iy=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 ym=e,ym}var xm,My;function XA(){if(My)return xm;My=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),o=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),d={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)}),x={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(h),"on:begin":(K,$)=>{$.data._beginMatch=K[1]||K[2]},"on:end":(K,$)=>{$.data._beginMatch!==K[1]&&$.ignoreMatch()}},y=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),E=`[
|
|
305
|
+
]`,N={scope:"string",variants:[b,p,x,y]},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"],I=["__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"],O=["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"],q={keyword:I,literal:(K=>{const $=[];return K.forEach(ee=>{$.push(ee),ee.toLowerCase()===ee?$.push(ee.toUpperCase()):$.push(ee.toLowerCase())}),$})(C),built_in:O},A=K=>K.map($=>$.replace(/\|\d+$/,"")),F={variants:[{match:[/new/,n.concat(E,"+"),n.concat("(?!",A(O).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},J=n.concat(s,"\\b(?!\\()"),W={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),J],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,n.concat(/::/,n.lookahead(/(?!class\b)/)),J],scope:{1:"title.class",3:"variable.constant"}},{match:[o,n.concat("::",n.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},z={scope:"attr",match:n.concat(s,n.lookahead(":"),n.lookahead(/(?!::)/))},U={relevance:0,begin:/\(/,end:/\)/,keywords:q,contains:[z,d,W,t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE,t.HASH_COMMENT_MODE,N,R,F]},H={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",A(I).join("\\b|"),"|",A(O).join("\\b|"),"\\b)"),s,n.concat(E,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[U]};U.contains.push(H);const te=[z,W,t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE,t.HASH_COMMENT_MODE,N,R,F],G={begin:n.concat(/#\[\s*\\?/,n.either(o,c)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:C,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:C,keyword:["new","array"]},contains:["self",...te]},...te,{scope:"meta",variants:[{match:o},{match:c}]}]};return{case_insensitive:!1,keywords:q,contains:[G,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/},d,H,W,{match:[/const/,/\s/,s],scope:{1:"keyword",3:"variable.constant"}},F,{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:q,contains:["self",G,d,W,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 xm=e,xm}var wm,Oy;function ZA(){if(Oy)return wm;Oy=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 wm=e,wm}var Sm,Dy;function WA(){if(Dy)return Sm;Dy=1;function e(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return Sm=e,Sm}var km,jy;function QA(){if(jy)return km;jy=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},x={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]},y="[0-9](_?[0-9])*",E=`(\\b(${y}))?\\.(${y})|\\b(${y})\\.`,N=`\\b|${s.join("|")}`,R={className:"number",relevance:0,variants:[{begin:`(\\b(${y})|(${E}))[eE][+-]?(${y})[jJ]?(?=${N})`},{begin:`(${E})[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(${y})[jJ](?=${N})`}]},C={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:m,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},I={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:["self",h,R,x,t.HASH_COMMENT_MODE]}]};return p.contains=[x,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"},x,C,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,a],scope:{1:"keyword",3:"title.function"},contains:[I]},{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,I,x]}]}}return km=e,km}var Em,Ly;function JA(){if(Ly)return Em;Ly=1;function e(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return Em=e,Em}var Tm,zy;function e_(){if(zy)return Tm;zy=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]?/),o=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,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:[o,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:o},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:c},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return Tm=e,Tm}var Nm,By;function t_(){if(By)return Nm;By=1;function e(t){const n=t.regex,a=/(r#)?/,s=n.concat(a,t.UNDERSCORE_IDENT_RE),o=n.concat(a,t.IDENT_RE),c={className:"title.function.invoke",relevance:0,begin:n.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,n.lookahead(/\s*\(/))},d="([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_]+)"+d},{begin:"\\b0o([0-7_]+)"+d},{begin:"\\b0x([A-Fa-f0-9_]+)"+d},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+d}],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 Nm=e,Nm}var Cm,qy;function n_(){if(qy)return Cm;qy=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(),o=["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(),d=["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,x=o,y="@[a-z-]+",E="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:":("+x.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+b.join("|")+")"},R,{begin:/\(/,end:/\)/,contains:[p.CSS_NUMBER_MODE]},p.CSS_VARIABLE,{className:"attribute",begin:"\\b("+d.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:y,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:E,attribute:s.join(" ")},contains:[{begin:y,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 Cm=m,Cm}var Rm,Uy;function r_(){if(Uy)return Rm;Uy=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 Rm=e,Rm}var Am,Hy;function a_(){if(Hy)return Am;Hy=1;function e(t){const n=t.regex,a=t.COMMENT("--","$"),s={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},o={begin:/"/,end:/"/,contains:[{match:/""/}]},c=["true","false","unknown"],d=["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"],x=["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"],y=["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"],E=b,N=[...p,...h].filter(A=>!b.includes(A)),R={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},C={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},I={match:n.concat(/\b/,n.either(...E),/\s*\(/),relevance:0,keywords:{built_in:E}};function O(A){return n.concat(/\b/,n.either(...A.map(F=>F.replace(/\s+/,"\\s+"))),/\b/)}const X={scope:"keyword",match:O(y),relevance:0};function q(A,{exceptions:F,when:J}={}){const W=J;return F=F||[],A.map(z=>z.match(/\|\d+$/)||F.includes(z)?z:W(z)?`${z}|0`:z)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:q(N,{when:A=>A.length<3}),literal:c,type:m,built_in:x},contains:[{scope:"type",match:O(d)},X,I,R,s,o,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,a,C]}}return Am=e,Am}var _m,Fy;function i_(){if(Fy)return _m;Fy=1;function e(J){return J?typeof J=="string"?J:J.source:null}function t(J){return n("(?=",J,")")}function n(...J){return J.map(z=>e(z)).join("")}function a(J){const W=J[J.length-1];return typeof W=="object"&&W.constructor===Object?(J.splice(J.length-1,1),W):{}}function s(...J){return"("+(a(J).capture?"":"?:")+J.map(U=>e(U)).join("|")+")"}const o=J=>n(/\b/,J,/\w$/.test(J)?/\b/:/\B/),c=["Protocol","Type"].map(o),d=["init","self"].map(o),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"],x=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],y=["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"],E=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(E,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),R=n(E,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]/),I=s(C,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),O=n(C,I,"*"),X=n(/[A-Z]/,I,"*"),q=["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\(/,O,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],A=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function F(J){const W={match:/\s+/,relevance:0},z=J.COMMENT("/\\*","\\*/",{contains:["self"]}),U=[J.C_LINE_COMMENT_MODE,z],H={match:[/\./,s(...c,...d)],className:{2:"keyword"}},te={match:n(/\./,s(...h)),relevance:0},G=h.filter(Ve=>typeof Ve=="string").concat(["_|0"]),K=h.filter(Ve=>typeof Ve!="string").concat(m).map(o),$={variants:[{className:"keyword",match:s(...K,...d)}]},ee={$pattern:s(/\b\w+/,/#\w+/),keyword:G.concat(x),literal:p},oe=[H,te,$],ce={match:n(/\./,s(...y)),relevance:0},j={className:"built_in",match:n(/\b/,s(...y),/(?=\()/)},D=[ce,j],P={match:/->/,relevance:0},_={className:"operator",relevance:0,variants:[{match:R},{match:`\\.(\\.|${N})+`}]},ne=[P,_],de="([0-9]_*)+",se="([0-9a-fA-F]_*)+",ae={className:"number",relevance:0,variants:[{match:`\\b(${de})(\\.(${de}))?([eE][+-]?(${de}))?\\b`},{match:`\\b0x(${se})(\\.(${se}))?([pP][+-]?(${de}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},we=(Ve="")=>({className:"subst",variants:[{match:n(/\\/,Ve,/[0\\tnr"']/)},{match:n(/\\/,Ve,/u\{[0-9a-fA-F]{1,8}\}/)}]}),be=(Ve="")=>({className:"subst",match:n(/\\/,Ve,/[\t ]*(?:[\r\n]|\r\n)/)}),ze=(Ve="")=>({className:"subst",label:"interpol",begin:n(/\\/,Ve,/\(/),end:/\)/}),Me=(Ve="")=>({begin:n(Ve,/"""/),end:n(/"""/,Ve),contains:[we(Ve),be(Ve),ze(Ve)]}),Se=(Ve="")=>({begin:n(Ve,/"/),end:n(/"/,Ve),contains:[we(Ve),ze(Ve)]}),$e={className:"string",variants:[Me(),Me("#"),Me("##"),Me("###"),Se(),Se("#"),Se("##"),Se("###")]},ct=[J.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[J.BACKSLASH_ESCAPE]}],mt={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:ct},Ze=Ve=>{const xt=n(Ve,/\//),Dt=n(/\//,Ve);return{begin:xt,end:Dt,contains:[...ct,{scope:"comment",begin:`#(?!.*${Dt})`,end:/$/}]}},lt={scope:"regexp",variants:[Ze("###"),Ze("##"),Ze("#"),mt]},Tt={match:n(/`/,O,/`/)},St={className:"variable",match:/\$\d+/},wt={className:"variable",match:`\\$${I}+`},Je=[Tt,St,wt],Nt={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:A,contains:[...ne,ae,$e]}]}},qt={scope:"keyword",match:n(/@/,s(...q),t(s(/\(/,/\s+/)))},Fe={scope:"meta",match:n(/@/,O)},Xt=[Nt,qt,Fe],he={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)/,I,"+")},{className:"type",match:X,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:n(/\s+&\s+/,t(X)),relevance:0}]},ve={begin:/</,end:/>/,keywords:ee,contains:[...U,...oe,...Xt,P,he]};he.contains.push(ve);const qe={match:n(O,/\s*:/),keywords:"_|0",relevance:0},We={begin:/\(/,end:/\)/,relevance:0,keywords:ee,contains:["self",qe,...U,lt,...oe,...D,...ne,ae,$e,...Je,...Xt,he]},nt={begin:/</,end:/>/,keywords:"repeat each",contains:[...U,he]},$t={begin:s(t(n(O,/\s*:/)),t(n(O,/\s+/,O,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:O}]},Zt={begin:/\(/,end:/\)/,keywords:ee,contains:[$t,...U,...oe,...ne,ae,$e,...Xt,he,We],endsParent:!0,illegal:/["']/},Pt={match:[/(func|macro)/,/\s+/,s(Tt.match,O,R)],className:{1:"keyword",3:"title.function"},contains:[nt,Zt,W],illegal:[/\[/,/%/]},rt={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[nt,Zt,W],illegal:/\[|%/},on={match:[/operator/,/\s+/,R],className:{1:"keyword",3:"title"}},yt={begin:[/precedencegroup/,/\s+/,X],className:{1:"keyword",3:"title"},contains:[he],keywords:[...b,...p],end:/}/},Xn={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Sn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},st={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,O,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:ee,contains:[nt,...oe,{begin:/:/,end:/\{/,keywords:ee,contains:[{scope:"title.class.inherited",match:X},...oe],relevance:0}]};for(const Ve of $e.variants){const xt=Ve.contains.find(Wt=>Wt.label==="interpol");xt.keywords=ee;const Dt=[...oe,...D,...ne,ae,$e,...Je];xt.contains=[...Dt,{begin:/\(/,end:/\)/,contains:["self",...Dt]}]}return{name:"Swift",keywords:ee,contains:[...U,Pt,rt,Xn,Sn,st,on,yt,{beginKeywords:"import",end:/$/,contains:[...U],relevance:0},lt,...oe,...D,...ne,ae,$e,...Je,...Xt,he,We]}}return _m=F,_m}var Im,Py;function s_(){if(Py)return Im;Py=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]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},c={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},d={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,o]},m=t.inherit(d,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),y={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"},E={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},N={begin:/\{/,end:/\}/,contains:[E],illegal:"\\n",relevance:0},R={begin:"\\[",end:"\\]",contains:[E],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}},y,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},N,R,c,d],I=[...C];return I.pop(),I.push(m),E.contains=I,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:C}}return Im=e,Im}var Mm,$y;function l_(){if($y)return Mm;$y=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"],o=["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"],d=[].concat(o,a,s);function m(p){const b=p.regex,x=(we,{after:be})=>{const ze="</"+we[0].slice(1);return we.input.indexOf(ze,be)!==-1},y=e,E={begin:"<>",end:"</>"},N=/<[A-Za-z0-9\\._:-]+\s*\/>/,R={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(we,be)=>{const ze=we[0].length+we.index,Me=we.input[ze];if(Me==="<"||Me===","){be.ignoreMatch();return}Me===">"&&(x(we,{after:ze})||be.ignoreMatch());let Se;const $e=we.input.substring(ze);if(Se=$e.match(/^\s*=/)){be.ignoreMatch();return}if((Se=$e.match(/^\s+extends\s+/))&&Se.index===0){be.ignoreMatch();return}}},C={$pattern:e,keyword:t,literal:n,built_in:d,"variable.language":c},I="[0-9](_?[0-9])*",O=`\\.(${I})`,X="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",q={className:"number",variants:[{begin:`(\\b(${X})((${O})|\\.)?|(${O}))[eE][+-]?(${I})\\b`},{begin:`\\b(${X})\\b((${O})\\b|\\.)?|(${O})\\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},A={className:"subst",begin:"\\$\\{",end:"\\}",keywords:C,contains:[]},F={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[p.BACKSLASH_ESCAPE,A],subLanguage:"xml"}},J={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[p.BACKSLASH_ESCAPE,A],subLanguage:"css"}},W={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[p.BACKSLASH_ESCAPE,A],subLanguage:"graphql"}},z={className:"string",begin:"`",end:"`",contains:[p.BACKSLASH_ESCAPE,A]},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:y+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),p.C_BLOCK_COMMENT_MODE,p.C_LINE_COMMENT_MODE]},te=[p.APOS_STRING_MODE,p.QUOTE_STRING_MODE,F,J,W,z,{match:/\$\d+/},q];A.contains=te.concat({begin:/\{/,end:/\}/,keywords:C,contains:["self"].concat(te)});const G=[].concat(H,A.contains),K=G.concat([{begin:/(\s*)\(/,end:/\)/,keywords:C,contains:["self"].concat(G)}]),$={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:C,contains:K},ee={variants:[{match:[/class/,/\s+/,y,/\s+/,/extends/,/\s+/,b.concat(y,"(",b.concat(/\./,y),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,y],scope:{1:"keyword",3:"title.class"}}]},oe={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]}},ce={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},j={variants:[{match:[/function/,/\s+/,y,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[$],illegal:/%/},D={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function P(we){return b.concat("(?!",we.join("|"),")")}const _={match:b.concat(/\b/,P([...o,"super","import","await"].map(we=>`${we}\\s*\\(`)),y,b.lookahead(/\s*\(/)),className:"title.function",relevance:0},ne={begin:b.concat(/\./,b.lookahead(b.concat(y,/(?![0-9A-Za-z$_(])/))),end:y,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},de={match:[/get|set/,/\s+/,y,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},$]},se="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+p.UNDERSCORE_IDENT_RE+")\\s*=>",ae={match:[/const|var|let/,/\s+/,y,/\s*/,/=\s*/,/(async\s*)?/,b.lookahead(se)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[$]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:C,exports:{PARAMS_CONTAINS:K,CLASS_REFERENCE:oe},illegal:/#(?![$_A-Za-z])/,contains:[p.SHEBANG({label:"shebang",binary:"node",relevance:5}),ce,p.APOS_STRING_MODE,p.QUOTE_STRING_MODE,F,J,W,z,H,{match:/\$\d+/},q,oe,{scope:"attr",match:y+b.lookahead(":"),relevance:0},ae,{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:se,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:K}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:E.begin,end:E.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"]}]}]},j,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+p.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[$,p.inherit(p.TITLE_MODE,{begin:y,className:"title.function"})]},{match:/\.\.\./,relevance:0},ne,{match:"\\$"+y,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[$]},_,D,ee,de,{match:/\$[(.]/}]}}function h(p){const b=p.regex,x=m(p),y=e,E=["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:E},contains:[x.exports.CLASS_REFERENCE]},C={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},I=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],O={$pattern:e,keyword:t.concat(I),literal:n,built_in:d.concat(E),"variable.language":c},X={className:"meta",begin:"@"+y},q=(W,z,U)=>{const H=W.contains.findIndex(te=>te.label===z);if(H===-1)throw new Error("can not find mode to replace");W.contains.splice(H,1,U)};Object.assign(x.keywords,O),x.exports.PARAMS_CONTAINS.push(X);const A=x.contains.find(W=>W.scope==="attr"),F=Object.assign({},A,{match:b.concat(y,b.lookahead(/\s*\?:/))});x.exports.PARAMS_CONTAINS.push([x.exports.CLASS_REFERENCE,A,F]),x.contains=x.contains.concat([X,N,R,F]),q(x,"shebang",p.SHEBANG()),q(x,"use_strict",C);const J=x.contains.find(W=>W.label==="func.def");return J.relevance=0,Object.assign(x,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),x}return Mm=h,Mm}var Om,Gy;function o_(){if(Gy)return Om;Gy=1;function e(t){const n=t.regex,a={className:"string",begin:/"(""|[^/n])"C\b/},s={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o=/\d{1,2}\/\d{1,2}\/\d{4}/,c=/\d{4}-\d{1,2}-\d{1,2}/,d=/(\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,o),/ *#/)},{begin:n.concat(/# */,m,/ *#/)},{begin:n.concat(/# */,d,/ *#/)},{begin:n.concat(/# */,n.either(c,o),/ +/,n.either(d,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+:/},x=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),y=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,x,y,{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:[y]}]}}return Om=e,Om}var Dm,Ky;function c_(){if(Ky)return Dm;Ky=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"],o={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},c={className:"variable",begin:/\$[\w_]+/},d={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,d,o,t.QUOTE_STRING_MODE,h,p,m]}}return Dm=e,Dm}var jm,Vy;function u_(){if(Vy)return jm;Vy=1;var e=CA();return e.registerLanguage("xml",RA()),e.registerLanguage("bash",AA()),e.registerLanguage("c",_A()),e.registerLanguage("cpp",IA()),e.registerLanguage("csharp",MA()),e.registerLanguage("css",OA()),e.registerLanguage("markdown",DA()),e.registerLanguage("diff",jA()),e.registerLanguage("ruby",LA()),e.registerLanguage("go",zA()),e.registerLanguage("graphql",BA()),e.registerLanguage("ini",qA()),e.registerLanguage("java",UA()),e.registerLanguage("javascript",HA()),e.registerLanguage("json",FA()),e.registerLanguage("kotlin",PA()),e.registerLanguage("less",$A()),e.registerLanguage("lua",GA()),e.registerLanguage("makefile",KA()),e.registerLanguage("perl",VA()),e.registerLanguage("objectivec",YA()),e.registerLanguage("php",XA()),e.registerLanguage("php-template",ZA()),e.registerLanguage("plaintext",WA()),e.registerLanguage("python",QA()),e.registerLanguage("python-repl",JA()),e.registerLanguage("r",e_()),e.registerLanguage("rust",t_()),e.registerLanguage("scss",n_()),e.registerLanguage("shell",r_()),e.registerLanguage("sql",a_()),e.registerLanguage("swift",i_()),e.registerLanguage("yaml",s_()),e.registerLanguage("typescript",l_()),e.registerLanguage("vbnet",o_()),e.registerLanguage("wasm",c_()),e.HighlightJS=e,e.default=e,jm=e,jm}var d_=u_();const Yy=Lu(d_),s6=/^(javascript|vbscript|data):/i;function f_(e){if(!e)return!1;const t=e.trim();return!(!t||s6.test(t))}function m_(e){if(!e)return!1;const t=e.trim();return!t||s6.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 h_=[[KN,{singleTilde:!1}],[YR,{singleDollarTextMath:!0}]],p_=[NA];let Lm=null,Xy=null;async function g_(){return Lm||(Xy??=Nw(()=>import("./mermaid.core-D7Occzk_.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 Lm=t,t}).catch(()=>null),Xy)}function b_({code:e}){const t=k.useRef(null),[n,a]=k.useState(!1);return k.useEffect(()=>{let s=!1;return g_().then(o=>{if(s||!o||!t.current){o||a(!0);return}o(t.current,e).catch(()=>{s||a(!0)})}),()=>{s=!0}},[e]),n?f.jsx(Eh,{lang:"mermaid",text:e}):f.jsx("div",{className:"oc-mermaid",ref:t,role:"img","aria-label":"Mermaid 图表"})}function Eh({lang:e,text:t,children:n}){const[a,s]=k.useState(!1),o=k.useMemo(()=>{const d=Yy.getLanguage(e)?e:"";return d?Yy.highlight(t,{language:d,ignoreIllegals:!0}).value:void 0},[e,t]),c=()=>{navigator.clipboard?.writeText(t).then(()=>{s(!0),window.setTimeout(()=>s(!1),1600)},()=>{})};return f.jsxs("div",{className:"oc-codeblock",children:[f.jsxs("div",{className:"oc-codeblock-head",children:[f.jsx("span",{className:"oc-codeblock-lang",children:e||"text"}),f.jsx("button",{type:"button",className:"oc-codeblock-copy",onClick:c,children:a?"已复制":"复制"})]}),f.jsx("pre",{children:o!==void 0?f.jsx("code",{className:`hljs language-${e}`,dangerouslySetInnerHTML:{__html:o}}):f.jsx("code",{className:e?`hljs language-${e}`:"hljs",children:n??t})})]})}function Th(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(Th).join("");if(typeof e=="object"&&"props"in e){const t=e.props;return Th(t?.children)}return""}const v_={pre({children:e}){return f.jsx(f.Fragment,{children:e})},code({className:e,children:t,...n}){const a=Th(t).replace(/\n$/,""),s=/language-([\w-]+)/.exec(e??"");return s?.[1]==="mermaid"?f.jsx(b_,{code:a}):s||e&&a.includes(`
|
|
306
|
+
`)?f.jsx(Eh,{lang:s?.[1]??"",text:a}):a.includes(`
|
|
307
|
+
`)?f.jsx(Eh,{lang:"",text:a}):f.jsx("code",{className:e,...n,children:t})},a({href:e,children:t,...n}){if(!f_(e))return f.jsx("span",{...n,children:t});const a=/^https?:\/\//i.test(e??"");return f.jsx("a",{href:e,...a?{target:"_blank",rel:"noopener noreferrer"}:{},...n,children:t})},img({src:e,alt:t}){return m_(e)?f.jsxs(f.Fragment,{children:[f.jsx("img",{src:e,alt:t??"",loading:"lazy",onError:n=>{const a=n.currentTarget;a.hidden=!0,a.nextElementSibling?.removeAttribute("hidden")}}),f.jsx("span",{className:"oc-md-img-fallback",hidden:!0,title:e??void 0,children:t?`[图片加载失败: ${t}]`:"[图片加载失败]"})]}):f.jsx("span",{className:"oc-md-img-fallback",title:e??void 0,children:t?`[图片: ${t}]`:"[图片已屏蔽]"})},table({children:e}){return f.jsx("div",{className:"oc-md-table-wrap",children:f.jsx("table",{children:e})})},input(e){return e.type==="checkbox"?f.jsx("input",{type:"checkbox",checked:!!e.checked,disabled:!0,readOnly:!0}):f.jsx("input",{...e,disabled:!0,readOnly:!0})}};class y_ extends k.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?f.jsx("div",{className:"oc-md",children:f.jsx("pre",{className:"oc-md-fallback",children:this.props.text})}):this.props.children}}function Nh({text:e}){try{return f.jsx(y_,{text:e,children:f.jsx("div",{className:"oc-md",children:f.jsx(DE,{remarkPlugins:h_,rehypePlugins:p_,components:v_,children:e})})})}catch{return f.jsx("div",{className:"oc-md",children:f.jsx("pre",{className:"oc-md-fallback",children:e})})}}function x_(e){return e.language==="md"||e.language==="markdown"}function w_(e){const t=e.previews.find(o=>o.path===e.activePath),n=t?x_(t):!1,[a,s]=k.useState(n?"preview":"source");return k.useEffect(()=>{s(n?"preview":"source")},[t?.path,n]),!t&&!e.loading?null:f.jsxs(f.Fragment,{children:[t&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"oc-file-preview-backdrop",onMouseDown:o=>{o.target===o.currentTarget&&e.onClose(t.path)}}),f.jsxs("section",{className:"oc-file-preview","aria-label":`文件预览 ${t.path}`,children:[f.jsxs("header",{children:[f.jsx("div",{className:"oc-file-tabs",role:"tablist","aria-label":"文件预览 Tabs",children:e.previews.map(o=>f.jsx("button",{type:"button",role:"tab","aria-selected":o.path===t.path,className:o.path===t.path?"is-active":"",onClick:()=>e.onActivate(o.path),children:o.path},o.path))}),n&&f.jsxs("div",{className:"oc-file-view-modes",role:"group","aria-label":"文件查看模式",children:[f.jsx("button",{type:"button",className:`oc-file-view-mode${a==="preview"?" is-active":""}`,"aria-pressed":a==="preview",onClick:()=>s("preview"),children:"预览"}),f.jsx("button",{type:"button",className:`oc-file-view-mode${a==="source"?" is-active":""}`,"aria-pressed":a==="source",onClick:()=>s("source"),children:"源文件"})]}),f.jsxs("span",{children:[t.bytes," bytes",t.truncated?" · 已截断":""]}),f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>e.onClose(t.path),children:"关闭预览"})]}),a==="preview"&&n?f.jsx("div",{className:"oc-file-preview-rendered",children:f.jsx(Nh,{text:t.content})}):f.jsx("pre",{children:f.jsx("code",{children:t.content})})]})]}),e.loading&&f.jsx("div",{className:"oc-file-preview-loading",children:"正在读取文件…"})]})}const l6=[{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"}],o6=[{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 Zy(e){const t=e.trim().split(/\s+/,1)[0]??"";return t?t.startsWith("/")?t.toLowerCase():`/${t.toLowerCase()}`:""}function Wy(e){const t=e.trim().split(/\s+/,1)[0]?.toLowerCase();if(!t?.startsWith("/"))return;const n=[...l6,...o6].find(a=>a.command===t);return n?{command:n.command,action:n.action}:{command:t,action:"unknown"}}function S_(e){if(e==="focus-panel:task"||e==="focus-panel:contract")return"tasks";if(e==="focus-panel:dag")return"recovery"}function k_(e=[]){const t=new Map,n=a=>{const s=Zy(a.command);if(!s)return;const o=t.get(s);if(!o){t.set(s,{...a,command:s});return}as[a.source]<as[o.source]&&t.set(s,{...a,command:s})};for(const a of l6)n({command:a.command,label:a.label,description:a.description,source:a.source,action:a.action});for(const a of o6)n({command:a.command,label:a.label,description:a.description,source:a.source,action:a.action});for(const a of e){const s=Zy(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 o=as[a.source]-as[s.source];return o!==0?o:a.command.localeCompare(s.command)})}function E_(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),o=[];for(const c of e){const d=c.command.toLowerCase(),m=d.startsWith("/")?d.slice(1):d,h=c.description.toLowerCase();let p=100;if(!s)p=10+as[c.source];else if(d===a||m===s)p=0;else if(d.startsWith(a)||m.startsWith(s))p=1;else if(m.includes(s)||d.includes(s))p=2;else if(h.includes(s))p=3;else continue;o.push({...c,score:p})}return o.sort((c,d)=>{if(c.score!==d.score)return c.score-d.score;const m=as[c.source]-as[d.source];return m!==0?m:c.command.localeCompare(d.command)})}const T_={operator:"Operator",web:"Pi Web",extension:"Extensions",prompt:"Prompts",skill:"Skills"},N_=new Set(["operatorCapabilities","operationList","operationGet","operationEventSummary","statsContext","sourceInstructions","spineCheck","inspect","observeLink"]);function C_(e){return N_.has(e)?"technical-only":e==="doctor"?"inline-detail":"activity-detail"}const R_={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:"任务状态"},A_={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:"统计上下文使用情况时遇到问题"}},__=[{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 c6(e){if(!(!e||typeof e!="object"))return e}function gp(e){if(e&&typeof e=="object")return e;if(typeof e=="string")try{return c6(JSON.parse(e))}catch{return}}function zm(e){const n=gp(e)?.operationId;return typeof n=="string"&&n?n:void 0}function I_(e){const n=gp(e)?.maxWaitMs;if(!(typeof n!="number"||!Number.isFinite(n)||n<=0))return Math.max(1,Math.round(n/1e3))}function u6(e){const t=e.operationId??zm(e.args)??zm(e.result)??zm(e.resultText);return t?`operation:${t}`:`tool:${e.id}`}function M_(e){return e==="running"?"progress":e==="error"?"error":"success"}function O_(e){return gp(e.resultText??e.result)}function D_(e){return Array.isArray(e.events)?e.events.flatMap(t=>{const n=c6(t);if(!n)return[];const a=n.messagePreview??n.message;return typeof a=="string"?[a]:[]}):[]}function j_(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]??"",x=m.match(/status=([^\s,]+)/i)?.[1]?.toUpperCase();let y="finished";x==="ERROR"||x==="FAILED"?y="error":p==="started"&&(y="running"),a.push({node:b,status:y})}const s=a.at(-1);if(!s)return;const o=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(o&&c)return{id:t,kind:"success",title:"代码与测试的影响范围已确认",activityRef:n};const d=__.find(m=>m.pattern.test(s.node));return d?s.status==="running"?{id:t,kind:"progress",title:d.running,activityRef:n}:s.status==="error"?{id:t,kind:"error",title:d.error,activityRef:n}:{id:t,kind:"success",title:d.finished,activityRef:n}:{id:t,kind:"success",title:"执行状态已经更新",activityRef:n}}function L_(e){const t=u6(e),n=`activity:${e.id}`,a=I_(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 o=O_(e),c=j_([s,...o?D_(o):[]],n,t);if(c)return c;if(o){if(o.timedOut===!0||o.changed===!1)return{id:n,kind:"warning",title:"等待期间没有新的执行进展",activityRef:t};if(o.changed===!0)return{id:n,kind:"success",title:"已经收到新的执行进展",activityRef:t}}return{id:n,kind:"success",title:"执行状态已经更新",activityRef:t}}function z_(e){const t=C_(e.toolName);if(t==="technical-only"||t==="inline-detail")return;if(e.toolName==="operationWait")return L_(e);const n=A_[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:M_(e.status),title:a,activityRef:u6(e)}}function d6(e){return R_[e]??"任务活动"}function bp(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 f6(e){return[e.activityRef??`operation:${e.operationId}`,`operation:${e.operationId}`,...e.toolCallId?[`tool:${e.toolCallId}`]:[]]}function m6(e){return[e.activityRef??`gate:${e.cardId}`]}function h6(e){return[e.activityRef??`artifact:${e.artifactId}`]}function B_(e){return new Set([...e.operations.flatMap(f6),...e.gates.flatMap(m6),...e.artifacts.flatMap(h6)])}function Qy(e){return e.updatedSeq??e.eventSeq}function Jy(e){const t=Date.parse(e.updatedAt);return Number.isFinite(t)?t:0}function vp(e,t){const n=Qy(e),a=Qy(t);return n!==void 0&&a!==void 0?n-a:Jy(e)-Jy(t)}function q_(e){return e.taskId?`task:${e.taskId}`:e.dagRunId?`run:${e.dagRunId}`:`operation:${e.operationId}`}function U_(e){return e.taskId?e.taskId.replace(/^\d{4}-\d{2}-\d{2}-/,"").replace(/[-_]+/g," ").trim()||e.taskId:d6(e.action)}function H_(e){return[...new Set(e)]}function F_(e){const t=new Map;for(const n of e)t.set(n.action,n);return[...t.values()].sort(vp).map(n=>{const a=bp(n.state);return{id:n.operationId,label:d6(n.action),stateLabel:a.label,kind:a.kind,at:n.updatedAt}})}function P_(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)=>vp(p,h)),o=s[0];if(!o)return[];const c=s.find(h=>h.runSummary)?.runSummary,d=c?.status??o.state,m=bp(d);return[{runId:n,state:d,stateLabel:m.label,kind:m.kind,updatedAt:o.updatedAt,operationCount:a.length,firstFailedNode:c?.nodes.find(h=>h.status==="ERROR")?.id,failureCategory:c?.failureCategory,inspectHref:o.inspectHref}]}).sort((n,a)=>Date.parse(a.updatedAt)-Date.parse(n.updatedAt))}function p6(e){const t=new Map;for(const n of e){const a=q_(n),s=t.get(a)??[];s.push(n),t.set(a,s)}return[...t.entries()].flatMap(([n,a])=>{const s=[...a].sort(vp),o=s.at(-1);if(!o)return[];const c=bp(o.state);return[{key:n,taskId:o.taskId,displayTitle:U_(o),state:o.state,stateLabel:c.label,kind:c.kind,updatedAt:o.updatedAt,latestOperation:o,operations:s,steps:F_(s),runs:P_(s),activityRefs:H_(s.flatMap(f6)),compactEligible:c.kind==="success"}]}).sort((n,a)=>{const s=n.kind==="progress"||n.kind==="error"?0:1,o=a.kind==="progress"||a.kind==="error"?0:1;return s!==o?s-o:Date.parse(a.updatedAt)-Date.parse(n.updatedAt)})}const $_={operation:"执行记录",contract:"任务契约",dag:"执行流程",report:"报告",html:"HTML 预览"};function G_(e){const{artifact:t}=e,n=!!(t.reportText||t.htmlPreview);return f.jsxs("section",{className:"oc-artifact-card","aria-label":`任务产物:${t.title??t.artifactId}`,"data-activity-ref":t.activityRef??`artifact:${t.artifactId}`,children:[f.jsxs("header",{children:[f.jsxs("div",{children:[f.jsx("small",{children:"任务产物"}),f.jsx("strong",{children:t.title??t.artifactId}),f.jsx("code",{children:t.artifactId})]}),f.jsx("span",{children:$_[t.kind]})]}),t.summary?f.jsx("p",{children:t.summary}):null,n?f.jsxs("details",{className:"oc-artifact-details",children:[f.jsx("summary",{children:"预览与技术详情"}),t.reportText?f.jsx("pre",{children:t.reportText}):null,t.htmlPreview?f.jsx("iframe",{title:`${t.title??t.artifactId} preview`,sandbox:"",srcDoc:t.htmlPreview}):null]}):null,t.inspectHref?f.jsx("footer",{children:f.jsx("button",{className:"btn btn-ghost",type:"button",onClick:()=>window.open(t.inspectHref,"_blank","noopener,noreferrer"),children:"打开产物"})}):null]})}const e2={prepared:"等待确认",confirmed:"已经确认",dispatched:"正在执行",consumed:"已经完成",stale:"已经失效",expired:"已经过期",error:"处理失败"};function t2(e){return e.gateType==="contract-apply"?"确认任务契约变更":e.gateType==="mutation"?"确认执行工作区修改":"确认启动任务执行"}function K_({card:e,origin:t,sessionId:n}){const[a,s]=k.useState(!1),[o,c]=k.useState(),d=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 x=e.gateType==="dag-run"?{confirmationId:e.confirmationId,...e.state==="prepared"?{humanGateToken:e.humanGateToken}:{}}:{receiptId:e.receiptId,humanGateToken:e.humanGateToken},y=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":er()},body:JSON.stringify(x)}),E=await y.json();if(!y.ok)throw new Error(E.error?.message??`HTTP ${y.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 f.jsxs("section",{className:`oc-human-gate-card is-${e.state}`,"aria-label":`${t2(e)}:${e2[e.state]}`,"data-activity-ref":e.activityRef??`gate:${e.cardId}`,children:[f.jsxs("header",{children:[f.jsxs("div",{children:[f.jsx("small",{children:"人工门禁"}),f.jsx("strong",{children:t2(e)}),f.jsx("code",{children:e.taskId})]}),f.jsx("span",{children:e2[e.state]})]}),e.contractDiffSummary?f.jsx("p",{className:"oc-human-gate-summary",children:e.contractDiffSummary}):null,p>0||e.errorMessage?f.jsxs("details",{className:"oc-human-gate-details",children:[f.jsxs("summary",{children:["门禁详情 · ",p," 项"]}),e.displayOnlyChallenges?.length?f.jsxs("div",{className:"oc-human-gate-challenges",children:[f.jsx("b",{children:"确认前请检查"}),f.jsx("ul",{children:e.displayOnlyChallenges.map(b=>f.jsx("li",{children:b},b))})]}):null,e.dagSpine?.length?f.jsxs("div",{children:[f.jsx("b",{children:"计划执行步骤"}),f.jsx("ol",{children:e.dagSpine.map(b=>f.jsx("li",{children:f.jsx("code",{children:b})},b))})]}):null,e.errorMessage?f.jsx("p",{className:"oc-human-gate-error",children:e.errorMessage}):null]}):null,f.jsxs("footer",{children:[f.jsx("button",{className:"btn btn-ghost",type:"button",onClick:()=>window.open(e.inspectHref,"_blank","noopener,noreferrer"),children:"查看记录"}),f.jsx("button",{className:"btn btn-primary",type:"button",disabled:!m||a,onClick:()=>{d()},children:a?"提交中…":h})]}),o?f.jsx("div",{className:"oc-human-gate-error",children:o}):null]})}const Yr="loop-console.operator-chat.active-session.v1",V_="loop-console.operator-chat.default-landing.v1";function Au(e){const t=e?.trim().toLowerCase();if(t==="chat")return"chat";if(t==="tasks")return"tasks"}function g6(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 v6(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):"",o=(a||"/").split("?")[0]||"/";if(o==="/"||o==="")return null;const c=o.replace(/^\//,"").split("/")[0],d=g6(c);return d?{workspace:d,...b6(new URLSearchParams(s))}:null}function Y_(e){const t=new URLSearchParams(e.search),n=e.hash.startsWith("#")?e.hash.slice(1):e.hash,a=new URLSearchParams(n),s=g6(t.get("workspace")??t.get("landing")??a.get("workspace"));return s?{workspace:s,...b6(t)}:null}function X_(e){if(!e)return;const t=v6(e.hash);if(t)return t.workspace;const n=new URLSearchParams(e.search),a=Au(n.get("landing")??n.get("workspace"));if(a)return a;const s=e.hash.startsWith("#")?e.hash.slice(1):e.hash;return Au(new URLSearchParams(s).get("workspace"))}function y6(e){return X_(e.location)??Au(e.storage?.getItem(V_))??Au(e.env)??"chat"}function x6(e,t={}){const n=new URLSearchParams;for(const[o,c]of Object.entries(t))c?.trim()&&n.set(o,c.trim());const a=n.toString(),s=`/${e}`;return a?`${s}?${a}`:s}function Z_(e,t={}){return`#${x6(e,t)}`}function W_(e){return v6(e.hash)??Y_(e)}function n2(e,t=900){if(e)return e.length>t?`${e.slice(0,t)}…`:e}function Bm(e){return new Date(e).toLocaleString()}function r2(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 Q_(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 o=r2(t.stderrPreview)??r2(t.summaryPreview);return o||(e.kind==="error"?"本次任务活动没有完成,可进入 DAG 查看详情或使用恢复选项。":"本次任务活动需要进一步确认,请查看相关记录。")}function J_(e){const{journey:t}=e,n=t.latestOperation,a=t.runs[0],s=t.runs.slice(1),o=n.inspectHref.startsWith("/")?`${e.origin}${n.inspectHref}`:n.inspectHref,c=Q_(t),d=t.kind==="error"||t.kind==="warning",m=(h,p)=>{e.onNavigateWorkspace?e.onNavigateWorkspace(h,p):window.location.assign(Z_(h,p))};return e.compact?f.jsxs("details",{className:"oc-journey-compact",children:[f.jsxs("summary",{children:[f.jsx("span",{className:`oc-journey-dot is-${t.kind}`,"aria-hidden":"true"}),f.jsxs("span",{children:[f.jsx("strong",{children:t.displayTitle}),f.jsxs("small",{children:[t.stateLabel," · ",Bm(t.updatedAt)]})]}),f.jsx("span",{"aria-hidden":"true",children:"›"})]}),f.jsxs("div",{className:"oc-journey-compact-body",children:[t.taskId?f.jsx("code",{children:t.taskId}):null,f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>window.open(o,"_blank","noopener,noreferrer"),children:"查看记录"})]})]}):f.jsxs("section",{className:`oc-task-journey-card is-${t.kind}`,"aria-label":`${t.displayTitle}:${t.stateLabel}`,children:[f.jsxs("header",{className:"oc-journey-head",children:[f.jsxs("div",{children:[f.jsxs("div",{className:"oc-journey-state-line",children:[f.jsx("span",{className:`oc-journey-dot is-${t.kind}`,"aria-hidden":"true"}),f.jsx("span",{children:t.stateLabel})]}),f.jsx("strong",{children:t.displayTitle}),t.taskId?f.jsxs("small",{children:["Task · ",f.jsx("code",{children:t.taskId})]}):null]}),f.jsx("time",{dateTime:t.updatedAt,children:Bm(t.updatedAt)})]}),f.jsx("div",{className:"oc-journey-steps","aria-label":"任务旅程",children:t.steps.slice(-6).map(h=>f.jsxs("div",{className:"oc-journey-step",children:[f.jsx("span",{className:`oc-journey-step-icon is-${h.kind}`,"aria-hidden":"true",children:h.kind==="success"?"✓":h.kind==="error"?"!":"•"}),f.jsx("span",{children:h.label}),f.jsx("small",{children:h.stateLabel})]},h.id))}),c?f.jsxs("div",{className:`oc-journey-outcome is-${t.kind}`,children:[f.jsx("strong",{children:d?"当前问题":"最新结果"}),f.jsx("p",{children:c})]}):null,a?f.jsxs("div",{className:"oc-journey-latest-run",children:[f.jsx("span",{children:"最新执行"}),f.jsx("code",{children:a.runId}),f.jsx("b",{className:`is-${a.kind}`,children:a.stateLabel}),a.firstFailedNode?f.jsxs("small",{children:["失败阶段 · ",a.firstFailedNode]}):null]}):null,s.length>0?f.jsxs("details",{className:"oc-journey-history",children:[f.jsxs("summary",{children:["执行历史 ",t.runs.length," 次"]}),f.jsx("div",{children:t.runs.map(h=>f.jsxs("div",{className:"oc-journey-run-row",children:[f.jsx("code",{children:h.runId}),f.jsx("span",{className:`is-${h.kind}`,children:h.stateLabel}),h.firstFailedNode?f.jsx("small",{children:h.firstFailedNode}):null,f.jsx("time",{dateTime:h.updatedAt,children:Bm(h.updatedAt)})]},h.runId))})]}):null,f.jsxs("footer",{className:"oc-journey-actions",children:[f.jsx("button",{className:"btn btn-ghost",type:"button",onClick:()=>{const h=n.dagRunId??a?.runId,p=h?n.inspectHref.startsWith("/")?`${e.origin}/inspect/#/dag/${encodeURIComponent(h)}`:`/inspect/#/dag/${encodeURIComponent(h)}`:o;window.open(p,"_blank","noopener,noreferrer")},children:"进入 DAG"}),d&&(t.taskId||n.dagRunId)?f.jsx("button",{className:"btn btn-primary",type:"button",onClick:()=>m("recovery",{taskId:t.taskId,dagRunId:n.dagRunId}),children:"恢复选项"}):null]}),f.jsxs("details",{className:"oc-journey-technical",children:[f.jsxs("summary",{children:["技术详情 · ",t.operations.length," 项活动"]}),f.jsx("div",{className:"oc-journey-technical-body",children:t.operations.map(h=>f.jsxs("div",{className:"oc-journey-operation-row",children:[f.jsxs("div",{children:[f.jsx("code",{children:h.operationId}),f.jsx("span",{children:h.action})]}),h.dagRunId?f.jsxs("small",{children:["run · ",h.dagRunId]}):null,h.controller?f.jsxs("small",{children:["controller · ",h.controller]}):null,h.stderrPreview?f.jsx("pre",{className:"is-error",children:n2(h.stderrPreview)}):null,h.summaryPreview?f.jsx("pre",{children:n2(h.summaryPreview)}):null]},h.operationId))})]})]})}function a2(e){return e.state==="prepared"||e.state==="confirmed"?0:e.state==="dispatched"?1:e.state==="error"?2:3}function qm(e,t){return e!==null&&t.includes(e)}function eI(e){return e.operations>0?"operations":e.gates>0?"gates":"artifacts"}function tI(e){const t=e.presentation==="sidecar",n=t||e.open,a=k.useRef(null),[s,o]=k.useState("operations"),c=k.useMemo(()=>p6(e.operationCards),[e.operationCards]),d=c.length+e.humanGateCards.length+e.artifactCards.length,m=k.useMemo(()=>[...e.humanGateCards].sort((y,E)=>{const N=a2(y)-a2(E);return N!==0?N:(E.eventSeq??0)-(y.eventSeq??0)}),[e.humanGateCards]),h=k.useMemo(()=>[...e.artifactCards].sort((y,E)=>(E.eventSeq??0)-(y.eventSeq??0)),[e.artifactCards]);if(Uu({open:n&&!t,containerRef:a,triggerRef:e.triggerRef,onEscape:e.onClose}),k.useEffect(()=>{o(eI({operations:c.length,gates:e.humanGateCards.length,artifacts:e.artifactCards.length}))},[e.sessionId]),k.useEffect(()=>{e.focusRef&&(e.focusRef.startsWith("gate:")?o("gates"):e.focusRef.startsWith("artifact:")?o("artifacts"):o("operations"))},[e.focusRef]),k.useEffect(()=>{if(!n||!e.focusRef)return;const y=window.requestAnimationFrame(()=>{const E=a.current;if(!E)return;Array.from(E.querySelectorAll("[data-activity-ref], [data-tool-call-id], [data-activity-refs]")).find(C=>{const I=C.dataset.activityRefs?.split(" ")??[];return C.dataset.activityRef===e.focusRef||I.includes(e.focusRef??"")||C.dataset.toolCallId&&`tool:${C.dataset.toolCallId}`===e.focusRef})?.scrollIntoView({block:"nearest",behavior:"smooth"})});return()=>window.cancelAnimationFrame(y)},[n,s,e.focusRef]),!n||d===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,x=f.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:[f.jsxs("header",{className:"oc-activity-rail-head",children:[f.jsxs("div",{children:[f.jsx("strong",{children:"本次对话的活动"}),f.jsx("small",{children:"运行、门禁与任务产物"})]}),f.jsx("span",{className:"oc-activity-count",children:d}),t?null:f.jsx("button",{type:"button",className:"oc-activity-close","aria-label":"关闭运行活动",onClick:e.onClose,children:"×"})]}),f.jsxs("div",{className:"oc-activity-content",children:[f.jsxs("div",{className:"oc-activity-tabs",role:"tablist","aria-label":"活动类型",children:[f.jsxs("button",{type:"button",role:"tab","aria-selected":s==="operations",className:s==="operations"?"is-active":"",onClick:()=>o("operations"),children:["运行 ",f.jsx("span",{children:c.length})]}),f.jsxs("button",{type:"button",role:"tab","aria-selected":s==="gates",className:s==="gates"?"is-active":"",onClick:()=>o("gates"),children:["门禁 ",f.jsx("span",{children:m.length})]}),f.jsxs("button",{type:"button",role:"tab","aria-selected":s==="artifacts",className:s==="artifacts"?"is-active":"",onClick:()=>o("artifacts"),children:["产物 ",f.jsx("span",{children:h.length})]})]}),f.jsxs("div",{className:"oc-activity-list",children:[s==="operations"&&c.length===0?f.jsx("div",{className:"oc-activity-empty",children:"本次对话还没有任务执行记录。"}):null,s==="operations"?c.map((y,E)=>{const N=y.activityRefs;return f.jsxs("div",{"data-activity-refs":N.join(" "),className:`oc-activity-card-wrap${qm(e.focusRef,N)?" is-focused":""}`,children:[f.jsx(J_,{journey:y,compact:E>0&&y.compactEligible,origin:e.origin,onNavigateWorkspace:e.onNavigateWorkspace}),f.jsx("button",{type:"button",className:"oc-activity-locate",onClick:()=>e.onLocateConversation(N),children:"查看对话位置"})]},y.key)}):null,s==="gates"&&m.length===0?f.jsx("div",{className:"oc-activity-empty",children:"本次对话还没有需要展示的门禁。"}):null,s==="gates"?m.map(y=>{const E=m6(y);return f.jsx("div",{className:`oc-activity-card-wrap${qm(e.focusRef,E)?" is-focused":""}`,children:f.jsx(K_,{card:y,origin:e.origin,sessionId:e.sessionId})},y.cardId)}):null,s==="artifacts"&&h.length===0?f.jsx("div",{className:"oc-activity-empty",children:"本次对话还没有任务产物。"}):null,s==="artifacts"?h.map(y=>{const E=h6(y);return f.jsx("div",{className:`oc-activity-card-wrap${qm(e.focusRef,E)?" is-focused":""}`,children:f.jsx(G_,{artifact:y})},y.artifactId)}):null]})]},e.sessionId)]});return t?zu.createPortal(x,document.body):x}const w6=420,S6=12;function nI(e){if(e.layoutMode==="narrow")return"sheet";const t=e.railWidth??w6,n=e.gap??S6;return e.viewportWidth-e.mainRight>=t+n?"sidecar":"drawer"}const rI={presentation:"drawer",sidecarRect:null};function aI(e,t,n){const[a,s]=k.useState(rI);return k.useLayoutEffect(()=>{const o=e.current;if(!o)return;const c=o.closest(".panel--chat")??o;let d=0;const m=()=>{window.cancelAnimationFrame(d),d=window.requestAnimationFrame(()=>{const p=o.getBoundingClientRect(),b=c.getBoundingClientRect(),x=nI({layoutMode:t,viewportWidth:window.innerWidth,mainRight:p.right}),y=x==="sidecar"?{top:b.top,left:p.right+S6,height:b.height,width:w6}:null;s(E=>E.presentation===x&&E.sidecarRect?.top===y?.top&&E.sidecarRect?.left===y?.left&&E.sidecarRect?.height===y?.height&&E.sidecarRect?.width===y?.width?E:{presentation:x,sidecarRect:y})})};m();const h=new ResizeObserver(m);return h.observe(o),c!==o&&h.observe(c),window.addEventListener("resize",m),()=>{window.cancelAnimationFrame(d),h.disconnect(),window.removeEventListener("resize",m)}},[t,e,n]),a}const i2={comfortableMin:620,compactMin:480};function iI(e){return!Number.isFinite(e)||e<0?"extra-compact":e>=i2.comfortableMin?"comfortable":e>=i2.compactMin?"compact":"extra-compact"}function sI(e){return`is-landing-${e}`}const lI=[{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(`
|
|
308
|
+
`)},{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 k6(e){const t=e.readiness==="setup-required",n=!!e.disabled||t,a=e.density??"comfortable",s=e.mode==="no-session"?"开始一段新的对话":"今天想推进什么?",o=e.mode==="no-session"?"用自然语言编排 loop-agent:查询状态、诊断问题、创建与恢复任务。可先点选下方建议,或新建空白对话。":"会话已就绪。点选建议快速开场,或在下方输入框直接描述目标。业务写入仍经受治理 DAG。";return f.jsxs("div",{className:`oc-empty ${sI(a)}`,role:"status","data-landing-density":a,children:[f.jsxs("div",{className:"oc-empty-hero",children:[f.jsx("img",{className:"oc-empty-icon oc-empty-brand",src:"/favicon.svg",alt:"","aria-hidden":"true",draggable:!1}),f.jsxs("div",{className:"oc-empty-copy",children:[f.jsx("h3",{children:s}),f.jsx("p",{children:o})]})]}),f.jsx("div",{className:"oc-suggestions","aria-label":"开场建议",children:lI.map(c=>f.jsxs("button",{type:"button",className:"oc-suggestion",onClick:()=>e.onSuggest(c.prompt),disabled:n,children:[f.jsx("strong",{children:c.label}),f.jsx("span",{children:a==="extra-compact"?c.hint.replace(/[,,].*$/,""):c.hint})]},c.label))}),f.jsxs("ul",{className:"oc-empty-tips",children:[f.jsxs("li",{children:[f.jsx("kbd",{children:"@"}),f.jsx("span",{children:"引用仓库文件"})]}),f.jsxs("li",{children:[f.jsx("kbd",{children:"/"}),f.jsx("span",{children:"快捷命令"})]}),f.jsxs("li",{children:[f.jsx("kbd",{children:"Enter"}),f.jsx("span",{children:"发送 · Shift+Enter 换行"})]})]}),e.mode==="no-session"&&e.onCreateSession?f.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 oI(e){const{interview:t,interviewAnswer:n,onAnswerChange:a,onAnswer:s}=e;return f.jsxs("section",{className:"oc-draft-card","aria-label":"Requirement Interview",children:[f.jsxs("header",{children:[f.jsx("strong",{children:"Requirement Interview"}),f.jsx("span",{children:t.state})]}),t.question&&f.jsxs("div",{className:"oc-interview-bubble",children:[f.jsx("strong",{children:t.question.text}),f.jsxs("p",{children:["建议:",t.question.recommendation]}),f.jsx("textarea",{value:n,onChange:o=>a(o.target.value),placeholder:"输入答案"}),f.jsxs("div",{children:[f.jsx("button",{className:"btn btn-primary",type:"button",onClick:()=>s("override"),disabled:!n.trim(),children:"提交答案"}),f.jsx("button",{className:"btn btn-ghost",type:"button",onClick:()=>s("accept-recommendation"),children:"接受建议"})]})]}),t.draft&&f.jsxs("details",{open:!0,children:[f.jsxs("summary",{children:["TaskContractDraftV1 · ",t.draftSha256?.slice(0,12)]}),f.jsx("pre",{children:JSON.stringify(t.draft,null,2)})]}),t.assessment&&f.jsxs("div",{className:`oc-assessment${t.assessment.fresh?" is-fresh":""}`,children:[f.jsxs("strong",{children:["完整性:",t.assessment.outcome]}),(t.assessment.missingFields??[]).length>0&&f.jsxs("p",{children:["缺失:",t.assessment.missingFields?.join("、")]})]}),t.taskKindRecommendation&&f.jsxs("div",{className:"oc-task-kind-card",children:[f.jsx("span",{children:"taskKind 建议"}),f.jsx("strong",{children:t.taskKindRecommendation}),f.jsx("button",{className:"btn btn-primary",type:"button",onClick:()=>e.onConfirmTaskKind(),children:"由我确认"}),f.jsx("small",{children:"模型不能代替人类确认。"})]}),t.confirmedTaskKind&&f.jsxs("div",{className:"oc-task-kind-card is-confirmed",children:["已由人类确认:",f.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 cI(e){const t=[],n=e.inputTokens??0,a=e.outputTokens??0,s=e.cacheReadTokens??0,o=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`),o>0&&t.push(`${Or(o)} cache W`),c>0&&t.push(c>=.01?`$${c.toFixed(2)}`:"<$0.01"),t.length===0){const d=e.totalTokens??0;return d>0?`${Or(d)} tokens`:"—"}return t.join(" · ")}function uI(){return f.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:[f.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),f.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function dI(){return f.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:f.jsx("polyline",{points:"20 6 9 17 4 12"})})}function fI(){return f.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:[f.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),f.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})}function mI(){return f.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})})}function yp(){return f.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:f.jsx("polyline",{points:"4 2.5 7.5 6 4 9.5"})})}function hI(){return f.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:f.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 Ch(e){const[t,n]=k.useState(!1),a=()=>{navigator.clipboard?.writeText(e.text).then(()=>{n(!0),window.setTimeout(()=>n(!1),1600)},()=>{})};return f.jsx("button",{type:"button",className:`oc-message-copy${t?" is-copied":""}`,"aria-label":t?"已复制":"复制消息",title:t?"已复制":"复制",onClick:a,children:t?f.jsx(dI,{}):f.jsx(uI,{})})}function s2(e){const{message:t,streaming:n,activeAssistantId:a}=e;if(t.kind==="compaction")return f.jsxs("div",{className:"oc-compaction-card",role:"status",children:[f.jsx("span",{className:"oc-compaction-icon","aria-hidden":"true",children:f.jsx(y8,{size:16})}),f.jsxs("div",{className:"oc-compaction-body",children:[f.jsxs("div",{className:"oc-compaction-heading",children:[f.jsx("strong",{children:"上下文已压缩"}),f.jsx("span",{children:Gm(t.createdAt)}),t.compaction?.tokensBefore?f.jsxs("span",{children:["压缩前 ",Or(t.compaction.tokensBefore)," tokens"]}):null]}),f.jsx("div",{className:"oc-compaction-summary",children:f.jsx(Nh,{text:t.text})})]})]});const s=t.role==="user",o=s?"你":"助手",c=!s&&n&&a!==null&&t.id===a,d=c&&t.text.length===0,m=t.text.trim().length>0;return f.jsxs("div",{className:`oc-row ${s?"is-user":"is-assistant"}`,children:[f.jsxs("div",{className:"oc-meta",children:[!s&&f.jsx("span",{className:"oc-role oc-role-assistant","aria-hidden":"true",children:"π"}),f.jsxs("span",{className:"oc-time",children:[Gm(t.createdAt),f.jsxs("span",{className:"sr-only",children:["(",o,")"]})]}),m&&f.jsx(Ch,{text:t.text})]}),f.jsxs("div",{className:`oc-bubble ${s?"oc-bubble-user":"oc-bubble-assistant"}`,children:[m?s?f.jsx("div",{style:{whiteSpace:"pre-wrap"},children:t.text}):f.jsx(Nh,{text:t.text}):d?f.jsx("span",{className:"oc-cursor","aria-hidden":"true"}):null,c&&m&&f.jsx("span",{className:"oc-cursor","aria-hidden":"true"})]})]})}function pI(e){if(!(!e||typeof e!="object"))return e}function ki(e){return typeof e=="string"?e:void 0}function xp(e){if(!Array.isArray(e))return;const t=[];for(const n of e){const a=pI(n);if(!a)continue;const s=ki(a.type)??"";if(s==="thinking"||s==="reasoning"){const o=ki(a.thinking)??ki(a.text)??"";t.push({type:"thinking",thinking:o});continue}if(s==="toolCall"||s==="tool_call"||s==="toolUse"||s==="tool_use"){const o=ki(a.toolCallId)??ki(a.id)??"";if(!o)continue;const c=ki(a.toolName)??ki(a.name);t.push({type:"toolCall",toolCallId:o,...c?{toolName:c}:{}});continue}if(s==="text"||s==="output_text"||s===""){const o=ki(a.text);o!==void 0&&t.push({type:"text",text:o})}}return t}function gI(e,t={}){return e.type==="thinking"&&!t.isStreaming&&e.thinking.trim()===""}function E6(e,t={}){return e.filter(n=>!gI(n,t))}function bI(e){return e.type==="text"}function vI(e,t={}){const n=E6(e,t);let a=-1;for(let s=n.length-1;s>=0;s--)if(!bI(n[s])){a=s;break}return a===-1?{answerBlocks:n,processBlocks:[]}:{answerBlocks:n.slice(a+1),processBlocks:n.slice(0,a+1)}}function yI(e){return e.filter(t=>t.type==="text").map(t=>t.text).join("")}function xI(e){return{key:e,assistants:[],tools:[],processItems:[],live:!1}}function T6(e){const t=[],n=[];let a,s=[];const o=c=>{for(const d of s)d.assistantMessageId||(d.assistantMessageId=c),d.turnId||(d.turnId=a);s=[]};for(const c of e){const d=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:d});continue}if(c.role==="assistant"){a||(a=`restored-${c.id}`);const m=xp(c.content);t.push({id:c.id,role:"assistant",text:c.text,createdAt:d,...m&&m.length>0?{content:m}:{}}),o(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:d,finishedAt:d,turnId:a,...c.operationId?{operationId:c.operationId}:{}};n.push(m),s.push(m)}}return{messages:t,toolCalls:n}}function wI(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 yo(e,t){if(t.length===0)return;const n=wI(t);for(const a of n){const s=z_(a);s?e.push({kind:"activity",activity:s}):e.push({kind:"tool",tool:a})}}function l2(e,t,n,a){let s=[];for(const o of e){if(o.type==="thinking"){yo(n,s),s=[],n.push({kind:"thinking",thinking:o.thinking});continue}if(o.type==="text"){yo(n,s),s=[],o.text.trim()&&n.push({kind:"text",text:o.text});continue}const c=t.tools.find(d=>d.id===o.toolCallId);c&&!a.has(c.id)&&(s.push(c),a.add(c.id))}yo(n,s)}function o2(e,t,n,a){const s=e.tools.filter(o=>!a.has(o.id)&&o.assistantMessageId===t.id);if(s.length!==0){for(const o of s)a.add(o.id);yo(n,s)}}function SI(e){const t=new Set,n=[],a=e.assistants.slice(0,-1),s=e.assistants.at(-1);for(const h of a)l2(E6(h.content??[]),e,n,t),o2(e,h,n,t);const o=s?.content??[],c=vI(o,{isStreaming:e.live});l2(c.processBlocks,e,n,t),s&&o2(e,s,n,t);const d=e.tools.filter(h=>!t.has(h.id));if(d.length>0&&yo(n,d),e.processItems=n,!s)return;if(o.length===0){e.answer=s;return}const m=yI(c.answerBlocks);e.answer={...s,text:m,content:c.answerBlocks}}function kI(e){const t=e.messages.filter(d=>d.role==="user"||d.role==="assistant"),n=[];let a=null;const s=d=>{const m=xI(d);return n.push(m),m};for(const d of t){if(d.role==="user"){a=s(`user-${d.id}`),a.user=d;continue}if(d.kind==="compaction"){a=s(`compaction-${d.id}`),a.assistants.push(d),a=null;continue}a||(a=s(`assistant-${d.id}`)),a.assistants.push(d)}const o=new Set,c=new Map;for(const d of n)for(const m of d.assistants)c.set(m.id,d);for(const d of e.toolCalls)if(d.assistantMessageId){const m=c.get(d.assistantMessageId);m&&(m.tools.push(d),o.add(d.id))}for(const d of e.toolCalls)if(!o.has(d.id)&&d.turnId){const m=n.find(p=>p.tools.some(b=>b.turnId===d.turnId)||p.key===`turn-${d.turnId}`||p.user&&`restored-${p.user.id}`===d.turnId);if(m){m.tools.push(d),o.add(d.id);continue}const h=n.find(p=>d.turnId===`restored-${p.user?.id}`||p.assistants.some(b=>d.turnId===`restored-${b.id}`));h&&(h.tools.push(d),o.add(d.id))}for(const d of e.toolCalls){if(o.has(d.id))continue;const m=n.find((h,p)=>{const b=h.user?.createdAt??h.assistants[0]?.createdAt??0,y=n[p+1]?.user?.createdAt??Number.POSITIVE_INFINITY;return d.createdAt>=b&&d.createdAt<y});m&&(m.tools.push(d),o.add(d.id))}for(const d of n)d.tools.sort((m,h)=>m.eventSeq!==void 0&&h.eventSeq!==void 0?m.eventSeq-h.eventSeq:m.createdAt-h.createdAt),d.live=e.streaming&&e.activeAssistantId!==null&&d.assistants.some(m=>m.id===e.activeAssistantId),SI(d);return n}function EI(e,t){return t<=0?[]:e.length<=t?[...e]:e.slice(-t)}function TI(e,t){const n=e.length,a=t?.thinkingCount??0,s=t?.textCount??0,o=t?.activityCount??0,c=a+s+o+n,d=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} 工具`),o>0&&h.push(`${o} 进展`),d>0?h.push(`${d} 出错`):m>0&&h.push("运行中"),{count:n,errorCount:d,runningCount:m,stepCount:c,label:h.join(" · ")}}function NI(e){const t=[];let n=0,a=0,s=0,o=0,c=0;for(const d of e)d.kind==="thinking"?n+=1:d.kind==="text"?a+=1:d.kind==="activity"?(s+=1,d.activity.kind==="error"?o+=1:d.activity.kind==="progress"&&(c+=1)):t.push(d.tool);return TI(t,{thinkingCount:n,textCount:a,activityCount:s,activityErrorCount:o,activityRunningCount:c})}function N6(e){const{entry:t}=e,[n,a]=k.useState(t.status==="error"),[s,o]=k.useState(!1),c=t.status==="running"?"运行中":t.status==="error"?"出错":"完成",d=`is-${t.status}`,m=T8(t.args,{toolName:t.toolName}),h=A8(t.createdAt,t.finishedAt),p=N8(t.toolName),b=I2(t.resultText??t.result),x=R8(b,s?{maxLen:Number.MAX_SAFE_INTEGER}:void 0);return f.jsxs("div",{className:`oc-tool ${t.status==="error"?"is-error":""} ${t.status==="running"?"is-running":""}`,children:[f.jsxs("button",{type:"button",className:"oc-tool-head","aria-expanded":n,onClick:()=>a(y=>!y),children:[f.jsx(yp,{}),f.jsx("span",{className:"oc-tool-icon","aria-hidden":"true",children:f.jsx(hI,{})}),f.jsx("span",{className:"oc-tool-name",children:t.toolName}),m&&f.jsx("span",{className:"oc-tool-args",children:m}),h!==void 0&&f.jsxs("span",{className:"oc-tool-duration",children:[h,"s"]}),f.jsx("span",{className:`oc-tool-status ${d}`,children:c})]}),n&&f.jsxs("div",{className:"oc-tool-body",children:[t.args!==void 0&&f.jsxs("div",{className:"oc-tool-section",children:[f.jsx("div",{className:"oc-tool-label",children:p.argsLabel}),f.jsx("pre",{className:"oc-tool-code",children:C8(t.args)})]}),(t.resultText!==void 0||t.result!==void 0)&&f.jsxs("div",{className:"oc-tool-section",children:[f.jsx("div",{className:"oc-tool-label",children:t.status==="error"?"错误":p.resultLabel}),f.jsx("pre",{className:"oc-tool-code",children:x.text}),x.truncated&&!s&&f.jsx("button",{type:"button",className:"btn btn-ghost oc-tool-expand-result",onClick:()=>o(!0),children:"展开全部"})]}),t.status==="running"&&t.resultText===void 0&&t.result===void 0&&t.args===void 0&&f.jsx("div",{className:"oc-tool-section",children:f.jsx("div",{className:"oc-tool-waiting",children:"等待结果…"})})]})]})}function CI(e){const{thinking:t,defaultOpen:n}=e,[a,s]=k.useState(n);return k.useEffect(()=>{s(n)},[n]),f.jsxs("div",{className:"oc-thinking",children:[f.jsxs("button",{type:"button",className:`oc-thinking-summary${a?" is-open":""}`,"aria-expanded":a,onClick:()=>s(o=>!o),children:[f.jsx(yp,{}),f.jsx("span",{children:"思考"})]}),a?f.jsx("pre",{className:"oc-thinking-body",children:t||"…"}):null]})}function RI(e){return e.kind==="progress"?"••":e.kind==="success"?"✓":e.kind==="warning"?"!":"×"}function AI(e){const{activity:t,onActivate:n}=e,a=!!(t.activityRef&&n&&(e.canActivate?.(t.activityRef)??!0)),s=f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"oc-semantic-activity-icon","aria-hidden":"true",children:RI(t)}),f.jsxs("span",{className:"oc-semantic-activity-copy",children:[f.jsx("strong",{children:t.title}),t.detail?f.jsx("small",{children:t.detail}):null]}),a?f.jsx("span",{className:"oc-semantic-activity-link",children:"查看详情"}):null]});if(a&&t.activityRef&&n){const o=t.activityRef;return f.jsx("button",{type:"button",className:`oc-semantic-activity is-${t.kind}`,"data-activity-ref":o,onClick:()=>n(o),children:s})}return f.jsx("div",{className:`oc-semantic-activity is-${t.kind}`,"data-activity-ref":t.activityRef,children:s})}function _I(e){const{items:t,live:n}=e,[a,s]=k.useState(!1);k.useEffect(()=>{n||s(!1)},[n]);const o=NI(t),c=f.jsx("div",{className:"oc-process-inline-body",children:t.map((d,m)=>{if(d.kind==="thinking")return f.jsx(CI,{thinking:d.thinking,defaultOpen:n},`thinking-${m}`);if(d.kind==="text")return f.jsx("div",{className:"oc-process-text",children:d.text},`text-${m}`);if(d.kind==="activity")return f.jsx(AI,{activity:d.activity,onActivate:e.onActivateActivity,canActivate:e.canActivateActivity},d.activity.id);if(d.kind==="tool")return f.jsx(N6,{entry:d.tool},d.tool.id)})});return n?f.jsx("div",{className:"oc-process-inline is-live",children:c}):f.jsxs("div",{className:"oc-process-inline",children:[f.jsxs("button",{type:"button",className:`oc-process-inline-summary${a?" is-open":""}${o.errorCount>0?" is-error":o.runningCount>0?" is-running":""}`,"aria-expanded":a,onClick:()=>s(d=>!d),children:[f.jsx(yp,{}),f.jsx("span",{children:o.label})]}),a?c:null]})}function II(e){const{scrollContainerRef:t,messagesEndRef:n,onScroll:a,hasThread:s,readiness:o,streaming:c,streamingAssistantId:d,messagesCount:m,visibleCount:h,onLoadMore:p,turnGroups:b,interview:x}=e;return f.jsxs("div",{ref:t,className:`oc-messages${s?" has-thread":" is-empty"}`,onScroll:a,children:[s?null:f.jsx(k6,{mode:"empty-session",readiness:o,disabled:c,onSuggest:e.onSuggest}),s&&m>h&&f.jsx("button",{type:"button",className:"btn btn-ghost oc-load-history",onClick:p,children:"加载更早消息"}),s&&b.map((y,E)=>{const N=y.user??y.assistants[0],R=E>0?b[E-1].user??b[E-1].assistants[0]:void 0,C=!!N&&(!R||bf(R.createdAt)!==bf(N.createdAt)),I=y.answer,O=!!I?.text.trim(),X=y.live&&y.processItems.length===0;return f.jsxs("div",{className:"oc-turn-group",children:[C&&N&&f.jsx("div",{className:"oc-day-sep",children:bf(N.createdAt)}),y.user&&f.jsx(s2,{message:y.user,streaming:c,activeAssistantId:d}),y.processItems.length>0&&f.jsx(_I,{items:y.processItems,live:y.live,onActivateActivity:e.onActivateActivity,canActivateActivity:e.canActivateActivity}),I&&(O||X)?f.jsx(s2,{message:I,streaming:c,activeAssistantId:d}):null]},y.key)}),x&&f.jsx(oI,{interview:x,interviewAnswer:e.interviewAnswer,onAnswerChange:e.onInterviewAnswerChange,onAnswer:e.onAnswerInterview,onConfirmTaskKind:e.onConfirmTaskKind}),f.jsx("div",{ref:n})]})}const MI={auto:"auto(跟随 Pi 默认等级)",off:"off · 关闭",minimal:"minimal · 极简",low:"low · 低",medium:"medium · 中",high:"high · 高",xhigh:"xhigh · 极高",max:"max · 最高"};function C6(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 o=a.get(s.provider)??[];o.push(s),a.set(s.provider,o)}return[...a.entries()].map(([s,o])=>({provider:s,models:o}))}function OI(e,t){const n=new Set,a=[],s=o=>{n.has(o)||(n.add(o),a.push({value:o,label:MI[o]??o,...o==="auto"&&t?{effective:t}:{}}))};s("auto");for(const o of e)s(o);return a}function No(e,t){return`${e}/${t}`}function Rh(e){return{...e.modelProvider&&e.modelId?{model:{provider:e.modelProvider,modelId:e.modelId}}:{},...e.thinkingLevel?{thinkingLevel:e.thinkingLevel}:{}}}function R6(e,t){return{...e,model:t.model??e.model,thinkingLevel:t.thinkingLevel??e.thinkingLevel}}function DI(e,t){const n=R6(e,t);return n.model?.provider===e.model?.provider&&n.model?.modelId===e.model?.modelId&&n.thinkingLevel===e.thinkingLevel}function jI(){return f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",children:f.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 LI(e){const t=il(),[n,a]=k.useState(!1),[s,o]=k.useState(""),[c,d]=k.useState(0),m=k.useRef(null),h=k.useRef(null),p=t.snapshot,b=t.status==="loading",x=t.status==="error"?t.error:null,y=p?(p.models??[]).map(I=>({provider:I.provider,id:I.id,...I.name?{name:I.name}:{},...I.hasCredentials!==void 0?{hasCredentials:I.hasCredentials}:{}})):e.models,E=k.useMemo(()=>C6(y,s),[y,s]),N=k.useMemo(()=>E.flatMap(I=>I.models),[E]);k.useEffect(()=>{n&&(o(""),d(0),window.setTimeout(()=>h.current?.focus(),0))},[n]),k.useEffect(()=>{if(!n)return;const I=X=>{const q=m.current;q&&X.target instanceof Node&&!q.contains(X.target)&&a(!1)},O=X=>{X.key==="Escape"&&a(!1)};return document.addEventListener("mousedown",I),document.addEventListener("keydown",O),()=>{document.removeEventListener("mousedown",I),document.removeEventListener("keydown",O)}},[n]);const R=I=>{if(e.disabled)return;const O=N[I];O&&(a(!1),e.onSelect(O.provider,O.id))},C=I=>{if(I.key==="ArrowDown"){I.preventDefault(),d(O=>N.length?(O+1)%N.length:0);return}if(I.key==="ArrowUp"){I.preventDefault(),d(O=>N.length?(O-1+N.length)%N.length:0);return}if(I.key==="Enter"){I.preventDefault(),R(c);return}if(I.key==="Escape"){I.preventDefault(),a(!1);return}};return f.jsxs("div",{className:"oc-select-menu oc-model-menu",ref:m,children:[f.jsxs("button",{type:"button",className:"oc-select-trigger","aria-haspopup":"listbox","aria-expanded":n,title:"选择模型",disabled:e.disabled,onClick:()=>a(I=>!I),children:[f.jsx("span",{className:"oc-select-trigger-label",children:e.triggerLabel}),f.jsx(jI,{})]}),n&&f.jsxs("div",{className:"oc-select-panel oc-model-panel",role:"listbox","aria-label":"选择模型",children:[f.jsx("input",{ref:h,className:"oc-select-search",placeholder:"搜索模型或 Provider…",value:s,onChange:I=>{o(I.target.value),d(0)},onKeyDown:C}),b&&f.jsx("div",{className:"oc-select-status",children:"模型列表加载中…"}),x&&f.jsxs("div",{className:"oc-select-status is-error",children:[f.jsxs("span",{children:[x.code?`${x.code}:`:"",x.message]}),f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>{el()},children:"重试"})]}),!b&&!x&&E.length===0&&f.jsx("div",{className:"oc-select-status",children:"当前没有可用模型(真实空态,未伪造列表)"}),E.map(I=>f.jsxs("div",{className:"oc-model-group",children:[f.jsx("div",{className:"oc-model-group-head",children:I.provider}),I.models.map(O=>{const X=No(O.provider,O.id),q=X===e.activeModelRef,A=N[c]===O;return f.jsxs("button",{type:"button",role:"option","aria-selected":q,disabled:e.disabled,className:`oc-select-option oc-model-option${A?" is-highlighted":""}${q?" is-active":""}`,onMouseDown:F=>F.preventDefault(),onClick:()=>{e.disabled||(a(!1),e.onSelect(O.provider,O.id))},children:[f.jsxs("span",{className:"oc-model-option-name",children:[O.name?`${O.name} · `:"",O.id]}),q&&f.jsx("span",{className:"oc-model-option-check",children:"✓"})]},X)})]},I.provider))]})]})}function zI(){return f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",children:f.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 BI(e){const t=il(),[n,a]=k.useState(!1),[s,o]=k.useState(0),c=k.useRef(null),d=e.effectiveLevel??t.snapshot?.selection?.effectiveThinkingLevel,m=t.snapshot?.thinkingLevels?.length?t.snapshot.thinkingLevels.map(x=>x.value):void 0,h=k.useMemo(()=>OI(m??e.levels,d),[m,e.levels,d]);k.useEffect(()=>{n&&o(0)},[n]),k.useEffect(()=>{if(!n)return;const x=E=>{const N=c.current;N&&E.target instanceof Node&&!N.contains(E.target)&&a(!1)},y=E=>{E.key==="Escape"&&a(!1)};return document.addEventListener("mousedown",x),document.addEventListener("keydown",y),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",y)}},[n]);const p=x=>{if(e.disabled)return;const y=h[x];y&&(a(!1),e.onSelect(y.value))},b=x=>{if(x.key==="ArrowDown"){x.preventDefault(),o(y=>h.length?(y+1)%h.length:0);return}if(x.key==="ArrowUp"){x.preventDefault(),o(y=>h.length?(y-1+h.length)%h.length:0);return}if(x.key==="Enter"){x.preventDefault(),p(s);return}if(x.key==="Escape"){x.preventDefault(),a(!1);return}};return f.jsxs("div",{className:"oc-select-menu oc-thinking-menu",ref:c,children:[f.jsxs("button",{type:"button",className:"oc-select-trigger","aria-haspopup":"listbox","aria-expanded":n,title:"思考等级",disabled:e.disabled,onClick:()=>a(x=>!x),children:[f.jsx("span",{className:"oc-select-trigger-label",children:e.triggerLabel}),f.jsx(zI,{})]}),n&&f.jsx("div",{className:"oc-select-panel oc-thinking-panel",role:"listbox","aria-label":"思考等级",onKeyDown:b,children:h.map((x,y)=>{const E=x.value===e.activeValue,N=y===s;return f.jsxs("button",{type:"button",role:"option","aria-selected":E,disabled:e.disabled,className:`oc-select-option oc-thinking-option${N?" is-highlighted":""}${E?" is-active":""}`,onMouseDown:R=>R.preventDefault(),onClick:()=>{e.disabled||(a(!1),e.onSelect(x.value))},children:[f.jsx("span",{className:"oc-thinking-option-label",children:x.label}),x.value==="auto"&&x.effective?f.jsxs("span",{className:"oc-thinking-badge",children:["Pi 实际:",x.effective]}):null,E&&f.jsx("span",{className:"oc-model-option-check",children:"✓"})]},x.value)})})]})}const Um="--oc-shortcut-palette-available-height",qI=8,UI=8;function HI(e){const t=e.viewportTop??0,n=e.topInset??qI,a=e.anchorGap??UI;if([e.boundaryTop,e.anchorTop,t,n,a].some(c=>!Number.isFinite(c)))return null;const o=Math.max(e.boundaryTop,t);return Math.max(0,Math.floor(e.anchorTop-o-n-a))}function FI(){return f.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:[f.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),f.jsx("circle",{cx:"8.5",cy:"10",r:"1.5"}),f.jsx("path",{d:"m21 16-5.5-5.5L9 17"})]})}function PI(e){const{composer:t,streaming:n,turnPhase:a,deferredTurn:s,hasThread:o}=e,c=k.useRef(null),d=il(),m=d.reloading,h=d.reloadError,b=d.mutationBusy||m||a!=="idle",x=s?"textPreview"in s?s.textPreview:s.text:"",y=s?"imageCount"in s?s.imageCount:s.images.length:0,E=s?.state==="dispatching"?"正在确认发送":s?.state==="accepted"?"已进入发送":s?.state==="failed"?"发送失败":"等待上一轮停止后发送",N=k.useCallback(()=>{t.setInput(""),t.setShortcutOpen(!1),Js()},[t.setInput,t.setShortcutOpen]),R=k.useCallback(A=>{const F=t.isComposingNow()||A.nativeEvent.isComposing,J=t.recentlyComposedNow();if(A.key==="Enter"&&!A.shiftKey&&!F&&!J&&(!n||a==="stopping")){if(t.shortcutOpen&&t.filteredShortcuts.length>0){if((t.filteredShortcuts[t.shortcutIndex]??t.filteredShortcuts[0])?.command==="/reload"){A.preventDefault(),N();return}}else if(t.input.trim()==="/reload"){A.preventDefault(),N();return}}e.onKeyDown(A)},[t.isComposingNow,t.recentlyComposedNow,t.shortcutOpen,t.filteredShortcuts,t.shortcutIndex,t.input,N,n,a,e.onKeyDown]),C=k.useCallback((A,F)=>{if(F==="pi-prompt"||A==="/name"||A==="/compact"){t.setInput(`${A} `),t.setShortcutOpen(!1),t.textareaRef.current?.focus();return}if(A==="/reload"){N();return}e.onRunShortcut(A)},[N,e.onRunShortcut,t]),I=k.useCallback(()=>{if(t.input.trim()==="/reload"){N();return}e.onSend(t.input)},[t.input,N,e.onSend]);k.useEffect(()=>{if(!t.shortcutOpen||t.filteredShortcuts.length===0||!e.paletteKeyboardNavRef.current)return;const A=e.shortcutPaletteRef.current;if(!A)return;A.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]),k.useEffect(()=>{if(!t.shortcutOpen||t.filteredShortcuts.length===0)return;const A=c.current,F=e.shortcutPaletteRef.current,J=A?.closest(".oc-main")??null;if(!A||!F||!J)return;let W=0;const z=()=>{W=0;const te=J.getBoundingClientRect(),G=A.getBoundingClientRect(),K=HI({boundaryTop:te.top,anchorTop:G.top,viewportTop:window.visualViewport?.offsetTop??0});if(K===null){F.style.removeProperty(Um);return}F.style.setProperty(Um,`${K}px`)},U=()=>{W!==0&&window.cancelAnimationFrame(W),W=window.requestAnimationFrame(z)};z();const H=typeof ResizeObserver>"u"?null:new ResizeObserver(U);return H?.observe(J),H?.observe(A),window.addEventListener("resize",U),window.visualViewport?.addEventListener("resize",U),window.visualViewport?.addEventListener("scroll",U),()=>{W!==0&&window.cancelAnimationFrame(W),H?.disconnect(),window.removeEventListener("resize",U),window.visualViewport?.removeEventListener("resize",U),window.visualViewport?.removeEventListener("scroll",U),F.style.removeProperty(Um)}},[t.shortcutOpen,t.filteredShortcuts.length,e.layoutMode,e.shortcutPaletteRef]);const O=(()=>{const A=e.processSummary;return A?A.statusKind==="error"?`查看工具调用记录,共 ${A.count} 次,其中 ${A.statusLabel}`:A.statusKind==="running"?`查看工具调用记录,共 ${A.count} 次,${A.statusLabel||"正在运行"}`:`查看工具调用记录,共 ${A.count} 次,全部已完成`:"查看工具调用记录"})(),X=(()=>{const A=e.usage.inputTokens,F=e.usage.outputTokens,J=e.usage.cacheReadTokens,W=e.usage.cacheWriteTokens,z=e.usage.cost??0,U=e.usage.contextUsage,H=[];if(U&&(U.percent!==null||U.tokens!==null)){const te=U.percent!==null?`${Math.round(U.percent*10)/10}%`:"—",G=U.contextWindow>0?Or(U.contextWindow):"—",K=U.tokens!==null?Or(U.tokens):"—";H.push(f.jsxs("span",{className:`oc-usage-part is-context${U.percent!==null&&U.percent>=80?" is-high":""}`,title:`上下文占用 ${K} / ${G} tokens(达到约 80% 时建议压缩上下文)`,children:["上下文 ",te," / ",G]},"context"))}if(A>0&&H.push(f.jsxs("span",{className:"oc-usage-part is-in",title:"输入 tokens",children:["↑ ",Or(A)]},"in")),F>0&&H.push(f.jsxs("span",{className:"oc-usage-part is-out",title:"输出 tokens",children:["↓ ",Or(F)]},"out")),J>0&&H.push(f.jsxs("span",{className:"oc-usage-part",title:"缓存命中:这部分输入由提供商 prompt 缓存复用,计费约为原价的 10%",children:[f.jsx(gv,{size:12,"aria-hidden":"true"}),"缓存命中 ",Or(J)]},"cache-read")),W>0&&H.push(f.jsxs("span",{className:"oc-usage-part",title:"缓存写入:本次新建立 prompt 缓存的部分,下次请求可低价复用",children:[f.jsx(gv,{size:12,"aria-hidden":"true"}),"缓存写入 ",Or(W)]},"cache-write")),z>0&&H.push(f.jsx("span",{className:"oc-usage-part",children:z>=.01?`$${z.toFixed(2)}`:"<$0.01"},"cost")),H.length===0){const te=e.usage.totalTokens;te>0&&H.push(f.jsxs("span",{className:"oc-usage-part",children:[Or(te)," tokens"]},"total"))}return H})(),q=f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"oc-runtime-controls-group",children:[f.jsx(LI,{models:e.models,activeModelRef:e.activeModelRef,triggerLabel:e.activeModelRef||"选择模型",disabled:b,onSelect:(A,F)=>e.onSwitchRuntime({provider:A,modelId:F})}),f.jsx(BI,{levels:e.thinkingLevels,activeValue:e.activeThinkingLevel||"auto",triggerLabel:e.activeThinkingLevel||"auto",disabled:b,onSelect:A=>e.onSwitchRuntime({thinkingLevel:A})}),f.jsxs("span",{className:"oc-usage",title:cI(e.usage),children:[f.jsx("span",{className:"oc-usage-state",children:a==="stopping"?"正在停止":a==="running"?"运行中":"空闲"}),e.unread>0?f.jsxs("span",{className:"oc-usage-unread",children:[e.unread," 未读"]}):null,X]}),e.processSummary&&f.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":O,title:O,onClick:e.onToggleProcess,children:[f.jsx("span",{className:"oc-process-summary-label",children:"调用记录"}),f.jsx("span",{className:"oc-process-summary-badge",children:e.processSummary.count}),e.processSummary.statusKind!=="ok"&&e.processSummary.statusLabel?f.jsx("span",{className:"oc-process-summary-status",children:e.processSummary.statusLabel}):null]})]}),f.jsxs("div",{className:"oc-runtime-controls-group is-right",children:[f.jsxs("button",{type:"button",className:"btn btn-ghost",onClick:e.onCompact,disabled:a!=="idle"||!o||e.compacting,title:e.compacting?"正在压缩上下文…":o?a!=="idle"?"生成中,暂不可压缩":"压缩上下文,释放 token":"先进行对话后再压缩上下文","aria-label":e.compacting?"正在压缩上下文…":o?a!=="idle"?"生成中,暂不可压缩":"压缩上下文,释放 token":"先进行对话后再压缩上下文",children:[e.compacting?f.jsx("span",{className:"oc-spinner oc-spinner-inline","aria-hidden":"true"}):null,e.compacting?"压缩中…":"压缩"]}),e.runtimeContext?f.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 f.jsx("div",{className:"oc-composer",children:f.jsxs("div",{className:"oc-composer-inner",ref:c,children:[t.fileOptions.length>0&&f.jsx("div",{className:"oc-file-palette",role:"listbox","aria-label":"Repository files",children:t.fileOptions.map(A=>f.jsx("button",{type:"button",role:"option",className:A.endsWith("/")?"is-dir":void 0,onMouseDown:F=>F.preventDefault(),onClick:()=>t.insertFileReference(A),children:f.jsxs("code",{children:["@",A]})},A))}),t.pendingImages.length>0&&f.jsx("div",{className:"oc-attachment-list",children:t.pendingImages.map(A=>f.jsxs("span",{children:[A.name,f.jsx("button",{type:"button","aria-label":`移除 ${A.name}`,onClick:()=>t.removeImage(A),children:"×"})]},A.name))}),f.jsxs("div",{className:"oc-composer-toolbar",children:[f.jsxs("label",{className:"oc-attach-button oc-attach-icon",title:"添加图片","aria-label":"添加图片",children:[f.jsx(FI,{}),f.jsx("span",{className:"sr-only",children:"添加图片"}),f.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:A=>{t.addImagesFromFiles(Array.from(A.target.files??[]).slice(0,4)),A.target.value=""}})]}),f.jsxs("span",{className:"oc-composer-hint",children:[f.jsx("span",{className:"oc-kbd",children:"Enter"})," 发送"]}),f.jsxs("span",{className:"oc-composer-hint",children:[f.jsx("span",{className:"oc-kbd",children:"Shift"}),"+",f.jsx("span",{className:"oc-kbd",children:"Enter"})," 换行"]}),m&&f.jsx("span",{className:"oc-reload-status",children:"正在重新加载会话…"})]}),t.shortcutOpen&&t.filteredShortcuts.length>0&&f.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:[f.jsxs("div",{className:"oc-shortcut-palette-head",children:[f.jsxs("strong",{children:["命令 · ",t.filteredShortcuts.length]}),t.dynamicCommandsLoading?f.jsx("span",{className:"oc-shortcut-palette-meta",children:"正在加载扩展、提示词与技能…"}):null,t.dynamicCommandsError?f.jsxs("span",{className:"oc-shortcut-palette-meta is-error",children:[t.dynamicCommandsError,f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>t.retryDynamicCommands(),children:"重试"})]}):null]}),f.jsx("div",{className:"oc-shortcut-palette-body",children:e.paletteModel.map(A=>f.jsxs("div",{className:"oc-shortcut-group",children:[f.jsxs("small",{children:[A.label," · ",A.items.length]}),A.items.map(({entry:F,globalIndex:J})=>f.jsxs("button",{type:"button",role:"option",id:`oc-shortcut-option-${J}`,"aria-label":F.command,"aria-describedby":`oc-shortcut-option-desc-${J}`,"aria-selected":J===t.shortcutIndex,className:J===t.shortcutIndex?"is-active":"","data-shortcut-index":J,title:F.command,onMouseEnter:()=>t.setShortcutIndex(J),onMouseDown:W=>W.preventDefault(),onClick:W=>{W.currentTarget.scrollIntoView({block:"nearest"}),C(F.command,F.action)},children:[f.jsx("code",{children:F.command}),f.jsx("small",{id:`oc-shortcut-option-desc-${J}`,children:F.description})]},`${F.source}:${F.command}`))]},A.source))})," "]}),s?f.jsxs("div",{className:`oc-deferred-turn is-${s.state}`,role:"status",children:[f.jsxs("div",{children:[f.jsx("strong",{children:E}),f.jsx("span",{children:x||(y>0?`${y} 张图片`:"待发送消息")})]}),s.state==="queued"||s.state==="failed"?f.jsx("button",{type:"button",onClick:e.onCancelDeferred,children:"移回输入框"}):null]}):null,f.jsxs("div",{className:`oc-composer-shell${a!=="idle"?" is-busy":""}`,children:[f.jsx("textarea",{ref:t.textareaRef,className:"oc-textarea",value:t.input,rows:3,placeholder:a==="stopping"?"上一轮正在停止…输入后可排队自动发送":n?"正在生成回复…可先输入下一轮内容,停止后发送(Enter 暂不发送)":o?"输入消息… Enter 发送 · Shift+Enter 换行":"描述目标,或点选上方建议开始…",onChange:A=>t.handleInputChange(A.target.value),onKeyDown:R,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"?f.jsxs("button",{type:"button",className:"oc-stop",title:"对话进行中,点击停止","aria-label":"对话进行中,点击停止",onClick:e.onStop,children:[f.jsx("span",{className:"oc-spinner","aria-hidden":"true"}),f.jsx(mI,{})]}):f.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:f.jsx(fI,{})})]}),h&&f.jsxs("div",{className:"oc-reload-banner is-error",role:"alert",children:[f.jsxs("span",{children:[h.code?`${h.code}:`:"",h.message]}),f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>{Js()},children:"重试"})]}),f.jsx("div",{className:"oc-runtime-controls",children:q})]})})}function $I(e){const{toolCalls:t,onClose:n,overlay:a=!1}=e,s=k.useRef(null);return Uu({open:a,containerRef:s,triggerRef:e.triggerRef,onEscape:n}),f.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:[f.jsxs("header",{className:"oc-process-head",children:[f.jsxs("div",{className:"oc-process-title",children:[f.jsx("span",{className:"oc-process-title-mark","aria-hidden":"true"}),"工具调用记录",f.jsxs("span",{className:"oc-process-count",children:[t.length," 次"]})]}),f.jsx("button",{type:"button",className:"btn btn-ghost oc-process-close","aria-label":"关闭工具调用记录",onClick:n,children:"关闭"})]}),f.jsx("div",{className:"oc-process-timeline",children:t.length===0?f.jsx("div",{className:"oc-process-empty",children:"本轮对话尚无工具调用。诊断细节会在这里按时间线展示。"}):t.map((o,c)=>f.jsxs("div",{className:`oc-process-item${c===0?" is-first":""}${c===t.length-1?" is-last":""}${o.status==="error"?" is-error":""}${o.status==="running"?" is-running":""}`,children:[f.jsx("div",{className:"oc-process-rail","aria-hidden":"true",children:f.jsx("span",{className:"oc-process-dot"})}),f.jsx("div",{className:"oc-process-time",children:Gm(o.createdAt)}),f.jsx("div",{className:"oc-process-body",children:f.jsx(N6,{entry:o})})]},o.id))})]})}const c2=[{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 cu(e){const t=Array.isArray(e.items)?e.items:void 0;return f.jsxs("section",{className:"oc-runtime-context-section",children:[f.jsxs("header",{className:"oc-runtime-context-section-head",children:[f.jsx("strong",{children:e.title}),f.jsx("span",{className:"oc-runtime-context-meta",children:t?`${t.length} 项`:"未投影"})]}),t===void 0?f.jsx("p",{className:"oc-runtime-context-empty",children:"该 session 未提供资源投影"}):t.length===0?f.jsx("p",{className:"oc-runtime-context-empty",children:e.emptyText}):f.jsx("ul",{className:"oc-runtime-context-resources",children:t.map((n,a)=>f.jsx(GI,{item:n},`${n.name??n.path??a}:${a}`))})]})}function GI(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 f.jsxs("li",{children:[f.jsxs("div",{className:"oc-runtime-context-resource-head",children:[f.jsx("strong",{className:"oc-runtime-context-resource-name",title:t.path??t.name,children:t.name||t.path||"未命名资源"}),t.enabled===!1?f.jsx("span",{className:"oc-runtime-context-resource-flag",children:"未启用"}):null,a?f.jsx("span",{className:"oc-runtime-context-meta",title:a,children:a}):null]}),t.description?f.jsx("span",{className:"oc-runtime-context-resource-desc",children:t.description}):null,t.path?f.jsx("code",{className:"oc-runtime-context-resource-path",title:s,children:s}):null,t.error?f.jsxs("span",{className:"oc-runtime-context-diag is-error",children:[f.jsx("span",{className:"oc-runtime-context-diag-icon","aria-hidden":"true",children:"✕"}),t.error]}):null,Array.isArray(t.diagnostics)&&t.diagnostics.length>0?f.jsxs("span",{className:"oc-runtime-context-diag",children:[f.jsx("span",{className:"oc-runtime-context-diag-icon","aria-hidden":"true",children:"⚠"}),t.diagnostics.join(";")]}):null,Array.isArray(t.resolved)&&t.resolved.length>0?f.jsxs("details",{className:"oc-runtime-context-resolved",children:[f.jsxs("summary",{children:["已解析 ",t.resolved.length," 项"]}),f.jsx("ul",{className:"oc-runtime-context-resolved-list",children:t.resolved.map((o,c)=>{const d=`${o.type??"?"}:${o.name??o.path??"?"}`;return f.jsx("li",{children:f.jsx("code",{title:d,children:d})},c)})})]}):null]})}const KI=k.forwardRef(function({open:t,onToggle:n,onClose:a,context:s,panelOnly:o=!1,triggerOnly:c=!1,triggerRef:d},m){const h=il(),p=h.reloading,b=h.reloadError,[x,y]=k.useState("overview"),E=k.useRef(null);Uu({open:t&&!c,containerRef:E,triggerRef:d,onEscape:a}),k.useEffect(()=>{t||y("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??"",I=s.systemPrompt.charCount??C.length,O=s.suffix.present?s.suffix.text??s.suffix.summary??"":"",X=s.model?No(s.model.provider,s.model.modelId):"",q=s.resources,A=String(s.resources.mode??"closed"),F=A.includes("open")?"open":"closed",J={files:q.contextFiles?.length??0,skills:q.skills?.length??0,extensions:q.extensions?.length??0,packages:q.packages?.length??0},W=["files","skills","extensions","packages"].map(H=>({id:H,label:c2.find(te=>te.id===H)?.label??H,count:J[H]??0})),z=f.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 z;const U=t?f.jsxs("div",{ref:E,id:"oc-runtime-context-panel",className:"oc-runtime-context-sidepanel",role:"dialog","aria-modal":"true","aria-label":"注入上下文",tabIndex:-1,children:[f.jsxs("header",{className:"oc-runtime-context-head",children:[f.jsxs("div",{className:"oc-runtime-context-head-copy",children:[f.jsx("strong",{children:"注入上下文"}),f.jsx("span",{className:"oc-runtime-context-meta",children:"只读 · 本轮实际注入的 system prompt / 资源(已脱敏)"})]}),f.jsx("button",{type:"button",className:"btn btn-ghost oc-runtime-context-close","aria-label":"关闭注入上下文",onClick:a,children:"关闭"})]}),f.jsxs("div",{className:"oc-runtime-context-layout",children:[f.jsx("nav",{className:"oc-runtime-context-nav","aria-label":"上下文分类",children:c2.map(H=>{const te=J[H.id];return f.jsxs("button",{type:"button",className:`oc-runtime-context-nav-item${x===H.id?" is-active":""}`,"aria-current":x===H.id?"page":void 0,onClick:()=>y(H.id),children:[f.jsx("span",{className:"oc-runtime-context-nav-label",title:H.label,children:H.label}),typeof te=="number"?f.jsx("span",{className:"oc-runtime-context-nav-count",children:te}):null]},H.id)})}),f.jsxs("div",{className:"oc-runtime-context-body",children:[x==="overview"?f.jsxs("div",{className:"oc-runtime-context-overview",children:[s.model?f.jsxs("section",{className:"oc-runtime-context-model-card",children:[f.jsx("span",{className:"oc-runtime-context-model-label",children:"模型"}),f.jsx("code",{className:"oc-runtime-context-model-ref",title:X,children:X})]}):null,f.jsxs("div",{className:"oc-runtime-context-stat-grid",children:[f.jsxs("div",{className:"oc-runtime-context-stat",children:[f.jsx("span",{className:"oc-runtime-context-stat-label",children:"Prompt 字数"}),f.jsxs("strong",{className:"oc-runtime-context-stat-value",children:[I.toLocaleString()," 字"]})]}),f.jsxs("div",{className:"oc-runtime-context-stat",children:[f.jsx("span",{className:"oc-runtime-context-stat-label",children:"工具"}),f.jsx("strong",{className:"oc-runtime-context-stat-value",children:R})]}),f.jsxs("div",{className:"oc-runtime-context-stat",children:[f.jsx("span",{className:"oc-runtime-context-stat-label",children:"思考"}),f.jsx("strong",{className:"oc-runtime-context-stat-value",children:s.thinkingLevel??"—"})]}),f.jsxs("div",{className:"oc-runtime-context-stat",children:[f.jsx("span",{className:"oc-runtime-context-stat-label",children:"资源面"}),f.jsxs("strong",{className:`oc-runtime-context-stat-value oc-runtime-context-mode is-${F}`,title:A,children:[f.jsx("span",{className:"oc-runtime-context-mode-dot","aria-hidden":"true"}),A]})]})]}),f.jsxs("section",{className:"oc-runtime-context-section",children:[f.jsx("header",{className:"oc-runtime-context-section-head",children:f.jsx("strong",{children:"已加载资源"})}),f.jsx("div",{className:"oc-runtime-context-resource-links",children:W.map(H=>f.jsxs("button",{type:"button",className:"oc-runtime-context-resource-link",onClick:()=>y(H.id),children:[f.jsx("span",{className:"oc-runtime-context-resource-label",children:H.label}),f.jsx("span",{className:`oc-runtime-context-resource-count${H.count===0?" is-zero":""}`,children:H.count}),f.jsx("span",{className:"oc-runtime-context-resource-chevron","aria-hidden":"true",children:"›"})]},H.id))})]})]}):null,x==="system"?f.jsxs(f.Fragment,{children:[f.jsxs("section",{className:"oc-runtime-context-section",children:[f.jsxs("header",{className:"oc-runtime-context-section-head",children:[f.jsxs("div",{children:[f.jsx("strong",{children:"System prompt"}),f.jsxs("code",{className:"oc-runtime-context-hash",children:[s.systemPrompt.hash.slice(0,12),"…"]})]}),C?f.jsx(Ch,{text:C}):null]}),f.jsx("pre",{className:"oc-runtime-context-text",children:C||"(空)"})]}),f.jsxs("section",{className:"oc-runtime-context-section",children:[f.jsxs("header",{className:"oc-runtime-context-section-head",children:[f.jsxs("div",{className:"oc-runtime-context-section-title",children:[f.jsx("strong",{children:"Session suffix"}),f.jsx("span",{className:"oc-runtime-context-meta",children:s.suffix.present?`${(s.suffix.charCount??0).toLocaleString()} 字`:"未注入"})]}),O?f.jsx(Ch,{text:O}):null]}),s.suffix.present?f.jsx("pre",{className:"oc-runtime-context-text",children:O||"已注入"}):f.jsx("p",{className:"oc-runtime-context-empty",children:"本会话无额外 suffix"})]})]}):null,x==="files"?f.jsx(cu,{title:"Context files",items:q.contextFiles?.map(H=>({name:H.path,description:`${H.characters.toLocaleString()} 字符`})),emptyText:"该 session 未加载任何上下文文件"}):null,x==="skills"?f.jsx(cu,{title:"Skills",items:q.skills,emptyText:"该 session 未加载任何 Skills"}):null,x==="extensions"?f.jsx(cu,{title:"Extensions",items:q.extensions,emptyText:"该 session 未加载任何 Extensions"}):null,x==="packages"?f.jsx(cu,{title:"Plugins",items:q.packages,emptyText:"该会话没有插件"}):null,x==="tools"?f.jsxs("section",{className:"oc-runtime-context-section",children:[f.jsxs("header",{className:"oc-runtime-context-section-head",children:[f.jsx("strong",{children:"Active tools"}),f.jsxs("span",{className:"oc-runtime-context-meta",children:[R," 项"]})]}),N.length===0?f.jsx("p",{className:"oc-runtime-context-empty",children:"无激活工具"}):f.jsx("ul",{className:"oc-runtime-context-tools",children:N.map(H=>f.jsx("li",{children:f.jsx("code",{children:H})},H))}),Array.isArray(q.diagnostics)&&q.diagnostics.length>0?f.jsx("ul",{className:"oc-runtime-context-resources",children:q.diagnostics.map((H,te)=>f.jsxs("li",{children:[f.jsxs("span",{className:`oc-runtime-context-diag is-${H.type??"warning"}`,children:[H.type,": ",H.message]}),H.path?f.jsx("code",{children:H.path}):null]},te))}):null]}):null,x==="raw"?f.jsxs("details",{className:"oc-runtime-context-raw",open:!0,children:[f.jsx("summary",{children:"原始投影 JSON"}),f.jsx("pre",{children:JSON.stringify(s,null,2)})]}):null]},x)]}),f.jsxs("footer",{className:"oc-runtime-context-foot",children:[f.jsx("span",{className:"oc-runtime-context-meta",children:p?"正在重新加载会话…":"重新加载 Pi 会话设置、扩展、技能、提示词与上下文文件"}),f.jsx("button",{type:"button",className:"btn btn-ghost",disabled:p,onClick:()=>{Js()},children:"重新加载会话"}),b&&f.jsxs("span",{className:"oc-runtime-context-diag is-error",role:"alert",children:[b.code?`${b.code}:`:"",b.message,f.jsx("button",{type:"button",className:"btn btn-ghost",onClick:()=>{Js()},children:"重试"})]})]})]}):null;return o?U:f.jsxs("div",{className:"oc-runtime-context-menu",children:[z,U]})});function VI(){const e=k.useRef(null),t=k.useRef(!1),n=k.useRef(null),a=k.useRef(new Map),s=k.useRef(new Set),o=k.useRef(null),c=k.useRef(null),d=k.useRef(0),m=k.useRef(null),h=k.useRef(new Set),p=k.useRef(new Set),b=k.useRef(new Map),x=k.useRef(new Set),y=k.useRef(null),E=k.useRef(null),N=k.useRef(!1),R=k.useRef(0),C=k.useRef(null),I=k.useRef(!1),O=k.useRef(!1),X=k.useRef(null),q=k.useRef(new Set),A=k.useRef(new Set),F=k.useRef(new Set),J=k.useRef(!1),W=k.useRef(0);return k.useMemo(()=>({sessionRef:e,streamingRef:t,abortRef:n,sessionAbortControllersRef:a,inlineStreamSessionIdsRef:s,assistantIdRef:o,lastEventIdRef:c,sessionGenerationRef:d,eventsStreamStateRef:m,settledTurnIdsRef:h,seenEventIdsRef:p,turnAssistantIdsRef:b,sealedAssistantIdsRef:x,reconnectAbortRef:y,activeTurnIdRef:E,submitInFlightRef:N,submitGenerationRef:R,pendingSubmissionRef:C,stopInFlightRef:I,stopRequestedRef:O,stoppingTurnIdRef:X,abortPostedTurnIdsRef:q,releasedClientRequestIdsRef:A,usageResponseKeysRef:F,isComposingRef:J,compositionEndedAtRef:W}),[e,t,n,a,s,o,c,d,m,h,p,b,x,y,E,N,R,C,I,O,X,q,A,F,J,W])}const YI=["operation","contract","dag","report","html"];function XI(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"||!YI.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 ZI(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 WI(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 QI(e,t){const n=e.findIndex(o=>o.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 JI(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 o=a.eventSeq;return o===void 0?o=t.eventSeq:t.eventSeq!==void 0&&(o=Math.min(o,t.eventSeq)),{...a,...t,...o===void 0?{}:{eventSeq:o},updatedSeq:Math.max(a.updatedSeq??a.eventSeq??0,t.updatedSeq??t.eventSeq??0),toolCallId:a.toolCallId??t.toolCallId,activityRef:a.activityRef??t.activityRef}})}function eM(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=tM(n.runSummary),{runSummary:s,...o}=n;return{...o,...a?{runSummary:a}:{}}}function tM(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(o=>{if(!o||typeof o!="object")return[];const c=String(o.id??""),d=String(o.status??"");return!c||!d?[]:[{id:c,status:d}]}).slice(0,20));let a;if(t.next&&typeof t.next=="object"){const o=t.next;a={kind:String(o.kind??""),...typeof o.description=="string"?{description:o.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 nM(e){const{refs:t,onReconcile:n,setError:a,setInterview:s,setHumanGateCards:o,setArtifactCards:c,setStreaming:d,setTurnPhase:m=()=>{},setDeferredTurn:h=()=>{},setStreamingAssistantId:p,setUnread:b,setOperationCards:x,setUsage:y,setMessages:E,setToolCalls:N}=e;return(R,C,I,O)=>{if(O?.generation!==void 0&&t.sessionGenerationRef.current!==O.generation)return;const X=O?.replay===!0;if(R==="stream_ready")return;if(R==="reconcile"){const U={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)&&(U.latestEventId=C.latestEventId),n?.(U);return}const q=C.data&&typeof C.data=="object"?C.data:C,A=typeof C.turnId=="string"?C.turnId:void 0,F=typeof C.seq=="number"&&Number.isFinite(C.seq)?C.seq:void 0,J=typeof C.at=="string"&&Number.isFinite(Date.parse(C.at))?Date.parse(C.at):Date.now();if(R==="queue_update"){const z=typeof q.revision=="number"?q.revision:-1;h(U=>U&&z<U.revision?U:q.deferredTurn&&typeof q.deferredTurn=="object"?q.deferredTurn:null);return}if(R==="user_message"){const z=q.message&&typeof q.message=="object"?q.message:null;if(z&&typeof z.id=="string"&&typeof z.text=="string"){const U=typeof z.at=="string"&&Number.isFinite(Date.parse(z.at))?Date.parse(z.at):Date.now();E(H=>H.some(te=>te.id===z.id)?H:[...H,{id:z.id,role:"user",text:z.text,createdAt:U}])}return}if(A&&(R==="agent_start"||R==="message_update")&&t.settledTurnIdsRef.current.has(A))return;let W=I;if(A){const z=t.turnAssistantIdsRef.current.get(A);z?W=z:t.turnAssistantIdsRef.current.set(A,I)}if(R==="interview-turn"){s(z=>({...z??{},interviewSessionId:typeof q.interviewSessionId=="string"?q.interviewSessionId:z?.interviewSessionId,taskId:typeof q.taskId=="string"?q.taskId:z?.taskId,state:typeof q.state=="string"?q.state:z?.state,question:q.question&&typeof q.question=="object"?q.question:void 0}));return}if(R==="draft"){s(z=>({...z??{},taskId:typeof q.taskId=="string"?q.taskId:z?.taskId,draft:q.draft&&typeof q.draft=="object"?q.draft:z?.draft,draftSha256:typeof q.draftSha256=="string"?q.draftSha256:z?.draftSha256,taskKindRecommendation:typeof q.taskKindRecommendation=="string"?q.taskKindRecommendation:z?.taskKindRecommendation}));return}if(R==="assessment"){s(z=>({...z??{},assessment:q}));return}if(R==="taskKind-confirmed"){s(z=>({...z??{},confirmedTaskKind:typeof q.taskKind=="string"?q.taskKind:z?.confirmedTaskKind,taskKindRecommendation:void 0}));return}if(R==="human-gate-card"){const z=WI(q);z&&o(U=>QI(U,{...z,...F===void 0?{}:{eventSeq:F},...A?{turnId:A}:{},activityRef:`gate:${z.cardId}`}));return}if(R==="artifact-ref"){const z=XI(q);z&&c(U=>ZI(U,{...z,...F===void 0?{}:{eventSeq:F},...A?{turnId:A}:{},activityRef:`artifact:${z.artifactId}`}));return}if(R==="agent_start"){if(X&&A!==void 0&&A!==t.activeTurnIdRef.current)return;A&&(t.settledTurnIdsRef.current.delete(A),t.activeTurnIdRef.current=A),t.streamingRef.current=!0,d(!0),m("running"),p(W);return}if(R==="agent_settled"||R==="agent_end"){if(A&&t.settledTurnIdsRef.current.add(A),R==="agent_end")return;A===t.activeTurnIdRef.current&&(t.activeTurnIdRef.current=null),t.streamingRef.current=!1,d(!1),m("idle"),p(null),R==="agent_settled"&&!X&&typeof document<"u"&&document.hidden&&b(U=>U+1);let z=!1;N(U=>(z=U.some(H=>H.assistantMessageId===W),U.map(H=>H.status==="running"&&(A!==void 0&&H.turnId===A||H.assistantMessageId===W)?{...H,status:"error",finishedAt:Date.now()}:H))),E(U=>U.filter(H=>H.id!==W||H.role!=="assistant"||H.text.trim()||H.content&&H.content.length>0?!0:z));return}if(R==="operation-ref"||R==="operation-status"){const z=eM(q);if(z){const U=typeof q.toolCallId=="string"?q.toolCallId:void 0;x(H=>JI(H,{...z,...F===void 0?{}:{eventSeq:F,updatedSeq:F},...A?{turnId:A}:{},...U?{toolCallId:U}:{},activityRef:`operation:${z.operationId}`}))}return}if(R==="usage"){if(X)return;const z=q,U=typeof z.responseKey=="string"&&z.responseKey?z.responseKey:void 0;if(U&&t.usageResponseKeysRef.current.has(U))return;U&&t.usageResponseKeysRef.current.add(U),y(H=>{const te=z.inputTokens??0,G=z.outputTokens??0,K=z.cacheReadTokens??0,$=z.cacheWriteTokens??0,ee=z.totalTokens??te+G+K+$,oe=z.contextUsage,ce=oe&&typeof oe=="object"?{tokens:typeof oe.tokens=="number"?oe.tokens:null,contextWindow:typeof oe.contextWindow=="number"?oe.contextWindow:0,percent:typeof oe.percent=="number"?oe.percent:null}:H.contextUsage;return{inputTokens:H.inputTokens+te,outputTokens:H.outputTokens+G,cacheReadTokens:H.cacheReadTokens+K,cacheWriteTokens:H.cacheWriteTokens+$,totalTokens:H.totalTokens+ee,cost:z.cost===void 0?H.cost:(H.cost??0)+z.cost,...ce?{contextUsage:ce}:{}}});return}if(R==="message_update"||R==="message_end"){if(X)return;const z=t.sealedAssistantIdsRef.current;if(R==="message_update"&&z.has(W)){const G=rs("a");A&&t.turnAssistantIdsRef.current.set(A,G);const K=W;N($=>$.map(ee=>ee.assistantMessageId===K?{...ee,assistantMessageId:G}:ee)),W=G,p(G)}const U=typeof q.text=="string"?q.text:"",H=xp(q.content),te=W;E(G=>G.some($=>$.id===te)?G.map($=>$.id!==te?$:{...$,text:U,...H?{content:H}:{}}):[...G,{id:te,role:"assistant",text:U,createdAt:J,...H?{content:H}:{}}]),R==="message_end"&&z.add(te)}else if(R==="tool_call"){const z=typeof q.toolCallId=="string"?q.toolCallId:rs("t"),U=typeof q.toolName=="string"?q.toolName:"tool",H=typeof q.argsPreview=="string"?q.argsPreview:"{}";N(te=>te.some(G=>G.id===z)?te.map(G=>G.id!==z?G:{...G,args:H,status:"running",turnId:A??G.turnId,assistantMessageId:W,...F===void 0?{}:{eventSeq:F}}):[...te,{id:z,toolName:U,args:H,status:"running",createdAt:J,...F===void 0?{}:{eventSeq:F},turnId:A,assistantMessageId:W}])}else if(R==="tool_result"){const z=typeof q.toolCallId=="string"?q.toolCallId:rs("r"),U=typeof q.toolName=="string"?q.toolName:"tool",H=q.isError===!0,te=typeof q.resultPreview=="string"?q.resultPreview:"{}",G=typeof q.operationId=="string"&&q.operationId?q.operationId:void 0;N(K=>K.find(ee=>ee.id===z)?K.map(ee=>ee.id!==z?ee:{...ee,result:te,resultText:te,status:H?"error":"ok",finishedAt:J,...F===void 0?{}:{finishedSeq:F},turnId:A??ee.turnId,assistantMessageId:ee.assistantMessageId??W,...G?{operationId:G}:ee.operationId?{operationId:ee.operationId}:{}}):[...K,{id:z,toolName:U,result:te,resultText:te,status:H?"error":"ok",createdAt:J,finishedAt:J,...F===void 0?{}:{eventSeq:F,finishedSeq:F},turnId:A,assistantMessageId:W,...G?{operationId:G}:{}}])}else R==="error"&&a(typeof q.message=="string"?q.message:"chat error")}}const Hm={inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheWriteTokens:0,totalTokens:0};function rM(e){const{origin:t,refs:n,sessionId:a,setError:s,onReconcile:o}=e,[c,d]=k.useState([]),[m,h]=k.useState([]),[p,b]=k.useState([]),[x,y]=k.useState([]),[E,N]=k.useState(50),[R,C]=k.useState(0),[I,O]=k.useState([]),[X,q]=k.useState(null),[A,F]=k.useState(null),[J,W]=k.useState(!1),[z,U]=k.useState(Hm),[H,te]=k.useState(!1),[G,K]=k.useState("idle"),[$,ee]=k.useState(null),[oe,ce]=k.useState(null),[j]=k.useState(!1),D=k.useMemo(()=>nM({refs:n,onReconcile:o,setError:s,setInterview:q,setHumanGateCards:O,setArtifactCards:y,setStreaming:te,setTurnPhase:K,setDeferredTurn:ee,setStreamingAssistantId:ce,setUnread:C,setOperationCards:b,setUsage:U,setMessages:d,setToolCalls:h}),[n,o,s]),P=k.useCallback((Me,Se,$e)=>{if($e?.targetSessionId&&n.sessionRef.current?.sessionId!==$e.targetSessionId||$e?.generation!==void 0&&n.sessionGenerationRef.current!==$e.generation)return null;const ct=Me.split(`
|
|
309
|
+
`);let mt="message",Ze="",lt=null;for(const wt of ct)wt.startsWith("event: ")?mt=wt.slice(7).trim():wt.startsWith("data: ")?Ze+=wt.slice(6):wt.startsWith("id: ")&&(lt=wt.slice(4).trim());if(!Ze)return lt;let Tt;try{Tt=JSON.parse(Ze)}catch{return lt}const St=lt??(typeof Tt.eventId=="string"?Tt.eventId:null);if(St){if(n.seenEventIdsRef.current.has(St))return St;n.seenEventIdsRef.current.add(St)}return D(mt,Tt,Se,$e),lt??St},[D,n]),_=k.useCallback(async(Me,Se)=>{const $e=Se?.background===!0;$e||W(!0);try{const ct=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(Me)}/context`,{credentials:"include"});if(!ct.ok)return;const mt=await ct.json();mt.context&&n.sessionRef.current?.sessionId===Me&&F(Ze=>_8(Ze,mt.context)?Ze:mt.context)}finally{$e||W(!1)}},[t,n]);k.useEffect(()=>{a&&_(a)},[a,_]),k.useEffect(()=>{if(!a)return;const Me=window.setTimeout(()=>{_(a,{background:!0})},350);return()=>window.clearTimeout(Me)},[a,p,I,X,_]);const ne=k.useMemo(()=>c.filter(Me=>Me.role!=="system"||j),[c,j]);k.useEffect(()=>{const Me=()=>{document.hidden||C(0)};return document.addEventListener("visibilitychange",Me),()=>document.removeEventListener("visibilitychange",Me)},[]);const de=k.useMemo(()=>{if(m.length===0)return null;const Me=m.filter(Ze=>Ze.status==="running"),Se=m.filter(Ze=>Ze.status==="error"),$e=Me[Me.length-1];let ct="完成",mt="ok";return Se.length>0?(ct=`${Se.length} 次出错`,mt="error"):Me.length>0?(ct=$e?`${$e.toolName} 运行中`:"运行中",mt="running"):ct="",{count:m.length,statusLabel:ct,statusKind:mt}},[m]),se=k.useMemo(()=>{const Me=kI({messages:ne,toolCalls:m,streaming:H,activeAssistantId:oe});return EI(Me,E)},[ne,m,H,oe,E]),ae=k.useMemo(()=>{const Me=[];for(const Se of se)Se.user&&Me.push(Se.user),Me.push(...Se.assistants);return Me},[se]),we=k.useCallback(()=>{d([]),h([]),b([]),O([]),y([]),q(null),F(null),U(Hm),te(!1),K("idle"),ee(null),ce(null),C(0),N(50),n.usageResponseKeysRef.current=new Set},[n]),be=k.useCallback(Me=>{d(Me.messages),h(Me.toolCalls),b([]),O([]),y([]),F(null),q(null),U(Hm),n.usageResponseKeysRef.current=new Set,te(Me.streaming),K(Me.turnPhase??(Me.streaming?"running":"idle")),ee(Me.deferredTurn??null),ce(null),C(0),N(50)},[n]),ze=k.useCallback(async Me=>{try{const Se=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(Me)}`,{credentials:"include"});if(!Se.ok)return!1;const $e=await Se.json();if(!$e.session||n.sessionRef.current?.sessionId!==Me)return!1;const ct=$e.session.activeTurnId??null;n.activeTurnIdRef.current=ct,n.streamingRef.current=!!ct,K($e.session.turnPhase??(ct?"running":"idle")),ee($e.session.deferredTurn??null),n.lastEventIdRef.current=$e.lastEventId??null,n.seenEventIdsRef.current=new Set,n.turnAssistantIdsRef.current=new Map,n.sealedAssistantIdsRef.current=new Set;const mt=T6($e.session.messages??[]);return d(mt.messages),h(mt.toolCalls),ce(null),!0}catch{return!1}},[t,n,d,h,ce,K,ee]);return{messages:c,setMessages:d,toolCalls:m,setToolCalls:h,operationCards:p,artifactCards:x,historyLimit:E,setHistoryLimit:N,unread:R,humanGateCards:I,interview:X,setInterview:q,taskContext:A,contextLoading:J,usage:z,streaming:H,setStreaming:te,turnPhase:G,setTurnPhase:K,deferredTurn:$,setDeferredTurn:ee,streamingAssistantId:oe,setStreamingAssistantId:ce,visibleMessages:ae,turnGroups:se,processSummary:de,applyChatSseEvent:D,applySseBlock:P,loadTaskContext:_,resetForNewSession:we,applyActivatedSession:be,recoverSession:ze}}const aM={error:6e3,info:4e3};function iM(e){const{toast:t,onDismiss:n}=e,[a,s]=k.useState(!1),o=k.useRef(null),c=k.useRef(null),d=()=>{o.current!==null&&window.clearTimeout(o.current),c.current!==null&&window.clearTimeout(c.current),o.current=null,c.current=null},m=()=>{d(),s(!0),c.current=window.setTimeout(()=>{s(!1),n()},140)};if(k.useEffect(()=>{if(t)return s(!1),o.current=window.setTimeout(m,aM[t.kind]),d},[t?.id]),k.useEffect(()=>d,[]),!t)return null;const h=t.kind==="error";return zu.createPortal(f.jsxs("div",{className:`oc-toast is-${t.kind}${a?" is-leaving":""}`,role:h?"alert":"status",onMouseEnter:d,onMouseLeave:()=>{a||(o.current=window.setTimeout(m,1600))},children:[f.jsx("span",{className:"oc-toast-icon","aria-hidden":"true",children:h?f.jsx(_2,{size:16}):f.jsx(v8,{size:16})}),f.jsx("span",{className:"oc-toast-message",children:t.message}),f.jsx("button",{type:"button",className:"oc-toast-close","aria-label":"关闭提示",onClick:m,children:f.jsx(h8,{size:14,"aria-hidden":"true"})})]}),document.body)}function sM(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 A6(e){return e==="invalid-capability-token"||e==="invalid-confirmation-token"||e==="missing-capability-token"||e==="missing-confirmation-token"}function lM(e){return A6(e)?"页面已过期(控制台已重启),请刷新页面(F5)后重试。":e==="host-not-loopback"?"请求主机校验失败:非回环绑定时要求 Host 头,请刷新页面或检查访问地址。":e==="origin-mismatch"?"请求来源与控制台地址不一致,请通过控制台页面操作。":e==="cross-site-fetch"?"检测到跨站请求,已拒绝。请通过控制台页面操作。":"操作被拒绝,请刷新页面后重试。"}class oM{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 o=!1;const c=window.setTimeout(()=>{o=!0,n.abort()},this.deadlineMs);try{for(;!n.signal.aborted;){try{const d={Accept:"text/event-stream"};a&&(d["Last-Event-ID"]=a);const m=await this.fetchFn(`${this.options.origin}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/events`,{headers:d,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:x,value:y}=await h.read();if(x||n.signal.aborted)break;b+=p.decode(y,{stream:!0});const E=b.split(`
|
|
310
|
+
|
|
311
|
+
`);b=E.pop()??"";for(const N of E){const R=N.split(`
|
|
312
|
+
`).find(I=>I.startsWith("id: "))?.slice(4);if(R&&(a=R),!R||s.has(R)||!N.includes("event: session_title"))continue;const C=N.split(`
|
|
313
|
+
`).find(I=>I.startsWith("data: "))?.slice(6);if(C)try{const I=JSON.parse(C),O=I.data?.title?.trim();if(!O)continue;if(s.add(R),!this.options.hasSession(t)||(this.options.onTitle(t,{title:O,automatic:!!I.data?.automatic}),I.data?.automatic))return}catch{}}}}catch{if(n.signal.aborted)return}n.signal.aborted||await cM(this.backoffMs,n.signal)}}finally{window.clearTimeout(c),this.controllers.get(t)===n&&this.controllers.delete(t),(o||!this.options.hasSession(t))&&this.options.refresh()}}}function cM(e,t){return new Promise(n=>{const a=window.setTimeout(o,e),s=()=>o();function o(){window.clearTimeout(a),t.removeEventListener("abort",s),n()}t.addEventListener("abort",s,{once:!0})})}async function uM(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":er()},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,...Rh(a)},o=[a,...e.sessionListRef.current.filter(c=>c.sessionId!==a.sessionId)].slice(0,vu);return e.sessionListRef.current=o,e.setSessionList(o),e.titleWatcher?.markEligible(a.sessionId),e.refreshSessionList(),s}finally{e.creatingRef&&(e.creatingRef.current=!1),e.setCreatingSession?.(!1)}}function dM(e){const{origin:t,refs:n,setSession:a,thread:s,composer:o,browser:c,setError:d,setNotice:m,onCompactionChange:h,setProcessOpen:p,setAutoScroll:b}=e,{applyActivatedSession:x,resetForNewSession:y,setMessages:E}=s,{setInput:N,setPendingImages:R}=o,{setPreviews:C,setActivePreviewPath:I}=c,[O,X]=k.useState([]),q=k.useRef([]);q.current=O;const A=k.useRef(null),[F,J]=k.useState(!1),W=k.useRef(!1),z=k.useRef(!1),U=k.useRef(0),H=k.useCallback(()=>{n.sessionGenerationRef.current+=1,n.abortRef.current?.abort(),n.reconnectAbortRef.current?.abort();for(const D of n.sessionAbortControllersRef.current.values())D.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,y(),N(""),R([]),C([]),I(null),p(!1),b(!0)},[n,y,N,R,C,I,p,b]),te=k.useCallback(async()=>{try{const D=await fetch(`${t}/api/operator/v1/chat/sessions`,{credentials:"include"});if(!D.ok)return;const P=(await D.json()).sessions??[],_=P.slice(0,vu),ne=P.slice(vu);if(X(_),ne.length===0)return;await Promise.all(ne.map(se=>fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(se.sessionId)}`,{method:"DELETE",credentials:"include",headers:{"x-loop-console-confirmation":er()}}).catch(()=>{})));const de=n.sessionRef.current?.sessionId;de&&ne.some(se=>se.sessionId===de)&&(U.current+=1,n.sessionRef.current=null,H(),a(null),window.localStorage.removeItem(Yr))}catch{}},[t,n,H,a]),G=k.useCallback(async D=>{try{return(await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(D)}`,{method:"DELETE",credentials:"include",headers:{"x-loop-console-confirmation":er()}})).ok?(A.current?.cancel(D),n.sessionRef.current?.sessionId===D&&(U.current+=1,n.sessionRef.current=null,H(),a(null),window.localStorage.removeItem(Yr)),await te(),!0):(d("删除会话失败"),!1)}catch(P){return d(P instanceof Error?P.message:String(P)),!1}},[t,n,a,H,te,d]),K=k.useCallback(async D=>{const P=++U.current;try{const _=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(D)}`,{credentials:"include"}),ne=await _.json();if(!_.ok||!ne.session)throw new Error(ne.error?.message??"会话不可用");if(P!==U.current)return;const de={sessionId:ne.session.sessionId,...Rh(ne.session)};H(),n.sessionRef.current=de,n.streamingRef.current=!!ne.session.activeTurnId,n.activeTurnIdRef.current=ne.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(de),n.assistantIdRef.current=null,n.abortRef.current=n.sessionAbortControllersRef.current.get(D)??null,R([]),C([]),N(ne.session.composerDraft??"");const se=T6(ne.session.messages??[]);x({messages:se.messages,toolCalls:se.toolCalls,streaming:!!ne.session.activeTurnId,turnPhase:ne.session.turnPhase??(ne.session.activeTurnId?"running":"idle"),deferredTurn:ne.session.deferredTurn??null}),window.localStorage.setItem(Yr,D),I(null)}catch(_){if(P!==U.current)return;d(_ instanceof Error?_.message:String(_))}},[t,n,a,R,C,N,x,H,I,d]);k.useEffect(()=>{te()},[te]),A.current||(A.current=new oM({origin:t,hasSession:D=>q.current.some(P=>P.sessionId===D),onTitle:(D,P)=>{X(_=>_.map(ne=>ne.sessionId!==D||P.automatic&&ne.title?ne:P.automatic?{...ne,title:P.title}:{...ne,displayTitle:P.title}))},refresh:te}));const $=k.useCallback(D=>A.current?.startIfEligible(D),[]);k.useEffect(()=>{A.current?.reconcile(O.filter(D=>D.state!=="archived"&&!D.title).map(D=>D.sessionId))},[O]),k.useEffect(()=>()=>A.current?.dispose(),[]),k.useEffect(()=>{let D=!1;const P=window.localStorage.getItem(Yr);if(!P)return;const _=++U.current;return(async()=>{try{const ne=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(P)}`,{credentials:"include"});if(!ne.ok){window.localStorage.removeItem(Yr);return}const de=await ne.json();if(D||_!==U.current||!de.session)return;const se={sessionId:de.session.sessionId,...Rh(de.session)};n.sessionGenerationRef.current+=1,n.sessionRef.current=se,n.activeTurnIdRef.current=de.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(se),N(de.session.composerDraft??""),E((de.session.messages??[]).filter(ae=>ae.role==="user"||ae.role==="assistant").map(ae=>{const we=xp(ae.content);return{id:ae.id,role:ae.role,text:ae.text,createdAt:Date.parse(ae.at)||Date.now(),...we&&we.length>0?{content:we}:{}}}))}catch{}})(),()=>{D=!0}},[t,n,a,N,E]);const ee=k.useCallback(D=>uM({origin:t,sessionListRef:q,setSessionList:X,titleWatcher:A.current,refreshSessionList:te,options:D,setCreatingSession:J,creatingRef:W}),[t,te]),oe=k.useCallback(async D=>{if(W.current)return null;const P=++U.current;d(null);try{const _=await ee(D);return P!==U.current?null:(H(),n.sessionRef.current=_,window.localStorage.setItem(Yr,_.sessionId),a(_),_)}catch(_){if(P!==U.current)return null;const ne=_ instanceof Error?_.message:String(_);return ne!=="CREATE_SESSION_IN_FLIGHT"&&d(ne),null}},[n,a,d,H,ee]),ce=k.useCallback(async D=>{const P=n.sessionRef.current;if(!P||n.streamingRef.current)return;const _=typeof D=="string"?D.trim():"";h?.(!0);try{const ne={"x-loop-console-confirmation":er()};_&&(ne["content-type"]="application/json");const de=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(P.sessionId)}/compact`,{method:"POST",credentials:"include",headers:ne,..._?{body:JSON.stringify({instructions:_})}:{}}),se=await de.json().catch(()=>({}));if(!de.ok){const ze=se.error?.code;if(sM(ze)){d(lM(ze)),A6(ze)&&!z.current&&(z.current=!0,window.setTimeout(()=>window.location.reload(),1200));return}d(se.error?.message??"上下文压缩失败");return}d(null);const ae=se.snapshot?.summary?.trim(),we=se.snapshot?.tokensBefore,be=ae||"历史上下文已精简,关键决策与当前任务已保留。";await K(P.sessionId),E(ze=>[...ze,{id:`compaction-${Date.now()}`,role:"assistant",kind:"compaction",text:be,createdAt:Date.now(),...we?{compaction:{tokensBefore:we}}:{}}]),m({id:Date.now(),message:`已压缩上下文:${be.slice(0,72)}${be.length>72?"…":""}`})}catch(ne){d(ne instanceof Error?ne.message:"上下文压缩失败")}finally{h?.(!1)}},[t,n,d,m,E,h,K]);return{sessionList:O,creatingSession:F,activateSession:K,refreshSessionList:te,deleteSession:G,createSession:oe,updateSession:async(D,P)=>{if(!(await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(D)}`,{method:"PATCH",credentials:"include",headers:{"content-type":"application/json","x-loop-console-confirmation":er()},body:JSON.stringify(P)})).ok){d("会话更新失败");return}await te(),P.state==="archived"&&A.current?.cancel(D),P.state==="archived"&&n.sessionRef.current?.sessionId===D&&(U.current+=1,n.sessionRef.current=null,H(),a(null),window.localStorage.removeItem(Yr))},watchSessionTitle:$,compactSession:ce}}const xo={"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 fM(){return Object.keys(xo)}function pu(e){const t=e.trim().replace(/[.…]+$/,"");if(!t)return null;if(xo[t])return{code:t};const n=t.lastIndexOf(":");if(n>0){const a=t.slice(n+1),s=t.slice(0,n);if(xo[a])return{code:a,nodeId:s};const o=fM().find(c=>a.length>=3&&c.startsWith(a));if(o)return{code:o,nodeId:s}}return xo[t]?{code:t}:null}function mM(e){const t=[];for(const n of e.blockedReasons??[]){const a=pu(String(n));a&&t.push(a)}for(const n of e.blockingNodes??[]){const a=n.reasonCode?.trim();if(!a)continue;const s=pu(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=pu(a);s&&t.push(s)}}return t}function hM(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 o=xo[a];o&&(s.length>0&&a.startsWith("restart-subgraph-contains-")?n.push(`${o}(${s.join("、")})`):n.push(o))}return n}function pM(e){return e.join("; ").includes("worker-managed-rerun-unsupported")||e.some(n=>pu(n)?.code==="worker-managed-rerun-unsupported")?"下一步:请点下方「重新排队 Worker Task」,从头完整执行。":"下一步:请改用「带反馈重新执行任务」,重新生成完整 DAG。"}function _6(e){const t=e.fallbackMessage?.trim();if(t?.startsWith("无法从该节点续跑"))return t;const n=mM(e),a=hM(n),s=n.map(c=>c.code),o=pM(s.length>0?s:[t??""]);return a.length===0?["无法从该节点续跑。这次续跑不够安全(工作区、控制器或下游步骤不允许只重跑一段)。",o].join(`
|
|
314
|
+
`):["无法从该节点续跑,因为:",...a.map(c=>`• ${c}`),"",o].join(`
|
|
315
|
+
`)}function gM(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 _6({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}const bM=[{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 qa(e){const t=(e??"").trim();if(!t)return"操作失败";const n=gM(t);if(n)return n;if(/controller identity changed|package fingerprint changed|entry binary sha256 changed/i.test(t))return"控制器版本已变更(Console 启动后代码被重新编译)。请重启 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 bM)if(a.pattern.test(t))return a.copy;return t}function vM(e){return e.turnPhase==="stopping"?e.blockedByTurnId?{action:"queue-deferred",blockedByTurnId:e.blockedByTurnId}:{action:"hold"}:e.turnPhase==="idle"?{action:"send-now"}:{action:"hold"}}function u2(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"}:Co(a)?{action:"hold"}:{action:"send-now"}}function yM(e){let t;const n=new Promise(a=>{t=a});return{...e,outcomePromise:n,resolveOutcome:t}}function d2(e="network error while creating turn"){return{kind:"ambiguous",message:e}}function xM(e="无法确认 Turn 是否已创建,正在与服务端对账(不会重复提交新的请求 ID)"){return{kind:"ambiguous",message:e}}function f2(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 o=t.turn?.turnId??t.turnId;return o?{kind:"accepted",turnId:o,idempotent:t.idempotent===!0,turn:t.turn??{turnId:o,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 wM(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 SM(e){const t=e.clientRequestId,n=e.state?.activeTurn,a=e.state?.latestTurn,s=n?.state??e.state?.activeTurnState??void 0,o=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(o))return{action:"release-terminal",turnId:a.turnId,state:String(o)};if(!n?.turnId||n.clientRequestId===t)return{action:"bind-active",turnId:a.turnId}}return!Co(e.state)&&!(!!n?.turnId&&n?.clientRequestId!==t)?{action:"release-not-accepted"}:{action:"hold"}}function Co(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 _u(e){return e.pending.sessionId===e.sessionId&&e.pending.sessionGeneration===e.sessionGeneration&&e.pending.submitGeneration===e.submitGeneration}function kM(e,t){return`${e}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/turns`}function m2(e,t){return`${e}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/state`}function EM(e,t){return`${e}/api/operator/v1/chat/sessions/${encodeURIComponent(t)}/events`}function TM(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 fl(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 I6(e){e.stopRequested=!0}function Iu(e){e.stopRequested=!1}function NM(e,t){return!(!t||e.abortPostedTurnIds.has(t))}function CM(e,t){t&&e.abortPostedTurnIds.add(t)}function Mu(e,t){return!e.stopRequested||!NM(e,t)?null:(CM(e,t),e.stoppingTurnId=t,e.activeTurnId=t,t)}function h2(e,t){const n=e.pendingSubmission;return n&&n.clientRequestId!==t.clientRequestId?!1:(t.turnId&&e.settledTurnIds.add(t.turnId),fl(e,t.clientRequestId),Iu(e),t.markIdle!==!1&&(e.streaming=!1,e.activeTurnId=null,e.assistantId=null,e.stoppingTurnId=null),!0)}function RM(e,t){return _u({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 AM(e,t){t.pending.resolveOutcome({kind:"adopt-active",activeTurn:{turnId:t.activeTurnId},message:t.message}),fl(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 _M(e,t){if(t.pending.resolveOutcome({kind:"rejected",message:t.message}),fl(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 IM(e,t,n){const a=_u({pending:n.pending,sessionId:e.sessionId,sessionGeneration:e.sessionGeneration,submitGeneration:e.submitGeneration});if(t.kind==="accepted"){if(RM(e,{turnId:t.turnId,assistantId:n.assistantId,pending:n.pending,sessionId:n.sessionId,ui:n.acceptedUi})){const o=Mu(e,t.turnId);o&&n.onAutoAbort?.(o)}return}if(t.kind==="adopt-active"){const s=a?Mu(e,t.activeTurn.turnId):null;AM(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"){_M(e,{message:t.message,assistantId:n.assistantId,text:n.text,images:n.images,pending:n.pending,current:a,ui:n.rejectedUi}),Iu(e);return}if(t.kind==="stale"){n.pending.resolveOutcome(t),fl(e,n.pending.clientRequestId),Iu(e);return}n.pending.resolveOutcome(t)}function MM(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 d=Mu(e,t.turnId);return d&&a?.onAutoAbort?.(d),c?"held":"bound"}if(t.action==="release-terminal"||t.action==="release-not-accepted")return t.action==="release-terminal"&&e.settledTurnIds.add(t.turnId),fl(e,s.clientRequestId),Iu(e),Co(n)||(e.streaming=!1,e.activeTurnId=null,e.assistantId=null,e.stoppingTurnId=null,a?.markIdle?.()),"released";const o=n?.activeTurn?.turnId??n?.activeTurnId??null;return o&&(e.activeTurnId=o),"held"}const OM="正在停止…",DM="正在停止…",jM="停止请求未完成,正在与服务端对账…",LM="停止请求失败,正在与服务端对账…";function p2(e){e.showNotice(OM)}function g2(e){if(e.networkError)return{action:"keep-busy-notice",message:LM};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:jM}}function Fm(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(DM);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 b2(e,t){I6(e);const n=e.activeTurnId??e.pendingSubmission?.acceptedTurnId??null;if(n){const a=Mu(e,n);return a?(t.notice&&p2(t.notice),t.postAbort(a),{abortedTurnId:a,stopRequested:!0}):{abortedTurnId:null,stopRequested:!0}}return t.notice&&p2(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 zM(e){return e.split(`
|
|
316
|
+
`).find(t=>t.startsWith("event: "))?.slice(7).trim()??"message"}function BM(){return new Promise(e=>window.setTimeout(e,25))}function Pm(e,t){t&&e(n=>n.filter(a=>!(a.id===t&&a.role==="assistant"&&!a.text.trim())))}function qM(e){const{origin:t,refs:n,session:a,thread:s,composer:o,setError:c,setAutoScroll:d,setNotice:m,recoveryVersion:h=0,watchSessionTitle:p}=e,{applySseBlock:b,setMessages:x,setStreaming:y,setStreamingAssistantId:E,streaming:N,setTurnPhase:R,setDeferredTurn:C}=s,{setInput:I,setPendingImages:O}=o,X=k.useCallback(ce=>{m&&m({id:Date.now(),message:ce})},[m]),q=k.useCallback(ce=>{const j=la(n);fl(j,ce),oa(n,j)},[n]),A=k.useCallback((ce,j,D)=>{n.sessionRef.current?.sessionId!==ce||n.sessionGenerationRef.current!==j||(n.streamingRef.current=!1,n.activeTurnIdRef.current=null,n.assistantIdRef.current=null,n.stoppingTurnIdRef.current=null,y(!1),R("idle"),E(null),Pm(x,D))},[n,y,R,E,x]),F=k.useCallback(async(ce,j,D)=>{for(;!D.aborted;){const P=n.eventsStreamStateRef.current;if(!P||P.sessionId!==ce||P.generation!==j)return;P.ready=!1;try{const _={Accept:"text/event-stream"},ne=n.lastEventIdRef.current;ne&&(_["Last-Event-ID"]=ne);const de=await fetch(EM(t,ce),{headers:_,credentials:"include",signal:D});if(!de.ok||!de.body){if(de.status===404)return;await gf(2e3,D);continue}const se=de.body.getReader(),ae=new TextDecoder;let we="",be=!0;const ze=rs("a");for(;;){const{done:Se,value:$e}=await se.read();if(Se)break;we+=ae.decode($e,{stream:!0});const ct=we.split(`
|
|
317
|
+
|
|
318
|
+
`);we=ct.pop()??"";for(const mt of ct){if(zM(mt)==="stream_ready"){const Tt=n.eventsStreamStateRef.current;Tt?.sessionId===ce&&Tt.generation===j&&(Tt.ready=!0),be=!1;continue}const Ze=n.assistantIdRef.current??ze,lt=b(mt,Ze,{replay:be,targetSessionId:ce,generation:j});lt&&(n.lastEventIdRef.current=lt)}}const Me=n.eventsStreamStateRef.current;Me?.sessionId===ce&&Me.generation===j&&(Me.ready=!1),await gf(1e3,D)}catch{if(D.aborted)return;await gf(2e3,D)}}},[t,n,b]),J=k.useCallback((ce,j)=>{const D=n.eventsStreamStateRef.current;if(D?.sessionId===ce&&D.generation===j&&n.reconnectAbortRef.current)return;n.reconnectAbortRef.current?.abort();const P=new AbortController;n.reconnectAbortRef.current=P,n.eventsStreamStateRef.current={sessionId:ce,generation:j,ready:!1},F(ce,j,P.signal)},[n,F]),W=k.useCallback(async(ce,j)=>{J(ce,j);const D=Date.now()+5e3;for(;Date.now()<D;){const P=n.eventsStreamStateRef.current;if(P?.sessionId===ce&&P.generation===j&&P.ready)return;if(n.sessionRef.current?.sessionId!==ce||n.sessionGenerationRef.current!==j)throw new Error("会话已切换");await BM()}throw new Error("事件连接未就绪,请检查 Console 连接后重试")},[n,J]),z=k.useCallback(async ce=>{try{const j=await fetch(m2(t,ce),{credentials:"include"}),D=await j.json().catch(()=>({}));return j.ok?D.state??null:null}catch{return null}},[t]),U=k.useCallback(async ce=>{try{const j=await fetch(kM(t,ce.sessionId),{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":er()},credentials:"include",body:JSON.stringify({clientRequestId:ce.clientRequestId,text:ce.text.trim()||"请查看附件图片。",images:ce.images.map(({type:P,mimeType:_,data:ne})=>({type:P,mimeType:_,data:ne}))})}),D=await j.json().catch(()=>({}));return{httpOk:j.ok,status:j.status,body:D}}catch{return{httpOk:!1,status:0,body:{},networkError:!0}}},[t]),H=k.useCallback(()=>({showNotice:X,setError:ce=>c(ce)}),[X,c]),te=k.useCallback(async(ce,j,D)=>{n.stoppingTurnIdRef.current=D,n.streamingRef.current=!1,y(!1),R("stopping"),E(null);try{const P=await fetch(TM(t,ce,D),{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":er()},credentials:"include",body:"{}"}),_=await P.json().catch(()=>({}));if(n.sessionRef.current?.sessionId!==ce||n.sessionGenerationRef.current!==j||n.stoppingTurnIdRef.current!==D)return;const ne=g2({httpOk:P.ok,turnId:D,body:_}),de=la(n);if(de.stoppingTurnId=D,ne.action==="owner-lost-reconcile"){const se=await z(ce),ae=n.sessionRef.current?.sessionId===ce&&n.sessionGenerationRef.current===j;Fm(de,ne,H(),{sessionStillCurrent:ae,runtimeBusy:Co(se??void 0),markIdle:()=>A(ce,j,n.assistantIdRef.current)}),oa(n,de),R(Ys(de));return}Fm(de,ne,H(),{sessionStillCurrent:!0,markIdle:()=>A(ce,j,n.assistantIdRef.current)}),oa(n,de),R(Ys(de)),de.streaming&&y(!0)}catch{const P=la(n);Fm(P,g2({httpOk:!1,turnId:D,body:{},networkError:!0}),H()),oa(n,P),n.streamingRef.current=!0,y(!0),R("stopping")}},[t,n,y,R,A,z,H]),G=k.useCallback((ce,j)=>{const D=la(n);D.sessionId=n.sessionRef.current?.sessionId??null,D.sessionGeneration=n.sessionGenerationRef.current,D.submitGeneration=n.submitGenerationRef.current;const P=_=>{O(_)};IM(D,ce,{assistantId:j.assistantId,text:j.text,images:j.images,pending:j.pending,sessionId:j.sessionId,notice:H(),acceptedUi:{setStreaming:y,setStreamingAssistantId:E,setPendingImages:P,watchSessionTitle:p},adoptUi:{clearEmptyAssistant:_=>Pm(x,_),setInput:I,setPendingImages:P,setStreaming:y,setStreamingAssistantId:E},rejectedUi:{setError:c,setStreaming:y,setStreamingAssistantId:E,clearEmptyAssistant:_=>Pm(x,_),setInput:I,setPendingImages:P,formatError:qa},onAutoAbort:_=>{te(j.sessionId,j.generation,_)}}),oa(n,D),R(Ys(D))},[n,H,y,R,E,O,p,x,I,c,te]),K=k.useCallback(async ce=>{const j=n.sessionRef.current;if(!j||!ce.text.trim()&&ce.images.length===0)return{action:"handled"};const D=s.deferredTurn;X("正在排队…");const P=de=>{C(de),I(""),O([]),c(null),X(D?"已更新停止后发送的消息":"已排队,将在上一轮停止后自动发送")},_=()=>{C(null),I(""),O([]),c(null),X("消息已进入发送")},ne=async()=>{const de=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(j.sessionId)}/deferred-turn`,{method:"PUT",headers:{"Content-Type":"application/json","x-loop-console-confirmation":er()},credentials:"include",body:JSON.stringify({clientRequestId:ce.clientRequestId,blockedByTurnId:ce.blockedByTurnId,text:ce.text,images:ce.images,...D?{expectedRevision:D.revision}:{}})}),se=await de.json().catch(()=>({}));return{response:de,body:se}};try{for(let de=0;de<2;de+=1){const{response:se,body:ae}=await ne();if(se.ok&&ae.accepted&&ae.deferredTurn)return P(ae.deferredTurn),{action:"handled"};if(ae.deferredTurn&&C(ae.deferredTurn),ae.error?.code!=="TURN_NOT_STOPPING")return c(ae.error?.message??`待发送消息未被服务端接受(HTTP ${se.status})`),{action:"handled"};const we=await z(j.sessionId),be=u2({clientRequestId:ce.clientRequestId,blockedByTurnId:ce.blockedByTurnId,state:we??void 0});if(be.action==="deferred")return P(be.deferredTurn),{action:"handled"};if(be.action==="accepted")return _(),{action:"handled"};if(!(be.action==="retry-deferred"&&de===0))return be.action==="send-now"&&!D?(X("上一轮已停止,正在发送当前消息…"),{action:"send-now"}):(c(ae.error?.message??"停止状态已变化,当前消息仍保留在输入框"),{action:"handled"})}return{action:"handled"}}catch(de){const se=await z(j.sessionId),ae=u2({clientRequestId:ce.clientRequestId,blockedByTurnId:ce.blockedByTurnId,state:se??void 0});return ae.action==="deferred"?(P(ae.deferredTurn),{action:"handled"}):ae.action==="accepted"?(_(),{action:"handled"}):ae.action==="send-now"&&!D?(X("上一轮已停止,正在发送当前消息…"),{action:"send-now"}):(c(de instanceof Error?`无法确认消息是否已排队:${de.message}`:"无法确认消息是否已排队,请刷新后查看服务端状态"),{action:"handled"})}},[t,n,s.deferredTurn,C,I,O,c,X,z]),$=k.useCallback(async()=>{const ce=n.sessionRef.current,j=s.deferredTurn;if(!(!ce||!j))try{const D=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(ce.sessionId)}/deferred-turn`,{method:"DELETE",headers:{"Content-Type":"application/json","x-loop-console-confirmation":er()},credentials:"include",body:JSON.stringify({clientRequestId:j.clientRequestId,expectedRevision:j.revision})}),P=await D.json().catch(()=>({}));if(!D.ok||!P.cancelled){c(P.error?.message??"待发送消息撤回失败");return}C(null),I(P.deferredTurn?.text??""),O(P.deferredTurn?.images??[]),c(null),X("待发送消息已移回输入框")}catch(D){c(D instanceof Error?D.message:String(D))}},[t,n,s.deferredTurn,C,I,O,c,X]),ee=k.useCallback(async(ce,j)=>{const D=n.sessionRef.current;if(!D||!ce.trim()&&j.length===0)return;const P=la(n),_=vM({turnPhase:Ys(P),blockedByTurnId:P.stoppingTurnId??P.activeTurnId}),ne=rs("chat-submit");if(_.action==="hold"){Ys(P)==="stopping"&&X("正在确认上一轮停止状态,当前消息已保留");return}if(_.action==="queue-deferred"&&(await K({text:ce,images:j,clientRequestId:ne,blockedByTurnId:_.blockedByTurnId})).action!=="send-now")return;const de=n.sessionRef.current,se=n.sessionGenerationRef.current;if(!de||de.sessionId!==D.sessionId||!ce.trim()&&j.length===0||n.streamingRef.current||n.submitInFlightRef.current||n.pendingSubmissionRef.current)return;n.submitInFlightRef.current=!0;const ae=++n.submitGenerationRef.current,we=rs("u"),be=rs("a"),ze=ce.trim(),Me=j.slice(),Se=yM({clientRequestId:ne,submitGeneration:ae,sessionId:de.sessionId,sessionGeneration:se,text:ze,images:Me,assistantId:be,userMessageId:we});n.pendingSubmissionRef.current=Se;try{await W(de.sessionId,se)}catch(lt){n.sessionRef.current?.sessionId===de.sessionId&&n.sessionGenerationRef.current===se&&c(qa(lt instanceof Error?lt.message:String(lt))),q(ne);return}if(n.sessionRef.current?.sessionId!==de.sessionId||n.sessionGenerationRef.current!==se){q(ne);return}const $e={id:we,role:"user",text:ze,createdAt:Date.now()};x(lt=>[...lt,$e,{id:be,role:"assistant",text:"",createdAt:Date.now()}]),I(""),d(!0),c(null),n.streamingRef.current=!0,R("running"),n.assistantIdRef.current=be,y(!0),E(be);const ct={sessionId:de.sessionId,generation:se,submitGeneration:ae,assistantId:be,text:ze,images:Me,pending:Se},mt=await U({sessionId:de.sessionId,clientRequestId:ne,text:ze,images:Me});if(!_u({pending:Se,sessionId:n.sessionRef.current?.sessionId,sessionGeneration:n.sessionGenerationRef.current,submitGeneration:n.submitGenerationRef.current})){Se.resolveOutcome({kind:"stale"}),q(ne);return}let Ze=mt.networkError?d2():f2({httpOk:mt.httpOk,status:mt.status,body:mt.body,clientRequestId:ne});if(Ze.kind==="ambiguous"){const lt=await z(de.sessionId),Tt=lt?wM({clientRequestId:ne,state:lt}):null;if(Tt)Ze=Tt;else{const St=await U({sessionId:de.sessionId,clientRequestId:ne,text:ze,images:Me});if(!_u({pending:Se,sessionId:n.sessionRef.current?.sessionId,sessionGeneration:n.sessionGenerationRef.current,submitGeneration:n.submitGenerationRef.current})){Se.resolveOutcome({kind:"stale"}),q(ne);return}if(Ze=St.networkError?d2("无法确认 Turn 是否已创建,正在与服务端对账(不会重复提交新的请求 ID)"):f2({httpOk:St.httpOk,status:St.status,body:St.body,clientRequestId:ne}),Ze.kind==="ambiguous"){const wt=Ze.message||"无法确认 Turn 是否已创建,正在与服务端对账(不会重复提交新的请求 ID)";Ze=xM(wt),X(wt)}}}G(Ze,ct)},[t,n,W,U,z,G,q,X,x,I,d,c,y,R,E,K]),oe=k.useCallback(async()=>{const ce=n.sessionRef.current?.sessionId,j=n.sessionGenerationRef.current;if(!ce)return;const D=la(n),P=b2(D,{postAbort:()=>{},notice:H()});if(oa(n,D),R("stopping"),P.abortedTurnId){if(n.stopInFlightRef.current)return;n.stopInFlightRef.current=!0;try{await te(ce,j,P.abortedTurnId)}finally{n.stopInFlightRef.current=!1}return}const _=n.pendingSubmissionRef.current;if(_&&!n.stopInFlightRef.current){n.stopInFlightRef.current=!0;try{const ne=await _.outcomePromise;if(n.sessionRef.current?.sessionId!==ce||n.sessionGenerationRef.current!==j)return;let de=null;if(ne.kind==="accepted")de=ne.turnId;else if(ne.kind==="adopt-active")de=ne.activeTurn.turnId;else{if(ne.kind==="ambiguous")return;n.stopRequestedRef.current=!1;return}if(!de)return;const se=la(n);I6(se);const ae=b2(se,{postAbort:()=>{},notice:H()});oa(n,se),ae.abortedTurnId&&await te(ce,j,ae.abortedTurnId)}finally{n.stopInFlightRef.current=!1}}},[n,H,te]);return k.useEffect(()=>{const ce=!!n.pendingSubmissionRef.current||n.submitInFlightRef.current||n.stopRequestedRef.current||!!n.activeTurnIdRef.current;if(!a||!N&&!ce)return;const j=a.sessionId,D=n.sessionGenerationRef.current;let P=!1;const _=async()=>{try{const ae=await fetch(m2(t,j),{credentials:"include"}),we=await ae.json().catch(()=>({}));if(P||!ae.ok||n.sessionRef.current?.sessionId!==j||n.sessionGenerationRef.current!==D)return;const be=we.state,ze=n.pendingSubmissionRef.current;if(ze){const Ze=SM({clientRequestId:ze.clientRequestId,state:be}),lt=la(n),Tt=MM(lt,Ze,be,{markIdle:()=>A(j,D,n.assistantIdRef.current),onAutoAbort:St=>{te(j,D,St)}});if(oa(n,lt),R(Ys(lt)),be&&"deferredTurn"in be&&C(be.deferredTurn??null),Tt==="bound"){y(!0);return}if(Tt==="released"||!ze.acceptedTurnId&&!lt.pendingSubmission?.acceptedTurnId)return}const Me=be?.activeTurn?.turnId??be?.activeTurnId??null;n.activeTurnIdRef.current=Me;const Se=Co(be),$e=n.pendingSubmissionRef.current;if($e){const Ze=be?.latestTurn?.clientRequestId===$e.clientRequestId&&is(be?.latestTurn?.state),lt=be?.activeTurn?.clientRequestId===$e.clientRequestId&&is(be?.activeTurn?.state);if(Ze||lt){const Tt=lt?be?.activeTurn?.turnId??null:be?.latestTurn?.turnId??$e.acceptedTurnId??null,St=la(n);h2(St,{clientRequestId:$e.clientRequestId,turnId:Tt,markIdle:!Se}),oa(n,St),Se||A(j,D,n.assistantIdRef.current);return}}if(Se)return;const ct=n.assistantIdRef.current;if(Me&&!(is(be?.activeTurn?.state)||is(be?.activeTurnState)))return;Me&&n.settledTurnIdsRef.current.add(Me);const mt=$e?.clientRequestId;if(mt){const Ze=la(n);h2(Ze,{clientRequestId:mt,turnId:Me,markIdle:!0}),oa(n,Ze)}else q();A(j,D,ct)}catch{}},ne=()=>{document.visibilityState==="visible"&&_()},de=()=>{_()},se=window.setInterval(()=>{_()},15e3);return document.addEventListener("visibilitychange",ne),window.addEventListener("online",de),_(),()=>{P=!0,window.clearInterval(se),document.removeEventListener("visibilitychange",ne),window.removeEventListener("online",de)}},[t,n,a,N,R,A,q,te]),k.useEffect(()=>{if(!a)return;const ce=n.sessionGenerationRef.current;return J(a.sessionId,ce),()=>{const j=n.eventsStreamStateRef.current;j?.sessionId===a.sessionId&&j.generation===ce&&(n.reconnectAbortRef.current?.abort(),n.reconnectAbortRef.current=null,n.eventsStreamStateRef.current=null)}},[a,h,n,J]),{sendPrompt:ee,handleStop:oe,cancelDeferredTurn:$,openEventsStream:F}}function UM(e){const{origin:t,refs:n,thread:a,setError:s}=e,{interview:o,setInterview:c}=a,[d,m]=k.useState(""),h=k.useCallback(async()=>{const x=n.sessionRef.current;if(!x)return;const y=window.prompt("Task ID(例如 2026-07-26-my-task)")?.trim();if(!y)return;const E=await fetch(`${t}/api/operator/v1/chat/sessions/${x.sessionId}/interviews`,{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":er()},credentials:"include",body:JSON.stringify({taskId:y})}),N=await E.json();if(!E.ok){s(N.error?.message??`HTTP ${E.status}`);return}c({interviewSessionId:N.interview?.sessionId,taskId:y,state:N.interview?.state,question:N.question,draft:N.draft?.draft,draftSha256:N.draft?.draftSha256,assessment:N.assessment})},[t,n,c,s]),p=k.useCallback(async x=>{const y=n.sessionRef.current;if(!y||!o?.interviewSessionId||!o.question)return;const E=await fetch(`${t}/api/operator/v1/chat/sessions/${y.sessionId}/interviews/${o.interviewSessionId}/answers`,{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":er()},credentials:"include",body:JSON.stringify({questionId:o.question.id,response:x,...x==="override"?{text:d}:{}})}),N=await E.json();if(!E.ok){s(N.error?.message??`HTTP ${E.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,o,d,c,s]),b=k.useCallback(async()=>{const x=n.sessionRef.current;if(!x||!o?.interviewSessionId||!o.taskKindRecommendation)return;const y=await fetch(`${t}/api/operator/v1/chat/sessions/${x.sessionId}/interviews/${o.interviewSessionId}/task-kind/confirm`,{method:"POST",headers:{"Content-Type":"application/json","x-loop-console-confirmation":er()},credentials:"include",body:JSON.stringify({taskKind:o.taskKindRecommendation})}),E=await y.json();if(!y.ok){s(E.error?.message??`HTTP ${y.status}`);return}c(N=>({...N??{},confirmedTaskKind:N?.taskKindRecommendation,taskKindRecommendation:void 0,draft:E.draft?.draft,draftSha256:E.draft?.draftSha256,assessment:E.assessment}))},[t,n,o,c,s]);return{interviewAnswer:d,setInterviewAnswer:m,startInterview:h,answerInterview:p,confirmTaskKind:b}}function HM(e){const{origin:t,refs:n,sessionId:a,setError:s}=e,[o,c]=k.useState({}),[d,m]=k.useState(new Set),[h,p]=k.useState(null),[b,x]=k.useState([]),[y,E]=k.useState(null),[N,R]=k.useState(!1),C=k.useRef(new Set);C.current=d;const I=k.useCallback(async(W="")=>{try{p(null);const z=await fetch(`${t}/api/operator/v1/chat/repo/tree?path=${encodeURIComponent(W)}`,{credentials:"include"}),U=await z.json();if(!z.ok)throw new Error(U.error?.message??"无法读取仓库目录");c(H=>({...H,[W]:U.data?.entries??[]}))}catch(z){p(z instanceof Error?z.message:String(z))}},[t]);k.useEffect(()=>{I()},[I]);const[O,X]=k.useState(0),q=k.useCallback(()=>{X(W=>W+1)},[]);k.useEffect(()=>{const W=["",...C.current];for(const z of W)I(z)},[I,O]),k.useEffect(()=>{const W=()=>{document.hidden||q()};return document.addEventListener("visibilitychange",W),()=>document.removeEventListener("visibilitychange",W)},[q]);const A=k.useCallback(async W=>{R(!0);try{const z=await fetch(`${t}/api/operator/v1/chat/repo/file?path=${encodeURIComponent(W)}`,{credentials:"include"}),U=await z.json();if(!z.ok||!U.data)throw new Error(U.error?.message??"无法预览文件");x(H=>{const te=[...H.filter(K=>K.path!==U.data.path),U.data],G=n.sessionRef.current?.sessionId;return G&&window.localStorage.setItem(`${Yr}.previews.${G}`,JSON.stringify(te.map(K=>K.path))),te}),E(U.data.path)}catch(z){s(z instanceof Error?z.message:String(z))}finally{R(!1)}},[t,n,s]);k.useEffect(()=>{if(!a)return;let W=[];try{const z=JSON.parse(window.localStorage.getItem(`${Yr}.previews.${a}`)??"[]");Array.isArray(z)&&(W=z.filter(U=>typeof U=="string").slice(0,10))}catch{}W.length&&Promise.all(W.map(async z=>{const U=await fetch(`${t}/api/operator/v1/chat/repo/file?path=${encodeURIComponent(z)}`,{credentials:"include"});if(U.ok)return(await U.json()).data})).then(z=>{if(n.sessionRef.current?.sessionId!==a)return;const U=z.filter(H=>!!H);x(U),E(U.at(-1)?.path??null)})},[t,a,n]);const F=k.useCallback(W=>{m(z=>{const U=new Set(z);return U.has(W)?U.delete(W):U.add(W),U}),o[W]||I(W)},[o,I]),J=k.useCallback(W=>{x(z=>{const U=z.filter(H=>H.path!==W);return a&&window.localStorage.setItem(`${Yr}.previews.${a}`,JSON.stringify(U.map(H=>H.path))),U}),E(z=>z===W?b.find(U=>U.path!==W)?.path??null:z)},[b,a]);return{tree:o,expandedDirs:d,treeError:h,previews:b,activePreviewPath:y,setActivePreviewPath:E,previewLoading:N,setPreviews:x,loadTree:I,refreshTree:q,openPreview:A,closePreview:J,toggleDir:F}}const FM=["operator","web","extension","prompt","skill"];function PM(e){const t=[];for(const n of FM){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:T_[n],items:a})}return t}function $M(e,t){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<0?0:e>=t?t-1:e}function GM(e){return e==="comfortable"?3:e==="compact"?2:1}function v2(e,t,n,a){const s=t.findIndex(b=>b.items.some(x=>x.globalIndex===e));if(s<0)return e;const o=t[s],c=o.items.findIndex(b=>b.globalIndex===e);if(c<0)return e;const d=Math.floor(c/n),m=c%n;if(a==="left"||a==="right"){if(n<=1)return e;const x=c+(a==="left"?-1:1);return x<0||x>=o.items.length||Math.floor(x/n)!==d?e:o.items[x].globalIndex}const h=a==="up"?-1:1,p=c+h*n;if(p>=0&&p<o.items.length)return o.items[p].globalIndex;for(let b=s+h;b>=0&&b<t.length;b+=h){const x=t[b];if(x.items.length===0)continue;const y=Math.floor((x.items.length-1)/n)*n,E=a==="up"?y+m:m;return E>=x.items.length?e:x.items[E].globalIndex}return e}function KM(e,t,n){const a=(e.left+e.right)/2;let s=null;for(const o of t){if(o.globalIndex===e.globalIndex)continue;const c=n==="up"?e.top-o.bottom:o.top-e.bottom;if(c<0)continue;const d=(o.left+o.right)/2,m=Math.abs(d-a);(s===null||c<s.gap||c===s.gap&&m<s.dist||c===s.gap&&m===s.dist&&o.globalIndex<s.index)&&(s={gap:c,dist:m,index:o.globalIndex})}return s?.index??null}function VM(e){const{origin:t,sessionId:n,refs:a,setError:s}=e,[o,c]=k.useState(""),[d,m]=k.useState([]),[h,p]=k.useState([]),[b,x]=k.useState(!1),y=k.useCallback(_=>{if(typeof _=="function"){c(ne=>{const de=_(ne);return x(de.startsWith("/")),de});return}c(_),x(_.startsWith("/"))},[]),[E,N]=k.useState(0),[R,C]=k.useState([]),[I,O]=k.useState(!1),[X,q]=k.useState(null),[A,F]=k.useState(0),J=k.useRef(null),W=k.useRef(n),z=k.useRef(0),U=k.useCallback(_=>{y(_),x(_.startsWith("/")),N(0)},[]);k.useLayoutEffect(()=>{W.current=n,z.current+=1,C([]),q(null),O(!1)},[n]);const H=k.useCallback(async()=>{if(!n){C([]),q(null),O(!1);return}const _=n,ne=z.current;W.current=_,O(!0),q(null);const de=()=>W.current===_&&z.current===ne;try{const se=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(_)}/commands`,{credentials:"include"});if(!de())return;if(!se.ok){q("动态命令加载失败"),C([]);return}const ae=await se.json().catch(()=>null),we=[];for(const ze of ae?.commands??[]){const Me=ze.source;if(Me!=="extension"&&Me!=="prompt"&&Me!=="skill")continue;const Se=String(ze.command??ze.name??"").trim();Se&&we.push({command:Se.startsWith("/")?Se:`/${Se}`,label:String(ze.label??ze.name??Se),description:String(ze.description??""),source:Me})}if(!de())return;C(we);const be=typeof ae?.warning=="string"?ae.warning.trim():"";q(be?be.slice(0,160):null)}catch{if(!de())return;q("动态命令加载失败"),C([])}finally{de()&&O(!1)}},[t,n]);k.useEffect(()=>{n&&(!b&&A===0||H())},[n,b,A,H]);const te=k.useCallback(()=>{F(_=>_+1),H()},[H]);k.useEffect(()=>{if(!n)return;const _=o.slice(0,J.current?.selectionStart??o.length).match(/(?:^|\s)@([^\s@]*)$/);if(!_){m([]);return}const ne=window.setTimeout(()=>{fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(n)}/files?q=${encodeURIComponent(_[1]??"")}`).then(de=>de.ok?de.json():null).then(de=>m((de?.files??[]).map(se=>se.path)))},150);return()=>window.clearTimeout(ne)},[t,n,o]);const G=k.useCallback(_=>{const ne=J.current?.selectionStart??o.length,se=o.slice(0,ne).search(/@[^\s@]*$/);se<0||(y(`${o.slice(0,se)}@${_} ${o.slice(ne)}`),m([]))},[o]),K=k.useCallback(_=>{for(const ne of Array.from(_).slice(0,4)){if(!ne.type.startsWith("image/")||ne.size>5*1024*1024){s("图片仅支持 PNG/JPEG/GIF/WebP,单张不超过 5 MiB");continue}const de=new FileReader;de.onload=()=>{const se=String(de.result??""),ae=se.slice(se.indexOf(",")+1);p(we=>[...we,{name:ne.name,type:"image",mimeType:ne.type,data:ae}].slice(0,4))},de.readAsDataURL(ne)}},[s]),$=k.useCallback(_=>{p(ne=>ne.filter(de=>de!==_))},[]);k.useLayoutEffect(()=>{const _=J.current;_&&(_.style.height="auto",_.style.height=`${Math.min(_.scrollHeight,280)}px`)},[o]),k.useEffect(()=>{if(!n)return;const _=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":er()},body:JSON.stringify({text:o})})},400);return()=>window.clearTimeout(_)},[t,n,o]);const ee=k.useMemo(()=>k_(R),[R]),oe=k.useMemo(()=>o.startsWith("/")?E_(ee,o):[],[o,ee]);k.useEffect(()=>{N(_=>$M(_,oe.length))},[oe.length]);const ce=k.useCallback(()=>{a.isComposingRef.current=!0},[a]),j=k.useCallback(()=>{a.isComposingRef.current=!1,a.compositionEndedAtRef.current=Date.now()},[a]),D=k.useCallback(()=>a.isComposingRef.current,[a]),P=k.useCallback(()=>Date.now()-a.compositionEndedAtRef.current<100,[a]);return k.useEffect(()=>{D8({origin:t,sessionId:n,refs:a})},[t,n,a]),{input:o,setInput:y,handleInputChange:U,fileOptions:d,pendingImages:h,setPendingImages:p,addImagesFromFiles:K,removeImage:$,shortcutOpen:b,setShortcutOpen:x,shortcutIndex:E,setShortcutIndex:N,filteredShortcuts:oe,dynamicCommandsLoading:I,dynamicCommandsError:X,retryDynamicCommands:te,insertFileReference:G,textareaRef:J,onCompositionStart:ce,onCompositionEnd:j,isComposingNow:D,recentlyComposedNow:P}}const YM=[{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 XM(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=[...YM];return{explore:n,operator:t,total:n.length+t.length}}let ZM=0;function WM(e){const{origin:t,session:n,setSession:a,refs:s,setError:o}=e,[c,d]=k.useState(null),[m,h]=k.useState([]),[p,b]=k.useState("idle"),[x,y]=k.useState(null),[E,N]=k.useState([]),[R,C]=k.useState(null),[I,O]=k.useState(null),[X,q]=k.useState(!1),[A,F]=k.useState(!1),[J,W]=k.useState(!1),z=k.useRef(null),U=k.useRef(null),H=k.useRef(0);k.useEffect(()=>{H.current=-1,q(!1)},[n?.sessionId,q]);const G=il().snapshot,K=k.useCallback(async()=>{try{const se=await fetch(`${t}/api/operator/v1/chat/capabilities`);if(!se.ok)return;const ae=await se.json();d(ae)}catch{}},[t]);k.useEffect(()=>{K()},[K]);const $=k.useCallback(async()=>{if(!n){h([]),b("idle");return}const se=n.sessionId;b("loading"),y(null);try{const ae=await fetch(`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(se)}/models`,{credentials:"include"}),we=await ae.json().catch(()=>null);if(s.sessionRef.current?.sessionId!==se)return;if(!ae.ok||!we){b("error"),y(we?.error?.message??`模型列表读取失败(HTTP ${ae.status})`);return}h(we.models??[]),N(we.thinkingLevels??[]),b("ready")}catch(ae){if(s.sessionRef.current?.sessionId!==se)return;b("error"),y(ae instanceof Error?ae.message:String(ae))}},[t,n,s]);k.useEffect(()=>{$()},[$]),k.useEffect(()=>{if(!n){C(null),O(null);return}const se=n.sessionId,ae=`${t}/api/operator/v1/chat/sessions/${encodeURIComponent(se)}`;O(null),fetch(`${ae}/runtime-context`,{credentials:"include"}).then(async we=>{const be=await we.json().catch(()=>null);if(!be?.context||s.sessionRef.current?.sessionId!==se)return;const ze=be.context,Me=z8().snapshot;C(Se=>M8(Se,ze,Me,se))}).catch(()=>{s.sessionRef.current?.sessionId===se&&O("注入上下文读取失败,请重试")})},[t,n?.sessionId,s]),k.useEffect(()=>{if(!G||!n||G.sessionId!==n.sessionId)return;const se=O2(G);a(ae=>{if(!ae||ae.sessionId!==G.sessionId||DI(ae,se))return ae;const we=R6(ae,se);return s.sessionRef.current=we,we}),C(ae=>{if(!ae)return ae;const we={...ae,...se.model?{model:se.model}:{},...se.thinkingLevel?{thinkingLevel:se.thinkingLevel}:{}};return we.model?.provider===ae.model?.provider&&we.model?.modelId===ae.model?.modelId&&we.thinkingLevel===ae.thinkingLevel?ae:we})},[G,n?.sessionId,s,a,C]);const ee=k.useCallback(async se=>{if(!n)return!1;const ae=n.sessionId,we=++ZM;H.current=we,L2({type:"mutation-start",token:we}),q(!0);try{const be=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":er()},body:JSON.stringify(se)}),ze=await be.json().catch(()=>({}));return H.current!==we?!1:be.ok?!ze.session||s.sessionRef.current?.sessionId!==ae?!1:j8(we,ae,ze.snapshot):(s.sessionRef.current?.sessionId===ae&&(o(ze.error?.message??`模型或思考等级切换失败(HTTP ${be.status})`),el()),!1)}catch(be){return H.current!==we||s.sessionRef.current?.sessionId===ae&&o(be instanceof Error?be.message:String(be)),!1}finally{L8(we,ae,s)&&H.current===we&&q(!1)}},[t,n,s,a,o]);k.useEffect(()=>{if(!A)return;const se=we=>{const be=z.current;be&&we.target instanceof Node&&!be.contains(we.target)&&F(!1)},ae=we=>{we.key==="Escape"&&F(!1)};return document.addEventListener("mousedown",se),document.addEventListener("keydown",ae),()=>{document.removeEventListener("mousedown",se),document.removeEventListener("keydown",ae)}},[A]),k.useEffect(()=>{if(!J)return;const se=we=>{const be=U.current;be&&we.target instanceof Node&&!be.contains(we.target)&&W(!1)},ae=we=>{we.key==="Escape"&&W(!1)};return document.addEventListener("mousedown",se),document.addEventListener("keydown",ae),()=>{document.removeEventListener("mousedown",se),document.removeEventListener("keydown",ae)}},[J]);const oe=k.useMemo(()=>XM(c),[c]),ce=G?(G.models??[]).map(se=>({provider:se.provider,id:se.id,...se.name?{name:se.name}:{},...se.hasCredentials!==void 0?{hasCredentials:se.hasCredentials}:{}})):m,j=G?.thinkingLevels?.length?G.thinkingLevels.map(se=>se.value):E,D=n?.model??R?.model,P=D?No(D.provider,D.modelId):"",_=G?.selection?.thinkingSelection??n?.thinkingLevel??"",ne=G?.selection?.effectiveThinkingLevel??n?.thinkingLevel??void 0,de=!P||ce.some(se=>No(se.provider,se.id)===P);return{capabilities:c,models:ce,modelsStatus:p,modelsError:x,onRetryModels:()=>{$()},thinkingLevels:j,runtimeContext:R,runtimeContextError:I,onRetryRuntimeContext:()=>{O(null),el()},toolsOpen:A,setToolsOpen:F,runtimeContextOpen:J,setRuntimeContextOpen:W,toolsMenuRef:z,runtimeContextMenuRef:U,switchRuntime:ee,switching:X,toolCatalog:oe,activeModel:D,activeModelRef:P,activeThinkingLevel:_,effectiveThinkingLevel:ne,activeModelListed:de}}const y2={comfortableMin:1450,compactMin:1100};function QM(e){return!Number.isFinite(e)||e<0?"narrow":e>=y2.comfortableMin?"comfortable":e>=y2.compactMin?"compact":"narrow"}const JM={mode:"comfortable",width:1600,landingDensity:"comfortable",emptyHeight:720};function eO(e,t){const[n,a]=k.useState(JM);return k.useEffect(()=>{const s=e.current;if(!s||typeof ResizeObserver>"u")return;const o=()=>{const p=s.getBoundingClientRect().width,b=t?.current??null,x=b?b.getBoundingClientRect().height:720;a({mode:QM(p),width:p,landingDensity:iI(x),emptyHeight:x})};o();const c=new ResizeObserver(()=>o());c.observe(s);let d=null;const m=()=>{const p=t?.current??null;p&&p!==d&&(d&&c.unobserve(d),c.observe(p),d=p,o())};m();const h=window.setInterval(m,250);return()=>{window.clearInterval(h),c.disconnect()}},[e,t]),n}function tO(e="none"){return{active:e}}function Xs(e,t){return{active:t}}function ta(e={active:"none"}){return{active:"none"}}function nO(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 rO=160,aO=120,iO=120;function sO(e){return e?e.operationCards.length+e.humanGateCards.length+e.artifactCards.length:0}function lO(e){const t=sO(e),[n,a]=k.useState(()=>t>0?{phase:"visible",snapshot:e}:{phase:"hidden",snapshot:null}),s=k.useRef(n);s.current=n;const o=k.useMemo(()=>`${e?.sessionId??"none"}:${t}`,[e?.sessionId,t]);return k.useEffect(()=>{const c=[],d=s.current.snapshot;if(!e||t===0){if(!d){a({phase:"hidden",snapshot:null});return}a({phase:"leaving",snapshot:d}),c.push(window.setTimeout(()=>{a({phase:"hidden",snapshot:null})},aO))}else d?d.sessionId!==e.sessionId?(a({phase:"switching",snapshot:e}),c.push(window.setTimeout(()=>{a({phase:"visible",snapshot:e})},iO))):a({phase:"visible",snapshot:e}):(a({phase:"entering",snapshot:e}),c.push(window.setTimeout(()=>{a({phase:"visible",snapshot:e})},rO)));return()=>{for(const m of c)window.clearTimeout(m)}},[e,o,t]),n}function oO(e){const{origin:t,surface:n="standalone"}=e,a=n==="workspace",s=VI(),[o,c]=k.useState(null),[d,m]=k.useState(!1),[h,p]=k.useState(null),[b,x]=k.useState(!0),[y,E]=k.useState(!0),[N,R]=k.useState(()=>tO()),[C,I]=k.useState(null),[O,X]=k.useState(null),[q,A]=k.useState(0),F=k.useRef(null),J=k.useRef(null),W=k.useRef(null),z=k.useRef(null),U=k.useRef(null),H=k.useRef(null),te=k.useRef(null),G=k.useRef(null),K=k.useRef(null),$=k.useRef(()=>{}),ee=k.useRef(null),oe=k.useRef(!1),ce=eO(W,U),j=ce.mode,D=nO(N),P=D.processOpen,_=P,ne=D.runtimeContextOpen,de=D.activityOpen,se=k.useCallback(ue=>{R(Ee=>{const Oe=Ee.active==="process";return(typeof ue=="function"?ue(Oe):ue)?Xs(Ee,"process"):Ee.active==="process"?ta(Ee):Ee})},[]),ae=VM({origin:t,sessionId:h?.sessionId,refs:s,setError:c}),we=k.useMemo(()=>PM(ae.filteredShortcuts),[ae.filteredShortcuts]),be=HM({origin:t,refs:s,sessionId:h?.sessionId,setError:c}),ze=k.useRef(()=>{}),Me=k.useCallback(ue=>{ze.current(ue)},[]),Se=rM({origin:t,refs:s,sessionId:h?.sessionId,setError:c,onReconcile:Me});ze.current=ue=>{const Ee=s.sessionRef.current?.sessionId;Ee&&(async()=>await Se.recoverSession(Ee)?(X({id:Date.now(),message:"已自动恢复:会话事件已重新同步,可继续对话。"}),A(Ue=>Ue+1)):X({id:Date.now(),message:"自动恢复未完成,将在重连时重试。"}))()};const $e=Se.operationCards.length+Se.humanGateCards.length+Se.artifactCards.length,ct=k.useMemo(()=>p6(Se.operationCards).length+Se.humanGateCards.length+Se.artifactCards.length,[Se.operationCards,Se.humanGateCards.length,Se.artifactCards.length]),mt=k.useMemo(()=>h?{sessionId:h.sessionId,operationCards:Se.operationCards,humanGateCards:Se.humanGateCards,artifactCards:Se.artifactCards}:null,[h,Se.operationCards,Se.humanGateCards,Se.artifactCards]),Ze=lO(mt),lt=k.useMemo(()=>B_({operations:Se.operationCards,gates:Se.humanGateCards,artifacts:Se.artifactCards}),[Se.operationCards,Se.humanGateCards,Se.artifactCards]),Tt=k.useCallback(ue=>lt.has(ue),[lt]),St=aI(z,j,h?.sessionId??"no-session"),wt=St.presentation==="sidecar";k.useEffect(()=>{const ue=j==="comfortable"&&N.active==="sidebar-drawer",Ee=wt&&N.active==="activity";(ue||Ee)&&R(Oe=>Oe.active===N.active?ta(Oe):Oe)},[wt,j,N.active]),k.useEffect(()=>{I(null)},[h?.sessionId]),k.useEffect(()=>{$e>0||N.active!=="activity"||R(ue=>ue.active==="activity"?ta(ue):ue)},[$e,N.active]);const Je=k.useCallback(ue=>{ue&&I(ue),wt||R(Ee=>Xs(Ee,"activity"))},[wt]),Nt=k.useCallback(()=>{R(ue=>ue.active==="activity"?ta(ue):ue)},[]),qt=k.useCallback(ue=>{const Ee=J.current;if(!Ee)return;const Ue=Array.from(Ee.querySelectorAll("[data-activity-ref]")).find(jt=>ue.includes(jt.dataset.activityRef??""));if(!Ue){X({id:Date.now(),message:"详细运行记录暂时没有对应的对话位置。"});return}Ue.scrollIntoView({block:"center",behavior:"smooth"}),Ue.classList.add("is-located"),window.setTimeout(()=>Ue.classList.remove("is-located"),1400),wt||Nt()},[wt,Nt]),Fe=dM({origin:t,refs:s,setSession:p,thread:Se,composer:{setInput:ae.setInput,setPendingImages:ae.setPendingImages},browser:{setPreviews:be.setPreviews,setActivePreviewPath:be.setActivePreviewPath},setError:c,setNotice:X,onCompactionChange:m,setProcessOpen:se,setAutoScroll:E}),Xt=qM({origin:t,refs:s,session:h,thread:Se,composer:{setInput:ae.setInput,setPendingImages:ae.setPendingImages},setError:c,setNotice:X,setAutoScroll:E,recoveryVersion:q,watchSessionTitle:Fe.watchSessionTitle}),he=UM({origin:t,refs:s,thread:Se,setError:c}),ve=WM({origin:t,session:h,setSession:p,refs:s,setError:c});k.useEffect(()=>{if(Se.streaming){Fe.refreshSessionList();return}be.refreshTree();const ue=window.setTimeout(()=>{Fe.refreshSessionList()},1200);return()=>window.clearTimeout(ue)},[Se.streaming,Se.turnPhase,Se.deferredTurn?.revision,Se.deferredTurn?.state,Fe.refreshSessionList,be.refreshTree]),k.useEffect(()=>{ve.runtimeContextOpen&&N.active!=="runtime-context"?R(ue=>Xs(ue,"runtime-context")):!ve.runtimeContextOpen&&N.active==="runtime-context"&&R(ue=>ta(ue))},[ve.runtimeContextOpen,N.active]),k.useEffect(()=>{N.active!=="runtime-context"&&ve.runtimeContextOpen&&ve.setRuntimeContextOpen(!1)},[N.active]),k.useEffect(()=>{if(!P&&!ne)return;const ue=Ee=>{if(Ee.target instanceof Node){if(P){const Oe=document.getElementById("oc-process-panel"),Ue=te.current;!Oe?.contains(Ee.target)&&!Ue?.contains(Ee.target)&&se(!1)}if(ne){const Oe=document.getElementById("oc-runtime-context-panel"),Ue=G.current;!Oe?.contains(Ee.target)&&!Ue?.contains(Ee.target)&&(ve.setRuntimeContextOpen(!1),R(jt=>jt.active==="runtime-context"?ta(jt):jt))}}};return document.addEventListener("mousedown",ue),()=>document.removeEventListener("mousedown",ue)},[P,ne,se,ve.setRuntimeContextOpen]),k.useEffect(()=>{Se.streaming&&N.active==="process"&&R(ta)},[Se.streaming,N.active]);const{sendPrompt:qe,handleStop:We,cancelDeferredTurn:nt}=Xt,$t=k.useRef(()=>{}),Zt=k.useCallback(async ue=>{const Ee=Wy(ue);if(Ee&&Ee.action!=="unknown"&&Ee.action!=="pi-prompt"){$t.current(ue);return}await qe(ue,ae.pendingImages)},[qe,ae.pendingImages]);$.current=ue=>{Zt(ue)};const Pt=k.useCallback(()=>{ae.textareaRef.current?.focus()},[ae.textareaRef]),rt=k.useCallback(()=>{R(ue=>ue.active==="sidebar-drawer"?ta(ue):ue)},[]),on=k.useCallback(()=>{ve.setRuntimeContextOpen(!1),R(ue=>Xs(ue,"sidebar-drawer"))},[ve.setRuntimeContextOpen]),yt=k.useCallback(ue=>{Fe.activateSession(ue),rt(),queueMicrotask(()=>{J.current?.focus?.(),Pt()})},[Fe,rt,Pt]),Xn=k.useCallback(ue=>{ae.setInput(Ee=>`${Ee}${Ee&&!Ee.endsWith(" ")?" ":""}@${ue} `),rt(),queueMicrotask(()=>Pt())},[ae,rt,Pt]),Sn=k.useCallback(ue=>{be.openPreview(ue),rt()},[be,rt]),st=k.useCallback(()=>{const ue=J.current;if(!ue)return;const Ee=ue.scrollHeight-ue.scrollTop-ue.clientHeight<80;E(Ee)},[]);k.useEffect(()=>{y&&F.current?.scrollIntoView({behavior:"smooth",block:"end"})},[Se.messages,y,Se.streaming]),k.useEffect(()=>{if(!O)return;const ue=window.setTimeout(()=>X(null),6500);return()=>window.clearTimeout(ue)},[O]);const Ve=o?{id:O?.id??1,kind:"error",message:o}:O?{id:O.id,kind:"info",message:O.message}:null,xt=k.useCallback(ue=>{if(ue.action==="pi-prompt"||ue.command==="/name"||ue.command==="/compact"){ae.setInput(`${ue.command} `),ae.setShortcutOpen(!1),ae.textareaRef.current?.focus();return}$t.current(ue.command)},[ae]),Dt=k.useCallback(ue=>{const Ee=Wy(ue),Oe=ue.trim(),Ue=Oe.split(/\s+/,1)[0]?.toLowerCase()??"";if(ae.setInput(""),ae.setShortcutOpen(!1),!Ee)return;if(Ee.action==="focus:interview"){if(!h){X({id:Date.now(),message:"请先创建或打开一个会话,再开始 Interview"});return}he.startInterview();return}const jt=S_(Ee.action);if(jt){e.onNavigateWorkspace?.(jt,{});return}if(Ee.action==="compact"){const _t=Oe.slice(Ue.length).trim();Fe.compactSession(_t||void 0);return}if(Ee.action==="name"){const _t=Oe.slice(Ue.length).trim(),bn=h?.sessionId;if(!bn){c("当前没有可重命名的会话");return}const Zn=Fe.sessionList.find(Cn=>Cn.sessionId===bn),dr=_t||window.prompt("会话名称",Zn?.title??Zn?.displayTitle??"")||"";dr.trim()&&Fe.updateSession(bn,{title:dr.trim()});return}if(Ee.action==="session"){const _t=h?.sessionId??"(none)",bn=Fe.sessionList.find(dr=>dr.sessionId===_t),Zn=bn?.title||bn?.displayTitle||"未命名对话";X({id:Date.now(),message:`当前会话:${Zn}(${_t})`});return}if(Ee.action==="copy"){const bn=[...Se.visibleMessages??[]].reverse().find(Zn=>Zn.role==="assistant");if(!bn?.text){c("没有可复制的助手消息");return}navigator.clipboard?.writeText(bn.text).then(()=>X({id:Date.now(),message:"已复制最后一条助手消息"}),()=>c("复制失败"));return}if(Ee.action==="unknown"){qe(Oe,ae.pendingImages);return}c(`未知 shortcut:${Ee.command}`)},[ae.setInput,ae.setShortcutOpen,ae.pendingImages,he.startInterview,e.onNavigateWorkspace,Fe,h,Se.visibleMessages,qe]);$t.current=Dt;const Wt=k.useCallback(ue=>{const Ee=s.isComposingRef.current||ue.nativeEvent.isComposing,Oe=Date.now()-s.compositionEndedAtRef.current<100;if(ae.shortcutOpen&&ae.filteredShortcuts.length>0&&!Ee&&!Oe){if(ue.key==="ArrowLeft"||ue.key==="ArrowRight"||ue.key==="ArrowUp"||ue.key==="ArrowDown"){ue.preventDefault();const Ue=GM(j);let jt=ae.shortcutIndex;if(ue.key==="ArrowLeft"||ue.key==="ArrowRight")jt=v2(ae.shortcutIndex,we,Ue,ue.key==="ArrowLeft"?"left":"right");else{const _t=ee.current;let bn=null;if(_t){const Zn=Array.from(_t.querySelectorAll("[data-shortcut-index]")).map(Cn=>{const sn=Cn.getBoundingClientRect();return{globalIndex:Number(Cn.dataset.shortcutIndex??-1),top:sn.top,bottom:sn.bottom,left:sn.left,right:sn.right}}).filter(Cn=>Number.isFinite(Cn.globalIndex)&&Cn.globalIndex>=0),dr=Zn.find(Cn=>Cn.globalIndex===ae.shortcutIndex)??null;dr&&(bn=KM(dr,Zn,ue.key==="ArrowUp"?"up":"down"))}jt=bn??v2(ae.shortcutIndex,we,Ue,ue.key==="ArrowUp"?"up":"down")}jt!==ae.shortcutIndex&&(oe.current=!0,ae.setShortcutIndex(jt));return}if(ue.key==="Escape"){ue.preventDefault(),ae.setShortcutOpen(!1);return}if(ue.key==="Enter"||ue.key==="Tab"){ue.preventDefault();const Ue=ae.filteredShortcuts[ae.shortcutIndex]??ae.filteredShortcuts[0];xt(Ue);return}}if(ue.key==="Enter"&&!ue.shiftKey&&(Ee||Oe)){Oe&&ue.preventDefault();return}if(ue.key==="Enter"&&!ue.shiftKey){if(ue.preventDefault(),s.streamingRef.current)return;Zt(ae.input);return}},[ae.input,ae.shortcutOpen,ae.filteredShortcuts,ae.shortcutIndex,ae.setShortcutIndex,ae.setShortcutOpen,s,Zt,xt,j,we,ee,oe]),Z=Se.visibleMessages.length>0||Se.operationCards.length>0||Se.humanGateCards.length>0||Se.artifactCards.length>0||!!Se.interview,xe=e.readiness==="setup-required"?"⚠ Pi 未就绪(setup-required):Chat 需要先完成 Pi 认证 / 模型配置。":e.readiness==="degraded"?"⚠ Pi 降级(degraded):可继续对话,但部分能力不可用。":null,je=f.jsx(Sw,{origin:t,open:b,layoutMode:j,drawerOpen:D.sidebarDrawerOpen,activeSessionId:h?.sessionId,activeSessionStreaming:Se.streaming,activeSessionTurnPhase:Se.turnPhase,sessions:Fe.sessionList,tree:be.tree,expanded:be.expandedDirs,treeError:be.treeError,onToggleOpen:()=>x(ue=>!ue),onOpenDrawer:on,onCloseDrawer:rt,onCreate:()=>{Fe.createSession()},creatingSession:Fe.creatingSession,onActivate:ue=>{D.sidebarDrawerOpen?yt(ue):Fe.activateSession(ue)},onRename:(ue,Ee)=>{Fe.updateSession(ue,{title:Ee})},onSetState:(ue,Ee)=>{Fe.updateSession(ue,{state:Ee})},onDelete:ue=>Fe.deleteSession(ue),onRefreshTree:be.refreshTree,onToggleDir:be.toggleDir,onInsert:ue=>{D.sidebarDrawerOpen?Xn(ue):ae.setInput(Ee=>`${Ee}${Ee&&!Ee.endsWith(" ")?" ":""}@${ue} `)},onPreview:ue=>{D.sidebarDrawerOpen?Sn(ue):be.openPreview(ue)},drawerTriggerRef:H}),et=["oc-workspace",P&&!_?"has-process":"",_?"has-process-overlay":""].filter(Boolean).join(" "),gt=ue=>f.jsx("div",{className:"oc-messages is-empty",ref:U,"data-landing-density":ce.landingDensity,children:f.jsx(k6,{mode:ue,readiness:e.readiness,density:ce.landingDensity,onSuggest:async Ee=>{Fe.creatingSession||(ue==="no-session"?await Fe.createSession()&&await Zt(Ee):await Zt(Ee))},disabled:Fe.creatingSession,onCreateSession:ue==="no-session"?()=>{Fe.createSession()}:void 0})});return f.jsxs("div",{className:"oc-shell",children:[a?null:f.jsxs("div",{className:"oc-banner",children:[f.jsxs("span",{className:"oc-banner-title",children:[f.jsx("span",{className:"oc-banner-dot","aria-hidden":"true"}),"对话"]}),f.jsxs("span",{className:"oc-banner-body",children:["用自然语言编排 loop-agent / agent-worker 的",f.jsx("strong",{children:"全部能力"}),"。这是 ",f.jsx("strong",{children:"Operator"})," 面:默认具备完整 Pi 工具(read/write/edit/bash/grep/find/ls)与 safe-* 探查、以及受策略约束的 operator action(ADR 0011)。",f.jsx("strong",{children:"软约束"}),":大改与高风险变更优先走受治 DAG 的 implement-pi / repair-pi 与 Human Gate,而非把 Chat 当作第二套 DAG kernel。"]})]}),xe&&f.jsx("div",{className:"oc-alert oc-alert-warning",children:xe}),f.jsx(iM,{toast:Ve,onDismiss:()=>{c(null),X(null)}}),h?f.jsxs("div",{className:et,ref:W,"data-layout-mode":j,children:[je,f.jsxs("div",{ref:z,className:`oc-main${Z?"":" is-landing"}`,children:[!wt&&(j==="narrow"||$e>0)?f.jsxs("div",{className:"oc-main-topbar",children:[j==="narrow"?f.jsx("button",{type:"button",className:"oc-main-topbar-btn",ref:H,"aria-label":"打开会话与仓库","aria-expanded":D.sidebarDrawerOpen,onClick:()=>D.sidebarDrawerOpen?rt():on(),children:"会话与仓库"}):null,$e>0?f.jsxs("button",{type:"button",className:"oc-main-topbar-btn oc-activity-trigger",ref:K,"aria-controls":"oc-activity-rail","aria-expanded":de,onClick:()=>de?Nt():Je(),children:["运行活动 ",f.jsx("span",{children:ct})]}):null]}):null,f.jsx(w_,{previews:be.previews,activePath:be.activePreviewPath,loading:be.previewLoading,onActivate:be.setActivePreviewPath,onClose:be.closePreview}),Z?f.jsx(II,{scrollContainerRef:J,messagesEndRef:F,onScroll:st,hasThread:Z,readiness:e.readiness,streaming:Se.streaming,streamingAssistantId:Se.streamingAssistantId,messagesCount:Se.messages.length,visibleCount:Se.visibleMessages.length,onLoadMore:()=>Se.setHistoryLimit(ue=>ue+50),turnGroups:Se.turnGroups,interview:Se.interview,interviewAnswer:he.interviewAnswer,onInterviewAnswerChange:he.setInterviewAnswer,onAnswerInterview:ue=>{he.answerInterview(ue)},onConfirmTaskKind:()=>{he.confirmTaskKind()},onActivateActivity:Je,canActivateActivity:Tt,onSuggest:ue=>{Zt(ue)}}):gt("empty-session"),f.jsx(PI,{composer:ae,streaming:Se.streaming,turnPhase:Se.turnPhase,deferredTurn:Se.deferredTurn,hasThread:Z,layoutMode:j,paletteModel:we,shortcutPaletteRef:ee,paletteKeyboardNavRef:oe,onSend:ue=>{Zt(ue)},onStop:We,onCancelDeferred:nt,onKeyDown:Wt,onRunShortcut:Dt,models:ve.models,activeModel:ve.activeModel,activeModelRef:ve.activeModelRef,activeModelListed:ve.activeModelListed,activeThinkingLevel:ve.activeThinkingLevel,thinkingLevels:ve.thinkingLevels,onSwitchRuntime:ue=>{ve.switchRuntime(ue)},usage:Se.usage,unread:Se.unread,onCompact:()=>{Fe.compactSession()},compacting:d,processSummary:Se.streaming?null:Se.processSummary,processOpen:P,onToggleProcess:()=>{R(ue=>ue.active==="process"?ta(ue):Xs(ue,"process")),P||ve.setRuntimeContextOpen(!1)},processTriggerRef:te,runtimeContext:ve.runtimeContext,runtimeContextOpen:ne,onToggleRuntimeContext:()=>{ne?(ve.setRuntimeContextOpen(!1),R(ue=>ue.active==="runtime-context"?ta(ue):ue)):(ve.setRuntimeContextOpen(!0),R(ue=>Xs(ue,"runtime-context")))},runtimeContextTriggerRef:G})]}),$e>0&&!wt&&de?f.jsx("button",{type:"button",className:"oc-overlay-backdrop is-activity","aria-label":"关闭运行活动遮罩",onClick:Nt}):null,Ze.snapshot?f.jsx(tI,{origin:t,sessionId:Ze.snapshot.sessionId,presentation:St.presentation,sidecarRect:St.sidecarRect,phase:Ze.phase,open:de,focusRef:C,triggerRef:K,operationCards:Ze.snapshot.operationCards,humanGateCards:Ze.snapshot.humanGateCards,artifactCards:Ze.snapshot.artifactCards,onClose:Nt,onLocateConversation:qt,onNavigateWorkspace:e.onNavigateWorkspace}):null,ne&&ve.runtimeContext?f.jsx(KI,{panelOnly:!0,open:ne,onToggle:()=>{},onClose:()=>{ve.setRuntimeContextOpen(!1),R(ue=>ue.active==="runtime-context"?ta(ue):ue)},context:ve.runtimeContext,triggerRef:G}):null,P&&f.jsx($I,{toolCalls:Se.toolCalls,overlay:_,onClose:()=>se(!1),triggerRef:te})]}):f.jsxs("div",{className:et,ref:W,"data-layout-mode":j,children:[je,f.jsxs("div",{className:"oc-main is-landing",children:[j==="narrow"?f.jsx("div",{className:"oc-main-topbar",children:f.jsx("button",{type:"button",className:"oc-main-topbar-btn",ref:H,"aria-label":"打开会话与仓库","aria-expanded":D.sidebarDrawerOpen,onClick:()=>D.sidebarDrawerOpen?rt():on(),children:"会话与仓库"})}):null,gt("no-session")]})]})]})}function cO(e){return e==="validate"||e==="apply"||e==="spine"?"contract":e}const wp="X-Loop-Console-Confirmation",M6="agent-worker console doctor --repo .",Sp=["LOW","MED","HIGH"];function uO(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 dO(e){const t={};for(const n of Sp){const a=uO(e[n]);a&&(t[n]=a)}return t}function x2(e){return{LOW:e?.LOW?.value??"",MED:e?.MED?.value??"",HIGH:e?.HIGH?.value??""}}function fO(e){return Sp.every(t=>e[t]===void 0)}const Ah=[{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)"}],O6={"setup-required":"需要设置",ready:"已就绪",degraded:"降级可用",unknown:"未知"},mO={idle:"未探测",match:"匹配",mismatch:"仓库不匹配",unavailable:"不可用"},D6={low:"低",medium:"中",high:"高"},j6={"validation-failed":"校验失败","contract-drift":"契约漂移","runtime-mismatch":"运行时不匹配","pause-on-human":"等待人工","verification-failed":"验证失败","orphan-unknown":"孤立/未知","terminal-failed":"已终止(失败)","terminal-succeeded":"已终止(成功)","needs-reconcile":"需要对账","running-active":"正在运行"},hO={idle:"空闲","not-started":"未开始","not-run":"未运行","n/a (MVP)":"不适用(MVP)",accepted:"已接受",succeeded:"已成功",running:"运行中",ran:"已执行"};function uu(e){return hO[e]??e}function kp(){return window.__CONSOLE_CONFIRMATION_TOKEN__??""}function Ou(e){return`${e}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}async function Du(e,t={},n){const a={"Content-Type":"application/json",[wp]:kp()},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 o={};try{o=await s.json()}catch{o={ok:!1,error:{code:"INVALID_INPUT",message:"操作响应不是合法 JSON"}}}return{status:s.status,body:o}}const pO=new Set(["runDag","dagRerun","dagReconcileRun","dagRequestInterrupt","standaloneTaskRerun"]);function $m(e,t){return _6({blockedReasons:e.blockedReasons,blockingNodes:e.blockingNodes,fallbackMessage:t})}async function w2(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(),o=s.operation??s,c=o.state??"";if(c==="succeeded"||c==="failed"||c==="needs-reconcile"||c==="timed-out")return o;await new Promise(d=>setTimeout(d,250))}return{state:"needs-reconcile",errorMessage:"等待操作结果超时"}}const gO={};function bO(){const[e,t]=k.useState(()=>y6({env:gO?.VITE_OPERATOR_CHAT_DEFAULT_LANDING,storage:window.localStorage,location:window.location})),[n,a]=k.useState(null),[s,o]=k.useState("setup-required"),[c,d]=k.useState(null),[m,h]=k.useState(null),[p,b]=k.useState(!1),[x,y]=k.useState(!1),[E,N]=k.useState(null),[R,C]=k.useState(null),[I,O]=k.useState(null),[X,q]=k.useState(null),[A,F]=k.useState({command:"idle",dag:"not-started",verification:"not-run",promote:"n/a (MVP)"}),[J,W]=k.useState("setup"),z=k.useCallback(K=>{W($=>cO(typeof K=="function"?K($):K))},[]),U=s==="setup-required",H=s==="degraded",te=k.useCallback(K=>{K!==e&&(N(null),O(null),C(null)),t(K)},[e]),G=k.useCallback(async()=>{try{const $=await(await fetch("/api/health")).json();a($);const ee=$.piReadiness??"setup-required";o(ee),h(null),z(ee==="ready"||ee==="degraded"?oe=>oe==="setup"?"import-prd":oe:"setup")}catch(K){h(K instanceof Error?K.message:String(K))}try{const $=await(await fetch("/api/operator/v1/readiness")).json();d($),$.state&&o($.state)}catch{}},[z]);return{nav:e,setNav:t,selectNav:te,health:n,readiness:s,setReadiness:o,readinessReport:c,healthError:m,loadHealth:G,busy:p,setBusy:b,observeBusy:x,setObserveBusy:y,opError:E,setOpError:N,opMessage:R,setOpMessage:C,opErrorCode:I,setOpErrorCode:O,lastOpState:X,setLastOpState:q,layers:A,setLayers:F,step:J,setStep:z,setupBlocked:U,degraded:H}}const vO={bootstrapFromPrd:"正在导入 PRD 并创建任务:归档文档 → 确定性解析 → 语义结构化(MED→HIGH→LOW,每档最多 300 秒,请勿关闭页面)",importPrd:"正在导入 PRD:归档文档 → 确定性解析 → 语义结构化(MED→HIGH→LOW,每档最多 300 秒,请勿关闭页面)",interviewStart:"正在启动需求访谈…",interviewTurn:"正在提交访谈回答…",interviewSkip:"正在跳过访谈并生成评估…",contractValidate:"正在校验契约草稿…",contractDiff:"正在计算契约差异…",contractApply:"正在应用契约(写入需求与执行约束)…",spineCheck:"正在运行 Spine 审计…",dagGenerate:"正在生成 DAG…",standaloneTaskRerun:"正在带反馈重新执行任务:服务端校验资格后生成并启动新 DAG…",workerTaskRetry:"正在重新排队 Worker Task…"};function yO(e){const{shell:t,applyInterviewPayload:n}=e,{setBusy:a,setOpError:s,setOpErrorCode:o,setOpMessage:c,setReadiness:d,setStep:m,setNav:h,setLastOpState:p,setLayers:b,step:x,nav:y}=t,[E,N]=k.useState(null),[R,C]=k.useState([]),[I,O]=k.useState(!0),X=k.useRef(null),[q,A]=k.useState(null),[F,J]=k.useState(null),W=k.useCallback(async(G,K={},$)=>{a(!0),s(null),o(null),c(vO[G]??null);try{const{status:ee,body:oe}=await Du(G,K,$?.clientRequestId);if(ee===412||oe.error?.code==="PI_SETUP_REQUIRED")return s(qa(oe.error?.message??"Pi 未就绪或已降级:该操作暂不可用")),o(oe.error?.code??"PI_SETUP_REQUIRED"),d("setup-required"),m("setup"),h("models"),oe;if(ee>=400||oe.ok===!1)return s(qa(oe.error?.message??oe.message??`操作失败(HTTP ${ee})`)),o(oe.error?.code??String(ee)),p(oe.state??`failed:${ee}`),b(D=>({...D,command:oe.error?.message??`failed:${oe.error?.code??ee}`})),oe;if(oe.operationId){const D=window.localStorage.getItem(Yr)?.trim();if(D&&fetch(`/api/operator/v1/chat/sessions/${encodeURIComponent(D)}/operation-links`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json",[wp]:kp()},body:JSON.stringify({operationId:oe.operationId})}).then(P=>{P.ok||console.warn("Operator Chat operation link failed",P.status)}).catch(P=>console.warn("Operator Chat operation link failed",P)),N(oe.operationId),p(oe.state??"accepted"),b(P=>({...P,command:oe.state??"accepted",dag:G==="runDag"?"running":P.dag})),pO.has(G)){O(!0),c(`操作已接受,后台运行中:${oe.operationId}(请看事件流;可同时打开 Observe)`);const P=oe.operationId;w2(P,30*6e4).then(_=>{if(_){if(p(_.state??null),_.state==="failed"||_.state==="needs-reconcile"||_.state==="timed-out"){s(qa(_.errorMessage??_.stderrPreview??`操作失败:${_.state}`)),o(_.errorCode??_.state??null),b(ne=>({...ne,command:`failed:${_.errorCode??_.state}`}));return}_.state==="succeeded"&&(c(`${G} 已成功`),b(ne=>({...ne,command:"succeeded"})))}})}else{c(`操作已接受:${oe.operationId}`);const P=await w2(oe.operationId);if(P){if(p(P.state??null),P.state==="failed"||P.state==="needs-reconcile"||P.state==="timed-out")return s(qa(P.errorMessage??P.stderrPreview??`操作失败:${P.state}`)),o(P.errorCode??P.state??null),b(se=>({...se,command:`failed:${P.errorCode??P.state}`})),{ok:!1,operationId:oe.operationId,state:P.state,error:{code:P.errorCode??P.state??"INTERNAL_ERROR",message:P.errorMessage??P.stderrPreview??`操作失败:${P.state}`}};c(P.errorMessage?`${G}:${P.errorMessage}`:`${G} 已成功`),b(se=>({...se,command:P.state??"succeeded"}));const _=P.result??{},ne={ok:!0,operationId:oe.operationId,state:P.state??"succeeded",result:_};(G==="interviewStart"||G==="interviewTurn"||G==="interviewSkip")&&n(_);const de=_.confirmation;return de?.confirmationId&&(A(de.confirmationId),J(_)),$?.advanceTo&&m($.advanceTo),ne}}}else c(`${G} 已完成`),p(oe.state??"succeeded"),b(D=>({...D,command:"succeeded",verification:G==="contractValidate"||G==="spineCheck"?"ran":D.verification}));const ce=oe.result??{};(G==="interviewStart"||G==="interviewTurn"||G==="interviewSkip")&&n(ce);const j=ce.confirmation;return j?.confirmationId&&(A(j.confirmationId),J(ce)),$?.advanceTo&&m($.advanceTo),oe}catch(ee){s(ee instanceof Error?ee.message:String(ee));return}finally{a(!1)}},[n,a,s,o,c,d,m,h,p,b]),z=k.useCallback(G=>{if(!G)return"无响应";if(G.error?.message)return G.error.message;if(G.message)return G.message;const K=G.result;if(K&&typeof K=="object")try{return JSON.stringify(K).slice(0,1200)}catch{return"已返回结果"}return G.ok===!1?"失败":"成功"},[]),U=k.useCallback(G=>{if(!G||G.ok===!1||G.error)return!1;const K=G.result;if(!K)return!0;if(typeof K.valid=="boolean")return K.valid;const $=K.result;return $&&typeof $.valid=="boolean"?$.valid:!0},[]),H=k.useCallback(async G=>{X.current?.abort();const K=new AbortController;X.current=K,C($=>[...$,`开始跟随事件流 ${G}`]);try{const $=await fetch(`/api/operator/v1/operations/${encodeURIComponent(G)}/events`,{credentials:"same-origin",signal:K.signal});if(!$.ok||!$.body){C(j=>[...j,`事件流 HTTP ${$.status}`]);return}const ee=$.body.getReader(),oe=new TextDecoder;let ce="";for(;I;){const{done:j,value:D}=await ee.read();if(j)break;ce+=oe.decode(D,{stream:!0});const P=ce.split(`
|
|
319
|
+
|
|
320
|
+
`);ce=P.pop()??"";for(const _ of P){const ne=_.split(`
|
|
321
|
+
`).find(se=>se.startsWith("data:"));if(!ne)continue;const de=ne.slice(5).trim();C(se=>[...se.slice(-80),de.slice(0,240)])}}}catch($){$.name!=="AbortError"&&C(ee=>[...ee,`事件流错误:${$ instanceof Error?$.message:String($)}`])}},[I]);k.useEffect(()=>(E&&I&&(x==="run"||y==="recovery")&&H(E),()=>X.current?.abort()),[E,I,x,y,H]);const te=k.useCallback(()=>{O(!1),X.current?.abort(),c("已停止跟随日志(未取消子进程)")},[c]);return{runAction:W,summarizeEnvelope:z,isActionSuccess:U,operationId:E,setOperationId:N,sseLog:R,followSse:I,setFollowSse:O,stopFollowSse:te,confirmationId:q,setConfirmationId:A,confirmationDetails:F,setConfirmationDetails:J}}const _h=8*1024*1024,xO=10*1024*1024,ju=8,wO=".md,.markdown,.txt,text/markdown,text/plain",SO=[".md",".markdown",".txt"],Ep=/\.[^.]+$/;function kO(e){const t=Ep.exec(e.trim());return t?t[0].toLowerCase():""}function EO(e){const t=kO(e);return SO.includes(t)}function Ih(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 TO(e,t){const n=e?Array.from(e):[],a=t?.maxFiles??ju,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 NO(e){const t=e.name?.trim()||"untitled.md";if(!EO(t))return Ba("unsupported-extension","仅支持 .md、.markdown、.txt 文件");if(e.size>_h)return Ba("file-too-large",`文件不能超过 ${Ih(_h)}`);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 CO(e){if(e.length===0)return Ba("file-count","请选择至少一个 .md / .markdown / .txt 文件");if(e.length>ju)return Ba("file-count",`最多支持 ${ju} 个文件`);const t=[];for(const n of e){const a=await NO(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 RO(e,t){const n=e.split(/\r?\n/);for(const s of n){const o=/^(#{1,6})\s+(.+)$/.exec(s.trim());if(o?.[2])return o[2].trim()}for(const s of n){const o=s.trim();if(o&&!/^---+$/.test(o)&&!/^```/.test(o)&&!/^<!--/.test(o))return o.replace(/^>\s+/,"").slice(0,120)}return t.replace(Ep,"").trim()||"需求"}function AO(e){return e.trim().toLowerCase().replace(/[^a-z0-9._-]+/g,"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,"-")||"requirement"}function _O(e,t){const n=e.replace(Ep,"").trim(),a=AO(n);return a==="requirement"&&/[^\u0000-\u007f]/.test(n)?`part-${t+1}`:a==="requirement"?n?`part-${t+1}`:`part-${t+1}`:a}function IO(e){const t=new Set;return e.map((n,a)=>{let s=_O(n.fileName,a);if(t.has(s)){let o=2;for(;t.has(`${s}-${o}`);)o+=1;s=`${s}-${o}`}return t.add(s),{name:s,content:n.text,fileName:n.fileName}})}function MO(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=RO(a.text,a.fileName),c=[`<!-- composed-from: ${e.map(d=>d.fileName).join(", ")} -->`,"",`# ${s}`,""];for(const d of e)c.push(`## 来源:${d.fileName}`,"",d.text.trim(),"");return`${c.join(`
|
|
322
|
+
`).trimEnd()}
|
|
323
|
+
`}function OO(e,t,n){const a={action:e,actionParams:t};return new TextEncoder().encode(JSON.stringify(a)).byteLength<=xO}function DO(){return"最终内容导致请求体超过服务端限制,请缩小文档或减少文件数量"}function jO(){const[e,t]=k.useState(""),[n,a]=k.useState([]),[s,o]=k.useState(0),[c,d]=k.useState(!1),[m,h]=k.useState(null),[p,b]=k.useState(!1),[x,y]=k.useState(!1),E=k.useRef(0),N=k.useRef(0),R=k.useCallback((U,H)=>{const te=U.length===0?0:Math.min(Math.max(0,H),U.length-1);o(te),t(MO(U,{primaryIndex:te})),d(!1)},[]),C=k.useCallback(async U=>{const H=TO(U,{existingCount:n.length});if(H){h(H.message);return}const te=Array.from(U),G=++N.current;b(!0),h(null);try{const K=await CO(te);if(G!==N.current)return;if(!K.ok){h(K.message);return}const $=[...n,...K.documents],ee=n.length===0?0:s;a($),n.length===0||!c?(R($,ee),h(null)):h("已追加文件,未改正文(正文已手动编辑);可点「按文件重新合成」覆盖。")}catch{if(G!==N.current)return;h("文件读取失败,请重试或直接粘贴")}finally{G===N.current&&b(!1)}},[R,c,n,s]),I=k.useCallback(U=>{t(U),n.length>0&&d(!0)},[n.length]),O=k.useCallback(U=>{o(U),c||R(n,U)},[R,c,n]),X=k.useCallback((U,H)=>{const te=U+H,G=[...n],K=G[te];G[te]=G[U],G[U]=K;const $=s===U?te:s===te?U:s;a(G),o($),c||R(G,$)},[R,c,n,s]),q=k.useCallback(U=>{const H=n.filter((G,K)=>K!==U),te=H.length===0?0:Math.min(s>=U?Math.max(0,s-1):s,Math.max(0,H.length-1));a(H),o(te),H.length===0?d(!1):c||R(H,te)},[R,c,n,s]),A=k.useCallback(()=>{a([]),o(0),d(!1),h(null)},[]),F=k.useCallback(()=>{c&&!window.confirm("将用当前文件列表重新合成正文,覆盖你在编辑区的修改。继续?")||(R(n,s),h(null))},[R,c,n,s]),J=k.useCallback((U,H)=>{U.preventDefault(),U.stopPropagation(),!H&&(E.current+=1,y(!0))},[]),W=k.useCallback(U=>{U.preventDefault(),U.stopPropagation(),E.current=Math.max(0,E.current-1),E.current===0&&y(!1)},[]),z=k.useCallback((U,H)=>{U.preventDefault(),U.stopPropagation(),E.current=0,y(!1),!H&&C(U.dataTransfer.files)},[C]);return{prdText:e,setPrdText:t,onPrdTextChange:I,prdDocuments:n,prdPrimaryIndex:s,prdComposedDirty:c,prdFileError:m,setPrdFileError:h,prdFileReading:p,prdDragOver:x,loadPrdFromFiles:C,applyPrdComposition:R,setPrimaryDocument:O,moveDocument:X,removeDocument:q,clearDocuments:A,recomposeDocuments:F,onDragEnter:J,onDragLeave:W,onDrop:z}}const LO={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>"}},S2={"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"]},zO=new Set(["succeeded","failed","timed-out"]);function BO(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=zO.has(e.targetOperationState??"");return n&&a&&s?"已中止。":"正在对账,尚未确认退出。"}return null}function qO(e){return(S2[e]??S2["orphan-unknown"]).map(n=>LO[n])}function UO(e){const t=[],n=[];for(const a of e)a.lane==="worker"?n.push(a):t.push(a);return{dag:t,worker:n}}function HO(e){return typeof e.action=="string"&&e.action.trim().length>0}function L6(e){return qO(e).filter(HO)}function FO(e){const t=new Set(L6(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 PO(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 Tp=new Set(["failed","error","partial_failed"]),z6=new Set(["blocked","paused","awaiting_human"]);function s0(e){return(e??"").trim().toLowerCase()}function $O(e){return Tp.has(s0(e))}function k2(e){const t=s0(e.status);return Tp.has(t)||t.includes("fail")?0:e.lifecycle==="paused"||t==="paused"?1:e.lifecycle==="active"?2:3}function GO(e){return[...e].sort((t,n)=>{const a=k2(t)-k2(n);return a!==0?a:n.mtimeMs-t.mtimeMs})}function KO(e){return GO(e)[0]?.dagRunId}function E2(e){const t=s0(e.status);return Tp.has(t)?0:z6.has(t)?1:2}function B6(e){return[...e].sort((t,n)=>{const a=E2(t)-E2(n);return a!==0?a:t.nodeId.localeCompare(n.nodeId)})}function VO(e){const t=B6(e);return t.find(a=>$O(a.status)||z6.has(s0(a.status)))?.nodeId??t[0]?.nodeId}function YO(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 XO(e){const t=e.status?.trim()||"unknown",n=e.label?.trim();return n&&n!==e.nodeId?`${e.nodeId} · ${t} · ${n}`:`${e.nodeId} · ${t}`}function ZO(e){const n=[`operator-recovery: ${e.actionLabel?.trim()||"恢复"}`],a=e.dagRunId?.trim();if(a){const d=e.runStatus?.trim();n.push(d?`run=${a} (${d})`:`run=${a}`)}const s=e.fromNodeId?.trim();if(s){const d=e.nodeStatus?.trim();n.push(d?`from-node=${s} (${d})`:`from-node=${s}`)}const o=e.factClassLabel?.trim();o&&n.push(`fact=${o}`);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(`
|
|
324
|
+
`).slice(0,500)}function q6(e){const t=e.trim();return t?t==="operator-recovery"||t.startsWith("operator-recovery:")||t.startsWith("recovery:"):!0}async function T2(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 WO(e){const{shell:t,actions:n,taskId:a,dagRunId:s,fromNodeId:o,featureId:c,recoveryReason:d,recoveryReasonTouched:m,recoveryConfirm:h,recoveryPlanSummary:p,interruptReasonCode:b,setRecoveryConfirm:x,setRecoveryPlanSummary:y,setRecoveryReport:E,setRecoveryReason:N,setRecoveryReasonTouched:R,buildCurrentRecoveryReason:C,openFullCanvas:I}=e,{setOpError:O,setOpErrorCode:X,setOpMessage:q,setBusy:A}=t,{runAction:F,isActionSuccess:J}=n,W=k.useCallback(async U=>{if(U.requiresReason||(x(null),y(null)),U.action==="doctor"){E(null),F("doctor",{});return}if(U.action==="dagReport"||U.id==="report"){const H=s.trim();if(H){x(null),y(null);const te=await F("dagReport",{runId:H}),G=te?.result??{},K=(G.raw?.runs??G.runs)?.[0];te&&te.ok!==!1&&!te.error&&K&&(E({runId:K.runId??H,title:K.title,status:K.status,category:K.productLineFailureCategory,recommendation:K.recoveryRecommendation?.summary??K.recommendedFollowUp??void 0}),q(null));return}if(a.trim()){E(null),F("status",{taskId:a});return}O("查看报告需要先选择 DAG 运行 ID(或填写任务 ID)");return}if(U.action==="observeLink"){E(null),I();return}if(U.requiresReason){if(E(null),x(U),y(null),U.id!=="dagRerun"&&(O(null),X(null)),(!m||q6(d))&&(N(C(U.label)),R(!1)),U.id==="dagRerun"&&s.trim()&&o.trim()){A(!0);try{const{status:H,body:te}=await Du("dagRerunPlan",{runId:s.trim(),fromNode:o.trim()}),G=te.result??{};G&&typeof G=="object"&&("eligible"in G||G.planHash)&&y(G),H<400&&te.ok!==!1&&G.eligible!==!1?q(null):G.eligible===!1?O(qa($m(G,te.error?.message))):q(te.error?.message??"无法预检重跑计划;确认后仍将尝试提交(CLI 可能尚未就绪)")}finally{A(!1)}}return}O(null),X(null),q(`${U.label}:请经 CLI — ${U.commandHint??""}`)},[C,s,o,I,d,m,F,A,O,X,q,x,y,E,N,R,a]),z=k.useCallback(async()=>{const U=h;if(!U)return;const H=d.trim();if(!H){O("恢复操作需要结构化原因");return}const te=Ou(`recovery-${U.id}`);if(x(null),U.id==="dagRerun"){const G=s.trim(),K=o.trim();if(!G||!K){O("从失败节点恢复需要 DAG 运行 ID 与起始节点 ID");return}let $=p?.planHash?.trim(),ee=p?.eligible;if(!$||ee===void 0){const oe=await F("dagRerunPlan",{runId:G,fromNode:K}),ce=oe?.result??{};if((ce.planHash||ce.eligible!==void 0)&&y(ce),$=ce.planHash?.trim()||$,ee=ce.eligible,ce.eligible===!1){O(qa($m(ce,oe?.error?.message)));return}if(oe&&oe.ok===!1&&!$){O(oe.error?.message??"无法获取 planHash;请确认 loop-agent dag rerun --plan 可用");return}}if(ee===!1){O(qa($m(p??{})));return}if(!$){O("无法获取 planHash;请确认 loop-agent dag rerun --plan 可用");return}await F("dagRerun",{runId:G,fromNode:K,planHash:$,reason:H},{clientRequestId:te});return}if(U.id==="standaloneTaskRerun"){const G=s.trim();if(!G){O("带反馈重新执行任务需要 DAG 运行 ID");return}await F("standaloneTaskRerun",{runId:G,reason:H,...a.trim()?{taskId:a.trim()}:{}},{clientRequestId:te});return}if(U.id==="workerTaskRetry"){const G=a.trim();if(!G){O("重新排队 Worker Task 需要任务 ID");return}await F("workerTaskRetry",{taskId:G,reason:H,...c.trim()?{featureId:c.trim()}:{}},{clientRequestId:te});return}if(U.id==="interrupt"){const G=s.trim();if(!G){O("中止运行需要 DAG 运行 ID");return}if(H.trim().length<10||H.trim().length>500){O("中止原因去首尾空白后必须是 10–500 个字符,请手写说明,不要用占位句。");return}await T2({runAction:F,isActionSuccess:J,setOpError:O,action:"dagRequestInterrupt",actionParams:{runId:G,reasonCode:b.trim()||"operator-request",reasonDetail:H},clientRequestId:te});return}if(U.id==="reconcile"){const G=s.trim();if(!G){O("对账恢复需要 DAG 运行 ID");return}await T2({runAction:F,isActionSuccess:J,setOpError:O,action:"dagReconcileRun",actionParams:{runId:G,reason:H,reconcileAction:"supersede"},clientRequestId:te});return}q(`${U.label}:请经 CLI — ${U.commandHint??""}`)},[s,c,o,h,p?.planHash,d,b,F,J,O,q,x,y,a]);return{handleRecoveryCta:W,submitRecoveryConfirm:z}}function QO(e){const{shell:t,actions:n,wizard:a}=e,{nav:s,opError:o,opErrorCode:c,lastOpState:d,setOpError:m,setObserveBusy:h}=t,{taskId:p}=a,[b,x]=k.useState(""),[y,E]=k.useState(""),[N,R]=k.useState(""),[C,I]=k.useState(""),[O,X]=k.useState(!1),[q,A]=k.useState(null),[F,J]=k.useState(null),[W,z]=k.useState(!1),[U,H]=k.useState("operator-request"),[te,G]=k.useState(null),[K,$]=k.useState([]),[ee,oe]=k.useState([]),[ce,j]=k.useState(!1),[D,P]=k.useState(!1),[_,ne]=k.useState(null),[de,se]=k.useState(null),[ae,we]=k.useState(null),[be,ze]=k.useState(!1),[Me,Se]=k.useState(!1),[$e,ct]=k.useState(null),[mt,Ze]=k.useState("idle"),[lt,Tt]=k.useState(null),[St,wt]=k.useState(null),[Je,Nt]=k.useState(!1),qt=k.useCallback(()=>b.trim()?`/inspect/#/dag/${encodeURIComponent(b.trim())}?from=recovery`:"/inspect/#/",[b]),Fe=k.useCallback(()=>{window.location.assign(qt())},[qt]),Xt=k.useCallback(async()=>{if(b.trim())return b.trim();const st=p.trim();if(!st)return m("打开 DAG 检视需要任务 ID 或 DAG 运行 ID"),null;h(!0),m(null);try{const{status:Ve,body:xt}=await Du("observeLink",{taskId:st}),Dt=xt.result??{};if(Ve>=400||xt.ok===!1)return m(xt.error?.message??"无法解析 DAG 画布地址"),Ze("unavailable"),Tt(xt.error?.message??null),null;const Wt=typeof Dt.dagRunId=="string"?Dt.dagRunId.trim():"";return Wt?(x(Wt),Ze("match"),Tt(null),wt(`/inspect/#/dag/${encodeURIComponent(Wt)}`),Wt):(m("尚未找到该任务的 DAG 运行,请稍后再打开检视"),Ze("unavailable"),Tt(Dt.message??"未解析到 DAG run"),null)}catch(Ve){return m(Ve instanceof Error?Ve.message:String(Ve)),null}finally{h(!1)}},[b,p,m,h]),he=k.useCallback(async()=>{await Xt()&&Nt(!0)},[Xt]),ve=k.useCallback(async()=>{const st=await Xt();st&&window.location.assign(`/inspect/#/dag/${encodeURIComponent(st)}?from=recovery`)},[Xt]),qe=k.useCallback(async()=>{j(!0);try{const st=p.trim(),Ve=new URLSearchParams;st&&Ve.set("taskId",st),Ve.set("limit","40");const xt=await fetch(`/api/operator/v1/recovery/candidates?${Ve.toString()}`,{credentials:"same-origin"});if(!xt.ok){$([]);return}const Dt=await xt.json();$(Array.isArray(Dt.runs)?Dt.runs:[])}catch{$([])}finally{j(!1)}},[p]),We=k.useCallback(async st=>{const Ve=st.trim();if(!Ve){oe([]),ne(null),se(null),we(null);return}P(!0);try{const xt=await fetch(`/api/dag-runs/${encodeURIComponent(Ve)}`,{credentials:"same-origin"});if(!xt.ok){oe([]),ne(null),se(null);return}const Dt=await xt.json(),Wt=typeof Dt.effectiveStatus=="string"&&Dt.effectiveStatus||typeof Dt.status=="string"&&Dt.status||null;ne(Wt);const Z=Array.isArray(Dt.nodes)?Dt.nodes:[],xe=B6(Z.map(gt=>{const ue=(gt.nodeId??gt.id??"").trim();return ue?{nodeId:ue,status:gt.status,label:gt.label??gt.name,errorPreview:gt.errorPreview}:null}).filter(gt=>gt!==null));oe(xe);const je=typeof Dt.failureCategory=="string"&&Dt.failureCategory||void 0,et=Z.find(gt=>typeof gt.failureCategory=="string"&>.failureCategory&>.failureCategory!=="success")?.failureCategory;se(je??et??null),we(Dt.frontendRecovery??null)}catch{oe([]),ne(null),se(null),we(null)}finally{P(!1)}},[]);k.useEffect(()=>{s==="recovery"&&qe()},[s,p,qe]),k.useEffect(()=>{if(s!=="recovery"||be||K.length===0)return;const st=b.trim(),Ve=st?K.some(xt=>xt.dagRunId===st):!1;if(!st||!Ve){const xt=KO(K);xt&&xt!==st&&x(xt)}},[s,K,b,be]),k.useEffect(()=>{s==="recovery"&&We(b)},[s,b,We]),k.useEffect(()=>{if(s!=="recovery")return;const st=b.trim();if(!st){G(null);return}let Ve=!1;const xt=async()=>{const{body:Wt}=await Du("dagInterruptEligibility",{runId:st});if(Ve)return;const Z=Wt.result??Wt;G({eligible:Z.eligible===!0,ownerKind:Z.ownerKind,message:Z.message,interruptStatus:Z.interruptStatus,reasonCodes:Z.reasonCodes,targetOperationId:Z.targetOperationId,targetOperationState:Z.targetOperationState})};xt();const Dt=window.setInterval(()=>{xt()},4e3);return()=>{Ve=!0,window.clearInterval(Dt)}},[s,b]),k.useEffect(()=>{if(s!=="recovery"||Me||ee.length===0)return;const st=y.trim(),Ve=st?ee.some(xt=>xt.nodeId===st):!1;if(!st||!Ve){const xt=VO(ee);xt&&xt!==st&&E(xt)}},[s,ee,y,Me]);const nt=PO({operationState:_?null:d,errorCode:_?null:c,dagStatus:_,failureCategory:de}),$t=k.useMemo(()=>{const st=L6(nt);return nt!=="running-active"||te?.eligible?st:st.filter(Ve=>Ve.id!=="interrupt")},[nt,te?.eligible]),Zt=k.useMemo(()=>UO($t),[$t]),Pt=k.useMemo(()=>FO(nt),[nt]),rt=k.useMemo(()=>ee.find(st=>st.nodeId===y.trim()),[ee,y]),on=k.useRef(null);k.useEffect(()=>{F&&on.current?.scrollIntoView({behavior:"smooth",block:"nearest"})},[F?.id]);const yt=k.useCallback(st=>ZO({actionLabel:st,dagRunId:b.trim()||void 0,fromNodeId:y.trim()||void 0,runStatus:_,nodeStatus:rt?.status,nodeError:rt?.errorPreview,factClassLabel:j6[nt],errorMessage:o,errorCode:c}),[b,y,o,c,nt,_,rt?.errorPreview,rt?.status]);k.useEffect(()=>{if(s!=="recovery"||O&&!q6(C))return;const st=yt(F?.label);st&&st!==C&&I(st)},[s,b,y,_,rt,nt,o,c,F?.label,O,C,yt]);const{handleRecoveryCta:Xn,submitRecoveryConfirm:Sn}=WO({shell:t,actions:n,taskId:p,dagRunId:b,fromNodeId:y,featureId:N,recoveryReason:C,recoveryReasonTouched:O,recoveryConfirm:F,recoveryPlanSummary:q,interruptReasonCode:U,setRecoveryConfirm:J,setRecoveryPlanSummary:A,setRecoveryReport:ct,setRecoveryReason:I,setRecoveryReasonTouched:X,buildCurrentRecoveryReason:yt,openFullCanvas:ve});return k.useEffect(()=>{if(s!=="recovery"||!W||!te?.eligible)return;const st=$t.find(Ve=>Ve.id==="interrupt");st&&(J(st),I(yt(st.label)),X(!1),z(!1))},[s,W,te?.eligible,$t,yt]),{dagRunId:b,setDagRunId:x,fromNodeId:y,setFromNodeId:E,featureId:N,setFeatureId:R,recoveryReason:C,setRecoveryReason:I,recoveryReasonTouched:O,setRecoveryReasonTouched:X,recoveryPlanSummary:q,recoveryConfirm:F,setRecoveryConfirm:J,setRecoveryPlanSummary:A,recoveryRuns:K,recoveryNodes:ee,recoveryRunsLoading:ce,recoveryNodesLoading:D,recoveryRunStatus:_,recoveryFailureCategory:de,frontendRecovery:ae,manualRunId:be,setManualRunId:ze,manualNodeId:Me,setManualNodeId:Se,recoveryReport:$e,setRecoveryReport:ct,observeLinkStatus:mt,observeLinkMessage:lt,observeUrl:St,inspectSplitOpen:Je,setInspectSplitOpen:Nt,inspectPath:qt,openFullInspect:Fe,resolveDagRunForInspect:Xt,openInspectSplit:he,openFullCanvas:ve,loadRecoveryRuns:qe,loadRecoveryNodes:We,recoveryFact:nt,recoveryCtas:$t,recoveryLanes:Zt,recommendedCtaId:Pt,interruptIntent:W,setInterruptIntent:z,interruptReasonCode:U,setInterruptReasonCode:H,interruptEligibility:te,recoveryConfirmRef:on,buildCurrentRecoveryReason:yt,handleRecoveryCta:Xn,submitRecoveryConfirm:Sn}}function JO(e){const{shell:t,actions:n,prd:a}=e,{step:s,setStep:o,setOpMessage:c}=t,{runAction:d,isActionSuccess:m,summarizeEnvelope:h}=n,[p,b]=k.useState(""),[x,y]=k.useState(""),[E,N]=k.useState("standard"),[R,C]=k.useState(""),[I,O]=k.useState(""),[X,q]=k.useState(""),A=Ah.find(Je=>Je.kind===E)??Ah[0],[F,J]=k.useState(null),[W,z]=k.useState(null),[U,H]=k.useState(""),[te,G]=k.useState(null),[K,$]=k.useState(null),[ee,oe]=k.useState(null),[ce,j]=k.useState(null),[D,P]=k.useState(null),[_,ne]=k.useState(!1),[de,se]=k.useState(null),[ae,we]=k.useState(null),be=k.useRef(!1),ze=k.useCallback(()=>{oe(null),j(null),P(null),ne(!1),se(null),we(null),be.current=!1},[]),Me=k.useCallback(()=>{ze(),o("contract")},[ze,o]),Se=k.useCallback(Je=>{const Nt=Je.session;Nt?.sessionId&&J(Nt.sessionId);const qt=Je.question;z(qt),G(Je.summary??null);const Fe=Je.assessmentId;typeof Fe=="string"&&Fe&&$(Fe),(Je.complete===!0||typeof Fe=="string"&&Fe)&&(Me(),c(Je.skipped===!0?"已跳过访谈:已按推荐补齐草稿并签发评估":"访谈已完成:草稿已绑定完整评估结果"))},[Me,c]),$e=k.useCallback(async(Je=!1)=>{const Nt=p.trim();if(!Nt)return;const qt=`${Nt}:${K??""}`;if(!(!Je&&ae===qt&&ee!==null)&&!be.current){be.current=!0,oe(null),j(null),P(null),se(null),ne(!1);try{const Fe=await d("contractValidate",{taskId:Nt}),Xt=m(Fe);if(oe(Xt),j(h(Fe)),!Xt){we(qt),c("契约校验未通过:请先修正草稿后再应用");return}const he=await d("contractDiff",{taskId:Nt});P(h(he)),we(qt),c(m(he)?"校验与差异已就绪:确认后可应用契约":"校验通过,但差异查询失败(仍可查看下方摘要)")}finally{be.current=!1}}},[K,ae,ee,m,d,c,h,p]),ct=k.useCallback(async()=>{const Je=p.trim();if(!Je||!K)return;const Nt=await d("contractApply",{taskId:Je,assessmentId:K},{clientRequestId:Ou("apply")});if(!m(Nt)){ne(!1);return}ne(!0);const qt=await d("spineCheck",{taskId:Je});if(m(qt)){se(!0),o("dag-confirm"),c("契约已应用并通过 Spine 审计,可生成并运行 DAG");return}se(!1),c("契约已应用,但 Spine 审计未通过:可重试 Spine")},[K,m,d,c,o,p]),mt=k.useCallback(async()=>{const Je=p.trim();if(!Je)return;const Nt=await d("spineCheck",{taskId:Je});if(m(Nt)){se(!0),o("dag-confirm"),c("Spine 审计已通过,可生成并运行 DAG");return}se(!1)},[m,d,c,o,p]),Ze=k.useCallback(async()=>{const Je=n.confirmationId?.trim();if(!Je)return;const Nt=n.confirmationDetails?.confirmation?.humanGateToken,qt=await d("confirmDagConfirmation",{confirmationId:Je,humanGateToken:Nt});m(qt)&&(o("run"),await d("runDag",{confirmationId:Je},{clientRequestId:Ou("run")}))},[n.confirmationId,n.confirmationDetails,m,d,o]);k.useEffect(()=>{s==="contract"&&p.trim()&&$e(!1)},[s,p,K,$e]);const lt=k.useCallback(Je=>Je.split(/[\n,;,;]+/).map(Nt=>Nt.trim()).filter(Boolean),[]),Tt=k.useCallback(async()=>{const Je=a.prdDocuments.length>0?IO(a.prdDocuments):void 0,Nt=lt(R),qt=lt(I),Fe=lt(X),Xt={content:a.prdText,taskKind:E,...Je?{documents:Je}:{},...Nt.length>0?{allowedPaths:Nt}:{},...qt.length>0?{forbiddenPaths:qt}:{},...Fe.length>0?{verifyCommands:Fe}:{}};if(!OO("bootstrapFromPrd",Xt)){a.setPrdFileError(DO());return}const he=await d("bootstrapFromPrd",Xt);if(!he||he.ok===!1)return;const ve=he.result??{};ve.taskId&&b(ve.taskId),ve.title&&y(ve.title);const qe=ve.parseStatus??"pending",We=ve.draftPreview?.objective?.trim(),nt=Array.isArray(ve.gaps)?ve.gaps.length:0,$t=ve.semanticIntake?.applied?"semantic":ve.semanticIntake?.code??"no-semantic",Zt=(ve.autoImportedReferences??[]).filter(rt=>rt.repoRelative),Pt=(ve.unresolvedReferences??[]).filter(rt=>rt.token);c([`已创建任务「${ve.title??""}」(${ve.taskId??""})`,`来源:${ve.identitySource??"prd"}`,`解析:${qe}(${$t})`,We?`目标:${We.slice(0,120)}`:null,nt>0?`缺口 ${nt} 项待确认`:null,Zt.length>0?`已自动导入 ${Zt.length} 个引用文档(${Zt.map(rt=>`${rt.repoRelative}${rt.role?`:${rt.role}`:""}`).join("、")})`:null,Pt.length>0?`有 ${Pt.length} 个引用未能解析:${Pt.map(rt=>`${rt.token}(${rt.reason??"未知原因"})`).join("、")}`:null].filter(Boolean).join(" · ")),o("interview")},[R,I,a,d,c,o,lt,E,X]),St=[{id:"setup",label:"就绪检查"},{id:"import-prd",label:"导入需求"},{id:"interview",label:"需求访谈(可跳过)"},{id:"contract",label:"契约落地"},{id:"dag-confirm",label:"确认 DAG"},{id:"run",label:"运行"}],wt=St.findIndex(Je=>Je.id===s);return{taskId:p,setTaskId:b,taskTitle:x,taskKind:E,setTaskKind:N,engineering:{allowedPathsText:R,forbiddenPathsText:I,verifyCommandsText:X},setEngineering:Je=>{Je.allowedPathsText!==void 0&&C(Je.allowedPathsText),Je.forbiddenPathsText!==void 0&&O(Je.forbiddenPathsText),Je.verifyCommandsText!==void 0&&q(Je.verifyCommandsText)},workflowMeta:A,sessionId:F,question:W,answerText:U,setAnswerText:H,draftSummary:te,assessmentId:K,contractValidateOk:ee,contractValidateSummary:ce,contractDiffSummary:D,contractApplied:_,spineOk:de,applyInterviewPayload:Se,runContractPreflight:$e,applyContractThenSpine:ct,retrySpineOnly:mt,confirmAndRunDag:Ze,importPrdAndCreate:Tt,wizardSteps:St,stepIndex:wt}}const eD={chat:"对话",tasks:"任务",recovery:"恢复",night:"夜间",models:"模型与认证",settings:"设置"};async function tD(e){return await import(e)}function nD(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 rD(e){const{nav:t,readiness:n,setupBlocked:a,degraded:s,health:o,inspectHref:c}=e,d=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:`#/${d}`,readinessTitle:m,repo:o?{name:nD(o),fingerprint:o.repoFingerprint??"",version:o.packageVersion??"",product:o.productName??o.product??"",inspectReady:o.inspect?.ready}:null}}function aD(e){const t=k.useRef(null),n=k.useRef(null),[a,s]=k.useState(!1),o=k.useMemo(()=>rD(e),[e.nav,e.readiness,e.setupBlocked,e.degraded,e.health,e.inspectHref]),c=k.useRef(o);return c.current=o,k.useEffect(()=>{let d=!1;return tD("/inspect/operator-chrome.js").then(m=>{d||!t.current||(n.current=m.mountOperatorChrome(t.current,c.current))}).catch(()=>{d||s(!0)}),()=>{d=!0,n.current?.destroy(),n.current=null}},[]),k.useEffect(()=>{n.current?.update(o)},[o]),f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:t,"data-testid":"operator-chrome"}),a?f.jsxs("nav",{className:"operator-chrome-fallback","aria-label":"操作工作区",children:[f.jsx("button",{type:"button",onClick:()=>window.location.assign("/#/"),children:"Loop Agent"}),f.jsx("button",{type:"button",onClick:()=>window.location.assign(`#/${e.nav}`),children:eD[e.nav]}),f.jsx("button",{type:"button",onClick:()=>window.location.assign(e.inspectHref),children:"观测"}),f.jsx("span",{role:"status",children:"共享导航加载失败,请刷新页面"})]}):null]})}function iD(e){return f.jsxs(f.Fragment,{children:[e.opError?f.jsxs("div",{className:"flash flash-error","data-testid":"op-error",children:[f.jsx("span",{className:"flash-label",children:"错误"}),f.jsx("p",{className:"flash-body",children:e.opError})]}):null,e.opMessage?f.jsxs("div",{className:"flash flash-info","data-testid":"op-message",children:[f.jsx("span",{className:"flash-label",children:"状态"}),f.jsx("p",{className:"flash-body",children:e.opMessage})]}):null]})}function sD(){return f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",children:f.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 du(e){return e.provider?No(e.provider,e.id):e.id}function lD(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 oD(e){const[t,n]=k.useState(!1),[a,s]=k.useState(""),[o,c]=k.useState(0),d=k.useRef(null),m=k.useRef(null),h=k.useRef(null),p=k.useMemo(()=>{const N=[...e.models];if(e.value&&!N.some(R=>du(R)===e.value)){const R=lD(e.value);R&&N.push(R)}return N},[e.models,e.value]),b=k.useMemo(()=>C6(p,a),[p,a]),x=k.useMemo(()=>b.flatMap(N=>N.models),[b]);k.useEffect(()=>{t&&(s(""),c(Math.max(0,p.findIndex(N=>du(N)===e.value))),window.setTimeout(()=>h.current?.focus(),0))},[t,p,e.value]),k.useEffect(()=>{if(!t)return;const N=C=>{const I=d.current;I&&C.target instanceof Node&&!I.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 y=N=>{if(e.disabled)return;const R=x[N];R&&(n(!1),e.onChange(du(R)),m.current?.focus())},E=N=>{if(N.key==="ArrowDown"){N.preventDefault(),c(R=>x.length?(R+1)%x.length:0);return}if(N.key==="ArrowUp"){N.preventDefault(),c(R=>x.length?(R-1+x.length)%x.length:0);return}if(N.key==="Enter"){N.preventDefault(),y(o);return}if(N.key==="Escape"){N.preventDefault(),n(!1),m.current?.focus();return}};return f.jsxs("div",{className:"oc-select-menu models-matrix-select",ref:d,children:[f.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:[f.jsx("span",{className:"oc-select-trigger-label",children:e.value||"选择模型"}),f.jsx(sD,{})]}),t&&f.jsxs("div",{className:"oc-select-panel oc-model-panel is-below",role:"listbox","aria-label":"选择模型",children:[f.jsx("input",{ref:h,className:"oc-select-search",placeholder:"搜索模型…",value:a,onChange:N=>{s(N.target.value),c(0)},onKeyDown:E}),b.length===0&&f.jsx("div",{className:"oc-select-status",children:"没有可用模型"}),b.map(N=>f.jsxs("div",{className:"oc-model-group",children:[f.jsx("div",{className:"oc-model-group-head",children:N.provider||"其他"}),N.models.map(R=>{const C=du(R),I=C===e.value,O=x[o]===R;return f.jsxs("button",{type:"button",role:"option","aria-selected":I,disabled:e.disabled,className:`oc-select-option oc-model-option${O?" is-highlighted":""}${I?" is-active":""}`,onMouseDown:X=>X.preventDefault(),onClick:()=>{e.disabled||(n(!1),e.onChange(C))},children:[f.jsxs("span",{className:"oc-model-option-name",children:[R.name?`${R.name} · `:"",R.id]}),I&&f.jsx("span",{className:"oc-model-option-check",children:"✓"})]},C)})]},N.provider))]})]})}const cD=[{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 uD(e){if(!e)return null;const t=Date.parse(e);return Number.isNaN(t)?e:new Date(t).toLocaleString()}function dD(e){const t=e.readinessReport?.state??e.readiness,n=e.readinessReport?.probe,a=n?.details??{},s=e.readinessReport?.blockedActions??[],o=uD(e.readinessReport?.generatedAt),c=e.readinessReport??{state:e.readiness,health:e.health},d=n?.piModelMatrix,m=n?.piAvailableModels??[],[h,p]=k.useState(()=>x2(d)),[b,x]=k.useState(!1),[y,E]=k.useState(null),[N,R]=k.useState(null);k.useEffect(()=>{p(x2(d)),E(null)},[d]);const C=dO(h),I=!fO(C),O=e.busy||b||I;async function X(){if(!O){x(!0),E(null),R(null);try{const q=await e.onSaveMatrix({LOW:h.LOW,MED:h.MED,HIGH:h.HIGH});if(q&&q.ok===!1){E(q.error?.message??"保存模型矩阵失败");return}const A=window.localStorage.getItem(Yr)?.trim();if(A)try{const F=await fetch(`/api/operator/v1/chat/sessions/${encodeURIComponent(A)}/reload`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json",[wp]:kp()},body:"{}"});F.ok?R("配置已保存,活动会话已重载。"):F.status===409?R("配置已保存;活动会话正忙(PI_SESSION_BUSY),请稍后手动重载。"):R("配置已保存;活动会话重载未完成,请手动重载。")}catch{R("配置已保存;活动会话重载未完成,请手动重载。")}else R("配置已保存,检测结果已刷新。")}catch(q){E(q instanceof Error?q.message:String(q))}finally{x(!1)}}}return f.jsxs("section",{className:"panel models-page","aria-labelledby":"models-title",children:[f.jsxs("div",{className:"models-header",children:[f.jsx("h2",{id:"models-title",children:"模型与认证"}),f.jsx("span",{className:"models-status-pill","data-state":t,"data-testid":"models-readiness-pill",children:O6[t]??t})]}),f.jsxs("p",{className:"panel-lead",children:["复用 Pi ModelRuntime 凭据平面;密钥不会回传到页面。请用"," ",f.jsx("code",{children:"pi"})," 或 Pi 认证存储完成配置,然后刷新就绪探测。"]}),f.jsxs("section",{className:"models-probe-card","aria-labelledby":"models-probe-title","data-testid":"readiness-details",children:[f.jsx("h3",{id:"models-probe-title",className:"models-subtitle",children:"就绪检查"}),f.jsx("ul",{className:"models-probe-list",children:cD.map(q=>{const A=n?.[q.key],F=a[q.detailKey],J=A===void 0;return f.jsxs("li",{className:`models-probe-item${J?" is-pending":A?" is-ok":" is-bad"}`,children:[f.jsx("span",{className:"models-probe-badge","aria-label":J?"未探测":A?"通过":"未通过",children:J?"—":A?"✓":"✕"}),f.jsxs("div",{className:"models-probe-body",children:[f.jsx("strong",{children:q.label}),f.jsx("span",{className:"muted",children:q.hint}),F?f.jsx("p",{className:"models-probe-detail",children:F}):null]})]},q.key)})})]}),f.jsxs("section",{className:"models-matrix-card","aria-labelledby":"models-matrix-title","data-testid":"models-matrix-editor",children:[f.jsx("h3",{id:"models-matrix-title",className:"models-subtitle",children:"Herness模型矩阵(LOW/MED/HIGH)"}),f.jsxs("p",{className:"models-matrix-lead",children:["从 Pi 可用模型中选择 ",f.jsx("code",{children:"provider/model"})," 或裸 model id; 保存后原子写入 ",f.jsx("code",{children:"executors.pi"})," 并自动重测就绪。"]}),f.jsx("div",{className:"models-matrix-list",children:Sp.map(q=>f.jsxs("div",{className:"models-matrix-row",children:[f.jsxs("label",{htmlFor:`pi-model-${q}`,children:[q," 档",C[q]?f.jsxs("span",{className:"error","data-testid":`pi-model-error-${q}`,children:[" ","— ",C[q]]}):null]}),f.jsx(oD,{id:`pi-model-${q}`,value:h[q],models:m,onChange:A=>p(F=>({...F,[q]:A})),ariaInvalid:C[q]!==void 0,"data-testid":`pi-model-select-${q}`})]},q))}),y?f.jsx("p",{className:"error","data-testid":"models-matrix-save-error",children:y}):null,N?f.jsx("p",{className:"muted","data-testid":"models-matrix-save-notice",children:N}):null,f.jsxs("div",{className:"models-actions",children:[f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:O,"data-testid":"models-matrix-save",onClick:()=>{X()},children:b||e.busy?"保存中…":"保存模型矩阵"}),f.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"?f.jsxs("div",{className:"models-setup-card","data-testid":"models-setup-hint",children:[f.jsx("h3",{className:"models-subtitle",children:"如何完成配置"}),f.jsxs("ol",{className:"models-setup-steps",children:[f.jsxs("li",{children:["在终端配置 Pi 认证(例如 ",f.jsx("code",{children:"pi auth login"}),")或写入 provider API key。"]}),f.jsxs("li",{children:["确认 agent 目录下 ",f.jsx("code",{children:"models.json"})," / 认证文件可读。"]}),f.jsx("li",{children:"点击下方「刷新就绪探测」,或运行诊断命令查看详情。"})]}),f.jsx("pre",{className:"cmd",children:M6})]}):null,t==="degraded"?f.jsx("p",{className:"models-degraded-note","data-testid":"models-degraded-note",children:"Pi 暂时降级:仍可恢复草稿与需求访谈;部分写入/运行类操作会被拦截。"}):null,s.length>0?f.jsxs("div",{className:"models-blocked-card",children:[f.jsx("h3",{className:"models-subtitle",children:"当前受限操作"}),f.jsx("ul",{className:"models-blocked-list",children:s.map(q=>f.jsx("li",{children:f.jsx("code",{children:q})},q))})]}):null,f.jsxs("div",{className:"models-actions",children:[f.jsx("button",{type:"button",className:"btn btn-primary",disabled:e.busy,onClick:e.onRefreshReadiness,children:"刷新就绪探测"}),o?f.jsxs("span",{className:"muted models-generated-at",children:["上次探测:",o]}):null]}),f.jsxs("details",{className:"models-raw-details",children:[f.jsx("summary",{children:"查看原始探测数据(调试)"}),f.jsx("pre",{className:"cmd models-raw-json",children:JSON.stringify(c,null,2)})]})]})}const fD=[{value:"requirements-changed",label:"需求已变更"},{value:"suspected-runaway",label:"疑似失控"},{value:"resource-protection",label:"保护资源"},{value:"operator-request",label:"操作者请求"},{value:"other",label:"其他"}];function N2(e){const{lane:t,cta:n,planSummary:a,reason:s,busy:o,confirmRef:c}=e;return!n||n.lane!==t?null:f.jsxs("div",{ref:c,className:"recovery-confirm","data-testid":"recovery-confirm",children:[f.jsxs("h3",{children:["待确认:",n.label]}),f.jsx("p",{className:"muted",children:n.id==="reconcile"?"破坏性对账需经浏览器 Human Gate 确认。请核对运行与原因后再点「确定」。":n.id==="interrupt"?"协作中止需经浏览器 Human Gate。原因已按当前运行预填,可改分类或编辑后再确定。提交只表示请求已登记,当前节点仍会跑完。":"核对上方运行 / 节点与恢复原因后直接执行;服务端会校验资格,不再走 Human Gate。"}),n.id==="interrupt"?f.jsxs("fieldset",{className:"recovery-reason-code","data-testid":"recovery-interrupt-reason-code",disabled:o,children:[f.jsx("legend",{children:"原因分类"}),f.jsx("div",{className:"recovery-reason-code-group",children:fD.map(d=>{const m=(e.reasonCode??"operator-request")===d.value;return f.jsxs("label",{className:m?"recovery-reason-code-option is-active":"recovery-reason-code-option",children:[f.jsx("input",{type:"radio",name:"recovery-interrupt-reason-code",value:d.value,checked:m,onChange:()=>e.onReasonCodeChange?.(d.value)}),d.label]},d.value)})})]}):null,a?f.jsxs("div",{className:"recovery-plan-summary",children:[f.jsxs("p",{className:"muted",children:["计划 eligible=",String(a.eligible??"—")," · 风险=",D6[a.risk??""]??a.risk??"—"]}),a.effectiveFromNodeId?f.jsxs("p",{className:"muted",children:["有效起点:",a.effectiveFromNodeId]}):null,a.estimatedExecution?f.jsxs("p",{className:"muted",children:["将执行 ",a.estimatedExecution.nodeCount??"?"," 个节点 / ",a.estimatedExecution.piCallCount??"?"," 次 Pi;预计避免"," ",a.estimatedExecution.avoidedNodeCount??"?"," 个节点"]}):null,a.planHash?f.jsxs("p",{className:"muted",children:["planHash: ",f.jsxs("code",{children:[a.planHash.slice(0,16),"…"]})]}):null]}):n.id==="dagRerun"?f.jsx("p",{className:"muted",children:"未加载计划摘要;点「确定」前将再次尝试资格检查。"}):null,f.jsxs("div",{className:"cta-row",children:[f.jsx("button",{type:"button",className:"btn btn-primary",disabled:o||!s.trim(),"data-testid":"recovery-confirm-submit",onClick:e.onSubmit,children:"确定"}),f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:o,"data-testid":"recovery-confirm-cancel",onClick:e.onCancel,children:"取消"})]})]})}function mD(e){const{shell:t,recovery:n,wizard:a}=e,{busy:s}=t,o=BO({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 f.jsxs("section",{className:"panel","aria-labelledby":"recovery-title",children:[f.jsx("h2",{id:"recovery-title",children:"恢复"}),f.jsxs("p",{className:"muted",children:["事实分类:",j6[n.recoveryFact]," · 无 Cancel · 无「直接改代码」"]}),n.frontendRecovery?f.jsxs("div",{className:"muted","data-testid":"frontend-recovery-lineage",style:{marginBottom:"0.75rem"},children:[f.jsxs("div",{children:["前端恢复:outcome=",f.jsx("code",{children:n.frontendRecovery.outcome??"—"})," phase=",f.jsx("code",{children:n.frontendRecovery.phase??"—"})]}),f.jsxs("div",{children:["root ",f.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,f.jsxs("ol",{className:"muted recovery-steps",children:[f.jsx("li",{children:"上方选 DAG 运行 / 节点,用「DAG 运行恢复」动作"}),f.jsx("li",{children:"Worker 持有的失败 run 用下方「Worker Task 重排队」;独立 DAG run 无法从节点恢复时才用「带反馈重新执行任务」"}),f.jsx("li",{children:"带 * 的动作:核对预填原因后点「确定」。重跑/重试直接执行;对账与中止运行走 Human Gate"})]}),o?f.jsxs("p",{className:"muted","data-testid":"recovery-interrupt-status",children:["中止进度:",o]}):null,n.recoveryFact==="running-active"&&n.interruptEligibility&&!n.interruptEligibility.eligible&&(!n.interruptEligibility.interruptStatus||n.interruptEligibility.interruptStatus==="none")?f.jsx("p",{className:"muted","data-testid":"recovery-interrupt-unavailable",children:n.interruptEligibility.ownerKind==="worker-managed"?"此运行不由当前 Console 持有,暂不支持协作中止。请用 Doctor / 报告查看。":n.interruptEligibility.message??"当前运行不具备协作中止资格。"}):null,f.jsxs("p",{className:"muted",children:[a.taskId.trim()?`按任务 ${a.taskId.trim()} 拉取候选。`:"未填任务 ID 时列出最近 DAG 运行。","Doctor 诊断可选,不是重跑前置。"," ",f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:s||n.recoveryRunsLoading,"data-testid":"recovery-refresh-candidates",onClick:()=>{n.loadRecoveryRuns()},children:n.recoveryRunsLoading?"刷新中…":"刷新候选"})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"DAG 运行 ID"}),!n.manualRunId&&n.recoveryRuns.length>0?f.jsxs("select",{"data-testid":"recovery-run-select",value:n.dagRunId,disabled:s||n.recoveryRunsLoading,onChange:d=>{n.setManualRunId(!1),n.setManualNodeId(!1),n.setFromNodeId(""),n.setDagRunId(d.target.value),n.recoveryReasonTouched||n.setRecoveryReasonTouched(!1)},children:[n.recoveryRuns.some(d=>d.dagRunId===n.dagRunId)?null:f.jsx("option",{value:n.dagRunId||"",children:n.dagRunId?`${n.dagRunId}(当前)`:"— 请选择 —"}),n.recoveryRuns.map(d=>f.jsx("option",{value:d.dagRunId,children:YO(d)},d.dagRunId))]}):f.jsx("input",{"data-testid":"recovery-run-input",value:n.dagRunId,disabled:s,onChange:d=>{n.setManualRunId(!0),n.setDagRunId(d.target.value.trim())},placeholder:"dag-run-id(节点恢复/完整重新执行)"}),f.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":"刷新并改用下拉"})]}),f.jsxs("label",{className:"field",children:[f.jsxs("span",{className:"muted",children:["起始节点 ID(从失败节点恢复)",n.recoveryNodesLoading?" · 加载节点…":""]}),!n.manualNodeId&&n.recoveryNodes.length>0?f.jsxs("select",{"data-testid":"recovery-node-select",value:n.fromNodeId,disabled:s||n.recoveryNodesLoading,onChange:d=>{n.setManualNodeId(!1),n.setFromNodeId(d.target.value)},children:[n.recoveryNodes.some(d=>d.nodeId===n.fromNodeId)?null:f.jsx("option",{value:n.fromNodeId||"",children:n.fromNodeId?`${n.fromNodeId}(当前)`:"— 请选择 —"}),n.recoveryNodes.map(d=>f.jsx("option",{value:d.nodeId,children:XO(d)},d.nodeId))]}):f.jsx("input",{"data-testid":"recovery-node-input",value:n.fromNodeId,disabled:s,onChange:d=>{n.setManualNodeId(!0),n.setFromNodeId(d.target.value.trim())},placeholder:"例如 review-verdict-recovery-pi"}),f.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":"刷新并改用下拉"})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"恢复原因(已按 run/节点失败事实自动预填,可编辑)"}),f.jsx("textarea",{"data-testid":"recovery-reason",value:n.recoveryReason,disabled:s,rows:4,onChange:d=>{n.setRecoveryReasonTouched(!0),n.setRecoveryReason(d.target.value)},placeholder:"将自动预填 operator-recovery / run / from-node / detail"}),f.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:"重新预填原因"})]}),f.jsxs("div",{className:"recovery-lane","data-testid":"recovery-lane-dag",children:[f.jsx("h3",{children:"DAG 运行恢复"}),f.jsx("p",{className:"muted",children:"针对 `.harness/dag-runs` 的 Agent DAG 运行。橙色为当前建议;带 * 需确认原因。"}),f.jsxs("div",{className:"recovery-cta-row","data-testid":"recovery-cta-row-dag",children:[n.recoveryLanes.dag.map(d=>{const m=d.id===n.recommendedCtaId;return f.jsxs("button",{type:"button",className:m?"btn btn-primary":"btn btn-secondary",disabled:s,title:d.guide,"aria-pressed":n.recoveryConfirm?.id===d.id?!0:void 0,"data-testid":`recovery-cta-${d.id}`,"data-recommended":m?"true":void 0,onClick:()=>{n.handleRecoveryCta(d)},children:[d.label,d.requiresReason?" *":""]},d.id)}),f.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?f.jsxs("div",{className:"recovery-report","data-testid":"recovery-report",children:[f.jsxs("div",{className:"recovery-report-header",children:[f.jsx("h3",{children:"交接报告摘要"}),f.jsx("button",{type:"button",className:"btn btn-ghost","data-testid":"recovery-report-close",onClick:()=>n.setRecoveryReport(null),children:"关闭"})]}),f.jsxs("dl",{className:"recovery-report-facts",children:[f.jsxs("div",{children:[f.jsx("dt",{children:"运行"}),f.jsx("dd",{children:f.jsx("code",{children:n.recoveryReport.runId})})]}),n.recoveryReport.title?f.jsxs("div",{children:[f.jsx("dt",{children:"标题"}),f.jsx("dd",{children:n.recoveryReport.title})]}):null,f.jsxs("div",{children:[f.jsx("dt",{children:"状态"}),f.jsx("dd",{children:n.recoveryReport.status??"—"})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"失败分类"}),f.jsx("dd",{children:n.recoveryReport.category??"—"})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"建议"}),f.jsx("dd",{children:n.recoveryReport.recommendation??"暂无结构化建议"})]})]}),f.jsxs("p",{className:"muted",children:["完整 Markdown 可用 CLI:",f.jsxs("code",{children:["loop-agent dag report --run-id"," ",n.recoveryReport.runId," --markdown"]})]})]}):null,f.jsx(N2,{lane:"dag",cta:n.recoveryConfirm,...c})]}),f.jsxs("div",{className:"recovery-lane","data-testid":"recovery-lane-worker",children:[f.jsx("h3",{children:"Worker Task 重排队"}),f.jsx("p",{className:"muted",children:"针对 agent-worker Task Pool,不是 DAG run。需要 Task ID;Feature ID 可选。"}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"Task ID(Worker 重排队必填)"}),f.jsx("input",{"data-testid":"recovery-worker-task-id",value:a.taskId,disabled:s,onChange:d=>a.setTaskId(d.target.value.trim()),placeholder:"harness / worker task-id"})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"Feature ID(可选)"}),f.jsx("input",{"data-testid":"recovery-feature-id",value:n.featureId,disabled:s,onChange:d=>n.setFeatureId(d.target.value.trim()),placeholder:"feature-id"})]}),f.jsx("div",{className:"recovery-cta-row","data-testid":"recovery-cta-row-worker",children:n.recoveryLanes.worker.length>0?n.recoveryLanes.worker.map(d=>f.jsxs("button",{type:"button",className:d.id===n.recommendedCtaId?"btn btn-primary":"btn btn-secondary",disabled:s,title:d.guide,"data-testid":`recovery-cta-${d.id}`,"data-recommended":d.id===n.recommendedCtaId?"true":void 0,onClick:()=>{n.handleRecoveryCta(d)},children:[d.label,d.requiresReason?" *":""]},d.id)):f.jsx("p",{className:"muted","data-testid":"recovery-worker-unavailable",children:"当前事实分类下不提供 Worker 重排队。"})}),f.jsx(N2,{lane:"worker",cta:n.recoveryConfirm,...c})]}),f.jsx("div",{className:"recovery-cta-row","data-testid":"recovery-cta-row",hidden:!0,children:n.recoveryCtas.map(d=>f.jsx("span",{children:d.id},d.id))}),n.observeLinkMessage?f.jsxs("p",{className:"muted",children:["[",mO[n.observeLinkStatus],"]"," ",n.observeLinkMessage]}):null,n.observeUrl?f.jsx("p",{className:"muted",children:f.jsx("a",{className:"external-link",href:n.observeUrl,children:n.observeUrl})}):null]})}function hD(e){const{health:t,readiness:n,healthError:a,layers:s,setupBlocked:o,degraded:c}=e;return f.jsxs(f.Fragment,{children:[f.jsxs("section",{className:"panel","aria-labelledby":"settings-title",children:[f.jsx("h2",{id:"settings-title",children:"设置"}),f.jsxs("dl",{className:"kv",children:[f.jsxs("div",{children:[f.jsx("dt",{children:"产品"}),f.jsx("dd",{children:t?.productName??"Loop Operator Console"})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"仓库根目录"}),f.jsx("dd",{children:f.jsx("code",{children:t?.repoRoot??"—"})})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"仓库指纹"}),f.jsx("dd",{children:f.jsx("code",{title:t?.repoFingerprint??void 0,children:t?.repoFingerprint?`${t.repoFingerprint.slice(0,12)}…`:"—"})})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"Pi 就绪"}),f.jsxs("dd",{children:[f.jsxs("code",{children:[O6[n]??n,"(",n,")"]}),o?f.jsx("p",{className:"muted",children:"Pi SDK / 认证 / 模型未就绪。不提供纯表单兜底。请前往「模型与认证」。"}):c?f.jsx("p",{className:"muted",children:"Pi 暂时降级:仍可恢复草稿与需求访谈。"}):null]})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"Inspect"}),f.jsxs("dd",{children:[f.jsx("code",{children:"/inspect/"}),"(同一 Console 进程)"]})]})]}),a?f.jsx("p",{className:"error",children:a}):null]}),f.jsxs("section",{className:"panel","aria-labelledby":"layers-title",children:[f.jsx("h2",{id:"layers-title",children:"完成语义分层"}),f.jsx("p",{className:"muted",children:"MVP 不执行收尾提交;不显示「任务已关闭/已交付」。"}),f.jsxs("dl",{className:"kv","data-testid":"completion-layers",children:[f.jsxs("div",{children:[f.jsx("dt",{children:"命令"}),f.jsx("dd",{children:uu(s.command)})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"DAG 生命周期"}),f.jsx("dd",{children:uu(s.dag)})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"最终验证"}),f.jsx("dd",{children:uu(s.verification)})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"晋升"}),f.jsx("dd",{children:uu(s.promote)})]}),f.jsxs("div",{children:[f.jsx("dt",{children:"任务关闭"}),f.jsx("dd",{children:"不可用(MVP)"})]})]})]})]})}function pD(e){const{busy:t,degraded:n,taskId:a,assessmentId:s,contractValidateOk:o,contractValidateSummary:c,contractDiffSummary:d,contractApplied:m,spineOk:h,onRerunPreflight:p,onApplyContract:b,onRetrySpine:x}=e;return f.jsxs("div",{"data-testid":"panel-contract",children:[f.jsx("h3",{children:"契约落地"}),f.jsx("p",{className:"muted",children:"进入本步后自动跑确定性校验与差异(非 AI 代判)。写入仓库仍需你人工确认一次;应用成功后会自动跑 Spine 审计。"}),f.jsxs("p",{className:"muted",children:["评估 ID: ",f.jsx("code",{children:s??"—"})]}),f.jsxs("div",{className:"contract-checks",children:[f.jsxs("p",{children:[f.jsx("strong",{children:"校验"}),":"," ",o===null?t?"进行中…":"等待开始":o?"通过":"未通过"]}),c?f.jsx("pre",{className:"cmd","data-testid":"contract-validate-summary",children:c}):null,f.jsxs("p",{children:[f.jsx("strong",{children:"差异"}),d?"":":尚未拉取"]}),d?f.jsx("pre",{className:"cmd","data-testid":"contract-diff-summary",children:d}):null,m?f.jsxs("p",{children:[f.jsx("strong",{children:"Spine"}),":"," ",h===null?"待检查":h?"通过":"未通过"]}):null]}),f.jsxs("div",{className:"cta-row",children:[f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:t||!a.trim(),onClick:p,children:"重新校验"}),f.jsx("button",{type:"button",className:"btn btn-primary","data-testid":"contract-apply",disabled:t||n||!s||o!==!0||m,onClick:b,children:"确认并应用契约"}),m&&h===!1?f.jsx("button",{type:"button",className:"btn btn-primary",disabled:t,onClick:x,children:"重试 Spine"}):null]})]})}function gD(e){const{busy:t,taskId:n,confirmationId:a,confirmationDetails:s,runAction:o,onConfirmAndRun:c}=e;return f.jsxs("div",{"data-testid":"panel-dag-confirm",children:[f.jsx("h3",{children:"DAG 确认(§5.5)"}),f.jsxs("ul",{className:"checklist",children:[f.jsx("li",{children:"源绑定(source)"}),f.jsx("li",{children:"Writer 写集范围(writer-scope)"}),f.jsx("li",{children:"验证命令(verification)"}),f.jsx("li",{children:"人工门禁(human-gates)"})]}),s?f.jsx("pre",{className:"cmd",children:JSON.stringify(s,null,2).slice(0,4e3)}):null,f.jsxs("div",{className:"cta-row",children:[f.jsx("button",{type:"button",className:"btn btn-primary",disabled:t,onClick:()=>{o("prepareDagConfirmation",{taskId:n,dagHandle:`${n}.dag.json`,profile:"auto"})},children:"生成 DAG 并准备确认"}),f.jsx("button",{type:"button",className:"btn btn-primary",disabled:t||!a,onClick:c,children:"开始运行"})]}),a?f.jsxs("p",{className:"muted",children:["确认 ID: ",f.jsx("code",{children:a})]}):null]})}function bD(e){const{busy:t,taskKind:n,onTaskKindChange:a,workflowHint:s,prd:o,engineering:c,onEngineeringChange:d,onImport:m}=e,h=t||o.prdFileReading;return f.jsxs("div",{"data-testid":"panel-import-prd",children:[f.jsx("h3",{children:"导入需求"}),f.jsx("p",{className:"muted",children:"粘贴、选择或拖入一份或多份 PRD / 需求 Markdown。多文件会分别归档到 source/references,并合成一份可编辑正文。创建前可继续编辑。 系统会对 PRD 做确定性/语义结构化;工程边界(路径与验证)须人类确认,不会由模型编造。"}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"流程类型"}),f.jsx("select",{"data-testid":"workflow-kind-select",value:n,disabled:t||o.prdFileReading,onChange:p=>a(p.target.value),children:Ah.map(p=>f.jsx("option",{value:p.kind,children:p.label},p.kind))})]}),f.jsxs("p",{className:"workflow-hint","data-testid":"workflow-kind-hint",children:[s," · taskKind=",f.jsx("code",{children:n})]}),f.jsxs("div",{className:`prd-drop-zone${o.prdDragOver?" is-dragover":""}`,"data-testid":"prd-drop-zone","data-dragover":o.prdDragOver?"true":"false",onDragEnter:p=>o.onDragEnter(p,h),onDragOver:p=>{p.preventDefault(),p.stopPropagation()},onDragLeave:o.onDragLeave,onDrop:p=>o.onDrop(p,h),children:[f.jsxs("div",{className:"prd-upload-toolbar",children:[f.jsxs("label",{className:`btn btn-ghost prd-upload-btn${h?" is-disabled":""}`,children:["选择需求文档",f.jsx("input",{type:"file",accept:wO,multiple:!0,hidden:!0,disabled:h,"data-testid":"prd-file-input",onChange:p=>{const b=p.currentTarget;o.loadPrdFromFiles(b.files).finally(()=>{b.value=""})}})]}),f.jsxs("span",{className:"muted prd-upload-hint",children:["支持多文件 .md / .markdown / .txt,单文件最大"," ",Ih(_h),",最多 ",ju," 个"]}),o.prdDocuments.length>0?f.jsx("button",{type:"button",className:"btn btn-ghost","data-testid":"prd-recompose",disabled:h,onClick:o.recomposeDocuments,children:"按文件重新合成"}):null]}),o.prdDocuments.length>0?f.jsx("ul",{className:"prd-file-list","data-testid":"prd-file-list",children:o.prdDocuments.map((p,b)=>f.jsxs("li",{className:b===o.prdPrimaryIndex?"is-primary":void 0,"data-testid":`prd-file-item-${b}`,children:[f.jsxs("span",{className:"prd-file-item-name",children:[p.fileName,b===o.prdPrimaryIndex?f.jsx("span",{className:"prd-file-primary-tag",children:"主"}):null,f.jsxs("span",{className:"muted",children:[" ","· ",Ih(p.sourceBytes)]})]}),f.jsxs("span",{className:"prd-file-item-actions",children:[f.jsx("button",{type:"button",className:"btn btn-ghost",disabled:h||b===o.prdPrimaryIndex,onClick:()=>o.setPrimaryDocument(b),children:"设为主"}),f.jsx("button",{type:"button",className:"btn btn-ghost",disabled:h||b===0,onClick:()=>o.moveDocument(b,-1),children:"上移"}),f.jsx("button",{type:"button",className:"btn btn-ghost",disabled:h||b===o.prdDocuments.length-1,onClick:()=>o.moveDocument(b,1),children:"下移"}),f.jsx("button",{type:"button",className:"btn btn-ghost",disabled:h,onClick:()=>o.removeDocument(b),children:"移除"})]})]},`${p.fileName}-${b}`))}):null,o.prdDocuments.length>0?f.jsxs("div",{className:"prd-file-meta",children:[f.jsxs("span",{children:["分卷=上传原件(将分别归档);正文=本会话采用稿",o.prdComposedDirty?"(已手动编辑)":""]}),f.jsx("button",{type:"button",className:"btn btn-ghost prd-file-clear","data-testid":"prd-file-clear",disabled:h,onClick:o.clearDocuments,children:"清除来源列表"})]}):null,o.prdDragOver?f.jsx("p",{className:"prd-drop-hint","data-testid":"prd-drop-hint",children:"释放以载入"}):null,f.jsxs("label",{className:"field prd-text-field",children:[f.jsx("span",{className:"muted",children:"PRD Markdown"}),f.jsx("textarea",{rows:10,value:o.prdText,disabled:h,"data-testid":"prd-textarea",onChange:p=>o.onPrdTextChange(p.target.value)})]})]}),o.prdFileError?f.jsx("p",{className:"prd-file-error",role:"alert","aria-live":"polite","data-testid":"prd-file-error",children:o.prdFileError}):null,f.jsxs("details",{className:"engineering-boundary","data-testid":"engineering-boundary",children:[f.jsx("summary",{children:"工程边界(可选,人类确认)"}),f.jsxs("p",{className:"muted",children:["逗号或换行分隔。留空则 intake 后进入访谈补齐;不会自动填",f.jsx("code",{children:"src/worker/console/**"})," 模板。"]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"allowedPaths"}),f.jsx("textarea",{rows:2,value:c.allowedPathsText,disabled:h,"data-testid":"prd-allowed-paths",placeholder:"src/**, test/**",onChange:p=>d({allowedPathsText:p.target.value})})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"forbiddenPaths"}),f.jsx("textarea",{rows:2,value:c.forbiddenPathsText,disabled:h,"data-testid":"prd-forbidden-paths",placeholder:".harness/**, node_modules/**",onChange:p=>d({forbiddenPathsText:p.target.value})})]}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"verifyCommands(label:command 或纯命令)"}),f.jsx("textarea",{rows:2,value:c.verifyCommandsText,disabled:h,"data-testid":"prd-verify-commands",placeholder:"typecheck:npm run typecheck",onChange:p=>d({verifyCommandsText:p.target.value})})]})]}),f.jsx("div",{className:"cta-row",children:f.jsxs("button",{type:"button",className:`btn btn-primary${t?" is-loading":""}`,disabled:t||o.prdFileReading||!o.prdText.trim(),"aria-busy":t||void 0,onClick:m,children:[t?f.jsx("span",{className:"spinner","aria-hidden":"true"}):null,t?"导入中…":"导入并创建任务"]})})]})}function vD(e){const{busy:t,taskId:n,taskTitle:a,taskKind:s,sessionId:o,question:c,answerText:d,onAnswerTextChange:m,draftSummary:h,assessmentId:p,runAction:b}=e;return f.jsxs("div",{"data-testid":"panel-interview",children:[f.jsx("h3",{children:"需求访谈(grill-me)"}),f.jsx("p",{className:"muted",children:"一次一问;也可跳过:系统会按推荐补齐草稿并签发评估,随后进入校验。 访谈中不可应用契约 / 运行 DAG / 对账。"}),h?f.jsx("pre",{className:"cmd","data-testid":"draft-summary",children:JSON.stringify(h,null,2)}):null,f.jsxs("div",{className:"cta-row",style:{marginBottom:"0.75rem"},children:[!o||!c?f.jsx("button",{type:"button",className:"btn btn-primary",disabled:t||!n.trim(),onClick:()=>{b("interviewStart",{taskId:n,title:a,taskKind:s})},children:"开始 / 继续访谈"}):null,f.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:"跳过访谈"})]}),o&&c?f.jsxs("div",{className:"interview-card",children:[f.jsxs("p",{className:"interview-q",children:[f.jsx("strong",{children:c.id})," · 风险=",D6[c.risk??""]??c.risk??"—"]}),f.jsx("p",{children:c.text}),c.recommendation?f.jsxs("p",{className:"muted",children:["推荐:",c.recommendation]}):null,f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"你的回答(覆盖推荐)"}),f.jsx("textarea",{rows:3,value:d,disabled:t,onChange:x=>m(x.target.value)})]}),f.jsxs("div",{className:"cta-row",children:[f.jsx("button",{type:"button",className:"btn btn-primary",disabled:t,onClick:()=>{b("interviewTurn",{sessionId:o,questionId:c.id,response:"accept-recommendation"}).then(()=>m(""))},children:"接受推荐"}),f.jsx("button",{type:"button",className:"btn btn-primary",disabled:t||!d.trim(),onClick:()=>{b("interviewTurn",{sessionId:o,questionId:c.id,response:"override",text:d}).then(()=>m(""))},children:"提交自定义回答"}),f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:t||c.risk==="high",onClick:()=>{b("interviewTurn",{sessionId:o,questionId:c.id,response:"defer",text:d||c.recommendation}).then(()=>m(""))},children:"暂缓(非高风险)"})]})]}):null,p?f.jsxs("p",{className:"muted",children:["评估 ID: ",f.jsx("code",{children:p})]}):null]})}function yD(e){const{busy:t,confirmationId:n,operationId:a,dagRunId:s,taskId:o,observeBusy:c,sseLog:d,runAction:m,onStopFollow:h,onShowInspectSplit:p,onOpenInspectSplit:b}=e;return f.jsxs("div",{"data-testid":"panel-run",children:[f.jsx("h3",{children:"运行详情"}),f.jsxs("div",{className:"meta-row",children:[f.jsxs("div",{children:["操作 ID: ",f.jsx("code",{children:a??"—"})]}),f.jsxs("div",{children:["确认 ID: ",f.jsx("code",{children:n??"—"})]})]}),f.jsxs("div",{className:"cta-row",children:[f.jsx("button",{type:"button",className:"btn btn-primary",disabled:t||!n,onClick:()=>{m("runDag",{confirmationId:n},{clientRequestId:Ou("run")})},children:"重新运行"}),f.jsx("button",{type:"button",className:"btn btn-secondary",onClick:h,children:"停止跟随日志"}),f.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!s.trim(),onClick:p,children:"打开检视"}),f.jsx("button",{type:"button",className:"btn btn-ghost",disabled:c||!s.trim()&&!o.trim(),title:"在本页侧栏预览,可关闭返回",onClick:b,children:"侧栏预览"})]}),f.jsx("pre",{className:"cmd","data-testid":"sse-log",children:d.join(`
|
|
325
|
+
`)||"(尚无事件)"})]})}function xD(e){const{shell:t,actions:n,wizard:a,prd:s,recovery:o}=e,{busy:c,step:d,setupBlocked:m,degraded:h}=t;return f.jsxs("section",{className:"panel task-ops","aria-labelledby":"task-ops-title",children:[f.jsx("h2",{id:"task-ops-title",children:"任务操作"}),f.jsx("p",{className:"panel-lead",children:"按 Happy Path 推进;契约落地一步内自动校验,人工确认写入。"}),f.jsx("ol",{className:"wizard-steps","data-testid":"wizard-steps",children:a.wizardSteps.map((p,b)=>f.jsxs("li",{"data-active":d===p.id,"data-done":b<a.stepIndex,children:[f.jsx("span",{className:"step-index",children:String(b+1).padStart(2,"0")}),f.jsx("span",{className:"step-label",children:p.label})]},p.id))}),f.jsxs("label",{className:"field",children:[f.jsx("span",{className:"muted",children:"任务 ID"}),f.jsx("input",{"data-testid":"task-id-input",value:a.taskId,disabled:c||m||d==="import-prd",placeholder:d==="import-prd"?"导入需求后自动生成":"task-id",onChange:p=>a.setTaskId(p.target.value.trim())})]}),a.taskTitle?f.jsxs("p",{className:"workflow-hint","data-testid":"task-title-chip",children:["任务名称:",a.taskTitle]}):null,d!=="import-prd"&&!m?f.jsxs("p",{className:"workflow-hint","data-testid":"workflow-kind-chip",children:["当前流程:",a.workflowMeta.label," ·"," ",f.jsx("code",{children:a.taskKind})]}):null,m||d==="setup"?f.jsxs("div",{className:"empty-state","data-testid":"setup-gate",children:[f.jsx("p",{className:"empty-title",children:"需要先完成设置"}),f.jsx("p",{className:"muted",children:"请先在「模型与认证」完成 Pi 就绪,再导入需求与访谈。"}),f.jsxs("div",{className:"cta-row",children:[f.jsx("button",{type:"button",className:"btn btn-primary",disabled:c,onClick:()=>{t.selectNav("models"),n.runAction("refreshReadiness",{}).then(()=>t.loadHealth())},children:"刷新就绪状态"}),f.jsx("button",{type:"button",className:"btn btn-primary",disabled:c,onClick:()=>{n.runAction("doctor",{})},children:"运行诊断"}),f.jsx("pre",{className:"cmd",children:M6})]})]}):f.jsxs("div",{className:"wizard-body","data-testid":"wizard-body",children:[d==="import-prd"&&f.jsx(bD,{busy:c,taskKind:a.taskKind,onTaskKindChange:a.setTaskKind,workflowHint:a.workflowMeta.hint,prd:s,engineering:a.engineering,onEngineeringChange:a.setEngineering,onImport:()=>{a.importPrdAndCreate()}}),d==="interview"&&f.jsx(vD,{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}),d==="contract"&&f.jsx(pD,{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,onRerunPreflight:()=>{a.runContractPreflight(!0)},onApplyContract:()=>{a.applyContractThenSpine()},onRetrySpine:()=>{a.retrySpineOnly()}}),d==="dag-confirm"&&f.jsx(gD,{busy:c,taskId:a.taskId,confirmationId:n.confirmationId,confirmationDetails:n.confirmationDetails,runAction:n.runAction,onConfirmAndRun:()=>{a.confirmAndRunDag()}}),d==="run"&&f.jsx(yD,{busy:c,confirmationId:n.confirmationId,operationId:n.operationId,dagRunId:o.dagRunId,taskId:a.taskId,observeBusy:t.observeBusy,sseLog:n.sseLog,runAction:n.runAction,onStopFollow:n.stopFollowSse,onShowInspectSplit:()=>o.setInspectSplitOpen(!0),onOpenInspectSplit:()=>{o.openInspectSplit()}})]})]})}const wD={};function SD(){const e=bO(),t=k.useRef(()=>{}),n=k.useCallback(p=>t.current(p),[]),a=yO({shell:e,applyInterviewPayload:n}),s=jO(),o=JO({shell:e,actions:a,prd:s}),c=QO({shell:e,actions:a,wizard:o});k.useEffect(()=>{t.current=o.applyInterviewPayload}),k.useEffect(()=>{e.loadHealth()},[e.loadHealth]);const d=k.useCallback((p,b={})=>{e.selectNav(p),b.taskId&&o.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 x=x6(p,b);window.location.hash.replace(/^#/,"")!==x&&(window.location.hash=x)},[e.selectNav,o.setTaskId,c.setDagRunId,c.setFromNodeId,c.setFeatureId,c.setInterruptIntent]),m=k.useCallback(()=>{const p=W_(window.location);if(p){d(p.workspace,p);return}const b=y6({env:wD?.VITE_OPERATOR_CHAT_DEFAULT_LANDING,storage:window.localStorage,location:window.location});d(b,{})},[d]);k.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 f.jsx(f.Fragment,{children:f.jsxs("div",{className:`console-app${e.nav==="chat"?" is-chat-focus":""}`,children:[f.jsx(aD,{nav:e.nav,readiness:e.readiness,setupBlocked:e.setupBlocked,degraded:e.degraded,health:e.health,inspectHref:h}),f.jsxs("div",{className:`console-shell${e.nav==="chat"?" is-chat-focus":""}`,children:[f.jsx(iD,{opError:e.opError,opMessage:e.opMessage}),f.jsxs("main",{className:`console-main${e.nav==="chat"?" console-main--fill":""}`,children:[e.nav==="tasks"?f.jsx(xD,{shell:e,actions:a,wizard:o,prd:s,recovery:c}):null,e.nav==="recovery"?f.jsx(mD,{shell:e,recovery:c,wizard:o}):null,e.nav==="night"?f.jsx(f8,{busy:e.busy,runAction:a.runAction,isActionSuccess:a.isActionSuccess,setOpError:e.setOpError}):null,e.nav==="models"?f.jsx(dD,{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"?f.jsxs("section",{className:"panel panel--chat","aria-labelledby":"chat-title",children:[f.jsx("h2",{id:"chat-title",className:"sr-only",children:"对话"}),f.jsx(oO,{origin:"",readiness:e.readiness,surface:"workspace",onNavigateWorkspace:d})]}):null,e.nav==="settings"?f.jsx(hD,{health:e.health,readiness:e.readiness,healthError:e.healthError,layers:e.layers,setupBlocked:e.setupBlocked,degraded:e.degraded}):null]}),c.inspectSplitOpen&&c.dagRunId.trim()?f.jsx(J7,{dagRunId:c.dagRunId.trim(),nodeId:c.fromNodeId.trim()||void 0,onClose:()=>c.setInspectSplitOpen(!1),onOpenFull:c.openFullInspect}):null]})]})})}const U6=document.getElementById("root");if(!U6)throw new Error("Loop Operator Console: #root missing");W7.createRoot(U6).render(f.jsx(k.StrictMode,{children:f.jsx(SD,{})}));export{Nw as _,Lu as g,kD as k};
|